(()=>{var e,t,n={8610(e,t,n){"use strict";n.d(t,{A:()=>a});var o=n(1601),r=n.n(o),i=n(6314),s=n.n(i)()(r());s.push([e.id,".sd-control-label{font-size:11px;font-weight:500;text-transform:uppercase;color:#50575e;line-height:1.4;margin-bottom:8px;display:block}.sd-control-label.sd-control__header{margin-bottom:12px}.sd-option-outer-wrapper{display:flex;align-items:center;gap:10px}.sd-option-outer-wrapper:first-of-type>div{padding-top:0}.sd-option-outer-wrapper>div{display:flex;align-items:center;gap:10px;padding:4px 0}.sd-option-outer-wrapper>div .components-base-control{margin-bottom:0 !important}.sd-option-outer-wrapper .sd-preselection-control{display:flex;align-items:center;padding:4px 0}.sd-option-outer-wrapper .sd-preselection-control input[type=checkbox],.sd-option-outer-wrapper .sd-preselection-control input[type=radio]{margin:0;cursor:pointer;width:16px !important;height:16px !important;min-width:16px;flex-shrink:0}.sd-option-outer-wrapper .sd-preselection-control input[type=radio]{border-radius:50%}.sd-option-outer-wrapper .sd-option-outer-text-control{flex:1}.sd-option-outer-wrapper .sd-option-outer-text-control .sd-text-control{margin-bottom:0}.sd-option-outer-wrapper .sd-option-outer-text-control input{width:100%}.sd-option-outer-wrapper .sd-option-value{width:75px}.sd-option-outer-wrapper .sd-option-value .sd-option-value-input{width:100%;height:36px;padding:0 8px;border:1px solid #e6e7e9;border-radius:4px;font-size:13px;text-align:center}.sd-option-outer-wrapper .sd-option-value .sd-option-value-input:focus{border-color:#1293b6;outline:none;box-shadow:0 0 0 1px #1293b6}.sd-option-outer-wrapper .sd-option-value .sd-option-value-input{-moz-appearance:textfield}.sd-option-outer-wrapper .sd-option-value .sd-option-value-input::-webkit-outer-spin-button,.sd-option-outer-wrapper .sd-option-value .sd-option-value-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.sd-option-outer-wrapper .sd-options-delete{font-size:12px;font-weight:600;line-height:1.4;cursor:pointer;display:flex;align-items:center}.sd-option-outer-wrapper .sd-options-delete svg{transition:color .2s ease}.sd-option-outer-wrapper .sd-options-delete svg:hover{color:#ef4444 !important}.sd-add-option-container{display:flex;gap:8px;margin-top:12px}.sd-add-option-container .sd-text-control{flex:1;margin-bottom:0}.sd-add-option-container .sd-add-option-button{height:40px;padding:0 12px;font-size:12px;font-weight:600;white-space:nowrap}.sd-settings-separator{border-bottom:1px solid #e6e7e9;margin:16px -16px}",""]);const a=s},6359(e,t,n){"use strict";n.d(t,{A:()=>a});var o=n(1601),r=n.n(o),i=n(6314),s=n.n(i)()(r());s.push([e.id,'.components-panel[data-sd-tab]{z-index:99}.components-panel[data-sd-tab]:not([data-sd-tab=advance]) .components-panel__body.block-editor-block-inspector__advanced,.components-panel[data-sd-tab]:not([data-sd-tab=advance]) .components-panel__body.editor-block-inspector__advanced.block-editor-block-inspector__advanced,.components-panel[data-sd-tab]:not([data-sd-tab=advance]) .block-editor-block-inspector>div>.components-panel__body{display:none}.components-panel[data-sd-tab] .block-editor-block-card{position:relative;z-index:1;overflow:hidden}.components-panel[data-sd-tab] .block-editor-block-card::before{content:"";position:absolute;top:0;left:-16px;right:-16px;bottom:0;background:#fff;z-index:-1}.components-panel[data-sd-tab] .components-panel__body.edit-post-settings-sidebar__panel-block .block-editor-block-card{overflow:unset}.components-panel[data-sd-tab] .components-panel__body.edit-post-settings-sidebar__panel-block .block-editor-block-card::before{top:-16px}.components-panel[data-sd-tab=advance] .block-editor-block-inspector__advanced{border-color:rgba(0,0,0,0)}[dir=rtl] .sd-inspector-tabs{direction:rtl}[dir=rtl] .sd-inspector-tabs>div:first-child.sd-active::after{border-left:1px solid #d6d9dd;border-right:0}[dir=rtl] .sd-inspector-tabs>div:last-child.sd-active::after{border-left:0;border-right:1px solid #d6d9dd}.sd-inspector-tabs{display:flex;position:relative;background:#fff;z-index:9;height:65px}.sd-inspector-tabs>div{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;background:#fff;cursor:pointer}.sd-inspector-tabs>div::after,.sd-inspector-tabs>div::before{content:"";position:absolute;display:block;top:0;left:0;width:100%}.sd-inspector-tabs>div::after{border-bottom:1px solid #d6d9dd;height:100%;z-index:1}.sd-inspector-tabs>div:first-child.sd-active::after{border-left:0;box-shadow:inset 0 -3px 0 0 #0085ba;color:#0085ba}.sd-inspector-tabs>div:last-child.sd-active::after{border-right:0;box-shadow:inset 0 -3px 0 0 #0085ba;color:#0085ba}.sd-inspector-tabs>div.sd-active::after{border-left:1px solid #d6d9dd;border-right:1px solid #d6d9dd;border-bottom:0;box-shadow:inset 0 -3px 0 0 #0085ba;color:#0085ba}.sd-inspector-tabs>div.sd-active::before{height:0;background-color:rgba(0,0,0,0);z-index:2}.sd-inspector-tabs>div h5{margin:6px 0 0;font-size:13px;font-weight:400;line-height:1.2}.sd-inspector-tabs>div h5,.sd-inspector-tabs>div svg{z-index:2;fill:#585858}.sd-inspector-tabs>div.sd-active h5{color:#0085ba}.sd-inspector-tabs>div.sd-active path{fill:#0085ba}.sd-inspector-tabs>div:hover:not(.sd-active) h5{color:#1e1e1e}.sd-inspector-tabs>div:hover:not(.sd-active) path{fill:#1e1e1e}.sd-inspector-tabs>div:focus{outline:none;box-shadow:inset 0 0 0 2px #0085ba}.components-panel .components-panel__body .sd-inspector-tabs-container{position:static !important;border-top:0 !important;top:0 !important}.sd-inspector-tabs-container{position:sticky;top:-3px;z-index:9;border-top:calc(.1em + 1px) solid #f2f4f5;direction:initial}.block-editor-block-inspector .sd-inspector-tab{padding:16px}.block-editor-block-inspector .sd-inspector-tab .components-panel__body:first-child{margin-top:0;border-top:none !important}.block-editor-block-inspector .sd-inspector-tab:empty{padding:0}.block-editor-block-inspector .sd-inspector-tab:has(>[class*=sd-advance-panel-body]){padding:0}.edit-post-settings-sidebar__panel-block .sd-inspector-tab .components-panel__body:first-child{margin-top:0;border-top:none !important}',""]);const a=s},4180(e,t,n){"use strict";n.d(t,{A:()=>a});var o=n(1601),r=n.n(o),i=n(6314),s=n.n(i)()(r());s.push([e.id,".sd-multi-buttons-control{margin-bottom:16px}.sd-multi-buttons-control .sd-control-label{display:block;margin-bottom:8px;font-size:11px;font-weight:500;text-transform:uppercase;color:#1e1e1e}.sd-multi-buttons-control .sd-multi-button-button-group{display:flex;width:100%}.sd-multi-buttons-control .sd-multi-button-button-group .sd-multi-button{flex:1;justify-content:center;height:unset;min-height:30px;padding:6px;line-height:16px;font-size:13px;font-weight:400;border:none;border-radius:0;color:#50575e;background-color:#fff;box-shadow:inset 0 0 0 1px #e6e7e9}.sd-multi-buttons-control .sd-multi-button-button-group .sd-multi-button:first-child{border-radius:3px 0 0 3px}.sd-multi-buttons-control .sd-multi-button-button-group .sd-multi-button:last-child{border-radius:0 3px 3px 0}.sd-multi-buttons-control .sd-multi-button-button-group .sd-multi-button.is-primary,.sd-multi-buttons-control .sd-multi-button-button-group .sd-multi-button[aria-pressed=true]{color:#007cba;background-color:#dcf2ff;box-shadow:inset 0 0 0 1px #cde9f9;z-index:1}.sd-multi-buttons-control .sd-multi-button-button-group .sd-multi-button.is-primary:hover,.sd-multi-buttons-control .sd-multi-button-button-group .sd-multi-button[aria-pressed=true]:hover{color:#007cba;background-color:#dcf2ff;box-shadow:inset 0 0 0 1px #cde9f9}.sd-multi-buttons-control .sd-multi-button-button-group .sd-multi-button.is-primary:focus,.sd-multi-buttons-control .sd-multi-button-button-group .sd-multi-button[aria-pressed=true]:focus{box-shadow:inset 0 0 0 1px #cde9f9,0 0 0 1px #007cba}.sd-multi-buttons-control .sd-multi-button-button-group .sd-multi-button.is-secondary,.sd-multi-buttons-control .sd-multi-button-button-group .sd-multi-button[aria-pressed=false]{color:#50575e;background-color:#fff;box-shadow:inset 0 0 0 1px #e6e7e9}.sd-multi-buttons-control .sd-multi-button-button-group .sd-multi-button.is-secondary:hover,.sd-multi-buttons-control .sd-multi-button-button-group .sd-multi-button[aria-pressed=false]:hover{color:#1d2327;box-shadow:inset 0 0 0 1px #e6e7e9}.sd-multi-buttons-control .sd-multi-button-button-group .sd-multi-button.is-secondary:focus,.sd-multi-buttons-control .sd-multi-button-button-group .sd-multi-button[aria-pressed=false]:focus{box-shadow:inset 0 0 0 1px #e6e7e9}.sd-multi-buttons-control .sd-help-text{margin-top:8px;font-size:12px;font-style:italic;color:#a4afb7}.sd-multi-buttons-control.sd-multi-buttons__color-scheme--secondary .sd-multi-button-button-group .sd-multi-button.is-primary,.sd-multi-buttons-control.sd-multi-buttons__color-scheme--secondary .sd-multi-button-button-group .sd-multi-button[aria-pressed=true]{background-color:#1e1e1e;border-color:#1e1e1e}.sd-multi-buttons-control.sd-multi-buttons__layout--inline{display:flex;align-items:center;gap:12px}.sd-multi-buttons-control.sd-multi-buttons__layout--inline .sd-control-label{margin-bottom:0;flex-shrink:0}.sd-multi-buttons-control.sd-multi-buttons__layout--inline .sd-multi-button-button-group{flex:1}.sd-multi-buttons-control.sd-multi-buttons__layout--compact .sd-multi-button-button-group .sd-multi-button{flex:0 0 auto;padding:0 12px}.sd-multibutton-icons .sd-multi-button-button-group .sd-multi-button{padding:0 8px}.sd-multibutton-icons .sd-multi-button-button-group .sd-multi-button svg{width:18px;height:18px}",""]);const a=s},4676(e,t,n){"use strict";n.d(t,{A:()=>a});var o=n(1601),r=n.n(o),i=n(6314),s=n.n(i)()(r());s.push([e.id,".sd-range-control{margin-bottom:16px}.sd-range-control .sd-range-control__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.sd-range-control .sd-range-control__header .sd-control-label{font-size:11px;font-weight:500;text-transform:uppercase;color:#1e1e1e}.sd-range-control .sd-range-control__header .sd-range-control__reset{background:none;border:none;padding:4px;cursor:pointer;color:#757575;display:flex;align-items:center;justify-content:center;border-radius:2px;transition:all .15s ease}.sd-range-control .sd-range-control__header .sd-range-control__reset:hover{color:#1e1e1e;background:#f0f0f0}.sd-range-control .sd-range-control__header .sd-range-control__reset:focus{outline:none;box-shadow:0 0 0 2px #1293b6}.sd-range-control .sd-range-control__header .sd-range-control__reset svg{fill:currentColor}.sd-range-control .sd-range-control__controls{display:flex;align-items:center;gap:12px}.sd-range-control .sd-range-control__controls .components-range-control{flex:1;margin-bottom:0}.sd-range-control .sd-range-control__controls .components-range-control .components-range-control__wrapper{margin:0}.sd-range-control .sd-range-control__controls .components-range-control .components-range-control__slider{margin:0}.sd-range-control .sd-range-control__controls .components-range-control .components-range-control__root{margin-bottom:0}.sd-range-control .sd-range-control__controls .components-number-control{width:70px;flex-shrink:0}.sd-range-control .sd-range-control__controls .components-number-control input{height:32px;text-align:center}.sd-range-control .sd-help-text{margin-top:8px;font-size:12px;font-style:italic;color:#a4afb7}",""]);const a=s},9380(e,t,n){"use strict";n.d(t,{A:()=>a});var o=n(1601),r=n.n(o),i=n(6314),s=n.n(i)()(r());s.push([e.id,".sd-text-control{position:relative;margin-bottom:16px}.sd-text-control .components-base-control__field{margin-bottom:0}.sd-text-control .sd-control__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.sd-text-control .sd-control__header .sd-control-label{font-size:11px;font-weight:500;text-transform:uppercase;color:#1e1e1e;line-height:1.4}.sd-text-control .components-text-control__input,.sd-text-control .components-textarea-control__input{margin-left:0;margin-right:0;color:#50575e;border-color:#e6e7e9;border-radius:4px}.sd-text-control .components-text-control__input:focus,.sd-text-control .components-textarea-control__input:focus{border-color:#959595;box-shadow:none}.sd-text-control__controls{position:relative}.sd-text-control__controls .components-base-control__label{font-size:11px;font-weight:500;text-transform:uppercase;margin-bottom:8px}.sd-text-control__controls-inline .components-base-control__field{display:flex;align-items:center}.sd-text-control__controls-inline .components-base-control__field>label{flex:50%;margin-bottom:0}.sd-text-control__controls-inline .components-base-control__field>input{flex:50%}.sd-text-control__controls-textarea{position:relative}.sd-text-control__controls-textarea textarea{color:#50575e;border-color:#e6e7e9;min-height:80px;resize:vertical}.sd-text-control__controls-textarea textarea:focus{border-color:#959595;box-shadow:none}.sd-text-control .sd-help-text{margin-top:8px;font-size:12px;font-style:italic;color:#a4afb7}.sd-text-control--full-width .sd-text-control__controls .components-base-control__label{display:none}",""]);const a=s},6314(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,o,r,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),t.push(c))}},t}},1601(e){"use strict";e.exports=function(e){return e[1]}},4146(e,t,n){"use strict";var o=n(3404),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function d(e){return o.isMemo(e)?s:a[e.$$typeof]||r}a[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[o.Memo]=s;var l=Object.defineProperty,c=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(m){var r=h(n);r&&r!==m&&e(t,r,o)}var s=c(n);u&&(s=s.concat(u(n)));for(var a=d(t),f=d(n),g=0;g0?" ".concat(r.layer):""," {")),i+=r.css,s&&(i+="}"),r.media&&(i+="}"),r.supports&&(i+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,i);else{var a=document.createTextNode(i),d=e.childNodes;d[t]&&e.removeChild(d[t]),d.length?e.insertBefore(a,d[t]):e.appendChild(a)}}var r={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=r.singletonCounter++,n=r.singleton||(r.singleton=e.insertStyleElement(e));return{update:function(e){o(n,t,!1,e)},remove:function(e){o(n,t,!0,e)}}}},2779(e,t,n){"use strict";var o=n(1609);"function"==typeof Object.is&&Object.is,o.useSyncExternalStore,o.useRef,o.useEffect,o.useMemo,o.useDebugValue},8418(e,t,n){"use strict";n(2779)},1609(e){"use strict";e.exports=window.React},6942(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&o&&n;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>s[e]=()=>n[e]);return s.default=()=>n,r.d(i,s),i},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";const e=window.wp.compose,t=window.wp.hooks,n=window.wp.blockEditor,o=window.wp.components,i=window.wp.i18n,s=window.wp.blocks;var a=r(6942),d=r.n(a);const l=window.wp.element,c=window.wp.htmlEntities,u=window.ReactJSXRuntime;function p(e,t){return t||(window.suredonation_admin?.validationMessages?.[e]??"")}function h(e,t){const[n,o]=(0,l.useState)(()=>p(e,t));return(0,l.useEffect)(()=>{o(p(e,t))},[e,t]),{currentMessage:n,setCurrentMessage:o}}(0,i.__)("Pending","suredonation"),(0,i.__)("Processing","suredonation"),(0,i.__)("Completed","suredonation"),(0,i.__)("Failed","suredonation"),(0,i.__)("Refunded","suredonation"),(0,i.__)("Partially Refunded","suredonation"),(0,i.__)("Cancelled","suredonation"),(0,i.__)("One Time","suredonation"),(0,i.__)("Recurring","suredonation"),(0,i.__)("Renewal","suredonation");const m=e=>e.includes("|");function f(e){return"string"==typeof e?(0,c.decodeEntities)(e):e}function g(){return Math.random().toString(36).substring(2,9)}const b=({help:e,setAttributes:t,block_id:o})=>""!==e?(0,u.jsx)(n.RichText,{tagName:"label",value:e,onChange:e=>{t({help:f(e)})},className:"sd-help",multiline:!1,id:o,allowedFormats:[]}):null,v=window.wp.data;var $=r(5072),y=r.n($),x=r(4284),w=r.n(x),C=r(7659),S=r.n(C),_=r(4868),E=r.n(_),I=r(540),A=r.n(I),P=r(6359),k={};P.A&&P.A.locals&&(k.locals=P.A.locals);var T,N=0,D={attributes:{id:"suredonation-editor-styles"}};D.setAttributes=E(),D.insert=S().bind(null,"head"),D.domAPI=w(),D.insertStyleElement=A(),k.use=function(e){return D.options=e||{},N++||(T=y()(P.A,D)),k},k.unuse=function(){N>0&&! --N&&(T(),T=null)};const M=k,R="general",j="style",O="advance",L=e=>{(0,l.useLayoutEffect)(()=>(M?.use(),()=>{M?.unuse()}),[]);const t=((e=null)=>{try{const t=window.localStorage;if(e){const n=t.getItem("sdEditorState");return n?JSON.parse(n)?.[e]:null}return t}catch(e){return null}})("sdSettingState"),{defaultTab:n="general",children:o,tabs:r=["general","style","advance"],stateKey:s=null}=e,a=!!s,c=()=>s||(0,v.select)("core/block-editor").getSelectedBlock()?.name,[p,h]=(0,l.useState)(n||r[0]),m=(0,l.useRef)();let f;(0,l.useEffect)(()=>{f=m.current?.closest(".components-panel")});const g=()=>{if(a)return;const e=document.querySelector(".sd-inspector-tabs-container"),t=document.querySelector(".sd-tab-content-general"),n=document.querySelector(".sd-tab-content-style"),o=document.querySelector(".sd-tab-content-advance");if(e){const r=e.parentElement;r&&r.prepend(e,t||"",n||"",o||"")}};(0,l.useEffect)(()=>{if(g(),a)return;const e=c();return t&&t[e]&&p!==t[e]?.selectedTab?(h("general"),f&&f.setAttribute("data-sd-tab","general")):f&&f.setAttribute("data-sd-tab","general"),()=>{if(f){const e=f.querySelector(".sd-inspector-tabs-container");e&&null!==e||f.removeAttribute("data-sd-tab")}}},[]);const b=e=>{g(),h(e),!a&&f&&f.setAttribute("data-sd-tab",e);const n=c();(e=>{try{window.localStorage.setItem("sdEditorState",JSON.stringify(e))}catch(e){}})({sdSettingState:{...t,[n]:{selectedTab:e}}})};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"sd-inspector-tabs-container",children:(0,u.jsxs)("div",{ref:m,className:d()("sd-inspector-tabs","sd-inspector-tabs-count-"+r.length,p),children:[r.indexOf(R)>-1&&(0,u.jsxs)("div",{className:d()({"sd-active":p===R}),onClick:()=>b(R),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||b(R)},role:"tab",tabIndex:0,"aria-selected":p===R,children:[(0,u.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"15",children:(0,u.jsx)("path",{fillRule:"nonzero",d:"M14.346 0H1.654C1.017 0 .5.517.5 1.154v12.692C.5 14.483 1.017 15 1.654 15h12.692c.637 0 1.154-.517 1.154-1.154V1.154C15.5.517 14.983 0 14.346 0zm-5.77 13.846v-5.77h5.77v5.77h-5.77z"})}),(0,u.jsx)("h5",{children:(0,i.__)("General","suredonation")})]}),r.indexOf(j)>-1&&(0,u.jsxs)("div",{className:d()({"sd-active":p===j}),onClick:()=>b(j),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||b(j)},role:"tab",tabIndex:0,"aria-selected":p===j,children:[(0,u.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"21",children:(0,u.jsx)("g",{fillRule:"nonzero",children:(0,u.jsx)("path",{d:"M15.12 12.091a.814.814 0 00-.68-.378.814.814 0 00-.68.378c-.531.863-2.252 3.807-2.252 5.09 0 1.598 1.317 2.901 2.932 2.901s2.933-1.303 2.933-2.902c0-1.303-1.722-4.226-2.253-5.089zm-1.041 3.828c-.043.063-.744 1.198-.213 1.976a.52.52 0 01.064.358.409.409 0 01-.191.294.608.608 0 01-.255.084.476.476 0 01-.383-.21c-.871-1.283.149-2.902.192-2.986a.517.517 0 01.297-.21.534.534 0 01.361.063c.192.126.255.42.128.63zM13.314 10.388l1.36-.147c.446-.042.807-.337.935-.736.127-.4.042-.862-.276-1.157L7.258.294c-.255-.252-.68-.252-.957 0a.68.68 0 000 .947l.34.336-5.1 5.047C.82 7.339.5 8.348.67 9.379c.128.652.489 1.24.956 1.703l3.082 3.05c.467.462 1.062.82 1.72.946a3.134 3.134 0 002.785-.863l3.612-3.575a.74.74 0 01.489-.252zM7.576 2.502l5.759 5.7H2.073c.085-.232.212-.463.403-.653l5.1-5.047z"})})}),(0,u.jsx)("h5",{children:(0,i.__)("Style","suredonation")})]}),r.indexOf(O)>-1&&(0,u.jsxs)("div",{className:d()({"sd-active":p===O}),onClick:()=>b(O),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||b(O)},role:"tab",tabIndex:0,"aria-selected":p===O,children:[(0,u.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",children:(0,u.jsx)("path",{fillRule:"nonzero",d:"M15.666 6.325c-.277-.05-.572-.082-.85-.115a6.385 6.385 0 00-.571-1.389c.18-.229.343-.457.523-.686a.994.994 0 00-.098-1.291l-.997-.997a.994.994 0 00-1.291-.098c-.23.163-.458.343-.687.523a6.954 6.954 0 00-1.39-.589c-.032-.277-.08-.572-.113-.85A.987.987 0 009.21 0H7.805a1 1 0 00-.98.834c-.05.277-.082.572-.115.85-.474.13-.947.326-1.389.571-.229-.18-.457-.343-.686-.523a.994.994 0 00-1.291.098l-.997.997a.994.994 0 00-.098 1.291c.163.23.343.458.523.687a6.954 6.954 0 00-.589 1.39c-.277.032-.572.08-.85.113A.987.987 0 00.5 7.29v1.406a1 1 0 00.834.98c.277.05.572.082.85.115.13.474.326.947.571 1.389-.18.229-.343.457-.523.686a.994.994 0 00.098 1.291l.997.997a.994.994 0 001.291.098c.23-.163.458-.343.687-.523.441.245.899.442 1.39.589.032.294.08.572.113.85.066.473.49.833.981.833h1.406a1 1 0 00.98-.834c.05-.277.082-.572.115-.85.474-.13.947-.326 1.389-.571.229.18.457.343.686.523a.994.994 0 001.291-.098l.997-.997a.994.994 0 00.098-1.291 19.095 19.095 0 00-.523-.687c.245-.441.442-.899.589-1.39.277-.032.572-.08.85-.113a.987.987 0 00.833-.981V7.305a1 1 0 00-.834-.98zM8.492 11.57a3.571 3.571 0 01-3.563-3.563 3.571 3.571 0 013.563-3.563 3.571 3.571 0 013.563 3.563 3.571 3.571 0 01-3.563 3.563z"})}),(0,u.jsx)("h5",{children:(0,i.__)("Advanced","suredonation")})]})]})}),l.Children.map(o,(e,t)=>{if(!e)return e;if(!e.key)throw new Error("props.key not found in , you must use `key` prop");return(0,l.cloneElement)(e,{index:t,isActive:e.key===p})})]})},B=({children:e,isActive:t,type:n})=>(0,u.jsx)("div",{style:{display:t?"block":"none"},className:`sd-inspector-tab sd-tab-content-${n}`,children:Array.isArray(e)?e.map(e=>e):e}),F={key:"general",type:"general"},V={key:"advance",type:"advance"},U=(0,l.memo)(e=>{const{children:t,initialOpen:n=!0}=e,r=(0,l.useRef)(null),{getSelectedBlock:i}=(0,v.select)("core/block-editor"),s=i()?.name,a=((e=null)=>{try{const t=window.localStorage;if(e){const n=t.getItem("sdEditorState");return n?JSON.parse(n)?.[e]:null}return t}catch(e){return null}})("sdSettingState"),d=e?.title?e.title.toLowerCase().replace(/[^a-zA-Z ]/g,"").replace(/\s+/g,"-"):"",[c,p]=(0,l.useState)(()=>{const e=`${s}-${d}`,t=a?.panels?.[e];return void 0!==t?t:n});return(0,u.jsx)(o.PanelBody,{...e,initialOpen:c,onToggle:()=>{const e=!c;p(e);let t="general";r?.current?.parentElement?.classList.contains("sd-tab-content-general")?t="general":r?.current?.parentElement?.classList.contains("sd-tab-content-style")?t="style":r?.current?.parentElement?.classList.contains("sd-tab-content-advance")&&(t="advance");const n=`${s}-${d}`,o={...a,[s]:{...a?.[s],selectedPanel:`sd-advance-panel-body-${d}`,selectedTab:t},panels:{...a?.panels,[n]:e}};try{const e=JSON.parse(window.localStorage.getItem("sdEditorState")||"{}");window.localStorage.setItem("sdEditorState",JSON.stringify({...e,sdSettingState:o}))}catch(e){}},ref:r,className:`sd-advance-panel-body-${d}`,children:t})});var z=r(4180),G={};z.A&&z.A.locals&&(G.locals=z.A.locals);var H,W=0,K={attributes:{id:"suredonation-editor-styles"}};K.setAttributes=E(),K.insert=S().bind(null,"head"),K.domAPI=w(),K.insertStyleElement=A(),G.use=function(e){return K.options=e||{},W++||(H=y()(z.A,K)),G},G.unuse=function(){W>0&&! --W&&(H(),H=null)};const q=G,Y=e=>{(0,l.useLayoutEffect)(()=>(q?.use(),()=>{q?.unuse()}),[]);const{label:t,options:n,value:r,onChange:s,showIcons:a=!1,colorVariant:d="primary",layoutVariant:c="full",help:p=""}=e,[h,m]=(0,l.useState)(!0),f=a?"sd-multibutton-icons":"";return n?(0,u.jsx)("div",{className:"components-base-control",children:(0,u.jsxs)("div",{className:`sd-multi-buttons-control ${f} sd-multi-buttons__color-scheme--${d} sd-multi-buttons__layout--${c}`,children:[t&&(0,u.jsx)("div",{className:"sd-multi-buttons-control__label sd-control-label",children:t}),(0,u.jsx)(o.ButtonGroup,{className:"sd-multi-button-button-group","aria-label":t,children:n.map(e=>(0,u.jsx)(o.Button,{className:"sd-multi-button",variant:r===e.value&&h?"primary":"secondary","aria-pressed":r===e.value,onClick:()=>{return t=e.value,m(!0),void(s&&s(t));var t},"aria-label":e.tooltip||e.label,label:e.tooltip,showTooltip:!!e.tooltip,children:a&&e.icon?e.icon:e.label},`option-${e.value}`))}),p&&(0,u.jsx)("p",{className:"sd-help-text",children:p})]})}):(0,i.__)("Please add an options prop to MultiButtonsControl","suredonation")};var Z=r(4676),X={};Z.A&&Z.A.locals&&(X.locals=Z.A.locals);var J,Q=0,ee={attributes:{id:"suredonation-editor-styles"}};ee.setAttributes=E(),ee.insert=S().bind(null,"head"),ee.domAPI=w(),ee.insertStyleElement=A(),X.use=function(e){return ee.options=e||{},Q++||(J=y()(Z.A,ee)),X},X.unuse=function(){Q>0&&! --Q&&(J(),J=null)};const te=X,ne=!!o.__experimentalNumberControl,oe=e=>{(0,l.useLayoutEffect)(()=>(te?.use(),()=>{te?.unuse()}),[]);const{label:t,value:n,onChange:r,min:s=0,max:a=100,step:d=1,help:c="",withInputField:p=!0,allowReset:h=!0,resetValue:m="",disabled:f=!1}=e,g=isNaN(n)?"":n,b=e=>{const t=parseFloat(e);r&&r(isNaN(t)?"":t)};return(0,u.jsx)("div",{className:"components-base-control",children:(0,u.jsxs)("div",{className:"sd-range-control",children:[(0,u.jsxs)("div",{className:"sd-range-control__header",children:[t&&(0,u.jsx)("label",{className:"sd-control-label",children:t}),h&&n!==m&&(0,u.jsx)("button",{type:"button",className:"sd-range-control__reset",onClick:()=>{r&&r(m)},"aria-label":(0,i.__)("Reset","suredonation"),children:(0,u.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,u.jsx)("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"})})})]}),(0,u.jsxs)("div",{className:"sd-range-control__controls",children:[(0,u.jsx)(o.RangeControl,{value:g,onChange:b,withInputField:!1,allowReset:!1,max:a,min:s,step:d,initialPosition:g||s,disabled:f}),p&&ne&&(0,u.jsx)(o.__experimentalNumberControl,{disabled:f,max:a,min:s,onChange:b,value:g,step:d})]}),c&&(0,u.jsx)("p",{className:"sd-help-text",children:c})]})})};var re=r(9380),ie={};re.A&&re.A.locals&&(ie.locals=re.A.locals);var se,ae=0,de={attributes:{id:"suredonation-editor-styles"}};de.setAttributes=E(),de.insert=S().bind(null,"head"),de.domAPI=w(),de.insertStyleElement=A(),ie.use=function(e){return de.options=e||{},ae++||(se=y()(re.A,de)),ie},ie.unuse=function(){ae>0&&! --ae&&(se(),se=null)};const le=ie,ce=e=>{const[t,n]=(0,l.useState)(e?.value);(0,l.useLayoutEffect)(()=>(le?.use(),()=>{le?.unuse()}),[]),(0,l.useEffect)(()=>{n(e?.value)},[e?.value]);const{label:r,value:i,onChange:s,variant:a="full-width",type:c="text",placeholder:p="",help:h="",disabled:m=!1,autoComplete:f="off",className:g="",showHeaderControls:b=!0,data:v,setAttributes:$}=e,y=e=>{n(e),v?.label&&$&&$({[v.label]:e}),s&&s(e)},x=()=>(0,u.jsx)("div",{className:"sd-control__header",children:(0,u.jsx)("label",{className:"sd-control-label",children:r})});return(0,u.jsx)("div",{className:"components-base-control",children:(0,u.jsxs)("div",{className:d()("sd-text-control",`sd-text-control--${a}`,g),children:["inline"!==a&&b&&r&&(0,u.jsx)(x,{}),(0,u.jsxs)("div",{className:d()("sd-text-control__controls",`sd-text-control__controls-${a}`),children:["textarea"!==a&&(0,u.jsx)(o.TextControl,{label:("inline"===a||"inline"!==a&&!b)&&r,type:c,value:t,onChange:y,disabled:m,autoComplete:f,placeholder:p}),"textarea"===a&&(0,u.jsx)(o.TextareaControl,{label:!b&&r,value:t,onChange:y,autoComplete:f,placeholder:p})]}),h&&(0,u.jsx)("p",{className:"sd-help-text",children:h})]})})},ue=()=>(0,u.jsx)("hr",{style:{margin:"16px -16px",borderTop:"1px solid #e0e0e0"}}),pe=JSON.parse('{"UU":"suredonation/input"}');var he=r(1609),me=r.t(he,2),fe=r.n(he),ge={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},be=fe().createContext&&fe().createContext(ge),ve=function(){return ve=Object.assign||function(e){for(var t,n=1,o=arguments.length;n{const{block_id:r,label:s,placeholder:a,help:d,required:c,errorMsg:p,defaultValue:m,maxLength:$,inputMask:y,customInputMask:x,fieldWidth:w}=e,{currentMessage:C,setCurrentMessage:S}=h("suredonation_input_block_required_text",p),_=(0,n.useBlockProps)({className:`sd-block sd-input-block sd-block-width-${w}`}),E=(0,v.useSelect)(e=>e("core/editor")?.getCurrentPostId()||0,[]);return(0,l.useEffect)(()=>{r||t({block_id:g()})},[r,t]),(0,l.useEffect)(()=>{E&&e.formId!==E&&t({formId:E})},[E,e.formId,t]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsxs)(L,{tabs:["general","advance"],children:[(0,u.jsxs)(B,{...F,children:[(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Required","suredonation"),checked:c,onChange:e=>t({required:e})}),c&&(0,u.jsx)(ce,{label:(0,i.__)("Error Message","suredonation"),value:C,onChange:e=>{S(e),t({errorMsg:e})}}),(0,u.jsx)(ce,{label:(0,i.__)("Placeholder","suredonation"),value:a,onChange:e=>t({placeholder:e})}),(0,u.jsx)(ce,{label:(0,i.__)("Help Text","suredonation"),variant:"textarea",value:d,onChange:e=>t({help:e})}),(0,u.jsx)(ce,{label:(0,i.__)("Default Value","suredonation"),value:m,onChange:e=>t({defaultValue:e})}),(0,u.jsx)(ue,{}),(0,u.jsx)(o.SelectControl,{__next40pxDefaultSize:!0,label:(0,i.__)("Input Pattern","suredonation"),value:y,options:[{label:(0,i.__)("None","suredonation"),value:"none"},{label:"(###) ###-####",value:"(###) ###-####"},{label:"(##) ####-####",value:"(##) ####-####"},{label:"09/05/2026",value:"dd/mm/yyyy"},{label:"23:59:59",value:"hh:mm:ss"},{label:"09/05/2026 23:59:59",value:"dd/mm/yyyy hh:mm:ss"},{label:(0,i.__)("Custom","suredonation"),value:"custom-mask"}],onChange:e=>t({inputMask:e})}),"custom-mask"===y&&(0,u.jsx)(ce,{label:(0,i.__)("Custom Mask","suredonation"),value:x,onChange:e=>t({customInputMask:e}),help:(0,i.__)('Use 9 for a digit, a for a letter, * for alphanumeric. Prefix with "date:" for a date format (e.g. date: dd/mm/yyyy) or "alias:" for an Inputmask alias (e.g. alias: email).',"suredonation")}),(0,u.jsx)(oe,{label:(0,i.__)("Maximum Characters","suredonation"),value:$,onChange:e=>t({maxLength:e}),min:1,max:1e3})]}),(0,u.jsx)(B,{...V})]})}),(0,u.jsx)("div",{..._,children:(0,u.jsxs)("div",{className:"sd-block-preview",children:[(0,u.jsx)(n.RichText,{tagName:"label",value:s,onChange:e=>t({label:f(e)}),className:"sd-label"+(c?" sd-required":""),multiline:!1,allowedFormats:[],placeholder:(0,i.__)("Label","suredonation")}),(0,u.jsx)(b,{help:d,setAttributes:t,block_id:r}),(0,u.jsx)("div",{className:"sd-block-wrap",children:(0,u.jsx)("input",{type:"text",className:"sd-input-common sd-input-input",placeholder:a,defaultValue:m,disabled:!0})}),(0,u.jsx)("div",{className:"sd-error-wrap"})]})})]})},save:()=>null});const Ee=JSON.parse('{"UU":"suredonation/email"}');(0,s.registerBlockType)(Ee.UU,{icon:function(e){return ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 4.99L4 6h16zm0 12H4V8l8 5 8-5v10z"}}]})(e)},edit:({attributes:e,setAttributes:t})=>{const{block_id:r,label:s,placeholder:a,help:d,required:c,errorMsg:p,invalidEmailMsg:m,defaultValue:$,fieldWidth:y}=e,{currentMessage:x,setCurrentMessage:w}=h("suredonation_email_block_required_text",p),{currentMessage:C,setCurrentMessage:S}=h("suredonation_valid_email",m),_=(0,n.useBlockProps)({className:`sd-block sd-email-block sd-block-width-${y}`}),E=(0,v.useSelect)(e=>e("core/editor")?.getCurrentPostId()||0,[]);return(0,l.useEffect)(()=>{r||t({block_id:g()})},[r,t]),(0,l.useEffect)(()=>{E&&e.formId!==E&&t({formId:E})},[E,e.formId,t]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsxs)(L,{tabs:["general","advance"],children:[(0,u.jsxs)(B,{...F,children:[(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Required","suredonation"),checked:c,onChange:e=>t({required:e})}),c&&(0,u.jsx)(ce,{label:(0,i.__)("Error Message","suredonation"),value:x,onChange:e=>{w(e),t({errorMsg:e})}}),(0,u.jsx)(ce,{label:(0,i.__)("Placeholder","suredonation"),value:a,onChange:e=>t({placeholder:e})}),(0,u.jsx)(ce,{label:(0,i.__)("Help Text","suredonation"),variant:"textarea",value:d,onChange:e=>t({help:e})}),(0,u.jsx)(ce,{label:(0,i.__)("Default Value","suredonation"),value:$,onChange:e=>t({defaultValue:e})}),(0,u.jsx)(ce,{label:(0,i.__)("Invalid Email Message","suredonation"),value:C,onChange:e=>{S(e),t({invalidEmailMsg:e})}})]}),(0,u.jsx)(B,{...V})]})}),(0,u.jsx)("div",{..._,children:(0,u.jsxs)("div",{className:"sd-block-preview",children:[(0,u.jsx)(n.RichText,{tagName:"label",value:s,onChange:e=>t({label:f(e)}),className:"sd-label"+(c?" sd-required":""),multiline:!1,allowedFormats:[],placeholder:(0,i.__)("Label","suredonation")}),(0,u.jsx)(b,{help:d,setAttributes:t,block_id:r}),(0,u.jsx)("div",{className:"sd-block-wrap",children:(0,u.jsx)("input",{type:"email",className:"sd-input-common sd-input-email",placeholder:a,defaultValue:$,disabled:!0})}),(0,u.jsx)("div",{className:"sd-error-wrap"})]})})]})},save:()=>null});const Ie=JSON.parse('{"UU":"suredonation/number"}');(0,s.registerBlockType)(Ie.UU,{icon:function(e){return ye({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M2.873 11.297V4.142H1.699L0 5.379v1.137l1.64-1.18h.06v5.961h1.174Zm3.213-5.09v-.063c0-.618.44-1.169 1.196-1.169.676 0 1.174.44 1.174 1.106 0 .624-.42 1.101-.807 1.526L4.99 10.553v.744h4.78v-.99H6.643v-.069L8.41 8.252c.65-.724 1.237-1.332 1.237-2.27C9.646 4.849 8.723 4 7.308 4c-1.573 0-2.36 1.064-2.36 2.15v.057h1.138Zm6.559 1.883h.786c.823 0 1.374.481 1.379 1.179.01.707-.55 1.216-1.421 1.21-.77-.005-1.326-.419-1.379-.953h-1.095c.042 1.053.938 1.918 2.464 1.918 1.478 0 2.642-.839 2.62-2.144-.02-1.143-.922-1.651-1.551-1.714v-.063c.535-.09 1.347-.66 1.326-1.678-.026-1.053-.933-1.855-2.359-1.845-1.5.005-2.317.88-2.348 1.898h1.116c.032-.498.498-.944 1.206-.944.703 0 1.206.435 1.206 1.07.005.64-.504 1.106-1.2 1.106h-.75v.96Z"}}]})(e)},edit:({attributes:e,setAttributes:t})=>{const{block_id:r,label:s,placeholder:a,help:d,required:c,errorMsg:p,defaultValue:m,fieldWidth:$,minValue:y,maxValue:x,step:w,showCurrency:C}=e,{currentMessage:S,setCurrentMessage:_}=h("suredonation_number_block_required_text",p),[E]=(0,l.useState)(window.suredonationFormEditor?.currencySymbol||"$"),I=(0,n.useBlockProps)({className:`sd-block sd-number-block sd-block-width-${$}`}),A=(0,v.useSelect)(e=>e("core/editor")?.getCurrentPostId()||0,[]);return(0,l.useEffect)(()=>{r||t({block_id:g()})},[r,t]),(0,l.useEffect)(()=>{A&&e.formId!==A&&t({formId:A})},[A,e.formId,t]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsxs)(L,{tabs:["general","advance"],children:[(0,u.jsxs)(B,{...F,children:[(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Required","suredonation"),checked:c,onChange:e=>t({required:e})}),c&&(0,u.jsx)(ce,{label:(0,i.__)("Error Message","suredonation"),value:S,onChange:e=>{_(e),t({errorMsg:e})}}),(0,u.jsx)(ce,{label:(0,i.__)("Placeholder","suredonation"),value:a,onChange:e=>t({placeholder:e})}),(0,u.jsx)(ce,{label:(0,i.__)("Help Text","suredonation"),variant:"textarea",value:d,onChange:e=>t({help:e})}),(0,u.jsx)(ce,{label:(0,i.__)("Default Value","suredonation"),value:m,onChange:e=>t({defaultValue:e})}),(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Show Currency Symbol","suredonation"),checked:C,onChange:e=>t({showCurrency:e})}),(0,u.jsx)(o.__experimentalNumberControl,{label:(0,i.__)("Minimum Value","suredonation"),value:y,onChange:e=>t({minValue:parseInt(e,10)||1}),min:0}),(0,u.jsx)(o.__experimentalNumberControl,{label:(0,i.__)("Maximum Value","suredonation"),value:x,onChange:e=>t({maxValue:parseInt(e,10)||0}),min:0,help:(0,i.__)("Set to 0 for no maximum limit.","suredonation")}),(0,u.jsx)(o.__experimentalNumberControl,{label:(0,i.__)("Step","suredonation"),value:w,onChange:e=>t({step:parseFloat(e)||1}),min:.01,step:.01})]}),(0,u.jsx)(B,{...V})]})}),(0,u.jsx)("div",{...I,children:(0,u.jsxs)("div",{className:"sd-block-preview",children:[(0,u.jsx)(n.RichText,{tagName:"label",value:s,onChange:e=>t({label:f(e)}),className:"sd-label"+(c?" sd-required":""),multiline:!1,allowedFormats:[],placeholder:(0,i.__)("Label","suredonation")}),(0,u.jsx)(b,{help:d,setAttributes:t,block_id:r}),(0,u.jsxs)("div",{className:"sd-block-wrap sd-number-wrap"+(C?" sd-has-currency":""),children:[C&&(0,u.jsx)("span",{className:"sd-currency-symbol",children:E}),(0,u.jsx)("input",{type:"number",className:"sd-input-common sd-input-number",placeholder:a,defaultValue:m,disabled:!0})]}),(0,u.jsx)("div",{className:"sd-error-wrap"})]})})]})},save:()=>null});const Ae=JSON.parse('{"UU":"suredonation/checkbox"}'),Pe=(0,u.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor",children:(0,u.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})});(0,s.registerBlockType)(Ae.UU,{icon:Pe,edit:({attributes:e,setAttributes:t})=>{const{block_id:r,label:s,help:a,required:d,errorMsg:c,checked:p,fieldWidth:h}=e,m=(0,n.useBlockProps)({className:`sd-block sd-checkbox-block sd-block-width-${h}`}),b=(0,v.useSelect)(e=>e("core/editor")?.getCurrentPostId()||0,[]);return(0,l.useEffect)(()=>{r||t({block_id:g()})},[r,t]),(0,l.useEffect)(()=>{b&&e.formId!==b&&t({formId:b})},[b,e.formId,t]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsxs)(L,{tabs:["general","advance"],children:[(0,u.jsxs)(B,{...F,children:[(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Required","suredonation"),checked:d,onChange:e=>t({required:e})}),d&&(0,u.jsx)(ce,{label:(0,i.__)("Error Message","suredonation"),value:c,onChange:e=>t({errorMsg:e})}),(0,u.jsx)(ce,{label:(0,i.__)("Help Text","suredonation"),value:a,onChange:e=>t({help:e})}),(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Checked by Default","suredonation"),checked:p,onChange:e=>t({checked:e})})]}),(0,u.jsx)(B,{...V})]})}),(0,u.jsx)("div",{...m,children:(0,u.jsxs)("div",{className:"sd-block-preview",children:[(0,u.jsx)("div",{className:"sd-block-wrap sd-checkbox-wrap",children:(0,u.jsxs)("label",{className:"sd-checkbox-label",children:[(0,u.jsx)("input",{type:"checkbox",className:"sd-input-checkbox",checked:p,onChange:()=>t({checked:!p})}),(0,u.jsxs)("span",{className:"sd-checkbox-text",children:[(0,u.jsx)(n.RichText,{tagName:"span",value:s,onChange:e=>t({label:f(e)}),allowedFormats:["core/link"],multiline:!1,placeholder:(0,i.__)("Label","suredonation")}),d&&(0,u.jsx)("span",{className:"sd-required","aria-hidden":"true",children:"*"})]})]})}),a&&(0,u.jsx)("p",{className:"sd-help",children:a}),(0,u.jsx)("div",{className:"sd-error-wrap"})]})})]})},save:()=>null});const ke=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),Te=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Ne={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const De=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},Me=(0,he.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:r="",children:i,iconNode:s,...a},d)=>(0,he.createElement)("svg",{ref:d,...Ne,width:t,height:t,stroke:e,strokeWidth:o?24*Number(n)/Number(t):n,className:ke("lucide",r),...!i&&!De(a)&&{"aria-hidden":"true"},...a},[...s.map(([e,t])=>(0,he.createElement)(e,t)),...Array.isArray(i)?i:[i]])),Re=(e,t)=>{const n=(0,he.forwardRef)(({className:n,...o},r)=>{return(0,he.createElement)(Me,{ref:r,iconNode:t,className:ke(`lucide-${i=Te(e),i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...o});var i});return n.displayName=Te(e),n},je=Re("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),Oe=window.ReactDOM;var Le=r.n(Oe);function Be(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Fe=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),Ve=()=>Math.random().toString(36).substring(7).split("").join("."),Ue={INIT:`@@redux/INIT${Ve()}`,REPLACE:`@@redux/REPLACE${Ve()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ve()}`};function ze(e,t,n){if("function"!=typeof e)throw new Error(Be(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Be(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Be(1));return n(ze)(e,t)}let o=e,r=t,i=new Map,s=i,a=0,d=!1;function l(){s===i&&(s=new Map,i.forEach((e,t)=>{s.set(t,e)}))}function c(){if(d)throw new Error(Be(3));return r}function u(e){if("function"!=typeof e)throw new Error(Be(4));if(d)throw new Error(Be(5));let t=!0;l();const n=a++;return s.set(n,e),function(){if(t){if(d)throw new Error(Be(6));t=!1,l(),s.delete(n),i=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw new Error(Be(7));if(void 0===e.type)throw new Error(Be(8));if("string"!=typeof e.type)throw new Error(Be(17));if(d)throw new Error(Be(9));try{d=!0,r=o(r,e)}finally{d=!1}return(i=s).forEach(e=>{e()}),e}return p({type:Ue.INIT}),{dispatch:p,subscribe:u,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Be(10));o=e,p({type:Ue.REPLACE})},[Fe]:function(){const e=u;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Be(11));function n(){const e=t;e.next&&e.next(c())}return n(),{unsubscribe:e(n)}},[Fe](){return this}}}}}function Ge(e,t){return function(...n){return t(e.apply(this,n))}}function He(e,t){if("function"==typeof e)return Ge(e,t);if("object"!=typeof e||null===e)throw new Error(Be(16));const n={};for(const o in e){const r=e[o];"function"==typeof r&&(n[o]=Ge(r,t))}return n}function We(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}r(8418);var Ke=he.version.startsWith("19"),qe=Symbol.for(Ke?"react.transitional.element":"react.element"),Ye=Symbol.for("react.portal"),Ze=Symbol.for("react.fragment"),Xe=Symbol.for("react.strict_mode"),Je=Symbol.for("react.profiler"),Qe=Symbol.for("react.consumer"),et=Symbol.for("react.context"),tt=Symbol.for("react.forward_ref"),nt=Symbol.for("react.suspense"),ot=Symbol.for("react.suspense_list"),rt=Symbol.for("react.memo"),it=Symbol.for("react.lazy"),st=tt,at=rt;function dt(e,t,n,o,{areStatesEqual:r,areOwnPropsEqual:i,areStatePropsEqual:s}){let a,d,l,c,u,p=!1;return function(h,m){return p?function(p,h){const m=!i(h,d),f=!r(p,a,h,d);return a=p,d=h,m&&f?(l=e(a,d),t.dependsOnOwnProps&&(c=t(o,d)),u=n(l,c,d),u):m?(e.dependsOnOwnProps&&(l=e(a,d)),t.dependsOnOwnProps&&(c=t(o,d)),u=n(l,c,d),u):f?function(){const t=e(a,d),o=!s(t,l);return l=t,o&&(u=n(l,c,d)),u}():u}(h,m):(a=h,d=m,l=e(a,d),c=t(o,d),u=n(l,c,d),p=!0,u)}}function lt(e){return function(t){const n=e(t);function o(){return n}return o.dependsOnOwnProps=!1,o}}function ct(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function ut(e,t){return function(t,{displayName:n}){const o=function(e,t){return o.dependsOnOwnProps?o.mapToProps(e,t):o.mapToProps(e,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(t,n){o.mapToProps=e,o.dependsOnOwnProps=ct(e);let r=o(t,n);return"function"==typeof r&&(o.mapToProps=r,o.dependsOnOwnProps=ct(r),r=o(t,n)),r},o}}function pt(e,t){return(n,o)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${o.wrappedComponentName}.`)}}function ht(e,t,n){return{...n,...e,...t}}var mt={notify(){},get:()=>[]};function ft(e,t){let n,o=mt,r=0,i=!1;function s(){l.onStateChange&&l.onStateChange()}function a(){r++,n||(n=t?t.addNestedSub(s):e.subscribe(s),o=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){(()=>{let t=e;for(;t;)t.callback(),t=t.next})()},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let o=!0;const r=t={callback:n,next:null,prev:t};return r.prev?r.prev.next=r:e=r,function(){o&&null!==e&&(o=!1,r.next?r.next.prev=r.prev:t=r.prev,r.prev?r.prev.next=r.next:e=r.next)}}}}())}function d(){r--,n&&0===r&&(n(),n=void 0,o.clear(),o=mt)}const l={addNestedSub:function(e){a();const t=o.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),d())}},notifyNestedSubs:function(){o.notify()},handleChangeWrapper:s,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,a())},tryUnsubscribe:function(){i&&(i=!1,d())},getListeners:()=>o};return l}var gt=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),bt=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),vt=(()=>gt||bt?he.useLayoutEffect:he.useEffect)();function $t(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function yt(e,t){if($t(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(let o=0;o({}))}(e),p=function(e){return e&&"object"==typeof e?lt(t=>function(e,t){const n={};for(const o in e){const r=e[o];"function"==typeof r&&(n[o]=(...e)=>t(r(...e)))}return n}(e,t)):e?"function"==typeof e?ut(e):pt(e,"mapDispatchToProps"):lt(e=>({dispatch:e}))}(t),h=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:o}){let r,i=!1;return function(t,n,s){const a=e(t,n,s);return i?o(a,r)||(r=a):(i=!0,r=a),r}}}(e):pt(e,"mergeProps"):()=>ht}(n),m=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,o={shouldHandleStateChanges:m,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:u,initMapDispatchToProps:p,initMergeProps:h,areStatesEqual:r,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function l(t){const[n,r,i]=he.useMemo(()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]},[t]),s=he.useMemo(()=>c,[n,c]),a=he.useContext(s),d=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),l=Boolean(a)&&Boolean(a.store),u=d?t.store:a.store,p=l?a.getServerState:u.getState,h=he.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:o,...r}){return dt(t(e,r),n(e,r),o(e,r),e,r)}(u.dispatch,o),[u]),[f,g]=he.useMemo(()=>{if(!m)return Ot;const e=ft(u,d?void 0:a.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[u,d,a]),b=he.useMemo(()=>d?a:{...a,subscription:f},[d,a,f]),v=he.useRef(void 0),$=he.useRef(i),y=he.useRef(void 0),x=he.useRef(!1),w=he.useRef(!1),C=he.useRef(void 0);vt(()=>(w.current=!0,()=>{w.current=!1}),[]);const S=he.useMemo(()=>()=>y.current&&i===$.current?y.current:h(u.getState(),i),[u,i]),_=he.useMemo(()=>e=>f?function(e,t,n,o,r,i,s,a,d,l,c){if(!e)return()=>{};let u=!1,p=null;const h=()=>{if(u||!a.current)return;const e=t.getState();let n,h;try{n=o(e,r.current)}catch(e){h=e,p=e}h||(p=null),n===i.current?s.current||l():(i.current=n,d.current=n,s.current=!0,c())};return n.onStateChange=h,n.trySubscribe(),h(),()=>{if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}(m,u,f,h,$,v,x,w,y,g,e):()=>{},[f]);var E,I;let A;E=Lt,I=[$,v,x,i,y,g],vt(()=>E(...I),void 0);try{A=he.useSyncExternalStore(_,S,p?()=>h(p(),i):S)}catch(e){throw C.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${C.current.stack}\n\n`),e}vt(()=>{C.current=void 0,y.current=void 0,v.current=A});const P=he.useMemo(()=>he.createElement(e,{...A,ref:r}),[r,e,A]);return he.useMemo(()=>m?he.createElement(s.Provider,{value:b},P):P,[s,P,b])}const f=he.memo(l);if(f.WrappedComponent=e,f.displayName=l.displayName=n,d){const t=he.forwardRef(function(e,t){return he.createElement(f,{...e,reactReduxForwardedRef:t})});return t.displayName=n,t.WrappedComponent=e,Nt(t,e)}return Nt(f,e)}},Vt=function(e){const{children:t,context:n,serverState:o,store:r}=e,i=he.useMemo(()=>{const e=ft(r);return{store:r,subscription:e,getServerState:o?()=>o:void 0}},[r,o]),s=he.useMemo(()=>r.getState(),[r]);vt(()=>{const{subscription:e}=i;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==r.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[i,s]);const a=n||jt;return he.createElement(a.Provider,{value:i},t)},Ut=function(e){var t=e.top,n=e.right,o=e.bottom,r=e.left;return{top:t,right:n,bottom:o,left:r,width:n-r,height:o-t,x:r,y:t,center:{x:(n+r)/2,y:(o+t)/2}}},zt=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},Gt=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Ht={top:0,right:0,bottom:0,left:0},Wt=function(e){var t=e.borderBox,n=e.margin,o=void 0===n?Ht:n,r=e.border,i=void 0===r?Ht:r,s=e.padding,a=void 0===s?Ht:s,d=Ut(zt(t,o)),l=Ut(Gt(t,i)),c=Ut(Gt(l,a));return{marginBox:d,borderBox:Ut(t),paddingBox:l,contentBox:c,margin:o,border:i,padding:a}},Kt=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(){throw new Error("Invariant failed")}(),n},qt=function(e,t){var n,o,r=e.borderBox,i=e.border,s=e.margin,a=e.padding,d=(o=t,{top:(n=r).top+o.y,left:n.left+o.x,bottom:n.bottom+o.y,right:n.right+o.x});return Wt({borderBox:d,border:i,margin:s,padding:a})},Yt=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),qt(e,t)},Zt=function(e,t){var n={top:Kt(t.marginTop),right:Kt(t.marginRight),bottom:Kt(t.marginBottom),left:Kt(t.marginLeft)},o={top:Kt(t.paddingTop),right:Kt(t.paddingRight),bottom:Kt(t.paddingBottom),left:Kt(t.paddingLeft)},r={top:Kt(t.borderTopWidth),right:Kt(t.borderRightWidth),bottom:Kt(t.borderBottomWidth),left:Kt(t.borderLeftWidth)};return Wt({borderBox:e,margin:n,padding:o,border:r})},Xt=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return Zt(t,n)};const Jt=function(e){var t=[],n=null,o=function(){for(var o=arguments.length,r=new Array(o),i=0;i{const o=(r=n,i=t.options,{...r,...i});var r,i;return e.addEventListener(t.eventName,t.fn,o),function(){e.removeEventListener(t.eventName,t.fn,o)}});return function(){o.forEach(e=>{e()})}}en.bind(null,"warn"),en.bind(null,"error");class on extends Error{}function rn(e,t){throw new on("Invariant failed")}on.prototype.toString=function(){return this.message};class sn extends fe().Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=tn,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort(),e.error instanceof on&&e.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in ");return this.callbacks},this.setCallbacks=e=>{this.callbacks=e}}componentDidMount(){this.unbind=nn(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof on))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const an=e=>e+1,dn=(e,t)=>{const n=e.droppableId===t.droppableId,o=an(e.index),r=an(t.index);return n?`\n You have moved the item from position ${o}\n to position ${r}\n `:`\n You have moved the item from position ${o}\n in list ${e.droppableId}\n to list ${t.droppableId}\n in position ${r}\n `},ln=(e,t,n)=>t.droppableId===n.droppableId?`\n The item ${e}\n has been combined with ${n.draggableId}`:`\n The item ${e}\n in list ${t.droppableId}\n has been combined with ${n.draggableId}\n in list ${n.droppableId}\n `,cn=e=>`\n The item has returned to its starting position\n of ${an(e.index)}\n`,un="\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",pn=e=>`\n You have lifted an item in position ${an(e.source.index)}\n`,hn=e=>{const t=e.destination;if(t)return dn(e.source,t);const n=e.combine;return n?ln(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},mn=e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${cn(e.source)}\n `;const t=e.destination,n=e.combine;return t?`\n You have dropped the item.\n ${dn(e.source,t)}\n `:n?`\n You have dropped the item.\n ${ln(e.draggableId,e.source,n)}\n `:`\n The item has been dropped while not over a drop area.\n ${cn(e.source)}\n `};function fn(e,t){return e===t||!(!Number.isNaN(e)||!Number.isNaN(t))}function gn(e,t){if(e.length!==t.length)return!1;for(let n=0;n({inputs:t,result:e()}))[0],o=(0,he.useRef)(!0),r=(0,he.useRef)(n),i=o.current||Boolean(t&&r.current.inputs&&gn(t,r.current.inputs))?r.current:{inputs:t,result:e()};return(0,he.useEffect)(()=>{o.current=!1,r.current=i},[i]),i.result}function vn(e,t){return bn(()=>e,t)}const $n={x:0,y:0},yn=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),xn=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),wn=(e,t)=>e.x===t.x&&e.y===t.y,Cn=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),Sn=(e,t,n=0)=>"x"===e?{x:t,y:n}:{x:n,y:t},En=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),In=(e,t)=>Math.min(...t.map(t=>En(e,t))),An=e=>t=>({x:e(t.x),y:e(t.y)}),Pn=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),kn=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],Tn=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const n=Ut({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n})(t.pageMarginBox,e):Ut(e);var Nn=({page:e,withPlaceholder:t,axis:n,frame:o})=>{const r=((e,t)=>t?Pn(e,t.scroll.diff.displacement):e)(e.marginBox,o),i=((e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e)(r,n,t);return{page:e,withPlaceholder:t,active:Tn(i,o)}},Dn=(e,t)=>{e.frame||rn();const n=e.frame,o=xn(t,n.scroll.initial),r=Cn(o),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:o,displacement:r},max:n.scroll.max}},s=Nn({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:s}};function Mn(e,t=gn){let n=null;function o(...o){if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;const r=e.apply(this,o);return n={lastResult:r,lastArgs:o,lastThis:this},r}return o.clear=function(){n=null},o}const Rn=Mn(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),jn=Mn(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),On=Mn(e=>Object.values(e)),Ln=Mn(e=>Object.values(e));var Bn=Mn((e,t)=>{const n=Ln(t).filter(t=>e===t.descriptor.droppableId).sort((e,t)=>e.descriptor.index-t.descriptor.index);return n});function Fn(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function Vn(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Un=Mn((e,t)=>t.filter(t=>t.descriptor.id!==e.descriptor.id)),zn=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Gn={point:$n,value:0},Hn={invisible:{},visible:{},all:[]},Wn={displaced:Hn,displacedBy:Gn,at:null};var Kn=(e,t)=>n=>e<=n&&n<=t,qn=e=>{const t=Kn(e.top,e.bottom),n=Kn(e.left,e.right);return o=>{if(t(o.top)&&t(o.bottom)&&n(o.left)&&n(o.right))return!0;const r=t(o.top)||t(o.bottom),i=n(o.left)||n(o.right);if(r&&i)return!0;const s=o.tope.bottom,a=o.lefte.right;return!(!s||!a)||(s&&i||a&&r)}},Yn=e=>{const t=Kn(e.top,e.bottom),n=Kn(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)};const Zn={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Xn={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},Jn=({target:e,destination:t,viewport:n,withDroppableDisplacement:o,isVisibleThroughFrameFn:r})=>{const i=o?((e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:$n;return Pn(e,n)})(e,t):e;return((e,t,n)=>!!t.subject.active&&n(t.subject.active)(e))(i,t,r)&&((e,t,n)=>n(t)(e))(i,n,r)},Qn=e=>Jn({...e,isVisibleThroughFrameFn:Yn});function eo({afterDragging:e,destination:t,displacedBy:n,viewport:o,forceShouldAnimate:r,last:i}){return e.reduce(function(e,s){const a=function(e,t){const n=e.page.marginBox,o={top:t.point.y,right:0,bottom:0,left:t.point.x};return Ut(zt(n,o))}(s,n),d=s.descriptor.id;var l;if(e.all.push(d),l={target:a,destination:t,viewport:o,withDroppableDisplacement:!0},!Jn({...l,isVisibleThroughFrameFn:qn}))return e.invisible[s.descriptor.id]=!0,e;const c=((e,t,n)=>{if("boolean"==typeof n)return n;if(!t)return!0;const{invisible:o,visible:r}=t;if(o[e])return!1;const i=r[e];return!i||i.shouldAnimate})(d,i,r),u={draggableId:d,shouldAnimate:c};return e.visible[d]=u,e},{all:[],visible:{},invisible:{}})}function to({insideDestination:e,inHomeList:t,displacedBy:n,destination:o}){const r=function(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(e,{inHomeList:t});return{displaced:Hn,displacedBy:n,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:r}}}}function no({draggable:e,insideDestination:t,destination:n,viewport:o,displacedBy:r,last:i,index:s,forceShouldAnimate:a}){const d=zn(e,n);if(null==s)return to({insideDestination:t,inHomeList:d,displacedBy:r,destination:n});const l=t.find(e=>e.descriptor.index===s);if(!l)return to({insideDestination:t,inHomeList:d,displacedBy:r,destination:n});const c=Un(e,t),u=t.indexOf(l);return{displaced:eo({afterDragging:c.slice(u),destination:n,displacedBy:r,last:i,viewport:o.frame,forceShouldAnimate:a}),displacedBy:r,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:s}}}}function oo(e,t){return Boolean(t.effected[e])}const ro=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,io=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,so=({axis:e,moveRelativeTo:t,isMoving:n})=>Sn(e.line,t.marginBox[e.end]+ro(e,n),io(e,t.marginBox,n)),ao=({axis:e,moveRelativeTo:t,isMoving:n})=>Sn(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,n),io(e,t.marginBox,n));var lo=(e,t)=>{const n=e.frame;return n?yn(t,n.scroll.diff.displacement):t},co=e=>{const t=(({impact:e,draggable:t,droppable:n,draggables:o,afterCritical:r})=>{const i=t.page.borderBox.center,s=e.at;return n&&s?"REORDER"===s.type?(({impact:e,draggable:t,draggables:n,droppable:o,afterCritical:r})=>{const i=Bn(o.descriptor.id,n),s=t.page,a=o.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:n})=>Sn(e.line,t.contentBox[e.start]+ro(e,n),io(e,t.contentBox,n)))({axis:a,moveInto:o.page,isMoving:s});const{displaced:d,displacedBy:l}=e,c=d.all[0];if(c){const e=n[c];if(oo(c,r))return ao({axis:a,moveRelativeTo:e.page,isMoving:s});const t=qt(e.page,l.point);return ao({axis:a,moveRelativeTo:t,isMoving:s})}const u=i[i.length-1];if(u.descriptor.id===t.descriptor.id)return s.borderBox.center;if(oo(u.descriptor.id,r)){const e=qt(u.page,Cn(r.displacedBy.point));return so({axis:a,moveRelativeTo:e,isMoving:s})}return so({axis:a,moveRelativeTo:u.page,isMoving:s})})({impact:e,draggable:t,draggables:o,droppable:n,afterCritical:r}):(({afterCritical:e,impact:t,draggables:n})=>{const o=Vn(t);o||rn();const r=o.draggableId,i=n[r].page.borderBox.center,s=(({displaced:e,afterCritical:t,combineWith:n,displacedBy:o})=>{const r=Boolean(e.visible[n]||e.invisible[n]);return oo(n,t)?r?$n:Cn(o.point):r?o.point:$n})({displaced:t.displaced,afterCritical:e,combineWith:r,displacedBy:t.displacedBy});return yn(i,s)})({impact:e,draggables:o,afterCritical:r}):i})(e),n=e.droppable;return n?lo(n,t):t},uo=(e,t)=>{const n=xn(t,e.scroll.initial),o=Cn(n);return{frame:Ut({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:o}}}};function po(e,t){return e.map(e=>t[e])}var ho=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const o=((e,t)=>yn(e.scroll.diff.displacement,t))(n,e),r=xn(o,t.page.borderBox.center);return yn(t.client.borderBox.center,r)},mo=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:o,withDroppableDisplacement:r,onlyOnMainAxis:i=!1})=>{const s=xn(n,e.page.borderBox.center),a={target:Pn(e.page.borderBox,s),destination:t,withDroppableDisplacement:r,viewport:o};return i?(e=>{return Jn({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const n=Kn(e.top,e.bottom),o=Kn(e.left,e.right);return e=>t===Zn?n(e.top)&&n(e.bottom):o(e.left)&&o(e.right)})});var t})(a):Qn(a)},fo=({isMovingForward:e,draggable:t,destination:n,draggables:o,previousImpact:r,viewport:i,previousPageBorderBoxCenter:s,previousClientSelection:a,afterCritical:d})=>{if(!n.isEnabled)return null;const l=Bn(n.descriptor.id,o),c=zn(t,n),u=(({isMovingForward:e,draggable:t,destination:n,insideDestination:o,previousImpact:r})=>{if(!n.isCombineEnabled)return null;if(!Fn(r))return null;function i(e){const t={type:"COMBINE",combine:{draggableId:e,droppableId:n.descriptor.id}};return{...r,at:t}}const s=r.displaced.all,a=s.length?s[0]:null;if(e)return a?i(a):null;const d=Un(t,o);if(!a)return d.length?i(d[d.length-1].descriptor.id):null;const l=d.findIndex(e=>e.descriptor.id===a);-1===l&&rn();const c=l-1;return c<0?null:i(d[c].descriptor.id)})({isMovingForward:e,draggable:t,destination:n,insideDestination:l,previousImpact:r})||(({isMovingForward:e,isInHomeList:t,draggable:n,draggables:o,destination:r,insideDestination:i,previousImpact:s,viewport:a,afterCritical:d})=>{const l=s.at;if(l||rn(),"REORDER"===l.type){const o=(({isMovingForward:e,isInHomeList:t,insideDestination:n,location:o})=>{if(!n.length)return null;const r=o.index,i=e?r+1:r-1,s=n[0].descriptor.index,a=n[n.length-1].descriptor.index;return i(t?a:a+1)?null:i})({isMovingForward:e,isInHomeList:t,location:l.destination,insideDestination:i});return null==o?null:no({draggable:n,insideDestination:i,destination:r,viewport:a,last:s.displaced,displacedBy:s.displacedBy,index:o})}const c=(({isMovingForward:e,destination:t,draggables:n,combine:o,afterCritical:r})=>{if(!t.isCombineEnabled)return null;const i=o.draggableId,s=n[i].descriptor.index;return oo(i,r)?e?s:s-1:e?s+1:s})({isMovingForward:e,destination:r,displaced:s.displaced,draggables:o,combine:l.combine,afterCritical:d});return null==c?null:no({draggable:n,insideDestination:i,destination:r,viewport:a,last:s.displaced,displacedBy:s.displacedBy,index:c})})({isMovingForward:e,isInHomeList:c,draggable:t,draggables:o,destination:n,insideDestination:l,previousImpact:r,viewport:i,afterCritical:d});if(!u)return null;const p=co({impact:u,draggable:t,droppable:n,draggables:o,afterCritical:d});if(mo({draggable:t,destination:n,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:ho({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:u,scrollJumpRequest:null};const h=xn(p,s),m=(({impact:e,viewport:t,destination:n,draggables:o,maxScrollChange:r})=>{const i=uo(t,yn(t.scroll.current,r)),s=n.frame?Dn(n,yn(n.frame.scroll.current,r)):n,a=e.displaced,d=eo({afterDragging:po(a.all,o),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:a,forceShouldAnimate:!1}),l=eo({afterDragging:po(a.all,o),destination:s,displacedBy:e.displacedBy,viewport:t.frame,last:a,forceShouldAnimate:!1}),c={},u={},p=[a,d,l];return a.all.forEach(e=>{const t=function(e,t){for(let n=0;n{const t=e.subject.active;return t||rn(),t},bo=(e,t)=>{const n=e.page.borderBox.center;return oo(e.descriptor.id,t)?xn(n,t.displacedBy.point):n},vo=(e,t)=>{const n=e.page.borderBox;return oo(e.descriptor.id,t)?Pn(n,Cn(t.displacedBy.point)):n};var $o=Mn(function(e,t){const n=t[e.line];return{value:n,point:Sn(e.line,n)}});const yo=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),xo=(e,t,n)=>{const o=e.frame;zn(t,e)&&rn(),e.subject.withPlaceholder&&rn();const r=$o(e.axis,t.displaceBy).point,i=((e,t,n)=>{const o=e.axis;if("virtual"===e.descriptor.mode)return Sn(o.line,t[o.line]);const r=e.subject.page.contentBox[o.size],i=Bn(e.descriptor.id,n).reduce((e,t)=>e+t.client.marginBox[o.size],0)+t[o.line]-r;return i<=0?null:Sn(o.line,i)})(e,r,n),s={placeholderSize:r,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!o){const t=Nn({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:e.frame});return{...e,subject:t}}const a=i?yn(o.scroll.max,i):o.scroll.max,d=yo(o,a),l=Nn({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:d});return{...e,subject:l,frame:d}};var wo=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},Co=({state:e,type:t})=>{const n=((e,t)=>{const n=wo(e);return n?t[n]:null})(e.impact,e.dimensions.droppables),o=Boolean(n),r=e.dimensions.droppables[e.critical.droppable.id],i=n||r,s=i.axis.direction,a="vertical"===s&&("MOVE_UP"===t||"MOVE_DOWN"===t)||"horizontal"===s&&("MOVE_LEFT"===t||"MOVE_RIGHT"===t);if(a&&!o)return null;const d="MOVE_DOWN"===t||"MOVE_RIGHT"===t,l=e.dimensions.draggables[e.critical.draggable.id],c=e.current.page.borderBoxCenter,{draggables:u,droppables:p}=e.dimensions;return a?fo({isMovingForward:d,previousPageBorderBoxCenter:c,draggable:l,destination:i,draggables:u,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):(({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:o,draggables:r,droppables:i,viewport:s,afterCritical:a})=>{const d=(({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:o,viewport:r})=>{const i=n.subject.active;if(!i)return null;const s=n.axis,a=Kn(i[s.start],i[s.end]),d=On(o).filter(e=>e!==n).filter(e=>e.isEnabled).filter(e=>Boolean(e.subject.active)).filter(e=>qn(r.frame)(go(e))).filter(t=>{const n=go(t);return e?i[s.crossAxisEnd]{const t=go(e),n=Kn(t[s.start],t[s.end]);return a(t[s.start])||a(t[s.end])||n(i[s.start])||n(i[s.end])}).sort((t,n)=>{const o=go(t)[s.crossAxisStart],r=go(n)[s.crossAxisStart];return e?o-r:r-o}).filter((e,t,n)=>go(e)[s.crossAxisStart]===go(n[0])[s.crossAxisStart]);if(!d.length)return null;if(1===d.length)return d[0];const l=d.filter(e=>Kn(go(e)[s.start],go(e)[s.end])(t[s.line]));return 1===l.length?l[0]:l.length>1?l.sort((e,t)=>go(e)[s.start]-go(t)[s.start])[0]:d.sort((e,n)=>{const o=In(t,kn(go(e))),r=In(t,kn(go(n)));return o!==r?o-r:go(e)[s.start]-go(n)[s.start]})[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:o,droppables:i,viewport:s});if(!d)return null;const l=Bn(d.descriptor.id,r),c=(({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:o,afterCritical:r})=>{const i=o.filter(e=>Qn({target:vo(e,r),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((t,o)=>{const i=En(e,lo(n,bo(t,r))),s=En(e,lo(n,bo(o,r)));return i{if(!t){if(n.length)return null;const e={displaced:Hn,displacedBy:Gn,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=co({impact:e,draggable:o,droppable:i,draggables:r,afterCritical:a}),d=zn(o,i)?i:xo(i,o,r);return mo({draggable:o,destination:d,newPageBorderBoxCenter:t,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?e:null}const d=Boolean(e[i.axis.line]<=t.page.borderBox.center[i.axis.line]),l=(()=>{const e=t.descriptor.index;return t.descriptor.id===o.descriptor.id||d?e:e+1})(),c=$o(i.axis,o.displaceBy);return no({draggable:o,insideDestination:n,destination:i,viewport:s,displacedBy:c,last:Hn,index:l})})({previousPageBorderBoxCenter:t,destination:d,draggable:n,draggables:r,moveRelativeTo:c,insideDestination:l,viewport:s,afterCritical:a});if(!u)return null;const p=co({impact:u,draggable:n,droppable:d,draggables:r,afterCritical:a});return{clientSelection:ho({pageBorderBoxCenter:p,draggable:n,viewport:s}),impact:u,scrollJumpRequest:null}})({isMovingForward:d,previousPageBorderBoxCenter:c,draggable:l,isOver:i,draggables:u,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function So(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function _o(e){const t=Kn(e.top,e.bottom),n=Kn(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}const Eo=(e,t)=>Ut(Pn(e,t));function Io({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}var Ao=({pageOffset:e,draggable:t,draggables:n,droppables:o,previousImpact:r,viewport:i,afterCritical:s})=>{const a=Eo(t.page.borderBox,e),d=function({pageBorderBox:e,draggable:t,droppables:n}){const o=On(n).filter(t=>{if(!t.isEnabled)return!1;const n=t.subject.active;if(!n)return!1;if(r=n,!((o=e).leftr.left&&o.topr.top))return!1;var o,r;if(_o(n)(e.center))return!0;const i=t.axis,s=n.center[i.crossAxisLine],a=e[i.crossAxisStart],d=e[i.crossAxisEnd],l=Kn(n[i.crossAxisStart],n[i.crossAxisEnd]),c=l(a),u=l(d);return!c&&!u||(c?as)});return o.length?1===o.length?o[0].descriptor.id:function({pageBorderBox:e,draggable:t,candidates:n}){const o=t.page.borderBox.center,r=n.map(t=>{const n=t.axis,r=Sn(t.axis.line,e.center[n.line],t.page.borderBox.center[n.crossAxisLine]);return{id:t.descriptor.id,distance:En(o,r)}}).sort((e,t)=>t.distance-e.distance);return r[0]?r[0].id:null}({pageBorderBox:e,draggable:t,candidates:o}):null}({pageBorderBox:a,draggable:t,droppables:o});if(!d)return Wn;const l=o[d],c=Bn(l.descriptor.id,n),u=((e,t)=>{const n=e.frame;return n?Eo(t,n.scroll.diff.value):t})(l,a);return(({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:o,insideDestination:r,afterCritical:i})=>{if(!o.isCombineEnabled)return null;const s=o.axis,a=$o(o.axis,e.displaceBy),d=a.value,l=t[s.start],c=t[s.end],u=Un(e,r).find(e=>{const t=e.descriptor.id,o=e.page.borderBox,r=o[s.size]/4,a=oo(t,i),u=Io({displaced:n.displaced,id:t});return a?u?c>o[s.start]+r&&co[s.start]-d+r&&lo[s.start]+d+r&&co[s.start]+r&&l{const a=n.axis,d=$o(n.axis,t.displaceBy),l=d.value,c=e[a.start],u=e[a.end],p=Un(t,o).find(e=>{const t=e.descriptor.id,n=e.page.borderBox.center[a.line],o=oo(t,s),i=Io({displaced:r,id:t});return o?i?u<=n:ce.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}({draggable:t,closest:p,inHomeList:zn(t,n)});return no({draggable:t,insideDestination:o,destination:n,viewport:i,last:r,displacedBy:d,index:h})})({pageBorderBoxWithDroppableScroll:u,draggable:t,destination:l,insideDestination:c,last:r.displaced,viewport:i,afterCritical:s})},Po=(e,t)=>({...e,[t.descriptor.id]:t});var ko=({state:e,clientSelection:t,dimensions:n,viewport:o,impact:r,scrollJumpRequest:i})=>{const s=o||e.viewport,a=n||e.dimensions,d=t||e.current.client.selection,l=xn(d,e.initial.client.selection),c={offset:l,selection:d,borderBoxCenter:yn(e.initial.client.borderBoxCenter,l)},u={selection:yn(c.selection,s.scroll.current),borderBoxCenter:yn(c.borderBoxCenter,s.scroll.current),offset:yn(c.offset,s.scroll.diff.value)},p={client:c,page:u};if("COLLECTING"===e.phase)return{...e,dimensions:a,viewport:s,current:p};const h=a.draggables[e.critical.draggable.id],m=r||Ao({pageOffset:u.offset,draggable:h,draggables:a.draggables,droppables:a.droppables,previousImpact:e.impact,viewport:s,afterCritical:e.afterCritical}),f=(({draggable:e,draggables:t,droppables:n,previousImpact:o,impact:r})=>{const i=(({previousImpact:e,impact:t,droppables:n})=>{const o=wo(e),r=wo(t);if(!o)return n;if(o===r)return n;const i=n[o];if(!i.subject.withPlaceholder)return n;const s=(e=>{const t=e.subject.withPlaceholder;t||rn();const n=e.frame;if(!n){const t=Nn({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const o=t.oldFrameMaxScroll;o||rn();const r=yo(n,o),i=Nn({page:e.subject.page,axis:e.axis,frame:r,withPlaceholder:null});return{...e,subject:i,frame:r}})(i);return Po(n,s)})({previousImpact:o,impact:r,droppables:n}),s=wo(r);if(!s)return i;const a=n[s];if(zn(e,a))return i;if(a.subject.withPlaceholder)return i;const d=xo(a,e,t);return Po(i,d)})({draggable:h,impact:m,previousImpact:e.impact,draggables:a.draggables,droppables:a.droppables});return{...e,current:p,dimensions:{draggables:a.draggables,droppables:f},impact:m,viewport:s,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}},To=({impact:e,viewport:t,draggables:n,destination:o,forceShouldAnimate:r})=>{const i=e.displaced,s=function(e,t){return e.map(e=>t[e])}(i.all,n),a=eo({afterDragging:s,destination:o,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:r,last:i});return{...e,displaced:a}},No=({impact:e,draggable:t,droppable:n,draggables:o,viewport:r,afterCritical:i})=>{const s=co({impact:e,draggable:t,draggables:o,droppable:n,afterCritical:i});return ho({pageBorderBoxCenter:s,draggable:t,viewport:r})},Do=({state:e,dimensions:t,viewport:n})=>{"SNAP"!==e.movementMode&&rn();const o=e.impact,r=n||e.viewport,i=t||e.dimensions,{draggables:s,droppables:a}=i,d=s[e.critical.draggable.id],l=wo(o);l||rn();const c=a[l],u=To({impact:o,viewport:r,destination:c,draggables:s}),p=No({impact:u,draggable:d,droppable:c,draggables:s,viewport:r,afterCritical:e.afterCritical});return ko({impact:u,clientSelection:p,state:e,dimensions:i,viewport:r})},Mo=({draggable:e,home:t,draggables:n,viewport:o})=>{const r=$o(t.axis,e.displaceBy),i=Bn(t.descriptor.id,n),s=i.indexOf(e);-1===s&&rn();const a=i.slice(s+1),d=a.reduce((e,t)=>(e[t.descriptor.id]=!0,e),{}),l={inVirtualList:"virtual"===t.descriptor.mode,displacedBy:r,effected:d};var c;return{impact:{displaced:eo({afterDragging:a,destination:t,displacedBy:r,last:null,viewport:o.frame,forceShouldAnimate:!1}),displacedBy:r,at:{type:"REORDER",destination:(c=e.descriptor,{index:c.index,droppableId:c.droppableId})}},afterCritical:l}};const Ro=e=>"SNAP"===e.movementMode,jo=(e,t,n)=>{const o=((e,t)=>({draggables:e.draggables,droppables:Po(e.droppables,t)}))(e.dimensions,t);return!Ro(e)||n?ko({state:e,dimensions:o}):Do({state:e,dimensions:o})};function Oo(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const Lo={phase:"IDLE",completed:null,shouldFlush:!1};var Bo=(e=Lo,t)=>{if("FLUSH"===t.type)return{...Lo,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&rn();const{critical:n,clientSelection:o,viewport:r,dimensions:i,movementMode:s}=t.payload,a=i.draggables[n.draggable.id],d=i.droppables[n.droppable.id],l={selection:o,borderBoxCenter:a.client.borderBox.center,offset:$n},c={client:l,page:{selection:yn(l.selection,r.scroll.initial),borderBoxCenter:yn(l.selection,r.scroll.initial),offset:yn(l.selection,r.scroll.diff.value)}},u=On(i.droppables).every(e=>!e.isFixedOnPage),{impact:p,afterCritical:h}=Mo({draggable:a,home:d,draggables:i.draggables,viewport:r});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:s,dimensions:i,initial:c,current:c,isWindowScrollAllowed:u,impact:p,afterCritical:h,onLiftImpact:p,viewport:r,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&rn(),{...e,phase:"COLLECTING"});if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&rn(),(({state:e,published:t})=>{const n=t.modified.map(t=>{const n=e.dimensions.droppables[t.droppableId];return Dn(n,t.scroll)}),o={...e.dimensions.droppables,...Rn(n)},r=jn((({additions:e,updatedDroppables:t,viewport:n})=>{const o=n.scroll.diff.value;return e.map(e=>{const r=e.descriptor.droppableId,i=(e=>{const t=e.frame;return t||rn(),t})(t[r]),s=i.scroll.diff.value,a=(({draggable:e,offset:t,initialWindowScroll:n})=>{const o=qt(e.client,t),r=Yt(o,n);return{...e,placeholder:{...e.placeholder,client:o},client:o,page:r}})({draggable:e,offset:yn(o,s),initialWindowScroll:n.scroll.initial});return a})})({additions:t.additions,updatedDroppables:o,viewport:e.viewport})),i={...e.dimensions.draggables,...r};t.removals.forEach(e=>{delete i[e]});const s={droppables:o,draggables:i},a=wo(e.impact),d=a?s.droppables[a]:null,l=s.draggables[e.critical.draggable.id],c=s.droppables[e.critical.droppable.id],{impact:u,afterCritical:p}=Mo({draggable:l,home:c,draggables:i,viewport:e.viewport}),h=d&&d.isCombineEnabled?e.impact:u,m=Ao({pageOffset:e.current.page.offset,draggable:s.draggables[e.critical.draggable.id],draggables:s.draggables,droppables:s.droppables,previousImpact:h,viewport:e.viewport,afterCritical:p}),f={...e,phase:"DRAGGING",impact:m,onLiftImpact:u,dimensions:s,afterCritical:p,forceShouldAnimate:!1};return"COLLECTING"===e.phase?f:{...f,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;So(e)||rn();const{client:n}=t.payload;return wn(n,e.current.client.selection)?e:ko({state:e,clientSelection:n,impact:Ro(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return Oo(e);if("COLLECTING"===e.phase)return Oo(e);So(e)||rn();const{id:n,newScroll:o}=t.payload,r=e.dimensions.droppables[n];if(!r)return e;const i=Dn(r,o);return jo(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;So(e)||rn();const{id:n,isEnabled:o}=t.payload,r=e.dimensions.droppables[n];r||rn(),r.isEnabled===o&&rn();const i={...r,isEnabled:o};return jo(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;So(e)||rn();const{id:n,isCombineEnabled:o}=t.payload,r=e.dimensions.droppables[n];r||rn(),r.isCombineEnabled===o&&rn();const i={...r,isCombineEnabled:o};return jo(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;So(e)||rn(),e.isWindowScrollAllowed||rn();const n=t.payload.newScroll;if(wn(e.viewport.scroll.current,n))return Oo(e);const o=uo(e.viewport,n);return Ro(e)?Do({state:e,viewport:o}):ko({state:e,viewport:o})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!So(e))return e;const n=t.payload.maxScroll;if(wn(n,e.viewport.scroll.max))return e;const o={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:o}}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&rn();const n=Co({state:e,type:t.type});return n?ko({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const n=t.payload.reason;return"COLLECTING"!==e.phase&&rn(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if("DROP_ANIMATE"===t.type){const{completed:n,dropDuration:o,newHomeClientOffset:r}=t.payload;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&rn(),{phase:"DROP_ANIMATING",completed:n,dropDuration:o,newHomeClientOffset:r,dimensions:e.dimensions}}if("DROP_COMPLETE"===t.type){const{completed:e}=t.payload;return{phase:"IDLE",completed:e,shouldFlush:!1}}return e};function Fo(e,t){return e instanceof Object&&"type"in e&&e.type===t}const Vo=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),Uo=()=>({type:"COLLECTION_STARTING",payload:null}),zo=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),Go=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),Ho=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),Wo=e=>({type:"MOVE",payload:e}),Ko=()=>({type:"MOVE_UP",payload:null}),qo=()=>({type:"MOVE_DOWN",payload:null}),Yo=()=>({type:"MOVE_RIGHT",payload:null}),Zo=()=>({type:"MOVE_LEFT",payload:null}),Xo=e=>({type:"DROP_COMPLETE",payload:e}),Jo=e=>({type:"DROP",payload:e}),Qo="cubic-bezier(.2,1,.1,1)",er=0,tr=.7,nr=.75,or={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},rr=`${or.outOfTheWay}s cubic-bezier(0.2, 0, 0, 1)`,ir={fluid:`opacity ${rr}`,snap:`transform ${rr}, opacity ${rr}`,drop:e=>{const t=`${e}s ${Qo}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${rr}`,placeholder:`height ${rr}, width ${rr}, margin ${rr}`},sr=e=>wn(e,$n)?void 0:`translate(${e.x}px, ${e.y}px)`,ar=sr,{minDropTime:dr,maxDropTime:lr}=or,cr=lr-dr,ur=({getState:e,dispatch:t})=>n=>o=>{if(!Fo(o,"DROP"))return void n(o);const r=e(),i=o.payload.reason;if("COLLECTING"===r.phase)return void t((s={reason:i},{type:"DROP_PENDING",payload:s}));var s;if("IDLE"===r.phase)return;"DROP_PENDING"===r.phase&&r.isWaiting&&rn(),"DRAGGING"!==r.phase&&"DROP_PENDING"!==r.phase&&rn();const a=r.critical,d=r.dimensions,l=d.draggables[r.critical.draggable.id],{impact:c,didDropInsideDroppable:u}=(({draggables:e,reason:t,lastImpact:n,home:o,viewport:r,onLiftImpact:i})=>n.at&&"DROP"===t?"REORDER"===n.at.type?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:Hn},didDropInsideDroppable:!0}:{impact:To({draggables:e,impact:i,destination:o,viewport:r,forceShouldAnimate:!0}),didDropInsideDroppable:!1})({reason:i,lastImpact:r.impact,afterCritical:r.afterCritical,onLiftImpact:r.onLiftImpact,home:r.dimensions.droppables[r.critical.droppable.id],viewport:r.viewport,draggables:r.dimensions.draggables}),p=u?Fn(c):null,h=u?Vn(c):null,m={index:a.draggable.index,droppableId:a.droppable.id},f={draggableId:l.descriptor.id,type:l.descriptor.type,source:m,reason:i,mode:r.movementMode,destination:p,combine:h},g=(({impact:e,draggable:t,dimensions:n,viewport:o,afterCritical:r})=>{const{draggables:i,droppables:s}=n,a=wo(e),d=a?s[a]:null,l=s[t.descriptor.droppableId],c=No({impact:e,draggable:t,draggables:i,afterCritical:r,droppable:d||l,viewport:o});return xn(c,t.client.borderBox.center)})({impact:c,draggable:l,dimensions:d,viewport:r.viewport,afterCritical:r.afterCritical}),b={critical:r.critical,afterCritical:r.afterCritical,result:f,impact:c};if(wn(r.current.client.offset,g)&&!Boolean(f.combine))return void t(Xo({completed:b}));const v=(({current:e,destination:t,reason:n})=>{const o=En(e,t);if(o<=0)return dr;if(o>=1500)return lr;const r=dr+cr*(o/1500);return Number(("CANCEL"===n?.6*r:r).toFixed(2))})({current:r.current.client.offset,destination:g,reason:i});t((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:g,dropDuration:v,completed:b}))};var pr=()=>({x:window.pageXOffset,y:window.pageYOffset});const hr=e=>{const t=function({onWindowScroll:e}){const t=Jt(function(){e(pr())}),n=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(t);let o=tn;function r(){return o!==tn}return{start:function(){r()&&rn(),o=nn(window,[n])},stop:function(){r()||rn(),t.cancel(),o(),o=tn},isActive:r}}({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>n=>{!t.isActive()&&Fo(n,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&(e=>Fo(e,"DROP_COMPLETE")||Fo(e,"DROP_ANIMATE")||Fo(e,"FLUSH"))(n)&&t.stop(),e(n)}};const mr=(e,t)=>{t()},fr=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function gr(e,t,n,o){if(!e)return void n(o(t));const r=(e=>{let t=!1,n=!1;const o=setTimeout(()=>{n=!0}),r=r=>{t||n||(t=!0,e(r),clearTimeout(o))};return r.wasCalled=()=>t,r})(n);e(t,{announce:r}),r.wasCalled()||n(o(t))}var br=(e,t)=>{const n=((e,t)=>{const n=(()=>{const e=[];return{add:t=>{const n=setTimeout(()=>(t=>{const n=e.findIndex(e=>e.timerId===t);-1===n&&rn();const[o]=e.splice(n,1);o.callback()})(n)),o={timerId:n,callback:t};e.push(o)},flush:()=>{if(!e.length)return;const t=[...e];e.length=0,t.forEach(e=>{clearTimeout(e.timerId),e.callback()})}}})();let o=null;const r=n=>{o||rn(),o=null,mr(0,()=>gr(e().onDragEnd,n,t,mn))};return{beforeCapture:(t,n)=>{o&&rn(),mr(0,()=>{const o=e().onBeforeCapture;o&&o({draggableId:t,mode:n})})},beforeStart:(t,n)=>{o&&rn(),mr(0,()=>{const o=e().onBeforeDragStart;o&&o(fr(t,n))})},start:(r,i)=>{o&&rn();const s=fr(r,i);o={mode:i,lastCritical:r,lastLocation:s.source,lastCombine:null},n.add(()=>{mr(0,()=>gr(e().onDragStart,s,t,pn))})},update:(r,i)=>{const s=Fn(i),a=Vn(i);o||rn();const d=!((e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,o=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&o})(r,o.lastCritical);d&&(o.lastCritical=r);const l=(u=s,!(null==(c=o.lastLocation)&&null==u||null!=c&&null!=u&&c.droppableId===u.droppableId&&c.index===u.index));var c,u;l&&(o.lastLocation=s);const p=!((e,t)=>null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId)(o.lastCombine,a);if(p&&(o.lastCombine=a),!d&&!l&&!p)return;const h={...fr(r,o.mode),combine:a,destination:s};n.add(()=>{mr(0,()=>gr(e().onDragUpdate,h,t,hn))})},flush:()=>{o||rn(),n.flush()},drop:r,abort:()=>{if(!o)return;const e={...fr(o.lastCritical,o.mode),combine:null,destination:null,reason:"CANCEL"};r(e)}}})(e,t);return e=>t=>o=>{if(Fo(o,"BEFORE_INITIAL_CAPTURE"))return void n.beforeCapture(o.payload.draggableId,o.payload.movementMode);if(Fo(o,"INITIAL_PUBLISH")){const e=o.payload.critical;return n.beforeStart(e,o.payload.movementMode),t(o),void n.start(e,o.payload.movementMode)}if(Fo(o,"DROP_COMPLETE")){const e=o.payload.completed.result;return n.flush(),t(o),void n.drop(e)}if(t(o),Fo(o,"FLUSH"))return void n.abort();const r=e.getState();"DRAGGING"===r.phase&&n.update(r.critical,r.impact)}};const vr=e=>t=>n=>{if(!Fo(n,"DROP_ANIMATION_FINISHED"))return void t(n);const o=e.getState();"DROP_ANIMATING"!==o.phase&&rn(),e.dispatch(Xo({completed:o.completed}))},$r=e=>{let t=null,n=null;return o=>r=>{if((Fo(r,"FLUSH")||Fo(r,"DROP_COMPLETE")||Fo(r,"DROP_ANIMATION_FINISHED"))&&(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),o(r),!Fo(r,"DROP_ANIMATE"))return;const i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame(()=>{n=null,t=nn(window,[i])})}};const yr=e=>t=>n=>{if(t(n),!Fo(n,"PUBLISH_WHILE_DRAGGING"))return;const o=e.getState();"DROP_PENDING"===o.phase&&(o.isWaiting||e.dispatch(Jo({reason:o.reason})))},xr=We;var wr=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:o,announce:r,autoScroller:i})=>{return ze(Bo,xr(function(...e){return t=>(n,o)=>{const r=t(n,o);let i=()=>{throw new Error(Be(15))};const s={getState:r.getState,dispatch:(e,...t)=>i(e,...t)},a=e.map(e=>e(s));return i=We(...a)(r.dispatch),{...r,dispatch:i}}}((s=n,()=>e=>t=>{Fo(t,"INITIAL_PUBLISH")&&s.dragging(),Fo(t,"DROP_ANIMATE")&&s.dropping(t.payload.completed.result.reason),(Fo(t,"FLUSH")||Fo(t,"DROP_COMPLETE"))&&s.resting(),e(t)}),(e=>()=>t=>n=>{(Fo(n,"DROP_COMPLETE")||Fo(n,"FLUSH")||Fo(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)})(e),(e=>({getState:t,dispatch:n})=>o=>r=>{if(!Fo(r,"LIFT"))return void o(r);const{id:i,clientSelection:s,movementMode:a}=r.payload,d=t();"DROP_ANIMATING"===d.phase&&n(Xo({completed:d.completed})),"IDLE"!==t().phase&&rn(),n({type:"FLUSH",payload:null}),n({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:i,movementMode:a}});const l={draggableId:i,scrollOptions:{shouldPublishImmediately:"SNAP"===a}},{critical:c,dimensions:u,viewport:p}=e.startPublishing(l);n({type:"INITIAL_PUBLISH",payload:{critical:c,dimensions:u,clientSelection:s,movementMode:a,viewport:p}})})(e),ur,vr,$r,yr,(e=>t=>n=>o=>{if((e=>Fo(e,"DROP_COMPLETE")||Fo(e,"DROP_ANIMATE")||Fo(e,"FLUSH"))(o))return e.stop(),void n(o);if(Fo(o,"INITIAL_PUBLISH")){n(o);const r=t.getState();return"DRAGGING"!==r.phase&&rn(),void e.start(r)}n(o),e.scroll(t.getState())})(i),hr,(e=>{let t=!1;return()=>n=>o=>{if(Fo(o,"INITIAL_PUBLISH"))return t=!0,e.tryRecordFocus(o.payload.critical.draggable.id),n(o),void e.tryRestoreFocusRecorded();if(n(o),t){if(Fo(o,"FLUSH"))return t=!1,void e.tryRestoreFocusRecorded();if(Fo(o,"DROP_COMPLETE")){t=!1;const n=o.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),br(o,r))));var s},Cr=({scrollHeight:e,scrollWidth:t,height:n,width:o})=>{const r=xn({x:t,y:e},{x:o,y:n});return{x:Math.max(0,r.x),y:Math.max(0,r.y)}},Sr=()=>{const e=document.documentElement;return e||rn(),e},_r=()=>{const e=Sr();return Cr({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})};function Er(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode)}var Ir=(e,t)=>{let n=null;const o=function({registry:e,callbacks:t}){let n={additions:{},removals:{},modified:{}},o=null;const r=()=>{o||(t.collectionStarting(),o=requestAnimationFrame(()=>{o=null;const{additions:r,removals:i,modified:s}=n,a=Object.keys(r).map(t=>e.draggable.getById(t).getDimension($n)).sort((e,t)=>e.descriptor.index-t.descriptor.index),d=Object.keys(s).map(t=>({droppableId:t,scroll:e.droppable.getById(t).callbacks.getScrollWhileDragging()})),l={additions:a,removals:Object.keys(i),modified:d};n={additions:{},removals:{},modified:{}},t.publish(l)}))};return{add:e=>{const t=e.descriptor.id;n.additions[t]=e,n.modified[e.descriptor.droppableId]=!0,n.removals[t]&&delete n.removals[t],r()},remove:e=>{const t=e.descriptor;n.removals[t.id]=!0,n.modified[t.droppableId]=!0,n.additions[t.id]&&delete n.additions[t.id],r()},stop:()=>{o&&(cancelAnimationFrame(o),o=null,n={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),r=t=>{n||rn();const r=n.critical.draggable;"ADDITION"===t.type&&Er(e,r,t.value)&&o.add(t.value),"REMOVAL"===t.type&&Er(e,r,t.value)&&o.remove(t.value)},i={updateDroppableIsEnabled:(o,r)=>{e.droppable.exists(o)||rn(),n&&t.updateDroppableIsEnabled({id:o,isEnabled:r})},updateDroppableIsCombineEnabled:(o,r)=>{n&&(e.droppable.exists(o)||rn(),t.updateDroppableIsCombineEnabled({id:o,isCombineEnabled:r}))},scrollDroppable:(t,o)=>{n&&e.droppable.getById(t).callbacks.scroll(o)},updateDroppableScroll:(o,r)=>{n&&(e.droppable.exists(o)||rn(),t.updateDroppableScroll({id:o,newScroll:r}))},startPublishing:t=>{n&&rn();const o=e.draggable.getById(t.draggableId),i=e.droppable.getById(o.descriptor.droppableId),s={draggable:o.descriptor,droppable:i.descriptor},a=e.subscribe(r);return n={critical:s,unsubscribe:a},(({critical:e,scrollOptions:t,registry:n})=>{const o=(()=>{const e=pr(),t=_r(),n=e.y,o=e.x,r=Sr(),i=r.clientWidth,s=r.clientHeight;return{frame:Ut({top:n,left:o,right:o+i,bottom:n+s}),scroll:{initial:e,current:e,max:t,diff:{value:$n,displacement:$n}}}})(),r=o.scroll.current,i=e.droppable,s=n.droppable.getAllByType(i.type).map(e=>e.callbacks.getDimensionAndWatchScroll(r,t)),a=n.draggable.getAllByType(e.draggable.type).map(e=>e.getDimension(r));return{dimensions:{draggables:jn(a),droppables:Rn(s)},critical:e,viewport:o}})({critical:s,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!n)return;o.stop();const t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach(e=>e.callbacks.dragStopped()),n.unsubscribe(),n=null}};return i},Ar=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason,Pr=e=>{window.scrollBy(e.x,e.y)};const kr=Mn(e=>On(e).filter(e=>!!e.isEnabled&&!!e.frame));const Tr={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var Nr=({startOfRange:e,endOfRange:t,current:n})=>{const o=t-e;return 0===o?0:(n-e)/o},Dr=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:r})=>{const i=((e,t,n=()=>Tr)=>{const o=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return o.maxPixelScroll;if(e===t.startScrollingFrom)return 1;const r=1-Nr({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),i=o.maxPixelScroll*o.ease(r);return Math.ceil(i)})(e,t,r);return 0===i?0:o?Math.max(((e,t,n)=>{const o=n(),r=o.durationDampening.accelerateAt,i=o.durationDampening.stopDampeningAt,s=t,a=i,d=Date.now()-s;if(d>=i)return e;if(d{const s=((e,t,n=()=>Tr)=>{const o=n();return{startScrollingFrom:e[t.size]*o.startFromPercentage,maxScrollValueAt:e[t.size]*o.maxScrollAtPercentage}})(e,o,i);return t[o.end]0===e?0:e);var jr=({dragStartTime:e,container:t,subject:n,center:o,shouldUseTimeDampening:r,getAutoScrollerOptions:i})=>{const s={top:o.y-t.top,right:t.right-o.x,bottom:t.bottom-o.y,left:o.x-t.left},a=Mr({container:t,distanceToEdges:s,dragStartTime:e,axis:Zn,shouldUseTimeDampening:r,getAutoScrollerOptions:i}),d=Mr({container:t,distanceToEdges:s,dragStartTime:e,axis:Xn,shouldUseTimeDampening:r,getAutoScrollerOptions:i}),l=Rr({x:d,y:a});if(wn(l,$n))return null;const c=(({container:e,subject:t,proposedScroll:n})=>{const o=t.height>e.height,r=t.width>e.width;return r||o?r&&o?null:{x:r?0:n.x,y:o?0:n.y}:n})({container:t,subject:n,proposedScroll:l});return c?wn(c,$n)?null:c:null};const Or=An(e=>0===e?0:e>0?1:-1),Lr=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:n,change:o})=>{const r=yn(t,o),i={x:e(r.x,n.x),y:e(r.y,n.y)};return wn(i,$n)?null:i}})(),Br=({max:e,current:t,change:n})=>{const o={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},r=Or(n),i=Lr({max:o,current:t,change:r});return!i||0!==r.x&&0===i.x||0!==r.y&&0===i.y},Fr=(e,t)=>Br({current:e.scroll.current,max:e.scroll.max,change:t}),Vr=(e,t)=>{const n=e.frame;return!!n&&Br({current:n.scroll.current,max:n.scroll.max,change:t})};var Ur=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:o,scrollDroppable:r,getAutoScrollerOptions:i})=>{const s=e.current.page.borderBoxCenter,a=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const r=(({viewport:e,subject:t,center:n,dragStartTime:o,shouldUseTimeDampening:r,getAutoScrollerOptions:i})=>{const s=jr({dragStartTime:o,container:e.frame,subject:t,center:n,shouldUseTimeDampening:r,getAutoScrollerOptions:i});return s&&Fr(e,s)?s:null})({dragStartTime:t,viewport:e.viewport,subject:a,center:s,shouldUseTimeDampening:n,getAutoScrollerOptions:i});if(r)return void o(r)}const d=(({center:e,destination:t,droppables:n})=>{if(t){const e=n[t];return e.frame?e:null}const o=((e,t)=>{const n=kr(t).find(t=>(t.frame||rn(),_o(t.frame.pageMarginBox)(e)))||null;return n})(e,n);return o})({center:s,destination:wo(e.impact),droppables:e.dimensions.droppables});if(!d)return;const l=(({droppable:e,subject:t,center:n,dragStartTime:o,shouldUseTimeDampening:r,getAutoScrollerOptions:i})=>{const s=e.frame;if(!s)return null;const a=jr({dragStartTime:o,container:s.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:r,getAutoScrollerOptions:i});return a&&Vr(e,a)?a:null})({dragStartTime:t,droppable:d,subject:a,center:s,shouldUseTimeDampening:n,getAutoScrollerOptions:i});l&&r(d.descriptor.id,l)},zr=({move:e,scrollDroppable:t,scrollWindow:n})=>o=>{const r=o.scrollJumpRequest;if(!r)return;const i=wo(o.impact);i||rn();const s=((e,n)=>{if(!Vr(e,n))return n;const o=((e,t)=>{const n=e.frame;return n&&Vr(e,t)?Lr({current:n.scroll.current,max:n.scroll.max,change:t}):null})(e,n);if(!o)return t(e.descriptor.id,n),null;const r=xn(n,o);return t(e.descriptor.id,r),xn(n,r)})(o.dimensions.droppables[i],r);if(!s)return;const a=o.viewport,d=((e,t,o)=>{if(!e)return o;if(!Fr(t,o))return o;const r=((e,t)=>{if(!Fr(e,t))return null;const n=e.scroll.max,o=e.scroll.current;return Lr({current:o,max:n,change:t})})(t,o);if(!r)return n(o),null;const i=xn(o,r);return n(i),xn(o,i)})(o.isWindowScrollAllowed,a,s);d&&((t,n)=>{const o=yn(t.current.client.selection,n);e({client:o})})(o,d)};const Gr="data-rfd",Hr=(()=>{const e=`${Gr}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Wr=(()=>{const e=`${Gr}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Kr=(()=>{const e=`${Gr}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),qr={contextId:`${Gr}-scroll-container-context-id`},Yr=(e,t)=>e.map(e=>{const n=e.styles[t];return n?`${e.selector} { ${n} }`:""}).join(" "),Zr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?he.useLayoutEffect:he.useEffect,Xr=()=>{const e=document.querySelector("head");return e||rn(),e},Jr=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Qr(e,t){return Array.from(e.querySelectorAll(t))}var ei=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function ti(e){return e instanceof ei(e).HTMLElement}function ni(){const e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach(t=>t(e))}function o(t){return e.draggables[t]||null}const r={register:t=>{e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:(t,n)=>{const o=e.draggables[n.descriptor.id];o&&o.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{const r=t.descriptor.id,i=o(r);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[r],e.droppables[t.descriptor.droppableId]&&n({type:"REMOVAL",value:t}))},getById:function(e){const t=o(e);return t||rn(),t},findById:o,exists:e=>Boolean(o(e)),getAllByType:t=>Object.values(e.draggables).filter(e=>e.descriptor.type===t)};function i(t){return e.droppables[t]||null}const s={register:t=>{e.droppables[t.descriptor.id]=t},unregister:t=>{const n=i(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){const t=i(e);return t||rn(),t},findById:i,exists:e=>Boolean(i(e)),getAllByType:t=>Object.values(e.droppables).filter(e=>e.descriptor.type===t)};return{draggable:r,droppable:s,subscribe:function(e){return t.push(e),function(){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var oi=fe().createContext(null),ri=()=>{const e=document.body;return e||rn(),e};const ii={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},si={separator:"::"};function ai(e,t=si){const n=fe().useId();return bn(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}var di=fe().createContext(null);function li(e){const t=(0,he.useRef)(e);return(0,he.useEffect)(()=>{t.current=e}),t}function ci(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const ui=9,pi=13,hi=33,mi=34,fi=35,gi=36,bi={[pi]:!0,[ui]:!0};var vi=e=>{bi[e.keyCode]&&e.preventDefault()};const $i=(()=>{const e="visibilitychange";return"undefined"==typeof document?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(e=>`on${e}`in document)||e})(),yi={type:"IDLE"};function xi(){}const wi={[mi]:!0,[hi]:!0,[gi]:!0,[fi]:!0};const Ci={type:"IDLE"},Si=["input","button","textarea","select","option","optgroup","video","audio"];function _i(e,t){if(null==t)return!1;if(Si.includes(t.tagName.toLowerCase()))return!0;const n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&_i(e,t.parentElement)}function Ei(e,t){const n=t.target;return!!ti(n)&&_i(e,n)}var Ii=e=>Ut(e.getBoundingClientRect()).center;const Ai=(()=>{const e="matches";return"undefined"==typeof document?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(e=>e in Element.prototype)||e})();function Pi(e,t){return null==e?null:e[Ai](t)?e:Pi(e.parentElement,t)}function ki(e,t){return e.closest?e.closest(t):Pi(e,t)}function Ti(e){e.preventDefault()}function Ni({expected:e,phase:t,isLockActive:n,shouldWarn:o}){return!!n()&&e===t}function Di({lockAPI:e,store:t,registry:n,draggableId:o}){if(e.isClaimed())return!1;const r=n.draggable.findById(o);return!!r&&!!r.options.isEnabled&&!!Ar(t.getState(),o)}const Mi=[function(e){const t=(0,he.useRef)(yi),n=(0,he.useRef)(tn),o=bn(()=>({eventName:"mousedown",fn:function(t){if(t.defaultPrevented)return;if(0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)return;const o=e.findClosestDraggableId(t);if(!o)return;const r=e.tryGetLock(o,s,{sourceEvent:t});if(!r)return;t.preventDefault();const i={x:t.clientX,y:t.clientY};n.current(),l(r,i)}}),[e]),r=bn(()=>({eventName:"webkitmouseforcewillbegin",fn:t=>{if(t.defaultPrevented)return;const n=e.findClosestDraggableId(t);if(!n)return;const o=e.findOptionsForDraggable(n);o&&(o.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}),[e]),i=vn(function(){n.current=nn(window,[r,o],{passive:!1,capture:!0})},[r,o]),s=vn(()=>{"IDLE"!==t.current.type&&(t.current=yi,n.current(),i())},[i]),a=vn(()=>{const e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),d=vn(function(){const e=function({cancel:e,completed:t,getPhase:n,setPhase:o}){return[{eventName:"mousemove",fn:e=>{const{button:t,clientX:r,clientY:i}=e;if(0!==t)return;const s={x:r,y:i},a=n();if("DRAGGING"===a.type)return e.preventDefault(),void a.actions.move(s);if("PENDING"!==a.type&&rn(),d=a.point,l=s,!(Math.abs(l.x-d.x)>=5||Math.abs(l.y-d.y)>=5))return;var d,l;e.preventDefault();const c=a.actions.fluidLift(s);o({type:"DRAGGING",actions:c})}},{eventName:"mouseup",fn:o=>{const r=n();"DRAGGING"===r.type?(o.preventDefault(),r.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"mousedown",fn:t=>{"DRAGGING"===n().type&&t.preventDefault(),e()}},{eventName:"keydown",fn:t=>{if("PENDING"!==n().type)return 27===t.keyCode?(t.preventDefault(),void e()):void vi(t);e()}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{"PENDING"===n().type&&e()}},{eventName:"webkitmouseforcedown",fn:t=>{const o=n();"IDLE"===o.type&&rn(),o.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:$i,fn:e}]}({cancel:a,completed:s,getPhase:()=>t.current,setPhase:e=>{t.current=e}});n.current=nn(window,e,{capture:!0,passive:!1})},[a,s]),l=vn(function(e,n){"IDLE"!==t.current.type&&rn(),t.current={type:"PENDING",point:n,actions:e},d()},[d]);Zr(function(){return i(),function(){n.current()}},[i])},function(e){const t=(0,he.useRef)(xi),n=bn(()=>({eventName:"keydown",fn:function(n){if(n.defaultPrevented)return;if(32!==n.keyCode)return;const r=e.findClosestDraggableId(n);if(!r)return;const i=e.tryGetLock(r,d,{sourceEvent:n});if(!i)return;n.preventDefault();let s=!0;const a=i.snapLift();function d(){s||rn(),s=!1,t.current(),o()}t.current(),t.current=nn(window,function(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:o=>27===o.keyCode?(o.preventDefault(),void n()):32===o.keyCode?(o.preventDefault(),t(),void e.drop()):40===o.keyCode?(o.preventDefault(),void e.moveDown()):38===o.keyCode?(o.preventDefault(),void e.moveUp()):39===o.keyCode?(o.preventDefault(),void e.moveRight()):37===o.keyCode?(o.preventDefault(),void e.moveLeft()):void(wi[o.keyCode]?o.preventDefault():vi(o))},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:$i,fn:n}]}(a,d),{capture:!0,passive:!1})}}),[e]),o=vn(function(){t.current=nn(window,[n],{passive:!1,capture:!0})},[n]);Zr(function(){return o(),function(){t.current()}},[o])},function(e){const t=(0,he.useRef)(Ci),n=(0,he.useRef)(tn),o=vn(function(){return t.current},[]),r=vn(function(e){t.current=e},[]),i=bn(()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const o=e.findClosestDraggableId(t);if(!o)return;const r=e.tryGetLock(o,a,{sourceEvent:t});if(!r)return;const i=t.touches[0],{clientX:s,clientY:d}=i,l={x:s,y:d};n.current(),u(r,l)}}),[e]),s=vn(function(){n.current=nn(window,[i],{capture:!0,passive:!1})},[i]),a=vn(()=>{const e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),r(Ci),n.current(),s())},[s,r]),d=vn(()=>{const e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),l=vn(function(){const e={capture:!0,passive:!1},t={cancel:d,completed:a,getPhase:o},r=nn(window,function({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:t=>{const o=n();if("DRAGGING"!==o.type)return void e();o.hasMoved=!0;const{clientX:r,clientY:i}=t.touches[0],s={x:r,y:i};t.preventDefault(),o.actions.move(s)}},{eventName:"touchend",fn:o=>{const r=n();"DRAGGING"===r.type?(o.preventDefault(),r.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"touchcancel",fn:t=>{"DRAGGING"===n().type?(t.preventDefault(),e()):e()}},{eventName:"touchforcechange",fn:t=>{const o=n();"IDLE"===o.type&&rn();const r=t.touches[0];if(!r)return;if(!(r.force>=.15))return;const i=o.actions.shouldRespectForcePress();if("PENDING"!==o.type)return i?o.hasMoved?void t.preventDefault():void e():void t.preventDefault();i&&e()}},{eventName:$i,fn:e}]}(t),e),i=nn(window,function({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:e=>{e.preventDefault()}},{eventName:"keydown",fn:n=>{"DRAGGING"===t().type?(27===n.keyCode&&n.preventDefault(),e()):e()}},{eventName:$i,fn:e}]}(t),e);n.current=function(){r(),i()}},[d,o,a]),c=vn(function(){const e=o();"PENDING"!==e.type&&rn();const t=e.actions.fluidLift(e.point);r({type:"DRAGGING",actions:t,hasMoved:!1})},[o,r]),u=vn(function(e,t){"IDLE"!==o().type&&rn();const n=setTimeout(c,120);r({type:"PENDING",point:t,actions:e,longPressTimerId:n}),l()},[l,o,r,c]);Zr(function(){return s(),function(){n.current();const e=o();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),r(Ci))}},[o,s,r]),Zr(function(){return nn(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}];function Ri({contextId:e,store:t,registry:n,customSensors:o,enableDefaultSensors:r}){const i=[...r?Mi:[],...o||[]],s=(0,he.useState)(()=>function(){let e=null;function t(){e||rn(),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&rn();const n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}())[0],a=vn(function(e,t){ci(e)&&!ci(t)&&s.tryAbandon()},[s]);Zr(function(){let e=t.getState();return t.subscribe(()=>{const n=t.getState();a(e,n),e=n})},[s,t,a]),Zr(()=>s.tryAbandon,[s.tryAbandon]);const d=vn(e=>Di({lockAPI:s,registry:n,store:t,draggableId:e}),[s,n,t]),l=vn((o,r,i)=>function({lockAPI:e,contextId:t,store:n,registry:o,draggableId:r,forceSensorStop:i,sourceEvent:s}){if(!Di({lockAPI:e,store:n,registry:o,draggableId:r}))return null;const a=o.draggable.getById(r),d=function(e,t){const n=`[${Wr.contextId}="${e}"]`,o=Qr(document,n).find(e=>e.getAttribute(Wr.id)===t);return o&&ti(o)?o:null}(t,a.descriptor.id);if(!d)return null;if(s&&!a.options.canDragInteractiveElements&&Ei(d,s))return null;const l=e.claim(i||tn);let c="PRE_DRAG";function u(){return a.options.shouldRespectForcePress}function p(){return e.isActive(l)}const h=function(e,t){Ni({expected:e,phase:c,isLockActive:p,shouldWarn:!0})&&n.dispatch(t())}.bind(null,"DRAGGING");function m(t){function o(){e.release(),c="COMPLETED"}function r(e,r={shouldBlockNextClick:!1}){if(t.cleanup(),r.shouldBlockNextClick){const e=nn(window,[{eventName:"click",fn:Ti,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}o(),n.dispatch(Jo({reason:e}))}return"PRE_DRAG"!==c&&(o(),rn()),n.dispatch((e=>({type:"LIFT",payload:e}))(t.liftActionArgs)),c="DRAGGING",{isActive:()=>Ni({expected:"DRAGGING",phase:c,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,drop:e=>r("DROP",e),cancel:e=>r("CANCEL",e),...t.actions}}return{isActive:()=>Ni({expected:"PRE_DRAG",phase:c,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:u,fluidLift:function(e){const t=Jt(e=>{h(()=>Wo({client:e}))});return{...m({liftActionArgs:{id:r,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>h(Ko),moveRight:()=>h(Yo),moveDown:()=>h(qo),moveLeft:()=>h(Zo)};return m({liftActionArgs:{id:r,clientSelection:Ii(d),movementMode:"SNAP"},cleanup:tn,actions:e})},abort:function(){Ni({expected:"PRE_DRAG",phase:c,isLockActive:p,shouldWarn:!0})&&e.release()}}}({lockAPI:s,registry:n,contextId:e,store:t,draggableId:o,forceSensorStop:r||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null}),[e,s,n,t]),c=vn(t=>function(e,t){const n=function(e,t){const n=t.target;if(!((o=n)instanceof ei(o).Element))return null;var o;const r=function(e){return`[${Hr.contextId}="${e}"]`}(e),i=ki(n,r);return i&&ti(i)?i:null}(e,t);return n?n.getAttribute(Hr.draggableId):null}(e,t),[e]),u=vn(e=>{const t=n.draggable.findById(e);return t?t.options:null},[n.draggable]),p=vn(function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==t.getState().phase&&t.dispatch({type:"FLUSH",payload:null}))},[s,t]),h=vn(()=>s.isClaimed(),[s]),m=bn(()=>({canGetLock:d,tryGetLock:l,findClosestDraggableId:c,findOptionsForDraggable:u,tryReleaseLock:p,isLockClaimed:h}),[d,l,c,u,p,h]);for(let e=0;e(e=>({onBeforeCapture:t=>{(0,Oe.flushSync)(()=>{e.onBeforeCapture&&e.onBeforeCapture(t)})},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(a.current),[a]),l=vn(()=>(e=>({...Tr,...e.autoScrollerOptions,durationDampening:{...Tr.durationDampening,...e.autoScrollerOptions}}))(a.current),[a]),c=function(e){const t=bn(()=>(e=>`rfd-announcement-${e}`)(e),[e]),n=(0,he.useRef)(null);return(0,he.useEffect)(function(){const e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),Qt(e.style,ii),ri().appendChild(e),function(){setTimeout(function(){const t=ri();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)})}},[t]),vn(e=>{const t=n.current;t&&(t.textContent=e)},[])}(t),u=function({contextId:e,text:t}){const n=ai("hidden-text",{separator:"-"}),o=bn(()=>function({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}({contextId:e,uniqueId:n}),[n,e]);return(0,he.useEffect)(function(){const e=document.createElement("div");return e.id=o,e.textContent=t,e.style.display="none",ri().appendChild(e),function(){const t=ri();t.contains(e)&&t.removeChild(e)}},[o,t]),o}({contextId:t,text:i}),p=function(e,t){const n=bn(()=>(e=>{const t=(n=e,e=>`[${e}="${n}"]`);var n;const o=(()=>{const e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(Hr.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}})(),r=[(()=>{const e=`\n transition: ${ir.outOfTheWay};\n `;return{selector:t(Wr.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),o,{selector:t(Kr.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:Yr(r,"always"),resting:Yr(r,"resting"),dragging:Yr(r,"dragging"),dropAnimating:Yr(r,"dropAnimating"),userCancel:Yr(r,"userCancel")}})(e),[e]),o=(0,he.useRef)(null),r=(0,he.useRef)(null),i=vn(Mn(e=>{const t=r.current;t||rn(),t.textContent=e}),[]),s=vn(e=>{const t=o.current;t||rn(),t.textContent=e},[]);Zr(()=>{(o.current||r.current)&&rn();const a=Jr(t),d=Jr(t);return o.current=a,r.current=d,a.setAttribute(`${Gr}-always`,e),d.setAttribute(`${Gr}-dynamic`,e),Xr().appendChild(a),Xr().appendChild(d),s(n.always),i(n.resting),()=>{const e=e=>{const t=e.current;t||rn(),Xr().removeChild(t),e.current=null};e(o),e(r)}},[t,s,i,n.always,n.resting,e]);const a=vn(()=>i(n.dragging),[i,n.dragging]),d=vn(e=>{i("DROP"!==e?n.userCancel:n.dropAnimating)},[i,n.dropAnimating,n.userCancel]),l=vn(()=>{r.current&&i(n.resting)},[i,n.resting]);return bn(()=>({dragging:a,dropping:d,resting:l}),[a,d,l])}(t,r),h=vn(e=>{ji(s).dispatch(e)},[]),m=bn(()=>He({publishWhileDragging:Vo,updateDroppableScroll:zo,updateDroppableIsEnabled:Go,updateDroppableIsCombineEnabled:Ho,collectionStarting:Uo},h),[h]),f=function(){const e=bn(ni,[]);return(0,he.useEffect)(()=>function(){e.clean()},[e]),e}(),g=bn(()=>Ir(f,m),[f,m]),b=bn(()=>(({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:o})=>{const r=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>Tr})=>{const o=Jt(e),r=Jt(t);let i=null;const s=e=>{i||rn();const{shouldUseTimeDampening:t,dragStartTime:s}=i;Ur({state:e,scrollWindow:o,scrollDroppable:r,dragStartTime:s,shouldUseTimeDampening:t,getAutoScrollerOptions:n})};return{start:e=>{i&&rn();const t=Date.now();let o=!1;const r=()=>{o=!0};Ur({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:r,scrollDroppable:r,getAutoScrollerOptions:n}),i={dragStartTime:t,shouldUseTimeDampening:o},o&&s(e)},stop:()=>{i&&(o.cancel(),r.cancel(),i=null)},scroll:s}})({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:o}),i=zr({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:e=>{o().disabled||"DRAGGING"!==e.phase||("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):r.scroll(e))},start:r.start,stop:r.stop}})({scrollWindow:Pr,scrollDroppable:g.scrollDroppable,getAutoScrollerOptions:l,...He({move:Wo},h)}),[g.scrollDroppable,h,l]),v=function(e){const t=(0,he.useRef)({}),n=(0,he.useRef)(null),o=(0,he.useRef)(null),r=(0,he.useRef)(!1),i=vn(function(e,n){const o={id:e,focus:n};return t.current[e]=o,function(){const n=t.current;n[e]!==o&&delete n[e]}},[]),s=vn(function(t){const n=function(e,t){const n=`[${Hr.contextId}="${e}"]`,o=Qr(document,n);if(!o.length)return null;const r=o.find(e=>e.getAttribute(Hr.draggableId)===t);return r&&ti(r)?r:null}(e,t);n&&n!==document.activeElement&&n.focus()},[e]),a=vn(function(e,t){n.current===e&&(n.current=t)},[]),d=vn(function(){o.current||r.current&&(o.current=requestAnimationFrame(()=>{o.current=null;const e=n.current;e&&s(e)}))},[s]),l=vn(function(e){n.current=null;const t=document.activeElement;t&&t.getAttribute(Hr.draggableId)===e&&(n.current=e)},[]);return Zr(()=>(r.current=!0,function(){r.current=!1;const e=o.current;e&&cancelAnimationFrame(e)}),[]),bn(()=>({register:i,tryRecordFocus:l,tryRestoreFocusRecorded:d,tryShiftRecord:a}),[i,l,d,a])}(t),$=bn(()=>wr({announce:c,autoScroller:b,dimensionMarshal:g,focusMarshal:v,getResponders:d,styleMarshal:p}),[c,b,g,v,d,p]);s.current=$;const y=vn(()=>{const e=ji(s);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),x=vn(()=>{const e=ji(s).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);n(bn(()=>({isDragging:x,tryAbort:y}),[x,y]));const w=vn(e=>Ar(ji(s).getState(),e),[]),C=vn(()=>So(ji(s).getState()),[]),S=bn(()=>({marshal:g,focus:v,contextId:t,canLift:w,isMovementAllowed:C,dragHandleUsageInstructionsId:u,registry:f}),[t,g,u,v,w,C,f]);return Ri({contextId:t,store:$,registry:f,customSensors:o||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,he.useEffect)(()=>y,[y]),fe().createElement(di.Provider,{value:S},fe().createElement(Vt,{context:oi,store:$},e.children))}function Li(e){const t=fe().useId(),n=e.dragHandleUsageInstructions||un;return fe().createElement(sn,null,o=>fe().createElement(Oi,{nonce:e.nonce,contextId:t,setCallbacks:o,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const Bi=(e,t)=>t?ir.drop(t.duration):e?ir.snap:ir.fluid,Fi=(e,t)=>{if(e)return t?er:tr};function Vi(e){return"DRAGGING"===e.type?function(e){const t=e.dimension.client,{offset:n,combineWith:o,dropping:r}=e,i=Boolean(o),s=(e=>null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode)(e),a=Boolean(r),d=a?((e,t)=>{const n=sr(e);if(n)return t?`${n} scale(${nr})`:n})(n,i):ar(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:Bi(s,r),transform:d,opacity:Fi(i,a),zIndex:a?4500:5e3,pointerEvents:"none"}}(e):{transform:ar((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}var Ui=fe().createContext(null);function zi(e){const t=(0,he.useContext)(e);return t||rn(),t}function Gi(e){e.preventDefault()}var Hi=(e,t)=>e===t,Wi=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};function Ki(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const qi={mapped:{type:"SECONDARY",offset:$n,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Ki(null)}},Yi=Ft(()=>{const e=function(){const e=Mn((e,t)=>({x:e,y:t})),t=Mn((e,t,n=null,o=null,r=null)=>({isDragging:!0,isClone:t,isDropAnimating:Boolean(r),dropAnimation:r,mode:e,draggingOver:n,combineWith:o,combineTargetFor:null})),n=Mn((e,n,o,r,i=null,s=null,a=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:s,mode:n,offset:e,dimension:o,forceShouldAnimate:a,snapshot:t(n,r,i,s,null)}}));return(o,r)=>{if(ci(o)){if(o.critical.draggable.id!==r.draggableId)return null;const t=o.current.client.offset,s=o.dimensions.draggables[r.draggableId],a=wo(o.impact),d=(i=o.impact).at&&"COMBINE"===i.at.type?i.at.combine.draggableId:null,l=o.forceShouldAnimate;return n(e(t.x,t.y),o.movementMode,s,r.isClone,a,d,l)}var i;if("DROP_ANIMATING"===o.phase){const e=o.completed;if(e.result.draggableId!==r.draggableId)return null;const n=r.isClone,i=o.dimensions.draggables[r.draggableId],s=e.result,a=s.mode,d=Wi(s),l=(e=>e.combine?e.combine.draggableId:null)(s),c={duration:o.dropDuration,curve:Qo,moveTo:o.newHomeClientOffset,opacity:l?er:null,scale:l?nr:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:i,dropping:c,draggingOver:d,combineWith:l,mode:a,forceShouldAnimate:null,snapshot:t(a,n,d,l,c)}}}return null}}(),t=function(){const e=Mn((e,t)=>({x:e,y:t})),t=Mn(Ki),n=Mn((e,n=null,o)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:o,snapshot:t(n)}})),o=e=>e?n($n,e,!0):null,r=(t,r,i,s)=>{const a=i.displaced.visible[t],d=Boolean(s.inVirtualList&&s.effected[t]),l=Vn(i),c=l&&l.draggableId===t?r:null;if(!a){if(!d)return o(c);if(i.displaced.invisible[t])return null;const r=Cn(s.displacedBy.point),a=e(r.x,r.y);return n(a,c,!0)}if(d)return o(c);const u=i.displacedBy.point,p=e(u.x,u.y);return n(p,c,a.shouldAnimate)};return(e,t)=>{if(ci(e))return e.critical.draggable.id===t.draggableId?null:r(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){const n=e.completed;return n.result.draggableId===t.draggableId?null:r(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return(n,o)=>e(n,o)||t(n,o)||qi},{dropAnimationFinished:()=>({type:"DROP_ANIMATION_FINISHED",payload:null})},null,{context:oi,areStatePropsEqual:Hi})(e=>{const t=(0,he.useRef)(null),n=vn((e=null)=>{t.current=e},[]),o=vn(()=>t.current,[]),{contextId:r,dragHandleUsageInstructionsId:i,registry:s}=zi(di),{type:a,droppableId:d}=zi(Ui),l=bn(()=>({id:e.draggableId,index:e.index,type:a,droppableId:d}),[e.draggableId,e.index,a,d]),{children:c,draggableId:u,isEnabled:p,shouldRespectForcePress:h,canDragInteractiveElements:m,isClone:f,mapped:g,dropAnimationFinished:b}=e;f||function(e){const t=ai("draggable"),{descriptor:n,registry:o,getDraggableRef:r,canDragInteractiveElements:i,shouldRespectForcePress:s,isEnabled:a}=e,d=bn(()=>({canDragInteractiveElements:i,shouldRespectForcePress:s,isEnabled:a}),[i,a,s]),l=vn(e=>{const t=r();return t||rn(),function(e,t,n=$n){const o=window.getComputedStyle(t),r=t.getBoundingClientRect(),i=Zt(r,o),s=Yt(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:o.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:s}}(n,t,e)},[n,r]),c=bn(()=>({uniqueId:t,descriptor:n,options:d,getDimension:l}),[n,l,d,t]),u=(0,he.useRef)(c),p=(0,he.useRef)(!0);Zr(()=>(o.draggable.register(u.current),()=>o.draggable.unregister(u.current)),[o.draggable]),Zr(()=>{if(p.current)return void(p.current=!1);const e=u.current;u.current=c,o.draggable.update(c,e)},[c,o.draggable])}(bn(()=>({descriptor:l,registry:s,getDraggableRef:o,canDragInteractiveElements:m,shouldRespectForcePress:h,isEnabled:p}),[l,s,o,m,h,p]));const v=bn(()=>p?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":u,"data-rfd-drag-handle-context-id":r,draggable:!1,onDragStart:Gi}:null,[r,i,u,p]),$=vn(e=>{"DRAGGING"===g.type&&g.dropping&&"transform"===e.propertyName&&(0,Oe.flushSync)(b)},[b,g]),y=bn(()=>{const e=Vi(g),t="DRAGGING"===g.type&&g.dropping?$:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":r,"data-rfd-draggable-id":u,style:e,onTransitionEnd:t},dragHandleProps:v}},[r,v,u,g,$,n]),x=bn(()=>({draggableId:l.id,type:l.type,source:{index:l.index,droppableId:l.droppableId}}),[l.droppableId,l.id,l.index,l.type]);return fe().createElement(fe().Fragment,null,c(y,g.snapshot,x))});function Zi(e){return zi(Ui).isUsingCloneFor!==e.draggableId||e.isClone?fe().createElement(Yi,e):null}function Xi(e){const t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),o=Boolean(e.shouldRespectForcePress);return fe().createElement(Zi,Qt({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:o}))}const Ji=e=>t=>e===t,Qi=Ji("scroll"),es=Ji("auto"),ts=(Ji("visible"),(e,t)=>t(e.overflowX)||t(e.overflowY)),ns=e=>null==e||e===document.body||e===document.documentElement?null:(e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return ts(n,Qi)||ts(n,es)})(e)?e:ns(e.parentElement);var os=e=>({x:e.scrollLeft,y:e.scrollTop});const rs=e=>!!e&&("fixed"===window.getComputedStyle(e).position||rs(e.parentElement));const is={passive:!1},ss={passive:!0};var as=e=>e.shouldPublishImmediately?is:ss;const ds=e=>e&&e.env.closestScrollable||null;function ls(e){const t=(0,he.useRef)(null),n=zi(di),o=ai("droppable"),{registry:r,marshal:i}=n,s=li(e),a=bn(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),d=(0,he.useRef)(a),l=bn(()=>Mn((e,n)=>{t.current||rn();const o={x:e,y:n};i.updateDroppableScroll(a.id,o)}),[a.id,i]),c=vn(()=>{const e=t.current;return e&&e.env.closestScrollable?os(e.env.closestScrollable):$n},[]),u=vn(()=>{const e=c();l(e.x,e.y)},[c,l]),p=bn(()=>Jt(u),[u]),h=vn(()=>{const e=t.current,n=ds(e);e&&n||rn(),e.scrollOptions.shouldPublishImmediately?u():p()},[p,u]),m=vn((e,o)=>{t.current&&rn();const r=s.current,i=r.getDroppableRef();i||rn();const d=(e=>({closestScrollable:ns(e),isFixedOnPage:rs(e)}))(i),l={ref:i,descriptor:a,env:d,scrollOptions:o};t.current=l;const c=(({ref:e,descriptor:t,env:n,windowScroll:o,direction:r,isDropDisabled:i,isCombineEnabled:s,shouldClipSubject:a})=>{const d=n.closestScrollable,l=((e,t)=>{const n=Xt(e);if(!t)return n;if(e!==t)return n;const o=n.paddingBox.top-t.scrollTop,r=n.paddingBox.left-t.scrollLeft,i=o+t.scrollHeight,s=r+t.scrollWidth,a=zt({top:o,right:s,bottom:i,left:r},n.border);return Wt({borderBox:a,margin:n.margin,border:n.border,padding:n.padding})})(e,d),c=Yt(l,o),u=(()=>{if(!d)return null;const e=Xt(d),t={scrollHeight:d.scrollHeight,scrollWidth:d.scrollWidth};return{client:e,page:Yt(e,o),scroll:os(d),scrollSize:t,shouldClipSubject:a}})(),p=(({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:o,direction:r,client:i,page:s,closest:a})=>{const d=(()=>{if(!a)return null;const{scrollSize:e,client:t}=a,n=Cr({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:a.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:a.shouldClipSubject,scroll:{initial:a.scroll,current:a.scroll,max:n,diff:{value:$n,displacement:$n}}}})(),l="vertical"===r?Zn:Xn;return{descriptor:e,isCombineEnabled:n,isFixedOnPage:o,axis:l,isEnabled:t,client:i,page:s,frame:d,subject:Nn({page:s,withPlaceholder:null,axis:l,frame:d})}})({descriptor:t,isEnabled:!i,isCombineEnabled:s,isFixedOnPage:n.isFixedOnPage,direction:r,client:l,page:c,closest:u});return p})({ref:i,descriptor:a,env:d,windowScroll:e,direction:r.direction,isDropDisabled:r.isDropDisabled,isCombineEnabled:r.isCombineEnabled,shouldClipSubject:!r.ignoreContainerClipping}),u=d.closestScrollable;return u&&(u.setAttribute(qr.contextId,n.contextId),u.addEventListener("scroll",h,as(l.scrollOptions))),c},[n.contextId,a,h,s]),f=vn(()=>{const e=t.current,n=ds(e);return e&&n||rn(),os(n)},[]),g=vn(()=>{const e=t.current;e||rn();const n=ds(e);t.current=null,n&&(p.cancel(),n.removeAttribute(qr.contextId),n.removeEventListener("scroll",h,as(e.scrollOptions)))},[h,p]),b=vn(e=>{const n=t.current;n||rn();const o=ds(n);o||rn(),o.scrollTop+=e.y,o.scrollLeft+=e.x},[]),v=bn(()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:f,dragStopped:g,scroll:b}),[g,m,f,b]),$=bn(()=>({uniqueId:o,descriptor:a,callbacks:v}),[v,a,o]);Zr(()=>(d.current=$.descriptor,r.droppable.register($),()=>{t.current&&g(),r.droppable.unregister($)}),[v,a,g,$,i,r.droppable]),Zr(()=>{t.current&&i.updateDroppableIsEnabled(d.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),Zr(()=>{t.current&&i.updateDroppableIsCombineEnabled(d.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function cs(){}const us={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};var ps=fe().memo(e=>{const t=(0,he.useRef)(null),n=vn(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:o,onTransitionEnd:r,onClose:i,contextId:s}=e,[a,d]=(0,he.useState)("open"===e.animate);(0,he.useEffect)(()=>a?"open"!==o?(n(),d(!1),cs):t.current?cs:(t.current=setTimeout(()=>{t.current=null,d(!1)}),n):cs,[o,a,n]);const l=vn(e=>{"height"===e.propertyName&&(r(),"close"===o&&i())},[o,i,r]),c=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const o=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||"close"===n?us:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin})({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==n?ir.placeholder:null}})({isAnimatingOpenOnMount:a,animate:e.animate,placeholder:e.placeholder});return fe().createElement(e.placeholder.tagName,{style:c,"data-rfd-placeholder-context-id":s,onTransitionEnd:l,ref:e.innerRef})});class hs extends fe().PureComponent{constructor(...e){super(...e),this.state={isVisible:Boolean(this.props.on),data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}const ms={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||rn(),document.body}},fs=e=>{let t,n={...e};for(t in ms)void 0===e[t]&&(n={...n,[t]:ms[t]});return n},gs=(e,t)=>e===t.droppable.type,bs=(e,t)=>t.draggables[e.draggable.id],vs=Ft(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=Mn(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),o=Mn((o,r,i,s,a,d)=>{const l=a.descriptor.id;if(a.descriptor.droppableId===o){const e=d?{render:d,dragging:n(a.descriptor)}:null,t={isDraggingOver:i,draggingOverWith:i?l:null,draggingFromThisWith:l,isUsingPlaceholder:!0};return{placeholder:a.placeholder,shouldAnimatePlaceholder:!1,snapshot:t,useClone:e}}if(!r)return t;if(!s)return e;const c={isDraggingOver:i,draggingOverWith:l,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:a.placeholder,shouldAnimatePlaceholder:!0,snapshot:c,useClone:null}});return(n,r)=>{const i=fs(r),s=i.droppableId,a=i.type,d=!i.isDropDisabled,l=i.renderClone;if(ci(n)){const e=n.critical;if(!gs(a,e))return t;const r=bs(e,n.dimensions),i=wo(n.impact)===s;return o(s,d,i,i,r,l)}if("DROP_ANIMATING"===n.phase){const e=n.completed;if(!gs(a,e.critical))return t;const r=bs(e.critical,n.dimensions);return o(s,d,Wi(e.result)===s,wo(e.impact)===s,r,l)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){const o=n.completed;if(!gs(a,o.critical))return t;const r=wo(o.impact)===s,i=Boolean(o.impact.at&&"COMBINE"===o.impact.at.type),d=o.critical.droppable.id===s;return r?i?e:t:d?e:t}return t}},{updateViewportMaxScroll:e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e})},(e,t,n)=>({...fs(n),...e,...t}),{context:oi,areStatePropsEqual:Hi})(e=>{const t=(0,he.useContext)(di);t||rn();const{contextId:n,isMovementAllowed:o}=t,r=(0,he.useRef)(null),i=(0,he.useRef)(null),{children:s,droppableId:a,type:d,mode:l,direction:c,ignoreContainerClipping:u,isDropDisabled:p,isCombineEnabled:h,snapshot:m,useClone:f,updateViewportMaxScroll:g,getContainerForClone:b}=e,v=vn(()=>r.current,[]),$=vn((e=null)=>{r.current=e},[]),y=(vn(()=>i.current,[]),vn((e=null)=>{i.current=e},[])),x=vn(()=>{o()&&g({maxScroll:_r()})},[o,g]);ls({droppableId:a,type:d,mode:l,direction:c,isDropDisabled:p,isCombineEnabled:h,ignoreContainerClipping:u,getDroppableRef:v});const w=bn(()=>fe().createElement(hs,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:e,data:t,animate:o})=>fe().createElement(ps,{placeholder:t,onClose:e,innerRef:y,animate:o,contextId:n,onTransitionEnd:x})),[n,x,e.placeholder,e.shouldAnimatePlaceholder,y]),C=bn(()=>({innerRef:$,placeholder:w,droppableProps:{"data-rfd-droppable-id":a,"data-rfd-droppable-context-id":n}}),[n,a,w,$]),S=f?f.dragging.draggableId:null,_=bn(()=>({droppableId:a,type:d,isUsingCloneFor:S}),[a,S,d]);return fe().createElement(Ui.Provider,{value:_},s(C,m),function(){if(!f)return null;const{dragging:e,render:t}=f,n=fe().createElement(Zi,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(n,o)=>t(n,o,e));return Le().createPortal(n,b())}())}),$s=e=>{const{options:t,titleKey:n,closeModal:r,insertOptions:s}=e,a=(0,l.useMemo)(()=>t.map(e=>e?.[n]?.trim()).join("\n"),[t,n]),[d,c]=(0,l.useState)(a),[p,h]=(0,l.useState)({}),f=(0,l.useRef)(null);return(0,l.useEffect)(()=>{if(f?.current){const e=f.current.offsetHeight;h({paddingTop:`${e+24}px`})}},[]),(0,u.jsxs)(o.Modal,{onRequestClose:r,title:(0,i.__)("Bulk Add","suredonation"),className:"sd-bulk-edit-modal",isFullScreen:!1,children:[(0,u.jsxs)("div",{className:"sd-modal-header",ref:f,children:[(0,u.jsx)("div",{className:"sd-modal-header-content",children:(0,u.jsx)("div",{className:"sd-modal-title",children:(0,u.jsx)("h1",{children:(0,i.__)("Bulk Add Options","suredonation")})})}),(0,u.jsx)("div",{className:"sd-modal-header-close-icon",onClick:r,children:"×"})]}),(0,u.jsx)("div",{className:"sd-modal-body",style:p,children:(0,u.jsxs)("div",{className:"sd-modal-body-content",children:[(0,u.jsx)("p",{className:"sd-modal-help-text",children:(0,i.__)("Enter each option on a new line.","suredonation")}),(0,u.jsx)("textarea",{onChange:e=>{m(e.target.value)||c(e.target.value)},value:d,className:"sd-bulk-edit-textarea"}),(0,u.jsxs)("div",{className:"sd-body-footer",children:[(0,u.jsx)(o.Button,{isSecondary:!0,onClick:r,className:"sd-cancel-button",children:(0,i.__)("Cancel","suredonation")}),(0,u.jsx)(o.Button,{isPrimary:!0,onClick:()=>{const e=[...t],o=d.split("\n").reduce((t,o)=>{if(""===(o=o.trim()))return t;const r=e.findIndex(e=>e?.[n]?.trim()===o);if(r>-1){const n={...e[r]};t.push({...n}),e.splice(r,1)}else t.push({[n]:o});return t},[]);s(o)},className:"sd-insert-button",children:(0,i.__)("Insert Options","suredonation")})]})]})})]})},ys=e=>{const{options:t,titleKey:n,insertOptions:r}=e,[s,a]=(0,l.useState)(!1),d=()=>a(!1);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o.Button,{className:"sd-add-bulk-option-button",variant:"link",onClick:()=>{a(!0)},children:(0,i.__)("Bulk Edit","suredonation")}),s&&(0,u.jsx)($s,{closeModal:d,titleKey:n,options:t,insertOptions:e=>{r(e,d)}})]})},xs=()=>(0,u.jsx)("hr",{style:{margin:"16px -16px",borderTop:"1px solid #e0e0e0"}}),ws=JSON.parse('{"UU":"suredonation/dropdown"}');(0,s.registerBlockType)(ws.UU,{icon:function(e){return ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M24 24H0V0h24v24z",opacity:".87"}},{tag:"path",attr:{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"}}]})(e)},edit:({attributes:e,setAttributes:t})=>{const{block_id:r,label:s,help:a,required:d,errorMsg:c,placeholder:p,options:$,multiSelect:y,searchable:x,minSelection:w,maxSelection:C,preselectedOptions:S,fieldWidth:_}=e,{currentMessage:E,setCurrentMessage:I}=h("suredonation_dropdown_block_required_text",c),[A,P]=(0,l.useState)(""),k=(0,n.useBlockProps)({className:`sd-block sd-dropdown-block sd-block-width-${_}`}),T=(0,v.useSelect)(e=>e("core/editor")?.getCurrentPostId()||0,[]);function N(e){const n=[...$];n.splice(e,1);const o=(S||[]).filter(t=>t!==e).map(t=>t>e?t-1:t);t({options:n,preselectedOptions:o})}(0,l.useEffect)(()=>{r||t({block_id:g()})},[r,t]),(0,l.useEffect)(()=>{Array.isArray($)&&$.some(e=>!e?.id)&&t({options:$.map(e=>e?.id?e:{...e,id:g()})})},[$,t]),(0,l.useEffect)(()=>{T&&e.formId!==T&&t({formId:T})},[T,e.formId,t]);const D=e=>{t({options:[...$,{id:g(),label:e}]}),P("")},M=e=>(S||[]).includes(e),R=(e,n,o)=>(0,u.jsxs)("div",{children:[(0,u.jsx)("span",{className:"sd-option-drag-handle",...n.dragHandleProps,children:(0,u.jsx)(we,{style:{width:"20px",height:"20px"}})}),(0,u.jsx)("div",{className:"sd-option-outer-text-control",children:(0,u.jsx)(ce,{showHeaderControls:!1,value:e.label,onChange:e=>function(e,n){m(e)||(""!==e?((e,n)=>{const o=$.map((t,o)=>(n===o&&(t={...t,...e}),t));t({options:o})})({label:e},n):N(n))}(e,o)},e.id)}),(0,u.jsx)("div",{className:"sd-options-delete",children:(0,u.jsx)(je,{style:{width:"20px",height:"20px",color:"#6B7280"},onClick:()=>N(o)})})]}),j=$.length>0&&(0,u.jsxs)("div",{style:{marginBottom:"8px"},children:[(0,u.jsx)("span",{className:"sd-control-label sd-control__header",children:(0,i.__)("Edit Options","suredonation")}),(0,u.jsx)(Li,{onDragEnd:e=>{if(!e.destination)return;const n=e.source.index,o=e.destination.index;if(n!==o){const e=[...$];e.splice(o,0,e.splice(n,1)[0]);const s=(r=n,i=o,(S||[]).map(e=>e===r?i:rr&&e<=i?e-1:r>i&&e>=i&&e{return(0,u.jsxs)("div",{ref:e.innerRef,...e.droppableProps,children:[(n=$,n.map((e,n)=>{const o=e.id||`sd-opt-${n}`;return(0,u.jsx)(Xi,{draggableId:o,index:n,children:o=>(0,u.jsxs)("div",{ref:o.innerRef,className:"sd-option-outer-wrapper",...o.draggableProps,children:[(0,u.jsx)("div",{className:"sd-preselection-control",children:(0,u.jsx)("input",{type:y?"checkbox":"radio",checked:M(n),onClick:()=>(e=>{let n=[...S||[]];y?n.includes(e)?n=n.filter(t=>t!==e):n.push(e):n=n.includes(e)?[]:[e],t({preselectedOptions:n})})(n),onChange:()=>{},title:(0,i.__)("Preselect this option","suredonation"),"aria-label":(0,i.__)("Preselect this option","suredonation")})}),R(e,o,n)]})},o)})),e.placeholder]});var n}})})]}),O=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:"sd-add-option-container",onKeyDown:e=>{"Enter"===e.key&&A&&D(A)},children:[(0,u.jsxs)("div",{className:"sd-add-option-input-wrapper",children:[(0,u.jsx)(ce,{showHeaderControls:!1,label:(0,i.__)("Add New Option","suredonation"),value:A,onChange:e=>P(e)}),(0,u.jsx)(o.Button,{className:"sd-add-option-button",variant:"secondary",onClick:()=>{A&&D(A)},children:(0,i.__)("ADD","suredonation")})]}),(0,u.jsx)(ys,{options:$,titleKey:"label",insertOptions:(e,n)=>{t({options:e}),n()}})]}),(0,u.jsx)("span",{className:"sd-control-label sd-control__header"})]});return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsxs)(L,{tabs:["general","advance"],children:[(0,u.jsxs)(B,{...F,children:[(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Required","suredonation"),checked:d,onChange:e=>t({required:e})}),d&&(0,u.jsx)(ce,{label:(0,i.__)("Error Message","suredonation"),value:E,onChange:e=>{I(e),t({errorMsg:e})}}),(0,u.jsx)(ce,{label:(0,i.__)("Placeholder","suredonation"),value:p,onChange:e=>t({placeholder:e})}),(0,u.jsx)(ce,{label:(0,i.__)("Help Text","suredonation"),variant:"textarea",value:a,onChange:e=>t({help:e})}),(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Allow Multiple","suredonation"),checked:y,onChange:e=>t({multiSelect:e})}),(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Enable Dropdown Search","suredonation"),checked:x,onChange:e=>t({searchable:e})}),y&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o.__experimentalNumberControl,{label:(0,i.__)("Minimum selections","suredonation"),value:w,onChange:e=>t({minSelection:e}),min:0,max:$.length}),(0,u.jsx)(o.__experimentalNumberControl,{label:(0,i.__)("Maximum selections (0 = no limit)","suredonation"),value:C,onChange:e=>t({maxSelection:e}),min:0,max:$.length})]}),(0,u.jsx)(xs,{}),j,O]}),(0,u.jsx)(B,{...V})]})}),(0,u.jsx)("div",{...k,children:(0,u.jsxs)("div",{className:"sd-block-preview",children:[(0,u.jsx)(n.RichText,{tagName:"label",value:s,onChange:e=>t({label:f(e)}),className:"sd-label"+(d?" sd-required":""),multiline:!1,allowedFormats:[],placeholder:(0,i.__)("Label","suredonation")}),(0,u.jsx)(b,{help:a,setAttributes:t,block_id:r}),(0,u.jsxs)("div",{className:"sd-block-wrap sd-dropdown-common-wrap",children:[(0,u.jsx)("input",{type:"text",className:"sd-input-common sd-dropdown-input","aria-required":d?"true":"false",placeholder:p||(0,i.__)("Select an option","suredonation"),readOnly:!0}),(0,u.jsx)("div",{className:"ts-dropdown-icon",children:(0,u.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,u.jsx)("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeOpacity:"0.65",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,u.jsx)("div",{className:"sd-error-wrap"})]})})]})},save:()=>null});const Cs=JSON.parse('[{"name":"Afghanistan","dial_code":"+93","code":"AF"},{"name":"Aland Islands","dial_code":"+358","code":"AX"},{"name":"Albania","dial_code":"+355","code":"AL"},{"name":"Algeria","dial_code":"+213","code":"DZ"},{"name":"American Samoa","dial_code":"+1684","code":"AS"},{"name":"Andorra","dial_code":"+376","code":"AD"},{"name":"Angola","dial_code":"+244","code":"AO"},{"name":"Anguilla","dial_code":"+1264","code":"AI"},{"name":"Antarctica","dial_code":"+672","code":"AQ"},{"name":"Antigua and Barbuda","dial_code":"+1268","code":"AG"},{"name":"Argentina","dial_code":"+54","code":"AR"},{"name":"Armenia","dial_code":"+374","code":"AM"},{"name":"Aruba","dial_code":"+297","code":"AW"},{"name":"Australia","dial_code":"+61","code":"AU"},{"name":"Austria","dial_code":"+43","code":"AT"},{"name":"Azerbaijan","dial_code":"+994","code":"AZ"},{"name":"Bahamas","dial_code":"+1242","code":"BS"},{"name":"Bahrain","dial_code":"+973","code":"BH"},{"name":"Bangladesh","dial_code":"+880","code":"BD"},{"name":"Barbados","dial_code":"+1246","code":"BB"},{"name":"Belarus","dial_code":"+375","code":"BY"},{"name":"Belgium","dial_code":"+32","code":"BE"},{"name":"Belize","dial_code":"+501","code":"BZ"},{"name":"Benin","dial_code":"+229","code":"BJ"},{"name":"Bermuda","dial_code":"+1441","code":"BM"},{"name":"Bhutan","dial_code":"+975","code":"BT"},{"name":"Bolivia, Plurinational State of","dial_code":"+591","code":"BO"},{"name":"Bosnia and Herzegovina","dial_code":"+387","code":"BA"},{"name":"Botswana","dial_code":"+267","code":"BW"},{"name":"Brazil","dial_code":"+55","code":"BR"},{"name":"British Indian Ocean Territory","dial_code":"+246","code":"IO"},{"name":"Brunei Darussalam","dial_code":"+673","code":"BN"},{"name":"Bulgaria","dial_code":"+359","code":"BG"},{"name":"Burkina Faso","dial_code":"+226","code":"BF"},{"name":"Burundi","dial_code":"+257","code":"BI"},{"name":"Cambodia","dial_code":"+855","code":"KH"},{"name":"Cameroon","dial_code":"+237","code":"CM"},{"name":"Canada","dial_code":"+1","code":"CA"},{"name":"Cape Verde","dial_code":"+238","code":"CV"},{"name":"Cayman Islands","dial_code":"+ 345","code":"KY"},{"name":"Central African Republic","dial_code":"+236","code":"CF"},{"name":"Chad","dial_code":"+235","code":"TD"},{"name":"Chile","dial_code":"+56","code":"CL"},{"name":"China","dial_code":"+86","code":"CN"},{"name":"Christmas Island","dial_code":"+61","code":"CX"},{"name":"Cocos (Keeling) Islands","dial_code":"+61","code":"CC"},{"name":"Colombia","dial_code":"+57","code":"CO"},{"name":"Comoros","dial_code":"+269","code":"KM"},{"name":"Congo","dial_code":"+242","code":"CG"},{"name":"Congo, The Democratic Republic of the Congo","dial_code":"+243","code":"CD"},{"name":"Cook Islands","dial_code":"+682","code":"CK"},{"name":"Costa Rica","dial_code":"+506","code":"CR"},{"name":"Cote d\'Ivoire","dial_code":"+225","code":"CI"},{"name":"Croatia","dial_code":"+385","code":"HR"},{"name":"Cuba","dial_code":"+53","code":"CU"},{"name":"Cyprus","dial_code":"+357","code":"CY"},{"name":"Czech Republic","dial_code":"+420","code":"CZ"},{"name":"Denmark","dial_code":"+45","code":"DK"},{"name":"Djibouti","dial_code":"+253","code":"DJ"},{"name":"Dominica","dial_code":"+1767","code":"DM"},{"name":"Dominican Republic","dial_code":"+1849","code":"DO"},{"name":"Ecuador","dial_code":"+593","code":"EC"},{"name":"Egypt","dial_code":"+20","code":"EG"},{"name":"El Salvador","dial_code":"+503","code":"SV"},{"name":"Equatorial Guinea","dial_code":"+240","code":"GQ"},{"name":"Eritrea","dial_code":"+291","code":"ER"},{"name":"Estonia","dial_code":"+372","code":"EE"},{"name":"Ethiopia","dial_code":"+251","code":"ET"},{"name":"Falkland Islands (Malvinas)","dial_code":"+500","code":"FK"},{"name":"Faroe Islands","dial_code":"+298","code":"FO"},{"name":"Fiji","dial_code":"+679","code":"FJ"},{"name":"Finland","dial_code":"+358","code":"FI"},{"name":"France","dial_code":"+33","code":"FR"},{"name":"French Guiana","dial_code":"+594","code":"GF"},{"name":"French Polynesia","dial_code":"+689","code":"PF"},{"name":"Gabon","dial_code":"+241","code":"GA"},{"name":"Gambia","dial_code":"+220","code":"GM"},{"name":"Georgia","dial_code":"+995","code":"GE"},{"name":"Germany","dial_code":"+49","code":"DE"},{"name":"Ghana","dial_code":"+233","code":"GH"},{"name":"Gibraltar","dial_code":"+350","code":"GI"},{"name":"Greece","dial_code":"+30","code":"GR"},{"name":"Greenland","dial_code":"+299","code":"GL"},{"name":"Grenada","dial_code":"+1473","code":"GD"},{"name":"Guadeloupe","dial_code":"+590","code":"GP"},{"name":"Guam","dial_code":"+1671","code":"GU"},{"name":"Guatemala","dial_code":"+502","code":"GT"},{"name":"Guernsey","dial_code":"+44","code":"GG"},{"name":"Guinea","dial_code":"+224","code":"GN"},{"name":"Guinea-Bissau","dial_code":"+245","code":"GW"},{"name":"Guyana","dial_code":"+595","code":"GY"},{"name":"Haiti","dial_code":"+509","code":"HT"},{"name":"Holy See (Vatican City State)","dial_code":"+379","code":"VA"},{"name":"Honduras","dial_code":"+504","code":"HN"},{"name":"Hong Kong","dial_code":"+852","code":"HK"},{"name":"Hungary","dial_code":"+36","code":"HU"},{"name":"Iceland","dial_code":"+354","code":"IS"},{"name":"India","dial_code":"+91","code":"IN"},{"name":"Indonesia","dial_code":"+62","code":"ID"},{"name":"Iran, Islamic Republic of Persian Gulf","dial_code":"+98","code":"IR"},{"name":"Iraq","dial_code":"+964","code":"IQ"},{"name":"Ireland","dial_code":"+353","code":"IE"},{"name":"Isle of Man","dial_code":"+44","code":"IM"},{"name":"Israel","dial_code":"+972","code":"IL"},{"name":"Italy","dial_code":"+39","code":"IT"},{"name":"Jamaica","dial_code":"+1876","code":"JM"},{"name":"Japan","dial_code":"+81","code":"JP"},{"name":"Jersey","dial_code":"+44","code":"JE"},{"name":"Jordan","dial_code":"+962","code":"JO"},{"name":"Kazakhstan","dial_code":"+77","code":"KZ"},{"name":"Kenya","dial_code":"+254","code":"KE"},{"name":"Kiribati","dial_code":"+686","code":"KI"},{"name":"Korea, Democratic People\'s Republic of Korea","dial_code":"+850","code":"KP"},{"name":"Korea, Republic of South Korea","dial_code":"+82","code":"KR"},{"name":"Kuwait","dial_code":"+965","code":"KW"},{"name":"Kyrgyzstan","dial_code":"+996","code":"KG"},{"name":"Laos","dial_code":"+856","code":"LA"},{"name":"Latvia","dial_code":"+371","code":"LV"},{"name":"Lebanon","dial_code":"+961","code":"LB"},{"name":"Lesotho","dial_code":"+266","code":"LS"},{"name":"Liberia","dial_code":"+231","code":"LR"},{"name":"Libyan Arab Jamahiriya","dial_code":"+218","code":"LY"},{"name":"Liechtenstein","dial_code":"+423","code":"LI"},{"name":"Lithuania","dial_code":"+370","code":"LT"},{"name":"Luxembourg","dial_code":"+352","code":"LU"},{"name":"Macao","dial_code":"+853","code":"MO"},{"name":"Macedonia","dial_code":"+389","code":"MK"},{"name":"Madagascar","dial_code":"+261","code":"MG"},{"name":"Malawi","dial_code":"+265","code":"MW"},{"name":"Malaysia","dial_code":"+60","code":"MY"},{"name":"Maldives","dial_code":"+960","code":"MV"},{"name":"Mali","dial_code":"+223","code":"ML"},{"name":"Malta","dial_code":"+356","code":"MT"},{"name":"Marshall Islands","dial_code":"+692","code":"MH"},{"name":"Martinique","dial_code":"+596","code":"MQ"},{"name":"Mauritania","dial_code":"+222","code":"MR"},{"name":"Mauritius","dial_code":"+230","code":"MU"},{"name":"Mayotte","dial_code":"+262","code":"YT"},{"name":"Mexico","dial_code":"+52","code":"MX"},{"name":"Micronesia, Federated States of Micronesia","dial_code":"+691","code":"FM"},{"name":"Moldova","dial_code":"+373","code":"MD"},{"name":"Monaco","dial_code":"+377","code":"MC"},{"name":"Mongolia","dial_code":"+976","code":"MN"},{"name":"Montenegro","dial_code":"+382","code":"ME"},{"name":"Montserrat","dial_code":"+1664","code":"MS"},{"name":"Morocco","dial_code":"+212","code":"MA"},{"name":"Mozambique","dial_code":"+258","code":"MZ"},{"name":"Myanmar","dial_code":"+95","code":"MM"},{"name":"Namibia","dial_code":"+264","code":"NA"},{"name":"Nauru","dial_code":"+674","code":"NR"},{"name":"Nepal","dial_code":"+977","code":"NP"},{"name":"Netherlands","dial_code":"+31","code":"NL"},{"name":"Netherlands Antilles","dial_code":"+599","code":"AN"},{"name":"New Caledonia","dial_code":"+687","code":"NC"},{"name":"New Zealand","dial_code":"+64","code":"NZ"},{"name":"Nicaragua","dial_code":"+505","code":"NI"},{"name":"Niger","dial_code":"+227","code":"NE"},{"name":"Nigeria","dial_code":"+234","code":"NG"},{"name":"Niue","dial_code":"+683","code":"NU"},{"name":"Norfolk Island","dial_code":"+672","code":"NF"},{"name":"Northern Mariana Islands","dial_code":"+1670","code":"MP"},{"name":"Norway","dial_code":"+47","code":"NO"},{"name":"Oman","dial_code":"+968","code":"OM"},{"name":"Pakistan","dial_code":"+92","code":"PK"},{"name":"Palau","dial_code":"+680","code":"PW"},{"name":"Palestinian Territory, Occupied","dial_code":"+970","code":"PS"},{"name":"Panama","dial_code":"+507","code":"PA"},{"name":"Papua New Guinea","dial_code":"+675","code":"PG"},{"name":"Paraguay","dial_code":"+595","code":"PY"},{"name":"Peru","dial_code":"+51","code":"PE"},{"name":"Philippines","dial_code":"+63","code":"PH"},{"name":"Pitcairn","dial_code":"+872","code":"PN"},{"name":"Poland","dial_code":"+48","code":"PL"},{"name":"Portugal","dial_code":"+351","code":"PT"},{"name":"Puerto Rico","dial_code":"+1939","code":"PR"},{"name":"Qatar","dial_code":"+974","code":"QA"},{"name":"Romania","dial_code":"+40","code":"RO"},{"name":"Russia","dial_code":"+7","code":"RU"},{"name":"Rwanda","dial_code":"+250","code":"RW"},{"name":"Reunion","dial_code":"+262","code":"RE"},{"name":"Saint Barthelemy","dial_code":"+590","code":"BL"},{"name":"Saint Helena, Ascension and Tristan Da Cunha","dial_code":"+290","code":"SH"},{"name":"Saint Kitts and Nevis","dial_code":"+1869","code":"KN"},{"name":"Saint Lucia","dial_code":"+1758","code":"LC"},{"name":"Saint Martin","dial_code":"+590","code":"MF"},{"name":"Saint Pierre and Miquelon","dial_code":"+508","code":"PM"},{"name":"Saint Vincent and the Grenadines","dial_code":"+1784","code":"VC"},{"name":"Samoa","dial_code":"+685","code":"WS"},{"name":"San Marino","dial_code":"+378","code":"SM"},{"name":"Sao Tome and Principe","dial_code":"+239","code":"ST"},{"name":"Saudi Arabia","dial_code":"+966","code":"SA"},{"name":"Senegal","dial_code":"+221","code":"SN"},{"name":"Serbia","dial_code":"+381","code":"RS"},{"name":"Seychelles","dial_code":"+248","code":"SC"},{"name":"Sierra Leone","dial_code":"+232","code":"SL"},{"name":"Singapore","dial_code":"+65","code":"SG"},{"name":"Slovakia","dial_code":"+421","code":"SK"},{"name":"Slovenia","dial_code":"+386","code":"SI"},{"name":"Solomon Islands","dial_code":"+677","code":"SB"},{"name":"Somalia","dial_code":"+252","code":"SO"},{"name":"South Africa","dial_code":"+27","code":"ZA"},{"name":"South Sudan","dial_code":"+211","code":"SS"},{"name":"South Georgia and the South Sandwich Islands","dial_code":"+500","code":"GS"},{"name":"Spain","dial_code":"+34","code":"ES"},{"name":"Sri Lanka","dial_code":"+94","code":"LK"},{"name":"Sudan","dial_code":"+249","code":"SD"},{"name":"Suriname","dial_code":"+597","code":"SR"},{"name":"Svalbard and Jan Mayen","dial_code":"+47","code":"SJ"},{"name":"Swaziland","dial_code":"+268","code":"SZ"},{"name":"Sweden","dial_code":"+46","code":"SE"},{"name":"Switzerland","dial_code":"+41","code":"CH"},{"name":"Syrian Arab Republic","dial_code":"+963","code":"SY"},{"name":"Taiwan","dial_code":"+886","code":"TW"},{"name":"Tajikistan","dial_code":"+992","code":"TJ"},{"name":"Tanzania, United Republic of Tanzania","dial_code":"+255","code":"TZ"},{"name":"Thailand","dial_code":"+66","code":"TH"},{"name":"Timor-Leste","dial_code":"+670","code":"TL"},{"name":"Togo","dial_code":"+228","code":"TG"},{"name":"Tokelau","dial_code":"+690","code":"TK"},{"name":"Tonga","dial_code":"+676","code":"TO"},{"name":"Trinidad and Tobago","dial_code":"+1868","code":"TT"},{"name":"Tunisia","dial_code":"+216","code":"TN"},{"name":"Turkey","dial_code":"+90","code":"TR"},{"name":"Turkmenistan","dial_code":"+993","code":"TM"},{"name":"Turks and Caicos Islands","dial_code":"+1649","code":"TC"},{"name":"Tuvalu","dial_code":"+688","code":"TV"},{"name":"Uganda","dial_code":"+256","code":"UG"},{"name":"Ukraine","dial_code":"+380","code":"UA"},{"name":"United Arab Emirates","dial_code":"+971","code":"AE"},{"name":"United Kingdom","dial_code":"+44","code":"GB"},{"name":"United States","dial_code":"+1","code":"US"},{"name":"Uruguay","dial_code":"+598","code":"UY"},{"name":"Uzbekistan","dial_code":"+998","code":"UZ"},{"name":"Vanuatu","dial_code":"+678","code":"VU"},{"name":"Venezuela, Bolivarian Republic of Venezuela","dial_code":"+58","code":"VE"},{"name":"Vietnam","dial_code":"+84","code":"VN"},{"name":"Virgin Islands, British","dial_code":"+1284","code":"VG"},{"name":"Virgin Islands, U.S.","dial_code":"+1340","code":"VI"},{"name":"Wallis and Futuna","dial_code":"+681","code":"WF"},{"name":"Yemen","dial_code":"+967","code":"YE"},{"name":"Zambia","dial_code":"+260","code":"ZM"},{"name":"Zimbabwe","dial_code":"+263","code":"ZW"}]').map(e=>({label:e.name})),Ss=[["suredonation/input",{label:(0,i.__)("Address Line 1","suredonation"),fieldWidth:50}],["suredonation/input",{label:(0,i.__)("Address Line 2","suredonation"),fieldWidth:50}],["suredonation/input",{label:(0,i.__)("City","suredonation"),fieldWidth:50}],["suredonation/input",{label:(0,i.__)("State","suredonation"),fieldWidth:50}],["suredonation/input",{label:(0,i.__)("Postal Code","suredonation"),fieldWidth:50}],["suredonation/dropdown",{label:(0,i.__)("Country","suredonation"),placeholder:(0,i.__)("Select a country","suredonation"),searchable:!0,fieldWidth:50,options:Cs}]],_s=["suredonation/input","suredonation/dropdown"],Es=JSON.parse('{"UU":"suredonation/address"}');(0,s.registerBlockType)(Es.UU,{icon:function(e){return ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zM7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9z"}},{tag:"circle",attr:{cx:"12",cy:"9",r:"2.5"}}]})(e)},edit:({attributes:e,setAttributes:t})=>{const{block_id:o,label:r,help:s,fieldWidth:a}=e,d=(0,n.useBlockProps)({className:`sd-block sd-address-block sd-block-width-${a}`}),c=(0,v.useSelect)(e=>e("core/editor")?.getCurrentPostId()||0,[]);return(0,l.useEffect)(()=>{o||t({block_id:g()})},[o,t]),(0,l.useEffect)(()=>{c&&e.formId!==c&&t({formId:c})},[c,e.formId,t]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsxs)(L,{tabs:["general","advance"],children:[(0,u.jsx)(B,{...F,children:(0,u.jsx)(ce,{label:(0,i.__)("Help Text","suredonation"),value:s,onChange:e=>t({help:e})})}),(0,u.jsx)(B,{...V})]})}),(0,u.jsx)("div",{...d,children:(0,u.jsxs)("fieldset",{className:"sd-block-preview",children:[(0,u.jsx)(n.RichText,{tagName:"legend",value:r,onChange:e=>t({label:f(e)}),className:"sd-label sd-block-legend",multiline:!1,allowedFormats:[],placeholder:(0,i.__)("Address","suredonation")}),(0,u.jsx)(b,{help:s,setAttributes:t,block_id:o}),(0,u.jsx)("div",{className:"sd-block-wrap sd-address-fields",children:(0,u.jsx)(n.InnerBlocks,{template:Ss,allowedBlocks:_s})})]})})]})},save:()=>(0,u.jsx)(n.InnerBlocks.Content,{})});var Is=[];for(const e of[["af","93",0,null,"0"],["ax","358",1,["18","4"],"0"],["al","355",0,null,"0"],["dz","213",0,null,"0"],["as","1",5,["684"],"1"],["ad","376"],["ao","244"],["ai","1",6,["264"],"1"],["ag","1",7,["268"],"1"],["ar","54",0,null,"0"],["am","374",0,null,"0"],["aw","297"],["ac","247"],["au","61",0,["4"],"0"],["at","43",0,null,"0"],["az","994",0,null,"0"],["bs","1",8,["242"],"1"],["bh","973"],["bd","880",0,null,"0"],["bb","1",9,["246"],"1"],["by","375",0,null,"8"],["be","32",0,null,"0"],["bz","501"],["bj","229"],["bm","1",10,["441"],"1"],["bt","975"],["bo","591",0,null,"0"],["ba","387",0,null,"0"],["bw","267"],["br","55",0,null,"0"],["io","246"],["vg","1",11,["284"],"1"],["bn","673"],["bg","359",0,null,"0"],["bf","226"],["bi","257"],["kh","855",0,null,"0"],["cm","237"],["ca","1",1,["204","226","236","249","250","257","263","289","306","343","354","365","367","368","382","403","416","418","428","431","437","438","450","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905","942"],"1"],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"],"1"],["cf","236"],["td","235"],["cl","56"],["cn","86",0,null,"0"],["cx","61",2,["4","89164"],"0"],["cc","61",1,["4","89162"],"0"],["co","57",0,null,"0"],["km","269"],["cg","242"],["cd","243",0,null,"0"],["ck","682"],["cr","506"],["ci","225"],["hr","385",0,null,"0"],["cu","53",0,null,"0"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"],"1"],["do","1",2,["809","829","849"],"1"],["ec","593",0,null,"0"],["eg","20",0,null,"0"],["sv","503"],["gq","240"],["er","291",0,null,"0"],["ee","372"],["sz","268"],["et","251",0,null,"0"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0,["4"],"0"],["fr","33",0,null,"0"],["gf","594",0,null,"0"],["pf","689"],["ga","241"],["gm","220"],["ge","995",0,null,"0"],["de","49",0,null,"0"],["gh","233",0,null,"0"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"],"1"],["gp","590",0,null,"0"],["gu","1",15,["671"],"1"],["gt","502"],["gg","44",1,["1481","7781","7839","7911"],"0"],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36",0,null,"06"],["is","354"],["in","91",0,null,"0"],["id","62",0,null,"0"],["ir","98",0,null,"0"],["iq","964",0,null,"0"],["ie","353",0,null,"0"],["im","44",2,["1624","74576","7524","7624","7924"],"0"],["il","972",0,null,"0"],["it","39",0,["3"]],["jm","1",4,["658","876"],"1"],["jp","81",0,null,"0"],["je","44",3,["1534","7509","7700","7797","7829","7937"],"0"],["jo","962",0,null,"0"],["kz","7",1,["33","7"],"8"],["ke","254",0,null,"0"],["ki","686",0,null,"0"],["xk","383",0,null,"0"],["kw","965"],["kg","996",0,null,"0"],["la","856",0,null,"0"],["lv","371"],["lb","961",0,null,"0"],["ls","266"],["lr","231",0,null,"0"],["ly","218",0,null,"0"],["li","423",0,null,"0"],["lt","370",0,null,"0"],["lu","352"],["mo","853"],["mg","261",0,null,"0"],["mw","265",0,null,"0"],["my","60",0,null,"0"],["mv","960"],["ml","223"],["mt","356"],["mh","692",0,null,"1"],["mq","596",0,null,"0"],["mr","222"],["mu","230"],["yt","262",1,["269","639"],"0"],["mx","52"],["fm","691"],["md","373",0,null,"0"],["mc","377",0,null,"0"],["mn","976",0,null,"0"],["me","382",0,null,"0"],["ms","1",16,["664"],"1"],["ma","212",0,["6","7"],"0"],["mz","258"],["mm","95",0,null,"0"],["na","264",0,null,"0"],["nr","674"],["np","977",0,null,"0"],["nl","31",0,null,"0"],["nc","687"],["nz","64",0,null,"0"],["ni","505"],["ne","227"],["ng","234",0,null,"0"],["nu","683"],["nf","672"],["kp","850",0,null,"0"],["mk","389",0,null,"0"],["mp","1",17,["670"],"1"],["no","47",0,["4","9"]],["om","968"],["pk","92",0,null,"0"],["pw","680"],["ps","970",0,null,"0"],["pa","507"],["pg","675"],["py","595",0,null,"0"],["pe","51",0,null,"0"],["ph","63",0,null,"0"],["pl","48"],["pt","351"],["pr","1",3,["787","939"],"1"],["qa","974"],["re","262",0,null,"0"],["ro","40",0,null,"0"],["ru","7",0,["33"],"8"],["rw","250",0,null,"0"],["ws","685"],["sm","378"],["st","239"],["sa","966",0,null,"0"],["sn","221"],["rs","381",0,null,"0"],["sc","248"],["sl","232",0,null,"0"],["sg","65"],["sx","1",21,["721"],"1"],["sk","421",0,null,"0"],["si","386",0,null,"0"],["sb","677"],["so","252",0,null,"0"],["za","27",0,null,"0"],["kr","82",0,null,"0"],["ss","211",0,null,"0"],["es","34"],["lk","94",0,null,"0"],["bl","590",1,null,"0"],["sh","290"],["kn","1",18,["869"],"1"],["lc","1",19,["758"],"1"],["mf","590",2,null,"0"],["pm","508",0,null,"0"],["vc","1",20,["784"],"1"],["sd","249",0,null,"0"],["sr","597"],["sj","47",1,["4","79","9"]],["se","46",0,null,"0"],["ch","41",0,null,"0"],["sy","963",0,null,"0"],["tw","886",0,null,"0"],["tj","992"],["tz","255",0,null,"0"],["th","66",0,null,"0"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"],"1"],["tn","216"],["tr","90",0,null,"0"],["tm","993",0,null,"8"],["tc","1",23,["649"],"1"],["tv","688"],["vi","1",24,["340"],"1"],["ug","256",0,null,"0"],["ua","380",0,null,"0"],["ae","971",0,null,"0"],["gb","44",0,null,"0"],["us","1",0,null,"1"],["uy","598",0,null,"0"],["uz","998"],["vu","678"],["va","39",1,["06698","3"]],["ve","58",0,null,"0"],["vn","84",0,null,"0"],["wf","681"],["eh","212",1,["5288","5289","6","7"],"0"],["ye","967",0,null,"0"],["zm","260",0,null,"0"],["zw","263",0,null,"0"]])Is.push({name:"",iso2:e[0],dialCode:e[1],priority:e[2]||0,areaCodes:e[3]||null,nodeById:{},nationalPrefix:e[4]||null,normalisedName:"",initials:"",dialCodePlus:""});var As=Is,Ps={ad:"Andorra",ae:"United Arab Emirates",af:"Afghanistan",ag:"Antigua & Barbuda",ai:"Anguilla",al:"Albania",am:"Armenia",ao:"Angola",ar:"Argentina",as:"American Samoa",at:"Austria",au:"Australia",aw:"Aruba",ax:"Åland Islands",az:"Azerbaijan",ba:"Bosnia & Herzegovina",bb:"Barbados",bd:"Bangladesh",be:"Belgium",bf:"Burkina Faso",bg:"Bulgaria",bh:"Bahrain",bi:"Burundi",bj:"Benin",bl:"St. Barthélemy",bm:"Bermuda",bn:"Brunei",bo:"Bolivia",bq:"Caribbean Netherlands",br:"Brazil",bs:"Bahamas",bt:"Bhutan",bw:"Botswana",by:"Belarus",bz:"Belize",ca:"Canada",cc:"Cocos (Keeling) Islands",cd:"Congo - Kinshasa",cf:"Central African Republic",cg:"Congo - Brazzaville",ch:"Switzerland",ci:"Côte d’Ivoire",ck:"Cook Islands",cl:"Chile",cm:"Cameroon",cn:"China",co:"Colombia",cr:"Costa Rica",cu:"Cuba",cv:"Cape Verde",cw:"Curaçao",cx:"Christmas Island",cy:"Cyprus",cz:"Czechia",de:"Germany",dj:"Djibouti",dk:"Denmark",dm:"Dominica",do:"Dominican Republic",dz:"Algeria",ec:"Ecuador",ee:"Estonia",eg:"Egypt",eh:"Western Sahara",er:"Eritrea",es:"Spain",et:"Ethiopia",fi:"Finland",fj:"Fiji",fk:"Falkland Islands",fm:"Micronesia",fo:"Faroe Islands",fr:"France",ga:"Gabon",gb:"United Kingdom",gd:"Grenada",ge:"Georgia",gf:"French Guiana",gg:"Guernsey",gh:"Ghana",gi:"Gibraltar",gl:"Greenland",gm:"Gambia",gn:"Guinea",gp:"Guadeloupe",gq:"Equatorial Guinea",gr:"Greece",gt:"Guatemala",gu:"Guam",gw:"Guinea-Bissau",gy:"Guyana",hk:"Hong Kong SAR China",hn:"Honduras",hr:"Croatia",ht:"Haiti",hu:"Hungary",id:"Indonesia",ie:"Ireland",il:"Israel",im:"Isle of Man",in:"India",io:"British Indian Ocean Territory",iq:"Iraq",ir:"Iran",is:"Iceland",it:"Italy",je:"Jersey",jm:"Jamaica",jo:"Jordan",jp:"Japan",ke:"Kenya",kg:"Kyrgyzstan",kh:"Cambodia",ki:"Kiribati",km:"Comoros",kn:"St. Kitts & Nevis",kp:"North Korea",kr:"South Korea",kw:"Kuwait",ky:"Cayman Islands",kz:"Kazakhstan",la:"Laos",lb:"Lebanon",lc:"St. Lucia",li:"Liechtenstein",lk:"Sri Lanka",lr:"Liberia",ls:"Lesotho",lt:"Lithuania",lu:"Luxembourg",lv:"Latvia",ly:"Libya",ma:"Morocco",mc:"Monaco",md:"Moldova",me:"Montenegro",mf:"St. Martin",mg:"Madagascar",mh:"Marshall Islands",mk:"North Macedonia",ml:"Mali",mm:"Myanmar (Burma)",mn:"Mongolia",mo:"Macao SAR China",mp:"Northern Mariana Islands",mq:"Martinique",mr:"Mauritania",ms:"Montserrat",mt:"Malta",mu:"Mauritius",mv:"Maldives",mw:"Malawi",mx:"Mexico",my:"Malaysia",mz:"Mozambique",na:"Namibia",nc:"New Caledonia",ne:"Niger",nf:"Norfolk Island",ng:"Nigeria",ni:"Nicaragua",nl:"Netherlands",no:"Norway",np:"Nepal",nr:"Nauru",nu:"Niue",nz:"New Zealand",om:"Oman",pa:"Panama",pe:"Peru",pf:"French Polynesia",pg:"Papua New Guinea",ph:"Philippines",pk:"Pakistan",pl:"Poland",pm:"St. Pierre & Miquelon",pr:"Puerto Rico",ps:"Palestinian Territories",pt:"Portugal",pw:"Palau",py:"Paraguay",qa:"Qatar",re:"Réunion",ro:"Romania",rs:"Serbia",ru:"Russia",rw:"Rwanda",sa:"Saudi Arabia",sb:"Solomon Islands",sc:"Seychelles",sd:"Sudan",se:"Sweden",sg:"Singapore",sh:"St. Helena",si:"Slovenia",sj:"Svalbard & Jan Mayen",sk:"Slovakia",sl:"Sierra Leone",sm:"San Marino",sn:"Senegal",so:"Somalia",sr:"Suriname",ss:"South Sudan",st:"São Tomé & Príncipe",sv:"El Salvador",sx:"Sint Maarten",sy:"Syria",sz:"Eswatini",tc:"Turks & Caicos Islands",td:"Chad",tg:"Togo",th:"Thailand",tj:"Tajikistan",tk:"Tokelau",tl:"Timor-Leste",tm:"Turkmenistan",tn:"Tunisia",to:"Tonga",tr:"Turkey",tt:"Trinidad & Tobago",tv:"Tuvalu",tw:"Taiwan",tz:"Tanzania",ua:"Ukraine",ug:"Uganda",us:"United States",uy:"Uruguay",uz:"Uzbekistan",va:"Vatican City",vc:"St. Vincent & Grenadines",ve:"Venezuela",vg:"British Virgin Islands",vi:"U.S. Virgin Islands",vn:"Vietnam",vu:"Vanuatu",wf:"Wallis & Futuna",ws:"Samoa",ye:"Yemen",yt:"Mayotte",za:"South Africa",zm:"Zambia",zw:"Zimbabwe",selectedCountryAriaLabel:"Change country, selected ${countryName} (${dialCode})",noCountrySelected:"Select country",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",zeroSearchResults:"No results found",oneSearchResult:"1 result found",multipleSearchResults:"${count} results found",ac:"Ascension Island",xk:"Kosovo"},ks="iti__hide",Ts="iti__v-hide",Ns="iti__arrow--up",Ds="iti__globe",Ms="iti__flag",Rs="iti__country",js="iti__highlight",Os={ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",SPACE:" ",ENTER:"Enter",ESC:"Escape",TAB:"Tab"},Ls={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},Bs="polite",Fs="auto",Vs="aria-expanded",Us="aria-label",zs="aria-selected",Gs="aria-activedescendant",Hs="aria-haspopup",Ws="aria-controls",Ks="aria-hidden",qs="aria-autocomplete",Ys="aria-modal",Zs=e=>"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia(e).matches,Xs={allowPhonewords:!1,allowDropdown:!0,autoPlaceholder:Bs,containerClass:"",countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtils:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",showFlags:!0,separateDialCode:!1,strictMode:!1,useFullscreenPopup:(()=>{if("undefined"!=typeof navigator&&"undefined"!=typeof window){const e=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),t=Zs("(max-width: 500px)"),n=Zs("(max-height: 600px)"),o=Zs("(pointer: coarse)");return e||t||o&&n}return!1})(),validationNumberTypes:["MOBILE"]},Js=e=>e.replace(/\D/g,""),Qs=(e="")=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),ea=e=>Object.keys(e).filter(t=>Boolean(e[t])).join(" "),ta=(e,t,n)=>{const o=document.createElement(e);return t&&Object.entries(t).forEach(([e,t])=>o.setAttribute(e,t)),n&&n.appendChild(o),o},na=class{constructor(e,t,n){this.highlightedItem=null,this.selectedItem=null,e.dataset.intlTelInputId=n.toString(),this.telInput=e,this.options=t,this.id=n,this.hadInitialPlaceholder=Boolean(e.getAttribute("placeholder")),this.isRTL=!!this.telInput.closest("[dir=rtl]"),this.options.separateDialCode&&(this.originalPaddingLeft=this.telInput.style.paddingLeft)}generateMarkup(e){this.countries=e,this._prepareTelInput();const t=this._createWrapperAndInsert();this._maybeBuildCountryContainer(t),t.appendChild(this.telInput),this._maybeUpdateInputPaddingAndReveal(),this._maybeBuildHiddenInputs(t)}_prepareTelInput(){this.telInput.classList.add("iti__tel-input"),this.telInput.hasAttribute("autocomplete")||this.telInput.form?.hasAttribute("autocomplete")||this.telInput.setAttribute("autocomplete","off")}_createWrapperAndInsert(){const{allowDropdown:e,showFlags:t,containerClass:n,useFullscreenPopup:o}=this.options,r=ea({iti:!0,"iti--allow-dropdown":e,"iti--show-flags":t,"iti--inline-dropdown":!o,[n]:Boolean(n)}),i=ta("div",{class:r});return this.isRTL&&i.setAttribute("dir","ltr"),this.telInput.before(i),i}_maybeBuildCountryContainer(e){const{allowDropdown:t,separateDialCode:n,showFlags:o}=this.options;if(t||o||n){this.countryContainer=ta("div",{class:`iti__country-container ${Ts}`},e),t?(this.selectedCountry=ta("button",{type:"button",class:"iti__selected-country",[Vs]:"false",[Us]:this.options.i18n.noCountrySelected,[Hs]:"dialog",[Ws]:`iti-${this.id}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=ta("div",{class:"iti__selected-country"},this.countryContainer);const o=ta("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=ta("div",{class:Ms},o),t&&(this.dropdownArrow=ta("div",{class:"iti__arrow",[Ks]:"true"},o)),n&&(this.selectedDialCode=ta("div",{class:"iti__selected-dial-code"},this.selectedCountry)),t&&this._buildDropdownContent()}}_buildDropdownContent(){const{fixDropdownWidth:e,useFullscreenPopup:t,countrySearch:n,i18n:o,dropdownContainer:r,containerClass:i}=this.options,s=e?"":"iti--flexible-dropdown-width";if(this.dropdownContent=ta("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content ${ks} ${s}`,role:"dialog",[Ys]:"true"}),this.isRTL&&this.dropdownContent.setAttribute("dir","rtl"),n&&this._buildSearchUI(),this.countryList=ta("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox",[Us]:o.countryListAriaLabel},this.dropdownContent),this._appendListItems(),n&&this.updateSearchResultsA11yText(),r){const e=ea({iti:!0,"iti--container":!0,"iti--fullscreen-popup":t,"iti--inline-dropdown":!t,[i]:Boolean(i)});this.dropdown=ta("div",{class:e}),this.dropdown.appendChild(this.dropdownContent)}else this.countryContainer.appendChild(this.dropdownContent)}_buildSearchUI(){const{i18n:e}=this.options,t=ta("div",{class:"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=ta("span",{class:"iti__search-icon",[Ks]:"true"},t),this.searchIcon.innerHTML=`\n \n \n \n `,this.searchInput=ta("input",{id:`iti-${this.id}__search-input`,type:"search",class:"iti__search-input",placeholder:e.searchPlaceholder,role:"combobox",[Vs]:"true",[Us]:e.searchPlaceholder,[Ws]:`iti-${this.id}__country-listbox`,[qs]:"list",autocomplete:"off"},t),this.searchClearButton=ta("button",{type:"button",class:`iti__search-clear ${ks}`,[Us]:e.clearSearchAriaLabel,tabindex:"-1"},t),this.searchClearButton.innerHTML=(()=>{const e=`iti-${this.id}-clear-mask`;return`\n \n \n \n \n \n \n `})(),this.searchResultsA11yText=ta("span",{class:"iti__a11y-text"},this.dropdownContent),this.searchNoResults=ta("div",{class:`iti__no-results ${ks}`,[Ks]:"true"},this.dropdownContent),this.searchNoResults.textContent=e.zeroSearchResults}_maybeUpdateInputPaddingAndReveal(){this.countryContainer&&(this.updateInputPadding(),this.countryContainer.classList.remove(Ts))}_maybeBuildHiddenInputs(e){const{hiddenInput:t}=this.options;if(t){const n=t(this.telInput.getAttribute("name")||"");if(n.phone){const t=this.telInput.form?.querySelector(`input[name="${n.phone}"]`);t?this.hiddenInput=t:(this.hiddenInput=ta("input",{type:"hidden",name:n.phone}),e.appendChild(this.hiddenInput))}if(n.country){const t=this.telInput.form?.querySelector(`input[name="${n.country}"]`);t?this.hiddenInputCountry=t:(this.hiddenInputCountry=ta("input",{type:"hidden",name:n.country}),e.appendChild(this.hiddenInputCountry))}}}_appendListItems(){const e=document.createDocumentFragment();for(let t=0;ti){const e=o-s;t.scrollTop=l-e}}highlightListItem(e,t){const n=this.highlightedItem;if(n&&n.classList.remove(js),this.highlightedItem=e,this.highlightedItem&&(this.highlightedItem.classList.add(js),this.options.countrySearch)){const e=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(Gs,e)}t&&this.highlightedItem.focus()}updateSelectedItem(e){if(this.selectedItem&&this.selectedItem.dataset.countryCode!==e&&(this.selectedItem.setAttribute(zs,"false"),this.selectedItem=null),e&&!this.selectedItem){const t=this.countryList.querySelector(`[data-country-code="${e}"]`);t&&(t.setAttribute(zs,"true"),this.selectedItem=t)}}filterCountries(e){this.countryList.innerHTML="";let t=!0;for(const n of e){const e=n.nodeById[this.id];e&&(this.countryList.appendChild(e),t&&(this.highlightListItem(e,!1),t=!1))}t?(this.highlightListItem(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove(ks)):this.searchNoResults&&this.searchNoResults.classList.add(ks),this.countryList.scrollTop=0,this.updateSearchResultsA11yText()}destroy(){this.telInput.iti=void 0,delete this.telInput.dataset.intlTelInputId,this.options.separateDialCode&&(this.telInput.style.paddingLeft=this.originalPaddingLeft);const e=this.telInput.parentNode;e.before(this.telInput),e.remove(),this.telInput=null,this.countryContainer=null,this.selectedCountry=null,this.selectedCountryInner=null,this.selectedDialCode=null,this.dropdownArrow=null,this.dropdownContent=null,this.searchInput=null,this.searchIcon=null,this.searchClearButton=null,this.searchNoResults=null,this.searchResultsA11yText=null,this.countryList=null,this.dropdown=null,this.hiddenInput=null,this.hiddenInputCountry=null,this.highlightedItem=null,this.selectedItem=null;for(const e of this.countries)delete e.nodeById[this.id];this.countries=null}},oa=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],ra=e=>{const t=Js(e);if(t.startsWith("1")&&t.length>=4){const e=t.substring(1,4);return oa.includes(e)}return!1};for(const e of As)e.name=Ps[e.iso2];var ia=0,sa=new Set(As.map(e=>e.iso2)),aa=e=>sa.has(e),da=class e{constructor(t,n={}){var o,r;this.id=ia++,this.options={...Xs,...n},o=this.options,r=Ps,o.useFullscreenPopup&&(o.fixDropdownWidth=!1),1===o.onlyCountries.length&&(o.initialCountry=o.onlyCountries[0]),o.separateDialCode&&(o.nationalMode=!1),!o.allowDropdown||o.showFlags||o.separateDialCode||(o.nationalMode=!1),o.useFullscreenPopup&&!o.dropdownContainer&&(o.dropdownContainer=document.body),o.i18n={...r,...o.i18n},this.ui=new na(t,this.options,this.id),this.isAndroid=e._getIsAndroid(),this.promise=this._createInitPromises(),this.countries=(e=>{const{onlyCountries:t,excludeCountries:n}=e;if(t.length){const e=t.map(e=>e.toLowerCase());return As.filter(t=>e.includes(t.iso2))}if(n.length){const e=n.map(e=>e.toLowerCase());return As.filter(t=>!e.includes(t.iso2))}return As})(this.options);const{dialCodes:i,dialCodeMaxLen:s,dialCodeToIso2Map:a}=(e=>{const t=new Set;let n=0;const o={},r=(e,t)=>{if(!e||!t)return;t.length>n&&(n=t.length),o.hasOwnProperty(t)||(o[t]=[]);const r=o[t];r.includes(e)||r.push(e)},i=[...e].sort((e,t)=>e.priority-t.priority);for(const e of i){t.has(e.dialCode)||t.add(e.dialCode);for(let t=1;t[e.iso2,e])),this._init()}static _getIsAndroid(){return"undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent)}_updateNumeralSet(e){/[\u0660-\u0669]/.test(e)?this.userNumeralSet="arabic-indic":/[\u06F0-\u06F9]/.test(e)?this.userNumeralSet="persian":this.userNumeralSet="ascii"}_mapAsciiToUserNumerals(e){if(this.userNumeralSet||this._updateNumeralSet(this.ui.telInput.value),"ascii"===this.userNumeralSet)return e;const t="arabic-indic"===this.userNumeralSet?1632:1776;return e.replace(/[0-9]/g,e=>String.fromCharCode(t+Number(e)))}_normaliseNumerals(e){if(!e)return"";if(this._updateNumeralSet(e),"ascii"===this.userNumeralSet)return e;const t="arabic-indic"===this.userNumeralSet?1632:1776,n="arabic-indic"===this.userNumeralSet?/[\u0660-\u0669]/g:/[\u06F0-\u06F9]/g;return e.replace(n,e=>String.fromCharCode(e.charCodeAt(0)-t+48))}_getTelInputValue(){const e=this.ui.telInput.value.trim();return this._normaliseNumerals(e)}_setTelInputValue(e){this.ui.telInput.value=this._mapAsciiToUserNumerals(e)}_createInitPromises(){const e=new Promise((e,t)=>{this.resolveAutoCountryPromise=e,this.rejectAutoCountryPromise=t}),t=new Promise((e,t)=>{this.resolveUtilsScriptPromise=e,this.rejectUtilsScriptPromise=t});return Promise.all([e,t])}_init(){this.selectedCountryData={},this.abortController=new AbortController,this._processCountryData(),this.ui.generateMarkup(this.countries),this._setInitialState(),this._initListeners(),this._initRequests()}_processCountryData(){((e,t)=>{for(const n of e){const e=n.iso2.toLowerCase();t.i18n[e]&&(n.name=t.i18n[e])}})(this.countries,this.options),((e,t)=>{t.countryOrder&&(t.countryOrder=t.countryOrder.map(e=>e.toLowerCase())),e.sort((e,n)=>{const{countryOrder:o}=t;if(o){const t=o.indexOf(e.iso2),r=o.indexOf(n.iso2),i=t>-1,s=r>-1;if(i||s)return i&&s?t-r:i?-1:1}return e.name.localeCompare(n.name)})})(this.countries,this.options),(e=>{for(const t of e)t.normalisedName=Qs(t.name),t.initials=t.normalisedName.split(/[^a-z]/).map(e=>e[0]).join(""),t.dialCodePlus=`+${t.dialCode}`})(this.countries)}_setInitialState(e=!1){const t=this.ui.telInput.getAttribute("value"),n=this._normaliseNumerals(t),o=this._getTelInputValue(),r=!n||!n.startsWith("+")||o&&o.startsWith("+")?o:n,i=this._getDialCode(r),s=ra(r),{initialCountry:a,geoIpLookup:d}=this.options,l=a===Fs&&d;if(i&&!s)this._updateCountryFromNumber(r);else if(!l||e){const e=a?a.toLowerCase():"";aa(e)?this._setCountry(e):i&&s?this._setCountry("us"):this._setCountry("")}r&&this._updateValFromNumber(r)}_initListeners(){this._initTelInputListeners(),this.options.allowDropdown&&this._initDropdownListeners(),(this.ui.hiddenInput||this.ui.hiddenInputCountry)&&this.ui.telInput.form&&this._initHiddenInputListener()}_initHiddenInputListener(){this.ui.telInput.form?.addEventListener("submit",()=>{this.ui.hiddenInput&&(this.ui.hiddenInput.value=this.getNumber()),this.ui.hiddenInputCountry&&(this.ui.hiddenInputCountry.value=this.selectedCountryData.iso2||"")},{signal:this.abortController.signal})}_initDropdownListeners(){const e=this.abortController.signal,t=this.ui.telInput.closest("label");t&&t.addEventListener("click",e=>{this.ui.dropdownContent.classList.contains(ks)?this.ui.telInput.focus():e.preventDefault()},{signal:e}),this.ui.selectedCountry.addEventListener("click",()=>{!this.ui.dropdownContent.classList.contains(ks)||this.ui.telInput.disabled||this.ui.telInput.readOnly||this._openDropdown()},{signal:e}),this.ui.countryContainer.addEventListener("keydown",e=>{this.ui.dropdownContent.classList.contains(ks)&&[Os.ARROW_UP,Os.ARROW_DOWN,Os.SPACE,Os.ENTER].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),this._openDropdown()),e.key===Os.TAB&&this._closeDropdown()},{signal:e})}_initRequests(){const{loadUtils:e,initialCountry:t,geoIpLookup:n}=this.options;if(e&&!ca.utils){const t=()=>{ca.attachUtils(e)?.catch(()=>{})};if(ca.documentReady())t();else{const e=()=>{t()};window.addEventListener("load",e,{signal:this.abortController.signal})}}else this.resolveUtilsScriptPromise();t===Fs&&n&&!this.selectedCountryData.iso2?this._loadAutoCountry():this.resolveAutoCountryPromise()}_loadAutoCountry(){ca.autoCountry?this.handleAutoCountry():ca.startedLoadingAutoCountry||(ca.startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup((e="")=>{const t=e.toLowerCase();aa(t)?(ca.autoCountry=t,setTimeout(()=>la("handleAutoCountry"))):(this._setInitialState(!0),la("rejectAutoCountryPromise"))},()=>{this._setInitialState(!0),la("rejectAutoCountryPromise")}))}_openDropdownWithPlus(){this._openDropdown(),this.ui.searchInput.value="+",this._filterCountriesByQuery("")}_initTelInputListeners(){this._bindInputListener(),this._maybeBindKeydownListener(),this._maybeBindPasteListener()}_bindInputListener(){const{strictMode:e,formatAsYouType:t,separateDialCode:n,allowDropdown:o,countrySearch:r}=this.options;let i=!1;Ls.ALPHA_UNICODE.test(this._getTelInputValue())&&(i=!0),this.ui.telInput.addEventListener("input",s=>{const a=this._getTelInputValue();if(this.isAndroid&&"+"===s?.data&&n&&o&&r){const e=this.ui.telInput.selectionStart||0,t=a.substring(0,e-1),n=a.substring(e);return this._setTelInputValue(t+n),void this._openDropdownWithPlus()}this._updateCountryFromNumber(a)&&this._triggerCountryChange(),s?.data&&Ls.NON_PLUS_NUMERIC.test(s.data)||"insertFromPaste"===s?.inputType&&a&&!e?i=!0:Ls.NON_PLUS_NUMERIC.test(a)||(i=!1);const d=s?.detail&&s.detail.isSetNumber,l="ascii"===this.userNumeralSet;if(t&&!i&&!d&&l){const e=this.ui.telInput.selectionStart||0,t=a.substring(0,e).replace(Ls.NON_PLUS_NUMERIC_GLOBAL,"").length,n="deleteContentForward"===s?.inputType,o=((e,t,n,o,r)=>{const i=n?n.formatNumberAsYouType(e,o.iso2):e,{dialCode:s}=o;return r&&"+"!==t.charAt(0)&&i.includes(`+${s}`)?(i.split(`+${s}`)[1]||"").trim():i})(this._getFullNumber(),a,ca.utils,this.selectedCountryData,this.options.separateDialCode),r=((e,t,n,o)=>{if(0===n&&!o)return 0;let r=0;for(let n=0;n{if(r.key&&1===r.key.length&&!r.altKey&&!r.ctrlKey&&!r.metaKey){if(t&&n&&o&&"+"===r.key)return r.preventDefault(),void this._openDropdownWithPlus();if(e){const e=this._getTelInputValue(),n=!e.startsWith("+")&&0===this.ui.telInput.selectionStart&&"+"===r.key,o=this._normaliseNumerals(r.key),i=/^[0-9]$/.test(o),s=t?i:n||i,a=this.ui.telInput,d=a.selectionStart,l=a.selectionEnd,c=e.slice(0,d),u=e.slice(l),p=c+r.key+u,h=this._getFullNumber(p),m=ca.utils.getCoreNumber(h,this.selectedCountryData.iso2),f=this.maxCoreNumberLength&&m.length>this.maxCoreNumberLength,g=this._getNewCountryFromNumber(h);s&&(!f||null!==g||n)||r.preventDefault()}}};this.ui.telInput.addEventListener("keydown",r,{signal:this.abortController.signal})}}_maybeBindPasteListener(){if(this.options.strictMode){const e=e=>{e.preventDefault();const t=this.ui.telInput,n=t.selectionStart,o=t.selectionEnd,r=this._getTelInputValue(),i=r.slice(0,n),s=r.slice(o),a=this.selectedCountryData.iso2,d=e.clipboardData.getData("text"),l=this._normaliseNumerals(d),c=0===n&&o>0,u=!r.startsWith("+")||c,p=l.replace(Ls.NON_PLUS_NUMERIC_GLOBAL,""),h=p.startsWith("+"),m=p.replace(/\+/g,""),f=h&&u?`+${m}`:m;let g=i+f+s;if(g.length>5){let e=ca.utils.getCoreNumber(g,a);for(;0===e.length&&g.length>0;)g=g.slice(0,-1),e=ca.utils.getCoreNumber(g,a);if(!e)return;if(this.maxCoreNumberLength&&e.length>this.maxCoreNumberLength){if(t.selectionEnd!==r.length)return;{const t=e.length-this.maxCoreNumberLength;g=g.slice(0,g.length-t)}}}this._setTelInputValue(g);const b=n+f.length;t.setSelectionRange(b,b),t.dispatchEvent(new InputEvent("input",{bubbles:!0}))};this.ui.telInput.addEventListener("paste",e,{signal:this.abortController.signal})}}_cap(e){const t=Number(this.ui.telInput.getAttribute("maxlength"));return t&&e.length>t?e.substring(0,t):e}_trigger(e,t={}){const n=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:t});this.ui.telInput.dispatchEvent(n)}_openDropdown(){const{fixDropdownWidth:e,countrySearch:t}=this.options;if(this.dropdownAbortController=new AbortController,e&&(this.ui.dropdownContent.style.width=`${this.ui.telInput.offsetWidth}px`),this.ui.dropdownContent.classList.remove(ks),this.ui.selectedCountry.setAttribute(Vs,"true"),this._setDropdownPosition(),t){const e=this.ui.countryList.firstElementChild;e&&(this.ui.highlightListItem(e,!1),this.ui.countryList.scrollTop=0),this.ui.searchInput.focus()}this._bindDropdownListeners(),this.ui.dropdownArrow.classList.add(Ns),this._trigger("open:countrydropdown")}_setDropdownPosition(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.ui.dropdown),!this.options.useFullscreenPopup){const e=this.ui.telInput.getBoundingClientRect(),t=this.ui.telInput.offsetHeight;if(this.options.dropdownContainer){this.ui.dropdown.style.top=`${e.top+t}px`,this.ui.dropdown.style.left=`${e.left}px`;const n=()=>this._closeDropdown();window.addEventListener("scroll",n,{signal:this.dropdownAbortController.signal})}}}_bindDropdownListeners(){const e=this.dropdownAbortController.signal;this._bindDropdownMouseoverListener(e),this._bindDropdownCountryClickListener(e),this._bindDropdownClickOffListener(e),this._bindDropdownKeydownListener(e),this.options.countrySearch&&this._bindDropdownSearchListeners(e)}_bindDropdownMouseoverListener(e){this.ui.countryList.addEventListener("mouseover",e=>{const t=e.target?.closest(`.${Rs}`);t&&this.ui.highlightListItem(t,!1)},{signal:e})}_bindDropdownCountryClickListener(e){this.ui.countryList.addEventListener("click",e=>{const t=e.target?.closest(`.${Rs}`);t&&this._selectListItem(t)},{signal:e})}_bindDropdownClickOffListener(e){const t=e=>{e.target.closest(`#iti-${this.id}__dropdown-content`)||this._closeDropdown()};setTimeout(()=>{document.documentElement.addEventListener("click",t,{signal:e})},0)}_bindDropdownKeydownListener(e){let t="",n=null;document.addEventListener("keydown",e=>{[Os.ARROW_UP,Os.ARROW_DOWN,Os.ENTER,Os.ESC].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),e.key===Os.ARROW_UP||e.key===Os.ARROW_DOWN?this._handleUpDownKey(e.key):e.key===Os.ENTER?this._handleEnterKey():e.key===Os.ESC&&(this._closeDropdown(),this.ui.selectedCountry.focus())),!this.options.countrySearch&&Ls.HIDDEN_SEARCH_CHAR.test(e.key)&&(e.stopPropagation(),n&&clearTimeout(n),t+=e.key.toLowerCase(),this._searchForCountry(t),n=setTimeout(()=>{t=""},1e3))},{signal:e})}_bindDropdownSearchListeners(e){const t=()=>{const e=this.ui.searchInput.value.trim();this._filterCountriesByQuery(e),this.ui.searchInput.value?this.ui.searchClearButton.classList.remove(ks):this.ui.searchClearButton.classList.add(ks)};let n=null;this.ui.searchInput.addEventListener("input",()=>{n&&clearTimeout(n),n=setTimeout(()=>{t(),n=null},100)},{signal:e}),this.ui.searchClearButton.addEventListener("click",()=>{this.ui.searchInput.value="",this.ui.searchInput.focus(),t()},{signal:e})}_searchForCountry(e){const t=((e,t)=>{const n=t.toLowerCase();for(const t of e)if(t.name.toLowerCase().startsWith(n))return t;return null})(this.countries,e);if(t){const e=t.nodeById[this.id];this.ui.highlightListItem(e,!1),this.ui.scrollTo(e)}}_filterCountriesByQuery(e){let t;t=""===e?this.countries:((e,t)=>{const n=Qs(t),o=[],r=[],i=[],s=[],a=[],d=[];for(const t of e)t.iso2===n?o.push(t):t.normalisedName.startsWith(n)?r.push(t):t.normalisedName.includes(n)?i.push(t):n===t.dialCode||n===t.dialCodePlus?s.push(t):t.dialCodePlus.includes(n)?a.push(t):t.initials.includes(n)&&d.push(t);const l=(e,t)=>e.priority-t.priority;return[...o.sort(l),...r.sort(l),...i.sort(l),...s.sort(l),...a.sort(l),...d.sort(l)]})(this.countries,e),this.ui.filterCountries(t)}_handleUpDownKey(e){let t=e===Os.ARROW_UP?this.ui.highlightedItem?.previousElementSibling:this.ui.highlightedItem?.nextElementSibling;!t&&this.ui.countryList.childElementCount>1&&(t=e===Os.ARROW_UP?this.ui.countryList.lastElementChild:this.ui.countryList.firstElementChild),t&&(this.ui.scrollTo(t),this.ui.highlightListItem(t,!1))}_handleEnterKey(){this.ui.highlightedItem&&this._selectListItem(this.ui.highlightedItem)}_updateValFromNumber(e){let t=e;if(this.options.formatOnDisplay&&ca.utils&&this.selectedCountryData){const e=this.options.nationalMode||!t.startsWith("+")&&!this.options.separateDialCode,{NATIONAL:n,INTERNATIONAL:o}=ca.utils.numberFormat,r=e?n:o;t=ca.utils.formatNumber(t,this.selectedCountryData.iso2,r)}t=this._beforeSetNumber(t),this._setTelInputValue(t)}_updateCountryFromNumber(e){const t=this._getNewCountryFromNumber(e);return null!==t&&this._setCountry(t)}_ensureHasDialCode(e){const{dialCode:t,nationalPrefix:n}=this.selectedCountryData;return e.startsWith("+")||!t?e:`+${t}${n&&e.startsWith(n)&&!this.options.separateDialCode?e.substring(1):e}`}_getNewCountryFromNumber(e){const t=e.indexOf("+");let n=t?e.substring(t):e;const o=this.selectedCountryData.iso2,r=this.selectedCountryData.dialCode;n=this._ensureHasDialCode(n);const i=this._getDialCode(n,!0),s=Js(n);if(i){const e=Js(i),t=this.dialCodeToIso2Map[e];if(1===t.length)return t[0]===o?null:t[0];if(!o&&this.defaultCountry&&t.includes(this.defaultCountry))return this.defaultCountry;if("1"===r&&ra(s))return null;const{areaCodes:n,priority:a}=this.selectedCountryData;if(n){const e=n.map(e=>`${r}${e}`);for(const t of e)if(s.startsWith(t))return null}const d=n&&!(0===a)&&s.length>e.length,l=o&&t.includes(o)&&!d,c=o===t[0];if(!l&&!c)return t[0]}else{if(n.startsWith("+")&&s.length){const e=this.selectedCountryData.dialCode||"";return e&&e.startsWith(s)?null:""}if(!(n&&"+"!==n||o))return this.defaultCountry}return null}_setCountry(e){const{separateDialCode:t,showFlags:n,i18n:o,allowDropdown:r}=this.options,i=this.selectedCountryData.iso2||"";if(r&&this.ui.updateSelectedItem(e),this.selectedCountryData=e?this.countryByIso2.get(e):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.ui.selectedCountry){const t=e&&n?`${Ms} iti__${e}`:`${Ms} ${Ds}`;let r,i;if(e){const{name:e,dialCode:t}=this.selectedCountryData;i=e,r=o.selectedCountryAriaLabel.replace("${countryName}",e).replace("${dialCode}",`+${t}`)}else i=o.noCountrySelected,r=o.noCountrySelected;this.ui.selectedCountryInner.className=t,this.ui.selectedCountry.setAttribute("title",i),this.ui.selectedCountry.setAttribute(Us,r)}if(t){const e=this.selectedCountryData.dialCode?`+${this.selectedCountryData.dialCode}`:"";this.ui.selectedDialCode.textContent=e,this.ui.updateInputPadding()}return this._updatePlaceholder(),this._updateMaxLength(),i!==e}_updateMaxLength(){const{strictMode:e,placeholderNumberType:t,validationNumberTypes:n}=this.options,{iso2:o}=this.selectedCountryData;if(e&&ca.utils)if(o){const e=ca.utils.numberType[t];let r=ca.utils.getExampleNumber(o,!1,e,!0),i=r;for(;ca.utils.isPossibleNumber(r,o,n);)i=r,r+="0";const s=ca.utils.getCoreNumber(i,o);this.maxCoreNumberLength=s.length,"by"===o&&(this.maxCoreNumberLength=s.length+1)}else this.maxCoreNumberLength=null}_updatePlaceholder(){const{autoPlaceholder:e,placeholderNumberType:t,nationalMode:n,customPlaceholder:o}=this.options,r="aggressive"===e||!this.ui.hadInitialPlaceholder&&e===Bs;if(ca.utils&&r){const e=ca.utils.numberType[t];let r=this.selectedCountryData.iso2?ca.utils.getExampleNumber(this.selectedCountryData.iso2,n,e):"";r=this._beforeSetNumber(r),"function"==typeof o&&(r=o(r,this.selectedCountryData)),this.ui.telInput.setAttribute("placeholder",r)}}_selectListItem(e){const t=e.dataset.countryCode,n=this._setCountry(t);this._closeDropdown();const o=e.dataset.dialCode;if(this._updateDialCode(o),this.options.formatOnDisplay){const e=this._getTelInputValue();this._updateValFromNumber(e)}this.ui.telInput.focus(),n&&this._triggerCountryChange()}_closeDropdown(){this.ui.dropdownContent.classList.contains(ks)||(this.ui.dropdownContent.classList.add(ks),this.ui.selectedCountry.setAttribute(Vs,"false"),this.options.countrySearch&&(this.ui.searchInput.removeAttribute(Gs),this.ui.highlightedItem&&(this.ui.highlightedItem.classList.remove(js),this.ui.highlightedItem=null)),this.ui.dropdownArrow.classList.remove(Ns),this.dropdownAbortController.abort(),this.dropdownAbortController=null,this.options.dropdownContainer&&this.ui.dropdown.remove(),this._trigger("close:countrydropdown"))}_updateDialCode(e){const t=this._getTelInputValue(),n=`+${e}`;let o;if(t.startsWith("+")){const e=this._getDialCode(t);o=e?t.replace(e,n):n,this._setTelInputValue(o)}}_getDialCode(e,t){let n="";if(e.startsWith("+")){let o="",r=!1;for(let i=0;i{let r=e;if(n&&t){const e=" "===r[(t=`+${o.dialCode}`).length]||"-"===r[t.length]?t.length+1:t.length;r=r.substring(e)}return r})(e,this._getDialCode(e),this.options.separateDialCode,this.selectedCountryData);return this._cap(t)}_triggerCountryChange(){this._trigger("countrychange")}handleAutoCountry(){this.options.initialCountry===Fs&&ca.autoCountry&&(this.defaultCountry=ca.autoCountry,this.selectedCountryData.iso2||this.ui.selectedCountryInner.classList.contains(Ds)||this.setCountry(this.defaultCountry),this.resolveAutoCountryPromise())}handleUtils(){if(ca.utils){const e=this._getTelInputValue();e&&this._updateValFromNumber(e),this.selectedCountryData.iso2&&(this._updatePlaceholder(),this._updateMaxLength())}this.resolveUtilsScriptPromise()}destroy(){this.ui.telInput&&(this.options.allowDropdown&&this._closeDropdown(),this.abortController.abort(),this.abortController=null,this.ui.destroy(),ca.instances instanceof Map?ca.instances.delete(this.id):delete ca.instances[this.id])}getExtension(){return ca.utils?ca.utils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""}getNumber(e){if(ca.utils){const{iso2:t}=this.selectedCountryData,n=this._getFullNumber(),o=ca.utils.formatNumber(n,t,e);return this._mapAsciiToUserNumerals(o)}return""}getNumberType(){return ca.utils?ca.utils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99}getSelectedCountryData(){return this.selectedCountryData}getValidationError(){if(ca.utils){const{iso2:e}=this.selectedCountryData;return ca.utils.getValidationError(this._getFullNumber(),e)}return-99}isValidNumber(){const{dialCode:e,iso2:t}=this.selectedCountryData;if("44"===e&&ca.utils){const e=this._getFullNumber(),n=ca.utils.getCoreNumber(e,t);if("7"===n[0]&&10!==n.length)return!1}return this._validateNumber(!1)}isValidNumberPrecise(){return this._validateNumber(!0)}_utilsIsPossibleNumber(e){return ca.utils?ca.utils.isPossibleNumber(e,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}_validateNumber(e){if(!ca.utils)return null;if(!this.selectedCountryData.iso2)return!1;const t=t=>e?this._utilsIsValidNumber(t):this._utilsIsPossibleNumber(t),n=this._getFullNumber(),o=n.search(Ls.ALPHA_UNICODE);if(o>-1&&!this.options.allowPhonewords){const e=t(n.substring(0,o)),r=t(n);return e&&r}return t(n)}_utilsIsValidNumber(e){return ca.utils?ca.utils.isValidNumber(e,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}setCountry(e){const t=e?.toLowerCase();if(!aa(t))throw new Error(`Invalid country code: '${t}'`);const n=this.selectedCountryData.iso2;if(e&&t!==n||!e&&n){if(this._setCountry(t),this._updateDialCode(this.selectedCountryData.dialCode),this.options.formatOnDisplay){const e=this._getTelInputValue();this._updateValFromNumber(e)}this._triggerCountryChange()}}setNumber(e){const t=this._normaliseNumerals(e),n=this._updateCountryFromNumber(t);this._updateValFromNumber(t),n&&this._triggerCountryChange(),this._trigger("input",{isSetNumber:!0})}setPlaceholderNumberType(e){this.options.placeholderNumberType=e,this._updatePlaceholder()}setDisabled(e){this.ui.telInput.disabled=e,e?this.ui.selectedCountry.setAttribute("disabled","true"):this.ui.selectedCountry.removeAttribute("disabled")}},la=(e,...t)=>{Object.values(ca.instances).forEach(n=>{const o=n[e];"function"==typeof o&&o.apply(n,t)})},ca=Object.assign((e,t)=>{const n=new da(e,t);return ca.instances[n.id]=n,e.iti=n,n},{defaults:Xs,documentReady:()=>"complete"===document.readyState,getCountryData:()=>As,getInstance:e=>{const t=e.dataset.intlTelInputId;return t?ca.instances[t]:null},instances:{},attachUtils:e=>{if(!ca.utils&&!ca.startedLoadingUtilsScript){let t;if("function"!=typeof e)return Promise.reject(new TypeError("The argument passed to attachUtils must be a function that returns a promise for the utilities module, not "+typeof e));try{t=Promise.resolve(e())}catch(e){return Promise.reject(e)}return ca.startedLoadingUtilsScript=!0,t.then(e=>{const t=e?.default;if(!t||"object"!=typeof t)throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return ca.utils=t,la("handleUtils"),!0}).catch(e=>{throw la("rejectUtilsScriptPromise",e),e})}return null},startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.14.0"}),ua=ca;!function(){var e=this||self;function t(t,n){t=t.split(".");var o,r=e;t[0]in r||void 0===r.execScript||r.execScript("var "+t[0]);for(;t.length&&(o=t.shift());)t.length||void 0===n?r=r[o]&&r[o]!==Object.prototype[o]?r[o]:r[o]={}:r[o]=n}function n(e,t){function n(){}n.prototype=t.prototype,e.ma=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.sa=function(e,n,o){for(var r=Array(arguments.length-2),i=2;ie.length)&&Ne(re,e)}function de(e){return Ne(J,e)?ue(e,H):ue(e,z)}function le(e){var t=de(e.toString());k(e),e.g(t)}function ce(e){return null!=e&&(1!=x(e,9)||-1!=y(e,9)[0])}function ue(e,t){for(var n,o=new P,r=e.length,i=0;it?2:i[i.length-1]=r&&r<=o;++r)if((n=parseInt(e.substring(0,r),10))in F)return t.g(e.substring(r)),n;return 0}function Ae(e,t,n,o,r,i){if(0==t.length)return 0;var s;t=new P(t),null!=n&&(s=v(n,11)),null==s&&(s="NonMatch");var a=t.toString();if(0==a.length)s=20;else if(K.test(a))a=a.replace(K,""),k(t),t.g(de(a)),s=1;else{if(a=new RegExp(s),le(t),0==(s=t.toString()).search(a)){a=s.match(a)[0].length;var d=s.substring(a).match(q);d&&null!=d[1]&&0=t.h.length)throw Error("Phone number too short after IDD");if(0!=(e=Ie(t,o)))return w(i,1,e),e;throw Error("Invalid country calling code")}return null!=n&&(a=""+(s=$(n,10)),0==(d=t.toString()).lastIndexOf(a,0)&&(a=new P(d.substring(a.length)),d=v(n,1),d=new RegExp($(d,2)),Pe(a,n,null),a=a.toString(),!Ne(d,t.toString())&&Ne(d,a)||3==_e(e,t.toString(),n,-1)))?(o.g(a),r&&w(i,6,10),w(i,1,s),s):(w(i,1,0),0)}function Pe(e,t,n){var o=e.toString(),r=o.length,i=v(t,15);if(0!=r&&null!=i&&0!=i.length){var s=new RegExp("^(?:"+i+")");if(r=s.exec(o)){var a=Ne(i=new RegExp($(v(t,1),2)),o),d=r.length-1;null==(t=v(t,16))||0==t.length||null==r[d]||0==r[d].length?a&&!Ne(i,o.substring(r[0].length))||(null!=n&&0=t.length)i="";else{var s=t.indexOf(";",i);i=-1!==s?t.substring(i,s):t.substring(i)}var a=i;if(null==a?s=!0:0===a.length?s=!1:(s=Q.exec(a),a=ee.exec(a),s=null!==s||null!==a),!s)throw Error("The string supplied did not seem to be a phone number");if(null!=i?("+"===i.charAt(0)&&r.g(i),i=t.indexOf("tel:"),r.g(t.substring(0<=i?i+4:0,t.indexOf(";phone-context=")))):(i=r.g,0<=(a=(s=t??"").search(Y))?0<=(a=(s=(s=s.substring(a)).replace(X,"")).search(Z))&&(s=s.substring(0,a)):s="",i.call(r,s)),0<(s=(i=r.toString()).indexOf(";isub="))&&(k(r),r.g(i.substring(0,s))),!ae(r.toString()))throw Error("The string supplied did not seem to be a phone number");if(i=r.toString(),!(he(n)||null!=i&&0t.h.length)throw Error("The string supplied is too short to be a phone number");if(null!=s&&(n=new P,Pe(r=new P(t.toString()),s,n),2!=(e=_e(e,r.toString(),s,-1))&&4!=e&&5!=e&&(t=r,o&&0(e=(o=t.toString()).length))throw Error("The string supplied is too short to be a phone number");if(17{const t=[];return e.includes("FIXED_LINE_OR_MOBILE")?(e.includes("MOBILE")||t.push("MOBILE"),e.includes("FIXED_LINE")||t.push("FIXED_LINE")):(e.includes("MOBILE")||e.includes("FIXED_LINE"))&&t.push("FIXED_LINE_OR_MOBILE"),e.concat(t)},Xe={FIXED_LINE:0,MOBILE:1,FIXED_LINE_OR_MOBILE:2,TOLL_FREE:3,PREMIUM_RATE:4,SHARED_COST:5,VOIP:6,PERSONAL_NUMBER:7,PAGER:8,UAN:9,VOICEMAIL:10,UNKNOWN:-1};t("intlTelInputUtilsTemp",{}),t("intlTelInputUtilsTemp.formatNumberAsYouType",(e,t)=>{try{const n=e.replace(/[^+0-9]/g,""),o=new De(t);t="";for(let e=0;e{try{const r=U.g(),i=ke(r,e,t);var o=Ee(r,i,-1);return 0==o||4==o?r.format(i,void 0===n?0:n):e}catch{return e}}),t("intlTelInputUtilsTemp.getExampleNumber",(e,t,n,o)=>{try{const a=U.g();e:{var r=a;if(he(e)){var i=be(ye(r,e),n);try{if(g(i,6)){var s=Te(r,v(i,6),e,!1);break e}}catch(e){}}s=null}return a.format(s,o?0:t?2:1)}catch{return""}}),t("intlTelInputUtilsTemp.getExtension",(e,t)=>{try{return v(ke(U.g(),e,t),3)}catch{return""}}),t("intlTelInputUtilsTemp.getNumberType",(e,t)=>{try{const n=U.g();return ve(n,ke(n,e,t))}catch{return-99}}),t("intlTelInputUtilsTemp.getValidationError",(e,t)=>{if(!t)return 1;try{const n=U.g();return Ee(n,ke(n,e,t),-1)}catch(t){return"Invalid country calling code"===t.message?1:3>=e.length||"Phone number too short after IDD"===t.message||"The string supplied is too short to be a phone number"===t.message?2:"The string supplied is too long to be a phone number"===t.message?3:-99}}),t("intlTelInputUtilsTemp.isValidNumber",(e,t,n)=>{try{const o=U.g(),r=ke(o,e,t),i=function(e,t){var n=we(e,t),o=$(t,1),r=me(e,o,n);return r=null!=r&&("001"==n||o==Se(e,n))&&-1!=$e(e=fe(t),r)}(o,r);if(n){const e=Ze(n).map(e=>Xe[e]);return i&&e.includes(ve(o,r))}return i}catch{return!1}}),t("intlTelInputUtilsTemp.isPossibleNumber",(e,t,n)=>{try{const o=U.g(),r=ke(o,e,t);if(n){const e=Ze(n);for(let t of e)if(0===Ee(o,r,Xe[t]))return!0;return!1}return 0===Ee(o,r,-1)}catch{return!1}}),t("intlTelInputUtilsTemp.getCoreNumber",(e,t)=>{try{return v(ke(U.g(),e,t),2).toString()}catch{return""}}),t("intlTelInputUtilsTemp.numberFormat",{E164:0,INTERNATIONAL:1,NATIONAL:2,RFC3966:3}),t("intlTelInputUtilsTemp.numberType",Xe),t("intlTelInputUtilsTemp.validationError",{IS_POSSIBLE:0,INVALID_COUNTRY_CODE:1,TOO_SHORT:2,TOO_LONG:3,IS_POSSIBLE_LOCAL_ONLY:4,INVALID_LENGTH:5})}();var pa="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0,ha=pa.intlTelInputUtilsTemp;delete pa.intlTelInputUtilsTemp;var ma=ha;ua.utils=ma;var fa=ua,ga=(0,he.forwardRef)(function({initialValue:e="",onChangeNumber:t=()=>{},onChangeCountry:n=()=>{},onChangeValidity:o=()=>{},onChangeErrorCode:r=()=>{},usePreciseValidation:i=!1,initOptions:s={},inputProps:a={},disabled:d},l){const c=(0,he.useRef)(null),u=(0,he.useRef)(null);(0,he.useImperativeHandle)(l,()=>({getInstance:()=>u.current,getInput:()=>c.current}));const p=(0,he.useCallback)(()=>{const e=u.current?.getNumber()||"",s=u.current?.getSelectedCountryData().iso2||"";if(t(e),n(s),u.current)if(i?u.current.isValidNumberPrecise():u.current.isValidNumber())o(!0),r(null);else{const e=u.current.getValidationError();o(!1),r(e)}},[n,r,t,o,i]);return(0,he.useEffect)(()=>(c.current&&(u.current=fa(c.current,s)),()=>{u.current?.destroy()}),[]),(0,he.useEffect)(()=>{const e=c.current;return e&&(e.addEventListener("countrychange",p),u.current.promise.then(p)),()=>{e&&e.removeEventListener("countrychange",p)}},[p]),(0,he.useEffect)(()=>{u.current&&void 0!==d&&u.current.setDisabled(d)},[d]),fe().createElement("input",{type:"tel",ref:c,onInput:p,defaultValue:e,...a})}),ba=ga;const va=["us","gb","ca","au","in","de","fr"],$a=({attributes:e,setAttributes:t,blockID:o})=>{const{label:r,placeholder:i,required:s,autoCountry:a,defaultCountry:d,help:c,enableCountryFilter:p,countryFilterType:h,includeCountries:m,excludeCountries:g}=e,[v,$]=(0,l.useState)(""),y=s?" sd-required":"",x="phone",w=(0,l.useCallback)(e=>function(e,t,n,o=[],r=[]){if(!0!==t&&"true"!==t)return e;const i=Array.isArray(o)?o:[],s=Array.isArray(r)?r:[],a=(e||"").toLowerCase();return"include"===n&&i.length>0?i.includes(a)?a:i[0]:"exclude"===n&&s.length>0?s.includes(a)&&va.find(e=>!s.includes(e))||a:e}(e,p,h,m,g),[p,h,m,g]);(0,l.useEffect)(()=>{if(a&&""===v){const e=document.documentElement.lang||"";let t="us";if(e.includes("-")){const n=e.split("-"),o=n[n.length-1]||"";2===o.length&&(t=o.toLowerCase())}t=w(t),$(t)}},[a,v,w]);const C={initialCountry:(a?v:w(d||"us"))||"us",separateDialCode:!0,autoPlaceholder:"off",countrySearch:!0,formatOnDisplay:!0,allowPhonewords:!0};return p&&("include"===h&&m?.length>0?C.onlyCountries=m:"exclude"===h&&g?.length>0&&(C.excludeCountries=g)),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.RichText,{tagName:"label",value:r,onChange:e=>{t({label:f(e)})},className:`sd-label${y}`,multiline:!1,id:o,allowedFormats:[]}),(0,u.jsx)(b,{help:c,setAttributes:t,block_id:o}),(0,u.jsx)("div",{className:"sd-block-wrap",children:(0,u.jsx)(ba,{inputProps:{className:`sd-input-common sd-input-${x}`,id:`sd-input-${x}-${o}`,placeholder:i||"",disabled:!0},initOptions:C})})]})},ya=JSON.parse('{"UU":"suredonation/phone"}');(0,s.registerBlockType)(ya.UU,{icon:function(e){return ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M15.5 1h-8A2.5 2.5 0 005 3.5v17A2.5 2.5 0 007.5 23h8a2.5 2.5 0 002.5-2.5v-17A2.5 2.5 0 0015.5 1zm-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4.5-4H7V4h9v14z"}}]})(e)},edit:({attributes:e,setAttributes:t})=>{const{block_id:r,help:s,required:a,errorMsg:d,placeholder:c,fieldWidth:p,autoCountry:m,defaultCountry:f,enableCountryFilter:b,countryFilterType:$,includeCountries:y,excludeCountries:x}=e,{currentMessage:w,setCurrentMessage:C}=h("suredonation_phone_block_required_text",d),S=(0,n.useBlockProps)({className:`sd-block sd-phone-block sd-block-width-${p}`}),_=(0,l.useMemo)(()=>fa.getCountryData().map(e=>[e.iso2,e.name]),[]),E=(0,l.useMemo)(()=>[{label:(0,i.__)("Select Country","suredonation"),value:""},..._.map(([e,t])=>({label:t,value:e}))],[_]),I=(0,l.useMemo)(()=>_.map(([,e])=>e),[_]),A=(0,l.useMemo)(()=>{const e={};return _.forEach(([t,n])=>{e[t]=n}),e},[_]),P=(0,l.useMemo)(()=>{const e={};return _.forEach(([t,n])=>{e[n]=t}),e},[_]),k=(0,l.useMemo)(()=>(y||[]).map(e=>A[e]).filter(Boolean),[y,A]),T=(0,l.useMemo)(()=>(x||[]).map(e=>A[e]).filter(Boolean),[x,A]),N=(0,v.useSelect)(e=>e("core/editor")?.getCurrentPostId()||0,[]);(0,l.useEffect)(()=>{r||t({block_id:g()})},[r,t]),(0,l.useEffect)(()=>{N&&e.formId!==N&&t({formId:N})},[N,e.formId,t]);const D=(e,n)=>{const o=(n||[]).map(e=>P[e]).filter(Boolean);t({[e]:o})};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsxs)(L,{tabs:["general","advance"],children:[(0,u.jsxs)(B,{...F,children:[(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Required","suredonation"),checked:a,onChange:e=>t({required:e})}),a&&(0,u.jsx)(ce,{label:(0,i.__)("Error Message","suredonation"),value:w,onChange:e=>{C(e),t({errorMsg:e})}}),(0,u.jsx)(ce,{label:(0,i.__)("Placeholder","suredonation"),value:c,onChange:e=>t({placeholder:e})}),(0,u.jsx)(ce,{label:(0,i.__)("Help Text","suredonation"),variant:"textarea",value:s,onChange:e=>t({help:e})}),(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Auto-detect country","suredonation"),help:(0,i.__)("Detect the visitor’s country automatically. This sends the visitor’s IP address to a third-party service (ipapi.co) to look up their country. Turn off to set a fixed default country.","suredonation"),checked:m,onChange:e=>t({autoCountry:e})}),!m&&(0,u.jsx)(o.SelectControl,{label:(0,i.__)("Default Country","suredonation"),value:f,options:E,onChange:e=>t({defaultCountry:e})}),(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Restrict country codes","suredonation"),checked:b,onChange:e=>t({enableCountryFilter:e})}),b&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Y,{label:(0,i.__)("Restriction Type","suredonation"),value:$,options:[{value:"include",label:(0,i.__)("Allow","suredonation")},{value:"exclude",label:(0,i.__)("Block","suredonation")}],onChange:e=>t({countryFilterType:e}),showIcons:!1}),"include"===$&&(0,u.jsx)(o.FormTokenField,{label:(0,i.__)("Allowed Countries","suredonation"),value:k,suggestions:I,onChange:e=>D("includeCountries",e),__experimentalExpandOnFocus:!0,__nextHasNoMarginBottom:!0}),"exclude"===$&&(0,u.jsx)(o.FormTokenField,{label:(0,i.__)("Blocked Countries","suredonation"),value:T,suggestions:I,onChange:e=>D("excludeCountries",e),__experimentalExpandOnFocus:!0,__nextHasNoMarginBottom:!0})]})]}),(0,u.jsx)(B,{...V})]})}),(0,u.jsx)("div",{...S,children:(0,u.jsxs)("div",{className:"sd-block-preview",children:[(0,u.jsx)($a,{attributes:e,setAttributes:t,blockID:r}),(0,u.jsx)("div",{className:"sd-error-wrap"})]})})]})},save:()=>null});const xa=JSON.parse('{"UU":"suredonation/url"}');(0,s.registerBlockType)(xa.UU,{icon:function(e){return ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"}}]})(e)},edit:({attributes:e,setAttributes:t})=>{const{block_id:r,label:s,placeholder:a,help:d,required:c,errorMsg:p,invalidUrlMsg:m,defaultValue:$,fieldWidth:y}=e,{currentMessage:x,setCurrentMessage:w}=h("suredonation_url_block_required_text",p),C=(0,n.useBlockProps)({className:`sd-block sd-url-block sd-block-width-${y}`}),S=(0,v.useSelect)(e=>e("core/editor")?.getCurrentPostId()||0,[]);return(0,l.useEffect)(()=>{r||t({block_id:g()})},[r,t]),(0,l.useEffect)(()=>{S&&e.formId!==S&&t({formId:S})},[S,e.formId,t]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsxs)(L,{tabs:["general","advance"],children:[(0,u.jsxs)(B,{...F,children:[(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Required","suredonation"),checked:c,onChange:e=>t({required:e})}),c&&(0,u.jsx)(ce,{label:(0,i.__)("Error Message","suredonation"),value:x,onChange:e=>{w(e),t({errorMsg:e})}}),(0,u.jsx)(ce,{label:(0,i.__)("Placeholder","suredonation"),value:a,onChange:e=>t({placeholder:e})}),(0,u.jsx)(ce,{label:(0,i.__)("Help Text","suredonation"),variant:"textarea",value:d,onChange:e=>t({help:e})}),(0,u.jsx)(ce,{label:(0,i.__)("Default Value","suredonation"),value:$,onChange:e=>t({defaultValue:e})}),(0,u.jsx)(ce,{label:(0,i.__)("Invalid URL Message","suredonation"),value:m,onChange:e=>t({invalidUrlMsg:e})})]}),(0,u.jsx)(B,{...V})]})}),(0,u.jsx)("div",{...C,children:(0,u.jsxs)("div",{className:"sd-block-preview",children:[(0,u.jsx)(n.RichText,{tagName:"label",value:s,onChange:e=>t({label:f(e)}),className:"sd-label"+(c?" sd-required":""),multiline:!1,allowedFormats:[],placeholder:(0,i.__)("Label","suredonation")}),(0,u.jsx)(b,{help:d,setAttributes:t,block_id:r}),(0,u.jsx)("div",{className:"sd-block-wrap",children:(0,u.jsx)("input",{type:"url",className:"sd-input-common sd-input-url",placeholder:a,defaultValue:$,disabled:!0})}),(0,u.jsx)("div",{className:"sd-error-wrap"})]})})]})},save:()=>null});const wa=[{value:"left",tooltip:(0,i.__)("Left","suredonation"),icon:(0,u.jsx)(Se,{})},{value:"center",tooltip:(0,i.__)("Center","suredonation"),icon:(0,u.jsx)(Ce,{})},{value:"right",tooltip:(0,i.__)("Right","suredonation"),icon:(0,u.jsx)(_e,{})}],Ca=[{value:"h1",label:(0,i.__)("H1","suredonation")},{value:"h2",label:(0,i.__)("H2","suredonation")},{value:"h3",label:(0,i.__)("H3","suredonation")},{value:"h4",label:(0,i.__)("H4","suredonation")},{value:"h5",label:(0,i.__)("H5","suredonation")},{value:"h6",label:(0,i.__)("H6","suredonation")},{value:"p",label:(0,i.__)("P","suredonation")},{value:"div",label:(0,i.__)("Div","suredonation")}],Sa=[{value:"below",label:(0,i.__)("Below Heading","suredonation")},{value:"above",label:(0,i.__)("Above Heading","suredonation")}],_a=[{value:"none",label:(0,i.__)("None","suredonation")},{value:"solid",label:(0,i.__)("Solid","suredonation")},{value:"double",label:(0,i.__)("Double","suredonation")},{value:"dashed",label:(0,i.__)("Dashed","suredonation")},{value:"dotted",label:(0,i.__)("Dotted","suredonation")}],Ea=[{value:"above-heading",label:(0,i.__)("Above Heading","suredonation")},{value:"below-heading",label:(0,i.__)("Below Heading","suredonation")},{value:"below-subheading",label:(0,i.__)("Below Subheading","suredonation")}],Ia=JSON.parse('{"UU":"suredonation/heading"}');(0,s.registerBlockType)(Ia.UU,{icon:function(e){return ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M5 4v3h5.5v12h3V7H19V4z"}}]})(e)},edit:({attributes:e,setAttributes:t})=>{const{block_id:r,headingText:s,headingTag:a,textAlign:d,fieldWidth:c,enableSubHeading:p,subHeadingText:h,subHeadingPosition:m,separatorStyle:b,separatorPosition:$}=e,y=(0,n.useBlockProps)({className:`sd-block sd-heading-block sd-block-width-${c}`}),x=a||"h2",w=(0,u.jsx)(n.RichText,{tagName:x,value:s,onChange:e=>t({headingText:f(e)}),className:`sd-heading sd-heading-align-${d}`,style:{textAlign:d},multiline:!1,allowedFormats:[],placeholder:(0,i.__)("Section Heading","suredonation")},"heading"),C=p?(0,u.jsx)(n.RichText,{tagName:"p",value:h,onChange:e=>t({subHeadingText:f(e)}),className:`sd-subheading sd-subheading-align-${d}`,style:{textAlign:d},multiline:!1,allowedFormats:[],placeholder:(0,i.__)("Sub heading","suredonation")},"subheading"):null,S=b&&"none"!==b?(0,u.jsx)("hr",{className:`sd-heading-separator sd-heading-separator--${b} sd-heading-separator-align-${d}`},"separator"):null,_=(0,v.useSelect)(e=>e("core/editor")?.getCurrentPostId()||0,[]);return(0,l.useEffect)(()=>{r||t({block_id:g()})},[r,t]),(0,l.useEffect)(()=>{_&&e.formId!==_&&t({formId:_})},[_,e.formId,t]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsxs)(L,{tabs:["general","advance"],children:[(0,u.jsxs)(B,{...F,children:[(0,u.jsxs)(U,{title:(0,i.__)("Content","suredonation"),initialOpen:!0,children:[(0,u.jsx)(Y,{label:(0,i.__)("Alignment","suredonation"),options:wa,showIcons:!0,value:d,onChange:e=>t({textAlign:e})}),(0,u.jsx)(Y,{label:(0,i.__)("Heading Tag","suredonation"),options:Ca,value:a,onChange:e=>t({headingTag:e})})]},"content"),(0,u.jsxs)(U,{title:(0,i.__)("Sub Heading","suredonation"),initialOpen:!1,children:[(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Enable Sub Heading","suredonation"),checked:p,onChange:e=>t({enableSubHeading:e})}),p&&(0,u.jsx)(o.SelectControl,{__next40pxDefaultSize:!0,label:(0,i.__)("Position","suredonation"),value:m,options:Sa,onChange:e=>t({subHeadingPosition:e})})]},"sub-heading"),(0,u.jsxs)(U,{title:(0,i.__)("Separator","suredonation"),initialOpen:!1,children:[(0,u.jsx)(o.SelectControl,{__next40pxDefaultSize:!0,label:(0,i.__)("Style","suredonation"),value:b,options:_a,onChange:e=>t({separatorStyle:e})}),b&&"none"!==b&&(0,u.jsx)(o.SelectControl,{__next40pxDefaultSize:!0,label:(0,i.__)("Position","suredonation"),value:$,options:Ea,onChange:e=>t({separatorPosition:e})})]},"separator")]}),(0,u.jsx)(B,{...V})]})}),(0,u.jsx)("div",{...y,children:(()=>{const e=[];let t=!1;return("above"===m?["sub","heading"]:["heading","sub"]).forEach(n=>{"heading"===n?(S&&"above-heading"===$&&(e.push(S),t=!0),e.push(w),S&&"below-heading"===$&&(e.push(S),t=!0)):C&&(e.push(C),S&&"below-subheading"===$&&(e.push(S),t=!0))}),S&&!t&&e.push(S),e})()})]})},save:()=>null});const Aa=(0,he.createContext)({});function Pa(e){const t=(0,he.useRef)(null);return null===t.current&&(t.current=e()),t.current}const ka=(0,he.createContext)(null),Ta=(0,he.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Na extends he.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Da({children:e,isPresent:t}){const n=(0,he.useId)(),o=(0,he.useRef)(null),r=(0,he.useRef)({width:0,height:0,top:0,left:0}),{nonce:i}=(0,he.useContext)(Ta);return(0,he.useInsertionEffect)(()=>{const{width:e,height:s,top:a,left:d}=r.current;if(t||!o.current||!e||!s)return;o.current.dataset.motionPopId=n;const l=document.createElement("style");return i&&(l.nonce=i),document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${s}px !important;\n top: ${a}px !important;\n left: ${d}px !important;\n }\n `),()=>{document.head.removeChild(l)}},[t]),(0,u.jsx)(Na,{isPresent:t,childRef:o,sizeRef:r,children:he.cloneElement(e,{ref:o})})}const Ma=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:r,presenceAffectsLayout:i,mode:s})=>{const a=Pa(Ra),d=(0,he.useId)(),l=(0,he.useCallback)(e=>{a.set(e,!0);for(const e of a.values())if(!e)return;o&&o()},[a,o]),c=(0,he.useMemo)(()=>({id:d,initial:t,isPresent:n,custom:r,onExitComplete:l,register:e=>(a.set(e,!1),()=>a.delete(e))}),i?[Math.random(),l]:[n,l]);return(0,he.useMemo)(()=>{a.forEach((e,t)=>a.set(t,!1))},[n]),he.useEffect(()=>{!n&&!a.size&&o&&o()},[n]),"popLayout"===s&&(e=(0,u.jsx)(Da,{isPresent:n,children:e})),(0,u.jsx)(ka.Provider,{value:c,children:e})};function Ra(){return new Map}function ja(e=!0){const t=(0,he.useContext)(ka);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,i=(0,he.useId)();(0,he.useEffect)(()=>{e&&r(i)},[e]);const s=(0,he.useCallback)(()=>e&&o&&o(i),[i,o,e]);return!n&&o?[!1,s]:[!0]}const Oa=e=>e.key||"";function La(e){const t=[];return he.Children.forEach(e,e=>{(0,he.isValidElement)(e)&&t.push(e)}),t}const Ba="undefined"!=typeof window,Fa=Ba?he.useLayoutEffect:he.useEffect,Va=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:i="sync",propagate:s=!1})=>{const[a,d]=ja(s),l=(0,he.useMemo)(()=>La(e),[e]),c=s&&!a?[]:l.map(Oa),p=(0,he.useRef)(!0),h=(0,he.useRef)(l),m=Pa(()=>new Map),[f,g]=(0,he.useState)(l),[b,v]=(0,he.useState)(l);Fa(()=>{p.current=!1,h.current=l;for(let e=0;e{const f=Oa(e),g=!(s&&!a)&&(l===b||c.includes(f));return(0,u.jsx)(Ma,{isPresent:g,initial:!(p.current&&!n)&&void 0,custom:g?void 0:t,presenceAffectsLayout:r,mode:i,onExitComplete:g?void 0:()=>{if(!m.has(f))return;m.set(f,!0);let e=!0;m.forEach(t=>{t||(e=!1)}),e&&(null==y||y(),v(h.current),s&&(null==d||d()),o&&o())},children:e},f)})})};function Ua(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy((...t)=>e(...t),{get:(n,o)=>"create"===o?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}function za(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const Ga=e=>Array.isArray(e);function Ha(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function qa(e,t,n,o){if("function"==typeof t){const[r,i]=Ka(o);t=t(void 0!==n?n:e.custom,r,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[r,i]=Ka(o);t=t(void 0!==n?n:e.custom,r,i)}return t}function Ya(e,t,n){const o=e.getProps();return qa(o,t,void 0!==n?n:o.custom,e)}const Za=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xa=["initial",...Za];function Ja(e){let t;return()=>(void 0===t&&(t=e()),t)}const Qa=Ja(()=>void 0!==window.ScrollTimeline);class ed{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;nQa()&&n.attachTimeline?n.attachTimeline(e):"function"==typeof t?t(n):void 0);return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;tt[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class td extends ed{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function nd(e,t){return e?e[t]||e.default||e:void 0}const od=2e4;function rd(e){let t=0,n=e.next(t);for(;!n.done&&t=od?1/0:t}function id(e){return"function"==typeof e}function sd(e,t){e.timeline=t,e.onfinish=null}const ad=e=>Array.isArray(e)&&"number"==typeof e[0],dd={linearEasing:void 0};function ld(e,t){const n=Ja(e);return()=>{var e;return null!==(e=dd[t])&&void 0!==e?e:n()}}const cd=ld(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),ud=(e,t,n)=>{const o=t-e;return 0===o?1:(n-e)/o},pd=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let t=0;t`cubic-bezier(${e}, ${t}, ${n}, ${o})`,fd={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:md([0,.65,.55,1]),circOut:md([.55,0,1,.45]),backIn:md([.31,.01,.66,-.59]),backOut:md([.33,1.53,.69,.99])};function gd(e,t){return e?"function"==typeof e&&cd()?pd(e,t):ad(e)?md(e):Array.isArray(e)?e.map(e=>gd(e,t)||fd.easeOut):fd[e]:void 0}const bd={x:!1,y:!1};function vd(){return bd.x||bd.y}function $d(e,t){const n=function(e){if(e instanceof Element)return[e];if("string"==typeof e){let t=document;const n=t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}(e),o=new AbortController;return[n,{passive:!0,...t,signal:o.signal},()=>o.abort()]}function yd(e){return t=>{"touch"===t.pointerType||vd()||e(t)}}const xd=(e,t)=>!!t&&(e===t||xd(e,t.parentElement)),wd=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,Cd=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),Sd=new WeakSet;function _d(e){return t=>{"Enter"===t.key&&e(t)}}function Ed(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Id(e){return wd(e)&&!vd()}const Ad=e=>1e3*e,Pd=e=>e/1e3,kd=e=>e,Td=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nd=new Set(Td),Dd=new Set(["width","height","top","left","right","bottom",...Td]),Md=e=>Ga(e)?e[e.length-1]||0:e,Rd=["read","resolveKeyframes","update","preRender","render","postRender"];function jd(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Rd.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,o=!1,r=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){i.has(t)&&(d.schedule(t),e()),t(s)}const d={schedule:(e,r=!1,s=!1)=>{const a=s&&o?t:n;return r&&i.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{s=e,o?r=!0:(o=!0,[t,n]=[n,t],t.forEach(a),t.clear(),o=!1,r&&(r=!1,d.process(e)))}};return d}(i),e),{}),{read:a,resolveKeyframes:d,update:l,preRender:c,render:u,postRender:p}=s,h=()=>{const i=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(i-r.timestamp,40),1),r.timestamp=i,r.isProcessing=!0,a.process(r),d.process(r),l.process(r),c.process(r),u.process(r),p.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(h))},m=Rd.reduce((t,i)=>{const a=s[i];return t[i]=(t,i=!1,s=!1)=>(n||(n=!0,o=!0,r.isProcessing||e(h)),a.schedule(t,i,s)),t},{});return{schedule:m,cancel:e=>{for(let t=0;t(void 0===Vd&&zd.set(Bd.isProcessing?Bd.timestamp:performance.now()),Vd),set:e=>{Vd=e,queueMicrotask(Ud)}};function Gd(e,t){-1===e.indexOf(t)&&e.push(t)}function Hd(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Wd{constructor(){this.subscriptions=[]}add(e){return Gd(this.subscriptions,e),()=>Hd(this.subscriptions,e)}notify(e,t,n){const o=this.subscriptions.length;if(o)if(1===o)this.subscriptions[0](e,t,n);else for(let r=0;r{const n=zd.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=zd.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Wd);const n=this.events[e].add(t);return"change"===e?()=>{n(),Od.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return qd.current&&qd.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=zd.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Kd(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zd(e,t){return new Yd(e,t)}function Xd(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zd(n))}const Jd=e=>Boolean(e&&e.getVelocity);function Qd(e,t){const n=e.getValue("willChange");if(o=n,Boolean(Jd(o)&&o.add))return n.add(t);var o}const el=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),tl="data-"+el("framerAppearId");function nl(e){return e.props[tl]}const ol=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function rl(e,t,n,o){if(e===t&&n===o)return kd;return r=>0===r||1===r?r:ol(function(e,t,n,o,r){let i,s,a=0;do{s=t+(n-t)/2,i=ol(s,o,r)-e,i>0?n=s:t=s}while(Math.abs(i)>1e-7&&++a<12);return s}(r,0,1,e,n),t,o)}const il=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,sl=e=>t=>1-e(1-t),al=rl(.33,1.53,.69,.99),dl=sl(al),ll=il(dl),cl=e=>(e*=2)<1?.5*dl(e):.5*(2-Math.pow(2,-10*(e-1))),ul=e=>1-Math.sin(Math.acos(e)),pl=sl(ul),hl=il(ul),ml=e=>/^0[^.\s]+$/u.test(e);function fl(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||ml(e)}const gl=(e,t,n)=>n>t?t:n"number"==typeof e,parse:parseFloat,transform:e=>e},vl={...bl,transform:e=>gl(0,1,e)},$l={...bl,default:1},yl=e=>Math.round(1e5*e)/1e5,xl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,wl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Cl=(e,t)=>n=>Boolean("string"==typeof n&&wl.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Sl=(e,t,n)=>o=>{if("string"!=typeof o)return o;const[r,i,s,a]=o.match(xl);return{[e]:parseFloat(r),[t]:parseFloat(i),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},_l={...bl,transform:e=>Math.round((e=>gl(0,255,e))(e))},El={test:Cl("rgb","red"),parse:Sl("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+_l.transform(e)+", "+_l.transform(t)+", "+_l.transform(n)+", "+yl(vl.transform(o))+")"},Il={test:Cl("#"),parse:function(e){let t="",n="",o="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,o+=o,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}},transform:El.transform},Al=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Pl=Al("deg"),kl=Al("%"),Tl=Al("px"),Nl=Al("vh"),Dl=Al("vw"),Ml={...kl,parse:e=>kl.parse(e)/100,transform:e=>kl.transform(100*e)},Rl={test:Cl("hsl","hue"),parse:Sl("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+kl.transform(yl(t))+", "+kl.transform(yl(n))+", "+yl(vl.transform(o))+")"},jl={test:e=>El.test(e)||Il.test(e)||Rl.test(e),parse:e=>El.test(e)?El.parse(e):Rl.test(e)?Rl.parse(e):Il.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?El.transform(e):Rl.transform(e)},Ol=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Ll="number",Bl="color",Fl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Vl(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let i=0;const s=t.replace(Fl,e=>(jl.test(e)?(o.color.push(i),r.push(Bl),n.push(jl.parse(e))):e.startsWith("var(")?(o.var.push(i),r.push("var"),n.push(e)):(o.number.push(i),r.push(Ll),n.push(parseFloat(e))),++i,"${}")).split("${}");return{values:n,split:s,indexes:o,types:r}}function Ul(e){return Vl(e).values}function zl(e){const{split:t,types:n}=Vl(e),o=t.length;return e=>{let r="";for(let i=0;i"number"==typeof e?0:e,Hl={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(xl))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Ol))||void 0===n?void 0:n.length)||0)>0},parse:Ul,createTransformer:zl,getAnimatableNone:function(e){const t=Ul(e);return zl(e)(t.map(Gl))}},Wl=new Set(["brightness","contrast","saturate","opacity"]);function Kl(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[o]=n.match(xl)||[];if(!o)return e;const r=n.replace(o,"");let i=Wl.has(t)?1:0;return o!==n&&(i*=100),t+"("+i+r+")"}const ql=/\b([a-z-]*)\(.*?\)/gu,Yl={...Hl,getAnimatableNone:e=>{const t=e.match(ql);return t?t.map(Kl).join(" "):e}},Zl={borderWidth:Tl,borderTopWidth:Tl,borderRightWidth:Tl,borderBottomWidth:Tl,borderLeftWidth:Tl,borderRadius:Tl,radius:Tl,borderTopLeftRadius:Tl,borderTopRightRadius:Tl,borderBottomRightRadius:Tl,borderBottomLeftRadius:Tl,width:Tl,maxWidth:Tl,height:Tl,maxHeight:Tl,top:Tl,right:Tl,bottom:Tl,left:Tl,padding:Tl,paddingTop:Tl,paddingRight:Tl,paddingBottom:Tl,paddingLeft:Tl,margin:Tl,marginTop:Tl,marginRight:Tl,marginBottom:Tl,marginLeft:Tl,backgroundPositionX:Tl,backgroundPositionY:Tl},Xl={rotate:Pl,rotateX:Pl,rotateY:Pl,rotateZ:Pl,scale:$l,scaleX:$l,scaleY:$l,scaleZ:$l,skew:Pl,skewX:Pl,skewY:Pl,distance:Tl,translateX:Tl,translateY:Tl,translateZ:Tl,x:Tl,y:Tl,z:Tl,perspective:Tl,transformPerspective:Tl,opacity:vl,originX:Ml,originY:Ml,originZ:Tl},Jl={...bl,transform:Math.round},Ql={...Zl,...Xl,zIndex:Jl,size:Tl,fillOpacity:vl,strokeOpacity:vl,numOctaves:Jl},ec={...Ql,color:jl,backgroundColor:jl,outlineColor:jl,fill:jl,stroke:jl,borderColor:jl,borderTopColor:jl,borderRightColor:jl,borderBottomColor:jl,borderLeftColor:jl,filter:Yl,WebkitFilter:Yl},tc=e=>ec[e];function nc(e,t){let n=tc(e);return n!==Yl&&(n=Hl),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const oc=new Set(["auto","none","0"]),rc=e=>e===bl||e===Tl,ic=(e,t)=>parseFloat(e.split(", ")[t]),sc=(e,t)=>(n,{transform:o})=>{if("none"===o||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return ic(r[1],t);{const t=o.match(/^matrix\((.+)\)$/u);return t?ic(t[1],e):0}},ac=new Set(["x","y","z"]),dc=Td.filter(e=>!ac.has(e)),lc={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:sc(4,13),y:sc(5,14)};lc.translateX=lc.x,lc.translateY=lc.y;const cc=new Set;let uc=!1,pc=!1;function hc(){if(pc){const e=Array.from(cc).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return dc.forEach(n=>{const o=e.getValue(n);void 0!==o&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{var o;null===(o=e.getValue(t))||void 0===o||o.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}pc=!1,uc=!1,cc.forEach(e=>e.complete()),cc.clear()}function mc(){cc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(pc=!0)})}class fc{constructor(e,t,n,o,r,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=o,this.element=r,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(cc.add(this),uc||(uc=!0,Od.read(mc),Od.resolveKeyframes(hc))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:o}=this;for(let r=0;r/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),$c=e=>t=>"string"==typeof t&&t.startsWith(e),yc=$c("--"),xc=$c("var(--"),wc=e=>!!xc(e)&&Cc.test(e.split("/*")[0].trim()),Cc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Sc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _c(e,t,n=1){bc(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[o,r]=function(e){const t=Sc.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${null!=n?n:o}`,r]}(e);if(!o)return;const i=window.getComputedStyle(t).getPropertyValue(o);if(i){const e=i.trim();return vc(e)?parseFloat(e):e}return wc(r)?_c(r,t,n+1):r}const Ec=e=>t=>t.test(e),Ic=[bl,Tl,kl,Pl,Dl,Nl,{test:e=>"auto"===e,parse:e=>e}],Ac=e=>Ic.find(Ec(e));class Pc extends fc{constructor(e,t,n,o,r){super(e,t,n,o,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const kc=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!Hl.test(e)&&"0"!==e||e.startsWith("url(")));function Tc(e,t,n,o){const r=e[0];if(null===r)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],s=kc(r,t),a=kc(i,t);return gc(s===a,`You are trying to animate ${t} from "${r}" to "${i}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${i} via the \`style\` property.`),!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;nnull!==e;function Dc(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(Nc),i=t&&"loop"!==n&&t%2==1?0:r.length-1;return i&&void 0!==o?o:r[i]}class Mc{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:i="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=zd.now(),this.options={autoplay:e,delay:t,type:n,repeat:o,repeatDelay:r,repeatType:i,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(mc(),hc()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=zd.now(),this.hasAttemptedResolve=!0;const{name:n,type:o,velocity:r,delay:i,onComplete:s,onUpdate:a,isGenerator:d}=this.options;if(!d&&!Tc(e,n,o,r)){if(!i)return a&&a(Dc(e,this.options,t)),s&&s(),void this.resolveFinishedPromise();this.options.duration=0}const l=this.initPlayback(e,t);!1!==l&&(this._resolved={keyframes:e,finalKeyframe:t,...l},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const Rc=(e,t,n)=>e+(t-e)*n;function jc(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Oc(e,t){return n=>n>0?t:e}const Lc=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},Bc=[Il,El,Rl];function Fc(e){const t=(e=>Bc.find(t=>t.test(e)))(e);if(gc(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let n=t.parse(e);return t===Rl&&(n=function({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,n/=100;let r=0,i=0,s=0;if(t/=100){const o=n<.5?n*(1+t):n+t-n*t,a=2*n-o;r=jc(a,o,e+1/3),i=jc(a,o,e),s=jc(a,o,e-1/3)}else r=i=s=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*s),alpha:o}}(n)),n}const Vc=(e,t)=>{const n=Fc(e),o=Fc(t);if(!n||!o)return Oc(e,t);const r={...n};return e=>(r.red=Lc(n.red,o.red,e),r.green=Lc(n.green,o.green,e),r.blue=Lc(n.blue,o.blue,e),r.alpha=Rc(n.alpha,o.alpha,e),El.transform(r))},Uc=(e,t)=>n=>t(e(n)),zc=(...e)=>e.reduce(Uc),Gc=new Set(["none","hidden"]);function Hc(e,t){return n=>Rc(e,t,n)}function Wc(e){return"number"==typeof e?Hc:"string"==typeof e?wc(e)?Oc:jl.test(e)?Vc:Yc:Array.isArray(e)?Kc:"object"==typeof e?jl.test(e)?Vc:qc:Oc}function Kc(e,t){const n=[...e],o=n.length,r=e.map((e,n)=>Wc(e)(e,t[n]));return e=>{for(let t=0;t{for(const t in o)n[t]=o[t](e);return n}}const Yc=(e,t)=>{const n=Hl.createTransformer(t),o=Vl(e),r=Vl(t);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?Gc.has(e)&&!r.values.length||Gc.has(t)&&!o.values.length?function(e,t){return Gc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):zc(Kc(function(e,t){var n;const o=[],r={color:0,var:0,number:0};for(let i=0;ivoid 0!==e[t])}function au(e=.3,t=.3){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:r}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:d,damping:l,mass:c,duration:u,velocity:p,isResolvedFromDuration:h}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!su(e,iu)&&su(e,ru))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(1.2*n),r=o*o,i=2*gl(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:1,stiffness:r,damping:i}}else{const n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:o=1}){let r,i;gc(e<=Ad(10),"Spring duration must be 10 seconds or less");let s=1-t;s=gl(.05,1,s),e=gl(.01,10,Pd(e)),s<1?(r=t=>{const o=t*s,r=o*e;return.001-(o-n)/ou(t,s)*Math.exp(-r)},i=t=>{const o=t*s*e,i=o*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,d=Math.exp(-o),l=ou(Math.pow(t,2),s);return(.001-r(t)>0?-1:1)*((i-a)*d)/l}):(r=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let o=n;for(let n=1;n{const n=Math.exp(-f*b*t);return s-n*((m+f*b*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===f)$=e=>s-Math.exp(-b*e)*(g+(m+b*g)*e);else{const e=b*Math.sqrt(f*f-1);$=t=>{const n=Math.exp(-f*b*t),o=Math.min(e*t,300);return s-n*((m+f*b*g)*Math.sinh(o)+e*g*Math.cosh(o))/e}}const y={calculatedDuration:h&&u||null,next:e=>{const t=$(e);if(h)a.done=e>=u;else{let n=0;f<1&&(n=0===e?Ad(m):Xc($,e,t));const i=Math.abs(n)<=o,d=Math.abs(s-t)<=r;a.done=i&&d}return a.value=a.done?s:t,a},toString:()=>{const e=Math.min(rd(y),od),t=pd(t=>y.next(e*t).value,e,30);return e+"ms "+t}};return y}function du({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:d,restDelta:l=.5,restSpeed:c}){const u=e[0],p={done:!1,value:u},h=e=>void 0===a?d:void 0===d||Math.abs(a-e)-m*Math.exp(-e/o),v=e=>g+b(e),$=e=>{const t=b(e),n=v(e);p.done=Math.abs(t)<=l,p.value=p.done?g:n};let y,x;const w=e=>{(e=>void 0!==a&&ed)(p.value)&&(y=e,x=au({keyframes:[p.value,h(p.value)],velocity:Xc(v,e,p.value),damping:r,stiffness:i,restDelta:l,restSpeed:c}))};return w(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==y||(t=!0,$(e),w(e)),void 0!==y&&e>=y?x.next(e-y):(!t&&$(e),p)}}}const lu=rl(.42,0,1,1),cu=rl(0,0,.58,1),uu=rl(.42,0,.58,1),pu={linear:kd,easeIn:lu,easeInOut:uu,easeOut:cu,circIn:ul,circInOut:hl,circOut:pl,backIn:dl,backInOut:ll,backOut:al,anticipate:cl},hu=e=>{if(ad(e)){bc(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,o,r]=e;return rl(t,n,o,r)}return"string"==typeof e?(bc(void 0!==pu[e],`Invalid easing type '${e}'`),pu[e]):e};function mu({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=(e=>Array.isArray(e)&&"number"!=typeof e[0])(o)?o.map(hu):hu(o),i={done:!1,value:t[0]},s=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=ud(0,t,o);e.push(Rc(n,1,r))}}(t,e.length-1),t}(t),e),a=function(e,t,{clamp:n=!0,ease:o,mixer:r}={}){const i=e.length;if(bc(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const o=[],r=n||Zc,i=e.length-1;for(let n=0;n{if(s&&n1)for(;ol(gl(e[0],e[i-1],t)):l}(s,t,{ease:Array.isArray(r)?r:(d=t,l=r,d.map(()=>l||uu).splice(0,d.length-1))});var d,l;return{calculatedDuration:e,next:t=>(i.value=a(t),i.done=t>=e,i)}}const fu=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Od.update(t,!0),stop:()=>Ld(t),now:()=>Bd.isProcessing?Bd.timestamp:zd.now()}},gu={decay:du,inertia:du,tween:mu,keyframes:mu,spring:au},bu=e=>e/100;class vu extends Mc{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:o,keyframes:r}=this.options,i=(null==o?void 0:o.KeyframeResolver)||fc;this.resolver=new i(r,(e,t)=>this.onKeyframesResolved(e,t),t,n,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:o=0,repeatType:r,velocity:i=0}=this.options,s=id(t)?t:gu[t]||mu;let a,d;s!==mu&&"number"!=typeof e[0]&&(a=zc(bu,Zc(e[0],e[1])),e=[0,100]);const l=s({...this.options,keyframes:e});"mirror"===r&&(d=s({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===l.calculatedDuration&&(l.calculatedDuration=rd(l));const{calculatedDuration:c}=l,u=c+o;return{generator:l,mirroredGenerator:d,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:u,totalDuration:u*(n+1)-o}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:o,generator:r,mirroredGenerator:i,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:d,totalDuration:l,resolvedDuration:c}=n;if(null===this.startTime)return r.next(0);const{delay:u,repeat:p,repeatType:h,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-l/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-u*(this.speed>=0?1:-1),b=this.speed>=0?g<0:g>l;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=l);let v=this.currentTime,$=r;if(p){const e=Math.min(this.currentTime,l)/c;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,p+1),Boolean(t%2)&&("reverse"===h?(n=1-n,m&&(n-=m/c)):"mirror"===h&&($=i)),v=gl(0,1,n)*c}const y=b?{done:!1,value:a[0]}:$.next(v);s&&(y.value=s(y.value));let{done:x}=y;b||null===d||(x=this.speed>=0?this.currentTime>=l:this.currentTime<=0);const w=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return w&&void 0!==o&&(y.value=Dc(a,this.options,o)),f&&f(y.value),w&&this.finish(),y}get duration(){const{resolved:e}=this;return e?Pd(e.calculatedDuration):0}get time(){return Pd(this.currentTime)}set time(e){e=Ad(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Pd(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=fu,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();const o=this.driver.now();null!==this.holdTime?this.startTime=o-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=o):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const $u=new Set(["opacity","clipPath","filter","transform"]),yu=Ja(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),xu={anticipate:cl,backInOut:ll,circInOut:hl};class wu extends Mc{constructor(e){super(e);const{name:t,motionValue:n,element:o,keyframes:r}=this.options;this.resolver=new Pc(r,(e,t)=>this.onKeyframesResolved(e,t),t,n,o),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:o,ease:r,type:i,motionValue:s,name:a,startTime:d}=this.options;if(!s.owner||!s.owner.current)return!1;if("string"==typeof r&&cd()&&r in xu&&(r=xu[r]),function(e){return id(e.type)||"spring"===e.type||!hd(e.ease)}(this.options)){const{onComplete:t,onUpdate:s,motionValue:a,element:d,...l}=this.options,c=function(e,t){const n=new vu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:e[0]};const r=[];let i=0;for(;!o.done&&i<2e4;)o=n.sample(i),r.push(o.value),i+=10;return{times:void 0,keyframes:r,duration:i-10,ease:"linear"}}(e,l);1===(e=c.keyframes).length&&(e[1]=e[0]),n=c.duration,o=c.times,r=c.ease,i="keyframes"}const l=function(e,t,n,{delay:o=0,duration:r=300,repeat:i=0,repeatType:s="loop",ease:a="easeInOut",times:d}={}){const l={[t]:n};d&&(l.offset=d);const c=gd(a,r);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:o,duration:r,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:"reverse"===s?"alternate":"normal"})}(s.owner.current,a,e,{...this.options,duration:n,times:o,ease:r});return l.startTime=null!=d?d:this.calcStartTime(),this.pendingTimeline?(sd(l,this.pendingTimeline),this.pendingTimeline=void 0):l.onfinish=()=>{const{onComplete:n}=this.options;s.set(Dc(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:l,duration:n,times:o,type:i,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return Pd(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return Pd(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=Ad(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return kd;const{animation:n}=t;sd(n,e)}else this.pendingTimeline=e;return kd}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:o,type:r,ease:i,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,element:d,...l}=this.options,c=new vu({...l,keyframes:n,duration:o,type:r,ease:i,times:s,isGenerator:!0}),u=Ad(this.time);e.setWithVelocity(c.sample(u-10).value,c.sample(u).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:o,repeatType:r,damping:i,type:s}=e;if(!(t&&t.owner&&t.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:d}=t.owner.getProps();return yu()&&n&&$u.has(n)&&!a&&!d&&!o&&"mirror"!==r&&0!==i&&"inertia"!==s}}const Cu={type:"spring",stiffness:500,damping:25,restSpeed:10},Su={type:"keyframes",duration:.8},_u={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Eu=(e,{keyframes:t})=>t.length>2?Su:Nd.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Cu:_u,Iu=(e,t,n,o={},r,i)=>s=>{const a=nd(o,e)||{},d=a.delay||o.delay||0;let{elapsed:l=0}=o;l-=Ad(d);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-l,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:r};(function({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:i,repeatType:s,repeatDelay:a,from:d,elapsed:l,...c}){return!!Object.keys(c).length})(a)||(c={...c,...Eu(e,c)}),c.duration&&(c.duration=Ad(c.duration)),c.repeatDelay&&(c.repeatDelay=Ad(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let u=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(c.duration=0,0===c.delay&&(u=!0)),u&&!i&&void 0!==t.get()){const e=Dc(c.keyframes,a);if(void 0!==e)return Od.update(()=>{c.onUpdate(e),c.onComplete()}),new td([])}return!i&&wu.supports(c)?new wu(c):new vu(c)};function Au({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,o}function Pu(e,t,{delay:n=0,transitionOverride:o,type:r}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...d}=t;o&&(s=o);const l=[],c=r&&e.animationState&&e.animationState.getState()[r];for(const t in d){const o=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),r=d[t];if(void 0===r||c&&Au(c,t))continue;const a={delay:n,...nd(s||{},t)};let u=!1;if(window.MotionHandoffAnimation){const n=nl(e);if(n){const e=window.MotionHandoffAnimation(n,t,Od);null!==e&&(a.startTime=e,u=!0)}}Qd(e,t),o.start(Iu(t,o,r,e.shouldReduceMotion&&Dd.has(t)?{type:!1}:a,e,u));const p=o.animation;p&&l.push(p)}return a&&Promise.all(l).then(()=>{Od.update(()=>{a&&function(e,t){const n=Ya(e,t);let{transitionEnd:o={},transition:r={},...i}=n||{};i={...i,...o};for(const t in i)Xd(e,t,Md(i[t]))}(e,a)})}),l}function ku(e,t,n={}){var o;const r=Ya(e,t,"exit"===n.type?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Pu(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(o=0)=>{const{delayChildren:r=0,staggerChildren:s,staggerDirection:a}=i;return function(e,t,n=0,o=0,r=1,i){const s=[],a=(e.variantChildren.size-1)*o,d=1===r?(e=0)=>e*o:(e=0)=>a-e*o;return Array.from(e.variantChildren).sort(Tu).forEach((e,o)=>{e.notify("AnimationStart",t),s.push(ku(e,t,{...i,delay:n+d(o)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(s)}(e,t,r+o,s,a,n)}:()=>Promise.resolve(),{when:d}=i;if(d){const[e,t]="beforeChildren"===d?[s,a]:[a,s];return e().then(()=>t())}return Promise.all([s(),a(n.delay)])}function Tu(e,t){return e.sortNodePosition(t)}const Nu=Xa.length;function Du(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Du(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;nPromise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let o;if(e.notify("AnimationStart",t),Array.isArray(t)){const r=t.map(t=>ku(e,t,n));o=Promise.all(r)}else if("string"==typeof t)o=ku(e,t,n);else{const r="function"==typeof t?Ya(e,t,n.custom):t;o=Promise.all(Pu(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}(e),n=Bu(),o=!0;const r=t=>(n,o)=>{var r;const i=Ya(e,o,"exit"===t?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);if(i){const{transition:e,transitionEnd:t,...o}=i;n={...n,...o,...t}}return n};function i(i){const{props:s}=e,a=Du(e.parent)||{},d=[],l=new Set;let c={},u=1/0;for(let t=0;tu&&f,y=!1;const x=Array.isArray(m)?m:[m];let w=x.reduce(r(p),{});!1===g&&(w={});const{prevResolvedValues:C={}}=h,S={...C,...w},_=t=>{$=!0,l.has(t)&&(y=!0,l.delete(t)),h.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in S){const t=w[e],n=C[e];if(c.hasOwnProperty(e))continue;let o=!1;o=Ga(t)&&Ga(n)?!Ha(t,n):t!==n,o?null!=t?_(e):l.add(e):void 0!==t&&l.has(e)?_(e):h.protectedKeys[e]=!0}h.prevProp=m,h.prevResolvedValues=w,h.isActive&&(c={...c,...w}),o&&e.blockInitialAnimation&&($=!1),$&&(!b||!v||y)&&d.push(...x.map(e=>({animation:e,options:{type:p}})))}if(l.size){const t={};l.forEach(n=>{const o=e.getBaseTarget(n),r=e.getValue(n);r&&(r.liveStyle=!0),t[n]=null!=o?o:null}),d.push({animation:t})}let p=Boolean(d.length);return!o||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(p=!1),o=!1,p?t(d):Promise.resolve()}return{animateChanges:i,setActive:function(t,o){var r;if(n[t].isActive===o)return Promise.resolve();null===(r=e.variantChildren)||void 0===r||r.forEach(e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,o)}),n[t].isActive=o;const s=i(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Bu(),o=!0}}}function Ou(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Ha(t,e)}function Lu(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Bu(){return{animate:Lu(!0),whileInView:Lu(),whileHover:Lu(),whileTap:Lu(),whileDrag:Lu(),whileFocus:Lu(),exit:Lu()}}class Fu{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Vu=0;const Uu={animation:{Feature:class extends Fu{constructor(e){super(e),e.animationState||(e.animationState=ju(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();za(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Fu{constructor(){super(...arguments),this.id=Vu++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const o=this.node.animationState.setActive("exit",!e);t&&!e&&o.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}};function zu(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function Gu(e){return{point:{x:e.pageX,y:e.pageY}}}function Hu(e,t,n,o){return zu(e,t,(e=>t=>wd(t)&&e(t,Gu(t)))(n),o)}const Wu=(e,t)=>Math.abs(e-t);class Ku{constructor(e,t,{transformPagePoint:n,contextWindow:o,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Zu(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Wu(e.x,t.x),o=Wu(e.y,t.y);return Math.sqrt(n**2+o**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:o}=e,{timestamp:r}=Bd;this.history.push({...o,timestamp:r});const{onStart:i,onMove:s}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=qu(t,this.transformPagePoint),Od.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:o,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=Zu("pointercancel"===e.type?this.lastMoveEventInfo:qu(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),o&&o(e,i)},!wd(e))return;this.dragSnapToOrigin=r,this.handlers=t,this.transformPagePoint=n,this.contextWindow=o||window;const i=qu(Gu(e),this.transformPagePoint),{point:s}=i,{timestamp:a}=Bd;this.history=[{...s,timestamp:a}];const{onSessionStart:d}=t;d&&d(e,Zu(i,this.history)),this.removeListeners=zc(Hu(this.contextWindow,"pointermove",this.handlePointerMove),Hu(this.contextWindow,"pointerup",this.handlePointerUp),Hu(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ld(this.updatePoint)}}function qu(e,t){return t?{point:t(e.point)}:e}function Yu(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zu({point:e},t){return{point:e,delta:Yu(e,Ju(t)),offset:Yu(e,Xu(t)),velocity:Qu(t,.1)}}function Xu(e){return e[0]}function Ju(e){return e[e.length-1]}function Qu(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=Ju(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>Ad(t)));)n--;if(!o)return{x:0,y:0};const i=Pd(r.timestamp-o.timestamp);if(0===i)return{x:0,y:0};const s={x:(r.x-o.x)/i,y:(r.y-o.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function ep(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function tp(e){return e.max-e.min}function np(e,t,n,o=.5){e.origin=o,e.originPoint=Rc(t.min,t.max,e.origin),e.scale=tp(n)/tp(t),e.translate=Rc(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function op(e,t,n,o){np(e.x,t.x,n.x,o?o.originX:void 0),np(e.y,t.y,n.y,o?o.originY:void 0)}function rp(e,t,n){e.min=n.min+t.min,e.max=e.min+tp(t)}function ip(e,t,n){e.min=t.min-n.min,e.max=e.min+tp(t)}function sp(e,t,n){ip(e.x,t.x,n.x),ip(e.y,t.y,n.y)}function ap(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function dp(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min({x:{min:0,max:0},y:{min:0,max:0}});function hp(e){return[e("x"),e("y")]}function mp({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function fp(e){return void 0===e||1===e}function gp({scale:e,scaleX:t,scaleY:n}){return!fp(e)||!fp(t)||!fp(n)}function bp(e){return gp(e)||vp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function vp(e){return $p(e.x)||$p(e.y)}function $p(e){return e&&"0%"!==e}function yp(e,t,n){return n+t*(e-n)}function xp(e,t,n,o,r){return void 0!==r&&(e=yp(e,r,o)),yp(e,n,o)+t}function wp(e,t=0,n=1,o,r){e.min=xp(e.min,t,n,o,r),e.max=xp(e.max,t,n,o,r)}function Cp(e,{x:t,y:n}){wp(e.x,t.translate,t.scale,t.originPoint),wp(e.y,n.translate,n.scale,n.originPoint)}const Sp=.999999999999,_p=1.0000000000001;function Ep(e,t){e.min=e.min+t,e.max=e.max+t}function Ip(e,t,n,o,r=.5){wp(e,t,n,Rc(e.min,e.max,r),o)}function Ap(e,t){Ip(e.x,t.x,t.scaleX,t.scale,t.originX),Ip(e.y,t.y,t.scaleY,t.scale,t.originY)}function Pp(e,t){return mp(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}(e.getBoundingClientRect(),t))}const kp=({current:e})=>e?e.ownerDocument.defaultView:null,Tp=new WeakMap;class Np{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:o}=this.getProps();this.panSession=new Ku(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Gu(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:o,onDragStart:r}=this.getProps();if(n&&!o&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?bd[i]?null:(bd[i]=!0,()=>{bd[i]=!1}):bd.x||bd.y?null:(bd.x=bd.y=!0,()=>{bd.x=bd.y=!1}),!this.openDragLock))return;var i;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),hp(e=>{let t=this.getAxisMotionValue(e).get()||0;if(kl.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const o=n.layout.layoutBox[e];o&&(t=tp(o)*(parseFloat(t)/100))}}this.originPoint[e]=t}),r&&Od.postRender(()=>r(e,t)),Qd(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:o,onDirectionLock:r,onDrag:i}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:s}=t;if(o&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(s),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>hp(e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:o,contextWindow:kp(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:o}=t;this.startAnimation(o);const{onDragEnd:r}=this.getProps();r&&Od.postRender(()=>r(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:o}=this.getProps();if(!n||!Dp(e,o,this.currentDirection))return;const r=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},o){return void 0!==t&&en&&(e=o?Rc(n,e,o.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),r.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,r=this.constraints;t&&ep(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!o)&&function(e,{top:t,left:n,bottom:o,right:r}){return{x:ap(e.x,n,r),y:ap(e.y,t,o)}}(o.layoutBox,t),this.elastic=function(e=lp){return!1===e?e=0:!0===e&&(e=lp),{x:cp(e,"left","right"),y:cp(e,"top","bottom")}}(n),r!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&hp(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(o.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!ep(e))return!1;const n=e.current;bc(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const r=function(e,t,n){const o=Pp(e,n),{scroll:r}=t;return r&&(Ep(o.x,r.offset.x),Ep(o.y,r.offset.y)),o}(n,o.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:dp(e.x,t.x),y:dp(e.y,t.y)}}(o.layout.layoutBox,r);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=mp(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:o,dragTransition:r,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},d=hp(s=>{if(!Dp(s,t,this.currentDirection))return;let d=a&&a[s]||{};i&&(d={min:0,max:0});const l=o?200:1e6,c=o?40:1e7,u={type:"inertia",velocity:n?e[s]:0,bounceStiffness:l,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...r,...d};return this.startAxisValueAnimation(s,u)});return Promise.all(d).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return Qd(this.visualElement,e),n.start(Iu(e,n,0,t,this.visualElement,!1))}stopAnimation(){hp(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){hp(e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()})}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){hp(t=>{const{drag:n}=this.getProps();if(!Dp(t,n,this.currentDirection))return;const{projection:o}=this.visualElement,r=this.getAxisMotionValue(t);if(o&&o.layout){const{min:n,max:i}=o.layout.layoutBox[t];r.set(e[t]-Rc(n,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!ep(t)||!n||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};hp(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();o[e]=function(e,t){let n=.5;const o=tp(e),r=tp(t);return r>o?n=ud(t.min,t.max-o,e.min):o>r&&(n=ud(e.min,e.max-r,t.min)),gl(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),hp(t=>{if(!Dp(t,e,null))return;const n=this.getAxisMotionValue(t),{min:r,max:i}=this.constraints[t];n.set(Rc(r,i,o[t]))})}addListeners(){if(!this.visualElement.current)return;Tp.set(this.visualElement,this);const e=Hu(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();ep(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,o=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Od.read(t);const r=zu(window,"resize",()=>this.scalePositionWithinConstraints()),i=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(hp(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{r(),e(),o(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:r=!1,dragElastic:i=lp,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:o,dragConstraints:r,dragElastic:i,dragMomentum:s}}}function Dp(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Mp=e=>(t,n)=>{e&&Od.postRender(()=>e(t,n))},Rp=(0,he.createContext)({}),jp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Op(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Lp={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Tl.test(e))return e;e=parseFloat(e)}return`${Op(e,t.target.x)}% ${Op(e,t.target.y)}%`}},Bp={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,r=Hl.parse(e);if(r.length>5)return o;const i=Hl.createTransformer(e),s="number"!=typeof r[0]?1:0,a=n.x.scale*t.x,d=n.y.scale*t.y;r[0+s]/=a,r[1+s]/=d;const l=Rc(a,d,.5);return"number"==typeof r[2+s]&&(r[2+s]/=l),"number"==typeof r[3+s]&&(r[3+s]/=l),i(r)}},Fp={},{schedule:Vp,cancel:Up}=jd(queueMicrotask,!1);class zp extends he.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:o}=this.props,{projection:r}=e;var i;i=Hp,Object.assign(Fp,i),r&&(t.group&&t.group.add(r),n&&n.register&&o&&n.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),jp.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:o,isPresent:r}=this.props,i=n.projection;return i?(i.isPresent=r,o||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?i.promote():i.relegate()||Od.postRender(()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Vp.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:o}=e;o&&(o.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Gp(e){const[t,n]=ja(),o=(0,he.useContext)(Aa);return(0,u.jsx)(zp,{...e,layoutGroup:o,switchLayoutGroup:(0,he.useContext)(Rp),isPresent:t,safeToRemove:n})}const Hp={borderRadius:{...Lp,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lp,borderTopRightRadius:Lp,borderBottomLeftRadius:Lp,borderBottomRightRadius:Lp,boxShadow:Bp},Wp=(e,t)=>e.depth-t.depth;class Kp{constructor(){this.children=[],this.isDirty=!1}add(e){Gd(this.children,e),this.isDirty=!0}remove(e){Hd(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Wp),this.isDirty=!1,this.children.forEach(e)}}function qp(e){const t=Jd(e)?e.get():e;return(e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue))(t)?t.toValue():t}const Yp=["TopLeft","TopRight","BottomLeft","BottomRight"],Zp=Yp.length,Xp=e=>"string"==typeof e?parseFloat(e):e,Jp=e=>"number"==typeof e||Tl.test(e);function Qp(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const eh=nh(0,.5,pl),th=nh(.5,.95,kd);function nh(e,t,n){return o=>ot?1:n(ud(e,t,o))}function oh(e,t){e.min=t.min,e.max=t.max}function rh(e,t){oh(e.x,t.x),oh(e.y,t.y)}function ih(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function sh(e,t,n,o,r){return e=yp(e-=t,1/n,o),void 0!==r&&(e=yp(e,1/r,o)),e}function ah(e,t,[n,o,r],i,s){!function(e,t=0,n=1,o=.5,r,i=e,s=e){if(kl.test(t)&&(t=parseFloat(t),t=Rc(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=Rc(i.min,i.max,o);e===i&&(a-=t),e.min=sh(e.min,t,n,a,r),e.max=sh(e.max,t,n,a,r)}(e,t[n],t[o],t[r],t.scale,i,s)}const dh=["x","scaleX","originX"],lh=["y","scaleY","originY"];function ch(e,t,n,o){ah(e.x,t,dh,n?n.x:void 0,o?o.x:void 0),ah(e.y,t,lh,n?n.y:void 0,o?o.y:void 0)}function uh(e){return 0===e.translate&&1===e.scale}function ph(e){return uh(e.x)&&uh(e.y)}function hh(e,t){return e.min===t.min&&e.max===t.max}function mh(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function fh(e,t){return mh(e.x,t.x)&&mh(e.y,t.y)}function gh(e){return tp(e.x)/tp(e.y)}function bh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class vh{constructor(){this.members=[]}add(e){Gd(this.members,e),e.scheduleRender()}remove(e){if(Hd(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;!1===o&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const $h={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},yh="undefined"!=typeof window&&void 0!==window.MotionDebug,xh=["","X","Y","Z"],wh={visibility:"hidden"};let Ch=0;function Sh(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function _h(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=nl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Od,!(t||o))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&_h(o)}function Eh({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=Ch++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,yh&&($h.totalNodes=$h.resolvedTargetDeltas=$h.recalculatedProjection=0),this.nodes.forEach(Ph),this.nodes.forEach(jh),this.nodes.forEach(Oh),this.nodes.forEach(kh),yh&&window.MotionDebug.record($h)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;ethis.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=zd.now(),o=({timestamp:r})=>{const i=r-n;i>=t&&(Ld(o),e(i-t))};return Od.read(o,!0),()=>Ld(o)}(o,250),jp.hasAnimatedSinceResize&&(jp.hasAnimatedSinceResize=!1,this.nodes.forEach(Rh))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&s&&(r||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:o})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||s.getDefaultTransition()||zh,{onLayoutAnimationStart:i,onLayoutAnimationComplete:a}=s.getProps(),d=!this.targetLayout||!fh(this.targetLayout,o)||n,l=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||l||t&&(d||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,l);const t={...nd(r,"layout"),onPlay:i,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Rh(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=o})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ld(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Lh),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&_h(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;eSp&&(t.x=1),t.y<_p&&t.y>Sp&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:d}=t;d?(this.projectionDelta&&this.prevProjectionDelta?(ih(this.prevProjectionDelta.x,this.projectionDelta.x),ih(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),op(this.projectionDelta,this.layoutCorrected,d,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&bh(this.projectionDelta.x,this.prevProjectionDelta.x)&&bh(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d)),yh&&$h.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,o=n?n.latestValues:{},r={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),d=this.getStack(),l=!d||d.members.length<=1,c=Boolean(a&&!l&&!0===this.options.crossfade&&!this.path.some(Uh));let u;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;Fh(i.x,e.x,n),Fh(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(sp(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,o){Vh(e.x,t.x,n.x,o),Vh(e.y,t.y,n.y,o)}(this.relativeTarget,this.relativeTargetOrigin,s,n),u&&function(e,t){return hh(e.x,t.x)&&hh(e.y,t.y)}(this.relativeTarget,u)&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),rh(u,this.relativeTarget)),a&&(this.animationValues=r,function(e,t,n,o,r,i){r?(e.opacity=Rc(0,void 0!==n.opacity?n.opacity:1,eh(o)),e.opacityExit=Rc(void 0!==t.opacity?t.opacity:1,0,th(o))):i&&(e.opacity=Rc(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,o));for(let r=0;r{jp.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const o=Jd(0)?0:Zd(0);return o.start(Iu("",o,1e3,n)),o.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:o,latestValues:r}=e;if(t&&n&&o){if(this!==e&&this.layout&&o&&Kh(this.options.animationType,this.layout.layoutBox,o.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=tp(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const o=tp(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+o}rh(t,n),Ap(t,r),op(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new vh),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const o=this.getStack();o&&o.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const o={};n.z&&Sh("z",e,o,this.animationValues);for(let t=0;t{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(Nh),this.root.sharedNodes.clear()}}}function Ih(e){e.updateLayout()}function Ah(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:o}=e.layout,{animationType:r}=e.options,i=n.source!==e.layout.source;"size"===r?hp(e=>{const o=i?n.measuredBox[e]:n.layoutBox[e],r=tp(o);o.min=t[e].min,o.max=o.min+r}):Kh(r,n.layoutBox,t)&&hp(o=>{const r=i?n.measuredBox[o]:n.layoutBox[o],s=tp(t[o]);r.max=r.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[o].max=e.relativeTarget[o].min+s)});const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};op(s,t,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?op(a,e.applyTransform(o,!0),n.measuredBox):op(a,t,n.layoutBox);const d=!ph(s);let l=!1;if(!e.resumeFrom){const o=e.getClosestProjectingParent();if(o&&!o.resumeFrom){const{snapshot:r,layout:i}=o;if(r&&i){const s={x:{min:0,max:0},y:{min:0,max:0}};sp(s,n.layoutBox,r.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};sp(a,t,i.layoutBox),fh(s,a)||(l=!0),o.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=o)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:d,hasRelativeTargetChanged:l})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Ph(e){yh&&$h.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function kh(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Th(e){e.clearSnapshot()}function Nh(e){e.clearMeasurements()}function Dh(e){e.isLayoutDirty=!1}function Mh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Rh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function jh(e){e.resolveTargetDelta()}function Oh(e){e.calcProjection()}function Lh(e){e.resetSkewAndRotation()}function Bh(e){e.removeLeadSnapshot()}function Fh(e,t,n){e.translate=Rc(t.translate,0,n),e.scale=Rc(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Vh(e,t,n,o){e.min=Rc(t.min,n.min,o),e.max=Rc(t.max,n.max,o)}function Uh(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const zh={duration:.45,ease:[.4,0,.1,1]},Gh=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Hh=Gh("applewebkit/")&&!Gh("chrome/")?Math.round:kd;function Wh(e){e.min=Hh(e.min),e.max=Hh(e.max)}function Kh(e,t,n){return"position"===e||"preserve-aspect"===e&&(o=gh(t),r=gh(n),!(Math.abs(o-r)<=.2));var o,r}function qh(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Yh=Eh({attachResizeListener:(e,t)=>zu(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zh={current:void 0},Xh=Eh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zh.current){const e=new Yh({});e.mount(window),e.setOptions({layoutScroll:!0}),Zh.current=e}return Zh.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Jh={pan:{Feature:class extends Fu{constructor(){super(...arguments),this.removePointerDownListener=kd}onPointerDown(e){this.session=new Ku(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:kp(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:Mp(e),onStart:Mp(t),onMove:n,onEnd:(e,t)=>{delete this.session,o&&Od.postRender(()=>o(e,t))}}}mount(){this.removePointerDownListener=Hu(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Fu{constructor(e){super(e),this.removeGroupControls=kd,this.removeListeners=kd,this.controls=new Np(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||kd}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Xh,MeasureLayout:Gp}};function Qh(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover","Start"===n);const r=o["onHover"+n];r&&Od.postRender(()=>r(t,Gu(t)))}function em(e,t,n){const{props:o}=e;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap","Start"===n);const r=o["onTap"+("End"===n?"":n)];r&&Od.postRender(()=>r(t,Gu(t)))}const tm=new WeakMap,nm=new WeakMap,om=e=>{const t=tm.get(e.target);t&&t(e)},rm=e=>{e.forEach(om)};const im={some:0,all:1},sm={inView:{Feature:class extends Fu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:o="some",once:r}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof o?o:im[o]};return function(e,t,n){const o=function({root:e,...t}){const n=e||document;nm.has(n)||nm.set(n,{});const o=nm.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(rm,{root:e,...t})),o[r]}(t);return tm.set(e,n),o.observe(e),()=>{tm.delete(e),o.unobserve(e)}}(this.node.current,i,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,r&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:o}=this.node.getProps(),i=t?n:o;i&&i(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Fu{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[o,r,i]=$d(e,n),s=e=>{const o=e.currentTarget;if(!Id(e)||Sd.has(o))return;Sd.add(o);const i=t(e),s=(e,t)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",d),Id(e)&&Sd.has(o)&&(Sd.delete(o),"function"==typeof i&&i(e,{success:t}))},a=e=>{s(e,n.useGlobalTarget||xd(o,e.target))},d=e=>{s(e,!1)};window.addEventListener("pointerup",a,r),window.addEventListener("pointercancel",d,r)};return o.forEach(e=>{(function(e){return Cd.has(e.tagName)||-1!==e.tabIndex})(e)||null!==e.getAttribute("tabindex")||(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,r),e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const o=_d(()=>{if(Sd.has(n))return;Ed(n,"down");const e=_d(()=>{Ed(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Ed(n,"cancel"),t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)})(e,r),r)}),i}(e,e=>(em(this.node,e,"Start"),(e,{success:t})=>em(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Fu{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=zc(zu(this.node.current,"focus",()=>this.onFocus()),zu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Fu{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[o,r,i]=$d(e,n),s=yd(e=>{const{target:n}=e,o=t(e);if("function"!=typeof o||!n)return;const i=yd(e=>{o(e),n.removeEventListener("pointerleave",i)});n.addEventListener("pointerleave",i,r)});return o.forEach(e=>{e.addEventListener("pointerenter",s,r)}),i}(e,e=>(Qh(this.node,e,"Start"),e=>Qh(this.node,e,"End"))))}unmount(){}}}},am={layout:{ProjectionNode:Xh,MeasureLayout:Gp}},dm=(0,he.createContext)({strict:!1}),lm=(0,he.createContext)({});function cm(e){return za(e.animate)||Xa.some(t=>Wa(e[t]))}function um(e){return Boolean(cm(e)||e.variants)}function pm(e){return Array.isArray(e)?e.join(" "):e}const hm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},mm={};for(const e in hm)mm[e]={isEnabled:t=>hm[e].some(e=>!!t[e])};const fm=Symbol.for("motionComponentSymbol");function gm(e,t,n){return(0,he.useCallback)(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&("function"==typeof n?n(o):ep(n)&&(n.current=o))},[t])}function bm(e,t,n,o,r){var i,s;const{visualElement:a}=(0,he.useContext)(lm),d=(0,he.useContext)(dm),l=(0,he.useContext)(ka),c=(0,he.useContext)(Ta).reducedMotion,u=(0,he.useRef)(null);o=o||d.renderer,!u.current&&o&&(u.current=o(e,{visualState:t,parent:a,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c}));const p=u.current,h=(0,he.useContext)(Rp);!p||p.projection||!r||"html"!==p.type&&"svg"!==p.type||function(e,t,n,o){const{layoutId:r,layout:i,drag:s,dragConstraints:a,layoutScroll:d,layoutRoot:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:vm(e.parent)),e.projection.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:Boolean(s)||a&&ep(a),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:o,layoutScroll:d,layoutRoot:l})}(u.current,n,r,h);const m=(0,he.useRef)(!1);(0,he.useInsertionEffect)(()=>{p&&m.current&&p.update(n,l)});const f=n[tl],g=(0,he.useRef)(Boolean(f)&&!(null===(i=window.MotionHandoffIsComplete)||void 0===i?void 0:i.call(window,f))&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,f)));return Fa(()=>{p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Vp.render(p.render),g.current&&p.animationState&&p.animationState.animateChanges())}),(0,he.useEffect)(()=>{p&&(!g.current&&p.animationState&&p.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,f)}),g.current=!1))}),p}function vm(e){if(e)return!1!==e.options.allowProjection?e.projection:vm(e.parent)}function $m({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:r}){var i,s;function a(e,i){let s;const a={...(0,he.useContext)(Ta),...e,layoutId:ym(e)},{isStatic:d}=a,l=function(e){const{initial:t,animate:n}=function(e,t){if(cm(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Wa(t)?t:void 0,animate:Wa(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,he.useContext)(lm));return(0,he.useMemo)(()=>({initial:t,animate:n}),[pm(t),pm(n)])}(e),c=o(e,d);if(!d&&Ba){(0,he.useContext)(dm).strict;const e=function(e){const{drag:t,layout:n}=mm;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}(a);s=e.MeasureLayout,l.visualElement=bm(r,c,a,t,e.ProjectionNode)}return(0,u.jsxs)(lm.Provider,{value:l,children:[s&&l.visualElement?(0,u.jsx)(s,{visualElement:l.visualElement,...a}):null,n(r,e,gm(c,l.visualElement,i),c,d,l.visualElement)]})}e&&function(e){for(const t in e)mm[t]={...mm[t],...e[t]}}(e),a.displayName=`motion.${"string"==typeof r?r:`create(${null!==(s=null!==(i=r.displayName)&&void 0!==i?i:r.name)&&void 0!==s?s:""})`}`;const d=(0,he.forwardRef)(a);return d[fm]=r,d}function ym({layoutId:e}){const t=(0,he.useContext)(Aa).id;return t&&void 0!==e?t+"-"+e:e}const xm=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function wm(e){return"string"==typeof e&&!e.includes("-")&&!!(xm.indexOf(e)>-1||/[A-Z]/u.test(e))}const Cm=e=>(t,n)=>{const o=(0,he.useContext)(lm),r=(0,he.useContext)(ka),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},o,r,i){const s={latestValues:Sm(o,r,i,e),renderState:t()};return n&&(s.onMount=e=>n({props:o,current:e,...s}),s.onUpdate=e=>n(e)),s}(e,t,o,r);return n?i():Pa(i)};function Sm(e,t,n,o){const r={},i=o(e,{});for(const e in i)r[e]=qp(i[e]);let{initial:s,animate:a}=e;const d=cm(e),l=um(e);t&&l&&!d&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let c=!!n&&!1===n.initial;c=c||!1===s;const u=c?a:s;if(u&&"boolean"!=typeof u&&!za(u)){const t=Array.isArray(u)?u:[u];for(let n=0;nt&&"number"==typeof e?t.transform(e):e,Em={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Im=Td.length;function Am(e,t,n){const{style:o,vars:r,transformOrigin:i}=e;let s=!1,a=!1;for(const e in t){const n=t[e];if(Nd.has(e))s=!0;else if(yc(e))r[e]=n;else{const t=_m(n,Ql[e]);e.startsWith("origin")?(a=!0,i[e]=t):o[e]=t}}if(t.transform||(s||n?o.transform=function(e,t,n){let o="",r=!0;for(let i=0;i"string"==typeof e&&"svg"===e.toLowerCase();function Mm(e,{style:t,vars:n},o,r){Object.assign(e.style,t,r&&r.getProjectionStyles(o));for(const t in n)e.style.setProperty(t,n[t])}const Rm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function jm(e,t,n,o){Mm(e,t,void 0,o);for(const n in t.attrs)e.setAttribute(Rm.has(n)?n:el(n),t.attrs[n])}function Om(e,{layout:t,layoutId:n}){return Nd.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Fp[e]||"opacity"===e)}function Lm(e,t,n){var o;const{style:r}=e,i={};for(const s in r)(Jd(r[s])||t.style&&Jd(t.style[s])||Om(s,e)||void 0!==(null===(o=null==n?void 0:n.getValue(s))||void 0===o?void 0:o.liveStyle))&&(i[s]=r[s]);return i}function Bm(e,t,n){const o=Lm(e,t,n);for(const n in e)(Jd(e[n])||Jd(t[n]))&&(o[-1!==Td.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return o}const Fm=["x","y","width","height","cx","cy","r"],Vm={useVisualState:Cm({scrapeMotionValuesFromProps:Bm,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),onUpdate:({props:e,prevProps:t,current:n,renderState:o,latestValues:r})=>{if(!n)return;let i=!!e.drag;if(!i)for(const e in r)if(Nd.has(e)){i=!0;break}if(!i)return;let s=!t;if(t)for(let n=0;n{!function(e,t){try{t.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(e){t.dimensions={x:0,y:0,width:0,height:0}}}(n,o),Od.render(()=>{Nm(o,r,Dm(n.tagName),e.transformTemplate),jm(n,o)})})}})},Um={useVisualState:Cm({scrapeMotionValuesFromProps:Lm,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function zm(e,t,n){for(const o in t)Jd(t[o])||Om(o,n)||(e[o]=t[o])}function Gm(e,t){const n={},o=function(e,t){const n={};return zm(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,he.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Am(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const Hm=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Wm(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Hm.has(e)}let Km=e=>!Wm(e);try{(qm=require("@emotion/is-prop-valid").default)&&(Km=e=>e.startsWith("on")?!Wm(e):qm(e))}catch(e){}var qm;function Ym(e,t,n,o){const r=(0,he.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Nm(n,t,Dm(o),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};zm(t,e.style,e),r.style={...t,...r.style}}return r}function Zm(e=!1){return(t,n,o,{latestValues:r},i)=>{const s=(wm(t)?Ym:Gm)(n,r,i,t),a=function(e,t,n){const o={};for(const r in e)"values"===r&&"object"==typeof e.values||(Km(r)||!0===n&&Wm(r)||!t&&!Wm(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}(n,"string"==typeof t,e),d=t!==he.Fragment?{...a,...s,ref:o}:{},{children:l}=n,c=(0,he.useMemo)(()=>Jd(l)?l.get():l,[l]);return(0,he.createElement)(t,{...d,children:c})}}function Xm(e,t){return function(n,{forwardMotionProps:o}={forwardMotionProps:!1}){return $m({...wm(n)?Vm:Um,preloadedFeatures:e,useRender:Zm(o),createVisualElement:t,Component:n})}}const Jm={current:null},Qm={current:!1},ef=[...Ic,jl,Hl],tf=new WeakMap,nf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class of{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:o,blockInitialAnimation:r,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=zd.now();this.renderScheduledAtthis.bindToMotionValue(t,e)),Qm.current||function(){if(Qm.current=!0,Ba)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Jm.current=e.matches;e.addListener(t),t()}else Jm.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Jm.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){tf.delete(this.current),this.projection&&this.projection.unmount(),Ld(this.notifyUpdate),Ld(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Nd.has(e),o=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&Od.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=t.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{o(),r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in mm){const t=mm[e];if(!t)continue;const{isEnabled:n,Feature:o}=t;if(!this.features[e]&&o&&n(this.props)&&(this.features[e]=new o(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;tt.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Zd(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let o=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=o&&("string"==typeof o&&(vc(o)||ml(o))?o=parseFloat(o):!(e=>ef.find(Ec(e)))(o)&&Hl.test(t)&&(o=nc(e,t)),this.setBaseTarget(e,Jd(o)?o.get():o)),Jd(o)?o.get():o}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let o;if("string"==typeof n||"object"==typeof n){const r=qa(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);r&&(o=r[e])}if(n&&void 0!==o)return o;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||Jd(r)?void 0!==this.initialValues[e]&&void 0===o?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new Wd),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class rf extends of{constructor(){super(...arguments),this.KeyframeResolver=Pc}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Jd(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class sf extends rf{constructor(){super(...arguments),this.type="html",this.renderInstance=Mm}readValueFromInstance(e,t){if(Nd.has(t)){const e=tc(t);return e&&e.default||0}{const o=(n=e,window.getComputedStyle(n)),r=(yc(t)?o.getPropertyValue(t):o[t])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Pp(e,t)}build(e,t,n){Am(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Lm(e,t,n)}}class af extends rf{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=pp}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Nd.has(t)){const e=tc(t);return e&&e.default||0}return t=Rm.has(t)?t:el(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Bm(e,t,n)}build(e,t,n){Nm(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,o){jm(e,t,0,o)}mount(e){this.isSVGTag=Dm(e.tagName),super.mount(e)}}const df=(e,t)=>wm(e)?new af(t):new sf(t,{allowProjection:e!==he.Fragment}),lf=Ua(Xm({...Uu,...sm,...Jh,...am},df)),cf=e=>{const t=mf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),uf(n,t)||hf(e)},getConflictingClassGroupIds:(e,t)=>{const r=n[e]||[];return t&&o[e]?[...r,...o[e]]:r}}},uf=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),r=o?uf(e.slice(1),o):void 0;if(r)return r;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find(({validator:e})=>e(i))?.classGroupId},pf=/^\[(.+)\]$/,hf=e=>{if(pf.test(e)){const t=pf.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},mf=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return vf(Object.entries(e.classGroups),n).forEach(([e,n])=>{ff(n,o,e,t)}),o},ff=(e,t,n,o)=>{e.forEach(e=>{if("string"!=typeof e)return"function"==typeof e?bf(e)?void ff(e(o),t,n,o):void t.validators.push({validator:e,classGroupId:n}):void Object.entries(e).forEach(([e,r])=>{ff(r,gf(t,e),n,o)});(""===e?t:gf(t,e)).classGroupId=n})},gf=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},bf=e=>e.isThemeGetter,vf=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,$f=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const r=(r,i)=>{n.set(r,i),t++,t>e&&(t=0,o=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=o.get(e))?(r(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):r(e,t)}}},yf=e=>{const{separator:t,experimentalParseClassName:n}=e,o=1===t.length,r=t[0],i=t.length,s=e=>{const n=[];let s,a=0,d=0;for(let l=0;ld?s-d:void 0}};return n?e=>n({className:e,parseClassName:s}):s},xf=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},wf=/\s+/;function Cf(){let e,t,n=0,o="";for(;n{if("string"==typeof e)return e;let t,n="";for(let o=0;ot(e),e());return n=(e=>({cache:$f(e.cacheSize),parseClassName:yf(e),...cf(e)}))(d),o=n.cache.get,r=n.cache.set,i=s,s(a)};function s(e){const t=o(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r}=t,i=[],s=e.trim().split(wf);let a="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{modifiers:d,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(t);let p=Boolean(u),h=o(p?c.substring(0,u):c);if(!h){if(!p){a=t+(a.length>0?" "+a:a);continue}if(h=o(c),!h){a=t+(a.length>0?" "+a:a);continue}p=!1}const m=xf(d).join(":"),f=l?m+"!":m,g=f+h;if(i.includes(g))continue;i.push(g);const b=r(h,p);for(let e=0;e0?" "+a:a)}return a})(e,n);return r(e,i),i}return function(){return i(Cf.apply(null,arguments))}}const Ef=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},If=/^\[(?:([a-z-]+):)?(.+)\]$/i,Af=/^\d+\/\d+$/,Pf=new Set(["px","full","screen"]),kf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Tf=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Nf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Df=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Mf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Rf=e=>Of(e)||Pf.has(e)||Af.test(e),jf=e=>Zf(e,"length",Xf),Of=e=>Boolean(e)&&!Number.isNaN(Number(e)),Lf=e=>Zf(e,"number",Of),Bf=e=>Boolean(e)&&Number.isInteger(Number(e)),Ff=e=>e.endsWith("%")&&Of(e.slice(0,-1)),Vf=e=>If.test(e),Uf=e=>kf.test(e),zf=new Set(["length","size","percentage"]),Gf=e=>Zf(e,zf,Jf),Hf=e=>Zf(e,"position",Jf),Wf=new Set(["image","url"]),Kf=e=>Zf(e,Wf,eg),qf=e=>Zf(e,"",Qf),Yf=()=>!0,Zf=(e,t,n)=>{const o=If.exec(e);return!!o&&(o[1]?"string"==typeof t?o[1]===t:t.has(o[1]):n(o[2]))},Xf=e=>Tf.test(e)&&!Nf.test(e),Jf=()=>!1,Qf=e=>Df.test(e),eg=e=>Mf.test(e),tg=(Symbol.toStringTag,()=>{const e=Ef("colors"),t=Ef("spacing"),n=Ef("blur"),o=Ef("brightness"),r=Ef("borderColor"),i=Ef("borderRadius"),s=Ef("borderSpacing"),a=Ef("borderWidth"),d=Ef("contrast"),l=Ef("grayscale"),c=Ef("hueRotate"),u=Ef("invert"),p=Ef("gap"),h=Ef("gradientColorStops"),m=Ef("gradientColorStopPositions"),f=Ef("inset"),g=Ef("margin"),b=Ef("opacity"),v=Ef("padding"),$=Ef("saturate"),y=Ef("scale"),x=Ef("sepia"),w=Ef("skew"),C=Ef("space"),S=Ef("translate"),_=()=>["auto",Vf,t],E=()=>[Vf,t],I=()=>["",Rf,jf],A=()=>["auto",Of,Vf],P=()=>["","0",Vf],k=()=>[Of,Vf];return{cacheSize:500,separator:":",theme:{colors:[Yf],spacing:[Rf,jf],blur:["none","",Uf,Vf],brightness:k(),borderColor:[e],borderRadius:["none","","full",Uf,Vf],borderSpacing:E(),borderWidth:I(),contrast:k(),grayscale:P(),hueRotate:k(),invert:P(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[Ff,jf],inset:_(),margin:_(),opacity:k(),padding:E(),saturate:k(),scale:k(),sepia:P(),skew:k(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",Vf]}],container:["container"],columns:[{columns:[Uf]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Vf]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[f]}],"inset-x":[{"inset-x":[f]}],"inset-y":[{"inset-y":[f]}],start:[{start:[f]}],end:[{end:[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Bf,Vf]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Vf]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",Bf,Vf]}],"grid-cols":[{"grid-cols":[Yf]}],"col-start-end":[{col:["auto",{span:["full",Bf,Vf]},Vf]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[Yf]}],"row-start-end":[{row:["auto",{span:[Bf,Vf]},Vf]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Vf]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Vf]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Vf,t]}],"min-w":[{"min-w":[Vf,t,"min","max","fit"]}],"max-w":[{"max-w":[Vf,t,"none","full","min","max","fit","prose",{screen:[Uf]},Uf]}],h:[{h:[Vf,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Vf,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Vf,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Vf,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Uf,jf]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Lf]}],"font-family":[{font:[Yf]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Vf]}],"line-clamp":[{"line-clamp":["none",Of,Lf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Rf,Vf]}],"list-image":[{"list-image":["none",Vf]}],"list-style-type":[{list:["none","disc","decimal",Vf]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Rf,jf]}],"underline-offset":[{"underline-offset":["auto",Rf,Vf]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Vf]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Vf]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Hf]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Gf]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Kf]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Rf,Vf]}],"outline-w":[{outline:[Rf,jf]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Rf,jf]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Uf,qf]}],"shadow-color":[{shadow:[Yf]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Uf,Vf]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[u]}],saturate:[{saturate:[$]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[$]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Vf]}],duration:[{duration:k()}],ease:[{ease:["linear","in","out","in-out",Vf]}],delay:[{delay:k()}],animate:[{animate:["none","spin","ping","pulse","bounce",Vf]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[Bf,Vf]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[w]}],"skew-y":[{"skew-y":[w]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Vf]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Vf]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Vf]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Rf,jf,Lf]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}),ng=_f(tg);function og(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;tng(rg(...e)),sg=(...e)=>(...t)=>e.filter(Boolean).forEach(e=>e?.(...t)),ag=(...e)=>e.filter((e,t,n)=>Boolean(e)&&n.indexOf(e)===t).join(" ");var dg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const lg=(0,he.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:r="",children:i,iconNode:s,...a},d)=>(0,he.createElement)("svg",{ref:d,...dg,width:t,height:t,stroke:e,strokeWidth:o?24*Number(n)/Number(t):n,className:ag("lucide",r),...a},[...s.map(([e,t])=>(0,he.createElement)(e,t)),...Array.isArray(i)?i:[i]])),cg=(e,t)=>{const n=(0,he.forwardRef)(({className:n,...o},r)=>{return(0,he.createElement)(lg,{ref:r,iconNode:t,className:ag(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...o});var i});return n.displayName=`${e}`,n},ug=cg("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function pg(){return"undefined"!=typeof window}function hg(e){return gg(e)?(e.nodeName||"").toLowerCase():"#document"}function mg(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function fg(e){var t;return null==(t=(gg(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function gg(e){return!!pg()&&(e instanceof Node||e instanceof mg(e).Node)}function bg(e){return!!pg()&&(e instanceof Element||e instanceof mg(e).Element)}function vg(e){return!!pg()&&(e instanceof HTMLElement||e instanceof mg(e).HTMLElement)}function $g(e){return!(!pg()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof mg(e).ShadowRoot)}function yg(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=kg(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&"inline"!==r&&"contents"!==r}function xg(e){return/^(table|td|th)$/.test(hg(e))}function wg(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const Cg=/transform|translate|scale|rotate|perspective|filter/,Sg=/paint|layout|strict|content/,_g=e=>!!e&&"none"!==e;let Eg;function Ig(e){const t=bg(e)?kg(e):e;return _g(t.transform)||_g(t.translate)||_g(t.scale)||_g(t.rotate)||_g(t.perspective)||!Ag()&&(_g(t.backdropFilter)||_g(t.filter))||Cg.test(t.willChange||"")||Sg.test(t.contain||"")}function Ag(){return null==Eg&&(Eg="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Eg}function Pg(e){return/^(html|body|#document)$/.test(hg(e))}function kg(e){return mg(e).getComputedStyle(e)}function Tg(e){return bg(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ng(e){if("html"===hg(e))return e;const t=e.assignedSlot||e.parentNode||$g(e)&&e.host||fg(e);return $g(t)?t.host:t}function Dg(e){const t=Ng(e);return Pg(t)?e.ownerDocument?e.ownerDocument.body:e.body:vg(t)&&yg(t)?t:Dg(t)}function Mg(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=Dg(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),s=mg(r);if(i){const e=Rg(s);return t.concat(s,s.visualViewport||[],yg(r)?r:[],e&&n?Mg(e):[])}return t.concat(r,Mg(r,[],n))}function Rg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jg(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function Og(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&$g(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Lg(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function Bg(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function Fg(){const e=/android/i;return e.test(Lg())||e.test(Bg())}function Vg(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Ug(e){return(null==e?void 0:e.ownerDocument)||document}function zg(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Gg(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Hg(e){return vg(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function Wg(e){e.preventDefault(),e.stopPropagation()}var Kg=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),qg="undefined"==typeof Element,Yg=qg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Zg=!qg&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Xg=function(e,t){var n;void 0===t&&(t=!0);var o=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===o||"true"===o||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):Xg(e.parentNode))},Jg=function(e,t,n){for(var o=[],r=Array.from(e);r.length;){var i=r.shift();if(!Xg(i,!1))if("SLOT"===i.tagName){var s=i.assignedElements(),a=s.length?s:i.children,d=Jg(a,!0,n);n.flatten?o.push.apply(o,d):o.push({scopeParent:i,candidates:d})}else{Yg.call(i,Kg)&&n.filter(i)&&(t||!e.includes(i))&&o.push(i);var l=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),c=!Xg(l,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(l&&c){var u=Jg(!0===l?i.children:l.children,!0,n);n.flatten?o.push.apply(o,u):o.push({scopeParent:i,candidates:u})}else r.unshift.apply(r,i.children)}}return o},Qg=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},eb=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Qg(e)?0:e.tabIndex},tb=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},nb=function(e){return"INPUT"===e.tagName},ob=function(e){var t=e.getBoundingClientRect(),n=t.width,o=t.height;return 0===n&&0===o},rb=function(e,t){return!(t.disabled||function(e){return nb(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,o=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var r=Yg.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Yg.call(r,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ob(e)}else{if("function"==typeof o){for(var i=e;e;){var s=e.parentElement,a=Zg(e);if(s&&!s.shadowRoot&&!0===o(s))return ob(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=i}if(function(e){var t,n,o,r,i=e&&Zg(e),s=null===(t=i)||void 0===t?void 0:t.host,a=!1;if(i&&i!==e)for(a=!!(null!==(n=s)&&void 0!==n&&null!==(o=n.ownerDocument)&&void 0!==o&&o.contains(s)||null!=e&&null!==(r=e.ownerDocument)&&void 0!==r&&r.contains(e));!a&&s;){var d,l,c;a=!(null===(l=s=null===(d=i=Zg(s))||void 0===d?void 0:d.host)||void 0===l||null===(c=l.ownerDocument)||void 0===c||!c.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n=0)},ab=function(e){var t=[],n=[];return e.forEach(function(e,o){var r=!!e.scopeParent,i=r?e.scopeParent:e,s=function(e,t){var n=eb(e);return n<0&&t&&!Qg(e)?0:n}(i,r),a=r?ab(e.candidates):i;0===s?r?t.push.apply(t,a):t.push(i):n.push({documentOrder:o,tabIndex:s,item:e,isScope:r,content:a})}),n.sort(tb).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},db=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Jg([e],t.includeContainer,{filter:ib.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:sb}):function(e,t,n){if(Xg(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(Kg));return t&&Yg.call(e,Kg)&&o.unshift(e),o.filter(n)}(e,t.includeContainer,ib.bind(null,t)),ab(n)};const lb=Math.min,cb=Math.max,ub=Math.round,pb=Math.floor,hb=e=>({x:e,y:e}),mb={left:"right",right:"left",bottom:"top",top:"bottom"};function fb(e,t,n){return cb(e,lb(t,n))}function gb(e,t){return"function"==typeof e?e(t):e}function bb(e){return e.split("-")[0]}function vb(e){return e.split("-")[1]}function $b(e){return"x"===e?"y":"x"}function yb(e){return"y"===e?"height":"width"}function xb(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function wb(e){return $b(xb(e))}function Cb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Sb=["left","right"],_b=["right","left"],Eb=["top","bottom"],Ib=["bottom","top"];function Ab(e){const t=bb(e);return mb[t]+e.slice(t.length)}function Pb(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function kb(e,t,n){let{reference:o,floating:r}=e;const i=xb(t),s=wb(t),a=yb(s),d=bb(t),l="y"===i,c=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let h;switch(d){case"top":h={x:c,y:o.y-r.height};break;case"bottom":h={x:c,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:u};break;case"left":h={x:o.x-r.width,y:u};break;default:h={x:o.x,y:o.y}}switch(vb(t)){case"start":h[s]-=p*(n&&l?-1:1);break;case"end":h[s]+=p*(n&&l?-1:1)}return h}async function Tb(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:d}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=gb(t,e),m=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(h),f=a[p?"floating"===u?"reference":"floating":u],g=Pb(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(f)))||n?f:f.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:c,strategy:d})),b="floating"===u?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),$=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},y=Pb(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:v,strategy:d}):b);return{top:(g.top-y.top+m.top)/$.y,bottom:(y.bottom-g.bottom+m.bottom)/$.y,left:(g.left-y.left+m.left)/$.x,right:(y.right-g.right+m.right)/$.x}}const Nb=new Set(["left","top"]);function Db(e){const t=kg(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=vg(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,a=ub(n)!==i||ub(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function Mb(e){return bg(e)?e:e.contextElement}function Rb(e){const t=Mb(e);if(!vg(t))return hb(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Db(t);let s=(i?ub(n.width):n.width)/o,a=(i?ub(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const jb=hb(0);function Ob(e){const t=mg(e);return Ag()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:jb}function Lb(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Mb(e);let s=hb(1);t&&(o?bg(o)&&(s=Rb(o)):s=Rb(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==mg(e))&&t}(i,n,o)?Ob(i):hb(0);let d=(r.left+a.x)/s.x,l=(r.top+a.y)/s.y,c=r.width/s.x,u=r.height/s.y;if(i){const e=mg(i),t=o&&bg(o)?mg(o):o;let n=e,r=Rg(n);for(;r&&o&&t!==n;){const e=Rb(r),t=r.getBoundingClientRect(),o=kg(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,s=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;d*=e.x,l*=e.y,c*=e.x,u*=e.y,d+=i,l+=s,n=mg(r),r=Rg(n)}}return Pb({width:c,height:u,x:d,y:l})}function Bb(e,t){const n=Tg(e).scrollLeft;return t?t.left+n:Lb(fg(e)).left+n}function Fb(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Bb(e,n),y:n.top+t.scrollTop}}function Vb(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=mg(e),o=fg(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,d=0;if(r){i=r.width,s=r.height;const e=Ag();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,d=r.offsetTop)}const l=Bb(o);if(l<=0){const e=o.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(o.clientWidth-t.clientWidth-r);s<=25&&(i-=s)}else l<=25&&(i+=l);return{width:i,height:s,x:a,y:d}}(e,n);else if("document"===t)o=function(e){const t=fg(e),n=Tg(e),o=e.ownerDocument.body,r=cb(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=cb(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Bb(e);const a=-n.scrollTop;return"rtl"===kg(o).direction&&(s+=cb(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}(fg(e));else if(bg(t))o=function(e,t){const n=Lb(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=vg(e)?Rb(e):hb(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=Ob(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Pb(o)}function Ub(e,t){const n=Ng(e);return!(n===t||!bg(n)||Pg(n))&&("fixed"===kg(n).position||Ub(n,t))}function zb(e,t,n){const o=vg(t),r=fg(t),i="fixed"===n,s=Lb(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const d=hb(0);function l(){d.x=Bb(r)}if(o||!o&&!i)if(("body"!==hg(t)||yg(r))&&(a=Tg(t)),o){const e=Lb(t,!0,i,t);d.x=e.x+t.clientLeft,d.y=e.y+t.clientTop}else r&&l();i&&!o&&r&&l();const c=!r||o||i?hb(0):Fb(r,a);return{x:s.left+a.scrollLeft-d.x-c.x,y:s.top+a.scrollTop-d.y-c.y,width:s.width,height:s.height}}function Gb(e){return"static"===kg(e).position}function Hb(e,t){if(!vg(e)||"fixed"===kg(e).position)return null;if(t)return t(e);let n=e.offsetParent;return fg(e)===n&&(n=n.ownerDocument.body),n}function Wb(e,t){const n=mg(e);if(wg(e))return n;if(!vg(e)){let t=Ng(e);for(;t&&!Pg(t);){if(bg(t)&&!Gb(t))return t;t=Ng(t)}return n}let o=Hb(e,t);for(;o&&xg(o)&&Gb(o);)o=Hb(o,t);return o&&Pg(o)&&Gb(o)&&!Ig(o)?n:o||function(e){let t=Ng(e);for(;vg(t)&&!Pg(t);){if(Ig(t))return t;if(wg(t))return null;t=Ng(t)}return null}(e)||n}const Kb={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,s=fg(o),a=!!t&&wg(t.floating);if(o===s||a&&i)return n;let d={scrollLeft:0,scrollTop:0},l=hb(1);const c=hb(0),u=vg(o);if((u||!u&&!i)&&(("body"!==hg(o)||yg(s))&&(d=Tg(o)),u)){const e=Lb(o);l=Rb(o),c.x=e.x+o.clientLeft,c.y=e.y+o.clientTop}const p=!s||u||i?hb(0):Fb(s,d);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-d.scrollLeft*l.x+c.x+p.x,y:n.y*l.y-d.scrollTop*l.y+c.y+p.y}},getDocumentElement:fg,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?wg(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=Mg(e,[],!1).filter(e=>bg(e)&&"body"!==hg(e)),r=null;const i="fixed"===kg(e).position;let s=i?Ng(e):e;for(;bg(s)&&!Pg(s);){const t=kg(s),n=Ig(s);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&("absolute"===r.position||"fixed"===r.position)||yg(s)&&!n&&Ub(e,s))?o=o.filter(e=>e!==s):r=t,s=Ng(s)}return t.set(e,o),o}(t,this._c):[].concat(n),o],s=Vb(t,i[0],r);let a=s.top,d=s.right,l=s.bottom,c=s.left;for(let e=1;e{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const u=l&&a?function(e,t){let n,o=null;const r=fg(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function s(a,d){void 0===a&&(a=!1),void 0===d&&(d=1),i();const l=e.getBoundingClientRect(),{left:c,top:u,width:p,height:h}=l;if(a||t(),!p||!h)return;const m={rootMargin:-pb(u)+"px "+-pb(r.clientWidth-(c+p))+"px "+-pb(r.clientHeight-(u+h))+"px "+-pb(c)+"px",threshold:cb(0,lb(1,d))||1};let f=!0;function g(t){const o=t[0].intersectionRatio;if(o!==d){if(!f)return s();o?s(!1,o):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==o||qb(l,e.getBoundingClientRect())||s(),f=!1}try{o=new IntersectionObserver(g,{...m,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(g,m)}o.observe(e)}(!0),i}(l,n):null;let p,h=-1,m=null;s&&(m=new ResizeObserver(e=>{let[o]=e;o&&o.target===l&&m&&t&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),l&&!d&&m.observe(l),t&&m.observe(t));let f=d?Lb(e):null;return d&&function t(){const o=Lb(e);f&&!qb(f,o)&&n(),f=o,p=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach(e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==u||u(),null==(e=m)||e.disconnect(),m=null,d&&cancelAnimationFrame(p)}}const Zb=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:d,elements:l}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0,...g}=gb(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const b=bb(r),v=xb(a),$=bb(a)===a,y=await(null==d.isRTL?void 0:d.isRTL(l.floating)),x=p||($||!f?[Ab(a)]:function(e){const t=Ab(e);return[Cb(e),t,Cb(t)]}(a)),w="none"!==m;!p&&w&&x.push(...function(e,t,n,o){const r=vb(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?_b:Sb:t?Sb:_b;case"left":case"right":return t?Eb:Ib;default:return[]}}(bb(e),"start"===n,o);return r&&(i=i.map(e=>e+"-"+r),t&&(i=i.concat(i.map(Cb)))),i}(a,f,m,y));const C=[a,...x],S=await d.detectOverflow(t,g),_=[];let E=(null==(o=i.flip)?void 0:o.overflows)||[];if(c&&_.push(S[b]),u){const e=function(e,t,n){void 0===n&&(n=!1);const o=vb(e),r=wb(e),i=yb(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ab(s)),[s,Ab(s)]}(r,s,y);_.push(S[e[0]],S[e[1]])}if(E=[...E,{placement:r,overflows:_}],!_.every(e=>e<=0)){var I,A;const e=((null==(I=i.flip)?void 0:I.index)||0)+1,t=C[e];if(t&&("alignment"!==u||v===xb(t)||E.every(e=>xb(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:E},reset:{placement:t}};let n=null==(A=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:A.placement;if(!n)switch(h){case"bestFit":{var P;const e=null==(P=E.filter(e=>{if(w){const t=xb(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},Xb=(e,t,n)=>{const o=new Map,r={platform:Kb,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:Tb},d=await(null==s.isRTL?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:u}=kb(l,o,d),p=o,h=0;const m={};for(let n=0;n{t.current=e}),t}const ov=(e,t)=>{const n=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=t,d=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=bb(n),a=vb(n),d="y"===xb(n),l=Nb.has(s)?-1:1,c=i&&d?-1:1,u=gb(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof m&&(h="end"===a?-1*m:m),d?{x:h*c,y:p*l}:{x:p*l,y:h*c}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+d.x,y:i+d.y,data:{...d,placement:s}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}},rv=(e,t)=>{const n=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:d={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=gb(e,t),c={x:n,y:o},u=await i.detectOverflow(t,l),p=xb(bb(r)),h=$b(p);let m=c[h],f=c[p];if(s){const e="y"===h?"bottom":"right";m=fb(m+u["y"===h?"top":"left"],m,m-u[e])}if(a){const e="y"===p?"bottom":"right";f=fb(f+u["y"===p?"top":"left"],f,f-u[e])}const g=d.fn({...t,[h]:m,[p]:f});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[h]:s,[p]:a}}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}},iv=(e,t)=>{const n=Zb(e);return{name:n.name,fn:n.fn,options:[e,t]}},sv={...me},av=sv.useInsertionEffect||(e=>e());function dv(e){const t=he.useRef(()=>{});return av(()=>{t.current=e}),he.useCallback(function(){for(var e=arguments.length,n=new Array(e),o=0;o"floating-ui-"+Math.random().toString(36).slice(2,6)+pv++,mv=sv.useId||function(){const[e,t]=he.useState(()=>uv?hv():void 0);return lv(()=>{null==e&&t(hv())},[]),he.useEffect(()=>{uv=!0},[]),e};const fv=he.createContext(null),gv=he.createContext(null),bv=()=>{var e;return(null==(e=he.useContext(fv))?void 0:e.id)||null},vv=()=>he.useContext(gv);function $v(e){return"data-floating-ui-"+e}function yv(e){const t=(0,he.useRef)(e);return lv(()=>{t.current=e}),t}let xv=0;function wv(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:o=!0,sync:r=!1}=t;o&&cancelAnimationFrame(xv);const i=()=>null==e?void 0:e.focus({preventScroll:n});r?i():xv=requestAnimationFrame(i)}function Cv(e,t){let n=e.filter(e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)}),o=n;for(;o.length;)o=e.filter(e=>{var t;return null==(t=o)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})}),n=n.concat(o);return n}let Sv=new WeakMap,_v=new WeakSet,Ev={},Iv=0;const Av=e=>e&&(e.host||Av(e.parentNode));function Pv(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=Ug(e[0]).body;return function(e,t,n,o){const r="data-floating-ui-inert",i=o?"inert":n?"aria-hidden":null,s=(a=t,e.map(e=>{if(a.contains(e))return e;const t=Av(e);return a.contains(t)?t:null}).filter(e=>null!=e));var a;const d=new Set,l=new Set(s),c=[];Ev[r]||(Ev[r]=new WeakMap);const u=Ev[r];return s.forEach(function e(t){t&&!d.has(t)&&(d.add(t),t.parentNode&&e(t.parentNode))}),function e(t){t&&!l.has(t)&&[].forEach.call(t.children,t=>{if("script"!==hg(t))if(d.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,o=(Sv.get(t)||0)+1,s=(u.get(t)||0)+1;Sv.set(t,o),u.set(t,s),c.push(t),1===o&&n&&_v.add(t),1===s&&t.setAttribute(r,""),!n&&i&&t.setAttribute(i,"true")}})}(t),d.clear(),Iv++,()=>{c.forEach(e=>{const t=(Sv.get(e)||0)-1,n=(u.get(e)||0)-1;Sv.set(e,t),u.set(e,n),t||(!_v.has(e)&&i&&e.removeAttribute(i),_v.delete(e)),n||e.removeAttribute(r)}),Iv--,Iv||(Sv=new WeakMap,Sv=new WeakMap,_v=new WeakSet,Ev={})}}(e.concat(Array.from(o.querySelectorAll("[aria-live]"))),o,t,n)}const kv=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Tv(e,t){const n=db(e,kv());"prev"===t&&n.reverse();const o=n.indexOf(jg(Ug(e)));return n.slice(o+1)[0]}function Nv(){return Tv(document.body,"next")}function Dv(){return Tv(document.body,"prev")}function Mv(e,t){const n=t||e.currentTarget,o=e.relatedTarget;return!o||!Og(n,o)}function Rv(e){db(e,kv()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function jv(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}const Ov={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function Lv(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const Bv=he.forwardRef(function(e,t){const[n,o]=he.useState();lv(()=>(/apple/i.test(navigator.vendor)&&o("button"),document.addEventListener("keydown",Lv),()=>{document.removeEventListener("keydown",Lv)}),[]);const r={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[$v("focus-guard")]:"",style:Ov};return he.createElement("span",cv({},e,r))}),Fv=he.createContext(null),Vv=$v("portal");function Uv(e){const{children:t,id:n,root:o,preserveTabOrder:r=!0}=e,i=function(e){void 0===e&&(e={});const{id:t,root:n}=e,o=mv(),r=zv(),[i,s]=he.useState(null),a=he.useRef(null);return lv(()=>()=>{null==i||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),lv(()=>{if(!o)return;if(a.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=o,n.setAttribute(Vv,""),e.appendChild(n),a.current=n,s(n)},[t,o]),lv(()=>{if(null===n)return;if(!o)return;if(a.current)return;let e=n||(null==r?void 0:r.portalNode);e&&!bg(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const d=document.createElement("div");d.id=o,d.setAttribute(Vv,""),e=i||e,e.appendChild(d),a.current=d,s(d)},[t,n,o,r]),i}({id:n,root:o}),[s,a]=he.useState(null),d=he.useRef(null),l=he.useRef(null),c=he.useRef(null),u=he.useRef(null),p=null==s?void 0:s.modal,h=null==s?void 0:s.open,m=!!s&&!s.modal&&s.open&&r&&!(!o&&!i);return he.useEffect(()=>{if(i&&r&&!p)return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&Mv(e)&&("focusin"===e.type?jv:Rv)(i)}},[i,r,p]),he.useEffect(()=>{i&&(h||jv(i))},[h,i]),he.createElement(Fv.Provider,{value:he.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:d,afterOutsideRef:l,beforeInsideRef:c,afterInsideRef:u,portalNode:i,setFocusManagerState:a}),[r,i])},m&&i&&he.createElement(Bv,{"data-type":"outside",ref:d,onFocus:e=>{if(Mv(e,i)){var t;null==(t=c.current)||t.focus()}else{const e=Dv()||(null==s?void 0:s.refs.domReference.current);null==e||e.focus()}}}),m&&i&&he.createElement("span",{"aria-owns":i.id,style:Ov}),i&&Oe.createPortal(t,i),m&&i&&he.createElement(Bv,{"data-type":"outside",ref:l,onFocus:e=>{if(Mv(e,i)){var t;null==(t=u.current)||t.focus()}else{const t=Nv()||(null==s?void 0:s.refs.domReference.current);null==t||t.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const zv=()=>he.useContext(Fv),Gv="data-floating-ui-focusable";let Hv=[];function Wv(e){Hv=Hv.filter(e=>e.isConnected);let t=e;if(t&&"body"!==hg(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==Yg.call(e,Kg)&&ib(t,e)}(t,kv())){const e=db(t,kv())[0];e&&(t=e)}Hv.push(t),Hv.length>20&&(Hv=Hv.slice(-20))}}function Kv(){return Hv.slice().reverse().find(e=>e.isConnected)}const qv=he.forwardRef(function(e,t){return he.createElement("button",cv({},e,{type:"button",ref:t,tabIndex:-1,style:Ov}))});function Yv(e){const{context:t,children:n,disabled:o=!1,order:r=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:d=!1,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:u=!0}=e,{open:p,refs:h,nodeId:m,onOpenChange:f,events:g,dataRef:b,floatingId:v,elements:{domReference:$,floating:y}}=t,x="number"==typeof s&&s<0,w=!!(C=$)&&"combobox"===C.getAttribute("role")&&Hg(C)&&x;var C;const S="undefined"==typeof HTMLElement||!("inert"in HTMLElement.prototype)||i,_=yv(r),E=yv(s),I=yv(a),A=vv(),P=zv(),k=he.useRef(null),T=he.useRef(null),N=he.useRef(!1),D=he.useRef(!1),M=he.useRef(-1),R=null!=P,j=(B=y)?B.hasAttribute(Gv)?B:B.querySelector("["+Gv+"]")||B:null,O=dv(function(e){return void 0===e&&(e=j),e?db(e,kv()):[]}),L=dv(e=>{const t=O(e);return _.current.map(e=>$&&"reference"===e?$:j&&"floating"===e?j:t).filter(Boolean).flat()});var B;function F(e){return!o&&c&&l?he.createElement(qv,{ref:"start"===e?k:T,onClick:e=>f(!1,e.nativeEvent)},"string"==typeof c?c:"Dismiss"):null}he.useEffect(()=>{if(o)return;if(!l)return;function e(e){if("Tab"===e.key){Og(j,jg(Ug(j)))&&0===O().length&&!w&&Wg(e);const t=L(),n=Gg(e);"reference"===_.current[0]&&n===$&&(Wg(e),e.shiftKey?wv(t[t.length-1]):wv(t[1])),"floating"===_.current[1]&&n===j&&e.shiftKey&&(Wg(e),wv(t[0]))}}const t=Ug(j);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[o,$,j,l,_,w,O,L]),he.useEffect(()=>{if(!o&&y)return y.addEventListener("focusin",e),()=>{y.removeEventListener("focusin",e)};function e(e){const t=Gg(e),n=O().indexOf(t);-1!==n&&(M.current=n)}},[o,y,O]),he.useEffect(()=>{if(!o&&u)return y&&vg($)?($.addEventListener("focusout",t),$.addEventListener("pointerdown",e),y.addEventListener("focusout",t),()=>{$.removeEventListener("focusout",t),$.removeEventListener("pointerdown",e),y.removeEventListener("focusout",t)}):void 0;function e(){D.current=!0,setTimeout(()=>{D.current=!1})}function t(e){const t=e.relatedTarget;queueMicrotask(()=>{const n=!(Og($,t)||Og(y,t)||Og(t,y)||Og(null==P?void 0:P.portalNode,t)||null!=t&&t.hasAttribute($v("focus-guard"))||A&&(Cv(A.nodesRef.current,m).find(e=>{var n,o;return Og(null==(n=e.context)?void 0:n.elements.floating,t)||Og(null==(o=e.context)?void 0:o.elements.domReference,t)})||function(e,t){var n;let o=[],r=null==(n=e.find(e=>e.id===t))?void 0:n.parentId;for(;r;){const t=e.find(e=>e.id===r);r=null==t?void 0:t.parentId,t&&(o=o.concat(t))}return o}(A.nodesRef.current,m).find(e=>{var n,o;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(o=e.context)?void 0:o.elements.domReference)===t})));if(d&&n&&jg(Ug(j))===Ug(j).body){vg(j)&&j.focus();const e=M.current,t=O(),n=t[e]||t[t.length-1]||j;vg(n)&&n.focus()}!w&&l||!t||!n||D.current||t===Kv()||(N.current=!0,f(!1,e,"focus-out"))})}},[o,$,y,j,l,m,A,P,f,u,d,O,w]),he.useEffect(()=>{var e;if(o)return;const t=Array.from((null==P||null==(e=P.portalNode)?void 0:e.querySelectorAll("["+$v("portal")+"]"))||[]);if(y){const e=[y,...t,k.current,T.current,_.current.includes("reference")||w?$:null].filter(e=>null!=e),n=l||w?Pv(e,S,!S):Pv(e);return()=>{n()}}},[o,$,y,l,_,P,w,S]),lv(()=>{if(o||!vg(j))return;const e=jg(Ug(j));queueMicrotask(()=>{const t=L(j),n=E.current,o=("number"==typeof n?t[n]:n.current)||j,r=Og(j,e);x||r||!p||wv(o,{preventScroll:o===j})})},[o,p,j,x,L,E]),lv(()=>{if(o||!j)return;let e=!1;const t=Ug(j),n=jg(t);let r=b.current.openEvent;function i(t){let{open:n,reason:o,event:i,nested:s}=t;n&&(r=i),"escape-key"===o&&h.domReference.current&&Wv(h.domReference.current),"hover"===o&&"mouseleave"===i.type&&(N.current=!0),"outside-press"===o&&(s?(N.current=!1,e=!0):N.current=!(function(e){return!(0!==e.mozInputSource||!e.isTrusted)||(Fg()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}(i)||function(e){return!Bg().includes("jsdom/")&&(!Fg()&&0===e.width&&0===e.height||Fg()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}(i)))}Wv(n),g.on("openchange",i);const s=t.createElement("span");return s.setAttribute("tabindex","-1"),s.setAttribute("aria-hidden","true"),Object.assign(s.style,Ov),R&&$&&$.insertAdjacentElement("afterend",s),()=>{g.off("openchange",i);const n=jg(t),o=Og(y,n)||A&&Cv(A.nodesRef.current,m).some(e=>{var t;return Og(null==(t=e.context)?void 0:t.elements.floating,n)});(o||r&&["click","mousedown"].includes(r.type))&&h.domReference.current&&Wv(h.domReference.current);const a="boolean"==typeof I.current?Kv()||s:I.current.current||s;queueMicrotask(()=>{I.current&&!N.current&&vg(a)&&(a===n||n===t.body||o)&&a.focus({preventScroll:e}),s.remove()})}},[o,y,j,I,b,h,g,A,m,R,$]),he.useEffect(()=>{queueMicrotask(()=>{N.current=!1})},[o]),lv(()=>{if(!o&&P)return P.setFocusManagerState({modal:l,closeOnFocusOut:u,open:p,onOpenChange:f,refs:h}),()=>{P.setFocusManagerState(null)}},[o,P,l,p,f,h,u]),lv(()=>{if(o)return;if(!j)return;if("function"!=typeof MutationObserver)return;if(x)return;const e=()=>{const e=j.getAttribute("tabindex"),t=O(),n=jg(Ug(y)),o=t.indexOf(n);-1!==o&&(M.current=o),_.current.includes("floating")||n!==h.domReference.current&&0===t.length?"0"!==e&&j.setAttribute("tabindex","0"):"-1"!==e&&j.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(j,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}},[o,y,j,h,_,O,x]);const V=!o&&S&&(!l||!w)&&(R||l);return he.createElement(he.Fragment,null,V&&he.createElement(Bv,{"data-type":"inside",ref:null==P?void 0:P.beforeInsideRef,onFocus:e=>{if(l){const e=L();wv("reference"===r[0]?e[0]:e[e.length-1])}else if(null!=P&&P.preserveTabOrder&&P.portalNode)if(N.current=!1,Mv(e,P.portalNode)){const e=Nv()||$;null==e||e.focus()}else{var t;null==(t=P.beforeOutsideRef.current)||t.focus()}}}),!w&&F("start"),n,F("end"),V&&he.createElement(Bv,{"data-type":"inside",ref:null==P?void 0:P.afterInsideRef,onFocus:e=>{if(l)wv(L()[0]);else if(null!=P&&P.preserveTabOrder&&P.portalNode)if(u&&(N.current=!0),Mv(e,P.portalNode)){const e=Dv()||$;null==e||e.focus()}else{var t;null==(t=P.afterOutsideRef.current)||t.focus()}}}))}let Zv=0,Xv=()=>{};const Jv=he.forwardRef(function(e,t){const{lockScroll:n=!1,...o}=e;return lv(()=>{if(n)return Zv++,1===Zv&&(Xv=function(){const e=/iP(hone|ad|od)|iOS/.test(Lg()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,r=t.left?parseFloat(t.left):window.scrollX,i=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",o&&(t[n]=o+"px"),e){var s,a;const e=(null==(s=window.visualViewport)?void 0:s.offsetLeft)||0,n=(null==(a=window.visualViewport)?void 0:a.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(i-Math.floor(n))+"px",left:-(r-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(r,i))}}()),()=>{Zv--,0===Zv&&Xv()}},[n]),he.createElement("div",cv({ref:t},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Qv(e){return vg(e.target)&&"BUTTON"===e.target.tagName}function e$(e){return Hg(e)}function t$(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,dataRef:r,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:d=!0,ignoreMouse:l=!1,keyboardHandlers:c=!0,stickIfOpen:u=!0}=t,p=he.useRef(),h=he.useRef(!1),m=he.useMemo(()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==a&&(Vg(t,!0)&&l||(!n||!d||r.current.openEvent&&u&&"mousedown"!==r.current.openEvent.type?(e.preventDefault(),o(!0,e.nativeEvent,"click")):o(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===a&&p.current?p.current=void 0:Vg(t,!0)&&l||(!n||!d||r.current.openEvent&&u&&"click"!==r.current.openEvent.type?o(!0,e.nativeEvent,"click"):o(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,e.defaultPrevented||!c||Qv(e)||(" "!==e.key||e$(i)||(e.preventDefault(),h.current=!0),"Enter"===e.key&&o(!n||!d,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!c||Qv(e)||e$(i)||" "===e.key&&h.current&&(h.current=!1,o(!n||!d,e.nativeEvent,"click"))}}),[r,i,a,l,c,o,n,u,d]);return he.useMemo(()=>s?{reference:m}:{},[s,m])}const n$={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},o$={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},r$=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function i$(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,elements:r,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:d=!0,outsidePressEvent:l="pointerdown",referencePress:c=!1,referencePressEvent:u="pointerdown",ancestorScroll:p=!1,bubbles:h,capture:m}=t,f=vv(),g=dv("function"==typeof d?d:()=>!1),b="function"==typeof d?g:d,v=he.useRef(!1),$=he.useRef(!1),{escapeKey:y,outsidePress:x}=r$(h),{escapeKey:w,outsidePress:C}=r$(m),S=he.useRef(!1),_=dv(e=>{var t;if(!n||!s||!a||"Escape"!==e.key)return;if(S.current)return;const r=null==(t=i.current.floatingContext)?void 0:t.nodeId,d=f?Cv(f.nodesRef.current,r):[];if(!y&&(e.stopPropagation(),d.length>0)){let e=!0;if(d.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),E=dv(e=>{var t;const n=()=>{var t;_(e),null==(t=Gg(e))||t.removeEventListener("keydown",n)};null==(t=Gg(e))||t.addEventListener("keydown",n)}),I=dv(e=>{var t;const n=v.current;v.current=!1;const s=$.current;if($.current=!1,"click"===l&&s)return;if(n)return;if("function"==typeof b&&!b(e))return;const a=Gg(e),d="["+$v("inert")+"]",c=Ug(r.floating).querySelectorAll(d);let u=bg(a)?a:null;for(;u&&!Pg(u);){const e=Ng(u);if(Pg(e)||!bg(e))break;u=e}if(c.length&&bg(a)&&!a.matches("html,body")&&!Og(a,r.floating)&&Array.from(c).every(e=>!Og(u,e)))return;if(vg(a)&&k){const t=a.clientWidth>0&&a.scrollWidth>a.clientWidth,n=a.clientHeight>0&&a.scrollHeight>a.clientHeight;let o=n&&e.offsetX>a.clientWidth;if(n&&"rtl"===kg(a).direction&&(o=e.offsetX<=a.offsetWidth-a.clientWidth),o||t&&e.offsetY>a.clientHeight)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=f&&Cv(f.nodesRef.current,p).some(t=>{var n;return zg(e,null==(n=t.context)?void 0:n.elements.floating)});if(zg(e,r.floating)||zg(e,r.domReference)||h)return;const m=f?Cv(f.nodesRef.current,p):[];if(m.length>0){let e=!0;if(m.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}o(!1,e,"outside-press")}),A=dv(e=>{var t;const n=()=>{var t;I(e),null==(t=Gg(e))||t.removeEventListener(l,n)};null==(t=Gg(e))||t.addEventListener(l,n)});he.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=y,i.current.__outsidePressBubbles=x;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function d(){window.clearTimeout(e),S.current=!0}function c(){e=window.setTimeout(()=>{S.current=!1},Ag()?5:0)}const u=Ug(r.floating);a&&(u.addEventListener("keydown",w?E:_,w),u.addEventListener("compositionstart",d),u.addEventListener("compositionend",c)),b&&u.addEventListener(l,C?A:I,C);let h=[];return p&&(bg(r.domReference)&&(h=Mg(r.domReference)),bg(r.floating)&&(h=h.concat(Mg(r.floating))),!bg(r.reference)&&r.reference&&r.reference.contextElement&&(h=h.concat(Mg(r.reference.contextElement)))),h=h.filter(e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)}),h.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{a&&(u.removeEventListener("keydown",w?E:_,w),u.removeEventListener("compositionstart",d),u.removeEventListener("compositionend",c)),b&&u.removeEventListener(l,C?A:I,C),h.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[i,r,a,b,l,n,o,p,s,y,x,_,w,E,I,C,A]),he.useEffect(()=>{v.current=!1},[b,l]);const P=he.useMemo(()=>({onKeyDown:_,[n$[u]]:e=>{c&&o(!1,e.nativeEvent,"reference-press")}}),[_,o,c,u]),k=he.useMemo(()=>({onKeyDown:_,onMouseDown(){$.current=!0},onMouseUp(){$.current=!0},[o$[l]]:()=>{v.current=!0}}),[_,l]);return he.useMemo(()=>s?{reference:P,floating:k}:{},[s,P,k])}function s$(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:o}=e,r=mv(),i=he.useRef({}),[s]=he.useState(()=>function(){const e=new Map;return{emit(t,n){var o;null==(o=e.get(t))||o.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var o;e.set(t,(null==(o=e.get(t))?void 0:o.filter(e=>e!==n))||[])}}}()),a=null!=bv(),[d,l]=he.useState(o.reference),c=dv((e,t,o)=>{i.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:o,nested:a}),null==n||n(e,t,o)}),u=he.useMemo(()=>({setPositionReference:l}),[]),p=he.useMemo(()=>({reference:d||o.reference||null,floating:o.floating||null,domReference:o.reference}),[d,o.reference,o.floating]);return he.useMemo(()=>({dataRef:i,open:t,onOpenChange:c,elements:p,events:s,floatingId:r,refs:u}),[t,c,p,s,r,u])}({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,r=o.elements,[i,s]=he.useState(null),[a,d]=he.useState(null),l=(null==r?void 0:r.domReference)||i,c=he.useRef(null),u=vv();lv(()=>{l&&(c.current=l)},[l]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:d,open:l}=e,[c,u]=he.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=he.useState(o);Qb(p,o)||h(o);const[m,f]=he.useState(null),[g,b]=he.useState(null),v=he.useCallback(e=>{e!==w.current&&(w.current=e,f(e))},[]),$=he.useCallback(e=>{e!==C.current&&(C.current=e,b(e))},[]),y=i||m,x=s||g,w=he.useRef(null),C=he.useRef(null),S=he.useRef(c),_=null!=d,E=nv(d),I=nv(r),A=nv(l),P=he.useCallback(()=>{if(!w.current||!C.current)return;const e={placement:t,strategy:n,middleware:p};I.current&&(e.platform=I.current),Xb(w.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==A.current};k.current&&!Qb(S.current,t)&&(S.current=t,Oe.flushSync(()=>{u(t)}))})},[p,t,n,I,A]);Jb(()=>{!1===l&&S.current.isPositioned&&(S.current.isPositioned=!1,u(e=>({...e,isPositioned:!1})))},[l]);const k=he.useRef(!1);Jb(()=>(k.current=!0,()=>{k.current=!1}),[]),Jb(()=>{if(y&&(w.current=y),x&&(C.current=x),y&&x){if(E.current)return E.current(y,x,P);P()}},[y,x,P,E,_]);const T=he.useMemo(()=>({reference:w,floating:C,setReference:v,setFloating:$}),[v,$]),N=he.useMemo(()=>({reference:y,floating:x}),[y,x]),D=he.useMemo(()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=tv(N.floating,c.x),o=tv(N.floating,c.y);return a?{...e,transform:"translate("+t+"px, "+o+"px)",...ev(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:o}},[n,a,N.floating,c.x,c.y]);return he.useMemo(()=>({...c,update:P,refs:T,elements:N,floatingStyles:D}),[c,P,T,N,D])}({...e,elements:{...r,...a&&{reference:a}}}),h=he.useCallback(e=>{const t=bg(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;d(t),p.refs.setReference(t)},[p.refs]),m=he.useCallback(e=>{(bg(e)||null===e)&&(c.current=e,s(e)),(bg(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!bg(e))&&p.refs.setReference(e)},[p.refs]),f=he.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:c}),[p.refs,m,h]),g=he.useMemo(()=>({...p.elements,domReference:l}),[p.elements,l]),b=he.useMemo(()=>({...p,...o,refs:f,elements:g,nodeId:t}),[p,f,g,t,o]);return lv(()=>{o.dataRef.current.floatingContext=b;const e=null==u?void 0:u.nodesRef.current.find(e=>e.id===t);e&&(e.context=b)}),he.useMemo(()=>({...p,context:b,refs:f,elements:g}),[p,f,g,b])}const a$="active",d$="selected";function l$(e,t,n){const o=new Map,r="item"===n;let i=e;if(r&&e){const{[a$]:t,[d$]:__,...n}=e;i=n}return{..."floating"===n&&{tabIndex:-1,[Gv]:""},...i,...t.map(t=>{const o=t?t[n]:null;return"function"==typeof o?e?o(e):null:o}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[n,i]=t;var s;r&&[a$,d$].includes(n)||(0===n.indexOf("on")?(o.has(n)||o.set(n,[]),"function"==typeof i&&(null==(s=o.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,r=new Array(t),i=0;ie(...r)).find(e=>void 0!==e)})):e[n]=i)}),e):e,{})}}function c$(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),o=e.map(e=>null==e?void 0:e.item),r=he.useCallback(t=>l$(t,e,"reference"),t),i=he.useCallback(t=>l$(t,e,"floating"),n),s=he.useCallback(t=>l$(t,e,"item"),o);return he.useMemo(()=>({getReferenceProps:r,getFloatingProps:i,getItemProps:s}),[r,i,s])}const u$=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function p$(e,t){var n;void 0===t&&(t={});const{open:o,floatingId:r}=e,{enabled:i=!0,role:s="dialog"}=t,a=null!=(n=u$.get(s))?n:s,d=mv(),l=null!=bv(),c=he.useMemo(()=>"tooltip"===a||"label"===s?{["aria-"+("label"===s?"labelledby":"describedby")]:o?r:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===a?"dialog":a,"aria-controls":o?r:void 0,..."listbox"===a&&{role:"combobox"},..."menu"===a&&{id:d},..."menu"===a&&l&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}},[a,r,l,o,d,s]),u=he.useMemo(()=>{const e={id:r,...a&&{role:a}};return"tooltip"===a||"label"===s?e:{...e,..."menu"===a&&{"aria-labelledby":d}}},[a,r,d,s]),p=he.useCallback(e=>{let{active:t,selected:n}=e;const o={role:"option",...t&&{id:r+"-option"}};switch(s){case"select":return{...o,"aria-selected":t&&n};case"combobox":return{...o,...t&&{"aria-selected":!0}}}return{}},[r,s]);return he.useMemo(()=>i?{reference:c,floating:u,item:p}:{},[i,c,u,p])}const h$=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function m$(e,t){return"function"==typeof e?e(t):e}const f$=(0,he.createContext)({}),g$=()=>(0,he.useContext)(f$),b$={open:{opacity:1},exit:{opacity:0}},v$={duration:.2},$$=({open:e,setOpen:t,children:n,trigger:o=null,className:r,exitOnClickOutside:i=!1,exitOnEsc:s=!0,design:a="simple",scrollLock:d=!0})=>{const l=void 0!==e&&void 0!==t,[c,p]=(0,he.useState)(!1),h=(0,he.useRef)(null),m=(0,he.useRef)(null),f=(0,he.useMemo)(()=>l?e:c,[e,c]),g=(0,he.useMemo)(()=>l?t:p,[p,t]),{refs:b,context:v}=s$({open:f,onOpenChange:g}),$=t$(v),y=i$(v,{enabled:i||s,escapeKey:s,outsidePress:i}),x=p$(v,{role:"dialog"}),{getFloatingProps:w}=c$([$,y,x]),C=()=>{f||g(!0)},S=(0,he.useCallback)(()=>(0,he.isValidElement)(o)?(0,he.cloneElement)(o,{onClick:sg(C,o?.props?.onClick),ref:b.setReference,"aria-haspopup":"dialog","aria-expanded":f}):"function"==typeof o?o({onClick:C}):null,[o,C,b.setReference,f]);return(0,u.jsxs)(u.Fragment,{children:[S(),(0,u.jsx)(f$.Provider,{value:{open:f,setOpen:g,handleClose:()=>{f&&g(!1)},design:a,context:v,getFloatingProps:w,refs:b,dialogContainerRef:m,dialogRef:h,scrollLock:d,className:r},children:n})]})};$$.displayName="Dialog";const y$=({children:e,className:t})=>{const{open:n,handleClose:o,context:r,getFloatingProps:i,dialogRef:s,scrollLock:a,dialogContainerRef:d,className:l,refs:c}=g$();return(0,u.jsx)(Va,{children:n&&(0,u.jsx)(Jv,{ref:d,lockScroll:a,className:ig("z-999999",l),"aria-modal":"true",children:(0,u.jsx)(Yv,{context:r,...c?.reference&&{returnFocus:c.reference},children:(0,u.jsx)(lf.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:b$,role:"dialog","aria-modal":"true",transition:v$,children:(0,u.jsx)("div",{className:"flex items-center justify-center min-h-full",children:(0,u.jsx)("div",{ref:e=>{e&&(s.current=e,r&&r.refs.setFloating(e))},...i?.(),className:ig("flex flex-col gap-5 w-120 h-fit bg-background-primary border border-solid border-border-subtle rounded-xl shadow-soft-shadow-2xl my-5 overflow-hidden",t),children:"function"==typeof e?e({close:o}):e})})})})})})};y$.displayName="Dialog.Panel";const x$=({children:e,...t})=>(0,u.jsx)(Uv,{...t,children:e});x$.displayName="Dialog.Portal";const w$=({className:e,...t})=>{const{open:n,dialogContainerRef:o}=g$();return o?.current?(0,u.jsx)(u.Fragment,{children:(0,Oe.createPortal)((0,u.jsx)(Va,{children:n&&(0,u.jsx)(lf.div,{className:ig("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:b$,transition:v$})}),o.current)}):null};w$.displayName="Dialog.Backdrop";const C$=({children:e,className:t,...n})=>(0,u.jsx)("div",{className:ig("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});C$.displayName="Dialog.Header";const S$=({children:e,as:t="h3",className:n,...o})=>(0,u.jsx)(t,{className:ig("text-base font-semibold text-text-primary m-0 p-0",n),...o,children:e});S$.displayName="Dialog.Title";const _$=({children:e,as:t="p",className:n,...o})=>(0,u.jsx)(t,{className:ig("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...o,children:e});_$.displayName="Dialog.Description";const E$=({className:e,...t})=>(0,u.jsx)("button",{className:ig("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close dialog",...t,children:(0,u.jsx)(ug,{className:"size-4 text-text-primary shrink-0"})}),I$=({children:e,as:t=he.Fragment,...n})=>{const{handleClose:o}=g$();return e?t===he.Fragment?"function"==typeof e?e({close:o}):(0,he.cloneElement)(e,{onClick:o}):(0,u.jsx)(t,{...n,onClick:o,"aria-label":"Close dialog",children:e}):(0,u.jsx)(E$,{onClick:o,...n})};I$.displayName="Dialog.CloseButton";const A$=({children:e,className:t,...n})=>(0,u.jsx)("div",{className:ig("px-5",t),...n,children:e});A$.displayName="Dialog.Body";const P$=({children:e,className:t})=>{const{design:n,handleClose:o}=g$();return(0,u.jsx)("div",{className:ig("p-4 flex justify-end gap-3",{"bg-background-secondary":"footer-divided"===n},t),children:e?"function"==typeof e?e({close:o}):e:null})};P$.displayName="Dialog.Footer",$$.Panel=y$,$$.Portal=x$,$$.Title=S$,$$.Description=_$,$$.CloseButton=I$,$$.Header=C$,$$.Body=A$,$$.Footer=P$,$$.Backdrop=w$;const k$={sm:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"}},T$={sm:{xs:"gap-2",sm:"gap-4",md:"gap-5",lg:"gap-6",xl:"gap-6","2xl":"gap-8"},md:{xs:"md:gap-2",sm:"md:gap-4",md:"md:gap-5",lg:"md:gap-6",xl:"md:gap-6","2xl":"md:gap-8"},lg:{xs:"lg:gap-2",sm:"lg:gap-4",md:"lg:gap-5",lg:"lg:gap-6",xl:"lg:gap-6","2xl":"lg:gap-8"}},N$={sm:{xs:"gap-x-2",sm:"gap-x-4",md:"gap-x-5",lg:"gap-x-6",xl:"gap-x-6","2xl":"gap-x-8"},md:{xs:"md:gap-x-2",sm:"md:gap-x-4",md:"md:gap-x-5",lg:"md:gap-x-6",xl:"md:gap-x-6","2xl":"md:gap-x-8"},lg:{xs:"lg:gap-x-2",sm:"lg:gap-x-4",md:"lg:gap-x-5",lg:"lg:gap-x-6",xl:"lg:gap-x-6","2xl":"lg:gap-x-8"}},D$={sm:{xs:"gap-y-2",sm:"gap-y-4",md:"gap-y-5",lg:"gap-y-6",xl:"gap-y-6","2xl":"gap-y-8"},md:{xs:"md:gap-y-2",sm:"md:gap-y-4",md:"md:gap-y-5",lg:"md:gap-y-6",xl:"md:gap-y-6","2xl":"md:gap-y-8"},lg:{xs:"lg:gap-y-2",sm:"lg:gap-y-4",md:"lg:gap-y-5",lg:"lg:gap-y-6",xl:"lg:gap-y-6","2xl":"lg:gap-y-8"}},M$={sm:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}},R$={sm:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12"},md:{1:"md:col-start-1",2:"md:col-start-2",3:"md:col-start-3",4:"md:col-start-4",5:"md:col-start-5",6:"md:col-start-6",7:"md:col-start-7",8:"md:col-start-8",9:"md:col-start-9",10:"md:col-start-10",11:"md:col-start-11",12:"md:col-start-12"},lg:{1:"lg:col-start-1",2:"lg:col-start-2",3:"lg:col-start-3",4:"lg:col-start-4",5:"lg:col-start-5",6:"lg:col-start-6",7:"lg:col-start-7",8:"lg:col-start-8",9:"lg:col-start-9",10:"lg:col-start-10",11:"lg:col-start-11",12:"lg:col-start-12"}},j$={sm:{row:"grid-flow-row",column:"grid-flow-col","row-dense":"grid-flow-row-dense","column-dense":"grid-flow-col-dense"},md:{row:"md:grid-flow-row",column:"md:grid-flow-col","row-dense":"md:grid-flow-row-dense","column-dense":"md:grid-flow-col-dense"},lg:{row:"lg:grid-flow-row",column:"lg:grid-flow-col","row-dense":"lg:grid-flow-row-dense","column-dense":"lg:grid-flow-col-dense"}},O$={sm:{normal:"justify-normal",start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},md:{normal:"md:justify-normal",start:"md:justify-start",end:"md:justify-end",center:"md:justify-center",between:"md:justify-between",around:"md:justify-around",evenly:"md:justify-evenly",stretch:"md:justify-stretch"},lg:{normal:"lg:justify-normal",start:"lg:justify-start",end:"lg:justify-end",center:"lg:justify-center",between:"lg:justify-between",around:"lg:justify-around",evenly:"lg:justify-evenly",stretch:"lg:justify-stretch"}},L$={sm:{start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},md:{start:"md:items-start",end:"md:items-end",center:"md:items-center",baseline:"md:items-baseline",stretch:"md:items-stretch"},lg:{start:"lg:items-start",end:"lg:items-end",center:"lg:items-center",baseline:"lg:items-baseline",stretch:"lg:items-stretch"}},B$={sm:{start:"self-start",end:"self-end",center:"self-center",baseline:"self-baseline",stretch:"self-stretch"},md:{start:"md:self-start",end:"md:self-end",center:"md:self-center",baseline:"md:self-baseline",stretch:"md:self-stretch"},lg:{start:"lg:self-start",end:"lg:self-end",center:"lg:self-center",baseline:"lg:self-baseline",stretch:"lg:self-stretch"}},F$={sm:{auto:"justify-self-auto",start:"justify-self-start",end:"justify-self-end",center:"justify-self-center",baseline:"justify-self-baseline",stretch:"justify-self-stretch"},md:{auto:"md:justify-self-auto",start:"md:justify-self-start",end:"md:justify-self-end",center:"md:justify-self-center",baseline:"md:justify-self-baseline",stretch:"md:justify-self-stretch"},lg:{auto:"lg:justify-self-auto",start:"lg:justify-self-start",end:"lg:justify-self-end",center:"lg:justify-self-center",baseline:"lg:justify-self-baseline",stretch:"lg:justify-self-stretch"}},V$={sm:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},md:{row:"md:flex-row","row-reverse":"md:flex-row-reverse",column:"md:flex-col","column-reverse":"md:flex-col-reverse"},lg:{row:"lg:flex-row","row-reverse":"lg:flex-row-reverse",column:"lg:flex-col","column-reverse":"lg:flex-col-reverse"}},U$={sm:{wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},md:{wrap:"md:flex-wrap","wrap-reverse":"md:flex-wrap-reverse",nowrap:"md:flex-nowrap"},lg:{wrap:"lg:flex-wrap","wrap-reverse":"lg:flex-wrap-reverse",nowrap:"lg:flex-nowrap"}},z$={sm:{1:"w-full",2:"w-1/2",3:"w-1/3",4:"w-1/4",5:"w-1/5",6:"w-1/6",7:"w-1/7",8:"w-1/8",9:"w-1/9",10:"w-1/10",11:"w-1/11",12:"w-1/12"},md:{1:"md:w-full",2:"md:w-1/2",3:"md:w-1/3",4:"md:w-1/4",5:"md:w-1/5",6:"md:w-1/6",7:"md:w-1/7",8:"md:w-1/8",9:"md:w-1/9",10:"md:w-1/10",11:"md:w-1/11",12:"md:w-1/12"},lg:{1:"lg:w-full",2:"lg:w-1/2",3:"lg:w-1/3",4:"lg:w-1/4",5:"lg:w-1/5",6:"lg:w-1/6",7:"lg:w-1/7",8:"lg:w-1/8",9:"lg:w-1/9",10:"lg:w-1/10",11:"lg:w-1/11",12:"lg:w-1/12"}},G$={sm:{1:"order-1",2:"order-2",3:"order-3",4:"order-4",5:"order-5",6:"order-6",7:"order-7",8:"order-8",9:"order-9",10:"order-10",11:"order-11",12:"order-12",first:"order-first",last:"order-last",none:"order-none"},md:{1:"md:order-1",2:"md:order-2",3:"md:order-3",4:"md:order-4",5:"md:order-5",6:"md:order-6",7:"md:order-7",8:"md:order-8",9:"md:order-9",10:"md:order-10",11:"md:order-11",12:"md:order-12",first:"md:order-first",last:"md:order-last",none:"md:order-none"},lg:{1:"lg:order-1",2:"lg:order-2",3:"lg:order-3",4:"lg:order-4",5:"lg:order-5",6:"lg:order-6",7:"lg:order-7",8:"lg:order-8",9:"lg:order-9",10:"lg:order-10",11:"lg:order-11",12:"lg:order-12",first:"lg:order-first",last:"lg:order-last",none:"lg:order-none"}},H$={sm:{0:"grow-0",1:"grow"},md:{0:"md:grow-0",1:"md:grow"},lg:{0:"lg:grow-0",1:"lg:grow"}},W$={sm:{0:"shrink-0",1:"shrink"},md:{0:"md:shrink-0",1:"md:shrink"},lg:{0:"lg:shrink-0",1:"lg:shrink"}},K$=(e,t,n,o="sm")=>{const r=[];switch(typeof e){case"object":for(const[o,i]of Object.entries(e))t[o]&&r.push(t?.[o]?.[i]??t?.[o]?.[n?.[o]]??"");break;case"string":case"number":const i=o;r.push(t?.[i]?.[e]??t?.[i]?.[n?.[i]]??"");break;default:if(void 0===e)break;r.push(t?.[o]?.[n]??"")}return r.join(" ")},q$=({className:e,cols:t,gap:n,gapX:o,gapY:r,align:i,justify:s,gridFlow:a,colsSubGrid:d=!1,rowsSubGrid:l=!1,autoRows:c=!1,autoCols:p=!1,children:h,...m})=>{const f=K$(t,k$,1),g=K$(n,T$,"sm"),b=K$(o,N$,""),v=K$(r,D$,""),$=K$(i,L$,""),y=K$(s,O$,""),x=K$(a,j$,"");return(0,u.jsx)("div",{className:ig("grid",{"grid-cols-subgrid":d,"grid-rows-subgrid":l,"auto-cols-auto":p,"auto-rows-auto":c},f,g,b,v,$,y,x,e),...m,children:h})};q$.Item=({className:e,children:t,colSpan:n,colStart:o,alignSelf:r,justifySelf:i,...s})=>{const a=K$(n,M$,0),d=K$(o,R$,0),l=K$(r,B$,""),c=K$(i,F$,"");return(0,u.jsx)("div",{className:ig(a,d,l,c,e),...s,children:t})};const Y$=(0,he.createContext)({}),Z$=({containerType:e="flex",gap:t="sm",gapX:n,gapY:o,direction:r,justify:i,align:s,wrap:a,cols:d,className:l,children:c,...p})=>{if("grid"===e)return(0,u.jsx)(Y$.Provider,{value:{containerType:e},children:(0,u.jsx)(q$,{className:l,gap:t,gapX:n,gapY:o,cols:d,children:c,align:s,justify:i,...p})});const h=K$(a,U$,""),m=K$(t,T$,"sm"),f=K$(n,N$,""),g=K$(o,D$,""),b=K$(r,V$,""),v=K$(i,O$,""),$=K$(s,L$,""),y=ig("flex",h,m,f,g,b,v,$,l);return(0,u.jsx)(Y$.Provider,{value:{containerType:e,cols:d},children:"flex"===e?(0,u.jsx)("div",{className:y,children:c}):(0,u.jsx)(q$,{className:l,gap:t,gapX:n,gapY:o,cols:d,children:c,align:s,justify:i,...p})})},X$=({grow:e,shrink:t,order:n,alignSelf:o,justifySelf:r,className:i,children:s,...a})=>{const{containerType:d,cols:l}=(0,he.useContext)(Y$);if("grid"===d)return(0,u.jsx)(q$.Item,{className:i,alignSelf:o,justifySelf:r,children:s,...a});const c=K$(o,B$,""),p=K$(r,F$,""),h=K$(e,H$,0),m=K$(t,W$,0),f=K$(n,G$,0),g=K$(l,z$,1);return(0,u.jsx)("div",{className:ig("box-border",h,m,f,c,p,g,i),children:s})};Z$.Item=X$,Z$.displayName="Container",X$.displayName="Container.Item";const J$=({title:e="",description:t="",icon:n=null,iconPosition:o="right",tag:r="h2",size:i="sm",className:s=""})=>{const a={xs:"gap-1 [&>svg]:size-3.5",sm:"gap-1 [&>svg]:size-4",md:"gap-1.5 [&>svg]:size-5",lg:"gap-1.5 [&>svg]:size-5"};if(!e)return null;const d=()=>(0,u.jsx)(r,{className:ig("font-semibold p-0 m-0",{xs:"text-base [&>*]:text-base gap-1",sm:"text-lg [&>*]:text-lg gap-1",md:"text-xl [&>*]:text-xl gap-1.5",lg:"text-2xl [&>*]:text-2xl gap-1.5"}[i]),children:e});return t?(0,u.jsxs)("div",{className:s,children:[(0,u.jsxs)("div",{children:[n&&"left"===o&&(0,u.jsxs)("div",{className:ig("flex items-center",a[i]),children:[n,d()]}),n&&"right"===o&&(0,u.jsxs)("div",{className:ig("flex items-center",a[i]),children:[d(),n]}),!n&&d()]}),(0,u.jsx)("p",{className:ig("text-text-secondary font-normal my-0",{xs:"text-sm",sm:"text-sm",md:"text-base",lg:"text-base"}[i]),children:t})]}):(0,u.jsxs)("div",{className:s,children:[n&&"left"===o&&(0,u.jsxs)("div",{className:ig("flex items-center",a[i]),children:[n,d()]}),n&&"right"===o&&(0,u.jsxs)("div",{className:ig("flex items-center",a[i]),children:[d(),n]}),!n&&d()]})},Q$=(0,he.forwardRef)((e,t)=>{const{variant:n="primary",size:o="md",type:r="button",tag:i="button",className:s,children:a,disabled:d=!1,destructive:l=!1,icon:c=null,iconPosition:p="left",loading:h=!1,...m}=e,f=l&&"focus:ring-focus-error",g=h?"opacity-50 disabled:cursor-not-allowed":"",b={primary:"text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover shadow-xs disabled:shadow-none focus:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",secondary:"text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover shadow-xs focus:shadow-none disabled:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",outline:"text-button-tertiary-color outline-border-subtle bg-button-tertiary shadow-sm focus:shadow-none hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled",ghost:"text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover",link:"outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none"}[n],v=l&&!d?{primary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",secondary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",outline:"text-button-danger outline outline-1 outline-button-danger hover:outline-button-danger bg-button-tertiary hover:bg-field-background-error",ghost:"text-button-danger hover:bg-field-background-error",link:"text-button-danger hover:text-button-danger-secondary"}[n]:"",$={xs:"p-1 rounded [&>svg]:size-4",sm:"p-2 rounded [&>svg]:size-4 gap-0.5",md:"p-2.5 rounded-md text-sm [&>svg]:size-5 gap-1",lg:"p-3 rounded-lg text-base [&>svg]:size-6 gap-1"}[o];let y,x=null,w="";return c&&(w="flex items-center justify-center","left"===p?y=c:x=c),(0,u.jsxs)(i,{ref:t,type:r,className:ig(w,"outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled",$,b,v,f,g,{"cursor-default":d},s),disabled:d,"aria-disabled":d,...m,children:[(0,u.jsx)(he.Fragment,{children:y},"left-icon"),a?(0,u.jsx)("span",{className:"px-1",children:a}):null,(0,u.jsx)(he.Fragment,{children:x},"right-icon")]})});Q$.displayName="Button";const ey=Re("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ty=(0,he.forwardRef)(({children:e=null,tag:t="label",size:n="sm",className:o="",variant:r="neutral",required:i=!1,...s},a)=>{if(!e)return null;let d="";return i&&(d="after:content-['*'] after:text-field-required after:ml-0.5"),(0,u.jsx)(t,{ref:a,className:ig("font-medium text-field-label flex items-center gap-0.5",{xs:"text-xs [&>*]:text-xs [&>svg]:h-3 [&>svg]:w-3",sm:"text-sm [&>*]:text-sm [&>svg]:h-4 [&>svg]:w-4",md:"text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5"}[n],{neutral:"text-field-label [&>*]:text-field-label",help:"text-field-helper [&>*]:text-field-helper",error:"text-support-error [&>*]:text-support-error",disabled:"text-field-color-disabled disabled cursor-not-allowed [&>*]:text-field-color-disabled"}[r],d,{neutral:"",help:"font-normal",error:"font-normal",disabled:""}?.[r],o),...s,children:e})});ty.displayName="Label";const ny=(0,he.createContext)(null);const oy=e=>!e.isLayoutDirty&&e.willUpdate(!1);function ry(){const e=new Set,t=new WeakMap,n=()=>e.forEach(oy);return{add:o=>{e.add(o),t.set(o,o.addEventListener("willUpdate",n))},remove:o=>{e.delete(o);const r=t.get(o);r&&(r(),t.delete(o)),n()},dirty:n}}const iy=e=>!0===e,sy=({children:e,id:t,inherit:n=!0})=>{const o=(0,he.useContext)(Aa),r=(0,he.useContext)(ny),[i,s]=function(){const e=function(){const e=(0,he.useRef)(!1);return Fa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}(),[t,n]=(0,he.useState)(0),o=(0,he.useCallback)(()=>{e.current&&n(t+1)},[t]);return[(0,he.useCallback)(()=>Od.postRender(o),[o]),t]}(),a=(0,he.useRef)(null),d=o.id||r;null===a.current&&((e=>iy(!0===e)||"id"===e)(n)&&d&&(t=t?d+"-"+t:d),a.current={id:t,group:iy(n)&&o.group||ry()});const l=(0,he.useMemo)(()=>({...a.current,forceRender:i}),[s]);return(0,u.jsx)(Aa.Provider,{value:l,children:e})},ay=(0,he.createContext)({}),dy=()=>(0,he.useContext)(ay),ly=(0,he.createContext)(null),cy=({children:e,activeItem:t=null,onChange:n,className:o,size:r="sm",orientation:i="horizontal",variant:s="pill",iconPosition:a="left",width:d="full"})=>{const l=((e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t})(),c=dy()?.activeItem||t,p=(0,he.useCallback)((e,t)=>{n&&n({event:e,value:t})},[n]);let h,m="rounded-full",f="p-1",g="ring-1 ring-tab-border";"vertical"===i?h="gap-0.5":("rounded"===s||"pill"===s)&&("xs"===r||"sm"===r?h="gap-0.5":("md"===r||"lg"===r)&&(h="gap-1")),"rounded"===s||"vertical"===i?m="rounded-md":"underline"===s&&(m="rounded-none",f="p-0",g="border-t-0 border-r-0 border-l-0 border-b border-solid border-tab-border","xs"===r?h="gap-0":"sm"===r?h="gap-2.5":("md"===r||"lg"===r)&&(h="gap-3"));const b=ig(`box-border [&>*]:box-border flex items-center ${"full"===d?"w-full":""} ${"vertical"===i?"flex-col":""}`,m,f,h,g,"underline"!==s?"bg-tab-background":"",o);return(0,u.jsx)("div",{className:b,children:(0,u.jsx)(ly.Provider,{value:{activeItem:c,onChange:p,size:r,variant:s,orientation:i,iconPosition:a,width:d},children:(0,u.jsx)(sy,{id:l,children:he.Children.map(e,e=>(0,he.isValidElement)(e)?he.cloneElement(e):null)})})})};cy.displayName="Tabs.Group";const uy=(0,he.forwardRef)(({slug:e,text:t,icon:n,className:o,disabled:r=!1,badge:i=null,...s},a)=>{const d=(0,he.useContext)(ly);if(!d)throw new Error("Tab should be used inside Tabs Group");const{activeItem:l,onChange:c,size:p,variant:h,orientation:m,iconPosition:f,width:g}=d,b={xs:"px-1.5 py-0.5 text-xs [&_svg]:size-3",sm:"underline"===h?"py-1.5 text-sm [&_svg]:size-4":"px-3 py-1.5 text-sm [&_svg]:size-4",md:"underline"===h?"py-2 text-base [&_svg]:size-5":"px-3.5 py-1.5 text-base [&_svg]:size-5",lg:"underline"===h?"p-2.5 text-lg [&_svg]:size-6":"px-3.5 py-1.5 text-lg [&_svg]:size-6"}[p],v=ig("relative border-none bg-transparent text-text-secondary cursor-pointer flex items-center justify-center transition-[box-shadow,color,background-color] duration-200","full"===g?"flex-1":"","vertical"===m?"w-full justify-between":"");let $="rounded-full";"rounded"===h?$="rounded-md":"underline"===h&&($="rounded-none");const y=ig(v,"border-none",$,"hover:text-text-primary","focus:outline-none",b,l===e?"bg-background-primary text-text-primary shadow-sm":"",r?"text-text-disabled cursor-not-allowed hover:text-text-disabled":"",o),x=ig("flex items-center gap-1");return(0,u.jsxs)(lf.button,{ref:a,className:y,disabled:r,onClick:n=>{c(n,{slug:e,text:t})},...s,layoutRoot:!0,children:[l===e&&"underline"===h&&(0,u.jsx)(lf.span,{layoutId:"underline",layoutDependency:l,className:"absolute right-0 left-0 -bottom-px h-px bg-border-interactive"}),(0,u.jsxs)("span",{className:x,children:["left"===f&&n&&(0,u.jsx)("span",{className:"mr-1 contents center-center transition duration-150",children:n}),t,"right"===f&&n&&(0,u.jsx)("span",{className:"ml-1 contents center-center transition duration-150",children:n})]}),i&&(0,he.isValidElement)(i)&&i]})});uy.displayName="Tabs.Tab";const py=({activeItem:e,children:t})=>(0,u.jsx)(ay.Provider,{value:{activeItem:e},children:t}),hy=({slug:e,children:t})=>{const n=dy();if(!n)throw new Error("TabPanel should be used inside Tabs");return e===n.activeItem?(0,u.jsx)(u.Fragment,{children:t}):null};hy.displayName="Tabs.Panel",py.Group=cy,py.Tab=uy,py.Panel=hy;const my=cg("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),fy=(0,he.createContext)({}),gy=()=>(0,he.useContext)(fy),by=({size:e="md",children:t,className:n})=>(0,u.jsx)(fy.Provider,{value:{size:e},children:(0,u.jsx)("div",{className:ig("flex flex-col bg-background-primary p-2",n),children:t})});by.displayName="Menu";const vy=({heading:e,arrow:t=!1,showArrowOnHover:n=!1,open:o=!0,onClick:r,children:i,className:s})=>{const[a,d]=(0,he.useState)(o),[l,c]=(0,he.useState)(!1),{size:p}=gy(),h={sm:"text-xs",md:"text-sm"}[p??"md"],m={sm:"size-4",md:"size-5"}[p??"md"],f=()=>{d(!a),r&&r(!a)};return(0,u.jsxs)("div",{children:[!!e&&(0,u.jsxs)("div",{role:"button",tabIndex:0,onClick:f,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&f()},onMouseEnter:()=>n&&c(!0),onMouseLeave:()=>n&&c(!1),className:ig("text-text-primary bg-transparent cursor-pointer flex justify-between items-center gap-1",h,e?"p-1":"p-0",s),"aria-expanded":a,children:[(0,u.jsx)("span",{className:"text-text-tertiary",children:e}),t&&(0,u.jsx)(lf.span,{className:"flex items-center text-border-strong",initial:"hidden",animate:n?a||l?"visible":"hidden":"visible",exit:"hidden",variants:{visible:{opacity:1},hidden:{opacity:0}},transition:{duration:.15},children:(0,u.jsx)(lf.span,{className:"inline-flex p-1",variants:{open:{rotate:180},closed:{rotate:0}},animate:a?"open":"closed",transition:{duration:.15},children:(0,u.jsx)(my,{className:ig("shrink-0",m)})})})]}),(0,u.jsx)(Va,{initial:!1,children:a&&(0,u.jsx)(lf.ul,{role:"menu",variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:"overflow flex gap-0.5 flex-col m-0 bg-white rounded p-0",children:i})})]})};vy.displayName="Menu.List";const $y=({disabled:e=!1,active:t,onClick:n,children:o,className:r,...i})=>{const{size:s}=gy(),a={sm:"[&>svg]:size-4 [&>svg]:m-1 [&>*:not(svg)]:mx-1 [&>*:not(svg)]:my-0.5 text-sm",md:"[&>svg]:size-5 [&>svg]:m-1.5 [&>*:not(svg)]:m-1 text-base"}[s??"md"];return(0,u.jsx)("li",{role:"menuitem",tabIndex:e?-1:0,onClick:e?void 0:n,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&n?.()},className:ig("flex p-1 gap-1 items-center bg-transparent border-none rounded text-text-secondary cursor-pointer m-0",a,"hover:bg-background-secondary hover:text-text-primary",e?"text-text-disabled hover:text-text-disabled cursor-not-allowed hover:bg-transparent":"",t?"text-icon-primary [&>svg]:text-icon-interactive bg-background-secondary":"","transition-colors duration-300 ease-in-out",r),"aria-disabled":e,...i,children:o})};$y.displayName="Menu.Item";const yy=({variant:e="solid",className:t})=>{const n={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",double:"border-double",hidden:"border-hidden",none:"border-none"}[e];return(0,u.jsx)("li",{className:"m-0 p-0 list-none",role:"separator","aria-hidden":"true",children:(0,u.jsx)("hr",{className:ig("w-full border-0 border-t border-border-subtle",n,t)})})};yy.displayName="Menu.Separator",by.List=vy,by.Item=$y,by.Separator=yy;const xy=(0,he.createContext)({}),wy=()=>(0,he.useContext)(xy),Cy=({placement:e="bottom",offset:t=10,boundary:n="clippingAncestors",children:o,className:r})=>{const[i,s]=(0,he.useState)(!1),{refs:a,floatingStyles:d,context:l}=s$({open:i,onOpenChange:s,placement:e,strategy:"fixed",middleware:[ov(t),iv({boundary:n}),rv({boundary:n})],whileElementsMounted:Yb}),c=t$(l),p=i$(l),h=p$(l,{role:"menu"}),{getReferenceProps:m,getFloatingProps:f}=c$([c,p,h]),{isMounted:g,styles:b}=function(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:o,close:r,common:i,duration:s=250}=t,a=e.placement,d=a.split("-")[0],l=he.useMemo(()=>({side:d,placement:a}),[d,a]),c="number"==typeof s,u=(c?s:s.open)||0,p=(c?s:s.close)||0,[h,m]=he.useState(()=>({...m$(i,l),...m$(n,l)})),{isMounted:f,status:g}=function(e,t){void 0===t&&(t={});const{open:n,elements:{floating:o}}=e,{duration:r=250}=t,i=("number"==typeof r?r:r.close)||0,[s,a]=he.useState("unmounted"),d=function(e,t){const[n,o]=he.useState(e);return e&&!n&&o(!0),he.useEffect(()=>{if(!e&&n){const e=setTimeout(()=>o(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}(n,i);return d||"close"!==s||a("unmounted"),lv(()=>{if(o){if(n){a("initial");const e=requestAnimationFrame(()=>{a("open")});return()=>{cancelAnimationFrame(e)}}a("close")}},[n,o]),{isMounted:d,status:s}}(e,{duration:s}),b=yv(n),v=yv(o),$=yv(r),y=yv(i);return lv(()=>{const e=m$(b.current,l),t=m$($.current,l),n=m$(y.current,l),o=m$(v.current,l)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===g&&m(t=>({transitionProperty:t.transitionProperty,...n,...e})),"open"===g&&m({transitionProperty:Object.keys(o).map(h$).join(","),transitionDuration:u+"ms",...n,...o}),"close"===g){const o=t||e;m({transitionProperty:Object.keys(o).map(h$).join(","),transitionDuration:p+"ms",...n,...o})}},[p,$,b,v,y,u,g,l]),{isMounted:f,styles:h}}(l,{duration:150,initial:{opacity:0,scale:.95},open:{opacity:1,scale:1},close:{opacity:0,scale:.95}}),v=()=>s(e=>!e);return(0,u.jsx)(xy.Provider,{value:{refs:a,handleClose:()=>s(!1),isMounted:g,styles:b,floatingStyles:d,getFloatingProps:f},children:(0,u.jsxs)("div",{className:ig("relative inline-block",r),children:[he.Children.map(o,e=>he.isValidElement(e)&&"DropdownMenu.Trigger"===e?.type?.displayName?(0,he.cloneElement)(e,{ref:a.setReference,onClick:v,...m()}):null),he.Children.toArray(o).filter(e=>he.isValidElement(e)&&["DropdownMenu.Portal","DropdownMenu.ContentWrapper"].includes(e.type.displayName||"")).map(e=>e)]})})};Cy.displayName="DropdownMenu";const Sy=({children:e,className:t})=>{const{refs:n,floatingStyles:o,getFloatingProps:r,isMounted:i,styles:s}=wy();return i&&(0,u.jsx)("div",{ref:n.setFloating,className:t,style:{...o,...s},...r(),children:he.Children.map(e,e=>"DropdownMenu.Content"===e?.type?.displayName?e:null)})};Sy.displayName="DropdownMenu.ContentWrapper";const _y=({children:e,root:t,id:n})=>(0,u.jsx)(Uv,{id:n,root:t,children:e});_y.displayName="DropdownMenu.Portal";const Ey=he.forwardRef(({children:e,className:t,...n},o)=>(0,he.isValidElement)(e)?he.cloneElement(e,{className:ig(t,e.props.className),ref:o,...n}):(0,u.jsx)("div",{ref:o,className:ig("cursor-pointer",t),role:"button",tabIndex:0,...n,children:e}));Ey.displayName="DropdownMenu.Trigger";const Iy=({children:e,className:t,...n})=>(0,u.jsx)("div",{className:ig("border border-solid border-border-subtle rounded-md shadow-lg overflow-hidden",t),children:(0,u.jsx)(by,{...n,children:e})});Iy.displayName="DropdownMenu.Content";const Ay=e=>(0,u.jsx)(by.List,{...e});Ay.displayName="DropdownMenu.List";const Py=({children:e,as:t=by.Item,...n})=>{const{handleClose:o}=wy();return e?t===he.Fragment&&(0,he.isValidElement)(e)?(0,he.cloneElement)(e,{onClick:sg(e.props?.onClick,o)}):(0,u.jsx)(t,{...n,className:ig("px-2",n.className),onClick:sg(n.onClick,o),children:e}):null};Py.displayName="DropdownMenu.Item";const ky=e=>(0,u.jsx)(by.Separator,{...e});ky.displayName="DropdownMenu.Separator",Cy.Trigger=Ey,Cy.Content=Iy,Cy.List=Ay,Cy.Item=Py,Cy.Separator=ky,Cy.Portal=_y,Cy.ContentWrapper=Sy;const Ty=Re("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Ny=({content:e="",handleContentChange:t,editorId:n,label:o=null,error:r=!1,onBlur:s=()=>{},onFocus:a=()=>{},required:d=!1,smartTags:c=[],smartTagGroups:p=[],height:h=300,defaultTab:m="visual"})=>{const[f,g]=(0,l.useState)(e||""),[b,v]=(0,l.useState)(m),$=(0,l.useRef)(null),y=(0,l.useRef)(null),x=(0,l.useRef)(e||""),w=(0,l.useRef)(e||""),C=(0,l.useRef)(t),S=(0,l.useRef)(s),_=(0,l.useRef)(a);(0,l.useEffect)(()=>{C.current=t},[t]),(0,l.useEffect)(()=>{S.current=s},[s]),(0,l.useEffect)(()=>{_.current=a},[a]),(0,l.useEffect)(()=>{const t=e||"";g(t),x.current=t;const o=window.tinyMCE?.get(n);o&&t!==w.current&&o.getContent()!==t&&o.setContent(t)},[e,n]);const E=(0,l.useCallback)(e=>{w.current=e,g(e),C.current(e)},[]),I=(0,l.useRef)(E);(0,l.useEffect)(()=>{I.current=E},[E]),(0,l.useEffect)(()=>{const e=$.current,t=y.current,o=e=>{const t=window.tinyMCE?.get(n);if(t){const n=t.getContainer(),o=n?.closest(".sd-richtext-content-editor");if(o){const t="visual"===e?"switch-tmce":"switch-html",n=o.querySelector(`.${t}`);n&&n.click()}}},r=()=>{v("visual"),o("visual")},i=()=>{v("html"),o("html")};e&&t&&(e.addEventListener("click",r),t.addEventListener("click",i));let s,a=0;const d=()=>{window.wp?.editor&&document.getElementById(n)?(()=>{if(window.wp?.editor&&document.getElementById(n)){window.tinyMCE?.get(n)&&window.tinyMCE.execCommand("mceRemoveEditor",!0,n),window.wp.editor.initialize(n,{tinymce:{toolbar1:"formatselect bold italic bullist numlist link blockquote alignleft aligncenter alignright underline strikethrough forecolor removeformat undo redo",content_style:'\n\t\t\t\t\t\t\tbody {\n\t\t\t\t\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;\n\t\t\t\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\t\t\t\tline-height: 1.6;\n\t\t\t\t\t\t\t\tcolor: #333;\n\t\t\t\t\t\t\t\tpadding: 12px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t',fontsize_formats:"12px 14px 16px 18px 24px",plugins:"lists link textcolor",menubar:!1,height:h,resize:!1},quicktags:!0,mediaButtons:!1});const e=window.tinyMCE.get(n);if(e&&(e.setContent(x.current),e.on("change",()=>{I.current(e.getContent())}),e.on("blur",()=>{S.current(e.getContent())}),e.on("focus",()=>{_.current(e.getContent())}),"html"===m)){const t=()=>{const e=document.getElementById(n)?.closest(".sd-richtext-content-editor");e?.querySelector(".switch-html")?.click(),v("html")};e.initialized?t():e.on("init",t)}}})():a++<60&&(s=window.requestAnimationFrame(d))};return d(),()=>{s&&window.cancelAnimationFrame(s),window.tinyMCE?.get(n)&&window.tinyMCE.execCommand("mceRemoveEditor",!0,n),e?.removeEventListener("click",r),t?.removeEventListener("click",i)}},[n,h,m]);const A=e=>{const t=window.tinyMCE?.get(n);t&&t.insertContent(e)};return(0,u.jsxs)("div",{className:"sd-richtext-content-editor flex flex-col gap-1.5 "+(r?"sd-editor-error":""),"data-editor-id":n,children:[(0,u.jsxs)("div",{className:"sd-top-toolbar-content flex w-full "+(o?"justify-between":"justify-end"),children:[o&&(0,u.jsx)(ty,{required:d,children:o}),(0,u.jsxs)("div",{className:"flex items-center gap-2 w-fit",children:[(0,u.jsxs)(py.Group,{variant:"rounded",size:"xs",children:[(0,u.jsx)(py.Tab,{className:"text-sm font-medium "+("visual"===b?"bg-background-primary text-text-primary shadow-sm":""),text:(0,i.__)("Visual","suredonation"),slug:"visual",ref:$},"visual"),(0,u.jsx)(py.Tab,{className:"text-sm font-medium "+("html"===b?"bg-background-primary text-text-primary shadow-sm":""),text:(0,i.__)("HTML","suredonation"),slug:"html",ref:y},"html")]}),(p.length>0||c.length>0)&&(0,u.jsxs)(Cy,{placement:"bottom-end",className:"min-w-fit",children:[(0,u.jsx)(Cy.Trigger,{children:(0,u.jsx)(Q$,{variant:"outline",size:"sm",icon:(0,u.jsx)(Ty,{}),iconPosition:"right",className:"min-w-fit [&_svg]:shrink-0",children:(0,i.__)("Add Tag","suredonation")})}),(0,u.jsx)(Cy.Portal,{id:"suredonation-dialog-root",children:(0,u.jsx)(Cy.ContentWrapper,{children:(0,u.jsx)(Cy.Content,{className:"w-60 max-h-80 overflow-y-auto",children:(0,u.jsx)(Cy.List,{children:p.length>0?p.map((e,t)=>(0,u.jsxs)("div",{children:[(0,u.jsx)(ty,{variant:"help",size:"xs",className:"p-2 text-text-primary font-medium text-sm",tabIndex:-1,children:e.label}),e.tags.map(e=>(0,u.jsx)(Cy.Item,{className:"text-sm font-normal text-text-secondary hover:bg-background-secondary hover:text-text-primary focus:bg-background-secondary focus:text-text-primary",onClick:()=>A(e.tag),children:e.title||e.tag},e.tag))]},e.label||t)):c.map(e=>(0,u.jsx)(Cy.Item,{className:"text-sm font-normal text-text-secondary hover:bg-background-secondary hover:text-text-primary focus:bg-background-secondary focus:text-text-primary",onClick:()=>A(e.tag),children:e.title||e.tag},e.tag))})})})})]})]})]}),(0,u.jsx)("textarea",{className:"sd-tinymce-editor-textarea w-full border-none border-0 focus:border-border-subtle focus:outline-none focus:ring-0 resize-none",id:n,value:f,onChange:e=>E(e.target.value)})]})},Dy=({open:e,setOpen:t,content:n,onChange:o,onSave:r,onCancel:s,editorId:a})=>{const[d,c]=(0,l.useState)(null);return(0,l.useLayoutEffect)(()=>{let e=document.getElementById("suredonation-dialog-root");e||(e=document.createElement("div"),e.id="suredonation-dialog-root",document.body.appendChild(e)),c(e)},[]),d?(0,l.createPortal)((0,u.jsxs)($$,{design:"simple",exitOnEsc:!0,scrollLock:!0,open:e,setOpen:t,children:[(0,u.jsx)($$.Backdrop,{}),(0,u.jsx)($$.Panel,{className:"size-[90%] max-w-[784px] max-h-[592px] m-auto z-99999",children:(0,u.jsxs)(Z$,{direction:"column",gap:"none",className:"w-full h-full p-3 gap-2 rounded-xl bg-background-primary border border-solid border-border-subtle shadow-2xl",children:[(0,u.jsxs)(Z$,{justify:"between",align:"center",className:"p-2 gap-2",children:[(0,u.jsx)(J$,{title:(0,i.__)("HTML Code Block","suredonation"),size:"xs"}),(0,u.jsx)(Q$,{onClick:s,icon:(0,u.jsx)(ey,{size:16}),variant:"ghost",size:"xs"})]}),(0,u.jsx)("div",{className:"p-2 flex-1 min-h-0 overflow-y-auto",children:(0,u.jsx)(Ny,{content:n,handleContentChange:o,editorId:a,height:320,defaultTab:"html"})}),(0,u.jsxs)("div",{className:"flex justify-end gap-3 p-2",children:[(0,u.jsx)(Q$,{onClick:s,variant:"outline",size:"md",children:(0,i.__)("Cancel","suredonation")}),(0,u.jsx)(Q$,{onClick:r,variant:"primary",size:"md",children:(0,i.__)("Save","suredonation")})]})]})})]}),d):null},My=/<\s*\/?\s*form[^>]*>/i,Ry=JSON.parse('{"UU":"suredonation/html"}');function jy(e){return ye({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M258 21.89c-.5 0-1.2 0-1.8.12-4.6.85-10.1 5.1-13.7 14.81-3.8 9.7-4.6 23.53-1.3 38.34 3.4 14.63 10.4 27.24 18.2 34.94 7.6 7.7 14.5 9.8 19.1 9 4.8-.7 10.1-5.1 13.7-14.7 3.8-9.64 4.8-23.66 1.4-38.35-3.5-14.8-10.4-27.29-18.2-34.94-6.6-6.8-12.7-9.22-17.4-9.22zM373.4 151.4c-11 .3-24.9 3.2-38.4 8.9-15.6 6.8-27.6 15.9-34.2 24.5-6.6 8.3-7.2 14.6-5.1 18.3 2.2 3.7 8.3 7.2 20 7.7 11.7.7 27.5-2.2 43-8.8 15.5-6.7 27.7-15.9 34.3-24.3 6.6-8.3 7.1-14.8 5-18.5-2.1-3.8-8.3-7.1-20-7.5-1.6-.3-3-.3-4.6-.3zm-136.3 92.9c-6.6.1-12.6.9-18 2.3-11.8 3-18.6 8.4-20.8 14.9-2.5 6.5 0 14.3 7.8 22.7 8.2 8.2 21.7 16.1 38.5 20.5 16.7 4.4 32.8 4.3 44.8 1.1 12.1-3.1 18.9-8.6 21.1-15 2.3-6.5 0-14.2-8.1-22.7-7.9-8.2-21.4-16.1-38.2-20.4-9.5-2.5-18.8-3.5-27.1-3.4zm160.7 58.1L336 331.7c4.2.2 14.7.5 14.7.5l6.6 8.7 54.7-28.5-14.2-10zm-54.5.1l-57.4 27.2c5.5.3 18.5.5 23.7.8l49.8-23.6-16.1-4.4zm92.6 10.8l-70.5 37.4 14.5 18.7 74.5-44.6-18.5-11.5zm-278.8 9.1a40.33 40.33 0 0 0-9 1c-71.5 16.5-113.7 17.9-126.2 17.9H18v107.5s11.6-1.7 30.9-1.8c37.3 0 103 6.4 167 43.8 3.4 2.1 10.7 2.9 19.8 2.9 24.3 0 61.2-5.8 69.7-9C391 452.6 494 364.5 494 364.5l-32.5-28.4s-79.8 50.9-89.9 55.8c-91.1 44.7-164.9 16.8-164.9 16.8s119.9 3 158.4-27.3l-22.6-34s-82.8-2.3-112.3-6.2c-15.4-2-48.7-18.8-73.1-18.8z"}}]})(e)}(0,s.registerBlockType)(Ry.UU,{icon:function(e){return ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"}}]})(e)},edit:({attributes:e,setAttributes:t,clientId:r})=>{const{block_id:s,htmlContent:a,label:d,fieldWidth:c}=e,p=(0,n.useBlockProps)({className:`sd-block sd-html-block sd-block-width-${c}`}),[h,m]=(0,l.useState)(!1),[b,$]=(0,l.useState)(a||""),y=My.test(a||""),x=(0,v.useSelect)(e=>e("core/editor")?.getCurrentPostId()||0,[]);(0,l.useEffect)(()=>{s||t({block_id:g()})},[s,t]),(0,l.useEffect)(()=>{x&&e.formId!==x&&t({formId:x})},[x,e.formId,t]);const w=()=>{$(a||""),m(!1)};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsxs)(L,{tabs:["general","advance"],children:[(0,u.jsx)(B,{...F,children:(0,u.jsx)("p",{className:"sd-control-label",children:(0,i.__)("Add custom HTML in the block. It is sanitized on output and rendered on the published form. The block carries no submission value.","suredonation")})}),(0,u.jsx)(B,{...V})]})}),(0,u.jsxs)("div",{...p,children:[(0,u.jsx)(n.RichText,{tagName:"label",value:d,onChange:e=>t({label:f(e)}),className:"sd-label",multiline:!1,allowedFormats:[],placeholder:(0,i.__)("HTML Block","suredonation")}),(0,u.jsxs)("div",{className:"sd-html-block-placeholder",children:[y&&(0,u.jsx)(o.Notice,{status:"warning",isDismissible:!1,children:(0,i.__)("Form tags are not allowed and will be removed on the published form.","suredonation")}),(0,u.jsx)("p",{children:(0,i.__)("Add your custom HTML here. It will show on the published form. The block label is only visible in the editor for your reference and won't appear on the live form.","suredonation")}),(0,u.jsx)("button",{type:"button",className:"sd-edit-html-button",onClick:()=>{$(a||""),m(!0)},children:(0,i.__)("Edit HTML Content","suredonation")})]})]}),h&&(0,u.jsx)(Dy,{open:h,setOpen:e=>e?m(!0):w(),content:b,onChange:e=>$(e),onSave:()=>{t({htmlContent:b}),m(!1)},onCancel:w,editorId:`sd-html-block-editor-${r}`})]})},save:()=>null});var Oy=r(8610),Ly={};Oy.A&&Oy.A.locals&&(Ly.locals=Oy.A.locals);var By,Fy=0,Vy={attributes:{id:"suredonation-editor-styles"}};Vy.setAttributes=E(),Vy.insert=S().bind(null,"head"),Vy.domAPI=w(),Vy.insertStyleElement=A(),Ly.use=function(e){return Vy.options=e||{},Fy++||(By=y()(Oy.A,Vy)),Ly},Ly.unuse=function(){Fy>0&&! --Fy&&(By(),By=null)};const Uy=Ly,zy=[{label:(0,i.__)("Horizontal","suredonation"),value:"horizontal"},{label:(0,i.__)("Vertical","suredonation"),value:"vertical"}],Gy=[{label:"25%",value:"25"},{label:"33%",value:"33.33"},{label:"50%",value:"50"},{label:"100%",value:"100"}],Hy=e=>{const t=(e||"").trim();return""!==t&&/^\d+(\.\d+)?$/.test(t)?(window.suredonationFormEditor?.currencySymbol||"$")+t:e},Wy=e=>{if(!e)return"";const t=String(e).replace(/[^\d.]/g,""),n=t.indexOf(".");if(-1===n)return t;let o=t.slice(0,n+1)+t.slice(n+1).replace(/\./g,"");return o.startsWith(".")&&(o="0"+o),o},Ky=(0,u.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,u.jsx)("path",{d:"M7.99967 14.6668C11.6816 14.6668 14.6663 11.6821 14.6663 8.00016C14.6663 4.31826 11.6816 1.3335 7.99967 1.3335C4.31778 1.3335 1.33301 4.31826 1.33301 8.00016C1.33301 11.6821 4.31778 14.6668 7.99967 14.6668Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),qy=(0,u.jsxs)("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,u.jsx)("path",{d:"M15.1663 7.38674V8.00007C15.1655 9.43769 14.7 10.8365 13.8392 11.988C12.9785 13.1394 11.7685 13.9817 10.3899 14.3893C9.0113 14.797 7.53785 14.748 6.18932 14.2498C4.8408 13.7516 3.68944 12.8308 2.90698 11.6248C2.12452 10.4188 1.75287 8.99211 1.84746 7.55761C1.94205 6.12312 2.49781 4.75762 3.43186 3.66479C4.36591 2.57195 5.6282 1.81033 7.03047 1.4935C8.43274 1.17668 9.89985 1.32163 11.213 1.90674",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M15.1667 2.6665L8.5 9.33984L6.5 7.33984",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]}),Yy=e=>e?qy:Ky,Zy=JSON.parse('{"UU":"suredonation/donation-amount"}'),Xy=(0,u.jsx)(jy,{});function Jy(e){return Jy="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},Jy(e)}function Qy(e){var t=function(e){if("object"!=Jy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Jy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Jy(t)?t:t+""}function ex(e,t,n){return(t=Qy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function nx(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=Array(t);n{const{block_id:r,label:s,help:a,required:d,errorMsg:c,options:p,defaultValue:h,layout:m,choiceWidth:$,fieldWidth:y,allowCustomAmount:x,customAmountMin:w,customAmountMax:C}=e,[S,_]=(0,l.useState)("");(0,l.useLayoutEffect)(()=>(Uy?.use(),()=>{Uy?.unuse()}),[]);const E=(0,n.useBlockProps)({className:`sd-block sd-donation-amount-block sd-block-width-${y}`}),I="vertical"===m?" sd-vertical-layout":"",A=`sd-block-wrap sd-donation-amount-wrap${$?` sd-choice-width-${$.replace(".","-")}`:" sd-choice-width-50"}${I}`,P=(0,v.useSelect)(e=>e("core/editor")?.getCurrentPostId()||0,[]);(0,l.useEffect)(()=>{r||t({block_id:g()})},[r,t]),(0,l.useEffect)(()=>{p.some(e=>!e.id)&&t({options:p.map(e=>e.id?e:{...e,id:g()})})},[p,t]),(0,l.useEffect)(()=>{P&&e.formId!==P&&t({formId:P})},[P,e.formId,t]);const k=e=>{const n=Wy(e);if(!n)return;const o=[...p,{label:n,value:n,id:g()}];t({options:o}),_("")},T=e=>{const n=p.filter((t,n)=>n!==e);t({options:n})},N=e=>{const t=p[e].value||p[e].label;return h===t};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsxs)(L,{tabs:["general","advance"],children:[(0,u.jsxs)(B,{...F,children:[(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Required","suredonation"),checked:d,onChange:e=>t({required:e})}),d&&(0,u.jsx)(ce,{label:(0,i.__)("Error Message","suredonation"),value:c,onChange:e=>t({errorMsg:e})}),(0,u.jsx)(ce,{label:(0,i.__)("Help Text","suredonation"),variant:"textarea",value:a,onChange:e=>t({help:e})}),(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Custom Amount","suredonation"),checked:!!x,onChange:e=>t({allowCustomAmount:e}),help:(0,i.__)("Show a custom amount input after the preset options.","suredonation")}),x&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ce,{label:(0,i.__)("Minimum Amount","suredonation"),type:"number",value:w,onChange:e=>t({customAmountMin:parseFloat(e)||0}),help:(0,i.__)("0 means no minimum.","suredonation")}),(0,u.jsx)(ce,{label:(0,i.__)("Maximum Amount","suredonation"),type:"number",value:C,onChange:e=>t({customAmountMax:parseFloat(e)||0}),help:(0,i.__)("0 means no maximum.","suredonation")})]}),(0,u.jsx)("span",{className:"sd-control-label sd-control__header",children:(0,i.__)("Edit Options","suredonation")}),p.map((e,n)=>(0,u.jsxs)("div",{className:"sd-option-outer-wrapper",children:[(0,u.jsx)("div",{className:"sd-preselection-control",children:(0,u.jsx)("input",{type:"radio",checked:N(n),onChange:()=>(e=>{const n=p[e].value||p[e].label;t({defaultValue:h===n?"":n})})(n),title:(0,i.__)("Preselect this option","suredonation"),"aria-label":(0,i.__)("Preselect this option","suredonation")})}),(0,u.jsx)("div",{className:"sd-option-outer-text-control",children:(0,u.jsx)(ce,{showHeaderControls:!1,type:"number",value:e.label,onChange:e=>{const o=Wy(e);if(""===o)return void T(n);const r=[...p];r[n]={...r[n],label:o,value:o},t({options:r})}})}),(0,u.jsx)("div",{className:"sd-options-delete",children:(0,u.jsx)(je,{style:{width:"20px",height:"20px",color:"#6B7280",cursor:"pointer"},onClick:()=>T(n)})})]},e.id||n)),(0,u.jsxs)("div",{className:"sd-add-option-container",onKeyDown:e=>{"Enter"===e.key&&S&&k(S)},children:[(0,u.jsx)(ce,{showHeaderControls:!1,type:"number",label:(0,i.__)("Add New Option","suredonation"),value:S,onChange:e=>_(Wy(e))}),(0,u.jsx)(o.Button,{className:"sd-add-option-button",variant:"secondary",onClick:()=>k(S),children:(0,i.__)("ADD","suredonation")})]}),(0,u.jsx)(Y,{label:(0,i.__)("Options Layout","suredonation"),options:zy,value:m,onChange:e=>t({layout:e})}),(0,u.jsx)(Y,{label:(0,i.__)("Choice Width","suredonation"),options:Gy,value:$,onChange:e=>t({choiceWidth:e})})]}),(0,u.jsx)(B,{...V})]})}),(0,u.jsx)("div",{...E,children:(0,u.jsxs)("div",{className:"sd-block-single",children:[(0,u.jsx)(n.RichText,{tagName:"label",value:s,onChange:e=>t({label:f(e)}),className:"sd-label"+(d?" sd-required":""),multiline:!1,allowedFormats:[],placeholder:(0,i.__)("Label","suredonation")}),(0,u.jsx)(b,{help:a,setAttributes:t,block_id:r}),(0,u.jsxs)("div",{className:A,children:[p.map((e,t)=>{const n=N(t);return(0,u.jsx)("div",{className:"sd-donation-amount-single"+(n?" sd-selected":""),children:(0,u.jsxs)("div",{className:"sd-block-content-wrap",children:[(0,u.jsx)("div",{className:"sd-option-container",children:(0,u.jsx)("p",{children:Hy(e.label)})}),(0,u.jsxs)("div",{className:"sd-icon-container",children:[(0,u.jsx)("span",{className:"sd-donation-amount-icon",children:Yy(!0)}),(0,u.jsx)("span",{className:"sd-donation-amount-icon-unchecked",children:Yy(!1)})]})]})},e.id||t)}),x&&(0,u.jsx)("div",{className:"sd-donation-amount-single sd-donation-amount-custom",children:(0,u.jsx)("input",{type:"number",className:"sd-input-common sd-donation-amount-custom-input",placeholder:(0,i.__)("Enter custom amount","suredonation"),readOnly:!0})})]}),(0,u.jsx)("div",{className:"sd-error-wrap"})]})})]})},save:()=>null});var ax=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function dx(e,t){for(var n=0;n0?yx(Tx,--Px):0,Ix--,10===kx&&(Ix=1,Ex--),kx}function Rx(){return kx=Px2||Bx(kx)>3?"":" "}function Gx(e,t){for(;--t&&Rx()&&!(kx<48||kx>102||kx>57&&kx<65||kx>70&&kx<97););return Lx(e,Ox()+(t<6&&32==jx()&&32==Rx()))}function Hx(e){for(;Rx();)switch(kx){case e:return Px;case 34:case 39:34!==e&&39!==e&&Hx(kx);break;case 40:41===e&&Hx(e);break;case 92:Rx()}return Px}function Wx(e,t){for(;Rx()&&e+kx!==57&&(e+kx!==84||47!==jx()););return"/*"+Lx(t,Px-1)+"*"+fx(47===e?e:Rx())}function Kx(e){for(;!Bx(jx());)Rx();return Lx(e,Px)}var qx="-ms-",Yx="-moz-",Zx="-webkit-",Xx="comm",Jx="rule",Qx="decl",ew="@keyframes";function tw(e,t){for(var n="",o=Cx(e),r=0;r0&&wx(C)-u&&Sx(h>32?aw(C+";",o,n,u-1):aw(vx(C," ","")+";",o,n,u-2),d);break;case 59:C+=";";default:if(Sx(w=iw(C,t,n,l,c,r,a,$,y=[],x=[],u),i),123===v)if(0===c)rw(C,t,w,w,y,i,u,a,x);else switch(99===p&&110===yx(C,3)?100:p){case 100:case 108:case 109:case 115:rw(e,w,w,o&&Sx(iw(e,w,w,0,0,r,a,$,r,y=[],u),x),r,x,u,a,o?y:x);break;default:rw(C,w,w,w,[""],x,0,a,x)}}l=c=h=0,f=b=1,$=C="",u=s;break;case 58:u=1+wx(C),h=m;default:if(f<1)if(123==v)--f;else if(125==v&&0==f++&&125==Mx())continue;switch(C+=fx(v),v*f){case 38:b=c>0?1:(C+="\f",-1);break;case 44:a[l++]=(wx(C)-1)*b,b=1;break;case 64:45===jx()&&(C+=Ux(Rx())),p=jx(),c=u=wx($=C+=Kx(Ox())),v++;break;case 45:45===m&&2==wx(C)&&(f=0)}}return i}function iw(e,t,n,o,r,i,s,a,d,l,c){for(var u=r-1,p=0===r?i:[""],h=Cx(p),m=0,f=0,g=0;m0?p[b]+" "+v:vx(v,/&\f/g,p[b])))&&(d[g++]=$);return Nx(e,t,n,0===r?Jx:a,d,l,c)}function sw(e,t,n){return Nx(e,t,n,Xx,fx(kx),xx(e,2,-2),0)}function aw(e,t,n,o){return Nx(e,t,n,Qx,xx(e,0,o),xx(e,o+1,-1),o)}var dw=function(e,t,n){for(var o=0,r=0;o=r,r=jx(),38===o&&12===r&&(t[n]=1),!Bx(r);)Rx();return Lx(e,Px)},lw=new WeakMap,cw=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||lw.get(n))&&!o){lw.set(e,!0);for(var r=[],i=function(e,t){return Vx(function(e,t){var n=-1,o=44;do{switch(Bx(o)){case 0:38===o&&12===jx()&&(t[n]=1),e[n]+=dw(Px-1,t,n);break;case 2:e[n]+=Ux(o);break;case 4:if(44===o){e[++n]=58===jx()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=fx(o)}}while(o=Rx());return e}(Fx(e),t))}(t,r),s=n.props,a=0,d=0;a6)switch(yx(e,t+1)){case 109:if(45!==yx(e,t+4))break;case 102:return vx(e,/(.+:)(.+)-([^]+)/,"$1"+Zx+"$2-$3$1"+Yx+(108==yx(e,t+3)?"$3":"$2-$3"))+e;case 115:return~$x(e,"stretch")?pw(vx(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==yx(e,t+1))break;case 6444:switch(yx(e,wx(e)-3-(~$x(e,"!important")&&10))){case 107:return vx(e,":",":"+Zx)+e;case 101:return vx(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Zx+(45===yx(e,14)?"inline-":"")+"box$3$1"+Zx+"$2$3$1"+qx+"$2box$3")+e}break;case 5936:switch(yx(e,t+11)){case 114:return Zx+e+qx+vx(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Zx+e+qx+vx(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Zx+e+qx+vx(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Zx+e+qx+e+e}return e}var hw=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case Qx:e.return=pw(e.value,e.length);break;case ew:return tw([Dx(e,{value:vx(e.value,"@","@"+Zx)})],o);case Jx:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return tw([Dx(e,{props:[vx(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return tw([Dx(e,{props:[vx(t,/:(plac\w+)/,":"+Zx+"input-$1")]}),Dx(e,{props:[vx(t,/:(plac\w+)/,":-moz-$1")]}),Dx(e,{props:[vx(t,/:(plac\w+)/,qx+"input-$1")]})],o)}return""})}}],mw=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var o,r,i=e.stylisPlugins||hw,s={},a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++o,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(r){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(r)+d;return{name:l,styles:r,next:_w}}var Aw,Pw,kw=!!he.useInsertionEffect&&he.useInsertionEffect,Tw=kw||function(e){return e()},Nw=(kw||he.useLayoutEffect,he.createContext("undefined"!=typeof HTMLElement?mw({key:"css"}):null)),Dw=(Nw.Provider,function(e){return(0,he.forwardRef)(function(t,n){var o=(0,he.useContext)(Nw);return e(t,o,n)})}),Mw=he.createContext({}),Rw={}.hasOwnProperty,jw="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Ow=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;return fw(t,n,o),Tw(function(){return function(e,t,n){fw(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+o:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}(t,n,o)}),null},Lw=Dw(function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var r=e[jw],i=[o],s="";"string"==typeof e.className?s=function(e,t,n){var o="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(o+=n+" ")}),o}(t.registered,i,e.className):null!=e.className&&(s=e.className+" ");var a=Iw(i,void 0,he.useContext(Mw));s+=t.key+"-"+a.name;var d={};for(var l in e)Rw.call(e,l)&&"css"!==l&&l!==jw&&(d[l]=e[l]);return d.className=s,n&&(d.ref=n),he.createElement(he.Fragment,null,he.createElement(Ow,{cache:t,serialized:a,isStringTag:"string"==typeof r}),he.createElement(r,d))}),Bw=(r(4146),function(e,t){var n=arguments;if(null==t||!Rw.call(t,"css"))return he.createElement.apply(void 0,n);var o=n.length,r=new Array(o);r[0]=Lw,r[1]=function(e,t){var n={};for(var o in t)Rw.call(t,o)&&(n[o]=t[o]);return n[jw]=e,n}(e,t);for(var i=2;i2?n-2:0),r=2;r-1}function Zw(e){return Yw(e)?window.pageYOffset:e.scrollTop}function Xw(e,t){Yw(e)?window.scrollTo(0,t):e.scrollTop=t}function Jw(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:zw,r=Zw(e),i=t-r,s=0;!function t(){var a=function(e,t,n,o){return n*((e=e/o-1)*e*e+1)+t}(s+=10,r,i,n);Xw(e,a),sn.bottom?Xw(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):o.top-r=m)return{placement:"bottom",maxHeight:t};if(S>=m&&!s)return i&&Jw(d,_,I),{placement:"bottom",maxHeight:t};if(!s&&S>=o||s&&w>=o)return i&&Jw(d,_,I),{placement:"bottom",maxHeight:s?w-$:S-$};if("auto"===r||s){var A=t,P=s?x:C;return P>=o&&(A=Math.min(P-$-a,t)),{placement:"top",maxHeight:A}}if("bottom"===r)return i&&Xw(d,_),{placement:"bottom",maxHeight:t};break;case"top":if(x>=m)return{placement:"top",maxHeight:t};if(C>=m&&!s)return i&&Jw(d,E,I),{placement:"top",maxHeight:t};if(!s&&C>=o||s&&x>=o){var k=t;return(!s&&C>=o||s&&x>=o)&&(k=s?x-y:C-y),i&&Jw(d,E,I),{placement:"top",maxHeight:k}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return l}({maxHeight:o,menuEl:e,minHeight:n,placement:r,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:g});p(a.maxHeight),f(a.placement),null==d||d(a.placement)}},[o,r,i,s,n,d,g]),t({ref:l,placerProps:nx(nx({},e),{},{placement:m||pC(r),maxHeight:u})})},fC=function(e,t){var n=e.theme,o=n.spacing.baseUnit,r=n.colors;return nx({textAlign:"center"},t?{}:{color:r.neutral40,padding:"".concat(2*o,"px ").concat(3*o,"px")})},gC=fC,bC=fC,vC=["size"],$C=["innerProps","isRtl","size"],yC={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},xC=function(e){var t=e.size,n=sx(e,vC);return Bw("svg",Qt({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:yC},n))},wC=function(e){return Bw(xC,Qt({size:20},e),Bw("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},CC=function(e){return Bw(xC,Qt({size:20},e),Bw("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},SC=function(e,t){var n=e.isFocused,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return nx({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*r,":hover":{color:n?i.neutral80:i.neutral40}})},_C=SC,EC=SC,IC=function(){var e=Fw.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(lC||(cC=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],uC||(uC=cC.slice(0)),lC=Object.freeze(Object.defineProperties(cC,{raw:{value:Object.freeze(uC)}})))),AC=function(e){var t=e.delay,n=e.offset;return Bw("span",{css:Fw({animation:"".concat(IC," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},PC=["data"],kC=["innerRef","isDisabled","isHidden","inputClassName"],TC={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},NC={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":nx({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},TC)},DC=function(e){return nx({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},TC)},MC=function(e){var t=e.children,n=e.innerProps;return Bw("div",n,t)},RC={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Bw("div",Qt({},qw(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Bw(wC,null))},Control:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.innerRef,i=e.innerProps,s=e.menuIsOpen;return Bw("div",Qt({ref:r},qw(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":o,"control--menu-is-open":s}),i,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Bw("div",Qt({},qw(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Bw(CC,null))},DownChevron:CC,CrossIcon:wC,Group:function(e){var t=e.children,n=e.cx,o=e.getStyles,r=e.getClassNames,i=e.Heading,s=e.headingProps,a=e.innerProps,d=e.label,l=e.theme,c=e.selectProps;return Bw("div",Qt({},qw(e,"group",{group:!0}),a),Bw(i,Qt({},s,{selectProps:c,theme:l,getStyles:o,getClassNames:r,cx:n}),d),Bw("div",null,t))},GroupHeading:function(e){var t=Kw(e);t.data;var n=sx(t,PC);return Bw("div",Qt({},qw(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Bw("div",Qt({},qw(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Bw("span",Qt({},t,qw(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,o=Kw(e),r=o.innerRef,i=o.isDisabled,s=o.isHidden,a=o.inputClassName,d=sx(o,kC);return Bw("div",Qt({},qw(e,"input",{"input-container":!0}),{"data-value":n||""}),Bw("input",Qt({className:t({input:!0},a),ref:r,style:DC(s),disabled:i},d)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,o=e.size,r=void 0===o?4:o,i=sx(e,$C);return Bw("div",Qt({},qw(nx(nx({},i),{},{innerProps:t,isRtl:n,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Bw(AC,{delay:0,offset:n}),Bw(AC,{delay:160,offset:!0}),Bw(AC,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,o=e.innerProps;return Bw("div",Qt({},qw(e,"menu",{menu:!0}),{ref:n},o),t)},MenuList:function(e){var t=e.children,n=e.innerProps,o=e.innerRef,r=e.isMulti;return Bw("div",Qt({},qw(e,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:o},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,o=e.controlElement,r=e.innerProps,i=e.menuPlacement,s=e.menuPosition,a=(0,he.useRef)(null),d=(0,he.useRef)(null),l=ix((0,he.useState)(pC(i)),2),c=l[0],u=l[1],p=(0,he.useMemo)(function(){return{setPortalPlacement:u}},[]),h=ix((0,he.useState)(null),2),m=h[0],f=h[1],g=(0,he.useCallback)(function(){if(o){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(o),t="fixed"===s?0:window.pageYOffset,n=e[c]+t;n===(null==m?void 0:m.offset)&&e.left===(null==m?void 0:m.rect.left)&&e.width===(null==m?void 0:m.rect.width)||f({offset:n,rect:e})}},[o,s,c,null==m?void 0:m.offset,null==m?void 0:m.rect.left,null==m?void 0:m.rect.width]);Vw(function(){g()},[g]);var b=(0,he.useCallback)(function(){"function"==typeof d.current&&(d.current(),d.current=null),o&&a.current&&(d.current=Yb(o,a.current,g,{elementResize:"ResizeObserver"in window}))},[o,g]);Vw(function(){b()},[b]);var v=(0,he.useCallback)(function(e){a.current=e,b()},[b]);if(!t&&"fixed"!==s||!m)return null;var $=Bw("div",Qt({ref:v},qw(nx(nx({},e),{},{offset:m.offset,position:s,rect:m.rect}),"menuPortal",{"menu-portal":!0}),r),n);return Bw(hC.Provider,{value:p},t?(0,Oe.createPortal)($,t):$)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,o=e.innerProps,r=sx(e,dC);return Bw("div",Qt({},qw(nx(nx({},r),{},{children:n,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,o=e.innerProps,r=sx(e,aC);return Bw("div",Qt({},qw(nx(nx({},r),{},{children:n,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),n)},MultiValue:function(e){var t=e.children,n=e.components,o=e.data,r=e.innerProps,i=e.isDisabled,s=e.removeProps,a=e.selectProps,d=n.Container,l=n.Label,c=n.Remove;return Bw(d,{data:o,innerProps:nx(nx({},qw(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),r),selectProps:a},Bw(l,{data:o,innerProps:nx({},qw(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:a},t),Bw(c,{data:o,innerProps:nx(nx({},qw(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},s),selectProps:a}))},MultiValueContainer:MC,MultiValueLabel:MC,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Bw("div",Qt({role:"button"},n),t||Bw(wC,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.innerRef,s=e.innerProps;return Bw("div",Qt({},qw(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":o,"option--is-selected":r}),{ref:i,"aria-disabled":n},s),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Bw("div",Qt({},qw(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,o=e.isDisabled,r=e.isRtl;return Bw("div",Qt({},qw(e,"container",{"--is-disabled":o,"--is-rtl":r}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,o=e.innerProps;return Bw("div",Qt({},qw(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),o),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,o=e.isMulti,r=e.hasValue;return Bw("div",Qt({},qw(e,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":r}),n),t)}},jC=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function OC(e,t){return e===t||!(!jC(e)||!jC(t))}function LC(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return"option ".concat(o,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,o=e.options,r=e.label,i=void 0===r?"":r,s=e.selectValue,a=e.isDisabled,d=e.isSelected,l=e.isAppleDevice,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&s)return"value ".concat(i," focused, ").concat(c(s,n),".");if("menu"===t&&l){var u=a?" disabled":"",p="".concat(d?" selected":"").concat(u);return"".concat(i).concat(p,", ").concat(c(o,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},UC=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,r=e.focusableOptions,i=e.isFocused,s=e.selectValue,a=e.selectProps,d=e.id,l=e.isAppleDevice,c=a.ariaLiveMessages,u=a.getOptionLabel,p=a.inputValue,h=a.isMulti,m=a.isOptionDisabled,f=a.isSearchable,g=a.menuIsOpen,b=a.options,v=a.screenReaderStatus,$=a.tabSelectsValue,y=a.isLoading,x=a["aria-label"],w=a["aria-live"],C=(0,he.useMemo)(function(){return nx(nx({},VC),c||{})},[c]),S=(0,he.useMemo)(function(){var e,n="";if(t&&C.onChange){var o=t.option,r=t.options,i=t.removedValue,a=t.removedValues,d=t.value,l=i||o||(e=d,Array.isArray(e)?null:e),c=l?u(l):"",p=r||a||void 0,h=p?p.map(u):[],f=nx({isDisabled:l&&m(l,s),label:c,labels:h},t);n=C.onChange(f)}return n},[t,C,m,s,u]),_=(0,he.useMemo)(function(){var e="",t=n||o,i=!!(n&&s&&s.includes(n));if(t&&C.onFocus){var a={focused:t,label:u(t),isDisabled:m(t,s),isSelected:i,options:r,context:t===n?"menu":"value",selectValue:s,isAppleDevice:l};e=C.onFocus(a)}return e},[n,o,u,m,C,r,s,l]),E=(0,he.useMemo)(function(){var e="";if(g&&b.length&&!y&&C.onFilter){var t=v({count:r.length});e=C.onFilter({inputValue:p,resultsMessage:t})}return e},[r,p,g,C,b,v,y]),I="initial-input-focus"===(null==t?void 0:t.action),A=(0,he.useMemo)(function(){var e="";if(C.guidance){var t=o?"value":g?"menu":"input";e=C.guidance({"aria-label":x,context:t,isDisabled:n&&m(n,s),isMulti:h,isSearchable:f,tabSelectsValue:$,isInitialFocus:I})}return e},[x,n,o,h,m,f,g,C,s,$,I]),P=Bw(he.Fragment,null,Bw("span",{id:"aria-selection"},S),Bw("span",{id:"aria-focused"},_),Bw("span",{id:"aria-results"},E),Bw("span",{id:"aria-guidance"},A));return Bw(he.Fragment,null,Bw(FC,{id:d},I&&P),Bw(FC,{"aria-live":w,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!I&&P))},zC=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],GC=new RegExp("["+zC.map(function(e){return e.letters}).join("")+"]","g"),HC={},WC=0;WC1?t-1:0),o=1;o0,f=u-p-c,g=!1;f>t&&s.current&&(o&&o(e),s.current=!1),m&&a.current&&(i&&i(e),a.current=!1),m&&t>f?(n&&!s.current&&n(e),h.scrollTop=u,g=!0,s.current=!0):!m&&-t>c&&(r&&!a.current&&r(e),h.scrollTop=0,g=!0,a.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}},[n,o,r,i]),u=(0,he.useCallback)(function(e){c(e,e.deltaY)},[c]),p=(0,he.useCallback)(function(e){d.current=e.changedTouches[0].clientY},[]),h=(0,he.useCallback)(function(e){var t=d.current-e.changedTouches[0].clientY;c(e,t)},[c]),m=(0,he.useCallback)(function(e){if(e){var t=!!rC&&{passive:!1};e.addEventListener("wheel",u,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",h,t)}},[h,p,u]),f=(0,he.useCallback)(function(e){e&&(e.removeEventListener("wheel",u,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",h,!1))},[h,p,u]);return(0,he.useEffect)(function(){if(t){var e=l.current;return m(e),function(){f(e)}}},[t,m,f]),function(e){l.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,r=(0,he.useRef)({}),i=(0,he.useRef)(null),s=(0,he.useCallback)(function(e){if(aS){var t=document.body,n=t&&t.style;if(o&&tS.forEach(function(e){var t=n&&n[e];r.current[e]=t}),o&&dS<1){var i=parseInt(r.current.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,a=window.innerWidth-s+i||0;Object.keys(nS).forEach(function(e){var t=nS[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(a,"px"))}t&&sS()&&(t.addEventListener("touchmove",oS,lS),e&&(e.addEventListener("touchstart",iS,lS),e.addEventListener("touchmove",rS,lS))),dS+=1}},[o]),a=(0,he.useCallback)(function(e){if(aS){var t=document.body,n=t&&t.style;dS=Math.max(dS-1,0),o&&dS<1&&tS.forEach(function(e){var t=r.current[e];n&&(n[e]=t)}),t&&sS()&&(t.removeEventListener("touchmove",oS,lS),e&&(e.removeEventListener("touchstart",iS,lS),e.removeEventListener("touchmove",rS,lS)))}},[o]);return(0,he.useEffect)(function(){if(t){var e=i.current;return s(e),function(){a(e)}}},[t,s,a]),function(e){i.current=e}}({isEnabled:n});return Bw(he.Fragment,null,n&&Bw("div",{onClick:cS,css:uS}),t(function(e){r(e),i(e)}))}var hS={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},mS=function(e){var t=e.name,n=e.onFocus;return Bw("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:hS,value:"",onChange:function(){}})};function fS(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function gS(){return fS(/^Mac/i)}var bS={clearIndicator:EC,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.theme,i=r.colors,s=r.borderRadius;return nx({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:o?i.primary:i.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},dropdownIndicator:_C,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,o=n.colors,r=n.spacing;return nx({label:"group",cursor:"default",display:"block"},t?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*r.baseUnit,paddingRight:3*r.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return nx({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r})},input:function(e,t){var n=e.isDisabled,o=e.value,r=e.theme,i=r.spacing,s=r.colors;return nx(nx({visibility:n?"hidden":"visible",transform:o?"translateZ(0)":""},NC),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:s.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,o=e.size,r=e.theme,i=r.colors,s=r.spacing.baseUnit;return nx({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*s})},loadingMessage:bC,menu:function(e,t){var n,o=e.placement,r=e.theme,i=r.borderRadius,s=r.spacing,a=r.colors;return nx((ex(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(o),"100%"),ex(n,"position","absolute"),ex(n,"width","100%"),ex(n,"zIndex",1),n),t?{}:{backgroundColor:a.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},menuList:function(e,t){var n=e.maxHeight,o=e.theme.spacing.baseUnit;return nx({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:o,paddingTop:o})},menuPortal:function(e){var t=e.rect,n=e.offset,o=e.position;return{left:t.left,position:o,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors;return nx({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:r/2,margin:o.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,o=n.borderRadius,r=n.colors,i=e.cropWithEllipsis;return nx({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:o/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors,s=e.isFocused;return nx({alignItems:"center",display:"flex"},t?{}:{borderRadius:r/2,backgroundColor:s?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:gC,option:function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.theme,s=i.spacing,a=i.colors;return nx({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:r?a.primary:o?a.primary25:"transparent",color:n?a.neutral20:r?a.neutral0:"inherit",padding:"".concat(2*s.baseUnit,"px ").concat(3*s.baseUnit,"px"),":active":{backgroundColor:n?void 0:r?a.primary:a.primary50}})},placeholder:function(e,t){var n=e.theme,o=n.spacing,r=n.colors;return nx({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:r.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing,i=o.colors;return nx({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,o=e.isMulti,r=e.hasValue,i=e.selectProps.controlShouldRenderValue;return nx({alignItems:"center",display:o&&r&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},vS={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},$S={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:eC(),captureMenuScroll:!eC(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=nx({ignoreCase:!0,ignoreAccents:!0,stringify:JC,trim:!0,matchFrom:"any"},void 0),o=n.ignoreCase,r=n.ignoreAccents,i=n.stringify,s=n.trim,a=n.matchFrom,d=s?XC(t):t,l=s?XC(i(e)):i(e);return o&&(d=d.toLowerCase(),l=l.toLowerCase()),r&&(d=ZC(d),l=YC(l)),"start"===a?l.substr(0,d.length)===d:l.indexOf(d)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function yS(e,t,n,o){return{type:"option",data:t,isDisabled:AS(e,t,n),isSelected:PS(e,t,n),label:ES(e,t),value:IS(e,t),index:o}}function xS(e,t){return e.options.map(function(n,o){if("options"in n){var r=n.options.map(function(n,o){return yS(e,n,t,o)}).filter(function(t){return SS(e,t)});return r.length>0?{type:"group",data:n,options:r,index:o}:void 0}var i=yS(e,n,t,o);return SS(e,i)?i:void 0}).filter(iC)}function wS(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,px(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function CS(e,t){return e.reduce(function(e,n){return"group"===n.type?e.push.apply(e,px(n.options.map(function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}}))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e},[])}function SS(e,t){var n=e.inputValue,o=void 0===n?"":n,r=t.data,i=t.isSelected,s=t.label,a=t.value;return(!TS(e)||!i)&&kS(e,{label:s,value:a,data:r},o)}var _S=function(e,t){var n;return(null===(n=e.find(function(e){return e.data===t}))||void 0===n?void 0:n.id)||null},ES=function(e,t){return e.getOptionLabel(t)},IS=function(e,t){return e.getOptionValue(t)};function AS(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function PS(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var o=IS(e,t);return n.some(function(t){return IS(e,t)===o})}function kS(e,t,n){return!e.filterOption||e.filterOption(t,n)}var TS=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},NS=1,DS=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lx(e,t)}(n,e);var t=function(e){var t=ux();return function(){var n,o=cx(e);if(t){var r=cx(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"==Jy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(n);function n(e){var o;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(o=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.controlRef=null,o.getControlRef=function(e){o.controlRef=e},o.focusedOptionRef=null,o.getFocusedOptionRef=function(e){o.focusedOptionRef=e},o.menuListRef=null,o.getMenuListRef=function(e){o.menuListRef=e},o.inputRef=null,o.getInputRef=function(e){o.inputRef=e},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(e,t){var n=o.props,r=n.onChange,i=n.name;t.name=i,o.ariaOnChange(e,t),r(e,t)},o.setValue=function(e,t,n){var r=o.props,i=r.closeMenuOnSelect,s=r.isMulti,a=r.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:a}),i&&(o.setState({inputIsHiddenAfterUpdate:!s}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(e,{action:t,option:n})},o.selectOption=function(e){var t=o.props,n=t.blurInputOnSelect,r=t.isMulti,i=t.name,s=o.state.selectValue,a=r&&o.isOptionSelected(e,s),d=o.isOptionDisabled(e,s);if(a){var l=o.getOptionValue(e);o.setValue(s.filter(function(e){return o.getOptionValue(e)!==l}),"deselect-option",e)}else{if(d)return void o.ariaOnChange(e,{action:"select-option",option:e,name:i});r?o.setValue([].concat(px(s),[e]),"select-option",e):o.setValue(e,"select-option")}n&&o.blurInput()},o.removeValue=function(e){var t=o.props.isMulti,n=o.state.selectValue,r=o.getOptionValue(e),i=n.filter(function(e){return o.getOptionValue(e)!==r}),s=sC(t,i,i[0]||null);o.onChange(s,{action:"remove-value",removedValue:e}),o.focusInput()},o.clearValue=function(){var e=o.state.selectValue;o.onChange(sC(o.props.isMulti,[],null),{action:"clear",removedValues:e})},o.popValue=function(){var e=o.props.isMulti,t=o.state.selectValue,n=t[t.length-1],r=t.slice(0,t.length-1),i=sC(e,r,r[0]||null);n&&o.onChange(i,{action:"pop-value",removedValue:n})},o.getFocusedOptionId=function(e){return _S(o.state.focusableOptionsWithIds,e)},o.getFocusableOptionsWithIds=function(){return CS(xS(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n5||i>5}},o.onTouchEnd=function(e){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(e.target)&&o.menuListRef&&!o.menuListRef.contains(e.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(e){o.userIsDragging||o.onControlMouseDown(e)},o.onClearIndicatorTouchEnd=function(e){o.userIsDragging||o.onClearIndicatorMouseDown(e)},o.onDropdownIndicatorTouchEnd=function(e){o.userIsDragging||o.onDropdownIndicatorMouseDown(e)},o.handleInputChange=function(e){var t=o.props.inputValue,n=e.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(n,{action:"input-change",prevInputValue:t}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(e){o.props.onFocus&&o.props.onFocus(e),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(e){var t=o.props.inputValue;o.menuListRef&&o.menuListRef.contains(document.activeElement)?o.inputRef.focus():(o.props.onBlur&&o.props.onBlur(e),o.onInputChange("",{action:"input-blur",prevInputValue:t}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1}))},o.onOptionHover=function(e){if(!o.blockOptionHover&&o.state.focusedOption!==e){var t=o.getFocusableOptions().indexOf(e);o.setState({focusedOption:e,focusedOptionId:t>-1?o.getFocusedOptionId(e):null})}},o.shouldHideSelectedOptions=function(){return TS(o.props)},o.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),o.focus()},o.onKeyDown=function(e){var t=o.props,n=t.isMulti,r=t.backspaceRemovesValue,i=t.escapeClearsValue,s=t.inputValue,a=t.isClearable,d=t.isDisabled,l=t.menuIsOpen,c=t.onKeyDown,u=t.tabSelectsValue,p=t.openMenuOnFocus,h=o.state,m=h.focusedOption,f=h.focusedValue,g=h.selectValue;if(!(d||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(o.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||s)return;o.focusValue("previous");break;case"ArrowRight":if(!n||s)return;o.focusValue("next");break;case"Delete":case"Backspace":if(s)return;if(f)o.removeValue(f);else{if(!r)return;n?o.popValue():a&&o.clearValue()}break;case"Tab":if(o.isComposing)return;if(e.shiftKey||!l||!u||!m||p&&o.isOptionSelected(m,g))return;o.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(l){if(!m)return;if(o.isComposing)return;o.selectOption(m);break}return;case"Escape":l?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:s}),o.onMenuClose()):a&&i&&o.clearValue();break;case" ":if(s)return;if(!l){o.openMenu("first");break}if(!m)return;o.selectOption(m);break;case"ArrowUp":l?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":l?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!l)return;o.focusOption("pageup");break;case"PageDown":if(!l)return;o.focusOption("pagedown");break;case"Home":if(!l)return;o.focusOption("first");break;case"End":if(!l)return;o.focusOption("last");break;default:return}e.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++NS),o.state.selectValue=Ww(e.value),e.menuIsOpen&&o.state.selectValue.length){var r=o.getFocusableOptionsWithIds(),i=o.buildFocusableOptions(),s=i.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=r,o.state.focusedOption=i[s],o.state.focusedOptionId=_S(r,i[s])}return o}return function(e,t,n){t&&dx(e.prototype,t),n&&dx(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Qw(this.menuListRef,this.focusedOptionRef),(gS()||fS(/^iPhone/i)||fS(/^iPad/i)||gS()&&navigator.maxTouchPoints>1)&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,o=t.menuIsOpen,r=this.state.isFocused;(r&&!n&&e.isDisabled||r&&o&&!e.menuIsOpen)&&this.focusInput(),r&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):r||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Qw(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,o=n.selectValue,r=n.isFocused,i=this.buildFocusableOptions(),s="first"===e?0:i.length-1;if(!this.props.isMulti){var a=i.indexOf(o[0]);a>-1&&(s=a)}this.scrollToFocusedOptionOnUpdate=!(r&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[s],focusedOptionId:this.getFocusedOptionId(i[s])},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,o=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var r=n.indexOf(o);o||(r=-1);var i=n.length-1,s=-1;if(n.length){switch(e){case"previous":s=0===r?0:-1===r?i:r-1;break;case"next":r>-1&&r0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var r=0,i=o.indexOf(n);n||(i=-1),"up"===e?r=i>0?i-1:o.length-1:"down"===e?r=(i+1)%o.length:"pageup"===e?(r=i-t)<0&&(r=0):"pagedown"===e?(r=i+t)>o.length-1&&(r=o.length-1):"last"===e&&(r=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[r],focusedValue:null,focusedOptionId:this.getFocusedOptionId(o[r])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(vS):nx(nx({},vS),this.props.theme):vS}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,o=this.getClassNames,r=this.getValue,i=this.selectOption,s=this.setValue,a=this.props,d=a.isMulti,l=a.isRtl,c=a.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:o,getValue:r,hasValue:this.hasValue(),isMulti:d,isRtl:l,options:c,selectOption:i,selectProps:a,setValue:s,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return AS(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return PS(this.props,e,t)}},{key:"filterOption",value:function(e,t){return kS(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:o})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,r=e.inputValue,i=e.tabIndex,s=e.form,a=e.menuIsOpen,d=e.required,l=this.getComponents().Input,c=this.state,u=c.inputIsHidden,p=c.ariaSelection,h=this.commonProps,m=o||this.getElementId("input"),f=nx(nx(nx({"aria-autocomplete":"list","aria-expanded":a,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":d,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},a&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?he.createElement(l,Qt({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:s,type:"text",value:r},f)):he.createElement(eS,Qt({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:zw,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:s,value:""},f))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,r=t.MultiValueLabel,i=t.MultiValueRemove,s=t.SingleValue,a=t.Placeholder,d=this.commonProps,l=this.props,c=l.controlShouldRenderValue,u=l.isDisabled,p=l.isMulti,h=l.inputValue,m=l.placeholder,f=this.state,g=f.selectValue,b=f.focusedValue,v=f.isFocused;if(!this.hasValue()||!c)return h?null:he.createElement(a,Qt({},d,{key:"placeholder",isDisabled:u,isFocused:v,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return g.map(function(t,s){var a=t===b,l="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return he.createElement(n,Qt({},d,{components:{Container:o,Label:r,Remove:i},isFocused:a,isDisabled:u,key:l,index:s,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var $=g[0];return he.createElement(s,Qt({},d,{data:$,isDisabled:u}),this.formatOptionLabel($,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||r)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return he.createElement(e,Qt({},t,{innerProps:s,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;return e&&r?he.createElement(e,Qt({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,r=this.props.isDisabled,i=this.state.isFocused;return he.createElement(n,Qt({},o,{isDisabled:r,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,r={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return he.createElement(e,Qt({},t,{innerProps:r,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,r=t.Menu,i=t.MenuList,s=t.MenuPortal,a=t.LoadingMessage,d=t.NoOptionsMessage,l=t.Option,c=this.commonProps,u=this.state.focusedOption,p=this.props,h=p.captureMenuScroll,m=p.inputValue,f=p.isLoading,g=p.loadingMessage,b=p.minMenuHeight,v=p.maxMenuHeight,$=p.menuIsOpen,y=p.menuPlacement,x=p.menuPosition,w=p.menuPortalTarget,C=p.menuShouldBlockScroll,S=p.menuShouldScrollIntoView,_=p.noOptionsMessage,E=p.onMenuScrollToTop,I=p.onMenuScrollToBottom;if(!$)return null;var A,P=function(t,n){var o=t.type,r=t.data,i=t.isDisabled,s=t.isSelected,a=t.label,d=t.value,p=u===r,h=i?void 0:function(){return e.onOptionHover(r)},m=i?void 0:function(){return e.selectOption(r)},f="".concat(e.getElementId("option"),"-").concat(n),g={id:f,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.state.isAppleDevice?void 0:s};return he.createElement(l,Qt({},c,{innerProps:g,data:r,isDisabled:i,isSelected:s,key:f,label:a,type:o,value:d,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())A=this.getCategorizedOptions().map(function(t){if("group"===t.type){var r=t.data,i=t.options,s=t.index,a="".concat(e.getElementId("group"),"-").concat(s),d="".concat(a,"-heading");return he.createElement(n,Qt({},c,{key:a,data:r,options:i,Heading:o,headingProps:{id:d,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return P(e,"".concat(s,"-").concat(e.index))}))}if("option"===t.type)return P(t,"".concat(t.index))});else if(f){var k=g({inputValue:m});if(null===k)return null;A=he.createElement(a,c,k)}else{var T=_({inputValue:m});if(null===T)return null;A=he.createElement(d,c,T)}var N={minMenuHeight:b,maxMenuHeight:v,menuPlacement:y,menuPosition:x,menuShouldScrollIntoView:S},D=he.createElement(mC,Qt({},c,N),function(t){var n=t.ref,o=t.placerProps,s=o.placement,a=o.maxHeight;return he.createElement(r,Qt({},c,N,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:f,placement:s}),he.createElement(pS,{captureEnabled:h,onTopArrive:E,onBottomArrive:I,lockEnabled:C},function(t){return he.createElement(i,Qt({},c,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":c.isMulti,id:e.getElementId("listbox")},isLoading:f,maxHeight:a,focusedOption:u}),A)}))});return w||"fixed"===x?he.createElement(s,Qt({},c,{appendTo:w,controlElement:this.controlRef,menuPlacement:y,menuPosition:x}),D):D}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,r=t.isMulti,i=t.name,s=t.required,a=this.state.selectValue;if(s&&!this.hasValue()&&!o)return he.createElement(mS,{name:i,onFocus:this.onValueInputFocus});if(i&&!o){if(r){if(n){var d=a.map(function(t){return e.getOptionValue(t)}).join(n);return he.createElement("input",{name:i,type:"hidden",value:d})}var l=a.length>0?a.map(function(t,n){return he.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})}):he.createElement("input",{name:i,type:"hidden",value:""});return he.createElement("div",null,l)}var c=a[0]?this.getOptionValue(a[0]):"";return he.createElement("input",{name:i,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,r=t.focusedValue,i=t.isFocused,s=t.selectValue,a=this.getFocusableOptions();return he.createElement(UC,Qt({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:r,isFocused:i,selectValue:s,focusableOptions:a,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,r=e.ValueContainer,i=this.props,s=i.className,a=i.id,d=i.isDisabled,l=i.menuIsOpen,c=this.state.isFocused,u=this.commonProps=this.getCommonProps();return he.createElement(o,Qt({},u,{className:s,innerProps:{id:a,onKeyDown:this.onKeyDown},isDisabled:d,isFocused:c}),this.renderLiveRegion(),he.createElement(t,Qt({},u,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:d,isFocused:c,menuIsOpen:l}),he.createElement(r,Qt({},u,{isDisabled:d}),this.renderPlaceholderOrValue(),this.renderInput()),he.createElement(n,Qt({},u,{isDisabled:d}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,o=t.clearFocusValueOnUpdate,r=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,s=t.isFocused,a=t.prevWasFocused,d=t.instancePrefix,l=e.options,c=e.value,u=e.menuIsOpen,p=e.inputValue,h=e.isMulti,m=Ww(c),f={};if(n&&(c!==n.value||l!==n.options||u!==n.menuIsOpen||p!==n.inputValue)){var g=u?function(e,t){return wS(xS(e,t))}(e,m):[],b=u?CS(xS(e,m),"".concat(d,"-option")):[],v=o?function(e,t){var n=e.focusedValue,o=e.selectValue.indexOf(n);if(o>-1){if(t.indexOf(n)>-1)return n;if(o-1?n:t[0]}(t,g);f={selectValue:m,focusedOption:$,focusedOptionId:_S(b,$),focusableOptionsWithIds:b,focusedValue:v,clearFocusValueOnUpdate:!1}}var y=null!=r&&e!==n?{inputIsHidden:r,inputIsHiddenAfterUpdate:void 0}:{},x=i,w=s&&a;return s&&!w&&(x={value:sC(h,m,m[0]||null),options:m,action:"initial-input-focus"},w=!a),"initial-input-focus"===(null==i?void 0:i.action)&&(x=null),nx(nx(nx({},f),y),{},{prevProps:e,ariaSelection:x,prevWasFocused:w})}}]),n}(he.Component);DS.defaultProps=$S;var MS=(0,he.forwardRef)(function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,o=e.defaultMenuIsOpen,r=void 0!==o&&o,i=e.defaultValue,s=void 0===i?null:i,a=e.inputValue,d=e.menuIsOpen,l=e.onChange,c=e.onInputChange,u=e.onMenuClose,p=e.onMenuOpen,h=e.value,m=sx(e,ax),f=ix((0,he.useState)(void 0!==a?a:n),2),g=f[0],b=f[1],v=ix((0,he.useState)(void 0!==d?d:r),2),$=v[0],y=v[1],x=ix((0,he.useState)(void 0!==h?h:s),2),w=x[0],C=x[1],S=(0,he.useCallback)(function(e,t){"function"==typeof l&&l(e,t),C(e)},[l]),_=(0,he.useCallback)(function(e,t){var n;"function"==typeof c&&(n=c(e,t)),b(void 0!==n?n:e)},[c]),E=(0,he.useCallback)(function(){"function"==typeof p&&p(),y(!0)},[p]),I=(0,he.useCallback)(function(){"function"==typeof u&&u(),y(!1)},[u]),A=void 0!==a?a:g,P=void 0!==d?d:$,k=void 0!==h?h:w;return nx(nx({},m),{},{inputValue:A,menuIsOpen:P,onChange:S,onInputChange:_,onMenuClose:I,onMenuOpen:E,value:k})}(e);return he.createElement(DS,Qt({ref:t},n))}),RS=MS;const jS=e=>{const{attributes:o,setAttributes:r,availableFormFields:s}=e,{label:a,help:d="",block_id:l}=o,c=window?.suredonation_admin?.payments||{},p=c.stripe_connected||!1,h=c.settings_url||"",m=o.paymentMethods||[o.gateway||"stripe"],g=m.includes("stripe"),v=c.offline_enabled||!1,$=m.includes("offline")&&v,y=(e,t="default")=>{if(""===e)return!1;if("variableAmount"===t){const t=s?.variableAmountFields?.some(t=>t.slug===e);return t}const n=s?.nameFields?.some(t=>t.slug===e),o=s?.emailsFields?.some(t=>t.slug===e);return n||o},x=o.paymentType||"one-time",w="variable"===(o.amountType||"fixed"),C=o.customerNameField||"",S=o.customerEmailField||"",_=o.variableAmountField||"",E=(0,t.applyFilters)("suredonation.payment.block.isNameRequired",!1,{paymentType:x,attributes:o}),I=E&&(!C||!y(C)),A=!S||!y(S),P=w&&(!_||!y(_,"variableAmount"));let k=null,T=null;if(g&&p&&(I||A||P)){let e="";const t=[];if(I&&t.push("Name"),A&&t.push("Email"),P&&t.push("Variable Amount"),t.length>0){const n=t.join(" and ");e=E&&t.length>1?(0,i.sprintf)(/* translators: %1$s: a comma-separated list of missing field names */ /* translators: %1$s: a comma-separated list of missing field names */ (0,i.__)("%1$s fields are required. Please configure these fields in the block settings.","suredonation"),n):(0,i.sprintf)(/* translators: %1$s: the missing field name */ /* translators: %1$s: the missing field name */ (0,i.__)("%1$s field is required. Please configure this field in the block settings.","suredonation"),n)}k=(0,u.jsx)("p",{className:"sd-stripe-payment-error-text",children:e})}return g&&!p&&(k=(0,u.jsx)("p",{className:"sd-stripe-payment-error-text",children:(0,i.__)("You need to configure a payment account to collect payments from this form. Please configure your payment provider to proceed.","suredonation")}),T=(0,u.jsx)("button",{type:"button",className:"sd-stripe-connect-button",onClick:()=>{h&&window.open(h,"_blank","noopener,noreferrer")},children:(0,i.__)("Configure Payment Account","suredonation")})),(0,u.jsxs)("div",{className:"sd-block-single sd-payment-block",children:[(0,u.jsx)(n.RichText,{tagName:"label",value:a,onChange:e=>{r({label:f(e)})},className:"sd-label",multiline:!1,allowedFormats:[]}),(0,u.jsx)(b,{help:d,setAttributes:r,block_id:l}),(0,u.jsxs)("div",{className:"sd-payment-field-wrapper",children:[(0,u.jsx)("p",{children:(0,i.__)("This is a placeholder for the Payment block. The actual payment fields for your configured payment provider(s) will only appear when you preview or publish the form.","suredonation")}),k,$&&(0,u.jsx)("p",{className:"sd-offline-info-text",children:(0,i.__)("Offline donations is enabled for this form. Donors can submit donations without online payment.","suredonation")}),T]})]})},OS=()=>(0,u.jsx)("hr",{style:{margin:"16px -16px",borderTop:"1px solid #e0e0e0"}}),LS=JSON.parse('{"UU":"suredonation/payment"}');(0,s.registerBlockType)(LS.UU,{icon:function(e){return ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}}]})(e)},edit:e=>{const{attributes:r,setAttributes:s,isSelected:a}=e,{help:d,block_id:c,formId:p,preview:h,fieldWidth:m,amountType:f,fixedAmount:b,minimumAmount:$,customerNameField:y,customerEmailField:x,customerPhoneField:w,variableAmountField:C,paymentType:S,gateway:_,paymentMethods:E}=r,I=(0,n.useBlockProps)({className:`sd-block sd-payment-block sd-block-width-${m}`}),A=(0,v.useSelect)(e=>e("core/editor")?.getCurrentPostId()||0,[]),[P,k]=(0,l.useState)({emailsFields:[],nameFields:[],phoneFields:[],variableAmountFields:[]}),{getBlocks:T}=(0,v.useSelect)(e=>e("core/block-editor"),[]),N=(0,l.useCallback)(()=>{if(!A)return{emailsFields:[],nameFields:[],phoneFields:[],variableAmountFields:[]};try{const e=T(),t=[],n=[],o=[],r=[];return e.forEach(e=>{if(e.attributes?.slug){const s=e.attributes.slug,a=e.attributes.label||e.name||(0,i.__)("Form Field","suredonation"),d=e.name;"suredonation/email"===d?t.push({slug:s,label:`${a} (email)`,type:"email"}):"suredonation/input"===d?n.push({slug:s,label:`${a} (input)`,type:"input"}):"suredonation/number"===d?r.push({slug:s,label:`${a} (number)`,type:"number"}):"suredonation/dropdown"===d?r.push({slug:s,label:`${a} (dropdown)`,type:"dropdown"}):"suredonation/donation-amount"===d?r.push({slug:s,label:`${a} (donation-amount)`,type:"donation-amount"}):"suredonation/phone"===d&&o.push({slug:s,label:`${a} (phone)`,type:"phone"})}}),{emailsFields:t,nameFields:n,phoneFields:o,variableAmountFields:r}}catch(e){return{emailsFields:[],nameFields:[],phoneFields:[],variableAmountFields:[]}}},[A,T]);(0,l.useEffect)(()=>{if(a||!P?.emailsFields?.length){const{emailsFields:e,nameFields:t,phoneFields:n,variableAmountFields:o}=N();k(r=>{const i={emailsFields:e,nameFields:t,phoneFields:n,variableAmountFields:o};return JSON.stringify(r)===JSON.stringify(i)?r:i})}},[a,N]),(0,l.useEffect)(()=>{c||s({block_id:g()})},[c,s]),(0,l.useEffect)(()=>{p!==A&&s({formId:A})},[p,s,A]),(0,l.useEffect)(()=>{_&&!E&&s({paymentMethods:[_]})},[_,E,s]);const D=window?.suredonation_admin?.payments?.gateways||[],M=(0,t.applyFilters)("suredonation.payment.block.filteredGateways",D,{paymentType:S}),R=(E||[_||"stripe"]).filter(e=>M.some(t=>t.value===e)).map(e=>M.find(t=>t.value===e));return h?(0,u.jsx)("div",{className:"sd-block-preview",children:(0,u.jsx)("p",{children:(0,i.__)("Payment Block Preview","suredonation")})}):(0,u.jsxs)("div",{...I,children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsxs)(L,{tabs:["general","advance"],defaultTab:"general",children:[(0,u.jsxs)(B,{...F,children:[(0,u.jsx)(ce,{label:(0,i.__)("Help Text","suredonation"),value:d,onChange:e=>s({help:e})}),(0,u.jsx)(OS,{}),(0,u.jsx)(Y,{label:(0,i.__)("Amount Type","suredonation"),options:[{value:"fixed",label:(0,i.__)("Fixed Amount","suredonation")},{value:"variable",label:(0,i.__)("Dynamic Amount","suredonation")}],value:f,onChange:e=>s({amountType:e}),help:(0,i.__)("Choose whether to charge a fixed amount or charge the amount based on user input in other form fields.","suredonation")}),"fixed"===f&&(0,u.jsx)(ce,{label:`${(0,i.__)("Fixed Amount","suredonation")} (${window.suredonation_admin?.currencySymbol||"$"})`,type:"number",value:b,onChange:e=>s({fixedAmount:parseFloat(e)||0}),help:(0,i.__)("Set the exact amount you want to charge. Users won't be able to change it","suredonation")}),"variable"===f&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o.SelectControl,{label:(0,i.__)("Choose Amount Field","suredonation"),value:C||"",options:[{label:(0,i.__)("Select a field…","suredonation"),value:""},...(P?.variableAmountFields||[]).map(e=>({label:e.label,value:e.slug}))],onChange:e=>{s({variableAmountField:e})},help:(0,i.__)("Pick a field from your form like a number, dropdown, or donation-amount whose value should decide the payment amount.","suredonation")}),(0,u.jsx)(ce,{label:(0,i.__)("Minimum Amount","suredonation"),type:"number",value:$,onChange:e=>s({minimumAmount:parseFloat(e)||0}),help:(0,i.__)("Set the minimum amount users can enter (0 for no minimum)","suredonation")})]}),(0,u.jsx)(OS,{}),(()=>{const e=(0,t.applyFilters)("suredonation.payment.block.paymentTypeControls",null,{attributes:r,setAttributes:s});return e?(0,u.jsxs)(u.Fragment,{children:[e,(0,u.jsx)(OS,{})]}):null})(),M.length>1&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("span",{className:"sd-control-label",children:(0,i.__)("Payment Methods","suredonation")}),(0,u.jsx)(RS,{options:M,value:R,isMulti:!0,isClearable:!1,classNamePrefix:"sd-select",placeholder:(0,i.__)("Select payment methods…","suredonation"),onChange:e=>{const t=e?e.map(e=>e.value):[];0!==t.length&&s({paymentMethods:t})}}),(0,u.jsx)("p",{className:"components-base-control__help",children:(0,i.__)("Select which payment methods donors can use on this form.","suredonation")}),(0,u.jsx)(OS,{})]}),(0,u.jsx)(o.SelectControl,{label:(0,i.__)("Customer Name Field (Optional)","suredonation"),value:y||"",options:[{label:(0,i.__)("Select a field…","suredonation"),value:""},...(P?.nameFields||[]).map(e=>({label:e.label,value:e.slug}))],onChange:e=>{s({customerNameField:e})},help:(0,i.__)("Select the input field that contains the customer name","suredonation")}),(0,u.jsx)(o.SelectControl,{label:(0,i.__)("Customer Email Field (Required)","suredonation"),value:x||"",options:[{label:(0,i.__)("Select a field…","suredonation"),value:""},...(P?.emailsFields||[]).map(e=>({label:e.label,value:e.slug}))],onChange:e=>{s({customerEmailField:e})},help:(0,i.__)("Select the email field that contains the customer email","suredonation")}),(0,u.jsx)(o.SelectControl,{label:(0,i.__)("Customer Phone Field (Optional)","suredonation"),value:w||"",options:[{label:(0,i.__)("Select a field…","suredonation"),value:""},...(P?.phoneFields||[]).map(e=>({label:e.label,value:e.slug}))],onChange:e=>{s({customerPhoneField:e})},help:(0,i.__)("Optionally map a Phone field to the donor’s phone number. When set, its value is saved to the donation’s phone column instead of Additional Information.","suredonation")})]}),(0,u.jsx)(B,{...V})]})}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(jS,{blockID:c,setAttributes:s,attributes:r,availableFormFields:P}),(0,u.jsx)("div",{className:"sd-error-wrap"})]})]})},save:()=>null});const BS=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"suredonation/donate-button","title":"Donate Button","description":"Displays a donate/submit button for the donation form","category":"suredonation","keywords":["donate","button","submit","donation"],"textdomain":"suredonation","supports":{"reusable":false,"html":false,"multiple":false},"example":{"attributes":{"preview":true}},"attributes":{"preview":{"type":"boolean","default":false},"block_id":{"type":"string"},"fieldWidth":{"type":"number","default":100},"buttonText":{"type":"string","default":"Donate"},"formId":{"type":"number","default":0},"slug":{"type":"string","default":""},"className":{"type":"string","default":""},"customClasses":{"type":"string","default":""}}}'),{name:FS}=BS;(0,s.registerBlockType)(FS,{...BS,icon:function(e){return ye({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 9v6c0 1.1-.9 2-2 2h-1v-2h1V9H4v6h6v2H4c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2zm-7.5 10l1.09-2.41L18 15.5l-2.41-1.09L14.5 12l-1.09 2.41L11 15.5l2.41 1.09L14.5 19zm2.5-5l.62-1.38L19 12l-1.38-.62L17 10l-.62 1.38L15 12l1.38.62L17 14zm-2.5 5l1.09-2.41L18 15.5l-2.41-1.09L14.5 12l-1.09 2.41L11 15.5l2.41 1.09L14.5 19zm2.5-5l.62-1.38L19 12l-1.38-.62L17 10l-.62 1.38L15 12l1.38.62L17 14z"}}]})(e)},edit:({attributes:e,setAttributes:t})=>{const{buttonText:o,block_id:r,formId:s,preview:a,fieldWidth:d}=e,c=(0,n.useBlockProps)({className:`sd-block sd-donate-button-block sd-block-width-${d}`}),p=(0,v.useSelect)(e=>e("core/editor")?.getCurrentPostId()||0,[]);return(0,l.useEffect)(()=>{r||t({block_id:g()})},[r,t]),(0,l.useEffect)(()=>{s!==p&&t({formId:p})},[s,p,t]),a?(0,u.jsx)("div",{className:"sd-block-preview",children:(0,u.jsx)("p",{children:(0,i.__)("Donate Button Preview","suredonation")})}):(0,u.jsxs)("div",{...c,children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsxs)(L,{tabs:["general","advance"],children:[(0,u.jsx)(B,{...F}),(0,u.jsx)(B,{...V})]})}),(0,u.jsx)(n.RichText,{tagName:"div",className:"sd-submit-button",value:o,onChange:e=>{t({buttonText:f(e)})},multiline:!1,id:r,allowedFormats:[],placeholder:(0,i.__)("Button Text","suredonation")})]})},save:function(){return null}});const VS=JSON.parse('{"UU":"suredonation/anonymous-donation"}'),US=(0,u.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor",children:(0,u.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"})});function zS(e){return ye({tag:"svg",attr:{viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M 22.853516 6.0078125 C 20.164121 6.0816133 18.078828 6.8123281 16.048828 7.5175781 C 13.877828 8.2715781 11.828234 8.9827188 8.9902344 9.0117188 C 7.0932344 9.0417187 5.1931719 8.7143594 3.3261719 8.0683594 L 2 7.609375 L 2 24.691406 L 2.6660156 24.927734 C 4.4050156 25.542734 6.183125 25.897422 7.953125 25.982422 C 8.234125 25.995422 8.5092969 26.001953 8.7792969 26.001953 C 11.792297 26.001953 14.098938 25.202687 16.335938 24.429688 C 18.693937 23.613688 20.918125 22.843328 23.953125 22.986328 C 25.527125 23.061328 27.112016 23.379687 28.666016 23.929688 L 30 24.402344 L 30 7.3144531 L 29.341797 7.0742188 C 27.616797 6.4492188 25.834922 6.0945781 24.044922 6.0175781 C 23.634422 5.9993281 23.237715 5.9972695 22.853516 6.0078125 z M 22.908203 7.9941406 C 23.247131 7.9836484 23.595781 7.9837969 23.957031 7.9980469 C 24.330995 8.0142703 24.705197 8.0481553 25.078125 8.0917969 C 25.344924 9.1855072 26.323979 10 27.5 10 C 27.671 10 27.838 9.9812188 28 9.9492188 L 28 19.050781 C 27.838 19.018781 27.671 19 27.5 19 C 26.264201 19 25.245058 19.898153 25.042969 21.076172 C 24.710892 21.041393 24.378543 21.017795 24.046875 21.001953 C 20.631875 20.851953 18.113688 21.710687 15.679688 22.554688 C 13.318688 23.372687 11.081828 24.145953 8.0488281 24.001953 C 7.6729998 23.983858 7.2965195 23.94781 6.9199219 23.902344 C 6.650967 22.811694 5.67385 22 4.5 22 C 4.329 22 4.162 22.018781 4 22.050781 L 4 12.949219 C 4.162 12.981219 4.329 13 4.5 13 C 5.7444763 13 6.7671584 12.088686 6.9589844 10.898438 C 7.6438975 10.970039 8.3294829 11.011452 9.0117188 11 C 12.176719 10.968 14.478078 10.166578 16.705078 9.3925781 C 18.665953 8.7100781 20.535709 8.0675859 22.908203 7.9941406 z M 16 11 C 13.794 11 12 13.243 12 16 C 12 18.757 13.794 21 16 21 C 18.206 21 20 18.757 20 16 C 20 13.243 18.206 11 16 11 z M 16 13 C 17.084 13 18 14.374 18 16 C 18 17.626 17.084 19 16 19 C 14.916 19 14 17.626 14 16 C 14 14.374 14.916 13 16 13 z M 23.5 13 A 1.5 1.5 0 0 0 23.5 16 A 1.5 1.5 0 0 0 23.5 13 z M 8.5 16 A 1.5 1.5 0 0 0 8.5 19 A 1.5 1.5 0 0 0 8.5 16 z"}}]})(e)}(0,s.registerBlockType)(VS.UU,{icon:US,edit:({attributes:e,setAttributes:t})=>{const{block_id:r,label:s,help:a,checked:d,fieldWidth:c}=e,p=(0,n.useBlockProps)({className:`sd-block sd-anonymous-donation-block sd-block-width-${c}`}),h=(0,v.useSelect)(e=>e("core/editor")?.getCurrentPostId()||0,[]);return(0,l.useEffect)(()=>{r||t({block_id:g()})},[r,t]),(0,l.useEffect)(()=>{h&&e.formId!==h&&t({formId:h})},[h,e.formId,t]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsxs)(L,{tabs:["general","advance"],children:[(0,u.jsxs)(B,{...F,children:[(0,u.jsx)(ce,{label:(0,i.__)("Help Text","suredonation"),value:a,onChange:e=>t({help:e})}),(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Checked by Default","suredonation"),checked:d,onChange:e=>t({checked:e})})]}),(0,u.jsx)(B,{...V})]})}),(0,u.jsx)("div",{...p,children:(0,u.jsxs)("div",{className:"sd-block-preview",children:[(0,u.jsx)("div",{className:"sd-block-wrap sd-checkbox-wrap sd-anonymous-donation-wrap",children:(0,u.jsxs)("label",{className:"sd-checkbox-label",children:[(0,u.jsx)("input",{type:"checkbox",className:"sd-input-checkbox",checked:d,onChange:()=>t({checked:!d})}),(0,u.jsx)(n.RichText,{tagName:"span",value:s,onChange:e=>t({label:f(e)}),className:"sd-checkbox-text",multiline:!1,allowedFormats:[],placeholder:(0,i.__)("Label","suredonation")})]})}),a&&(0,u.jsx)("p",{className:"sd-help",children:a})]})})]})},save:()=>null});const GS=JSON.parse('{"UU":"suredonation/cover-fees"}'),HS=(0,u.jsx)(zS,{});(0,s.registerBlockType)(GS.UU,{icon:HS,edit:({attributes:e,setAttributes:t})=>{const{block_id:r,label:s,help:a,checked:d,fieldWidth:c,useGlobalDefaults:p,feePercentage:h,feeFixed:m,feeMode:b,gatewayFees:$}=e,y=(0,n.useBlockProps)({className:`sd-block sd-cover-fees-block sd-block-width-${c}`}),x=(0,v.useSelect)(e=>e("core/editor")?.getCurrentPostId()||0,[]);(0,l.useEffect)(()=>{r||t({block_id:g()})},[r,t]),(0,l.useEffect)(()=>{x&&e.formId!==x&&t({formId:x})},[x,e.formId,t]);const w=window.suredonation_admin?.fee_recovery||{fee_percentage:2.9,fee_fixed:.3,fee_mode:"all_gateways",gateways:{}},C=window.suredonation_admin?.payments?.gateways||[];return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsxs)(L,{tabs:["general","advance"],children:[(0,u.jsxs)(B,{...F,children:[(0,u.jsx)(ce,{label:(0,i.__)("Help Text","suredonation"),value:a,onChange:e=>t({help:e})}),(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Checked by Default","suredonation"),checked:d,onChange:e=>t({checked:e})}),(0,u.jsx)(o.ToggleControl,{label:(0,i.__)("Use Global Defaults","suredonation"),help:p?(0,i.__)("Using global fee rates from Settings > Payments.","suredonation"):(0,i.__)("Using custom fee rates for this form.","suredonation"),checked:p,onChange:e=>{t(e?{useGlobalDefaults:!0,feePercentage:w.fee_percentage,feeFixed:w.fee_fixed,feeMode:w.fee_mode||"all_gateways",gatewayFees:w.gateways||{}}:{useGlobalDefaults:!1})}}),!p&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o.RadioControl,{label:(0,i.__)("Fee Configuration","suredonation"),selected:b||"all_gateways",options:[{label:(0,i.__)("All Gateways","suredonation"),value:"all_gateways"},{label:(0,i.__)("Per Gateway","suredonation"),value:"per_gateway"}],onChange:e=>t({feeMode:e})}),(!b||"all_gateways"===b)&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ce,{label:(0,i.__)("Fee Percentage (%)","suredonation"),type:"number",value:h,onChange:e=>t({feePercentage:parseFloat(e)||0})}),(0,u.jsx)(ce,{label:`${(0,i.__)("Fixed Fee","suredonation")} (${window.suredonation_admin?.currencySymbol||"$"})`,type:"number",value:m,onChange:e=>t({feeFixed:parseFloat(e)||0})})]}),"per_gateway"===b&&C.map(e=>{const n=$?.[e.value]||{fee_percentage:0,fee_fixed:0,enabled:!0};return(0,u.jsxs)("div",{className:"sd-gateway-fee-group",children:[(0,u.jsx)(o.ToggleControl,{label:e.label,checked:!1!==n.enabled,onChange:o=>t({gatewayFees:{...$,[e.value]:{...n,enabled:o}}})}),!1!==n.enabled&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ce,{label:(0,i.__)("Fee Percentage (%)","suredonation"),type:"number",value:n.fee_percentage,onChange:o=>t({gatewayFees:{...$,[e.value]:{...n,fee_percentage:parseFloat(o)||0}}})}),(0,u.jsx)(ce,{label:`${(0,i.__)("Fixed Fee","suredonation")} (${window.suredonation_admin?.currencySymbol||"$"})`,type:"number",value:n.fee_fixed,onChange:o=>t({gatewayFees:{...$,[e.value]:{...n,fee_fixed:parseFloat(o)||0}}})})]})]},e.value)})]}),p&&(()=>{if("per_gateway"===(w.fee_mode||"all_gateways")&&w.gateways){const e=[];for(const t of C){const n=w.gateways[t.value];if(n){const o=!1!==n.enabled;e.push(`${t.label}: ${o?n.fee_percentage+"% + "+(window.suredonation_admin?.currencySymbol||"$")+n.fee_fixed:(0,i.__)("Disabled","suredonation")}`)}}return(0,u.jsxs)("p",{className:"components-base-control__help",children:[(0,i.__)("Mode: Per Gateway","suredonation"),(0,u.jsx)("br",{}),e.join(", ")]})}return(0,u.jsxs)("p",{className:"components-base-control__help",children:[(0,i.__)("Fee Percentage:","suredonation")," ",w.fee_percentage,"%,"," ",(0,i.__)("Fixed Fee:","suredonation")," ",window.suredonation_admin?.currencySymbol||"$",w.fee_fixed]})})()]}),(0,u.jsx)(B,{...V})]})}),(0,u.jsx)("div",{...y,children:(0,u.jsxs)("div",{className:"sd-block-preview",children:[(0,u.jsx)("div",{className:"sd-block-wrap sd-checkbox-wrap sd-cover-fees-wrap",children:(0,u.jsxs)("label",{className:"sd-checkbox-label",children:[(0,u.jsx)("input",{type:"checkbox",className:"sd-input-checkbox",checked:d,onChange:()=>t({checked:!d})}),(0,u.jsx)(n.RichText,{tagName:"span",value:s,onChange:e=>t({label:f(e)}),className:"sd-checkbox-text",multiline:!1,allowedFormats:[],placeholder:(0,i.__)("Label","suredonation")})]})}),a&&(0,u.jsx)("p",{className:"sd-help",children:a})]})})]})},save:()=>null});const WS=["suredonation/input","suredonation/email","suredonation/number","suredonation/checkbox","suredonation/dropdown","suredonation/address","suredonation/phone","suredonation/url","suredonation/donation-amount","suredonation/anonymous-donation","suredonation/cover-fees","suredonation/donate-button","suredonation/payment"],KS=[100,75,50,25],qS=(0,e.createHigherOrderComponent)(e=>r=>{const{name:s,attributes:a,setAttributes:d}=r;return(0,t.applyFilters)("suredonation.fieldWidthBlocks",WS).includes(s)?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.BlockControls,{children:(0,u.jsx)(o.ToolbarGroup,{children:KS.map(e=>{const t=`${e}%`,n=a?.fieldWidth===e;return(0,u.jsx)(o.ToolbarButton,{className:n?"is-selected sd-toolbar-width-setting-button":"sd-toolbar-width-setting-button",icon:(0,u.jsx)("span",{className:"sd-toolbar-width-setting-icon",children:t}),label:(0,i.sprintf)( // translators: %s: field width percentage. // translators: %s: field width percentage. (0,i.__)("%s Width","suredonation"),t),onClick:()=>d({fieldWidth:e})},e)})})}),(0,u.jsx)(e,{...r})]}):(0,u.jsx)(e,{...r})},"withFieldWidthToolbar");(0,t.addFilter)("editor.BlockEdit","suredonation/with-field-width-toolbar",qS)})()})();