whoami7 - Manager
:
/
home
/
ezdajrnh
/
www
/
wp-content
/
plugins
/
elementor
/
assets
/
js
/
packages
/
editor-ui
/
Upload File:
files >> /home/ezdajrnh/www/wp-content/plugins/elementor/assets/js/packages/editor-ui/editor-ui.min.js
!function(){"use strict";var e={d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{EditableField:function(){return c},EllipsisWithTooltip:function(){return s},GlobalDialog:function(){return D},ITEM_HEIGHT:function(){return ee},InfoAlert:function(){return E},InfoTipCard:function(){return O},IntroductionModal:function(){return f},MenuItemInfotip:function(){return C},MenuListItem:function(){return S},PopoverBody:function(){return W},PopoverHeader:function(){return F},PopoverMenuList:function(){return te},SaveChangesDialog:function(){return se},SearchField:function(){return P},StyledMenuList:function(){return ne},ThemeProvider:function(){return b},WarningInfotip:function(){return I},closeDialog:function(){return R},openDialog:function(){return k},useDialog:function(){return re},useEditable:function(){return le}});var n=window.React,o=window.elementorV2.ui;function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i.apply(null,arguments)}const s=({maxWidth:e,title:t,as:s,...a})=>{const[c,u]=l();return u?n.createElement(o.Tooltip,{title:t,placement:"top"},n.createElement(r,i({maxWidth:e,ref:c,as:s},a),t)):n.createElement(r,i({maxWidth:e,ref:c,as:s},a),t)},r=n.forwardRef(({maxWidth:e,as:t=o.Box,...s},r)=>n.createElement(t,i({ref:r,position:"relative"},s,{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:e}}))),l=()=>{const[e,t]=(0,n.useState)(null),[o,i]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{const t=new ResizeObserver(([{target:e}])=>{i(e.scrollWidth>e.clientWidth)});return e&&t.observe(e),()=>{t.disconnect()}},[e]),[t,o]};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},a.apply(null,arguments)}const c=(0,n.forwardRef)(({value:e,error:t,as:i="span",sx:s,...r},l)=>n.createElement(o.Tooltip,{title:t,open:!!t,placement:"top"},n.createElement(u,a({ref:l,component:i},r),e))),u=(0,o.styled)(o.Box)` width: 100%; &:focus { outline: none; } `;var h=window.wp.i18n;function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},d.apply(null,arguments)}const f=({open:e,handleClose:t,title:i,children:s})=>{const[r,l]=(0,n.useState)(!0);return n.createElement(o.Dialog,{open:e,onClose:t,maxWidth:"sm",TransitionComponent:m},i&&n.createElement(o.DialogHeader,{logo:!1},n.createElement(o.DialogTitle,null,i)),s,n.createElement(o.DialogActions,null,n.createElement(o.FormControlLabel,{sx:{marginRight:"auto"},control:n.createElement(o.Checkbox,{checked:!r,onChange:()=>l(!r)}),label:n.createElement(o.Typography,{variant:"body2"},(0,h.__)("Don't show this again","elementor"))}),n.createElement(o.Button,{size:"medium",variant:"contained",sx:{minWidth:"135px"},onClick:()=>t(r)},(0,h.__)("Got it","elementor"))))},m=n.forwardRef((e,t)=>n.createElement(o.Fade,d({ref:t},e,{timeout:{enter:1e3,exit:200}})));var p=window.elementorV2.editorV1Adapters;function g(){return window.elementor?.getPreferences?.("ui_theme")||"auto"}const v="unstable";function b({children:e}){const t=function(){const[e,t]=(0,n.useState)(()=>g());return(0,n.useEffect)(()=>(0,p.__privateListenTo)((0,p.v1ReadyEvent)(),()=>t(g())),[]),(0,n.useEffect)(()=>(0,p.__privateListenTo)((0,p.commandEndEvent)("document/elements/settings"),e=>{const n=e;n.args?.settings&&"ui_theme"in n.args.settings&&t(g())}),[]),e}();return n.createElement(o.ThemeProvider,{colorScheme:t,palette:v},e)}var y=window.elementorV2.icons;function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},x.apply(null,arguments)}const E=e=>n.createElement(o.Alert,x({icon:n.createElement(y.InfoCircleFilledIcon,{fontSize:"small",color:"secondary"}),variant:"standard",color:"secondary",elevation:0,size:"small"},e));function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},w.apply(null,arguments)}const S=({children:e,menuItemTextProps:t,primaryTypographyProps:i={variant:"caption"},...s})=>n.createElement(o.MenuItem,w({dense:!0},s,{sx:{...s.sx??{}}}),n.createElement(o.MenuItemText,w({primary:e,primaryTypographyProps:i},t))),C=(0,n.forwardRef)(({showInfoTip:e=!1,children:t,content:i},s)=>e?n.createElement(o.Infotip,{ref:s,placement:"right",arrow:!1,content:n.createElement(E,{sx:{maxWidth:325}},i)},n.createElement("div",{style:{pointerEvents:"initial",width:"100%"},onClick:e=>e.stopPropagation()},t)):n.createElement(n.Fragment,null,t)),O=({content:e,svgIcon:t,learnMoreButton:i,ctaButton:s})=>n.createElement(o.Card,{elevation:0,sx:{width:320}},n.createElement(o.CardContent,{sx:{pb:0}},n.createElement(o.Box,{display:"flex",alignItems:"start"},n.createElement(o.SvgIcon,{fontSize:"tiny",sx:{mr:.5}},t),n.createElement(o.Typography,{variant:"body2"},e,i&&n.createElement(n.Fragment,null," ",n.createElement(o.Link,{color:"info.main",href:i.href,target:"_blank"},i.label))))),s&&n.createElement(o.CardActions,{sx:{justifyContent:"flex-start"}},n.createElement(o.Button,{size:"small",color:"secondary",variant:"contained",onClick:s.onClick,sx:{marginInlineStart:"1rem"}},s.label))),I=(0,n.forwardRef)(({children:e,open:t,title:i,text:s,placement:r,width:l,offset:a,hasError:c=!0},u)=>n.createElement(o.Infotip,{ref:u,open:t,placement:r,PopperProps:{sx:{width:l||"initial",".MuiTooltip-tooltip":{marginLeft:0,marginRight:0}},modifiers:a?[{name:"offset",options:{offset:a}}]:[]},arrow:!1,content:n.createElement(o.Alert,{color:c?"error":"secondary",severity:"warning",variant:"standard",size:"small"},i?n.createElement(o.AlertTitle,null,i):null,s)},e));let M=null;const z=new Set,T=()=>{z.forEach(e=>e(M))},k=({component:e})=>{M={component:e},T()},R=()=>{M=null,T()},D=()=>{const[e,t]=(0,n.useState)(null);return(0,n.useEffect)(()=>{const e=(n=t,z.add(n),n(M),()=>z.delete(n));var n;return()=>{e()}},[]),e?n.createElement(b,null,n.createElement(o.Dialog,{role:"dialog",open:!0,onClose:R,maxWidth:"sm",fullWidth:!0},e.component)):null},A="tiny",P=({value:e,onSearch:t,placeholder:i,id:s,sx:r})=>{const l=(0,n.useRef)(null);return n.createElement(o.Box,{sx:{px:2,pb:1.5,...r}},n.createElement(o.TextField,{autoFocus:!0,fullWidth:!0,id:s,size:A,value:e,inputRef:l,onChange:e=>{t(e.target.value)},placeholder:i,InputProps:{startAdornment:n.createElement(o.InputAdornment,{position:"start"},n.createElement(y.SearchIcon,{fontSize:A})),endAdornment:e&&n.createElement(o.IconButton,{size:A,onClick:()=>{t(""),l.current?.focus()},"aria-label":(0,h.__)("Clear","elementor")},n.createElement(y.XIcon,{color:"action",fontSize:A}))}}))},W=({children:e,height:t=348,width:i,id:s})=>n.createElement(o.Box,{display:"flex",flexDirection:"column",sx:{height:t,overflow:"hidden",width:(i?i-32:220)+"px",maxWidth:496},id:s},e);function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},j.apply(null,arguments)}const F=({title:e,onClose:t,icon:i,actions:s})=>n.createElement(o.Stack,j({direction:"row",alignItems:"center"},{pl:2,pr:1,py:1.5,maxHeight:36},{sx:{columnGap:.5}}),i,n.createElement(o.Typography,{variant:"subtitle2",sx:{fontSize:"12px",mt:.25}},e),n.createElement(o.Stack,{direction:"row",sx:{ml:"auto"}},s,n.createElement(o.CloseButton,{slotProps:{icon:{fontSize:"tiny"}},sx:{ml:"auto"},onClick:t})));var _=window.ReactDOM;function B(e,t,n){let o,i=n.initialDeps??[];function s(){var s,r,l,a;let c;n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(c=Date.now());const u=e();if(u.length===i.length&&!u.some((e,t)=>i[t]!==e))return o;let h;if(i=u,n.key&&(null==(r=n.debug)?void 0:r.call(n))&&(h=Date.now()),o=t(...u),n.key&&(null==(l=n.debug)?void 0:l.call(n))){const e=Math.round(100*(Date.now()-c))/100,t=Math.round(100*(Date.now()-h))/100,o=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(0,Math.min(120-120*o,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(a=null==n?void 0:n.onChange)||a.call(n,o),o}return s.updateDeps=e=>{i=e},s}function L(e,t){if(void 0===e)throw new Error("Unexpected undefined"+(t?`: ${t}`:""));return e}const V=(e,t,n)=>{let o;return function(...i){e.clearTimeout(o),o=e.setTimeout(()=>t.apply(this,i),n)}},H=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},$=e=>e,K=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let e=t;e<=n;e++)o.push(e);return o},N=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;const i=e=>{const{width:n,height:o}=e;t({width:Math.round(n),height:Math.round(o)})};if(i(H(n)),!o.ResizeObserver)return()=>{};const s=new o.ResizeObserver(t=>{const o=()=>{const e=t[0];if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0];if(t)return void i({width:t.inlineSize,height:t.blockSize})}i(H(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},U={passive:!0},q="undefined"==typeof window||"onscrollend"in window,G=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;let i=0;const s=e.options.useScrollendEvent&&q?()=>{}:V(o,()=>{t(i,!1)},e.options.isScrollingResetDelay),r=o=>()=>{const{horizontal:r,isRtl:l}=e.options;i=r?n.scrollLeft*(l?-1:1):n.scrollTop,s(),t(i,o)},l=r(!0),a=r(!1);a(),n.addEventListener("scroll",l,U);const c=e.options.useScrollendEvent&&q;return c&&n.addEventListener("scrollend",a,U),()=>{n.removeEventListener("scroll",l),c&&n.removeEventListener("scrollend",a)}},Y=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},X=(e,{adjustments:t=0,behavior:n},o)=>{var i,s;const r=e+t;null==(s=null==(i=o.scrollElement)?void 0:i.scrollTo)||s.call(i,{[o.options.horizontal?"left":"top"]:r,behavior:n})};class J{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{const t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{void 0===n&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:$,rangeExtractor:K,onChange:()=>{},measureElement:Y,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=B(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const n=new Map,o=new Map;for(let i=t-1;i>=0;i--){const t=e[i];if(n.has(t.lane))continue;const s=o.get(t.lane);if(null==s||t.end>s.end?o.set(t.lane,t):t.end<s.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=B(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,t,n,o,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:o,enabled:i}),{key:!1}),this.getMeasurements=B(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:o,enabled:i},s)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));const r=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const l=this.measurementsCache.slice(0,r);for(let i=r;i<e;i++){const e=o(i),r=1===this.options.lanes?l[i-1]:this.getFurthestMeasurement(l,i),a=r?r.end+this.options.gap:t+n,c=s.get(e),u="number"==typeof c?c:this.options.estimateSize(i),h=a+u,d=r?r.lane:i%this.options.lanes;l[i]={index:i,start:a,size:u,end:h,key:e,lane:d}}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=B(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,o)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n,lanes:o}){const i=e.length-1;if(e.length<=o)return{startIndex:0,endIndex:i};let s=Q(0,i,t=>e[t].start,n),r=s;if(1===o)for(;r<i&&e[r].end<n+t;)r++;else if(o>1){const l=Array(o).fill(0);for(;r<i&&l.some(e=>e<n+t);){const t=e[r];l[t.lane]=t.end,r++}const a=Array(o).fill(n+t);for(;s>=0&&a.some(e=>e>=n);){const t=e[s];a[t.lane]=t.start,s--}s=Math.max(0,s-s%o),r=Math.min(i,r+(o-1-r%o))}return{startIndex:s,endIndex:r}}({measurements:e,outerSize:t,scrollOffset:n,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=B(()=>{let e=null,t=null;const n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,o,i)=>null===o||null===i?[]:e({startIndex:o,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const n=this.indexFromElement(e),o=this.measurementsCache[n];if(!o)return;const i=o.key,s=this.elementsCache.get(i);s!==e&&(s&&this.observer.unobserve(s),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const n=this.measurementsCache[e];if(!n)return;const o=t-(this.itemSizeCache.get(n.key)??n.size);0!==o&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,o,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.measureElement=e=>{e?this._measureElement(e,void 0):this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))})},this.getVirtualItems=B(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{const n=[];for(let o=0,i=e.length;o<i;o++){const i=t[e[o]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0!==t.length)return L(t[Q(0,t.length-1,e=>L(t[e]).start,e)])},this.getOffsetForAlignment=(e,t,n=0)=>{const o=this.getSize(),i=this.getScrollOffset();"auto"===t&&(t=e>=i+o?"end":"start"),"center"===t?e+=(n-o)/2:"end"===t&&(e-=o);const s=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(s,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=this.measurementsCache[e];if(!n)return;const o=this.getSize(),i=this.getScrollOffset();if("auto"===t)if(n.end>=i+o-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=i+this.options.scrollPaddingStart))return[i,t];t="start"}const s="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,t,n.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:t="start",behavior:n}={})=>{"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t="auto",behavior:n}={})=>{"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1));let o=0;const i=t=>{if(!this.targetWindow)return;const o=this.getOffsetForIndex(e,t);if(!o)return void console.warn("Failed to get offset for index:",e);const[i,r]=o;this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.targetWindow.requestAnimationFrame(()=>{const t=this.getScrollOffset(),n=this.getOffsetForIndex(e,r);var o,i;n?(o=n[0],i=t,Math.abs(o-i)<1.01||s(r)):console.warn("Failed to get offset for index:",e)})},s=t=>{this.targetWindow&&(o++,o<10?this.targetWindow.requestAnimationFrame(()=>i(t)):console.warn(`Failed to scroll to index ${e} after 10 attempts.`))};i(t)},this.scrollBy=(e,{behavior:t}={})=>{"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let n;if(0===t.length)n=this.options.paddingStart;else if(1===this.options.lanes)n=(null==(e=t[t.length-1])?void 0:e.end)??0;else{const e=Array(this.options.lanes).fill(null);let o=t.length-1;for(;o>=0&&e.some(e=>null===e);){const n=t[o];null===e[n.lane]&&(e[n.lane]=n.end),o--}n=Math.max(...e.filter(e=>null!==e))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}const Q=(e,t,n,o)=>{for(;e<=t;){const i=(e+t)/2|0,s=n(i);if(s<o)e=i+1;else{if(!(s>o))return i;t=i-1}}return e>0?e-1:0},Z="undefined"!=typeof document?n.useLayoutEffect:n.useEffect;const ee=32,te=({items:e,onSelect:t,onClose:i,selectedValue:s,itemStyle:r,onChange:l,"data-testid":a,menuItemContentTemplate:c,noResultsComponent:u,menuListTemplate:h})=>{const d=(0,n.useRef)(null),f=(({containerRef:e})=>{const[t,o]=(0,n.useState)(0);return(0,n.useEffect)(()=>{const t=e.current;if(!t)return;const n=()=>{o(t.scrollTop)};return t.addEventListener("scroll",n),()=>t.removeEventListener("scroll",n)},[e]),t})({containerRef:d}),m=h||ne,p=(0,n.useMemo)(()=>e.reduce((e,t,n)=>("category"===t.type&&e.push(n),e),[]),[e]),g=(v={count:e.length,getScrollElement:()=>d.current,estimateSize:()=>ee,overscan:6,rangeExtractor:e=>{const t=[];for(let n=e.startIndex;n<=e.endIndex;n++)t.push(n);const n=((e,t)=>[...e.filter(e=>e<t.startIndex).slice(-2),...e.filter(e=>e>t.endIndex).slice(0,2)])(p,e);return n.forEach(e=>{t.includes(e)||t.push(e)}),t.sort((e,t)=>e-t)},onChange:l},function(e){const t=n.useReducer(()=>({}),{})[1],o={...e,onChange:(n,o)=>{var i;o?(0,_.flushSync)(t):t(),null==(i=e.onChange)||i.call(e,n,o)}},[i]=n.useState(()=>new J(o));return i.setOptions(o),Z(()=>i._didMount(),[]),Z(()=>i._willUpdate()),i}({observeElementRect:N,observeElementOffset:G,scrollToFn:X,...v}));var v;(({selectedValue:e,items:t,virtualizer:o})=>{(0,n.useEffect)(()=>{if(!e||0===t.length)return;const n=t.findIndex(t=>t.value===e);-1!==n&&o.scrollToIndex(n,{align:"center"})},[e,t,o])})({selectedValue:s,items:e,virtualizer:g});const b=g.getVirtualItems();return n.createElement(o.Box,{ref:d,sx:{height:"100%",overflowY:"auto"}},0===e.length&&u?u:n.createElement(m,{role:"listbox",style:{height:`${g.getTotalSize()}px`},"data-testid":a},b.map(l=>{const a=e[l.index],u=l.index===e.length-1,h="category"===e[0]?.type?1===l.index:0===l.index,d=s===a.value,m=s?-1:0;if(!a)return null;if("category"===a.type){const e=l.start+8<=f;return n.createElement(o.MenuSubheader,{key:l.key,style:e?{}:(p=l.start,{position:"absolute",transform:`translateY(${p+8}px)`}),sx:{fontWeight:"400",color:"text.tertiary"}},a.label||a.value)}var p;const g=a.disabled;return n.createElement(o.ListItem,{key:l.key,role:"option","aria-selected":d,"aria-disabled":g,onClick:g?void 0:e=>{e.target.closest("button")||(t(a.value),i())},onKeyDown:e=>{"Enter"!==e.key||g||(t(a.value),i()),"ArrowDown"===e.key&&u&&(e.preventDefault(),e.stopPropagation()),"ArrowUp"===e.key&&h&&(e.preventDefault(),e.stopPropagation())},tabIndex:d?0:m,sx:{transform:`translateY(${l.start+8}px)`,...r?r(a):{}}},c?c(a):a.label||a.value)})))},ne=(0,o.styled)(o.MenuList)(({theme:e})=>({"& > li":{height:ee,width:"100%",display:"flex",alignItems:"center"},'& > [role="option"]':{...e.typography.caption,lineHeight:"inherit",padding:e.spacing(.75,2,.75,4),"&:hover, &:focus":{backgroundColor:e.palette.action.hover},'&[aria-selected="true"]':{backgroundColor:e.palette.action.selected},'&[aria-disabled="true"]':{color:e.palette.text.disabled},cursor:"pointer",textOverflow:"ellipsis",position:"absolute",top:0,left:0},width:"100%",position:"relative"}));function oe(){return oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},oe.apply(null,arguments)}const ie="save-changes-dialog",se=({children:e,onClose:t})=>n.createElement(o.Dialog,{open:!0,onClose:t,"aria-labelledby":ie,maxWidth:"xs"},e);se.Title=({children:e,onClose:t})=>n.createElement(o.DialogTitle,{id:ie,display:"flex",alignItems:"center",gap:1,sx:{lineHeight:1,justifyContent:"space-between"}},n.createElement(o.Stack,{direction:"row",alignItems:"center",gap:1},n.createElement(y.AlertTriangleFilledIcon,{color:"secondary"}),e),t&&n.createElement(o.IconButton,{onClick:t,size:"small"},n.createElement(y.XIcon,null))),se.Content=({children:e})=>n.createElement(o.DialogContent,null,e),se.ContentText=e=>n.createElement(o.DialogContentText,oe({variant:"body2",color:"textPrimary",display:"flex",flexDirection:"column"},e)),se.Actions=({actions:e})=>{const[t,i]=(0,n.useState)(!1),{cancel:s,confirm:r,discard:l}=e;return n.createElement(o.DialogActions,null,s&&n.createElement(o.Button,{variant:"text",color:"secondary",onClick:s.action},s.label),l&&n.createElement(o.Button,{variant:"text",color:"secondary",onClick:l.action},l.label),n.createElement(o.Button,{variant:"contained",color:"secondary",onClick:async()=>{i(!0),await r.action(),i(!1)},loading:t},r.label))};const re=()=>{const[e,t]=(0,n.useState)(!1);return{isOpen:e,open:()=>t(!0),close:()=>t(!1)}},le=({value:e,onSubmit:t,validation:o,onClick:i,onError:s})=>{const[r,l]=(0,n.useState)(!1),[a,c]=(0,n.useState)(null),u=ae(r),h=t=>t!==e,d=()=>{c(null),s?.(null),l(!1)},f={onClick:e=>{r&&e.stopPropagation(),i?.(e)},onKeyDown:e=>{if(e.stopPropagation(),["Escape"].includes(e.key))return d();["Enter"].includes(e.key)&&(e.preventDefault(),a||u.current?.blur())},onInput:e=>{const{innerText:t}=e.target;if(o){const e=h(t)?o(t):null;c(e),s?.(e)}},onBlur:()=>{a?d():(e=>{if(h(e)){if(!a)try{t(e)}finally{d()}}else d()})(u.current.innerText)}},m={value:e,role:"textbox",contentEditable:r,...r&&{suppressContentEditableWarning:!0}};return{ref:u,isEditing:r,openEditMode:()=>{l(!0)},closeEditMode:d,value:e,error:a,getProps:()=>({...f,...m})}},ae=e=>{const t=(0,n.useRef)(null);return(0,n.useEffect)(()=>{e&&ce(t.current)},[e]),t},ce=e=>{const t=getSelection();if(!t||!e)return;const n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)};(window.elementorV2=window.elementorV2||{}).editorUi=t}(),window.elementorV2.editorUi?.init?.();
Copyright ©2021 || Defacer Indonesia