!function(){try{new Uint8Array(1);return}catch(e){}function n(e,t){return this.slice(e,t)}function o(e,t){arguments.length<2&&(t=0);for(var r=0,n=e.length;r<n;++r,++t)this[t]=255&e[r]}function e(e){if("number"==typeof e)for(var t=new Array(e),r=0;r<e;++r)t[r]=0;else t=e.slice(0);return t.subarray=n,(t.buffer=t).byteLength=t.length,t.set=o,"object"==typeof e&&e.buffer&&(t.buffer=e.buffer),t}window.Uint8Array=e,window.Uint32Array=e,window.Int32Array=e}(),"response"in XMLHttpRequest.prototype||"mozResponseArrayBuffer"in XMLHttpRequest.prototype||"mozResponse"in XMLHttpRequest.prototype||"responseArrayBuffer"in XMLHttpRequest.prototype||void 0!==Object.defineProperty&&Object.defineProperty(XMLHttpRequest.prototype,"response",{get:function(){return new Uint8Array(new VBArray(this.responseBody).toArray())}}),!function(){var l;"btoa"in window||(l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",window.btoa=function(e){for(var t="",r=0,n=e.length;r<n;r+=3){var o=255&e.charCodeAt(r),i=255&e.charCodeAt(r+1),s=255&e.charCodeAt(r+2),a=(3&o)<<4|i>>4,i=r+1<n?(15&i)<<2|s>>6:64,s=r+2<n?63&s:64;t+=l.charAt(o>>2)+l.charAt(a)+l.charAt(i)+l.charAt(s)}return t})}(),jQuery.fn.imgmover=function(t){var r=jQuery;return this.each(function(){if("DIV"!=this.tagName)return!0;var e=r(this);ddimagepanner.init(r,e,t)})};var ddimagepanner={maxzoom:4,init:function(e,t,r){var n=r;n.imagesize=[t.width(),t.height()],n.oimagesize=[t.width(),t.height()],n.wrappersize=[r.$pancontainer.width(),r.$pancontainer.height()],n.pos="center"==n.pos?[-(n.imagesize[0]/2-n.wrappersize[0]/2),-(n.imagesize[1]/2-n.wrappersize[1]/2)]:[0,0],n.pos=[Math.floor(n.pos[0]),Math.floor(n.pos[1])],t.css({position:"absolute",left:n.pos[0],top:n.pos[1]}),t.find("img").css({objectFit:"fill",maxHeight:"none"}),this.dragimage(e,t,n)},destroy:function(e){e.off("mousedown touchstart"),$(document).off("mouseup.zoompan touchend.zoompan"),$(window).off("resize.visualizerzoom")},dragimage:function(e,l,c){l.on("mousedown touchstart",function(e){var t=e.originalEvent.changedTouches,t=null!=t?t[0]:e,a=[t.clientX,t.clientY];return c.pos=[parseInt(l.css("left")),parseInt(l.css("top"))],c.dragcheck={h:!(c.wrappersize[0]>c.imagesize[0]),v:!(c.wrappersize[1]>c.imagesize[1])},l.on("mousemove.dragstart touchmove.dragstart",function(e){var t,r,n=e.originalEvent.changedTouches,n=null!=n?n[0]:e,e=c.pos,o=c.imagesize,i=c.wrappersize,s=n.clientX-a[0],n=n.clientY-a[1];return 1==c.dragcheck.h&&(t=0<s?Math.min(0,e[0]+s):Math.max(-o[0]+i[0]+2,e[0]+s)),1==c.dragcheck.v&&(r=0<n?Math.min(0,c.pos[1]+n):Math.max(-o[1]+i[1]+2,e[1]+n)),l.css({left:void 0!==t?t:e[0],top:void 0!==r?r:e[1]}),!1}),!1}),e(document).on("mouseup.zoompan touchend.zoompan",function(){l.off("mousemove.dragstart touchmove.dragstart")}),e(window).on("resize.visualizerzoom",function(){var e,t=[c.$pancontainer.width(),c.$pancontainer.height()];c.wrappersize[0]===t[0]&&c.wrappersize[1]===t[1]||(c.wrappersize=t,c.pos=[parseInt(l.css("left")),parseInt(l.css("top"))],t=Math.max(c.wrappersize[0]-c.pos[0]-c.imagesize[0],0),e=Math.max(c.wrappersize[1]-c.pos[1]-c.imagesize[1],0),(0!==t||0!==e)&&(t=c.pos[0]+t,e=c.pos[1]+e,t<=0||e<=0)&&l.css({left:Math.min(t,0),top:Math.min(e,0)}))})}},socialMedia=(!function(F){F.fn.extend({ChamViz:function(u,d){var x={test:function(){var e=[];return this.each(function(){e=jQuery.data(this,"options")}),e}},z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NCNwAAAA1JREFUGFdj+P//PwMACPwC/ohfBuAAAAAASUVORK5CYII=";if(x.apply=function(v){this.each(function(){F(this).trigger("apply",[v]);var t,r,n,o,i,s,a,l,e,c,u,d,p=jQuery.data(this,"options"),f=F(this).find("img.viz-layer").eq(v.surface-1),h=v.surface,m=v.sel,g=v.productName||"";f.attr("data-sel")!=m&&(t=p.renderserver,r=p.sessionId,n=p.siteid,o=f.attr("data-productname"),i=p.renderFlags,s=p.baseImageRenderMode,a=F(this).ChamViz({action:"getFullSelStringAsArray"}),l=a.slice(0),e=f.parent(),c=f.attr("data-type"),u=e.find('img.viz-layer[data-surface="1"]').attr("data-specifier"),f.attr("data-specifier")!=u&&e.find('img[data-type="'+c+'"]').each(function(){var e=this.getAttribute("data-surface");l[parseInt(e)-1]="-1"}),l[parseInt(h)-1]=m,d=this,jQuery.data(this,"history").push({full:l.join(","),sel:m,surface:p.surfaces[h-1||0]}),jQuery.data(this,"undoQ").execute({execute:function(){var e=p.width;x._setLayer(f,l,e,n,g,t,r,i,s,p.srcBuilderHandler,d)},unexecute:function(){var e=p.width;x._setLayer(f,a,e,n,o,t,r,i,s,p.srcBuilderHandler,d)}}),p.applySurfaceHandler.call(this,f,p.surfaces[parseInt(v.surface-1)],this,g,m))})},x.applyByType=function(m){this.each(function(){F(this).trigger("apply",[m]);var t=jQuery.data(this,"options"),e=m.sel,r=t.renderserver,n=t.sessionId,o=t.siteid,i=m.productName||"",s=t.renderFlags,a=this,l=t.baseImageRenderMode,c=F(this).ChamViz({action:"getFullSelStringAsArray"}),u=c.slice(0),d=null,p=null,f=null,h=(F(this).find('img.viz-layer[data-type="'+m.type+'"]').each(function(){d=F(this);F(this).attr("data-sel");f=F(this).attr("data-productname")||"",p=F(this).attr("data-surface"),t.applySurfaceHandler.call(a,F(this),t.surfaces[parseInt(p-1)],a,i,e),u[parseInt(p)-1]=e}),jQuery.data(this,"history").push({full:u.join(","),sel:e,surface:t.surfaces[p-1||0]}),this);null!=d&&jQuery.data(this,"undoQ").execute({execute:function(){var e=t.width;x._setLayer(d,u,e,o,i,r,n,s,l,t.srcBuilderHandler,h)},unexecute:function(){var e=t.width;x._setLayer(d,c,e,o,f||"",r,n,s,l,t.srcBuilderHandler,h)}})})},x.applyByFilter=function(y){this.each(function(){F(this).trigger("apply",[y]);for(var t=jQuery.data(this,"options"),e=y.sel,r=t.renderserver,n=t.sessionId,o=t.siteid,i=y.productName||"",s=t.renderFlags,a=t.baseImageRenderMode,l=F(this).ChamViz({action:"getFullSelStringAsArray"}),c=l.slice(0),u="",d=null,p=null,f=-1,h=t.surfaces.length,m=!0;++f<h;){var p=F(this).find('img.viz-layer[data-surface="'+(f+1)+'"]'),g=y.fn.call(p,t.surfaces[f],e,l[f]);g!=l[f]&&(d=f+1,u=p.attr("data-productname")||"",m&&t.applySurfaceHandler.call(this,p,t.surfaces[f],this,i,g),m=!1),c[f]=g}jQuery.data(this,"history").push({full:c.join(","),sel:e,surface:t.surfaces[d-1||0]});var v=this;null!=p&&jQuery.data(this,"undoQ").execute({execute:function(){var e=t.width;x._setLayer(p,c,e,o,i,r,n,s,a,t.srcBuilderHandler,v)},unexecute:function(){var e=t.width;x._setLayer(p,l,e,o,u,r,n,s,a,t.srcBuilderHandler,v)}})})},x._setLayer=function(e,t,r,n,o,i,s,a,l,c,u){l=l||!1;for(var d=e.parent(),p=t,f=e.attr("data-surface"),h=0,m=p.length;++h<=m;){var g,v=p[h-1],y=(""!=v&&null!=v||(v="-1"),d.find('img.viz-layer[data-surface="'+h+'"]')),C=y.attr("data-sel"),b=(""==C&&(C="-1"),y.attr("data-rotate")),_="()";null!=b&&(_="?,".repeat(parseInt(f)-1),_="(SURFACE=("+(_+="(XFORM=ROTATE("+b+"))")+"))"),v!=C&&(b=z,"-1"!=v&&(C=!0,null!=jQuery.data(u,"interned")&&null!=(g=x._fullSellToApply(Array(parseInt(y.attr("data-specifiersurfacenumber"))).join("-1,")+v,jQuery.data(u,"interned")))&&(C=!1,b=i+"GetImage.ashx?Specifier="+encodeURIComponent(y.attr("data-specifier"))+_,b=(b=(b+=encodeURIComponent(g))+("&Type=Layer&Size="+r+"&SiteID="+n+"&SurfaceNum="+y.attr("data-specifiersurfacenumber"))+a)+"&r="+Math.floor(1100*Math.random())+"&session="+s),C)&&(b=i+"GetImage.ashx?Specifier="+encodeURIComponent(y.attr("data-specifier"))+_+"&Type=Layer&Size="+r+"&SiteID="+n+"&Sel="+v+"&SurfaceNum="+y.attr("data-specifiersurfacenumber"),b=(b+=a)+("&r="+Math.floor(1100*Math.random()))+"&session="+s),y.attr("data-old-src",y.attr("src")),y.attr("data-sel",v),f==h&&y.attr("data-productname",o),l?null!=window.ChamStats&&null!=v&&window.ChamStats.sendData("apply",v):(null!=c&&(b=c.call(this,b,r,n,o,i,s,a,y.attr("data-specifier"),v,y.attr("data-specifiersurfacenumber"))),y.attr("src",b),A=jQuery.data(u,"undoQ"),window.setTimeout(function(e){F(u).trigger("undoQ",{canUndo:0<A.executed.length,canRedo:0<A.unexecuted.length}),null!=window.ChamStats&&window.ChamStats.sendData("apply",e)}.bind(null,v),1)))}var w,A,S=window.setInterval(function(){var e=!0,t=d.find("img.viz-layer");0!=t.length&&(t.each(function(){1!=this.complete&&(e=!1)}),e)&&M()},200),M=function(){window.clearInterval(S),jQuery.data(u,"options").AllSurfacesLoaded.call(u)};l&&(e="&sel="+t.join(","),(t=d.find("img.viz-baseimage")).bind("load abort error",function(e){d.find("img.viz-layer").attr("src",z).on("load"),F(this).unbind(e)}),-1<(w=t.attr("src")).indexOf("&sel=")?t.attr("src",w.replace(/&sel=[^&]+/,e)):t.attr("src",w+e),A=jQuery.data(u,"undoQ"),window.setTimeout(function(){F(u).trigger("undoQ",{canUndo:0<A.executed.length,canRedo:0<A.unexecuted.length})},1))},x.refreshAll=function(e){this.each(function(){for(var e=jQuery.data(this,"options"),t=e.renderserver,r=e.sessionId,n=e.siteid,o=e.width,i=e.renderFlags,s=F(this),a=0,l=e.surfaces.length+1,c="";++a<l;){var u=s.find('img.viz-layer[data-surface="'+a+'"]'),d=u.attr("data-sel"),p=u.attr("data-rotate"),f="()";null!=p&&(f="?,".repeat(parseInt(a)-1),f="(SURFACE=("+(f+="(XFORM=ROTATE("+p+"))")+"))"),"-1"!=d&&(c=t+"GetImage.ashx?Specifier="+encodeURIComponent(u.attr("data-specifier"))+f+"&Type=Layer&Size="+o+"&SiteID="+n+"&Sel="+d+"&SurfaceNum="+u.attr("data-specifiersurfacenumber"),c=(c+=i)+"&r="+Math.floor(1100*Math.random())+"&session="+r,u.attr("src",c))}})},x.rotateSurface=function(n){var o=this;o.each(function(){jQuery.data(this,"options");var e=F(this).find("img.viz-layer").eq(n.surface-1),t=String(n.rotate).replace("+","").replace("-",""),r=e.attr("data-rotate");null!=r&&""!=r&&(-1<String(n.rotate).indexOf("+")?t=parseInt(r)+parseInt(t):-1<String(n.rotate).indexOf("-")&&(t=parseInt(r)-parseInt(t))),360<Math.abs(parseInt(t))&&(t=0),e.attr("data-rotate",t),x.refreshAll.call(o,{})})},x.setAllBySeries=function(e){},x.getSaveData=function(e){var r={};return this.each(function(){var e=[location.protocol,"//",location.host,location.pathname].join(""),t=jQuery.data(this,"options"),e=(r.spec=t.spec,r.sel=F(this).ChamViz({action:"getFullSelString"}),r.url=e+"?specifier="+encodeURIComponent(t.spec)+"&Sel="+encodeURIComponent(r.sel),r.render=t.renderserver+"getImage.ashx?type=base&spec="+encodeURIComponent(t.spec)+"&sel="+encodeURIComponent(r.sel),r.render+=t.renderFlags,t.spec.replace(/\\/gi,"."));r.fblink=e+="seln"+r.sel}),r},x.resetRenderFlags=function(r){this.each(function(){var t=jQuery.data(this,"options");F(this).find("img.viz-layer").each(function(){var e=this.getAttribute("src");""!=t.renderFlags?e=e.replace(t.renderFlags,r.renderFlags):e+=r.renderFlags,this.setAttribute("src",e)}),t.renderFlags=r.renderFlags})},x.getLayer=function(e){var t;return this.each(function(){t=F(this).find("img.viz-layer").eq(e.surface-1)}),t},x.createGUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},x.getFullSelString=function(e){var s;return this.each(function(){for(var e,t=F(this).find("img.viz-layer").toArray(),r="",n="",o=0;t[o];++o){var i=t[o].getAttribute("data-sel");r+=n+(i=null==(e=i)||(e=String(e).replace(/^\s*|\s*$/g,"")).length<1?"-1":i),n=","}s=r}),s},x.getFullSelStringAsArray=function(e){var i=[];return this.each(function(){for(var e,t=F(this).find("img.viz-layer").toArray(),r=[],n=0;t[n];n++){var o=t[n].getAttribute("data-sel");(null==(e=o)||(e=String(e).replace(/^\s*|\s*$/g,"")).length<1)&&(o="-1"),r.push(o)}i=r}),i},x.clearAll=function(f){this.each(function(){F(this).trigger("clearAll",[f]);for(var e=F(this).find("img.viz-layer").toArray(),t=jQuery.data(this,"options"),r=t.renderserver,n=t.sessionId,o=t.siteid,i=t.renderFlags,s=F(e[0]),a=jQuery.data(this,"history")[0].full.split(","),l=F(this).ChamViz({action:"getFullSelStringAsArray"}),c=l.slice(0),u=t.baseImageRenderMode,d=0;c[d];++d)1==a.length&&"-1"==a[0]||void 0===a[d]?c[d]="-1":c[d]=a[d];jQuery.data(this,"history").push({full:c.join(","),sel:"-1",surface:t.surfaces[0]});var p=this;jQuery.data(this,"undoQ").execute({execute:function(){var e=t.width;x._setLayer(s,c,e,o,"",r,n,i,u,null,p)},unexecute:function(){var e=t.width;x._setLayer(s,l,e,o,"",r,n,i,u,null,p)}}),t.clearAllHandler.call(this)})},x.clear=function(h){this.each(function(){F(this).trigger("clear",[h]);for(var e=h.surface||0,t=F(this).find("img.viz-layer").toArray(),r=jQuery.data(this,"options"),n=r.renderserver,o=r.sessionId,i=r.siteid,s=r.renderFlags,a=F(t[0]),l=jQuery.data(this,"history")[0].full.split(","),c=F(this).ChamViz({action:"getFullSelStringAsArray"}),u=c.slice(0),d=r.baseImageRenderMode,p=0;u[p];++p)p==parseInt(e-1)?1==l.length&&"-1"==l[0]||void 0===l[p]?u[p]="-1":u[p]=l[p]:u[p]=c[p];var f=this;jQuery.data(this,"history").push({full:u.join(","),sel:"-1",surface:r.surfaces[0]}),jQuery.data(this,"undoQ").execute({execute:function(){var e=r.width;x._setLayer(a,u,e,i,"",n,o,s,d,null,f)},unexecute:function(){var e=r.width;x._setLayer(a,c,e,i,"",n,o,s,d,null,f)}}),r.clearAllHandler.call(this)})},x.undo=function(e){this.each(function(){jQuery.data(this,"undoQ").undo()})},x.redo=function(e){this.each(function(){jQuery.data(this,"undoQ").redo()})},x.undoReset=function(e){this.each(function(){var e=jQuery.data(this,"undoQ");e&&(e.reset(),F(this).trigger("undoQ",{canUndo:0<e.executed.length,canRedo:0<e.unexecuted.length}))})},x.getFrozenLayerData=function(e){var t={};return this.each(function(){var e;jQuery.data(this,"options");F(this).parent().find("div.viz-control").hasClass("frozen")&&void 0!==(e=F(this).parent().find("div.viz-control").data("frozen"))&&(e=e.sortorder,t=F(this).parent().find("img.viz-layer").eq(e-1).data())}),t},x.freeze=function(t){this.each(function(){F(this).trigger("freeze",[t]);jQuery.data(this,"options");var e=t.showHighlightLayer;F(this).parent().find("div.viz-control").data("frozen",{sortorder:parseInt(e)}).addClass("frozen"),void 0!==e&&F(this).parent().find("img.viz-highlight").eq(e-1).css("display","block")})},x.unfreeze=function(e){this.each(function(){F(this).trigger("unfreeze",[e]);jQuery.data(this,"options");F(this).parent().find("div.viz-control").removeClass("frozen"),F(this).parent().find("img.viz-highlight").css("display","none"),F(this).parent().find("div.viz-control").data("frozen",{})})},x.history=function(e){var t=[];return this.each(function(){t=jQuery.data(this,"history")}),t.slice(0)},x.getOptions=function(e){var t={};return this.each(function(){t=jQuery.data(this,"options")}),t},x.extendOptions=function(e){var t={};return this.each(function(){t=jQuery.data(this,"options"),F.extend(t,e)}),t},x.getMouseOverCoords=function(e){var t={};return this.each(function(){t=jQuery.data(this,"options").areamaps}),t},x.getSurfaceDataArray=function(e){var t=[];return this.each(function(){var e=jQuery.data(this,"options");t=e.surfaces}),t},x.zoom=function(e){this.each(function(){F(this).trigger("zoom",[void 0]);var e,t,r,n=jQuery.data(this,"options"),o=document.createElement("img"),i=(F(o).css({position:"absolute",left:0,top:0,"z-index":0}),F(this).find("div.ZoomLayer"));0<i.find("img").length||(i.find("div:eq(0)").append(o),e=F(this).find("img.viz-baseimage"),t=n.zoomWidth,r=e.attr("src").replace(/size=\d+/i,"size="+t),n.isauxiliarysurfaces&&(r=r.replace(/GetImage.ashx/i,"GetImageWithAuxSurfaces.ashx")),r=(r+="&sel="+F(this).ChamViz({action:"getFullSelString"}))+"&r="+Math.floor(1100*Math.random()),null!=n.srcBuilderHandler&&(r=n.srcBuilderHandler.call(this,r,t,n.siteid,"",n.renderserver,n.sessionId,n.renderFlags,n.spec,F(this).ChamViz({action:"getFullSelString"}),0)),LoadingMsg.startImg(o,"zoom",this,n.LoadZoomMessage),F(o).attr({src:r}),o=F(this),r=n.isResponsive?{width:"100%",height:"100%"}:{width:o.width()+"px",height:o.height()+"px"},i.css({cursor:"move",width:r.width,height:r.height}),i.show(),i.find("div:eq(0)").css({width:t+"px",height:t/e.width()*e.height()+"px"}),n={$pancontainer:i,pos:i.attr("data-orient"),curzoom:1,canzoom:i.attr("data-canzoom")},i.find("div:eq(0)").imgmover(n))})},x.unzoom=function(t){this.each(function(){F(this).trigger("unzoom",[t]);var e=F(this).find("div.ZoomLayer");e.hide("scale",function(){e.find("div:eq(0)").empty()},500),ddimagepanner.destroy(e.find("div:eq(0)"))})},x.pointZoom=function(e){this.each(function(){F(this).trigger("zoom",[e]);var d,a=this,l=jQuery.data(this,"options"),p=parseFloat(e.factor),f=parseInt(e.levels||1),t=F(this).find("div.ZoomLayer"),h=function(){F(a).trigger("unzoom"),t.hide("scale",function(){t.find("div:eq(0)").empty()},500),t.css({cursor:"default"});var e=F(a).find("div.zoom-control");e.hide().off("click"),e.data("factor",null),e.data("level",null)},m=function(e,t,r){var n,o=document.createElement("img"),i=(F(o).css({position:"absolute",left:0,top:0,"z-index":0}),F(a).find("div.ZoomLayer")),s=(i.find("div:eq(0)").append(o),F(a).find("img.viz-baseimage"),l.renderserver+"GetImage.ashx?Specifier="+encodeURIComponent(l.spec)+"()&Type=Base&Size="+i.width()),s=(s+="&sel="+F(a).ChamViz({action:"getFullSelString"}))+("&r="+Math.floor(1100*Math.random()));-1==l.renderFlags.indexOf("&extra=(")?s+="&extra=(zoom=(FACTOR="+e.toString()+",X="+t.toString()+",Y="+r.toString()+"))":(window.rf=l.renderFlags,n=l.renderFlags.indexOf("&extra=(")+"&extra=(".length,s+=l.renderFlags.slice(0,n)+"zoom=(FACTOR="+e.toString()+",X="+t.toString()+",Y="+r.toString()+"),"+l.renderFlags.slice(n)),LoadingMsg.stop("zoom"),LoadingMsg.startImg(o,"zoom",a,l.LoadZoomMessage),F(o).attr({src:s}),i.show()};parseInt(p)<=1?h():((d=F(a).find("div.zoom-control")).show(),d.css({cursor:"zoom-in"}),"zoom-in"!=d.css("cursor")&&d.css({cursor:"crosshair"}),d.html('<img style="border:none;" src="'+z+'" alt="" width="'+t.width()+'" height="'+t.height()+'" />'),d.off("click").on("click",function(e){var t,r,n,o,i,s,a,l,c,u=d.data("level")||0;u<f?(d.data("level",++u),o=(t=d.data("factor"))||1,null==t?t=p:t*=p,d.data("factor",t),r=F(this).parent().width(),n=F(this).parent().height(),1<u?(l=d.data("zoomX"),c=d.data("zoomY"),i=F(this).parent().offset(),u=((s=e.pageX-i.left||0)-r/2)/o,o=((a=e.pageY-i.top||0)-n/2)/o,d.data("zoomX",l+u),d.data("zoomY",c+o),l=Math.round((l+u)/r*100)/100,c=Math.round((c+o)/n*100)/100):(i=F(this).parent().offset(),s=e.pageX-i.left||0,a=e.pageY-i.top||0,l=Math.round(s/r*100)/100,c=Math.round(a/n*100)/100,d.data("zoomX",s),d.data("zoomY",a)),m(t,l,c)):h()}))})},x.getRoomSceneDims=function(t){this.each(function(){var r=jQuery.data(this,"options"),n=t.MaxWidth||r.width,o=t.MaxHeight,i=new Image,e=(i.crossOrigin="Anonymous",r.renderserver+"GetImage.ashx?Specifier="+r.spec+"&Type=Base&Size="+n+"&SiteID="+r.siteid),s=0,a=0,l=0;"fit"==t.scale?(i.onload=function(){l=0,s=i.width,a=i.height;var e=function(e,t,r,n){e=parseInt(e),t=parseInt(t),r=parseInt(r),n=parseInt(n);n=parseFloat(r/e),r=parseFloat(o/t),n=Math.min(n,r);return{width:parseFloat(e*n),height:parseFloat(t*n)}}(s,a,n,o),t=Math.floor(e.width),e=Math.floor(e.height);r.GetRoomSceneDimensions.call(null,t,e),i.src="",i=null},i.src=e):"width"==t.scale?r.GetRoomSceneDimensions.call(null,n,null):(i.onload=function(){l=0,s=i.width,a=i.height;var e=0,t=0;n<s&&(t=e=a*(l=n/s)),o<a&&(e=s*(l=o/a),t=a*l),e=Math.floor(e),t=Math.floor(t),r.GetRoomSceneDimensions.call(null,e,t),i.src="",i=null},i.src=e)})},x.applyRealWorld=function(r){this.each(function(){for(var e=F(this).ChamViz({action:"getSurfaceDataArray"}),t=0;t<e.length;t++)F(this).ChamViz({action:"apply",surface:e[t].sortorder,sel:r.sel})})},x.internProducts=function(a){this.each(function(){var e={},t=a.products;if(null==t)console&&console.log("Error: products not found in internProducts");else{var r=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)};if(r(t)&&0<t.length){if((t[0].hasOwnProperty("specifier")||t[0].hasOwnProperty("Specifier"))&&(t[0].hasOwnProperty("id")||t[0].hasOwnProperty("ID")))for(var n=t.length-1;-1<n;n--)e[t[n].id||t[n].ID]=t[n].specifier||t[n].Specifier}else for(var o in t)if(t.hasOwnProperty(o)){var i=t[o];if(r(i)){if(0<i.length&&(i[0].hasOwnProperty("specifier")||i[0].hasOwnProperty("Specifier"))&&(i[0].hasOwnProperty("id")||i[0].hasOwnProperty("ID")))for(n=i.length-1;-1<n;n--)e[i[n].id||i[n].ID]=i[n].specifier||i[n].Specifier}else if((i.hasOwnProperty("specifier")||i.hasOwnProperty("Specifier"))&&(i.hasOwnProperty("id")||i.hasOwnProperty("ID")))e.push({id:i.id||i.ID,spec:i.specifier||i.Specifier});else for(var s in i)i.hasOwnProperty(s)&&((s=i[s]).hasOwnProperty("specifier")||s.hasOwnProperty("Specifier"))&&(s.hasOwnProperty("id")||s.hasOwnProperty("ID"))&&(e[s.id||s.ID]=s.specifier||s.Specifier)}e[0]="~",e[-1]="?",jQuery.data(this,"interned",e)}})},x._fullSellToApply=function(e,t){e=String(e);var r=[];if(tmp="",e.replace(/./g,function(e){return" "!=e&&(","==e?(r.push(tmp),r.push(","),tmp=""):"("==e?(r.push(tmp),r.push("("),tmp=""):")"==e?(r.push(tmp),r.push(")"),tmp=""):tmp+=e),e}),r.push(tmp),30<r.length)return null;var n="(APPLY=(",o=n;for(i=0;i<r.length;i++){var s=r[i];if(""!=s)if("("==s)o+=n;else if(")"==s)o+="))";else if(","==s)o+=",";else{s=t[s];if(null==s)return null;o+=s}}return o+="))"},u.action)return x[u.action].call(this,u);void 0!==u.highlightColor&&(u.hightlightColor=u.highlightColor),void 0!==u.showMouseOvers&&(u.showMourseOvers=u.showMouseOvers);function p(r,m){var g=F(r),e="ChamViz"+F(".ChamViz").length,v="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&()*+,-.:;<=>?@[]^_`{|}~";try{window.sessionStorage.setItem("_spec",m.spec)}catch(e){}function t(){var e;return!(document.all&&!document.addEventListener||!window.XMLHttpRequest||!(e=document.createElement("canvas")).getContext||!e.getContext("2d"))}0<m.surfaces.length&&(n=window.setInterval(function(){var e=!0,t=g.find("img.viz-layer");0!=t.length&&(t.each(function(){1!=this.complete&&(e=!1)}),e)&&o()},200),o=function(){window.clearInterval(n),m.AllSurfacesLoaded.call(this),F(this).trigger("initComplete")});var n,o,i=[];if(m.isResponsive){if(null!=m.responsiveMode&&(C=R.getClasses(m.responsiveMode,m.responsiveAlignment),u="contain"===m.responsiveMode&&null!==m.responsiveRoot?m.responsiveRoot:g,k=R.getWidthCalculator(m.responsiveMode),m.responsive={mode:m.responsiveMode,alignment:m.responsiveAlignment,root:u,classes:C,calculateWidth:k}),null!=m.responsiveBreakpoints)for(var s=m.responsiveBreakpoints.length,a=0;a<s;a++){var l=m.responsiveBreakpoints[a],c=l.alignment||m.responsiveAlignment;l.classes=R.getClasses(l.mode,c),l.calculateWidth=R.getWidthCalculator(l.mode),"contain"===l.mode&&null!=l.root||(l.root=g)}var u=R.getActiveBreakpoint();m.width=u.calculateWidth(u.root),(m.activeBreakpoint=u).root.get(0)!==r&&u.root.addClass("viz-sizing-root"),R.updateElementClasses(r,u.classes)}function d(e,t,r){var n=z;return""!=e&&"-1"!=e&&"undefined"!=e&&(n=m.renderserver+"GetImage.ashx?Specifier="+r+"&Type=Layer&Size="+m.width+"&SiteID="+m.siteid+m.renderFlags+"&Sel="+e+"&SurfaceNum="+t),n=null!=m.srcBuilderHandler?m.srcBuilderHandler.call(this,n,m.width,m.siteid,"",m.renderserver,"",m.renderFlags,r,e,t):n}i.push("<style>"),i.push(".ChamVizWrapper { clear: both; -webkit-touch-callout: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } "),i.push(".ChamViz { position: relative; overflow: hidden; } "),i.push(".ChamViz img { width: inherit; height: inherit; border: none; } "),i.push(".viz-control { width: 100%; height: 100%; } "),i.push(".viz-layer, .viz-highlight, .viz-control, .ZoomLayer, .zoom-control { position: absolute; top: 0; left: 0; } "),i.push(".viz-baseimage { display: block; z-index: 0; } "),i.push(".viz-highlight { display: none; -moz-opacity: 0.5; -khtml-opacity: 0.5; filter: alpha(opacity=50); opacity: 0.5; } "),i.push(".ZoomLayer { width: 100%; height: 100%; overflow: hidden; display: none; } "),i.push(".zoom-control { display: none; cursor: pointer; } "),i.push(".viz-fit-width .ChamViz { width: 100%; } "),i.push(".viz-contain .ChamViz { width: auto; height: auto; display: inline-block; vertical-align: top; } "),i.push(".viz-contain .ChamViz img { max-width: 100%; max-height: 100%; } "),i.push(".viz-cover { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; } "),i.push(".viz-cover .ChamViz { min-width: 100%; min-height: 100%; -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto; } "),i.push(".viz-sizing-root .viz-contain { display: inline-block; vertical-align: top; } "),i.push(".viz-align-center.viz-contain, .viz-align-center.viz-cover { text-align: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } "),i.push(".viz-align-right.viz-contain, .viz-align-right.viz-cover { text-align: right; -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end; } "),i.push(".viz-align-middle { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } "),i.push(".viz-align-bottom { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; }"),i.push("</style>"),i.push('<div class="ChamViz">'),i.push('<img class="viz-baseimage" src="'+m.renderserver+"GetImage.ashx?Specifier="+m.spec+"&Type=Base&Size="+m.width+"&SiteID="+m.siteid+m.renderFlags+'" />');for(var p=1,f=0,h=m.surfaces.length;f<h;++f){var y=m.surfaces[f];i.push('<img class="viz-layer" style="z-index: '+p+++';" src="'+d(y.sel,y.specifiersurfacenumber,y.specifier)+'" data-sel="'+y.sel+'" data-surface="'+y.sortorder+'" data-name="'+y.name+'" data-specifier="'+y.specifier+'" data-type="'+y.type+'" data-seriesid="'+y.seriesid+'" data-roomsceneauxiliaryseriesid="'+y.roomsceneauxiliaryseriesid+'"  data-specifiersurfacenumber="'+y.specifiersurfacenumber+'" />')}if(m.showMourseOvers)for(f=0,h=m.surfaces.length;f<h;++f){y=m.surfaces[f];i.push('<img class="viz-highlight" style="z-index: '+p+++';" src="'+m.renderserver+"GetImage.ashx?Specifier="+y.specifier+"&Type=MouseOver&SurfaceNum="+y.specifiersurfacenumber+"&Color="+m.hightlightColor+"&SizeMode=Width&Size="+(m.isResponsive?m.width:m.mouseOverPreSize)+"&Log=0"+m.renderFlags+'" data-surface="'+y.sortorder+'" />')}i.push('<div class="viz-control" style="z-index: '+p+++';"><img class="controlImage" src="'+z+'" usemap="#'+e+'MAP" /></div>');var C=!1;if(m.showMourseOvers&&!t()&&!(C=0<m.areamaps.length?!("true"==m.areamaps[0].isAreaMap):C)){i.push('<map id="'+e+'MAP" name="'+e+'MAP">');for(f=0,h=m.areamaps.length;f<h;++f){var b=m.areamaps[f];i.push('<area class="ztip" style="cursor:pointer" title="'+b.name+'" data-surface="'+b.sortorder+'" data-name="'+b.name+'" shape="poly" coords="'+b.coordinates+'" />')}i.push("</map>")}i.push("</div>"),i.push('<div class="ZoomLayer" style="z-index: '+p+++';" data-orient="center" data-canzoom="yes"><div></div></div>'),i.push('<div class="zoom-control" style="z-index: '+p+++';"></div>'),r.innerHTML=i.join("");var _,w,A,S,M,x,j,k,L,H,P,I,T=null!=navigator.userAgent.match(/iPad/i);t()?(_=function(e,d){var h,p=d.toArray();p.length<1||((h=new Image).crossOrigin="Anonymous",h.onload=function(){e=h.width,t=h.height,(r=document.createElement("canvas")).width=e,r.height=t,(n=r.getContext("2d")).fillStyle="#000000",n.fillRect(0,0,e,t);for(var e,t,r,n,f=r,o=("withCredentials"in new XMLHttpRequest),i=0;p[i];++i){var s=p[i].getAttribute("data-surface");!function(d,e,p){window.URL=window.URL||window.webkitURL;var t=new XMLHttpRequest,e=(t.onload=function(){for(var u=new Image,e=(u.onload=function(){for(var e=document.createElement("canvas"),t=(e.width=d.width,e.height=d.height,e.getContext("2d")),r=(t.drawImage(u,0,0,d.width,d.height),f.getContext("2d")),n=r.getImageData(0,0,d.width,d.height),o=n.data,i=t.getImageData(0,0,d.width,d.height).data,s=0,a=i.length;s<a;s+=4)30<i[s+3]&&p>o[s]&&(o[s]=p);if(r.putImageData(n,0,0),m.legacyHitTestData){for(var l=[],s=0,a=i.length;s<a;s+=4){var c=o[s];l.push(v.charAt(c))}t={width:f.width};t.data=l.join(""),m.legacyHitTestData=t}u=e=null},new Uint8Array(this.response||this.responseText)),t=e.length,r=new Array(t);t--;)r[t]=String.fromCharCode(e[t]);var n=r.join(""),n=window.btoa(n);u.width=h.width,u.height=h.height,u.src="data:image/png;base64,"+n},o?e.src:m.chamWebToolsPath+"ChamViz/RenderProxy.ashx?url="+encodeURIComponent(e.src));t.open("GET",e,!0),t.responseType="arraybuffer",t.send()}(f,p[i],s)}function a(e,t){return e<<=0,t<<=0,0<(t=l.getImageData(0,0,f.width,f.height).data[c*(t-1)+4*e])?t:-1}var l=f.getContext("2d"),c=4*f.width,u=g.find("div.zoom-control");g.find("div.viz-control").off("mousemove mouseout click touchstart touchend touchcancel").on("mousemove touchstart",function(e){var t,r,n=e.originalEvent.changedTouches;null!=n&&(1<n.length||1<e.originalEvent.touches.length)||(t=F(this)).hasClass("frozen")||(d.css("display","none"),t=t.offset(),r=(e.pageX||(null!=n?n[0].pageX:null))-t.left,n=(e.pageY||(null!=n?n[0].pageY:null))-t.top,void 0===(t=a.call(null,r,n)))||(null!=this.currentSurface&&this.currentSurface!==t&&(r=m.surfaces[this.currentSurface-1],m.surfaceUnHighlighted.call(g,r),"mousemove"===e.type)&&g.trigger("surfaceTooltipClose",r),n=this.currentSurface!==t,this.currentSurface=t<1?null:t,t<1)||(d.eq(t-1).css("display","block"),n?(r=m.surfaces[t-1],m.surfaceHighlighted.call(g,r),"mousemove"===e.type&&g.trigger(F.Event("surfaceTooltipOpen",{originalEvent:e}),r)):"mousemove"===e.type&&g.trigger(F.Event("surfaceTooltipMove",{originalEvent:e}),m.surfaces[t-1]))}).on("click touchend",function(e){e.preventDefault();var t,r,n,o=e.originalEvent.changedTouches;null!=o&&(1<o.length||1<e.originalEvent.touches.length)||(n=F(this)).hasClass("frozen")||(t=this.currentSurface,this.currentSurface=null,d.css("display","none"),m.surfaceUnHighlighted.call(g,m.surfaces[t-1]),n=n.offset(),r=(e.pageX||(null!=o?o[0].pageX:null))-n.left,o=(e.pageY||(null!=o?o[0].pageY:null))-n.top,void 0===(n=a.call(null,r,o)))||n<1||t===n&&(e.stopPropagation(),m.chooseSurfaceHandler.call(g,m.surfaces[n-1]),u.hide())}).on("mouseout touchcancel",function(e){var t;F(this).hasClass("frozen")||(t=this.currentSurface,d.css("display","none"),(this.currentSurface=null)!=t&&(t=m.surfaces[t-1],m.surfaceUnHighlighted.call(g,t),"mouseout"===e.type)&&g.trigger(F.Event("surfaceTooltipClose",{originalEvent:e}),t))})},h.src=e.attr("src"))},w=g.find("img.viz-baseimage"),A=g.find("img.viz-highlight"),S=g.find("img.viz-layer"),_(w,A),M=function(){w.attr("src",m.renderserver+"GetImage.ashx?Specifier="+m.spec+"&Type=Base&Size="+m.width+"&SiteID="+m.siteid+m.renderFlags),_(w,A);for(var e=0,t=m.surfaces.length;e<t;++e){var r=S.eq(e),n=m.surfaces[e];r.attr("src",d(r.attr("data-sel"),n.specifiersurfacenumber,n.specifier))}if(m.showMourseOvers)for(e=0,t=m.surfaces.length;e<t;++e){n=m.surfaces[e];A.eq(e).attr("src",m.renderserver+"GetImage.ashx?Specifier="+n.specifier+"&Type=MouseOver&SurfaceNum="+n.specifiersurfacenumber+"&Color="+m.hightlightColor+"&SizeMode=Width&Size="+m.width+"&Log=0"+m.renderFlags)}},j=g.find(".ChamViz"),m.isResponsive&&(k="resize.visualizer."+e+" orientationchange.visualizer."+e,F(window).off(k).on(k,function(){var e=R.getActiveBreakpoint(),t=m.activeBreakpoint;m.width=e.calculateWidth(e.root),j.css("width","contain"===e.mode||"cover"===e.mode?m.width:""),e!==t&&(t.root.get(0)!==r&&t.root.removeClass("viz-sizing-root"),e.root.get(0)!==r&&e.root.addClass("viz-sizing-root"),R.updateElementClasses(r,e.classes),m.activeBreakpoint=e),clearTimeout(x),x=setTimeout(M,500)}))):C?(L=m.areamaps[0].coordinates,H=m.areamaps[0].origwidth,P=H/m.width,I=function(e,t){t=L[((t=t*P<<0)-1)*H+(e=e*P<<0)];return 0<(t=v.indexOf(t))?t:-1},g.find("div.viz-control").unbind("mousemove").bind("mousemove",function(e){var t,r=e.target;F(this).hasClass("frozen")||(T&&F(r).click(),F(this).parent().find("img.viz-highlight").css("display","none"),r=F(this).parent().offset(),t=e.pageX-r.left,e=e.pageY-r.top,void 0===(r=I.call(null,t,e)))||r<1||(this.currentSurface=r,F(this).parent().find("img.viz-highlight").eq(r-1).css("display","block"),m.surfaceHighlighted.call(g,m.surfaces[r-1]))}).unbind("mouseout").bind("mouseout",function(e){var t=this.currentSurface||1;F(this).hasClass("frozen")||(F(this).parent().find("img.viz-highlight").css("display","none"),m.surfaceUnHighlighted.call(g,m.surfaces[t-1]))}),g.find("div.viz-control").unbind("click").bind("click",function(e){var t,r;F(this).hasClass("frozen")||(t=F(this).parent().offset(),r=e.pageX-t.left,t=e.pageY-t.top,void 0!==(r=I.call(null,r,t))&&0!=typeof r&&(m.chooseSurfaceHandler.call(g,m.surfaces[r-1]),e.stopPropagation(),g.find("div.zoom-control").hide()))})):g.find("area").unbind("mouseover").bind("mouseover",function(e){var e=e.target,t=F(e).parents("div.ChamViz"),r=e.getAttribute("data-surface");t.find("div.viz-control").hasClass("frozen")||(T&&F(e).click(),t.find(".controlImage").css("cursor","pointer"),t.find("img.viz-highlight").eq(r-1).css("display","block"),m.surfaceHighlighted.call(g,m.surfaces[parseInt(r)-1]))}).unbind("mouseout").bind("mouseout",function(e){var t,e=e.target;F(e).hasClass("frozen")||(t=F(e).parents("div.ChamViz"),e=e.getAttribute("data-surface"),t.find(".controlImage").css("cursor","default"),t.find("img.viz-highlight").eq(e-1).css("display","none"),m.surfaceUnHighlighted.call(g,m.surfaces[parseInt(e)-1]))}).unbind("click").bind("click",function(e){var t=e.target,r=F(t).parents("div.ChamViz"),t=t.getAttribute("data-surface");r.find("div.viz-control").hasClass("frozen")||(m.chooseSurfaceHandler.call(g,m.surfaces[parseInt(t)-1]),e.stopPropagation(),r.find("div.zoom-control").hide())}),g.find("img.viz-baseimage").on("load",function(){m.baseWidth=this.width,m.baseHeight=this.height,m.showZoom&&g.find("div.zoom-control").show()}).each(function(){this.complete||F(this).on("load")}),g.find("img.viz-baseimage").mouseover(function(){F(this).on("load")}),m.surfacesLoaded.call(r,m.surfaces)}(u=F.extend({spec:"",defaultSpec:"",width:"",renderserver:"//core2render.chameleonpower.com/cham/",renderFlags:"",siteid:"",hightlightColor:"E40514",sel:"",defaultSel:"",showZoom:!1,showMourseOvers:!0,mouseOverPreSize:200,surfacesLoaded:function(e){},surfaceHighlighted:function(e){},surfaceUnHighlighted:function(e){},chooseSurfaceHandler:function(e){},applySurfaceHandler:function(e,t,r,n,o){},srcBuilderHandler:function(e,t,r,n,o,i,s,a,l,c){return e},clearAllHandler:function(){},GetRoomSceneDimensions:function(e,t){},AllSurfacesLoaded:function(){},initComplete:function(){},surfaces:[],areamaps:[],legacyHitTestData:!1,baseImageRenderMode:!1,isResponsive:!0,responsiveMode:"fit width",responsiveAlignment:"center top",responsiveRoot:null,responsiveBreakpoints:null,zoomWidth:2e3,LoadZoomMessage:"",chamWebToolsPath:"/ChamWebTools/",version:"3.1"},u)).sessionId=x.createGUID();var R={},a=F(window),o=(R.getActiveBreakpoint=function(){var e=u.responsiveBreakpoints;if(null==e)return u.responsive;for(var t=a.width(),r=1<t/a.height(),n=null,o=0,i=e.length;o<i;o++){var s=e[o];t>=s.minWidth&&(null==s.orientation||("landscape"===s.orientation?r:!r))&&(null==n||s.minWidth>n.minWidth)&&(n=s)}return n||u.responsive},R.widthCalculators={"fit width":function(e){return Math.round(e.width())},contain:function(e){e=e.get(0).getBoundingClientRect(),e=e.width/e.height>u.ratio?e.height*u.ratio:e.width;return Math.ceil(e)},cover:function(e){e=e.get(0).getBoundingClientRect(),e=e.width/e.height>u.ratio?e.width:e.height*u.ratio;return Math.ceil(e)}},R.getWidthCalculator=function(e){return R.widthCalculators[e]||R.widthCalculators["fit width"]},["left","center","right"]),s=["top","middle","bottom"],l=["contain","cover","fit width"],c=["viz-contain","viz-cover","viz-fit-width","viz-align-left","viz-align-center","viz-align-right","viz-align-top","viz-align-middle","viz-align-bottom"];R.getClasses=function(e,t){var t=-1<t.indexOf(" ")?t.split(" "):[t,"top"],r=t[0],n=t[1],r=(t[0]=-1<o.indexOf(r)?"viz-align-"+r:"viz-align-center",t[1]=-1<s.indexOf(n)?"viz-align-"+n:"viz-align-top",-1<l.indexOf(e)?"viz-"+e.replace(" ","-"):"viz-fit-width");return t.unshift(r),t},R.updateElementClasses=function(e,t){for(var r=e.className.split(" "),n=[],o=0,i=r.length;o<i;o++){var s=r[o];-1===c.indexOf(s)&&n.push(s)}for(o=0,i=t.length;o<i;o++)n.push(t[o]);e.className=n.join(" ")};return this.each(function(){function e(e){return decodeURIComponent((new RegExp("[?|&]"+e+"=([^&;]+?)(&|#|;|$)","i").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}var t,r,n,o=F(this),i=u,s=(""==i.spec&&(i.spec=e("specifier")),i.spec||(i.spec=i.defaultSpec),""==i.sel&&(i.sel=e("sel")),i.sel||(i.sel=i.defaultSel||"-1"),""==i.width&&(i.width=parseInt(o.width())),i.spec&&-1<i.spec.toLowerCase().indexOf("_user")&&F("body").addClass("IMContains"),t=void 0===d?(i.spec,i.sel,(r=i).surfaces={},F.ajax({type:"GET",url:u.chamWebToolsPath+"ChamViz/RoomsceneJSON2.ashx?specifier="+encodeURIComponent(r.spec)+"&sel="+r.sel+"&width="+r.width+"&r="+Math.random(),beforeSend:function(e){e&&e.overrideMimeType&&e.overrideMimeType("application/j-son;charset=UTF-8")},dataType:"json",success:function(e){jQuery.extend(!0,r,e)}})):(jQuery.extend(!0,i,d),F.Deferred().resolve().promise()),this.innerHTML="",o.addClass("ChamVizWrapper ChamVisualizerPlugin"),n={executed:[],unexecuted:[],execute:function(e){e.execute(),n.executed.push(e),0<n.unexecuted.length&&(n.unexecuted=[])},undo:function(){var e=n.executed.pop();void 0!==e&&(void 0!==e.unexecute&&e.unexecute(),n.unexecuted.push(e))},redo:function(){var e=n.unexecuted.pop();void 0!==e&&(e.execute(),n.executed.push(e))},reset:function(){n.executed=[],n.unexecuted=[]}}),a=(jQuery.data(this,"undoQ",s),jQuery.data(this,"options",u),jQuery.data(this,"history",[]),jQuery.data(this,"history").push({full:i.sel,sel:"-1",surface:0}),this),l=(t.done(function(){p(a,i),u.initComplete.call(a)}),null!=window.ChamStats&&null!=i&&window.ChamStats.sendData("roomscene",i.spec),!1),c=!1;F(document).on("keydown",function(e){null==window.disableChamVizTesting&&(17==e.which&&(l=!0),16==e.which&&(c=!0),49==e.which&&1==l&&1==c&&(e.preventDefault(),x.applyRealWorld.call(o,{sel:165644}),c=l=!1),50==e.which&&1==l&&1==c&&(e.preventDefault(),x.applyRealWorld.call(o,{sel:165653}),c=l=!1),51==e.which)&&1==l&&1==c&&(e.preventDefault(),x.applyRealWorld.call(o,{sel:142745}),c=l=!1)}).on("keyup",function(e){17==e.which&&(l=!1),16==e.which&&(c=!1)}),null==window.ChamStats&&((s=document.createElement("script")).src="//ca.chameleonpower.com/stats.js",document.head.appendChild(s))})}})}(jQuery),"undefined"==typeof Viz&&(Viz={}),Viz.combineSels=function(e,t){if(void 0===t)return e;for(var r=e.split(","),n=t.split(","),o=-1,i=r.length;++o<i;)"-1"==r[o]&&"-1"!=n[o]&&null!=n[o]&&(r[o]=n[o]);return r.join(",")},Viz.sel={parseToSurfaceArray:function(e){var t=[],r=0;return tmp="",e.replace(/./g,function(e){return" "!=e&&(","==e&&0==r?(t.push(tmp),tmp=""):(tmp+=e,"("==e&&r++,")"==e&&r--)),e}),t.push(tmp),t},isEmpty:function(e){return null==e||(e=String(e).replace(/^\s*|\s*$/g,"")).length<1||"-1"==e},merge:function(e,t){for(var r=this.parseToSurfaceArray(e),n=this.parseToSurfaceArray(t),o=[],i=0,s=r.length;i<s;++i)void 0===r[i]||"-1"==r[i]?o.push(n[i]||"-1"):o.push(r[i]);return o},asArray:function(e){e=(e=String(e)).match(/[0-9|-]+/g);return null==e?[]:e}},Viz.windowSel={gridFrame:160013,createEmpty:function(e){if(null==e)return this.gridFrame+"(4389,-1,-1)";var t=[];for(t[0]=this.gridFrame;e--;)t.push("-1");return this.asSel(t)},asArray:function(e){e=(e=String(e)).match(/[0-9|-]+/g);return null==e?[]:e},asSel:function(e){var t;return!(t=e)||t.propertyIsEnumerable("length")||"object"!=typeof t||"number"!=typeof t.length||e.length<1?"":sel=e[0]+"("+e.slice(1).join(",")+")"},isEmpty:function(e){return null==e||(e=String(e).replace(/^\s*|\s*$/g,"")).length<1||"-1"==e},replacePattern:function(e,t,r){this.isEmpty(e)&&(e=this.createEmpty(r));r=this.asArray(e);return r[0]=t,this.asSel(r)},removePattern:function(e){return e.replace(/\d+\(/,"").replace(")","")},getPatternId:function(e){return this.isEmpty(e)&&(e=this.createEmpty(null)),this.asArray(e)[0]},getShutter:function(e){this.isEmpty(e)&&(e=this.createEmpty(null));e=this.asArray(e);return e[e.length-1]},replaceWindow:function(e,t){var r=this,e=(r.isEmpty(e)&&(e=r.createEmpty(null)),r.asArray(e));return(e=1==e.length?r.asArray(r.createEmpty(null)):e)[1]=t,r.asSel(e)},replaceShutter:function(e,t,r){var n=this,o=(n.isEmpty(e)&&(e=n.createEmpty()),n.asArray(e));if(1==o.length&&(i=n.createEmpty(),e=n.replaceWindow(i,e),o=n.asArray(e)),4!=o.length)throw new Error("invalid sel = "+e);var i=o.length-1;return o[i--]=t,o[i]=r,n.asSel(o)}},Viz.tileSel={createEmpty:function(e){if(null==e)return"148991(-1,1439,147607,-1)";var t=[];for(t[0]=1384;e--;)t.push("-1");return t.push(1439),t.push(147607),t.push(-1),this.asSel(t)},asArray:function(e){e=(e=String(e)).match(/[0-9|-]+/g);return null==e?[]:e},asSel:function(e){var t;return!(t=e)||t.propertyIsEnumerable("length")||"object"!=typeof t||"number"!=typeof t.length||e.length<1?"":sel=e[0]+"("+e.slice(1).join(",")+")"},isEmpty:function(e){return null==e||(e=String(e).replace(/^\s*|\s*$/g,"")).length<1||"-1"==e},isPattern:function(e){return-1<String(e).indexOf("(")},patternTiles:[],replacePattern:function(e,t,r,n,o){var i=this;if(i.isPattern(e)||(e=null),i.isEmpty(e))e=i.createEmpty(r),(s=i.asArray(e))[0]=t,null!=o&&(i.patternTiles[n]=o);else{(s=i.asArray(e))[0]=t;var s,r=i.patternTiles[n];if(void 0!==(r=null==r?Array(s.length-4).join("12x12,").slice(0,-1):r)&&null!=o){var a=r.split(","),l=o.split(","),c=s.slice(0);if(a.length<l.length)for(var u=l.length-a.length+1;--u;)c.splice(a.length+1,0,"-1");else a.length>l.length&&(u=a.length-l.length,e=c,t=l.length+1,r=l.length+u,r=e.slice((r||t)+1||e.length),e.length=t<0?e.length+t:t,e.push.apply(e,r));for(var d=1,p=c.length-3;d<p;d++)c[d]="-1";for(var f=-1,h=l.length;++f<h;)for(var m=0,p=a.length;m<p;m++)l[f]==a[m]&&(c[f+1]=s[m+1]);s=c}i.patternTiles[n]=o}return i.asSel(s)},getPatternId:function(e){return this.isPattern(e)||(e=null),this.isEmpty(e)&&(e=this.createEmpty(numerOfTiles)),this.asArray(e)[0]},replaceTile:function(e,t,r){var n=this;if(null==r)throw new Error("index was not provided");n.isPattern(e)||(e=null),n.isEmpty(e)&&(e=n.createEmpty());e=n.asArray(e);if(r=parseInt(r),e.length<=r+1||r<0)throw new Error("invalid index = "+r);return e[r]=t,n.asSel(e)},replaceGrout:function(e,t){var r=this,n=(r.isPattern(e)||(e=null),r.isEmpty(e)&&(e=r.createEmpty()),r.asArray(e));if(n.length<4)throw new Error("invalid sel = "+e);return n[n.length-3]=t,r.asSel(n)},getGrout:function(e){this.isPattern(e)||(e=null),this.isEmpty(e)&&(e=this.createEmpty());e=this.asArray(e);return e[e.length-3]},replaceGroutWidth:function(e,t){var r=this,n=(r.isPattern(e)||(e=null),r.isEmpty(e)&&(e=r.createEmpty()),r.asArray(e));if(n.length<3)throw new Error("invalid sel = "+e);return n[n.length-2]=t,r.asSel(n)},getGroutWidth:function(e){this.isPattern(e)||(e=null),this.isEmpty(e)&&(e=this.createEmpty());e=this.asArray(e);return e[e.length-2]},nextRotation:function(e){return 254259==e?{r:0,sel:"-1"}:254258==e?{r:315,sel:254259}:254257==e?{r:270,sel:254258}:254256==e?{r:225,sel:254257}:254255==e?{r:180,sel:254256}:254254==e?{r:135,sel:254255}:254253==e?{r:90,sel:254254}:254252==e||"-1"==e?{r:45,sel:254253}:{r:0,sel:"-1"}},replaceRotation:function(e,t){var r=this,n=(r.isPattern(e)||(e=null),r.isEmpty(e)&&(e=r.createEmpty()),r.asArray(e));if(n.length<3)throw new Error("invalid sel = "+e);return n[n.length-1]=t,r.asSel(n)},getRotation:function(e){this.isPattern(e)||(e=null),this.isEmpty(e)&&(e=this.createEmpty());e=this.asArray(e);return e[e.length-1]}},Viz.scale={toScale:function(e){parseInt(e);return e-360400},toSel:function(e){e=parseInt(e);return 360400+(e=400<(e=e<1?1:e)?400:e)}},!function(f){f.fn.extend({MyProjects:function(r){var e,n,p={listOptions:function(e){var t=[];return this.each(function(){t=jQuery.data(this,"options")}),t},listSaveOptions:function(e){var t=[];return this.each(function(){t=jQuery.data(this,"saveOptions")}),t},ClearAllCookies:function(){f.removeCookie("UserID"),f.removeCookie("SiteID"),f.removeCookie("email"),f.removeCookie("UserID",{domain:".chameleonpower.com",path:"/"}),f.removeCookie("SiteID",{domain:".chameleonpower.com",path:"/"}),f.removeCookie("email",{domain:".chameleonpower.com",path:"/"})},checkCookieAuth:function(e){var t=!1,r=f(this).data("options"),n=null!=f.cookie("UserID"),o=null!=f.cookie("SiteID"),i=null!=f.cookie("email");return(t=n&&(t=!0,o&&(t=!0,f.cookie("SiteID")==r.siteid)||(t=!1),i)?t:!1)||p.ClearAllCookies(),f(this).data("loggedIn",t),t},checkLoggedIn:function(e){var t=[];return this.each(function(){t=jQuery.data(this,"loggedIn")}),t},logout:function(t){this.each(function(){var e=jQuery.data(this,"options");p.processAjax.call(e.ModalContainer,{sendData:{action:"logout",SiteID:e.siteid}}),p.addSaveOptions.call(e.ModalContainer,{specifier:"",sel:"",projectname:""}),e.ModalContent.find("div.projectsForm div.projectWrapper").html(""),null!=window.ChamStats&&window.ChamStats.sendData("logout",t.email)})},login:function(t){this.each(function(){var e=jQuery.data(this,"options");(e.IntegratedLogin||p.ValidateForm.call(e.ModalContainer,{form:".loginForm"}))&&p.processAjax.call(e.ModalContainer,{sendData:{action:"login",email:t.email,password:t.password,SiteID:e.siteid}})})},register:function(t){this.each(function(){var e=jQuery.data(this,"options");p.ValidateForm.call(e.ModalContainer,{form:".regForm"})&&(null!=window.ChamStats&&window.ChamStats.sendData("register",t.email),e.UseCustomRegistration?console.warn("Custom Registration Setup has not been completed yet."):(jQuery.data(e.ModalContainer,"returnMeTo","regform"),p.processAjax.call(e.ModalContainer,{showMe:"regform",sendData:{action:"register",email:t.email,password:t.password,FName:t.fName,LName:t.lName,Address:t.address,SiteID:e.siteid}})))})},forgot:function(t){this.each(function(){var e=jQuery.data(this,"options");p.ValidateForm.call(e.ModalContainer,{form:".forgotForm"})&&(null!=window.ChamStats&&window.ChamStats.sendData("forgotPassword","1"),p.processAjax.call(e.ModalContainer,{showMe:"forgotform",sendData:{action:"forgot",email:t.email}}))})},changePassword:function(r){this.each(function(){var e=jQuery.data(this,"options"),t=(jQuery.data(this,"loggedIn",p.checkCookieAuth.call(e.ModalContainer)),jQuery.data(this,"saveOptions"),void 0!==f.cookie("UserID")?f.cookie("UserID"):jQuery.data(this,"currentUserID"));p.ValidateForm.call(e.ModalContainer,{form:".changeForm"})&&(null!=window.ChamStats&&window.ChamStats.sendData("changePassword","1"),p.processAjax.call(e.ModalContainer,{sendData:{action:"changepwd",UserID:t,oldPWD:r.oldPassword,newPWD:r.newPassword}}))})},processAjax:function(l){this.each(function(){var s=jQuery.data(this,"options"),e=(jQuery.data(this,"loggedIn",p.checkCookieAuth.call(s.ModalContainer)),jQuery.data(this,"saveOptions")),o=jQuery.data(this,"returnMeTo"),i=jQuery.data(this,"redirect"),e=""!=e.specifier&&""!=e.sel&&""!=e.projectname||""!=e.specifier||""!=e.sel?{SiteID:s.siteid,specifier:e.specifier,sel:e.sel,projectname:e.projectname,thumbsize:s.ThumbnailSize,UseCustom:s.UseCustomRegistration,guid:s.sessionId,aux1:e.aux1,aux2:e.aux2,useinteg:s.IntegratedLogin,useintegim:s.IntegratedIM}:{SiteID:s.siteid,thumbsize:s.ThumbnailSize,UseCustom:s.UseCustomRegistration,guid:s.sessionId,useinteg:s.IntegratedLogin,useintegim:s.IntegratedIM},a=f.extend(l.sendData,e);f.ajax({url:s.MyProjectsUtils,data:a,async:!1,method:"POST",success:function(e,t,r){var n="True"==r.getResponseHeader("LoggedIn");jQuery.data(this,"loggedIn",p.checkCookieAuth.call(s.ModalContainer)),l.srid=r.getResponseHeader("SRID"),jQuery.data(this,"SRID",l.srid),"login"==l.action&&null!=window.ChamStats&&window.ChamStats.sendData("login",l.email),"function"==typeof i?i.call(s.ModalContainer):void 0!==i?window.location=i:(l.showMe=void 0!==o?n?"projectsform":"loginform":o,n&&s.ModalContent.find("div.projectsForm").html(e),"remove"!=l.action&&p.showHideContainers.call(s.ModalContainer,l),"list"!=a.action&&"login"!=a.action||""==a.specifier||null==a.specifier||s.saveComplete.call(s.ModalContainer,a))},error:function(e,t,r){var n=e.getResponseHeader("Error"),o="True"==e.getResponseHeader("ChangeRequired"),i=e.getResponseHeader("ChangeUserID");o?(jQuery.data(s.ModalContainer,"currentUserID",i),l.changeUserID=i,l.showMe="changeform",p.showHideContainers.call(s.ModalContainer,l)):(o="True"==e.getResponseHeader("LoggedIn"),jQuery.data(this,"loggedIn",p.checkCookieAuth.call(s.ModalContainer)),l.showMe=o?"projectsform":"loginform",p.showHideContainers.call(s.ModalContainer,l),f.each(s.forms,function(e,t){t.is(":visible")&&(t.find("div.errors").html(n),p.CheckForMessages.call(s.ModalContainer,{form:t}))}))}}),p.addSaveOptions.call(s.ModalContainer,{specifier:"",sel:"",projectname:""})})},open:function(r){this.each(function(){var t=jQuery.data(this,"options"),e=jQuery.data(this,"loggedIn",p.checkCookieAuth.call(t.ModalContainer));if(e&&void 0!==r.redirect)return window.location=r.redirect,!1;t.ModalContainer.show("fade"),r.showMe||(r.showMe=e?"projectsform":"loginform"),void 0!==r.redirect&&jQuery.data(this,"redirect",r.redirect),p.showHideContainers.call(t.ModalContainer,r),f("html, body").off("scroll touchmove mousewheel").on("scroll touchmove mousewheel",function(e){if(0===f(e.target).parents(".MyProjectsInner ").length&&0===t.ModalInner.has(e.target).length&&t.ModalInner[0]!==e.target&&t.ModalContainer.is(":visible"))return e.preventDefault(),e.stopPropagation(),!1}).css({overflow:"hidden"})})},close:function(e){this.each(function(){var e=jQuery.data(this,"options"),t=jQuery.data(this,"loggedIn",p.checkCookieAuth.call(e.ModalContainer));e.RequireLogin?t&&e.ModalContainer.hide("fade"):e.RequireLogin||e.ModalContainer.hide("fade"),f("html, body").removeAttr("style").off("scroll touchmove mousewheel"),p.addSaveOptions.call(e.ModalContainer,{specifier:"",sel:"",projectname:""})})},showHideContainers:function(n){this.each(function(){n.changeUserID&&jQuery.data(this,"currentUserID",parseInt(n.changeUserID));var r=jQuery.data(this,"options"),e=jQuery.data(this,"loggedIn",p.checkCookieAuth.call(r.ModalContainer));f.each(r.forms,function(e,t){f(t).not(r.forms[n.showMe]).hide(),f(r.forms[n.showMe]).show(),-1<n.showMe.indexOf("regform")&&f(r.forms[n.showMe]).parent().show(),f(r.forms[n.showMe]).find("div.errors").html("&nbsp;").hide(),f(r.forms[n.showMe]).find("div.success").html("&nbsp;").hide(),f(r.forms[n.showMe]).is(":visible")&&"projectsform"==n.showMe&&f(r.forms[n.showMe]).find("div.projectWrapper:last").css("margin-bottom",0)}),r.RequireLogin?e?r.ModalContainer.find(".titleBarBTNS .buttons").fadeIn():r.ModalContainer.find(".titleBarBTNS .buttons").fadeOut():r.RequireLogin||(e?r.ModalContainer.find(".titleBarBTNS .buttons").fadeIn():(r.ModalContainer.find(".titleBarBTNS .logoutBTN").fadeOut(),r.ModalContainer.find(".titleBarBTNS .goToChangeBTN").fadeOut())),p.CheckVisible.call(r.ModalContainer)})},CheckVisible:function(e){this.each(function(){var r=jQuery.data(this,"options");jQuery.data(this,"loggedIn",p.checkCookieAuth.call(r.ModalContainer));f.each(r.forms,function(e,t){t.is(":visible")&&p.clicks.call(r.ModalContainer,{clickType:e})}),r.ModalContainer.find("div.titleBarBTNS div.closeBTN").off("click").on("click",function(e){p.close.call(r.ModalContainer)}),r.ModalContainer.off("click").on("click",function(e){0!==f(e.target).parents(".MyProjectsInner ").length||0!==r.ModalInner.has(e.target).length||r.ModalInner[0]===e.target||!r.ModalContainer.is(":visible")||f(e.target).hasClass("Remove")||p.close.call(r.ModalContainer)}),r.ModalContainer.find("div.titleBarBTNS div.logoutBTN").off("click").on("click",function(e){p.logout.call(r.ModalContainer)}),r.ModalContainer.find("div.titleBarBTNS div.goToChangeBTN").off("click").on("click",function(e){p.showHideContainers.call(r.ModalContainer,{showMe:"changeform"})})})},showSave:function(n){this.each(function(){var e=jQuery.data(this,"options"),t=jQuery.data(this,"saveOptions"),r=(jQuery.data(this,"loggedIn",p.checkCookieAuth.call(e.ModalContainer)),n.projectname&&f.extend(t,{projectname:n.projectname}),n.sel&&f.extend(t,{sel:n.sel}),e.spec);n.specifier?r=n.specifier:n.spec&&(r=n.spec),f.extend(t,{specifier:r}),n.aux1&&f.extend(t,{aux1:n.aux1}),n.aux2&&f.extend(t,{aux2:n.aux2}),jQuery.data(this,"saveOptions",t),jQuery.data(this,"returnMeTo");jQuery.data(this,"returnMeTo","showSave"),null!=window.ChamStats&&window.ChamStats.sendData("showSave","1"),p.open.call(e.ModalContainer,{showMe:"saveform"})})},save:function(o){this.each(function(){var e,t=jQuery.data(this,"options"),r=jQuery.data(this,"saveOptions"),n=jQuery.data(this,"loggedIn",p.checkCookieAuth.call(t.ModalContainer));(p.ValidateForm.call(t.ModalContainer,{form:".saveForm"})||o.autosave)&&(e=r,o.projectname&&f.extend(e,{projectname:o.projectname}),o.sel&&f.extend(e,{sel:o.sel}),r=r.specifier,o.specifier?r=o.specifier:o.spec&&(r=o.spec),null!=window.ChamStats&&window.ChamStats.sendData("save","spec="+r+"&sel="+e.sel),f.extend(e,{specifier:r}),o.aux1&&f.extend(e,{aux1:o.aux1}),o.aux2&&f.extend(e,{aux2:o.aux2}),jQuery.data(this,"saveOptions",e),n?(o.showMe="projectsform",p.processAjax.call(t.ModalContainer,{sendData:{action:"list"}})):o.showMe="loginform",p.showHideContainers.call(t.ModalContainer,o),p.CheckForMessages.call(t.ModalContainer,{form:".saveForm"}))})},showModal:function(e){this.each(function(){var t=jQuery.data(this,"options");jQuery.data(this,"loggedIn",p.checkCookieAuth.call(t.ModalContainer)),jQuery.data(this,"saveOptions"),jQuery.data(this,"returnMeTo");t.ModalContainer.fadeIn(),f("html, body").off("scroll touchmove mousewheel").on("scroll touchmove mousewheel",function(e){if(0===f(e.target).parents(".MyProjectsInner ").length&&0===t.ModalInner.has(e.target).length&&t.ModalInner[0]!==e.target&&t.ModalContainer.is(":visible"))return e.preventDefault(),e.stopPropagation(),!1}).css({overflow:"hidden"})})},clicks:function(r){this.each(function(){var d=jQuery.data(this,"options"),e=(jQuery.data(this,"loggedIn",p.checkCookieAuth.call(d.ModalContainer)),jQuery.data(this,"saveOptions")),o=0!=jQuery.data(this,"currentUserID")?jQuery.data(this,"currentUserID"):f.cookie("UserID"),t={},i=e.specifier,s=e.sel,a=e.projectname;return t.changeform=function(e){var t=f(document.getElementById("OldPassword")),r=f(document.getElementById("NewPassword")),n=f(document.getElementById("ConfirmNewPassword"));d.ModalContainer.find(t).off("keydown").on("keydown",function(e){13==e.which&&(p.changePassword.call(d.ModalContainer,{UserID:o,oldPassword:t.val(),newPassword:r.val(),newConfirmPassword:n.val()}),t.val(""),r.val(""),n.val(""))}),d.ModalContainer.find(r).off("keydown").on("keydown",function(e){13==e.which&&(p.changePassword.call(d.ModalContainer,{UserID:o,oldPassword:t.val(),newPassword:r.val(),newConfirmPassword:n.val()}),t.val(""),r.val(""),n.val(""))}),d.ModalContainer.find(n).off("keydown").on("keydown",function(e){13==e.which&&(p.changePassword.call(d.ModalContainer,{UserID:o,oldPassword:t.val(),newPassword:r.val(),newConfirmPassword:n.val()}),t.val(""),r.val(""),n.val(""))}),d.ModalContainer.find("div.changePwdBTN").off("click").on("click",function(e){p.changePassword.call(d.ModalContainer,{UserID:o,oldPassword:t.val(),newPassword:r.val(),newConfirmPassword:n.val()}),t.val(""),r.val(""),n.val("")})},t.loginform=function(e){f("input[type='text']:visible:enabled:first").focus();var n=f(document.getElementById("loginEmail")),o=f(document.getElementById("loginPassword"));d.ModalContainer.find(o).off("keydown").on("keydown",function(e){var t;13==e.which&&(e=n.val(),t=o.val(),p.login.call(d.ModalContainer,""!=i&&""!=s&&""!=a?{email:e,password:t,specifier:i,sel:s,projectname:a}:{email:e,password:t}),n.val(""),o.val(""))}),d.ModalContainer.find("div.loginBTN").off("click").on("click",function(e){var t=n.val(),r=o.val(),t=""!=i&&""!=s&&""!=a?{email:t,password:r,specifier:i,sel:s,projectname:a}:{email:t,password:r,thumbsize:d.ThumbnailSize};p.login.call(d.ModalContainer,t),n.val(""),o.val("")}),d.ModalContainer.find("div.gotoForgotBTN").off("click").on("click",function(e){p.showHideContainers.call(d.ModalContainer,{showMe:"forgotform"})}),d.ModalContainer.find("div.gotoRegBTN").off("click").on("click",function(e){p.showHideContainers.call(d.ModalContainer,{showMe:"regform"})}),d.ModalContainer.find("div.titleBarBTNS div.closeBTN").off("click").on("click",function(e){p.showHideContainers.call(d.ModalContainer)}),0<f("#my-projects input[type='text']").length&&f("#my-projects input[type='text']").get(0).focus()},t.regform=function(){d.ModalContent.find("div.projectsForm div.projectWrapper").html(""),f("input[type='text']:visible:enabled:first").focus();e.specifier,e.sel,e.projectname;var s=f(document.getElementById("RegEmail")),a=f(document.getElementById("RegPassword")),l=f(document.getElementById("RegFName")),c=f(document.getElementById("RegLName")),u=f(document.getElementById("RegAddress"));d.ModalContainer.find("div.regBTN").off("click").on("click",function(e){var t=s.val(),r=a.val(),n=l.val(),o=c.val(),i=u.val();p.register.call(d.ModalContainer,{email:t,password:r,fName:n,lName:o,address:i}),s.val(""),a.val(""),l.val(""),c.val(""),u.val("")}),d.ModalContainer.find("div.gotoLoginBTN").off("click").on("click",function(e){p.showHideContainers.call(d.ModalContainer,{showMe:"loginform"})}),d.ModalContainer.find("div.titleBarBTNS div.closeBTN").off("click").on("click",function(e){p.showHideContainers.call(d.ModalContainer)}),d.ModalContainer.find("div.gotoForgotBTN").off("click").on("click",function(e){p.showHideContainers.call(d.ModalContainer,{showMe:"forgotform"})})},t.forgotform=function(){f("input[type='text']:visible:enabled:first").focus();var r=f(document.getElementById("txtForgotEmail"));d.ModalContainer.find("div.forgotBTN").off("click").on("click",function(e){var t=r.val();p.forgot.call(d.ModalContainer,{email:t}),r.val("")}),d.ModalContainer.find(r).off("keydown").on("keydown",function(e){13==e.which&&(e=f(this).val(),p.forgot.call(d.ModalContainer,{email:e}),f(this).val(""))}),d.ModalContainer.find("div.gotoLoginBTN").off("click").on("click",function(e){p.showHideContainers.call(d.ModalContainer,{showMe:"loginform"})}),d.ModalContainer.find("div.gotoRegBTN").off("click").on("click",function(e){p.showHideContainers.call(d.ModalContainer,{showMe:"regform"})})},t.saveform=function(){f("input[type='text']:visible:enabled:first").focus();var r=d.spec,n=e.sel,o=f(document.getElementById("SaveProjectName"));d.ModalContainer.find(o).off("keydown").on("keydown",function(e){13==e.which&&(e=jQuery.trim(f(this).val()),p.save.call(d.ModalContainer,{specifier:r,sel:n,projectname:e}),f(this).val(""))}),d.ModalContainer.find("div.saveBTN").off("click").on("click",function(e){var t=jQuery.trim(o.val());p.save.call(d.ModalContainer,{specifier:r,sel:n,projectname:t}),o.val("")})},t.projectsform=function(){p.addSaveOptions.call(d.ModalContainer,{specifier:"",sel:"",projectname:""}),d.ModalContainer.find("div.projectWrapper:last").css("margin-bottom",0),d.ModalContainer.find("img.savedRender").each(function(){var e=f(this).attr("src").replace("Size=128","Size="+d.ThumbnailSize);f(this).css("width",d.ThumbnailSize).attr("src",e)}),d.ModalContainer.find("li.Use").off("click").on("click",function(e){var t=f(this).attr("data-spec"),r=f(this).attr("data-sel"),n=f(this).attr("data-srid"),o=f(this).attr("data-imid"),i=f(this).attr("data-imid3"),s=f(this).attr("data-action"),a=f(this).attr("data-aux1"),l=f(this).attr("data-aux2"),t={spec:t,sel:r};"0"!=n&&f.extend(t,{SRID:n}),"0"!=o&&f.extend(t,{IMID:o}),"0"!=i&&f.extend(t,{IMID3:i}),a&&f.extend(t,{Aux1:a}),l&&f.extend(t,{Aux2:l}),t.action=s,p.use.call(d.ModalContainer,t)}),d.ModalContainer.find("li.Remove").off("click").on("click",function(e){var t=f(this).attr("data-srid"),r=f(this).attr("data-imid"),n=f(this).attr("data-imid3"),o=f(this).attr("data-spec"),i=f(this).attr("data-action");return p.remove.call(d.ModalContainer,{SRID:t,IMID:r,IMID3:n,action:i,spec:o})})},!(!r.clickType||!f.isFunction(t[r.clickType]))&&t[r.clickType].call(d.ModalContainer,r)})},remove:function(r){this.each(function(){var e=jQuery.data(this,"options"),t={action:"remove"};r.SRID&&f.extend(t,{SRID:r.SRID}),r.IMID&&f.extend(t,{IMID:r.IMID}),r.IMID3&&f.extend(t,{IMID3:r.IMID3}),r.custom&&f.extend(t,{customUI:r.custom}),p.processAjax.call(e.ModalContainer,{sendData:t}),e.RemoveProjectHandler.call(e.ModalContainer,r.SRID,r.IMID,r.IMID3,r.action,r.spec)})},use:function(s){this.each(function(){var e=jQuery.data(this,"options"),t=s.SRID||0,r=s.IMID||0,n=s.IMID3||0,o=s.Aux1||"",i=s.Aux2||"";e.UseProjectHandler.call(e.ModalContainer,s.spec,s.sel,t,r,n,s.action,o,i)})},addSaveOptions:function(r){return this.each(function(){var e={specifier:r.specifier,sel:r.sel,projectname:r.projectname},t=jQuery.data(this,"saveOptions"),t=f.extend(t,e);jQuery(this,"saveOptions",t)})}};return p.ValidateForm=function(s){var a=!0;return this.each(function(){for(var e=jQuery.data(this,"options"),t=e.ModalContainer.find(s.form),r=(t.find("div.errors").html("&nbsp;"),t.find(":input").toArray()),n=[],o=0;o<r.length;o++){var i=f(r[o]);!function(e){if(e.val(jQuery.trim(e.val())),e.is(":visible")){void 0===(r=e.attr("data-validation"))&&e.attr("data-validation","");var t,r=e.attr("data-validation"),n=jQuery.trim(e.val());if(-1<r.indexOf("required")&&""==n)return!1;if(-1<r.indexOf("oldnewpwd"))return n!=f(document.getElementById(e.attr("data-new"))).val();if(-1<r.indexOf("confirm"))return n==f(document.getElementById(e.attr("data-confirm-with"))).val();if(""!=n){if(-1<r.indexOf("email")){for(var o=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,i=!0,s=n.replace(",",";"),a=s.split(";"),l=0;l<a.length;l++)if(s=a[l],!o.test(s)){i=!1;break}return i}if(-1<r.indexOf("numeric"))return t=n,!isNaN(parseFloat(t))&&isFinite(t);if(-1<r.indexOf("ProjectName"))return"Untitled Project"!=(t=n)}}return!0}(i)&&(n.push(i.attr("data-validation-msg")),a=!1)}a||t.find("div.errors").html(n.join("<br />")),p.CheckForMessages.call(e.ModalContainer,{form:t})}),a},p.CheckForMessages=function(t){this.each(function(){var e=jQuery.data(this,"options");"&nbsp;"!=e.ModalContent.find(t.form).find("div.success").html()?e.ModalContent.find("div.success").show().fadeOut(2e3,function(){f(this).html("&nbsp;")}):e.ModalContent.find(t.form).find("div.success").hide(),"&nbsp;"==e.ModalContent.find(t.form).find("div.errors").html()?e.ModalContent.find(t.form).find("div.errors").hide():e.ModalContent.find(t.form).find("div.errors").show()})},p.createGUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},r.action?f.isFunction(p[r.action])?p[r.action].call(this,r):console.warn("The "+r.action+" API Action Request does not exist"):(e={ModalTitle:"My Visualizations",ModalContainer:void 0,ModalInner:void 0,ModalContent:void 0,VizContainer:void 0,MyProjectsHTML:"/ChamWebTools/MyProjects/1/MyProjectsHTML.ashx",MyProjectsUtils:"/ChamWebTools/MyProjects/1/MyProjectsUtils.ashx",MyProjectsBaseCSS:"/ChamWebTools/MyProjects/1/MyProjects.css",forms:{loginform:"loginForm",regform:"regForm",forgotform:"forgotForm",saveform:"saveForm",projectsform:"projectsForm",changeform:"changeForm"},siteid:"",spec:"",modalWidth:590,modalHeight:530,ThumbnailSize:128,UseCustomRegistration:!1,RequireLogin:!1,Draggable:!1,IntegratedLogin:!1,IntegratedIM:!1,UseProjectHandler:function(e,t,r,n,o,i,s,a){},RemoveProjectHandler:function(e,t,r,n,o){},saveComplete:function(e){},loginComplete:function(e){}},r.sessionId=p.createGUID(),r=f.extend(e,r),n=f.extend({specifier:"",sel:"",projectname:""},{specifier:"",sel:"",projectname:""}),this.each(function(){r.ModalContainer=f(this).addClass("MyProjects").hide(),r.ModalContainer.empty(),r.ModalInner=f("<div/>").addClass("MyProjectsInner").css({width:r.modalWidth}).appendTo(f(this)),0<f("head").find("link.myProjectsBase").length&&f("head").find("link.myProjectsBase").remove(),f("head").append('<link rel="stylesheet" href="'+r.MyProjectsBaseCSS+"?v"+r.sessionId+'" class="myProjectsBase" />');var t,e=[];e.push("<h2>"+r.ModalTitle+"</h2>"),e.push('<div class="titleBarBTNS">'),r.IntegratedLogin||e.push('<div class="buttons goToChangeBTN">Change Password?</div>'),r.IntegratedLogin||e.push('<div class="buttons logoutBTN">Log Out</div>'),e.push('<div class="buttons closeBTN logged">&times;</div>'),e.push("</div>"),f("<div/>").addClass("TitleBar").html(e.join("")).appendTo(r.ModalInner),r.ModalContent=f("<div/>").addClass("Content").appendTo(r.ModalInner),r.Draggable&&r.ModalInner.addClass("ui-widget-content").addClass("Draggable").draggable({cursor:"url(/ChamWebTools/MyProjects/1/grabbing.png) 8 8, move",handle:".TitleBar h2",containment:r.ModalContainer}),t=r,f.ajax({url:t.MyProjectsHTML,async:!1,data:{SiteID:t.siteid,UseCustom:t.UseCustomRegistration,thumbsize:t.ThumbnailSize,useintegim:t.IntegratedIM,guid:t.sessionId},success:function(e){t.ModalContent.html(e),f.extend(!0,t.forms,{loginform:t.ModalContent.find(".loginForm"),regform:t.ModalContent.find(".regForm"),forgotform:t.ModalContent.find(".forgotForm"),saveform:t.ModalContent.find(".saveForm"),projectsform:t.ModalContent.find(".projectsForm"),changeform:t.ModalContent.find(".changeForm")})}}),jQuery.data(this,"options",r),jQuery.data(this,"loggedIn",p.checkCookieAuth.call(r.ModalContainer)),jQuery.data(this,"saveOptions",n),jQuery.data(this,"returnMeTo","undefined"),jQuery.data(this,"currentUserID",0),r.RequireLogin&&!p.checkCookieAuth.call(r.ModalContainer)&&p.open.call(r.ModalContainer,{showMe:"loginform"}),null==window.ChamStats&&((e=document.createElement("script")).src="//ca.chameleonpower.com/stats.js",document.head.appendChild(e))}))}})}(jQuery),!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(d){function p(e){return h.raw?e:encodeURIComponent(e)}function f(e,t){e=h.raw?e:function(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{e=decodeURIComponent(e.replace(r," "))}catch(e){return}try{return h.json?JSON.parse(e):e}catch(e){}}(e);return d.isFunction(t)?t(e):e}var r=/\+/g,h=d.cookie=function(e,t,r){var n,o;if(void 0!==t&&!d.isFunction(t))return"number"==typeof(r=d.extend({},h.defaults,r)).expires&&(n=r.expires,(o=r.expires=new Date).setDate(o.getDate()+n)),document.cookie=[p(e),"=",(o=t,p(h.json?JSON.stringify(o):String(o))),r.expires?"; expires="+r.expires.toUTCString():"",r.path?"; path="+r.path:"",r.domain?"; domain="+r.domain:"",r.secure?"; secure":""].join("");for(var i=e?void 0:{},s=document.cookie?document.cookie.split("; "):[],a=0,l=s.length;a<l;a++){var c=s[a].split("="),u=(u=c.shift(),h.raw?u:decodeURIComponent(u)),c=c.join("=");if(e&&e===u){i=f(c,t);break}e||void 0===(c=f(c))||(i[u]=c)}return i};h.defaults={},d.removeCookie=function(e,t){return void 0!==d.cookie(e)&&(d.cookie(e,"",d.extend({},t,{expires:-1})),!0)}}),function(){var r={viz:null,container:null,socialcontainer:null,scriptContainer:null,fbRootContainer:null,fbIframeContainer:null,metaURL:null,metaFBAppID:null,metaImage:null,metaTitle:null,metaPTTitle:null,metaSiteName:null,metaLocale:null,metaType:null,metaName:null,metaDescription:null,metaGPlusDescription:null,metaGPlusName:null,metaGPlusImage:null,fbLink:null,twLink:null,ptLink:null,gplusLink:null,FBUrl:"",QueryString:"",returnURL:"",FBFeedURL:"",TWFeedURL:"",PTFeedURL:"",GPFeedUrl:"",metas:[],renderserver:"",fbImageSize:200,GooglePlusDom:null,metaProperties:{title:"Check out this re-design I did of my house.",PTTitle:"Check out this re-design I did of my house.",type:"website",url:"",image:"",site_name:"",locale:"en_US",fbAppID:"",name:"",description:"",gPlusName:"",gPlusDescription:"",gPlusImage:""},config:{fbAppID:"",imperURL:"",imageURL:"",title:"",pttitle:"",sel:"",spec:"",siteName:"",viz:null,hasGPlus:!1,isFacebookLikeLink:!1,vizSelector:"#visualizer",FBLinkSelector:"#facebookLink",TWLinkSelector:"#twitterLink",PTLinkSelector:"#pinterestLink",GPlusLinkSelector:"#googleplusLink",SocialBTNLoc:"#socialLinks",target:"_blank"}};return{init:function(e){e&&$.extend(r.config,e),r.viz=r.config.viz||$(r.config.vizSelector).ChamViz({action:"test"}),r.config.siteName=r.config.siteName||r.viz.siteid;var t,e=$(r.config.vizSelector).ChamViz({action:"getFullSelString"})||"";r.config.sel=(r.config.sel||e).replace(/ /g,""),r.config.spec=r.config.spec||r.viz.spec,r.renderserver=r.viz.renderserver,r.config.imperURL?-1<r.config.imperURL.indexOf("/")?r.metaProperties.url=r.config.imperURL:r.metaProperties.url=r.config.imperURL+window.location.pathname:r.metaProperties.url=window.location.protocol+"//"+window.location.host+window.location.pathname,r.metaProperties.fbAppID=r.config.fbAppID,r.metaProperties.image=r.renderserver+"GetImage.ashx?Specifier="+encodeURIComponent(r.config.spec)+"&Type=BaseImage&Size="+r.fbImageSize+"&Sel="+r.config.sel+"&SiteID="+r.viz.siteid,r.metaProperties.title=r.config.title,r.metaProperties.PTTitle=r.config.pttitle||r.config.title,r.metaProperties.site_name=r.config.siteName,r.FBUrl=r.metaProperties.url,r.QueryString="?fblink="+(r.config.spec||"").replace(/\\/g,".")+"seln"+r.config.sel,r.returnURL=r.metaProperties.url+r.QueryString,r.returnURL=r.returnURL.replace("#",""),r.config.isFacebookLikeLink?r.FBFeedURL="//www.facebook.com/plugins/like.php?href="+encodeURIComponent(r.returnURL)+"&width&layout=standard&action=like&show_faces=true&share=true&height=35&appId="+r.metaProperties.fbAppID:(e=-1<r.returnURL.indexOf("://")?"":window.location.protocol+"//",e+=encodeURIComponent(r.returnURL),r.FBFeedURL="//www.facebook.com/dialog/feed?app_id="+r.metaProperties.fbAppID+"&link="+encodeURIComponent(r.returnURL)+"&picture="+encodeURIComponent(r.metaProperties.image)+"&name="+r.metaProperties.site_name+"&description="+r.metaProperties.title+"&redirect_uri="+e),r.TWFeedURL="//twitter.com/share?url="+encodeURIComponent(r.returnURL+"&x=1")+"&text="+r.metaProperties.title,r.PTFeedURL="//pinterest.com/pin/create/button/?url="+encodeURIComponent(r.returnURL)+"&media="+encodeURIComponent(r.metaProperties.image)+"&description="+encodeURIComponent(r.metaProperties.PTTitle),r.container=$("head"),r.socialcontainer=$(r.config.SocialBTNLoc),$(r.metaImage).remove(),$(r.metaFBAppID).remove(),$(r.metaLocale).remove(),$(r.metaSiteName).remove(),$(r.metaTitle).remove(),$(r.metaType).remove(),$(r.metaURL).remove(),null==r.scriptContainer&&(r.scriptContainer=$("<script/>",{type:"text/javascript",src:"//connect.facebook.net/"+r.metaProperties.locale+"/all.js?appId="+r.config.fbAppID+"&xfbml=1"}).appendTo(r.container)),0<$(r.fbRootContainer).length&&r.fbRootContainer.remove(),r.fbRootContainer=$("<div/>",{id:"fb-root"}).appendTo("body"),r.metaTitle=$("<meta/>",{id:"facebookTitle",property:"og:title",content:r.metaProperties.title}).appendTo(r.container),r.metas.push(r.metaTitle),r.metaType=$("<meta/>",{id:"contentType",property:"og:type",content:r.metaProperties.type}).appendTo(r.container),r.metas.push(r.metaType),r.metaURL=$("<meta/>",{id:"facebookMetaUrl",property:"og:url",content:r.metaProperties.url}).appendTo(r.container),r.metas.push(r.metaURL),r.metaImage=$("<meta/>",{id:"facebookMetaImage",property:"og:image",content:r.metaProperties.image}).appendTo(r.container),r.metas.push(r.metaImage),r.metaSiteName=$("<meta/>",{id:"Site_Name",property:"og:site_name",content:r.metaProperties.site_name}).appendTo(r.container),r.metas.push(r.metaSiteName),r.metaLocale=$("<meta/>",{id:"siteLocale",property:"og:locale",content:r.metaProperties.locale}).appendTo(r.container),r.metas.push(r.metaLocale),r.metaFBAppID=$("<meta/>",{id:"fbAppID",property:"og:app_id",content:r.metaProperties.fbAppID}).appendTo(r.container),r.metas.push(r.metaFBAppID),r.fbLink=$(r.config.FBLinkSelector),r.twLink=$(r.config.TWLinkSelector),r.ptLink=$(r.config.PTLinkSelector),r.config.isFacebookLikeLink?(r.fbLink.empty(),r.fbIframeContainer=$("<iframe/>",{id:"facebookIframe",src:r.FBFeedURL,scrolling:"no",frameborder:0,allowTransparency:!0}).css({overflow:"hidden",width:400,height:25}).appendTo(r.fbLink)):(r.fbLink.attr("href",r.FBFeedURL),r.fbLink.attr("target",r.config.target),r.fbLink.addClass("ChamStats"),r.fbLink.attr("data-csaction","share"),r.fbLink.attr("data-csdata","Facebook")),r.twLink.attr("href",r.TWFeedURL),r.twLink.attr("target",r.config.target),r.twLink.addClass("ChamStats"),r.twLink.attr("data-csaction","share"),r.twLink.attr("data-csdata","Twitter"),r.ptLink.attr("href",r.PTFeedURL),r.ptLink.attr("target",r.config.target),r.ptLink.attr("target",r.config.target),r.ptLink.addClass("ChamStats"),r.ptLink.attr("data-csaction","share"),r.ptLink.attr("data-csdata","Pinterest"),r.config.hasGPlus&&(window.___gcfg={lang:"us-US",parsetags:"onload"},(e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://apis.google.com/js/platform.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t),r.GPFeedUrl="https://plus.google.com/share?url=",r.gplusLink=$(r.config.GPlusLinkSelector),r.gplusLink.attr({href:r.GPFeedUrl+r.config.imperURL+r.QueryString,"data-href":r.config.imperURL,"data-align":"left","data-width":50,"data-height":50,"data-expandTo":"top"}),r.gplusLink.addClass("ChamStats"),r.gplusLink.attr("data-csaction","share"),r.gplusLink.attr("data-csdata","GooglePlus"),e=[],r.GooglePlusDom=document.createElement("body"),e.push('<span itemprop="name">'+r.metaProperties.title+"</span>"),e.push('<span itemprop="description">'+r.metaProperties.title+"<br />"+r.returnURL+"</span>"),e.push('<img itemprop="image" src="'+r.metaProperties.image+'">'),r.metaGPlusName=$("<meta/>",{class:"googlePlusName",itemprop:"name",content:r.metaProperties.title}).appendTo("head"),r.metas.push(r.metaGPlusName),r.metaGPlusDescription=$("<meta/>",{class:"googlePlusDescription",itemprop:"description",content:r.metaProperties.title+"<br/>"+r.returnURL}).appendTo("head"),r.metas.push(r.metaGPlusDescription),r.metaGPlusImage=$("<meta/>",{class:"googlePlusImage",itemprop:"image",content:r.metaProperties.image}).appendTo("head"),r.metas.push(r.metaGPlusImage),$("<link/>",{rel:"canonical",href:r.metaProperties.image}).appendTo("head"),(t=document.createElement("div")).innerHTML=e.join(""),r.GooglePlusDom.appendChild(t)),null==window.ChamStats&&((e=document.createElement("script")).src="//ca.chameleonpower.com/stats.js",document.head.appendChild(e))},update:function(e){e&&$.extend(r.config,e),r.config.siteName=r.config.siteName||r.viz.siteid,r.config.sel=$(r.config.vizSelector).ChamViz({action:"getFullSelString"}).replace(/ /g,""),r.config.spec=r.config.spec||r.viz.spec,r.renderserver=r.viz.renderserver,r.config.imperURL?-1<r.config.imperURL.indexOf("/")?r.metaProperties.url=r.config.imperURL:r.metaProperties.url=r.config.imperURL+window.location.pathname:r.metaProperties.url=window.location.protocol+"//"+window.location.host+window.location.pathname,r.metaProperties.fbAppID=r.config.fbAppID,r.metaProperties.image=r.renderserver+"GetImage.ashx?Specifier="+r.config.spec+"&Type=BaseImage&Size="+r.fbImageSize+"&Sel="+r.config.sel+"&SiteID="+r.viz.siteid,r.metaProperties.title=r.config.title,r.metaProperties.PTTitle=r.config.pttitle||r.config.title,r.metaProperties.site_name=r.config.siteName,r.FBUrl=r.metaProperties.url,r.QueryString="?fblink="+r.config.spec.replace(/\\/g,".")+"seln"+r.config.sel,r.returnURL=r.metaProperties.url+r.QueryString,r.returnURL=r.returnURL.replace("#",""),r.config.isFacebookLikeLink?(r.FBFeedURL="//www.facebook.com/plugins/like.php?href="+encodeURIComponent(r.returnURL)+"&width&layout=standard&action=like&show_faces=true&share=true&height=35&appId="+r.metaProperties.fbAppID,r.fbIframeContainer.attr("src",r.FBFeedURL)):(e=-1<r.returnURL.indexOf("://")?"":window.location.protocol+"//",e+=encodeURIComponent(r.returnURL),r.FBFeedURL="//www.facebook.com/dialog/feed?app_id="+r.metaProperties.fbAppID+"&link="+encodeURIComponent(r.returnURL)+"&picture="+encodeURIComponent(r.metaProperties.image)+"&name="+r.metaProperties.site_name+"&description="+r.metaProperties.title+"&redirect_uri="+e),r.TWFeedURL="//twitter.com/share?url="+encodeURIComponent(r.returnURL+"&x=1")+"&text="+r.metaProperties.title,r.PTFeedURL="//pinterest.com/pin/create/button/?url="+encodeURIComponent(r.returnURL)+"&media="+encodeURIComponent(r.metaProperties.image)+"&description="+r.metaProperties.PTTitle,$(r.metaTitle).attr("content",r.metaProperties.title),$(r.metaFBAppID).attr("content",r.metaProperties.fbAppID),$(r.metaImage).attr("content",r.metaProperties.image),$(r.metaSiteName).attr("content",r.metaProperties.site_name),$(r.metaURL).attr("content",r.metaProperties.url),r.config.isFacebookLikeLink||(r.fbLink.attr("href",r.FBFeedURL),r.fbLink.attr("target",r.config.target)),r.twLink.attr("href",r.TWFeedURL),r.twLink.attr("target",r.config.target),r.ptLink.attr("href",r.PTFeedURL),r.ptLink.attr("target",r.config.target),r.config.hasGPlus&&(r.gplusLink.attr({href:r.GPFeedUrl+r.config.imperURL+r.QueryString,target:r.config.target}),$(r.metaGPlusName).attr("content",r.metaProperties.title),$(r.metaGPlusDescription).attr("content",r.metaProperties.title),$(r.metaGPlusImage).attr("content",r.metaProperties.image))},NonVizInit:function(e){var t;e&&$.extend(r.config,e),r.config.siteName=r.config.siteName||"",r.config.imperURL?-1<r.config.imperURL.indexOf("/")?r.metaProperties.url=r.config.imperURL:r.metaProperties.url=r.config.imperURL+window.location.pathname:r.metaProperties.url=window.location.protocol+"//"+window.location.host+window.location.pathname,r.metaProperties.fbAppID=r.config.fbAppID,r.metaProperties.image=r.config.imageURL,r.metaProperties.title=r.config.title,r.metaProperties.PTTitle=r.config.pttitle||r.config.title,r.metaProperties.site_name=r.config.siteName,r.FBUrl=r.metaProperties.url,r.returnURL=r.metaProperties.url,r.returnURL=r.returnURL.replace(/#/gi,""),r.config.isFacebookLikeLink?r.FBFeedURL="//www.facebook.com/plugins/like.php?href="+encodeURIComponent(r.returnURL)+"&width&layout=standard&action=like&show_faces=true&share=true&height=35&appId="+r.metaProperties.fbAppID:(e=-1<r.returnURL.indexOf("://")?"":window.location.protocol+"//",e+=encodeURIComponent(r.returnURL),r.FBFeedURL="//www.facebook.com/dialog/feed?app_id="+r.metaProperties.fbAppID+"&link="+encodeURIComponent(r.returnURL)+"&picture="+encodeURIComponent(r.metaProperties.image)+"&name="+r.metaProperties.site_name+"&description="+r.metaProperties.title+"&redirect_uri="+e),r.TWFeedURL="//twitter.com/share?url="+encodeURIComponent(r.returnURL)+"&text="+r.metaProperties.title,r.PTFeedURL="//pinterest.com/pin/create/button/?url="+encodeURIComponent(r.returnURL)+"&media="+encodeURIComponent(r.metaProperties.image)+"&description="+r.metaProperties.PTTitle,r.container=$("head"),r.socialcontainer=$(r.config.SocialBTNLoc),$(r.metaImage).remove(),$(r.metaFBAppID).remove(),$(r.metaLocale).remove(),$(r.metaSiteName).remove(),$(r.metaTitle).remove(),$(r.metaType).remove(),$(r.metaURL).remove(),null==r.scriptContainer&&(r.scriptContainer=$("<script/>",{type:"text/javascript",src:"//connect.facebook.net/"+r.metaProperties.locale+"/all.js?appId="+r.config.fbAppID+"&xfbml=1"}).appendTo(r.container)),0<$(r.fbRootContainer).length&&r.fbRootContainer.remove(),r.fbRootContainer=$("<div/>",{id:"fb-root"}).appendTo("body"),r.metaTitle=$("<meta/>",{id:"facebookTitle",property:"og:title",content:r.metaProperties.title}).appendTo(r.container),r.metas.push(r.metaTitle),r.metaType=$("<meta/>",{id:"contentType",property:"og:type",content:r.metaProperties.type}).appendTo(r.container),r.metas.push(r.metaType),r.metaURL=$("<meta/>",{id:"facebookMetaUrl",property:"og:url",content:r.metaProperties.url}).appendTo(r.container),r.metas.push(r.metaURL),r.metaImage=$("<meta/>",{id:"facebookMetaImage",property:"og:image",content:r.metaProperties.image}).appendTo(r.container),r.metas.push(r.metaImage),r.metaSiteName=$("<meta/>",{id:"Site_Name",property:"og:site_name",content:r.metaProperties.site_name}).appendTo(r.container),r.metas.push(r.metaSiteName),r.metaLocale=$("<meta/>",{id:"siteLocale",property:"og:locale",content:r.metaProperties.locale}).appendTo(r.container),r.metas.push(r.metaLocale),r.metaFBAppID=$("<meta/>",{id:"fbAppID",property:"og:app_id",content:r.metaProperties.fbAppID}).appendTo(r.container),r.metas.push(r.metaFBAppID),r.fbLink=$(r.config.FBLinkSelector),r.twLink=$(r.config.TWLinkSelector),r.ptLink=$(r.config.PTLinkSelector),r.config.isFacebookLikeLink?(r.fbLink.empty(),r.fbIframeContainer=$("<iframe/>",{id:"facebookIframe",src:r.FBFeedURL,scrolling:"no",frameborder:0,allowTransparency:!0}).css({overflow:"hidden",width:400,height:25}).appendTo(r.fbLink)):(r.fbLink.attr("href",r.FBFeedURL),r.fbLink.attr("target",r.config.target),r.fbLink.addClass("ChamStats"),r.fbLink.attr("data-csaction","share"),r.fbLink.attr("data-csdata","Facebook")),r.twLink.attr("href",r.TWFeedURL),r.twLink.attr("target",r.config.target),r.twLink.addClass("ChamStats"),r.twLink.attr("data-csaction","share"),r.twLink.attr("data-csdata","Twitter"),r.ptLink.attr("href",r.PTFeedURL),r.ptLink.attr("target",r.config.target),r.ptLink.addClass("ChamStats"),r.ptLink.attr("data-csaction","share"),r.ptLink.attr("data-csdata","Pinterest"),r.config.hasGPlus&&(window.___gcfg={lang:"us-US",parsetags:"onload"},(e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://apis.google.com/js/platform.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t),r.GPFeedUrl="https://plus.google.com/share?url=",r.gplusLink=$(r.config.GPlusLinkSelector),r.gplusLink.attr({href:r.GPFeedUrl+r.config.imperURL+r.QueryString,"data-href":r.config.imperURL,"data-align":"left","data-width":50,"data-height":50,"data-expandTo":"top"}),r.gplusLink.addClass("ChamStats"),r.gplusLink.attr("data-csaction","share"),r.gplusLink.attr("data-csdata","GooglePlus"),e=[],r.GooglePlusDom=document.createElement("body"),e.push('<span itemprop="name">'+r.metaProperties.title+"</span>"),e.push('<span itemprop="description">'+r.metaProperties.title+"<br />"+r.returnURL+"</span>"),e.push('<img itemprop="image" src="'+r.metaProperties.image+'">'),r.metaGPlusName=$("<meta/>",{class:"googlePlusName",itemprop:"name",content:r.metaProperties.title}).appendTo("head"),r.metas.push(r.metaGPlusName),r.metaGPlusDescription=$("<meta/>",{class:"googlePlusDescription",itemprop:"description",content:r.metaProperties.title+"<br/>"+r.returnURL}).appendTo("head"),r.metas.push(r.metaGPlusDescription),r.metaGPlusImage=$("<meta/>",{class:"googlePlusImage",itemprop:"image",content:r.metaProperties.image}).appendTo("head"),r.metas.push(r.metaGPlusImage),$("<link/>",{rel:"canonical",href:r.metaProperties.image}).appendTo("head"),(t=document.createElement("div")).innerHTML=e.join(""),r.GooglePlusDom.appendChild(t)),null==window.ChamStats&&((e=document.createElement("script")).src="//ca.chameleonpower.com/stats.js",document.head.appendChild(e))},NonVizUpdate:function(e){e&&$.extend(r.config,e),r.config.siteName=r.config.siteName||"",r.config.imperURL?-1<r.config.imperURL.indexOf("/")?r.metaProperties.url=r.config.imperURL:r.metaProperties.url=r.config.imperURL+window.location.pathname:r.metaProperties.url=window.location.protocol+"//"+window.location.host+window.location.pathname,r.metaProperties.fbAppID=r.config.fbAppID,r.metaProperties.image=r.config.imageURL,r.metaProperties.title=r.config.title,r.metaProperties.PTTitle=r.config.pttitle||r.config.title,r.metaProperties.site_name=r.config.siteName,r.FBUrl=r.metaProperties.url,r.returnURL=r.metaProperties.url,r.returnURL=r.returnURL.replace(/#/gi,""),r.config.isFacebookLikeLink?(r.FBFeedURL="//www.facebook.com/plugins/like.php?href="+encodeURIComponent(r.returnURL)+"&width&layout=standard&action=like&show_faces=true&share=true&height=35&appId="+r.metaProperties.fbAppID,r.fbIframeContainer.attr("src",r.FBFeedURL)):(e=-1<r.returnURL.indexOf("://")?"":window.location.protocol+"//",e+=encodeURIComponent(r.returnURL),r.FBFeedURL="//www.facebook.com/dialog/feed?app_id="+r.metaProperties.fbAppID+"&link="+encodeURIComponent(r.returnURL)+"&picture="+encodeURIComponent(r.metaProperties.image)+"&name="+r.metaProperties.site_name+"&description="+r.metaProperties.title+"&redirect_uri="+e),r.TWFeedURL="//twitter.com/share?url="+encodeURIComponent(r.returnURL)+"&text="+r.metaProperties.title,r.PTFeedURL="//pinterest.com/pin/create/button/?url="+encodeURIComponent(r.returnURL)+"&media="+encodeURIComponent(r.metaProperties.image)+"&description="+r.metaProperties.PTTitle,$(r.metaTitle).attr("content",r.metaProperties.title),$(r.metaFBAppID).attr("content",r.metaProperties.fbAppID),$(r.metaImage).attr("content",r.metaProperties.image),$(r.metaSiteName).attr("content",r.metaProperties.site_name),$(r.metaURL).attr("content",r.metaProperties.url),r.config.isFacebookLikeLink||(r.fbLink.attr("href",r.FBFeedURL),r.fbLink.attr("target",r.config.target)),r.twLink.attr("href",r.TWFeedURL),r.twLink.attr("target",r.config.target),r.ptLink.attr("href",r.PTFeedURL),r.ptLink.attr("target",r.config.target),r.config.hasGPlus&&(r.gplusLink.attr({href:r.GPFeedUrl+r.config.imperURL+r.QueryString}),$(r.metaGPlusName).attr("content",r.metaProperties.title),$(r.metaGPlusDescription).attr("content",r.metaProperties.title),$(r.metaGPlusImage).attr("content",r.metaProperties.image))}}}(window.socialMedia=window.socialMedia||{})),Utilities=(!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).debug=e()}(function(){return function n(o,i,s){function a(r,e){if(!i[r]){if(!o[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(l)return l(r,!0);e=new Error("Cannot find module '"+r+"'");throw e.code="MODULE_NOT_FOUND",e}t=i[r]={exports:{}};o[r][0].call(t.exports,function(e){var t=o[r][1][e];return a(t||e)},t,t.exports,n,o,i,s)}return i[r].exports}for(var l="function"==typeof require&&require,e=0;e<s.length;e++)a(s[e]);return a}({1:[function(e,t,s){(s=t.exports=r.debug=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},s.disable=function(){s.enable("")},s.enable=function(e){s.save(e);for(var t=(e||"").split(/[\s,]+/),r=t.length,n=0;n<r;n++)t[n]&&("-"===(e=t[n].replace(/\*/g,".*?"))[0]?s.skips.push(new RegExp("^"+e.substr(1)+"$")):s.names.push(new RegExp("^"+e+"$")))},s.enabled=function(e){var t,r;for(t=0,r=s.skips.length;t<r;t++)if(s.skips[t].test(e))return!1;for(t=0,r=s.names.length;t<r;t++)if(s.names[t].test(e))return!0;return!1},s.humanize=e("ms"),s.names=[],s.skips=[],s.formatters={};var a,l=0;function r(e){function t(){}function r(){var n=r,e=+new Date,t=e-(a||e),o=(n.diff=t,n.prev=a,n.curr=e,a=e,null==n.useColors&&(n.useColors=s.useColors()),null==n.color&&n.useColors&&(n.color=s.colors[l++%s.colors.length]),Array.prototype.slice.call(arguments)),i=(o[0]=s.coerce(o[0]),"string"!=typeof o[0]&&(o=["%o"].concat(o)),0);o[0]=o[0].replace(/%([a-z%])/g,function(e,t){var r;return"%%"!==e&&(i++,"function"==typeof(t=s.formatters[t]))&&(r=o[i],e=t.call(n,r),o.splice(i,1),i--),e}),"function"==typeof s.formatArgs&&(o=s.formatArgs.apply(n,o)),(r.log||s.log||console.log.bind(console)).apply(n,o)}r.enabled=!(t.enabled=!1);var n=s.enabled(e)?r:t;return n.namespace=e,n}},{ms:2}],2:[function(e,t,r){var o=36e5,i=864e5;function s(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}t.exports=function(e,t){if(t=t||{},"string"==typeof e){var r=e;if(!(1e4<(r=""+r).length)){r=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(r){var n=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"days":case"day":case"d":return n*i;case"hours":case"hour":case"hrs":case"hr":case"h":return n*o;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*n;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}else return t.long?s(r=e,i,"day")||s(r,o,"hour")||s(r,6e4,"minute")||s(r,1e3,"second")||r+" ms":i<=(t=e)?Math.round(t/i)+"d":o<=t?Math.round(t/o)+"h":6e4<=t?Math.round(t/6e4)+"m":1e3<=t?Math.round(t/1e3)+"s":t+"ms"}},{}],3:[function(e,t,o){function r(){var e;try{e=o.storage.debug}catch(e){}return e}(o=t.exports=e("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},o.formatArgs=function(){var t,r,e=arguments,n=this.useColors;return e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+o.humanize(this.diff),n&&(n="color: "+this.color,(e=[e[0],n,"color: inherit"].concat(Array.prototype.slice.call(e,1)))[r=t=0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(t++,"%c"===e)&&(r=t)}),e.splice(r,0,n)),e},o.save=function(e){try{null==e?o.storage.removeItem("debug"):o.storage.debug=e}catch(e){}},o.load=r,o.useColors=function(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)},o.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),o.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],o.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},o.enable(r())},{"./debug":1}]},{},[3])(3)}),function(){function n(){}function e(t){return Object.defineProperty({},"value",{configurable:!0,get:function(){var e=t();return Object.defineProperty(this,"value",{configurable:!1,get:function(){return e}}),e}})}var t=e(function(){var e=location.search.substring(1),t={};if(null!=e&&""!==e)for(var r=e.split("&"),n=0;n<r.length;n++){var o=r[n].split("="),i=o[0].toLowerCase(),o=o[1];t[i]=null!=o&&""!==o?decodeURIComponent(o):null}return t});return{createComponent:function(r){return function(){var e=_.assign({},r),t=1===arguments.length?e.constructor(arguments[0]):e.constructor.apply(e,arguments);return{render:null!=t?t.bind(e):n}}},getQueryParameter:function(e){return t.value[e.toLowerCase()]||null},parseShortenedLink:function(e){return{specifier:(e=e.split("seln"))[0].replace(/\./g,"\\"),selector:e[1]}},parseSelTree:function(e){for(var t=[],r=[],n=[],o=0,i=e.length;o<i;o++){var s,a,l=e[o];","===l||"("===l||")"===l?(s=0<n.length?n[n.length-1]:null,0<r.length&&(a={sel:r.join("")},r=[],null==s?t.push(a):null!=s.children?s.children.push(a):s.children=[a],"("===l)&&n.push(a),")"===l&&n.pop()):r.push(l)}return 0<r.length&&t.push({sel:r.join("")}),t},parsePattern:function(e){var t=(e=e.replace(")","").split(/\(|,/)).length;return console.log("id",e),{patternId:e[0],productIds:e.slice(1,t-3),groutId:e[t-3],groutWidthId:e[t-2],rotationId:e[t-1]}},parsePatternProducts:function(e){return(e=e.replace(")","").split(/\(|,/)).slice(1,e.length-3)},formatIsoDate:function(e,t){var r=(e=new Date(e)).getFullYear(),n=e.getMonth()+1,o=e.getDate(),i=e.getHours(),s=e.getMinutes(),e=null!=(e=(e=((e=e)||new Date).toString()).match(/\(([^\)]+)\)$/)||e.match(/([A-Z]+) [\d]{4}$/))&&2<=e.length?e[1].match(/[A-Z]/g).join(""):null;return n+"/"+o+"/"+r+" "+(null!=t&&t.time?(i%12||12)+":"+(s<10?"0"+s:s)+" "+(12<=i?"PM":"AM"):"")+(null!=t&&t.timezone&&null!=e?" ("+e+")":"")},memoize:function(o){var i={};return function(){for(var e=Array.prototype.slice.call(arguments),t="",r=e.length;r--;){var n=e[r];t+=n===Object(n)?JSON.stringify(n):n}return t in i?i[t]:i[t]=o.apply(this,e)}},lazy:e,compose:function(){var n=arguments;return function(e){for(var t=e,r=0;r<n.length;r++)t=n[r].call(this,t);return t}},raf:(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(e,1)}).bind(window)}}()),Forms=(!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Navigo=t()}(this,function(){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function a(){return!("undefined"==typeof window||!window.history||!window.history.pushState)}function l(e,t,r){this.root=null,this._routes=[],this._useHash=t,this._hash=void 0===r?"#":r,this._paused=!1,this._destroyed=!1,this._lastRouteResolved=null,this._notFoundHandler=null,this._defaultHandler=null,this._usePushState=!t&&a(),this._onLocationChange=this._onLocationChange.bind(this),this._genericHooks=null,this._historyAPIUpdateMethod="pushState",e?this.root=t?e.replace(/\/$/,"/"+this._hash):e.replace(/\/$/,""):t&&(this.root=this._cLoc().split(this._hash)[0].replace(/\/$/,"/"+this._hash)),this._listen(),this.updatePageLinks()}function c(e){return e instanceof RegExp?e:e.replace(/\/+$/,"").replace(/^\/+/,"^/")}function r(e){return e.replace(/\/$/,"").split("/").length}function s(e,t){return r(t)-r(e)}function u(e,t){return function(s,e){return(1<arguments.length&&void 0!==e?e:[]).map(function(e){r=c(e.route),o=[];var t,n,o,r={regexp:r instanceof RegExp?r:new RegExp(r.replace(l.PARAMETER_REGEXP,function(e,t,r){return o.push(r),l.REPLACE_VARIABLE_REGEXP}).replace(l.WILDCARD_REGEXP,l.REPLACE_WILDCARD)+l.FOLLOWED_BY_SLASH_REGEXP,l.MATCH_REGEXP_FLAGS),paramNames:o},i=r.regexp,r=r.paramNames,i=s.replace(/^\/+/,"/").match(i),r=(t=i,0!==(n=r).length&&t?t.slice(1,t.length).reduce(function(e,t,r){return(e=null===e?{}:e)[n[r]]=decodeURIComponent(t),e},null):null);return!!i&&{match:i,route:e,params:r}}).filter(function(e){return e})}(e,t)[0]||!1}function e(t,e){var e=e.map(function(e){return""===e.route||"*"===e.route?t:t.split(new RegExp(e.route+"($|/)"))[0]}),r=c(t);return 1<e.length?e.reduce(function(e,t){return e=e.length>t.length?t:e},e[0]):1===e.length?e[0]:r}function d(e,t,r){function n(e){return e.split(/\?(.*)?$/)[0]}return void 0===r&&(r="#"),a()&&!t?n(e).split(r)[0]:1<(t=e.split(r)).length?n(t[1]):n(t[0])}function p(e,t,r){if(t&&"object"===(void 0===t?"undefined":i(t))){if(t.before)return t.before(function(){0<arguments.length&&void 0!==arguments[0]&&!arguments[0]||(e(),!t.after)||t.after(r)},r);if(t.after)return e(),t.after&&t.after(r)}e()}return l.prototype={helpers:{match:u,root:e,clean:c,getOnlyURL:d},navigate:function(e,t){return e=e||"",this._usePushState?(t=(t=(t?"":this._getRoot()+"/")+e.replace(/^\/+/,"/")).replace(/([^:])(\/{2,})/g,"$1/"),history[this._historyAPIUpdateMethod]({},"",t),this.resolve()):"undefined"!=typeof window&&(e=e.replace(new RegExp("^"+this._hash),""),window.location.href=window.location.href.replace(/#$/,"").replace(new RegExp(this._hash+".*$"),"")+this._hash+e),this},on:function(){for(var e,t=this,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return"function"==typeof n[0]?this._defaultHandler={handler:n[0],hooks:n[1]}:2<=n.length?"/"===n[0]?(e=n[1],"object"===i(n[1])&&(e=n[1].uses),this._defaultHandler={handler:e,hooks:n[2]}):this._add(n[0],n[1],n[2]):"object"===i(n[0])&&Object.keys(n[0]).sort(s).forEach(function(e){t.on(e,n[0][e])}),this},off:function(r){return null!==this._defaultHandler&&r===this._defaultHandler.handler?this._defaultHandler=null:null!==this._notFoundHandler&&r===this._notFoundHandler.handler&&(this._notFoundHandler=null),this._routes=this._routes.reduce(function(e,t){return t.handler!==r&&e.push(t),e},[]),this},notFound:function(e,t){return this._notFoundHandler={handler:e,hooks:t},this},resolve:function(e){var t,r,n=this,o=(e||this._cLoc()).replace(this._getRoot(),""),i=(this._useHash&&(o=o.replace(new RegExp("^/"+this._hash),"/")),(e||this._cLoc()).split(/\?(.*)?$/).slice(1).join("")),s=d(o,this._useHash,this._hash);return!this._paused&&(this._lastRouteResolved&&s===this._lastRouteResolved.url&&i===this._lastRouteResolved.query?(this._lastRouteResolved.hooks&&this._lastRouteResolved.hooks.already&&this._lastRouteResolved.hooks.already(this._lastRouteResolved.params),!1):(r=u(s,this._routes))?(this._callLeave(),this._lastRouteResolved={url:s,query:i,hooks:r.route.hooks,params:r.params,name:r.route.name},t=r.route.handler,p(function(){p(function(){r.route.route instanceof RegExp?t.apply(void 0,r.match.slice(1,r.match.length)):t(r.params,i)},r.route.hooks,r.params,n._genericHooks)},this._genericHooks,r.params),r):this._defaultHandler&&(""===s||"/"===s||s===this._hash||function(e,t,r){if((!a()||t)&&e.match(r))return(t=e.split(r)).length<2||""===t[1]}(s,this._useHash,this._hash))?(p(function(){p(function(){n._callLeave(),n._lastRouteResolved={url:s,query:i,hooks:n._defaultHandler.hooks},n._defaultHandler.handler(i)},n._defaultHandler.hooks)},this._genericHooks),!0):(this._notFoundHandler&&p(function(){p(function(){n._callLeave(),n._lastRouteResolved={url:s,query:i,hooks:n._notFoundHandler.hooks},n._notFoundHandler.handler(i)},n._notFoundHandler.hooks)},this._genericHooks),!1))},destroy:function(){this._routes=[],this._destroyed=!0,this._lastRouteResolved=null,this._genericHooks=null,clearTimeout(this._listeningInterval),"undefined"!=typeof window&&(window.removeEventListener("popstate",this._onLocationChange),window.removeEventListener("hashchange",this._onLocationChange))},updatePageLinks:function(){var n=this;"undefined"!=typeof document&&this._findLinks().forEach(function(r){r.hasListenerAttached||(r.addEventListener("click",function(e){if((e.ctrlKey||e.metaKey)&&"a"==e.target.tagName.toLowerCase())return!1;var t=n.getLinkPath(r);n._destroyed||(e.preventDefault(),n.navigate(t.replace(/\/+$/,"").replace(/^\/+/,"/")))}),r.hasListenerAttached=!0)})},generate:function(n){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=this._routes.reduce(function(e,t){if(t.name===n)for(var r in e=t.route,o)e=e.toString().replace(":"+r,o[r]);return e},"");return this._useHash?this._hash+e:e},link:function(e){return this._getRoot()+e},pause:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];this._paused=e,this._historyAPIUpdateMethod=e?"replaceState":"pushState"},resume:function(){this.pause(!1)},historyAPIUpdateMethod:function(e){return void 0===e?this._historyAPIUpdateMethod:this._historyAPIUpdateMethod=e},disableIfAPINotAvailable:function(){a()||this.destroy()},lastRouteResolved:function(){return this._lastRouteResolved},getLinkPath:function(e){return e.getAttribute("href")},hooks:function(e){this._genericHooks=e},_add:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return"string"==typeof e&&(e=encodeURI(e)),this._routes.push("object"===(void 0===t?"undefined":i(t))?{route:e,handler:t.uses,name:t.as,hooks:r||t.hooks}:{route:e,handler:t,hooks:r}),this._add},_getRoot:function(){return null!==this.root||(this.root=e(this._cLoc().split("?")[0],this._routes)),this.root},_listen:function(){var e,t,r,n=this;this._usePushState?window.addEventListener("popstate",this._onLocationChange):"undefined"!=typeof window&&"onhashchange"in window?window.addEventListener("hashchange",this._onLocationChange):(e=this._cLoc(),r=t=void 0,(r=function(){t=n._cLoc(),e!==t&&(e=t,n.resolve()),n._listeningInterval=setTimeout(r,200)})())},_cLoc:function(){return"undefined"!=typeof window?void 0!==window.__NAVIGO_WINDOW_LOCATION_MOCK__?window.__NAVIGO_WINDOW_LOCATION_MOCK__:c(window.location.href):""},_findLinks:function(){return[].slice.call(document.querySelectorAll("[data-navigo]"))},_onLocationChange:function(){this.resolve()},_callLeave:function(){var e=this._lastRouteResolved;e&&e.hooks&&e.hooks.leave&&e.hooks.leave(e.params)}},l.PARAMETER_REGEXP=/([:*])(\w+)/g,l.WILDCARD_REGEXP=/\*/g,l.REPLACE_VARIABLE_REGEXP="([^/]+)",l.REPLACE_WILDCARD="(?:.*)",l.FOLLOWED_BY_SLASH_REGEXP="(?:/$|$)",l.MATCH_REGEXP_FLAGS="",l}),function(){var d=Utilities.lazy,t=/[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i,p="Field is not valid.",f={input:{text:{required:function(e){return""!==e.val()},email:function(e){return t.test(e.val())}},password:{required:function(e){return""!==e.val()}},file:{required:function(e){return""!==e.val()},extension:function(e,t,r){e=e.val();if(""===e)return!0;for(var e=e.split("."),n=e[e.length-1].toLowerCase(),o=0;o<r.length;o++)if(r[o]===n)return!0;return!1}}},select:{required:function(e){return 0!==e.prop("selectedIndex")}},textarea:{required:function(e){return""!==e.val()}}};function r(e,t){for(var r=e.find('input[type="text"], input[type="password"], input[type="file"], select, textarea').get(),n={},o=[],i=0;i<r.length;i++){var s=$(r[i]),a=s.data("validation"),l=s.data("validation-msg"),c=s.prop("nodeName").toLowerCase(),u=s.prop("type").toLowerCase(),a=function(e,t,r){for(var n=e||[],o=0;o<t.length;o++){for(var i=t[o],s=r[o],a=null,l=0;l<n.length;l++){var c=n[l];if(i===c.type){a=c;break}}null==a?n.push({type:i,options:null,message:s}):null!=s&&(a.message=s)}return n}(null!=t?t[s.prop("name")]:null,null!=a&&""!==a?a.split("|"):[],null!=l&&""!==l?l.split("|"):[]);n[s.prop("name")]=s,o.push({inputNode:s,validationNode:d(function(e){return $('<span class="validation-error" style="display: none;"></span>').insertAfter(e)}.bind(null,s)),validators:function(e,t,r){var n="input"===e?f[e][t]:f[e],o=[];if(null!=n)for(var i=0;i<r.length;i++){var s=r[i],a="custom"===s.type?s.options:n[s.type];null!=a&&o.push({isValid:a,options:s.options,message:s.message||p})}return o}(c,u,a)})}return{formLookup:n,formInputs:o}}function n(e,t){if(!(this instanceof n))return new n(e,t);t=r(e,t),this.formLookup=t.formLookup,this.formInputs=t.formInputs,this.inputsLength=t.formInputs.length,this.formNode=e,this.formElement=e.get(0),this.isInDom=!1}return n.prototype.validate=function(){for(var e=!0,t=[],r=0;r<this.inputsLength;r++){for(var n=this.formInputs[r],o=0;o<n.validators.length;o++){var i=n.validators[o];if(!i.isValid(n.inputNode,this.formLookup,i.options)){t.push(i.message),e=!1;break}}this.isInDom&&n.validationNode.value.css("display","none")}return{isValid:e,errorMessages:t}},n.prototype.validateAndPrintMessages=function(){for(var e=this.isInDom=!0,t=0;t<this.inputsLength;t++){for(var r=this.formInputs[t],n=!0,o=0;o<r.validators.length;o++){var i=r.validators[o];if(!i.isValid(r.inputNode,this.formLookup,i.options)){r.validationNode.value.text(i.message),n=e=!1;break}}r.validationNode.value.css("display",n?"none":"block")}return e},n.prototype.resetForm=function(){if(this.formElement.reset(),this.isInDom)for(var e=0;e<this.inputsLength;e++)this.formInputs[e].validationNode.value.css("display","none")},n.prototype.gatherFormValues=function(){for(var e=this.formNode.serializeArray(),t={},r=0;r<e.length;r++){var n=e[r];t[n.name]=""!==n.value?n.value:null}return t},{FormValidator:n,emailRegex:t}}()),LoadingMsg=(!function(){function e(){}for(var t,r=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeline","timelineEnd","timeStamp","trace","warn"],n=r.length,o=window.console=window.console||{};n--;)o[t=r[n]]||(o[t]=e)}(),function(){var i={prefix:"loading_",offset:0,className:"loading-msg",img:"",zindex:999};function s(e,t,r){e=$(e),(t=$(t)).css("left",(e.innerWidth()-t.outerWidth()>>>1)+r),t.css("top",(e.innerHeight()-t.outerHeight()>>>1)+r)}function a(e,t,r){var n=i,o=(e=e.replace(/\s/g,""),$("."+n.className).length),e=$('<div><div class="uil-ripple-css"><div></div><div></div></div></div>').attr("id",n.prefix+e).addClass(n.className).css("z-index",n.zindex+o);r&&(o=$("<div></div>").addClass(n.className+"-inner").html(r),e.append(o)),s(t=$(t).append(e),e,0)}function l(e){e=e.replace(/\s/g,""),$("#"+i.prefix+e).remove()}return{settings:i,center:s,start:a,stop:l,loadImg:function(e,t,r,n){null!=(o=$(imgEl).attr("data-loadingId"))&&""!=o&&l(o),a(t,r,n),$(imgEl).attr("data-loadingId",t);var o=new Image;$(o).bind("load abort error",function(e){l($(this).attr("data-loadingId")),$(this).unbind(e)}).attr("src",e)},startImg:function(e,t,r,n){var o=$(e).attr("data-loadingId");null!=o&&""!=o&&l(o),a(t,r,n),$(e).attr("data-loadingId",t),$(e).bind("load abort error",function(e){l($(this).attr("data-loadingId")),$(this).unbind(e)})},Queue:{count:0,msgId:"",loadImg:function(e,t,r,n){var o=$(e).attr("data-loadingId");null!=o&&""!=o&&l(o),a(t,r,n),$(e).attr("data-loadingId",t),$(e).bind("load abort error",function(){l($(this).attr("data-loadingId")),$(this).unbind()})}}}}());function css_browser_selector(e){function t(e){return-1<r.indexOf(e)}var r=e.toLowerCase(),e="gecko",n="webkit",o="opera",i="mobile",s=0,a=window.devicePixelRatio?(window.devicePixelRatio+"").replace(".","_"):"1",n=[!/opera|webtv/.test(r)&&/msie\s(\d+)/.test(r)&&(s=+RegExp.$1)?"ie ie"+s+(6==s||7==s?" ie67 ie678 ie6789":8==s?" ie678 ie6789":9==s?" ie6789 ie9m":9<s?" ie9m":""):/edge\/(\d+)\.(\d+)/.test(r)&&(s=[RegExp.$1,RegExp.$2])?"ie ie"+s[0]+" ie"+s[0]+"_"+s[1]+" ie9m edge":/trident\/\d+.*?;\s*rv:(\d+)\.(\d+)\)/.test(r)&&(s=[RegExp.$1,RegExp.$2])?"ie ie"+s[0]+" ie"+s[0]+"_"+s[1]+" ie9m":/firefox\/(\d+)\.(\d+)/.test(r)&&(re=RegExp)?e+" ff ff"+re.$1+" ff"+re.$1+"_"+re.$2:t("gecko/")?e:t(o)?"old"+o+(/version\/(\d+)/.test(r)?" "+o+RegExp.$1:/opera(\s|\/)(\d+)/.test(r)?" "+o+RegExp.$2:""):t("konqueror")?"konqueror":t("blackberry")?i+" blackberry":t("chrome")||t("crios")?n+" chrome":t("iron")?n+" iron":!t("cpu os")&&t("applewebkit/")?n+" safari":t("mozilla/")?e:"",t("android")?i+" android":"",t("tablet")?"tablet":"",t("opr/")?o:"",t("yabrowser")?"yandex":"",t("j2me")?i+" j2me":t("ipad; u; cpu os")?i+" chrome android tablet":t("ipad;u;cpu os")?i+" chromedef android tablet":t("iphone")?i+" ios iphone":t("ipod")?i+" ios ipod":t("ipad")?i+" ios ipad tablet":t("mac")||t("darwin")?"mac":t("webtv")?"webtv":t("win")?"win"+(t("windows nt 6.0")?" vista":""):t("freebsd")?"freebsd":t("x11")||t("linux")?"linux":"","1"!=a?" retina ratio"+a:"","js portrait"].join(" ");return window.jQuery&&!window.jQuery.browser&&(window.jQuery.browser=s?{msie:1,version:s}:{}),n}!function(t,e){var r=css_browser_selector(navigator.userAgent),n=t.documentElement,o=(n.className+=" "+r,r.replace(/^\s*|\s*$/g,"").split(/ +/));e.CSSBS=1;for(var i=0;i<o.length;i++)e["CSSBS_"+o[i]]=1;function s(e){return t.documentElement[e]||t.body[e]}var a,l,c,u,d,p,f,h,m,g;function v(){if(0==m){try{var e=s("clientWidth");if(s("clientHeight")<e?h.removeClass(a).addClass(l):h.removeClass(l).addClass(a),e==g)return;g=e}catch(e){}m=setTimeout(y,100)}}function y(){try{h.removeClass(f),h.addClass(g<=360?c:g<=640?u:g<=768?d:g<=1024?p:"pc")}catch(e){}m=0}e.jQuery&&(r=e.jQuery,a="portrait",l="landscape",f=(c="smartnarrow")+" "+(u="smartwide")+" "+(d="tabletnarrow")+" "+(p="tabletwide")+" pc",h=r(n),g=m=0,e.CSSBS_ie?setInterval(v,1e3):r(e).on("resize orientationchange",v).trigger("resize"),r(e).on("load",v))}(document,window),!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t(require,exports,module):e.Tether=t()}(this,function(F,E,D){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var w=void 0,i=(void 0===w&&(w={modules:[]}),null);function s(e){var t,r=e.getBoundingClientRect(),n={};for(t in r)n[t]=r[t];return e.ownerDocument!==document&&(e=e.ownerDocument.defaultView.frameElement)&&(e=s(e),n.top+=e.top,n.bottom+=e.top,n.left+=e.left,n.right+=e.left),n}function a(e){var t=(getComputedStyle(e)||{}).position,r=[];if("fixed"===t)return[e];for(var n=e;(n=n.parentNode)&&1===n.nodeType;){var o=void 0;try{o=getComputedStyle(n)}catch(e){}if(null==o)return r.push(n),r;var i=o,s=i.overflow,a=i.overflowX,i=i.overflowY;/(auto|scroll)/.test(s+i+a)&&("absolute"!==t||0<=["relative","absolute","fixed"].indexOf(o.position))&&r.push(n)}return r.push(e.ownerDocument.body),e.ownerDocument!==document&&r.push(e.ownerDocument.defaultView),r}e=0;var e,l=function(){return++e},c={};function u(){i&&document.body.removeChild(i),i=null}function A(e){var t,r=void 0,n=(e===document?e=(r=document).documentElement:r=e.ownerDocument,r.documentElement),e=s(e),o=((o=i)||((o=document.createElement("div")).setAttribute("data-tether-id",l()),_(o.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(o),i=o),t=o.getAttribute("data-tether-id"),void 0===c[t]&&(c[t]=s(o),j(function(){delete c[t]})),c[t]);return e.top-=o.top,e.left-=o.left,void 0===e.width&&(e.width=document.body.scrollWidth-e.left-e.right),void 0===e.height&&(e.height=document.body.scrollHeight-e.top-e.bottom),e.top=e.top-n.clientTop,e.left=e.left-n.clientLeft,e.right=r.body.clientWidth-e.width-e.left,e.bottom=r.body.clientHeight-e.height-e.top,e}function S(e){return e.offsetParent||document.documentElement}var d=null;function M(){var e,t,r;return d||((t=document.createElement("div")).style.width="100%",t.style.height="200px",r=document.createElement("div"),_(r.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),r.appendChild(t),document.body.appendChild(r),e=t.offsetWidth,r.style.overflow="scroll",e===(t=t.offsetWidth)&&(t=r.clientWidth),document.body.removeChild(r),d={width:r=e-t,height:r}),d}function _(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var t in e)!{}.hasOwnProperty.call(e,t)||(r[t]=e[t])}),r}function p(t,e){void 0!==t.classList?e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)}):(e=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),e=r(t).replace(e," "),m(t,e))}function f(t,e){void 0!==t.classList?e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)}):(p(t,e),e=r(t)+" "+e,m(t,e))}function h(e,t){return void 0!==e.classList?e.classList.contains(t):(e=r(e),new RegExp("(^| )"+t+"( |$)","gi").test(e))}function r(e){return e.className instanceof e.ownerDocument.defaultView.SVGAnimatedString?e.className.baseVal:e.className}function m(e,t){e.setAttribute("class",t)}function x(t,r,e){e.forEach(function(e){-1===r.indexOf(e)&&h(t,e)&&p(t,e)}),r.forEach(function(e){h(t,e)||f(t,e)})}var O=[],j=function(e){O.push(e)},k=function(){for(var e=void 0;e=O.pop();)e()},U=((N=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e})(t,[{key:"on",value:function(e,t,r){var n=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];void 0===this.bindings&&(this.bindings={}),void 0===this.bindings[e]&&(this.bindings[e]=[]),this.bindings[e].push({handler:t,ctx:r,once:n})}},{key:"once",value:function(e,t,r){this.on(e,t,r,!0)}},{key:"off",value:function(e,t){if(void 0!==this.bindings&&void 0!==this.bindings[e])if(void 0===t)delete this.bindings[e];else for(var r=0;r<this.bindings[e].length;)this.bindings[e][r].handler===t?this.bindings[e].splice(r,1):++r}},{key:"trigger",value:function(e){if(void 0!==this.bindings&&this.bindings[e]){for(var t=0,r=arguments.length,n=Array(1<r?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];for(;t<this.bindings[e].length;){var i=this.bindings[e][t],s=i.handler,a=i.ctx,i=i.once,a=void 0===a?this:a;s.apply(a,n),i?this.bindings[e].splice(t,1):++t}}}}]),t);function t(){o(this,t)}w.Utils={getActualBoundingClientRect:s,getScrollParents:a,getBounds:A,getOffsetParent:S,extend:_,addClass:f,removeClass:p,hasClass:h,updateClasses:x,defer:j,flush:k,uniqueId:l,Evented:U,getScrollBarSize:M,removeUtilElements:u};var L=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var r=t,n=[],o=!0,t=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!r||n.length!==r);o=!0);}catch(e){t=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(t)throw i}}return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")},N=function(e,t,r){return t&&B(e.prototype,t),r&&B(e,r),e};function B(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}if(void 0===w)throw new Error("You must include the utils.js file before tether.js");var g=w.Utils,a=g.getScrollParents,A=g.getBounds,S=g.getOffsetParent,_=g.extend,f=g.addClass,p=g.removeClass,x=g.updateClasses,j=g.defer,k=g.flush,M=g.getScrollBarSize,u=g.removeUtilElements;function G(){H.forEach(function(e){e.position(!1)}),k()}var v,y,C,b=function(){if("undefined"==typeof document)return"";for(var e=document.createElement("div"),t=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],r=0;r<t.length;++r){var n=t[r];if(void 0!==e.style[n])return n}}(),H=[];function P(){return"undefined"!=typeof performance&&void 0!==performance.now?performance.now():+new Date}function Q(){void 0!==y&&16<y?(y=Math.min(y-16,250),C=setTimeout(Q,250)):void 0!==v&&P()-v<10||(null!=C&&(clearTimeout(C),C=null),v=P(),G(),y=P()-v)}C=y=v=null,"undefined"!=typeof window&&void 0!==window.addEventListener&&["resize","scroll","touchmove"].forEach(function(e){window.addEventListener(e,Q)});function W(e){var t=e.left,r=e.top;return{left:t=void 0!==I[e.left]?I[e.left]:t,top:r=void 0!==I[e.top]?I[e.top]:r}}var $={center:"center",left:"right",right:"left"},V={middle:"middle",top:"bottom",bottom:"top"},I={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"};function q(){for(var r={top:0,left:0},e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.forEach(function(e){var t=e.top,e=e.left;"string"==typeof t&&(t=parseFloat(t,10)),"string"==typeof e&&(e=parseFloat(e,10)),r.top+=t,r.left+=e}),r}function T(e,t){return"string"==typeof e.left&&-1!==e.left.indexOf("%")&&(e.left=parseFloat(e.left,10)/100*t.width),"string"==typeof e.top&&-1!==e.top.indexOf("%")&&(e.top=parseFloat(e.top,10)/100*t.height),e}function z(e){return e=e.split(" "),{top:(e=L(e,2))[0],left:e[1]}}var Y=z,R=function(){var e=r,t=U;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);function r(e){var t=this;o(this,r),function(e,t,r){for(var n=!0;n;){var o=e,i=t,s=r,n=!1,a=(null===o&&(o=Function.prototype),Object.getOwnPropertyDescriptor(o,i));if(void 0!==a)return"value"in a?a.value:void 0===(l=a.get)?void 0:l.call(s);var l=Object.getPrototypeOf(o);if(null===l)return;e=l,t=i,r=s,n=!0,a=void 0}}(Object.getPrototypeOf(r.prototype),"constructor",this).call(this),this.position=this.position.bind(this),H.push(this),this.history=[],this.setOptions(e,!1),w.modules.forEach(function(e){void 0!==e.initialize&&e.initialize.call(t)}),this.position()}return e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t),N(r,[{key:"getClass",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=this.options.classes;return void 0!==t&&t[e]?this.options.classes[e]:this.options.classPrefix?this.options.classPrefix+"-"+e:e}},{key:"setOptions",value:function(e){var t=this,r=arguments.length<=1||void 0===arguments[1]||arguments[1],e=(this.options=_({offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"},e),this.options),n=e.element,o=e.target,e=e.targetModifier;if(this.element=n,this.target=o,this.targetModifier=e,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(e){if(void 0===t[e])throw new Error("Tether Error: Both element and target must be defined");void 0!==t[e].jquery?t[e]=t[e][0]:"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))}),f(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&f(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=Y(this.options.targetAttachment),this.attachment=Y(this.options.attachment),this.offset=z(this.options.offset),this.targetOffset=z(this.options.targetOffset),void 0!==this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=a(this.target),!1!==this.options.enabled&&this.enable(r)}},{key:"getTargetBounds",value:function(){var e,t,r,n,o,i;return void 0!==this.targetModifier?"visible"===this.targetModifier?this.target===document.body?{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth}:((n={height:(e=A(this.target)).height,width:e.width,top:e.top,left:e.left}).height=Math.min(n.height,e.height-(pageYOffset-e.top)),n.height=Math.min(n.height,e.height-(e.top+e.height-(pageYOffset+innerHeight))),n.height=Math.min(innerHeight,n.height),n.height-=2,n.width=Math.min(n.width,e.width-(pageXOffset-e.left)),n.width=Math.min(n.width,e.width-(e.left+e.width-(pageXOffset+innerWidth))),n.width=Math.min(innerWidth,n.width),n.width-=2,n.top<pageYOffset&&(n.top=pageYOffset),n.left<pageXOffset&&(n.left=pageXOffset),n):"scroll-handle"===this.targetModifier?(e=void 0,e=(i=this.target)===document.body?(i=document.documentElement,{left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):A(i),t=getComputedStyle(i),r=0,(i.scrollWidth>i.clientWidth||0<=[t.overflow,t.overflowX].indexOf("scroll")||this.target!==document.body)&&(r=15),n={width:15,height:.975*(r=e.height-parseFloat(t.borderTopWidth)-parseFloat(t.borderBottomWidth)-r)*(r/i.scrollHeight),left:e.left+e.width-parseFloat(t.borderLeftWidth)-15},o=0,r<408&&this.target===document.body&&(o=-11e-5*Math.pow(r,2)-.00727*r+22.58),this.target!==document.body&&(n.height=Math.max(n.height,24)),i=this.target.scrollTop/(i.scrollHeight-r),n.top=i*(r-n.height-o)+e.top+parseFloat(t.borderTopWidth),this.target===document.body&&(n.height=Math.max(n.height,24)),n):void 0:A(this.target)}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(e,t){return void 0===this._cache&&(this._cache={}),void 0===this._cache[e]&&(this._cache[e]=t.call(this)),this._cache[e]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];!1!==this.options.addTargetClasses&&f(this.target,this.getClass("enabled")),f(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;p(this.target,this.getClass("enabled")),p(this.element,this.getClass("enabled")),this.enabled=!1,void 0!==this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var r=this;this.disable(),H.forEach(function(e,t){e===r&&H.splice(t,1)}),0===H.length&&u()}},{key:"updateAttachClasses",value:function(e,t){var r=this,n=(e=e||this.attachment,t=t||this.targetAttachment,void 0!==this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),void 0===this._addAttachClasses&&(this._addAttachClasses=[]),this._addAttachClasses),o=(e.top&&n.push(this.getClass("element-attached")+"-"+e.top),e.left&&n.push(this.getClass("element-attached")+"-"+e.left),t.top&&n.push(this.getClass("target-attached")+"-"+t.top),t.left&&n.push(this.getClass("target-attached")+"-"+t.left),[]);["left","top","bottom","right","middle","center"].forEach(function(e){o.push(r.getClass("element-attached")+"-"+e),o.push(r.getClass("target-attached")+"-"+e)}),j(function(){void 0!==r._addAttachClasses&&(x(r.element,r._addAttachClasses,o),!1!==r.options.addTargetClasses&&x(r.target,r._addAttachClasses,o),delete r._addAttachClasses)})}},{key:"position",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();a=this.targetAttachment,i=this.attachment,o=a.left,a=a.top;for(var r={left:o="auto"===o?$[i.left]:o,top:a="auto"===a?V[i.top]:a},n=(this.updateAttachClasses(this.attachment,r),this.cache("element-bounds",function(){return A(e.element)})),o=n.width,i=n.height,s=(0===o&&0===i&&void 0!==this.lastSize?(o=(a=this.lastSize).width,i=a.height):this.lastSize={width:o,height:i},this.cache("target-bounds",function(){return e.getTargetBounds()})),a=s,l=T(W(this.attachment),{width:o,height:i}),c=T(W(r),a),u=T(this.offset,{width:o,height:i}),d=T(this.targetOffset,a),l=q(l,u),c=q(c,d),p=s.left+c.left-l.left,f=s.top+c.top-l.top,h=0;h<w.modules.length;++h){var m=w.modules[h].position.call(this,{left:p,top:f,targetAttachment:r,targetPos:s,elementPos:n,offset:l,targetOffset:c,manualOffset:u,manualTargetOffset:d,scrollbarSize:_,attachment:this.attachment});if(!1===m)return!1;void 0!==m&&"object"==typeof m&&(f=m.top,p=m.left)}var g,v,y,a={page:{top:f,left:p},viewport:{top:f-pageYOffset,bottom:pageYOffset-f-i+innerHeight,left:p-pageXOffset,right:pageXOffset-p-o+innerWidth}},C=this.target.ownerDocument,b=C.defaultView,_=void 0;return b.innerHeight>C.documentElement.clientHeight&&(_=this.cache("scrollbar-size",M),a.viewport.bottom-=_.height),b.innerWidth>C.documentElement.clientWidth&&(_=this.cache("scrollbar-size",M),a.viewport.right-=_.width),-1!==["","static"].indexOf(C.body.style.position)&&-1!==["","static"].indexOf(C.body.parentElement.style.position)||(a.page.bottom=C.body.scrollHeight-f-i,a.page.right=C.body.scrollWidth-p-o),void 0!==this.options.optimizations&&!1!==this.options.optimizations.moveElement&&void 0===this.targetModifier&&(g=e.cache("target-offsetparent",function(){return S(e.target)}),b=e.cache("target-offsetparent-bounds",function(){return A(g)}),v=getComputedStyle(g),i=b,y={},["Top","Left","Bottom","Right"].forEach(function(e){y[e.toLowerCase()]=parseFloat(v["border"+e+"Width"])}),b.right=C.body.scrollWidth-b.left-i.width+y.right,b.bottom=C.body.scrollHeight-b.top-i.height+y.bottom,a.page.top>=b.top+y.top)&&a.page.bottom>=b.bottom&&a.page.left>=b.left+y.left&&a.page.right>=b.right&&(i=g.scrollTop,o=g.scrollLeft,a.offset={top:a.page.top-b.top+i-y.top,left:a.page.left-b.left+o-y.left}),this.move(a),this.history.unshift(a),3<this.history.length&&this.history.pop(),t&&k(),!0}}},{key:"move",value:function(e){var o=this;if(void 0!==this.element.parentNode){var t,r={};for(t in e)for(var n in r[t]={},e[t]){for(var i=!1,s=0;s<this.history.length;++s){var a=this.history[s];if(void 0!==a[t]&&!function(e,t,r){return t<=e+(r=arguments.length<=2||void 0===r?1:r)&&e-r<=t}(a[t][n],e[t][n])){i=!0;break}}i||(r[t][n]=!0)}var l,c={top:"",left:"",right:"",bottom:""},u=function(e,t){var r,n;!1!==(void 0!==o.options.optimizations?o.options.optimizations.gpu:null)?(n=r=void 0,r=e.top?(c.top=0,t.top):(c.bottom=0,-t.bottom),n=e.left?(c.left=0,t.left):(c.right=0,-t.right),!window.matchMedia||window.matchMedia("only screen and (min-resolution: 1.3dppx)").matches||window.matchMedia("only screen and (-webkit-min-device-pixel-ratio: 1.3)").matches||(n=Math.round(n),r=Math.round(r)),c[b]="translateX("+n+"px) translateY("+r+"px)","msTransform"!==b&&(c[b]+=" translateZ(0)")):(e.top?c.top=t.top+"px":c.bottom=t.bottom+"px",e.left?c.left=t.left+"px":c.right=t.right+"px")},d=!1;if((r.page.top||r.page.bottom)&&(r.page.left||r.page.right)?(c.position="absolute",u(r.page,e.page)):(r.viewport.top||r.viewport.bottom)&&(r.viewport.left||r.viewport.right)?(c.position="fixed",u(r.viewport,e.viewport)):void 0!==r.offset&&r.offset.top&&r.offset.left?(c.position="absolute",l=o.cache("target-offsetparent",function(){return S(o.target)}),S(o.element)!==l&&j(function(){o.element.parentNode.removeChild(o.element),l.appendChild(o.element)}),u(r.offset,e.offset),d=!0):(c.position="absolute",u({top:!0,left:!0},e.page)),!d){for(var p=!0,f=this.element.parentNode;f&&1===f.nodeType&&"BODY"!==f.tagName;){if("static"!==getComputedStyle(f).position){p=!1;break}f=f.parentNode}p||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var h={},m=!1;for(n in c){var g=c[n];this.element.style[n]!==g&&(m=!0,h[n]=g)}m&&j(function(){_(o.element.style,h),o.trigger("repositioned")})}}}]),r}(),R=(R.modules=[],w.position=G,_(R,w)),L=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var r=t,n=[],o=!0,t=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!r||n.length!==r);o=!0);}catch(e){t=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(t)throw i}}return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")},A=(g=w.Utils).getBounds,_=g.extend,x=g.updateClasses,j=g.defer,X=["left","top","right","bottom"];w.modules.push({position:function(e){var u,d,p,f,r,h,m,g,v=this,y=e.top,C=e.left,b=e.targetAttachment;return!this.options.constraints||(e=this.cache("element-bounds",function(){return A(v.element)}),d=e.height,0===(u=e.width)&&0===d&&void 0!==this.lastSize&&(e=this.lastSize,u=e.width,d=e.height),e=this.cache("target-bounds",function(){return v.getTargetBounds()}),p=e.height,f=e.width,r=[this.getClass("pinned"),this.getClass("out-of-bounds")],this.options.constraints.forEach(function(e){var t=e.outOfBoundsClass,e=e.pinnedClass;t&&r.push(t),e&&r.push(e)}),r.forEach(function(t){["left","top","right","bottom"].forEach(function(e){r.push(t+"-"+e)})}),h=[],m=_({},b),g=_({},this.attachment),this.options.constraints.forEach(function(e){var t,r,n,o,i,s=e.to,a=e.attachment,e=e.pin,l=void 0,c=void 0,s=(l=0<=(a=void 0===a?"":a).indexOf(" ")?(t=a.split(" "),c=(t=L(t,2))[0],t[1]):c=a,t=v,"scrollParent"===(r=s)?r=t.scrollParents[0]:"window"===r&&(r=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),void 0!==(r=r===document?r.documentElement:r).nodeType&&(a=A(t=r),s=a,n=getComputedStyle(r),r=[s.left,s.top,a.width+s.left,a.height+s.top],t.ownerDocument!==document&&(a=t.ownerDocument.defaultView,r[0]+=a.pageXOffset,r[1]+=a.pageYOffset,r[2]+=a.pageXOffset,r[3]+=a.pageYOffset),X.forEach(function(e,t){"Top"===(e=e[0].toUpperCase()+e.substr(1))||"Left"===e?r[t]+=parseFloat(n["border"+e+"Width"]):r[t]-=parseFloat(n["border"+e+"Width"])})),r),a=("target"!==c&&"both"!==c||(y<s[1]&&"top"===m.top&&(y+=p,m.top="bottom"),y+d>s[3]&&"bottom"===m.top&&(y-=p,m.top="top")),"together"===c&&("top"===m.top&&("bottom"===g.top&&y<s[1]?(y+=p,m.top="bottom",y+=d,g.top="top"):"top"===g.top&&y+d>s[3]&&y-(d-p)>=s[1]&&(y-=d-p,m.top="bottom",g.top="bottom")),"bottom"===m.top&&("top"===g.top&&y+d>s[3]?(y-=p,m.top="top",y-=d,g.top="bottom"):"bottom"===g.top&&y<s[1]&&y+(2*d-p)<=s[3]&&(y+=d-p,m.top="top",g.top="top")),"middle"===m.top)&&(y+d>s[3]&&"top"===g.top?(y-=d,g.top="bottom"):y<s[1]&&"bottom"===g.top&&(y+=d,g.top="top")),"target"!==l&&"both"!==l||(C<s[0]&&"left"===m.left&&(C+=f,m.left="right"),C+u>s[2]&&"right"===m.left&&(C-=f,m.left="left")),"together"===l&&(C<s[0]&&"left"===m.left?"right"===g.left?(C+=f,m.left="right",C+=u,g.left="left"):"left"===g.left&&(C+=f,m.left="right",C-=u,g.left="right"):C+u>s[2]&&"right"===m.left?"left"===g.left?(C-=f,m.left="left",C-=u,g.left="right"):"right"===g.left&&(C-=f,m.left="left",C+=u,g.left="left"):"center"===m.left&&(C+u>s[2]&&"left"===g.left?(C-=u,g.left="right"):C<s[0]&&"right"===g.left&&(C+=u,g.left="left"))),"element"!==c&&"both"!==c||(y<s[1]&&"bottom"===g.top&&(y+=d,g.top="top"),y+d>s[3]&&"top"===g.top&&(y-=d,g.top="bottom")),"element"!==l&&"both"!==l||(C<s[0]&&("right"===g.left?(C+=u,g.left="left"):"center"===g.left&&(C+=u/2,g.left="left")),C+u>s[2]&&("left"===g.left?(C-=u,g.left="right"):"center"===g.left&&(C-=u/2,g.left="right"))),"string"==typeof e?e=e.split(",").map(function(e){return e.trim()}):!0===e&&(e=["top","left","right","bottom"]),e=e||[],[]),c=[];y<s[1]&&(0<=e.indexOf("top")?(y=s[1],a):c).push("top"),y+d>s[3]&&(0<=e.indexOf("bottom")?(y=s[3]-d,a):c).push("bottom"),C<s[0]&&(0<=e.indexOf("left")?(C=s[0],a):c).push("left"),C+u>s[2]&&(0<=e.indexOf("right")?(C=s[2]-u,a):c).push("right"),a.length&&(o=(o=void 0)!==v.options.pinnedClass?v.options.pinnedClass:v.getClass("pinned"),h.push(o),a.forEach(function(e){h.push(o+"-"+e)})),c.length&&(i=(i=void 0)!==v.options.outOfBoundsClass?v.options.outOfBoundsClass:v.getClass("out-of-bounds"),h.push(i),c.forEach(function(e){h.push(i+"-"+e)})),(0<=a.indexOf("left")||0<=a.indexOf("right"))&&(g.left=m.left=!1),(0<=a.indexOf("top")||0<=a.indexOf("bottom"))&&(g.top=m.top=!1),m.top===b.top&&m.left===b.left&&g.top===v.attachment.top&&g.left===v.attachment.left||(v.updateAttachClasses(g,m),v.trigger("update",{attachment:g,targetAttachment:m}))}),j(function(){!1!==v.options.addTargetClasses&&x(v.target,h,r),x(v.element,h,r)}),{top:y,left:C})}});var A=(g=w.Utils).getBounds,x=g.updateClasses,j=g.defer,L=(w.modules.push({position:function(e){var t=this,r=e.top,n=e.left,e=this.cache("element-bounds",function(){return A(t.element)}),o=e.height,e=e.width,i=this.getTargetBounds(),s=r+o,a=n+e,l=[],c=(r<=i.bottom&&s>=i.top&&["left","right"].forEach(function(e){var t=i[e];t!==n&&t!==a||l.push(e)}),n<=i.right&&a>=i.left&&["top","bottom"].forEach(function(e){var t=i[e];t!==r&&t!==s||l.push(e)}),[]),u=[];return c.push(this.getClass("abutted")),["left","top","right","bottom"].forEach(function(e){c.push(t.getClass("abutted")+"-"+e)}),l.length&&u.push(this.getClass("abutted")),l.forEach(function(e){u.push(t.getClass("abutted")+"-"+e)}),j(function(){!1!==t.options.addTargetClasses&&x(t.target,u,c),x(t.element,u,c)}),!0}}),function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var r=t,n=[],o=!0,t=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!r||n.length!==r);o=!0);}catch(e){t=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(t)throw i}}return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")});return w.modules.push({position:function(e){var t,r,n,o,i=e.top,e=e.left;if(this.options.shift)return t=this.options.shift,o=n=void 0,o="string"==typeof(t="function"==typeof this.options.shift?this.options.shift.call(this,{top:i,left:e}):t)?((t=t.split(" "))[1]=t[1]||t[0],n=(r=L(t,2))[0],o=r[1],n=parseFloat(n,10),parseFloat(o,10)):(n=t.top,t.left),{top:i+=n,left:e+=o}}}),R}),!function(e){var t,r,n=!1;"function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),n||(t=window.Cookies,(r=window.Cookies=e()).noConflict=function(){return window.Cookies=t,r})}(function(){function f(){for(var e=0,t={};e<arguments.length;e++){var r,n=arguments[e];for(r in n)t[r]=n[r]}return t}return function e(d){function p(e,t,r){var n,o;if("undefined"!=typeof document){if(1<arguments.length){"number"==typeof(r=f({path:"/"},p.defaults,r)).expires&&((o=new Date).setMilliseconds(o.getMilliseconds()+864e5*r.expires),r.expires=o);try{n=JSON.stringify(t),/^[\{\[]/.test(n)&&(t=n)}catch(e){}return t=d.write?d.write(t,e):encodeURIComponent(String(t)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[e,"=",t,r.expires?"; expires="+r.expires.toUTCString():"",r.path?"; path="+r.path:"",r.domain?"; domain="+r.domain:"","; secure","; SameSite=None"].join("")}e||(n={});for(var i=document.cookie?document.cookie.split("; "):[],s=/(%[0-9A-Z]{2})+/g,a=0;a<i.length;a++){var l=i[a].split("=");'"'===(u=l.slice(1).join("=")).charAt(0)&&(u=u.slice(1,-1));try{var c=l[0].replace(s,decodeURIComponent),u=d.read?d.read(u,c):d(u,c)||u.replace(s,decodeURIComponent);if(this.json)try{u=JSON.parse(u)}catch(e){}if(e===c){n=u;break}e||(n[c]=u)}catch(e){}}return n}}return(p.set=p).get=function(e){return p.call(p,e)},p.getJSON=function(){return p.apply({json:!0},[].slice.call(arguments))},p.defaults={},p.remove=function(e,t){p(e,"",f(t,{expires:-1}))},p.withConverter=e,p}(function(){})}),!function(e){var t=setTimeout;function n(){}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],u(e,this)}function o(r,n){for(;3===r._state;)r=r._value;0===r._state?r._deferreds.push(n):(r._handled=!0,i._immediateFn(function(){var e,t=1===r._state?n.onFulfilled:n.onRejected;if(null===t)(1===r._state?s:a)(n.promise,r._value);else{try{e=t(r._value)}catch(e){return void a(n.promise,e)}s(n.promise,e)}}))}function s(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var r=e.then;if(e instanceof i)return t._state=3,t._value=e,void l(t);if("function"==typeof r)return void u((n=r,o=e,function(){n.apply(o,arguments)}),t)}t._state=1,t._value=e,l(t)}catch(e){a(t,e)}var n,o}function a(e,t){e._state=2,e._value=t,l(e)}function l(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,r=e._deferreds.length;t<r;t++)o(e,e._deferreds[t]);e._deferreds=null}function c(e,t,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=r}function u(e,t){var r=!1;try{e(function(e){r||(r=!0,s(t,e))},function(e){r||(r=!0,a(t,e))})}catch(e){r||(r=!0,a(t,e))}}i.prototype.catch=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var r=new this.constructor(n);return o(this,new c(e,t,r)),r},i.all=function(e){var a=Array.prototype.slice.call(e);return new i(function(o,i){if(0===a.length)return o([]);var s=a.length;for(var e=0;e<a.length;e++)!function t(r,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){t(r,e)},i)}a[r]=e,0==--s&&o(a)}catch(e){i(e)}}(e,a[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(r){return new i(function(e,t){t(r)})},i.race=function(o){return new i(function(e,t){for(var r=0,n=o.length;r<n;r++)o[r].then(e,t)})},i._immediateFn="function"==typeof setImmediate?function(e){setImmediate(e)}:function(e){t(e,0)},i._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},"undefined"!=typeof module&&module.exports?module.exports=i:e.Promise||(e.Promise=i)}(this),!function(e){"use strict";var t,r,s,n,o,i,a,l,c,u;function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function p(e){return e="string"!=typeof e?String(e):e}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach(function(e,t){this.append(t,e)},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function m(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function g(r){return new Promise(function(e,t){r.onload=function(){e(r.result)},r.onerror=function(){t(r.error)}})}function v(e){var t=new FileReader,r=g(t);return t.readAsArrayBuffer(e),r}function y(e){var t;return e.slice?e.slice(0):((t=new Uint8Array(e.byteLength)).set(new Uint8Array(e)),t.buffer)}function C(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e)if("string"==typeof e)this._bodyText=e;else if(s&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(n&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(o&&s&&a(e))this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!o||!ArrayBuffer.prototype.isPrototypeOf(e)&&!l(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=y(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var e=m(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.text=function(){var e,t,r=m(this);if(r)return r;if(this._bodyBlob)return r=this._bodyBlob,e=new FileReader,t=g(e),e.readAsText(r),t;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),n&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}function b(e,t){var r,n=(t=t||{}).body;if("string"==typeof e)this.url=e;else{if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(e=t.method||this.method||"GET",r=e.toUpperCase(),-1<c.indexOf(r)?r:e),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function _(e){var r=new FormData;return e.trim().split("&").forEach(function(e){var t;e&&(t=(e=e.split("=")).shift().replace(/\+/g," "),e=e.join("=").replace(/\+/g," "),r.append(decodeURIComponent(t),decodeURIComponent(e)))}),r}function w(e,t){t=t||{},this.type="default",this.status="status"in t?t.status:200,this.ok=200<=this.status&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}e.fetch||(t="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,s="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),n="FormData"in e,(o="ArrayBuffer"in e)&&(i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=function(e){return e&&DataView.prototype.isPrototypeOf(e)},l=ArrayBuffer.isView||function(e){return e&&-1<i.indexOf(Object.prototype.toString.call(e))}),h.prototype.append=function(e,t){e=d(e),t=p(t);var r=this.map[e];this.map[e]=r?r+","+t:t},h.prototype.delete=function(e){delete this.map[d(e)]},h.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},h.prototype.set=function(e,t){this.map[d(e)]=p(t)},h.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},h.prototype.keys=function(){var r=[];return this.forEach(function(e,t){r.push(t)}),f(r)},h.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),f(t)},h.prototype.entries=function(){var r=[];return this.forEach(function(e,t){r.push([t,e])}),f(r)},r&&(h.prototype[Symbol.iterator]=h.prototype.entries),c=["DELETE","GET","HEAD","OPTIONS","POST","PUT"],b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},C.call(b.prototype),C.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e},u=[301,302,303,307,308],w.redirect=function(e,t){if(-1===u.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},e.Headers=h,e.Request=b,e.Response=w,e.fetch=function(r,i){return new Promise(function(n,e){var t=new b(r,i),o=new XMLHttpRequest;o.onload=function(){var r,e={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",r=new h,e.split("\r\n").forEach(function(e){var e=e.split(":"),t=e.shift().trim();t&&(e=e.join(":").trim(),r.append(t,e))}),r)},t=(e.url="responseURL"in o?o.responseURL:e.headers.get("X-Request-URL"),"response"in o?o.response:o.responseText);n(new w(t,e))},o.onerror=function(){e(new TypeError("Network request failed"))},o.ontimeout=function(){e(new TypeError("Network request failed"))},o.open(t.method,t.url,!0),"include"===t.credentials&&(o.withCredentials=!0),"responseType"in o&&s&&(o.responseType="blob"),t.headers.forEach(function(e,t){o.setRequestHeader(t,e)}),o.send(void 0===t._bodyInit?null:t._bodyInit)})},e.fetch.polyfill=!0)}("undefined"!=typeof self?self:this);var Observable=function(){function i(e,t){e(t)}function s(e,t){e.apply(null,t)}function o(){if(!(this instanceof o))return new o;this.observers=null,this.current=null}return o.prototype.subscribe=function(t){null!=this.observers?this.observers.push(t):this.observers=[t],null!=this.current&&t.apply(null,this.current);var r=this;return function(){var e=r.observers.indexOf(t);-1!==e&&r.observers.splice(e,1)}},o.prototype.emit=function(e){if(this.current=Array.prototype.slice.call(arguments,0),null!=this.observers)for(var t=1<arguments.length,r=t?s:i,n=t?Array.prototype.slice.call(arguments):e,o=0;o<this.observers.length;o++)r(this.observers[o],n)},o.prototype.bindEmit=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(this),this.emit.bind.apply(this.emit,e)},o.merge=function(e){for(var t=new o,r=t.emit.bind(t),n=0;n<arguments.length;n++)arguments[n].subscribe(r);return{subscribe:t.subscribe.bind(t)}},o.fromDomEvent=function(e,t,r){var e=e instanceof jQuery?e:$(e),n=new o;return e.on(t,r||null,function(e){n.emit(this,e)}),n},o}(),Stores=function(){t=[];var t,a={getInstance:function(e){return t[e]},addInstance:function(e){return t.push(e),t.length-1}};function o(e,t){for(var r=t.length,n=[e],o=2;o<r;o++)n.push(t[o]);return n}function i(e,t){for(var r=0;r<e.length;r++)e[r](t)}function l(e,t,r){var n=3<arguments.length?t.apply(null,o(e.currentState,arguments)):t(e.currentState,r);e.currentState=n,i(e.subscriptions,n)}function c(e,t,r){if(!(this instanceof c))return new c(e,t,r);var n,o={subscriptions:[],currentState:r||null};for(n in this.storeId=a.addInstance(o),t)if(t.hasOwnProperty(n)){if(!e.hasOwnProperty(n))throw new Error("Observable not provided for reducer keyed at "+n+".");var i=e[n],s=t[n];i.subscribe(l.bind(null,o,s))}}function u(e,t,r){var n=3<arguments.length?t.apply(null,o(e.currentState,arguments)):t(e.currentState,r);e.pastEvents.push({payload:r,state:n}),e.currentState=n,null!=e.futureEvents&&(e.futureEvents=null),i(e.subscriptions,n)}c.prototype.getState=function(){return a.getInstance(this.storeId).currentState},c.prototype.subscribe=function(t){var e=a.getInstance(this.storeId),r=e.subscriptions;return r.push(t),null!=e.currentState&&t(e.currentState),function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}},c.prototype.reset=function(e){var t=a.getInstance(this.storeId);t.currentState=e||null,i(t.subscriptions,t.currentState)};function d(e,t,r){if(!(this instanceof d))return new d(e,t,r);var n,o={pastEvents:[],futureEvents:null,subscriptions:[],currentState:r||null,initialState:r||null};for(n in this.storeId=a.addInstance(o),t)if(t.hasOwnProperty(n)){if(!e.hasOwnProperty(n))throw new Error("Observable not provided for reducer keyed at "+n+".");var i=e[n],s=t[n];i.subscribe(u.bind(null,o,s))}}return d.prototype.getState=function(){return a.getInstance(this.storeId).currentState},d.prototype.subscribe=function(t){var e=a.getInstance(this.storeId),r=e.subscriptions;return r.push(t),null!=e.currentState&&t(e.currentState),function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}},d.prototype.undo=function(){var e,t=a.getInstance(this.storeId),r=t.pastEvents;0!==r.length&&(e=r.pop(),null==t.futureEvents?t.futureEvents=[e]:t.futureEvents.unshift(e),e=0<r.length?r[r.length-1].state:t.initialState,t.currentState=e,i(t.subscriptions,e))},d.prototype.redo=function(){var e=a.getInstance(this.storeId),t=e.futureEvents;null!=t&&0!==t.length&&(t=t.shift(),e.pastEvents.push(t),e.currentState=t.state,i(e.subscriptions,t.state))},d.prototype.reset=function(e){var t=a.getInstance(this.storeId);t.pastEvents=[],t.futureEvents=null,t.currentState=e||null,t.initialState=e||null,i(t.subscriptions,t.currentState)},{AggregateStore:c,EventStore:d}}(),$=(!function(){"use strict";function l(e){var t;e&&(t=function(){e&&e.parentNode&&e.parentNode.removeChild(e)},e.classList.remove("show"),e.classList.add("hide"),e.addEventListener("transitionend",t),setTimeout(t,r))}var r=500;function e(){var i={parent:document.body,version:"1.0.11",defaultOkLabel:"Ok",okLabel:"Ok",defaultCancelLabel:"Cancel",cancelLabel:"Cancel",defaultMaxLogItems:2,maxLogItems:2,promptValue:"",promptPlaceholder:"",closeLogOnClick:!1,closeLogOnClickDefault:!1,delay:5e3,defaultDelay:5e3,logContainerClass:"alertify-logs",logContainerDefaultClass:"alertify-logs",dialogs:{buttons:{holder:"<nav>{{buttons}}</nav>",ok:"<button class='ok' tabindex='1'>{{ok}}</button>",cancel:"<button class='cancel' tabindex='2'>{{cancel}}</button>"},input:"<input type='text'>",message:"<p class='msg'>{{message}}</p>",log:"<div class='{{class}}'>{{message}}</div>"},defaultDialogs:{buttons:{holder:"<nav>{{buttons}}</nav>",ok:"<button class='ok' tabindex='1'>{{ok}}</button>",cancel:"<button class='cancel' tabindex='2'>{{cancel}}</button>"},input:"<input type='text'>",message:"<p class='msg'>{{message}}</p>",log:"<div class='{{class}}'>{{message}}</div>"},build:function(e){var t=this.dialogs.buttons.ok,r="<div class='dialog'><div>"+this.dialogs.message.replace("{{message}}",e.message);return"confirm"!==e.type&&"prompt"!==e.type||(t=this.dialogs.buttons.cancel+this.dialogs.buttons.ok),"prompt"===e.type&&(r+=this.dialogs.input),r=(r+this.dialogs.buttons.holder+"</div></div>").replace("{{buttons}}",t).replace("{{ok}}",this.okLabel).replace("{{cancel}}",this.cancelLabel)},setCloseLogOnClick:function(e){this.closeLogOnClick=!!e},close:function(e,t){this.closeLogOnClick&&e.addEventListener("click",function(){l(e)}),(t=t&&!isNaN(+t)?+t:this.delay)<0?l(e):0<t&&setTimeout(function(){l(e)},t)},dialog:function(e,t,r,n){return this.setup({type:t,message:e,onOkay:r,onCancel:n})},log:function(e,t,r){var n=document.querySelectorAll(".alertify-logs > div");if(n){var o=n.length-this.maxLogItems;if(0<=o)for(var i=0,s=1+o;i<s;i++)this.close(n[i],-1)}this.notify(e,t,r)},setLogPosition:function(e){this.logContainerClass="alertify-logs "+e},setupLogContainer:function(){var e=document.querySelector(".alertify-logs"),t=this.logContainerClass;return e||((e=document.createElement("div")).className=t,this.parent.appendChild(e)),e.className!==t&&(e.className=t),e},notify:function(e,t,r){var n=this.setupLogContainer(),o=document.createElement("div");o.className=t||"default",i.logTemplateMethod?o.innerHTML=i.logTemplateMethod(e):o.innerHTML=e,"function"==typeof r&&o.addEventListener("click",r),n.appendChild(o),setTimeout(function(){o.className+=" show"},10),this.close(o,this.delay)},setup:function(r){var e,n=document.createElement("div"),o=(n.className="alertify hide",n.innerHTML=this.build(r),n.querySelector(".ok")),i=n.querySelector(".cancel"),s=n.querySelector("input"),t=n.querySelector("label");function a(t){"function"!=typeof t&&(t=function(){}),o&&o.addEventListener("click",function(e){r.onOkay&&"function"==typeof r.onOkay&&(s?r.onOkay(s.value,e):r.onOkay(e)),t(s?{buttonClicked:"ok",inputValue:s.value,event:e}:{buttonClicked:"ok",event:e}),l(n)}),i&&i.addEventListener("click",function(e){r.onCancel&&"function"==typeof r.onCancel&&r.onCancel(e),t({buttonClicked:"cancel",event:e}),l(n)}),s&&s.addEventListener("keyup",function(e){13===e.which&&o.click()})}return s&&("string"==typeof this.promptPlaceholder&&(t?t.textContent=this.promptPlaceholder:s.placeholder=this.promptPlaceholder),"string"==typeof this.promptValue)&&(s.value=this.promptValue),"function"==typeof Promise?e=new Promise(a):a(),this.parent.appendChild(n),setTimeout(function(){n.classList.remove("hide"),s&&r.type&&"prompt"===r.type?(s.select(),s.focus()):o&&o.focus()},100),e},okBtn:function(e){return this.okLabel=e,this},setDelay:function(e){return e=e||0,this.delay=isNaN(e)?this.defaultDelay:parseInt(e,10),this},cancelBtn:function(e){return this.cancelLabel=e,this},setMaxLogItems:function(e){this.maxLogItems=parseInt(e||this.defaultMaxLogItems)},theme:function(e){switch(e.toLowerCase()){case"bootstrap":this.dialogs.buttons.ok="<button class='ok btn btn-primary' tabindex='1'>{{ok}}</button>",this.dialogs.buttons.cancel="<button class='cancel btn btn-default' tabindex='2'>{{cancel}}</button>",this.dialogs.input="<input type='text' class='form-control'>";break;case"purecss":this.dialogs.buttons.ok="<button class='ok pure-button' tabindex='1'>{{ok}}</button>",this.dialogs.buttons.cancel="<button class='cancel pure-button' tabindex='2'>{{cancel}}</button>";break;case"mdl":case"material-design-light":this.dialogs.buttons.ok="<button class='ok mdl-button mdl-js-button mdl-js-ripple-effect'  tabindex='1'>{{ok}}</button>",this.dialogs.buttons.cancel="<button class='cancel mdl-button mdl-js-button mdl-js-ripple-effect' tabindex='2'>{{cancel}}</button>",this.dialogs.input="<div class='mdl-textfield mdl-js-textfield'><input class='mdl-textfield__input'><label class='md-textfield__label'></label></div>";break;case"angular-material":this.dialogs.buttons.ok="<button class='ok md-primary md-button' tabindex='1'>{{ok}}</button>",this.dialogs.buttons.cancel="<button class='cancel md-button' tabindex='2'>{{cancel}}</button>",this.dialogs.input="<div layout='column'><md-input-container md-no-float><input type='text'></md-input-container></div>";break;default:this.dialogs.buttons.ok=this.defaultDialogs.buttons.ok,this.dialogs.buttons.cancel=this.defaultDialogs.buttons.cancel,this.dialogs.input=this.defaultDialogs.input}},reset:function(){this.parent=document.body,this.theme("default"),this.okBtn(this.defaultOkLabel),this.cancelBtn(this.defaultCancelLabel),this.setMaxLogItems(),this.promptValue="",this.promptPlaceholder="",this.delay=this.defaultDelay,this.setCloseLogOnClick(this.closeLogOnClickDefault),this.setLogPosition("bottom left"),this.logTemplateMethod=null},injectCSS:function(){var e,t;document.querySelector("#alertifyCSS")||(e=document.getElementsByTagName("head")[0],(t=document.createElement("style")).type="text/css",t.id="alertifyCSS",t.innerHTML="/* style.css */",e.insertBefore(t,e.firstChild))},removeCSS:function(){var e=document.querySelector("#alertifyCSS");e&&e.parentNode&&e.parentNode.removeChild(e)}};return i.injectCSS(),{_$$alertify:i,parent:function(e){i.parent=e},reset:function(){return i.reset(),this},alert:function(e,t,r){return i.dialog(e,"alert",t,r)||this},confirm:function(e,t,r){return i.dialog(e,"confirm",t,r)||this},prompt:function(e,t,r){return i.dialog(e,"prompt",t,r)||this},log:function(e,t){return i.log(e,"default",t),this},theme:function(e){return i.theme(e),this},success:function(e,t){return i.log(e,"success",t),this},error:function(e,t){return i.log(e,"error",t),this},cancelBtn:function(e){return i.cancelBtn(e),this},okBtn:function(e){return i.okBtn(e),this},delay:function(e){return i.setDelay(e),this},placeholder:function(e){return i.promptPlaceholder=e,this},defaultValue:function(e){return i.promptValue=e,this},maxLogItems:function(e){return i.setMaxLogItems(e),this},closeLogOnClick:function(e){return i.setCloseLogOnClick(!!e),this},logPosition:function(e){return i.setLogPosition(e||""),this},setLogTemplate:function(e){return i.logTemplateMethod=e,this},clearLogs:function(){return i.setupLogContainer().innerHTML="",this},version:i.version}}if("undefined"!=typeof module&&module&&module.exports){module.exports=function(){return new e};var t,n=new e;for(t in n)module.exports[t]=n[t]}else"function"==typeof define&&define.amd?define(function(){return new e}):window.alertify=new e}(),!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(n,t){var l=6,a=n.event.add,o=n.event.remove,c=function(e,t,r){n.event.trigger(t,r,e)},i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e,t){return window.setTimeout(function(){e()},25)},r={textarea:!0,input:!0,select:!0,button:!0},u={move:"mousemove",cancel:"mouseup dragstart",end:"mouseup"},d="touchmove",s="touchend",e="touchend";function p(e){var r=e,n=!1,o=!1;function t(e){n?(r(),i(t),n=!(o=!0)):o=!1}this.kick=function(e){n=!0,o||t()},this.end=function(e){var t=r;e&&(o?(r=n?function(){t(),e()}:e,n=!0):e())}}function f(){return!0}function h(){return!1}function m(e){e.preventDefault()}function g(e){r[e.target.tagName.toLowerCase()]||e.preventDefault()}function v(e,t){var r,n;if(e.identifiedTouch)return e.identifiedTouch(t);for(r=-1,n=e.length;++r<n;)if(e[r].identifier===t)return e[r]}function y(e,t){e=v(e.changedTouches,t.identifier);if(e&&(e.pageX!==t.pageX||e.pageY!==t.pageY))return e}function C(e){M(e,e.data,e,_)}function b(e){_()}function _(){o(document,u.move,C),o(document,u.cancel,b)}function w(e){var t=e.data,r=y(e,t);r&&M(e,t,r,S)}function A(e){var t=e.data;v(e.changedTouches,t.identifier)&&S(t.identifier)}function S(e){o(document,"."+e,w),o(document,"."+e,A)}function M(e,t,r,n){var o,i,s=r.pageX-t.startX,a=r.pageY-t.startY;s*s+a*a<l*l||(o=e,e=r,r=s,s=a,a=n,(n=t).target,t=o.targetTouches,i=o.timeStamp-n.timeStamp,n.type="movestart",n.distX=r,n.distY=s,n.deltaX=r,n.deltaY=s,n.pageX=e.pageX,n.pageY=e.pageY,n.velocityX=r/i,n.velocityY=s/i,n.targetTouches=t,n.finger=t?t.length:1,n._handled=x,n._preventTouchmoveDefault=function(){o.preventDefault()},c(n.target,n),a(n.identifier))}function x(){return this._handled=f,!1}function j(e){e._handled()}function k(e){var t=e.data.timer;(e.data.touch=e).data.timeStamp=e.timeStamp,t.kick()}function L(e){var t=e.data.event,e=e.data.timer;o(document,u.move,k),o(document,u.end,L),I(t,e,function(){setTimeout(function(){o(t.target,"click",h)},0)})}function H(e){var t=e.data.event,r=e.data.timer,n=y(e,t);n&&(e.preventDefault(),t.targetTouches=e.targetTouches,e.data.touch=n,e.data.timeStamp=e.timeStamp,r.kick())}function P(e){var t=e.data.event,r=e.data.timer;v(e.changedTouches,t.identifier)&&(e=t,o(document,"."+e.identifier,H),o(document,"."+e.identifier,P),I(t,r))}function I(e,t,r){t.end(function(){return e.type="moveend",c(e.target,e),r&&r()})}if(n.event.special.movestart={setup:function(e,t,r){return a(this,"movestart.move",j),!0},teardown:function(e){return o(this,"dragstart drag",m),o(this,"mousedown touchstart",g),o(this,"movestart",j),!0},add:function(e){"move"!==e.namespace&&"moveend"!==e.namespace&&(a(this,"dragstart."+e.guid+" drag."+e.guid,m,t,e.selector),a(this,"mousedown."+e.guid,g,t,e.selector))},remove:function(e){"move"!==e.namespace&&"moveend"!==e.namespace&&(o(this,"dragstart."+e.guid+" drag."+e.guid),o(this,"mousedown."+e.guid))},_default:function(o){var i,s;o._handled()&&(i={target:o.target,startX:o.startX,startY:o.startY,pageX:o.pageX,pageY:o.pageY,distX:o.distX,distY:o.distY,deltaX:o.deltaX,deltaY:o.deltaY,velocityX:o.velocityX,velocityY:o.velocityY,timeStamp:o.timeStamp,identifier:o.identifier,targetTouches:o.targetTouches,finger:o.finger},s={event:i,timer:new p(function(e){var t,r,n;t=i,r=s.touch,n=s.timeStamp,n-=t.timeStamp,t.type="move",t.distX=r.pageX-t.startX,t.distY=r.pageY-t.startY,t.deltaX=r.pageX-t.pageX,t.deltaY=r.pageY-t.pageY,t.velocityX=.3*t.velocityX+.7*t.deltaX/n,t.velocityY=.3*t.velocityY+.7*t.deltaY/n,t.pageX=r.pageX,t.pageY=r.pageY,c(o.target,i)}),touch:t,timeStamp:t},o.identifier===t?(a(o.target,"click",h),a(document,u.move,k,s),a(document,u.end,L,s)):(o._preventTouchmoveDefault(),a(document,d+"."+o.identifier,H,s),a(document,e+"."+o.identifier,P,s)))}},n.event.special.move={setup:function(){a(this,"movestart.move",n.noop)},teardown:function(){o(this,"movestart.move",n.noop)}},n.event.special.moveend={setup:function(){a(this,"movestart.moveend",n.noop)},teardown:function(){o(this,"movestart.moveend",n.noop)}},a(document,"mousedown.move",function(e){var t;1!==(t=e).which||t.ctrlKey||t.altKey||(t={target:e.target,startX:e.pageX,startY:e.pageY,timeStamp:e.timeStamp},a(document,u.move,C,t),a(document,u.cancel,b,t))}),a(document,"touchstart.move",function(e){var t;r[e.target.tagName.toLowerCase()]||(e={target:(t=e.changedTouches[0]).target,startX:t.pageX,startY:t.pageY,timeStamp:e.timeStamp,identifier:t.identifier},a(document,d+"."+t.identifier,w,e),a(document,s+"."+t.identifier,A,e))}),"function"==typeof Array.prototype.indexOf)for(var T=n,z=["changedTouches","targetTouches"],R=z.length;R--;)-1===T.event.props.indexOf(z[R])&&T.event.props.push(z[R])}),!function(m){m.fn.slider=function(h){h=m.extend({default_offset_pct:.5,orientation:"horizontal"},h);return this.each(function(){function t(e){e=l(e),a.css("vertical"===o?"top":"left","vertical"===o?e.ch:e.cw),c(e)}var r=h.default_offset_pct,n=m(this),o=h.orientation,e="vertical"===o?"down":"left",i="vertical"===o?"up":"right",s=n.children().eq(0),a=(n.append('<div class="slider-handle"></div>'),n.find(".slider-handle")),l=(a.append('<div class="slider-controls"><span class="slider-'+e+'-arrow"></span><span class="slider-'+i+'-arrow"></span></div><div class="slider-bar"></div>'),function(e){var t=s.width(),r=s.height();return{w:t+"px",h:r+"px",cw:e*t+"px",ch:e*r+"px"}}),c=function(e){"vertical"===o?s.css("clip","rect(0,"+e.w+","+e.ch+",0)"):s.css("clip","rect(0,"+e.cw+","+e.h+",0)")},u=(m(window).on("resize.slider",function(e){t(r)}),0),d=0,p=0,f=0;a.on("movestart",function(e){((e.distX>e.distY&&e.distX<-e.distY||e.distX<e.distY&&e.distX>-e.distY)&&"vertical"!==o||(e.distX<e.distY&&e.distX<-e.distY||e.distX>e.distY&&e.distX>-e.distY)&&"vertical"===o)&&e.preventDefault(),n.addClass("active"),u=n.offset().left,d=n.offset().top,p=s.width(),f=s.height()}),a.on("moveend",function(e){n.removeClass("active")}),a.on("move",function(e){n.hasClass("active")&&(r="vertical"===o?(e.pageY-d)/f:(e.pageX-u)/p,t(r=1<(r=r<0?0:r)?1:r))}),n.find("img").on("mousedown",function(e){e.preventDefault()}),m(window).trigger("resize.slider")})}}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(){"use strict";var e=debug("cham:debug");CHAM.log=debug("cham:log"),CHAM.info=debug("cham:info"),CHAM.error=debug("cham:error"),CHAM.debug={color:{green:"color: #5cb85c;",red:"color: #c9302c;",blue:"color: #286090;",yellow:"color: #f0ad4e;"},init:function(){"localhost"!==window.location.hostname||e.enabled||console.log("To enable debugging enter%c CHAM.debug.enable %cin the console",this.color.green+" font-size: 15px; font-weight: bold;",""),e("%c🚨 %cDebug Enabled %c🚨",this.color.red+"font-size: 25px","font-size: 25px",this.color.red+"font-size: 25px"),e("To disable debugging enter%c CHAM.debug.disable %cin the console",this.color.yellow+" font-size: 15px; font-weight: bold;",""),window.setTimeout(function(){e("CHAM.DATA",CHAM.DATA)},3e3)},enable:function(){},disable:function(){}}}(jQuery),CHAM.debug.enable.toString=function(){return debug.enable("cham:*"),console.log("(%c✔%c) Debugging Enabled",CHAM.debug.color.green,""),""},CHAM.debug.disable.toString=function(){return debug.disable("cham:*"),console.log("(%c✘%c) Debugging Disabled",CHAM.debug.color.red,""),""},jQuery.noConflict()),CHAM=CHAM||{},$=(!function(){"use strict";debug("cham:data");CHAM.DATA={products:{}},CHAM.services={lizard:"/services/jsonProxy.ashx?remoteURL=https://lizard.chameleonpower.com/",getScenesBySiteID:function(){return fetch(this.lizard+"RoomScene/SiteID/"+CHAM.SiteID).then(function(e){return e.json()})},getScenesBySeriesID:function(e){return fetch(this.lizard+"RoomScene/SeriesID/"+e).then(function(e){return e.json()})},getProductsBySeriesID:function(e){return fetch(this.lizard+"Product/Series/"+e).then(function(e){return e.json()})},getProductsBySeriesIDs:function(e){e=e.join(",");return fetch(this.lizard+"Product/SeriesList/"+e).then(function(e){return e.json()})},getComplementaryColors:function(){return fetch("../../data/phi.min.json").then(function(e){return e.json().then(function(e){return e})})}}}(jQuery),CHAM.compiled={"landing-slides":function(obj){obj=obj||{};var __t,__p="",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)_.each(featuredColors,function(e,t){var r=e.name.replace(/ /g,"-");__p+='\r\n\r\n  <div class="featured-slide'+(null==(__t=0===t?" active":"")?"":__t)+'" data-index="'+(null==(__t=t)?"":__t)+'"\r\n    style="background-image: url(\''+(null==(__t="/img/featured-colors/scenes/"+r+".jpg")?"":__t)+'\');">\r\n    <div class="paint-chips">\r\n      <div class="chips" style="background-image: url(\''+(null==(__t="/img/featured-colors/chips/"+r+".png")?"":__t)+'\');"></div>\r\n      <div class="paint-color">\r\n        <h2>'+(null==(__t=e.name)?"":__t)+"</h2>\r\n        <h3>"+(null==(__t=e.sku)?"":__t)+'</h3>\r\n      </div>\r\n      <div class="brand">\r\n        <img src="/img/logo-white-white.png" />\r\n      </div>\r\n    </div>\r\n  </div>\r\n'});return __p},scene:function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)_.each(scenes,function(e,t){__p+='\r\n  <li data-spec="'+__e(e.specifier)+'">\r\n    <img data-src="/services/getImage.ashx?type=scene&seln='+__e(e.productId)+"&specifier="+__e(e.specifier)+'&size=300">\r\n  </li>\r\n'}),__p+="\r\n";return __p},"menu/accordion":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)_.each(surfaces,function(e,t){__p+='\r\n  <li data-surfacenumber="'+__e(e.specifiersurfacenumber)+'"><div>'+__e(e.name)+"</div></li>\r\n"}),__p+="\r\n";return __p},"menu/colors-menu":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){var favoriteColorsIdsList=_(favoriteColorsList).map(function(e){return e.id});__p+='\r\n\r\n\r\n<ul class="swatches">\r\n  ',_.each(colorGroup,function(e){__p+='\r\n  <li class="active" style="background-color:#'+__e(e.colorHEX)+';" data-id="'+__e(e.id)+'">\r\n    <div class="color-name">\r\n      <div class="heart-outline '+__e(-1===favoriteColorsIdsList.indexOf(e.id)?"active":"")+'">\r\n        <i class="fa fa-heart-o"></i>\r\n      </div>\r\n      <div class="heart-filled '+__e(-1<favoriteColorsIdsList.indexOf(e.id)?"active":"")+'">\r\n        <i class="fa fa-heart"></i>\r\n      </div>\r\n      <p>'+__e(e.name)+"</p>\r\n      <h6>"+__e(e.sku)+'</h6>\r\n    </div>\r\n    <div class="surface-applied">\r\n      <ul class="surfaces-app">\r\n        ',null!=appliedColorsSurfaces&&null!=appliedColorsSurfaces[e.id]&&(__p+="\r\n        ",e=_(appliedColorsSurfaces[e.id]).map(function(e){return e.surfaceApplied}).value().join(", "),__p+="\r\n        <li>"+(null==(__t=e)?"":__t)+"</li>\r\n\r\n        "),__p+="\r\n\r\n      </ul>\r\n    </div>\r\n  </li>\r\n  "}),__p+="\r\n\r\n</ul>\r\n"}return __p},"menu/harmony":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)console.log("harmony temp",groups),_.each(groups,function(e,t){__p+='\r\n\r\n\r\n\r\n<li data-group="'+__e(e.group)+'" data-index="'+__e(t)+'">\r\n  <div class="large-group">\r\n    ',_.each(e.products,function(e,t){__p+="\r\n    ","Roof"===t&&null!=e.product&&(__p+='\r\n    <div class="thumb '+__e(t)+'">\r\n      <div class="tri-left"></div>\r\n      <img src="/services/getImage.ashx?type=product&seln='+(null==(__t=e.sel)?"":__t)+"&specifier="+(null==(__t=e.product.specifier)?"":__t)+'&size=200">\r\n      \x3c!--<span>Color Info</span>--\x3e\r\n      <div class="tri-right"></div>\r\n\r\n    </div>\r\n    '),__p+="\r\n    ","Walls"===t&&null!=e.product&&(__p+='\r\n    <div class="thumb '+__e(t)+'" style="background-color:'+__e(e.product.specifier.replace("COLOR(RGB","rgb").replace("))",")"))+';"><span>'+__e(e.product.name)+"</span></div>\r\n    "),__p+="\r\n    "}),__p+='\r\n  </div>\r\n  <div class="small-group">\r\n\r\n    ',_.each(e.products,function(e,t){__p+="\r\n    ","Accent"===t&&null!=e.product&&(__p+='\r\n    <div class="thumb '+__e(t)+'" style="background-color: '+__e(e.product.specifier.replace("COLOR(RGB","rgb").replace("))",")"))+';"><span>'+__e(e.product.name)+"</span></div>\r\n    "),__p+="\r\n    ","TrimFascia"===t&&null!=e.product&&(__p+='\r\n    <div class="thumb '+__e(t)+'" style="background-color: '+__e(e.product.specifier.replace("COLOR(RGB","rgb").replace("))",")"))+';"><span>'+__e(e.product.name)+"</span></div>\r\n    "),__p+="\r\n    "}),__p+='\r\n  </div>\r\n  <button class="apply-btn" data-index="'+__e(t)+'">Apply</button>\r\n  <button class="applied-btn" data-index="'+__e(t)+'">Applied</button>\r\n</li>\r\n\r\n'}),__p+="\r\n";return __p},"menu/menu-header-btns":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+="\r\n";var list=[],wallsArr=["Surfaces","Type","Style","Color"],trimFasciaArr=["Type","Color"],extrasArr=["Surfaces","Color"];"Walls"===surface&&(list=wallsArr),"TrimFascia"===surface&&(list=trimFasciaArr),"Extras"===surface&&(list=extrasArr),__p+="\r\n<ul>\r\n  \r\n\r\n  ",_.each(list,function(e,t){__p+="\r\n  ";var t=null!=list[t-1]?list[t-1].toLowerCase():null,r="",n="";null!=model[e.toLowerCase()]&&(r="active"),null!=model[t]&&0<model[t].length&&"Color"!==e&&"Style"!==e&&(r="active"),e.toLowerCase()===current&&(n="selected"),"style"!==e.toLowerCase()||"Brick"!==model.type&&"Stone"!==model.type||(r=""),__p+='\r\n    <li class="'+__e(n)+" "+__e(r)+' section-btn" data-section="'+__e(e)+'">'+__e(e)+"</li>\r\n    "}),__p+="\r\n  \r\n\r\n</ul>\r\n\r\n\r\n"}return __p},"menu/menuBreadcrumbs":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+="\r\n\r\n<ul>\r\n  ",Object.keys(model).forEach(function(e){__p+="\r\n  \r\n\r\n  ",null!=model[e]&&0<model[e].length&&(__p+='\r\n  <li class="'+__e(e)+' breadcrumb" data-section="'+__e(e)+'"><p data-section="'+__e(e)+'">'+__e(model[e])+"</p></li>\r\n  "),__p+="\r\n\r\n  "}),__p+="\r\n  \r\n</ul>";return __p},"menu/menuTitleText":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+="\r\n";var textModel=CHAM.DATA.menuTitleText[surface.toLowerCase()];if("Brick"===model.type||"Stone"===model.type?current=model.type.toLowerCase():null!=model.surfaces&&model.surfaces.includes("Roof")?current="roof":current,null==textModel[current])return;__p+="\r\n\r\n<h4>"+__e(textModel[current].header.includes("Siding")?textModel[current].header.replace("Siding",model.type):textModel[current].header)+"</h4>\r\n<p>"+__e(textModel[current].subtext)+"</p>\r\n"}return __p},"menu/products-menu":function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\r\n<div class="'+__e(surface.toLowerCase())+'-menu product-menu-container" data-surfacegroup="'+__e(surface)+'">\r\n  <div class="menu-wrapper">\r\n    <div class="menu-header-btns">\r\n      <ul>\r\n        <li class="active">Surfaces</li>\r\n        <li class="selected">Type</li>\r\n        <li>Style</li>\r\n        <li>Color</li>\r\n      </ul>\r\n    </div>\r\n    \r\n    <div class="applied-menu-breadcrumbs">\r\n      <ul>\r\n        <li>Surface, Surface, Surface</li>\r\n        <li>Product Type</li>\r\n        <li>Product Style</li>\r\n        <li>Product Color</li>\r\n      </ul>\r\n    </div>\r\n\r\n    <div class="menu-title">\r\n      <h4>Choose Wall Surface(s)</h4>\r\n      <p>Select which surface(s) to add product to. Clicking on eye will highlight where the surface is located in the scene.</p>\r\n    </div>\r\n      \r\n      <div class="menu-filter-wrapper">\r\n          <div class="sub-surfaces">\r\n              <ul>\r\n                <li class="">\r\n                    <div class="eye"><img src="/img/eye.svg" /></div>\r\n                    <h4>All</h4>\r\n                </li>\r\n                <li class="">\r\n                  <div class="eye"><img src="/img/eye.svg" /></div>\r\n                  <h4>Surface</h4>\r\n                </li>\r\n                <li class="">\r\n                  <div class="eye"><img src="/img/eye.svg" /></div>\r\n                  <h4>Surface</h4>\r\n                </li>\r\n                <li class="">\r\n                  <div class="eye"><img src="/img/eye.svg" /></div>\r\n                  <h4>Surface</h4>\r\n                </li>\r\n                <li class="">\r\n                  <div class="eye"><img src="/img/eye.svg" /></div>\r\n                  <h4>Surface</h4>\r\n                </li>\r\n                <li class="">\r\n                  <div class="eye"><img src="/img/eye.svg" /></div>\r\n                  <h4>Surface</h4>\r\n                </li>\r\n              </ul>\r\n\r\n          </div>\r\n\r\n          <div class="explore-step">\r\n              <p>Ready to start exploring products?</p>\r\n              <h4>Select an LP<sup>&reg</sup>  Smartside<sup>&reg</sup>  Product</h4>\r\n          </div>\r\n      </div>\r\n  </div>\r\n  \r\n  <div class="menu-footer">\r\n    <h3>Get Inspired!</h3>\r\n    <p>Explore our recommended color sets here.</p>\r\n    <h5>Recommended Color Sets</h5>\r\n  </div>\r\n</div>\r\n\n';return __p},"menu/sub-surfaces":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+="\r\n";var state=CHAM.events.appliedStore.getState(),appliedSurfaceCheck;__p+='\r\n\r\n<div class="sub-surfaces">\r\n  <ul>\r\n    ',1===filters.length&&(__p+='\r\n    <li class="'+__e(currentSurfacesSelected.includes("All")?"active":"")+'" data-name="All" data-group="'+__e(filters[0].group)+'" data-surfacenumber="All">\r\n      <div class="eye"><img src="/img/eye.svg"/></div>\r\n      <h4>All '+__e("Walls"===filters[0].group?"Walls":"")+"</h4>\r\n    </li>\r\n    "),__p+="\r\n    ",1<filters.length&&(__p+='\r\n    <li class="'+__e(currentSurfacesSelected.includes("All")?"active":"")+'" data-name="All" data-group="'+__e(filters[0].group)+'" data-surfacenumber="All">\r\n      <div class="eye"><img src="/img/eye.svg"/></div>\r\n      <h4>All '+__e("Walls"===filters[0].group?"Walls":"")+"</h4>\r\n    </li>\r\n    ",appliedSurfaceCheck=!1,__p+="\r\n    ",_.each(filters,function(e){__p+="\r\n    ",(currentSurfacesSelected.includes(e.name)||currentSurfacesSelected.includes("All"))&&(appliedSurfaceCheck=!0),__p+='\r\n    <li data-name="'+(null==(__t=e.name)?"":__t)+'" data-group="'+__e(e.group)+'" data-surfacenumber="'+__e(e.sortorder)+'" class="'+__e(currentSurfacesSelected.includes(e.name)?"active":"")+'">\r\n      <div class="eye"><img src="/img/eye.svg"/></div>\r\n      <h4>'+(null==(__t=e.name)?"":__t)+"</h4>\r\n    </li>\r\n    "}),__p+="\r\n    "),__p+='\r\n  </ul>\r\n</div>\r\n\r\n<div class="explore-step '+__e(appliedSurfaceCheck?"active":"")+'" data-section="'+__e("Walls"===filters[0].group?"type":"color")+'">\r\n  ',"Walls"===filters[0].group&&(__p+='\r\n  <p data-section="type">Ready to start exploring products?</p>\r\n  <h4 data-section="type">Select Your LP<sup>&reg</sup> Smartside<sup>&reg</sup> Product</h4>\r\n  '),__p+="\r\n  ","Extras"===filters[0].group&&(__p+='\r\n  <p data-section="color">Ready to start exploring colors?</p>\r\n  <h4 data-section="color">Select Your Color</h4>\r\n  '),__p+="\r\n</div>\r\n\r\n","Extras"===filters[0].group&&-1<state.surfaceGroupsObjs.Roof.length&&(__p+='\r\n<div class="extras-roof-wrapper">\r\n  <h4>Update the Roof</h4>\r\n  <p>Select a different color for the roof.</p>\r\n  <div class="root-surface-btn" data-name="Roof">\r\n    <h4>Change Roof</h4>\r\n  </div>\r\n</div>\r\n'),__p+="\n"}return __p},"menu/surface-menu":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)_.each(surfaces,function(e,t){var r="TrimFascia"===e?"Trim & Fascia":"Extras"===e?"Roof, Doors & More":e;__p=(__p+="\r\n")+'\r\n<div class="surface-btn" id="'+__e(e.toLowerCase().replace(/\s/g,"-"))+'-btn" data-surface="'+__e(e.replace(/\s/g,"-"))+'">\r\n  <h2>'+__e(r)+"</h2>\r\n</div>\r\n"});return __p},"menu/typeSection":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+="\r\n\r\n";var filters=filterModel.filters,categories=_.uniqBy(products,"firstFilter"),types=_.uniqBy(products,"secondFilter"),lpName="LP® SmartSide®",sorted;__p+='\r\n\r\n\r\n<div class="menu-type" data-section="type">\r\n  ',"Walls"===surfacegroup?(__p+="\r\n  ",_.each(categories,function(t){__p+='\r\n    <div class="category">\r\n        <h4><span>'+__e("LP SmartSide"===t.firstFilter?lpName:t.firstFilter)+"</span></h4>\r\n      <ul>\r\n        ",_.each(types,function(e){__p+="\r\n        ",t.firstFilter===e.firstFilter&&(__p+='\r\n        <li class="" data-type="'+__e(e.secondFilter)+'" data-category="'+__e(e.categoryName)+'">\r\n          <img src="/services/getImage.ashx?type=filterswatch&seln='+__e(e.id)+"&specifier="+__e(e.specifier)+'&size=175"/>\r\n          ',"Brick"===e.secondFilter||"Stone"===e.secondFilter?__p+="\r\n          <p>"+__e(e.secondFilter)+"</p>\r\n          ":__p+="\r\n          <p>"+__e(e.secondFilter.includes("Shakes")?"Shakes":e.secondFilter+" Siding")+"</p>\r\n          ",__p+="\r\n        </li>\r\n        "),__p+="\r\n        "}),__p+="\r\n      </ul>\r\n    </div>\r\n  "}),__p+="\r\n  "):(__p+='\r\n  <div class="category texture">\r\n    <ul>\r\n      ',sorted=_.sortBy(products,"color"),__p+="\r\n      ",_.each(sorted,function(e){__p+='\r\n        <li class="" data-type="'+__e(e.color)+'">\r\n            <img src="/img/'+__e(e.color.toLowerCase())+'-crop.jpg" />\r\n            <p>'+__e(e.color)+"</p>\r\n        </li>\r\n      "}),__p+="\r\n     \r\n    </ul>\r\n  </div>\r\n  "),__p+="\r\n\r\n</div>\n"}return __p},"products/color-families-filters":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){var firstFilterSelected=filtersObject.firstFilter,secondFilterSelected=filtersObject.secondFilter,colorFamilies=(__p+="\r\n\r\n",_.uniqBy(CHAM.DATA.customColors,"genericDisplayName"));__p+="\r\n\r\n",null!=filters.firstFilter[0]&&(__p+="\r\n<div class=\"dropdown-filter-one\">\r\n \r\n  <h4>Filter by Color Family:</h4>\r\n  <select name='product-types' data-filter-number=\"firstFilter\">\r\n    <option title='type' value='All'>"+__e(firstFilterName)+"</option>\r\n    ",_.each(colorFamilies,function(e,t){__p+="\r\n    <option title='Placeholder' value='"+__e(filter)+"' "+__e(firstFilterSelected===filter?"selected":"")+">"+__e(filter)+"</option>\r\n    "}),__p+="\r\n  </select>\r\n</div>\r\n")}return __p},"products/color-picker":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)_.each(products,function(e,t){__p+='\r\n<ul data-cardorder="'+__e(e[0].displayName)+'">\r\n  ',_.each(e,function(e,t){__p+='\r\n  <li style="background-color: #'+__e(e.colorHEX)+'"></li>\r\n  '}),__p+="\r\n</ul>\r\n"});return __p},"products/colorList":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){__p+="\r\n";var state=CHAM.events.appliedStore.getState(),selectedSiding=null!=state.sidingProfileSelected?state.sidingProfileSelected:null,showSmartSide=!1;(null!=selectedSiding&&"Walls"===surfaceGroup||"TrimFascia"===surfaceGroup)&&(showSmartSide=!0),__p+='\r\n\r\n\r\n<div class="colors-list-container">\r\n  ',"Extras"!==surfaceGroup&&(__p+='\r\n  <div class="color-btns">\r\n    <ul>\r\n      ',showSmartSide&&(__p+='\r\n      <li class="active smartside" data-colorsection="smartside">\r\n        <p data-colorsection="smartside"><img src="/img/ExpertFinish-color.png"/></p>\r\n        <span class="tooltiptext">\r\n          With LP<sup>&reg</sup> SmartSide<sup>&reg</sup> ExpertFinish<sup>&reg</sup> choose from '+__e("TrimFascia"==surfaceGroup?"5":"16")+" prefinished versatile colors bringing your design vision to life.        \r\n          </span>\r\n      </li>\r\n      "),__p+='\r\n      <li class="'+__e(!1===showSmartSide?"active":"")+' custom" data-colorsection="custom">\r\n        <p data-colorsection="custom">Create Your Own</p>\r\n          <span class="tooltiptext">\r\n              Paint it yourself with a specific color palette in mind.\r\n          </span>\r\n      </li>\r\n      <li class="harmony" data-colorsection="harmony">\r\n        <p data-colorsection="harmony">Recommended Color Sets</p>\r\n          <span class="tooltiptext">\r\n            Choose a color set to style your home. Choosing a set will replace all products on home. \r\n          </span>\r\n      </li>\r\n    </ul>\r\n  </div>\r\n  '),__p+="\r\n    \r\n  ","Extras"!==surfaceGroup&&(__p+='  \r\n  <div class="color-text">\r\n    ',showSmartSide&&(__p+='\r\n    <p class="active" data-colorsection="smartside">Choose from '+__e((surfaceGroup,"16"))+" versatile prefinished colors that are guaranteed to complement your home.</p>\r\n    "),__p+='\r\n    <p class="'+__e(!1===showSmartSide?"active":"")+'" data-colorsection="custom">\r\n      Choose a color below to create a unique look for your home! Colors with a name represent LP&reg SmartSide&reg ExpertFinish&reg;. Colors without a name are not provided by LP&reg  but can be found by working with a third party prefinisher near you. See LP&reg SmartSide&reg ExpertFinish&reg tab for full availability.</p>\r\n  </div>\r\n  '),__p+="\r\n    \r\n  ","Extras"!==surfaceGroup&&(__p+='\r\n  <div class="custom-tool " data-colorsection="custom">\r\n    \x3c!--<p>Enter an RGB value to find closely related colors.</p>\r\n    <form action="">\r\n      R:<input type="number" name="R" value="" min="0" max="255">\r\n      G:<input type="number" name="G" value="" min="0" max="255">\r\n      B:<input type="number" name="B" value="" min="0" max="255">\r\n      <button class="search-rgb-btn btn ChamStats" data-csaction="" data-csdata="1"><i class="fas fa-search"></i></button>\r\n    </form>--\x3e\r\n    <p>Filter by Color Family:</p>\r\n    <select name=\'product-types\' data-filter-number="firstFilter">\r\n      <option title=\'type\' value=\'All\'>All Color Families</option>\r\n      ',_.each(filters.filters.familyFilter,function(e,t){__p+="\r\n      <option title='Placeholder' value='"+__e(e)+"' "+__e(selectedFilter===e?"selected":"")+">"+__e(e)+"</option>\r\n      "}),__p+="\r\n    </select>\r\n  </div>\r\n  "),__p+="  \r\n  \r\n\r\n  ",showSmartSide&&(__p+='\r\n  <div class="colors-list smartside active" data-colorsection="smartside">\r\n    <ul>\r\n      ',_.each(products.smartSideColors,function(e,t){__p+='\r\n      <li data-sel="'+__e(e.id)+'" data-seriesid="'+__e(e.seriesID)+'" class="">\r\n        <div class="thumb" data-sel="'+__e(e.id)+'">\r\n            <div class="enlarge" data-sel="'+__e(e.id)+'">\r\n                <img src="/img/print-logo.png" />\r\n            </div>\r\n          <img src="/services/getImage.ashx?type=product&seln='+__e(e.id)+"&specifier="+__e(e.specifier)+'&size=175">\r\n        </div>\r\n        <h4>'+__e(e.name)+"</h4>\r\n      </li>\r\n      "}),__p+="\r\n    </ul>\r\n  </div>\r\n  "),__p+='\r\n  <div class="colors-list custom '+__e(!1===showSmartSide?"active":"")+'" data-colorsection="custom">\r\n    <ul>\r\n      ',"Extras"!==surfaceGroup&&(__p+="\r\n      ",_.each(products.filteredSmartsideColors,function(e,t){__p+='\r\n    \r\n      <li data-sel="'+__e(e.id)+'" data-seriesid="'+__e(e.seriesID)+'" data-extra="'+__e(e.warranty)+'" class="">\r\n        <div class="thumb" data-sel="'+__e(e.id)+'">\r\n          ',e.manufacturerName.includes("LP")&&(__p+='\r\n          <div class="enlarge" data-sel="'+__e(e.id)+'">\r\n            <img src="/img/print-logo.png"/>\r\n          </div>\r\n          '),__p+='\r\n          <img src="/services/getImage.ashx?type=product&seln='+__e(e.id)+"&specifier="+__e(e.specifier)+'&size=175">\r\n        </div>\r\n        ',e.manufacturerName.includes("LP")&&(__p+="\r\n        <h4>"+__e(e.name)+"</h4>\r\n        "),__p+="\r\n      </li>\r\n\r\n      "}),__p+="\r\n        "),__p+="\r\n      ",_.each(products.customColors,function(e,t){__p+="\r\n      ","Walls"==surfaceGroup||"TrimFascia"==surfaceGroup?(__p+="\r\n      ","Extras"!=e.warranty.trim()&&(__p=__p+('\r\n      <li data-sel="'+__e(e.id)+'" data-seriesid="'+__e(e.seriesID)+'" data-extra="'+__e(e.warranty)+'" class="">\r\n        <div class="thumb" data-sel="'+__e(e.id)+'">\r\n          <img src="/services/getImage.ashx?type=product&seln='+__e(e.id)+"&specifier="+__e(e.specifier))+'&size=175">\r\n        </div>\r\n        <h4></h4>\r\n      </li>\r\n      '),__p+="\r\n      "):__p=__p+('\r\n      <li data-sel="'+__e(e.id)+'" data-seriesid="'+__e(e.seriesID)+'" data-extra="'+__e(e.warranty)+'" class="">\r\n        <div class="thumb" data-sel="'+__e(e.id)+'">\r\n          <img src="/services/getImage.ashx?type=product&seln='+__e(e.id)+"&specifier="+__e(e.specifier))+'&size=175">\r\n        </div>\r\n        <h4></h4>\r\n      </li>\r\n      ',__p+="\r\n\r\n      "}),__p+="\r\n    </ul>\r\n  </div>\r\n</div>\n"}return __p},"products/complementary-colors":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj){var sel2=matchedColors.sel2,sel3=matchedColors.sel3,favoriteColorsIdsList=_(favoriteColorsList).map(function(e){return e.id});__p+='\r\n\r\n<h4>Complementary Colors</h4>\r\n  <div class="comp-list">\r\n    <div class="arrow" id="prev-btn">\r\n      <img src="img/arrow-left.svg" />\r\n    </div>\r\n    <div class="compSwatches">\r\n      <div class="comp-swatch" id="comp-swatch-1" style="background-color:#'+__e(sel2.colorHEX)+';" data-id="'+__e(sel2.id)+'">\r\n        <div class="comp-info">\r\n          <div class="heart-outline '+__e(-1===favoriteColorsIdsList.indexOf(sel2.id)?"active":"")+'">\r\n            <i class="fa fa-heart-o"></i>\r\n          </div>\r\n          <div class="heart-filled '+__e(-1<favoriteColorsIdsList.indexOf(sel2.id)?"active":"")+'">\r\n            <i class="fa fa-heart"></i>\r\n          </div>\r\n          <p>'+__e(sel2.name)+"</p>\r\n          <h6>"+__e(sel2.sku)+'</h6>\r\n        </div>\r\n      </div>\r\n\r\n      <div class="comp-swatch" id="comp-swatch-2" style="background-color:#'+__e(sel3.colorHEX)+';" data-id="'+__e(sel3.id)+'">\r\n        <div class="comp-info">\r\n          <div class="heart-outline '+__e(-1===favoriteColorsIdsList.indexOf(sel3.id)?"active":"")+'">\r\n            <i class="fa fa-heart-o"></i>\r\n          </div>\r\n          <div class="heart-filled '+__e(-1<favoriteColorsIdsList.indexOf(sel3.id)?"active":"")+'">\r\n            <i class="fa fa-heart"></i>\r\n          </div>\r\n          <p>'+__e(sel3.name)+"</p>\r\n          <h6>"+__e(sel3.sku)+'</h6>\r\n        </div>\r\n      </div>\r\n    </div>\r\n    <div class="arrow" id="next-btn">\r\n      <img src="img/arrow-right.svg" />\r\n    </div>\r\n  </div>'}return __p},"products/enlargeModal":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)console.log("enlarge modal",product),__p+='\r\n<div class="product-name" data-sel="'+__e(product.id)+'">\r\n  <h5>'+__e(product.styleDisplay)+'</h5>\r\n  <div class="close">\r\n    <img src="img/close-btn.svg" />\r\n</div>\r\n</div>\r\n\r\n<img src="/services/getImage.ashx?type=enlarge&seln='+__e(product.id)+"&specifier="+__e(product.specifier)+'&size=850">\r\n';return __p},"products/generic":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+="<ul>\r\n  ",_.each(products,function(e,t){__p+='\r\n  <li data-sel="'+__e(e.id)+'" data-seriesid="'+__e(e.seriesID)+'" class="">\r\n    <div class="thumb">\r\n      <p>selected</p>\r\n      <img src="/services/getImage.ashx?type=product&seln='+__e(e.id)+"&specifier="+__e(e.specifier)+'&size=175">\r\n    </div>\r\n    <h4>'+__e("Roofing"===e.categoryName?e.color:e.name)+"</h4>\r\n  </li>\r\n  "}),__p+="\r\n</ul>\n";return __p},"products/paint-filters":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='<div class="sub-surfaces">\r\n<ul>\r\n  ',1<filters.length&&(__p+='\r\n  <li class="active">\r\n    <div class="eye"><img src="/img/eye.svg" /></div>\r\n    <h4>All</h4>\r\n  </li>\r\n\r\n  ',_.each(filters,function(e){__p+='\r\n  <li data-name="'+(null==(__t=e.name.toLowerCase().replace(" ","-"))?"":__t)+'" class="'+__e(null!=colorAppliedToSurface&&null!=colorAppliedToSurface[e.name]?"active":"")+'">\r\n    <div class="eye"><img src="/img/eye.svg" /></div>\r\n    <h4>'+(null==(__t=e.name)?"":__t)+"</h4>\r\n  </li>\r\n  "}),__p+="\r\n  "),__p+="\r\n</ul>\r\n</div>\r\n";return __p},"products/style-list":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\r\n<div class="style-wrapper">\r\n    <ul>\r\n        ',_.each(products,function(e,t){__p+='\r\n        <li class="product" data-sel="'+__e(e.id)+'" data-seriesid="'+__e(e.seriesID)+'">\r\n          <div class="thumb" data-sel="'+__e(e.id)+'">\r\n            ',"Siding"===e.categoryName&&(__p+='\r\n            <div class="enlarge" data-sel="'+__e(e.id)+'">\r\n              <img src="/img/enlarge.svg"/>\r\n            </div>\r\n            '),__p+='\r\n            <img src="/services/getImage.ashx?type=product&seln='+__e(e.id)+"&specifier="+__e(e.specifier)+'&size=175">\r\n          </div>\r\n            <h4>'+__e(e.styleDisplay)+"</h4>\r\n        </li>\r\n        "}),__p+="\r\n    </ul>\r\n</div>\n";return __p},"projects/changePassword_dialog":function(obj){obj=obj||{};var __t,__p="";with(obj)__p+='<div class="changeForm">\r\n    <div class="formTitle">\r\n        <h2>Change your password:</h2>\r\n    </div>\r\n    <div class="errors" style="display:none;">&nbsp;</div>\r\n\r\n    <div class="lbl">\r\n        <label for="OldPassword">Current Password:</label>\r\n    </div>\r\n    <div class="field">\r\n        <input id="OldPassword" type="password" data-validation="required oldnewpwd" data-new="NewPassword" \r\n            data-validation-msg="Current password is required and must not be the same as the new password.">\r\n    </div>\r\n    <div class="lbl">\r\n        <label for="NewPassword">New Password:</label>\r\n    </div>\r\n    <div class="field">\r\n        <input id="NewPassword" type="password" data-validation="required confirm" data-confirm-with="ConfirmNewPassword" \r\n            data-validation-msg="New password and confirm password must match and have a value.">\r\n    </div>\r\n    <div class="lbl">\r\n        <label for="ConfirmNewPassword">Confirm New Password:</label>\r\n    </div>\r\n    <div class="field">\r\n        <input id="ConfirmNewPassword" type="password">\r\n    </div>\r\n    \r\n    <div class="formBTNS">\r\n        <ul>\r\n            <li>\r\n                <div class="buttons changePwdBTN">Change Password</div>\r\n            </li>\r\n        </ul>\r\n    </div>\r\n</div>';return __p},"projects/login_dialog":function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\x3c!-- model: { email: \'\' } --\x3e\n<div class="loginForm">\r\n    <div class="formWrapper">\r\n        <div class="innerFormWrapper">\r\n            <div class="formTitle">\r\n                \x3c!--<h2>Log In</h2>--\x3e\r\n            </div>\r\n            <div class="errors" style="display: none;">&nbsp;</div>\r\n            <div class="success" style="display: none;">&nbsp;</div>\r\n            <div class="lbl">\r\n                <label for="loginEmail">Email Address:</label>\r\n            </div>\r\n            <div class="field">\r\n                <input id="loginEmail" name="loginEmail" value="'+__e(model.email)+'" type="text" data-validation="required email" data-validation-msg="A valid email is required." autocomplete="on">\r\n            </div>\r\n            <div class="lbl">\r\n                <label for="loginPassword">Password:</label>\r\n            </div>\r\n            <div class="field">\r\n                <input id="loginPassword" name="loginPassword" type="password" data-validation="required" data-validation-msg="A password is required.">\r\n            </div>\r\n            <div class="formBTNS">\r\n                <ul>\r\n                    <li>\r\n                        <div class="buttons loginBTN">Log In</div>\r\n                    </li>\r\n                    <li>\r\n                        <div class="linkBTNS gotoRegBTN">Register</div>\r\n                    </li>\r\n\r\n                    <li>\r\n                        <div class="linkBTNS gotoForgotBTN">Forgot Password?</div>\r\n                    </li>\r\n                </ul>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>';return __p},"projects/modal":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+="\x3c!-- model: { title: '', titleBarBTNS: '', content: '' }--\x3e\r\n  <div class=\"MyProjectsInner\" style=\"width: 600px;\">\r\n    ","Save Current Project"==model.title?__p+='\r\n\r\n    <div class="TitleBar TitleBar-save">\r\n      <h2>'+__e(model.title)+'</h2>\r\n      <div class="buttons closeBTN closeBTN-save logged">\r\n        <img src="/img/close-btn.svg" />\r\n      </div>\r\n    </div>\r\n\r\n    ':__p+='\r\n\n    <div class="buttons closeBTN logged">\r\n      <img src="/img/close-btn.svg" />\r\n    </div>\r\n    <div class="TitleBar">\r\n      <h2>'+__e(model.title)+"</h2>\r\n    </div>\r\n\r\n    ",__p+='\r\n\r\n    <div class="Content">\r\n      '+(null==(__t=model.content)?"":__t)+'\r\n    </div>\r\n\r\n    <div class="titleBarBTNS">\r\n      '+(null==(__t=model.titleBarBTNS)?"":__t)+"\r\n    </div>\r\n  </div>\n";return __p},"projects/nameProject_dialog":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)_.each(scenes,function(e,t){__p+='\r\n  <li data-spec="'+__e(e.specifier)+'">\r\n    <img src="'+__e(CHAM.RenderServer)+"GetImage.ashx?type=product&seln="+__e(e.productId)+"&specifier="+__e(e.specifier)+'&size=300">\r\n  </li>\r\n'}),__p+="\r\n";return __p},"projects/projects_dialog":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\x3c!-- model: { projects: [{ name?  }]} --\x3e\r\n<div class="projectsForm">\r\n    <div class="projectsForm">\r\n        ',_.each(model.projects,function(e,t){var r=Utilities.formatIsoDate(e.created,{time:!0});__p+='\r\n        <div class="projectWrapper">\r\n            <img src="https://core2render.chameleonpower.com/cham/GetImage.ashx?specifier='+__e(e.params.specifier)+'&sel=-1&type=BaseImage&Size=128"\r\n                  alt="Saved Project" class="savedRender" style="width: 218px;">\r\n            <div class="innerWrapper">\r\n                <h2 class="projectTitle">'+__e(e.name)+'</h2>\r\n                <div class="projectDate"><span>Saved:</span> '+__e(r)+'</div>\r\n                <div class="myProjectBTNS">\r\n                    <ul class="myProjectBTNsUL">\r\n                        <li class="Use prj-viz" data-id="'+__e(e.id)+'" data-action="viz">View Image</li>\r\n                        ',-1<e.params.specifier.indexOf("_USER_")&&(__p+='\r\n                            <li class="Edit prj-viz" data-specifier="'+__e(e.params.specifier)+'" data-action="viz">Edit</li>\r\n                        '),__p+='\r\n                        <li class="Remove prj-viz" data-id="'+__e(e.id)+'" data-action="viz">Remove</li>\r\n                    </ul>\r\n                </div>\r\n            </div>\r\n        </div>\r\n        '}),__p+="\r\n    </div>\r\n</div>\n";return __p},"projects/register_dialog":function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='<div class="regForm">\r\n    <div class="formWrapper">\r\n        <div class="innerFormWrapper">\r\n            <div class="formTitle">\r\n                <h2>Create New Account:</h2>\r\n            </div>\r\n            <div class="errors" style="display: none;">&nbsp;</div>\r\n            <div class="success" style="display: none;">&nbsp;</div>\r\n            <div class="lbl"><label for="RegEmail">Email Address:</label></div>\r\n            <div class="field">\r\n                <input id="RegEmail" type="text" data-validation="required email" data-validation-msg="A valid email is required." value="'+__e(model.email)+'">\r\n            </div>\r\n            <div class="lbl"><label for="RegPassword">Password:</label></div>\r\n            <div class="field">\r\n                <input id="RegPassword" type="password" data-validation="required" data-validation-msg="A password is required.">\r\n            </div>\r\n            <div class="lbl"><label for="RegFName">First Name:</label></div>\r\n            <div class="field">\r\n                <input id="RegFName" type="text" data-validation="required" data-validation-msg="First Name is required.">\r\n            </div>\r\n            <div class="lbl"><label for="RegLName">Last Name:</label></div>\r\n            <div class="field">\r\n                <input id="RegLName" type="text" data-validation="required" data-validation-msg="Last Name is required.">\r\n            </div>\r\n            <div class="formBTNS">\r\n                <ul>\r\n                    <li>\r\n                        <div class="buttons regBTN">Register</div>\r\n                    </li>\r\n                    <li>\r\n                        <div class="linkBTNS gotoLoginBTN">Already have a Login?</div>\r\n                    </li>\r\n                    <li>\r\n                        <div class="linkBTNS gotoForgotBTN">Forgot your password?</div>\r\n                    </li>\r\n                </ul>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>';return __p},"projects/resetPassword_dialog":function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='\x3c!-- model: { email: \'\' } --\x3e\r\n<div class="forgotForm" style="">\r\n    <h2 class="forgotTitle">\r\n        <label for="txtForgotEmail">\r\n            Enter the email address used to create your account <br/>\r\n            <span>(New password will be sent to this address)</span>\r\n        </label>\r\n    </h2>\r\n    <div class="errors" style="display: none;">&nbsp;</div>\r\n    <div class="success" style="display: none;">&nbsp;</div>\r\n    <div class="field">\r\n        <input id="txtForgotEmail" value="'+__e(model.email)+'" type="text" data-validation="required email" data-validation-msg="A valid email is required.">\r\n    </div>\r\n    <div class="formBTNS">\r\n        <ul>\r\n            <li>\r\n                <div class="buttons forgotBTN" data-track="form-submit" data-track-modal-name="forgot-password">\r\n                    <span>Send Password</span>\r\n                </div>\r\n            </li>\r\n            <li>\r\n                <div class="linkBTNS gotoLoginBTN">I remember my password now</div>\r\n            </li>\r\n            <li>\r\n                <div class="linkBTNS gotoRegBTN">Not Registered?</div>\r\n            </li>\r\n        </ul>\r\n    </div>\r\n</div>';return __p},"projects/saveProject_dialog":function(obj){obj=obj||{};var __t,__p="",__e=_.escape;with(obj)__p+='<div class="saveForm">\r\n    <h2 class="saveTitle"><label for="txtProjectName">What should we name your project?</label></h2>\r\n    <div class="errors" style="display: none;">&nbsp;</div>\r\n    <div class="success" style="display: none;">&nbsp;</div>\r\n    <div class="field">\r\n        <input id="SaveProjectName" value="'+__e(model.name)+'" type="text" data-validation="required ProjectName" data-validation-msg="Please enter a project name" maxlength="20">\r\n    </div>\r\n    <div class="formBTNS">\r\n        <ul>\r\n            <li>\r\n                <div class="buttons saveBTN">Save Project</div>\r\n            </li>\r\n        </ul>\r\n    </div>\r\n</div>';return __p},"scenes/scene-filter":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='\x3c!--<h4>Filter By:</h4>--\x3e\r\n<ul>\r\n  <li class="active" data-filter="All">All</li>\r\n  ',_.each(types,function(e,t){__p+='\r\n  <li data-filter="'+__e(e)+'">'+__e(e)+"</li>\r\n  "}),__p+="\r\n</ul>\r\n";return __p},"scenes/scene":function(obj){obj=obj||{};var __t,__p="",__e=_.escape,__j=Array.prototype.join;function print(){__p+=__j.call(arguments,"")}with(obj)__p+='<ul id="roomscene-data">\r\n  ',_.each(scenes,function(e,t){__p+='\r\n  <li data-spec="'+__e(e.specifier)+'" data-index="'+(null==(__t=t)?"":__t)+'" class="ChamStats" data-csaction="scene" data-csdata="1">\r\n    <img src="/services/getImage.ashx?type=scene&seln='+__e(e.id)+"&specifier="+__e(e.specifier)+'&size=450">\r\n  </li>\r\n  '}),__p+="\r\n</ul>\r\n";return __p}},jQuery.noConflict()),CHAM=CHAM||{},$=(!function(){debug("cham:config");CHAM.SiteID="LPBuildingSolutions",CHAM.SiteName="LP Building Solutions",CHAM.FbAppID="444908193084875",CHAM.HighlightColor="0079c2",CHAM.DATA.series=[{type:"scenes",id:7053},{type:"siding",id:7013},{type:"trim",id:7056},{type:"siding colors",id:7014},{type:"custom colors",id:7054},{type:"trim/fascia",id:7055},{type:"stone",id:7044},{type:"brick",id:7043},{type:"painted areas",id:7054},{type:"roof",id:6285}],CHAM.menuModel={Walls:{surfaces:null,type:null,style:null,color:null},Extras:{surfaces:null,color:null},TrimFascia:{type:null,color:null}},CHAM.menuOrder={Walls:["surfaces","type","style","color"],Extras:["surfaces","color"],TrimFascia:["type","color"]},CHAM.DATA.menuTitleText={walls:{surfaces:{header:"Choose Wall Surface(s)",subtext:"Select the surface(s) you would like to add products to. Click on the eye icon to highlight where each surface is located in the scene."},type:{header:"Choose a Wall Covering",subtext:"Select an LP® SmartSide® product or another exterior product to view styles and colors."},style:{header:"Choose a Siding Style",subtext:"Select the style of siding to explore available colors."},color:{header:"Choose a Color",subtext:"Select a color to see your product on the chosen surface."},brick:{header:"Choose a Brick",subtext:"Select a product to apply to the house."},stone:{header:"Choose a Stone",subtext:"Select a product to apply to the house."}},trimfascia:{type:{header:"Choose a Trim Type",subtext:"Select either a smooth or cedar textured look."},color:{header:"Choose a Color",subtext:"Select a color to see your product on the chosen surface."}},extras:{surfaces:{header:"Choose Surface(s)",subtext:"Select the surfaces you would like to add products to. Click on the eye icon to highlight where each surface is located in the scene."},color:{header:"Choose a Color",subtext:"Choose a color to apply to the selected feature."},roof:{header:"Choose a Roof",subtext:"Select a roof design to apply to the home."}}},CHAM.RenderServer="https://core2render.chameleonpower.com/cham/",CHAM.CurrentDomain=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""),CHAM.CookieMessage="<strong>Please Enable Cookies</strong><br /><br />     Your browser's cookie functionality is turned off. Please turn it on to use this site.<br /><br />     <em>If you are using Safari, make sure 3rd party cookies are enabled.</em>   ","[SITEID]"===CHAM.SiteID&&console.warn("INVALID SITE ID: Make sure to update your configuration(s)")}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},CHAM=(!function(o){"use strict";debug("cham:helpers");CHAM.helpers={getURLParameter:function(e){return decodeURIComponent((new RegExp("[?|&]"+e+"=([^&;]+?)(&|#|;|$)","i").exec(window.location.search.toLowerCase())||[,""])[1].replace(/\+/g,"%20"))||null},isEmail:function(e){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/.test(e)},createVisualizerUrl:function(e,t){return"/#/scene/"+encodeURIComponent(e)+"/products/"+(null!=t&&""!==t?encodeURIComponent(t):"-1")},initShareLink:function(){var e=CHAM.helpers.getURLParameter("fblink");null!=e&&""!==e&&(e=Utilities.parseShortenedLink(e),e=CHAM.helpers.createVisualizerUrl(e.specifier,e.selector),window.location=e)},getShortURL:function(e,t,r){var n={action:"quick",url:CHAM.CurrentDomain+CHAM.helpers.createVisualizerUrl(e,t)};o.ajax({url:"/ChamWebTools/ShortUrlService.ashx",type:"POST",data:n,dataType:"text",async:!0,statusCode:{400:function(){},500:function(){console.error("Action could not be completed.")}},success:function(e){r.call(n,e)},fail:function(){console.error("Action could not be completed.")}})},lazyLoad:function(){function r(e,t){return document.elementFromPoint(e,t)}var n=window,o=document.documentElement;function i(e){var t=e.getBoundingClientRect();return!(t.right<0||t.bottom<0||t.left>(n.innerWidth||o.clientWidth)||t.top>(n.innerHeight||o.clientHeight))&&((e="LI"==e.parentNode.tagName.toUpperCase()?e.parentNode:e).contains(r(t.left,t.top))||e.contains(r(t.right,t.top))||e.contains(r(t.right,t.bottom))||e.contains(r(t.left,t.bottom)))}for(var s,e,a=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||n.msRequestAnimationFrame,l=function(e){for(var t,r=((e=e||window.event).target||e.srcElement).getElementsByTagName("img"),n=0;t=r[n++];)!function(e){var t=e.src;void 0!==t&&null!=t&&""!=t||(console.log("lazyt",e,t,i(e)),i(e)&&(console.log("isElementVisible",e),a?a(function(){e.src=e.getAttribute("data-src")}):e.src=e.getAttribute("data-src")))}(t)},t=(n.addEventListener?s=function(e){for(var t,r=["DOMContentLoaded","load","scroll","resize"];t=r.pop();)e.addEventListener(t,l,!1)}:n.attachEvent&&(s=function(e){for(var t,r=["onDOMContentLoaded","onload","onscroll","onresize"];t=r.pop();)e.attachEvent(t,l)}),document.querySelectorAll(".lazy")),c=0;e=t[c++];)s(e),l({target:e});n.LazyLoad=function(e,t){t||s(e),l({target:e})}},polyfills:function(){Promise.prototype.thenReturn=function(e){return this.then(function(){return e})},Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var r=Object(this),n=r.length>>>0;if(0!=n)for(var o,i,t=0|t,s=Math.max(0<=t?t:n-Math.abs(t),0);s<n;){if((o=r[s])===(i=e)||"number"==typeof o&&"number"==typeof i&&isNaN(o)&&isNaN(i))return!0;s++}return!1}}),String.prototype.includes||(String.prototype.includes=function(e,t){return!((t="number"!=typeof t?0:t)+e.length>this.length)&&-1!==this.indexOf(e,t)}),"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1;r<arguments.length;r++){var n=arguments[r];if(null!=n)for(var o in n)n.hasOwnProperty(o)&&(t[o]=n[o])}return t})}}}(jQuery),CHAM||{}),$=(!function(){var e=(0,Utilities.createComponent)({constructor:function(e,t,r,n,o){this.root=e,this.events=t,this.groupedSurfaces=r,this.productLookupById=o.lookup,this.productsList=n,this.productsListHtml=this.root.find("ul"),this.getProductObject(),this.renderProductsList(),this.eventHandlers(),this.completeHarmonyList=n,$(".color-harm-menu").removeClass("active"),$(".color-harm-menu").find("li").removeClass("active")},eventHandlers:function(){var r=this;this.productsListHtml.on("click","li button",function(){var e=$(this).data("index");$(".color-harm-menu").find("li").removeClass("active"),$(".color-harm-menu").find('li[data-index="'+e+'"]').addClass("active"),r.applySelectedHarmony(CHAM.colorHarmony[e]),$("html").outerWidth()<1025&&$("#compare-wrapper").get(0).scrollIntoView()}),this.root.on("click",".close, .close-harmony",function(e){$(".color-harm-menu").removeClass("active")}),this.events.harmonySelectedOutsideTool.subscribe(function(e,t){console.log(e,t);t=parseInt(t,10),e="brown"===e?t+15-1:t-1;$(".color-harm-menu").find("li").removeClass("active"),$(".color-harm-menu").find('li[data-index="'+e+'"]').addClass("active"),r.applySelectedHarmony(CHAM.colorHarmony[e])})},getProductObject:function(){return _.each(this.productsList,function(e,t){_.each(e.products,function(t,e){t.product=_.find(CHAM.DATA.products.lookup,function(e){return e.id==t.sel})})}),this.productsList},renderProductsList:function(){var e=CHAM.templates.harmony(this.productsList,this.groupedSurfaces);this.productsListHtml.html(e)},applySelectedHarmony:function(e){$("html, body").animate({scrollTop:0}),$("#visualizer").ChamViz({action:"unzoom"});var r,e=e.products,n=CHAM.events.appliedStore.getState().surfaceGroupsObjs,t=_.find(CHAM.DATA.products.lookup,function(e){return 1680557==e.id}),o=null==CHAM.events.appliedStore.getState().sidingProfileSelected?t:CHAM.events.appliedStore.getState().sidingProfileSelected;_.each(e,function(e,t){"Accent"===t&&null!=o&&(r=_.filter(n.Walls,function(e){return e.type.includes("Accent")}),CHAM.events.sidingProductSelected.emit(e.product,o,r)),"Roof"!==t&&"TrimFascia"!==t||(r=n[t],CHAM.events.productSelected.emit(e.product,r)),"Walls"===t&&null!=o&&(r=n[t],CHAM.events.sidingProductSelected.emit(e.product,o,r))})}});CHAM.harmony={colorHarmonyList:e}}(),jQuery.noConflict()),CHAM=CHAM||{},$=(jQuery,CHAM.colorHarmony=[{group:"Group 1",products:{Accent:{sel:"1680599",product:null},Roof:{sel:"211353",product:null},TrimFascia:{sel:"1680598",product:null},Walls:{sel:"1680603",product:null}}},{group:"Group 2",products:{Roof:{sel:"211353",product:null},Accent:{sel:"1680612",product:null},TrimFascia:{sel:"1680598",product:null},Walls:{sel:"1680609",product:null}}},{group:"Group 3",products:{Roof:{sel:"211353",product:null},Accent:{sel:"1680611",product:null},TrimFascia:{sel:"1680610",product:null},Walls:{sel:"1680606",product:null}}},{group:"Group 4",products:{Roof:{sel:"211353",product:null},Accent:{sel:"1680609",product:null},TrimFascia:{sel:"1680598",product:null},Walls:{sel:"1680610",product:null}}},{group:"Group 5",products:{Roof:{sel:"211353",product:null},Accent:{sel:"1680608",product:null},TrimFascia:{sel:"1680599",product:null},Walls:{sel:"3921976",product:null}}},{group:"Group 6",products:{Roof:{sel:"211353",product:null},Accent:{sel:"1680610",product:null},TrimFascia:{sel:"1680598",product:null},Walls:{sel:"1680611",product:null}}},{group:"Group 7",products:{Roof:{sel:"211353",product:null},Accent:{sel:"1680609",product:null},TrimFascia:{sel:"1680610",product:null},Walls:{sel:"1680608",product:null}}},{group:"Group 8",products:{Roof:{sel:"211353",product:null},Accent:{sel:"1680611",product:null},TrimFascia:{sel:"1680613",product:null},Walls:{sel:"1680598",product:null}}},{group:"Group 9",products:{Roof:{sel:"211353",product:null},Accent:{sel:"1680612",product:null},TrimFascia:{sel:"1680598",product:null},Walls:{sel:"1680600",product:null}}},{group:"Group 10",products:{Roof:{sel:"211353",product:null},Accent:{sel:"1680598",product:null},TrimFascia:{sel:"1680601",product:null},Walls:{sel:"3921974",product:null}}},{group:"Group 11",products:{Roof:{sel:"211353",product:null},Accent:{sel:"1680599",product:null},TrimFascia:{sel:"1680609",product:null},Walls:{sel:"3921975",product:null}}},{group:"Group 12",products:{Roof:{sel:"211353",product:null},Accent:{sel:"1680611",product:null},TrimFascia:{sel:"1680598",product:null},Walls:{sel:"1680602",product:null}}},{group:"Group 13",products:{Roof:{sel:"211353",product:null},Accent:{sel:"1680598",product:null},TrimFascia:{sel:"1680613",product:null},Walls:{sel:"1680599",product:null}}},{group:"Group 14",products:{Roof:{sel:"211353",product:null},Accent:{sel:"1680599",product:null},TrimFascia:{sel:"1680598",product:null},Walls:{sel:"1680612",product:null}}},{group:"Group 15",products:{Roof:{sel:"211353",product:null},Accent:{sel:"1680599",product:null},TrimFascia:{sel:"1680598",product:null},Walls:{sel:"1680601",product:null}}},{group:"Group 1",products:{Roof:{sel:"210489",product:null},Accent:{sel:"1680608",product:null},TrimFascia:{sel:"1680598",product:null},Walls:{sel:"1680603",product:null}}},{group:"Group 2",products:{Roof:{sel:"210489",product:null},Accent:{sel:"1680612",product:null},TrimFascia:{sel:"1680598",product:null},Walls:{sel:"1680609",product:null}}},{group:"Group 3",products:{Roof:{sel:"210489",product:null},Accent:{sel:"1680609",product:null},TrimFascia:{sel:"1680600",product:null},Walls:{sel:"1680606",product:null}}},{group:"Group 4",products:{Roof:{sel:"210489",product:null},Accent:{sel:"1680612",product:null},TrimFascia:{sel:"1680598",product:null},Walls:{sel:"1680610",product:null}}},{group:"Group 5",products:{Roof:{sel:"210489",product:null},Accent:{sel:"3921974",product:null},TrimFascia:{sel:"1680599",product:null},Walls:{sel:"3921976",product:null}}},{group:"Group 6",products:{Roof:{sel:"210489",product:null},Accent:{sel:"1680608",product:null},TrimFascia:{sel:"1680598",product:null},Walls:{sel:"1680611",product:null}}},{group:"Group 7",products:{Roof:{sel:"210489",product:null},Accent:{sel:"1680609",product:null},TrimFascia:{sel:"1680598",product:null},Walls:{sel:"1680608",product:null}}},{group:"Group 8",products:{Roof:{sel:"210489",product:null},Accent:{sel:"1680610",product:null},TrimFascia:{sel:"1680600",product:null},Walls:{sel:"1680598",product:null}}},{group:"Group 9",products:{Roof:{sel:"210489",product:null},Accent:{sel:"1680601",product:null},TrimFascia:{sel:"1680598",product:null},Walls:{sel:"1680600",product:null}}},{group:"Group 10",products:{Roof:{sel:"210489",product:null},Accent:{sel:"1680608",product:null},TrimFascia:{sel:"1680600",product:null},Walls:{sel:"3921974",product:null}}},{group:"Group 11",products:{Roof:{sel:"210489",product:null},Accent:{sel:"1680606",product:null},TrimFascia:{sel:"1680601",product:null},Walls:{sel:"3921975",product:null}}},{group:"Group 12",products:{Roof:{sel:"210489",product:null},Accent:{sel:"1680603",product:null},TrimFascia:{sel:"1680600",product:null},Walls:{sel:"1680602",product:null}}},{group:"Group 13",products:{Roof:{sel:"210489",product:null},Accent:{sel:"1680598",product:null},TrimFascia:{sel:"1680601",product:null},Walls:{sel:"1680599",product:null}}},{group:"Group 14",products:{Roof:{sel:"210489",product:null},Accent:{sel:"1680609",product:null},TrimFascia:{sel:"1680598",product:null},Walls:{sel:"1680612",product:null}}},{group:"Group 15",products:{Roof:{sel:"210489",product:null},Accent:{sel:"1680606",product:null},TrimFascia:{sel:"1680599",product:null},Walls:{sel:"1680601",product:null}}}],jQuery.noConflict()),CHAM=CHAM||{},$=(!function(i){"use strict";var e=Utilities.createComponent,r=(i("div.visualizer-wrapper"),i("section.scenes"),e({constructor:function(t,r,n){var o=this,e=((this.root=t).on("click","li",function(){t.find("li").removeClass("active");var e=i(this),e=(e.addClass("active"),e.data("filter")),e="All"!==e?o.filterScenes(r,e):r;n.scenesFiltered.emit(e)}),this.createModel(r));return this.render.bind(this,e)},createModel:function(e){return _(e).sortBy(function(e){return e.descriptor}).map(function(e){return e.description}).uniqBy().value()},filterScenes:function(e,t){return _.filter(e,function(e){return e.description===t})},render:function(e){e=CHAM.templates.sceneFilter(e);this.root.html(e)}})),n=e({constructor:function(e,t,r){this.root=e;var n=this;return e.on("click","li",function(){var e=i(this).data("spec");CHAM.router.navigate("/scene/"+e+"/products/-1")}),r.scenesFiltered.subscribe(function(e){n.render(e)}),this.render.bind(this,t)},render:function(e){var t=CHAM.templates.scenes(e);this.root.html(t),this.rendered=e}}),e=e({constructor:function(e,t,r){return(this.root=e).on("click",".projects",function(){}),r.scenesRequested.subscribe(function(){e.addClass("active")}),r.sceneSelected.subscribe(function(){e.removeClass("active")}),this.render.bind(this,t,r)},render:function(e,t){r(this.root.find(".filters"),e,t).render(),n(this.root.find(".scene-wrapper"),e,t).render()}});CHAM.scenes=e}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(n){"use strict";var e=(0,Utilities.createComponent)({constructor:function(e,t,r){return this.root=e,this.events=r,e.on("click","#select-scene",function(){CHAM.router.navigate("/scene/go")}),e.on("click","#upload-banner",function(){setTimeout(function(){n(".closeBTN img").css("width","20.1px")},200)}),e.on("click","#landing-projects",function(){CHAM.projects.nextDialog="projects",CHAM.projects.showProjects(),setTimeout(function(){n(".closeBTN img").css("width","20.1px")},200)}),this.render.bind(this,t)},validateZipCode:function(e){},render:function(){}});CHAM.landing=e}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(n){"use strict";var o=n(".visualizer-wrapper .view-header"),i=o.find("nav"),e=o.find(".mobile-nav-btn"),s=n("section.scenes .view-header").find("nav"),a=n("#visualizer-left"),l=n("#visualizer-right"),c=n("#share-modal");CHAM.menu={closeMobileMenu:function(){n("#mobile-menu").hasClass("active")&&(n("#mobile-menu").removeClass("active"),n("#menu-btns").removeClass("active"))},isNavOpen:!1,events:function(){var t=this,r=(i.on("click","#home",function(){CHAM.router.navigate("/"),CHAM.vizSelected="rightViz",CHAM.compareBtnFirstClick=!1}),n("#home").on("click",function(){CHAM.router.navigate("/"),CHAM.vizSelected="rightViz",CHAM.compareBtnFirstClick=!1}),i.on("click","#newscene",function(){CHAM.router.navigate("/scene/go"),CHAM.vizSelected="rightViz",CHAM.compareBtnFirstClick=!1}),i.on("click","#socialshare",function(){c.addClass("active")}),n(".share-btns").on("click","#print",function(){"leftViz"===CHAM.vizSelected?(t=a.ChamViz({action:"test"}).spec,e=a.ChamViz({action:"getFullSelString"})):"rightViz"===CHAM.vizSelected&&(t=l.ChamViz({action:"test"}).spec,e=l.ChamViz({action:"getFullSelString"}));var e,t=CHAM.CurrentDomain+"/print.aspx?specifier="+encodeURIComponent(t)+(null!=e&&""!==e?"&sel="+encodeURIComponent(e):"");window.open(t)}),i.on("click","#help",function(){n("#help-vid").addClass("active"),n("#help-vid-content").html('<iframe class="largescreen" width="597" height="376" src="https://www.youtube.com/embed/uoamqqKfzz8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe><iframe class="smallscreen" width="460" height="233" src="https://www.youtube.com/embed/NpEaa2P7qZI?autoplay=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'),CHAM.menu.closeMobileMenu()}),s.on("click","#help",function(){n("#help-vid").addClass("active"),n("#help-vid-content").html('<iframe class="largescreen" width="597" height="376" src="https://www.youtube.com/embed/uoamqqKfzz8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe><iframe class="smallscreen" width="460" height="233" src="https://www.youtube.com/embed/NpEaa2P7qZI?autoplay=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'),n("#help-vid").find("p.walkthrough").hide(),CHAM.menu.closeMobileMenu()}),n("#help-vid").on("click",".close",function(){n("#help-vid").find("p.walkthrough").show(),n("#help-vid").removeClass("active")}),n("#help-vid").on("click",".walkthrough",function(){CHAM.tour.start(),n("#help-vid").removeClass("active")}),n("div#email-modal .header").on("click",".close",function(){n("#email-modal").hide()}),n(".editmode-btn").on("click",function(){var e=CHAM.DATA.specifier;window.location=location.protocol+"//"+location.hostname+(location.port?":"+location.port:"")+"/im.aspx?specifier="+encodeURIComponent(e),CHAM.menu.closeMobile()}),i.on("click","> div, > a",function(){t.isNavOpen=!1,o.removeClass("nav-open")}),n("#custom-btn, #pro-upload").on("click",function(){n("#pro-modal").addClass("active"),n("body, html").addClass("modal-styles")}),n("#pro-modal").on("click",".close-btn, #pro-btn",function(){n("#pro-modal").removeClass("active"),n("body, html").removeClass("modal-styles")}),e.on("click",function(e){e.stopPropagation(),t.isNavOpen=!t.isNavOpen,o.toggleClass("nav-open",t.isNavOpen)}),i.get(0));n(document).on("click",function(e){!t.isNavOpen||n(e.target).is(i)||n.contains(r,e.target)||(t.isNavOpen=!1,o.removeClass("nav-open"))}),n(".editmode-btn").on("click",function(){var e=CHAM.VIZ.ChamViz({action:"test"}).spec;window.location=location.protocol+"//"+location.hostname+(location.port?":"+location.port:"")+"/im.aspx?specifier="+encodeURIComponent(e),CHAM.menu.closeMobile()})}}}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(l){"use strict";var e=Utilities.lazy,t=Utilities.createComponent,i=l("#visualizer-left"),c=l("#visualizer-right"),r=(CHAM.vizSelected="rightViz",CHAM.compareBtnFirstClick=!1,t({sliderHandle:e(function(){return l(".slider-handle")}),constructor:function(e,t,r,n,o){this.root=e,this.getLoadingPosition=r,this.events=n;this.render(t)},render:function(s){console.log("render",s);var a=this;return new Promise(function(t,e){a.root.ChamViz({spec:CHAM.DATA.specifier,sel:CHAM.DATA.sel,defaultSpec:CHAM.DATA.specifier,defaultSel:CHAM.DATA.sel,siteid:CHAM.SiteID,zoomWidth:3e3,renderFlags:"&extra=(OPTIMIZE=1)",hightlightColor:CHAM.HighlightColor,responsiveBreakpoints:[{minWidth:0,orientation:"portrait",mode:"fit width"},{minWidth:0,orientation:"landscape",mode:"fit width"},{minWidth:760,alignment:"center top",orientation:"portrait",mode:"fit width"},{minWidth:760,alignment:"center top",orientation:"landscape",mode:"fit width"},{minWidth:1025,alignment:"center top",mode:"fit width"}],showMouseOvers:!0,renderserver:CHAM.RenderServer,initComplete:function(){a.root.find(".viz-baseimage").on("load",function(){t();var e=l("#visualizer-right .ChamViz").height();l(".slider-handle").css("height",e),"leftViz"===CHAM.vizSelected&&l(".apply-to").hasClass("active")||(i.hide(),c.show())})},surfacesLoaded:function(e){0==CHAM.loadedSurfaces&&(CHAM.initialize.surfacesLoaded(e),CHAM.loadedSurfaces=!0)},chooseSurfaceHandler:function(t){var e=CHAM.events.appliedStore.getState();null==t.group?"Roof"===(e=_.find(e.surfaces,function(e){return e.sortorder==t.sortorder})).name?(CHAM.events.roofSelected.emit(),CHAM.events.surfaceSelected.emit("Extras","Roof")):(CHAM.events.surfaceSelected.emit(e.group),CHAM.events.subSurfaceClicked.emit(e.name,e.group)):"Roof"===t.name?(CHAM.events.roofSelected.emit(),CHAM.events.surfaceSelected.emit("Extras","Roof")):(CHAM.events.surfaceSelected.emit(t.group),CHAM.events.subSurfaceClicked.emit(t.name,t.group))},AllSurfacesLoaded:function(){CHAM.initialize.AllSurfacesLoaded()},applySurfaceHandler:function(e,t,r,n,o){var i;"-1"!=o&&""!=o&&(o=a.root.width(),i=a.sliderHandle.value.position().left||0,o={left:a.getLoadingPosition(o,i)+"px"},LoadingMsg.startImg(e,s+"-"+t.sortorder,l("#compare-visualizers").get(0),n,o))}})})}})),n=t({vizNumber:1,constructor:function(e,t,r){return this.root=e,this.events=_.assign({},t,{appliedEvent:Observable(),productsListFiltered:Observable(),availableFiltersRequested:Observable()}),this.data=r,this.render.bind(this)},getLoadingPosition:function(e,t){return t/2},render:function(){return r(this.root,this.vizNumber,this.getLoadingPosition,this.events,this.data).render()}}),o=t({vizNumber:2,constructor:function(e,t,r){return this.root=e,this.events=_.assign({},t,{appliedEvent:Observable(),productsListFiltered:Observable(),availableFiltersRequested:Observable()}),this.data=r,this.render.bind(this)},getLoadingPosition:function(e,t){return t+(e-t)/2},render:function(){return r(this.root,this.vizNumber,this.getLoadingPosition,this.events,this.data).render()}}),s=t({constructor:function(){var e=!0;l("#zoom").addClass("active"),l("#unzoom").removeClass("active"),l("#unzoom").hide(),l("#zoom").show(),l("#visualizer-controls").on("click","#undo",function(){CHAM.events.appliedStore.undo(),i.ChamViz({action:"undo"}),c.ChamViz({action:"undo"})}),l("#visualizer-controls").on("click","#redo",function(){CHAM.events.appliedStore.redo(),i.ChamViz({action:"redo"}),c.ChamViz({action:"redo"})}),l("#visualizer-controls").on("click","#zoom",function(){0!=e&&1==e&&(i.ChamViz({action:"zoom"}),c.ChamViz({action:"zoom"}),e=!1)}),l("#visualizer-controls").on("click","#unzoom",function(){e=!0,i.ChamViz({action:"unzoom"}),c.ChamViz({action:"unzoom"})})}});CHAM.visualizer={init:function(e,t){var r=o(c,e,t).render(),t=n(i,e,t).render();l(".slider-handle").remove(),Promise.all([r,t]).then(function(){CHAM.loadedVisualizer=!0,l("#compare-visualizers").slider(),l(".slider-handle").hide(),s().render(),window.setTimeout(function(){CHAM.tour.start()},500)}),CHAM.DATA.specifier.includes("_USER_")?l(".editmode-btn").addClass("active"):l(".editmode-btn").removeClass("active"),e.appliedStore.subscribe(function(r){null!=r&&setTimeout(function(){var e=i,t=c,n=(l("#unzoom").click(),e.ChamViz({action:"unzoom"}),t.ChamViz({action:"unzoom"}),Viz.sel.parseToSurfaceArray(r.visualizers.leftViz.fullSel)),o=Viz.sel.parseToSurfaceArray(r.visualizers.rightViz.fullSel);e.ChamViz({action:"applyByFilter",sel:"",fn:function(e,t,r){e=n[e.sortorder-1];return null==e?"-1":e}}),t.ChamViz({action:"applyByFilter",sel:"",fn:function(e,t,r){e=o[e.sortorder-1];return null==e?"-1":e}})},800)})},updateURL:function(){CHAM.DATA.specifier=i.ChamViz({action:"test"}).spec;var e=i.ChamViz({action:"getFullSelString"}),t=c.ChamViz({action:"getFullSelString"}),e=(CHAM.DATA.sel=e+","+t,"/scene/"+CHAM.DATA.specifier+"/products/"+e+","+t);window.location.hash.replace("#","")!==e&&(CHAM.router.pause(),CHAM.router.navigate(e),l(window).one("hashchange",function(){CHAM.router.resume()}))}},l(".compare-colors").on("click",function(e){l(".compare-colors").removeClass("active"),l(".apply-to").addClass("active"),l(".compare-btns .close").addClass("active"),i.show(),i.css("position","absolute"),c.show(),l(".slider-handle").show(),l("div.share-btns").removeClass("active"),!1===CHAM.compareBtnFirstClick&&(CHAM.vizSelected="leftViz",CHAM.events.vizSelected.emit(CHAM.vizSelected),CHAM.compareBtnFirstClick=!0)}),l(".compare-btns .close, #home, #newscene").on("click",function(e){l(".apply-to").removeClass("active"),l(".compare-btns .close").removeClass("active"),l(".compare-colors").addClass("active"),l(".slider-handle").hide(),l("div.share-btns").addClass("active"),"leftViz"===CHAM.vizSelected?(c.hide(),i.css("position","relative"),i.show()):"rightViz"===CHAM.vizSelected&&i.hide()}),l("#zoom").on("click",function(e){l("#unzoom").addClass("active"),l("#zoom").removeClass("active"),l("#zoom").hide(),l("#unzoom").show()}),l("#unzoom").on("click",function(e){l("#zoom").addClass("active"),l("#unzoom").removeClass("active"),l("#unzoom").hide(),l("#zoom").show()}),l(".apply-to div").click(function(){var e=l(this);e.siblings().removeClass("active"),e.addClass("active"),null!=e.data("vizside")&&(CHAM.vizSelected=e.data("vizside"),CHAM.events.vizSelected.emit(CHAM.vizSelected))}),l(window).on("resize",function(){var e=l("#visualizer-right .ChamViz").height();l(".slider-handle").css("height",e)}),l(document).on("touchmove",function(e){e.cancelable&&e.preventDefault(),l(".scroll").hide()})}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(o){"use strict";CHAM.email={init:function(){this.modal=o("#email-modal"),this.form=this.modal.find("form"),this.message=this.form.find('[name="body"]'),this.validator=Forms.FormValidator(this.form,this.formRules)},formRules:{fromEmail:[{type:"required",message:"Please enter your email address."},{type:"email",message:"Please enter a valid email."}],toEmail:[{type:"required",message:"Please enter a friend's email address."},{type:"email",message:"Please enter a valid email."}],body:[{type:"required",message:"A message is required."}]},createMessage:function(t){var r=this,e=o("#visualizer-left").ChamViz({action:"test"}).spec,n=CHAM.DATA.sel;CHAM.helpers.getShortURL(e,n,function(e){r.message.val("Check out this design I created with the LP® SmartSide® Trim & Siding home visualizer tool. "+e),t.call()})},events:function(){var t=this;o("#email-btn").on("click",function(){t.createMessage(function(){t.modal.fadeIn(),setTimeout(function(){o(".close-btn img").css("width","20.1px")},200)})}),t.modal.on("click",".close-btn",function(){t.modal.fadeOut(),t.validator.resetForm()}),t.form.on("submit",function(e){e.preventDefault(),t.validator.validateAndPrintMessages()&&(o.post("/services/email.ashx",t.validator.gatherFormValues()),t.modal.fadeOut().promise().done(function(){t.validator.resetForm()}))})}}}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(r){"use strict";debug("cham:feedback");CHAM.feedback={init:function(){this.modal=r("#feedback-modal"),this.form=this.modal.find("form"),this.validator=Forms.FormValidator(this.form,this.formRules)},formRules:{email:[{type:"required",message:"An email address is required."},{type:"email",message:"Please enter a valid email address."}],message:[{type:"required",message:"A message is required."}]},events:function(){var t=this;r("#feedback").on("click",function(){t.modal.fadeIn()}),t.modal.on("click",".close-btn, .cancel",function(){t.modal.fadeOut().promise().done(function(){t.validator.resetForm()})}),t.form.on("submit",function(e){e.preventDefault(),t.validator.validateAndPrintMessages()&&(r.post("/services/feedback.ashx",t.validator.gatherFormValues()),t.modal.fadeOut().promise().done(function(){t.validator.resetForm()}))})}}}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(o){"use strict";debug("cham:social");CHAM.share={init:function(){this.social()},social:function(){var e={fbAppID:CHAM.FbAppID,imperURL:CHAM.CurrentDomain,title:"Check out this design I created with the LP<sup>&reg</sup> SmartSide<sup>&reg</sup> Trim & Siding home visualizer tool.",siteName:CHAM.SiteID,sel:"",spec:"",vizSelector:"#visualizer",hasGPlus:!1,viz:null,FBLinkSelector:"#facebookLinkkk",TWLinkSelector:"#twitterLinkk",PTLinkSelector:"#pinterestLinkk",GPlusLinkSelector:"#googleplusLinkk",SocialBTNLoc:"#shares",target:"_blank"};socialMedia.init(e)},update:function(){this.initComplete||this.init();var e=CHAM.DATA.specifier,t=CHAM.DATA.sel,e="https://lpbuildingsolutions.chameleonpower.com/og_meta.aspx?Specifier="+e.replace(/\\/g,"%5C")+"~"+t,t="https://www.facebook.com/dialog/feed?app_id="+CHAM.FbAppID+"&link="+e+"&redirect_uri="+e;o("#facebookLinkk").attr("href",t),o("#twitterLink").off("click").on("click",function(){var t=window.open();CHAM.helpers.getShortURL(CHAM.DATA.specifier,CHAM.DATA.sel,function(e){t.location="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out this design I created with the LP® SmartSide® Trim & Siding home visualizer tool.")+" "+e})}),o("#pinterestLink").off("click").on("click",function(){var t=o("#visualizer-left").ChamViz({action:"test"}).spec,r=CHAM.DATA.sel,n=window.open();CHAM.helpers.getShortURL(t,r,function(e){n.location="https://pinterest.com/pin/create/button/?url="+encodeURIComponent(e)+"&description="+encodeURIComponent("Check out this design I created with the LP® SmartSide® Trim & Siding home visualizer tool.")+"&media="+encodeURIComponent("https://core2render.chameleonpower.com/cham/GetImage.ashx?spec="+t+"(focus=300)&sel="+r+" &Size=512&type=base")})}),o("#shares").on("click",function(e){o("#share-modal.lightbox").addClass("active")}),o("#share-modal .close").off("click").on("click",function(){o("#share-modal.lightbox").removeClass("active")})}}}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(t){"use strict";debug("cham:upload");CHAM.upload={init:function(){this.projects=t("#my-projects"),this.mapper=t("#uploadOverlay, #upload-container"),this.proUpload=t("#pro-modal"),this.events()},showImageMapper:function(){this.projects.fadeOut(),this.mapper.fadeIn("slow"),t("#upload-container").hide(),t("#process-upload").fadeIn("slow"),t("body, html").addClass("modal-styles")},events:function(){var e=this;this.projects;t("#upload, #upload-banner, #upload-link, .upload-photo, .upload-btn").on("click",function(){e.showImageMapper()}),t("#closemodal").on("click",function(){t("body, html").removeClass("modal-styles")})}}}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(n){"use strict";debug("cham:projects");CHAM.projects={apiRoot:"/services/jsonproxy.ashx?remoteURL=https://lizard.chameleonpower.com/",rootSelector:"#my-projects",loggedIn:function(){return this.sessionToken&&64==this.sessionToken.length||this.password},email:"",sessionToken:"",nextDialog:"",projectList:[],getLoginDTO:function(){var e={email:this.email,sessionToken:this.sessionToken,siteID:CHAM.SiteID};return this.password&&(e.sessionToken="",e.password=this.password,this.password=null),e},init:function(){var e=Cookies.get("email"),e=(e&&(this.email=e.trim()),Cookies.get("SessionToken"));e&&(this.sessionToken=e),this.events()},events:function(){n("#projects, #login, #saved").off().on("click",function(){CHAM.projects.showProjects(),n("#SaveProjectName").removeAttr("value")}),n("#save, .phone#save, #save-proj").off().on("click",function(){CHAM.projects.showSave(),n("#SaveProjectName").removeAttr("value"),n("#printwarn-modal").removeClass("active")}),n("#printwarn-modal .close").off("click").on("click",function(){n("#printwarn-modal.lightbox").removeClass("active")}),n("#printbox").off("click").on("click",function(){n("#printwarn-modal.lightbox").addClass("active")}),n("#thickness-modal .close").off("click").on("click",function(){n("#thickness-modal.lightbox").removeClass("active")}),n("#colour-modal .close").off("click").on("click",function(){n("#colour-modal.lightbox").removeClass("active")}),n(CHAM.projects.rootSelector).off(),n(CHAM.projects.rootSelector).on("click",".closeBTN",function(){CHAM.projects.closeModal()}),n(CHAM.projects.rootSelector).on("click",".logoutBTN",function(){CHAM.projects.logout(),CHAM.projects.showLogin()}),n(CHAM.projects.rootSelector).on("click",".goToChangeBTN",function(){CHAM.projects.loggedIn()?CHAM.projects.showChangePassword():(CHAM.projects.nextDialog="changepassword",CHAM.projects.showLogin())}),n(CHAM.projects.rootSelector).on("click",".gotoRegBTN",function(){CHAM.projects.showRegister()}),n(CHAM.projects.rootSelector).on("click",".gotoForgotBTN",function(){CHAM.projects.showResetPassword()}),n(CHAM.projects.rootSelector).on("click",".gotoLoginBTN",function(){CHAM.projects.showLogin()}),n(CHAM.projects.rootSelector).on("click",".loginBTN",function(){CHAM.projects.submitLogin()}),n(CHAM.projects.rootSelector).on("keypress","input",function(e){"13"==(e.keyCode||e.which)&&(0<n(".Content .loginForm").length?CHAM.projects.submitLogin():0<n(".Content .regForm").length?CHAM.projects.submitRegister():0<n(".Content .forgotForm").length?CHAM.projects.submitResetPassword():0<n(".Content .saveForm").length?CHAM.projects.submitSave():0<n(".Content .changeForm").length&&CHAM.projects.submitChangePassword())}),n(CHAM.projects.rootSelector).on("click",".regBTN",function(){CHAM.projects.submitRegister()}),n(CHAM.projects.rootSelector).on("click",".forgotBTN",function(){CHAM.projects.submitResetPassword()}),n(CHAM.projects.rootSelector).on("click",".goToChangeBTN",function(){CHAM.projects.showChangePassword()}),n(CHAM.projects.rootSelector).on("click",".changePwdBTN",function(){CHAM.projects.submitChangePassword()}),n(CHAM.projects.rootSelector).on("click",".saveBTN",function(){CHAM.projects.submitSave()}),n(CHAM.projects.rootSelector).on("click",".Use",function(){var e=n(this).data("id");CHAM.projects.loadProject(e),CHAM.loadedVisualizer=!1}),n(CHAM.projects.rootSelector).on("click",".Edit",function(){var e=n(this).data("specifier");window.location.href="/IM.aspx?specifier="+e}),n(CHAM.projects.rootSelector).on("click",".Remove",function(){var e=n(this).data("id");CHAM.projects.deleteProject(e)})},showProjects:function(){this.loggedIn()?n.post(CHAM.projects.apiRoot+"Project/GetProjects",JSON.stringify(CHAM.projects.getLoginDTO()),function(e){if(e.success)switch(CHAM.projects.sessionToken=e.sessionToken,Cookies.set("SessionToken",e.sessionToken,{expires:1/24}),CHAM.projects.projectList=e.data,console.log("data",e),CHAM.projects.nextDialog){case"upload":CHAM.upload.showImageMapper(),CHAM.projects.closeModal();break;case"submitSave":CHAM.projects.nextDialog=null,CHAM.projects.submitSave();break;default:var t=CHAM.templates.projects.projectModal(CHAM.projects.projectList);CHAM.projects.showDialog("My Projects",'<div class="buttons goToChangeBTN">Change Password?</div><div class="buttons logoutBTN">Log Out</div>',t),0==CHAM.projects.projectList.length&&n(".projectsForm").html("No items have been saved")}else CHAM.projects.showLogin(),n(".errors").hide().html("Check your login credentials and try again").fadeIn("slow")},"json").fail(function(){CHAM.projects.showLogin(),n(".errors").hide().html("An unknown error occured.").fadeIn("slow")}):(this.nextDialog="projects",this.showLogin())},showLogin:function(e){var t=CHAM.templates.projects.loginModal(this.email);this.showDialog("Login","",t)},showRegister:function(){var e=CHAM.templates.projects.registerModal(this.email);this.showDialog("Register","",e)},showDialog:function(e,t,r){e=CHAM.templates.projects.modal(e,t,r);n(this.rootSelector).html(e),n(this.rootSelector).fadeIn()},logout:function(){CHAM.projects.sessionToken="",Cookies.set("SessionToken","",{expires:-1})},closeModal:function(){n(CHAM.projects.rootSelector).fadeOut().promise().then(function(){n(this).empty()})},submitLogin:function(){CHAM.projects.validateEmail(n("#loginEmail").val())&&(n("input#loginPassword").val()?(this.email=n("#loginEmail").val(),this.password=n("#loginPassword").val(),Cookies.set("email",this.email,{expires:1/24}),this.showProjects()):n("div.errors").html("You must enter a password to log in.").show())},validateEmail:function(e){return!!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e)||(n("div.errors").html("You must enter a valid email address.").show(),!1)},submitRegister:function(){var e={email:n("#RegEmail").val(),password:n("#RegPassword").val(),firstName:n("#RegFName").val(),lastName:n("#RegLName").val(),siteID:CHAM.SiteID};CHAM.projects.email=e.email,n.post(CHAM.projects.apiRoot+"User/Register",JSON.stringify(e),function(e){e.success?(CHAM.projects.sessionToken=e.sessionToken,CHAM.projects.saveData?CHAM.projects.submitSaveProject():(Cookies.set("email",CHAM.projects.email,{expires:1/24}),CHAM.projects.showProjects())):n(".errors").hide().html(e.message).fadeIn("slow")},"json").fail(function(){n(".errors").hide().html("An unknown error occured.").fadeIn("slow")})},showSave:function(){var e=this.tmpProjectName||"",e=CHAM.templates.projects.saveProjectModal(e);this.showDialog("Save Current Project","",e)},showChangePassword:function(){var e=CHAM.templates.projects.changePasswordModal(this.email);this.showDialog("Change Password","",e)},submitChangePassword:function(){var e,t=n("#NewPassword").val();t!=n("#ConfirmNewPassword").val()?n(".errors").hide().html("New password and confirm new password must match.").fadeIn("slow"):(e=n("#OldPassword").val()).length<1?n(".errors").hide().html("Current password cannot be blank.").fadeIn("slow"):(this.password=e,e={login:this.getLoginDTO(),newPassword:t},n.post(CHAM.projects.apiRoot+"User/ChangePassword",JSON.stringify(e),function(e){e.success?(CHAM.projects.sessionToken=e.sessionToken,CHAM.projects.showProjects()):n(".errors").hide().html(e.message).fadeIn("slow")},"json").fail(function(){n(".errors").hide().html("An unknown error occured.").fadeIn("slow")}))},showResetPassword:function(){var e=CHAM.templates.projects.resetPasswordModal(this.email);this.showDialog("Reset Password","",e)},submitResetPassword:function(){var e;n("#txtForgotEmail").val()?(n("div.errors").html("You must enter a valid email.").hide(),e={email:n("#txtForgotEmail").val(),siteID:CHAM.SiteID},n.post(CHAM.projects.apiRoot+"User/ResetPassword",JSON.stringify(e),function(e){(e.success?n(".success").hide().html("An email should arrive shortly.<br/>"):n(".errors").hide().html(e.message)).fadeIn("slow")},"json").fail(function(){n(".errors").hide().html("An unknown error occured.").fadeIn("slow")})):n("div.errors").html("You must enter a valid email.").show()},submitSave:function(){var e,t,r=n("#SaveProjectName").val();this.tmpProjectName=null!=r&&""!==r?r:this.tmpProjectName;!this.tmpProjectName||this.tmpProjectName.length<1||""===n("#SaveProjectName").val()?n(".errors").hide().html("Name is required").fadeIn("slow"):this.loggedIn()?(r=CHAM.DATA.sel,e=CHAM.router._lastRouteResolved,t=n("#visualizer-left").ChamViz({action:"test"}),t={Name:this.tmpProjectName,Params:{specifier:t.spec,sel:r,url:e.url}},r={login:this.getLoginDTO(),project:t},n.post(CHAM.projects.apiRoot+"Project/Save",JSON.stringify(r),function(e){e.success?CHAM.projects.showProjects():n(".errors").hide().html(e.message).fadeIn("slow")},"json").fail(function(){n(".errors").hide().html("An unknown error occured.").fadeIn("slow")}),n("#step-three").addClass("active"),n("#step-two-line").addClass("active"),n(".menu-header #order").addClass("active")):(this.nextDialog="submitSave",this.showLogin())},deleteProject:function(e){e={login:this.getLoginDTO(),projectID:e};n.post(CHAM.projects.apiRoot+"Project/Delete",JSON.stringify(e),function(e){e.success?CHAM.projects.showProjects():n(".errors").hide().html(e.message).fadeIn("slow")},"json").fail(function(){n(".errors").hide().html("An unknown error occured.").fadeIn("slow")})},loadProject:function(t){var e=_.find(this.projectList,function(e){return e.id==t});e?(e.params.specifier!=CHAM.DATA.specifier&&(CHAM.DATA.specifier=e.params.specifier,CHAM.DATA.sel=e.params.sel,CHAM.router.navigate("scene/"+CHAM.DATA.specifier+"/products/"+CHAM.DATA.sel)),CHAM.DATA.specifier=e.params.specifier,CHAM.DATA.sel=e.params.sel,CHAM.router.navigate("scene/"+e.params.specifier+"/products/"+e.params.sel),this.closeModal()):alert("Unknown error, please reload your project list.")}}}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(){"use strict";var r,e=Utilities.createComponent,l=Viz.sel.parseToSurfaceArray,c=Viz.tileSel.isPattern,e=e({constructor:function(e,t,r){}});function p(e){return _.map(e,function(e){return null!=e?e.sel:"-1"}).join(",")}r={groupedSurfacesLoaded:function(e,t){var r,n,o=JSON.parse(JSON.stringify(t)),t=(r=t,n=JSON.parse(JSON.stringify(CHAM.menuModel)),Object.keys(r).forEach(function(e){r[e]={currentSubSurfacesSelected:[],menuModel:n[e]}}),r);return _.assign({},e,{surfaceGroups:t,surfaceGroupsObjs:o})},surfacesLoaded:function(e,t){var r=0<e.applied.length&&_.some(e.applied,function(e){return null!=e})?e.applied:new Array(2*t.length),n=p(r).split(","),o=n.slice(0,n.length/2).toString(),i=r.slice(0,r.length/2),n=n.slice(n.length/2,n.length).toString(),s=r.slice(r.length/2,r.length);return{specifier:e.specifier,surfaces:t,currentViz:"rightViz",currentSurfacesSelected:["All"],applied:r,fullSel:p(r),visualizers:{leftViz:{applied:i,fullSel:o||"-1"},rightViz:{applied:s,fullSel:n||"-1"}}}},vizSelected:function(e,t){return _.assign({},e,{currentViz:t})},productSelected:function(e,t,r){var n="leftViz"===e.currentViz?"rightViz":"leftViz",o=e.visualizers[e.currentViz],i=o.applied.slice(0);if(r)for(var s=0;s<r.length;s++)i[parseInt(r[s].specifiersurfacenumber)-1]={product:t,sel:t.id};var a={};return a[e.currentViz]=_.assign({},o,{applied:i,fullSel:p(i)}),a[n]=_.assign({},{applied:e.visualizers[n].applied,fullSel:e.visualizers[n].fullSel}),_.assign({},e,{visualizers:a,applied:i,fullSel:p(i)})},sidingProductSelected:function(e,t,r,n){for(var o,i,s,a="leftViz"===e.currentViz?"rightViz":"leftViz",l=e.visualizers[e.currentViz],c=l.applied.slice(0),u=0;u<n.length;u++)o=n[u],i=r,s=t,c[parseInt(o.specifiersurfacenumber)-1]=_.assign({},{product:i,color:s,sel:i.id+"("+s.id+")"});var d={};return d[e.currentViz]=_.assign({},l,{applied:c,fullSel:p(c)}),d[a]=_.assign({},{applied:e.visualizers[a].applied,fullSel:e.visualizers[a].fullSel}),_.assign({},e,{visualizers:d,applied:c,fullSel:p(c)})},colorAccentSurfaceSelected:function(e,t){return _.assign({},e,{currentSurfacesSelected:t})},subSurfaceSelected:function(e,t,r){return e.surfaceGroups[t]=_.assign({},{menuModel:e.surfaceGroups[t].menuModel,currentSubSurfacesSelected:r,currentMenuSection:e.surfaceGroups[t].currentMenuSection}),_.assign({},e,{surfaceGroups:e.surfaceGroups})},saveMenuState:function(e,t,r,n){return e.surfaceGroups[t]=_.assign({},{menuModel:r,currentSubSurfacesSelected:e.surfaceGroups[t].currentSubSurfacesSelected,currentMenuSection:n}),_.assign({},e,{surfaceGroups:e.surfaceGroups})},sidingProfileSelected:function(e,t){return _.assign({},e,{sidingProfileSelected:t})}},CHAM.applied={getInitialState:function(e,t,r,n){var o,i,s,a,e=null!=r?function(r,e){e=l(e);return _.map(e,function(e){var t=c(e);return!t&&"-1"===e||null==(t=t?(t=(t=e).replace(")","").split(/\(|,/),{0:r[t[0]],1:r[t[1]]}):[r[e]])||null==t[0]?null:{product:t[0],color:null!=t[1]?t[1]:null,sel:e}})}(e,r):null!=n?new Array(n.length):[];return null!=r&&(o=(i=r.split(",")).slice(0,i.length/2).toString(),i=i.slice(i.length/2,i.length).toString(),s=e.slice(0,e.length/2),a=e.slice(e.length/2,e.length)),{specifier:t,surfaces:n||null,currentViz:"rightViz",currentSurfacesSelected:["All"],applied:e,menuState:null,fullSel:r||"-1",visualizers:{leftViz:{applied:s,fullSel:o||"-1"},rightViz:{applied:a,fullSel:i||"-1"}}}},createAppliedStore:function(e,t){return Stores.EventStore(e,r,t)},appliedComponent:e}}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(l){"use strict";debug("cham:products");var e=(0,Utilities.createComponent)({constructor:function(e,t,r,n,o,i){var s=this,a=(this.root=e,this.events=r,this.surfaces=n,this.allSurfaces=o,this.trimProducts=_.filter(t,function(e){return 7056==e.seriesID}),this.roofProducts=_.filter(t,function(e){return 6285==e.seriesID}),this.productsList=t,this.surfaceGroup=i,this.filteredProductsList=t,this.menuHeaderBtnHtml=this.root.find(".menu-header-btns"),this.menuBreadcrumbsHtml=this.root.find(".applied-menu-breadcrumbs"),this.menuTitleTextHtml=this.root.find(".menu-title"),this.menuFilterWrapperHtml=this.root.find(".menu-filter-wrapper"),this.selectedSurfaces=[],this.subsurfaceSelections={Roof:[],Extras:[],Walls:[],TrimFascia:[]},this.colorAppliedToSurface=[],this.currentMenuSection="TrimFascia"==i?"type":"surfaces",CHAM.events.sidingProfileSelected.emit(null),CHAM.events.appliedStore.getState()),n=(this.menuModel=a.surfaceGroups[i].menuModel,this.renderMenuHeaderBtns(i,a.surfaceGroups[i].menuModel,this.currentMenuSection),this.renderMenuBreadcrumbs(a.surfaceGroups[i].menuModel,i),this.renderMenuTitleText(a.surfaceGroups[i].menuModel,i,this.currentMenuSection),CHAM.events.subSurfaceSelected.emit(i,[]),CHAM.events.subSurfaceClicked.emit(null,null),this.renderSurfaceFilters(this.subsurfaceSelections[i],i),{productsList:this.productsList,filteredProductsList:[],filtersObject:this.menuModel,filters:this.createFilterModel(this.productsList)});this.filterModel=n,CHAM.events.saveMenuState.subscribe(function(e){var t=CHAM.events.appliedStore.getState(),r=t.surfaceGroups[e].menuModel,t=(null==t.surfaceGroups[e].currentMenuSection?s:t.surfaceGroups[e]).currentMenuSection;s.renderMenuHeaderBtns(e,r,t),s.renderMenuBreadcrumbs(r,e),s.renderMenuTitleText(r,e,t)}),r.surfaceSelected.subscribe(function(e,t){var r,n;"TrimFascia"===e&&s.surfaceGroup===e&&(r=null==(n=CHAM.events.appliedStore.getState()).surfaceGroups.TrimFascia.currentMenuSection?"type":n.surfaceGroups.TrimFascia.currentMenuSection,n=n.surfaceGroups[e].menuModel,CHAM.events.saveMenuState.emit(e,n,r),"type"===r&&s.renderTypeMenu(s.trimProducts,e,s.filterModel),CHAM.events.subSurfaceSelected.emit(e,["All"])),"Extras"===e&&"Roof"!=t&&s.surfaceGroup===e&&s.renderSelectedMenu("surfaces","Extras"),"Walls"===e&&s.surfaceGroup===e&&s.renderSelectedMenu("surfaces","Walls")}),r.roofSelected.subscribe(function(){var e=CHAM.events.appliedStore.getState().surfaceGroups.Extras.menuModel;e.surfaces=["Roof"];this.subsurfaceSelections.Extras=[],CHAM.events.subSurfaceSelected.emit("Extras",this.subsurfaceSelections.Extras),CHAM.events.saveMenuState.emit("Extras",e,"color"),r.productsListFiltered.emit(e,this.roofProducts,"Extras")}.bind(this)),r.subSurfaceClicked.subscribe(function(e,t){null==e&&null==t||s.subSurfaceHandling(e,t,null)}),this.root.on("click",".sub-surfaces li",function(e){var t=l(this),r=l(this).data("group"),t=t.data("name");CHAM.events.subSurfaceClicked.emit(t,r)}),e.on("click",".sub-surfaces div.eye",function(e){e.stopPropagation();var t=l(this).parent().data("surfacenumber"),e=l(this).parent().data("group");"All"===t?(a.surfaceGroupsObjs[e].forEach(function(e){l('div.ChamViz img.viz-highlight[data-surface="'+e.sortorder+'"]').css("display","block")}),setTimeout(function(){l("div.ChamViz img.viz-highlight").css("display","none")},1e3)):(l('div.ChamViz img.viz-highlight[data-surface="'+t+'"]').css("display","block"),setTimeout(function(){l('div.ChamViz img.viz-highlight[data-surface="'+t+'"]').css("display","none")},1e3))}),e.on("click",".section-btn.active, .explore-step.active h4, .applied-menu-breadcrumbs li",function(e){e=l(e.target).data("section").toLowerCase();this.renderSelectedMenu(e,i)}.bind(this)),e.on("click",".category li",function(e){var e=l(e.target.parentElement),t=e.data("type"),e=e.data("category"),t=(this.menuModel.type="Siding"!==e||t.includes("Siding")?t:t+" "+e,"Siding"===e?"style":"color");CHAM.events.saveMenuState.emit(i,this.menuModel,t),r.productsListFiltered.emit(this.menuModel,this.productsList,i)}.bind(this)),e.on("click",".extras-roof-wrapper .root-surface-btn",function(e){CHAM.events.roofSelected.emit()}.bind(this))},renderMenuHeaderBtns:function(e,t,r){this.surfaceGroup===e&&(e=CHAM.templates.menuHeaderBtns(e,t,r),this.menuHeaderBtnHtml.html(e))},renderMenuBreadcrumbs:function(e,t){this.surfaceGroup===t&&(t=CHAM.templates.menuBreadcrumbs(e),this.menuBreadcrumbsHtml.html(t))},renderMenuTitleText:function(e,t,r){this.surfaceGroup===t&&(e=CHAM.templates.menuTitleText(e,t,r),l("div."+t.toLowerCase()+"-menu").find(".menu-title").html(e))},renderSurfaceFilters:function(e,t){e=CHAM.templates.subSurfaces(this.surfaces,e,this.colorAppliedToSurface);this.menuFilterWrapperHtml.html(e)},renderTypeMenu:function(e,t,r){e=CHAM.templates.typeSection(e,t,r);l("div."+t.toLowerCase()+"-menu").find(".menu-filter-wrapper").html(e)},subSurfaceHandling:function(e,t,r){var n;t===this.surfaceGroup&&(n=this.subsurfaceSelections[t].indexOf(e),null!=r?(this.subsurfaceSelections[t]=[r],CHAM.events.subSurfaceSelected.emit(t,this.subsurfaceSelections[t])):"All"===e?(this.subsurfaceSelections[t]=["All"],CHAM.events.subSurfaceSelected.emit(t,["All"])):(-1<n?(this.subsurfaceSelections[t].splice(n,1),0===this.subsurfaceSelections[t].length&&(this.subsurfaceSelections[t]=[],CHAM.events.subSurfaceSelected.emit(t,[]))):(this.subsurfaceSelections[t].push(e),"All"!==e&&(this.subsurfaceSelections[t]=_.filter(this.subsurfaceSelections[t],function(e){return"All"!==e}))),CHAM.events.subSurfaceSelected.emit(t,this.subsurfaceSelections[t])),r=CHAM.events.appliedStore.getState().surfaceGroups[t].menuModel,this.highlightSubSurfaces(this.subsurfaceSelections[t]),r.surfaces=0===this.subsurfaceSelections[t].length?null:this.subsurfaceSelections[t],CHAM.events.saveMenuState.emit(t,r,"surfaces"))},highlightSubSurfaces:function(e){var t=this.menuFilterWrapperHtml;0===e.length?(t.find(".sub-surfaces li").removeClass("active"),t.find(".explore-step").removeClass("active")):(t.find(".sub-surfaces li").removeClass("active"),t.find(".explore-step").addClass("active"),e.forEach(function(e){t.find('.sub-surfaces li[data-name="'+e+'"]').addClass("active")}))},getColorAppliedtoSurfaces:function(e){for(var t=e.visualizers[e.currentViz].applied,r=0;r<t.length;r++)null!=t[r]&&"Paint"===t[r].product.categoryName&&null!=this.allSurfaces&&(t[r].surfaceApplied=this.allSurfaces[r].name);this.colorAppliedToSurface=_(t).groupBy(function(e){if(null!=e)return e.surfaceApplied}).value()},updateFilteredColorsList:function(t){return"All"!==t.colorGroup?_(this.colorsList).filter(function(e){return-1<e.description.indexOf(t.colorGroup)&&e.manufacturerName===t.colorPalette}):_(this.colorsList).filter(function(e){return e.manufacturerName===t.colorPalette})},createFilterModel:function(){return{firstFilter:_(this.filteredProductsList).map(function(e){return e.firstFilter}).uniqBy().value().sort(),secondFilter:_(this.filteredProductsList).map(function(e){return e.secondFilter}).uniqBy().value().sort(),thirdFilter:_(this.filteredProductsList).map(function(e){return e.thirdFilter}).uniqBy().value().sort()}},renderSelectedMenu:function(e,t){var r,n,o,i,s=CHAM.events.appliedStore.getState();"Walls"===t&&("surfaces"===e&&(i=s.surfaceGroups.Walls.currentSubSurfacesSelected,this.renderSurfaceFilters(i),(r=s.surfaceGroups.Walls.menuModel).type=null,r.color=null,r.style=null,r.surfaces=i,CHAM.events.saveMenuState.emit(t,r,"surfaces")),"type"===e&&(this.menuModel.color=null,this.menuModel.style=null,this.renderTypeMenu(this.productsList,this.surfaceGroup,this.filterModel),CHAM.events.saveMenuState.emit(t,this.menuModel,"type")),"style"===e)&&(s.sidingProfileSelected,this.menuModel.color=null,CHAM.events.saveMenuState.emit(t,this.menuModel,"style"),this.events.productsListFiltered.emit(this.menuModel,this.productsList,t)),"TrimFascia"===t&&"type"===e&&(n=e,(o=s.surfaceGroups[t].menuModel).color=null,o.type=null,this.renderTypeMenu(this.trimProducts,t,this.filterModel),CHAM.events.saveMenuState.emit(t,o,n)),"Extras"===t&&("surfaces"===e&&(i=s.surfaceGroups.Extras.currentSubSurfacesSelected,this.renderSurfaceFilters(i),(r=s.surfaceGroups.Extras.menuModel).color=null,r.surfaces=null!=r.surfaces&&r.surfaces.includes("Roof")?null:i,CHAM.events.saveMenuState.emit(t,r,"surfaces")),"color"===e)&&(CHAM.events.paintColorMenuSelected.emit(t),CHAM.events.saveMenuState.emit(t,this.menuModel,"color"))}});CHAM.paintFilters=e}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(l){"use strict";debug("cham:products");var e=Utilities.createComponent;function o(t,e,r,n){var o,i;null!=e&&(i=l("div."+(e="Roof"===e?"Extras":e).toLowerCase()+"-menu").find(".menu-filter-wrapper"),null!=(e=null!=r?r:CHAM.getSurfaceObjs(n,t)))&&null!=t.visualizers[t.currentViz].applied&&e.forEach(function(e){null!=t.visualizers[t.currentViz].applied[e.specifiersurfacenumber-1]&&(o=("Siding"===t.visualizers[t.currentViz].applied[e.specifiersurfacenumber-1].product.categoryName?t.visualizers[t.currentViz].applied[e.specifiersurfacenumber-1].color:t.visualizers[t.currentViz].applied[e.specifiersurfacenumber-1].product).id,i.find("[data-sel]").removeClass("active"),i.find('[data-sel="'+o+'"]').addClass("active"))})}var t=e({constructor:function(e,t,r,n,o,i,s){var a=this,n=(this.root=e,this.events=r,this.productLookup=o,this.surface=n,this.surfaceGroup=i,this.productsList=t,this.sidingColors=s,this.menuFilterWrapperHtml=this.root.find(".menu-filter-wrapper"),this.filteredProductsList=t,CHAM.events.appliedStore.getState());this.menuModel=n.surfaceGroups[i].menuModel,this.paintFilterModel={productsList:this.productsList,filteredProductsList:[],filters:this.createFilterModel(CHAM.DATA.products.customColors)},e.on("dragstart","li",function(){return!1}),e.on("click",".colors-list li",function(e){var t=l(e.target.parentElement).data("sel"),e=_.find(o,function(e){return e.id==t}),r=CHAM.events.appliedStore.getState(),r=null!=r.sidingProfileSelected?r.sidingProfileSelected:null,n=null!=CHAM.events.surfaceSelected.current?CHAM.events.surfaceSelected.current[0]:this.surfaceGroup;null!=r&&"Walls"==n?(this.menuModel.color=e.manufacturerName.includes("LP")?e.name:"",this.applySidingProduct(e,r)):(this.menuModel.color=e.manufacturerName.includes("LP")?e.name:"",this.applyColorProduct(e,n)),CHAM.events.saveMenuState.emit(n,this.menuModel,"color"),CHAM.events.menuStateChange.emit()}.bind(this)),e.on("click",".color-btns li",function(e){var t,r=l(this).data("colorsection");("harmony"===r?l(".color-harm-menu"):((t=l("div."+i.toLowerCase()+"-menu").find(".menu-filter-wrapper")).find("[data-colorsection]").removeClass("active"),t.find('[data-colorsection="'+r+'"]'))).addClass("active")}),e.on("change",".custom-tool select",function(e){var t=l("div."+i.toLowerCase()+"-menu").find(".menu-filter-wrapper"),r=l(this).children("option:selected").val();a.renderColorList(a.sidingColors,i,r),t.find("[data-colorsection]").removeClass("active"),t.find('[data-colorsection="custom"]').addClass("active")}),r.productsListFiltered.subscribe(function(e,t,r){"TrimFascia"===r&&this.renderColorList(t,r)}.bind(this)),r.sidingProfileSelected.subscribe(function(e,t){null!=e&&this.renderColorList(this.sidingColors,t)}.bind(this)),r.paintColorMenuSelected.subscribe(function(e){null!=this.menuModel.surfaces&&0<this.menuModel.surfaces.length&&this.renderColorList(this.sidingColors,e)}.bind(this)),r.colorSelectedOutsideTool.subscribe(function(t){var e=_.find(CHAM.DATA.products.lookup,function(e){return 1680557==e.id}),r=_.find(CHAM.DATA.products.lookup,function(e){return e.name.toLowerCase().replace(/\s/g,"")===t});CHAM.events.subSurfaceSelected.emit("Walls",["All"]),this.applySidingProduct(r,e)}.bind(this))},renderColorList:function(e,t,r){var n;this.surfaceGroup===t&&(n=CHAM.events.appliedStore.getState(),e=this.divideColorSeries(e,r,t),n.surfaceGroups[t].currentSubSurfacesSelected,n=CHAM.templates.colorsList(e,t,this.paintFilterModel,r),l("div."+t.toLowerCase()+"-menu").find(".menu-filter-wrapper").html(n),this.callHighlightFunction(t)),CHAM.DATA.specifier.includes("_USER_")?l("li.harmony").hide():l("li.harmony").show()},divideColorSeries:function(e,t,r){var n,t="All"!=t&&null!=t?(n=this.filterColors(t,CHAM.DATA.products.customColors),this.filterColors(t,CHAM.DATA.products.smartSideColors)):(n=_.filter(e,function(e){return 7054==e.seriesID}),CHAM.DATA.products.smartSideColors),e=null!=r&&"TrimFascia"===r?_.filter(CHAM.DATA.products.allProducts,function(e){return 7055==e.seriesID}):_.filter(CHAM.DATA.products.allProducts,function(e){return 7014==e.seriesID});return{customColors:n,smartSideColors:e,filteredSmartsideColors:t}},applySidingProduct:function(e,t){var r=CHAM.events.appliedStore.getState(),n=r.surfaceGroups.Walls.currentSubSurfacesSelected,n="All"===n[0]?r.surfaceGroupsObjs.Walls:CHAM.getSurfaceObjs(n,r);this.events.sidingProductSelected.emit(e,t,n),this.callHighlightFunction("Walls"),(l("html").outerWidth()<1025||l("html").hasClass("mobile"))&&l("#compare-wrapper").get(0).scrollIntoView(),l(".color-harm-menu").find("li").removeClass("active")},applyColorProduct:function(e,t){var r=CHAM.events.appliedStore.getState(),n=r.surfaceGroups[t].currentSubSurfacesSelected,n="All"===n[0]?r.surfaceGroupsObjs[t]:CHAM.getSurfaceObjs(n,r);this.events.productSelected.emit(e,n),this.callHighlightFunction(t),(l("html").outerWidth()<1024||l("html").hasClass("mobile"))&&l("#compare-wrapper").get(0).scrollIntoView()},callHighlightFunction:function(e){var t=CHAM.events.appliedStore.getState(),r=t.surfaceGroups[e].currentSubSurfacesSelected,n="All"===r[0]?t.surfaceGroupsObjs[e]:CHAM.getSurfaceObjs(r,t);o.call(this,t,e,n,r)},createFilterModel:function(e){return{familyFilter:_(e).map(function(e){return e.colorFamily}).uniqBy().value().sort()}},filterColors:function(t,e){return _(e).filter(function(e){return!(0<t.length)||null!=e.colorFamily&&e.colorFamily===t}).sortBy(function(e){return e.sortOrder}).value()}}),e=e({constructor:function(e,t,r,n,o,i){var s=this,n=(this.root=e,this.events=r,this.productLookup=o,this.surface=n,this.surfaceGroup=i,this.productsList=t,this.menuFilterWrapperHtml=this.root.find(".menu-filter-wrapper"),this.filteredProductsList=t,CHAM.events.appliedStore.getState());this.menuModel=n.surfaceGroups[i].menuModel,e.on("click","li.product",function(e){var t=l(e.target.parentElement).data("sel"),e=_.find(o,function(e){return e.id==t}),r=CHAM.events.appliedStore.getState().surfaceGroups[i].menuModel,e=(7013==e.seriesID?(r.style=e.STYLE,CHAM.events.sidingProfileSelected.emit(e,this.surfaceGroup)):6285==e.seriesID?this.applyRoofProduct(e):(r.style=null,this.applyWallProduct(e)),"color");CHAM.events.saveMenuState.emit(i,r,e)}.bind(this)),e.on("click","li.product div.enlarge",function(e){e.stopPropagation();var t=l(this).data("sel"),e=_.find(s.productLookup,function(e){return e.id==t});r.enlargeSelected.emit(e)}),e.on("dragstart","li",function(){return!1}),r.productsListFiltered.subscribe(function(e,t,r){"Extras"===r?(this.filteredProductsList=this.filterProducts(e,t),this.renderStyleList(this.filteredProductsList,r)):"Walls"===r&&e.type.includes("Siding")?(this.filteredProductsList=this.filterSidingProducts(e,t),this.renderStyleList(this.filteredProductsList,r)):"Extras"===r||"TrimFascia"===r||e.type.includes("Siding")||(this.filteredProductsList=this.filterProducts(e,t),this.renderStyleList(this.filteredProductsList,r))}.bind(this))},renderStyleList:function(e,t){e=CHAM.templates.styleList(e);l("div."+t.toLowerCase()+"-menu").find(".menu-filter-wrapper").html(e),this.callHighlightFunction(this.surfaceGroup)},filterProducts:function(t,e){return _(e).filter(function(e){return!(null!=t.type&&null!=e.TYPE&&e.TYPE!==t.type||null!=t.style&&null!=e.STYLE&&e.STYLE!==t.style)}).sortBy(function(e){return e.sortOrder}).value()},filterSidingProducts:function(t,e){return _(e).filter(function(e){return null==t.type||null==e.TYPE||e.TYPE===t.type}).sortBy(function(e){return e.sortOrder}).value()},applyWallProduct:function(e){var t=CHAM.events.appliedStore.getState(),r=t.surfaceGroups.Walls.currentSubSurfacesSelected,r="All"===r[0]?t.surfaceGroupsObjs.Walls:CHAM.getSurfaceObjs(r,t);this.events.productSelected.emit(e,r),this.callHighlightFunction("Walls"),(l("html").outerWidth()<1025||l("html").hasClass("mobile"))&&l("#compare-wrapper").get(0).scrollIntoView()},applyRoofProduct:function(e){var t=CHAM.events.appliedStore.getState().surfaceGroupsObjs.Roof;this.events.productSelected.emit(e,t),this.callHighlightFunction("Roof"),(l("html").outerWidth()<1025||l("html").hasClass("mobile"))&&l("#compare-wrapper").get(0).scrollIntoView()},callHighlightFunction:function(e){var t,r,n=CHAM.events.appliedStore.getState();null!=n.surfaceGroups[e]&&(t=n.surfaceGroups[e].currentSubSurfacesSelected,r="Roof"===e?(t=n.surfaceGroupsObjs[e],n.surfaceGroupsObjs[e]):"All"===t[0]?n.surfaceGroupsObjs[e]:CHAM.getSurfaceObjs(t,n),o.call(this,n,e,r,t))}});CHAM.getSurfaceObjs=function(e,r){var n=[];return _.each(e,function(t){var e=_.find(r.surfaces,function(e){return e.name===t});n.push(e)}),n},CHAM.productsList=e,CHAM.colorsList=t}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(r){"use strict";debug("cham:products");var e=(0,Utilities.createComponent)({constructor:function(e,a,l){this.data=a,this.events=l,this.root=e,this.previousSelectedSurfaceName,l.groupedSurfacesLoaded.subscribe(function(e,t,i){var s=CHAM.events.appliedStore.getState().surfaceGroupsObjs;this.emptyProductsMenuAndAppendCloseButton(),_.each(t,function(e){this.render(e)}.bind(this)),_.each(s,function(e){var t,r,n,o;0<e.length&&(e=e[0],t=_.assign({},l,{productsListFiltered:Observable(),availableFiltersRequested:Observable(),twoProductsPatternSelected:Observable(),oneProductsPatternSelected:Observable()}),r=this.getProductsPerSurface(e,this.data.allProducts),n=this.data.sidingColors,"Roof"!=e.group)&&(o=this.root.find("."+e.group.toLowerCase().replace(" ","-")+"-menu"),CHAM.paintFilters(o,r,t,s[e.group],i,e.group).render(),CHAM.productsList(o,r,t,e,a.lookup,e.group).render(),CHAM.colorsList(o,r,t,e,a.lookup,e.group,n).render())}.bind(this)),CHAM.harmony.colorHarmonyList(r(".color-harm-menu"),l,s,CHAM.colorHarmony,a).render(),this.root.find(".walls-menu").addClass("active")}.bind(this)),l.surfaceSelected.subscribe(function(e){this.showProductsMenu(e.toLowerCase())}.bind(this))},getProductsPerSurface:function(t,e){String.prototype.capitalize=function(){return this.replace(/(^|\s)([a-z])/g,function(e,t,r){return t+r.toUpperCase()})};e=_(e).map(function(e){return 7013==e.seriesID&&(e.firstFilter=e.manufacturerName,e.STYLE=e.name.replace("LP® SmartSide®","").trim(),"Shake"===e.warranty||"Shingle"===e.warranty?(e.secondFilter="Shakes Siding",e.TYPE="Shakes Siding"):(e.secondFilter=e.warranty,e.TYPE=e.warranty+" "+e.categoryName),e.displayCaption1=e.name,e.displayCaption2=e.sku,e.styleDisplay=e.name),7044==e.seriesID&&(e.firstFilter="Other",e.secondFilter=e.categoryName,e.TYPE=e.categoryName,e.STYLE=e.categoryName,e.name=e.name.trim()),7043==e.seriesID&&(e.firstFilter="Other",e.secondFilter=e.categoryName,e.TYPE=e.categoryName,e.STYLE=e.categoryName,e.name=e.name.trim()),7054===e.seriesID&&(e.colorFamily=e.genericDisplayName),7056==e.seriesID&&(e.color=e.name.includes("Texture")?"Texture":"Smooth"),7014==e.seriesID&&(e.colorFamily=e.genericDisplayName),7055==e.seriesID&&(e.colorFamily=e.genericDisplayName),e.seriesID,e});return _(e).filter(function(e){return t.seriesid.includes(e.seriesID)}).value()},render:function(e){e=CHAM.templates.productsMenuContainer(e);this.root.append(e)},emptyProductsMenuAndAppendCloseButton:function(){this.root.empty()},capitalizeFirstLetter:function(e){return"trimfascia"===e?"TrimFascia":e.charAt(0).toUpperCase()+e.slice(1)},showProductsMenu:function(e){var t=this.capitalizeFirstLetter(e.toLowerCase()),e=this.root.find("."+e+"-menu"),t=this.root.parent().find(".surface-btn").filter("[data-surface='"+t+"']");e.siblings().removeClass("active"),t.siblings().removeClass("active"),e.addClass("active"),t.addClass("active")}});CHAM.productsMenuContainer=e}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(r){"use strict";debug("cham:products");var e=(0,Utilities.createComponent)({constructor:function(e,t,i){this.root=e,i.surfacesLoaded.subscribe(function(e){for(var t=_(e).filter(function(e){return"Painted Wall"===e.name}).value(),r=0;r<e.length;r++)1<t.length&&"Painted Wall"===e[r].name&&(e[r].name="Painted Wall "+(r+1));for(t=_(e).filter(function(e){return"Exterior Wall"===e.name}).value(),r=0;r<e.length;r++)1<t.length&&"Exterior Wall"===e[r].name&&(e[r].name="Exterior Wall "+(r+1));var n=_.groupBy(e,function(e){return e.type.includes("Wall")&&!e.name.includes("Painted")?(e.group="Walls",e.seriesid="7013,7044,7043","Walls"):"Trim"===e.type?(e.group="TrimFascia",e.seriesid="7055,7054,7056","TrimFascia"):"Roof"===e.name?(e.group="Roof",e.seriesid="6285","Roof"):(e.group="Extras",e.seriesid="6285,7054","Extras")}),o=Object.keys(n);this.render(o),setTimeout(function(){i.groupedSurfacesLoaded.emit(n,o,e)}),setTimeout(function(){},200)}.bind(this)),e.on("click","div",function(){var e=r(this).data("surface");CHAM.events.surfaceSelected.emit(e,!0),r(".surfaces .surface-btn").removeClass("active"),r('.surfaces .surface-btn[data-surface="'+e+'"]').addClass("active")})},render:function(e){e=e.filter(function(e){return"Roof"!==e}),e=CHAM.templates.surfaceMenu(e);this.root.html(e),r("div.surface-btn").filter("[data-surface='Walls']").addClass("active")}});CHAM.surfaceMenu=e}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(n){"use strict";debug("cham:products");var e=Utilities.createComponent,t=e({constructor:function(e,t,r){CHAM.surfaceMenu(e.find(".leftViz-menu").find(".surfaces"),t,r).render(),CHAM.productsMenuContainer(e.find(".leftViz-menu").find(".product-menu"),t,r).render(),CHAM.products.enlargeModal(n("#enlarge-modal"),r).render()}}),e=e({constructor:function(t,e){var r=this;this.root=t,e.enlargeSelected.subscribe(function(e){r.render(e),t.addClass("active"),n("body, html").addClass("modal-styles")}),this.root.on("click",".close",function(){var e=t.find(".product-name").data("sel"),e=(t.removeClass("active"),n("body, html").removeClass("modal-styles"),n('.swatches li[data-sel="'+e+'"]'));Math.floor(e.offset().top)})},render:function(e){e=CHAM.templates.enlargeModal(e);this.root.find(".content").html(e)}});CHAM.products={enlargeModal:e},CHAM.productsComponent=t}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(s){"use strict";CHAM.tour={currentIndex:0,steps:[{element:"#intro-tour",target:".visualizer",attachment:"bottom middle",targetAttachment:"left middle"},{element:"#surface-tour",target:".surfaces",attachment:"top left",targetAttachment:"top right"},{element:"#menu-btns-tour",target:".surfaces",attachment:"top left",targetAttachment:"top right"},{element:"#surface-tab-tour",target:".surfaces",attachment:"top left",targetAttachment:"top left"},{element:"#type-tab-tour",target:".surfaces",attachment:"top left",targetAttachment:"top left"},{element:"#style-tab-tour",target:".surfaces",attachment:"top left",targetAttachment:"top left"},{element:"#color-tab-tour",target:".surfaces",attachment:"top left",targetAttachment:"top left"}],init:function(){var n,o,e,t,r,i=s("#tour");0!==i.length&&(n=this,o=i.find(".tour-step"),e=i.find(".tour-arrow.square"),t=i.find(".tour-arrow .next"),r=_.map(this.steps,function(e){var t=o.filter(e.element),r=t.find(".tour-arrow");return{node:t,arrowNode:r,tether:n.createTether(r,e)}}),this.arrowNodes=t,this.tourOverlay=i,this.stepNodes=o,this.squareNodes=e,this.activeSteps=r)},events:function(){var t=this;CHAM.tour.endTour=function(){var e=t.activeSteps[t.currentIndex];e.node.is(":animated")||(t.currentIndex=0,e.node.removeClass("active"),e.arrowNode.removeClass("active"),t.tourOverlay.hide())},this.squareNodes.on("click",".close",CHAM.tour.endTour),this.stepNodes.on("click",".close",CHAM.tour.endTour),this.stepNodes.on("click",".finish-btn",CHAM.tour.endTour),this.tourOverlay.on("click",function(e){s(e.target).is(t.tourOverlay)&&CHAM.tour.endTour()}),this.stepNodes.on("click",".next",function(){var e=t.activeSteps[t.currentIndex];e.node.removeClass("active"),e.arrowNode.removeClass("active"),t.currentIndex===t.activeSteps.length-1?CHAM.tour.endTour():(e=t.activeSteps[++t.currentIndex],t.showStep(e.node,e.arrowNode,e.tether))}),this.squareNodes.on("click",".next",function(){var e=t.activeSteps[t.currentIndex];e.node.removeClass("active"),e.arrowNode.removeClass("active"),t.currentIndex===t.activeSteps.length-1?CHAM.tour.endTour():(e=t.activeSteps[++t.currentIndex],t.showStep(e.node,e.arrowNode,e.tether))}),this.squareNodes.on("click",".prev",function(){var e=t.activeSteps[t.currentIndex],e=(e.node.removeClass("active"),e.arrowNode.removeClass("active"),t.activeSteps[--t.currentIndex]);t.showStep(e.node,e.arrowNode,e.tether)}),s("#tour-btn").on("click",function(){var e=t.activeSteps[t.currentIndex];t.tourOverlay.show(),t.showStep(e.node,next.arrowNode,e.tether)})},start:function(){var e;null!=CHAM.events.appliedStore.getState().surfaceGroupsObjs&&(-1<CHAM.events.appliedStore.getState().surfaceGroupsObjs.Walls.length&&(CHAM.events.surfaceSelected.emit("Walls",!0),s(".surfaces .surface-btn").removeClass("active"),s('.surfaces .surface-btn[data-surface="Walls"]').addClass("active")),e=this.activeSteps[this.currentIndex],this.tourOverlay.show(),this.showStep(e.node,e.arrowNode,e.tether),s("html, body").addClass("modal-styles"))},createTether:function(e,t){return new Tether({element:e.get(0),target:s(t.target).get(0),attachment:t.attachment,targetAttachment:t.targetAttachment,constraints:[{to:"window",pin:!0}]})},showStep:function(e,t,r){e.addClass("active"),t.addClass("active"),r.position();e=r.target.className,t=document.getElementsByClassName(e);s(t).get(0).scrollIntoView(!0)}}}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(t){CHAM.zip={init:function(){this.overlay=t("#zip-modal"),this.form=this.overlay.find("form"),this.validator=Forms.FormValidator(this.form,this.formRules),this.process()},formRules:{zipcode:[{type:"required",message:"A zip code is required."},{type:"zipcode",message:"Please enter a valid zip code."}]},render:function(){null==this.getZip()?(this.overlay.addClass("active"),this.overlay.find(".error").removeClass("show")):this.overlay.removeClass("active")},show:function(){this.overlay.addClass("active"),this.overlay.find(".error").removeClass("show")},showError:function(){this.overlay.addClass("active"),this.overlay.find(".error").addClass("show")},process:function(e){if((e=1==e?this.form.find("#zip-code").val()||CHAM.helpers.getURLParameter("zipcode")||this.getZip():CHAM.helpers.getURLParameter("zipcode")||this.form.find("#zip-code").val()||this.getZip())||this.show(),e){e=t.trim(e),this.setZip(e),this.render();try{window.ChamStats&&window.ChamStats.sendData("zipcode",e)}catch(e){console.error("ChamStats",e.message)}}},getZip:function(){var e;return void 0!==Cookies.get("Zip")&&(null!=(e=Cookies.get("Zip"))?jQuery.trim(e):e)},setZip:function(e){null!=e&&(e=jQuery.trim(e)),Cookies.set("Zip",e)},events:function(){var t=this;t.form.on("submit",function(e){return e.preventDefault(),t.validator.validateAndPrintMessages()&&(dataLayer&&dataLayer.push({event:"zipcode_submit",conversionValue:43}),t.process(!0)),!1})}}}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(){"use strict";debug("cham:templates");CHAM.templates={landingSlides:function(e){return CHAM.compiled["landing-slides"]({featuredColors:e})},scenes:function(e){return CHAM.compiled["scenes/scene"]({scenes:e})},menu:function(e){return CHAM.compiled["menu/accordion"]({surfaces:e})},harmony:function(e){return CHAM.compiled["menu/harmony"]({groups:e})},products:function(e){return CHAM.compiled["products/generic"]({products:e})},styleList:function(e){return CHAM.compiled["products/style-list"]({products:e})},colorsList:function(e,t,r,n){return CHAM.compiled["products/colorList"]({products:e,surfaceGroup:t,filters:r,selectedFilter:n})},sceneFilter:function(e){return CHAM.compiled["scenes/scene-filter"]({types:e})},surfaceMenu:function(e){return CHAM.compiled["menu/surface-menu"]({surfaces:e})},subSurfaces:function(e,t,r){return CHAM.compiled["menu/sub-surfaces"]({filters:e,currentSurfacesSelected:t,colorAppliedToSurface:r})},typeSection:function(e,t,r){return CHAM.compiled["menu/typeSection"]({products:e,surfacegroup:t,filterModel:r})},colorsMenu:function(e,t,r){return CHAM.compiled["menu/colors-menu"]({colorGroup:e,favoriteColorsList:t,appliedColorsSurfaces:r})},productsMenuContainer:function(e){return CHAM.compiled["menu/products-menu"]({surface:e})},productsFilters:function(e){return CHAM.compiled["products/products-filters"]({model:e})},paintFilters:function(e,t,r){return CHAM.compiled["products/paint-filters"]({filters:e,currentSurfacesSelected:t,colorAppliedToSurface:r})},colorFamilies:function(e){return CHAM.compiled["products/color-families-filters"]({model:e})},menuHeaderBtns:function(e,t,r){return CHAM.compiled["menu/menu-header-btns"]({surface:e,model:t,current:r})},menuBreadcrumbs:function(e){return CHAM.compiled["menu/menuBreadcrumbs"]({model:e})},menuTitleText:function(e,t,r){return CHAM.compiled["menu/menuTitleText"]({model:e,surface:t,current:r})},enlargeModal:function(e){return CHAM.compiled["products/enlargeModal"]({product:e})},projects:{modal:function(e,t,r){return CHAM.compiled["projects/modal"]({model:{title:e,titleBarBTNS:t,content:r}})},loginModal:function(e){return CHAM.compiled["projects/login_dialog"]({model:{email:e}})},projectModal:function(e){return CHAM.compiled["projects/projects_dialog"]({model:{projects:e}})},registerModal:function(e){return CHAM.compiled["projects/register_dialog"]({model:{email:e}})},saveProjectModal:function(e){return CHAM.compiled["projects/saveProject_dialog"]({model:{name:e}})},changePasswordModal:function(){return CHAM.compiled["projects/changePassword_dialog"]()},resetPasswordModal:function(e){return CHAM.compiled["projects/resetPassword_dialog"]({model:{email:e}})}}}}(jQuery),jQuery.noConflict()),CHAM=CHAM||{},$=(!function(l){"use strict";var e,t,r,c,u;0!==l("body.page-default").length&&(e=debug("cham:init"),l("body"),t=Utilities.createComponent,r=_.map(CHAM.DATA.series,function(e){return e.id}),r=CHAM.services.getProductsBySeriesIDs(r),CHAM.loadedVisualizer=!1,c={surfacesLoaded:Observable(),groupedSurfacesLoaded:Observable(),surfaceSelected:Observable(),visualizerRequested:Observable(),visualizerLoaded:Observable(),productSelected:Observable(),scenesRequested:Observable(),sceneSelected:Observable(),scenesFiltered:Observable(),vizSelected:Observable(),colorAccentSurfaceSelected:Observable(),subSurfaceSelected:Observable(),subSurfaceClicked:Observable(),saveMenuState:Observable(),menuStateChange:Observable(),typeSelected:Observable(),productsListFiltered:Observable(),sidingProfileSelected:Observable(),sidingProductSelected:Observable(),paintColorMenuSelected:Observable(),roofSelected:Observable(),resetMenuState:Observable(),enlargeSelected:Observable(),endTour:Observable(),colorSelectedOutsideTool:Observable(),harmonySelectedOutsideTool:Observable()},Promise.all([r]).then(function(e){e=(e=e)[0],t=_.filter(e,function(e){return 66===e.categoryID||83===e.categoryID}),r=_.filter(e,function(e){return 7014==e.seriesID||7054==e.seriesID}),n=_.keyBy(e,function(e){return e.id}),o=_.filter(e,function(e){return 7054==e.seriesID}),i=_.filter(e,function(e){return 7014==e.seriesID}),s=_.groupBy(e,function(e){return e.categoryID});var t,r,n,o,i,s,a={allProducts:e,scenes:t,siding:s[15],sidingColors:r,smartSideColors:i,brick:s[94],stone:s[58],paint:s[5],roof:s[57],lookup:n,customColors:o},e=CHAM.applied.createAppliedStore(c);CHAM.events=_.assign({},c,{appliedStore:e}),CHAM.DATA.products=a,CHAM.events.appliedStore.subscribe(function(e){}),l(document).ready(function(){u(l("main"),a,CHAM.events).render(),CHAM.initialize.router()})}),u=t({constructor:function(e,t,r){return this.root=e,this.events=r,this.render.bind(this,t,r)},render:function(r,n){CHAM.scenes(this.root.find(".scenes").find(".scene-area"),r.scenes,this.events).render(),CHAM.productsComponent(this.root,r,this.events).render(),CHAM.landing(this.root.find(".landing"),r.lookup,this.events).render(),this.events.visualizerRequested.subscribe(function(e,t){e=CHAM.applied.getInitialState(r.lookup,e,t);n.appliedStore.reset(e),CHAM.visualizer.init(n,r)})}}),CHAM.initialize={init:function(){CHAM.debug.init(),CHAM.helpers.polyfills(),CHAM.zip.init(),this.render(),this.events()},bootstrap:function(){this.cookie()},cookie:function(){Cookies.set("SiteID",CHAM.SiteID),Cookies.set("SiteId",CHAM.SiteID),void 0!==Cookies.get("SiteID")&&void 0!==Cookies.get("SiteId")||alertify.alert(CHAM.CookieMessage)},render:function(){CHAM.helpers.lazyLoad(),CHAM.projects.init(),CHAM.feedback.init(),CHAM.email.init(),CHAM.upload.init(),CHAM.tour.init(),CHAM.helpers.initShareLink()},events:function(){CHAM.projects.events(),CHAM.feedback.events(),CHAM.email.events(),CHAM.upload.events(),CHAM.menu.events(),CHAM.tour.events(),CHAM.zip.events()},router:function(){CHAM.router=new Navigo(null,!0),CHAM.router.on({"roof/:roofcolor/colorset/:setnumber":function(e){var t=e.roofcolor,r=e.setnumber;CHAM.DATA.specifier=decodeURIComponent("LP\\Images\\Colonial\\Colonial_2"),CHAM.DATA.sel=decodeURIComponent("-1"),CHAM.loadedSurfaces=!1,c.visualizerRequested.emit(CHAM.DATA.specifier,CHAM.DATA.sel),l(".view").removeClass("active").filter(".visualizer-wrapper").addClass("active"),window.setTimeout(function(){CHAM.events.harmonySelectedOutsideTool.emit(t,r)},300)},"color/:colorname":function(e){!0!==CHAM.loadedVisualizer&&(CHAM.DATA.specifier=decodeURIComponent("LP\\Images\\Colonial\\Colonial_2"),CHAM.DATA.sel=decodeURIComponent("-1"),CHAM.loadedSurfaces=!1,c.visualizerRequested.emit(CHAM.DATA.specifier,CHAM.DATA.sel),l(".view").removeClass("active").filter(".visualizer-wrapper").addClass("active"),CHAM.events.colorSelectedOutsideTool.emit(e.colorname))},"style/:housestyle/":function(t){var e;CHAM.DATA.products.scenes&&(e="colonial"===t.housestyle.toLowerCase()?"LP\\Images\\Colonial\\Colonial_2":_.find(CHAM.DATA.products.scenes,function(e){return e.name.toLowerCase().replace(/\s/g,"").includes(t.housestyle)}).specifier,!0!==CHAM.loadedVisualizer)&&(CHAM.DATA.specifier=decodeURIComponent(e),CHAM.DATA.sel="-1",CHAM.loadedSurfaces=!1,c.visualizerRequested.emit(CHAM.DATA.specifier,CHAM.DATA.sel),l(".view").removeClass("active").filter(".visualizer-wrapper").addClass("active"))},"scene/:spec/products/:sel":function(e){!0!==CHAM.loadedVisualizer&&(CHAM.DATA.specifier=decodeURIComponent(e.spec),CHAM.DATA.sel=decodeURIComponent(e.sel),CHAM.loadedSurfaces=!1,c.visualizerRequested.emit(CHAM.DATA.specifier,CHAM.DATA.sel),l(".view").removeClass("active").filter(".visualizer-wrapper").addClass("active"))},"scene/:go":function(){CHAM.loadedVisualizer=!1,c.scenesRequested.emit(),CHAM.tour.endTour(),l(".view").removeClass("active").filter(".scenes").addClass("active")},"*":function(){l(".view").removeClass("active").filter(".landing").addClass("active"),CHAM.loadedVisualizer=!1,CHAM.tour.endTour()}}).resolve()},surfacesLoaded:function(e){CHAM.DATA.surfaces=e,e=CHAM.DATA.specifier.includes("USER")?_.sortBy(e,"name"):e,c.surfacesLoaded.emit(e)},AllSurfacesLoaded:function(){CHAM.visualizer.updateURL(),CHAM.share.update()},initComplete:function(){CHAM.share.init()},lazyLoad:function(){window.setTimeout(function(){for(var e,t=document.querySelectorAll(".lazy"),r=0;e=t[r++];)window.LazyLoad(e,!1)},1e3)}},CHAM.documentOnReady={init:function(){CHAM.initialize.init(),CHAM.initialize.router()}},CHAM.documentOnLoad={init:function(){CHAM.initialize.bootstrap()}},0<l("body.page-default").length)&&(e(" %c⚡ %cChameleon Powered On",CHAM.debug.color.yellow,""),l(document).ready(CHAM.documentOnReady.init),l(window).on("load",CHAM.documentOnLoad.init))}(jQuery),jQuery.noConflict()),CHAM=CHAM||{};!function(s){"use strict";var e=s(document);e.on("click","#pardot-upload div.close",function(){s("#pardot-upload").hide()}),e.on("change","#pardot-upload .user-type",function(){"3016072"==this.value?s("#pardot-upload p.job_title").show():s("#pardot-upload p.job_title").hide()}),e.on("click","#pardot-upload-submit",function(){for(var e=document.querySelectorAll("#pardot-upload p.err"),t=0;t<e.length;t++)e[t].remove();function r(e){var t,r=e.closest(".form-field");r?((t=document.createElement("p")).innerHTML="This field is required.",t.className="err",r.appendChild(t)):console.log("missing parent",e.name)}for(var n,o=!0,e=document.querySelectorAll("#pardot-upload input, #pardot-upload select"),t=0;t<e.length;t++)-1<e[t].className.indexOf("job_title")&&""==e[t].value?(n=document.querySelector(".user-type"))&&"3016072"==n.value&&(r(e[t]),o=!1):"hidden"!=e[t].type&&""==e[t].value&&(r(e[t]),o=!1);if(o){for(var i=new FormData,e=document.querySelectorAll("#pardot-upload input, #pardot-upload select"),t=0;t<e.length;t++)i.append(e[t].name,e[t].value);fetch("https://marketing.upsidetosmartside.com/l/447912/2020-09-14/9hdxs7",{method:"post",body:i}).then(function(){window.sessionStorage.setItem("parotsumitted","1")}),s("#pardot-upload").hide()}}),window.pardotUpload={show:function(e){1==window.sessionStorage.getItem("parotsumitted")?e.call():(s("#pardot-upload p.job_title").hide(),s("#pardot-upload").show())}}}(jQuery);
