HEX
Server: Apache
System: Linux webd003.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/slyfwmm/adspray/wp-content/plugins/lazy-blocks/build/control-select.js
(()=>{var e={1991:(e,t)=>{var n;!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)o(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty,r=/\s+/;function o(e,o){if(o){var i=typeof o;"string"===i?function(e,t){for(var n=t.split(r),o=n.length,i=0;i<o;++i)e[n[i]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===i?function(e,t){if(t.toString===Object.prototype.toString||t.toString.toString().includes("[native code]"))for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,o):"number"===i&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=new e;t(i,r);var l=[];for(var a in i)i[a]&&l.push(a);return l.join(" ")}}();e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.i18n,t=window.wp.hooks,r=window.wp.components;var o=n(1991),i=n.n(o),l=["label","help","className","children"];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 r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function c(e){var t=e.label,n=e.help,r=e.className,o=e.children,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,l);return wp.element.createElement("div",a({},c,{className:i()("lazyblocks-component-base-control",r)}),t?wp.element.createElement("div",{className:"lazyblocks-component-base-control__label"},t):null,o,n?wp.element.createElement("div",{className:"lazyblocks-component-base-control__help"},n):null)}var s=(window.lazyblocksConstructorData||window.lazyblocksGutenberg).controls,u=void 0===s?{}:s;function d(e){return d="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},d(e)}var f=["className"];function p(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 v(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===d(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.className,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,f),l=(t=e.data.type)&&u[t]?u[t]:!!u.undefined&&u.undefined,a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({label:!!l.restrictions.label_settings&&e.data.label,help:!!l.restrictions.help_settings&&e.data.help,className:i()("lazyblocks-control lazyblocks-control-".concat(e.data.type),r),"data-lazyblocks-control-name":e.data.name},o);return a}const g=window.React;var b=n.n(g);const m=window.ReactDOM,y="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function w(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function x(e){return"nodeType"in e}function E(e){var t,n;return e?w(e)?e:x(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function C(e){const{Document:t}=E(e);return e instanceof t}function D(e){return!w(e)&&e instanceof E(e).HTMLElement}function O(e){return e instanceof E(e).SVGElement}function S(e){return e?w(e)?e.document:x(e)?C(e)?e:D(e)||O(e)?e.ownerDocument:document:document:document}const R=y?g.useLayoutEffect:g.useEffect;function M(e){const t=(0,g.useRef)(e);return R((()=>{t.current=e})),(0,g.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function k(e,t){void 0===t&&(t=[e]);const n=(0,g.useRef)(e);return R((()=>{n.current!==e&&(n.current=e)}),t),n}function I(e,t){const n=(0,g.useRef)();return(0,g.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function N(e){const t=M(e),n=(0,g.useRef)(null),r=(0,g.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,r]}function j(e){const t=(0,g.useRef)();return(0,g.useEffect)((()=>{t.current=e}),[e]),t.current}let A={};function P(e,t){return(0,g.useMemo)((()=>{if(t)return t;const n=null==A[e]?0:A[e]+1;return A[e]=n,e+"-"+n}),[e,t])}function z(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const T=z(1),_=z(-1);function L(e){if(!e)return!1;const{KeyboardEvent:t}=E(e.target);return t&&e instanceof t}function B(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=E(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const F=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[F.Translate.toString(e),F.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),U="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function H(e){return e.matches(U)?e:e.querySelector(U)}const V={display:"none"};function Y(e){let{id:t,value:n}=e;return b().createElement("div",{id:t,style:V},n)}function X(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return b().createElement("div",{id:t,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}const K=(0,g.createContext)(null),W={draggable:"\n    To pick up a draggable item, press the space bar.\n    While dragging, use the arrow keys to move the item.\n    Press space again to drop the item in its new position, or press escape to cancel.\n  "},Z={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function q(e){let{announcements:t=Z,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=W}=e;const{announce:i,announcement:l}=function(){const[e,t]=(0,g.useState)("");return{announce:(0,g.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),a=P("DndLiveRegion"),[c,s]=(0,g.useState)(!1);if((0,g.useEffect)((()=>{s(!0)}),[]),function(e){const t=(0,g.useContext)(K);(0,g.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}((0,g.useMemo)((()=>({onDragStart(e){let{active:n}=e;i(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&i(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;i(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;i(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;i(t.onDragCancel({active:n,over:r}))}})),[i,t])),!c)return null;const u=b().createElement(b().Fragment,null,b().createElement(Y,{id:r,value:o.draggable}),b().createElement(X,{id:a,announcement:l}));return n?(0,m.createPortal)(u,n):u}var J;function G(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(J||(J={}));const $=Object.freeze({x:0,y:0});function Q(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function ee(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function te(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const ne=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=te(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=(l=te(r),a=o,Math.sqrt(Math.pow(l.x-a.x,2)+Math.pow(l.y-a.y,2)));i.push({id:t,data:{droppableContainer:e,value:n}})}}var l,a;return i.sort(Q)};function re(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),l=o-r,a=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=l*a;return Number((o/(n+r-o)).toFixed(4))}return 0}const oe=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=re(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(ee)};function ie(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:$}function le(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const ae=le(1);const ce={ignoreTransform:!1};function se(e,t){void 0===t&&(t=ce);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=E(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:o,scaleY:i,x:l,y:a}=r,c=e.left-l-(1-o)*parseFloat(n),s=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:s,right:c+u,bottom:s+d,left:c}}(n,t,r))}const{top:r,left:o,width:i,height:l,bottom:a,right:c}=n;return{top:r,left:o,width:i,height:l,bottom:a,right:c}}function ue(e){return se(e,{ignoreTransform:!0})}function de(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(C(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!D(o)||O(o))return n;if(n.includes(o))return n;const i=E(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=E(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=E(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function fe(e){const[t]=de(e,1);return null!=t?t:null}function pe(e){return y&&e?w(e)?e:x(e)?C(e)||e===S(e).scrollingElement?window:D(e)?e:null:null:null}function ve(e){return w(e)?e.scrollX:e.scrollLeft}function he(e){return w(e)?e.scrollY:e.scrollTop}function ge(e){return{x:ve(e),y:he(e)}}var be;function me(e){return!(!y||!e)&&e===document.scrollingElement}function ye(e){const t={x:0,y:0},n=me(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(be||(be={}));const we={x:.2,y:.2};function xe(e,t,n,r,o){let{top:i,left:l,right:a,bottom:c}=n;void 0===r&&(r=10),void 0===o&&(o=we);const{isTop:s,isBottom:u,isLeft:d,isRight:f}=ye(e),p={x:0,y:0},v={x:0,y:0},h=t.height*o.y,g=t.width*o.x;return!s&&i<=t.top+h?(p.y=be.Backward,v.y=r*Math.abs((t.top+h-i)/h)):!u&&c>=t.bottom-h&&(p.y=be.Forward,v.y=r*Math.abs((t.bottom-h-c)/h)),!f&&a>=t.right-g?(p.x=be.Forward,v.x=r*Math.abs((t.right-g-a)/g)):!d&&l<=t.left+g&&(p.x=be.Backward,v.x=r*Math.abs((t.left+g-l)/g)),{direction:p,speed:v}}function Ee(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Ce(e){return e.reduce(((e,t)=>T(e,ge(t))),$)}const De=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+ve(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+he(t)),0)}]];class Oe{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=de(t),r=Ce(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of De)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),l=r[e]-t;return this.rect[i]+l},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Se{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Re(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var Me,ke,Ie;function Ne(e){e.preventDefault()}function je(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Me||(Me={})),(Ie=ke||(ke={})).Space="Space",Ie.Down="ArrowDown",Ie.Right="ArrowRight",Ie.Left="ArrowLeft",Ie.Up="ArrowUp",Ie.Esc="Escape",Ie.Enter="Enter";const Ae={start:[ke.Space,ke.Enter],cancel:[ke.Esc],end:[ke.Space,ke.Enter]},Pe=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ke.Right:return{...n,x:n.x+25};case ke.Left:return{...n,x:n.x-25};case ke.Down:return{...n,y:n.y+25};case ke.Up:return{...n,y:n.y-25}}};class ze{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Se(S(t)),this.windowListeners=new Se(E(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Me.Resize,this.handleCancel),this.windowListeners.add(Me.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(Me.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=se),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);fe(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t($)}handleKeyDown(e){if(L(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=Ae,coordinateGetter:i=Pe,scrollBehavior:l="smooth"}=r,{code:a}=e;if(o.end.includes(a))return void this.handleEnd(e);if(o.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:c}=n.current,s=c?{x:c.left,y:c.top}:$;this.referenceCoordinates||(this.referenceCoordinates=s);const u=i(e,{active:t,context:n.current,currentCoordinates:s});if(u){const t=_(u,s),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:a,isLeft:c,isBottom:s,maxScroll:d,minScroll:f}=ye(n),p=Ee(n),v={x:Math.min(o===ke.Right?p.right-p.width/2:p.right,Math.max(o===ke.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(o===ke.Down?p.bottom-p.height/2:p.bottom,Math.max(o===ke.Down?p.top:p.top+p.height/2,u.y))},h=o===ke.Right&&!a||o===ke.Left&&!c,g=o===ke.Down&&!s||o===ke.Up&&!i;if(h&&v.x!==u.x){const e=n.scrollLeft+t.x,i=o===ke.Right&&e<=d.x||o===ke.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:l});r.x=i?n.scrollLeft-e:o===ke.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:l});break}if(g&&v.y!==u.y){const e=n.scrollTop+t.y,i=o===ke.Down&&e<=d.y||o===ke.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:l});r.y=i?n.scrollTop-e:o===ke.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:l});break}}this.handleMove(e,T(_(u,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function Te(e){return Boolean(e&&"distance"in e)}function _e(e){return Boolean(e&&"delay"in e)}ze.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Ae,onActivation:o}=t,{active:i}=n;const{code:l}=e.nativeEvent;if(r.start.includes(l)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class Le{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=E(e);return e instanceof t?e:S(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=S(i),this.documentListeners=new Se(this.document),this.listeners=new Se(n),this.windowListeners=new Se(E(i)),this.initialCoordinates=null!=(r=B(o))?r:$,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(Me.Resize,this.handleCancel),this.windowListeners.add(Me.DragStart,Ne),this.windowListeners.add(Me.VisibilityChange,this.handleCancel),this.windowListeners.add(Me.ContextMenu,Ne),this.documentListeners.add(Me.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(_e(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(Te(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Me.Click,je,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Me.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:l}}=o;if(!r)return;const a=null!=(t=B(e))?t:$,c=_(r,a);if(!n&&l){if(Te(l)){if(null!=l.tolerance&&Re(c,l.tolerance))return this.handleCancel();if(Re(c,l.distance))return this.handleStart()}return _e(l)&&Re(c,l.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),i(a)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===ke.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Be={move:{name:"pointermove"},end:{name:"pointerup"}};class Fe extends Le{constructor(e){const{event:t}=e,n=S(t.target);super(e,Be,n)}}Fe.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const Ue={move:{name:"mousemove"},end:{name:"mouseup"}};var He;!function(e){e[e.RightClick=2]="RightClick"}(He||(He={})),class extends Le{constructor(e){super(e,Ue,S(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==He.RightClick&&(null==r||r({event:n}),!0)}}];const Ve={move:{name:"touchmove"},end:{name:"touchend"}};var Ye,Xe;(class extends Le{constructor(e){super(e,Ve)}static setup(){return window.addEventListener(Ve.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Ve.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Ye||(Ye={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Xe||(Xe={}));const Ke={x:{[be.Backward]:!1,[be.Forward]:!1},y:{[be.Backward]:!1,[be.Forward]:!1}};var We,Ze;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(We||(We={})),function(e){e.Optimized="optimized"}(Ze||(Ze={}));const qe=new Map;function Je(e,t){return I((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Ge(e){let{callback:t,disabled:n}=e;const r=M(t),o=(0,g.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)}),[n]);return(0,g.useEffect)((()=>()=>null==o?void 0:o.disconnect()),[o]),o}function $e(e){return new Oe(se(e),e)}function Qe(e,t,n){void 0===t&&(t=$e);const[r,o]=(0,g.useReducer)((function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i}),null),i=function(e){let{callback:t,disabled:n}=e;const r=M(t),o=(0,g.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)}),[r,n]);return(0,g.useEffect)((()=>()=>null==o?void 0:o.disconnect()),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),l=Ge({callback:o});return R((()=>{o(),e?(null==l||l.observe(e),null==i||i.observe(document.body,{childList:!0,subtree:!0})):(null==l||l.disconnect(),null==i||i.disconnect())}),[e]),r}const et=[];function tt(e,t){void 0===t&&(t=[]);const n=(0,g.useRef)(null);return(0,g.useEffect)((()=>{n.current=null}),t),(0,g.useEffect)((()=>{const t=e!==$;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?_(e,n.current):$}function nt(e){return(0,g.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const rt=[];const ot=[{sensor:Fe,options:{}},{sensor:ze,options:{}}],it={current:{}},lt={draggable:{measure:ue},droppable:{measure:ue,strategy:We.WhileDragging,frequency:Ze.Optimized},dragOverlay:{measure:se}};class at extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const ct={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new at,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:G},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:lt,measureDroppableContainers:G,windowRect:null,measuringScheduled:!1},st={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:G,draggableNodes:new Map,over:null,measureDroppableContainers:G},ut=(0,g.createContext)(st),dt=(0,g.createContext)(ct);function ft(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new at}}}function pt(e,t){switch(t.type){case J.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case J.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case J.DragEnd:case J.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case J.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new at(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case J.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const l=new at(e.droppable.containers);return l.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:l}}}case J.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new at(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function vt(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=(0,g.useContext)(ut),i=j(r),l=j(null==n?void 0:n.id);return(0,g.useEffect)((()=>{if(!t&&!r&&i&&null!=l){if(!L(i))return;if(document.activeElement===i.target)return;const e=o.get(l);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=H(e);if(t){t.focus();break}}}))}}),[r,t,o,l,i]),null}const ht=(0,g.createContext)({...$,scaleX:1,scaleY:1});var gt;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(gt||(gt={}));const bt=(0,g.memo)((function(e){var t,n,r,o;let{id:i,accessibility:l,autoScroll:a=!0,children:c,sensors:s=ot,collisionDetection:u=oe,measuring:d,modifiers:f,...p}=e;const v=(0,g.useReducer)(pt,void 0,ft),[h,w]=v,[x,C]=function(){const[e]=(0,g.useState)((()=>new Set)),t=(0,g.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]),n=(0,g.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]);return[n,t]}(),[O,S]=(0,g.useState)(gt.Uninitialized),M=O===gt.Initialized,{draggable:{active:A,nodes:z,translate:_},droppable:{containers:L}}=h,F=A?z.get(A):null,U=(0,g.useRef)({initial:null,translated:null}),H=(0,g.useMemo)((()=>{var e;return null!=A?{id:A,data:null!=(e=null==F?void 0:F.data)?e:it,rect:U}:null}),[A,F]),V=(0,g.useRef)(null),[Y,X]=(0,g.useState)(null),[W,Z]=(0,g.useState)(null),G=k(p,Object.values(p)),Q=P("DndDescribedBy",i),ee=(0,g.useMemo)((()=>L.getEnabled()),[L]),te=(ne=d,(0,g.useMemo)((()=>({draggable:{...lt.draggable,...null==ne?void 0:ne.draggable},droppable:{...lt.droppable,...null==ne?void 0:ne.droppable},dragOverlay:{...lt.dragOverlay,...null==ne?void 0:ne.dragOverlay}})),[null==ne?void 0:ne.draggable,null==ne?void 0:ne.droppable,null==ne?void 0:ne.dragOverlay]));var ne;const{droppableRects:re,measureDroppableContainers:le,measuringScheduled:ce}=function(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,l]=(0,g.useState)(null),{frequency:a,measure:c,strategy:s}=o,u=(0,g.useRef)(e),d=function(){switch(s){case We.Always:return!1;case We.BeforeDragging:return n;default:return!n}}(),f=k(d),p=(0,g.useCallback)((function(e){void 0===e&&(e=[]),f.current||l((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[f]),v=(0,g.useRef)(null),h=I((t=>{if(d&&!n)return qe;if(!t||t===qe||u.current!==e||null!=i){const t=new Map;for(let n of e){if(!n)continue;if(i&&i.length>0&&!i.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new Oe(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,i,n,d,c]);return(0,g.useEffect)((()=>{u.current=e}),[e]),(0,g.useEffect)((()=>{d||p()}),[n,d]),(0,g.useEffect)((()=>{i&&i.length>0&&l(null)}),[JSON.stringify(i)]),(0,g.useEffect)((()=>{d||"number"!=typeof a||null!==v.current||(v.current=setTimeout((()=>{p(),v.current=null}),a))}),[a,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:null!=i}}(ee,{dragging:M,dependencies:[_.x,_.y],config:te.droppable}),ue=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return I((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(z,A),ve=(0,g.useMemo)((()=>W?B(W):null),[W]),he=function(){const e=!1===(null==Y?void 0:Y.autoScrollEnabled),t="object"==typeof a?!1===a.enabled:!1===a,n=M&&!e&&!t;return"object"==typeof a?{...a,enabled:n}:{enabled:n}}(),ye=function(e,t){return Je(e,t)}(ue,te.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=(0,g.useRef)(!1),{x:l,y:a}="boolean"==typeof o?{x:o,y:o}:o;R((()=>{if(!l&&!a||!t)return void(i.current=!1);if(i.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=ie(n(e),r);if(l||(o.x=0),a||(o.y=0),i.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=fe(e);t&&t.scrollBy({top:o.y,left:o.x})}}),[t,l,a,r,n])}({activeNode:A?z.get(A):null,config:he.layoutShiftCompensation,initialRect:ye,measure:te.draggable.measure});const we=Qe(ue,te.draggable.measure,ye),Ee=Qe(ue?ue.parentElement:null),De=(0,g.useRef)({activatorEvent:null,active:null,activeNode:ue,collisionRect:null,collisions:null,droppableRects:re,draggableNodes:z,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Se=L.getNodeFor(null==(t=De.current.over)?void 0:t.id),Re=function(e){let{measure:t}=e;const[n,r]=(0,g.useState)(null),o=Ge({callback:(0,g.useCallback)((e=>{for(const{target:n}of e)if(D(n)){r((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),i=(0,g.useCallback)((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return D(t)?t:e}(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),r(n?t(n):null)}),[t,o]),[l,a]=N(i);return(0,g.useMemo)((()=>({nodeRef:l,rect:n,setRef:a})),[n,l,a])}({measure:te.dragOverlay.measure}),Me=null!=(n=Re.nodeRef.current)?n:ue,ke=M?null!=(r=Re.rect)?r:we:null,Ie=Boolean(Re.nodeRef.current&&Re.rect),Ne=ie(je=Ie?null:we,Je(je));var je;const Ae=nt(Me?E(Me):null),Pe=function(e){const t=(0,g.useRef)(e),n=I((n=>e?n&&n!==et&&e&&t.current&&e.parentNode===t.current.parentNode?n:de(e):et),[e]);return(0,g.useEffect)((()=>{t.current=e}),[e]),n}(M?null!=Se?Se:ue:null),ze=function(e,t){void 0===t&&(t=se);const[n]=e,r=nt(n?E(n):null),[o,i]=(0,g.useReducer)((function(){return e.length?e.map((e=>me(e)?r:new Oe(t(e),e))):rt}),rt),l=Ge({callback:i});return e.length>0&&o===rt&&i(),R((()=>{e.length?e.forEach((e=>null==l?void 0:l.observe(e))):(null==l||l.disconnect(),i())}),[e]),o}(Pe),Te=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}(f,{transform:{x:_.x-Ne.x,y:_.y-Ne.y,scaleX:1,scaleY:1},activatorEvent:W,active:H,activeNodeRect:we,containerNodeRect:Ee,draggingNodeRect:ke,over:De.current.over,overlayNodeRect:Re.rect,scrollableAncestors:Pe,scrollableAncestorRects:ze,windowRect:Ae}),_e=ve?T(ve,_):null,Le=function(e){const[t,n]=(0,g.useState)(null),r=(0,g.useRef)(e),o=(0,g.useCallback)((e=>{const t=pe(e.target);t&&n((e=>e?(e.set(t,ge(t)),new Map(e)):null))}),[]);return(0,g.useEffect)((()=>{const t=r.current;if(e!==t){i(t);const l=e.map((e=>{const t=pe(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,ge(t)]):null})).filter((e=>null!=e));n(l.length?new Map(l):null),r.current=e}return()=>{i(e),i(t)};function i(e){e.forEach((e=>{const t=pe(e);null==t||t.removeEventListener("scroll",o)}))}}),[o,e]),(0,g.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>T(e,t)),$):Ce(e):$),[e,t])}(Pe),Be=tt(Le),Fe=tt(Le,[we]),Ue=T(Te,Be),He=ke?ae(ke,Te):null,Ve=H&&He?u({active:H,collisionRect:He,droppableRects:re,droppableContainers:ee,pointerCoordinates:_e}):null,Ze=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n.id}(Ve),[$e,at]=(0,g.useState)(null),ct=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Ie?Te:T(Te,Fe),null!=(o=null==$e?void 0:$e.rect)?o:null,we),st=(0,g.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==V.current)return;const o=z.get(V.current);if(!o)return;const i=e.nativeEvent,l=new n({active:V.current,activeNode:o,event:i,options:r,context:De,onStart(e){const t=V.current;if(null==t)return;const n=z.get(t);if(!n)return;const{onDragStart:r}=G.current,o={active:{id:t,data:n.data,rect:U}};(0,m.unstable_batchedUpdates)((()=>{null==r||r(o),S(gt.Initializing),w({type:J.DragStart,initialCoordinates:e,active:t}),x({type:"onDragStart",event:o})}))},onMove(e){w({type:J.DragMove,coordinates:e})},onEnd:a(J.DragEnd),onCancel:a(J.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=De.current;let l=null;if(t&&o){const{cancelDrop:a}=G.current;l={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===J.DragEnd&&"function"==typeof a&&await Promise.resolve(a(l))&&(e=J.DragCancel)}V.current=null,(0,m.unstable_batchedUpdates)((()=>{w({type:e}),S(gt.Uninitialized),at(null),X(null),Z(null);const t=e===J.DragEnd?"onDragEnd":"onDragCancel";if(l){const e=G.current[t];null==e||e(l),x({type:t,event:l})}}))}}(0,m.unstable_batchedUpdates)((()=>{X(l),Z(e.nativeEvent)}))}),[z]),bt=(0,g.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=z.get(r);if(null!==V.current||!i||o.dndKit||o.defaultPrevented)return;const l={active:i};!0===e(n,t.options,l)&&(o.dndKit={capturedBy:t.sensor},V.current=r,st(n,t))}),[z,st]),mt=function(e,t){return(0,g.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(s,bt);!function(e){(0,g.useEffect)((()=>{if(!y)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(s),R((()=>{we&&O===gt.Initializing&&S(gt.Initialized)}),[we,O]),(0,g.useEffect)((()=>{const{onDragMove:e}=G.current,{active:t,activatorEvent:n,collisions:r,over:o}=De.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:Ue.x,y:Ue.y},over:o};(0,m.unstable_batchedUpdates)((()=>{null==e||e(i),x({type:"onDragMove",event:i})}))}),[Ue.x,Ue.y]),(0,g.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=De.current;if(!e||null==V.current||!t||!o)return;const{onDragOver:i}=G.current,l=r.get(Ze),a=l&&l.rect.current?{id:l.id,rect:l.rect.current,data:l.data,disabled:l.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:a};(0,m.unstable_batchedUpdates)((()=>{at(a),null==i||i(c),x({type:"onDragOver",event:c})}))}),[Ze]),R((()=>{De.current={activatorEvent:W,active:H,activeNode:ue,collisionRect:He,collisions:Ve,droppableRects:re,draggableNodes:z,draggingNode:Me,draggingNodeRect:ke,droppableContainers:L,over:$e,scrollableAncestors:Pe,scrollAdjustedTranslate:Ue},U.current={initial:ke,translated:He}}),[H,ue,Ve,He,z,Me,ke,re,L,$e,Pe,Ue]),function(e){let{acceleration:t,activator:n=Ye.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:l=5,order:a=Xe.TreeOrder,pointerCoordinates:c,scrollableAncestors:s,scrollableAncestorRects:u,delta:d,threshold:f}=e;const p=function(e){let{delta:t,disabled:n}=e;const r=j(t);return I((e=>{if(n||!r||!e)return Ke;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[be.Backward]:e.x[be.Backward]||-1===o,[be.Forward]:e.x[be.Forward]||1===o},y:{[be.Backward]:e.y[be.Backward]||-1===i,[be.Forward]:e.y[be.Forward]||1===i}}}),[n,t,r])}({delta:d,disabled:!i}),[v,h]=function(){const e=(0,g.useRef)(null);return[(0,g.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,g.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),b=(0,g.useRef)({x:0,y:0}),m=(0,g.useRef)({x:0,y:0}),y=(0,g.useMemo)((()=>{switch(n){case Ye.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Ye.DraggableRect:return o}}),[n,o,c]),w=(0,g.useRef)(null),x=(0,g.useCallback)((()=>{const e=w.current;if(!e)return;const t=b.current.x*m.current.x,n=b.current.y*m.current.y;e.scrollBy(t,n)}),[]),E=(0,g.useMemo)((()=>a===Xe.TreeOrder?[...s].reverse():s),[a,s]);(0,g.useEffect)((()=>{if(i&&s.length&&y){for(const e of E){if(!1===(null==r?void 0:r(e)))continue;const n=s.indexOf(e),o=u[n];if(!o)continue;const{direction:i,speed:a}=xe(e,o,y,t,f);for(const e of["x","y"])p[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return h(),w.current=e,v(x,l),b.current=a,void(m.current=i)}b.current={x:0,y:0},m.current={x:0,y:0},h()}else h()}),[t,x,r,h,i,l,JSON.stringify(y),JSON.stringify(p),v,s,E,u,JSON.stringify(f)])}({...he,delta:_,draggingRect:He,pointerCoordinates:_e,scrollableAncestors:Pe,scrollableAncestorRects:ze});const yt=(0,g.useMemo)((()=>({active:H,activeNode:ue,activeNodeRect:we,activatorEvent:W,collisions:Ve,containerNodeRect:Ee,dragOverlay:Re,draggableNodes:z,droppableContainers:L,droppableRects:re,over:$e,measureDroppableContainers:le,scrollableAncestors:Pe,scrollableAncestorRects:ze,measuringConfiguration:te,measuringScheduled:ce,windowRect:Ae})),[H,ue,we,W,Ve,Ee,Re,z,L,re,$e,le,Pe,ze,te,ce,Ae]),wt=(0,g.useMemo)((()=>({activatorEvent:W,activators:mt,active:H,activeNodeRect:we,ariaDescribedById:{draggable:Q},dispatch:w,draggableNodes:z,over:$e,measureDroppableContainers:le})),[W,mt,H,we,w,Q,z,$e,le]);return b().createElement(K.Provider,{value:C},b().createElement(ut.Provider,{value:wt},b().createElement(dt.Provider,{value:yt},b().createElement(ht.Provider,{value:ct},c)),b().createElement(vt,{disabled:!1===(null==l?void 0:l.restoreFocus)})),b().createElement(q,{...l,hiddenTextDescribedById:Q}))})),mt=(0,g.createContext)(null),yt="button",wt="Droppable";const xt={timeout:25};function Et(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Ct(e,t){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function Dt(e){return null!==e&&e>=0}const Ot=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=Et(t,r,n),l=t[o],a=i[o];return a&&l?{x:a.left-l.left,y:a.top-l.top,scaleX:a.width/l.width,scaleY:a.height/l.height}:null},St={scaleX:1,scaleY:1},Rt=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:l}=e;const a=null!=(t=i[n])?t:r;if(!a)return null;if(o===n){const e=i[l];return e?{x:0,y:n<l?e.top+e.height-(a.top+a.height):e.top-a.top,...St}:null}const c=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r?n<t?o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}(i,o,n);return o>n&&o<=l?{x:0,y:-a.height-c,...St}:o<n&&o>=l?{x:0,y:a.height+c,...St}:{x:0,y:0,...St}},Mt="Sortable",kt=b().createContext({activeIndex:-1,containerId:Mt,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Ot,disabled:{draggable:!1,droppable:!1}});function It(e){let{children:t,id:n,items:r,strategy:o=Ot,disabled:i=!1}=e;const{active:l,dragOverlay:a,droppableRects:c,over:s,measureDroppableContainers:u}=(0,g.useContext)(dt),d=P(Mt,n),f=Boolean(null!==a.rect),p=(0,g.useMemo)((()=>r.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[r]),v=null!=l,h=l?p.indexOf(l.id):-1,m=s?p.indexOf(s.id):-1,y=(0,g.useRef)(p),w=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(p,y.current),x=-1!==m&&-1===h||w,E=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(i);R((()=>{w&&v&&u(p)}),[w,p,v,u]),(0,g.useEffect)((()=>{y.current=p}),[p]);const C=(0,g.useMemo)((()=>({activeIndex:h,containerId:d,disabled:E,disableTransforms:x,items:p,overIndex:m,useDragOverlay:f,sortedRects:Ct(p,c),strategy:o})),[h,d,E.draggable,E.droppable,x,p,m,c,f,o]);return b().createElement(kt.Provider,{value:C},t)}const Nt=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return Et(n,r,o).indexOf(t)},jt=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:l,previousItems:a,previousContainerId:c,transition:s}=e;return!(!s||!r||a!==i&&o===l||!n&&(l===o||t!==c))},At={duration:200,easing:"ease"},Pt="transform",zt=F.Transition.toString({property:Pt,duration:0,easing:"linear"}),Tt={roleDescription:"sortable"};function _t(e){let{animateLayoutChanges:t=jt,attributes:n,disabled:r,data:o,getNewIndex:i=Nt,id:l,strategy:a,resizeObserverConfig:c,transition:s=At}=e;const{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:v,sortedRects:h,overIndex:b,useDragOverlay:m,strategy:y}=(0,g.useContext)(kt),w=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,p),x=u.indexOf(l),E=(0,g.useMemo)((()=>({sortable:{containerId:d,index:x,items:u},...o})),[d,o,x,u]),C=(0,g.useMemo)((()=>u.slice(u.indexOf(l))),[u,l]),{rect:D,node:O,isOver:S,setNodeRef:M}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=P("Droppable"),{active:l,dispatch:a,over:c,measureDroppableContainers:s}=(0,g.useContext)(ut),u=(0,g.useRef)({disabled:n}),d=(0,g.useRef)(!1),f=(0,g.useRef)(null),p=(0,g.useRef)(null),{disabled:v,updateMeasurementsFor:h,timeout:b}={...xt,...o},m=k(null!=h?h:r),y=Ge({callback:(0,g.useCallback)((()=>{d.current?(null!=p.current&&clearTimeout(p.current),p.current=setTimeout((()=>{s(Array.isArray(m.current)?m.current:[m.current]),p.current=null}),b)):d.current=!0}),[b]),disabled:v||!l}),w=(0,g.useCallback)(((e,t)=>{y&&(t&&(y.unobserve(t),d.current=!1),e&&y.observe(e))}),[y]),[x,E]=N(w),C=k(t);return(0,g.useEffect)((()=>{y&&x.current&&(y.disconnect(),d.current=!1,y.observe(x.current))}),[x,y]),R((()=>(a({type:J.RegisterDroppable,element:{id:r,key:i,disabled:n,node:x,rect:f,data:C}}),()=>a({type:J.UnregisterDroppable,key:i,id:r}))),[r]),(0,g.useEffect)((()=>{n!==u.current.disabled&&(a({type:J.SetDroppableDisabled,id:r,key:i,disabled:n}),u.current.disabled=n)}),[r,i,n,a]),{active:l,rect:f,isOver:(null==c?void 0:c.id)===r,node:x,over:c,setNodeRef:E}}({id:l,data:E,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...c}}),{active:I,activatorEvent:j,activeNodeRect:A,attributes:z,setNodeRef:T,listeners:_,isDragging:B,over:U,setActivatorNodeRef:H,transform:V}=function(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=P(wt),{activators:l,activatorEvent:a,active:c,activeNodeRect:s,ariaDescribedById:u,draggableNodes:d,over:f}=(0,g.useContext)(ut),{role:p=yt,roleDescription:v="draggable",tabIndex:h=0}=null!=o?o:{},b=(null==c?void 0:c.id)===t,m=(0,g.useContext)(b?ht:mt),[y,w]=N(),[x,E]=N(),C=function(e,t){return(0,g.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(l,t),D=k(n);return R((()=>(d.set(t,{id:t,key:i,node:y,activatorNode:x,data:D}),()=>{const e=d.get(t);e&&e.key===i&&d.delete(t)})),[d,t]),{active:c,activatorEvent:a,activeNodeRect:s,attributes:(0,g.useMemo)((()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":!(!b||p!==yt)||void 0,"aria-roledescription":v,"aria-describedby":u.draggable})),[r,p,h,b,v,u.draggable]),isDragging:b,listeners:r?void 0:C,node:y,over:f,setNodeRef:w,setActivatorNodeRef:E,transform:m}}({id:l,data:E,attributes:{...Tt,...n},disabled:w.draggable}),Y=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,g.useMemo)((()=>e=>{t.forEach((t=>t(e)))}),t)}(M,T),X=Boolean(I),K=X&&!v&&Dt(f)&&Dt(b),W=!m&&B,Z=W&&K?V:null,q=K?null!=Z?Z:(null!=a?a:y)({rects:h,activeNodeRect:A,activeIndex:f,overIndex:b,index:x}):null,G=Dt(f)&&Dt(b)?i({id:l,items:u,activeIndex:f,overIndex:b}):x,$=null==I?void 0:I.id,Q=(0,g.useRef)({activeId:$,items:u,newIndex:G,containerId:d}),ee=u!==Q.current.items,te=t({active:I,containerId:d,isDragging:B,isSorting:X,id:l,index:x,items:u,newIndex:Q.current.newIndex,previousItems:Q.current.items,previousContainerId:Q.current.containerId,transition:s,wasDragging:null!=Q.current.activeId}),ne=function(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,l]=(0,g.useState)(null),a=(0,g.useRef)(n);return R((()=>{if(!t&&n!==a.current&&r.current){const e=o.current;if(e){const t=se(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&l(n)}}n!==a.current&&(a.current=n)}),[t,n,r,o]),(0,g.useEffect)((()=>{i&&l(null)}),[i]),i}({disabled:!te,index:x,node:O,rect:D});return(0,g.useEffect)((()=>{X&&Q.current.newIndex!==G&&(Q.current.newIndex=G),d!==Q.current.containerId&&(Q.current.containerId=d),u!==Q.current.items&&(Q.current.items=u)}),[X,G,d,u]),(0,g.useEffect)((()=>{if($===Q.current.activeId)return;if($&&!Q.current.activeId)return void(Q.current.activeId=$);const e=setTimeout((()=>{Q.current.activeId=$}),50);return()=>clearTimeout(e)}),[$]),{active:I,activeIndex:f,attributes:z,data:E,rect:D,index:x,newIndex:G,items:u,isOver:S,isSorting:X,isDragging:B,listeners:_,node:O,overIndex:b,over:U,setNodeRef:Y,setActivatorNodeRef:H,setDroppableNodeRef:M,setDraggableNodeRef:T,transform:null!=ne?ne:q,transition:ne||ee&&Q.current.newIndex===x?zt:W&&!L(j)||!s?void 0:X||te?F.Transition.toString({...s,property:Pt}):void 0}}ke.Down,ke.Right,ke.Up,ke.Left;const Lt=window.wp.compose;function Bt(e){return Bt="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},Bt(e)}function Ft(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==Bt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Bt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o),"symbol"===Bt(i)?i:String(i)),r)}var o,i}function Ut(e){return Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ut(e)}function Ht(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vt(e,t){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vt(e,t)}var Yt=function(e){function t(e,n){var r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=function(e,t,n){return t=Ut(t),function(e,t){if(t&&("object"===Bt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ht(e)}(e,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){return!1}}()?Reflect.construct(t,n||[],Ut(e).constructor):t.apply(e,n))}(this,t,[e,n])).customAttach=o.customAttach.bind(Ht(o)),o.customDetach=o.customDetach.bind(Ht(o)),o.customPointerMove=o.customPointerMove.bind(Ht(o)),o.customPointerUp=o.customPointerUp.bind(Ht(o)),o.customResize=o.customResize.bind(Ht(o));var i=null==e||null===(r=e.event)||void 0===r||null===(r=r.target)||void 0===r||null===(r=r.ownerDocument)||void 0===r?void 0:r.defaultView;return i&&(o.editorIframe=i,o.customAttach()),o}var n,r;return 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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vt(e,t)}(t,e),n=t,(r=[{key:"customAttach",value:function(){this.editorIframe&&(this.editorIframe.addEventListener("pointermove",this.customPointerMove),this.editorIframe.addEventListener("pointerup",this.customPointerUp),this.editorIframe.addEventListener("resize",this.customResize))}},{key:"customDetach",value:function(){this.editorIframe&&(this.editorIframe.removeEventListener("pointermove",this.customPointerMove),this.editorIframe.removeEventListener("pointerup",this.customPointerUp),this.editorIframe.removeEventListener("resize",this.customResize))}},{key:"customPointerMove",value:function(e){this.editorIframe&&this.handleMove(e)}},{key:"customPointerUp",value:function(e){this.editorIframe&&this.handleEnd(e)}},{key:"customResize",value:function(e){this.editorIframe&&this.handleCancel(e)}},{key:"handleEnd",value:function(){var e=this.props.onEnd;this.detach(),this.customDetach(),e()}},{key:"handleCancel",value:function(){var e=this.props.onCancel;this.detach(),this.customDetach(),e()}}])&&Ft(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(Fe);function Xt(e){return Xt="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},Xt(e)}function Kt(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 Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kt(Object(n),!0).forEach((function(t){Jt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qt(){return qt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qt.apply(this,arguments)}function Jt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Xt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Xt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Xt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gt=function(e){var t=e.id,n=e.values,o=e.focusInput,l=_t({id:t}),a=l.attributes,c=l.listeners,s=l.setNodeRef,u=l.transform,d=l.transition,f=l.isDragging,p=l.isSorting,v={transform:F.Translate.toString(u),transition:p?d:""};return wp.element.createElement("div",{className:i()("lzb-constructor-controls-item-settings-choices-item",f?"lzb-constructor-controls-item-settings-choices-item-dragging":""),ref:s,style:v},n.map((function(t,n){return wp.element.createElement(r.TextControl,{key:t.name,placeholder:t.label,value:t.value,onChange:function(n){return e.updateChoice(Jt({},t.name,n))},autoFocus:o&&0===n})})),wp.element.createElement("div",qt({className:"lzb-constructor-controls-item-settings-choices-item-handler"},a,c),wp.element.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M10 4.99976H8V6.99976H10V4.99976Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M10 10.9998H8V12.9998H10V10.9998Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M10 16.9998H8V18.9998H10V16.9998Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M16 4.99976H14V6.99976H16V4.99976Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M16 10.9998H14V12.9998H16V10.9998Z",fill:"currentColor"}),wp.element.createElement("path",{d:"M16 16.9998H14V18.9998H16V16.9998Z",fill:"currentColor"}))),wp.element.createElement("button",{className:"lzb-constructor-controls-item-settings-choices-item-remove",onClick:function(){return e.removeChoice()}},wp.element.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement("path",{d:"M6.33734 7.1706C6.23299 6.4793 6.76826 5.85717 7.4674 5.85717H16.5326C17.2317 5.85717 17.767 6.4793 17.6627 7.17061L15.9807 18.3134C15.8963 18.8724 15.416 19.2857 14.8507 19.2857H9.14934C8.58403 19.2857 8.10365 18.8724 8.01928 18.3134L6.33734 7.1706Z",stroke:"currentColor",strokeWidth:"1.71429"}),wp.element.createElement("rect",{x:"4",y:"5",width:"16",height:"2",fill:"currentColor"}),wp.element.createElement("path",{d:"M14.2857 5C14.2857 5 13.2624 5 12 5C10.7376 5 9.71428 5 9.71428 5C9.71428 3.73763 10.7376 2.71429 12 2.71429C13.2624 2.71429 14.2857 3.73763 14.2857 5Z",fill:"currentColor"}))))};function $t(t){var n=t.value,o=void 0===n?[]:n,i=t.onChange,l=t.options,a=void 0===l?[{name:"label",label:(0,e.__)("Label","lazy-blocks")},{name:"value",label:(0,e.__)("Value","lazy-blocks")}]:l,c=t.label,s=void 0===c?(0,e.__)("Choices","lazy-blocks"):c,u=t.labelAddChoice,d=void 0===u?(0,e.__)("+ Add Choice","lazy-blocks"):u,f=t.id,p=void 0===f?"lzb-component-choices":f,v=t.help,h=(0,Lt.usePrevious)(o&&o.length),b=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,g.useMemo)((()=>[...t].filter((e=>null!=e))),[...t])}(function(e,t){return(0,g.useMemo)((()=>({sensor:e,options:{}})),[e,t])}(Yt)),m=[],y=!1;return o&&o.length&&(o.forEach((function(e,t){var n=[];a.forEach((function(t){var r;n.push({name:t.name,label:t.label,value:null!==(r=e[t.name])&&void 0!==r?r:""})})),m.push({id:t+1,values:n,removeChoice:function(){!function(e){o.splice(e,1),i(o)}(t)},updateChoice:function(e){!function(e,t){o[e]&&(o[e]=Wt(Wt({},o[e]),t),i(o))}(t,e)}})})),h<o.length&&(y=!0)),wp.element.createElement(r.BaseControl,{id:p,label:s,help:v},wp.element.createElement("div",{className:"lzb-constructor-controls-item-settings-choices"},m.length?wp.element.createElement("div",{className:"lzb-constructor-controls-item-settings-choices-items"},wp.element.createElement(bt,{sensors:b,collisionDetection:ne,onDragEnd:function(e){var t,n,r,l,a,c=e.active,s=e.over;c.id!==s.id&&(t=c.id-1,n=s.id-1,r=o,l=t,a=n,function(e,t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const r=n<0?e.length+n:n,[o]=e.splice(t,1);e.splice(r,0,o)}}(r=[...r],l,a),i(r))}},wp.element.createElement(It,{items:m,strategy:Rt},m.map((function(e,t){return wp.element.createElement(Gt,qt({key:"lzb-constructor-controls-item-settings-choices-item-".concat(e.id)},e,{focusInput:t+1===o.length&&y}))}))))):null,wp.element.createElement("div",null,wp.element.createElement(r.Button,{onClick:function(){return t={},a.forEach((function(e){var n;t[e.name]=null!==(n=e.defaults)&&void 0!==n?n:""})),void i([].concat((e=o,function(e){if(Array.isArray(e))return Zt(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){if("string"==typeof e)return Zt(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)?Zt(e,t):void 0}}(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.")}()),[t]));var e,t},variant:"secondary",size:"small"},d))))}function Qt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}(0,t.addFilter)("lzb.editor.control.select.render","lzb.editor",(function(t,n){var o,i=n.data.choices;return n.data.allow_null&&"true"===n.data.allow_null&&(i=[{value:"",label:(0,e.__)("-- Select --","lazy-blocks")}].concat(function(e){if(Array.isArray(e))return Qt(e)}(o=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||function(e,t){if(e){if("string"==typeof e)return Qt(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)?Qt(e,t):void 0}}(o)||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.")}())),wp.element.createElement(c,h(n,{label:!1}),wp.element.createElement(r.SelectControl,{label:n.data.label,options:i,multiple:"true"===n.data.multiple,value:n.getValue(),onChange:function(e){n.onChange(e)}}))})),(0,t.addFilter)("lzb.editor.control.select.validate","lzb.editor",(function(e,t,n){return"true"===n.allow_null?{valid:!0}:!t||"true"===n.multiple&&!t.length?{valid:!1,message:"Please select an item in the list."}:e})),(0,t.addFilter)("lzb.constructor.control.select.settings","lzb.constructor",(function(t,n){var o=n.updateData,i=n.data,l=i.choices;return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(r.PanelBody,null,wp.element.createElement($t,{value:l,onChange:function(e){return o({choices:e})}})),wp.element.createElement(r.PanelBody,null,wp.element.createElement(c,{id:"lzb-control-select-allow-null",label:(0,e.__)("Allow Null","lazy-blocks"),help:(0,e.__)("Allows you to reset selected option value to null","lazy-blocks")},wp.element.createElement(r.ToggleControl,{id:"lzb-control-select-allow-null",label:(0,e.__)("Yes","lazy-blocks"),checked:"true"===i.allow_null,onChange:function(e){return o({allow_null:e?"true":"false"})}}))),wp.element.createElement(r.PanelBody,null,wp.element.createElement(c,{id:"lzb-control-select-multiple",label:(0,e.__)("Multiple","lazy-blocks"),help:(0,e.__)("Allows you to select multiple values","lazy-blocks")},wp.element.createElement(r.ToggleControl,{id:"lzb-control-select-multiple",label:(0,e.__)("Yes","lazy-blocks"),checked:"true"===i.multiple,onChange:function(e){return o({multiple:e?"true":"false"})}}))),wp.element.createElement(r.PanelBody,null,wp.element.createElement(c,{id:"lzb-control-select-output-format",label:(0,e.__)("Output Format","lazy-blocks"),help:(0,e.__)("Allows you to change attribute output format","lazy-blocks")},wp.element.createElement(r.RadioControl,{options:[{label:(0,e.__)("Value","lazy-blocks"),value:""},{label:(0,e.__)("Label","lazy-blocks"),value:"label"},{label:(0,e.__)("Both (Array)","lazy-blocks"),value:"array"}],selected:i.output_format||"",onChange:function(e){return o({output_format:e})}}))))}))})()})();