/*! For license information please see bundle.modals.cfdec7d3.js.LICENSE.txt */ (window.webpackETJsonp=window.webpackETJsonp||[]).push([[6],Array(450).concat([function(e,t,n){e.exports=function(){"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(){return++d}function n(){var e;h.debug&&(e=console).log.apply(e,arguments)}function r(e){var t=document.createElement("a");return t.href=e,t.origin||t.protocol+"//"+t.hostname}var o=window.navigator.userAgent.indexOf("Edge")>-1;function a(e,t){return(e.origin===t||o)&&"object"===u(e.data)&&"postmate"in e.data&&e.data.type===s&&!!{"handshake-reply":1,call:1,emit:1,reply:1,request:1}[e.data.postmate]}function i(e,t){var n="function"==typeof e[t]?e[t]():e[t];return h.Promise.resolve(n)}var l=function(){function e(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n-1&&-1===navigator.userAgent.indexOf("Chrome")},function(e,t,n){var r=n(52)("toPairs",n(449),n(124));r.placeholder=n(47),e.exports=r},function(e,t,n){var r=n(52)("fromPairs",n(328));r.placeholder=n(47),e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.versions=void 0;var r=["1.12.4","1.12.3","1.12.2","1.12.1","1.12.0","1.11.3","1.11.2","1.11.1","1.11.0","1.10.2","1.10.1","1.10.0","1.9.1","1.9.0","1.8.3","1.8.2","1.8.1","1.8.0","1.7.2","1.7.1","1.7.0","1.7.0","1.6.4","1.6.3","1.6.2","1.6.1","1.6.0","1.5.2","1.5.1","1.5.0","1.4.4","1.4.3","1.4.2","1.4.1","1.4.0","1.3.2","1.3.1","1.3.0","1.2.6","1.2.5","1.2.4","1.2.3","1.2.2","1.2.1","1.2.0","1.1.4","1.1.3","1.1.2","1.1.1","1.1.0","1.0.4","1.0.3","1.0.2","1.0.1","1.0.0","2.2.4","2.2.3","2.2.2","2.2.1","2.2.0","2.1.4","2.1.3","2.1.2","2.1.1","2.1.0","2.0.3","2.0.2","2.0.1","2.0.0","3.4.1","3.4.0","3.3.1","3.3.0","3.2.1","3.2.0","3.1.1","3.1.0","3.0.0"];t.versions=r;var o={versions:r};t.default=o},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=G(n(0)),a=V(n(7)),i=V(n(13)),l=G(n(29)),u=n(62),s=V(n(181)),c=V(n(31)),d=V(n(10)),f=V(n(71)),p=V(n(8)),h=V(n(4)),m=V(n(41)),g=V(n(192)),y=V(n(42)),v=(V(n(109)),V(n(5))),b=V(n(11)),_=V(n(40)),w=V(n(1)),k=(V(n(358)),V(n(125))),O=V(n(1806)),S=V(n(1813)),C=V(n(58)),E=V(n(19)),M=V(n(278)),T=V(n(44)),P=V(n(1814)),x=V(n(1815)),j=V(n(6)),D=V(n(1816)),L=V(n(2));n(1818);var N=V(n(770)),A=V(n(57)),R=V(n(1460)),B=V(n(296)),F=V(n(446)),I=n(280),W=V(n(1819));function V(e){return e&&e.__esModule?e:{default:e}}function H(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(H=function(e){return e?n:t})(e)}function G(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=H(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function z(e){for(var t=1;t0?100:60,a=0,i=t.find(".et-fb-save-library-button").length>0?40:0;return t.find(r).length>0&&(!(0,d.default)(this.props.modalWidth)&&this.props.modalWidth&&t.find(r).width(this.props.modalWidth),a=0===n?t.find(r).innerHeight():n,!(0,d.default)(this.props.modalWidth)&&this.props.modalWidth&&t.find(r).width("auto")),ne||"portability"!==this.props.actionType||(i=40),a+i+o}},{key:"setInputFocus",value:function(){var e=L.default.$appWindow(this.modal.current),t=(0,w.default)(e.find(".et-fb-settings-options-wrap").offset(),"top",0),n=(0,w.default)(e.find(".et-fb-settings-options-tab--active").offset(),"top",0)-t;if(e.trigger("focus").find('input[type="text"]:visible').first().trigger("focus"),n<0&&e.find(".et-fb-settings-options-tab").length){var r=parseInt(e.find(".et-fb-settings-options").css("paddingTop")),o=Math.abs(n)+r;e.find(".et-fb-settings-options-wrap").scrollTop(o),setTimeout((function(){e.find(".et-fb-settings-options-wrap").scrollTop(o)}),0)}}},{key:"_handleStartMovement",value:function(e){if(!this.state.move)return!1;var t=this.state.modalPositionData,n="absolute"===t.style.position?e.pageX:e.pageX-L.default.$topWindow().scrollLeft(),r="absolute"===t.style.position?e.pageY:e.pageY-L.default.$topWindow().scrollTop();return n-=this.state.reactive.x,r-=this.state.reactive.y,t.style.top=r,t.style.left=n,this.setState({resetModalStyles:(0,s.default)(),modalPositionData:t})}},{key:"_handleMove",value:function(t){if(this.props.movable){var n="absolute"===this.state.modalPositionData.style.position?e((0,l.findDOMNode)(this)).position():e((0,l.findDOMNode)(this)).offset();this.setState({reactive:{x:t.pageX-n.left,y:t.pageY-n.top},move:!this.state.move})}}},{key:"_handleEndMovement",value:function(t){if(this.state.move){var n=e("#et-fb-app").offset(),r=L.default.topViewportWidth(),o=L.default.$topWindow().height(),a=this.state.modalPositionData;if("absolute"!==a.style.position&&(a.style.top+400>o||a.style.top<0)||"absolute"===a.style.position&&a.style.top<0&&Math.abs(a.style.top)>n.top){var i=50;"absolute"===a.style.position&&a.style.top<0&&Math.abs(a.style.top)>n.top&&(i+=a.style.top+(Math.abs(a.style.top)-n.top)),a.style.top=a.style.top<0?i:o-400}if("absolute"!==a.style.position&&a.style.left<0||a.style.left+400>r||"absolute"===a.style.position&&a.style.left<0&&Math.abs(a.style.left)>n.left){var l=50;"absolute"===a.style.position&&a.style.left<0&&Math.abs(a.style.left)>n.left&&(l+=a.style.left+(Math.abs(a.style.left)-n.left)),a.style.left=a.style.left<0?l:r-400}return this.setState({move:!1,modalPositionData:a})}}},{key:"_onProductTourElementChange",value:function(){this.setState({currentTourElement:j.default.getActiveProductTourElement()})}},{key:"_onModuleItemMouseEnter",value:function(e){this.setState({selectedItemIndex:e})}},{key:"_onModuleItemMouseLeave",value:function(){this.setState({selectedItemIndex:0})}},{key:"setMaxItemIndex",value:function(e,t){this.maxItemIndex[t]=e}},{key:"tabNavClassName",value:function(e){var t={};return t["et-fb-settings-options_tab_"+e]=!0,t["et-fb-settings-tabs-nav-item"]=!0,e===this.state.active_tab&&(t["et-fb-settings-tabs-nav-item--active"]=!0),(0,i.default)(t)}},{key:"centerizeSelectedItem",value:function(){var t=e(l.default.findDOMNode(this)),n=t.find(".et-fb-settings-options-wrap"),r=t.find(".et-fb-settings-options-tab:visible .et-fb-selected-item");if(r.length){var o=r.offset(),a=r.parent().offset();n.stop().animate({scrollTop:o.top-a.top})}}},{key:"_onKeyDownEvent",value:function(t){if(!j.default.isProductTourActive()){var n,r,o=this,a=e(l.default.findDOMNode(this)),i=this.state.selectedItemIndex,u=t.keyCode;if(13===u&&(a.find(".et-fb-selected-item:visible").trigger("click"),"change_structure"===this.props.actionType&&E.default.cancelTooltip()),(0,v.default)([38,39,40,37],u))if((0,v.default)([38,40],u)&&t.preventDefault(),"change_structure"===this.props.actionType?(a.find(".et-fb-module-settings"),r=(n=a.find(".et-fb-columns-layout")).find(".et-fb-selected-item")):(a.find(".et-fb-settings-options-wrap"),r=(n=a.find(".et-fb-settings-options-tab:visible")).find(".et-fb-selected-item")),r.length){var s=n.width(),c=r.width(),d=Math.floor(s/c),f=0;switch(u){case 38:f=i-d;break;case 39:f=i+1;break;case 40:f=i+d;break;case 37:f=i-1}f>0&&f<=this.maxItemIndex[this.state.active_tab]&&this.setState({selectedItemIndex:f,selectedItemUpdated:!0})}else this.setState({selectedItemIndex:1,selectedItemUpdated:!0});if(27===u&&E.default.cancelTooltip(),9===u&&!a.closest(".et-fb-modal-settings--library")&&!e(t.target).is("input:focus, button:focus")){var p="modules_all"===this.state.active_tab?"modules_library":"modules_all",h=a.find(".et-fb-columns-layout");if(this.setState({active_tab:p}),h.length&&"change_structure"===this.props.actionType){var m=h.find(".et-fb-column-layout--selected"),g=m;(g=t.shiftKey?m.prev().length?m.prev():h.find("li").last():m.next().length?m.next():h.find("li").first()).trigger("click"),setTimeout((function(){o.setState({selectedItemIndex:g.index()+1})}),0)}return t.preventDefault(),!1}}}},{key:"getModuleType",value:function(){if(this.isLibrary())return"layout";var e=j.default.getModuleAddAfter(),t=e.type;if(e.is_parent)switch(t){case"et_pb_section":t="yes"===e.fullwidth?"et_pb_module":"et_pb_row";break;case"et_pb_column":t=e.is_inner_row?"et_pb_row_inner":"et_pb_module"}return(0,v.default)(["et_pb_section","et_pb_row","et_pb_row_inner"],t)||(t="et_pb_module"),t}},{key:"isAddingIntoGlobal",value:function(){return j.default.getModuleAddAfter().is_global}},{key:"_preventRightClick",value:function(t){this.props.enableContextMenu||e(t.target).is("input:focus")||t.preventDefault()}},{key:"getLibraryCategoriesList",value:function(){var e=ETBuilderBackend.saveModuleLibraryCategories,t={};return t.all=ETBuilderBackend.i18n.saveModuleLibraryAttrs.allCategoriesText,(0,h.default)(e)||(0,p.default)(e,(function(e){t[e.slug]=e.name})),t}},{key:"generateAddModuleContent",value:function(){var e=this,t=(0,f.default)(ETBuilderBackend.modules,{is_parent:"on"}),n=j.default.getModuleAddAfter(),r=n.type,a=this.props.specialtyModal,i=n.is_specialty_placeholder,l="",u={allModulesList:{},mainTabTitle:"",modalTitle:"",moduleType:"",settingsModalClass:[]};if(this.maxItemIndex.modules_all=0,u.mainTabTitle=ee.newModule,u.modalTitle=ee.insertModule,!0===a){var s=0;u.modalTitle=ee.insertColumn,this.maxItemIndex.modules_all=0,l=(0,c.default)([["1_2,1_2","1,0"],["1_2,1_2","0,1"],["1_4,3_4","0,1"],["3_4,1_4","1,0"],["1_4,1_2,1_4","0,1,0"],["1_2,1_4,1_4","1,0,0"],["1_4,1_4,1_2","0,0,1"],["1_3,2_3","0,1"],["2_3,1_3","1,0"]],(function(t,n){var r=t[0].split(","),a={layoutType:t[1],layoutFormat:t[0],columns:r,specialtyColumns:3};return s++,e.maxItemIndex.modules_all++,o.default.createElement(P.default,{label:t[0],title:t[0],key:s,specialtyLayout:a,itemIndex:e.maxItemIndex.modules_all,selectedItemIndex:e.state.selectedItemIndex,onMouseEnter:e._onModuleItemMouseEnter,isProcessingPlaceholder:i})})),u.allModulesList=o.default.createElement("ul",{onMouseLeave:this._onModuleItemMouseLeave},l)}else if("et_pb_section"!==r&&"et_pb_row"!==r&&"et_pb_row_inner"!==r&&!n.is_inner_row||"et_pb_section"===r&&"yes"===n.fullwidth&&n.is_parent)l=(0,c.default)(t,(function(t){if(!(0,v.default)(["et_pb_section","et_pb_row","et_pb_row_inner","et_pb_column","et_pb_column_inner"],t.label)){var n=void 0!==t.fullwidth_only&&"on"===t.fullwidth_only,r=j.default.getModuleAddAfter(),a=j.default.getProductTourModuleName(),i=r.fullwidth,l={};if(!("yes"===i&&!n||"no"===i&&n||""!==e.state.filterByTitle&&-1===t.title.toLowerCase().indexOf(e.state.filterByTitle.toLowerCase()))){if((0,I.isPostContentModule)(t.label)){if(ETBuilderBackend.postType!==ETBuilderBackend.themeBuilder.bodyLayoutPostType&&!r.is_theme_builder_body_area)return;if((0,k.default)(ETBuilderBackend.themeBuilder.postContentModules,(function(e,t){return e+j.default.getModuleCount(t)}),0)>0)return}return"selectModule"===e.state.currentTourElement&&a===t.label&&(l["et-fb-product-tour-element"]=!0),e.maxItemIndex.modules_all++,o.default.createElement(P.default,{label:t.label,title:t.title,fbSupport:t.vb_support,key:t.label,itemIndex:e.maxItemIndex.modules_all,selectedItemIndex:e.state.selectedItemIndex,icon:(0,w.default)(t,"icon",""),iconSvg:(0,w.default)(t,"icon_svg",""),onMouseEnter:e._onModuleItemMouseEnter,classnames:l})}}})),u.allModulesList=o.default.createElement("ul",{onMouseLeave:this._onModuleItemMouseLeave},l),u.moduleType="module";else if("et_pb_section"!==r||n.is_parent){if(("et_pb_row"===r||"et_pb_row_inner"===r)&&!n.is_parent||n.is_inner_row||"et_pb_section"===r&&n.is_parent){j.default.getLastAddedModuleData();var d={},p="regular",h="et_pb_column"===r?"et_pb_row_inner":r;u.settingsModalClass.et_fb_add_row_modal=!0,d.props={},"et_pb_row_inner"===h&&(p="specialty"),"on"===n.fullwidth&&(p="fullwidth"),d.props.section_parent=p,d.props.specialty_layout=n.specialty_layout,u.modalTitle=ee.insertRow,u.mainTabTitle=ee.newRow,u.allModulesList=o.default.createElement(D.default,q({active:"true",_onClick:this.addRow,row:d,selectedItemIndex:e.state.selectedItemIndex,setMaxItemIndex:e.setMaxItemIndex,currentTourElement:e.state.currentTourElement},this.props))}}else{var m=i?["et_fb_specialty"]:["et_fb_regular","et_fb_specialty","et_fb_fullwidth"],g={et_fb_regular:ee.regular,et_fb_fullwidth:ee.fullwidth,et_fb_specialty:ee.specialty};this.maxItemIndex.modules_all=0,u.modalTitle=ee.insertSection,u.mainTabTitle=ee.newSection,u.settingsModalClass.et_fb_add_section_modal=!0,l=(0,c.default)(m,(function(t){var n={};return e.maxItemIndex.modules_all++,"selectSectionType"===e.state.currentTourElement&&"et_fb_regular"===t&&(n["et-fb-product-tour-element"]=!0),o.default.createElement(P.default,{label:t,title:g[t],key:t,itemIndex:e.maxItemIndex.modules_all,selectedItemIndex:e.state.selectedItemIndex,onMouseEnter:e._onModuleItemMouseEnter,classnames:n})})),u.allModulesList=o.default.createElement("ul",{onMouseLeave:this._onModuleItemMouseLeave},l)}return u}},{key:"handle_tab_click",value:function(e){e.preventDefault(),this.isLibrary()&&this.state.library_loading||this.setState({active_tab:e.target.className,libraryBackToLayouts:!0})}},{key:"getSavedModulesList",value:function(){var e=this.getModuleType(),t=this.getSavedModulesArray(),n="";if(this.maxItemIndex.modules_library=0,!(0,h.default)(t))if("string"==typeof t)n=t;else{var r=this,a="",i=[];if("et_pb_row_inner"===e){var l=j.default.getModuleAddAfter();a=l.saved_specialty_column_type,i=4==("2_3"===a?4:3)?["4_4","1_2,1_2","1_3,1_3,1_3","1_4,1_4,1_4,1_4"]:["4_4","1_2,1_2","1_3,1_3,1_3"]}n=(0,c.default)(t,(function(t,n){if((""===a||(0,v.default)(i,t.row_layout))&&("all"===r.state.library_category||(0,v.default)(t.categories,r.state.library_category))){if(!(0,w.default)(t,"shortcode.0.type"))return!1;var l="global"===t.is_global?t.ID:"",u={};return u.et_fb_global="global"===t.is_global,(""===r.state.filterByTitle||-1!==t.title.toLowerCase().indexOf(r.state.filterByTitle.toLowerCase()))&&(r.maxItemIndex.modules_library++,o.default.createElement(P.default,{label:""!==t.module_type?t.module_type:e,title:t.title,key:n,savedShortcode:t.shortcode,globalID:l,onClickAction:"",itemIndex:r.maxItemIndex.modules_library,selectedItemIndex:r.state.selectedItemIndex,icon:(0,w.default)(t,"icon",""),iconSvg:(0,w.default)(t,"icon_svg",""),onMouseEnter:r._onModuleItemMouseEnter,classnames:u,isAddingIntoGlobal:r.isAddingIntoGlobal()}))}}))}return n}},{key:"insertLayout",value:function(e){var t="on"===this.state.replace_layout;E.default.insertSavedModule(e,!0,t),E.default.cancelTooltip()}},{key:"loadLibraryModules",value:function(){var e=this.getModuleType(),t="et_pb_row_inner"===e?"et_pb_row":e,n="yes"===j.default.getModuleAddAfter().fullwidth&&"et_pb_module"===e?"fullwidth":"regular";!1===j.default.getLibraryModules(t,n)&&E.default.getLibraryModules(t,n)}},{key:"getSavedModulesArray",value:function(){var e=this.getModuleType();"et_pb_row_inner"===e&&(e="et_pb_row");var t="yes"===j.default.getModuleAddAfter().fullwidth&&"et_pb_module"===e?"fullwidth":"regular";return j.default.getLibraryModules(e,t)}},{key:"_onLibraryLoaded",value:function(){var e=this.getModuleType();"et_pb_row_inner"===e&&(e="et_pb_row");var t="yes"===j.default.getModuleAddAfter().fullwidth&&"et_pb_module"===e?"fullwidth":"regular";this.setState({library_modules_updated:t+e,currentTourElement:j.default.getActiveProductTourElement()})}},{key:"setModalPosition",value:function(t){if(this.props.ignorePosition)return{};var n=j.default.getModuleAddAfter(),r=n.type,o=this.props.specialtyModal,a=this.props.modalPosition,i=!(0,d.default)(a)&&a,l=e(a.element).closest(".et-fb-skeleton"),u=ne?L.default.$topWindow("#et_pb_layout"):"",s=ne?u.offset().top:0,c=ne?u.offset().left:0,f=(0,w.default)(this,"props.previewMode"),p=!(0,d.default)(a)&&e((0,w.default)(a,"element","")),h=L.default.getAdminBarHeight(),m={},g=!1,y=!1;i&&!1!==a.element&&"rightClickMenu"!==a.element&&(0===(g=p&&p.length>0?p:L.default.$topWindow(".et-fb-page-settings-bar .et-fb-button--toggle-portability")).length&&(g=L.default.$topWindow(".et-fb-page-settings-bar .et-fb-button--toggle-add")),y=g.hasClass("et-fb-page-settings--tools"),(g.hasClass("et-fb-button-group")||y)&&(g.context?g=L.default.$topWindow(g.context):(0,w.default)(a,"element.prevObject")&&(g=L.default.$topWindow((0,w.default)(a,"element.prevObject"))))),!ne&&!re&&g&&g.length>0&&!L.default.isElementInViewport(g)&&g[0].scrollIntoView({block:"center"});var b=g&&g.closest(".et-fb-page-settings-bar").length>0,_=g?g.innerHeight()/2:0,k=g?g.innerWidth()/2:0,O=L.default.topViewportWidth(),S=L.default.topViewportHeight(),C=g?g.offset():a,T=ne||(0,v.default)(["zoom","tablet","phone"],f)?L.default.$topWindow().scrollTop():L.default.$appWindow().scrollTop(),P="rightClickMenu"===a.element;if("save_to_library"===this.props.actionType&&P&&(C.top=this.props.rightClickPosition.top,"zoom"===f&&(C.top=C.top/2),"app"===L.default.getWindowScrollLocation(f)&&(C.left=this.props.rightClickPosition.left)),ne&&(T-=s,T-=parseFloat(L.default.$topWindow("#et-bfb-app-frame").css("marginTop"))),m.class={},O<=502&&this.isLibrary())return m.style={top:0,left:0,right:!1,width:O,height:S,position:"fixed"},m;if(0===C.top&&0===C.left&&(C.top=a.top,C.left=a.left),!ne&&L.default.isResponsiveView(j.default.getPreviewMode())){var x=L.default.$topWindow("#et-fb-app-frame"),D=L.default.getIntegerValue(x.css("paddingTop"));C.top=C.top+D}var N=O<493?O-20:400,A=t||this.state.autoHeight,R=ne?-1*L.default.$topWindow("#adminmenuwrap").innerWidth():(0,v.default)(["tablet","phone"],f)?-1*L.default.$topWindow("#et-fb-app-frame").innerWidth()/2:0,B=(0,d.default)(this.props.modalHeight)||""===this.props.modalHeight?274:this.props.modalHeight,F=B,I=(0,d.default)(this.props.modalWidth)||""===this.props.modalWidth?N:this.props.modalWidth,W="zoom"!==f||b||"rightClickMenu"===a.element?C.left:C.left/2,V=!1,H=0;(W=W-I/2+k)>0?W=C.left+I/2+k>O?O-I-k-30:W:(V=Math.abs(R)<=Math.abs(W),H=Math.abs(W)-Math.abs(R),W=V?R:W),"et_pb_section"!==r||n.is_parent||o?"et_pb_row_inner"===r||n.is_inner_row?B=188:"modules_library"!==this.state.active_tab&&"portability"!==this.props.actionType&&("et_pb_row"===r||"et_pb_section"===r&&n.is_parent&&!o&&"yes"!==n.fullwidth)?B=284:"et_pb_section"===r&&o?B=320:"add_module"===this.props.actionType&&(B=385):B=198,y&&(B=290),"change_structure"===this.props.actionType&&p&&p.length>0&&p.closest(".et_pb_row_inner").length>0&&(B=148),"clear_layout"===this.props.actionType&&(B=200),F=(0,d.default)(A)||""===A?B:Math.max(B,Math.min(936,A));var G=T;!P||"save_to_library"===this.props.actionType||ne||(0,v.default)(["zoom","tablet","phone"],f)||(G=0),re&&(G+=L.default.viewportScrollTop());var U=G+S,z=G+S/2,q=(!ne||!b)&&C.top>=z,K=q?C.top-G:U-C.top,$=M.default.tooltipModal.top,Y=M.default.tooltipModal.bottom,X=q?$:Y;if(C.top,ne&&b&&(0,v.default)(["save_to_library","portability"],this.props.actionType)&&(K=S+T),F+X>K&&(F=Math.max(B,K-X)),b||this.isExpandedIconPicker()){this.isExpandedIconPicker()&&(0===g.closest(".et-fb-page-settings-bar").length&&(g=ne?L.default.$topWindow(".et-fb-page-settings-bar .et-fb-button--toggle-history"):L.default.$topWindow(".et-fb-page-settings-bar .et-fb-button--toggle-add")),ne&&L.default.$topWindow("html, body").animate({scrollTop:0},100,"swing"));var J=g.closest(".et-fb-page-settings-bar"),Q=J.hasClass("et-fb-page-settings-bar--vertical"),Z=J.hasClass("et-fb-page-settings-bar--corner"),ee=Z&&J.hasClass("et-fb-page-settings-bar--right-corner"),te=Z&&J.hasClass("et-fb-page-settings-bar--left-corner"),oe=J.hasClass("et-fb-page-settings-bar--right"),ae=Z&&J.hasClass("et-fb-page-settings-bar--top-corner"),ie=J.position().top,le=ne?J.offset().top+parseInt(J.height())+13:J.outerHeight(!0)+L.default.getAdminBarHeight(),ue=95,se=te?ue:W<(Q?80:10)?Q?80:10:Q?W-70:W,ce=this.isLibrary();if(oe&&(se-=L.default.maybeGetScrollbarWidth(f)),("modules_library"===this.state.active_tab||(0,v.default)(["save_to_library","portability","load_layout"],this.props.actionType))&&O<493&&(I=O<493?O-100-30:400),ce||this.isExpandedIconPicker()){var de=Q||ne?30:parseInt(J.height()),fe=ne||!Q&&!Z?50:ue,pe=ne?0:60-h;re&&(pe=-8),F=S-h-de-pe,I=Math.min(O-2*fe,1179),ne&&(ue=0),Q||Z||ne?(le=ae?le:h+pe,(W=(O-I)/2)<15&&(W=15)):W=(O-I-L.default.getScrollbarWidth())/2}if((Q||Z||this.props.helpModalActive&&!this.state.helpModalMoved||ne)&&(m.class["et-fb-tooltip--no-arrow"]=!0),L.default.getAdminBarHeight()===ie||ne)m.class={"et-fb-modal-settings--inversed":!ne||!ce,"et-fb-tooltip--no-arrow":Q||Z||this.props.helpModalActive&&!this.state.helpModalMoved||ne&&ce,"et-fb-tooltip--vertical-center":Q},!ce&&!this.isExpandedIconPicker()||ne||(F-=25,re&&!Q&&(F-=24));else{var he=ne?0:$;if((le=ie-F)960?I-=this.props.helpModal.width:window.innerWidth>960&&(W-=this.props.helpModal.width/2));var ge=ce||this.isExpandedIconPicker()?W:!ee&&se;return m.style={top:le,left:ge,right:!!ee&&ue,width:I,height:F,position:ne&&!ce?"absolute":"fixed"},m}var ye=(ne?L.default.$topWindow("#et-bfb-app-frame"):L.default.$topWindow("#et-fb-app-frame")).offset(),ve=ye.top;if(l.length>0){"save_to_library"===this.props.actionType&&l.hasClass("et-fb-skeleton--row");l.offset().left}"app"===L.default.getWindowScrollLocation(f)&&0===T&&0===ve&&C.top>S&&setTimeout((function(){E.default.cancelTooltip()}),300),ve=ne||(0,v.default)(["zoom","tablet","phone"],f)||P&&"save_to_library"!==this.props.actionType||this.props.renderInsideApp?ve:ve-T;var be="zoom"===f&&"rightClickMenu"!==a.element?C.top/2:C.top;be=be-F+(re?0:ve),this.props.forceFixedPosition||(W+=P?c:ye.left),W+I>O&&(W=O-I);var _e=0>W&&(this.props.forceFixedPosition||Math.abs(W)>ye.left)?10:W;if(_e=30>_e?30:_e,m.style={top:be,left:_e,width:I,height:F,position:this.props.forceFixedPosition?"fixed":"absolute"},this.props.forceFixedPosition&&"custom_content"===this.props.actionType)return(m.style.top<0||m.style.top+F>S)&&(m.style.top=m.style.top<0?50:S-F-100),(m.style.left<0||m.style.left+I>O)&&(m.style.left=m.style.left<0?50:O-I-100),m;"save_to_library"===this.props.actionType&&(m.class["et-fb-modal-settings--blue-bottom"]=!0);var we="app"===L.default.getWindowScrollLocation(f),ke=P&&we?L.default.$appWindow().scrollTop()-this.state.appWindowScrollTopOnload:0;if(m.style.top=m.style.top-ke,!q){var Oe=F+_+15;m.style.top=m.style.top+Oe,!ne&&m.style.height+X+_+15>K&&(m.style.height=m.style.height-_-15),m.class={"et-fb-modal-settings--inversed":!0},"save_to_library"===this.props.actionType&&(m.class["et-fb-modal-settings--blue-bottom"]=!1)}var Se=q&&ne?F:F+X;if(!this.windowScrolled&&F===B&&Se>K){var Ce=Se-K,Ee="desktop"!==f||ne?L.default.$topWindow().scrollTop():L.default.$appWindow().scrollTop(),Me=q?Ee-Ce:Ee+Ce;("desktop"!==f||ne?L.default.$topWindow("html, body"):L.default.$appWindow("html, body")).animate({scrollTop:Me},500,"swing")}if(V){var Te=L.default.$topWindow("head"),Pe="et-fb-modal-edge-style",xe=200-H-30,je="".concat(ETBuilderBackend.css.prefix," .et-fb-modal-add-module-container.et-fb-modal-settings--left-side:after {left: ").concat(xe,"px;}");Te.remove("#"+Pe),Te.append('")),m.class["et-fb-modal-settings--left-side"]=!0}return this.windowScrolled=!0,m}},{key:"addRow",value:function(e,t){t=(0,d.default)(t)?"et_pb_row":t,E.default.insertNewModule(t,e)}},{key:"_onClearLayout",value:function(e){e.preventDefault();var t=j.default.getActiveThemeBuilderArea();j.default.abIsMode("off",t)&&(E.default.performLayoutClearing(),E.default.cancelTooltip())}},{key:"_onClose",value:function(){_.default!==this.props._closeFunction?this.props._closeFunction():E.default.cancelTooltip()}},{key:"_onInput",value:function(e,t){var n=Z({},e,t);"filterByTitle"===e&&L.default.hasValue(this.state.filterByTitle)&&(n.selectedItemIndex=1,n.selectedItemUpdated=!0),this.setState(n)}},{key:"isPreloadingItems",value:function(e){return!!this.props.preloadingItems&&j.default.isPreloadingItem(e)}},{key:"render",value:function(){var e,t=this;if(!this.props.active)return!1;var n=j.default.getAppPreference("builder_animation"),r=(0,b.default)((Z(e={"et-fb-settings":!0,"et-fb-tooltip-modal":!0},"et-fb-tooltip-modal--".concat(this.props.actionType),!0),Z(e,"et-fb-modal-settings--container",!0),Z(e,"et-fb-modal-settings--".concat(this.state.active_tab),!0),Z(e,"et-fb-modal-add-module-container",!0),Z(e,"et-fb-moving",this.state.move),Z(e,"et-fb-movable-modal",this.props.movable),Z(e,"et-fb-tooltip-modal-animated","normal"===this.state.applyTransitionAnimation),Z(e,"et-fb-tooltip-modal-animated-fast","fast"===this.state.applyTransitionAnimation),e),this.props.classNames),a=!(0,d.default)(this.state.modalPositionData),s=a&&!(0,h.default)(this.state.modalPositionData)?this.state.modalPositionData:this.setModalPosition(),c=s.style,f="",p="";(0,d.default)(s.class)||(0,b.default)(r,s.class);var m="";switch(this.props.actionType){case"add_module":var g=this.generateAddModuleContent(),y=g.allModulesList,v=g.mainTabTitle,_=j.default.isProductTourActive()?j.default.getActiveProductTourElement():"",k={maxHeight:(0,w.default)(c,"height",100)-100},E=j.default.getModuleAddAfter().is_specialty_placeholder;"selectSectionType"===_&&(k.overflow="visible"),f=g.modalTitle,(0,b.default)(r,g.settingsModalClass);var M="module"===g.moduleType?o.default.createElement("div",{className:"et-fb-modules-filters et-fb-module-single-filter"},o.default.createElement(F.default,{type:"text",value:this.state.filterByTitle,name:"filterByTitle",_onChange:this._onInput,onKeyDown:this._onKeyDownEvent,additional_attrs:{placeholder:ee.search}})):"",P=j.default.isAllowedAction("add_library")&&j.default.isAllowedAction("divi_library")&&!E?o.default.createElement("li",{className:this.tabNavClassName("modules_library")},o.default.createElement("a",{href:"#",className:"modules_library",onClick:this.handle_tab_click},ee.addFromLibrary)):"",I=j.default.isAllowedAction("add_library")&&j.default.isAllowedAction("divi_library")?o.default.createElement("div",{className:this.tabClassName("modules_library")},o.default.createElement("div",{className:"et-fb-modules-filters"},o.default.createElement(R.default,{options:this.getLibraryCategoriesList(),value:this.state.library_category,name:"library_category",_onChange:this._onInput}),o.default.createElement(F.default,{type:"text",value:this.state.filterByTitle,name:"filterByTitle",_onChange:this._onInput,additional_attrs:{placeholder:ee.search}})),o.default.createElement("ul",{onMouseLeave:this._onModuleItemMouseLeave},this.getSavedModulesList()),o.default.createElement(B.default,{isLoading:this.isPreloadingItems("module")},o.default.createElement(N.default,{videoListId:"et_pb_save_to_library",trigger:"tooltip"}))):"";m=o.default.createElement("div",{className:"et-fb-main-settings et-fb-main-settings--add_new_module"},o.default.createElement("ul",{className:"et-fb-settings-tabs-nav",ref:"settingsTabsNav"},o.default.createElement("li",{className:this.tabNavClassName("modules_all")},o.default.createElement("a",{href:"#",className:"modules_all",onClick:this.handle_tab_click},v)),P),o.default.createElement("div",{className:"et-fb-settings-options-wrap",style:k},o.default.createElement("div",{className:"et-fb-settings-options"},o.default.createElement("div",{className:this.tabClassName("modules_all")},M,y),I)));break;case"load_layout":var V="et-fb-modal-settings--library";if(r[V]=!0,this.state.hasBackButton){r["".concat(V,"__layout")]=!0;var H={position:(0,u.spring)(-12,{stiffness:300,damping:20}),opacity:(0,u.spring)(1,{stiffness:300,damping:20})};f=o.default.createElement(u.Motion,{defaultStyle:{position:-40,opacity:0},style:H},(function(e){return o.default.createElement("div",null,o.default.createElement(A.default,{className:"et-fb-settings-button--back",buttonName:C.default.LIBRARY_MODAL_BACK_BUTTON,_onClick:t._onClickLibraryBackButton,primary:!0,style:{opacity:e.opacity,transform:"translateX( ".concat(e.position,"% )")}},o.default.createElement(T.default,{size:"14",icon:"back",color:"#FFFFFF"})),ee.layoutDetails)}))}else f=ee.loadLayout;m=o.default.createElement(O.default,{isLoading:this.state.library_loading,_renderTabs:this._renderTabs,doneLoading:this._onLibraryDoneLoading,pageChanged:this._onLibraryPageChanged,backToLayouts:this.state.libraryBackToLayouts,tabClassName:this.tabClassName,active_tab:this.state.active_tab,layoutFilters:this.props.layoutFilters,type:"layout",isProductTour:j.default.isProductTourActive(),productTourElement:this.state.currentTourElement,modalMoving:this.props.modalMoving,width:c.width,height:c.height});break;case"save_to_library":r.et_fb_save_module_modal=!0,f=ee.addToLibrary,m=o.default.createElement(x.default,{maxHeight:(0,w.default)(c,"height",70)-70});break;case"expanded_icon_picker":r["et-fb-modal-add-module-container"]=!1,f=ee.selectIcon,m=o.default.createElement(W.default,{selectedIcon:this.props.selectedIcon,handleChangeIcon:this.props.handleChangeIcon,closeModal:this.props._closeFunction,modalHeight:c.height,attrs:this.props.currentIconAttrs});break;case"change_structure":var G=j.default.getStructurallyChangedRow();f=ee.changeRow,m=o.default.createElement("div",{className:"et-fb-settings-options-wrap",style:{maxHeight:(0,w.default)(c,"height",100)-60}},o.default.createElement("div",{className:"et-fb-settings-options"},o.default.createElement(D.default,{row:G,selectedItemIndex:this.state.selectedItemIndex,setMaxItemIndex:this.setMaxItemIndex})));break;case"clear_layout":f=ee.clearLayout,m=o.default.createElement("div",{className:"et_fb_save_module_modal et_fb_clear_layout"},o.default.createElement("div",{className:"et-fb-settings-options"},ee.clearLayoutText),o.default.createElement("a",{href:"#",className:"et-fb-save-library-button",onClick:this._onClearLayout},ee.yes));break;case"portability":f=ee.portability,m=o.default.createElement(S.default,{_renderTabs:this._renderTabs,preloadingItems:this.props.preloadingItems,tabClassName:this.tabClassName,active_tab:this.state.active_tab,maxHeight:(0,w.default)(c,"height",140)-140,hasProgressBar:this.state.hasProgressBar}),L.default.isBFB()||(r["et-fb-modal-settings--blue-bottom"]=!this.state.hasProgressBar&&!this.props.preloadingItems);break;case"custom_content":f=this.props.tooltipTitle,p=(0,d.default)(this.props.buttons)?"":this.props.buttons,m=o.default.createElement("div",{className:"et-fb-main-settings et-fb-settings-options"},this.props.children)}var U=a?1:0,q="custom_content"!==this.props.actionType?"et-fb-tooltip-helper-container":"et-fb-tooltip-helper-container-custom",K=(0,w.default)(c,"position",""),$=o.default.createElement(o.Fragment,null,o.default.createElement(u.Motion,{key:K,defaultStyle:{size:.8},style:{size:n?(0,u.spring)(1,{stiffness:300,damping:20}):1}},(function(e){return o.default.createElement("div",{key:"modal",id:"et-fb-settings-column",ref:t.modal,className:(0,i.default)(r),onContextMenu:t._preventRightClick,onKeyDown:t._onKeyDownEvent,tabIndex:"0",style:z(z({},c),{},{opacity:U,transform:"scale( ".concat(e.size," )")})},o.default.createElement("div",{className:q},o.default.createElement("div",{className:"et-fb-module-settings"},o.default.createElement("h3",{className:"et-fb-settings-heading",onMouseDown:t._handleMove},f,o.default.createElement(A.default,{className:"et-fb-settings-button--close",buttonName:C.default.MODAL_SETTINGS_BUTTON_CLOSE,_onClick:t._onClose,primary:!0},o.default.createElement(T.default,{size:"14",icon:"close",color:"#FFFFFF"}))),m,p)))})),this.isLibrary()&&L.default.isBFB()&&o.default.createElement("div",{className:"et-core-modal-overlay et-core-active et-core-modal-overlay--library"}));return this.props.renderInsideApp?$:l.default.createPortal($,L.default.$topWindow("".concat(ETBuilderBackend.css.layoutPrefix," #et-fb-app"))[0])}}])&&K(n.prototype,r),a&&K(n,a),H}(o.default.Component);ie.propTypes=oe,ie.defaultProps=ae;var le=ie;t.default=le}).call(this,n(9))},function(e,t,n){"use strict";(function(e,r){function o(e){return o="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},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(506),i=Ve(n(325)),l=We(n(0)),u=Ve(n(7)),s=n(29),c=n(62),d=Ve(n(13)),f=Ve(n(61)),p=Ve(n(31)),h=Ve(n(385)),m=Ve(n(100)),g=Ve(n(125)),y=Ve(n(36)),v=Ve(n(8)),b=Ve(n(4)),_=Ve(n(41)),w=Ve(n(110)),k=Ve(n(178)),O=Ve(n(5)),S=Ve(n(10)),C=Ve(n(195)),E=Ve(n(3)),M=Ve(n(12)),T=Ve(n(38)),P=Ve(n(64)),x=Ve(n(63)),j=Ve(n(1)),D=Ve(n(11)),L=Ve(n(14)),N=Ve(n(142)),A=Ve(n(197)),R=Ve(n(151)),B=Ve(n(54)),F=Ve(n(119)),I=Ve(n(42)),W=Ve(n(131)),V=Ve(n(381)),H=Ve(n(352)),G=Ve(n(132)),U=Ve(n(68)),z=Ve(n(503)),q=Ve(n(509)),K=(Ve(n(297)),Ve(n(143))),$=Ve(n(360)),Y=Ve(n(350)),X=Ve(n(211)),J=Ve(n(279)),Q=Ve(n(606)),Z=n(607),ee=Ve(n(2)),te=Ve(n(17)),ne=n(153),re=Ve(n(15)),oe=Ve(n(39)),ae=Ve(n(58)),ie=Ve(n(278)),le=Ve(n(19)),ue=Ve(n(6)),se=Ve(n(22)),ce=Ve(n(770)),de=Ve(n(768)),fe=Ve(n(44)),pe=Ve(n(789)),he=Ve(n(57)),me=We(n(769)),ge=We(n(495)),ye=Ve(n(1482)),ve=Ve(n(1527)),be=Ve(n(1454)),_e=Ve(n(1767)),we=Ve(n(277)),ke=Ve(n(1508)),Oe=Ve(n(283)),Se=n(65),Ce=Ve(n(327)),Ee=Ve(n(1467)),Me=n(59),Te=Ve(n(777)),Pe=n(280),xe=n(384),je=Ve(n(88)),De=Ve(n(614)),Le=Ve(n(505)),Ne=Ve(n(610)),Ae=n(391),Re=Ve(n(393)),Be=n(616),Fe=Ve(n(1769));function Ie(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(Ie=function(e){return e?n:t})(e)}function We(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var n=Ie(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function Ve(e){return e&&e.__esModule?e:{default:e}}function He(){return He=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n600?300:10;t.mouseLeaveTimeout=setTimeout((function(){return t.setState({hoveredGroup:null})}),n)}t._setHoveredElement(!1)})),et(Qe(t),"_onToggleRightMenu",(function(e){t.props.onToggleRightMenu(e)})),et(Qe(t),"_onMouseEnterTitle",(function(){var e=t.props.module;if((0,j.default)(e,"props.is_module_child")){var n=Oe.default.getHelper("child_item").preparePayload(e),r=(0,j.default)(e,"props.type","");t._setHoveredElement("child_item",r,n)}else le.default.setHoveredModuleElement(e,{fromModalTitle:!0})})),et(Qe(t),"_onMouseLeaveTitle",(function(){le.default.setHoveredElement(!1)})),et(Qe(t),"_onClickHelp",(function(e){e=te.default.getFieldBaseName(e);var n=t.state.activeDescription===e?null:e;t.setState({activeDescription:n})})),et(Qe(t),"_onSwitchTab",(function(e,n,r){var o=t.state.toggleTabs,a=[e,n];(0,j.default)(o,a)!==r&&t.setState({toggleTabs:(0,B.default)($e({},o),a,r)})})),et(Qe(t),"_setHoveredElement",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};le.default.setHoveredElement(e,t,n)})),et(Qe(t),"isOptionHovered",(function(e){var t=ue.default.getMouseHoveredElement().elementId===e;return!t||"admin_label"!==e&&"background"!==e?t:"option"===ue.default.getMouseHoveredElement().type})),et(Qe(t),"_onTabSelect",(function(e){t.setState({tabSelectedIndex:e})})),et(Qe(t),"_onGlobalPresetsStateChange",(function(){var e=ue.default.getGlobalPresetsState().submitDialog;t.setState({isGlobalPresetsSubmitDialogVisible:e.isVisible})})),et(Qe(t),"_onBackToParent",(function(){var e=t.props.isGlobalPresetsMode?ae.default.BUTTON_GLOBAL_PRESETS_BACK_TO_PARENT:ae.default.MODULE_ITEM_BACK_TO_PARENT;le.default.buttonClick({props:{buttonName:e}},t._getModule())})),et(Qe(t),"_setHoveredElementWrapper",(function(e,n){var r=Oe.default.getHelper("modal_tab");if(e){var o=(0,f.default)(t._getTabs(),(function(e){return e.slug===n}));if(!o)return;var a=t._getNonEmptyToggles(t.props.module.props.type,n+".toggles",n),i=t._getOptionsFields(n),l=r.preparePayload(n,o.title,a,i,t.props.module);t._setHoveredElement(e,n,l)}else t._setHoveredElement(!1)})),t.displayName="ETBuilderSettingsModal",t.cache=new ct;var r=e.module,a=e.isGlobalPresetsMode;if(t.module_type=(0,Ae.maybeConvertModuleType)(r),t.state=(0,D.default)({activeDescription:null,activeHover:null,activeHoverField:null,hoveredGroup:null,openedToggle:"main_content",openedGeneralGroup:"main_content",openedDesignGroup:"",openedCSSGroup:"",advancedFields:t.module_type&&t.getComponentAdvancedFields(r,a),generalFields:t.module_type&&t.getComponentFields(r,a),cssFields:t.module_type&&t.getComponentCSSFields(r,a),filterOptions:e.filterOptions||"",filterSelected:e.filterSelected,filterNotice:!1,toggleTabs:{},isGlobalPresetsSubmitDialogVisible:!1,tabSelectedIndex:e.tabSelectedIndex||0,isModalRest:!1},t.getCustomTabsFields(t.module_type)),t.setting_resolver=t.getSettingResolver(),t.updatedAttrs={},!(0,j.default)(Qe(t),"props.module.props.is_official_module")){var i=t.maybeGetFirstOpenedToggle();i&&(t.state.openedToggle=i,t.state.openedGeneralGroup=i)}return t.settingsModalTabPanelNode=l.default.createRef(),t._hasColumnsFields=t._hasColumnsFields.bind(Qe(t)),t._onChange=t._onChange.bind(Qe(t)),t._onChangeDynamic=t._onChangeDynamic.bind(Qe(t)),t._resetOption=t._resetOption.bind(Qe(t)),t._isResetActive=t._isResetActive.bind(Qe(t)),t._onClickHelp=t._onClickHelp.bind(Qe(t)),t._onClickHover=t._onClickHover.bind(Qe(t)),t._onClickResponsive=t._onClickResponsive.bind(Qe(t)),t._onClickSticky=t._onClickSticky.bind(Qe(t)),t._onClickReset=t._onClickReset.bind(Qe(t)),t._onMouseEnterGroup=t._onMouseEnterGroup.bind(Qe(t)),t._onMouseLeaveGroup=t._onMouseLeaveGroup.bind(Qe(t)),t._onToggleRightMenu=t._onToggleRightMenu.bind(Qe(t)),t._onClickToggle=t._onClickToggle.bind(Qe(t)),t._handleFormSubmission=t._handleFormSubmission.bind(Qe(t)),t._unsyncGlobalSetting=t._unsyncGlobalSetting.bind(Qe(t)),t._unsyncGlobalContent=t._unsyncGlobalContent.bind(Qe(t)),t._onFilterInput=t._onFilterInput.bind(Qe(t)),t._onFilterSelect=t._onFilterSelect.bind(Qe(t)),t._onFilterChanged=t._onFilterChanged.bind(Qe(t)),t._onGoToOption=t._onGoToOption.bind(Qe(t)),t._isOptionMatchesFilter=t._isOptionMatchesFilter.bind(Qe(t)),t._handleShortcuts=t._handleShortcuts.bind(Qe(t)),t._onComponentAdvancedFieldDefinitionChange=t._onComponentAdvancedFieldDefinitionChange.bind(Qe(t)),t._onComponentFieldDefinitionChange=t._onComponentFieldDefinitionChange.bind(Qe(t)),t._onComponentCSSFieldDefinitionChange=t._onComponentCSSFieldDefinitionChange.bind(Qe(t)),t._onComponentDefinitionsChange=t._onComponentDefinitionsChange.bind(Qe(t)),t._onModalRest=t._onModalRest.bind(Qe(t)),t._getOptionsFields=t._getOptionsFields.bind(Qe(t)),t.getTabsCount=t.getTabsCount.bind(Qe(t)),t.maybeGetFirstOpenedToggle=t.maybeGetFirstOpenedToggle.bind(Qe(t)),t._onQuickAccessSwitchTab=t._onQuickAccessSwitchTab.bind(Qe(t)),t._onQuickAccessActive=t._onQuickAccessActive.bind(Qe(t)),t._setHoveredToggleElement=t._setHoveredToggleElement.bind(Qe(t)),t._setHoveredSubToggleElement=t._setHoveredSubToggleElement.bind(Qe(t)),t.productTourOptionToggle=!1,t.builder_display_modal_settings=ue.default.getAppPreference("builder_display_modal_settings"),t.mouseLeaveTimeout=0,t.hoverStarted=0,t.isModalRestTimeout=null,t}return rt(o,[{key:"getComponentFields",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=n||(0,Ae.maybeConvertModuleType)(e),o=n?"general_fields__".concat(n):r;if(this.cache.has(r,o))return this.cache.get(r,o);var a=ue.default.filterUserFields(se.default.getComponentFields(n?{props:{type:n}}:e,t));return this.cache.set(r,o,a),a}},{key:"getComponentAdvancedFields",value:function(e,t){var n=(0,Ae.maybeConvertModuleType)(e);if(this.cache.has(n,"advanced_fields"))return this.cache.get(n,"advanced_fields");var r=ue.default.filterUserFields(se.default.getComponentAdvancedFields(e,t));return this.cache.set(n,"advanced_fields",r),r}},{key:"getComponentCSSFields",value:function(e,t){var n=(0,Ae.maybeConvertModuleType)(e);if(this.cache.has(n,"css_fields"))return this.cache.get(n,"css_fields");var r=ue.default.filterUserFields(se.default.getComponentCSSFields(e,t));return this.cache.set(n,"css_fields",r),r}},{key:"getComponentCustomTabFields",value:function(e,t){if(this.cache.has(e,"custom_tab-".concat(t)))return this.cache.get(e,"custom_tab-".concat(t));var n=ue.default.filterUserFields(se.default.getComponentCustomTabFields(e,t));return this.cache.set(e,"custom_tab-".concat(t),n),n}},{key:"getModuleCustomTabs",value:function(e){if(this.cache.has(e,"module_custom_tabs"))return this.cache.get(e,"module_custom_tabs");var t=se.default.getComponentCustomTabs(e);return this.cache.set(e,"module_custom_tabs",t),t}},{key:"UNSAFE_componentWillMount",value:function(){this.cache.reset(),se.default.addComponentAdvancedFieldDefinitionChangeListener(this._onComponentAdvancedFieldDefinitionChange),se.default.addComponentFieldDefinitionChangeListener(this._onComponentFieldDefinitionChange),se.default.addComponentFieldDefinitionsChangeListener(this._onComponentFieldDefinitionsChange),se.default.addComponentCSSFieldDefinitionChangeListener(this._onComponentCSSFieldDefinitionChange),ue.default.addGoToOptionListener(this._onGoToOption),ue.default.addQuickAccessSwitchTabListener(this._onQuickAccessSwitchTab),ue.default.addQuickAccessActiveListener(this._onQuickAccessActive),ue.default.addOptionsFilterChangeListener(this._onFilterChanged),this._onChangeCacheReset=(0,I.default)(this._onChangeCacheReset,400,{leading:!0,trailing:!1})}},{key:"componentDidMount",value:function(){this.props.moduleRenderMode!==this.props.activeTabMode&&le.default.setModuleSettingMode(this.props.moduleRenderMode,!1),ee.default.topWindow().document.addEventListener("keydown",this._handleShortcuts),this.setState({tabsCount:this.getTabsCount()}),ue.default.addGlobalPresetsStateChangeListener(this._onGlobalPresetsStateChange),ue.default.addModulePresetChangeListener(this._onModulePresetChange),se.default.addComponentDefinitionsChangeListener(this._onComponentDefinitionsChange)}},{key:"componentDidUpdate",value:function(e,t){var n=this.props;if((0,j.default)(n,"module.props.address","")!==(0,j.default)(e,"module.props.address","")){var r=(0,j.default)(e,"module.props.is_module_child"),o=this.maybeGetFirstOpenedToggle(r);o&&this.setState({openedToggle:o})}this.props.module!==e.module&&(this.setting_resolver=this.getSettingResolver(),this.setState({tabsCount:this.getTabsCount()})),this.props.isGlobalPresetsMode!==e.isGlobalPresetsMode&&(this.setting_resolver=this.getSettingResolver()),n.isVisible&&!e.isVisible&&(this.setState({filterOptions:"",openedToggle:"main_content",filterSelected:void 0,filterNotice:!1}),this.productTourOptionToggle=!1),this.maybeShowFilterNotice()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){(0,b.default)(e.optionsFilter)||this.cache.reset();var t=(0,j.default)(e,"module.props.type");if(e.module&&this.props.module.type!==t&&!(0,_.default)(this.props,e)){this.props.isGlobalPresetsMode!==e.isGlobalPresetsMode&&this.cache.reset();var n=this.getComponentAdvancedFields(e.module,e.isGlobalPresetsMode),r=this.getComponentFields(e.module,e.isGlobalPresetsMode),o=this.getComponentCSSFields(e.module,e.isGlobalPresetsMode),a=(0,Ae.maybeConvertModuleType)(e.module),i=this.getCustomTabsFields(a);this.module_type=a,this.setState($e({advancedFields:n,generalFields:r,cssFields:o},i))}}},{key:"UNSAFE_componentWillUpdate",value:function(e){if(!(0,_.default)((0,j.default)(this,"props.isVisible"),(0,j.default)(e,"isVisible"))){var t=ue.default.getAppPreference("builder_display_modal_settings"),n=(0,j.default)(e,"module.props.type");if(t&&!(0,S.default)(n)){var r=(0,N.default)(se.default.getComponentFieldsByFieldTypes(e.module,["custom_margin","custom_padding","range"]));le.default.setListenerQuotaForGroup("settings-modal",r)}}}},{key:"componentWillUnmount",value:function(){ee.default.appWindow().clearTimeout(ee.default.appWindow().ETBuilderFormGroupMouseEnterTimeout),ee.default.appWindow().clearTimeout(this.mouseLeaveTimeout),at.flush(),se.default.removeComponentAdvancedFieldDefinitionChangedListener(this._onComponentAdvancedFieldDefinitionChange),se.default.removeComponentFieldDefinitionChangedListener(this._onComponentFieldDefinitionChange),se.default.removeComponentFieldDefinitionsChangedListener(this._onComponentFieldDefinitionsChange),se.default.removeComponentCSSFieldDefinitionChangedListener(this._onComponentCSSFieldDefinitionChange),se.default.removeComponentDefinitionsChangeListener(this._onComponentDefinitionsChange),ue.default.removeQuickAccessSwitchTabListener(this._onQuickAccessSwitchTab),ue.default.removeQuickAccessActiveListener(this._onQuickAccessActive),ue.default.removeOptionsFilterChangeListener(this._onFilterChanged),ee.default.topWindow().document.removeEventListener("keydown",this._handleShortcuts),clearTimeout(this.focusTimer),clearTimeout(this.filterNoticeTimer),clearTimeout(this.filterTimer),clearTimeout(this.goToOptionTimer),clearTimeout(this.quickAccessScrollUp),clearTimeout(this.quickAccessOpenToggle),clearTimeout(this.isModalRestTimeout),ue.default.removeGoToOptionListener(this._onGoToOption),ue.default.removeGlobalPresetsStateChangeListener(this._onGlobalPresetsStateChange),ue.default.removeModulePresetChangeListener(this._onModulePresetChange)}},{key:"maybeGetFirstOpenedToggle",value:function(e){var t=this.props.module,n=(0,j.default)(t,"props.type"),r=this._getNonEmptyToggles(n,"general.toggles","general"),o=(0,j.default)(r,"toggles"),a=(0,j.default)(o,this.state.openedToggle);if(e){var i=(0,j.default)(t,"props.module_items_config",{}),l=(0,j.default)(i,"toggle_slug");if(l)return l;if(!a)return"main_content"}if(a)return!1;if(!o)return!1;var u=(0,p.default)(o,(function(e,t){var n=(0,M.default)(e)?e:{title:e,priority:10};return n.name=t,n})),s=(0,H.default)(u,"priority","asc");return(0,j.default)((0,G.default)(s),"name","main_content")}},{key:"_updateSettingResolverGlobalPresetsAttrs",value:function(e,t){this.props.isGlobalPresetsMode&&(0,B.default)(this.setting_resolver,"source_object.props.attrs.".concat(e),t)}},{key:"_handleShortcuts",value:function(e){var t=this,n=e.metaKey,r=e.altKey,o=e.ctrlKey,a=27===e.keyCode,i=e.shiftKey,l=32===e.keyCode,u=ee.default.$topWindow((0,s.findDOMNode)(this)).find(".et-fb-options-filter input"),c=u.length>0&&u.is(":focus");if(c&&i&&l)e.preventDefault();else{if(a&&this._isFilterActive())return e.preventDefault(),this.filterTimer=setTimeout((function(){t.setState({filterOptions:"",filterSelected:void 0,filterNotice:!1})}),300),!1;!c||n||r||o||27===e.keyCode||e.stopPropagation(),a&&this.props.isGlobalPresetsMode&&(le.default.saveModulePresetSettings(this._getModule()),e.stopPropagation())}}},{key:"_onComponentAdvancedFieldDefinitionChange",value:function(e,t,n){if(!this.props.isGlobalPresetsMode){var r=(0,D.default)({},this.state.advancedFields);(0,B.default)(r,[e,t],n),this.cache.reset(),this.setState({advancedFields:r})}}},{key:"_onComponentFieldDefinitionChange",value:function(e,t,n){var r=(0,D.default)({},this.state.generalFields);(0,B.default)(r,[e,t],n),this.cache.reset(),this.setState({generalFields:r})}},{key:"_onComponentCSSFieldDefinitionChange",value:function(e,t,n){var r=(0,D.default)({},this.state.cssFields);(0,B.default)(r,[e,t],n),this.setState({cssFields:r})}},{key:"_onComponentDefinitionsChange",value:function(e){e===(0,j.default)(this._getModule(),"props.type")&&this._updateComponentDefinitions()}},{key:"_onModalRest",value:function(){var e=this;this.isModalRestTimeout=setTimeout((function(){e.setState({isModalRest:!0})}),1)}},{key:"getSettingResolver",value:function(){var e=this,t=new Q.default(this._getModule(),{},"props.attrs.");if(this.props.isGlobalPresetsMode){var n=ee.default.flattenFields($e($e($e({},this.getComponentFields(this._getModule())),this.getComponentAdvancedFields(this._getModule())),this.getComponentFields(this._getModule()))),r={};(0,v.default)(n,(function(t){t.show_if&&(0,v.default)((0,L.default)(t.show_if),(function(t){r[t]=(0,j.default)(e.props,"module.props.attrs.".concat(t))})),t.show_if_not&&(0,v.default)((0,L.default)(t.show_if_not),(function(t){r[t]=(0,j.default)(e.props,"module.props.attrs.".concat(t))}))})),t.source_object={props:{attrs:(0,D.default)({},r,this.getModuleAttrs())}}}return t}},{key:"getCustomTabsList",value:function(){var e=this.props.module,t=this.getModuleCustomTabs(e.props.type);return!(0,b.default)(t)&&t}},{key:"getCustomTabsFields",value:function(e){var t=this,n=this.getCustomTabsList();if(!n)return!1;var r={};return(0,v.default)(n,(function(n,o){var a="".concat(o,"Fields");r[a]=t.getComponentCustomTabFields(e,o)})),r}},{key:"_getModule",value:function(){return this.props.module}},{key:"getBulk",value:function(){var e=this._getModule(),t=(0,j.default)(e,"props.address");return(0,b.default)(e)?{}:ue.default.isMultiItemSelected(t)?ue.default.getMultiSelectItemsData():et({},t,e)}},{key:"getModuleAttrs",value:function(){var e=this._getModule(),t=(0,j.default)(e,"props.type"),n=(0,j.default)(e,"props.address"),r=ue.default.isMultiItemSelected(n);return this.props.isGlobalPresetsMode?se.default.getComponentGlobalPresets(e):r?Ce.default.generateSelectedAttrs(t,(0,j.default)(e,"props.attrs",{}),this.updatedAttrs):(0,j.default)(e,"props.attrs",{})}},{key:"_isVisible",value:function(e,t){var n=this;if(this.props.isGlobalPresetsMode){var r=(0,Y.default)(["animation"],(function(t){return!(0,x.default)(e.name,t)})),o=(0,Y.default)(["text_shadow"],(function(t){return-1===e.name.indexOf(t)}));if(r&&o)return!0}var a=this.getModuleAttrs(),i=se.default.getComponentDefaults(this.module_type),l=[];return(0,v.default)(e.depends_on,(function(r){var o=r,u=Te.default.isHoverMode()&&Te.default.isHoverEnabled(r,a),s=Te.default.isResponsiveMode()&&Te.default.isResponsiveEnabled(r,a);(u||s)&&(r=Te.default.getNameByMode(r,a));var c=(0,j.default)(t[r],"type","");if((0,j.default)(t[r],"depends_on",!1)&&!n._isVisible(t[r],t))return!1;var d=(0,j.default)(a,r,(0,j.default)(i,r,""));if((u||s)&&(0,S.default)(d)&&(d=(0,j.default)(i,o,(0,j.default)(t[o],"shortcode_default"))),"upload"!==c&&"text"!==c||""===d||(d="on"),(0,S.default)(e.depends_show_if)||d!==e.depends_show_if||l.push(r),!(0,S.default)(e.depends_show_if_not)){var f=e.depends_show_if_not;if((0,y.default)(e,"depends_on_responsive")&&(0,O.default)(e.depends_on_responsive,r)){var p=(0,j.default)(a,"".concat(r),""),h=(0,j.default)(a,"".concat(r,"_tablet"),""),m=(0,j.default)(a,"".concat(r,"_phone"),"");ee.default.getResponsiveStatus((0,j.default)(a,"".concat(r,"_last_edited")))?(0,O.default)(f,p)&&(0,O.default)(f,h)&&(0,O.default)(f,m)||l.push(r):(0,O.default)(f,p)||l.push(r)}else{((0,E.default)(f)?!(0,O.default)(f,d):d!==f)&&l.push(r)}}})),!(0,b.default)(l)}},{key:"_isModuleItemSettings",value:function(){return!(0,S.default)(this.props.module.isModuleItem)}},{key:"_isModalExpanded",value:function(){var e=(0,xe.getModalPreferredSnapSettings)(),t=e.snap,n=e.snapLocation,r=(0,xe.getModalPreferredDimensions)().width,o=(0,O.default)(["top","bottom"],n),a=ee.default.topWindow().innerWidth1200||r>1200)&&!a}},{key:"_isToggleOpened",value:function(e,t){var n="general"===t,r="design"===t,o="css"===t,a=this._isModalExpanded();if(t&&a){if(n)return this.state.openedGeneralGroup===e;if(r)return this.state.openedDesignGroup===e;if(o)return this.state.openedCSSGroup===e}return this.state.openedToggle===e}},{key:"_isMultiSelectMode",value:function(){var e=(0,j.default)(this._getModule(),"props.address");return ue.default.isMultiItemSelected(e)}},{key:"_hasColumnsFields",value:function(){var e=this.props.module.props.type,t=this.getModuleAttrs(),n=ee.default.isOn(t.specialty)&&"et_pb_section"===e;return(0,O.default)(["et_pb_row","et_pb_row_inner"],e)||n}},{key:"_hasModuleItem",value:function(){return!(0,P.default)(this.props.module.props.child_slug)&&!(0,S.default)(this.props.module.props.child_slug)}},{key:"_onChange",value:function(e,t,n,o,a){var i=this;this._onChangeCacheReset(),this._updateSettingResolverGlobalPresetsAttrs(e,t),this.updatedAttrs[e]=t;var l=(0,j.default)(this.props.module,"props.address"),u=ue.default.isMultiItemSelected(l);if("raw_content"!==e){var s=e.split("_"),c="padding_mobile"!==e&&"padding"===s[0]&&2===s.length;if(o)!(0,S.default)(this.props.module)&&this.props.module&&(u?le.default.multiSelectContentChange(this.props.module,t):le.default.moduleContentChange(this.props.module,t));else{(0,S.default)(this.props.module)||(0,S.default)(this.props.module.props)||"et_pb_social_media_follow_network"!==this.props.module.props.type||"social_network"!==e||(u?le.default.multiSelectContentChange(this.props.module,t):le.default.moduleContentChange(this.props.module,t));var d=(0,O.default)(["custom_css_before","custom_css_main_element","custom_css_after"],e)?e.replace("custom_css_",""):e,f=this._getModule(),h=this.getModuleAttrs(),m=(0,j.default)(f,"props.type"),g=(0,j.default)(h,"".concat(e)),b=ue.default.getHoverMode(),_=this._getAllOptionsFields()[d],w=(0,S.default)(_)||(0,S.default)(_.depends_on)?e:_.depends_on[0],k=!(0,S.default)(_)&&!!_.hover&&(te.default.isEnabled(e,h)||te.default.isEnabled(w,h)),C=!0===b&&!0===k?te.default.hoverSuffix():"",E=!1;if((0,x.default)(m,"et_pb_signup")){var M=ETBuilderBackend.emailPredefinedCustomFields,P=(0,j.default)(f,"parentModule.props.attrs"),D=this.getComponentFields({props:{type:"et_pb_signup"}}),L=(0,j.default)(D,"provider.default"),N=(0,j.default)(h,"provider",(0,j.default)(P,"provider",L)),A=Ue((0,j.default)(h,"".concat(N,"_list"),(0,j.default)(P,"".concat(N,"_list"),"")).split("|"),2),R=A[0],B=A[1];if("et_pb_signup"===m){var F=(0,y.default)(M,[N,R,B]);("provider"===e&&t!==g||F&&"".concat(N,"_list")===e&&t!==g)&&(E=!0)}else if("et_pb_signup_custom_field"===m&&(0,x.default)(e,"predefined_field_")&&t!==g){u?le.default.multiSelectSettingsChange(r,"predefined_field",t):this._emitSettingsChange(f,"predefined_field",t);var I=[N,R];(0,y.default)(M,[N,R,"custom_fields"])?I.push("custom_fields"):I.push(B),I.push(t);var W=(0,j.default)(M,I);if(W){if(W.field_id!==h.field_id&&(u?le.default.multiSelectSettingsChange(r,"field_id",W.field_id.toString()):this._emitSettingsChange(f,"field_id",W.field_id.toString())),W.name!==h.field_title&&(u?le.default.multiSelectSettingsChange(r,"field_title",W.name):this._emitSettingsChange(f,"field_title",W.name)),!(0,S.default)(W.hidden)||"on"===(0,j.default)(h,"hidden")){var V=W.hidden?"on":"off";V!==h.hidden&&(u?le.default.multiSelectSettingsChange(r,"hidden",V):this._emitSettingsChange(f,"hidden",V))}if("any"!==W.type&&W.type!==h.field_type&&(u?le.default.multiSelectSettingsChange(r,"field_type",W.type):this._emitSettingsChange(f,"field_type",W.type),W.options)){var H=(0,p.default)(W.options,(function(e,t){return{checked:0,value:e,id:t}}));u?le.default.multiSelectSettingsChange(r,"".concat(W.type,"_options"),JSON.stringify(H)):this._emitSettingsChange(f,"".concat(W.type,"_options"),JSON.stringify(H))}}}}if(c){var G=s[1],U=["padding_top_".concat(G).concat(C),"padding_right_".concat(G).concat(C),"padding_bottom_".concat(G).concat(C),"padding_left_".concat(G).concat(C),"padding_top_bottom_link_".concat(G).concat(C),"padding_left_right_link_".concat(G).concat(C)],z=(0,T.default)(t)?t.split("|"):["","","","","",""];(0,v.default)(U,(function(e,t){var r=(0,S.default)(z[t])?"":z[t];r!==h[e]&&(u?le.default.multiSelectSettingsChange(i.props.module,e,r,null,n):i._emitSettingsChange(f,e,r,null,n))}))}else 0===e.indexOf("custom_css")&&(ot.addClass("et_fb_preview_container__disable_animations"),at()),u?le.default.multiSelectSettingsChange(this.props.module,"".concat(e).concat(C),t,null,n,a):this._emitSettingsChange(f,"".concat(e).concat(C),t,null,n,a),E&&le.default.deleteModuleChildren((0,j.default)(f,"props.address"))}}else u?le.default.multiSelectContentChange(this.props.module,t):le.default.moduleContentChange(this.props.module,t)}},{key:"_isFilterActive",value:function(){return ee.default.hasValue(this.state.filterOptions)||ee.default.hasValue(this.state.filterSelected)}},{key:"_onChangeDynamic",value:function(e,t,n,r,o){"et_pb_counter"===this.props.module.props.type&&"content"===Te.default.getBaseName(e)&&this._onChange(e,"",n,!0),this._onChange(e,t,n,r,o)}},{key:"_resetOption",value:function(e){if(!(0,S.default)(e)&&""!==e){var t=this._getModule();this._emitSettingsChange(t,e,"")}}},{key:"_onClickHover",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this._getModule();if(r){var o=n&&(0,E.default)(n)?[e].concat(Ge(n)):[e],a=Te.default.getHoverEnabledToggleValue(e,this.getModuleAttrs(),this.props.activeTabMode),i=ue.default.isMultiItemSelected((0,j.default)(r,"props.address"));(0,v.default)(o,(function(e){var n=Te.default.getHoverEnabledName(e);i?le.default.multiSelectSettingsChange(r,n,a):t._emitSettingsChange(r,n,a)})),0===a.indexOf("on")||Te.default.isAnyHoverEnabled(this.getModuleAttrs())||(i?le.default.multiSelectSettingsChange(r,"hover_enabled",0):le.default.moduleSettingsChange(r,"hover_enabled",0),Te.default.isHoverMode()&&le.default.setModuleSettingMode("desktop",!0))}}},{key:"_onClickSticky",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this._getModule();if(r){var o=n&&(0,E.default)(n)?[e].concat(Ge(n)):[e],a=Te.default.getStickyEnabledToggleValue(e,this.getModuleAttrs(),this.props.activeTabMode),i=ue.default.isMultiItemSelected((0,j.default)(r,"props.address"));(0,v.default)(o,(function(e){var n=Te.default.getStickyEnabledName(e);i?le.default.multiSelectSettingsChange(r,n,a):t._emitSettingsChange(r,n,a)})),0===a.indexOf("on")||Te.default.isAnyStickyEnabled(this.getModuleAttrs())||(i?le.default.multiSelectSettingsChange(r,"sticky_enabled",0):le.default.moduleSettingsChange(r,"sticky_enabled",0),Te.default.isStickyMode()&&le.default.setModuleSettingMode("desktop",!0))}}},{key:"_onClickResponsive",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this._getModule();if(r){var o=n&&(0,E.default)(n)?[e].concat(Ge(n)):[e],a=Te.default.getResponsiveEnabledToggleValue(e,this.getModuleAttrs(),this.props.activeTabMode),i=ue.default.isMultiItemSelected((0,j.default)(r,"props.address"));(0,v.default)(o,(function(e){var n=Te.default.getResponsiveEnabledName(e);i?le.default.multiSelectSettingsChange(r,n,a):t._emitSettingsChange(r,n,a)})),0!==a.indexOf("on")&&Te.default.isResponsiveMode()&&!Te.default.isAnyResponsiveEnabled(this.getModuleAttrs())&&le.default.setModuleSettingMode("desktop",!0)}}},{key:"_onClickReset",value:function(e){var t=this,n=(0,j.default)(e,"props.name",!1);if(n){var r=this._getAllOptionsFields()[e.props.name],o=r&&r.type;if("select_box_shadow"!==o&&"presets_shadow"!==o){var l=this._getModule();if(l){var u=this.getModuleAttrs(),s=(0,j.default)(l,"props.address"),c=ue.default.isMultiItemSelected(s),d=(0,j.default)(e,"props.backgroundFields",!1),f=c?[]:i.default.getModuleAttrsUsingGlobalColors(l.props),p=function(e){f.includes(e)&&(0,a.removeFieldFromGlobalColors)(e,l.props,(function(e){var n=e.module,r=e.setting,o=e.newValue;t._emitSettingsChange(n,r,o)}))};if("display_conditions"!==n)if(d)(0,v.default)((0,L.default)(d),(function(e){var n=Te.default.getNameByMode(e,u);c?le.default.multiSelectSettingsChange(l,n,void 0,!1,void 0,!0):(t._emitSettingsChange(l,n,void 0,!1,void 0,!0),p(n))}));else if(lt(n)){var h=st(ut(n));c?h.map((function(e){return le.default.multiSelectSettingsChange(l,te.default.getCompositeFieldOnHover(e,n,u),void 0,!1,void 0,!0)})):h.map((function(e){return le.default.moduleSettingsChange(l,te.default.getCompositeFieldOnHover(e,n,u),void 0,!1,void 0,!0)}))}else{var m=Te.default.getNameByMode(n,u);if("content"===m){var g=ee.default.get((0,j.default)(e,"props.default_on_front"),ee.default.get((0,j.default)(e,"props.defaultValue"),(0,j.default)((0,j.default)(this._getAllOptionsFields(),n,{}),"default","")));c?le.default.multiSelectContentChange(l,g):le.default.moduleContentChange(l,g)}else c?le.default.multiSelectSettingsChange(l,m,void 0,!1,void 0,!0):(this._emitSettingsChange(l,m,void 0,!1,void 0,!0),p(m))}else{le.default.triggerDisplayConditionsReset();var y=Te.default.getNameByMode(n,u);this._emitSettingsChange(l,y,void 0,!1,void 0,!0)}}}else{var b=Re.default.getResetAction();le.default.rightClickMenuAction(b,"",{simulateRightClick:!0})}}}},{key:"_isResetActive",value:function(e){var t=this,n=(0,j.default)(e,"name",!1),r=this._getModule(),o=this.getModuleAttrs(),a=this.props.activeTabMode;if(!n||!(0,M.default)(r))return!1;var i=function(e){var t="desktop"!==a?ee.default.get((0,j.default)(e,"default"),(0,j.default)(e,"default_".concat(a))):(0,j.default)(e,"default");return(0,E.default)(t)?(0,j.default)((0,j.default)(t,1,{}),(0,j.default)(o,(0,j.default)(t,0))):t},l=function(e){return"content"===e?(0,j.default)(r,"props.content"):(0,j.default)(o,e)},u=(0,j.default)(e,"backgroundFields",!1)||(0,j.default)(e,"background_fields",!1);if(u){var s=(0,L.default)(u).filter((function(e){return!!(0,X.default)("_use_color_gradient",e)||(-1!==e.indexOf("_enable_")||"use_background_color_gradient"===e)}));return(0,U.default)(u,(function(e,t){var n=Te.default.getBaseName(t,o);if((0,O.default)(s,n))return!1;var r=Te.default.getNameByMode(n,o),u=l(r);if((0,S.default)(u))return!1;var c=i(e);return!("desktop"===a&&""===u&&!ee.default.hasValue(c))&&c!==u}))}if(lt(n)){var c=ut(n);return st(c).map((function(e){return(0,j.default)(t.state.advancedFields,"".concat(e,".default"),"")})).join("|")!==st(c).map((function(e){return(0,j.default)(o,"".concat(te.default.getCompositeFieldOnHover(e,n,o)))})).join("|")}var d=l(Te.default.getNameByMode(n,o));if((0,S.default)(d))return!1;var f=i(e);return!("desktop"===a&&""===d&&!ee.default.hasValue(f))&&f!==d}},{key:"_onClickToggle",value:function(e,t,n,r){if(!ue.default.getAppPreference("builder_display_modal_settings")){var o=this._isModalExpanded(),a=o?ie.default.topbar.mobile:10,i="general"===n,l="design"===n,u="css"===n;if(this._isToggleOpened(e,n)&&(0,S.default)(r)){if(i)return this.setState({openedGeneralGroup:"",openedToggle:""});if(l)return this._setHoveredToggleElement(e,!1,!0),this.setState({openedDesignGroup:"",openedToggle:""});if(u)return this.setState({openedCSSGroup:"",openedToggle:""})}if(!this._isToggleOpened(e)||(this.setState({openedToggle:""}),!(0,S.default)(r))){var c="design"===n?"advanced":n,d=".et-fb-tabs__panel--".concat(c," .et-fb-form__toggle[data-name='").concat(e,"']"),f=ee.default.$topWindow(d).prevAll(".et-fb-form__toggle").length+1,p=1===f?0:61*f-a,h=".et-fb-tabs__panel--".concat(c," .et-fb-settings-module-items-wrap");"general"===c&&ee.default.$topWindow(h).length&&(1===f&&(p+=ee.default.$topWindow(".et-fb-options-filter-input-wrap").height()),p+=ee.default.$topWindow(h).outerHeight()+30),o?ee.default.$topWindow((0,s.findDOMNode)(this)).find(".et-fb-tabs__panel--".concat(c)).animate({scrollTop:p},300):ee.default.$topWindow((0,s.findDOMNode)(this)).find(".et-fb-tabs__panel--active").animate({scrollTop:p},300),this.setState({openedToggle:e,openedGeneralGroup:"general"===n?e:this.state.openedGeneralGroup,openedDesignGroup:"design"===n?e:this.state.openedDesignGroup,openedCSSGroup:"css"===n?e:this.state.openedCSSGroup}),l&&this._setHoveredToggleElement(e,!0,!0)}}}},{key:"_onQuickAccessSwitchTab",value:function(){var e=ue.default.getActiveQuickAccess().clickedToggle.toggleGroupId,t="design"===e?"advanced":e,n=(0,J.default)(this._getTabs(),(function(e){return e.slug===t}));-1!==n&&this.setState({tabSelectedIndex:n})}},{key:"_onQuickAccessActive",value:function(){var e=this,t=ue.default.getActiveQuickAccess().clickedToggle,n=t.toggleId,r=t.toggleGroupId,o=t.toggleSubIdName,a=this._isModalExpanded(),i=ue.default.getAppPreference("builder_display_modal_settings"),l=a||i?ie.default.topbar.mobile:10,u="design"===r?"advanced":r,c=".et-fb-tabs__panel--".concat(u," .et-fb-form__toggle[data-name='").concat(n,"']");if(i)return clearTimeout(this.quickAccessScrollUp),void(this.quickAccessScrollUp=setTimeout((function(){var t=ee.default.$topWindow((0,s.findDOMNode)(e)).find(".et-fb-tabs__panel--".concat(u)),n=ee.default.$topWindow(c);if(0!==n.length){var r=n[0].offsetTop;t.animate({scrollTop:r},300)}}),0));var d=ee.default.$topWindow(c).prevAll(".et-fb-form__toggle").length+1,f=1===d?0:61*d-l;a?(ee.default.$topWindow((0,s.findDOMNode)(this)).find(".et-fb-tabs__panel--".concat(u)).animate({scrollTop:f},300),this.setState({openedToggle:n,openedGeneralGroup:"general"===r?n:this.state.openedGeneralGroup,openedDesignGroup:"design"===r?n:this.state.openedDesignGroup,openedCSSGroup:"css"===r?n:this.state.openedCSSGroup,toggleTabs:(0,B.default)($e({},this.state.toggleTabs),[r,n],o),filterOptions:"",filterSelected:void 0,filterNotice:!1})):(clearTimeout(this.quickAccessScrollUp),this.quickAccessScrollUp=setTimeout((function(){ee.default.$topWindow((0,s.findDOMNode)(e)).find(".et-fb-tabs__panel--active").animate({scrollTop:f},300)}),0),clearTimeout(this.quickAccessOpenToggle),this.quickAccessOpenToggle=setTimeout((function(){e.setState({openedToggle:n,openedGeneralGroup:"general"===r?n:e.state.openedGeneralGroup,openedDesignGroup:"design"===r?n:e.state.openedDesignGroup,openedCSSGroup:"css"===r?n:e.state.openedCSSGroup,toggleTabs:(0,B.default)($e({},e.state.toggleTabs),[r,n],o),filterOptions:"",filterSelected:void 0,filterNotice:!1})}),300))}},{key:"_setHoveredToggleElement",value:function(e,t,n){var r=this.props.module,o=(0,j.default)(r,"props.type"),a=(0,j.default)(r,"props.address");if(!(0,S.default)(Se.quickAccessModuleToggleId[o])){var i=Se.quickAccessModuleToggleId[o];if(!(0,S.default)(i[e])){var l={moduleAddress:a,toggleId:e,elementAddress:a,elementOrder:10,elementKey:null,elementOuter:null,toggleSubId:0,isChild:!(0,S.default)(r.isModuleItem),src:"settings",isOpened:t,hovered:n,isSubOpened:!1,subHovered:!1};le.default.quickAccessHighlight(l)}}}},{key:"_setHoveredSubToggleElement",value:function(e,t,n,r){var o=this.props.module,a=(0,j.default)(o,"props.address");if(!(0,S.default)(Se.quickAccessIdTextModule[e])){var i=Se.quickAccessIdTextModule[e],l=(0,q.default)(i);if(!(0,S.default)(l[t])){var u={moduleAddress:a,toggleId:e,elementAddress:a,elementOrder:10,elementKey:null,elementOuter:null,toggleSubId:t,isChild:!(0,S.default)(o.isModuleItem),src:"settings",isOpened:!0,hovered:!1,isSubOpened:n,subHovered:r};le.default.quickAccessHighlight(u)}}}},{key:"_unsyncGlobalContent",value:function(){this._unsyncGlobalSetting("et_pb_content_field",!0)}},{key:"_unsyncGlobalSetting",value:function(e,t){le.default.unsyncGlobalSetting(e,this.props.module,t)}},{key:"_handleFormSubmission",value:function(t){if(t.preventDefault(),((0,S.default)((0,j.default)(this,"props.module.props.loading"))||!this.props.module.props.loading)&&!e((0,s.findDOMNode)(this)).find(":focus").hasClass("wp-color-picker")){var n=this,r=this.props.module;(0,v.default)(this.state.generalFields,(function(e){"text"===e.type&&((0,S.default)(e.name)||-1===e.name.indexOf("url")&&-1===e.name.indexOf("alt")&&-1===e.name.indexOf("link")&&n._onChange(e.name,ee.default.decodeHtmlEntities(r.props.attrs[e.name])))})),le.default.closeSettings(this._isModuleItemSettings())}}},{key:"_handleFieldConditionalDefaults",value:function(e,t,n){if((0,E.default)(e.default)&&"filter"===(0,j.default)(e,"default.0")){var r=(0,j.default)(e,"default.1").split("_").join(".");return $e($e({},e),{},{default:(0,ne.applyFilters)(r,e)})}return(0,E.default)(e.default)&&!(0,b.default)(e.default)?$e($e({},e),{},{conditionalDefaults:e.default,default:n&&!(0,b.default)((0,j.default)(t,e.name))?(0,j.default)(t,e.name):ee.default.getConditionalDefault(e.default,t,!1,n)}):$e({},e)}},{key:"isGlobalModuleOpened",value:function(e){if(this.props.isGlobalPresetsMode)return!1;var t=this._getModule(),n=(0,O.default)(["et_pb_section","et_pb_row","et_pb_row_inner"],(0,j.default)(t,"props.type",""))?(0,j.default)(t,"props.type",""):"et_pb_module";if(ue.default.isLibraryPostType()&&"global"===ETBuilderBackend.layoutScope){if(e){var r="et_pb_".concat(ETBuilderBackend.layoutType);return!(0,j.default)(t,"isModuleItem")&&r===n}return!0}var o=this.getModuleAttrs(),a=(0,j.default)(o,"global_parent",""),i=(0,j.default)(o,"global_module",""),l=(0,j.default)(t,"props.address").split(".");if(!e&&l.length>1){var u=!1,s=ee.default.getModuleAddressSequence(l);return(0,v.default)(s,(function(e){var t=(0,f.default)(ue.default.getSectionsFlattened(),{address:e});if(""!==(0,j.default)(t,"attrs.global_module",""))return u=!0,!1})),u}return!e&&""!==a&&"et_pb_section"!==n||(""!==i||!(0,S.default)(t.props.libraryModuleScope)&&"global"===t.props.libraryModuleScope)}},{key:"getGlobalTabClass",value:function(){if(this.isGlobalModuleOpened())return"et-fb-tabs__item__global"}},{key:"getGlobalModalClass",value:function(e){var t=(0,S.default)(e)?"":e;if(this.isGlobalModuleOpened())return"".concat(t,"__global")}},{key:"isGlobalOptionSynced",value:function(e){if(!this.isGlobalModuleOpened())return!0;var t=(0,j.default)(this.props.module,"props.unsyncedGlobalSettings",[]);return!(0,O.default)(t,e)}},{key:"isSelectiveSyncAvailable",value:function(e){return!(0,j.default)(e,"hide_sync",!1)&&(this.isGlobalModuleOpened(!0)&&!(0,O.default)(["et_pb_section","et_pb_row","et_pb_row_inner"],this.props.module.props.type))}},{key:"_onFilterInput",value:function(e){le.default.setOptionsFilter({filterOptions:e,filterSelected:this.state.filterSelected}),this.setState({filterOptions:e,filterNotice:!1})}},{key:"_onFilterSelect",value:function(e){le.default.setOptionsFilter({filterOptions:this.state.filterOptions,filterSelected:e}),this.setState({filterSelected:e,filterNotice:!1})}},{key:"_onFilterChanged",value:function(e){this.setState({filterSelected:e,filterNotice:!1})}},{key:"_onGoToOption",value:function(t){var n=this;if(!(0,b.default)(t)){(0,x.default)(t.elementId,"transform_")&&(t.elementId="transform_styles");var r=this.props.module,o=[{slug:"general",toggleGroupId:"general"},{slug:"advanced",toggleGroupId:"design"},{slug:"css",toggleGroupId:"css"}],a=this.getCustomTabsList();a&&(0,v.default)(a,(function(e,t){o.push({slug:t,toggleGroupId:t})}));var i={};(0,v.default)(o,(function(e,o){var a=n._getNonEmptyToggles(r.props.type,"".concat(e.slug,".toggles"),e.slug).toggles;if("option"===(0,j.default)(t,"type")){var l=n._getOptionsFields(e.slug);if((0,v.default)(l,(function(n,r){var a=(0,S.default)(n.name)?r:n.name;((0,E.default)(t.elementId)&&(0,O.default)(t.elementId,a)||(0,T.default)(t.elementId)&&t.elementId===a)&&(i={tabSlug:e.slug,toggleGroupId:e.toggleGroupId,keyCompare:a,fieldData:n,tabSelectedIndex:o})})),!(0,b.default)(i)){var u=0;(0,v.default)(a,(function(e,t){u++,t===i.fieldData.toggle_slug&&(i.toggleId=t,i.toggleOrder=u)}))}}else if(e.toggleGroupId===(0,j.default)(t,"payload.toggleGroupId")){i={tabSlug:e.slug,toggleGroupId:e.toggleGroupId,tabSelectedIndex:o};var s=0;(0,v.default)(a,(function(e,n){s++,n===(0,j.default)(t,"payload.toggleId")&&(i.toggleId=n,i.toggleOrder=s)}))}})),(0,b.default)(i)||(0,S.default)(i.toggleId)||(0,S.default)(i.toggleOrder)?this.setState({filterOptions:"",filterSelected:void 0,filterNotice:!1}):(this.setState({tabSelectedIndex:i.tabSelectedIndex,filterOptions:"",filterSelected:void 0,filterNotice:!1}),clearTimeout(this.goToOptionTimer),this.goToOptionTimer=setTimeout((function(){e((0,s.findDOMNode)(n)).find(".et-fb-tabs__item").each((function(t,n){t===i.tabSelectedIndex&&e(n).trigger("click")})),n._onClickToggle(i.toggleId,i.toggleOrder,i.toggleGroupId,!0)}),100))}}},{key:"_getNonEmptyToggles",value:function(e,t,n){var r="css.toggles"===t?"custom_css.toggles":t,o="".concat(r,"_").concat(n,"_toggles"),a=(0,j.default)(this.props,"module.props.address"),i=ue.default.isMultiItemSelected(a),l=ue.default.getMultiSelectElementsType();if(this.cache.has(e,o)&&!i)return this.cache.get(e,o);var u={};if(i){if(this.cache.hasElements(l,o))return this.cache.getElements(l,o);u=Ce.default.generateSelectedToggles(r)}var s=(0,b.default)(u)?(0,D.default)({unclassified:{title:"",priority:10}},(0,j.default)(se.default.getOptionsToggles(e),r,{})):u,c=this._getOptionsFields(n),d=(this.getBackgroundFieldsNames(),{}),f={};(0,v.default)(c,(function(e){var t=e.toggle_slug,n=e.name,r=e.depends_on,o=e.show_if,a=e.show_if_not,i=e.type;(0,O.default)(["skip","computed"],i)||(0,S.default)(n)||(t=(0,S.default)(t)?"unclassified":t,(0,B.default)(d,t,!0),r||o||a||(0,B.default)(f,t,!0))}));var p={toggles:(0,F.default)(s,(function(e,t){return(0,y.default)(d,t)})),safe:f};return i?this.cache.setElements(l,o,p):this.cache.set(e,o,p),p}},{key:"_isFieldValueModified",value:function(e,t,n,r){var o=this,a=!1,i=(0,S.default)(e.name)?void 0:t[e.name],l=e.default;if((0,S.default)(i)&&"content"===e.name&&!(0,S.default)(this.props.module.props.content)&&(i=(0,j.default)(this,"props.module.props.content")),!(0,S.default)(e.default_from)){var u=e.default_from.split(".").pop();!u||(0,S.default)(r[u])||(0,S.default)(r[u].default)||(l=r[u].default)}if(!(0,S.default)(e.name)&&((0,X.default)(e.name,"_tablet")||(0,X.default)(e.name,"_phone"))){var s=re.default.getFieldBaseName(e.name),c=e.name.replace(s,"");if((0,y.default)(r,s)){var d=r[s];(0,y.default)(d,"default".concat(c))&&(l=d["default".concat(c)])}}switch(!(0,b.default)(i)&&(0,T.default)(i)&&(i=i.toLowerCase()),!(0,b.default)(l)&&(0,T.default)(l)&&(l=l.toLowerCase()),e.type){case"font":a=!(0,b.default)(i)&&"||||||||"!==i&&i!==l;break;case"custom_padding":case"custom_margin":a=!(0,b.default)(i)&&i!==l;break;case"border-radius":a=!(0,b.default)(i)&&"||||"!==i&&"on||||"!==i&&i!==l;break;case"multiple_checkboxes":a=!((0,b.default)(i)||(0,T.default)(i)&&-1===i.indexOf("on"))&&i!==l;break;case"tiny_mce":a=!((0,b.default)(i)||(0,T.default)(i)&&!i.replace(/(?:
|\n)/g,"").length)&&i!==l;break;case"range":var f=e.default_unit;if(!(0,S.default)(e.default_from)){var p=e.default_from.split(".").pop();(0,S.default)(r[p])||(0,S.default)(r[p].default_unit)||(f=r[p].default_unit)}(0,E.default)(l)&&(l=l[1][t[l[0]]]),f&&(i&&-1===i.indexOf(f)&&(i="".concat(i).concat(f)),l&&-1===l.indexOf(f)&&(l="".concat(l).concat(f))),a=!(0,b.default)(i)&&i!==l;break;case"color-alpha":a=!(0,b.default)(i)&&l!==i;break;case"yes_no_button":a=!(0,b.default)(i)&&"off"!==i&&l!==i;break;case"select":a=!(!ee.default.hasValue(i)||(0,M.default)(e.options)&&!(0,b.default)(e.options)&&Object.keys(e.options)[0]===i)&&l!==i;break;case"composite":(0,S.default)(e.composite_structure)||(0,v.default)(e.composite_structure,(function(e){(0,S.default)(e.controls)||(0,v.default)(e.controls,(function(i,l){var u=$e($e({},i),{},{name:l}),s=$e($e({},r),e.controls);!o._isFieldDependencyExcluded(u,s)&&o._isFieldValueModified(u,t,n,s)&&(a=!0)}))}));break;case"background":if(!(a=(!(0,T.default)(i)||!(0,b.default)(i))&&l!==i)&&!(0,b.default)(e.backgroundFields)){var h=e.name.split("_").slice(-1).pop();h&&(0,v.default)(["background_color_%s","use_background_color_gradient_%s","bg_img_%s","background_video_mp4_%s","background_video_webm_%s"],(function(e){var n=e.replace("%s",h);(0,b.default)(t[n])||"off"===t[n]||(a=!0)}))}break;default:a=!(!(0,w.default)(i)&&!(0,z.default)(i)&&(0,b.default)(i))&&l!==i}if(!a&&this._isOptionMatchesStylesResponsive(e,t)){var m=$e($e({},e),{},{name:"".concat(e.name,"_tablet"),default:(0,y.default)(e,"default_tablet")?e.default_tablet:l,mobile_options:void 0});if(this._isFieldValueModified(m,t,n,r)&&(a=!0),!a){var g=$e($e({},e),{},{name:"".concat(e.name,"_phone"),default:(0,y.default)(e,"default_phone")?e.default_tablet:m.default,mobile_options:void 0});this._isFieldValueModified(g,t,n,r)&&(a=!0)}}return a}},{key:"_isOptionMatchesStylesModified",value:function(e,t,n,r){var o=this;if("general"===n&&!(0,S.default)(e.toggle_slug)&&"background"!==e.toggle_slug)return!1;if(!(0,O.default)(["general","advanced","css"],n)&&(0,O.default)(["text","textarea","tiny_mce","date_picker"],e.type))return!1;var a=this._isFieldValueModified(e,t,n,r);return a||"background_color"!==e.name||(0,v.default)(it,(function(e){(0,S.default)(r[e])||o._isFieldValueModified(r[e],t,n,r)&&(a=!0)})),a}},{key:"_isOptionMatchesStylesResponsive",value:function(e,t){if((0,S.default)(e.mobile_options))return!1;var n=t["".concat(e.name,"_last_edited")],r=(0,S.default)(n)?["off","desktop"]:n.split("|");return!(0,S.default)(r[0])&&"on"===r[0]}},{key:"_isOptionMatchesStylesHover",value:function(e,t){var n="background_color"===e.name?"background":e.name;return te.default.isEnabled(n,t)}},{key:"_isOptionMatchesStylesSticky",value:function(e,t){var n="background_color"===e.name?"background":e.name;return oe.default.isEnabled(n,t)}},{key:"_isOptionMatchesActiveContent",value:function(e,t,n,r){return!("general"===n&&!(0,S.default)(e.toggle_slug)&&"background"===e.toggle_slug)&&(!(0,O.default)(["advanced","css"],n)&&(!(!(0,O.default)(["general","advanced","css"],n)&&!(0,O.default)(["text","textarea","tiny_mce","date_picker"],e.type))&&this._isFieldValueModified(e,t,n,r)))}},{key:"_isFieldDependencyExcluded",value:function(e,t){return!(0,S.default)(e.depends_on)&&!this._isVisible(e,t)||!((0,S.default)(e.show_if)&&(0,S.default)(e.show_if_not)||(0,Z.canShowField)(e,this.setting_resolver))}},{key:"_getFilteredFields",value:function(e){var t=this,n=this._getOptionsFields(e),r=this.state.filterOptions,o=this.state.filterSelected;if(!this._isFilterActive())return n;var a=this.props.module.props.type,i="".concat(e,"_filter");if(this.cache.has(a,i)){var l=this.cache.get(a,i);if(l.search===r&&l.filterSelected===o)return l.filtered}var u=this.getModuleAttrs(),s=(0,j.default)(this,"props.module.props.content"),c={};(0,v.default)(n,(function(e){var t=e.type,n=e.name,r=e.is_fb_content;if("codemirror"===t||n&&0===n.indexOf("custom_css_")){var o=r?s:u[n];o&&(c[n]=o)}}));var d=(0,F.default)(n,(function(e){var n=e.type,r=e.label,o=e.description,a=e.name;return"composite"===n||t._isOptionMatchesFilter(r,o,c[a])}));return ee.default.hasValue(o)?(d=this._isOptionMatchesFilterSelected(d,e),this.cache.set(a,i,{search:r,filterSelected:o,filtered:d}),d):(this.cache.set(a,i,{search:r,filterSelected:o,filtered:d}),d)}},{key:"_getFilteredToggleFields",value:function(e,t,n){var r=this.state.filterOptions,o=this.state.filterSelected;if(!this._isFilterActive())return t;var a=this.props.module.props.type,i="".concat(n,"_").concat(e,"_filter_toggle");if(this.cache.has(a,i)){var l=this.cache.get(a,i);if(l.search===r&&l.filterSelected===o)return l.filtered}return this._isOptionMatchesFilter(e)&&(t=this._getOptionsFields(n)),ee.default.hasValue(o)?(t=this._isOptionMatchesFilterSelected(t,n),this.cache.set(a,i,{search:r,filterSelected:o,filtered:t}),t):(this.cache.set(a,i,{search:r,filterSelected:o,filtered:t}),t)}},{key:"_isOptionMatchesFilterSelected",value:function(e,t){var n=this,r=this._getOptionsFields(t),o=this.getModuleAttrs();return(0,F.default)(e,(function(e){if(n._isFieldDependencyExcluded(e,r))return!1;switch(n.state.filterSelected){case"styles_modified":return n._isOptionMatchesStylesModified(e,o,t,r);case"styles_responsive":return n._isOptionMatchesStylesResponsive(e,o);case"styles_hover":return n._isOptionMatchesStylesHover(e,o);case"styles_sticky":return n._isOptionMatchesStylesSticky(e,o);case"active_content":return n._isOptionMatchesActiveContent(e,o,t,r);default:return!1}}))}},{key:"_isOptionMatchesFilter",value:function(){for(var e=this.state.filterOptions.toLowerCase(),t=!1,n=arguments.length,r=new Array(n),o=0;o2&&void 0!==arguments[2]&&arguments[2],o=["general","advanced","css"],a="advanced"===e?"design":e,i=(0,O.default)(o,e)?"".concat(e,"_settings"):e;if(i="css"===e?"custom_css_settings":i,!ue.default.isAllowedAction(i))return!1;var u=this,s=u.props,c=s.module,h=s.activeTabMode,g=ue.default.isMultiItemSelected(c.props.address),E=[],P=(0,O.default)(["et_pb_column","et_pb_column_inner"],c.props.type),x=!(!c.isModuleItem||(0,S.default)(c.parentModule.props.type)||P)&&c.parentModule.props.type,A=this._getAllOptionsFields(),F=this._getFilteredFields(e),I=this.getModuleFields(),W=(0,L.default)(I),V=W.reduce((function(e,t){return e||!!t.match(/background_color(_[0-9])?$/)}),!1),H=this._getNonEmptyToggles(c.props.type,"".concat(e,".toggles"),e),G=H.safe,U=H.toggles;this.setting_resolver.property_definitions=A,"et_pb_signup_custom_field"===(0,j.default)(c,"props.child_slug")&&(this.setting_resolver.child_property_definitions=this.getComponentFields(c,!1,"et_pb_signup_custom_field")),"et_pb_signup_custom_field"===(0,j.default)(c,"props.type")&&(this.setting_resolver.property_definitions.parentModule=this.getComponentFields({props:{type:"et_pb_signup"}}));var z=0,q=e!==t,K="general"===e&&!g&&this._renderModuleItems(),$=(0,j.default)(c,"props.module_items_config",{}),Y=(0,j.default)($,"toggle_slug"),X=(0,j.default)($,"location"),J=(0,b.default)($)||(0,Z.canShowField)($,this.setting_resolver),Q=["et_pb_section","et_pb_row","et_pb_row_inner","et_pb_column"],ne="";if((0,O.default)(Q,c.props.type))ne=(0,f.default)(ETBuilderBackend.structureModules,{slug:c.props.type}).name;else{var ae=(0,f.default)(ETBuilderBackend.modules,{label:c.props.type});(0,S.default)(ae)||(0,S.default)(ae.title)||(ne=ae.title)}var ie=ue.default.getActiveQuickAccess(),le=ie.clickedToggle,se=le.toggleId,ce=le.toggleSubId,de=(0,xe.getModalPreferredDimensions)(),fe=de.width,pe=(0,j.default)(this.state.toggleTabs,a,{}),he=(0,j.default)(this,"props.module.props.type"),ve=(0,O.default)(["et_pb_row","et_pb_row_inner"],he)&&!this.props.isGlobalPresetsMode,Se=(0,j.default)(this._getModule(),"props.is_official_module"),je=((0,j.default)(this._getModule(),"props.address",""),this.getModuleAttrs()),De=this._isFilterActive(),Le=this.props.isGlobalPresetsMode?"settings-modal-back":"settings-modal-front",Ne=(0,j.default)(this._getModule(),"parentModule.props.attrs");return l.default.createElement(me.ETBuilderTabPanel,{key:"et-fb-tabs__panel--".concat(a),className:"et-fb-tabs__panel--".concat(e),slug:e,isModuleItemSettings:this._isModuleItemSettings(),displayFilter:r,filterValue:this.state.filterOptions,_onFilterInput:this._onFilterInput,tabsCount:this.state.tabsCount,filterItems:this._getFilterItems(),filterGroups:{show_only:ETBuilderBackend.i18n.modals.show_only},filterSelected:this.state.filterSelected,filterNotice:this.state.filterNotice,_onFilterSelect:this._onFilterSelect,filterName:Le,passedRef:this.settingsModalTabPanelNode},l.default.createElement(ge.default,{onSubmit:this._handleFormSubmission},l.default.createElement("input",{type:"submit",className:"et-fb-hide"}),J&&(0,S.default)(Y)&&!ve&&K,(0,p.default)(U,(function(t,r){if(Se||!n.props.isGlobalPresetsMode||"general"!==e||"background"===r){z++;var o=(0,M.default)(t)?t.title:t,i=(0,M.default)(t)?t.sub_toggles:{},s=!(0,b.default)(i)&&(0,j.default)(t,"tabbed_subtoggles",!1),f=n._getFilteredToggleFields(o,F,e),P=(0,y.default)(G,r)&&"unclassified"!==r,W=(0,j.default)(t,"always_open",!1),H=!P||n.renderToggleFields(r,a)||W,$=n._isToggleOpened(r,a)||!q&&n._isValidProductTourToggle(r,U)||n.productTourOptionToggle===r||W,Q=(0,N.default)(U)===z;ee.default.hasValue(o)||"unclassified"!==r||(o=ne);var ae=se===r?ce:0,ie=!!i&&(0,L.default)(i)[0],le={};return l.default.createElement(ge.ETBuilderFormToggle,{fields:f,key:r,title:o,nonDefaultOptions:le,toggleId:r,toggleGroupId:a,toggleSubId:ae,_onClickToggle:n._onClickToggle,_onSwitchTab:n._onSwitchTab,setHoveredToggleElement:n._setHoveredToggleElement,setHoveredSubToggleElement:n._setHoveredSubToggleElement,isToggleOpened:$,toggleOrder:z,isLastToggle:Q,isFilterActive:De,isGroupActive:!n.builder_display_modal_settings,showEmpty:P,subToggles:i,tabbedSubtoggles:s,setHoveredElement:function(e,t){if(e){var r=t.props.toggleId,o=Oe.default.getHelper(e);if(o){var a=o.preparePayload(t,n.props.module);n._setHoveredElement(e,r,a)}}},alwaysVisible:W,onToggleRightMenu:n._onToggleRightMenu},J&&r===Y&&"top"===X&&K,!!H&&(0,p.default)(f,(function(t,o){var i=t,f=(0,j.default)(i,"toggle_slug","unclassified"),p=(0,S.default)(i.type)&&"css"===e?"codemirror":i.type;if(f!==r||(0,S.default)(p))return!1;if(!(0,S.default)(i.specialty_only)&&"yes"===i.specialty_only&&((0,S.default)(je.specialty)||"on"!==je.specialty))return!1;if("required_mark"===i.name&&"et_pb_signup"===x&&"getresponse"===(0,j.default)(c,"parentModule.props.attrs.provider"))return!1;"sortable_list"===(i="composite"===t.type?ee.default.intentionallyCloneDeep(t):ee.default.intentionallyClone(t)).type&&(i.useAddNewButton=!0);var M="et_pb_counter"===n.props.module.props.type&&"content"===i.name,P=(0,d.default)("et-fb-settings-options","et-fb-option--".concat(p.replace("_","-"))),L="",F="",W="",H=je.content||(g?Ce.default.generateSelectedContent(c.props.content,n.updatedAttrs):c.props.content);H=H||"";var G,z={},$={},X=x?"".concat(o,"_child"):o,Q="",ae=(0,j.default)(i,"default","");if("categories"===p&&(i.categories_list={},i.taxonomy_name=(0,S.default)(i.taxonomy_name)?"category":i.taxonomy_name),"select_sidebar"===p&&(i.sidebars_list={}),"text"===p&&(0,O.default)(["et_pb_signup","et_pb_contact_form"],c.props.type)&&(0,O.default)(i.option_class,"--last-field")&&(p="text_api_key"),"background_color"===i.name)i.backgroundFields={},i.onMouseEnterGroup=u._onMouseEnterGroup,i.onMouseLeaveGroup=u._onMouseLeaveGroup,i.isDescriptionVisible=u._isDescriptionVisible,i.isHoveredGroup=u._isHoveredGroup,i.onClickHelp=u._onClickHelp,(0,v.default)(it,(function(e){var t=(0,j.default)(I,e,!1);t&&(i.backgroundFields[e]=$e({},t),i.backgroundFields[e]._unsyncGlobalSetting=u._unsyncGlobalSetting,i.backgroundFields[e].isGlobalOptionSynced=u.isGlobalOptionSynced(e),i.backgroundFields[e].isSelectiveSyncAvailable=u.isSelectiveSyncAvailable(),i.backgroundFields[e].isGlobalOptionSynced=u.isGlobalOptionSynced(e))})),i.isResetActive=u._isResetActive,i.onClickReset=u._onClickReset,(0,N.default)(i.backgroundFields)>1&&(i.name="background",i.label=ETBuilderBackend.i18n.modules.background.label,i.type="background",p="background",i._onChange=u._onChange,i._unsyncGlobalSetting=u._unsyncGlobalSetting,i.description=ETBuilderBackend.i18n.modules.background.description,(0,S.default)(i.is_toggleable)&&delete i.depends_on,delete i.additional_code,delete i.depends_show_if);else if(V&&(0,O.default)(it,te.default.getFieldBaseName((0,j.default)(i,"name",""))))return!1;("background-field"===i.type&&(i.onMouseEnterGroup=u._onMouseEnterGroup,i.onMouseLeaveGroup=u._onMouseLeaveGroup,i.isDescriptionVisible=u._isDescriptionVisible,i.isHoveredGroup=u._isHoveredGroup,i.onClickHelp=u._onClickHelp,i.background_fields=(0,m.default)(i.background_fields,(function(e,t){var n=He({},e);return n._unsyncGlobalSetting=u._unsyncGlobalSetting,n.isGlobalOptionSynced=u.isGlobalOptionSynced(t),n.isSelectiveSyncAvailable=u.isSelectiveSyncAvailable(),n.isGlobalOptionSynced=u.isGlobalOptionSynced(t),n})),i.isResetActive=u._isResetActive,i.onClickReset=u._onClickReset),x&&ft(i))&&(i=pt(i,c,"general"===e?"":e,!n.props.isGlobalPresetsMode));var se=n._getModule(),ce=!1!==(0,j.default)(i,"depends_on[0]",!1)&&(0,j.default)(i,"depends_on[0]",!1),de=i.name||"",he=i.name||"",me="tabs"===(0,j.default)(i,"hover",!1),_e=!1!==(0,j.default)(i,"hover",!1)||void 0,Oe=te.default.isHoverMode(),Se=Oe&&me&&te.default.isEnabled(i.name,je);Oe&&te.default.doesSupport(i)&&(te.default.isEnabled(i.name,je)||te.default.isEnabled(ce,je))&&(de=te.default.getHoverField(i.name||""),he=te.default.getFieldBaseName(de));var xe=oe.default.isStickyMode(),Le=oe.default.doesSupport(i)&&oe.default.hasStickyOptions((0,j.default)(se,"props",{})),Ae=xe&&Le&&(oe.default.isEnabled(i.name,je)||oe.default.isEnabled(ce,je));if(Ae&&(de=oe.default.getStickyField(i.name||""),he=oe.default.getFieldBaseName(de)),"custom_padding"===p&&n._hasColumnsFields()&&"custom_padding"!==he){var Re="";Oe?Re=te.default.hoverSuffix():xe&&(Re=oe.default.stickySuffix());var Fe=i.name.replace("padding_",""),Ie=ee.default.hasValue(je["padding_".concat(Fe,"_last_edited")])?je["padding_".concat(Fe,"_last_edited")].split("|"):[],We=((0,j.default)(je,"padding_top_".concat(Fe).concat(Re),"")||"").trim(),Ve=((0,j.default)(je,"padding_right_".concat(Fe).concat(Re),"")||"").trim(),Ge=((0,j.default)(je,"padding_bottom_".concat(Fe).concat(Re),"")||"").trim(),Ue=((0,j.default)(je,"padding_left_".concat(Fe).concat(Re),"")||"").trim(),ze=((0,j.default)(je,"padding_top_bottom_link_".concat(Fe).concat(Re),"")||"").trim(),qe=((0,j.default)(je,"padding_left_right_link_".concat(Fe).concat(Re),"")||"").trim(),Ke="".concat(We,"|").concat(Ve,"|").concat(Ge,"|").concat(Ue,"|").concat(ze,"|").concat(qe),Ye=n.state.advancedFields,Xe=(0,j.default)(Ye,"padding_top_".concat(Fe).concat(Re,".default"),"").trim(),Je=(0,j.default)(Ye,"padding_right_".concat(Fe).concat(Re,".default"),"").trim(),Qe=(0,j.default)(Ye,"padding_bottom_".concat(Fe).concat(Re,".default"),"").trim(),Ze=(0,j.default)(Ye,"padding_left_".concat(Fe).concat(Re,".default"),"").trim(),et=(0,j.default)(Ye,"padding_top_bottom_link_".concat(Fe).concat(Re,".default"),"").trim(),tt=(0,j.default)(Ye,"padding_left_right_link_".concat(Fe).concat(Re,".default"),"").trim(),nt="".concat(Xe,"|").concat(Je,"|").concat(Qe,"|").concat(Ze,"|").concat(et,"|").concat(tt);if(i.default=nt,L={desktop:Ke,tablet:(0,j.default)(je,"padding_".concat(Fe,"_tablet"),""),phone:(0,j.default)(je,"padding_".concat(Fe,"_phone"),""),isResponsive:!(0,S.default)(Ie[0])&&"on"===Ie[0],activeTab:(0,S.default)(Ie[1])?"desktop":Ie[1]},Oe||xe){var rt=(0,j.default)(je,"padding_top_".concat(Fe),"").trim(),ot=(0,j.default)(je,"padding_right_".concat(Fe),"").trim(),at=(0,j.default)(je,"padding_bottom_".concat(Fe),"").trim(),lt=(0,j.default)(je,"padding_left_".concat(Fe),"").trim();F="".concat(rt,"|").concat(ot,"|").concat(at,"|").concat(lt)}Q=Ke}else if((0,O.default)(["custom_margin","custom_padding"],p)&&i.mobile_options){i=n._handleFieldConditionalDefaults(i,je,i.name!==de);var ut=je["".concat(i.name,"_last_edited")],st=(0,S.default)(ut)?["off","desktop"]:ut.split("|"),ct=(0,j.default)(u,"props.module.props.is_module_child",!1)&&((0,y.default)(i,"default_tablet")||(0,y.default)(i,"default_phone")),dt=(0,j.default)(je,de,""),ht=(0,j.default)(je,i.name,""),mt=(0,j.default)(je,"".concat(i.name,"_tablet"),""),gt=(0,j.default)(je,"".concat(i.name,"_phone"),"");if(W=ue.default.getPreviewMode(),!ct&&(0,j.default)(i,"default_value_depends",!1)){var yt=i.default_value_depends,vt=i.default_values_mapping;z.getDefaultFrom=(0,j.default)(je,yt,!1),ht=ee.default.hasValue(je[i.name])&&i.default!==je[i.name]?je[i.name]:(0,j.default)(vt,z.getDefaultFrom,i.default),dt=ee.default.hasValue(je[de])&&i.default!==je[de]?je[de]:ht}mt&&!(0,y.default)(i,"default_phone")&&(i.default_phone=mt),mt||!(0,y.default)(i,"default_tablet")||(0,y.default)(i,"default_phone")||(i.default_phone=i.default_tablet),dt&&!(0,y.default)(i,"default_tablet")&&(i.default_tablet=dt),dt&&!(0,y.default)(i,"default_phone")&&(i.default_phone=dt),F=ht,L={desktop:dt,tablet:mt,phone:gt,isResponsive:re.default.isResponsiveEnabled(je,i.name),activeTab:st[1]},Q=dt||(0,j.default)(i,"default","")}else if(i.mobile_options){i=n._handleFieldConditionalDefaults(i,je,i.name!==de),W=ue.default.getPreviewMode();var bt=re.default.isResponsiveEnabled(je,i.name),_t=(0,O.default)(["tablet","phone"],h)&&bt,wt=_t?"_".concat(h):"",kt=M&&!te.default.isHoverMode()&&oe.default.isStickyMode()?H:(0,j.default)(je,de,""),Ot=M&&!te.default.isHoverMode()&&oe.default.isStickyMode()?H:(0,j.default)(je,de,""),St=(0,j.default)(je,"".concat(i.name,"_tablet"),"");(0,j.default)(je,"".concat(i.name,"_phone"),"");if(!((0,j.default)(u,"props.module.props.is_module_child",!1)&&((0,y.default)(i,"default_tablet")||(0,y.default)(i,"default_phone")))&&(0,j.default)(i,"default_value_depends",!1)){var Ct=(0,j.default)(i,"default_value_depends",""),Et=(0,j.default)(i,"default_values_mapping",{});z.getDefaultFrom=(0,j.default)(c.props.attrs,Ct,!1),Ot=ee.default.hasValue(Ot)&&i.default!==Ot?Ot:(0,j.default)(Et,z.getDefaultFrom,i.default),kt=ee.default.hasValue(kt)&&i.default!==kt?kt:Ot}St&&!(0,y.default)(i,"default_phone")&&(i.default_phone=St),St||!(0,y.default)(i,"default_tablet")||(0,y.default)(i,"default_phone")||(i.default_phone=i.default_tablet),kt&&!(0,y.default)(i,"default_tablet")&&(i.default_tablet=kt),kt&&!(0,y.default)(i,"default_phone")&&(i.default_phone=kt),L=_t?(0,j.default)(je,"".concat(i.name).concat(wt),""):kt,F=Ot,Q=kt||(0,j.default)(i,"default",""),_t&&($.default=(0,j.default)(i,"default".concat(wt),(0,j.default)(i,"default","")),i.default=$.default,$.name="".concat(i.name).concat(wt),$.baseName=i.name,"yes_no_button"===p?($.defaultValue=$.default,i.defaultValue=$.defaultValue):"background-field"===p&&delete $.name),i.dynamic_content&&(0,w.default)(L)&&(L="".concat(L))}else if(M)L=(0,S.default)(je.content)?c.props.content:je.content;else if("composite"!==p){i=n._handleFieldConditionalDefaults(i,je,i.name!==de);var Mt=(0,j.default)(i,"default","");if((0,j.default)(i,"default_from",!1)){var Tt=i.default_from;Mt=(0,j.default)(je,Tt,Mt)}F=(0,j.default)(je,i.name,Mt),L=(0,j.default)(je,de,Se||Ae?F:Mt),(0,w.default)(L)&&(L="".concat(L)),(0,w.default)(F)&&(F="".concat(F)),L||(L=""),F||(F=""),Q=ee.default.hasValue(L)?L:(0,j.default)(i,"default","")}if("font"===p&&(Q=(0,S.default)(Q)||(0,b.default)((0,R.default)(Q.split("|")))?"":Q,ae=(0,S.default)(ae)?"":ae),"select_with_option_groups"===p&&!(0,O.default)(["provider","spam"],(0,j.default)(i,"toggle_slug",""))&&ee.default.hasValue(L)&&-1!==L.indexOf("|")&&(L=(0,T.default)(L)?L.split("|")[1]:L),"select_with_option_groups"===p&&ee.default.hasValue(F)&&-1!==F.indexOf("|")&&(F=(0,T.default)(F)?F.split("|")[1]:F),(0,S.default)(i.depends_default)&&(0,S.default)(i.depends_show_if)&&(0,S.default)(i.depends_show_if_not)||(P=(0,d.default)("et-fb-option--depends-on",P)),"select_with_option_groups"===p&&i.groups&&(P=(0,d.default)("et-fb-option--select-with-option-groups",P)),"text"===p&&(G=(0,d.default)("et-fb-settings-option-input--block",G)),"color-alpha"===p&&"et_pb_section"===(0,j.default)(c,"props.type")&&"background_color"===(0,j.default)(i,"name")&&(i.default=ue.default.getPageSetting("et_pb_section_background_color")||ue.default.getPageSettingField("et_pb_section_background_color").default),"admin_label"===o&&(i.default=ne,i.defaultIfEmpty=!0),(0,S.default)(i.readonly_if)&&(0,S.default)(i.readonly_if_not)||!(0,Z.isReadOnlyField)(i,n.setting_resolver)||(i.readonly=!0,i.useAddNewButton=!1),(0,S.default)(p)||!be.default.getControl(p))return!1;if("warning"===p&&i.display_if!==i.value)return!1;if(!(0,S.default)(i.depends_on)&&(0,S.default)(i.show_if_not)&&(0,S.default)(i.show_if)&&!n._isVisible(i,A))return E.push(i.name),!1;if(!((0,S.default)(i.show_if)&&(0,S.default)(i.show_if_not)||(0,Z.canShowField)(i,n.setting_resolver)))return E.push(i.name),!1;if(!(0,S.default)(i.depends_on)&&(0,_.default)(i.depends_on,(0,k.default)(i.depends_on,E)))return!1;if("position"===p){var Pt=(0,j.default)(n.state.cssFields,"positioning.default","none"),xt=(0,Be.positionByDevice)(je,Pt,n.props.activeTabMode);if("none"===xt||"position_origin_".concat(xt.substr(0,1))!==i.name)return!1}if((0,O.default)(["vertical_offset","horizontal_offset"],i.name)){var jt=(0,j.default)(n.state.cssFields,"positioning.default","none"),Dt=(0,Be.positionByDevice)(je,jt,n.props.activeTabMode);if("none"===Dt)return!1;var Lt=(0,Be.originByDevice)(je,Dt,n.props.activeTabMode);if("center"===Lt[1]&&"center"===Lt[0]||"vertical_offset"===i.name&&"center"===Lt[0]||"horizontal_offset"===i.name&&"center"===Lt[1])return!1}if("composite"===p)return ke.default.createControl(i,{uniqueKey:X,module:u,moduleAttrs:je,_onChange:u._onChange.bind(u),onClickHelp:u._onClickHelp,activeHover:te.default.isEnabled(he,je),activeSticky:oe.default.isEnabled(he,je),onClickHover:u._onClickHover,onClickReset:u._onClickReset,onClickResponsive:u._onClickResponsive,onClickSticky:u._onClickSticky,hasHoverOptions:_e,hasStickyOptions:Le,isDescriptionVisible:u._isDescriptionVisible,isHoveredGroup:u._isHoveredGroup,onMouseEnterGroup:u._onMouseEnterGroup,onMouseLeaveGroup:u._onMouseLeaveGroup,isSelectiveSyncAvailable:u.isSelectiveSyncAvailable.bind(u),isGlobalOptionSynced:u.isGlobalOptionSynced.bind(u),_unsyncGlobalSetting:u._unsyncGlobalSetting.bind(u),isResetActive:u._isResetActive,setting_resolver:u.setting_resolver,animate:u.props.options.animate,rightClickOpened:u.props.rightClickOpened,toggleGroupId:a,isSettingsModal:!0,isResponsiveEnabled:re.default.isResponsiveEnabled(je,i.name),_isOptionMatchesFilter:u._isOptionMatchesFilter,toggleId:r,onToggleRightMenu:u._onToggleRightMenu,activeTabMode:h,isGlobalPresetsMode:u.props.isGlobalPresetsMode,isItemSelected:g,optionSubToggle:i.sub_toggle});var Nt=!(0,S.default)(i.description)&&""!==i.description,At=(0,O.default)(["content","raw_content"],o)||!(0,S.default)(i.is_fb_content)&&i.is_fb_content,Rt=At?"et_pb_content_field":i.name,Bt=(0,S.default)(i.priority)?10:i.priority,Ft=!!(0,S.default)(i.vb_support)||i.vb_support?"":l.default.createElement("span",{className:"et-fb-no-vb-support-warning"},ETBuilderBackend.i18n.modals.moduleSettings.noSupport),It=ae===Q,Wt=i,Vt=Wt.sub_toggle,Ht=Wt.toggle_slug;if(De||!Vt||!s||Vt===(0,j.default)(pe,Ht,ie)){var Gt=Nt?i.description:"",Ut={},zt=i.label,qt="",Kt=(0,S.default)(i.additional_button_type)?"":l.default.createElement(ye.default,{type:i.additional_button_type,name:i.name,attrs:i.additional_button_attrs,module:c,_onChange:n._onChange});if("css"===e){var $t=!(0,S.default)(i.isColumnField)&&i.isColumnField,Yt=$t?i.columnType:c.props.type,Xt=$t?i.columnIndex:c.props.shortcode_index,Jt=".".concat((0,Pe.getModuleOrderClass)(Yt,Xt,c.props.theme_builder_suffix)),Qt=!(0,S.default)(i.selector)&&!Nt&&i.selector;if(!1!==Qt){if(-1!==Qt.indexOf("%%order_class%%"))Qt=Qt.replace(/%%order_class%%/g,Jt);else Qt=Jt+(!(0,S.default)(i.no_space_before_selector)&&i.no_space_before_selector?"":" ")+Qt;Nt=!0,Gt="".concat(ETBuilderBackend.i18n.controls.cssSelector," ").concat(Qt)}"custom_css"===i.toggle_slug&&n._isFilterActive()&&(zt="".concat(i.label," ").concat(ETBuilderBackend.i18n.controls.cssText))}var Zt=Te.default.getNameByMode(i.name,n.getModuleAttrs());if(At&&Zt!==i.name&&(H=L),Te.default.isHoverEnabled(i.name,n.getModuleAttrs())&&Te.default.isHoverMode()&&($.name=Zt,i.default=i["default".concat(te.default.hoverSuffix())]?i["default".concat(te.default.hoverSuffix())]:Te.default.getDesktopValue(i.name,n.getModuleAttrs(),i.default),"yes_no_button"===p&&(i.defaultValue=i.default)),Te.default.isStickyEnabled(i.name,n.getModuleAttrs())&&Te.default.isStickyMode()){$.name=Zt;var en=Te.default.getDesktopValue(i.name,n.getModuleAttrs(),i.default);!ee.default.hasValue(en)&&ee.default.hasValue(i.default)&&(en=i.default),i.default=i["default".concat(oe.default.stickySuffix())]?i["default".concat(oe.default.stickySuffix())]:en,"yes_no_button"===p&&(i.defaultValue=i.default)}if("general"===e&&"background"!==i.toggle_slug&&!Te.default.isDesktopMode()){var tn=Te.default.getBaseName(i.name),nn=Te.default.getNameByMode(i.name,je);if(tn&&nn&&tn!==nn&&!(0,y.default)(je,nn)){var rn=null;rn="content"===tn?Te.default.getContentByMode((0,D.default)({},je,{content:(0,j.default)(n,"props.module.props.content")})):"raw_content"===tn?Te.default.getRawContentByMode((0,D.default)({},je,{content:(0,j.default)(n,"props.module.props.content")})):Te.default.getValueByMode(tn,je),(0,C.default)(rn)||rn===L||(L=rn,H=rn,i.default=rn)}(0,v.default)(["value","default","default_on_front","default_tablet","default_phone","defaultValue"],(function(e){var t="value"===e?L:(0,j.default)(i,e);if(t&&(0,Me.isDynamicContent)(t)){var n=(0,Me.getDynamicContent)(t);if(!(0,b.default)(n)&&(0,y.default)(n,"content")&&(0,y.default)(n,"settings")){var r=ue.default.getPostContentFieldValue("dynamic",n.content,n.settings,tn);!r&&Te.default.isPhoneMode()&&(r=ue.default.getPostContentFieldValue("dynamic",n.content,n.settings,Te.default.getTabletName(tn))),(0,C.default)(r)||("value"===e&&(L=r,i.default=r,$.default=r),(0,y.default)(i,e)&&(i[e]=r),(0,y.default)($,e)&&($[e]=r))}}}))}"upload"===p&&!1===(0,j.default)(i,"data_type",!1)&&($.showDeleteButton=!0,$.showResetButton=!0);var on=i.default_on_front||i.defaultValue||i.default,an=te.default.isEnabled(he,je),ln=oe.default.isEnabled(he,je),un=(0,S.default)(i.linked_responsive)?[]:i.linked_responsive,sn=(0,j.default)(i,"context_menu",!0);Ut.activeHover=an,Ut.isHoverTab=Oe,Ut.activeSticky=ln,Ut.isStickyTab=xe;var cn=(0,S.default)(i.label)||""===i.label?"":l.default.createElement(ge.ETBuilderFormLabel,{name:de,backgroundFields:i.backgroundFields||i.background_fields,defaultValue:on,activeHelp:u._isDescriptionVisible(he),activeHover:an,activeSticky:ln,hoveredGroup:u._isHoveredGroup(he),key:"".concat(e,"-form-label-").concat(i.name),onClickHelp:!!Nt&&u._onClickHelp,onClickHover:!!me&&u._onClickHover,onClickSticky:u._onClickSticky,onClickResponsive:u._onClickResponsive,onClickReset:u._onClickReset,isResetActive:u._isResetActive(i),hasResponsiveOptions:i.mobile_options,hasHoverOptions:_e,hasStickyOptions:Le,onToggleRightMenu:!!sn&&u._onToggleRightMenu,isResponsiveEnabled:re.default.isResponsiveEnabled(je,i.name),linkedResponsive:un},zt),dn=Nt?l.default.createElement(ge.ETBuilderFormDescription,{active:u._isDescriptionVisible(i.name),key:"".concat(e,"-form-description-").concat(i.name)},Gt):"",fn=i.mobile_options&&re.default.isResponsiveEnabled(je,i.name)||me&&te.default.isEnabled(he,je)||oe.default.isEnabled(he,je)?l.default.createElement(we.default,null,l.default.createElement(ge.ETBuilderFormSettingModeTabs,{module:n._getModule(),moduleAttrs:je,fieldName:he,activeTabMode:h,isGlobalPresetsMode:n.props.isGlobalPresetsMode,isResponsiveEnabled:re.default.isResponsiveEnabled(je,he),isHoverEnabled:te.default.isEnabled(he,je),isStickyEnabled:Le&&oe.default.isEnabled(he,je),isItemSelected:g})):"";if(q||i.isColumnBackground||!n._isValidProductTourToggle(r,U)||(qt="et-fb-product-tour-element","text"===p?qt+=" et-fb-product-tour-element-text":"background"===p&&(qt+=" et-fb-product-tour-element-background"),n.productTourOptionToggle=r,q=!0),"codemirror"===p&&(Ut.search=n.state.filterOptions),"font"===p&&(Ut.formLabel=cn,Ut.formDescription=dn),(0,j.default)(i,"attributes.data-old-option-ref",!1)){var pn=i.attributes["data-old-option-ref"];z.oldOptionValue=(0,j.default)(je,pn,!1)}var hn={slug:i.type,type:"field"},mn=(0,D.default)({processedKey:X,value:L,className:G,module:u,moduleAttrs:je,parentModuleAttrs:Ne,content:H,resetValue:!1,previewMode:W,_onChange:n._onChange,_resetOption:n._resetOption,visible:!0,additionalAttrs:z,filterSelected:n.state.filterSelected,animate:n.props.options.animate,rightClickOpened:n.props.rightClickOpened,isSettingsModal:!0,isResponsive:re.default.isResponsiveEnabled(je,i.name),fieldDefinition:t,matching:hn,activeTabMode:h,isItemSelected:g,onToggleRightMenu:n._onToggleRightMenu},Ut,i,$),gn=(0,j.default)(i,"data_type",!1),yn=p+(gn?"_".concat(gn):""),vn=(0,l.createElement)(be.default.getControl(p),mn),bn={fieldName:i.name,fieldLabel:zt,fieldType:yn,toggleId:r,toggleGroupId:a,fieldContextMenu:sn,tabSlug:(0,j.default)(i,"tab_slug",a)};return l.default.createElement(ge.ETBuilderFormGroup,{name:i.name,key:"".concat(e,"-form-group-").concat(X),onMouseEnterGroup:function(){n._onMouseEnterGroup(bn)},onMouseLeaveGroup:function(){n._onMouseLeaveGroup(bn)},hovered:n.isOptionHovered(i.name),isSelectiveSyncAvailable:n.isSelectiveSyncAvailable(i),isGlobalOptionSynced:n.isGlobalOptionSynced(Rt),_unsyncGlobalSetting:n._unsyncGlobalSetting,optionSubToggle:i.sub_toggle,globalName:Rt,className:qt,priority:Bt,isDefaultValue:It},!(0,O.default)(["font"],p)&&cn,fn,!(0,O.default)(["font"],p)&&dn,l.default.createElement("div",{className:P,key:"et-fb-option-".concat(e,"_").concat(X)},l.default.createElement("div",{className:"et-fb-option-container",key:"et-fb-option-container-".concat(X)},l.default.createElement(we.default,{componentName:i.name},i.dynamic_content?l.default.createElement(Ee.default,{type:i.dynamic_content,fieldName:Zt,fieldType:p,isContentField:!M&&Zt===i.name&&At,value:At&&Zt===i.name?H:L,dynamicAttributes:(0,Me.getEnabledDynamicAttributes)(je),onChange:function(){M&&n._onChange(i.name,"",p,!0),n._onChange.apply(n,arguments)},onReset:n._resetOption,modalWidth:fe},vn):vn),Kt,Ft)),J&&(0,S.default)(Y)&&ve&&"column_structure"===i.name&&K)}(0,B.default)(le,Vt,(0,j.default)(le,Vt)||!It)})),J&&r===Y&&"bottom"===X&&K)}})),l.default.createElement("div",{className:"et-fb-modal__tab-footer"},this._isFilterActive()||this.renderSupportNotice((0,j.default)(this,"props.module.props.vb_support","off")),this._maybeRenderHelpButton(x),this._isFilterActive()||l.default.createElement(_e.default,{moduleTitle:this._getModuleTitle(),moduleType:c.props.type}))))}},{key:"_getTabs",value:function(){var e=this,t=[];ue.default.isAllowedAction("general_settings")&&this.hasOptionTab("general",!0)&&t.push({slug:"general",title:ETBuilderBackend.i18n.controls.tabs.general,custom:!1}),ue.default.isAllowedAction("advanced_settings")&&!(0,b.default)(this.state.advancedFields)&&t.push({slug:"advanced",title:ETBuilderBackend.i18n.controls.tabs.design,custom:!1}),ue.default.isAllowedAction("custom_css_settings")&&!(0,b.default)(this.state.cssFields)&&t.push({slug:"css",title:ETBuilderBackend.i18n.controls.tabs.css,custom:!1});var n=this.getCustomTabsList();return(0,b.default)(n)||(0,v.default)(n,(function(n,r){ue.default.isAllowedAction(r)&&e.hasOptionTab(r)&&t.push({slug:r,title:n.name||r,custom:!0})})),t}},{key:"getTabsCount",value:function(){return this._getTabs().length}},{key:"hasOptionTab",value:function(e,t){var n=t?this._getOptionsFields(e):this._getFilteredFields(e),r=!(0,b.default)((0,W.default)(n,["toggles_".concat(e,"_toggles"),"_builder_version"])),o=!1;return"general"===e&&(o=this._hasModuleItem()),r||o}},{key:"renderSupportNotice",value:function(e){if(ee.default.isOn(e))return"";var t=(0,O.default)(["off","partial"],e)?e:"off";return l.default.createElement("div",{className:"et-fb-modal__support-notice",dangerouslySetInnerHTML:{__html:(0,V.default)((0,j.default)(ETBuilderBackend,["i18n","vbSupport","modalSupportNotices",t],""))}})}},{key:"_getModuleTitle",value:function(){var e=this.props.module;return(0,Ne.default)(e)}},{key:"_getFilterItems",value:function(){var e=this._getModule();return oe.default.hasStickyOptions((0,j.default)(e,"props",{}))?ETBuilderBackend.searchFilterItems:(0,m.default)(ETBuilderBackend.searchFilterItems,(function(e){return(0,W.default)(e,"styles_sticky")}))}},{key:"maybeShowFilterNotice",value:function(){var t=e((0,s.findDOMNode)(this)).find(".et-fb-tabs__panel--filter-active"),n=!(0,b.default)(this.state.filterOptions)||!(0,b.default)(this.state.filterSelected);t.length&&t.each((function(t,r){ee.default.hasValue(e(r).find(".et-fb-form__group:not(:empty)").text())&&(n=!1)})),n!==this.state.filterNotice&&this.setState({filterNotice:n})}},{key:"_renderGlobalPresetsCloseBadge",value:function(){if(!this.props.isGlobalPresetsMode||this.state.isGlobalPresetsSubmitDialogVisible)return!1;var e=(0,d.default)({"et-fb-modal__badge__button":!0,"et-fb-modal__badge__button--back-to-settings":!0});return l.default.createElement(he.default,{buttonName:ae.default.BUTTON_SAVE_MODULE_PRESET_SETTINGS,tooltip:ETBuilderBackend.i18n.tooltip.modal.globalPresets.exit,disableClick:this.props.nonInteractiveMode,className:e,editingModule:this._getModule()},l.default.createElement(fe.default,{icon:"global-presets-return",color:je.default.success,size:"14"}))}},{key:"_getModalMinWidth",value:function(){return this.isGlobalModuleOpened()?430:400}},{key:"_renderModalOverlay",value:function(){if(this.props.nonInteractiveMode)return l.default.createElement("div",{className:"et-fb-modal__overlay"});var e=ue.default.getGlobalPresetsState().submitDialog,t=e.confirmationAction,n=e.actionPayload,r=e.type;if(!this.state.isGlobalPresetsSubmitDialogVisible||r!==Le.default.CONFIRMATION_DIALOG_TYPE_DEFAULT)return!1;var o=this._getModule();return l.default.createElement("div",{className:"et-fb-modal__overlay"},l.default.createElement("div",{className:"et-fb-modal__overlay__header"}),l.default.createElement("div",{className:"et-fb-modal__overlay__content"},l.default.createElement(De.default,{animate:this.props.options.animate,onConfirm:function(){return le.default.confirmGlobalPresetDialog(t,o,n)},dangerouslySetInnerHTML:{__html:e.confirmationText}})))}},{key:"_renderButtons",value:function(){var e=this.props.module,t=(0,xe.getModalPreferredSnapSettings)(),n=t.snap,r=t.snapLocation,o=ue.default.getGlobalPresetsState().history.isLoading,a=o?"loading":"check",i="wireframe"===ue.default.getPreviewMode(),u="saveModule"===this.props.currentTourElement?e:{},s=(0,j.default)(this.props,"module.props.loading",!1)&&!i,c={"et-fb-product-tour-element":"saveModule"===this.props.currentTourElement},d={"et-fb-product-tour-element":"saveModule"===this.props.currentTourElement||"saveRow"===this.props.currentTourElement};return this.props.isGlobalPresetsMode?[l.default.createElement(he.default,{block:!0,danger:!0,buttonName:ae.default.BUTTON_GLOBAL_PRESETS_CLOSE,tooltip:ETBuilderBackend.i18n.tooltip.modal.cancel,disableClick:this.props.nonInteractiveMode,additionalAttrs:{skipReset:n&&r}},l.default.createElement(fe.default,{icon:"exit",color:"#FFFFFF"})),l.default.createElement(he.default,{block:!0,primary:!0,alt:!0,buttonName:ae.default.BUTTON_GLOBAL_PRESETS_SUBHISTORY_UNDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.undo,disableClick:this.props.nonInteractiveMode},l.default.createElement(fe.default,{icon:"undo",color:"#FFFFFF"})),l.default.createElement(he.default,{block:!0,info:!0,buttonName:ae.default.BUTTON_GLOBAL_PRESETS_SUBHISTORY_REDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.redo,disableClick:this.props.nonInteractiveMode},l.default.createElement(fe.default,{icon:"redo",color:"#FFFFFF"})),l.default.createElement(he.default,{block:!0,success:!0,buttonName:ae.default.BUTTON_SAVE_MODULE_PRESET_SETTINGS,tooltip:ETBuilderBackend.i18n.tooltip.modal.save,disabled:o,disableClick:this.props.nonInteractiveMode||o,additionalAttrs:{skipReset:n&&r},editingModule:e},l.default.createElement(fe.default,{icon:a,color:"#FFFFFF"}))]:[l.default.createElement(he.default,{block:!0,danger:!0,buttonName:ae.default.MODAL_SETTINGS_BUTTON_CLOSE,tooltip:ETBuilderBackend.i18n.tooltip.modal.cancel,disableClick:s,className:c,editingModule:u,additionalAttrs:{skipReset:n&&r}},l.default.createElement(fe.default,{icon:"exit",color:"#FFFFFF"})),l.default.createElement(he.default,{block:!0,primary:!0,alt:!0,buttonName:ae.default.MODAL_SETTINGS_BUTTON_UNDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.undo,disableClick:s},l.default.createElement(fe.default,{icon:"undo",color:"#FFFFFF"})),l.default.createElement(he.default,{block:!0,info:!0,buttonName:ae.default.MODAL_SETTINGS_BUTTON_REDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.redo,disableClick:s},l.default.createElement(fe.default,{icon:"redo",color:"#FFFFFF"})),l.default.createElement(he.default,{block:!0,success:!0,buttonName:this._isModuleItemSettings()?ae.default.MODULE_ITEM_BACK_TO_PARENT:ae.default.MODAL_SETTINGS_BUTTON_SAVE,tooltip:ETBuilderBackend.i18n.tooltip.modal.save,disableClick:s,className:d,editingModule:u,additionalAttrs:{skipReset:n&&r}},l.default.createElement(fe.default,{icon:"check",color:"#FFFFFF"}))]}},{key:"_renderHeaderDropdown",value:function(){return this._isMultiSelectMode()?null:l.default.createElement(Fe.default,{module:this.props.module,onMouseEnter:this._onMouseEnterTitle,onMouseLeave:this._onMouseLeaveTitle})}},{key:"_renderTabNavs",value:function(){var e=this,t=this._getTabs();return!(0,b.default)(t)&&t.map((function(t){var n=e.getGlobalTabClass();return l.default.createElement(me.ETBuilderTabItem,{key:t.slug,className:n,panelId:t.slug,setHoveredElement:e._setHoveredElementWrapper},t.title)}))}},{key:"_renderTabPanels",value:function(){var e=this,t=this._getTabs();if((0,b.default)(t))return!1;var n=(0,f.default)(t,(function(e){return"general"===e.slug})),r=this.props,o=r.currentTourElement,a=r.module,i=ue.default.getProductTourModuleName(),l="configureModule"===o&&i===a.props.type||"editRow"===o&&"et_pb_row"===a.props.type,u=l?"general":"";l&&!n&&(u=hasDesignTab&&advancedTabOutput?"advanced":"css");this._isModalExpanded();var s=this._isFilterActive();return t.map((function(t,n){var r=s?0===n:e.state.tabSelectedIndex===n;return t.custom?e._renderTabOptionsPanel(t.slug,void 0,r):e._renderTabOptionsPanel(t.slug,u,r)}))}},{key:"render",value:function(){var e=this.props,t=e.isVisible,n=e.module;if(!t)return!1;if((0,S.default)(n.props))return!1;var r=this.state.isModalRest,o=this._isFilterActive(),a=!r&&!o,i=this._getModuleTitle(),u=(0,xe.getModalPreferredSnapSettings)().snapLocation,s=(0,d.default)({"et-fb-modal__module-settings":!0,"et-fb-modal__filter-active":o,"et-fb-modal__selective-sync":this.isSelectiveSyncAvailable(),"et-fb-modal__global-presets-mode":this.props.isGlobalPresetsMode,"et-fb-modal--with-header-dropdown":!this._isMultiSelectMode()},this.getGlobalModalClass("et-fb-modal")),c=this.props.ignorePosition?{x:0,y:0}:(0,xe.getModalPreferredCoordinates)(),f=(0,xe.getModalPreferredFullscreen)(),p=(0,xe.getModalPreferredDimensions)().width,h=this.props.isGlobalPresetsMode?"settings-modal-back":"settings-modal-front",m=this.props.isGlobalPresetsMode?ETBuilderBackend.i18n.modals.globalPresets.title.replace("%s",i):ETBuilderBackend.i18n.modals.moduleSettings.title.replace("%s",i),g=this.props.isGlobalPresetsMode&&this._renderGlobalPresetsCloseBadge(),y=this._renderModalOverlay(),v=ue.default.isViewGlobalPresetsAllowed()&&!ue.default.isProductTourActive();return l.default.createElement(de.default,He({key:h,className:s,disableEscShortcut:o,footerButtons:this._renderButtons(),fullscreen:f,globalUpdate:!0,isModuleItemSettings:this._isModuleItemSettings(),label:m,headerContent:this._renderHeaderDropdown(),passthroughClicksFor:["et-fb-modal__module-settings__header-dropdown__overflow-container","et-core-popup__wrapper"],badge:v&&g,modalMinimalWidth:this._getModalMinWidth(),measurement:(0,xe.getModalPreferredDimensions)(),animate:this.props.options.animate,disablePopupAnimation:this.props.disablePopupAnimation,onModalChange:this.props.onModalChange,ignorePosition:this.props.ignorePosition,snapLocation:u,tabsCount:this.state.tabsCount,onMouseEnterTitle:this._onMouseEnterTitle,onMouseLeaveTitle:this._onMouseLeaveTitle,overlay:y,onBackToParent:this._onBackToParent,_setHoveredElement:this._onMouseEnterTitle},this.props,{position:c,onRest:this._onModalRest}),l.default.createElement(me.default,{selectedIndex:this.state.tabSelectedIndex,module:this.props.module,onSelect:this._onTabSelect,renderOnSelectedOnce:a},l.default.createElement(me.ETBuilderTabList,{className:this.getGlobalModalClass("et-fb-tabs__list"),modalWidth:p,snapLocation:u,fullscreen:f,showScroll:!o},this._renderTabNavs()),this._renderTabPanels()))}}]),o}(l.Component);ht.propTypes=dt,ht.defaultProps={additionalClasses:{},ignorePosition:!1,isGlobalPresetsMode:!1,nonInteractiveMode:!1,disablePopupAnimation:!1};var mt=ht;t.default=mt}).call(this,n(9),n(93)(e))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=j(n(0)),a=P(n(5)),i=P(n(349)),l=P(n(11)),u=P(n(1)),s=P(n(123)),c=P(n(10)),d=P(n(192)),f=P(n(36)),p=P(n(357));n(1523);var h=P(n(2)),m=P(n(19)),g=P(n(58)),y=P(n(278)),v=P(n(57)),b=P(n(194)),_=j(n(495)),w=n(769),k=P(n(44)),O=P(n(768)),S=P(n(1460)),C=P(n(1458)),E=P(n(6)),M=P(n(22)),T=["builderAnimation","builderDisplayModalSettings","builderEnableDummyContent","builderEventMode","builderViewMode","builderHideDisabledModules","builderModalPreference","builderPageCreationFlow","historyIntervals","toolbarButtons"];function P(e){return e&&e.__esModule?e:{default:e}}function x(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(x=function(e){return e?n:t})(e)}function j(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=x(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function D(){return D=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function N(e,t){for(var n=0;nV.innerWidth,c=s?0:y.default.pageSettingsBar,d=s?0:30,f=!!G&&h.default.$topWindow("#et_pb_layout");if("top"===e){if(G&&f){var p=h.default.$topWindow().scrollTop();return(0,u.default)(f.offset(),"top",0)+f.find("h2.hndle").outerHeight()+z-p}return i||o?y.default.topbar.desktop+d:r||n?c+y.default.topbar.desktop:"auto"}return"bottom"===e?G||r||n||i||o?"auto":c:"right"===e?G?U?"auto;":h.default.$topWindow().width()-((0,u.default)(f.offset(),"left",0)+f.width())+10:l||o?c:i?"auto":!(!h.default.condition("is_rtl")||h.default.condition("is_no_rtl"))&&d:"left"===e?G?U?(0,u.default)(f.offset(),"left",0)+10:"auto":i?c:l||o?"auto":n?c:!(!r&&h.default.condition("is_rtl")&&!h.default.condition("is_no_rtl"))&&d:void 0}},{key:"_handleScroll",value:function(){this._handleResize()}},{key:"_handleShortcuts",value:function(e){27===e.keyCode&&m.default.buttonClick({props:{buttonName:g.default.MODAL_APP_BUTTON_CLOSE}})}},{key:"_handleResize",value:function(){var e=G?h.default.$topWindow("#et_pb_layout").offset().top:0,t=G?h.default.$topWindow().scrollTop():0,n=G?96:146;V.innerHeight<940+n+(e-t)+30?V.innerHeight<200?this.setState({height:100}):this.setState({height:V.innerHeight-n-30-e+t}):this.setState({height:940})}},{key:"_handleAnimationChange",value:function(){var e=this.props.builderAnimation;m.default.preferencesChange({builder_animation:!e})}},{key:"_handleDisabledModules",value:function(){var e=this.props.builderHideDisabledModules;m.default.preferencesChange({hide_disabled_modules:!e})}},{key:"_handleAllModalSettings",value:function(){var e=this.props.builderDisplayModalSettings;m.default.preferencesChange({builder_display_modal_settings:!e})}},{key:"_handleDummyContent",value:function(){var e=this.props.builderEnableDummyContent;m.default.preferencesChange({builder_enable_dummy_content:!e})}},{key:"_handleEventModeChange",value:function(e,t){m.default.preferencesChange({event_mode:K(t)})}},{key:"_handleViewModeChange",value:function(e,t){var n=(0,c.default)(t)?$():t;m.default.preferencesChange({view_mode:n})}},{key:"_handleHistoryChange",value:function(e,t){m.default.preferencesChange({history_intervals:Y(t)})}},{key:"_handlePageCreationFlowChange",value:function(e,t){m.default.preferencesChange({page_creation_flow:J(t)})}},{key:"_handleModalChange",value:function(e,t){m.default.preferencesChange({modal_preference:X(t)})}},{key:"_handleReset",value:function(e,t,n){return e!==t&&o.default.createElement(v.default,{__onClick:n},o.default.createElement(k.default,{icon:"reset"}))}},{key:"_getViewModesList",value:function(){var e=h.default.condition("is_bfb"),t=H.view_mode_select;if(e){var n=t.wireframe;(0,i.default)(t.wireframe),t=(0,l.default)({wireframe:n},t)}return t}},{key:"render",value:function(){var e=this.props,t=e.builderAnimation,n=e.builderDisplayModalSettings,r=e.builderEnableDummyContent,i=e.builderEventMode,l=e.builderViewMode,s=e.builderHideDisabledModules,c=e.builderModalPreference,d=e.builderPageCreationFlow,f=e.historyIntervals,p=e.toolbarButtons,m=L(e,T),y=this.state,M=y.height,P=y.width,x=E.default.getAppPreferences();return o.default.createElement(O.default,D({className:"et-fb-modal--app",forceUpdate:!0,headerButtons:[o.default.createElement(v.default,{buttonName:g.default.MODAL_APP_BUTTON_CLOSE,inverse:!0,tooltip:ETBuilderBackend.i18n.tooltip.modal.cancel},o.default.createElement(k.default,{icon:"exit",color:"#FFFFFF"}))],label:H.title,measurement:{height:M,width:P},animate:this.props.options.animate,style:{top:this._getPosition("top"),bottom:this._getPosition("bottom"),left:this._getPosition("left"),right:this._getPosition("right")}},m),o.default.createElement(w.ETBuilderTabPanel,{selected:!0},o.default.createElement("div",{className:"et-fb-form"},o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,H.labels.toolbar),o.default.createElement(b.default,null,o.default.createElement(v.default,{additionalAttrs:{toolbarButton:"wireframe"},buttonName:g.default.TOGGLE_TOOLBAR_BUTTON,stopPropagation:!0,style:{background:"#F2F6F9"}},o.default.createElement(k.default,{color:q("wireframe",p),icon:"wireframe"})),o.default.createElement(v.default,{additionalAttrs:{toolbarButton:"zoom"},buttonName:g.default.TOGGLE_TOOLBAR_BUTTON,stopPropagation:!0,style:{background:"#F2F6F9"}},o.default.createElement(k.default,{color:q("zoom",p),icon:"zoom-in"})),o.default.createElement(v.default,{additionalAttrs:{toolbarButton:"desktop"},buttonName:g.default.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},o.default.createElement(k.default,{color:q("desktop",p),icon:"desktop"})),o.default.createElement(v.default,{additionalAttrs:{toolbarButton:"tablet"},buttonName:g.default.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},o.default.createElement(k.default,{color:q("tablet",p),icon:"tablet"})),o.default.createElement(v.default,{additionalAttrs:{toolbarButton:"phone"},buttonName:g.default.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},o.default.createElement(k.default,{color:q("phone",p),icon:"phone"}))),o.default.createElement(b.default,{style:h.default.condition("is_rtl")&&!h.default.condition("is_no_rtl")?{marginRight:3}:{marginLeft:3}},o.default.createElement(v.default,{additionalAttrs:{toolbarButton:"hover"},buttonName:g.default.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},o.default.createElement(k.default,{color:q("hover",p),icon:"hover"})),o.default.createElement(v.default,{additionalAttrs:{toolbarButton:"click"},buttonName:g.default.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},o.default.createElement(k.default,{color:q("click",p),icon:"click"})),o.default.createElement(v.default,{additionalAttrs:{toolbarButton:"grid"},buttonName:g.default.TOGGLE_TOOLBAR_BUTTON,style:{background:"#F2F6F9"}},o.default.createElement(k.default,{color:q("grid",p),icon:"grid"})))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,H.labels.view_mode),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(S.default,{name:"builder_view_mode",value:l,options:this._getViewModesList(),_onChange:this._handleViewModeChange}),l!==$()&&""!==l&&o.default.createElement(v.default,{className:"et-fb-button--reset",__onClick:this._handleViewModeChange,small:!0},o.default.createElement(k.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,H.labels.interaction_mode),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(S.default,{name:"view_mode",value:K(i,!0),options:H.interaction_mode_select,_onChange:this._handleEventModeChange}),!(0,a.default)(["","hover","default"],i)&&o.default.createElement(v.default,{className:"et-fb-button--reset",__onClick:this._handleEventModeChange,small:!0},o.default.createElement(k.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,H.labels.history),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(S.default,{name:"history",value:Y(f,!0),options:H.history_intervals_select,_onChange:this._handleHistoryChange}),1!==f&&o.default.createElement(v.default,{className:"et-fb-button--reset",__onClick:this._handleHistoryChange,small:!0},o.default.createElement(k.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,H.labels.modal_position),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(S.default,{name:"modal_position",value:X(c,!0),options:this._getModalOptions(),_onChange:this._handleModalChange}),"default"!==c&&o.default.createElement(v.default,{className:"et-fb-button--reset",__onClick:this._handleModalChange,small:!0},o.default.createElement(k.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,H.labels.page_creation_flow),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(S.default,{name:"page_creation",value:J(d,!0),options:H.page_creation_flow_select,_onChange:this._handlePageCreationFlowChange}),"default"!==d&&o.default.createElement(v.default,{className:"et-fb-button--reset",__onClick:this._handlePageCreationFlowChange,small:!0},o.default.createElement(k.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,H.labels.animation),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(C.default,{onClick:this._handleAnimationChange,options:{on:H.builder_animation_toggle.on,off:H.builder_animation_toggle.off},value:t?"on":"off"}),t!==(0,u.default)(x,"builder_animation.default")&&o.default.createElement(v.default,{className:"et-fb-button--reset",__onClick:this._handleAnimationChange,small:!0},o.default.createElement(k.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,H.labels.disabled_modules),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(C.default,{onClick:this._handleDisabledModules,options:{on:H.hide_disabled_module_toggle.on,off:H.hide_disabled_module_toggle.off},value:s?"off":"on"}),s!==(0,u.default)(x,"hide_disabled_modules.default")&&o.default.createElement(v.default,{className:"et-fb-button--reset",__onClick:this._handleDisabledModules,small:!0},o.default.createElement(k.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,H.labels.group_settings),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(C.default,{onClick:this._handleAllModalSettings,options:{on:H.display_modal_settings.on,off:H.display_modal_settings.off},value:n?"off":"on"}),n!==(0,u.default)(x,"builder_display_modal_settings.default")&&o.default.createElement(v.default,{className:"et-fb-button--reset",__onClick:this._handleAllModalSettings,small:!0},o.default.createElement(k.default,{icon:"reset"}))))),o.default.createElement(_.ETBuilderFormGroup,null,o.default.createElement(_.ETBuilderFormLabel,null,H.labels.dummy_content),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(C.default,{onClick:this._handleDummyContent,options:{on:H.enable_dummy_content.on,off:H.enable_dummy_content.off},value:r?"on":"off"}),r!==(0,u.default)(x,"builder_enable_dummy_content.default")&&o.default.createElement(v.default,{className:"et-fb-button--reset",__onClick:this._handleDummyContent,small:!0},o.default.createElement(k.default,{icon:"reset"}))))))))}}],n&&N(t.prototype,n),r&&N(t,r),p}(o.Component);Q.propTypes={},Q.defaultProps={toolbarButtons:{}};var Z=Q;t.default=Z},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=G(n(0)),a=n(29),i=G(n(13)),l=G(n(7)),u=G(n(10)),s=G(n(8)),c=G(n(4)),d=G(n(5)),f=G(n(41)),p=G(n(178)),h=G(n(31)),m=G(n(36)),g=G(n(54)),y=G(n(323)),v=G(n(11)),b=G(n(133)),_=G(n(119)),w=G(n(12)),k=G(n(142)),O=G(n(1)),S=G(n(24)),C=G(n(131)),E=G(n(22)),M=G(n(58)),T=G(n(278)),P=G(n(19)),x=G(n(57)),j=G(n(770)),D=G(n(44)),L=G(n(768)),N=G(n(6)),A=H(n(769)),R=H(n(495)),B=G(n(2)),F=G(n(1454)),I=n(384);n(1507);var W=["onModalChange"];function V(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(V=function(e){return e?n:t})(e)}function H(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=V(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function G(e){return e&&e.__esModule?e:{default:e}}function U(){return U=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function q(e,t){for(var n=0;n1200||u>1200)&&!c;if(t&&f){if(n)return this.state.openedContentGroup===e;if(r)return this.state.openedDesignGroup===e;if(o)return this.state.openedAdvancedGroup===e}return this.state.openedToggle===e}},{key:"_onMouseEnterGroup",value:function(e){this.setState({hoveredGroup:e})}},{key:"_onMouseLeaveGroup",value:function(e){this.state.hoveredGroup===e&&this.setState({hoveredGroup:null})}},{key:"_onClickHelp",value:function(e){var t=this.state.activeDescription===e?null:e;this.setState({activeDescription:t})}},{key:"_onClickToggle",value:function(t,n,r){var o=(0,I.getModalPreferredSnapSettings)(),i=o.snap,l=o.snapLocation,u=(0,I.getModalPreferredDimensions)().width,s=(0,d.default)(["top","bottom"],l),c=B.default.topWindow().innerWidth1200||u>1200)&&!c,p="content"===r,h="design"===r,m="advanced"===r;if(this._isToggleOpened(t,r)&&f){if(p)return this.setState({openedContentGroup:"",openedToggle:""});if(h)return this.setState({openedDesignGroup:"",openedToggle:""});if(m)return this.setState({openedAdvancedGroup:"",openedToggle:""})}if(this._isToggleOpened(t))this.setState({openedToggle:""});else{var g=1===n?0:61*n-10;f?e((0,a.findDOMNode)(this)).find(".et-fb-tabs__panel--".concat(r)).animate({scrollTop:g},300):e((0,a.findDOMNode)(this)).find(".et-fb-tabs__panel--active").animate({scrollTop:g},300),this.setState({openedToggle:t,openedContentGroup:"content"===r?t:this.state.openedContentGroup,openedDesignGroup:"design"===r?t:this.state.openedDesignGroup,openedAdvancedGroup:"advanced"===r?t:this.state.openedAdvancedGroup})}}},{key:"_onFilterInput",value:function(e){this.setState({filterOptions:e,filterNotice:!1})}},{key:"_onFilterSelect",value:function(e){this.setState({filterSelected:e,filterNotice:!1})}},{key:"_isOptionMatchesFilter",value:function(e,t,n){var r=this.state.filterOptions,o=[e.label,e.description,t,n],a=this.state.filterSelected;if(""===r&&(0,c.default)(a))return!0;var i=!1;if(r&&(0,s.default)(o,(function(e){(0,u.default)(e)||-1===e.toLowerCase().indexOf(r.toLowerCase())||(i=!0)})),"styles_modified"===a){if("content"===e.tab_slug&&"background"!==e.toggle_slug)return!1;var l=this._isOptionDefaultValue(e);i=r?i&&!l:!l}return i}},{key:"_isOptionDefaultValue",value:function(e){var t=e.default,n=N.default.getPageSetting(e.id);return!(0,u.default)(e.depends_on)&&!this.isVisible(e,this.fields)||(!(!(0,u.default)(e.readonly)||"readonly"!==e.readonly)||("yes_no_button"===e.type?!(!(0,c.default)(t)||"off"!==n)||t===n:!(!(0,c.default)(t)||!(0,c.default)(n))||t===n))}},{key:"renderToggleFields",value:function(e,t){return!!this.builder_display_modal_settings||!(""===this.state.filterOptions&&!B.default.hasValue(this.state.filterSelected))||this._isToggleOpened(e,t)}},{key:"_getTogglesForTab",value:function(e){var t={};return(0,s.default)(this.fields,(function(n){var r=n.tab_slug,o=n.toggle_slug,a=n.hide_on_fb,i=n.type;r!==e||a||"hidden"===i||(0,g.default)(t,o,!0)})),(0,_.default)(this.toggles,(function(e,n){return(0,m.default)(t,n)||"unclassified"===n}))}},{key:"_renderTab",value:function(e){var t=this,n=[],r=0,a=this._getTogglesForTab(e);return(0,h.default)(a,(function(l,s){r++;var c=(0,w.default)(l)?l.title:l,d=(0,w.default)(l)?l.sub_toggles:{};return o.default.createElement(R.ETBuilderFormToggle,{key:s,title:c,toggleId:s,toggleGroupId:e,_onClickToggle:t._onClickToggle,isToggleOpened:t._isToggleOpened(s,e),toggleOrder:r,isLastToggle:(0,k.default)(a)===r,isFilterActive:""!==t.state.filterOptions||B.default.hasValue(t.state.filterSelected),subToggles:d},!!t.renderToggleFields(s,e)&&(0,h.default)((0,b.default)((0,y.default)(t.fields),["index"]),(function(r,a){var l,d=r;if(a=r.id,r.name&&r.name.indexOf("custom_css")>=0&&(l=N.default.getPageSetting(r.id)),!t._isOptionMatchesFilter(r,c,l))return!1;if(r.tab_slug!==e)return"";if(r.toggle_slug!==s)return!1;if(r.hide_on_fb)return"";if((0,u.default)(r.name)&&(r.name=r.id),"categories"===r.type&&(r.categories_list={},r.taxonomy_name=(0,u.default)(r.taxonomy_name)?"category":r.taxonomy_name),"select_sidebar"===r.type&&(r.sidebars_list={}),(0,u.default)(r.type)||!F.default.getControl(r.type))return!1;var h={isPageSetting:!0};if("codemirror"===r.type&&(h.search=t.state.filterOptions),!(0,u.default)(r.depends_on_post_type)&&-1===r.depends_on_post_type.indexOf(ETBuilderBackend.postType))return n.push(r.name),!1;if(!(0,u.default)(r.depends_on)&&!t.isVisible(r,t.fields))return n.push(r.name),!1;if(!(0,u.default)(r.depends_on)&&(0,f.default)(r.depends_on,(0,p.default)(r.depends_on,n)))return!1;var m={};m["".concat("et-fb-settings-options")]=!0,m["et-fb-option--".concat(r.type.replace("_","-"))]=!0,(0,u.default)(r.depends_show_if)||(m[" et-fb-settings-option--depends-on"]=!0),"categories"!==r.type||(0,u.default)(r.taxonomy_name)||""===r.taxonomy_name||(m["et-fb-option--".concat(r.taxonomy_name)]=!0);var g="",y="",b=!(0,u.default)(r.description)&&""!==r.description,_=(0,S.default)(function(e){return B.default.get((0,O.default)(e,"default_on_front"),B.default.get((0,O.default)(e,"defaultValue"),B.default.get((0,O.default)(e,"default"),"")))}(r)),w=(0,S.default)(N.default.getPageSetting(r.id)),k=_===w?"":w;(0,u.default)(r.label)||""===r.label||(g=o.default.createElement(R.ETBuilderFormLabel,{name:r.name,activeHelp:t._isDescriptionVisible(r.name),hoveredGroup:t._isHoveredGroup(r.name),isResetActive:B.default.get(k,_)!==_,onClickReset:t._onClickReset,key:"et-fb-settings-option-label-".concat(a),onClickHelp:!!b&&t._onClickHelp},r.label)),b&&(y=o.default.createElement(R.ETBuilderFormDescription,{active:t._isDescriptionVisible(r.name),key:"et-fb-settings-option-description-".concat(a)},r.description));var C={slug:r.type,type:"field"},E=N.default.getPageSettings(!0,N.default.getActiveThemeBuilderArea());return o.default.createElement(R.ETBuilderFormGroup,{name:r.name,key:"et-fb-settings-option-form-group-".concat(a),onMouseEnterGroup:t._onMouseEnterGroup,onMouseLeaveGroup:t._onMouseLeaveGroup,hovered:t.isOptionHovered(r.name)},g,y,o.default.createElement("div",{className:(0,i.default)(m),key:"et-fb-settings-option-".concat(a)},o.default.createElement("div",{className:"et-fb-settings-option-container",key:"et-fb-settings-option-container-".concat(a)},o.default.createElement(F.default.getControl(r.type),(0,v.default)({key:r.id,value:k,name:r.id,content:k,_onChange:t._onChange,animate:t.props.options.animate,defaultValue:_,fieldDefinition:d,matching:C,attrs:E},h,r)))))})))}))}},{key:"_handleFormSubmission",value:function(e){e.preventDefault(),P.default.pageSettingsClose()}},{key:"maybeShowFilterNotice",value:function(){var t=this;this.state.filterNotice||(0,c.default)(this.state.filterOptions)&&(0,c.default)(this.state.filterSelected)||(clearTimeout(Z),Z=setTimeout((function(){e((0,a.findDOMNode)(t)).find(".et-fb-form__group").length||(e((0,a.findDOMNode)(t)).find(".et-fb-options-filter input").trigger("blur"),t.setState({filterNotice:!0}))}),300))}},{key:"_renderPageSettingsPanel",value:function(e){var t={},n=["styles_modified"];return(0,s.default)(ETBuilderBackend.searchFilterItems,(function(e,r){(0,u.default)(t[r])&&(t[r]={}),(0,s.default)(e,(function(e,o){n.includes(o)&&(t[r][o]=e)}))})),o.default.createElement(A.ETBuilderTabPanel,{className:"et-fb-tabs__panel--".concat(e),key:"et-fb-tabs__panel--".concat(e),displayFilter:!0,filterValue:this.state.filterOptions,filterSelected:this.state.filterSelected,filterItems:t,filterGroups:{show_only:ETBuilderBackend.i18n.modals.show_only},filterNotice:this.state.filterNotice,_onFilterInput:this._onFilterInput,_onFilterSelect:this._onFilterSelect},o.default.createElement(R.default,{onSubmit:this._handleFormSubmission},o.default.createElement("input",{type:"submit",className:"et-fb-hide"}),this._renderTab(e),!(this.state.filterNotice||(this.state.filterOptions||this.state.filterSelected)&&(0,d.default)(["content","design"],e))&&o.default.createElement(j.default,{id:"et_pb_default"})))}},{key:"render",value:function(){var e=this,t=this.props,n=t.onModalChange,r=z(t,W),a=ETBuilderBackend.i18n.modals.pageSettings.tabs,l=[o.default.createElement(x.default,{block:!0,danger:!0,buttonName:M.default.PAGE_SETTINGS_CLOSE,tooltip:ETBuilderBackend.i18n.tooltip.modal.cancel},o.default.createElement(D.default,{icon:"exit",color:"#FFFFFF"})),o.default.createElement(x.default,{block:!0,primary:!0,alt:!0,buttonName:M.default.PAGE_SETTINGS_BUTTON_UNDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.undo},o.default.createElement(D.default,{icon:"undo",color:"#FFFFFF"})),o.default.createElement(x.default,{block:!0,info:!0,buttonName:M.default.PAGE_SETTINGS_BUTTON_REDO,tooltip:ETBuilderBackend.i18n.tooltip.modal.redo},o.default.createElement(D.default,{icon:"redo",color:"#FFFFFF"})),o.default.createElement(x.default,{block:!0,success:!0,buttonName:M.default.PAGE_SETTINGS_EDIT,tooltip:ETBuilderBackend.i18n.tooltip.modal.save},o.default.createElement(D.default,{icon:"check",color:"#FFFFFF"}))],u=(0,i.default)({"et-fb-modal__module-settings":!0,"et-fb-modal__filter-active":""!==this.state.filterOptions||B.default.hasValue(this.state.filterSelected),"et-fb-modal__page-settings":!0}),s=(0,I.getModalPreferredSnapSettings)().snapLocation,c=this.props.activeTab||0,d=N.default.getActiveThemeBuilderArea(),f=ETBuilderBackend.i18n.modals.pageSettings.title[d];return o.default.createElement(L.default,U({className:u,footerButtons:l,fullscreen:(0,I.getModalPreferredFullscreen)(),globalUpdate:!0,label:f,measurement:(0,I.getModalPreferredDimensions)(),animate:this.props.options.animate,onModalChange:n,position:(0,I.getModalPreferredCoordinates)(),snapLocation:s},r),o.default.createElement(A.default,{selectedIndex:c},o.default.createElement(A.ETBuilderTabList,null,(0,h.default)(a,(function(e,t){return o.default.createElement(A.ETBuilderTabItem,{key:"et-fb-modal--builder-settings-".concat(t)},e)}))),(0,h.default)(a,(function(t,n){return e._renderPageSettingsPanel(n)}))))}},{key:"_onChange",value:function(e,t){"et_pb_enable_ab_testing"===e&&B.default.isOff(t)&&N.default.abIsMode("on",N.default.getActiveThemeBuilderArea())?P.default.abDisable():P.default.pageSettingsChange(e,t)}}])&&q(n.prototype,r),l&&q(n,l),H}(o.default.Component);te.propTypes=ee;var ne=te;t.default=ne}).call(this,n(9))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=X(n(24)),a=X(n(63)),i=X(n(68)),l=X(n(54)),u=X(n(196)),s=X(n(119)),c=X(n(123)),d=X(n(40)),f=X(n(100)),p=X(n(14)),h=X(n(10)),m=X(n(12)),g=X(n(4)),y=X(n(3)),v=X(n(5)),b=X(n(132)),_=X(n(36)),w=X(n(1)),k=X(n(8)),O=X(n(61)),S=X(n(11)),C=Y(n(0)),E=X(n(13)),M=n(99),T=X(n(57)),P=X(n(1467)),x=n(59),j=X(n(44)),D=X(n(1454)),L=X(n(277)),N=X(n(768)),A=Y(n(769)),R=n(495),B=X(n(19)),F=X(n(6)),I=X(n(22)),W=X(n(785)),V=n(2),H=X(n(448)),G=n(17),U=n(39),z=n(384),q=X(n(777));n(1793);var K=n(1517);function $(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return($=function(e){return e?n:t})(e)}function Y(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=$(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function X(e){return e&&e.__esModule?e:{default:e}}function J(){return J=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],t=this._getHoveredElement("payload.toggleId"),n=this._getEditedModule(),r=this._getHoveredElement("payload.toggleGroupId"),o=this._getHoveredElement("elementId");e||(r="css"===r?"custom_css":r);var a=(0,O.default)(F.default.getModuleFields(n),{name:o,tab_slug:r,toggle_slug:t}),i=(0,S.default)({},{name:o,type:this._getHoveredElement("payload.option_family"),label:this._getHoveredElement("payload.optionTitle"),subField:this._getHoveredElement("subElementId")},a);if("categories"===i.type&&(i=(0,S.default)({},i,{categories_list:{},taxonomy_name:(0,h.default)(i.taxonomy_name)?"category":i.taxonomy_name})),"conditional_logic"===i.type&&(i=(0,S.default)({},i,{hideAddButton:!0,hideDeleteButton:!0})),"select"===i.type&&(0,h.default)(i.default)&&!(0,g.default)(i.options)){var l=(0,y.default)(i.options)?[]:{};(0,k.default)(i.options,(function(e,t){(0,m.default)(e)||(0,y.default)(e)?(0,k.default)(e,(function(e,t){l[t]=e})):l[t]=e})),l&&(i=(0,S.default)({},i,{default:(0,y.default)(l)?l[0]:(0,b.default)((0,p.default)(l))}))}return"center_map"===i.type&&(i=(0,S.default)({},i,{disableAction:!0,hideUpdateButton:!0})),i}},{key:"_getSelectedFieldType",value:function(){return(0,w.default)(this._getSelectedField(),"type","text")}},{key:"_getSelectedFieldLabel",value:function(){var e=this._getSelectedField(),t=(0,w.default)(e,"label","");if("font"===e.type){var n=(0,w.default)(this._getSelectedField(),"group_label",""),r=this._getHoveredElementSubId(),o=(this._getSelectedFieldValue()||"||||||||").split("|"),a={family:(0,w.default)(o,0,""),weight:(0,w.default)(o,1,""),italic:(0,w.default)(o,2,""),uppercase:(0,w.default)(o,3,""),underline:(0,w.default)(o,4,""),capitalize:(0,w.default)(o,5,""),strikethrough:(0,w.default)(o,6,""),line_style:(0,w.default)(o,7,""),line_color:(0,w.default)(o,8,"")},i=(0,V.isOn)((0,w.default)(a,"underline"));switch(r){case"weight":t=se.fontWeight;break;case"style":t=se.fontStyle;break;case"line_color":var l=i?se.underline:se.strikethrough,u=se.color;t="".concat(l," ").concat(u);break;case"line_style":var s=i?se.underline:se.strikethrough,c=se.style;t="".concat(s," ").concat(c);break;default:t=(0,w.default)(se,r,"")}return(0,h.default)(n)?t:"".concat(n," ").concat(t)}return t}},{key:"_getSelectedFieldValue",value:function(){var e=(0,w.default)(this._getSelectedField(!0),"name");return"desktop"!==this.moduleSettingMode&&(e=q.default.getNameByMode(e,this._getEditedModule("props.attrs"))),this._getFieldValue(e)}},{key:"_getFieldValue",value:function(e,t,n){var r=(0,h.default)(e)?(0,w.default)(this._getSelectedField(),"name"):e,o=(0,h.default)(t)?this._getSelectedField():t,a=(0,h.default)(n)?this._getEditedModule("props"):n,i=a.attrs||{};if(!((0,g.default)(o)||(0,h.default)(r)||(0,h.default)(o.type))){var l;if(("content"===r||(0,w.default)(o,"is_fb_content",!1))&&(l=(0,w.default)(a,"content")),"custom_padding"===o.type&&"custom_padding"!==r&&this._isModuleHasColumn(a)){var u=r.replace("padding_",""),s=(0,V.hasValue)(i["padding_".concat(u,"_last_edited")])?i["padding_".concat(u,"_last_edited")].split("|"):[],d=((0,w.default)(i,"padding_top_".concat(u),"")||"").trim(),f=((0,w.default)(i,"padding_right_".concat(u),"")||"").trim(),p=((0,w.default)(i,"padding_bottom_".concat(u),"")||"").trim(),m=((0,w.default)(i,"padding_left_".concat(u),"")||"").trim(),y=((0,w.default)(i,"padding_top_bottom_link_".concat(u),"")||"").trim(),v=((0,w.default)(i,"padding_left_right_link_".concat(u),"")||"").trim(),b="".concat(d,"|").concat(f,"|").concat(p,"|").concat(m,"|").concat(y,"|").concat(v);switch((0,h.default)(s[1])?"desktop":s[1]){case"phone":l=(0,w.default)(i,"padding_".concat(u,"_phone"),"");break;case"tablet":l=(0,w.default)(i,"padding_".concat(u,"_tablet"),"");break;default:l=b}}return"center_map"===o.type&&(l="et_pb_map_pin"===a.type?JSON.stringify((0,c.default)(i,["pin_address","pin_address_lat","pin_address_lng","zoom_level"])):JSON.stringify((0,c.default)(i,["address_lat","address_lng","zoom_level"]))),(0,h.default)(l)&&(l=(0,w.default)(i,r,(0,w.default)(o,"default"))),l}}},{key:"_getWithinOptions",value:function(){var e=this,t=this._getModuleStructure(),n={};return(0,k.default)(ETBuilderBackend.findReplace.within,(function(r,o){if("locations"===o){var a=(0,p.default)(r).filter((function(t){return"this_page"===t||e._getSourceModuleAddressScope(t)}));(0,g.default)(a)||(n[o]=(0,c.default)(r,a))}else{var i=["this_module","all_same_type"];"module"===t&&i.push(["all_modules"]),(0,g.default)(i)||(n[o]=(0,f.default)((0,c.default)(r,i),(function(t){return t.replace("%s",e._getModuleTitle())})))}})),n}},{key:"_getThroughoutOptions",value:function(){var e=this,t=this._getModuleStructure(),n=(0,w.default)(ETBuilderBackend,"findReplace.throughout",{}),r=(0,p.default)(n).filter((function(n){return"this_".concat(t)!==n&&("this_page"===n||e._getSourceModuleAddressScope(n))}));return(0,c.default)(n,r)}},{key:"_isReplaceValueValid",value:function(e,t){var n=e||this.state.replace,r=t||this._getSelectedField();if(!(0,w.default)(r,"required",!1)&&!(0,V.hasValue)(n))return!0;switch((0,w.default)(r,"type")){case"color":case"color-alpha":case"background-field":return H.default.isColorValid(n.toLowerCase())||(0,a.default)(n,"gcid-");case"range":var i=/^-?\d*\.?\d+$/,l=(0,w.default)(r,"default_unit",(0,w.default)(r,"fixed_unit",!1)),u=l?i.test(n.replace(l,"")):i.test(n);if(u&&(0,w.default)(r,"fixed_range",!1)){var s=r.range_settings||{min:0,max:100,step:1},c=(0,w.default)(r,"fixed_unit",(0,w.default)(r,"default_unit",!1)),d=c?parseFloat(n.replace(c,"")):parseFloat(n);u=d>=(0,w.default)(s,"min",0)&&d<=(0,w.default)(s,"max",100)}return u;case"font":return 9===(0,o.default)(n).split("|").length;case"center_map":return(0,V.isJson)(n);default:return!0}}},{key:"_isFieldTypeMatch",value:function(e){var t=!1,n=e.type||"custom_css"!==e.toggle_slug?e.type:"codemirror";switch(n){case"upload":var r=(0,w.default)(e,"data_type","image"),o=(0,w.default)(this._getSelectedField(),"data_type","image");(t=n===this._getSelectedFieldType()&&r===o)&&"video"===o&&(t=(0,w.default)(e,"field_template",!0)===(0,w.default)(this._getSelectedField(),"field_template",!1));break;case"background-field":t=(0,v.default)(["color","color-alpha","background-field"],this._getSelectedFieldType());break;default:t=n===this._getSelectedFieldType()}return t}},{key:"_isFieldNameMatch",value:function(e,t,n){if((0,V.isOn)(this.state.all))return!0;if(n&&(0,v.default)(this._getHoveredElement("payload.option"),n))return!0;var r={moduleType:this._getEditedModuleType(),field:this._getSelectedField(),value:this._getSelectedFieldValue()},o={moduleType:t.type,field:e,value:this._getFieldValue((0,w.default)(e,"name"),e,t)};return F.default.getModuleFieldsMapping(r,o)}},{key:"_isButtonEnabled",value:function(){return!((0,o.default)(this.state.find)===(0,o.default)(this.state.replace)||(0,g.default)(this.state.within)||this._isThroughoutEnabled()&&(0,g.default)(this.state.throughout)||!this._isReplaceValueValid())}},{key:"_isThroughoutEnabled",value:function(){return(0,v.default)(["all_modules","all_same_type"],this.state.within)}},{key:"_isDescriptionVisible",value:function(e){return this.state.activeDescription===e}},{key:"_isModuleHasColumn",value:function(e){var t=e||this._getModuleEdited("props"),n=(0,v.default)(["et_pb_row","et_pb_row_inner"],t.type),r=(0,V.isOn)((0,w.default)(t,"attrs.specialty")&&"et_pb_section"===(0,w.default)(t,"type"));return n||r}},{key:"_onKeyDown",value:function(e){27===e.keyCode&&this._onClose()}},{key:"_onClose",value:function(){B.default.findReplaceModalClose(this._getEditedModule(),this._getHoveredElement())}},{key:"_onMouseEnterGroup",value:function(e){this.setState({hoveredGroup:e})}},{key:"_onMouseLeaveGroup",value:function(){this.setState({hoveredGroup:!1})}},{key:"_onClickHelp",value:function(e){this.setState({activeDescription:this.state.activeDescription!==e&&e})}},{key:"_onChangeMap",value:function(e,t){try{this.setState({replace:JSON.stringify((0,l.default)(JSON.parse(this.state.replace),e,t))})}catch(n){this.setState(ie({},e,t))}}},{key:"_onChangeField",value:function(e,t){e!==(0,w.default)(this._getSelectedField(),"name")?this.setState(ie({},e,t)):this.setState({replace:t})}},{key:"_onChangeFieldWithin",value:function(e){this.setState({within:e})}},{key:"_onChangeFieldThroughout",value:function(e){this.setState({throughout:e})}},{key:"_onFindReplace",value:function(){var e=this;this.setState({buttonState:"loading"});var t=(0,o.default)(this.state.replace),n=(0,o.default)(this.state.find),r=!(0,V.hasValue)(n),i="font"===this._getHoveredElement("payload.option_family"),l=i&&this._getHoveredElement("subElementId"),c=l&&(0,V.getFontFieldIndexes)(l),d=this._getEditedModule("props.address"),f=this._getHoveredElement("payload.option"),p="display_conditions"===this._getHoveredElement("payload.option_family");new Promise((function(o){setTimeout((function(){var h=e._getTargetModules();return(0,g.default)(h)?o(!1):((0,k.default)(h,(function(o){var h=e._getModuleFields(o);"et_pb_icon"!==o.type||(0,_.default)(o.attrs.font_icon)||(o.attrs.font_icon=h.font_icon.default);var m={};(0,k.default)(o.attrs,(function(e,t){m[t]=e})),(0,k.default)(f,(function(e){(0,_.default)(m,e)||(m[e]="")}));var y=(0,s.default)(m,(function(e){if(e===n)return!0;if(i&&l){var t=e?e.split("|"):"||||||||".split("|"),o=n?n.split("|"):"||||||||".split("|");if(9===t.length&&t.length===o.length&&t[c]===o[c])return!0}return!!(0,K.isDisplayConditionsFoundInFindReplace)(p,n,e)||!(!r||(0,V.hasValue)(e))}));if(!(0,g.default)(y)){var b={};if((0,k.default)(y,(function(r,i){var l=q.default.getBaseName(i),s=(0,w.default)(h,l);if(!s&&(0,a.default)(l,"custom_css_")&&(s=(0,w.default)(h,(0,u.default)(l,"custom_css_",""))),s&&("skip"===s.type&&l.match(/_\d+$/)&&(s=(0,w.default)(h,l.replace(/_\d+$/,""),s)),s&&e._isFieldNameMatch(s,o,i)&&e._isFieldTypeMatch(s)&&e._isReplaceValueValid(t,s)))switch(s.type){case"font":var c=e._getFindReplaceFont(n,r,t);c&&(b[i]=c);break;case"select_box_shadow":var d=(0,O.default)(s.presets,(function(e){return e.value===t}));d&&((0,k.default)(d.fields,(function(e,t){b[t]=e})),b[i]=t);break;case"center_map":(0,k.default)(JSON.parse(t),(function(e,t){b[t]=e}));break;default:b[i]=t}})),!(0,g.default)(b)){var S={};if((0,k.default)(b,(function(t,n){(0,x.isDynamicContent)(t)&&!(0,x.isDynamicContentSupported)((0,w.default)(o,"type"),n)||(S[n]={value:t,isContent:(0,v.default)(["content","raw_content"],n)&&"et_pb_counter"!==(0,w.default)(o,"type")},n.includes("color")&&e._findReplaceColorValue(o,n))})),!(0,g.default)(S)){var C=o.address,E=C===d;B.default.findReplaceModuleUpdate(C,S,E)}}}})),o(!0))}),0)})).then((function(){e._onClose()}))}},{key:"_getFindReplaceData",value:function(e,t,n){var r=this,i=(0,o.default)(this.state.find),s=(0,o.default)(this.state.replace),c={};if(!this._isFieldTypeMatch(t))return!1;if(!this._isFieldNameMatch(t,n))return!1;if(!this._isReplaceValueValid(s,t))return!1;var d=[e];if(t.mobile_options&&q.default.isResponsiveEnabled(e,n)&&(d.push("".concat(e,"_tablet")),d.push("".concat(e,"_phone"))),"tabs"===t.hover&&q.default.isHoverEnabled(e,n)&&d.push("".concat(e,"__hover")),t.sticky&&q.default.isStickyEnabled(e,n)&&d.push("".concat(e,"__sticky")),(0,k.default)(d,(function(d){var f=d,p=(0,w.default)(t,"tab_slug",""),h=(0,w.default)(t,"toggle_slug","");"custom_css"===p&&"classes"!==h&&(0,a.default)(f,"custom_css_")&&(f=(0,u.default)(f,"custom_css_",""));var m=(0,o.default)(r._getFieldValue(f,t,n));switch((0,w.default)(t,"type")){case"skip":case"hidden":break;case"font":var g=r._getFindReplaceFont(i,m,s);g&&(0,l.default)(c,f,g);break;case"center_map":i.toLowerCase()===m.toLowerCase()&&(0,k.default)(JSON.parse(s),(function(e,t){(0,l.default)(c,t,e)}));break;default:if(m.toLowerCase()===i.toLowerCase()&&(0,l.default)(c,f,s),0===f.indexOf("padding_")&&r._isModuleHasColumn(n.props)&&e!==f){var y=f.replace("padding_",""),v=s.split("|");e==="padding_top_".concat(y)?(0,l.default)(c,e,(0,w.default)(v,0,"")):e==="padding_right_".concat(y)?(0,l.default)(c,e,(0,w.default)(v,1,"")):e==="padding_bottom_".concat(y)?(0,l.default)(c,e,(0,w.default)(v,2,"")):e==="padding_left_".concat(y)?(0,l.default)(c,e,(0,w.default)(v,3,"")):e==="padding_top_bottom_link_".concat(y)?(0,l.default)(c,e,(0,w.default)(v,4,"")):e==="padding_left_right_link_".concat(y)&&(0,l.default)(c,e,(0,w.default)(v,5,""))}}})),!(0,g.default)(c)&&(0,w.default)(t,"presets",!1)){var f=t.presets.filter((function(e){return(0,w.default)(e,"value")===s}));(0,k.default)(f,(function(e){var t=(0,w.default)(e,"fields",!1);t&&(0,k.default)(t,(function(e,t){(0,l.default)(c,t,e)}))}))}return c}},{key:"_getFindReplaceFont",value:function(e,t,n){var r=(0,o.default)(e).split("|");9!==r.length&&(r="||||||||".split("|"));var a=(0,o.default)(t).split("|");9!==a.length&&(a="||||||||".split("|"));var l=(0,o.default)(n).split("|");9!==l.length&&(l="||||||||".split("|"));var u=(0,V.getFontFieldIndexes)(this._getHoveredElementSubId());return!(0,i.default)(u,(function(e){return(0,w.default)(r,e,"")!==(0,w.default)(a,e,"")}))&&((0,k.default)(u,(function(e){a[e]=(0,w.default)(l,e,"")})),a.join("|"))}},{key:"_resetOption",value:function(){this.setState({replace:""})}},{key:"_renderSubHeader",value:function(){if("replace_global_color"===this.props.element.intent)return C.default.createElement("p",{className:"et-fb-modal__find-replace__header-desc"},ce.description)}},{key:"_getColorFindReplaceConfig",value:function(e){return e.findReplaceModalFind?{hideColorManagerLinks:!0,hideHarmoniousPalette:!0,hideCurrentColorWrapper:!0,hideColorResetButton:!0,showCustomInput:!0}:e.findReplaceModalReplace?{hasColorManager:!0,showPickerPalettes:!1,hidePickerOnPaletteSelect:!0,hidePaletteOnPickerActive:!1}:void 0}},{key:"_getReplaceGloablColorConfig",value:function(e){var t=this.props.element,n=t.color,r=t.colorId;return e.findReplaceModalFind?{hideColorManagerLinks:!0,hideHarmoniousPalette:!0,hideCurrentColorWrapper:!0,hideColorResetButton:!0,showCustomInput:!0,colorPaletteMode:"global",colorId:r,value:n}:e.findReplaceModalReplace?{hideColorManagerLinks:!0,colorPaletteMode:"global",colorId:r,color:n}:void 0}},{key:"_findReplaceColorValue",value:function(e,t){var n=this.props.element,r=null;"replace_global_color"===n.intent&&(r=n.colorId),B.default.maybeUpdateGlobalColorsInfo(e,t,r)}},{key:"_renderField",value:function(e,t,n){var r=this._getEditedModule(),a=r.isModuleItem&&!(0,h.default)(r.parentModule.props.type)&&r.parentModule.props.type?"".concat(e.name,"_child"):e.name;e.findReplaceModalFind?a="".concat(a,"__find"):e.findReplaceModalReplace?a="".concat(a,"__replace"):e.findReplaceModalWithin?a="".concat(a,"__within"):e.findReplaceModalThroughout?a="".concat(a,"__throughout"):e.findReplaceModalReplaceAll&&(a="".concat(a,"__all"));var i,l={slug:e.type,type:"field"},u=(0,S.default)({},e,{resetValue:!1,mobile_options:!1,disableReset:!0,uniqueKey:a,processedKey:a,fieldDefinition:e,matching:l});if("transform"===u.type){var s=(0,w.default)(I.default.getComponentAdvancedFields(this.props.module),"transform_styles.composite_structure"),c="".concat(u.name).replace("transform_",""),d=(0,w.default)(s,"".concat(c,".controls.transform_").concat(c));u.default_unit=d.default_unit,u.transform_type="".concat(u.name).replace("transform_",""),(0,V.hasValue)(u.default)||(u.default=d.default),(0,V.hasValue)(u.value)||(u.value=d.default)}(e.findReplaceModalFind||e.findReplaceModalReplace)&&((0,v.default)(["color","color-alpha"],u.type)&&(i="replace_global_color"===this.props.element.intent?this._getReplaceGloablColorConfig(e):this._getColorFindReplaceConfig(e),u=(0,S.default)({},u,Z(Z({},i),{},{moduleAttrs:(0,w.default)(r,"props.attrs")}))),"font"===u.type&&(u=(0,S.default)({},u,{subFieldLabel:!1,subField:this._getHoveredElementSubId()?this._getHoveredElementSubId():"font"})),"select_with_option_groups"===u.type&&(u=(0,S.default)({},u,{value:(0,w.default)((0,o.default)(u.value).split("|"),1,"none"),hideAddButton:!0,hideRemoveButton:!0,hideFetchButton:!0})),"multiple_checkboxes"===u.type&&(u=(0,S.default)({},u,{shortcut_index:a})));var f=(0,w.default)(u,"type","text"),p=f.replace("_","-"),m=(0,E.default)(ie({"et-fb-form__group--find-replace":!0,"et-fb-form__group--find-replace__find":e.findReplaceModalFind,"et-fb-form__group--find-replace__replace":e.findReplaceModalReplace,"et-fb-form__group--find-replace__within":e.findReplaceModalWithin,"et-fb-form__group--find-replace__throughout":e.findReplaceModalThroughout,"et-fb-form__group--find-replace__all":e.findReplaceModalReplaceAll,"et-fb-settings-option-select--column-structure":"column-structure"===f},"et-fb-form__group--".concat(p),!0)),g=(0,E.default)(ie({"et-fb-settings-options":!0,"et-fb-option--depends-on":!(0,h.default)(e.depends_default)||!(0,h.default)(e.depends_show_if)||!(0,h.default)(e.depends_show_if_not),"et-fb-option--select-with-option-groups":"select_with_option_groups"===f&&e.groups},"et-fb-option--".concat(p),!0)),y=(0,E.default)(ie({"et-fb-option-container":!0},"et-fb-option-container--".concat(p),!0)),b=(0,C.createElement)(D.default.getControl(f),u);return C.default.createElement(R.ETBuilderFormGroup,{className:m,name:a,key:"".concat(this.tabSlug,"-form-group-").concat(a),hovered:this.isOptionHovered(u.name),onMouseEnterGroup:this._onMouseEnterGroup,onMouseLeaveGroup:this._onMouseLeaveGroup},C.default.createElement(R.ETBuilderFormLabel,{name:a,hoveredGroup:this.state.hoveredGroup===a,activeHelp:this.state.activeDescription===a,onClickHelp:this._onClickHelp},t),C.default.createElement(R.ETBuilderFormDescription,{active:this.state.activeDescription===a},n),C.default.createElement("div",{className:g},C.default.createElement("div",{className:y},C.default.createElement(L.default,{componentName:a},(this.isDynamic||u.findReplaceModalReplace)&&(0,v.default)(P.default.supportedFieldTypes,f)?C.default.createElement(P.default,{type:u.dynamic_content||f,fieldName:u.name,fieldType:f,value:u.value,dynamicAttributes:[u.name],showSettingsButton:!u.readonly,showDisableButton:!u.readonly,onChange:u._onChange,onReset:this._resetOption},b):b))))}},{key:"_renderFieldFind",value:function(){var e,t=(0,S.default)({},this._getSelectedField(),{module:this,type:this._getSelectedFieldType(),value:this.state.find,findReplaceModalFind:!0,readonly:!0,_onChange:d.default}),n=this.state.find;"text"===t.type||(0,h.default)(n)||(0,l.default)(t,"default",n),"codemirror"===t.type&&(0,w.default)(t,"is_fb_content")&&(0,l.default)(t,"content",n),e="replace_global_color"===this.props.element.intent?ce.find.label:ce.find.label.replace("%s",this._getSelectedFieldLabel());var r=ce.find.description;return this._renderField(t,e,r)}},{key:"_renderFieldWithin",value:function(){if("replace_global_color"!==this.props.element.intent&&"global"!==this.state.colorPaletteMode){var e={name:"within",type:"select",value:this.state.within,options:this._getWithinOptions(),optionGroups:ETBuilderBackend.findReplace.groups,groupSeparator:!1,findReplaceModalWithin:!0,__onChange:this._onChangeFieldWithin},t=ce.within.label,n=ce.within.description;return this._renderField(e,t,n)}}},{key:"_renderFieldThroughout",value:function(){if(!this._isThroughoutEnabled())return!1;var e={name:"throughout",type:"select",value:this.state.throughout,options:this._getThroughoutOptions(),findReplaceModalThroughout:!0,__onChange:this._onChangeFieldThroughout},t=ce.throughout.label,n=ce.throughout.description;return this._renderField(e,t,n)}},{key:"_renderFieldReplace",value:function(){var e=this,t=(0,S.default)({},this._getSelectedField(),{module:this,type:this._getSelectedFieldType(),default:(0,x.isDynamicContent)(this.state.find)?"":this.state.find,value:(0,h.default)(this.state.replace)?"":this.state.replace,findReplaceModalReplace:!0,_onChange:d.default}),n=(0,w.default)(t,"readonly_if",!1);n&&(0,k.default)(n,(function(n,r){(0,v.default)(n,e._getEditedModule(r.replace(":",".props.attrs.")))&&(0,l.default)(t,"readonly",!0)}));var r=(0,w.default)(t,"readonly_if_not",!1);r&&(0,k.default)(r,(function(n,r){(0,v.default)(n,e._getEditedModule(r.replace(":",".props.attrs.")))||(0,l.default)(t,"readonly",!0)})),(0,w.default)(t,"readonly",!1)||("center_map"===t.type?((0,l.default)(t,"_onChange",this._onChangeMap),(0,l.default)(t,"hideUpdateButton",this._onChangeMap),(0,V.isJson)(this.state.replace)&&(0,k.default)(JSON.parse(this.state.replace),(function(e,n){(0,l.default)(t,n,(0,v.default)(["zoom_level"],n)?parseInt(e,10):e)}))):(0,l.default)(t,"_onChange",this._onChangeField)),"codemirror"===t.type&&(0,w.default)(t,"is_fb_content")&&(0,l.default)(t,"content",this.state.replace);var o=ce.replaceWith.label,a=ce.replaceWith.description;return this._renderField(t,o,a)}},{key:"_renderFieldReplaceAll",value:function(){var e=this;if("replace_global_color"!==this.props.element.intent&&"global"!==this.state.colorPaletteMode){var t=(0,f.default)(ETBuilderBackend.findReplace.all,(function(t){return t.replace("%s",e._getSelectedFieldLabel())})),n={name:"all",type:"multiple_checkboxes",value:this.state.all,options:t,findReplaceModalReplaceAll:!0,_onChange:this._onChangeField},r=ce.replaceAll.label.replace("%s",this._getSelectedFieldLabel()),o=ce.replaceAll.description;return this._renderField(n,r,o)}this.setState({all:"on"})}},{key:"render",value:function(){var e=this.state.buttonState?C.default.createElement(j.default,{icon:this.state.buttonState,color:"#FFFFFF"}):ce.tooltip,t=[C.default.createElement(T.default,{block:!0,info:!0,ink:!1,disable:!1!==this.state.buttonState,tooltip:ce.tooltip,__onClick:this.state.buttonState?d.default:this._onFindReplace},e)],n=(0,z.getModalPreferredSnapSettings)().snapLocation,r=Z(Z({},this.props),{},{measurement:(0,z.getModalPreferredDimensions)(),disableFullscreenButton:!0,disableSnapButton:!0,disableResizeButton:!0}),o=(0,E.default)({"et-fb-modal__module-settings":!0,"et-fb-modal__find-replace":!0}),a="font_icon"===this._getHoveredElement("elementId");return C.default.createElement(N.default,J({className:o,footerButtons:t,fullscreen:(0,z.getModalPreferredFullscreen)(),label:ue.decode(ce.title),position:(0,z.getModalPreferredCoordinates)(),snapLocation:n,_closeFunction:this.state.buttonState?d.default:this._onClose,globalUpdate:!0},r),C.default.createElement(L.default,null,C.default.createElement(A.default,{selectedIndex:0},C.default.createElement(A.ETBuilderTabPanel,{className:"et-fb-tabs__panel--".concat(this.tabSlug),slug:this.tabSlug,selected:!0},C.default.createElement("div",{className:"et-fb-form"},this._renderSubHeader(),this._renderFieldFind(),this._renderFieldWithin(),this._renderFieldThroughout(),this._renderFieldReplace(),a?"":this._renderFieldReplaceAll())))))}}],n&&ee(t.prototype,n),r&&ee(t,r),W}(C.default.PureComponent),fe=de;t.default=fe},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=ee(n(325)),a=Z(n(0)),i=ee(n(13)),l=n(99),u=ee(n(11)),s=ee(n(61)),c=ee(n(8)),d=ee(n(1)),f=ee(n(36)),p=ee(n(132)),h=ee(n(5)),m=ee(n(3)),g=ee(n(12)),y=ee(n(4)),v=ee(n(10)),b=ee(n(14)),_=ee(n(100)),w=ee(n(131)),k=ee(n(40)),O=ee(n(123)),S=ee(n(119)),C=ee(n(297)),E=ee(n(24)),M=ee(n(54)),T=ee(n(63)),P=ee(n(613)),x=ee(n(38)),j=ee(n(196)),D=ee(n(68)),L=ee(n(41)),N=ee(n(57)),A=ee(n(44)),R=ee(n(1454)),B=ee(n(277)),F=ee(n(768)),I=Z(n(769)),W=n(495),V=ee(n(19)),H=ee(n(6)),G=ee(n(22)),U=ee(n(785)),z=n(2),q=ee(n(17)),K=ee(n(39)),$=ee(n(1467)),Y=n(59),X=n(384),J=n(455);function Q(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(Q=function(e){return e?n:t})(e)}function Z(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=Q(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function ee(e){return e&&e.__esModule?e:{default:e}}function te(){return te=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:"";return"css"===t&&"custom_css"===n&&(0,T.default)(e,"custom_css_")?(0,j.default)(e,"custom_css_",""):e}},{key:"prependCustomCSSFieldName",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"css"!==t||"custom_css"!==n||(0,T.default)(e,"custom_css_")?e:"custom_css_".concat(e)}},{key:"getExtendTargetModules",value:function(){var e=this,t=H.default.getSectionsFlattened(),n=this.getSelectedModule("props.address"),r=(0,z.getModuleAddressSequence)(n),o=(0,s.default)(t,(function(t){return e.getModuleStructure(t.type)===e.state.throughout&&(0,h.default)(r,t.address)}));return t.filter((function(t){var n=(0,d.default)(t,"type",""),r=n.replace("_inner","");return"module"===e.state.to?e.getModuleStructure(r)===e.state.to:e.getModuleStructure(e.state.to)===e.getModuleStructure(r)&&("et_pb_column"!==n||"et_pb_specialty_section"!==(0,d.default)(t,"parent_slug")||!(0,s.default)((0,d.default)(t,"content",[]),(function(e){return"et_pb_row_inner"===e.type})))&&(r===e.state.to||t.is_module_child&&r===(0,d.default)(G.default.getModuleChildSlugs(),e.state.to))})).filter((function(t){return"page"===e.state.throughout||("post_content"===e.state.throughout?!t.attrs.theme_builder_area||t.attrs.theme_builder_area===e.state.throughout:["et_header_layout","et_footer_layout","et_body_layout"].includes(e.state.throughout)?t.attrs.theme_builder_area===e.state.throughout:(0,h.default)((0,z.getModuleAddressSequence)(t.address),(0,d.default)(o,"address")))})).filter((function(e){return!(0,z.isModuleLocked)(e,t)})).filter((function(n){return!(e.getSelectedModule("props.is_module_child",!1)&&!(0,y.default)(n.child_slug)&&!(0,y.default)((0,s.default)(t,{parent_address:n.address}))||!(0,y.default)(e.getSelectedModule("props.child_slug",""))&&n.is_module_child&&!(0,y.default)((0,s.default)(t,{address:n.parent_address})))})).filter((function(e){return e.address!==n}))}},{key:"getExtendTargetModulesFields",value:function(e,t){var n=this,r=this.getSelectedModule("props"),a=this.getSelectedModuleType(),i=o.default.getGlobalColorsInfo(r),l={},p=[];return(0,c.default)(t,(function(t){var o={},h=(0,d.default)(t,"type","");if(h===a)(0,c.default)(e,(function(e){if((0,f.default)(e,"name")){var a=n.prependCustomCSSFieldName(e.name,e.tab_slug,e.toggle_slug);o[a]=n.getExtendStylesValue(e,r,e,t);var u=n.getGlobalColorsData(a,o,i);(0,v.default)(u)||(l=u)}}));else{var m=n.getModuleFields({props:t});m=ae(ae(ae({},m),q.default.getHoverFieldsDefinition(m)),K.default.getStickyFieldsDefinition(m)),(0,c.default)(e,(function(e){var c={};if((0,f.default)(e,"name")){var p=n.convertCustomCSSFieldName(e.name,e.tab_slug,e.toggle_slug);if(pe.has("targetField",p,a,h))c=pe.get("targetField",p,a,h);else{if((0,f.default)(m,p))c=(0,d.default)(m,p);else{var g={moduleType:a,field:e};c=(0,s.default)(m,(function(e){var t=(0,u.default)({},{moduleType:h,field:e});return H.default.getModuleFieldsMapping(g,t)}))}pe.set(c,"targetField",e.name,a,h)}}if(!(0,y.default)(c)&&(0,f.default)(c,"name")){var b=n.prependCustomCSSFieldName(e.name,e.tab_slug,e.toggle_slug);o[b]=n.getExtendStylesValue(e,r,c,t);var _=n.getGlobalColorsData(b,o,i);(0,v.default)(_)||(l=_)}}))}(0,y.default)(o)||(o.global_colors_info=l,p.push((0,u.default)({},{targetModule:t,extendStylesData:o})))})),p}},{key:"getExtendStylesValue",value:function(e,t,n,r){var o=this.prependCustomCSSFieldName(e.name,e.tab_slug,e.toggle_slug),a=(0,d.default)(t,"attrs.".concat(o));if("font"!==(0,d.default)(e,"type")||"option"!==this.getSelectedSource())return a;var i=a.split("|"),l=(0,d.default)(n,"name"),u=(0,d.default)(r,"attrs.".concat(l),"||||||||").split("|"),s=(0,z.getFontFieldIndexes)(this.getSelectedField("subField","font"));return(0,c.default)(s,(function(e){u[e]=i[e]})),u.join("|")}},{key:"getSelectedSource",value:function(){return(0,d.default)(this.props,"source")}},{key:"getSelectedElement",value:function(e,t){var n=(0,d.default)(this.props,"element"),r=(0,d.default)(n,"payload.toggleGroupId",""),o=(0,d.default)(n,"payload.toggleId","");if("css"===r&&"custom_css"!==o){var a=(0,T.default)(n.elementId,"custom_css_")?(0,j.default)(n.elementId,"custom_css_",""):n.elementId;n.elementId=a}return(0,v.default)(e)?n:(0,d.default)(n,e,t)}},{key:"getSelectedModule",value:function(e,t){var n=(0,d.default)(this.props,"module");return(0,v.default)(e)?n:(0,d.default)(n,e,t)}},{key:"getSelectedModuleType",value:function(){return this.getSelectedModule("props.type")}},{key:"getSelectedModuleTitle",value:function(){var e=this.getSelectedModuleType();return pe.has("getSelectedModuleTitle",e)?pe.get("getSelectedModuleTitle",e):pe.set(H.default.getModuleTitle(e),"getSelectedModuleTitle",e)}},{key:"getSelectedModuleTitlePlural",value:function(){var e=this.getSelectedModuleType();return pe.has("getSelectedModuleTitlePlural",e)?pe.get("getSelectedModuleTitlePlural",e):pe.set(H.default.getModuleTitlePlural(e),"getSelectedModuleTitlePlural",e)}},{key:"getSelectedModuleStructure",value:function(){var e=this.getSelectedModuleType();return pe.has("getSelectedModuleStructure",e)?pe.get("getSelectedModuleStructure",e):pe.set(this.getModuleStructure(e),"getSelectedModuleStructure",e)}},{key:"getSelectedField",value:function(e,t){var n=this.getSelectedElement("elementId"),r=(0,z.getProcessedTabSlug)(this.getSelectedElement("payload.tabSlug")),o=this.getSelectedElement("payload.toggleId"),a=this.getSelectedModule(),i=(0,s.default)(this.getModuleFields(a),{name:n,tab_slug:r,toggle_slug:o}),l=(0,u.default)({},{name:n,type:this.getSelectedElement("payload.option_family"),label:this.getSelectedElement("payload.optionTitle"),subField:this.getSelectedElement("subElementId")},i);if(l.default_on_child&&(0,m.default)(l.default)&&2===l.default.length){var c=this.getSelectedModule("props.attrs.".concat(l.default[0]));l.default=c?(0,d.default)(l.default[1],c,""):""}return(0,v.default)(e)?l:(0,d.default)(l,e,t)}},{key:"getSelectedFieldValue",value:function(){return this.getFieldValue((0,d.default)(this.getSelectedField(),"name"),this.getSelectedField(),this.getSelectedModule("props"))}},{key:"getFieldValue",value:function(e,t,n){var r,o=n||this.getSelectedModule("props"),a=o.attrs||{};if(("content"===e||(0,d.default)(t,"is_fb_content",!1))&&(r=(0,d.default)(o,"content")),"custom_padding"===t.type&&"custom_padding"!==e){var i=(0,h.default)(["et_pb_row","et_pb_row_inner"],o.type),l=(0,z.isOn)((0,d.default)(o,"attrs.specialty")&&"et_pb_section"===(0,d.default)(o,"type"));if(i||l){var u=e.replace("padding_",""),s=(0,z.hasValue)(a["padding_".concat(u,"_last_edited")])?a["padding_".concat(u,"_last_edited")].split("|"):[],c=((0,d.default)(a,"padding_top_".concat(u),"")||"").trim(),f=((0,d.default)(a,"padding_right_".concat(u),"")||"").trim(),p=((0,d.default)(a,"padding_bottom_".concat(u),"")||"").trim(),m=((0,d.default)(a,"padding_left_".concat(u),"")||"").trim(),g=((0,d.default)(a,"padding_top_bottom_link_".concat(u),"")||"").trim(),y=((0,d.default)(a,"padding_left_right_link_".concat(u),"")||"").trim(),b="".concat(c,"|").concat(f,"|").concat(p,"|").concat(m,"|").concat(g,"|").concat(y);switch((0,v.default)(s[1])?"desktop":s[1]){case"phone":r=(0,d.default)(a,"padding_".concat(u,"_phone"),"");break;case"tablet":r=(0,d.default)(a,"padding_".concat(u,"_tablet"),"");break;default:r=b}}}if("center_map"===t.type&&(r="et_pb_map_pin"===o.type?JSON.stringify((0,O.default)(a,["pin_address","pin_address_lat","pin_address_lng","zoom_level"])):JSON.stringify((0,O.default)(a,["address_lat","address_lng","zoom_level"]))),"select_with_option_groups"===t.type&&(r=(0,d.default)((0,E.default)((0,d.default)(a,e,(0,d.default)(t,"default"))).split("|"),1,"none")),(0,d.default)(t,"mobile_options",!1)){var _=(0,d.default)(a,"".concat(e,"_last_edited"),"off|desktop").split("|");(0,z.isOn)((0,d.default)(_,0,"off"))&&"desktop"!==(0,d.default)(_,1,"desktop")&&(r=(0,d.default)(a,"".concat(e,"_").concat((0,d.default)(_,1))))}return(0,v.default)(r)&&(r=(0,d.default)(a,e,(0,d.default)(t,"default"))),r}},{key:"getGlobalColorsData",value:function(e,t,n){if(e.includes("_color")&&!(0,v.default)(t[e])){var r={};return(0,c.default)(n,(function(t,n){t.includes(e)&&(r[n]=(0,d.default)(r,n,[]),r[n].push(e))})),r}}},{key:"renderField",value:function(e,t,n){var r,o=this.getSelectedModule(),l=o.isModuleItem&&!(0,v.default)(o.parentModule.props.type)&&o.parentModule.props.type?"".concat(e.name,"_child"):e.name,s={slug:e.type,type:"field"},c=(0,u.default)({},e,{resetValue:!1,mobile_options:!1,disableReset:!0,uniqueKey:l,processedKey:l,animate:(0,d.default)(this.props,"options.animate",!1),fieldDefinition:e,matching:s}),f=(0,d.default)(c,"type","text"),p=f.replace("_","-"),m=(0,Y.isDynamicContent)(c.value),g=(0,y.default)(n),b=(0,i.default)((fe(r={},"et-fb-form__group--".concat(this.slug),!0),fe(r,"et-fb-form__group--".concat(p),!0),fe(r,"et-fb-form__group--readonly",c.readonly),r)),_=(0,i.default)(fe({"et-fb-settings-options":!0,"et-fb-option--depends-on":!(0,v.default)(e.depends_default)||!(0,v.default)(e.depends_show_if)||!(0,v.default)(e.depends_show_if_not),"et-fb-option--select-with-option-groups":"select_with_option_groups"===f&&e.groups},"et-fb-option--".concat(p),!0)),w=(0,i.default)(fe({"et-fb-option-container":!0},"et-fb-option-container--".concat(p),!0)),O=(0,a.createElement)(R.default.getControl(f),c);return a.default.createElement(W.ETBuilderFormGroup,{className:b,name:l,key:"".concat(this.slug,"-form-group-").concat(l),onMouseEnterGroup:g?k.default:this.onMouseEnterGroup,onMouseLeaveGroup:g?k.default:this.onMouseLeaveGroup,hovered:this.isOptionHovered(c.name)},a.default.createElement(W.ETBuilderFormLabel,{name:l,hoveredGroup:this.state.hoveredGroup===l,activeHelp:this.state.activeDescription===l,onClickHelp:this._onClickHelp},t),a.default.createElement(W.ETBuilderFormDescription,{active:this.state.activeDescription===l},n),a.default.createElement("div",{className:_},a.default.createElement("div",{className:w},a.default.createElement(B.default,{componentName:l},m&&(0,h.default)($.default.supportedFieldTypes,f)?a.default.createElement($.default,{type:c.dynamic_content||f,fieldName:c.name,fieldType:f,value:c.value,dynamicAttributes:[c.name],previewMode:"background",showSettingsButton:!1,showDisableButton:!1,onChange:c._onChange},O):O))))}},{key:"renderFieldSource",value:function(){var e=this;if("module"===this.getSelectedSource()){var t=this.getSelectedModuleTitle(),n=this.getSelectedModuleTitlePlural(),r=(0,z.sprintf)(me.labels.extend_module,t,n);return a.default.createElement(W.ETBuilderFormGroup,null,a.default.createElement(W.ETBuilderFormLabel,null,he.decode(r)))}if("options_group"===this.getSelectedSource()){var o=this.getSelectedElement("payload.toggleTitle"),i=me.labels.extend_options_group.replace(/%s/g,o);return a.default.createElement(W.ETBuilderFormGroup,null,a.default.createElement(W.ETBuilderFormLabel,null,he.decode(i)))}var l=this.getSelectedModule(),s=this.getSelectedElement("payload.option"),f=this.getSelectedField(),_=(0,h.default)(["composite"],(0,d.default)(f,"type"));if(!(0,y.default)(f)&&!_){var w=(0,u.default)({},f,{value:this.getSelectedFieldValue()}),O=this.getSelectedElement("payload.optionTitle"),S=function t(n){(0,M.default)(n,"module",e),(0,M.default)(n,"readonly",!0),(0,M.default)(n,"visible",!0),(0,M.default)(n,"_onChange",k.default);var r=(0,d.default)(n,"type");if("transform"===r&&(n.transform_type="".concat(n.name).replace("transform_","")),(0,T.default)(r,"background-")){(0,M.default)(n,"type","background"),(0,M.default)(n,"activeTab",r.replace("background-","")),(0,M.default)(n,"isDescriptionVisible",(function(){return!1})),(0,M.default)(n,"isHoveredGroup",(function(){return!1})),(0,M.default)(n,"onMouseEnterGroup",k.default),(0,M.default)(n,"onMouseLeaveGroup",k.default);var o={};(0,c.default)(e.getModuleFields(l),(function(e){(0,h.default)(s,e.name)&&(o[e.name]=(0,u.default)({},t(e)))})),(0,M.default)(n,"backgroundFields",o)}if("font"===r){var a=(0,d.default)(n,"group_label",""),i=(0,d.default)(n,"value","||||||||").split("|"),f={font:(0,d.default)(i,0,""),weight:(0,d.default)(i,1,""),italic:(0,d.default)(i,2,""),uppercase:(0,d.default)(i,3,""),underline:(0,d.default)(i,4,""),capitalize:(0,d.default)(i,5,""),strikethrough:(0,d.default)(i,6,""),line_style:(0,d.default)(i,7,""),line_color:(0,d.default)(i,8,"")},_=(0,z.isOn)((0,d.default)(f,"underline"));switch(n.subField){case"weight":(0,M.default)(n,"label",ge.fontWeight);break;case"style":(0,M.default)(n,"label",ge.fontStyle);break;case"line_color":var w=_?ge.underline:ge.strikethrough,O=ge.color;(0,M.default)(n,"label","".concat(w," ").concat(O));break;case"line_style":var S=_?ge.underline:ge.strikethrough,C=ge.style;(0,M.default)(n,"label","".concat(S," ").concat(C));break;default:(0,M.default)(n,"label",(0,d.default)(ge,n.subField,""))}(0,y.default)(a)||(0,M.default)(n,"label","".concat(a," ").concat(n.label)),(0,M.default)(n,"subFieldLabel",!1)}if((0,T.default)(r,"color")&&((0,M.default)(n,"hideColorManagerLinks",!0),(0,M.default)(n,"hideHarmoniousPalette",!0),(0,M.default)(n,"hideCurrentColorWrapper",!0),(0,M.default)(n,"hideColorResetButton",!0),(0,M.default)(n,"showCustomInput",!0),(0,M.default)(n,"hasPreview",!1)),"select_with_option_groups"===r&&((0,M.default)(n,"hideAddButton",!0),(0,M.default)(n,"hideRemoveButton",!0),(0,M.default)(n,"hideFetchButton",!0)),"center_map"===r&&((0,M.default)(n,"disableAction",!0),(0,M.default)(n,"hideUpdateButton",!0)),"conditional_logic"===r&&((0,M.default)(n,"hideAddButton",!0),(0,M.default)(n,"hideDeleteButton",!0)),"categories"===r&&((0,M.default)(n,"categories_list",{}),(0,y.default)(n.taxonomy_name)&&(0,M.default)(n,"taxonomy_name","category")),"select"===r&&(0,v.default)(n.default)&&!(0,y.default)(n.options)){var E=(0,m.default)(n.options)?[]:{};(0,c.default)(n.options,(function(e,t){(0,g.default)(e)||(0,m.default)(e)?(0,c.default)(e,(function(e,t){E[t]=e})):E[t]=e})),(0,y.default)(E)||(0,M.default)(n,"default",(0,m.default)(E)?(0,p.default)(E):(0,p.default)((0,b.default)(E)))}return n}(w),C=he.decode(me.labels.extend_option.replace(/%s/g,(0,d.default)(S,"label",O)));return this.renderField(S,C)}var E=this.getSelectedElement("payload.optionTitle"),P=me.labels.extend_option.replace(/%s/g,E);return a.default.createElement(W.ETBuilderFormGroup,null,a.default.createElement(W.ETBuilderFormLabel,null,he.decode(P)))}},{key:"renderFieldTo",value:function(){if("module"===this.getSelectedSource())return!1;var e,t,n,r=(e=this.getSelectedModuleStructure(),t=(0,_.default)((0,S.default)((0,u.default)({},H.default.getModules()),(function(e){return e.is_official_module&&((0,z.isOn)(e.is_parent)||(0,h.default)(["et_pb_column","et_pb_column_inner"],e.label))})),(function(e,t){var n=H.default.getModuleTitlePlural(t);return me.labels.all.replace("%s",(0,y.default)(n)?e.title:n)})),n=(0,_.default)((0,u.default)({},me.options.to),(function(e,n){return"containers"===n?(0,O.default)(t,["et_pb_section","et_pb_row","et_pb_column","et_pb_column_inner"]):(0,u.default)({},e,(0,w.default)(t,["et_pb_section","et_pb_row","et_pb_row_inner","et_pb_column","et_pb_column_inner"]))})),(0,S.default)(n,(function(t,n){return("module"!==e||"containers"!==n)&&t})));return this.renderField({options:r,type:"select",name:"to",default:this.state.to,value:this.state.to,optionGroups:me.groups.to,searchable:!0,_onChange:this.onChangeField},me.labels.to)}},{key:"renderFieldThroughout",value:function(){var e=this.getAvailableThroughoutOptions(),t=(0,b.default)(e),n=this.getSelectedModule("props.parent_slug"),r=this.getSelectedModuleType(),o=this.getModuleStructure(r),a=this.getModuleStructure(this.state.to),i="module"===o?t:(0,P.default)(t,t.indexOf(o)),l=("module"===a?t:(0,C.default)(t,t.indexOf(a))).filter((function(e){return"module"===o?"et_pb_section"===n||-1!==n.indexOf("fullwidth")?!(0,h.default)(["row","column"],e):"et_pb_specialty_column"!==n||!(0,h.default)(["row"],e):!(0,h.default)(i,e)||e===o})),u={options:(0,O.default)(e,l),type:"select",name:"throughout",default:this.state.throughout,value:this.state.throughout,_onChange:this.onChangeField};return this.renderField(u,me.labels.throughout)}},{key:"render",value:function(){var e,t,n=this.state.buttonState?a.default.createElement(A.default,{icon:this.state.buttonState,color:"#FFFFFF"}):me.button,r=[a.default.createElement(N.default,{block:!0,info:!0,ink:!1,tooltip:me.button,disable:!1!==this.state.buttonState,__onClick:this.state.buttonState?k.default:this.onExtendStyles},n)],o=(0,X.getModalPreferredSnapSettings)().snapLocation,l=ae(ae({},this.props),{},{measurement:(0,X.getModalPreferredDimensions)(),disableFullscreenButton:!0,disableSnapButton:!0,disableResizeButton:!0}),u=(0,i.default)((fe(e={"et-fb-modal__module-settings":!0},"et-fb-modal__".concat(this.slug),!0),fe(e,"et-fb-modal__".concat(this.slug,"--").concat(this.getSelectedSource()),!0),e)),s=(0,i.default)((fe(t={"et-fb-tabs__panel":!0},"et-fb-tabs__panel--".concat(this.slug),!0),fe(t,"et-fb-tabs__panel--".concat(this.slug,"--").concat(this.getSelectedSource()),!0),t)),c=(0,i.default)(fe({"et-fb-form":!0},"et-fb-form--".concat(this.getSelectedSource()),!0));return a.default.createElement(F.default,te({className:u,footerButtons:r,fullscreen:(0,X.getModalPreferredFullscreen)(),label:he.decode(me.title),position:(0,X.getModalPreferredCoordinates)(),snapLocation:o,_closeFunction:this.state.buttonState?k.default:this.onClose,globalUpdate:!0},l),a.default.createElement(B.default,null,a.default.createElement(I.default,{selectedIndex:0},a.default.createElement(I.ETBuilderTabPanel,{className:s,slug:this.slug,selected:!0},a.default.createElement("div",{className:c},a.default.createElement("div",{className:"et-fb-form--inner"},this.renderFieldSource(),this.renderFieldTo(),this.renderFieldThroughout()))))))}}],n&&ie(t.prototype,n),r&&ie(t,r),U}(a.default.PureComponent),ve=ye;t.default=ve},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=W(n(0)),a=F(n(7)),i=F(n(13)),l=F(n(11)),u=F(n(42)),s=F(n(8)),c=F(n(1)),d=F(n(36)),f=F(n(4)),p=F(n(41)),h=F(n(10)),m=F(n(31)),g=F(n(123)),y=F(n(88)),v=F(n(19)),b=F(n(57)),_=F(n(194)),w=F(n(58)),k=F(n(446)),O=F(n(605)),S=F(n(214)),C=F(n(277)),E=F(n(44)),M=F(n(1795)),T=F(n(1796)),P=F(n(608)),x=F(n(768)),j=F(n(6)),D=W(n(769)),L=F(n(388)),N=W(n(2)),A=F(n(1520)),R=n(161),B=n(497);function F(e){return e&&e.__esModule?e:{default:e}}function I(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(I=function(e){return e?n:t})(e)}function W(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=I(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t .et-fb-layers-view",connectWith:!1,child:".et_pb_section",childSlug:"section",handle:"> .et_fb_move_module_handler",update:n.dragUpdate,root:!o,placeholderHeight:"4px",wireframeMode:!1,layersView:!0,startingAddress:n.getStartingAddress()};setTimeout((function(){(0,L.default)(t,a)}),150)})),X($(n),"dragUpdate",(function(t,r){var o=e($(n)),a=ETBuilderBackend.i18n.sortable;j.default.abIsMode("on",n.state.activeThemeBuilderArea)||j.default.isAllowedAction("ab_testing")||(alert(a.has_no_ab_permission),o.sortable("cancel"),r.sender&&e(r.sender).sortable("cancel"),v.default.cancelDraggingModule())})),X($(n),"filterInput",(0,u.default)((function(e,t){n.isComponentMounted&&n.setState({filterValue:t},(function(){setTimeout((function(){v.default.setLayersViewFilterSearch(n.state.filterSelected,t)}),0)}))}),300)),X($(n),"renderABTestingStyle",(function(){if(!j.default.abIsMode("selecting",n.state.activeThemeBuilderArea))return null;var e=[],t=j.default.abGetMode(n.state.activeThemeBuilderArea).replace("_","-"),r=[".et-fb-modal__layers-view .et-fb-editable-element",".et-fb-modal__layers-view .et_pb_section > .et_fb_move_module_handler > .et-fb-layers-view--content",".et-fb-modal__layers-view .et_pb_row > .et_fb_move_module_handler > .et-fb-layers-view--content",".et-fb-modal__layers-view .et_pb_module > .et_fb_move_module_handler > .et-fb-layers-view--content"];e.push([{selector:r.join(", "),declaration:"cursor: url(".concat(ETBuilderBackend.images_uri,"/cursor-").concat(t,".png), default !important;")}]),e.push([{selector:(0,m.default)(r,(function(e){return".ie ".concat(e,", .edge ").concat(e)})).join(", "),declaration:"cursor: url(".concat(ETBuilderBackend.images_uri,"/cursor-").concat(t,".cur), default !important;")}]),e.push([{selector:(0,m.default)(r,(function(e){return".chrome ".concat(e,", .gecko ").concat(e)})).join(", "),declaration:"cursor: url(".concat(ETBuilderBackend.images_uri,"/cursor-").concat(t,".png) 16 16, default !important; /* Chrome/Firefox cursor hotspot fix, Ignored by IE */;")}]);return e.push([{selector:[".et-fb-modal__layers-view .et-fb-editable-element",".et-fb-modal__layers-view .et-fb-layers-view--actions-group",".et-fb-modal__layers-view .et-fb-layers-view--add",".et-fb-modal__layers-view .et_pb_column > .et_fb_move_module_handler > .et-fb-layers-view--content"].join(", "),declaration:"pointer-events: none;"}]),o.default.createElement(S.default,{key:"css-lv-ab-testing",additional_css:e,module_class:"body"})}));return n.containerRef=o.default.createRef(),n.slug="layers-view",n.searchFilters=n.getSearchFilters(),n.state={index:null,filterDropdownActive:!1,filterSelected:void 0,filterValue:"",activeThemeBuilderArea:j.default.getActiveThemeBuilderArea()},n.defaultModalHeight=444,n.defaultModalWidth=300,n.isComponentMounted=!1,n.scrollTimeout=100,setTimeout((function(){return v.default.setLayersViewContextMenuCallback(t.contextMenuCallback)}),0),n.forceUpdateLayers=n.forceUpdateLayers.bind($(n)),n.filterSelect=n.filterSelect.bind($(n)),n.filterDropdownToggle=n.filterDropdownToggle.bind($(n)),n.filterReset=n.filterReset.bind($(n)),n.filterResetAll=n.filterResetAll.bind($(n)),n.maybeCloseDropdown=n.maybeCloseDropdown.bind($(n)),n.maybeShowFilterNotice=n.maybeShowFilterNotice.bind($(n)),n.maybeRenderFilterNotice=n.maybeRenderFilterNotice.bind($(n)),n.setSearchFocus=n.setSearchFocus.bind($(n)),n.activeLayerChange=n.activeLayerChange.bind($(n)),n.sectionsContentChange=n.sectionsContentChange.bind($(n)),n.renderLayers=n.renderLayers.bind($(n)),n.renderToggleAll=n.renderToggleAll.bind($(n)),n.handleShortcuts=n.handleShortcuts.bind($(n)),n.handleToggleAll=n.handleToggleAll.bind($(n)),n.updateModalState=n.updateModalState.bind($(n)),n}return n=I,r=[{key:"componentDidMount",value:function(){this.isComponentMounted=!0,this.debouncedSectionsContentChangee=(0,u.default)(this.sectionsContentChange,100),j.default.addSectionsContentChangeListener(this.debouncedSectionsContentChangee),j.default.addThemeBuilderAreaChangeEventListener(this.forceUpdateLayers),P.default.addActiveLayerChangeListener(this.activeLayerChange),P.default.addLayerDataChangeListener(this.forceUpdateLayers),j.default.isProductTourActive()||this.initSortable();var e=P.default.getActiveLayer();(0,R.isOn)((0,c.default)(e,"props.scrollToLayerOnModal"))&&setTimeout((function(){return(0,B.scrollToLayerOnModal)(e)}),this.scrollTimeout),e||this.setSearchFocus(),j.default.getActiveModule()?(N.default.appWindow().removeEventListener("keydown",this.handleShortcuts),N.default.topWindow().removeEventListener("keydown",this.handleShortcuts)):(N.default.appWindow().addEventListener("keydown",this.handleShortcuts),N.default.topWindow().addEventListener("keydown",this.handleShortcuts,{useCapture:!0})),N.default.topDocument().addEventListener("keydown",this.handleShortcuts),N.default.topWindow().addEventListener("mousedown",this.maybeCloseDropdown)}},{key:"shouldComponentUpdate",value:function(e,t){var n=(0,g.default)(e,Q),r=(0,g.default)(this.props,Q),o=(0,g.default)(t,Z),a=(0,g.default)(this.state,Z);return!(0,p.default)(n,r)||!(0,p.default)(o,a)}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.editEnabled,r=P.default.getActiveLayer(),o=P.default.isFilterActive();j.default.isProductTourActive()||this.initSortable();var a=!(o||(0,p.default)(t.filterValue,this.state.filterValue)&&(0,p.default)(t.filterSelected,this.state.filterSelected));!r&&a&&this.setSearchFocus();var i=j.default.isSettingsModalOpen("settings_modal"),l=!(0,f.default)(n)&&!(0,p.default)(e.editEnabled,n),u=(0,c.default)(n,"props.address")!==(0,c.default)(r,"props.address");i&&l&&u&&(setTimeout((function(){return v.default.setActiveLayer(n)}),0),setTimeout((function(){return(0,B.scrollToLayerOnModal)(n)}),this.scrollTimeout)),this.maybeShowFilterNotice(),(0,p.default)(e.multiSelectLastSelection,this.props.multiSelectLastSelection)||this.debouncedSectionsContentChangee()}},{key:"componentWillUnmount",value:function(){this.isComponentMounted=!1,j.default.removeSectionsContentChangeListener(this.debouncedSectionsContentChangee),P.default.removeActiveLayerChangeListener(this.activeLayerChange),P.default.removeLayerDataChangeListener(this.forceUpdateLayers),N.default.appWindow().removeEventListener("keydown",this.handleShortcuts),N.default.topDocument().removeEventListener("keydown",this.handleShortcuts),N.default.topWindow().removeEventListener("keydown",this.handleShortcuts),N.default.topWindow().removeEventListener("mousedown",this.maybeCloseDropdown),setTimeout((function(){return v.default.clearLayerData()}),0)}},{key:"getSearchFilters",value:function(){var e=ETBuilderBackend.i18n.modals.layersView.searchFilterItems,t={};return(0,s.default)(e,(function(e,n){(0,h.default)(t[n])&&(t[n]={}),(0,s.default)(e,(function(e,r){t[n][r]=e}))})),(0,s.default)(ETBuilderBackend.modules,(function(e){var n=(0,N.getComponentType)({type:(0,c.default)(e,"label")});if((0,R.isOn)(e.is_parent)&&(0,R.isOn)(e.vb_support)&&(0,d.default)(e,"title")&&(0,d.default)(e,"label")&&"module"===n){var r=e.label.replace("et_pb_","");t.show_only[r.replace(/_/g,"-")]=e.plural?e.plural:e.title}})),t}},{key:"setSearchFocus",value:function(){var e=this;setTimeout((function(){var t=N.default.$topWindow(".et-fb-modal__".concat(e.slug)).find(".et-fb-options-filter input");t.length&&t.trigger("focus")}),100)}},{key:"sectionsContentChange",value:function(){this.isComponentMounted&&(v.default.resetLayerData(),P.default.isFilterActive()&&v.default.setLayersViewFilterSearch(this.state.filterSelected,this.state.filterValue),this.forceUpdate())}},{key:"activeLayerChange",value:function(e,t){if(this.isComponentMounted){var n=P.default.isFilterActive(),r=!(0,f.default)(e)&&(0,R.isOn)((0,c.default)(e,"props.scrollToLayerOnModal"));n&&r&&!(0,p.default)(t,e)&&this.filterResetAll(),r&&setTimeout((function(){return(0,B.scrollToLayerOnModal)(e)}),this.scrollTimeout)}}},{key:"forceUpdateLayers",value:function(){this.isComponentMounted&&this.forceUpdate()}},{key:"filterSelect",value:function(e){var t=this;this.setState({filterDropdownActive:!1,filterSelected:e},(function(){setTimeout((function(){v.default.setLayersViewFilterSearch(e,t.state.filterValue)}),0)}))}},{key:"filterDropdownToggle",value:function(){this.setState({filterDropdownActive:!this.state.filterDropdownActive})}},{key:"filterReset",value:function(){this.setState({filterDropdownActive:!1,filterSelected:void 0}),v.default.setLayersViewFilterSearch(void 0,this.state.filterValue)}},{key:"filterResetAll",value:function(){this.setState({filterDropdownActive:!1,filterSelected:void 0,filterValue:""}),v.default.setLayersViewFilterSearch(void 0,"")}},{key:"maybeCloseDropdown",value:function(t){this.state.filterDropdownActive&&e(t.target).closest(".et-fb-options-filter-dropdown-wrap, .et-fb-options-filter-button-group").length<1&&this.filterDropdownToggle()}},{key:"maybeShowFilterNotice",value:function(){var e=P.default.isFilterActive();P.default.isEmptyFilterResults()||(e=!1),e!==this.state.filterNotice&&this.setState({filterNotice:e})}},{key:"maybeRenderFilterNotice",value:function(){if(!this.state.filterNotice||this.state.filterDropdownActive)return!1;var e=J.filterNoticeClickable,t=J.filterNotice.split(e);return 2===t.length?o.default.createElement("div",{className:"et-fb-options-filter-notice"},o.default.createElement("span",null,t[0]),o.default.createElement(b.default,{className:"et-fb-filter-notice-button",ink:!1,onMouseDown:this.filterResetAll,onMouseUp:this.filterResetAll},e),o.default.createElement("span",null,t[1])):o.default.createElement("div",{className:"et-fb-options-filter-notice"},o.default.createElement(b.default,{className:"et-fb-filter-notice-button",ink:!1,onMouseDown:this.filterResetAll,onMouseUp:this.filterResetAll},J.filterNotice))}},{key:"handleShortcuts",value:function(e){var t=e.metaKey,n=e.altKey,r=e.ctrlKey,o=27===e.keyCode,a=e.shiftKey,i=32===e.keyCode,l=P.default.isFilterActive(),u=N.default.$topWindow(".et-fb-modal__".concat(this.slug)).find(".et-fb-options-filter input"),s=u.length>0&&u.is(":focus");return s&&a&&i?(e.preventDefault(),!1):o&&s&&l?(e.stopImmediatePropagation(),this.filterResetAll(),!1):(!s||t||n||r||o||e.stopPropagation(),o&&l&&!j.default.isSettingsModalOpen("settings_modal")?(e.stopImmediatePropagation(),this.filterResetAll(),!1):void 0)}},{key:"handleToggleAll",value:function(){var e=!P.default.isAllExpanded(),t=N.default.$topWindow(".et-fb-layers-view--toggle-all"),n=N.default.$topWindow(".et-fb-layers-view");v.default.toggleAllLayers(e),t.toggleClass("et-fb-layers-view--toggle-all-expanded",e),n.find(".et_pb_section").toggleClass("et-fb-layers-view--expanded",e),n.find(".et_pb_section").find(".et-fb-layers-view--layer:not(.et_pb_row_inner)").toggleClass("et-fb-layers-view--hidden",!e)}},{key:"updateModalState",value:function(e){v.default.updateLayersViewModalState({measurement:{height:e.height,width:e.width},position:{x:e.x,y:e.y}})}},{key:"renderToggleAll",value:function(){var e=P.default.isFilterActive(),t=j.default.isEditingLibraryItem("section"),n=j.default.isEditingLibraryItem("row"),r=j.default.isEditingLibraryItem("module");if(e||t||n||r)return!1;var a=(0,i.default)({"et-fb-button-group":!0,"et-fb-layers-view--toggle-all":!0,"et-fb-layers-view--toggle-all-expanded":P.default.isAllExpanded()}),l=N.default.condition("is_rtl")&&!N.default.condition("is_no_rtl")?"caret-left":"caret-right",u={margin:"-5px -4px",opacity:.5};return o.default.createElement("div",{className:a},o.default.createElement(A.default,{singleClick:this.handleToggleAll},o.default.createElement("button",{className:"et-fb-button"},o.default.createElement(E.default,{color:y.default.inactiveGrey,icon:"caret-down",size:"14",style:u}),o.default.createElement(E.default,{color:y.default.inactiveGrey,icon:l,size:"14",style:u}),o.default.createElement("div",{className:"et-fb-layers-view--toggle-all-label"},J.toggleAll))))}},{key:"renderChildLayers",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=(0,B.hasChildLayers)(e)?e.content:[];if((0,f.default)(a)&&((0,N.is)("section",e)||(0,N.is)("column",e))){var i=P.default.getLayerProps(e.address);if((0,c.default)(e.attrs,"_deleted")||(0,f.default)(i))return null;var l=i.isLayerVisible&&i.isLayerExpanded||i.isLayerVisible&&i.isColumnSpecialty;return l?o.default.createElement(M.default,G({key:"lv-layer-add-button-".concat(i.address)},i)):null}return a.map((function(a,i){var l=P.default.getLayerProps(a.address);if((0,c.default)(e.attrs,"_deleted")||(0,f.default)(l))return null;var u=(0,B.isLayerGlobal)(H(H({},e),{},{globalParent:n})),s=(0,B.isLayerLocked)(H(H({},e),{},{lockedParent:r})),d=t.renderCounter>t.renderBreakpoint;return t.renderCounter++,o.default.createElement(T.default,G({key:"lv-layer-".concat(l.address),index:i,globalParent:u,lockedParent:s,isDelayRender:d},l),t.renderChildLayers(a,u,s))}))}},{key:"renderLayers",value:function(){var e=this,t=P.default.isFilterActive();if(t&&P.default.isEmptyFilterResults())return null;this.renderCounter=0;var n=this.getLayersData(),r=(0,i.default)({"et-fb-layers-view":!0,"et-fb-layers-view--results":t});return o.default.createElement("div",{id:"et-fb-layers-view-container",ref:this.containerRef},o.default.createElement("div",{className:r},n.map((function(t,n){var r=P.default.getLayerProps(t.address);if((0,c.default)(t.attrs,"_deleted")||(0,f.default)(r))return null;var a=e.renderCounter>e.renderBreakpoint;return e.renderCounter++,o.default.createElement(T.default,G({key:"lv-layer-".concat(r.address),index:n,globalParent:!1,lockedParent:!1,isDelayRender:a},r),e.renderChildLayers(t,!1,!1))}))))}},{key:"render",value:function(){var e,t=this.state,n=t.filterValue,r=t.filterSelected,a=t.filterDropdownActive,u=t.filterNotice,s=P.default.isFilterActive(),p=this.searchFilters,h=(0,d.default)(p.show_only,r)?p.show_only[r]:r,m=(0,f.default)(r)?o.default.createElement(_.default,{className:"et-fb-options-filter-button-group"},o.default.createElement(b.default,{_onClick:this.filterDropdownToggle},o.default.createElement(E.default,{icon:"add",color:s?y.default.white:y.default.shuttleGrey,size:"14"})),o.default.createElement(b.default,{_onClick:this.filterDropdownToggle},ETBuilderBackend.i18n.modals.filter)):o.default.createElement(_.default,{className:"et-fb-options-filter-button-group"},o.default.createElement(b.default,{_onClick:this.filterDropdownToggle},h),o.default.createElement(b.default,{_onClick:this.filterReset},o.default.createElement(E.default,{icon:"exit",color:s?y.default.white:y.default.shuttleGrey,size:"10"}))),g=!!a&&o.default.createElement("div",{className:"et-fb-options-filter-dropdown-wrap"},o.default.createElement(O.default,{value:r,name:"layers-filter",options:p,optionGroups:{show_only:ETBuilderBackend.i18n.modals.show_only},_onClick:this.filterDropdownToggle,__onChange:this.filterSelect,activeOnLoad:!0,focusOnSearchOnLoad:!0,searchable:!0})),v=o.default.createElement("div",{className:(0,i.default)({"et-fb-options-filter":!0,"et-fb-options-filter--has-dropdown":!(0,f.default)(p)})},o.default.createElement("div",{className:"et-fb-options-filter-input-wrap"},o.default.createElement(k.default,{type:"text",value:n,name:"filterValue",_onChange:this.filterInput,additional_attrs:{placeholder:J.searchLayers,"data-shortcuts-allowed":""}})),!(0,f.default)(p)&&o.default.createElement("div",{className:"et-fb-options-filter-button-wrap"},m),g,this.maybeRenderFilterNotice()),S=(0,i.default)((X(e={"et-fb-modal__module-settings":!0},"et-fb-modal__".concat(this.slug),!0),X(e,"et-fb-modal__filter-active",!0),X(e,"et-fb-modal__filter-none",!s),e)),M=(0,i.default)({"et-fb-tabs__panel--filter-active":!0,"et-fb-tabs__panel--filter-none":!s,"et-fb-tabs__panel--filter-dropdown":!(0,f.default)(p),"et-fb-tabs__panel--filter-selected":!(0,f.default)(r),"et-fb-tabs__panel--filter-notice":u}),T=P.default.getModalState(),j=(0,l.default)({},this.props,{adjustHeightOffset:!0,className:S,forceUpdateSpecificModal:!0,headerButtons:[o.default.createElement(b.default,{key:"modal-close-button",buttonName:w.default.LAYERS_VIEW_MODAL_CLOSE,tooltip:ETBuilderBackend.i18n.tooltip.modal.close,primary:!0},o.default.createElement(E.default,{icon:"close",color:"#FFFFFF"}))],label:J.title,measurement:{height:(0,c.default)(T,"measurement.height",this.defaultModalHeight),width:(0,c.default)(T,"measurement.width",this.defaultModalWidth)},modalMinimalWidth:300,position:{x:(0,c.default)(T,"position.x",this.props.position.x),y:(0,c.default)(T,"position.y",this.props.position.y)},updateSpecificModal:this.updateModalState});return o.default.createElement(x.default,j,o.default.createElement(C.default,null,o.default.createElement(D.default,{selectedIndex:0},o.default.createElement(D.ETBuilderTabList,null,o.default.createElement(D.ETBuilderTabItem,null,J.title)),o.default.createElement(D.ETBuilderTabPanel,{slug:this.slug,className:M,selected:!0},v,this.renderToggleAll(),this.renderLayers())),this.renderABTestingStyle()))}}],r&&U(n.prototype,r),a&&U(n,a),I}(o.Component);X(ee,"propTypes",{contextMenuCallback:a.default.func}),X(ee,"defaultProps",{});var te=ee;t.default=te}).call(this,n(9))},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=Y(n(0)),a=n(62),i=K(n(13)),l=K(n(11)),u=K(n(40)),s=K(n(1)),c=K(n(4)),d=K(n(38)),f=K(n(8)),p=K(n(24)),h=K(n(41)),m=K(n(61)),g=K(n(12)),y=K(n(3)),v=K(n(452)),b=K(n(279)),_=K(n(192)),w=K(n(34)),k=K(n(71)),O=K(n(5)),S=K(n(297)),C=K(n(126)),E=K(n(14)),M=K(n(123)),T=K(n(10)),P=K(n(152)),x=K(n(36)),j=K(n(119)),D=K(n(352)),L=K(n(54)),N=K(n(63)),A=(K(n(84)),K(n(57))),R=K(n(44)),B=K(n(296)),F=K(n(1454)),I=n(495),W=K(n(277)),V=K(n(768)),H=Y(n(769)),G=K(n(19)),U=K(n(6)),z=K(n(799)),q=Y(n(2));function K(e){return e&&e.__esModule?e:{default:e}}function $(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return($=function(e){return e?n:t})(e)}function Y(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=$(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function X(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&"module"===(0,s.default)(this,"state.pointerItem.group","")&&!(0,N.default)(o,"et_pb_fullwidth_"))return void this.setState({placeholder:{parentRow:r.data("row-address"),columnIndex:r.data("zone-index")}})}var a=this.getPlaceholderData();this.isPlaceholderDataChanged(a)&&e.when(this.removePlaceholder()).then((function(){(0,c.default)(a)?n.setState({placeholder:a}):e.when(n.addPlaceholder(a)).then((function(){var t=e("#".concat(n.placeholderId));n.setState({placeholder:(0,l.default)({},a,{buttonPosition:Z(Z({},t.offset()),{},{element:t})})})}))}))}}},{key:"addPlaceholder",value:function(t){var n,r=t.target||!1,o=t.isNoChild||!1,a=t.isAddBefore||!1;if(r&&r.length){var l=this.state.pointerItem,u=l.group,c=l.slug,d=(0,s.default)(this.props,"previewMode","desktop"),f=(0,i.default)((ee(n={"et-fb-quick-actions-placeholder":!0,"et-fb-quick-actions-placeholder--no-child":o,"et-fb-quick-actions-placeholder--first-child":a},"et-fb-quick-actions-placeholder--".concat(u),!0),ee(n,"et-fb-quick-actions-placeholder--".concat(u,"-fullwidth"),"fullwidth"===c.replace("et_fb_","")),ee(n,"et-fb-quick-actions-placeholder--".concat(u,"-specialty"),"specialty"===c.replace("et_fb_","")),ee(n,"et-fb-quick-actions-placeholder--".concat(u,"-regular"),"regular"===c.replace("et_fb_","")||"section"===c.replace("et_pb_","")),n)),p={opacity:"wireframe"===d?1:0,height:"wireframe"===d?"40px":"0px"},h={opacity:1,height:"20px"},m=e('
')).css(p);e.when(void(o?r.find(".et-fb-add-wrap").first().append(m):"wireframe"===d?a?r.prepend(m):r.append(m):a?r.before(m):r.after(m))).then((function(){"wireframe"!==d&&m.animate(h,500,"easeOutCubic")}))}}},{key:"removePlaceholder",value:function(){e("#".concat(this.placeholderId)).remove()}},{key:"handleDataUpdated",value:function(){this.data=q.default.intentionallyClone(z.default.getData());var e={reRender:!this.state.reRender};(0,c.default)(this.state.parentSelected)||(e.parentSelected=this.getItem({key:(0,s.default)(this.state,"parentSelected.key"),parent:(0,s.default)(this.state,"parentSelected.parent"),depth:(0,s.default)(this.state,"parentSelected.depth")})),this.setState(e)}},{key:"handleMouseDown",value:function(e){var t=this;if("pointer"===this.state.context&&!(0,c.default)(this.state.placeholder))return this.removePlaceholder(),this.setState({context:!1}),void setTimeout((function(){var e=t.state.placeholder,n=(0,l.default)({},Z({},t.state.pointerItem),{placeholder:e});G.default.quickActionProcess(n)}),200);"modal"===this.state.context&&this.modalWrapRef&&!this.modalWrapRef.contains(e.target)&&this.closeModal()}},{key:"handleMouseDownTopDocument",value:function(t){this.state.settingPanelActive&&this.settingPanelRef&&!this.settingPanelRef.contains(t.target)?this.closeSettingsPanel():"modal"!==this.state.context||e(t.target).closest(".et-fb-modal__quick-actions").length||this.closeModal()}},{key:"handleMouseMove",value:function(e){"pointer"===this.state.context&&(this.setState({mousePointer:e}),this.throttledMouseMove.cancel(),this.throttledMouseMove(e))}},{key:"handleKeyDown",value:function(t){var n=this,r=t.keyCode||t.which,o=27===r,a=8===r,i=38===r,l=40===r,u=13===r,d=this.state,f=d.parentSelected,p=d.keyword,h=d.inputFocused,m=d.context;if(o){if(this.state.settingPanelActive)return void this.closeSettingsPanel();if("pointer"===m)return this.setState({context:"modal",placeholder:!1}),this.removePlaceholder(),void G.default.quickActionsSetContext("modal");this.closeModal()}if(a&&!(0,c.default)(f)&&(0,c.default)(p)&&h){var g=(0,s.default)(f,"depth",1),y=(0,s.default)(f,"parent",""),v=g>1?this.getItem({depth:g-1,key:y}):{};this.setState({keyword:"",parentSelected:v,itemHovered:{}})}if(!this.isScrollingList&&(i||l)){var b=this.getResults();if(!(0,c.default)(b)){var _=function(){var e=b.length-1,t=n.getItemHoveredIndex(),r=!1;if(l)for(;!1===r&&t<=e;){t+=1;var o=(0,s.default)(b,t);(0,c.default)(o)||o.isGroup||(r=t)}if(i)for(;!1===r&&t>=0;){t-=1;var a=(0,s.default)(b,t);(0,c.default)(a)||a.isGroup||(r=t)}return r}();if(!1!==_){var w=(0,s.default)(b,_);if(!(0,c.default)(w)){var k=e(this.resultsWrapRef),O=k.outerHeight(),S=parseInt(k.css("padding-top"),10),C=parseInt(k.css("padding-bottom"),10),E=k.closest(".et-fb-tabs__panel"),M=E.height(),T=E.scrollTop(),P=k.find("li").eq(_),x=P.outerHeight()||0,j=P.offset().top-E.offset().top,D=O>M,L=0===_,N=_===b.length-1,A=function(t){n.isScrollingList=!0,e.when(E.scrollTop(t)).then((function(){n.setState({itemHovered:w})}))};if(l&&D&&j+x>=M){var R=T+j+x-M;N&&(R+=C),A(R)}else if(i&&D&&j-x<=0){var B=T+j;L&&(B-=S),A(B)}else this.setState({itemHovered:w})}}}}if(u){var F=this.getResults();if(!(0,c.default)(F)){var I=(0,s.default)(F,this.getItemHoveredIndex());(0,c.default)(I)||I.isGroup||this.handleItemClick(I)}}}},{key:"handleSearchInput",value:function(e){var t=(0,v.default)(e.target.value),n=this.state.parentSelected,r={};(0,c.default)(n)?r=this.getItem({label:t}):(r=this.getItem({label:t,parent:(0,s.default)(n,"key")}),(0,c.default)(r)&&(r=this.getItem({tabLabel:t,parent:(0,s.default)(n,"key")})));var o=(0,c.default)(r)||(0,c.default)(r.actions)?n:r,a=(0,c.default)(r)||(0,c.default)(r.actions)?t:"";1===(0,s.default)(o,"depth")&&this.updateSetting("recent_category",o.key),"help"===(0,s.default)(o,"key")&&G.default.quickActionsLoad("articles"),this.setState({parentSelected:o,keyword:a,itemHovered:{}})}},{key:"handleSearchInputFocus",value:function(){this.state.settingPanelActive||this.state.settingPanelActive||this.setState({inputFocused:!0})}},{key:"handleSearchInputBlur",value:function(){this.state.settingPanelActive||this.state.settingPanelActive||this.setState({inputFocused:!1})}},{key:"handleItemClick",value:function(e){if(!this.state.settingPanelActive&&!this.state.settingPanelActive){if((0,s.default)(e,"recentQuery"))return this.setState({keyword:e.label}),void this.setSearchInputFocus();var t=X((0,s.default)(e,"key","").split("__"),2),n=t[0],r=t[1];switch(n){case"insert_saved":G.default.quickActionsLoad("library",r);break;case"help":G.default.quickActionsLoad("articles");break;case"open":r&&!(0,O.default)(r,"_")&&G.default.quickActionsLoad("posts",r)}if(1===(0,s.default)(e,"depth")&&this.updateSetting("recent_category",e.key),(0,c.default)(this.state.keyword)||this.updateSetting("recent_queries",this.state.keyword),!(0,T.default)(e.actions))return this.setState({parentSelected:e,keyword:"",itemHovered:{}}),void this.setSearchInputFocus();if((0,O.default)(["insert_module","insert_saved"],n)&&"pointer"!==this.state.context){this.setState({context:"pointer",mousePointer:U.default.getMousePointer(),pointerItem:e}),this.togglePlaceholder();var o={pointerItemSlug:(0,s.default)(e,"slug",""),pointerItemGroup:(0,s.default)(e,"group","")};G.default.quickActionsSetContext("pointer",o)}else G.default.quickActionProcess(e)}}},{key:"handleItemMouseOver",value:function(e){this.isScrollingList||this.setState({itemHovered:e})}},{key:"openSettingsPanel",value:function(){this.state.settingPanelActive||this.setState({settingPanelActive:!0})}},{key:"closeSettingsPanel",value:function(){this.setState({settingPanelActive:!1})}},{key:"resetResultsList",value:function(){var e={keyword:""};(0,c.default)(this.state.keyword)&&!(0,c.default)(this.state.parentSelected)&&(e.parentSelected=this.getItem({depth:(0,s.default)(this.state.parentSelected,"depth")-1,key:(0,s.default)(this.state.parentSelected,"parent")})),this.setState(e)}},{key:"renderSettingPanel",value:function(){var e=this;if(!this.state.settingPanelActive)return!1;var t={nothing:se("Nothing"),recent_category:se("Last Used Search Category")},n=(0,k.default)(this.data,(function(e){return 1===e.depth}));(0,f.default)(n,(function(e){t[e.key]=e.label}));var r=[{label:se("Always Start Search With"),fieldData:{name:"always_start_with",type:"select",default:"nothing",options:t,value:this.getSetting("always_start_with"),_onChange:this.updateSetting}},{label:se("Show Recent Queries"),fieldData:{name:"show_recent_queries",type:"yes_no_button",default:"off",options:{on:se("Yes"),off:se("No")},value:this.getSetting("show_recent_queries"),_onChange:this.updateSetting}}].map((function(t){var n=(0,o.createElement)(F.default.getControl(t.fieldData.type),t.fieldData);return o.default.createElement(I.ETBuilderFormGroup,{name:t.fieldData.name,key:"".concat(e.slug,"-form-group-").concat(t.fieldData.name)},o.default.createElement(I.ETBuilderFormLabel,null,t.label),o.default.createElement(W.default,{componentName:t.fieldData.name},n))})),l=(0,i.default)({"et-fb-quick-actions-setting-panel":!0,"et-fb-modal":!0}),u=U.default.getAppPreference("builder_animation");return o.default.createElement(a.Motion,{defaultStyle:{size:.8,opacity:0},style:{size:u?(0,a.spring)(1,{stiffness:300,damping:20}):1,opacity:u?(0,a.spring)(1,{stiffness:300,damping:20}):1}},(function(t){return o.default.createElement("div",{className:"et-fb-quick-actions-setting-panel--wrap",style:{opacity:t.opacity,transform:"scale( ".concat(t.size," )")}},o.default.createElement("div",{className:"et-fb-quick-actions-setting-panel--button-mask"}),o.default.createElement("div",{className:l,ref:e.setSettingPanelRef},r))}))}},{key:"renderSearchInput",value:function(){var e=this.state.parentSelected,t=!(0,c.default)(e)&&o.default.createElement("div",{className:"et-fb-modal__header--selected"},o.default.createElement("span",null,(0,s.default)(e,"tagLabel",(0,s.default)(e,"label"))));return o.default.createElement("div",{className:"et-fb-modal__header--input-wrap"},t,o.default.createElement("div",{className:"et-fb-modal__header--input"},o.default.createElement("input",{type:"hidden",value:"fakeInputValueDisableBrowserAutoSuggestions",style:{display:"none"}}),o.default.createElement("input",{type:"text",id:"keyword",name:"keyword",className:"et-fb-settings-option-input et-fb-settings-option-input--block",placeholder:(0,c.default)(e)?"".concat(se("Search"),"..."):"",value:this.state.keyword,onChange:this.handleSearchInput,onFocus:this.handleSearchInputFocus,onBlur:this.handleSearchInputBlur,ref:this.searchInputRef})),this.renderSettingPanel())}},{key:"renderResultsList",value:function(){var e=this,t=this.state.parentSelected,n=this.state.keyword;if(!(0,c.default)(t)&&(0,c.default)(t.actions)&&t.isLoading)return o.default.createElement(B.default,{useWrapper:!1,isLoading:!0});var r=this.getResults();if((0,c.default)(r))return o.default.createElement("div",{className:(0,i.default)({"et-fb-quick-actions":!0,"et-fb-quick-actions--no-results":!0})},o.default.createElement("p",{onClick:this.resetResultsList,dangerouslySetInnerHTML:{__html:se("No options exist for this search query. Click here to clear your search.")}}));var a=r.filter((function(e){return e.recentQuery})),l=r.map((function(r,l){var u,s=function(t,n){return!e.state.settingPanelActive&&((0,c.default)(e.state.itemHovered)?0===t:(0,h.default)(n,e.state.itemHovered))},d=(0,i.default)(ee({"et-fb-quick-actions--item--label":!0,"et-fb-quick-actions--item--label--hovered":s(l,r)},"et-fb-quick-actions--item--label--depth-".concat(r.depth),!0)),f=(0,i.default)(ee({"et-fb-quick-actions--item--description":!0,"et-fb-quick-actions--item--description--hovered":s(l,r)},"et-fb-quick-actions--item--description--depth-".concat(r.depth),!0)),m=(0,i.default)((ee(u={"et-fb-quick-actions--item":!0},"et-fb-quick-actions--item--depth-".concat(r.depth),!0),ee(u,"et-fb-quick-actions--item--hovered",s(l,r)&&!r.isGroup),ee(u,"et-fb-quick-actions--item--separator",!(0,c.default)(a)&&a.length-1===l),u)),g=o.default.createElement("span",{className:d},function(e){return e.injected||(0,c.default)(n)||(0,c.default)(e.keywordLabel)||!(0,c.default)(t)?e.label:e.keywordLabel}(r)),v=o.default.createElement("span",{className:f},function(e){return!(0,c.default)(e.description)&&(0,y.default)(e.description)?e.description.map((function(e){return o.default.createElement("span",{key:e,"data-content":e,className:"kbd-key key-".concat(e)})})):(0,p.default)(e.description)}(r)),b={key:"".concat(r.depth,"_-_").concat(r.key),className:m,onClick:function(){return e.handleItemClick(r)},onMouseOver:function(){return e.handleItemMouseOver(r)}},_=r.element||"div",w=r.attrs||{};return o.default.createElement("li",b,(0,o.createElement)(_,w,g,v))})),u=(0,i.default)({"et-fb-quick-actions":!0,"et-fb-quick-actions--results":!0});return o.default.createElement("ul",{className:u,ref:this.setResultsWrapRef},l)}},{key:"renderPointer",value:function(){var e;if("pointer"!==this.state.context)return!1;var t=U.default.getHoveredModule();if((0,c.default)(t))return!1;var n=this.state.pointerItem,r=n.group,a=n.slug,l=this.getMousePosition(),d={className:(0,i.default)((e={"et-fb-quick-actions-pointer":!0},ee(e,"et-fb-quick-actions-pointer--".concat(r),!0),ee(e,"et-fb-quick-actions-pointer--".concat(r,"--").concat(a.replace("et_pb_","")),"section"!==r),ee(e,"et-fb-quick-actions-pointer--".concat(r,"--fullwidth"),"fullwidth"===a.replace("et_fb_","")),ee(e,"et-fb-quick-actions-pointer--".concat(r,"--specialty"),"specialty"===a.replace("et_fb_","")),ee(e,"et-fb-quick-actions-pointer--".concat(r,"--regular"),"regular"===a.replace("et_fb_","")||"section"===a.replace("et_pb_","")),e)),tooltip:(0,s.default)(ETBuilderBackend.i18n.tooltip,"".concat(r,".addButton")),round:!0,info:"regular"===a.replace("et_fb_","")||"section"===a.replace("et_pb_",""),primary:"fullwidth"===a.replace("et_fb_",""),warning:"specialty"===a.replace("et_fb_",""),success:"row"===r,inverse:"module"===r,disabled:!0,onClick:u.default,style:{left:(0,s.default)(l,"x",0),top:(0,s.default)(l,"y",0)}};return o.default.createElement("div",{className:"et-fb-quick-actions-wrap--pointer"},o.default.createElement(A.default,d,o.default.createElement(R.default,{size:"14",icon:"add",color:"#FFFFFF"})))}},{key:"renderModal",value:function(){var e;if("modal"!==this.state.context)return!1;var t=(0,i.default)((ee(e={"et-fb-modal__module-settings":!0},"et-fb-modal__".concat(this.slug),!0),ee(e,"et-fb-modal__".concat(this.slug,"__").concat((0,q.getOS)().toLowerCase()),!0),e)),n=(0,i.default)(ee({"et-fb-tabs__panel":!0},"et-fb-tabs__panel--".concat(this.slug),!0)),r=(0,i.default)(ee({"et-fb-form":!0},"et-fb-form--".concat(this.slug),!0)),a=[o.default.createElement(A.default,{tooltip:se("Settings"),ink:!1,_onClick:this.openSettingsPanel},o.default.createElement(R.default,{icon:"setting"})),o.default.createElement(A.default,{tooltip:se("Close"),ink:!1,_onClick:this.closeModal},o.default.createElement(R.default,{icon:"close"}))],u=(0,l.default)({},this.props,{className:t,label:this.renderSearchInput(),measurement:{width:this.modalWidth,height:this.modalHeight},alwaysCentered:!0,headerButtons:a});return o.default.createElement("div",{className:"et-fb-quick-actions-wrap--modal",ref:this.setModalWrapRef},o.default.createElement(V.default,u,o.default.createElement(W.default,null,o.default.createElement(H.default,{selectedIndex:0},o.default.createElement(H.ETBuilderTabPanel,{className:n,slug:this.slug,selected:!0},o.default.createElement("div",{className:r},this.renderResultsList()))))))}},{key:"render",value:function(){return o.default.createElement(o.default.Fragment,null,this.renderPointer(),this.renderModal())}}])&&te(n.prototype,r),K&&te(n,K),Y}(o.default.Component);t.default=ce}).call(this,n(9))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=d(n(29)),i=d(n(7)),l=d(n(13)),u=d(n(6)),s=d(n(814)),c=d(n(2));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n0&&!n.hasClass("et-core-modal-close")||(t.preventDefault(),t.stopPropagation(),e._closeModal())})),T(E(e),"_closeModal",(function(){s.default.$topWindow(a.default.findDOMNode(e.refs.reportModalOverlay)).addClass("et-core-closing").delay(600).queue((function(){g.default.setErrorReportModalActive(!1,null,null)}))})),T(E(e),"_onSubmitReport",(function(t){g.default.sendErrorReport(c.default.getSections(),c.default.getPageSettings(),e.state.notes)})),T(E(e),"_isSubmissionReady",(function(){return s.default.isOn(e.state.consent)})),e}return t=_,(n=[{key:"componentDidMount",value:function(){this._adjustModalPositionOnMount(),c.default.addErrorReportModalChange(this._onModalChange)}},{key:"componentWillUnmount",value:function(){c.default.removeErrorReportModalChange(this._onModalChange)}},{key:"_getI18n",value:function(e){return d.default.getI18n("errorBoundaries.modal.".concat(e))}},{key:"_getModalInitialHeight",value:function(){var e=s.default.$topWindow(a.default.findDOMNode(this.refs.reportModal));return e.find(".et-core-modal-header").outerHeight()+parseInt(e.find(".et-core-modal-content").css("paddingTop"))+parseInt(e.find(".et-core-modal-content").css("paddingBottom"))+e.find(".et-fb-form__group").outerHeight()}},{key:"_adjustModalPositionOnMount",value:function(){var e=s.default.$topWindow(a.default.findDOMNode(this.refs.reportModal));if(this._getModalInitialHeight()<=parseInt(.6*s.default.$topWindow().innerHeight())){s.default.$topWindow(a.default.findDOMNode(this.refs.reportModalOverlay)).addClass("et-core-modal-disabled-scrollbar");var t=this._getModalInitialHeight();e.css({marginTop:"-".concat(t/2,"px")})}}},{key:"_isStatus",value:function(e){return e===this.state.status}},{key:"_isEtAccountActive",value:function(){var e=d.default.getEtAccount("et_username"),t=d.default.getEtAccount("et_api_key"),n=d.default.getEtAccount("status");return s.default.hasValue(e)&&s.default.hasValue(t)&&"active"===n}},{key:"_renderModalHeader",value:function(){return o.default.createElement("div",{className:"et-core-modal-header"},o.default.createElement("h3",{className:"et-core-modal-title"},this._getI18n("title")),o.default.createElement("a",{href:"#close",className:"et-core-modal-close",onClick:this._onCloseModal,style:{pointerEvents:this._isStatus("sending")?"none":"auto",opacity:this._isStatus("sending")?0:1}}))}},{key:"_renderPreloader",value:function(){return this._isStatus("sending")?o.default.createElement(y.default,{isLoading:!0}):null}},{key:"_renderErrorMessage",value:function(){return this._isStatus("sending_error")?o.default.createElement("div",{className:"et-fb-error-report-notification et-fb-error-report-notification--error"},(0,l.default)(this.state,"requestResponse.message",this._getI18n("errorMessage"))):null}},{key:"_renderDebugInfo",value:function(){var e=(0,u.default)(this._getI18n("debugInfo"),(function(e,t){return o.default.createElement("div",{className:"et-fb-error-report-debug-items",key:"debug-info-".concat(t)},o.default.createElement("p",{className:"et-fb-error-report-debug-items-title"},t),o.default.createElement("ul",{className:"et-fb-error-report-debug-items-list"},(0,u.default)(e,(function(e){return o.default.createElement("li",{key:"debug-info-".concat(t,"-").concat(e)},e.replace(/_/g," "))}))))}));return o.default.createElement("div",{className:"et-fb-error-report-debug-items-wrap"},e)}},{key:"_renderReportForm",value:function(){var e=this._isEtAccountActive()?o.default.createElement(p.ETBuilderFormGroup,null,o.default.createElement(p.ETBuilderFormLabel,null,this._getI18n("consentTitle")),o.default.createElement("p",{className:"et-fb-error-report-consent-description"},this._getI18n("consentDescription")),this._renderDebugInfo(),o.default.createElement(p.ETBuilderFormLabel,null,this._getI18n("consentNotes")),o.default.createElement("p",{className:"et-fb-error-report-consent-description"},this._getI18n("consentNotesDescription")),o.default.createElement(h.default,{name:"notes",_onChange:this._onChange}),o.default.createElement(m.default,{name:"consent",_onChange:this._onChange,options:[s.default.decodeHtmlEntities(this._getI18n("consentLabel"))],value:this.state.consent})):o.default.createElement("div",{className:"et-fb-error-report-notification et-fb-error-report-notification--error"},o.default.createElement("p",null,this._getI18n("noAccountMessage")),o.default.createElement("p",null,this._getI18n("noAccountGuide"))),t={opacity:this._isStatus("sending")?0:1,pointerEvents:this._isStatus("sending")?"none":"auto"};return o.default.createElement("form",null,this._renderPreloader(),o.default.createElement("div",{className:"et-core-modal-content",style:t},this._renderErrorMessage(),e),this._renderModalProceedButton())}},{key:"_renderBugReportSentMessage",value:function(){return o.default.createElement("div",{className:"et-core-modal-content"},o.default.createElement("p",null,this._getI18n("successMessage")),o.default.createElement("p",null,this._getI18n("successAutoclose")))}},{key:"_renderModalProceedButton",value:function(){return this._isEtAccountActive()?o.default.createElement("div",{className:"et_pb_prompt_buttons"},o.default.createElement(f.default,{buttonName:"error-boundaries-report-submit",className:"et-core-modal-action",_onClick:this._onSubmitReport,style:{backgroundColor:v.default.coreModalButtonBlue,pointerEvents:this._isStatus("sending")?"none":"auto",opacity:this._isStatus("sending")?0:1},disabled:!this._isSubmissionReady()},this._getI18n("buttonLabel"))):o.default.createElement("a",{href:d.default.getUrl("themeOptionsUrl"),className:"et-core-modal-action"},this._getI18n("noAccountButtonLabel"))}},{key:"render",value:function(){var e=o.default.createElement("div",{className:(0,i.default)(["et-core-modal-overlay","et-core-active","et-fb-modal-report"]),onClick:this._onCloseModal,ref:"reportModalOverlay"},o.default.createElement("div",{className:"et-core-modal",ref:"reportModal"},o.default.createElement("div",{className:"et-fb-modal-overlay-mousetrap"}),this._renderModalHeader(),this._isStatus("sending_success")?this._renderBugReportSentMessage():this._renderReportForm()));return a.default.createPortal(e,s.default.$topWindow("#et-fb-app")[0])}}])&&k(t.prototype,n),r&&k(t,r),_}(o.Component),x=P;t.default=x},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=S(n(0)),a=k(n(7)),i=k(n(8)),l=k(n(3)),u=k(n(38)),s=k(n(10)),c=k(n(323)),d=(k(n(40)),k(n(6))),f=k(n(58)),p=k(n(19)),h=k(n(1802)),m=k(n(57)),g=k(n(44)),y=k(n(768)),v=S(n(769)),b=k(n(277)),_=k(n(2));n(1804);var w=["currentVideo","currentVideoList","helpModalState","onModalChange","videoOverlayStatus"];function k(e){return e&&e.__esModule?e:{default:e}}function O(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(O=function(e){return e?n:t})(e)}function S(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=O(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function C(){return C=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function M(e,t){for(var n=0;n<%=label%><%}%>"}));var l=this.getLineChartData(),u=t.find("#et-fb-ab-testing-report-chart-".concat(n));(0,h.default)((0,c.default)(this,["renderedLineChart",n,"destroy"]))&&this.renderedLineChart[n].destroy(),(0,d.default)(l,"datasets")&&(0,p.default)(l.datasets)&&(l.datasets=[{}]),(0,g.default)(u.get(0))||(this.renderedLineChart[n]=new Chart(u.get(0).getContext("2d")).Line(l,{scaleFontSize:13,scaleFontColor:"#a1a9b1",scaleLabel:"<%=value%>%",scaleGridLineWidth:2,scaleLineWidth:2,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>%",multiTooltipTemplate:"<%= value %>%",datasetStrokeWidth:4,pointDotStrokeWidth:2,pointDotRadius:7}))}},{key:"_handleTabSwitch",value:function(e){var t=this,n=(0,u.default)((0,y.default)(this.tabList,(function(e){return!("conversions"===e&&!t.hasConversion)&&!("shortcode_conversions"===e&&!t.hasShortcodeConversions)&&e})));(0,d.default)(n,e)&&this.setState({tab:(0,c.default)(n,e)})}},{key:"_handleFilterSubjectChange",value:function(e){e.preventDefault();var t=(0,c.default)(this,"state.excludedSubjects",{}),n=e.target.getAttribute("data-tab-name"),r=e.target.getAttribute("data-subject-id");(0,d.default)(t,[n,r])?delete t[n][r]:(0,m.default)((0,c.default)(t,[n]))?t[n][r]=r:t[n]=N({},r,r),this.setState({excludedSubjects:t})}},{key:"_handleFilterTimeChange",value:function(e){e.preventDefault();var t=(0,c.default)(this,["state","tab"]),n=(0,c.default)(this,["state","durations"]),r=e.target.getAttribute("data-time");n[t]=r,this.setState({durations:n})}},{key:"_onRefreshReport",value:function(){var e=(0,c.default)(this,["state","durations",name]);S.default.abRefreshReport(e)}},{key:"_onCloseReport",value:function(){S.default.abCloseReport()}},{key:"_onABTestingChange",value:function(){var e=this.getCurrentDuration(),t=(0,c.default)(this,"state.reportData");t[e]=k.default.abGetReportData(e),this.unmounted||this.setState({reportData:t})}},{key:"_onMotionRest",value:function(){this.onMountInit||(this.initUI(),this.onMountInit=!0)}},{key:"isSubjectDisabled",value:function(e,t){var n=(0,_.default)((0,c.default)(this.state,["excludedSubjects",e],[]));return(0,d.default)(t,"attrs.ab_subject_id")&&(0,f.default)(n,(0,c.default)(t,"attrs.ab_subject_id"))}},{key:"getCurrentTab",value:function(){return(0,c.default)(this,"state.tab")}},{key:"getCurrentDuration",value:function(){return(0,c.default)(this,["state","durations",this.getCurrentTab()])}},{key:"getCurrentData",value:function(){return(0,c.default)(this,["state","reportData",(0,c.default)(this,["state","durations",this.getCurrentTab()])])}},{key:"getReportData",value:function(e){if((0,d.default)(this,["state","reportData",e]))return(0,c.default)(this,["state","reportData",e]);var t=(0,c.default)(this,"state.reportData");return t[e]=k.default.abGetReportData(e),this.setState({reportData:t}),k.default.abGetReportData(e)}},{key:"getRenderedSubjects",value:function(){var e=this,t=(0,c.default)(e,"state.tab");return(0,s.default)(this.subjects,(function(n){return!e.isSubjectDisabled(t,n)}))}},{key:"getLineChartData",value:function(){var e=this,t=e.getCurrentTab(),n=e.getReportData(e.getCurrentDuration()),r=(0,c.default)(n,"dates");return!(0,g.default)(r)&&{labels:r,datasets:(0,y.default)(this.getRenderedSubjects(),(function(e){var r=(0,c.default)(e,"attrs.ab_subject_id"),o=(0,c.default)(n,["subjects_totals","subject_".concat(r),"color"]),a=k.default.abGetSubjectLabel(e);return{data:(0,_.default)((0,c.default)(n,["subjects_analysis","subject_".concat(r),t])),fillColor:"transparent",label:a,pointColor:o,pointStrokeColor:"#fff",strokeColor:o,subject_id:r}}))}}},{key:"getPieChartData",value:function(){var e=(0,c.default)(this,["state","reportData",this.getCurrentDuration(),"subjects_totals"]),t=(0,c.default)(this,"state.tab");return(0,g.default)(e)?[]:(0,u.default)((0,y.default)(this.getRenderedSubjects(),(function(n){var r=(0,c.default)(n,"attrs.ab_subject_id"),o="subject_".concat(r);return{value:(0,c.default)(e,[o,t]),color:(0,c.default)(e,[o,"color"]),label:k.default.abGetSubjectLabel(n)}})))}},{key:"headerButtons",value:function(){return[o.default.createElement(C.default,{block:!0,buttonName:E.default.AB_CLOSE_REPORT,_onClick:this._onCloseReport},o.default.createElement(M.default,{icon:"close",color:"#FFFFFF"}))]}},{key:"renderSubjectFilter",value:function(e){var t=this;return(0,y.default)(this.subjects,(function(n,r){var a="tab-".concat(e,"-filter-subject-").concat(r),i=t.isSubjectDisabled(e,n),u=i?j.default.disabledSubject:k.default.abGetSubjectRank(n,"color");return o.default.createElement("li",{key:a},o.default.createElement("button",{"data-subject-id":(0,c.default)(n,"attrs.ab_subject_id"),"data-tab-name":e,style:{backgroundColor:u},className:(0,l.default)({"et-fb-ab-testing-filter-item-subject":!0,"et-fb-ab-testing-filter-item-subject--disabled":i}),onClick:t._handleFilterSubjectChange},k.default.abGetSubjectLabel(n)))}))}},{key:"renderTimeFilter",value:function(e){var t=this;return(0,y.default)(t.timeFilterList,(function(n,r){var a="tab-".concat(e,"-filter-time-").concat(r),i=n===(0,c.default)(t,["state","durations",e]);return o.default.createElement("li",{key:a},o.default.createElement("button",{className:(0,l.default)({"et-fb-ab-testing-filter-item-time":!0,"et-fb-ab-testing-filter-item-time--active":i}),"data-time":n,onClick:t._handleFilterTimeChange},(0,c.default)(V,["abTesting","reportFilterTime",n])))}))}},{key:"renderTabPanel",value:function(e){var t=this.getCurrentData(),n="isFetchingData"===t,r=!t||(0,p.default)((0,c.default)(t,"subjects_totals")),a=((0,c.default)(this,["state","durations",e]),o.default.createElement("canvas",{id:"et-fb-ab-testing-report-chart-".concat(e),className:"et-fb-ab-testing-report-chart"}));return o.default.createElement(x.ETBuilderTabPanel,{key:"abTesting-report-panel-".concat(e)},o.default.createElement("div",{className:"et-fb-form"},o.default.createElement(P.default,{isLoading:n},r?o.default.createElement("div",{className:"et-fb-ab-testing-no-report"},o.default.createElement("object",{type:"image/svg+xml",data:"".concat(ETBuilderBackend.images_uri,"/stats-no-data.svg")}),o.default.createElement("h2",null,(0,c.default)(V,"abTesting.no_report.title")),o.default.createElement("p",null,(0,c.default)(V,"abTesting.no_report.desc"))):o.default.createElement("div",null,o.default.createElement("ul",{className:"et-fb-ab-testing-filter--time"},this.renderTimeFilter(e),o.default.createElement("li",null,o.default.createElement(C.default,{className:"et-fb-ab-testing-report-refresh",buttonName:E.default.AB_REFRESH_REPORT,_onClick:this._onRefreshReport,tooltip:(0,c.default)(V,"abTesting.reportRefreshTooltip")},o.default.createElement(M.default,{icon:"undo",color:j.default.abTestingTimeFilter})))),o.default.createElement("ul",{className:"et-fb-ab-testing-filter--subjects"},this.renderSubjectFilter(e)),a,this.renderTable(e),this.renderPieChart(e)))))}},{key:"renderTable",value:function(e){var t=this,n=(0,c.default)(this,["state","durations",e]),r=k.default.abGetAnalysisFormula(e),a=(0,c.default)(r,"denominator"),i=(0,c.default)(r,"numerator"),l=(0,c.default)(V,["abTesting","view_stats_thead_titles",e]),u=0,s=0,d=0,f=(0,y.default)(this.getRenderedSubjects(),(function(r){var l=(0,c.default)(r,"attrs.ab_subject_id");if((0,g.default)(l))return!1;var f="subject_".concat(l),p=k.default.abGetSubjectLabel(r),h=(0,c.default)(t,["state","reportData",n,"subjects_totals",f,a],0),m=(0,c.default)(t,["state","reportData",n,"subjects_totals",f,i],0),y=(0,c.default)(t,["state","reportData",n,"subjects_totals",f,e],0);return u+=parseFloat(h),s+=parseFloat(m),d+=parseFloat(y),o.default.createElement("tr",{key:"abTesting-row-".concat(e,"-").concat(n,"-").concat(l)},o.default.createElement("td",null,l),o.default.createElement("td",null,p),o.default.createElement("td",null,h),o.default.createElement("td",null,m),o.default.createElement("td",null,"".concat(y,"%")))})),h=d/f.length,m="".concat(h).split(".").length>1?2:0,v=!(0,p.default)(this.getRenderedSubjects())&&o.default.createElement("tr",null,o.default.createElement("td",{colSpan:"2"},(0,c.default)(V,["abTesting","reportTotal"])),o.default.createElement("td",null,u),o.default.createElement("td",null,s),o.default.createElement("td",null,"".concat(h.toFixed(m),"%")));return o.default.createElement("div",{className:"et-fb-ab-testing-report-table--wrapper"},o.default.createElement("table",{id:"et-fb-ab-testing-report-table-".concat(e),className:"et-fb-ab-testing-report-table"},o.default.createElement("thead",null,o.default.createElement("tr",null,o.default.createElement("th",null,l[0]),o.default.createElement("th",null,l[1]),o.default.createElement("th",null,l[2]),o.default.createElement("th",null,l[3]),o.default.createElement("th",null,l[4]))),o.default.createElement("tbody",null,f),o.default.createElement("tfoot",null,v)))}},{key:"renderPieChart",value:function(e){var t=this,n=(0,y.default)(this.subjects,(function(n,r){var a=t.isSubjectDisabled(t.state.tab,n),i=a?"#E1E4E9":k.default.abGetSubjectRank(n,"color"),l=a?{color:"#E1E4E9"}:{};return o.default.createElement("li",{key:"".concat(e,"-legend-").concat(r)},o.default.createElement("span",{style:{backgroundColor:i}}),o.default.createElement("a",{href:"#subject",style:l,"data-subject-id":(0,c.default)(n,"attrs.ab_subject_id"),"data-tab-name":e,onClick:t._handleFilterSubjectChange},k.default.abGetSubjectLabel(n)))})),r=(0,p.default)((0,c.default)(this.getLineChartData(),"datasets"))?o.default.createElement("div",{className:"et-fb-ab-testing-report-chart"}):o.default.createElement("canvas",{id:"et-fb-ab-testing-report-pie-".concat(e),className:"et-fb-ab-testing-report-pie",width:"200",height:"200"});return o.default.createElement("div",{className:"et-fb-ab-testing-report-pie--wrapper"},r,o.default.createElement("ul",{className:"et-fb-ab-testing-report-pie--legend"},n))}},{key:"render",value:function(){var e=this,t=this,n=(0,y.default)(this.tabList,(function(e){return!("conversions"===e&&!t.hasConversion)&&!("shortcode_conversions"===e&&!t.hasShortcodeConversions)&&o.default.createElement(x.ETBuilderTabItem,{key:"abTesting-report-nav-".concat(e)},(0,c.default)(V,["abTesting","reportTabNavs",e]))})),r=(0,y.default)(this.tabList,(function(n){return!("conversions"===n&&!t.hasConversion)&&!("shortcode_conversions"===n&&!t.hasShortcodeConversions)&&e.renderTabPanel(n)}));return o.default.createElement(T.default,{fullscreen:!0,headerButtons:this.headerButtons(),footerButtons:[o.default.createElement(C.default,{block:!0,info:!0,buttonName:E.default.BUTTON_AB_DISABLE},(0,b.default)((0,c.default)(V,"abTesting.reportEndTestButton")))],label:(0,c.default)(V,"abTesting.reportTitle"),onRest:this._onMotionRest,animate:this.props.animate},o.default.createElement(x.default,{selectedIndex:0,onSelect:this._handleTabSwitch},o.default.createElement(x.ETBuilderTabList,{disableScroll:!1},n),r))}}])&&A(n.prototype,r),i&&A(n,i),L}(o.default.Component);G.propTypes=H,G.defaultProps={animate:!0};var U=G;t.default=U}).call(this,n(9))},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=S(n(0));n(1821);var a=S(n(10)),i=S(n(1)),l=S(n(36)),u=S(n(178)),s=S(n(41)),c=S(n(4)),d=S(n(819)),f=S(n(134)),p=S(n(281)),h=S(n(14)),m=S(n(71)),g=S(n(61)),y=S(n(5)),v=S(n(192)),b=S(n(152)),_=S(n(1438)),w=S(n(6)),k=S(n(19)),O=S(n(2));function S(e){return e&&e.__esModule?e:{default:e}}function C(e,t){for(var n=0;n'),e(".et_search_form_container").length>0&&e(".et_search_form_container").addClass("et_pb_is_animating"),e(".et_header_style_slide .et_slide_in_menu_container").length>0&&(e(".et_header_style_slide .et_slide_in_menu_container").addClass("et_pb_slide_menu_opened"),e("#main-header").on("click",".et_toggle_slide_menu",n.disableSlideMenu)),e(".et_header_style_fullscreen .et_slide_in_menu_container").length>0&&e("#page-container").on("click",".et_toggle_fullscreen_menu",n.disableFullscreenMenu),w.default.addProductTourMoveFinishedListener(this.setAfterMoveStep),L.on("click",".et-fb-tour-video-overlay",(function(){var t=e(this),n=t.data("video");t.replaceWith(''))})),L.on("mousedown, click, mouseup","#publishing-action.et-fb-product-tour-element",(function(e){return e.preventDefault(),!1})),this.shortThrottleReset=(0,v.default)(this.maybeAddScrollbar,100),O.default.appWindow().addEventListener("resize",this.shortThrottleReset),this.maybeAddScrollbar()}},{key:"componentWillUnmount",value:function(){w.default.removeProductTourMoveFinishedListener(this.setAfterMoveStep),O.default.appWindow().removeEventListener("resize",this.shortThrottleReset),D.off("click mouseup mousedown","*",this.isTourButtonClicked),D.off("et_fb_product_tour_element_clicked")}},{key:"onClose",value:function(){k.default.endProductTour();var t=this;O.default.$topWindow("".concat(ETBuilderBackend.css.layoutPrefix," #et-fb-app")).find(".et-fb-product-tour-overlay").remove(),e(".et_search_form_container").length>0&&e(".et_search_form_container").removeClass("et_pb_is_animating"),e(".et_header_style_slide .et_slide_in_menu_container").length>0&&(e(".et_header_style_slide .et_slide_in_menu_container").removeClass("et_pb_slide_menu_opened"),D.removeClass("et_pb_slide_menu_active"),e("#main-header").off("click",".et_toggle_slide_menu",t.disableSlideMenu)),e(".et_header_style_fullscreen .et_slide_in_menu_container").length>0&&e("#page-container").off("click",".et_toggle_fullscreen_menu",t.disableFullscreenMenu),this.setState({isActive:!1}),D.off("click mouseup mousedown ondragstart","*",t.isTourButtonClicked)}},{key:"getActiveElementPosition",value:function(e){var t=this.state.modalPosition,n=0===O.default.$appWindow(".et-fb-product-tour-element").length,r=n?O.default.$topWindow(".et-fb-product-tour-element"):O.default.$appWindow(".et-fb-product-tour-element"),o=t,l=this.getElementOffset(e),u=N?O.default.$topWindow("#et-bfb-app-frame").offset():0,s=n&&!N?O.default.$appWindow().scrollTop():0;if(!l.usePrevElementPosition&&r.length>0&&(o=r.offset(),r.closest(".et-fb-page-settings-bar").length>0))if(N)r.closest(".et-fb-page-settings-bar__column--left").length>0&&(o.top-=u.top,o.left-=200);else{var c=r.closest(".et-fb-page-settings-bar");o.top=c.position().top-100}(0,a.default)(o)?this.setState({isActive:!0}):(o.top+=s,(0,i.default)(this.appliedModalOffsets,e)?o=this.appliedModalOffsets[e]:(o.element=!1,o.top+=(0,d.default)((0,i.default)(l,"top",0)),o.left+=(0,d.default)((0,i.default)(l,"left",0)),this.appliedModalOffsets[e]=o),N&&n&&(r.closest(".et-fb-modal__module-settings").length>0||r.closest(".et-fb-tooltip-modal").length>0||r.closest(".et-fb-right-click-menu").length>0)&&(o.top-=(0,d.default)(u.top)+200),this.setState({modalPosition:o,isActive:!0}))}},{key:"getAvailableTourItems",value:function(){var e=!1,t=!1,n=!1,r="et_pb_blurb",o=w.default.isAllowedAction("divi_library")&&w.default.isAllowedAction("load_layout"),a=w.default.isAllowedAction("add_module"),i=w.default.isAllowedAction("edit_module"),l=w.default.isAllowedAction("move_module"),u=w.default.isAllowedAction("general_settings"),s=w.default.isAllowedAction("advanced_settings"),d=w.default.isAllowedAction("custom_css_settings");if(w.default.isAllowedAction(r))e=!0,w.default.setProductTourModuleName(r);else{var f,v=(0,m.default)(ETBuilderBackend.modules,{is_parent:"on"});f=(0,g.default)(v,(function(e){return!(0,y.default)(["et_pb_section","et_pb_row","et_pb_row_inner","et_pb_column","et_pb_column_inner"],e.label)&&w.default.isAllowedAction(e.label)})),(0,c.default)(f)||(w.default.setProductTourModuleName(f.label),e=!0)}(u||s||d)&&(t=!(!w.default.isAllowedAction("general_settings")&&!w.default.isAllowedAction("custom_css_settings")),n=!0);var b={start:!0,loadLayout:o,selectLayoutPack:o,loadLayoutItem:o,addSection:e&&a,selectSectionType:e&&a,selectRow:e&&a,selectModule:e&&a,configureModule:e&&a&&t,saveModule:e&&a,duplicateModule:e&&a,moveModule:l,rightClickCopy:a,rightClickPaste:a,rowOptions:i&&n,editRow:i&&n,saveRow:i&&n,pageSettings:!O.default.condition("is_bfb"),tabletPreview:!0,desktopPreview:!0,openHistory:!0,editHistory:!0,savePage:!0,finish:!0};return(0,h.default)((0,p.default)(b,this.isFalse))}},{key:"setAfterMoveStep",value:function(){var e=(0,i.default)(this.stepsSequence,(0,f.default)(this.stepsSequence,"moveModule")+1,"");w.default.setProductTourElementReady(e)}},{key:"autoloadLayout",value:function(e){if((this.state.autoLoadDemo||e)&&!(0,c.default)(results)){var t=results.pop();this.setState({autoLoadDemo:!1}),t[0].savedShortcode=t[0].shortcode,w.default.loadSavedLayoutFromComponent(t[0],!0),setTimeout((function(){w.default.replacePageContent(),w.default.setProductTourElementReady("predefined_layouts"),O.default.$topWindow("".concat(ETBuilderBackend.css.layoutPrefix," #et-fb-app")).find(".et-fb-product-tour-overlay").remove()}),1e3)}}},{key:"isTourButtonClicked",value:function(t){var n=this.state.tourElement;if("mouseup"===t.type&&"moveModule"===n)return!0;var r=e(t.target);return r.closest(".et-builder-bfb-welcome-modal, .et-theme-builder-no-post-content").length>0||!(0===r.closest(".et-fb-product-tour-element, .et-fb-product-tour-secondary-element, .et-fb-tooltip--product-tour, .et-fb-modal__module-settings, .et-fb-modal-history, .et-fb-tour-video-overlay, #wpadminbar, .et-fb-product-tour-secondary-element-hidden").length||r.closest(".et-fb-modal__footer, .et-fb-modal__badge").length>0&&0===r.closest(".et-fb-product-tour-element, .et-fb-product-tour-secondary-element, .et-fb-product-tour-secondary-element-hidden").length)||(t.preventDefault(),t.stopPropagation(),!1)}},{key:"maybeAddScrollbar",value:function(){var t=this.state.tourElement,n=e(".et-fb-tooltip--product-tour--centered"),r=O.default.$appWindow().height();this.getActiveElementPosition(t),800>r?n.addClass("et-core-modal-enabled-scrollbar"):n.removeClass("et-core-modal-enabled-scrollbar")}},{key:"maybeScroll",value:function(){var e=this.state.tourElement,t=N?"top":"app";if("selectModule"===e&&O.default.$topWindow(".et-fb-settings-options-wrap").animate({scrollTop:150},400),"editRow"===e&&O.default.$topWindow(".et-fb-tabs__panel--general").animate({scrollTop:452},400),(0,y.default)(this.absolutelyPositionedElements,e)){var n=O.default.$topWindow(".et-fb-tooltip--product-tour").length>0?O.default.$topWindow(".et-fb-tooltip--product-tour"):O.default.$appWindow(".et-fb-tooltip--product-tour");if(n.length>0){var r=O.default.$topWindow().height(),o=("top"===t?O.default.$topWindow().scrollTop():O.default.$appWindow().scrollTop())+r,a=n.innerHeight(),i=n.offset().top,l=N?90:0,u=0===O.default.$appWindow(".et-fb-product-tour-element").length?O.default.$topWindow(".et-fb-product-tour-element"):O.default.$appWindow(".et-fb-product-tour-element"),s=N&&u.closest(".et-fb-page-settings-bar").length>0;if(o')}if((0,y.default)(["moveModule","loadLayoutItem"],n)&&(u=!0,s=!0,"loadLayoutItem"===n&&c.push("addSection")),"start"===n&&"loadLayout"!==r&&(c.push("predefined_layouts"),u=!0,"pageSettings"===r&&(s=!0),this.setState({autoLoadDemo:!0}),w.default.activateGlobalPreloader(),w.default.emitPreloaderInProcess(),this.autoloadLayout(!0)),this.setState({isActive:!1}),s||setTimeout((function(){k.default.setActiveTourElement(r)}),0),u)this.waitProductTourElement(c,r,s);else{var d=(0,y.default)(["rightClickCopy","rightClickPaste"],n)?800:500;setTimeout((function(){t.nextTourContent(r)}),d)}}},{key:"nextTourContent",value:function(e){var t=this,n=(0,i.default)(this.productTourLocalization,[e,"endButtonText"],this.productTourLocalization.endButtonTextDefault),r=(0,i.default)(this.productTourLocalization,[e,"skipButtonText"],this.productTourLocalization.skipButtonTextDefault),a=(0,i.default)(this.productTourLocalization,[e,"title"],""),l=(0,i.default)(this.productTourLocalization,[e,"description"],!1);setTimeout((function(){t.getActiveElementPosition(e)}),200);var u={__html:l};l=o.default.createElement("div",{className:"et-fb-product-tour-text",dangerouslySetInnerHTML:u}),this.setState({tourElement:e,modalContent:l,modalTitle:a,endButtonText:n,skipButtonText:r}),setTimeout(this.maybeScroll,1e3)}},{key:"skipTip",value:function(){this.nextTip(!0)}},{key:"waitProductTourElement",value:function(e,t,n){var r=this,o=w.default.getProductTourElementReady();if((0,s.default)(e,(0,u.default)(o,e)))return n&&k.default.setActiveTourElement(t),void this.nextTourContent(t);setTimeout((function(){r.waitProductTourElement(e,t,n)}),1e3)}},{key:"render",value:function(){var e=this.state,t=e.endButtonText,n=e.isActive,r=e.modalContent,a=e.modalTitle,i=e.modalPosition,l=e.skipButtonText,u=e.tourElement;if(!n)return!1;var s="finish"===u?"":o.default.createElement("a",{href:"#",className:"et-core-modal-action et-core-modal-action-dont-restore et-core-modal-action-secondary",onMouseUp:this.skipTip},l),c=o.default.createElement("div",{className:"et-fb-tour-buttons"},o.default.createElement("a",{href:"#",className:"et-core-modal-action et-core-modal-action-dont-restore",onClick:this.onClose},t),s),d=!(0,y.default)(this.absolutelyPositionedElements,u),f={"et-fb-tooltip--no-arrow":!0,"et-fb-tooltip--product-tour":!0,"et-fb-tooltip--product-tour--centered":"start"===u||"finish"===u,"et-fb-tooltip--product-tour--finish":"finish"===u},p="start"===u||"finish"===u,h=0===O.default.$appWindow(".et-fb-product-tour-element").length;return o.default.createElement(_.default,{active:n,actionType:"custom_content",tooltipTitle:a,_closeFunction:this.onClose,classNames:f,modalPosition:i,forceFixedPosition:d,modalWidth:340,enableContextMenu:!0,ignorePosition:p,movable:!p,buttons:c,renderInsideApp:!h&&!N},o.default.createElement("div",null,r))}}])&&C(n.prototype,r),S&&C(n,S),x}(o.default.Component);t.default=A}).call(this,n(9))},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=x(n(0)),a=x(n(7));x(n(13));n(1822);var i=x(n(4)),l=x(n(1)),u=x(n(31)),s=x(n(10)),c=x(n(5)),d=x(n(151)),f=x(n(211)),p=x(n(8)),h=x(n(192)),m=x(n(349)),g=x(n(383)),y=(x(n(83)),x(n(392))),v=x(n(142)),b=x(n(88)),_=x(n(296)),w=x(n(44)),k=x(n(1459)),O=x(n(446)),S=x(n(1438)),C=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=P(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(495)),E=x(n(6)),M=(x(n(22)),x(n(19))),T=x(n(2));function P(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(P=function(e){return e?n:t})(e)}function x(e){return e&&e.__esModule?e:{default:e}}function j(e,t){for(var n=0;nT.default.$topWindow().height()?e.addClass("et-core-modal-enabled-scrollbar"):e.removeClass("et-core-modal-enabled-scrollbar")}},{key:"fontDataValid",value:function(e){var t=[],n="";return"add"!==e||(""===this.state.fontName&&t.push("fontName"),(0,i.default)(this.state.fontFilesData)&&(n=I.noFilesError,t.push("fontFile")),"on"!==this.state.selectedFontWeightsAll&&-1===this.state.selectedFontWeights.indexOf("on")&&t.push("fontWeight"),(0,i.default)(t)?(this.setState({errorElements:[],fontError:""}),!0):(this.setState({errorElements:t,fontProcessing:!1,fontError:n}),!1))}},{key:"_onFontNameInput",value:function(e,t){var n=(0,g.default)(this.state.errorElements,(function(e){return"fontName"===e}));this.setState({fontName:t,errorElements:n})}},{key:"onUpload",value:function(e){e.preventDefault(),this.state.fontProcessing||this.processFont("add")}},{key:"onDelete",value:function(){this.state.fontProcessing||this.processFont("remove",this.props.fontID)}},{key:"getFontWeights",value:function(){if("on"===this.state.selectedFontWeightsAll)return"all";var e=this.state.selectedFontWeights.split("|"),t=0;return(0,d.default)((0,u.default)(W,(function(n,r){return t++,"on"===e[t-1]&&r}))).join(",")}},{key:"processFont",value:function(t,n){var r=this,o=(0,s.default)(n)?r.state.fontName:n,a={};if(r.fontDataValid(t)){r.setState({fontError:"",errorElements:[],fontProcessing:!0}),"add"===t&&(a=JSON.stringify({font_weights:r.getFontWeights(),generic_family:"sans-serif"}));var u=new FormData,c={action:"et_pb_process_custom_font",et_pb_font_action:t,et_fb_upload_font_nonce:ETBuilderBackend.nonces.uploadFontNonce,et_pb_font_name:o,et_pb_font_settings:a};(0,p.default)(r.state.fontFilesData,(function(e,t){c["et_pb_font_file_".concat(t)]=e.file})),e.each(c,(function(e,t){u.append(e,t)})),e.ajax({type:"POST",url:ETBuilderBackend.ajaxUrl,contentType:!1,processData:!1,data:u,success:function(e){var n=JSON.parse(e);if((0,i.default)(n.error)){if(ETBuilderBackend.customFonts=(0,l.default)(n,"updated_fonts",ETBuilderBackend.customFonts),r.setState({fontError:"",fontProcessing:!1}),"add"===t&&""!==r.props.callback){var o=(0,l.default)(n,"uploaded_font","");r.props.callback(o)}r.onClose()}else r.setState({fontError:n.error,fontProcessing:!1})}})}}},{key:"getFontName",value:function(e){return(0,l.default)(ETBuilderBackend.customFonts,[e,"font_name"],e)}},{key:"onClose",value:function(){M.default.setFontUploaderStatus("disabled"),T.default.$topWindow(".et-fb-font-upload-overlay").remove()}},{key:"_onFileUpload",value:function(e){var t=e.target.files,n=this.state.fontFilesData;if(!((0,v.default)(t)<1))if((0,p.default)(t,(function(e){var t=(0,y.default)((0,l.default)(e,"name",""));(0,p.default)(V,(function(r){".".concat(r),(0,f.default)(t,r)&&(n[r]={fileName:t,file:e})}))})),(0,i.default)(n)){var r="".concat(I.fileError,". ").concat(I.supportedFiles,": ").concat(V.join(", "));this.setState({fontError:r})}else this.setState({fontFilesData:n,fontError:""})}},{key:"updateFontSettings",value:function(e,t){switch(e){case"et-font-uploader-weights-all":this.setState({selectedFontWeightsAll:t});break;case"et-font-uploader-weights-select":this.setState({selectedFontWeights:t})}}},{key:"removeFontFile",value:function(t){var n=e(t.target).closest(".et-fb-font-files-list-item");if(!(n.length<1)){var r=n.data("file_ext"),o=this.state.fontFilesData;(0,m.default)(o,r),this.setState({fontFilesData:o})}}},{key:"generateFilesListPreview",value:function(){var e=this;if((0,i.default)(this.state.fontFilesData))return!1;var t=(0,u.default)(this.state.fontFilesData,(function(t,n){return o.default.createElement("div",{className:"et-fb-font-files-list-item","data-file_ext":n,key:n},o.default.createElement("span",{className:"et-fb-font-files-list-item-remove",onClick:e.removeFontFile},o.default.createElement(w.default,{icon:"delete",color:b.default.danger})),t.fileName)}));return o.default.createElement("div",{className:"et-fb-font-files-list"},o.default.createElement("label",{className:"et-fb-form__label"},o.default.createElement("span",{className:"et-fb-form__label-text"},I.selectedFiles,":")),t)}},{key:"getWeightCheckboxValues",value:function(){var e=[];return(0,p.default)(W,(function(t,n){var r="".concat(t," ").concat(n);e.push({value:t,label:r})})),e}},{key:"render",value:function(){var e={"et-fb-font-upload-modal":!0,"et-fb-font-upload-modal--delete":"delete"===this.props.action,"et-fb-modal-allow-scroll":!0},t=""!==this.state.fontError?o.default.createElement("div",{className:"et-fb-font-upload-error"},this.state.fontError):"",n="";if(this.state.fontProcessing)n=o.default.createElement(_.default,{isLoading:!0});else if("delete"===this.props.action){var r=o.default.createElement("div",{className:"et_pb_prompt_buttons et-fb-font-delete-confirmation"},o.default.createElement("a",{href:"#",className:"et-core-modal-action et-core-modal-action-dont-restore et-core-modal-action-secondary",onClick:this.onClose},I.cancel),o.default.createElement("a",{href:"#",className:"et-core-modal-action et-core-modal-action-restore",onClick:this.onDelete},I.delete));n=o.default.createElement("div",null,o.default.createElement("div",{className:"et-core-modal-content"},"".concat(I.deleteConfirm,' "').concat(this.getFontName(this.props.fontID),'"'),"?"),r)}else{var a="on"!==this.state.selectedFontWeightsAll?o.default.createElement(k.default,{options:this.getWeightCheckboxValues(),name:"et-font-uploader-weights-select",_onChange:this.updateFontSettings,value:this.state.selectedFontWeights}):"",i=o.default.createElement("a",{href:"#",className:"et-core-modal-action et-core-modal-action-dont-restore",onClick:this.onUpload},I.upload);n=o.default.createElement("div",null,o.default.createElement("div",{className:"et-core-modal-content et-fb-allow-mouse-wheel"},o.default.createElement("div",{className:"et-core-modal-content-inner et-fb-allow-mouse-wheel-form"},t,o.default.createElement("label",{className:"et-fb-form__label"},o.default.createElement("span",{className:"et-fb-form__label-text"},I.fontNameLabel)),o.default.createElement(O.default,{type:"text",value:this.state.fontName,name:"userFontName",_onChange:this._onFontNameInput,className:!!(0,c.default)(this.state.errorElements,"fontName")&&"et-fb-font-error-element",additional_attrs:{placeholder:I.fontName}}),o.default.createElement("div",{className:"et-fb-upload-file-container"},o.default.createElement("span",{className:"et-core-portability-import-placeholder"},I.noFile),o.default.createElement("button",{className:"et-fb-button et-fb-button--upload-font et-fb-button--inverse et-fb-settings-button--additional-button"},I.chooseFile),o.default.createElement("input",{type:"file",className:"et-fb-import-file",onChange:this._onFileUpload,accept:".ttf, .otf, .eot, .woff2, .woff",multiple:!0}),o.default.createElement("p",{className:"et-font-uploader-hint"},I.supportedFiles,":"," ",V.join(", "))),this.generateFilesListPreview(),o.default.createElement(C.ETBuilderFormLabel,{name:"et-font-uploader-weight",activeHelp:this._isDescriptionVisible("et-font-uploader-weight"),hoveredGroup:!0,key:"et-font-uploader-weight-label",onClickHelp:this._onClickHelp},I.weightsSupport),o.default.createElement(C.ETBuilderFormDescription,{active:this._isDescriptionVisible("et-font-uploader-weight"),key:"et-font-uploader-weight-desc"},I.weightsHelp),o.default.createElement("div",{className:(0,c.default)(this.state.errorElements,"fontWeight")?"et-fb-font-error-element":""},o.default.createElement(k.default,{options:[I.all],_onChange:this.updateFontSettings,name:"et-font-uploader-weights-all",value:this.state.selectedFontWeightsAll}),a))),i)}var l="delete"===this.props.action?I.delete:I.upload,u=!!T.default.condition("is_bfb")&&T.default.$topWindow("".concat(ETBuilderBackend.css.layoutPrefix," #et-fb-app"));return o.default.createElement(S.default,{active:!0,actionType:"custom_content",tooltipTitle:"".concat(l," ").concat(I.font),_closeFunction:this.onClose,classNames:e,ignorePosition:!0,enableContextMenu:!0,movable:!1,tooltipModalContainer:u},n)}}])&&j(n.prototype,r),a&&j(n,a),x}(o.default.Component);H.propTypes=B,H.defaultProps={active:!1};var G=H;t.default=G}).call(this,n(9))},function(e,t,n){e.exports=function(){"use strict";var e=ET_Builder.Frames.top.document,t=navigator.userAgent,n=navigator.platform,r=/gecko\/\d/i.test(t),o=/MSIE \d/.test(t),a=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),i=/Edge\/(\d+)/.exec(t),l=o||a||i,u=l&&(o?e.documentMode||6:+(i||a)[1]),s=!i&&/WebKit\//.test(t),c=s&&/Qt\/\d+\.\d+/.test(t),d=!i&&/Chrome\//.test(t),f=/Opera\//.test(t),p=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),m=/PhantomJS/.test(t),g=!i&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),y=/Android/.test(t),v=g||y||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),b=g||/Mac/.test(n),_=/\bCrOS\b/.test(t),w=/win/i.test(n),k=f&&t.match(/Version\/(\d*\.\d*)/);k&&(k=Number(k[1])),k&&k>=15&&(f=!1,s=!0);var O=b&&(c||f&&(null==k||k<12.11)),S=r||l&&u>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var E,M=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var o=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(o?r[1]+o:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function P(e,t){return T(e).appendChild(t)}function x(t,n,r,o){var a=e.createElement(t);if(r&&(a.className=r),o&&(a.style.cssText=o),"string"==typeof n)a.appendChild(e.createTextNode(n));else if(n)for(var i=0;i=t)return i+(t-a);i+=l-a,i+=n-i%n,a=l+1}}g?R=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(R=function(e){try{e.select()}catch(e){}});var W=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};function V(e,t){for(var n=0;n=t)return r+Math.min(i,t-o);if(o+=a-r,r=a+1,(o+=n-o%n)>=t)return r}}var $=[""];function Y(e){for(;$.length<=e;)$.push(X($)+" ");return $[e]}function X(e){return e[e.length-1]}function J(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||te.test(e))}function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ne(e))||t.test(e):ne(e)}function oe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ae=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return e.charCodeAt(0)>=768&&ae.test(e)}function le(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var o=(t+n)/2,a=r<0?Math.ceil(o):Math.floor(o);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}function se(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var o=!1,a=0;at||t==n&&i.to==t)&&(r(Math.max(i.from,t),Math.min(i.to,n),1==i.level?"rtl":"ltr",a),o=!0)}o||r(t,n,"ltr")}var ce=null;function de(e,t,n){var r;ce=null;for(var o=0;ot)return o;a.to==t&&(a.from!=a.to&&"before"==n?r=o:ce=o),a.from==t&&(a.from!=a.to&&"before"!=n?r=o:ce=o)}return null!=r?r:ce}var fe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,i=/[Lb1n]/,l=/[1n]/;function u(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var s="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var c=e.length,d=[],f=0;f-1&&(r[t]=o.slice(0,a).concat(o.slice(a+1)))}}}function ve(e,t){var n=ge(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o0}function ke(e){e.prototype.on=function(e,t){me(this,e,t)},e.prototype.off=function(e,t){ye(this,e,t)}}function Oe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Se(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ce(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ee(e){Oe(e),Se(e)}function Me(e){return e.target||e.srcElement}function Te(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Pe,xe,je=function(){if(l&&u<9)return!1;var e=x("div");return"draggable"in e||"dragDrop"in e}();function De(t){if(null==Pe){var n=x("span","\u200b");P(t,x("span",[n,e.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Pe=n.offsetWidth<=1&&n.offsetHeight>2&&!(l&&u<8))}var r=Pe?x("span","\u200b"):x("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Le(t){if(null!=xe)return xe;var n=P(t,e.createTextNode("A\u062eA")),r=E(n,0,1).getBoundingClientRect(),o=E(n,1,2).getBoundingClientRect();return T(t),!(!r||r.left==r.right)&&(xe=o.right-r.right<3)}var Ne,Ae=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var a=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),i=a.indexOf("\r");-1!=i?(n.push(a.slice(0,i)),t+=i+1):(n.push(a),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Be="oncopy"in(Ne=x("div"))||(Ne.setAttribute("oncopy","return;"),"function"==typeof Ne.oncopy),Fe=null;function Ie(e){if(null!=Fe)return Fe;var t=P(e,x("span","x")),n=t.getBoundingClientRect(),r=E(t,0,1).getBoundingClientRect();return Fe=Math.abs(n.left-r.left)>1}var We={},Ve={};function He(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),We[e]=t}function Ge(e,t){Ve[e]=t}function Ue(e){if("string"==typeof e&&Ve.hasOwnProperty(e))e=Ve[e];else if(e&&"string"==typeof e.name&&Ve.hasOwnProperty(e.name)){var t=Ve[e.name];"string"==typeof t&&(t={name:t}),(e=ee(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ue("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ue("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function ze(e,t){t=Ue(t);var n=We[t.name];if(!n)return ze(e,"text/plain");var r=n(e,t);if(qe.hasOwnProperty(t.name)){var o=qe[t.name];for(var a in o)o.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=o[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var i in t.modeProps)r[i]=t.modeProps[i];return r}var qe={};function Ke(e,t){F(t,qe.hasOwnProperty(e)?qe[e]:qe[e]={})}function $e(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function Ye(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Xe(e,t,n){return!e.startState||e.startState(t,n)}var Je=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Qe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var o=n.children[r],a=o.chunkSize();if(t=e.first&&tn?it(n,Qe(e,n).text.length):ht(t,Qe(e,t.line).text.length)}function ht(e,t){var n=e.ch;return null==n||n>t?it(e.line,t):n<0?it(e.line,0):e}function mt(e,t){for(var n=[],r=0;r=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.post},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var gt=function(e,t){this.state=e,this.lookAhead=t},yt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function vt(e,t,n,r){var o=[e.state.modeGen],a={};Mt(e,t.text,e.doc.mode,n,(function(e,t){return o.push(e,t)}),a,r);for(var i=n.state,l=function(r){n.baseTokens=o;var l=e.state.overlays[r],u=1,s=0;n.state=!0,Mt(e,t.text,l.mode,n,(function(e,t){for(var n=u;se&&o.splice(u,1,e,o[u+1],r),u+=2,s=Math.min(e,r)}if(t)if(l.opaque)o.splice(n,u-n,e,"overlay "+t),u=n+2;else for(;ne.options.maxHighlightLength&&$e(e.doc.mode,r.state),a=vt(e,t,r);o&&(r.state=o),t.stateAfter=r.save(!o),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function _t(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return new yt(r,!0,t);var a=Tt(e,t,n),i=a>r.first&&Qe(r,a-1).stateAfter,l=i?yt.fromSaved(r,i,a):new yt(r,Xe(r.mode),a);return r.iter(a,t,(function(n){wt(e,n.text,l);var r=l.line;n.stateAfter=r==t-1||r%5==0||r>=o.viewFrom&&rt.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}yt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},yt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},yt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},yt.fromSaved=function(e,t,n){return t instanceof gt?new yt(e,$e(e.mode,t.state),n,t.lookAhead):new yt(e,$e(e.mode,t),n)},yt.prototype.save=function(e){var t=!1!==e?$e(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new gt(t,this.maxLookAhead):t};var St=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Ct(e,t,n,r){var o,a,i=e.doc,l=i.mode,u=Qe(i,(t=pt(i,t)).line),s=_t(e,t.line,n),c=new Je(u.text,e.options.tabSize,s);for(r&&(a=[]);(r||c.pose.options.maxHighlightLength?(l=!1,i&&wt(e,t,r,d.pos),d.pos=t.length,u=null):u=Et(Ot(n,d,r.state,f),a),f){var p=f[0].name;p&&(u="m-"+(u?p+" "+u:p))}if(!l||c!=u){for(;si;--l){if(l<=a.first)return a.first;var u=Qe(a,l-1),s=u.stateAfter;if(s&&(!n||l+(s instanceof gt?s.lookAhead:0)<=a.modeFrontier))return l;var c=I(u.text,null,e.options.tabSize);(null==o||r>c)&&(o=l-1,r=c)}return o}function Pt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var o=Qe(e,r).stateAfter;if(o&&(!(o instanceof gt)||r+o.lookAhead=t:a.to>t);(r||(r=[])).push(new Nt(i,a.from,l?null:a.to))}}return r}function It(e,t,n){var r;if(e)for(var o=0;o=t:a.to>t)||a.from==t&&"bookmark"==i.type&&(!n||a.marker.insertLeft)){var l=null==a.from||(i.inclusiveLeft?a.from<=t:a.from0&&l)for(var b=0;b0)){var c=[u,1],d=lt(s.from,l.from),f=lt(s.to,l.to);(d<0||!i.inclusiveLeft&&!d)&&c.push({from:s.from,to:l.from}),(f>0||!i.inclusiveRight&&!f)&&c.push({from:l.to,to:s.to}),o.splice.apply(o,c),u+=c.length-3}}return o}function Gt(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!n||Kt(n,a.marker)<0)&&(n=a.marker)}return n}function Qt(e,t,n,r,o){var a=Qe(e,t),i=jt&&a.markedSpans;if(i)for(var l=0;l=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(u.marker.inclusiveRight&&o.inclusiveLeft?lt(s.to,n)>=0:lt(s.to,n)>0)||c>=0&&(u.marker.inclusiveRight&&o.inclusiveLeft?lt(s.from,r)<=0:lt(s.from,r)<0)))return!0}}}function Zt(e){for(var t;t=Yt(e);)e=t.find(-1,!0).line;return e}function en(e){for(var t;t=Xt(e);)e=t.find(1,!0).line;return e}function tn(e){for(var t,n;t=Xt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function nn(e,t){var n=Qe(e,t),r=Zt(n);return n==r?t:nt(r)}function rn(e,t){if(t>e.lastLine())return t;var n,r=Qe(e,t);if(!on(e,r))return t;for(;n=Xt(r);)r=n.find(1,!0).line;return nt(r)+1}function on(e,t){var n=jt&&t.markedSpans;if(n)for(var r=void 0,o=0;ot.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var cn=function(e,t,n){this.text=e,Ut(this,t),this.height=n?n(this):1};function dn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Gt(e),Ut(e,n);var o=r?r(e):1;o!=e.height&&tt(e,o)}function fn(e){e.parent=null,Gt(e)}cn.prototype.lineNo=function(){return nt(this)},ke(cn);var pn={},hn={};function mn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?hn:pn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function gn(e,t){var n=j("span",null,null,s?"padding-right: .1px":null),r={pre:j("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var a=o?t.rest[o-1]:t.line,i=void 0;r.pos=0,r.addToken=vn,Le(e.display.measure)&&(i=pe(a,e.doc.direction))&&(r.addToken=_n(r.addToken,i)),r.map=[],kn(a,r,bt(e,a,t!=e.display.externalMeasured&&nt(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=A(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=A(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(De(e.display.measure))),0==o?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var l=r.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=A(r.pre.className,r.textClass||"")),r}function yn(e){var t=x("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function vn(t,n,r,o,a,i,s){if(n){var c,d=t.splitSpaces?bn(n,t.trailingSpace):n,f=t.cm.state.specialChars,p=!1;if(f.test(n)){c=e.createDocumentFragment();for(var h=0;;){f.lastIndex=h;var m=f.exec(n),g=m?m.index-h:n.length-h;if(g){var y=e.createTextNode(d.slice(h,h+g));l&&u<9?c.appendChild(x("span",[y])):c.appendChild(y),t.map.push(t.pos,t.pos+g,y),t.col+=g,t.pos+=g}if(!m)break;h+=g+1;var v=void 0;if("\t"==m[0]){var b=t.cm.options.tabSize,_=b-t.col%b;(v=c.appendChild(x("span",Y(_),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),t.col+=_}else"\r"==m[0]||"\n"==m[0]?((v=c.appendChild(x("span","\r"==m[0]?"\u240d":"\u2424","cm-invalidchar"))).setAttribute("cm-text",m[0]),t.col+=1):((v=t.cm.options.specialCharPlaceholder(m[0])).setAttribute("cm-text",m[0]),l&&u<9?c.appendChild(x("span",[v])):c.appendChild(v),t.col+=1);t.map.push(t.pos,t.pos+1,v),t.pos++}}else t.col+=n.length,c=e.createTextNode(d),t.map.push(t.pos,t.pos+n.length,c),l&&u<9&&(p=!0),t.pos+=n.length;if(t.trailingSpace=32==d.charCodeAt(n.length-1),r||o||a||p||i||s){var w=r||"";o&&(w+=o),a&&(w+=a);var k=x("span",[c],w,i);if(s)for(var O in s)s.hasOwnProperty(O)&&"style"!=O&&"class"!=O&&k.setAttribute(O,s[O]);return t.content.appendChild(k)}t.content.appendChild(c)}}function bn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",o=0;os&&d.from<=s);f++);if(d.to>=c)return e(n,r,o,a,i,l,u);e(n,r.slice(0,d.to-s),o,a,null,l,u),a=null,r=r.slice(d.to-s),s=d.to}}}function wn(t,n,r,o){var a=!o&&r.widgetNode;a&&t.map.push(t.pos,t.pos+n,a),!o&&t.cm.display.input.needsContentAttribute&&(a||(a=t.content.appendChild(e.createElement("span"))),a.setAttribute("cm-marker",r.id)),a&&(t.cm.display.input.setUneditable(a),t.content.appendChild(a)),t.pos+=n,t.trailingSpace=!1}function kn(e,t,n){var r=e.markedSpans,o=e.text,a=0;if(r)for(var i,l,u,s,c,d,f,p=o.length,h=0,m=1,g="",y=0;;){if(y==h){u=s=c=l="",f=null,d=null,y=1/0;for(var v=[],b=void 0,_=0;_h||k.collapsed&&w.to==h&&w.from==h)){if(null!=w.to&&w.to!=h&&y>w.to&&(y=w.to,s=""),k.className&&(u+=" "+k.className),k.css&&(l=(l?l+";":"")+k.css),k.startStyle&&w.from==h&&(c+=" "+k.startStyle),k.endStyle&&w.to==y&&(b||(b=[])).push(k.endStyle,w.to),k.title&&((f||(f={})).title=k.title),k.attributes)for(var O in k.attributes)(f||(f={}))[O]=k.attributes[O];k.collapsed&&(!d||Kt(d.marker,k)<0)&&(d=w)}else w.from>h&&y>w.from&&(y=w.from)}if(b)for(var S=0;S=p)break;for(var E=Math.min(p,y);;){if(g){var M=h+g.length;if(!d){var T=M>E?g.slice(0,E-h):g;t.addToken(t,T,i?i+u:u,c,h+T.length==y?s:"",l,f)}if(M>=E){g=g.slice(E-h),h=E;break}h=M,c=""}g=o.slice(a,a=n[m++]),i=mn(n[m++],t.cm.options)}}else for(var P=1;P2&&a.push((u.bottom+s.top)/2-n.top)}}a.push(n.bottom-n.top)}}function Zn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function er(e,t){var n=nt(t=Zt(t)),r=e.display.externalMeasured=new On(e.doc,t,n);r.lineN=n;var o=r.built=gn(e,r);return r.text=o.pre,P(e.display.lineMeasure,o.pre),r}function tr(e,t,n,r){return or(e,rr(e,t),n,r)}function nr(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=(a=u-l)-1,t>=u&&(i="right")),null!=o){if(r=e[s+2],l==u&&n==(r.insertLeft?"left":"right")&&(i=n),"left"==n&&0==o)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[2+(s-=3)],i="left";if("right"==n&&o==u-l)for(;s=0&&(n=e[o]).left==n.right;o--);return n}function sr(e,t,n,r){var o,a=lr(t.map,n,r),i=a.node,s=a.start,c=a.end,d=a.collapse;if(3==i.nodeType){for(var f=0;f<4;f++){for(;s&&ie(t.line.text.charAt(a.coverStart+s));)--s;for(;a.coverStart+c0&&(d=r="right"),o=e.options.lineWrapping&&(p=i.getClientRects()).length>1?p["right"==r?p.length-1:0]:i.getBoundingClientRect()}if(l&&u<9&&!s&&(!o||!o.left&&!o.right)){var h=i.parentNode.getClientRects()[0];o=h?{left:h.left,right:h.left+jr(e.display),top:h.top,bottom:h.bottom}:ir}for(var m=o.top-t.rect.top,g=o.bottom-t.rect.top,y=(m+g)/2,v=t.view.measure.heights,b=0;b=r.text.length?(u=r.text.length,s="before"):u<=0&&(u=0,s="after"),!l)return i("before"==s?u-1:u,"before"==s);function c(e,t,n){return i(n?e-1:e,1==l[t].level!=n)}var d=de(l,u,s),f=ce,p=c(u,d,"before"==s);return null!=f&&(p.other=c(u,f,"before"!=s)),p}function wr(e,t){var n=0;t=pt(e.doc,t),e.options.lineWrapping||(n=jr(e.display)*t.ch);var r=Qe(e.doc,t.line),o=ln(r)+qn(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function kr(e,t,n,r,o){var a=it(e,t,n);return a.xRel=o,r&&(a.outside=r),a}function Or(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return kr(r.first,0,null,-1,-1);var o=rt(r,n),a=r.first+r.size-1;if(o>a)return kr(r.first+r.size-1,Qe(r,a).text.length,null,1,1);t<0&&(t=0);for(var i=Qe(r,o);;){var l=Mr(e,i,o,t,n),u=Jt(i,l.ch+(l.xRel>0||l.outside>0?1:0));if(!u)return l;var s=u.find(1);if(s.line==o)return s;i=Qe(r,o=s.line)}}function Sr(e,t,n,r){r-=gr(t);var o=t.text.length,a=ue((function(t){return or(e,n,t-1).bottom<=r}),o,0);return{begin:a,end:o=ue((function(t){return or(e,n,t).top>r}),a,o)}}function Cr(e,t,n,r){return n||(n=rr(e,t)),Sr(e,t,n,yr(e,t,or(e,n,r),"line").top)}function Er(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Mr(e,t,n,r,o){o-=ln(t);var a=rr(e,t),i=gr(t),l=0,u=t.text.length,s=!0,c=pe(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?Pr:Tr)(e,t,n,a,c,r,o);l=(s=1!=d.level)?d.from:d.to-1,u=s?d.to:d.from-1}var f,p,h=null,m=null,g=ue((function(t){var n=or(e,a,t);return n.top+=i,n.bottom+=i,!!Er(n,r,o,!1)&&(n.top<=o&&n.left<=r&&(h=t,m=n),!0)}),l,u),y=!1;if(m){var v=r-m.left=_.bottom?1:0}return kr(n,g=le(t.text,g,1),p,y,r-f)}function Tr(e,t,n,r,o,a,i){var l=ue((function(l){var u=o[l],s=1!=u.level;return Er(_r(e,it(n,s?u.to:u.from,s?"before":"after"),"line",t,r),a,i,!0)}),0,o.length-1),u=o[l];if(l>0){var s=1!=u.level,c=_r(e,it(n,s?u.from:u.to,s?"after":"before"),"line",t,r);Er(c,a,i,!0)&&c.top>i&&(u=o[l-1])}return u}function Pr(e,t,n,r,o,a,i){var l=Sr(e,t,r,i),u=l.begin,s=l.end;/\s/.test(t.text.charAt(s-1))&&s--;for(var c=null,d=null,f=0;f=s||p.to<=u)){var h=or(e,r,1!=p.level?Math.min(s,p.to)-1:Math.max(u,p.from)).right,m=hm)&&(c=p,d=m)}}return c||(c=o[o.length-1]),c.froms&&(c={from:c.from,to:s,level:c.level}),c}function xr(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==ar){ar=x("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)ar.appendChild(e.createTextNode("x")),ar.appendChild(x("br"));ar.appendChild(e.createTextNode("x"))}P(t.measure,ar);var r=ar.offsetHeight/50;return r>3&&(t.cachedTextHeight=r),T(t.measure),r||1}function jr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=x("span","xxxxxxxxxx"),n=x("pre",[t],"CodeMirror-line-like");P(e.measure,n);var r=t.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function Dr(e){for(var t=e.display,n={},r={},o=t.gutters.clientLeft,a=t.gutters.firstChild,i=0;a;a=a.nextSibling,++i){var l=e.display.gutterSpecs[i].className;n[l]=a.offsetLeft+a.clientLeft+o,r[l]=a.clientWidth}return{fixedPos:Lr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Lr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Nr(e){var t=xr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/jr(e.display)-3);return function(o){if(on(e.doc,o))return 0;var a=0;if(o.widgets)for(var i=0;i0&&(u=Qe(e.doc,s.line).text).length==s.ch){var c=I(u,u.length,e.options.tabSize)-u.length;s=it(s.line,Math.max(0,Math.round((a-$n(e.display).left)/jr(e.display))-c))}return s}function Br(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)jt&&nn(e.doc,t)o.viewFrom?Wr(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)Wr(e);else if(t<=o.viewFrom){var a=Vr(e,n,n+r,1);a?(o.view=o.view.slice(a.index),o.viewFrom=a.lineN,o.viewTo+=r):Wr(e)}else if(n>=o.viewTo){var i=Vr(e,t,t,-1);i?(o.view=o.view.slice(0,i.index),o.viewTo=i.lineN):Wr(e)}else{var l=Vr(e,t,t,-1),u=Vr(e,n,n+r,1);l&&u?(o.view=o.view.slice(0,l.index).concat(Sn(e,l.lineN,u.lineN)).concat(o.view.slice(u.index)),o.viewTo+=r):Wr(e)}var s=o.externalMeasured;s&&(n=o.lineN&&t=r.viewTo)){var a=r.view[Br(e,t)];if(null!=a.node){var i=a.changes||(a.changes=[]);-1==V(i,n)&&i.push(n)}}}function Wr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Vr(e,t,n,r){var o,a=Br(e,t),i=e.display.view;if(!jt||n==e.doc.first+e.doc.size)return{index:a,lineN:n};for(var l=e.display.viewFrom,u=0;u0){if(a==i.length-1)return null;o=l+i[a].size-t,a++}else o=l-t;t+=o,n+=o}for(;nn(e.doc,n)!=n;){if(a==(r<0?0:i.length-1))return null;n+=r*i[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:n}}function Hr(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Sn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Sn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Br(e,n)))),r.viewTo=n}function Gr(e){for(var t=e.display.view,n=0,r=0;r=t.display.viewTo||u.to().line0?t.blinker=setInterval((function(){e.hasFocus()||Zr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Xr(e){e.state.focused||(e.display.input.focus(),Qr(e))}function Jr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Zr(e))}),100)}function Qr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,N(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Yr(e))}function Zr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,M(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function eo(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||f<-.005)&&(tt(o.line,i),to(o.line),o.rest))for(var p=0;pe.display.sizerWidth){var h=Math.ceil(s/jr(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=o.line,e.display.maxLineChanged=!0)}}}}function to(e){if(e.widgets)for(var t=0;t=i&&(a=rt(t,ln(Qe(t,u))-e.wrapper.clientHeight),i=u)}return{from:a,to:Math.max(i,a+1)}}function ro(t,n){if(!be(t,"scrollCursorIntoView")){var r=ET_Builder.Frames.top,o=t.display,a=o.sizer.getBoundingClientRect(),i=null;if(n.top+a.top<0?i=!0:n.bottom+a.top>(r.innerHeight||e.documentElement.clientHeight)&&(i=!1),null!=i&&!m){var l=x("div","\u200b",null,"position: absolute;\n top: "+(n.top-o.viewOffset-qn(t.display))+"px;\n height: "+(n.bottom-n.top+Yn(t)+o.barHeight)+"px;\n left: "+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");t.display.lineSpace.appendChild(l),l.scrollIntoView(i),t.display.lineSpace.removeChild(l)}}}function oo(e,t,n,r){var o;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?it(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?it(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var i=!1,l=_r(e,t),u=n&&n!=t?_r(e,n):l,s=io(e,o={left:Math.min(l.left,u.left),top:Math.min(l.top,u.top)-r,right:Math.max(l.left,u.left),bottom:Math.max(l.bottom,u.bottom)+r}),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=s.scrollTop&&(ho(e,s.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(i=!0)),null!=s.scrollLeft&&(go(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(i=!0)),!i)break}return o}function ao(e,t){var n=io(e,t);null!=n.scrollTop&&ho(e,n.scrollTop),null!=n.scrollLeft&&go(e,n.scrollLeft)}function io(e,t){var n=e.display,r=xr(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,a=Jn(e),i={};t.bottom-t.top>a&&(t.bottom=t.top+a);var l=e.doc.height+Kn(n),u=t.topl-r;if(t.topo+a){var c=Math.min(t.top,(s?l:t.bottom)-a);c!=o&&(i.scrollTop=c)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=Xn(e)-n.gutters.offsetWidth,h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?i.scrollLeft=0:t.leftp+f-3&&(i.scrollLeft=t.right+(h?0:10)-p),i}function lo(e,t){null!=t&&(fo(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function uo(e){fo(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function so(e,t,n){null==t&&null==n||fo(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function co(e,t){fo(e),e.curOp.scrollToPos=t}function fo(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,po(e,wr(e,t.from),wr(e,t.to),t.margin))}function po(e,t,n,r){var o=io(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});so(e,o.scrollLeft,o.scrollTop)}function ho(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||zo(e,{top:t}),mo(e,t,!0),r&&zo(e),Bo(e,100))}function mo(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function go(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Yo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function yo(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Kn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Yn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var vo=function(e,t,n){this.cm=n;var r=this.vert=x("div",[x("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=x("div",[x("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,e(r),e(o),me(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),me(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,l&&u<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};vo.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},vo.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},vo.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},vo.prototype.zeroWidthHack=function(){var e=b&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new W,this.disableVert=new W},vo.prototype.enableZeroWidthBar=function(t,n,r){function o(){var a=t.getBoundingClientRect();("vert"==r?e.elementFromPoint(a.right-1,(a.top+a.bottom)/2):e.elementFromPoint((a.right+a.left)/2,a.bottom-1))!=t?t.style.pointerEvents="none":n.set(1e3,o)}t.style.pointerEvents="auto",n.set(1e3,o)},vo.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var bo=function(){};function _o(e,t){t||(t=yo(e));var n=e.display.barWidth,r=e.display.barHeight;wo(e,t);for(var o=0;o<4&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&eo(e),wo(e,yo(e)),n=e.display.barWidth,r=e.display.barHeight}function wo(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}bo.prototype.update=function(){return{bottom:0,right:0}},bo.prototype.setScrollLeft=function(){},bo.prototype.setScrollTop=function(){},bo.prototype.clear=function(){};var ko={native:vo,null:bo};function Oo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&M(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ko[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),me(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?go(e,t):ho(e,t)}),e),e.display.scrollbars.addClass&&N(e.display.wrapper,e.display.scrollbars.addClass)}var So=0;function Co(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++So},En(e.curOp)}function Eo(e){var t=e.curOp;t&&Tn(t,(function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Io(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Po(e){e.updatedDisplay=e.mustUpdate&&Go(e.cm,e.update)}function xo(e){var t=e.cm,n=t.display;e.updatedDisplay&&eo(t),e.barMeasure=yo(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=tr(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Yn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Xn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function jo(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=_t(e,t.highlightFrontier),o=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(a){if(r.line>=e.display.viewFrom){var i=a.styles,l=a.text.length>e.options.maxHighlightLength?$e(t.mode,r.state):null,u=vt(e,a,r,!0);l&&(r.state=l),a.styles=u.styles;var s=a.styleClasses,c=u.classes;c?a.styleClasses=c:s&&(a.styleClasses=null);for(var d=!i||i.length!=a.styles.length||s!=c&&(!s||!c||s.bgClass!=c.bgClass||s.textClass!=c.textClass),f=0;!d&&fn)return Bo(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),o.length&&Lo(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Gr(e))return!1;Xo(e)&&(Wr(e),t.dims=Dr(e));var o=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),i=Math.min(o,t.visible.to+e.options.viewportMargin);n.viewFromi&&n.viewTo-i<20&&(i=Math.min(o,n.viewTo)),jt&&(a=nn(e.doc,a),i=rn(e.doc,i));var l=a!=n.viewFrom||i!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Hr(e,a,i),n.viewOffset=ln(Qe(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Gr(e);if(!l&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var s=Vo(e);return u>4&&(n.lineDiv.style.display="none"),qo(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Ho(s),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Bo(e,400)),n.updateLineNumbers=null,!0}function Uo(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Xn(e))r&&(t.visible=no(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Kn(e.display)-Jn(e),n.top)}),t.visible=no(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Go(e,t))break;eo(e);var o=yo(e);Ur(e),_o(e,o),$o(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function zo(e,t){var n=new Io(e,t);if(Go(e,n)){eo(e),Uo(e,n);var r=yo(e);Ur(e),_o(e,r),$o(e,r),n.finish()}}function qo(t,n,r){var o=t.display,a=t.options.lineNumbers,i=o.lineDiv,l=i.firstChild;function u(e){var n=e.nextSibling;return s&&b&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=o.view,d=o.viewFrom,f=0;f-1&&(h=!1),Dn(t,p,d,r)),h&&(T(p.lineNumber),p.lineNumber.appendChild(e.createTextNode(at(t.options,d)))),l=p.node.nextSibling}else{var m=Wn(t,p,d,r);i.insertBefore(m,l)}d+=p.size}for(;l;)l=u(l)}function Ko(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function $o(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Yn(e)+"px"}function Yo(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Lr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,a=r+"px",i=0;il.clientWidth,c=l.scrollHeight>l.clientHeight;if(o&&u||a&&c){if(a&&b&&s)e:for(var d=t.target,p=i.view;d!=l;d=d.parentNode)for(var h=0;h=0&<(e,r.to())<=0)return n}return-1};var la=function(e,t){this.anchor=e,this.head=t};function ua(e,t,n){var r=e&&e.options.selectionsMayTouch,o=t[n];t.sort((function(e,t){return lt(e.from(),t.from())})),n=V(t,o);for(var a=1;a0:u>=0){var s=dt(l.from(),i.from()),c=ct(l.to(),i.to()),d=l.empty()?i.from()==i.head:l.from()==l.head;a<=n&&--n,t.splice(--a,2,new la(d?c:s,d?s:c))}}return new ia(t,n)}function sa(e,t){return new ia([new la(e,t||e)],0)}function ca(e){return e.text?it(e.from.line+e.text.length-1,X(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function da(e,t){if(lt(e,t.from)<0)return e;if(lt(e,t.to)<=0)return ca(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=ca(t).ch-t.to.ch),it(n,r)}function fa(e,t){for(var n=[],r=0;r1&&e.remove(l.line+1,h-1),e.insert(l.line+1,y)}xn(e,"change",e,t)}function ba(e,t,n){function r(e,o,a){if(e.linked)for(var i=0;i1&&!e.done[e.done.length-2].ranges?(e.done.pop(),X(e.done)):void 0}function Ma(e,t,n,r){var o=e.history;o.undone.length=0;var a,i,l=+new Date;if((o.lastOp==r||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(a=Ea(o,o.lastOp==r)))i=X(a.changes),0==lt(t.from,t.to)&&0==lt(t.from,i.to)?i.to=ca(t):a.changes.push(Sa(e,t));else{var u=X(o.done);for(u&&u.ranges||xa(e.sel,o.done),a={changes:[Sa(e,t)],generation:o.generation},o.done.push(a);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=l,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,i||ve(e,"historyAdded")}function Ta(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Pa(e,t,n,r){var o=e.history,a=r&&r.origin;n==o.lastSelOp||a&&o.lastSelOrigin==a&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==a||Ta(e,a,X(o.done),t))?o.done[o.done.length-1]=t:xa(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=a,o.lastSelOp=n,r&&!1!==r.clearRedo&&Ca(o.undone)}function xa(e,t){var n=X(t);n&&n.ranges&&n.equals(e)||t.push(e)}function ja(e,t,n,r){var o=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[a]=n.markedSpans),++a}))}function Da(e){if(!e)return null;for(var t,n=0;n-1&&(X(l)[d]=s[d],delete s[d])}}}return r}function Ra(e,t,n,r){if(r){var o=e.anchor;if(n){var a=lt(t,o)<0;a!=lt(n,o)<0?(o=t,t=n):a!=lt(t,n)<0&&(t=n)}return new la(o,t)}return new la(n||t,t)}function Ba(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),Ga(e,new ia([Ra(e.sel.primary(),t,n,o)],0),r)}function Fa(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),a=0;a=t.ch:l.to>t.ch))){if(o&&(ve(u,"beforeCursorEnter"),u.explicitlyCleared)){if(a.markedSpans){--i;continue}break}if(!u.atomic)continue;if(n){var d=u.find(r<0?1:-1),f=void 0;if((r<0?c:s)&&(d=Xa(e,d,-r,d&&d.line==t.line?a:null)),d&&d.line==t.line&&(f=lt(d,n))&&(r<0?f<0:f>0))return $a(e,d,t,r,o)}var p=u.find(r<0?-1:1);return(r<0?s:c)&&(p=Xa(e,p,r,p.line==t.line?a:null)),p?$a(e,p,t,r,o):null}}return t}function Ya(e,t,n,r,o){var a=r||1,i=$a(e,t,n,a,o)||!o&&$a(e,t,n,a,!0)||$a(e,t,n,-a,o)||!o&&$a(e,t,n,-a,!0);return i||(e.cantEdit=!0,it(e.first,0))}function Xa(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?pt(e,it(t.line-1)):null:n>0&&t.ch==(r||Qe(e,t.line)).text.length?t.line=0;--o)ei(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text,origin:t.origin});else ei(e,t)}}function ei(e,t){if(1!=t.text.length||""!=t.text[0]||0!=lt(t.from,t.to)){var n=fa(e,t);Ma(e,t,n,e.cm?e.cm.curOp.id:NaN),ri(e,t,n,Wt(e,t));var r=[];ba(e,(function(e,n){n||-1!=V(r,e.history)||(ui(e.history,t),r.push(e.history)),ri(e,t,null,Wt(e,t))}))}}function ti(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var o,a=e.history,i=e.sel,l="undo"==t?a.done:a.undone,u="undo"==t?a.undone:a.done,s=0;s=0;--p){var h=f(p);if(h)return h.v}}}}function ni(e,t){if(0!=t&&(e.first+=t,e.sel=new ia(J(e.sel.ranges,(function(e){return new la(it(e.anchor.line+t,e.anchor.ch),it(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Fr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linea&&(t={from:t.from,to:it(a,Qe(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ze(e,t.from,t.to),n||(n=fa(e,t)),e.cm?oi(e.cm,t,r):va(e,t,r),Ua(e,n,U),e.cantEdit&&Ya(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}}function oi(e,t,n){var r=e.doc,o=e.display,a=t.from,i=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=nt(Zt(Qe(r,a.line))),r.iter(u,i.line+1,(function(e){if(e==o.maxLine)return l=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&_e(e),va(r,t,n,Nr(e)),e.options.lineWrapping||(r.iter(u,a.line+t.text.length,(function(e){var t=un(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0)),Pt(r,a.line),Bo(e,400);var s=t.text.length-(i.line-a.line)-1;t.full?Fr(e):a.line!=i.line||1!=t.text.length||ya(e.doc,t)?Fr(e,a.line,i.line+1,s):Ir(e,a.line,"text");var c=we(e,"changes"),d=we(e,"change");if(d||c){var f={from:a,to:i,text:t.text,removed:t.removed,origin:t.origin};d&&xn(e,"change",e,f),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function ai(e,t,n,r,o){var a;r||(r=n),lt(r,n)<0&&(n=(a=[r,n])[0],r=a[1]),"string"==typeof t&&(t=e.splitLines(t)),Za(e,{from:n,to:r,text:t,origin:o})}function ii(e,t,n,r){n1||!(this.children[0]instanceof ci))){var l=[];this.collapse(l),this.children=[new ci(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var i=o.lines.length%25+25,l=i;l10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==i&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=j("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Qt(e,t.line,t,n,a)||t.line!=n.line&&Qt(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Lt()}a.addToHistory&&Ma(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,u=t.line,s=e.cm;if(e.iter(u,n.line+1,(function(e){s&&a.collapsed&&!s.options.lineWrapping&&Zt(e)==s.display.maxLine&&(l=!0),a.collapsed&&u!=t.line&&tt(e,0),Bt(e,new Nt(a,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u})),a.collapsed&&e.iter(t.line,n.line+1,(function(t){on(e,t)&&tt(t,0)})),a.clearOnEnter&&me(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(Dt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++mi,a.atomic=!0),s){if(l&&(s.curOp.updateMaxLine=!0),a.collapsed)Fr(s,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var c=t.line;c<=n.line;c++)Ir(s,c,"text");a.atomic&&qa(s.doc),xn(s,"markerAdded",s,a)}return a}gi.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Co(e),we(this,"clear")){var n=this.find();n&&xn(this,"clear",n.from,n.to)}for(var r=null,o=null,a=0;ae.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Fr(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&qa(e.doc)),e&&xn(e,"markerCleared",e,this,r,o),t&&Eo(e),this.parent&&this.parent.clear()}},gi.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o=0;u--)Za(this,r[u]);l?Ha(this,l):this.cm&&uo(this.cm)})),undo:Ro((function(){ti(this,"undo")})),redo:Ro((function(){ti(this,"redo")})),undoSelection:Ro((function(){ti(this,"undo",!0)})),redoSelection:Ro((function(){ti(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=pt(this,e),t=pt(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,(function(a){var i=a.markedSpans;if(i)for(var l=0;l=u.to||null==u.from&&o!=e.line||null!=u.from&&o==t.line&&u.from>=t.ch||n&&!n(u.marker)||r.push(u.marker.parent||u.marker)}++o})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=a,++n})),pt(this,it(n,t))},indexFromPos:function(e){var t=(e=pt(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Ua(t.doc,sa(n,n)),f)for(var p=0;p=0;t--)ai(e.doc,"",r[t].from,r[t].to,"+delete");uo(e)}))}function $i(e,t,n){var r=le(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Yi(e,t,n){var r=$i(e,t.ch,n);return null==r?null:new it(t.line,r,n<0?"after":"before")}function Xi(e,t,n,r,o){if(e){"rtl"==t.doc.direction&&(o=-o);var a=pe(n,t.doc.direction);if(a){var i,l=o<0?X(a):a[0],u=o<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var s=rr(t,n);i=o<0?n.text.length-1:0;var c=or(t,s,i).top;i=ue((function(e){return or(t,s,e).top==c}),o<0==(1==l.level)?l.from:l.to-1,i),"before"==u&&(i=$i(n,i,1))}else i=o<0?l.to:l.from;return new it(r,i,u)}}return new it(r,o<0?n.text.length:0,o<0?"before":"after")}function Ji(e,t,n,r){var o=pe(t,e.doc.direction);if(!o)return Yi(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=de(o,n.ch,n.sticky),i=o[a];if("ltr"==e.doc.direction&&i.level%2==0&&(r>0?i.to>n.ch:i.from=i.from&&f>=c.begin)){var p=d?"before":"after";return new it(n.line,f,p)}}var h=function(e,t,r){for(var a=function(e,t){return t?new it(n.line,u(e,1),"before"):new it(n.line,e,"after")};e>=0&&e0==(1!=i.level),s=l?r.begin:u(r.end,-1);if(i.from<=s&&s0?c.end:u(c.begin,-1);return null==g||r>0&&g==t.text.length||!(m=h(r>0?0:o.length-1,r,s(g)))?null:m}Ii.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ii.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ii.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ii.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ii.default=b?Ii.macDefault:Ii.pcDefault;var Qi={selectAll:Ja,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),U)},killLine:function(e){return Ki(e,(function(t){if(t.empty()){var n=Qe(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)o=new it(o.line,o.ch+1),e.replaceRange(a.charAt(o.ch-1)+a.charAt(o.ch-2),it(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var i=Qe(e.doc,o.line-1).text;i&&(o=new it(o.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+i.charAt(i.length-1),it(o.line-1,i.length-1),o,"+transpose"))}n.push(new la(o,o))}e.setSelections(n)}))},newlineAndIndent:function(e){return Lo(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(lt((o=i.ranges[o]).from(),t)<0||t.xRel>0)&&(lt(o.to(),t)>0||t.xRel<0)?Ol(e,r,t,a):Cl(e,r,t,a)}function Ol(e,t,n,r){var o=e.display,a=!1,i=No(e,(function(t){s&&(o.scroller.draggable=!1),e.state.draggingText=!1,ye(o.wrapper.ownerDocument,"mouseup",i),ye(o.wrapper.ownerDocument,"mousemove",c),ye(o.scroller,"dragstart",d),ye(o.scroller,"drop",i),a||(Oe(t),r.addNew||Ba(e.doc,n,null,null,r.extend),s&&!p||l&&9==u?setTimeout((function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()}),20):o.input.focus())})),c=function(e){a=a||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return a=!0};s&&(o.scroller.draggable=!0),e.state.draggingText=i,i.copy=!r.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop(),me(o.wrapper.ownerDocument,"mouseup",i),me(o.wrapper.ownerDocument,"mousemove",c),me(o.scroller,"dragstart",d),me(o.scroller,"drop",i),Jr(e),setTimeout((function(){return o.input.focus()}),20)}function Sl(e,t,n){if("char"==n)return new la(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new la(it(t.line,0),pt(e.doc,it(t.line+1,0)));var r=n(e,t);return new la(r.from,r.to)}function Cl(e,t,n,r){var o=e.display,a=e.doc;Oe(t);var i,l,u=a.sel,s=u.ranges;if(r.addNew&&!r.extend?(l=a.sel.contains(n),i=l>-1?s[l]:new la(n,n)):(i=a.sel.primary(),l=a.sel.primIndex),"rectangle"==r.unit)r.addNew||(i=new la(n,n)),n=Rr(e,t,!0,!0),l=-1;else{var c=Sl(e,n,r.unit);i=r.extend?Ra(i,c.anchor,c.head,r.extend):c}r.addNew?-1==l?(l=s.length,Ga(a,ua(e,s.concat([i]),l),{scroll:!1,origin:"*mouse"})):s.length>1&&s[l].empty()&&"char"==r.unit&&!r.extend?(Ga(a,ua(e,s.slice(0,l).concat(s.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):Ia(a,l,i,z):(l=0,Ga(a,new ia([i],0),z),u=a.sel);var d=n;function f(t){if(0!=lt(d,t))if(d=t,"rectangle"==r.unit){for(var o=[],s=e.options.tabSize,c=I(Qe(a,n.line).text,n.ch,s),f=I(Qe(a,t.line).text,t.ch,s),p=Math.min(c,f),h=Math.max(c,f),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var y=Qe(a,m).text,v=K(y,p,s);p==h?o.push(new la(it(m,v),it(m,v))):y.length>v&&o.push(new la(it(m,v),it(m,K(y,h,s))))}o.length||o.push(new la(n,n)),Ga(a,ua(e,u.ranges.slice(0,l).concat(o),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,_=i,w=Sl(e,t,r.unit),k=_.anchor;lt(w.anchor,k)>0?(b=w.head,k=dt(_.from(),w.anchor)):(b=w.anchor,k=ct(_.to(),w.head));var O=u.ranges.slice(0);O[l]=El(e,new la(pt(a,k),b)),Ga(a,ua(e,O,l),z)}}var p=o.wrapper.getBoundingClientRect(),h=0;function m(t){var n=++h,i=Rr(e,t,!0,"rectangle"==r.unit);if(i)if(0!=lt(i,d)){e.curOp.focus=L(),f(i);var l=no(o,a);(i.line>=l.to||i.linep.bottom?20:0;u&&setTimeout(No(e,(function(){h==n&&(o.scroller.scrollTop+=u,m(t))})),50)}}function g(t){e.state.selectingText=!1,h=1/0,t&&(Oe(t),o.input.focus()),ye(o.wrapper.ownerDocument,"mousemove",y),ye(o.wrapper.ownerDocument,"mouseup",v),a.history.lastSelOrigin=null}var y=No(e,(function(e){0!==e.buttons&&Te(e)?m(e):g(e)})),v=No(e,g);e.state.selectingText=v,me(o.wrapper.ownerDocument,"mousemove",y),me(o.wrapper.ownerDocument,"mouseup",v)}function El(e,t){var n=t.anchor,r=t.head,o=Qe(e.doc,n.line);if(0==lt(n,r)&&n.sticky==r.sticky)return t;var a=pe(o);if(!a)return t;var i=de(a,n.ch,n.sticky),l=a[i];if(l.from!=n.ch&&l.to!=n.ch)return t;var u,s=i+(l.from==n.ch==(1!=l.level)?0:1);if(0==s||s==a.length)return t;if(r.line!=n.line)u=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=de(a,r.ch,r.sticky),d=c-i||(r.ch-n.ch)*(1==l.level?-1:1);u=c==s-1||c==s?d<0:d>0}var f=a[s+(u?-1:0)],p=u==(1==f.level),h=p?f.from:f.to,m=p?"after":"before";return n.ch==h&&n.sticky==m?t:new la(new it(n.line,h,m),r)}function Ml(e,t,n,r){var o,a;if(t.touches)o=t.touches[0].clientX,a=t.touches[0].clientY;else try{o=t.clientX,a=t.clientY}catch(e){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Oe(t);var i=e.display,l=i.lineDiv.getBoundingClientRect();if(a>l.bottom||!we(e,n))return Ce(t);a-=l.top-i.viewOffset;for(var u=0;u=o)return ve(e,n,e,rt(e.doc,a),e.display.gutterSpecs[u].className,t),Ce(t)}}function Tl(e,t){return Ml(e,t,"gutterClick",!0)}function Pl(e,t){zn(e.display,t)||xl(e,t)||be(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function xl(e,t){return!!we(e,"gutterContextMenu")&&Ml(e,t,"gutterContextMenu",!1)}function jl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),pr(e)}yl.prototype.compare=function(e,t,n){return this.time+gl>e&&0==lt(t,this.pos)&&n==this.button};var Dl={toString:function(){return"CodeMirror.Init"}},Ll={},Nl={};function Al(e){var t=e.optionHandlers;function n(n,r,o,a){e.defaults[n]=r,o&&(t[n]=a?function(e,t,n){n!=Dl&&o(e,t,n)}:o)}e.defineOption=n,e.Init=Dl,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,ma(e)}),!0),n("indentUnit",2,ma,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){ga(e),pr(e),Fr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var a=e.text.indexOf(t,o);if(-1==a)break;o=a+t.length,n.push(it(r,a))}r++}));for(var o=n.length-1;o>=0;o--)ai(e.doc,t,n[o],it(n[o].line,n[o].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Dl&&e.refresh()})),n("specialCharPlaceholder",yn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){jl(e),Zo(e)}),!0),n("keyMap","default",(function(e,t,n){var r=qi(t),o=n!=Dl&&qi(n);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Bl,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=Jo(t,e.options.lineNumbers),Zo(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Lr(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return _o(e)}),!0),n("scrollbarStyle","native",(function(e){Oo(e),_o(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Jo(e.options.gutters,t),Zo(e)}),!0),n("firstLineNumber",1,Zo,!0),n("lineNumberFormatter",(function(e){return e}),Zo,!0),n("showCursorWhenSelecting",!1,Ur,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Zr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Rl),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Ur,!0),n("singleCursorHeightPerLine",!0,Ur,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,ga,!0),n("addModeClass",!1,ga,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,ga,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}function Rl(e,t,n){if(!t!=!(n&&n!=Dl)){var r=e.display.dragFunctions,o=t?me:ye;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function Bl(e){e.options.lineWrapping?(N(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(M(e.display.wrapper,"CodeMirror-wrap"),sn(e)),Ar(e),Fr(e),pr(e),setTimeout((function(){return _o(e)}),100)}function Fl(e,t){var n=this;if(!(this instanceof Fl))return new Fl(e,t);this.options=t=t?F(t):{},F(Ll,t,!1);var r=t.value;"string"==typeof r?r=new Si(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var o=new Fl.inputStyles[t.inputStyle](this),a=this.display=new ea(e,r,o,t);for(var i in a.wrapper.CodeMirror=this,jl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Oo(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new W,keySeq:null,specialChars:null},t.autofocus&&!v&&a.input.focus(),l&&u<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Il(this),Di(),Co(this),this.curOp.forceUpdate=!0,_a(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Qr(n)}),20):Zr(this),Nl)Nl.hasOwnProperty(i)&&Nl[i](this,t[i],Dl);Xo(this),t.finishInit&&t.finishInit(this);for(var c=0;c400}me(t.scroller,"touchstart",(function(o){if(!be(e,o)&&!a(o)&&!Tl(e,o)){t.input.ensurePolled(),clearTimeout(n);var i=+new Date;t.activeTouch={start:i,moved:!1,prev:i-r.end<=300?r:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}})),me(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),me(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!zn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,l=e.coordsChar(t.activeTouch,"page");a=!r.prev||i(r,r.prev)?new la(l,l):!r.prev.prev||i(r,r.prev.prev)?e.findWordAt(l):new la(it(l.line,0),pt(e.doc,it(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Oe(n)}o()})),me(t.scroller,"touchcancel",o),me(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(ho(e,t.scroller.scrollTop),go(e,t.scroller.scrollLeft,!0),ve(e,"scroll",e))})),me(t.scroller,"mousewheel",(function(t){return aa(e,t)})),me(t.scroller,"DOMMouseScroll",(function(t){return aa(e,t)})),me(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){be(e,t)||Ee(t)},over:function(t){be(e,t)||(Ti(e,t),Ee(t))},start:function(t){return Mi(e,t)},drop:No(e,Ei),leave:function(t){be(e,t)||Pi(e)}};var s=t.input.getField();me(s,"keyup",(function(t){return fl.call(e,t)})),me(s,"keydown",No(e,cl)),me(s,"keypress",No(e,pl)),me(s,"focus",(function(t){return Qr(e,t)})),me(s,"blur",(function(t){return Zr(e,t)}))}Fl.defaults=Ll,Fl.optionHandlers=Nl;var Wl=[];function Vl(e,t,n,r){var o,a=e.doc;null==n&&(n="add"),"smart"==n&&(a.mode.indent?o=_t(e,t).state:n="prev");var i=e.options.tabSize,l=Qe(a,t),u=I(l.text,null,i);l.stateAfter&&(l.stateAfter=null);var s,c=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&((s=a.mode.indent(o,l.text.slice(c.length),l.text))==G||s>150)){if(!r)return;n="prev"}}else s=0,n="not";"prev"==n?s=t>a.first?I(Qe(a,t-1).text,null,i):0:"add"==n?s=u+e.options.indentUnit:"subtract"==n?s=u-e.options.indentUnit:"number"==typeof n&&(s=u+n),s=Math.max(0,s);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(s/i);p;--p)f+=i,d+="\t";if(fi,u=Ae(t),s=null;if(l&&r.ranges.length>1)if(Hl&&Hl.text.join("\n")==t){if(r.ranges.length%Hl.text.length==0){s=[];for(var c=0;c=0;f--){var p=r.ranges[f],h=p.from(),m=p.to();p.empty()&&(n&&n>0?h=it(h.line,h.ch-n):e.state.overwrite&&!l?m=it(m.line,Math.min(Qe(a,m.line).text.length,m.ch+X(u).length)):l&&Hl&&Hl.lineWise&&Hl.text.join("\n")==u.join("\n")&&(h=m=it(h.line,0)));var g={from:h,to:m,text:s?s[f%s.length]:u,origin:o||(l?"paste":e.state.cutIncoming>i?"cut":"+input")};Za(e.doc,g),xn(e,"inputRead",e,g)}t&&!l&&ql(e,t),uo(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function zl(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Lo(t,(function(){return Ul(t,n,0,null,"paste")})),!0}function ql(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var a=e.getModeAt(o.head),i=!1;if(a.electricChars){for(var l=0;l-1){i=Vl(e,o.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Qe(e.doc,o.head.line).text.slice(0,o.head.ch))&&(i=Vl(e,o.head.line,"smart"));i&&xn(e,"electricInput",e,o.head.line)}}}function Kl(e){for(var t=[],n=[],r=0;rn&&(Vl(this,o.head.line,e,!0),n=o.head.line,r==this.doc.sel.primIndex&&uo(this));else{var a=o.from(),i=o.to(),l=Math.max(n,a.line);n=Math.min(this.lastLine(),i.line-(i.ch?0:1))+1;for(var u=l;u0&&Ia(this.doc,r,new la(a,s[r].to()),U)}}})),getTokenAt:function(e,t){return Ct(this,e,t)},getLineTokens:function(e,t){return Ct(this,it(e),t,!0)},getTokenTypeAt:function(e){e=pt(this.doc,e);var t,n=bt(this,Qe(this.doc,e.line)),r=0,o=(n.length-1)/2,a=e.ch;if(0==a)t=n[2];else for(;;){var i=r+o>>1;if((i?n[2*i-1]:0)>=a)o=i;else{if(!(n[2*i+1]a&&(e=a,o=!0),r=Qe(this.doc,e)}else r=e;return yr(this,r,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-ln(r):0)},defaultTextHeight:function(){return xr(this.display)},defaultCharWidth:function(){return jr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,o){var a=this.display,i=(e=_r(this,pt(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),a.sizer.appendChild(t),"over"==r)i=e.top;else if("above"==r||"near"==r){var u=Math.max(a.wrapper.clientHeight,this.doc.height),s=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>u)&&e.top>t.offsetHeight?i=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=u&&(i=e.bottom),l+t.offsetWidth>s&&(l=s-t.offsetWidth)}t.style.top=i+"px",t.style.left=t.style.right="","right"==o?(l=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?l=0:"middle"==o&&(l=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&ao(this,{left:l,top:i,right:l+t.offsetWidth,bottom:i+t.offsetHeight})},triggerOnKeyDown:Ao(cl),triggerOnKeyPress:Ao(pl),triggerOnKeyUp:fl,triggerOnMouseDown:Ao(bl),execCommand:function(e){if(Qi.hasOwnProperty(e))return Qi[e].call(null,this)},triggerElectric:Ao((function(e){ql(this,e)})),findPosH:function(e,t,n,r){var o=1;t<0&&(o=-1,t=-t);for(var a=pt(this.doc,e),i=0;i0&&i(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&Ar(this),ve(this,"refresh",this)})),swapDoc:Ao((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),_a(this,e),pr(this),this.display.input.reset(),so(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,xn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ke(e),e.registerHelper=function(t,r,o){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=o},e.registerGlobalHelper=function(t,r,o,a){e.registerHelper(t,r,a),n[t]._global.push({pred:o,val:a})}}function Jl(e,t,n,r,o){var a=t,i=n,l=Qe(e,t.line),u=o&&"rtl"==e.direction?-n:n;function s(){var n=t.line+u;return!(n=e.first+e.size)&&(t=new it(n,t.ch,t.sticky),l=Qe(e,n))}function c(a){var i;if("codepoint"==r){var c=l.text.charCodeAt(t.ch+(r>0?0:-1));i=isNaN(c)?null:new it(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(c>=55296&&c<56320?2:1))),-n)}else i=o?Ji(e.cm,l,t,n):Yi(l,t,n);if(null==i){if(a||!s())return!1;t=Xi(o,e.cm,l,t.line,u)}else t=i;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var d=null,f="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||c(!h);h=!1){var m=l.text.charAt(t.ch)||"\n",g=re(m,p)?"w":f&&"\n"==m?"n":!f||/\s/.test(m)?null:"p";if(!f||h||g||(g="s"),d&&d!=g){n<0&&(n=1,c(),t.sticky="after");break}if(g&&(d=g),n>0&&!c(!h))break}var y=Ya(e,t,a,i,!0);return ut(a,y)&&(y.hitSide=!0),y}function Ql(t,n,r,o){var a,i,l=t.doc,u=n.left;if("page"==o){var s=Math.min(t.display.wrapper.clientHeight,window.innerHeight||e.documentElement.clientHeight),c=Math.max(s-.5*xr(t.display),3);a=(r>0?n.bottom:n.top)+r*c}else"line"==o&&(a=r>0?n.bottom+3:n.top-3);for(;(i=Or(t,u,a)).outside;){if(r<0?a<=0:a>=l.height){i.hitSide=!0;break}a+=5*r}return i}var Zl=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new W,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function eu(e,t){var n=nr(e,t.line);if(!n||n.hidden)return null;var r=Qe(e.doc,t.line),o=Zn(n,r,t.line),a=pe(r,e.doc.direction),i="left";a&&(i=de(a,t.ch)%2?"right":"left");var l=lr(o.map,t.ch,i);return l.offset="right"==l.collapse?l.end:l.start,l}function tu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function nu(e,t){return t&&(e.bad=!0),e}function ru(e,t,n,r,o){var a="",i=!1,l=e.doc.lineSeparator(),u=!1;function s(e){return function(t){return t.id==e}}function c(){i&&(a+=l,u&&(a+=l),i=u=!1)}function d(e){e&&(c(),a+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void d(n);var a,p=t.getAttribute("cm-marker");if(p){var h=e.findMarks(it(r,0),it(o+1,0),s(+p));return void(h.length&&(a=h[0].find(0))&&d(Ze(e.doc,a.from,a.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&c();for(var g=0;g=t.display.viewTo||a.line=t.display.viewFrom&&eu(t,o)||{node:u[0].measure.map[2],offset:0},c=a.liner.firstLine()&&(i=it(i.line-1,Qe(r.doc,i.line-1).length)),l.ch==Qe(r.doc,l.line).text.length&&l.lineo.viewTo-1)return!1;i.line==o.viewFrom||0==(e=Br(r,i.line))?(t=nt(o.view[0].line),n=o.view[0].node):(t=nt(o.view[e].line),n=o.view[e-1].node.nextSibling);var u,s,c=Br(r,l.line);if(c==o.view.length-1?(u=o.viewTo-1,s=o.lineDiv.lastChild):(u=nt(o.view[c+1].line)-1,s=o.view[c+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(ru(r,n,s,t,u)),f=Ze(r.doc,it(t,0),it(u,Qe(r.doc,u).text.length));d.length>1&&f.length>1;)if(X(d)==X(f))d.pop(),f.pop(),u--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,h=0,m=d[0],g=f[0],y=Math.min(m.length,g.length);pi.ch&&v.charCodeAt(v.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;d[d.length-1]=v.slice(0,v.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var w=it(t,p),k=it(u,f.length?X(f).length-h:0);return d.length>1||d[0]||lt(w,k)?(ai(r.doc,d,w,k,"+input"),!0):void 0},Zl.prototype.ensurePolled=function(){this.forceCompositionEnd()},Zl.prototype.reset=function(){this.forceCompositionEnd()},Zl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Zl.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Zl.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Lo(this.cm,(function(){return Fr(e.cm)}))},Zl.prototype.setUneditable=function(e){e.contentEditable="false"},Zl.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||No(this.cm,Ul)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Zl.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Zl.prototype.onContextMenu=function(){},Zl.prototype.resetPosition=function(){},Zl.prototype.needsContentAttribute=!0;var iu=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new W,this.hasSelection=!1,this.composing=null};function lu(t,n){if((n=n?F(n):{}).value=t.value,!n.tabindex&&t.tabIndex&&(n.tabindex=t.tabIndex),!n.placeholder&&t.placeholder&&(n.placeholder=t.placeholder),null==n.autofocus){var r=L();n.autofocus=r==t||null!=t.getAttribute("autofocus")&&r==e.body}function o(){t.value=u.getValue()}var a;if(t.form&&(me(t.form,"submit",o),!n.leaveSubmitMethodAlone)){var i=t.form;a=i.submit;try{var l=i.submit=function(){o(),i.submit=a,i.submit(),i.submit=l}}catch(e){}}n.finishInit=function(e){e.save=o,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,o(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(ye(t.form,"submit",o),n.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=a))}},t.style.display="none";var u=Fl((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),n);return u}function uu(e){e.off=ye,e.on=me,e.wheelEventPixels=oa,e.Doc=Si,e.splitLines=Ae,e.countColumn=I,e.findColumn=K,e.isWordChar=ne,e.Pass=G,e.signal=ve,e.Line=cn,e.changeEnd=ca,e.scrollbarModel=ko,e.Pos=it,e.cmpPos=lt,e.modes=We,e.mimeModes=Ve,e.resolveMode=Ue,e.getMode=ze,e.modeExtensions=qe,e.extendMode=Ke,e.copyState=$e,e.startState=Xe,e.innerMode=Ye,e.commands=Qi,e.keyMap=Ii,e.keyName=zi,e.isModifierKey=Gi,e.lookupKey=Hi,e.normalizeKeyMap=Vi,e.StringStream=Je,e.SharedTextMarker=vi,e.TextMarker=gi,e.LineWidget=fi,e.e_preventDefault=Oe,e.e_stopPropagation=Se,e.e_stop=Ee,e.addClass=N,e.contains=D,e.rmClass=M,e.keyNames=Ai}iu.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var o=this.textarea;function a(e){if(!be(r,e)){if(r.somethingSelected())Gl({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Kl(r);Gl({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,U):(n.prevInput="",o.value=t.text.join("\n"),R(o))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(o.style.width="0px"),me(o,"input",(function(){l&&u>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),me(o,"paste",(function(e){be(r,e)||zl(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),me(o,"cut",a),me(o,"copy",a),me(e.scroller,"paste",(function(t){if(!zn(e,t)&&!be(r,t)){if(!o.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var a=new Event("paste");a.clipboardData=t.clipboardData,o.dispatchEvent(a)}})),me(e.lineSpace,"selectstart",(function(t){zn(e,t)||Oe(t)})),me(o,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),me(o,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},iu.prototype.createField=function(e){this.wrapper=Yl(),this.textarea=this.wrapper.firstChild},iu.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},iu.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=zr(e);if(e.options.moveInputWithCursor){var o=_r(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),i=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+i.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+i.left-a.left))}return r},iu.prototype.showSelection=function(e){var t=this.cm.display;P(t.cursorDiv,e.cursors),P(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},iu.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&R(this.textarea),l&&u>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",l&&u>=9&&(this.hasSelection=null))}},iu.prototype.getField=function(){return this.textarea},iu.prototype.supportsTouch=function(){return!1},iu.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||L()!=this.textarea))try{this.textarea.focus()}catch(e){}},iu.prototype.blur=function(){this.textarea.blur()},iu.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},iu.prototype.receivedFocus=function(){this.slowPoll()},iu.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},iu.prototype.fastPoll=function(){var e=!1,t=this;function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},iu.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Re(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==r&&!t.somethingSelected())return!1;if(l&&u>=9&&this.hasSelection===o||b&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=o.charCodeAt(0);if(8203!=a||r||(r="\u200b"),8666==a)return this.reset(),this.cm.execCommand("undo")}for(var i=0,s=Math.min(r.length,o.length);i1e3||o.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},iu.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},iu.prototype.onKeyPress=function(){l&&u>=9&&(this.hasSelection=null),this.fastPoll()},iu.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Rr(n,e),i=r.scroller.scrollTop;if(a&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(a)&&No(n,Ga)(n.doc,sa(a),U);var c,d=o.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(c=window.scrollY),r.input.focus(),s&&window.scrollTo(null,c),r.input.reset(),n.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),l&&u>=9&&g(),S){Ee(e);var m=function(){ye(window,"mouseup",m),setTimeout(y,20)};me(window,"mouseup",m)}else setTimeout(y,50)}function g(){if(null!=o.selectionStart){var e=n.somethingSelected(),a="\u200b"+(e?o.value:"");o.value="\u21da",o.value=a,t.prevInput=e?"":"\u200b",o.selectionStart=1,o.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,o.style.cssText=d,l&&u<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=i),null!=o.selectionStart)){(!l||l&&u<9)&&g();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"\u200b"==t.prevInput?No(n,Ja)(n):e++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}},iu.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},iu.prototype.setUneditable=function(){},iu.prototype.needsContentAttribute=!1,Al(Fl),Xl(Fl);var su="iter insert remove copy getEditor constructor".split(" ");for(var cu in Si.prototype)Si.prototype.hasOwnProperty(cu)&&V(su,cu)<0&&(Fl.prototype[cu]=function(e){return function(){return e.apply(this.doc,arguments)}}(Si.prototype[cu]));return ke(Si),Fl.inputStyles={textarea:iu,contenteditable:Zl},Fl.defineMode=function(e){Fl.defaults.mode||"null"==e||(Fl.defaults.mode=e),He.apply(this,arguments)},Fl.defineMIME=Ge,Fl.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Fl.defineMIME("text/plain","null"),Fl.defineExtension=function(e,t){Fl.prototype[e]=t},Fl.defineDocExtension=function(e,t){Si.prototype[e]=t},Fl.fromTextArea=lu,uu(Fl),Fl.version="5.58.2",Fl}()},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,a,i,l){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,a,i,l],c=0;(u=new Error(t.replace(/%s/g,(function(){return s[c++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=de(n(1)),o=de(n(36)),a=de(n(10)),i=de(n(4)),l=de(n(5)),u=n(1472),s=de(n(811)),c=de(n(618)),d=de(n(1473)),f=de(n(778)),p=de(n(1495)),h=de(n(1586)),m=de(n(1593)),g=de(n(1595)),y=de(n(1475)),v=de(n(1496)),b=de(n(1497)),_=de(n(1599)),w=de(n(1459)),k=de(n(1619)),O=de(n(605)),S=de(n(1621)),C=de(n(1624)),E=de(n(1625)),M=de(n(1626)),T=de(n(1627)),P=de(n(1632)),x=de(n(1634)),j=de(n(446)),D=de(n(1636)),L=de(n(1458)),N=de(n(1639)),A=de(n(1641)),R=de(n(1643)),B=de(n(1501)),F=de(n(1645)),I=de(n(1503)),W=de(n(1653)),V=de(n(1665)),H=de(n(1667)),G=de(n(1669)),U=de(n(1680)),z=de(n(1508)),q=de(n(1690)),K=de(n(1692)),$=de(n(1694)),Y=de(n(1511)),X=de(n(1696)),J=n(1513),Q=n(1699),Z=de(n(1700)),ee=de(n(1702)),te=de(n(1717)),ne=de(n(1756)),re=de(n(1457)),oe=de(n(1759)),ae=de(n(1760)),ie=de(n(1761)),le=de(n(1762)),ue=de(n(1764)),se=de(n(1765)),ce=de(n(1766));function de(e){return e&&e.__esModule?e:{default:e}}function fe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n10&&r(!0)}),[e.items]);var g=(0,o.default)((function(t){t.scrollHeight-t.scrollTop-100<=t.clientHeight&&!e.isLoading&&e.currentPage0&&a.default.createElement(u.default,{name:"multiselect-selected-checkboxes",className:"et-fb-multiselect-selected-items",options:h,_onChange:function(t,n){var r=n.split("|").filter((function(e){return e}));c(d(r));var o=h.filter((function(e){return r.includes(e.value)}));m(o),e.onDeselect()},value:s.join("|")}),b.length>0||e.isLoading?a.default.createElement(u.default,{name:"multiselect-deselected-checkboxes",className:"et-fb-multiselect-deselected-items",options:b,_onChange:function(t,n){var r=n.split("|").filter((function(e){return e}));c((function(e){return[].concat(d(e),d(r))}));var o=v.filter((function(e){return r.includes(e.value)}));m((function(e){return[].concat(d(e),d(o))})),e.onSelect()},loading:e.isLoading,"data-testid":"deselected-checkboxes"}):a.default.createElement("div",{className:"et-fb-multiselect-not-found"},"No results found."))))};m.propTypes={onSelect:i.default.func,onDeselect:i.default.func,onSearch:i.default.func,onScrollLoad:i.default.func,onUpdate:i.default.func,isLoading:i.default.bool,isSearchable:i.default.bool,currentPage:i.default.number,totalPages:i.default.number,items:i.default.array.isRequired,value:i.default.array,className:i.default.string},m.defaultProps={onSelect:function(){},onDeselect:function(){},onSearch:function(){},onScrollLoad:function(){},onUpdate:function(){},isLoading:!1,isSearchable:!0,currentPage:1,totalPages:1,items:[],value:[],className:""},m.displayName="ETBuilderMultiselect";var g=m;t.default=g},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=s(n(7)),i=s(n(13)),l=s(n(40)),u=s(n(10));function s(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function d(){return d=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"",n=(0,h.default)(e),r=this.props;if(!(0,d.default)(r.order)){var a=(0,l.default)(r.order,String);n=(0,g.default)((0,v.default)(a,n),(0,y.default)(n,a))}return(0,l.default)(n,(function(n){var r=(0,m.default)(e,n),a=n;return""!==t&&(a="".concat(t,"-").concat(n)),o.default.createElement(b.default,{key:a,value:n,name:r})}))}},{key:"render",value:function(){var e,t=this,n=(0,u.default)(this.props.value)?this.props.value:this.props.default;!(0,p.default)((0,h.default)(this.props.options),n)&&(0,p.default)((0,h.default)(this.props.options),(0,u.default)(n))&&(n=(0,u.default)(n));var r={"et-core-control-select":!0,"et-fb-settings-option-select":!0};this.props.className&&(r[this.props.className]=!0),e=this.props.groups?(0,l.default)(this.props.options,(function(e,n){return"0"===n?t._render_options(e,n):o.default.createElement(_.default,{label:n,key:"option-group-".concat(n)},t._render_options(e,n))})):this._render_options(this.props.options);var a={};this.props.readonly&&(a.disabled=!0);var s=this.props.id;return s||(s="et-fb-".concat(this.props.name)),o.default.createElement("select",O({ref:function(e){return t.node=e},className:(0,i.default)(r),value:n,name:this.props.name,id:s,onChange:this._onChange},a),e)}}],r&&C(n.prototype,r),a&&C(n,a),k}(o.PureComponent);j(D,"propTypes",{name:a.default.string.isRequired});var L=D;t.default=L}).call(this,n(9))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=c(n(7)),l=n(1483),u=c(n(1544)),s=n(284);function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0,clientOffset:null},n=t.publishSource,r=t.clientOffset,l=t.getSourceClientOffset;(0,o.default)((0,a.default)(e),"Expected sourceIds to be an array.");var u=this.getMonitor(),c=this.getRegistry();(0,o.default)(!u.isDragging(),"Cannot call beginDrag while dragging.");for(var d=0;d=0;p--)if(u.canDragSource(e[p])){f=e[p];break}if(null===f)return;var h=null;r&&((0,o.default)("function"==typeof l,"When clientOffset is provided, getSourceClientOffset must be a function."),h=l(f));var m=c.getSource(f),g=m.beginDrag(u,f);(0,o.default)((0,i.default)(g),"Item must be an object."),c.pinSource(f);var y=c.getSourceType(f);return{type:s,itemType:y,item:g,sourceId:f,clientOffset:r,sourceClientOffset:h,isSourcePublic:n}},t.publishDragSource=function(){if(!this.getMonitor().isDragging())return;return{type:c}},t.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.clientOffset,r=void 0===n?null:n;(0,o.default)((0,a.default)(e),"Expected targetIds to be an array.");var i=e.slice(0),u=this.getMonitor(),s=this.getRegistry();(0,o.default)(u.isDragging(),"Cannot call hover while not dragging."),(0,o.default)(!u.didDrop(),"Cannot call hover after drop.");for(var c=0;c=0;m--){var g=i[m],y=s.getTargetType(g);(0,l.default)(y,h)||i.splice(m,1)}for(var v=0;v0&&void 0!==arguments[0]?arguments[0]:{},n=this.getMonitor(),a=this.getRegistry();(0,o.default)(n.isDragging(),"Cannot call drop while not dragging."),(0,o.default)(!n.didDrop(),"Cannot call drop twice during one drag operation.");var l=n.getTargetIds().filter(n.canDropOnTarget,n);l.reverse(),l.forEach((function(l,u){var s=a.getTarget(l).drop(n,l);(0,o.default)(void 0===s||(0,i.default)(s),"Drop result must either be an object or undefined."),void 0===s&&(s=0===u?{}:n.getDropResult()),e.store.dispatch({type:f,dropResult:r({},t,s)})}))},t.endDrag=function(){var e=this.getMonitor(),t=this.getRegistry();(0,o.default)(e.isDragging(),"Cannot call endDrag while not dragging.");var n=e.getSourceId();return t.getSource(n,true).endDrag(e,n),t.unpinSource(),{type:p}};var o=u(n(1453)),a=u(n(3)),i=u(n(12)),l=u(n(1485));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.BEGIN_DRAG="dnd-core/BEGIN_DRAG",c=t.PUBLISH_DRAG_SOURCE="dnd-core/PUBLISH_DRAG_SOURCE",d=t.HOVER="dnd-core/HOVER",f=t.DROP="dnd-core/DROP",p=t.END_DRAG="dnd-core/END_DRAG"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addSource=function(e){return{type:r,sourceId:e}},t.addTarget=function(e){return{type:o,targetId:e}},t.removeSource=function(e){return{type:a,sourceId:e}},t.removeTarget=function(e){return{type:i,targetId:e}};var r=t.ADD_SOURCE="dnd-core/ADD_SOURCE",o=t.ADD_TARGET="dnd-core/ADD_TARGET",a=t.REMOVE_SOURCE="dnd-core/REMOVE_SOURCE",i=t.REMOVE_TARGET="dnd-core/REMOVE_TARGET"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){0}},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(0)),o=a(n(7));function a(e){return e&&e.__esModule?e:{default:e}}var i=function(e){return r.default.createElement("iframe",e)};i.propTypes={src:o.default.string.isRequired};var l=i;t.default=l},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=M(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=E(n(29)),i=E(n(7)),l=E(n(13)),u=E(n(11)),s=E(n(71)),c=E(n(8)),d=E(n(4)),f=E(n(10)),p=E(n(5)),h=E(n(14)),m=E(n(100)),g=E(n(40)),y=E(n(281)),v=E(n(1)),b=E(n(820)),_=E(n(2)),w=n(59),k=E(n(1505)),O=E(n(605)),S=E(n(1672)),C=E(n(1506));function E(e){return e&&e.__esModule?e:{default:e}}function M(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(M=function(e){return e?n:t})(e)}function T(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P(e,t){for(var n=0;n0&&n.length>0?o:0)+i;n.css({top:"".concat(l,"px")})}})),A(L(e),"isEnabledDynamicContent",(function(e){var t=e.dynamicAttributes,n=e.fieldName,r=e.value;return(0,p.default)(t,n)&&(0,w.isDynamicContent)(r)})),A(L(e),"getDynamicContentSettingsFields",(function(t,n){var r=e.getDynamicContentField(t).fields||{};return(0,y.default)(r,(function(e){return!(0,f.default)(e.show_on)&&e.show_on!==n}))})),e}return t=g,(n=[{key:"getDynamicContentField",value:function(e){return ETBuilderBackend.dynamicContentFields[e]||{label:ETBuilderBackend.i18n.dynamicContent.invalidField,type:"text",fields:{}}}},{key:"getDynamicContentFieldLabel",value:function(e){if("post_meta_key"===e){var t=(0,w.getDynamicContent)(this.props.value).settings.meta_key||ETBuilderBackend.i18n.dynamicContent.manualCustomField;return(0,b.default)(t)}return this.getDynamicContentField(e).label}},{key:"getDynamicContentFieldDefaultSettings",value:function(e){return(0,m.default)(this.getDynamicContentField(e).fields,(function(e){return e.default||""}))}},{key:"getDynamicContentFieldOptions",value:function(e){var t={};return(0,c.default)(ETBuilderBackend.dynamicContentFields,(function(n,r){if("any"===n.type||n.type===e){var o=n.group?n.group:"Default";(0,f.default)(t[o])&&(t[o]={}),t[o][r]=n.label}})),t}},{key:"componentDidMount",value:function(){_.default.$topWindow().on("wp-toolbar-toggle",this.updateButtonPositionForTinyMCE)}},{key:"componentDidUpdate",value:function(e){var t=(0,w.isDynamicContent)(e.value),n=this.isEnabledDynamicContent(e),r=this.isEnabledDynamicContent(this.props),o=this.props.fieldName===e.fieldName;if(!n&&r&&o){var a=(0,w.getDynamicContent)(this.props.value),i=this.getDynamicContentSettingsFields(a.content,this.props.type),l="text"===this.props.type?3:1;(0,h.default)(i).length>=l&&this.openSettings()}t&&!r&&((0,f.default)(this.controlRef.focus)||this.controlRef.focus()),this.updateButtonPositionForTinyMCE()}},{key:"render",value:function(){var e,t=this,n=(0,p.default)(["upload","background"],this.props.fieldType),r=this.isEnabledDynamicContent(this.props),a=(0,w.getDynamicContent)(this.props.value),i=this.getDynamicContentFieldOptions(this.props.type),u=!n||(0,d.default)(this.props.value),s=o.default.cloneElement(this.props.children,{ref:function(e){return t.controlRef=e}});if((0,d.default)(i))return o.default.createElement(o.Fragment,null,this.props.children);var c="";return"ETBuilderControlTinyMCE"===s.type.displayName&&(s=o.default.cloneElement(s,{onModeSwitch:this.updateButtonPositionForTinyMCE}),R||(0,d.default)(this.state.classModifier)||(this.props.modalWidth>=538&&this.props.modalWidth<998?c="".concat(this.state.classModifier,"-medium"):this.props.modalWidth>=998&&this.props.modalWidth<1202&&(c="".concat(this.state.classModifier,"-wide")))),o.default.createElement("div",{className:(0,l.default)((e={"et-fb-settings-option-dynamic":!0},A(e,"et-fb-settings-option-dynamic--".concat(this.props.fieldType),!0),A(e,"et-fb-settings-option-dynamic--".concat(this.state.classModifier),this.state.classModifier),A(e,"et-fb-settings-option-dynamic--".concat(c),!!c),e))},r&&this.state.settingsOpen&&o.default.createElement(k.default,{title:this.getDynamicContentFieldLabel(a.content),fields:this.getDynamicContentSettingsFields(a.content,this.props.type),values:a.settings,onChange:this.handleSettingsChange,onSave:this.handleSettingsSave,onClose:this.closeSettings}),r&&o.default.createElement(S.default,{fieldType:this.props.fieldType,value:this.props.value,label:this.getDynamicContentFieldLabel(a.content),mode:this.props.previewMode,attributes:this.props.previewAttributes,settingsFields:this.props.showSettingsButton?this.getDynamicContentSettingsFields(a.content,this.props.type):{},showDisableButton:this.props.showDisableButton,showInheritButton:this.props.showInheritButton,dynamicEnabled:-1!==this.props.dynamicAttributes.indexOf(this.props.fieldName),onSettings:this.openSettings,onDisable:this.handleDisable,onInherit:this.handleInherit}),!r&&o.default.createElement(o.Fragment,null,o.default.createElement("div",{className:"et-fb-settings-option-select-discrete"},o.default.createElement(O.default,{ref:function(e){return t.selectRef=e},name:"".concat(this.props.fieldName,"_dynamic_content"),value:r?a.content:"",options:this.getDynamicContentFieldOptions(this.props.type),__onChange:this.handleDynamicContentChange,selectFirst:!1})),s,u&&o.default.createElement(C.default,{ref:function(e){return t.buttonRef=e},type:this.props.fieldType,icon:"dynamic",tooltip:ETBuilderBackend.i18n.dynamicContent.tooltips.enable,className:(0,l.default)("et-fb-settings-option-dynamic__enable","et-fb-settings-option-dynamic__enable--".concat(this.props.fieldType)),onClick:this.handleEnable})))}}])&&P(t.prototype,n),r&&P(t,r),g}(o.PureComponent);B.supportedFieldTypes=["text","tiny_mce","upload"],B.propTypes={children:i.default.element.isRequired,type:i.default.string.isRequired,fieldName:i.default.string.isRequired,fieldType:i.default.oneOf(B.supportedFieldTypes).isRequired,previewMode:i.default.oneOf(["image","background"]),previewAttributes:i.default.object,isContentField:i.default.bool,dynamicAttributes:i.default.arrayOf(i.default.string).isRequired,value:i.default.string.isRequired,showSettingsButton:i.default.bool,showDisableButton:i.default.bool,showInheritButton:i.default.bool,onChange:i.default.func,onReset:i.default.func,onInherit:i.default.func,modalWidth:i.default.number},B.defaultProps={previewMode:"image",previewAttributes:{},isContentField:!1,showSettingsButton:!0,showDisableButton:!0,showInheritButton:!1,onChange:g.default,onReset:g.default,onInherit:g.default};var F=B;t.default=F},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.FILE="__NATIVE_FILE__",t.URL="__NATIVE_URL__",t.TEXT="__NATIVE_TEXT__"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1489);Object.defineProperty(t,"DragDropContext",{enumerable:!0,get:function(){return u(r).default}});var o=n(1553);Object.defineProperty(t,"DragDropContextProvider",{enumerable:!0,get:function(){return u(o).default}});var a=n(1554);Object.defineProperty(t,"DragLayer",{enumerable:!0,get:function(){return u(a).default}});var i=n(1555);Object.defineProperty(t,"DragSource",{enumerable:!0,get:function(){return u(i).default}});var l=n(1565);function u(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"DropTarget",{enumerable:!0,get:function(){return u(l).default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,a=0;a1?1:this.getStep())}},{key:"onChange",value:function(e){this.props.readonly||(this.setUpdateSource(1),this.props.onChange((0,v.default)(this.getDefaultUnit(),e,this.sanitize,this.props.allowedUnits)))}},{key:"onIncrease",value:function(){this.props.readonly||(this.setUpdateSource(2),this.props.onChange((0,v.default)(this.getDefaultUnit(),this.getValue(),this.sanitizeIncrease,this.props.allowedUnits)))}},{key:"onDecrease",value:function(){this.props.readonly||(this.setUpdateSource(2),this.props.onChange((0,v.default)(this.getDefaultUnit(),this.getValue(),this.sanitizeDecrease,this.props.allowedUnits)))}},{key:"handleSpinnerChange",value:function(e,t){var n=t.shiftKey;this.setUpdateSource(3);var r=this.normalize((0,h.maybeInt)(e,0))*(n?10:1);0!==r&&this.props.onChange((0,v.default)(this.getDefaultUnit(),this.getValue(),(0,i.default)(this.sanitize,(0,c.default)(r)),this.props.allowedUnits))}},{key:"renderLabel",value:function(){return!(0,l.default)(this.props.label)&&o.default.createElement("span",{className:"et-fb-settings-option-input-label"},this.props.label)}},{key:"getValue",value:function(){var e=this.props.value||this.props.defaultValue||0;return(0,f.default)((0,h.maybeFloat)(e))?0:e}},{key:"getSpeed",value:function(){return Math.abs(this.props.speed)*(this.getStep()>=1?1:.1)}},{key:"getStep",value:function(){return this._step||this.props.step}},{key:"getDefaultUnit",value:function(){return(0,g.getUnit)(this.props.defaultValue,this.props.defaultUnit)}},{key:"makeActive",value:function(){this.setState({active:!0})}},{key:"makeInactive",value:function(){this.setState({active:!1})}},{key:"sanitize",value:function(e){return(0,h.range)(this.props.min,this.props.max,(0,h.toFixed)((0,h.getPrecision)(this.props.precision),e))}},{key:"setUpdateSource",value:function(e){this._updateSource=[e,(0,u.default)(this._updateSource||[void 0])];var t=this.getStep(),n=this.props.step,r=(0,h.getPrecision)(this.getNumericValue()),o=r>(0,h.getPrecision)(n)?(0,h.toPrecision)(r,n):this.isSameSource()?t:n;this._step=o}},{key:"isSameSource",value:function(){var e=this._updateSource||[void 0,void 0];return(0,u.default)(e)===(0,s.default)(e)}},{key:"render",value:function(){var e=this.state.active?"active":"";return o.default.createElement("div",{className:"et-fb-settings-option--numeric-spinner-control ".concat(e)},o.default.createElement(y.default,{id:this.props.id,onChange:this.onChange,onIncrease:this.onIncrease,onDecrease:this.onDecrease,value:this.props.value,step:this.getStep(),onFocus:this.makeActive,onBlur:this.makeInactive,placeholder:this.props.defaultValue,readonly:(0,d.default)(this.props,"readonly",!1)}),o.default.createElement("div",{className:"numeric-spinner-control-label-wrapper"},!this.props.readonly&&o.default.createElement(p.default,{onChange:this.handleSpinnerChange}),this.renderLabel()))}}])&&w(t.prototype,n),r&&w(t,r),b}(o.Component);E.propTypes={onChange:a.default.func.isRequired,step:a.default.number,precision:a.default.number,min:a.default.number,max:a.default.number,value:a.default.string,placeholder:a.default.string,defaultValue:a.default.string,defaultUnit:a.default.string,speed:a.default.number},E.defaultProps={step:1,min:-9999999999,max:9999999999,defaultValue:"",speed:.5,precision:.01};var M=E;t.default=M},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=y(n(323)),a=y(n(383)),i=y(n(40)),l=y(n(31)),u=y(n(38)),s=y(n(4)),c=y(n(5)),d=y(n(1)),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),p=y(n(16)),h=y(n(7)),m=n(2);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function y(e){return e&&e.__esModule?e:{default:e}}function v(){return v=Object.assign||function(e){for(var t=1;tc);d++){var f=e.getLine(s++);o=null==o?f:o+"\n"+f}u*=2,t.lastIndex=n.ch;var p=t.exec(o);if(p){var h=o.slice(0,p.index).split("\n"),m=p[0].split("\n"),g=n.line+h.length-1,y=h[h.length-1].length;return{from:r(g,y),to:r(g+m.length-1,1==m.length?y+m[0].length:m[m.length-1].length),match:p}}}}function s(e,t,n){for(var r,o=0;o<=e.length;){t.lastIndex=o;var a=t.exec(e);if(!a)break;var i=a.index+a[0].length;if(i>e.length-n)break;(!r||i>r.index+r[0].length)&&(r=a),o=a.index+1}return r}function c(e,t,n){t=a(t,"g");for(var o=n.line,i=n.ch,l=e.firstLine();o>=l;o--,i=-1){var u=e.getLine(o),c=s(u,t,i<0?0:u.length-i);if(c)return{from:r(o,c.index),to:r(o,c.index+c[0].length),match:c}}}function d(e,t,n){if(!i(t))return c(e,t,n);t=a(t,"gm");for(var o,l=1,u=e.getLine(n.line).length-n.ch,d=n.line,f=e.firstLine();d>=f;){for(var p=0;p=f;p++){var h=e.getLine(d--);o=null==o?h:h+"\n"+o}l*=2;var m=s(o,t,u);if(m){var g=o.slice(0,m.index).split("\n"),y=m[0].split("\n"),v=d+g.length,b=g[g.length-1].length;return{from:r(v,b),to:r(v+y.length-1,1==y.length?b+y[0].length:y[y.length-1].length),match:m}}}}function f(e,t,n,r){if(e.length==t.length)return n;for(var o=0,a=n+Math.max(0,e.length-t.length);;){if(o==a)return o;var i=o+a>>1,l=r(e.slice(0,i)).length;if(l==n)return i;l>n?a=i:o=i+1}}function p(e,o,a,i){if(!o.length)return null;var l=i?t:n,u=l(o).split(/\r|\n\r?/);e:for(var s=a.line,c=a.ch,d=e.lastLine()+1-u.length;s<=d;s++,c=0){var p=e.getLine(s).slice(c),h=l(p);if(1==u.length){var m=h.indexOf(u[0]);if(-1==m)continue e;return a=f(p,h,m,l)+c,{from:r(s,f(p,h,m,l)+c),to:r(s,f(p,h,m+u[0].length,l)+c)}}var g=h.length-u[0].length;if(h.slice(g)==u[0]){for(var y=1;y=d;s--,c=-1){var p=e.getLine(s);c>-1&&(p=p.slice(0,c));var h=l(p);if(1==u.length){var m=h.lastIndexOf(u[0]);if(-1==m)continue e;return{from:r(s,f(p,h,m,l)),to:r(s,f(p,h,m+u[0].length,l))}}var g=u[u.length-1];if(h.slice(0,g.length)==g){var y=1;for(a=s-u.length+1;y0);)r.push({anchor:o.from(),head:o.to()});r.length&&this.setSelections(r,0)}))}(n(1452))},function(e,t,n){!function(e){"use strict";function t(e){for(var t={},n=0;n*\/]/.test(n)?k(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?k("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?k(null,n):e.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(e.current().toLowerCase())&&(t.tokenize=C),k("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),k("property","word")):k(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),k("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?k("variable-2","variable-definition"):k("variable-2","variable")):e.match(/^\w+-/)?k("meta","meta"):void 0}function S(e){return function(t,n){for(var r,o=!1;null!=(r=t.next());){if(r==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==r}return(r==e||!o&&")"!=e)&&(n.tokenize=null),k("string","string")}}function C(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=S(")"),k(null,"(")}function E(e,t,n){this.type=e,this.indent=t,this.prev=n}function M(e,t,n,r){return e.context=new E(n,t.indentation()+(!1===r?0:i),e.context),n}function T(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function P(e,t,n){return D[n.context.type](e,t,n)}function x(e,t,n,r){for(var o=r||1;o>0;o--)n.context=n.context.prev;return P(e,t,n)}function j(e){var t=e.current().toLowerCase();a=y.hasOwnProperty(t)?"atom":g.hasOwnProperty(t)?"keyword":"variable"}var D={top:function(e,t,n){if("{"==e)return M(n,t,"block");if("}"==e&&n.context.prev)return T(n);if(_&&/@component/i.test(e))return M(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return M(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return M(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return M(n,t,"at");if("hash"==e)a="builtin";else if("word"==e)a="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return M(n,t,"interpolation");if(":"==e)return"pseudo";if(v&&"("==e)return M(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return f.hasOwnProperty(r)?(a="property","maybeprop"):p.hasOwnProperty(r)?(a=w?"string-2":"property","maybeprop"):v?(a=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(a+=" error","maybeprop")}return"meta"==e?"block":v||"hash"!=e&&"qualifier"!=e?D.top(e,t,n):(a="error","block")},maybeprop:function(e,t,n){return":"==e?M(n,t,"prop"):P(e,t,n)},prop:function(e,t,n){if(";"==e)return T(n);if("{"==e&&v)return M(n,t,"propBlock");if("}"==e||"{"==e)return x(e,t,n);if("("==e)return M(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)j(t);else if("interpolation"==e)return M(n,t,"interpolation")}else a+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?T(n):"word"==e?(a="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?x(e,t,n):")"==e?T(n):"("==e?M(n,t,"parens"):"interpolation"==e?M(n,t,"interpolation"):("word"==e&&j(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(a="variable-3",n.context.type):P(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&u.hasOwnProperty(t.current())?(a="tag",n.context.type):D.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return M(n,t,"atBlock_parens");if("}"==e||";"==e)return x(e,t,n);if("{"==e)return T(n)&&M(n,t,v?"block":"top");if("interpolation"==e)return M(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();a="only"==r||"not"==r||"and"==r||"or"==r?"keyword":s.hasOwnProperty(r)?"attribute":c.hasOwnProperty(r)?"property":d.hasOwnProperty(r)?"keyword":f.hasOwnProperty(r)?"property":p.hasOwnProperty(r)?w?"string-2":"property":y.hasOwnProperty(r)?"atom":g.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?x(e,t,n):"{"==e?T(n)&&M(n,t,v?"block":"top",!1):("word"==e&&(a="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?T(n):"{"==e||"}"==e?x(e,t,n,2):D.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?M(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(a="variable","restricted_atBlock_before"):P(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,T(n)):"word"==e?(a="@font-face"==n.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(a="variable","keyframes"):"{"==e?M(n,t,"top"):P(e,t,n)},at:function(e,t,n){return";"==e?T(n):"{"==e||"}"==e?x(e,t,n):("word"==e?a="tag":"hash"==e&&(a="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?T(n):"{"==e||";"==e?x(e,t,n):("word"==e?a="variable":"variable"!=e&&"("!=e&&")"!=e&&(a="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new E(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||O)(e,t);return n&&"object"==typeof n&&(o=n[1],n=n[0]),a=n,"comment"!=o&&(t.state=D[t.state](o,e,t)),a},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),o=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(o=Math.max(0,n.indent-i)):o=(n=n.prev).indent),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],r=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(o),i=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme"],l=t(i),u=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],s=t(u),c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],d=t(c),f=["border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],p=t(f),h=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),m=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),g=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],y=t(g),v=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=t(v),_=n.concat(o).concat(i).concat(u).concat(c).concat(f).concat(g).concat(v);function w(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.registerHelper("hintWords","css",_),e.defineMIME("text/css",{documentTypes:r,mediaTypes:a,mediaFeatures:l,mediaValueKeywords:s,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:y,valueKeywords:b,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w,w(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:l,mediaValueKeywords:s,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:y,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w,w(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:l,mediaValueKeywords:s,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:y,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=w,w(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:a,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:y,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=w,w(e,t))}},name:"css",helperType:"gss"})}(n(1452))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=D(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=j(n(13)),i=j(n(5)),l=j(n(10)),u=j(n(31)),s=j(n(11)),c=j(n(1)),d=j(n(8)),f=j(n(41)),p=j(n(14)),h=j(n(36)),m=j(n(84)),g=n(607),y=j(n(4)),v=j(n(6)),b=j(n(2)),_=j(n(17)),w=j(n(39)),k=j(n(15)),O=j(n(775)),S=j(n(776)),C=j(n(788)),E=j(n(787)),M=j(n(1687)),T=j(n(1688)),P=j(n(1454)),x=j(n(277));function j(e){return e&&e.__esModule?e:{default:e}}function D(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(D=function(e){return e?n:t})(e)}function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],r=(0,c.default)(t.getTabs(),"".concat(e,".controls"),{});if(!n)return r;var o={};return(0,d.default)(r,(function(e,t){(0,l.default)(e.main_tab_setting)||"on"!==e.main_tab_setting||(o[t]=e)})),(0,y.default)(o)?r:o})),V(I(t),"getSettings",(function(){return(0,p.default)(t.getTabs()).reduce((function(e,n){return N(N({},e),t.getTabSettings(n))}),{})})),V(I(t),"getSetting",(function(e){return(0,c.default)(t.getSettings(),e)})),V(I(t),"isTabModified",(function(e){return(0,p.default)(t.getTabSettings(e,!0)).reduce((function(e,n){return e||t.isSettingModified(n)}),!1)})),V(I(t),"isModified",(function(){return(0,p.default)(t.getTabs()).reduce((function(e,n){return e||t.isTabModified(n)}),!1)})),V(I(t),"handleTabHover",(function(e,n,r,o){var a={fieldName:(0,p.default)((0,c.default)(t.props.composite_structure,[n,"controls"],[])).join(" "),fieldLabel:r||o,fieldType:"composite_tab",toggleId:t.props.toggle_slug,toggleGroupId:t.props.tab_slug};if("enter"===e){var i=_.default.getFieldBaseName(t.props.name),l=N(N({},a),{fieldName:i,fieldLabel:t.props.label,fieldType:t.props.type});t.props.onMouseLeaveGroup(l),setTimeout((function(){t.props.onMouseEnterGroup(a)}))}else t.props.onMouseLeaveGroup(a)})),t.state={activeTabIndex:0},t._onChange=t._onChange.bind(I(t)),t._onClickReset=t._onClickReset.bind(I(t)),t._onTabChange=t._onTabChange.bind(I(t)),t}return t=j,n=[{key:"getModule",value:function(){return(0,c.default)(this,"props.module.props.module")}},{key:"getAttrs",value:function(){return(0,c.default)(this,"props.moduleAttrs",{})}},{key:"getFieldDefault",value:function(e){var t=this.getSetting(e),n=(0,h.default)(t,"default"),r=(0,h.default)(t,"default_from")&&!n?G((0,c.default)(this.getSettings(),H((0,c.default)(t,"default_from")))):void 0;return b.default.get(r,G(t))}},{key:"getDefault",value:function(e){var t=k.default.getFieldBaseName(e);_.default.isHoverMode()?t=_.default.getFieldBaseName(this.props.name):w.default.isStickyMode()&&(t=w.default.getFieldBaseName(this.props.name));var n=this.getSetting(t),r=this.getFieldDefault(t),o=(0,h.default)(n,"default"),a=(0,h.default)(n,"default_from")&&!o?H((0,c.default)(n,"default_from")):void 0,i=a?(0,c.default)(this.getAttrs(),a):void 0,l=_.default.isHoverMode()&&_.default.isEnabled(t,this.getAttrs()),u=w.default.isStickyMode()&&w.default.isEnabled(t,this.getAttrs()),s=b.default.get(i,b.default.get(r,""));if(k.default.isMobile(this.props,!1)&&!l&&!u){var d=k.default.isResponsiveEnabled(this.getAttrs(),k.default.getFieldBaseName(e)),f=n["default_".concat(this.props.activeTabMode)]||k.default.getDefaultValue(this.getAttrs(),"".concat(e,"_").concat(this.props.activeTabMode));return s=(0,c.default)(this.getAttrs(),"".concat(a,"_").concat(this.props.activeTabMode),s),d?f:(0,c.default)(this.getAttrs(),e,s)}return l?b.default.get((0,c.default)(n,"default__hover"),(0,c.default)(this.getAttrs(),t,s)):u?b.default.get((0,c.default)(n,"default__sticky"),(0,c.default)(this.getAttrs(),t,s)):s}},{key:"getValue",value:function(e){var t=this.getAttrs(),n=_.default.isHoverMode()&&_.default.isEnabled(e,t),r=w.default.isStickyMode()&&w.default.isEnabled(e,t),o=(0,c.default)(t,e,"");if(k.default.isMobile(this.props,!1)&&!n&&!r){var a=k.default.isResponsiveEnabled(t,e),i=k.default.getAnyValue(t,"".concat(e,"_").concat(this.props.activeTabMode));return a?i:""}return n?_.default.getHoverOrNormalOnHover(e,t):r?(0,c.default)(t,w.default.getStickyField(e),o):o}},{key:"isSettingModified",value:function(e){return""!==b.default.get(this.getValue(e),"")}},{key:"_onChange",value:function(e,t,n,r){var o=b.default.get(t,this.getDefault(e))===this.getDefault(e);this.props._onChange(e,t,n,r,o)}},{key:"_onClickReset",value:function(){var e=this;(0,p.default)(this.getSettings()).map((function(t){e._onChange(_.default.getHoverFieldOnHover(t,e.getAttrs()),"")})),this.setState({activeTabIndex:0})}},{key:"_onTabChange",value:function(e){this.setState({activeTabIndex:e})}},{key:"_renderTabPreviewArea",value:function(e){return!1}},{key:"_renderOutsidePreviewArea",value:function(){return!1}},{key:"_renderTabs",value:function(){var e=this,t=this.getModule(),n=this.getAttrs(),r=this.props.module._getOptionsFields("advanced"),d=[],p=this.props,m=p.name,y=p.label;return o.default.createElement(M.default,{_onTabChange:this._onTabChange,activeTab:this.state.activeTabIndex},(0,u.default)(this.props.composite_structure,(function(p,M){return o.default.createElement(T.default,{icon:p.icon,key:M,isModified:e.isTabModified(M),label:p.label,tooltip:p.tooltip,tabName:M,handleTabHover:e.handleTabHover},e._renderTabPreviewArea(p),(0,u.default)(p.controls,(function(u,p){var M=w.default.isStickyMode()&&w.default.isEnabled(p,n)?w.default.getStickyField(p,n):_.default.getHoverFieldOnHover(p,n),T=u;u.name=M;var j={};if((0,l.default)(u.type)||!P.default.getControl(u.type))return!1;if("top_divider_style"===M&&(j.dividerFlip=n.top_divider_flip),"bottom_divider_style"===M&&(j.dividerFlip=n.bottom_divider_flip),!(0,l.default)(u.depends_on)&&!e.props.module._isVisible(M,r))return d.push(M),!1;if(!((0,l.default)(u.show_if)&&(0,l.default)(u.show_if_not)||(0,g.canShowField)(u,e.props.setting_resolver)))return d.push(M),!1;if(!(0,l.default)(u.depends_on)&&(0,f.default)(u.depends_on,intersection(u.depends_on,d)))return!1;if(!e.props.module._isOptionMatchesFilter(u.label,u.description,e.props.label))return!1;var D,L=_.default.getFieldBaseName(p),A=!(0,l.default)(u.description)&&""!==u.description,R=(0,c.default)(u,"context_menu",!0),B=k.default.isResponsiveEnabled(n,L),F=w.default.doesSupport(u)&&w.default.hasStickyOptions((0,c.default)(t,"props",{})),I=(0,l.default)(u.label)||""===u.label?"":o.default.createElement(O.default,{name:M,key:"general-form-label-".concat(e.props.uniqueKey,"-").concat(_.default.getFieldBaseName(M)),onClickHelp:!!A&&e.props.onClickHelp,activeHelp:e.props.isDescriptionVisible(M),hoveredGroup:e.props.isHoveredGroup(M),hasHoverOptions:_.default.doesSupport(u),hasStickyOptions:F,onClickResponsive:e.props.onClickResponsive,hasResponsiveOptions:u.mobile_options,activeHover:_.default.isEnabled(M,n),activeSticky:w.default.isEnabled(M,n),onClickHover:!!_.default.hasTabs(u)&&e.props.onClickHover,onClickSticky:!!F&&e.props.onClickSticky,onClickReset:e.props.onClickReset,isResetActive:e.props.isResetActive(u),isResponsiveEnabled:B,onToggleRightMenu:!!R&&e.props.onToggleRightMenu},u.label),W=A?o.default.createElement(S.default,{active:e.props.isDescriptionVisible(M),key:"general-form-description-".concat(e.props.uniqueKey,"-").concat(M)},u.description):"",V=(0,a.default)("et-fb-settings-options","et-fb-option--".concat(u.type.replace("_","-"))),H="",G={};if(u.mobile_options&&(0,i.default)(["custom_margin","custom_padding"],u.type)){var U=(0,c.default)(n,"".concat(M,"_last_edited"),""),z=(0,l.default)(U)?["off","desktop"]:U.split("|"),q=b.default.hasValue(n[M])?n[M]:"",K=(0,c.default)(n,"".concat(M,"_tablet"),""),$=(0,c.default)(n,"".concat(M,"_phone"),"");if(K&&!(0,h.default)(u,"default_phone")&&(u.default_phone=K),K||!(0,h.default)(u,"default_tablet")||(0,h.default)(u,"default_phone")||(u.default_phone=u.default_tablet),q&&((0,h.default)(u,"default_tablet")||(u.default_tablet=q),(0,h.default)(u,"default_phone")||(u.default_phone=q)),!(0,l.default)(u.default_from)){var Y=u.default_from.split(".").pop(),X=(0,c.default)(n,"".concat(Y),"");""!==X&&(0,l.default)(u.default)&&(u.default=X);var J=(0,c.default)(n,"".concat(Y,"_tablet"),"");""!==J&&(u.default_tablet=J);var Q=(0,c.default)(n,"".concat(Y,"_phone"),"");""!==Q&&(u.default_phone=Q)}D={desktop:q,tablet:K,phone:$,isResponsive:B,activeTab:z[1]},H=v.default.getPreviewMode()}else if(u.mobile_options){var Z=e.props.activeTabMode,ee=B,te=(0,i.default)(["tablet","phone"],Z)&&ee,ne=te?"_".concat(Z):"";H=v.default.getPreviewMode();var re=(0,c.default)(n,M,""),oe=(0,c.default)(n,"".concat(M,"_tablet"),"");(0,c.default)(n,"".concat(M,"_phone"),""),""===re&&!(0,l.default)(u.default_from)&&te&&(re=(0,c.default)(n,u.default_from.split(".").pop(),"")),oe&&!(0,h.default)(u,"default_phone")&&(u.default_phone=oe),oe||!(0,h.default)(u,"default_tablet")||(0,h.default)(u,"default_phone")||(u.default_phone=u.default_tablet),re&&((0,h.default)(u,"default_tablet")||(u.default_tablet=re),(0,h.default)(u,"default_phone")||(u.default_phone=re)),D=te?(0,c.default)(n,"".concat(u.name).concat(ne),""):re,te&&(G.default=(0,c.default)(u,"default".concat(ne),(0,c.default)(u,"default","")),G.name="".concat(u.name).concat(ne),G.baseName=u.name,"yes_no_button"===u.type?G.defaultValue=G.default:"background-field"===u.type?G.name=void 0:"multiple_buttons"===u.type&&u.toggleable&&u.multi_selection&&(G.emptyMobileNone=!0))}else D=(0,c.default)(n,M,e.getDefault(p));var ae={slug:u.type,type:"field"},ie=u.mobile_options&&B||_.default.hasTabs(u)&&_.default.isEnabled(L,n)||F&&w.default.isEnabled(L,n)?o.default.createElement(x.default,null,o.default.createElement(C.default,{module:e.getModule(),moduleAttrs:n,fieldName:L,activeTabMode:e.props.activeTabMode,isGlobalPresetsMode:e.props.isGlobalPresetsMode,isResponsiveEnabled:B,isHoverEnabled:_.default.isEnabled(L,n),isStickyEnabled:F&&w.default.isEnabled(L,n),isItemSelected:e.props.isItemSelected})):"",le={fieldName:M,fieldLabel:u.label,fieldType:u.type,toggleId:e.props.toggle_slug,toggleGroupId:e.props.tab_slug,fieldContextMenu:R},ue=N(N({},le),{fieldName:m,fieldLabel:y});return o.default.createElement(E.default,{name:M,key:"advanced-form-group-".concat(e.props.uniqueKey,"-").concat(_.default.getFieldBaseName(M)),onMouseEnterGroup:function(){e.props.onMouseEnterGroup(le)},onMouseLeaveGroup:function(){e.props.onMouseLeaveGroup(le),e.props.onMouseEnterGroup(ue)},isSelectiveSyncAvailable:e.props.isSelectiveSyncAvailable(),isGlobalOptionSynced:e.props.isGlobalOptionSynced(M),_unsyncGlobalSetting:e.props._unsyncGlobalSetting,className:e.props.productTourClass},I,ie,W,o.default.createElement("div",{className:V,key:"et-fb-option-advanced_".concat(e.props.uniqueKey,"-").concat(M)},o.default.createElement("div",{className:"et-fb-option-container",key:"et-fb-option-container-".concat(e.props.uniqueKey,"-").concat(M)},(0,o.createElement)(P.default.getControl(u.type),(0,s.default)({key:"".concat(e.props.uniqueKey,"-").concat(M),value:D,module:e.props.module,name:M,resetValue:!1,_onChange:e._onChange,visible:!0,previewMode:H,animate:e.props.animate,additionalProps:j,isResponsive:B,activeTabMode:e.props.activeTabMode,fieldDefinition:T,matching:ae},u,{default:e.getDefault(p)},G)))))})))})))}},{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.label,a=!1;if((0,d.default)(this.props.composite_structure,(function(t){(0,d.default)(t.controls,(function(t){if(!(0,l.default)(t.type)&&P.default.getControl(t.type))return e.props.module._isOptionMatchesFilter(t.label,t.description,e.props.label)?(a=!0,!1):void 0}))})),!a)return!1;var i=_.default.getFieldBaseName(n),u=this.props.isHoveredGroup(i),s=!(0,l.default)(this.props.description)&&""!==this.props.description,f=(0,c.default)(this.props,"context_menu",!0),p=(0,l.default)(r)||""===r?"":o.default.createElement(O.default,{name:n,onClickHelp:!!s&&this.props.onClickHelp,key:"advanced-form-label-".concat(this.props.uniqueKey),isResetActive:this.isModified(),onClickReset:this._onClickReset,onClickHover:this.props.onClickHover,activeHover:this.props.activeHover,hoveredGroup:u,onToggleRightMenu:!!f&&this.props.onToggleRightMenu},r),h=!1===this.props.activeHover?"":o.default.createElement(x.default,null,o.default.createElement(C.default,{module:this.getModule(),moduleAttrs:this.getAttrs(),fieldName:this.props.name,activeTabMode:this.props.activeTabMode,isGlobalPresetsMode:this.props.isGlobalPresetsMode,isHoverEnabled:this.props.activeHover,isItemSelected:this.props.isItemSelected})),m=s?o.default.createElement(S.default,{active:this.props.isDescriptionVisible(n),key:"general-form-description-".concat(n)},this.props.description):"",g=this.props.name,y={fieldName:i,fieldLabel:r,fieldType:this.props.type,toggleId:this.props.toggleId,toggleGroupId:this.props.toggleGroupId,fieldContextMenu:f};return o.default.createElement(E.default,{name:g,key:"advanced-form-group-".concat(this.props.uniqueKey,"-").concat(g),onMouseEnterGroup:function(){return e.props.onMouseEnterGroup(y)},onMouseLeaveGroup:function(){return e.props.onMouseLeaveGroup(y)}},p,h,m,this._renderOutsidePreviewArea(),this._renderTabs())}}],n&&A(t.prototype,n),r&&A(t,r),j}(o.default.Component),z=U;t.default=z},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.emptyOnDefault=t.getInputs=t.getCounters=t.getTrackWidth=t.hasTrack=t.getEndLimitTitle=t.getStartLimitTitle=t.getMaxBoundClass=t.getMinBoundClass=t.isMaxBound=t.isMinBound=t.isSingle=void 0;var o=n(355),a=n(1712),i=n(108),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(1455)),u=n(1514);function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var c=function(e){return(0,o.getStartMiddle)(e)===(0,o.getEndMiddle)(e)};t.isSingle=c;var d=function(e){return(0,o.getStartLimit)(e)===(0,o.getEndMiddle)(e)};t.isMinBound=d;var f=function(e){return(0,o.getEndLimit)(e)===(0,o.getStartMiddle)(e)};t.isMaxBound=f;t.getMinBoundClass=function(e){return d(e)?l.atMinBound:""};t.getMaxBoundClass=function(e){return f(e)?l.atMaxBound:""};t.getStartLimitTitle=function(e){return(0,o.getStartLimit)(e)>(0,o.getStartLimit)((0,o.getDefaultValue)())?"".concat((0,o.getStartLimit)(e),"%"):""};t.getEndLimitTitle=function(e){return(0,o.getEndLimit)(e)<(0,o.getEndLimit)((0,o.getDefaultValue)())?"".concat((0,o.getEndLimit)(e),"%"):""};t.hasTrack=function(e){return!c(e)};t.getTrackWidth=function(e){return(0,o.getEndMiddle)(e)-(0,o.getStartMiddle)(e)};t.getCounters=function(e,t){var n=Math.round((0,i.getAmount)(1,t)),r=function(e){return n*e},l=(0,o.getStartLimit)(e),s=(0,o.getEndLimit)(e),d=c(e)?[l,(0,o.getStartMiddle)(e),s]:[l,(0,o.getStartMiddle)(e),(0,o.getEndMiddle)(e),s];return(0,o.getStartLimit)((0,o.getDefaultValue)())===l&&d.shift(),(0,o.getEndLimit)((0,o.getDefaultValue)())===s&&d.pop(),(0,a.groupBy)((function(e,t){return r(t)-r(e)<=u.counterWidth}),d)};t.getInputs=function(e,t){var n=Math.round((0,i.getAmount)(1,t)),r=function(e){return n*e},l=[(0,o.getStartLimit)(e),(0,i.average)([(0,o.getEndMiddle)(e),(0,o.getStartMiddle)(e)]),(0,o.getEndLimit)(e)];return(0,a.groupBy)((function(e,t){return r(t)-r(e)<=56}),l)};t.emptyOnDefault=function(e,t,n){if(""===n)return"";var r=e(n);return e(t)===r?"":r}},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var u=i?Object.getOwnPropertyDescriptor(e,l):null;u&&(u.get||u.set)?Object.defineProperty(o,l,u):o[l]=e[l]}o.default=e,n&&n.set(e,o);return o}(n(0));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:a,t=arguments[1];switch(t.type){case o.BEGIN_DRAG:return{initialSourceClientOffset:t.sourceClientOffset,initialClientOffset:t.clientOffset,clientOffset:t.clientOffset};case o.HOVER:return i(e.clientOffset,t.clientOffset)?e:r({},e,{clientOffset:t.clientOffset});case o.END_DRAG:case o.DROP:return a;default:return e}},t.getSourceClientOffset=function(e){var t=e.clientOffset,n=e.initialClientOffset,r=e.initialSourceClientOffset;if(!t||!n||!r)return null;return{x:t.x+r.x-n.x,y:t.y+r.y-n.y}},t.getDifferenceFromInitialOffset=function(e){var t=e.clientOffset,n=e.initialClientOffset;if(!t||!n)return null;return{x:t.x-n.x,y:t.y-n.y}};var o=n(1462),a={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function i(e,t){return e===t||e&&t&&e.x===t.x&&e.y===t.y}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,a.default)(e)?e.some((function(e){return e===t})):e===t};var r,o=n(3),a=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments[1],t=arguments[2];switch(e.type){case a.HOVER:break;case i.ADD_SOURCE:case i.ADD_TARGET:case i.REMOVE_TARGET:case i.REMOVE_SOURCE:return u;case a.BEGIN_DRAG:case a.PUBLISH_DRAG_SOURCE:case a.END_DRAG:case a.DROP:default:return s}var n=e.targetIds,o=t.targetIds,l=(0,r.default)(n,o),c=!1;if(0===l.length){for(var d=0;d0};var r=l(n(817)),o=l(n(178)),a=n(1462),i=n(1463);function l(e){return e&&e.__esModule?e:{default:e}}var u=[],s=[]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSafari=t.isFirefox=void 0;var r,o=n(143),a=(r=o)&&r.__esModule?r:{default:r};t.isFirefox=(0,a.default)((function(){return/firefox/i.test(navigator.userAgent)})),t.isSafari=(0,a.default)((function(){return Boolean(window.safari)}))},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=s(n(0)),a=s(n(7)),i=n(1469),l=s(n(1570)),u=s(n(19));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if((0,o.isValidElement)(t)){var r=t;l(r);var a=n?function(t){return e(t,n)}:e;return(0,i.default)(r,a)}e(t,n)}}(e[n]);t[n]=function(){return r}})),t};var r,o=n(0),a=n(1564),i=(r=a)&&r.__esModule?r:{default:r};function l(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors.You can either wrap "+t+" into a
, or turn it into a drag source or a drop target itself.")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t===e)return!0;return null!==t&&null!==e&&(0,a.default)(t,e)};var r,o=n(1470),a=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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};t.default=function e(t,n){return"string"==typeof t||"symbol"===(void 0===t?"undefined":r(t))||n&&(0,i.default)(t)&&t.every((function(t){return e(t,!1)}))};var o,a=n(3),i=(o=a)&&o.__esModule?o:{default:o}},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=O(n(0)),a=w(n(7)),i=w(n(13)),l=w(n(8)),u=w(n(1)),s=w(n(5)),c=w(n(4)),d=w(n(34)),f=w(n(12)),p=w(n(131)),h=w(n(68)),m=w(n(63)),g=w(n(22)),y=w(n(325)),v=O(n(2)),b=w(n(448)),_=w(n(803));function w(e){return e&&e.__esModule?e:{default:e}}function k(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(k=function(e){return e?n:t})(e)}function O(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=k(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function S(){return S=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"";return g.default.getI18n(e,t)}n(1585);var N=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&T(e,t)}(w,e);var t,n,r,a=P(w);function w(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,w),(t=a.call(this,e)).state={colorPicker:!1},t.edges=["colorStart","colorEnd"],t.colorPickerLastActive="colorStart",t._classNameBase="et-fb-settings-option-color-gradient",t._wrapperRef=o.default.createRef(),t._onClickButton=t._onClickButton.bind(j(t)),t._onClickPreviewCanvas=t._onClickPreviewCanvas.bind(j(t)),t._onClickPreviewAddButton=t._onClickPreviewAddButton.bind(j(t)),t._onClickPreviewRemoveButton=t._onClickPreviewRemoveButton.bind(j(t)),t._onClickPreviewSwapButton=t._onClickPreviewSwapButton.bind(j(t)),t._onClickPreviewResetButton=t._onClickPreviewResetButton.bind(j(t)),t._onChangeColorPicker=t._onChangeColorPicker.bind(j(t)),t._onClearColorPicker=t._onClearColorPicker.bind(j(t)),t._onCloseColorPicker=t._onCloseColorPicker.bind(j(t)),t._setColorPickerState=t._setColorPickerState.bind(j(t)),t._onSelectColorManagerPalette=t._onSelectColorManagerPalette.bind(j(t)),t._onMouseEnterPreview=t._onMouseEnterPreview.bind(j(t)),t._onMouseLeavePreview=t._onMouseLeavePreview.bind(j(t)),t._onMouseEnterButton=t._onMouseEnterButton.bind(j(t)),t._onMouseLeaveButton=t._onMouseLeaveButton.bind(j(t)),t._emitChange=t._emitChange.bind(j(t)),t}return t=w,n=[{key:"_onClickButton",value:function(e){e.preventDefault();var t=e.currentTarget.getAttribute("data-index"),n=this.state.colorPicker;t===n?(this.colorPickerLastActive=n,this.setState({colorPicker:!1})):this.setState({colorPicker:t})}},{key:"_onClickPreviewCanvas",value:function(){this.props.readonly||((0,c.default)(this._getValue())?this._onClickPreviewAddButton():this.setState({colorPicker:this.colorPickerLastActive||"colorStart"}))}},{key:"_onClickPreviewAddButton",value:function(){this.props.readonly||this._emitChange("on")}},{key:"_normalizeColor",value:function(e){return(0,m.default)(e,"gcid-")?e:b.default.normalize(e)}},{key:"_onClickPreviewSwapButton",value:function(){this._emitChange({colorEnd:this._normalizeColor(this._getValue("colorStart")),colorStart:this._normalizeColor(this._getValue("colorEnd"))})}},{key:"_onClickPreviewRemoveButton",value:function(){this._emitChange("off")}},{key:"_onClickPreviewResetButton",value:function(){this._emitChange()}},{key:"_onChangeColorPicker",value:function(e,t){t&&!this.props.readonly&&this._emitChange(E({},t,this._normalizeColor(e)))}},{key:"_onClearColorPicker",value:function(e){this._onChangeColorPicker("",e)}},{key:"_onCloseColorPicker",value:function(){var e=this.state.colorPicker;this.colorPickerLastActive=e,this.setState({colorPicker:!1})}},{key:"_onSelectColorManagerPalette",value:function(e,t){t&&!this.props.readonly&&this._emitChange(E({},t,this._normalizeColor(e)))}},{key:"_onMouseEnterPreview",value:function(){var e=this.props,t=e.name,n=e._onMouseEnterPreview,r=e._onMouseEnter;(0,d.default)(n)&&n(t),(0,d.default)(r)&&r(t,"preview")}},{key:"_onMouseLeavePreview",value:function(){var e=this.props,t=e.name,n=e._onMouseLeavePreview,r=e._onMouseLeave;(0,d.default)(n)&&n(t),(0,d.default)(r)&&r(t,"preview")}},{key:"_onMouseEnterButton",value:function(e){var t=this.props,n=t.name,r=t._onMouseEnterButtonColorStart,o=t._onMouseEnterButtonColorEnd,a=t._onMouseEnterButton,i=t._onMouseEnter,l=e.currentTarget.getAttribute("data-index");"colorStart"===l&&(0,d.default)(r)?r(n):"colorEnd"===l&&(0,d.default)(o)&&o(n),(0,d.default)(a)&&a(n,l),(0,d.default)(i)&&i(n,l)}},{key:"_onMouseLeaveButton",value:function(e){var t=this.props,n=t.name,r=t._onMouseLeaveButtonColorStart,o=t._onMouseLeaveButtonColorEnd,a=t._onMouseLeaveButton,i=t._onMouseLeave,l=e.currentTarget.getAttribute("data-index");"colorStart"===l&&(0,d.default)(r)&&r(n),"colorEnd"===l&&(0,d.default)(o)&&o(n),(0,d.default)(a)&&a(n,l),(0,d.default)(i)&&i(n,l)}},{key:"_emitChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.props,r=n.name,o=n._onChange,a=t||r;(0,d.default)(o)&&o(a,e)}},{key:"isEdgeValueChanged",value:function(e,t){var n=this;return(0,h.default)(this.edges,(function(r){var o=n._normalizeColor((0,u.default)(e,r)),a=n._normalizeColor((0,u.default)(t,r)),i=n._normalizeColor((0,u.default)(v.default.gradientDefault(),r)),l=(0,v.hasValue)(a);return!(!l||o===a)||!l&&o!==i}))}},{key:"_getValue",value:function(e){var t=this.props.value;return e?(0,u.default)(t,e):t}},{key:"_getDefaultValue",value:function(e){var t=this.props.defaultValue;return e?(0,u.default)(t,e):t}},{key:"_getClassName",value:function(e){return e?"".concat(this._classNameBase,"-").concat(e):this._classNameBase}},{key:"_getPreviewStyle",value:function(){var e=this,t=this._getValue();if((0,c.default)(t)||!(0,f.default)(t))return{};var n={};return(0,l.default)(t,(function(t,r){(0,c.default)(t)&&(0,s.default)(e.edges,r)?n[r]=b.default.transparent:n[r]=y.default.getColorValue(t)||t})),{backgroundImage:v.default.getGradient(n)}}},{key:"_setColorPickerState",value:function(e){this.setState({colorPicker:e})}},{key:"_renderColorGradientShared",value:function(){var e=this.state.colorPicker,t=this.props,n=t.readonly,r=t.showPalettes,a=t.hideAddButton,i=t.disableCurrent,l=t.hideSwapButton,u=t.hideResetButton,s=t.hasColorManager,d=t.hideRemoveButton,f=(0,p.default)(function(e){for(var t=1;t.1&&parseFloat(e)%1>0&&this.setState({rangeStep:"0.1"}),this.checkRangeBoundaries(this.state.value)},componentDidUpdate:function(e){(this.props.previewMode&&this.props.previewMode!==e.previewMode||this.state.value!==e.value)&&this.setState({value:this.emptyIfDefault(this.getCurrentInputValue())})},componentWillUnmount:function(){this.deferredUpdate.cancel()},_calculatePreviewMode:function(){var e=w.default.getPreviewMode();return"zoom"===e?"desktop":"wireframe"===e?"wireframe":P},getCurrentInputValue:function(){var e=this.props.value;if((0,f.default)(this.props.isTransformOrigin)){if("50%"===this.props.value)return"center";if("x"===this.props.isTransformOrigin){if("0%"===this.props.value)return"left";if("100%"===this.props.value)return"right"}else if("y"===this.props.isTransformOrigin){if("0%"===this.props.value)return"top";if("100%"===this.props.value)return"bottom"}}return(0,s.default)(e)||(0,y.default)(e)||(0,g.default)(e)?"":e},getDefaultValue:function(){var e=(0,m.default)(this,"props.allow_empty",!1)?void 0:0,t=(0,m.default)(this,"props.additionalAttrs.getDefaultFrom",!1),n=(0,m.default)(this,"props.default_values_mapping",!1),r=S.default.isMobile(this.props),o=this.props.default;return t&&n&&!r&&(o=(0,m.default)(n,t,o)),b.default.hasValue(o)?o:e},getDefaultUnit:function(){return(0,k.getUnit)(this.getDefaultValue())},emptyIfDefault:function(e){return e===this.getDefaultValue()?"":e},isFixedUnit:function(){return b.default.hasValue(this.props.fixed_unit)},isAllowedUnit:function(){return b.default.hasValue(this.props.allowed_units)&&(0,d.default)(this.props.allowed_units)},isValidateUnit:function(){return!1!==this.props.validate_unit},validateValue:function(e){if((0,p.default)(this.props.allowed_values,e))return e;var t=this.props.value||this.props.default,n=k.default.getUnit(this.isChangingRange?t:e,this.props.default_unit);this.isAllowedUnit()&&!(0,p.default)(this.props.allowed_units,n)&&(n=this.props.default_unit||"px");var r=this.isFixedUnit()?this.props.fixed_unit:n,o=this.isValidateUnit()&&!0!==this.props.unitless?r:"";return k.default.sanitizeInputUnit((0,h.default)(parseFloat(e)),!1,o)},reset:function(e){e.preventDefault(),this.updateOptionAndState("")},onRangeFocus:function(){this.setState({rangeFocus:!0})},onRangeBlur:function(){this.setState({rangeFocus:!1})},inputsWrap:function(){var e="et-fb-".concat(this.props.name),t=this.props.name,n=(0,s.default)(this.getDefaultValue())?"0":this.validateValue(this.getDefaultValue()),r=this.validateValue(this.getCurrentInputValue())===n?"":this.validateValue(this.getCurrentInputValue()),a=""===r?n:r;if((0,f.default)(this.props.isTransformOrigin))switch(r){case"center":a=50;break;case"top":case"left":a=0;break;case"right":case"bottom":a=100}var i={};b.default.hasValue(this.getRangeSettings().min_limit)&&(i.min=parseFloat(this.getRangeSettings().min_limit)),b.default.hasValue(this.getRangeSettings().max_limit)&&(i.max=parseFloat(this.getRangeSettings().max_limit)),isNaN(parseFloat(a))&&(a=this.state.rangeMax);var l={};return l.onInput=this._updateFromRange,l.onChange=u.default,o.default.createElement("div",{className:"et-fb-settings-option-inputs-wrap"},o.default.createElement("input",M({id:e,name:t,type:"range",min:this.state.rangeMin,max:this.state.rangeMax,step:this.getRangeStep(),className:"et-fb-range",value:parseFloat(a),"data-shortcuts-allowed":!0},l,{onFocus:this.onRangeFocus,onBlur:this.onRangeBlur})),o.default.createElement("div",{className:"et-fb-range-number et-fb-settings-option-input"},o.default.createElement(O.default,M({id:"".concat(e,"-number")},i,{value:r,onChange:this._onChange,defaultValue:n,defaultUnit:this.getDefaultUnit(),step:parseFloat(this.getRangeSettings().step),precision:this.props.precision,isTransformOrigin:this.props.isTransformOrigin}))))},render:function(){var e=this.getDefaultValue(),t=this.props.value,n=this.inputsWrap();return!t||t===e||this.props.readonly||this.props.disableReset||o.default.createElement("button",{className:"et-fb-settings-option-button--reset",onClick:this.reset}),o.default.createElement("div",{className:(0,l.default)({"et-fb-settings-option-inner":!0,"et-fb-settings-option-inner-range":!0})},n)},updateOptionAndState:function(e){e=(0,s.default)(e)?this.state.value:e;var t=this.validateValue(e);this.setState({value:this.emptyIfDefault(t)}),this.props._onChange(this.props.name,t,this.props.type)},_updateFromRange:function(e){this.props.readonly||(this.isChangingRange=!0,this.updateOptionAndState(e.target.value),this.isChangingRange=!1)},_onChange:function(e){this.props.readonly||(this.updateOptionAndState(e),this.checkRangeBoundaries(e))},checkRangeBoundaries:function(e){if(b.default.hasValue(e)){var t=parseFloat(e);!b.default.hasValue(this.getRangeSettings().max_limit)&&t>this.state.rangeMax&&this.setState({rangeMax:t}),!b.default.hasValue(this.getRangeSettings().min_limit)&&t.1&&t%1>0?this.setState({rangeStep:"0.1"}):parseFloat(this.state.rangeStep)<1&&0==t%1&&this.setState({rangeStep:this.getRangeSettings().step})}},getRangeStep:function(){return parseFloat(this.state.rangeStep)*(this.state.rangeFocus&&(0,_.shiftKey)()?10:1)}});x.propTypes={default_unit:a.default.string,precision:a.default.number,name:a.default.string,value:a.default.oneOfType([a.default.string,a.default.object,a.default.array]),range_settings:a.default.object,mobile_options:a.default.bool,reset_animation:a.default.bool,previewMode:a.default.string,default:a.default.oneOfType([a.default.string,a.default.number]),default_tablet:a.default.string,default_phone:a.default.string,type:a.default.string,fixed_unit:a.default.string,validate_unit:a.default.bool,readonly:a.default.bool,_onChange:a.default.func,unitless:a.default.bool,isTransformOrigin:a.default.oneOfType([a.default.string,a.default.bool])},x.defaultProps={default_unit:"",allowed_values:[],isTransformOrigin:!1};var j=x;t.default=j},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(0)),o=d(n(265)),a=d(n(13)),i=d(n(16)),l=d(n(40)),u=d(n(10)),s=d(n(192)),c=d(n(1));d(n(19));function d(e){return e&&e.__esModule?e:{default:e}}function f(){return f=Object.assign||function(e){for(var t=1;t",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function o(e){return e&&e.bracketRegex||/[(){}[\]]/}function a(e,t,a){var l=e.getLineHandle(t.line),u=t.ch-1,s=a&&a.afterCursor;null==s&&(s=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=o(a),d=!s&&u>=0&&c.test(l.text.charAt(u))&&r[l.text.charAt(u)]||c.test(l.text.charAt(u+1))&&r[l.text.charAt(++u)];if(!d)return null;var f=">"==d.charAt(1)?1:-1;if(a&&a.strict&&f>0!=(u==t.ch))return null;var p=e.getTokenTypeAt(n(t.line,u+1)),h=i(e,n(t.line,u+(f>0?1:0)),f,p||null,a);return null==h?null:{from:n(t.line,u),to:h&&h.pos,match:h&&h.ch==d.charAt(0),forward:f>0}}function i(e,t,a,i,l){for(var u=l&&l.maxScanLineLength||1e4,s=l&&l.maxScanLines||1e3,c=[],d=o(l),f=a>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),p=t.line;p!=f;p+=a){var h=e.getLine(p);if(h){var m=a>0?0:h.length-1,g=a>0?h.length:-1;if(!(h.length>u))for(p==t.line&&(m=t.ch-(a<0?1:0));m!=g;m+=a){var y=h.charAt(m);if(d.test(y)&&(void 0===i||e.getTokenTypeAt(n(p,m+1))==i)){var v=r[y];if(v&&">"==v.charAt(1)==a>0)c.push(y);else{if(!c.length)return{pos:n(p,m),ch:y};c.pop()}}}}}return p-a!=(a>0?e.lastLine():e.firstLine())&&null}function l(e,r,o){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,l=[],u=e.listSelections(),s=0;s=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function u(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function s(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(l(e))continue;return}if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(u(e))continue;return}if(i(e,t+1)){o.lastIndex=t,e.ch=t;var n=o.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function d(e){for(;;){o.lastIndex=e.ch;var t=o.exec(e.text);if(!t){if(l(e))continue;return}if(i(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function f(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(u(e))continue;return}if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function p(e,n){for(var r=[];;){var o,a=d(e),i=e.line,l=e.ch-(a?a[0].length:0);if(!a||!(o=s(e)))return;if("selfClose"!=o)if(a[1]){for(var u=r.length-1;u>=0;--u)if(r[u]==a[2]){r.length=u;break}if(u<0&&(!n||n==a[2]))return{tag:a[2],from:t(i,l),to:t(e.line,e.ch)}}else r.push(a[2])}}function h(e,n){for(var r=[];;){var o=f(e);if(!o)return;if("selfClose"!=o){var a=e.line,i=e.ch,l=c(e);if(!l)return;if(l[1])r.push(l[2]);else{for(var u=r.length-1;u>=0;--u)if(r[u]==l[2]){r.length=u;break}if(u<0&&(!n||n==l[2]))return{tag:l[2],from:t(e.line,e.ch),to:t(a,i)}}}else c(e)}}e.registerHelper("fold","xml",(function(e,r){for(var o=new a(e,r.line,0);;){var i=d(o);if(!i||o.line!=r.line)return;var l=s(o);if(!l)return;if(!i[1]&&"selfClose"!=l){var u=t(o.line,o.ch),c=p(o,i[2]);return c&&n(c.from,u)>0?{from:u,to:c.from}:null}}})),e.findMatchingTag=function(e,r,o){var i=new a(e,r.line,r.ch,o);if(-1!=i.text.indexOf(">")||-1!=i.text.indexOf("<")){var l=s(i),u=l&&t(i.line,i.ch),d=l&&c(i);if(l&&d&&!(n(i,r)>0)){var f={from:t(i.line,i.ch),to:u,tag:d[2]};return"selfClose"==l?{open:f,close:null,at:"open"}:d[1]?{open:h(i,d[2]),close:f,at:"close"}:{open:f,close:p(i=new a(e,u.line,u.ch,o),d[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var o=new a(e,t.line,t.ch,n);;){var i=h(o,r);if(!i)break;var l=p(new a(e,t.line,t.ch,n),i.tag);if(l)return{open:i,close:l}}},e.scanForClosingTag=function(e,t,n,r){return p(new a(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(n(1452))},function(e,t,n){!function(e){function t(t,n,r){var o,a=t.getWrapperElement();return(o=a.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?o.innerHTML=n:o.appendChild(n),e.addClass(a,"dialog-opened"),o}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",(function(r,o,a){a||(a={}),n(this,null);var i=t(this,r,a.bottom),l=!1,u=this;function s(t){if("string"==typeof t)d.value=t;else{if(l)return;l=!0,e.rmClass(i.parentNode,"dialog-opened"),i.parentNode.removeChild(i),u.focus(),a.onClose&&a.onClose(i)}}var c,d=i.getElementsByTagName("input")[0];return d?(d.focus(),a.value&&(d.value=a.value,!1!==a.selectValueOnOpen&&d.select()),a.onInput&&e.on(d,"input",(function(e){a.onInput(e,d.value,s)})),a.onKeyUp&&e.on(d,"keyup",(function(e){a.onKeyUp(e,d.value,s)})),e.on(d,"keydown",(function(t){a&&a.onKeyDown&&a.onKeyDown(t,d.value,s)||((27==t.keyCode||!1!==a.closeOnEnter&&13==t.keyCode)&&(d.blur(),e.e_stop(t),s()),13==t.keyCode&&o(d.value,t))})),!1!==a.closeOnBlur&&e.on(i,"focusout",(function(e){null!==e.relatedTarget&&s()}))):(c=i.getElementsByTagName("button")[0])&&(e.on(c,"click",(function(){s(),u.focus()})),!1!==a.closeOnBlur&&e.on(c,"blur",s),c.focus()),s})),e.defineExtension("openConfirm",(function(r,o,a){n(this,null);var i=t(this,r,a&&a.bottom),l=i.getElementsByTagName("button"),u=!1,s=this,c=1;function d(){u||(u=!0,e.rmClass(i.parentNode,"dialog-opened"),i.parentNode.removeChild(i),s.focus())}l[0].focus();for(var f=0;f=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;nt.iconsBufferStepSize;t.setState({iconsBufferSize:n?t.iconsBufferStepSize:e.length,hasMoreIcons:n})})),D(x(t),"_onFilterDropdownToggle",(function(){t.setState({filterDropdownActive:!t.state.filterDropdownActive})})),D(x(t),"maybeCloseDropdown",(function(n){t.state.filterDropdownActive&&e(n.target).closest(".et-fb-options-filter-dropdown-wrap, .et-fb-options-filter-button-group").length<1&&t._onFilterDropdownToggle()})),D(x(t),"orderIconlist",(function(e,t){return(0,a.default)(e,[function(e){return 1e3*e.search_terms.toLowerCase().indexOf(t)+e.search_terms.length}])})),D(x(t),"increaseBufferSize",(function(){var e=t.state.iconsBufferSize+t.iconsBufferStepSize;e>t.state.fontIcons.length?t.setState({hasMoreIcons:!1,iconsBufferSize:t.state.fontIcons.length}):t.setState({iconsBufferSize:e})})),D(x(t),"_renderFilterOutput",(function(){var e=ETBuilderBackend.searchFilterIconItems,n={show_only:ETBuilderBackend.i18n.modals.show_only},r=t.state.filterSelected?t.state.filterSelected:void 0,o=(0,u.default)(e.show_only,r)?e.show_only[r]:r,a=!(0,i.default)(r),l=(0,i.default)(t.state.filterSelected)?d.default.createElement(v.default,{className:"et-fb-options-filter-button-group"},d.default.createElement(y.default,{_onClick:t._onFilterDropdownToggle},d.default.createElement(_.default,{icon:"add",color:a?w.default.white:w.default.shuttleGrey,size:"14"})),d.default.createElement(y.default,{_onClick:t._onFilterDropdownToggle},ETBuilderBackend.i18n.modals.filter)):d.default.createElement(v.default,{className:"et-fb-options-filter-button-group"},d.default.createElement(y.default,{_onClick:t._onFilterDropdownToggle},o),d.default.createElement(y.default,{_onClick:t._onFilterReset},d.default.createElement(_.default,{icon:"exit",color:a?w.default.white:w.default.shuttleGrey,size:"10"}))),s=t.props.dropDownClassName?t.props.dropDownClassName:"",c=!!t.state.filterDropdownActive&&d.default.createElement("div",{className:"et-fb-options-filter-dropdown-wrap et-fb-icons-filter-dropdown-wrap"},d.default.createElement(b.default,{value:r,name:s,options:e,optionGroups:n,__onChange:t._onFilterSelect,iconPickerMenuCustomStyling:t.props.iconPickerMenuCustomStyling,activeOnLoad:!0}));return d.default.createElement("div",{className:(0,f.default)({"et-fb-font-icon-filter":!0,"et-fb-options-filter--has-dropdown":!0})},d.default.createElement("div",{className:"et-fb-options-filter-input-wrap et-fb-icons-filter-input-wrap"},d.default.createElement(g.default,{type:"text",value:t.state.iconSearchString,name:"icons_filter",_onChange:t._onSearchInput,additional_attrs:{placeholder:ETBuilderBackend.i18n.modals.searchIcons}})),!!e&&d.default.createElement("div",{className:"et-fb-options-filter-button-wrap"},l),c)})),t}return n=P,(r=[{key:"componentWillUnmount",value:function(){m.default.topWindow().removeEventListener("mousedown",this.maybeCloseDropdown)}},{key:"processIconSearchTerm",value:function(e){return"undefined"==typeof search_word&&(0,o.default)(e.replace(/-/g," ")).toLowerCase()}},{key:"getFilteredSearchIcons",value:function(e,t){var n=this,r=ETBuilderBackend.fontIconsExtended;if(e=this.processIconSearchTerm(e),void 0!==t&&00&&void 0!==arguments[0]?arguments[0]:this.props,t="".concat(e.default).split("|"),n=t;return(0,f.hasValue)(e.value)&&(n="".concat(e.value).split("|")),t.forEach((function(e,t){(0,f.hasValue)(n[t])||(n[t]=e)})),n}},{key:"_getOption",value:function(e){return this.state.values[R(e).index]}},{key:"_getOptionDefault",value:function(e){return"".concat(this.props.default).split("|")[R(e).index]}},{key:"_sanitization",value:function(e,t){var n=this._getOptionDefault(t),r={value:parseFloat(n),unit:this.props.default_unit};if(!(0,f.hasValue)(e))return r;var o=isNaN(parseFloat(e))?parseFloat(n):parseFloat(e);switch(r.value=o,t){case"skew_x":case"skew_y":var a=this._getOption(t),i=isNaN(parseFloat(a))?o:parseFloat(a),u=0===Math.sign(i)?1:Math.sign(i),s=Math.abs(o);if(90===s){var c=Math.abs(i);c<90?r.value=91*u:c>=90&&(r.value=89*u)}s>180&&(r.value=180*u);break;case"rotate_x":case"rotate_y":case"rotate_z":r.value=o%360;break;default:r.unit=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"px",n=["em","rem","px","%","vw","vh"],r=(0,m.getUnit)(e,t);return(0,l.default)(n,r)?r:t}(e,this.props.default_unit)}return r}},{key:"_renderField",value:function(e){var t=R(e),n=!1;"origin"===t.type&&(n=t.axis);var r={name:e,type:"range",value:this._getOption(e),default:this._getOptionDefault(e),default_unit:this.props.default_unit,range_settings:this.props.range_settings,key:"".concat(this.props.name,"-").concat(e),_onChange:this._setOption,visible:!0,previewMode:"desktop",readonly:this.props.readonly,isTransformOrigin:n,allowed_values:!1!==n?["top","left","right","bottom","center"]:[]};return(0,o.createElement)(h.default.getControl("range"),r)}},{key:"render",value:function(){var e=this,t=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{minWidth:"25px",width:"25px",height:"25px",margin:"0",fill:e?g.default.info:g.default.default}},n=(0,f.hasValue)(this.props.transform_type)?this.props.transform_type:"".concat(e.props.name).replace(/(transform_|__hover|_tablet|_phone)/g,""),r={onMouseEnter:this._handleWrapperEnter,onMouseLeave:this._handleWrapperLeave};switch(n){case"scale":var a=this._getOption("scale_x"),i=this._getOption("scale_y"),l=this.props.scaleLinked?{display:"none"}:{},u={};return u=a?w(w({},u),{},{width:"".concat(D*parseFloat(a)/100,"px")}):u,u=i?w(w({},u),{},{height:"".concat(D*parseFloat(i)/100,"px")}):u,o.default.createElement("div",b({className:"et-fb-settings-transform-wrapper"},r),o.default.createElement(A,{onMouseLeave:this._handleMouseUp},o.default.createElement("div",{className:"et-fb-settings-transform-square",style:u},o.default.createElement("div",{className:"et-fb-settings-transform-square-half"},o.default.createElement("div",{className:"et-fb-settings-transform-controller","data-transform_type":"scale_xy",onMouseDown:this._handleOnMouseDown,style:{margin:"-8px",cursor:"nesw-resize"}},L("nesw")),o.default.createElement("div",{className:"et-fb-settings-transform-controller","data-transform_type":"scale_y",onMouseDown:this._handleOnMouseDown,style:w(w({},l),{},{marginTop:"-9px",marginLeft:"-2px",cursor:"ns-resize"})},L("ns")),o.default.createElement("div",null)),o.default.createElement("div",{className:"et-fb-settings-transform-square-half"},o.default.createElement("div",{className:"et-fb-settings-transform-controller","data-transform_type":"scale_x",onMouseDown:this._handleOnMouseDown,style:w(w({},l),{},{marginTop:"-7px",marginRight:"-9px",cursor:"ew-resize"})},L("ew"))))),o.default.createElement("div",{className:"et-fb-settings-transform-vertical-range"},this._renderField("scale_y")),o.default.createElement("div",{className:"et-fb-settings-transform-horizontal-range"},this._renderField("scale_x")),o.default.createElement("button",{disabled:(0,f.hasValue)(this.props.readonly),"data-linked_type":"scale",onClick:this._handleLinkedClick,className:"et-fb-settings-transform-linked"},o.default.createElement(p.default,{icon:this.props.scaleLinked?"linked":"unlinked",style:t(this.props.scaleLinked)})));case"skew":var s=this._getOption("skew_x"),c=this._getOption("skew_y"),d="";d+=s?"skewX(".concat(s,")"):d;var h={transform:d+=c?" skewY(".concat(c,")"):d},y=(parseFloat(s)+180)*this.state.containerDimensions.width/360,v=(parseFloat(c)+180)*this.state.containerDimensions.height/360,_=y-this.state.containerDimensions.width/2,k=v-this.state.containerDimensions.height/2;return o.default.createElement("div",b({className:"et-fb-settings-transform-wrapper"},r),o.default.createElement(A,{onMouseLeave:this._handleMouseUp},o.default.createElement("div",{className:"et-fb-settings-transform-square",style:h}),o.default.createElement("div",{className:"et-fb-settings-transform-square-transparent"},o.default.createElement("div",{className:"et-fb-settings-transform-square-half-skew"},o.default.createElement("div",{className:"et-fb-settings-transform-controller","data-transform_type":"skew_y",onMouseDown:this._handleOnMouseDown,style:{marginLeft:"-20px",marginBottom:"-6px",cursor:"ns-resize",transform:"translateY(".concat(-1*k,"px)")}},L("ns")),o.default.createElement("div",null)),o.default.createElement("div",{className:"et-fb-settings-transform-square-half-skew",style:{justifyContent:"center",alignItems:"flex-end"}},o.default.createElement("div",{className:"et-fb-settings-transform-controller","data-transform_type":"skew_x",onMouseDown:this._handleOnMouseDown,style:{marginBottom:"-20px",cursor:"ew-resize",transform:"translateX(".concat(_,"px)")}},L("ew"))))),o.default.createElement("div",{className:"et-fb-settings-transform-vertical-range"},this._renderField("skew_y")),o.default.createElement("div",{className:"et-fb-settings-transform-horizontal-range"},this._renderField("skew_x")),o.default.createElement("button",{disabled:(0,f.hasValue)(this.props.readonly),"data-linked_type":"skew",onClick:this._handleLinkedClick,className:"et-fb-settings-transform-linked"},o.default.createElement(p.default,{icon:this.props.skewLinked?"linked":"unlinked",style:t(this.props.skewLinked)})));case"translate":var O=300,S=180,C=parseFloat(this._getOption("translate_x")),E=parseFloat(this._getOption("translate_y")),M=(E+O)*S/600-90,T="";T+=C?"translateX(".concat((C+O)*S/600-90,"px)"):"";var P={transform:T+=E?" translateY(".concat(M,"px)"):""};return o.default.createElement("div",b({className:"et-fb-settings-transform-wrapper"},r),o.default.createElement(A,{onMouseLeave:this._handleMouseUp},o.default.createElement("option",{className:"et-fb-settings-transform-square-translate",style:P,"data-transform_type":"translate",onMouseDown:this._handleOnMouseDown})),o.default.createElement("div",{className:"et-fb-settings-transform-vertical-range et-fb-settings-transform-vertical-range-inverted"},this._renderField("translate_y")),o.default.createElement("div",{className:"et-fb-settings-transform-horizontal-range"},this._renderField("translate_x")),o.default.createElement("button",{disabled:(0,f.hasValue)(this.props.readonly),"data-linked_type":"translate",onClick:this._handleLinkedClick,className:"et-fb-settings-transform-linked"},o.default.createElement(p.default,{icon:this.props.translateLinked?"linked":"unlinked",style:t(this.props.translateLinked)})));case"origin":var x=this._getOption("origin_x"),j=this._getOption("origin_y"),R="";"%"===(0,m.getUnit)(x,"%")&&(x="".concat(D/100*parseFloat(x)-25,"px")),"%"===(0,m.getUnit)(j,"%")&&(j="".concat(D/100*parseFloat(j)-25,"px")),R+=x?"translateX(".concat(x,")"):R;var B={transform:R+=j?" translateY(".concat(j,")"):R};return o.default.createElement("div",b({className:"et-fb-settings-transform-wrapper"},r),o.default.createElement(A,{hideDotSquare:!0,onMouseLeave:this._handleMouseUp},o.default.createElement("div",{className:"et-fb-settings-transform-square-origin"}),o.default.createElement("div",{className:"et-fb-settings-transform-square-transparent-origin",style:{width:"52.5px",height:"52.5px"}},o.default.createElement("div",{className:"et-fb-settings-transform-square-half",style:{flexDirection:"row",alignItems:"flex-start"}},o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"1",onMouseDown:this._handleOriginClick}),o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"2",onMouseDown:this._handleOriginClick}),o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"3",onMouseDown:this._handleOriginClick})),o.default.createElement("div",{className:"et-fb-settings-transform-square-half",style:{flexDirection:"row",alignItems:"center"}},o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"4",onMouseDown:this._handleOriginClick}),o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"5",onMouseDown:this._handleOriginClick}),o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"6",onMouseDown:this._handleOriginClick})),o.default.createElement("div",{className:"et-fb-settings-transform-square-half",style:{flexDirection:"row",alignItems:"flex-end"}},o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"7",onMouseDown:this._handleOriginClick}),o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"8",onMouseDown:this._handleOriginClick}),o.default.createElement("div",{className:"et-fb-settings-transform-origin-controller","data-origin_type":"9",onMouseDown:this._handleOriginClick}))),o.default.createElement("div",{className:"et-fb-settings-transform-origin-dot",style:B,"data-transform_type":"origin",onMouseDown:this._handleOnMouseDown})),o.default.createElement("div",{className:"et-fb-settings-transform-vertical-range et-fb-settings-transform-vertical-range-inverted"},this._renderField("origin_y")),o.default.createElement("div",{className:"et-fb-settings-transform-horizontal-range"},this._renderField("origin_x")));case"rotate":var F=this._getOption("rotate_x"),I=this._getOption("rotate_y"),W=this._getOption("rotate_z");return o.default.createElement("div",r,o.default.createElement(A,{style:{justifyContent:"space-around",width:"100%"},hideDotSquare:!0,hideRuler:!0,onMouseLeave:this._handleMouseUp},o.default.createElement(N,{type:"rotate_z",angle:W,handleOnMouseDown:this._handleOnMouseDown}),o.default.createElement(N,{type:"rotate_x",angle:F,handleOnMouseDown:this._handleOnMouseDown}),o.default.createElement(N,{type:"rotate_y",angle:I,handleOnMouseDown:this._handleOnMouseDown})),o.default.createElement("div",{className:"et-fb-settings-transform-rotate"},o.default.createElement("div",{className:"et-fb-settings-transform-rotate-range"},this._renderField("rotate_z")),o.default.createElement("div",{className:"et-fb-settings-transform-rotate-range"},this._renderField("rotate_x")),o.default.createElement("div",{className:"et-fb-settings-transform-rotate-range"},this._renderField("rotate_y"))));default:return o.default.createElement("div",null,"".concat(n," is not a registered Transform type"))}}}],r&&k(n.prototype,r),a&&k(n,a),s}(o.default.Component);B.propTypes={name:a.default.string,default:a.default.string,default_unit:a.default.string,transform_type:a.default.string,range_settings:a.default.object,value:a.default.string,uniqueKey:a.default.string,_onChange:a.default.func,onClickLink:a.default.func,scaleLinked:a.default.bool,skewLinked:a.default.bool,translateLinked:a.default.bool,readonly:a.default.bool},B.defaultProps={name:"transform_scale",default:"100%|100%",default_unit:"%",transform_type:"scale",range_settings:{min:-100,max:300,step:1},value:"100%|100%",uniqueKey:"",_onChange:s.default,onClickLink:s.default,scaleLinked:!0,skewLinked:!0,translateLinked:!0,readonly:!1};var F=B;t.default=F}).call(this,n(9))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getModule=t.getTextAlignIconName=t.getAlignIconName=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r};t.getAlignIconName=function(e){switch(e){case"force_left":case"left":return"align-left";case"center":return"align-center";case"right":return"align-right";default:return e}};t.getTextAlignIconName=function(e){switch(e){case"justified":return"text-justify";case"force_left":case"left":return"text-left";case"center":return"text-center";case"right":return"text-right";default:return e}};t.getModule=function(e){return(0,o.default)(e,"props.module.props.module",!1)}},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.ETBuilderControlIconPicker=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=c(n(7)),i=c(n(31)),l=c(n(41)),u=c(n(44)),s=c(n(88));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;nn)return!1;var o={width:(0,a.spring)(n,{stiffness:300,damping:30})},l=(0,i.default)(this.props,"name",""),u=(0,i.default)(e.appWindow(),"etCore.portability.text.".concat(l,"ing"),"");return this.state.isCompleted?React.createElement("span",{className:"et-fb-tooltip-modal--loader et-core-loader et-core-loader-success"}):React.createElement("div",{className:"et-fb-tooltip-modal--progress"},React.createElement("div",{className:"et-fb-tooltip-modal--progress-bar"},React.createElement(a.Motion,{defaultStyle:{width:0,opacity:100},style:o},(function(e){return React.createElement("div",{className:"et-fb-tooltip-modal--progress-chart",style:{width:"".concat(e.width,"%")}},React.createElement("div",{className:"et-fb-tooltip-modal--progress-label"},parseInt(e.width),"%"))}))),React.createElement("div",{className:"et-fb-tooltip-modal--time-estimation"},r>0&&u.replace("1",r)))}}])&&s(n.prototype,r),o&&s(n,o),f}(o.Component);g={name:"",progress:0,time_remaining:1,renderStart:1},(m="defaultProps")in(h=y)?Object.defineProperty(h,m,{value:g,enumerable:!0,configurable:!0,writable:!0}):h[m]=g;var v=y;t.default=v}).call(this,n(2))},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=M(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),i=E(n(7)),l=E(n(10)),u=E(n(31)),s=E(n(387)),c=E(n(151)),d=E(n(1)),f=E(n(34)),p=E(n(36)),h=E(n(8)),m=E(n(1461)),g=E(n(1552)),y=E(n(1488)),v=E(n(19)),b=E(n(22)),_=E(n(6)),w=E(n(18)),k=E(n(283)),O=E(n(1571)),S=E(n(277)),C=E(n(2));function E(e){return e&&e.__esModule?e:{default:e}}function M(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(M=function(e){return e?n:t})(e)}function T(){return T=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};s(this,e);var r=(0,o.default)(a.default);this.context=n,this.store=r,this.monitor=new l.default(r),this.registry=this.monitor.registry,this.backend=t(this),r.subscribe(this.handleRefCountChange.bind(this))}return r(e,[{key:"handleRefCountChange",value:function(){var e=this.store.getState().refCount>0;e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1)}},{key:"getContext",value:function(){return this.context}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch;return Object.keys(i).filter((function(e){return"function"==typeof i[e]})).reduce((function(n,r){var o,a=i[r];return n[r]=(o=a,function(){for(var n=arguments.length,r=Array(n),a=0;a0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];return{dirtyHandlerIds:(0,i.default)(e.dirtyHandlerIds,t,e.dragOperation),dragOffset:(0,r.default)(e.dragOffset,t),refCount:(0,a.default)(e.refCount,t),dragOperation:(0,o.default)(e.dragOperation,t),stateId:(0,l.default)(e.stateId)}};var r=u(n(1484)),o=u(n(1533)),a=u(n(1534)),i=u(n(1486)),l=u(n(1535));function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:s,t=arguments[1];switch(t.type){case l.BEGIN_DRAG:return r({},e,{itemType:t.itemType,item:t.item,sourceId:t.sourceId,isSourcePublic:t.isSourcePublic,dropResult:null,didDrop:!1});case l.PUBLISH_DRAG_SOURCE:return r({},e,{isSourcePublic:!0});case l.HOVER:return r({},e,{targetIds:t.targetIds});case u.REMOVE_TARGET:return-1===e.targetIds.indexOf(t.targetId)?e:r({},e,{targetIds:(0,i.default)(e.targetIds,t.targetId)});case l.DROP:return r({},e,{dropResult:t.dropResult,didDrop:!0,targetIds:[]});case l.END_DRAG:return r({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}};var o,a=n(780),i=(o=a)&&o.__esModule?o:{default:o},l=n(1462),u=n(1463);var s={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments[1];switch(t.type){case r.ADD_SOURCE:case r.ADD_TARGET:return e+1;case r.REMOVE_SOURCE:case r.REMOVE_TARGET:return e-1;default:return e}};var r=n(1463)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e+1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=n.handlerIds;(0,o.default)("function"==typeof e,"listener must be a function."),(0,o.default)(void 0===r||(0,a.default)(r),"handlerIds, when specified, must be an array of strings.");var i=this.store.getState().stateId,l=function(){var n=t.store.getState(),o=n.stateId;try{o===i||o===i+1&&!(0,s.areDirty)(n.dirtyHandlerIds,r)||e()}finally{i=o}};return this.store.subscribe(l)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;(0,o.default)("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset;return this.store.subscribe((function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())}))}},{key:"canDragSource",value:function(e){var t=this.registry.getSource(e);return(0,o.default)(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){var t=this.registry.getTarget(e);if((0,o.default)(t,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var n=this.registry.getTargetType(e),r=this.getItemType();return(0,i.default)(n,r)&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){var t=this.registry.getSource(e,!0);return(0,o.default)(t,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&(this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e))}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1},n=t.shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),o=this.getItemType();if(!(0,i.default)(r,o))return!1;var a=this.getTargetIds();if(!a.length)return!1;var l=a.indexOf(e);return n?l===a.length-1:l>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return(0,u.getSourceClientOffset)(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return(0,u.getDifferenceFromInitialOffset)(this.store.getState().dragOffset)}}]),e}();t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n1024){for(var t=0,n=o.length-a;t0}},{key:"leave",value:function(e){var t=this.entered.length;return this.entered=(0,a.default)(this.entered.filter((function(e){return document.documentElement.contains(e)})),e),t>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}]),e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeClientOffset=l,t.getEventClientOffset=function(e){return{x:e.clientX,y:e.clientY}},t.getDragPreviewOffset=function(e,t,n,r){var a="IMG"===t.nodeName&&((0,o.isFirefox)()||!document.documentElement.contains(t)),u=l(a?e:t),s={x:n.x-u.x,y:n.y-u.y},c=e.offsetWidth,d=e.offsetHeight,f=r.anchorX,p=r.anchorY,h=a?t.width:c,m=a?t.height:d;(0,o.isSafari)()&&a&&(m/=window.devicePixelRatio,h/=window.devicePixelRatio);var g=new i.default([0,.5,1],[s.x,s.x/c*h,s.x+h-c]),y=new i.default([0,.5,1],[s.y,s.y/d*m,s.y+m-d]),v=g.interpolate(f),b=y.interpolate(p);(0,o.isSafari)()&&a&&(b+=(window.devicePixelRatio-1)*m);return{x:v,y:b}};var r,o=n(1487),a=n(1549),i=(r=a)&&r.__esModule?r:{default:r};function l(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;ne))return n[s];u=s-1}}var d=e-t[i=Math.max(0,u)],f=d*d;return n[i]+r[i]*d+o[i]*f+a[i]*d*f}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n-1}))}))[0]||null};var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1468));function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t,n){var r=t.reduce((function(t,n){return t||e.getData(n)}),null);return null!=r?r:n}var u=(i(r={},a.FILE,{exposeProperty:"files",matchesTypes:["Files"],getData:function(e){return Array.prototype.slice.call(e.files)}}),i(r,a.URL,{exposeProperty:"urls",matchesTypes:["Url","text/uri-list"],getData:function(e,t){return l(e,t,"").split("\n")}}),i(r,a.TEXT,{exposeProperty:"text",matchesTypes:["Text","text/plain"],getData:function(e,t){return l(e,t,"")}}),r)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){r||((r=new Image).src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==");return r};var r=void 0},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=f(n(0)),a=f(n(7)),i=f(n(1)),l=f(n(58)),u=f(n(57)),s=f(n(44)),c=f(n(19)),d=f(n(88));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return h.default.apply(void 0,["DragLayer","collect[, options]"].concat(Array.prototype.slice.call(arguments))),(0,d.default)("function"==typeof e,'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-layer.html",e),(0,d.default)((0,c.default)(t),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-layer.html',t),function(n){var c,h,m=t.arePropsEqual,b=void 0===m?p.default:m,_=n.displayName||n.name||"Component",w=(h=c=function(t){function i(e,t){g(this,i);var n=y(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e));return n.handleChange=n.handleChange.bind(n),n.manager=t.dragDropManager,(0,d.default)("object"===o(n.manager),"Could not find the drag and drop manager in the context of %s. Make sure to wrap the top-level component of your app with DragDropContext. Read more: http://react-dnd.github.io/react-dnd/docs-troubleshooting.html#could-not-find-the-drag-and-drop-manager-in-the-context",_,_),n.state=n.getCurrentState(),n}return v(i,t),a(i,[{key:"getDecoratedComponentInstance",value:function(){return(0,d.default)(this.child,"In order to access an instance of the decorated component it can not be a stateless component."),this.child}},{key:"shouldComponentUpdate",value:function(e,t){return!b(e,this.props)||!(0,f.default)(t,this.state)}}]),a(i,[{key:"componentDidMount",value:function(){this.isCurrentlyMounted=!0;var e=this.manager.getMonitor();this.unsubscribeFromOffsetChange=e.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=e.subscribeToStateChange(this.handleChange),this.handleChange()}},{key:"componentWillUnmount",value:function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange(),this.unsubscribeFromStateChange()}},{key:"handleChange",value:function(){if(this.isCurrentlyMounted){var e=this.getCurrentState();(0,f.default)(e,this.state)||this.setState(e)}}},{key:"getCurrentState",value:function(){var t=this.manager.getMonitor();return e(t)}},{key:"render",value:function(){var e=this;return l.default.createElement(n,r({},this.props,this.state,{ref:function(t){e.child=t}}))}}]),i}(i.Component),c.DecoratedComponent=n,c.displayName="DragLayer("+_+")",c.contextTypes={dragDropManager:u.default.object.isRequired},h);return(0,s.default)(w,n)}};var i=n(0),l=m(i),u=m(n(7)),s=m(n(609)),c=m(n(130)),d=m(n(1453)),f=m(n(1470)),p=m(n(1490)),h=m(n(1464));function m(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var f=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};a.default.apply(void 0,["DragSource","type, spec, collect[, options]"].concat(Array.prototype.slice.call(arguments)));var p=e;"function"!=typeof e&&((0,r.default)((0,d.default)(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',e),p=function(){return e});(0,r.default)((0,o.default)(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',t);var h=(0,u.default)(t);return(0,r.default)("function"==typeof n,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',n),(0,r.default)((0,o.default)(f),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',n),function(e){return(0,i.default)({connectBackend:function(e,t){return e.connectDragSource(t)},containerDisplayName:"DragSource",createHandler:h,registerHandler:l.default,createMonitor:s.default,createConnector:c.default,DecoratedComponent:e,getType:p,collect:n,options:f})}};var r=f(n(1453)),o=f(n(130)),a=f(n(1464)),i=f(n(1491)),l=f(n(1560)),u=f(n(1561)),s=f(n(1562)),c=f(n(1563)),d=f(n(1494));function f(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=r(n(1471));t.isDisposable=o.default;var a=r(n(1557));t.Disposable=a.default;var i=r(n(1558));t.CompositeDisposable=i.default;var l=r(n(1559));t.SerialDisposable=l.default},function(e,t,n){"use strict";t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;n-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html',i.join(", "),t),(0,o.default)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html",t,t,e[t])})),l.forEach((function(t){(0,o.default)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drag-source.html",t,t,e[t])}));var t=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.monitor=e,this.props=null,this.component=null}return r(t,[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveComponent",value:function(e){this.component=e}},{key:"canDrag",value:function(){return!e.canDrag||e.canDrag(this.props,this.monitor)}},{key:"isDragging",value:function(t,n){return e.isDragging?e.isDragging(this.props,this.monitor):n===t.getSourceId()}},{key:"beginDrag",value:function(){return e.beginDrag(this.props,this.monitor,this.component)}},{key:"endDrag",value:function(){e.endDrag&&e.endDrag(this.props,this.monitor,this.component)}}]),t}();return function(e){return new t(e)}};var o=a(n(1453));a(n(130));function a(e){return e&&e.__esModule?e:{default:e}}var i=["canDrag","beginDrag","isDragging","endDrag"],l=["beginDrag"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n or
. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),!n)return(0,i.cloneElement)(e,{ref:t});return(0,i.cloneElement)(e,{ref:function(e){t(e),n&&n(e)}})};var r,o=n(1453),a=(r=o)&&r.__esModule?r:{default:r},i=n(0)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var f=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};a.default.apply(void 0,["DropTarget","type, spec, collect[, options]"].concat(Array.prototype.slice.call(arguments)));var p=e;"function"!=typeof e&&((0,r.default)((0,d.default)(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',e),p=function(){return e});(0,r.default)((0,o.default)(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',t);var h=(0,u.default)(t);return(0,r.default)("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',n),(0,r.default)((0,o.default)(f),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',n),function(e){return(0,i.default)({connectBackend:function(e,t){return e.connectDropTarget(t)},containerDisplayName:"DropTarget",createHandler:h,registerHandler:l.default,createMonitor:s.default,createConnector:c.default,DecoratedComponent:e,getType:p,collect:n,options:f})}};var r=f(n(1453)),o=f(n(130)),a=f(n(1464)),i=f(n(1491)),l=f(n(1566)),u=f(n(1567)),s=f(n(1568)),c=f(n(1569)),d=f(n(1494));function f(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=n.getRegistry(),o=r.addTarget(e,t);return{handlerId:o,unregister:function(){r.removeTarget(o)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html',i.join(", "),t),(0,o.default)("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs-drop-target.html",t,t,e[t])}));var t=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.monitor=e,this.props=null,this.component=null}return r(t,[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveMonitor",value:function(e){this.monitor=e}},{key:"receiveComponent",value:function(e){this.component=e}},{key:"canDrop",value:function(){return!e.canDrop||e.canDrop(this.props,this.monitor)}},{key:"hover",value:function(){e.hover&&e.hover(this.props,this.monitor,this.component)}},{key:"drop",value:function(){if(e.drop)return e.drop(this.props,this.monitor,this.component)}}]),t}();return function(e){return new t(e)}};var o=a(n(1453));a(n(130));function a(e){return e&&e.__esModule?e:{default:e}}var i=["canDrop","hover","drop"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;nt.props.valueMax&&(n=t.props.valueMax),t.props._onChange(t.props.name,n),t.setState({value:n})}));var n=(0,d.default)(t.props.value),r=(0,d.default)(t.props.default);return t.state={value:n===r?"":n},t}return t=h,(n=[{key:"componentDidUpdate",value:function(e){var t=this.props.value;e.value===t||this.userUpdate||this.setState({value:t}),this.userUpdate=!1}},{key:"getDefaultValue",value:function(){return(0,d.default)(this.props.default)}},{key:"_emitChange",value:function(){this.userUpdate=!0,this.props._onChange(this.props.name,this.state.value)}},{key:"render",value:function(){var e=(0,c.default)(this.props,"additional_attrs",{}),t={"et-core-control-input":!0};this.props.className&&(t[this.props.className]=!0),this.props.readonly&&(e.readOnly=!0);var n=this.props,r=n.id,a=n.type;return r||(r="et-fb-".concat(this.props.name)),a||(a="text"),o.default.createElement("input",g({className:(0,i.default)(t),type:a,value:this.state.value,name:this.props.name,id:r,onChange:s.default,onInput:this._onInput,onBlur:this._onBlur,placeholder:this.getDefaultValue()},e))}}])&&y(t.prototype,n),r&&y(t,r),h}(o.PureComponent);O(S,"propTypes",{name:a.default.string.isRequired});var C=S;t.default=C},function(e,t,n){},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=M(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=E(n(13)),i=n(62),l=E(n(31)),u=E(n(8)),s=E(n(11)),c=E(n(10)),d=E(n(110)),f=E(n(4)),p=(E(n(9)),E(n(54))),h=E(n(1)),m=E(n(36)),g=E(n(40)),y=E(n(447)),v=E(n(109)),b=E(n(122)),_=n(1472),w=E(n(44)),k=E(n(1577)),O=E(n(1461)),S=E(n(1579)),C=n(348);function E(e){return e&&e.__esModule?e:{default:e}}function M(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(M=function(e){return e?n:t})(e)}function T(){return T=Object.assign||function(e){for(var t=1;to&&u>l||(e.moveItem(r,o),t.getItem().index=o)}}},E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(l,e);var t,n,r,a=_(l);function l(){var e;y(this,l);for(var t=arguments.length,n=new Array(t),r=0;r.1&&parseFloat(e)%1>0&&this.setState({rangeStep:"0.1"}),this.checkRangeBoundaries(this.state.value)}},{key:"componentDidUpdate",value:function(e){var t=this.emptyIfDefault(this.props.value);e.value===t||this.userUpdate||this.setState({value:t}),this.userUpdate=!1}},{key:"componentWillUnmount",value:function(){this.deferredUpdate.cancel()}},{key:"getDefaultValue",value:function(){return(0,s.default)(this.props.default)}},{key:"emptyIfDefault",value:function(e){return e===this.getDefaultValue()?"":e}},{key:"checkRangeBoundaries",value:function(e){if((0,s.default)(e)){var t=parseFloat(e);t>this.state.rangeMax&&this.setState({rangeMax:t}),t.1&&t%1>0&&this.setState({rangeStep:"0.1"})}}},{key:"_renderInput",value:function(){var e=this.props.id||"et-fb-".concat(this.props.name),t=this.props.name,n=this.emptyIfDefault(this.state.value),r=this.getDefaultValue(),a=""===n?r:n;return o.default.createElement("div",{className:"et-fb-settings-option-inputs-wrap"},o.default.createElement("input",{id:e,name:t,type:"range",min:this.state.rangeMin,max:this.state.rangeMax,step:this.state.rangeStep,className:"et-fb-range",value:parseFloat(a),"data-shortcuts-allowed":!0,onChange:this._updateFromRange}),o.default.createElement("div",{className:"et-fb-range-number et-fb-settings-option-input"},o.default.createElement("input",{type:"number",value:n,placeholder:r,onChange:this._onChange})))}},{key:"render",value:function(){var e=this.getDefaultValue(),t=this.props.value,n="";return t&&t!==e&&(n=o.default.createElement("button",{className:"et-fb-settings-option-button--reset",onClick:this.reset})),o.default.createElement("div",{className:(0,i.default)({"et-fb-settings-option-inner":!0,"et-fb-settings-option-inner-range":!0})},this._renderInput(),n)}}])&&p(t.prototype,n),r&&p(t,r),d}(o.PureComponent);b(_,"defaultProps",{default_unit:""}),b(_,"propTypes",{name:a.default.string.isRequired,default_unit:a.default.string,precision:a.default.number});var w=_;t.default=w},function(e,t,n){},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=i(n(7));function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var n=0;n=0)},getLastVerticalUpdated:function(){return this._lastVUpdated},getLastHorizontalUpdated:function(){return this._lastHUpdated},updatePadding:function(e){this.removePaddingMobile(),this.setState({value:e}),this.saveValue.cancel(),this.saveValue()},updateOptionValue:function(){this.props._onChange(this.props.name+this.getPropsNameSuffix(),this.getStateValue())}});R.defaultProps={default:"|||||"};var B=R;t.default=B},function(e,t,n){},function(e,t,n){var r=n(52)("add",n(620));r.placeholder=n(47),e.exports=r},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=d(n(7)),i=d(n(1590)),l=d(n(611));n(1591);var u=d(n(40)),s=d(n(193)),c=n(108);function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function p(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.default=function(e){var t=e.pos,n=e.style,i=e.className,s=u(e,a);return r.default.createElement("div",l({},s,{style:n,className:"et-fb-spinner-control__spinner ".concat((0,o.default)(i))}),r.default.createElement("div",{className:"et-fb-spinner-control__spinner-item",style:{transform:"translateX(".concat(t,"px)")}}))}},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=(u(n(7)),u(n(29))),i=u(n(16)),l=u(n(2));function u(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function c(e,t){for(var n=0;n/},html:{mode:{name:"htmlmixed"},colorpicker:{mode:"edit"},matchTags:{bothTags:!0},lineBreakPlaceholder://}}},I={line:0,ch:0},W={ignoreKeys:[13,37,39],prefix:{css:/[A-z-]/,default:/[A-z]/},tokens:{xml:["attribute","tag"]}},V=function(e){var t=(0,p.default)(e,e.is_fb_content?"content":"value");return t===e.default?"":t},H=function(e){e.hideCompletion(),e.hideColorPicker()},G=new(function(){function e(){D(this,e),this.instances=[],this.listener=!1,this.$window=w.default.$appWindow(),this.onScroll=this.onScroll.bind(this)}return N(e,[{key:"add",value:function(e){this.instances.push(e),this.check()}},{key:"remove",value:function(e){(0,v.default)(this.instances,e),this.check()}},{key:"onScroll",value:function(){(0,y.default)(this.instances,H)}},{key:"check",value:function(){this.instances.length>0?this.listener||(this.$window.on("wheel scroll",this.onScroll),this.listener=!0):this.listener&&(this.$window.off("wheel scroll",this.onScroll),this.listener=!1)}}]),e}()),U=(0,w.isIEOrEdge)()?e("body")[0]:{scrollTop:0};function z(t){var n=this,r=t.lineNo,o=t.ch,a=t.nameColor,i=t.color;if(this.colorpicker){var l=i,u=this.cm.charCoords({line:r,ch:o},"window");this.colorpicker.show({left:u.left,top:u.bottom+U.scrollTop,isShortCut:t.isShortCut||!1,hideDelay:this.opt.hideDelay||2e3},a||i,(function(e){n.cm.replaceRange(e,{line:r,ch:o},{line:r,ch:o+l.length},"*colorpicker"),l=e})),e(this.colorpicker.$root.el).css({top:"".concat(u.bottom+U.scrollTop,"px"),left:(0,d.default)(u.left)?"".concat(u.left,"px"):u.left})}}var q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&M(e,t)}(n,e);var t=T(n);function n(e){var r;D(this,n),(r=t.call(this,e)).editor=!1,r.dirty=!1,r.markers=[],r.mode=(0,p.default)(e,"mode","css"),r.options=C(C(C({},F.common),(0,p.default)(F.modes,r.mode,{})),{},{readOnly:(0,p.default)(e,"readonly",!1)}),(0,m.default)(r.options,"mode.inline")&&(0,m.default)(e,"inline")&&(r.options.mode.inline=e.inline),r.completion=(0,p.default)(W.prefix,r.mode,W.prefix.default),r.onChange=r.onChange.bind(x(r)),r.onClick=r.onClick.bind(x(r)),r.onKeyUp=r.onKeyUp.bind(x(r)),r.onKeyDown=r.onKeyDown.bind(x(r)),r._onFocus=r._onFocus.bind(x(r)),r._onBlur=r._onBlur.bind(x(r)),r.onBeforeChange=r.onBeforeChange.bind(x(r)),r.editorDidMount=r.editorDidMount.bind(x(r)),r.debouncedShowCompletion=(0,f.default)(r.showCompletion,R),r.debouncedUpdateSettings=(0,f.default)(r.updateSettings,A),r.incrementalKey=0;var o=r.addLineBreaks(V(e)),a=r.addLineBreaks(r.props.default);return r.state={value:o,default:a,enabled:!(0,u.default)(o)||!(0,u.default)(a),focused:!1},r}return N(n,[{key:"componentDidMount",value:function(){G.add(this)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.addLineBreaks(V(e));if(this.state.enabled||(0,u.default)(t)&&(0,u.default)(this.state.default)||this.enableEditor(),this.state.value!==t||e.activeTabMode!==this.props.activeTabMode){var n=this.addLineBreaks(e.default);this.setState({default:n}),this.dirty||(this.incrementalKey++,this.setValue(t))}}},{key:"componentDidUpdate",value:function(){if(this.editor){var e=this.editor;if((0,y.default)(this.markers,(function(e){e.clear()})),this.markers=[],(0,u.default)((0,p.default)(this,"props.search")))return;for(var t=e.getSearchCursor(this.props.search);t.findNext();)this.markers.push(e.doc.markText(t.from(),t.to(),{className:"cm-searching",clearOnEnter:!0}))}}},{key:"componentWillUnmount",value:function(){this.hideCompletion(),this.hideColorPicker(),G.remove(this),this.debouncedShowCompletion.cancel(),this.debouncedUpdateSettings.flush(),this.editor=!1,this.linter&&this.linter.destroy()}},{key:"onBeforeChange",value:function(e,t,n){this.dirty=!0,this.setValue(n)}},{key:"onChange",value:function(){A>0?this.debouncedUpdateSettings():this.updateSettings(),this.lint()}},{key:"onKeyUp",value:function(e,t){this.checkCompletion(e,t)}},{key:"onKeyDown",value:function(e,t){"Enter"!==t.key&&13!==t.keyCode||t.stopPropagation()}},{key:"onClick",value:function(){this.options.autofocus=!0,this.enableEditor()}},{key:"setValue",value:function(e){this.setState({value:e})}},{key:"addLineBreaks",value:function(e){if((0,c.default)(e)||!(0,s.default)(e))return e;var t=this.options.lineBreakPlaceholder;return e.match(t)?e.split(t).join("\n"):e}},{key:"enableEditor",value:function(){this.setState({enabled:!0})}},{key:"lint",value:function(e){this.linter&&this.linter.lint(e)}},{key:"editorDidMount",value:function(e){this.editor=e;var t=e.state.colorpicker;t&&(0,h.default)(t,"open_color_picker",z.bind(t)),this.linter=new _.default(this.options.mode,e,B),this.lint(0)}},{key:"updateSettings",value:function(){var e=this.props;e._onChange(e.name,this.state.value,e.type),this.dirty=!1}},{key:"hideCompletion",value:function(){this.debouncedShowCompletion.cancel(),this.editor&&this.editor.state.completionActive&&this.editor.state.completionActive.close()}},{key:"hideColorPicker",value:function(){this.editor&&this.editor.state.colorpicker&&this.editor.state.colorpicker.close_color_picker()}},{key:"checkCompletion",value:function(e,t){if((0,g.default)(W.ignoreKeys,t.keyCode))this.hideCompletion();else{var n=e.doc,r=n.getCursor(),o=r.line,a=r.ch,i=(0,p.default)(e.getModeAt(r),"name"),l=n.getLine(o),u=l.substr(Math.max(a-1,0),1),s=l.substr(a,1);if(this.completion.test(u)&&!this.completion.test(s)){var c=(0,p.default)(W,"tokens.".concat(i));if(c){var d=e.getTokenTypeAt(r);if(!(0,g.default)(c,d))return void this.hideCompletion()}this.debouncedShowCompletion()}else this.hideCompletion()}}},{key:"showCompletion",value:function(){if(!this.editor.state.completionActive){var e=w.default.$topWindow("".concat(ETBuilderBackend.css.layoutPrefix," #et-fb-app"))[0];this.editor.showHint({completeSingle:!1,container:e})}}},{key:"render",value:function(){var e;if(this.state.enabled){var t=C(C({},this.options),{},{lineNumbers:this.state.focused||!(0,u.default)(this.state.value)||(0,u.default)(this.state.default),placeholder:this.state.default});e=a.default.createElement(o.Controlled,{key:this.incrementalKey,value:this.state.value,options:t,cursor:this.options.autofocus?I:null,autoFocus:this.options.autofocus,name:this.props.name,id:"et-fb-".concat(this.props.name),onChange:this.onChange,onBeforeChange:this.onBeforeChange,onKeyUp:this.onKeyUp,onKeyDown:this.onKeyDown,editorDidMount:this.editorDidMount,onFocus:this._onFocus,onBlur:this._onBlur})}else e=a.default.createElement("textarea",{className:"et-fb-settings-option-textarea",value:this.state.value,name:this.props.name,onChange:l.default,onClick:this.onClick,onFocus:this._onFocus,onBlur:this._onBlur,placeholder:this.state.default});return a.default.createElement(b.default,{componentName:this.props.name},a.default.createElement("div",{className:"et-fb-codemirror"},e))}},{key:"_onFocus",value:function(){this.setState({focused:!0})}},{key:"_onBlur",value:function(){this.setState({focused:!1})}}]),n}(a.default.Component);q.propTypes={value:i.default.string,name:i.default.string.isRequired,search:i.default.string,inline:i.default.bool},q.defaultProps={value:"",search:"",inline:!0};var K=q;t.default=K}).call(this,n(9))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a,i=n(0),l="undefined"==typeof navigator;l||(a=n(1452));var u=function(){function e(e,t){this.editor=e,this.props=t,this.notifyOfDeprecation()}return e.prototype.notifyOfDeprecation=function(){void 0!==this.props.autoScrollCursorOnSet&&console.warn("`autoScrollCursorOnSet` has been deprecated. Use `autoScroll` instead\n\nSee https://github.com/scniro/react-codemirror2#props"),void 0!==this.props.resetCursorOnSet&&console.warn("`resetCursorOnSet` has been deprecated. Use `autoCursor` instead\n\nSee https://github.com/scniro/react-codemirror2#props"),void 0!==this.props.onSet&&console.warn("`onSet` has been deprecated. User `editorDidMount` instead. See https://github.com/scniro/react-codemirror2#events"),void 0!==this.props.onBeforeSet&&console.warn("`onBeforeSet` has been deprecated. User `onBeforeChange` for `Controlled`. instead. See https://github.com/scniro/react-codemirror2#events")},e.prototype.wire=function(e){var t=this;switch(e){case"onBlur":this.editor.on("blur",(function(e,n){t.props.onBlur(t.editor,n)}));break;case"onCursor":this.editor.on("cursorActivity",(function(e){t.props.onCursor(t.editor,t.editor.getCursor())}));break;case"onCursorActivity":this.editor.on("cursorActivity",(function(e){t.props.onCursorActivity(t.editor)}));break;case"onDragEnter":this.editor.on("dragenter",(function(e,n){t.props.onDragEnter(t.editor,n)}));break;case"onDragOver":this.editor.on("dragover",(function(e,n){t.props.onDragOver(t.editor,n)}));break;case"onDrop":this.editor.on("drop",(function(e,n){t.props.onDrop(t.editor,n)}));break;case"onFocus":this.editor.on("focus",(function(e,n){t.props.onFocus(t.editor,n)}));break;case"onGutterClick":this.editor.on("gutterClick",(function(e,n,r,o){t.props.onGutterClick(t.editor,n,r,o)}));break;case"onKeyDown":this.editor.on("keydown",(function(e,n){t.props.onKeyDown(t.editor,n)}));break;case"onKeyPress":this.editor.on("keypress",(function(e,n){t.props.onKeyPress(t.editor,n)}));break;case"onKeyUp":this.editor.on("keyup",(function(e,n){t.props.onKeyUp(t.editor,n)}));break;case"onScroll":this.editor.on("scroll",(function(e){t.props.onScroll(t.editor,t.editor.getScrollInfo())}));break;case"onSelection":this.editor.on("beforeSelectionChange",(function(e,n){t.props.onSelection(t.editor,n)}));break;case"onUpdate":this.editor.on("update",(function(e){t.props.onUpdate(t.editor)}));break;case"onViewportChange":this.editor.on("viewportChange",(function(e,n,r){t.props.onViewportChange(t.editor,n,r)}))}},e}(),s=function(e){function t(t){var n=e.call(this,t)||this;return l||(n.deferred=null,n.emulating=!1,n.hydrated=!1,n.initCb=function(){n.props.editorDidConfigure&&n.props.editorDidConfigure(n.editor)},n.mounted=!1),n}return o(t,e),t.prototype.setCursor=function(e,t,n){var r=this.editor.getDoc();n&&this.editor.focus(),t?r.setCursor(e):r.setCursor(e,null,{scroll:!1})},t.prototype.moveCursor=function(e,t){var n=this.editor.getDoc();t?n.setCursor(e):n.setCursor(e,null,{scroll:!1})},t.prototype.hydrate=function(e){var t=this;Object.keys(e.options||{}).forEach((function(n){t.editor.setOption(n,e.options[n]),t.mirror.setOption(n,e.options[n])})),this.hydrated||(this.mounted&&this.deferred?this.resolveChange():this.initChange(e.value||"")),this.hydrated=!0},t.prototype.initChange=function(e){this.emulating=!0;var t=this.editor.lastLine(),n=this.editor.getLine(this.editor.lastLine()).length;this.editor.replaceRange(e||"",{line:0,ch:0},{line:t,ch:n}),this.mirror.setValue(e),this.editor.clearHistory(),this.mirror.clearHistory(),this.emulating=!1},t.prototype.resolveChange=function(){this.emulating=!0,"undo"===this.deferred.origin?this.editor.undo():"redo"===this.deferred.origin?this.editor.redo():this.editor.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),this.emulating=!1,this.deferred=null},t.prototype.mirrorChange=function(e){return"undo"===e.origin?(this.editor.setHistory(this.mirror.getHistory()),this.mirror.undo()):"redo"===e.origin?(this.editor.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(e.text,e.from,e.to,e.origin),this.mirror.getValue()},t.prototype.componentWillMount=function(){l||this.props.editorWillMount&&this.props.editorWillMount()},t.prototype.componentDidMount=function(){var e=this;if(!l){if(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&a.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=a(this.ref),this.shared=new u(this.editor,this.props),this.mirror=a((function(){})),this.editor.on("electricInput",(function(){e.mirror.setHistory(e.editor.getHistory())})),this.editor.on("cursorActivity",(function(){e.mirror.setCursor(e.editor.getCursor())})),this.editor.on("beforeChange",(function(t,n){if(!e.emulating){n.cancel(),e.deferred=n;var r=e.mirrorChange(e.deferred);e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,e.deferred,r)}})),this.editor.on("change",(function(t,n){e.mounted&&e.props.onChange&&e.props.onChange(e.editor,n,e.editor.getValue())})),this.props.onBlur&&this.shared.wire("onBlur"),this.props.onCursor&&this.shared.wire("onCursor"),this.props.onCursorActivity&&this.shared.wire("onCursorActivity"),this.props.onDragEnter&&this.shared.wire("onDragEnter"),this.props.onDragOver&&this.shared.wire("onDragOver"),this.props.onDrop&&this.shared.wire("onDrop"),this.props.onFocus&&this.shared.wire("onFocus"),this.props.onGutterClick&&this.shared.wire("onGutterClick"),this.props.onKeyDown&&this.shared.wire("onKeyDown"),this.props.onKeyPress&&this.shared.wire("onKeyPress"),this.props.onKeyUp&&this.shared.wire("onKeyUp"),this.props.onScroll&&this.shared.wire("onScroll"),this.props.onSelection&&this.shared.wire("onSelection"),this.props.onUpdate&&this.shared.wire("onUpdate"),this.props.onViewportChange&&this.shared.wire("onViewportChange"),this.hydrate(this.props),this.props.selection)this.editor.getDoc().setSelections(this.props.selection);this.props.cursor&&this.setCursor(this.props.cursor,this.props.autoScroll||!1,this.props.autoFocus||!1),this.props.scroll&&this.editor.scrollTo(this.props.scroll.x,this.props.scroll.y),this.mounted=!0,this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb)}},t.prototype.componentWillReceiveProps=function(e){var t;l||(e.value!==this.props.value&&(this.hydrated=!1),this.props.autoCursor||void 0===this.props.autoCursor||(t=this.editor.getCursor()),this.hydrate(e),this.props.autoCursor||void 0===this.props.autoCursor||this.moveCursor(t,this.props.autoScroll||!1))},t.prototype.componentWillUnmount=function(){l||this.props.editorWillUnmount&&this.props.editorWillUnmount(a)},t.prototype.shouldComponentUpdate=function(e,t){return!l},t.prototype.render=function(){var e=this;if(l)return null;var t=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return i.createElement("div",{className:t,ref:function(t){return e.ref=t}})},t}(i.Component);t.Controlled=s;var c=function(e){function t(t){var n=e.call(this,t)||this;return l||(n.continueChange=!1,n.hydrated=!1,n.initCb=function(){n.props.editorDidConfigure&&n.props.editorDidConfigure(n.editor)},n.mounted=!1,n.onBeforeChangeCb=function(){n.continueChange=!0}),n}return o(t,e),t.prototype.setCursor=function(e,t,n){var r=this.editor.getDoc();n&&this.editor.focus(),t?r.setCursor(e):r.setCursor(e,null,{scroll:!1})},t.prototype.moveCursor=function(e,t){var n=this.editor.getDoc();t?n.setCursor(e):n.setCursor(e,null,{scroll:!1})},t.prototype.hydrate=function(e){var t=this;if(Object.keys(e.options||{}).forEach((function(n){return t.editor.setOption(n,e.options[n])})),!this.hydrated){var n=this.editor.lastLine(),r=this.editor.getLine(this.editor.lastLine()).length;this.editor.replaceRange(e.value||"",{line:0,ch:0},{line:n,ch:r})}this.hydrated=!0},t.prototype.componentWillMount=function(){l||this.props.editorWillMount&&this.props.editorWillMount()},t.prototype.componentDidMount=function(){var e=this;if(!l){if(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&a.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=a(this.ref),this.shared=new u(this.editor,this.props),this.editor.on("beforeChange",(function(t,n){e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,n,null,e.onBeforeChangeCb)})),this.editor.on("change",(function(t,n){if(e.mounted)if(e.props.onBeforeChange){if(!e.continueChange)return;e.props.onChange(e.editor,n,e.editor.getValue())}else e.props.onChange(e.editor,n,e.editor.getValue())})),this.props.onBlur&&this.shared.wire("onBlur"),this.props.onCursor&&this.shared.wire("onCursor"),this.props.onCursorActivity&&this.shared.wire("onCursorActivity"),this.props.onDragEnter&&this.shared.wire("onDragEnter"),this.props.onDragOver&&this.shared.wire("onDragOver"),this.props.onDrop&&this.shared.wire("onDrop"),this.props.onFocus&&this.shared.wire("onFocus"),this.props.onGutterClick&&this.shared.wire("onGutterClick"),this.props.onKeyDown&&this.shared.wire("onKeyDown"),this.props.onKeyPress&&this.shared.wire("onKeyPress"),this.props.onKeyUp&&this.shared.wire("onKeyUp"),this.props.onScroll&&this.shared.wire("onScroll"),this.props.onSelection&&this.shared.wire("onSelection"),this.props.onUpdate&&this.shared.wire("onUpdate"),this.props.onViewportChange&&this.shared.wire("onViewportChange"),this.hydrate(this.props),this.props.selection)this.editor.getDoc().setSelections(this.props.selection);this.props.cursor&&this.setCursor(this.props.cursor,this.props.autoScroll||!1,this.props.autoFocus||!1),this.props.scroll&&this.editor.scrollTo(this.props.scroll.x,this.props.scroll.y),this.mounted=!0,this.editor.clearHistory(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb)}},t.prototype.componentWillReceiveProps=function(e){var t;l||(e.value!==this.props.value&&(this.hydrated=!1),this.props.autoCursor||void 0===this.props.autoCursor||(t=this.editor.getCursor()),this.hydrate(e),this.props.autoCursor||void 0===this.props.autoCursor||this.moveCursor(t,this.props.autoScroll||!1))},t.prototype.componentWillUnmount=function(){l||this.props.editorWillUnmount&&this.props.editorWillUnmount(a)},t.prototype.shouldComponentUpdate=function(e,t){return!l},t.prototype.render=function(){var e=this;if(l)return null;var t=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return i.createElement("div",{className:t,ref:function(t){return e.ref=t}})},t}(i.Component);t.UnControlled=c},function(e,t,n){!function(e){"use strict";var t=e.commands,n=e.Pos;function r(t,r,o){if(o<0&&0==r.ch)return t.clipPos(n(r.line-1));var a=t.getLine(r.line);if(o>0&&r.ch>=a.length)return t.clipPos(n(r.line+1,0));for(var i,l="start",u=r.ch,s=u,c=o<0?0:a.length,d=0;s!=c;s+=o,d++){var f=a.charAt(o<0?s-1:s),p="_"!=f&&e.isWordChar(f)?"w":"o";if("w"==p&&f.toUpperCase()==f&&(p="W"),"start"==l)"o"!=p?(l="in",i=p):u=s+o;else if("in"==l&&i!=p){if("w"==i&&"W"==p&&o<0&&s--,"W"==i&&"w"==p&&o>0){if(s==u+1){i="w";continue}s--}break}}return n(r.line,s)}function o(e,t){e.extendSelectionsBy((function(n){return e.display.shift||e.doc.extend||n.empty()?r(e.doc,n.head,t):t<0?n.from():n.to()}))}function a(t,r){if(t.isReadOnly())return e.Pass;t.operation((function(){for(var e=t.listSelections().length,o=[],a=-1,i=0;i=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],o=0;oa.line&&l==i.line&&0==i.ch||r.push({anchor:l==a.line?a:n(l,0),head:l==i.line?i:n(l)});e.setSelections(r,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),r=[],o=0;o=0;l--){var s=r[o[l]];if(!(u&&e.cmpPos(s.head,u)>0)){var c=i(t,s.head);u=c.from,t.replaceRange(n(c.word),c.from,c.to)}}}))}function h(t){var n=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(n,r)){var o=i(t,n);if(!o.word)return;n=o.from,r=o.to}return{from:n,to:r,query:t.getRange(n,r),word:o}}function m(e,t){var r=h(e);if(r){var o=r.query,a=e.getSearchCursor(o,t?r.to:r.from);(t?a.findNext():a.findPrevious())?e.setSelection(a.from(),a.to()):(a=e.getSearchCursor(o,t?n(e.firstLine(),0):e.clipPos(n(e.lastLine()))),(t?a.findNext():a.findPrevious())?e.setSelection(a.from(),a.to()):r.word&&e.setSelection(r.from,r.to))}}t.selectScope=function(e){c(e)||e.execCommand("selectAll")},t.selectBetweenBrackets=function(t){if(!c(t))return e.Pass},t.goToBracket=function(t){t.extendSelectionsBy((function(r){var o=t.scanForBracket(r.head,1,d(t.getTokenTypeAt(r.head)));if(o&&0!=e.cmpPos(o.pos,r.head))return o.pos;var a=t.scanForBracket(r.head,-1,d(t.getTokenTypeAt(n(r.head.line,r.head.ch+1))));return a&&n(a.pos.line,a.pos.ch+1)||r.head}))},t.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),o=[],a=t.firstLine()-1,i=[],l=0;la?o.push(s,c):o.length&&(o[o.length-1]=c),a=c}t.operation((function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+l,n(t.lastLine()),null,"+swapLine"):t.replaceRange(l+"\n",n(a,0),null,"+swapLine")}t.setSelections(i),t.scrollIntoView()}))},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var r=t.listSelections(),o=[],a=t.lastLine()+1,i=r.length-1;i>=0;i--){var l=r[i],u=l.to().line+1,s=l.from().line;0!=l.to().ch||l.empty()||u--,u=0;e-=2){var r=o[e],a=o[e+1],i=t.getLine(r);r==t.lastLine()?t.replaceRange("",n(r-1),n(r),"+swapLine"):t.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),t.replaceRange(i+"\n",n(a,0),null,"+swapLine")}t.scrollIntoView()}))},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),r=[],o=0;o=0;a--){var i=r[a].head,l=t.getRange({line:i.line,ch:0},i),u=e.countColumn(l,null,t.getOption("tabSize")),s=t.findPosH(i,-1,"char",!1);if(l&&!/\S/.test(l)&&u%o==0){var c=new n(i.line,e.findColumn(l,u-o,o));c.ch!=i.ch&&(s=c)}t.replaceRange("",s,i,"+delete")}}))},t.delLineRight=function(e){e.operation((function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange("",t[r].anchor,n(t[r].to().line),"+delete");e.scrollIntoView()}))},t.upcaseAtCursor=function(e){p(e,(function(e){return e.toUpperCase()}))},t.downcaseAtCursor=function(e){p(e,(function(e){return e.toLowerCase()}))},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.deleteToSublimeMark=function(t){var n=t.state.sublimeMark&&t.state.sublimeMark.find();if(n){var r=t.getCursor(),o=n;if(e.cmpPos(r,o)>0){var a=o;o=r,r=a}t.state.sublimeKilled=t.getRange(r,o),t.replaceRange("",r,o)}},t.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){m(e,!0)},t.findUnderPrevious=function(e){m(e,!1)},t.findAllUnder=function(e){var t=h(e);if(t){for(var n=e.getSearchCursor(t.query),r=[],o=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=t.from.line&&n.from().ch<=t.from.ch&&o++;e.setSelections(r,o)}};var g=e.keyMap;g.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Cmd-F5":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(g.macSublime),g.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Ctrl-F9":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(g.pcSublime);var y=g.default==g.macDefault;g.sublime=y?g.macSublime:g.pcSublime}(n(1452),n(1476),n(1498))},function(e,t,n){!function(e){"use strict";var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function n(e,t,n){var r=e.current(),o=r.search(t);return o>-1?e.backUp(r.length-o):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}var r={};function o(e){var t=r[e];return t||(r[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function a(e,t){var n=e.match(o(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function i(e,t){return new RegExp((t?"^":"")+"","i")}function l(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),o=e[n],a=o.length-1;a>=0;a--)r.unshift(o[a])}function u(e,t){for(var n=0;n=0;f--)s.script.unshift(["type",d[f].matches,d[f].mode]);function p(t,o){var l,c=a.token(t,o.htmlState),d=/\btag\b/.test(c);if(d&&!/[<>\s\/]/.test(t.current())&&(l=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&s.hasOwnProperty(l))o.inTag=l+" ";else if(o.inTag&&d&&/>$/.test(t.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var h=">"==t.current()&&u(s[f[1]],f[2]),m=e.getMode(r,h),g=i(f[1],!0),y=i(f[1],!1);o.token=function(e,t){return e.match(g,!1)?(t.token=p,t.localState=t.localMode=null,null):n(e,y,t.localMode.token(e,t.localState))},o.localMode=m,o.localState=e.startState(m,a.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=t.current(),t.eol()&&(o.inTag+=" "));return c}return{startState:function(){return{token:p,inTag:null,localMode:null,localState:null,htmlState:e.startState(a)}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(a,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?a.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||a}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(n(1452),n(1603),n(1604),n(1477))},function(e,t,n){!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,o){var a,i,l=r.indentUnit,u={},s=o.htmlMode?t:n;for(var c in s)u[c]=s[c];for(var c in o)u[c]=o[c];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(h("atom","]]>")):null:e.match("--")?n(h("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(m(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=h("meta","?>"),"meta"):(a=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function f(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=d,a=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return a="equals",null;if("<"==n){t.tokenize=d,t.state=b,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=p(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=f;break}return"string"};return t.isInAttribute=!0,t}function h(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function m(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=m(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=d;break}return n.tokenize=m(e-1),n.tokenize(t,n)}}return"meta"}}function g(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(u.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function y(e){e.context&&(e.context=e.context.prev)}function v(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!u.contextGrabbers.hasOwnProperty(n)||!u.contextGrabbers[n].hasOwnProperty(t))return;y(e)}}function b(e,t,n){return"openTag"==e?(n.tagStart=t.column(),_):"closeTag"==e?w:b}function _(e,t,n){return"word"==e?(n.tagName=t.current(),i="tag",S):u.allowMissingTagName&&"endTag"==e?(i="tag bracket",S(e,t,n)):(i="error",_)}function w(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&u.implicitlyClosed.hasOwnProperty(n.context.tagName)&&y(n),n.context&&n.context.tagName==r||!1===u.matchClosing?(i="tag",k):(i="tag error",O)}return u.allowMissingTagName&&"endTag"==e?(i="tag bracket",k(e,t,n)):(i="error",O)}function k(e,t,n){return"endTag"!=e?(i="error",k):(y(n),b)}function O(e,t,n){return i="error",k(e,t,n)}function S(e,t,n){if("word"==e)return i="attribute",C;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||u.autoSelfClosers.hasOwnProperty(r)?v(n,r):(v(n,r),n.context=new g(n,r,o==n.indented)),b}return i="error",S}function C(e,t,n){return"equals"==e?E:(u.allowMissing||(i="error"),S(e,t,n))}function E(e,t,n){return"string"==e?M:"word"==e&&u.allowUnquoted?(i="string",S):(i="error",S(e,t,n))}function M(e,t,n){return"string"==e?M:S(e,t,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:b,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;a=null;var n=t.tokenize(e,t);return(n||a)&&"comment"!=n&&(i=null,t.state=t.state(a||n,e,t),i&&(n="error"==i?n+" error":i)),n},indent:function(t,n,r){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==u.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(u.multilineTagIndentFactor||1);if(u.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:u.htmlMode?"html":"xml",helperType:u.htmlMode?"html":"xml",skipAttribute:function(e){e.state==E&&(e.state=S)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(1452))},function(e,t,n){!function(e){"use strict";e.defineMode("javascript",(function(t,n){var r,o,a=t.indentUnit,i=n.statementIndent,l=n.jsonld,u=n.json||l,s=n.typescript,c=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),o=e("keyword d"),a=e("operator"),i={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:o,break:o,continue:o,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:a,typeof:a,instanceof:a,true:i,false:i,null:i,undefined:i,NaN:i,Infinity:i,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),f=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function h(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function m(e,t,n){return r=e,o=n,t}function g(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=y(n),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return m("number","number");if("."==n&&e.match(".."))return m("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return m(n);if("="==n&&e.eat(">"))return m("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return m("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),m("number","number");if("/"==n)return e.eat("*")?(t.tokenize=v,v(e,t)):e.eat("/")?(e.skipToEnd(),m("comment","comment")):et(e,t,1)?(h(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),m("regexp","string-2")):(e.eat("="),m("operator","operator",e.current()));if("`"==n)return t.tokenize=b,b(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),m("meta","meta");if("#"==n&&e.eatWhile(c))return m("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),m("comment","comment");if(f.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?m("."):m("operator","operator",e.current());if(c.test(n)){e.eatWhile(c);var r=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(r)){var o=d[r];return m(o.type,o.style,r)}if("async"==r&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return m("async","keyword",r)}return m("variable","variable",r)}}function y(e){return function(t,n){var r,o=!1;if(l&&"@"==t.peek()&&t.match(p))return n.tokenize=g,m("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||o);)o=!o&&"\\"==r;return o||(n.tokenize=g),m("string","string")}}function v(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=g;break}r="*"==n}return m("comment","comment")}function b(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}r=!r&&"\\"==n}return m("quasi","string-2",e.current())}var _="([{}])";function w(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(s){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var o=0,a=!1,i=n-1;i>=0;--i){var l=e.string.charAt(i),u=_.indexOf(l);if(u>=0&&u<3){if(!o){++i;break}if(0==--o){"("==l&&(a=!0);break}}else if(u>=3&&u<6)++o;else if(c.test(l))a=!0;else if(/["'\/`]/.test(l))for(;;--i){if(0==i)return;if(e.string.charAt(i-1)==l&&"\\"!=e.string.charAt(i-2)){i--;break}}else if(a&&!o){++i;break}}a&&!o&&(t.fatArrowAt=i)}}var k={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function O(e,t,n,r,o,a){this.indented=e,this.column=t,this.type=n,this.prev=o,this.info=a,null!=r&&(this.align=r)}function S(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}function C(e,t,n,r,o){var a=e.cc;for(E.state=e,E.stream=o,E.marked=null,E.cc=a,E.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((a.length?a.pop():u?U:H)(n,r)){for(;a.length&&a[a.length-1].lex;)a.pop()();return E.marked?E.marked:"variable"==n&&S(e,r)?"variable-2":t}}var E={state:null,column:null,marked:null,cc:null};function M(){for(var e=arguments.length-1;e>=0;e--)E.cc.push(arguments[e])}function T(){return M.apply(null,arguments),!0}function P(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function x(e){var t=E.state;if(E.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=j(e,t.context);if(null!=r)return void(t.context=r)}else if(!P(e,t.localVars))return void(t.localVars=new N(e,t.localVars));n.globalVars&&!P(e,t.globalVars)&&(t.globalVars=new N(e,t.globalVars))}function j(e,t){if(t){if(t.block){var n=j(e,t.prev);return n?n==t.prev?t:new L(n,t.vars,!0):null}return P(e,t.vars)?t:new L(t.prev,new N(e,t.vars),!1)}return null}function D(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function L(e,t,n){this.prev=e,this.vars=t,this.block=n}function N(e,t){this.name=e,this.next=t}var A=new N("this",new N("arguments",null));function R(){E.state.context=new L(E.state.context,E.state.localVars,!1),E.state.localVars=A}function B(){E.state.context=new L(E.state.context,E.state.localVars,!0),E.state.localVars=null}function F(){E.state.localVars=E.state.context.vars,E.state.context=E.state.context.prev}function I(e,t){var n=function(){var n=E.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var o=n.lexical;o&&")"==o.type&&o.align;o=o.prev)r=o.indented;n.lexical=new O(r,E.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function W(){var e=E.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function V(e){function t(n){return n==e?T():";"==e||"}"==n||")"==n||"]"==n?M():T(t)}return t}function H(e,t){return"var"==e?T(I("vardef",t),Se,V(";"),W):"keyword a"==e?T(I("form"),q,H,W):"keyword b"==e?T(I("form"),H,W):"keyword d"==e?E.stream.match(/^\s*$/,!1)?T():T(I("stat"),$,V(";"),W):"debugger"==e?T(V(";")):"{"==e?T(I("}"),B,de,W,F):";"==e?T():"if"==e?("else"==E.state.lexical.info&&E.state.cc[E.state.cc.length-1]==W&&E.state.cc.pop()(),T(I("form"),q,H,W,xe)):"function"==e?T(Ne):"for"==e?T(I("form"),je,H,W):"class"==e||s&&"interface"==t?(E.marked="keyword",T(I("form","class"==e?e:t),Ie,W)):"variable"==e?s&&"declare"==t?(E.marked="keyword",T(H)):s&&("module"==t||"enum"==t||"type"==t)&&E.stream.match(/^\s*\w/,!1)?(E.marked="keyword","enum"==t?T(Je):"type"==t?T(Re,V("operator"),ge,V(";")):T(I("form"),Ce,V("{"),I("}"),de,W,W)):s&&"namespace"==t?(E.marked="keyword",T(I("form"),U,H,W)):s&&"abstract"==t?(E.marked="keyword",T(H)):T(I("stat"),oe):"switch"==e?T(I("form"),q,V("{"),I("}","switch"),B,de,W,W,F):"case"==e?T(U,V(":")):"default"==e?T(V(":")):"catch"==e?T(I("form"),R,G,H,W,F):"export"==e?T(I("stat"),Ge,W):"import"==e?T(I("stat"),ze,W):"async"==e?T(H):"@"==t?T(U,H):M(I("stat"),U,V(";"),W)}function G(e){if("("==e)return T(Be,V(")"))}function U(e,t){return K(e,t,!1)}function z(e,t){return K(e,t,!0)}function q(e){return"("!=e?M():T(I(")"),$,V(")"),W)}function K(e,t,n){if(E.state.fatArrowAt==E.stream.start){var r=n?ee:Z;if("("==e)return T(R,I(")"),se(Be,")"),W,V("=>"),r,F);if("variable"==e)return M(R,Ce,V("=>"),r,F)}var o=n?X:Y;return k.hasOwnProperty(e)?T(o):"function"==e?T(Ne,o):"class"==e||s&&"interface"==t?(E.marked="keyword",T(I("form"),Fe,W)):"keyword c"==e||"async"==e?T(n?z:U):"("==e?T(I(")"),$,V(")"),W,o):"operator"==e||"spread"==e?T(n?z:U):"["==e?T(I("]"),Xe,W,o):"{"==e?ce(ie,"}",null,o):"quasi"==e?M(J,o):"new"==e?T(te(n)):"import"==e?T(U):T()}function $(e){return e.match(/[;\}\)\],]/)?M():M(U)}function Y(e,t){return","==e?T($):X(e,t,!1)}function X(e,t,n){var r=0==n?Y:X,o=0==n?U:z;return"=>"==e?T(R,n?ee:Z,F):"operator"==e?/\+\+|--/.test(t)||s&&"!"==t?T(r):s&&"<"==t&&E.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?T(I(">"),se(ge,">"),W,r):"?"==t?T(U,V(":"),o):T(o):"quasi"==e?M(J,r):";"!=e?"("==e?ce(z,")","call",r):"."==e?T(ae,r):"["==e?T(I("]"),$,V("]"),W,r):s&&"as"==t?(E.marked="keyword",T(ge,r)):"regexp"==e?(E.state.lastType=E.marked="operator",E.stream.backUp(E.stream.pos-E.stream.start-1),T(o)):void 0:void 0}function J(e,t){return"quasi"!=e?M():"${"!=t.slice(t.length-2)?T(J):T(U,Q)}function Q(e){if("}"==e)return E.marked="string-2",E.state.tokenize=b,T(J)}function Z(e){return w(E.stream,E.state),M("{"==e?H:U)}function ee(e){return w(E.stream,E.state),M("{"==e?H:z)}function te(e){return function(t){return"."==t?T(e?re:ne):"variable"==t&&s?T(we,e?X:Y):M(e?z:U)}}function ne(e,t){if("target"==t)return E.marked="keyword",T(Y)}function re(e,t){if("target"==t)return E.marked="keyword",T(X)}function oe(e){return":"==e?T(W,H):M(Y,V(";"),W)}function ae(e){if("variable"==e)return E.marked="property",T()}function ie(e,t){return"async"==e?(E.marked="property",T(ie)):"variable"==e||"keyword"==E.style?(E.marked="property","get"==t||"set"==t?T(le):(s&&E.state.fatArrowAt==E.stream.start&&(n=E.stream.match(/^\s*:\s*/,!1))&&(E.state.fatArrowAt=E.stream.pos+n[0].length),T(ue))):"number"==e||"string"==e?(E.marked=l?"property":E.style+" property",T(ue)):"jsonld-keyword"==e?T(ue):s&&D(t)?(E.marked="keyword",T(ie)):"["==e?T(U,fe,V("]"),ue):"spread"==e?T(z,ue):"*"==t?(E.marked="keyword",T(ie)):":"==e?M(ue):void 0;var n}function le(e){return"variable"!=e?M(ue):(E.marked="property",T(Ne))}function ue(e){return":"==e?T(z):"("==e?M(Ne):void 0}function se(e,t,n){function r(o,a){if(n?n.indexOf(o)>-1:","==o){var i=E.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),T((function(n,r){return n==t||r==t?M():M(e)}),r)}return o==t||a==t?T():n&&n.indexOf(";")>-1?M(e):T(V(t))}return function(n,o){return n==t||o==t?T():M(e,r)}}function ce(e,t,n){for(var r=3;r"),ge):void 0}function ye(e){if("=>"==e)return T(ge)}function ve(e,t){return"variable"==e||"keyword"==E.style?(E.marked="property",T(ve)):"?"==t||"number"==e||"string"==e?T(ve):":"==e?T(ge):"["==e?T(V("variable"),pe,V("]"),ve):"("==e?M(Ae,ve):void 0}function be(e,t){return"variable"==e&&E.stream.match(/^\s*[?:]/,!1)||"?"==t?T(be):":"==e?T(ge):"spread"==e?T(be):M(ge)}function _e(e,t){return"<"==t?T(I(">"),se(ge,">"),W,_e):"|"==t||"."==e||"&"==t?T(ge):"["==e?T(ge,V("]"),_e):"extends"==t||"implements"==t?(E.marked="keyword",T(ge)):"?"==t?T(ge,V(":"),ge):void 0}function we(e,t){if("<"==t)return T(I(">"),se(ge,">"),W,_e)}function ke(){return M(ge,Oe)}function Oe(e,t){if("="==t)return T(ge)}function Se(e,t){return"enum"==t?(E.marked="keyword",T(Je)):M(Ce,fe,Te,Pe)}function Ce(e,t){return s&&D(t)?(E.marked="keyword",T(Ce)):"variable"==e?(x(t),T()):"spread"==e?T(Ce):"["==e?ce(Me,"]"):"{"==e?ce(Ee,"}"):void 0}function Ee(e,t){return"variable"!=e||E.stream.match(/^\s*:/,!1)?("variable"==e&&(E.marked="property"),"spread"==e?T(Ce):"}"==e?M():"["==e?T(U,V("]"),V(":"),Ee):T(V(":"),Ce,Te)):(x(t),T(Te))}function Me(){return M(Ce,Te)}function Te(e,t){if("="==t)return T(z)}function Pe(e){if(","==e)return T(Se)}function xe(e,t){if("keyword b"==e&&"else"==t)return T(I("form","else"),H,W)}function je(e,t){return"await"==t?T(je):"("==e?T(I(")"),De,W):void 0}function De(e){return"var"==e?T(Se,Le):"variable"==e?T(Le):M(Le)}function Le(e,t){return")"==e?T():";"==e?T(Le):"in"==t||"of"==t?(E.marked="keyword",T(U,Le)):M(U,Le)}function Ne(e,t){return"*"==t?(E.marked="keyword",T(Ne)):"variable"==e?(x(t),T(Ne)):"("==e?T(R,I(")"),se(Be,")"),W,he,H,F):s&&"<"==t?T(I(">"),se(ke,">"),W,Ne):void 0}function Ae(e,t){return"*"==t?(E.marked="keyword",T(Ae)):"variable"==e?(x(t),T(Ae)):"("==e?T(R,I(")"),se(Be,")"),W,he,F):s&&"<"==t?T(I(">"),se(ke,">"),W,Ae):void 0}function Re(e,t){return"keyword"==e||"variable"==e?(E.marked="type",T(Re)):"<"==t?T(I(">"),se(ke,">"),W):void 0}function Be(e,t){return"@"==t&&T(U,Be),"spread"==e?T(Be):s&&D(t)?(E.marked="keyword",T(Be)):s&&"this"==e?T(fe,Te):M(Ce,fe,Te)}function Fe(e,t){return"variable"==e?Ie(e,t):We(e,t)}function Ie(e,t){if("variable"==e)return x(t),T(We)}function We(e,t){return"<"==t?T(I(">"),se(ke,">"),W,We):"extends"==t||"implements"==t||s&&","==e?("implements"==t&&(E.marked="keyword"),T(s?ge:U,We)):"{"==e?T(I("}"),Ve,W):void 0}function Ve(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||s&&D(t))&&E.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(E.marked="keyword",T(Ve)):"variable"==e||"keyword"==E.style?(E.marked="property",T(He,Ve)):"number"==e||"string"==e?T(He,Ve):"["==e?T(U,fe,V("]"),He,Ve):"*"==t?(E.marked="keyword",T(Ve)):s&&"("==e?M(Ae,Ve):";"==e||","==e?T(Ve):"}"==e?T():"@"==t?T(U,Ve):void 0}function He(e,t){if("?"==t)return T(He);if(":"==e)return T(ge,Te);if("="==t)return T(z);var n=E.state.lexical.prev;return M(n&&"interface"==n.info?Ae:Ne)}function Ge(e,t){return"*"==t?(E.marked="keyword",T(Ye,V(";"))):"default"==t?(E.marked="keyword",T(U,V(";"))):"{"==e?T(se(Ue,"}"),Ye,V(";")):M(H)}function Ue(e,t){return"as"==t?(E.marked="keyword",T(V("variable"))):"variable"==e?M(z,Ue):void 0}function ze(e){return"string"==e?T():"("==e?M(U):M(qe,Ke,Ye)}function qe(e,t){return"{"==e?ce(qe,"}"):("variable"==e&&x(t),"*"==t&&(E.marked="keyword"),T($e))}function Ke(e){if(","==e)return T(qe,Ke)}function $e(e,t){if("as"==t)return E.marked="keyword",T(qe)}function Ye(e,t){if("from"==t)return E.marked="keyword",T(U)}function Xe(e){return"]"==e?T():M(se(z,"]"))}function Je(){return M(I("form"),Ce,V("{"),I("}"),se(Qe,"}"),W,W)}function Qe(){return M(Ce,Te)}function Ze(e,t){return"operator"==e.lastType||","==e.lastType||f.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function et(e,t,n){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return F.lex=!0,W.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new O((e||0)-a,0,"block",!1),localVars:n.localVars,context:n.localVars&&new L(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),w(e,t)),t.tokenize!=v&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=o&&"--"!=o?r:"incdec",C(t,n,r,o,e))},indent:function(t,r){if(t.tokenize==v||t.tokenize==b)return e.Pass;if(t.tokenize!=g)return 0;var o,l=r&&r.charAt(0),u=t.lexical;if(!/^\s*else\b/.test(r))for(var s=t.cc.length-1;s>=0;--s){var c=t.cc[s];if(c==W)u=u.prev;else if(c!=xe)break}for(;("stat"==u.type||"form"==u.type)&&("}"==l||(o=t.cc[t.cc.length-1])&&(o==Y||o==X)&&!/^[,\.=+\-*:?[\(]/.test(r));)u=u.prev;i&&")"==u.type&&"stat"==u.prev.type&&(u=u.prev);var d=u.type,f=l==d;return"vardef"==d?u.indented+("operator"==t.lastType||","==t.lastType?u.info.length+1:0):"form"==d&&"{"==l?u.indented:"form"==d?u.indented+a:"stat"==d?u.indented+(Ze(t,r)?i||a:0):"switch"!=u.info||f||0==n.doubleIndentSwitch?u.align?u.column+(f?0:1):u.indented+(f?0:a):u.indented+(/^(?:case|default)\b/.test(r)?a:2*a)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:u?null:"/*",blockCommentEnd:u?null:"*/",blockCommentContinue:u?null:" * ",lineComment:u?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:u?"json":"javascript",jsonldMode:l,jsonMode:u,expressionAllowed:et,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=U&&t!=z||e.cc.pop()}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(1452))},function(e,t,n){!function(e){"use strict";var t="CodeMirror-hint",n="CodeMirror-hint-active";function r(e,t){this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var o in n)r[o]=n[o];return e.showHint(r)},e.defineExtension("showHint",(function(t){t=i(this,this.getCursor("start"),t);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var o=0;of.clientHeight+1,N=i.getScrollInfo();if(D>0){var A=j.bottom-j.top;if(_.top-(_.bottom-j.top)-A>0)f.style.top=(k=_.top-A-C)+"px",O=!1;else if(A>x){f.style.height=x-5+"px",f.style.top=(k=_.bottom-j.top-C)+"px";var R=i.getCursor();o.from.ch!=R.ch&&(_=i.cursorCoords(R),f.style.left=(w=_.left-S)+"px",j=f.getBoundingClientRect())}}var B,F=j.right-P;if(F>0&&(j.right-j.left>P&&(f.style.width=P-5+"px",F-=j.right-j.left-P),f.style.left=(w=_.left-F-S)+"px"),L)for(var I=f.firstChild;I;I=I.nextSibling)I.style.paddingRight=i.display.nativeBarWidth+"px";return i.addKeyMap(this.keyMap=u(r,{moveFocus:function(e,t){a.changeActive(a.selectedHint+e,t)},setFocus:function(e){a.changeActive(e)},menuSize:function(){return a.screenAmount()},length:h.length,close:function(){r.close()},pick:function(){a.pick()},data:o})),r.options.closeOnUnfocus&&(i.on("blur",this.onBlur=function(){B=setTimeout((function(){r.close()}),100)}),i.on("focus",this.onFocus=function(){clearTimeout(B)})),i.on("scroll",this.onScroll=function(){var e=i.getScrollInfo(),t=i.getWrapperElement().getBoundingClientRect(),n=k+N.top-e.top,o=n-(d.pageYOffset||(c.documentElement||c.body).scrollTop);if(O||(o+=f.offsetHeight),o<=t.top||o>=t.bottom)return r.close();f.style.top=n+"px",f.style.left=w+N.left-e.left+"px"}),e.on(f,"dblclick",(function(e){var t=s(f,e.target||e.srcElement);t&&null!=t.hintId&&(a.changeActive(t.hintId),a.pick())})),e.on(f,"click",(function(e){var t=s(f,e.target||e.srcElement);t&&null!=t.hintId&&(a.changeActive(t.hintId),r.options.completeOnSingleClick&&a.pick())})),e.on(f,"mousedown",(function(){setTimeout((function(){i.focus()}),20)})),this.scrollToActive(),e.signal(o,"select",h[this.selectedHint],f.childNodes[this.selectedHint]),!0}function d(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r0?t(e):a(o+1)}))}a(0)};return a.async=!0,a.supportsSelection=!0,a}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}r.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],o=this;this.cm.operation((function(){r.hint?r.hint(o.cm,t,r):o.cm.replaceRange(l(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),o.cm.scrollIntoView()})),this.close()},cursorActivity:function(){this.debounce&&(a(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),n=this.cm.getLine(t.line);if(t.line!=this.startPos.line||n.length-t.ch!=this.startLen-this.startPos.ch||t.ch=this.data.list.length?t=r?this.data.list.length-1:0:t<0&&(t=r?0:this.data.list.length-1),this.selectedHint!=t){var o=this.hints.childNodes[this.selectedHint];o&&(o.className=o.className.replace(" "+n,"")),(o=this.hints.childNodes[this.selectedHint=t]).className+=" "+n,this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],o)}},scrollToActive:function(){var e=this.completion.options.scrollMargin||0,t=this.hints.childNodes[Math.max(0,this.selectedHint-e)],n=this.hints.childNodes[Math.min(this.data.list.length-1,this.selectedHint+e)],r=this.hints.firstChild;t.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",{resolve:p}),e.registerHelper("hint","fromList",(function(t,n){var r,o=t.getCursor(),a=t.getTokenAt(o),i=e.Pos(o.line,a.start),l=o;a.start,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)}(n(1452))},function(e,t,n){!function(e){"use strict";var t={active:1,after:1,before:1,checked:1,default:1,disabled:1,empty:1,enabled:1,"first-child":1,"first-letter":1,"first-line":1,"first-of-type":1,focus:1,hover:1,"in-range":1,indeterminate:1,invalid:1,lang:1,"last-child":1,"last-of-type":1,link:1,not:1,"nth-child":1,"nth-last-child":1,"nth-last-of-type":1,"nth-of-type":1,"only-of-type":1,"only-child":1,optional:1,"out-of-range":1,placeholder:1,"read-only":1,"read-write":1,required:1,root:1,selection:1,target:1,valid:1,visited:1};e.registerHelper("hint","css",(function(n){var r=n.getCursor(),o=n.getTokenAt(r),a=e.innerMode(n.getMode(),o.state);if("css"==a.mode.name){if("keyword"==o.type&&0=="!important".indexOf(o.string))return{list:["!important"],from:e.Pos(r.line,o.start),to:e.Pos(r.line,o.end)};var i=o.start,l=r.ch,u=o.string.slice(0,l-i);/[^\w$_-]/.test(u)&&(u="",i=l=r.ch);var s=e.resolveMode("text/css"),c=[],d=a.state.state;return"pseudo"==d||"variable-3"==o.type?f(t):"block"==d||"maybeprop"==d?f(s.propertyKeywords):"prop"==d||"parens"==d||"at"==d||"params"==d?(f(s.valueKeywords),f(s.colorKeywords)):"media"!=d&&"media_parens"!=d||(f(s.mediaTypes),f(s.mediaFeatures)),c.length?{list:c,from:e.Pos(r.line,i),to:e.Pos(r.line,l)}:void 0}function f(e){for(var t in e)u&&0!=t.lastIndexOf(u,0)||c.push(t)}}))}(n(1452),n(1477))},function(e,t,n){!function(e){"use strict";var t="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),n=["_blank","_self","_top","_parent"],r=["ascii","utf-8","utf-16","latin1","latin1"],o=["get","post","put","delete"],a=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],i=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],l={attrs:{}},u={a:{attrs:{href:null,ping:null,type:null,media:i,target:n,hreflang:t}},abbr:l,acronym:l,address:l,applet:l,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:i,hreflang:t,type:null,shape:["default","rect","circle","poly"]}},article:l,aside:l,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:l,base:{attrs:{href:null,target:n}},basefont:l,bdi:l,bdo:l,big:l,blockquote:{attrs:{cite:null}},body:l,br:l,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:a,formmethod:o,formnovalidate:["","novalidate"],formtarget:n,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:l,center:l,cite:l,code:l,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:l,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:l,dir:l,div:l,dl:l,dt:l,em:l,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:l,figure:l,font:l,footer:l,form:{attrs:{action:null,name:null,"accept-charset":r,autocomplete:["on","off"],enctype:a,method:o,novalidate:["","novalidate"],target:n}},frame:l,frameset:l,h1:l,h2:l,h3:l,h4:l,h5:l,h6:l,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:l,hgroup:l,hr:l,html:{attrs:{manifest:null},children:["head","body"]},i:l,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:a,formmethod:o,formnovalidate:["","novalidate"],formtarget:n,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:l,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:l,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:t,media:i,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:l,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:r,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:l,noframes:l,noscript:l,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:l,param:{attrs:{name:null,value:null}},pre:l,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:l,rt:l,ruby:l,s:l,samp:l,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:r}},section:l,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:l,source:{attrs:{src:null,type:null,media:null}},span:l,strike:l,strong:l,style:{attrs:{type:["text/css"],media:i,scoped:null}},sub:l,summary:l,sup:l,table:l,tbody:l,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:l,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:l,time:{attrs:{datetime:null}},title:l,tr:l,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:t}},tt:l,u:l,ul:l,var:l,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:l},s={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],autocorrect:["true","false"],autocapitalize:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};function c(e){for(var t in s)s.hasOwnProperty(t)&&(e.attrs[t]=s[t])}for(var d in c(l),u)u.hasOwnProperty(d)&&u[d]!=l&&c(u[d]);function f(t,n){var r={schemaInfo:u};if(n)for(var o in n)r[o]=n[o];return e.hint.xml(t,r)}e.htmlSchema=u,e.registerHelper("hint","html",f)}(n(1452),n(1608))},function(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t,n){return n?e.indexOf(t)>=0:0==e.lastIndexOf(t,0)}function r(r,o){var a=o&&o.schemaInfo,i=o&&o.quoteChar||'"',l=o&&o.matchInMiddle;if(a){var u=r.getCursor(),s=r.getTokenAt(u);if(s.end>u.ch&&(s.end=u.ch,s.string=s.string.slice(0,u.ch-s.start)),(b=e.innerMode(r.getMode(),s.state)).mode.xmlCurrentTag){var c,d,f=[],p=!1,h=/\btag\b/.test(s.type)&&!/>$/.test(s.string),m=h&&/^\w/.test(s.string);if(m){var g=r.getLine(u.line).slice(Math.max(0,s.start-2),s.start),y=/<\/$/.test(g)?"close":/<$/.test(g)?"open":null;y&&(d=s.start-("close"==y?2:1))}else h&&"<"==s.string?y="open":h&&"")}else{var C=(w=v&&a[v.name])&&w.attrs,E=a["!attrs"];if(!C&&!E)return;if(C){if(E){var M={};for(var T in E)E.hasOwnProperty(T)&&(M[T]=E[T]);for(var T in C)C.hasOwnProperty(T)&&(M[T]=C[T]);C=M}}else C=E;if("string"==s.type||"="==s.string){var P,x=(g=r.getRange(t(u.line,Math.max(0,u.ch-60)),t(u.line,"string"==s.type?s.start:s.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!x||!C.hasOwnProperty(x[1])||!(P=C[x[1]]))return;if("function"==typeof P&&(P=P.call(this,r)),"string"==s.type){c=s.string;var j=0;/['"]/.test(s.string.charAt(0))&&(i=s.string.charAt(0),c=s.string.slice(1),j++);var D=s.string.length;if(/['"]/.test(s.string.charAt(D-1))&&(i=s.string.charAt(D-1),c=s.string.substr(j,D-2)),j){var L=r.getLine(u.line);L.length>s.end&&L.charAt(s.end)==i&&s.end++}p=!0}function e(e){if(e)for(var t=0;t",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,i){i&&i!=e.Init&&(t.removeKeyMap(o),t.state.closeBrackets=null),n&&(a(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(o))}));var o={Backspace:u,Enter:s};function a(e){for(var t=0;t=0;u--){var c=i[u].head;t.replaceRange("",n(c.line,c.ch-1),n(c.line,c.ch+1),"+delete")}}function s(t){var n=l(t),o=n&&r(n,"explode");if(!o||t.getOption("disableInput"))return e.Pass;for(var a=t.listSelections(),i=0;i0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function d(t,o){var a=l(t);if(!a||t.getOption("disableInput"))return e.Pass;var i=r(a,"pairs"),u=i.indexOf(o);if(-1==u)return e.Pass;for(var s,d=r(a,"closeBefore"),f=r(a,"triples"),h=i.charAt(u+1)==o,m=t.listSelections(),g=u%2==0,y=0;y1&&f.indexOf(o)>=0&&t.getRange(n(_.line,_.ch-2),_)==o+o){if(_.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(_.line,_.ch-2))))return e.Pass;v="addFour"}else if(h){var k=0==_.ch?" ":t.getRange(n(_.line,_.ch-1),_);if(e.isWordChar(w)||k==o||e.isWordChar(k))return e.Pass;v="both"}else{if(!g||!(0===w.length||/\s/.test(w)||d.indexOf(w)>-1))return e.Pass;v="both"}else v=h&&p(t,_)?"both":f.indexOf(o)>=0&&t.getRange(_,n(_.line,_.ch+3))==o+o+o?"skipThree":"skip";if(s){if(s!=v)return e.Pass}else s=v}var O=u%2?i.charAt(u-1):o,S=u%2?o:i.charAt(u+1);t.operation((function(){if("skip"==s)t.execCommand("goCharRight");else if("skipThree"==s)for(var e=0;e<3;e++)t.execCommand("goCharRight");else if("surround"==s){var n=t.getSelections();for(e=0;e'"]=function(e){return r(e)}),t.addKeyMap(i)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function r(r){if(r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),a=[],u=r.getOption("autoCloseTags"),s=0;sc.ch&&(m=m.slice(0,m.length-d.end+c.ch));var b=m.toLowerCase();if(!m||"string"==d.type&&(d.end!=c.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&h.close||d.string.indexOf("/")==c.ch-d.start-1||y&&i(y,b)>-1||l(r,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(p)||[],m,c,!0))return e.Pass;var _="object"==typeof u&&u.emptyTags;if(_&&i(_,m)>-1)a[s]={text:"/>",newPos:e.Pos(c.line,c.ch+2)};else{var w=v&&i(v,b)>-1;a[s]={indent:w,text:">"+(w?"\n\n":"")+"",newPos:w?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}}var k="object"==typeof u&&u.dontIndentOnAutoClose;for(s=o.length-1;s>=0;s--){var O=a[s];r.replaceRange(O.text,o[s].head,o[s].anchor,"+insert");var S=r.listSelections().slice(0);S[s]={head:O.newPos,anchor:O.newPos},r.setSelections(S),!k&&O.indent&&(r.indentLine(O.newPos.line,null,!0),r.indentLine(O.newPos.line+1,null,!0))}}function o(t,n){for(var r=t.listSelections(),o=[],a=n?"/":""!=t.getLine(c.line).charAt(d.end)&&(h+=">"),o[s]=h}if(t.replaceSelections(o),r=t.listSelections(),!u)for(s=0;s=0&&n[s]==r;s--)++u;for(o=l.to,s=1;st.cursorCoords(n,"window").top&&((c=r).style.opacity=.4)})))};i(t,m(t),s,f,(function(n,o){var a=e.keyName(n),i=t.getOption("extraKeys"),l=i&&i[a]||e.keyMap[t.getOption("keyMap")][a];"findNext"==l||"findPrev"==l||"findPersistentNext"==l||"findPersistentPrev"==l?(e.e_stop(n),d(t,r(t),o),t.execCommand(l)):"find"!=l&&"findPersistent"!=l||(e.e_stop(n),f(o,n))})),a&&s&&(d(t,u,s),p(t,n))}else l(t,m(t),"Search for:",s,(function(e){e&&!u.query&&t.operation((function(){d(t,u,e),u.posFrom=u.posTo=t.getCursor(),p(t,n)}))}))}function p(t,n,o){t.operation((function(){var i=r(t),l=a(t,i.query,n?i.posFrom:i.posTo);(l.find(n)||(l=a(t,i.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(n))&&(t.setSelection(l.from(),l.to()),t.scrollIntoView({from:l.from(),to:l.to()},20),i.posFrom=l.from(),i.posTo=l.to(),o&&o(l.from(),l.to()))}))}function h(e){e.operation((function(){var t=r(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))}))}function m(e){return''+e.phrase("Search:")+' '+e.phrase("(Use /re/ syntax for regexp search)")+""}function g(e){return' '+e.phrase("(Use /re/ syntax for regexp search)")+""}function y(e){return''+e.phrase("With:")+' '}function v(e){return''+e.phrase("Replace?")+" "}function b(e,t,n){e.operation((function(){for(var r=a(e,t);r.findNext();)if("string"!=typeof t){var o=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,(function(e,t){return o[t]})))}else r.replace(n)}))}function _(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||r(e).lastQuery,o=''+(t?e.phrase("Replace all:"):e.phrase("Replace:"))+"";l(e,o+g(e),o,n,(function(n){n&&(n=c(n),l(e,y(e),e.phrase("Replace with:"),"",(function(r){if(r=s(r),t)b(e,n,r);else{h(e);var o=a(e,n,e.getCursor("from")),i=function(){var t,s=o.from();!(t=o.findNext())&&(o=a(e,n),!(t=o.findNext())||s&&o.from().line==s.line&&o.from().ch==s.ch)||(e.setSelection(o.from(),o.to()),e.scrollIntoView({from:o.from(),to:o.to()}),u(e,v(e),e.phrase("Replace?"),[function(){l(t)},i,function(){b(e,n,r)}]))},l=function(e){o.replace("string"==typeof n?r:r.replace(/\$(\d)/g,(function(t,n){return e[n]}))),i()};i()}})))}))}}e.commands.find=function(e){h(e),f(e)},e.commands.findPersistent=function(e){h(e),f(e,!1,!0)},e.commands.findPersistentNext=function(e){f(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){f(e,!0,!0,!0)},e.commands.findNext=f,e.commands.findPrev=function(e){f(e,!0)},e.commands.clearSearch=h,e.commands.replace=_,e.commands.replaceAll=function(e){_(e,!0)}}(n(1452),n(1476),n(1500))},function(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){setTimeout((function(){var r=!1,o=e.getInputField();"TEXTAREA"==o.nodeName?r=!o.value:1==e.lineCount()&&(r=!/[^\u200b]/.test(o.querySelector(".CodeMirror-line").textContent)),r?n(e):t(e)}),20)}function o(e){i(e)&&n(e)}function a(e){var r=e.getWrapperElement(),o=i(e);r.className=r.className.replace(" CodeMirror-empty","")+(o?" CodeMirror-empty":""),o?n(e):t(e)}function i(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(n,i,l){var u=l&&l!=e.Init;if(i&&!u)n.on("blur",o),n.on("change",a),n.on("swapDoc",a),e.on(n.getInputField(),"compositionupdate",n.state.placeholderCompose=function(){r(n)}),a(n);else if(!i&&u){n.off("blur",o),n.off("change",a),n.off("swapDoc",a),e.off(n.getInputField(),"compositionupdate",n.state.placeholderCompose),t(n);var s=n.getWrapperElement();s.className=s.className.replace(" CodeMirror-empty","")}i&&!n.hasFocus()&&o(n)}))}(n(1452))},function(e,t,n){n(1452).defineExtension("colorpicker",(function(){var e,t,n,r,o,a,i,l,u,s,c,d,f,p,h,m,g,y,v,b,_,w,k,O,S,C,E,M,T,P,x,j,D,L=function(){return ET_Builder.Frames.top},N={trim:function(e){return e.replace(/^\s+|\s+$/g,"")},format:function(e,t){if("hex"==t){var n=e.r.toString(16);e.r<16&&(n="0"+n);var r=e.g.toString(16);e.g<16&&(r="0"+r);var o=e.b.toString(16);return e.b<16&&(o="0"+o),"#"+[n,r,o].join("")}return"rgb"==t?void 0===e.a?"rgb("+[e.r,e.g,e.b].join(",")+")":"rgba("+[e.r,e.g,e.b,e.a].join(",")+")":"hsl"==t?void 0===e.a?"hsl("+[e.h,e.s+"%",e.l+"%"].join(",")+")":"hsla("+[e.h,e.s+"%",e.l+"%",e.a].join(",")+")":e},parse:function(e){if("string"==typeof e){if(e.indexOf("rgb(")>-1){for(var t=0,n=(a=e.replace("rgb(","").replace(")","").split(",")).length;t-1){for(t=0,n=(a=e.replace("rgba(","").replace(")","").split(",")).length;t-1){for(t=0,n=(a=e.replace("hsl(","").replace(")","").split(",")).length;t-1){for(t=0,n=(a=e.replace("hsla(","").replace(")","").split(",")).length;t.5?u/(2-a-i):u/(a+i),a){case e:r=(t-n)/u+(t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},HSLtoRGB:function(e,t,n){var r,o,a;if(e/=360,n/=100,0==(t/=100))r=o=a=n;else{var i=n<.5?n*(1+t):n+t-n*t,l=2*n-i;r=this.HUEtoRGB(l,i,e+1/3),o=this.HUEtoRGB(l,i,e),a=this.HUEtoRGB(l,i,e-1/3)}return{r:255*r,g:255*o,b:255*a}}},A=[{rgb:"#ff0000",start:0},{rgb:"#ffff00",start:.17},{rgb:"#00ff00",start:.33},{rgb:"#00ffff",start:.5},{rgb:"#0000ff",start:.67},{rgb:"#ff00ff",start:.83},{rgb:"#ff0000",start:1}],R=(oe(),function(){}),B=0,F={},I=!1,W=!1,V=2e3;function H(e,t,n){if("string"!=typeof e)this.el=e;else{var r=L().document.createElement(e);for(var o in this.uniqId=B++,r.className=t,n=n||{})r.setAttribute(o,n[o]);this.el=r}}function G(e,t,n){S.val(e),C.val(t),E.val(n),M.val(b)}function U(e,t,n){T.val(e),P.val(t+"%"),x.val(n+"%"),j.val(b)}function z(){return N.format({r:S.int(),g:C.int(),b:E.int()},"hex")}function q(){return N.HSVtoRGB(_,w,k)}function K(){return N.format(q(),"hex")}function $(){var e=N.HSVtoRGB(_,w,k);return N.RGBtoHSL(e.r,e.g,e.b)}function Y(e){if("rgb"==(e=e||"hex"))return(n=q()).a=1==b?void 0:b,N.format(n,"rgb");if("hsl"==e){var t=$();return t.a=1==b?void 0:b,N.format(t,"hsl")}var n=q();return N.format(n,"hex")}function X(e){c.css("background-color",e)}function J(){var e=y.data("format")||"hex",t=null;if("hex"==e)O.val(K());else if("rgb"==e)G((t=q()).r,t.g,t.b);else if("hsl"==e){var n=$();U(n.h,n.s,n.l)}X(Y("rgb")),t=q(),ae(N.format(t,"rgb")),"function"==typeof R&&(isNaN(b)||R(Y(e)))}function Q(e){e.preventDefault();var n=t.position(),o=r.width(),a=r.height(),l=e.clientX-n.left,u=e.clientY-n.top;l<0?l=0:l>o&&(l=o),u<0?u=0:u>a&&(u=a),i.css({left:l-5+"px",top:u-5+"px"}),i.data("pos",{x:l,y:u}),ue(),J()}function Z(e,t,n){var r={r:parseInt(e.r+(t.r-e.r)*n,10),g:parseInt(e.g+(t.g-e.g)*n,10),b:parseInt(e.b+(t.b-e.b)*n,10)};return N.format(r,"hex")}function ee(e){for(var t,n,r=0;r=e){t=A[r-1],n=A[r];break}return t&&n?Z(t,n,(e-t.start)/(n.start-t.start)):A[0].rgb}function te(e){r.css("background-color",e)}function ne(e){_=e}function re(e){var t,n=d.offset().left,r=n+d.width(),o=e?se(e).clientX:n+_/360*(r-n);t=or?100:(o-n)/(r-n)*100;var a=d.width()*(t/100);l.css({left:a-Math.ceil(l.width()/2)+"px"}),l.data("pos",{x:a}),te(ee(t/100)),ne(t/100*360),J()}function oe(){for(var e="",t=["","-o-","-ms-","-moz-","-webkit-"],n=L().document.createElement("div"),r=0;rr?100:(o-n)/(r-n)*100;var a=p.width()*(t/100);g.css({left:a-Math.ceil(g.width()/2)+"px"}),g.data("pos",{x:a}),le(),Le(),J()}function le(){var e=g.data("pos")||{x:0},t=Math.round(e.x/p.width()*100)/100;b=isNaN(t)?1:t}function ue(){var e=i.data("pos")||{x:0,y:0},t=l.data("pos")||{x:0},n=r.width(),o=r.height(),a=t.x/d.width()*360,u=e.x/n,s=(o-e.y)/o;0==n&&(a=0,u=0,s=0),_=a,w=u,k=s}function se(e){return e.touches&&e.touches[0]?e.touches[0]:e}function ce(e){var t=e.which,n=!1;return 37!=t&&39!=t&&8!=t&&46!=t&&9!=t||(n=!0),!(!n&&(t<48||t>57))}function de(e){var t=S.val(),n=C.val(),r=E.val();""!=t&&""!=n&&""!=r&&(parseInt(t)>255?S.val(255):S.val(parseInt(t)),parseInt(n)>255?C.val(255):C.val(parseInt(n)),parseInt(r)>255?E.val(255):E.val(parseInt(r)),me(z()))}function fe(){var e=r.width()*w,t=r.height()*(1-k);i.css({left:e-5+"px",top:t-5+"px"}),i.data("pos",{x:e,y:t});var n=d.width()*(_/360);l.css({left:n-7.5+"px"}),l.data("pos",{x:n});var o=p.width()*(b||0);g.css({left:o-7.5+"px"}),g.data("pos",{x:o})}function pe(e,t,n,r){b=r,_=e,w=t,k=n}function he(e){y.data("format",e),Ne()}function me(e){var t=e||"#FF0000",n=N.parse(t);he(n.type),te(t);var r=N.RGBtoHSV(n.r,n.g,n.b);pe(r.h,r.s,r.v,n.a),fe(),re(),J()}function ge(e,t,n){e.addEventListener(t,n)}function ye(e,t,n){e.removeEventListener(t,n)}function ve(e){r.data("isDown",!0),Q(e)}function be(e){r.data("isDown",!1)}function _e(e){e.preventDefault(),n.data("isDown",!0)}function we(e){e.preventDefault(),f.data("isDown",!0)}function ke(e){n.data("isDown",!0),re(e)}function Oe(e){f.data("isDown",!0),ie(e)}function Se(e){if(e.which<65||e.which>70)return ce(e)}function Ce(e){var t=O.val();"#"==t.charAt(0)&&7==t.length&&me(t)}function Ee(e){Ae()}function Me(){ge(r.el,"mousedown",ve),ge(r.el,"mouseup",be),ge(l.el,"mousedown",_e),ge(g.el,"mousedown",we),ge(d.el,"mousedown",ke),ge(p.el,"mousedown",Oe),ge(O.el,"keydown",Se),ge(O.el,"keyup",Ce),ge(S.el,"keydown",ce),ge(S.el,"keyup",de),ge(C.el,"keydown",ce),ge(C.el,"keyup",de),ge(E.el,"keydown",ce),ge(E.el,"keyup",de),ge(L().document,"mouseup",xe),ge(L().document,"mousemove",je),ge(m.el,"click",Ee)}function Te(e){var t=new H(e).closest("codemirror-colorview"),n=new H(e).closest("codemirror-colorpicker"),r=new H(e).closest("CodeMirror");return e.nodeName,!!(n||t||r)}function Pe(e){return"HTML"==e.nodeName}function xe(e){r.data("isDown",!1),n.data("isDown",!1),f.data("isDown",!1),Pe(e.target)||0==Te(e.target)&&Ue()}function je(e){r.data("isDown")&&Q(e),n.data("isDown")&&re(e),f.data("isDown")&&ie(e)}function De(){ye(r.el,"mousedown",ve),ye(r.el,"mouseup",be),ye(l.el,"mousedown",_e),ye(g.el,"mousedown",we),ye(d.el,"mousedown",ke),ye(p.el,"mousedown",Oe),ye(O.el,"keydown",Se),ye(O.el,"keyup",Ce),ye(S.el,"keydown",ce),ye(S.el,"keyup",de),ye(C.el,"keydown",ce),ye(C.el,"keyup",de),ye(E.el,"keydown",ce),ye(E.el,"keyup",de),ye(L().document,"mouseup",xe),ye(L().document,"mousemove",je),ye(m.el,"click",Ee),R=void 0}function Le(){var e=y.data("format")||"hex";if(b<1&&"hex"==e){var t="rgb";y.removeClass(e),y.addClass(t),y.data("format",t),J()}}function Ne(){var e=y.data("format")||"hex";y.removeClass("hex"),y.removeClass("rgb"),y.removeClass("hsl"),y.addClass(e)}function Ae(){var e=y.data("format")||"hex",t="hex";"hex"==e?t="rgb":"rgb"==e?t="hsl":"hsl"==e&&(t=1==b?"hex":"rgb"),y.removeClass(e),y.addClass(t),y.data("format",t),J()}function Re(e){var t=new H("div","information-item "+e);if("hex"==e){var n=new H("div","input-field hex");O=new H("input","input",{type:"text"}),n.append(O),n.append(new H("div","title").html("HEX")),t.append(n)}else"rgb"==e?(n=new H("div","input-field rgb-r"),S=new H("input","input",{type:"text"}),n.append(S),n.append(new H("div","title").html("R")),t.append(n),n=new H("div","input-field rgb-g"),C=new H("input","input",{type:"text"}),n.append(C),n.append(new H("div","title").html("G")),t.append(n),n=new H("div","input-field rgb-b"),E=new H("input","input",{type:"text"}),n.append(E),n.append(new H("div","title").html("B")),t.append(n),n=new H("div","input-field rgb-a"),M=new H("input","input",{type:"text"}),n.append(M),n.append(new H("div","title").html("A")),t.append(n)):"hsl"==e&&(n=new H("div","input-field hsl-h"),T=new H("input","input",{type:"text"}),n.append(T),n.append(new H("div","title").html("H")),t.append(n),n=new H("div","input-field hsl-s"),P=new H("input","input",{type:"text"}),n.append(P),n.append(new H("div","title").html("S")),t.append(n),n=new H("div","input-field hsl-l"),x=new H("input","input",{type:"text"}),n.append(x),n.append(new H("div","title").html("L")),t.append(n),n=new H("div","input-field hsl-a"),j=new H("input","input",{type:"text"}),n.append(j),n.append(new H("div","title").html("A")),t.append(n));return t}function Be(){e=new H(L().document.body),t=new H("div","codemirror-colorpicker"),r=new H("div","color"),i=new H("div","drag-pointer"),o=new H("div","value"),a=new H("div","saturation"),u=new H("div","control"),s=new H("div","empty"),c=new H("div","color"),n=new H("div","hue"),d=new H("div","hue-container"),l=new H("div","drag-bar"),f=new H("div","opacity"),p=new H("div","opacity-container"),h=new H("div","color-bar"),g=new H("div","drag-bar2"),y=new H("div","information hex"),v=new H("div","information-change"),m=new H("button","format-change-button",{type:"button"}).html("\u2194"),v.append(m),y.append(Re("hex")),y.append(Re("rgb")),y.append(Re("hsl")),y.append(v),o.append(i),a.append(o),r.append(a),d.append(l),n.append(d),p.append(h),p.append(g),f.append(p),u.append(n),u.append(f),u.append(s),u.append(c),t.append(r),t.append(u),t.append(y),Fe(),me()}function Fe(){for(var e=0,t=A.length;ewindow.innerWidth&&(a-=r+a-window.innerWidth),a<0&&(a=0);var i=n.top-e.el.scrollTop;o+i>window.innerHeight&&(i-=o+i-window.innerHeight),i<0&&(i=0),t.css({left:a+"px",top:i+"px"})}function He(e,n,r){De(),Me(),t.appendTo(L().document.body),t.css({position:"fixed",left:"-10000px",top:"-10000px"}),t.show(),Ve(e),I=!0,W=e.isShortCut||!1,me(n),R=function(e){r(e)},(V=e.hideDelay||2e3)>0&&Ge(V)}function Ge(e){e=e||0,ye(t.el,"mouseenter"),ye(t.el,"mouseleave"),ge(t.el,"mouseenter",(function(){clearTimeout(D)})),ge(t.el,"mouseleave",(function(){clearTimeout(D),D=setTimeout(Ue,e)})),clearTimeout(D),D=setTimeout(Ue,e)}function Ue(){I&&(De(),t.hide(),t.remove(),I=!1)}return H.prototype.closest=function(e){for(var t=this,n=!1;!(n=t.hasClass(e));){if(!t.el.parentNode)return null;t=new H(t.el.parentNode)}return n?t:null},H.prototype.removeClass=function(e){this.el.className=N.trim((" "+this.el.className+" ").replace(" "+e+" "," "))},H.prototype.hasClass=function(e){return!!this.el.className&&(" "+this.el.className+" ").indexOf(" "+e+" ")>-1},H.prototype.addClass=function(e){this.hasClass(e)||(this.el.className=this.el.className+" "+e)},H.prototype.html=function(e){return this.el.innerHTML=e,this},H.prototype.empty=function(){return this.html("")},H.prototype.append=function(e){return"string"==typeof e?this.el.appendChild(L().document.createTextNode(e)):this.el.appendChild(e.el||e),this},H.prototype.appendTo=function(e){return(e.el?e.el:e).appendChild(this.el),this},H.prototype.remove=function(){return this.el.parentNode&&this.el.parentNode.removeChild(this.el),this},H.prototype.text=function(){return this.el.textContent},H.prototype.css=function(e,t){if(2==arguments.length)this.el.style[e]=t;else if(1==arguments.length){if("string"==typeof e)return getComputedStyle(this.el)[e];var n=e||{};for(var r in n)this.el.style[r]=n[r]}return this},H.prototype.offset=function(){var e=this.el.getBoundingClientRect();return{top:e.top+L().document.body.scrollTop,left:e.left+L().document.body.scrollLeft}},H.prototype.position=function(){return{top:parseFloat(this.el.style.top),left:parseFloat(this.el.style.left)}},H.prototype.width=function(){return this.el.offsetWidth},H.prototype.height=function(){return this.el.offsetHeight},H.prototype.dataKey=function(e){return this.uniqId+"."+e},H.prototype.data=function(e,t){if(2!=arguments.length){if(1==arguments.length)return F[this.dataKey(e)];var n=Object.keys(F),r=this.uniqId+".";return n.filter((function(e){return 0==e.indexOf(r)})).map((function(e){return F[e]}))}return F[this.dataKey(e)]=t,this},H.prototype.val=function(e){return 0==arguments.length?this.el.value:(1==arguments.length&&(this.el.value=e),this)},H.prototype.int=function(){return parseInt(this.val(),10)},H.prototype.show=function(){return this.css("display","block")},H.prototype.hide=function(){return this.css("display","none")},Be(),{isShortCut:function(){return W},$root:t,show:He,hide:Ue,setColor:Ie,getColor:We}}))},function(e,t,n){!function(e){"use strict";var t=function(){return ET_Builder.Frames.top},n={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",aqua:"rgb(0, 255, 255)",aquamarine:"rgb(127, 255, 212)",azure:"rgb(240, 255, 255)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",black:"rgb(0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb(0, 0, 255)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",burlywood:"rgb(222, 184, 135)",cadetblue:"rgb(95, 158, 160)",chartreuse:"rgb(127, 255, 0)",chocolate:"rgb(210, 105, 30)",coral:"rgb(255, 127, 80)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",crimson:"rgb(237, 20, 61)",cyan:"rgb(0, 255, 255)",darkblue:"rgb(0, 0, 139)",darkcyan:"rgb(0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgray:"rgb(169, 169, 169)",darkgrey:"rgb(169, 169, 169)",darkgreen:"rgb(0, 100, 0)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb(85, 107, 47)",darkorange:"rgb(255, 140, 0)",darkorchid:"rgb(153, 50, 204)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkslateblue:"rgb(72, 61, 139)",darkslategray:"rgb(47, 79, 79)",darkslategrey:"rgb(47, 79, 79)",darkturquoise:"rgb(0, 206, 209)",darkviolet:"rgb(148, 0, 211)",deeppink:"rgb(255, 20, 147)",deepskyblue:"rgb(0, 191, 255)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb(30, 144, 255)",firebrick:"rgb(178, 34, 34)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb(34, 139, 34)",fuchsia:"rgb(255, 0, 255)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",goldenrod:"rgb(218, 165, 32)",gray:"rgb(128, 128, 128)",grey:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",greenyellow:"rgb(173, 255, 47)",honeydew:"rgb(240, 255, 240)",hotpink:"rgb(255, 105, 180)",indianred:"rgb(205, 92, 92)",indigo:"rgb(75, 0, 130)",ivory:"rgb(255, 255, 240)",khaki:"rgb(240, 230, 140)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lightblue:"rgb(173, 216, 230)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgreen:"rgb(144, 238, 144)",lightgray:"rgb(211, 211, 211)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightsalmon:"rgb(255, 160, 122)",lightseagreen:"rgb(32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightyellow:"rgb(255, 255, 224)",lime:"rgb(0, 255, 0)",limegreen:"rgb(50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",maroon:"rgb(128, 0, 0)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb(0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumpurple:"rgb(147, 112, 219)",mediumseagreen:"rgb(60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb(0, 250, 154)",mediumturquoise:"rgb(72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb(25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navy:"rgb(0, 0, 128)",oldlace:"rgb(253, 245, 230)",olive:"rgb(128, 128, 0)",olivedrab:"rgb(107, 142, 35)",orange:"rgb(255, 165, 0)",orangered:"rgb(255, 69, 0)",orchid:"rgb(218, 112, 214)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",paleturquoise:"rgb(175, 238, 238)",palevioletred:"rgb(219, 112, 147)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",plum:"rgb(221, 160, 221)",powderblue:"rgb(176, 224, 230)",purple:"rgb(128, 0, 128)",rebeccapurple:"rgb(102, 51, 153)",red:"rgb(255, 0, 0)",rosybrown:"rgb(188, 143, 143)",royalblue:"rgb(65, 105, 225)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb(46, 139, 87)",seashell:"rgb(255, 245, 238)",sienna:"rgb(160, 82, 45)",silver:"rgb(192, 192, 192)",skyblue:"rgb(135, 206, 235)",slateblue:"rgb(106, 90, 205)",slategray:"rgb(112, 128, 144)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",springgreen:"rgb(0, 255, 127)",steelblue:"rgb(70, 130, 180)",tan:"rgb(210, 180, 140)",teal:"rgb(0, 128, 128)",thistle:"rgb(216, 191, 216)",tomato:"rgb(255, 99, 71)",turquoise:"rgb(64, 224, 208)",violet:"rgb(238, 130, 238)",wheat:"rgb(245, 222, 179)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellowgreen:"rgb(154, 205, 50)",transparent:"rgba(0, 0, 0, 0)"},r="codemirror-colorview",o="codemirror-colorview-background",a=["comment"];function i(e,t){"setValue"==t.origin?(e.state.colorpicker.close_color_picker(),e.state.colorpicker.init_color_update(),e.state.colorpicker.style_color_update()):e.state.colorpicker.style_color_update(e.getCursor().line)}function l(e,t){e.state.colorpicker.isUpdate||(e.state.colorpicker.isUpdate=!0,e.state.colorpicker.close_color_picker(),e.state.colorpicker.init_color_update(),e.state.colorpicker.style_color_update())}function u(e,t){i(e,{origin:"setValue"})}function s(e,t){e.state.colorpicker.keyup(t)}function c(e,t){e.state.colorpicker.is_edit_mode()&&e.state.colorpicker.check_mousedown(t)}function d(e,t){i(e,{origin:"setValue"})}function f(e){e.state.colorpicker.close_color_picker()}function p(e,t){var n=void 0;return function(r,o){n&&clearTimeout(n),n=setTimeout((function(){e(r,o)}),t||300)}}function h(e,t){return!(!e||!e.className)&&(" "+e.className+" ").indexOf(" "+t+" ")>-1}function m(e,t){t="boolean"==typeof t?{mode:"view"}:Object.assign({mode:"view"},t||{}),this.opt=t,this.cm=e,this.markers={},a=this.opt.excluded_token||a,this.cm.colorpicker?this.colorpicker=this.cm.colorpicker():this.opt.colorpicker&&(this.colorpicker=this.opt.colorpicker),this.init_event()}e.defineOption("colorpicker",!1,(function(t,n,r){r&&r!=e.Init&&t.state.colorpicker&&(t.state.colorpicker.destroy(),t.state.colorpicker=null),n&&(t.state.colorpicker=new m(t,n))})),m.prototype.init_event=function(){var e,t;this.cm.on("mousedown",c),this.cm.on("keyup",s),this.cm.on("change",i),this.cm.on("update",l),this.cm.on("refresh",u),this.onPasteCallback=(e=this.cm,t=d,function(n){t.call(this,e,n)}),this.cm.getWrapperElement().addEventListener("paste",this.onPasteCallback),this.is_edit_mode()&&this.cm.on("scroll",p(f,50))},m.prototype.is_edit_mode=function(){return"edit"==this.opt.mode},m.prototype.is_view_mode=function(){return"view"==this.opt.mode},m.prototype.destroy=function(){this.cm.off("mousedown",c),this.cm.off("keyup",s),this.cm.off("change",i),this.cm.getWrapperElement().removeEventListener("paste",this.onPasteCallback),this.is_edit_mode()&&this.cm.off("scroll")},m.prototype.hasClass=function(e,t){return!!e.className&&(" "+e.className+" ").indexOf(" "+t+" ")>-1},m.prototype.check_mousedown=function(e){this.hasClass(e.target,o)?this.open_color_picker(e.target.parentNode):this.close_color_picker()},m.prototype.popup_color_picker=function(e){var t=this.cm.getCursor(),n=this,r={lineNo:t.line,ch:t.ch,color:e||"#FFFFFF",isShortCut:!0};Object.keys(this.markers).forEach((function(e){if(("#"+e).indexOf("#"+r.lineNo+":")>-1){var t=n.markers[e];t.ch<=r.ch&&r.ch<=t.ch+t.color.length&&(r.ch=t.ch,r.color=t.color,r.nameColor=t.nameColor)}})),this.open_color_picker(r)},m.prototype.open_color_picker=function(e){var t=e.lineNo,n=e.ch,r=e.nameColor,o=e.color;if(this.colorpicker){var a=this,i=o,l=this.cm.charCoords({line:t,ch:n});this.colorpicker.show({left:l.left,top:l.bottom,isShortCut:e.isShortCut||!1,hideDelay:a.opt.hideDelay||2e3},r||o,(function(e){a.cm.replaceRange(e,{line:t,ch:n},{line:t,ch:n+i.length},"*colorpicker"),i=e}))}},m.prototype.close_color_picker=function(e){this.colorpicker&&this.colorpicker.hide()},m.prototype.key=function(e,t){return[e,t].join(":")},m.prototype.keyup=function(e){this.colorpicker&&("Escape"==e.key||0==this.colorpicker.isShortCut())&&this.colorpicker.hide()},m.prototype.init_color_update=function(){this.markers={}},m.prototype.style_color_update=function(e){if(e)this.match(e);else for(var t=this.cm.lineCount(),n=0;n-1||r[a].indexOf("rgb")>-1||r[a].indexOf("hsl")>-1)this.render(o,e,t,r[a]);else{var l=n[r[a]];l&&this.render(o,e,t,r[a],l)}},m.prototype.match=function(e){var t=this.cm.getLineHandle(e),n=this;this.cm.operation((function(){n.submatch(e,t)}))},m.prototype.make_element=function(){var e=t().document.createElement("div");return e.className=r,this.is_edit_mode()?e.title="open color picker":e.title="",e.back_element=this.make_background_element(),e.appendChild(e.back_element),e},m.prototype.make_background_element=function(){var e=t().document.createElement("div");return e.className=o,e},m.prototype.set_state=function(e,t,n,r){var o=this.create_marker(e,t);return o.lineNo=e,o.ch=t,o.color=n,o.nameColor=r,o},m.prototype.create_marker=function(e,t){var n=this.key(e,t);return this.markers[n]||(this.markers[n]=this.make_element()),this.markers[n]},m.prototype.has_marker=function(e,t){var n=this.key(e,t);return!!this.markers[n]},m.prototype.update_element=function(e,t){e.back_element.style.backgroundColor=t},m.prototype.set_mark=function(e,t,n){this.cm.setBookmark({line:e,ch:t},{widget:n,handleMouseEvents:!0})},m.prototype.is_excluded_token=function(e,t){for(var n=this.cm.getTokenTypeAt({line:e,ch:t}),r=0,o=0,i=a.length;o0},m.prototype.render=function(e,t,n,r,o){var a=n.text.indexOf(r,e.next);if(!0!==this.is_excluded_token(t,a)){if(e.next=a+r.length,this.has_marker(t,a))return this.update_element(this.create_marker(t,a),o||r),void this.set_state(t,a,r,o);var i=this.create_marker(t,a);this.update_element(i,o||r),this.set_state(t,a,r,o||r),this.set_mark(t,a,i)}}}(n(1452))},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(10)),o=s(n(4)),a=s(n(8)),i=s(n(816)),l=s(n(41)),u=n(802);function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var n=0;n0&&n.length<3||(t.state.loading||t.setState({loading:!0}),t.getOptions(e,n,r))})),B(A(t),"getOptions",(function(e,n,r){var o=t.props.arguments(e,n,r),a=(0,i.default)(E.default.getAjaxifiedCache(o.action,o.post_type));if(""===n&&!(0,h.default)((0,u.default)(a,["results",r],[]))){var l=(0,h.default)(t.state.selected)||""===e?t.getSelectedOption(e,a):t.state.selected,c=(0,u.default)(a,"meta",{}),d=(0,u.default)(a,["results",r]);return(0,_.default)(c,"pagination.pages.current",r),l&&(0,s.default)((0,u.default)(d,"[1].value"))!==e&&d.splice(1,0,l),void t.updateCurrentOptions(d,c)}t._requestOptions(e,n,r)})),B(A(t),"getSelectedOption",(function(e,n){var r;if(!(0,h.default)(n)){if((0,f.default)(n.results,(function(t){r||(r=(0,p.default)(t,(function(t){return(0,s.default)(t.value)===(0,s.default)(e)})))})),!(0,h.default)(r))return(0,_.default)(r,"meta.post_type",""),t.setState({selected:r}),r;t._requestOptions(e,"",1)}})),B(A(t),"updateCurrentOptions",(function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=n||t.state.meta;t.setState({options:e,meta:o,loading:r},(function(){(0,h.default)(t.props.value)&&t.handleOnChange(t.valuePrefix+(0,u.default)(e,"0.value","").toString())}))})),B(A(t),"renderLoading",(function(){return o.default.createElement("div",{className:"et-fb-select-ajaxified__spinner"})})),B(A(t),"renderNoResults",(function(){return o.default.createElement("li",{className:"et-fb-select-options-filter select-option-item et-fb-select-ajaxified__element"},ETBuilderBackend.i18n.selectControl.noResults)})),B(A(t),"renderBeforeList",(function(){return o.default.createElement("li",{className:"et-fb-select-options-filter select-option-item et-fb-select-ajaxified__element et-fb-select-ajaxified__search"},o.default.createElement(S.default,{ref:function(e){return t.inputRef=e},type:"text",name:"search",value:t.state.search,_onChange:t.handleSearch,additional_attrs:{placeholder:ETBuilderBackend.i18n.selectControl.typeToSearch}}),t.state.loading&&t.renderLoading())})),B(A(t),"renderAfterList",(function(e){return(0,h.default)(t.state.options)&&!t.state.loading?o.default.createElement(o.Fragment,null,t.renderNoResults(),e):o.default.createElement(o.Fragment,null,e,t.renderPagination())})),t.state={search:"",options:{},meta:{pagination:{results:{per_page:20,total:0},pages:{current:1,total:0}}},request:null,loading:!1,open:!1,selected:!1},t.valuePrefix="_",t.onClickPaginationPrev=t.onClickPaginationPrev.bind(A(t)),t.onClickPaginationNext=t.onClickPaginationNext.bind(A(t)),t}return t=v,(n=[{key:"onClickPaginationPrev",value:function(){this.handleOnPagination(this.state.meta.pagination.pages.current-1)}},{key:"onClickPaginationNext",value:function(){this.handleOnPagination(this.state.meta.pagination.pages.current+1)}},{key:"renderPagination",value:function(){var e=this.state.meta.pagination;if(e.pages.current>e.pages.total||e.pages.total<2)return null;var t=ETBuilderBackend.i18n.selectControl.pagination.replace("%1$s",e.pages.current).replace("%2$s",e.pages.total);return o.default.createElement("li",{className:"et-fb-select-options-filter select-option-item et-fb-select-ajaxified__element et-fb-select-ajaxified__pagination"},o.default.createElement("div",{className:"et-fb-select-ajaxified__pagination-container"},o.default.createElement("button",{type:"button",className:"et-fb-select-ajaxified__pagination-button et-fb-select-ajaxified__pagination-button--previous",onClick:this.onClickPaginationPrev},o.default.createElement(C.default,{icon:"previous",color:M.default.white})),o.default.createElement("span",{className:"et-fb-select-ajaxified__pagination-label"},t),o.default.createElement("button",{type:"button",className:"et-fb-select-ajaxified__pagination-button et-fb-select-ajaxified__pagination-button--next",onClick:this.onClickPaginationNext},o.default.createElement(C.default,{icon:"next",color:M.default.white}))))}},{key:"componentDidMount",value:function(){this.requestOptions(this.props.value,this.state.search,this.state.meta.pagination.pages.current)}},{key:"render",value:function(){var e=x({},this.props),t=(0,u.default)(this,"state.selected.value",this.props.value);return e=(0,b.default)(e,"searchable"),o.default.createElement("div",{className:"et-fb-select-ajaxified"},o.default.createElement(O.default,x({},e,{options:this.getSelectOptions(),value:this.valuePrefix+t,selectFirst:!1,emptyLabel:ETBuilderBackend.i18n.selectControl.noTitle,labelFilter:this.filterOptionLabel,preserveHeight:this.state.meta.pagination.pages.total>1?"on":"auto",beforeList:this.renderBeforeList,afterList:this.renderAfterList,__onChange:this.handleOnChange,onOpen:this.handleOpenDropdown,onClose:this.handleCloseDropdown})),this.state.loading&&!this.state.open&&this.renderLoading())}}])&&j(t.prototype,n),r&&j(t,r),v}(o.PureComponent);I.propTypes={name:a.default.string,value:a.default.any.isRequired,src:a.default.string,arguments:a.default.func.isRequired,labelFilter:a.default.func,_onChange:a.default.func,defaultOption:a.default.any},I.defaultProps={name:"",src:ETBuilderBackend.ajaxUrl,labelFilter:void 0,_onChange:v.default,defaultOption:!1};var W=I;t.default=W},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(0)),o=i(n(605)),a=i(n(277));function i(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));s.ref=function(t){e.scrollComponent=t,u&&u(t)};var c=[n];return o&&(l?i?c.unshift(l):c.push(l):this.defaultLoader&&(i?c.unshift(this.defaultLoader):c.push(this.defaultLoader))),a.default.createElement(r,s,c)}}]),t}(o.Component);u.propTypes={children:i.default.node.isRequired,element:i.default.node,hasMore:i.default.bool,initialLoad:i.default.bool,isReverse:i.default.bool,loader:i.default.node,loadMore:i.default.func.isRequired,pageStart:i.default.number,ref:i.default.func,getScrollParent:i.default.func,threshold:i.default.number,useCapture:i.default.bool,useWindow:i.default.bool},u.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=u,e.exports=t.default},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=D(n(0)),a=D(n(7)),i=n(99),l=D(n(13)),u=D(n(16)),s=D(n(10)),c=D(n(12)),d=D(n(11)),f=D(n(3)),p=D(n(4)),h=D(n(38)),m=D(n(24)),g=D(n(1)),y=D(n(5)),v=D(n(8)),b=D(n(178)),_=D(n(152)),w=D(n(14)),k=D(n(31)),O=D(n(88)),S=D(n(775)),C=D(n(19)),E=D(n(6)),M=D(n(15)),T=D(n(2)),P=D(n(605)),x=D(n(778)),j=D(n(44));function D(e){return e&&e.__esModule?e:{default:e}}function L(){return L=Object.assign||function(e){for(var t=1;t0&&n.find("style#".concat(r)).remove(),o='');else{if(n.find("style#et-fb-font-".concat(r)).length>0)return;o='')}n.append(o)}else"font-weight"===t&&n.find("style#".concat(r)).length>0&&n.find("style#".concat(r)).remove()}},{key:"getUploadedFonts",value:function(){var e=ETBuilderBackend.customFonts;return(0,p.default)(e)?[]:(0,w.default)(e)}},{key:"getFontWeightOptions",value:function(){var e=ETBuilderBackend.googleFonts,t=ETBuilderBackend.customFonts,n=this.getValue("font"),r=(0,g.default)(t,n,!1),o=(0,w.default)(ETBuilderBackend.allFontWeights),a={},i=[];if(""===n)i=["300","400","600","700","800"];else{if(r||(r=(0,g.default)(e,n,!1)),!r||(0,s.default)(r.styles))return ETBuilderBackend.allFontWeights;i=r.styles.split(",")}var l=(0,b.default)((0,_.default)(["400","700"],i),o);return(0,v.default)(l,(function(e){a[e]=ETBuilderBackend.allFontWeights[e]})),a}},{key:"getFontWeight",value:function(){var e=this.getValue("weight");return!0===e?"700":(0,y.default)((0,w.default)(this.getFontWeightOptions()),e)?e:"400"}},{key:"updateOptionValue",value:function(e,t){var n=this.getValues();n[e]=T.default.get(t,""),(0,v.default)([["uppercase","capitalize"],["underline","line_through"]],(function(t){(0,y.default)(t,e)&&(0,v.default)(t,(function(t){t!==e&&(n[t]=!1)}))})),this.updateFontStyle(n)}},{key:"fontStyleButtonClassNames",value:function(e){var t;return(0,l.default)((H(t={"et-fb-select-fontstyle-button":!0},"et-fb-select-fontstyle-button--".concat(e),!0),H(t,"et-fb-select-fontstyle-option--".concat(this.props.name),!0),t))}},{key:"fieldClassNames",value:function(e,t){var n;return(0,l.default)((0,d.default)({},(H(n={"et-fb-font-option-container":!0,"et-fb-font-option-container-with-label":!0},"et-fb-font-option-container--".concat(this.props.name),!0),H(n,"et-fb-font-option-container--sub",!0),H(n,"et-fb-font-option-container--sub-".concat(e),!0),n),t))}},{key:"_onMouseEnter",value:function(e){if(!this.props.rightClickOpened&&this.props.isSettingsModal){var t=e.currentTarget.getAttribute("data-subfield");this.setState({hoveredElement:t}),C.default.setHoveredSubElement(t)}}},{key:"_onMouseLeave",value:function(){!this.props.rightClickOpened&&this.props.isSettingsModal&&C.default.setHoveredSubElement(!1)}},{key:"_extraProps",value:function(){var e={readonly:this.props.readonly,disableReset:this.props.disableReset};return(0,d.default)({},e)}},{key:"_isFilterActive",value:function(){return(0,y.default)(["styles_modified","active_content"],this.props.filterSelected)}},{key:"_isRenderSubFieldLabel",value:function(e){return!!(0,s.default)(this.props.subFieldLabel)||((0,h.default)(this.props.subFieldLabel)?e===this.props.subFieldLabel:(0,f.default)(this.props.subFieldLabel)?(0,y.default)(this.props.subFieldLabel,e):this.props.subFieldLabel)}},{key:"_isRenderSubField",value:function(e){return!!(0,s.default)(this.props.subField)||((0,h.default)(this.props.subField)?e===this.props.subField:(0,f.default)(this.props.subField)?(0,y.default)(this.props.subField,e):this.props.subField)}},{key:"_renderSubFieldFontFamily",value:function(){if(!this._isRenderSubField("font"))return!1;var e=this.getValue("font");if(this._isFilterActive()&&(!e||"Default"===e))return!1;var t=this.fieldClassNames("font");return o.default.createElement("div",{className:t,"data-subfield":"font",onMouseEnter:this._onMouseEnter,onMouseLeave:this._onMouseLeave},this._isRenderSubFieldLabel("font")&&this.props.formLabel,this._isRenderSubFieldLabel("font")&&this.props.formDescription,o.default.createElement(P.default,L({default:"Default",recentCategory:"font_family",value:e,name:this.props.name,options:ETBuilderBackend.googleFontsList,additionalOptions:{uploaded:this.state.uploadedFonts},searchPlaceholder:G.searchFonts,searchable:!0,displayRecent:!0,_hoverAction:this._previewFontOnHover,__onChange:this.updateFontFamily},this._extraProps())))}},{key:"_renderSubFieldFontWeight",value:function(){if(!this._isRenderSubField("weight"))return!1;var e=this.getFontWeight();if(this._isFilterActive()&&(!e||(0,y.default)(["400","normal"],e)))return!1;var t=(0,s.default)(this.props.group_label)?G.fontWeight:"".concat(this.props.group_label," ").concat(G.fontWeight),n=!!this._isRenderSubFieldLabel("weight")&&this.getLabel("weight",t),r=this.fieldClassNames("weight");return o.default.createElement("div",{className:r,"data-subfield":"weight",onMouseEnter:this._onMouseEnter,onMouseLeave:this._onMouseLeave},n,o.default.createElement(P.default,L({className:"et-fb-font-weight-option",name:"".concat(this.props.name,"_weight"),default:"normal",value:e,options:this.getFontWeightOptions(),__onChange:this.updateFontWeight},this._extraProps())))}},{key:"_renderSubFieldFontStyle",value:function(){var e=this;if(!this._isRenderSubField("style"))return!1;var t=K.filter((function(t){return!e._isFilterActive()||e._isFilterActive()&&e.getValue(t.slug)}));if((0,p.default)(t))return!1;var n=t.map((function(t){var n=e.getValue(t.slug)?O.default.activeTabIcon:O.default.optionTabIcon;return o.default.createElement("button",{key:t.slug,className:e.fontStyleButtonClassNames(t.slug),onClick:function(n){return e.toggleButton(t.slug)||n.preventDefault()},"data-button":t.slug,type:t},o.default.createElement(j.default,{icon:t.icon,color:n}))})),r=(0,s.default)(this.props.group_label)?G.fontStyle:"".concat(this.props.group_label," ").concat(G.fontStyle),a=!!this._isRenderSubFieldLabel("style")&&this.getLabel("style",r),i=this.fieldClassNames("style");return o.default.createElement("div",{className:i,"data-subfield":"style",onMouseEnter:this._onMouseEnter,onMouseLeave:this._onMouseLeave},a,n)}},{key:"_renderSubFieldFontLineColor",value:function(){if(!this._isRenderSubField("line_color"))return!1;var e=this.getValue("underline"),t=this.getValue("line_through");if(!e&&!t)return!1;var n=this.getValue("line_color");if(this._isFilterActive()&&!n)return!1;var r=e?G.underline:G.strikethrough,a=(0,s.default)(this.props.group_label)?"".concat(r," ").concat(G.color):"".concat(this.props.group_label," ").concat(r," ").concat(G.color),i=!!this._isRenderSubFieldLabel("line_color")&&this.getLabel("line_color",a),l=this.fieldClassNames("line_color",{"et-fb-option--color-alpha":!0});return o.default.createElement("div",{className:l,onMouseEnter:this._onMouseEnter,onMouseLeave:this._onMouseLeave,"data-subfield":"line_color"},i,o.default.createElement(x.default,L({name:"".concat(this.props.name,"_line_color"),type:"color-alpha",value:n,animate:!0,_onChange:this.updateLineColor},this._extraProps())))}},{key:"_renderSubFieldFontLineStyle",value:function(){if(!this._isRenderSubField("line_style"))return!1;var e=this.getValue("underline"),t=this.getValue("line_through");if(!e&&!t)return!1;var n=(0,p.default)(this.getValue("line_style"))?"solid":this.getValue("line_style");if(this._isFilterActive()&&"solid"===n)return!1;var r=e?G.underline:G.strikethrough,a=(0,s.default)(this.props.group_label)?"".concat(r," ").concat(G.style):"".concat(this.props.group_label," ").concat(r," ").concat(G.style),i=!!this._isRenderSubFieldLabel("line_style")&&this.getLabel("line_style",a),l=this.fieldClassNames("line_style");return o.default.createElement("div",{className:l,"data-subfield":"line_style",onMouseEnter:this._onMouseEnter,onMouseLeave:this._onMouseLeave},i,o.default.createElement(P.default,L({name:"".concat(this.props.name,"_line_style"),className:"et-fb-font-line-style-option",default:"solid",value:n,options:["solid","double","dotted","dashed","wavy"],__onChange:this.updateLineStyle},this._extraProps())))}},{key:"render",value:function(){var e=(0,l.default)(H({"et-fb-settings-option-inner":!0,"et-fb-settings-option-inner--select-fontstyle":!0},"et-fb-settings-option-inner--".concat(this.props.name),!0));return o.default.createElement("div",{className:e},this._renderSubFieldFontFamily(),this._renderSubFieldFontWeight(),this._renderSubFieldFontStyle(),this._renderSubFieldFontLineColor(),this._renderSubFieldFontLineStyle())}}])&&R(t.prototype,n),r&&R(t,r),i}(o.default.Component);$.propTypes=z;var Y=$;t.default=Y},function(e,t,n){},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=p(n(0)),a=p(n(13)),i=p(n(16)),l=p(n(31)),u=(p(n(142)),p(n(1))),s=p(n(5)),c=p(n(10)),d=p(n(44));p(n(2));n(1635);var f=p(n(17));function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){for(var n=0;n'),""!==h)l='').concat(l,"");""!==p&&(l='[caption align="'.concat(f,'" width="').concat(s,'" ]').concat(l," ").concat(p,"[/caption]"))}else l="[embed]".concat(i,"[/embed]");r.insertMedia(l)}})),n.on("update",(function(e){var t=(0,c.default)(e.gallery)?"playlist":"gallery",n="playlist"===t?T.wp.media.playlist.shortcode(e).attrs.named:T.wp.media.gallery.shortcode(e).attrs.named,o=(0,c.default)(n.ids)?"":n.ids.join(",");if(""!==o){var a="";(0,d.default)(n,(function(e,t){"ids"!==t&&(a+=" ".concat(t,'="').concat(e,'"'))}));var i="[".concat(t,' ids="').concat(o,'"').concat(a,"]");r.insertMedia(i)}})),n.open()}else n.open()},insertMedia:function(e){if(S.default.appWindow().wpActiveEditor=!1,"html"===getUserSetting("editor")){var t=S.default.$topWindow(".et-fb-tinymce-html-input:visible"),n=t.val()+e;t.val(n),this.setTextareaContent(n)}else T.wp.media.editor.insert(e)},switchToVisual:function(e){e.preventDefault(),this.switchEditorMode("tinymce")},switchToHtml:function(e){e.preventDefault(),this.switchEditorMode("html"),this.processedContent=!0,this.setState({content:this.processContent(this.state.content)})},setActiveModeClass:function(e){var t,n,r,o=(t={"et-fb-switch-editor-mode__tab":!0},n="et-fb-switch-editor-mode__tab--".concat(e),r=!0,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t);return e===this.state.editorMode&&(o["et-fb-switch-editor-mode__tab--active"]=!0),(0,i.default)(o)},processContent:function(e){return e=e.replace(/

(?:
|\u00a0|\uFEFF| )*<\/p>/g,"

 

"),this.isRemoveP&&(e=C.default.removep(e)),e},_onDoubleClick:function(e){e.stopPropagation()},_tinyMCESetup:function(e){e.settings.convert_urls=0,e.settings.remove_script_host=0},getStateContent:function(){return"html"===this.state.editorMode?"
\n"===this.state.content?"":this.state.content:C.default.wpautop(this.processContent(this.state.content))},getPropsContent:function(e){var t=e||this.props;return"content"===t.name?(0,y.default)(t,"content",""):(0,y.default)(t,"value","")},render:function(){var e=this.props.additional_attrs?this.props.additional_attrs:{},t=ETBuilderBackend.i18n.controls.tinymce,n=(this.props.className&&this.props.className,this.getStateContent()),o=(0,y.default)(ETBuilderBackend,"tinymcePlugins",["autolink","link","image","lists","print","preview","autoresize","textcolor","table","paste","fullscreen","charmap","emoticons","wpview"]),a={entity_encoding:"raw",skin_url:ETBuilderBackend.tinymceSkinUrl,plugins:o.join(" "),menubar:!1,valid_elements:"*[*]",toolbar:"formatselect,bold,italic,bullist,numlist,link,blockquote,alignleft,aligncenter,alignright,alignjustify,table,strikethrough,underline,hr,forecolor,pastetext,removeformat,outdent,indent,fullscreen,charmap,emoticons,undo,redo",content_css:ETBuilderBackend.tinymceCSSFiles,autoresize_bottom_margin:0,setup:this._tinyMCESetup};if(S.default.condition("is_bfb")&&(a=(0,y.default)(S.default.topWindow(),"tinyMCEPreInit.mceInit.content",{}),(0,c.default)(a.toolbar1)||(a.toolbar1=a.toolbar1.replace("dfw","table,fullscreen"),a.toolbar1=a.toolbar1.replace("wp_more",""))),S.default.condition("is_layout_block")){var i=(0,w.default)((0,y.default)(S.default.topWindow(),"tinymce.AddOnManager.PluginManager.lookup",{})),u=(0,k.default)(o,(function(e){return!(0,b.default)(i,e)}));(0,p.default)((0,y.default)(S.default.topWindow(),"tinymce.AddOnManager.PluginManager.load"))&&(0,d.default)(u,(function(e){S.default.topWindow().tinymce.AddOnManager.PluginManager.load(e,"".concat((0,y.default)(S.default.appWindow(),"et_pb_custom.tinymce_uri"),"/plugins/").concat(e,"/plugin.min.js"))}))}var s=S.default.hasValue(ETBuilderBackend.mediaButtons)?{}:{display:"none"},f="html"===this.state.editorMode?r.default.createElement("textarea",{id:this.uuid,ref:"textarea",className:"et-fb-tinymce-html-input",value:n,onChange:g.default,onInput:this._onInputHTML,onScroll:this._onTextareaScroll,onFocus:this._onFocus,onBlur:this._onBlur}):r.default.createElement(l.default,M({id:this.uuid,ref:"tinymce",content:n,config:a,onInit:this._onInit,onChange:this._onChange,onDoubleClick:this._onDoubleClick,onKeyup:this._onChange,onKeydown:this._onKeyDown,onLoadContent:this._loadtinyMCEContent,onSetContent:this._onChange,onFocus:this._onFocus,onBlur:this._onBlur},e)),h="no"!==x&&r.default.createElement("a",{href:"#",onClick:this.switchToVisual,className:this.setActiveModeClass("tinymce")},t.visual);return r.default.createElement("div",{id:"et-fb-".concat(this.props.name),className:"et-fb-tinymce-buttons"},r.default.createElement("button",{className:"et-fb-settings-option-upload-button et-fb-tinymce-add-media-button et-fb-tinymce-add-media-button--absolute",onClick:this.addMedia},ETBuilderBackend.i18n.controls.insertMedia.buttonText),r.default.createElement("span",{className:"et-fb-tinymce-media-buttons",id:"et-fb-tinymce-".concat(this.props.name,"-media-buttons"),style:s,dangerouslySetInnerHTML:{__html:ETBuilderBackend.mediaButtons}}),r.default.createElement("div",{className:"et-fb-switch-editor-mode"},h,r.default.createElement("a",{href:"#",onClick:this.switchToHtml,className:this.setActiveModeClass("html")},t.text)),f)},_loadtinyMCEContent:function(e,t){(0,f.default)((0,h.default)(this.state.content))||t.setContent(C.default.wpautop(this.processContent(this.state.content)),{format:"raw"})},_onKeyDown:function(e){var t=e.keyCode,n=e.metaKey,r=e.ctrlKey,o=e.altKey;(0,p.default)(KeyboardEvent)&&(83!==t||!n&&!r||o||(S.default.appDocument().dispatchEvent(new KeyboardEvent("keydown",{keyCode:t,metaKey:n,ctrlKey:r,bubbles:!0,cancelable:!0})),e.preventDefault()))},_onChange:function(e,t){if(!this.isUnmounting){var n=(0,c.default)(e.type)?"":e.type;if(!this.props.isItemSelected||!(0,b.default)(["loadcontent","setcontent"],n)){var r=t.getContent({format:"html"}).replace(/

(?:
|\u00a0|\uFEFF| )*<\/p>/g,"

 

"),o=(0,f.default)(r)?r:C.default.wpautop(r);o="\n"===o.slice(-1)?o.slice(0,-1):o,this.setTextareaContent(o)}}},_onInit:function(e,t){this.editor=t,P&&(t.on("ExecCommand",(function(e){if("mceInsertLink"===e.command){var n=t.$('a[href="_wp_link_placeholder"]')[0];n&&n.scrollIntoView&&n.scrollIntoView({block:"nearest"})}})),t.on("wp-toolbar-toggle",(function(){S.default.$topWindow().trigger("wp-toolbar-toggle")})))},componentWillUnmount:function(){this.isUnmounting=!0,P&&S.default.$topWindow("html, body").removeClass("mce-fullscreen")},_onInputHTML:function(e){e.persist();var t=e.target.value;this.setTextareaContent(t)},_onTextareaScroll:function(t){var n=e(t.currentTarget).closest(".et-fb-tabs__panel");n.scrollTop()||n.scrollTop(1)},setTextareaContent:function(e){if(e!==this.getStateContent()&&e!==this.getPropsContent()){this.isEditing=!0;var t="content"===this.props.name;this.updateProps&&this.props._onChange(this.props.name,e,"",t),this.processedContent=!1,this.setState({content:e})}},getFrameTargetElement:function(e){if((0,s.default)(e))return!1;var t=e.contentWindow;return(0,c.default)(S.default.appWindow().pageYOffset)&&(t=t.document.documentElement?t.document.documentElement:t=document.body),t},_onFocus:function(e){(this.props.module||this.props.isPageSetting)&&O.default.quickAccessHide(!1,e)},_onBlur:function(e){if("html"===this.state.editorMode){if(e.target.value===this.getStateContent())return;this._onInputHTML(e)}},focus:function(){var e=this;if("html"===this.state.editorMode)S.default.$topWindow(this.refs.textarea).trigger("focus");else try{window.tinymce.EditorManager.get(this.uuid).focus()}catch(t){setTimeout((function(){return e.focus()}),100)}},activateEditor:function(){"tinymce"===this.state.editorMode&&S.default.appWindow().tinyMCE.setActive(this.editor),S.default.appWindow().wpActiveEditor=this.uuid,this.focus()},componentDidUpdate:function(){var e=this;setTimeout((function(){var t=S.default.$topWindow(a.default.findDOMNode(e.refs.tinymce)).parent().find("iframe");if(0!==t.length){var n=t.height(),r=t.contents().find("html");if(r.length>0){var o=r.innerHeight();n .wpview iframe { max-width: 100% !important; } .wpview { width: auto !important; }"),o.onwheel=function(e){var t,r=n.closest(".et-fb-tabs__panel--active"),o=!1,a=!1;if(t=r.find(".et-fb-form").outerHeight()||0,r.length>0&&(o=r.scrollTop()<1&&e.deltaY<1,a=r.scrollTop()>=t-r.height()&&e.deltaY>=0,o||a))return!1},S.default.$topWindow("#et-fb-".concat(this.props.name,", #et-fb-").concat(this.props.name," *, .et-fb-tinymce-media-buttons a")).on("click",(function(){t.activateEditor()}))):S.default.$topWindow(".et-fb-tinymce-media-buttons a").on("click",(function(){t.activateEditor()}))}});j.defaultProps={onModeSwitch:g.default,isReactClassApproved:{},name:""};var D=j;t.default=D}).call(this,n(9))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={wpautop:function(e){var t="table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary",n=!1,r=!1;return-1!==e.indexOf("/g,(function(e){return e.replace(/[\r\n]+/g,"")}))),-1===(e=e.replace(/<[^<>]+>/g,(function(e){return e.replace(/[\r\n]+/g," ")}))).indexOf("]*>[\s\S]+?<\/\1>/g,(function(e){return e.replace(/(\r\n|\n)/g,"")}))),-1!==e.indexOf("[caption")&&(r=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,(function(e){return(e=(e=e.replace(/]*)>/g,"")).replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,(function(e){return e.replace(/[\r\n\t]+/," ")}))).replace(/\s*\n\s*/g,"")}))),e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e="".concat(e,"\n\n")).replace(/
\s*
/gi,"\n\n")).replace(new RegExp("(<(?:".concat(t,")(?: [^>]*)?>)"),"gi"),"\n$1")).replace(new RegExp("()"),"gi"),"$1\n\n")).replace(/]*)?>/gi,"\n\n")).replace(/\s*")).replace(/\r\n|\r/g,"\n")).replace(/\n\s*\n+/g,"\n\n")).replace(/([\s\S]+?)\n\n/g,"

$1

\n")).replace(/

\s*?<\/p>/gi,"")).replace(new RegExp("

\\s*(]*)?>)\\s*

"),"gi"),"$1")).replace(/

(/gi,"$1")).replace(/

\s*]*)>/gi,"

")).replace(/<\/blockquote>\s*<\/p>/gi,"

")).replace(new RegExp("

\\s*(]*)?>)"),"gi"),"$1")).replace(new RegExp("(]*)?>)\\s*

"),"gi"),"$1")).replace(/\s*\n/gi,"
\n")).replace(new RegExp("(]*>)\\s*
"),"gi"),"$1")).replace(/
(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi,"$1")).replace(/(?:

|
)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:<\/p>|
)*/gi,"[caption$1[/caption]")).replace(/(<(?:div|th|td|form|fieldset|dd)[^>]*>)(.*?)<\/p>/g,(function(e,t,n){return n.match(/]*)?>/)?e:"".concat(t,"

").concat(n,"

")})),n&&(e=e.replace(//g,"\n")),r&&(e=e.replace(/]*)>/g,"")),e},removep:function(e){var t="blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset",n="".concat(t,"|div|p"),r="".concat(t,"|pre"),o=!1,a=!1;return e?(-1===e.indexOf("]*>[\s\S]+?<\/\1>/g,(function(e){return(e=(e=e.replace(/
(\r\n|\n)?/g,"")).replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"")).replace(/\r?\n/g,"")}))),-1!==e.indexOf("[caption")&&(a=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,(function(e){return e.replace(/]*)>/g,"").replace(/[\r\n\t]+/,"")}))),-1!==(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("\\s*\\s*"),"g"),"\n")).replace(new RegExp("\\s*<((?:".concat(n,")(?: [^>]*)?)>"),"g"),"\n<$1>")).replace(/(

]+>.*?)<\/p>/g,"$1")).replace(/]*)?>\s*

/gi,"\n\n")).replace(/\s*

/gi,"")).replace(/\s*<\/p>\s*/gi,"\n\n")).replace(/\n[\s\u00a0]+\n/g,"\n\n")).replace(/\s*
\s*/gi,"\n")).replace(/\s*

\s*/g,"
\n")).replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n")).replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption")).replace(new RegExp("\\s*<((?:".concat(r,")(?: [^>]*)?)\\s*>"),"g"),"\n<$1>")).replace(new RegExp("\\s*\\s*"),"g"),"\n")).replace(/]*)>/g,"\t")).indexOf("/g,"\n")),-1!==e.indexOf("]*)?>\s*/g,"\n\n\n\n")),-1!==e.indexOf("/g,(function(e){return e.replace(/[\r\n]+/g,"")}))),e=(e=(e=(e=e.replace(/<\/p#>/g,"

\n")).replace(/\s*(

]+>[\s\S]*?<\/p>)/g,"\n$1")).replace(/^\s+/,"")).replace(/[\s\u00a0]+$/,""),o&&(e=e.replace(//g,"\n")),a&&(e=e.replace(/]*)>/g,"")),e):""}};t.default=r},function(e,t,n){},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=h(n(0)),o=h(n(265)),a=h(n(16)),i=h(n(1)),l=h(n(40)),u=h(n(5)),s=h(n(10)),c=n(62),d=h(n(44)),f=h(n(57)),p=n(2);function h(e){return e&&e.__esModule?e:{default:e}}function m(){return m=Object.assign||function(e){for(var t=1;t0?r.length-1:0;n.updateOptions(t,o)}n._updateFrontEnd()}),0)},removeRow:function(e,t){t.preventDefault();var n=this,r=(0,p.isJson)(this.state.options)?JSON.parse(this.state.options):[];if(r.splice(e,1),0===r.length){var o="";for(var a in this.state.fieldValues)if(this.state.fieldValues.hasOwnProperty(a)){o=a;break}r=[{field:o,condition:"is",value:(0,i.default)(this,["state","fieldValues",o,0])}]}this.setState({options:JSON.stringify(r)}),setTimeout((function(){n._updateFrontEnd()}),0)},_fieldSelect:function(e,t){var n=this,o=this,a=this.props.module.props.module,l=a.parentModule.props.content,u="field".concat(e),s="condition".concat(e),c="value".concat(e),d=t.field,f=this.updateOptions.bind(this,e,d);return r.default.createElement("div",{className:"et-fb-settings-conditional-logic",key:e},r.default.createElement("select",{className:"et-fb-settings-option-select et-fb-main-setting",onChange:this.updateSelected.bind(this,e),ref:function(e){return n[u]=e},value:t.field,disabled:this.props.readonly||!1},l.map((function(e,t){if(e.address!==a.props.address){var n=(0,i.default)(e,"attrs.field_id","");if(""!==n.trim()){n="et_pb_signup_custom_field"===o.state.moduleType?n:n.toLowerCase();var l=(0,i.default)(ETBuilderBackend,"componentDefinitions.fieldsDefaults.et_pb_contact_field.field_title[0]",""),u=(0,i.default)(e,"attrs.field_title",""),s=""!==l&&u===l?n:u;if(""!==s.trim())return r.default.createElement("option",{value:n,key:t},s)}}}))),r.default.createElement("select",{className:"et-fb-settings-option-select et-fb-main-setting",onChange:f,ref:function(e){return n[s]=e},value:t.condition,disabled:this.props.readonly||!1},r.default.createElement("option",{value:"is"},ETBuilderBackend.i18n.controls.conditionalLogic.is),r.default.createElement("option",{value:"is not"},ETBuilderBackend.i18n.controls.conditionalLogic.isNot),r.default.createElement("option",{value:"is greater"},ETBuilderBackend.i18n.controls.conditionalLogic.isGreater),r.default.createElement("option",{value:"is less"},ETBuilderBackend.i18n.controls.conditionalLogic.isLess),r.default.createElement("option",{value:"contains"},ETBuilderBackend.i18n.controls.conditionalLogic.contains),r.default.createElement("option",{value:"does not contain"},ETBuilderBackend.i18n.controls.conditionalLogic.doesNotContain),r.default.createElement("option",{value:"is empty"},ETBuilderBackend.i18n.controls.conditionalLogic.isEmpty),r.default.createElement("option",{value:"is not empty"},ETBuilderBackend.i18n.controls.conditionalLogic.isNotEmpty)),this._fieldSelectValues(e,d,t.value,c,t.condition))},_fieldSelectValues:function(e,t,n,o,a){var i=this,l=(this.props.module.props.module.parentModule.props.content,this.state.fieldValues[t]);(0,s.default)(l)&&(l=[],(0,s.default)(this.state.fieldValues[0])||(l=this.state.fieldValues[0])),(0,s.default)(n)&&(n="");var c=!!(0,u.default)(["is empty","is not empty"],a);return 0===l.length?r.default.createElement("input",{className:"et-fb-settings-option-input et-fb-main-setting",type:"text",onChange:this.updateOptions.bind(this,e,t,!1,!1,!0),ref:function(e){return i[o]=e},disabled:c,value:n,readOnly:this.props.readonly||!1}):r.default.createElement("select",{className:"et-fb-settings-option-select et-fb-main-setting",onChange:this.updateOptions.bind(this,e,t),ref:function(e){return i[o]=e},disabled:c,value:n},l.map((function(e,t){return r.default.createElement("option",{value:e,key:t},e)})))},_optionsControls:function(){var e=this;return((0,p.isJson)(this.state.options)?JSON.parse(this.state.options):[]).map((function(t,n){var o=!e.props.readonly&&!e.props.hideDeleteButton&&r.default.createElement("a",{href:"#",className:"et_options_list_remove",onClick:e.removeRow.bind(e,n)},r.default.createElement(d.default,{icon:"delete",color:"rgb(163, 176, 194)"}));return r.default.createElement("div",{className:"et_options_list_row et_condition_row",key:n},e._fieldSelect(n,t),o)}))},render:function(){var e=this.props.additional_attrs?this.props.additional_attrs:{},t=this.addRow.bind(this,!1,!1),n=!this.props.readonly&&!this.props.hideAddButton&&r.default.createElement("span",{className:"et-fb-item-button-wrap--add"},r.default.createElement(c.Motion,{defaultStyle:{size:.5,opacity:0},style:{size:(0,c.spring)(1,{stiffness:300,damping:20}),opacity:(0,c.spring)(1,{stiffness:300,damping:20})}},(function(e){return r.default.createElement(f.default,{round:!0,style:{opacity:e.opacity,transform:"scale( ".concat(e.size," )")},tooltip:ETBuilderBackend.i18n.controls.moduleItem.addNew,_onClick:t},r.default.createElement(d.default,{size:"14",icon:"add",color:"#FFFFFF"}))})));return r.default.createElement("div",{className:"et_options_list"},this._optionsControls(),r.default.createElement("textarea",m({value:this.state.options,name:this.props.name,id:"et-fb-".concat(this.props.name),onChange:l.default},e)),n)},_updateFrontEnd:function(){var e=this;setTimeout((function(){e.props._onChange(e.props.name,e.state.options,e.props.type)}),0)}});t.default=g}).call(this,n(2))},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(0)),o=u(n(265)),a=u(n(16)),i=u(n(1)),l=u(n(44));function u(e){return e&&e.__esModule?e:{default:e}}n(1642);var s=(0,o.default)({displayName:"ETBuilderSelectAnimation",mixins:[a.default],render:function(){var e={none:ETBuilderBackend.i18n.controls.selectAnimation.none,fade:ETBuilderBackend.i18n.controls.selectAnimation.fade,slide:ETBuilderBackend.i18n.controls.selectAnimation.slide,bounce:ETBuilderBackend.i18n.controls.selectAnimation.bounce,zoom:ETBuilderBackend.i18n.controls.selectAnimation.zoom,flip:ETBuilderBackend.i18n.controls.selectAnimation.flip,fold:ETBuilderBackend.i18n.controls.selectAnimation.fold,roll:ETBuilderBackend.i18n.controls.selectAnimation.roll},t=Object.keys(e),n=this;return r.default.createElement("div",{className:"et_select_animation"},t.map((function(t,o){var a="";t===n.props.value&&(a="et_active_animation");var u="animation-".concat(t),s=(0,i.default)(e,t,e.none);return r.default.createElement("div",{className:"et_animation_button",key:o},r.default.createElement("a",{href:"#",className:a,onClick:n._onClick.bind(n,t)},r.default.createElement("span",{className:"et_animation_button_title","data-value":t,key:o},s),r.default.createElement("span",{className:"et_animation_button_icon"},r.default.createElement(l.default,{icon:u}))))})))},_onClick:function(e,t){t.preventDefault(),this.props._onChange(this.props.name,e)}});t.default=s},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(0)),o=a(n(1473));function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var h=function(e){var t,n=e.src,o=p(e,c),d=function(e){return null!==e.match(/[^\/]+(\/[^\/]+)+\.[a-z|0-9]{2,5}(\?.+)?$/i)}(t=n)?a.default:function(e){return null!==e.match(/(https?:\/\/)?(www\.)?youtube\.com/i)}(t)?i.default:function(e){return null!==e.match(/(https?:\/\/)?(www\.)?vimeo\.com/i)}(t)?l.default:function(e){return null!==e.match(/(https?:\/\/)?(www\.)?dailymotion\.com/i)}(t)?s.default:u.default;return r.default.createElement(d,f({},o,{src:n}))};h.propTypes={src:o.default.string.isRequired};var m=h;t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(0))&&r.__esModule?r:{default:r},a=["src"];function i(){return i=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.default=function(e){var t=e.src,n=l(e,a);return o.default.createElement("video",i({},n,{src:t}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(0)),o=c(n(782)),a=c(n(193)),i=c(n(382)),l=c(n(1466)),u=n(771),s=["src"];function c(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=(0,a.default)(i.default,(0,u.getArg)("v"));t.default=function(e){var t,n,a=e.src,i=f(e,s);return r.default.createElement(l.default,d({},i,{src:(t=a,(0,u.setArgs)((0,o.default)("v",(0,u.getArgs)(t)),(n=p(t),"https://www.youtube.com/embed/".concat(n))))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(0)),o=c(n(193)),a=c(n(779)),i=c(n(380)),l=c(n(1466)),u=n(771),s=["src"];function c(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=(0,o.default)(a.default,(0,i.default)("/"),u.clearArgs);t.default=function(e){var t,n,o=e.src,a=f(e,s);return r.default.createElement(l.default,d({},a,{src:(t=o,(0,u.setArgs)((0,u.getArgs)(t),(n=p(t),"https://player.vimeo.com/video/".concat(n)))),frameBorder:"0"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(0)),o=c(n(193)),a=c(n(779)),i=c(n(380)),l=c(n(1466)),u=n(771),s=["src"];function c(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=(0,o.default)(a.default,(0,i.default)("/"),u.clearArgs);t.default=function(e){var t,n,o=e.src,a=f(e,s);return r.default.createElement(l.default,d({},a,{src:(t=o,(0,u.setArgs)((0,u.getArgs)(t),(n=p(t),"https://www.dailymotion.com/embed/video/".concat(n)))),frameBorder:"0"}))}},function(e,t,n){},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=O(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=k(n(7));n(1654);var i=k(n(24)),l=k(n(193)),u=k(n(783)),s=k(n(496)),c=k(n(48)),d=k(n(279)),f=k(n(380)),p=k(n(772)),h=k(n(784)),m=k(n(797)),g=k(n(781)),y=k(n(1655)),v=k(n(1659)),b=n(1504),_=k(n(1662)),w=k(n(1663));function k(e){return e&&e.__esModule?e:{default:e}}function O(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(O=function(e){return e?n:t})(e)}function S(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function h(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:i,t=o.default.topWindow().wp.media({library:{type:e.mediaTypes},multiple:!!e.multiple&&"add"}),n=function(e){return e(t.state().get("selection").map((0,r.default)("attributes")))};return t.on("open",(function(){var n=t.state().get("selection");e.selected.map((function(e){return n.add(o.default.topWindow().wp.media.attachment(e))}))})),t.open(),new Promise((function(e){return t.on("select",(function(t){return n(e)}))}))}},function(e,t,n){var r=n(52)("find",n(61));r.placeholder=n(47),e.exports=r},function(e,t,n){var r=n(52)("noop",n(40),n(124));r.placeholder=n(47),e.exports=r},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=p(n(7)),i=n(62),l=p(n(4)),u=p(n(36)),s=p(n(1)),c=p(n(44)),d=p(n(1504)),f=p(n(296));function p(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function m(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"thumbnail";return(0,d.default)(e).then((function(e){var n=(0,s.default)(e,"guid","");return t&&(0,u.default)(e,"metadata.".concat(t,".0"))?(0,s.default)(e,"metadata.".concat(t,".0"),n):n}))},k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(u,e);var t,n,r,a=y(u);function u(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(e=a.call(this)).state={url:null,active:!1},e.setUrl=e.setUrl.bind(b(e)),e.onMouseOver=e.onMouseOver.bind(b(e)),e.onMouseLeave=e.onMouseLeave.bind(b(e)),e.onRemove=e.onRemove.bind(b(e)),e}return t=u,(n=[{key:"onMouseOver",value:function(){this.setState({active:!0})}},{key:"onMouseLeave",value:function(){this.setState({active:!1})}},{key:"onRemove",value:function(e){e.preventDefault(),this.props.onRemove&&this.props.onRemove(this.props.id)}},{key:"componentDidMount",value:function(){w(this.props.id).then(this.setUrl)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.id;this.props.id!==t&&w(t).then(this.setUrl)}},{key:"setUrl",value:function(e){this.setState({url:e})}},{key:"renderDelete",value:function(){var e=this,t={opacity:this.state.active?(0,i.spring)(1,{stiffness:300,damping:20}):(0,i.spring)(0,{stiffness:300,damping:20}),scale:this.state.active?(0,i.spring)(1,{stiffness:300,damping:20}):(0,i.spring)(0,{stiffness:300,damping:20}),top:this.state.active?(0,i.spring)(5,{stiffness:300,damping:20}):(0,i.spring)(-10,{stiffness:300,damping:20}),right:this.state.active?(0,i.spring)(5,{stiffness:300,damping:20}):(0,i.spring)(-10,{stiffness:300,damping:20})};return o.default.createElement(i.Motion,{style:t},(function(t){return o.default.createElement("button",{className:"et-fb-control-images-upload--item-delete",onClick:e.onRemove,style:{opacity:t.opacity,transform:"scale( ".concat(t.scale," )"),top:t.top}},o.default.createElement(c.default,{icon:"delete",color:"#fff"}))}))}},{key:"renderLoading",value:function(){return o.default.createElement("div",{className:"et-fb-control-images-upload--item-wrapper loading"},o.default.createElement("div",{className:"et-fb-control-images-upload--item",onMouseOver:this.onMouseOver,onMouseOut:this.onMouseLeave},o.default.createElement(f.default,{isLoading:!0})),!this.props.readonly&&this.renderDelete())}},{key:"renderAttachment",value:function(){return o.default.createElement("div",{className:"et-fb-control-images-upload--item-wrapper"},o.default.createElement("div",{className:"et-fb-control-images-upload--item",style:{backgroundImage:"url(".concat(this.state.url,")")},onMouseOver:this.onMouseOver,onMouseOut:this.onMouseLeave},!this.props.readonly&&this.renderDelete()))}},{key:"render",value:function(){return(0,l.default)(this.state.url)?this.renderLoading():this.renderAttachment()}}])&&m(t.prototype,n),r&&m(t,r),u}(o.Component);k.propTypes={id:a.default.number,onRemove:a.default.func};var O=k;t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(0)),o=a(n(44));function a(e){return e&&e.__esModule?e:{default:e}}n(1664);t.default=function(e){var t=e.onClick,n=e.title;return!e.readonly&&r.default.createElement("div",{className:"et-fb-add-media",onClick:t},r.default.createElement("div",{className:"et-fb-add-media--container"},r.default.createElement("div",{className:"et-fb-add-media--button"},r.default.createElement(o.default,{icon:"add",color:"#fff"})),r.default.createElement("label",{className:"et-fb-add-media--title et-fb-form__label"},n)))}},function(e,t,n){},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=_(n(0)),a=_(n(13)),i=_(n(10)),l=_(n(4)),u=_(n(34)),s=_(n(12)),c=_(n(3)),d=_(n(179)),f=(_(n(36)),_(n(1))),p=_(n(31)),h=_(n(40)),m=_(n(42)),g=_(n(57)),y=_(n(19)),v=_(n(6)),b=n(2);function _(e){return e&&e.__esModule?e:{default:e}}function w(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]&&arguments[1],n=this._getFieldByTemplate(e);return n?this._getAttrs(n.name,t):null}},{key:"_getAttrs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this._getModuleAttrs(),r=this._getFieldEnablePair(e);if(r){var o=this._getAttrs(r.name,t);if("off"===o)return""}return t?(0,c.default)(n,this._getFieldNameByMode(e),this._getDefault(e)):(0,c.default)(n,this._getFieldNameByMode(e))}},{key:"_getDefault",value:function(e){var t=x.default.getBaseName(e),n=this._getField(t),r=(0,c.default)(n,"default"),o=this._getModuleAttrs(),a=x.default.getDesktopValue(t,o);if(n.mobile_options&&x.default.isResponsiveMode()&&x.default.isResponsiveEnabled(this._getBackgroundBase(),o)){var i=x.default.getTabletValue(t,o,a);return x.default.isPhoneMode()?T.default.get(i,r):T.default.get(a,r)}return"tabs"===n.hover&&x.default.isHoverMode()&&x.default.isHoverEnabled(this._getBackgroundBase(),o)||n.sticky&&x.default.isStickyMode()&&x.default.isStickyEnabled(this._getBackgroundBase(),o)?T.default.get(a,r):r}},{key:"_getBackgroundBase",value:function(){return x.default.getBaseName(this.props.name)||"background"}},{key:"_getFieldNameByMode",value:function(e){var t=this._getModuleAttrs(),n=x.default.getBaseName(e),r=this._getField(n);return r?r.mobile_options&&x.default.isResponsiveMode()&&x.default.isResponsiveEnabled(this._getBackgroundBase(),t)?x.default.isPhoneMode()?x.default.getPhoneName(n):x.default.getTabletName(n):"tabs"===r.hover&&x.default.isHoverMode()&&x.default.isHoverEnabled(this._getBackgroundBase(),t)?x.default.getHoverName(n):r.sticky&&x.default.isStickyMode()&&x.default.isStickyEnabled(this._getBackgroundBase(),t)?x.default.getStickyName(n):n:e}},{key:"_getFieldEnablePair",value:function(e){var t=this._getFieldTemplate(e);return!!(0,f.default)(["color","image","video_mp4","video_webm"],t)&&this._getFieldByTemplate("enable_".concat(t))}},{key:"_getFieldByTemplate",value:function(e){return e&&(0,u.default)(this._getFields(),(function(t){return t.field_template===e}))}},{key:"_getFieldTemplate",value:function(e){return(0,c.default)(this._getField(x.default.getBaseName(e)),"field_template","")}},{key:"_getField",value:function(e){return(0,c.default)(this._getFields(),x.default.getBaseName(e))}},{key:"_getFields",value:function(){var e=this;if(!(0,h.default)(this._backgroundFields))return this._backgroundFields;var t=[],n=this.props.backgroundFields||this.props.background_fields||{};if((0,s.default)(n,(function(e,r){var o=$({name:r},e),a=(0,O.default)(n,(function(t){var n=t.affects_template;return(0,f.default)(n,e.field_template)}));if(!(0,h.default)(a)){var i=(0,_.default)(a);(0,d.default)(o,"depends_on")?o.depends_on=(0,E.default)([].concat(z(o.depends_on),z(i))):o.depends_on=i}t.push(o)})),this._backgroundFields={},!(0,h.default)(t)){var r=(0,k.default)(t,["priority"]);(0,s.default)(r,(function(t){e._backgroundFields[t.name]=t}))}return this._backgroundFields}},{key:"_getActiveTab",value:function(){var e=this,t=(0,u.default)((0,_.default)(this._getTabsNotEmpty()),(function(t){return!e._isTabDisabled(t)&&t===e.state.activeTab}));return t||this.defaultTab}},{key:"_getTabs",value:function(){var e=this;return(0,h.default)(this._tabs)?(this._tabs={},(0,s.default)(ETBuilderBackend.backgroundTabs,(function(t){e._tabs[t]=(0,O.default)(e._getFields(),(function(e){return e.background_tab===t}))})),this._tabs):this._tabs}},{key:"_getTabsNotEmpty",value:function(){return(0,O.default)(this._getTabs(),(function(e){return!(0,h.default)(e)}))}},{key:"_getGradientPreviewStyle",value:function(e){var t=this,n={};return(0,s.default)(T.default.gradientFieldsMapping(),(function(r,o){var a=t._getAttrsByTemplate(r,e);(0,y.default)(a)||(n[o]=a)})),n}},{key:"_getImagePreviewStyle",value:function(e){var t=this,n={};(0,s.default)(["color","size","position","repeat","blend","parallax"],(function(r){var o=t._getAttrsByTemplate(r,e);(0,y.default)(o)||(n[r]="parallax"===r?T.default.isOn(o):o)}));var r=this._getAttrsByTemplate("use_color_gradient",e),o=this._getAttrsByTemplate("color_gradient_overlays_image",e);if(T.default.isOn(r)){var a=this._getGradientPreviewStyle(e);a&&(n.gradient=T.default.getGradient(a),n.gradientOverlaysImage=o)}return n}},{key:"_isTabDisabled",value:function(e){return!!(this.props.isColumnBackground&&"color"!==e&&x.default.isHoverMode()&&x.default.isHoverEnabled(this._getBackgroundBase(),this._getModuleAttrs()))}},{key:"_isTabFilled",value:function(e){var t=this;if(this._isTabDisabled(e))return!1;var n=(0,O.default)(this._getFields(),(function(t){return t.background_tab===e&&t.tab_filler}));return!(0,h.default)(n)&&(0,S.default)(n,(function(e){return"use_color_gradient"===e.field_template?T.default.isOn(t._getAttrs(e.name,!0)):T.default.hasValue(t._getAttrs(e.name,!0))}))}},{key:"_isFieldHidden",value:function(e){var t=this,n=this.props.moduleAttrs;if((0,f.default)(["color_gradient_start","color_gradient_end"],(0,c.default)(e,"field_template")))return!0;if(!(0,d.default)(e,"show_if")&&!(0,d.default)(e,"show_if_not")&&!(0,d.default)(e,"depends_on"))return!1;var r=function(){if((0,d.default)(e,"show_if"))return(0,S.default)(e.show_if,(function(e,r){if(!r||!e)return!1;if(!(0,f.default)((0,_.default)(n),r))return e===t._backgroundFields[r].default;var o=$({},t._getField(r));if(o.value=n[r],t._isFieldHidden(o))return!1;var a=(0,p.default)(e)?e:[e];return!!(0,f.default)(a,n[r])}))},o=function(){if((0,d.default)(e,"show_if_not"))return(0,S.default)(e.show_if_not,(function(e,r){if(!r||!e)return!1;if(!(0,f.default)((0,_.default)(n),r))return e!==t._backgroundFields[r].default;var o=t._getField(r);if(o.value=n[r],t._isFieldHidden(o))return!0;var a=(0,p.default)(e)?e:[e];return!(0,f.default)(a,n[r])}))};return(0,d.default)(e,"show_if")&&(0,d.default)(e,"show_if_not")?!(r()&&o()):(0,d.default)(e,"show_if")?!r():(0,d.default)(e,"show_if_not")?!o():(0,S.default)(e.depends_on,(function(n){var r=t._getField(n);if(!r)return!1;if((0,d.default)(r,"depends_on")&&t._isFieldHidden(r))return!0;var o=t._getAttrs(r.name,!0);return!(!(0,d.default)(e,"depends_show_if")||e.depends_show_if===o)||!(!(0,d.default)(e,"depends_show_if_not")||e.depends_show_if_not!==o)}))}},{key:"_normalizeField",value:function(e){var t=this,n=this.props,r=n.animate,o=n.module,a=n.moduleAttrs,i=$($({},e),{},{controlType:e.type,value:this._getAttrs(e.name,!0),default:this._getDefault(e.name),animate:r,module:o,moduleAttrs:a,_onChange:this._onChange});if("color"===i.field_template&&(i.disableCurrent=!1,i.hasPreview=!0,i.hasColorManager=!0,i.showPickerPalettes=!1,i.hidePickerOnPaletteSelect=!0,i.hidePaletteOnPickerActive=!1,i.addTitle=M.default.getI18n("controls.background.addColor"),H.default.isHoverMode()&&(i.name="".concat(i.name,"__hover"))),"use_color_gradient"===i.field_template){i.controlType="gradient",i.hasPreview=!0,i.addTitle=M.default.getI18n("controls.background.addGradient"),i._onChange=this._onChangeGradient,i._onMouseEnter=this._onMouseEnterFormGroupGradient,i._onMouseLeave=this._onMouseLeaveFormGroupGradient;var u=this._getAttrsByTemplate("use_color_gradient",!0);if(T.default.isOn(u)){var s=this._getGradientPreviewStyle(!0),c=(0,l.default)(["colorStart","colorEnd"],(function(e){var n=t._getFieldByTemplate(T.default.gradientFieldsMapping(e));return!n||t._getDefault(n.name)===s[e]}));i.value=s,i.hideResetButton=c}else i.value=""}return"image"===i.field_template&&(i.addTitle=M.default.getI18n("controls.background.addImage"),i.isBackgroundType=!0,i.imagePreviewAttrs=this._getImagePreviewStyle(!0)),(0,f.default)(["video_mp4","video_webm"],i.field_template)&&(i.addTitle=M.default.getI18n("controls.background.addVideo")),i}},{key:"_renderTabNavs",value:function(e){var t=this,n=this._getActiveTab(),r=(0,i.default)(["et-fb-settings-background-tab-navs","et-fb-settings-background-tab-navs-items--".concat((0,_.default)(e).length)]),a="et-fb-settings-background-tab-nav";return o.default.createElement("ul",{className:r},(0,_.default)(e).map((function(e){var r=["".concat(a,"--").concat(e),a];t._isTabDisabled(e)&&r.push("".concat(a,"--disabled"));var l=n===e,u=t._isTabFilled(e);l&&r.push("".concat(a,"--active"));var s=l||u?P.default.info:P.default.inactiveGrey;return o.default.createElement("li",{key:e},o.default.createElement("button",{className:(0,i.default)(r),name:e,"data-tab":e,onClick:t._onClickTabNav,onMouseEnter:t._onMouseEnterTabNav,onMouseLeave:t._onMouseLeaveTabNav},o.default.createElement(j.default,{icon:"background-".concat(e),color:s})))})))}},{key:"_renderTabs",value:function(e){var t=this,n=this._getActiveTab(),r="et-fb-settings-background-tab";return(0,w.default)(e,(function(e,a){if(n!==a)return!1;var l=[r,"".concat(r,"--").concat(a),"".concat(r,"--active")];return o.default.createElement("div",{key:a,className:(0,i.default)(l)},t._renderFields(e,a))}))}},{key:"_renderFields",value:function(e){var t=this;return(0,w.default)(e,(function(e){var n=e.name||"";if(!n)return!1;var r=t._normalizeField(e);if(!r)return!1;var a=r.controlType||"";if(!a||!(0,d.default)(ne,a))return!1;if(t._isFieldHidden(r))return!1;var l=["et-fb-settings-options","et-fb-option--".concat(r.type.replace("_","-"))];return(0,b.default)(r.depends_default)&&(0,b.default)(r.depends_show_if)&&(0,b.default)(r.depends_show_if_not)||l.push("et-fb-option--depends-on"),o.default.createElement(V.ETBuilderFormGroup,{key:"general-form-group-".concat(n),className:(0,i.default)(Y({},"et-fb-form__group--".concat(n),!0)),name:n,onMouseEnterGroup:t._onMouseEnterFormGroup,onMouseLeaveGroup:t._onMouseLeaveFormGroup,isGlobalOptionSynced:r.isGlobalOptionSynced,isSelectiveSyncAvailable:r.isSelectiveSyncAvailable,_unsyncGlobalSetting:r._unsyncGlobalSetting},t._renderFieldLabel(r,n),t._renderFieldDescription(r,n),o.default.createElement("div",{key:"et-fb-option-advanced_".concat(n),className:(0,i.default)(l)},o.default.createElement("div",{key:"et-fb-option-container-".concat(n),className:"et-fb-option-container"},t._renderControl(r,n))))}))}},{key:"_renderFieldLabel",value:function(e,t){if(!e.label||(0,f.default)(["color","use_color_gradient","image"],e.field_template))return!1;var n=T.default.hasValue(e.description),r=this.props.isResetActive(e),a=this.props.isHoveredGroup(e.name),i=n&&this.props.isDescriptionVisible(e.name),l=!!n&&this.props.onClickHelp;return o.default.createElement(V.ETBuilderFormLabel,{key:"general-form-label-".concat(t),name:e.name,hoveredGroup:a,isResetActive:r,activeHelp:i,onClickHelp:l,onClickReset:this.props.onClickReset,onToggleRightMenu:this.props.onToggleRightMenu},e.label)}},{key:"_renderFieldDescription",value:function(e,t){return!(!e.description||(0,f.default)(["color","use_color_gradient","image"],e.field_template))&&o.default.createElement(V.ETBuilderFormDescription,{key:"general-form-description-".concat(t),active:this.props.isDescriptionVisible(e.name)},e.description)}},{key:"_renderControl",value:function(e,t){var n=e.controlType||"";return!(!n||!(0,d.default)(ne,n))&&("image"===e.field_template?this._renderControlDynamic(e,t):o.default.createElement(ne[n],$({key:t},e)))}},{key:"_renderControlDynamic",value:function(e,t){var n=e.controlType||"";if(!n||!(0,d.default)(ne,n))return!1;var r=e.value||"",a=this._getFieldNameByMode(e.name),i=(0,W.getEnabledDynamicAttributes)(this._getModuleAttrs()),l=!x.default.isDesktopMode()&&!(0,m.default)(e.value,e.default);return(0,W.isDynamicContent)(r)&&!(0,f.default)(i,a)&&i.push(a),o.default.createElement(I.default,{key:t,type:"image",previewMode:"background",fieldName:a,fieldType:e.type,value:r,previewAttributes:e.imagePreviewAttrs,dynamicAttributes:i,showInheritButton:l,onChange:this._onChange,onReset:this._onResetDynamic,onInherit:this._onInheritDynamic},o.default.createElement(ne[n],$({key:t},e)))}},{key:"render",value:function(){var e=this._getTabsNotEmpty();return!(0,h.default)(e)&&o.default.createElement("div",null,this._renderTabNavs(e),o.default.createElement("div",{className:"et-fb-settings-background-tabs"},this._renderTabs(e)))}}],n&&X(t.prototype,n),r&&X(t,r),D}(o.Component);re.propTypes={name:a.default.string,activeTab:a.default.string,toggle_slug:a.default.string,tab_slug:a.default.string,isColumnBackground:a.default.bool,readonly:a.default.bool,animate:a.default.bool,moduleAttrs:a.default.object,backgroundFields:a.default.object,background_fields:a.default.object,_onChange:a.default.func,onMouseEnterGroup:a.default.func,onMouseLeaveGroup:a.default.func,isResetActive:a.default.func,isHoveredGroup:a.default.func,isDescriptionVisible:a.default.func,onClickReset:a.default.func,onClickHelp:a.default.func,onToggleRightMenu:a.default.func};var oe=re;t.default=oe},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=c(n(7)),i=c(n(40)),l=n(607),u=c(n(606)),s=c(n(1454));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function f(){return f=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n50&&(t=50),d.default.processRangeValue(t)}},{key:"_renderTabPreviewArea",value:function(e){var t=this,n=["width","style","color"],r={};return(0,u.default)(["top","right","bottom","left"],(function(e){var o="";(0,u.default)(n,(function(n){var r="border_".concat(n,"_").concat(e).concat(t.suffix),a="border_".concat(n,"_all").concat(t.suffix),i=t.getDefault(a),l=d.default.get(t.getDefault(r),i),u=t._processProperty(n,t.getValue(a)),s=t._processProperty(n,d.default.get(t.getValue(r),d.default.get(u,l)));if(f.default.isMobile(t.props,!1)){var c=d.default.get(t.getValue(r),t.getDefault(r)),p=d.default.get(t.getValue(a),d.default.get(t.getDefault(a),t.getFieldDefault(a)));s=t._processProperty(n,d.default.get(c,p))}o+="".concat(s," ")})),(0,l.default)(r,"border".concat((0,s.default)(e)),o)})),o.default.createElement("div",{className:"et-fb-settings-border-styles-wrap"},o.default.createElement("div",{className:"et-fb-settings-border-styles-wrap-column"},o.default.createElement("div",{className:"et-fb-settings-border-styles-preview",style:r})))}}])&&h(t.prototype,n),r&&h(t,r),c}(c.default);_.propTypes=b;var w=_;t.default=w},function(e,t,n){},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=p(n(0)),a=p(n(7)),i=p(n(16)),l=p(n(122)),u=p(n(13)),s=p(n(31)),c=p(n(4)),d=p(n(195));n(1509);var f=p(n(44));function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.state.transformTab,t="transform_".concat(e),n="".concat(t).concat(this.getViewTabSuffix()),r=this.getSettingDefault(t),o=(0,l.default)(this.getAttrs(),n,r),a="",i="";return(0,s.default)(["scale","translate","skew"],e)&&(a=this.getSettingDefault("".concat(t,"_linked")),i=(0,l.default)(this.getAttrs(),"".concat(t,"_linked").concat(this.getViewTabSuffix()),a)),k.default.hasValue(i)&&i!==a||o!==r&&k.default.hasValue(o)}},{key:"onClickReset",value:function(){var e="transform_".concat(this.state.transformTab);this.props._onChange("".concat(e).concat(this.getViewTabSuffix()),"","range",null,!0),(0,s.default)(["scale","translate","skew"],this.state.transformTab)&&this.setLinked(this.state.transformTab,this.getSettingDefault("".concat(e,"_linked")))}},{key:"onClickHover",value:function(){this.props.onClickHover(this.props.name,(0,d.default)(this.getTabs()).map((function(e){return"transform_".concat(e)})))}},{key:"onClickSticky",value:function(){this.props.onClickSticky(this.props.name,(0,d.default)(this.getTabs()).map((function(e){return"transform_".concat(e)})))}},{key:"buttonsVisible",value:function(){var e=this,t=!1;return(0,d.default)(this.getTabs()).forEach((function(n){t||(t=e.props.isHoveredGroup("transform_".concat(n)))})),t}},{key:"onEnterGroup",value:function(e){var t=this.getSetting(e),n={fieldName:e,fieldLabel:(0,l.default)(t,"label"),fieldType:(0,l.default)(t,"type"),toggleId:this.props.toggle_slug,toggleGroupId:this.props.tab_slug,fieldContextMenu:this.state.transformTabContextMenu};this.props.onMouseEnterGroup(n)}},{key:"onLeaveGroup",value:function(){var e={fieldName:this.props.name,fieldLabel:this.props.label,fieldType:this.props.type,toggleId:this.props.toggle_slug,toggleGroupId:this.props.tab_slug,fieldContextMenu:this.state.transformTabContextMenu};this.props.onMouseEnterGroup(e)}},{key:"render",value:function(){if(!this.props._isOptionMatchesFilter(this.props.label,"".concat(this.props.description," scale rotate translate skew origin"),this.props.label))return!1;var e=this.props,t=e.name,n=e.label,r=e.description,a=e.hasHoverOptions,i=e.hasStickyOptions,l=e.mobile_options,u=!(0,c.default)(r)&&""!==r,s=o.default.createElement(y.default,{name:t,key:"general-form-label-".concat(this.props.uniqueKey),onClickHelp:this.props.onClickHelp,activeHelp:this.props.isDescriptionVisible(t),hasHoverOptions:k.default.hasValue(a),activeHover:this.props.activeHover,onClickHover:this.onClickHover,hasStickyOptions:k.default.hasValue(i),activeSticky:this.props.activeSticky,onClickSticky:this.onClickSticky,hasResponsiveOptions:k.default.hasValue(l),isResponsiveEnabled:this.isResponsiveEnabled(),onClickResponsive:this.onClickResponsive,onClickReset:this.onClickReset,isResetActive:this.isResetActive(),hoveredGroup:this.buttonsVisible(),onToggleRightMenu:!!this.state.transformTabContextMenu&&this.props.onToggleRightMenu},n),d=u?o.default.createElement(w.default,{active:this.props.isDescriptionVisible(t),key:"general-form-description-".concat(this.props.uniqueKey)},r):"",f="transform_".concat(this.state.transformTab),p=this.isResponsiveEnabled()||this.isHoverEnabled()||this.isStickyEnabled()?o.default.createElement(v.default,null,o.default.createElement(E.default,{module:this.getModule(),moduleAttrs:this.getAttrs(),fieldName:t,subFields:[f],activeTabMode:this.props.activeTabMode,isGlobalPresetsMode:this.props.isGlobalPresetsMode,isResponsiveEnabled:this.isResponsiveEnabled(),isHoverEnabled:this.isHoverEnabled(),isStickyEnabled:this.isStickyEnabled(),isItemSelected:this.props.isItemSelected})):"";return o.default.createElement(g.default,{name:f,key:"advanced-form-group-".concat(this.props.uniqueKey),onMouseEnterGroup:this.onEnterGroup,onMouseLeaveGroup:this.onLeaveGroup,className:this.props.productTourClass,isSelectiveSyncAvailable:this.props.isSelectiveSyncAvailable(),isGlobalOptionSynced:this.props.isGlobalOptionSynced(f),_unsyncGlobalSetting:this.props._unsyncGlobalSetting},s,d,p,this.transformTabs(),this.renderTransformField())}}],n&&P(t.prototype,n),r&&P(t,r),M}(p.default),B=R;t.default=B},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=D(n(0)),a=D(n(29)),i=D(n(16)),l=D(n(13)),u=D(n(1)),s=D(n(4)),c=D(n(68)),d=D(n(5)),f=D(n(11)),p=D(n(8)),h=D(n(119)),m=D(n(63)),g=D(n(211)),y=D(n(454)),v=D(n(14)),b=D(n(132)),_=D(n(84)),w=D(n(387)),k=D(n(449)),O=D(n(385)),S=D(n(100)),C=D(n(1460)),E=D(n(2)),M=D(n(57)),T=D(n(296)),P=D(n(22)),x=D(n(6)),j=D(n(19));function D(e){return e&&e.__esModule?e:{default:e}}function L(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"ajax_in_progress",o="et_builder_email_add_account"===t.action;this.setState(I({},r,!0)),e.ajax({type:"POST",url:ETBuilderBackend.ajaxUrl,dataType:"json",data:t}).done((function(e,t,r){o&&E.default.hasValue(e.redirect_url)?n._openPopupAuth(e):n._ajaxComplete(e)})).fail((function(){return n._ajaxComplete()}))}},{key:"_ajaxComplete",value:function(e){var t=this;if(e){var n=["et_pb_signup"];"spam"===(0,u.default)(this,"props.toggle_slug")&&n.push("et_pb_contact_form"),(0,p.default)(n,(function(n){var r=P.default.getComponentFieldsByType(n)[t.props.name];r.options=(0,f.default)({},e.accounts_list),j.default.updateComponentFieldDefinition(n,t.props.name,r),"et_pb_signup"!==n||(0,s.default)(e.predefined_custom_fields)||(ETBuilderBackend.emailPredefinedCustomFields=e.predefined_custom_fields),"et_pb_signup"!==n||(0,s.default)(e.custom_fields)||j.default.updateComponentFieldDefinitions("et_pb_signup_custom_field",e.custom_fields)}))}if(this.addNewAccountInProgress()&&this.state.ajax_in_progress){x.default.emitModuleSettingsAddAccountAjaxCompleteEvent();var r=(0,_.default)((0,w.default)((0,k.default)(e.accounts_list)));"spam"===(0,u.default)(this,"props.toggle_slug")?(r=(0,b.default)(r),r+="-0"):r=(0,b.default)((0,_.default)((0,k.default)((0,_.default)(r)))),this.previous_selection=r}else this.removeAccountInProgress()&&(this.previous_selection="");this.force_clear_fields=this.removeAccountInProgress(),this.cancelAllActions()}},{key:"_fetchLists",value:function(){var e=this.getProviderName(),t=this.getSelectedAccount(),n={action:"et_builder_email_get_lists",et_builder_email_fetch_lists_nonce:ETBuilderBackend.nonces.moduleEmailOptinFetchLists,et_provider:e,et_account:t};this._ajaxSendRequest(n)}},{key:"actionInProgress",value:function(){return this.addNewAccountInProgress()||this.fetchListsInProgress()||this.removeAccountInProgress()}},{key:"cancelAllActions",value:function(){(""===this.previous_selection||(0,d.default)(["add_new_account","fetch_lists","remove_account"],this.previous_selection))&&(this.previous_selection="none"),this.setState({ajax_in_progress:!1,remove_account_ajax:!1}),this.props._onChange(this.props.name,this.previous_selection)}},{key:"getSelectedAccount",value:function(){return e(a.default.findDOMNode(this)).find(":selected").parent().attr("label")}},{key:"setPreviousSelection",value:function(){this.previous_selection="".concat(this.getSelectedAccount(),"|").concat(this.props.value)}},{key:"_onChange",value:function(e,t,n){var r=(0,d.default)(["add_new_account","fetch_lists","remove_account"],t),o=this.actionInProgress()&&!r;this.props._onChange(e,t),o&&this.cancelAllActions(),!this.actionInProgress()&&r&&("add_new_account"===t?"aweber"===this.getProviderName()&&setTimeout((function(){E.default.topWindow().open("https://auth.aweber.com/1.0/oauth/authorize_app/b17f3351")}),500):"fetch_lists"===t&&this._fetchLists())}},{key:"_onClickAddNewAccountButton",value:function(){this.addNewAccountInProgress()||(this.setPreviousSelection(),this._onChange(this.props.name,"add_new_account"))}},{key:"_onClickFetchListsButton",value:function(){this.removeAccountInProgress()?this.cancelAllActions():this.actionInProgress()||(this.setPreviousSelection(),this._onChange(this.props.name,"fetch_lists"))}},{key:"_onClickRemoveAccountButton",value:function(){this.removeAccountInProgress()&&!this.state.remove_account_ajax?this._removeAccount():this.removeAccountInProgress()||(this.selected_account=this.getSelectedAccount(),this.setPreviousSelection(),this._onChange(this.props.name,"remove_account"))}},{key:"UNSAFE_componentWillUpdate",value:function(e,t){var n=t.ajax_in_progress;V(e.value)||H(e.value)?G.addClass("et-fb--email-action-in-progress"):G.removeClass("et-fb--email-action-in-progress"),n?G.addClass("et-fb--email-ajax-in-progress"):G.removeClass("et-fb--email-ajax-in-progress")}},{key:"_renderAddNewAccountButton",value:function(e){var t=(0,u.default)(this.props,"after[0].text","");return this.addNewAccountInProgress()||this.removeAccountInProgress()||!this.canAddNewAccount()?"":o.default.createElement(T.default,{useWrapper:!1,isLoading:this.state.ajax_in_progress},o.default.createElement(M.default,{className:e,_onClick:this._onClickAddNewAccountButton,inverse:!0},t))}},{key:"_renderRemoveAccountButton",value:function(e){var t=this.removeAccountInProgress(),n=(0,u.default)(this.props,"after[1].attributes.data-confirm_text",""),r=(0,u.default)(this.props,"after[1].text","");return this.addNewAccountInProgress()||this.fetchListsInProgress()||!W(this.props.value)||"0"===this.props.value?"":o.default.createElement(T.default,{useWrapper:!1,isLoading:this.state.remove_account_ajax},o.default.createElement(M.default,{className:e,_onClick:this._onClickRemoveAccountButton,inverse:!0},t?n:r))}},{key:"_renderFetchListsButton",value:function(e){var t=(0,u.default)(this.props,"after[2].attributes['data-cancel_text']","");t||(t=(0,u.default)(this.props,"after[1].attributes['data-cancel_text']",""));var n=this.addNewAccountInProgress(),r=(0,u.default)(this.props,"after[2].text","");return n||!r&&!this.removeAccountInProgress()||this.state.ajax_in_progress||this.state.remove_account_ajax||!W(this.props.value)?"":o.default.createElement(T.default,{useWrapper:!1,isLoading:this.fetchListsInProgress()},o.default.createElement(M.default,{className:e,_onClick:this._onClickFetchListsButton,inverse:!0},this.removeAccountInProgress()?t:r))}},{key:"render",value:function(){var e,t=this.props.type.replace(/_/g,"-"),n=(0,l.default)({"et-fb-settings-button--additional-button":!0}),r=this.addNewAccountInProgress()&&this.state.ajax_in_progress,a=this.addNewAccountInProgress()||this.removeAccountInProgress(),i="spam"===(0,u.default)(this,"props.toggle_slug"),s="";a&&this.addNewAccountInProgress()?s=this.props.attributes["data-adding_new_account_text"]:a&&this.removeAccountInProgress()&&(s="".concat(this.props.attributes["data-confirm_remove_text"]," ").concat(this.selected_account));var c=(0,l.default)((I(e={},"et-fb-option--".concat(t),!0),I(e,"et-fb--email-add-new-in-progress-ajax",r),I(e,"et-fb--email-add-new-in-progress",this.addNewAccountInProgress()),I(e,"et-fb--email-fetch-lists-in-progress",this.fetchListsInProgress()),I(e,"et-fb--email-remove-in-progress",this.removeAccountInProgress()),I(e,"et-fb--spam",i),e)),d=this.props.value||this.props.default,f=!this.props.readonly,p=W(d),h=f&&!this.props.hideAddButton,m=p&&f&&!this.props.hideRemoveButton,g=p&&f&&!this.props.hideFetchButton,y=(0,S.default)(this.props.options,(function(e,t){return(0,O.default)(e,(function(e,n){return"manage"===t?n:"".concat(t,"|").concat(n)}))}));return o.default.createElement("div",{className:c},a?o.default.createElement("span",{className:"et-fb-form__description"},s):o.default.createElement(C.default,{name:this.props.name,value:this.props.value||this.props.default,className:(0,l.default)("et-fb-settings-option--with-after-element"),groups:!0,parseGroupValue:!1,options:y,module:this.props.module,readonly:this.props.readonly||!1,_onChange:this._onChange}),h&&this._renderAddNewAccountButton(n),m&&this._renderRemoveAccountButton(n),g&&this._renderFetchListsButton(n))}}],r&&L(n.prototype,r),D&&L(n,D),F}(o.default.Component),z=U;t.default=z}).call(this,n(9))},function(e,t,n){},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=_(n(0)),a=_(n(16)),i=_(n(13)),l=_(n(1)),u=_(n(10)),s=_(n(63)),c=_(n(211)),d=_(n(71)),f=_(n(14)),p=_(n(8)),h=(_(n(350)),_(n(9))),m=_(n(446)),g=_(n(57)),y=_(n(296)),v=_(n(6)),b=n(1512);function _(e){return e&&e.__esModule?e:{default:e}}function w(e,t){for(var n=0;n0)return t.css("border","1px solid #EF5555"),void t.on("input",(function(){(0,h.default)(this).val()&&(0,h.default)(this).css("border","")||(0,h.default)(this).css("border","1px solid #EF5555")}));v.default.emitModuleSettingsAddAccountSubmitEvent.call(v.default),this.setState({ajax_in_progress:!0})}},{key:"render",value:function(){var e,t=this,n=this.props.type.replace(/_/g,"-"),r=(0,i.default)({"et-fb-settings-button--additional-button":!0}),a=(0,i.default)({"et-fb-settings-option--with-after-element":!0,"et-fb-settings-option--not-required":this.props.not_required}),s=(0,i.default)((M(e={},"et-fb-option--".concat(n),!0),M(e,"et-fb-option-group--last-field",!0),e));return o.default.createElement("div",{ref:function(e){return t.node=e},className:s},o.default.createElement(m.default,{name:this.props.name,value:(0,u.default)(this.props.value)?"":this.props.value,className:a,groups:!0,options:this.props.options,module:this.props.module,_onChange:this.props._onChange}),o.default.createElement(g.default,{className:(0,i.default)(r,"et-fb-button--cancel"),_onClick:this._onClickCancelButton,inverse:!0},(0,l.default)(this.props,"after[0].text","")),o.default.createElement(y.default,{useWrapper:!1,isLoading:this.state.ajax_in_progress},o.default.createElement(g.default,{className:r,_onClick:this._onClickSubmitButton,inverse:!0},(0,l.default)(this.props,"after[1].text",""))))}}])&&w(t.prototype,n),r&&w(t,r),S}(o.default.Component);t.default=T},function(e,t,n){},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=u(n(381)),i=u(n(1));n(1695);var l=u(n(446));function u(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"";return""!==e?o.default.createElement("div",{className:"".concat(this.getButtonClass(e)," ").concat(_,"-").concat(this.position),"data-origin_type":e,onMouseDown:this.handleButtonOnClick,onMouseEnter:this.handleButtonOnMouseEnter,onMouseLeave:this.handleButtonOnMouseLeave}):o.default.createElement("div",{className:"".concat(_,"-button-guide ").concat(_,"-").concat(this.position)})}},{key:"renderNineController",value:function(){var e=this.state.value.split("_"),t="transparent",n="transparent";return"center"===e[0]&&(t=d.default.selectPositionGray),"center"===e[1]&&(n=d.default.selectPositionGray),o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"".concat(_,"-hr"),ref:this.hRuler,style:{backgroundColor:t}}),o.default.createElement("div",{className:"".concat(_,"-vr"),ref:this.vRuler,style:{backgroundColor:n}}),o.default.createElement("div",{className:"".concat(_,"-control-guide ").concat(_,"-").concat(this.position)},o.default.createElement("div",{className:"".concat(_,"-control-inner-top")},this.renderButton(),this.renderButton(),this.renderButton()),o.default.createElement("div",{className:"".concat(_,"-control-inner-mid")},this.renderButton(),this.renderButton(),this.renderButton()),o.default.createElement("div",{className:"".concat(_,"-control-inner-bottom")},this.renderButton(),this.renderButton(),this.renderButton())),o.default.createElement("div",{className:"".concat(_,"-control-frame ").concat(_,"-").concat(this.position)}),o.default.createElement("div",{className:"".concat(_,"-control-guide ").concat(_,"-").concat(this.position)},o.default.createElement("div",{className:"".concat(_,"-control-inner-top")},this.renderButton("top_left"),this.renderButton("top_center"),this.renderButton("top_right")),o.default.createElement("div",{className:"".concat(_,"-control-inner-mid")},this.renderButton("center_left"),this.renderButton("center_center"),this.renderButton("center_right")),o.default.createElement("div",{className:"".concat(_,"-control-inner-bottom")},this.renderButton("bottom_left"),this.renderButton("bottom_center"),this.renderButton("bottom_right"))))}},{key:"renderFourController",value:function(){return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:"".concat(_,"-control-guide ").concat(_,"-").concat(this.position)},o.default.createElement("div",{className:"".concat(_,"-control-inner-top")},this.renderButton(),o.default.createElement("div",{className:"".concat(_,"-button-space")}),this.renderButton()),o.default.createElement("div",{className:"".concat(_,"-control-inner-bottom")},this.renderButton(),o.default.createElement("div",{className:"".concat(_,"-button-space")}),this.renderButton())),o.default.createElement("div",{className:"".concat(_,"-control-frame ").concat(_,"-").concat(this.position)}),o.default.createElement("div",{className:"".concat(_,"-control-guide ").concat(_,"-").concat(this.position)},o.default.createElement("div",{className:"".concat(_,"-control-inner-top")},this.renderButton("top_left"),o.default.createElement("div",{className:"".concat(_,"-button-space")}),this.renderButton("top_right")),o.default.createElement("div",{className:"".concat(_,"-control-inner-bottom")},this.renderButton("bottom_left"),o.default.createElement("div",{className:"".concat(_,"-button-space")}),this.renderButton("bottom_right"))))}},{key:"render",value:function(){return o.default.createElement("div",{id:"".concat(_,"-container"),className:"".concat(_,"-container")},"relative"===this.position?this.renderFourController():this.renderNineController())}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){return t.value!==e.value?{value:e.value||e.default}:null}}],n&&p(t.prototype,n),r&&p(t,r),l}(o.default.Component);b(k,"propTypes",{default:a.default.string,name:a.default.string.isRequired,value:a.default.string,_onChange:u.default,readonly:a.default.bool}),b(k,"defaultProps",{default:"top_left",name:"position_origin_r",value:"top_left",_onChange:u.default,readonly:!1});var O=k;t.default=O},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ETBuilderControlAlign=void 0;var r=l(n(0)),o=l(n(125)),a=n(1513),i=n(1512);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function y(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function v(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var f=function(e){var t=e.onChange,n=e.className,o=d(e,u);return r.default.createElement(i.default,c({className:(0,a.default)(l.handler,n),onDragX:t},o))};f.propTypes={onChange:o.default.func.isRequired,className:o.default.string},f.defaultProps={className:""};var p=f;t.default=p},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(0)),o=l(n(7)),a=l(n(13)),i=n(1455);function l(e){return e&&e.__esModule?e:{default:e}}n(1708);var u=function(e){var t=e.offset,n=e.width,o=e.className;return r.default.createElement("div",{className:(0,a.default)(i.track,o),style:{left:"".concat(t,"%"),width:"".concat(n,"%")}})};u.propTypes={className:o.default.string,offset:o.default.number,width:o.default.number},u.defaultProps={className:"",offset:0,width:100};var s=u;t.default=s},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(0)),o=u(n(7)),a=u(n(1710)),i=n(1455),l=n(1479);function u(e){return e&&e.__esModule?e:{default:e}}n(1713);var s=function(e){var t=e.value,n=e.width;return r.default.createElement("ul",{className:i.counters},(0,l.getCounters)(t,n).map((function(e,t){return r.default.createElement(a.default,{key:t,values:e})})))};s.propTypes={value:o.default.string.isRequired,width:o.default.number.isRequired};var c=s;t.default=c},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=f(n(7)),i=f(n(13)),l=f(n(132)),u=f(n(84)),s=n(161),c=n(108),d=n(1455);function f(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}n(1711);var h=function(e){var t=e.values,n=t.filter(s.hasValue),r=n.map((function(e){return"".concat(e,"%")})).join(" "),a=n.length>1?d.counterMulti:"",f=Math.round((0,c.average)([(0,l.default)(t),(0,u.default)(t)]));return o.default.createElement("span",{className:(0,i.default)(d.counter,a),style:{left:"".concat(f,"%")}},r)};h.propTypes={values:a.default.arrayOf(a.default.number)},h.defaultProps={values:[]};var m=h;t.default=m},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=t.intersperse=void 0;var r=i(n(356)),o=i(n(84)),a=i(n(453));function i(e){return e&&e.__esModule?e:{default:e}}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1),n));return o.default.createElement("div",{key:t,className:r,style:{left:"".concat((0,l.average)(e),"%")}},e.map((function(){return m[g++]})))}));return o.default.createElement("div",{className:s.inputsList},y)};h.propTypes={onChange:a.default.func.isRequired,value:a.default.string,defaultValue:a.default.string,width:a.default.number.isRequired,resolver:a.default.shape({getStartValue:a.default.func.isRequired,setStartValue:a.default.func.isRequired,getMiddleValue:a.default.func.isRequired,setMiddleValue:a.default.func.isRequired,getEndValue:a.default.func.isRequired,setEndValue:a.default.func.isRequired}).isRequired,i10n:a.default.shape({startValueTitle:a.default.string,middleValueTitle:a.default.string,endValueTitle:a.default.string})},h.defaultProps={value:"",defaultValue:"",i10n:{startValueTitle:"",middleValueTitle:"",endValueTitle:""}};var m=h;t.default=m},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=P(n(1718)),a=P(n(54)),i=P(n(10)),l=P(n(1)),u=P(n(619)),s=P(n(11));n(1719);var c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=T(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),d=P(n(7)),f=n(1515),p=n(1721),h=n(1516),m=P(n(1740)),g=P(n(1741)),y=P(n(605)),v=P(n(1505)),b=P(n(1742)),_=P(n(1743)),w=n(1745),k=n(1747),O=n(1748),S=n(1456),C=P(n(122)),E=P(n(6)),M=n(1517);function T(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(T=function(e){return e?n:t})(e)}function P(e){return e&&e.__esModule?e:{default:e}}function x(){return x=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?arguments[1]:void 0;T((function(t){return t.conditions=t.conditions.map((function(t){return t.operator=e,t})),t.currentSelected.operator=e,L({},t)})),$()},te=function(e){V||ce()||d.isSettingsModalOpen||(T((function(t){return t.conditions=j(t.conditions.filter((function(t){return t.id!==e}))),L({},t)})),$())},ne=function(e){if(!V&&!ce()){var t=d.conditions.find((function(t){return t.id===e}));T((function(n){return n.currentSelected.condition=t.condition,n.settingsModalValues=n.conditions.find((function(t){return t.id===e})).conditionSettings,L({},n)})),function(e){T((function(t){return t.editingConditionId=e,L({},t)}))}(e),Y()}},re=function(e){V||ce()||(T((function(t){return t.conditions=t.conditions.flatMap((function(t){return t.id===e?[t,(0,s.default)({},t,{id:(0,f.v4)()})]:t})),L({},t)})),$())},oe=function(e,t){V||ce()||(T((function(n){var r="",o="";n.conditions.forEach((function(n,a){n.id===e?r=a:n.id===t&&(o=a)}));var a=[n.conditions[o],n.conditions[r]];return n.conditions[r]=a[0],n.conditions[o]=a[1],L({},n)})),$())},ae=function(){return d.conditions.map((function(e,t){var n=e.condition,r=e.conditionSettings;return(0,w.getTooltipContent)(n,r,t,e.id,G)}))},ie=function(){var e=["loggedInStatus","userRole","dateTime","productPurchase","cartContents","operatingSystem","browser","pageVisit","postVisit","cookie","numberOfViews"],t=d.conditions.filter((function(t){var n=t.condition;return e.includes(n)})).length>0;N(t)},le=function(){q.forEach((function(e){var t=e.value.toString(),n=e.label,r=e.singular_label;(0,a.default)(p.conditionNames,"location."+t,n);var i=(0,u.default)((0,o.default)("dynamicPostsDisplay.label","".concat(O.dynamicPostsFields.dynamicPostsDisplay.label," ").concat(r)),(0,o.default)("adminLabel.default","".concat(n)),(0,o.default)("dynamicPosts.options.postType","".concat(t)),(0,o.default)("postTypeLabel.default","".concat(n)))(O.dynamicPostsFields);p.conditionFields[t]=i}))},ue=function(){C.default.hide(),F(!1)},se=function(){F(!0)},ce=function(){return!(!E.default.getFindReplaceModal()||!W.current)&&!!W.current.closest(".et-fb-form__group--find-replace__find")};return parseFloat(window.etCore.wp_version.toString().substr(0,3))>=5.3?c.default.createElement("div",{ref:W},c.default.createElement(_.default,null,d.conditions.length>1&&c.default.createElement("div",{className:"et-fb-display-conditions-operator-container"},c.default.createElement(y.default,{className:"et-fb-display-conditions-operator",name:"display-conditions-operator",value:d.currentSelected.operator,options:{OR:(0,M.i18n)("Display if any condition is true"),AND:(0,M.i18n)("Display if all conditions are true")},_onChange:ee,selectFirst:!1})),d.conditions.map((function(e){return c.default.createElement(b.default,{key:e.id,id:e.id,onSort:oe,onEndDrag:se},c.default.createElement(g.default,x({},e,{conditionId:e.id,onTooltip:ae,onDelete:te,onEdit:ne,onDuplicate:re,onMouseDown:ue,onMouseUp:se,tooltipVisibility:B})))})),c.default.createElement("div",{className:"et-fb-display-conditions-container"},c.default.createElement(y.default,{role:"display-conditions-list",className:"et-fb-display-condition-list",name:"display-conditions",ref:I,value:"",options:p.conditionNames,_onChange:function(e,t){T((function(e){return e.currentSelected.condition=t,L({},e)})),Y()},selectFirst:!1,optionGroups:p.conditionGroups})),d.isSettingsModalOpen&&c.default.createElement(v.default,{title:p.conditionNames[d.currentSelected.condition],fields:p.conditionFields[d.currentSelected.condition],values:d.settingsModalValues,onChange:function(e){Z(e),Q(e)},onSave:function(){!function(){if(d.editingConditionId){var e={id:d.editingConditionId,condition:d.currentSelected.condition,conditionSettings:d.currentSelected.conditionSettings,operator:d.currentSelected.operator};T((function(t){return t.conditions=t.conditions.map((function(n){return n.id===t.editingConditionId?e:n})),L({},t)}))}else T((function(e){var t={id:(0,f.v4)(),condition:e.currentSelected.condition,conditionSettings:e.currentSelected.conditionSettings,operator:e.currentSelected.operator};return e.conditions=[].concat(j(e.conditions),[t]),L({},e)}))}(),$(),T((function(e){return e.editingConditionId=null,L({},e)})),J(),X()},onClose:function(){J(),X()}}),c.default.createElement(m.default,{onClick:function(){return I.current.toggleMenu({target:null})}})),D&&c.default.createElement("div",{className:"display-conditions-cache-notice"},(0,M.i18n)("Translatable Cache Notice"))):c.default.createElement("div",{className:"display-conditions-cache-notice"},(0,M.i18n)("Display Conditions Min Requirements"))};F.propTypes={_onChange:d.default.func,name:d.default.string,type:d.default.string,value:d.default.string},F.defaultProps={_onChange:function(){},name:"",type:"",value:[]},F.displayName="ETBuilderConditionalDisplay";var I=F;t.default=I},function(e,t,n){var r=n(52)("set",n(54));r.placeholder=n(47),e.exports=r},function(e,t,n){},function(e,t,n){var r,o,a=n(501),i=n(502),l=0,u=0;e.exports=function(e,t,n){var s=t&&n||0,c=t||[],d=(e=e||{}).node||r,f=void 0!==e.clockseq?e.clockseq:o;if(null==d||null==f){var p=a();null==d&&(d=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==f&&(f=o=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:u+1,g=h-l+(m-u)/1e4;if(g<0&&void 0===e.clockseq&&(f=f+1&16383),(g<0||h>l)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=h,u=m,o=f;var y=(1e4*(268435455&(h+=122192928e5))+m)%4294967296;c[s++]=y>>>24&255,c[s++]=y>>>16&255,c[s++]=y>>>8&255,c[s++]=255&y;var v=h/4294967296*1e4&268435455;c[s++]=v>>>8&255,c[s++]=255&v,c[s++]=v>>>24&15|16,c[s++]=v>>>16&255,c[s++]=f>>>8|128,c[s++]=255&f;for(var b=0;b<6;++b)c[s+b]=d[b];return t||i(c)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conditionFields=t.conditionGroups=t.conditionNames=void 0;var r=S(n(10)),o=S(n(1)),a=n(1516),i=n(1722),l=n(1723),u=n(1724),s=n(1725),c=n(1726),d=n(1727),f=n(1728),p=n(1729),h=n(1730),m=n(1731),g=n(1732),y=n(1733),v=n(1734),b=n(1735),_=n(1736),w=n(1737),k=n(1738),O=n(1739);function S(e){return e&&e.__esModule?e:{default:e}}function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t value.label).join(', ');\n const isUserIdsNumeric = ! isNaN( userIds.replaceAll(',','') );\n %>\n Only display to <%=roles%><% if ( isUserIdsNumeric ) { %>,<%=userIds%><% } %>\n "),isNot:(0,o.default)("\n <%\n const roles = userRoles\n .map((value) => value.label).join(', ');\n const isUserIdsNumeric = ! isNaN( userIds.replaceAll(',','') );\n %>\n Don't display to <%=roles%><% if ( isUserIdsNumeric ) { %>,<%=userIds%><% } %>\n ")},dateTime:{isAfter:(0,o.default)("Only display after ${date} at ${time}"),isBefore:(0,o.default)("Only display before ${date} at ${time}"),isOnSpecificDate:(0,o.default)('\n Only display on \n <%=date%> \n <% if (allDay === "off") { %> \n from <%=fromTime%> \n until <%=untilTime%>\n <% } %>\n <% if (repeat === "on") { %>\n , Repeat <%=repeatFrequency%> \n <% } %>\n <% if (repeatEnd === "untilDate") { %>\n until <%=repeatUntilDate%>\n <% } %>\n <% if (repeatEnd === "afterNumberOfTimes") { %>\n <%=repeatTimes%> times\n <% } %>\n '),isNotOnSpecificDate:(0,o.default)('\n Don\'t display on \n <%=date%> \n <% if (allDay === "off") { %> \n from <%=fromTime%> \n until <%=untilTime%>\n <% } %>\n '),isOnSpecificDays:(0,o.default)('\n <%\n let days = weekdays\n .split("|")\n .filter((value) => value.length > 0);\n if ( days.length ) {\n days = days.reduce((acc, value) => acc + \', \' + value);\n }\n %>\n Only display on \n <%=days%> \n <% if (allDay === "off") { %> \n from <%=fromTime%> \n until <%=untilTime%>\n <% } %>\n <% if (repeat === "on") { %>\n , Repeat <%=repeatFrequency%> \n <% } %>\n <% if (repeatEnd === "untilDate") { %>\n until <%=repeatUntilDate%>\n <% } %>\n <% if (repeatEnd === "afterNumberOfTimes") { %>\n <%=repeatTimes%> times\n <% } %>\n '),isFirstDayOfMonth:(0,o.default)('\n Only display on first day of the month\n <% if (allDay === "off") { %> \n from <%=fromTime%> \n until <%=untilTime%>\n <% } %>\n '),isLastDayOfMonth:(0,o.default)('\n Only display on last day of the month\n <% if (allDay === "off") { %> \n from <%=fromTime%> \n until <%=untilTime%>\n <% } %>\n ')},posts:{is:(0,o.default)("\n <%\n const pagesLabels = pages\n .map((value) => value.label).join(', ');\n %>\n Only display on\n <%=pagesLabels%>\n Posts\n "),isNot:(0,o.default)("\n <%\n const pagesLabels = pages\n .map((value) => value.label).join(', ');\n %>\n Don't display on\n <%=pagesLabels%>\n Posts\n ")},pages:{is:(0,o.default)("\n <%\n const pagesLabels = pages\n .map((value) => value.label).join(', ');\n %>\n Only display on\n <%=pagesLabels%>\n Pages\n "),isNot:(0,o.default)("\n <%\n const pagesLabels = pages\n .map((value) => value.label).join(', ');\n %>\n Don't display on\n <%=pagesLabels%>\n Pages\n ")},postType:{is:(0,o.default)("\n <%\n const postTypesLabels = postTypes\n .map((value) => value.label).join(', ');\n %>\n Only display on\n <%=postTypesLabels%> \n "),isNot:(0,o.default)("\n <%\n const postTypesLabels = postTypes\n .map((value) => value.label).join(', ');\n %>\n Don't display on\n <%=postTypesLabels%> \n ")},author:{is:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label).join(', ');\n %>\n Only display on posts authored by \n <%=postsLabels%> \n "),isNot:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label).join(', ');\n %>\n Don't display on posts authored by \n <%=postsLabels%> \n ")},categories:{is:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label + ' ' + value.group).join(', ');\n %>\n Only display on\n <%=postsLabels%> \n "),isNot:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label + ' ' + value.group).join(', ');\n %>\n Don't display on\n <%=postsLabels%> \n ")},categoryPage:{is:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label + ' ' + value.group).join(', ');\n %>\n Only display on\n <%=postsLabels%> \n Pages\n "),isNot:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label + ' ' + value.group).join(', ');\n %>\n Don't display on\n <%=postsLabels%> \n Pages\n ")},tags:{is:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label + ' ' + value.group).join(', ');\n %>\n Only display on\n <%=postsLabels%> \n "),isNot:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label + ' ' + value.group).join(', ');\n %>\n Don't display on\n <%=postsLabels%> \n ")},tagPage:{is:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label + ' ' + value.group).join(', ');\n %>\n Only display on\n <%=postsLabels%> \n Pages\n "),isNot:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label + ' ' + value.group).join(', ');\n %>\n Don't display on\n <%=postsLabels%> \n Pages\n ")},dateArchive:{isAfter:(0,o.default)("\n Only display on date archives after\n <%=date%> \n "),isBefore:(0,o.default)("\n Only display on date archives before\n <%=date%> \n ")},searchResults:{specificSearchQueries:(0,o.default)("\n Only display on search results for\n <%=specificSearchQueries%> \n "),excludedSearchQueries:(0,o.default)("\n Don't display on search results for\n <%=excludedSearchQueries%> \n ")},browser:{is:(0,o.default)("\n <%\n let postsLabels = posts\n .split(\"|\")\n .filter((value) => value.length > 0);\n if ( postsLabels.length ) {\n postsLabels = postsLabels.reduce((acc, value) => acc + ', ' + value);\n }\n %>\n Only display on\n <%=postsLabels%> \n "),isNot:(0,o.default)("\n <%\n let postsLabels = posts\n .split(\"|\")\n .filter((value) => value.length > 0);\n if ( postsLabels.length ) {\n postsLabels = postsLabels.reduce((acc, value) => acc + ', ' + value);\n }\n %>\n Don't display on\n <%=postsLabels%> \n ")},operatingSystem:{is:(0,o.default)("\n <%\n let postsLabels = posts\n .split(\"|\")\n .filter((value) => value.length > 0);\n if ( postsLabels.length ) {\n postsLabels = postsLabels.reduce((acc, value) => acc + ', ' + value);\n }\n %>\n Only display on\n <%=postsLabels%> \n "),isNot:(0,o.default)("\n <%\n let postsLabels = posts\n .split(\"|\")\n .filter((value) => value.length > 0);\n if ( postsLabels.length ) {\n postsLabels = postsLabels.reduce((acc, value) => acc + ', ' + value);\n }\n %>\n Don't display on\n <%=postsLabels%> \n ")},pageVisit:{hasVisitedSpecificPage:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label).join(', ');\n %>\n Only display to users who have visited \n <%=postsLabels%>\n Page\n "),hasNotVisitedSpecificPage:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label).join(', ');\n %>\n Don't display to users who have visited \n <%=postsLabels%>\n Page\n ")},postVisit:{hasVisitedSpecificPage:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label).join(', ');\n %>\n Only display to users who have visited \n <%=postsLabels%>\n Post\n "),hasNotVisitedSpecificPage:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label).join(', ');\n %>\n Don't display to users who have visited \n <%=postsLabels%>\n Post\n ")},productPurchase:{hasBoughtProduct:(0,o.default)("\n Only display to users who have bought a product\n "),hasNotBoughtProduct:(0,o.default)("\n Don't display to users who have bought a product\n "),hasBoughtSpecificProduct:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label).join(', ');\n %>\n Only Display to users who have bought \n <%=postsLabels%> \n "),hasNotBoughtSpecificProduct:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label).join(', ');\n %>\n Don't display to users who have bought \n <%=postsLabels%> \n ")},cartContents:{hasProducts:(0,o.default)("\n Only display to users with Products in their cart\n "),isEmpty:(0,o.default)("\n Only display to users with an empty cart\n "),hasSpecificProduct:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label).join(', ');\n %>\n Only display to users with\n <%=postsLabels%> \n in their cart\n "),doesNotHaveSpecificProduct:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label).join(', ');\n %>\n Only display to users without\n <%=postsLabels%> \n in their cart\n ")},dynamicPosts:{is:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label).join(', ');\n %>\n Only display on\n <%=postsLabels%>\n <%=postTypeLabel%>\n "),isNot:(0,o.default)("\n <%\n const postsLabels = posts\n .map((value) => value.label).join(', ');\n %>\n Don't display on\n <%=postsLabels%>\n <%=postTypeLabel%>\n ")},cookie:{cookieExists:(0,o.default)("\n Only display to users who have <%=cookieName%> cookie\n "),cookieDoesNotExist:(0,o.default)("\n Don't display to users who have <%=cookieName%> cookie\n "),cookieValueEquals:(0,o.default)("\n Only display to users who have <%=cookieName%> cookie with <%=cookieValue%> value\n "),cookieValueDoesNotEqual:(0,o.default)("\n Don't display to users who have <%=cookieName%> cookie with <%=cookieValue%> value\n ")},numberOfViews:{numberOfViews:(0,o.default)('\n Only display <%=numberOfViews%> times<% if (resetAfterDuration === "on") { %>, Reset after <%=displayAgainAfter%> <%=displayAgainAfterUnit%><% } %>\n ')}};t.summaryTooltip=a},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.useGetDisplayConditionsStatus=void 0;var r=n(0);function o(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n').concat(n,""),d=(0,l.default)(o.author_uri)?i:'').concat(i,"");return a.default.createElement("div",{className:"et-fb-settings-modal-module-credits",dangerouslySetInnerHTML:{__html:(0,c.default)("".concat(u," by ").concat(d))},ref:function(t){return e.creditsContainer=t}})}}])&&h(n.prototype,o),i&&h(n,i),f}(a.PureComponent),_={moduleTitle:i.default.string,moduleType:i.default.string};d.default.propTypes=_;var w=b;t.default=w}).call(this,n(2),n(9))},function(e,t,n){},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=b(n(0)),a=b(n(122)),i=b(n(7)),l=b(n(40)),u=b(n(13));n(1770);var s=b(n(6)),c=b(n(22)),d=b(n(1771)),f=n(1518),p=b(n(19)),h=b(n(1789)),m=b(n(610)),g=b(n(1791)),y=b(n(44)),v=b(n(88));function b(e){return e&&e.__esModule?e:{default:e}}function _(e,t){for(var n=0;n1&&this.renderDefaultPreset(),e.length>1&&this.renderPresetsList())}},{key:"render",value:function(){var e=this.props,t=e.module,n=e.onMouseEnter,r=e.onMouseLeave,a=c.default.getModulePreset(this.module,this.currentPreset).name,i=s.default.getGlobalPresetsState().presetsDropdownVisible,l=1===c.default.getModulePresetsCount(this.module)?M.default:a||M.default,u="".concat(M.preset,": ").concat(l);return o.default.createElement(o.default.Fragment,null,o.default.createElement(d.default,{anchor:this.dropdownAnchorRef,menu:this.renderMenu(),module:t,open:i,onMouseEnter:n,onMouseLeave:r,onSelect:this.onPresetSelect,ref:this.dropdownRef},u),o.default.createElement(g.default,{anchor:this.dropdownAnchorRef,onMouseEnter:n,onMouseLeave:r}))}}],n&&_(t.prototype,n),r&&_(t,r),l}(o.default.PureComponent);E(P,"propTypes",{module:i.default.shape({props:i.default.shape({type:i.default.string.isRequired}).isRequired}).isRequired,onMouseEnter:i.default.func,onMouseLeave:i.default.func}),E(P,"defaultProps",{onMouseEnter:l.default,onMouseLeave:l.default});var x=P;t.default=x},function(e,t,n){},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=m(n(0)),a=m(n(7)),i=m(n(122)),l=m(n(40));n(1772);var u=m(n(19)),s=n(1518),c=n(774),d=m(n(1785)),f=m(n(1787)),p=n(348),h=m(n(786));function m(e){return e&&e.__esModule?e:{default:e}}function g(){return g=Object.assign||function(e){for(var t=1;t=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function q(e){var t,n,r;if(V.isWindow(e)||9===e.nodeType){var o=V.getWindow(e);t={left:V.getWindowScrollLeft(o),top:V.getWindowScrollTop(o)},n=V.viewportWidth(o),r=V.viewportHeight(o)}else t=V.offset(e),n=V.outerWidth(e),r=V.outerHeight(e);return t.width=n,t.height=r,t}function K(e,t){var n=t.charAt(0),r=t.charAt(1),o=e.width,a=e.height,i=e.left,l=e.top;return"c"===n?l+=a/2:"b"===n&&(l+=a),"c"===r?i+=o/2:"r"===r&&(i+=o),{left:i,top:l}}function $(e,t,n,r,o){var a=K(t,n[1]),i=K(e,n[0]),l=[i.left-a.left,i.top-a.top];return{left:Math.round(e.left-l[0]+r[0]-o[0]),top:Math.round(e.top-l[1]+r[1]-o[1])}}function Y(e,t,n){return e.leftn.right}function X(e,t,n){return e.topn.bottom}function J(e,t,n){var r=[];return V.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function Q(e,t){return e[t]=-e[t],e}function Z(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function ee(e,t){e[0]=Z(e[0],t.width),e[1]=Z(e[1],t.height)}function te(e,t,n,r){var o=n.points,a=n.offset||[0,0],i=n.targetOffset||[0,0],l=n.overflow,u=n.source||e;a=[].concat(a),i=[].concat(i);var s={},c=0,d=z(u,!(!(l=l||{})||!l.alwaysByViewport)),f=q(u);ee(a,f),ee(i,t);var p=$(f,t,o,a,i),h=V.merge(f,p);if(d&&(l.adjustX||l.adjustY)&&r){if(l.adjustX&&Y(p,f,d)){var m=J(o,/[lr]/gi,{l:"r",r:"l"}),g=Q(a,0),y=Q(i,0);(function(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=n.left&&o.left+a.width>n.right&&(a.width-=o.left+a.width-n.right),r.adjustX&&o.left+a.width>n.right&&(o.left=Math.max(n.right-a.width,n.left)),r.adjustY&&o.top=n.top&&o.top+a.height>n.bottom&&(a.height-=o.top+a.height-n.bottom),r.adjustY&&o.top+a.height>n.bottom&&(o.top=Math.max(n.bottom-a.height,n.top)),V.mix(o,a)}(p,f,d,s))}return h.width!==f.width&&V.css(u,"width",V.width(u)+h.width-f.width),h.height!==f.height&&V.css(u,"height",V.height(u)+h.height-f.height),V.offset(u,{left:h.left,top:h.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:o,offset:a,targetOffset:i,overflow:s}}function ne(e,t,n){var r=n.target||t,o=q(r),a=!function(e,t){var n=z(e,t),r=q(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport);return te(e,o,n,a)}function re(e,t,n){var r,a,i=V.getDocument(e),l=i.defaultView||i.parentWindow,u=V.getWindowScrollLeft(l),s=V.getWindowScrollTop(l),c=V.viewportWidth(l),d=V.viewportHeight(l),f={left:r="pageX"in t?t.pageX:u+t.clientX,top:a="pageY"in t?t.pageY:s+t.clientY,width:0,height:0},p=r>=0&&r<=u+c&&a>=0&&a<=s+d,h=[n.points[0],"cc"];return te(e,f,o(o({},n),{},{points:h}),p)}ne.__getOffsetParent=G,ne.__getVisibleRectForElement=z,t.default=ne},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=l(n(0)),a=l(n(7)),i=n(62);function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n!==this.state.isLabelEditable&&(this.setState({isLabelEditable:n}),e(t.target).closest(".et-fb-layers-view--label").toggleClass("et-fb-editable-label",n))}},{key:"isAllowedAction",value:function(e){var t=(0,h.default)(this,"props"),n=(0,h.default)(t,"attrs.global_module"),r=(0,h.default)(t,"globalParent",!1),o=(0,W.isOn)((0,h.default)(t,"attrs.locked")),a=(0,h.default)(t,"lockedParent",!1),i=(0,h.default)(t,"type"),l=(0,F.getComponentType)(t),u=function(){return!(!D.default.isAllowedAction("add_module")||!(0,V.isInteractable)(o,a,r)||!(0,V.canAddSiblings)(a,r,l))},s=D.default.isEditingLibraryItem("row");switch(e){case"add_module":if(!u())return!1;break;case"edit_module":if(!D.default.isAllowedAction("edit_module")||!(0,V.isEditable)(o,a,n,r,i))return!1;break;case"new_column":if(!(0,F.is)("column",this)||!u()||s||(0,h.default)(this,"props.isColumnSingle",!1)||(0,h.default)(this,"props.columnCount",0)>=(0,h.default)(this,"props.columnLimit",3))return!1;break;case"delete_column":if(!(0,F.is)("column",this)||!u()||s||(0,h.default)(this,"props.columnCount",0)<2)return!1;break;default:return!1}return!0}},{key:"isLayerExpanded",value:function(){var e=this.props;return e.isLayerExpanded||(0,h.default)(e,"isColumnSpecialty")||(0,H.isLibraryParent)(e)}},{key:"isFilterResult",value:function(){var e=this.props,t=e.isFilterActive,n=e.isFilterResult;return t&&n}},{key:"isFilterResultParent",value:function(){var e=this.props,t=e.isFilterActive,n=e.isFilterResult;return t&&!n}},{key:"isHovered",value:function(){return this.state.hovered}},{key:"isLayerSelected",value:function(){return this.props.isLayerSelected&&!this.isFilterResultParent()}},{key:"getWooModuleInactiveNotice",value:function(){var e=this.module.props;return!!N.default.isInactiveWooModule(e)&&E.default.getCurrentPage(["woocommerce","inactive_module_notice"],"")}},{key:"handleAddButton",value:function(e){(0,H.handleAddLayerButton)(e,this,this.handleAddButton,{scrollTimeout:this.scrollTimeout})}},{key:"handleLayerClick",value:function(e){if("pointer"!==D.default.getQuickActionsContext()){if(D.default.abIsMode("selecting",this.props.themeBuilderArea))return e.stopPropagation(),!(0,F.is)("removed",this.module)&&void((0,F.is)("column",this)||this.isFilterResultParent()||(0,H.isLayerLocked)(this)||this._ABTestingSet(this.module));var t={props:(0,H.prepareProps)(this.module.props,{skipLayer:(0,F.is)("column",this)})};j.default.shouldItemSelected(e,this.props.address,t)?e.stopPropagation():(this.isFilterResultParent()||(0,H.isLayerLocked)(this)||O.default.setActiveLayer(this.module),(0,H.scrollToLayerOnBuilder)(this))}}},{key:"handleLayerDoubleClick",value:function(e){var t=this;"pointer"!==D.default.getQuickActionsContext()&&(this.isFilterResultParent()||(0,h.default)(this,"props.isColumnSingle")||D.default.abIsMode("selecting",this.props.themeBuilderArea)||(e.preventDefault(),j.default.isItemSelection(e)||this.isAllowedAction("edit_module")&&!(0,F.is)("removed",this.module)&&(clearTimeout(o),o=setTimeout((function(){return O.default.openModuleSettings(t.module)}),850))))}},{key:"handleLayerRightClick",value:function(t){D.default.abIsMode("selecting",this.props.themeBuilderArea)||this.isFilterResultParent()||(0,h.default)(this,"props.isColumnSingle")||((0,H.forceSettingsClose)(this),D.default.setIsContextMenuActive(!0),D.default.setContextMenuModule(this.module),O.default.setActiveLayer(this.module),O.default.setHoveredModuleElement(this.module),e(t.target).closest(".lv-context-button").length>0&&x.default.getContextMenuCallback()(t))}},{key:"handleLayerSettingsClick",value:function(e){var t=(0,h.default)(e,"props.editingModule"),n=(0,h.default)(e,"props.additionalAttrs");D.default.isSettingsModalOpen()?((0,H.scrollToLayerOnBuilder)(t),O.default.buttonClick(e,t,void 0,n)):(0,H.scrollToLayerOnBuilder)(t,(function(){O.default.buttonClick(e,t,void 0,n)})),O.default.setActiveLayer(t)}},{key:"handleLayerToggle",value:function(e){O.default.toggleLayers(this.props.address,!this.isLayerExpanded())}},{key:"handleLayerToggleAll",value:function(e){var t=x.default.getLayerChildren(this);O.default.toggleLayers(t,this.isLayerExpanded())}},{key:"renderActionButtons",value:function(){if(this.isFilterResultParent()||(0,h.default)(this,"props.isColumnSingle"))return!1;var e,t=this.module.props,n=F.default.condition("is_rtl")&&!F.default.condition("is_no_rtl"),r=(0,F.is)("column",t)?(0,h.default)(ETBuilderBackend,"i18n.modals.layersView.column"):(0,h.default)(ETBuilderBackend,"i18n.tooltip.".concat((0,F.getComponentType)(t),".tab")),o=!D.default.abIsMode("off",t.themeBuilderArea),a=o&&D.default.abIsSubject(t),i=o&&D.default.abIsGoal(t),l=D.default.isMultiItemSelected(t.address),d=D.default.isMultiSelectSingleItem(),g=!l||l&&d,_=[],E={buttonName:M.default.LAYERS_VIEW_CONTEXT_MENU_BUTTON,className:"lv-context-button et-fb-button--right-menu",needEvent:!0,icon:"overflow",iconStyles:{height:28,width:15,minWidth:15,margin:n?"0 0 0 6px":"0 6px 0 0"},viewBox:"0 0 15 28",__onClick:this.handleLayerRightClick};if((0,H.isLayerLocked)(t))(0,H.isLockedParent)(t)?(_.push({buttonName:M.default.TAB_BUTTON_MODULE_UNLOCK,editingModule:this.module,className:"lv-button-place-holder",needEvent:!1,icon:"lock",tagName:"div"}),(0,F.is)("removed",t)||_.push(E)):(_.push({buttonName:!1,className:"lv-button-place-holder",needEvent:!1,icon:"lock",tagName:"div"}),_.push((0,y.default)({},E,{buttonName:!1,className:"lv-button-place-holder",icon:"blank",tagName:"div"})));else if(g){if(this.isAllowedAction("edit_module")&&!N.default.isInactiveWooModule(t)&&!(0,F.is)("removed",t)){var T=(0,F.is)("column",t)?M.default.MODULE_ITEM_EDIT:M.default.TAB_BUTTON_MODULE_EDIT;_.push({buttonName:T,editingModule:this.module,icon:"setting",tooltip:r.settings,additionalAttrs:{isColumnLayer:(0,F.is)("column",t)},_onClick:this.handleLayerSettingsClick})}!this.isAllowedAction("add_module")||N.default.isInactiveWooModule(t)||(0,F.is)("column",t)||(0,F.is)("removed",t)||i&&!a||_.push({buttonName:M.default.TAB_BUTTON_MODULE_COPY,className:"et_fb_duplicate_module_handler",editingModule:this.module,icon:"copy",tooltip:r.duplicate}),(a||i)&&_.push({buttonName:M.default.AB_VIEW_REPORT,iconUrl:"".concat(ETBuilderBackend.images_uri,"/stats.svg"),_onClick:O.default.abViewReport}),!this.isAllowedAction("add_module")||i||a&&!D.default.abHasAdditionalSubject()||(0,F.is)("column",t)||_.push({buttonName:M.default.TAB_BUTTON_MODULE_DELETE,editingModule:this.module,icon:"delete",tooltip:r.delete}),this.isAllowedAction("new_column")&&_.push({buttonName:M.default.MODULE_ITEM_COPY,className:"et_fb_duplicate_module_handler",editingModule:this.module,icon:"copy",tooltip:r.duplicate,additionalAttrs:{isColumnLayer:!0}}),this.isAllowedAction("delete_column")&&_.push({buttonName:M.default.MODULE_ITEM_DELETE,editingModule:this.module,icon:"delete",tooltip:r.delete,additionalAttrs:{isColumnLayer:!0}}),(0,F.is)("removed",t)||_.push(E)}else this.isAllowedAction("edit_module")&&_.push({buttonName:M.default.TAB_BUTTON_MODULE_EDIT,editingModule:this.module,icon:"setting",tooltip:r.settings}),this.isAllowedAction("add_module")&&!(i||a&&!D.default.abHasAdditionalSubject())&&_.push({buttonName:M.default.TAB_BUTTON_ITEMS_DELETE,editingModule:this.module,icon:"delete",tooltip:r.delete}),_.push(E);switch(!0){case(0,H.isLayerLocked)(t):case this.isLayerSelected():e={color:k.default.white,opacity:1};break;case this.isHovered()&&!this.isLayerSelected():e={color:k.default.shuttleGrey,opacity:1};break;default:e={color:k.default.shuttleGrey,opacity:.6}}var x=D.default.getAppPreference("builder_animation"),j=300,L=(0,w.default)({"et-fb-layers-view--actions":!0});return v.default.createElement("div",{className:"et-fb-layers-view--actions-group"},!!a&&v.default.createElement("div",{className:"et-fb-layers-view__subject-wrapper"},v.default.createElement("div",{className:"et-fb-layers-view__subject-id"},(0,h.default)(t,"attrs.ab_subject_id"))),v.default.createElement(b.Motion,{defaultStyle:{opacity:0,size:.8},style:{opacity:x?(0,b.spring)(e.opacity,{stiffness:j,damping:20}):e.opacity,size:x?(0,b.spring)(1,{stiffness:j,damping:20}):1}},(function(n){return v.default.createElement(C.default,{className:L,style:{opacity:n.opacity,transform:"scale( ".concat(n.size," )")}},v.default.createElement(b.StaggeredMotion,{defaultStyles:(0,u.default)(_,(function(){return{opacity:e.opacity}})),styles:function(t){return t.map((function(n,r){return 0===r?{opacity:x?(0,b.spring)(e.opacity,{stiffness:j,damping:20}):e.opacity}:{opacity:x?(0,b.spring)(t[r-1].opacity,{stiffness:j,damping:20}):e.opacity}}))}},(function(n){return v.default.createElement(C.default,null,_.map((function(r,o){var a={};(0,m.default)(["_onClick","__onClick","tagName","className","additionalAttrs"],(function(e){(0,f.default)(r[e])&&!(0,c.default)(r[e])||(a[e]=r[e])}));var i=(0,f.default)(r.iconStyles)?{margin:0}:r.iconStyles;return v.default.createElement(S.default,K({key:"lv-action-button-".concat(t.address,"-").concat(o),buttonName:r.buttonName,editingModule:r.editingModule,needEvent:r.needEvent,tooltip:r.tooltip,ink:(0,p.default)(r,"iconUrl"),stopPropagation:!0},a),(0,p.default)(r,"iconUrl")?v.default.createElement("object",{type:"image/svg+xml",className:"fitvidsignore",data:"".concat(ETBuilderBackend.images_uri,"/stats.svg"),width:"28",height:"16"}):v.default.createElement(P.default,{color:e.color,icon:r.icon,size:"14",style:(0,y.default)({opacity:(0,s.default)(n[o])?e.opacity:n[o].opacity,transform:"scale(".concat((0,s.default)(n[o])?e.top:n[o].top,")")},i),viewBox:r.viewBox}))})))})))})))}},{key:"renderAddButton",value:function(){var e=this,t=this.props.isFilterActive,n=(0,F.getComponentType)(this),r=(0,w.default)({"et-fb-layers-view--add":!0});if(t||!this.isAllowedAction("add_module")||"column"===n&&!this.isAllowedAction("new_column")||D.default.abIsMode("selecting",this.props.themeBuilderArea))return v.default.createElement("div",{className:r});var o="column"===n?"row":n,a=(0,h.default)(ETBuilderBackend,"i18n.tooltip.".concat(o)),i=D.default.getAppPreference("builder_animation"),l=this.isHovered()?1:0,u=this.isHovered()?1:.5,s={buttonName:M.default.TAB_BUTTON_MODULE_ADD,editingModule:this.module,tooltip:a.addButton,ink:!1,block:!0,stopPropagation:!0,_onClick:this.handleAddButton};return"column"===n&&(s=(0,y.default)(s,{buttonName:M.default.MODULE_ITEM_ADD_COLUMN,tooltip:a.addColumnButton,additionalAttrs:{isColumnLayer:!0,columnIndex:this.props.index+1}})),v.default.createElement("div",{className:r,onMouseEnter:this.handleLayerMouseEnter,onMouseLeave:this.handleLayerMouseLeave},v.default.createElement(b.Motion,{defaultStyle:{opacity:0,size:.5},style:{opacity:i?(0,b.spring)(l,{stiffness:300,damping:20}):l,size:i?(0,b.spring)(u,{stiffness:300,damping:20}):u}},(function(t){return v.default.createElement(S.default,K({},s,{style:{opacity:t.opacity,transform:"scale( ".concat(t.size," )")}}),v.default.createElement(P.default,{color:(0,H.getColorCode)(e),icon:"add",size:"14",style:{margin:0}}))})))}},{key:"renderToggle",value:function(){var e=this.props.isFilterActive,t=(0,w.default)({"et-fb-button-group":!0,"et-fb-layers-view--toggle":!0,"et-fb-layers-view--toggle-expanded":this.isLayerExpanded()});if((0,F.is)("module",this.props)||e)return v.default.createElement("div",{className:t});var n=F.default.condition("is_rtl")&&!F.default.condition("is_no_rtl")?"caret-left":"caret-right",r={margin:0,opacity:.5};return v.default.createElement("div",{className:t},v.default.createElement(B.default,{singleClick:this.handleLayerToggle,doubleClick:this.handleLayerToggleAll},v.default.createElement("button",{className:"et-fb-button et-fb-button--block"},v.default.createElement(P.default,{color:k.default.inactiveGrey,icon:"caret-down",size:"14",style:r}),v.default.createElement(P.default,{color:k.default.inactiveGrey,icon:n,size:"14",style:r}))))}},{key:"startRender",value:function(){this.props.isDelayRender&&this.setState({isRenderItem:!0})}},{key:"renderLabel",value:function(){var e=this.module.props,t=e.attrs,n=(0,h.default)(e,"label")?(0,h.default)(e,"label"):(0,H.getLayerName)(e),r=(0,h.default)(t,"admin_label")?(0,h.default)(t,"admin_label"):n,o=!D.default.abIsMode("off",e.themeBuilderArea)&&D.default.abIsSubject(e),a=!1,i=this.getWooModuleInactiveNotice();if(o){var l=D.default.abGetSubjectRank(e,"percentage");a=!!(0,W.hasValue)(l)&&" (".concat(D.default.abGetSubjectRank(e,"percentage"),")")}return!this.isAllowedAction("edit_module")||this.isFilterResultParent()||(0,H.isLayerLocked)(e)||(0,F.is)("removed",e)?v.default.createElement(B.default,{singleClick:this.handleLayerClick,doubleClick:this.handleLayerDoubleClick},v.default.createElement("div",{className:"et-fb-layers-view--label"},v.default.createElement("span",{className:"lv-placeholder"},r),!!a&&v.default.createElement("span",{className:"et-fb-layers-view--percentage"},a))):v.default.createElement(B.default,{singleClick:this.handleLayerClick,doubleClick:this.handleLayerDoubleClick},v.default.createElement("div",{className:"et-fb-layers-view--label"},v.default.createElement(L.default,{defaultText:n,text:r,tagName:"span",module:this.module,allModuleProps:e,name:"admin_label",callbackEditingStatusChange:this.callbackLabelEditing}),!!i&&v.default.createElement("span",{className:"et-fb-layers-view--inactive-notice"},i),!!a&&v.default.createElement("span",{className:"et-fb-layers-view--percentage"},a)))}},{key:"render",value:function(){var e;if((0,h.default)(this.props.attrs,"_deleted")||!this.props.isLayerVisible)return null;this.module={props:(0,H.prepareProps)(this.props,D.default.getComponentAtAddress(this.props.address))};var t=this.module.props,n=t.attrs;if(D.default.getAppPreference("hide_disabled_modules")&&(0,F.is)("disabled",t))return null;var r,o=D.default.getActiveProductTourElement(),a=!D.default.abIsMode("off",t.themeBuilderArea),i=a&&D.default.abIsSubject(t),l=a&&D.default.abIsGoal(t),u=D.default.isAllowedAction("move_module")&&!((0,H.isLayerLocked)(t)||t.isColumnSingle),s=j.default.shouldMultiItemMixed(t.address,t.type).isItemsMixed;switch(!0){case this.isLayerSelected()||(0,H.isLayerLocked)(t):r={color:k.default.white,backgroundColor:(0,H.getColorCode)(t)};break;case!this.isLayerSelected()&&this.isHovered():r={color:(0,H.getColorCode)(t),backgroundColor:k.default.layerBackground};break;default:r={color:(0,H.getColorCode)(t),backgroundColor:(0,A.default)(k.default.layerBackground,.6)}}var c=(ee(e={"et-fb-layers-view--layer":!0,"et-fb-layers-view--has-no-child":!this.props.hasChildren,"et-fb-layers-view--expanded":this.isLayerExpanded(),"et-fb-layers-view--hidden":!t.isLayerVisible,"et-fb-layers-view--disabled":(0,F.is)("disabled",t),"et-fb-layers-view--filter-parent":this.isFilterResultParent(),"et-fb-layers-view--filter-result":this.isFilterResult(),"et-fb-layers-view--library-parent":(0,H.isLibraryParent)(t),"et-fb-layers-view--library-item":(0,H.isLibraryItem)(t),"et-fb-layers-view--ab":i,"et-fb-layers-view--ab-goal":l,"et-fb-locked":(0,H.isLayerLocked)(t),et_pb_section:(0,F.is)("section",t),et_pb_fullwidth_section:(0,F.is)("fullwidth",t),et_section_regular:(0,F.is)("regular",t),et_section_specialty:(0,F.is)("specialty",t),et_pb_row:(0,F.is)("row",t),et_pb_row_inner:(0,F.is)("row-inner",t),et_pb_column:(0,F.is)("column",t),et_pb_column_inner:(0,F.is)("column-inner",t)},"et_pb_column_".concat(n.type),(0,h.default)(t,"isColumnSpecialty",!1)),ee(e,"et_pb_specialty_column",(0,h.default)(t,"isColumnSpecialty",!1)),ee(e,"et_pb_column_single",(0,h.default)(t,"isColumnSingle",!1)),ee(e,"et_pb_module",(0,F.is)("module",t)),ee(e,"et_pb_parent_locked",(0,H.isLayerLocked)(t)&&!(0,H.isLockedParent)(t)),ee(e,"et_fb_global_module",(0,H.isLayerGlobal)(t)),ee(e,"et_fb_locked_module",(0,H.isLayerLocked)(t)),ee(e,"et_fb_item_selected",(0,h.default)(t,"isItemMulti",!1)),ee(e,"et_fb_uneditable_module",!this.isAllowedAction("edit_module")),ee(e,"et_fb_container_mixed",!(0,W.hasValue)(o)&&s),ee(e,"et_fb_nonexistent_module",(0,F.is)("removed",t)),e);D.default.abIsMode("off",t.themeBuilderArea)||(D.default.abIsSubject(t)&&(c=(0,y.default)(c,ee({et_pb_ab_subject:!0},"et_pb_ab_subject_id-".concat((0,h.default)(ETBuilderBackend,"currentPage.id",""),"_").concat((0,h.default)(n,"ab_subject_id","")),!0))),D.default.abIsGoal(t)&&(c=(0,y.default)(c,ee({et_pb_ab_goal:!0},"et_pb_ab_goal-".concat((0,h.default)(ETBuilderBackend,"currentPage.id","")),!0)))),i&&(c=(0,y.default)(c,ee({},"et-fb-layers-view--ab-rank-".concat(D.default.abGetSubjectRank(t,"rank")),!0)));var d={className:(0,w.default)(c),"data-address":t.address,ref:this.layerRef};(0,h.default)(n,"global_module")&&(d["data-global-module"]=n.global_module),(0,F.is)("row",t)&&(d["data-column-count"]=(0,h.default)(t,"columnCount"),d["data-column-limit"]=(0,h.default)(t,"columnLimit"));var f={className:(0,w.default)({"et-fb-layers-view--content":!0,"et-fb-layers-view--column-content-locked":(0,h.default)(t,"isColumnSingle",!1),"et-fb-layers-view--filter-parent-content":this.isFilterResultParent(),"et-fb-layers-view--hover":this.isHovered(),"et-fb-layers-view--selected":this.isLayerSelected()}),onContextMenu:this.handleLayerRightClick,onMouseEnter:this.handleLayerMouseEnter,onMouseLeave:this.handleLayerMouseLeave,style:r};return D.default.abIsMode("selecting",t.themeBuilderArea)&&(f.onClick=this.handleLayerClick),v.default.createElement(T.default,{componentName:t.type},v.default.createElement("div",d,!(0,W.hasValue)(n.specialty_columns)&&!(0,H.isLibraryParent)(t)&&v.default.createElement("div",{className:(0,w.default)({"et-fb-layers-view--header":!0,et_fb_move_module_handler:u,"ui-sortable-handle":u})},this.renderToggle(),v.default.createElement("div",K({role:"presentation"},f),this.renderLabel(),this.renderActionButtons()),this.renderAddButton()),this.props.children))}}],r&&$(n.prototype,r),l&&$(n,l),U}(v.Component);ee(ne,"propTypes",{hasChildren:_.default.bool,isFilterActive:_.default.bool,isFilterResult:_.default.bool,isFilteredLayer:_.default.bool,isLayerExpanded:_.default.bool,isLayerSelected:_.default.bool,isLayerVisible:_.default.bool,isDelayRender:_.default.bool}),ee(ne,"defaultProps",{hasChildren:!1,isFilterActive:!1,isFilterResult:!1,isFilteredLayer:!1,isLayerExpanded:!1,isLayerSelected:!1,isLayerVisible:!1,isDelayRender:!1});var re=ne;t.default=re}).call(this,n(9))},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.layerPreSortableInit=t.layerDragUpdate=void 0;var r=s(n(1)),o=s(n(4)),a=s(n(10)),i=s(n(19)),l=s(n(6)),u=n(161);function s(e){return e&&e.__esModule?e:{default:e}}t.layerDragUpdate=function(t,n){var a=e(this),s=e(n.item),c=ETBuilderBackend.i18n.sortable,d=l.default.getActiveThemeBuilderArea(),f=function(){a.sortable("cancel"),n.sender&&e(n.sender).sortable("cancel");var t=a.data("dragOptions");(0,r.default)(t,"isColumn")?i.default.cancelDraggingModule(!1,!0):i.default.cancelDraggingModule()};if(!l.default.abIsMode("off",d)){if(!l.default.isAllowedAction("ab_testing"))return i.default.setAlertModal(!0,"has_no_ab_permission"),void f();var p=(0,o.default)(e(n.sender))?e(t.target):e(n.sender),h=(0,o.default)(e(n.sender))?e(t.toElement):e(t.target),m=s.hasClass("et_pb_ab_subject"),g=s.hasClass("et_pb_ab_goal"),y=s.find(".et_pb_ab_subject").length,v=s.find(".et_pb_ab_goal").length,b=p.closest(".et_pb_ab_subject").length,_=h.closest(".et_pb_ab_subject").length,w=h.closest(".et_pb_ab_goal").length;if(g&&!m&&_)return i.default.setAlertModal(!0,"cannot_move_goal_into_subject"),void f();if(v&&_)return i.default.setAlertModal(!0,"cannot_move_goal_into_subject"),void f();if(m&&!g&&w)return i.default.setAlertModal(!0,"cannot_move_subject_into_goal"),void f();if(y&&w)return i.default.setAlertModal(!0,"cannot_move_subject_into_goal"),void f();if(g&&b)return i.default.setAlertModal(!0,"cannot_move_row_goal_out_from_subject"),void f()}if(!(0,o.default)(e(n.sender))&&a.hasClass("et_pb_row")){var k=e(t.target);if(k.attr("data-column-count")>=k.attr("data-column-limit"))return alert(c.stop_dropping_3_col_row),void f()}if((0,o.default)(e(n.sender))&&a.hasClass("et_pb_row")&&!a.find(".et_pb_column, .et_pb_column_inner").length&&s.hasClass("et_pb_column"))return alert(c.onlyColumnDraggedAway),void f();if(a.hasClass("et_pb_specialty_column")){var O=s.find(".et_pb_column").length,S=s.closest(".et_pb_specialty_column").hasClass("et_pb_column_2_3");if(!S&&O>=4||S&&O>4)return alert(c.stop_dropping_3_col_row),void f()}if(s.closest(".et_pb_row.et_fb_global_module").length&&s.hasClass("et_fb_global_module"))return alert(c.global_module_alert),void f();if((s.closest(".et_pb_section.et_fb_global_module").length||s.closest(".et_pb_row.et_fb_global_module").length)&&s.hasClass("et_fb_global_module"))return alert(c.global_module_alert),void f();var C=e(n.item[0]),E=e(t.target),M=C.is(".et_fb_global_module")||C.closest(".et_fb_global_module").length>0,T=E.is(".et_fb_global_module")||E.closest(".et_fb_global_module").length>0,P=C.is(".et_fb_global_module")?C:C.closest(".et_fb_global_module"),x=E.is(".et_fb_global_module")?E:E.closest(".et_fb_global_module"),j=P.attr("data-address"),D=x.attr("data-address"),L=P.attr("data-global-module"),N=x.attr("data-global-module"),A=j!==D,R=(0,u.hasValue)(N)&&L===N;M&&T&&A&&R&&f()};t.layerPreSortableInit=function(e,t,n){if(t.isRow?(t.address=n.attr("data-address"),t.connectWith=".et-fb-layers-view--expanded.et_pb_row:not(.et_pb_parent_locked)",t.child=".et_pb_column",t.childSlug="column",t.handle="> .et_fb_move_module_handler"):t.isColumn?e.hasClass("et_pb_specialty_column")?(t.connectWith=".et-fb-layers-view--expanded.et_pb_specialty_column:not(.et_pb_parent_locked), .et-fb-layers-view--expanded.et_section_regular",t.child=".et_pb_row_inner, > .et_pb_row",t.childSlug="row-inner",t.handle="> .et_fb_move_module_handler"):(t.connectWith=".et-fb-layers-view--expanded.et_pb_column:not(.et_pb_specialty_column, .et_pb_parent_locked)",t.child=".et_pb_module",t.childSlug="module",t.handle="> .et_fb_move_module_handler"):(t.address=n.attr("data-address"),e.hasClass("et_pb_fullwidth_section")?(t.connectWith=".et-fb-layers-view--expanded.et_pb_fullwidth_section",t.child=".et_pb_module",t.childSlug="fullwidth-module",t.handle="> .et_fb_move_module_handler"):(t.connectWith=".et-fb-layers-view--expanded.et_pb_specialty_column:not(.et_pb_parent_locked), .et-fb-layers-view--expanded.et_section_regular",t.child=".et_pb_row, > .et_pb_row_inner",t.childSlug="row-inner",t.handle="> .et_fb_move_module_handler")),(0,a.default)(e.data("uiSortable"))||(e.sortable("destroy"),e.removeClass("et_fb_container_mixed")),t.isItemsMixed&&(e.addClass("et_fb_container_mixed"),t.connectWith=(0,o.default)(t.newConnectWith)?t.connectWith:t.newConnectWith,t.childSlug=(0,o.default)(t.newChildSlug)?t.childSlug:t.newChildSlug,t.isColumn?e.hasClass("et_pb_specialty_column")?(t.child=".et_pb_row_inner.et_fb_item_selected",t.handle="> .et_fb_move_module_handler"):t.child=".et_pb_module.et_fb_item_selected":e.hasClass("et_pb_fullwidth_section")?t.child=".et_pb_module.et_fb_item_selected":(t.child=".et_pb_row.et_fb_item_selected",t.handle="> .et_fb_move_module_handler")),e.is(".et_fb_global_module"))if(t.isColumn){var r=n.closest(".et_fb_global_module"),i=r.attr("data-global-module"),l=r.attr("data-address"),u=r.is(".et_pb_section")?".et_pb_section":".et_pb_row",s=t.connectWith;t.connectWith=["".concat(u,":not(.et_fb_global_module) ").concat(s),"".concat(u,'.et_fb_global_module[data-address="').concat(l,'"] ').concat(s),"".concat(u,".et_fb_global_module:not(").concat(u,'[data-global-module="').concat(i,'"][data-address!="').concat(l,'"]) ').concat(s)].join(", ")}else{var c=e.attr("data-global-module"),d=e.attr("data-address"),f=t.connectWith;t.connectWith=["".concat(f,":not(.et_fb_global_module)"),"".concat(f,'.et_fb_global_module[data-address="').concat(d,'"]'),"".concat(f,".et_fb_global_module:not(").concat(f,'[data-global-module="').concat(c,'"][data-address!="').concat(d,'"])')].join(", ")}return t}}).call(this,n(9))},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(0)),a=n(62),i=h(n(13)),l=h(n(7)),u=h(n(4));n(1803);var s=h(n(19)),c=(h(n(6)),h(n(57))),d=h(n(44)),f=h(n(805)),p=h(n(277));function h(e){return e&&e.__esModule?e:{default:e}}function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}function g(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:"upload";return n=t=function(t){b(f,t);var n=w(f);function f(){var e;g(this,f);for(var t=arguments.length,a=new Array(t),l=0;l0;return o.default.createElement("div",{className:"et-fb-with-portability"},o.default.createElement(e,p({isLoadingLayout:t,_renderProgressBar:this._renderProgressBar,_onChange:this._onChange,exportLayout:this.exportLayout,importFileName:this.importFileName,importLayout:this.importLayout},this.state,this.props)))}}]),f}(o.default.Component),C(t,"displayName","withPortability(".concat(e.displayName,")")),n};t.default=M},function(e,t,n){},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=c(n(0)),a=c(n(13)),i=c(n(44)),l=c(n(57)),u=c(n(446)),s=n(495);function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw o}}return a}(e,t)||M(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?{maxHeight:this.props.maxHeight}:"",n=this.props.hasProgressBar||this.state.hasImportCompletedCheckmark?{height:(0,i.default)(t,"maxHeight",200),position:"relative"}:{};return o.default.createElement("div",{className:"et-fb-main-settings et-fb-main-settings--portability"},(e=this.props)._renderTabs.apply(e,S(this.tabs)),o.default.createElement("div",{className:"et-fb-settings-options-wrap et_fb_save_module_modal",style:t},o.default.createElement("div",{className:"et-fb-settings-options",style:n},this._renderModalContent())))}}])&&P(t.prototype,n),r&&P(t,r),_}(o.default.Component);A(I,"displayName","ETBuilderPortabilityModal"),A(I,"defaultProps",{hasProgressBar:!1,importProgress:0,importEstimation:1,exportProgress:0,exportEstimation:1});var W=(0,_.withPortability)(I);t.default=W},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=g(n(0)),o=g(n(265)),a=g(n(13)),i=g(n(4)),l=g(n(10)),u=g(n(11)),s=g(n(8)),c=g(n(1)),d=n(99),f=g(n(2)),p=g(n(44)),h=g(n(6)),m=g(n(19));g(n(58));function g(e){return e&&e.__esModule?e:{default:e}}var y=new d.AllHtmlEntities,v=(0,o.default)({displayName:"ETBuilderModuleItem",render:function(){if(!h.default.isAllowedAction(this.props.label))return!1;var e,t,n,o=(e={},t="".concat(this.props.label.replace("et_pb_","et_fb_")),n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e),l=this.props.specialtyLayout,s="",d="",m="",g="",v="";(0,i.default)(l)||(s=l.layoutFormat,d=l.layoutType.split(","),m=l.specialtyColumns,v=this.props.label,o.et_fb_specialty_layout_item=!0,g=l.columns.map((function(e,t){var n="et_pb_layout_column",o=t+e;n+=" et_pb_column_layout_".concat(e);var a="",i="",l="";return"1"===d[t]?(n+=" et_pb_variations et_pb_".concat(m,"_variations"),a=r.default.createElement("div",{className:"et_pb_variation et_pb_variation_full"}),i=r.default.createElement("div",{className:"et_pb_variation_row"},r.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_2"}),r.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_2"})),3===m&&(l="2_3,1_3"===v||"1_3,2_3"===v?r.default.createElement("div",{className:"et_pb_variation_row"},r.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_4"}),r.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_4"}),r.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_4"}),r.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_4"})):r.default.createElement("div",{className:"et_pb_variation_row"},r.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_3"}),r.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_3"}),r.default.createElement("div",{className:"et_pb_variation et_pb_variation_1_3"})))):n+=" et_pb_specialty_column",r.default.createElement("div",{className:n,key:o},a,i,l)})));var b=f.default.hasValue(this.props.iconSvg)?r.default.createElement(p.default,{iconSvg:this.props.iconSvg}):"",_=r.default.createElement("span",{className:"et_module_title"}," ",y.decode((0,c.default)(this,"props.title",""))," ");return""!==g&&(_=g),this.props.itemIndex===this.props.selectedItemIndex&&(o["et-fb-selected-item"]=!0),f.default.hasValue(this.props.icon)&&(o["et-fb-has-icon"]=!0),f.default.hasValue(this.props.iconSvg)&&(o["et-fb-has-svg-icon"]=!0),o=(0,u.default)(o,this.props.classnames),r.default.createElement("li",{className:(0,a.default)(o),onClick:this._onClick,"data-layout":s,"data-specialty":d,"data-specialty_columns":m,onMouseEnter:this._onMouseEnter,"data-icon":this.props.icon},b,_)},_onClick:function(){(h.default.abIsMode("off")||"layout"!==(0,c.default)(this,"props.label"))&&("function"==typeof this.props.onClickAction?this.props.onClickAction(this.props):this.performModuleAdding())},_onMouseEnter:function(){(0,l.default)(this.props.onMouseEnter)||this.props.onMouseEnter(this.props.itemIndex)},performModuleAdding:function(){var e=this.props.specialtyLayout,t=(0,i.default)(e)?this.props.label:"et_pb_specialty_layout_".concat(e.layoutFormat),n=(0,i.default)(e)?"":e.layoutType;if(this.props.savedShortcode){var r={};return(0,u.default)(r,this.props.savedShortcode[0]),""===this.props.globalID||this.props.isAddingIntoGlobal||(r=this.prepareGlobalModule(r)),"et_pb_row_inner"===this.props.label&&(r.type="et_pb_row_inner"),m.default.insertSavedModule(r),void m.default.cancelTooltip()}m.default.insertNewModule(t,"",n,this.props.fbSupport),"et_fb_specialty"!==this.props.label&&m.default.cancelTooltip()},prepareGlobalModule:function(e,t){var n=this,r=n.props.globalID;return t?e.attrs.global_parent=r:e.attrs.global_module=r,!(0,i.default)(e.content)&&Array.isArray(e.content)&&(0,s.default)(e.content,(function(e){n.prepareGlobalModule(e,!0)})),e}});t.default=v},function(e,t,n){"use strict";(function(e){function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=g(n(0)),a=g(n(29)),i=g(n(13)),l=g(n(8)),u=g(n(4)),s=g(n(1)),c=g(n(10)),d=g(n(19)),f=g(n(6)),p=g(n(446)),h=g(n(1459)),m=g(n(770));function g(e){return e&&e.__esModule?e:{default:e}}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n0?{maxHeight:this.props.maxHeight}:"",a="";return e="root"===n?E.descriptionTextLayout:E.descriptionText,this.isGlobalOptionSupported()&&(a=o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("label",null,E.globalTitle,":"),o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(h.default,{value:this.state.make_global,name:"make_global",options:[E.globalText],shortcut_index:"make-global",_onChange:this._onInput})))),o.default.createElement("div",{className:"et-fb-settings-options-wrap",style:r},o.default.createElement("div",{className:"et-fb-settings-options"},o.default.createElement("p",{className:"et-fb-description-text"},e),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("label",null,E.templateName,":"),o.default.createElement("div",{className:this.setFieldClass()},o.default.createElement(p.default,{type:"text",value:this.state.template_name,name:"template_name",_onChange:this._onInput}))),a,this._renderCategories(),o.default.createElement("div",{className:"et-fb-settings-option"},o.default.createElement("label",null,E.createCatText,":"),o.default.createElement("div",{className:"et-fb-settings-option-container"},o.default.createElement(p.default,{type:"text",value:this.state.new_category_name,name:"new_category_name",_onChange:this._onInput})),o.default.createElement(m.default,{videoListId:"et_pb_save_to_library",trigger:"tooltip"})),o.default.createElement("a",{href:"#",className:"et-fb-save-library-button",onClick:this._onSave},E.saveText)))}}])&&v(n.prototype,r),g&&v(n,g),O}(o.default.Component),T=M;t.default=T}).call(this,n(9))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(0)),o=f(n(265)),a=(f(n(29)),f(n(13))),i=f(n(16));n(1817);f(n(64));var l=f(n(10)),u=f(n(31)),s=f(n(8)),c=f(n(326)),d=f(n(19));function f(e){return e&&e.__esModule?e:{default:e}}var p=(0,o.default)({displayName:"ETBuilderSettingsColumn",mixin:[i.default],render:function(){var e=this,t=this.props.row,n=t.props.section_parent,o=ETBuilderBackend.columnLayouts,i=(0,l.default)(o[n])?[]:o[n],d="specialty"===n?"":(0,u.default)(t.props.children,(function(e){return e.attrs.type})).join(",");if("specialty"===n){var f=[],p=i[t.props.specialty_layout].columns;(0,s.default)((0,c.default)(p),(function(e){var t=[];e+=1;(0,s.default)((0,c.default)(e),(function(n){var r=1===e?"4_4":"1_".concat(e);t.push(r)})),f.push(t.join(","))})),i=f}this.props.setMaxItemIndex(i.length,"modules_all");var h=i.map((function(t,o){var i=t,l=(0,u.default)(i.split(","),(function(e){return e.split("_")})),s={};i===d&&(s["et-fb-column-layout--selected"]=!0),e.props.selectedItemIndex===o+1&&(s["et-fb-selected-item"]=!0),s["et-fb-product-tour-element"]="selectRow"===e.props.currentTourElement&&"1_3,1_3,1_3"===i;var c=l.map((function(e,t){var a=parseInt(e[0])/parseInt(e[1])*100,l={width:"".concat(a,"%")};return r.default.createElement("span",{key:"blocks-".concat(o,"-").concat(t),"data-layout":i,className:"column-block-wrap",style:l},r.default.createElement("span",{className:"column-block","data-layout":i,"data-section":n},e[0],"/",e[1]))}));return r.default.createElement("li",{className:(0,a.default)(s),"data-layout":i,onClick:e._onClickAction,onMouseUp:e._onMouseUp,key:"column-".concat(o)},c)}));return r.default.createElement("ul",{className:"et-fb-columns-layout"},h)},_onMouseUp:function(e){this._onClickAction(e),d.default.cancelTooltip()},_onClickAction:function(e){var t=e.target.getAttribute("data-layout"),n="specialty"===this.props.row.props.section_parent?"et_pb_row_inner":"et_pb_row";(0,l.default)(this.props._onClick)?this._changeStructure(e,t):this.props._onClick(t,n)},_changeStructure:function(e,t){e.target.getAttribute("data-layout");d.default.rowColumnChange(this.props.row,t)}});t.default=p},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=u(n(0)),a=u(n(44)),i=u(n(1502));n(1820);var l=u(n(57));function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n