text: "use strict";var _typeof="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};define("layout/util/dataPreparationsForAnchors",["lodash","coreUtils","experiment"],function(e,t,i){function n(){return{flat:{},sortingY:{},minHeight:{},shrinkableContainer:{},ignoreOriginalValue:{},noHeightChange:{},containerHeightMargin:{},currentHeight:{},currentY:{},heightDiff:{},topDiff:{},locked:{},valueForFirstLockedAnchor:{}}}function o(e){return"Document"===e.type||"wysiwyg.viewer.components.PagesContainer"===e.componentType}function r(e,t,i){var n=e.id;e.layout&&e.layout.rotationInDegrees&&(t.noHeightChange[n]=!0),i.shrinkableContainer[n]?t.shrinkableContainer[n]=!0:o(e,i)&&(t.ignoreOriginalValue[n]=!0)}function a(e,i,n){return t.boundingLayout.getBoundingHeight({height:e,width:i,rotationInDegrees:n})}function s(e,i,n,o){return t.boundingLayout.getBoundingY({y:e,height:i,width:n,rotationInDegrees:o})}function u(e,t,n){var o,r=e.id,u=e.layout?e.layout.rotationInDegrees:0,c=n.height[r];o=i.isOpen("layout_verbs_with_anchors")?n.top[r]:n.top&&void 0!==n.top[r]?n.top[r]:e.layout&&e.layout.y||0,t.currentHeight[e.id]=u?a(c,n.width[r],u):c,t.heightDiff[r]=t.currentHeight[e.id]-c,t.currentY[r]=u?s(o,c,n.width[r],u):o,t.topDiff[r]=o-t.currentY[r]}function c(i,n,o,a,s,h){if(e.has(o.height,i.id)){r(i,n,o),u(i,n,o),n.minHeight[i.id]=l(i,n),n.currentHeight[i.id]=Math.max(n.currentHeight[i.id],n.minHeight[i.id]),n.collapsed[i.id]&&(n.currentHeight[i.id]=0),n.flat[i.id]=i;var d=a+n.currentY[i.id]-s,g=n.currentHeight[i.id];n.sortingY[i.id]=d,n.valueForFirstLockedAnchor[i.id]={pusherId:null,value:-Number.MAX_VALUE};var p=t.dataUtils.getChildrenData(i,h);e.forEach(p,function(e){c(e,n,o,d,g||5e3,h)})}}function l(e,t){var i=e.id;return i&&!h(i)?Math.max(t.minHeight[i]||0,b):t.minHeight[i]||0}function h(t){return t&&e.includes(C,t)}function d(e,t,i,n){c(e,t,i,0,0,n)}function g(e,t,i){return{distance:i,type:e,targetComponent:t,locked:!0,notEnforcingMinValue:!0}}function p(t,i,n,o){var r=t;return t.$cloned||((r=e.clone(r)).layout=e.clone(r.layout),r.layout.anchors=e.clone(r.layout.anchors),r.$cloned=!0),r.layout.anchors.push(g("TOP_TOP",i,n),g("BOTTOM_BOTTOM",i,o)),r}function m(t){e.forEach(t,function(i,n){if(i.layout&&i.layout.anchors){var o=e.filter(i.layout.anchors,{type:"LOCK_BOTTOM"});e.isEmpty(o)||(e.forEach(o,function(e){t[n]=p(t[n],e.targetComponent,e.topToTop,e.distance),t[e.targetComponent]=p(t[e.targetComponent],n,-1*e.topToTop,-1*e.distance)}),e.remove(t[n].layout.anchors,{type:"LOCK_BOTTOM"}))}})}function f(t){return"wysiwyg.viewer.components.PopupContainer"===(e.get(t,"components.length")&&e.get(t,"components[0].componentType"))}function y(t,i,o){var r=n();r.containerHeightMargin=i.containerHeightMargin||{},r.minHeight=e.clone(i.minHeight||{}),r.collapsed=e.clone(i.collapsed||{}),r.injectedAnchors=i.injectedAnchors||{},r.__isPopup=f(t),d(t,r,i,o),m(r.flat);var a=e.sortBy(e.keys(r.flat),function(e){return r.sortingY[e]});return delete r.sortingY,{structureData:r,sortedIds:a}}function w(t,i){e.forEach(i.flat,function(e,n){t.height[n]=i.currentHeight[n]-i.heightDiff[n],t.top[n]=i.currentY[n]+i.topDiff[n]})}function v(i,n,o,r){if(!e.has(i.height,r.id))return 0;n=n||0,n+=i.top[r.id];var a=t.dataUtils.getChildrenData(r,o);return a=e.reject(a,{layout:{fixedPosition:!0}}),Math.max(n+i.height[r.id],Math.max.apply(null,e.map(a,e.partial(v,i,n,o))))}var C=["WIX_ADS"],b=5;return{getDataForAnchorsAndSort:y,fixMeasureMap:w,maxMeasureMapHeight:v}}),define("layout/util/anchors",["lodash","layout/util/dataPreparationsForAnchors"],function(e,t){function i(e,t,i,n){return t!==i&&(n.dirty[e]=!0,n.changedCompsMap[e]=n.flat[e]),n.dirty[e]}function n(t,i,n,o){var r=n[o.targetComponent],a=n[i];o.notEnforcingMinValue&&!e.isEmpty(a)&&(o.notEnforcingMinValue=!1),r[i]=t;var s=Math.max.apply(null,e.values(r));return o.notEnforcingMinValue&&delete r[i],s}function o(e,t,i,n,o){var r=e.targetComponent,a=t.valueForFirstLockedAnchor[r];a&&(e.locked||null===o?(a.pusherId&&(i[r]={},i[r][a.pusherId]=a.value),delete t.valueForFirstLockedAnchor[r]):(a.pusherId=n,a.value=Math.max(o,a.value)))}function r(e){return e%1}function a(e,t){return t-=r(t-e)}function s(t,i){return e.has(t.currentHeight,i)}function u(e,t,i,n){var o;return n.shrinkableContainer[i]?o=t:e.locked?o=t+e.distance:(o=t+g,n.ignoreOriginalValue[i]||(o=Math.max(o,e.originalValue))),o}function c(t,i,n,o){var r=t;return e.isNumber(o.minHeight[i])&&t<o.minHeight[i]&&(r=o.minHeight[i],n.notEnforcingMinValue&&(n.notEnforcingMinValue=!1,o.dirty[i]=!0,o.changedCompsMap[i]=o.flat[i])),r}function l(e,t,i){return"masterPage"===e?[]:i.injectedAnchors[e]||t[e]||[]}function h(t,i,n,o,r,a){for(var s=!1,u=t.length,c=0;c<u;){var h=function(t){var u=l(t,o,n),c=Number.MAX_VALUE;return!n.dirty[t]||r&&!m[t]||e.forEach(u,function(e){if(f[e.type]&&n.flat[e.targetComponent]&&(!r||m[e.targetComponent])){e.targetComponent===a&&(s=!0);var o=f[e.type](t,e,n)?i[e.targetComponent]:Number.MAX_VALUE;c=Math.min(o,c)}}),n.dirty[t]=!1,c}(t[c]);c=Math.min(c+1,h)}return s}function d(i,n,o,r,a,s,u,c){var l=t.getDataForAnchorsAndSort(i,n,r),d=l.structureData,g=l.sortedIds,m=e.invert(g);d.dirty={},d.toTopAnchorsY={},d.toBottomAnchorsHeight={},d.locked=s,d.changedCompsMap=d.flat,d.ignoreBottomBottom=!!c,e.forEach(d.flat,function(e,t){d.dirty[t]=!0,d.toTopAnchorsY[t]={},d.toBottomAnchorsHeight[t]={}}),u&&(d.changedCompsMap=e.pick(d.flat,e.keys(u)));var f=h(g,m,d,o,a,i.id);return t.fixMeasureMap(n,d),!f&&e.includes(p,i.type)&&(n.height[i.id]=t.maxMeasureMapHeight(n,0,r,i),d.changedCompsMap[i.id]=d.flat[i.id]),d.changedCompsMap}var g=10,p=["Page","Document"],m={SITE_FOOTER:!0,SITE_HEADER:!0,SITE_PAGES:!0,PAGES_CONTAINER:!0,masterPage:!0,SITE_BACKGROUND:!0},f={};return f.TOP_TOP=function(t,r,u){var c=r.targetComponent;if(!s(u,c)||!s(u,t))return!1;if(e.has(u.locked,c))return!1;var l=u.currentY[c],h=u.currentY[t]+r.distance;return o(r,u,u.toTopAnchorsY,t,null),h=n(h,t,u.toTopAnchorsY,r),h=a(l,h),u.currentY[c]=h,i(c,l,h,u)},f.BOTTOM_TOP=function(t,r,u){var c=r.targetComponent;if(!s(u,c)||!s(u,t))return!1;if(e.has(u.locked,c))return!1;var l=u.currentY[c],h=u.currentHeight[t]+u.currentY[t],d=null;return r.locked?h+=r.distance:(d=h+g,h=u.valueForFirstLockedAnchor[c]?Math.max(h+g,r.originalValue):d),h=Math.max(h,u.currentY[t]+u.currentHeight[t]/2),o(r,u,u.toTopAnchorsY,t,d),h=n(h,t,u.toTopAnchorsY,r),h=a(l,h),u.currentY[c]=h,i(c,l,h,u)},f.BOTTOM_PARENT=function(t,o,r){var a=o.targetComponent;if(e.get(r.collapsed,a))return!1;if(!s(r,a)||!s(r,t))return!1;if(e.has(r.locked,a))return!1;if(r.flat[a].layout&&r.flat[a].layout.rotationInDegrees)return!1;var l=r.currentHeight[a],h=u(o,r.currentHeight[t]+r.currentY[t]+(r.containerHeightMargin[a]||0),a,r);return h=c(h,a,o,r),h=n(h,t,r.toBottomAnchorsHeight,o),r.currentHeight[a]=h,i(a,l,h,r)},f.BOTTOM_BOTTOM=function(t,o,r){if(r.ignoreBottomBottom)return!1;var a=o.targetComponent;if(!s(r,a)||!s(r,t))return!1;if(e.has(r.locked,a))return!1;if(r.flat[a].layout&&r.flat[a].layout.rotationInDegrees)return!1;var l=r.currentHeight[a],h=u(o,r.currentHeight[t]+r.currentY[t]-r.currentY[a],a,r);return h=c(h,a,o,r),h=n(h,t,r.toBottomAnchorsHeight,o),r.currentHeight[a]=h,i(a,l,h,r)},{enforceAnchors:d,HARD_WIRED_COMPS:m}}),define("layout/util/reduceDistancesAlgorithm/sortByAnchors",["lodash"],function(e){function t(t,i){var n=e.reduce(t,function(t,n){var o=i[n.id];return e.forEach(o,function(e){t[e.targetComponent]=!0}),t},{});return e.filter(t,function(e){return!n[e.id]})}function i(t,i){return e.has(t,i)}function n(n,o){function r(t,n){if(i(a,t)){var s=e.max([a[t],n+1]);a[t]=s;var u=e.map(o[t],"targetComponent");e.forEach(u,function(e){r(e,s)})}}var a=e.reduce(n,function(e,t){return e[t.id]=0,e},{}),s=t(n,o);return e.forEach(s,function(e){r(e.id,0)}),e.sortBy(n,function(e){return a[e.id]})}return n}),define("layout/util/reduceDistancesAlgorithm/anchorsTypes",[],function(){return{TOP_TOP:"TOP_TOP",BOTTOM_TOP:"BOTTOM_TOP",BOTTOM_PARENT:"BOTTOM_PARENT"}}),define("layout/util/reduceDistancesAlgorithm/createAnchorsDataManager",["lodash","layout/util/reduceDistancesAlgorithm/anchorsTypes"],function(e,t){function i(i,n,r,a){function s(e){h.from[e.fromComp]=h.from[e.fromComp]||[],h.from[e.fromComp].push(e),h.to[e.targetComponent]=h.to[e.targetComponent]||[],h.to[e.targetComponent].push(e)}function u(t){a[t.targetComponent]&&(t=e.assign({},t,{locked:!0,distance:0})),d.from[t.fromComp]=t,d.to[t.targetComponent]=d.to[t.targetComponent]||[],d.to[t.targetComponent].push(t)}function c(t){return r?o[t.fromComp]&&o[t.targetComponent]:e.has(n,t.fromComp)&&e.has(n,t.targetComponent)}var l=e.flatten(e.values(i)),h={from:{},to:{}},d={from:{},to:{}},g=e.filter(l,c);return e.forEach(g,function(e){e.type===t.BOTTOM_PARENT?u(e):s(e)}),{anchors:g,siblingsAnchors:h,childToParentAnchors:d}}function n(t,n,o,r){var a=i(t,n,o,r);e.merge(this,{getComponentPushers:function(e){return a.siblingsAnchors.to[e]||[]},getComponentAnchorToParent:function(e){return a.childToParentAnchors.from[e]}})}var o={SITE_FOOTER:!0,SITE_HEADER:!0,SITE_PAGES:!0,PAGES_CONTAINER:!0,masterPage:!0,SITE_BACKGROUND:!0};return function(e,t,i,o){return new n(e,t,i,o)}}),define("layout/util/reduceDistancesAlgorithm/createMeasureMapManager",["lodash","coreUtils"],function(e,t){function i(e,i,n){return t.boundingLayout.getBoundingHeight({height:e,width:i,rotationInDegrees:n})}function n(e,i,n,o){return t.boundingLayout.getBoundingY({y:e,height:i,width:n,rotationInDegrees:o})}function o(t,o){return e(o).pickBy(function(t){return e.get(t,"layout.rotationInDegrees")}).mapValues(function(e,o){var r=t.top[o],a=t.height[o],s=t.width[o];return{heightDiff:i(a,s,e.layout.rotationInDegrees)-a,yDiff:n(r,a,s,e.layout.rotationInDegrees)-r}}).value()}function r(t,i){function n(t){return e.get(u,[t,"yDiff"],0)}function r(t){return e.get(u,[t,"heightDiff"],0)}var s=t,u=o(t,i);e.merge(this,{get:function(){return s},getComponentTop:function(t){if(!e.isUndefined(s.top[t]))return s.top[t]+n(t)},getComponentHeight:function(t){if(!e.isUndefined(s.height[t]))return s.collapsed[t]?0:s.height[t]+r(t)},getComponentMinHeight:function(t){return s.collapsed[t]?0:e.max([s.minHeight[t],a])},getContainerHeightMargin:function(e){return s.containerHeightMargin[e]||0},isCollapsed:function(e){return Boolean(s.collapsed[e])},isShrinkableContainer:function(e){return Boolean(s.shrinkableContainer[e])},getComponentWidth:function(e){return s.width[e]},getSiteWidth:function(){return s.width.site},getClientSize:function(){return{width:s.clientWidth,height:s.clientHeight}},setComponentTop:function(e,t){s.top[e]=t-n(e)},setComponentHeight:function(e,t){s.height[e]=t-r(e)}})}var a=5;return function(e,t){return new r(e,t)}}),define("layout/util/reduceDistancesAlgorithm/createOriginalValuesManager",["lodash"],function(e){function t(t,i){e.merge(this,{getOriginalTop:function(n){return e.get(t,[n,"top"])||i[n].y},getOriginalHeight:function(n){return e.get(t,[n,"height"])||i[n].height}})}return function(e,i){return new t(e,i)}}),define("layout/util/reduceDistancesAlgorithm/generateEnforceData",["lodash","coreUtils","siteUtils","layout/util/reduceDistancesAlgorithm/sortByAnchors","layout/util/reduceDistancesAlgorithm/createAnchorsDataManager","layout/util/reduceDistancesAlgorithm/createMeasureMapManager","layout/util/reduceDistancesAlgorithm/createOriginalValuesManager"],function(e,t,i,n,o,r,a){function s(t){function i(t){n[t.id]=t,e.forEach(t.children,i)}var n={};return i(t),n}function u(i,o,r){function a(i){var s=m[i.id],u=t.dataUtils.getChildrenKey(i,r),c=i[u],l=e.omit(i,u);if(s){var h=e.reduce(c,function(t,i){return e.includes(s,i.id)&&t.push(a(i)),t},[]);l.children=n(h,o)}else l.children=[];return l}return e.find(m.ROOT,function(e){return e===i.id})?a(i):null}function c(i,o,r,a){function s(i){var u=t.dataUtils.getChildrenKey(i,a),c=i[u],l=e.omit(i,u),h=Boolean(o.collapsed[i.id])?[]:e(c).filter(function(t){return e.has(o.height,t.id)}).map(s).value();return l.children=n(h,r),l}return s(i)}function l(e,t,i,n,o){return n?u(e,i,o):c(e,t,i,o)}function h(t,i,n,o){var r=e.get(n,[t.id,o]);return e.merge({},r,i.injectedAnchors)}function d(e,t,i,n){return o(e,n,i,t.shrinkableContainer)}function g(t,i,n,o){var r=e.get(i,[t.id,n]);return a(r,o)}function p(n,o){return e.mapValues(n,function(n){if(n.layout){var r=e.cloneDeep(n.layout);if(e.assign(r,t.boundingLayout.getBoundingLayout(n.layout)),i.layout.isVerticallyStretchedToScreen(r)){r.isVerticallyStretchedToScreen=!0;var a={width:o.clientWidth,height:o.clientHeight},s=o.width.site;r.minHeight=i.positionAndSize.getHeightInPixelsRounded(n.layout,null,a,s),delete r.docked.top,delete r.docked.bottom}return r}})}var m={ROOT:["masterPage","SITE_BACKGROUND"],masterPage:["SITE_HEADER","PAGES_CONTAINER","SITE_FOOTER"],PAGES_CONTAINER:["SITE_PAGES"]};return function(e,t,n,o,a,u,c){var m=a?i.constants.VIEW_MODES.MOBILE:i.constants.VIEW_MODES.DESKTOP,f=h(e,t,n,m),y=l(e,t,f,u,a);if(!y)return null;var w=s(y),v=p(w,t);return{structure:y,flatDataMap:w,layoutsMap:v,measureMapManager:r(t,w),anchorsDataManager:d(f,t,u,w),originalValuesManager:g(e,o,m,v),lockedCompsMap:c||{}}}}),define("layout/util/reduceDistancesAlgorithm/minHeightDataUtils",["lodash"],function(e){function t(e){var t=e.absoluteHeight;if(e.topPercents||e.bottomPercents){var i=1-((e.topPercents||0)+(e.bottomPercents||0))/100;return Math.ceil(t/i)}return t}function i(t,i){return e.reduce(t,function(e,t){var n=Math.ceil(t.topPercents/100*i),o=Math.ceil(t.bottomPercents/100*i),r=n+t.absoluteHeight+o;return r>e?r:e},i)}function n(e){return!e.topPercents&&!e.bottomPercents}function o(e,t,i){this.absoluteHeight=e||0,t&&(this.topPercents=t),i&&(this.bottomPercents=i)}function r(e,t,i){return new o(e,t,i)}function a(e){return new o(e.px,e.pct)}function s(e){return new o(e.px,null,e.pct)}function u(t){var i,n;return e.isNumber(t.pct)&&(t.pct<0?n=2*Math.abs(t.pct):i=2*t.pct),new o(2*Math.abs(t.px),i,n)}function c(e,t){this.absoluteHeight=e,this.dynamicHeights=t}function l(t){var i=0,o=[];return e.forEach(t,function(e){n(e)?i=Math.max(i,e.absoluteHeight):o.push(e)}),new c(i,o)}return o.prototype.clone=function(){return new o(this.absoluteHeight,this.topPercents,this.bottomPercents)},o.prototype.addAbsoluteHeight=function(e){return this.absoluteHeight+=e,this},o.prototype.addMinHeightData=function(e){this.absoluteHeight+=e.absoluteHeight;var t=(this.topPercents||0)+(e.topPercents||0);t&&(this.topPercents=t);var i=(this.bottomPercents||0)+(e.bottomPercents||0);return i&&(this.bottomPercents=i),this},c.prototype.merge=function(e){return this.dynamicHeights=this.dynamicHeights.concat(e.dynamicHeights),this.absoluteHeight=Math.max(this.absoluteHeight,e.absoluteHeight),this},c.prototype.solve=function(){if(e.isEmpty(this.dynamicHeights))return this.absoluteHeight;var n=Math.ceil(e(this.dynamicHeights).map(t).max()),o=Math.max(this.absoluteHeight,n);return i(this.dynamicHeights,o)},{createMinHeightData:r,createMinHeightDataForDockedTopData:a,createMinHeightDataForDockedBottomData:s,createMinHeightDataForVerticallyCenteredDockedData:u,createChainMinHeightData:l}}),define("layout/util/reduceDistancesAlgorithm/reduceDistancesAlgorithmUtils",[],function(){return{getAnchorMinDistance:function(e){return e.locked?e.distance:10}}}),define("layout/util/reduceDistancesAlgorithm/enforceComponentsMinHeight",["lodash","siteUtils","layout/util/reduceDistancesAlgorithm/minHeightDataUtils","layout/util/reduceDistancesAlgorithm/reduceDistancesAlgorithmUtils","layout/util/reduceDistancesAlgorithm/anchorsTypes"],function(e,t,i,n,o){function r(e){var n=t.layout.getTopDockData(e);return n?i.createMinHeightDataForDockedTopData(n):i.createMinHeightData(e.y)}function a(e,n,o){var a=i.createMinHeightData(),s=r(e),u=t.layout.isDockedToDirection(e,"top");return n||u||!o||s.absoluteHeight<0?s:a}function s(t,i,r){var a=r.type===o.TOP_TOP?0:i,s=n.getAnchorMinDistance(r);return e.map(t,function(e){var t=a+s;return e.clone().addAbsoluteHeight(t)})}function u(o,r,u,c,l,h){function d(e,t){t&&t.locked&&(C.isShrinkableContainer=!0),C.chainsMinHeightData.merge(e)}function g(e,t){var i=h[e];return{forNonDocked:[a(i,t,!1)],forDocked:[a(i,t,!0)]}}function p(t,n){var o=!1,r=[],a=[];if(e.forEach(n,function(e){e.locked&&(o=!0);var t=b[e.fromComp],i=c[e.fromComp];r=r.concat(s(t.forDocked,i,e)),a=a.concat(s(t.forNonDocked,i,e))}),!o){var u=l.getOriginalTop(t),h=i.createMinHeightData(u);a.push(h)}return{forDocked:r,forNonDocked:a}}function m(e){var o,a=t.layout.getBottomDockData(h[e]);if(a)o=i.createMinHeightDataForDockedBottomData(a);else{var s=r.getComponentAnchorToParent(e);o=i.createMinHeightData(n.getAnchorMinDistance(s))}var u=c[e];return o.clone().addAbsoluteHeight(u)}function f(t,n,r){var a=n?r.forDocked:r.forNonDocked,s=m(t,o),u=e.map(a,function(e){return e.clone().addMinHeightData(s)});return i.createChainMinHeightData(u)}function y(e,n){var o=t.layout.getVerticallyCenteredDockData(n),r=c[e],a=i.createMinHeightDataForVerticallyCenteredDockedData(o).addAbsoluteHeight(r);return i.createChainMinHeightData([a])}function w(t){var i=r.getComponentPushers(t),n=e.isEmpty(i),o=!!u[t];return n||o?g(t,o):p(t,i)}function v(e){if(t.layout.isVerticallyCentered(h[e.id]))d(y(e.id,h[e.id]));else{var i=w(e.id);b[e.id]=i;var n=r.getComponentAnchorToParent(e.id),o=!!n,a=t.layout.isDockedToDirection(h[e.id],"bottom");(a||o)&&d(f(e.id,a,i),n)}}var C={value:0,chainsMinHeightData:i.createChainMinHeightData(),isShrinkableContainer:!1},b={};return function(){return e.forEach(o.children,v),C.value=C.chainsMinHeightData.solve(),delete C.chainsMinHeightData,C}()}return function(i,n,o,r,a,s){function c(e,t,i){var o=[],a=s[e.id];if(!a)return o;var u=a.aspectRatio||0,c=i||a.isVerticallyStretchedToScreen||u||n.isShrinkableContainer(e.id)||t&&t.isShrinkableContainer;if(u){var l=n.getComponentWidth(e.id);o.push(u*l)}if(t&&(o.push(t.value+n.getContainerHeightMargin(e.id)),!c)){var h=r.getOriginalHeight(e.id);o.push(h)}if(c){var d=n.getComponentMinHeight(e.id),g=a.minHeight||0;o.push(d,g)}return o}function l(t,i,o){o?(i.length&&n.setComponentHeight(t,e.max(i)),p[t]=n.getComponentHeight(t)):p[t]=i.length?e.max(i):0}function h(e,i){if(n.isCollapsed(e.id))return n.setComponentHeight(e.id,0),void(p[e.id]=0);var o=t.layout.isVerticallyStretched(s[e.id]),r=c(e,i,o);l(e.id,r,!o)}function d(e){return!n.isCollapsed(e)}function g(t){var i,n=t.children,c=a[t.id];!e.isEmpty(n)&&d(t.id)&&(e.forEach(n,g),c||(i=u(t,o,a,p,r,s))),h(t,i)}var p={};g(i)}}),define("layout/util/reduceDistancesAlgorithm/enforceAnchorsAndDocking",["lodash","siteUtils","layout/util/reduceDistancesAlgorithm/reduceDistancesAlgorithmUtils","layout/util/reduceDistancesAlgorithm/anchorsTypes"],function(e,t,i,n){function o(e,i,n){var o=n.getComponentHeight(i),r=n.getComponentWidth(i),a=n.getClientSize(),s=n.getSiteWidth();return t.positionAndSize.getHeightInPixelsRounded(e,{width:r,height:o},a,s)}function r(e,i,n,o){var r={width:o.getComponentWidth(n),height:o.getComponentHeight(n)},a=o.getClientSize(),s=o.getComponentHeight(e);return t.positionAndSize.getYInPixelsRounded(i,r,a,s)}function a(t,o,r,a){var s=[],u=e.every(o,{locked:!1});return e.forEach(o,function(e){if(u){var o=r.getOriginalTop(t);s.push(o)}var c=a.getComponentTop(e.fromComp)+(e.type===n.TOP_TOP?0:a.getComponentHeight(e.fromComp))+i.getAnchorMinDistance(e);s.push(c)}),e.max(s)}function s(t,o){var r=[];return e.some(t,"locked")?(e.forEach(t,function(e){var t=o.getComponentTop(e.fromComp)+(e.type===n.TOP_TOP?0:o.getComponentHeight(e.fromComp))+i.getAnchorMinDistance(e);r.push(t)}),e.max(r)):null}function u(e){return t.layout.isDockedToDirection(e,"bottom")}return function(n,c,l,h,d,g){function p(e,t){var i=r(e.id,g[e.id],t,c);c.setComponentTop(e.id,i)}function m(e,i){if(t.layout.isVerticallyStretched(g[e.id])&&!c.isCollapsed(e.id)){var n=o(g[e.id],i,c);c.setComponentHeight(e.id,n)}}function f(e,t){p(e,t.id),m(e,t.id)}function y(t){var i=l.getComponentPushers(t.id);if(!e.isEmpty(i)){var n=s(i,c);null!==n&&c.setComponentTop(t.id,n)}}function w(t){var i=l.getComponentPushers(t.id);if(!d[t.id])if(e.isEmpty(i))c.setComponentTop(t.id,h.getOriginalTop(t.id));else{var n=a(t.id,i,h,c);c.setComponentTop(t.id,n)}}function v(i,n){e.forEach(i,function(e){t.layout.isVerticallyDocked(g[e.id])?f(e,n):w(e)})}function C(i,n){e.forEach(i,function(e){var i=t.layout.isDockedToDirection(g[e.id],"top"),o=t.layout.isDockedToDirection(g[e.id],"bottom");i||o||y(e,n)})}function b(t){function n(e,t){var i=c.getComponentTop(e),n=t-c.getComponentHeight(e);return n>=i?null:(c.setComponentTop(e,n),a=!0,n)}function o(t,r){var a=t.fromComp,s=n(a,r-i.getAnchorMinDistance(t));if(null!==s){var u=l.getComponentPushers(a);e.forEach(u,function(e){o(e,s)})}}function r(t){var i=c.getComponentTop(t),n=l.getComponentPushers(t);e.forEach(n,function(e){o(e,i)})}var a=!1,s=e.filter(t,function(e){return u(g[e.id])});return e.forEach(s,function(e){r(e.id)}),a}function M(e){return!c.isCollapsed(e)}function S(t){var i=t.children;!e.isEmpty(i)&&M(t.id)&&(v(i,t),b(i)&&C(i,t),e.forEach(i,S))}S(n)}}),define("layout/util/reduceDistancesAlgorithm/reduceDistancesAlgorithm",["layout/util/reduceDistancesAlgorithm/enforceComponentsMinHeight","layout/util/reduceDistancesAlgorithm/enforceAnchorsAndDocking"],function(e,t){return{enforce:function(i){return e(i.structure,i.measureMapManager,i.anchorsDataManager,i.originalValuesManager,i.lockedCompsMap,i.layoutsMap),t(i.structure,i.measureMapManager,i.anchorsDataManager,i.originalValuesManager,i.lockedCompsMap,i.layoutsMap),i.flatDataMap}}}),define("layout/util/layoutAlgorithm",["lodash","experiment","coreUtils","siteUtils","layout/util/anchors","layout/util/reduceDistancesAlgorithm/generateEnforceData","layout/util/reduceDistancesAlgorithm/reduceDistancesAlgorithm"],function(e,t,i,n,o,r,a){function s(t,n,o){function r(t){e.has(n.height,t.id)&&(a[t.id]=t,e.forEach(i.dataUtils.getChildrenData(t,o),r))}var a={};return r(t),a}return{enforceStructure:function(i,u,c,l,h,d,g,p,m){var f=h?n.constants.VIEW_MODES.MOBILE:n.constants.VIEW_MODES.DESKTOP,y=e.get(c,[i.id,f]);if(y){if(t.isOpen("layout_verbs_with_anchors")){var w=r(i,u,c,l,h,d,g);return w?a.enforce(w):{}}return o.enforceAnchors(i,u,y,h,d,g,p,m)}return s(i,u,h)}}}),define("layout/util/createDOMPatchers",["zepto","lodash","loggingUtils"],function(e,t,i){function n(t,n,o){t[n]?e(t[n]).css(o):i.log.error("Cannot find node with id {"+n+"} to patch css. Either the node doesn't exist, or it was never measured, or it was measured under a different id.")}function o(t,n,o){t[n]?e(t[n]).attr(o):i.log.error("Cannot find node with id {"+n+"} to patch attributes. Either the node doesn't exist, or it was never measured, or it was measured under a different id.")}function r(e,n,o){e[n]?t.forOwn(o,function(t){e[n].setAttributeNS(t.ns,t.attribute,t.value)}):i.log.error("Cannot find node with id {"+n+"} to patch attributesNS. Either the node doesn't exist, or it was never measured, or it was measured under a different id.")}function a(e,n,o){e[n]?t.forEach(t.keys(o),function(t){e[n][t]=o[t]}):i.log.error("Cannot find node with id {"+n+"} to patch events. Either the node doesn't exist, or it was never measured, or it was measured under a different id.")}function s(n,o,r){if(n[o]){var a=e(n[o]);t.forOwn(r,function(e,t){a.data(t,e)})}else i.log.error("Cannot find node with id {"+o+"} to patch data. Either the node doesn't exist, or it was never measured, or it was measured under a different id.")}function u(e){return{css:t.partial(n,e),attr:t.partial(o,e),attrNS:t.partial(r,e),data:t.partial(s,e),events:t.partial(a,e)}}return u}),define("layout/util/rootLayoutUtils",["lodash","siteUtils"],function(e,t){return{getRootWidth:function(e,i,n){return t.layout.getRootWidth(i,n,e.getSiteWidth())},getRootLeft:function(e,i,n){return t.layout.getRootLeft(i,n,e.getSiteX())}}}),define("layout/util/singleCompLayout",["lodash","coreUtils","siteUtils","layout/util/rootLayoutUtils","experiment"],function(e,t,i,n,o){function r(e){return"fixed"===e.position}function a(e){return i.layout.isHorizontallyStretched(e.layout)}function s(e){return P[e.componentType]}function u(e){return i.layout.isVerticallyStretched(e.layout)}function c(e){return P[e.componentType]}function l(e,t,i){var n=i.zIndex;"auto"!==n&&(n=parseFloat(n),isNaN(n)||(e.zIndex[t]=n))}function h(e,t,i,n){r(n)&&(e.fixed[t]=!0,e.top[t]=i.offsetTop,e.left[t]=i.offsetLeft)}function d(t,i,n,o){var r=e.get(o,"layout.width",0);a(o)?t.width[i]=n.offsetWidth:s(o)||!e.get(o,"layout.width")?t.width[i]=Math.max(n.offsetWidth,r):t.width[i]=r}function g(e,t,i){e.top[t]=i.offsetTop}function p(t,i,n,o){var r=e.get(o,"layout.height",0),a=e.get(o,"layout.aspectRatio",0);a&&(r=a*t.width[i]),u(o)?t.height[i]=n.offsetHeight:c(o)||!e.get(o,"layout.height")?t.height[i]=Math.max(n.offsetHeight,r):t.height[i]=r}function m(t,i,n,o){var r=e.get(o,"layout.width",0),a=e.get(o,"layout.height",0);t.width[i]=r,t.height[i]=a}function f(t,i){var n=i.offsetLeft,o=e.get(t,"layout.x",0);return.5===Math.abs(o-n)?o:n}function y(e,t,i,n){if(n.isDeadComp[e])m(n,e,t,i);else{var r=window.getComputedStyle(t);h(n,e,t,r),l(n,e,r),d(n,e,t,i),p(n,e,t,i),o.isOpen("layout_verbs_with_anchors")&&g(n,e,t),n.left[e]=f(i,t)}}function w(e){return e.getAttribute("data-dead-comp")}function v(e,t){if(!e)return!1;var i=t(e);return i||!1}function C(e,t,i,n,o,r){var a=t.id,s=v(a,i);s&&(o[a]=s,y(a,s,e,n),w(s)?n.isDeadComp[a]=!0:(E[t.type]&&E[t.type](a,n,o,r,t),L[t.type]&&L[t.type](a,n,o,r,t)))}function b(t,i,n,o,r){var a=t.id,s=v(a,i);if(s&&!w(s)&&D[t.type]){var u=D[t.type];"function"==typeof u&&(u=u(r,a,o,t)),e.forEach(u,function(s){var u=e.isPlainObject(s),c=u?s.pathArray:s,l=i.apply(void 0,[a].concat(c))||i.apply(void 0,[a,"component"].concat(c));if(l){var h=c.join(""),d=a+h;o[d]=l,n.height[d]=l.offsetHeight,n.width[d]=l.offsetWidth,u&&L[s.type]&&L[s.type](d,n,o,r,t)}})}}function M(t,n,o,r){var a={};r&&(i.layout.isVerticallyDocked(r)&&!i.layout.isVerticallyStretchedToScreen(r)||(a.top=T(o.top[t])),i.layout.isVerticallyStretched(r)&&!i.layout.isVerticallyStretchedToScreen(r)||(a.height=T(o.height[t])),e.isEmpty(a)||n.css(t,a))}function S(i,o,r,a,s){var u=a.layout;if(u&&t.dockUtils.isHorizontalDockToScreen(u)){var c=n.getRootWidth(s,r,a.rootId),l=0-n.getRootLeft(s,r,a.rootId),h=t.dockUtils.getDockedStyle(u,s.getPageBottomMargin(),s.getScreenWidth(),c,l),d=e.pick(h,["left","width"]);r.left[i]=parseInt(d.left,10),o.css(i,d)}}function I(e,t,i,n,o){var r=e.id;M(r,t,n,e.layout),S(r,t,n,e,o);var a=n.isDeadComp[r],s=!1;return!a&&A[e.type]?s=A[e.type](r,i,n,e,o):!a&&B[e.type]&&(s=B[e.type](r,t,n,e,o)),s}function x(e,t,i,n){var o=e.id,r=!1;return!i.isDeadComp[o]&&B[e.type]&&(r=B[e.type](o,t,i,e,n)),r}var T=t.style.unitize,A={},L={},P={},D={},E={},B={};return{patchWithoutPositioning:x,patchComponent:I,measureComponent:C,measureComponentChildren:b,isComponentDead:w,registerPatcher:function(e,t){A[e]=t},registerSAFEPatcher:function(e,t){B[e]=t},registerPatchers:function(t,i){A[t]=function(){var t=arguments;e.forEach(i,function(e){e.apply(null,t)})}},registerSAFEPatchers:function(t,i){B[t]=function(){var t=arguments;e.forEach(i,function(e){e.apply(null,t)})}},registerCustomMeasure:function(e,t){L[e]=t},registerRequestToMeasureDom:function(e){P[e]=!0},registerRequestToMeasureChildren:function(e,t){D[e]=t},registerAdditionalMeasureFunction:function(e,t){E[e]=t},maps:{classBasedMeasureChildren:D,classBasedCustomMeasures:L,classBasedPatchers:A}}}),define("layout/util/bodyNodePatcher",["zepto","lodash"],function(e,t){return{updateBodyNodeStyle:function(i){var n=e("body"),o=e("html");if(i.isQaMode()&&n.addClass("qa-mode"),i.isMobileView()?(n.addClass("device-mobile-optimized"),o.addClass("device-mobile-optimized")):i.isMobileDevice()||i.isTabletDevice()?n.addClass("device-mobile-non-optimized"):(n.removeClass("device-mobile-optimized").removeClass("device-mobile-non-optimized"),o.removeClass("device-mobile-optimized")),i.isMobileDevice()){var r=t.assign({},i.os,i.browser),a=t(r).keys().filter(function(e){return!0===r[e]}).map(function(e){return"device-"+e}).join(" ");o.addClass(a)}var s=n.css("overflow"),u=i.renderFlags.allowSiteOverflow?null:"hidden";s!==u&&n.css("overflow",u)}}}),define("layout/util/iframesPatcher",["zepto","lodash"],function(e,t){return{setIframesSrc:function(){var i=e("iframe[data-src]");t.forEach(i,function(e){var t=e.getAttribute("src"),i=e.getAttribute("data-src");i&&(t!==i&&e.setAttribute("src",i),e.removeAttribute("data-src"))})}}}),define("layout/util/layout",["zepto","lodash","layout/util/anchors","layout/util/layoutAlgorithm","coreUtils","loggingUtils","layout/util/createDOMPatchers","layout/util/singleCompLayout","layout/util/bodyNodePatcher","layout/util/iframesPatcher","experiment"],function(e,t,i,n,o,r,a,s,u,c,l){function h(e,i){var n=t.last(e),r=o.dataUtils.getChildrenData(n,i);return t.transform(r,function(e,t){e[t.id]=!0},{})}function d(e){return[e[e.length-2]]}function g(e,t,i){return e&&Math.max(t,Math.min(i,e))}function p(e,n){if(l.isOpen("sv_partialReLayout"))return!(!e||e[n.id]);var o=e;return o&&!o[n.id]&&!i.HARD_WIRED_COMPS[n.id]&&!t.has(X,n.type)}function m(e){return e.componentType||e.documentType}function f(e,i,n){var r=i.getSiteData(),a=e.layout,s={dataItem:e.dataItem||null,propertiesItem:e.propertiesItem||null,layout:a,styleItem:null,id:e.id,type:m(e),structure:e,rootId:n};return s.layout&&(t.isFinite(s.layout.height)&&(s.layout.height=g(s.layout.height,o.siteConstants.COMP_SIZE.MIN_HEIGHT,o.siteConstants.COMP_SIZE.MAX_HEIGHT)),t.isFinite(s.layout.width)&&(s.layout.width=g(s.layout.width,o.siteConstants.COMP_SIZE.MIN_WIDTH,o.siteConstants.COMP_SIZE.MAX_WIDTH))),e.dataQuery&&!s.dataItem&&(s.dataItem=r.getDataByQuery(e.dataQuery,n)),e.propertyQuery&&!e.propertiesItem&&(s.propertiesItem=r.getDataByQuery(e.propertyQuery,n,r.dataTypes.PROPERTIES)),(e.behaviorQuery||e.behaviors)&&(s.behaviorsItem=e.behaviors||t.get(r.getDataByQuery(e.behaviorQuery,n,r.dataTypes.BEHAVIORS),"items")),e.designQuery&&(s.designDataItem=r.getDataByQuery(e.designQuery,n,r.dataTypes.DESIGN)),e.styleId&&(s.styleItem=r.getDataByQuery(e.styleId,n,r.dataTypes.THEME)),s}function y(e,t){return Boolean(t.collapsed[e])}function w(e,i,n,o,r,a,u){var c=r.getSiteData(),h=[],d=t(n).keys().filter(function(e){return!y(e,o)}).value();return t.forEach(d,function(t){var d=f(n[t],r,a);!l.isOpen("sv_partialReLayout")&&p(u,d)||s.patchComponent(d,e,i,o,c)&&h.push(t)}),h}function v(e,i,n,o,r,s){var u=[],c=a(n);return t.forEach(e,function(e,t){u=u.concat(w(c,n,o[t],i,r,e.pageId,s))}),u}function C(t,i,n,o,r,a,s){var u=e(i(t.id));u.attr("data-leaving")||(j[t.componentType]?b(t,i,n,o,r,a,s):M(t,i,n,o,r,a,s),u.attr("data-hidden")?n.isHidden[t.id]=!0:n.isHidden[t.id]=!1)}function b(e,t,i,n,o,r,a){var s=o.getSiteData(),u=f(e,o,r);S(e,t,n),I(u,o,t,i,n,r,a),x(u,t,i,n,s,e,a)}function M(e,t,i,n,o,r,a){var s=o.getSiteData(),u=f(e,o,r);S(e,t,n),x(u,t,i,n,s,e,a),I(u,o,t,i,n,r,a)}function S(e,t,i){var n=t(e.id);n&&(i[e.id]=n)}function I(e,i,n,r,a,s,u){var c=i.getSiteData(),l=o.dataUtils.getChildrenData(e.structure,c.isMobileView());t.forEach(l,function(e){C(e,n,r,a,i,s,u)})}function x(t,i,n,o,r,a,u){if(!p(u,t)){var c=e(i(a.id));n.collapsed[a.id]=!!c.attr("data-collapsed"),s.measureComponentChildren(t,i,n,o,r),s.measureComponent(a,t,i,n,o,r)}}function T(e,i,n,o,r){t.forOwn(e,function(e){C(e.structure,e.getDomNodeFunc,i,n,o,e.pageId,r)})}function A(e,i,o,r,a,s){var u,c={},l=o.getSiteData();l.originalValuesMap=l.originalValuesMap||{};var h=l.isMobileView();return e.inner&&(u=l.isRootIgnoreBottomBottom(t.get(e,"inner.structure.id")),c.inner=n.enforceStructure(e.inner.structure,i,l.anchorsMap,l.originalValuesMap,h,r,a,s,u),i.height.SITE_PAGES&&(i.height.SITE_PAGES=i.height[e.inner.pageId])),t.forOwn(e,function(e,o){"inner"!==o&&(u=l.isRootIgnoreBottomBottom(t.get(e,["structure","id"])),c[o]=n.enforceStructure(e.structure,i,l.anchorsMap,l.originalValuesMap,h,r,a,s,u))}),c}function L(e,i,n,r,a,s){var u=e.id;if(s=s||i.fixed[u],u){var c=i.top[u]||0,l=i.left[u]||0;i.fixed[u]?(r=c,a=l):(r+=c,a+=l),i.absoluteTop[u]=r,i.absoluteLeft[u]=a,s&&(i.shownInFixed[u]=!0)}var h=o.dataUtils.getChildrenData(e,n);t.forEach(h,function(e){L(e,i,n,r,a,s)})}function P(e,i,n){var o=t.sortBy(t.keys(e),function(e){return"inner"===e?1:0});t.forEach(o,function(t){L(e[t].structure,i,n,"inner"===t?i.absoluteTop.SITE_PAGES:0,"inner"===t?i.absoluteLeft.SITE_PAGES:0)})}function D(e,i,n,r,a,u){var c=e.id&&i(e.id);if(c&&s.isComponentDead(c))return!1;var l=!u||!!u[e.id],h=n.getSiteData().isMobileView(),d=o.dataUtils.getChildrenData(e,h),g=t.reduce(d,function(e,t){return D(t,i,n,r,a,u)||e},!1),p=l||g;return c&&Y[e.componentType]&&p&&r.push({anchorsMap:a,structure:e,getDomNodeFunc:i,domNode:c}),p}function E(e,n,o,r,a,s,u,c){var l=[],h={},d=a.getSiteData(),g=d.isMobileView();return t.forEach(e,function(e){var o=f(e.structure,a),p=Y[o.structure.componentType].measure(o,e.domNode,n,r,d,function(t){C(t,e.getDomNodeFunc,n,r,a,o.rootId,c)},function(t){return i.enforceAnchors(t,n,e.anchorsMap,g,u,s,c)});p.needsAdditionalInnerLayout&&l.push(e),p.changedCompsMap&&t.assign(h,p.changedCompsMap)}),t.forEach(e,function(e){var t=f(e.structure,a);e.skipPatch||Y[t.structure.componentType].patch(t,n,o,r,a.getSiteData())}),{compsToInnerLayoutAgain:l,changedComps:h}}function B(e,i,n,o,r,s,u){var c=o.getSiteData(),l=c.getViewMode(),h={},d=[];t.forOwn(e,function(e){var i=t.get(e,"structure.id"),n=t.get(c.anchorsMap,[i,l]);D(e.structure,e.getDomNodeFunc,o,d,n,u)});for(var g=d,p=0,m=a(n);g.length&&p<3;){var f=E(g,i,m,n,o,r,s,u);g=f.compsToInnerLayoutAgain,h=t.assign(h,f.changedComps),p++}return h}function H(i,n){var o=(q=e("#SITE_ROOT")).offset()||{top:0},r=l.isOpen("onboardingviewportmode")?k(i):window.document.documentElement.clientHeight,a=i.mobile.getScreenDimensions();n.clientWidth=i.getBodyClientWidth(),n.clientHeight=r,n.width.screen=i.getScreenWidth(),n.width.site=i.getSiteWidth(),n.height.screen=n.clientHeight,n.innerHeight.screen=window.innerHeight,n.innerWidth.screen=window.innerWidth,n.height.device=a.height,n.width.device=a.width,n.availHeight.device=a.availHeight,n.availWidth.device=a.availWidth,n.devicePixelRatio=i.mobile.getDevicePixelRatio(),n.siteOffsetTop=o.top,n.siteMarginBottom=t.parseInt(q.css("padding-bottom"),10)||0}function R(){return{pageBottomByComponents:{},collapsed:{},isHidden:{},height:{},width:{},availHeight:{},availWidth:{},innerWidth:{},innerHeight:{},custom:{},containerHeightMargin:{},minHeight:{},minWidth:{},top:{},left:{},absoluteTop:{},absoluteLeft:{},fixed:{},shownInFixed:{},zIndex:{},isDeadComp:{},clientWidth:0,skipPatch:{},shrinkableContainer:{},injectedAnchors:{}}}function k(e){var i=t.get(e.renderFlags,"onboardingViewportMode","auto");return"parent"===i?window.parent.document.documentElement.clientHeight:/fixed:/.test(i)?parseInt(i.split(":")[1],10):window.document.documentElement.clientHeight}function W(e,i){return t.forOwn(i,function(t,i){delete e.top[i],delete e.height[i],delete e.zIndex[i]}),e}function O(e,i){var n=G[e.siteId]||{};return t.omitBy(n,t.keys(i))}function _(e,i){var n=null,o=t.last(e);if(o&&e.length>1){var r=t.get(e,e.length-2);"wysiwyg.viewer.components.Group"===r.componentType&&((n={})[r.id]=!0)}return o&&Z[o.componentType]?t.defaults({},n,Z[o.componentType](e,i)):n}function F(e,i,n){var r=t.last(e),a={};i[r.id]&&t.assign(a,_(e,n));var s=o.dataUtils.getChildrenData(r,n);return t.forEach(s,function(o){t.assign(a,F(e.concat([o]),i,n))}),a}function U(e,i,n){var o={};return t.forOwn(i,function(i){t.assign(o,F([i.structure],e,n))}),o}function N(e,n,r,a,s){var u={};return t.assign(u,n,r,i.HARD_WIRED_COMPS,o.arrayUtils.toTrueObj(a)),t.assign(u,U(u,e,s)),u}function z(e){var i=t(e).values().flatMap(t.keys).value();return o.arrayUtils.toTrueObj(i)}function V(e,t,i,n,o){l.isOpen("sv_reportPerformance")&&(r.performance.clearMeasures(Q),r.performance.start(Q));var a=t.getSiteData(),s=a.isMobileView();delete e.undefined;var u,h=l.isOpen("sv_partialReLayout")?O(a,o):{},d=!1;H(a,u=l.isOpen("sv_partialReLayout")?o?W(a.measureMap,o):R(a):(d=a.measureMap&&n&&i)?W(a.measureMap,n):R(a));var g=B(e,u,h,t,n,i,o);o&&(o=N(e,o,g,t.getAllRenderedRootIds(),s)),l.isOpen("sv_partialReLayout")?T(e,u,h,t,o):T(e,u,h,t,d&&n);var p=A(e,u,t,i,n,o);P(e,u,s);var m=v(e,u,h,p,t,!l.isOpen("sv_partialReLayout")&&d&&n);return a.imageLoader.loadAllImages(a),c.setIframesSrc(),G[a.siteId]=h,l.isOpen("sv_reportPerformance")&&r.performance.finish(Q,a.isViewerMode(),{partialReLayout:l.isOpen("sv_partialReLayout")}),{componentsToRender:m,measureMap:u,reLayoutedCompsMap:z(p)}}var q,G={},Y={},j={},Q="reLayout",Z={"wysiwyg.viewer.components.Group":h,"wysiwyg.viewer.components.BoxSlideShow":h,"wysiwyg.viewer.components.StripContainerSlideShow":h,"wysiwyg.viewer.components.StripColumnsContainer":h,"wysiwyg.viewer.components.Column":function(e,i){var n=e[e.length-2],r=o.dataUtils.getChildrenData(n,i),a=[n].concat(r);return t.transform(a,function(e,t){e[t.id]=!0},{})},"wysiwyg.viewer.components.StripContainerSlideShowSlide":d,"wysiwyg.viewer.components.BoxSlideShowSlide":d},X={"mobile.core.components.Page":!0,"wysiwyg.viewer.components.StripColumnsContainer":!0,"wysiwyg.viewer.components.Column":!0};return{registerLayoutInnerCompsFirst:function(e,t,i){Y[e]={measure:t,patch:i}},registerMeasureChildrenFirst:function(e,t){j[e]=t},registerPatcher:function(e,t){s.registerPatcher(e,t)},registerSAFEPatcher:function(e,t){s.registerSAFEPatcher(e,t)},registerSAFEPatchers:function(e,t){s.registerSAFEPatchers(e,t)},registerPatchers:function(e,t){s.registerPatchers(e,t)},registerCustomMeasure:function(e,t){s.registerCustomMeasure(e,t)},registerAdditionalMeasureFunction:function(e,t){s.registerAdditionalMeasureFunction(e,t)},registerRequestToMeasureDom:function(e){s.registerRequestToMeasureDom(e)},registerRequestToMeasureChildren:function(e,t){s.registerRequestToMeasureChildren(e,t)},updateBodyNodeStyle:u.updateBodyNodeStyle,reLayout:V,measureMediaRichTextInnerComponent:function(e,t,i,n,o,r){s.measureComponentChildren(e,t,i,n,o),s.measureComponent(r,e,t,i,n,o)},patchWithoutPositioning:s.patchWithoutPositioning,enforceAnchors:i.enforceAnchors}}),define("layout/specificComponents/wixHomepageMenuLayout",["layout/util/layout"],function(e){e.registerRequestToMeasureChildren("wysiwyg.viewer.components.wixhomepage.WixHomepageMenu",[["buttonsContainer"]]),e.registerCustomMeasure("wysiwyg.viewer.components.wixhomepage.WixHomepageMenu",function(e,t){var i=t.height[e+"buttonsContainer"];t.height[e]=Math.max(t.height[e],i),t.minHeight[e]=i})}),define("layout/specificComponents/fiveGridLineLayout",["layout/util/layout","layout/util/rootLayoutUtils"],function(e,t){var i=function(e,i,n,o,r){var a=n.width.screen,s=t.getRootWidth(r,n,o.rootId),u=0,c=s,l=o.propertiesItem;l&&l.fullScreenModeOn&&(a>s&&(u=-(a-s)/2,c=a),i.css(e,{width:c+"px",left:u+"px"}),n.width[e]=c,n.left[e]=u)};e.registerSAFEPatcher("wysiwyg.viewer.components.FiveGridLine",i),e.registerRequestToMeasureChildren("wysiwyg.viewer.components.FiveGridLine",[["line"]]),e.registerRequestToMeasureDom("wysiwyg.viewer.components.FiveGridLine"),e.registerCustomMeasure("wysiwyg.viewer.components.FiveGridLine",function(e,t,i){var n=t.height[e+"line"],o=window.getComputedStyle(i[e]),r=parseFloat(o.borderBottomWidth);t.height[e]=Math.max(5,r,n),t.minHeight[e]=n})}),define("layout/specificComponents/domainSearchLayout",["lodash","layout/util/layout"],function(e,t){function i(e,t){var i=e+"content";[["width","minWidth"],["height","minHeight"]].forEach(function(n){var o=n[0],r=n[1];t[o][i]>t[o][e]&&(t[r]||(t[r]={}),t[o][e]=t[r][e]=t[o][i])})}return t.registerRequestToMeasureChildren("wysiwyg.common.components.domainsearchbar.viewer.DomainSearchBar",[["content"]]),t.registerCustomMeasure("wysiwyg.common.components.domainsearchbar.viewer.DomainSearchBar",i),{}}),define("layout/specificComponents/registerToMeasureOnly",["layout/util/layout"],function(e){return e.registerRequestToMeasureDom("wysiwyg.common.components.pinterestpinit.viewer.PinterestPinIt"),e.registerRequestToMeasureDom("wysiwyg.common.components.spotifyfollow.viewer.SpotifyFollow"),e.registerRequestToMeasureDom("wysiwyg.common.components.spotifyplayer.viewer.SpotifyPlayer"),e.registerRequestToMeasureDom("wysiwyg.viewer.components.Video"),e.registerRequestToMeasureDom("wysiwyg.viewer.components.WTwitterTweet"),e.registerRequestToMeasureDom("wysiwyg.common.components.disquscomments.viewer.DisqusComments"),e.registerRequestToMeasureChildren("wysiwyg.viewer.components.PaginatedGridGallery",[["itemsContainer"]]),{}}),define("layout/specificComponents/registerToPureDomMeasure",["layout/util/layout"],function(e){function t(t){e.registerCustomMeasure(t,function(e,t,i){var n=i[e];t.height[e]=n.offsetHeight,t.width[e]=n.offsetWidth})}return t("wysiwyg.viewer.components.FlashComponent"),t("wysiwyg.common.components.pinterestpinit.viewer.PinterestPinIt"),t("wysiwyg.viewer.components.WGooglePlusOne"),t("wysiwyg.viewer.components.LinkBar"),t("wysiwyg.common.components.singleaudioplayer.viewer.SingleAudioPlayer"),t("wysiwyg.common.components.facebooklikebox.viewer.FacebookLikeBox"),t("wysiwyg.viewer.components.PayPalButton"),t("wysiwyg.common.components.spotifyfollow.viewer.SpotifyFollow"),t("wysiwyg.viewer.components.FlickrBadgeWidget"),t("wysiwyg.viewer.components.WTwitterFollow"),t("wysiwyg.viewer.components.WTwitterTweet"),t("wysiwyg.common.components.skypecallbutton.viewer.SkypeCallButton"),{}}),define("layout/specificComponents/areaTooltipLayout",["layout/util/layout"],function(e){e.registerCustomMeasure("wysiwyg.common.components.areatooltip.viewer.AreaTooltip",function(e,t){var i=e+"content";t.custom[e]=t.height[e]/2-t.height[i]/2}),e.registerSAFEPatcher("wysiwyg.common.components.areatooltip.viewer.AreaTooltip",function(e,t,i,n){var o,r,a,s;if(r=e+"tooltip",i.height[r]){switch(o=e+"content",n.propertiesItem.tooltipPosition){case"top":s=-i.height[o]-14+"px",a=0;break;case"right":s=i.custom[e]+"px",a=i.width[e]+14+"px";break;case"bottom":s=i.height[e]+14+"px",a=0;break;case"left":s=i.custom[e]+"px",a="-414px";break;default:return}t.css(r,{top:s,left:a})}}),e.registerRequestToMeasureChildren("wysiwyg.common.components.areatooltip.viewer.AreaTooltip",[["tooltip"],["content"]])}),define("layout/specificComponents/menuLayout",["zepto","lodash","layout/util/layout","siteUtils","coreUtils"],function(e,t,i,n,o){function r(e){return!isNaN(parseFloat(e))&&isFinite(e)}function a(e,t){return e+15+t.menuBorderY+t.labelPad+t.menuButtonBorder}function s(e,i,n,o,r,a,s,c,l,h){var d=n.concat("__more__"),g=i.custom[e],p=g.realWidths,m=g.menuItemContainerExtraPixels,f=i.width[e];if(t.findIndex(d,function(e){return e===o})>=0&&p){var y=Math.abs(h.getSiteX())+i.absoluteLeft[e],w=u(m,s,l,f,r,c,y,y+f,i.clientWidth);return{left:w.moreContainerLeft,right:w.moreContainerRight,bottom:g.needToOpenMenuUp?a+"px":"auto"}}}function u(e,t,i,n,o,r,a,s,u){var c="0px",l="auto",h=r.left,d=r.width;return"left"===t?c="left"===o?0:h+e.left+"px":"right"===t?(l="right"===o?0:n-h-d-e.right+"px",c="auto"):"left"===o?c=h+(d+e.left-i)/2+"px":"right"===o?(c="auto",l=(d+e.right-(i+e.width))/2+"px"):c=e.left+h+(d-(i+e.width))/2+"px","auto"!==c&&(c=a+parseInt(c,10)<0?0:c),"auto"!==l&&(l=s-parseInt(l,10)>u?0:l),{moreContainerLeft:c,moreContainerRight:l}}function c(e,t,i,n,o,r,a){for(var s=0,u=null,c=i.custom[e].lineHeight[e],l=r-a.height,h=0;h<n.length;h++){var d=o[h],g=d>0,p=e+n[h];g?(s++,u=p,t.css(p,{width:d+"px",height:l+"px",position:"relative","box-sizing":"border-box",overflow:"visible"}),t.css(p+"label",{"line-height":c}),t.attr(p,{tabIndex:0})):(t.css(p,{height:"0px",overflow:"hidden",position:"absolute"}),t.attr(p,{tabIndex:-1}))}1===s&&(t.data(e+"moreContainer",{listposition:"lonely"}),t.data(u,{listposition:"lonely"}))}function l(e,i,n,o,u){var c=n.custom[e],l=c.hoverState,h=M.nonHiddenPageIdsFromMainMenu(o),d=h.indexOf(l);if(r(c.hoverState)||l===S){if(!n.custom[e].realWidths)return;var g=Math.max(u,n.width[-1!==d?e+d:e+S]),p=a(t.isEmpty(c.moreSubItem)?0:c.lineHeight[c.moreSubItem[0]+"label"],c);t.forEach(c.moreSubItem,function(e){i.css(e,{"min-width":g+"px"}),i.css(e+"label",{"min-width":"0px","line-height":p+"px"})});var m=r(c.hoverState)?c.hoverState:"__more__",f={width:n.width[e+m],left:n.left[e+m]},y=s(e,n,h,l,c.hoverListPosition,n.height[e],c.alignButtons,f,g,o);i.css(e+I,{left:y.left,right:y.right}),i.css(e+"dropWrapper",{left:y.left,right:y.right,bottom:y.bottom})}}function h(e,i,n,o,r){var a=n.height[e],s=M.nonHiddenPageIdsFromMainMenu(r),u=s.concat("__more__"),h=n.custom[e];m(e,i,h.needToOpenMenuUp);var d=h.menuItemContainerExtraPixels,g=0;if(h.hoverState===S){var p=h.realWidths.indexOf(0);t(h.realWidths).take(p).forEach(function(t,n){var o=e+I+n;i.css(o,{display:"none"})});var f=p===s.length-1;i.attr(e+I+p,{"data-listposition":f?"dropLonely":"top"});for(var y=p;y<h.realWidths.length-1;y++){var w=e+I+y+"label";g=Math.max(n.width[w],g)}}else h.hoverState&&t.forEach(h.moreSubItem,function(t,i){var o=e+I+i+"label";g=Math.max(n.width[o],g)});l(e,i,n,r,g),h.originalGapBetweenTextAndBtn&&t.forEach(u,function(t){h.hasOriginalGapData[t]||i.data(e+t,{originalGapBetweenTextAndBtn:h.originalGapBetweenTextAndBtn[e+t]})}),c(e,i,n,u,h.realWidths,a,d)}function d(t){var i=t.lastChild;return(parseInt(e(i).css("margin-left"),10)||0)+(parseInt(e(i).css("margin-right"),10)||0)}function g(e){var t=parseFloat(e);return isFinite(t)?t:0}function p(t,i){var n=e(t).css(["border-top-width","border-bottom-width","border-left-width","border-right-width","padding-top","padding-bottom","padding-left","padding-right","margin-top","margin-bottom","margin-left","margin-right"]),o=g(n["border-top-width"])+g(n["padding-top"]),r=g(n["border-bottom-width"])+g(n["padding-bottom"]),a=g(n["border-left-width"])+g(n["padding-left"]),s=g(n["border-right-width"])+g(n["padding-right"]);return i&&(o+=g(n["margin-top"]),r+=g(n["margin-bottom"]),a+=g(n["margin-left"]),s+=g(n["margin-right"])),{top:o,bottom:r,left:a,right:s,height:o+r,width:a+s}}function m(e,t,i){t.data(e,{dropmode:i?"dropUp":"dropDown"})}function f(e){return e.getBoundingClientRect().top>window.innerHeight/2}function y(e){var i=M.nonHiddenPageIdsFromMainMenu(e).concat("__more__"),n=[[]],o=[["moreContainer"],["itemsContainer"],["dropWrapper"]];return t.forEach(n,function(e){o=o.concat(t.map(i,function(t){return[t].concat(e)}))}),o}function w(i,n,o,r,a){var s=n.width[i],u=n.custom[i];u.hasOriginalGapData={},u.originalGapBetweenTextAndBtn={};var c=t.map(a,function(o){var a,s=e(r[i+o]).data("originalGapBetweenTextAndBtn");return t.isUndefined(s)?(u.hasOriginalGapData[o]=!1,a=n.width[i+o]-u.labelWidths[i+o+"label"],u.originalGapBetweenTextAndBtn[i+o]=a):(u.hasOriginalGapData[o]=!0,a=parseInt(s,10)),n.width[i+o]>0?u.labelWidths[i+o+"label"]+a:0}),l=c.pop(),h=o.sameWidthButtons,d=o.stretchButtonsToMenuWidth,g=!1,p=u.menuItemContainerMargins,m=u.menuItemMarginForAllChildren,f=u.menuItemContainerExtraPixels,y=M.getMaxWidth(c),w=M.getDropDownWidthIfOk(s,h,d,c,p,y,m,f);if(!w){for(var v=1;v<=c.length;v++)if(w=M.getDropDownWidthIfOk(s,h,d,c.slice(0,-1*v).concat(l),p,y,m,f)){g=!0;break}w||(g=!0,w=[l])}if(g){var C=w[w.length-1];for(w=w.slice(0,-1);w.length<a.length;)w.push(0);w[w.length-1]=C}return{realWidths:w,moreShown:g}}function v(e,t){return o.style.unitize(e-t.menuBorderY-t.labelPad-t.ribbonEls-t.menuButtonBorder-t.ribbonExtra)}function C(e){var t=window.getComputedStyle(e);return parseInt(t.width,10)+parseInt(t.paddingLeft,10)+parseInt(t.paddingRight,10)}function b(i,n,o,r,a){var s=e(o[i]),u=e("#"+i+"itemsContainer")[0]||o[i+"itemsContainer"],c=u.childNodes,l=o[i+"moreContainer"],h=l.childNodes,g=n.custom[i]={alignButtons:s.data("dropalign"),hoverListPosition:s.data("drophposition"),menuBorderY:parseInt(s.data("menuborder-y"),10),ribbonExtra:parseInt(s.data("ribbon-extra"),10),ribbonEls:parseInt(s.data("ribbon-els"),10),labelPad:parseInt(s.data("label-pad"),10),menuButtonBorder:parseInt(s.data("menubtn-border"),10),menuItemContainerMargins:d(u),menuItemContainerExtraPixels:p(u,!0),needToOpenMenuUp:f(o[i]),menuItemMarginForAllChildren:!a.propertiesItem.stretchButtonsToMenuWidth||"false"!==u.getAttribute("data-marginAllChildren")};g.moreSubItem=[],g.lineHeight={},g.labelWidths={},t.forEach(h,function(t){o[t.id]=t;var i=e(t).find("p")[0];o[i.id]=i,n.width[i.id]=i.offsetWidth,n.height[i.id]=i.offsetHeight,n.left[i.id]=i.offsetLeft,g.lineHeight[i.id]=parseInt(window.getComputedStyle(i).fontSize,10),g.moreSubItem.push(t.id)}),t.forEach(c,function(t){n.left[t.id]=t.offsetLeft;var i=e(t).find("p")[0];o[i.id]=i,g.labelWidths[i.id]=C(i)});var m=n.height[i];g.lineHeight[i]=v(m,g);var y=M.nonHiddenPageIdsFromMainMenu(r).concat("__more__"),b=w(i,n,a.propertiesItem,o,y);g.realWidths=b.realWidths,g.isMoreShown=b.moreShown,g.hoverState=l.getAttribute("data-hover")}var M=n.menuUtils,S="__more__",I="moreContainer";return i.registerSAFEPatcher("wysiwyg.viewer.components.menus.DropDownMenu",h),i.registerCustomMeasure("wysiwyg.viewer.components.menus.DropDownMenu",b),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.menus.DropDownMenu",y),{}}),define("layout/specificComponents/imageLayout",["lodash","coreUtils","layout/util/layout"],function(e,t,i){function n(e,i,n){return t.imageUtils.getImageComputedProperties(e,i.getMediaFullStaticUrl.bind(i),i.currentUrl,i.mobile.getDevicePixelRatio(),n)}function o(t,i,n){i.css(t+h,e.get(n,["css","img"]))}function r(t,i,n,o,r,a){var s=n.custom[t]&&n.custom[t].isSvgImage,u=n.custom[t]&&n.custom[t].filterId,c=o.containerWidth,l=o.containerHeight;if(!o.containerWidth||!o.containerHeight||!o.imageData.uri)return null;i.css(t+d,{width:c,height:l}),s&&(i.attr(t+d,a.attr.container),i.attrNS(t+h,[{ns:"http://www.w3.org/1999/xlink",attribute:"xlink:href",value:a.uri}]),n.custom[t].hasPattern?(i.attr(t+g,{filter:"url(#"+u+")",width:a.attr.container.width,height:a.attr.container.height,x:0,y:0}),i.attr(t+p,a.attr.img),i.attr(t+h,{width:a.attr.img.width,height:a.attr.img.height})):i.attr(t+h,e.assign({filter:"url(#"+u+")"},a.attr.img)))}function a(t){return e.pickBy(t,function(e){return""!==e})}function s(t,i,n,o,r){var s=a(i),u=t.css.container,c=e.assign({position:"absolute",width:n,height:o},u,s);return e.isNumber(r)&&(c.opacity=r),c}function u(e){return e&&e.split?e.split(";").reduce(function(e,t){var i=t.split(":");return i[0]&&i[1]&&(e[i[0].trim()]=i[1].trim()),e},{}):{}}function c(t,i,a,c,l,h,d){var g,p,m=u(a.custom[t].renderedStyles),f=a.custom[t]&&a.custom[t].isZoomed,y={imageData:l,containerWidth:f?l.width:h.width,containerHeight:f?l.height:h.height,displayMode:l.displayMode,alignType:d};a.custom[t].isSvgImage?r(t,i,a,y,d,p=n(y,c,"svg")):o(t,i,p=n(y,c,"img")),g=s(p,m,h.width,h.height,l.opacity),i.css(t,g);var w={patchers:i,id:t,isSvg:a.custom[t].isSvgImage,src:e.get(p,"uri"),absoluteTop:a.absoluteTop[a.custom[t].parentId]||0,height:h.height||a.height[t],currentSrc:a.custom[t].imgSrc};c.imageLoader.loadImage(w)}function l(t,i,n,o,r){var a,s=!1;n[t+h]=n[t].querySelector("img")||n[t].querySelector("image"),n[t+d]=n[t].querySelector("#svg"+t),n[t+g]=n[t+d]&&n[t+d].querySelector("rect"),n[t+p]=n[t].querySelector("pattern"),n[t+h]&&"image"===n[t+h].nodeName.toLowerCase()&&(s=!0,a=e.get(n[t].querySelector("filter"),"id")),i.custom[t]={isZoomed:n[t].getAttribute("data-image-zoomed"),isSvgImage:s,filterId:a,hasSvgNode:Boolean(n[t+d]),imgSrc:n[t+h].getAttribute("src"),parentId:r.id,renderedStyles:n[t].getAttribute("data-style"),hasPattern:!!n[t+p]}}var h="image",d="svg",g="rect",p="pattern";return i.registerCustomMeasure("core.components.Image",l),{patchNodeImage:c,measureNodeImage:l}}),define("layout/specificComponents/sliderGalleryLayout",["layout/util/layout","coreUtils","zepto","lodash","layout/specificComponents/imageLayout"],function(e,t,i,n,o){function r(e,t,i,n,o){var r=Math.floor(t+e);return l.getSizeAfterScaling({itemHeight:r,itemWidth:Math.floor(r*(o&&o.aspectRatio?o.aspectRatio:1)),displayerData:i,imageMode:o?o.imageMode:"clipImage",heightDiff:n.heightDiff,widthDiff:n.widthDiff,bottomGap:n.bottomGap})}function a(e,o,a,s,u,c,l){var d=i(c),g={imageIndex:d.data("image-index"),width:d.data("displayer-width"),height:d.data("displayer-height"),uri:d.data("displayer-uri")},p={heightDiff:parseInt(d.data("height-diff"),10)||0,widthDiff:parseInt(d.data("width-diff"),10)||0,bottomGap:parseInt(d.data("bottom-gap"),10)||0},m=u&&u[g.imageIndex]?u[g.imageIndex]:g,f=r(a,o,m=n.assign(m,{displayMode:t.imageUtils.fittingTypes.SCALE_TO_FILL}),p,s.propertiesItem);return{imageData:m,imageNodeId:e+"displayer"+l+"image",imageWrapperId:e+"displayer"+l+"imageWrapper",containerSize:h.getContainerSize(f.imageWrapperSize,d),sizeAfterScaling:f}}function s(e,t,o,r,s){var u=o[e+"images"],c=i(u).children(),l=n.get(s,"dataItem.items"),h=parseInt(i(o[e]).data("additional-height"),10)||0;t.custom[e]={displayers:n.map(c,n.partial(a,e,t.height[e],h,s,l)),additionalHeight:h}}function u(e,t,i,r,a){var s=i.height[e];t.css(e,{height:s});var u=i.custom[e];n.forEach(u.displayers,function(e){h.updateImageWrapperSizes(t,e.imageWrapperId,e.sizeAfterScaling),o.patchNodeImage(e.imageNodeId,t,i,a,e.imageData,e.containerSize)})}function c(e,t){var o=[["images"],["itemsContainer"]],r=i("#"+t+"images").children();return n.forEach(r,function(e,t){var i="displayer"+t,n={pathArray:[i,"image"],type:"core.components.Image"},r=[i,"imageWrapper"];o.push(n,r)}),o}var l=t.matrix.scalingCalculations,h=t.galleriesCommonLayout;return e.registerRequestToMeasureChildren("wysiwyg.viewer.components.SliderGallery",c),e.registerCustomMeasure("wysiwyg.viewer.components.SliderGallery",s),e.registerSAFEPatcher("wysiwyg.viewer.components.SliderGallery",u),{}}),define("layout/specificComponents/verticalMenuLayout",["zepto","lodash","layout/util/layout","coreUtils","siteUtils","skinExports"],function(e,t,i,n,o,r){function a(e){var t=e.dataset;return{border:t&&t.paramBorder?parseInt(t.paramBorder,10):0,separator:t&&t.paramSeparator?parseInt(t.paramSeparator,10):0}}function s(){return window.innerHeight||window.document.documentElement.clientHeight||window.document.body.clientHeight}function u(e,t){return e-t}function c(t,i,n){var o={"line-height":n+"px"};i&&(o["text-overflow"]="ellipsis"),e(t).css(o)}function l(e,t){return Math.floor(e/2)>t?"down":"up"}function h(e,i,a,s,h){var d=a.custom[e],g="subMenuOpenDir-"+l(d.screenHeight,u(a.absoluteTop[e],d.pageYOffset));i.css(e,{width:a.width[e]}),i.attr(e,{"data-open-direction":g});var p=o.menuUtils.getSiteMenuWithoutRenderedLinks(h),m=r[s.styleItem.skin],f=n.verticalMenuCalculations.getVisibleItemsCount(p),y=Math.max(a.minHeight[e],s.layout.height),w=n.verticalMenuCalculations.getItemHeight(y,d.params.separator,f,m),v=n.verticalMenuCalculations.getLineHeight(w,d.params.separator,d.params.border,m);t.forEach(d.linksInfo,function(e){c(e.node,e.hasOverflow,v)}),t.forEach(d.liNodes,function(e){e.style.height=w+"px"})}function d(i,n,o){var r=o[i],u=e(r),c=u.find("a.level0"),l=0,h=0;t.forEach(c,function(e){e.offsetWidth>l&&(l=e.offsetWidth),h+=e.offsetHeight}),n.custom[i]={linksInfo:t.map(u.find("a"),function(e){return{node:e,hasOverflow:e.offsetWidth>l}}),liNodes:u.find("li"),params:a(r),screenHeight:s(),pageYOffset:window.pageYOffset};var d=parseInt(r.getAttribute("data-param-border")||0,10),g=parseInt(r.getAttribute("data-param-padding")||0,10),p=l+2*g+2*d;p>n.width[i]&&(n.width[i]=p),n.minHeight[i]=h}return i.registerCustomMeasure("wysiwyg.common.components.verticalmenu.viewer.VerticalMenu",d),i.registerSAFEPatcher("wysiwyg.common.components.verticalmenu.viewer.VerticalMenu",h),{}}),define("layout/specificComponents/loginButtonLayout",["lodash","layout/util/layout"],function(e,t){function i(e,t){var i=e+"container";t.minHeight[e]=t.height[i],t.height[i]>t.height[e]&&(t.height[e]=t.height[i])}function n(e,t,i){var n=e+"container",o=(i.height[e]-i.height[n])/2;t.css(n,{"margin-top":o+"px"})}t.registerRequestToMeasureChildren("wysiwyg.viewer.components.LoginButton",[["container"]]),t.registerCustomMeasure("wysiwyg.viewer.components.LoginButton",i),t.registerSAFEPatcher("wysiwyg.viewer.components.LoginButton",n)}),define("layout/util/spaceCalculationsRegardingWixAds",[],function(){function e(e){var t=parseInt(e,10);return isNaN(t)?0:t}function t(t){return e(t.height.WIX_ADS)+e(t.top.WIX_ADS)}function i(t){return t.height.WIX_ADSdesktopWADTop||t.top.WIX_ADSdesktopWADTop?e(t.height.WIX_ADSdesktopWADTop)+e(t.top.WIX_ADSdesktopWADTop):e(t.height.WIX_ADS)+e(t.top.WIX_ADS)}function n(t){var i,n,o=t.height.screen;return t.height.WIX_ADSdesktopWADTop||t.height.WIX_ADSdesktopWADBottom?(i=e(t.height.WIX_ADSdesktopWADTop)+e(t.top.WIX_ADSdesktopWADTop),n=e(t.height.WIX_ADSdesktopWADBottom),o-i-n):(i=e(t.height.WIX_ADS)+e(t.top.WIX_ADS),o-i)}return{getFirstVisibleTopCoordinate:t,getFirstUnoccupiedTopCoordinate:i,getScreenHeightExcludingAds:n}}),define("layout/specificComponents/dialogLayout",["lodash","layout/util/layout","layout/util/spaceCalculationsRegardingWixAds"],function(e,t,i){function n(e,t,n){var o=e+"dialog",r=n.height[o],a=n.height.screen,s=i.getFirstUnoccupiedTopCoordinate(n),u=i.getScreenHeightExcludingAds(n);t.css(e,{height:a+"px"});var c=(u-r)/2;t.css(o,{top:Math.max(c,20)+s+"px"})}t.registerRequestToMeasureChildren("wysiwyg.viewer.components.dialogs.EnterPasswordDialog",[["dialog"]]),t.registerSAFEPatcher("wysiwyg.viewer.components.dialogs.EnterPasswordDialog",n),t.registerRequestToMeasureChildren("wysiwyg.viewer.components.dialogs.siteMemberDialogs.MemberLoginDialog",[["dialog"]]),t.registerSAFEPatcher("wysiwyg.viewer.components.dialogs.siteMemberDialogs.MemberLoginDialog",n),t.registerRequestToMeasureChildren("wysiwyg.viewer.components.dialogs.siteMemberDialogs.SignUpDialog",[["dialog"]]),t.registerSAFEPatcher("wysiwyg.viewer.components.dialogs.siteMemberDialogs.SignUpDialog",n),t.registerRequestToMeasureChildren("wysiwyg.viewer.components.dialogs.siteMemberDialogs.RequestPasswordResetDialog",[["dialog"]]),t.registerSAFEPatcher("wysiwyg.viewer.components.dialogs.siteMemberDialogs.RequestPasswordResetDialog",n),t.registerRequestToMeasureChildren("wysiwyg.viewer.components.dialogs.siteMemberDialogs.ResetPasswordDialog",[["dialog"]]),t.registerSAFEPatcher("wysiwyg.viewer.components.dialogs.siteMemberDialogs.ResetPasswordDialog",n),t.registerRequestToMeasureChildren("wysiwyg.viewer.components.dialogs.NotificationDialog",[["dialog"]]),t.registerSAFEPatcher("wysiwyg.viewer.components.dialogs.NotificationDialog",n),t.registerRequestToMeasureChildren("wysiwyg.viewer.components.dialogs.CreditsDialog",[["dialog"]]),t.registerSAFEPatcher("wysiwyg.viewer.components.dialogs.CreditsDialog",n)}),define("layout/specificComponents/html5VideoLayout",["lodash","coreUtils","layout/specificComponents/imageLayout"],function(e,t,i){function n(t,i,n,s,u){var c={position:"absolute",minWidth:0,minHeight:0,top:0,left:0},l=t.mediaRef;if(!l||"WixVideo"!==l.type)return c;var d=e.find(l.qualities,{quality:s}),g=o(i.width,i.height,d.width,d.height),p=r(t.fittingType,g,d.width,d.height),m=a(t.alignType,p,i);return c={position:"absolute",minWidth:p.width,minHeight:p.height,left:m.left,top:h.isFullScreenByEffect(u,n.renderFlags.renderFixedPositionBackgrounds)?"":m.top}}function o(e,t,i,n){return{wScale:e/i,hScale:t/n}}function r(e,i,n,o){var r,a,s,u=t.imageUtils.fittingTypes;switch(e){case u.SCALE_TO_FILL:s=Math.max(i.wScale,i.hScale),r=Math.round(n*s),a=Math.round(o*s);break;case u.SCALE_TO_FIT:s=Math.min(i.wScale,i.hScale),r=Math.round(n*s),a=Math.round(o*s)}return{width:r,height:a}}function a(e,i,n){var o=n.width,r=n.compRootHeight,a=Math.floor((r-i.height)/2),s=Math.floor((o-i.width)/2),u={},c=t.imageUtils.alignTypes;switch(e){case c.CENTER:u.left=s,u.top=a;break;case c.LEFT:u.left=0,u.top=a;break;case c.RIGHT:u.left=o-i.width,u.top=a;break;case c.TOP:u.left=s,u.top=0;break;case c.BOTTOM:u.left=s,u.top=r-i.height;break;case c.TOP_LEFT:u.left=0,u.top=0;break;case c.TOP_RIGHT:u.left=o-i.width,u.top=0;break;case c.BOTTOM_LEFT:u.left=0,u.top=r-i.height;break;case c.BOTTOM_RIGHT:u.left=o-i.width,u.top=r-i.height}return u}function s(i,n,o){if(!n)return"";var r=e.find(i.qualities,{quality:n});return r.url?t.urlUtils.joinURL(o.getStaticVideoUrl(),r.url):t.urlUtils.joinURL(o.getStaticVideoUrl(),i.videoId,n,"mp4","file.mp4")}function u(e){return e.designDataItem&&e.designDataItem.background?e.designDataItem.background:e.dataItem.background}function c(e,t,n,o,r){var a=e+d.POSTER,s=n[e],u=s.firstChild;n[e+"video"]=u,t.custom[e]={},t.custom[a]={};var c=u.firstChild;n[e+"mp4"]=c,t.custom[e]={quality:s.getAttribute("data-quality"),src:c.src,videoNode:u},i.measureNodeImage(a,t,n,o,r)}function l(t,o,r,a,c,l,d){var g=u(a),p=!c.isTouchDevice(),m=h.getBgEffectName(a.behaviorsItem,p,c.isMobileView()),f=d.width,y=d.height,w=r.custom[t],v=w.quality,C=n(g,{width:f,height:l,compRootHeight:y},c,v,m);o.attr(t+"video",{width:C.minWidth,height:C.minHeight}),o.css(t+"video",C);var b=s(g.mediaRef,v,c);w.src!==b&&(o.attr(t+"mp4",{src:b}),w.videoNode.load());var M={width:f,height:l,top:0},S=e.assign({displayMode:g.fittingType},g.mediaRef.posterImageRef);i.patchNodeImage(t+"poster",o,r,c,S,M,g.alignType)}var h=t.containerBackgroundUtils,d=t.balataConsts;return{patchBgVideo:l,measureBgVideo:c}}),define("layout/util/optimizedCssImageLayout",["lodash","zepto","coreUtils"],function(e,t,i){function n(t,i){return!e.includes(t,i)||Boolean(t)!==Boolean(i)}function o(e,t){return e?i.urlUtils.isExternalUrl(e)?e:i.urlUtils.joinURL(t.getStaticMediaUrl(),e):""}function r(i,n){var o=t(n);i.type=o.data("type"),i.currentCss=o.data("image-css"),i.currentCss&&e.isString(i.currentCss)&&(i.currentCss=JSON.parse(i.currentCss)),i.previousBackgroundImageCssUrl=o.css("backgroundImage")}function a(e,t,i,n){n===h.BG_IMAGE?e.css(t,{backgroundImage:i?'url("'+i+'")':""}):e.attr(t,{src:i})}function s(t,i,n,o,r){var s=n.previousBackgroundImageCssUrl;r.imageResizeHandlers=r.imageResizeHandlers||{},s&&o?(r.imageResizeHandlers[t]||(r.imageResizeHandlers[t]=e.debounce(a,l,{trailing:!0})),r.imageResizeHandlers[t](i,t,o,n.type)):a(i,t,o,n.type)}function u(t,i){return i&&(!t||e.some(i,function(e,i){return e!==t[i]}))}function c(t,i,r,a,c,l){if(u(t.currentCss,a)){r.css(i,a);var h=e.defaults(a,t.currentCss);r.data(i,{"image-css":JSON.stringify(h)})}var d=o(c,l);n(t.previousBackgroundImageCssUrl,d)&&s(i,r,t,d,l)}var l=250,h=i.balataConsts;return{cacheCssImageMeasureData:r,patchCssImage:c}}),define("layout/specificComponents/siteBackgroundLayout",["lodash","zepto","layout/util/layout","imageClientApi","layout/specificComponents/imageLayout","layout/specificComponents/html5VideoLayout","layout/util/optimizedCssImageLayout","experiment"],function(e,t,i,n,o,r,a,s){function u(e,t,i,n,o){i.top[e]=m(i),i.width[e]=f(i,o),i.height[e]=p(i,o),i.height.currentImage=i.height.masterPage,t.css(e,{top:i.top[e]+"px",height:i.height[e]+"px",width:i.width[e]+"px"});var u=i.custom[e];if(s.isOpen("sv_mobileBG")){var c=o.isMobileView(),h=o.isMobileDevice(),d={width:c?i.width.screen:"100%",height:c&&"fixed"===u.bgPosition?l(i,c,h).availHeight:"100%"};t.css(S,d),t.css(I,d)}var y=g(u,o,i);if(a.patchCssImage(u,b,t,y.css,y.uri,o),i.custom[e].hasVideo){var w={designDataItem:{background:u.bgData}},v={width:i.width.screen,height:i.height.screen};r.patchBgVideo(e+x,t,i,w,o,v.height,v)}}function c(e,t){var i=e.getDataByQuery(t),n=e.isMobileView()?"mobile":"desktop";return{bgData:i.pageBackgrounds[n].ref,mediaSizing:i.pageBackgrounds[n].mediaSizing}}function l(e,t,i){var n={availWidth:e.width.screen,availHeight:e.height.screen,pixelAspectRatio:e.devicePixelRatio};if(t&&i){var o=Math.min(e.availWidth.device,e.availHeight.device),r=Math.max(e.availWidth.device,e.availHeight.device);n.availHeight=Math.round(n.availWidth*(r/o))}return n}function h(e,t,i){return!!s.isOpen("sv_mobileBG")&&(i&&e.mediaRef&&"viewport"===t)}function d(t,i,o,r,a){var s={},u=e.at(n.fittingTypes,["LEGACY_BG_NORMAL","LEGACY_BG_FIT_AND_TILE","LEGACY_BG_FIT_AND_TILE_HORIZONTAL","LEGACY_BG_FIT_AND_TILE_VERTICAL"]),c=e.includes(u,i.fittingType);if(r&&!c)s.width=o.availWidth,s.height=o.availHeight,s.pixelAspectRatio=o.pixelAspectRatio;else{var l=a?C:v;s.width=Math.min(l,t.width),s.height=Math.min(l,Math.round(s.width/(t.width/t.height)))}return s.htmlTag="bg",s.alignment=i.alignType,s}function g(t,i,o){var r=t.bgData,a=r.mediaRef,s={backgroundSize:"",backgroundPosition:"",backgroundRepeat:""},u="";if(a){"WixVideo"===a.type&&(a=a.posterImageRef);var c=i.isMobileView(),g=l(o,c,i.isMobileDevice()),p=h(r,t.mediaSizing,c),m={id:a.uri,width:a.width,height:a.height},f=d(a,r,g,p,c),y=e.defaults({quality:85},a.quality||{}),w=n.getData(r.fittingType,m,f,y,i.browser);u=w.uri,s={backgroundSize:w.css.container.backgroundSize,backgroundPosition:w.css.container.backgroundPosition,backgroundRepeat:w.css.container.backgroundRepeat,height:t.currentImageHeight},p&&("fill"===r.fittingType&&(s.backgroundSize="auto 100%",s.height=g.availHeight),s.backgroundPosition=s.backgroundPosition.replace(/(center|bottom)$/,"top"))}return{css:s,uri:u}}function p(e,t){var i=e.height[t.getStructureCompId()],n=e.height.screen-m(e);return Math.max(n,i)}function m(e){var t=parseInt(e.height.WIX_ADS,10);t=isNaN(t)?0:t;var i=parseInt(e.top.WIX_ADS,10);return i=isNaN(i)?0:i,t+i}function f(e,t){var i=e.width[t.getStructureCompId()];return Math.ceil(Math.max(e.width.screen,i))}function y(e){return[[e.getPrimaryPageId()]]}function w(i,n,r,u,l){r[b]=window.document.querySelector("."+b),s.isOpen("sv_mobileBG")&&(r[S]=window.document.querySelector("."+S),r[I]=window.document.querySelector("."+I));var d=c(u,u.getPrimaryPageId());if(n.custom[i]={bgData:d.bgData,hasVideo:!1,mediaSizing:d.mediaSizing,currentImageHeight:t(r[b]).data("height")},h(d.bgData,d.mediaSizing,u.isMobileView())&&(n.custom[i].bgPosition=t(r[S]).data("position")),a.cacheCssImageMeasureData(n.custom[i],r[b]),"WixVideo"===e.get(d.bgData.mediaRef,"type")&&!u.isTouchDevice()){n.custom[i].hasVideo=!0,r[M]=window.document.querySelector("."+M),r[i+A]=r[M].querySelector("."+A),r[i+T]=r[M].querySelector("."+T),r[i+L]=r[i+A].firstChild;var g=r[i+A];n.custom[i+x]={bgData:d.bgData,videoNode:g,quality:r[M].getAttribute("data-quality"),src:r[i+L].getAttribute("src")},o.measureNodeImage(i+T,n,r,u,l)}}var v=1920,C=1e3,b="siteBackgroundcurrentImage",M="siteBackgroundcurrentVideo",S="siteBackgroundcurrent",I="siteBackgroundprevious",x="bgVideo",T=x+"poster",A=x+"video",L=x+"mp4";return i.registerRequestToMeasureDom("wysiwyg.viewer.components.SiteBackground"),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.SiteBackground",y),i.registerSAFEPatcher("wysiwyg.viewer.components.SiteBackground",u),i.registerCustomMeasure("wysiwyg.viewer.components.SiteBackground",w),{testAPI:{getDeviceScreenDimensions:l,calculateTargetImageSize:d,getCssImageData:g}}}),define("layout/specificComponents/wPhotoLayout",["zepto","lodash","layout/util/layout","layout/specificComponents/imageLayout","coreUtils","siteUtils"],function(e,t,i,n,o,r){function a(e){return e===o.imageUtils.fittingTypes.LEGACY_FIT_WIDTH?o.imageUtils.fittingTypes.LEGACY_FIT_HEIGHT:l[e]||e}function s(e,t,i){var n=t.height[e]-(t.custom[e].marginHeight||0),r=t.width[e]-(t.custom[e].marginWidth||0),a={width:r>0?r:t.width[e],height:n>0?n:t.height[e]},s=t.custom[e].exactHeight-(t.custom[e].marginHeight||0);return i===o.imageUtils.fittingTypes.LEGACY_FIT_HEIGHT&&Math.ceil(s)===a.height&&(a.height=s),a}function u(t,i,n){var o=e(n[t]),r=parseInt(o.data("content-padding-horizontal"),10),a=parseInt(o.data("content-padding-vertical"),10),s=parseFloat(o.data("exact-height"));i.height[t]=i.custom[t]&&i.custom[t].thisIsMyHeight||n[t].offsetHeight,i.custom[t]={marginWidth:r,marginHeight:a,exactHeight:s}}function c(e,i,u,c,l){var h=e+"img",d=e+"link",g=c.dataItem,p=c.propertiesItem,m=a(p&&p.displayMode||"fill"),f=o.imageUtils.getContainerSize(s(e,u,m),{width:g.width,height:g.height},m),y=r.layout.isVerticallyStretched(c.layout),w={width:r.layout.isHorizontallyStretched(c.layout)?"":f.width+u.custom[e].marginWidth,height:y?"":f.height+u.custom[e].marginHeight},v=t.assign({},t.pick(g,["width","height","uri","quality"]),{displayMode:m,crop:t.get(p,"overrideCrop")||g.crop});n.patchNodeImage(h,i,u,l,v,f),i.css(e,w),i.css(d,f)}var l={fitWidthStrict:o.imageUtils.fittingTypes.LEGACY_FIT_WIDTH,fitHeightStrict:o.imageUtils.fittingTypes.LEGACY_FIT_HEIGHT},h={pathArray:["img"],type:"core.components.Image"};i.registerRequestToMeasureDom("wysiwyg.viewer.components.WPhoto"),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.WPhoto",[h,["link"]]),i.registerSAFEPatcher("wysiwyg.viewer.components.WPhoto",c),i.registerCustomMeasure("wysiwyg.viewer.components.WPhoto",u),i.registerRequestToMeasureDom("wysiwyg.viewer.components.ClipArt"),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.ClipArt",[h,["link"]]),i.registerSAFEPatcher("wysiwyg.viewer.components.ClipArt",c),i.registerCustomMeasure("wysiwyg.viewer.components.ClipArt",u)}),define("layout/specificComponents/documentMediaLayout",["zepto","lodash","layout/util/layout","coreUtils","layout/specificComponents/imageLayout"],function(e,t,i,n,o){function r(e,i,r,a,s){var u=t.defaults({displayMode:n.imageUtils.fittingTypes.LEGACY_FULL},a.dataItem);o.patchNodeImage(e+"img",i,r,s,u,r.custom[e].containerSize),i.css(e,{width:r.width[e]})}function a(t,i,n){var o=e(n[t]),r=t+"label",a=i.width[r],s=i.height[r],u=Math.max(i.width[t],a),c=o.data("content-padding-left"),l=o.data("content-padding-right"),h=o.data("content-padding-top"),d=o.data("content-image-height"),g={width:u-c-l,height:Math.max(d-h-s,1)};i.custom[t]={containerSize:g},i.width[t]=u,i.minWidth[t]=a}i.registerRequestToMeasureChildren("wysiwyg.viewer.components.documentmedia.DocumentMedia",[["label"],{pathArray:["img"],type:"core.components.Image"},["link"]]),i.registerCustomMeasure("wysiwyg.viewer.components.documentmedia.DocumentMedia",a),i.registerSAFEPatcher("wysiwyg.viewer.components.documentmedia.DocumentMedia",r)}),define("layout/util/calculateScreenWidthDimensions",["siteUtils","layout/util/rootLayoutUtils"],function(e,t){var i=e.layout.stretchInCenteredContainer;return function(e,n,o){var r=Math.max(e.width.screen,t.getRootWidth(n,e,o));return i(t.getRootWidth(n,e,o),r)}}),define("layout/specificComponents/bgImageLayout",["zepto","lodash","layout/util/layout","coreUtils","imageClientApi","layout/util/optimizedCssImageLayout","layout/specificComponents/imageLayout"],function(e,t,i,n,o,r,a){function s(e){return!e||n.urlUtils.isExternalUrl(e)}function u(e,i,n,r,a,s){var u=a.mobile.getDevicePixelRatio(),c={width:r.width,height:r.height,alignment:i,htmlTag:s||"bg",pixelAspectRatio:u},l={id:n.uri,width:n.width,height:n.height},h=t.defaults({quality:85},n.quality||{});return o.getData(e,l,c,h,a.browser)}function c(e,t,i){var n=e+"bg";i[n]&&(t.custom[e]={},r.cacheCssImageMeasureData(t.custom[e],i[n]))}function l(t,i,n,o,s){var u=t+f.MEDIA+f.CONTENT,c=n[u].getAttribute("data-type");if(i.custom[t]=i.custom[t]||{},i.custom[t].type=c,c===f.IMAGE)a.measureNodeImage(u,i,n,o,s);else{var l=u+"image";n[l]=e(n[u]).find("#"+l)[0];var h=n[l];i.custom[u]={},r.cacheCssImageMeasureData(i.custom[u],h)}}function h(e,t,i,n,o){var r=i.width,a=n||i.height,c=p(e);if(c&&!s(c.uri))return u(e.fittingType,e.alignType,c,{width:r,height:a},o,t)}function d(e,i,n,o,s,u,c,l){var d=o.custom[e].type,m=g(s);if(d===f.IMAGE){var y={width:l.width,height:c},w=t.assign({displayMode:m.fittingType},p(m));a.patchNodeImage(i,n,o,u,w,y,m.alignType)}else{var v=i+"image",C=h(m,"bg",l,c,u),b=t.assign({height:c},C.css.container);r.patchCssImage(o.custom[i],v,n,b,C.uri,u)}}function g(e){return t.isUndefined(e.designDataItem)?e.dataItem.background:e.designDataItem.background}function p(e){var t=e.mediaRef;return t&&"WixVideo"===t.type&&(t=t.posterImageRef),t}function m(e,t,i,n,o,a){var c=i.custom[e],l=e+"bg";if(c){var h=n.dataItem;if(!h||s(h.uri))return;var d=u(n.propertiesItem.fittingType,n.propertiesItem.alignType,h,a,o);r.patchCssImage(c,l,t,d.css.container,d.uri,o)}}var f=n.balataConsts;return i.registerRequestToMeasureChildren("wysiwyg.viewer.components.background.bgImage",[["image"]]),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.BgImageStrip",[["bg"]]),{measureLegacyBgImageStrip:c,measureBgImageBalata:l,patchBgImage:d,patchLegacyBgImageStrip:m}}),define("layout/specificComponents/youtubeVideoLayout",["lodash","coreUtils","layout/specificComponents/imageLayout"],function(e,t,i){function n(e){return e.designDataItem&&e.designDataItem.background?e.designDataItem.background:e.dataItem.background}function o(e,t,n,o,r){var s=e+a.POSTER,u=n[e];n[e+"video"]=u.firstChild,t.custom[e]={},t.custom[s]={},i.measureNodeImage(s,t,n,o,r)}function r(t,o,r,a,s,u,c){var l=n(a),h=c.width,d=c.height;o.attr(t+"video",{"min-width":h,"min-height":d,width:h,height:d}),o.css(t+"video",{position:"absolute"});var g={width:h,height:u,top:0},p=l.mediaRef.posterImage||{uri:"//img.youtube.com/vi/"+l.mediaRef.videoId+"/hqdefault.jpg"},m=e.assign({displayMode:l.fittingType},p);i.patchNodeImage(t+"poster",o,r,s,m,g,l.alignType)}var a=t.balataConsts;return{patchBgVideo:r,measureBgVideo:o}}),define("layout/specificComponents/balataLayout",["lodash","coreUtils","layout/specificComponents/bgImageLayout","layout/specificComponents/html5VideoLayout","layout/specificComponents/youtubeVideoLayout"],function(e,t,i,n,o){function r(t,i,n,o,r){var a=t[o][n];return e.isNumber(a)?a:(a=i[n][r],e.isNumber(a)?a:0)}function a(t,i,n,o,a,u){var c=h(t),l=i.custom[c]={},d=c+g.MEDIA;l.hasBalata=Boolean(n[c]),l.hasMedia=Boolean(n[d]),l.hasBalata&&(l.enableVideo="true"===n[c].getAttribute("data-enable-video"),e.forEach(u,function(e,t){i[t][c]=e}),i.left[c]=r(i,n,c,"left","offsetLeft"),i.top[c]=r(i,n,c,"top","offsetTop"),s(c,i,n,o,a))}function s(e,t,r,a,s){var u=d(s).mediaRef,c=t.custom[e].enableVideo;u&&("Image"!==u.type&&c?"WixVideo"===u.type?n.measureBgVideo(e+g.MEDIA+g.CONTENT,t,r,a,s):"Video"===u.type&&"YOUTUBE"===u.videoType&&o.measureBgVideo(e+g.MEDIA+g.CONTENT,t,r,a,s):i.measureBgImageBalata(e,t,r,a,s))}function u(t,i,n,o,r,a,s){var u=h(t),d=n.custom[u];if(d.hasBalata){var m=u+g.MEDIA,f=!r.isTouchDevice(),y=p.getBgEffectName(o.behaviorsItem,f,r.isMobileView()),w=p.getHeightByEffect(y,n,a.height),v={overflow:"hidden",left:a.left,width:a.width};r.browserFlags().clipParallaxWithWebkitClipPath?v["-webkit-clip-path"]="border-box":v.clip="rect(0px,"+a.width+"px,"+a.height+"px,0px)",s&&(v=e.omit(v,["left","width"])),i.css(u,v),d.hasMedia&&(i.css(m,{width:a.width+"px",left:c(y,a,r),height:w+"px"}),l(u,i,n,o,r,w,a))}}function c(e,t,i){return p.isFullScreenByEffect(e,i.renderFlags.renderFixedPositionBackgrounds)?Math.floor(t.absoluteLeft||0):0}function l(e,t,r,a,s,u,c){var l=e+g.MEDIA+g.CONTENT,h=d(a).mediaRef,p=r.custom[e].enableVideo;h&&("Image"!==h.type&&p?"WixVideo"===h.type?n.patchBgVideo(l,t,r,a,s,u,c):"Video"===h.type&&"YOUTUBE"===h.videoType&&o.patchBgVideo(l,t,r,a,s,u,c):i.patchBgImage(e,l,t,r,a,s,u,c))}function h(e){return e+g.BALATA}function d(t){return e.get(t,["designDataItem","background"],e.get(t,["dataItem","background"]))||{}}var g=t.balataConsts,p=t.containerBackgroundUtils;return{BALATA_PATHS_TO_REQUEST_MEASURE:[[g.BALATA],[g.BALATA,g.MEDIA],[g.BALATA,g.MEDIA,g.CONTENT],[g.BALATA,g.MEDIA,g.CONTENT,g.POSTER],[g.BALATA,g.OVERLAY],[g.BALATA,g.OVERLAY,g.OVERLAY]],measure:a,patch:u}}),define("layout/specificComponents/containerAndScreenWidthLayout",["lodash","zepto","layout/util/layout","coreUtils","siteUtils","layout/util/rootLayoutUtils","layout/util/calculateScreenWidthDimensions","layout/specificComponents/bgImageLayout","layout/specificComponents/balataLayout"],function(e,t,i,n,o,r,a,s,u){function c(e,t,i){t.height[e]=i[e].offsetHeight,p(e,t,i)}function l(e){return e.isMobileView()?"mobile":"desktop"}function h(t,i){return e.get(t.dataItem,["pageBackgrounds",l(i),"ref"])}function d(i,n,r,a,s){c(i,n,r),n.shrinkableContainer[i]=!0;var u=o.layout.getPageBottomChildEnd(n,r,a,s)+n.containerHeightMargin[i],l=a.getPageMinHeight(),d=e.get(s,["propertiesItem",a.isMobileView()?"mobile":"desktop"]);if(d&&d.minHeight&&(l=d.minHeight),n.pageBottomByComponents[i]=u,n.minHeight[i]=l,n.height[i]=Math.max(l,u),n.width[i]=r[i].offsetWidth,r.POPUPS_ROOT=t("#POPUPS_ROOT"),s.dataItem.isPopup){var g={background:h(s,a)},p=e.clone(s);p.id+=R,p.designDataItem=g,n.top[i]=0,m(i,n,r,a,p)}}function g(e,t,i){var n=t.height[e+"inlineContent"]||0;t.containerHeightMargin[e]=n?i[e].offsetHeight-n:0}function p(e,t,i){t.left[e]=0,g(e,t,i)}function m(e,t,i,n,o){p(e,t,i),H(o)&&u.measure(e,t,i,n,o,{left:Math.max(0,.5*(t.clientWidth-t.width.screen)),width:t.width.screen,height:t.innerHeight.screen})}function f(e,t,i,n,o){if(p(e,t,i),H(o)){var r=a(t,n,o.rootId);t.width[e]=r.width;var s={width:r.width,left:r.left,height:t.height[e]};u.measure(e,t,i,n,o,s)}}function y(e,t,i,n,o){t.custom[e]={isFixedPosition:o.layout.fixedPosition},p(e,t,i)}function w(e,t){t.css(e,{left:0})}function v(e,t,i,n,o,r){t.css(r,{width:i.width.screen,left:E(o.getSiteWidth(),i.width.screen,o)}),w(e,t)}function C(e,t,i,n,o){v(e,t,i,n,o,e+"screenWidthBackground")}function b(e,i,n){p(e,i,n);var o=t(n[e+"navigationArrows"]);i.custom[e]={offset:parseInt(o.attr("data-navigation-button-margin"),10)}}function M(e,i,n,o,r){var a=t(n[e]),s=a.data("parent-id");i.minHeight[e]=a.data("min-height"),i.height[e]=i.height[s],f(e,i,n,o,r)}function S(e,t,i,n,o){var s=e+"inlineContent",u=s+"Parent",c=a(i,n,o.rootId);t.css(u,{left:c.left,width:c.width}),t.css(s,{left:-1*c.left,width:r.getRootWidth(n,i,o.rootId)})}function I(e,t,i,n,o){S(e,t,i,o,n)}function x(e,t,i,n,o){w(e,t,i),S(e,t,i,o,n);var r=E(n.layout.width,i.width.screen,o)+i.custom[e].offset;t.css(e,{width:o.getSiteWidth()}),t.css(e+"prevButton",{left:r}),t.css(e+"nextButton",{right:r})}function T(t,i,n,o,r){if(o.dataItem.isPopup){i.css("POPUPS_ROOT",{width:n.innerWidth.screen,height:n.innerHeight.screen});var a=t+R,s=e.defaultsDeep({id:a,rootId:"masterPage",structure:{behaviors:[]}},o),c=h(o,r);s.designDataItem={background:c},u.patch(t,i,n,s,r,{left:n.left[a],top:n.top[a],width:n.width[a],height:n.height[a]})}}function A(t,i,n,o,s,c){if(H(o)){w(t,i);var l=a(n,s,o.rootId),h=e.assign({top:0,left:l.left,width:l.width,height:n.height[t],absoluteLeft:0},c);i.css(t,{width:r.getRootWidth(s,n,o.rootId)}),u.patch(t,i,n,o,s,h)}}function L(t){return"Image"===e.get(t,["dataItem","type"])}function P(e,t,i,n,o){var r=a(t,n,o.rootId);t.width[e]=r.width,t.left[e]=r.left,L(o)&&s.measureLegacyBgImageStrip(e,t,i,n,o)}function D(e,t,i,n,o){if(t.css(e,{width:i.width[e]+"px",left:i.left[e]+"px"}),L(n)){var r={width:i.width[e],height:i.height[e]};s.patchLegacyBgImageStrip(e,t,i,n,o,r)}else{var a=e+"bg";t.css(a,{backgroundImage:"none"})}}function E(e,t,i){return i.isMobileView()||i.isMobileDevice()?0:Math.min(parseInt(Math.floor((e-t)/2),10),0)}function B(e,t,i,n){var o=n.layout&&n.layout.fixedPosition;t.css(e,{height:i.height[e],bottom:o?i.siteMarginBottom:"auto",top:o?"auto":i.top[e]})}function H(t){return e.isUndefined(t.designDataItem)?t.dataItem.background:t.designDataItem.background}var R=n.balataConsts.BALATA;return i.registerRequestToMeasureDom("mobile.core.components.Container"),i.registerRequestToMeasureDom("mobile.core.components.Page"),i.registerRequestToMeasureDom("wixapps.integration.components.AppPage"),i.registerRequestToMeasureDom("wysiwyg.viewer.components.FooterContainer"),i.registerRequestToMeasureDom("wysiwyg.viewer.components.HeaderContainer"),i.registerRequestToMeasureDom("wysiwyg.viewer.components.ScreenWidthContainer"),i.registerRequestToMeasureDom("wysiwyg.viewer.components.StripContainerSlideShow"),i.registerRequestToMeasureDom("wysiwyg.viewer.components.StripContainer"),i.registerRequestToMeasureDom("wysiwyg.viewer.components.StripColumnsContainer"),i.registerRequestToMeasureDom("wysiwyg.viewer.components.Column"),i.registerRequestToMeasureDom("wysiwyg.viewer.components.StripContainerSlideShowSlide"),i.registerMeasureChildrenFirst("mobile.core.components.Page",!0),i.registerMeasureChildrenFirst("wixapps.integration.components.AppPage",!0),i.registerRequestToMeasureChildren("mobile.core.components.Container",[["inlineContent"]]),i.registerRequestToMeasureChildren("mobile.core.components.Page",function(e,t,i,n){return n.dataItem.isPopup?[["inlineContent"]].concat(u.BALATA_PATHS_TO_REQUEST_MEASURE):[["inlineContent"]]}),i.registerRequestToMeasureChildren("wixapps.integration.components.AppPage",[["inlineContent"]]),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.FooterContainer",[["screenWidthBackground"],["inlineContent"]]),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.PagesContainer",[["screenWidthBackground"],["inlineContent"]]),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.HeaderContainer",[["screenWidthBackground"],["inlineContent"]]),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.ScreenWidthContainer",[["screenWidthBackground"],["inlineContent"]]),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.StripContainerSlideShow",[["background"],["inlineContentParent"],["inlineContent"],["shownOnAllSlides"],["navigationArrows"],["prevButton"],["nextButton"]]),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.StripContainer",[["inlineContent"]].concat(u.BALATA_PATHS_TO_REQUEST_MEASURE)),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.StripContainerSlideShowSlide",[["inlineContentParent"],["inlineContent"]].concat(u.BALATA_PATHS_TO_REQUEST_MEASURE)),i.registerCustomMeasure("mobile.core.components.Container",g),i.registerCustomMeasure("mobile.core.components.Page",d),i.registerCustomMeasure("wixapps.integration.components.AppPage",d),i.registerCustomMeasure("wysiwyg.viewer.components.FooterContainer",y),i.registerCustomMeasure("wysiwyg.viewer.components.PagesContainer",c),i.registerCustomMeasure("wysiwyg.viewer.components.HeaderContainer",y),i.registerCustomMeasure("wysiwyg.viewer.components.ScreenWidthContainer",p),i.registerCustomMeasure("wysiwyg.viewer.components.StripContainerSlideShow",b),i.registerCustomMeasure("wysiwyg.viewer.components.StripContainer",f),i.registerCustomMeasure("wysiwyg.viewer.components.StripContainerSlideShowSlide",M),i.registerCustomMeasure("wysiwyg.viewer.components.BgImageStrip",P),i.registerSAFEPatchers("wysiwyg.viewer.components.FooterContainer",[C,B]),i.registerSAFEPatcher("wysiwyg.viewer.components.HeaderContainer",C),i.registerSAFEPatcher("mobile.core.components.Page",T),i.registerSAFEPatcher("wysiwyg.viewer.components.PagesContainer",C),i.registerSAFEPatcher("wysiwyg.viewer.components.ScreenWidthContainer",C),i.registerSAFEPatcher("wysiwyg.viewer.components.StripContainerSlideShow",x),i.registerSAFEPatcher("wysiwyg.viewer.components.StripContainer",A),i.registerSAFEPatchers("wysiwyg.viewer.components.StripContainerSlideShowSlide",[I,A]),i.registerSAFEPatcher("wysiwyg.viewer.components.BgImageStrip",D),{measureContainer:g,measureStripContainer:f,patchStripContainer:A}}),define("layout/specificComponents/groupLayout",["lodash","layout/util/layout","coreUtils"],function(e,t,i){function n(t,n,r,a,s){var u=i.dataUtils.getChildrenData(s.structure,a.isMobileView()),c=o(u,n);n.left[t]=s.layout.x,u.length>0&&(n.width[t]=c.right-c.left,n.height[t]=c.bottom-c.top,n.top[t]=s.layout.y+c.top,n.left[t]=s.layout.x+c.left,e.forEach(u,function(e){n.top[e.id]=e.layout.y-c.top,n.left[e.id]=e.layout.x-c.left}))}function o(t,n){var o,r,a,s;return o=a=Number.MAX_VALUE,r=s=-Number.MAX_VALUE,e.forEach(t,function(e){var t=e.layout,u=n.left&&n.left[e.id]?n.left[e.id]:t.x,c=n.width&&n.width[e.id]?n.width[e.id]:t.width,l=n.top&&n.top[e.id]?n.top[e.id]:t.y,h=n.height&&n.height[e.id]?n.height[e.id]:t.height,d=i.boundingLayout.getBoundingLayout({x:u,y:l,width:c,height:h,rotationInDegrees:t.rotationInDegrees});o=Math.min(o,d.x),r=Math.max(r,d.x+d.width),a=Math.min(a,d.y),s=Math.max(s,d.y+d.height)}),{left:o,right:r,top:a,bottom:s}}function r(t,n,o,r,a){n.css(t,{width:o.width[t],height:o.height[t],top:o.top[t],left:o.left[t]});var s=i.dataUtils.getChildrenData(r.structure,a.isMobileView());e.forEach(s,function(e){n.css(e.id,{top:o.top[e.id],left:o.left[e.id]})})}t.registerMeasureChildrenFirst("wysiwyg.viewer.components.Group",!0),t.registerRequestToMeasureDom("wysiwyg.viewer.components.Group"),t.registerCustomMeasure("wysiwyg.viewer.components.Group",n),t.registerSAFEPatcher("wysiwyg.viewer.components.Group",r)}),define("layout/wixappsLayout/proxyLayoutRegistrar",[],function(){var e={};return{registerCustomMeasure:function(t,i){e[t]=i},getProxiesToMeasure:function(){return e}}}),define("layout/specificComponents/wixappsLayout",["zepto","lodash","coreUtils","layout/wixappsLayout/proxyLayoutRegistrar","layout/util/layout","layout/util/singleCompLayout","experiment"],function(e,t,i,n,o,r){function a(){var i=t.toArray(arguments),n=i.join(""),o=i.slice(1).join("");return e("#"+n)[0]||e("#"+o)[0]}function s(e,t,i){return i.custom[e]&&i.custom[e].appPartShouldRenderAgain}function u(e,t,i,n){r.measureComponentChildren(e,a,n,i,t)}function c(e,t,i,n){var o=e.compId,s=a(o);t[o]=s;var c=e.structureInfo;c.id=o,c.type=e.compType,u(c,n,t,i),r.maps.classBasedCustomMeasures[e.compType]&&r.maps.classBasedCustomMeasures[e.compType](o,i,t,n,e.structureInfo)}function l(e,n,o){var r=e+m,a=t.get(o,[e,"attributes","data-state","value"]);i.stringUtils.isTrue(o[e].getAttribute("data-dynamic-height"))&&"loading"!==a&&(n.height[e]=n.height[r],n.minHeight[e]=n.height[r])}function h(e,i,o,r,a){var s=e.id,u=s+m,l=i.querySelector("#"+u);o.custom[s]=o.custom[s]||{};var h=!1;t.forEach(n.getProxiesToMeasure(),function(e,i){var n=p(i,l);o.custom[s][i]=o.custom[s][i]||[],t.forEach(n,function(t,n){var u=e(t,a,o);o.custom[s][i][n]=u,u.comp&&c(u.comp,r,o,a),u.needsRelayout&&!o.custom[s][i][n].didRelayout&&(h=!0,o.custom[s][i][n].didRelayout=!0)})});var d={};return d[e.id]=!0,{needsAdditionalInnerLayout:h,changedCompsMap:d}}function d(e,i,o,a,s){var u=e.id;i.custom[u].appPartShouldRenderAgain=t.reduce(n.getProxiesToMeasure(),function(e,n,c){var l=i.custom[u][c],h=t.reduce(l,function(e,t){g(t.domManipulations);var n=t.shouldRenderAgain,u=t.comp;return u&&(n=n||r.patchComponent(u.structureInfo,o,a,i,s)),e||n},!1);return e||h},!1)}function g(i){t.forEach(i,function(i){var n=e(i.node),o=i.funcName,r=t.isArray(i.params)?i.params:[i.params];t.isFunction(n[o])&&n[o].apply(n,r)})}function p(t,i){return e("[data-proxy-name="+t+"]",i)}var m="inlineContent";return o.registerLayoutInnerCompsFirst("wixapps.integration.components.AppPart",h,d),o.registerLayoutInnerCompsFirst("wixapps.integration.components.AppPart2",h,d),o.registerRequestToMeasureChildren("wixapps.integration.components.AppPart",[[m]]),o.registerRequestToMeasureDom("wixapps.integration.components.AppPart"),o.registerCustomMeasure("wixapps.integration.components.AppPart",l),o.registerSAFEPatcher("wixapps.integration.components.AppPart",s),o.registerRequestToMeasureChildren("wixapps.integration.components.AppPart2",[[m]]),o.registerRequestToMeasureDom("wixapps.integration.components.AppPart2"),o.registerCustomMeasure("wixapps.integration.components.AppPart2",l),o.registerSAFEPatcher("wixapps.integration.components.AppPart2",s),{appPartMeasureFunction:l,appPartPatcherFunction:s,inlineContentId:m,preMeasureProxies:h,postPatchProxies:d}}),define("layout/specificComponents/svgShape/svgScalerUtils",[],function(){return{trim:function(e){return e.replace(/^\s+|\s+$/g,"")},round:function(e){return Math.round(1e6*e)/1e6}}}),define("layout/specificComponents/svgShape/svgPathParser",["lodash","layout/specificComponents/svgShape/svgScalerUtils"],function(e,t){return{getParsedPath:function(i){var n=t.trim(i);return""===n?[]:n.match(/[a-z][^a-z]*/gi).map(function(i){for(i=i.replace(/-/g," -").replace(/,/g," ").replace(/(-?\d*[\.\-]\d+)/g,function(e,t){return" "+t});e.includes(i,"  ");)i=i.replace(/ {2}/g," ");return[i.substring(0,1),t.trim(i.substring(1))]}).map(function(t){var i,n=[];return e.includes("QSCL",t[0].toUpperCase())&&1===t[1].split(",").length?(i=t[1].split(" ")).length%2!=0?t:(i.forEach(function(e,t,i){t%2==0&&n.push(e+" "+i[t+1])}),[t[0],n.join(",")]):t})},stringifyParsedPath:function(e){var t="";return e.forEach(function(e){e.forEach(function(e){t+=e})}),t}}}),define("layout/specificComponents/svgShape/svgBasicScaler",["layout/specificComponents/svgShape/svgScalerUtils"],function(e){var t=function(t,i){return e.round(parseFloat(t)*i)},i=function(e,i,n){var o=e.split(/[\s,]+/);return t(o[0],i)+" "+t(o[1],n)};return{scaleSingleValue:t,scalePairString:i,scaleMultiplePairStrings:function(t,n,o){return""===t?"":t.split(",").map(function(t){return i(e.trim(t),n,o)}).join(",")},scaleMultipleSingleStrings:function(i,n){return""===i?"":i.split(/[\s,]+/).map(function(i){return t(e.trim(i),n)}).join(",")}}}),define("layout/specificComponents/svgShape/svgPathScaler",["lodash","layout/specificComponents/svgShape/svgPathParser","layout/specificComponents/svgShape/svgBasicScaler","loggingUtils"],function(e,t,i,n){var o=function(){return""},r=function(e,t,n){return i.scaleSingleValue(e,n/(360*t))},a=function(e,t,o){return 7!==e.length?(n.log.verbose("incorrect arc string, should have exactly 7 parameters. (value was "+e.join(" ")),e.join(" ")):(e[0]=i.scaleSingleValue(e[0],t),e[1]=i.scaleSingleValue(e[1],o),e[2]=r(e[2],t,o),e[5]=i.scaleSingleValue(e[5],t),e[6]=i.scaleSingleValue(e[6],o),e.join(" "))},s=function(t,i,n){var o=t.split(/[\s,]+/),r=e.chunk(o,7),s=[];return e.forEach(r,function(e){s.push(a(e,i,n))}),s.join(" ")},u=function(i,n,o){var r=t.getParsedPath(i.getAttribute("d"));e.forEach(r,function(e){var t=[e[1]],i=e[0].toUpperCase();"V"===i?t.push(o):"H"===i?t.push(n):(t.push(n),t.push(o)),e[1]=c[e[0].toUpperCase()].apply(null,t)}),i.setAttribute("d",t.stringifyParsedPath(r))},c={M:i.scaleMultiplePairStrings,L:i.scaleMultiplePairStrings,H:i.scaleMultipleSingleStrings,V:i.scaleMultipleSingleStrings,Z:o,C:i.scaleMultiplePairStrings,S:i.scaleMultiplePairStrings,Q:i.scaleMultiplePairStrings,T:i.scaleMultiplePairStrings,A:s};return{scale:u}}),define("layout/specificComponents/svgShape/svgPolygonParser",["layout/specificComponents/svgShape/svgScalerUtils"],function(e){return{getParsedPoints:function(t){var i,n=e.trim(t),o=n.split(/[\s,]+/),r=[];if(""===n)return[];for(i=0;i<o.length;i+=2)r.push([o[i],o[i+1]]);return r},stringifyPoints:function(t){var i="";return t.forEach(function(e){i+=e.join(",")+" "}),e.trim(i)}}}),define("layout/specificComponents/svgShape/svgPolygonScaler",["lodash","layout/specificComponents/svgShape/svgBasicScaler","layout/specificComponents/svgShape/svgPolygonParser"],function(e,t,i){return{scale:function(n,o,r){var a=i.getParsedPoints(n.getAttribute("points"));e.forEach(a,function(e){e[0]=t.scaleSingleValue(e[0],o),e[1]=t.scaleSingleValue(e[1],r)}),n.setAttribute("points",i.stringifyPoints(a))}}}),define("layout/specificComponents/svgShape/svgCircleScaler",["layout/specificComponents/svgShape/svgBasicScaler"],function(e){return{scale:function(t,i,n){var o=t.getAttribute("cx"),r=t.getAttribute("cy"),a=t.getAttribute("r"),s=Math.min(i,n);o&&r&&(t.setAttribute("cx",e.scaleSingleValue(o,s)),t.setAttribute("cy",e.scaleSingleValue(r,s)),t.setAttribute("r",e.scaleSingleValue(a,s)))}}}),define("layout/specificComponents/svgShape/svgRectScaler",["layout/specificComponents/svgShape/svgBasicScaler"],function(e){var t=function(t,i,n,o){n&&t.setAttribute(i,e.scaleSingleValue(n,o))};return{scale:function(e,i,n){var o=e.getAttribute("width"),r=e.getAttribute("height"),a=e.getAttribute("rx"),s=e.getAttribute("ry"),u=e.getAttribute("x"),c=e.getAttribute("y");t(e,"width",o,i),t(e,"height",r,n),t(e,"rx",a,i),t(e,"ry",s,n),t(e,"x",u,i),t(e,"y",c,n)}}}),define("layout/specificComponents/svgShape/svgEllipseScaler",["layout/specificComponents/svgShape/svgBasicScaler"],function(e){return{scale:function(t,i,n){var o=t.getAttribute("cx"),r=t.getAttribute("cy"),a=t.getAttribute("rx"),s=t.getAttribute("ry");o&&a&&(t.setAttribute("cx",e.scaleSingleValue(o,i)),t.setAttribute("rx",e.scaleSingleValue(a,i))),r&&s&&(t.setAttribute("cy",e.scaleSingleValue(r,n)),t.setAttribute("ry",e.scaleSingleValue(s,n)))}}}),define("layout/specificComponents/svgShape/svgPolylineParser",["lodash","layout/specificComponents/svgShape/svgScalerUtils"],function(e,t){return{getParsedPoints:function(e){var i,n=t.trim(e),o=n.split(/[\s,]+/),r=[];if(""===n)return[];for(i=0;i<o.length;i+=2)r.push([o[i],o[i+1]]);return r},stringifyPoints:function(e){var i="";return e.forEach(function(e){i+=e.join(",")+" "}),t.trim(i)}}}),define("layout/specificComponents/svgShape/svgPolylineScaler",["lodash","layout/specificComponents/svgShape/svgBasicScaler","layout/specificComponents/svgShape/svgPolylineParser"],function(e,t,i){return{scale:function(n,o,r){var a=i.getParsedPoints(n.getAttribute("points"));a=e.map(a,function(i){return e.map(i,function(e,i){return t.scaleSingleValue(e,i?r:o)})}),n.setAttribute("points",i.stringifyPoints(a))}}}),define("layout/specificComponents/svgShape/svgLineScaler",["layout/specificComponents/svgShape/svgBasicScaler"],function(e){return{scale:function(t,i,n){var o=t.getAttribute("x1"),r=t.getAttribute("y1"),a=t.getAttribute("x2"),s=t.getAttribute("y2");o&&r&&a&&s&&(t.setAttribute("x1",e.scaleSingleValue(o,i)),t.setAttribute("x2",e.scaleSingleValue(a,i)),t.setAttribute("y1",e.scaleSingleValue(r,n)),t.setAttribute("y2",e.scaleSingleValue(s,n)))}}}),define("layout/specificComponents/svgShape/svgScaler",["lodash","layout/specificComponents/svgShape/svgScalerUtils","layout/specificComponents/svgShape/svgPathScaler","layout/specificComponents/svgShape/svgPolygonScaler","layout/specificComponents/svgShape/svgCircleScaler","layout/specificComponents/svgShape/svgRectScaler","layout/specificComponents/svgShape/svgEllipseScaler","layout/specificComponents/svgShape/svgPolylineScaler","layout/specificComponents/svgShape/svgLineScaler"],function(e,t,i,n,o,r,a,s,u){var c=function(t){return e.includes(["path","polygon","rect","circle","ellipse","polyline","line"],t.toLowerCase())},l=function(e,i,n,o){var r,a,s=i.width/i.height,u=s>o,c=s<o;return r=e.width?n&&u?i.height*o/e.width:i.width/e.width:1,a=e.height?n&&c?i.width/o/e.height:i.height/e.height:1,{scaleX:t.round(r),scaleY:t.round(a)}},h=function(e,t,i){return Math.abs(e.width-t.width)<i&&Math.abs(e.height-t.height)<i},d=function(e,t,i){e.setAttribute("transform","translate("+parseFloat(-1*i.x+.5*t)+","+parseFloat(-1*i.y+.5*t)+")")},g=function(e){var t=e.getAttribute("data-original-aspect-ratio");return t?Number(t):null},p=function(e,t){e.hasAttribute("data-original-aspect-ratio")||(e.setAttribute("data-original-aspect-ratio",t),e.setAttribute("viewBox",""),e.removeAttribute("viewBox"))};return{scale:function(t,m,f,y,w){var v=t.getElementsByTagName("g")[0],C=e.pick(f,["width","height"]),b=C.width/C.height,M=e.pick(f,["x","y"]),S={path:i,polygon:n,rect:r,circle:o,ellipse:a,polyline:s,line:u};if(v){var I=g(t);if(I||(I=f.width/f.height,p(t,I)),!h(m,C,1)||w&&b!==I){var x=l(C,m,w,I);e(v.childNodes).filter(function(e){return c(e.nodeName)}).forEach(function(e){var t=e.nodeName.toLowerCase();S[t].scale(e,x.scaleX,x.scaleY)}),d(v,y,{x:M.x*x.scaleX,y:M.y*x.scaleY}),t.style.width=Math.ceil(C.width*x.scaleX+y)+"px",t.style.height=Math.ceil(C.height*x.scaleY+y)+"px"}}}}}),define("layout/specificComponents/shapeLayout",["lodash","zepto","siteUtils","layout/util/layout","layout/specificComponents/svgShape/svgScaler"],function(e,t,i,n,o){function r(t,i,n){n.shapesBoundaries=n.shapesBoundaries||{};var o;n.shapesBoundaries[i]||(o=e.pick(t.getBBox(),["x","y","width","height"]),e.some(o)&&(n.shapesBoundaries[i]={boxBoundaries:o}))}function a(e,t,i){var n=i.width/i.height;e.shapesOriginalAspectRatio=e.shapesOriginalAspectRatio||{},e.shapesOriginalAspectRatio[t]=e.shapesOriginalAspectRatio[t]||n}function s(e,t,n,o){var r,a=t,s=o?"xMidYMid meet":"none",l=n,h=i.svgFeatureDetection.flags().isVectorEffect;return t?h?r=c(e,t,n,o):(r=c(e,t,n,o),a=u(e,t,n)):r=e,{viewBox:g(r),strokeWidth:a,size:l,preserveAspectRatio:s}}function u(e,t,i){return t*(1/Math.min((i.width-t)/e.width,(i.height-t)/e.height))}function c(e,t,i,n){var o,r,a,s;return n?o=r=Math.min((i.width-t)/e.width,(i.height-t)/e.height):(o=(i.width-t)/e.width,r=(i.height-t)/e.height),a=i.width/o,s=i.height/r,{width:a,height:s,x:e.x-(a-e.width)/2,y:e.y-(s-e.height)/2}}function l(e,t){var n=i.svgFeatureDetection.flags().isVectorEffect;return e>0&&!1===t&&!n}function h(t,i,n,o,s){var u=e.get(s,["styleItem","skin"]),c=n[t]&&n[t].getElementsByTagName("svg")[0];if(u&&c){n[t+"svg"]=c;var h=e.get(s,["propertiesItem","maintainAspectRatio"]);if(l(parseInt(e.get(s,["styleItem","style","properties","strokewidth"],1),10),h)){i.custom[t]={};var d=n[t+"svg-g"]=c.getElementsByTagName("g")[0];i.custom[t].boundingBox=d?d.getBBox():{},a(o,u,i.custom[t].boundingBox)}else r(c,u,o)}}function d(i,n,r,a,u){var c=n[i+"svg"],h=a.styleItem;if(c&&h){var d,g=a.propertiesItem,p=g&&g.maintainAspectRatio,m=parseInt(e.get(h,["style","properties","strokewidth"],1),10);if(l(m,p))d={width:r.width[i]-m,height:r.height[i]-m},o.scale(c,d,r.custom[i].boundingBox,m,p);else{var f=e.get(u,["shapesBoundaries",h.skin]);if(!f)return;d={width:r.width[i],height:r.height[i]};var y=s(f.boxBoundaries,m,d,p);t(c).css(e.pick(y,["strokeWidth","size"])),t(c).attr(e.pick(y,["preserveAspectRatio","viewBox"]))}}}var g=e.template("${x} ${y} ${width} ${height}");return n.registerCustomMeasure("wysiwyg.viewer.components.svgshape.SvgShape",h),n.registerPatcher("wysiwyg.viewer.components.svgshape.SvgShape",d),n.registerCustomMeasure("wysiwyg.viewer.components.VectorImage",h),n.registerPatcher("wysiwyg.viewer.components.VectorImage",d),n.registerCustomMeasure("wysiwyg.viewer.components.PopupCloseIconButton",h),n.registerPatcher("wysiwyg.viewer.components.PopupCloseIconButton",d),{}}),define("layout/specificComponents/richtextLayout",["lodash","layout/util/layout","experiment"],function(e,t,i){function n(e,t){t.css(e,{height:""})}var o="wysiwyg.viewer.components.WRichText";return t.registerSAFEPatcher(o,n),t.registerCustomMeasure(o,function(t,n,o,r,a){var s=o[t],u=e.get(a,"propertiesItem.minHeight"),c=e.get(a,"propertiesItem.packed",!1),l=s.offsetHeight,h=r.isMobileView(),d=i.isOpen("sv_unpackTextMeasureByMinHeight"),g=d&&!h?Math.max(u||0,l):l;n.minHeight[t]=g,d&&(c=c||!e.isUndefined(u)),c&&(n.height[t]=g)}),t.registerRequestToMeasureDom(o),{}}),define("layout/specificComponents/matrixGalleryLayout",["layout/util/layout","zepto","lodash","coreUtils","layout/specificComponents/imageLayout"],function(e,t,i,n,o){function r(e,t,i,n,o){return d.getSizeAfterScaling({itemHeight:t,itemWidth:i,displayerData:e,imageMode:n.imageMode,heightDiff:parseInt(o.data("height-diff"),10)||0,widthDiff:parseInt(o.data("width-diff"),10)||0,bottomGap:parseInt(o.data("bottom-gap"),10)||0})}function a(e,o,a,s,u,c,d){var g=t(c),p=g.data("image-index"),m=i.defaults({displayMode:n.imageUtils.fittingTypes.SCALE_TO_FILL},u[p]),f=r(m,a,o,s,g),y=h.getContainerSize(f.imageWrapperSize,g),w=l.getItemPosition(d,o,a,s.margin,s.numCols);return{id:c.id,imageData:m,imageNodeId:c.id+"image",imageWrapperId:c.id+"imageWrapper",containerSize:y,sizeAfterScaling:f,position:w}}function s(e,n,o,r,s){h.measureFlexibleHeightGallery(e,n,o);var u=t(o[e]),c=o[e+"itemsContainer"],d=t(c).children(),m=s.dataItem.items;n.width[e]=Math.max(p,n.width[e]),n.height[e]=Math.max(g,n.height[e]);var f=parseInt(u.data("height-diff"),10)||0,y=parseInt(u.data("width-diff"),10)||0,w=parseInt(u.data("presented-row"),10)||0,v=s.propertiesItem,C=l.getItemWidth(v.margin,v.numCols,n.width[e],y),b=l.getItemHeight(v.margin,n.height[e],w,f);n.custom[e]={displayers:i.map(d,i.partial(a,e,C,b,s.propertiesItem,m))}}function u(e,t,n,r,a){var s=n.height[e],u=n.width[e],c=n.custom[e];t.css(e+"itemsContainer",{height:s,width:u}),t.css(e,{height:s,width:u}),i.forEach(c.displayers,function(e){var i=e.sizeAfterScaling;t.css(e.id,{height:i.displayerSize.height,width:i.displayerSize.width,left:e.position.left,top:e.position.top}),h.updateImageWrapperSizes(t,e.imageWrapperId,i),o.patchNodeImage(e.imageNodeId,t,n,a,e.imageData,e.containerSize)})}function c(e,t,n,o){var r=[["itemsContainer"]];return i.forEach(o.dataItem.items,function(e){var t={pathArray:[e.id,"image"],type:"core.components.Image"},i=[e.id,"imageWrapper"],n=[e.id];r.push(t,i,n)}),r}var l=n.matrix.calculations,h=n.galleriesCommonLayout,d=n.matrix.scalingCalculations,g=70,p=45;return e.registerRequestToMeasureDom("wysiwyg.viewer.components.MatrixGallery"),e.registerCustomMeasure("wysiwyg.viewer.components.MatrixGallery",s),e.registerRequestToMeasureChildren("wysiwyg.viewer.components.MatrixGallery",c),e.registerSAFEPatcher("wysiwyg.viewer.components.MatrixGallery",u),{}}),define("layout/specificComponents/slideShowLayout",["layout/util/layout","zepto","coreUtils","lodash","layout/specificComponents/imageLayout"],function(e,t,i,n,o){function r(e,i,n,o,r){var a=t(r);return l.getSizeAfterScaling({itemHeight:i,itemWidth:n,displayerData:e,imageMode:o.imageMode,heightDiff:parseInt(a.data("height-diff"),10)||0,widthDiff:parseInt(a.data("width-diff"),10)||0,bottomGap:parseInt(a.data("bottom-gap"),10)||0})}function a(e,i,o,a,s,u){var c=t(u),l=c.data("image-index"),g=n.defaults({displayMode:d.fittingTypes.SCALE_TO_FILL},s[l]),p=r(g,i,o,a,c),m=h.getContainerSize(p.imageWrapperSize,c);return{id:u.id,imageData:g,imageNodeId:u.id+"image",imageWrapperId:u.id+"imageWrapper",containerSize:m,sizeAfterScaling:p}}function s(e,i,o,r,s){h.measureFlexibleHeightGallery(e,i,o);var u=o[e+"itemsContainer"],c=t(u).children(),l=t(o[e]),d=i.height[e]-parseInt(l.data("height-diff"),10)||0,g=i.width[e]-parseInt(l.data("height-diff"),10)||0,p=s.dataItem.items;i.custom[e]={displayers:n.map(c,n.partial(a,e,d,g,s.propertiesItem,p))}}function u(e,t,i,r,a){var s=r.propertiesItem,u=i.height[e],c=i.width[e],l=a.isMobileDevice()||a.isMobileView(),d=i.custom[e].displayers;if(!n.isEmpty(d)){if("flexibleHeight"===s.imageMode){var g=n.last(d);u=g.sizeAfterScaling.displayerSize.height}t.css(e,{height:u,width:c}),n.forEach(d,function(e){t.css(e.id,{height:u,width:c}),h.updateImageWrapperSizes(t,e.imageWrapperId,e.sizeAfterScaling),o.patchNodeImage(e.imageNodeId,t,i,a,e.imageData,e.containerSize,l)})}}function c(e,t,i,o){var r=[["itemsContainer"]];return n.forEach(o.dataItem.items,function(e){var t={pathArray:[e.id,"image"],type:"core.components.Image"},i=[e.id,"imageWrapper"],n=[e.id];r.push(t,i,n)}),r}var l=i.matrix.scalingCalculations,h=i.galleriesCommonLayout,d=i.imageUtils;return e.registerRequestToMeasureDom("wysiwyg.viewer.components.SlideShowGallery"),e.registerCustomMeasure("wysiwyg.viewer.components.SlideShowGallery",s),e.registerRequestToMeasureChildren("wysiwyg.viewer.components.SlideShowGallery",c),e.registerSAFEPatcher("wysiwyg.viewer.components.SlideShowGallery",u),{}}),define("layout/specificComponents/anchorLayout",["layout/util/layout"],function(e){function t(e,t){t.css(e,{width:"0px"})}e.registerSAFEPatcher("wysiwyg.common.components.anchor.viewer.Anchor",t)}),define("layout/specificComponents/tinyMenuLayout",["zepto","layout/util/layout","coreUtils","layout/util/rootLayoutUtils","lodash"],function(e,t,i,n,o){function r(e,t,i,r,a){var c,p,m=n.getRootWidth(a,i,r.rootId),f=m-2*d,y=r.layout.fixedPosition,w=+o.get(i,["top","WIX_ADS"],0)+o.get(i,["height","WIX_ADS"],0);if(y?(p="calc(50% + "+(r.layout.x-m/2)+"px)",c=-r.layout.x+d):(p=r.layout.x+"px",c=-i.custom[e].menuContainerLeft),t.css(e,{left:p}),y&&t.css(e+u,{marginTop:w+"px"}),o.get(r,["styleItem","skin"],g)!==g){var v=i.height[e+l]-i.top[e+s];return t.css(e+s,{marginTop:w+"px",maxHeight:v+"px"}),void t.css(e+h,{height:i.height.screen+1+"px"})}var C=e+s;t.css(C,{maxHeight:(y?i.clientHeight-w:i.height.masterPage)-o.get(i,["custom",e,"menuContainerTop"],0)}),t.css(e+s,{width:f+"px",left:c+"px"})}function a(t,n,o){var r=e("#SITE_ROOT")[0],a=i.domMeasurements.getElementRect(o[t],r);if(n.custom[t]={menuContainerTop:a.bottom,menuContainerLeft:a.left-d},n.top[t+s]=i.domMeasurements.getBoundingRect(o[t+s]).top,o[t+l]&&(n.height[t+l]=i.domMeasurements.getElementRect(o[t+l]).height),n.height[t]=n.height[t+u],/_open\b/.test(o[t+u].className)){var h=i.domMeasurements.getElementRect(o[t+c],r);n.minHeight.masterPage=Math.max(n.minHeight.masterPage||0,h.bottom)}}var s="menuContainer",u="menuButton",c="menuItems",l="menuBackground",h="fullScreenOverlay",d=20,g="wysiwyg.viewer.skins.mobile.TinyMenuSkin";t.registerRequestToMeasureChildren("wysiwyg.viewer.components.mobile.TinyMenu",[[s],[u],[c],[h],[l]]),t.registerCustomMeasure("wysiwyg.viewer.components.mobile.TinyMenu",a),t.registerSAFEPatcher("wysiwyg.viewer.components.mobile.TinyMenu",r)}),define("layout/specificComponents/imageZoomLayout",["lodash","zepto","layout/util/layout","layout/specificComponents/imageLayout","coreUtils"],function(e,t,i,n,o){function r(e){return e.dataItem||e.structure.compData}function a(e,t){return e.getNonPageItemZoomData()||e.getDataByQuery(t)}function s(e){var t=e.getNonPageItemZoomData();return e.getExistingRootNavigationInfo(e.getFocusedRootId()).pageItemId||t&&t.id}function u(t,i,r,u,c){var l=s(c),h=!c.isMobileView()&&c.isMobileDevice()||c.isTabletDevice(),d=a(c,l),g=e.defaults({displayMode:o.imageUtils.fittingTypes.LEGACY_FULL},d);g.quality=e.defaults({quality:90},g.quality||{});var p=r.custom[t],m={width:p.imageContainerWidth,height:p.imageContainerHeight};if(n.patchNodeImage(t+l+"image",i,r,c,g,m),r.custom[t].hasPanel){var f=h?p.dialogBoxWidth:m.width;i.css(t+d.id+"panel",{width:f})}}function c(e,t,i,n,o){var r=i.custom[e];t.css(e+"dialogBox",{width:r.imageContainerWidth,minHeight:r.dialogBoxHeight,paddingTop:r.paddingTop}),u(e,t,i,n,o);var a=s(o);if(r.showDescription&&r.descriptionHeight>r.descriptionHeightLimit){var c=e+a+"description";t.css(c,{height:r.descriptionHeightLimit}),t.data(c,{expandable:"true"}),t.css(c,{height:r.descriptionHeightLimit}),t.css(e+a+"ellipsis",{display:""})}}function l(e,i,n,o){var r=s(o),u=a(o,r),c=!o.isMobileView()&&o.isMobileDevice()||o.isTabletDevice()?m.getNonOptimizedViewDimensions:m.getDesktopViewDimensions,l=t(n[e]),d=h(t(n[e+"dialogBox"])),g=e+r+"panel",p={width:parseInt(l.data("width-spacer"),10),height:parseInt(l.data("height-spacer"),10)},f={isMobileDevice:o.isMobileDevice(),isTabletDevice:o.isTabletDevice(),siteWidth:o.getSiteWidth()},y={width:i.width.screen,height:i.height.screen,innerHeight:i.innerHeight.screen};i.custom[e]=c(u,f,y,p,i.height[g],d),i.custom[e].hasPanel=Boolean(n[g])}function h(e){var t=d(e,"padding-bottom")+d(e,"padding-top");return{horizontal:d(e,"padding-right")+d(e,"padding-left"),vertical:t}}function d(e,t){return e&&t?parseInt(e.css(t),10)||0:0}function g(e,i){var n=t(i);if("none"!==n.css("display")){var o=parseInt(n.css("line-height"),10);e.showDescription=!0,e.descriptionHeight=n.height(),e.descriptionHeightLimit=Math.floor(3*o)}}function p(e,t,i,n,o){var r=s(n),u=a(n,r),c=m.getMobileViewDimensions(u,n,t);g(c,i[e+r+"description"]),c.isMobileZoom=o,t.custom[e]=c}var m=o.mediaZoomCalculations;i.registerCustomMeasure("wysiwyg.components.imageZoom",function(e,t,i,n,o){var a=r(o).id;(n.isMobileView()?p:l)(e+a,t,i,n)}),i.registerSAFEPatcher("wysiwyg.components.imageZoom",function(e,t,i,n,o){var a=r(n).id;(o.isMobileView()?c:u)(e+a,t,i,n,o)}),i.registerRequestToMeasureChildren("wysiwyg.components.imageZoom",function(e,t,i,n){var o=r(n).id,a=s(e),u={pathArray:[o,a,"image"],type:"core.components.Image"};return e.isMobileView()?[[o],u,[o,"dialogBox"],[o,a,"description"],[o,a,"ellipsis"]]:[[o],u,[o,"dialogBox"],[o,"buttonPrev"],[o,"buttonNext"],[o,a,"panel"]]})}),define("layout/specificComponents/tpaGalleryLayout",["zepto","lodash","layout/util/layout","layout/util/calculateScreenWidthDimensions"],function(e,t,i,n){function o(e){return function(t,i,n,o,r){e.forEach(function(e){e(t,i,n,o,r)})}}function r(e,t){t.width[e]=Math.max(10,t.width[e]),t.minHeight[e]=10}function a(e,t,i){t.css(e+"iframe",{width:i.width[e],height:i.height[e]})}function s(e,t,i,o,r){var a=n(i,o,r.rootId);t.css(e,{width:a.width+"px",left:a.left+"px"}),t.attr(e+"iframe",{style:{width:a.width+"px"}}),i.width[e]=a.width,i.left[e]=a.left}function u(e,t){t.height[e]=.33*t.width[e]}function c(e,t,i,o,r){if(r.propertiesItem.fitToScreenWidth){var a=i[e],s=n(t,o,r.rootId);a.style.width=s.width+"px",a.style.left=s.left+"px",t.width[e]=s.width,t.left[e]=s.left}}function l(e,t,i,n,o){"vertical"===o.propertiesItem.orientation&&h(e,t,i)}function h(i,n,o){n.height[i]=t.head(e(o[i]).find("iframe")).offsetHeight}function d(e,t,i,n,o){s(e,t,i,o,n)}i.registerRequestToMeasureChildren("tpa.viewer.components.StripSlideshow",[["iframe"]]),i.registerRequestToMeasureChildren("tpa.viewer.components.StripShowcase",[["iframe"]]),i.registerRequestToMeasureChildren("tpa.viewer.components.Collage",[["iframe"]]),i.registerRequestToMeasureChildren("tpa.viewer.components.Honeycomb",[["iframe"]]),i.registerRequestToMeasureChildren("tpa.viewer.components.Accordion",[["iframe"]]),i.registerRequestToMeasureChildren("tpa.viewer.components.Masonry",[["iframe"]]),i.registerRequestToMeasureChildren("tpa.viewer.components.Impress",[["iframe"]]),i.registerRequestToMeasureChildren("tpa.viewer.components.Freestyle",[["iframe"]]),i.registerRequestToMeasureChildren("tpa.viewer.components.Thumbnails",[["iframe"]]),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.tpapps.TPA3DGallery",[["iframe"]]),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.tpapps.TPA3DCarousel",[["iframe"]]),i.registerSAFEPatcher("tpa.viewer.components.StripShowcase",d),i.registerSAFEPatcher("tpa.viewer.components.StripSlideshow",d),i.registerSAFEPatcher("tpa.viewer.components.Collage",a),i.registerSAFEPatcher("tpa.viewer.components.Accordion",a),i.registerSAFEPatcher("tpa.viewer.components.Impress",a),i.registerSAFEPatcher("tpa.viewer.components.Freestyle",a),i.registerSAFEPatcher("tpa.viewer.components.Thumbnails",a),i.registerSAFEPatcher("tpa.viewer.components.Honeycomb",a),i.registerSAFEPatcher("tpa.viewer.components.Masonry",a),i.registerSAFEPatcher("wysiwyg.viewer.components.tpapps.TPA3DGallery",a),i.registerSAFEPatcher("wysiwyg.viewer.components.tpapps.TPA3DCarousel",a),i.registerCustomMeasure("tpa.viewer.components.Collage",o([h,c,r])),i.registerCustomMeasure("tpa.viewer.components.Masonry",o([h,r])),i.registerCustomMeasure("tpa.viewer.components.Honeycomb",r),i.registerCustomMeasure("tpa.viewer.components.Accordion",r),i.registerCustomMeasure("tpa.viewer.components.Impress",r),i.registerCustomMeasure("tpa.viewer.components.Freestyle",o([l,r])),i.registerCustomMeasure("tpa.viewer.components.StripShowcase",r),i.registerCustomMeasure("tpa.viewer.components.StripSlideshow",r),i.registerCustomMeasure("tpa.viewer.components.Thumbnails",r),i.registerCustomMeasure("wysiwyg.viewer.components.tpapps.TPA3DGallery",r),i.registerCustomMeasure("wysiwyg.viewer.components.tpapps.TPA3DCarousel",o([r,u]))}),define("layout/specificComponents/youTubeSubscribeButtonLayout",["layout/util/layout"],function(e){function t(e,t,n,o,r){var a=r.propertiesItem.layout,s=i[a+(o.browser.ie?"IE":"")];t.width[e]=s.width,t.height[e]=s.height}var i={default:{width:145,height:33},defaultIE:{width:145,height:33},full:{width:212,height:55},fullIE:{width:212,height:67}};return e.registerRequestToMeasureDom("wysiwyg.common.components.youtubesubscribebutton.viewer.YouTubeSubscribeButton"),e.registerCustomMeasure("wysiwyg.common.components.youtubesubscribebutton.viewer.YouTubeSubscribeButton",t),{}}),define("layout/specificComponents/wFacebookCommentLayout",["layout/util/layout","zepto"],function(e,t){function i(e,i,n){var o=t(n[e]).find("iframe")[0];o&&(i.height[e]=Math.max(i.height[e],o.offsetHeight))}e.registerCustomMeasure("wysiwyg.viewer.components.WFacebookComment",i)}),define("layout/specificComponents/facebookLikeLayout",["layout/util/layout"],function(e){function t(e){var t=e?e.layout:o.layout;t=e&&e.show_faces?t+"_showFaces":t;var i=e?e.action:o.action;return r[t][i]}function i(e,i,n,o,r){var a=t(r.propertiesItem);i.width[e]=a.w,i.height[e]=a.h}function n(e,t,i){var n=i.width[e],o=i.height[e];t.css(e+"iframe",{width:n,height:o})}var o={layout:"box_count",show_faces:"box_count",action:"like"},r={standard:{like:{w:250,h:40},recommend:{w:290,h:40}},standard_showFaces:{like:{w:250,h:85},recommend:{w:290,h:85}},button_count:{like:{w:170,h:20},recommend:{w:137,h:20}},box_count:{like:{w:106,h:65},recommend:{w:125,h:65}},box_count_showFaces:{like:{w:85,h:65},recommend:{w:125,h:65}},button_count_showFaces:{like:{w:137,h:20},recommend:{w:137,h:20}}};return e.registerRequestToMeasureChildren("wysiwyg.viewer.components.WFacebookLike",[["iframe"]]),e.registerCustomMeasure("wysiwyg.viewer.components.WFacebookLike",i),e.registerSAFEPatcher("wysiwyg.viewer.components.WFacebookLike",n),{}}),define("layout/specificComponents/formMixinLayout",["layout/util/layout"],function(e){function t(e,t){var i=t.height[e+"wrapper"];i&&(t.height[e]=i)}function i(e,i,n){t(e,i,n);i.width[e]=Math.max(i.width[e],180),i.minWidth[e]=180,i.minHeight[e]=180}function n(e,t){var i=t.height[e+"wrapper"];i&&(t.height[e]=i)}["wysiwyg.viewer.components.ContactForm","wysiwyg.viewer.components.DynamicContactForm"].forEach(function(t){e.registerCustomMeasure(t,i),e.registerRequestToMeasureChildren(t,[["wrapper"]])}),e.registerRequestToMeasureDom("wysiwyg.common.components.subscribeform.viewer.SubscribeForm"),e.registerRequestToMeasureChildren("wysiwyg.common.components.subscribeform.viewer.SubscribeForm",[["wrapper"]]),e.registerCustomMeasure("wysiwyg.common.components.subscribeform.viewer.SubscribeForm",n)}),define("layout/specificComponents/backOfficeTextLayout",["layout/util/layout"],function(e){function t(e,t,i){var n=i[e].childNodes[0];n&&(t.height[e]=Math.max(t.height[e],n.offsetHeight))}e.registerCustomMeasure("wysiwyg.common.components.backofficetext.viewer.BackOfficeText",t)}),define("layout/specificComponents/vkShareLayout",["layout/util/layout"],function(e){function t(e,t,i){var n=i[e];n&&(t.height[e]=n.offsetHeight,t.width[e]=n.offsetWidth)}e.registerCustomMeasure("wysiwyg.viewer.components.VKShareButton",t),e.registerRequestToMeasureDom("wysiwyg.viewer.components.VKShareButton")}),define("layout/specificComponents/adminLoginLayout",["zepto","layout/util/layout"],function(e,t){function i(t,i,o){var r=e(o[t+"label"]);i.width[t]=Math.max(r.offset().width,i.width[t]),i.height[t]=Math.max(n,i.height[t]),i.minWidth[t]=r.offset().width}var n=17;t.registerCustomMeasure("wysiwyg.viewer.components.AdminLoginButton",i),t.registerRequestToMeasureChildren("wysiwyg.viewer.components.AdminLoginButton",[["label"]])}),define("layout/specificComponents/homePageLoginLayout",["zepto","layout/util/layout"],function(e,t){function i(t,i,n){var o=e(n[t+"memberTitle"]),r=e(n[t+"actionTitle"]);i.width[t]=Math.max(o.offset().width,r.offset().width,i.width[t]),i.height[t]=Math.max(o.offset().height+r.offset().height,i.height[t])}t.registerCustomMeasure("wysiwyg.viewer.components.wixhomepage.HomePageLogin",i),t.registerRequestToMeasureChildren("wysiwyg.viewer.components.wixhomepage.HomePageLogin",[["memberTitle"],["actionTitle"]])}),define("layout/specificComponents/iTunesButtonLayout",["layout/util/layout"],function(e){function t(e,t){t.minWidth[e]=110,t.width[e]=Math.min(400,t.width[e]),t.height[e]=40*t.width[e]/110}e.registerCustomMeasure("wysiwyg.viewer.components.ItunesButton",t)}),define("layout/specificComponents/paypalLayout",["layout/util/layout"],function(e){return e.registerCustomMeasure("wysiwyg.viewer.components.PayPalButton",function(e,t,i){t.height[e]=i[e+"submitImage"].offsetHeight,t.width[e]=i[e+"submitImage"].offsetWidth}),e.registerRequestToMeasureChildren("wysiwyg.viewer.components.PayPalButton",[["submitImage"]]),{}}),define("layout/specificComponents/wixSiteLayout",["zepto","layout/util/layout"],function(e,t){function i(){var t=e("<div>").css({visibility:"hidden",width:100,overflow:"scroll"}).appendTo("body"),i=e("<div>").css({width:"100%"}).appendTo(t).width();return t.remove(),100-i}function n(e){return"WixSite"===e.rendererModel.siteInfo.documentType}function o(e){return e.isTabletDevice()&&n(e)}function r(e,t){e.css("body",{width:t.width.body})}function a(e,t){c=c||i();var n=window.document.body.clientWidth,o=window.innerWidth,r=n;o>n+c&&(r=o),e.body=window.document.body,t.width.body=r}function s(e,t,i,n,a){o(a)&&r(t,i)}function u(e,t,i,n){o(n)&&a(i,t)}var c;t.registerCustomMeasure("document",u),t.registerSAFEPatcher("document",s)}),define("layout/specificComponents/buttonLayout",["zepto","lodash","layout/util/layout"],function(e,t,i){function n(e){return parseInt(e.paddingTop,10)+parseInt(e.paddingBottom,10)}function o(e){return parseInt(e.marginRight,10)+parseInt(e.marginLeft,10)}function r(t,i,r){var a=t+"label",s=e(r[t]),u=s.text(),c=s.data("should-use-flex"),l=window.getComputedStyle(r[t]),h=window.getComputedStyle(r[a]),d=l.minHeight;d&&parseInt(d,10)||(d=i.height[a]),i.minHeight[t]=parseInt(d,10),i.minWidth[t]=c?i.width[a]:i.width[a]+o(h);var g=s.data("shouldPreventWidthMeasurement");g||(i.width[t]=function(){return u!==""+s.data("prevText")}()&&function(){return i.minWidth[t]<s.data("prevMinWidth")}()&&function(){return s.data("prevWidth")===s.data("prevMinWidth")}()&&i.width[a]>0?i.minWidth[t]:Math.max(i.width[t],i.minWidth[t])),i.height[t]=Math.max(i.height[t],i.minHeight[t]),i.custom[t]={align:s.attr("data-align"),margin:parseInt(s.attr("data-margin"),10),shouldPreventWidthMeasurement:g,shouldUseFlex:c,text:u},i.custom[a]={verticalPadding:n(h)};var p=i.width[a]+i.custom[t].margin>i.width[t],m=i.custom[t].align;"center"!==m&&(c?i.custom[a].margin=p?i.width[t]-i.width[a]:i.custom[t].margin:i.custom[a]["margin-"+m]=p?i.width[t]-i.width[a]:i.custom[t].margin)}function a(e,i,n){var o;if(n.custom[e].shouldUseFlex){o={};var r=n.custom[e].align;return"center"!==r&&n.custom[i].margin&&(o["margin-"+r]=n.custom[i].margin),o}return o={"line-height":n.height[e]-n.custom[i].verticalPadding+"px"},t.reduce(["margin-left","margin-right"],function(e,o){return t.isUndefined(n.custom[i][o])||(e[o]=n.custom[i][o]),e},o)}function s(e,t,i){var n={height:i.height[e],"min-height":i.minHeight[e]};i.custom[e].shouldPreventWidthMeasurement||(n.width=i.width[e]),t.css(e,n);var o=e+"label",r=a(e,o,i);t.css(o,r),t.data(e,{prevText:i.custom[e].text,prevMinWidth:i.minWidth[e],prevWidth:i.width[e]})}i.registerRequestToMeasureChildren("wysiwyg.viewer.components.SiteButton",[["label"]]),i.registerCustomMeasure("wysiwyg.viewer.components.SiteButton",r),i.registerSAFEPatcher("wysiwyg.viewer.components.SiteButton",s),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.PopupCloseTextButton",[["label"]]),i.registerCustomMeasure("wysiwyg.viewer.components.PopupCloseTextButton",r),i.registerSAFEPatcher("wysiwyg.viewer.components.PopupCloseTextButton",s)}),define("layout/wixappsLayout/proxyLayout/util/masonryCalculations",["lodash"],function(e){return{getColumnSidePadding:function(e,t,i,n){var o="rtl"===n,r=Math.floor(i/t),a=e*r,s=(t-1-e)*r;return{right:o?a:s,left:o?s:a}},getMasonryRowsAndColumns:function(t,i){for(var n=[],o=[],r=[],a=0;a<i;a++)o.push(0),r.push(0);for(var s=0;s<t.length;s++){var u=e.indexOf(o,e.min(o));n.push({col:u,row:r[u],topOffset:o[u]}),o[u]+=t[s],r[u]++}return n}}}),define("layout/wixappsLayout/proxyLayout/paginatedColumnGalleryProxyLayout",["zepto","lodash","layout/wixappsLayout/proxyLayoutRegistrar","layout/wixappsLayout/proxyLayout/util/masonryCalculations"],function(e,t,i,n){function o(t){return{columns:parseInt(e(t).attr("data-columns"),10),direction:e(t).attr("data-direction"),horizontalGap:parseInt(e(t).attr("data-horizontal-gap"),10),verticalGap:parseInt(e(t).attr("data-vertical-gap"),10)}}function r(e){return t.map(e.childNodes,"clientHeight")}function a(e){var i=r(e),a=o(e),s=e.childNodes,u=n.getMasonryRowsAndColumns(i,a.columns),c=Math.floor(e.clientWidth/a.columns),l={domManipulations:[],needsRelayout:!0},h=l.domManipulations,d=[];t.forEach(s,function(e,t){var i=u[t],o=i.row*a.verticalGap+i.topOffset,r=n.getColumnSidePadding(i.col,a.columns,a.horizontalGap,a.direction),s=i.col*c;d.push(o);var l={position:"absolute",top:o+"px","padding-right":r.right+"px","padding-left":r.left+"px"};"rtl"===a.direction?l.right=s+"px":l.left=s+"px",h[t]={node:e,funcName:"css",params:l}});var g=t(s).map(function(e,t){return d[t]+i[t]}).max();return h.push({node:e,funcName:"css",params:{height:g+"px"}}),l}i.registerCustomMeasure("PaginatedColumnGalleryProxy",a)}),define("layout/wixappsLayout/proxyLayout/galleryProxyLayout",["zepto","lodash","layout/wixappsLayout/proxyLayoutRegistrar"],function(e,t,i){function n(e,t,i){var n=i+"itemsContainer";t.height[n]=e.offsetHeight,t.width[n]=e.offsetWidth,t.height[i]=e.offsetHeight,t.width[i]=e.offsetWidth}function o(i,o,r){var a=i.id+"itemsContainer",s=e("#"+a),u=e(i),c=Number(u.attr("data-total-columns")),l=Number(u.attr("data-total-rows")),h=Number(u.attr("data-gap")),d=u.data("autoscale"),g=Number(u.data("width")),p=Number(u.data("height")),m=[],f=s.children();if(f.length){var y=f[0],w=y.offsetWidth,v=y.offsetHeight;m=t.map(f,function(t){var i=parseInt(e(t).attr("data-index"),10),n=Math.floor(i/c)%l,o=i%c;return{node:t,funcName:"css",params:{top:n*v+n*h,left:o*w+o*h}}})}var C=!1;if(d){var b=i.parentNode;(C=p!==b.offsetHeight||g!==b.offsetWidth)&&m.push({node:i,funcName:"data",params:["width",b.offsetWidth]},{node:i,funcName:"data",params:["height",b.offsetHeight]}),n(b,r,i.id)}else n(i,r,i.id);return{domManipulations:m,shouldRenderAgain:C}}i.registerCustomMeasure("GalleryProxy",o)}),define("layout/wixappsLayout/proxyLayout/imageProxyLayout",["zepto","lodash","layout/wixappsLayout/proxyLayoutRegistrar"],function(e,t,i){function n(t,i,n){var o=e(t),r=t.firstChild.id,a={width:parseInt(o.attr("data-width"),10),height:parseInt(o.attr("data-height"),10),uri:o.attr("data-uri"),quality:i.getGlobalImageQuality()},s={displayMode:o.attr("data-display-mode")};return n.width[r]=t.offsetWidth,n.height[r]=t.offsetHeight,n.custom[r]={thisIsMyHeight:n.height[r]},{comp:{compType:"wysiwyg.viewer.components.WPhoto",compId:r,structureInfo:{dataItem:a,propertiesItem:s,layout:null,styleItem:null}},domManipulations:[]}}i.registerCustomMeasure("Image",n)}),define("layout/wixappsLayout/proxyLayout/buttonProxyLayout",["layout/wixappsLayout/proxyLayoutRegistrar"],function(e){function t(e,t,i){var n=e.id;return i.width[n]=e.offsetWidth,i.height[n]=e.offsetHeight,{comp:{compType:"wysiwyg.viewer.components.SiteButton",compId:n,structureInfo:{dataItem:null,propertiesItem:null,layout:null,styleItem:null}},domManipulations:[]}}e.registerCustomMeasure("Button",t),e.registerCustomMeasure("Button2",t)}),define("layout/wixappsLayout/proxyLayout/mediaLabelProxyLayout",["layout/wixappsLayout/proxyLayoutRegistrar"],function(e){e.registerCustomMeasure("MediaLabel",function(e,t,i){var n=e.id;return i.width[n]=e.offsetWidth,i.height[n]=e.offsetHeight,{comp:{compType:"wysiwyg.viewer.components.MediaRichText",compId:n,structureInfo:{dataItem:null,propertiesItem:null,layout:null,styleItem:null}},domManipulations:[]}})}),define("layout/wixappsLayout/proxyLayout/sliderGalleryProxyLayout",["zepto","layout/wixappsLayout/proxyLayoutRegistrar"],function(e,t){function i(t,i,n){var o=e(t),r=t.firstChild.id,a={aspectRatio:o.attr("data-aspect-ratio"),imageMode:o.attr("data-image-mode")};return n.width[r]=t.offsetWidth,n.height[r]=t.offsetHeight,{comp:{compType:"wysiwyg.viewer.components.SliderGallery",compId:r,structureInfo:{dataItem:null,propertiesItem:a,layout:null,styleItem:null}},domManipulations:[]}}t.registerCustomMeasure("SliderGallery",i)}),define("layout/specificComponents/imageButtonLayout",["lodash","layout/util/layout","layout/specificComponents/imageLayout","coreUtils"],function(e,t,i,n){function o(e,t){return{width:t.width[e],height:t.height[e]}}function r(t,o,r,a,s,u,c){var l=s.dataItem[t];if(l){var h=o+t,d=e.defaults({displayMode:n.imageUtils.fittingTypes.LEGACY_FULL},l);i.patchNodeImage(h,r,a,u,d,c)}}function a(t,i,n,a,u){var c=o(t,n);e.forEach(s,function(e){r(e,t,i,n,a,u,c)});var l=t+"link";i.css(l,{width:c.width,height:c.height})}var s=["defaultImage","hoverImage","activeImage"];t.registerRequestToMeasureDom("wysiwyg.common.components.imagebutton.viewer.ImageButton"),t.registerRequestToMeasureChildren("wysiwyg.common.components.imagebutton.viewer.ImageButton",function(){var t=e.map(s,function(e){return{pathArray:[e],type:"core.components.Image"}});return t.push(["link"]),t}()),t.registerSAFEPatcher("wysiwyg.common.components.imagebutton.viewer.ImageButton",a)}),define("layout/specificComponents/mediaRichTextLayout",["layout/util/layout","zepto","lodash"],function(e,t,i){function n(){var e=i.toArray(arguments);return window.document.getElementById(e.join(""))}e.registerRequestToMeasureDom("wysiwyg.viewer.components.MediaRichText"),e.registerCustomMeasure("wysiwyg.viewer.components.MediaRichText",function(o,r,a,s){function u(t){e.measureMediaRichTextInnerComponent(t,n,r,a,s,t.structure)}var c=t(a[o]);r.custom[o]={prevWidth:c.data("width")};var l=s.getMediaRichTextInnerComponents(o),h=i.mapValues(l,"structureInfo");i.forEach(h,u)}),e.registerSAFEPatcher("wysiwyg.viewer.components.MediaRichText",function(t,n,o,r,a){function s(t){e.patchWithoutPositioning(t,n,o,a)}var u=o.custom[t].prevWidth,c=parseInt(o.width[t],10),l=a.getMediaRichTextInnerComponents(t),h=i.mapValues(l,"structureInfo");return i.forEach(h,s),u&&parseInt(u,10)===c?(n.css(t,{height:""}),!1):(n.data(t,{width:c}),!0)})}),define("layout/specificComponents/backToTopButtonLayout",["layout/util/layout"],function(e){function t(e,t,i){t.custom[e]={siteStructureBoundingClientRect:i.masterPage.getBoundingClientRect()}}function i(e,t,i,n,o){var r=e+"bg",a=o.mobile.getMobileZoomByScreenProperties();t.css(e,{zoom:a}),t.css(r,{right:i.custom[e].siteStructureBoundingClientRect.left})}e.registerRequestToMeasureChildren("wysiwyg.common.components.backtotopbutton.viewer.BackToTopButton",[["bg"]]),e.registerCustomMeasure("wysiwyg.common.components.backtotopbutton.viewer.BackToTopButton",t),e.registerSAFEPatcher("wysiwyg.common.components.backtotopbutton.viewer.BackToTopButton",i)}),define("layout/specificComponents/appPartZoomLayout",["lodash","layout/util/layout","layout/specificComponents/wixappsLayout"],function(e,t,i){function n(e){return e.appPartName?e.id:e.dataItemRef.id}function o(e,t){return e+t.id+n(t)}function r(e,t,i){var n=e+"inlineContent",o=Math.max(i.height[e],i.height.screen);t.css(n,{height:o})}function a(e,t,i,n){var o=Math.max(n.height[t],n.height.screen);i.css(e,{height:o})}function s(t,i){var n=e.has(t,"dataItemRef")?t.dataItemRef.appInnerID:t.appInnerID;return!!i.getClientSpecMapEntry(n)}t.registerRequestToMeasureChildren("wixapps.integration.components.AppPartZoom",function(e,t,o,r){if(!s(r.dataItem,e))return null;var a=n(r.dataItem),u=r.dataItem.id;return[[u,a],[u,a,i.inlineContentId]]}),t.registerCustomMeasure("wixapps.integration.components.AppPartZoom",function(e,t,n,r,a){if(!s(a.dataItem,r))return null;var u=o(e,a.dataItem);i.appPartMeasureFunction(u,t,n,r),t.custom[e]={marginTop:Math.max((t.height.screen-t.height[u])/2,0),height:t.height[u]}}),t.registerSAFEPatcher("wixapps.integration.components.AppPartZoom",function(e,t,n,u,c){if(s(u.dataItem,c)){var l=o(e,u.dataItem);c.isMobileView()?(a(e,l,t,n),r(l,t,n)):i.appPartPatcherFunction(l,t,n,null,c)}}),t.registerLayoutInnerCompsFirst("wixapps.integration.components.AppPartZoom",function(e,t,n,r,a){if(!s(e.dataItem,a))return null;var u=o(e.id,e.dataItem),c={id:u},l=window.document.getElementById(u),h={};return h[e.id]=!0,{needsAdditionalInnerLayout:i.preMeasureProxies(c,l,n,r,a),changedCompsMap:h}},function(e,t,n,r,a){if(!s(e.dataItem,a))return null;var u={id:o(e.id,e.dataItem)};return i.postPatchProxies(u,t,n,r,a)})}),define("layout/specificComponents/facebookShareLayout",["layout/util/layout"],function(e){function t(e,t,i){var n=i[e].children[0];n&&(t.height[e]=Math.max(t.height[e],n.offsetHeight),t.width[e]=Math.max(t.width[e],n.offsetWidth))}function i(e,t,i){var n=i.width[e],o=i.height[e];t.css(e,{width:n,height:o})}e.registerCustomMeasure("wysiwyg.viewer.components.FacebookShare",t),e.registerSAFEPatcher("wysiwyg.viewer.components.FacebookShare",i),e.registerRequestToMeasureDom("wysiwyg.viewer.components.FacebookShare")}),define("layout/specificComponents/paginatedGridGalleryLayout",["layout/util/layout","zepto","lodash","coreUtils","layout/specificComponents/imageLayout"],function(e,t,i,n,o){function r(e,t,r,a,s,u,c,h,d){i.forEach(e,function(e,h){var g=l.getItemPosition(h,t,r,a.margin,a.numCols);u.css(e.imageItemId,{width:t,height:r,left:g.left,top:g.top});var p=i.assign({},d.dataItem.items[e.imageIndex],{displayMode:n.imageUtils.fittingTypes.SCALE_TO_FILL});o.patchNodeImage(e.imageItemId,u,c,s,p,{width:t,height:r})})}function a(e,t,n,o){var r=[["itemsContainer"]];return i.forEach(o.dataItem.items,function(e){r.push({pathArray:[e.id],type:"core.components.Image"})}),r}function s(e){return i.map(e,function(e){return{imageItemId:e.id,imageIndex:t(e).data("image-index")}})}function u(e,i,n){var o=i.custom[e]={},r=t(n[e]);o.heightDiff=parseInt(r.data("height-diff"),10),o.widthDiff=parseInt(r.data("width-diff"),10);var a=t(n[e+"itemsContainer"]);o.nextItemsData=s(a.children('div[data-page-desc="next"]')),o.prevItemsData=s(a.children('div[data-page-desc="prev"]')),o.currItemsData=s(a.children('div[data-page-desc="curr"]'))}function c(e,t,i,n,o){var a=i.height[e],s=i.width[e],u=i.custom[e],c=n.propertiesItem;t.css(e+"itemsContainer",{width:s-u.widthDiff,height:a-u.heightDiff});var h=l.getItemWidth(c.margin,c.numCols,s,u.widthDiff),d=l.getAvailableRowsNumber(c.maxRows,c.numCols,n.dataItem.items.length),g=l.getItemHeight(c.margin,a,d,u.heightDiff);r(u.nextItemsData,h,g,c,o,t,i,e,n),r(u.prevItemsData,h,g,c,o,t,i,e,n),r(u.currItemsData,h,g,c,o,t,i,e,n)}var l=n.matrix.calculations;return e.registerSAFEPatcher("wysiwyg.viewer.components.PaginatedGridGallery",c),e.registerRequestToMeasureChildren("wysiwyg.viewer.components.PaginatedGridGallery",a),e.registerCustomMeasure("wysiwyg.viewer.components.PaginatedGridGallery",u),{}}),define("layout/specificComponents/PinterestFollowLayout",["layout/util/layout"],function(e){return e.registerCustomMeasure("wysiwyg.viewer.components.PinterestFollow",function(e,t,i){t.height[e]=i[e+"followButtonTag"].offsetHeight,t.width[e]=i[e+"followButtonTag"].offsetWidth}),e.registerRequestToMeasureChildren("wysiwyg.viewer.components.PinterestFollow",[["followButtonTag"]]),{}}),define("layout/specificComponents/videoLayout",["layout/util/layout"],function(e){function t(e,t,o,r,a){var s=i[a.dataItem.videoType]||n;t.minWidth[e]=s.WIDTH,t.minHeight[e]=s.HEIGHT,t.width[e]=Math.max(t.width[e],s.WIDTH),t.height[e]=Math.max(t.height[e],s.HEIGHT),t.top[e]=a.layout.y}var i={VIMEO:{WIDTH:100,HEIGHT:100},DAILYMOTION:{WIDTH:100,HEIGHT:100},FACEBOOK:{WIDTH:100,HEIGHT:100},YOUTUBE:{WIDTH:200,HEIGHT:200}},n={WIDTH:10,HEIGHT:10};e.registerCustomMeasure("wysiwyg.viewer.components.Video",t)}),define("layout/specificComponents/soundCloudLayout",["layout/util/layout"],function(e){function t(e,t){t.minWidth[e]=250,t.minHeight[e]=50,t.width[e]=Math.max(t.width[e],250),t.height[e]=Math.max(t.height[e],50)}e.registerCustomMeasure("wysiwyg.viewer.components.SoundCloudWidget",t)}),define("layout/specificComponents/verticalLineLayout",["layout/util/layout"],function(e){e.registerCustomMeasure("wysiwyg.viewer.components.VerticalLine",function(e,t,i){t.height[e]=Math.min(t.height[e],2e3),t.width[e]=parseInt(i[e].style.width,10),t.left[e]=parseInt(i[e].style.left,10)})}),define("layout/specificComponents/boxSlideShowLayout",["zepto","coreUtils","layout/util/layout","layout/specificComponents/balataLayout"],function(e,t,i,n){function o(e,t){t.height[e]=Math.max(s,t.height[e]),t.minHeight[e]=s}function r(t,i,o,r,a){i.top[t]=0,i.left[t]=0;var s=e(o[t]),c=s.data("parent-id");if(i.minHeight[t]=s.data("min-height"),i.height[t]=i.height[c],a.designDataItem.background){var l=t+u.BALATA;i.width[l]=i.width[t],i.height[l]=i.height[t],i.left[l]=i.left[t];var h=o[t].getBoundingClientRect();i.custom[t]={absoluteLeft:h.left},n.measure(t,i,o,r,a)}}function a(e,t,i,o,r){if(o.designDataItem.background){var a={top:i.top[e],left:i.left[e],width:i.width[e],height:i.height[e],absoluteLeft:i.custom[e].absoluteLeft};n.patch(e,t,i,o,r,a)}}var s=50,u=t.balataConsts;i.registerCustomMeasure("wysiwyg.viewer.components.BoxSlideShow",o),i.registerCustomMeasure("wysiwyg.viewer.components.BoxSlideShowSlide",r),i.registerRequestToMeasureDom("wysiwyg.viewer.components.BoxSlideShow"),i.registerRequestToMeasureDom("wysiwyg.viewer.components.BoxSlideShowSlide"),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.BoxSlideShowSlide",[["inlineContentParent"],["inlineContent"]].concat(n.BALATA_PATHS_TO_REQUEST_MEASURE)),i.registerSAFEPatcher("wysiwyg.viewer.components.BoxSlideShowSlide",a)}),define("layout/specificComponents/mediaContainerLayout",["lodash","zepto","layout/util/layout","layout/specificComponents/balataLayout","experiment"],function(e,t,i,n,o){function r(i,r,a,s,c){if(c.designDataItem.background&&("wysiwyg.viewer.components.MediaPlayer"===c.type&&(r.custom[i]={alignments:{"wysiwyg.viewer.components.MediaOverlayControls":{vertical:"center",horizontal:"center",maxWidthFactor:.65,maxHeightFactor:.65},"wysiwyg.viewer.components.MediaControls":{vertical:"bottom",horizontal:"stretch",verticalMargin:2,horizontalMargin:2}}}),n.measure(i,r,a,s,c),o.isOpen("sv_cssDesignData"))){var l=i+u;a[l]=a[l]||t(a[i]).find("#"+l)[0];var h=window.getComputedStyle(a[l]),d=parseInt(h.getPropertyValue("border-left-width"),10);e.isUndefined(r.borderWidth)&&(r.borderWidth={}),r.borderWidth[i]=d,r.width[i]=c.layout.width||a[i].clientWidth||r.width[i]}}function a(e,t,i,r,a){if(r.designDataItem.background){o.isOpen("sv_cssDesignData")&&t.css(e+u,{left:-i.borderWidth[e],top:-i.borderWidth[e]});var s={top:0,left:0,width:i.width[e],height:i.height[e],absoluteLeft:i.absoluteLeft[e]};n.patch(e,t,i,r,a,s)}}var s=["wysiwyg.viewer.components.HoverBox","wysiwyg.viewer.components.MediaPlayer"],u="container";e.forEach(s,function(e){i.registerCustomMeasure(e,r),i.registerRequestToMeasureChildren(e,n.BALATA_PATHS_TO_REQUEST_MEASURE),i.registerSAFEPatcher(e,a)})}),define("layout/util/mediaLayoutUtils",["lodash"],function(e){function t(e,t,i,n){var o=i.verticalMargin||0,r=i.horizontalMargin||0;switch(i.vertical){case"top":n.top[e]=0+o;break;case"center":n.top[e]=(n.height[t]-n.height[e])/2;break;case"bottom":n.top[e]=n.height[t]-n.height[e]-o}switch(i.horizontal){case"left":n.left[e]=0+r;break;case"center":n.left[e]=(n.width[t]-n.width[e])/2;break;case"right":n.left[e]=n.width[t]-n.width[e]-r;break;case"stretch":n.left[e]=0+r,n.width[e]=n.width[t]-2*r}}function i(t,i,n){var o="data-element-query-",r={};return e.forEach(n,function(n,a){var s=e.get(i,[a,t]);s&&(r[o+a]="",e.forEach(n,function(e){e.min<s&&e.max>s&&(r[o+a]&&(r[o+a]+=" "),r[o+a]+=e.name)}))}),r}return{updateAligmentsToMeasureMap:t,getElementQueries:i}}),define("layout/specificComponents/mediaControlsLayout",["lodash","layout/util/layout","layout/util/mediaLayoutUtils","coreUtils"],function(e,t,i,n){function o(e,t,i){var n=i[e].getAttribute("data-player-id");t.custom[e]={playerId:n,audio:i[e].getAttribute("data-audio")};var o=i[e].getAttribute("data-element-queries-def");o&&(t.custom[e].elementQueriesDefinition=a.elementQueries[o])}function r(t,n,o){var r=o.custom[t].playerId,a=e.get(o,["custom",r,"alignments",s],{}),u=e.get(o,["custom",t,"audio"]);i.updateAligmentsToMeasureMap(t,r,a,o);var c={top:o.top[t],left:o.left[t],width:o.width[t]},l=e.get(o.custom,[t,"elementQueriesDefinition"],{});n.css(t,c),n.attr(t,i.getElementQueries(t,o,l)),n.attr(t,{"data-element-query-parts":u})}var a=n.mediaConsts,s="wysiwyg.viewer.components.MediaControls",u=[["controls"],["play"],["volume"],["fullscreen"],["progress"],["time"]];t.registerCustomMeasure("wysiwyg.viewer.components.MediaControls",o),t.registerRequestToMeasureChildren("wysiwyg.viewer.components.MediaControls",u),t.registerSAFEPatcher("wysiwyg.viewer.components.MediaControls",r)}),define("layout/util/svgUtils",["lodash","siteUtils"],function(e,t){function i(e){var t=e.split(" ");return{x:t[0],y:t[1],width:t[2],height:t[3]}}function n(t,i,n){n.shapesBoundaries=n.shapesBoundaries||{};var o;e.get(n.shapesBoundaries,[i,"boxBoundaries"])||(o=e.pick(t.getBBox(),["x","y","width","height"]),e.some(o)&&e.set(n.shapesBoundaries,[i,"boxBoundaries"],o))}function o(t,n,o){o.shapesBoundaries=o.shapesBoundaries||{};var r;e.get(o,["shapesBoundaries",n,"viewbox"])||(r=t.getAttribute("viewBox"))&&e.set(o.shapesBoundaries,[n,"viewbox"],i(r))}function r(e,i,n,o){var r,u=i,l=o?"xMidYMid meet":"none",h=n,d=t.svgFeatureDetection.flags().isVectorEffect;return i?d?r=s(e,i,n,o):(r=s(e,i,n,o),u=a(e,i,n)):r=e,{viewBox:c(r),strokeWidth:u,width:h.width,height:h.height,preserveAspectRatio:l}}function a(e,t,i){return t*(1/Math.min((i.width-t)/e.width,(i.height-t)/e.height))}function s(e,t,i,n){var o,r,a,s;return n?o=r=Math.min((i.width-t)/e.width,(i.height-t)/e.height):(o=(i.width-t)/e.width,r=(i.height-t)/e.height),a=i.width/o,s=i.height/r,{width:a,height:s,x:e.x-(a-e.width)/2,y:e.y-(s-e.height)/2}}function u(t){var i=e.get(t,["style","properties","strokewidth"]);return i?parseInt(i,10):0}var c=e.template("${x} ${y} ${width} ${height}");return{storeSVGMeasuresInSiteData:n,storeSVGViewboxInSiteData:o,getStrokeValue:u,getScaledViewBox:s,getScaledStroke:a,getSvgScaleProps:r}}),define("layout/specificComponents/svgPrimitiveLayout",["lodash","layout/util/svgUtils","layout/util/layout"],function(e,t,i){function n(i,n,o,a,s,u){var c=e.get(s,["shapesBoundaries",u]);if(c&&o.custom[i+r]){var l=t.getStrokeValue(a.styleItem),h={width:o.width[i],height:o.height[i]},d=t.getSvgScaleProps(c.viewbox,l,h,!0);n.css(i+r,e.pick(d,["strokeWidth"])),n.attr(i+r,e.pick(d,["preserveAspectRatio","viewBox"]))}}function o(e,i,n,o,a){var s=n[e].querySelector("svg");s&&(i.custom[e+r]={},n[e+r]=s,t.storeSVGViewboxInSiteData(s,a,o))}var r="svg";return i.registerCustomMeasure("wysiwyg.viewer.components.svgPrimitive",o),{measureNodeSvg:o,patchNodeSvg:n}}),define("layout/specificComponents/mediaOverlayControlsLayout",["lodash","layout/util/layout","layout/util/mediaLayoutUtils","layout/specificComponents/svgPrimitiveLayout"],function(e,t,i,n){function o(t,i,o,r,u){var c=o[t].getAttribute("data-player-id");o[t+a]=o[t].querySelector("#"+t+a);var l=e.get(u,["styleItem","style","properties","playButton"]);i.custom[t]={playerId:c,svgName:l},n.measureNodeSvg(t+s,i,o,r,l)}function r(t,o,r,c,l){var h=r.custom[t].playerId,d=e.get(r,["custom",h,"alignments",u],{}),g=r.width[h]*d.maxWidthFactor,p=r.height[h]*d.maxHeightFactor,m=r.width[t]/r.height[t];r.width[t]>g&&(r.width[t]=g,r.height[t]=r.width[t]*(1/m)),r.height[t]>p&&(r.height[t]=p,r.width[t]=r.height[t]*m),i.updateAligmentsToMeasureMap(t,h,d,r);var f={top:r.top[t],left:r.left[t],width:r.width[t],height:r.height[t]},y={top:-r.top[t],left:-r.left[t],width:r.width[h],height:r.height[h]};o.css(t,f),o.css(t+a,y);var w=r.custom[t].svgName;n.patchNodeSvg(t+s,o,r,c,l,w)}var a="catcher",s="indicator",u="wysiwyg.viewer.components.MediaOverlayControls",c=[{pathArray:[s]}];t.registerCustomMeasure("wysiwyg.viewer.components.MediaOverlayControls",o),t.registerRequestToMeasureChildren("wysiwyg.viewer.components.MediaOverlayControls",c),t.registerSAFEPatcher("wysiwyg.viewer.components.MediaOverlayControls",r)}),define("layout/specificComponents/verticalAnchorsMenuLayout",["zepto","lodash","layout/util/layout"],function(e,t,i){function n(i,n,o){var r=e(o[i]),a=r.find("[class*=link]"),s=r.find("[class*=label]"),u=r.find("[class*=symbol]"),c=a.length,l=u.width(),h=Math.ceil(a.height()*c),d=0;t.forEach(s,function(t){d=Math.max(d,e(t).width())});var g=d+l;n.width[i]=Math.max(n.width[i],g),n.height[i]=Math.max(n.height[i],h),n.custom[i]={minHeight:h,minWidth:g}}function o(e,t,i){t.css(e,{width:i.width[e],height:i.height[e]})}i.registerCustomMeasure("wysiwyg.common.components.verticalanchorsmenu.viewer.VerticalAnchorsMenu",n),i.registerSAFEPatcher("wysiwyg.common.components.verticalanchorsmenu.viewer.VerticalAnchorsMenu",o)}),define("layout/specificComponents/columnsLayout",["lodash","coreUtils","layout/util/layout","layout/specificComponents/balataLayout"],function(e,t,i,n){function o(t,i,n,o,r,a,s){var u=t.structure,c=u.id,l=n.height[c];a(u),n.minHeight[c]=0,n.height[c]=u.layout.height;var h=s(u);return r.isMobileView()&&(n.top[c]=o[c].offsetTop),l!==n.height[c]&&e.set(h,c,!0),{needsAdditionalInnerLayout:!1,changedCompsMap:e.mapValues(h,e.constant(!0))}}function r(i,o,r,a,s){var u=a.isMobileView(),l=t.dataUtils.getChildrenData(s.structure,u),h=e.map(l,"id");if(u){var d=2*s.propertiesItem.rowMargin+(l.length-1)*s.propertiesItem.columnsMargin;e.forEach(h,function(e,t){d+=o.height[e],o.minHeight[e]=o.height[e];var n=t===h.length-1;o.injectedAnchors[e]=n?[{fromComp:e,distance:s.propertiesItem.rowMargin,topToTop:0,originalValue:0,type:"BOTTOM_PARENT",locked:!0,targetComponent:i}]:[{fromComp:e,distance:s.propertiesItem.columnsMargin,locked:!0,originalValue:0,targetComponent:h[t+1],topToTop:0,type:"BOTTOM_TOP"}]}),o.height[i]=d,o.height[i+c.BALATA]=d}else{var g=e(o.height).pick(h).values().max();e.forEach(h,function(e){o.top[e]=s.propertiesItem.rowMargin,o.minHeight[e]=g,o.injectedAnchors[e]=[{fromComp:e,distance:0,originalValue:0,type:"BOTTOM_PARENT",locked:!0,targetComponent:i}]}),o.height[i]=g+2*s.propertiesItem.rowMargin,o.containerHeightMargin[i]=s.propertiesItem.rowMargin,o.height[i+c.BALATA]=g+2*s.propertiesItem.rowMargin}n.measure(i,o,r,a,s);var p=r[i].getBoundingClientRect(),m=r[i+c.BALATA].offsetLeft;o.custom[i]={absoluteLeft:p.left+m,backgroundLeft:r[i+c.BALATA].offsetLeft,backgroundWidth:r[i+c.BALATA].offsetWidth}}function a(e,t,i,o,r){t.css(e,{height:i.height[e],left:0});var a={top:0,left:i.custom[e].backgroundLeft,width:i.custom[e].backgroundWidth,height:i.height[e],absoluteLeft:i.custom[e].absoluteLeft};n.patch(e,t,i,o,r,a,!0)}function s(e,t,i,o,r){t.height[e+c.BALATA]=t.minHeight[e],t.height[e]=t.minHeight[e],t.width[e]=i[e].offsetWidth,n.measure(e,t,i,o,r);var a=i[e].getBoundingClientRect(),s=i[e+c.BALATA].offsetLeft;t.custom[e]={absoluteLeft:a.left+s,backgroundLeft:i[e+c.BALATA].offsetLeft,backgroundWidth:i[e+c.BALATA].offsetWidth}}function u(e,t,i,o,r){t.css(e,{height:i.height[e]});var a={top:0,left:i.custom[e].backgroundLeft,width:i.custom[e].backgroundWidth,height:i.height[e],absoluteLeft:i.custom[e].absoluteLeft};n.patch(e,t,i,o,r,a,!0)}var c=t.balataConsts;i.registerRequestToMeasureChildren("wysiwyg.viewer.components.StripColumnsContainer",n.BALATA_PATHS_TO_REQUEST_MEASURE),i.registerRequestToMeasureChildren("wysiwyg.viewer.components.Column",n.BALATA_PATHS_TO_REQUEST_MEASURE),i.registerLayoutInnerCompsFirst("wysiwyg.viewer.components.Column",o,e.noop),i.registerCustomMeasure("wysiwyg.viewer.components.StripColumnsContainer",r),i.registerSAFEPatcher("wysiwyg.viewer.components.StripColumnsContainer",a),i.registerCustomMeasure("wysiwyg.viewer.components.Column",s),i.registerSAFEPatcher("wysiwyg.viewer.components.Column",u)}),define("layout/util/popupContainerDocking",["layout/specificComponents/containerAndScreenWidthLayout","layout/specificComponents/balataLayout","siteUtils"],function(e,t,i){function n(e,t){return{top:0,left:0,width:e,height:t,absoluteLeft:0}}var o={NINE_GRID:"nineGrid",FULL_HEIGHT:"fullHeight",FULL_WIDTH:"fullWidth"};return{measure:function(n,r,a,s,u){var c=u.propertiesItem,l={};c.alignmentType!==o.FULL_WIDTH?(c.alignmentType===o.FULL_HEIGHT&&(r.minHeight[n]=r.innerHeight.screen,r.shrinkableContainer[n]=!0),l.width=r.width[n],r.left[n]=i.compAlignmentUtils.getLeft(c,r.width[n],r.width.screen,s.getSiteWidth()),t.measure(n,r,a,s,u,l)):e.measureStripContainer(n,r,a,s,u)},patch:function(r,a,s,u,c){var l,h=u.propertiesItem,d=c.getCurrentPopupId(),g=i.compAlignmentUtils.getTop(h,s.height[r],s.innerHeight.screen);s.top[r]=g,l=s.height[d]=g+s.height[r],a.css(d,{height:l}),a.css(r,{left:s.left[r],top:g,width:s.width[r],height:s.height[r]}),h.alignmentType===o.FULL_WIDTH?e.patchStripContainer(r,a,s,u,c,{width:s.width[r]}):t.patch(r,a,s,u,c,n(s.width[r],s.height[r]))}}}),define("layout/specificComponents/popupContainerLayout",["lodash","layout/util/layout","layout/util/popupContainerDocking","layout/specificComponents/containerAndScreenWidthLayout","layout/specificComponents/balataLayout"],function(e,t,i,n,o){function r(e,t,o,r,a){n.measureContainer(e,t,o,r,a),i.measure(e,t,o,r,a);var s=a.propertiesItem;t.width["ROOT_"+a.rootId]="fullWidth"===s.alignmentType?r.getSiteWidth():t.width[e],t.left["ROOT_"+a.rootId]=Math.floor(t.left[e]-r.getSiteX())}function a(e,t,n,o,r){i.patch(e,t,n,o,r)}t.registerMeasureChildrenFirst("wysiwyg.viewer.components.PopupContainer",!0),t.registerRequestToMeasureChildren("wysiwyg.viewer.components.PopupContainer",[["inlineContent"]].concat(o.BALATA_PATHS_TO_REQUEST_MEASURE)),t.registerRequestToMeasureDom("wysiwyg.viewer.components.PopupContainer"),t.registerCustomMeasure("wysiwyg.viewer.components.PopupContainer",r),t.registerSAFEPatcher("wysiwyg.viewer.components.PopupContainer",a)}),define("layout/specificComponents/comboBoxInputLayout",["lodash","zepto","layout/util/layout"],function(e,t,i){function n(e,i,n){var o=n[e+"icon"],r=n[e+"collection"],a=o.height.baseVal.value+16,s=parseInt(t(r).css("line-height"),10)||0,u=2*(parseInt(t(r).css("border-width"),10)||0);i.height[e]=r.offsetHeight,i.width[e]=r.offsetWidth,i.minHeight[e]=Math.max(s,a)+u}function o(e,t,i){t.css(e,{height:i.height[e],width:i.width[e]})}i.registerRequestToMeasureChildren("wysiwyg.viewer.components.inputs.ComboBoxInput",[["collection"],["icon"]]),i.registerCustomMeasure("wysiwyg.viewer.components.inputs.ComboBoxInput",n),i.registerSAFEPatcher("wysiwyg.viewer.components.inputs.ComboBoxInput",o)}),define("layout/specificComponents/textComponentsLayout",["lodash","layout/util/layout"],function(e,t){function i(e,t,i){var n=i[e+"textarea"];t.height[e]=n.offsetHeight,t.width[e]=n.offsetWidth}function n(e,t,i){var n=i[e+"input"];t.height[e]=n.offsetHeight,t.width[e]=n.offsetWidth}function o(e,t,i){t.css(e,{height:i.height[e],width:i.width[e]})}t.registerRequestToMeasureChildren("wysiwyg.viewer.components.inputs.TextInput",[["input"]]),t.registerCustomMeasure("wysiwyg.viewer.components.inputs.TextInput",n),t.registerSAFEPatcher("wysiwyg.viewer.components.inputs.TextInput",o),t.registerRequestToMeasureChildren("wysiwyg.viewer.components.inputs.TextAreaInput",[["textarea"]]),t.registerCustomMeasure("wysiwyg.viewer.components.inputs.TextAreaInput",i),t.registerSAFEPatcher("wysiwyg.viewer.components.inputs.TextAreaInput",o)}),define("layout/specificComponents/radioButtonLayout",["lodash","layout/util/layout","zepto"],function(e,t,i){function n(t,i){return e(t.css(i)).map(function(e){return parseInt(e.split("px")[0],10)}).sum()}function o(e,t){var o=i("#"+e);t.height[e]=o.offset().height+n(o,["margin-bottom","margin-top"]);var r=i("#"+e+"container").offset().width,a=n(o,["margin-right","margin-left"]);t.width[e]=r+a}t.registerCustomMeasure("wysiwyg.viewer.components.inputs.RadioButton",o)}),define("layout/specificComponents/datePickerLayout",["zepto","layout/util/layout"],function(e,t){function i(t,i,n){var o=n[t+"icon"],r=n[t+"input"],a=n[t+"inputWrapper"],s=o.height.baseVal.value+16,u=parseInt(e(r).css("line-height"),10)||0,c=2*(parseInt(e(a).css("border-width"),10)||0);i.height[t]=Math.max(a.offsetHeight,s),i.width[t]=Math.max(a.offsetWidth,56),i.minHeight[t]=Math.max(u,s)+c,i.minWidth[t]=56+c}function n(e,t,i){t.css(e,{height:i.height[e],width:i.width[e]})}t.registerRequestToMeasureChildren("wysiwyg.viewer.components.inputs.DatePicker",[["icon"],["inputWrapper"],["input"]]),t.registerCustomMeasure("wysiwyg.viewer.components.inputs.DatePicker",i),t.registerSAFEPatcher("wysiwyg.viewer.components.inputs.DatePicker",n)}),define("layout/specificComponents/radioGroupLayout",["lodash","zepto","layout/util/layout"],function(e,t,i){function n(t,i,n){return e.filter(t[i],function(t,i){return e.startsWith(i,n+"radio")})}function o(i,o){var r=arguments[4],a=r.dataItem.options.length,s="vertical"===r.propertiesItem.layout,u=n(o,"height",i),c=s?e.sum(u):e.max(u);o.height[i]=c;var l=n(o,"width",i),h=s?e.max(l):e.sum(l),d=s?60:60*a;o.width[i]=e.max([d,h,t("#"+i).offset().width])}function r(e,t,i){t.css(e,{width:i.width[e]})}function a(t,i,n,o){return e.map(o.dataItem.options,function(e,t){return{type:"wysiwyg.viewer.components.inputs.RadioButton",pathArray:["radio"+t]}}).concat([["items"]])}i.registerRequestToMeasureChildren("wysiwyg.viewer.components.inputs.RadioGroup",a),i.registerCustomMeasure("wysiwyg.viewer.components.inputs.RadioGroup",o),i.registerSAFEPatcher("wysiwyg.viewer.components.inputs.RadioGroup",r)}),define("layout/specificComponents/gridLayout",["lodash","layout/util/layout"],function(e,t){function i(e,t){return e.styleItem.style.properties[t]||""}function n(e){var t=e.propertiesItem.pagination;return e.dataItem.numberOfDisplayedRows||(t&&t.type===a.PAGES?t.rowsPerPage:e.dataItem.rows.length)}function o(e,t,o,a,l){var h=o[e];t.width[e]=h.offsetWidth,t.height[e]=h.offsetHeight;var d=l.propertiesItem,g=d.rowHeight+Number(i(l,c)),p=Math.min(n(l),r),m=d.showHeader?d.headerHeight+Number(i(l,u)):0,f=Number(l.styleItem.style.properties.containerBrw)||0,y=m+p*g+2*f,w=d.heightLayout===s.AUTOMATIC,v=h.getElementsByClassName("ag-bl-center ag-bl-full-height-center");if(v.length){var C=h.getElementsByClassName("ag-body"),b=w?y:v[0].clientHeight;C[0].style.height=b-2*f-m+"px"}y&&w&&(t.height[e]=y)}var r=200,a={PAGES:"pagination",SCROLL:"virtual",NONE:"normal"},s={MANUAL:"manual",AUTOMATIC:"auto"},u="headerDivider_w",c="rowDivider_w";t.registerCustomMeasure("wysiwyg.viewer.components.Grid",o)}),define("layout/specificComponents/fileUploaderLayout",["zepto","lodash","layout/util/layout"],function(e,t,i){function n(t,i,n){var o=e(n[t]),r=o.find("#"+t+"files"),a=o.find("#"+t+"buttonLabel"),s=o.find("#"+t+"chooseFileButton"),u=window.getComputedStyle(r[0]),c=window.getComputedStyle(s[0]),l=2*parseInt(c.borderLeftWidth,10);i.minHeight[t]=parseInt(u.height,10)+parseInt(u.marginTop,10)+Math.max(a[0].offsetHeight,23)+l,i.width[t]=Math.max(a[0].offsetWidth+l+16+20,i.width[t])}function o(e,t,i){var n={height:Math.max(i.minHeight[e],i.height[e]),width:i.width[e]};t.css(e,n)}i.registerCustomMeasure("wysiwyg.viewer.components.inputs.FileUploader",n),i.registerSAFEPatcher("wysiwyg.viewer.components.inputs.FileUploader",o)}),define("layout/specificComponents/appControllerLayout",["layout/util/layout"],function(e){e.registerCustomMeasure("platform.components.AppController",function(e,t,i){i[e+"inlineContent"]&&(t.width[e]=t.width[e+"inlineContent"],t.height[e]=t.height[e+"inlineContent"])}),e.registerRequestToMeasureChildren("platform.components.AppController",[["inlineContent"]])}),define("layout/specificComponents/linkBarLayout",["lodash","layout/util/layout","layout/specificComponents/imageLayout"],function(e,t,i){function n(t,i,n,o){var a=o.dataItem.items;return e.map(a,function(e,t){return{type:"core.components.Image",pathArray:[""+t,r]}})}function o(t,n,o,a,s){var u=e.get(a,["propertiesItem","iconSize"]),c={width:u,height:u},l=a.dataItem.items;e.forEach(l,function(e,a){i.patchNodeImage(t+a+r,n,o,s,e,c,e.alignType)})}var r="image";t.registerRequestToMeasureChildren("wysiwyg.viewer.components.LinkBar",n),t.registerSAFEPatcher("wysiwyg.viewer.components.LinkBar",o)}),define("layout/specificComponents/flashComponentLayout",["lodash","layout/util/layout","layout/specificComponents/imageLayout"],function(e,t,i){function n(e,t,n,o,r){i.patchNodeImage(e+"noFlashImg",t,n,r,o.dataItem.placeHolderImage,{width:o.dataItem.placeHolderImage.width,height:o.dataItem.placeHolderImage.height},o.dataItem.placeHolderImage.alignType)}t.registerRequestToMeasureChildren("wysiwyg.viewer.components.FlashComponent",[{type:"core.components.Image",pathArray:["noFlashImg"]}]),t.registerSAFEPatcher("wysiwyg.viewer.components.FlashComponent",n)}),define("layout/specificComponents/rssButtonLayout",["lodash","layout/util/layout","layout/specificComponents/imageLayout"],function(e,t,i){function n(t,i,n,o){return[{type:"core.components.Image",pathArray:[e.get(o,["dataItem","image","id"])]}]}function o(t,n,o,r,a){var s=e.get(r,"layout"),u=e.get(r,["dataItem","image"]);e.assign(u,{displayMode:"full"}),i.patchNodeImage(t+e.get(u,"id"),n,o,a,u,s)}t.registerRequestToMeasureChildren("wysiwyg.common.components.rssbutton.viewer.RSSButton",n),t.registerSAFEPatcher("wysiwyg.common.components.rssbutton.viewer.RSSButton",o)}),define("layout/specificComponents/quickActionBarLayout",["zepto","layout/util/layout","coreUtils"],function(e,t,i){function n(t,n,o){var r=e("#SITE_ROOT")[0],a=i.domMeasurements.getElementRect(o[t],r);n.width[t]=a.width,n.height[t]=a.height}function o(e,t){t.css(e,{top:"",left:"",width:"",height:"","z-index":1})}t.registerCustomMeasure("wysiwyg.viewer.components.QuickActionBar",n),t.registerSAFEPatcher("wysiwyg.viewer.components.QuickActionBar",o)}),define("layout/specificComponents/quickActionBarItemLayout",["layout/util/layout"],function(e){function t(e,t){t.css(e,{top:"",left:"",width:"",height:"",position:"","z-index":""})}e.registerSAFEPatcher("wysiwyg.viewer.components.QuickActionBarItem",t)}),define("layout/specificComponents/touchMediaZoomLayout",["zepto","lodash","siteUtils","layout/util/layout"],function(e,t,i,n){function o(i,n,o){var r=e(o[i]);if(r.data("firstrender")){n.custom[i]={imageIds:[]};var a=t.toArray(r.find("img"));t.forEach(a,function(t,r){var a=i+"_image"+r;o[a]=t,n.custom[i].imageIds.push(a),n.custom[a]={imageData:e(t).data("imgdata"),scale:e(t).data("imgscale")}});var s=r.attr("id");o[i+"imageContainer"]=r.find("#"+s+"imageContainer").get(0),o[i+"info"]=r.find("#"+s+"info").get(0)}}function r(e,i,n,o,r){n.custom[e]&&(t.forEach(n.custom[e].imageIds,function(e){var t={pixelAspectRatio:r.mobile.getDevicePixelRatio(),browser:r.getBrowser(),staticMediaUrl:r.getStaticMediaUrl(),screenSize:{width:n.width.screen,height:n.height.screen}},o=n.custom[e],a=s.getImageApiData(o.imageData,t,o.scale);i.css(e,a.css.img),i.attr(e,{src:a.uri})}),i.css(e,{width:(1+2*u)*n.width.screen}),i.css(e+"imageContainer",{width:n.width.screen}),i.css(e+"info",{width:n.width.screen}))}function a(e,i,n,o,a){i.css(e,{top:0,position:"absolute",width:"100%",height:"100%"}),t.forEach(["stage_LEFT","stage_CENTER","stage_RIGHT"],function(t){r(e+t,i,n,o,a)})}var s=i.touchMediaZoomUtils,u=.2;n.registerCustomMeasure("wysiwyg.viewer.components.TouchMediaZoomItem",o),n.registerRequestToMeasureChildren("wysiwyg.viewer.components.TouchMediaZoomSlideshow",[{pathArray:["stage_LEFT"],type:"wysiwyg.viewer.components.TouchMediaZoomItem"},{pathArray:["stage_CENTER"],type:"wysiwyg.viewer.components.TouchMediaZoomItem"},{pathArray:["stage_RIGHT"],type:"wysiwyg.viewer.components.TouchMediaZoomItem"}]),n.registerSAFEPatcher("wysiwyg.viewer.components.TouchMediaZoomSlideshow",a)}),define("layout/specificComponents/viewerLayout",[],function(){return function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var i={};return t.m=e,t.c=i,t.p=".",t(0)}([function(e,t,i){var n,o;n=[],void 0!==(o=function(){"undefined"!=typeof window&&window.document&&window.santaBase&&!window.editorBase&&!document.querySelector('link[href$="viewer.css"]')&&i(1)}.apply(t,n))&&(e.exports=o)},function(e,t,i){var n=i(2);"string"==typeof n&&(n=[[e.id,n,""]]);i(4)(n,{});n.locals&&(e.exports=n.locals)},function(e,t,i){(e.exports=i(3)()).push([e.id,"html, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, big, cite, code,\ndel, dfn, em, font, img, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var,\nb, u, i, center,\ndl, dt, dd, ol, ul, li,\nfieldset, form, label, legend,\ntable, caption, tbody, tfoot, thead, tr, th, td,\nnav, button, section, header, footer, title {\n  margin: 0;\n  padding: 0;\n  border: 0;\n  outline: 0;\n  vertical-align: baseline;\n  background: transparent; }\n\nbody {\n  font-size: 10px;\n  font-family: Arial, Helvetica, sans-serif; }\n\ntextarea, input, select {\n  font-family: Helvetica, Arial, sans-serif;\n  box-sizing: border-box; }\n\nol, ul {\n  list-style: none; }\n\nblockquote, q {\n  quotes: none; }\n\nins {\n  text-decoration: none; }\n\ndel {\n  text-decoration: line-through; }\n\ntable {\n  border-collapse: collapse;\n  border-spacing: 0; }\n\na {\n  cursor: pointer;\n  text-decoration: none; }\n\nhtml, body {\n  height: 100%; }\n\nbody {\n  overflow-x: auto;\n  overflow-y: scroll; }\n\n.testStyles {\n  overflow-y: hidden; }\n\n.reset-button {\n  background: none;\n  border: 0;\n  outline: 0;\n  color: inherit;\n  /* cursor: default; */\n  font: inherit;\n  line-height: normal;\n  overflow: visible;\n  padding: 0;\n  -webkit-appearance: none;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none; }\n\n:focus {\n  outline: none; }\n\n.wixSiteProperties {\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n  overflow: hidden; }\n\n.SITE_ROOT {\n  min-height: 100%;\n  position: relative;\n  margin: 0 auto; }\n\n.POPUPS_ROOT {\n  left: 0;\n  top: 0;\n  width: 100%;\n  height: 100%;\n  overflow-x: auto;\n  overflow-y: scroll;\n  position: fixed;\n  z-index: 99999; }\n  .POPUPS_ROOT.mobile {\n    z-index: 1005;\n    -webkit-overflow-scrolling: touch; }\n\n.POPUPS_WRAPPER {\n  position: relative;\n  overflow: hidden; }\n  .POPUPS_WRAPPER > div {\n    /* page */\n    margin: 0 auto; }\n\n.auto-generated-link {\n  color: inherit; }\n\n.warmup .hidden-on-warmup {\n  visibility: hidden; }\n\nhtml.device-phone body {\n  overflow-y: auto; }\n\nhtml.device-mobile-optimized.device-android {\n  margin-bottom: 1px; }\n\nhtml.device-mobile-optimized.blockSiteScrolling > body {\n  position: fixed;\n  width: 100%; }\n\nhtml.device-mobile-optimized.media-zoom-mode > body {\n  touch-action: manipulation; }\n  html.device-mobile-optimized.media-zoom-mode > body > #SITE_CONTAINER {\n    height: 100%;\n    overflow: hidden; }\n    html.device-mobile-optimized.media-zoom-mode > body > #SITE_CONTAINER > .noop {\n      height: 100%; }\n      html.device-mobile-optimized.media-zoom-mode > body > #SITE_CONTAINER > .noop > .siteAspectsContainer {\n        height: 100%;\n        z-index: 1005; }\n\n.siteAspectsContainer {\n  position: absolute;\n  top: 0;\n  margin: 0 auto;\n  left: 0;\n  right: 0; }\n\nbody.device-mobile-optimized {\n  overflow-x: hidden;\n  overflow-y: scroll; }\n  body.device-mobile-optimized.qa-mode {\n    overflow-y: auto; }\n  body.device-mobile-optimized #SITE_CONTAINER {\n    width: 320px;\n    overflow-x: visible;\n    margin: 0 auto;\n    position: relative; }\n  body.device-mobile-optimized > * {\n    max-width: 100% !important; }\n  body.device-mobile-optimized .SITE_ROOT {\n    overflow-x: hidden;\n    overflow-y: hidden; }\n\nbody.device-mobile-non-optimized #SITE_CONTAINER > :not(.mobile-non-optimized-overflow) .SITE_ROOT {\n  overflow-x: hidden;\n  overflow-y: auto; }\n\nbody.device-mobile-non-optimized.fullScreenMode {\n  background-color: #5f6360; }\n  body.device-mobile-non-optimized.fullScreenMode .SITE_ROOT,\n  body.device-mobile-non-optimized.fullScreenMode #SITE_BACKGROUND,\n  body.device-mobile-non-optimized.fullScreenMode #MOBILE_ACTIONS_MENU {\n    visibility: hidden; }\n\nbody.fullScreenMode {\n  overflow-x: hidden !important;\n  overflow-y: hidden !important; }\n  body.fullScreenMode.device-mobile-optimized #TINY_MENU {\n    opacity: 0;\n    pointer-events: none; }\n\nbody.fullScreenMode-scrollable.device-mobile-optimized {\n  overflow-x: hidden !important;\n  overflow-y: auto !important; }\n  body.fullScreenMode-scrollable.device-mobile-optimized .SITE_ROOT,\n  body.fullScreenMode-scrollable.device-mobile-optimized #masterPage {\n    overflow-x: hidden !important;\n    overflow-y: hidden !important; }\n  body.fullScreenMode-scrollable.device-mobile-optimized #masterPage,\n  body.fullScreenMode-scrollable.device-mobile-optimized #SITE_BACKGROUND {\n    height: auto !important; }\n\n.fullScreenOverlay {\n  z-index: 1005;\n  position: fixed;\n  left: 0;\n  top: -60px;\n  right: 0;\n  bottom: 0;\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: flex;\n  -webkit-box-pack: center;\n  -webkit-justify-content: center;\n          justify-content: center;\n  overflow-y: hidden; }\n  .fullScreenOverlay > .fullScreenOverlayContent {\n    margin: 0 auto;\n    position: absolute;\n    right: 0;\n    top: 60px;\n    left: 0;\n    bottom: 0;\n    overflow: hidden;\n    -webkit-transform: translateZ(0);\n            transform: translateZ(0); }\n\n.mobile-actions-menu-wrapper {\n  z-index: 1000; }\n\nbody[contenteditable] {\n  overflow-x: auto;\n  overflow-y: auto; }\n\n.bold {\n  font-weight: bold; }\n\n.italic {\n  font-style: italic; }\n\n.underline {\n  text-decoration: underline; }\n\n.lineThrough {\n  text-decoration: line-through; }\n\n.singleLineText {\n  white-space: nowrap;\n  text-overflow: ellipsis; }\n\n.alignLeft {\n  text-align: left; }\n\n.alignCenter {\n  text-align: center; }\n\n.alignRight {\n  text-align: right; }\n\n.alignJustify {\n  text-align: justify; }\n\nul.font_100, ol.font_100 {\n  color: #080808;\n  font-family: 'Arial, Helvetica, sans-serif', serif;\n  font-size: 10px;\n  font-style: normal;\n  font-variant: normal;\n  font-weight: normal;\n  margin: 0;\n  text-decoration: none;\n  line-height: normal;\n  letter-spacing: normal; }\n  ul.font_100 li, ol.font_100 li {\n    margin-bottom: 12px; }\n\nletter {\n  position: relative;\n  display: inline-block; }\n\nword {\n  display: inline-block;\n  white-space: nowrap; }\n\nword.space,\nletter.space {\n  display: inline; }\n\nol.wix-list-text-align, ul.wix-list-text-align {\n  list-style-position: inside; }\n  ol.wix-list-text-align p, ol.wix-list-text-align h1, ol.wix-list-text-align h2, ol.wix-list-text-align h3, ol.wix-list-text-align h4, ol.wix-list-text-align h5, ol.wix-list-text-align h6, ul.wix-list-text-align p, ul.wix-list-text-align h1, ul.wix-list-text-align h2, ul.wix-list-text-align h3, ul.wix-list-text-align h4, ul.wix-list-text-align h5, ul.wix-list-text-align h6 {\n    display: inline; }\n\n.wixapps-less-spacers-align.ltr {\n  text-align: left; }\n\n.wixapps-less-spacers-align.center {\n  text-align: center; }\n\n.wixapps-less-spacers-align.rtl {\n  text-align: right; }\n\n.wixapps-less-spacers-align > div,\n.wixapps-less-spacers-align > a {\n  display: inline-block !important; }\n\n.flex_display {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: flex; }\n\n.flex_vbox {\n  box-sizing: border-box;\n  padding-top: 0.01em;\n  padding-bottom: 0.01em; }\n\na.wixAppsLink img {\n  cursor: pointer; }\n\n.singleLine {\n  white-space: nowrap;\n  display: block;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  word-wrap: normal; }\n\n[data-z-counter] {\n  z-index: 0; }\n\n[data-z-counter=\"0\"] {\n  z-index: auto; }\n\n.circle-preloader {\n  -webkit-animation: semi-rotate 1s 1ms linear infinite;\n          animation: semi-rotate 1s 1ms linear infinite;\n  height: 30px;\n  left: 50%;\n  margin-left: -15px;\n  margin-top: -15px;\n  overflow: hidden;\n  position: absolute;\n  top: 50%;\n  -webkit-transform-origin: 100% 50%;\n          transform-origin: 100% 50%;\n  width: 15px; }\n  .circle-preloader::before {\n    content: '';\n    top: 0;\n    left: 0;\n    right: -100%;\n    bottom: 0;\n    border: 3px solid currentColor;\n    border-color: currentColor transparent transparent currentColor;\n    border-radius: 50%;\n    position: absolute;\n    -webkit-transform: rotate(-45deg);\n            transform: rotate(-45deg);\n    -webkit-animation: inner-rotate 0.5s 1ms linear infinite alternate;\n            animation: inner-rotate 0.5s 1ms linear infinite alternate;\n    color: #7fccf7; }\n  .circle-preloader::after {\n    content: '';\n    top: 0;\n    left: 0;\n    right: -100%;\n    bottom: 0;\n    border: 3px solid currentColor;\n    border-color: currentColor transparent transparent currentColor;\n    border-radius: 50%;\n    position: absolute;\n    -webkit-transform: rotate(-45deg);\n            transform: rotate(-45deg);\n    -webkit-animation: inner-rotate 0.5s 1ms linear infinite alternate;\n            animation: inner-rotate 0.5s 1ms linear infinite alternate;\n    color: #3899ec;\n    opacity: 0; }\n  .circle-preloader.white::before {\n    color: #f0f0f0; }\n  .circle-preloader.white::after {\n    color: #dcdcdc; }\n\n@-webkit-keyframes inner-rotate {\n  to {\n    opacity: 1;\n    -webkit-transform: rotate(115deg);\n            transform: rotate(115deg); } }\n\n@keyframes inner-rotate {\n  to {\n    opacity: 1;\n    -webkit-transform: rotate(115deg);\n            transform: rotate(115deg); } }\n\n@-webkit-keyframes semi-rotate {\n  from {\n    -webkit-animation-timing-function: ease-out;\n            animation-timing-function: ease-out;\n    -webkit-transform: rotate(180deg);\n            transform: rotate(180deg); }\n  45% {\n    -webkit-transform: rotate(198deg);\n            transform: rotate(198deg); }\n  55% {\n    -webkit-transform: rotate(234deg);\n            transform: rotate(234deg); }\n  to {\n    -webkit-transform: rotate(540deg);\n            transform: rotate(540deg); } }\n\n@keyframes semi-rotate {\n  from {\n    -webkit-animation-timing-function: ease-out;\n            animation-timing-function: ease-out;\n    -webkit-transform: rotate(180deg);\n            transform: rotate(180deg); }\n  45% {\n    -webkit-transform: rotate(198deg);\n            transform: rotate(198deg); }\n  55% {\n    -webkit-transform: rotate(234deg);\n            transform: rotate(234deg); }\n  to {\n    -webkit-transform: rotate(540deg);\n            transform: rotate(540deg); } }\n\n.hidden-comp-ghost-mode {\n  opacity: 0.5; }\n\n.collapsed-comp-mode::after {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  content: '';\n  background: -webkit-repeating-linear-gradient(135deg, transparent, transparent 49%, #2b5672 40%, #2b5672 40%, transparent 51%);\n  background: repeating-linear-gradient(-45deg, transparent, transparent 49%, #2b5672 40%, #2b5672 40%, transparent 51%);\n  background-size: 6px 6px;\n  background-repeat: repeat; }\n\n.g-transparent-a:link, .g-transparent-a:visited {\n  border-color: transparent; }\n\n.transitioning-comp * {\n  transition: inherit !important;\n  -webkit-transition: inherit !important; }\n\n.selectionSharerContainer {\n  position: absolute;\n  background-color: #ffffff;\n  box-shadow: 0px 4px 10px 0px rgba(57, 86, 113, 0.24);\n  width: 142px;\n  height: 45px;\n  border-radius: 100px;\n  text-align: center; }\n  .selectionSharerContainer:after {\n    content: \"\";\n    position: absolute;\n    bottom: -10px;\n    left: 42%;\n    /*controls horizontal position */\n    border-width: 10px 10px 0;\n    /* vary these values to change the angle of the vertex */\n    border-style: solid;\n    border-color: #ffffff transparent;\n    /* reduce the damage in FF3.0 */\n    display: block;\n    width: 0; }\n  .selectionSharerContainer .selectionSharerOption {\n    display: inline-block;\n    cursor: pointer;\n    vertical-align: top;\n    padding: 13px 11px 11px 13px;\n    margin: 1px;\n    z-index: -1; }\n  .selectionSharerContainer .selectionSharerVerticalSeparator {\n    margin-top: 9px;\n    margin-bottom: 18px;\n    background-color: #eaf7ff;\n    height: 26px;\n    width: 1px;\n    display: inline-block; }\n\n.visual-focus-on :not(.has-custom-focus):focus {\n  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 0 1px 2px #3899EC !important; }\n/*# sourceMappingURL=viewer.css.map */",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var i=this[t];i[2]?e.push("@media "+i[2]+"{"+i[1]+"}"):e.push(i[1])}return e.join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(n[r]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&n[a[0]]||(i&&!a[2]?a[2]=i:i&&(a[2]="("+a[2]+") and ("+i+")"),e.push(a))}},e}},function(e,t,i){function n(e,t){for(var i=0;i<e.length;i++){var n=e[i],o=g[n.id];if(o){o.refs++;for(a=0;a<o.parts.length;a++)o.parts[a](n.parts[a]);for(;a<n.parts.length;a++)o.parts.push(c(n.parts[a],t))}else{for(var r=[],a=0;a<n.parts.length;a++)r.push(c(n.parts[a],t));g[n.id]={id:n.id,refs:1,parts:r}}}}function o(e){for(var t=[],i={},n=0;n<e.length;n++){var o=e[n],r=o[0],a={css:o[1],media:o[2],sourceMap:o[3]};i[r]?i[r].parts.push(a):t.push(i[r]={id:r,parts:[a]})}return t}function r(e,t){var i=f(),n=v[v.length-1];if("top"===e.insertAt)n?n.nextSibling?i.insertBefore(t,n.nextSibling):i.appendChild(t):i.insertBefore(t,i.firstChild),v.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");i.appendChild(t)}}function a(e){e.parentNode.removeChild(e);var t=v.indexOf(e);t>=0&&v.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",r(e,t),t}function u(e){var t=document.createElement("link");return t.rel="stylesheet",r(e,t),t}function c(e,t){var i,n,o;if(t.singleton){var r=w++;i=y||(y=s(t)),n=l.bind(null,i,r,!1),o=l.bind(null,i,r,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=u(t),n=d.bind(null,i),o=function(){a(i),i.href&&URL.revokeObjectURL(i.href)}):(i=s(t),n=h.bind(null,i),o=function(){a(i)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}function l(e,t,i,n){var o=i?"":n.css;if(e.styleSheet)e.styleSheet.cssText=C(t,o);else{var r=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(r,a[t]):e.appendChild(r)}}function h(e,t){var i=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}function d(e,t){var i=t.css,n=t.sourceMap;n&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var o=new Blob([i],{type:"text/css"}),r=e.href;e.href=URL.createObjectURL(o),r&&URL.revokeObjectURL(r)}var g={},p=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}},m=p(function(){return/msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase())}),f=p(function(){return document.head||document.getElementsByTagName("head")[0]}),y=null,w=0,v=[];e.exports=function(e,t){void 0===(t=t||{}).singleton&&(t.singleton=m()),void 0===t.insertAt&&(t.insertAt="bottom");var i=o(e);return n(i,t),function(e){for(var r=[],a=0;a<i.length;a++){var s=i[a];(u=g[s.id]).refs--,r.push(u)}e&&n(o(e),t);for(a=0;a<r.length;a++){var u=r[a];if(0===u.refs){for(var c=0;c<u.parts.length;c++)u.parts[c]();delete g[u.id]}}}};var C=function(){var e=[];return function(t,i){return e[t]=i,e.filter(Boolean).join("\n")}}()}])}),define("layout",["layout/util/layout","layout/specificComponents/wixHomepageMenuLayout","layout/specificComponents/fiveGridLineLayout","layout/specificComponents/domainSearchLayout","layout/specificComponents/registerToMeasureOnly","layout/specificComponents/registerToPureDomMeasure","layout/specificComponents/areaTooltipLayout","layout/specificComponents/menuLayout","layout/specificComponents/sliderGalleryLayout","layout/specificComponents/verticalMenuLayout","layout/specificComponents/loginButtonLayout","layout/specificComponents/dialogLayout","layout/specificComponents/siteBackgroundLayout","layout/specificComponents/wPhotoLayout","layout/specificComponents/documentMediaLayout","layout/specificComponents/containerAndScreenWidthLayout","layout/specificComponents/groupLayout","layout/specificComponents/wixappsLayout","layout/specificComponents/shapeLayout","layout/specificComponents/richtextLayout","layout/specificComponents/matrixGalleryLayout","layout/specificComponents/slideShowLayout","layout/specificComponents/anchorLayout","layout/specificComponents/tinyMenuLayout","layout/specificComponents/imageZoomLayout","layout/specificComponents/tpaGalleryLayout","layout/specificComponents/youTubeSubscribeButtonLayout","layout/specificComponents/wFacebookCommentLayout","layout/specificComponents/facebookLikeLayout","layout/specificComponents/formMixinLayout","layout/specificComponents/backOfficeTextLayout","layout/specificComponents/vkShareLayout","layout/specificComponents/adminLoginLayout","layout/specificComponents/homePageLoginLayout","layout/specificComponents/iTunesButtonLayout","layout/specificComponents/paypalLayout","layout/specificComponents/bgImageLayout","layout/specificComponents/wixSiteLayout","layout/specificComponents/buttonLayout","layout/wixappsLayout/proxyLayoutRegistrar","layout/wixappsLayout/proxyLayout/paginatedColumnGalleryProxyLayout","layout/wixappsLayout/proxyLayout/galleryProxyLayout","layout/wixappsLayout/proxyLayout/imageProxyLayout","layout/wixappsLayout/proxyLayout/buttonProxyLayout","layout/wixappsLayout/proxyLayout/mediaLabelProxyLayout","layout/wixappsLayout/proxyLayout/sliderGalleryProxyLayout","layout/specificComponents/imageButtonLayout","layout/specificComponents/mediaRichTextLayout","layout/specificComponents/backToTopButtonLayout","layout/specificComponents/appPartZoomLayout","layout/specificComponents/facebookShareLayout","layout/specificComponents/paginatedGridGalleryLayout","layout/specificComponents/PinterestFollowLayout","layout/specificComponents/videoLayout","layout/specificComponents/soundCloudLayout","layout/specificComponents/verticalLineLayout","layout/specificComponents/boxSlideShowLayout","layout/specificComponents/mediaContainerLayout","layout/specificComponents/mediaControlsLayout","layout/specificComponents/mediaOverlayControlsLayout","layout/specificComponents/verticalAnchorsMenuLayout","layout/specificComponents/columnsLayout","layout/specificComponents/popupContainerLayout","layout/specificComponents/comboBoxInputLayout","layout/specificComponents/textComponentsLayout","layout/specificComponents/radioButtonLayout","layout/specificComponents/datePickerLayout","layout/specificComponents/radioGroupLayout","layout/specificComponents/gridLayout","layout/specificComponents/fileUploaderLayout","layout/specificComponents/appControllerLayout","layout/specificComponents/linkBarLayout","layout/specificComponents/flashComponentLayout","layout/specificComponents/rssButtonLayout","layout/specificComponents/quickActionBarLayout","layout/specificComponents/quickActionBarItemLayout","layout/specificComponents/touchMediaZoomLayout","layout/specificComponents/svgPrimitiveLayout","layout/specificComponents/viewerLayout"],function(e){return e});
  //# sourceMappingURL=layout.min.js.map