(()=>{var e,t,n,r={655:(e,t,n)=>{"use strict";const r=window.wp.element,a=window.wp.data;var l=n(184),o=n.n(l);const i=({children:e,className:t})=>(0,r.createElement)("div",{className:o()(["max-w-[90vw] w-full lg:container mx-auto px-2 lg:px-6",t])},e),s=window.wp.i18n,c=window.wp.api,u=()=>{let e;return c.loadPromise.then((()=>(e=new c.models.Settings,e.fetch())))},d=(e,t,n=!1,r=!0)=>{const a=(r?"nv_pro_":"")+e+(n?"_status":""),l=new c.models.Settings({[a]:t});return new Promise((e=>{l.save().then((n=>{n&&!n[a]!==t||e({success:!1}),e(p(a,n))}))}))},m=(e,t=!1,n=!0)=>f(e,t,{},"GET",n),f=async(e,t=!1,n={},r="POST",a=!0)=>{const l={method:r,headers:{Accept:"application/json","Content-Type":"application/json"}};return a&&(l.headers["x-wp-nonce"]=neveDash.nonce),"POST"===r&&(l.body=JSON.stringify(n)),await fetch(e,l).then((e=>t?e:e.json()))},p=(e,t)=>"nv_pro_typekit_id"!==e||t.neve_pro_typekit_data?{success:!0}:{message:(0,s.__)("Typekit Project ID is invalid","neve"),success:!1},v=window.React;var g=n.t(v,2);const h=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t)).join(" ").trim();var y={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 b=(0,v.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:l,iconNode:o,...i},s)=>(0,v.createElement)("svg",{ref:s,...y,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:h("lucide",a),...i},[...o.map((([e,t])=>(0,v.createElement)(e,t))),...Array.isArray(l)?l:[l]]))),E=(e,t)=>{const n=(0,v.forwardRef)((({className:n,...r},a)=>{return(0,v.createElement)(b,{ref:a,iconNode:t,className:h(`lucide-${l=e,l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var l}));return n.displayName=`${e}`,n},x=E("PanelTopDashed",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M14 9h1",key:"l0svgy"}],["path",{d:"M19 9h2",key:"te2zfg"}],["path",{d:"M3 9h2",key:"1h4ldw"}],["path",{d:"M9 9h1",key:"15jzuz"}]]),w=E("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]),k=E("ScanBarcode",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M8 7v10",key:"23sfjj"}],["path",{d:"M12 7v10",key:"jspqdw"}],["path",{d:"M17 7v10",key:"578dap"}]]),_=E("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]),S=E("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]),N=E("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),T=E("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]),M=E("Scroll",[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]),P=E("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]),L=E("GalleryVertical",[["path",{d:"M3 2h18",key:"15qxfx"}],["rect",{width:"18",height:"12",x:"3",y:"6",rx:"2",key:"1439r6"}],["path",{d:"M3 22h18",key:"8prr45"}]]),O=E("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]),C=E("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]),D=E("TypeOutline",[["path",{d:"M14 16.5a.5.5 0 0 0 .5.5h.5a2 2 0 0 1 0 4H9a2 2 0 0 1 0-4h.5a.5.5 0 0 0 .5-.5v-9a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5V8a2 2 0 0 1-4 0V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v3a2 2 0 0 1-4 0v-.5a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5Z",key:"1reda3"}]]),R=E("PanelRightDashed",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 14v1",key:"ilsfch"}],["path",{d:"M15 19v2",key:"1fst2f"}],["path",{d:"M15 3v2",key:"z204g4"}],["path",{d:"M15 9v1",key:"z2a8b1"}]]),A=E("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),F=E("ToyBrick",[["rect",{width:"18",height:"12",x:"3",y:"8",rx:"1",key:"158fvp"}],["path",{d:"M10 8V5c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v3",key:"s0042v"}],["path",{d:"M19 8V5c0-.6-.4-1-1-1h-3a1 1 0 0 0-1 1v3",key:"9wmeh2"}]]),I=E("LayoutTemplate",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]),j=E("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]),H=E("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),z=E("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]),V=E("Rss",[["path",{d:"M4 11a9 9 0 0 1 9 9",key:"pv89mb"}],["path",{d:"M4 4a16 16 0 0 1 16 16",key:"k0647b"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]]),B=E("BotMessageSquare",[["path",{d:"M12 6V2H8",key:"1155em"}],["path",{d:"m8 18-4 4V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2Z",key:"w2lp3e"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M9 11v2",key:"1ueba0"}],["path",{d:"M15 11v2",key:"i11awn"}],["path",{d:"M20 12h2",key:"1q8mjw"}]]),U="neve-dashboard",W=(neveDash.pro||neveDash.hasOldPro)&&neveDash.license&&"valid"===neveDash.license.valid,$=neveDash.pro,q=!!neveDash.whiteLabel,G=!!neveDash.modules.white_label,K=neveDash.hidePluginsTab||q,Y={hfg_module:x,woocommerce_booster:w,easy_digital_downloads:k,blog_pro:_,post_type_enhancements:S,scroll_to_top:N,performance_features:T,block_editor_booster:M,white_label:P,custom_layouts:L,elementor_booster:O,lifterlms_booster:C,typekit_fonts:D,custom_sidebars:R,access_restriction:A},X={"otter-blocks":F,"templates-patterns-collection":I,"wp-full-stripe-free":j,"optimole-wp":H,"wp-cloudflare-page-cache":z,"feedzy-rss-feeds":V,"hyve-lite":B},Q=E("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),Z=({text:e,url:t,isExternal:n,className:a})=>{const l=o()(["text-blue-600 hover:text-blue-700 hover:underline text-sm",a,{"inline-flex gap-1.5 items-center":n}]);return n?(0,r.createElement)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:l},e,(0,r.createElement)("span",{className:"sr-only"},(0,s.__)("(opens in a new tab)","neve")),(0,r.createElement)(Q,{size:16,className:"shrink-0"})):(0,r.createElement)("a",{href:t,className:l},e)},J=()=>{const{license:e}=(0,a.useSelect)((e=>{const{getLicense:t}=e(U);return{license:t()}}));if(!e||!e.valid||"valid"!==e.valid)return null;const{supportData:t}=e;if(!t||!t.text||!t.url)return null;let n=t.url;if(q){var l;if(null===(l=neveDash.whiteLabel)||void 0===l||!l.agencyURL)return null;n=neveDash.whiteLabel.agencyURL}return(0,r.createElement)(Z,{className:"flex items-center justify-center bg-white hover:bg-blue-600 text-blue-600 hover:text-white hover:no-underline border border-blue-600 hover:border-transparent rounded font-semibold py-3 px-2",url:n,isExternal:!0,text:t.text})},ee=E("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),te=E("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),ne=E("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),re=E("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);function ae(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function le(){let e=[],t={addEventListener:(e,n,r,a)=>(e.addEventListener(n,r,a),t.add((()=>e.removeEventListener(n,r,a)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return ae((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=le();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function oe(){let[e]=(0,v.useState)(le);return(0,v.useEffect)((()=>()=>e.dispose()),[e]),e}var ie=Object.defineProperty,se=(e,t,n)=>(((e,t,n)=>{t in e?ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let ce=new class{constructor(){se(this,"current",this.detect()),se(this,"handoffState","pending"),se(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},ue=(e,t)=>{ce.isServer?(0,v.useEffect)(e,t):(0,v.useLayoutEffect)(e,t)};function de(e){let t=(0,v.useRef)(e);return ue((()=>{t.current=e}),[e]),t}let me=function(e){let t=de(e);return v.useCallback(((...e)=>t.current(...e)),[t])};function fe(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in g&&g.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=v.useState(ce.isHandoffComplete);return t&&!1===ce.isHandoffComplete&&n(!1),v.useEffect((()=>{!0!==t&&n(!0)}),[t]),v.useEffect((()=>ce.handoff()),[]),!e&&t}let pe=Symbol();function ve(...e){let t=(0,v.useRef)(e);(0,v.useEffect)((()=>{t.current=e}),[e]);let n=me((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[pe])))?void 0:n}var ge,he;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(ge=null==process?void 0:process.env)?void 0:ge.NODE_ENV)&&void 0===(null==(he=null==Element?void 0:Element.prototype)?void 0:he.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join("\n")),[]});var ye,be=((ye=be||{})[ye.None=0]="None",ye[ye.Closed=1]="Closed",ye[ye.Enter=2]="Enter",ye[ye.Leave=4]="Leave",ye);function Ee(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function xe(e,t,n,r){let[a,l]=(0,v.useState)(n),{hasFlag:o,addFlag:i,removeFlag:s}=function(e=0){let[t,n]=(0,v.useState)(e),r=(0,v.useCallback)((e=>n(e)),[t]),a=(0,v.useCallback)((e=>n((t=>t|e))),[t]),l=(0,v.useCallback)((e=>(t&e)===e),[t]),o=(0,v.useCallback)((e=>n((t=>t&~e))),[n]),i=(0,v.useCallback)((e=>n((t=>t^e))),[n]);return{flags:t,setFlag:r,addFlag:a,hasFlag:l,removeFlag:o,toggleFlag:i}}(e&&a?3:0),c=(0,v.useRef)(!1),u=(0,v.useRef)(!1),d=oe();return ue((()=>{var a;if(e)return n&&l(!0),t?(null==(a=null==r?void 0:r.start)||a.call(r,n),function(e,{prepare:t,run:n,done:r,inFlight:a}){let l=le();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return void n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:a}),l.nextFrame((()=>{n(),l.requestAnimationFrame((()=>{l.add(function(e,t){var n,r;let a=le();if(!e)return a.dispose;let l=!1;a.add((()=>{l=!0}));let o=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter((e=>e instanceof CSSTransition)))?r:[];return 0===o.length?(t(),a.dispose):(Promise.allSettled(o.map((e=>e.finished))).then((()=>{l||t()})),a.dispose)}(e,r))}))})),l.dispose}(t,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(n?(i(3),s(4)):(i(4),s(2)))},run(){u.current?n?(s(3),i(4)):(s(4),i(3)):n?s(1):i(1)},done(){var e;u.current&&"function"==typeof t.getAnimations&&t.getAnimations().length>0||(c.current=!1,s(7),n||l(!1),null==(e=null==r?void 0:r.end)||e.call(r,n))}})):void(n&&i(3))}),[e,n,t,d]),e?[a,{closed:o(1),enter:o(2),leave:o(4),transition:o(2)||o(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}let we=(0,v.createContext)(null);we.displayName="OpenClosedContext";var ke=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ke||{});function _e(){return(0,v.useContext)(we)}function Se({value:e,children:t}){return v.createElement(we.Provider,{value:e},t)}function Ne(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function Te(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Te),r}var Me,Pe=((Me=Pe||{})[Me.None=0]="None",Me[Me.RenderStrategy=1]="RenderStrategy",Me[Me.Static=2]="Static",Me),Le=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Le||{});function Oe(){let e=function(){let e=(0,v.useRef)([]),t=(0,v.useCallback)((t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)}),[]);return(...n)=>{if(!n.every((e=>null==e)))return e.current=n,t}}();return(0,v.useCallback)((t=>function({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:a,visible:l=!0,name:o,mergeRefs:i}){i=null!=i?i:De;let s=Re(t,e);if(l)return Ce(s,n,r,o,i);let c=null!=a?a:0;if(2&c){let{static:e=!1,...t}=s;if(e)return Ce(t,n,r,o,i)}if(1&c){let{unmount:e=!0,...t}=s;return Te(e?0:1,{0:()=>null,1:()=>Ce({...t,hidden:!0,style:{display:"none"}},n,r,o,i)})}return Ce(s,n,r,o,i)}({mergeRefs:e,...t})),[e])}function Ce(e,t={},n,r,a){let{as:l=n,children:o,refName:i="ref",...s}=je(e,["unmount","static"]),c=void 0!==e.ref?{[i]:e.ref}:{},u="function"==typeof o?o(t):o;"className"in s&&s.className&&"function"==typeof s.className&&(s.className=s.className(t)),s["aria-labelledby"]&&s["aria-labelledby"]===s.id&&(s["aria-labelledby"]=void 0);let d={};if(t){let e=!1,n=[];for(let[r,a]of Object.entries(t))"boolean"==typeof a&&(e=!0),!0===a&&n.push(r.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){d["data-headlessui-state"]=n.join(" ");for(let e of n)d[`data-${e}`]=""}}if(l===v.Fragment&&(Object.keys(Ie(s)).length>0||Object.keys(Ie(d)).length>0)){if((0,v.isValidElement)(u)&&!(Array.isArray(u)&&u.length>1)){let e=u.props,t=null==e?void 0:e.className,n="function"==typeof t?(...e)=>Ne(t(...e),s.className):Ne(t,s.className),r=n?{className:n}:{},l=Re(u.props,Ie(je(s,["ref"])));for(let e in d)e in l&&delete d[e];return(0,v.cloneElement)(u,Object.assign({},l,d,c,{ref:a(He(u),c.ref)},r))}if(Object.keys(Ie(s)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Ie(s)).concat(Object.keys(Ie(d))).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"))}return(0,v.createElement)(l,Object.assign({},je(s,["ref"]),l!==v.Fragment&&c,l!==v.Fragment&&d),u)}function De(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function Re(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let e in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(n[e]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let e in n)Object.assign(t,{[e](t,...r){let a=n[e];for(let e of a){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function Ae(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let e in n)Object.assign(t,{[e](...t){let r=n[e];for(let e of r)null==e||e(...t)}});return t}function Fe(e){var t;return Object.assign((0,v.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Ie(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function je(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function He(e){return v.version.split(".")[0]>="19"?e.props.ref:e.ref}function ze(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:qe)!==v.Fragment||1===v.Children.count(e.children)}let Ve=(0,v.createContext)(null);Ve.displayName="TransitionContext";var Be=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Be||{});let Ue=(0,v.createContext)(null);function We(e){return"children"in e?We(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function $e(e,t){let n=de(e),r=(0,v.useRef)([]),a=function(){let e=(0,v.useRef)(!1);return ue((()=>(e.current=!0,()=>{e.current=!1})),[]),e}(),l=oe(),o=me(((e,t=Le.Hidden)=>{let o=r.current.findIndex((({el:t})=>t===e));-1!==o&&(Te(t,{[Le.Unmount](){r.current.splice(o,1)},[Le.Hidden](){r.current[o].state="hidden"}}),l.microTask((()=>{var e;!We(r)&&a.current&&(null==(e=n.current)||e.call(n))})))})),i=me((e=>{let t=r.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>o(e,Le.Unmount)})),s=(0,v.useRef)([]),c=(0,v.useRef)(Promise.resolve()),u=(0,v.useRef)({enter:[],leave:[]}),d=me(((e,n,r)=>{s.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),null==t||t.chains.current[n].push([e,new Promise((e=>{s.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((e=>{Promise.all(u.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?c.current=c.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),m=me(((e,t,n)=>{Promise.all(u.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=s.current.shift())||e()})).then((()=>n(t)))}));return(0,v.useMemo)((()=>({children:r,register:i,unregister:o,onStart:d,onStop:m,wait:c,chains:u})),[i,o,r,d,m,u,c])}Ue.displayName="NestingContext";let qe=v.Fragment,Ge=Pe.RenderStrategy,Ke=Fe((function(e,t){let{show:n,appear:r=!1,unmount:a=!0,...l}=e,o=(0,v.useRef)(null),i=ve(...ze(e)?[o,t]:null===t?[]:[t]);fe();let s=_e();if(void 0===n&&null!==s&&(n=(s&ke.Open)===ke.Open),void 0===n)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,u]=(0,v.useState)(n?"visible":"hidden"),d=$e((()=>{n||u("hidden")})),[m,f]=(0,v.useState)(!0),p=(0,v.useRef)([n]);ue((()=>{!1!==m&&p.current[p.current.length-1]!==n&&(p.current.push(n),f(!1))}),[p,n]);let g=(0,v.useMemo)((()=>({show:n,appear:r,initial:m})),[n,r,m]);ue((()=>{n?u("visible"):!We(d)&&null!==o.current&&u("hidden")}),[n,d]);let h={unmount:a},y=me((()=>{var t;m&&f(!1),null==(t=e.beforeEnter)||t.call(e)})),b=me((()=>{var t;m&&f(!1),null==(t=e.beforeLeave)||t.call(e)})),E=Oe();return v.createElement(Ue.Provider,{value:d},v.createElement(Ve.Provider,{value:g},E({ourProps:{...h,as:v.Fragment,children:v.createElement(Ye,{ref:i,...h,...l,beforeEnter:y,beforeLeave:b})},theirProps:{},defaultTag:v.Fragment,features:Ge,visible:"visible"===c,name:"Transition"})))})),Ye=Fe((function(e,t){var n,r;let{transition:a=!0,beforeEnter:l,afterEnter:o,beforeLeave:i,afterLeave:s,enter:c,enterFrom:u,enterTo:d,entered:m,leave:f,leaveFrom:p,leaveTo:g,...h}=e,[y,b]=(0,v.useState)(null),E=(0,v.useRef)(null),x=ze(e),w=ve(...x?[E,t,b]:null===t?[]:[t]),k=null==(n=h.unmount)||n?Le.Unmount:Le.Hidden,{show:_,appear:S,initial:N}=function(){let e=(0,v.useContext)(Ve);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[T,M]=(0,v.useState)(_?"visible":"hidden"),P=function(){let e=(0,v.useContext)(Ue);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:L,unregister:O}=P;ue((()=>L(E)),[L,E]),ue((()=>{if(k===Le.Hidden&&E.current)return _&&"visible"!==T?void M("visible"):Te(T,{hidden:()=>O(E),visible:()=>L(E)})}),[T,E,L,O,_,k]);let C=fe();ue((()=>{if(x&&C&&"visible"===T&&null===E.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[E,T,C,x]);let D=N&&!S,R=S&&_&&N,A=(0,v.useRef)(!1),F=$e((()=>{A.current||(M("hidden"),O(E))}),P),I=me((e=>{A.current=!0;let t=e?"enter":"leave";F.onStart(E,t,(e=>{"enter"===e?null==l||l():"leave"===e&&(null==i||i())}))})),j=me((e=>{let t=e?"enter":"leave";A.current=!1,F.onStop(E,t,(e=>{"enter"===e?null==o||o():"leave"===e&&(null==s||s())})),"leave"===t&&!We(F)&&(M("hidden"),O(E))}));(0,v.useEffect)((()=>{x&&a||(I(_),j(_))}),[_,x,a]);let H=!(!a||!x||!C||D),[,z]=xe(H,y,_,{start:I,end:j}),V=Ie({ref:w,className:(null==(r=Ne(h.className,R&&c,R&&u,z.enter&&c,z.enter&&z.closed&&u,z.enter&&!z.closed&&d,z.leave&&f,z.leave&&!z.closed&&p,z.leave&&z.closed&&g,!z.transition&&_&&m))?void 0:r.trim())||void 0,...Ee(z)}),B=0;"visible"===T&&(B|=ke.Open),"hidden"===T&&(B|=ke.Closed),z.enter&&(B|=ke.Opening),z.leave&&(B|=ke.Closing);let U=Oe();return v.createElement(Ue.Provider,{value:F},v.createElement(Se,{value:B},U({ourProps:V,theirProps:h,defaultTag:qe,features:Ge,visible:"visible"===T,name:"Transition.Child"})))})),Xe=Fe((function(e,t){let n=null!==(0,v.useContext)(Ve),r=null!==_e();return v.createElement(v.Fragment,null,!n&&r?v.createElement(Ke,{ref:t,...e}):v.createElement(Ye,{ref:t,...e}))})),Qe=Object.assign(Ke,{Child:Xe,Root:Ke});const Ze=({children:e,show:t})=>(0,r.createElement)(Qe,{show:t},(0,r.createElement)("div",{className:"transition\n\t\t data-[closed]:transform data-[closed]:-translate-y-2 data-[closed]:opacity-0\n\t\t data-[open]:transform data-[open]:translate-y-0 data-[open]:opacity-100\n\t\t duration-300 ease-in-out"},e)),Je=({message:e,dismiss:t,time:n,type:a="info",className:l})=>{const[i,s]=(0,r.useState)(!1);(0,r.useEffect)((()=>{s(!0);const e=n||2e3,r=e+1e3,a=setTimeout((()=>{s(!1)}),e),l=setTimeout((()=>{t&&t("")}),r);return()=>{clearTimeout(a),clearTimeout(l)}}),[]);const c={info:ee,error:te,success:ne,warning:re},u=o()("px-2 py-1.5 flex items-center text-sm border rounded gap-2",{"bg-sky-50 text-sky-800":"info"===a,"bg-red-50 text-red-800":"error"===a,"bg-lime-50 text-lime-800":"success"===a,"bg-orange-50 text-orange-800":"warning"===a},l),d=c[a];return(0,r.createElement)(Ze,{show:i},(0,r.createElement)("div",{className:u},(0,r.createElement)(d,{size:20}),(0,r.createElement)("span",null,e)))},et=()=>{const{license:e}=(0,a.useSelect)((e=>{const{getLicense:t}=e(U);return{license:t()}}));return{isLicenseValid:neveDash.pro&&e&&"valid"===e.valid,licenseTier:e&&e.tier||1,license:e}},tt=({icon:e,title:t,children:n,afterTitle:a,className:l="",id:i=null})=>{const s=o()(["p-6 rounded-lg shadow-sm",{"bg-white":!l.includes("bg-")}],l);return(0,r.createElement)("div",{className:s,id:i},(e||t)&&(0,r.createElement)("div",{className:"flex items-center mb-6 gap-3"},e&&(0,r.createElement)("span",{className:"size-5 text-blue-600 shrink-0"},e),t&&(0,r.createElement)("h2",{className:"text-base font-semibold text-black"},t),a&&(0,r.createElement)("div",{className:"ml-auto shrink-0"},a)),n)},nt=E("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);var rt=n(697),at=n.n(rt);const lt=e=>{const{href:t,onClick:n,className:a="",isSubmit:l,isPrimary:i,isSecondary:s,isLink:c,children:u,disabled:d,loading:m,target:f}=e,p={className:o()(["flex items-center px-3 py-2 transition-colors duration-150 text-sm border gap-2",{rounded:!a.includes("rounded"),"border-transparent bg-blue-600 text-white":i,"border-blue-600 text-blue-600":s,"border-transparent text-gray-600":c,"cursor-not-allowed opacity-50":d,"hover:bg-blue-700 hover:text-white":!d&&i,"hover:bg-blue-600 hover:text-white":!d&&s,"hover:text-gray-900":!d&&c},a]),disabled:d,onClick:n};l&&(p.type="submit"),t&&(p.href=t),f&&(p.target=f,"_blank"===f&&(p.rel="noopener noreferrer"));const v=t&&!n?"a":"button";return(0,r.createElement)(v,p,m&&(0,r.createElement)(nt,{size:18,className:"animate-spin"}),u)};lt.propTypes={href:at().string,onClick:at().func,className:at().string,isSubmit:at().bool,isPrimary:at().bool,isSecondary:at().bool,isLink:at().bool,children:at().node,disabled:at().bool,target:at().oneOf(["_blank","_self","_parent","_top"])};const ot=lt,it=({children:e,type:t="primary",className:n})=>{if(!e)return null;const a=o()([{primary:"bg-blue-100 text-blue-700",secondary:"bg-gray-100 text-gray-700",success:"bg-lime-100 text-lime-700",error:"bg-red-100 text-red-700",warning:"bg-yellow-100 text-yellow-700"}[t],"px-1.5 py-0.5 text-sm font-medium rounded leading-none uppercase",n]);return(0,r.createElement)("span",{className:a},e)},st=()=>{const{proApi:e}=neveDash,{changeLicense:t,setSettings:n}=(0,a.useDispatch)(U),{license:l,isLicenseValid:o}=et(),[i,c]=(0,r.useState)(o&&l.key||""),[d,m]=(0,r.useState)(!1),[p,v]=(0,r.useState)(""),[g,h]=(0,r.useState)("success"),{valid:y,expiration:b}=l,{whiteLabel:E,strings:x}=neveDash,{licenseCardHeading:w,licenseCardDescription:k}=x;return E&&E.hideLicense?null:(0,r.createElement)(tt,{title:w},(0,r.createElement)("div",{className:"grid gap-4"},!E&&k&&(0,r.createElement)("p",{className:"text-sm",dangerouslySetInnerHTML:{__html:k}}),(0,r.createElement)("form",{className:"flex gap-3 items-center",onSubmit:r=>{r.preventDefault(),(()=>{const r="valid"===y?"deactivate":"activate";m("activate"===r?"activating":"deactivating"),((e,t,n=!1)=>f(e,n,t))(e+"/toggle_license",{key:i,action:r}).then((e=>{h(e.success?"success":"error"),c("activate"===r?i:""),v(e.message),m(!1),e.license&&(t(e.license),u().then((e=>{n(e)})))}))})()}},(0,r.createElement)("input",{type:"text",id:"license-field",name:"license-field",className:"flex-grow rounded !border-gray-300 text-sm !py-1 !px-2",disabled:"valid"===y,onChange:e=>{const t=e.target.value.replace(/\s+/g,"");c(t)},value:"valid"===y?"******************************"+i.slice(-5):i,placeholder:(0,s.__)("Enter License Key","neve")}),(0,r.createElement)(ot,{isPrimary:"valid"!==y,isSecondary:"valid"===y,disabled:!!d||!i,isSubmit:!0},(()=>{const e={activating:(0,s.__)("Activating","neve"),deactivating:(0,s.__)("Deactivating","neve"),activate:(0,s.__)("Activate","neve"),deactivate:(0,s.__)("Deactivate","neve")};return d?e[d]:"valid"===y?(0,s.__)("Deactivate","neve"):(0,s.__)("Activate","neve")})())),p&&(0,r.createElement)(Je,{type:g,dismiss:v,message:p}),"expired"===y||"valid"===y&&(0,r.createElement)("div",{className:"flex items-center gap-1"},(0,r.createElement)(it,{type:"valid"===y?"success":"warning",className:"inline-flex items-center gap-1 px-2 py-1"},"valid"===y?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(ne,{size:14}),(0,r.createElement)("span",null,(0,s.__)("Valid","neve"))):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(te,{size:14}),(0,r.createElement)("span",null,(0,s.__)("Expired","neve")))),b&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"space-x-1 ml-auto"},(0,r.createElement)("span",{className:"text-xs"},"valid"===y?(0,s.__)("Expires","neve"):(0,s.__)("Expired","neve")),(0,r.createElement)("span",{className:"font-semibold text-xs"},b))))))};let ct=(0,v.createContext)(void 0);function ut(){return(0,v.useContext)(ct)}function dt({value:e,children:t}){return v.createElement(ct.Provider,{value:e},t)}const mt=window.ReactDOM;function ft(e={},t=null,n=[]){for(let[r,a]of Object.entries(e))vt(n,pt(t,r),a);return n}function pt(e,t){return e?e+"["+t+"]":t}function vt(e,t,n){if(Array.isArray(n))for(let[r,a]of n.entries())vt(e,pt(t,r.toString()),a);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):ft(n,t,e)}function gt(e){var t,n;let r=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(r){for(let t of r.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(n=r.requestSubmit)||n.call(r)}}var ht=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ht||{});let yt=Fe((function(e,t){var n;let{features:r=1,...a}=e,l={ref:t,"aria-hidden":2==(2&r)||(null!=(n=a["aria-hidden"])?n:void 0),hidden:4==(4&r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...4==(4&r)&&2!=(2&r)&&{display:"none"}}};return Oe()({ourProps:l,theirProps:a,slot:{},defaultTag:"span",name:"Hidden"})})),bt=(0,v.createContext)(null);function Et(e){let[t,n]=(0,v.useState)(null);return v.createElement(bt.Provider,{value:{target:t}},e.children,v.createElement(yt,{features:ht.Hidden,ref:n}))}function xt({children:e}){let t=(0,v.useContext)(bt);if(!t)return v.createElement(v.Fragment,null,e);let{target:n}=t;return n?(0,mt.createPortal)(v.createElement(v.Fragment,null,e),n):null}function wt({data:e,form:t,disabled:n,onReset:r,overrides:a}){let[l,o]=(0,v.useState)(null),i=oe();return(0,v.useEffect)((()=>{if(r&&l)return i.addEventListener(l,"reset",r)}),[l,t,r]),v.createElement(xt,null,v.createElement(kt,{setForm:o,formId:t}),ft(e).map((([e,r])=>v.createElement(yt,{features:ht.Hidden,...Ie({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:e,value:r,...a})}))))}function kt({setForm:e,formId:t}){return(0,v.useEffect)((()=>{if(t){let n=document.getElementById(t);n&&e(n)}}),[e,t]),t?null:v.createElement(yt,{features:ht.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}let _t=(0,v.createContext)(void 0);function St(){return(0,v.useContext)(_t)}function Nt({id:e,children:t}){return v.createElement(_t.Provider,{value:e},t)}let Tt=(0,v.createContext)(null);function Mt(){let e=(0,v.useContext)(Tt);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Mt),e}return e}function Pt(){var e,t;return null!=(t=null==(e=(0,v.useContext)(Tt))?void 0:e.value)?t:void 0}function Lt(){let[e,t]=(0,v.useState)([]);return[e.length>0?e.join(" "):void 0,(0,v.useMemo)((()=>function(e){let n=me((e=>(t((t=>[...t,e])),()=>t((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),r=(0,v.useMemo)((()=>({register:n,slot:e.slot,name:e.name,props:e.props,value:e.value})),[n,e.slot,e.name,e.props,e.value]);return v.createElement(Tt.Provider,{value:r},e.children)}),[t])]}Tt.displayName="DescriptionContext";let Ot=Fe((function(e,t){let n=(0,v.useId)(),r=ut(),{id:a=`headlessui-description-${n}`,...l}=e,o=Mt(),i=ve(t);ue((()=>o.register(a)),[a,o.register]);let s=r||!1,c=(0,v.useMemo)((()=>({...o.slot,disabled:s})),[o.slot,s]),u={ref:i,...o.props,id:a};return Oe()({ourProps:u,theirProps:l,slot:c,defaultTag:"p",name:o.name||"Description"})})),Ct=Object.assign(Ot,{}),Dt=(0,v.createContext)(null);function Rt(){let e=(0,v.useContext)(Dt);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Rt),e}return e}function At(e){var t,n,r;let a=null!=(n=null==(t=(0,v.useContext)(Dt))?void 0:t.value)?n:void 0;return(null!=(r=null==e?void 0:e.length)?r:0)>0?[a,...e].filter(Boolean).join(" "):a}function Ft({inherit:e=!1}={}){let t=At(),[n,r]=(0,v.useState)([]),a=e?[t,...n].filter(Boolean):n;return[a.length>0?a.join(" "):void 0,(0,v.useMemo)((()=>function(e){let t=me((e=>(r((t=>[...t,e])),()=>r((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),n=(0,v.useMemo)((()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value})),[t,e.slot,e.name,e.props,e.value]);return v.createElement(Dt.Provider,{value:n},e.children)}),[r])]}Dt.displayName="LabelContext";let It=Fe((function(e,t){var n;let r=(0,v.useId)(),a=Rt(),l=St(),o=ut(),{id:i=`headlessui-label-${r}`,htmlFor:s=(null!=l?l:null==(n=a.props)?void 0:n.htmlFor),passive:c=!1,...u}=e,d=ve(t);ue((()=>a.register(i)),[i,a.register]);let m=me((e=>{let t=e.currentTarget;if(t instanceof HTMLLabelElement&&e.preventDefault(),a.props&&"onClick"in a.props&&"function"==typeof a.props.onClick&&a.props.onClick(e),t instanceof HTMLLabelElement){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute("disabled");if("true"===t||""===t)return;let n=e.getAttribute("aria-disabled");if("true"===n||""===n)return;(e instanceof HTMLInputElement&&("radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}})),f=o||!1,p=(0,v.useMemo)((()=>({...a.slot,disabled:f})),[a.slot,f]),g={ref:d,...a.props,id:i,htmlFor:s,onClick:m};return c&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in u&&delete u.onClick),Oe()({ourProps:g,theirProps:u,slot:p,defaultTag:s?"label":"div",name:a.name||"Label"})})),jt=Object.assign(It,{}),Ht=Fe((function(e,t){let n=`headlessui-control-${(0,v.useId)()}`,[r,a]=Ft(),[l,o]=Lt(),i=ut(),{disabled:s=i||!1,...c}=e,u=(0,v.useMemo)((()=>({disabled:s})),[s]),d={ref:t,disabled:s||void 0,"aria-disabled":s||void 0},m=Oe();return v.createElement(dt,{value:s},v.createElement(a,{value:r},v.createElement(o,{value:l},v.createElement(Nt,{id:n},m({ourProps:d,theirProps:{...c,children:v.createElement(Et,null,"function"==typeof c.children?c.children(u):c.children)},slot:u,defaultTag:"div",name:"Field"})))))}));function zt(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands.some((t=>e.test(t.brand))))||e.test(window.navigator.userAgent))}function Vt(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 Bt(e){let t=null;return()=>(null==t&&(t=e()),t)}const Ut=Bt((function(){return Vt(/^Mac/i)})),Wt=Bt((function(){return Vt(/^iPhone/i)})),$t=Bt((function(){return Vt(/^iPad/i)||Ut()&&navigator.maxTouchPoints>1})),qt=Bt((function(){return Wt()||$t()})),Gt=(Bt((function(){return Ut()||qt()})),Bt((function(){return zt(/AppleWebKit/i)&&!Gt()})),Bt((function(){return zt(/Chrome/i)}))),Kt=Bt((function(){return zt(/Android/i)}));Bt((function(){return zt(/Firefox/i)}));const Yt=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},Xt=e=>e&&"window"in e&&e.window===e?e:Yt(e).defaultView||window;let Qt=null,Zt=new Set,Jt=new Map,en=!1,tn=!1;const nn={Tab:!0,Escape:!0};function rn(e,t){for(let n of Zt)n(e,t)}function an(e){en=!0,function(e){return!(e.metaKey||!Ut()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(Qt="keyboard",rn("keyboard",e))}function ln(e){Qt="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(en=!0,rn("pointer",e))}function on(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||(Kt()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(en=!0,Qt="virtual")}function sn(e){e.target!==window&&e.target!==document&&(en||tn||(Qt="virtual",rn("virtual",e)),en=!1,tn=!1)}function cn(){en=!1,tn=!0}function un(e){if("undefined"==typeof window||Jt.get(Xt(e)))return;const t=Xt(e),n=Yt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){en=!0,r.apply(this,arguments)},n.addEventListener("keydown",an,!0),n.addEventListener("keyup",an,!0),n.addEventListener("click",on,!0),t.addEventListener("focus",sn,!0),t.addEventListener("blur",cn,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",ln,!0),n.addEventListener("pointermove",ln,!0),n.addEventListener("pointerup",ln,!0)):(n.addEventListener("mousedown",ln,!0),n.addEventListener("mousemove",ln,!0),n.addEventListener("mouseup",ln,!0)),t.addEventListener("beforeunload",(()=>{dn(e)}),{once:!0}),Jt.set(t,{focus:r})}const dn=(e,t)=>{const n=Xt(e),r=Yt(e);t&&r.removeEventListener("DOMContentLoaded",t),Jt.has(n)&&(n.HTMLElement.prototype.focus=Jt.get(n).focus,r.removeEventListener("keydown",an,!0),r.removeEventListener("keyup",an,!0),r.removeEventListener("click",on,!0),n.removeEventListener("focus",sn,!0),n.removeEventListener("blur",cn,!1),"undefined"!=typeof PointerEvent?(r.removeEventListener("pointerdown",ln,!0),r.removeEventListener("pointermove",ln,!0),r.removeEventListener("pointerup",ln,!0)):(r.removeEventListener("mousedown",ln,!0),r.removeEventListener("mousemove",ln,!0),r.removeEventListener("mouseup",ln,!0)),Jt.delete(n))};function mn(){return"pointer"!==Qt}"undefined"!=typeof document&&function(e){const t=Yt(e);let n;"loading"!==t.readyState?un(e):(n=()=>{un(e)},t.addEventListener("DOMContentLoaded",n))}();const fn=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);const pn="undefined"!=typeof document?v.useLayoutEffect:()=>{};class vn{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function gn(e){let t=(0,v.useRef)({isFocused:!1,observer:null});pn((()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}}),[]);let n=function(e){const t=(0,v.useRef)(null);return pn((()=>{t.current=e}),[e]),(0,v.useCallback)(((...e)=>{const n=t.current;return null==n?void 0:n(...e)}),[])}((t=>{null==e||e(t)}));return(0,v.useCallback)((e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target,a=e=>{t.current.isFocused=!1,r.disabled&&n(new vn("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver((()=>{if(t.current.isFocused&&r.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}})),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}}),[n])}function hn(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,a=(0,v.useRef)({isFocused:!1,isFocusVisible:t||mn()}),[l,o]=(0,v.useState)(!1),[i,s]=(0,v.useState)((()=>a.current.isFocused&&a.current.isFocusVisible)),c=(0,v.useCallback)((()=>s(a.current.isFocused&&a.current.isFocusVisible)),[]),u=(0,v.useCallback)((e=>{a.current.isFocused=e,o(e),c()}),[c]);var d,m,f;d=e=>{a.current.isFocusVisible=e,c()},m=[],f={isTextInput:n},un(),(0,v.useEffect)((()=>{let e=(e,t)=>{(function(e,t,n){var r;const a="undefined"!=typeof window?Xt(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,l="undefined"!=typeof window?Xt(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,o="undefined"!=typeof window?Xt(null==n?void 0:n.target).HTMLElement:HTMLElement,i="undefined"!=typeof window?Xt(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==n?void 0:n.target)instanceof a&&!fn.has(null==n||null===(r=n.target)||void 0===r?void 0:r.type)||(null==n?void 0:n.target)instanceof l||(null==n?void 0:n.target)instanceof o&&(null==n?void 0:n.target.isContentEditable))&&"keyboard"===t&&n instanceof i&&!nn[n.key])})(!!(null==f?void 0:f.isTextInput),e,t)&&d(mn())};return Zt.add(e),()=>{Zt.delete(e)}}),m);let{focusProps:p}=function(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:a}=e;const l=(0,v.useCallback)((e=>{if(e.target===e.currentTarget)return r&&r(e),a&&a(!1),!0}),[r,a]),o=gn(l),i=(0,v.useCallback)((e=>{const t=Yt(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(n&&n(e),a&&a(!0),o(e))}),[a,n,o]);return{focusProps:{onFocus:!t&&(n||a||r)?i:void 0,onBlur:t||!r&&!a?void 0:l}}}({isDisabled:r,onFocusChange:u}),{focusWithinProps:g}=function(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:a}=e,l=(0,v.useRef)({isFocusWithin:!1}),o=(0,v.useCallback)((e=>{l.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(l.current.isFocusWithin=!1,n&&n(e),a&&a(!1))}),[n,a,l]),i=gn(o),s=(0,v.useCallback)((e=>{l.current.isFocusWithin||document.activeElement!==e.target||(r&&r(e),a&&a(!0),l.current.isFocusWithin=!0,i(e))}),[r,a,i]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:s,onBlur:o}}}({isDisabled:!r,onFocusWithinChange:u});return{isFocused:l,isFocusVisible:i,focusProps:r?g:p}}let yn=!1,bn=0;function En(){yn=!0,setTimeout((()=>{yn=!1}),50)}function xn(e){"touch"===e.pointerType&&En()}function wn(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",xn):document.addEventListener("touchend",En),bn++,()=>{bn--,bn>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",xn):document.removeEventListener("touchend",En))}}function kn(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:a}=e,[l,o]=(0,v.useState)(!1),i=(0,v.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,v.useEffect)(wn,[]);let{hoverProps:s,triggerHoverEnd:c}=(0,v.useMemo)((()=>{let e=(e,r)=>{if(i.pointerType=r,a||"touch"===r||i.isHovered||!e.currentTarget.contains(e.target))return;i.isHovered=!0;let l=e.currentTarget;i.target=l,t&&t({type:"hoverstart",target:l,pointerType:r}),n&&n(!0),o(!0)},l=(e,t)=>{if(i.pointerType="",i.target=null,"touch"===t||!i.isHovered)return;i.isHovered=!1;let a=e.currentTarget;r&&r({type:"hoverend",target:a,pointerType:t}),n&&n(!1),o(!1)},s={};return"undefined"!=typeof PointerEvent?(s.onPointerEnter=t=>{yn&&"mouse"===t.pointerType||e(t,t.pointerType)},s.onPointerLeave=e=>{!a&&e.currentTarget.contains(e.target)&&l(e,e.pointerType)}):(s.onTouchStart=()=>{i.ignoreEmulatedMouseEvents=!0},s.onMouseEnter=t=>{i.ignoreEmulatedMouseEvents||yn||e(t,"mouse"),i.ignoreEmulatedMouseEvents=!1},s.onMouseLeave=e=>{!a&&e.currentTarget.contains(e.target)&&l(e,"mouse")}),{hoverProps:s,triggerHoverEnd:l}}),[t,n,r,a,i]);return(0,v.useEffect)((()=>{a&&c({currentTarget:i.target},i.pointerType)}),[a]),{hoverProps:s,isHovered:l}}function Sn(e){return ce.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function Nn({disabled:e=!1}={}){let t=(0,v.useRef)(null),[n,r]=(0,v.useState)(!1),a=oe(),l=me((()=>{t.current=null,r(!1),a.dispose()})),o=me((e=>{if(a.dispose(),null===t.current){t.current=e.currentTarget,r(!0);{let n=Sn(e.currentTarget);a.addEventListener(n,"pointerup",l,!1),a.addEventListener(n,"pointermove",(e=>{if(t.current){let n=function(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}(e);r(function(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}(n,t.current.getBoundingClientRect()))}}),!1),a.addEventListener(n,"pointercancel",l,!1)}}}));return{pressed:n,pressProps:e?{}:{onPointerDown:o,onPointerUp:l,onClick:l}}}function Tn(e,t,n){let[r,a]=(0,v.useState)(n),l=void 0!==e,o=(0,v.useRef)(l),i=(0,v.useRef)(!1),s=(0,v.useRef)(!1);return!l||o.current||i.current?!l&&o.current&&!s.current&&(s.current=!0,o.current=l,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(i.current=!0,o.current=l,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[l?e:r,me((e=>(l||a(e),null==t?void 0:t(e))))]}function Mn(e){let[t]=(0,v.useState)(e);return t}function Pn(e,t){return(0,v.useMemo)((()=>{var n;if(e.type)return e.type;let r=null!=(n=e.as)?n:"button";return"string"==typeof r&&"button"===r.toLowerCase()||"BUTTON"===(null==t?void 0:t.tagName)&&!t.hasAttribute("type")?"button":void 0}),[e.type,e.as,t])}function Ln(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}var On=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(On||{});let Cn=(0,v.createContext)(null);Cn.displayName="GroupContext";let Dn=v.Fragment,Rn=Fe((function(e,t){var n;let r=(0,v.useId)(),a=St(),l=ut(),{id:o=a||`headlessui-switch-${r}`,disabled:i=l||!1,checked:s,defaultChecked:c,onChange:u,name:d,value:m,form:f,autoFocus:p=!1,...g}=e,h=(0,v.useContext)(Cn),[y,b]=(0,v.useState)(null),E=ve((0,v.useRef)(null),t,null===h?null:h.setSwitch,b),x=Mn(c),[w,k]=Tn(s,u,null!=x&&x),_=oe(),[S,N]=(0,v.useState)(!1),T=me((()=>{N(!0),null==k||k(!w),_.nextFrame((()=>{N(!1)}))})),M=me((e=>{if(Ln(e.currentTarget))return e.preventDefault();e.preventDefault(),T()})),P=me((e=>{e.key===On.Space?(e.preventDefault(),T()):e.key===On.Enter&>(e.currentTarget)})),L=me((e=>e.preventDefault())),O=At(),C=Pt(),{isFocusVisible:D,focusProps:R}=hn({autoFocus:p}),{isHovered:A,hoverProps:F}=kn({isDisabled:i}),{pressed:I,pressProps:j}=Nn({disabled:i}),H=(0,v.useMemo)((()=>({checked:w,disabled:i,hover:A,focus:D,active:I,autofocus:p,changing:S})),[w,A,D,I,i,S,p]),z=Ae({id:o,ref:E,role:"switch",type:Pn(e,y),tabIndex:-1===e.tabIndex?0:null!=(n=e.tabIndex)?n:0,"aria-checked":w,"aria-labelledby":O,"aria-describedby":C,disabled:i||void 0,autoFocus:p,onClick:M,onKeyUp:P,onKeyPress:L},R,F,j),V=(0,v.useCallback)((()=>{if(void 0!==x)return null==k?void 0:k(x)}),[k,x]),B=Oe();return v.createElement(v.Fragment,null,null!=d&&v.createElement(wt,{disabled:i,data:{[d]:m||"on"},overrides:{type:"checkbox",checked:w},form:f,onReset:V}),B({ourProps:z,theirProps:g,slot:H,defaultTag:"button",name:"Switch"}))})),An=jt,Fn=Ct,In=Object.assign(Rn,{Group:function(e){var t;let[n,r]=(0,v.useState)(null),[a,l]=Ft(),[o,i]=Lt(),s=(0,v.useMemo)((()=>({switch:n,setSwitch:r})),[n,r]),c=e,u=Oe();return v.createElement(i,{name:"Switch.Description",value:o},v.createElement(l,{name:"Switch.Label",value:a,props:{htmlFor:null==(t=s.switch)?void 0:t.id,onClick(e){n&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},v.createElement(Cn.Provider,{value:s},u({ourProps:{},theirProps:c,slot:{},defaultTag:Dn,name:"Switch.Group"}))))},Label:An,Description:Fn});const jn=({checked:e,onToggle:t,label:n,disabled:a=!1,className:l,labelBefore:i=!1,labelClassName:s="",description:c})=>{const u=o()("group inline-flex h-6 w-11 items-center rounded-full bg-gray-300 transition data-[checked]:bg-blue-600",{"cursor-not-allowed opacity-50":a}),d=o()("flex items-center gap-3",l),m=o()({"font-medium":!s.includes("font-"),"text-sm":!s.includes("text-"),"text-gray-600":!s.includes("text-")},s);return(0,r.createElement)(Ht,{className:"grid gap-2"},(0,r.createElement)("div",{className:d},n&&i&&(0,r.createElement)(jt,{className:m},n),(0,r.createElement)(In,{checked:e,onChange:t,disabled:a,className:u},(0,r.createElement)("span",{className:o()("size-4 rounded-full bg-white transition",{"translate-x-6 rtl:-translate-x-6":e,"translate-x-1 rtl:-translate-x-1":!e})})),n&&!i&&(0,r.createElement)(jt,{className:m},n)),c&&(0,r.createElement)(Ct,{className:"text-xs text-gray-600"},c))},Hn=E("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]),zn=({slug:e,data:t})=>{const n=X[e]||Hn,[l,i]=(0,r.useState)(null),[c,u]=(0,r.useState)(!1),{title:d,description:m}=t,{doPluginAction:f,loading:p,buttonText:v}=((e,t=!1)=>{const n={install:{static:t?(0,s.__)("Install & Activate","neve"):(0,s.__)("Install","neve"),loading:(0,s.__)("Installing","neve")+"..."},activate:{static:(0,s.__)("Activate","neve"),loading:(0,s.__)("Activating","neve")+"..."},deactivate:{static:(0,s.__)("Deactivate","neve"),loading:(0,s.__)("Deactivating","neve")+"..."}},l=neveDash.plugins[e].activate,o=neveDash.plugins[e].deactivate,[i,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(neveDash.plugins[e].cta),[m,f]=(0,r.useState)(n[u].static),{setPluginState:p}=(0,a.useDispatch)("neve-dashboard");(0,r.useEffect)((()=>{f(i?n[u].loading:n[u].static)}),[i,u]);const v=async n=>{c(!0);try{let r;switch(n){case"install":if(c(!0),r=await new Promise((t=>{wp.updates.ajax("install-plugin",{slug:e,success:()=>t({success:!0}),error:e=>t({success:!1,error:e.errorMessage||(0,s.__)("Could not install plugin.","neve")})})})),r.success&&(p(e,"activate"),d("activate"),t))return await v("activate");break;case"activate":r=await(async()=>{try{return(await window.fetch(l,{headers:{"X-WP-Nonce":neveDash.nonce}})).ok?{success:!0}:{success:!1,error:(0,s.__)("Could not activate plugin.","neve")}}catch(e){return{success:!1,error:e.message||(0,s.__)("Could not activate plugin.","neve")}}})(),r.success&&(p(e,"deactivate"),d("deactivate"),"templates-patterns-collection"===e&&(window.location.href=neveDash.tpcAdminURL+(neveDash.canInstallPlugins?"&onboarding=yes":"")));break;case"deactivate":r=await(async()=>{try{return(await window.fetch(o,{headers:{"X-WP-Nonce":neveDash.nonce}})).ok?{success:!0}:{success:!1,error:(0,s.__)("Could not deactivate plugin.","neve")}}catch(e){return{success:!1,error:e.message}}})(),r.success&&(p(e,"activate"),d("activate"));break;default:r={success:!1,error:(0,s.__)("Invalid action","neve")}}return r}finally{c(!1)}};return{loading:i,buttonText:m,doPluginAction:async(e=null)=>await v(e||u)}})(e,!0);return(0,a.useSelect)((t=>{const{getPlugins:n}=t("neve-dashboard");return"deactivate"===n()[e].cta}))&&!c?null:(0,r.createElement)("div",{className:"flex items-start p-3 bg-white rounded-lg border border-gray-100 hover:shadow-md transition-shadow","data-plugin":e},(0,r.createElement)("div",{className:"flex-grow"},(0,r.createElement)("div",{className:"flex gap-4 items-center"},(0,r.createElement)(n,{className:"size-6 text-blue-500"}),(0,r.createElement)("h3",{className:"text-sm font-medium text-gray-900"},d),!c&&(0,r.createElement)("button",{onClick:async()=>{i(null);const e=await f();e.success?u(!0):e.success||i(e.error)},disabled:p,className:o()("ml-auto text-blue-600 hover:text-blue-700 text-sm font-medium flex items-center",{"opacity-75 cursor-not-allowed":p})},p&&(0,r.createElement)(nt,{size:14,className:"animate-spin mr-2"}),(0,r.createElement)("span",null,v)),c&&(0,r.createElement)("div",{className:"ml-auto"},(0,r.createElement)(Ze,{show:!0},(0,r.createElement)(it,{type:"success"},(0,s.__)("Active","neve"))))),(0,r.createElement)("p",{className:"text-sm leading-relaxed text-gray-600 mt-1"},m),l&&(0,r.createElement)("div",{className:"mt-2"},(0,r.createElement)(Je,{type:"error",dismiss:i,message:l}))))},Vn=({grid:e=!1})=>{const{plugins:t}=neveDash,n=Object.values(t).some((e=>"deactivate"!==e.cta));if(K||!n)return null;const a=o()({"space-y-3":!e,"grid gap-4 2xl:grid-cols-2":e});return(0,r.createElement)(tt,{title:(0,s.__)("Recommended Plugins","neve")},(0,r.createElement)("div",{className:a},Object.entries(t).map((([e,t])=>(0,r.createElement)(zn,{key:e,slug:e,data:t})))))},Bn=()=>(0,r.createElement)(tt,{title:(0,s.__)("Leave us a review","neve")},(0,r.createElement)("p",{className:"text-gray-600 mb-4 text-sm"},(0,s.__)("Are you are enjoying Neve? We would love to hear your feedback.","neve")),(0,r.createElement)(Z,{isExternal:!0,text:(0,s.__)("Submit a review","neve"),url:"https://wordpress.org/support/theme/neve/reviews/#new-post"})),Un=()=>{const e=(0,a.useSelect)((e=>{const{getOption:t}=e(U);return t("neve_logger_flag")})),[t,n]=(0,r.useState)("yes"===e),[l,o]=(0,r.useState)(!1),{setToast:i,setLogger:c}=(0,a.useDispatch)(U);return(0,r.createElement)(tt,{title:(0,s.__)("Contributing","neve")},(0,r.createElement)("p",{className:"text-gray-600 mb-4 text-sm"},(0,s.__)("Become a contributor by opting in to our anonymous data tracking. We guarantee no sensitive data is collected.","neve")),(0,r.createElement)(Z,{isExternal:!0,text:(0,s.__)("What do we track?","neve"),url:"https://docs.themeisle.com/article/1122-neve-usage-tracking"}),(0,r.createElement)(jn,{className:"mt-4",onToggle:e=>{o(!0),n(e),d("neve_logger_flag",e?"yes":"no",!1,!1).then((t=>{if(!t.success)return i((0,s.__)("Could not update option. Please try again.","neve")),void n(!e);c(e?"yes":"no"),i((0,s.__)("Option Updated","neve"))})).catch((()=>{i((0,s.__)("Could not update option. Please try again.","neve")),n(!e)})).finally((()=>{o(!1)}))},checked:t,label:(0,r.createElement)("div",{className:"flex items-center gap-3"},(0,s.__)("Allow Anonymous Tracking","neve"),l&&(0,r.createElement)(nt,{size:18,className:"animate-spin"}))}))},Wn=()=>(0,r.createElement)(tt,{title:(0,s.__)("Join the Community","neve")},(0,r.createElement)("p",{className:"text-gray-600 mb-4 text-sm"},(0,s.__)("Share opinions, ask questions and help each other on our Neve community!","neve")),(0,r.createElement)(Z,{isExternal:!0,text:(0,s.__)("Join our Facebook Group","neve"),url:"https://www.facebook.com/groups/648646435537266/"})),$n=()=>(0,r.createElement)("div",{className:"grid gap-6"},$&&(0,r.createElement)(st,null),$&&(0,r.createElement)(J,null),!q&&(0,r.createElement)(Bn,null),!$&&(0,r.createElement)(Vn,null),!q&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Un,null),(0,r.createElement)(Wn,null)));function qn(){return qn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qn.apply(this,arguments)}var Gn=n(247),Kn=n.n(Gn);const Yn=({children:e,className:t="",isSuccess:n=!1,isWarning:a=!1,isError:l=!1,icon:i,isAutoDismiss:s=0,onDismiss:c=(()=>{})})=>{if((0,r.useEffect)((()=>{if(s<1e3)return;const e=setTimeout((()=>{c()}),s);return()=>{clearTimeout(e)}}),[s,c]),!e)return null;const u={"text-lime-500":n,"text-orange-500":a,"text-red-500":l,"text-sky-500":!n&&!a&&!l},d=i||(n?ne:a?re:l?te:ee);return(0,r.createElement)("div",{className:o()("flex gap-2 p-3 rounded border transition-all duration-500 items-center",n?"border-lime-300 bg-lime-50 text-lime-800":a?"border-orange-300 bg-orange-50 text-yellow-800":l?"border-red-300 bg-red-50 text-red-800":"border-sky-300 bg-sky-50 text-sky-800",t)},(0,r.createElement)(d,{className:o()("size-4.5 shrink-0 mt-0.5",u)}),(0,r.createElement)("div",{className:"flex-1 flex flex-col gap-1"},e&&(0,r.createElement)("div",{className:"text-sm"},e)))},Xn=({text:e,children:t})=>{const[n,a]=(0,r.useState)(!1);return(0,r.createElement)("div",{className:"relative inline-block z-max",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1)},t,n&&(0,r.createElement)("div",{className:"absolute font-medium text-sm w-48 px-2 py-1 text-center text-white bg-gray-900 rounded shadow-lg right-0 bottom-full"},e))},Qn="installing",Zn="activating",Jn=({labels:e={},pluginData:t,successActivation:n,autoInstall:a=!1,smallButton:l=!1,description:o})=>{const{slug:i,pluginState:c,activateURL:u,name:d}=t,{getPluginStateBaseURL:f,pluginsURL:p,canInstallPlugins:v,canActivatePlugins:g,isOtterProInstalled:h}=neveDash,[y,b]=(0,r.useState)(!1),[E,x]=(0,r.useState)(""),[w,k]=(0,r.useState)(c),[_,S]=(0,r.useState)({firstLabel:!1,installing:`${(0,s.__)("Installing","neve")}...`,activating:`${(0,s.__)("Activating","neve")}...`,installActivate:(0,s.__)("Install and Activate","neve"),activate:(0,s.__)("Activate","neve"),...e}),N=e=>y||!_.firstLabel?_[e]:_.firstLabel,T=()=>{S({..._,firstLabel:!1})},M=()=>{b(Qn),T(),wp.updates.ajax("install-plugin",{slug:i,success:()=>{P()},error:e=>{"folder_exists"===e.errorCode?P():x(e.errorMessage||(0,s.__)("Something went wrong while installing the plugin.","neve"))}})},P=()=>{b(Zn),k("activate"),T(),u?m(u,!0).then((e=>{e.ok?"updateState"===n(k)&&L():x((0,s.__)("Could not activate plugin.","neve"))})):window.location.href=p};(0,r.useEffect)((()=>{a&&("install"===w&&M(),"activate"===w&&P())}),[a]);const L=()=>{m(`${f}${i}`,!1,!0).then((e=>{k(e.state)}))};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Ze,{show:!!E},(0,r.createElement)(Yn,{isError:!0},E)),!E&&(()=>{const e=v&&g,n=()=>!e&&("install"===w&&!v||"activate"===w&&!g||!("otter-blocks"!==t.slug&&"otter-pro"!==t.slug||h)&&!v),a=()=>!!y||n(),i=y===Qn,c=y===Zn,m={install:(0,r.createElement)(ot,{disabled:a()||i,isPrimary:!i,isSecondary:i,loading:i,onClick:M,isSmall:l},N(i?Qn:"installActivate")),activate:u&&(0,r.createElement)(ot,{disabled:a()||c,isPrimary:!c,isSecondary:c,loading:c,onClick:P,isSmall:l},N(c?Zn:"activate"))};return(0,r.createElement)(r.Fragment,null,o,!!m[w]&&(0,r.createElement)((()=>{if(n()){const e=(0,s.sprintf)(// translators: %s: Plugin name.
(0,s.__)("Ask your admin to enable %s on your site","neve"),d);return(0,r.createElement)(Xn,{text:e},m[w])}return m[w]}),null))})())},er=({children:e,from:t="bottom",className:n})=>{const a={left:{enterFrom:"-translate-x-2",enterTo:"translate-x-0"},right:{enterFrom:"translate-x-2",enterTo:"translate-x-0"},top:{enterFrom:"-translate-y-2",enterTo:"translate-y-0"},bottom:{enterFrom:"translate-y-2",enterTo:"translate-y-0"}},l=a[t]||a.bottom,i={enter:"ease-out duration-150",enterFrom:`opacity-0 ${l.enterFrom}`,enterTo:`opacity-100 ${l.enterTo}`};return(0,r.createElement)(Qe,qn({as:"div",show:!0,appear:!0,className:o()("transition",n)},i),e)},tr=()=>{const[e,t]=(0,r.useState)(!1);return(0,r.createElement)("div",{className:"block absolute overflow-hidden inset-0 bg-cover opacity-15 mx-auto max-w-[1300px]"},(0,r.createElement)(er,{show:e,from:"bottom",className:"delay-150"},(0,r.createElement)("img",{style:{marginTop:"-200px"},className:"transition duration-300",onLoad:()=>{t(!0)},src:`${neveDash.assets}starter.jpg`,alt:(0,s.__)("Starter Sites","neve")})))},nr=(0,a.withSelect)((e=>{const{getPlugins:t}=e("neve-dashboard");return{templatesPluginData:t()["templates-patterns-collection"]}}))((({templatesPluginData:e})=>{const{tpcPath:t,tpcOnboardingURL:n}=neveDash,a=(null==e?void 0:e.cta)||"install",l=n,o={__html:"deactivate"===a?neveDash.strings.starterSitesUnavailableUpdate:neveDash.strings.starterSitesUnavailableActive},s=()=>{window.location.href=l};return(0,r.createElement)(i,{className:"relative min-h-full"},(0,r.createElement)(tr,null),(0,r.createElement)(er,{from:"top"},(0,r.createElement)(tt,{className:"z-50 relative flex flex-col justify-center items-center text-center max-w-3xl mx-auto"},(0,r.createElement)("p",{className:"text-gray-800 text-base leading-relaxed mb-6 max-w-2xl mx-auto",dangerouslySetInnerHTML:o}),(0,r.createElement)(Jn,{successUpdate:s,successActivation:s,pluginData:{name:"Starter Sites & Templates",slug:"templates-patterns-collection",pluginBasename:t,pluginState:a,activateURL:(null==e?void 0:e.activate)||""}}))))})),rr=E("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]),ar=E("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),lr=E("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),or=({slug:e,moduleData:t})=>{const[n,l]=(0,r.useState)(!1),{licenseTier:o,isLicenseValid:i}=et(),{changeModuleStatus:c,setToast:u}=(0,a.useDispatch)(U),{moduleStatus:m}=(0,a.useSelect)((t=>{const{getModuleStatus:n}=t(U);return{moduleStatus:n(e)||!1}}));if(!$)return(0,r.createElement)(Xn,{text:(0,s.__)("These features are available in Neve Pro.","neve")},(0,r.createElement)(it,{className:"ml-2 !px-2 !py-1 text-xs bg-blue-100 text-blue-800 rounded"},(0,s.__)("Pro","neve")));const{nicename:f,availabilityLevel:p}=t,{upgradeLinks:v}=neveDash;return!i||o<p?(0,r.createElement)(ot,{isPrimary:!0,href:v[p]},(0,s.__)("Upgrade","neve")):(0,r.createElement)("div",{className:"flex gap-2 items-center"},n&&(0,r.createElement)(nt,{size:18,className:"animate-spin"}),(0,r.createElement)(jn,{checked:m,onToggle:t=>{l(!0),c(e,t),d(e,t,!0).then((n=>{if(n.success)return l(!1),void u((t?(0,s.__)("Module Activated","neve"):(0,s.__)("Module Deactivated.","neve"))+` (${f})`);c(e,!t),l(!1),u((0,s.__)("Could not activate module. Please try again.","neve"))}))},disabled:n}))},ir=({moduleData:e,slug:t})=>{const{nicename:n,description:a,documentation:l,hide:o,byline:i}=e,c=Y[t]||ar;return o?null:(0,r.createElement)(tt,{icon:(0,r.createElement)(c,{size:18}),title:n,className:"bg-white p-6 rounded-lg shadow-sm",afterTitle:(0,r.createElement)(or,{slug:t,moduleData:e}),id:`module-${t}`},(0,r.createElement)("p",{className:"text-gray-600 text-sm leading-relaxed"},a," ",l&&l.url&&(0,r.createElement)(Z,{isExternal:!0,url:l.url,text:(0,s.__)("Learn more","neve")})),i&&(0,r.createElement)("p",{className:"text-gray-600 text-xs mt-2 flex items-center"},(0,r.createElement)(lr,{size:14,className:"mr-1 text-lime-500"}),(0,r.createElement)("span",null,i)))},sr=()=>{const{isLicenseValid:e}=et();return(0,r.createElement)("div",{className:"flex items-center justify-between"},(0,r.createElement)("h2",{className:"text-lg font-semibold"},q?(0,s.__)("Manage Modules","neve"):(0,s.__)("Neve Pro Modules","neve")),!e&&(0,r.createElement)(Z,{className:"text-sm font-medium",text:(0,s.__)("Get Neve Pro","neve"),url:neveDash.upgradeURLModules,isExternal:!0}))},cr=()=>{const e=Object.entries(neveDash.modules).sort(((e,t)=>e[1].order&&t[1].order?e[1].order-t[1].order:0));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(sr,null),(0,r.createElement)("div",{className:"grid xl:grid-cols-2 gap-6"},e.map((([e,t])=>(0,r.createElement)(ir,{key:e,moduleData:t,slug:e})))))},ur=()=>(0,r.createElement)(er,{className:"grid gap-6"},(0,r.createElement)(dr,null),!$&&(0,r.createElement)(cr,null),$&&(0,r.createElement)(Vn,{grid:!0})),dr=()=>(0,r.createElement)(tt,{title:(0,s.__)("Essential Settings","neve"),icon:(0,r.createElement)(rr,{size:18})},(0,r.createElement)("div",{className:"grid sm:grid-cols-2 gap-x-8 gap-y-4"},neveDash.customizerShortcuts.map((({text:e,link:t,description:n})=>(0,r.createElement)("div",{key:t,className:"grid gap-1"},(0,r.createElement)(Z,{text:e,url:t}),n&&(0,r.createElement)("span",{className:"text-gray-600 text-xs"},n)))))),mr=E("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),fr=E("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),pr=E("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),vr=()=>(0,r.createElement)(tt,{className:"!p-0"},(0,r.createElement)("div",{className:"flex items-center py-4 px-6 border-b border-gray-200"},(0,r.createElement)("div",{className:"text-sm font-medium"},(0,s.__)("Feature","neve")),(0,r.createElement)("div",{className:"ml-auto flex items-center md:space-x-16"},(0,r.createElement)("div",{className:"w-20 text-center text-sm font-medium"},(0,s.__)("Free","neve")),(0,r.createElement)("div",{className:"w-20 text-center text-sm font-medium"},(0,s.__)("Pro","neve")))),neveDash.featureData.map((({section:e,items:t})=>(0,r.createElement)("div",{key:e},(0,r.createElement)("div",{className:"py-3 px-6 bg-gray-50 border-b border-gray-200"},(0,r.createElement)("h3",{className:"text-sm font-medium text-gray-600 uppercase"},e)),t.map(((e,t)=>(0,r.createElement)("div",{key:t,className:"border-b border-gray-200 hover:bg-gray-50"},(0,r.createElement)("div",{className:"flex items-center py-4 px-6"},(0,r.createElement)("div",{className:"max-w-2xl"},(0,r.createElement)("div",{className:"flex items-center"},(0,r.createElement)("span",{className:"text-sm font-medium text-gray-900"},e.title),e.tooltip&&(0,r.createElement)(Xn,{content:e.tooltip},(0,r.createElement)("button",{className:"ml-2"},(0,r.createElement)(mr,{className:"w-4 h-4 text-gray-400 hover:text-gray-600"})))),(0,r.createElement)("p",{className:"text-gray-600 mt-1"},e.description)),(0,r.createElement)("div",{className:"ml-auto flex items-center md:space-x-16 flex-shrink-0"},(0,r.createElement)("div",{className:"w-20 text-center"},e.free?(0,r.createElement)(ne,{className:"w-5 h-5 text-green-500 mx-auto"}):(0,r.createElement)(te,{className:"w-5 h-5 text-red-500 mx-auto"})),(0,r.createElement)("div",{className:"w-20 text-center"},(0,r.createElement)(ne,{className:"w-5 h-5 text-green-500 mx-auto"}))))))))))),gr=()=>(0,r.createElement)(tt,null,(0,r.createElement)("div",{className:"max-w-2xl mx-auto"},(0,r.createElement)("h3",{className:"text-lg font-semibold mb-4"},(0,s.__)("Need help deciding?","neve")),(0,r.createElement)("div",{className:"space-y-4 mb-6 text-gray-600"},(0,r.createElement)("p",null,(0,s.__)("Our support team is happy to answer your questions about specific Pro features and help you determine if they match your needs.","neve")),(0,r.createElement)("div",{className:"flex items-start space-x-2"},(0,r.createElement)("div",{className:"bg-gray-100 px-3 py-1.5 rounded"},(0,s.__)("Average response time: ~8 hours during business days","neve")))),(0,r.createElement)("div",{className:"flex gap-4"},(0,r.createElement)(ot,{isPrimary:!0,href:neveDash.upgradeURL,target:"_blank",className:"gap-"},(0,s.__)("View Pro Plans","neve"),(0,r.createElement)(fr,{className:"ml-2",size:16})),(0,r.createElement)(ot,{isLink:!0,href:"https://themeisle.com/contact",target:"_blank",className:"!border-gray-300"},(0,s.__)("Contact Support","neve"),(0,r.createElement)(pr,{className:"ml-2",size:16}))))),hr=()=>(0,r.createElement)("div",{className:"grid gap-6"},(0,r.createElement)(er,{from:"top"},(0,r.createElement)(vr,null)),(0,r.createElement)(er,{className:"delay-150"},(0,r.createElement)(gr,null))),yr=E("CircleFadingArrowUp",[["path",{d:"M12 2a10 10 0 0 1 7.38 16.75",key:"175t95"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}],["path",{d:"M2.5 8.875a10 10 0 0 0-.5 3",key:"1vce0s"}],["path",{d:"M2.83 16a10 10 0 0 0 2.43 3.4",key:"o3fkw4"}],["path",{d:"M4.636 5.235a10 10 0 0 1 .891-.857",key:"1szpfk"}],["path",{d:"M8.644 21.42a10 10 0 0 0 7.631-.38",key:"9yhvd4"}]]),br=E("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]),Er=E("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),xr=E("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),wr=E("MonitorDown",[["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"m15 10-3 3-3-3",key:"lzhmyn"}],["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}]]),kr=E("Tags",[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19",key:"1cbfv1"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z",key:"135mg7"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor",key:"5pm5xn"}]]);let _r=Fe((function(e,t){let n=(0,v.useId)(),r=St(),a=ut(),{id:l=r||`headlessui-input-${n}`,disabled:o=a||!1,autoFocus:i=!1,invalid:s=!1,...c}=e,u=At(),d=Pt(),{isFocused:m,focusProps:f}=hn({autoFocus:i}),{isHovered:p,hoverProps:g}=kn({isDisabled:o}),h=Ae({ref:t,id:l,"aria-labelledby":u,"aria-describedby":d,"aria-invalid":s?"":void 0,disabled:o||void 0,autoFocus:i},f,g),y=(0,v.useMemo)((()=>({disabled:o,invalid:s,hover:p,focus:m,autofocus:i})),[o,s,p,m,i]);return Oe()({ourProps:h,theirProps:c,slot:y,defaultTag:"input",name:"Input"})}));const Sr=({value:e,label:t,disabled:n,onChange:a,name:l,className:i="",type:s="text",description:c})=>{let u="input";return"textarea"===s&&(u="textarea"),(0,r.createElement)(Ht,{className:"grid gap-1"},t&&(0,r.createElement)(jt,{className:"text-sm text-gray-600 font-medium"},t),c&&(0,r.createElement)(Ct,{className:"text-xs text-gray-600"},c),(0,r.createElement)(_r,{type:s,as:r.Fragment,name:l},(0,r.createElement)(u,{type:s,value:e,onChange:a,disabled:n,className:o()("block w-full px-3 !py-1 text-sm border rounded disabled:bg-gray-100 !border-gray-300 focus:!border-gray-500 focus:!shadow-none",{"cursor-not-allowed":n},i)})))},Nr=({icon:e,label:t,description:n,locked:a,afterTitle:l=null,className:i,children:c,id:u=null})=>{const d=e||ar;return(0,r.createElement)("div",{id:u,className:o()(i,"last:pb-0 pb-6 border-b last:border-0 first:mt-0 mt-6 grid gap-6")},(0,r.createElement)("div",{className:"flex items-center gap-3"},(0,r.createElement)("div",{className:"grid gap-3 grow"},(0,r.createElement)("div",{className:"flex items-center"},null!==e&&(0,r.createElement)(d,{size:20,className:"text-blue-600 mr-2"}),(0,r.createElement)("h3",{className:"text-base font-semibold"},t),a&&(0,r.createElement)(it,{className:"ml-2 !px-2 !py-1 text-xs bg-blue-100 text-blue-800 rounded"},(0,s.__)("Pro","neve"))),n&&(0,r.createElement)("p",{className:"text-gray-600"},n)),l&&(0,r.createElement)("span",{className:"ml-auto flex gap-3 items-center shrink-0"},l)),c&&(0,r.createElement)("div",null,c))},Tr=({icon:e,label:t,description:n,option:l,isPro:o=!0,disabled:i,locked:c,placeholder:u=""})=>{const{changeModuleOption:m,setToast:f}=(0,a.useDispatch)(U),p=(0,a.useSelect)((e=>{const{getOption:t,getProOption:n}=e(U);return o?n(l):t(l)})),[v,g]=(0,r.useState)(!1);return(0,r.createElement)(Nr,{label:t,description:n,icon:e,locked:c,id:l,afterTitle:(0,r.createElement)("form",{disabled:v||i||c,onSubmit:e=>{e.preventDefault(),g(!0),d(l,p).then((e=>{e.success?f(!0):f(!!e.message&&e.message)})).finally((()=>{g(!1)}))}},(0,r.createElement)("div",{className:"flex"},(0,r.createElement)(Sr,{type:"text",id:l,placeholder:u,disabled:v||i||c,className:"!border-r-0 !rounded-r-none px-2",value:p,onChange:e=>{var t;m(l,e.target.value),"typekit_id"===l&&(null===(t=window.tiTrk)||void 0===t||t.with("neve").add({feature:"typekit-fonts",featureComponent:"typekit-id",featureValue:"enabled"}))}}),(0,r.createElement)(ot,{loading:v,type:"submit",isSecondary:!0,disabled:v||i||c,className:"rounded-r"},v?(0,s.__)("Saving","neve")+"...":(0,s.__)("Save","neve"))))})},Mr=({icon:e,label:t,description:n,option:l,isPro:o=!0,disabled:i,locked:s})=>{const[c,u]=(0,r.useState)(!1),m=(0,a.useSelect)((e=>{const{getOption:t,getProOption:n}=e(U);return o?n(l):t(l)})),{setToast:f,changeModuleOption:p}=(0,a.useDispatch)(U);return(0,r.createElement)(Nr,{label:t,description:n,icon:e,locked:s,id:l,afterTitle:(0,r.createElement)(r.Fragment,null,c&&(0,r.createElement)(nt,{size:20,className:"animate-spin"}),(0,r.createElement)(jn,{checked:m,onToggle:e=>{var t;u(!0),null===(t=window.tiTrk)||void 0===t||t.with("neve").set(l,{feature:"module-settings",featureComponent:l,featureValue:e}),p(l,e),d(l,e).then((t=>{if(!t.success)return p(l,!e),void f(!1);f(!0)})).finally((()=>{u(!1)}))},disabled:c||i||s,loading:c}))})},Pr=E("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Lr=({value:e,label:t,disabled:n,choices:a={},onChange:l})=>{const[i,c]=(0,r.useState)(!1),u=(0,r.useRef)(null),d=e=>{u.current&&!u.current.contains(e.target)&&c(!1)};return(0,r.useEffect)((()=>(i?document.addEventListener("click",d):document.removeEventListener("click",d),()=>{document.removeEventListener("click",d)})),[i]),(0,r.createElement)("div",{className:"grid gap-1"},t&&(0,r.createElement)("span",{className:"text-sm text-gray-600 font-medium"},t),(0,r.createElement)("div",{className:"relative"},(0,r.createElement)("button",{onClick:()=>!n&&c(!i),className:o()("relative w-full py-1.5 px-2 text-sm rounded border flex items-center gap-3 min-w-[200px]","border-gray-300 hover:border-gray-500",{"bg-gray-100":n}),disabled:n},(0,r.createElement)("div",{className:"flex flex-wrap gap-1 max-w-[160px] overflow-hidden"},0===Object.entries(e).length?(0,r.createElement)("span",{className:"text-gray-500"},(0,s.__)("Select options","neve"),"..."):e.map(((e,t)=>a[e]?(0,r.createElement)("span",{key:t,className:"inline-flex items-center gap-1 bg-blue-100 text-blue-800 rounded px-2 py-0.5 text-xs"},a[e]):null))),(0,r.createElement)(Pr,{size:18,className:"ml-auto transition-transform "+(i?"transform rotate-180":""),"aria-hidden":"true"})),i&&(0,r.createElement)("div",{ref:u,className:"absolute z-10 w-full mt-1 bg-white border rounded shadow-lg"},(0,r.createElement)("div",{className:"max-h-60 overflow-y-auto p-1"},Object.entries(a).map((([t,n])=>(0,r.createElement)("button",{key:t,className:"flex w-full items-center gap-2 text-sm rounded py-1.5 px-3 hover:bg-blue-100 hover:text-blue-700 cursor-pointer",onClick:()=>(t=>{const n=e.includes(t)?e.filter((e=>e!==t)):[...e,t];l(n)})(t)},(0,r.createElement)("div",{className:"w-4 h-4 border bg-white rounded flex items-center justify-center"},e.includes(t)&&(0,r.createElement)(lr,{size:12,className:"text-blue-600"})),n)))))))},Or=({icon:e,label:t,description:n,option:l,isPro:o=!0,disabled:i,locked:s,choices:c={}})=>{const[u,m]=(0,r.useState)(!1),{changeModuleOption:f,setToast:p}=(0,a.useDispatch)(U),v=(0,a.useSelect)((e=>{const{getOption:t,getProOption:n}=e(U);return o?n(l):t(l)}));return(0,r.createElement)(Nr,{label:t,description:n,icon:e,locked:s,id:l,afterTitle:(0,r.createElement)(r.Fragment,null,u&&(0,r.createElement)(nt,{size:18,className:"animate-spin shrink-0"}),(0,r.createElement)(Lr,{choices:c,value:v,disabled:u||s||i,onChange:e=>{var t;m(!0),null===(t=window.tiTrk)||void 0===t||t.with("neve").set(l,{feature:"module-settings",featureComponent:l,featureValue:e}),f(l,e),d(l,e).then((e=>{e.success?p(!0):(f(l,v),p(!1))})).finally((()=>{m(!1)}))}}))})};function Cr(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}function Dr(e,t=!1){let[n,r]=(0,v.useReducer)((()=>({})),{}),a=(0,v.useMemo)((()=>function(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}(e)),[e,n]);return ue((()=>{if(!e)return;let t=new ResizeObserver(r);return t.observe(e),()=>{t.disconnect()}}),[e]),t?{width:`${a.width}px`,height:`${a.height}px`}:a}class Rr extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}}function Ar(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...a){let l=t[e].call(n,...a);l&&(n=l,r.forEach((e=>e())))}}}function Fr(e){return(0,v.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot)}let Ir=new Rr((()=>Ar((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let n=this.slice();return n.splice(t,1),n}})));function jr(e,t){let n=Ir.get(t),r=(0,v.useId)(),a=Fr(n);if(ue((()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)}),[n,e]),!e)return!1;let l=a.indexOf(r),o=a.length;return-1===l&&(l=o,o+=1),l===o-1}let Hr=new Map,zr=new Map;function Vr(e){var t;let n=null!=(t=zr.get(e))?t:0;return zr.set(e,n+1),0!==n||(Hr.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>function(e){var t;let n=null!=(t=zr.get(e))?t:1;if(1===n?zr.delete(e):zr.set(e,n-1),1!==n)return;let r=Hr.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,Hr.delete(e))}(e)}let Br=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(","),Ur=["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var Wr,$r,qr=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(qr||{}),Gr=(($r=Gr||{})[$r.Error=0]="Error",$r[$r.Overflow=1]="Overflow",$r[$r.Success=2]="Success",$r[$r.Underflow=3]="Underflow",$r),Kr=((Wr=Kr||{})[Wr.Previous=-1]="Previous",Wr[Wr.Next=1]="Next",Wr);function Yr(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(Br)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}var Xr=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Xr||{});function Qr(e,t=0){var n;return e!==(null==(n=Sn(e))?void 0:n.body)&&Te(t,{0:()=>e.matches(Br),1(){let t=e;for(;null!==t;){if(t.matches(Br))return!0;t=t.parentElement}return!1}})}var Zr=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Zr||{});"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let Jr=["textarea","input"].join(",");function ea(e,t=(e=>e)){return e.slice().sort(((e,n)=>{let r=t(e),a=t(n);if(null===r||null===a)return 0;let l=r.compareDocumentPosition(a);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function ta(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function na(e,t,n,r){let a=de(n);(0,v.useEffect)((()=>{if(e)return document.addEventListener(t,n,r),()=>document.removeEventListener(t,n,r);function n(e){a.current(e)}}),[e,t,r])}function ra(e,t,n){let r=jr(e,"outside-click"),a=de(n),l=(0,v.useCallback)((function(e,n){if(e.defaultPrevented)return;let r=n(e);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let l=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of l)if(null!==t&&(t.contains(r)||e.composed&&e.composedPath().includes(t)))return;return!Qr(r,Xr.Loose)&&-1!==r.tabIndex&&e.preventDefault(),a.current(e,r)}),[a,t]),o=(0,v.useRef)(null);na(r,"pointerdown",(e=>{var t,n;o.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),na(r,"mousedown",(e=>{var t,n;o.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),na(r,"click",(e=>{ta()||/Android/gi.test(window.navigator.userAgent)||o.current&&(l(e,(()=>o.current)),o.current=null)}),!0);let i=(0,v.useRef)({x:0,y:0});na(r,"touchstart",(e=>{i.current.x=e.touches[0].clientX,i.current.y=e.touches[0].clientY}),!0),na(r,"touchend",(e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-i.current.x)>=30||Math.abs(n-i.current.y)>=30))return l(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),function(e,t,n,r){let a=de((e=>l(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))));(0,v.useEffect)((()=>{if(e)return window.addEventListener(t,n,r),()=>window.removeEventListener(t,n,r);function n(e){a.current(e)}}),[e,t,r])}(r,"blur",0,!0)}function aa(...e){return(0,v.useMemo)((()=>Sn(...e)),[...e])}function la(){let e;return{before({doc:t}){var n;let r=t.documentElement,a=null!=(n=t.defaultView)?n:window;e=Math.max(0,a.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,a=Math.max(0,r.clientWidth-r.offsetWidth),l=Math.max(0,e-a);n.style(r,"paddingRight",`${l}px`)}}}function oa(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let ia=Ar((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:le(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:oa(n)},a=[ta()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=le();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let a=null!=(n=window.scrollY)?n:window.pageYOffset,l=null;t.addEventListener(e,"click",(t=>{if(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:a}=new URL(n.href),o=e.querySelector(a);o&&!r(o)&&(l=o)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;a!==t&&window.scrollTo(0,a),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)}))}))}}:{},la(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];a.forEach((({before:e})=>null==e?void 0:e(r))),a.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});ia.subscribe((()=>{let e=ia.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&ia.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&ia.dispatch("TEARDOWN",n)}}));let sa=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ca(e){var t,n;let r=null!=(t=e.innerText)?t:"",a=e.cloneNode(!0);if(!(a instanceof HTMLElement))return r;let l=!1;for(let e of a.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),l=!0;let o=l?null!=(n=a.innerText)?n:"":r;return sa.test(o)&&(o=o.replace(sa,"")),o}function ua(e){return[e.screenX,e.screenY]}const da=Math.min,ma=Math.max,fa=Math.round,pa=Math.floor,va=e=>({x:e,y:e}),ga={left:"right",right:"left",bottom:"top",top:"bottom"},ha={start:"end",end:"start"};function ya(e,t,n){return ma(e,da(t,n))}function ba(e,t){return"function"==typeof e?e(t):e}function Ea(e){return e.split("-")[0]}function xa(e){return e.split("-")[1]}function wa(e){return"x"===e?"y":"x"}function ka(e){return"y"===e?"height":"width"}function _a(e){return["top","bottom"].includes(Ea(e))?"y":"x"}function Sa(e){return wa(_a(e))}function Na(e){return e.replace(/start|end/g,(e=>ha[e]))}function Ta(e){return e.replace(/left|right|bottom|top/g,(e=>ga[e]))}function Ma(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function Pa(){return"undefined"!=typeof window}function La(e){return Da(e)?(e.nodeName||"").toLowerCase():"#document"}function Oa(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ca(e){var t;return null==(t=(Da(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Da(e){return!!Pa()&&(e instanceof Node||e instanceof Oa(e).Node)}function Ra(e){return!!Pa()&&(e instanceof Element||e instanceof Oa(e).Element)}function Aa(e){return!!Pa()&&(e instanceof HTMLElement||e instanceof Oa(e).HTMLElement)}function Fa(e){return!(!Pa()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Oa(e).ShadowRoot)}function Ia(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Ua(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function ja(e){return["table","td","th"].includes(La(e))}function Ha(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function za(e){const t=Va(),n=Ra(e)?Ua(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Va(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ba(e){return["html","body","#document"].includes(La(e))}function Ua(e){return Oa(e).getComputedStyle(e)}function Wa(e){return Ra(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $a(e){if("html"===La(e))return e;const t=e.assignedSlot||e.parentNode||Fa(e)&&e.host||Ca(e);return Fa(t)?t.host:t}function qa(e){const t=$a(e);return Ba(t)?e.ownerDocument?e.ownerDocument.body:e.body:Aa(t)&&Ia(t)?t:qa(t)}function Ga(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=qa(e),l=a===(null==(r=e.ownerDocument)?void 0:r.body),o=Oa(a);if(l){const e=Ka(o);return t.concat(o,o.visualViewport||[],Ia(a)?a:[],e&&n?Ga(e):[])}return t.concat(a,Ga(a,[],n))}function Ka(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ya(e,t,n){let{reference:r,floating:a}=e;const l=_a(t),o=Sa(t),i=ka(o),s=Ea(t),c="y"===l,u=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,m=r[i]/2-a[i]/2;let f;switch(s){case"top":f={x:u,y:r.y-a.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-a.width,y:d};break;default:f={x:r.x,y:r.y}}switch(xa(t)){case"start":f[o]-=m*(n&&c?-1:1);break;case"end":f[o]+=m*(n&&c?-1:1)}return f}async function Xa(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:l,rects:o,elements:i,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:f=0}=ba(t,e),p=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}}(f),v=i[m?"floating"===d?"reference":"floating":d],g=Ma(await l.getClippingRect({element:null==(n=await(null==l.isElement?void 0:l.isElement(v)))||n?v:v.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(i.floating)),boundary:c,rootBoundary:u,strategy:s})),h="floating"===d?{x:r,y:a,width:o.floating.width,height:o.floating.height}:o.reference,y=await(null==l.getOffsetParent?void 0:l.getOffsetParent(i.floating)),b=await(null==l.isElement?void 0:l.isElement(y))&&await(null==l.getScale?void 0:l.getScale(y))||{x:1,y:1},E=Ma(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:h,offsetParent:y,strategy:s}):h);return{top:(g.top-E.top+p.top)/b.y,bottom:(E.bottom-g.bottom+p.bottom)/b.y,left:(g.left-E.left+p.left)/b.x,right:(E.right-g.right+p.right)/b.x}}function Qa(e){const t=Ua(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Aa(e),l=a?e.offsetWidth:n,o=a?e.offsetHeight:r,i=fa(n)!==l||fa(r)!==o;return i&&(n=l,r=o),{width:n,height:r,$:i}}function Za(e){return Ra(e)?e:e.contextElement}function Ja(e){const t=Za(e);if(!Aa(t))return va(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:l}=Qa(t);let o=(l?fa(n.width):n.width)/r,i=(l?fa(n.height):n.height)/a;return o&&Number.isFinite(o)||(o=1),i&&Number.isFinite(i)||(i=1),{x:o,y:i}}const el=va(0);function tl(e){const t=Oa(e);return Va()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:el}function nl(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),l=Za(e);let o=va(1);t&&(r?Ra(r)&&(o=Ja(r)):o=Ja(e));const i=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Oa(e))&&t}(l,n,r)?tl(l):va(0);let s=(a.left+i.x)/o.x,c=(a.top+i.y)/o.y,u=a.width/o.x,d=a.height/o.y;if(l){const e=Oa(l),t=r&&Ra(r)?Oa(r):r;let n=e,a=Ka(n);for(;a&&r&&t!==n;){const e=Ja(a),t=a.getBoundingClientRect(),r=Ua(a),l=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=l,c+=o,n=Oa(a),a=Ka(n)}}return Ma({width:u,height:d,x:s,y:c})}function rl(e,t){const n=Wa(e).scrollLeft;return t?t.left+n:nl(Ca(e)).left+n}function al(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:rl(e,r)),y:r.top+t.scrollTop}}function ll(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Oa(e),r=Ca(e),a=n.visualViewport;let l=r.clientWidth,o=r.clientHeight,i=0,s=0;if(a){l=a.width,o=a.height;const e=Va();(!e||e&&"fixed"===t)&&(i=a.offsetLeft,s=a.offsetTop)}return{width:l,height:o,x:i,y:s}}(e,n);else if("document"===t)r=function(e){const t=Ca(e),n=Wa(e),r=e.ownerDocument.body,a=ma(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=ma(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+rl(e);const i=-n.scrollTop;return"rtl"===Ua(r).direction&&(o+=ma(t.clientWidth,r.clientWidth)-a),{width:a,height:l,x:o,y:i}}(Ca(e));else if(Ra(t))r=function(e,t){const n=nl(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,l=Aa(e)?Ja(e):va(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:a*l.x,y:r*l.y}}(t,n);else{const n=tl(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ma(r)}function ol(e,t){const n=$a(e);return!(n===t||!Ra(n)||Ba(n))&&("fixed"===Ua(n).position||ol(n,t))}function il(e,t,n){const r=Aa(t),a=Ca(t),l="fixed"===n,o=nl(e,!0,l,t);let i={scrollLeft:0,scrollTop:0};const s=va(0);if(r||!r&&!l)if(("body"!==La(t)||Ia(a))&&(i=Wa(t)),r){const e=nl(t,!0,l,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=rl(a));const c=!a||r||l?va(0):al(a,i);return{x:o.left+i.scrollLeft-s.x-c.x,y:o.top+i.scrollTop-s.y-c.y,width:o.width,height:o.height}}function sl(e){return"static"===Ua(e).position}function cl(e,t){if(!Aa(e)||"fixed"===Ua(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Ca(e)===n&&(n=n.ownerDocument.body),n}function ul(e,t){const n=Oa(e);if(Ha(e))return n;if(!Aa(e)){let t=$a(e);for(;t&&!Ba(t);){if(Ra(t)&&!sl(t))return t;t=$a(t)}return n}let r=cl(e,t);for(;r&&ja(r)&&sl(r);)r=cl(r,t);return r&&Ba(r)&&sl(r)&&!za(r)?n:r||function(e){let t=$a(e);for(;Aa(t)&&!Ba(t);){if(za(t))return t;if(Ha(t))return null;t=$a(t)}return null}(e)||n}const dl={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const l="fixed"===a,o=Ca(r),i=!!t&&Ha(t.floating);if(r===o||i&&l)return n;let s={scrollLeft:0,scrollTop:0},c=va(1);const u=va(0),d=Aa(r);if((d||!d&&!l)&&(("body"!==La(r)||Ia(o))&&(s=Wa(r)),Aa(r))){const e=nl(r);c=Ja(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const m=!o||d||l?va(0):al(o,s,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x+m.x,y:n.y*c.y-s.scrollTop*c.y+u.y+m.y}},getDocumentElement:Ca,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l="clippingAncestors"===n?Ha(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Ga(e,[],!1).filter((e=>Ra(e)&&"body"!==La(e))),a=null;const l="fixed"===Ua(e).position;let o=l?$a(e):e;for(;Ra(o)&&!Ba(o);){const t=Ua(o),n=za(o);n||"fixed"!==t.position||(a=null),(l?!n&&!a:!n&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||Ia(o)&&!n&&ol(e,o))?r=r.filter((e=>e!==o)):a=t,o=$a(o)}return t.set(e,r),r}(t,this._c):[].concat(n),o=[...l,r],i=o[0],s=o.reduce(((e,n)=>{const r=ll(t,n,a);return e.top=ma(r.top,e.top),e.right=da(r.right,e.right),e.bottom=da(r.bottom,e.bottom),e.left=ma(r.left,e.left),e}),ll(t,i,a));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:ul,getElementRects:async function(e){const t=this.getOffsetParent||ul,n=this.getDimensions,r=await n(e.floating);return{reference:il(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Qa(e);return{width:t,height:n}},getScale:Ja,isElement:Ra,isRTL:function(e){return"rtl"===Ua(e).direction}};function ml(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:l=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:i="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=Za(e),u=a||l?[...c?Ga(c):[],...Ga(t)]:[];u.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)}));const d=c&&i?function(e,t){let n,r=null;const a=Ca(e);function l(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function o(i,s){void 0===i&&(i=!1),void 0===s&&(s=1),l();const{left:c,top:u,width:d,height:m}=e.getBoundingClientRect();if(i||t(),!d||!m)return;const f={rootMargin:-pa(u)+"px "+-pa(a.clientWidth-(c+d))+"px "+-pa(a.clientHeight-(u+m))+"px "+-pa(c)+"px",threshold:ma(0,da(1,s))||1};let p=!0;function v(e){const t=e[0].intersectionRatio;if(t!==s){if(!p)return o();t?o(!1,t):n=setTimeout((()=>{o(!1,1e-7)}),1e3)}p=!1}try{r=new IntersectionObserver(v,{...f,root:a.ownerDocument})}catch(e){r=new IntersectionObserver(v,f)}r.observe(e)}(!0),l}(c,n):null;let m,f=-1,p=null;o&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),c&&!s&&p.observe(c),p.observe(t));let v=s?nl(e):null;return s&&function t(){const r=nl(e);!v||r.x===v.x&&r.y===v.y&&r.width===v.width&&r.height===v.height||n(),v=r,m=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{a&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const fl=Xa,pl=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:l,placement:o,middlewareData:i}=t,s=await async function(e,t){const{placement:n,platform:r,elements:a}=e,l=await(null==r.isRTL?void 0:r.isRTL(a.floating)),o=Ea(n),i=xa(n),s="y"===_a(n),c=["left","top"].includes(o)?-1:1,u=l&&s?-1:1,d=ba(t,e);let{mainAxis:m,crossAxis:f,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&"number"==typeof p&&(f="end"===i?-1*p:p),s?{x:f*u,y:m*c}:{x:m*c,y:f*u}}(t,e);return o===(null==(n=i.offset)?void 0:n.placement)&&null!=(r=i.arrow)&&r.alignmentOffset?{}:{x:a+s.x,y:l+s.y,data:{...s,placement:o}}}}},vl=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:l=!0,crossAxis:o=!1,limiter:i={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=ba(e,t),c={x:n,y:r},u=await Xa(t,s),d=_a(Ea(a)),m=wa(d);let f=c[m],p=c[d];if(l){const e="y"===m?"bottom":"right";f=ya(f+u["y"===m?"top":"left"],f,f-u[e])}if(o){const e="y"===d?"bottom":"right";p=ya(p+u["y"===d?"top":"left"],p,p-u[e])}const v=i.fn({...t,[m]:f,[d]:p});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:l,[d]:o}}}}}},gl=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:l,rects:o,initialPlacement:i,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...g}=ba(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};const h=Ea(a),y=_a(i),b=Ea(i)===i,E=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=m||(b||!v?[Ta(i)]:function(e){const t=Ta(e);return[Na(e),t,Na(t)]}(i)),w="none"!==p;!m&&w&&x.push(...function(e,t,n,r){const a=xa(e);let l=function(e,t,n){const r=["left","right"],a=["right","left"],l=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":return t?l:o;default:return[]}}(Ea(e),"start"===n,r);return a&&(l=l.map((e=>e+"-"+a)),t&&(l=l.concat(l.map(Na)))),l}(i,v,p,E));const k=[i,...x],_=await Xa(t,g),S=[];let N=(null==(r=l.flip)?void 0:r.overflows)||[];if(u&&S.push(_[h]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=xa(e),a=Sa(e),l=ka(a);let o="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[l]>t.floating[l]&&(o=Ta(o)),[o,Ta(o)]}(a,o,E);S.push(_[e[0]],_[e[1]])}if(N=[...N,{placement:a,overflows:S}],!S.every((e=>e<=0))){var T,M;const e=((null==(T=l.flip)?void 0:T.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:N},reset:{placement:t}};let n=null==(M=N.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:M.placement;if(!n)switch(f){case"bestFit":{var P;const e=null==(P=N.filter((e=>{if(w){const t=_a(e.placement);return t===y||"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=i}if(a!==n)return{reset:{placement:n}}}return{}}}},hl=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:l,platform:o,elements:i}=t,{apply:s=(()=>{}),...c}=ba(e,t),u=await Xa(t,c),d=Ea(a),m=xa(a),f="y"===_a(a),{width:p,height:v}=l.floating;let g,h;"top"===d||"bottom"===d?(g=d,h=m===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(h=d,g="end"===m?"top":"bottom");const y=v-u.top-u.bottom,b=p-u.left-u.right,E=da(v-u[g],y),x=da(p-u[h],b),w=!t.middlewareData.shift;let k=E,_=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(_=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(k=y),w&&!m){const e=ma(u.left,0),t=ma(u.right,0),n=ma(u.top,0),r=ma(u.bottom,0);f?_=p-2*(0!==e||0!==t?e+t:ma(u.left,u.right)):k=v-2*(0!==n||0!==r?n+r:ma(u.top,u.bottom))}await s({...t,availableWidth:_,availableHeight:k});const S=await o.getDimensions(i.floating);return p!==S.width||v!==S.height?{reset:{rects:!0}}:{}}}},yl=(e,t,n)=>{const r=new Map,a={platform:dl,...n},l={...a.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:l=[],platform:o}=n,i=l.filter(Boolean),s=await(null==o.isRTL?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=Ya(c,r,s),m=r,f={},p=0;for(let n=0;n<i.length;n++){const{name:l,fn:v}=i[n],{x:g,y:h,data:y,reset:b}=await v({x:u,y:d,initialPlacement:r,placement:m,strategy:a,middlewareData:f,rects:c,platform:o,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=h?h:d,f={...f,[l]:{...f[l],...y}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(m=b.placement),b.rects&&(c=!0===b.rects?await o.getElementRects({reference:e,floating:t,strategy:a}):b.rects),({x:u,y:d}=Ya(c,m,s))),n=-1)}return{x:u,y:d,placement:m,strategy:a,middlewareData:f}})(e,t,{...a,platform:l})};var bl="undefined"!=typeof document?v.useLayoutEffect:v.useEffect;function El(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!El(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){const n=a[r];if(!("_owner"===n&&e.$$typeof||El(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function xl(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wl(e,t){const n=xl(e);return Math.round(t*n)/n}function kl(e){const t=v.useRef(e);return bl((()=>{t.current=e})),t}const _l=(e,t)=>({...pl(e),options:[e,t]}),Sl=(e,t)=>({...gl(e),options:[e,t]}),Nl=(e,t)=>({...hl(e),options:[e,t]}),Tl={...g},Ml=Tl.useInsertionEffect||(e=>e());function Pl(e){const t=v.useRef((()=>{}));return Ml((()=>{t.current=e})),v.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}var Ll="undefined"!=typeof document?v.useLayoutEffect:v.useEffect;let Ol=!1,Cl=0;const Dl=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Cl++,Rl=Tl.useId||function(){const[e,t]=v.useState((()=>Ol?Dl():void 0));return Ll((()=>{null==e&&t(Dl())}),[]),v.useEffect((()=>{Ol=!0}),[]),e};const Al=v.createContext(null),Fl=v.createContext(null);function Il(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,a=Rl(),l=v.useRef({}),[o]=v.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),i=null!=((null==(f=v.useContext(Al))?void 0:f.id)||null),[s,c]=v.useState(r.reference),u=Pl(((e,t,r)=>{l.current.openEvent=e?t:void 0,o.emit("openchange",{open:e,event:t,reason:r,nested:i}),null==n||n(e,t,r)})),d=v.useMemo((()=>({setPositionReference:c})),[]),m=v.useMemo((()=>({reference:s||r.reference||null,floating:r.floating||null,domReference:r.reference})),[s,r.reference,r.floating]);var f;return v.useMemo((()=>({dataRef:l,open:t,onOpenChange:u,elements:m,events:o,floatingId:a,refs:d})),[t,u,m,o,a,d])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,a=r.elements,[l,o]=v.useState(null),[i,s]=v.useState(null),c=(null==a?void 0:a.domReference)||l,u=v.useRef(null),d=v.useContext(Fl);Ll((()=>{c&&(u.current=c)}),[c]);const m=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:l,floating:o}={},transform:i=!0,whileElementsMounted:s,open:c}=e,[u,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=v.useState(r);El(m,r)||f(r);const[p,g]=v.useState(null),[h,y]=v.useState(null),b=v.useCallback((e=>{e!==k.current&&(k.current=e,g(e))}),[]),E=v.useCallback((e=>{e!==_.current&&(_.current=e,y(e))}),[]),x=l||p,w=o||h,k=v.useRef(null),_=v.useRef(null),S=v.useRef(u),N=null!=s,T=kl(s),M=kl(a),P=kl(c),L=v.useCallback((()=>{if(!k.current||!_.current)return;const e={placement:t,strategy:n,middleware:m};M.current&&(e.platform=M.current),yl(k.current,_.current,e).then((e=>{const t={...e,isPositioned:!1!==P.current};O.current&&!El(S.current,t)&&(S.current=t,mt.flushSync((()=>{d(t)})))}))}),[m,t,n,M,P]);bl((()=>{!1===c&&S.current.isPositioned&&(S.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const O=v.useRef(!1);bl((()=>(O.current=!0,()=>{O.current=!1})),[]),bl((()=>{if(x&&(k.current=x),w&&(_.current=w),x&&w){if(T.current)return T.current(x,w,L);L()}}),[x,w,L,T,N]);const C=v.useMemo((()=>({reference:k,floating:_,setReference:b,setFloating:E})),[b,E]),D=v.useMemo((()=>({reference:x,floating:w})),[x,w]),R=v.useMemo((()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=wl(D.floating,u.x),r=wl(D.floating,u.y);return i?{...e,transform:"translate("+t+"px, "+r+"px)",...xl(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,i,D.floating,u.x,u.y]);return v.useMemo((()=>({...u,update:L,refs:C,elements:D,floatingStyles:R})),[u,L,C,D,R])}({...e,elements:{...a,...i&&{reference:i}}}),f=v.useCallback((e=>{const t=Ra(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;s(t),m.refs.setReference(t)}),[m.refs]),p=v.useCallback((e=>{(Ra(e)||null===e)&&(u.current=e,o(e)),(Ra(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!Ra(e))&&m.refs.setReference(e)}),[m.refs]),g=v.useMemo((()=>({...m.refs,setReference:p,setPositionReference:f,domReference:u})),[m.refs,p,f]),h=v.useMemo((()=>({...m.elements,domReference:c})),[m.elements,c]),y=v.useMemo((()=>({...m,...r,refs:g,elements:h,nodeId:t})),[m,g,h,t,r]);return Ll((()=>{r.dataRef.current.floatingContext=y;const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===t));e&&(e.context=y)})),v.useMemo((()=>({...m,context:y,refs:g,elements:h})),[m,g,h,y])}const jl="active",Hl="selected";function zl(e,t,n){const r=new Map,a="item"===n;let l=e;if(a&&e){const{[jl]:t,[Hl]:__,...n}=e;l=n}return{..."floating"===n&&{tabIndex:-1,"data-floating-ui-focusable":""},...l,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,l]=t;var o;a&&[jl,Hl].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof l&&(null==(o=r.get(n))||o.push(l),e[n]=function(){for(var e,t=arguments.length,a=new Array(t),l=0;l<t;l++)a[l]=arguments[l];return null==(e=r.get(n))?void 0:e.map((e=>e(...a))).find((e=>void 0!==e))})):e[n]=l)})),e):e),{})}}function Vl(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}let Bl=(0,v.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Bl.displayName="FloatingContext";let Ul=(0,v.createContext)(null);function Wl({children:e,enabled:t=!0}){let[n,r]=(0,v.useState)(null),[a,l]=(0,v.useState)(0),o=(0,v.useRef)(null),[i,s]=(0,v.useState)(null);!function(e){ue((()=>{if(!e)return;let t=new MutationObserver((()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)}));return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}}),[e])}(i);let c=t&&null!==n&&null!==i,{to:u="bottom",gap:d=0,offset:m=0,padding:f=0,inner:p}=function(e,t){var n,r,a;let l=$l(null!=(n=null==e?void 0:e.gap)?n:"var(--anchor-gap, 0)",t),o=$l(null!=(r=null==e?void 0:e.offset)?r:"var(--anchor-offset, 0)",t),i=$l(null!=(a=null==e?void 0:e.padding)?a:"var(--anchor-padding, 0)",t);return{...e,gap:l,offset:o,padding:i}}(n,i),[g,h="center"]=u.split(" ");ue((()=>{c&&l(0)}),[c]);let{refs:y,floatingStyles:b,context:E}=Il({open:c,placement:"selection"===g?"center"===h?"bottom":`bottom-${h}`:"center"===h?`${g}`:`${g}-${h}`,strategy:"absolute",transform:!1,middleware:[_l({mainAxis:"selection"===g?0:d,crossAxis:m}),(_={padding:f},{...vl(_),options:[_,undefined]}),"selection"!==g&&Sl({padding:f}),"selection"===g&&p?(k={...p,padding:f,overflowRef:o,offset:a,minItemsVisible:4,referenceOverflowThreshold:f,onFallbackChange(e){var t,n;if(!e)return;let r=E.elements.floating;if(!r)return;let a=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,o=Math.min(4,r.childElementCount),i=0,s=0;for(let e of null!=(n=null==(t=E.elements.floating)?void 0:t.childNodes)?n:[])if(e instanceof HTMLElement){let t=e.offsetTop,n=t+e.clientHeight+a,l=r.scrollTop,c=l+r.clientHeight;if(!(t>=l&&n<=c)){s=Math.max(0,Math.min(n,c)-Math.max(t,l)),i=e.clientHeight;break}o--}o>=1&&l((e=>{let t=i*o-s+a;return e>=t?e:t}))}},{name:"inner",options:k,async fn(e){const{listRef:t,overflowRef:n,onFallbackChange:r,offset:a=0,index:l=0,minItemsVisible:o=4,referenceOverflowThreshold:i=0,scrollRef:s,...c}=ba(k,e),{rects:u,elements:{floating:d}}=e,m=t.current[l],f=(null==s?void 0:s.current)||d,p=d.clientTop||f.clientTop,v=0!==d.clientTop,g=0!==f.clientTop,h=d===f;if(!m)return{};const y={...e,...await _l(-m.offsetTop-d.clientTop-u.reference.height/2-m.offsetHeight/2-a).fn(e)},b=await fl(Vl(y,f.scrollHeight+p+d.clientTop),c),E=await fl(y,{...c,elementContext:"reference"}),x=ma(0,b.top),w=y.y+x,_=f.scrollHeight>f.clientHeight?e=>e:fa,S=_(ma(0,f.scrollHeight+(v&&h||g?2*p:0)-x-ma(0,b.bottom)));if(f.style.maxHeight=S+"px",f.scrollTop=x,r){const e=f.offsetHeight<m.offsetHeight*da(o,t.current.length)-1||E.top>=-i||E.bottom>=-i;mt.flushSync((()=>r(e)))}return n&&(n.current=await fl(Vl({...y,y:w},f.offsetHeight+p+d.clientTop),c)),{y:w}}}):null,Nl({padding:f,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:ml}),[x=g,w=h]=E.placement.split("-");var k,_;"selection"===g&&(x="selection");let S=(0,v.useMemo)((()=>({anchor:[x,w].filter(Boolean).join(" ")})),[x,w]),N=function(e,t){const{open:n,elements:r}=e,{enabled:a=!0,overflowRef:l,scrollRef:o,onChange:i}=t,s=Pl(i),c=v.useRef(!1),u=v.useRef(null),d=v.useRef(null);v.useEffect((()=>{if(!a)return;function e(e){if(e.ctrlKey||!t||null==l.current)return;const n=e.deltaY,r=l.current.top>=-.5,a=l.current.bottom>=-.5,o=t.scrollHeight-t.clientHeight,i=n<0?-1:1,c=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!r&&n>0||!a&&n<0?(e.preventDefault(),mt.flushSync((()=>{s((e=>e+Math[c](n,o*i)))}))):/firefox/i.test(function(){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}())&&(t.scrollTop+=n))}const t=(null==o?void 0:o.current)||r.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame((()=>{u.current=t.scrollTop,null!=l.current&&(d.current={...l.current})})),()=>{u.current=null,d.current=null,t.removeEventListener("wheel",e)}):void 0}),[a,n,r.floating,l,o,s]);const m=v.useMemo((()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const e=(null==o?void 0:o.current)||r.floating;if(l.current&&e&&c.current){if(null!==u.current){const t=e.scrollTop-u.current;(l.current.bottom<-.5&&t<-1||l.current.top<-.5&&t>1)&&mt.flushSync((()=>s((e=>e+t))))}requestAnimationFrame((()=>{u.current=e.scrollTop}))}}})),[r.floating,s,l,o]);return v.useMemo((()=>a?{floating:m}:{}),[a,m])}(E,{overflowRef:o,onChange:l}),{getReferenceProps:T,getFloatingProps:M}=function(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)),r=e.map((e=>null==e?void 0:e.item)),a=v.useCallback((t=>zl(t,e,"reference")),t),l=v.useCallback((t=>zl(t,e,"floating")),n),o=v.useCallback((t=>zl(t,e,"item")),r);return v.useMemo((()=>({getReferenceProps:a,getFloatingProps:l,getItemProps:o})),[a,l,o])}([N]),P=me((e=>{s(e),y.setFloating(e)}));return v.createElement(Ul.Provider,{value:r},v.createElement(Bl.Provider,{value:{setFloating:P,setReference:y.setReference,styles:b,getReferenceProps:T,getFloatingProps:M,slot:S}},e))}function $l(e,t,n){let r=oe(),a=me(((e,t)=>{if(null==e)return[n,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[n,null];let a=Gl(e,t);return[a,n=>{let l=ql(e);{let o=l.map((e=>window.getComputedStyle(t).getPropertyValue(e)));r.requestAnimationFrame((function i(){r.nextFrame(i);let s=!1;for(let[e,n]of l.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(o[e]!==r){o[e]=r,s=!0;break}}if(!s)return;let c=Gl(e,t);a!==c&&(n(c),a=c)}))}return r.dispose}]}return[n,null]})),l=(0,v.useMemo)((()=>a(e,t)[0]),[e,t]),[o=l,i]=(0,v.useState)();return ue((()=>{let[n,r]=a(e,t);if(i(n),r)return r(i)}),[e,t]),o}function ql(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(",");if(-1===e)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...ql(r)]:[n]}return[]}function Gl(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}Ul.displayName="PlacementContext";var Kl=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Kl||{});function Yl(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),a=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:-1===a&&(a=n.length);for(let e=a-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=a+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}}let Xl=(0,v.createContext)(!1);let Ql=v.Fragment,Zl=Fe((function(e,t){let n=e,r=(0,v.useRef)(null),a=ve(function(e,t=!0){return Object.assign(e,{[pe]:t})}((e=>{r.current=e})),t),l=aa(r),o=function(e){let t=(0,v.useContext)(Xl),n=(0,v.useContext)(eo),r=aa(e),[a,l]=(0,v.useState)((()=>{var e;if(!t&&null!==n)return null!=(e=n.current)?e:null;if(ce.isServer)return null;let a=null==r?void 0:r.getElementById("headlessui-portal-root");if(a)return a;if(null===r)return null;let l=r.createElement("div");return l.setAttribute("id","headlessui-portal-root"),r.body.appendChild(l)}));return(0,v.useEffect)((()=>{null!==a&&(null!=r&&r.body.contains(a)||null==r||r.body.appendChild(a))}),[a,r]),(0,v.useEffect)((()=>{t||null!==n&&l(n.current)}),[n,l,t]),a}(r),[i]=(0,v.useState)((()=>{var e;return ce.isServer?null:null!=(e=null==l?void 0:l.createElement("div"))?e:null})),s=(0,v.useContext)(to),c=fe();ue((()=>{!o||!i||o.contains(i)||(i.setAttribute("data-headlessui-portal",""),o.appendChild(i))}),[o,i]),ue((()=>{if(i&&s)return s.register(i)}),[s,i]),function(e){let t=me(e),n=(0,v.useRef)(!1);(0,v.useEffect)((()=>(n.current=!1,()=>{n.current=!0,ae((()=>{n.current&&t()}))})),[t])}((()=>{var e;!o||!i||(i instanceof Node&&o.contains(i)&&o.removeChild(i),o.childNodes.length<=0&&(null==(e=o.parentElement)||e.removeChild(o)))}));let u=Oe();return c&&o&&i?(0,mt.createPortal)(u({ourProps:{ref:a},theirProps:n,slot:{},defaultTag:Ql,name:"Portal"}),i):null})),Jl=v.Fragment,eo=(0,v.createContext)(null),to=(0,v.createContext)(null),no=Fe((function(e,t){let n=ve(t),{enabled:r=!0,...a}=e,l=Oe();return r?v.createElement(Zl,{...a,ref:n}):l({ourProps:{ref:n},theirProps:a,slot:{},defaultTag:Ql,name:"Portal"})})),ro=Fe((function(e,t){let{target:n,...r}=e,a={ref:ve(t)},l=Oe();return v.createElement(eo.Provider,{value:n},l({ourProps:a,theirProps:r,defaultTag:Jl,name:"Popover.Group"}))})),ao=Object.assign(no,{Group:ro});var lo=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(lo||{}),oo=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(oo||{}),io=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(io||{}),so=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(so||{});function co(e,t=(e=>e)){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=ea(t(e.options.slice()),(e=>e.dataRef.current.domRef.current)),a=n?r.indexOf(n):null;return-1===a&&(a=null),{options:r,activeOptionIndex:a}}let uo={1:e=>e.dataRef.current.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1},0(e){if(e.dataRef.current.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex((e=>n(e.dataRef.current.value)));return-1!==r&&(t=r),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var n,r,a,l,o;if(e.dataRef.current.disabled||1===e.listboxState)return e;let i={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===Kl.Nothing)return{...i,activeOptionIndex:null};if(t.focus===Kl.Specific)return{...i,activeOptionIndex:e.options.findIndex((e=>e.id===t.id))};if(t.focus===Kl.Previous){let n=e.activeOptionIndex;if(null!==n){let l=e.options[n].dataRef.current.domRef,o=Yl(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==o){let t=e.options[o].dataRef.current.domRef;if((null==(r=l.current)?void 0:r.previousElementSibling)===t.current||null===(null==(a=t.current)?void 0:a.previousElementSibling))return{...i,activeOptionIndex:o}}}}else if(t.focus===Kl.Next){let n=e.activeOptionIndex;if(null!==n){let r=e.options[n].dataRef.current.domRef,a=Yl(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==a){let t=e.options[a].dataRef.current.domRef;if((null==(l=r.current)?void 0:l.nextElementSibling)===t.current||null===(null==(o=t.current)?void 0:o.nextElementSibling))return{...i,activeOptionIndex:a}}}}let s=co(e),c=Yl(t,{resolveItems:()=>s.options,resolveActiveIndex:()=>s.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...i,...s,activeOptionIndex:c}},3:(e,t)=>{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),a=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find((e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))})),l=a?e.options.indexOf(a):-1;return-1===l||l===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:l,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=co(e,(e=>[...e,n]));return null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=co(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},mo=(0,v.createContext)(null);function fo(e){let t=(0,v.useContext)(mo);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,fo),t}return t}mo.displayName="ListboxActionsContext";let po=(0,v.createContext)(null);function vo(e){let t=(0,v.useContext)(po);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,vo),t}return t}function go(e,t){return Te(t.type,uo,e,t)}po.displayName="ListboxDataContext";let ho=v.Fragment,yo=(0,v.createContext)(!1),bo=Pe.RenderStrategy|Pe.Static,Eo=v.Fragment,xo=Fe((function(e,t){var n;let r=ut(),{value:a,defaultValue:l,form:o,name:i,onChange:s,by:c,invalid:u=!1,disabled:d=r||!1,horizontal:m=!1,multiple:f=!1,__demoMode:p=!1,...g}=e;const h=m?"horizontal":"vertical";let y=ve(t),b=Mn(l),[E=(f?[]:void 0),x]=Tn(a,s,b),[w,k]=(0,v.useReducer)(go,{dataRef:(0,v.createRef)(),listboxState:p?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:p}),_=(0,v.useRef)({static:!1,hold:!1}),S=(0,v.useRef)(new Map),N=function(e=Cr){return(0,v.useCallback)(((t,n)=>{if("string"==typeof e){let r=e;return(null==t?void 0:t[r])===(null==n?void 0:n[r])}return e(t,n)}),[e])}(c),T=(0,v.useCallback)((e=>Te(M.mode,{1:()=>E.some((t=>N(t,e))),0:()=>N(E,e)})),[E]),M=(0,v.useMemo)((()=>({...w,value:E,disabled:d,invalid:u,mode:f?1:0,orientation:h,compare:N,isSelected:T,optionsPropsRef:_,listRef:S})),[E,d,u,f,w,S]);ue((()=>{w.dataRef.current=M}),[M]),ra(0===M.listboxState,[M.buttonElement,M.optionsElement],((e,t)=>{var n;k({type:1}),Qr(t,Xr.Loose)||(e.preventDefault(),null==(n=M.buttonElement)||n.focus())}));let P=(0,v.useMemo)((()=>({open:0===M.listboxState,disabled:d,invalid:u,value:E})),[M,d,E,u]),L=me((e=>{let t=M.options.find((t=>t.id===e));t&&I(t.dataRef.current.value)})),O=me((()=>{if(null!==M.activeOptionIndex){let{dataRef:e,id:t}=M.options[M.activeOptionIndex];I(e.current.value),k({type:2,focus:Kl.Specific,id:t})}})),C=me((()=>k({type:0}))),D=me((()=>k({type:1}))),R=oe(),A=me(((e,t,n)=>{R.dispose(),R.microTask((()=>e===Kl.Specific?k({type:2,focus:Kl.Specific,id:t,trigger:n}):k({type:2,focus:e,trigger:n})))})),F=me(((e,t)=>(k({type:5,id:e,dataRef:t}),()=>k({type:6,id:e})))),I=me((e=>Te(M.mode,{0:()=>null==x?void 0:x(e),1(){let t=M.value.slice(),n=t.findIndex((t=>N(t,e)));return-1===n?t.push(e):t.splice(n,1),null==x?void 0:x(t)}}))),j=me((e=>k({type:3,value:e}))),H=me((()=>k({type:4}))),z=me((e=>{k({type:7,element:e})})),V=me((e=>{k({type:8,element:e})})),B=(0,v.useMemo)((()=>({onChange:I,registerOption:F,goToOption:A,closeListbox:D,openListbox:C,selectActiveOption:O,selectOption:L,search:j,clearSearch:H,setButtonElement:z,setOptionsElement:V})),[]),[U,W]=Ft({inherit:!0}),$={ref:y},q=(0,v.useCallback)((()=>{if(void 0!==b)return null==x?void 0:x(b)}),[x,b]),G=Oe();return v.createElement(W,{value:U,props:{htmlFor:null==(n=M.buttonElement)?void 0:n.id},slot:{open:0===M.listboxState,disabled:d}},v.createElement(Wl,null,v.createElement(mo.Provider,{value:B},v.createElement(po.Provider,{value:M},v.createElement(Se,{value:Te(M.listboxState,{0:ke.Open,1:ke.Closed})},null!=i&&null!=E&&v.createElement(wt,{disabled:d,data:{[i]:E},form:o,onReset:q}),G({ourProps:$,theirProps:g,slot:P,defaultTag:ho,name:"Listbox"}))))))})),wo=Fe((function(e,t){var n;let r=vo("Listbox.Button"),a=fo("Listbox.Button"),l=(0,v.useId)(),o=St(),{id:i=o||`headlessui-listbox-button-${l}`,disabled:s=r.disabled||!1,autoFocus:c=!1,...u}=e,d=ve(t,(0,v.useContext)(Bl).setReference,a.setButtonElement),m=(0,v.useContext)(Bl).getReferenceProps,f=me((e=>{switch(e.key){case On.Enter:gt(e.currentTarget);break;case On.Space:case On.ArrowDown:e.preventDefault(),(0,mt.flushSync)((()=>a.openListbox())),r.value||a.goToOption(Kl.First);break;case On.ArrowUp:e.preventDefault(),(0,mt.flushSync)((()=>a.openListbox())),r.value||a.goToOption(Kl.Last)}})),p=me((e=>{e.key===On.Space&&e.preventDefault()})),g=me((e=>{var t;if(Ln(e.currentTarget))return e.preventDefault();0===r.listboxState?((0,mt.flushSync)((()=>a.closeListbox())),null==(t=r.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),a.openListbox())})),h=me((e=>e.preventDefault())),y=At([i]),b=Pt(),{isFocusVisible:E,focusProps:x}=hn({autoFocus:c}),{isHovered:w,hoverProps:k}=kn({isDisabled:s}),{pressed:_,pressProps:S}=Nn({disabled:s}),N=(0,v.useMemo)((()=>({open:0===r.listboxState,active:_||0===r.listboxState,disabled:s,invalid:r.invalid,value:r.value,hover:w,focus:E,autofocus:c})),[r.listboxState,r.value,s,w,E,_,r.invalid,c]),T=Ae(m(),{ref:d,id:i,type:Pn(e,r.buttonElement),"aria-haspopup":"listbox","aria-controls":null==(n=r.optionsElement)?void 0:n.id,"aria-expanded":0===r.listboxState,"aria-labelledby":y,"aria-describedby":b,disabled:s||void 0,autoFocus:c,onKeyDown:f,onKeyUp:p,onKeyPress:h,onClick:g},x,k,S);return Oe()({ourProps:T,theirProps:u,slot:N,defaultTag:"button",name:"Listbox.Button"})})),ko=jt,_o=Fe((function(e,t){var n,r;let a=(0,v.useId)(),{id:l=`headlessui-listbox-options-${a}`,anchor:o,portal:i=!1,modal:s=!0,transition:c=!1,...u}=e,d=function(e){return(0,v.useMemo)((()=>e?"string"==typeof e?{to:e}:e:null),[e])}(o),[m,f]=(0,v.useState)(null);d&&(i=!0);let p=vo("Listbox.Options"),g=fo("Listbox.Options"),h=aa(p.optionsElement),y=_e(),[b,E]=xe(c,m,null!==y?(y&ke.Open)===ke.Open:0===p.listboxState);!function(e,t,n){let r=de((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()}));(0,v.useEffect)((()=>{if(!e)return;let n=null===t?null:t instanceof HTMLElement?t:t.current;if(!n)return;let a=le();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>r.current(n)));e.observe(n),a.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>r.current(n)));e.observe(n),a.add((()=>e.disconnect()))}return()=>a.dispose()}),[t,r,e])}(b,p.buttonElement,g.closeListbox),function(e,t,n=(()=>[document.body])){!function(e,t,n=(()=>({containers:[]}))){let r=Fr(ia),a=t?r.get(t):void 0;a&&a.count,ue((()=>{if(t&&e)return ia.dispatch("PUSH",t,n),()=>ia.dispatch("POP",t,n)}),[e,t])}(jr(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}(!p.__demoMode&&s&&0===p.listboxState,h),function(e,{allowed:t,disallowed:n}={}){let r=jr(e,"inert-others");ue((()=>{var e,a;if(!r)return;let l=le();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&l.add(Vr(t));let o=null!=(a=null==t?void 0:t())?a:[];for(let e of o){if(!e)continue;let t=Sn(e);if(!t)continue;let n=e.parentElement;for(;n&&n!==t.body;){for(let e of n.children)o.some((t=>e.contains(t)))||l.add(Vr(e));n=n.parentElement}}return l.dispose}),[r,t,n])}(!p.__demoMode&&s&&0===p.listboxState,{allowed:(0,v.useCallback)((()=>[p.buttonElement,p.optionsElement]),[p.buttonElement,p.optionsElement])});let x=!function(e,t){let n=(0,v.useRef)({left:0,top:0});if(ue((()=>{if(!t)return;let e=t.getBoundingClientRect();e&&(n.current=e)}),[e,t]),null==t||!e||t===document.activeElement)return!1;let r=t.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}(0!==p.listboxState,p.buttonElement)&&b,w=function(e,t){let[n,r]=(0,v.useState)(t);return!e&&n!==t&&r(t),e?n:t}(b&&1===p.listboxState,p.value),k=me((e=>p.compare(w,e))),_=(0,v.useMemo)((()=>{var e;if(null==d||null==(e=null==d?void 0:d.to)||!e.includes("selection"))return null;let t=p.options.findIndex((e=>k(e.dataRef.current.value)));return-1===t&&(t=0),t}),[d,p.options]),S=(()=>{if(null==d)return;if(null===_)return{...d,inner:void 0};let e=Array.from(p.listRef.current.values());return{...d,inner:{listRef:{current:e},index:_}}})(),[N,T]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=(0,v.useContext)(Ul),n=(0,v.useMemo)((()=>e),[JSON.stringify(e,((e,t)=>{var n;return null!=(n=null==t?void 0:t.outerHTML)?n:t}))]);ue((()=>{null==t||t(null!=n?n:null)}),[t,n]);let r=(0,v.useContext)(Bl);return(0,v.useMemo)((()=>[r.setFloating,e?r.styles:{}]),[r.setFloating,e,r.styles])}(S),M=function(){let{getFloatingProps:e,slot:t}=(0,v.useContext)(Bl);return(0,v.useCallback)(((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor})),[e,t])}(),P=ve(t,d?N:null,g.setOptionsElement,f),L=oe();(0,v.useEffect)((()=>{var e;let t=p.optionsElement;t&&0===p.listboxState&&t!==(null==(e=Sn(t))?void 0:e.activeElement)&&(null==t||t.focus({preventScroll:!0}))}),[p.listboxState,p.optionsElement]);let O=me((e=>{var t,n;switch(L.dispose(),e.key){case On.Space:if(""!==p.searchQuery)return e.preventDefault(),e.stopPropagation(),g.search(e.key);case On.Enter:if(e.preventDefault(),e.stopPropagation(),null!==p.activeOptionIndex){let{dataRef:e}=p.options[p.activeOptionIndex];g.onChange(e.current.value)}0===p.mode&&((0,mt.flushSync)((()=>g.closeListbox())),null==(t=p.buttonElement)||t.focus({preventScroll:!0}));break;case Te(p.orientation,{vertical:On.ArrowDown,horizontal:On.ArrowRight}):return e.preventDefault(),e.stopPropagation(),g.goToOption(Kl.Next);case Te(p.orientation,{vertical:On.ArrowUp,horizontal:On.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),g.goToOption(Kl.Previous);case On.Home:case On.PageUp:return e.preventDefault(),e.stopPropagation(),g.goToOption(Kl.First);case On.End:case On.PageDown:return e.preventDefault(),e.stopPropagation(),g.goToOption(Kl.Last);case On.Escape:return e.preventDefault(),e.stopPropagation(),(0,mt.flushSync)((()=>g.closeListbox())),void(null==(n=p.buttonElement)||n.focus({preventScroll:!0}));case On.Tab:e.preventDefault(),e.stopPropagation(),(0,mt.flushSync)((()=>g.closeListbox())),function(e,t){(function(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:a=[]}={}){let l=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?n?ea(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(Ur)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e):Yr(e);a.length>0&&o.length>1&&(o=o.filter((e=>!a.some((t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))))),r=null!=r?r:l.activeElement;let i,s=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,o.indexOf(r))-1;if(4&t)return Math.max(0,o.indexOf(r))+1;if(8&t)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=32&t?{preventScroll:!0}:{},d=0,m=o.length;do{if(d>=m||d+m<=0)return 0;let e=c+d;if(16&t)e=(e+m)%m;else{if(e<0)return 3;if(e>=m)return 1}i=o[e],null==i||i.focus(u),d+=s}while(i!==l.activeElement);6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,Jr))&&n}(i)&&i.select()})(Yr(),t,{relativeTo:e})}(p.buttonElement,e.shiftKey?qr.Previous:qr.Next);break;default:1===e.key.length&&(g.search(e.key),L.setTimeout((()=>g.clearSearch()),350))}})),C=null==(n=p.buttonElement)?void 0:n.id,D=(0,v.useMemo)((()=>({open:0===p.listboxState})),[p.listboxState]),R=Ae(d?M():{},{id:l,ref:P,"aria-activedescendant":null===p.activeOptionIndex||null==(r=p.options[p.activeOptionIndex])?void 0:r.id,"aria-multiselectable":1===p.mode||void 0,"aria-labelledby":C,"aria-orientation":p.orientation,onKeyDown:O,role:"listbox",tabIndex:0===p.listboxState?0:void 0,style:{...u.style,...T,"--button-width":Dr(p.buttonElement,!0).width},...Ee(E)}),A=Oe();return v.createElement(ao,{enabled:!!i&&(e.static||b)},v.createElement(po.Provider,{value:1===p.mode?p:{...p,isSelected:k}},A({ourProps:R,theirProps:u,slot:D,defaultTag:"div",features:bo,visible:x,name:"Listbox.Options"})))})),So=Fe((function(e,t){let n=(0,v.useId)(),{id:r=`headlessui-listbox-option-${n}`,disabled:a=!1,value:l,...o}=e,i=!0===(0,v.useContext)(yo),s=vo("Listbox.Option"),c=fo("Listbox.Option"),u=null!==s.activeOptionIndex&&s.options[s.activeOptionIndex].id===r,d=s.isSelected(l),m=(0,v.useRef)(null),f=function(e){let t=(0,v.useRef)(""),n=(0,v.useRef)("");return me((()=>{let r=e.current;if(!r)return"";let a=r.innerText;if(t.current===a)return n.current;let l=function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map((e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():ca(t).trim()}return null})).filter(Boolean);if(e.length>0)return e.join(", ")}return ca(e).trim()}(r).trim().toLowerCase();return t.current=a,n.current=l,l}))}(m),p=de({disabled:a,value:l,domRef:m,get textValue(){return f()}}),g=ve(t,m,(e=>{e?s.listRef.current.set(r,e):s.listRef.current.delete(r)}));ue((()=>{if(!s.__demoMode&&0===s.listboxState&&u&&0!==s.activationTrigger)return le().requestAnimationFrame((()=>{var e,t;null==(t=null==(e=m.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}))}),[m,u,s.__demoMode,s.listboxState,s.activationTrigger,s.activeOptionIndex]),ue((()=>{if(!i)return c.registerOption(r,p)}),[p,r,i]);let h=me((e=>{var t;if(a)return e.preventDefault();c.onChange(l),0===s.mode&&((0,mt.flushSync)((()=>c.closeListbox())),null==(t=s.buttonElement)||t.focus({preventScroll:!0}))})),y=me((()=>{if(a)return c.goToOption(Kl.Nothing);c.goToOption(Kl.Specific,r)})),b=function(){let e=(0,v.useRef)([-1,-1]);return{wasMoved(t){let n=ua(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=ua(t)}}}(),E=me((e=>{b.update(e),!a&&(u||c.goToOption(Kl.Specific,r,0))})),x=me((e=>{b.wasMoved(e)&&(a||u||c.goToOption(Kl.Specific,r,0))})),w=me((e=>{b.wasMoved(e)&&(a||u&&c.goToOption(Kl.Nothing))})),k=(0,v.useMemo)((()=>({active:u,focus:u,selected:d,disabled:a,selectedOption:d&&i})),[u,d,a,i]),_=i?{}:{id:r,ref:g,role:"option",tabIndex:!0===a?void 0:-1,"aria-disabled":!0===a||void 0,"aria-selected":d,disabled:void 0,onClick:h,onFocus:y,onPointerEnter:E,onMouseEnter:E,onPointerMove:x,onMouseMove:x,onPointerLeave:w,onMouseLeave:w},S=Oe();return!d&&i?null:S({ourProps:_,theirProps:o,slot:k,defaultTag:"div",name:"Listbox.Option"})})),No=Fe((function(e,t){let{options:n,placeholder:r,...a}=e,l={ref:ve(t)},o=vo("ListboxSelectedOption"),i=(0,v.useMemo)((()=>({})),[]),s=void 0===o.value||null===o.value||1===o.mode&&Array.isArray(o.value)&&0===o.value.length,c=Oe();return v.createElement(yo.Provider,{value:!0},c({ourProps:l,theirProps:{...a,children:v.createElement(v.Fragment,null,r&&s?r:n)},slot:i,defaultTag:Eo,name:"ListboxSelectedOption"}))})),To=Object.assign(xo,{Button:wo,Label:ko,Options:_o,Option:So,SelectedOption:No});const Mo=({label:e,value:t,onChange:n,disabled:a=!1,loading:l,choices:i})=>(0,r.createElement)(Ht,{className:"grid gap-1"},e&&(0,r.createElement)(jt,{className:"text-sm text-gray-600 font-medium"},e),(0,r.createElement)("div",{className:"flex items-center gap-3"},l&&(0,r.createElement)(nt,{size:18,className:"animate-spin shrink-0"}),(0,r.createElement)(To,{value:t,onChange:n,disabled:l||a},(({open:e})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(wo,{className:o()("relative w-full rounded py-1.5 px-2 text-left","rounded border border-gray-300","flex items-center gap-3 min-w-[200px]",{"bg-gray-100":a||l,"hover:border-gray-500":!a&&!l,"cursor-not-allowed text-gray-500":a})},i[t]||(0,s.__)("Select an option","neve"),(0,r.createElement)(Pr,{size:18,className:o()("ml-auto transition-transform",{"transform rotate-180":e}),"aria-hidden":"true"})),(0,r.createElement)(_o,{anchor:"bottom",transition:!0,className:o()("text-sm font-normal shadow-lg","rounded border bg-white p-1 my-1 min-w-[200px]","transition duration-100 ease-in data-[leave]:data-[closed]:opacity-0 antialiased")},Object.entries(i).map((([e,t])=>(0,r.createElement)(So,{key:e,value:e,className:"flex w-full items-center gap-2 text-sm rounded py-1.5 px-3 hover:bg-blue-100 hover:text-blue-700 data-[focus]:bg-blue-100 data-[focus]:text-blue-700 cursor-pointer"},t))))))))),Po=({icon:e,label:t,description:n,option:l,isPro:o=!0,disabled:i,locked:s,choices:c})=>{const[u,m]=(0,r.useState)(!1),{changeModuleOption:f,setToast:p}=(0,a.useDispatch)(U),v=(0,a.useSelect)((e=>{const{getOption:t,getProOption:n}=e(U);return o?n(l):t(l)}));return(0,r.createElement)(Nr,{description:n,label:t,icon:e,locked:s,id:l,afterTitle:(0,r.createElement)(Mo,{choices:c,value:v,loading:u,disabled:i,onChange:e=>{var t;m(!0),null===(t=window.tiTrk)||void 0===t||t.with("neve").set(l,{feature:"module-settings",featureComponent:l,featureValue:e}),d(l,e).then((t=>{if(t.success)return f(l,e),void p(!0);p(!1)})).finally((()=>{m(!1)}))}})})},Lo=window.wp.apiFetch;var Oo=n.n(Lo);const Co=(e,t)=>e[t],Do=({type:e,updateSetting:t,settings:n,valueCallback:a=Co})=>{const{fields:l}=neveAccessRestriction.fields[e];return(0,r.createElement)(r.Fragment,null,Object.keys(l).map(((e,o)=>{const{type:i,label:s,description:c}=l[e];if(l[e].parent){const t=l[e].parent;if(n[t.fieldKey]!==t.fieldValue)return null}const u=a(n,e);return(0,r.createElement)("div",{key:o},"toggle"===i&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(jn,{checked:"yes"===u||!1,label:s,onToggle:n=>{t(e,n?"yes":"no")}}),u&&c&&(0,r.createElement)("p",{className:"description"},c)),"select"===i&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Mo,{label:s,value:u,choices:l[e].options.reduce(((e,{value:t,label:n})=>({...e,[t]:n})),{}),onChange:n=>{t(e,n)}}),u&&c&&(0,r.createElement)("p",{className:"description"},c)))})))},Ro=({optionData:e})=>{const[t,n]=(0,r.useState)(neveAccessRestriction.options),[l,o]=(0,r.useState)(!1),[i,c]=(0,r.useState)(""),{setToast:u}=(0,a.useDispatch)(U),d=(e=null)=>{const n=e||t;var r;o(!0),c(""),(r=JSON.stringify(n),new Promise((e=>{Oo()({path:neveAccessRestriction.settingsRoute,method:"POST",data:{settings:r}}).then((t=>{const n="success"===JSON.parse(t).status;e({success:n})})).catch((()=>{e({success:!1})}))}))).then((t=>{if(!t.success)return c((0,s.__)("An error occurred. Please try again.","neve")),void u(!1);u(!0),neveAccessRestriction.options=e})).finally((()=>{o(!1)}))};return(0,r.createElement)(Nr,{label:e.label,icon:e.icon,description:e.description,id:"access-restriction",afterTitle:l?(0,r.createElement)("div",{className:"flex items-center gap-3 text-sm"},(0,r.createElement)(nt,{size:20,className:"animate-spin"}),(0,r.createElement)("span",null,(0,s.__)("Saving","neve"),"...")):null},(0,r.createElement)("div",{className:"grid gap-4 grid-cols-2 xl:grid-cols-3"},(0,r.createElement)(Do,{type:"content_types",updateSetting:(e,r)=>{const a={...t};a.content_types[e].enabled=r,n(a),d(a)},valueCallback:(e,t)=>e[t].enabled,settings:neveAccessRestriction.options.content_types})),(0,r.createElement)("div",{className:"grid gap-4 grid-cols-2 xl:grid-cols-3 mt-4 pt-4 border-t border-gray-200"},(0,r.createElement)(Do,{type:"restriction_behavior",updateSetting:(e,r)=>{const a={...t,[e]:r};n(a),d(a)},settings:t})),""!==i&&(0,r.createElement)(Yn,{className:"mt-4",isError:!0},i))},Ao=({options:e,overrides:t={},module:n})=>{const{getProOption:l,getModuleStatus:o}=(0,a.useSelect)((e=>{const{getProOption:t,getModuleStatus:n}=e(U);return{getProOption:t,getModuleStatus:n}}));return o(n)?(0,r.createElement)(r.Fragment,null,Object.entries(e).map((([e,n])=>{if(n.depends_on&&!0!==l(n.depends_on))return null;if("enable_local_fonts"===e)return null;t[e]&&(n={...n,...t[e]});const{type:a}=n;switch(a){case"toggle":return(0,r.createElement)(Mr,{key:e,option:e,icon:n.icon,label:n.label,description:n.description,checked:n.value});case"text":return(0,r.createElement)(Tr,{key:e,option:e,icon:n.icon,label:n.label,description:n.description});case"select":return(0,r.createElement)(Po,{key:e,icon:n.icon,label:n.label,description:n.description,option:e,choices:n.choices});case"multi_select":return(0,r.createElement)(Or,{key:e,icon:n.icon,label:n.label,description:n.description,option:e,choices:n.choices});case"react":return"neve_access_restriction"===e?(0,r.createElement)(Ro,{key:e,optionData:n}):(0,r.createElement)(Nr,{key:e,label:n.label,description:n.description,icon:n.icon,locked:n.locked,id:n.slug},(0,r.createElement)(Fo,{key:e,slug:e}));default:return null}}))):null},Fo=({slug:e})=>((0,r.useEffect)((()=>{window.dispatchEvent(new window.CustomEvent("neve-dashboard-react-placeholder",{detail:{slug:e}}))}),[]),(0,r.createElement)("div",{id:e})),Io={enable_featured_image_taxonomy:{icon:H,label:(0,s.__)("Featured image for taxonomy","neve"),description:(0,s.__)("Enable featured images for categories and tags.","neve")},enable_mega_menu:{icon:br,label:(0,s.__)("Enable Mega Menu","neve"),description:(0,s.__)("Enable Mega menu fuctionality in the menu dashboard page.","neve")},typekit_id:{icon:Er,label:(0,s.__)("Embed Typekit","neve"),type:"text",placeholder:(0,s.__)("Paste your Typekit code here","neve"),description:(0,s.__)("Add your Typekit embed code here to use custom fonts.","neve")},neve_access_restriction:{icon:xr,label:(0,s.__)("Enable Content Restriction","neve"),description:(0,s.__)("Restrict content access on Posts, Pages, and set a default login page.","neve")}};W&&(Io.typekit_loading_method={icon:wr,label:(0,s.__)("Typekit loading method","neve"),description:(0,s.__)("Choose if Typekit fonts should be loaded with JavaScript or CSS. JavaScript is usually faster.","neve")},Io.featured_image_taxonomies={icon:kr,description:(0,s.__)("Enable featured images for the following taxonomies.","neve")},Io.neve_access_restriction={...Io.neve_access_restriction,description:(0,s.__)("Adds a metabox to control content restriction on the post/taxonomy edit page.","neve")});const jo=()=>{const{icon:e,label:t,description:n}=Io.neve_access_restriction,a=[(0,s.__)("Posts","neve"),(0,s.__)("Pages","neve"),(0,s.__)("Categories","neve")];return(0,r.createElement)(Nr,{label:t,icon:e,description:n,locked:!0},(0,r.createElement)("div",{className:"grid gap-4 grid-cols-2 xl:grid-cols-3"},a.map((e=>(0,r.createElement)(jn,{key:e,disabled:!0,label:e})))),(0,r.createElement)("div",{className:"grid gap-4 grid-cols-2 xl:grid-cols-3 mt-4 pt-4 border-t border-gray-200"},(0,r.createElement)(Mo,{disabled:!0,label:`${(0,s.__)("For logged out users","neve")}:`,value:"default",choices:{default:(0,s.__)("Show default Wordpress login page","neve")}})))},Ho=()=>(0,r.createElement)(r.Fragment,null,Object.entries(Io).map((([e,t])=>"neve_access_restriction"===e?(0,r.createElement)(jo,{key:e}):t.type?"text"===t.type?(0,r.createElement)(Tr,qn({key:e,locked:!0},t)):(0,r.createElement)("div",{key:e},t.label):(0,r.createElement)(Mr,qn({key:e,locked:!0},t))))),zo=["performance_features"],Vo=()=>{const{modules:e}=neveDash,t=Object.entries(e).filter((([e,t])=>!zo.includes(e)&&t.options&&t.options.length>0)).map((([e,t])=>[e,t.options]));return(0,r.createElement)(r.Fragment,null,t.map((([e,t])=>!t||t.length<1?null:t.map((({options:t},n)=>!t||Object.keys(t).length<1?null:(0,r.createElement)(Ao,{module:e,key:e+n,options:t,overrides:Io}))))))},Bo=()=>{const{isLicenseValid:e}=et();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("h1",{className:"text-lg font-semibold mb-6"},(0,s.__)("General Settings","neve")),(0,r.createElement)("div",null,e&&(0,r.createElement)(Vo,null)||(0,r.createElement)(Ho,null)))},Uo=()=>(0,r.createElement)(cr,null),Wo=E("Smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]),$o=E("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]),qo=E("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Go=E("Text",[["path",{d:"M17 6.1H3",key:"wptmhv"}],["path",{d:"M21 12.1H3",key:"1j38uz"}],["path",{d:"M15.1 18H3",key:"1nb16a"}]]),Ko={enable_emoji_removal:{icon:Wo,label:(0,s.__)("Emoji Removal","neve"),description:(0,s.__)("Remove emoji scripts to improve page load time.","neve")},enable_embedded_removal:{icon:$o,label:(0,s.__)("Embed Removal","neve"),description:(0,s.__)("Remove embed scripts for better performance.","neve")},enable_lazy_content:{icon:qo,label:(0,s.__)("Lazy Rendering","neve"),description:(0,s.__)("Enable lazy rendering for better initial page load.","neve")}},Yo=()=>(0,r.createElement)(r.Fragment,null,Object.values(Ko).map(((e,t)=>(0,r.createElement)(Mr,{key:t,icon:e.icon,label:e.label,description:e.description,locked:!0,checked:!1})))),Xo=()=>{var e,t;const n=(null===(e=neveDash)||void 0===e||null===(t=e.modules)||void 0===t?void 0:t.performance_features.options)||[];return n.length<1?null:n.map((({options:e},t)=>!e||Object.keys(e).length<1?null:(0,r.createElement)(Ao,{module:"performance_features",key:t,options:e,overrides:Ko})))},Qo=()=>{const{isLicenseValid:e}=et();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("h1",{className:"text-lg font-semibold mb-6"},(0,s.__)("Performance Settings","neve")),(0,r.createElement)("div",null,(0,r.createElement)(Mr,{icon:Go,label:(0,s.__)("Enable Local Fonts Hosting","neve"),option:"enable_local_fonts",description:(0,s.__)("Host Google Fonts locally for better performance and GDPR compliance.","neve")}),e&&(0,r.createElement)(Xo,null)||(0,r.createElement)(Yo,null)))},Zo=E("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]),Jo=E("Wallpaper",[["circle",{cx:"8",cy:"9",r:"2",key:"gjzl9d"}],["path",{d:"m9 17 6.1-6.1a2 2 0 0 1 2.81.01L22 15V5a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2",key:"69xh40"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["path",{d:"M12 17v4",key:"1riwvh"}]]),ei=E("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]),ti=E("ToggleRight",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}]]),ni=E("MessageCircleQuestion",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),ri={agency:{title:(0,s.__)("Agency Branding","neve"),icon:Zo,fields:{author_name:{type:"text",label:(0,s.__)("Agency Author","neve")},author_url:{type:"text",label:(0,s.__)("Agency Author URL","neve")},starter_sites:{type:"toggle",label:(0,s.__)("Hide Sites Library","neve")},my_library:{type:"toggle",label:(0,s.__)("Hide My Library","neve")}}},theme:{title:(0,s.__)("Theme Branding","neve"),icon:Jo,fields:{theme_name:{type:"text",label:(0,s.__)("Theme Name","neve")},theme_description:{type:"textarea",label:(0,s.__)("Theme Description","neve")},screenshot_url:{type:"text",label:(0,s.__)("Screenshot URL","neve")}}},plugin:{title:(0,s.__)("Plugin Branding","neve"),icon:ei,fields:{plugin_name:{type:"text",label:(0,s.__)("Plugin Name","neve")},plugin_description:{type:"textarea",label:(0,s.__)("Plugin Description","neve")}}},sidebar:{title:(0,s.__)("Enable White Label","neve"),icon:ti,fields:{white_label:{type:"toggle",label:(0,s.__)("Hide Options from Dashboard","neve")},license:{type:"toggle",label:(0,s.__)("Enable License Hiding","neve")}}}},ai=()=>(0,r.createElement)("div",null,Object.entries(ri).map((([e,t])=>{const n=t.icon;return(0,r.createElement)(Nr,{key:e,label:t.title,icon:n,locked:!0},(0,r.createElement)("div",{className:"grid gap-4"},Object.entries(t.fields).map((([e,t])=>(0,r.createElement)("div",{key:e,className:"opacity-75"},"toggle"===t.type?(0,r.createElement)(jn,{disabled:!0,locked:!0,checked:!1,label:t.label}):(0,r.createElement)(Sr,{label:t.label,disabled:!0,name:e}))))))})),(0,r.createElement)("div",{className:"flex justify-end mt-6"},(0,r.createElement)(ot,{isPrimary:!0,disabled:!0},(0,s.__)("Save","neve")))),li=()=>{const{strings:e}=neveDash,{fields:t,optionKey:n,options:l}=neveDash.whiteLabelData,o=Object.values(t).map((e=>e.fields)).reduce(((e,t)=>({...e,...t})),{}),i=Object.keys(o).reduce(((e,t)=>("toggle"===o[t].type?e[t]="1"===l[t]:e[t]=l[t],e)),{}),[c,u]=(0,r.useState)(!1),[m,f]=(0,r.useReducer)(((e,t)=>({...e,[t.name]:t.value})),i),{setToast:p}=(0,a.useDispatch)(U);return neveDash.whiteLabelData?(0,r.createElement)("form",{onSubmit:e=>{e.preventDefault(),u(!0),d(n,JSON.stringify(m),!1,!1).then((e=>{if(e.success)return p((0,s.__)("White Label settings saved.","neve")),void(neveDash.whiteLabelData.options=m);p(!!e.message&&e.message)})).catch((e=>{p(!!e.message&&e.message)})).finally((()=>{u(!1)}))}},Object.entries(t).map((([e,t])=>{var n;return t.icon=(null===(n=ri[e])||void 0===n?void 0:n.icon)||ar,(0,r.createElement)(Nr,{key:e,label:t.title,icon:t.icon},(0,r.createElement)("div",{className:"grid gap-4"},Object.entries(t.fields).map((([e,t])=>(0,r.createElement)("div",{key:e},["text","url","textarea"].includes(t.type)&&(0,r.createElement)(Sr,{label:t.label,type:t.type,onChange:t=>f({name:e,value:t.target.value}),value:m[e]}),"toggle"===t.type&&(0,r.createElement)(jn,{checked:"1"===m[e]||!0===m[e],description:t.description,label:t.label,onToggle:t=>f({name:e,value:t})}))))))})),(0,r.createElement)("div",{className:"flex justify-end mt-6"},(0,r.createElement)(ot,{isSubmit:!0,isPrimary:!0,loading:c,disabled:c},c?(0,s.__)("Saving","neve")+"...":(0,s.__)("Save","neve")))):(0,r.createElement)(Yn,{icon:yr},e.updateOldPro)},oi=()=>{const{isLicenseValid:e,licenseTier:t}=et(),n=!e||t<3;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"flex items-center justify-between mb-6"},(0,r.createElement)("h1",{className:"text-lg font-semibold"},(0,s.__)("White Label Settings","neve")),n&&(0,r.createElement)(ot,{target:"_blank",className:"!p-0",isLink:!0,href:neveDash.upgradeURLModules},(0,r.createElement)(ni,{size:18}),(0,s.__)("Available in Agency Plan","neve"))),n&&(0,r.createElement)(ai,null),!n&&!neveDash.whiteLabelData&&(0,r.createElement)(Yn,{icon:yr},(0,s.__)("Please reload this page in order to view the White Label Settings","neve")),!n&&!!neveDash.whiteLabelData&&(0,r.createElement)(li,null))},ii=[{id:"general",label:(0,s.__)("General","neve"),icon:ar},{id:"performance",label:(0,s.__)("Performance","neve"),icon:T},{id:"white-label",label:(0,s.__)("White Label","neve"),icon:P},{id:"manage-modules",label:(0,s.__)("Manage Modules","neve"),icon:Hn}],si=({tab:e,setTab:t})=>{const{whiteLabelStatus:n}=(0,a.useSelect)((e=>{const{getModuleStatus:t}=e(U);return{whiteLabelStatus:t("white_label")||!1}})),l=ii.filter((({id:e})=>"manage-modules"===e?$:"white-label"!==e||!$||n&&G));return(0,r.createElement)(tt,{className:"!p-0 overflow-hidden"},(0,r.createElement)(er,null,l.map((({id:n,label:a,icon:l})=>{const i=l,s=o()("w-full flex items-center px-4 py-3 text-left",{"text-gray-600 hover:bg-gray-50":e!==n,"bg-blue-50 text-blue-600":e===n});return(0,r.createElement)("button",{key:n,className:s,onClick:()=>t(n)},(0,r.createElement)(i,{className:"w-5 h-5 mr-3"}),(0,r.createElement)("span",{className:"font-medium"},a))}))))},ci=()=>{const{hasOldPro:e,strings:t}=neveDash,[n,a]=(0,r.useState)(ii[0].id);return e?(0,r.createElement)(Yn,{icon:yr},t.updateOldPro):(0,r.createElement)("div",{className:"flex flex-col lg:flex-row gap-6"},(0,r.createElement)("div",{className:"shrink-0 w-full lg:w-[300px]"},(0,r.createElement)(si,{tab:n,setTab:a})),(0,r.createElement)(tt,{className:"grow"},"general"===n&&(0,r.createElement)(er,null,(0,r.createElement)(Bo,null)),"performance"===n&&(0,r.createElement)(er,null,(0,r.createElement)(Qo,null)),"white-label"===n&&(0,r.createElement)(er,null,(0,r.createElement)(oi,null)),"manage-modules"===n&&(0,r.createElement)(er,null,(0,r.createElement)(Uo,null))))},ui=E("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]),di=E("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]),mi=E("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),fi=E("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),pi=E("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]),vi="free",gi={features:{icon:(0,r.createElement)(ui,{className:"size-4 text-green-600 mr-2"}),label:(0,s.__)("Features","neve")},fixes:{icon:(0,r.createElement)(di,{className:"size-4 text-red-600 mr-2"}),label:(0,s.__)("Bug Fixes","neve")},tweaks:{icon:(0,r.createElement)(qo,{className:"size-4 text-blue-600 mr-2"}),label:(0,s.__)("Tweaks","neve")}},hi=({active:e,onClick:t,children:n})=>(0,r.createElement)("button",{onClick:t,className:o()("px-4 py-2 text-sm font-medium rounded-lg transition-colors duration-150",{"bg-blue-100 text-blue-700":e,"text-gray-600 hover:text-gray-900 hover:bg-gray-100":!e})},n),yi=({data:e})=>{const{version:t,tweaks:n,fixes:a,features:l,date:o}=e;return(0,r.createElement)("div",{className:"border-b border-gray-200 last:border-0"},(0,r.createElement)("div",{className:"p-6"},(0,r.createElement)("div",{className:"flex items-center justify-between mb-4"},(0,r.createElement)("div",{className:"flex items-center space-x-3"},(0,r.createElement)("h3",{className:"text-base font-semibold text-gray-900"},(0,s.__)("Version","neve")," ",t),(0,r.createElement)(it,{type:"primary",className:"ml-auto"},o))),(0,r.createElement)("div",{className:"space-y-3"},Object.entries({features:l,fixes:a,tweaks:n}).map((([e,n])=>((e,n)=>{if(null==n||!n.length)return null;const{icon:a,label:l}=gi[e];return(0,r.createElement)("div",{key:t+e},(0,r.createElement)("div",{className:"flex items-center mb-2"},a,(0,r.createElement)("span",{className:"text-sm font-medium text-gray-700"},l)),(0,r.createElement)("ul",{className:"space-y-2 ml-6"},n.map(((e,t)=>(0,r.createElement)("li",{key:t,className:"text-sm text-gray-600 flex items-start"},(0,r.createElement)(mi,{className:"w-3.5 h-3.5 text-gray-400 mr-2 mt-0.5 flex-shrink-0"}),(0,r.createElement)("span",{dangerouslySetInnerHTML:{__html:e}}))))))})(e,n))))))},bi=()=>{const{changelog:e,changelogPro:t}=neveDash,[n,a]=(0,r.useState)(4),[l,o]=(0,r.useState)(vi),i=l===vi?e:t;return(0,r.createElement)(er,{className:"grid gap-5"},t&&(0,r.createElement)(tt,null,(0,r.createElement)("div",{className:"flex items-center justify-between"},(0,r.createElement)("div",{className:"flex items-center space-x-2"},(0,r.createElement)(fi,{className:"size-4 text-gray-400"}),(0,r.createElement)("span",{className:"text-sm font-medium text-gray-900"},(0,s.__)("Recent Updates","neve"))),(0,r.createElement)("div",{className:"flex space-x-2"},(0,r.createElement)(hi,{active:l===vi,onClick:()=>o(vi)},(0,s.__)("Free Version","neve")),(0,r.createElement)(hi,{active:"pro"===l,onClick:()=>o("pro")},(0,r.createElement)("div",{className:"flex items-center space-x-1"},(0,r.createElement)(pi,{className:"size-4 text-yellow-500"}),(0,r.createElement)("span",null,(0,s.__)("Pro Version","neve"))))))),(0,r.createElement)(tt,{className:"!p-0"},i.slice(0,n).map((e=>{const{version:t,tweaks:n,fixes:a,features:l}=e;return(n||a||l)&&t?(0,r.createElement)(yi,{key:t,data:e}):null}))),i.length>n&&(0,r.createElement)("div",{className:"text-center my-8 mx-auto"},(0,r.createElement)(ot,{className:"text-lg",onClick:()=>a(n+4)},(0,s.__)("Load More","neve"))))},Ei={start:{label:(0,s.__)("Welcome","neve"),render:()=>(0,r.createElement)(ur,null)},"starter-sites":{label:(0,s.__)("Starter Sites","neve"),render:()=>(0,r.createElement)(nr,null)},"free-pro":{label:(0,s.__)("Free vs Pro","neve"),render:()=>(0,r.createElement)(hr,null)},settings:{label:(0,s.__)("Settings","neve"),render:()=>(0,r.createElement)(ci,null)},changelog:{render:()=>(0,r.createElement)(bi,null)}},{plugins:xi}=neveDash,wi=xi["templates-patterns-collection"]&&"deactivate"===xi["templates-patterns-collection"].cta,ki=xi["templates-patterns-collection"]&&1===Kn()(xi["templates-patterns-collection"].version,"1.0.10");wi&&ki&&(delete Ei["starter-sites"].render,Ei["starter-sites"].url=neveDash.tpcOnboardingURL),(neveDash.pro||neveDash.hasOldPro)&&delete Ei["free-pro"],neveDash.whiteLabel&&(delete Ei.changelog,neveDash.whiteLabel.hideStarterSites&&delete Ei["starter-sites"]);const _i=()=>{var e;let t=window.location.hash;return"string"!=typeof window.location.hash?null:(t=t.substring(1),null!==(e=Ei[t])&&void 0!==e&&e.render?t:null)},Si=E("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),Ni=({currentTab:e,setTab:t})=>{const n={help:{label:(0,s.__)("Documentation","neve"),icon:(0,r.createElement)(pr,{className:"mr-1.5",size:20}),url:neveDash.docsURL},changelog:{label:(0,s.__)("Changelog","neve"),icon:(0,r.createElement)(Si,{className:"mr-1.5",size:20})}},{isLicenseValid:a}=et();if(q){var l;const e=!(null===(l=neveDash.whiteLabel)||void 0===l||!l.agencyURL);var o;n.changelog.hide=!0,e?n.help.url=null===(o=neveDash.whiteLabel)||void 0===o?void 0:o.agencyURL:n.help.hide=!0}return(0,r.createElement)("div",{className:"border-b border-gray-100"},(0,r.createElement)(i,null,(0,r.createElement)("div",{className:"flex flex-col gap-5 py-2 sm:flex-row items-center justify-between"},(0,r.createElement)("div",{className:"flex items-center space-x-3"},!q&&(0,r.createElement)("img",{className:"size-7 rounded-sm",src:neveDash.assets+"logo.svg",alt:(0,s.__)("Neve Theme Logo","neve")}),(0,r.createElement)("span",{className:"text-sm font-semibold text-gray-900"},neveDash.strings.header),(0,r.createElement)(it,{type:"secondary"},a?(0,s.__)("Pro","neve"):(0,s.__)("Free","neve")),(0,r.createElement)("span",{className:"text-gray-500 font-medium"},neveDash.version)),(0,r.createElement)("div",{className:"flex items-center"},Object.entries(n).map((([n,{label:a,icon:l,url:o,hide:i}],s)=>{if(i)return null;const c={};return o?(c.href=o,c.target="_blank"):(c.onClick=e=>{e.preventDefault(),t(n)},e===n&&(c.className="!text-blue-600")),(0,r.createElement)(r.Fragment,{key:n},s>0&&(0,r.createElement)("div",{className:"w-px h-4 bg-gray-200 mx-3"}),(0,r.createElement)(ot,qn({isLink:!0},c),l,(0,r.createElement)("span",null,a)))}))))))},Ti=({setTab:e,currentTab:t})=>(0,r.createElement)("div",{className:"border-b border-gray-200"},(0,r.createElement)(i,null,(0,r.createElement)("nav",{className:"flex -mb-px justify-center sm:justify-start"},Object.entries(Ei).map((([n,{label:a,url:l}])=>{if(!a)return null;const i=o()(["relative px-4 py-3 font-medium border-b-2",{"text-blue-600 border-blue-600":t===n,"border-transparent text-gray-600 hover:text-gray-900 transition-colors duration-150":t!==n}]),s={href:l||"#"+n};return l||(s.onClick=t=>{t.preventDefault(),e(n)}),(0,r.createElement)("a",qn({},s,{key:n,className:i}),a)}))))),Mi=()=>{const{currentTab:e}=(0,a.useSelect)((e=>{const{getTab:t}=e(U);return{currentTab:t()}})),{setTab:t}=(0,a.useDispatch)(U),n=()=>{const e=_i();null!==e&&t(e)};(0,r.useEffect)((()=>(n(),window.addEventListener("hashchange",n),()=>{window.removeEventListener("hashchange",n)})),[]);const l=e=>{t(e),window.location.hash=e};return(0,r.createElement)("header",{className:"bg-white z-50"},(0,r.createElement)("div",null,(0,r.createElement)(Ni,{setTab:l,currentTab:e}),(0,r.createElement)(Ti,{setTab:l,currentTab:e})))},Pi=({data:e})=>{const[t,n]=(0,r.useState)(!1),{text:a,cta:l,type:i,update:c,url:u,targetBlank:d}=e,{canInstallPlugins:m}=neveDash,[f,p]=(0,r.useState)(!1),[v,g]=(0,r.useState)(!1),[h,y]=(0,r.useState)(null);(0,r.useEffect)((()=>{let e;return"done"===v&&(e=setTimeout((()=>{n(!0)}),5e3)),()=>{clearTimeout(e)}}),[v]);const b=o()(["text-white !p-3 rounded flex flex-col md:flex-row items-center justify-between gap-4",{"bg-blue-500":"info"===i||!i&&!v,"bg-amber-500":"warning"===i&&!v,"bg-emerald-500":"success"===i||"done"===v,"bg-red-500":"error"===i&&"done"!==v||"error"===v}]),E=o()(["bg-white border-white hover:opacity-90 text-blue-500 font-medium text-center",{"!text-blue-600":"info"===i||!i&&!v,"!text-amber-600":"warning"===i&&!v,"!text-emerald-600":"success"===i||"done"===v,"!text-red-600":"error"===i&&"done"!==v||"error"===v}]),x=()=>!l||v?null:(0,r.createElement)(ot,{disabled:f||!m,loading:f,className:E,onClick:()=>{c&&(()=>{if(!c.type)return!1;p(!0),new Promise((e=>{if("theme"===c.type){if(!c.slug)return!1;wp.updates.ajax("update-theme",{slug:c.slug,success:()=>{e({success:!0})},error:t=>{y(t.errorMessage),e({success:!1})}})}if("plugin"===c.type){if("sparks-for-woocommerce"===c.slug)return void(window.location.href=window.neveDash.sparksInstallActivateEndpoint);if(!c.slug||!c.path)return!1;wp.updates.ajax("update-plugin",{slug:c.slug,plugin:c.path,success:()=>{e({success:!0})},error:t=>{y(t.errorMessage),e({success:!1})}})}if("otter"===c.type){if(!c.slug||!c.path)return!1;"otter-old"===c.slug&&wp.updates.ajax("update-plugin",{slug:c.slug,plugin:c.path,success:()=>{e({success:!0}),window.location.href=window.neveDash.otterProInstall},error:t=>{y(t.errorMessage),e({success:!1})}}),"otter-new"===c.slug&&(window.location.href=window.neveDash.otterProInstall)}})).then((e=>{if(!e.success)return g("error"),p(!1),!1;g("done"),p(!1),n(!0),delete neveDash.notifications[c.slug]}))})()}},f?null:l),w=m?x():(0,r.createElement)(Xn,{text:(0,s.sprintf)(// translators: %s: the plugin and theme to update (label: 'Neve and Neve Pro').
(0,s.__)("Ask your admin to update %s on your site","neve"),(0,s.sprintf)(// translators: %1$s: theme name (Neve), %2$s: plugin name (Neve Pro).
(0,s.__)("%1$s and %2$s","neve"),(0,s.__)("Neve","neve"),(0,s.__)("Neve Pro","neve")))},x());return(0,r.createElement)(Ze,{show:!t},(0,r.createElement)(tt,{className:b},c?(0,r.createElement)((()=>(0,r.createElement)(r.Fragment,null,!v&&(0,r.createElement)("p",{className:"text-sm font-medium leading-relaxed"},a),"done"===v&&(0,r.createElement)("p",{className:"text-sm font-medium leading-relaxed"},(0,r.createElement)(ne,{className:"size-5 mr-3 inline"}),(0,s.__)("Done!","neve")),"error"===v&&(0,r.createElement)("p",{className:"text-sm font-medium leading-relaxed"},(0,r.createElement)(te,{className:"size-5 mr-3 inline"}),h||(0,s.__)("An error occurred. Please reload the page and try again.","neve")),w)),null):(0,r.createElement)((()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",{className:"text-sm font-medium leading-relaxed",dangerouslySetInnerHTML:{__html:a}}),u&&l&&(0,r.createElement)(ot,{target:d?"_blank":"",className:E,href:u},l,d&&(0,r.createElement)(Q,{size:18,className:"ml-2"})))),null)))},Li=()=>{const e=(0,a.useSelect)((e=>e("neve-dashboard").getNotifications()));return Object.keys(e).length<1?null:(0,r.createElement)(i,{className:"grid gap-3"},Object.entries(e).map((([e,t])=>(0,r.createElement)(er,{key:e,from:"top",className:"delay-300"},(0,r.createElement)(Pi,{slug:e,data:t})))))},Oi=()=>(0,r.createElement)("div",{className:"antialiased grow flex flex-col gap-6 h-full"},(0,r.createElement)("header",{className:"bg-white z-50"},(0,r.createElement)("div",null,(0,r.createElement)("div",{className:"border-b border-gray-100"},(0,r.createElement)("div",{className:"max-w-[90vw] w-full lg:container mx-auto px-2 lg:px-6"},(0,r.createElement)("div",{className:"flex items-center justify-between h-14"},(0,r.createElement)("div",{className:"flex items-center space-x-3"},(0,r.createElement)("div",{className:"size-7 bg-gray-200 rounded-sm"}),(0,r.createElement)("div",{className:"h-4 w-16 bg-gray-200 rounded"}),(0,r.createElement)("div",{className:"h-5 w-14 bg-gray-200 rounded"}),(0,r.createElement)("div",{className:"h-4 w-16 bg-gray-200 rounded"})),(0,r.createElement)("div",{className:"flex items-center"},(0,r.createElement)("div",{className:"flex items-center gap-2 px-3 py-2"},(0,r.createElement)("div",{className:"size-5 bg-gray-200 rounded"}),(0,r.createElement)("div",{className:"h-4 w-24 bg-gray-200 rounded"})),(0,r.createElement)("div",{className:"w-px h-4 bg-gray-200 mx-3"}),(0,r.createElement)("div",{className:"flex items-center gap-2 px-3 py-2"},(0,r.createElement)("div",{className:"size-5 bg-gray-200 rounded"}),(0,r.createElement)("div",{className:"h-4 w-20 bg-gray-200 rounded"})))))),(0,r.createElement)("div",{className:"border-b border-gray-200"},(0,r.createElement)("div",{className:"max-w-[90vw] lg:container mx-auto px-2 lg:px-6"},(0,r.createElement)("nav",{className:"flex -mb-px"},[...Array(4)].map(((e,t)=>(0,r.createElement)("div",{key:t,className:"px-4 py-3 "+(0===t?"border-b-2 border-gray-200":"")},(0,r.createElement)("div",{className:"h-4 w-20 bg-gray-200 rounded"}))))))))),(0,r.createElement)("div",{className:"max-w-[90vw] w-full lg:container mx-auto px-2 lg:px-6 flex flex-col lg:flex-row gap-6 h-full grow"},(0,r.createElement)("div",{className:"grow"},(0,r.createElement)("div",{className:"grid gap-6"},(0,r.createElement)("div",{className:"p-6 rounded-lg bg-white shadow-sm"},(0,r.createElement)("div",{className:"flex items-center mb-6 gap-3"},(0,r.createElement)("div",{className:"size-5 bg-gray-200 rounded"}),(0,r.createElement)("div",{className:"h-5 w-40 bg-gray-200 rounded"})),(0,r.createElement)("div",{className:"grid grid-cols-2 gap-x-8 gap-y-4"},[...Array(8)].map(((e,t)=>(0,r.createElement)("div",{key:t,className:"h-4 w-32 bg-gray-200 rounded"}))))),(0,r.createElement)("div",{className:"grid xl:grid-cols-2 gap-6"},(0,r.createElement)("div",{className:"xl:col-span-2 flex items-center justify-between"},(0,r.createElement)("div",{className:"h-6 w-40 bg-gray-200 rounded"}),(0,r.createElement)("div",{className:"h-4 w-24 bg-gray-200 rounded"})),[...Array(8)].map(((e,t)=>(0,r.createElement)("div",{key:t,className:"p-6 rounded-lg bg-white shadow-sm"},(0,r.createElement)("div",{className:"flex items-center mb-6 gap-3"},(0,r.createElement)("div",{className:"size-5 bg-gray-200 rounded"}),(0,r.createElement)("div",{className:"h-5 w-32 bg-gray-200 rounded"}),(0,r.createElement)("div",{className:"ml-auto"},(0,r.createElement)("div",{className:"h-5 w-12 bg-gray-200 rounded"}))),(0,r.createElement)("div",{className:"h-4 w-full bg-gray-200 rounded"}))))))),(0,r.createElement)("div",{className:"shrink-0 lg:w-[435px]"},(0,r.createElement)("div",{className:"grid gap-6"},[...Array(2)].map(((e,t)=>(0,r.createElement)("div",{key:t,className:"p-6 rounded-lg bg-white shadow-sm"},(0,r.createElement)("div",{className:"flex items-center mb-6 gap-3"},(0,r.createElement)("div",{className:"h-5 w-32 bg-gray-200 rounded"})),(0,r.createElement)("div",{className:"h-4 w-full bg-gray-200 rounded mb-4"}),(0,r.createElement)("div",{className:"h-4 w-40 bg-gray-200 rounded"})))),(0,r.createElement)("div",{className:"p-6 rounded-lg bg-white shadow-sm space-y-3"},(0,r.createElement)("div",{className:"flex items-center mb-6 gap-3"},(0,r.createElement)("div",{className:"h-5 w-40 bg-gray-200 rounded"})),[...Array(6)].map(((e,t)=>(0,r.createElement)("div",{key:t,className:"flex items-start p-3 bg-white rounded-lg border border-gray-100"},(0,r.createElement)("div",{className:"flex-grow"},(0,r.createElement)("div",{className:"flex gap-4 items-center"},(0,r.createElement)("div",{className:"size-6 bg-gray-200 rounded"}),(0,r.createElement)("div",{className:"h-4 w-24 bg-gray-200 rounded"}),(0,r.createElement)("div",{className:"ml-auto h-4 w-32 bg-gray-200 rounded"})),(0,r.createElement)("div",{className:"h-4 w-3/4 bg-gray-200 rounded mt-1"})))))))))),Ci=({message:e,type:t,onRemove:n})=>((0,r.useEffect)((()=>{const e=setTimeout((()=>{n()}),3e3);return()=>clearTimeout(e)}),[n]),(0,r.createElement)(Je,{className:"shadow-lg",type:t,message:e})),Di=()=>{const[e,t]=(0,r.useState)([]),{setToast:n}=(0,a.useDispatch)(U),l=(0,a.useSelect)((e=>{const{getToast:t}=e(U);return t()}));return(0,r.useEffect)((()=>{if(null===l)return;const e={id:Date.now(),...(r=l,!1===r?{message:(0,s.__)("Could not Update Option. Please try again.","neve"),type:"error"}:"boolean"!=typeof r?{message:r,type:"success"}:{message:(0,s.__)("Option Updated","neve"),type:"success"})};var r;t((t=>[...t,e])),n(null)}),[l,n]),(0,r.createElement)("div",{className:"fixed bottom-5 ml-5 grid gap-2 z-max"},e.map((({id:e,message:n,type:a})=>(0,r.createElement)(Ci,{key:e,message:n,type:a,onRemove:()=>(e=>{t((t=>t.filter((t=>t.id!==e))))})(e)}))))},Ri=()=>{const[e,t]=(0,r.useState)(!0),{setSettings:n,setTab:l}=(0,a.useDispatch)(U),{currentTab:o}=(0,a.useSelect)((e=>{const{getTab:t}=e(U);return{currentTab:t()}}));return(0,r.useEffect)((()=>{u().then((e=>{n(e),t(!1)}))}),[]),e?(0,r.createElement)(Oi,null):(0,r.createElement)("div",{className:"antialiased grow flex flex-col gap-6 h-full"},(0,r.createElement)(Mi,null),"starter-sites"!==o&&(0,r.createElement)(Li,null),(0,r.createElement)(i,{className:"flex flex-col lg:flex-row gap-6 h-full grow"},(0,r.createElement)("div",{className:"grow"},Ei[o].render(l)),!["starter-sites","settings"].includes(o)&&(0,r.createElement)(er,{className:"shrink-0 lg:w-[435px]"},(0,r.createElement)($n,null))),(0,r.createElement)(Di,null))};let Ai=0;function Fi(){return":"+(Ai++).toString(36)}const Ii={settings:{},plugins:neveDash.plugins||{},toast:null,currentTab:"start",license:neveDash.pro?neveDash.license:{},notifications:neveDash.notifications||{}},ji=_i();null!==ji&&(Ii.currentTab=ji);const Hi={getModuleStatus:(e,t)=>e.settings["nv_pro_"+t+"_status"],getOption:(e,t)=>e.settings[t],getPlugins:e=>e.plugins,getProOption:(e,t)=>e.settings["nv_pro_"+t],getLicenseTier:e=>e.license?e.license.tier:1,getLicense:e=>e.license,getToast:e=>e.toast,getTab:e=>e.currentTab,getNotifications:e=>{const t={...e.notifications};return Object.entries(e.notifications).forEach((([n,r])=>{if(!r.dependentModule)return;const a=`nv_pro_${r.dependentModule}_status`;e.settings[a]||delete t[n]})),t}};function zi(){!function(){let e=document.querySelector('.toplevel_page_neve-welcome a[href*="edit.php?post_type=neve_custom_layouts"]');(0,a.subscribe)((()=>{const t=(0,a.select)("neve-dashboard").getModuleStatus("custom_layouts");var n,r,l;t&&!e?e=function(e,t){const n=document.createElement("a");n.setAttribute("href",null==t?void 0:t.linkSubMenu),n.textContent=null==t?void 0:t.labelSubMenu;const r=document.querySelector('.toplevel_page_neve-welcome .wp-submenu a[href*="customize.php"]');if(!r)return;const a=r.parentNode,l=document.createElement("li");return l.appendChild(n),a.parentNode.insertBefore(l,a.nextSibling),n}(0,null===(n=window)||void 0===n||null===(r=n.neveDash)||void 0===r||null===(l=r.moduleObserver)||void 0===l?void 0:l.customLayouts):!t&&e&&(e.parentNode.remove(),e=void 0)}))}()}"loading"!==document.readyState?zi():document.addEventListener("DOMContentLoaded",(function(){zi()})),n(923),void 0!==window.wp&&window.wp.element&&(function(){if(window.wp.element.useId)return;const e=function(){const[e]=window.wp.element.useState(Fi);return e};window.wp.element.useId=e,window.React.useId=e}(),function(){if(window.wp.element.useSyncExternalStore)return;const e=function(e,t){const[n,r]=window.wp.element.useState(t);return window.wp.element.useEffect((()=>(r(t()),e((()=>{r(t())})))),[e,t]),n};window.wp.element.useSyncExternalStore=e,window.React.useSyncExternalStore=e}()),(0,a.registerStore)(U,{reducer:(e=Ii,t)=>{switch(t.type){case"SET_TAB":const{tab:n}=t.payload;return{...e,currentTab:n};case"SET_SETTINGS":const{object:r}=t.payload;return{...e,settings:r};case"SET_PLUGIN_STATE":const{pluginSlug:a,pluginState:l}=t.payload,o={...e.plugins};return o[a].cta=l,{...e,plugins:o};case"TOGGLE_MODULE":const{moduleSlug:i,value:s}=t.payload;return{...e,settings:{...e.settings,[i]:s}};case"CHANGE_MODULE_OPTION":const{optionStatus:c,optionValue:u}=t.payload;return{...e,settings:{...e.settings,[c]:u}};case"UPDATE_LICENSE":return{...e,license:t.payload.licenseData};case"UPDATE_TOAST_MESSAGE":return{...e,toast:t.payload};case"SET_LOGGER_STATUS":return{...e,settings:{...e.settings,neve_logger_flag:t.payload}}}return e},actions:{setTab:e=>({type:"SET_TAB",payload:{tab:e}}),setSettings:e=>({type:"SET_SETTINGS",payload:{object:e}}),setPluginState:(e,t)=>({type:"SET_PLUGIN_STATE",payload:{pluginSlug:e,pluginState:t}}),changeModuleStatus:(e,t)=>({type:"TOGGLE_MODULE",payload:{moduleSlug:"nv_pro_"+e+"_status",value:t}}),changeModuleOption:(e,t,n=!0)=>({type:"CHANGE_MODULE_OPTION",payload:{optionStatus:(n?"nv_pro_":"")+e,optionValue:t}}),changeLicense:e=>({type:"UPDATE_LICENSE",payload:{licenseData:e}}),setToast:e=>({type:"UPDATE_TOAST_MESSAGE",payload:e}),setLogger:e=>({type:"SET_LOGGER_STATUS",payload:e})},selectors:Hi}),(0,r.render)((0,r.createElement)((()=>(0,r.createElement)(r.StrictMode,null,(0,r.createElement)(Ri,null))),null),document.getElementById("neve-dashboard"))},923:()=>{const e=(e,t=1)=>{const n=Math.round(e/t);return 0===n||1===n?0:1<n&&8>n?7:8<=n&&31>n?30:30<n&&90>n?90:90>n?91:void 0};"undefined"!=typeof window&&void 0!==window.neveDash&&window.addEventListener("themeisle:survey:loaded",(function(){var t,n,r,a,l,o,i,s,c,u,d,m,f,p,v,g;null===(t=window)||void 0===t||null===(n=t.tsdk_formbricks)||void 0===n||null===(r=n.init)||void 0===r||r.call(n,{environmentId:"clr0ply35522h8up0bay2de4y",apiHost:"https://app.formbricks.com",userId:"neve_"+(null!==(a=null===(l=window.neveDash)||void 0===l||null===(o=l.license)||void 0===o?void 0:o.key)&&void 0!==a?a:null===(i=window.neveDash)||void 0===i||null===(s=i.rootUrl)||void 0===s?void 0:s.replace(/[^\w\d]*/g,"")),attributes:{plan:null!==(c=window.neveDash)&&void 0!==c&&c.pro?null===(u=window.neveDash)||void 0===u||null===(d=u.license)||void 0===d?void 0:d.tier:0,days_since_install:e(window.neveDash.daysSinceInstall),language:window.neveDash.lang,license_status:null!==(m=null===(f=window.neveDash)||void 0===f||null===(p=f.license)||void 0===p?void 0:p.valid)&&void 0!==m?m:"invalid",free_version:null===(v=window.neveDash)||void 0===v?void 0:v.version,pro_version:null===(g=window.neveDash)||void 0===g?void 0:g.proPluginVersion}})}))},184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var l=typeof n;if("string"===l||"number"===l)e.push(n);else if(Array.isArray(n)){if(n.length){var o=a.apply(null,n);o&&e.push(o)}}else if("object"===l)if(n.toString===Object.prototype.toString)for(var i in n)r.call(n,i)&&n[i]&&e.push(i);else e.push(n.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},247:function(e,t){var n,r;void 0===(r="function"==typeof(n=function(){var e=/^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;function t(e){var t,n,r=e.replace(/^v/,"").replace(/\+.*$/,""),a=(n="-",-1===(t=r).indexOf(n)?t.length:t.indexOf(n)),l=r.substring(0,a).split(".");return l.push(r.substring(a+1)),l}function n(e){return isNaN(Number(e))?e:Number(e)}function r(t){if("string"!=typeof t)throw new TypeError("Invalid argument expected string");if(!e.test(t))throw new Error("Invalid argument not valid semver ('"+t+"' received)")}function a(e,a){[e,a].forEach(r);for(var l=t(e),o=t(a),i=0;i<Math.max(l.length-1,o.length-1);i++){var s=parseInt(l[i]||0,10),c=parseInt(o[i]||0,10);if(s>c)return 1;if(c>s)return-1}var u=l[l.length-1],d=o[o.length-1];if(u&&d){var m=u.split(".").map(n),f=d.split(".").map(n);for(i=0;i<Math.max(m.length,f.length);i++){if(void 0===m[i]||"string"==typeof f[i]&&"number"==typeof m[i])return-1;if(void 0===f[i]||"string"==typeof m[i]&&"number"==typeof f[i])return 1;if(m[i]>f[i])return 1;if(f[i]>m[i])return-1}}else if(u||d)return u?-1:1;return 0}var l=[">",">=","=","<","<="],o={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]};return a.validate=function(t){return"string"==typeof t&&e.test(t)},a.compare=function(e,t,n){!function(e){if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===l.indexOf(e))throw new TypeError("Invalid operator, expected one of "+l.join("|"))}(n);var r=a(e,t);return o[n].indexOf(r)>-1},a})?n.apply(t,[]):n)||(e.exports=r)},703:(e,t,n)=>{"use strict";var r=n(414);function a(){}function l(){}l.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,l,o){if(o!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:a};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},a={};function l(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return r[e].call(n.exports,n,n.exports,l),n.exports}l.m=r,e=[],l.O=(t,n,r,a)=>{if(!n){var o=1/0;for(u=0;u<e.length;u++){n=e[u][0],r=e[u][1],a=e[u][2];for(var i=!0,s=0;s<n.length;s++)(!1&a||o>=a)&&Object.keys(l.O).every((e=>l.O[e](n[s])))?n.splice(s--,1):(i=!1,a<o&&(o=a));if(i){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[n,r,a]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var a=Object.create(null);l.r(a);var o={};t=t||[null,n({}),n([]),n(n)];for(var i=2&r&&e;"object"==typeof i&&!~t.indexOf(i);i=n(i))Object.getOwnPropertyNames(i).forEach((t=>o[t]=()=>e[t]));return o.default=()=>e,l.d(a,o),a},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={966:0,123:0};l.O.j=t=>0===e[t];var t=(t,n)=>{var r,a,o=n[0],i=n[1],s=n[2],c=0;if(o.some((t=>0!==e[t]))){for(r in i)l.o(i,r)&&(l.m[r]=i[r]);if(s)var u=s(l)}for(t&&t(n);c<o.length;c++)a=o[c],l.o(e,a)&&e[a]&&e[a][0](),e[o[c]]=0;return l.O(u)},n=self.webpackChunkneve=self.webpackChunkneve||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=l.O(void 0,[123],(()=>l(655)));o=l.O(o)})();