­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ !function(t,e,o,i){var r=i,a=i,n=!1,s=i,l=0,d=i,p="drag",c={id:1718,editor:{selected_shape:"spot-8364",tool:"poly"},general:{name:"Demo",shortcode:"image-map-demo",width:1280,height:776},spots:[{id:"spot-8364",title:"spot-8364",x:26,y:19.8,default_style:{icon_is_pin:1},mouseover_style:{icon_fill:"#ffcd00"},tooltip_style:{position:"left",auto_width:1},tooltip_content:{plain_text:"Mouseover the building below!",squares_settings:{containers:[{id:"sq-container-403761",settings:{elements:[{settings:{name:"Paragraph",iconClass:"fa fa-paragraph"}}]}}]}}},{id:"poly-2893",title:"poly-2893",type:"poly",x:15.757,y:22.263,width:22.844,height:65.977,default_style:{fill:"#ffcd00",fill_opacity:0,use_icon:0,icon_svg_path:"",icon_svg_viewbox:"",icon_fill:"#2196f3"},mouseover_style:{fill:"#ffcd00",fill_opacity:.5112781954887218},tooltip_style:{width:450},tooltip_content:{content_type:"content-builder",squares_settings:{containers:[{id:"sq-container-359931",settings:{elements:[{settings:{name:"Heading",iconClass:"fa fa-header"},options:{heading:{text:"Content Builder for the Tooltips"}}},{settings:{name:"Image",iconClass:"fa fa-camera"},options:{layout:{column_span:{lg:{class:"col-lg-6"}}}}},{settings:{name:"Paragraph",iconClass:"fa fa-paragraph"},options:{text:{text:"Image Map Pro 3.0 comes with a fully featured content builder that allows you to add rich content to your tooltips. Images, video, buttons, responsive grid system - it has it all!"},layout:{column_span:{lg:{class:"col-lg-6"}}}}},{settings:{name:"Button",iconClass:"fa fa-link"},options:{button:{text:"Example Button!",display:"block"}}}]}}]}},points:[{x:2.8712844939993056,y:100},{x:3.536549668697936,y:95.06062700400813},{x:.8754889699034004,y:95.06062700400813},{x:0,y:47.12265849973005},{x:.7847960076976461,y:23.53692508155694},{x:3.9088248123944527,y:17.15586649440026},{x:12.222274912965194,y:15.76484496015944},{x:15.056281433779493,y:7.219083609526608},{x:19.502913861465178,y:6.533930832820084},{x:19.502913861465178,y:4.254220219285366},{x:26.155565608451525,y:1.9745096057506475},{x:33.47348253013651,y:.8346542989832882},{x:38.79560392772559,y:.4547025300608352},{x:44.78299050001331,y:0},{x:52.766172596396935,y:1.8997588446122655},{x:59.41882434338327,y:.7599035378449062},{x:64.49612815668326,y:2.2028938646528204},{x:70.93855610846484,y:3.267998410281798},{x:70.30788472285052,y:9.951430765378646},{x:85.60898374091914,y:7.900104410746106},{x:100,y:12.231141378913366},{x:99.33473482530137,y:71.50361733081603},{x:94.67787860241093,y:71.1236655618936},{x:94.67787860241093,y:73.02342440650584},{x:74.71992336145188,y:73.02342440650584},{x:74.71992336145188,y:99.62004823107758}],vs:[[210.09118541033433,684.7416413373859],[212.03647416413372,659.4528875379939],[204.25531914893617,659.4528875379939],[201.69531914893616,414.0186018237082],[203.99012564995655,293.2636383750531],[213.12503655683665,260.593698339942],[237.43423174842115,253.4719035012826],[245.72109422492397,209.7190516717325],[258.7234042553191,206.21118541033434],[258.7234042553191,194.53945288753798],[278.17629179331306,182.86772036474164],[299.57446808510633,177.03185410334345],[315.1367781155015,175.08656534954406],[332.64437689969606,172.75856534954406],[355.9878419452888,182.48500911854103],[375.44072948328267,176.64914285714283],[390.2871732522796,184.03700911854102],[409.12534954407295,189.49016413373857],[407.2812158054711,223.70820668693008],[452.0228571428571,213.20576291793313],[494.10334346504555,235.37993920972644],[492.15805471124617,538.8449848024316],[478.54103343465044,536.8996960486323],[478.54103343465044,546.6261398176291],[420.18237082066867,546.6261398176291],[420.18237082066867,682.7963525835867]]},{id:"poly-974",title:"poly-974",type:"poly",x:41.033,y:2.507,width:19.909,height:84.48,actions:{mouseover:"no-action"},default_style:{fill:"#ffcd00",fill_opacity:0,use_icon:0,icon_svg_path:"",icon_svg_viewbox:"",icon_fill:"#2196f3"},mouseover_style:{fill:"#ffcd00",fill_opacity:.5112781954887218},tooltip_style:{auto_width:1},tooltip_content:{squares_settings:{containers:[{id:"sq-container-403761",settings:{elements:[{settings:{name:"Paragraph",iconClass:"fa fa-paragraph"}}]}}]}},points:[{x:3.0534351145038165,y:91.98813056379822},{x:0,y:10.979228486646884},{x:11.450381679389313,y:7.71513353115727},{x:11.450381679389313,y:6.528189910979229},{x:3.0534351145038165,y:3.857566765578635},{x:29.00763358778626,y:0},{x:55.72519083969466,y:5.934718100890208},{x:60.30534351145038,y:5.341246290801187},{x:72.51908396946564,y:8.605341246290802},{x:73.2824427480916,y:9.792284866468842},{x:93.12977099236642,y:14.540059347181009},{x:93.12977099236642,y:28.18991097922849},{x:100,y:30.267062314540063},{x:98.47328244274809,y:100},{x:58.01526717557252,y:100},{x:57.25190839694656,y:91.3946587537092},{x:25.190839694656486,y:91.0979228486647},{x:25.190839694656486,y:89.31750741839762},{x:10.687022900763358,y:89.02077151335311},{x:10.687022900763358,y:90.80118694362018}],vs:[[533.0091185410333,622.4924012158053],[525.2279635258358,91.4285714285714],[554.4072948328267,70.0303951367781],[554.4072948328267,62.24924012158054],[533.0091185410333,44.741641337386014],[599.1489361702127,19.45288753799392],[667.2340425531914,58.358662613981764],[678.9057750759878,54.46808510638297],[710.030395136778,75.86626139817629],[711.9756838905774,83.64741641337383],[762.5531914893617,114.77203647416411],[762.5531914893617,204.25531914893614],[780.0607902735562,217.8723404255319],[776.1702127659574,675.0151975683889],[673.0699088145896,675.0151975683889],[671.1246200607902,618.6018237082064],[589.4224924012158,616.6565349544071],[589.4224924012158,604.9848024316108],[552.4620060790272,603.0395136778113],[552.4620060790272,614.7112462006078]]},{id:"poly-225",title:"poly-225",type:"poly",x:64.742,y:16.044,width:18.845,height:71.444,actions:{mouseover:"no-action"},default_style:{fill:"#ffcd00",fill_opacity:0,use_icon:0,icon_svg_path:"",icon_svg_viewbox:"",icon_fill:"#2196f3"},mouseover_style:{fill:"#ffcd00",fill_opacity:.5112781954887218},tooltip_style:{auto_width:1},tooltip_content:{squares_settings:{containers:[{id:"sq-container-403761",settings:{elements:[{settings:{name:"Paragraph",iconClass:"fa fa-paragraph"}}]}}]}},points:[{x:1.6129032258064515,y:92.28070175438596},{x:0,y:25.6140350877193},{x:2.4193548387096775,y:25.6140350877193},{x:2.4193548387096775,y:12.982456140350877},{x:15.32258064516129,y:11.578947368421053},{x:15.32258064516129,y:5.964912280701754},{x:31.451612903225808,y:4.912280701754386},{x:30.64516129032258,y:2.807017543859649},{x:54.03225806451613,y:1.7543859649122806},{x:54.83870967741935,y:3.1578947368421053},{x:77.41935483870968,y:0},{x:91.12903225806451,y:5.614035087719298},{x:91.93548387096774,y:21.75438596491228},{x:98.38709677419355,y:25.6140350877193},{x:100,y:81.05263157894737},{x:98.38709677419355,y:89.47368421052632},{x:86.29032258064517,y:89.47368421052632},{x:85.48387096774194,y:99.64912280701755},{x:3.225806451612903,y:100}],vs:[[832.5835866261398,636.1094224924011],[828.693009118541,266.5045592705167],[834.5288753799392,266.5045592705167],[834.5288753799392,196.47416413373858],[865.6534954407294,188.69300911854103],[865.6534954407294,157.56838905775075],[904.5592705167173,151.73252279635258],[902.6139817629179,140.06079027355622],[959.0273556231002,134.22492401215806],[960.9726443768997,142.0060790273556],[1015.4407294832827,124.4984802431611],[1048.5106382978722,155.62310030395136],[1050.4559270516718,245.1063829787234],[1066.018237082067,266.5045592705167],[1069.9088145896656,573.8601823708206],[1066.018237082067,620.547112462006],[1036.838905775076,620.547112462006],[1034.8936170212764,676.9604863221883],[836.4741641337386,678.9057750759878]]},{id:"poly-1879",title:"poly-1879",type:"poly",x:88.146,y:53.144,width:11.854,height:35.095,actions:{mouseover:"no-action"},default_style:{fill:"#ffcd00",fill_opacity:0,use_icon:0,icon_svg_path:"",icon_svg_viewbox:"",icon_fill:"#2196f3"},mouseover_style:{fill:"#ffcd00",fill_opacity:.5112781954887218},tooltip_style:{auto_width:1},tooltip_content:{squares_settings:{containers:[{id:"sq-container-403761",settings:{elements:[{settings:{name:"Paragraph",iconClass:"fa fa-paragraph"}}]}}]}},points:[{x:5.128205128205128,y:99.28571428571429},{x:3.8461538461538463,y:19.28571428571429},{x:0,y:13.571428571428571},{x:8.974358974358974,y:13.571428571428571},{x:10.256410256410255,y:10},{x:14.102564102564102,y:9.285714285714286},{x:15.384615384615385,y:5.714285714285714},{x:98.71794871794873,y:0},{x:100,y:100}],vs:[[1136.0486322188447,682.7963525835867],[1134.1033434650453,464.9240121580547],[1128.267477203647,449.36170212765956],[1141.8844984802429,449.36170212765956],[1143.8297872340422,439.6352583586626],[1149.6656534954404,437.6899696048632],[1151.6109422492398,427.9635258358662],[1278.0547112462002,412.4012158054711],[1279.9999999999995,684.741641337386]]},{id:"poly-5080",title:"poly-5080",type:"poly",x:3.191,y:57.155,width:12.614,height:31.085,actions:{mouseover:"no-action"},default_style:{fill:"#ffcd00",fill_opacity:0,use_icon:0,icon_svg_path:"",icon_svg_viewbox:"",icon_fill:"#2196f3"},mouseover_style:{fill:"#ffcd00",fill_opacity:.5112781954887218},tooltip_style:{auto_width:1},tooltip_content:{squares_settings:{containers:[{id:"sq-container-403761",settings:{elements:[{settings:{name:"Paragraph",iconClass:"fa fa-paragraph"}}]}}]}},points:[{x:1.2048192771084338,y:100},{x:0,y:92.74193548387096},{x:13.253012048192772,y:90.32258064516128},{x:14.457831325301203,y:87.09677419354838},{x:28.915662650602407,y:87.09677419354838},{x:32.53012048192771,y:50},{x:38.55421686746988,y:41.12903225806452},{x:45.78313253012048,y:41.12903225806452},{x:44.57831325301205,y:20.967741935483872},{x:66.26506024096386,y:15.32258064516129},{x:67.46987951807229,y:2.4193548387096775},{x:83.13253012048193,y:0},{x:98.79518072289156,y:4.838709677419355},{x:100,y:99.19354838709677}],vs:[[42.796352583586625,684.741641337386],[40.85106382978723,667.2340425531914],[62.24924012158054,661.3981762917932],[64.19452887537993,653.6170212765958],[87.53799392097264,653.6170212765958],[93.37386018237082,564.1337386018237],[103.10030395136778,542.7355623100304],[114.77203647416414,542.7355623100304],[112.82674772036475,494.10334346504555],[147.8419452887538,480.48632218844983],[149.7872340425532,449.36170212765956],[175.07598784194528,443.5258358662614],[200.3647416413374,455.1975683890577],[202.31003039513678,682.7963525835866]]},{id:"poly-3579",title:"poly-3579",type:"poly",x:33.587,y:69.94,width:7.599,height:18.55,actions:{mouseover:"no-action"},default_style:{fill:"#ffcd00",fill_opacity:0,use_icon:0,icon_svg_path:"",icon_svg_viewbox:"",icon_fill:"#2196f3"},mouseover_style:{fill:"#ffcd00",fill_opacity:.5112781954887218},tooltip_style:{auto_width:1},tooltip_content:{squares_settings:{containers:[{id:"sq-container-403761",settings:{elements:[{settings:{name:"Paragraph",iconClass:"fa fa-paragraph"}}]}}]}},points:[{x:100,y:0},{x:0,y:9.45945945945946},{x:4,y:97.2972972972973},{x:84,y:100},{x:80,y:56.75675675675676},{x:100,y:52.702702702702695}],vs:[[527.1732522796352,542.7355623100303],[429.9088145896656,556.3525835866261],[433.7993920972644,682.7963525835866],[511.61094224924005,686.6869300911853],[507.7203647416413,624.4376899696048],[527.1732522796352,618.6018237082067]]},{id:"poly-919",title:"poly-919",type:"poly",x:39.666,y:77.711,width:12.918,height:10.278,actions:{mouseover:"no-action"},default_style:{fill:"#ffcd00",fill_opacity:0,use_icon:0,icon_svg_path:"",icon_svg_viewbox:"",icon_fill:"#2196f3"},mouseover_style:{fill:"#ffcd00",fill_opacity:.5112781954887218},tooltip_style:{auto_width:1},tooltip_content:{squares_settings:{containers:[{id:"sq-container-403761",settings:{elements:[{settings:{name:"Paragraph",iconClass:"fa fa-paragraph"}}]}}]}},points:[{x:96.47058823529412,y:100},{x:100,y:26.82926829268293},{x:50.588235294117645,y:17.073170731707318},{x:50.588235294117645,y:12.195121951219512},{x:44.70588235294118,y:0},{x:28.235294117647058,y:0},{x:27.058823529411764,y:14.634146341463413},{x:0,y:24.390243902439025},{x:1.1764705882352942,y:97.5609756097561}],vs:[[667.2340425531916,682.7963525835866],[673.0699088145897,624.4376899696048],[591.3677811550152,616.6565349544072],[591.3677811550152,612.7659574468084],[581.6413373860182,603.0395136778114],[554.4072948328268,603.0395136778114],[552.4620060790273,614.7112462006078],[507.72036474164133,622.4924012158053],[509.6656534954407,680.8510638297871]]},{id:"poly-9983",title:"poly-9983",type:"poly",x:60.334,y:73.951,width:4.863,height:14.038,actions:{mouseover:"no-action"},default_style:{fill:"#ffcd00",fill_opacity:0,use_icon:0,icon_svg_path:"",icon_svg_viewbox:"",icon_fill:"#2196f3"},mouseover_style:{fill:"#ffcd00",fill_opacity:.5112781954887218},tooltip_style:{auto_width:1},tooltip_content:{squares_settings:{containers:[{id:"sq-container-403761",settings:{elements:[{settings:{name:"Paragraph",iconClass:"fa fa-paragraph"}}]}}]}},points:[{x:15.625,y:0},{x:84.375,y:0},{x:96.875,y:10.714285714285714},{x:100,y:96.42857142857143},{x:0,y:100},{x:0,y:16.071428571428573}],vs:[[782.0060790273557,573.8601823708207],[824.8024316109422,573.8601823708207],[832.5835866261398,585.531914893617],[834.5288753799392,678.9057750759879],[772.2796352583587,682.7963525835867],[772.2796352583587,591.3677811550152]]},{id:"poly-9416",title:"poly-9416",type:"poly",x:80.699,y:74.202,width:8.055,height:13.787,actions:{mouseover:"no-action"},default_style:{fill:"#ffcd00",fill_opacity:0,use_icon:0,icon_svg_path:"",icon_svg_viewbox:"",icon_fill:"#2196f3"},mouseover_style:{fill:"#ffcd00",fill_opacity:.5112781954887218},tooltip_style:{auto_width:1},tooltip_content:{squares_settings:{containers:[{id:"sq-container-403761",settings:{elements:[{settings:{name:"Paragraph",iconClass:"fa fa-paragraph"}}]}}]}},points:[{x:0,y:98.18181818181819},{x:0,y:47.27272727272727},{x:30.188679245282955,y:41.81818181818181},{x:33.962264150943305,y:.029659090909091627},{x:84.90566037735844,y:0},{x:98.11320754716974,y:10.909090909090908},{x:100,y:100}],vs:[[1032.9483282674773,680.8510638297872],[1032.9483282674773,626.3829787234042],[1064.0729483282676,620.547112462006],[1067.9635258358662,575.8372036474163],[1120.48632218845,575.80547112462],[1134.1033434650458,587.4772036474163],[1136.0486322188451,682.7963525835866]]}]},h=i,g=t.imageMapProEditorDefaults,u=t.imageMapProShapeDefaults;function m(){this.wcpEditorSettings=i,this.actionStack=new Array,this.actionIndex=0,this.canvasImage=new Image,this.canvasWidth=0,this.canvasHeight=0,this.canvas=i,this.ix=0,this.iy=0,this.x=0,this.y=0,this.dx=0,this.dy=0,this.ixss=0,this.iyss=0,this.xss=0,this.yss=0,this.dxss=0,this.dyss=0,this.drawRectWidth=0,this.drawRectHeight=0,this.transformX=0,this.transformY=0,this.transformWidth=0,this.transformHeight=0,this.eventSpotId=i,this.redrawEl=i,this.redrawSvgEl=i,this.redrawPolygonEl=i,this.tempControlPoint=i,this.tempControlPointLine=i,this.tempControlPointIndex=i,this.controlPointInsertionPointX=0,this.controlPointInsertionPointY=0,this.translatedPointIndex=0,this.translatedPoint=i,this.translatedPointX=0,this.translatedPointY=0,this.polyPoints=new Array,this.canvasInitialX=0,this.canvasInitialY=0,this.startedSelecting=!1,this.startedMoving=!1,this.startedTransforming=!1,this.didTransforming=!1,this.transformDirection=0,this.startedDrawingSpot=!1,this.startedDrawingText=!1,this.startedDrawingRect=!1,this.createdDrawingRect=!1,this.startedDrawingOval=!1,this.createdDrawingOval=!1,this.startedDrawingPoly=!1,this.drawingPoly=!1,this.finishedDrawingPoly=!1,this.mouseDownWhileDrawingPoly=!1,this.startedTranslatingControlPoint=!1,this.translatingControlPoint=!1,this.didDeleteControlPoint=!1,this.shouldDeselectShape=!1,this.ctrlKeyDown=!1,this.altKeyDown=!1,this.shiftKeyDown=!1,this.spaceKeyDown=!1,this.commandKeyDown=!1,this.draggingCanvas=!1,this.selectedSpot=i,this.eventSpot=i,this.shapesFormSpotIndex=i,this.iconsHTML=t.wcpFontawesomeUI,this.zoom=1,this.canvasX=0,this.canvasY=0}function _(e,o,r,a){e.complete&&e.naturalWidth!==i&&e.naturalHeight!==i?r():(o(),t(e).on("load",function(){t(e).off("load"),r()}),t(e).on("error",function(){t(e).off("error"),a()}))}function y(t,e,o){return{x:Math.round(1e3*(t-o.offset().left))/1e3,y:Math.round(1e3*(e-o.offset().top))/1e3}}function w(t,e){return{x:e.width*(t.x/100)+e.x,y:e.height*(t.y/100)+e.y}}function S(t,e){return t<0&&(t=0),t>100&&(t=100),e<0&&(e=0),e>100&&(e=100),{x:Math.round(1e3*t)/1e3,y:Math.round(1e3*e)/1e3}}function f(t,e){this.x=t,this.y=e}t.imageMapProDefaultSettings=t.extend(!0,{},g),t.imageMapProDefaultSpotSettings=t.extend(!0,{},u),t.squaresExtendElementDefaults({defaultControls:{font:{text_color:{name:"Text Color",type:"color",default:"#ffffff"}}}}),t.wcpTourCoordinatesForTipForStep=function(e){return"Drawing Shapes"==e?{x:t("#wcp-editor-toolbar").offset().left,y:t("#wcp-editor-toolbar").offset().top+t("#wcp-editor-toolbar").height()/2}:"Customize Your Shapes"==e?{x:t('[data-wcp-main-tab-button-name="Shape"]').offset().left+20,y:t('[data-wcp-main-tab-button-name="Shape"]').offset().top+40}:"Edit and Delete Shapes"==e?{x:t("#wcp-editor-right").offset().left-20,y:t("#wcp-editor-right").offset().top+50}:"Use Icons"==e?{x:t('[data-wcp-form-tab-button-name="icon"]').offset().left+64,y:t('[data-wcp-form-tab-button-name="icon"]').offset().top+28}:"Tooltip Content Builder"==e?{x:t('[data-wcp-form-tab-button-name="tooltip_content"]').offset().left+64,y:t('[data-wcp-form-tab-button-name="tooltip_content"]').offset().top+28}:"Responsive & Fullscreen Tooltips"==e?{x:t('[data-wcp-main-tab-button-name="Image Map"]').offset().left+150,y:t('[data-wcp-main-tab-button-name="Image Map"]').offset().top+40}:"Preview Mode"==e?{x:t("#wcp-editor-button-preview").offset().left+64,y:t("#wcp-editor-button-preview").offset().top+32}:"Save and Load"==e?{x:t("#wcp-editor-button-load").offset().left+64,y:t("#wcp-editor-button-load").offset().top+32}:"Publish"==e?{x:t("#wcp-editor-form-control-image_map_shortcode").offset().left+t("#wcp-editor-form-control-image_map_shortcode").outerWidth()+20,y:t("#wcp-editor-form-control-image_map_shortcode").offset().top+t("#wcp-editor-form-control-image_map_shortcode").outerHeight()/2}:"Import and Export"==e?{x:t('[data-wcp-editor-extra-main-button-name="export"]').offset().left+64,y:t('[data-wcp-editor-extra-main-button-name="export"]').offset().top+32}:"Code"==e?{x:t('[data-wcp-editor-extra-main-button-name="code"]').offset().left+64,y:t('[data-wcp-editor-extra-main-button-name="code"]').offset().top+32}:void 0},t.wcpTourCoordinatesForHighlightRect=function(e){return"Drawing Shapes"==e?{x:t("#wcp-editor-toolbar").offset().left,y:t("#wcp-editor-toolbar").offset().top,width:t("#wcp-editor-toolbar").outerWidth(),height:t("#wcp-editor-toolbar").outerHeight()}:"Customize Your Shapes"==e?{x:t('[data-wcp-main-tab-button-name="Shape"]').offset().left,y:t('[data-wcp-main-tab-button-name="Shape"]').offset().top,width:t('[data-wcp-main-tab-button-name="Shape"]').outerWidth(),height:t('[data-wcp-main-tab-button-name="Shape"]').outerHeight()}:"Edit and Delete Shapes"==e?{x:t("#wcp-editor-right").offset().left,y:t("#wcp-editor-right").offset().top,width:t("#wcp-editor-right").outerWidth(),height:t("#wcp-editor-right").outerHeight()}:"Use Icons"==e?{x:t('[data-wcp-form-tab-button-name="icon"]').offset().left,y:t('[data-wcp-form-tab-button-name="icon"]').offset().top,width:t('[data-wcp-form-tab-button-name="icon"]').outerWidth(),height:t('[data-wcp-form-tab-button-name="icon"]').outerHeight()}:"Tooltip Content Builder"==e?{x:t('[data-wcp-form-tab-button-name="tooltip_content"]').offset().left,y:t('[data-wcp-form-tab-button-name="tooltip_content"]').offset().top,width:t('[data-wcp-form-tab-button-name="tooltip_content"]').outerWidth(),height:t('[data-wcp-form-tab-button-name="tooltip_content"]').outerHeight()}:"Responsive & Fullscreen Tooltips"==e?{x:t('[data-wcp-main-tab-button-name="Image Map"]').offset().left,y:t('[data-wcp-main-tab-button-name="Image Map"]').offset().top,width:t('[data-wcp-main-tab-button-name="Image Map"]').outerWidth(),height:t('[data-wcp-main-tab-button-name="Image Map"]').outerHeight()}:"Preview Mode"==e?{x:t("#wcp-editor-button-preview").offset().left,y:t("#wcp-editor-button-preview").offset().top,width:t("#wcp-editor-button-preview").outerWidth(),height:t("#wcp-editor-button-preview").outerHeight()}:"Save and Load"==e?{x:t("#wcp-editor-button-save").offset().left,y:t("#wcp-editor-button-save").offset().top,width:t("#wcp-editor-button-save").outerWidth()+t("#wcp-editor-button-load").outerWidth(),height:t("#wcp-editor-button-save").outerHeight()}:"Publish"==e?{x:t("#wcp-editor-form-control-image_map_shortcode").offset().left-10,y:t("#wcp-editor-form-control-image_map_shortcode").offset().top-10,width:t("#wcp-editor-form-control-image_map_shortcode").outerWidth()+20,height:t("#wcp-editor-form-control-image_map_shortcode").outerHeight()+20}:"Import and Export"==e?{x:t('[data-wcp-editor-extra-main-button-name="import"]').offset().left,y:t('[data-wcp-editor-extra-main-button-name="import"]').offset().top,width:t('[data-wcp-editor-extra-main-button-name="import"]').outerWidth()+t('[data-wcp-editor-extra-main-button-name="export"]').outerWidth(),height:t('[data-wcp-editor-extra-main-button-name="import"]').outerHeight()}:"Code"==e?{x:t('[data-wcp-editor-extra-main-button-name="code"]').offset().left,y:t('[data-wcp-editor-extra-main-button-name="code"]').offset().top,width:t('[data-wcp-editor-extra-main-button-name="code"]').outerWidth(),height:t('[data-wcp-editor-extra-main-button-name="code"]').outerHeight()}:void 0},t.wcpTourEventStarted=function(){h=a,a=c,r.shapesFormSpotIndex=-1,r.parseSettings(),r.redraw(),t.wcpEditorOpenMainTabWithName("Shape")},t.wcpTourEventFinished=function(){a=h,r.redraw()},t.wcpTourEventStepWillChange=function(e){"Publish"==e?t.wcpEditorOpenMainTabWithName("Image Map"):t.wcpEditorOpenMainTabWithName("Shape")},t.wcpEditorGetContentForTabWithName=function(e){return"Image Map"==e?t.wcpEditorGetHTMLForFormWithName("Image Map Settings"):"Shape"==e?t.wcpEditorGetHTMLForFormWithName("Shape Settings"):void 0},t.wcpEditorGetContentForCanvas=function(){return""},t.wcpEditorGetListItems=function(){for(var t=[],e=a.spots.length-1;e>=0;e--){var o=a.spots[e];t.push({id:o.id,title:o.title})}return t},t.wcpEditorGetSaves=function(e){t.imp_editor_storage_get_saves_list(function(t){for(var o=new Array,i=0;i0&&a.image.url!==s.image.image_url?(a.image.url=s.image.image_url,r.canvasImage.src=s.image.image_url,_(r.canvasImage,function(){t.wcpEditorPresentLoadingScreen("Loading Image...")},function(){r.canvas_events(),t.wcpEditorHideLoadingScreen(),a.general.width=r.canvasImage.naturalWidth,a.general.height=r.canvasImage.naturalHeight,a.general.naturalWidth=r.canvasImage.naturalWidth,a.general.naturalHeight=r.canvasImage.naturalHeight,t.wcpEditorSetControlValue("Image Map Settings","image_map_width",a.general.width),t.wcpEditorSetControlValue("Image Map Settings","image_map_height",a.general.height),t.wcpEditorUpdateForm("Image Map Settings"),r.redraw(),r.addAction()},function(){t.wcpEditorHideLoadingScreenWithMessage("Error Loading Image!",!0,!1)})):(a.general.name=s.general.image_map_name.trim(),s.general.image_map_shortcode&&(a.general.shortcode=s.general.image_map_shortcode.replace(/[\[\]']+/g,"").trim()),a.general.width=s.general.image_map_width,a.general.height=s.general.image_map_height,a.general.responsive=s.general.responsive,a.general.preserve_quality=s.general.preserve_quality,a.general.pageload_animation=s.general.pageload_animation,a.general.center_image_map=s.general.center_image_map,a.image.url=s.image.image_url,a.tooltips.enable_tooltips=s.tooltips.enable_tooltips,a.tooltips.show_tooltips=s.tooltips.show_tooltips,a.tooltips.sticky_tooltips=s.tooltips.sticky_tooltips,a.tooltips.constrain_tooltips=s.tooltips.constrain_tooltips,a.tooltips.tooltip_animation=s.tooltips.tooltip_animation,a.tooltips.fullscreen_tooltips=s.tooltips.fullscreen_tooltips,a.fullscreen.enable_fullscreen_mode=s.fullscreen.enable_fullscreen_mode,a.fullscreen.start_in_fullscreen_mode=s.fullscreen.start_in_fullscreen_mode,a.fullscreen.fullscreen_background=s.fullscreen.fullscreen_background,a.fullscreen.fullscreen_button_position=s.fullscreen.fullscreen_button_position,a.fullscreen.fullscreen_button_type=s.fullscreen.fullscreen_button_type,a.fullscreen.fullscreen_button_color=s.fullscreen.fullscreen_button_color,a.fullscreen.fullscreen_button_text_color=s.fullscreen.fullscreen_button_text_color,a.zooming.enable_zooming=s.zooming.enable_zooming,a.zooming.max_zoom=s.zooming.max_zoom,a.zooming.limit_max_zoom_to_image_size=s.zooming.limit_max_zoom_to_image_size,a.zooming.enable_navigator=s.zooming.enable_navigator,a.zooming.enable_zoom_buttons=s.zooming.enable_zoom_buttons,a.zooming.zoom_button_text_color=s.zooming.zoom_button_text_color,a.zooming.zoom_button_background_color=s.zooming.zoom_button_background_color,a.layers.enable_layers=s.layers.enable_layers,a.layers.layers_list=s.layers.layers_list,1==parseInt(a.layers.enable_layers,10)&&0==a.layers.layers_list.length&&(a.layers.layers_list=[{id:0,title:"Main Floor",image_url:a.image.url,image_width:a.general.width,image_height:a.general.height}],r.updateImageMapForm()),s.custom_code&&(a.custom_code.custom_css=s.custom_code.custom_css,a.custom_code.custom_js=s.custom_code.custom_js),r.redraw(),r.addAction())}if("Shape Settings"==e&&r.selectedSpot!==i){var l=r.selectedSpot,d=t.wcpEditorGetModelOfFormWithName("Shape Settings");l.x=d.general.x,l.y=d.general.y,l.width=d.general.width,l.height=d.general.height,l.connected_to=d.general.connected_to,l.use_connected_shape_tooltip=d.general.use_connected_shape_tooltip,l.text.text=d.text.text,l.text.font_family=d.text.font_family,l.text.font_size=d.text.font_size,l.text.font_weight=d.text.font_weight,l.text.text_color=d.text.text_color,l.text.text_opacity=d.text.text_opacity,l.actions.click=d.actions.click,l.actions.link=d.actions.link,l.actions.script=d.actions.script,l.actions.open_link_in_new_window=d.actions.open_link_in_new_window,l.default_style.opacity=d.default_style.opacity,l.default_style.icon_fill=d.default_style.icon_fill,l.default_style.border_radius=d.default_style.border_radius,l.default_style.background_color=d.default_style.background_color,l.default_style.background_opacity=d.default_style.background_opacity,l.default_style.border_width=d.default_style.border_width,l.default_style.border_style=d.default_style.border_style,l.default_style.border_color=d.default_style.border_color,l.default_style.border_opacity=d.default_style.border_opacity,l.default_style.fill=d.default_style.fill,l.default_style.fill_opacity=d.default_style.fill_opacity,l.default_style.stroke_color=d.default_style.stroke_color,l.default_style.stroke_opacity=d.default_style.stroke_opacity,l.default_style.stroke_width=d.default_style.stroke_width,l.default_style.stroke_dasharray=d.default_style.stroke_dasharray,l.default_style.stroke_linecap=d.default_style.stroke_linecap,l.default_style.use_icon=d.icon.use_icon,l.default_style.icon_type=d.icon.icon_type,l.default_style.icon_svg_path=d.icon.icon_svg_path,l.default_style.icon_svg_viewbox=d.icon.icon_svg_viewbox,l.default_style.icon_url=d.icon.icon_url,l.default_style.icon_is_pin=d.icon.icon_is_pin,l.default_style.icon_shadow=d.icon.icon_shadow,l.mouseover_style.opacity=d.mouseover_style.mouseover_opacity,l.mouseover_style.icon_fill=d.mouseover_style.mouseover_icon_fill,l.mouseover_style.border_radius=d.mouseover_style.mouseover_border_radius,l.mouseover_style.background_color=d.mouseover_style.mouseover_background_color,l.mouseover_style.background_opacity=d.mouseover_style.mouseover_background_opacity,l.mouseover_style.border_width=d.mouseover_style.mouseover_border_width,l.mouseover_style.border_style=d.mouseover_style.mouseover_border_style,l.mouseover_style.border_color=d.mouseover_style.mouseover_border_color,l.mouseover_style.border_opacity=d.mouseover_style.mouseover_border_opacity,l.mouseover_style.fill=d.mouseover_style.mouseover_fill,l.mouseover_style.fill_opacity=d.mouseover_style.mouseover_fill_opacity,l.mouseover_style.stroke_color=d.mouseover_style.mouseover_stroke_color,l.mouseover_style.stroke_opacity=d.mouseover_style.mouseover_stroke_opacity,l.mouseover_style.stroke_width=d.mouseover_style.mouseover_stroke_width,l.mouseover_style.stroke_dasharray=d.mouseover_style.mouseover_stroke_dasharray,l.mouseover_style.stroke_linecap=d.mouseover_style.mouseover_stroke_linecap,l.tooltip_style.enable_tooltip=d.tooltip_settings.enable_tooltip,l.tooltip_style.border_radius=d.tooltip_settings.tooltip_border_radius,l.tooltip_style.padding=d.tooltip_settings.tooltip_padding,l.tooltip_style.background_color=d.tooltip_settings.tooltip_background_color,l.tooltip_style.background_opacity=d.tooltip_settings.tooltip_background_opacity,l.tooltip_style.position=d.tooltip_settings.tooltip_position,l.tooltip_style.width=d.tooltip_settings.tooltip_width,l.tooltip_style.auto_width=d.tooltip_settings.tooltip_auto_width,l.tooltip_content.content_type=d.tooltip_content.tooltip_content_type,l.tooltip_content.plain_text=d.tooltip_content.plain_text,l.tooltip_content.plain_text_color=d.tooltip_content.plain_text_color,l.tooltip_content.squares_settings=d.tooltip_content.squares_settings,r.redraw(),n||r.addAction()}},t.wcpEditorEventNewButtonPressed=function(){},t.wcpEditorEventSaveButtonPressed=function(){t.wcpEditorPresentLoadingScreen("Saving..."),t.imp_editor_storage_store_save(r.getCompressedSettings(),function(e){if(e)t.wcpEditorHideLoadingScreenWithMessage("Saved!",!1,!1);else{t.wcpEditorHideLoadingScreenWithMessage("There was an error saving the image map!",!0,!1);var o="";o+='',o+='",setTimeout(function(){t.wcpEditorPresentModal({name:"error-saving",title:"Error Saving Image Map",buttons:[{class:"primary",name:"primary",title:"Done"}],body:o})},1e3)}})},t.wcpEditorEventLoadButtonPressed=function(){},t.wcpEditorEventUndoButtonPressed=function(){r.undo()},t.wcpEditorEventRedoButtonPressed=function(){r.redo()},t.wcpEditorEventPreviewButtonPressed=function(){},t.wcpEditorEventEnteredPreviewMode=function(){a.editor.previewMode=1,r.redraw()},t.wcpEditorEventExitedPreviewMode=function(){a.editor.previewMode=0,r.redraw()},t.wcpEditorEventListItemMouseover=function(e){for(var o=i,r=0;ra.spots.length-1&&(o=a.spots.length-1),a.spots.splice(o,0,a.spots.splice(e,1)[0]),r.updateShapesList(),r.redraw()},t.wcpEditorEventListItemButtonPressed=function(t,e){},t.wcpEditorEventListItemTitleButtonPressed=function(e){if(r.selectedSpot){if("duplicate"==e){var o=t.extend(!0,{},r.selectedSpot);"spot"==o.type&&(o.id=r.createIdForSpot()),"rect"==o.type&&(o.id=r.createIdForRect()),"oval"==o.type&&(o.id=r.createIdForOval()),"poly"==o.type&&(o.id=r.createIdForPoly()),"text"==o.type&&(o.id=r.createIdForText()),o.title+=" Copy",a.spots.push(o),r.redraw(),r.addAction()}if("copy"==e&&(s={text:t.extend(!0,{},r.selectedSpot.text),default_style:t.extend(!0,{},r.selectedSpot.default_style),mouseover_style:t.extend(!0,{},r.selectedSpot.mouseover_style),tooltip_style:t.extend(!0,{},r.selectedSpot.tooltip_style),tooltip_content:{plain_text_color:r.selectedSpot.tooltip_content.plain_text_color}}),"paste"==e){var i=r.selectedSpot.text.text;r.selectedSpot.text=t.extend(!0,{},s.text),r.selectedSpot.default_style=t.extend(!0,{},s.default_style),r.selectedSpot.mouseover_style=t.extend(!0,{},s.mouseover_style),r.selectedSpot.tooltip_style=t.extend(!0,{},s.tooltip_style),r.selectedSpot.tooltip_content.plain_text_color=s.tooltip_content.plain_text_color,r.selectedSpot.text.text=i,r.redraw(),r.addAction()}if("delete"==e&&(l=r.getIndexOfSpotWithId(r.selectedSpot.id),t.wcpEditorPresentModal({name:"confirm-delete-shape",title:"Confirm Delete",buttons:[{name:"cancel",title:"Cancel",class:""},{name:"primary",title:"Delete",class:"danger"}],body:"Delete this shape?"})),"rename"==e){var n='
';n+="",n+='',n+='',n+="
",t.wcpEditorPresentModal({name:"confirm-rename-shape",title:"Rename Shape",buttons:[{name:"cancel",title:"Cancel",class:""},{name:"primary",title:"Rename",class:"primary"}],body:n}),t("#input-shape-name").val(r.selectedSpot.title)}}},t.wcpEditorEventSelectedTool=function(t){a.editor.tool=t,r.redraw()},t.wcpEditorEventPressedTool=function(t){"reset"==t&&r.zoomReset()},t.wcpEditorEventExtraMainButtonClick=function(e){if("code"==e){var o="";o+='
',o+='
',o+=" This is a sample HTML document, showing how to install the plugin in your website.",o+="
",o+="
",o+="<!doctype html>
",o+="<html>
",o+="<head>
",o+=' <link rel="stylesheet" href="css/image-map-pro.min.css">
',o+="</head>
",o+="<body>
",o+=' <div id="image-map-pro-container"></div>

',o+=" <script src="js/jquery.min.js"></script>
",o+=' <script src="js/image-map-pro.min.js"></script>
',o+=" <script type="text/javascript">
",o+=" ;(function ($, window, document, undefined) {
",o+=" $(document).ready(function() {
",o+="
",o+='
The code that contains all settings and initializes the plugin:
',o+='',o+="
",o+="            });
",o+=" })(jQuery, window, document);
",o+=" </script>
",o+="</body>
",o+="</html>
",o+="
",o+="
",t.wcpEditorPresentModal({name:"code",title:"Code",buttons:[{name:"primary",title:"Done",class:"primary"}],body:o}),t("#textarea-generated-code").val("$('#image-map-pro-container').imageMapPro("+JSON.stringify(r.getCompressedSettings())+");")}if("activate"==e){o='
';o+='',o+='',o+="
",t.wcpEditorPresentModal({name:"activate",title:"Activate",buttons:[{name:"cancel",title:"Cancel",class:"default"},{name:"primary",title:"Activate",class:"primary"}],body:o})}if("help"==e&&t.wcpTourRestart("Image Map Pro Editor Tour"),"import"==e){o="";o+='
',o+='\t
',o+='\t\t
Image Map Pro Code
',o+='\t\t
SVG XML Code
',o+="\t
",o+=' ',o+=' ',o+=' \t
Invalid code!
',o+=' \t
Open a valid SVG file with a plain text editor, for example Notepad, copy all of its contents and paste them here.
';var i={name:"import",title:"Import",buttons:[{name:"cancel",title:"Cancel",class:""},{name:"primary",title:"Import",class:"primary",id:"wcp-editor-confirm-import"}],body:o+="
"};t.wcpEditorPresentModal(i)}},t.wcpEditorEventModalButtonClicked=function(e,o){if("create_new"==e&&"cancel"==o&&t.wcpEditorCloseModal(),"modal-choose-icon"==e&&"cancel"==o&&t.wcpEditorCloseModal(),"load"==e&&"cancel"==o&&t.wcpEditorCloseModal(),"confirm-delete-shape"==e&&("primary"==o&&(a.editor.selected_shape==a.spots[l].id&&r.deselectSpot(),a.spots.splice(l,1),t.wcpEditorCloseModal(),r.redraw(),r.addAction()),"cancel"==o&&t.wcpEditorCloseModal()),"code"==e&&"primary"==o&&t.wcpEditorCloseModal(),"export"==e&&"primary"==o&&t.wcpEditorCloseModal(),"import"==e&&("cancel"==o&&t.wcpEditorCloseModal(),"primary"==o)){if("image-map-pro-code"==t("#wcp-editor-control-import-type").data("value")){var n=t("#wcp-editor-textarea-import").val(),s=i;try{s=JSON.parse(n)}catch(t){console.log("error decoding JSON!")}if(s===i)t("#wcp-editor-import-error").show();else{t.wcpEditorCloseModal(),t("#wcp-editor-import-error").hide();var p=a.general.name,c=a.id;(a=t.extend(!0,{},s)).general.name=p,a.id=c,r.launch()}}if("svg-xml-code"==t("#wcp-editor-control-import-type").data("value")){var h=t.extend(!0,{},a);t("#wcp-editor-import-error").hide();try{var g=t.parseXML(t("#wcp-editor-textarea-import").val()),u=[];t(g).find("rect, polygon, ellipse, circle").each(function(){u.push(t(this))});for(var m=0;m",!0,!0))),"confirm-rename-shape"==e&&("cancel"==o&&t.wcpEditorCloseModal(),"primary"==o)){var E=t("#input-shape-name").val();if(0==E.length)return void t("#rename-shape-error").show().html("Please enter a new name for the shape, or press Cancel.");var C=!1;for(m=0;m0?((a=t.extend(!0,{},g)).general.name="Untitled",a.id=Math.round(1e4*Math.random())+1,i.launch(),t.wcpEditorPresentLoadModal()):((a=t.extend(!0,{},g)).general.name="Untitled",a.id=Math.round(1e4*Math.random())+1,i.launch())}):t.wcpTourStart("Image Map Pro Editor Tour")})},m.prototype.launch=function(){var e=this;t.wcpEditorInit(this.wcpEditorSettings),t("#wcp-editor-canvas").attr("data-editor-object-type","0"),this.selectedSpot=i,this.eventSpot=i,this.shapesFormSpotIndex=i,this.parseSettings(),a.image.url&&a.image.url.length>0?(e.canvasImage.src=a.image.url,_(e.canvasImage,function(){t.wcpEditorPresentLoadingScreen("Loading Image...")},function(){e.canvas_events(),a.general.naturalWidth=e.canvasImage.naturalWidth,a.general.naturalHeight=e.canvasImage.naturalHeight,a.editor.state={dragging:!1,canvasX:0,canvasY:0,canvasZoom:1},e.redraw(),e.selectSpot(a.editor.selected_shape),t.wcpEditorHideLoadingScreen()},function(){t.wcpEditorHideLoadingScreenWithMessage("Error Loading Image!",!0,!1)})):(t.wcpEditorHideLoadingScreen(),t.wcpEditorOpenMainTabWithName("Image Map"),t.wcpEditorFormOpenTab("Image Map Settings","image")),this.actionIndex=-1,this.actionStack=new Array,this.addAction(),this.canvas=t("#wcp-editor-canvas"),t.wcpEditorSelectTool(a.editor.tool),this.updateImageMapForm()},m.prototype.parseSettings=function(){for(var e=0;e"),a.spots[e].tooltip_content.text&&(s+="

"+a.spots[e].tooltip_content.text+"

"),a.spots[e].tooltip_content.plain_text=s,a.spots[e].tooltip_content={content_type:a.spots[e].tooltip_content.content_type,plain_text:a.spots[e].tooltip_content.plain_text,plain_text_color:a.spots[e].tooltip_content.plain_text_color,squares_json:a.spots[e].tooltip_content.squares_json}}if(a.spots[e].tooltip_content.squares_json)try{a.spots[e].tooltip_content.squares_settings=JSON.parse(a.spots[e].tooltip_content.squares_json),a.spots[e].tooltip_content.squares_json=""}catch(t){}a.spots[e].title||(a.spots[e].title=a.spots[e].id),"show-tooltip"==a.spots[e].actions.click&&(a.spots[e].actions.click="no-action")}a.general=t.extend(!0,{},g.general,a.general),a.image=t.extend(!0,{},g.image,a.image),a.tooltips=t.extend(!0,{},g.tooltips,a.tooltips),a.fullscreen=t.extend(!0,{},g.fullscreen,a.fullscreen),a.zooming=t.extend(!0,{},g.zooming,a.zooming),a.editor=t.extend(!0,{},g.editor,a.editor),a.custom_code=t.extend(!0,{},g.custom_code,a.custom_code),a.layers=t.extend(!0,{},g.layers,a.layers),0==a.layers.layers_list.length&&(a.layers.layers_list=[{id:0,title:"Main Floor",image_url:a.image.url,image_width:1280,image_height:776}]),a.general.width=parseInt(a.general.width),a.general.height=parseInt(a.general.height),a.general.image_url&&(a.image.url=a.general.image_url,a.general.image_url=i),a.general.sticky_tooltips&&(a.tooltips.sticky_tooltips=a.general.sticky_tooltips,a.general.sticky_tooltips=i),a.general.constrain_tooltips&&(a.tooltips.constrain_tooltips=a.general.constrain_tooltips,a.general.constrain_tooltips=i),a.general.fullscreen_tooltips&&(a.tooltips.fullscreen_tooltips=a.general.fullscreen_tooltips,a.general.fullscreen_tooltips=i),a.general.tooltip_animation&&(a.tooltips.tooltip_animation=a.general.tooltip_animation,a.general.tooltip_animation=i);for(e=0;eo||n>i){var l=r/n;l<=o/i?(e.w=i*l,e.h=t("#wcp-editor-center").height()-80):(e.w=t("#wcp-editor-center").width()-80,e.h=o/l)}else e.w=r,e.h=n;return e},m.prototype.redrawSpotSelection=function(){var e=this;if(t(".imp-editor-shape").removeClass("selected"),-1!=a.editor.selected_shape){var o=e.getIndexOfSpotWithId(a.editor.selected_shape);if(o==i)return void(a.editor.selected_shape=-1);t('.imp-editor-shape[data-id="'+a.editor.selected_shape+'"]').addClass("selected"),e.selectedSpot=a.spots[o],"poly"==e.selectedSpot.type&&(e.tempControlPoint=t('.imp-editor-poly[data-id="'+a.editor.selected_shape+'"]').find(".imp-editor-poly-svg-temp-control-point"),e.tempControlPointLine=t('.imp-editor-poly[data-id="'+a.editor.selected_shape+'"]').find(".imp-editor-poly-svg-temp-control-point-line"))}else e.selectedSpot=i},m.prototype.events=function(){var e=this;t(o).off("button-choose-icon-clicked"),t(o).on("button-choose-icon-clicked",function(){t.wcpEditorPresentModal({name:"modal-choose-icon",title:"Choose Icon",buttons:[{name:"cancel",title:"Cancel",class:"default",id:"imp-editor-button-cancel-choose-icon"}],body:e.iconsHTML})}),t(o).off("button-copy-from-default-styles-clicked"),t(o).on("button-copy-from-default-styles-clicked",function(){e.selectedSpot.mouseover_style.opacity=e.selectedSpot.default_style.opacity,e.selectedSpot.mouseover_style.border_radius=e.selectedSpot.default_style.border_radius,e.selectedSpot.mouseover_style.background_color=e.selectedSpot.default_style.background_color,e.selectedSpot.mouseover_style.background_opacity=e.selectedSpot.default_style.background_opacity,e.selectedSpot.mouseover_style.border_width=e.selectedSpot.default_style.border_width,e.selectedSpot.mouseover_style.border_style=e.selectedSpot.default_style.border_style,e.selectedSpot.mouseover_style.border_color=e.selectedSpot.default_style.border_color,e.selectedSpot.mouseover_style.border_opacity=e.selectedSpot.default_style.border_opacity,e.selectedSpot.mouseover_style.fill=e.selectedSpot.default_style.fill,e.selectedSpot.mouseover_style.fill_opacity=e.selectedSpot.default_style.fill_opacity,e.selectedSpot.mouseover_style.stroke_color=e.selectedSpot.default_style.stroke_color,e.selectedSpot.mouseover_style.stroke_opacity=e.selectedSpot.default_style.stroke_opacity,e.selectedSpot.mouseover_style.stroke_width=e.selectedSpot.default_style.stroke_width,e.selectedSpot.mouseover_style.stroke_dasharray=e.selectedSpot.default_style.stroke_dasharray,e.selectedSpot.mouseover_style.stroke_linecap=e.selectedSpot.default_style.stroke_linecap,e.selectedSpot.mouseover_style.icon_fill=e.selectedSpot.default_style.icon_fill,e.redraw(),e.addAction()}),t(o).off("button-reset-size-clicked"),t(o).on("button-reset-size-clicked",function(){a.general.width=e.canvasImage.naturalWidth,a.general.height=e.canvasImage.naturalHeight,e.updateImageMapForm(),e.redraw()}),t(o).off("button-launch-content-builder-clicked"),t(o).on("button-launch-content-builder-clicked",function(){e.launchTooltipContentBuilder()}),t(o).off("click",".fontawesome-icon-wrap"),t(o).on("click",".fontawesome-icon-wrap",function(){t.wcpEditorCloseModal(),e.selectedSpot.default_style.icon_fontawesome_id=t(this).data("fontawesome-id"),e.redraw(),e.addAction()}),t(o).off("click",".category-title-wrap"),t(o).on("click",".category-title-wrap",function(){t(this).toggleClass("active"),t(this).next().toggle()}),t(o).off("click","#imp-editor-done-editing-tooltip, #imp-editor-tooltip-content-builder-close"),t(o).on("click","#imp-editor-done-editing-tooltip, #imp-editor-tooltip-content-builder-close",function(){t("#imp-editor-tooltip-content-builder-wrap").removeClass("imp-visible"),setTimeout(function(){t("#imp-editor-tooltip-content-builder-wrap").hide()},250),e.doneEditingTooltip(),t.squaresHideEditorWindow()}),t(o).on("mouseout","#wcp-editor-right",function(e){if(1==parseInt(a.editor.previewMode,10))for(var o=0;o',t.wcpEditorPresentModal({name:"modal-edit-layer",title:"Edit Layer",buttons:[{name:"cancel",title:"Cancel",class:"default",id:"imp-editor-button-cancel-edit-layer"},{name:"primary",title:"Done",class:"primary",id:"imp-editor-button-done-edit-layer"}],body:i});var r=t('[data-wcp-editor-layers-list-control-option-id="'+o+'"]');t("#wcp-editor-input-add-layer-name").val(r.data("wcp-editor-layers-list-control-option-title")),t("#wcp-editor-input-add-layer-url").val(r.data("wcp-editor-layers-list-control-option-image-url"))}),t(o).off("change","#select-canvas-layer"),t(o).on("change","#select-canvas-layer",function(){a.editor.currentLayer=t("#select-canvas-layer").val(),e.updateShapesList(),e.deselectSpot(),e.redraw()})},m.prototype.canvas_events=function(){var i=this;t(e).off("resize.imp-redraw"),t(e).on("resize.imp-redraw",function(){i.redraw()}),t(o).off("mousedown","#wcp-editor-center"),t(o).on("mousedown","#wcp-editor-center",function(t){i.handleMouseDown(t)}),t(o).off("mousemove","#wcp-editor"),t(o).on("mousemove","#wcp-editor",function(t){i.handleMouseMove(t)}),t(o).off("mouseup","#wcp-editor"),t(o).on("mouseup","#wcp-editor",function(t){i.handleMouseUp(t)}),t("body").on("contextmenu",function(t){if(i.didDeleteControlPoint)return i.didDeleteControlPoint=!1,!1}),t(o).off("keydown"),t(o).on("keydown",function(t){return!i.handleKeyDown(t)}),t(o).off("keyup.canvasEvents"),t(o).on("keyup.canvasEvents",function(t){return!i.handleKeyUp(t)})},m.prototype.addAction=function(){var e=this;e.actionIndex100&&(e.actionStack.splice(0,1),e.actionIndex--),t("#button-save").html(' Save')},m.prototype.undo=function(){var e=this;e.actionIndex>0&&e.actionIndex--,a=t.extend(!0,{},e.actionStack[e.actionIndex]),e.redraw(),e.updateImageMapForm(),e.updateImageMapFormState(),e.updateShapesForm(),e.updateShapesFormState()},m.prototype.redo=function(){var e=this;e.actionIndex0&&i.x0&&i.y=0;s--)if("poly"==a.spots[s].type&&(1!=parseInt(a.layers.enable_layers,10)||a.spots[s].layerID==a.editor.currentLayer)&&o.shouldSelectPoly(a.spots[s].id))return o.eventSpotId=a.spots[s].id,void(o.startedSelecting=!0);if((t(e.target).hasClass("imp-editor-shape")||t(e.target).closest(".imp-editor-shape").length>0)&&!t(e.target).hasClass("imp-editor-poly")&&0==t(e.target).closest(".imp-editor-poly").length)return o.eventSpotId=t(e.target).data("id")||t(e.target).closest(".imp-editor-shape").data("id"),void(o.startedSelecting=!0);if(r){if("spot"==a.editor.tool)return void(o.startedDrawingSpot=!0);if("rect"==a.editor.tool)return void(o.startedDrawingRect=!0);if("oval"==a.editor.tool)return void(o.startedDrawingOval=!0);if("poly"==a.editor.tool)return o.startedDrawingPoly=!0,o.deselectSpot(),o.redraw(),o.polyPoints=new Array,t("#imp-editor-shapes-container").append(''),o.placePointForTempPoly(o.ix,o.iy),o.redrawTempPoly(),o.mouseDownWhileDrawingPoly=!0,void(o.drawingPoly=!0);if("text"==a.editor.tool)return void(o.startedDrawingText=!0)}"select"!=a.editor.tool||0!=n?"wcp-editor-center"==t(e.target).attr("id")&&this.selectedSpot&&(this.shouldDeselectShape=!0):this.shouldDeselectShape=!0}else if(o.startedTransforming=!0,o.transformDirection=t(e.target).data("transform-direction"),o.redrawEl=t(e.target).closest(".imp-editor-shape"),"poly"==o.selectedSpot.type){o.redrawSvgEl=o.redrawEl.find(".imp-editor-poly-svg"),o.redrawPolygonEl=o.redrawSvgEl.find("polygon"),o.polyPoints=new Array;for(var s=0;s100&&(r.x=100-o.selectedSpot.width),r.y+o.selectedSpot.height>100&&(r.y=100-o.selectedSpot.height)),void o.redrawEl.css({left:r.x+"%",top:r.y+"%"})}if(o.startedTransforming){if(o.didTransform=!0,1==o.transformDirection&&(r={x:o.selectedSpot.x+o.dx,y:o.selectedSpot.y+o.dy},c={x:o.selectedSpot.width-o.dx,y:o.selectedSpot.height-o.dy}),2==o.transformDirection&&(r={x:o.selectedSpot.x,y:o.selectedSpot.y+o.dy},c={x:o.selectedSpot.width,y:o.selectedSpot.height-o.dy}),3==o.transformDirection&&(r={x:o.selectedSpot.x,y:o.selectedSpot.y+o.dy},c={x:o.selectedSpot.width+o.dx,y:o.selectedSpot.height-o.dy}),4==o.transformDirection&&(r={x:o.selectedSpot.x,y:o.selectedSpot.y},c={x:o.selectedSpot.width+o.dx,y:o.selectedSpot.height}),5==o.transformDirection&&(r={x:o.selectedSpot.x,y:o.selectedSpot.y},c={x:o.selectedSpot.width+o.dx,y:o.selectedSpot.height+o.dy}),6==o.transformDirection&&(r={x:o.selectedSpot.x,y:o.selectedSpot.y},c={x:o.selectedSpot.width,y:o.selectedSpot.height+o.dy}),7==o.transformDirection&&(r={x:o.selectedSpot.x+o.dx,y:o.selectedSpot.y},c={x:o.selectedSpot.width-o.dx,y:o.selectedSpot.height+o.dy}),8==o.transformDirection&&(r={x:o.selectedSpot.x+o.dx,y:o.selectedSpot.y},c={x:o.selectedSpot.width-o.dx,y:o.selectedSpot.height}),r.x<0&&(c.x=o.selectedSpot.x+o.selectedSpot.width,r.x=0),r.y<0&&(r.y=0,c.y=o.selectedSpot.y+o.selectedSpot.height),c.x+r.x>100&&(c.x=100-r.x),c.y+r.y>100&&(c.y=100-r.y),r.x>o.selectedSpot.x+o.selectedSpot.width&&(r.x=o.selectedSpot.x+o.selectedSpot.width),r.y>o.selectedSpot.y+o.selectedSpot.height&&(r.y=o.selectedSpot.y+o.selectedSpot.height),c.x<0&&(c.x=0),c.y<0&&(c.y=0),o.transformX=r.x,o.transformY=r.y,o.transformWidth=c.x,o.transformHeight=c.y,o.redrawEl.css({left:o.transformX+"%",top:o.transformY+"%",width:o.transformWidth+"%",height:o.transformHeight+"%"}),"poly"==o.selectedSpot.type){var n=a.general.width*(c.x/100),s=a.general.height*(c.y/100);o.redrawSvgEl[0].setAttribute("viewBox","0 0 "+n+" "+s);for(var l="",d=0;d100&&(c.x=100-o.eventSpot.x),o.eventSpot.y+c.y>100&&(c.y=100-o.eventSpot.y),o.drawRectWidth=c.x,o.drawRectHeight=c.y,o.shiftKeyDown){var h=o.canvasWidth/o.canvasHeight;o.drawRectHeight=o.drawRectWidth*h}o.redrawEl.css({width:o.drawRectWidth+"%",height:o.drawRectHeight+"%"})}else if(o.startedDrawingOval){i=y(e.pageX,e.pageY,o.canvas);o.createdDrawingOval||(o.createdDrawingOval=!0,o.eventSpot=o.createOval(),o.eventSpot.x=o.x/o.canvasWidth*100,o.eventSpot.y=o.y/o.canvasHeight*100,o.eventSpot.x=Math.round(1e3*o.eventSpot.x)/1e3,o.eventSpot.y=Math.round(1e3*o.eventSpot.y)/1e3,o.redraw(),o.redrawEl=t('.imp-editor-shape[data-id="'+o.eventSpot.id+'"]'));c={x:o.dx,y:o.dy};if(o.eventSpot.x+c.x>100&&(c.x=100-o.eventSpot.x),o.eventSpot.y+c.y>100&&(c.y=100-o.eventSpot.y),o.drawRectWidth=c.x,o.drawRectHeight=c.y,o.shiftKeyDown){h=o.canvasWidth/o.canvasHeight;o.drawRectHeight=o.drawRectWidth*h}o.redrawEl.css({width:o.drawRectWidth+"%",height:o.drawRectHeight+"%"})}else{if(o.mouseDownWhileDrawingPoly)return o.polyPoints[o.polyPoints.length-1].x=o.x/o.zoom,o.polyPoints[o.polyPoints.length-1].y=o.y/o.zoom,void o.redrawTempPoly();if(o.translatingControlPoint){if(!o.startedTranslatingControlPoint){o.startedTranslatingControlPoint=!0,t(e.target).closest(".imp-editor-shape").find(".imp-selection").hide(),t(e.target).closest(".imp-editor-shape").css({left:0,top:0,width:"100%",height:"100%"}),t(e.target).closest(".imp-editor-shape").find(".imp-editor-poly-svg")[0].setAttribute("viewBox","0 0 "+a.general.width+" "+a.general.height);for(var g=0;g100&&(o.dx=100-w({x:o.translatedPointX,y:o.translatedPointY},o.selectedSpot).x),w({x:o.translatedPointX,y:o.translatedPointY},o.selectedSpot).y+o.dy<0&&(o.dy=-w({x:o.translatedPointX,y:o.translatedPointY},o.selectedSpot).y),w({x:o.translatedPointX,y:o.translatedPointY},o.selectedSpot).y+o.dy>100&&(o.dy=100-w({x:o.translatedPointX,y:o.translatedPointY},o.selectedSpot).y);var u=o.dx/(o.selectedSpot.width/100*o.canvasWidth/o.canvasWidth),m=o.dy/(o.selectedSpot.height/100*o.canvasHeight/o.canvasHeight);o.selectedSpot.points[o.translatedPointIndex].x=o.translatedPointX+u,o.selectedSpot.points[o.translatedPointIndex].y=o.translatedPointY+m,o.translatedPoint.css({left:w(o.selectedSpot.points[o.translatedPointIndex],o.selectedSpot).x+"%",top:w(o.selectedSpot.points[o.translatedPointIndex],o.selectedSpot).y+"%"});for(l="",d=0;d100&&(i.x=100-o.selectedSpot.width),i.y+o.selectedSpot.height>100&&(i.y=100-o.selectedSpot.height)),o.selectedSpot.x=Math.round(1e3*i.x)/1e3,o.selectedSpot.y=Math.round(1e3*i.y)/1e3,o.redraw(),o.addAction()}else if(o.startedTransforming&&o.didTransform)o.selectedSpot.x=Math.round(1e3*o.transformX)/1e3,o.selectedSpot.y=Math.round(1e3*o.transformY)/1e3,o.selectedSpot.width=Math.round(1e3*o.transformWidth)/1e3,o.selectedSpot.height=Math.round(1e3*o.transformHeight)/1e3,o.redraw(),o.addAction();else if(o.translatingControlPoint){o.dx,o.selectedSpot.width,o.canvasWidth,o.canvasWidth,o.dy,o.selectedSpot.height,o.canvasHeight,o.canvasHeight;o.updateBoundingBoxForPolygonSpot(o.selectedSpot),o.redraw(),o.addAction()}else o.startedSelecting?(o.selectedSpot&&o.selectedSpot.id!=o.eventSpotId&&o.deselectSpot(),o.selectSpot(o.eventSpotId),o.redraw(),o.addAction()):o.shouldDeselectShape&&(o.deselectSpot(),o.redraw(),o.addAction());o.draggingCanvas=!1,o.startedSelecting=!1,o.startedMoving=!1,o.startedTransforming=!1,o.didTransform=!1,o.transformDirection=0,o.startedDrawingSpot=!1,o.startedDrawingText=!1,o.startedDrawingRect=!1,o.createdDrawingRect=!1,o.startedDrawingOval=!1,o.createdDrawingOval=!1,o.startedDrawingPoly=!1,o.finishedDrawingPoly=!1,o.mouseDownWhileDrawingPoly=!1,o.translatingControlPoint=!1,o.startedTranslatingControlPoint=!1,o.shouldDeselectShape=!1}},m.prototype.handleKeyDown=function(t){var e=i;return 32==t.keyCode&&(this.spaceKeyDown=!0,this.enterCanvasDragMode(),e=!1),91==t.keyCode&&(this.commandKeyDown=!0,e=!0),17==t.keyCode&&(this.ctrlKeyDown=!0,e=!0),16==t.keyCode&&(this.shiftKeyDown=!0,e=!0),187!=t.keyCode&&107!=t.keyCode||(this.ctrlKeyDown||this.commandKeyDown)&&(this.zoomIn(),e=!0),189!=t.keyCode&&109!=t.keyCode||(this.ctrlKeyDown||this.commandKeyDown)&&(this.zoomOut(),e=!0),48==t.keyCode&&(this.ctrlKeyDown||this.commandKeyDown)&&(this.zoomReset(),e=!0),e},m.prototype.handleKeyUp=function(e){var o=this,i=!1;if(32==e.keyCode&&(o.spaceKeyDown=!1,o.exitCanvasDragMode(),i=!1),91==e.keyCode&&(o.commandKeyDown=!1,i=!0),17==e.keyCode&&(o.ctrlKeyDown=!1,i=!0),16==e.keyCode&&(o.shiftKeyDown=!1,i=!0),27==e.keyCode&&(o.drawingPoly?(o.drawingPoly=!1,o.startedDrawingPoly=!1,o.mouseDownWhileDrawingPoly=!1,t("#temp-poly").remove()):t.wcpEditorCloseModal()),13==e.keyCode)if(o.drawingPoly){o.drawingPoly=!1,o.finishedDrawingPoly=!1,t("#temp-poly").remove();var r=o.createPoly(o.polyPoints);o.selectSpot(r.id),o.addAction(),o.redraw()}else t.wcpEditorModalPressPrimaryButton();return t("#input-icon-search").is(":focus")&&t.wcpFontawesomeSearch(t("#input-icon-search").val()),i},m.prototype.getIndexOfSpotWithId=function(t){for(var e=0;et&&(t=a.layers.layers_list[e].id);return++t},m.prototype.createSpot=function(){var e=t.extend(!0,{},u);return e.type="spot",e.id=this.createIdForSpot(),e.title=e.id,1==parseInt(a.layers.enable_layers,10)?e.layerID=a.editor.currentLayer:e.layerID=a.layers.layers_list[0].id,a.spots.push(e),e},m.prototype.createRect=function(){var e=t.extend(!0,{},u);return e.type="rect",e.default_style.border_radius=10,e.mouseover_style.border_radius=10,e.id=this.createIdForRect(),e.title=e.id,1==parseInt(a.layers.enable_layers,10)?e.layerID=a.editor.currentLayer:e.layerID=a.layers.layers_list[0].id,a.spots.push(e),e},m.prototype.createOval=function(){var e=t.extend(!0,{},u);return e.type="oval",e.id=this.createIdForOval(),e.title=e.id,1==parseInt(a.layers.enable_layers,10)?e.layerID=a.editor.currentLayer:e.layerID=a.layers.layers_list[0].id,a.spots.push(e),e},m.prototype.createPoly=function(e){var o=this,i=t.extend(!0,{},u);i.type="poly",i.id=o.createIdForPoly(),i.title=i.id;for(var r=99999,n=99999,s=0,l=0,d=0;ds&&(s=p.x),p.yl&&(l=p.y)}var c=s-r,h=l-n;i.x=r/o.canvasWidth*100*o.zoom,i.y=n/o.canvasHeight*100*o.zoom,i.width=c/o.canvasWidth*100*o.zoom,i.height=h/o.canvasHeight*100*o.zoom;for(d=0;d'))},m.prototype.exitCanvasDragMode=function(){a.editor.state.dragging&&(a.editor.state.dragging=!1,this.canvas.find("#imp-editor-canvas-overlay-drag").remove())},m.prototype.zoomIn=function(e){if(this.zoom*=2,a.editor.zoom=this.zoom,this.zoom>32)this.zoom=32;else{var o,i,r=0,n=0;if(e)r=this.ix,n=this.iy;else{var s=t("#wcp-editor-center"),l=y(s.offset().left+s.width()/2,s.offset().top+s.height()/2,this.canvas);r=l.x,n=l.y}o=this.canvasWidth/2-r,i=this.canvasHeight/2-n,this.canvasX+=o,this.canvasY+=i,this.redrawCanvas(),this.redraw()}},m.prototype.zoomOut=function(e){if(this.zoom/=2,a.editor.zoom=this.zoom,this.zoom<1)this.zoom=1;else{var o,i,r=0,n=0;if(e)r=this.ix,n=this.iy;else{var s=t("#wcp-editor-center"),l=y(s.offset().left+s.width()/2,s.offset().top+s.height()/2,this.canvas);r=l.x,n=l.y}o=this.canvasWidth/2-r,i=this.canvasHeight/2-n,this.canvasX-=o/2,this.canvasY-=i/2,this.redrawCanvas(),this.redraw()}1==this.zoom&&(this.canvasX=0,this.canvasY=0,this.redrawCanvas())},m.prototype.zoomReset=function(){this.zoom=1,this.canvasX=0,this.canvasY=0,this.redrawCanvas(),this.redraw()},m.prototype.shouldSelectPoly=function(t){for(var e,o=this,i=0;ii!=p>i&&o<(d-s)*(i-l)/(p-l)+s;c&&(r=!r)}return r}({x:r,y:n},s)},m.prototype.placePointForTempPoly=function(t,e){this.polyPoints.push({x:t/this.zoom,y:e/this.zoom})},m.prototype.redrawTempPoly=function(){for(var e=this,o=''}0==t("#temp-poly").length&&t("#imp-editor-shapes-container").append(''),t("#temp-poly").html(o);o="";1!=localStorage["image-map-pro-seen-poly-tooltip"]&&(localStorage["image-map-pro-seen-poly-tooltip"]=1,o+='
Click the first point or press ENTER to finish
',t("#imp-editor-shapes-container").append(o),t("#imp-poly-tooltip").css({left:t("#imp-poly-tooltip").position().left-t("#imp-poly-tooltip").outerWidth()-20,top:t("#imp-poly-tooltip").position().top-t("#imp-poly-tooltip").outerHeight()/2}))},m.prototype.redrawSelectedPolyTempPoint=function(t){var e,o=this,i=o.selectedSpot.width/100*o.canvasWidth,r=o.selectedSpot.height/100*o.canvasHeight,a=(o.x-o.selectedSpot.x/100*o.canvasWidth)/i*100,n=(o.y-o.selectedSpot.y/100*o.canvasHeight)/r*100;(e=o.shouldShowTempControlPoint(a,n,o.selectedSpot.points,t))?(o.tempControlPoint.show(),o.tempControlPointLine.show(),o.tempControlPoint.css({left:e.x+"%",top:e.y+"%"}),o.controlPointInsertionPointX=e.x,o.controlPointInsertionPointY=e.y):(o.tempControlPoint.hide(),o.tempControlPointLine.hide())},m.prototype.shouldShowTempControlPoint=function(e,o,r,a){if(7==(t(a.target).data("editor-object-type")||t(a.target).closest("[data-editor-object-type]").data("editor-object-type")))return!1;for(var n={x:e,y:o},s=9999,l=-1,d=!1,p=2e3/(this.canvasWidth*(this.selectedSpot.width/100)),c=0;ci&&(i=p.x),p.yr&&(r=p.y)}var n,s,l=w({x:e,y:o},t),d=w({x:i,y:r},t);for(a=0;a=0;o--){var i=a.spots[o];0!=parseInt(a.layers.enable_layers,10)&&parseInt(i.layerID,10)!=parseInt(a.editor.currentLayer,10)||e.push({id:i.id,title:i.title})}t.wcpEditorSetListItems(e),t.wcpEditorSelectListItem(a.editor.selected_shape)},m.prototype.updateShapesForm=function(){var e=this.getIndexOfSpotWithId(a.editor.selected_shape),o=a.spots[e];if(o){if(t.wcpEditorSetControlValue("Shape Settings","x",o.x),t.wcpEditorSetControlValue("Shape Settings","y",o.y),t.wcpEditorSetControlValue("Shape Settings","width",o.width),t.wcpEditorSetControlValue("Shape Settings","height",o.height),t.wcpEditorSetControlValue("Shape Settings","connected_to",o.connected_to),t.wcpEditorSetControlValue("Shape Settings","use_connected_shape_tooltip",o.use_connected_shape_tooltip),t.wcpEditorSetControlValue("Shape Settings","text",o.text),t.wcpEditorSetControlValue("Shape Settings","text",o.text.text),t.wcpEditorSetControlValue("Shape Settings","font_family",o.text.font_family),t.wcpEditorSetControlValue("Shape Settings","font_size",o.text.font_size),t.wcpEditorSetControlValue("Shape Settings","font_weight",o.text.font_weight),t.wcpEditorSetControlValue("Shape Settings","text_color",o.text.text_color),t.wcpEditorSetControlValue("Shape Settings","text_opacity",o.text.text_opacity),t.wcpEditorSetControlValue("Shape Settings","click",o.actions.click),t.wcpEditorSetControlValue("Shape Settings","link",o.actions.link),t.wcpEditorSetControlValue("Shape Settings","script",o.actions.script),t.wcpEditorSetControlValue("Shape Settings","open_link_in_new_window",o.actions.open_link_in_new_window),t.wcpEditorSetControlValue("Shape Settings","use_icon",o.default_style.use_icon),t.wcpEditorSetControlValue("Shape Settings","icon_type",o.default_style.icon_type),t.wcpEditorSetControlValue("Shape Settings","icon_svg_path",o.default_style.icon_svg_path),t.wcpEditorSetControlValue("Shape Settings","icon_svg_viewbox",o.default_style.icon_svg_viewbox),t.wcpEditorSetControlValue("Shape Settings","icon_url",o.default_style.icon_url),t.wcpEditorSetControlValue("Shape Settings","icon_is_pin",o.default_style.icon_is_pin),t.wcpEditorSetControlValue("Shape Settings","icon_shadow",o.default_style.icon_shadow),t.wcpEditorSetControlValue("Shape Settings","opacity",o.default_style.opacity),t.wcpEditorSetControlValue("Shape Settings","icon_fill",o.default_style.icon_fill),t.wcpEditorSetControlValue("Shape Settings","border_radius",o.default_style.border_radius),t.wcpEditorSetControlValue("Shape Settings","background_color",o.default_style.background_color),t.wcpEditorSetControlValue("Shape Settings","background_opacity",o.default_style.background_opacity),t.wcpEditorSetControlValue("Shape Settings","border_width",o.default_style.border_width),t.wcpEditorSetControlValue("Shape Settings","border_style",o.default_style.border_style),t.wcpEditorSetControlValue("Shape Settings","border_color",o.default_style.border_color),t.wcpEditorSetControlValue("Shape Settings","border_opacity",o.default_style.border_opacity),t.wcpEditorSetControlValue("Shape Settings","fill",o.default_style.fill),t.wcpEditorSetControlValue("Shape Settings","fill_opacity",o.default_style.fill_opacity),t.wcpEditorSetControlValue("Shape Settings","stroke_color",o.default_style.stroke_color),t.wcpEditorSetControlValue("Shape Settings","stroke_opacity",o.default_style.stroke_opacity),t.wcpEditorSetControlValue("Shape Settings","stroke_width",o.default_style.stroke_width),t.wcpEditorSetControlValue("Shape Settings","stroke_dasharray",o.default_style.stroke_dasharray),t.wcpEditorSetControlValue("Shape Settings","stroke_linecap",o.default_style.stroke_linecap),t.wcpEditorSetControlValue("Shape Settings","mouseover_opacity",o.mouseover_style.opacity),t.wcpEditorSetControlValue("Shape Settings","mouseover_icon_fill",o.mouseover_style.icon_fill),t.wcpEditorSetControlValue("Shape Settings","mouseover_border_radius",o.mouseover_style.border_radius),t.wcpEditorSetControlValue("Shape Settings","mouseover_background_color",o.mouseover_style.background_color),t.wcpEditorSetControlValue("Shape Settings","mouseover_background_opacity",o.mouseover_style.background_opacity),t.wcpEditorSetControlValue("Shape Settings","mouseover_border_width",o.mouseover_style.border_width),t.wcpEditorSetControlValue("Shape Settings","mouseover_border_style",o.mouseover_style.border_style),t.wcpEditorSetControlValue("Shape Settings","mouseover_border_color",o.mouseover_style.border_color),t.wcpEditorSetControlValue("Shape Settings","mouseover_border_opacity",o.mouseover_style.border_opacity),t.wcpEditorSetControlValue("Shape Settings","mouseover_fill",o.mouseover_style.fill),t.wcpEditorSetControlValue("Shape Settings","mouseover_fill_opacity",o.mouseover_style.fill_opacity),t.wcpEditorSetControlValue("Shape Settings","mouseover_stroke_color",o.mouseover_style.stroke_color),t.wcpEditorSetControlValue("Shape Settings","mouseover_stroke_opacity",o.mouseover_style.stroke_opacity),t.wcpEditorSetControlValue("Shape Settings","mouseover_stroke_width",o.mouseover_style.stroke_width),t.wcpEditorSetControlValue("Shape Settings","mouseover_stroke_dasharray",o.mouseover_style.stroke_dasharray),t.wcpEditorSetControlValue("Shape Settings","mouseover_stroke_linecap",o.mouseover_style.stroke_linecap),t.wcpEditorSetControlValue("Shape Settings","enable_tooltip",o.tooltip_style.enable_tooltip),t.wcpEditorSetControlValue("Shape Settings","tooltip_border_radius",o.tooltip_style.border_radius),t.wcpEditorSetControlValue("Shape Settings","tooltip_padding",o.tooltip_style.padding),t.wcpEditorSetControlValue("Shape Settings","tooltip_background_color",o.tooltip_style.background_color),t.wcpEditorSetControlValue("Shape Settings","tooltip_background_opacity",o.tooltip_style.background_opacity),t.wcpEditorSetControlValue("Shape Settings","tooltip_position",o.tooltip_style.position),t.wcpEditorSetControlValue("Shape Settings","tooltip_width",o.tooltip_style.width),t.wcpEditorSetControlValue("Shape Settings","tooltip_auto_width",o.tooltip_style.auto_width),t.wcpEditorSetControlValue("Shape Settings","tooltip_content_type",o.tooltip_content.content_type),t.wcpEditorSetControlValue("Shape Settings","plain_text",o.tooltip_content.plain_text),t.wcpEditorSetControlValue("Shape Settings","squares_settings",o.tooltip_content.squares_settings),e==this.shapesFormSpotIndex)return;this.shapesFormSpotIndex=e;var i=t.wcpEditorGetHTMLForFormWithName("Shape Settings");t.wcpEditorSetContentForTabWithName("Shape",i),t.wcpEditorUpdateForm("Shape Settings");for(var r='',n=0;n'+a.spots[n].title+"");t("#wcp-editor-form-control-connected_to select").html(r),t("#wcp-editor-form-control-connected_to select").val(o.connected_to),t.wcpEditorOpenMainTabWithName("Shape")}else this.shapesFormSpotIndex=-1,t.wcpEditorSetContentForTabWithName("Shape",'
No shape selected.
')},m.prototype.updateShapesFormState=function(){var e=this.getIndexOfSpotWithId(a.editor.selected_shape),o=a.spots[e];o&&("spot"==o.type&&(1==parseInt(o.default_style.use_icon,10)?(t.wcpEditorFormShowControl("Shape Settings","icon_type"),"library"==o.default_style.icon_type&&(t.wcpEditorFormHideControl("Shape Settings","icon_url"),t.wcpEditorFormShowControl("Shape Settings","choose_icon_from_library")),"custom"==o.default_style.icon_type&&(t.wcpEditorFormShowControl("Shape Settings","icon_url"),t.wcpEditorFormHideControl("Shape Settings","choose_icon_from_library")),t.wcpEditorFormShowControl("Shape Settings","icon_is_pin"),t.wcpEditorFormShowControl("Shape Settings","icon_shadow"),t.wcpEditorFormShowControl("Shape Settings","icon_fill"),t.wcpEditorFormHideControl("Shape Settings","border_radius"),t.wcpEditorFormHideControl("Shape Settings","background_color"),t.wcpEditorFormHideControl("Shape Settings","background_opacity"),t.wcpEditorFormHideControl("Shape Settings","border_width"),t.wcpEditorFormHideControl("Shape Settings","border_style"),t.wcpEditorFormHideControl("Shape Settings","border_color"),t.wcpEditorFormHideControl("Shape Settings","border_opacity"),t.wcpEditorFormShowControl("Shape Settings","mouseover_icon_fill"),t.wcpEditorFormHideControl("Shape Settings","mouseover_border_radius"),t.wcpEditorFormHideControl("Shape Settings","mouseover_background_color"),t.wcpEditorFormHideControl("Shape Settings","mouseover_background_opacity"),t.wcpEditorFormHideControl("Shape Settings","mouseover_border_width"),t.wcpEditorFormHideControl("Shape Settings","mouseover_border_style"),t.wcpEditorFormHideControl("Shape Settings","mouseover_border_color"),t.wcpEditorFormHideControl("Shape Settings","mouseover_border_opacity")):(t.wcpEditorFormHideControl("Shape Settings","choose_icon_from_library"),t.wcpEditorFormHideControl("Shape Settings","icon_type"),t.wcpEditorFormHideControl("Shape Settings","icon_url"),t.wcpEditorFormHideControl("Shape Settings","icon_is_pin"),t.wcpEditorFormHideControl("Shape Settings","icon_shadow"),t.wcpEditorFormHideControl("Shape Settings","icon_fill"),t.wcpEditorFormShowControl("Shape Settings","border_radius"),t.wcpEditorFormShowControl("Shape Settings","background_color"),t.wcpEditorFormShowControl("Shape Settings","background_opacity"),t.wcpEditorFormShowControl("Shape Settings","border_width"),t.wcpEditorFormShowControl("Shape Settings","border_style"),t.wcpEditorFormShowControl("Shape Settings","border_color"),t.wcpEditorFormShowControl("Shape Settings","border_opacity"),t.wcpEditorFormHideControl("Shape Settings","mouseover_icon_fill"),t.wcpEditorFormShowControl("Shape Settings","mouseover_border_radius"),t.wcpEditorFormShowControl("Shape Settings","mouseover_background_color"),t.wcpEditorFormShowControl("Shape Settings","mouseover_background_opacity"),t.wcpEditorFormShowControl("Shape Settings","mouseover_border_width"),t.wcpEditorFormShowControl("Shape Settings","mouseover_border_style"),t.wcpEditorFormShowControl("Shape Settings","mouseover_border_color"),t.wcpEditorFormShowControl("Shape Settings","mouseover_border_opacity"))),"plain-text"==o.tooltip_content.content_type?(t.wcpEditorFormShowControl("Shape Settings","plain_text"),t.wcpEditorFormHideControl("Shape Settings","launch_content_builder"),t.wcpEditorFormShowControl("Shape Settings","plain_text_color")):(t.wcpEditorFormHideControl("Shape Settings","plain_text"),t.wcpEditorFormShowControl("Shape Settings","launch_content_builder"),t.wcpEditorFormHideControl("Shape Settings","plain_text_color")),"follow-link"==o.actions.click?(t.wcpEditorFormShowControl("Shape Settings","link"),t.wcpEditorFormShowControl("Shape Settings","open_link_in_new_window")):(t.wcpEditorFormHideControl("Shape Settings","link"),t.wcpEditorFormHideControl("Shape Settings","open_link_in_new_window")),"run-script"==o.actions.click?t.wcpEditorFormShowControl("Shape Settings","script"):t.wcpEditorFormHideControl("Shape Settings","script"),""!=o.connected_to?(t.wcpEditorFormShowControl("Shape Settings","use_connected_shape_tooltip"),1==parseInt(o.use_connected_shape_tooltip,10)?(t.wcpEditorFormHideControlsGroup("Shape Settings","tooltip_settings"),t.wcpEditorFormHideControlsGroup("Shape Settings","tooltip_content")):(t.wcpEditorFormShowControlsGroup("Shape Settings","tooltip_settings"),t.wcpEditorFormShowControlsGroup("Shape Settings","tooltip_content"))):t.wcpEditorFormHideControl("Shape Settings","use_connected_shape_tooltip"),1==parseInt(o.tooltip_style.enable_tooltip,10)?(t.wcpEditorFormShowControlsGroup("Shape Settings","tooltip_content"),t.wcpEditorFormShowControl("Shape Settings","tooltip_border_radius"),t.wcpEditorFormShowControl("Shape Settings","tooltip_padding"),t.wcpEditorFormShowControl("Shape Settings","tooltip_background_color"),t.wcpEditorFormShowControl("Shape Settings","tooltip_background_opacity"),t.wcpEditorFormShowControl("Shape Settings","tooltip_position"),t.wcpEditorFormShowControl("Shape Settings","tooltip_width"),t.wcpEditorFormShowControl("Shape Settings","tooltip_auto_width")):(t.wcpEditorFormHideControlsGroup("Shape Settings","tooltip_content"),t.wcpEditorFormHideControl("Shape Settings","tooltip_border_radius"),t.wcpEditorFormHideControl("Shape Settings","tooltip_padding"),t.wcpEditorFormHideControl("Shape Settings","tooltip_background_color"),t.wcpEditorFormHideControl("Shape Settings","tooltip_background_opacity"),t.wcpEditorFormHideControl("Shape Settings","tooltip_position"),t.wcpEditorFormHideControl("Shape Settings","tooltip_width"),t.wcpEditorFormHideControl("Shape Settings","tooltip_auto_width")),1==parseInt(o.tooltip_style.auto_width,10)?t.wcpEditorFormHideControl("Shape Settings","tooltip_width"):t.wcpEditorFormShowControl("Shape Settings","tooltip_width"))},m.prototype.updateShapesFormStateMaster=function(){var e=this.getIndexOfSpotWithId(a.editor.selected_shape),o=a.spots[e];o&&("spot"==o.type&&(t.wcpEditorFormHideControlsGroup("Shape Settings","text"),t.wcpEditorFormHideControl("Shape Settings","fill"),t.wcpEditorFormHideControl("Shape Settings","fill_opacity"),t.wcpEditorFormHideControl("Shape Settings","stroke_color"),t.wcpEditorFormHideControl("Shape Settings","stroke_opacity"),t.wcpEditorFormHideControl("Shape Settings","stroke_width"),t.wcpEditorFormHideControl("Shape Settings","stroke_dasharray"),t.wcpEditorFormHideControl("Shape Settings","stroke_linecap"),t.wcpEditorFormHideControl("Shape Settings","mouseover_fill"),t.wcpEditorFormHideControl("Shape Settings","mouseover_fill_opacity"),t.wcpEditorFormHideControl("Shape Settings","mouseover_stroke_color"),t.wcpEditorFormHideControl("Shape Settings","mouseover_stroke_opacity"),t.wcpEditorFormHideControl("Shape Settings","mouseover_stroke_width"),t.wcpEditorFormHideControl("Shape Settings","mouseover_stroke_dasharray"),t.wcpEditorFormHideControl("Shape Settings","mouseover_stroke_linecap")),"rect"==o.type&&(t.wcpEditorFormHideControlsGroup("Shape Settings","text"),t.wcpEditorFormHideControlsGroup("Shape Settings","icon"),t.wcpEditorFormHideControl("Shape Settings","icon_fill"),t.wcpEditorFormHideControl("Shape Settings","mouseover_icon_fill"),t.wcpEditorFormHideControl("Shape Settings","fill"),t.wcpEditorFormHideControl("Shape Settings","fill_opacity"),t.wcpEditorFormHideControl("Shape Settings","stroke_color"),t.wcpEditorFormHideControl("Shape Settings","stroke_opacity"),t.wcpEditorFormHideControl("Shape Settings","stroke_width"),t.wcpEditorFormHideControl("Shape Settings","stroke_dasharray"),t.wcpEditorFormHideControl("Shape Settings","stroke_linecap"),t.wcpEditorFormHideControl("Shape Settings","mouseover_fill"),t.wcpEditorFormHideControl("Shape Settings","mouseover_fill_opacity"),t.wcpEditorFormHideControl("Shape Settings","mouseover_stroke_color"),t.wcpEditorFormHideControl("Shape Settings","mouseover_stroke_opacity"),t.wcpEditorFormHideControl("Shape Settings","mouseover_stroke_width"),t.wcpEditorFormHideControl("Shape Settings","mouseover_stroke_dasharray"),t.wcpEditorFormHideControl("Shape Settings","mouseover_stroke_linecap")),"oval"==o.type&&(t.wcpEditorFormHideControlsGroup("Shape Settings","text"),t.wcpEditorFormHideControlsGroup("Shape Settings","icon"),t.wcpEditorFormHideControl("Shape Settings","icon_fill"),t.wcpEditorFormHideControl("Shape Settings","mouseover_icon_fill"),t.wcpEditorFormHideControl("Shape Settings","border_radius"),t.wcpEditorFormHideControl("Shape Settings","mouseover_border_radius"),t.wcpEditorFormHideControl("Shape Settings","fill"),t.wcpEditorFormHideControl("Shape Settings","fill_opacity"),t.wcpEditorFormHideControl("Shape Settings","stroke_color"),t.wcpEditorFormHideControl("Shape Settings","stroke_opacity"),t.wcpEditorFormHideControl("Shape Settings","stroke_width"),t.wcpEditorFormHideControl("Shape Settings","stroke_dasharray"),t.wcpEditorFormHideControl("Shape Settings","stroke_linecap"),t.wcpEditorFormHideControl("Shape Settings","mouseover_fill"),t.wcpEditorFormHideControl("Shape Settings","mouseover_fill_opacity"),t.wcpEditorFormHideControl("Shape Settings","mouseover_stroke_color"),t.wcpEditorFormHideControl("Shape Settings","mouseover_stroke_opacity"),t.wcpEditorFormHideControl("Shape Settings","mouseover_stroke_width"),t.wcpEditorFormHideControl("Shape Settings","mouseover_stroke_dasharray"),t.wcpEditorFormHideControl("Shape Settings","mouseover_stroke_linecap")),"poly"==o.type&&(t.wcpEditorFormHideControlsGroup("Shape Settings","text"),t.wcpEditorFormHideControlsGroup("Shape Settings","icon"),t.wcpEditorFormHideControl("Shape Settings","icon_fill"),t.wcpEditorFormHideControl("Shape Settings","mouseover_icon_fill"),t.wcpEditorFormHideControl("Shape Settings","opacity"),t.wcpEditorFormHideControl("Shape Settings","border_radius"),t.wcpEditorFormHideControl("Shape Settings","background_color"),t.wcpEditorFormHideControl("Shape Settings","background_opacity"),t.wcpEditorFormHideControl("Shape Settings","border_width"),t.wcpEditorFormHideControl("Shape Settings","border_style"),t.wcpEditorFormHideControl("Shape Settings","border_color"),t.wcpEditorFormHideControl("Shape Settings","border_opacity"),t.wcpEditorFormHideControl("Shape Settings","mouseover_opacity"),t.wcpEditorFormHideControl("Shape Settings","mouseover_border_radius"),t.wcpEditorFormHideControl("Shape Settings","mouseover_background_color"),t.wcpEditorFormHideControl("Shape Settings","mouseover_background_opacity"),t.wcpEditorFormHideControl("Shape Settings","mouseover_border_width"),t.wcpEditorFormHideControl("Shape Settings","mouseover_border_style"),t.wcpEditorFormHideControl("Shape Settings","mouseover_border_color"),t.wcpEditorFormHideControl("Shape Settings","mouseover_border_opacity")),"text"==o.type&&(t.wcpEditorFormHideControl("Shape Settings","width"),t.wcpEditorFormHideControl("Shape Settings","height"),t.wcpEditorFormHideControl("Shape Settings","connected_to"),t.wcpEditorFormHideControlsGroup("Shape Settings","actions"),t.wcpEditorFormHideControlsGroup("Shape Settings","icon"),t.wcpEditorFormHideControlsGroup("Shape Settings","default_style"),t.wcpEditorFormHideControlsGroup("Shape Settings","mouseover_style"),t.wcpEditorFormHideControlsGroup("Shape Settings","tooltip_settings"),t.wcpEditorFormHideControlsGroup("Shape Settings","tooltip_content"),t.wcpEditorFormShowControlsGroup("Shape Settings","text")))},m.prototype.updateImageMapForm=function(){t.wcpEditorSetControlValue("Image Map Settings","image_map_name",a.general.name),t.wcpEditorSetControlValue("Image Map Settings","image_map_shortcode",a.general.shortcode),t.wcpEditorSetControlValue("Image Map Settings","image_map_width",a.general.width),t.wcpEditorSetControlValue("Image Map Settings","image_map_height",a.general.height),t.wcpEditorSetControlValue("Image Map Settings","responsive",a.general.responsive),t.wcpEditorSetControlValue("Image Map Settings","preserve_quality",a.general.preserve_quality),t.wcpEditorSetControlValue("Image Map Settings","pageload_animation",a.general.pageload_animation),t.wcpEditorSetControlValue("Image Map Settings","center_image_map",a.general.center_image_map),t.wcpEditorSetControlValue("Image Map Settings","image_url",a.image.url),t.wcpEditorSetControlValue("Image Map Settings","enable_tooltips",a.tooltips.enable_tooltips),t.wcpEditorSetControlValue("Image Map Settings","show_tooltips",a.tooltips.show_tooltips),t.wcpEditorSetControlValue("Image Map Settings","sticky_tooltips",a.tooltips.sticky_tooltips),t.wcpEditorSetControlValue("Image Map Settings","constrain_tooltips",a.tooltips.constrain_tooltips),t.wcpEditorSetControlValue("Image Map Settings","tooltip_animation",a.tooltips.tooltip_animation),t.wcpEditorSetControlValue("Image Map Settings","fullscreen_tooltips",a.tooltips.fullscreen_tooltips),t.wcpEditorSetControlValue("Image Map Settings","enable_fullscreen_mode",a.fullscreen.enable_fullscreen_mode),t.wcpEditorSetControlValue("Image Map Settings","start_in_fullscreen_mode",a.fullscreen.start_in_fullscreen_mode),t.wcpEditorSetControlValue("Image Map Settings","fullscreen_background",a.fullscreen.fullscreen_background),t.wcpEditorSetControlValue("Image Map Settings","fullscreen_button_position",a.fullscreen.fullscreen_button_position),t.wcpEditorSetControlValue("Image Map Settings","fullscreen_button_type",a.fullscreen.fullscreen_button_type),t.wcpEditorSetControlValue("Image Map Settings","fullscreen_button_color",a.fullscreen.fullscreen_button_color),t.wcpEditorSetControlValue("Image Map Settings","fullscreen_button_text_color",a.fullscreen.fullscreen_button_text_color),t.wcpEditorSetControlValue("Image Map Settings","enable_zooming",a.zooming.enable_zooming),t.wcpEditorSetControlValue("Image Map Settings","max_zoom",a.zooming.max_zoom),t.wcpEditorSetControlValue("Image Map Settings","limit_max_zoom_to_image_size",a.zooming.limit_max_zoom_to_image_size),t.wcpEditorSetControlValue("Image Map Settings","enable_navigator",a.zooming.enable_navigator),t.wcpEditorSetControlValue("Image Map Settings","enable_zoom_buttons",a.zooming.enable_zoom_buttons),t.wcpEditorSetControlValue("Image Map Settings","zoom_button_text_color",a.zooming.zoom_button_text_color),t.wcpEditorSetControlValue("Image Map Settings","zoom_button_background_color",a.zooming.zoom_button_background_color),t.wcpEditorSetControlValue("Image Map Settings","custom_css",a.custom_code.custom_css),t.wcpEditorSetControlValue("Image Map Settings","custom_js",a.custom_code.custom_js),t.wcpEditorSetControlValue("Image Map Settings","enable_layers",a.layers.enable_layers),t.wcpEditorSetControlValue("Image Map Settings","layers_list",a.layers.layers_list),t.wcpEditorUpdateForm("Image Map Settings")},m.prototype.updateImageMapFormState=function(){0==parseInt(a.general.responsive,10)?(t.wcpEditorFormShowControl("Image Map Settings","image_map_width"),t.wcpEditorFormShowControl("Image Map Settings","image_map_height"),t.wcpEditorFormShowControl("Image Map Settings","reset_size"),t.wcpEditorFormHideControl("Image Map Settings","preserve_quality")):(t.wcpEditorFormHideControl("Image Map Settings","image_map_width"),t.wcpEditorFormHideControl("Image Map Settings","image_map_height"),t.wcpEditorFormHideControl("Image Map Settings","reset_size"),t.wcpEditorFormShowControl("Image Map Settings","preserve_quality")),1==parseInt(a.fullscreen.enable_fullscreen_mode,10)?(t.wcpEditorFormShowControl("Image Map Settings","start_in_fullscreen_mode"),t.wcpEditorFormShowControl("Image Map Settings","fullscreen_background"),t.wcpEditorFormShowControl("Image Map Settings","fullscreen_button_position"),t.wcpEditorFormShowControl("Image Map Settings","fullscreen_button_type"),t.wcpEditorFormShowControl("Image Map Settings","fullscreen_button_color"),t.wcpEditorFormShowControl("Image Map Settings","fullscreen_button_text_color")):(t.wcpEditorFormHideControl("Image Map Settings","start_in_fullscreen_mode"),t.wcpEditorFormHideControl("Image Map Settings","fullscreen_background"),t.wcpEditorFormHideControl("Image Map Settings","fullscreen_button_position"),t.wcpEditorFormHideControl("Image Map Settings","fullscreen_button_type"),t.wcpEditorFormHideControl("Image Map Settings","fullscreen_button_color"),t.wcpEditorFormHideControl("Image Map Settings","fullscreen_button_text_color")),1==parseInt(a.tooltips.enable_tooltips,10)?(t.wcpEditorFormShowControl("Image Map Settings","show_tooltips"),t.wcpEditorFormShowControl("Image Map Settings","sticky_tooltips"),t.wcpEditorFormShowControl("Image Map Settings","constrain_tooltips"),t.wcpEditorFormShowControl("Image Map Settings","tooltip_animation"),t.wcpEditorFormShowControl("Image Map Settings","fullscreen_tooltips")):(t.wcpEditorFormHideControl("Image Map Settings","show_tooltips"),t.wcpEditorFormHideControl("Image Map Settings","sticky_tooltips"),t.wcpEditorFormHideControl("Image Map Settings","constrain_tooltips"),t.wcpEditorFormHideControl("Image Map Settings","tooltip_animation"),t.wcpEditorFormHideControl("Image Map Settings","fullscreen_tooltips")),1==parseInt(a.zooming.enable_zooming,10)?(t.wcpEditorFormShowControl("Image Map Settings","max_zoom"),t.wcpEditorFormShowControl("Image Map Settings","limit_max_zoom_to_image_size"),t.wcpEditorFormShowControl("Image Map Settings","enable_zoom_buttons"),t.wcpEditorFormShowControl("Image Map Settings","enable_navigator"),t.wcpEditorUpdateForm("Image Map Settings")):(t.wcpEditorFormHideControl("Image Map Settings","max_zoom"),t.wcpEditorFormHideControl("Image Map Settings","limit_max_zoom_to_image_size"),t.wcpEditorFormHideControl("Image Map Settings","enable_zoom_buttons"),t.wcpEditorFormHideControl("Image Map Settings","enable_navigator")),1==parseInt(a.zooming.enable_zoom_buttons,10)&&1==parseInt(a.zooming.enable_zooming,10)?(t.wcpEditorFormShowControl("Image Map Settings","zoom_button_text_color"),t.wcpEditorFormShowControl("Image Map Settings","zoom_button_background_color")):(t.wcpEditorFormHideControl("Image Map Settings","zoom_button_text_color"),t.wcpEditorFormHideControl("Image Map Settings","zoom_button_background_color")),1==parseInt(a.layers.enable_layers,10)?(t.wcpEditorFormShowControl("Image Map Settings","layers_list"),t.wcpEditorFormHideControlsGroup("Image Map Settings","image")):(t.wcpEditorFormHideControl("Image Map Settings","layers_list"),t.wcpEditorFormShowControlsGroup("Image Map Settings","image"))},m.prototype.launchTooltipContentBuilder=function(){if(0==t("#imp-editor-tooltip-content-builder-wrap").length){var e="";e+='
',e+='
',e+='
',e+='
',e+='
',e+="
",e+='
',e+="

Press the Done button when you are done editing, or click the Close button in the upper-right corner.

",e+="
",e+='
Done
',e+="
",t("body").append(e)}else t("#imp-editor-tooltip-content-builder-wrap").show();setTimeout(function(){t("#imp-editor-tooltip-content-builder-wrap").addClass("imp-visible")},10);var o,i,r=this.selectedSpot.tooltip_style.width,a=(o=this.selectedSpot.tooltip_style.background_color,(i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o))?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null),n="rgba("+a.r+", "+a.g+", "+a.b+", "+this.selectedSpot.tooltip_style.background_opacity+")";t("#imp-editor-tooltip-content-builder-tooltip-wrap").css({width:r,background:n}),t.squaresInitWithSettings(t("#imp-editor-tooltip-content-builder"),this.selectedSpot.tooltip_content.squares_settings),t.squaresShowEditorWindow(20,20)},m.prototype.doneEditingTooltip=function(){var e=t.squaresGetCurrentSettings(t("#imp-editor-tooltip-content-builder"));t.squaresGenerateHTML(t("#imp-editor-tooltip-content-builder"));this.selectedSpot.tooltip_content.squares_settings=e,this.redraw()},m.prototype.processNewLayerImage=function(t,e){var o=new Image;o.src=t,_(o,function(){},function(){e(!0,o.naturalWidth,o.naturalHeight)},function(){e(!1)})},m.prototype.getCompressedSettings=function(){for(var e=t.extend(!0,{},a),o=[],i=0;i1?e:new f(t.x+r*(e.x-t.x),t.y+r*(e.y-t.y))},f.prototype.vector2Args=function(t,e){return t=t||0,e=e||0,[this.x+t,this.y+e]}}(jQuery,window,document);