Uname:Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64

403WebShell
403Webshell
Server IP : 146.59.209.152  /  Your IP : 216.73.216.152
Web Server : Apache
System : Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User : monpetu ( 144298)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/monpetu/www/ipprint/wp-content/plugins/power-coupons/admin/assets/build/settings/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/monpetu/www/ipprint/wp-content/plugins/power-coupons/admin/assets/build/settings/index.js
(()=>{var e,t,n={5413(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},1141(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(5413),a=n(6957);o(n(6957),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new a.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new a.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new a.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},6957(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=n(5413),s=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),w(this,e)},e}();t.Node=s;var l=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return o(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Text,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(l);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Comment,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(l);t.Comment=u;var d=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=a.ElementType.Directive,r}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(l);t.ProcessingInstruction=d;var p=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return o(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=p;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=m;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=f;var g=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}})},enumerable:!1,configurable:!0}),t}(p);function h(e){return(0,a.isTag)(e)}function y(e){return e.type===a.ElementType.CDATA}function x(e){return e.type===a.ElementType.Text}function v(e){return e.type===a.ElementType.Comment}function b(e){return e.type===a.ElementType.Directive}function M(e){return e.type===a.ElementType.Root}function w(e,t){var n;if(void 0===t&&(t=!1),x(e))n=new c(e.data);else if(v(e))n=new u(e.data);else if(h(e)){var r=t?N(e.children):[],o=new g(e.name,i({},e.attribs),r);r.forEach(function(e){return e.parent=o}),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(y(e)){r=t?N(e.children):[];var a=new m(r);r.forEach(function(e){return e.parent=a}),n=a}else if(M(e)){r=t?N(e.children):[];var s=new f(r);r.forEach(function(e){return e.parent=s}),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!b(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function N(e){for(var t=e.map(function(e){return w(e,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=g,t.isTag=h,t.isCDATA=y,t.isText=x,t.isComment=v,t.isDirective=b,t.isDocument=M,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=w},4146(e,t,n){"use strict";var r=n(3404),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var o=m(n);o&&o!==f&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),g=l(n),h=0;h<a.length;++h){var y=a[h];if(!(i[y]||r&&r[y]||g&&g[y]||s&&s[y])){var x=p(n,y);try{c(t,y,x)}catch(e){}}}}return t}},3072(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,m=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,x=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function M(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case s:case a:case m:return e;default:switch(e=e&&e.$$typeof){case c:case p:case h:case g:case l:return e;default:return t}}case o:return t}}}function w(e){return M(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=h,t.Memo=g,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=m,t.isAsyncMode=function(e){return w(e)||M(e)===u},t.isConcurrentMode=w,t.isContextConsumer=function(e){return M(e)===c},t.isContextProvider=function(e){return M(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return M(e)===p},t.isFragment=function(e){return M(e)===i},t.isLazy=function(e){return M(e)===h},t.isMemo=function(e){return M(e)===g},t.isPortal=function(e){return M(e)===o},t.isProfiler=function(e){return M(e)===s},t.isStrictMode=function(e){return M(e)===a},t.isSuspense=function(e){return M(e)===m},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===m||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===g||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===x||e.$$typeof===v||e.$$typeof===b||e.$$typeof===y)},t.typeOf=M},3404(e,t,n){"use strict";e.exports=n(3072)},5270(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=t.CARRIAGE_RETURN_PLACEHOLDER=t.CARRIAGE_RETURN_REGEX=t.CARRIAGE_RETURN=t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,t){return e[t.toLowerCase()]=t,e},{}),t.CARRIAGE_RETURN="\r",t.CARRIAGE_RETURN_REGEX=new RegExp(t.CARRIAGE_RETURN,"g"),t.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(t.CARRIAGE_RETURN_PLACEHOLDER,"g")},5496(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n,p=(e=(0,r.escapeSpecialCharacters)(e)).match(s),m=p&&p[1]?p[1].toLowerCase():"";switch(m){case o:var f=d(e);return l.test(e)||null===(t=null==(y=f.querySelector(i))?void 0:y.parentNode)||void 0===t||t.removeChild(y),c.test(e)||null===(n=null==(y=f.querySelector(a))?void 0:y.parentNode)||void 0===n||n.removeChild(y),f.querySelectorAll(o);case i:case a:var h=u(e).querySelectorAll(m);return c.test(e)&&l.test(e)?h[0].parentNode.childNodes:h;default:return g?g(e):(y=u(e,a).querySelector(a)).childNodes;var y}};var r=n(7731),o="html",i="head",a="body",s=/<([a-zA-Z]+[0-9]?)/,l=/<head[^]*>/i,c=/<body[^]*>/i,u=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},p="object"==typeof window&&window.DOMParser;if("function"==typeof p){var m=new p;u=d=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),m.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var f=document.implementation.createHTMLDocument();u=function(e,t){if(t){var n=f.documentElement.querySelector(t);return n&&(n.innerHTML=e),f}return f.documentElement.innerHTML=e,f}}var g,h="object"==typeof document&&document.createElement("template");h&&h.content&&(g=function(e){return h.innerHTML=e,h.content.childNodes})},2471(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(a),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)};var o=r(n(5496)),i=n(7731),a=/<(![a-zA-Z\s]+)>/},7731(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.escapeSpecialCharacters=function(e){return e.replace(o.CARRIAGE_RETURN_REGEX,o.CARRIAGE_RETURN_PLACEHOLDER)},t.revertEscapedCharacters=s,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var l,c=[],u=0,d=t.length;u<d;u++){var p=t[u];switch(p.nodeType){case 1:var m=a(p.nodeName);(l=new r.Element(m,i(p.attributes))).children=e("template"===m?p.content.childNodes:p.childNodes,l);break;case 3:l=new r.Text(s(p.nodeValue));break;case 8:l=new r.Comment(p.nodeValue);break;default:continue}var f=c[u-1]||null;f&&(f.next=l),l.parent=n,l.prev=f,l.next=null,c.push(l)}return o&&((l=new r.ProcessingInstruction(o.substring(0,o.indexOf(" ")).toLowerCase(),o)).next=c[0]||null,l.parent=n,c.unshift(l),c[1]&&(c[1].prev=c[0])),c};var r=n(1141),o=n(5270);function i(e){for(var t={},n=0,r=e.length;n<r;n++){var o=e[n];t[o.name]=o.value}return t}function a(e){return function(e){return o.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase())||e}function s(e){return e.replace(o.CARRIAGE_RETURN_PLACEHOLDER_REGEX,o.CARRIAGE_RETURN)}},840(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[e.type]);for(var u in e){var d=e[u];if((0,r.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),m=l(p);if(m){var f=(0,r.getPropertyInfo)(m);switch(i.includes(m)&&a.includes(t)&&!c&&(m=l("default"+p)),n[m]=d,f&&f.type){case r.BOOLEAN:n[m]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[m]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,o.setStyleProp)(e.style,n),n};var r=n(4210),o=n(4958),i=["checked","value"],a=["input","select","textarea"],s={reset:!0,submit:!0};function l(e){return r.possibleStandardNames[e]}},308(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,c=n.transform||a.returnFirstArg,u=n.library||s,d=u.cloneElement,p=u.createElement,m=u.isValidElement,f=t.length,g=0;g<f;g++){var h=t[g];if(o){var y=n.replace(h,g);if(m(y)){f>1&&(y=d(y,{key:y.key||g})),r.push(c(y,h,g));continue}}if("text"!==h.type){var x=h,v={};l(x)?((0,a.setStyleProp)(x.attribs.style,x.attribs),v=x.attribs):x.attribs&&(v=(0,i.default)(x.attribs,x.name));var b=void 0;switch(h.type){case"script":case"style":h.children[0]&&(v.dangerouslySetInnerHTML={__html:h.children[0].data});break;case"tag":"textarea"===h.name&&h.children[0]?v.defaultValue=h.children[0].data:h.children&&h.children.length&&(b=e(h.children,n));break;default:continue}f>1&&(v.key=g),r.push(c(p(h.name,v,b),h,g))}else{var M=!h.data.trim().length;if(M&&h.parent&&!(0,a.canTextBeChildOfNode)(h.parent))continue;if(n.trim&&M)continue;r.push(c(h.data,h,g))}}return 1===r.length?r[0]:r};var o=n(1609),i=r(n(840)),a=n(4958),s={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function l(e){return a.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,a.isCustomComponent)(e.name,e.attribs)}},442(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,a.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]};var o=r(n(2471));t.htmlToDOM=o.default;var i=r(n(840));t.attributesToProps=i.default;var a=r(n(308));t.domToReact=a.default;var s=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var l={lowerCaseAttributeNames:!1}},4958(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!a.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,s)}catch(e){t.style={}}else t.style={}};var o=n(1609),i=r(n(5229)),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),s={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},5077(e){"use strict";var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,p=1;function m(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");p=~r?e.length-r:p+e.length}function f(){var e={line:d,column:p};return function(t){return t.position=new g(e),x(),t}}function g(e){this.start=e,this.end={line:d,column:p},this.source=l.source}function h(t){var n=new Error(l.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=p,n.source=e,!l.silent)throw n}function y(t){var n=t.exec(e);if(n){var r=n[0];return m(r),e=e.slice(r.length),n}}function x(){y(r)}function v(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return h("End of comment missing");var r=e.slice(2,n-2);return p+=2,m(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function M(){var e=f(),n=y(o);if(n){if(b(),!y(i))return h("property missing ':'");var r=y(a),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return y(s),l}}return g.prototype.content=e,x(),function(){var e,t=[];for(v(t);e=M();)!1!==e&&(t.push(e),v(t));return t}()}},5580(e,t,n){var r=n(6110)(n(9325),"DataView");e.exports=r},1549(e,t,n){var r=n(2032),o=n(3862),i=n(6721),a=n(2749),s=n(5749);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=a,l.prototype.set=s,e.exports=l},79(e,t,n){var r=n(3702),o=n(80),i=n(4739),a=n(8655),s=n(1175);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=a,l.prototype.set=s,e.exports=l},8223(e,t,n){var r=n(6110)(n(9325),"Map");e.exports=r},3661(e,t,n){var r=n(3040),o=n(7670),i=n(289),a=n(4509),s=n(2949);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=a,l.prototype.set=s,e.exports=l},2804(e,t,n){var r=n(6110)(n(9325),"Promise");e.exports=r},6545(e,t,n){var r=n(6110)(n(9325),"Set");e.exports=r},8859(e,t,n){var r=n(3661),o=n(1380),i=n(1459);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},7217(e,t,n){var r=n(79),o=n(1420),i=n(938),a=n(3605),s=n(9817),l=n(945);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,e.exports=c},1873(e,t,n){var r=n(9325).Symbol;e.exports=r},7828(e,t,n){var r=n(9325).Uint8Array;e.exports=r},8303(e,t,n){var r=n(6110)(n(9325),"WeakMap");e.exports=r},3729(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},9770(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},695(e,t,n){var r=n(8096),o=n(2428),i=n(6449),a=n(3656),s=n(361),l=n(7167),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),u=!n&&o(e),d=!n&&!u&&a(e),p=!n&&!u&&!d&&l(e),m=n||u||d||p,f=m?r(e.length,String):[],g=f.length;for(var h in e)!t&&!c.call(e,h)||m&&("length"==h||d&&("offset"==h||"parent"==h)||p&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||s(h,g))||f.push(h);return f}},4932(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},4528(e){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},4248(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},6547(e,t,n){var r=n(3360),o=n(5288),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},6025(e,t,n){var r=n(5288);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},4733(e,t,n){var r=n(1791),o=n(5950);e.exports=function(e,t){return e&&r(t,o(t),e)}},3838(e,t,n){var r=n(1791),o=n(7241);e.exports=function(e,t){return e&&r(t,o(t),e)}},3360(e,t,n){var r=n(3243);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},9999(e,t,n){var r=n(7217),o=n(3729),i=n(6547),a=n(4733),s=n(3838),l=n(3290),c=n(3007),u=n(2271),d=n(8948),p=n(2),m=n(3349),f=n(5861),g=n(6189),h=n(7199),y=n(5529),x=n(6449),v=n(3656),b=n(7730),M=n(3805),w=n(8440),N=n(5950),E=n(7241),j="[object Arguments]",D="[object Function]",T="[object Object]",I={};I[j]=I["[object Array]"]=I["[object ArrayBuffer]"]=I["[object DataView]"]=I["[object Boolean]"]=I["[object Date]"]=I["[object Float32Array]"]=I["[object Float64Array]"]=I["[object Int8Array]"]=I["[object Int16Array]"]=I["[object Int32Array]"]=I["[object Map]"]=I["[object Number]"]=I[T]=I["[object RegExp]"]=I["[object Set]"]=I["[object String]"]=I["[object Symbol]"]=I["[object Uint8Array]"]=I["[object Uint8ClampedArray]"]=I["[object Uint16Array]"]=I["[object Uint32Array]"]=!0,I["[object Error]"]=I[D]=I["[object WeakMap]"]=!1,e.exports=function e(t,n,k,O,_,C){var A,S=1&n,L=2&n,z=4&n;if(k&&(A=_?k(t,O,_,C):k(t)),void 0!==A)return A;if(!M(t))return t;var P=x(t);if(P){if(A=g(t),!S)return c(t,A)}else{var R=f(t),Y=R==D||"[object GeneratorFunction]"==R;if(v(t))return l(t,S);if(R==T||R==j||Y&&!_){if(A=L||Y?{}:y(t),!S)return L?d(t,s(A,t)):u(t,a(A,t))}else{if(!I[R])return _?t:{};A=h(t,R,S)}}C||(C=new r);var Q=C.get(t);if(Q)return Q;C.set(t,A),w(t)?t.forEach(function(r){A.add(e(r,n,k,r,t,C))}):b(t)&&t.forEach(function(r,o){A.set(o,e(r,n,k,o,t,C))});var F=P?void 0:(z?L?m:p:L?E:N)(t);return o(F||t,function(r,o){F&&(r=t[o=r]),i(A,o,e(r,n,k,o,t,C))}),A}},9344(e,t,n){var r=n(3805),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},909(e,t,n){var r=n(641),o=n(8329)(r);e.exports=o},6649(e,t,n){var r=n(3221)();e.exports=r},641(e,t,n){var r=n(6649),o=n(5950);e.exports=function(e,t){return e&&r(e,t,o)}},7422(e,t,n){var r=n(1769),o=n(7797);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},2199(e,t,n){var r=n(4528),o=n(6449);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},2552(e,t,n){var r=n(1873),o=n(659),i=n(9350),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},8077(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},7534(e,t,n){var r=n(2552),o=n(346);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},270(e,t,n){var r=n(7068),o=n(346);e.exports=function e(t,n,i,a,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,s))}},7068(e,t,n){var r=n(7217),o=n(5911),i=n(1986),a=n(689),s=n(5861),l=n(6449),c=n(3656),u=n(7167),d="[object Arguments]",p="[object Array]",m="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,h,y){var x=l(e),v=l(t),b=x?p:s(e),M=v?p:s(t),w=(b=b==d?m:b)==m,N=(M=M==d?m:M)==m,E=b==M;if(E&&c(e)){if(!c(t))return!1;x=!0,w=!1}if(E&&!w)return y||(y=new r),x||u(e)?o(e,t,n,g,h,y):i(e,t,b,n,g,h,y);if(!(1&n)){var j=w&&f.call(e,"__wrapped__"),D=N&&f.call(t,"__wrapped__");if(j||D){var T=j?e.value():e,I=D?t.value():t;return y||(y=new r),h(T,I,n,g,y)}}return!!E&&(y||(y=new r),a(e,t,n,g,h,y))}},9172(e,t,n){var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},1799(e,t,n){var r=n(7217),o=n(270);e.exports=function(e,t,n,i){var a=n.length,s=a,l=!i;if(null==e)return!s;for(e=Object(e);a--;){var c=n[a];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<s;){var u=(c=n[a])[0],d=e[u],p=c[1];if(l&&c[2]){if(void 0===d&&!(u in e))return!1}else{var m=new r;if(i)var f=i(d,p,u,e,t,m);if(!(void 0===f?o(p,d,3,i,m):f))return!1}}return!0}},5083(e,t,n){var r=n(1882),o=n(7296),i=n(3805),a=n(7473),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,p=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?p:s).test(a(e))}},6038(e,t,n){var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},4901(e,t,n){var r=n(2552),o=n(294),i=n(346),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},5389(e,t,n){var r=n(3663),o=n(7978),i=n(3488),a=n(6449),s=n(583);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):s(e)}},8984(e,t,n){var r=n(5527),o=n(3650),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},2903(e,t,n){var r=n(3805),o=n(5527),i=n(181),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},5128(e,t,n){var r=n(909),o=n(4894);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,function(e,r,o){i[++n]=t(e,r,o)}),i}},3663(e,t,n){var r=n(1799),o=n(776),i=n(7197);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},7978(e,t,n){var r=n(270),o=n(8156),i=n(631),a=n(8586),s=n(756),l=n(7197),c=n(7797);e.exports=function(e,t){return a(e)&&s(t)?l(c(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},7237(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7255(e,t,n){var r=n(7422);e.exports=function(e){return function(t){return r(t,e)}}},8096(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},7556(e,t,n){var r=n(1873),o=n(4932),i=n(6449),a=n(4394),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},7301(e){e.exports=function(e){return function(t){return e(t)}}},9219(e){e.exports=function(e,t){return e.has(t)}},4066(e,t,n){var r=n(3488);e.exports=function(e){return"function"==typeof e?e:r}},1769(e,t,n){var r=n(6449),o=n(8586),i=n(1802),a=n(3222);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},9653(e,t,n){var r=n(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},3290(e,t,n){e=n.nmd(e);var r=n(9325),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},6169(e,t,n){var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},3201(e){var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},3736(e,t,n){var r=n(1873),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},1961(e,t,n){var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},3007(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},1791(e,t,n){var r=n(6547),o=n(3360);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var c=t[s],u=i?i(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),a?o(n,c,u):r(n,c,u)}return n}},2271(e,t,n){var r=n(1791),o=n(4664);e.exports=function(e,t){return r(e,o(e),t)}},8948(e,t,n){var r=n(1791),o=n(6375);e.exports=function(e,t){return r(e,o(e),t)}},5481(e,t,n){var r=n(9325)["__core-js_shared__"];e.exports=r},8329(e,t,n){var r=n(4894);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,s=Object(n);(t?a--:++a<i)&&!1!==o(s[a],a,s););return n}}},3221(e){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(i[l],l,i))break}return t}}},3243(e,t,n){var r=n(6110),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},5911(e,t,n){var r=n(8859),o=n(4248),i=n(9219);e.exports=function(e,t,n,a,s,l){var c=1&n,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var p=l.get(e),m=l.get(t);if(p&&m)return p==t&&m==e;var f=-1,g=!0,h=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f<u;){var y=e[f],x=t[f];if(a)var v=c?a(x,y,f,t,e,l):a(y,x,f,e,t,l);if(void 0!==v){if(v)continue;g=!1;break}if(h){if(!o(t,function(e,t){if(!i(h,t)&&(y===e||s(y,e,n,a,l)))return h.push(t)})){g=!1;break}}else if(y!==x&&!s(y,x,n,a,l)){g=!1;break}}return l.delete(e),l.delete(t),g}},1986(e,t,n){var r=n(1873),o=n(7828),i=n(5288),a=n(5911),s=n(317),l=n(4247),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,d,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var m=s;case"[object Set]":var f=1&r;if(m||(m=l),e.size!=t.size&&!f)return!1;var g=p.get(e);if(g)return g==t;r|=2,p.set(e,t);var h=a(m(e),m(t),r,c,d,p);return p.delete(e),h;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},689(e,t,n){var r=n(2),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,s){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var d=u;d--;){var p=c[d];if(!(l?p in t:o.call(t,p)))return!1}var m=s.get(e),f=s.get(t);if(m&&f)return m==t&&f==e;var g=!0;s.set(e,t),s.set(t,e);for(var h=l;++d<u;){var y=e[p=c[d]],x=t[p];if(i)var v=l?i(x,y,p,t,e,s):i(y,x,p,e,t,s);if(!(void 0===v?y===x||a(y,x,n,i,s):v)){g=!1;break}h||(h="constructor"==p)}if(g&&!h){var b=e.constructor,M=t.constructor;b==M||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof M&&M instanceof M||(g=!1)}return s.delete(e),s.delete(t),g}},4840(e){var t="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis;e.exports=t},2(e,t,n){var r=n(2199),o=n(4664),i=n(5950);e.exports=function(e){return r(e,i,o)}},3349(e,t,n){var r=n(2199),o=n(6375),i=n(7241);e.exports=function(e){return r(e,i,o)}},2651(e,t,n){var r=n(4218);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},776(e,t,n){var r=n(756),o=n(5950);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},6110(e,t,n){var r=n(5083),o=n(392);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},8879(e,t,n){var r=n(4335)(Object.getPrototypeOf,Object);e.exports=r},659(e,t,n){var r=n(1873),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},4664(e,t,n){var r=n(9770),o=n(3345),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return i.call(e,t)}))}:o;e.exports=s},6375(e,t,n){var r=n(4528),o=n(8879),i=n(4664),a=n(3345),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=s},5861(e,t,n){var r=n(5580),o=n(8223),i=n(2804),a=n(6545),s=n(8303),l=n(2552),c=n(7473),u="[object Map]",d="[object Promise]",p="[object Set]",m="[object WeakMap]",f="[object DataView]",g=c(r),h=c(o),y=c(i),x=c(a),v=c(s),b=l;(r&&b(new r(new ArrayBuffer(1)))!=f||o&&b(new o)!=u||i&&b(i.resolve())!=d||a&&b(new a)!=p||s&&b(new s)!=m)&&(b=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case g:return f;case h:return u;case y:return d;case x:return p;case v:return m}return t}),e.exports=b},392(e){e.exports=function(e,t){return null==e?void 0:e[t]}},9326(e,t,n){var r=n(1769),o=n(2428),i=n(6449),a=n(361),s=n(294),l=n(7797);e.exports=function(e,t,n){for(var c=-1,u=(t=r(t,e)).length,d=!1;++c<u;){var p=l(t[c]);if(!(d=null!=e&&n(e,p)))break;e=e[p]}return d||++c!=u?d:!!(u=null==e?0:e.length)&&s(u)&&a(p,u)&&(i(e)||o(e))}},2032(e,t,n){var r=n(1042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},3862(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6721(e,t,n){var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},2749(e,t,n){var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},5749(e,t,n){var r=n(1042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},6189(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},7199(e,t,n){var r=n(9653),o=n(6169),i=n(3201),a=n(3736),s=n(1961);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return i(e);case"[object Symbol]":return a(e)}}},5529(e,t,n){var r=n(9344),o=n(8879),i=n(5527);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},361(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=n??9007199254740991)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},8586(e,t,n){var r=n(6449),o=n(4394),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},4218(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7296(e,t,n){var r,o=n(5481),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},5527(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},756(e,t,n){var r=n(3805);e.exports=function(e){return e==e&&!r(e)}},3702(e){e.exports=function(){this.__data__=[],this.size=0}},80(e,t,n){var r=n(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},4739(e,t,n){var r=n(6025);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},8655(e,t,n){var r=n(6025);e.exports=function(e){return r(this.__data__,e)>-1}},1175(e,t,n){var r=n(6025);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},3040(e,t,n){var r=n(1549),o=n(79),i=n(8223);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},7670(e,t,n){var r=n(2651);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},289(e,t,n){var r=n(2651);e.exports=function(e){return r(this,e).get(e)}},4509(e,t,n){var r=n(2651);e.exports=function(e){return r(this,e).has(e)}},2949(e,t,n){var r=n(2651);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},317(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},7197(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},2224(e,t,n){var r=n(104);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},1042(e,t,n){var r=n(6110)(Object,"create");e.exports=r},3650(e,t,n){var r=n(4335)(Object.keys,Object);e.exports=r},181(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},6009(e,t,n){e=n.nmd(e);var r=n(4840),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},9350(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335(e){e.exports=function(e,t){return function(n){return e(t(n))}}},9325(e,t,n){var r=n(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},1380(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1459(e){e.exports=function(e){return this.__data__.has(e)}},4247(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},1420(e,t,n){var r=n(79);e.exports=function(){this.__data__=new r,this.size=0}},938(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},3605(e){e.exports=function(e){return this.__data__.get(e)}},9817(e){e.exports=function(e){return this.__data__.has(e)}},945(e,t,n){var r=n(79),o=n(8223),i=n(3661);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},1802(e,t,n){var r=n(2224),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)}),t});e.exports=a},7797(e,t,n){var r=n(4394);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7473(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},8055(e,t,n){var r=n(9999);e.exports=function(e){return r(e,5)}},5288(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},3215(e,t,n){var r=n(641),o=n(4066);e.exports=function(e,t){return e&&r(e,o(t))}},8156(e,t,n){var r=n(7422);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},631(e,t,n){var r=n(8077),o=n(9326);e.exports=function(e,t){return null!=e&&o(e,t,r)}},3488(e){e.exports=function(e){return e}},2428(e,t,n){var r=n(7534),o=n(346),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},6449(e){var t=Array.isArray;e.exports=t},4894(e,t,n){var r=n(1882),o=n(294);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},3656(e,t,n){e=n.nmd(e);var r=n(9325),o=n(9935),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},1882(e,t,n){var r=n(2552),o=n(3805);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},294(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7730(e,t,n){var r=n(9172),o=n(7301),i=n(6009),a=i&&i.isMap,s=a?o(a):r;e.exports=s},3805(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346(e){e.exports=function(e){return null!=e&&"object"==typeof e}},1331(e,t,n){var r=n(2552),o=n(8879),i=n(346),a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},8440(e,t,n){var r=n(6038),o=n(7301),i=n(6009),a=i&&i.isSet,s=a?o(a):r;e.exports=s},5015(e,t,n){var r=n(2552),o=n(6449),i=n(346);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},4394(e,t,n){var r=n(2552),o=n(346);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},7167(e,t,n){var r=n(4901),o=n(7301),i=n(6009),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},5950(e,t,n){var r=n(695),o=n(8984),i=n(4894);e.exports=function(e){return i(e)?r(e):o(e)}},7241(e,t,n){var r=n(695),o=n(2903),i=n(4894);e.exports=function(e){return i(e)?r(e,!0):o(e)}},5378(e,t,n){var r=n(4932),o=n(5389),i=n(5128),a=n(6449);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},104(e,t,n){var r=n(3661);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},583(e,t,n){var r=n(7237),o=n(7255),i=n(8586),a=n(7797);e.exports=function(e){return i(e)?r(a(e)):o(e)}},3345(e){e.exports=function(){return[]}},9935(e){e.exports=function(){return!1}},3222(e,t,n){var r=n(7556);e.exports=function(e){return null==e?"":r(e)}},2694(e,t,n){"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=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 s.name="Invariant Violation",s}}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:i,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5338(e,t,n){"use strict";var r=n(5795);t.H=r.createRoot,r.hydrateRoot},4210(e,t,n){"use strict";function r(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(e=>{o[e]=new r(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{o[e]=new r(e,2,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(e=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(e=>{o[e]=new r(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(e=>{o[e]=new r(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(e=>{o[e]=new r(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)});const i=/[\-\:]([a-z])/g,a=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(e=>{const t=e.replace(i,a);o[t]=new r(t,1,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(i,a);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(i,a);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)}),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:s,SAME:l,possibleStandardNames:c}=n(6811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce((e,t)=>{const n=c[t];return n===l?e[t]=t:n===s?e[t.toLowerCase()]=t:e[t]=n,e},{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811(e,t){t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},9375(e){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},8505(e,t,n){var r=n(9375);e.exports=function e(t,n,o){return r(n)||(o=n||o,n=[]),o=o||{},t instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return p(e,t)}(t,n):r(t)?function(t,n,r){for(var o=[],i=0;i<t.length;i++)o.push(e(t[i],n,r).source);return p(new RegExp("(?:"+o.join("|")+")",m(r)),n)}(t,n,o):function(e,t,n){return f(i(e,n),t,n)}(t,n,o)},e.exports.parse=i,e.exports.compile=function(e,t){return c(i(e,t),t)},e.exports.tokensToFunction=c,e.exports.tokensToRegExp=f;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,s=0,l="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var u=n[0],p=n[1],m=n.index;if(l+=e.slice(s,m),s=m+u.length,p)l+=p[1];else{var f=e[s],g=n[2],h=n[3],y=n[4],x=n[5],v=n[6],b=n[7];l&&(r.push(l),l="");var M=null!=g&&null!=f&&f!==g,w="+"===v||"*"===v,N="?"===v||"*"===v,E=g||c,j=y||x,D=g||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:h||i++,prefix:g||"",delimiter:E,optional:N,repeat:w,partial:M,asterisk:!!b,pattern:j?d(j):b?".*":a(E,D)})}}return s<e.length&&(l+=e.substr(s)),l&&r.push(l),r}function a(e,t){return!t||t.indexOf(e)>-1?"[^"+u(e)+"]+?":u(t)+"|(?:(?!"+u(t)+")[^"+u(e)+"])+?"}function s(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function l(e){return encodeURI(e).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function c(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",m(t)));return function(t,o){for(var i="",a=t||{},c=(o||{}).pretty?s:encodeURIComponent,u=0;u<e.length;u++){var d=e[u];if("string"!=typeof d){var p,m=a[d.name];if(null==m){if(d.optional){d.partial&&(i+=d.prefix);continue}throw new TypeError('Expected "'+d.name+'" to be defined')}if(r(m)){if(!d.repeat)throw new TypeError('Expected "'+d.name+'" to not repeat, but received `'+JSON.stringify(m)+"`");if(0===m.length){if(d.optional)continue;throw new TypeError('Expected "'+d.name+'" to not be empty')}for(var f=0;f<m.length;f++){if(p=c(m[f]),!n[u].test(p))throw new TypeError('Expected all "'+d.name+'" to match "'+d.pattern+'", but received `'+JSON.stringify(p)+"`");i+=(0===f?d.prefix:d.delimiter)+p}}else{if(p=d.asterisk?l(m):c(m),!n[u].test(p))throw new TypeError('Expected "'+d.name+'" to match "'+d.pattern+'", but received "'+p+'"');i+=d.prefix+p}}else i+=d}return i}}function u(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function d(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function p(e,t){return e.keys=t,e}function m(e){return e&&e.sensitive?"":"i"}function f(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,a="",s=0;s<e.length;s++){var l=e[s];if("string"==typeof l)a+=u(l);else{var c=u(l.prefix),d="(?:"+l.pattern+")";t.push(l),l.repeat&&(d+="(?:"+c+d+")*"),a+=d=l.optional?l.partial?c+"("+d+")?":"(?:"+c+"("+d+"))?":c+"("+d+")"}}var f=u(n.delimiter||"/"),g=a.slice(-f.length)===f;return o||(a=(g?a.slice(0,-f.length):a)+"(?:"+f+"(?=$))?"),a+=i?"$":o&&g?"":"(?="+f+"|$)",p(new RegExp("^"+a,m(n)),t)}},4912(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for;n&&Symbol.for("react.element"),n&&Symbol.for("react.portal"),n&&Symbol.for("react.fragment"),n&&Symbol.for("react.strict_mode"),n&&Symbol.for("react.profiler"),n&&Symbol.for("react.provider"),n&&Symbol.for("react.context"),n&&Symbol.for("react.async_mode"),n&&Symbol.for("react.concurrent_mode"),n&&Symbol.for("react.forward_ref"),n&&Symbol.for("react.suspense"),n&&Symbol.for("react.suspense_list"),n&&Symbol.for("react.memo"),n&&Symbol.for("react.lazy"),n&&Symbol.for("react.block"),n&&Symbol.for("react.fundamental"),n&&Symbol.for("react.responder"),n&&Symbol.for("react.scope")},7564(e,t,n){"use strict";n(4912)},1020(e,t,n){"use strict";var r=n(1609),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},4848(e,t,n){"use strict";e.exports=n(1020)},6892(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var r,o=(r=n(3215))&&r.__esModule?r:{default:r},i=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},a={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){return t[e]||{extend:e}}},s=t.autoprefix=function(e){var t={};return(0,o.default)(e,function(e,n){var r={};(0,o.default)(e,function(e,t){var n=a[t];n?r=i({},r,n(e)):r[t]=e}),t[n]=r}),t};t.default=s},5268(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.active=void 0;var r,o=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},i=(r=n(1609))&&r.__esModule?r:{default:r};function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var s=t.active=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,s,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var c=arguments.length,u=Array(c),d=0;d<c;d++)u[d]=arguments[d];return s=l=a(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(u))),l.state={active:!1},l.handleMouseDown=function(){return l.setState({active:!0})},l.handleMouseUp=function(){return l.setState({active:!1})},l.render=function(){return i.default.createElement(t,{onMouseDown:l.handleMouseDown,onMouseUp:l.handleMouseUp},i.default.createElement(e,o({},l.props,l.state)))},a(l,s)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),r}(i.default.Component)};t.default=s},6686(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hover=void 0;var r,o=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},i=(r=n(1609))&&r.__esModule?r:{default:r};function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var s=t.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,s,l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var c=arguments.length,u=Array(c),d=0;d<c;d++)u[d]=arguments[d];return s=l=a(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(u))),l.state={hover:!1},l.handleMouseOver=function(){return l.setState({hover:!0})},l.handleMouseOut=function(){return l.setState({hover:!1})},l.render=function(){return i.default.createElement(t,{onMouseOver:l.handleMouseOver,onMouseOut:l.handleMouseOut},i.default.createElement(e,o({},l.props,l.state)))},a(l,s)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),r}(i.default.Component)};t.default=s},9265(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=s(n(5015)),o=s(n(3215)),i=s(n(1331)),a=s(n(5378));function s(e){return e&&e.__esModule?e:{default:e}}var l=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,a.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,i.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=l},8527(e,t,n){"use strict";var r=c(n(9265)),o=c(n(6203)),i=c(n(6892)),a=c(n(6686)),s=c(n(5268)),l=c(n(2693));function c(e){return e&&e.__esModule?e:{default:e}}a.default,a.default,s.default,l.default;t.Ay=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];var s=(0,r.default)(n),l=(0,o.default)(e,s);return(0,i.default)(l)}},2693(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={},r=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},6203(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeClasses=void 0;var r=a(n(3215)),o=a(n(8055)),i=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};function a(e){return e&&e.__esModule?e:{default:e}}var s=t.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=i({},n[t],o[t])}),t}),n};t.default=s},5229(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),o=n(8917);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)}),n):n}i.default=i,e.exports=i},8917(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,l):e.replace(i,l)).replace(r,s))}},1133(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,o.default)(e),i="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;const{property:r,value:o}=e;i?t(r,o,e):o&&(n=n||{},n[r]=o)}),n};const o=r(n(5077))},5160(e,t,n){"use strict";var r=n(1609),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useSyncExternalStore,a=r.useRef,s=r.useEffect,l=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=a(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=l(function(){function e(e){if(!s){if(s=!0,i=e,e=r(e),void 0!==u&&p.hasValue){var t=p.value;if(u(t,e))return a=t}return a=e}if(t=a,o(i,e))return t;var n=r(e);return void 0!==u&&u(t,n)?(i=e,t):(i=e,a=n)}var i,a,s=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,n,r,u]);var m=i(e,d[0],d[1]);return s(function(){p.hasValue=!0,p.value=m},[m]),c(m),m}},8418(e,t,n){"use strict";e.exports=n(5160)},1609(e){"use strict";e.exports=window.React},5795(e){"use strict";e.exports=window.ReactDOM}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>n[e]);return a.default=()=>n,o.d(i,a),i},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.dn=e=>{(Object.getOwnPropertyDescriptor(e,"name")||{}).writable||Object.defineProperty(e,"name",{value:"default",configurable:!0})},(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{"use strict";var e={};o.r(e),o.d(e,{Button:()=>ZM,CaptionLabel:()=>qM,Chevron:()=>XM,Day:()=>JM,DayButton:()=>KM,Dropdown:()=>ew,DropdownNav:()=>tw,Footer:()=>nw,Month:()=>rw,MonthCaption:()=>ow,MonthGrid:()=>iw,Months:()=>aw,MonthsDropdown:()=>sw,Nav:()=>lw,NextMonthButton:()=>cw,Option:()=>uw,PreviousMonthButton:()=>dw,Root:()=>pw,Select:()=>mw,Week:()=>fw,WeekNumber:()=>yw,WeekNumberHeader:()=>xw,Weekday:()=>gw,Weekdays:()=>hw,Weeks:()=>vw,YearsDropdown:()=>bw});var t={};o.r(t),o.d(t,{formatCaption:()=>ww,formatDay:()=>Ew,formatMonthCaption:()=>Nw,formatMonthDropdown:()=>jw,formatWeekNumber:()=>Tw,formatWeekNumberHeader:()=>Iw,formatWeekdayName:()=>Dw,formatYearCaption:()=>Ow,formatYearDropdown:()=>kw});var n={};o.r(n),o.d(n,{labelCaption:()=>zw,labelDay:()=>Sw,labelDayButton:()=>Aw,labelGrid:()=>Lw,labelGridcell:()=>Pw,labelMonthDropdown:()=>Rw,labelNav:()=>Yw,labelNext:()=>Qw,labelPrevious:()=>Fw,labelWeekNumber:()=>Bw,labelWeekNumberHeader:()=>Ww,labelWeekday:()=>Uw,labelYearDropdown:()=>Vw});var r=o(1609),i=o.t(r,2),a=o.n(r),s=o(5338);function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,l(e,t)}var u=o(5556),d=o.n(u);function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(null,arguments)}function m(e){return"/"===e.charAt(0)}function f(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}function g(e,t){if(!e)throw new Error("Invariant failed")}function h(e){return"/"===e.charAt(0)?e:"/"+e}function y(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function x(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function v(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function b(e,t,n,r){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=p({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],o=t&&t.split("/")||[],i=e&&m(e),a=t&&m(t),s=i||a;if(e&&m(e)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var l=o[o.length-1];n="."===l||".."===l||""===l}else n=!1;for(var c=0,u=o.length;u>=0;u--){var d=o[u];"."===d?f(o,u):".."===d?(f(o,u),c++):c&&(f(o,u),c--)}if(!s)for(;c--;c)o.unshift("..");!s||""===o[0]||o[0]&&m(o[0])||o.unshift("");var p=o.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p}(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function M(){var e=null,t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter(function(e){return e!==r})}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach(function(e){return e.apply(void 0,n)})}}}var w=!("undefined"==typeof window||!window.document||!window.document.createElement);function N(e,t){t(window.confirm(e))}var E="popstate",j="hashchange";function D(){try{return window.history.state||{}}catch(e){return{}}}var T=o(8505),I=o.n(T);function k(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}o(7564),o(4146);var O=1073741823,_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:{},C=a().createContext||function(e,t){var n,r,o,i="__create-react-context-"+((_[o="__global_unique_id__"]=(_[o]||0)+1)+"__"),s=function(e){function n(){for(var t,n,r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(t=e.call.apply(e,[this].concat(i))||this).emitter=(n=t.props.value,r=[],{on:function(e){r.push(e)},off:function(e){r=r.filter(function(t){return t!==e})},get:function(){return n},set:function(e,t){n=e,r.forEach(function(e){return e(n,t)})}}),t}c(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[i]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;!function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(r,o)?(n="function"==typeof t?t(r,o):O,0!=(n|=0)&&this.emitter.set(e.value,n)):n=0}},r.render=function(){return this.props.children},n}(a().Component);s.childContextTypes=((n={})[i]=d().object.isRequired,n);var l=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).observedBits=void 0,e.state={value:e.getValue()},e.onUpdate=function(t,n){(0|e.observedBits)&n&&e.setState({value:e.getValue()})},e}c(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=t??O},r.componentDidMount=function(){this.context[i]&&this.context[i].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=e??O},r.componentWillUnmount=function(){this.context[i]&&this.context[i].off(this.onUpdate)},r.getValue=function(){return this.context[i]?this.context[i].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(a().Component);return l.contextTypes=((r={})[i]=d().object,r),{Provider:s,Consumer:l}},A=function(e){var t=C();return t.displayName=e,t},S=A("Router-History"),L=A("Router"),z=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen(function(e){n._pendingLocation=e})),n}c(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(t){e._isMounted&&e.setState({location:t})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return a().createElement(L.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},a().createElement(S.Provider,{children:this.props.children||null,value:this.props.history}))},t}(a().Component);a().Component,a().Component;var P={},R=0;a().Component,a().Component,a().Component;var Y=a().useContext;var Q=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=function(e){void 0===e&&(e={}),w||g(!1);var t,n=window.history,r=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,a=i.forceRefresh,s=void 0!==a&&a,l=i.getUserConfirmation,c=void 0===l?N:l,u=i.keyLength,d=void 0===u?6:u,m=e.basename?x(h(e.basename)):"";function f(e){var t=e||{},n=t.key,r=t.state,o=window.location,i=o.pathname+o.search+o.hash;return m&&(i=y(i,m)),b(i,r,n)}function T(){return Math.random().toString(36).substr(2,d)}var I=M();function k(e){p(F,e),F.length=n.length,I.notifyListeners(F.location,F.action)}function O(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||A(f(e.state))}function _(){A(f(D()))}var C=!1;function A(e){C?(C=!1,k()):I.confirmTransitionTo(e,"POP",c,function(t){t?k({action:"POP",location:e}):function(e){var t=F.location,n=L.indexOf(t.key);-1===n&&(n=0);var r=L.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(C=!0,P(o))}(e)})}var S=f(D()),L=[S.key];function z(e){return m+v(e)}function P(e){n.go(e)}var R=0;function Y(e){1===(R+=e)&&1===e?(window.addEventListener(E,O),o&&window.addEventListener(j,_)):0===R&&(window.removeEventListener(E,O),o&&window.removeEventListener(j,_))}var Q=!1,F={length:n.length,action:"POP",location:S,createHref:z,push:function(e,t){var o="PUSH",i=b(e,t,T(),F.location);I.confirmTransitionTo(i,o,c,function(e){if(e){var t=z(i),a=i.key,l=i.state;if(r)if(n.pushState({key:a,state:l},null,t),s)window.location.href=t;else{var c=L.indexOf(F.location.key),u=L.slice(0,c+1);u.push(i.key),L=u,k({action:o,location:i})}else window.location.href=t}})},replace:function(e,t){var o="REPLACE",i=b(e,t,T(),F.location);I.confirmTransitionTo(i,o,c,function(e){if(e){var t=z(i),a=i.key,l=i.state;if(r)if(n.replaceState({key:a,state:l},null,t),s)window.location.replace(t);else{var c=L.indexOf(F.location.key);-1!==c&&(L[c]=i.key),k({action:o,location:i})}else window.location.replace(t)}})},go:P,goBack:function(){P(-1)},goForward:function(){P(1)},block:function(e){void 0===e&&(e=!1);var t=I.setPrompt(e);return Q||(Y(1),Q=!0),function(){return Q&&(Q=!1,Y(-1)),t()}},listen:function(e){var t=I.appendListener(e);return Y(1),function(){Y(-1),t()}}};return F}(t.props),t}return c(t,e),t.prototype.render=function(){return a().createElement(z,{history:this.history,children:this.props.children})},t}(a().Component);a().Component;var F=function(e,t){return"function"==typeof e?e(t):e},U=function(e,t){return"string"==typeof e?b(e,null,null,t):e},B=function(e){return e},W=a().forwardRef;void 0===W&&(W=B);var V=W(function(e,t){var n=e.innerRef,r=e.navigate,o=e.onClick,i=k(e,["innerRef","navigate","onClick"]),s=i.target,l=p({},i,{onClick:function(e){try{o&&o(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return l.ref=B!==W&&t||n,a().createElement("a",l)}),H=W(function(e,t){var n=e.component,r=void 0===n?V:n,o=e.replace,i=e.to,s=e.innerRef,l=k(e,["component","replace","to","innerRef"]);return a().createElement(L.Consumer,null,function(e){e||g(!1);var n=e.history,c=U(F(i,e.location),e.location),u=c?n.createHref(c):"",d=p({},l,{href:u,navigate:function(){var t=F(i,e.location),r=v(e.location)===v(U(t));(o||r?n.replace:n.push)(t)}});return B!==W?d.ref=t||s:d.innerRef=s,a().createElement(r,d)})}),G=function(e){return e},$=a().forwardRef;void 0===$&&($=G),$(function(e,t){var n=e["aria-current"],r=void 0===n?"page":n,o=e.activeClassName,i=void 0===o?"active":o,s=e.activeStyle,l=e.className,c=e.exact,u=e.isActive,d=e.location,m=e.sensitive,f=e.strict,h=e.style,y=e.to,x=e.innerRef,v=k(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a().createElement(L.Consumer,null,function(e){e||g(!1);var n=d||e.location,o=U(F(y,n),n),b=o.pathname,M=b&&b.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),w=M?function(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,s=void 0!==a&&a,l=n.sensitive,c=void 0!==l&&l;return[].concat(r).reduce(function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=P[n]||(P[n]={});if(r[e])return r[e];var o=[],i={regexp:I()(e,o,t),keys:o};return R<1e4&&(r[e]=i,R++),i}(n,{end:i,strict:s,sensitive:c}),o=r.regexp,a=r.keys,l=o.exec(e);if(!l)return null;var u=l[0],d=l.slice(1),p=e===u;return i&&!p?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:p,params:a.reduce(function(e,t,n){return e[t.name]=d[n],e},{})}},null)}(n.pathname,{path:M,exact:c,sensitive:m,strict:f}):null,N=!!(u?u(w,n):w),E="function"==typeof l?l(N):l,j="function"==typeof h?h(N):h;N&&(E=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(function(e){return e}).join(" ")}(E,i),j=p({},j,s));var D=p({"aria-current":N&&r||null,className:E,style:j,to:o},v);return G!==$?D.ref=t||x:D.innerRef=x,a().createElement(H,D)})});const Z=window.powerCouponsSettings?.power_coupons_settings||{},q=(e,t)=>"CHANGE"===t.type?{...t.data}:e,X=a().createContext(),J=({reducer:e,initialState:t,children:n})=>(0,r.createElement)(X.Provider,{value:(0,r.useReducer)(e,t)},n),K=()=>(0,r.useContext)(X);var ee=o(4848);const te=e=>{const t=ie(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),ne(n,t)||oe(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},ne=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ne(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find(({validator:e})=>e(i))?.classGroupId},re=/^\[(.+)\]$/,oe=e=>{if(re.test(e)){const t=re.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ie=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return ce(Object.entries(e.classGroups),n).forEach(([e,n])=>{ae(n,r,e,t)}),r},ae=(e,t,n,r)=>{e.forEach(e=>{if("string"!=typeof e)return"function"==typeof e?le(e)?void ae(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n}):void Object.entries(e).forEach(([e,o])=>{ae(o,se(t,e),n,r)});(""===e?t:se(t,e)).classGroupId=n})},se=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},le=e=>e.isThemeGetter,ce=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,ue=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},de=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],i=t.length,a=e=>{const n=[];let a,s=0,l=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===s){if(u===o&&(r||e.slice(c,c+i)===t)){n.push(e.slice(l,c)),l=c+i;continue}if("/"===u){a=c;continue}}"["===u?s++:"]"===u&&s--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:a&&a>l?a-l:void 0}};return n?e=>n({className:e,parseClassName:a}):a},pe=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},me=/\s+/;function fe(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=ge(e))&&(r&&(r+=" "),r+=t);return r}const ge=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ge(e[r]))&&(n&&(n+=" "),n+=t);return n};function he(e,...t){let n,r,o,i=function(s){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:ue(e.cacheSize),parseClassName:de(e),...te(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)};function a(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(me);let s="";for(let e=a.length-1;e>=0;e-=1){const t=a[e],{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let p=Boolean(d),m=r(p?u.substring(0,d):u);if(!m){if(!p){s=t+(s.length>0?" "+s:s);continue}if(m=r(u),!m){s=t+(s.length>0?" "+s:s);continue}p=!1}const f=pe(l).join(":"),g=c?f+"!":f,h=g+m;if(i.includes(h))continue;i.push(h);const y=o(m,p);for(let e=0;e<y.length;++e){const t=y[e];i.push(g+t)}s=t+(s.length>0?" "+s:s)}return s})(e,n);return o(e,i),i}return function(){return i(fe.apply(null,arguments))}}const ye=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},xe=/^\[(?:([a-z-]+):)?(.+)\]$/i,ve=/^\d+\/\d+$/,be=new Set(["px","full","screen"]),Me=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,we=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ne=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ee=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,je=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,De=e=>Ie(e)||be.has(e)||ve.test(e),Te=e=>Fe(e,"length",Ue),Ie=e=>Boolean(e)&&!Number.isNaN(Number(e)),ke=e=>Fe(e,"number",Ie),Oe=e=>Boolean(e)&&Number.isInteger(Number(e)),_e=e=>e.endsWith("%")&&Ie(e.slice(0,-1)),Ce=e=>xe.test(e),Ae=e=>Me.test(e),Se=new Set(["length","size","percentage"]),Le=e=>Fe(e,Se,Be),ze=e=>Fe(e,"position",Be),Pe=new Set(["image","url"]),Re=e=>Fe(e,Pe,Ve),Ye=e=>Fe(e,"",We),Qe=()=>!0,Fe=(e,t,n)=>{const r=xe.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},Ue=e=>we.test(e)&&!Ne.test(e),Be=()=>!1,We=e=>Ee.test(e),Ve=e=>je.test(e),He=(Symbol.toStringTag,()=>{const e=ye("colors"),t=ye("spacing"),n=ye("blur"),r=ye("brightness"),o=ye("borderColor"),i=ye("borderRadius"),a=ye("borderSpacing"),s=ye("borderWidth"),l=ye("contrast"),c=ye("grayscale"),u=ye("hueRotate"),d=ye("invert"),p=ye("gap"),m=ye("gradientColorStops"),f=ye("gradientColorStopPositions"),g=ye("inset"),h=ye("margin"),y=ye("opacity"),x=ye("padding"),v=ye("saturate"),b=ye("scale"),M=ye("sepia"),w=ye("skew"),N=ye("space"),E=ye("translate"),j=()=>["auto",Ce,t],D=()=>[Ce,t],T=()=>["",De,Te],I=()=>["auto",Ie,Ce],k=()=>["","0",Ce],O=()=>[Ie,Ce];return{cacheSize:500,separator:":",theme:{colors:[Qe],spacing:[De,Te],blur:["none","",Ae,Ce],brightness:O(),borderColor:[e],borderRadius:["none","","full",Ae,Ce],borderSpacing:D(),borderWidth:T(),contrast:O(),grayscale:k(),hueRotate:O(),invert:k(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[_e,Te],inset:j(),margin:j(),opacity:O(),padding:D(),saturate:O(),scale:O(),sepia:k(),skew:O(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",Ce]}],container:["container"],columns:[{columns:[Ae]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Ce]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Oe,Ce]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ce]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",Oe,Ce]}],"grid-cols":[{"grid-cols":[Qe]}],"col-start-end":[{col:["auto",{span:["full",Oe,Ce]},Ce]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[Qe]}],"row-start-end":[{row:["auto",{span:[Oe,Ce]},Ce]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ce]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ce,t]}],"min-w":[{"min-w":[Ce,t,"min","max","fit"]}],"max-w":[{"max-w":[Ce,t,"none","full","min","max","fit","prose",{screen:[Ae]},Ae]}],h:[{h:[Ce,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ce,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ce,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ce,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ae,Te]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ke]}],"font-family":[{font:[Qe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ce]}],"line-clamp":[{"line-clamp":["none",Ie,ke]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",De,Ce]}],"list-image":[{"list-image":["none",Ce]}],"list-style-type":[{list:["none","disc","decimal",Ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",De,Te]}],"underline-offset":[{"underline-offset":["auto",De,Ce]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",ze]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Le]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Re]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[f]}],"gradient-via-pos":[{via:[f]}],"gradient-to-pos":[{to:[f]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[De,Ce]}],"outline-w":[{outline:[De,Te]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:T()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[De,Te]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ae,Ye]}],"shadow-color":[{shadow:[Qe]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ae,Ce]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[v]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ce]}],duration:[{duration:O()}],ease:[{ease:["linear","in","out","in-out",Ce]}],delay:[{delay:O()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Oe,Ce]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[w]}],"skew-y":[{"skew-y":[w]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ce]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ce]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ce]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[De,Te,ke]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}),Ge=he(He);function $e(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=$e(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ze(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=$e(e))&&(r&&(r+=" "),r+=t);return r}const qe=(...e)=>Ge(Ze(...e)),Xe=(...e)=>(...t)=>e.filter(Boolean).forEach(e=>e?.(...t)),Je=e=>{const t={0:"gap-0",xxs:"gap-1",xs:"gap-2",sm:"gap-3",md:"gap-4",lg:"gap-5",xl:"gap-6","2xl":"gap-8"};return t[e]||t.md},Ke={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},et=()=>{const e=window.navigator?.userAgentData?.platform||window.navigator.platform;let t="null";return["macOS","Macintosh","MacIntel","MacPPC","Mac68K"].includes(e)?t="Mac OS":["Win32","Win64","Windows","WinCE"].includes(e)&&(t="Windows"),t},tt=(e,t)=>{if(!(typeof window>"u"))try{localStorage.setItem(e,JSON.stringify(t))}catch(e){console.error(e)}},nt=e=>{if(typeof window>"u")return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return console.error(e),null}};let rt=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};const ot=(...e)=>e.filter((e,t,n)=>Boolean(e)&&n.indexOf(e)===t).join(" ");var it={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 at=(0,r.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:a,iconNode:s,...l},c)=>(0,r.createElement)("svg",{ref:c,...it,width:t,height:t,stroke:e,strokeWidth:o?24*Number(n)/Number(t):n,className:ot("lucide",i),...l},[...s.map(([e,t])=>(0,r.createElement)(e,t)),...Array.isArray(a)?a:[a]])),st=(e,t)=>{const n=(0,r.forwardRef)(({className:n,...o},i)=>{return(0,r.createElement)(at,{ref:i,iconNode:t,className:ot(`lucide-${a=e,a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...o});var a});return n.displayName=`${e}`,n},lt=st("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),ct=st("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),ut=(0,r.forwardRef)(({children:e=null,tag:t="label",size:n="sm",className:r="",variant:o="neutral",required:i=!1,...a},s)=>{if(!e)return null;let l="";return i&&(l="after:content-['*'] after:text-field-required after:ml-0.5"),(0,ee.jsx)(t,{ref:s,className:qe("font-medium text-field-label flex items-center gap-0.5",{xs:"text-xs [&>*]:text-xs [&>svg]:h-3 [&>svg]:w-3",sm:"text-sm [&>*]:text-sm [&>svg]:h-4 [&>svg]:w-4",md:"text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5"}[n],{neutral:"text-field-label [&>*]:text-field-label",help:"text-field-helper [&>*]:text-field-helper",error:"text-support-error [&>*]:text-support-error",disabled:"text-field-color-disabled disabled cursor-not-allowed [&>*]:text-field-color-disabled"}[o],l,{neutral:"",help:"font-normal",error:"font-normal",disabled:""}?.[o],r),...a,children:e})});ut.displayName="Label";const dt=(0,r.forwardRef)(({id:e,label:t,defaultChecked:n=!1,checked:o,onChange:i,indeterminate:a,disabled:s,size:l="md",className:c,...u},d)=>{const p=(0,r.useMemo)(()=>e||`checkbox-${rt()}`,[e]),m=(0,r.useMemo)(()=>typeof o<"u",[o]),[f,g]=(0,r.useState)(n||!1),h="primary",y={sm:{checkbox:"size-4 rounded gap-1",icon:"size-3",text:"text-sm",description:"text-sm",gap:"gap-0.5"},md:{checkbox:"size-5 rounded gap-1",icon:"size-4",text:"text-base",description:"text-sm",gap:"gap-1"}},x={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus",icon:"text-white"}},v=(0,r.useCallback)(()=>m?o:f,[m,o,f]),b=(0,r.useCallback)(()=>(0,r.isValidElement)(t)?t:t?.heading||t?.description?(0,ee.jsxs)("div",{className:y[l].gap,children:[t?.heading&&(0,ee.jsx)(ut,{className:qe("text-text-primary font-medium leading-4 m-0",y[l].text,y[l].gap,s&&"text-text-disabled"),htmlFor:p,children:t?.heading}),t?.description&&(0,ee.jsx)(ut,{tag:"p",className:qe("font-normal leading-5 m-0",y[l].description,s&&"text-text-disabled"),variant:"help",children:t?.description})]}):null,[t,l,s]);return(0,ee.jsxs)("div",{className:qe("inline-flex items-center justify-center gap-2",!!t&&"items-start",s&&"cursor-not-allowed"),children:[(0,ee.jsxs)("label",{className:qe("relative flex items-center justify-center rounded-full p-0.5",!s&&"cursor-pointer"),htmlFor:p,children:[(0,ee.jsx)("input",{ref:d,id:p,type:"checkbox",className:qe("peer relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",x[h].checkbox,y[l].checkbox,s&&"cursor-not-allowed disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled",c),checked:v(),onChange:e=>{if(s)return;const t=e.target.checked;m||g(t),"function"==typeof i&&i(t)},disabled:s,...u}),(0,ee.jsx)("span",{className:qe("pointer-events-none inline-flex items-center absolute top-2/4 not-rtl:left-2/4 rtl:right-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",x[h].icon,s&&"cursor-not-allowed peer-disabled:text-border-disabled"),children:a?(0,ee.jsx)(lt,{className:qe(y[l]?.icon)}):(0,ee.jsx)(ct,{className:qe(y[l]?.icon)})})]}),!!t&&b()]})});dt.displayName="Checkbox";const pt=(0,r.createContext)(void 0),mt=()=>{const e=(0,r.useContext)(pt);if(!e)throw new Error("Table components must be used within Table component");return e},ft=({children:e,className:t,checkboxSelection:n=!1,...o})=>{const i={checkboxSelection:n},a=r.Children.toArray(e).find(e=>r.isValidElement(e)&&e.type===bt),s=r.Children.toArray(e).filter(e=>r.isValidElement(e)&&e.type!==bt);return(0,ee.jsx)(pt.Provider,{value:i,children:(0,ee.jsxs)("div",{className:"flow-root border-0.5 border-solid border-border-subtle rounded-md divide-y-0.5 divide-x-0 divide-solid divide-border-subtle overflow-hidden",children:[(0,ee.jsx)("div",{className:"overflow-x-auto w-full",children:(0,ee.jsx)("div",{className:"relative",children:(0,ee.jsx)("table",{className:qe("table-fixed min-w-full border-collapse border-spacing-0",t),...o,children:s})})}),a]})})},gt=({children:e,className:t,selected:n,onChangeSelection:r,indeterminate:o,disabled:i,...a})=>{const{checkboxSelection:s}=mt();return(0,ee.jsx)("thead",{className:qe("bg-background-secondary border-x-0 border-t-0 border-b-0.5 border-solid border-border-subtle",t),...a,children:(0,ee.jsxs)("tr",{children:[s&&(0,ee.jsx)("th",{scope:"col",className:"relative px-5.5 w-11 overflow-hidden",children:(0,ee.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,ee.jsx)(dt,{size:"sm",checked:n,indeterminate:o,disabled:i,onChange:e=>{"function"==typeof r&&r(e)},"aria-label":n?"Deselect all":"Select all"})})}),e]})})},ht=({children:e,className:t,...n})=>(0,ee.jsx)("th",{scope:"col",className:qe("p-3 text-left text-sm font-medium leading-5 text-text-primary",t),...n,children:e}),yt=({children:e,className:t,...n})=>(0,ee.jsx)("tbody",{className:qe("bg-background-primary divide-y-0.5 divide-x-0 divide-solid divide-border-subtle",t),...n,children:e}),xt=({children:e,selected:t,value:n,className:r,onChangeSelection:o,...i})=>{const{checkboxSelection:a}=mt();return(0,ee.jsxs)("tr",{className:qe("hover:bg-background-secondary",t&&"bg-background-secondary",r),...i,children:[a&&(0,ee.jsx)("td",{className:"relative px-5.5 w-11 overflow-hidden",children:(0,ee.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,ee.jsx)(dt,{size:"sm",checked:t,onChange:e=>{"function"==typeof o&&o(e,n)},"aria-label":"Select row"})})}),e]})},vt=({children:e,className:t,...n})=>(0,ee.jsx)("td",{className:qe("px-3 py-3.5 text-sm font-normal leading-5 text-text-secondary",t),...n,children:e}),bt=({children:e,className:t,...n})=>{const{checkboxSelection:r}=mt();return(0,ee.jsx)("div",{className:qe("px-3 py-3",r&&"px-4",t),...n,children:e})};ft.displayName="Table",gt.displayName="Table.Head",ht.displayName="Table.HeadCell",yt.displayName="Table.Body",xt.displayName="Table.Row",vt.displayName="Table.Cell",bt.displayName="Table.Footer",ft.Head=gt,ft.HeadCell=ht,ft.Body=yt,ft.Row=xt,ft.Cell=vt,ft.Footer=bt;const Mt={sm:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"}},wt={sm:{xs:"gap-2",sm:"gap-4",md:"gap-5",lg:"gap-6",xl:"gap-6","2xl":"gap-8"},md:{xs:"md:gap-2",sm:"md:gap-4",md:"md:gap-5",lg:"md:gap-6",xl:"md:gap-6","2xl":"md:gap-8"},lg:{xs:"lg:gap-2",sm:"lg:gap-4",md:"lg:gap-5",lg:"lg:gap-6",xl:"lg:gap-6","2xl":"lg:gap-8"}},Nt={sm:{xs:"gap-x-2",sm:"gap-x-4",md:"gap-x-5",lg:"gap-x-6",xl:"gap-x-6","2xl":"gap-x-8"},md:{xs:"md:gap-x-2",sm:"md:gap-x-4",md:"md:gap-x-5",lg:"md:gap-x-6",xl:"md:gap-x-6","2xl":"md:gap-x-8"},lg:{xs:"lg:gap-x-2",sm:"lg:gap-x-4",md:"lg:gap-x-5",lg:"lg:gap-x-6",xl:"lg:gap-x-6","2xl":"lg:gap-x-8"}},Et={sm:{xs:"gap-y-2",sm:"gap-y-4",md:"gap-y-5",lg:"gap-y-6",xl:"gap-y-6","2xl":"gap-y-8"},md:{xs:"md:gap-y-2",sm:"md:gap-y-4",md:"md:gap-y-5",lg:"md:gap-y-6",xl:"md:gap-y-6","2xl":"md:gap-y-8"},lg:{xs:"lg:gap-y-2",sm:"lg:gap-y-4",md:"lg:gap-y-5",lg:"lg:gap-y-6",xl:"lg:gap-y-6","2xl":"lg:gap-y-8"}},jt={sm:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}},Dt={sm:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12"},md:{1:"md:col-start-1",2:"md:col-start-2",3:"md:col-start-3",4:"md:col-start-4",5:"md:col-start-5",6:"md:col-start-6",7:"md:col-start-7",8:"md:col-start-8",9:"md:col-start-9",10:"md:col-start-10",11:"md:col-start-11",12:"md:col-start-12"},lg:{1:"lg:col-start-1",2:"lg:col-start-2",3:"lg:col-start-3",4:"lg:col-start-4",5:"lg:col-start-5",6:"lg:col-start-6",7:"lg:col-start-7",8:"lg:col-start-8",9:"lg:col-start-9",10:"lg:col-start-10",11:"lg:col-start-11",12:"lg:col-start-12"}},Tt={sm:{row:"grid-flow-row",column:"grid-flow-col","row-dense":"grid-flow-row-dense","column-dense":"grid-flow-col-dense"},md:{row:"md:grid-flow-row",column:"md:grid-flow-col","row-dense":"md:grid-flow-row-dense","column-dense":"md:grid-flow-col-dense"},lg:{row:"lg:grid-flow-row",column:"lg:grid-flow-col","row-dense":"lg:grid-flow-row-dense","column-dense":"lg:grid-flow-col-dense"}},It={sm:{normal:"justify-normal",start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},md:{normal:"md:justify-normal",start:"md:justify-start",end:"md:justify-end",center:"md:justify-center",between:"md:justify-between",around:"md:justify-around",evenly:"md:justify-evenly",stretch:"md:justify-stretch"},lg:{normal:"lg:justify-normal",start:"lg:justify-start",end:"lg:justify-end",center:"lg:justify-center",between:"lg:justify-between",around:"lg:justify-around",evenly:"lg:justify-evenly",stretch:"lg:justify-stretch"}},kt={sm:{start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},md:{start:"md:items-start",end:"md:items-end",center:"md:items-center",baseline:"md:items-baseline",stretch:"md:items-stretch"},lg:{start:"lg:items-start",end:"lg:items-end",center:"lg:items-center",baseline:"lg:items-baseline",stretch:"lg:items-stretch"}},Ot={sm:{start:"self-start",end:"self-end",center:"self-center",baseline:"self-baseline",stretch:"self-stretch"},md:{start:"md:self-start",end:"md:self-end",center:"md:self-center",baseline:"md:self-baseline",stretch:"md:self-stretch"},lg:{start:"lg:self-start",end:"lg:self-end",center:"lg:self-center",baseline:"lg:self-baseline",stretch:"lg:self-stretch"}},_t={sm:{auto:"justify-self-auto",start:"justify-self-start",end:"justify-self-end",center:"justify-self-center",baseline:"justify-self-baseline",stretch:"justify-self-stretch"},md:{auto:"md:justify-self-auto",start:"md:justify-self-start",end:"md:justify-self-end",center:"md:justify-self-center",baseline:"md:justify-self-baseline",stretch:"md:justify-self-stretch"},lg:{auto:"lg:justify-self-auto",start:"lg:justify-self-start",end:"lg:justify-self-end",center:"lg:justify-self-center",baseline:"lg:justify-self-baseline",stretch:"lg:justify-self-stretch"}},Ct={sm:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},md:{row:"md:flex-row","row-reverse":"md:flex-row-reverse",column:"md:flex-col","column-reverse":"md:flex-col-reverse"},lg:{row:"lg:flex-row","row-reverse":"lg:flex-row-reverse",column:"lg:flex-col","column-reverse":"lg:flex-col-reverse"}},At={sm:{wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},md:{wrap:"md:flex-wrap","wrap-reverse":"md:flex-wrap-reverse",nowrap:"md:flex-nowrap"},lg:{wrap:"lg:flex-wrap","wrap-reverse":"lg:flex-wrap-reverse",nowrap:"lg:flex-nowrap"}},St={sm:{1:"w-full",2:"w-1/2",3:"w-1/3",4:"w-1/4",5:"w-1/5",6:"w-1/6",7:"w-1/7",8:"w-1/8",9:"w-1/9",10:"w-1/10",11:"w-1/11",12:"w-1/12"},md:{1:"md:w-full",2:"md:w-1/2",3:"md:w-1/3",4:"md:w-1/4",5:"md:w-1/5",6:"md:w-1/6",7:"md:w-1/7",8:"md:w-1/8",9:"md:w-1/9",10:"md:w-1/10",11:"md:w-1/11",12:"md:w-1/12"},lg:{1:"lg:w-full",2:"lg:w-1/2",3:"lg:w-1/3",4:"lg:w-1/4",5:"lg:w-1/5",6:"lg:w-1/6",7:"lg:w-1/7",8:"lg:w-1/8",9:"lg:w-1/9",10:"lg:w-1/10",11:"lg:w-1/11",12:"lg:w-1/12"}},Lt={sm:{1:"order-1",2:"order-2",3:"order-3",4:"order-4",5:"order-5",6:"order-6",7:"order-7",8:"order-8",9:"order-9",10:"order-10",11:"order-11",12:"order-12",first:"order-first",last:"order-last",none:"order-none"},md:{1:"md:order-1",2:"md:order-2",3:"md:order-3",4:"md:order-4",5:"md:order-5",6:"md:order-6",7:"md:order-7",8:"md:order-8",9:"md:order-9",10:"md:order-10",11:"md:order-11",12:"md:order-12",first:"md:order-first",last:"md:order-last",none:"md:order-none"},lg:{1:"lg:order-1",2:"lg:order-2",3:"lg:order-3",4:"lg:order-4",5:"lg:order-5",6:"lg:order-6",7:"lg:order-7",8:"lg:order-8",9:"lg:order-9",10:"lg:order-10",11:"lg:order-11",12:"lg:order-12",first:"lg:order-first",last:"lg:order-last",none:"lg:order-none"}},zt={sm:{0:"grow-0",1:"grow"},md:{0:"md:grow-0",1:"md:grow"},lg:{0:"lg:grow-0",1:"lg:grow"}},Pt={sm:{0:"shrink-0",1:"shrink"},md:{0:"md:shrink-0",1:"md:shrink"},lg:{0:"lg:shrink-0",1:"lg:shrink"}},Rt=(e,t,n,r="sm")=>{const o=[];switch(typeof e){case"object":for(const[r,i]of Object.entries(e))t[r]&&o.push(t?.[r]?.[i]??t?.[r]?.[n?.[r]]??"");break;case"string":case"number":const i=r;o.push(t?.[i]?.[e]??t?.[i]?.[n?.[i]]??"");break;default:if(void 0===e)break;o.push(t?.[r]?.[n]??"")}return o.join(" ")},Yt=({className:e,cols:t,gap:n,gapX:r,gapY:o,align:i,justify:a,gridFlow:s,colsSubGrid:l=!1,rowsSubGrid:c=!1,autoRows:u=!1,autoCols:d=!1,children:p,...m})=>{const f=Rt(t,Mt,1),g=Rt(n,wt,"sm"),h=Rt(r,Nt,""),y=Rt(o,Et,""),x=Rt(i,kt,""),v=Rt(a,It,""),b=Rt(s,Tt,"");return(0,ee.jsx)("div",{className:qe("grid",{"grid-cols-subgrid":l,"grid-rows-subgrid":c,"auto-cols-auto":d,"auto-rows-auto":u},f,g,h,y,x,v,b,e),...m,children:p})};Yt.Item=({className:e,children:t,colSpan:n,colStart:r,alignSelf:o,justifySelf:i,...a})=>{const s=Rt(n,jt,0),l=Rt(r,Dt,0),c=Rt(o,Ot,""),u=Rt(i,_t,"");return(0,ee.jsx)("div",{className:qe(s,l,c,u,e),...a,children:t})};const Qt=(0,r.createContext)({}),Ft=({containerType:e="flex",gap:t="sm",gapX:n,gapY:r,direction:o,justify:i,align:a,wrap:s,cols:l,className:c,children:u,...d})=>{if("grid"===e)return(0,ee.jsx)(Qt.Provider,{value:{containerType:e},children:(0,ee.jsx)(Yt,{className:c,gap:t,gapX:n,gapY:r,cols:l,children:u,align:a,justify:i,...d})});const p=Rt(s,At,""),m=Rt(t,wt,"sm"),f=Rt(n,Nt,""),g=Rt(r,Et,""),h=Rt(o,Ct,""),y=Rt(i,It,""),x=Rt(a,kt,""),v=qe("flex",p,m,f,g,h,y,x,c);return(0,ee.jsx)(Qt.Provider,{value:{containerType:e,cols:l},children:"flex"===e?(0,ee.jsx)("div",{className:v,children:u}):(0,ee.jsx)(Yt,{className:c,gap:t,gapX:n,gapY:r,cols:l,children:u,align:a,justify:i,...d})})},Ut=({grow:e,shrink:t,order:n,alignSelf:o,justifySelf:i,className:a,children:s,...l})=>{const{containerType:c,cols:u}=(0,r.useContext)(Qt);if("grid"===c)return(0,ee.jsx)(Yt.Item,{className:a,alignSelf:o,justifySelf:i,children:s,...l});const d=Rt(o,Ot,""),p=Rt(i,_t,""),m=Rt(e,zt,0),f=Rt(t,Pt,0),g=Rt(n,Lt,0),h=Rt(u,St,1);return(0,ee.jsx)("div",{className:qe("box-border",m,f,g,d,p,h,a),children:s})};Ft.Item=Ut,Ft.displayName="Container",Ut.displayName="Container.Item";const Bt=({label:e,switchId:t,disabled:n=!1,children:o,size:i})=>{const a={xs:"text-xs leading-4 font-medium",sm:"text-sm leading-5 font-medium",md:"text-base leading-6 font-medium"},s={xs:"text-xs leading-4 font-normal",sm:"text-sm leading-5 font-normal",md:"text-sm leading-5 font-normal"},l={xs:"space-y-0.5",sm:"space-y-0.5",md:"space-y-1"};if((0,r.isValidElement)(e))return(0,ee.jsxs)("div",{className:qe("inline-flex items-center gap-3","items-start"),children:[o,e]});const c=!e?.heading&&!e?.description,u=e?.heading&&e?.description?"items-start":"items-center";return c?o:(0,ee.jsxs)("div",{className:qe("inline-flex",u,"gap-3"),children:[o,(()=>{const{heading:r="",description:o=""}=e||{};return(0,ee.jsxs)("div",{className:qe("space-y-0.5",l[i]),children:[r&&(0,ee.jsx)(ut,{htmlFor:t,className:qe("m-0",a[i]),...n&&{variant:"disabled"},children:r}),o&&(0,ee.jsx)(ut,{tag:"p",variant:"help",className:qe("text-sm font-normal leading-5 m-0",s[i]),...n&&{variant:"disabled"},children:o})]})})()]})},Wt=(0,r.forwardRef)(({id:e,onChange:t,value:n,defaultValue:o=!1,size:i="sm",disabled:a=!1,label:s={heading:"",description:""},name:l,className:c,...u},d)=>{const p="lg"===i?"md":i,m=(0,r.useMemo)(()=>typeof n<"u",[n]),f=(0,r.useMemo)(()=>e||`switch-${rt()}`,[]),[g,h]=(0,r.useState)(o),y="primary",x=(0,r.useCallback)(()=>m?n:g,[m,n,g]),v={primary:{input:"bg-toggle-off checked:bg-toggle-on focus:ring focus:ring-toggle-on focus:ring-offset-2 border border-solid border-toggle-off-border checked:border-toggle-on-border shadow-toggleContainer focus:outline-none checked:focus:border-toggle-on-border focus:border-toggle-off-border",toggleDial:"bg-toggle-dial-background shadow-toggleDial"}},b={md:{container:"w-11 h-6",toggleDial:"size-4 peer-checked:translate-x-5"},sm:{container:"w-10 h-5",toggleDial:"size-3 peer-checked:translate-x-5"},xs:{container:"w-8 h-4",toggleDial:"size-2.5 peer-checked:translate-x-3.75"}};return(0,ee.jsx)(Bt,{label:s,switchId:f,disabled:a,size:p,children:(0,ee.jsxs)("div",{className:qe("relative group/switch inline-block cursor-pointer rounded-full shrink-0",b[p].container,c),children:[(0,ee.jsx)("input",{ref:d,id:f,type:"checkbox",className:qe("peer appearance-none absolute rounded-full cursor-pointer transition-colors duration-300 h-full w-full  before:content-[''] checked:before:content-[''] m-0 checked:[background-image:none]",v[y].input,a&&"bg-toggle-off-disabled disabled:border-transparent disabled:cursor-not-allowed checked:disabled:bg-toggle-on-disabled disabled:shadow-toggle-disabled",!a&&{primary:{input:"group-hover/switch:bg-toggle-off-hover checked:group-hover/switch:bg-toggle-on-hover checked:group-hover/switch:border-toggle-on-border"}}[y].input),checked:x(),onChange:e=>{if(a)return;const n=e.target.checked;m||h(n),"function"==typeof t&&t(n)},disabled:a,name:l,...u}),(0,ee.jsx)("label",{htmlFor:f,className:qe("peer/toggle-dial bg-white border rounded-full absolute cursor-pointer shadow-md before:content[''] before:transition-opacity before:opacity-0 hover:before:opacity-10 before:hidden border-none transition-all duration-300 top-2/4 not-rtl:left-1 rtl:right-1 -translate-y-2/4 before:w-10 before:h-10 before:rounded-full before:absolute before:top-2/4 not-rtl:before:left-2/4 rtl:before:right-2/4 before:-translate-y-2/4 before:-translate-x-2/4",b[p].toggleDial,v[y].toggleDial,a&&"peer-disabled:cursor-not-allowed",!a&&{md:"group-hover/switch:size-5 group-focus-within/switch:size-5 not-rtl:group-focus-within/switch:left-0.5 rtl:group-focus-within/switch:right-0.5 not-rtl:group-hover/switch:left-0.5 rtl:group-hover/switch:right-0.5",sm:"group-hover/switch:size-4 group-focus-within/switch:size-4 not-rtl:group-focus-within/switch:left-0.5 rtl:group-focus-within/switch:right-0.5 not-rtl:group-hover/switch:left-0.5 rtl:group-hover/switch:right-0.5",xs:"group-hover/switch:size-3.25 group-focus-within/switch:size-3.25 not-rtl:group-focus-within/switch:left-0.5 rtl:group-focus-within/switch:right-0.5 not-rtl:group-hover/switch:left-0.5 rtl:group-hover/switch:right-0.5"}[p])})]})})});Wt.displayName="Switch";let Vt=1;const Ht=new class{#e;#t;constructor(){this.#e=[],this.#t=[]}subscribe(e){return this.#t.push(e),()=>{this.#t=this.#t.filter(t=>t!==e)}}publish(e){this.#t.forEach(t=>t(e))}add(e){this.#e.push(e),this.publish(e)}remove(e){return this.#e=this.#e.filter(t=>t.id!==e),e}create(e){const{id:t,message:n="",jsx:r,...o}=e;if(!n&&"function"!=typeof r)return;const i="number"==typeof t?t:Vt++;return this.#e.find(e=>e.id===i)&&(this.#e=this.#e.map(e=>e.id===i?(this.publish({...e,title:n,jsx:r,...o}),{...e,title:n,jsx:r,...o}):e)),this.add({id:i,title:n,jsx:r,...o}),i}update(e,t){const{render:n}=t;let r=t;switch(typeof n){case"function":r={jsx:n,...t};break;case"string":r={title:n,...t}}this.#e=this.#e.map(t=>t.id===e?(this.publish({...t,...r}),{...t,...r}):t)}dismiss(e){return e||this.#e.forEach(e=>this.#t.forEach(t=>t({id:e.id,dismiss:!0}))),this.#t.forEach(t=>t({id:e,dismiss:!0})),e}history(){return this.#e}default(e="",t={}){return this.create({message:e,type:"neutral",...t})}success(e="",t={}){return this.create({message:e,type:"success",...t})}error(e="",t={}){return this.create({message:e,type:"error",...t})}warning(e="",t={}){return this.create({message:e,type:"warning",...t})}info(e="",t={}){return this.create({message:e,type:"info",...t})}custom(e,t={}){return this.create({jsx:e,type:"custom",...t})}},Gt=Object.seal(Object.assign((e,t)=>Ht.default(e,t),{success:Ht.success.bind(Ht),error:Ht.error.bind(Ht),warning:Ht.warning.bind(Ht),info:Ht.info.bind(Ht),custom:Ht.custom.bind(Ht),dismiss:Ht.dismiss.bind(Ht),update:Ht.update.bind(Ht)},{getHistory:Ht.history.bind(Ht)})),$t=st("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Zt=st("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),qt=st("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Xt=st("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),Jt=(0,r.forwardRef)((e,t)=>{const{variant:n="primary",size:o="md",type:i="button",tag:a="button",className:s,children:l,disabled:c=!1,destructive:u=!1,icon:d=null,iconPosition:p="left",loading:m=!1,...f}=e,g=u&&"focus:ring-focus-error",h=m?"opacity-50 disabled:cursor-not-allowed":"",y={primary:"text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover shadow-xs disabled:shadow-none focus:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",secondary:"text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover shadow-xs focus:shadow-none disabled:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",outline:"text-button-tertiary-color outline-border-subtle bg-button-tertiary shadow-sm focus:shadow-none hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled",ghost:"text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover",link:"outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none"}[n],x=u&&!c?{primary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",secondary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",outline:"text-button-danger outline outline-1 outline-button-danger hover:outline-button-danger bg-button-tertiary hover:bg-field-background-error",ghost:"text-button-danger hover:bg-field-background-error",link:"text-button-danger hover:text-button-danger-secondary"}[n]:"",v={xs:"p-1 rounded [&>svg]:size-4",sm:"p-2 rounded [&>svg]:size-4 gap-0.5",md:"p-2.5 rounded-md text-sm [&>svg]:size-5 gap-1",lg:"p-3 rounded-lg text-base [&>svg]:size-6 gap-1"}[o];let b,M=null,w="";return d&&(w="flex items-center justify-center","left"===p?b=d:M=d),(0,ee.jsxs)(a,{ref:t,type:i,className:qe(w,"outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled",v,y,x,g,h,{"cursor-default":c},s),disabled:c,"aria-disabled":c,...f,children:[(0,ee.jsx)(r.Fragment,{children:b},"left-icon"),l?(0,ee.jsx)("span",{className:"px-1",children:l}):null,(0,ee.jsx)(r.Fragment,{children:M},"right-icon")]})});Jt.displayName="Button";const Kt="light",en="neutral",tn=({icon:e,theme:t=Kt,variant:n=en})=>{const o="[&>svg]:h-5 [&>svg]:w-5",i=(({theme:e=Kt,variant:t=en})=>{let n="light"===e?"text-icon-secondary":"text-icon-inverse";return n={info:"light"===e?"text-support-info":"text-support-info-inverse",success:"light"===e?"text-support-success":"text-support-success-inverse",warning:"light"===e?"text-support-warning":"text-support-warning-inverse",error:"light"===e?"text-support-error":"text-support-error-inverse"}[t]||n,n})({theme:t,variant:n});if(e&&(0,r.isValidElement)(e))return(0,r.cloneElement)(e,{className:qe(o,i,e?.props?.className??"")});const a={neutral:(0,ee.jsx)(Zt,{className:qe(o,i)}),info:(0,ee.jsx)(Zt,{className:qe(o,i)}),success:(0,ee.jsx)(ct,{className:qe(o,i)}),warning:(0,ee.jsx)(qt,{className:qe(o,i)}),error:(0,ee.jsx)(Xt,{className:qe(o,i)})};return a[n]||a.neutral},nn=({actionType:e="button",onAction:t=()=>{},actionLabel:n="",theme:r=Kt})=>{const o="focus:ring-0 focus:ring-offset-0 ring-offset-0 focus:outline-none";let i="text-button-primary border-button-primary hover:border-button-primary hover:text-button-primary-hover";switch("dark"===r&&(i="text-text-inverse border-text-inverse hover:border-text-inverse hover:text-text-inverse"),e){case"button":return(0,ee.jsx)(Jt,{variant:"outline",size:"xs",onClick:t,className:qe("rounded",o,i,"dark"===r?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:n});case"link":return(0,ee.jsx)(Jt,{variant:"link",size:"xs",onClick:t,className:qe(o,i),children:n});default:return null}},rn=({theme:e=Kt,title:t="",inline:n=!1})=>t?(0,ee.jsx)("span",{className:qe("block",{light:"text-text-primary",dark:"text-text-inverse"}[e],"text-sm leading-5 font-semibold",n?"inline":"block"),children:t}):null,on=({theme:e=Kt,content:t="",inline:n=!1})=>t?(0,ee.jsx)("span",{className:qe({light:"text-text-primary",dark:"text-text-inverse"}[e],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal [word-break:break-word]",n?"inline":"block"),children:t}):null,an=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},sn={"top-left":"top-0 bottom-0 left-0 justify-start items-start","top-right":"top-0 bottom-0 right-0 justify-start items-end","bottom-left":"top-0 bottom-0 left-0 justify-end items-start","bottom-right":"top-0 bottom-0 right-0 justify-end items-end"},ln={neutral:"border-alert-border-neutral bg-alert-background-neutral",custom:"border-alert-border-neutral bg-alert-background-neutral",info:"border-alert-border-info bg-alert-background-info",success:"border-alert-border-green bg-alert-background-green",warning:"border-alert-border-warning bg-alert-background-warning",error:"border-alert-border-danger bg-alert-background-danger"},cn="bg-background-inverse border-background-inverse",un={light:"text-icon-secondary",dark:"text-icon-inverse"};var dn=o(5795);const pn=(0,r.createContext)({});function mn(e){const t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}const fn=(0,r.createContext)(null),gn=(0,r.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class hn extends r.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function yn({children:e,isPresent:t}){const n=(0,r.useId)(),o=(0,r.useRef)(null),i=(0,r.useRef)({width:0,height:0,top:0,left:0}),{nonce:a}=(0,r.useContext)(gn);return(0,r.useInsertionEffect)(()=>{const{width:e,height:r,top:s,left:l}=i.current;if(t||!o.current||!e||!r)return;o.current.dataset.motionPopId=n;const c=document.createElement("style");return a&&(c.nonce=a),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n          [data-motion-pop-id="${n}"] {\n            position: absolute !important;\n            width: ${e}px !important;\n            height: ${r}px !important;\n            top: ${s}px !important;\n            left: ${l}px !important;\n          }\n        `),()=>{document.head.removeChild(c)}},[t]),(0,ee.jsx)(hn,{isPresent:t,childRef:o,sizeRef:i,children:r.cloneElement(e,{ref:o})})}const xn=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:i,presenceAffectsLayout:a,mode:s})=>{const l=mn(vn),c=(0,r.useId)(),u=(0,r.useCallback)(e=>{l.set(e,!0);for(const e of l.values())if(!e)return;o&&o()},[l,o]),d=(0,r.useMemo)(()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:u,register:e=>(l.set(e,!1),()=>l.delete(e))}),a?[Math.random(),u]:[n,u]);return(0,r.useMemo)(()=>{l.forEach((e,t)=>l.set(t,!1))},[n]),r.useEffect(()=>{!n&&!l.size&&o&&o()},[n]),"popLayout"===s&&(e=(0,ee.jsx)(yn,{isPresent:n,children:e})),(0,ee.jsx)(fn.Provider,{value:d,children:e})};function vn(){return new Map}function bn(e=!0){const t=(0,r.useContext)(fn);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:o,register:i}=t,a=(0,r.useId)();(0,r.useEffect)(()=>{e&&i(a)},[e]);const s=(0,r.useCallback)(()=>e&&o&&o(a),[a,o,e]);return!n&&o?[!1,s]:[!0]}const Mn=e=>e.key||"";function wn(e){const t=[];return r.Children.forEach(e,e=>{(0,r.isValidElement)(e)&&t.push(e)}),t}const Nn="undefined"!=typeof window,En=Nn?r.useLayoutEffect:r.useEffect,jn=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:a="sync",propagate:s=!1})=>{const[l,c]=bn(s),u=(0,r.useMemo)(()=>wn(e),[e]),d=s&&!l?[]:u.map(Mn),p=(0,r.useRef)(!0),m=(0,r.useRef)(u),f=mn(()=>new Map),[g,h]=(0,r.useState)(u),[y,x]=(0,r.useState)(u);En(()=>{p.current=!1,m.current=u;for(let e=0;e<y.length;e++){const t=Mn(y[e]);d.includes(t)?f.delete(t):!0!==f.get(t)&&f.set(t,!1)}},[y,d.length,d.join("-")]);const v=[];if(u!==g){let e=[...u];for(let t=0;t<y.length;t++){const n=y[t],r=Mn(n);d.includes(r)||(e.splice(t,0,n),v.push(n))}return"wait"===a&&v.length&&(e=v),x(wn(e)),void h(u)}const{forceRender:b}=(0,r.useContext)(pn);return(0,ee.jsx)(ee.Fragment,{children:y.map(e=>{const r=Mn(e),g=!(s&&!l)&&(u===y||d.includes(r));return(0,ee.jsx)(xn,{isPresent:g,initial:!(p.current&&!n)&&void 0,custom:g?void 0:t,presenceAffectsLayout:i,mode:a,onExitComplete:g?void 0:()=>{if(!f.has(r))return;f.set(r,!0);let e=!0;f.forEach(t=>{t||(e=!1)}),e&&(null==b||b(),x(m.current),s&&(null==c||c()),o&&o())},children:e},r)})})};function Dn(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy((...t)=>e(...t),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function Tn(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const In=e=>Array.isArray(e);function kn(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function On(e){return"string"==typeof e||Array.isArray(e)}function Cn(e){const t=[{},{}];return null==e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function An(e,t,n,r){if("function"==typeof t){const[o,i]=Cn(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=Cn(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function Sn(e,t,n){const r=e.getProps();return An(r,t,void 0!==n?n:r.custom,e)}const Ln=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],zn=["initial",...Ln];function Pn(e){let t;return()=>(void 0===t&&(t=e()),t)}const Rn=Pn(()=>void 0!==window.ScrollTimeline);class Yn{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map(n=>Rn()&&n.attachTimeline?n.attachTimeline(e):"function"==typeof t?t(n):void 0);return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Qn extends Yn{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function Fn(e,t){return e?e[t]||e.default||e:void 0}const Un=2e4;function Bn(e){let t=0,n=e.next(t);for(;!n.done&&t<Un;)t+=50,n=e.next(t);return t>=Un?1/0:t}function Wn(e){return"function"==typeof e}function Vn(e,t){e.timeline=t,e.onfinish=null}const Hn=e=>Array.isArray(e)&&"number"==typeof e[0],Gn={linearEasing:void 0};function $n(e,t){const n=Pn(e);return()=>{var e;return null!==(e=Gn[t])&&void 0!==e?e:n()}}const Zn=$n(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),qn=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Xn=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let t=0;t<o;t++)r+=e(qn(0,o-1,t))+", ";return`linear(${r.substring(0,r.length-2)})`};function Jn(e){return Boolean("function"==typeof e&&Zn()||!e||"string"==typeof e&&(e in er||Zn())||Hn(e)||Array.isArray(e)&&e.every(Jn))}const Kn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,er={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Kn([0,.65,.55,1]),circOut:Kn([.55,0,1,.45]),backIn:Kn([.31,.01,.66,-.59]),backOut:Kn([.33,1.53,.69,.99])};function tr(e,t){return e?"function"==typeof e&&Zn()?Xn(e,t):Hn(e)?Kn(e):Array.isArray(e)?e.map(e=>tr(e,t)||er.easeOut):er[e]:void 0}const nr={x:!1,y:!1};function rr(){return nr.x||nr.y}function or(e,t){const n=function(e){if(e instanceof Element)return[e];if("string"==typeof e){let t=document;const n=t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ir(e){return t=>{"touch"===t.pointerType||rr()||e(t)}}const ar=(e,t)=>!!t&&(e===t||ar(e,t.parentElement)),sr=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,lr=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),cr=new WeakSet;function ur(e){return t=>{"Enter"===t.key&&e(t)}}function dr(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function pr(e){return sr(e)&&!rr()}const mr=e=>1e3*e,fr=e=>e/1e3,gr=e=>e,hr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yr=new Set(hr),xr=new Set(["width","height","top","left","right","bottom",...hr]),vr=e=>In(e)?e[e.length-1]||0:e,br=["read","resolveKeyframes","update","preRender","render","postRender"];function Mr(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=br.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(t){i.has(t)&&(l.schedule(t),e()),t(a)}const l={schedule:(e,o=!1,a=!1)=>{const s=a&&r?t:n;return o&&i.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{a=e,r?o=!0:(r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,o&&(o=!1,l.process(e)))}};return l}(i),e),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:p}=a,m=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),p.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:br.reduce((t,i)=>{const s=a[i];return t[i]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(m)),s.schedule(t,i,a)),t},{}),cancel:e=>{for(let t=0;t<br.length;t++)a[br[t]].cancel(e)},state:o,steps:a}}const{schedule:wr,cancel:Nr,state:Er,steps:jr}=Mr("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:gr,!0);let Dr;function Tr(){Dr=void 0}const Ir={now:()=>(void 0===Dr&&Ir.set(Er.isProcessing?Er.timestamp:performance.now()),Dr),set:e=>{Dr=e,queueMicrotask(Tr)}};function kr(e,t){-1===e.indexOf(t)&&e.push(t)}function Or(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class _r{constructor(){this.subscriptions=[]}add(e){return kr(this.subscriptions,e),()=>Or(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Cr(e,t){return t?e*(1e3/t):0}const Ar={current:void 0};class Sr{constructor(e,t={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=Ir.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Ir.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new _r);const n=this.events[e].add(t);return"change"===e?()=>{n(),wr.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Ar.current&&Ar.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Ir.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Cr(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Lr(e,t){return new Sr(e,t)}function zr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Lr(n))}const Pr=e=>Boolean(e&&e.getVelocity);function Rr(e,t){const n=e.getValue("willChange");if(r=n,Boolean(Pr(r)&&r.add))return n.add(t);var r}const Yr=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Qr="data-"+Yr("framerAppearId");function Fr(e){return e.props[Qr]}const Ur=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Br(e,t,n,r){if(e===t&&n===r)return gr;return o=>0===o||1===o?o:Ur(function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=Ur(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(o,0,1,e,n),t,r)}const Wr=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Vr=e=>t=>1-e(1-t),Hr=Br(.33,1.53,.69,.99),Gr=Vr(Hr),$r=Wr(Gr),Zr=e=>(e*=2)<1?.5*Gr(e):.5*(2-Math.pow(2,-10*(e-1))),qr=e=>1-Math.sin(Math.acos(e)),Xr=Vr(qr),Jr=Wr(qr),Kr=e=>/^0[^.\s]+$/u.test(e);function eo(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||Kr(e)}const to=(e,t,n)=>n>t?t:n<e?e:n,no={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},ro={...no,transform:e=>to(0,1,e)},oo={...no,default:1},io=e=>Math.round(1e5*e)/1e5,ao=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,so=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lo=(e,t)=>n=>Boolean("string"==typeof n&&so.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),co=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,a,s]=r.match(ao);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},uo={...no,transform:e=>Math.round((e=>to(0,255,e))(e))},po={test:lo("rgb","red"),parse:co("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+uo.transform(e)+", "+uo.transform(t)+", "+uo.transform(n)+", "+io(ro.transform(r))+")"},mo={test:lo("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:po.transform},fo=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),go=fo("deg"),ho=fo("%"),yo=fo("px"),xo=fo("vh"),vo=fo("vw"),bo={...ho,parse:e=>ho.parse(e)/100,transform:e=>ho.transform(100*e)},Mo={test:lo("hsl","hue"),parse:co("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ho.transform(io(t))+", "+ho.transform(io(n))+", "+io(ro.transform(r))+")"},wo={test:e=>po.test(e)||mo.test(e)||Mo.test(e),parse:e=>po.test(e)?po.parse(e):Mo.test(e)?Mo.parse(e):mo.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?po.transform(e):Mo.transform(e)},No=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Eo="number",jo="color",Do=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function To(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(Do,e=>(wo.test(e)?(r.color.push(i),o.push(jo),n.push(wo.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(Eo),n.push(parseFloat(e))),++i,"${}")).split("${}");return{values:n,split:a,indexes:r,types:o}}function Io(e){return To(e).values}function ko(e){const{split:t,types:n}=To(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===Eo?io(e[i]):t===jo?wo.transform(e[i]):e[i]}return o}}const Oo=e=>"number"==typeof e?0:e,_o={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(ao))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(No))||void 0===n?void 0:n.length)||0)>0},parse:Io,createTransformer:ko,getAnimatableNone:function(e){const t=Io(e);return ko(e)(t.map(Oo))}},Co=new Set(["brightness","contrast","saturate","opacity"]);function Ao(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(ao)||[];if(!r)return e;const o=n.replace(r,"");let i=Co.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const So=/\b([a-z-]*)\(.*?\)/gu,Lo={..._o,getAnimatableNone:e=>{const t=e.match(So);return t?t.map(Ao).join(" "):e}},zo={borderWidth:yo,borderTopWidth:yo,borderRightWidth:yo,borderBottomWidth:yo,borderLeftWidth:yo,borderRadius:yo,radius:yo,borderTopLeftRadius:yo,borderTopRightRadius:yo,borderBottomRightRadius:yo,borderBottomLeftRadius:yo,width:yo,maxWidth:yo,height:yo,maxHeight:yo,top:yo,right:yo,bottom:yo,left:yo,padding:yo,paddingTop:yo,paddingRight:yo,paddingBottom:yo,paddingLeft:yo,margin:yo,marginTop:yo,marginRight:yo,marginBottom:yo,marginLeft:yo,backgroundPositionX:yo,backgroundPositionY:yo},Po={rotate:go,rotateX:go,rotateY:go,rotateZ:go,scale:oo,scaleX:oo,scaleY:oo,scaleZ:oo,skew:go,skewX:go,skewY:go,distance:yo,translateX:yo,translateY:yo,translateZ:yo,x:yo,y:yo,z:yo,perspective:yo,transformPerspective:yo,opacity:ro,originX:bo,originY:bo,originZ:yo},Ro={...no,transform:Math.round},Yo={...zo,...Po,zIndex:Ro,size:yo,fillOpacity:ro,strokeOpacity:ro,numOctaves:Ro},Qo={...Yo,color:wo,backgroundColor:wo,outlineColor:wo,fill:wo,stroke:wo,borderColor:wo,borderTopColor:wo,borderRightColor:wo,borderBottomColor:wo,borderLeftColor:wo,filter:Lo,WebkitFilter:Lo},Fo=e=>Qo[e];function Uo(e,t){let n=Fo(e);return n!==Lo&&(n=_o),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Bo=new Set(["auto","none","0"]),Wo=e=>e===no||e===yo,Vo=(e,t)=>parseFloat(e.split(", ")[t]),Ho=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Vo(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?Vo(t[1],e):0}},Go=new Set(["x","y","z"]),$o=hr.filter(e=>!Go.has(e)),Zo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Ho(4,13),y:Ho(5,14)};Zo.translateX=Zo.x,Zo.translateY=Zo.y;const qo=new Set;let Xo=!1,Jo=!1;function Ko(){if(Jo){const e=Array.from(qo).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return $o.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}Jo=!1,Xo=!1,qo.forEach(e=>e.complete()),qo.clear()}function ei(){qo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Jo=!0)})}class ti{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(qo.add(this),Xo||(Xo=!0,wr.read(ei),wr.resolveKeyframes(Ko))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),qo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,qo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}let ni=gr,ri=gr;const oi=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ii=e=>t=>"string"==typeof t&&t.startsWith(e),ai=ii("--"),si=ii("var(--"),li=e=>!!si(e)&&ci.test(e.split("/*")[0].trim()),ci=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ui=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function di(e,t,n=1){ri(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=ui.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${null!=n?n:r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return oi(e)?parseFloat(e):e}return li(o)?di(o,t,n+1):o}const pi=e=>t=>t.test(e),mi=[no,yo,ho,go,vo,xo,{test:e=>"auto"===e,parse:e=>e}],fi=e=>mi.find(pi(e));class gi extends ti{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),li(r))){const o=di(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!xr.has(n)||2!==e.length)return;const[r,o]=e,i=fi(r),a=fi(o);if(i!==a)if(Wo(i)&&Wo(a))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)eo(e[t])&&n.push(t);n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!Bo.has(t)&&To(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=Uo(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Zo[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=Zo[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const hi=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!_o.test(e)&&"0"!==e||e.startsWith("url(")));function yi(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],a=hi(o,t),s=hi(i,t);return ni(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!a||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||Wn(n))&&r)}const xi=e=>null!==e;function vi(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(xi),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}class bi{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ir.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(ei(),Ko()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=Ir.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:a,onUpdate:s,isGenerator:l}=this.options;if(!l&&!yi(e,n,r,o)){if(!i)return s&&s(vi(e,this.options,t)),a&&a(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const Mi=(e,t,n)=>e+(t-e)*n;function wi(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ni(e,t){return n=>n>0?t:e}const Ei=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},ji=[mo,po,Mo];function Di(e){const t=(e=>ji.find(t=>t.test(e)))(e);if(ni(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let n=t.parse(e);return t===Mo&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=wi(s,r,e+1/3),i=wi(s,r,e),a=wi(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(n)),n}const Ti=(e,t)=>{const n=Di(e),r=Di(t);if(!n||!r)return Ni(e,t);const o={...n};return e=>(o.red=Ei(n.red,r.red,e),o.green=Ei(n.green,r.green,e),o.blue=Ei(n.blue,r.blue,e),o.alpha=Mi(n.alpha,r.alpha,e),po.transform(o))},Ii=(e,t)=>n=>t(e(n)),ki=(...e)=>e.reduce(Ii),Oi=new Set(["none","hidden"]);function _i(e,t){return n=>Mi(e,t,n)}function Ci(e){return"number"==typeof e?_i:"string"==typeof e?li(e)?Ni:wo.test(e)?Ti:Li:Array.isArray(e)?Ai:"object"==typeof e?wo.test(e)?Ti:Si:Ni}function Ai(e,t){const n=[...e],r=n.length,o=e.map((e,n)=>Ci(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function Si(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Ci(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Li=(e,t)=>{const n=_o.createTransformer(t),r=To(e),o=To(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Oi.has(e)&&!o.values.length||Oi.has(t)&&!r.values.length?function(e,t){return Oi.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):ki(Ai(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=null!==(n=e.values[s])&&void 0!==n?n:0;r[i]=l,o[a]++}return r}(r,o),o.values),n):(ni(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Ni(e,t))};function zi(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?Mi(e,t,n):Ci(e)(e,t)}function Pi(e,t,n){const r=Math.max(t-5,0);return Cr(n-e(r),t-r)}const Ri=.01,Yi=2,Qi=.005,Fi=.5;const Ui=12;function Bi(e,t){return e*Math.sqrt(1-t*t)}const Wi=["duration","bounce"],Vi=["stiffness","damping","mass"];function Hi(e,t){return t.some(t=>void 0!==e[t])}function Gi(e=.3,t=.3){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:p,isResolvedFromDuration:m}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Hi(e,Vi)&&Hi(e,Wi))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,i=2*to(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:1,stiffness:o,damping:i}}else{const n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:r=1}){let o,i;ni(e<=mr(10),"Spring duration must be 10 seconds or less");let a=1-t;a=to(.05,1,a),e=to(.01,10,fr(e)),a<1?(o=t=>{const r=t*a,o=r*e;return.001-(r-n)/Bi(t,a)*Math.exp(-o)},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=Bi(Math.pow(t,2),a);return(.001-o(t)>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<Ui;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=mr(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...n,velocity:-fr(n.velocity||0)}),f=p||0,g=c/(2*Math.sqrt(l*u)),h=a-i,y=fr(Math.sqrt(l/u)),x=Math.abs(h)<5;let v;if(r||(r=x?Ri:Yi),o||(o=x?Qi:Fi),g<1){const e=Bi(y,g);v=t=>{const n=Math.exp(-g*y*t);return a-n*((f+g*y*h)/e*Math.sin(e*t)+h*Math.cos(e*t))}}else if(1===g)v=e=>a-Math.exp(-y*e)*(h+(f+y*h)*e);else{const e=y*Math.sqrt(g*g-1);v=t=>{const n=Math.exp(-g*y*t),r=Math.min(e*t,300);return a-n*((f+g*y*h)*Math.sinh(r)+e*h*Math.cosh(r))/e}}const b={calculatedDuration:m&&d||null,next:e=>{const t=v(e);if(m)s.done=e>=d;else{let n=0;g<1&&(n=0===e?mr(f):Pi(v,e,t));const i=Math.abs(n)<=r,l=Math.abs(a-t)<=o;s.done=i&&l}return s.value=s.done?a:t,s},toString:()=>{const e=Math.min(Bn(b),Un),t=Xn(t=>b.next(e*t).value,e,30);return e+"ms "+t}};return b}function $i({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],p={done:!1,value:d},m=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let f=n*t;const g=d+f,h=void 0===a?g:a(g);h!==g&&(f=h-d);const y=e=>-f*Math.exp(-e/r),x=e=>h+y(e),v=e=>{const t=y(e),n=x(e);p.done=Math.abs(t)<=c,p.value=p.done?h:n};let b,M;const w=e=>{(e=>void 0!==s&&e<s||void 0!==l&&e>l)(p.value)&&(b=e,M=Gi({keyframes:[p.value,m(p.value)],velocity:Pi(x,e,p.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:e=>{let t=!1;return M||void 0!==b||(t=!0,v(e),w(e)),void 0!==b&&e>=b?M.next(e-b):(!t&&v(e),p)}}}const Zi=Br(.42,0,1,1),qi=Br(0,0,.58,1),Xi=Br(.42,0,.58,1),Ji={linear:gr,easeIn:Zi,easeInOut:Xi,easeOut:qi,circIn:qr,circInOut:Jr,circOut:Xr,backIn:Gr,backInOut:$r,backOut:Hr,anticipate:Zr},Ki=e=>{if(Hn(e)){ri(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Br(t,n,r,o)}return"string"==typeof e?(ri(void 0!==Ji[e],`Invalid easing type '${e}'`),Ji[e]):e};function ea({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Ki):Ki(r),i={done:!1,value:t[0]},a=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=qn(0,t,r);e.push(Mi(n,1,o))}}(t,e.length-1),t}(t),e),s=function(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(ri(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||zi,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||gr:t;i=ki(e,i)}r.push(i)}return r}(t,r,o),l=s.length,c=n=>{if(a&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const o=qn(e[r],e[r+1],n);return s[r](o)};return n?t=>c(to(e[0],e[i-1],t)):c}(a,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map(()=>c||Xi).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}const ta=e=>{const t=({timestamp:t})=>e(t);return{start:()=>wr.update(t,!0),stop:()=>Nr(t),now:()=>Er.isProcessing?Er.timestamp:Ir.now()}},na={decay:$i,inertia:$i,tween:ea,keyframes:ea,spring:Gi},ra=e=>e/100;class oa extends bi{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:o}=this.options,i=(null==r?void 0:r.KeyframeResolver)||ti;this.resolver=new i(o,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,a=Wn(t)?t:na[t]||ea;let s,l;a!==ea&&"number"!=typeof e[0]&&(s=ki(ra,zi(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});"mirror"===o&&(l=a({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=Bn(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:s,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:p,repeatType:m,repeatDelay:f,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const h=this.currentTime-d*(this.speed>=0?1:-1),y=this.speed>=0?h<0:h>c;this.currentTime=Math.max(h,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let x=this.currentTime,v=o;if(p){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,p+1),Boolean(t%2)&&("reverse"===m?(n=1-n,f&&(n-=f/u)):"mirror"===m&&(v=i)),x=to(0,1,n)*u}const b=y?{done:!1,value:s[0]}:v.next(x);a&&(b.value=a(b.value));let{done:M}=b;y||null===l||(M=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const w=null===this.holdTime&&("finished"===this.state||"running"===this.state&&M);return w&&void 0!==r&&(b.value=vi(s,this.options,r)),g&&g(b.value),w&&this.finish(),b}get duration(){const{resolved:e}=this;return e?fr(e.calculatedDuration):0}get time(){return fr(this.currentTime)}set time(e){e=mr(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=fr(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=ta,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const ia=new Set(["opacity","clipPath","filter","transform"]),aa=Pn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sa={anticipate:Zr,backInOut:$r,circInOut:Jr};class la extends bi{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new gi(o,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:o,type:i,motionValue:a,name:s,startTime:l}=this.options;if(!a.owner||!a.owner.current)return!1;if("string"==typeof o&&Zn()&&o in sa&&(o=sa[o]),Wn((c=this.options).type)||"spring"===c.type||!Jn(c.ease)){const{onComplete:t,onUpdate:a,motionValue:s,element:l,...c}=this.options,u=function(e,t){const n=new oa({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),n=u.duration,r=u.times,o=u.ease,i="keyframes"}var c;const u=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=tr(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(a.owner.current,s,e,{...this.options,duration:n,times:r,ease:o});return u.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(Vn(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;a.set(vi(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:n,times:r,type:i,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return fr(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return fr(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=mr(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return gr;const{animation:n}=t;Vn(n,e)}else this.pendingTimeline=e;return gr}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:a}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:s,element:l,...c}=this.options,u=new oa({...c,keyframes:n,duration:r,type:o,ease:i,times:a,isGenerator:!0}),d=mr(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:s}=this.options;s&&s(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t&&t.owner&&t.owner.current instanceof HTMLElement))return!1;const{onUpdate:s,transformTemplate:l}=t.owner.getProps();return aa()&&n&&ia.has(n)&&!s&&!l&&!r&&"mirror"!==o&&0!==i&&"inertia"!==a}}const ca={type:"spring",stiffness:500,damping:25,restSpeed:10},ua={type:"keyframes",duration:.8},da={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pa=(e,{keyframes:t})=>t.length>2?ua:yr.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:ca:da,ma=(e,t,n,r={},o,i)=>a=>{const s=Fn(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=mr(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(s)||(u={...u,...pa(e,u)}),u.duration&&(u.duration=mr(u.duration)),u.repeatDelay&&(u.repeatDelay=mr(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),d&&!i&&void 0!==t.get()){const e=vi(u.keyframes,s);if(void 0!==e)return wr.update(()=>{u.onUpdate(e),u.onComplete()}),new Qn([])}return!i&&la.supports(u)?new la(u):new oa(u)};function fa({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function ga(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const r=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),o=l[t];if(void 0===o||u&&fa(u,t))continue;const s={delay:n,...Fn(a||{},t)};let d=!1;if(window.MotionHandoffAnimation){const n=Fr(e);if(n){const e=window.MotionHandoffAnimation(n,t,wr);null!==e&&(s.startTime=e,d=!0)}}Rr(e,t),r.start(ma(t,r,o,e.shouldReduceMotion&&xr.has(t)?{type:!1}:s,e,d));const p=r.animation;p&&c.push(p)}return s&&Promise.all(c).then(()=>{wr.update(()=>{s&&function(e,t){const n=Sn(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)zr(e,t,vr(i[t]))}(e,s)})}),c}function ha(e,t,n={}){var r;const o=Sn(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(ga(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(ya).forEach((e,r)=>{e.notify("AnimationStart",t),a.push(ha(e,t,{...i,delay:n+l(r)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(a)}(e,t,o+r,a,s,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then(()=>t())}return Promise.all([a(),s(n.delay)])}function ya(e,t){return e.sortNodePosition(t)}const xa=zn.length;function va(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&va(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<xa;n++){const r=zn[n],o=e.props[r];(On(o)||!1===o)&&(t[r]=o)}return t}const ba=[...Ln].reverse(),Ma=Ln.length;function wa(e){let t=function(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map(t=>ha(e,t,n));r=Promise.all(o)}else if("string"==typeof t)r=ha(e,t,n);else{const o="function"==typeof t?Sn(e,t,n.custom):t;r=Promise.all(ga(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}(e),n=ja(),r=!0;const o=t=>(n,r)=>{var o;const i=Sn(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const{props:a}=e,s=va(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Ma;t++){const p=ba[t],m=n[p],f=void 0!==a[p]?a[p]:s[p],g=On(f),h=p===i?m.isActive:null;!1===h&&(d=t);let y=f===s[p]&&f!==a[p]&&g;if(y&&r&&e.manuallyAnimateOnMount&&(y=!1),m.protectedKeys={...u},!m.isActive&&null===h||!f&&!m.prevProp||Tn(f)||"boolean"==typeof f)continue;const x=Na(m.prevProp,f);let v=x||p===i&&m.isActive&&!y&&g||t>d&&g,b=!1;const M=Array.isArray(f)?f:[f];let w=M.reduce(o(p),{});!1===h&&(w={});const{prevResolvedValues:N={}}=m,E={...N,...w},j=t=>{v=!0,c.has(t)&&(b=!0,c.delete(t)),m.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in E){const t=w[e],n=N[e];if(u.hasOwnProperty(e))continue;let r=!1;r=In(t)&&In(n)?!kn(t,n):t!==n,r?null!=t?j(e):c.add(e):void 0!==t&&c.has(e)?j(e):m.protectedKeys[e]=!0}m.prevProp=f,m.prevResolvedValues=w,m.isActive&&(u={...u,...w}),r&&e.blockInitialAnimation&&(v=!1),v&&(!y||!x||b)&&l.push(...M.map(e=>({animation:e,options:{type:p}})))}if(c.size){const t={};c.forEach(n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=null!=r?r:null}),l.push({animation:t})}let p=Boolean(l.length);return!r||!1!==a.initial&&a.initial!==a.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,p?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach(e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)}),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=ja(),r=!0}}}function Na(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!kn(t,e)}function Ea(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ja(){return{animate:Ea(!0),whileInView:Ea(),whileHover:Ea(),whileTap:Ea(),whileDrag:Ea(),whileFocus:Ea(),exit:Ea()}}class Da{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Ta=0;const Ia={animation:{Feature:class extends Da{constructor(e){super(e),e.animationState||(e.animationState=wa(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Tn(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Da{constructor(){super(...arguments),this.id=Ta++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}};function ka(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Oa(e){return{point:{x:e.pageX,y:e.pageY}}}function _a(e,t,n,r){return ka(e,t,(e=>t=>sr(t)&&e(t,Oa(t)))(n),r)}const Ca=(e,t)=>Math.abs(e-t);class Aa{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=za(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Ca(e.x,t.x),r=Ca(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=Er;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Sa(t,this.transformPagePoint),wr.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=za("pointercancel"===e.type?this.lastMoveEventInfo:Sa(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!sr(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=Sa(Oa(e),this.transformPagePoint),{point:a}=i,{timestamp:s}=Er;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=t;l&&l(e,za(i,this.history)),this.removeListeners=ki(_a(this.contextWindow,"pointermove",this.handlePointerMove),_a(this.contextWindow,"pointerup",this.handlePointerUp),_a(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Nr(this.updatePoint)}}function Sa(e,t){return t?{point:t(e.point)}:e}function La(e,t){return{x:e.x-t.x,y:e.y-t.y}}function za({point:e},t){return{point:e,delta:La(e,Ra(t)),offset:La(e,Pa(t)),velocity:Ya(t,.1)}}function Pa(e){return e[0]}function Ra(e){return e[e.length-1]}function Ya(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Ra(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>mr(t)));)n--;if(!r)return{x:0,y:0};const i=fr(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Qa(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Fa(e){return e.max-e.min}function Ua(e,t,n,r=.5){e.origin=r,e.originPoint=Mi(t.min,t.max,e.origin),e.scale=Fa(n)/Fa(t),e.translate=Mi(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Ba(e,t,n,r){Ua(e.x,t.x,n.x,r?r.originX:void 0),Ua(e.y,t.y,n.y,r?r.originY:void 0)}function Wa(e,t,n){e.min=n.min+t.min,e.max=e.min+Fa(t)}function Va(e,t,n){e.min=t.min-n.min,e.max=e.min+Fa(t)}function Ha(e,t,n){Va(e.x,t.x,n.x),Va(e.y,t.y,n.y)}function Ga(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function $a(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Za=.35;function qa(e,t,n){return{min:Xa(e,t),max:Xa(e,n)}}function Xa(e,t){return"number"==typeof e?e:e[t]||0}const Ja=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Ka(e){return[e("x"),e("y")]}function es({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ts(e){return void 0===e||1===e}function ns({scale:e,scaleX:t,scaleY:n}){return!ts(e)||!ts(t)||!ts(n)}function rs(e){return ns(e)||os(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function os(e){return is(e.x)||is(e.y)}function is(e){return e&&"0%"!==e}function as(e,t,n){return n+t*(e-n)}function ss(e,t,n,r,o){return void 0!==o&&(e=as(e,o,r)),as(e,n,r)+t}function ls(e,t=0,n=1,r,o){e.min=ss(e.min,t,n,r,o),e.max=ss(e.max,t,n,r,o)}function cs(e,{x:t,y:n}){ls(e.x,t.translate,t.scale,t.originPoint),ls(e.y,n.translate,n.scale,n.originPoint)}const us=.999999999999,ds=1.0000000000001;function ps(e,t){e.min=e.min+t,e.max=e.max+t}function ms(e,t,n,r,o=.5){ls(e,t,n,Mi(e.min,e.max,o),r)}function fs(e,t){ms(e.x,t.x,t.scaleX,t.scale,t.originX),ms(e.y,t.y,t.scaleY,t.scale,t.originY)}function gs(e,t){return es(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const hs=({current:e})=>e?e.ownerDocument.defaultView:null,ys=new WeakMap;class xs{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new Aa(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Oa(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?nr[i]?null:(nr[i]=!0,()=>{nr[i]=!1}):nr.x||nr.y?null:(nr.x=nr.y=!0,()=>{nr.x=nr.y=!1}),!this.openDragLock))return;var i;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ka(e=>{let t=this.getAxisMotionValue(e).get()||0;if(ho.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=Fa(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),o&&wr.postRender(()=>o(e,t)),Rr(this.visualElement,"transform");const{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>Ka(e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:hs(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&wr.postRender(()=>o(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!vs(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Mi(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Mi(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&Qa(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:Ga(e.x,n,o),y:Ga(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=Za){return!1===e?e=0:!0===e&&(e=Za),{x:qa(e,"left","right"),y:qa(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ka(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Qa(e))return!1;const n=e.current;ri(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=gs(e,n),{scroll:o}=t;return o&&(ps(r.x,o.offset.x),ps(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:$a(e.x,t.x),y:$a(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=es(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=Ka(a=>{if(!vs(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)});return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return Rr(this.visualElement,e),n.start(ma(e,n,0,t,this.visualElement,!1))}stopAnimation(){Ka(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Ka(e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()})}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Ka(t=>{const{drag:n}=this.getProps();if(!vs(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-Mi(n,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Qa(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Ka(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Fa(e),o=Fa(t);return o>r?n=qn(t.min,t.max-r,e.min):r>o&&(n=qn(e.min,e.max-o,t.min)),to(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Ka(t=>{if(!vs(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(Mi(o,i,r[t]))})}addListeners(){if(!this.visualElement.current)return;ys.set(this.visualElement,this);const e=_a(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();Qa(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),wr.read(t);const o=ka(window,"resize",()=>this.scalePositionWithinConstraints()),i=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Ka(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=Za,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function vs(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const bs=e=>(t,n)=>{e&&wr.postRender(()=>e(t,n))},Ms=(0,r.createContext)({}),ws={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ns(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Es={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!yo.test(e))return e;e=parseFloat(e)}return`${Ns(e,t.target.x)}% ${Ns(e,t.target.y)}%`}},js={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=_o.parse(e);if(o.length>5)return r;const i=_o.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=Mi(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}},Ds={},{schedule:Ts,cancel:Is}=Mr(queueMicrotask,!1);class ks extends r.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=_s,Object.assign(Ds,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ws.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||wr.postRender(()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Ts.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Os(e){const[t,n]=bn(),o=(0,r.useContext)(pn);return(0,ee.jsx)(ks,{...e,layoutGroup:o,switchLayoutGroup:(0,r.useContext)(Ms),isPresent:t,safeToRemove:n})}const _s={borderRadius:{...Es,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Es,borderTopRightRadius:Es,borderBottomLeftRadius:Es,borderBottomRightRadius:Es,boxShadow:js},Cs=(e,t)=>e.depth-t.depth;class As{constructor(){this.children=[],this.isDirty=!1}add(e){kr(this.children,e),this.isDirty=!0}remove(e){Or(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Cs),this.isDirty=!1,this.children.forEach(e)}}function Ss(e){const t=Pr(e)?e.get():e;return(e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue))(t)?t.toValue():t}const Ls=["TopLeft","TopRight","BottomLeft","BottomRight"],zs=Ls.length,Ps=e=>"string"==typeof e?parseFloat(e):e,Rs=e=>"number"==typeof e||yo.test(e);function Ys(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Qs=Us(0,.5,Xr),Fs=Us(.5,.95,gr);function Us(e,t,n){return r=>r<e?0:r>t?1:n(qn(e,t,r))}function Bs(e,t){e.min=t.min,e.max=t.max}function Ws(e,t){Bs(e.x,t.x),Bs(e.y,t.y)}function Vs(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Hs(e,t,n,r,o){return e=as(e-=t,1/n,r),void 0!==o&&(e=as(e,1/o,r)),e}function Gs(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){if(ho.test(t)&&(t=parseFloat(t),t=Mi(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let s=Mi(i.min,i.max,r);e===i&&(s-=t),e.min=Hs(e.min,t,n,s,o),e.max=Hs(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const $s=["x","scaleX","originX"],Zs=["y","scaleY","originY"];function qs(e,t,n,r){Gs(e.x,t,$s,n?n.x:void 0,r?r.x:void 0),Gs(e.y,t,Zs,n?n.y:void 0,r?r.y:void 0)}function Xs(e){return 0===e.translate&&1===e.scale}function Js(e){return Xs(e.x)&&Xs(e.y)}function Ks(e,t){return e.min===t.min&&e.max===t.max}function el(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function tl(e,t){return el(e.x,t.x)&&el(e.y,t.y)}function nl(e){return Fa(e.x)/Fa(e.y)}function rl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ol{constructor(){this.members=[]}add(e){kr(this.members,e),e.scheduleRender()}remove(e){if(Or(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const il={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},al="undefined"!=typeof window&&void 0!==window.MotionDebug,sl=["","X","Y","Z"],ll={visibility:"hidden"};let cl=0;function ul(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function dl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Fr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",wr,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&dl(r)}function pl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=cl++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,al&&(il.totalNodes=il.resolvedTargetDeltas=il.recalculatedProjection=0),this.nodes.forEach(gl),this.nodes.forEach(wl),this.nodes.forEach(Nl),this.nodes.forEach(hl),al&&window.MotionDebug.record(il)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new As)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new _r),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Ir.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Nr(r),e(i-t))};return wr.read(r,!0),()=>Nr(r)}(r,250),ws.hasAnimatedSinceResize&&(ws.hasAnimatedSinceResize=!1,this.nodes.forEach(Ml))})}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||kl,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!tl(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...Fn(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Ml(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Nr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(El),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&dl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(xl);this.isUpdating||this.nodes.forEach(vl),this.isUpdating=!1,this.nodes.forEach(bl),this.nodes.forEach(ml),this.nodes.forEach(fl),this.clearAllSnapshots();const e=Ir.now();Er.delta=to(0,1e3/60,e-Er.timestamp),Er.timestamp=e,Er.isProcessing=!0,jr.update.process(Er),jr.preRender.process(Er),jr.render.process(Er),Er.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ts.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yl),this.sharedNodes.forEach(jl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,wr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){wr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Js(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||rs(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Cl((r=n).x),Cl(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(Sl)){const{scroll:e}=this.root;e&&(ps(n.x,e.offset.x),ps(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(Ws(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let t=0;t<this.path.length;t++){const r=this.path[t],{scroll:o,options:i}=r;r!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&Ws(n,e),ps(n.x,o.offset.x),ps(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ws(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&fs(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),rs(r.latestValues)&&fs(n,r.latestValues)}return rs(this.latestValues)&&fs(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};Ws(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!rs(n.latestValues))continue;ns(n.latestValues)&&n.updateSnapshot();const r=Ja();Ws(r,n.measurePageBox()),qs(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return rs(this.latestValues)&&qs(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Er.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=Er.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ha(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Ws(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var a,s,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,Wa(a.x,s.x,l.x),Wa(a.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ws(this.target,this.layout.layoutBox),cs(this.target,this.targetDelta)):Ws(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ha(this.relativeTargetOrigin,this.target,e.target),Ws(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}al&&il.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!ns(this.parent.latestValues)&&!os(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Er.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;Ws(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&fs(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,cs(e,a)),r&&rs(i.latestValues)&&fs(e,i.latestValues))}t.x<ds&&t.x>us&&(t.x=1),t.y<ds&&t.y>us&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Vs(this.prevProjectionDelta.x,this.projectionDelta.x),Vs(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ba(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===a&&this.treeScale.y===s&&rl(this.projectionDelta.x,this.prevProjectionDelta.x)&&rl(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),al&&il.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(Il));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;Dl(i.x,e.x,n),Dl(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ha(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Tl(e.x,t.x,n.x,r),Tl(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,a,n),d&&function(e,t){return Ks(e.x,t.x)&&Ks(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Ws(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=Mi(0,void 0!==n.opacity?n.opacity:1,Qs(r)),e.opacityExit=Mi(void 0!==t.opacity?t.opacity:1,0,Fs(r))):i&&(e.opacity=Mi(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<zs;o++){const i=`border${Ls[o]}Radius`;let a=Ys(t,i),s=Ys(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Rs(a)===Rs(s)?(e[i]=Math.max(Mi(Ps(a),Ps(s),r),0),(ho.test(s)||ho.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=Mi(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Nr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=wr.update(()=>{ws.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Pr(0)?0:Lr(0);return r.start(ma("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Al(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Fa(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Fa(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Ws(t,n),fs(t,o),Ba(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ol),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&ul("z",e,r,this.animationValues);for(let t=0;t<sl.length;t++)ul(`rotate${sl[t]}`,e,r,this.animationValues),ul(`skew${sl[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ll;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Ss(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Ss(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!rs(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(null==n?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const e in Ds){if(void 0===a[e])continue;const{correct:t,applyTo:n}=Ds[e],o="none"===r.transform?a[e]:t(a[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?Ss(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(xl),this.root.sharedNodes.clear()}}}function ml(e){e.updateLayout()}function fl(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?Ka(e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=Fa(r);r.min=t[e].min,r.max=r.min+o}):Al(o,n.layoutBox,t)&&Ka(r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=Fa(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)});const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ba(a,t,n.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?Ba(s,e.applyTransform(r,!0),n.measuredBox):Ba(s,t,n.layoutBox);const l=!Js(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a={x:{min:0,max:0},y:{min:0,max:0}};Ha(a,n.layoutBox,o.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};Ha(s,t,i.layoutBox),tl(a,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function gl(e){al&&il.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function hl(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yl(e){e.clearSnapshot()}function xl(e){e.clearMeasurements()}function vl(e){e.isLayoutDirty=!1}function bl(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ml(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function wl(e){e.resolveTargetDelta()}function Nl(e){e.calcProjection()}function El(e){e.resetSkewAndRotation()}function jl(e){e.removeLeadSnapshot()}function Dl(e,t,n){e.translate=Mi(t.translate,0,n),e.scale=Mi(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Tl(e,t,n,r){e.min=Mi(t.min,n.min,r),e.max=Mi(t.max,n.max,r)}function Il(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const kl={duration:.45,ease:[.4,0,.1,1]},Ol=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),_l=Ol("applewebkit/")&&!Ol("chrome/")?Math.round:gr;function Cl(e){e.min=_l(e.min),e.max=_l(e.max)}function Al(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=nl(t),o=nl(n),!(Math.abs(r-o)<=.2));var r,o}function Sl(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Ll=pl({attachResizeListener:(e,t)=>ka(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),zl={current:void 0},Pl=pl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zl.current){const e=new Ll({});e.mount(window),e.setOptions({layoutScroll:!0}),zl.current=e}return zl.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Rl={pan:{Feature:class extends Da{constructor(){super(...arguments),this.removePointerDownListener=gr}onPointerDown(e){this.session=new Aa(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:hs(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:bs(e),onStart:bs(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&wr.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=_a(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Da{constructor(e){super(e),this.removeGroupControls=gr,this.removeListeners=gr,this.controls=new xs(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gr}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Pl,MeasureLayout:Os}};function Yl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&wr.postRender(()=>o(t,Oa(t)))}function Ql(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&wr.postRender(()=>o(t,Oa(t)))}const Fl=new WeakMap,Ul=new WeakMap,Bl=e=>{const t=Fl.get(e.target);t&&t(e)},Wl=e=>{e.forEach(Bl)};const Vl={some:0,all:1},Hl={inView:{Feature:class extends Da{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Vl[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;Ul.has(n)||Ul.set(n,{});const r=Ul.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Wl,{root:e,...t})),r[o]}(t);return Fl.set(e,n),r.observe(e),()=>{Fl.delete(e),r.unobserve(e)}}(this.node.current,i,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Da{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=or(e,n),a=e=>{const r=e.currentTarget;if(!pr(e)||cr.has(r))return;cr.add(r);const i=t(e),a=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),pr(e)&&cr.has(r)&&(cr.delete(r),"function"==typeof i&&i(e,{success:t}))},s=e=>{a(e,n.useGlobalTarget||ar(r,e.target))},l=e=>{a(e,!1)};window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",l,o)};return r.forEach(e=>{(function(e){return lr.has(e.tagName)||-1!==e.tabIndex})(e)||null!==e.getAttribute("tabindex")||(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener("pointerdown",a,o),e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=ur(()=>{if(cr.has(n))return;dr(n,"down");const e=ur(()=>{dr(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>dr(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,o),o)}),i}(e,e=>(Ql(this.node,e,"Start"),(e,{success:t})=>Ql(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Da{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ki(ka(this.node.current,"focus",()=>this.onFocus()),ka(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Da{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=or(e,n),a=ir(e=>{const{target:n}=e,r=t(e);if("function"!=typeof r||!n)return;const i=ir(e=>{r(e),n.removeEventListener("pointerleave",i)});n.addEventListener("pointerleave",i,o)});return r.forEach(e=>{e.addEventListener("pointerenter",a,o)}),i}(e,e=>(Yl(this.node,e,"Start"),e=>Yl(this.node,e,"End"))))}unmount(){}}}},Gl={layout:{ProjectionNode:Pl,MeasureLayout:Os}},$l=(0,r.createContext)({strict:!1}),Zl=(0,r.createContext)({});function ql(e){return Tn(e.animate)||zn.some(t=>On(e[t]))}function Xl(e){return Boolean(ql(e)||e.variants)}function Jl(e){return Array.isArray(e)?e.join(" "):e}const Kl={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ec={};for(const e in Kl)ec[e]={isEnabled:t=>Kl[e].some(e=>!!t[e])};const tc=Symbol.for("motionComponentSymbol");function nc(e,t,n){return(0,r.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):Qa(n)&&(n.current=r))},[t])}function rc(e,t,n,o,i){var a,s;const{visualElement:l}=(0,r.useContext)(Zl),c=(0,r.useContext)($l),u=(0,r.useContext)(fn),d=(0,r.useContext)(gn).reducedMotion,p=(0,r.useRef)(null);o=o||c.renderer,!p.current&&o&&(p.current=o(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const m=p.current,f=(0,r.useContext)(Ms);!m||m.projection||!i||"html"!==m.type&&"svg"!==m.type||function(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:oc(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(a)||s&&Qa(s),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(p.current,n,i,f);const g=(0,r.useRef)(!1);(0,r.useInsertionEffect)(()=>{m&&g.current&&m.update(n,u)});const h=n[Qr],y=(0,r.useRef)(Boolean(h)&&!(null===(a=window.MotionHandoffIsComplete)||void 0===a?void 0:a.call(window,h))&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,h)));return En(()=>{m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),Ts.render(m.render),y.current&&m.animationState&&m.animationState.animateChanges())}),(0,r.useEffect)(()=>{m&&(!y.current&&m.animationState&&m.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,h)}),y.current=!1))}),m}function oc(e){if(e)return!1!==e.options.allowProjection?e.projection:oc(e.parent)}function ic({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:i}){var a,s;function l(e,a){let s;const l={...(0,r.useContext)(gn),...e,layoutId:ac(e)},{isStatic:c}=l,u=function(e){const{initial:t,animate:n}=function(e,t){if(ql(e)){const{initial:t,animate:n}=e;return{initial:!1===t||On(t)?t:void 0,animate:On(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,r.useContext)(Zl));return(0,r.useMemo)(()=>({initial:t,animate:n}),[Jl(t),Jl(n)])}(e),d=o(e,c);if(!c&&Nn){(0,r.useContext)($l).strict;const e=function(e){const{drag:t,layout:n}=ec;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(l);s=e.MeasureLayout,u.visualElement=rc(i,d,l,t,e.ProjectionNode)}return(0,ee.jsxs)(Zl.Provider,{value:u,children:[s&&u.visualElement?(0,ee.jsx)(s,{visualElement:u.visualElement,...l}):null,n(i,e,nc(d,u.visualElement,a),d,c,u.visualElement)]})}e&&function(e){for(const t in e)ec[t]={...ec[t],...e[t]}}(e),l.displayName=`motion.${"string"==typeof i?i:`create(${null!==(s=null!==(a=i.displayName)&&void 0!==a?a:i.name)&&void 0!==s?s:""})`}`;const c=(0,r.forwardRef)(l);return c[tc]=i,c}function ac({layoutId:e}){const t=(0,r.useContext)(pn).id;return t&&void 0!==e?t+"-"+e:e}const sc=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function lc(e){return"string"==typeof e&&!e.includes("-")&&!!(sc.indexOf(e)>-1||/[A-Z]/u.test(e))}const cc=e=>(t,n)=>{const o=(0,r.useContext)(Zl),i=(0,r.useContext)(fn),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const a={latestValues:uc(r,o,i,e),renderState:t()};return n&&(a.onMount=e=>n({props:r,current:e,...a}),a.onUpdate=e=>n(e)),a}(e,t,o,i);return n?a():mn(a)};function uc(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=Ss(i[e]);let{initial:a,animate:s}=e;const l=ql(e),c=Xl(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!Tn(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=An(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];Array.isArray(t)&&(t=t[u?t.length-1:0]),null!==t&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}const dc=(e,t)=>t&&"number"==typeof e?t.transform(e):e,pc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},mc=hr.length;function fc(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const e in t){const n=t[e];if(yr.has(e))a=!0;else if(ai(e))o[e]=n;else{const t=dc(n,Yo[e]);e.startsWith("origin")?(s=!0,i[e]=t):r[e]=t}}if(t.transform||(a||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<mc;i++){const a=hr[i],s=e[a];if(void 0===s)continue;let l=!0;if(l="number"==typeof s?s===(a.startsWith("scale")?1:0):0===parseFloat(s),!l||n){const e=dc(s,Yo[a]);l||(o=!1,r+=`${pc[a]||a}(${e}) `),n&&(t[a]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}const gc={offset:"stroke-dashoffset",array:"stroke-dasharray"},hc={offset:"strokeDashoffset",array:"strokeDasharray"};function yc(e,t,n){return"string"==typeof e?e:yo.transform(t+n*e)}function xc(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(fc(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:f}=e;p.transform&&(f&&(m.transform=p.transform),delete p.transform),f&&(void 0!==o||void 0!==i||m.transform)&&(m.transformOrigin=function(e,t,n){return`${yc(t,e.x,e.width)} ${yc(n,e.y,e.height)}`}(f,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(p.x=t),void 0!==n&&(p.y=n),void 0!==r&&(p.scale=r),void 0!==a&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?gc:hc;e[i.offset]=yo.transform(-r);const a=yo.transform(t),s=yo.transform(n);e[i.array]=`${a} ${s}`}(p,a,s,l,!1)}const vc=e=>"string"==typeof e&&"svg"===e.toLowerCase();function bc(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const Mc=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function wc(e,t,n,r){bc(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Mc.has(n)?n:Yr(n),t.attrs[n])}function Nc(e,{layout:t,layoutId:n}){return yr.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Ds[e]||"opacity"===e)}function Ec(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(Pr(o[a])||t.style&&Pr(t.style[a])||Nc(a,e)||void 0!==(null===(r=null==n?void 0:n.getValue(a))||void 0===r?void 0:r.liveStyle))&&(i[a]=o[a]);return i}function jc(e,t,n){const r=Ec(e,t,n);for(const n in e)(Pr(e[n])||Pr(t[n]))&&(r[-1!==hr.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}const Dc=["x","y","width","height","cx","cy","r"],Tc={useVisualState:cc({scrapeMotionValuesFromProps:jc,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i)for(const e in o)if(yr.has(e)){i=!0;break}if(!i)return;let a=!t;if(t)for(let n=0;n<Dc.length;n++){const r=Dc[n];e[r]!==t[r]&&(a=!0)}a&&wr.read(()=>{!function(e,t){try{t.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(e){t.dimensions={x:0,y:0,width:0,height:0}}}(n,r),wr.render(()=>{xc(r,o,vc(n.tagName),e.transformTemplate),wc(n,r)})})}})},Ic={useVisualState:cc({scrapeMotionValuesFromProps:Ec,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function kc(e,t,n){for(const r in t)Pr(t[r])||Nc(r,n)||(e[r]=t[r])}function Oc(e,t){const n={},o=function(e,t){const n={};return kc(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,r.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return fc(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const _c=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Cc(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||_c.has(e)}let Ac=e=>!Cc(e);try{(Sc=require("@emotion/is-prop-valid").default)&&(Ac=e=>e.startsWith("on")?!Cc(e):Sc(e))}catch(e){}var Sc;function Lc(e,t,n,o){const i=(0,r.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return xc(n,t,vc(o),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};kc(t,e.style,e),i.style={...t,...i.style}}return i}function zc(e=!1){return(t,n,o,{latestValues:i},a)=>{const s=(lc(t)?Lc:Oc)(n,i,a,t),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(Ac(o)||!0===n&&Cc(o)||!t&&!Cc(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),c=t!==r.Fragment?{...l,...s,ref:o}:{},{children:u}=n,d=(0,r.useMemo)(()=>Pr(u)?u.get():u,[u]);return(0,r.createElement)(t,{...c,children:d})}}function Pc(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return ic({...lc(n)?Tc:Ic,preloadedFeatures:e,useRender:zc(r),createVisualElement:t,Component:n})}}const Rc={current:null},Yc={current:!1},Qc=[...mi,wo,_o],Fc=new WeakMap,Uc=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Bc{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ti,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=Ir.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,wr.render(this.render,!1,!0))};const{latestValues:s,renderState:l,onUpdate:c}=i;this.onUpdate=c,this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=ql(t),this.isVariantNode=Xl(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==s[e]&&Pr(t)&&t.set(s[e],!1)}}mount(e){this.current=e,Fc.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),Yc.current||function(){if(Yc.current=!0,Nn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Rc.current=e.matches;e.addListener(t),t()}else Rc.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Rc.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Fc.delete(this.current),this.projection&&this.projection.unmount(),Nr(this.notifyUpdate),Nr(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=yr.has(e),r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&wr.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=t.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),o(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in ec){const t=ec[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Uc.length;t++){const n=Uc[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Pr(o))e.addValue(r,o);else if(Pr(i))e.addValue(r,Lr(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,Lr(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Lr(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(oi(r)||Kr(r))?r=parseFloat(r):!(e=>Qc.find(pi(e)))(r)&&_o.test(t)&&(r=Uo(e,t)),this.setBaseTarget(e,Pr(r)?r.get():r)),Pr(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=An(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||Pr(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new _r),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class Wc extends Bc{constructor(){super(...arguments),this.KeyframeResolver=gi}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Pr(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class Vc extends Wc{constructor(){super(...arguments),this.type="html",this.renderInstance=bc}readValueFromInstance(e,t){if(yr.has(t)){const e=Fo(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(ai(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return gs(e,t)}build(e,t,n){fc(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Ec(e,t,n)}}class Hc extends Wc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ja}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(yr.has(t)){const e=Fo(t);return e&&e.default||0}return t=Mc.has(t)?t:Yr(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return jc(e,t,n)}build(e,t,n){xc(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){wc(e,t,0,r)}mount(e){this.isSVGTag=vc(e.tagName),super.mount(e)}}const Gc=Dn(Pc({...Ia,...Hl,...Rl,...Gl},(e,t)=>lc(e)?new Hc(t):new Vc(t,{allowProjection:e!==r.Fragment})));let $c=!1;const Zc=({toastItem:e,title:t="",content:n="",autoDismiss:o=!0,dismissAfter:i=5e3,theme:a="light",design:s="stack",icon:l,variant:c="neutral",removeToast:u})=>{const d=(0,r.useRef)(0),p=(0,r.useRef)(0),m=(0,r.useRef)(),f=(e,t=i)=>{if(o&&!(i<0))return d.current=(new Date).getTime(),setTimeout(()=>{"function"==typeof u&&u(e.id)},t)};(0,r.useEffect)(()=>{const t=i;return m.current=f(e,t),()=>{clearTimeout(m.current)}},[]),(0,r.useEffect)(()=>{!e?.dismiss||"function"!=typeof u||u(e.id)},[e]);const g=()=>{"function"==typeof u&&e?.action?.onClick?.(()=>u(e.id))};let h=null;return"stack"===s&&(h=(0,ee.jsx)("div",{className:qe("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===a?cn:ln?.[c],"w-[22.5rem]"),onMouseEnter:()=>{clearTimeout(m.current),p.current=(new Date).getTime()},onMouseLeave:()=>{m.current=f(e,i-(p.current-d.current))},children:"custom"!==e.type?(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:tn({variant:c,icon:l,theme:a})}),(0,ee.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-6",children:[rn({title:t,theme:a}),on({content:n,theme:a}),e?.action?.label&&"function"==typeof e?.action?.onClick&&(0,ee.jsx)("div",{className:"mt-2.5",children:nn({actionLabel:e?.action?.label,actionType:e?.action?.type??"button",onAction:g,theme:a})})]}),(0,ee.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,ee.jsx)("button",{className:qe("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",un[a]??un.light),onClick:()=>{"function"==typeof u&&u(e.id)},children:(0,ee.jsx)($t,{})})})]}):e?.jsx?.({close:()=>u(e.id),action:e?.action?{...e?.action,onClick:g}:null})})),"inline"===s&&(h=(0,ee.jsxs)("div",{className:qe("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===a?cn:ln?.[c],"lg:w-[47.5rem] w-full"),children:[(0,ee.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:tn({variant:c,icon:l,theme:a})}),(0,ee.jsxs)("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0",children:[rn({title:t,theme:a}),on({content:n,theme:a})]}),(0,ee.jsx)("div",{className:"absolute right-3 top-3 [&_svg]:size-5",children:(0,ee.jsx)("button",{className:qe("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",un[a]??un.light),onClick:()=>u(e.id),children:(0,ee.jsx)($t,{})})})]})),h},qc=(e=>(0,r.memo)(t=>{const n=t.singleTon;return $c&&n?null:($c=!0,(0,ee.jsx)(e,{...t}))}))(({position:e="top-right",design:t="stack",theme:n="light",className:o="",autoDismiss:i=!0,dismissAfter:a=5e3})=>{const[s,l]=(0,r.useState)([]);(0,r.useEffect)(()=>{Ht.subscribe(e=>{e?.dismiss?l(t=>t.map(t=>t.id===e.id?{...t,dismiss:!0}:t)):setTimeout(()=>{(0,dn.flushSync)(()=>l(t=>-1!==t.findIndex(t=>t.id===e.id)?t.map(t=>t.id===e.id?{...t,...e}:t):[...t,e]))})})},[]);const c=e=>{l(t=>t.filter(t=>t.id!==e))};return(0,ee.jsx)("ul",{className:qe("fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",sn[e]??sn["top-right"],o),children:(0,ee.jsx)(jn,{initial:!1,children:s.map(e=>(0,ee.jsx)(Gc.li,{initial:{opacity:0,y:50,scale:.7},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.6,transition:{duration:.15}},layoutId:`toast-${e.id}`,children:(0,ee.jsx)(Zc,{toastItem:e,title:e.title,content:e?.description,icon:e?.icon??void 0,design:e?.design??t,autoDismiss:e?.autoDismiss??i,dismissAfter:e?.dismissAfter??a,removeToast:c,variant:e.type,theme:e?.theme??n})},e.id))})})}),Xc=window.wp.i18n;function Jc({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const Kc=r.forwardRef(Jc);function eu({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const tu=r.forwardRef(eu);function nu({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75"}))}const ru=r.forwardRef(nu);function ou({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const iu=r.forwardRef(ou),au=({children:e,gap:t="lg",className:n,...r})=>(0,ee.jsx)("div",{className:qe("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",Je(t),n),...r,children:e});au.displayName="Topbar";const su=({gap:e="sm",children:t,className:n})=>(0,ee.jsx)("div",{className:qe("flex items-center",Je(e),n),children:t});su.displayName="Topbar.Left";const lu=({gap:e="md",children:t,align:n="center",className:r})=>{const o={left:"justify-start",center:"justify-center",right:"justify-end"}[n];return(0,ee.jsx)("div",{className:qe("flex items-center grow",Je(e),o,r),children:t})};lu.displayName="Topbar.Middle";const cu=({gap:e="sm",children:t,className:n})=>(0,ee.jsx)("div",{className:qe("flex items-center",Je(e),n),children:t});cu.displayName="Topbar.Right";const uu=({children:e,className:t})=>(0,ee.jsx)("div",{className:qe("flex items-center [&>svg]:block h-full",t),children:e});uu.displayName="Topbar.Item",au.Left=su,au.Middle=lu,au.Right=cu,au.Item=uu;const du=(0,r.forwardRef)(({label:e="",size:t="sm",className:n="",type:r="pill",variant:o="neutral",icon:i=null,disabled:a=!1,onClose:s=()=>{},closable:l=!1,onMouseDown:c=()=>{},disableHover:u=!1},d)=>{const p={neutral:"bg-badge-background-gray text-badge-color-gray border-badge-border-gray",red:"bg-badge-background-red text-badge-color-red border-badge-border-red",yellow:"bg-badge-background-yellow text-badge-color-yellow border-badge-border-yellow",green:"bg-badge-background-green text-badge-color-green border-badge-border-green",blue:"bg-badge-background-sky text-badge-color-sky border-badge-border-sky",inverse:"bg-background-inverse text-text-inverse border-background-inverse",disabled:"bg-badge-background-disabled text-badge-color-disabled border-badge-border-disabled disabled cursor-not-allowed"};let m="",f="group relative justify-center flex items-center cursor-pointer";const g={xxs:"[&>svg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return a?(m=p.disabled,f+=" cursor-not-allowed disabled"):m=p[o],e?(0,ee.jsxs)("span",{className:qe("font-medium border-badge-border-gray flex items-center justify-center border border-solid box-border max-w-full transition-colors duration-150 ease-in-out",{xxs:"py-0.5 px-0.5 text-xs h-4",xs:"py-0.5 px-1 text-xs h-5",sm:"py-1 px-1.5 text-xs h-6",md:"py-1 px-1.5 text-sm h-7",lg:"py-1 px-1.5 text-base h-8"}[t],{pill:"rounded-full",rounded:"rounded"}[r],"gap-0.5",m,!u&&{neutral:"hover:bg-badge-hover-gray",red:"hover:bg-badge-hover-red",yellow:"hover:bg-badge-hover-yellow",green:"hover:bg-badge-hover-green",blue:"hover:bg-badge-hover-sky",inverse:"hover:bg-badge-hover-inverse",disabled:"hover:bg-badge-hover-disabled"}[o],n),ref:d,children:[i?(0,ee.jsx)("span",{className:qe("justify-center flex items-center",g[t]),children:i}):null,(0,ee.jsx)("span",{className:"px-1 truncate inline-block",children:e}),l&&(0,ee.jsxs)("span",{className:qe(f,g[t]),onMouseDown:c,role:"button",tabIndex:0,...!a&&{onClick:s},children:[(0,ee.jsx)("span",{className:"sr-only",children:`Remove ${e}`}),(0,ee.jsx)($t,{}),(0,ee.jsx)("span",{className:"absolute -inset-1"})]})]}):null});du.displayName="Badge";const pu="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTEiIGhlaWdodD0iNTEiIHZpZXdCb3g9IjAgMCA1MSA1MSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQwLjk3NzQgMEgxMC4wMjI2QzcuMzY1MTcgMC4wMDIzNDg2IDQuODE3MjQgMS4wNTkwNSAyLjkzODE1IDIuOTM4MTVDMS4wNTkwNSA0LjgxNzI0IDAuMDAyMzQ4NiA3LjM2NTE3IDAgMTAuMDIyNlY0MC45Nzc0QzAuMDAyMzQ4NiA0My42MzQ4IDEuMDU5MDUgNDYuMTgyOCAyLjkzODE1IDQ4LjA2MTlDNC44MTcyNCA0OS45NDA5IDcuMzY1MTcgNTAuOTk3NyAxMC4wMjI2IDUxSDQwLjk3NzRDNDMuNjM0OCA1MC45OTc3IDQ2LjE4MjggNDkuOTQwOSA0OC4wNjE5IDQ4LjA2MTlDNDkuOTQwOSA0Ni4xODI4IDUwLjk5NzcgNDMuNjM0OCA1MSA0MC45Nzc0VjEwLjAyMjZDNTAuOTk3NyA3LjM2NTE3IDQ5Ljk0MDkgNC44MTcyNCA0OC4wNjE5IDIuOTM4MTVDNDYuMTgyOCAxLjA1OTA1IDQzLjYzNDggMC4wMDIzNDg2IDQwLjk3NzQgMFpNNDMuMDA4NSAzMS4xODU0QzQyLjQ5NDEgMzMuMTE5IDM4LjkyODUgMzMuMTg5OSAzNy43ODQzIDM0LjQyMjhDMzcuNDYyOSAzNS4xNzQ3IDM3LjMyODkgMzUuOTkzNSAzNy4zOTQxIDM2LjgwODdDMzcuNDgyOCA0MC40MzYzIDM2LjAyODIgNDEuNTA5NiAzMi42MDQ1IDQwLjM1NjVDMzAuMzYwNSAzOS42MzgxIDI5Ljk0MzcgMzkuNzAwMiAyOC41NDIzIDQxLjY0MjZDMjYuNDQ5IDQ0LjcxMTUgMjQuNTQyMSA0NC42ODQ5IDIyLjQ1NzcgNDEuNjQyNkMyMS44OTkgNDAuOTA2NCAyMS4zMjI0IDQwLjE1MjUgMjAuODA4IDM5Ljk4NEMxOS4xNDk0IDM5LjYzODEgMTYuMjMxMyA0MS42NjkyIDE0LjY3OTEgNDAuNDM2M0MxMy4wMjA1IDM5LjM0NTQgMTQuMDQ5NCAzNS45MzA2IDEzLjIxNTcgMzQuNDY3MUMxMi4wNzE1IDMzLjIzNDMgOC41MDU5MSAzMy4xNjMzIDcuOTkxNDggMzEuMjI5N0M3LjI5OTY1IDI5LjM4NDkgMTAuMTczNCAyNy4yMjk2IDEwLjMyNDIgMjUuNTQ0M0MxMC4xNjQ1IDIzLjg1OTEgNy4yOTk2NSAyMS43MDM4IDcuOTkxNDggMTkuODU5QzguNTA1OTEgMTcuOTI1NCAxMi4wNzE1IDE3Ljg1NDQgMTMuMjE1NyAxNi42MjE2QzE0LjA0OTQgMTUuMTU4MSAxMy4wMjA1IDExLjc0MzMgMTQuNjc5MSAxMC42NTIzQzE2LjIyMjQgOS40MTA2MSAxOS4xNTgzIDExLjQ1OTUgMjAuODA4IDExLjEwNDdDMjEuMzIyNCAxMC45MzYyIDIxLjg5OSAxMC4yMTc3IDIyLjQ1NzcgOS40NDYwOUMyNC41NTEgNi4zNzcyMiAyNi40NTc5IDYuNDAzODMgMjguNTQyMyA5LjQ0NjA5QzI5LjkzNDggMTEuMzA4NyAzMC4zNTE3IDExLjQwNjMgMzIuNTk1NyAxMC42ODc4QzM2LjAzNyA5LjQ4MTU3IDM3LjQ3MzkgMTAuNTgxNCAzNy4zOTQxIDE0LjE5MTNDMzcuMzIyMiAxNS4wMDU5IDM3LjQ1MzIgMTUuODI1NiAzNy43NzU1IDE2LjU3NzJDMzguMzgzMyAxNy4xMDUzIDM5LjExMTEgMTcuNDc2NyAzOS44OTUzIDE3LjY1OTNDNDMuMzU0NCAxOC42ODgyIDQ0LjAwMTkgMjAuMzgyMyA0MS43ODQ1IDIzLjI3MzdDNDEuMjM3NSAyMy45MTM0IDQwLjg1NjcgMjQuNjc4IDQwLjY3NTggMjUuNUM0MC44MzU1IDI3LjE4NTIgNDMuNzAwMyAyOS4zNDA1IDQzLjAwODUgMzEuMTg1NFoiIGZpbGw9IiNFRTVBMkYiLz4KPHBhdGggZD0iTTMyLjE4NjMgMjUuNjI4OEMzMi4zMjE2IDI1LjQ4MzUgMzIuMzQyNiAyNS4zMDE4IDMyLjI0NjIgMjUuMTIzOEMzMi4xNDk5IDI0Ljk0NTcgMzEuOTQxNiAyNC44NDUzIDMxLjcwNTUgMjQuODA0NUwyNi41NDM0IDIzLjkxMTJMMjguOTU2NCAxNi41ODA3QzI5LjAzODQgMTYuMzMyMiAyOC44ODExIDE2LjAzMjggMjguNTc3NSAxNS45MDVDMjguNTE0OSAxNS44Nzg2IDI4LjQ1IDE1Ljg2IDI4LjM4NDcgMTUuODQ4N0MyOC4xMzQgMTUuODA1MyAyNy44Nzc4IDE1Ljg3NTQgMjcuNzI5NiAxNi4wMzc3TDE4Ljg1ODQgMjUuNzUyOEMxOC43MjUzIDI1Ljg5ODUgMTguNjk5MSAyNi4xMTg3IDE4Ljc5NTkgMjYuMjk1OEMxOC44OTI4IDI2LjQ3MjkgMTkuMDg5MSAyNi42Mzc0IDE5LjMyNDMgMjYuNjc4MUwyNC40MTgzIDI3LjU1OTZMMjIuMTIxMyAzNC42MTg2QzIyLjA0MDggMzQuODY2MyAyMi4yMDU5IDM1LjExNDkgMjIuNTA3OCAzNS4yNDI2QzIyLjU2OTggMzUuMjY4OCAyMi42MzQ1IDM1LjI4NDMgMjIuNjk5MSAzNS4yOTU0QzIyLjk0OTMgMzUuMzM4NyAyMy4yMDUgMzUuMjcxNiAyMy4zNTQ1IDM1LjExMDlMMzIuMTg2MyAyNS42Mjg4WiIgZmlsbD0iI0VFNUEyRiIvPgo8L3N2Zz4K",mu=powerCouponsSettings.admin_header_menus,fu=function(e){const{activePath:t}=e,[n]=K();return(0,r.createElement)("div",{className:"-ml-2.5 md:-ml-5 power_coupons-header--wrapper"},(0,r.createElement)(au,{className:"power_coupons-header--content h-16 min-h-[unset] p-0 border-0 border-b border-solid border-border-subtle bg-white relative z-10",gap:0,role:"navigation","aria-label":(0,Xc.__)("Main Navigation","power-coupons")},(0,r.createElement)(au.Left,{className:"power_coupons-header--content-left lg:px-5 px-3"},(0,r.createElement)(au.Item,null,(0,r.createElement)("img",{className:"lg:block h-[2.6rem] w-auto",src:pu,alt:(0,Xc.__)("Power Coupons","power-coupons")}))),(0,r.createElement)(au.Middle,{align:"left",className:"power_coupons-header--content-middle h-full gap-2 md:gap-4",role:"menubar"},mu.map(e=>(0,r.createElement)(au.Item,{className:"h-full",key:`?page=power_coupons_settings&path=${e.path}`,role:"menuitem"},(0,r.createElement)(H,{to:{pathname:"admin.php",search:"?page=power_coupons_settings"+(""!==e.path?"&path="+e.path:"")},className:(t===e.path?" border-wpcolor hover:text-wphovercolor text-gray-900 inline-flex items-center px-1 border-b-2 text-[0.940rem] font-medium focus:shadow-none":"border-transparent text-gray-600 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 border-b-2 text-[0.940rem] font-medium focus:shadow-none")+" no-underline h-full border-solid border-0","aria-current":t===e.path?"page":void 0},e.name)))),(0,r.createElement)(au.Right,{className:"power_coupons-header--content-right p-2 md:p-4 gap-2 md:gap-4",gap:"md"},!!n?.pro_version&&(0,r.createElement)(au.Item,null,"Activated"===n.license_status?(0,r.createElement)("span",{className:"inline-flex items-center no-underline gap-1.5 px-3 py-1 border whitespace-nowrap bg-green-50 border-green-200 text-green-600 hover:text-green-600 focus:text-green-600 pointer-events-none disabled rounded text-xs cursor-pointer font-normal","aria-label":(0,Xc.__)("License Status: Valid","power-coupons")},(0,Xc.__)("Valid License","power-coupons")):(0,r.createElement)("span",{className:"inline-flex items-center no-underline gap-1.5 px-3 py-1 border whitespace-nowrap bg-red-50 border-red-200 text-red-600 hover:text-red-600 focus:text-red-600 pointer-events-none disabled rounded text-xs cursor-pointer font-normal","aria-label":(0,Xc.__)("License Status: Not Activated","power-coupons")},(0,Xc.__)("Activate License","power-coupons"))),(0,r.createElement)(au.Item,null,(0,r.createElement)("span",{title:powerCouponsSettings.version},(0,r.createElement)(du,{icon:null,label:powerCouponsSettings.version,size:"sm",type:"pill",variant:"neutral",disableHover:!0}))))))},gu=st("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]),hu=st("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);function yu(){return"undefined"!=typeof window}function xu(e){return Mu(e)?(e.nodeName||"").toLowerCase():"#document"}function vu(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function bu(e){var t;return null==(t=(Mu(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Mu(e){return!!yu()&&(e instanceof Node||e instanceof vu(e).Node)}function wu(e){return!!yu()&&(e instanceof Element||e instanceof vu(e).Element)}function Nu(e){return!!yu()&&(e instanceof HTMLElement||e instanceof vu(e).HTMLElement)}function Eu(e){return!(!yu()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof vu(e).ShadowRoot)}const ju=new Set(["inline","contents"]);function Du(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ru(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ju.has(o)}const Tu=new Set(["table","td","th"]);function Iu(e){return Tu.has(xu(e))}const ku=[":popover-open",":modal"];function Ou(e){return ku.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const _u=["transform","translate","scale","rotate","perspective"],Cu=["transform","translate","scale","rotate","perspective","filter"],Au=["paint","layout","strict","content"];function Su(e){const t=Lu(),n=wu(e)?Ru(e):e;return _u.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Cu.some(e=>(n.willChange||"").includes(e))||Au.some(e=>(n.contain||"").includes(e))}function Lu(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const zu=new Set(["html","body","#document"]);function Pu(e){return zu.has(xu(e))}function Ru(e){return vu(e).getComputedStyle(e)}function Yu(e){return wu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qu(e){if("html"===xu(e))return e;const t=e.assignedSlot||e.parentNode||Eu(e)&&e.host||bu(e);return Eu(t)?t.host:t}function Fu(e){const t=Qu(e);return Pu(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nu(t)&&Du(t)?t:Fu(t)}function Uu(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Fu(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=vu(o);if(i){const e=Bu(a);return t.concat(a,a.visualViewport||[],Du(o)?o:[],e&&n?Uu(e):[])}return t.concat(o,Uu(o,[],n))}function Bu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Wu(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function Vu(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Eu(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Hu(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function Gu(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function $u(e){return!(0!==e.mozInputSource||!e.isTrusted)||(Xu()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function Zu(e){return!Gu().includes("jsdom/")&&(!Xu()&&0===e.width&&0===e.height||Xu()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function qu(){return/apple/i.test(navigator.vendor)}function Xu(){const e=/android/i;return e.test(Hu())||e.test(Gu())}function Ju(){return Hu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Ku(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function ed(e){return(null==e?void 0:e.ownerDocument)||document}function td(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function nd(e){return"composedPath"in e?e.composedPath()[0]:e.target}function rd(e){return Nu(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function od(e){e.preventDefault(),e.stopPropagation()}function id(e){return!!e&&"combobox"===e.getAttribute("role")&&rd(e)}const ad=Math.min,sd=Math.max,ld=Math.round,cd=Math.floor,ud=e=>({x:e,y:e}),dd={left:"right",right:"left",bottom:"top",top:"bottom"},pd={start:"end",end:"start"};function md(e,t,n){return sd(e,ad(t,n))}function fd(e,t){return"function"==typeof e?e(t):e}function gd(e){return e.split("-")[0]}function hd(e){return e.split("-")[1]}function yd(e){return"x"===e?"y":"x"}function xd(e){return"y"===e?"height":"width"}const vd=new Set(["top","bottom"]);function bd(e){return vd.has(gd(e))?"y":"x"}function Md(e){return yd(bd(e))}function wd(e){return e.replace(/start|end/g,e=>pd[e])}const Nd=["left","right"],Ed=["right","left"],jd=["top","bottom"],Dd=["bottom","top"];function Td(e){return e.replace(/left|right|bottom|top/g,e=>dd[e])}function Id(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}}function kd(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var Od=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),_d="undefined"==typeof Element,Cd=_d?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ad=!_d&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Sd=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&Sd(e.parentNode)},Ld=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!Sd(i,!1))if("SLOT"===i.tagName){var a=i.assignedElements(),s=a.length?a:i.children,l=Ld(s,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{Cd.call(i,Od)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var c=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),u=!Sd(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(c&&u){var d=Ld(!0===c?i.children:c.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:i,candidates:d})}else o.unshift.apply(o,i.children)}}return r},zd=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Pd=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!zd(e)?0:e.tabIndex},Rd=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Yd=function(e){return"INPUT"===e.tagName},Qd=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Fd=function(e,t){return!(t.disabled||Sd(t)||function(e){return Yd(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var o=Cd.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Cd.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Qd(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,s=Ad(e);if(a&&!a.shadowRoot&&!0===r(a))return Qd(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(e){var t,n,r,o,i=e&&Ad(e),a=null===(t=i)||void 0===t?void 0:t.host,s=!1;if(i&&i!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=i=Ad(a))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!Cd.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Ud=function(e,t){return!(function(e){return function(e){return Yd(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Ad(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||Pd(t)<0||!Fd(e,t))},Bd=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Wd=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,a=function(e,t){var n=Pd(e);return n<0&&t&&!zd(e)?0:n}(i,o),s=o?Wd(e.candidates):i;0===a?o?t.push.apply(t,s):t.push(i):n.push({documentOrder:r,tabIndex:a,item:e,isScope:o,content:s})}),n.sort(Rd).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Vd=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Ld([e],t.includeContainer,{filter:Ud.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Bd}):function(e,t,n){if(Sd(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Od));return t&&Cd.call(e,Od)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Ud.bind(null,t)),Wd(n)};function Hd(e,t,n){let{reference:r,floating:o}=e;const i=bd(t),a=Md(t),s=xd(a),l=gd(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let m;switch(l){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(hd(t)){case"start":m[a]-=p*(n&&c?-1:1);break;case"end":m[a]+=p*(n&&c?-1:1)}return m}async function Gd(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=fd(t,e),f=Id(m),g=s[p?"floating"===d?"reference":"floating":d],h=kd(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),v=await(null==i.isElement?void 0:i.isElement(x))&&await(null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},b=kd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:x,strategy:l}):y);return{top:(h.top-b.top+f.top)/v.y,bottom:(b.bottom-h.bottom+f.bottom)/v.y,left:(h.left-b.left+f.left)/v.x,right:(b.right-h.right+f.right)/v.x}}const $d=new Set(["left","top"]);function Zd(e){const t=Ru(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Nu(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ld(n)!==i||ld(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function qd(e){return wu(e)?e:e.contextElement}function Xd(e){const t=qd(e);if(!Nu(t))return ud(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Zd(t);let a=(i?ld(n.width):n.width)/r,s=(i?ld(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Jd=ud(0);function Kd(e){const t=vu(e);return Lu()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Jd}function ep(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=qd(e);let a=ud(1);t&&(r?wu(r)&&(a=Xd(r)):a=Xd(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==vu(e))&&t}(i,n,r)?Kd(i):ud(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=vu(i),t=r&&wu(r)?vu(r):r;let n=e,o=Bu(n);for(;o&&r&&t!==n;){const e=Xd(o),t=o.getBoundingClientRect(),r=Ru(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=vu(o),o=Bu(n)}}return kd({width:u,height:d,x:l,y:c})}function tp(e,t){const n=Yu(e).scrollLeft;return t?t.left+n:ep(bu(e)).left+n}function np(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-tp(e,n),y:n.top+t.scrollTop}}const rp=new Set(["absolute","fixed"]);function op(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=vu(e),r=bu(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Lu();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=tp(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=bu(e),n=Yu(e),r=e.ownerDocument.body,o=sd(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=sd(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+tp(e);const s=-n.scrollTop;return"rtl"===Ru(r).direction&&(a+=sd(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(bu(e));else if(wu(t))r=function(e,t){const n=ep(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Nu(e)?Xd(e):ud(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Kd(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return kd(r)}function ip(e,t){const n=Qu(e);return!(n===t||!wu(n)||Pu(n))&&("fixed"===Ru(n).position||ip(n,t))}function ap(e,t,n){const r=Nu(t),o=bu(t),i="fixed"===n,a=ep(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ud(0);function c(){l.x=tp(o)}if(r||!r&&!i)if(("body"!==xu(t)||Du(o))&&(s=Yu(t)),r){const e=ep(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?ud(0):np(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function sp(e){return"static"===Ru(e).position}function lp(e,t){if(!Nu(e)||"fixed"===Ru(e).position)return null;if(t)return t(e);let n=e.offsetParent;return bu(e)===n&&(n=n.ownerDocument.body),n}function cp(e,t){const n=vu(e);if(Ou(e))return n;if(!Nu(e)){let t=Qu(e);for(;t&&!Pu(t);){if(wu(t)&&!sp(t))return t;t=Qu(t)}return n}let r=lp(e,t);for(;r&&Iu(r)&&sp(r);)r=lp(r,t);return r&&Pu(r)&&sp(r)&&!Su(r)?n:r||function(e){let t=Qu(e);for(;Nu(t)&&!Pu(t);){if(Su(t))return t;if(Ou(t))return null;t=Qu(t)}return null}(e)||n}const up={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=bu(r),s=!!t&&Ou(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ud(1);const u=ud(0),d=Nu(r);if((d||!d&&!i)&&(("body"!==xu(r)||Du(a))&&(l=Yu(r)),Nu(r))){const e=ep(r);c=Xd(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!a||d||i?ud(0):np(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:bu,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Ou(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Uu(e,[],!1).filter(e=>wu(e)&&"body"!==xu(e)),o=null;const i="fixed"===Ru(e).position;let a=i?Qu(e):e;for(;wu(a)&&!Pu(a);){const t=Ru(a),n=Su(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&rp.has(o.position)||Du(a)&&!n&&ip(e,a))?r=r.filter(e=>e!==a):o=t,a=Qu(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce((e,n)=>{const r=op(t,n,o);return e.top=sd(r.top,e.top),e.right=ad(r.right,e.right),e.bottom=ad(r.bottom,e.bottom),e.left=sd(r.left,e.left),e},op(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:cp,getElementRects:async function(e){const t=this.getOffsetParent||cp,n=this.getDimensions,r=await n(e.floating);return{reference:ap(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}=Zd(e);return{width:t,height:n}},getScale:Xd,isElement:wu,isRTL:function(e){return"rtl"===Ru(e).direction}};function dp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pp(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=qd(e),u=o||i?[...c?Uu(c):[],...Uu(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const o=bu(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:m}=c;if(s||t(),!p||!m)return;const f={rootMargin:-cd(d)+"px "+-cd(o.clientWidth-(u+p))+"px "+-cd(o.clientHeight-(d+m))+"px "+-cd(u)+"px",threshold:sd(0,ad(1,l))||1};let g=!0;function h(t){const r=t[0].intersectionRatio;if(r!==l){if(!g)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||dp(c,e.getBoundingClientRect())||a(),g=!1}try{r=new IntersectionObserver(h,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(h,f)}r.observe(e)}(!0),i}(c,n):null;let p,m=-1,f=null;a&&(f=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let g=l?ep(e):null;return l&&function t(){const r=ep(e);g&&!dp(g,r)&&n(),g=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const mp=Gd,fp=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=gd(n),s=hd(n),l="y"===bd(n),c=$d.has(a)?-1:1,u=i&&l?-1:1,d=fd(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof f&&(m="end"===s?-1*f:f),l?{x:m*u,y:p*c}:{x:p*c,y:m*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},gp=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=fd(e,t),c={x:n,y:r},u=await Gd(t,l),d=bd(gd(o)),p=yd(d);let m=c[p],f=c[d];if(i){const e="y"===p?"bottom":"right";m=md(m+u["y"===p?"top":"left"],m,m-u[e])}if(a){const e="y"===d?"bottom":"right";f=md(f+u["y"===d?"top":"left"],f,f-u[e])}const g=s.fn({...t,[p]:m,[d]:f});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[d]:a}}}}}},hp=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...h}=fd(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=gd(o),x=bd(s),v=gd(s)===s,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),M=p||(v||!g?[Td(s)]:function(e){const t=Td(e);return[wd(e),t,wd(t)]}(s)),w="none"!==f;!p&&w&&M.push(...function(e,t,n,r){const o=hd(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Ed:Nd:t?Nd:Ed;case"left":case"right":return t?jd:Dd;default:return[]}}(gd(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(wd)))),i}(s,g,f,b));const N=[s,...M],E=await Gd(t,h),j=[];let D=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&j.push(E[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=hd(e),o=Md(e),i=xd(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Td(a)),[a,Td(a)]}(o,a,b);j.push(E[e[0]],E[e[1]])}if(D=[...D,{placement:o,overflows:j}],!j.every(e=>e<=0)){var T,I;const e=((null==(T=i.flip)?void 0:T.index)||0)+1,t=N[e];if(t&&("alignment"!==d||x===bd(t)||D.every(e=>bd(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:D},reset:{placement:t}};let n=null==(I=D.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:I.placement;if(!n)switch(m){case"bestFit":{var k;const e=null==(k=D.filter(e=>{if(w){const t=bd(e.placement);return t===x||"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:k[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},yp=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=fd(e,t),u=await Gd(t,c),d=gd(o),p=hd(o),m="y"===bd(o),{width:f,height:g}=i.floating;let h,y;"top"===d||"bottom"===d?(h=d,y=p===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,h="end"===p?"top":"bottom");const x=g-u.top-u.bottom,v=f-u.left-u.right,b=ad(g-u[h],x),M=ad(f-u[y],v),w=!t.middlewareData.shift;let N=b,E=M;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(E=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(N=x),w&&!p){const e=sd(u.left,0),t=sd(u.right,0),n=sd(u.top,0),r=sd(u.bottom,0);m?E=f-2*(0!==e||0!==t?e+t:sd(u.left,u.right)):N=g-2*(0!==n||0!==r?n+r:sd(u.top,u.bottom))}await l({...t,availableWidth:E,availableHeight:N});const j=await a.getDimensions(s.floating);return f!==j.width||g!==j.height?{reset:{rects:!0}}:{}}}},xp=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=fd(e,t)||{};if(null==c)return{};const d=Id(u),p={x:n,y:r},m=Md(o),f=xd(m),g=await a.getDimensions(c),h="y"===m,y=h?"top":"left",x=h?"bottom":"right",v=h?"clientHeight":"clientWidth",b=i.reference[f]+i.reference[m]-p[m]-i.floating[f],M=p[m]-i.reference[m],w=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let N=w?w[v]:0;N&&await(null==a.isElement?void 0:a.isElement(w))||(N=s.floating[v]||i.floating[f]);const E=b/2-M/2,j=N/2-g[f]/2-1,D=ad(d[y],j),T=ad(d[x],j),I=D,k=N-g[f]-T,O=N/2-g[f]/2+E,_=md(I,O,k),C=!l.arrow&&null!=hd(o)&&O!==_&&i.reference[f]/2-(O<I?D:T)-g[f]/2<0,A=C?O<I?O-I:O-k:0;return{[m]:p[m]+A,data:{[m]:_,centerOffset:O-_-A,...C&&{alignmentOffset:A}},reset:C}}}),vp=(e,t,n)=>{const r=new Map,o={platform:up,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Hd(c,r,l),p=r,m={},f=0;for(let n=0;n<s.length;n++){const{name:i,fn:g}=s[n],{x:h,y,data:x,reset:v}=await g({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=h?h:u,d=null!=y?y:d,m={...m,[i]:{...m[i],...x}},v&&f<=50&&(f++,"object"==typeof v&&(v.placement&&(p=v.placement),v.rects&&(c=!0===v.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):v.rects),({x:u,y:d}=Hd(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})};var bp="undefined"!=typeof document?r.useLayoutEffect:function(){};function Mp(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,o;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(!Mp(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Mp(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function wp(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Np(e,t){const n=wp(e);return Math.round(t*n)/n}function Ep(e){const t=r.useRef(e);return bp(()=>{t.current=e}),t}const jp=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?xp({element:n.current,padding:r}).fn(t):{}:n?xp({element:n,padding:r}).fn(t):{};var o}}),Dp=(e,t)=>({...fp(e),options:[e,t]}),Tp=(e,t)=>({...gp(e),options:[e,t]}),Ip=(e,t)=>({...hp(e),options:[e,t]}),kp=(e,t)=>({...yp(e),options:[e,t]}),Op={...i},_p=Op.useInsertionEffect||(e=>e());function Cp(e){const t=r.useRef(()=>{});return _p(()=>{t.current=e}),r.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)},[])}const Ap="ArrowUp",Sp="ArrowDown",Lp="ArrowLeft",zp="ArrowRight";function Pp(e,t,n){return Math.floor(e/t)!==n}function Rp(e,t){return t<0||t>=e.current.length}function Yp(e,t){return Fp(e,{disabledIndices:t})}function Qp(e,t){return Fp(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Fp(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t;const a=e.current;let s=n;do{s+=r?-i:i}while(s>=0&&s<=a.length-1&&Wp(a,s,o));return s}function Up(e,t,n,r,o){if(-1===e)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function Bp(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Wp(e,t,n){if(n)return n.includes(t);const r=e[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}var Vp="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function Hp(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Gp=r.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function $p(e){const{children:t,elementsRef:n,labelsRef:o}=e,[i,a]=r.useState(()=>new Map),s=r.useCallback(e=>{a(t=>new Map(t).set(e,null))},[]),l=r.useCallback(e=>{a(t=>{const n=new Map(t);return n.delete(e),n})},[]);return Vp(()=>{const e=new Map(i);Array.from(e.keys()).sort(Hp).forEach((t,n)=>{e.set(t,n)}),function(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}(i,e)||a(e)},[i]),r.createElement(Gp.Provider,{value:r.useMemo(()=>({register:s,unregister:l,map:i,elementsRef:n,labelsRef:o}),[s,l,i,n,o])},t)}function Zp(){return Zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zp.apply(this,arguments)}let qp=!1,Xp=0;const Jp=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Xp++,Kp=Op.useId||function(){const[e,t]=r.useState(()=>qp?Jp():void 0);return Vp(()=>{null==e&&t(Jp())},[]),r.useEffect(()=>{qp=!0},[]),e},em=r.forwardRef(function(e,t){const{context:{placement:n,elements:{floating:o},middlewareData:{arrow:i,shift:a}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:p,d:m,style:{transform:f,...g}={},...h}=e,y=Kp(),[x,v]=r.useState(!1);if(Vp(()=>{o&&"rtl"===Ru(o).direction&&v(!0)},[o]),!o)return null;const[b,M]=n.split("-"),w="top"===b||"bottom"===b;let N=d;(w&&null!=a&&a.x||!w&&null!=a&&a.y)&&(N=null);const E=2*u,j=E/2,D=s/2*(c/-8+1),T=l/2*c/4,I=!!m,k=N&&"end"===M?"bottom":"top";let O=N&&"end"===M?"right":"left";N&&x&&(O="end"===M?"left":"right");const _=null!=(null==i?void 0:i.x)?N||i.x:"",C=null!=(null==i?void 0:i.y)?N||i.y:"",A=m||"M0,0 H"+s+" L"+(s-D)+","+(l-T)+" Q"+s/2+","+l+" "+D+","+(l-T)+" Z",S={top:I?"rotate(180deg)":"",left:I?"rotate(90deg)":"rotate(-90deg)",bottom:I?"":"rotate(180deg)",right:I?"rotate(-90deg)":"rotate(90deg)"}[b];return r.createElement("svg",Zp({},h,{"aria-hidden":!0,ref:t,width:I?s:s+E,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[O]:_,[k]:C,[b]:w||I?"100%":"calc(100% - "+E/2+"px)",transform:[S,f].filter(e=>!!e).join(" "),...g}}),E>0&&r.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:p,strokeWidth:E+(m?0:1),d:A}),r.createElement("path",{stroke:E&&!m?h.fill:"none",d:A}),r.createElement("clipPath",{id:y},r.createElement("rect",{x:-j,y:j*(I?-1:1),width:s+E,height:s})))});const tm=r.createContext(null),nm=r.createContext(null),rm=()=>{var e;return(null==(e=r.useContext(tm))?void 0:e.id)||null},om=()=>r.useContext(nm);function im(e){return"data-floating-ui-"+e}function am(e){const t=(0,r.useRef)(e);return Vp(()=>{t.current=e}),t}const sm=im("safe-polygon");function lm(e,t,n){return n&&!Ku(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let cm=0;function um(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(cm);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():cm=requestAnimationFrame(i)}function dm(e,t){let n=e.filter(e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)}),r=n;for(;r.length;)r=e.filter(e=>{var t;return null==(t=r)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})}),n=n.concat(r);return n}let pm=new WeakMap,mm=new WeakSet,fm={},gm=0;const hm=e=>e&&(e.host||hm(e.parentNode));function ym(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=ed(e[0]).body;return function(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=(s=t,e.map(e=>{if(s.contains(e))return e;const t=hm(e);return s.contains(t)?t:null}).filter(e=>null!=e));var s;const l=new Set,c=new Set(a),u=[];fm[o]||(fm[o]=new WeakMap);const d=fm[o];return a.forEach(function e(t){t&&!l.has(t)&&(l.add(t),t.parentNode&&e(t.parentNode))}),function e(t){t&&!c.has(t)&&[].forEach.call(t.children,t=>{if("script"!==xu(t))if(l.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(pm.get(t)||0)+1,a=(d.get(t)||0)+1;pm.set(t,r),d.set(t,a),u.push(t),1===r&&n&&mm.add(t),1===a&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}})}(t),l.clear(),gm++,()=>{u.forEach(e=>{const t=(pm.get(e)||0)-1,n=(d.get(e)||0)-1;pm.set(e,t),d.set(e,n),t||(!mm.has(e)&&i&&e.removeAttribute(i),mm.delete(e)),n||e.removeAttribute(o)}),gm--,gm||(pm=new WeakMap,pm=new WeakMap,mm=new WeakSet,fm={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const xm=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function vm(e,t){const n=Vd(e,xm());"prev"===t&&n.reverse();const r=n.indexOf(Wu(ed(e)));return n.slice(r+1)[0]}function bm(){return vm(document.body,"next")}function Mm(){return vm(document.body,"prev")}function wm(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Vu(n,r)}function Nm(e){Vd(e,xm()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function Em(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}const jm={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function Dm(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const Tm=r.forwardRef(function(e,t){const[n,o]=r.useState();Vp(()=>(qu()&&o("button"),document.addEventListener("keydown",Dm),()=>{document.removeEventListener("keydown",Dm)}),[]);const i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[im("focus-guard")]:"",style:jm};return r.createElement("span",Zp({},e,i))}),Im=r.createContext(null),km=im("portal");function Om(e){const{children:t,id:n,root:o,preserveTabOrder:i=!0}=e,a=function(e){void 0===e&&(e={});const{id:t,root:n}=e,o=Kp(),i=_m(),[a,s]=r.useState(null),l=r.useRef(null);return Vp(()=>()=>{null==a||a.remove(),queueMicrotask(()=>{l.current=null})},[a]),Vp(()=>{if(!o)return;if(l.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=o,n.setAttribute(km,""),e.appendChild(n),l.current=n,s(n)},[t,o]),Vp(()=>{if(null===n)return;if(!o)return;if(l.current)return;let e=n||(null==i?void 0:i.portalNode);e&&!wu(e)&&(e=e.current),e=e||document.body;let r=null;t&&(r=document.createElement("div"),r.id=t,e.appendChild(r));const a=document.createElement("div");a.id=o,a.setAttribute(km,""),e=r||e,e.appendChild(a),l.current=a,s(a)},[t,n,o,i]),a}({id:n,root:o}),[s,l]=r.useState(null),c=r.useRef(null),u=r.useRef(null),d=r.useRef(null),p=r.useRef(null),m=null==s?void 0:s.modal,f=null==s?void 0:s.open,g=!!s&&!s.modal&&s.open&&i&&!(!o&&!a);return r.useEffect(()=>{if(a&&i&&!m)return a.addEventListener("focusin",e,!0),a.addEventListener("focusout",e,!0),()=>{a.removeEventListener("focusin",e,!0),a.removeEventListener("focusout",e,!0)};function e(e){a&&wm(e)&&("focusin"===e.type?Em:Nm)(a)}},[a,i,m]),r.useEffect(()=>{a&&(f||Em(a))},[f,a]),r.createElement(Im.Provider,{value:r.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:d,afterInsideRef:p,portalNode:a,setFocusManagerState:l}),[i,a])},g&&a&&r.createElement(Tm,{"data-type":"outside",ref:c,onFocus:e=>{if(wm(e,a)){var t;null==(t=d.current)||t.focus()}else{const e=Mm()||(null==s?void 0:s.refs.domReference.current);null==e||e.focus()}}}),g&&a&&r.createElement("span",{"aria-owns":a.id,style:jm}),a&&dn.createPortal(t,a),g&&a&&r.createElement(Tm,{"data-type":"outside",ref:u,onFocus:e=>{if(wm(e,a)){var t;null==(t=p.current)||t.focus()}else{const t=bm()||(null==s?void 0:s.refs.domReference.current);null==t||t.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const _m=()=>r.useContext(Im),Cm="data-floating-ui-focusable";function Am(e){return e?e.hasAttribute(Cm)?e:e.querySelector("["+Cm+"]")||e:null}let Sm=[];function Lm(e){Sm=Sm.filter(e=>e.isConnected);let t=e;if(t&&"body"!==xu(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==Cd.call(e,Od)&&Ud(t,e)}(t,xm())){const e=Vd(t,xm())[0];e&&(t=e)}Sm.push(t),Sm.length>20&&(Sm=Sm.slice(-20))}}function zm(){return Sm.slice().reverse().find(e=>e.isConnected)}const Pm=r.forwardRef(function(e,t){return r.createElement("button",Zp({},e,{type:"button",ref:t,tabIndex:-1,style:jm}))});function Rm(e){const{context:t,children:n,disabled:o=!1,order:i=["content"],guards:a=!0,initialFocus:s=0,returnFocus:l=!0,restoreFocus:c=!1,modal:u=!0,visuallyHiddenDismiss:d=!1,closeOnFocusOut:p=!0}=e,{open:m,refs:f,nodeId:g,onOpenChange:h,events:y,dataRef:x,floatingId:v,elements:{domReference:b,floating:M}}=t,w="number"==typeof s&&s<0,N=id(b)&&w,E="undefined"==typeof HTMLElement||!("inert"in HTMLElement.prototype)||a,j=am(i),D=am(s),T=am(l),I=om(),k=_m(),O=r.useRef(null),_=r.useRef(null),C=r.useRef(!1),A=r.useRef(!1),S=r.useRef(-1),L=null!=k,z=Am(M),P=Cp(function(e){return void 0===e&&(e=z),e?Vd(e,xm()):[]}),R=Cp(e=>{const t=P(e);return j.current.map(e=>b&&"reference"===e?b:z&&"floating"===e?z:t).filter(Boolean).flat()});function Y(e){return!o&&d&&u?r.createElement(Pm,{ref:"start"===e?O:_,onClick:e=>h(!1,e.nativeEvent)},"string"==typeof d?d:"Dismiss"):null}r.useEffect(()=>{if(o)return;if(!u)return;function e(e){if("Tab"===e.key){Vu(z,Wu(ed(z)))&&0===P().length&&!N&&od(e);const t=R(),n=nd(e);"reference"===j.current[0]&&n===b&&(od(e),e.shiftKey?um(t[t.length-1]):um(t[1])),"floating"===j.current[1]&&n===z&&e.shiftKey&&(od(e),um(t[0]))}}const t=ed(z);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[o,b,z,u,j,N,P,R]),r.useEffect(()=>{if(!o&&M)return M.addEventListener("focusin",e),()=>{M.removeEventListener("focusin",e)};function e(e){const t=nd(e),n=P().indexOf(t);-1!==n&&(S.current=n)}},[o,M,P]),r.useEffect(()=>{if(!o&&p)return M&&Nu(b)?(b.addEventListener("focusout",t),b.addEventListener("pointerdown",e),M.addEventListener("focusout",t),()=>{b.removeEventListener("focusout",t),b.removeEventListener("pointerdown",e),M.removeEventListener("focusout",t)}):void 0;function e(){A.current=!0,setTimeout(()=>{A.current=!1})}function t(e){const t=e.relatedTarget;queueMicrotask(()=>{const n=!(Vu(b,t)||Vu(M,t)||Vu(t,M)||Vu(null==k?void 0:k.portalNode,t)||null!=t&&t.hasAttribute(im("focus-guard"))||I&&(dm(I.nodesRef.current,g).find(e=>{var n,r;return Vu(null==(n=e.context)?void 0:n.elements.floating,t)||Vu(null==(r=e.context)?void 0:r.elements.domReference,t)})||function(e,t){var n;let r=[],o=null==(n=e.find(e=>e.id===t))?void 0:n.parentId;for(;o;){const t=e.find(e=>e.id===o);o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}(I.nodesRef.current,g).find(e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t})));if(c&&n&&Wu(ed(z))===ed(z).body){Nu(z)&&z.focus();const e=S.current,t=P(),n=t[e]||t[t.length-1]||z;Nu(n)&&n.focus()}!N&&u||!t||!n||A.current||t===zm()||(C.current=!0,h(!1,e,"focus-out"))})}},[o,b,M,z,u,g,I,k,h,p,c,P,N]),r.useEffect(()=>{var e;if(o)return;const t=Array.from((null==k||null==(e=k.portalNode)?void 0:e.querySelectorAll("["+im("portal")+"]"))||[]);if(M){const e=[M,...t,O.current,_.current,j.current.includes("reference")||N?b:null].filter(e=>null!=e),n=u||N?ym(e,E,!E):ym(e);return()=>{n()}}},[o,b,M,u,j,k,N,E]),Vp(()=>{if(o||!Nu(z))return;const e=Wu(ed(z));queueMicrotask(()=>{const t=R(z),n=D.current,r=("number"==typeof n?t[n]:n.current)||z,o=Vu(z,e);w||o||!m||um(r,{preventScroll:r===z})})},[o,m,z,w,R,D]),Vp(()=>{if(o||!z)return;let e=!1;const t=ed(z),n=Wu(t);let r=x.current.openEvent;function i(t){let{open:n,reason:o,event:i,nested:a}=t;n&&(r=i),"escape-key"===o&&f.domReference.current&&Lm(f.domReference.current),"hover"===o&&"mouseleave"===i.type&&(C.current=!0),"outside-press"===o&&(a?(C.current=!1,e=!0):C.current=!($u(i)||Zu(i)))}Lm(n),y.on("openchange",i);const a=t.createElement("span");return a.setAttribute("tabindex","-1"),a.setAttribute("aria-hidden","true"),Object.assign(a.style,jm),L&&b&&b.insertAdjacentElement("afterend",a),()=>{y.off("openchange",i);const n=Wu(t),o=Vu(M,n)||I&&dm(I.nodesRef.current,g).some(e=>{var t;return Vu(null==(t=e.context)?void 0:t.elements.floating,n)});(o||r&&["click","mousedown"].includes(r.type))&&f.domReference.current&&Lm(f.domReference.current);const s="boolean"==typeof T.current?zm()||a:T.current.current||a;queueMicrotask(()=>{T.current&&!C.current&&Nu(s)&&(s===n||n===t.body||o)&&s.focus({preventScroll:e}),a.remove()})}},[o,M,z,T,x,f,y,I,g,L,b]),r.useEffect(()=>{queueMicrotask(()=>{C.current=!1})},[o]),Vp(()=>{if(!o&&k)return k.setFocusManagerState({modal:u,closeOnFocusOut:p,open:m,onOpenChange:h,refs:f}),()=>{k.setFocusManagerState(null)}},[o,k,u,m,h,f,p]),Vp(()=>{if(o)return;if(!z)return;if("function"!=typeof MutationObserver)return;if(w)return;const e=()=>{const e=z.getAttribute("tabindex"),t=P(),n=Wu(ed(M)),r=t.indexOf(n);-1!==r&&(S.current=r),j.current.includes("floating")||n!==f.domReference.current&&0===t.length?"0"!==e&&z.setAttribute("tabindex","0"):"-1"!==e&&z.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(z,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}},[o,M,z,f,j,P,w]);const Q=!o&&E&&(!u||!N)&&(L||u);return r.createElement(r.Fragment,null,Q&&r.createElement(Tm,{"data-type":"inside",ref:null==k?void 0:k.beforeInsideRef,onFocus:e=>{if(u){const e=R();um("reference"===i[0]?e[0]:e[e.length-1])}else if(null!=k&&k.preserveTabOrder&&k.portalNode)if(C.current=!1,wm(e,k.portalNode)){const e=bm()||b;null==e||e.focus()}else{var t;null==(t=k.beforeOutsideRef.current)||t.focus()}}}),!N&&Y("start"),n,Y("end"),Q&&r.createElement(Tm,{"data-type":"inside",ref:null==k?void 0:k.afterInsideRef,onFocus:e=>{if(u)um(R()[0]);else if(null!=k&&k.preserveTabOrder&&k.portalNode)if(p&&(C.current=!0),wm(e,k.portalNode)){const e=Mm()||b;null==e||e.focus()}else{var t;null==(t=k.afterOutsideRef.current)||t.focus()}}}))}let Ym=0,Qm=()=>{};const Fm=r.forwardRef(function(e,t){const{lockScroll:n=!1,...o}=e;return Vp(()=>{if(n)return Ym++,1===Ym&&(Qm=function(){const e=/iP(hone|ad|od)|iOS/.test(Hu()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,o=t.left?parseFloat(t.left):window.scrollX,i=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",r&&(t[n]=r+"px"),e){var a,s;const e=(null==(a=window.visualViewport)?void 0:a.offsetLeft)||0,n=(null==(s=window.visualViewport)?void 0:s.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(i-Math.floor(n))+"px",left:-(o-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,i))}}()),()=>{Ym--,0===Ym&&Qm()}},[n]),r.createElement("div",Zp({ref:t},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Um(e){return Nu(e.target)&&"BUTTON"===e.target.tagName}function Bm(e){return rd(e)}function Wm(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,dataRef:i,elements:{domReference:a}}=e,{enabled:s=!0,event:l="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:p=!0}=t,m=r.useRef(),f=r.useRef(!1),g=r.useMemo(()=>({onPointerDown(e){m.current=e.pointerType},onMouseDown(e){const t=m.current;0===e.button&&"click"!==l&&(Ku(t,!0)&&u||(!n||!c||i.current.openEvent&&p&&"mousedown"!==i.current.openEvent.type?(e.preventDefault(),o(!0,e.nativeEvent,"click")):o(!1,e.nativeEvent,"click")))},onClick(e){const t=m.current;"mousedown"===l&&m.current?m.current=void 0:Ku(t,!0)&&u||(!n||!c||i.current.openEvent&&p&&"click"!==i.current.openEvent.type?o(!0,e.nativeEvent,"click"):o(!1,e.nativeEvent,"click"))},onKeyDown(e){m.current=void 0,e.defaultPrevented||!d||Um(e)||(" "!==e.key||Bm(a)||(e.preventDefault(),f.current=!0),"Enter"===e.key&&o(!n||!c,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||Um(e)||Bm(a)||" "===e.key&&f.current&&(f.current=!1,o(!n||!c,e.nativeEvent,"click"))}}),[i,a,l,u,d,o,n,p,c]);return r.useMemo(()=>s?{reference:g}:{},[s,g])}const Vm={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Hm={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Gm=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function $m(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,elements:i,dataRef:a}=e,{enabled:s=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:m=!1,bubbles:f,capture:g}=t,h=om(),y=Cp("function"==typeof c?c:()=>!1),x="function"==typeof c?y:c,v=r.useRef(!1),b=r.useRef(!1),{escapeKey:M,outsidePress:w}=Gm(f),{escapeKey:N,outsidePress:E}=Gm(g),j=r.useRef(!1),D=Cp(e=>{var t;if(!n||!s||!l||"Escape"!==e.key)return;if(j.current)return;const r=null==(t=a.current.floatingContext)?void 0:t.nodeId,i=h?dm(h.nodesRef.current,r):[];if(!M&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),T=Cp(e=>{var t;const n=()=>{var t;D(e),null==(t=nd(e))||t.removeEventListener("keydown",n)};null==(t=nd(e))||t.addEventListener("keydown",n)}),I=Cp(e=>{var t;const n=v.current;v.current=!1;const r=b.current;if(b.current=!1,"click"===u&&r)return;if(n)return;if("function"==typeof x&&!x(e))return;const s=nd(e),l="["+im("inert")+"]",c=ed(i.floating).querySelectorAll(l);let d=wu(s)?s:null;for(;d&&!Pu(d);){const e=Qu(d);if(Pu(e)||!wu(e))break;d=e}if(c.length&&wu(s)&&!s.matches("html,body")&&!Vu(s,i.floating)&&Array.from(c).every(e=>!Vu(d,e)))return;if(Nu(s)&&_){const t=s.clientWidth>0&&s.scrollWidth>s.clientWidth,n=s.clientHeight>0&&s.scrollHeight>s.clientHeight;let r=n&&e.offsetX>s.clientWidth;if(n&&"rtl"===Ru(s).direction&&(r=e.offsetX<=s.offsetWidth-s.clientWidth),r||t&&e.offsetY>s.clientHeight)return}const p=null==(t=a.current.floatingContext)?void 0:t.nodeId,m=h&&dm(h.nodesRef.current,p).some(t=>{var n;return td(e,null==(n=t.context)?void 0:n.elements.floating)});if(td(e,i.floating)||td(e,i.domReference)||m)return;const f=h?dm(h.nodesRef.current,p):[];if(f.length>0){let e=!0;if(f.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}o(!1,e,"outside-press")}),k=Cp(e=>{var t;const n=()=>{var t;I(e),null==(t=nd(e))||t.removeEventListener(u,n)};null==(t=nd(e))||t.addEventListener(u,n)});r.useEffect(()=>{if(!n||!s)return;a.current.__escapeKeyBubbles=M,a.current.__outsidePressBubbles=w;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function r(){window.clearTimeout(e),j.current=!0}function c(){e=window.setTimeout(()=>{j.current=!1},Lu()?5:0)}const d=ed(i.floating);l&&(d.addEventListener("keydown",N?T:D,N),d.addEventListener("compositionstart",r),d.addEventListener("compositionend",c)),x&&d.addEventListener(u,E?k:I,E);let p=[];return m&&(wu(i.domReference)&&(p=Uu(i.domReference)),wu(i.floating)&&(p=p.concat(Uu(i.floating))),!wu(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(Uu(i.reference.contextElement)))),p=p.filter(e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)}),p.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{l&&(d.removeEventListener("keydown",N?T:D,N),d.removeEventListener("compositionstart",r),d.removeEventListener("compositionend",c)),x&&d.removeEventListener(u,E?k:I,E),p.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[a,i,l,x,u,n,o,m,s,M,w,D,N,T,I,E,k]),r.useEffect(()=>{v.current=!1},[x,u]);const O=r.useMemo(()=>({onKeyDown:D,[Vm[p]]:e=>{d&&o(!1,e.nativeEvent,"reference-press")}}),[D,o,d,p]),_=r.useMemo(()=>({onKeyDown:D,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Hm[u]]:()=>{v.current=!0}}),[D,u]);return r.useMemo(()=>s?{reference:O,floating:_}:{},[s,O,_])}function Zm(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:o}=e,i=Kp(),a=r.useRef({}),[s]=r.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))||[])}}}()),l=null!=rm(),[c,u]=r.useState(o.reference),d=Cp((e,t,r)=>{a.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)}),p=r.useMemo(()=>({setPositionReference:u}),[]),m=r.useMemo(()=>({reference:c||o.reference||null,floating:o.floating||null,domReference:o.reference}),[c,o.reference,o.floating]);return r.useMemo(()=>({dataRef:a,open:t,onOpenChange:d,elements:m,events:s,floatingId:i,refs:p}),[t,d,m,s,i,p])}({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,i=o.elements,[a,s]=r.useState(null),[l,c]=r.useState(null),u=(null==i?void 0:i.domReference)||a,d=r.useRef(null),p=om();Vp(()=>{u&&(d.current=u)},[u]);const m=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,p]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=r.useState(o);Mp(m,o)||f(o);const[g,h]=r.useState(null),[y,x]=r.useState(null),v=r.useCallback(e=>{e!==N.current&&(N.current=e,h(e))},[]),b=r.useCallback(e=>{e!==E.current&&(E.current=e,x(e))},[]),M=a||g,w=s||y,N=r.useRef(null),E=r.useRef(null),j=r.useRef(d),D=null!=c,T=Ep(c),I=Ep(i),k=Ep(u),O=r.useCallback(()=>{if(!N.current||!E.current)return;const e={placement:t,strategy:n,middleware:m};I.current&&(e.platform=I.current),vp(N.current,E.current,e).then(e=>{const t={...e,isPositioned:!1!==k.current};_.current&&!Mp(j.current,t)&&(j.current=t,dn.flushSync(()=>{p(t)}))})},[m,t,n,I,k]);bp(()=>{!1===u&&j.current.isPositioned&&(j.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[u]);const _=r.useRef(!1);bp(()=>(_.current=!0,()=>{_.current=!1}),[]),bp(()=>{if(M&&(N.current=M),w&&(E.current=w),M&&w){if(T.current)return T.current(M,w,O);O()}},[M,w,O,T,D]);const C=r.useMemo(()=>({reference:N,floating:E,setReference:v,setFloating:b}),[v,b]),A=r.useMemo(()=>({reference:M,floating:w}),[M,w]),S=r.useMemo(()=>{const e={position:n,left:0,top:0};if(!A.floating)return e;const t=Np(A.floating,d.x),r=Np(A.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...wp(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,A.floating,d.x,d.y]);return r.useMemo(()=>({...d,update:O,refs:C,elements:A,floatingStyles:S}),[d,O,C,A,S])}({...e,elements:{...i,...l&&{reference:l}}}),f=r.useCallback(e=>{const t=wu(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),m.refs.setReference(t)},[m.refs]),g=r.useCallback(e=>{(wu(e)||null===e)&&(d.current=e,s(e)),(wu(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!wu(e))&&m.refs.setReference(e)},[m.refs]),h=r.useMemo(()=>({...m.refs,setReference:g,setPositionReference:f,domReference:d}),[m.refs,g,f]),y=r.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),x=r.useMemo(()=>({...m,...o,refs:h,elements:y,nodeId:t}),[m,h,y,t,o]);return Vp(()=>{o.dataRef.current.floatingContext=x;const e=null==p?void 0:p.nodesRef.current.find(e=>e.id===t);e&&(e.context=x)}),r.useMemo(()=>({...m,context:x,refs:h,elements:y}),[m,h,y,x])}const qm="active",Xm="selected";function Jm(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[qm]:t,[Xm]:__,...n}=e;i=n}return{..."floating"===n&&{tabIndex:-1,[Cm]:""},...i,...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,i]=t;var a;o&&[qm,Xm].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(a=r.get(n))||a.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[n]=i)}),e):e,{})}}function Km(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),o=e.map(e=>null==e?void 0:e.item),i=r.useCallback(t=>Jm(t,e,"reference"),t),a=r.useCallback(t=>Jm(t,e,"floating"),n),s=r.useCallback(t=>Jm(t,e,"item"),o);return r.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:s}),[i,a,s])}let ef=!1;function tf(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function nf(e,t){return tf(t,e===Ap||e===Sp,e===Lp||e===zp)}function rf(e,t,n){return tf(t,e===Sp,n?e===Lp:e===zp)||"Enter"===e||" "===e||""===e}function of(e,t,n){return tf(t,n?e===zp:e===Lp,e===Ap)}function af(e,t){const{open:n,onOpenChange:o,elements:i}=e,{listRef:a,activeIndex:s,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:p=!1,nested:m=!1,rtl:f=!1,virtual:g=!1,focusItemOnOpen:h="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:x=!0,disabledIndices:v,orientation:b="vertical",cols:M=1,scrollItemIntoView:w=!0,virtualItemRef:N,itemSizes:E,dense:j=!1}=t,D=am(Am(i.floating)),T=rm(),I=om(),k=Cp(l),O=id(i.domReference),_=r.useRef(h),C=r.useRef(null!=u?u:-1),A=r.useRef(null),S=r.useRef(!0),L=r.useRef(k),z=r.useRef(!!i.floating),P=r.useRef(n),R=r.useRef(!1),Y=r.useRef(!1),Q=am(v),F=am(n),U=am(w),B=am(u),[W,V]=r.useState(),[H,G]=r.useState(),$=Cp(function(e,t,n){function r(e){g?(V(e.id),null==I||I.events.emit("virtualfocus",e),N&&(N.current=e)):um(e,{preventScroll:!0,sync:!(!Ju()||!qu())&&(ef||R.current)})}void 0===n&&(n=!1);const o=e.current[t.current];o&&r(o),requestAnimationFrame(()=>{const i=e.current[t.current]||o;if(!i)return;o||r(i);const a=U.current;a&&q&&(n||!S.current)&&(null==i.scrollIntoView||i.scrollIntoView("boolean"==typeof a?{block:"nearest",inline:"nearest"}:a))})});Vp(()=>{document.createElement("div").focus({get preventScroll(){return ef=!0,!1}})},[]),Vp(()=>{c&&(n&&i.floating?_.current&&null!=u&&(Y.current=!0,C.current=u,k(u)):z.current&&(C.current=-1,L.current(null)))},[c,n,i.floating,u,k]),Vp(()=>{if(c&&n&&i.floating)if(null==s){if(R.current=!1,null!=B.current)return;if(z.current&&(C.current=-1,$(a,C)),(!P.current||!z.current)&&_.current&&(null!=A.current||!0===_.current&&null==A.current)){let e=0;const t=()=>{null==a.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(C.current=null==A.current||rf(A.current,b,f)||m?Yp(a,Q.current):Qp(a,Q.current),A.current=null,k(C.current))};t()}}else Rp(a,s)||(C.current=s,$(a,C,Y.current),Y.current=!1)},[c,n,i.floating,s,B,m,a,b,f,k,$,Q]),Vp(()=>{var e;if(!c||i.floating||!I||g||!z.current)return;const t=I.nodesRef.current,n=null==(e=t.find(e=>e.id===T))||null==(e=e.context)?void 0:e.elements.floating,r=Wu(ed(i.floating)),o=t.some(e=>e.context&&Vu(e.context.elements.floating,r));n&&!o&&S.current&&n.focus({preventScroll:!0})},[c,i.floating,I,T,g]),Vp(()=>{if(c&&I&&g&&!T)return I.events.on("virtualfocus",e),()=>{I.events.off("virtualfocus",e)};function e(e){G(e.id),N&&(N.current=e)}},[c,I,g,T,N]),Vp(()=>{L.current=k,z.current=!!i.floating}),Vp(()=>{n||(A.current=null)},[n]),Vp(()=>{P.current=n},[n]);const Z=null!=s,q=r.useMemo(()=>{function e(e){if(!n)return;const t=a.current.indexOf(e);-1!==t&&k(t)}return{onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...y&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;S.current&&"touch"!==t&&(C.current=-1,$(a,C),k(null),g||um(D.current,{preventScroll:!0}))}}}},[n,D,$,y,a,k,g]),X=Cp(e=>{if(S.current=!1,R.current=!0,229===e.which)return;if(!F.current&&e.currentTarget===D.current)return;if(m&&of(e.key,b,f))return od(e),o(!1,e.nativeEvent,"list-navigation"),void(Nu(i.domReference)&&(g?null==I||I.events.emit("virtualfocus",i.domReference):i.domReference.focus()));const t=C.current,r=Yp(a,v),s=Qp(a,v);if(O||("Home"===e.key&&(od(e),C.current=r,k(C.current)),"End"===e.key&&(od(e),C.current=s,k(C.current))),M>1){const t=E||Array.from({length:a.current.length},()=>({width:1,height:1})),n=function(e,t,n){const r=[];let o=0;return e.forEach((e,i)=>{let{width:a,height:s}=e,l=!1;for(n&&(o=0);!l;){const e=[];for(let n=0;n<a;n++)for(let r=0;r<s;r++)e.push(o+n+r*t);o%t+a<=t&&e.every(e=>null==r[e])?(e.forEach(e=>{r[e]=i}),l=!0):o++}}),[...r]}(t,M,j),o=n.findIndex(e=>null!=e&&!Wp(a.current,e,v)),i=n.reduce((e,t,n)=>null==t||Wp(a.current,t,v)?e:n,-1),l=n[function(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:a,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,p=u;if(n.key===Ap){if(d&&od(n),-1===u)p=c;else if(p=Fp(e,{startingIndex:p,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||p<0)){const e=u%a,t=c%a,n=c-(t-e);p=t===e?c:t>e?n:n-a}Rp(e,p)&&(p=u)}if(n.key===Sp&&(d&&od(n),-1===u?p=l:(p=Fp(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(p=Fp(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),Rp(e,p)&&(p=u)),"both"===r){const t=cd(u/a);n.key===(i?Lp:zp)&&(d&&od(n),u%a!==a-1?(p=Fp(e,{startingIndex:u,disabledIndices:s}),o&&Pp(p,a,t)&&(p=Fp(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(p=Fp(e,{startingIndex:u-u%a-1,disabledIndices:s})),Pp(p,a,t)&&(p=u)),n.key===(i?zp:Lp)&&(d&&od(n),u%a!==0?(p=Fp(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&Pp(p,a,t)&&(p=Fp(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(p=Fp(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),Pp(p,a,t)&&(p=u));const r=cd(c/a)===t;Rp(e,p)&&(p=o&&r?n.key===(i?zp:Lp)?c:Fp(e,{startingIndex:u-u%a-1,disabledIndices:s}):u)}return p}({current:n.map(e=>null!=e?a.current[e]:null)},{event:e,orientation:b,loop:p,rtl:f,cols:M,disabledIndices:Bp([...v||a.current.map((e,t)=>Wp(a.current,t)?t:void 0),void 0],n),minIndex:o,maxIndex:i,prevIndex:Up(C.current>s?r:C.current,t,n,M,e.key===Sp?"bl":e.key===(f?Lp:zp)?"tr":"tl"),stopEvent:!0})];if(null!=l&&(C.current=l,k(C.current)),"both"===b)return}if(nf(e.key,b)){if(od(e),n&&!g&&Wu(e.currentTarget.ownerDocument)===e.currentTarget)return C.current=rf(e.key,b,f)?r:s,void k(C.current);rf(e.key,b,f)?C.current=p?t>=s?d&&t!==a.current.length?-1:r:Fp(a,{startingIndex:t,disabledIndices:v}):Math.min(s,Fp(a,{startingIndex:t,disabledIndices:v})):C.current=p?t<=r?d&&-1!==t?a.current.length:s:Fp(a,{startingIndex:t,decrement:!0,disabledIndices:v}):Math.max(r,Fp(a,{startingIndex:t,decrement:!0,disabledIndices:v})),Rp(a,C.current)?k(null):k(C.current)}}),J=r.useMemo(()=>g&&n&&Z&&{"aria-activedescendant":H||W},[g,n,Z,H,W]),K=r.useMemo(()=>({"aria-orientation":"both"===b?void 0:b,...!id(i.domReference)&&J,onKeyDown:X,onPointerMove(){S.current=!0}}),[J,X,i.domReference,b]),ee=r.useMemo(()=>{function e(e){"auto"===h&&$u(e.nativeEvent)&&(_.current=!0)}return{...J,onKeyDown(e){S.current=!1;const t=e.key.startsWith("Arrow"),r=["Home","End"].includes(e.key),i=t||r,s=function(e,t,n){return tf(t,n?e===Lp:e===zp,e===Sp)}(e.key,b,f),l=of(e.key,b,f),c=nf(e.key,b),d=(m?s:c)||"Enter"===e.key||""===e.key.trim();if(g&&n){const t=null==I?void 0:I.nodesRef.current.find(e=>null==e.parentId),n=I&&t?function(e,t){let n,r=-1;return function t(o,i){i>r&&(n=o,r=i),dm(e,o).forEach(e=>{t(e.id,i+1)})}(t,0),e.find(e=>e.id===n)}(I.nodesRef.current,t.id):null;if(i&&n&&N){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(s||l){var p,h;const r=(null==(p=n.context)?void 0:p.elements.domReference)===e.currentTarget,o=l&&!r?null==(h=n.context)?void 0:h.elements.domReference:s?a.current.find(e=>(null==e?void 0:e.id)===W):null;o&&(od(e),o.dispatchEvent(t),G(void 0))}var y;if((c||r)&&n.context&&n.context.open&&n.parentId&&e.currentTarget!==n.context.elements.domReference)return od(e),void(null==(y=n.context.elements.domReference)||y.dispatchEvent(t))}return X(e)}(n||x||!t)&&(d&&(A.current=m&&c?null:e.key),m?s&&(od(e),n?(C.current=Yp(a,Q.current),k(C.current)):o(!0,e.nativeEvent,"list-navigation")):c&&(null!=u&&(C.current=u),od(e),!n&&x?o(!0,e.nativeEvent,"list-navigation"):X(e),n&&k(C.current)))},onFocus(){n&&!g&&k(null)},onPointerDown:function(e){_.current=h,"auto"===h&&Zu(e.nativeEvent)&&(_.current=!0)},onMouseDown:e,onClick:e}},[W,J,X,Q,h,a,m,k,o,n,x,b,f,u,I,g,N]);return r.useMemo(()=>c?{reference:ee,floating:K,item:q}:{},[c,ee,K,q])}const sf=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function lf(e,t){var n;void 0===t&&(t={});const{open:o,floatingId:i}=e,{enabled:a=!0,role:s="dialog"}=t,l=null!=(n=sf.get(s))?n:s,c=Kp(),u=null!=rm(),d=r.useMemo(()=>"tooltip"===l||"label"===s?{["aria-"+("label"===s?"labelledby":"describedby")]:o?i:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===l?"dialog":l,"aria-controls":o?i:void 0,..."listbox"===l&&{role:"combobox"},..."menu"===l&&{id:c},..."menu"===l&&u&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}},[l,i,u,o,c,s]),p=r.useMemo(()=>{const e={id:i,...l&&{role:l}};return"tooltip"===l||"label"===s?e:{...e,..."menu"===l&&{"aria-labelledby":c}}},[l,i,c,s]),m=r.useCallback(e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:i+"-option"}};switch(s){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}},[i,s]);return r.useMemo(()=>a?{reference:d,floating:p,item:m}:{},[a,d,p,m])}const cf=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function uf(e,t){return"function"==typeof e?e(t):e}function df(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function pf(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,a=i-1;e<i;a=e++){const[i,s]=t[e]||[0,0],[l,c]=t[a]||[0,0];s>=r!=c>=r&&n<=(l-i)*(r-s)/(c-s)+i&&(o=!o)}return o}function mf(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();const c=e=>{let{x:n,y:c,placement:u,elements:d,onClose:p,nodeId:m,tree:f}=e;return function(e){function g(){clearTimeout(o),p()}if(clearTimeout(o),!d.domReference||!d.floating||null==u||null==n||null==c)return;const{clientX:h,clientY:y}=e,x=[h,y],v=nd(e),b="mouseleave"===e.type,M=Vu(d.floating,v),w=Vu(d.domReference,v),N=d.domReference.getBoundingClientRect(),E=d.floating.getBoundingClientRect(),j=u.split("-")[0],D=n>E.right-E.width/2,T=c>E.bottom-E.height/2,I=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(x,N),k=E.width>N.width,O=E.height>N.height,_=(k?N:E).left,C=(k?N:E).right,A=(O?N:E).top,S=(O?N:E).bottom;if(M&&(i=!0,!b))return;if(w&&(i=!1),w&&!b)return void(i=!0);if(b&&wu(e.relatedTarget)&&Vu(d.floating,e.relatedTarget))return;if(f&&dm(f.nodesRef.current,m).some(e=>{let{context:t}=e;return null==t?void 0:t.open}))return;if("top"===j&&c>=N.bottom-1||"bottom"===j&&c<=N.top+1||"left"===j&&n>=N.right-1||"right"===j&&n<=N.left+1)return g();let L=[];switch(j){case"top":L=[[_,N.top+1],[_,E.bottom-1],[C,E.bottom-1],[C,N.top+1]];break;case"bottom":L=[[_,E.top+1],[_,N.bottom-1],[C,N.bottom-1],[C,E.top+1]];break;case"left":L=[[E.right-1,S],[E.right-1,A],[N.left+1,A],[N.left+1,S]];break;case"right":L=[[N.right-1,S],[N.right-1,A],[E.left+1,A],[E.left+1,S]]}if(!pf([h,y],L)){if(i&&!I)return g();if(!b&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===a||null===s||0===r)return a=e,s=t,l=n,null;const o=e-a,i=t-s,c=Math.sqrt(o*o+i*i);return a=e,s=t,l=n,c/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return g()}pf([h,y],function(e){let[n,r]=e;switch(j){case"top":return[[k?n+t/2:D?n+4*t:n-4*t,r+t+1],[k?n-t/2:D?n+4*t:n-4*t,r+t+1],[E.left,D||k?E.bottom-t:E.top],[E.right,D?k?E.bottom-t:E.top:E.bottom-t]];case"bottom":return[[k?n+t/2:D?n+4*t:n-4*t,r-t],[k?n-t/2:D?n+4*t:n-4*t,r-t],[E.left,D||k?E.top+t:E.bottom],[E.right,D?k?E.top+t:E.bottom:E.top+t]];case"left":{const e=[n+t+1,O?r+t/2:T?r+4*t:r-4*t],o=[n+t+1,O?r-t/2:T?r+4*t:r-4*t];return[[T||O?E.right-t:E.left,E.top],[T?O?E.right-t:E.left:E.right-t,E.bottom],e,o]}case"right":return[[n-t,O?r+t/2:T?r+4*t:r-4*t],[n-t,O?r-t/2:T?r+4*t:r-4*t],[T||O?E.left+t:E.right,E.top],[T?O?E.left+t:E.right:E.left+t,E.bottom]]}}([n,c]))?!i&&r&&(o=window.setTimeout(g,40)):g()}}};return c.__options={blockPointerEvents:n},c}const ff=({variant:e="dark",placement:t="bottom",title:n="",content:o,arrow:i=!1,open:a,setOpen:s,children:l,className:c,tooltipPortalRoot:u,tooltipPortalId:d,boundary:p="clippingAncestors",strategy:m="fixed",offset:f=8,triggers:g=["hover","focus"],interactive:h=!1})=>{const y=(0,r.useMemo)(()=>"boolean"==typeof a&&"function"==typeof s,[a,s]),[x,v]=(0,r.useState)(!1),b=(0,r.useRef)(null),{refs:M,floatingStyles:w,context:N}=Zm({open:y?a:x,onOpenChange:y?s:v,placement:t,strategy:m,middleware:[Dp(f),Ip({boundary:p}),Tp({boundary:p}),(L={element:b},{...jp(L),options:[L,undefined]})],whileElementsMounted:pp}),E=Wm(N,{enabled:!y&&g.includes("click")}),j=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,dataRef:i,events:a,elements:s}=e,{enabled:l=!0,delay:c=0,handleClose:u=null,mouseOnly:d=!1,restMs:p=0,move:m=!0}=t,f=om(),g=rm(),h=am(u),y=am(c),x=am(n),v=r.useRef(),b=r.useRef(-1),M=r.useRef(),w=r.useRef(-1),N=r.useRef(!0),E=r.useRef(!1),j=r.useRef(()=>{}),D=r.useRef(!1),T=r.useCallback(()=>{var e;const t=null==(e=i.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[i]);r.useEffect(()=>{if(l)return a.on("openchange",e),()=>{a.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(b.current),clearTimeout(w.current),N.current=!0,D.current=!1)}},[l,a]),r.useEffect(()=>{if(!l)return;if(!h.current)return;if(!n)return;function e(e){T()&&o(!1,e,"hover")}const t=ed(s.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[s.floating,n,o,l,h,T]);const I=r.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=lm(y.current,"close",v.current);r&&!M.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>o(!1,e,n),r)):t&&(clearTimeout(b.current),o(!1,e,n))},[y,o]),k=Cp(()=>{j.current(),M.current=void 0}),O=Cp(()=>{if(E.current){const e=ed(s.floating).body;e.style.pointerEvents="",e.removeAttribute(sm),E.current=!1}}),_=Cp(()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type));r.useEffect(()=>{if(l&&wu(s.domReference)){var e;const o=s.domReference;return n&&o.addEventListener("mouseleave",a),null==(e=s.floating)||e.addEventListener("mouseleave",a),m&&o.addEventListener("mousemove",t,{once:!0}),o.addEventListener("mouseenter",t),o.addEventListener("mouseleave",r),()=>{var e;n&&o.removeEventListener("mouseleave",a),null==(e=s.floating)||e.removeEventListener("mouseleave",a),m&&o.removeEventListener("mousemove",t),o.removeEventListener("mouseenter",t),o.removeEventListener("mouseleave",r)}}function t(e){if(clearTimeout(b.current),N.current=!1,d&&!Ku(v.current)||p>0&&!lm(y.current,"open"))return;const t=lm(y.current,"open",v.current);t?b.current=window.setTimeout(()=>{x.current||o(!0,e,"hover")},t):n||o(!0,e,"hover")}function r(e){if(_())return;j.current();const t=ed(s.floating);if(clearTimeout(w.current),D.current=!1,h.current&&i.current.floatingContext){n||clearTimeout(b.current),M.current=h.current({...i.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){O(),k(),_()||I(e,!0,"safe-polygon")}});const r=M.current;return t.addEventListener("mousemove",r),void(j.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==v.current||!Vu(s.floating,e.relatedTarget))&&I(e)}function a(e){_()||i.current.floatingContext&&(null==h.current||h.current({...i.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){O(),k(),_()||I(e)}})(e))}},[s,l,e,d,p,m,I,k,O,o,n,x,f,y,h,i,_]),Vp(()=>{var e;if(l&&n&&null!=(e=h.current)&&e.__options.blockPointerEvents&&T()){E.current=!0;const e=s.floating;if(wu(s.domReference)&&e){var t;const n=ed(s.floating).body;n.setAttribute(sm,"");const r=s.domReference,o=null==f||null==(t=f.nodesRef.current.find(e=>e.id===g))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[l,n,g,s,f,h,T]),Vp(()=>{n||(v.current=void 0,D.current=!1,k(),O())},[n,k,O]),r.useEffect(()=>()=>{k(),clearTimeout(b.current),clearTimeout(w.current),O()},[l,s.domReference,k,O]);const C=r.useMemo(()=>{function e(e){v.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function r(){N.current||x.current||o(!0,t,"hover")}d&&!Ku(v.current)||n||0===p||D.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(w.current),"touch"===v.current?r():(D.current=!0,w.current=window.setTimeout(r,p)))}}},[d,o,n,x,p]),A=r.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(e){_()||I(e.nativeEvent,!1)}}),[I,_]);return r.useMemo(()=>l?{reference:C,floating:A}:{},[l,C,A])}(N,{move:!1,enabled:!y&&g.includes("hover"),...h&&{handleClose:mf()}}),D=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,events:i,dataRef:a,elements:s}=e,{enabled:l=!0,visibleOnly:c=!0}=t,u=r.useRef(!1),d=r.useRef(),p=r.useRef(!0);r.useEffect(()=>{if(!l)return;const e=vu(s.domReference);function t(){!n&&Nu(s.domReference)&&s.domReference===Wu(ed(s.domReference))&&(u.current=!0)}function r(){p.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",r,!0)}},[s.domReference,n,l]),r.useEffect(()=>{if(l)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(u.current=!0)}},[i,l]),r.useEffect(()=>()=>{clearTimeout(d.current)},[]);const m=r.useMemo(()=>({onPointerDown(e){Zu(e.nativeEvent)||(p.current=!1)},onMouseLeave(){u.current=!1},onFocus(e){if(u.current)return;const t=nd(e.nativeEvent);if(c&&wu(t))try{if(qu()&&Ju())throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!p.current&&!rd(t))return}o(!0,e.nativeEvent,"focus")},onBlur(e){u.current=!1;const t=e.relatedTarget,n=e.nativeEvent,r=wu(t)&&t.hasAttribute(im("focus-guard"))&&"outside"===t.getAttribute("data-type");d.current=window.setTimeout(()=>{var e;const i=Wu(s.domReference?s.domReference.ownerDocument:document);(t||i!==s.domReference)&&(Vu(null==(e=a.current.floatingContext)?void 0:e.refs.floating.current,i)||Vu(s.domReference,i)||r||o(!1,n,"focus"))})}}),[a,s.domReference,o,c]);return r.useMemo(()=>l?{reference:m}:{},[l,m])}(N,{enabled:!y&&g.includes("focus")}),T=$m(N),I=lf(N,{role:"tooltip"}),{getReferenceProps:k,getFloatingProps:O}=Km([E,j,D,T,I]),{isMounted:_,styles:C}=function(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:o,close:i,common:a,duration:s=250}=t,l=e.placement,c=l.split("-")[0],u=r.useMemo(()=>({side:c,placement:l}),[c,l]),d="number"==typeof s,p=(d?s:s.open)||0,m=(d?s:s.close)||0,[f,g]=r.useState(()=>({...uf(a,u),...uf(n,u)})),{isMounted:h,status:y}=function(e,t){void 0===t&&(t={});const{open:n,elements:{floating:o}}=e,{duration:i=250}=t,a=("number"==typeof i?i:i.close)||0,[s,l]=r.useState("unmounted"),c=function(e,t){const[n,o]=r.useState(e);return e&&!n&&o(!0),r.useEffect(()=>{if(!e&&n){const e=setTimeout(()=>o(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}(n,a);return c||"close"!==s||l("unmounted"),Vp(()=>{if(o){if(n){l("initial");const e=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(e)}}l("close")}},[n,o]),{isMounted:c,status:s}}(e,{duration:s}),x=am(n),v=am(o),b=am(i),M=am(a);return Vp(()=>{const e=uf(x.current,u),t=uf(b.current,u),n=uf(M.current,u),r=uf(v.current,u)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===y&&g(t=>({transitionProperty:t.transitionProperty,...n,...e})),"open"===y&&g({transitionProperty:Object.keys(r).map(cf).join(","),transitionDuration:p+"ms",...n,...r}),"close"===y){const r=t||e;g({transitionProperty:Object.keys(r).map(cf).join(","),transitionDuration:m+"ms",...n,...r})}},[m,b,x,v,M,p,y,u]),{isMounted:h,styles:f}}(N,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),A={light:"bg-tooltip-background-light text-text-primary",dark:"bg-tooltip-background-dark text-text-on-color"}[e],S="dark"===e?"text-tooltip-background-dark":"text-tooltip-background-light";var L;return(0,ee.jsxs)(r.Fragment,{children:[(0,r.isValidElement)(l)&&(0,ee.jsx)(r.Fragment,{children:(0,r.cloneElement)(l,{ref:an(l.ref,M.setReference),className:qe(l.props.className),...k()})},"tooltip-reference"),(0,ee.jsx)(Om,{id:d,root:u,children:_&&(0,ee.jsxs)("div",{className:qe("absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",A,"max-w-80 w-fit",c),ref:M.setFloating,style:{...w,...C},...O(),children:[(0,ee.jsxs)("div",{children:[!!n&&(0,ee.jsx)("span",{className:"font-semibold",children:n},"tooltip-title"),!!o&&(0,ee.jsx)("div",{className:"font-normal",children:o},"tooltip-content")]}),i&&(0,ee.jsx)(em,{ref:b,context:N,className:qe("fill-current",S)})]})})]})};ff.displayName="Tooltip";const gf=(0,r.createContext)({isCollapsed:!1,setIsCollapsed:()=>{},collapsible:!0}),hf=({children:e,className:t,onCollapseChange:n,collapsible:o=!0,borderOn:i=!0,collapsed:a=!1,...s})=>{const l=(0,r.useRef)(null),[c,u]=(0,r.useState)(()=>!o&&a?a:nt("sidebar-collapsed")||window.innerWidth<1280);return(0,r.useEffect)(()=>{"function"==typeof n&&n(c)},[c,n]),(0,r.useEffect)(()=>{if(!o&&a)return;const e=()=>{const e=window.innerWidth<1280;if(o)if(e)u(!0),tt("sidebar-collapsed",!0);else{const e=nt("sidebar-collapsed");u(e||!1)}else u(!1),(e=>{if(!(typeof window>"u"))try{localStorage.removeItem(e)}catch(e){console.error(e)}})("sidebar-collapsed")};return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[o]),(0,ee.jsx)(gf.Provider,{value:{isCollapsed:c,setIsCollapsed:u,collapsible:o},children:(0,ee.jsx)("div",{ref:l,className:qe("h-full overflow-auto w-72 px-4 py-4 gap-4 flex flex-col bg-background-primary",i&&"border-0 border-r border-solid border-border-subtle","transition-all duration-200",c&&"w-16 px-2",t),...s,children:e})})};hf.displayName="Sidebar";const yf=({children:e})=>(0,ee.jsx)("div",{className:"space-y-2",children:e});yf.displayName="Sidebar.Header";const xf=({children:e})=>(0,ee.jsx)("div",{className:qe("space-y-4 grow items-start"),children:e});xf.displayName="Sidebar.Body";const vf=({children:e})=>{const{isCollapsed:t,setIsCollapsed:n,collapsible:o}=(0,r.useContext)(gf);return(0,ee.jsxs)("div",{className:"space-y-4",children:[e,o&&(0,ee.jsx)("button",{className:qe("bg-transparent w-full border-0 p-0 m-0 flex items-center gap-2 text-base cursor-pointer",t&&"justify-center"),onClick:()=>{n(!t),tt("sidebar-collapsed",!t)},"aria-label":t?"Expand sidebar":"Collapse sidebar",children:t?(0,ee.jsx)(ee.Fragment,{children:(0,ee.jsx)(ff,{title:"Expand",children:(0,ee.jsx)(gu,{className:"size-5"})})}):(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(hu,{className:"size-5"})," Collapse"]})})]})};vf.displayName="Sidebar.Footer";const bf=({children:e,className:t})=>(0,ee.jsx)("div",{className:qe("w-full",t),children:e});bf.displayName="Sidebar.Item";const Mf=Object.assign(hf,{Header:yf,Body:xf,Footer:vf,Item:bf}),wf=st("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Nf=(0,r.createContext)({}),Ef=()=>(0,r.useContext)(Nf),jf=({size:e="md",children:t,className:n})=>(0,ee.jsx)(Nf.Provider,{value:{size:e},children:(0,ee.jsx)("div",{className:qe("flex flex-col bg-background-primary p-2",n),children:t})});jf.displayName="Menu";const Df=({heading:e,arrow:t=!1,showArrowOnHover:n=!1,open:o=!0,onClick:i,children:a,className:s})=>{const[l,c]=(0,r.useState)(o),[u,d]=(0,r.useState)(!1),{size:p}=Ef(),m={sm:"text-xs",md:"text-sm"}[p??"md"],f={sm:"size-4",md:"size-5"}[p??"md"],g=()=>{c(!l),i&&i(!l)};return(0,ee.jsxs)("div",{children:[!!e&&(0,ee.jsxs)("div",{role:"button",tabIndex:0,onClick:g,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&g()},onMouseEnter:()=>n&&d(!0),onMouseLeave:()=>n&&d(!1),className:qe("text-text-primary bg-transparent cursor-pointer flex justify-between items-center gap-1",m,e?"p-1":"p-0",s),"aria-expanded":l,children:[(0,ee.jsx)("span",{className:"text-text-tertiary",children:e}),t&&(0,ee.jsx)(Gc.span,{className:"flex items-center text-border-strong",initial:"hidden",animate:n?l||u?"visible":"hidden":"visible",exit:"hidden",variants:{visible:{opacity:1},hidden:{opacity:0}},transition:{duration:.15},children:(0,ee.jsx)(Gc.span,{className:"inline-flex p-1",variants:{open:{rotate:180},closed:{rotate:0}},animate:l?"open":"closed",transition:{duration:.15},children:(0,ee.jsx)(wf,{className:qe("shrink-0",f)})})})]}),(0,ee.jsx)(jn,{initial:!1,children:l&&(0,ee.jsx)(Gc.ul,{role:"menu",variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:"overflow flex gap-0.5 flex-col m-0 bg-white rounded p-0",children:a})})]})};Df.displayName="Menu.List";const Tf=({disabled:e=!1,active:t,onClick:n,children:r,className:o,...i})=>{const{size:a}=Ef(),s={sm:"[&>svg]:size-4 [&>svg]:m-1 [&>*:not(svg)]:mx-1 [&>*:not(svg)]:my-0.5 text-sm",md:"[&>svg]:size-5 [&>svg]:m-1.5 [&>*:not(svg)]:m-1 text-base"}[a??"md"];return(0,ee.jsx)("li",{role:"menuitem",tabIndex:e?-1:0,onClick:e?void 0:n,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&n?.()},className:qe("flex p-1 gap-1 items-center bg-transparent border-none rounded text-text-secondary cursor-pointer m-0",s,"hover:bg-background-secondary hover:text-text-primary",e?"text-text-disabled hover:text-text-disabled cursor-not-allowed hover:bg-transparent":"",t?"text-icon-primary [&>svg]:text-icon-interactive bg-background-secondary":"","transition-colors duration-300 ease-in-out",o),"aria-disabled":e,...i,children:r})};Tf.displayName="Menu.Item";const If=({variant:e="solid",className:t})=>{const n={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",double:"border-double",hidden:"border-hidden",none:"border-none"}[e];return(0,ee.jsx)("li",{className:"m-0 p-0 list-none",role:"separator","aria-hidden":"true",children:(0,ee.jsx)("hr",{className:qe("w-full border-0 border-t border-border-subtle",n,t)})})};If.displayName="Menu.Separator",jf.List=Df,jf.Item=Tf,jf.Separator=If;var kf=o(8527);const Of=window.lodash,_f=window.wp.components;function Cf({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))}const Af=r.forwardRef(Cf);function Sf({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const Lf=r.forwardRef(Sf),zf=e=>e.split(/[\[\]]/).filter(Boolean),Pf=(e,t)=>t.reduce((e,t)=>e?.[t],e),Rf=(e,t,n)=>{const r={...e};let o=r;for(let e=0;e<t.length-1;e++)o[t[e]]&&"object"==typeof o[t[e]]?o[t[e]]={...o[t[e]]}:o[t[e]]={},o=o[t[e]];return o[t[t.length-1]]=n,r},Yf=function(e){const{name:t,defaultColor:n}=e,[o,i]=K(),a=zf(t),s=Pf(o,a),[l,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(s),p=window.powerCouponsSettings?.theme_colors?.map(e=>({name:e,color:e})),[m,f]=(0,r.useState)(!1),g=(0,r.useRef)((0,Of.debounce)(async e=>{i(e)},500)).current;(0,r.useEffect)(()=>()=>{g.cancel()},[g]),(0,r.useEffect)(()=>{const e=e=>{l&&"Escape"===e.key&&v()};return l&&document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[l]);const h=(0,kf.Ay)({default:{color:{width:"36px",height:"30px",background:u}}}),y=`colorpicker-${t.replace(/[\[\]]/g,"-")}`,x=()=>{c(e=>!e)},v=()=>{c(!1)},b=()=>{u!==n&&(M(n),f(!0),setTimeout(()=>{f(!1)},500))},M=t=>{const r=t||n;t&&d(t);const i=new CustomEvent("powercoupons:color:change",{bubbles:!0,detail:{e:"color",name:e.name,value:r}});if(document.dispatchEvent(i),Pf(o,a)!==r){const e=Rf(o,a,r);g({type:"CHANGE",data:e})}},w=(e=>{const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e),n=t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null;return n&&Math.round((299*n.r+587*n.g+114*n.b)/1e3)>125?"text-black":"text-white"})(u);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"power_coupons-field-data-content"},(0,r.createElement)("div",{className:"power_coupons-colorpicker-selector sm:justify-end"},(0,r.createElement)("div",{className:"power_coupons-colorpicker-swatch-wrap focus-visible:ring-1 focus-visible:ring-toggle-on",onClick:x,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),x())},role:"button",tabIndex:"0","aria-haspopup":"true","aria-expanded":l,"aria-controls":y,id:`${y}-trigger`},(0,r.createElement)("span",{className:"power_coupons-colorpicker-swatch flex justify-center items-center",style:h.color,"aria-hidden":"true"},window.powerCouponsSettings?.theme_colors?.includes(u)&&(0,r.createElement)(Af,{className:`h-5 w-5 ${w}`})),(0,r.createElement)("span",{className:"power_coupons-colorpicker-label"},(0,Xc.__)("Select Color","power-coupons")),(0,r.createElement)("input",{type:"hidden",name:t,value:u,"aria-labelledby":`${y}-trigger`})),(0,r.createElement)("span",{className:"power_coupons-colorpicker-reset focus-visible:ring-1 "+(u===n?"opacity-40":""),onClick:b,onKeyDown:e=>"Enter"===e.key&&b(),title:(0,Xc.__)("Reset","power-coupons"),"aria-label":(0,Xc.__)("Reset to default color","power-coupons"),type:"button",tabIndex:"0"},(0,r.createElement)(Lf,{className:`h-5 w-5 stroke-2 transform ${m?"rotate-180":""} transition-transform duration-500`,"aria-hidden":"true"}))),(0,r.createElement)("div",{className:"power_coupons-color-picker"},l?(0,r.createElement)("div",{className:"power_coupons-color-picker-popover",id:y},(0,r.createElement)("div",{className:"power_coupons-color-picker-cover",onClick:v}),(0,r.createElement)("div",{className:"bg-white shadow-lg relative z-999999"},(0,r.createElement)(_f.ColorPicker,{color:u,onChange:M,enableAlpha:!0}),(0,r.createElement)("div",{className:"px-4 pb-4"},(0,r.createElement)(_f.ColorPalette,{colors:p,value:u,onChange:M,disableCustomColors:!0,clearable:!1})))):null)))};var Qf=o(442);const Ff=Qf.default||Qf,Uf=window.wp.element,Bf=function(e){const{children:t,title:n,description:o,badge:i,content:a,type:s="inline",disabled:l=!1}=e,c=(0,Uf.useId)();return(0,r.createElement)("section",{className:`flex ${"block"===s?"flex-col":"flex-col sm:flex-row"} py-6 justify-between gap-2 lg:gap-5 border-0 border-b border-solid border-border-subtle last:border-b-0${l?" opacity-50 pointer-events-none":""}`,"aria-labelledby":n?`${c}-title`:void 0},(n||o)&&(0,r.createElement)("div",{className:"block"===s?"w-full":"w-full sm:w-[70%]"},n&&(0,r.createElement)(ut,{className:"font-medium mb-1",htmlFor:c,size:"md",id:`${c}-title`,as:"h3"},n),o&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("p",{className:"font-normal text-sm text-text-field-helper m-0",id:`${c}-description`,"aria-hidden":"true"},Ff(o)),i&&(0,r.createElement)("span",{className:"inline-flex items-center mt-1 px-2.5 py-1 rounded-md text-xs font-medium bg-wpcolorfaded !text-wpcolor",role:"status","aria-label":`Status: ${i}`},i))),a&&(0,r.createElement)("div",{className:"pr-16 pb-8 w-full",role:"group","aria-labelledby":n?`${c}-title`:"","aria-describedby":o?`${c}-description`:""},t),!a&&t)},Wf="undefined"!=typeof document?r.useLayoutEffect:()=>{};var Vf;const Hf=null!==(Vf=r.useInsertionEffect)&&void 0!==Vf?Vf:Wf;function Gf(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function $f(e){let t=(0,r.useRef)({isFocused:!1,observer:null});Wf(()=>{const e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let n=function(e){const t=(0,r.useRef)(null);return Hf(()=>{t.current=e},[e]),(0,r.useCallback)((...e)=>{const n=t.current;return null==n?void 0:n(...e)},[])}(t=>{null==e||e(t)});return(0,r.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,o=e=>{if(t.current.isFocused=!1,r.disabled){let t=Gf(e);n(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};r.addEventListener("focusout",o,{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 Zf(e){var t;if("undefined"==typeof window||null==window.navigator)return!1;let n=null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.brands;return Array.isArray(n)&&n.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function qf(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 Xf(e){let t=null;return()=>(null==t&&(t=e()),t)}const Jf=Xf(function(){return qf(/^Mac/i)}),Kf=Xf(function(){return qf(/^iPhone/i)}),eg=Xf(function(){return qf(/^iPad/i)||Jf()&&navigator.maxTouchPoints>1}),tg=Xf(function(){return Kf()||eg()}),ng=(Xf(function(){return Jf()||tg()}),Xf(function(){return Zf(/AppleWebKit/i)&&!ng()}),Xf(function(){return Zf(/Chrome/i)})),rg=Xf(function(){return Zf(/Android/i)});Xf(function(){return Zf(/Firefox/i)});const og=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},ig=e=>e&&"window"in e&&e.window===e?e:og(e).defaultView||window;let ag=null,sg=new Set,lg=new Map,cg=!1,ug=!1;const dg={Tab:!0,Escape:!0};function pg(e,t){for(let n of sg)n(e,t)}function mg(e){cg=!0,function(e){return!(e.metaKey||!Jf()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(ag="keyboard",pg("keyboard",e))}function fg(e){ag="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(cg=!0,pg("pointer",e))}function gg(e){var t;(""===(t=e).pointerType&&t.isTrusted||(rg()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType))&&(cg=!0,ag="virtual")}function hg(e){e.target!==window&&e.target!==document&&e.isTrusted&&(cg||ug||(ag="virtual",pg("virtual",e)),cg=!1,ug=!1)}function yg(){cg=!1,ug=!0}function xg(e){if("undefined"==typeof window||"undefined"==typeof document||lg.get(ig(e)))return;const t=ig(e),n=og(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){cg=!0,r.apply(this,arguments)},n.addEventListener("keydown",mg,!0),n.addEventListener("keyup",mg,!0),n.addEventListener("click",gg,!0),t.addEventListener("focus",hg,!0),t.addEventListener("blur",yg,!1),"undefined"!=typeof PointerEvent&&(n.addEventListener("pointerdown",fg,!0),n.addEventListener("pointermove",fg,!0),n.addEventListener("pointerup",fg,!0)),t.addEventListener("beforeunload",()=>{vg(e)},{once:!0}),lg.set(t,{focus:r})}const vg=(e,t)=>{const n=ig(e),r=og(e);t&&r.removeEventListener("DOMContentLoaded",t),lg.has(n)&&(n.HTMLElement.prototype.focus=lg.get(n).focus,r.removeEventListener("keydown",mg,!0),r.removeEventListener("keyup",mg,!0),r.removeEventListener("click",gg,!0),n.removeEventListener("focus",hg,!0),n.removeEventListener("blur",yg,!1),"undefined"!=typeof PointerEvent&&(r.removeEventListener("pointerdown",fg,!0),r.removeEventListener("pointermove",fg,!0),r.removeEventListener("pointerup",fg,!0)),lg.delete(n))};function bg(){return"pointer"!==ag}"undefined"!=typeof document&&function(e){const t=og(e);let n;"loading"!==t.readyState?xg(e):(n=()=>{xg(e)},t.addEventListener("DOMContentLoaded",n))}();const Mg=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function wg(e,t){return!(!t||!e)&&e.contains(t)}const Ng=(e=document)=>e.activeElement;function Eg(e){return e.target}function jg(){let e=(0,r.useRef)(new Map),t=(0,r.useCallback)((t,n,r,o)=>{let i=(null==o?void 0:o.once)?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:i,options:o}),t.addEventListener(n,i,o)},[]),n=(0,r.useCallback)((t,n,r,o)=>{var i;let a=(null===(i=e.current.get(r))||void 0===i?void 0:i.fn)||r;t.removeEventListener(n,a,o),e.current.delete(r)},[]),o=(0,r.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,r.useEffect)(()=>o,[o]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:o}}function Dg(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:o,onFocusWithinChange:i}=e,a=(0,r.useRef)({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:l}=jg(),c=(0,r.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,l(),n&&n(e),i&&i(!1))},[n,i,a,l]),u=$f(c),d=(0,r.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;const t=og(e.target),n=Ng(t);if(!a.current.isFocusWithin&&n===Eg(e.nativeEvent)){o&&o(e),i&&i(!0),a.current.isFocusWithin=!0,u(e);let n=e.currentTarget;s(t,"focus",e=>{if(a.current.isFocusWithin&&!wg(n,e.target)){let r=new t.defaultView.FocusEvent("blur",{relatedTarget:e.target});!function(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}(r,n);let o=Gf(r);c(o)}},{capture:!0})}},[o,i,u,s,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:d,onBlur:c}}}function Tg(e={}){let{autoFocus:t=!1,isTextInput:n,within:o}=e,i=(0,r.useRef)({isFocused:!1,isFocusVisible:t||bg()}),[a,s]=(0,r.useState)(!1),[l,c]=(0,r.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),u=(0,r.useCallback)(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),d=(0,r.useCallback)(e=>{i.current.isFocused=e,s(e),u()},[u]);var p,m,f;p=e=>{i.current.isFocusVisible=e,u()},m=[],f={isTextInput:n},xg(),(0,r.useEffect)(()=>{let e=(e,t)=>{(function(e,t,n){let r=og(null==n?void 0:n.target);const o="undefined"!=typeof window?ig(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,i="undefined"!=typeof window?ig(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a="undefined"!=typeof window?ig(null==n?void 0:n.target).HTMLElement:HTMLElement,s="undefined"!=typeof window?ig(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||r.activeElement instanceof o&&!Mg.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof a&&r.activeElement.isContentEditable)&&"keyboard"===t&&n instanceof s&&!dg[n.key])})(!!(null==f?void 0:f.isTextInput),e,t)&&p(bg())};return sg.add(e),()=>{sg.delete(e)}},m);let{focusProps:g}=function(e){let{isDisabled:t,onFocus:n,onBlur:o,onFocusChange:i}=e;const a=(0,r.useCallback)(e=>{if(e.target===e.currentTarget)return o&&o(e),i&&i(!1),!0},[o,i]),s=$f(a),l=(0,r.useCallback)(e=>{const t=og(e.target),r=t?Ng(t):Ng();e.target===e.currentTarget&&r===Eg(e.nativeEvent)&&(n&&n(e),i&&i(!0),s(e))},[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||o)?l:void 0,onBlur:t||!o&&!i?void 0:a}}}({isDisabled:o,onFocusChange:d}),{focusWithinProps:h}=Dg({isDisabled:!o,onFocusWithinChange:d});return{isFocused:a,isFocusVisible:l,focusProps:o?h:g}}let Ig=!1,kg=0;function Og(e){"touch"===e.pointerType&&(Ig=!0,setTimeout(()=>{Ig=!1},50))}function _g(){if("undefined"!=typeof document)return 0===kg&&"undefined"!=typeof PointerEvent&&document.addEventListener("pointerup",Og),kg++,()=>{kg--,kg>0||"undefined"!=typeof PointerEvent&&document.removeEventListener("pointerup",Og)}}var Cg=Object.defineProperty,Ag=(e,t,n)=>(((e,t,n)=>{t in e?Cg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let Sg=new class{constructor(){Ag(this,"current",this.detect()),Ag(this,"handoffState","pending"),Ag(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}};function Lg(e){var t;return Sg.isServer?null:null==e?document:null!=(t=null==e?void 0:e.ownerDocument)?t:document}function zg(e){var t,n;return Sg.isServer?null:null==e?document:null!=(n=null==(t=null==e?void 0:e.getRootNode)?void 0:t.call(e))?n:document}function Pg(e){var t,n;return null!=(n=null==(t=zg(e))?void 0:t.activeElement)?n:null}function Rg(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function Yg(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add(()=>e.removeEventListener(n,r,o))),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 Rg(()=>{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=Yg();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 Qg(){let[e]=(0,r.useState)(Yg);return(0,r.useEffect)(()=>()=>e.dispose(),[e]),e}let Fg=(e,t)=>{Sg.isServer?(0,r.useEffect)(e,t):(0,r.useLayoutEffect)(e,t)};function Ug(e){let t=(0,r.useRef)(e);return Fg(()=>{t.current=e},[e]),t}let Bg=function(e){let t=Ug(e);return r.useCallback((...e)=>t.current(...e),[t])};function Wg(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 Vg(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function Hg(e,t,n=!1){let[o,i]=(0,r.useState)(()=>Vg(t));return Fg(()=>{if(!t||!e)return;let n=Yg();return n.requestAnimationFrame(function e(){n.requestAnimationFrame(e),i(e=>{let n=Vg(t);return n.width===e.width&&n.height===e.height?e:n})}),()=>{n.dispose()}},[t,e]),n?{width:`${o.width}px`,height:`${o.height}px`}:o}var Gg=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Gg||{});function $g(e){return"object"==typeof e&&null!==e&&"nodeType"in e}function Zg(e){return $g(e)&&"tagName"in e}function qg(e){return Zg(e)&&"accessKey"in e}function Xg(e){return Zg(e)&&"tabIndex"in e}function Jg(e){return Zg(e)&&"style"in e}function Kg(e){return qg(e)&&"INPUT"===e.nodeName}function eh(e){return qg(e)&&"LABEL"===e.nodeName}function th(e){return qg(e)&&"FIELDSET"===e.nodeName}function nh(e){return qg(e)&&"LEGEND"===e.nodeName}function rh(e){return!!Zg(e)&&e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]')}function oh(e){let t=e.parentElement,n=null;for(;t&&!th(t);)nh(t)&&(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(nh(t))return!1;t=t.previousElementSibling}return!0}(n))&&r}class ih 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}}var ah,sh,lh,ch=Object.defineProperty,uh=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},dh=(e,t,n)=>(uh(e,t,"read from private field"),n?n.call(e):t.get(e)),ph=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},mh=(e,t,n,r)=>(uh(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);class fh{constructor(e){ph(this,ah,{}),ph(this,sh,new ih(()=>new Set)),ph(this,lh,new Set),((e,t,n)=>{((e,t,n)=>{t in e?ch(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n)})(this,"disposables",Yg()),mh(this,ah,e),Sg.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return dh(this,ah)}subscribe(e,t){if(Sg.isServer)return()=>{};let n={selector:e,callback:t,current:e(dh(this,ah))};return dh(this,lh).add(n),this.disposables.add(()=>{dh(this,lh).delete(n)})}on(e,t){return Sg.isServer?()=>{}:(dh(this,sh).get(e).add(t),this.disposables.add(()=>{dh(this,sh).get(e).delete(t)}))}send(e){let t=this.reduce(dh(this,ah),e);if(t!==dh(this,ah)){mh(this,ah,t);for(let e of dh(this,lh)){let t=e.selector(dh(this,ah));gh(e.current,t)||(e.current=t,e.callback(t))}for(let t of dh(this,sh).get(e.type))t(dh(this,ah),e)}}}function gh(e,t){return!!Object.is(e,t)||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&hh(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size&&hh(e.entries(),t.entries()):!(!yh(e)||!yh(t))&&hh(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()))}function hh(e,t){for(;;){let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}}function yh(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}function xh(e){let[t,n]=e(),r=Yg();return(...e)=>{t(...e),r.dispose(),r.microTask(n)}}function vh(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,vh),r}ah=new WeakMap,sh=new WeakMap,lh=new WeakMap;var bh=Object.defineProperty,Mh=(e,t,n)=>(((e,t,n)=>{t in e?bh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),wh=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(wh||{});let Nh={0(e,t){let n=t.id,r=e.stack,o=e.stack.indexOf(n);if(-1!==o){let t=e.stack.slice();return t.splice(o,1),t.push(n),r=t,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(-1===r)return e;let o=e.stack.slice();return o.splice(r,1),{...e,stack:o}}};class Eh extends fh{constructor(){super(...arguments),Mh(this,"actions",{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),Mh(this,"selectors",{isTop:(e,t)=>e.stack[e.stack.length-1]===t,inStack:(e,t)=>e.stack.includes(t)})}static new(){return new Eh({stack:[]})}reduce(e,t){return vh(t.type,Nh,e,t)}}const jh=new ih(()=>Eh.new());var Dh=o(8418);function Th(e,t,n=gh){return(0,Dh.useSyncExternalStoreWithSelector)(Bg(t=>e.subscribe(Ih,t)),Bg(()=>e.state),Bg(()=>e.state),Bg(t),n)}function Ih(e){return e}function kh(e,t){let n=(0,r.useId)(),o=jh.get(t),[i,a]=Th(o,(0,r.useCallback)(e=>[o.selectors.isTop(e,n),o.selectors.inStack(e,n)],[o,n]));return Fg(()=>{if(e)return o.actions.push(n),()=>o.actions.pop(n)},[o,e,n]),!!e&&(!a||i)}let Oh=new Map,_h=new Map;function Ch(e){var t;let n=null!=(t=_h.get(e))?t:0;return _h.set(e,n+1),0!==n||(Oh.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=_h.get(e))?t:1;if(1===n?_h.delete(e):_h.set(e,n-1),1!==n)return;let r=Oh.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,Oh.delete(e))}(e)}let Ah=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Sh=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Lh=(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))(Lh||{}),zh=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(zh||{}),Ph=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Ph||{});function Rh(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(Ah)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var Yh=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Yh||{});function Qh(e,t=0){var n;return e!==(null==(n=Lg(e))?void 0:n.body)&&vh(t,{0:()=>e.matches(Ah),1(){let t=e;for(;null!==t;){if(t.matches(Ah))return!0;t=t.parentElement}return!1}})}var Fh=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Fh||{});"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 Uh=["textarea","input"].join(",");function Bh(e,t=e=>e){return e.slice().sort((e,n)=>{let r=t(e),o=t(n);if(null===r||null===o)return 0;let i=r.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Wh(e,t,n=(null===e?document.body:zg(e))){return function(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?zg(e[0]):document:zg(e),a=Array.isArray(e)?n?Bh(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(Sh)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}(e):Rh(e);o.length>0&&a.length>1&&(a=a.filter(e=>!o.some(t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))),r=null!=r?r:null==i?void 0:i.activeElement;let s,l=(()=>{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,a.indexOf(r))-1;if(4&t)return Math.max(0,a.indexOf(r))+1;if(8&t)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=32&t?{preventScroll:!0}:{},d=0,p=a.length;do{if(d>=p||d+p<=0)return 0;let e=c+d;if(16&t)e=(e+p)%p;else{if(e<0)return 3;if(e>=p)return 1}s=a[e],null==s||s.focus(u),d+=l}while(s!==Pg(s));return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,Uh))&&n}(s)&&s.select(),2}(Rh(n),t,{relativeTo:e})}function Vh(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Hh(){return Vh()||/Android/gi.test(window.navigator.userAgent)}function Gh(e,t,n,o){let i=Ug(n);(0,r.useEffect)(()=>{if(e)return document.addEventListener(t,n,o),()=>document.removeEventListener(t,n,o);function n(e){i.current(e)}},[e,t,o])}function $h(e,t,n){let o=Ug(n),i=(0,r.useCallback)(function(e,n){if(e.defaultPrevented)return;let r=n(e);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let i=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of i)if(null!==t&&(t.contains(r)||e.composed&&e.composedPath().includes(t)))return;return!Qh(r,Yh.Loose)&&-1!==r.tabIndex&&e.preventDefault(),o.current(e,r)},[o,t]),a=(0,r.useRef)(null);Gh(e,"pointerdown",e=>{var t,n;Hh()||(a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),Gh(e,"pointerup",e=>{if(Hh()||!a.current)return;let t=a.current;return a.current=null,i(e,()=>t)},!0);let s=(0,r.useRef)({x:0,y:0});Gh(e,"touchstart",e=>{s.current.x=e.touches[0].clientX,s.current.y=e.touches[0].clientY},!0),Gh(e,"touchend",e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-s.current.x)>=30||Math.abs(n-s.current.y)>=30))return i(e,()=>Xg(e.target)?e.target:null)},!0),function(e,t,n,o){let a=Ug(e=>i(e,()=>function(e){return qg(e)&&"IFRAME"===e.nodeName}(window.document.activeElement)?window.document.activeElement:null));(0,r.useEffect)(()=>{if(e)return window.addEventListener(t,n,o),()=>window.removeEventListener(t,n,o);function n(e){a.current(e)}},[e,t,o])}(e,"blur",0,!0)}function Zh(...e){return(0,r.useMemo)(()=>Lg(...e),[...e])}var qh=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(qh||{});const Xh={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}};function Jh(e,t){return(0,r.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 Kh(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=null!=(n=t.defaultView)?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function ey(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let ty=function(e,t){let n=new Map,r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...o){let i=t[e].call(n,...o);i&&(n=i,r.forEach(e=>e()))}}}(0,{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:Yg(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=ey(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=ey(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta:()=>e.computedMeta},n=[Vh()?{before({doc:e,d:t,meta:n}){function r(e){for(let t of n().containers)for(let n of t())if(n.contains(e))return!0;return!1}t.microTask(()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=Yg();n.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>n.dispose()))}let o=null!=(n=window.scrollY)?n:window.pageYOffset,i=null;t.addEventListener(e,"click",t=>{if(Xg(t.target))try{let n=t.target.closest("a");if(!n)return;let{hash:o}=new URL(n.href),a=e.querySelector(o);Xg(a)&&!r(a)&&(i=a)}catch{}},!0),t.group(n=>{t.addEventListener(e,"touchstart",e=>{if(n.dispose(),Xg(e.target)&&Jg(e.target))if(r(e.target)){let t=e.target;for(;t.parentElement&&r(t.parentElement);)t=t.parentElement;n.style(t,"overscrollBehavior","contain")}else n.style(e.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",e=>{if(Xg(e.target)){if(Kg(e.target))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;o!==t&&window.scrollTo(0,o),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{},Kh(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];n.forEach(({before:e})=>null==e?void 0:e(t)),n.forEach(({after:e})=>null==e?void 0:e(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function ny(e){return(0,r.useMemo)(()=>e,Object.values(e))}ty.subscribe(()=>{let e=ty.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)&&ty.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&ty.dispatch("TEARDOWN",n)}});let ry=Symbol();function oy(...e){let t=(0,r.useRef)(e);(0,r.useEffect)(()=>{t.current=e},[e]);let n=Bg(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[ry]))?void 0:n}let iy=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ay(e){var t,n;let r=null!=(t=e.innerText)?t:"",o=e.cloneNode(!0);if(!qg(o))return r;let i=!1;for(let e of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),i=!0;let a=i?null!=(n=o.innerText)?n:"":r;return iy.test(a)&&(a=a.replace(iy,"")),a}function sy(e){return[e.screenX,e.screenY]}var ly,cy;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(ly=null==process?void 0:process.env)?void 0:ly.NODE_ENV)&&void 0===(null==(cy=null==Element?void 0:Element.prototype)?void 0:cy.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 uy=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(uy||{});function dy(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function py(e,t,n,o){let[i,a]=(0,r.useState)(n),{hasFlag:s,addFlag:l,removeFlag:c}=function(e=0){let[t,n]=(0,r.useState)(e),o=(0,r.useCallback)(e=>n(e),[]),i=(0,r.useCallback)(e=>n(t=>t|e),[]),a=(0,r.useCallback)(e=>(t&e)===e,[t]),s=(0,r.useCallback)(e=>n(t=>t&~e),[]),l=(0,r.useCallback)(e=>n(t=>t^e),[]);return{flags:t,setFlag:o,addFlag:i,hasFlag:a,removeFlag:s,toggleFlag:l}}(e&&i?3:0),u=(0,r.useRef)(!1),d=(0,r.useRef)(!1),p=Qg();return Fg(()=>{var r;if(e)return n&&a(!0),t?(null==(r=null==o?void 0:o.start)||r.call(o,n),function(e,{prepare:t,run:n,done:r,inFlight:o}){let i=Yg();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:o}),i.nextFrame(()=>{n(),i.requestAnimationFrame(()=>{i.add(function(e,t){var n,r;let o=Yg();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let a=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter(e=>e instanceof CSSTransition))?r:[];return 0===a.length?(t(),o.dispose):(Promise.allSettled(a.map(e=>e.finished)).then(()=>{i||t()}),o.dispose)}(e,r))})}),i.dispose}(t,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(n?(l(3),c(4)):(l(4),c(2)))},run(){d.current?n?(c(3),l(4)):(c(4),l(3)):n?c(1):l(1)},done(){var e;d.current&&function(e){var t,n;return(null!=(n=null==(t=e.getAnimations)?void 0:t.call(e))?n:[]).some(e=>e instanceof CSSTransition&&"finished"!==e.playState)}(t)||(u.current=!1,c(7),n||a(!1),null==(e=null==o?void 0:o.end)||e.call(o,n))}})):void(n&&l(3))},[e,n,t,p]),e?[i,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}let my=(0,r.createContext)(void 0);function fy(){return(0,r.useContext)(my)}let gy=(0,r.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});gy.displayName="FloatingContext";let hy=(0,r.createContext)(null);function yy(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=(0,r.useContext)(hy),n=(0,r.useMemo)(()=>e,[JSON.stringify(e,(e,t)=>{var n;return null!=(n=null==t?void 0:t.outerHTML)?n:t})]);Fg(()=>{null==t||t(null!=n?n:null)},[t,n]);let o=(0,r.useContext)(gy);return(0,r.useMemo)(()=>[o.setFloating,e?o.styles:{}],[o.setFloating,e,o.styles])}function xy({children:e,enabled:t=!0}){let[n,o]=(0,r.useState)(null),[i,a]=(0,r.useState)(0),s=(0,r.useRef)(null),[l,c]=(0,r.useState)(null);!function(e){Fg(()=>{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])}(l);let u=t&&null!==n&&null!==l,{to:d="bottom",gap:p=0,offset:m=0,padding:f=0,inner:g}=function(e,t){var n,r,o;let i=vy(null!=(n=null==e?void 0:e.gap)?n:"var(--anchor-gap, 0)",t),a=vy(null!=(r=null==e?void 0:e.offset)?r:"var(--anchor-offset, 0)",t),s=vy(null!=(o=null==e?void 0:e.padding)?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:a,padding:s}}(n,l),[h,y="center"]=d.split(" ");Fg(()=>{u&&a(0)},[u]);let{refs:x,floatingStyles:v,context:b}=Zm({open:u,placement:"selection"===h?"center"===y?"bottom":`bottom-${y}`:"center"===y?`${h}`:`${h}-${y}`,strategy:"absolute",transform:!1,middleware:[Dp({mainAxis:"selection"===h?0:p,crossAxis:m}),Tp({padding:f}),"selection"!==h&&Ip({padding:f}),"selection"===h&&g?(N={...g,padding:f,overflowRef:s,offset:i,minItemsVisible:4,referenceOverflowThreshold:f,onFallbackChange(e){var t,n;if(!e)return;let r=b.elements.floating;if(!r)return;let o=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,i=Math.min(4,r.childElementCount),s=0,l=0;for(let e of null!=(n=null==(t=b.elements.floating)?void 0:t.childNodes)?n:[])if(qg(e)){let t=e.offsetTop,n=t+e.clientHeight+o,a=r.scrollTop,c=a+r.clientHeight;if(!(t>=a&&n<=c)){l=Math.max(0,Math.min(n,c)-Math.max(t,a)),s=e.clientHeight;break}i--}i>=1&&a(e=>{let t=s*i-l+o;return e>=t?e:t})}},{name:"inner",options:N,async fn(e){const{listRef:t,overflowRef:n,onFallbackChange:r,offset:o=0,index:i=0,minItemsVisible:a=4,referenceOverflowThreshold:s=0,scrollRef:l,...c}=fd(N,e),{rects:u,elements:{floating:d}}=e,p=t.current[i],m=(null==l?void 0:l.current)||d,f=d.clientTop||m.clientTop,g=0!==d.clientTop,h=0!==m.clientTop,y=d===m;if(!p)return{};const x={...e,...await Dp(-p.offsetTop-d.clientTop-u.reference.height/2-p.offsetHeight/2-o).fn(e)},v=await mp(df(x,m.scrollHeight+f+d.clientTop),c),b=await mp(x,{...c,elementContext:"reference"}),M=sd(0,v.top),w=x.y+M,E=m.scrollHeight>m.clientHeight?e=>e:ld,j=E(sd(0,m.scrollHeight+(g&&y||h?2*f:0)-M-sd(0,v.bottom)));if(m.style.maxHeight=j+"px",m.scrollTop=M,r){const e=m.offsetHeight<p.offsetHeight*ad(a,t.current.length)-1||b.top>=-s||b.bottom>=-s;dn.flushSync(()=>r(e))}return n&&(n.current=await mp(df({...x,y:w},m.offsetHeight+f+d.clientTop),c)),{y:w}}}):null,kp({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:pp}),[M=h,w=y]=b.placement.split("-");var N;"selection"===h&&(M="selection");let E=(0,r.useMemo)(()=>({anchor:[M,w].filter(Boolean).join(" ")}),[M,w]),j=function(e,t){const{open:n,elements:o}=e,{enabled:i=!0,overflowRef:a,scrollRef:s,onChange:l}=t,c=Cp(l),u=r.useRef(!1),d=r.useRef(null),p=r.useRef(null);r.useEffect(()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==a.current)return;const n=e.deltaY,r=a.current.top>=-.5,o=a.current.bottom>=-.5,i=t.scrollHeight-t.clientHeight,s=n<0?-1:1,l=n<0?"max":"min";t.scrollHeight<=t.clientHeight||(!r&&n>0||!o&&n<0?(e.preventDefault(),dn.flushSync(()=>{c(e=>e+Math[l](n,i*s))})):/firefox/i.test(Gu())&&(t.scrollTop+=n))}const t=(null==s?void 0:s.current)||o.floating;return n&&t?(t.addEventListener("wheel",e),requestAnimationFrame(()=>{d.current=t.scrollTop,null!=a.current&&(p.current={...a.current})}),()=>{d.current=null,p.current=null,t.removeEventListener("wheel",e)}):void 0},[i,n,o.floating,a,s,c]);const m=r.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const e=(null==s?void 0:s.current)||o.floating;if(a.current&&e&&u.current){if(null!==d.current){const t=e.scrollTop-d.current;(a.current.bottom<-.5&&t<-1||a.current.top<-.5&&t>1)&&dn.flushSync(()=>c(e=>e+t))}requestAnimationFrame(()=>{d.current=e.scrollTop})}}}),[o.floating,c,a,s]);return r.useMemo(()=>i?{floating:m}:{},[i,m])}(b,{overflowRef:s,onChange:a}),{getReferenceProps:D,getFloatingProps:T}=Km([j]),I=Bg(e=>{c(e),x.setFloating(e)});return r.createElement(hy.Provider,{value:o},r.createElement(gy.Provider,{value:{setFloating:I,setReference:x.setReference,styles:v,getReferenceProps:D,getFloatingProps:T,slot:E}},e))}function vy(e,t,n=void 0){let o=Qg(),i=Bg((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 r=My(e,t);return[r,n=>{let i=by(e);{let a=i.map(e=>window.getComputedStyle(t).getPropertyValue(e));o.requestAnimationFrame(function s(){o.nextFrame(s);let l=!1;for(let[e,n]of i.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(a[e]!==r){a[e]=r,l=!0;break}}if(!l)return;let c=My(e,t);r!==c&&(n(c),r=c)})}return o.dispose}]}return[n,null]}),a=(0,r.useMemo)(()=>i(e,t)[0],[e,t]),[s=a,l]=(0,r.useState)();return Fg(()=>{let[n,r]=i(e,t);if(l(n),r)return r(l)},[e,t]),s}function by(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,...by(r)]:[n]}return[]}function My(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}function wy(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))Ey(n,Ny(t,r),o);return n}function Ny(e,t){return e?e+"["+t+"]":t}function Ey(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())Ey(e,Ny(t,r.toString()),o);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,""]):function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}(n)&&!(0,r.isValidElement)(n)&&wy(n,t,e)}function jy(...e){return Array.from(new Set(e.flatMap(e=>"string"==typeof e?e.split(" "):[]))).filter(Boolean).join(" ")}hy.displayName="PlacementContext";var Dy,Ty=((Dy=Ty||{})[Dy.None=0]="None",Dy[Dy.RenderStrategy=1]="RenderStrategy",Dy[Dy.Static=2]="Static",Dy),Iy=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Iy||{});function ky(){let e=function(){let e=(0,r.useRef)([]),t=(0,r.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,r.useCallback)(t=>function({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:a,mergeRefs:s}){s=null!=s?s:_y;let l=Cy(t,e);if(i)return Oy(l,n,r,a,s);let c=null!=o?o:0;if(2&c){let{static:e=!1,...t}=l;if(e)return Oy(t,n,r,a,s)}if(1&c){let{unmount:e=!0,...t}=l;return vh(e?0:1,{0:()=>null,1:()=>Oy({...t,hidden:!0,style:{display:"none"}},n,r,a,s)})}return Oy(l,n,r,a,s)}({mergeRefs:e,...t}),[e])}function Oy(e,t={},n,o,i){let{as:a=n,children:s,refName:l="ref",...c}=zy(e,["unmount","static"]),u=void 0!==e.ref?{[l]:e.ref}:{},d="function"==typeof s?s(t):s;"className"in c&&c.className&&"function"==typeof c.className&&(c.className=c.className(t)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let p={};if(t){let e=!1,n=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&n.push(r.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`));if(e){p["data-headlessui-state"]=n.join(" ");for(let e of n)p[`data-${e}`]=""}}if(Ry(a)&&(Object.keys(Ly(c)).length>0||Object.keys(Ly(p)).length>0)){if(!(!(0,r.isValidElement)(d)||Array.isArray(d)&&d.length>1||function(e){return Ry(e.type)}(d))){let e=d.props,t=null==e?void 0:e.className,n="function"==typeof t?(...e)=>jy(t(...e),c.className):jy(t,c.className),o=n?{className:n}:{},a=Cy(d.props,Ly(zy(c,["ref"])));for(let e in p)e in a&&delete p[e];return(0,r.cloneElement)(d,Object.assign({},a,p,u,{ref:i(Py(d),u.ref)},o))}if(Object.keys(Ly(c)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${o} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Ly(c)).concat(Object.keys(Ly(p))).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,r.createElement)(a,Object.assign({},zy(c,["ref"]),!Ry(a)&&u,!Ry(a)&&p),d)}function _y(...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 Cy(...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 o=n[e];for(let e of o){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function Ay(...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 Sy(e){var t;return Object.assign((0,r.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Ly(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function zy(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function Py(e){return r.version.split(".")[0]>="19"?e.props.ref:e.ref}function Ry(e){return e===r.Fragment||e===Symbol.for("react.fragment")}var Yy=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Yy||{});let Qy=Sy(function(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":!(2&~r)||(null!=(n=o["aria-hidden"])?n:void 0),hidden:!(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&~r)&&!!(2&~r)&&{display:"none"}}};return ky()({ourProps:i,theirProps:o,slot:{},defaultTag:"span",name:"Hidden"})}),Fy=(0,r.createContext)(null);function Uy({children:e}){let t=(0,r.useContext)(Fy);if(!t)return r.createElement(r.Fragment,null,e);let{target:n}=t;return n?(0,dn.createPortal)(r.createElement(r.Fragment,null,e),n):null}function By({data:e,form:t,disabled:n,onReset:o,overrides:i}){let[a,s]=(0,r.useState)(null),l=Qg();return(0,r.useEffect)(()=>{if(o&&a)return l.addEventListener(a,"reset",o)},[a,t,o]),r.createElement(Uy,null,r.createElement(Wy,{setForm:s,formId:t}),wy(e).map(([e,o])=>r.createElement(Qy,{features:Yy.Hidden,...Ly({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:e,value:o,...i})})))}function Wy({setForm:e,formId:t}){return(0,r.useEffect)(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:r.createElement(Qy,{features:Yy.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest("form");n&&e(n)}})}function Vy(e,t){let[n,o]=(0,r.useState)(t);return!e&&n!==t&&o(t),e?n:t}r.forwardRef(function({children:e,freeze:t},n){let o=Vy(t,e);return(0,r.isValidElement)(o)?(0,r.cloneElement)(o,{ref:n}):r.createElement(r.Fragment,null,o)});let Hy=(0,r.createContext)(void 0);function Gy(){return(0,r.useContext)(Hy)}let $y=(0,r.createContext)(null);$y.displayName="OpenClosedContext";var Zy=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Zy||{});function qy(){return(0,r.useContext)($y)}function Xy({value:e,children:t}){return r.createElement($y.Provider,{value:e},t)}var Jy=(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))(Jy||{});function Ky(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=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===o&&(o=n.length);for(let e=o-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=o+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 ex=(0,r.createContext)(null);function tx(){let e=(0,r.useContext)(ex);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,tx),e}return e}ex.displayName="DescriptionContext";let nx=Sy(function(e,t){let n=(0,r.useId)(),o=fy(),{id:i=`headlessui-description-${n}`,...a}=e,s=tx(),l=oy(t);Fg(()=>s.register(i),[i,s.register]);let c=ny({...s.slot,disabled:o||!1}),u={ref:l,...s.props,id:i};return ky()({ourProps:u,theirProps:a,slot:c,defaultTag:"p",name:s.name||"Description"})});Object.assign(nx,{});var rx=(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))(rx||{});let ox=(0,r.createContext)(null);function ix(){let e=(0,r.useContext)(ox);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,ix),e}return e}function ax(e){var t,n,o;let i=null!=(n=null==(t=(0,r.useContext)(ox))?void 0:t.value)?n:void 0;return(null!=(o=null==e?void 0:e.length)?o:0)>0?[i,...e].filter(Boolean).join(" "):i}ox.displayName="LabelContext";let sx=Sy(function(e,t){var n;let o=(0,r.useId)(),i=ix(),a=Gy(),s=fy(),{id:l=`headlessui-label-${o}`,htmlFor:c=(null!=a?a:null==(n=i.props)?void 0:n.htmlFor),passive:u=!1,...d}=e,p=oy(t);Fg(()=>i.register(l),[l,i.register]);let m=Bg(e=>{let t=e.currentTarget;if((e.target===e.currentTarget||!rh(e.target))&&(eh(t)&&e.preventDefault(),i.props&&"onClick"in i.props&&"function"==typeof i.props.onClick&&i.props.onClick(e),eh(t))){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;(Kg(e)&&("file"===e.type||"radio"===e.type||"checkbox"===e.type)||"radio"===e.role||"checkbox"===e.role||"switch"===e.role)&&e.click(),e.focus({preventScroll:!0})}}}),f=ny({...i.slot,disabled:s||!1}),g={ref:p,...i.props,id:l,htmlFor:c,onClick:m};return u&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in d&&delete d.onClick),ky()({ourProps:g,theirProps:d,slot:f,defaultTag:c?"label":"div",name:i.name||"Label"})}),lx=Object.assign(sx,{});function cx(e){let t=Bg(e),n=(0,r.useRef)(!1);(0,r.useEffect)(()=>(n.current=!1,()=>{n.current=!0,Rg(()=>{n.current&&t()})}),[t])}let ux=(0,r.createContext)(!1);let dx=r.Fragment,px=Sy(function(e,t){let{ownerDocument:n=null,...o}=e,i=(0,r.useRef)(null),a=oy(function(e,t=!0){return Object.assign(e,{[ry]:t})}(e=>{i.current=e}),t),s=Zh(i.current),l=function(e){let t=(0,r.useContext)(ux),n=(0,r.useContext)(fx),[o,i]=(0,r.useState)(()=>{var r;if(!t&&null!==n)return null!=(r=n.current)?r:null;if(Sg.isServer)return null;let o=null==e?void 0:e.getElementById("headlessui-portal-root");if(o)return o;if(null===e)return null;let i=e.createElement("div");return i.setAttribute("id","headlessui-portal-root"),e.body.appendChild(i)});return(0,r.useEffect)(()=>{null!==o&&(null!=e&&e.body.contains(o)||null==e||e.body.appendChild(o))},[o,e]),(0,r.useEffect)(()=>{t||null!==n&&i(n.current)},[n,i,t]),o}(null!=n?n:s),c=(0,r.useContext)(gx),u=Qg(),d=ky();return cx(()=>{var e;l&&l.childNodes.length<=0&&(null==(e=l.parentElement)||e.removeChild(l))}),l?(0,dn.createPortal)(r.createElement("div",{"data-headlessui-portal":"",ref:e=>{u.dispose(),c&&e&&u.add(c.register(e))}},d({ourProps:{ref:a},theirProps:o,slot:{},defaultTag:dx,name:"Portal"})),l):null}),mx=r.Fragment,fx=(0,r.createContext)(null),gx=(0,r.createContext)(null),hx=Sy(function(e,t){let n=oy(t),{enabled:o=!0,ownerDocument:i,...a}=e,s=ky();return o?r.createElement(px,{...a,ownerDocument:i,ref:n}):s({ourProps:{ref:n},theirProps:a,slot:{},defaultTag:dx,name:"Portal"})}),yx=Sy(function(e,t){let{target:n,...o}=e,i={ref:oy(t)},a=ky();return r.createElement(fx.Provider,{value:n},a({ourProps:i,theirProps:o,defaultTag:mx,name:"Popover.Group"}))}),xx=Object.assign(hx,{Group:yx});const vx={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function bx(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}var Mx=Object.defineProperty,wx=(e,t,n)=>(((e,t,n)=>{t in e?Mx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),Nx=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Nx||{}),Ex=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ex||{}),jx=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(jx||{}),Dx=(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.SelectOption=5]="SelectOption",e[e.RegisterOptions=6]="RegisterOptions",e[e.UnregisterOptions=7]="UnregisterOptions",e[e.SetButtonElement=8]="SetButtonElement",e[e.SetOptionsElement=9]="SetOptionsElement",e[e.SortOptions=10]="SortOptions",e[e.MarkButtonAsMoved=11]="MarkButtonAsMoved",e))(Dx||{});function Tx(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=Bh(t(e.options.slice()),e=>e.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return-1===o&&(o=null),{options:r,activeOptionIndex:o}}let Ix={1(e){if(e.dataRef.current.disabled||1===e.listboxState)return e;let t=e.buttonElement?vx.Tracked(bx(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:Jy.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:t}},0(e,t){if(e.dataRef.current.disabled||0===e.listboxState)return e;let n=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,o=e.options.findIndex(e=>r(e.dataRef.current.value));return-1!==o&&(n=o),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1,buttonPositionState:vx.Idle}},2(e,t){var n,r,o,i,a;if(e.dataRef.current.disabled||1===e.listboxState)return e;let s={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===Jy.Nothing)return{...s,activeOptionIndex:null};if(t.focus===Jy.Specific)return{...s,activeOptionIndex:e.options.findIndex(e=>e.id===t.id)};if(t.focus===Jy.Previous){let n=e.activeOptionIndex;if(null!==n){let i=e.options[n].dataRef.current.domRef,a=Ky(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==(r=i.current)?void 0:r.previousElementSibling)===t.current||null===(null==(o=t.current)?void 0:o.previousElementSibling))return{...s,activeOptionIndex:a}}}}else if(t.focus===Jy.Next){let n=e.activeOptionIndex;if(null!==n){let r=e.options[n].dataRef.current.domRef,o=Ky(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==(i=r.current)?void 0:i.nextElementSibling)===t.current||null===(null==(a=t.current)?void 0:a.nextElementSibling))return{...s,activeOptionIndex:o}}}}let l=Tx(e),c=Ky(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...s,...l,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(),o=(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))}),i=o?e.options.indexOf(o):-1;return-1===i||i===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:i,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:e=>0===e.dataRef.current.mode?{...e,frozenValue:!0}:{...e},6:(e,t)=>{let n=e.options.concat(t.options),r=e.activeOptionIndex;if(e.pendingFocus.focus!==Jy.Nothing&&(r=Ky(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),null===e.activeOptionIndex){let{isSelected:t}=e.dataRef.current;if(t){let e=n.findIndex(e=>null==t?void 0:t(e.dataRef.current.value));-1!==e&&(r=e)}}return{...e,options:n,activeOptionIndex:r,pendingFocus:{focus:Jy.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,r=[],o=new Set(t.options);for(let[e,t]of n.entries())if(o.has(t.id)&&(r.push(e),o.delete(t.id),0===o.size))break;if(r.length>0){n=n.slice();for(let e of r.reverse())n.splice(e,1)}return{...e,options:n,activationTrigger:1}},8:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},9:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},10:e=>e.pendingShouldSort?{...e,...Tx(e),pendingShouldSort:!1}:e,11:e=>"Tracked"!==e.buttonPositionState.kind?e:{...e,buttonPositionState:vx.Moved}};class kx extends fh{constructor(e){super(e),wx(this,"actions",{onChange:e=>{let{onChange:t,compare:n,mode:r,value:o}=this.state.dataRef.current;return vh(r,{0:()=>null==t?void 0:t(e),1:()=>{let r=o.slice(),i=r.findIndex(t=>n(t,e));return-1===i?r.push(e):r.splice(i,1),null==t?void 0:t(r)}})},registerOption:xh(()=>{let e=[],t=new Set;return[(n,r)=>{t.has(r)||(t.add(r),e.push({id:n,dataRef:r}))},()=>(t.clear(),this.send({type:6,options:e.splice(0)}))]}),unregisterOption:xh(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:7,options:e.splice(0)})}]}),goToOption:xh(()=>{let e=null;return[(t,n)=>{e={type:2,...t,trigger:n}},()=>e&&this.send(e)]}),closeListbox:()=>{this.send({type:1})},openListbox:e=>{this.send({type:0,focus:e})},selectActiveOption:()=>{var e;if(null!==this.state.activeOptionIndex){let{dataRef:e}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(e.current.value)}else 0===this.state.dataRef.current.mode&&(this.actions.closeListbox(),null==(e=this.state.buttonElement)||e.focus({preventScroll:!0}))},selectOption:e=>{this.send({type:5,value:e})},search:e=>{this.send({type:3,value:e})},clearSearch:()=>{this.send({type:4})},setButtonElement:e=>{this.send({type:8,element:e})},setOptionsElement:e=>{this.send({type:9,element:e})}}),wx(this,"selectors",{activeDescendantId(e){var t;let n=e.activeOptionIndex,r=e.options;return null===n||null==(t=r[n])?void 0:t.id},isActive(e,t){var n;let r=e.activeOptionIndex,o=e.options;return null!==r&&(null==(n=o[r])?void 0:n.id)===t},hasFrozenValue:e=>e.frozenValue,shouldScrollIntoView(e,t){return!e.__demoMode&&0===e.listboxState&&0!==e.activationTrigger&&this.isActive(e,t)},didButtonMove:e=>"Moved"===e.buttonPositionState.kind}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let e=this.state.id,t=jh.get(null);this.disposables.add(t.on(wh.Push,n=>{!t.selectors.isTop(n,e)&&0===this.state.listboxState&&this.actions.closeListbox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.buttonElement&&(e.dispose(),e.add(function(e,t,n){let r=Yg();if("Tracked"===t.kind){let o=function(){i!==bx(e)&&(r.dispose(),n())},{position:i}=t,a=new ResizeObserver(o);a.observe(e),r.add(()=>a.disconnect()),r.addEventListener(window,"scroll",o,{passive:!0}),r.addEventListener(window,"resize",o)}return()=>r.dispose()}(t.buttonElement,t.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(e,t)=>{var n;this.actions.onChange(t.value),0===this.state.dataRef.current.mode&&(this.actions.closeListbox(),null==(n=this.state.buttonElement)||n.focus({preventScroll:!0}))})}static new({id:e,__demoMode:t=!1}){return new kx({id:e,dataRef:{current:{}},listboxState:t?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:Jy.Nothing},frozenValue:!1,__demoMode:t,buttonPositionState:vx.Idle})}reduce(e,t){return vh(t.type,Ix,e,t)}}const Ox=(0,r.createContext)(null);function Cx(e){let t=(0,r.useContext)(Ox);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Ax),t}return t}function Ax({id:e,__demoMode:t=!1}){let n=(0,r.useMemo)(()=>kx.new({id:e,__demoMode:t}),[]);return cx(()=>n.dispose()),n}let Sx=(0,r.createContext)(null);function Lx(e){let t=(0,r.useContext)(Sx);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Lx),t}return t}Sx.displayName="ListboxDataContext";let zx=r.Fragment,Px=(0,r.createContext)(!1),Rx=Ty.RenderStrategy|Ty.Static,Yx=r.Fragment,Qx=Sy(function(e,t){let n=(0,r.useId)(),o=fy(),{value:i,defaultValue:a,form:s,name:l,onChange:c,by:u,invalid:d=!1,disabled:p=o||!1,horizontal:m=!1,multiple:f=!1,__demoMode:g=!1,...h}=e;const y=m?"horizontal":"vertical";let x=oy(t),v=function(e){let[t]=(0,r.useState)(e);return t}(a),[b=(f?[]:void 0),M]=function(e,t,n){let[o,i]=(0,r.useState)(n),a=void 0!==e,s=(0,r.useRef)(a),l=(0,r.useRef)(!1),c=(0,r.useRef)(!1);return!a||s.current||l.current?!a&&s.current&&!c.current&&(c.current=!0,s.current=a,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.")):(l.current=!0,s.current=a,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.")),[a?e:o,Bg(e=>(a||(0,dn.flushSync)(()=>i(e)),null==t?void 0:t(e)))]}(i,c,v),w=Ax({id:n,__demoMode:g}),N=(0,r.useRef)({static:!1,hold:!1}),E=(0,r.useRef)(new Map),j=function(e=Wg){return(0,r.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])}(u),D=(0,r.useCallback)(e=>vh(T.mode,{[Ex.Multi]:()=>b.some(t=>j(t,e)),[Ex.Single]:()=>j(b,e)}),[b]),T=ny({value:b,disabled:p,invalid:d,mode:f?Ex.Multi:Ex.Single,orientation:y,onChange:M,compare:j,isSelected:D,optionsPropsRef:N,listRef:E});Fg(()=>{w.state.dataRef.current=T},[T]);let I=Th(w,e=>e.listboxState),k=jh.get(null),O=Th(k,(0,r.useCallback)(e=>k.selectors.isTop(e,n),[k,n])),[_,C]=Th(w,e=>[e.buttonElement,e.optionsElement]);$h(O,[_,C],(e,t)=>{w.send({type:Dx.CloseListbox}),Qh(t,Yh.Loose)||(e.preventDefault(),null==_||_.focus())});let A=ny({open:I===Nx.Open,disabled:p,invalid:d,value:b}),[S,L]=function({inherit:e=!1}={}){let t=ax(),[n,o]=(0,r.useState)([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,(0,r.useMemo)(()=>function(e){let t=Bg(e=>(o(t=>[...t,e]),()=>o(t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))),n=(0,r.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 r.createElement(ox.Provider,{value:n},e.children)},[o])]}({inherit:!0}),z={ref:x},P=(0,r.useCallback)(()=>{if(void 0!==v)return null==M?void 0:M(v)},[M,v]),R=ky();return r.createElement(L,{value:S,props:{htmlFor:null==_?void 0:_.id},slot:{open:I===Nx.Open,disabled:p}},r.createElement(xy,null,r.createElement(Ox.Provider,{value:w},r.createElement(Sx.Provider,{value:T},r.createElement(Xy,{value:vh(I,{[Nx.Open]:Zy.Open,[Nx.Closed]:Zy.Closed})},null!=l&&null!=b&&r.createElement(By,{disabled:p,data:{[l]:b},form:s,onReset:P}),R({ourProps:z,theirProps:h,slot:A,defaultTag:zx,name:"Listbox"}))))))}),Fx=Sy(function(e,t){let n=(0,r.useId)(),o=Gy(),i=Lx("Listbox.Button"),a=Cx("Listbox.Button"),{id:s=o||`headlessui-listbox-button-${n}`,disabled:l=i.disabled||!1,autoFocus:c=!1,...u}=e,d=oy(t,(0,r.useContext)(gy).setReference,a.actions.setButtonElement),p=(0,r.useContext)(gy).getReferenceProps,[m,f,g]=Th(a,e=>[e.listboxState,e.buttonElement,e.optionsElement]);!function(e,{trigger:t,action:n,close:o,select:i}){let a=(0,r.useRef)(null),s=(0,r.useRef)(null),l=(0,r.useRef)(null);Gh(e&&null!==t,"pointerdown",e=>{$g(null==e?void 0:e.target)&&null!=t&&t.contains(e.target)&&(s.current=e.x,l.current=e.y,a.current=e.timeStamp)}),Gh(e&&null!==t,"pointerup",e=>{var t,r;let c=a.current;if(null===c||(a.current=null,!Xg(e.target))||Math.abs(e.x-(null!=(t=s.current)?t:e.x))<5&&Math.abs(e.y-(null!=(r=l.current)?r:e.y))<5)return;let u=n(e);switch(u.kind){case 0:return;case 1:e.timeStamp-c>200&&(i(u.target),o());break;case 2:o()}},{capture:!0})}(m===Nx.Open,{trigger:f,action:(0,r.useCallback)(e=>{if(null!=f&&f.contains(e.target))return Xh.Ignore;let t=e.target.closest('[role="option"]:not([data-disabled])');return qg(t)?Xh.Select(t):null!=g&&g.contains(e.target)?Xh.Ignore:Xh.Close},[f,g]),close:a.actions.closeListbox,select:a.actions.selectActiveOption});let h=Bg(e=>{switch(e.key){case rx.Enter:!function(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)}}(e.currentTarget);break;case rx.Space:case rx.ArrowDown:e.preventDefault(),a.actions.openListbox({focus:i.value?Jy.Nothing:Jy.First});break;case rx.ArrowUp:e.preventDefault(),a.actions.openListbox({focus:i.value?Jy.Nothing:Jy.Last})}}),y=Bg(e=>{e.key===rx.Space&&e.preventDefault()}),x=function(e){let t=(0,r.useRef)(null),n=Bg(n=>{t.current=n.pointerType,!oh(n.currentTarget)&&"mouse"===n.pointerType&&n.button===Gg.Left&&(n.preventDefault(),e(n))}),o=Bg(n=>{"mouse"!==t.current&&(oh(n.currentTarget)||e(n))});return{onPointerDown:n,onClick:o}}(e=>{var t;a.state.listboxState===Nx.Open?((0,dn.flushSync)(()=>a.actions.closeListbox()),null==(t=a.state.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),a.actions.openListbox({focus:Jy.Nothing}))}),v=Bg(e=>e.preventDefault()),b=ax([s]),M=function(){var e,t;return null!=(t=null==(e=(0,r.useContext)(ex))?void 0:e.value)?t:void 0}(),{isFocusVisible:w,focusProps:N}=Tg({autoFocus:c}),{isHovered:E,hoverProps:j}=function(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:o,isDisabled:i}=e,[a,s]=(0,r.useState)(!1),l=(0,r.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,r.useEffect)(_g,[]);let{addGlobalListener:c,removeAllGlobalListeners:u}=jg(),{hoverProps:d,triggerHoverEnd:p}=(0,r.useMemo)(()=>{let e=(e,t)=>{let r=l.target;l.pointerType="",l.target=null,"touch"!==t&&l.isHovered&&r&&(l.isHovered=!1,u(),o&&o({type:"hoverend",target:r,pointerType:t}),n&&n(!1),s(!1))},r={};return"undefined"!=typeof PointerEvent&&(r.onPointerEnter=r=>{Ig&&"mouse"===r.pointerType||((r,o)=>{if(l.pointerType=o,i||"touch"===o||l.isHovered||!r.currentTarget.contains(r.target))return;l.isHovered=!0;let a=r.currentTarget;l.target=a,c(og(r.target),"pointerover",t=>{l.isHovered&&l.target&&!wg(l.target,t.target)&&e(0,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:a,pointerType:o}),n&&n(!0),s(!0)})(r,r.pointerType)},r.onPointerLeave=t=>{!i&&t.currentTarget.contains(t.target)&&e(0,t.pointerType)}),{hoverProps:r,triggerHoverEnd:e}},[t,n,o,i,l,c,u]);return(0,r.useEffect)(()=>{i&&p({currentTarget:l.target},l.pointerType)},[i]),{hoverProps:d,isHovered:a}}({isDisabled:l}),{pressed:D,pressProps:T}=function({disabled:e=!1}={}){let t=(0,r.useRef)(null),[n,o]=(0,r.useState)(!1),i=Qg(),a=Bg(()=>{t.current=null,o(!1),i.dispose()}),s=Bg(e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,o(!0);{let n=Lg(e.currentTarget);i.addEventListener(n,"pointerup",a,!1),i.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);o(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),i.addEventListener(n,"pointercancel",a,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:a,onClick:a}}}({disabled:l}),I=ny({open:m===Nx.Open,active:D||m===Nx.Open,disabled:l,invalid:i.invalid,value:i.value,hover:E,focus:w,autofocus:c}),k=Th(a,e=>e.listboxState===Nx.Open),O=Ay(p(),{ref:d,id:s,type:Jh(e,f),"aria-haspopup":"listbox","aria-controls":null==g?void 0:g.id,"aria-expanded":k,"aria-labelledby":b,"aria-describedby":M,disabled:l||void 0,autoFocus:c,onKeyDown:h,onKeyUp:y,onKeyPress:v},x,N,j,T);return ky()({ourProps:O,theirProps:u,slot:I,defaultTag:"button",name:"Listbox.Button"})}),Ux=lx,Bx=Sy(function(e,t){let n=(0,r.useId)(),{id:o=`headlessui-listbox-options-${n}`,anchor:i,portal:a=!1,modal:s=!0,transition:l=!1,...c}=e,u=function(e){return(0,r.useMemo)(()=>e?"string"==typeof e?{to:e}:e:null,[e])}(i),[d,p]=(0,r.useState)(null);u&&(a=!0);let m=Lx("Listbox.Options"),f=Cx("Listbox.Options"),[g,h,y,x]=Th(f,e=>[e.listboxState,e.buttonElement,e.optionsElement,e.__demoMode]),v=Zh(h),b=Zh(y),M=qy(),[w,N]=py(l,d,null!==M?(M&Zy.Open)===Zy.Open:g===Nx.Open);!function(e,t,n){let o=Ug(e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()});(0,r.useEffect)(()=>{if(!e)return;let n=null===t?null:qg(t)?t:t.current;if(!n)return;let r=Yg();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver(()=>o.current(n));e.observe(n),r.add(()=>e.disconnect())}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver(()=>o.current(n));e.observe(n),r.add(()=>e.disconnect())}return()=>r.dispose()},[t,o,e])}(w,h,f.actions.closeListbox),function(e,t,n=()=>[document.body]){!function(e,t,n=()=>({containers:[]})){let o=function(e){return(0,r.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot)}(ty),i=t?o.get(t):void 0,a=!!i&&i.count>0;Fg(()=>{if(t&&e)return ty.dispatch("PUSH",t,n),()=>ty.dispatch("POP",t,n)},[e,t])}(kh(e,"scroll-lock"),t,e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}})}(!x&&s&&g===Nx.Open,b),function(e,{allowed:t,disallowed:n}={}){let r=kh(e,"inert-others");Fg(()=>{var e,o;if(!r)return;let i=Yg();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&i.add(Ch(t));let a=null!=(o=null==t?void 0:t())?o:[];for(let e of a){if(!e)continue;let t=Lg(e);if(!t)continue;let n=e.parentElement;for(;n&&n!==t.body;){for(let e of n.children)a.some(t=>e.contains(t))||i.add(Ch(e));n=n.parentElement}}return i.dispose},[r,t,n])}(!x&&s&&g===Nx.Open,{allowed:(0,r.useCallback)(()=>[h,y],[h,y])});let E=!Th(f,f.selectors.didButtonMove)&&w,j=Vy(Th(f,f.selectors.hasFrozenValue)&&!e.static,m.value),D=(0,r.useCallback)(e=>m.compare(j,e),[m.compare,j]),T=Th(f,e=>{var t;if(null==u||null==(t=null==u?void 0:u.to)||!t.includes("selection"))return null;let n=e.options.findIndex(e=>D(e.dataRef.current.value));return-1===n&&(n=0),n}),I=(()=>{if(null==u)return;if(null===T)return{...u,inner:void 0};let e=Array.from(m.listRef.current.values());return{...u,inner:{listRef:{current:e},index:T}}})(),[k,O]=yy(I),_=function(){let{getFloatingProps:e,slot:t}=(0,r.useContext)(gy);return(0,r.useCallback)((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}(),C=oy(t,u?k:null,f.actions.setOptionsElement,p),A=Qg();(0,r.useEffect)(()=>{let e=y;e&&g===Nx.Open&&(function(e){return Pg(e)===e}(e)||null==e||e.focus({preventScroll:!0}))},[g,y]);let S=Bg(e=>{var t;switch(A.dispose(),e.key){case rx.Space:if(""!==f.state.searchQuery)return e.preventDefault(),e.stopPropagation(),f.actions.search(e.key);case rx.Enter:e.preventDefault(),e.stopPropagation(),f.actions.selectActiveOption();break;case vh(m.orientation,{vertical:rx.ArrowDown,horizontal:rx.ArrowRight}):return e.preventDefault(),e.stopPropagation(),f.actions.goToOption({focus:Jy.Next});case vh(m.orientation,{vertical:rx.ArrowUp,horizontal:rx.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),f.actions.goToOption({focus:Jy.Previous});case rx.Home:case rx.PageUp:return e.preventDefault(),e.stopPropagation(),f.actions.goToOption({focus:Jy.First});case rx.End:case rx.PageDown:return e.preventDefault(),e.stopPropagation(),f.actions.goToOption({focus:Jy.Last});case rx.Escape:return e.preventDefault(),e.stopPropagation(),(0,dn.flushSync)(()=>f.actions.closeListbox()),void(null==(t=f.state.buttonElement)||t.focus({preventScroll:!0}));case rx.Tab:e.preventDefault(),e.stopPropagation(),(0,dn.flushSync)(()=>f.actions.closeListbox()),Wh(f.state.buttonElement,e.shiftKey?Lh.Previous:Lh.Next);break;default:1===e.key.length&&(f.actions.search(e.key),A.setTimeout(()=>f.actions.clearSearch(),350))}}),L=Th(f,e=>{var t;return null==(t=e.buttonElement)?void 0:t.id}),z=ny({open:g===Nx.Open}),P=Ay(u?_():{},{id:o,ref:C,"aria-activedescendant":Th(f,f.selectors.activeDescendantId),"aria-multiselectable":m.mode===Ex.Multi||void 0,"aria-labelledby":L,"aria-orientation":m.orientation,onKeyDown:S,role:"listbox",tabIndex:g===Nx.Open?0:void 0,style:{...c.style,...O,"--button-width":Hg(w,h,!0).width},...dy(N)}),R=ky(),Y=(0,r.useMemo)(()=>m.mode===Ex.Multi?m:{...m,isSelected:D},[m,D]);return r.createElement(xx,{enabled:!!a&&(e.static||w),ownerDocument:v},r.createElement(Sx.Provider,{value:Y},R({ourProps:P,theirProps:c,slot:z,defaultTag:"div",features:Rx,visible:E,name:"Listbox.Options"})))}),Wx=Sy(function(e,t){let n=(0,r.useId)(),{id:o=`headlessui-listbox-option-${n}`,disabled:i=!1,value:a,...s}=e,l=!0===(0,r.useContext)(Px),c=Lx("Listbox.Option"),u=Cx("Listbox.Option"),d=Th(u,e=>u.selectors.isActive(e,o)),p=c.isSelected(a),m=(0,r.useRef)(null),f=function(e){let t=(0,r.useRef)(""),n=(0,r.useRef)("");return Bg(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(t.current===o)return n.current;let i=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():ay(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(", ")}return ay(e).trim()}(r).trim().toLowerCase();return t.current=o,n.current=i,i})}(m),g=Ug({disabled:i,value:a,domRef:m,get textValue(){return f()}}),h=oy(t,m,e=>{e?c.listRef.current.set(o,e):c.listRef.current.delete(o)}),y=Th(u,e=>u.selectors.shouldScrollIntoView(e,o));Fg(()=>{if(y)return Yg().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=m.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[y,m]),Fg(()=>{if(!l)return u.actions.registerOption(o,g),()=>u.actions.unregisterOption(o)},[g,o,l]);let x=Bg(e=>{if(i)return e.preventDefault();u.actions.selectOption(a)}),v=Bg(()=>{if(i)return u.actions.goToOption({focus:Jy.Nothing});u.actions.goToOption({focus:Jy.Specific,id:o})}),b=function(){let e=(0,r.useRef)([-1,-1]);return{wasMoved(t){let n=sy(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=sy(t)}}}(),M=Bg(e=>b.update(e)),w=Bg(e=>{b.wasMoved(e)&&(i||d&&u.state.activationTrigger===jx.Pointer||u.actions.goToOption({focus:Jy.Specific,id:o},jx.Pointer))}),N=Bg(e=>{b.wasMoved(e)&&(i||d&&u.state.activationTrigger===jx.Pointer&&u.actions.goToOption({focus:Jy.Nothing}))}),E=ny({active:d,focus:d,selected:p,disabled:i,selectedOption:p&&l}),j=l?{}:{id:o,ref:h,role:"option",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-selected":p,disabled:void 0,onClick:x,onFocus:v,onPointerEnter:M,onMouseEnter:M,onPointerMove:w,onMouseMove:w,onPointerLeave:N,onMouseLeave:N},D=ky();return!p&&l?null:D({ourProps:j,theirProps:s,slot:E,defaultTag:"div",name:"Listbox.Option"})}),Vx=Sy(function(e,t){let{options:n,placeholder:o,...i}=e,a={ref:oy(t)},s=Lx("ListboxSelectedOption"),l=ny({}),c=void 0===s.value||null===s.value||s.mode===Ex.Multi&&Array.isArray(s.value)&&0===s.value.length,u=ky();return r.createElement(Px.Provider,{value:!0},u({ourProps:a,theirProps:{...i,children:r.createElement(r.Fragment,null,o&&c?o:n)},slot:l,defaultTag:Yx,name:"ListboxSelectedOption"}))}),Hx=Object.assign(Qx,{Button:Fx,Label:Ux,Options:Bx,Option:Wx,SelectedOption:Vx});function Gx(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in i&&(e=>e.useSyncExternalStore)(i)(()=>()=>{},()=>!1,()=>!e)}(),[t,n]=r.useState(Sg.isHandoffComplete);return t&&!1===Sg.isHandoffComplete&&n(!1),r.useEffect(()=>{!0!==t&&n(!0)},[t]),r.useEffect(()=>Sg.handoff(),[]),!e&&t}function $x(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!Ry(null!=(t=e.as)?t:ev)||1===r.Children.count(e.children)}let Zx=(0,r.createContext)(null);Zx.displayName="TransitionContext";var qx=(e=>(e.Visible="visible",e.Hidden="hidden",e))(qx||{});let Xx=(0,r.createContext)(null);function Jx(e){return"children"in e?Jx(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function Kx(e,t){let n=Ug(e),o=(0,r.useRef)([]),i=function(){let e=(0,r.useRef)(!1);return Fg(()=>(e.current=!0,()=>{e.current=!1}),[]),e}(),a=Qg(),s=Bg((e,t=Iy.Hidden)=>{let r=o.current.findIndex(({el:t})=>t===e);-1!==r&&(vh(t,{[Iy.Unmount](){o.current.splice(r,1)},[Iy.Hidden](){o.current[r].state="hidden"}}),a.microTask(()=>{var e;!Jx(o)&&i.current&&(null==(e=n.current)||e.call(n))}))}),l=Bg(e=>{let t=o.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):o.current.push({el:e,state:"visible"}),()=>s(e,Iy.Unmount)}),c=(0,r.useRef)([]),u=(0,r.useRef)(Promise.resolve()),d=(0,r.useRef)({enter:[],leave:[]}),p=Bg((e,n,r)=>{c.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=>{c.current.push(e)})]),null==t||t.chains.current[n].push([e,new Promise(e=>{Promise.all(d.current[n].map(([e,t])=>t)).then(()=>e())})]),"enter"===n?u.current=u.current.then(()=>null==t?void 0:t.wait.current).then(()=>r(n)):r(n)}),m=Bg((e,t,n)=>{Promise.all(d.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=c.current.shift())||e()}).then(()=>n(t))});return(0,r.useMemo)(()=>({children:o,register:l,unregister:s,onStart:p,onStop:m,wait:u,chains:d}),[l,s,o,p,m,d,u])}Xx.displayName="NestingContext";let ev=r.Fragment,tv=Ty.RenderStrategy,nv=Sy(function(e,t){let{show:n,appear:o=!1,unmount:i=!0,...a}=e,s=(0,r.useRef)(null),l=oy(...$x(e)?[s,t]:null===t?[]:[t]);Gx();let c=qy();if(void 0===n&&null!==c&&(n=(c&Zy.Open)===Zy.Open),void 0===n)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,d]=(0,r.useState)(n?"visible":"hidden"),p=Kx(()=>{n||d("hidden")}),[m,f]=(0,r.useState)(!0),g=(0,r.useRef)([n]);Fg(()=>{!1!==m&&g.current[g.current.length-1]!==n&&(g.current.push(n),f(!1))},[g,n]);let h=(0,r.useMemo)(()=>({show:n,appear:o,initial:m}),[n,o,m]);Fg(()=>{n?d("visible"):!Jx(p)&&null!==s.current&&d("hidden")},[n,p]);let y={unmount:i},x=Bg(()=>{var t;m&&f(!1),null==(t=e.beforeEnter)||t.call(e)}),v=Bg(()=>{var t;m&&f(!1),null==(t=e.beforeLeave)||t.call(e)}),b=ky();return r.createElement(Xx.Provider,{value:p},r.createElement(Zx.Provider,{value:h},b({ourProps:{...y,as:r.Fragment,children:r.createElement(rv,{ref:l,...y,...a,beforeEnter:x,beforeLeave:v})},theirProps:{},defaultTag:r.Fragment,features:tv,visible:"visible"===u,name:"Transition"})))}),rv=Sy(function(e,t){var n,o;let{transition:i=!0,beforeEnter:a,afterEnter:s,beforeLeave:l,afterLeave:c,enter:u,enterFrom:d,enterTo:p,entered:m,leave:f,leaveFrom:g,leaveTo:h,...y}=e,[x,v]=(0,r.useState)(null),b=(0,r.useRef)(null),M=$x(e),w=oy(...M?[b,t,v]:null===t?[]:[t]),N=null==(n=y.unmount)||n?Iy.Unmount:Iy.Hidden,{show:E,appear:j,initial:D}=function(){let e=(0,r.useContext)(Zx);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[T,I]=(0,r.useState)(E?"visible":"hidden"),k=function(){let e=(0,r.useContext)(Xx);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:O,unregister:_}=k;Fg(()=>O(b),[O,b]),Fg(()=>{if(N===Iy.Hidden&&b.current)return E&&"visible"!==T?void I("visible"):vh(T,{hidden:()=>_(b),visible:()=>O(b)})},[T,b,O,_,E,N]);let C=Gx();Fg(()=>{if(M&&C&&"visible"===T&&null===b.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[b,T,C,M]);let A=D&&!j,S=j&&E&&D,L=(0,r.useRef)(!1),z=Kx(()=>{L.current||(I("hidden"),_(b))},k),P=Bg(e=>{L.current=!0;let t=e?"enter":"leave";z.onStart(b,t,e=>{"enter"===e?null==a||a():"leave"===e&&(null==l||l())})}),R=Bg(e=>{let t=e?"enter":"leave";L.current=!1,z.onStop(b,t,e=>{"enter"===e?null==s||s():"leave"===e&&(null==c||c())}),"leave"===t&&!Jx(z)&&(I("hidden"),_(b))});(0,r.useEffect)(()=>{M&&i||(P(E),R(E))},[E,M,i]);let Y=!(!i||!M||!C||A),[,Q]=py(Y,x,E,{start:P,end:R}),F=Ly({ref:w,className:(null==(o=jy(y.className,S&&u,S&&d,Q.enter&&u,Q.enter&&Q.closed&&d,Q.enter&&!Q.closed&&p,Q.leave&&f,Q.leave&&!Q.closed&&g,Q.leave&&Q.closed&&h,!Q.transition&&E&&m))?void 0:o.trim())||void 0,...dy(Q)}),U=0;"visible"===T&&(U|=Zy.Open),"hidden"===T&&(U|=Zy.Closed),E&&"hidden"===T&&(U|=Zy.Opening),!E&&"visible"===T&&(U|=Zy.Closing);let B=ky();return r.createElement(Xx.Provider,{value:z},r.createElement(Xy,{value:U},B({ourProps:F,theirProps:y,defaultTag:ev,features:tv,visible:"visible"===T,name:"Transition.Child"})))}),ov=Sy(function(e,t){let n=null!==(0,r.useContext)(Zx),o=null!==qy();return r.createElement(r.Fragment,null,!n&&o?r.createElement(nv,{ref:t,...e}):r.createElement(rv,{ref:t,...e}))}),iv=Object.assign(nv,{Child:ov,Root:nv});function av({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const sv=r.forwardRef(av),lv=st("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),cv=(0,r.forwardRef)(({id:e,type:t="text",defaultValue:n="",value:o,size:i="sm",className:a="",disabled:s=!1,onChange:l=()=>{},error:c=!1,onError:u=()=>{},prefix:d=null,suffix:p=null,label:m="",...f},g)=>{const h=(0,r.useRef)(null),y=(0,r.useMemo)(()=>e||`input-${t}-${rt()}`,[e]),x=(0,r.useMemo)(()=>typeof o<"u",[o]),[v,b]=(0,r.useState)(n),[M,w]=(0,r.useState)(null),N=(0,r.useCallback)(()=>x?o:v,[x,o,v]),E=e=>{if(s)return;let n;"file"===t?(n=e.target.files,n&&n.length>0?w(n[0].name):w(null)):n=e.target.value,!x&&"file"!==t&&b(n),"function"==typeof l&&l(n)},j=()=>{w(null),h.current&&(h.current.value=""),l(null)},D="bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary w-full outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200",T={xs:"px-2 py-1 rounded",sm:"p-3 py-2 rounded",md:"p-3.5 py-2.5 rounded-md",lg:"p-4 py-3 rounded-lg"},I={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},k={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},O={sm:d?"pl-8":"",md:d?"pl-9":"",lg:d?"pl-10":""},_={sm:p?"pr-8":"",md:p?"pr-9":"",lg:p?"pr-10":""},C=s?"hover:outline-border-disabled":"hover:outline-border-strong",A="focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",S=c?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",L=c?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",z=s?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",P=s?"outline-border-disabled cursor-not-allowed text-text-disabled file:text-text-tertiary":"",R="font-normal placeholder-text-tertiary text-text-primary pointer-events-none absolute inset-y-0 flex flex-1 items-center [&>svg]:h-4 [&>svg]:w-4",Y=s?"font-normal placeholder-text-tertiary text-icon-disabled pointer-events-none absolute inset-y-0 flex flex-1 items-center":"font-normal placeholder-text-tertiary text-field-placeholder pointer-events-none absolute inset-y-0 flex flex-1 items-center",Q={xs:"[&>svg]:size-4",sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6"},F=(0,r.useMemo)(()=>m?(0,ee.jsx)(ut,{className:qe(I[i]),htmlFor:y,...f?.required&&{required:!0},children:m}):null,[m,i,y]),U=M?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return"file"===t?(0,ee.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[F,(0,ee.jsxs)("div",{className:qe("w-full relative flex focus-within:z-10",a),children:[(0,ee.jsx)("input",{ref:an(h,g),id:y,type:"file",className:qe(D,P,T[i],k[i],A,C,L,U),disabled:s,onChange:E,onInvalid:u,...f}),(0,ee.jsx)("div",{className:qe(Y,"right-0 pr-3",Q[i]),children:(0,ee.jsx)(lv,{})})]})]}):(0,ee.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[F,(0,ee.jsxs)("div",{className:qe("w-full relative flex focus-within:z-10",a),children:[d?(0,ee.jsx)("div",{className:qe(R,"left-0 pl-3",k[i]),children:d}):null,(0,ee.jsx)("input",{ref:an(h,g),id:y,type:t,className:qe(D,z,T[i],k[i],O[i],_[i],A,C,S),disabled:s,onChange:E,onInvalid:u,value:N(),...f}),"file"===t?M?(0,ee.jsx)("div",{className:qe(Y,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",Q[i]),onClick:j,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&j()},children:(0,ee.jsx)($t,{})}):(0,ee.jsx)("div",{className:qe(Y,"right-0 pr-3",Q[i]),children:(0,ee.jsx)(lv,{})}):p?(0,ee.jsx)("div",{className:qe(R,"right-0 pr-3",k[i]),children:p}):null]})]})});cv.displayName="Input";const uv=function(e){const[t,n]=K(),o=zf(e.name),i=Pf(t,o),[a,s]=(0,r.useState)(i),l=(0,r.useRef)((0,Of.debounce)(async e=>{n(e)},500)).current;return(0,r.useEffect)(()=>()=>{l.cancel()},[l]),(0,r.createElement)("div",{className:"flex sm:justify-end"},(0,r.createElement)(cv,{className:(e.badge?"w-24 ":"w-32 rounded-r-md")+" focus:[&>input]:ring-focus",suffix:(0,r.createElement)("span",{className:"text-badge-color-gray p-0.5 text-center text-xs font-medium"},e.type),type:"number",name:e.name,value:a,onChange:function(e){s(e);const n=Rf(t,o,e);l({type:"CHANGE",data:n})},min:e.min||0,step:e.step||"any"}))},dv=function(e){const[t,n]=K(),o=zf(e.name),i=Pf(t,o),[a,s]=(0,r.useState)(i),l=(0,r.useRef)((0,Of.debounce)(async e=>{n(e)},500)).current;return(0,r.useEffect)(()=>()=>{l.cancel()},[l]),(0,r.createElement)(cv,{className:"w-full focus:[&>input]:ring-focus",type:"text",size:"md",name:e.name,value:a,onChange:function(e){s(e);const n=Rf(t,o,e);l({type:"CHANGE",data:n})},min:"0",max:e.max})},pv=function(e){const{title:t,description:n,name:o,disabled:i=!1}=e,[a,s]=K(),l=zf(o),c=Pf(a,l),[u,d]=(0,r.useState)(c),p=(0,r.useRef)((0,Of.debounce)(async e=>{s(e)},500)).current;function m(t){const n=!t;d(n),"function"==typeof e.manageState&&e.manageState(n);const r=Rf(a,l,n);p({type:"CHANGE",data:r})}(0,r.useEffect)(()=>()=>{p.cancel()},[p]);const f=`toggle-${o.replace(/[\[\]]/g,"-")}`;return(0,r.createElement)(Bf,{title:t,description:n,disabled:i},(0,r.createElement)("div",null,(0,r.createElement)(Wt,{id:f,"aria-label":`${t} - ${u?(0,Xc.__)("Enabled","power-coupons"):(0,Xc.__)("Disabled","power-coupons")}`,"aria-checked":u,value:u,name:o,disabled:i,onChange:()=>{m(u)},onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),m(u))},size:"md",className:"border-none power_coupons-toggle-field",role:"switch"})))},mv={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus",icon:"text-white"}},fv={sm:"text-sm leading-5",md:"text-base leading-6"},gv={sm:{checkbox:"size-4",icon:"size-1.5",info:"size-4"},md:{checkbox:"size-5",icon:"size-2",info:"size-5"}},hv={xs:"py-1 px-1 text-sm gap-0.5 [&>svg]:size-4",sm:"py-1 px-1.5 text-base gap-1 [&>svg]:size-4",md:"py-2 px-2.5 text-base gap-1 [&>svg]:size-5",lg:"py-2.5 px-3 text-base gap-1 [&>svg]:size-6"},yv=(0,r.createContext)({}),xv=()=>(0,r.useContext)(yv),vv=({children:e,name:t,style:n="simple",size:o="md",value:i,defaultValue:a,by:s="id",as:l="div",onChange:c,className:u,disableGroup:d=!1,vertical:p=!1,columns:m=4,multiSelection:f=!1,gapClassName:g="gap-2"})=>{const h=(0,r.useMemo)(()=>typeof i<"u",[i]),y=(0,r.useMemo)(()=>t||`radio-button-group-${rt()}`,[t]);let x;x=h?i:f?a??[]:a;const[v,b]=(0,r.useState)(x),M=(0,r.useCallback)(e=>{if(f)b(t=>{let n;return n=Array.isArray(t)&&"string"==typeof e&&t.includes(e)?t.filter(t=>t!==e):[...Array.isArray(t)?t:[],..."string"==typeof e?[e]:[]],"function"==typeof c&&c(n),n});else{if(h||b(e),"function"!=typeof c)return;c(e)}},[c]);u=qe("grid grid-cols-4",Ke[m],g,"tile"===n&&"gap-0",p&&"grid-cols-1",u);const w=qe("tile"===n?"border border-border-subtle border-solid rounded-md shadow-sm":"gap-6",u),N=()=>(0,ee.jsx)(yv.Provider,{value:{name:y,value:h?i:v,by:s,onChange:M,isControlled:h,disableAll:d,style:n,columns:m,multiSelection:f,size:o},children:r.Children.map(e,e=>(0,r.isValidElement)(e)?e:null)});return(0,ee.jsx)(ee.Fragment,{children:"tile"===n?(0,ee.jsx)("div",{className:w,children:N()}):(0,ee.jsx)(l,{...l===r.Fragment?{}:{className:u},children:N()})})};vv.displayName="RadioButton.Group";const bv=(0,r.forwardRef)(({id:e,label:t,value:n,children:o,disabled:i,icon:a=null,inlineIcon:s=!1,hideSelection:l=!1,reversePosition:c=!1,borderOn:u=!1,borderOnActive:d=!0,badgeItem:p=null,useSwitch:m=!1,info:f,minWidth:g=!0,...h},y)=>{const{buttonWrapperClasses:x,...v}=h,b=xv(),{name:M,value:w,by:N,onChange:E,disableAll:j,checked:D,multiSelection:T,size:I="md"}=b,k="primary",O=(0,r.useMemo)(()=>e||`radio-button-${rt()}`,[e]),_=(0,r.useMemo)(()=>j||i,[j,i]),C=(0,r.useMemo)(()=>T?Array.isArray(w)&&w.includes(n):typeof D<"u"?D:typeof w==typeof n&&("string"==typeof w?w===n:Array.isArray(w)?w.includes(n):w[N]===n[N]),[w,n,D]),A=(0,r.useCallback)(()=>(0,r.isValidElement)(t)?t:t?.heading?(0,ee.jsxs)("div",{className:qe(!s&&{"space-y-3":"sm"===I,"space-y-4":"md"===I},c&&(m?"ml-10":"ml-4"),s&&"flex gap-2",s&&!t.description&&"items-center"),children:[a&&(0,ee.jsx)(ee.Fragment,{children:a}),(0,ee.jsxs)("div",{className:qe(!a||!m||a&&p?{"space-y-0.5":"sm"===I,"space-y-1":"md"===I}:"space-y-0.5"),children:[(0,ee.jsx)("p",{className:qe("text-text-primary font-medium m-0",fv[I],i&&"text-text-disabled cursor-not-allowed"),children:t.heading}),t.description&&(0,ee.jsx)("p",{className:"text-text-tertiary text-sm font-normal leading-5 m-0",children:t.description})]})]}):null,[t]);if("tile"===b.style)return(0,ee.jsx)(Mv,{id:e,label:t,value:n,disabled:i,size:I,children:o});const S=()=>{_||(T?m&&E(n,!C):E(n))};return(0,ee.jsxs)("label",{className:qe("inline-flex items-center relative cursor-pointer transition-all duration-300",!!t&&"items-start justify-between",g&&"min-w-[180px]",u&&"outline outline-field-border outline-1 rounded-md shadow-sm hover:outline-border-interactive",d&&u&&C&&"outline-border-interactive",{"pl-3.5 pr-2.5 py-2.5":"sm"===I&&!(a&&m),"p-3":"sm"===I&&(a&&m||a&&p),"pl-4 pr-3 py-3":"md"===I&&!(a&&m),"p-4":"md"===I&&(a&&m||a&&p)},"pr-12",_&&"cursor-not-allowed opacity-40",x),htmlFor:O,onClick:S,children:[!!t&&(0,ee.jsx)("label",{className:qe("cursor-pointer",_&&"cursor-not-allowed"),htmlFor:O,children:A()}),!!f&&(0,ee.jsx)("div",{className:"absolute mr-0.5 bottom-1.5 right-3",children:(0,ee.jsx)(ff,{title:f?.heading,content:f?.description,children:(0,ee.jsx)(Zt,{className:qe("text-text-primary",gv[I]?.info)})})}),(0,ee.jsxs)("label",{className:qe("absolute mr-0.5 right-3 flex items-center cursor-pointer rounded-full gap-2",c&&"left-0",_&&"cursor-not-allowed",s&&"mr-3"),onClick:S,children:[!!p&&p,!l&&(m?(0,ee.jsx)(ee.Fragment,{children:(0,ee.jsx)(Wt,{defaultValue:!1,size:I,onChange:()=>{T?E(n,!C):E(n)},checked:C,...v,"aria-label":t?.heading??"Switch"})}):(0,ee.jsxs)("span",{className:"relative p-0.5",children:[(0,ee.jsx)("input",{ref:y,id:O,type:T?"checkbox":"radio",className:qe("peer flex relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",!T&&"rounded-full",mv[k].checkbox,gv[I].checkbox,_&&"disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled cursor-not-allowed"),name:M,value:n,onChange:e=>E(e.target.value),checked:C,disabled:_,...v}),(0,ee.jsx)("span",{className:qe("inline-flex items-center absolute top-2/4 not-rtl:left-2/4 rtl:right-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",mv[k].icon,_&&"peer-disabled:text-border-disabled cursor-not-allowed"),children:T?(0,ee.jsx)(ct,{className:"sm"===I?"size-3":"size-4"}):(0,ee.jsx)("div",{className:qe("rounded-full bg-current",gv[I]?.icon)})})]}))]})]})});bv.displayName="RadioButton.Button";const Mv=({id:e,children:t,value:n,disabled:o,size:i="md",...a})=>{const s=xv(),{name:l,value:c,by:u,onChange:d,disableAll:p,checked:m}=s||{},f=(0,r.useMemo)(()=>e||`radio-button-${rt()}`,[e]),g=(0,r.useMemo)(()=>p||o,[p,o]),h=(0,r.useMemo)(()=>typeof m<"u"?m:typeof c==typeof n&&("string"==typeof c?c===n:Array.isArray(c)?c.includes(n):!(!c||!u)&&c[u]===n[u]),[c,n,m,u]),y=qe("bg-background-primary text-primary cursor-pointer flex items-center justify-center","hover:bg-button-tertiary-hover","focus:outline-none",g?"text-text-disabled cursor-not-allowed":"",hv[i],"border-0 border-r border-border-subtle border-solid");return(0,ee.jsx)(ee.Fragment,{children:(0,ee.jsxs)("button",{type:"button",id:f,"aria-label":"Radio Button",className:qe(y,"first:rounded-tl first:rounded-bl first:border-0 first:border-r first:border-border-subtle last:rounded-tr last:rounded-br last:border-0",h&&"bg-button-disabled"),onClick:()=>{d&&d(n)},disabled:g,...a,children:[(0,ee.jsx)("input",{type:"hidden",value:n,name:l,checked:h,onChange:e=>d?.(e.target.value)}),t]})})},wv=Object.assign(bv,{Group:vv,Button:bv}),Nv=st("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),Ev={sm:"text-xs [&>svg]:size-4 rounded",md:"text-sm [&>svg]:size-5 rounded-md",lg:"text-base [&>svg]:size-6 rounded-md"},jv={input:{sm:"py-1.5 px-2 rounded",md:"p-2.5 rounded-md",lg:"p-3 rounded-md"},content:{sm:"p-1.5",md:"p-1.5",lg:"p-2"},title:{sm:"p-2 text-xs",md:"p-2 text-sm",lg:"p-2 text-sm"},item:{sm:"text-sm text-text-secondary rounded",md:"text-base text-text-secondary rounded-md",lg:"text-base text-text-secondary rounded-md"},icon:{sm:"p-1 text-sm [&>svg]:size-4 text-icon-secondary",md:"p-2 text-base [&>svg]:size-5 text-icon-secondary",lg:"p-2 text-base [&>svg]:size-5 text-icon-secondary"},dialog:{sm:"mt-1 rounded-md",md:"mt-1.5 rounded-lg",lg:"mt-1.5 rounded-lg"},slashIcon:{sm:"px-2 py-0.5",md:"px-3 py-1",lg:"px-3.5 py-1"}},Dv={primary:"bg-field-primary-background outline outline-1 outline-field-border hover:outline-border-strong focus-within:outline-focus-border focus-within:hover:outline-focus-border",secondary:"bg-field-secondary-background outline outline-1 outline-field-border hover:outline-border-strong focus-within:outline-focus-border focus-within:hover:outline-focus-border",ghost:"bg-field-secondary-background outline outline-1 outline-transparent focus-within:outline-focus-border"},Tv={ghost:"cursor-not-allowed text-text-disabled placeholder:text-text-disabled",primary:"outline-border-disabled hover:outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled",secondary:"outline-border-disabled hover:outline-border-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled"},Iv=st("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),kv=({variant:e="primary",size:t="md",icon:n=null,className:r=""})=>{const o={primary:"text-brand-primary-600",secondary:"text-background-primary"}[e],i={sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6",xl:"[&>svg]:size-8"}[t];return(0,ee.jsx)("span",{className:qe("flex",i,o,r),children:n||(0,ee.jsx)(Iv,{className:"animate-spin shrink-0"})})},Ov=(0,r.createContext)({}),_v=()=>(0,r.useContext)(Ov),Cv=(0,r.forwardRef)(({className:e,size:t="sm",open:n=!1,setOpen:o,onOpenChange:i,loading:a=!1,clearAfterSelect:s=!0,closeAfterSelect:l=!0,variant:c="primary",filter:u=!0,...d},p)=>{const[m,f]=(0,r.useState)(""),[g,h]=(0,r.useState)(a??!1),[y,x]=(0,r.useState)(null),v=r.useRef([]),b=(0,r.useMemo)(()=>"function"==typeof o?o:i,[o,i]),{refs:M,floatingStyles:w,context:N}=Zm({open:n,onOpenChange:b,placement:"bottom-start",whileElementsMounted:pp,middleware:[Dp(2),Ip({padding:10}),kp({apply({rects:e,elements:t,availableHeight:n}){t.floating.style.maxHeight=`${n}px`,t.floating.style.width=`${e.reference.width}px`,t.floating.style.fontFamily=window.getComputedStyle(t.reference).fontFamily}})]}),E=af(N,{listRef:v,activeIndex:y,onNavigate:x,loop:!0,openOnArrowKeyDown:!1}),j=$m(N),{getReferenceProps:D,getFloatingProps:T,getItemProps:I}=Km([j,E]);return(0,r.useEffect)(()=>{const e=et(),t=t=>{const n="Mac OS"===e?t.metaKey:t.ctrlKey;if("/"===t.key&&n&&(t.preventDefault(),M.reference&&M.reference.current)){const e=M.reference.current instanceof HTMLElement?M.reference.current.querySelector("input"):null;e&&e.focus()}};return window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}},[M.reference]),(0,r.useEffect)(()=>{n||x(null)},[n]),(0,ee.jsx)(Ov.Provider,{value:{size:t,open:n,onOpenChange:b,refs:M,floatingStyles:w,context:N,getReferenceProps:D,getFloatingProps:T,getItemProps:I,activeIndex:y,setActiveIndex:x,listRef:v,searchTerm:m,setSearchTerm:f,isLoading:g,setIsLoading:h,clearAfterSelect:s,closeAfterSelect:l,variant:c,filter:u},children:(0,ee.jsx)("div",{className:qe("searchbox-wrapper box-border relative w-full",e),...d,ref:p})})});Cv.displayName="SearchBox";const Av=(0,r.forwardRef)(({className:e,type:t="text",placeholder:n="Search...",disabled:r=!1,onChange:o=()=>{},...i},a)=>{const{size:s,refs:l,getReferenceProps:c,searchTerm:u,setSearchTerm:d,open:p,setActiveIndex:m,listRef:f,onOpenChange:g,variant:h}=_v(),y="lg"===s?"sm":"xs";return(0,ee.jsxs)("div",{ref:l.setReference,className:qe("w-full group relative flex justify-center items-center gap-1.5 focus-within:z-10 transition-all ease-in-out duration-200",Dv[h],jv.input[s],r?Tv[h]:"focus-within:ring-2 focus-within:ring-focus focus-within:ring-offset-2 focus-within:border-focus-border focus-within:hover:border-focus-border",e),...c(),children:[(0,ee.jsx)("span",{className:qe(Ev[s],r?"text-icon-disabled":"text-icon-secondary group-hover:text-icon-primary group-focus-within:text-icon-primary","flex justify-center items-center"),children:(0,ee.jsx)(Nv,{})}),(0,ee.jsx)("input",{type:t,ref:a,className:qe(Ev[s],"flex-grow font-medium bg-transparent border-none outline-none border-transparent focus:ring-0 p-0 min-h-fit",r&&"text-field-placeholder focus-within:text-field-input group-hover:text-field-input placeholder:text-field-placeholder"),disabled:r,value:u,onChange:e=>{const t=e.target.value;d(t),o(t),"function"==typeof g&&(t.trim()?g(!0):g(!1))},onFocus:()=>{r||"function"!=typeof g||u?.trim()&&g(!0)},onKeyDown:e=>{if(!r){if("ArrowDown"===e.key||"ArrowUp"===e.key)return void(p&&(e.preventDefault(),"ArrowDown"===e.key?m(e=>null===e?0:e):"ArrowUp"===e.key&&m(e=>{const t=f?.current?.length||0;return null===e&&t>0?t-1:e})));"Escape"===e.key&&g(!1)}},placeholder:n,...(0,Of.omit)(i,["size","open","onOpenChange","loading"])}),(0,ee.jsx)(du,{label:"Mac OS"===et()?"⌘/":"Ctrl /",size:y,type:"rounded",variant:"neutral",className:"bg-background-primary"})]})});Av.displayName="SearchBox.Input";const Sv=({className:e,children:t,...n})=>{const{size:r,open:o,refs:i,floatingStyles:a,getFloatingProps:s,context:l}=_v();return o?(0,ee.jsx)(Rm,{context:l,initialFocus:-1,returnFocus:!0,children:(0,ee.jsx)("div",{ref:i.setFloating,style:{...a},className:qe("bg-background-primary rounded-md border border-solid border-border-subtle shadow-soft-shadow-lg overflow-y-auto text-wrap focus:outline-none",jv.dialog[r],e),...s(),...n,children:t})}):null};Sv.displayName="SearchBox.Content";const Lv=({children:e,id:t,root:n})=>(0,ee.jsx)(Om,{id:t,root:n,children:e});Lv.displayName="SearchBox.Portal";const zv=({children:e,className:t})=>{const{searchTerm:n,isLoading:o,listRef:i,filter:a=!0}=_v();if(!a)return(0,ee.jsx)($p,{elementsRef:i,children:(0,ee.jsx)("div",{className:t,children:e})});const s=r.Children.toArray(e).map(e=>{if(r.isValidElement(e)&&e.type===Rv){const t=r.Children.toArray(e.props.children).filter(e=>r.isValidElement(e)&&"string"==typeof e.props.children&&e.props.children.toLowerCase().includes(n.toLowerCase()));return t.length>0?(0,r.cloneElement)(e,{children:t}):null}return e}).filter(Boolean);return o?(0,ee.jsx)(Qv,{}):(0,ee.jsx)($p,{elementsRef:i,children:(0,ee.jsx)("div",{className:t,children:s.some(e=>r.isValidElement(e)&&e.type!==Fv)?s:(0,ee.jsx)(Pv,{})})})};zv.displayName="SearchBox.List";const Pv=({children:e="No results found.",className:t})=>{const{size:n}=_v();return(0,ee.jsx)("div",{className:qe("flex justify-center items-center",jv.item[n],"text-text-tertiary p-4",t),children:e})};Pv.displayName="SearchBox.Empty";const Rv=({heading:e,children:t})=>{const{size:n}=_v();return(0,ee.jsxs)("div",{className:qe(jv.content[n],jv.item[n]),children:[e&&(0,ee.jsx)("div",{className:qe(jv.title[n],"text-text-tertiary"),children:e}),t]})};Rv.displayName="SearchBox.Group";const Yv=(0,r.forwardRef)(({className:e,icon:t,children:n,onClick:o,...i},a)=>{const{size:s,setSearchTerm:l,clearAfterSelect:c,getItemProps:u,activeIndex:d,onOpenChange:p,closeAfterSelect:m}=_v(),{ref:f,index:g}=function(e){void 0===e&&(e={});const{label:t}=e,{register:n,unregister:o,map:i,elementsRef:a,labelsRef:s}=r.useContext(Gp),[l,c]=r.useState(null),u=r.useRef(null),d=r.useCallback(e=>{if(u.current=e,null!==l&&(a.current[l]=e,s)){var n;const r=void 0!==t;s.current[l]=r?t:null!=(n=null==e?void 0:e.textContent)?n:null}},[l,a,s,t]);return Vp(()=>{const e=u.current;if(e)return n(e),()=>{o(e)}},[n,o]),Vp(()=>{const e=u.current?i.get(u.current):null;null!=e&&c(e)},[i]),r.useMemo(()=>({ref:d,index:l??-1}),[l,d])}(),h=d===g;return(0,ee.jsxs)("button",{type:"button",ref:e=>{"function"==typeof a?a(e):a&&(a.current=e),f(e)},className:qe("flex w-full items-center justify-start gap-1 p-1 cursor-pointer border-none bg-transparent text-left focus:outline-none",h&&"bg-background-secondary",!h&&"hover:bg-background-secondary focus:bg-background-secondary",jv.item[s],e),...u?.({role:"option","aria-selected":h,onClick:()=>{"function"==typeof o&&o(),c&&l(""),m&&p(!1)},...i}),children:[t&&(0,ee.jsx)("span",{className:qe(jv.icon[s],"flex items-center justify-center"),children:t}),(0,ee.jsx)("span",{className:qe("flex-grow py-0.5 px-1 font-normal",jv.item[s]),children:n})]})});Yv.displayName="SearchBox.Item";const Qv=({loadingIcon:e=(0,ee.jsx)(kv,{})})=>{const{size:t}=_v(),n=r.isValidElement(e)?(0,r.cloneElement)(e,{size:t}):e;return(0,ee.jsx)("div",{className:qe("flex justify-center p-4",Ev[t],jv.item[t]),children:n})};Qv.displayName="SearchBox.Loading";const Fv=(0,r.forwardRef)(({className:e,...t},n)=>(0,ee.jsx)("hr",{ref:n,className:qe("border-0 border-t border-border-subtle border-solid m-0",e),...t}));Fv.displayName="SearchBox.Separator",Cv.Input=Av,Cv.Loading=Qv,Cv.Separator=Fv,Cv.Content=Sv,Cv.List=zv,Cv.Empty=Pv,Cv.Group=Rv,Cv.Item=Yv,Cv.Portal=Lv;const Uv=({label:e,placeholder:t,value:n=[],onChange:o,portalId:i="power-coupons-bogo-modal"})=>{const[a,s]=(0,r.useState)([]),[l,c]=(0,r.useState)(""),[u,d]=(0,r.useState)([]),[p,m]=(0,r.useState)(!1),[f,g]=(0,r.useState)(!1),h=(0,r.useRef)(null);(0,r.useEffect)(()=>{n.length>0&&y(n)},[]),(0,r.useEffect)(()=>(h.current&&clearTimeout(h.current),l.length>2?(m(!0),h.current=setTimeout(()=>{x(l),g(!0)},400)):(d([]),g(!1)),()=>{h.current&&clearTimeout(h.current)}),[l]);const y=async e=>{try{const t=new FormData;t.append("action","power_coupons_get_products_by_ids"),t.append("_wpnonce",window.powerCouponsSettings?.update_nonce||""),e.forEach((e,n)=>t.append(`ids[${n}]`,e));const n=await fetch(ajaxurl,{method:"POST",body:t}),r=await n.json();r.success&&r.data.length>0&&s(r.data)}catch(e){console.error("Error fetching products by IDs:",e)}},x=async e=>{m(!0);try{const t=window.powerCouponsSettings?.update_nonce,n=new FormData;n.append("action","power_coupons_search_products"),n.append("term",e),n.append("_wpnonce",t||"");const r=await fetch(ajaxurl,{method:"POST",body:n}),o=await r.json();o.success?d(o.data):(console.error("Search failed:",o),d([]))}catch(e){console.error("Error searching products:",e),d([])}m(!1)};return(0,r.createElement)("div",{className:"flex flex-col gap-2"},(0,r.createElement)("label",{className:"text-sm font-medium"},e),(0,r.createElement)(Cv,{variant:"secondary",closeAfterSelect:!1,loading:p,setOpen:g,open:f,size:"md"},(0,r.createElement)(Cv.Input,{className:"w-[98%] [&_span]:hidden",placeholder:t,value:l,onChange:c}),(0,r.createElement)(Cv.Portal,{id:i},(0,r.createElement)(Cv.Content,null,(0,r.createElement)(Cv.List,null,u.length>0?u.map(e=>{const t=a.find(t=>t.id===e.id);return(0,r.createElement)(Cv.Item,{className:t?"opacity-50 cursor-not-allowed":"cursor-pointer",key:e.id,onClick:()=>{t||(e=>{if(!a.find(t=>t.id===e.id)){const t=[...a,e];s(t),o(t.map(e=>e.id)),c(""),g(!1)}})(e)}},e.name)}):(0,r.createElement)(Cv.Empty,null,l.length<3?(0,Xc.__)("Type at least 3 letters to search","power-coupons"):p?(0,Xc.__)("Searching…","power-coupons"):(0,Xc.__)("No products found","power-coupons")))))),a.length>0&&(0,r.createElement)("div",{className:"flex flex-wrap gap-2 mt-2"},a.map(e=>(0,r.createElement)(du,{closable:!0,onClose:()=>(e=>{const t=a.filter(t=>t.id!==e);s(t),o(t.map(e=>e.id))})(e.id),key:e.id,label:e.name,size:"sm",type:"pill",variant:"neutral"}))))},Bv=({label:e,placeholder:t,value:n=[],onChange:o})=>{const[i,a]=(0,r.useState)([]),[s,l]=(0,r.useState)(""),[c,u]=(0,r.useState)([]),[d,p]=(0,r.useState)(!1),[m,f]=(0,r.useState)(!1),g=(0,r.useRef)(null);(0,r.useEffect)(()=>{n.length>0&&h(n)},[]),(0,r.useEffect)(()=>(g.current&&clearTimeout(g.current),s.length>1?(p(!0),g.current=setTimeout(()=>{y(s),f(!0)},400)):(u([]),f(!1)),()=>{g.current&&clearTimeout(g.current)}),[s]);const h=async e=>{try{const t=new FormData;t.append("action","power_coupons_get_categories_by_ids"),t.append("_wpnonce",window.powerCouponsSettings?.update_nonce||""),e.forEach((e,n)=>t.append(`ids[${n}]`,e));const n=await fetch(ajaxurl,{method:"POST",body:t}),r=await n.json();r.success&&r.data.length>0&&a(r.data)}catch(e){console.error("Error fetching categories by IDs:",e)}},y=async e=>{p(!0);try{const t=window.powerCouponsSettings?.update_nonce,n=new FormData;n.append("action","power_coupons_search_categories"),n.append("term",e),n.append("_wpnonce",t||"");const r=await fetch(ajaxurl,{method:"POST",body:n}),o=await r.json();o.success?u(o.data):(console.error("Search failed:",o),u([]))}catch(e){console.error("Error searching categories:",e),u([])}p(!1)};return(0,r.createElement)("div",{className:"flex flex-col gap-2"},e&&(0,r.createElement)("label",{className:"text-sm font-medium"},e),(0,r.createElement)(Cv,{variant:"secondary",closeAfterSelect:!1,loading:d,setOpen:f,open:m,size:"md"},(0,r.createElement)(Cv.Input,{className:"w-[98%] [&_span]:hidden",placeholder:t,value:s,onChange:l}),(0,r.createElement)(Cv.Portal,{id:"power-coupons-settings"},(0,r.createElement)(Cv.Content,null,(0,r.createElement)(Cv.List,null,c.length>0?c.map(e=>{const t=i.find(t=>t.id===e.id);return(0,r.createElement)(Cv.Item,{className:t?"opacity-50 cursor-not-allowed":"cursor-pointer",key:e.id,onClick:()=>{t||(e=>{if(!i.find(t=>t.id===e.id)){const t=[...i,e];a(t),o(t.map(e=>e.id)),l(""),f(!1)}})(e)}},e.name)}):(0,r.createElement)(Cv.Empty,null,s.length<2?(0,Xc.__)("Type at least 2 letters to search","power-coupons"):d?(0,Xc.__)("Searching…","power-coupons"):(0,Xc.__)("No categories found","power-coupons")))))),i.length>0&&(0,r.createElement)("div",{className:"flex flex-wrap gap-2 mt-2"},i.map(e=>(0,r.createElement)(du,{closable:!0,onClose:()=>(e=>{const t=i.filter(t=>t.id!==e);a(t),o(t.map(e=>e.id))})(e.id),key:e.id,label:e.name,size:"sm",type:"pill",variant:"neutral"}))))},Wv=({placeholder:e,value:t=0,onChange:n,portalId:o="power-coupons-settings"})=>{const[i,a]=(0,r.useState)(null),[s,l]=(0,r.useState)(""),[c,u]=(0,r.useState)([]),[d,p]=(0,r.useState)(!1),[m,f]=(0,r.useState)(!1),g=(0,r.useRef)(null);(0,r.useEffect)(()=>{t&&h(t)},[]),(0,r.useEffect)(()=>(g.current&&clearTimeout(g.current),s.length>2?(p(!0),g.current=setTimeout(()=>{y(s),f(!0)},400)):(u([]),f(!1)),()=>{g.current&&clearTimeout(g.current)}),[s]);const h=async e=>{try{const t=new FormData;t.append("action","power_coupons_get_pages_by_ids"),t.append("_wpnonce",window.powerCouponsSettings?.update_nonce||""),t.append("ids[0]",e);const n=await fetch(ajaxurl,{method:"POST",body:t}),r=await n.json();r.success&&r.data.length>0&&a(r.data[0])}catch(e){console.error("Error fetching page by ID:",e)}},y=async e=>{p(!0);try{const t=window.powerCouponsSettings?.update_nonce,n=new FormData;n.append("action","power_coupons_search_pages"),n.append("term",e),n.append("_wpnonce",t||"");const r=await fetch(ajaxurl,{method:"POST",body:n}),o=await r.json();o.success?u(o.data):(console.error("Search failed:",o),u([]))}catch(e){console.error("Error searching pages:",e),u([])}p(!1)},x=Boolean(i);return(0,r.createElement)("div",{className:"relative"},(0,r.createElement)(Cv,{variant:"secondary",closeAfterSelect:!1,loading:d,setOpen:f,open:!x&&m,size:"md"},(0,r.createElement)(Cv.Input,{className:"w-[98%] [&_span]:hidden",placeholder:e,value:x?i.name:s,onChange:l,readOnly:x}),(0,r.createElement)(Cv.Portal,{id:o},(0,r.createElement)(Cv.Content,null,(0,r.createElement)(Cv.List,null,c.length>0?c.map(e=>(0,r.createElement)(Cv.Item,{className:"cursor-pointer",key:e.id,onClick:()=>(e=>{a(e),n(e.id),l(""),u([]),f(!1)})(e)},e.name)):(0,r.createElement)(Cv.Empty,null,s.length<3?(0,Xc.__)("Type at least 3 letters to search","power-coupons"):d?(0,Xc.__)("Searching…","power-coupons"):(0,Xc.__)("No pages found","power-coupons")))))),x&&(0,r.createElement)("button",{type:"button","aria-label":(0,Xc.__)("Clear selected page","power-coupons"),onClick:()=>{a(null),l(""),u([]),n(0)},className:"absolute inset-y-0 right-3 z-20 my-auto flex h-5 w-5 items-center justify-center rounded-full border-0 bg-transparent p-0 text-text-secondary cursor-pointer hover:text-text-primary"},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4","aria-hidden":"true"},(0,r.createElement)("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"}))))},Vv={toggle:pv,dropdown:function(e){const{title:t,description:n,name:o,optionsArray:i,disabled:a=!1}=e,[s,l]=K(),c=zf(o),u=Pf(s,c),d=(0,r.useRef)((0,Of.debounce)(async e=>{l(e)},500)).current;(0,r.useEffect)(()=>()=>{d.cancel()},[d]);const p=Object.keys(i).find(e=>i[e].id===u)||"0",[m,f]=(0,r.useState)(i[p]),g=`dropdown-${o.replace(/[\[\]]/g,"-")}`;return(0,r.createElement)(Bf,{title:t,description:n,disabled:a},(0,r.createElement)("div",{className:"flex-grow w-[25%]"},(0,r.createElement)(Hx,{name:o,value:m,onChange:e=>{f(e),function(e){if(Pf(s,c)!==e){const t=Rf(s,c,e);d({type:"CHANGE",data:t})}}(e.id)},as:"div",id:g},(0,r.createElement)(Hx.Label,{className:"sr-only"},t),(0,r.createElement)("div",{className:"relative mt-1 w-full min-w-32"},(0,r.createElement)(Hx.Button,{className:"relative w-full py-2 pl-3 pr-10 text-left bg-white rounded-md cursor-pointer border border-solid border-border-subtle active:border-wpcolor active:outline-none sm:text-sm focus:outline-none focus:ring-2 focus:ring-wpcolor focus:border-wpcolor","aria-labelledby":`${g}-label`},(0,r.createElement)("span",{className:"block truncate",id:`${g}-label`},m.name),(0,r.createElement)("span",{className:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"},(0,r.createElement)(sv,{className:"w-5 h-5 text-gray-400","aria-hidden":"true"}))),(0,r.createElement)(iv,{as:r.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0"},(0,r.createElement)(Hx.Options,{className:"absolute min-w-full w-auto py-1 mt-1 z-40 overflow-auto text-base bg-white rounded-md shadow-lg max-h-60 ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm"},i.map((e,t)=>(0,r.createElement)(Hx.Option,{key:t,className:({active:e})=>(e?" text-white bg-wpcolor":"text-gray-900")+"\n\t\t\t\t\t\t\t\t\tcursor-default select-none relative py-1 px-3 whitespace-nowrap",value:e},({active:t,selected:n})=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:(n?"font-medium":"font-normal")+" block"},e.name),n?(0,r.createElement)("span",{className:(t?"text-wpcolor":"text-wpcolor20")+"\n\t\t\t\t\t\t\t\t\t\t\tabsolute inset-y-0 left-0 flex items-center pl-3","aria-hidden":"true"}):null))))))),(0,r.createElement)("input",{type:"hidden",name:o,value:m.id,"aria-hidden":"true"})))},text:function(e){const{title:t,description:n,disabled:o=!1}=e;return(0,r.createElement)(Bf,{title:t,description:n,type:"block",disabled:o},(0,r.createElement)("div",{className:"flex-grow"},(0,r.createElement)(dv,{name:e.name,val:e.value,max:e.max})))},number:function(e){const{title:t,description:n,name:o,value:i,badge:a,min:s,type:l,disabled:c=!1}=e;return(0,r.createElement)(Bf,{title:t,description:n,badge:a,disabled:c},(0,r.createElement)("div",{className:"power_coupons-input-field-wrapper"},(0,r.createElement)(uv,{name:o,val:i,badge:a,min:s,type:l})))},color:function(e){const{title:t,description:n}=e;return(0,r.createElement)(Bf,{title:t,description:n},(0,r.createElement)("div",{className:"power_coupons-color-field"},(0,r.createElement)(Yf,{name:e.name,value:e.value,defaultColor:e.default})))},coupon_template_picker:({name:e,value:t,title:n,description:o,disabled:i=!1})=>{const a=powerCouponsSettings.coupon_templates,[s,l]=K(),c=t=>{const n=JSON.parse(JSON.stringify(s)),r=e.split(/[\[\]]/).filter(e=>e);r.length>=2&&(n[r[0]][r[1]]=t),l({type:"CHANGE",data:n})};return(0,r.createElement)(Bf,{disabled:i,type:"block",title:n,description:o},(0,r.createElement)(wv.Group,{columns:Object.keys(a).length,onChange:c,size:"md",value:t},(0,r.createElement)("div",{className:"flex gap-6"},Object.keys(a).map(e=>(0,r.createElement)("div",{key:e,className:"flex gap-[26px]"},(0,r.createElement)("button",{onClick:()=>c(e),className:"bg-transparent border-0 p-0 m-0 cursor-pointer power-coupons-coupon-style-btn",style:{direction:"ltr"},type:"button"},Ff(powerCouponsSettings.coupon_templates[e]),(0,r.createElement)(wv.Button,{value:e})))))))},product_search:function(e){const{title:t,description:n,name:o,disabled:i=!1}=e,[a,s]=K(),l=zf(o),c=Pf(a,l)||[];return(0,r.createElement)(Bf,{title:t,description:n,type:"block",disabled:i},(0,r.createElement)("div",{className:"flex-grow"},(0,r.createElement)(Uv,{label:"",placeholder:"Search products…",value:c,onChange:e=>{const t=Rf(a,l,e);s({type:"CHANGE",data:t})},portalId:"power-coupons-settings"})))},category_search:function(e){const{title:t,description:n,name:o,disabled:i=!1}=e,[a,s]=K(),l=zf(o),c=Pf(a,l)||[];return(0,r.createElement)(Bf,{title:t,description:n,type:"block",disabled:i},(0,r.createElement)("div",{className:"flex-grow"},(0,r.createElement)(Bv,{label:"",placeholder:"Search categories…",value:c,onChange:e=>{const t=Rf(a,l,e);s({type:"CHANGE",data:t})}})))},page_search:function(e){const{title:t,description:n,name:o,disabled:i=!1}=e,[a,s]=K(),l=zf(o),c=Pf(a,l)||0;return(0,r.createElement)(Bf,{title:t,description:n,type:"block",disabled:i},(0,r.createElement)("div",{className:"flex-grow"},(0,r.createElement)(Wv,{placeholder:(0,Xc.__)("Search pages…","power-coupons"),value:c,onChange:e=>{const t=Rf(a,l,e);s({type:"CHANGE",data:t})},portalId:"power-coupons-settings"})))}},Hv=(e,t)=>{const n=e.split(/[\[\]]/).filter(Boolean);return 2===n.length?t[n[0]][n[1]]:t[e]},Gv=(e,t)=>!e||e.fields.every(e=>{const n=Hv(e.name,t);return void 0===n||("!=="===e.operator?n!==e.value:n===e.value)}),$v=function({field:e,disabled:t=!1}){const n=K(),[o]=n,i=Vv[e.type];if(!i)return null;if(!Gv(e.conditions,o))return null;const a=!!e.disabled_conditions&&!Gv(e.disabled_conditions,o),s={title:e.label,description:e.description,name:e.name,badge:e.badge,min:e.min,max:e.max,disabled:t||a};return s.value=Hv(e.name,o),e.options&&(s.optionsArray=e.options),e.type_attr&&(s.type=e.type_attr),e.default_var&&"color"===e.type&&(s.default=o.color_default_vars[e.default_var]),(0,r.createElement)(i,{...s})};function Zv(e){const t=Object.values(e);return Array.isArray(t)?[...t].sort((e,t)=>("number"==typeof e.priority?e.priority:0)-("number"==typeof t.priority?t.priority:0)):t}const qv=function({fields:e,masterDisabled:t=!1,masterFieldName:n=""}){if(!e?.sections)return(0,r.createElement)("div",{className:"h-auto px-6 bg-background-primary rounded-xl shadow-sm"},Zv(e).map(e=>(0,r.createElement)($v,{key:e.name,field:e,disabled:t&&e.name!==n})));const o=e.sections,i=Object.entries(o).sort(([,e],[,t])=>("number"==typeof e.priority?e.priority:0)-("number"==typeof t.priority?t.priority:0));return(0,r.createElement)(r.Fragment,null,i.map(e=>{const o=e[1];return 0===o.field_args.length||0===Object.values(o.field_args).map(e=>$v({field:e})).filter(Boolean).length?null:(0,r.createElement)("div",{key:e[0],className:"h-auto px-6 bg-background-primary rounded-xl shadow-sm mb-6"},(0,r.createElement)("h3",{className:"text-[18px] font-semibold text-[#111827] mb-0 leading-6 tracking-[-0.5%]"},o.label),Zv(o.field_args).map(e=>(0,r.createElement)($v,{key:e.name,field:e,disabled:t&&e.name!==n})))}))},Xv=({title:e="",description:t="",icon:n=null,iconPosition:r="right",tag:o="h2",size:i="sm",className:a=""})=>{const s={xs:"gap-1 [&>svg]:size-3.5",sm:"gap-1 [&>svg]:size-4",md:"gap-1.5 [&>svg]:size-5",lg:"gap-1.5 [&>svg]:size-5"};if(!e)return null;const l=()=>(0,ee.jsx)(o,{className:qe("font-semibold p-0 m-0",{xs:"text-base [&>*]:text-base gap-1",sm:"text-lg [&>*]:text-lg gap-1",md:"text-xl [&>*]:text-xl gap-1.5",lg:"text-2xl [&>*]:text-2xl gap-1.5"}[i]),children:e});return t?(0,ee.jsxs)("div",{className:a,children:[(0,ee.jsxs)("div",{children:[n&&"left"===r&&(0,ee.jsxs)("div",{className:qe("flex items-center",s[i]),children:[n,l()]}),n&&"right"===r&&(0,ee.jsxs)("div",{className:qe("flex items-center",s[i]),children:[l(),n]}),!n&&l()]}),(0,ee.jsx)("p",{className:qe("text-text-secondary font-normal my-0",{xs:"text-sm",sm:"text-sm",md:"text-base",lg:"text-base"}[i]),children:t})]}):(0,ee.jsxs)("div",{className:a,children:[n&&"left"===r&&(0,ee.jsxs)("div",{className:qe("flex items-center",s[i]),children:[n,l()]}),n&&"right"===r&&(0,ee.jsxs)("div",{className:qe("flex items-center",s[i]),children:[l(),n]}),!n&&l()]})},Jv=()=>(0,r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,r.createElement)("path",{d:"M7 17L17 7"}),(0,r.createElement)("path",{d:"M7 7h10v10"})),Kv=function({title:e,description:t,buttonLabel:n,utmMedium:o="free-power-coupons",className:i=""}){const a=e||(0,Xc.__)("Looking to unlock more advanced coupon features?","power-coupons"),s=t||(0,Xc.__)("Upgrade to Power Coupons Pro to unlock BOGO offers, advanced discount rules, loyalty points, and more.","power-coupons"),l=n||(0,Xc.__)("Upgrade now","power-coupons"),c=`https://cartflows.com/power-coupons-for-woocommerce/pricing/?utm_source=dashboard&utm_medium=${encodeURIComponent(o)}&utm_campaign=go-pro`;return(0,r.createElement)("div",{className:`flex flex-row items-stretch gap-2 p-3 rounded-lg border border-solid border-wpcolor bg-wpcolorfaded shadow-sm ${i}`,role:"banner"},(0,r.createElement)("div",{className:"flex flex-row items-center gap-2 flex-1"},(0,r.createElement)("div",{className:"flex flex-col gap-1 flex-1"},(0,r.createElement)("span",{className:"text-sm font-semibold text-text-primary leading-5"},a),(0,r.createElement)("span",{className:"text-sm font-normal text-text-secondary leading-5"},s)),(0,r.createElement)("div",{className:"flex items-center gap-2 shrink-0"},(0,r.createElement)("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm font-medium text-wpcolor hover:text-wphovercolor focus:text-wphovercolor no-underline ring-0 focus:ring-0 focus-visible:ring-0 focus:outline-0"},l,(0,r.createElement)(Jv,null)))))};function eb(e){return e?`https://cartflows.com/power-coupons-for-woocommerce/pricing/?utm_source=dashboard&utm_medium=${encodeURIComponent(e)}&utm_campaign=go-pro`:"https://cartflows.com/power-coupons-for-woocommerce/pricing/?utm_source=dashboard&utm_medium=free-power-coupons&utm_campaign=go-pro"}const tb=function({title:e,subtitle:t,description:n=[],visual:o=null,buttonLabel:i,utmMedium:a,className:s=""}){const l=i||(0,Xc.__)("Upgrade Now","power-coupons");return(0,r.createElement)("div",{role:"article",className:`flex flex-col gap-2 p-4 bg-background-primary border border-solid border-border-subtle rounded-xl shadow-sm ${s}`},(0,r.createElement)(Ft,{containerType:"flex",direction:"row",wrap:"wrap",className:"gap-2 p-2 bg-background-secondary rounded-lg"},(0,r.createElement)("div",{className:"flex flex-col sm:flex-row gap-6 p-6 bg-background-primary rounded-md shadow-sm w-full"},o&&(0,r.createElement)("div",{className:"flex flex-col gap-2 p-2 shrink-0"},(0,r.createElement)("div",{className:"w-56 h-48 rounded flex items-center justify-center bg-wpcolorfaded"},o)),(0,r.createElement)("div",{className:"flex flex-col justify-center gap-3 flex-1"},(0,r.createElement)("div",{className:"flex flex-col gap-2"},(0,r.createElement)("h2",{className:"m-0 text-xl font-semibold text-text-primary leading-[1.4] tracking-tight"},e),t&&(0,r.createElement)("p",{className:"m-0 text-base font-normal text-text-secondary leading-6"},t)),Array.isArray(n)&&n.length>0&&(0,r.createElement)("ul",{className:"list-disc list-outside ml-5 my-0 space-y-1.5 text-text-secondary"},n.map((e,t)=>(0,r.createElement)("li",{key:t,className:"text-base font-normal leading-7"},e))),(0,r.createElement)("div",{className:"flex flex-row items-center gap-3 pt-2"},(0,r.createElement)("a",{href:eb(a),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center px-4 py-2 rounded-md text-sm font-semibold text-white bg-wpcolor hover:bg-wphovercolor focus:bg-wphovercolor no-underline border-0 ring-0 focus:ring-0 focus-visible:ring-0 focus:outline-0"},l))))))},nb={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.2,stroke:"currentColor",className:"w-24 h-24 text-wpcolor","aria-hidden":!0},rb=()=>(0,r.createElement)("svg",{...nb},(0,r.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125Z"})),ob=()=>(0,r.createElement)("svg",{...nb},(0,r.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.562.562 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.562.562 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5Z"})),ib=()=>(0,r.createElement)("svg",{...nb},(0,r.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 11.25v8.25a1.5 1.5 0 01-1.5 1.5H5.25a1.5 1.5 0 01-1.5-1.5v-8.25M12 4.875A2.625 2.625 0 109.375 7.5H12m0-2.625V7.5m0-2.625A2.625 2.625 0 1114.625 7.5H12m0 0V21m-8.625-9.75h18c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125h-18c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"})),ab=function({tabKey:e}){var t,n;const o=powerCouponsSettings.settings_tabs?.[e]||{},i=o?.title||o?.name,a=powerCouponsSettings.settings_fields?.[e]||[],[s]=K(),l=o?.subtabs||[],c=l.length>0,[u,d]=(0,r.useState)(c?l[0].slug:"");if(o?.is_pro_upsell&&!window.powerCouponsSettings?.is_pro_active){const t={power_coupons_cart_progress_bar:{title:(0,Xc.__)("Boost AOV with a Cart Progress Bar","power-coupons"),subtitle:(0,Xc.__)("Encourage shoppers to add more to their cart by showing a live progress indicator toward rewards like free shipping or discounts.","power-coupons"),description:[(0,Xc.__)("Set dynamic milestones tied to cart total or item count","power-coupons"),(0,Xc.__)("Customise bar colours, messaging, and success states to match your brand","power-coupons"),(0,Xc.__)("Displayed on cart and checkout pages with smooth animations","power-coupons")],utmMedium:"free-power-coupons-cart-progress-bar",visual:(0,r.createElement)(rb,null)},power_coupons_points:{title:(0,Xc.__)("Reward loyal customers with Points & Rewards","power-coupons"),subtitle:(0,Xc.__)("Give shoppers credit for every order, nudge repeat purchases, and let them redeem points for discounts — all on autopilot.","power-coupons"),description:[(0,Xc.__)("Automatically award points on purchases with configurable earn rates","power-coupons"),(0,Xc.__)("Let customers redeem points as cart discounts at checkout","power-coupons"),(0,Xc.__)("Run time-boxed campaigns, control expiry, and view each customer’s balance","power-coupons")],utmMedium:"free-power-coupons-points",visual:(0,r.createElement)(ob,null)},power_coupons_gift_cards:{title:(0,Xc.__)("Sell Gift Cards and grow revenue","power-coupons"),subtitle:(0,Xc.__)("Let customers buy gift cards for friends and family. Perfect for holidays, launches, and recovering lost sales.","power-coupons"),description:[(0,Xc.__)("Offer preset and custom gift card amounts with branded designs","power-coupons"),(0,Xc.__)("Redeem gift cards as discount credits at checkout","power-coupons"),(0,Xc.__)("Restrict redemption by product or category for full control","power-coupons")],utmMedium:"free-power-coupons-gift-cards",visual:(0,r.createElement)(ib,null)}}[e];if(t)return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Xv,{description:"",icon:null,size:"md",tag:"h2",title:i,className:"mb-6 [&_h2]:text-gray-900 text-xl"}),(0,r.createElement)(tb,{title:t.title,subtitle:t.subtitle,description:t.description,visual:t.visual,utmMedium:t.utmMedium}))}const p="power_coupons_general"===e;if(c){var m,f,g,h;const e=a.filter(e=>e.subtab===u),t=null===(m=s?.points_settings?.enable)||void 0===m||m,n=null===(f=s?.points_settings?.enable_redemption)||void 0===f||f,o=null===(g=s?.points_settings?.enable_expiry)||void 0===g||g,c=["points_settings[redemption_mode]","points_settings[min_points_to_redeem]","points_settings[redemption_ratio]","points_settings[max_discount_type]","points_settings[max_discount_value]","points_settings[combine_with_coupons]","points_settings[max_credits_per_order]"],p=["points_settings[expiry_days]","points_settings[expiry_notice_days]"],y=null===(h=s?.gift_card_settings?.enable)||void 0===h||h,x=e=>e.startsWith("points_settings[")?!("points_settings[enable]"===e||t&&("points_settings[enable_redemption]"===e||"points_settings[enable_expiry]"===e||(n||!c.includes(e))&&(o||!p.includes(e)))):!!e.startsWith("gift_card_settings[")&&"gift_card_settings[enable]"!==e&&!y;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Xv,{description:"",icon:null,size:"md",tag:"h2",title:i,className:"mb-6 [&_h2]:text-gray-900 text-xl"}),(0,r.createElement)("div",{className:"h-auto bg-background-primary rounded-xl"},(0,r.createElement)("div",{className:"flex gap-0 border-0 border-b border-solid border-border-subtle px-6"},l.map(e=>(0,r.createElement)("button",{key:e.slug,type:"button",onClick:()=>d(e.slug),className:"px-3 py-3 text-sm font-medium border-0 border-b-2 border-solid transition-colors bg-transparent cursor-pointer "+(u===e.slug?"border-b-[#f06434] text-[#f06434]":"border-b-transparent text-text-tertiary hover:text-text-primary")},e.title))),(0,r.createElement)("div",{className:"px-6"},function(e){const t=Object.values(e);return Array.isArray(t)?[...t].sort((e,t)=>("number"==typeof e.priority?e.priority:0)-("number"==typeof t.priority?t.priority:0)):t}(e).map(e=>(0,r.createElement)($v,{key:e.name,field:e,disabled:x(e.name)})))))}const y=a,x=p&&!window.powerCouponsSettings?.is_pro_active,v={power_coupons_general:{field:"general[enable_plugin]",enabled:null===(t=s?.general?.enable_plugin)||void 0===t||t},power_coupons_url_coupons:{field:"url_coupon_settings[enable]",enabled:null===(n=s?.url_coupon_settings?.enable)||void 0===n||n}}[e];return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Xv,{description:"",icon:null,size:"md",tag:"h2",title:i,className:"mb-6 [&_h2]:text-gray-900 text-xl"}),(0,r.createElement)(qv,{fields:y,masterDisabled:!!v&&!v.enabled,masterFieldName:v?v.field:""}),x&&(0,r.createElement)(Kv,{className:"mt-6",utmMedium:"free-power-coupons-general"}))},sb=function(e){const{navigate:t}=e,[n]=K();if("Activated"!==n.license_status)return(0,r.createElement)("div",{className:"relative"},(0,r.createElement)(Ft,{align:"center",containerType:"flex",direction:"row",justify:"center",className:"absolute top-0 left-0 w-full h-full bg-opacity-50 backdrop-blur-sm bg-white/30 z-[9]"},(0,r.createElement)(Ft.Item,{className:"absolute p-6 bg-white shadow-md rounded-lg text-center"},(0,r.createElement)(Ft,{containerType:"flex",direction:"row",justify:"center",className:"mb-4"},(0,r.createElement)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:"h-8 w-8 text-red-500 stroke-1"},(0,r.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"}))),(0,r.createElement)(Xv,{size:"md",tag:"h2",title:(0,Xc.__)("Activate Your License","power-coupons"),description:(0,Xc.__)("Please activate your license to get access to all features.","power-coupons"),className:"mb-6 text-center [&_h2]:text-gray-900 [&_p]:!text-text-field-helper text-xl"}),(0,r.createElement)(Jt,{variant:"primary",onClick:()=>{t("power_coupons_license")},className:"inline-flex justify-center items-center gap-1.5 rounded px-3 py-2 text-sm font-normal shadow-sm text-wpcolor hover:text-white border border-solid border-wpcolor bg-white hover:bg-wpcolor outline-0 hover:outline-0 focus:ring-0"},(0,Xc.__)("Activate License","power-coupons")))),(0,r.createElement)("div",{className:"pointer-events-none select-none px-6"},(0,r.createElement)(pv,{title:(0,Xc.__)("Enable Plugin","power-coupons"),description:(0,Xc.__)("Enable or disable Power Coupons functionality globally","power-coupons"),name:"general[enable_plugin]",value:n?.general?.enable_plugin}),(0,r.createElement)(pv,{title:(0,Xc.__)("Show on Cart","power-coupons"),description:(0,Xc.__)("Display available coupons on cart page","power-coupons"),name:"general[show_on_cart]",value:n?.general?.show_on_cart}),(0,r.createElement)(pv,{title:(0,Xc.__)("Show on Checkout","power-coupons"),description:(0,Xc.__)("Display available coupons on checkout page","power-coupons"),name:"general[show_on_checkout]",value:n?.general?.show_on_checkout})))},lb=window.wp.apiFetch;var cb=o.n(lb);const ub=function(){const[e,t]=K(),n=!(!e.license_status||"Activated"!==e.license_status),o=(0,Xc.__)("Activate License","power-coupons"),i=(0,Xc.__)("Deactivate License","power-coupons"),[a,s]=(0,r.useState)({licenseButtonText:n?i:o,licenseActivationProcess:!1}),{licenseButtonText:l,licenseActivationProcess:c}=a,[u,d]=(0,r.useState)(n?"**************************":""),[p,m]=(0,r.useState)(!1),[f,g]=(0,r.useState)(n),h=(0,r.useRef)(null),y="disabled:pointer-events-none disabled:bg-gray-200 disabled:text-while disabled:border-none disabled:text-gray-400";(0,r.useEffect)(()=>{h.current&&h.current.focus()},[]);const x=function(r){if(r.preventDefault(),m(!1),""===u&&!n)return void m((0,Xc.__)("Please enter a valid license key!","power-coupons"));r.target.disabled=!0;const a=r.currentTarget.dataset.nonce;let l=r.currentTarget.dataset.action;s({licenseButtonText:(0,Xc.__)("Processing","power-coupons"),licenseActivationProcess:!0}),l="activate_license"===l?"power_coupons_activate_license":"power_coupons_deactivate_license";const c=new window.FormData;c.append("action",l),c.append("license_key",u),c.append("security",a),cb()({url:powerCouponsSettings.ajax_url,method:"POST",body:c}).then(n=>{if(n.success)r.target.blur(),"power_coupons_activate_license"===l?(t({type:"CHANGE",data:{...e,license_status:"Activated"}}),g(!0),s({licenseButtonText:i,licenseActivationProcess:!1}),d("**************************"),h.current.classList.add("disabled"),h.current.readOnly=!0,r.target.disabled=!1):(t({type:"CHANGE",data:{...e,license_status:"Deactivated"}}),g(!1),s({licenseButtonText:o,licenseActivationProcess:!1}),h.current.classList.remove("disabled"),h.current.readOnly=!1,d(""),r.target.disabled=!1);else{const e=n.data.error||n.data||"";m(e||(0,Xc.__)("Unknown error occurred while activating the license.","power-coupons")),r.target.blur(),s({licenseButtonText:o,licenseActivationProcess:!1})}}).catch(()=>{m((0,Xc.__)("A network error occurred. Please try again.","power-coupons"))}).finally(()=>{r.target.disabled=!1,s(e=>({...e,licenseActivationProcess:!1}))})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Xv,{description:"",icon:null,size:"md",tag:"h2",title:(0,Xc.__)("My Account","power-coupons"),className:"mb-6 [&_h2]:text-gray-900 text-xl"}),(0,r.createElement)("div",{className:"h-auto bg-background-primary rounded-xl shadow-sm"},(0,r.createElement)(Ft,{containerType:"flex",direction:"column",className:"p-6"},(0,r.createElement)(Ft.Item,null,(0,r.createElement)(ut,{className:"font-semibold mb-1",htmlFor:"default-width",size:"md"},(0,Xc.__)("License Key","power-coupons")),(0,r.createElement)("p",{className:"font-normal text-sm text-text-field-helper m-0 mb-4"},Ff((0,Xc.sprintf)(
// translators: %1$s: link html start, %2$s: link html end
// translators: %1$s: link html start, %2$s: link html end
(0,Xc.__)("Enter your valid license key below to activate Power Coupons Pro. If you don't have a license key yet, you can get it from %1$shere%2$s.","power-coupons"),'<a href="https://my.cartflows.com/account/api-keys/" class="text-wpcolor hover:text-wphovercolor no-underline" target="_blank">',"</a>")))),(0,r.createElement)(Ft.Item,{className:"w-full relative flex gap-4 flex-col sm:flex-row"},(0,r.createElement)("div",{className:"flex-grow relative"},(0,r.createElement)(cv,{type:"text",size:"md",prefix:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"h-4 w-6 text-gray-400"},(0,r.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z"})),className:"h-full w-full power-coupons-license-key disabled:!bg-gray-100 focus:[&>input]:ring-focus "+(p?"!border-border-subtle focus:border-wpcolor !shadow-none !outline-0 !outline-none":""),name:"power_coupons_setting[license_key]",value:u,onChange:e=>d(e),disabled:!!n,ref:h}),n&&(0,r.createElement)(Ft,{align:"center",containerType:"flex",direction:"row",className:"pointer-events-none absolute top-[0.3rem] h-9 right-0 pr-3"},(0,r.createElement)(Ft.Item,null,(0,r.createElement)("svg",{className:"h-5 w-5 text-green-500",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},(0,r.createElement)("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z",clipRule:"evenodd"})))),p&&(0,r.createElement)(Ft,{align:"center",containerType:"flex",direction:"row",className:"pointer-events-none absolute top-[0.3rem] h-9 right-0 pr-3"},(0,r.createElement)(Ft.Item,null,(0,r.createElement)("svg",{className:"h-5 w-5 text-red-500",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},(0,r.createElement)("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"}))))),(0,r.createElement)("div",null,f?(0,r.createElement)(Jt,{variant:"primary",className:`${y} w-full bg-wpcolor hover:bg-wphovercolor outline-0 hover:outline-0 focus:ring-0`,onClick:x,icon:c&&(0,r.createElement)(kv,{className:"bg-transparent text-white",icon:null,size:"sm",variant:"primary"}),iconPosition:"right","data-action":"deactivate_license","data-nonce":powerCouponsSettings.license_nonces.deactivate_license_nonce},l):(0,r.createElement)(Jt,{variant:"primary",className:`${y} w-full bg-wpcolor hover:bg-wphovercolor outline-0 hover:outline-0 focus:ring-0`,onClick:x,icon:c&&(0,r.createElement)(kv,{className:"bg-transparent text-white",icon:null,size:"sm",variant:"primary"}),iconPosition:"right","data-action":"activate_license","data-nonce":powerCouponsSettings.license_nonces.activate_license_nonce},l))),p&&(0,r.createElement)(Ft.Item,null,(0,r.createElement)("div",{className:"license-errors text-wpcolor"},Ff(String(p)))))))},db=function(e){const{navigation:t,tab:n,navigate:o}=e,[i]=K(),a=!!i?.pro_version&&"Activated"!==i.license_status&&"power_coupons_license"!==n;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"mcw-sidebar h-full min-h-screen flex flex-col w-auto -ml-2.5 md:-ml-5 sticky top-0 lg:top-4"},(0,r.createElement)(Mf,{borderOn:!0,className:"!h-full md:pl-3 lg:p-4 lg:w-64 border-none rounded-br-lg box-border flex-grow"},(0,r.createElement)(Mf.Body,null,(0,r.createElement)(Mf.Item,null,(0,r.createElement)(jf,{className:"w-full p-0 gap-4",size:"md"},(0,r.createElement)(jf.List,{open:!0},t.map(e=>(0,r.createElement)(jf.Item,{key:e.slug,active:n===e.slug,onClick:()=>{o(e.slug)},className:`lg:justify-start justify-center h-9 ${n===e.slug&&"bg-wphovercolorfaded font-medium"} hover:bg-wphovercolorfaded`},powerCouponsSettings.settings_icons[e.slug]&&Ff(powerCouponsSettings.settings_icons[e.slug]),(0,r.createElement)("span",{className:"lg:block hidden"},e.name))))),(0,r.createElement)(Ft,{containerType:"flex",direction:"column",gap:"xs",className:"lg:p-4 mt-7 lg:border lg:border-solid lg:border-wpcolor rounded-md"},(0,r.createElement)(Ft.Item,{className:"lg:flex gap-2 items-center hidden"},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"h-5 w-5 text-wpcolor",strokeLinecap:"round",strokeLinejoin:"round"},(0,r.createElement)("path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z"}),(0,r.createElement)("path",{d:"M21 16v2a4 4 0 0 1-4 4h-5"})),(0,r.createElement)(ut,{size:"md",className:"font-semibold"},(0,Xc.__)("Need Support?","power-coupons"))),(0,r.createElement)(Ft.Item,{className:"lg:block hidden"},(0,r.createElement)("p",{className:"font-normal text-sm text-text-field-helper m-0 pb-2"},(0,Xc.__)("We're happy to help!","power-coupons"))),(0,r.createElement)(Ft.Item,null,(0,r.createElement)("a",{href:"https://cartflows.com/support",target:"_blank",rel:"noreferrer",className:"flex justify-center p-2.5 no-underline text-white hover:text-white bg-wpcolor hover:bg-wphovercolor rounded-md box-content outline-0 hover:outline-0 focus:ring-0 focus-visible:ring-1 ring-black"},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.7,stroke:"currentColor",className:"h-5 w-5 block lg:hidden",strokeLinecap:"round",strokeLinejoin:"round"},(0,r.createElement)("path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z"}),(0,r.createElement)("path",{d:"M21 16v2a4 4 0 0 1-4 4h-5"})),(0,r.createElement)("span",{className:"text-center w-full text-sm font-semibold lg:block hidden p-0"},(0,Xc.__)("Request Support","power-coupons"))))))))),(0,r.createElement)(Ft,{className:"w-full max-w-[43.5rem] mx-auto mt-8 pr-4 pb-5 gap-0",direction:"column"},"power_coupons_license"===n&&(0,r.createElement)(ub,null),"power_coupons_license"!==n&&a&&(0,r.createElement)(sb,{navigate:o}),"power_coupons_license"!==n&&!a&&(0,r.createElement)(ab,{key:n,tabKey:n})))},pb="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgwIiBoZWlnaHQ9IjI4MCIgdmlld0JveD0iMCAwIDI4MCAyODAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0yMTEuNjggNzIuNDY0MVYxNTguNjQ4QzIxMS42OCAxNjAuODMyIDIwOS44ODggMTYyLjU2OCAyMDcuNzYgMTYyLjU2OEg3MC45NTIyQzY4Ljc2ODIgMTYyLjU2OCA2Ny4wMzIyIDE2MC44MzIgNjcuMDMyMiAxNTguNjQ4VjcyLjQ2NDFDNjcuMDMyMiA3MC4yODAxIDY4Ljc2ODIgNjguNTQ0MSA3MC45NTIyIDY4LjU0NDFIMjA3LjcwNEMyMDkuODg4IDY4LjU0NDEgMjExLjYyNCA3MC4yODAxIDIxMS42OCA3Mi40NjQxWiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTIwNy43MDQgMTYyLjg0OEg3MC45NTJDNjguNiAxNjIuODQ4IDY2Ljc1MiAxNjAuOTQ0IDY2Ljc1MiAxNTguNjQ4VjcyLjQ2NEM2Ni43NTIgNzAuMTEyIDY4LjY1NiA2OC4yNjQgNzAuOTUyIDY4LjI2NEgyMDcuNzA0QzIxMC4wNTYgNjguMjY0IDIxMS45MDQgNzAuMTY4IDIxMS45MDQgNzIuNDY0VjE1OC42NDhDMjExLjk2IDE2MC45NDQgMjEwLjA1NiAxNjIuODQ4IDIwNy43MDQgMTYyLjg0OFpNNzAuOTUyIDY4LjgyNEM2OC45MzYgNjguODI0IDY3LjMxMiA3MC40NDggNjcuMzEyIDcyLjQ2NFYxNTguNjQ4QzY3LjMxMiAxNjAuNjY0IDY4LjkzNiAxNjIuMjg4IDcwLjk1MiAxNjIuMjg4SDIwNy43MDRDMjA5LjcyIDE2Mi4yODggMjExLjM0NCAxNjAuNjY0IDIxMS4zNDQgMTU4LjY0OFY3Mi40NjRDMjExLjM0NCA3MC40NDggMjA5LjcyIDY4LjgyNCAyMDcuNzA0IDY4LjgyNEg3MC45NTJaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0yMDUuNjg4IDc0LjQyNDFINzIuOTEyMVYxNTYuNjg4SDIwNS42ODhWNzQuNDI0MVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0yMDUuNzQ0IDE1Ni45NjhINzIuOTExOEM3Mi43NDM4IDE1Ni45NjggNzIuNjMxOCAxNTYuODU2IDcyLjYzMTggMTU2LjY4OFY3NC40MjRDNzIuNjMxOCA3NC4yNTYgNzIuNzQzOCA3NC4xNDQgNzIuOTExOCA3NC4xNDRIMjA1Ljc0NEMyMDUuOTEyIDc0LjE0NCAyMDYuMDI0IDc0LjI1NiAyMDYuMDI0IDc0LjQyNFYxNTYuNjg4QzIwNi4wMjQgMTU2Ljg1NiAyMDUuOTEyIDE1Ni45NjggMjA1Ljc0NCAxNTYuOTY4Wk03My4yNDc4IDE1Ni40MDhIMjA1LjQ2NFY3NC43MDRINzMuMjQ3OFYxNTYuNDA4WiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNNzAuMDAwMyAxMjEuNDA4QzY5LjI3MjMgMTIxLjQwOCA2OC42NTYyIDEyMC43OTIgNjguNjU2MiAxMjAuMDY0QzY4LjY1NjIgMTE5LjMzNiA2OS4yNzIzIDExOC43MiA3MC4wMDAzIDExOC43MkM3MC43MjgzIDExOC43MiA3MS4zNDQzIDExOS4zMzYgNzEuMzQ0MyAxMjAuMDY0QzcxLjM0NDMgMTIwLjc5MiA3MC43MjgzIDEyMS40MDggNzAuMDAwMyAxMjEuNDA4Wk03MC4wMDAzIDExOS4zMzZDNjkuNjA4MyAxMTkuMzM2IDY5LjI3MjIgMTE5LjY3MiA2OS4yNzIyIDEyMC4wNjRDNjkuMjcyMiAxMjAuNDU2IDY5LjYwODMgMTIwLjc5MiA3MC4wMDAzIDEyMC43OTJDNzAuMzkyMyAxMjAuNzkyIDcwLjcyODMgMTIwLjQ1NiA3MC43MjgzIDEyMC4wNjRDNzAuNzg0MyAxMTkuNjcyIDcwLjQ0ODMgMTE5LjMzNiA3MC4wMDAzIDExOS4zMzZaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNzAuMDAwMyAxMTguMjE2QzY5LjI3MjMgMTE4LjIxNiA2OC42NTYyIDExNy42IDY4LjY1NjIgMTE2Ljg3MlYxMTEuMDQ4QzY4LjY1NjIgMTEwLjMyIDY5LjI3MjMgMTA5LjcwNCA3MC4wMDAzIDEwOS43MDRDNzAuNzI4MyAxMDkuNzA0IDcxLjM0NDMgMTEwLjMyIDcxLjM0NDMgMTExLjA0OFYxMTYuODcyQzcxLjM0NDMgMTE3LjYgNzAuNzg0MyAxMTguMjE2IDcwLjAwMDMgMTE4LjIxNlpNNzAuMDAwMyAxMTAuMzJDNjkuNjA4MyAxMTAuMzIgNjkuMjcyMiAxMTAuNjU2IDY5LjI3MjIgMTExLjA0OFYxMTYuODcyQzY5LjI3MjIgMTE3LjI2NCA2OS42MDgzIDExNy42IDcwLjAwMDMgMTE3LjZDNzAuMzkyMyAxMTcuNiA3MC43MjgzIDExNy4yNjQgNzAuNzI4MyAxMTYuODcyVjExMS4wNDhDNzAuNzg0MyAxMTAuNiA3MC40NDgzIDExMC4yNjQgNzAuMDAwMyAxMTAuMzJaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNzAuMDAwMyAxMjEuNDA4QzY5LjI3MjMgMTIxLjQwOCA2OC42NTYyIDEyMC43OTIgNjguNjU2MiAxMjAuMDY0QzY4LjY1NjIgMTE5LjMzNiA2OS4yNzIzIDExOC43MiA3MC4wMDAzIDExOC43MkM3MC43MjgzIDExOC43MiA3MS4zNDQzIDExOS4zMzYgNzEuMzQ0MyAxMjAuMDY0QzcxLjM0NDMgMTIwLjc5MiA3MC43MjgzIDEyMS40MDggNzAuMDAwMyAxMjEuNDA4Wk03MC4wMDAzIDExOS4zMzZDNjkuNjA4MyAxMTkuMzM2IDY5LjI3MjIgMTE5LjY3MiA2OS4yNzIyIDEyMC4wNjRDNjkuMjcyMiAxMjAuNDU2IDY5LjYwODMgMTIwLjc5MiA3MC4wMDAzIDEyMC43OTJDNzAuMzkyMyAxMjAuNzkyIDcwLjcyODMgMTIwLjQ1NiA3MC43MjgzIDEyMC4wNjRDNzAuNzg0MyAxMTkuNjcyIDcwLjQ0ODMgMTE5LjMzNiA3MC4wMDAzIDExOS4zMzZaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik03MC4wMDAzIDExOC4yMTZDNjkuMjcyMyAxMTguMjE2IDY4LjY1NjIgMTE3LjYgNjguNjU2MiAxMTYuODcyVjExMS4wNDhDNjguNjU2MiAxMTAuMzIgNjkuMjcyMyAxMDkuNzA0IDcwLjAwMDMgMTA5LjcwNEM3MC43MjgzIDEwOS43MDQgNzEuMzQ0MyAxMTAuMzIgNzEuMzQ0MyAxMTEuMDQ4VjExNi44NzJDNzEuMzQ0MyAxMTcuNiA3MC43ODQzIDExOC4yMTYgNzAuMDAwMyAxMTguMjE2Wk03MC4wMDAzIDExMC4zMkM2OS42MDgzIDExMC4zMiA2OS4yNzIyIDExMC42NTYgNjkuMjcyMiAxMTEuMDQ4VjExNi44NzJDNjkuMjcyMiAxMTcuMjY0IDY5LjYwODMgMTE3LjYgNzAuMDAwMyAxMTcuNkM3MC4zOTIzIDExNy42IDcwLjcyODMgMTE3LjI2NCA3MC43MjgzIDExNi44NzJWMTExLjA0OEM3MC43ODQzIDExMC42IDcwLjQ0ODMgMTEwLjI2NCA3MC4wMDAzIDExMC4zMloiIGZpbGw9IiMxMTE4MjciLz4KPHBhdGggZD0iTTcwLjAwMDMgMTIxLjQwOEM2OS4yNzIzIDEyMS40MDggNjguNjU2MiAxMjAuNzkyIDY4LjY1NjIgMTIwLjA2NEM2OC42NTYyIDExOS4zMzYgNjkuMjcyMyAxMTguNzIgNzAuMDAwMyAxMTguNzJDNzAuNzI4MyAxMTguNzIgNzEuMzQ0MyAxMTkuMzM2IDcxLjM0NDMgMTIwLjA2NEM3MS4zNDQzIDEyMC43OTIgNzAuNzI4MyAxMjEuNDA4IDcwLjAwMDMgMTIxLjQwOFpNNzAuMDAwMyAxMTkuMzM2QzY5LjYwODMgMTE5LjMzNiA2OS4yNzIyIDExOS42NzIgNjkuMjcyMiAxMjAuMDY0QzY5LjI3MjIgMTIwLjQ1NiA2OS42MDgzIDEyMC43OTIgNzAuMDAwMyAxMjAuNzkyQzcwLjM5MjMgMTIwLjc5MiA3MC43MjgzIDEyMC40NTYgNzAuNzI4MyAxMjAuMDY0QzcwLjc4NDMgMTE5LjY3MiA3MC40NDgzIDExOS4zMzYgNzAuMDAwMyAxMTkuMzM2WiIgc3Ryb2tlPSIjMTExODI3IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTcwLjAwMDMgMTE4LjIxNkM2OS4yNzIzIDExOC4yMTYgNjguNjU2MiAxMTcuNiA2OC42NTYyIDExNi44NzJWMTExLjA0OEM2OC42NTYyIDExMC4zMiA2OS4yNzIzIDEwOS43MDQgNzAuMDAwMyAxMDkuNzA0QzcwLjcyODMgMTA5LjcwNCA3MS4zNDQzIDExMC4zMiA3MS4zNDQzIDExMS4wNDhWMTE2Ljg3MkM3MS4zNDQzIDExNy42IDcwLjc4NDMgMTE4LjIxNiA3MC4wMDAzIDExOC4yMTZaTTcwLjAwMDMgMTEwLjMyQzY5LjYwODMgMTEwLjMyIDY5LjI3MjIgMTEwLjY1NiA2OS4yNzIyIDExMS4wNDhWMTE2Ljg3MkM2OS4yNzIyIDExNy4yNjQgNjkuNjA4MyAxMTcuNiA3MC4wMDAzIDExNy42QzcwLjM5MjMgMTE3LjYgNzAuNzI4MyAxMTcuMjY0IDcwLjcyODMgMTE2Ljg3MlYxMTEuMDQ4QzcwLjc4NDMgMTEwLjYgNzAuNDQ4MyAxMTAuMjY0IDcwLjAwMDMgMTEwLjMyWiIgc3Ryb2tlPSIjMTExODI3IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTIzMC45NDQgMTg4LjIxNkMyMzUuMzEyIDE4OC4zMjggMjM4LjA1NiAxOTAuMzQ0IDI0MS44NjQgMTk4Ljg1NkMyNDUuNjcyIDIwNy4zNjggMjUyLjM5MiAyMjQgMjUyLjM5MiAyMjRDMjUyLjM5MiAyMjQgMjA2LjAyNCAyMzUuMDMyIDIwNS43NDQgMjM0LjUyOEMyMDUuNDY0IDIzMy45NjggMjAyLjM4NCAxOTkuMDI0IDIwMi4zODQgMTk5LjAyNEMyMDIuMDQ4IDE5Ni41NiAyMDMuNDQ4IDE5NC4yMDggMjA1LjggMTkzLjMxMkMyMDkuODMyIDE5MS42ODggMjIxLjAzMiAxODcuNzY4IDIzMC45NDQgMTg4LjIxNloiIGZpbGw9IiNGMDY0MzQiLz4KPHBhdGggZD0iTTIzMC45NDQgMTg4LjIxNkMyMzAuOTQ0IDE4OC4yMTYgMjE2LjA0OCAxODguNTUyIDIwNS44IDE5My4zMTJMMjAxLjc2OCAxNzMuMTUyQzIwMS43NjggMTczLjE1MiAxOTYuNjcyIDE2Ny4wNDggMTk0LjgyNCAxNjIuNTY4SDIwNy43NkMyMDguNjU2IDE2Mi41NjggMjA5LjU1MiAxNjIuMjMyIDIxMC4yOCAxNjEuNjcyQzIwMS41NDQgMTQ5Ljc0NCAxOTcuNDU2IDEzNC44NDggMjAwLjA4OCAxMzMuNDQ4QzIwMi4zMjggMTMyLjIxNiAyMDcuMjU2IDEzNS41NzYgMjExLjY4IDE0MC4wNTZWMTIwLjE3NkMyMTcgMTI0Ljc2OCAyMjYuMDcyIDE0My41ODQgMjI2LjA3MiAxNDkuOEMyMjYuMDcyIDE1Ni40NjQgMjIzLjYwOCAxNjIuNzM2IDIyNC45NTIgMTY5LjczNkMyMjYuMjQgMTc2LjczNiAyMzAuOTQ0IDE4OC4yMTYgMjMwLjk0NCAxODguMjE2WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTIwNS43NDQgMTkzLjU5MkMyMDUuNjg4IDE5My41OTIgMjA1LjYzMiAxOTMuNTkyIDIwNS42MzIgMTkzLjUzNkMyMDUuNTc2IDE5My40OCAyMDUuNTIgMTkzLjQyNCAyMDUuNDY0IDE5My4zNjhMMjAxLjQzMiAxNzMuMjY0QzIwMC44NzIgMTcyLjU5MiAxOTYuMjggMTY2Ljk5MiAxOTQuNDg4IDE2Mi42MjRDMTk0LjQzMiAxNjIuNTEyIDE5NC40ODggMTYyLjQ1NiAxOTQuNTQ0IDE2Mi4zNDRDMTk0LjYgMTYyLjI4OCAxOTQuNzEyIDE2Mi4yMzIgMTk0Ljc2OCAxNjIuMjMySDIwNy43MDRDMjA4LjQ4OCAxNjIuMjMyIDIwOS4yMTYgMTYyLjAwOCAyMDkuODMyIDE2MS41NkMyMDYuMzA0IDE1Ni42ODggMjAzLjQ0OCAxNTEuMzEyIDIwMS4zMiAxNDUuNzEyQzE5OS40NzIgMTQwLjcyOCAxOTguNjMyIDEzNi41MjggMTk5LjA4IDEzNC40NTZDMTk5LjEzNiAxMzMuOTUyIDE5OS40MTYgMTMzLjQ0OCAxOTkuODY0IDEzMy4xNjhDMjAyLjM4NCAxMzEuODI0IDIwNy4zMTIgMTM1LjQwOCAyMTEuMzQ0IDEzOS4zMjhWMTIwLjEyQzIxMS4zNDQgMTIwLjAwOCAyMTEuNCAxMTkuODk2IDIxMS41MTIgMTE5Ljg0QzIxMS42MjQgMTE5Ljc4NCAyMTEuNzM2IDExOS43ODQgMjExLjc5MiAxMTkuODk2QzIxNy4wNTYgMTI0LjQzMiAyMjYuMjQgMTQzLjQxNiAyMjYuMjQgMTQ5Ljc0NEMyMjYuMTg0IDE1Mi4zMiAyMjUuOTA0IDE1NC45NTIgMjI1LjQ1NiAxNTcuNTI4QzIyNC44OTYgMTYxLjM5MiAyMjQuMjggMTY1LjQyNCAyMjUuMTIgMTY5LjYyNEMyMjYuNDY0IDE3Ni41MTIgMjMxLjExMiAxODcuOTM2IDIzMS4xMTIgMTg4LjA0OEMyMzEuMTY4IDE4OC4xMDQgMjMxLjE2OCAxODguMjE2IDIzMS4xMTIgMTg4LjMyOEMyMzEuMDU2IDE4OC4zODQgMjMwLjk0NCAxODguNDQgMjMwLjg4OCAxODguNDRDMjMwLjcyIDE4OC40NCAyMTUuOTM2IDE4OC44MzIgMjA1Ljg1NiAxOTMuNTM2QzIwNS44NTYgMTkzLjU5MiAyMDUuOCAxOTMuNTkyIDIwNS43NDQgMTkzLjU5MlpNMTk1LjIxNiAxNjIuODQ4QzE5Ny4xMiAxNjcuMjcyIDIwMS44OCAxNzIuOTI4IDIwMS45MzYgMTcyLjk4NEMyMDEuOTkyIDE3My4wNCAyMDEuOTkyIDE3My4wNCAyMDEuOTkyIDE3My4wOTZMMjA1Ljk2OCAxOTIuODY0QzIxNS4yMDggMTg4LjY2NCAyMjguMDMyIDE4Ny45OTIgMjMwLjQ5NiAxODcuODhDMjI5LjY1NiAxODUuODA4IDIyNS43OTIgMTc1Ljk1MiAyMjQuNjE2IDE2OS43MzZDMjIzLjc3NiAxNjUuNDI0IDIyNC4zOTIgMTYxLjM5MiAyMjQuOTUyIDE1Ny40MTZDMjI1LjQgMTU0Ljg5NiAyMjUuNjI0IDE1Mi4zMiAyMjUuNjggMTQ5Ljc0NEMyMjUuNjggMTQzLjY5NiAyMTcuMTY4IDEyNS45NDQgMjExLjkwNCAxMjAuNzkyVjE0MEMyMTEuOTA0IDE0MC4xMTIgMjExLjg0OCAxNDAuMjI0IDIxMS43MzYgMTQwLjI4QzIxMS42MjQgMTQwLjMzNiAyMTEuNTEyIDE0MC4yOCAyMTEuNCAxNDAuMjI0QzIwNi41MjggMTM1LjI5NiAyMDEuOTkyIDEzMi42MDggMjAwLjE0NCAxMzMuNjcyQzE5OS44NjQgMTMzLjg5NiAxOTkuNjQgMTM0LjIzMiAxOTkuNjQgMTM0LjU2OEMxOTguOCAxMzguMjY0IDIwMi42NjQgMTUwLjg2NCAyMTAuNDQ4IDE2MS40NDhDMjEwLjU2IDE2MS41NiAyMTAuNTA0IDE2MS43MjggMjEwLjM5MiAxNjEuODRDMjA5LjY2NCAxNjIuNDU2IDIwOC43MTIgMTYyLjc5MiAyMDcuNzA0IDE2Mi43OTJMMTk1LjIxNiAxNjIuODQ4WiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNMjE3LjI4IDE0NS45OTJDMjE3LjIyNCAxNDUuOTkyIDIxNy4xMTIgMTQ1LjkzNiAyMTcuMDU2IDE0NS44OEMyMTQuMDg4IDE0Mi42ODggMjExLjQ1NiAxNDAuMjggMjExLjQ1NiAxNDAuMjhDMjExLjM0NCAxNDAuMTY4IDIxMS4zNDQgMTQwIDIxMS40NTYgMTM5Ljg4OEMyMTEuNTY4IDEzOS43NzYgMjExLjczNiAxMzkuNzc2IDIxMS44NDggMTM5Ljg4OEMyMTEuODQ4IDEzOS44ODggMjE0LjQ4IDE0Mi4zNTIgMjE3LjUwNCAxNDUuNTQ0QzIxNy42MTYgMTQ1LjY1NiAyMTcuNjE2IDE0NS44MjQgMjE3LjUwNCAxNDUuOTM2QzIxNy40NDggMTQ1LjkzNiAyMTcuMzM2IDE0NS45OTIgMjE3LjI4IDE0NS45OTJaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0yMTIuMjk2IDE2NC45NzZDMjEyLjE4NCAxNjQuOTc2IDIxMi4xMjggMTY0LjkyIDIxMi4wNzIgMTY0Ljg2NEwyMTAgMTYxLjg0QzIwOS44ODggMTYxLjcyOCAyMDkuOTQ0IDE2MS41MDQgMjEwLjA1NiAxNjEuNDQ4QzIxMC4xNjggMTYxLjMzNiAyMTAuMzkyIDE2MS4zOTIgMjEwLjQ0OCAxNjEuNTA0TDIxMi41MiAxNjQuNTg0QzIxMi42MzIgMTY0LjY5NiAyMTIuNTc2IDE2NC44NjQgMjEyLjQ2NCAxNjQuOTc2QzIxMi40MDggMTY0Ljk3NiAyMTIuMzUyIDE2NC45NzYgMjEyLjI5NiAxNjQuOTc2WiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNNDcuNzEyIDE4OC4yMTZDNDMuMzQ0IDE4OC4zMjggNDAuNiAxOTAuMzQ0IDM2Ljc5MiAxOTguODU2QzMyLjk4NCAyMDcuMzY4IDI2LjIwOCAyMjQgMjYuMjA4IDIyNEMyNi4yMDggMjI0IDcyLjU3NiAyMzUuMDMyIDcyLjg1NiAyMzQuNTI4QzczLjEzNiAyMzMuOTY4IDc2LjI3MiAxOTkuMDI0IDc2LjI3MiAxOTkuMDI0Qzc2LjYwOCAxOTYuNTYgNzUuMjA4IDE5NC4yMDggNzIuODU2IDE5My4zMTJDNjguODI0IDE5MS42ODggNTcuNjI0IDE4Ny43NjggNDcuNzEyIDE4OC4yMTZaIiBmaWxsPSIjRjA2NDM0Ii8+CjxwYXRoIGQ9Ik00Ny43MTE5IDE4OC4yMTZDNDcuNzExOSAxODguMjE2IDYyLjYwNzkgMTg4LjU1MiA3Mi44NTU5IDE5My4zMTJMNzYuODg3OSAxNzMuMTUyQzc2Ljg4NzkgMTczLjE1MiA4MS45ODM5IDE2Ny4xMDQgODMuODMxOSAxNjIuNTY4SDcwLjg5NTlDNjkuOTk5OSAxNjIuNTY4IDY5LjEwMzkgMTYyLjIzMiA2OC4zNzU5IDE2MS42NzJDNzcuMTExOSAxNDkuNzQ0IDgxLjE5OTkgMTM0Ljg0OCA3OC41Njc5IDEzMy40NDhDNzYuMzI3OSAxMzIuMjE2IDcxLjM5OTkgMTM1LjU3NiA2Ni45NzU5IDE0MC4wNTZWMTIwLjE3NkM2MS42NTU5IDEyNC43NjggNTIuNTgzOSAxNDMuNTg0IDUyLjU4MzkgMTQ5LjhDNTIuNTgzOSAxNTYuNDY0IDU1LjA0NzkgMTYyLjczNiA1My43MDM5IDE2OS43MzZDNTIuMzU5OSAxNzYuNzM2IDQ3LjcxMTkgMTg4LjIxNiA0Ny43MTE5IDE4OC4yMTZaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNzIuODU2IDE5My41OTJDNzIuOCAxOTMuNTkyIDcyLjggMTkzLjU5MiA3Mi43NDQgMTkzLjUzNkM2Mi42MDggMTg4LjgzMiA0Ny44MjQgMTg4LjQ0IDQ3LjY1NiAxODguNDRDNDcuNTQ0IDE4OC40NCA0Ny40ODggMTg4LjM4NCA0Ny40MzIgMTg4LjMyOEM0Ny4zNzYgMTg4LjI3MiA0Ny4zNzYgMTg4LjE2IDQ3LjM3NiAxODguMDQ4QzQ3LjQzMiAxODcuOTM2IDUyLjA4IDE3Ni41NjggNTMuNDI0IDE2OS42MjRDNTQuMjA4IDE2NS40MjQgNTMuNjQ4IDE2MS4zOTIgNTMuMDg4IDE1Ny41MjhDNTIuNjQgMTU0Ljk1MiA1Mi40MTYgMTUyLjM3NiA1Mi4zMDQgMTQ5Ljc0NEM1Mi4zMDQgMTQzLjQxNiA2MS40ODggMTI0LjQzMiA2Ni43NTIgMTE5Ljg5NkM2Ni44NjQgMTE5Ljg0IDY2Ljk3NiAxMTkuNzg0IDY3LjA4OCAxMTkuODRDNjcuMiAxMTkuODk2IDY3LjI1NiAxMjAuMDA4IDY3LjI1NiAxMjAuMTJWMTM5LjMyOEM3MS4yMzIgMTM1LjM1MiA3Ni4yMTYgMTMxLjgyNCA3OC43MzYgMTMzLjE2OEM3OS4xODQgMTMzLjQ0OCA3OS40NjQgMTMzLjk1MiA3OS41MiAxMzQuNDU2Qzc5Ljk2OCAxMzYuNTI4IDc5LjE4NCAxNDAuNzI4IDc3LjI4IDE0NS43MTJDNzUuMTUyIDE1MS4zNjggNzIuMjk2IDE1Ni42ODggNjguNzY4IDE2MS41NkM2OS4zODQgMTYyLjAwOCA3MC4xMTIgMTYyLjIzMiA3MC44OTYgMTYyLjIzMkg4My44MzJDODMuOTQ0IDE2Mi4yMzIgODQgMTYyLjI4OCA4NC4wNTYgMTYyLjM0NEM4NC4xMTIgMTYyLjQgODQuMTEyIDE2Mi41MTIgODQuMTEyIDE2Mi42MjRDODIuMzIgMTY2Ljk5MiA3Ny43MjggMTcyLjU5MiA3Ny4xNjggMTczLjI2NEw3My4xMzYgMTkzLjM2OEM3My4xMzYgMTkzLjQ4IDczLjA4IDE5My41MzYgNzIuOTY4IDE5My41MzZDNzIuOTY4IDE5My41OTIgNzIuOTEyIDE5My41OTIgNzIuODU2IDE5My41OTJaTTQ4LjEwNCAxODcuOTM2QzUwLjU2OCAxODguMDQ4IDYzLjM5MiAxODguNzIgNzIuNjMyIDE5Mi45Mkw3Ni42MDggMTczLjE1MkM3Ni42MDggMTczLjA5NiA3Ni42NjQgMTczLjA0IDc2LjY2NCAxNzMuMDRDNzYuNzIgMTcyLjk4NCA4MS40OCAxNjcuMjcyIDgzLjM4NCAxNjIuOTA0SDcwLjg0QzY5LjgzMiAxNjIuOTA0IDY4Ljg4IDE2Mi41NjggNjguMTUyIDE2MS45NTJDNjguMDQgMTYxLjg0IDY4LjA0IDE2MS42NzIgNjguMDk2IDE2MS41NkM3NS44MjQgMTUwLjk3NiA3OS43NDQgMTM4LjMyIDc4LjkwNCAxMzQuNjhDNzguODQ4IDEzNC4zNDQgNzguNjggMTM0LjAwOCA3OC40IDEzMy43ODRDNzYuNDk2IDEzMi43NzYgNzEuOTYgMTM1LjQwOCA2Ny4xNDQgMTQwLjMzNkM2Ny4wMzIgMTQwLjQ0OCA2Ni44NjQgMTQwLjQ0OCA2Ni43NTIgMTQwLjMzNkM2Ni42OTYgMTQwLjI4IDY2LjY0IDE0MC4yMjQgNjYuNjQgMTQwLjExMlYxMjAuOTA0QzYxLjM3NiAxMjYuMDU2IDUyLjg2NCAxNDMuODA4IDUyLjg2NCAxNDkuODU2QzUyLjkyIDE1Mi40MzIgNTMuMiAxNTUuMDA4IDUzLjU5MiAxNTcuNTI4QzU0LjE1MiAxNjEuNDQ4IDU0Ljc2OCAxNjUuNTM2IDUzLjkyOCAxNjkuODQ4QzUyLjgwOCAxNzYuMDA4IDQ4Ljk0NCAxODUuODY0IDQ4LjEwNCAxODcuOTM2WiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNNjEuMzc2MiAxNDUuOTkyQzYxLjIwODIgMTQ1Ljk5MiA2MS4wOTYyIDE0NS44OCA2MS4wOTYyIDE0NS43MTJDNjEuMDk2MiAxNDUuNjU2IDYxLjA5NjIgMTQ1LjU0NCA2MS4yMDgyIDE0NS40ODhDNjQuMTc2MiAxNDIuMjk2IDY2LjgwODIgMTM5Ljg4OCA2Ni44NjQyIDEzOS44MzJDNjYuOTc2MiAxMzkuNzIgNjcuMTQ0MiAxMzkuNzIgNjcuMjU2MiAxMzkuODMyQzY3LjM2ODIgMTM5Ljk0NCA2Ny4zNjgyIDE0MC4xMTIgNjcuMjU2MiAxNDAuMjI0QzY3LjIwMDIgMTQwLjIyNCA2NC42MjQyIDE0Mi42MzIgNjEuNjU2MiAxNDUuODI0QzYxLjQ4ODIgMTQ1LjkzNiA2MS40MzIyIDE0NS45OTIgNjEuMzc2MiAxNDUuOTkyWiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNNjYuMzA0MSAxNjQuOTc2QzY2LjI0ODEgMTY0Ljk3NiA2Ni4xOTIxIDE2NC45NzYgNjYuMTM2MSAxNjQuOTJDNjYuMDI0MSAxNjQuODA4IDY1Ljk2ODEgMTY0LjY0IDY2LjA4MDEgMTY0LjUyOEw2OC4xNTIxIDE2MS40NDhDNjguMjY0MSAxNjEuMzM2IDY4LjQzMjEgMTYxLjI4IDY4LjU0NDEgMTYxLjM5MkM2OC42NTYxIDE2MS41MDQgNjguNzEyMSAxNjEuNjcyIDY4LjYwMDEgMTYxLjc4NEw2Ni40NzIxIDE2NC44NjRDNjYuNDcyMSAxNjQuOTc2IDY2LjM2MDEgMTY0Ljk3NiA2Ni4zMDQxIDE2NC45NzZaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0xMDUuMDU2IDE1Ni45NjhDMTA0Ljg4OCAxNTYuOTY4IDEwNC43NzYgMTU2Ljg1NiAxMDQuNzc2IDE1Ni42ODhWNzQuNDI0QzEwNC43NzYgNzQuMjU2IDEwNC44ODggNzQuMTQ0IDEwNS4wNTYgNzQuMTQ0QzEwNS4yMjQgNzQuMTQ0IDEwNS4zMzYgNzQuMjU2IDEwNS4zMzYgNzQuNDI0VjE1Ni42ODhDMTA1LjM5MiAxNTYuODU2IDEwNS4yMjQgMTU2Ljk2OCAxMDUuMDU2IDE1Ni45NjhaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik05OS4zOTk4IDc5LjM1MjFINzguNzM1OFY4NS40NTYxSDk5LjM5OThWNzkuMzUyMVoiIGZpbGw9IiNGMDY0MzQiLz4KPHBhdGggZD0iTTk5LjM0MzkgODUuNjhINzguNjc5OUM3OC41MTE5IDg1LjY4IDc4LjM5OTkgODUuNTY4IDc4LjM5OTkgODUuNFY3OS4yOTZDNzguMzk5OSA3OS4xMjggNzguNTExOSA3OS4wMTYgNzguNjc5OSA3OS4wMTZIOTkuMzQzOUM5OS41MTE5IDc5LjAxNiA5OS42MjM5IDc5LjEyOCA5OS42MjM5IDc5LjI5NlY4NS40Qzk5LjYyMzkgODUuNTY4IDk5LjUxMTkgODUuNjggOTkuMzQzOSA4NS42OFpNNzkuMDE1OSA4NS4xMkg5OS4wNjM5Vjc5LjYzMkg3OS4wMTU5Vjg1LjEyWiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNODAuNzUyIDgzLjEwNDFMODMuMTYgODAuNjk2MUM4My4zMjggODAuNTI4MSA4My42NjQgODAuNTI4MSA4My44MzIgODAuNjk2MUM4NCA4MC44NjQxIDg0IDgxLjIwMDEgODMuODMyIDgxLjM2ODFMODEuNDI0IDgzLjc3NjFMODAuNzUyIDgzLjEwNDFaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNODEuNDIzNyA4NC4wNTYxQzgxLjM2NzcgODQuMDU2MSA4MS4yNTU3IDg0LjA1NjEgODEuMTk5NyA4NC4wMDAxTDgwLjUyNzcgODMuMzI4MUM4MC40NzE3IDgzLjI3MjEgODAuNDcxNyA4My4yMTYxIDgwLjQ3MTcgODMuMTA0MUM4MC40NzE3IDgzLjA0ODEgODAuNTI3NyA4Mi45MzYxIDgwLjUyNzcgODIuODgwMUw4Mi45MzU3IDgwLjQ3MjFDODMuMjE1NyA4MC4xOTIxIDgzLjcxOTcgODAuMTkyMSA4NC4wNTU3IDgwLjQ3MjFDODQuMzkxNyA4MC43NTIxIDg0LjMzNTcgODEuMjU2MSA4NC4wNTU3IDgxLjU5MjFMODEuNjQ3NyA4NC4wMDAxQzgxLjU5MTcgODQuMDAwMSA4MS40Nzk3IDg0LjA1NjEgODEuNDIzNyA4NC4wNTYxWk04MS4xNDM3IDgzLjEwNDFMODEuNDIzNyA4My4zODQxTDgzLjYwNzcgODEuMjAwMUM4My42NjM3IDgxLjE0NDEgODMuNjYzNyA4MC45NzYxIDgzLjYwNzcgODAuOTIwMUM4My41NTE3IDgwLjg2NDEgODMuMzgzNyA4MC44NjQxIDgzLjMyNzcgODAuOTIwMUw4MS4xNDM3IDgzLjEwNDFaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik04MS40MjM5IDgzLjc3Nkw4MC43NTE5IDgzLjEwNEw4MC4zNTk5IDg0LjExMkw4MS40MjM5IDgzLjc3NloiIGZpbGw9IiMxMTE4MjciLz4KPHBhdGggZD0iTTgwLjM1OTggODQuNDQ4MUM4MC4zMDM4IDg0LjQ0ODEgODAuMTkxOCA4NC4zOTIxIDgwLjEzNTggODQuMzM2MUM4MC4wNzk4IDg0LjI4MDEgODAuMDIzOCA4NC4xNjgxIDgwLjA3OTggODQuMDU2MUw4MC40NzE4IDgyLjk5MjFDODAuNTI3OCA4Mi44ODAxIDgwLjU4MzggODIuODI0MSA4MC42OTU4IDgyLjgyNDFDODAuODA3OCA4Mi44MjQxIDgwLjg2MzggODIuODI0MSA4MC45NzU4IDgyLjg4MDFMODEuNjQ3OCA4My41NTIxQzgxLjc1OTggODMuNjY0MSA4MS43NTk4IDgzLjgzMjEgODEuNjQ3OCA4My45NDQxQzgxLjU5MTggODQuMDAwMSA4MS41OTE4IDg0LjAwMDEgODEuNTM1OCA4NC4wMDAxTDgwLjQ3MTggODQuMzkyMUM4MC40MTU4IDg0LjQ0ODEgODAuNDE1OCA4NC40NDgxIDgwLjM1OTggODQuNDQ4MVpNODAuODYzOCA4My42MDgxVjgzLjY2NDFIODAuOTE5OEw4MC44NjM4IDgzLjYwODFaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik05OS4zNDM5IDk2LjcxMjFINzguNjc5OUM3OC41MTE5IDk2LjcxMjEgNzguMzk5OSA5Ni42MDAxIDc4LjM5OTkgOTYuNDMyMVY5MS4yMjQxQzc4LjM5OTkgOTEuMDU2MSA3OC41MTE5IDkwLjk0NDEgNzguNjc5OSA5MC45NDQxSDk5LjM0MzlDOTkuNTExOSA5MC45NDQxIDk5LjYyMzkgOTEuMDU2MSA5OS42MjM5IDkxLjIyNDFWOTYuNDMyMUM5OS42Nzk5IDk2LjU0NDEgOTkuNTExOSA5Ni43MTIxIDk5LjM0MzkgOTYuNzEyMVpNNzkuMDE1OSA5Ni4xNTIxSDk5LjA2MzlWOTEuNTA0MUg3OS4wMTU5Vjk2LjE1MjFaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik05OS4zNDM5IDEwNS4xMTJINzguNjc5OUM3OC41MTE5IDEwNS4xMTIgNzguMzk5OSAxMDUgNzguMzk5OSAxMDQuODMyVjk5LjYyNEM3OC4zOTk5IDk5LjQ1NiA3OC41MTE5IDk5LjM0NCA3OC42Nzk5IDk5LjM0NEg5OS4zNDM5Qzk5LjUxMTkgOTkuMzQ0IDk5LjYyMzkgOTkuNDU2IDk5LjYyMzkgOTkuNjI0VjEwNC44MzJDOTkuNjc5OSAxMDUgOTkuNTExOSAxMDUuMTEyIDk5LjM0MzkgMTA1LjExMlpNNzkuMDE1OSAxMDQuNTUySDk5LjA2MzlWOTkuOTA0SDc5LjAxNTlWMTA0LjU1MloiIGZpbGw9IiMxMTE4MjciLz4KPHBhdGggZD0iTTk5LjM0MzkgMTEzLjUxMkg3OC42Nzk5Qzc4LjUxMTkgMTEzLjUxMiA3OC4zOTk5IDExMy40IDc4LjM5OTkgMTEzLjIzMlYxMDguMDI0Qzc4LjM5OTkgMTA3Ljg1NiA3OC41MTE5IDEwNy43NDQgNzguNjc5OSAxMDcuNzQ0SDk5LjM0MzlDOTkuNTExOSAxMDcuNzQ0IDk5LjYyMzkgMTA3Ljg1NiA5OS42MjM5IDEwOC4wMjRWMTEzLjIzMkM5OS42Nzk5IDExMy40IDk5LjUxMTkgMTEzLjUxMiA5OS4zNDM5IDExMy41MTJaTTc5LjAxNTkgMTEyLjk1Mkg5OS4wNjM5VjEwOC4zMDRINzkuMDE1OVYxMTIuOTUyWiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNOTkuMzQzOSAxMjEuOTEySDc4LjY3OTlDNzguNTExOSAxMjEuOTEyIDc4LjM5OTkgMTIxLjggNzguMzk5OSAxMjEuNjMyVjExNi40MjRDNzguMzk5OSAxMTYuMjU2IDc4LjUxMTkgMTE2LjE0NCA3OC42Nzk5IDExNi4xNDRIOTkuMzQzOUM5OS41MTE5IDExNi4xNDQgOTkuNjIzOSAxMTYuMjU2IDk5LjYyMzkgMTE2LjQyNFYxMjEuNjMyQzk5LjYyMzkgMTIxLjggOTkuNTExOSAxMjEuOTEyIDk5LjM0MzkgMTIxLjkxMlpNNzkuMDE1OSAxMjEuMzUySDk5LjA2MzlWMTE2LjcwNEg3OS4wMTU5VjEyMS4zNTJaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0xMzQuMTc2IDkxLjUwNDFIMTE4LjQ5NkMxMTguMzI4IDkxLjUwNDEgMTE4LjIxNiA5MS4zOTIxIDExOC4yMTYgOTEuMjI0MUMxMTguMjE2IDkxLjA1NjEgMTE4LjMyOCA5MC45NDQxIDExOC40OTYgOTAuOTQ0MUgxMzQuMTc2QzEzNC4zNDQgOTAuOTQ0MSAxMzQuNDU2IDkxLjA1NjEgMTM0LjQ1NiA5MS4yMjQxQzEzNC41MTIgOTEuMzM2MSAxMzQuMzQ0IDkxLjUwNDEgMTM0LjE3NiA5MS41MDQxWiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNMTkyLjkyIDkxLjUwNDFIMTQwLjM5MkMxNDAuMjI0IDkxLjUwNDEgMTQwLjExMiA5MS4zOTIxIDE0MC4xMTIgOTEuMjI0MUMxNDAuMTEyIDkxLjA1NjEgMTQwLjIyNCA5MC45NDQxIDE0MC4zOTIgOTAuOTQ0MUgxOTIuOTJDMTkzLjA4OCA5MC45NDQxIDE5My4yIDkxLjA1NjEgMTkzLjIgOTEuMjI0MUMxOTMuMiA5MS4zOTIxIDE5My4wODggOTEuNTA0MSAxOTIuOTIgOTEuNTA0MVoiIGZpbGw9IiMxMTE4MjciLz4KPHBhdGggZD0iTTE5Mi45MiA5NC45MjAxSDE0MC4zOTJDMTQwLjIyNCA5NC45MjAxIDE0MC4xMTIgOTQuODA4MSAxNDAuMTEyIDk0LjY0MDFDMTQwLjExMiA5NC40NzIxIDE0MC4yMjQgOTQuMzYwMSAxNDAuMzkyIDk0LjM2MDFIMTkyLjkyQzE5My4wODggOTQuMzYwMSAxOTMuMiA5NC40NzIxIDE5My4yIDk0LjY0MDFDMTkzLjIgOTQuODA4MSAxOTMuMDg4IDk0LjkyMDEgMTkyLjkyIDk0LjkyMDFaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0xMzQuMTc2IDEwMC44SDExOC40OTZDMTE4LjMyOCAxMDAuOCAxMTguMjE2IDEwMC42ODggMTE4LjIxNiAxMDAuNTJDMTE4LjIxNiAxMDAuMzUyIDExOC4zMjggMTAwLjI0IDExOC40OTYgMTAwLjI0SDEzNC4xNzZDMTM0LjM0NCAxMDAuMjQgMTM0LjQ1NiAxMDAuMzUyIDEzNC40NTYgMTAwLjUyQzEzNC40NTYgMTAwLjY4OCAxMzQuMzQ0IDEwMC44IDEzNC4xNzYgMTAwLjhaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0xOTIuOTIgMTAwLjhIMTQwLjM5MkMxNDAuMjI0IDEwMC44IDE0MC4xMTIgMTAwLjY4OCAxNDAuMTEyIDEwMC41MkMxNDAuMTEyIDEwMC4zNTIgMTQwLjIyNCAxMDAuMjQgMTQwLjM5MiAxMDAuMjRIMTkyLjkyQzE5My4wODggMTAwLjI0IDE5My4yIDEwMC4zNTIgMTkzLjIgMTAwLjUyQzE5My4yIDEwMC42MzIgMTkzLjA4OCAxMDAuOCAxOTIuOTIgMTAwLjhaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0xOTIuOTIgMTA0LjIxNkgxNDAuMzkyQzE0MC4yMjQgMTA0LjIxNiAxNDAuMTEyIDEwNC4xMDQgMTQwLjExMiAxMDMuOTM2QzE0MC4xMTIgMTAzLjc2OCAxNDAuMjI0IDEwMy42NTYgMTQwLjM5MiAxMDMuNjU2SDE5Mi45MkMxOTMuMDg4IDEwMy42NTYgMTkzLjIgMTAzLjc2OCAxOTMuMiAxMDMuOTM2QzE5My4yIDEwNC4xMDQgMTkzLjA4OCAxMDQuMjE2IDE5Mi45MiAxMDQuMjE2WiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNMTM0LjE3NiAxMTAuMDk2SDExOC40OTZDMTE4LjMyOCAxMTAuMDk2IDExOC4yMTYgMTA5Ljk4NCAxMTguMjE2IDEwOS44MTZDMTE4LjIxNiAxMDkuNjQ4IDExOC4zMjggMTA5LjUzNiAxMTguNDk2IDEwOS41MzZIMTM0LjE3NkMxMzQuMzQ0IDEwOS41MzYgMTM0LjQ1NiAxMDkuNjQ4IDEzNC40NTYgMTA5LjgxNkMxMzQuNDU2IDEwOS45ODQgMTM0LjM0NCAxMTAuMDk2IDEzNC4xNzYgMTEwLjA5NloiIGZpbGw9IiMxMTE4MjciLz4KPHBhdGggZD0iTTE5Mi45MiAxMTAuMDk2SDE0MC4zOTJDMTQwLjIyNCAxMTAuMDk2IDE0MC4xMTIgMTA5Ljk4NCAxNDAuMTEyIDEwOS44MTZDMTQwLjExMiAxMDkuNjQ4IDE0MC4yMjQgMTA5LjUzNiAxNDAuMzkyIDEwOS41MzZIMTkyLjkyQzE5My4wODggMTA5LjUzNiAxOTMuMiAxMDkuNjQ4IDE5My4yIDEwOS44MTZDMTkzLjIgMTA5LjkyOCAxOTMuMDg4IDExMC4wOTYgMTkyLjkyIDExMC4wOTZaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0xOTIuOTIgMTEzLjUxMkgxNDAuMzkyQzE0MC4yMjQgMTEzLjUxMiAxNDAuMTEyIDExMy40IDE0MC4xMTIgMTEzLjIzMkMxNDAuMTEyIDExMy4wNjQgMTQwLjIyNCAxMTIuOTUyIDE0MC4zOTIgMTEyLjk1MkgxOTIuOTJDMTkzLjA4OCAxMTIuOTUyIDE5My4yIDExMy4wNjQgMTkzLjIgMTEzLjIzMkMxOTMuMiAxMTMuNCAxOTMuMDg4IDExMy41MTIgMTkyLjkyIDExMy41MTJaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0xMzQuMTc2IDExOS4zMzZIMTE4LjQ5NkMxMTguMzI4IDExOS4zMzYgMTE4LjIxNiAxMTkuMjI0IDExOC4yMTYgMTE5LjA1NkMxMTguMjE2IDExOC44ODggMTE4LjMyOCAxMTguNzc2IDExOC40OTYgMTE4Ljc3NkgxMzQuMTc2QzEzNC4zNDQgMTE4Ljc3NiAxMzQuNDU2IDExOC44ODggMTM0LjQ1NiAxMTkuMDU2QzEzNC41MTIgMTE5LjIyNCAxMzQuMzQ0IDExOS4zMzYgMTM0LjE3NiAxMTkuMzM2WiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNMTkyLjkyIDExOS4zMzZIMTQwLjM5MkMxNDAuMjI0IDExOS4zMzYgMTQwLjExMiAxMTkuMjI0IDE0MC4xMTIgMTE5LjA1NkMxNDAuMTEyIDExOC44ODggMTQwLjIyNCAxMTguNzc2IDE0MC4zOTIgMTE4Ljc3NkgxOTIuOTJDMTkzLjA4OCAxMTguNzc2IDE5My4yIDExOC44ODggMTkzLjIgMTE5LjA1NkMxOTMuMiAxMTkuMjI0IDE5My4wODggMTE5LjMzNiAxOTIuOTIgMTE5LjMzNloiIGZpbGw9IiMxMTE4MjciLz4KPHBhdGggZD0iTTE5Mi45MiAxMjIuODA4SDE0MC4zOTJDMTQwLjIyNCAxMjIuODA4IDE0MC4xMTIgMTIyLjY5NiAxNDAuMTEyIDEyMi41MjhDMTQwLjExMiAxMjIuMzYgMTQwLjIyNCAxMjIuMjQ4IDE0MC4zOTIgMTIyLjI0OEgxOTIuOTJDMTkzLjA4OCAxMjIuMjQ4IDE5My4yIDEyMi4zNiAxOTMuMiAxMjIuNTI4QzE5My4yIDEyMi42OTYgMTkzLjA4OCAxMjIuODA4IDE5Mi45MiAxMjIuODA4WiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNMTM0LjE3NiAxMjguNjMySDExOC40OTZDMTE4LjMyOCAxMjguNjMyIDExOC4yMTYgMTI4LjUyIDExOC4yMTYgMTI4LjM1MkMxMTguMjE2IDEyOC4xODQgMTE4LjMyOCAxMjguMDcyIDExOC40OTYgMTI4LjA3MkgxMzQuMTc2QzEzNC4zNDQgMTI4LjA3MiAxMzQuNDU2IDEyOC4xODQgMTM0LjQ1NiAxMjguMzUyQzEzNC41MTIgMTI4LjUyIDEzNC4zNDQgMTI4LjYzMiAxMzQuMTc2IDEyOC42MzJaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0xOTIuOTIgMTI4LjYzMkgxNDAuMzkyQzE0MC4yMjQgMTI4LjYzMiAxNDAuMTEyIDEyOC41MiAxNDAuMTEyIDEyOC4zNTJDMTQwLjExMiAxMjguMTg0IDE0MC4yMjQgMTI4LjA3MiAxNDAuMzkyIDEyOC4wNzJIMTkyLjkyQzE5My4wODggMTI4LjA3MiAxOTMuMiAxMjguMTg0IDE5My4yIDEyOC4zNTJDMTkzLjIgMTI4LjUyIDE5My4wODggMTI4LjYzMiAxOTIuOTIgMTI4LjYzMloiIGZpbGw9IiMxMTE4MjciLz4KPHBhdGggZD0iTTE5Mi45MiAxMzIuMTA0SDE0MC4zOTJDMTQwLjIyNCAxMzIuMTA0IDE0MC4xMTIgMTMxLjk5MiAxNDAuMTEyIDEzMS44MjRDMTQwLjExMiAxMzEuNjU2IDE0MC4yMjQgMTMxLjU0NCAxNDAuMzkyIDEzMS41NDRIMTkyLjkyQzE5My4wODggMTMxLjU0NCAxOTMuMiAxMzEuNjU2IDE5My4yIDEzMS44MjRDMTkzLjIgMTMxLjk5MiAxOTMuMDg4IDEzMi4xMDQgMTkyLjkyIDEzMi4xMDRaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0xMzQuMTc2IDg1LjY4SDExOS4yOEMxMTkuMTEyIDg1LjY4IDExOSA4NS41NjggMTE5IDg1LjRWNzkuMjk2QzExOSA3OS4xMjggMTE5LjExMiA3OS4wMTYgMTE5LjI4IDc5LjAxNkgxMzQuMjMyQzEzNC40IDc5LjAxNiAxMzQuNTEyIDc5LjEyOCAxMzQuNTEyIDc5LjI5NlY4NS40QzEzNC40NTYgODUuNTY4IDEzNC4zNDQgODUuNjggMTM0LjE3NiA4NS42OFpNMTE5LjUwNCA4NS4xMkgxMzMuODk2Vjc5LjYzMkgxMTkuNTA0Vjg1LjEyWiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNMTkyLjkyIDg1LjY4SDE0MC4zOTJDMTQwLjIyNCA4NS42OCAxNDAuMTEyIDg1LjU2OCAxNDAuMTEyIDg1LjRWNzkuMjk2QzE0MC4xMTIgNzkuMTI4IDE0MC4yMjQgNzkuMDE2IDE0MC4zOTIgNzkuMDE2SDE5Mi45MkMxOTMuMDg4IDc5LjAxNiAxOTMuMiA3OS4xMjggMTkzLjIgNzkuMjk2Vjg1LjRDMTkzLjIgODUuNTY4IDE5My4wODggODUuNjggMTkyLjkyIDg1LjY4Wk0xNDAuNjcyIDg1LjEySDE5Mi42NFY3OS42MzJIMTQwLjY3MlY4NS4xMloiIGZpbGw9IiMxMTE4MjciLz4KPHBhdGggZD0iTTIzMi41MTIgNDMuNEgxNzcuOTY4Vjg4LjI1NkgyMzIuNTEyVjQzLjRaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMjMyLjQ1NiA4OC41MzZIMTc3Ljk2OEMxNzcuOCA4OC41MzYgMTc3LjY4OCA4OC40MjQgMTc3LjY4OCA4OC4yNTZWNDMuNEMxNzcuNjg4IDQzLjIzMiAxNzcuOCA0My4xMiAxNzcuOTY4IDQzLjEySDIzMi40NTZDMjMyLjYyNCA0My4xMiAyMzIuNzM2IDQzLjIzMiAyMzIuNzM2IDQzLjRWODguMjU2QzIzMi43MzYgODguNDI0IDIzMi42MjQgODguNTM2IDIzMi40NTYgODguNTM2Wk0xNzguMTkyIDg3Ljk3NkgyMzIuMTJWNDMuNjhIMTc4LjE5MlY4Ny45NzZaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0yMjEuNTkyIDYxLjM3NkgxODguMDQ4VjgzLjY2NEgyMjEuNTkyVjYxLjM3NloiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0yMjEuNTkyIDgzLjk0MzlIMTg4LjA0OEMxODcuODggODMuOTQzOSAxODcuNzY4IDgzLjgzMTkgMTg3Ljc2OCA4My42NjM5VjYxLjM3NTlDMTg3Ljc2OCA2MS4yMDc5IDE4Ny44OCA2MS4wOTU5IDE4OC4wNDggNjEuMDk1OUgyMjEuNTkyQzIyMS43NiA2MS4wOTU5IDIyMS44NzIgNjEuMjA3OSAyMjEuODcyIDYxLjM3NTlWODMuNjYzOUMyMjEuODcyIDgzLjc3NTkgMjIxLjc2IDgzLjk0MzkgMjIxLjU5MiA4My45NDM5Wk0xODguMzI4IDgzLjMyNzlIMjIxLjMxMlY2MS41OTk5SDE4OC4zMjhWODMuMzI3OVoiIGZpbGw9IiMxMTE4MjciLz4KPHBhdGggZD0iTTIyMS41OTIgNjEuMzc1OUwyMTcuMzkyIDY0LjE3NTlMMjA0Ljc5MiA3Mi41MTk5TDE5Mi4yNDggNjQuMTc1OUwxODguMDQ4IDYxLjM3NTlMMTkyLjI0OCA1Ny43OTE5TDIwMi42MDggNDguOTk5OUwyMDQuNzkyIDQ3LjA5NTlMMjA3LjAzMiA0OC45OTk5TDIxNy4zOTIgNTcuNzkxOUwyMjEuNTkyIDYxLjM3NTlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMjA0Ljc5MiA3Mi44QzIwNC43MzYgNzIuOCAyMDQuNjggNzIuOCAyMDQuNjI0IDcyLjc0NEwxODcuODggNjEuNkMxODcuODI0IDYxLjU0NCAxODcuNzY4IDYxLjQ4OCAxODcuNzY4IDYxLjM3NkMxODcuNzY4IDYxLjI2NCAxODcuODI0IDYxLjIwOCAxODcuODggNjEuMTUyTDIwNC42MjQgNDYuOTI4QzIwNC43MzYgNDYuODE2IDIwNC45MDQgNDYuODE2IDIwNS4wMTYgNDYuOTI4TDIyMS43NiA2MS4xNTJDMjIxLjgxNiA2MS4yMDggMjIxLjg3MiA2MS4zMiAyMjEuODcyIDYxLjM3NkMyMjEuODcyIDYxLjQ4OCAyMjEuODE2IDYxLjU0NCAyMjEuNzYgNjEuNkwyMDQuOTYgNzIuNzQ0QzIwNC45MDQgNzIuOCAyMDQuODQ4IDcyLjggMjA0Ljc5MiA3Mi44Wk0xODguNDk2IDYxLjMyTDIwNC43OTIgNzIuMTI4TDIyMS4wODggNjEuMzJMMjA0Ljc5MiA0Ny40ODhMMTg4LjQ5NiA2MS4zMloiIGZpbGw9IiMxMTE4MjciLz4KPHBhdGggZD0iTTE4OC4wNDggODMuOTQ0QzE4Ny45OTIgODMuOTQ0IDE4Ny45MzYgODMuOTQ0IDE4Ny44OCA4My44ODhDMTg3Ljc2OCA4My43NzYgMTg3LjcxMiA4My42MDggMTg3LjgyNCA4My40OTZMMTk5LjQxNiA2OC45MzZDMTk5LjUyOCA2OC44MjQgMTk5LjY5NiA2OC43NjggMTk5LjgwOCA2OC44OEMxOTkuOTIgNjguOTkyIDE5OS45NzYgNjkuMTYgMTk5Ljg2NCA2OS4yNzJMMTg4LjI3MiA4My44MzJDMTg4LjIxNiA4My44ODggMTg4LjE2IDgzLjk0NCAxODguMDQ4IDgzLjk0NFoiIGZpbGw9IiMxMTE4MjciLz4KPHBhdGggZD0iTTIyMS41OTIgODMuOTQ0QzIyMS40OCA4My45NDQgMjIxLjQyNCA4My44ODggMjIxLjM2OCA4My44MzJMMjA5Ljc3NiA2OS4yNzJDMjA5LjY2NCA2OS4xNiAyMDkuNjY0IDY4Ljk5MiAyMDkuNzc2IDY4Ljg4QzIwOS44ODggNjguNzY4IDIxMC4wNTYgNjguNzY4IDIxMC4xNjggNjguODhMMjEwLjIyNCA2OC45MzZMMjIxLjgxNiA4My40OTZDMjIxLjkyOCA4My42MDggMjIxLjg3MiA4My43NzYgMjIxLjc2IDgzLjg4OEMyMjEuNzA0IDgzLjg4OCAyMjEuNjQ4IDgzLjk0NCAyMjEuNTkyIDgzLjk0NFoiIGZpbGw9IiMxMTE4MjciLz4KPHBhdGggZD0iTTIxNy4zOTIgNDlWNjQuMTc2TDIwNC43OTIgNzIuNTJMMTkyLjI0OCA2NC4xNzZWNDlIMjE3LjM5MloiIGZpbGw9IiNGMDY0MzQiLz4KPHBhdGggZD0iTTIwNC43OTIgNzIuOEMyMDQuNzM2IDcyLjggMjA0LjY4IDcyLjggMjA0LjYyNCA3Mi43NDRMMTkyLjA4IDY0LjRDMTkyLjAyNCA2NC4zNDQgMTkxLjk2OCA2NC4yMzIgMTkxLjk2OCA2NC4xNzZWNDlDMTkxLjk2OCA0OC44MzIgMTkyLjA4IDQ4LjcyIDE5Mi4yNDggNDguNzJIMjE3LjMzNkMyMTcuNTA0IDQ4LjcyIDIxNy42MTYgNDguODMyIDIxNy42MTYgNDlWNjQuMTc2QzIxNy42MTYgNjQuMjg4IDIxNy41NiA2NC4zNDQgMjE3LjUwNCA2NC40TDIwNC45NiA3Mi43NDRDMjA0LjkwNCA3Mi44IDIwNC44NDggNzIuOCAyMDQuNzkyIDcyLjhaTTE5Mi41MjggNjQuMDA4TDIwNC43OTIgNzIuMTI4TDIxNy4wNTYgNjQuMDA4VjQ5LjI4SDE5Mi41MjhWNjQuMDA4WiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNMjAyLjQ0IDUzLjY0OEgxOTUuMjE2QzE5NS4wNDggNTMuNjQ4IDE5NC45MzYgNTMuNTM2IDE5NC45MzYgNTMuMzY4QzE5NC45MzYgNTMuMiAxOTUuMDQ4IDUzLjA4OCAxOTUuMjE2IDUzLjA4OEgyMDIuNDRDMjAyLjYwOCA1My4wODggMjAyLjcyIDUzLjIgMjAyLjcyIDUzLjM2OEMyMDIuNzIgNTMuNTM2IDIwMi42MDggNTMuNjQ4IDIwMi40NCA1My42NDhaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0yMTMuMzA0IDU2LjI4SDE5NS4yMTZDMTk1LjA0OCA1Ni4yOCAxOTQuOTM2IDU2LjE2OCAxOTQuOTM2IDU2QzE5NC45MzYgNTUuODMyIDE5NS4wNDggNTUuNzIgMTk1LjIxNiA1NS43MkgyMTMuMzA0QzIxMy40NzIgNTUuNzIgMjEzLjU4NCA1NS44MzIgMjEzLjU4NCA1NkMyMTMuNTg0IDU2LjExMiAyMTMuNDE2IDU2LjI4IDIxMy4zMDQgNTYuMjhaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0yMTMuMzA0IDU4Ljg1NkgxOTUuMjE2QzE5NS4wNDggNTguODU2IDE5NC45MzYgNTguNzQ0IDE5NC45MzYgNTguNTc2QzE5NC45MzYgNTguNDA4IDE5NS4wNDggNTguMjk2IDE5NS4yMTYgNTguMjk2SDIxMy4zMDRDMjEzLjQ3MiA1OC4yOTYgMjEzLjU4NCA1OC40MDggMjEzLjU4NCA1OC41NzZDMjEzLjU4NCA1OC43NDQgMjEzLjQxNiA1OC44NTYgMjEzLjMwNCA1OC44NTZaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0yMTMuMzA0IDYxLjQ4OEgxOTUuMjE2QzE5NS4wNDggNjEuNDg4IDE5NC45MzYgNjEuMzc2IDE5NC45MzYgNjEuMjA4QzE5NC45MzYgNjEuMDQgMTk1LjA0OCA2MC45MjggMTk1LjIxNiA2MC45MjhIMjEzLjMwNEMyMTMuNDcyIDYwLjkyOCAyMTMuNTg0IDYxLjA0IDIxMy41ODQgNjEuMjA4QzIxMy41ODQgNjEuMzc2IDIxMy40MTYgNjEuNDg4IDIxMy4zMDQgNjEuNDg4WiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNMjEzLjMwNCA2NC4xMTk5SDE5NS4yMTZDMTk1LjA0OCA2NC4xMTk5IDE5NC45MzYgNjQuMDA3OSAxOTQuOTM2IDYzLjgzOTlDMTk0LjkzNiA2My42NzE5IDE5NS4wNDggNjMuNTU5OSAxOTUuMjE2IDYzLjU1OTlIMjEzLjMwNEMyMTMuNDcyIDYzLjU1OTkgMjEzLjU4NCA2My42NzE5IDIxMy41ODQgNjMuODM5OUMyMTMuNTg0IDYzLjk1MTkgMjEzLjQxNiA2NC4xMTk5IDIxMy4zMDQgNjQuMTE5OVoiIGZpbGw9IiMxMTE4MjciLz4KPHBhdGggZD0iTTE3Ny45NjggNDguNjA4QzE4MC44NDQgNDguNjA4IDE4My4xNzYgNDYuMjc2MyAxODMuMTc2IDQzLjRDMTgzLjE3NiA0MC41MjM3IDE4MC44NDQgMzguMTkyIDE3Ny45NjggMzguMTkyQzE3NS4wOTEgMzguMTkyIDE3Mi43NiA0MC41MjM3IDE3Mi43NiA0My40QzE3Mi43NiA0Ni4yNzYzIDE3NS4wOTEgNDguNjA4IDE3Ny45NjggNDguNjA4WiIgZmlsbD0iI0YwNjQzNCIvPgo8cGF0aCBkPSJNMTc3Ljk2OCA0OC44ODhDMTc0Ljk0NCA0OC44ODggMTcyLjQ4IDQ2LjQyNCAxNzIuNDggNDMuNEMxNzIuNDggNDAuMzc2IDE3NC45NDQgMzcuOTEyIDE3Ny45NjggMzcuOTEyQzE4MC45OTIgMzcuOTEyIDE4My40NTYgNDAuMzc2IDE4My40NTYgNDMuNEMxODMuNCA0Ni40MjQgMTgwLjk5MiA0OC44ODggMTc3Ljk2OCA0OC44ODhaTTE3Ny45NjggMzguNDcyQzE3NS4yOCAzOC40NzIgMTczLjA0IDQwLjY1NiAxNzMuMDQgNDMuNEMxNzMuMDQgNDYuMDg4IDE3NS4yMjQgNDguMzI4IDE3Ny45NjggNDguMzI4QzE4MC42NTYgNDguMzI4IDE4Mi44OTYgNDYuMTQ0IDE4Mi44OTYgNDMuNEMxODIuODQgNDAuNjU2IDE4MC42NTYgMzguNDcyIDE3Ny45NjggMzguNDcyWiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNMTc3Ljk2OCA0Ni41OTJDMTc3LjggNDYuNTkyIDE3Ny42ODggNDYuNDggMTc3LjY4OCA0Ni4zMTJWNDAuNDg4QzE3Ny42ODggNDAuMzIgMTc3LjggNDAuMjA4IDE3Ny45NjggNDAuMjA4QzE3OC4xMzYgNDAuMjA4IDE3OC4yNDggNDAuMzIgMTc4LjI0OCA0MC40ODhWNDYuMzEyQzE3OC4yNDggNDYuNDI0IDE3OC4wOCA0Ni41OTIgMTc3Ljk2OCA0Ni41OTJaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0xODAuODI0IDQzLjY4SDE3NUMxNzQuODMyIDQzLjY4IDE3NC43MiA0My41NjggMTc0LjcyIDQzLjRDMTc0LjcyIDQzLjIzMiAxNzQuODMyIDQzLjEyIDE3NSA0My4xMkgxODAuODI0QzE4MC45OTIgNDMuMTIgMTgxLjEwNCA0My4yMzIgMTgxLjEwNCA0My40QzE4MS4xNiA0My41NjggMTgwLjk5MiA0My42OCAxODAuODI0IDQzLjY4WiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNMTc1Ljg5NiA0NS42OTZDMTc1Ljg0IDQ1LjY5NiAxNzUuNzI4IDQ1LjY0IDE3NS42NzIgNDUuNTg0QzE3NS41NiA0NS40NzIgMTc1LjU2IDQ1LjMwNCAxNzUuNjcyIDQ1LjE5MkwxNzkuNzYgNDEuMTA0QzE3OS44NzIgNDAuOTkyIDE4MC4wNCA0MC45OTIgMTgwLjE1MiA0MS4xMDRDMTgwLjI2NCA0MS4yMTYgMTgwLjI2NCA0MS4zODQgMTgwLjE1MiA0MS40OTZMMTc2LjA2NCA0NS41ODRDMTc2LjA2NCA0NS42OTYgMTc1Ljk1MiA0NS42OTYgMTc1Ljg5NiA0NS42OTZaIiBmaWxsPSIjMTExODI3Ii8+CjxwYXRoIGQ9Ik0xNzkuOTg0IDQ1LjY5NkMxNzkuOTI4IDQ1LjY5NiAxNzkuODE2IDQ1LjY0IDE3OS43NiA0NS41ODRMMTc1LjY3MiA0MS40OTZDMTc1LjU2IDQxLjM4NCAxNzUuNTYgNDEuMjE2IDE3NS42NzIgNDEuMTA0QzE3NS43ODQgNDAuOTkyIDE3NS45NTIgNDAuOTkyIDE3Ni4wNjQgNDEuMTA0TDE4MC4xNTIgNDUuMTkyQzE4MC4yNjQgNDUuMzA0IDE4MC4yNjQgNDUuNDcyIDE4MC4xNTIgNDUuNTg0QzE4MC4xNTIgNDUuNjk2IDE4MC4wOTYgNDUuNjk2IDE3OS45ODQgNDUuNjk2WiIgZmlsbD0iIzExMTgyNyIvPgo8cGF0aCBkPSJNMjIxLjU5MiA3Ni45NDM5QzIyNC4wMzUgNzYuOTQzOSAyMjYuMDE2IDc0Ljk2MzMgMjI2LjAxNiA3Mi41MTk5QzIyNi4wMTYgNzAuMDc2NiAyMjQuMDM1IDY4LjA5NTkgMjIxLjU5MiA2OC4wOTU5QzIxOS4xNDkgNjguMDk1OSAyMTcuMTY4IDcwLjA3NjYgMjE3LjE2OCA3Mi41MTk5QzIxNy4xNjggNzQuOTYzMyAyMTkuMTQ5IDc2Ljk0MzkgMjIxLjU5MiA3Ni45NDM5WiIgZmlsbD0iI0YwNjQzNCIvPgo8cGF0aCBkPSJNMjIxLjU5MiA3Ny4yMjRDMjE4Ljk2IDc3LjIyNCAyMTYuODg4IDc1LjA5NiAyMTYuODg4IDcyLjUyQzIxNi44ODggNjkuODg4IDIxOS4wMTYgNjcuODE2IDIyMS41OTIgNjcuODE2QzIyNC4yMjQgNjcuODE2IDIyNi4yOTYgNjkuOTQ0IDIyNi4yOTYgNzIuNTJDMjI2LjI5NiA3NS4wOTYgMjI0LjE2OCA3Ny4yMjQgMjIxLjU5MiA3Ny4yMjRaTTIyMS41OTIgNjguMzc2QzIxOS4yOTYgNjguMzc2IDIxNy40NDggNzAuMjI0IDIxNy40NDggNzIuNTJDMjE3LjQ0OCA3NC44MTYgMjE5LjI5NiA3Ni42NjQgMjIxLjU5MiA3Ni42NjRDMjIzLjg4OCA3Ni42NjQgMjI1LjczNiA3NC44MTYgMjI1LjczNiA3Mi41MkMyMjUuNzM2IDcwLjIyNCAyMjMuODg4IDY4LjM3NiAyMjEuNTkyIDY4LjM3NloiIGZpbGw9IiMxMTE4MjciLz4KPHBhdGggZD0iTTIyMS40MjQgNzAuODk1OUwyMjAuNjk2IDcxLjI4NzlMMjIwLjU4NCA3MC44Mzk5TDIyMS41MzYgNzAuMzM1OUgyMjIuMDRWNzQuNjQ3OUgyMjEuNDhMMjIxLjQyNCA3MC44OTU5WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",mb=[{key:"buy-x-get-x-free",title:(0,Xc.__)("Buy X Get X Free","power-coupons"),description:(0,Xc.__)("Give the same product free when customers buy X.","power-coupons")},{key:"buy-x-get-y",title:(0,Xc.__)("Buy X Get Y","power-coupons"),description:(0,Xc.__)("Offer a different product free with qualifying purchase.","power-coupons")},{key:"buy-x-get-y-at-x-percent-off",title:(0,Xc.__)("Buy X Get Y at X% Off","power-coupons"),description:(0,Xc.__)("Give a discounted product when X is purchased.","power-coupons")},{key:"spend-x-get-y-free",title:(0,Xc.__)("Spend $X Get Y for Free","power-coupons"),description:(0,Xc.__)("Offer a free product on minimum cart value.","power-coupons")},{key:"spend-x-get-y-at-x-percent-off",title:(0,Xc.__)("Spend $X Get Y at X% Off","power-coupons"),description:(0,Xc.__)("Unlock a discounted product after spending $X.","power-coupons")},{key:"spend-x-get-free-shipping",title:(0,Xc.__)("Spend $X Get Free Shipping","power-coupons"),description:(0,Xc.__)("Enable free shipping when cart total reaches $X.","power-coupons")}],fb={chevronLeft:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.5 15L7.5 10L12.5 5" stroke="#737373" stroke-width="1.04167" stroke-linecap="round" stroke-linejoin="round"/></svg>',arrowRight:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.1665 10H15.8332" stroke="#9CA3AF" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/><path d="M10 4.16663L15.8333 9.99996L10 15.8333" stroke="#9CA3AF" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/></svg>',check:'<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 3.00098L4.5 8.50098L2 6.00098" stroke="#566A86" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/></svg>',close:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 4L4 12" stroke="#111827" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 4L12 12" stroke="#111827" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/></svg>',plus:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 4.16663V15.8333" stroke="white" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/><path d="M4.16675 10H15.8334" stroke="white" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/></svg>',search:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.16667 15.8333C12.8486 15.8333 15.8333 12.8486 15.8333 9.16667C15.8333 5.48477 12.8486 2.5 9.16667 2.5C5.48477 2.5 2.5 5.48477 2.5 9.16667C2.5 12.8486 5.48477 15.8333 9.16667 15.8333Z" stroke="#6B7280" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/><path d="M17.5 17.5L13.875 13.875" stroke="#6B7280" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.33333 2.66663H2.66667C2.31304 2.66663 1.97391 2.80711 1.72386 3.05716C1.47381 3.30721 1.33333 3.64634 1.33333 3.99997V13.3333C1.33333 13.687 1.47381 14.0261 1.72386 14.2761C1.97391 14.5262 2.31304 14.6666 2.66667 14.6666H12C12.3536 14.6666 12.6928 14.5262 12.9428 14.2761C13.1929 14.0261 13.3333 13.687 13.3333 13.3333V8.66663" stroke="#6B7280" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/><path d="M12.3333 1.66665C12.5985 1.40144 12.9583 1.25244 13.3333 1.25244C13.7084 1.25244 14.0681 1.40144 14.3333 1.66665C14.5985 1.93187 14.7475 2.29158 14.7475 2.66665C14.7475 3.04172 14.5985 3.40144 14.3333 3.66665L8 9.99998L5.33333 10.6666L6 7.99998L12.3333 1.66665Z" stroke="#6B7280" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/></svg>',delete:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2 4H3.33333H14" stroke="#6B7280" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/><path d="M5.33325 4.00004V2.66671C5.33325 2.31309 5.47373 1.97395 5.72378 1.7239C5.97383 1.47385 6.31296 1.33337 6.66659 1.33337H9.33325C9.68687 1.33337 10.026 1.47385 10.2761 1.7239C10.5261 1.97395 10.6666 2.31309 10.6666 2.66671V4.00004M12.6666 4.00004V13.3334C12.6666 13.687 12.5261 14.0261 12.2761 14.2762C12.026 14.5262 9.68687 14.6667 9.33325 14.6667H6.66659C6.31296 14.6667 5.97383 14.5262 5.72378 14.2762C5.47373 14.0261 5.33325 13.687 5.33325 13.3334V4.00004H12.6666Z" stroke="#6B7280" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/></svg>'},gb=e=>mb.find(t=>t.key===e),hb=e=>Ff(fb[e]),yb=(e,t=50,n="...")=>{if(!e||"string"!=typeof e)return"";const r=e.trim();if(r.length<=t)return r;let o=r.substring(0,t);const i=o.lastIndexOf(" ");return i>0&&(o=o.substring(0,i)),o+n},xb=st("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),vb=st("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),bb=(0,r.createContext)(void 0);function Mb(){const e=(0,r.useContext)(bb);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}Symbol.for("constructDateFrom");const wb={},Nb={};function Eb(e,t){try{const n=(wb[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in Nb?Nb[n]:Db(n,n.split(":"))}catch{if(e in Nb)return Nb[e];const t=e?.match(jb);return t?Db(e,t.slice(1)):NaN}}const jb=/([+-]\d\d):?(\d\d)?/;function Db(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return Nb[e]=60*n+r>0?60*n+r+o:60*n-r-o}class Tb extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(Eb(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),Ob(this),kb(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new Tb(...t,e):new Tb(Date.now(),e)}withTimeZone(e){return new Tb(+this,e)}getTimezoneOffset(){const e=-Eb(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),kb(this),+this}[Symbol.for("constructDateFrom")](e){return new Tb(+new Date(e),this.timeZone)}}const Ib=/^(get|set)(?!UTC)/;function kb(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(60*-Eb(e.timeZone,e)))}function Ob(e){const t=Eb(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),i=o- -new Date(+r).getTimezoneOffset(),a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();i&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+i);const s=o-n;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const l=new Date(+e);l.setUTCSeconds(0);const c=o>0?l.getSeconds():(l.getSeconds()-60)%60,u=Math.round(-60*Eb(e.timeZone,e))%60;(u||c)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+u),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+u+c));const d=Eb(e.timeZone,e),p=d>0?Math.floor(d):Math.ceil(d),m=-new Date(+e).getTimezoneOffset()-p-s;if(p!==n&&m){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+m);const t=Eb(e.timeZone,e),n=p-(t>0?Math.floor(t):Math.ceil(t));n&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+n),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n))}}Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Ib.test(e))return;const t=e.replace(Ib,"$1UTC");Tb.prototype[t]&&(e.startsWith("get")?Tb.prototype[e]=function(){return this.internal[t]()}:(Tb.prototype[e]=function(){var e;return Date.prototype[t].apply(this.internal,arguments),e=this,Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Ob(e),+this},Tb.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),kb(this),+this}))});class _b extends Tb{static tz(e,...t){return t.length?new _b(...t,e):new _b(Date.now(),e)}toISOString(){const[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${function(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new _b(+this,e)}[Symbol.for("constructDateFrom")](e){return new _b(+new Date(e),this.timeZone)}}const Cb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Ab(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Sb={date:Ab({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Ab({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Ab({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Lb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function zb(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const Pb={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:zb({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:zb({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:zb({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:zb({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:zb({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Rb(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(s,e=>e.test(a)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(s,e=>e.test(a));let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(a.length)}}}const Yb={ordinalNumber:(Qb={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Qb.matchPattern);if(!n)return null;const r=n[0],o=e.match(Qb.parsePattern);if(!o)return null;let i=Qb.valueCallback?Qb.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:Rb({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Rb({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Rb({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Rb({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Rb({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var Qb;const Fb={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=Cb[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Sb,formatRelative:(e,t,n,r)=>Lb[e],localize:Pb,match:Yb,options:{weekStartsOn:0,firstWeekContainsDate:1}},Ub=(Math.pow(10,8),6048e5),Bb=Symbol.for("constructDateFrom");function Wb(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Bb in e?e[Bb](t):e instanceof Date?new e.constructor(t):new Date(t)}function Vb(e,t){return Wb(t||e,e)}function Hb(e,t,n){const r=Vb(e,n?.in);return isNaN(t)?Wb(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}function Gb(e,t,n){const r=Vb(e,n?.in);if(isNaN(t))return Wb(n?.in||e,NaN);if(!t)return r;const o=r.getDate(),i=Wb(n?.in||e,r.getTime());return i.setMonth(r.getMonth()+t+1,0),o>=i.getDate()?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function $b(e){const t=Vb(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Zb(e,...t){const n=Wb.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function qb(e,t){const n=Vb(e,t?.in);return n.setHours(0,0,0,0),n}function Xb(e,t,n){const[r,o]=Zb(n?.in,e,t),i=qb(r),a=qb(o),s=+i-$b(i),l=+a-$b(a);return Math.round((s-l)/864e5)}function Jb(e,t){const[n,r]=Zb(e,t.start,t.end);return{start:n,end:r}}let Kb={};function eM(){return Kb}function tM(e,t){const n=eM(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Vb(e,t?.in),i=o.getDay(),a=6+(i<r?-7:0)-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function nM(e,t){const n=Vb(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function rM(e,t){const n=Vb(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function oM(e,t){const n=eM(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Vb(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function iM(e,t){return oM(e,{...t,weekStartsOn:1})}function aM(e,t){const n=Vb(e,t?.in),r=n.getFullYear(),o=Wb(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=iM(o),a=Wb(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=iM(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function sM(e,t){const n=Vb(e,t?.in),r=+iM(n)-+function(e,t){const n=aM(e,t),r=Wb(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),iM(r)}(n);return Math.round(r/Ub)+1}function lM(e,t){const n=Vb(e,t?.in),r=n.getFullYear(),o=eM(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=Wb(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=oM(a,t),l=Wb(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=oM(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function cM(e,t){const n=Vb(e,t?.in),r=+oM(n,t)-+function(e,t){const n=eM(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=lM(e,t),i=Wb(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),oM(i,t)}(n,t);return Math.round(r/Ub)+1}function uM(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const dM={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return uM("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):uM(n+1,2)},d:(e,t)=>uM(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>uM(e.getHours()%12||12,t.length),H:(e,t)=>uM(e.getHours(),t.length),m:(e,t)=>uM(e.getMinutes(),t.length),s:(e,t)=>uM(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return uM(Math.trunc(r*Math.pow(10,n-3)),t.length)}},pM={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return dM.y(e,t)},Y:function(e,t,n,r){const o=lM(e,r),i=o>0?o:1-o;return"YY"===t?uM(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):uM(i,t.length)},R:function(e,t){return uM(aM(e),t.length)},u:function(e,t){return uM(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return uM(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return uM(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return dM.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return uM(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=cM(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):uM(o,t.length)},I:function(e,t,n){const r=sM(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):uM(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):dM.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=Vb(e,t?.in);return Xb(n,rM(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):uM(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return uM(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return uM(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return uM(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return dM.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):dM.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):uM(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):uM(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):dM.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):dM.s(e,t)},S:function(e,t){return dM.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return fM(r);case"XXXX":case"XX":return gM(r);default:return gM(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return fM(r);case"xxxx":case"xx":return gM(r);default:return gM(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+mM(r,":");default:return"GMT"+gM(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+mM(r,":");default:return"GMT"+gM(r,":")}},t:function(e,t,n){return uM(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return uM(+e,t.length)}};function mM(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+uM(i,2)}function fM(e,t){return e%60==0?(e>0?"-":"+")+uM(Math.abs(e)/60,2):gM(e,t)}function gM(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+uM(Math.trunc(r/60),2)+t+uM(r%60,2)}const hM=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},yM=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},xM={p:yM,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return hM(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",hM(r,t)).replace("{{time}}",yM(o,t))}},vM=/^D+$/,bM=/^Y+$/,MM=["D","DD","YY","YYYY"];function wM(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}const NM=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,EM=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,jM=/^'([^]*?)'?$/,DM=/''/g,TM=/[a-zA-Z]/;function IM(e,t,n){const r=eM(),o=n?.locale??r.locale??Fb,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Vb(e,n?.in);if(!function(e){return!(!wM(e)&&"number"!=typeof e||isNaN(+Vb(e)))}(s))throw new RangeError("Invalid time value");let l=t.match(EM).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,xM[t])(e,o.formatLong):e}).join("").match(NM).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:kM(e)};if(pM[t])return{isToken:!0,value:e};if(t.match(TM))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(r=>{if(!r.isToken)return r.value;const i=r.value;return(!n?.useAdditionalWeekYearTokens&&function(e){return bM.test(e)}(i)||!n?.useAdditionalDayOfYearTokens&&function(e){return vM.test(e)}(i))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),MM.includes(e))throw new RangeError(r)}(i,t,String(e)),(0,pM[i[0]])(s,i,o.localize,c)}).join("")}function kM(e){const t=e.match(jM);return t?t[1].replace(DM,"'"):e}function OM(e,t){return+Vb(e)>+Vb(t)}function _M(e,t){return+Vb(e)<+Vb(t)}function CM(e,t,n){const r=Vb(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=Wb(n?.in||e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=function(e,t){const n=Vb(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=Wb(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}(a);return r.setMonth(t,Math.min(i,s)),r}function AM(e,t){const n=Vb(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function SM(e,t){const n=t.startOfMonth(e),r=n.getDay();return 1===r?n:0===r?t.addDays(n,-6):t.addDays(n,-1*(r-1))}class LM{constructor(e,t){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?_b.tz(this.options.timeZone):new this.Date,this.newDate=(e,t,n)=>this.overrides?.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new _b(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):Hb(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):Gb(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):function(e,t,n){return Hb(e,7*t,n)}(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):function(e,t,n){return Gb(e,12*t,n)}(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):Xb(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):function(e,t,n){const[r,o]=Zb(n?.in,e,t);return 12*(r.getFullYear()-o.getFullYear())+(r.getMonth()-o.getMonth())}(e,t),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):function(e,t){const{start:n,end:r}=Jb(t?.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setDate(1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,o=!o);const l=[];for(;+a<=i;)l.push(Wb(n,a)),a.setMonth(a.getMonth()+s);return o?l.reverse():l}(e),this.eachYearOfInterval=e=>{const t=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(e):function(e,t){const{start:n,end:r}=Jb(t?.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0),a.setMonth(0,1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,o=!o);const l=[];for(;+a<=i;)l.push(Wb(n,a)),a.setFullYear(a.getFullYear()+s);return o?l.reverse():l}(e),n=new Set(t.map(e=>this.getYear(e)));if(n.size===t.length)return t;const r=[];return n.forEach(e=>{r.push(new Date(e,0,1))}),r},this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e):function(e,t){const n=SM(e,t),r=function(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,1-r),i=t.addDays(o,34);return t.getMonth(e)===t.getMonth(i)?5:4}(e,t);return t.addDays(n,7*r-1)}(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):function(e,t){return tM(e,{...t,weekStartsOn:1})}(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):nM(e),this.endOfWeek=(e,t)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,t):tM(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):function(e,t){const n=Vb(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}(e),this.format=(e,t,n)=>{const r=this.overrides?.format?this.overrides.format(e,t,this.options):IM(e,t,this.options);return this.options.numerals&&"latn"!==this.options.numerals?this.replaceDigits(r):r},this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):sM(e),this.getMonth=(e,t)=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):function(e,t){return Vb(e,t?.in).getMonth()}(e,this.options),this.getYear=(e,t)=>this.overrides?.getYear?this.overrides.getYear(e,this.options):function(e,t){return Vb(e,t?.in).getFullYear()}(e,this.options),this.getWeek=(e,t)=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):cM(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):OM(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):_M(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):wM(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):function(e,t,n){const[r,o]=Zb(n?.in,e,t);return+qb(r)===+qb(o)}(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t,n){const[r,o]=Zb(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):function(e,t,n){const[r,o]=Zb(n?.in,e,t);return r.getFullYear()===o.getFullYear()}(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):function(e,t){let n,r=t?.in;return e.forEach(e=>{r||"object"!=typeof e||(r=Wb.bind(null,e));const t=Vb(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),Wb(r,n||NaN)}(e),this.min=e=>this.overrides?.min?this.overrides.min(e):function(e,t){let n,r=t?.in;return e.forEach(e=>{r||"object"!=typeof e||(r=Wb.bind(null,e));const t=Vb(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),Wb(r,n||NaN)}(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):CM(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):function(e,t,n){const r=Vb(e,n?.in);return isNaN(+r)?Wb(n?.in||e,NaN):(r.setFullYear(t),r)}(e,t),this.startOfBroadcastWeek=(e,t)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):SM(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):qb(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):iM(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):AM(e),this.startOfWeek=(e,t)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):oM(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):rM(e),this.options={locale:Fb,...e},this.overrides=t}getDigitMap(){const{numerals:e="latn"}=this.options,t=new Intl.NumberFormat("en-US",{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){const t=this.getDigitMap();return e.replace(/\d/g,e=>t[e]||e)}formatNumber(e){return this.replaceDigits(e.toString())}getMonthYearOrder(){const e=this.options.locale?.code;return e&&LM.yearFirstLocales.has(e)?"year-first":"month-first"}formatMonthYear(e){const{locale:t,timeZone:n,numerals:r}=this.options,o=t?.code;if(o&&LM.yearFirstLocales.has(o))try{return new Intl.DateTimeFormat(o,{month:"long",year:"numeric",timeZone:n,numberingSystem:r}).format(e)}catch{}const i="year-first"===this.getMonthYearOrder()?"y LLLL":"LLLL y";return this.format(e,i)}}LM.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const zM=new LM;var PM,RM,YM,QM;function FM(e,t,n=!1,r=zM){let{from:o,to:i}=e;const{differenceInCalendarDays:a,isSameDay:s}=r;return o&&i?(a(i,o)<0&&([o,i]=[i,o]),a(t,o)>=(n?1:0)&&a(i,t)>=(n?1:0)):!n&&i?s(i,t):!(n||!o)&&s(o,t)}function UM(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function BM(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function WM(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function VM(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function HM(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function GM(e,t){return Array.isArray(e)&&e.every(t.isDate)}function $M(e,t,n=zM){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:i,isAfter:a}=n;return r.some(t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return o(e,t);if(GM(t,n))return t.includes(e);if(BM(t))return FM(t,e,!1,n);if(HM(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(UM(t)){const n=i(t.before,e)>0,r=i(t.after,e)<0;return a(t.before,t.after)?r&&n:n||r}return WM(t)?i(e,t.after)>0:VM(t)?i(t.before,e)>0:"function"==typeof t&&t(e)})}function ZM(e){return r.createElement("button",{...e})}function qM(e){return r.createElement("span",{...e})}function XM(e){const{size:t=24,orientation:n="left",className:o}=e;return r.createElement("svg",{className:o,width:t,height:t,viewBox:"0 0 24 24"},"up"===n&&r.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&r.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&r.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&r.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function JM(e){const{day:t,modifiers:n,...o}=e;return r.createElement("td",{...o})}function KM(e){const{day:t,modifiers:n,...o}=e,i=r.useRef(null);return r.useEffect(()=>{n.focused&&i.current?.focus()},[n.focused]),r.createElement("button",{ref:i,...o})}function ew(e){const{options:t,className:n,components:o,classNames:i,...a}=e,s=[i[PM.Dropdown],n].join(" "),l=t?.find(({value:e})=>e===a.value);return r.createElement("span",{"data-disabled":a.disabled,className:i[PM.DropdownRoot]},r.createElement(o.Select,{className:s,...a},t?.map(({value:e,label:t,disabled:n})=>r.createElement(o.Option,{key:e,value:e,disabled:n},t))),r.createElement("span",{className:i[PM.CaptionLabel],"aria-hidden":!0},l?.label,r.createElement(o.Chevron,{orientation:"down",size:18,className:i[PM.Chevron]})))}function tw(e){return r.createElement("div",{...e})}function nw(e){return r.createElement("div",{...e})}function rw(e){const{calendarMonth:t,displayIndex:n,...o}=e;return r.createElement("div",{...o},e.children)}function ow(e){const{calendarMonth:t,displayIndex:n,...o}=e;return r.createElement("div",{...o})}function iw(e){return r.createElement("table",{...e})}function aw(e){return r.createElement("div",{...e})}function sw(e){const{components:t}=Mb();return r.createElement(t.Dropdown,{...e})}function lw(e){const{onPreviousClick:t,onNextClick:n,previousMonth:o,nextMonth:i,...a}=e,{components:s,classNames:l,labels:{labelPrevious:c,labelNext:u}}=Mb(),d=(0,r.useCallback)(e=>{i&&n?.(e)},[i,n]),p=(0,r.useCallback)(e=>{o&&t?.(e)},[o,t]);return r.createElement("nav",{...a},r.createElement(s.PreviousMonthButton,{type:"button",className:l[PM.PreviousMonthButton],tabIndex:o?void 0:-1,"aria-disabled":!o||void 0,"aria-label":c(o),onClick:p},r.createElement(s.Chevron,{disabled:!o||void 0,className:l[PM.Chevron],orientation:"left"})),r.createElement(s.NextMonthButton,{type:"button",className:l[PM.NextMonthButton],tabIndex:i?void 0:-1,"aria-disabled":!i||void 0,"aria-label":u(i),onClick:d},r.createElement(s.Chevron,{disabled:!i||void 0,orientation:"right",className:l[PM.Chevron]})))}function cw(e){const{components:t}=Mb();return r.createElement(t.Button,{...e})}function uw(e){return r.createElement("option",{...e})}function dw(e){const{components:t}=Mb();return r.createElement(t.Button,{...e})}function pw(e){const{rootRef:t,...n}=e;return r.createElement("div",{...n,ref:t})}function mw(e){return r.createElement("select",{...e})}function fw(e){const{week:t,...n}=e;return r.createElement("tr",{...n})}function gw(e){return r.createElement("th",{...e})}function hw(e){return r.createElement("thead",{"aria-hidden":!0},r.createElement("tr",{...e}))}function yw(e){const{week:t,...n}=e;return r.createElement("th",{...n})}function xw(e){return r.createElement("th",{...e})}function vw(e){return r.createElement("tbody",{...e})}function bw(e){const{components:t}=Mb();return r.createElement(t.Dropdown,{...e})}function Mw(){const e={};for(const t in PM)e[PM[t]]=`rdp-${PM[t]}`;for(const t in RM)e[RM[t]]=`rdp-${RM[t]}`;for(const t in YM)e[YM[t]]=`rdp-${YM[t]}`;for(const t in QM)e[QM[t]]=`rdp-${QM[t]}`;return e}function ww(e,t,n){return(n??new LM(t)).formatMonthYear(e)}!function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(PM||(PM={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(RM||(RM={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(YM||(YM={})),function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"}(QM||(QM={}));const Nw=ww;function Ew(e,t,n){return(n??new LM(t)).format(e,"d")}function jw(e,t=zM){return t.format(e,"LLLL")}function Dw(e,t,n){return(n??new LM(t)).format(e,"cccccc")}function Tw(e,t=zM){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Iw(){return""}function kw(e,t=zM){return t.format(e,"yyyy")}const Ow=kw;function _w(e,t,n,r,o){const{startOfMonth:i,startOfYear:a,endOfYear:s,eachMonthOfInterval:l,getMonth:c}=o;return l({start:a(e),end:s(e)}).map(e=>{const a=r.formatMonthDropdown(e,o);return{value:c(e),label:a,disabled:t&&e<i(t)||n&&e>i(n)||!1}})}function Cw(e,t,n,r,o=!1){if(!e)return;if(!t)return;const{startOfYear:i,endOfYear:a,eachYearOfInterval:s,getYear:l}=r,c=s({start:i(e),end:a(t)});return o&&c.reverse(),c.map(e=>{const t=n.formatYearDropdown(e,r);return{value:l(e),label:t,disabled:!1}})}function Aw(e,t,n,r){let o=(r??new LM(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Sw=Aw;function Lw(e,t,n){return(n??new LM(t)).formatMonthYear(e)}const zw=Lw;function Pw(e,t,n,r){let o=(r??new LM(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function Rw(e){return"Choose the Month"}function Yw(){return""}function Qw(e){return"Go to the Next Month"}function Fw(e){return"Go to the Previous Month"}function Uw(e,t,n){return(n??new LM(t)).format(e,"cccc")}function Bw(e,t){return`Week ${e}`}function Ww(e){return"Week Number"}function Vw(e){return"Choose the Year"}const Hw=e=>e instanceof HTMLElement?e:null,Gw=e=>[...e.querySelectorAll("[data-animated-month]")??[]],$w=e=>Hw(e.querySelector("[data-animated-caption]")),Zw=e=>Hw(e.querySelector("[data-animated-weeks]"));function qw(e,t,n,r){const{month:o,defaultMonth:i,today:a=r.today(),numberOfMonths:s=1}=e;let l=o||i||a;const{differenceInCalendarMonths:c,addMonths:u,startOfMonth:d}=r;return n&&c(n,l)<s-1&&(l=u(n,-1*(s-1))),t&&c(l,t)<0&&(l=t),d(l)}class Xw{constructor(e,t,n=zM){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!n.isSameMonth(e,t)),this.dateLib=n}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class Jw{constructor(e,t){this.days=t,this.weekNumber=e}}class Kw{constructor(e,t){this.date=e,this.weeks=t}}function eN(e,t){const[n,o]=(0,r.useState)(e);return[void 0===t?n:t,o]}var tN;function nN(e){return!e[RM.disabled]&&!e[RM.hidden]&&!e[RM.outside]}function rN(e,t,n,r,o,i,a,s=0){if(s>365)return;const l=function(e,t,n,r,o,i,a){const{ISOWeek:s,broadcastCalendar:l}=i,{addDays:c,addMonths:u,addWeeks:d,addYears:p,endOfBroadcastWeek:m,endOfISOWeek:f,endOfWeek:g,max:h,min:y,startOfBroadcastWeek:x,startOfISOWeek:v,startOfWeek:b}=a;let M={day:c,week:d,month:u,year:p,startOfWeek:e=>l?x(e,a):s?v(e):b(e),endOfWeek:e=>l?m(e):s?f(e):g(e)}[e](n,"after"===t?1:-1);return"before"===t&&r?M=h([r,M]):"after"===t&&o&&(M=y([o,M])),M}(e,t,n.date,r,o,i,a),c=Boolean(i.disabled&&$M(l,i.disabled,a)),u=Boolean(i.hidden&&$M(l,i.hidden,a)),d=new Xw(l,l,a);return c||u?rN(e,t,d,r,o,i,a,s+1):d}function oN(e,t,n,o,i){const{autoFocus:a}=e,[s,l]=(0,r.useState)(),c=function(e,t,n,r){let o,i=-1;for(const a of e){const e=t(a);nN(e)&&(e[RM.focused]&&i<tN.FocusedModifier?(o=a,i=tN.FocusedModifier):r?.isEqualTo(a)&&i<tN.LastFocused?(o=a,i=tN.LastFocused):n(a.date)&&i<tN.Selected?(o=a,i=tN.Selected):e[RM.today]&&i<tN.Today&&(o=a,i=tN.Today))}return o||(o=e.find(e=>nN(t(e)))),o}(t.days,n,o||(()=>!1),s),[u,d]=(0,r.useState)(a?c:void 0);return{isFocusTarget:e=>Boolean(c?.isEqualTo(e)),setFocused:d,focused:u,blur:()=>{l(u),d(void 0)},moveFocus:(n,r)=>{if(!u)return;const o=rN(n,r,u,t.navStart,t.navEnd,e,i);if(o){if(e.disableNavigation&&!t.days.some(e=>e.isEqualTo(o)))return;t.goToDay(o),d(o)}}}}function iN(e,t,n=zM){return FM(e,t.from,!1,n)||FM(e,t.to,!1,n)||FM(t,e.from,!1,n)||FM(t,e.to,!1,n)}function aN(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:i,onSelect:a}=e,[s,l]=eN(o,a?o:void 0),c=a?o:s;return{selected:c,select:(o,s,u)=>{const{min:d,max:p}=e,m=o?function(e,t,n=0,r=0,o=!1,i=zM){const{from:a,to:s}=t||{},{isSameDay:l,isAfter:c,isBefore:u}=i;let d;if(a||s){if(a&&!s)d=l(a,e)?0===n?{from:a,to:e}:o?{from:a,to:void 0}:void 0:u(e,a)?{from:e,to:a}:{from:a,to:e};else if(a&&s)if(l(a,e)&&l(s,e))d=o?{from:a,to:s}:void 0;else if(l(a,e))d={from:a,to:n>0?void 0:e};else if(l(s,e))d={from:e,to:n>0?void 0:e};else if(u(e,a))d={from:e,to:s};else if(c(e,a))d={from:a,to:e};else{if(!c(e,s))throw new Error("Invalid range");d={from:a,to:e}}}else d={from:e,to:n>0?void 0:e};if(d?.from&&d?.to){const t=i.differenceInCalendarDays(d.to,d.from);(r>0&&t>r||n>1&&t<n)&&(d={from:e,to:void 0})}return d}(o,c,d,p,i,t):void 0;return r&&n&&m?.from&&m.to&&function(e,t,n=zM){const r=Array.isArray(t)?t:[t],o=r.filter(e=>"function"!=typeof e).some(t=>"boolean"==typeof t?t:n.isDate(t)?FM(e,t,!1,n):GM(t,n)?t.some(t=>FM(e,t,!1,n)):BM(t)?!(!t.from||!t.to)&&iN(e,{from:t.from,to:t.to},n):HM(t)?function(e,t,n=zM){const r=Array.isArray(t)?t:[t];let o=e.from;const i=n.differenceInCalendarDays(e.to,e.from),a=Math.min(i,6);for(let e=0;e<=a;e++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}(e,t.dayOfWeek,n):UM(t)?n.isAfter(t.before,t.after)?iN(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):$M(e.from,t,n)||$M(e.to,t,n):!(!WM(t)&&!VM(t))&&($M(e.from,t,n)||$M(e.to,t,n)));if(o)return!0;const i=r.filter(e=>"function"==typeof e);if(i.length){let t=e.from;const r=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=r;e++){if(i.some(e=>e(t)))return!0;t=n.addDays(t,1)}}return!1}({from:m.from,to:m.to},n,t)&&(m.from=o,m.to=void 0),a||l(m),a?.(m,o,s,u),m},isSelected:e=>c&&FM(c,e,!1,t)}}function sN(o){let i=o;i.timeZone&&(i={...o},i.today&&(i.today=new _b(i.today,i.timeZone)),i.month&&(i.month=new _b(i.month,i.timeZone)),i.defaultMonth&&(i.defaultMonth=new _b(i.defaultMonth,i.timeZone)),i.startMonth&&(i.startMonth=new _b(i.startMonth,i.timeZone)),i.endMonth&&(i.endMonth=new _b(i.endMonth,i.timeZone)),"single"===i.mode&&i.selected?i.selected=new _b(i.selected,i.timeZone):"multiple"===i.mode&&i.selected?i.selected=i.selected?.map(e=>new _b(e,i.timeZone)):"range"===i.mode&&i.selected&&(i.selected={from:i.selected.from?new _b(i.selected.from,i.timeZone):void 0,to:i.selected.to?new _b(i.selected.to,i.timeZone):void 0}));const{components:a,formatters:s,labels:l,dateLib:c,locale:u,classNames:d}=(0,r.useMemo)(()=>{const r={...Fb,...i.locale};return{dateLib:new LM({locale:r,weekStartsOn:i.broadcastCalendar?1:i.weekStartsOn,firstWeekContainsDate:i.firstWeekContainsDate,useAdditionalWeekYearTokens:i.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:i.useAdditionalDayOfYearTokens,timeZone:i.timeZone,numerals:i.numerals},i.dateLib),components:(a=i.components,{...e,...a}),formatters:(o=i.formatters,o?.formatMonthCaption&&!o.formatCaption&&(o.formatCaption=o.formatMonthCaption),o?.formatYearCaption&&!o.formatYearDropdown&&(o.formatYearDropdown=o.formatYearCaption),{...t,...o}),labels:{...n,...i.labels},locale:r,classNames:{...Mw(),...i.classNames}};var o,a},[i.locale,i.broadcastCalendar,i.weekStartsOn,i.firstWeekContainsDate,i.useAdditionalWeekYearTokens,i.useAdditionalDayOfYearTokens,i.timeZone,i.numerals,i.dateLib,i.components,i.formatters,i.labels,i.classNames]),{captionLayout:p,mode:m,navLayout:f,numberOfMonths:g=1,onDayBlur:h,onDayClick:y,onDayFocus:x,onDayKeyDown:v,onDayMouseEnter:b,onDayMouseLeave:M,onNextClick:w,onPrevClick:N,showWeekNumber:E,styles:j}=i,{formatCaption:D,formatDay:T,formatMonthDropdown:I,formatWeekNumber:k,formatWeekNumberHeader:O,formatWeekdayName:_,formatYearDropdown:C}=s,A=function(e,t){const[n,o]=function(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:i,startOfMonth:a,endOfMonth:s,addYears:l,endOfYear:c,newDate:u,today:d}=t,{fromYear:p,toYear:m,fromMonth:f,toMonth:g}=e;!n&&f&&(n=f),!n&&p&&(n=t.newDate(p,0,1)),!r&&g&&(r=g),!r&&m&&(r=u(m,11,31));const h="dropdown"===e.captionLayout||"dropdown-years"===e.captionLayout;return n?n=a(n):p?n=u(p,0,1):!n&&h&&(n=o(l(e.today??d(),-100))),r?r=s(r):m?r=u(m,11,31):!r&&h&&(r=c(e.today??d())),[n?i(n):n,r?i(r):r]}(e,t),{startOfMonth:i,endOfMonth:a}=t,s=qw(e,n,o,t),[l,c]=eN(s,e.month?s:void 0);(0,r.useEffect)(()=>{const r=qw(e,n,o,t);c(r)},[e.timeZone]);const u=function(e,t,n,r){const{numberOfMonths:o=1}=n,i=[];for(let n=0;n<o;n++){const o=r.addMonths(e,n);if(t&&o>t)break;i.push(o)}return i}(l,o,e,t),d=function(e,t,n,r){const o=e[0],i=e[e.length-1],{ISOWeek:a,fixedWeeks:s,broadcastCalendar:l}=n??{},{addDays:c,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:p,endOfISOWeek:m,endOfMonth:f,endOfWeek:g,isAfter:h,startOfBroadcastWeek:y,startOfISOWeek:x,startOfWeek:v}=r,b=l?y(o,r):a?x(o):v(o),M=u(l?p(i):a?m(f(i)):g(f(i)),b),w=d(i,o)+1,N=[];for(let e=0;e<=M;e++){const n=c(b,e);if(t&&h(n,t))break;N.push(n)}const E=(l?35:42)*w;if(s&&N.length<E){const e=E-N.length;for(let t=0;t<e;t++){const e=c(N[N.length-1],1);N.push(e)}}return N}(u,e.endMonth?a(e.endMonth):void 0,e,t),p=function(e,t,n,r){const{addDays:o,endOfBroadcastWeek:i,endOfISOWeek:a,endOfMonth:s,endOfWeek:l,getISOWeek:c,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:p,startOfWeek:m}=r,f=e.reduce((e,f)=>{const g=n.broadcastCalendar?d(f,r):n.ISOWeek?p(f):m(f),h=n.broadcastCalendar?i(f):n.ISOWeek?a(s(f)):l(s(f)),y=t.filter(e=>e>=g&&e<=h),x=n.broadcastCalendar?35:42;if(n.fixedWeeks&&y.length<x){const e=t.filter(e=>{const t=x-y.length;return e>h&&e<=o(h,t)});y.push(...e)}const v=y.reduce((e,t)=>{const o=n.ISOWeek?c(t):u(t),i=e.find(e=>e.weekNumber===o),a=new Xw(t,f,r);return i?i.days.push(a):e.push(new Jw(o,[a])),e},[]),b=new Kw(f,v);return e.push(b),e},[]);return n.reverseMonths?f.reverse():f}(u,d,e,t),m=function(e){return e.reduce((e,t)=>e.concat(t.weeks.slice()),[].slice())}(p),f=function(e){const t=[];return e.reduce((e,n)=>{const r=n.weeks.reduce((e,t)=>e.concat(t.days.slice()),t.slice());return e.concat(r.slice())},t.slice())}(p),g=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i}=n,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:l}=r,c=o?i??1:1,u=a(e);return t&&l(u,t)<=0?void 0:s(u,-c)}(l,n,e,t),h=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:i=1}=n,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:l}=r,c=o?i:1,u=a(e);return t&&l(t,e)<i?void 0:s(u,c)}(l,o,e,t),{disableNavigation:y,onMonthChange:x}=e,v=e=>{if(y)return;let t=i(e);n&&t<i(n)&&(t=i(n)),o&&t>i(o)&&(t=i(o)),c(t),x?.(t)},b={months:p,weeks:m,days:f,navStart:n,navEnd:o,previousMonth:g,nextMonth:h,goToMonth:v,goToDay:e=>{(e=>m.some(t=>t.days.some(t=>t.isEqualTo(e))))(e)||v(e.date)}};return b}(i,c),{days:S,months:L,navStart:z,navEnd:P,previousMonth:R,nextMonth:Y,goToMonth:Q}=A,F=function(e,t,n,r,o){const{disabled:i,hidden:a,modifiers:s,showOutsideDays:l,broadcastCalendar:c,today:u}=t,{isSameDay:d,isSameMonth:p,startOfMonth:m,isBefore:f,endOfMonth:g,isAfter:h}=o,y=n&&m(n),x=r&&g(r),v={[RM.focused]:[],[RM.outside]:[],[RM.disabled]:[],[RM.hidden]:[],[RM.today]:[]},b={};for(const t of e){const{date:e,displayMonth:n}=t,r=Boolean(n&&!p(e,n)),m=Boolean(y&&f(e,y)),g=Boolean(x&&h(e,x)),M=Boolean(i&&$M(e,i,o)),w=Boolean(a&&$M(e,a,o))||m||g||!c&&!l&&r||c&&!1===l&&r,N=d(e,u??o.today());r&&v.outside.push(t),M&&v.disabled.push(t),w&&v.hidden.push(t),N&&v.today.push(t),s&&Object.keys(s).forEach(n=>{const r=s?.[n];r&&$M(e,r,o)&&(b[n]?b[n].push(t):b[n]=[t])})}return e=>{const t={[RM.focused]:!1,[RM.disabled]:!1,[RM.hidden]:!1,[RM.outside]:!1,[RM.today]:!1},n={};for(const n in v){const r=v[n];t[n]=r.some(t=>t===e)}for(const t in b)n[t]=b[t].some(t=>t===e);return{...t,...n}}}(S,i,z,P,c),{isSelected:U,select:B,selected:W}=function(e,t){const n=function(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=eN(n,o?n:void 0),s=o?n:i,{isSameDay:l}=t;return{selected:s,select:(e,t,n)=>{let i=e;return!r&&s&&s&&l(e,s)&&(i=void 0),o||a(i),o?.(i,e,t,n),i},isSelected:e=>!!s&&l(s,e)}}(e,t),r=function(e,t){const{selected:n,required:r,onSelect:o}=e,[i,a]=eN(n,o?n:void 0),s=o?n:i,{isSameDay:l}=t,c=e=>s?.some(t=>l(t,e))??!1,{min:u,max:d}=e;return{selected:s,select:(e,t,n)=>{let i=[...s??[]];if(c(e)){if(s?.length===u)return;if(r&&1===s?.length)return;i=s?.filter(t=>!l(t,e))}else i=s?.length===d?[e]:[...i,e];return o||a(i),o?.(i,e,t,n),i},isSelected:c}}(e,t),o=aN(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}(i,c)??{},{blur:V,focused:H,isFocusTarget:G,moveFocus:$,setFocused:Z}=oN(i,A,F,U??(()=>!1),c),{labelDayButton:q,labelGridcell:X,labelGrid:J,labelMonthDropdown:K,labelNav:ee,labelPrevious:te,labelNext:ne,labelWeekday:re,labelWeekNumber:oe,labelWeekNumberHeader:ie,labelYearDropdown:ae}=l,se=(0,r.useMemo)(()=>function(e,t){const n=e.today(),r=t?e.startOfISOWeek(n):e.startOfWeek(n),o=[];for(let t=0;t<7;t++){const n=e.addDays(r,t);o.push(n)}return o}(c,i.ISOWeek),[c,i.ISOWeek]),le=void 0!==m||void 0!==y,ce=(0,r.useCallback)(()=>{R&&(Q(R),N?.(R))},[R,Q,N]),ue=(0,r.useCallback)(()=>{Y&&(Q(Y),w?.(Y))},[Q,Y,w]),de=(0,r.useCallback)((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),Z(e),B?.(e.date,t,n),y?.(e.date,t,n)},[B,y,Z]),pe=(0,r.useCallback)((e,t)=>n=>{Z(e),x?.(e.date,t,n)},[x,Z]),me=(0,r.useCallback)((e,t)=>n=>{V(),h?.(e.date,t,n)},[V,h]),fe=(0,r.useCallback)((e,t)=>n=>{const r={ArrowLeft:[n.shiftKey?"month":"day","rtl"===i.dir?"after":"before"],ArrowRight:[n.shiftKey?"month":"day","rtl"===i.dir?"before":"after"],ArrowDown:[n.shiftKey?"year":"week","after"],ArrowUp:[n.shiftKey?"year":"week","before"],PageUp:[n.shiftKey?"year":"month","before"],PageDown:[n.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(r[n.key]){n.preventDefault(),n.stopPropagation();const[e,t]=r[n.key];$(e,t)}v?.(e.date,t,n)},[$,v,i.dir]),ge=(0,r.useCallback)((e,t)=>n=>{b?.(e.date,t,n)},[b]),he=(0,r.useCallback)((e,t)=>n=>{M?.(e.date,t,n)},[M]),ye=(0,r.useCallback)(e=>t=>{const n=Number(t.target.value),r=c.setMonth(c.startOfMonth(e),n);Q(r)},[c,Q]),xe=(0,r.useCallback)(e=>t=>{const n=Number(t.target.value),r=c.setYear(c.startOfMonth(e),n);Q(r)},[c,Q]),{className:ve,style:be}=(0,r.useMemo)(()=>({className:[d[PM.Root],i.className].filter(Boolean).join(" "),style:{...j?.[PM.Root],...i.style}}),[d,i.className,i.style,j]),Me=function(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([e,n])=>{e.startsWith("data-")&&(t[e]=n)}),t}(i),we=(0,r.useRef)(null);!function(e,t,{classNames:n,months:o,focused:i,dateLib:a}){const s=(0,r.useRef)(null),l=(0,r.useRef)(o),c=(0,r.useRef)(!1);(0,r.useLayoutEffect)(()=>{const r=l.current;if(l.current=o,!(t&&e.current&&e.current instanceof HTMLElement&&0!==o.length&&0!==r.length&&o.length===r.length))return;const u=a.isSameMonth(o[0].date,r[0].date),d=a.isAfter(o[0].date,r[0].date),p=d?n[QM.caption_after_enter]:n[QM.caption_before_enter],m=d?n[QM.weeks_after_enter]:n[QM.weeks_before_enter],f=s.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(Gw(g).forEach(e=>{if(!(e instanceof HTMLElement))return;const t=Hw(e.querySelector("[data-animated-month]"));t&&e.contains(t)&&e.removeChild(t);const n=$w(e);n&&n.classList.remove(p);const r=Zw(e);r&&r.classList.remove(m)}),s.current=g):s.current=null,c.current||u||i)return;const h=f instanceof HTMLElement?Gw(f):[],y=Gw(e.current);if(y?.every(e=>e instanceof HTMLElement)&&h&&h.every(e=>e instanceof HTMLElement)){c.current=!0;const t=[];e.current.style.isolation="isolate";const r=(x=e.current,Hw(x.querySelector("[data-animated-nav]")));r&&(r.style.zIndex="1"),y.forEach((o,i)=>{const a=h[i];if(!a)return;o.style.position="relative",o.style.overflow="hidden";const s=$w(o);s&&s.classList.add(p);const l=Zw(o);l&&l.classList.add(m);const u=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),r&&(r.style.zIndex=""),s&&s.classList.remove(p),l&&l.classList.remove(m),o.style.position="",o.style.overflow="",o.contains(a)&&o.removeChild(a)};t.push(u),a.style.pointerEvents="none",a.style.position="absolute",a.style.overflow="hidden",a.setAttribute("aria-hidden","true");const f=(e=>Hw(e.querySelector("[data-animated-weekdays]")))(a);f&&(f.style.opacity="0");const g=$w(a);g&&(g.classList.add(d?n[QM.caption_before_exit]:n[QM.caption_after_exit]),g.addEventListener("animationend",u));const y=Zw(a);y&&y.classList.add(d?n[QM.weeks_before_exit]:n[QM.weeks_after_exit]),o.insertBefore(a,o.firstChild)})}var x})}(we,Boolean(i.animate),{classNames:d,months:L,focused:H,dateLib:c});const Ne={dayPickerProps:i,selected:W,select:B,isSelected:U,months:L,nextMonth:Y,previousMonth:R,goToMonth:Q,getModifiers:F,components:a,classNames:d,styles:j,labels:l,formatters:s};return r.createElement(bb.Provider,{value:Ne},r.createElement(a.Root,{rootRef:i.animate?we:void 0,className:ve,style:be,dir:i.dir,id:i.id,lang:i.lang,nonce:i.nonce,title:i.title,role:i.role,"aria-label":i["aria-label"],"aria-labelledby":i["aria-labelledby"],...Me},r.createElement(a.Months,{className:d[PM.Months],style:j?.[PM.Months]},!i.hideNavigation&&!f&&r.createElement(a.Nav,{"data-animated-nav":i.animate?"true":void 0,className:d[PM.Nav],style:j?.[PM.Nav],"aria-label":ee(),onPreviousClick:ce,onNextClick:ue,previousMonth:R,nextMonth:Y}),L.map((e,t)=>r.createElement(a.Month,{"data-animated-month":i.animate?"true":void 0,className:d[PM.Month],style:j?.[PM.Month],key:t,displayIndex:t,calendarMonth:e},"around"===f&&!i.hideNavigation&&0===t&&r.createElement(a.PreviousMonthButton,{type:"button",className:d[PM.PreviousMonthButton],tabIndex:R?void 0:-1,"aria-disabled":!R||void 0,"aria-label":te(R),onClick:ce,"data-animated-button":i.animate?"true":void 0},r.createElement(a.Chevron,{disabled:!R||void 0,className:d[PM.Chevron],orientation:"rtl"===i.dir?"right":"left"})),r.createElement(a.MonthCaption,{"data-animated-caption":i.animate?"true":void 0,className:d[PM.MonthCaption],style:j?.[PM.MonthCaption],calendarMonth:e,displayIndex:t},p?.startsWith("dropdown")?r.createElement(a.DropdownNav,{className:d[PM.Dropdowns],style:j?.[PM.Dropdowns]},(()=>{const t="dropdown"===p||"dropdown-months"===p?r.createElement(a.MonthsDropdown,{key:"month",className:d[PM.MonthsDropdown],"aria-label":K(),classNames:d,components:a,disabled:Boolean(i.disableNavigation),onChange:ye(e.date),options:_w(e.date,z,P,s,c),style:j?.[PM.Dropdown],value:c.getMonth(e.date)}):r.createElement("span",{key:"month"},I(e.date,c)),n="dropdown"===p||"dropdown-years"===p?r.createElement(a.YearsDropdown,{key:"year",className:d[PM.YearsDropdown],"aria-label":ae(c.options),classNames:d,components:a,disabled:Boolean(i.disableNavigation),onChange:xe(e.date),options:Cw(z,P,s,c,Boolean(i.reverseYears)),style:j?.[PM.Dropdown],value:c.getYear(e.date)}):r.createElement("span",{key:"year"},C(e.date,c));return"year-first"===c.getMonthYearOrder()?[n,t]:[t,n]})(),r.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},D(e.date,c.options,c))):r.createElement(a.CaptionLabel,{className:d[PM.CaptionLabel],role:"status","aria-live":"polite"},D(e.date,c.options,c))),"around"===f&&!i.hideNavigation&&t===g-1&&r.createElement(a.NextMonthButton,{type:"button",className:d[PM.NextMonthButton],tabIndex:Y?void 0:-1,"aria-disabled":!Y||void 0,"aria-label":ne(Y),onClick:ue,"data-animated-button":i.animate?"true":void 0},r.createElement(a.Chevron,{disabled:!Y||void 0,className:d[PM.Chevron],orientation:"rtl"===i.dir?"left":"right"})),t===g-1&&"after"===f&&!i.hideNavigation&&r.createElement(a.Nav,{"data-animated-nav":i.animate?"true":void 0,className:d[PM.Nav],style:j?.[PM.Nav],"aria-label":ee(),onPreviousClick:ce,onNextClick:ue,previousMonth:R,nextMonth:Y}),r.createElement(a.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===m||"range"===m,"aria-label":J(e.date,c.options,c)||void 0,className:d[PM.MonthGrid],style:j?.[PM.MonthGrid]},!i.hideWeekdays&&r.createElement(a.Weekdays,{"data-animated-weekdays":i.animate?"true":void 0,className:d[PM.Weekdays],style:j?.[PM.Weekdays]},E&&r.createElement(a.WeekNumberHeader,{"aria-label":ie(c.options),className:d[PM.WeekNumberHeader],style:j?.[PM.WeekNumberHeader],scope:"col"},O()),se.map(e=>r.createElement(a.Weekday,{"aria-label":re(e,c.options,c),className:d[PM.Weekday],key:String(e),style:j?.[PM.Weekday],scope:"col"},_(e,c.options,c)))),r.createElement(a.Weeks,{"data-animated-weeks":i.animate?"true":void 0,className:d[PM.Weeks],style:j?.[PM.Weeks]},e.weeks.map(e=>r.createElement(a.Week,{className:d[PM.Week],key:e.weekNumber,style:j?.[PM.Week],week:e},E&&r.createElement(a.WeekNumber,{week:e,style:j?.[PM.WeekNumber],"aria-label":oe(e.weekNumber,{locale:u}),className:d[PM.WeekNumber],scope:"row",role:"rowheader"},k(e.weekNumber,c)),e.days.map(e=>{const{date:t}=e,n=F(e);if(n[RM.focused]=!n.hidden&&Boolean(H?.isEqualTo(e)),n[YM.selected]=U?.(t)||n.selected,BM(W)){const{from:e,to:r}=W;n[YM.range_start]=Boolean(e&&r&&c.isSameDay(t,e)),n[YM.range_end]=Boolean(e&&r&&c.isSameDay(t,r)),n[YM.range_middle]=FM(W,t,!0,c)}const o=function(e,t={},n={}){let r={...t?.[PM.Day]};return Object.entries(e).filter(([,e])=>!0===e).forEach(([e])=>{r={...r,...n?.[e]}}),r}(n,j,i.modifiersStyles),s=function(e,t,n={}){return Object.entries(e).filter(([,e])=>!0===e).reduce((e,[r])=>(n[r]?e.push(n[r]):t[RM[r]]?e.push(t[RM[r]]):t[YM[r]]&&e.push(t[YM[r]]),e),[t[PM.Day]])}(n,d,i.modifiersClassNames),l=le||n.hidden?void 0:X(t,n,c.options,c);return r.createElement(a.Day,{key:`${c.format(t,"yyyy-MM-dd")}_${c.format(e.displayMonth,"yyyy-MM")}`,day:e,modifiers:n,className:s.join(" "),style:o,role:"gridcell","aria-selected":n.selected||void 0,"aria-label":l,"data-day":c.format(t,"yyyy-MM-dd"),"data-month":e.outside?c.format(t,"yyyy-MM"):void 0,"data-selected":n.selected||void 0,"data-disabled":n.disabled||void 0,"data-hidden":n.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":n.focused||void 0,"data-today":n.today||void 0},!n.hidden&&le?r.createElement(a.DayButton,{className:d[PM.DayButton],style:j?.[PM.DayButton],type:"button",day:e,modifiers:n,disabled:n.disabled||void 0,tabIndex:G(e)?0:-1,"aria-label":q(t,n,c.options,c),onClick:de(e,n),onBlur:me(e,n),onFocus:pe(e,n),onKeyDown:fe(e,n),onMouseEnter:ge(e,n),onMouseLeave:he(e,n)},T(t,c.options,c)):!n.hidden&&T(e.date,c.options,c))})))))))),i.footer&&r.createElement(a.Footer,{className:d[PM.Footer],style:j?.[PM.Footer],role:"status","aria-live":"polite"},i.footer)))}function lN(e,t){return+Vb(e)===+Vb(t)}!function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"}(tN||(tN={}));const cN=()=>(0,ee.jsx)("span",{className:"bg-icon-interactive h-1 w-1 absolute rounded-full inline-block bottom-0 left-1/2 right-1/2"}),uN=e=>IM(e,"E").slice(0,1),dN=(e,t=24)=>Array.from({length:t},(t,n)=>e+n),pN=e=>"multiple"===e?[]:"range"===e?{from:void 0,to:void 0}:void 0,mN=({width:e,className:t,classNames:n,selectedDates:o,setSelectedDates:i,showOutsideDays:a=!0,mode:s="single",variant:l="normal",alignment:c="horizontal",numberOfMonths:u,disabled:d,...p})=>{const m=r.isValidElement(p.footer)||"function"==typeof p.footer,[f,g]=(0,r.useState)(!1),[h,y]=(0,r.useState)(!1),[x,v]=(0,r.useState)((new Date).getFullYear()),[b,M]=(0,r.useState)(x-x%24);void 0===o&&(o="multiple"===s?[]:"range"===s?{from:void 0,to:void 0}:void 0);const w=({weekdays:e})=>(0,ee.jsx)("div",{className:"flex justify-between",children:e.map((e,t)=>(0,ee.jsx)("button",{className:"h-10 w-10 px-1.5 py-2 text-center text-text-secondary text-sm font-normal content-center bg-transparent border-none shrink-0",children:e},t))}),N=e=>(0,ee.jsx)("div",{className:"flex flex-col bsf-force-ui-month-weeks",children:e.children[1].props.children.map((e,t)=>(0,ee.jsx)("div",{className:"flex flex-row justify-between",children:e},t))}),E=qe("relative bg-background-primary shadow-datepicker-wrapper",e,"vertical"===c?"flex flex-col":"flex flex-row  gap-3","normal"===l?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"","presets"===l?"rounded-tr-md border border-solid border-border-subtle":"","dualdate"===l?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"",m?"rounded-b-none":"rounded-bl-md rounded-br-md");return(0,ee.jsx)(ee.Fragment,{children:(0,ee.jsx)(sN,{mode:s,selected:o,onSelect:(e,t)=>{if("range"===s){const n=o;if(!n?.from&&!n?.to||n?.from&&n?.to)return n.from&&lN(t,n?.from)||n.to&&lN(t,n?.to)?void i({from:void 0,to:void 0}):void i({from:t,to:void 0});if(n?.from&&!n?.to)return t<n.from?void i({from:t,to:n.from}):void i({from:n.from,to:t});i(e)}else"multiple"===s?o.some(e=>IM(e,"yyyy-MM-dd")===IM(t,"yyyy-MM-dd"))?i(o.filter(e=>IM(e,"yyyy-MM-dd")!==IM(t,"yyyy-MM-dd"))):i([...o,t]):"single"===s&&i(e)},hideNavigation:!0,captionLayout:"label",className:qe(t),formatters:{formatWeekdayName:uN},classNames:{months:E,month:"flex flex-col p-2 gap-1 text-center w-full",caption:"relative flex justify-center items-center",table:"w-full border-separate border-spacing-0",head_row:"flex mb-1",head_cell:"text-muted-foreground rounded-md w-10 font-normal text-sm",row:"flex w-full mt-2",cell:"h-10 w-10 text-center text-sm p-0 relative",...n},numberOfMonths:u,showOutsideDays:!0,components:{MonthCaption:function(e){const{goToMonth:t,nextMonth:n,previousMonth:r}=Mb(),o=IM(e.calendarMonth.date,"yyyy"),i=IM(e.calendarMonth.date,"MMMM"),a=new Date(e.calendarMonth.date);a.setDate(a.getDate()-a.getDay());const s=Array.from({length:7},(e,t)=>{const n=new Date(a);return n.setDate(a.getDate()+t),uN(n)});let l;return l=h?`${b} - ${b+23}`:f?o:`${i} ${o}`,(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)("div",{className:"flex justify-between",children:[(0,ee.jsx)(Jt,{variant:"ghost",onClick:()=>{if(h)M(b-24);else if(f){const n=new Date(x-1,e.calendarMonth.date.getMonth());v(n.getFullYear()),t(n)}else t(r)},className:"bg-background-primary border-none cursor-pointer","aria-label":"Previous Button",icon:(0,ee.jsx)(xb,{className:"h-4 w-4 text-button-tertiary-color"})}),(0,ee.jsx)(Jt,{variant:"ghost",onClick:()=>{u>1||(f?(y(!0),g(!1)):h?y(!1):g(!f))},children:l}),(0,ee.jsx)(Jt,{variant:"ghost",onClick:()=>{if(h)M(b+24);else if(f){const n=new Date(x+1,e.calendarMonth.date.getMonth());v(n.getFullYear()),t(n)}else t(n)},className:"bg-background-primary border-none cursor-pointer","aria-label":"Next Button",icon:(0,ee.jsx)(vb,{className:"h-4 w-4 text-button-tertiary-color"})})]}),h&&(0,ee.jsx)("div",{className:"grid grid-cols-4 w-full",children:dN(b).map(n=>(0,ee.jsxs)(Jt,{variant:"ghost",onClick:()=>(n=>{v(n),y(!1),g(!0),t(new Date(n,e.calendarMonth.date.getMonth()))})(n),className:qe("h-10 w-full text-center font-normal relative",n===x&&n!==(new Date).getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black",n===(new Date).getFullYear()&&"font-semibold"),children:[n,n===(new Date).getFullYear()&&cN()]},n))}),f&&!h&&(0,ee.jsx)("div",{className:"grid grid-cols-4 gap-2 my-12",children:Array.from({length:12},(n,r)=>(0,ee.jsxs)(Jt,{variant:"ghost",onClick:()=>{g(!1),t(new Date(x,r))},className:qe("px-1.5 py-2 h-10 w-[4.375rem] text-center font-normal relative",r===e.calendarMonth.date.getMonth()&&r!==(new Date).getMonth()&&x===e.calendarMonth.date.getFullYear()&&e.calendarMonth.date.getFullYear()!==(new Date).getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black",r===(new Date).getMonth()&&(new Date).getFullYear()===x&&"font-semibold"),children:[IM(new Date(0,r),"MMM"),(new Date).getMonth()===r&&(new Date).getFullYear()===x&&cN()]},r))}),!f&&!h&&(0,ee.jsx)(w,{weekdays:s})]})},DayButton:({day:e,modifiers:t,...n})=>{const{selected:r,today:i,disabled:s,outside:l,range_middle:c,range_start:u,range_end:d}=t,p=u||d||c,m=new Date,f=o?.to,g=IM(e.displayMonth,"yyyy-MM")===IM(m,"yyyy-MM"),h=f&&IM(f,"yyyy-MM")===IM(e.date,"yyyy-MM"),y=Gb(m,-1,w),x=IM(e.date,"yyyy-MM")===IM(y,"yyyy-MM"),v=g||h||p,b=!a&&l,M=qe("h-10 w-10 flex items-center justify-center transition text-text-secondary relative text-sm","border-none rounded",!r&&!p||l?"bg-transparent hover:bg-button-tertiary-hover":"bg-background-brand text-text-on-color",c&&v&&!l?"bg-brand-background-50 text-text-secondary rounded-none":"",s?"opacity-50 cursor-not-allowed text-text-disabled":"cursor-pointer",l&&!p||!v&&l||l&&!x||l?"bg-transparent opacity-50 text-text-disabled cursor-auto":"");var w;return(0,ee.jsxs)("button",{className:qe(M,i&&"font-semibold",b&&"opacity-0",u&&"fui-range-start",d&&"fui-range-end",c&&"fui-range-middle",{"[&:is([data-hover=true])]:bg-brand-background-50 [&:is([data-hover=true])]:rounded-none":!p&&!r}),disabled:s||l,onClick:e=>{"function"==typeof n.onClick&&n.onClick(e)},onMouseEnter:e=>{"function"==typeof n.onMouseEnter&&n.onMouseEnter(e),e.currentTarget.setAttribute("data-hover","true")},onMouseLeave:e=>{"function"==typeof n.onMouseLeave&&n.onMouseLeave(e),e.currentTarget.setAttribute("data-hover","false")},"aria-label":IM(e.date,"EEEE, MMMM do, yyyy"),"data-selected":r,"data-day":IM(e.date,"yyyy-MM-dd"),children:[n.children,i&&v&&(0,ee.jsx)("span",{className:"absolute h-1 w-1 bg-background-brand rounded-full bottom-1"})]})},Day:e=>{const t=Object.entries(e).reduce((e,[t,n])=>(t.startsWith("data-")&&(e[t]=n),e),{});return(0,ee.jsx)("div",{...t,className:qe(e.className,"inline-flex"),children:e.children})},Weekdays:()=>(0,ee.jsx)(ee.Fragment,{}),Week:e=>(0,ee.jsx)("div",{className:qe("bsf-force-ui-month-week flex flex-row",e.className),children:e.children}),Months:e=>(0,ee.jsx)(ee.Fragment,{children:(0,ee.jsx)("div",{className:qe("bsf-force-ui-date-picker-month",E),children:e?.children?.map((e,t)=>e?(0,ee.jsx)(r.Fragment,{children:e.map((e,t)=>(0,ee.jsxs)(r.Fragment,{children:[t>0&&(0,ee.jsx)("div",{className:"border border-solid border-border-subtle border-l-0"}),e]},t))},t):null)})}),MonthGrid:e=>f||h?(0,ee.jsx)(ee.Fragment,{}):(0,ee.jsx)(N,{...e})},..."range"===s?{required:!1}:{},...p,onDayMouseEnter:(e,t,n)=>{if("range"!==s)return;const r=o;if(r?.from&&r?.to||!r?.from&&!r?.to)return void Array.from(document.querySelectorAll("[data-hover]")).forEach(e=>{e.setAttribute("data-hover","false")});const i=n.target,a=new Date(i.dataset.day),c=_M(a,r.from),u=OM(a,r.to);let d;switch(l){case"dualdate":case"presets":d=i.closest(".bsf-force-ui-date-picker-month");break;default:d=i.closest(".bsf-force-ui-month-weeks")}const p=Array.from(d.querySelectorAll("button"));u&&p.sort((e,t)=>OM(new Date(e.dataset.day),new Date(t.dataset.day))?-1:1),c&&p.sort((e,t)=>_M(new Date(e.dataset.day),new Date(t.dataset.day))?1:-1);const m=p.indexOf(i),f=p.findIndex(e=>"true"===e.getAttribute("data-selected")),g=[],h=Math.min(m,f),y=Math.max(m,f);for(let e=h;e<=y;e++)p[e]?.disabled||g.push(p[e]);p.forEach(e=>{e.setAttribute("data-hover",g.includes(e)?"true":"false")})},disabled:d})})};function fN(e){return qb(Date.now(),e)}function gN(e){return Wb(e,Date.now())}function hN(e){const t=gN(e?.in),n=t.getFullYear(),r=t.getMonth(),o=t.getDate(),i=gN(e?.in);return i.setFullYear(n,r,o-1),i.setHours(0,0,0,0),i}function yN(e,t,n){return Hb(e,-t,n)}const xN=({selectionType:e="single",variant:t="normal",presets:n=[],onCancel:o,onApply:i,onDateSelect:a,applyButtonText:s="Apply",cancelButtonText:l="Cancel",showOutsideDays:c=!0,isFooter:u=!0,selected:d,disabled:p,...m})=>{const[f,g]=(0,r.useState)(()=>{if(!d)return pN(e);const t="multiple"===e&&Array.isArray(d),n="single"===e&&d instanceof Date;return t||"range"===e&&"from"in d&&"to"in d||n?d:pN(e)}),h=e=>{g(e),a&&a(e)},y=[{label:"Today",range:{from:fN(),to:fN()}},{label:"Yesterday",range:{from:hN(),to:hN()}},{label:"This Week",range:{from:oM(new Date,{weekStartsOn:1}),to:tM(new Date,{weekStartsOn:1})}},{label:"Last 7 Days",range:{from:qb(yN(new Date,6)),to:qb(new Date)}},{label:"This Month",range:{from:AM(new Date),to:nM(new Date)}},{label:"Last 30 Days",range:{from:qb(yN(new Date,29)),to:qb(new Date)}}],x=n.length>0?n:y,v=()=>{g("multiple"===e?[]:{from:void 0,to:void 0}),o&&o()},b=()=>{i&&i(f)};return"normal"===t?(0,ee.jsx)(mN,{...m,mode:e,variant:t,width:"w-[18.5rem]",selectedDates:f,showOutsideDays:c,setSelectedDates:h,footer:u&&(0,ee.jsxs)("div",{className:"flex bg-background-primary justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-md rounded-tl-none rounded-tr-none",children:[(0,ee.jsx)(Jt,{variant:"outline",onClick:v,children:l}),(0,ee.jsx)(Jt,{onClick:b,children:s})]}),disabled:p}):"dualdate"===t?(0,ee.jsx)(mN,{mode:e,numberOfMonths:2,alignment:"horizontal",selectedDates:f,setSelectedDates:h,showOutsideDays:c,variant:t,width:"w-auto",footer:(0,ee.jsxs)("div",{className:"flex bg-background-primary justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-md rounded-tl-none rounded-tr-none",children:[(0,ee.jsx)(Jt,{variant:"outline",onClick:v,children:l}),(0,ee.jsx)(Jt,{onClick:b,children:s})]}),disabled:p,...m}):"presets"===t?(0,ee.jsxs)("div",{className:"flex flex-row shadow-datepicker-wrapper",children:[(0,ee.jsx)("div",{className:"flex flex-col gap-1 p-3 items-start border border-solid border-border-subtle border-r-0 rounded-tl-md rounded-bl-md bg-background-primary",children:x.map((e,t)=>{const n=f&&"from"in f&&"to"in f&&f.from?.getTime()===e.range.from.getTime()&&f.to?.getTime()===e.range.to.getTime();return(0,ee.jsx)(Jt,{onClick:()=>(e=>{g(e)})(e.range),variant:"ghost",className:qe("text-left font-medium text-sm text-nowrap w-full",n&&"bg-brand-background-50"),children:e.label},t)})}),(0,ee.jsx)(mN,{...m,mode:e,selectedDates:f,setSelectedDates:h,variant:t,showOutsideDays:c,width:"w-auto",numberOfMonths:2,footer:(0,ee.jsxs)("div",{className:"flex justify-end p-2 gap-3 border-l border-r border-t-0 border-b border-solid border-border-subtle bg-background-primary rounded-br-md",children:[(0,ee.jsx)(Jt,{variant:"outline",onClick:v,children:l}),(0,ee.jsx)(Jt,{onClick:b,children:s})]}),disabled:p})]}):void 0},vN=(0,r.createContext)(null);const bN=e=>!e.isLayoutDirty&&e.willUpdate(!1);function MN(){const e=new Set,t=new WeakMap,n=()=>e.forEach(bN);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const wN=e=>!0===e,NN=({children:e,id:t,inherit:n=!0})=>{const o=(0,r.useContext)(pn),i=(0,r.useContext)(vN),[a,s]=function(){const e=function(){const e=(0,r.useRef)(!1);return En(()=>(e.current=!0,()=>{e.current=!1}),[]),e}(),[t,n]=(0,r.useState)(0),o=(0,r.useCallback)(()=>{e.current&&n(t+1)},[t]);return[(0,r.useCallback)(()=>wr.postRender(o),[o]),t]}(),l=(0,r.useRef)(null),c=o.id||i;null===l.current&&((e=>wN(!0===e)||"id"===e)(n)&&c&&(t=t?c+"-"+t:c),l.current={id:t,group:wN(n)&&o.group||MN()});const u=(0,r.useMemo)(()=>({...l.current,forceRender:a}),[s]);return(0,ee.jsx)(pn.Provider,{value:u,children:e})},EN=(0,r.createContext)({}),jN=()=>(0,r.useContext)(EN),DN=(0,r.createContext)(null),TN=({children:e,activeItem:t=null,onChange:n,className:o,size:i="sm",orientation:a="horizontal",variant:s="pill",iconPosition:l="left",width:c="full"})=>{const u=rt(),d=jN()?.activeItem||t,p=(0,r.useCallback)((e,t)=>{n&&n({event:e,value:t})},[n]);let m,f="rounded-full",g="p-1",h="ring-1 ring-tab-border";"vertical"===a?m="gap-0.5":("rounded"===s||"pill"===s)&&("xs"===i||"sm"===i?m="gap-0.5":("md"===i||"lg"===i)&&(m="gap-1")),"rounded"===s||"vertical"===a?f="rounded-md":"underline"===s&&(f="rounded-none",g="p-0",h="border-t-0 border-r-0 border-l-0 border-b border-solid border-tab-border","xs"===i?m="gap-0":"sm"===i?m="gap-2.5":("md"===i||"lg"===i)&&(m="gap-3"));const y=qe(`box-border [&>*]:box-border flex items-center ${"full"===c?"w-full":""} ${"vertical"===a?"flex-col":""}`,f,g,m,h,"underline"!==s?"bg-tab-background":"",o);return(0,ee.jsx)("div",{className:y,children:(0,ee.jsx)(DN.Provider,{value:{activeItem:d,onChange:p,size:i,variant:s,orientation:a,iconPosition:l,width:c},children:(0,ee.jsx)(NN,{id:u,children:r.Children.map(e,e=>(0,r.isValidElement)(e)?r.cloneElement(e):null)})})})};TN.displayName="Tabs.Group";const IN=(0,r.forwardRef)(({slug:e,text:t,icon:n,className:o,disabled:i=!1,badge:a=null,...s},l)=>{const c=(0,r.useContext)(DN);if(!c)throw new Error("Tab should be used inside Tabs Group");const{activeItem:u,onChange:d,size:p,variant:m,orientation:f,iconPosition:g,width:h}=c,y={xs:"px-1.5 py-0.5 text-xs [&_svg]:size-3",sm:"underline"===m?"py-1.5 text-sm [&_svg]:size-4":"px-3 py-1.5 text-sm [&_svg]:size-4",md:"underline"===m?"py-2 text-base [&_svg]:size-5":"px-3.5 py-1.5 text-base [&_svg]:size-5",lg:"underline"===m?"p-2.5 text-lg [&_svg]:size-6":"px-3.5 py-1.5 text-lg [&_svg]:size-6"}[p],x=qe("relative border-none bg-transparent text-text-secondary cursor-pointer flex items-center justify-center transition-[box-shadow,color,background-color] duration-200","full"===h?"flex-1":"","vertical"===f?"w-full justify-between":"");let v="rounded-full";"rounded"===m?v="rounded-md":"underline"===m&&(v="rounded-none");const b=qe(x,"border-none",v,"hover:text-text-primary","focus:outline-none",y,u===e?"bg-background-primary text-text-primary shadow-sm":"",i?"text-text-disabled cursor-not-allowed hover:text-text-disabled":"",o),M=qe("flex items-center gap-1");return(0,ee.jsxs)(Gc.button,{ref:l,className:b,disabled:i,onClick:n=>{d(n,{slug:e,text:t})},...s,layoutRoot:!0,children:[u===e&&"underline"===m&&(0,ee.jsx)(Gc.span,{layoutId:"underline",layoutDependency:u,className:"absolute right-0 left-0 -bottom-px h-px bg-border-interactive"}),(0,ee.jsxs)("span",{className:M,children:["left"===g&&n&&(0,ee.jsx)("span",{className:"mr-1 contents center-center transition duration-150",children:n}),t,"right"===g&&n&&(0,ee.jsx)("span",{className:"ml-1 contents center-center transition duration-150",children:n})]}),a&&(0,r.isValidElement)(a)&&a]})});IN.displayName="Tabs.Tab";const kN=({activeItem:e,children:t})=>(0,ee.jsx)(EN.Provider,{value:{activeItem:e},children:t}),ON=({slug:e,children:t})=>{const n=jN();if(!n)throw new Error("TabPanel should be used inside Tabs");return e===n.activeItem?(0,ee.jsx)(ee.Fragment,{children:t}):null};function _N({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}ON.displayName="Tabs.Panel",kN.Group=TN,kN.Tab=IN,kN.Panel=ON;const CN=r.forwardRef(_N);function AN({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"}))}const SN=r.forwardRef(AN);function LN({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const zN=r.forwardRef(LN),PN=e=>{if(!e)return;const t=new Date(String(e).slice(0,10)+"T00:00:00");return isNaN(t.getTime())?void 0:t},RN=({id:e,label:t,value:n,placeholder:o,onChange:i,helper:a})=>{const[s,l]=(0,Uf.useState)(!1),[c,u]=(0,Uf.useState)(!1),d=(0,Uf.useRef)(null);(0,Uf.useEffect)(()=>{if(!s)return;const e=e=>{d.current&&!d.current.contains(e.target)&&l(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[s]);const p=PN(n);return(0,r.createElement)("div",{className:"flex flex-col gap-1.5",ref:d},(0,r.createElement)("label",{htmlFor:e,className:"text-sm font-medium text-text-primary"},t),(0,r.createElement)("div",{className:"relative"},(0,r.createElement)("button",{id:e,type:"button",onClick:()=>{if(!s&&d.current){const e=d.current.getBoundingClientRect();u(window.innerHeight-e.bottom<370)}l(e=>!e)},className:"w-full h-10 px-3.5 flex items-center gap-2 bg-white text-text-primary outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200 rounded text-sm text-left cursor-pointer hover:outline-border-strong focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2"},(0,r.createElement)(SN,{className:"w-4 h-4 text-text-tertiary flex-shrink-0"}),(0,r.createElement)("span",{className:n?"text-text-primary":"text-text-tertiary"},n?!(m=PN(n))||isNaN(m.getTime())?"":IM(m,"MMM d, yyyy"):o)),s&&(0,r.createElement)("div",{className:`pc-date-picker-popup absolute z-50 ${c?"bottom-full mb-1":"top-full mt-1"} left-0 shadow-lg rounded-md`},(0,r.createElement)(xN,{selectionType:"single",variant:"normal",selected:p,onApply:e=>{i((e=>IM(e,"yyyy-MM-dd"))(e)),l(!1)},onCancel:()=>{i(""),l(!1)},cancelButtonText:(0,Xc.__)("Clear","power-coupons")}))),a&&(0,r.createElement)("p",{className:"m-0 text-xs text-text-tertiary leading-snug"},a));var m},YN=["buy-x-get-x-free","buy-x-get-y","buy-x-get-y-at-x-percent-off"],QN=["spend-x-get-y-free","spend-x-get-y-at-x-percent-off","spend-x-get-free-shipping"],FN=["buy-x-get-y","buy-x-get-y-at-x-percent-off","spend-x-get-y-free","spend-x-get-y-at-x-percent-off"],UN=e=>{const t={},{key:n,trigger_type:r,buy_product_ids:o,get_product_ids:i}=e;return YN.includes(n)&&"specific_products"===(r||"any_product")&&(o&&0!==o.length||(t.buy_product_ids=(0,Xc.__)("Please select at least one product to buy.","power-coupons"))),FN.includes(n)&&(i&&0!==i.length||(t.get_product_ids=(0,Xc.__)("Please select at least one product to get.","power-coupons"))),t},BN=({message:e})=>e?(0,r.createElement)("p",{className:"text-red-500 text-xs mt-1 flex items-center gap-1"},(0,r.createElement)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,r.createElement)("path",{d:"M6 1L11 10H1L6 1Z",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.createElement)("path",{d:"M6 5V7",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,r.createElement)("circle",{cx:"6",cy:"9",r:"0.5",fill:"currentColor"})),e):null,WN=[{slug:"basic-settings",title:(0,Xc.__)("Basic Settings","power-coupons"),content:({formData:e,setFormData:t,presetData:n,setActiveTab:o,errors:i,setErrors:a,clearError:s})=>{var l;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",null,(0,r.createElement)("strong",null,(0,Xc.__)("Offer Basics","power-coupons")),(0,r.createElement)("p",null,(0,Xc.__)("Define the core settings for your offer.","power-coupons"))),(0,r.createElement)("div",{className:"flex flex-col gap-4"},(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(cv,{value:null!==(l=e.name)&&void 0!==l?l:"",id:"bogo-input-offer-name",label:(0,Xc.__)("Offer Name","power-coupons"),size:"md",type:"text",placeholder:(0,Xc.__)("E.g. Buy X Get X @ 10%","power-coupons"),onChange:e=>{t("name",e),s("name")}}),(0,r.createElement)(BN,{message:i.name})),(0,r.createElement)("div",{className:"flex flex-col items-start gap-1.5"},(0,r.createElement)("label",{htmlFor:"bogo-textarea-offer-description",className:"text-sm font-medium"},(0,Xc.__)("Description","power-coupons")),(0,r.createElement)("textarea",{id:"bogo-textarea-offer-description",className:"!font-normal !text-sm h-20 bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary w-full outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200 p-3 py-2 rounded text-xs focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 hover:outline-border-strong",placeholder:(0,Xc.__)("Eg: Buy more, save more! 1 item gets 10% off, 2 items get 20% off, and the savings grow with every item.","power-coupons"),defaultValue:e.description||n?.description||"",onChange:e=>t("description",e.target.value)})),(0,r.createElement)("div",{className:"flex flex-col gap-1.5"},(0,r.createElement)("label",{className:"text-sm font-medium"},(0,Xc.__)("Activate Offer","power-coupons")),(0,r.createElement)(wv.Group,{columns:2,onChange:e=>t("activation_type",e),size:"md",defaultValue:e.activation_type||n?.activation_type||"automatically",style:"simple"},(0,r.createElement)(wv.Button,{label:{description:(0,Xc.__)("Shows the offer name in the cart summary after it's applied.","power-coupons"),heading:(0,Xc.__)("Automatically","power-coupons")},value:"automatically",borderOn:!0}),(0,r.createElement)(wv.Button,{label:{description:(0,Xc.__)("Apply this offer by entering the coupon code for eligible items.","power-coupons"),heading:(0,Xc.__)("Using Coupon Code","power-coupons")},value:"manually",borderOn:!0})))),(0,r.createElement)(Jt,{className:"font-semibold text-sm px-3 py-2 w-fit ml-auto cursor-pointer no-underline text-white hover:text-white bg-wpcolor hover:bg-wphovercolor rounded-md box-content outline-0 hover:outline-0 focus:ring-0 focus-visible:ring-1 ring-0 border-none",size:"md",tag:"button",type:"button",variant:"primary",onClick:()=>{const t=(e=>{const t={};return(e.name||"").trim()||(t.name=(0,Xc.__)("Offer name is required.","power-coupons")),t})(e);Object.keys(t).length>0?a(t):(a({}),o(WN[1].slug))}},(0,Xc.__)("Save & Continue","power-coupons")))}},{slug:"offer-conditions",title:(0,Xc.__)("Offer Conditions","power-coupons"),content:({formData:e,setFormData:t,setActiveTab:n,errors:o,setErrors:i,clearError:a})=>{var s,l;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",null,(0,r.createElement)("strong",null,(0,Xc.__)("Set Offer Conditions","power-coupons")),(0,r.createElement)("p",null,(0,Xc.__)("Configure when and how your BOGO offer should be applied.","power-coupons"))),(0,r.createElement)("div",{className:"flex flex-col gap-4"},(0,r.createElement)("div",{className:"flex flex-col gap-1.5"},(0,r.createElement)("label",{className:"text-sm font-medium"},(0,Xc.__)("Discount Type","power-coupons")),(0,r.createElement)(wv.Group,{columns:3,onChange:e=>{t("discount_type",e),a("discount_percent"),a("discount_amount")},size:"md",style:"simple"},(0,r.createElement)(wv.Button,{label:{heading:(0,Xc.__)("Free","power-coupons")},checked:!e.discount_type||"free"===e.discount_type,value:"free",borderOn:!0}),(0,r.createElement)(wv.Button,{label:{heading:(0,Xc.__)("Percentage","power-coupons")},checked:"percentage"===e.discount_type,value:"percentage",borderOn:!0}),(0,r.createElement)(wv.Button,{label:{heading:(0,Xc.__)("Fixed Amount","power-coupons")},checked:"fixed"===e.discount_type,value:"fixed",borderOn:!0}))),"buy-x-get-x-free"===e.key&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(cv,{label:(0,Xc.__)("Buy Quantity","power-coupons"),type:"number",min:"1",size:"md",defaultValue:e.buy_quantity||"1",onChange:e=>{t("buy_quantity",e),a("buy_quantity")}}),(0,r.createElement)(BN,{message:o.buy_quantity})),(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(cv,{label:(0,Xc.__)("Get Quantity","power-coupons"),type:"number",min:"1",size:"md",defaultValue:e.get_quantity||"1",onChange:e=>{t("get_quantity",e),a("get_quantity")}}),(0,r.createElement)(BN,{message:o.get_quantity}))),("buy-x-get-y"===e.key||"buy-x-get-y-at-x-percent-off"===e.key)&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(cv,{label:(0,Xc.__)("Buy Quantity","power-coupons"),type:"number",min:"1",size:"md",defaultValue:e.buy_quantity||"1",onChange:e=>{t("buy_quantity",e),a("buy_quantity")}}),(0,r.createElement)(BN,{message:o.buy_quantity})),(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(cv,{label:(0,Xc.__)("Get Quantity","power-coupons"),type:"number",min:"1",size:"md",defaultValue:e.get_quantity||"1",onChange:e=>{t("get_quantity",e),a("get_quantity")},className:"font-['Figtree'] font-normal not-italic text-sm leading-5 tracking-[0%]"}),(0,r.createElement)(BN,{message:o.get_quantity}))),("spend-x-get-y-free"===e.key||"spend-x-get-y-at-x-percent-off"===e.key||"spend-x-get-free-shipping"===e.key)&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(cv,{label:(0,Xc.__)("Minimum Spend Amount","power-coupons"),type:"number",min:"0",step:"0.01",defaultValue:e.spend_amount||"50",onChange:e=>{t("spend_amount",e),a("spend_amount")}}),(0,r.createElement)(BN,{message:o.spend_amount})),"spend-x-get-free-shipping"!==e.key&&(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(cv,{label:(0,Xc.__)("Get Quantity","power-coupons"),type:"number",min:"1",defaultValue:e.get_quantity||"1",onChange:e=>{t("get_quantity",e),a("get_quantity")}}),(0,r.createElement)(BN,{message:o.get_quantity}))),"percentage"===e.discount_type&&(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(cv,{label:(0,Xc.__)("Discount Percentage (%)","power-coupons"),type:"number",min:"0",max:"100",step:"0.01",defaultValue:e.discount_percent||"10",onChange:e=>{t("discount_percent",e),a("discount_percent")}}),(0,r.createElement)(BN,{message:o.discount_percent})),"fixed"===e.discount_type&&(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(cv,{label:(0,Xc.__)("Fixed Discount Amount","power-coupons"),type:"number",min:"0",step:"0.01",defaultValue:e.discount_amount||"5",onChange:e=>{t("discount_amount",e),a("discount_amount")}}),(0,r.createElement)(BN,{message:o.discount_amount})),(0,r.createElement)("div",{className:"grid grid-cols-2 gap-4"},(0,r.createElement)(RN,{id:"bogo-input-start-date",label:(0,Xc.__)("Start Date","power-coupons"),value:null!==(s=e.start_date)&&void 0!==s?s:"",placeholder:(0,Xc.__)("Select start date","power-coupons"),onChange:e=>t("start_date",e),helper:(0,Xc.__)("Leave blank to start immediately.","power-coupons")}),(0,r.createElement)(RN,{id:"bogo-input-end-date",label:(0,Xc.__)("End Date","power-coupons"),value:null!==(l=e.end_date)&&void 0!==l?l:"",placeholder:(0,Xc.__)("Select end date","power-coupons"),onChange:e=>t("end_date",e),helper:(0,Xc.__)("Leave blank to never expire.","power-coupons")})),(0,r.createElement)("div",{className:"flex items-start flex-col gap-1.5"},(0,r.createElement)(dt,{label:{heading:(0,Xc.__)("Include free shipping","power-coupons")},size:"sm",defaultChecked:e.free_shipping||!1,onChange:e=>t("free_shipping",e)}))),(0,r.createElement)("div",{className:"flex gap-2 ml-auto"},(0,r.createElement)(Jt,{className:"font-semibold text-sm px-3 py-2 cursor-pointer border border-border-subtle text-text-primary hover:text-text-primary bg-transparent hover:bg-field-secondary-background rounded-md",variant:"secondary",onClick:()=>{i({}),n(WN[0].slug)}},(0,Xc.__)("Back","power-coupons")),(0,r.createElement)(Jt,{className:"font-semibold text-sm px-3 py-2 w-fit ml-auto cursor-pointer no-underline text-white hover:text-white bg-wpcolor hover:bg-wphovercolor rounded-md box-content outline-0 hover:outline-0 focus:ring-0 focus-visible:ring-1 ring-0 border-none",variant:"primary",onClick:()=>{const t=(e=>{const t={},{key:n,buy_quantity:r,get_quantity:o,spend_amount:i,discount_type:a,discount_percent:s,discount_amount:l}=e,c=null!=r?r:"1",u=null!=o?o:"1",d=null!=i?i:"50",p=null!=s?s:"10",m=null!=l?l:"5";if(YN.includes(n)&&(!c||parseInt(c)<1)&&(t.buy_quantity=(0,Xc.__)("Buy quantity must be at least 1.","power-coupons")),(YN.includes(n)||QN.includes(n)&&"spend-x-get-free-shipping"!==n)&&(!u||parseInt(u)<1)&&(t.get_quantity=(0,Xc.__)("Get quantity must be at least 1.","power-coupons")),QN.includes(n)&&(!d||parseFloat(d)<=0)&&(t.spend_amount=(0,Xc.__)("Minimum spend amount must be greater than 0.","power-coupons")),"percentage"===(a||"free")){const e=parseFloat(p);(isNaN(e)||e<=0||e>100)&&(t.discount_percent=(0,Xc.__)("Discount percentage must be between 1 and 100.","power-coupons"))}if("fixed"===(a||"free")){const e=parseFloat(m);(isNaN(e)||e<=0)&&(t.discount_amount=(0,Xc.__)("Fixed discount amount must be greater than 0.","power-coupons"))}return t})(e);Object.keys(t).length>0?i(t):(i({}),n(WN[2].slug))}},(0,Xc.__)("Save & Continue","power-coupons"))))}},{slug:"product-selection",title:(0,Xc.__)("Product Selection","power-coupons"),content:({formData:e,setFormData:t,setActiveTab:n,saveOffer:o,isLoading:i,errors:a,setErrors:s,clearError:l,formError:c})=>{const u=YN.includes(e.key),d=e.trigger_type||"any_product",p=!u||"specific_products"===d;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",null,(0,r.createElement)("strong",null,(0,Xc.__)("Select Products","power-coupons")),(0,r.createElement)("p",null,(0,Xc.__)("Choose which products are eligible for this BOGO offer.","power-coupons"))),(0,r.createElement)("div",{className:"flex flex-col gap-4"},u&&(0,r.createElement)("div",{className:"flex flex-col gap-1.5"},(0,r.createElement)("label",{className:"text-sm font-medium"},(0,Xc.__)("Trigger Type","power-coupons")),(0,r.createElement)(wv.Group,{columns:2,onChange:e=>{t("trigger_type",e),l("buy_product_ids")},defaultValue:d,size:"md",style:"simple"},(0,r.createElement)(wv.Button,{label:{heading:(0,Xc.__)("Any Product","power-coupons"),description:(0,Xc.__)("Trigger when cart contains any product.","power-coupons")},value:"any_product",checked:"any_product"===d,borderOn:!0}),(0,r.createElement)(wv.Button,{label:{heading:(0,Xc.__)("Specific Products","power-coupons"),description:(0,Xc.__)("Trigger only for selected products.","power-coupons")},value:"specific_products",checked:"specific_products"===d,borderOn:!0}))),p&&(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(Uv,{label:(0,Xc.__)("Products to Buy","power-coupons"),placeholder:(0,Xc.__)("Search for products…","power-coupons"),value:e.buy_product_ids||[],onChange:e=>{t("buy_product_ids",e),l("buy_product_ids")}}),(0,r.createElement)(BN,{message:a.buy_product_ids})),"buy-x-get-x-free"!==e.key&&"spend-x-get-free-shipping"!==e.key&&(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(Uv,{label:(0,Xc.__)("Products to Get","power-coupons"),placeholder:(0,Xc.__)("Search for products…","power-coupons"),value:e.get_product_ids||[],onChange:e=>{t("get_product_ids",e),l("get_product_ids")}}),(0,r.createElement)(BN,{message:a.get_product_ids})),(0,r.createElement)("div",null,(0,r.createElement)("label",{htmlFor:"bogo-input-usage-limit",className:"text-sm font-medium mb-2 block"},(0,Xc.__)("Usage Limit (Optional)","power-coupons")),(0,r.createElement)("input",{id:"bogo-input-usage-limit",type:"number",min:"0",className:"w-full p-2 border border-border-subtle rounded text-sm",placeholder:(0,Xc.__)("Leave empty for unlimited usage","power-coupons"),onChange:e=>t("usage_limit",e.target.value)}))),c&&(0,r.createElement)("div",{className:"bg-red-50 border border-red-200 rounded-md px-4 py-3 text-red-700 text-sm flex items-start gap-2"},(0,r.createElement)("svg",{className:"shrink-0 mt-0.5",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,r.createElement)("path",{d:"M6 1L11 10H1L6 1Z",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.createElement)("path",{d:"M6 5V7",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,r.createElement)("circle",{cx:"6",cy:"9",r:"0.5",fill:"currentColor"})),c),(0,r.createElement)("div",{className:"flex gap-2 ml-auto"},(0,r.createElement)(Jt,{className:"font-semibold text-sm px-3 py-2 cursor-pointer border border-border-subtle text-text-primary hover:text-text-primary bg-transparent hover:bg-field-secondary-background rounded-md",variant:"secondary",onClick:()=>{s({}),n(WN[1].slug)}},(0,Xc.__)("Back","power-coupons")),QN.includes(e.key)?(0,r.createElement)(Jt,{className:"font-semibold text-sm px-3 py-2 w-fit ml-auto cursor-pointer no-underline text-white hover:text-white bg-wpcolor hover:bg-wphovercolor rounded-md box-content outline-0 hover:outline-0 focus:ring-0 focus-visible:ring-1 ring-0 border-none",variant:"primary",onClick:()=>{const t=UN(e);Object.keys(t).length>0?s(t):(s({}),n(WN[3].slug))}},(0,Xc.__)("Save & Continue","power-coupons")):(0,r.createElement)(Jt,{className:"font-semibold text-sm px-3 py-2 w-fit ml-auto cursor-pointer no-underline text-white hover:text-white bg-wpcolor hover:bg-wphovercolor rounded-md box-content outline-0 hover:outline-0 focus:ring-0 focus-visible:ring-1 ring-0 border-none",variant:"primary",onClick:()=>{const t=UN(e);Object.keys(t).length>0?s(t):(s({}),o())},disabled:i},i?e.id?(0,Xc.__)("Updating…","power-coupons"):(0,Xc.__)("Creating…","power-coupons"):e.id?(0,Xc.__)("Update Offer","power-coupons"):(0,Xc.__)("Create Offer","power-coupons"))))}},{slug:"progress-bar",title:(0,Xc.__)("Progress Bar","power-coupons"),content:({formData:e,setFormData:t,setActiveTab:n,saveOffer:o,isLoading:i,formError:a})=>{const s=QN.includes(e.key);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",null,(0,r.createElement)("strong",null,(0,Xc.__)("Cart Progress Bar","power-coupons")),(0,r.createElement)("p",null,(0,Xc.__)("Configure how this offer appears in the cart progress bar. Only applies to spend-based offers.","power-coupons"))),!s&&(0,r.createElement)("p",{className:"text-sm text-text-tertiary bg-gray-50 border border-border-subtle rounded-md px-4 py-3"},(0,Xc.__)("Progress bar is only available for spend-based offers (Spend $X types). Quantity-based offers do not have a spend threshold.","power-coupons")),s&&(0,r.createElement)("div",{className:"flex flex-col gap-4"},(0,r.createElement)("div",{className:"flex items-center gap-3"},(0,r.createElement)(Wt,{size:"sm",className:"[&>input]:!border-none",defaultValue:e.progress_bar_enabled||!1,onChange:e=>t("progress_bar_enabled",e)}),(0,r.createElement)("span",{className:"text-sm font-medium"},(0,Xc.__)("Enable Progress Bar","power-coupons"))),(0,r.createElement)("div",null,(0,r.createElement)("label",{className:"block text-sm font-medium mb-1"},(0,Xc.__)("Icon","power-coupons")),(0,r.createElement)("select",{value:e.progress_bar_icon||"gift",onChange:e=>t("progress_bar_icon",e.target.value),className:"block w-full border border-border-subtle rounded-md text-sm py-2 px-3 focus:outline-none focus:ring-2 focus:ring-orange-500"},(0,r.createElement)("option",{value:"tag"},(0,Xc.__)("Tag","power-coupons")),(0,r.createElement)("option",{value:"truck"},(0,Xc.__)("Truck","power-coupons")),(0,r.createElement)("option",{value:"gift"},(0,Xc.__)("Gift","power-coupons")),(0,r.createElement)("option",{value:"percent"},(0,Xc.__)("Percent","power-coupons")))),(0,r.createElement)(cv,{label:(0,Xc.__)("Priority","power-coupons"),type:"number",min:"1",step:"1",size:"md",defaultValue:e.progress_bar_priority||"1",onChange:e=>t("progress_bar_priority",e)}),(0,r.createElement)("div",null,(0,r.createElement)("label",{htmlFor:"bogo-progress-bar-message",className:"block text-sm font-medium mb-1"},(0,Xc.__)("Progress Message","power-coupons")),(0,r.createElement)("textarea",{id:"bogo-progress-bar-message",className:"w-full p-2 border border-border-subtle rounded text-sm",rows:"2",defaultValue:e.progress_bar_message||(0,Xc.__)("Spend {remaining} more to unlock {coupon_name}!","power-coupons"),onChange:e=>t("progress_bar_message",e.target.value)}),(0,r.createElement)("p",{className:"mt-1 text-xs text-text-tertiary"},(0,Xc.__)("Placeholders: {remaining}, {threshold}, {coupon_name}","power-coupons"))),(0,r.createElement)("div",null,(0,r.createElement)("label",{htmlFor:"bogo-progress-bar-success-msg",className:"block text-sm font-medium mb-1"},(0,Xc.__)("Success Message","power-coupons")),(0,r.createElement)("textarea",{id:"bogo-progress-bar-success-msg",className:"w-full p-2 border border-border-subtle rounded text-sm",rows:"2",defaultValue:e.progress_bar_success_msg||(0,Xc.__)("You unlocked {coupon_name}!","power-coupons"),onChange:e=>t("progress_bar_success_msg",e.target.value)}))),a&&(0,r.createElement)("div",{className:"bg-red-50 border border-red-200 rounded-md px-4 py-3 text-red-700 text-sm flex items-start gap-2"},(0,r.createElement)("svg",{className:"shrink-0 mt-0.5",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,r.createElement)("path",{d:"M6 1L11 10H1L6 1Z",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.createElement)("path",{d:"M6 5V7",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,r.createElement)("circle",{cx:"6",cy:"9",r:"0.5",fill:"currentColor"})),a),(0,r.createElement)("div",{className:"flex gap-2 ml-auto"},(0,r.createElement)(Jt,{className:"font-semibold text-sm px-3 py-2 cursor-pointer border border-border-subtle text-text-primary hover:text-text-primary bg-transparent hover:bg-field-secondary-background rounded-md",variant:"secondary",onClick:()=>n(WN[2].slug)},(0,Xc.__)("Back","power-coupons")),(0,r.createElement)(Jt,{className:"font-semibold text-sm px-3 py-2 w-fit ml-auto cursor-pointer no-underline text-white hover:text-white bg-wpcolor hover:bg-wphovercolor rounded-md box-content outline-0 hover:outline-0 focus:ring-0 focus-visible:ring-1 ring-0 border-none",variant:"primary",onClick:o,disabled:i},i?e.id?(0,Xc.__)("Updating…","power-coupons"):(0,Xc.__)("Creating…","power-coupons"):e.id?(0,Xc.__)("Update Offer","power-coupons"):(0,Xc.__)("Create Offer","power-coupons"))))}}],VN=({setCurrentScreen:e,setFormData:t})=>(0,r.createElement)("div",{className:"flex flex-col gap-6 sm:gap-8 px-3"},(0,r.createElement)("h3",{className:"text-[#111827] text-xl sm:text-[24px] font-[600] m-0"},(0,Xc.__)("Select the offer you want to create","power-coupons")),(0,r.createElement)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-[repeat(3,292px)] gap-4"},mb.map(n=>(0,r.createElement)("button",{key:n.key,type:"button",onClick:()=>(n=>{e("form"),t("key",n.key),t("name",n.title)})(n),className:"cursor-pointer w-full h-auto min-h-[120px] lg:h-[152px] border-solid border border-[#E5E7EB] hover:outline hover:outline-solid hover:outline-[#ED4D22] bg-white rounded-lg p-3 shadow-[0px_1px_2px_0px_#0000000D]"},(0,r.createElement)("h4",{className:"m-0 font-[600] text-[18px] leading-7 text-[#111827]"},n.title),(0,r.createElement)("p",{className:"m-0 mt-1 text-[#374151] text-[14px] leading-6"},n.description))))),HN=({setCurrentScreen:e,formData:t,setFormData:n,toggleModalOpen:o})=>{const[i,a]=(0,Uf.useState)(WN[0].slug),[s,l]=(0,Uf.useState)(!1),[c,u]=(0,Uf.useState)({}),[d,p]=(0,Uf.useState)(""),m=QN.includes(t.key)?WN:WN.filter(e=>"progress-bar"!==e.slug),f=m.findIndex(e=>e.slug===i),g=gb(t.key),h=e=>{u({}),p(""),a(e)},y=e=>{u(t=>{if(!t[e])return t;const n={...t};return delete n[e],n})},x=async()=>{l(!0),p(""),u({});try{var e,r,i,s,c,d;const l=new FormData;l.append("action","power_coupons_save_bogo_offer"),l.append("_wpnonce",window.powerCouponsSettings?.update_nonce||""),t.id&&l.append("offer_id",t.id),l.append("name",t.name||g?.title||""),l.append("description",t.description||g?.description||""),l.append("offer_type",t.key||"buy-x-get-x-free"),l.append("activation_type",t.activation_type||"automatically"),l.append("buy_quantity",null!==(e=t.buy_quantity)&&void 0!==e?e:1),l.append("get_quantity",null!==(r=t.get_quantity)&&void 0!==r?r:1),l.append("spend_amount",null!==(i=t.spend_amount)&&void 0!==i?i:50),l.append("discount_type",t.discount_type||"free"),l.append("discount_percent",null!==(s=t.discount_percent)&&void 0!==s?s:10),l.append("discount_amount",null!==(c=t.discount_amount)&&void 0!==c?c:5),l.append("free_shipping",t.free_shipping||!1),l.append("trigger_type",t.trigger_type||"any_product"),l.append("start_date",t.start_date||""),l.append("end_date",t.end_date||""),(t.buy_product_ids||[]).forEach((e,t)=>l.append(`buy_product_ids[${t}]`,e)),(t.get_product_ids||[]).forEach((e,t)=>l.append(`get_product_ids[${t}]`,e)),l.append("progress_bar_enabled",t.progress_bar_enabled||!1),l.append("progress_bar_icon",t.progress_bar_icon||"gift"),l.append("progress_bar_priority",null!==(d=t.progress_bar_priority)&&void 0!==d?d:1),l.append("progress_bar_message",t.progress_bar_message||""),l.append("progress_bar_success_msg",t.progress_bar_success_msg||"");const m=await fetch(ajaxurl,{method:"POST",body:l}),f=await m.json();if(f.success)n({}),o(!0);else if("validation"===f.data?.type&&f.data?.errors){const e=f.data.errors;u(e),e.name?a(WN[0].slug):(e.buy_quantity||e.get_quantity||e.spend_amount||e.discount_percent||e.discount_amount)&&a(WN[1].slug)}else{const e="string"==typeof f.data?f.data:(0,Xc.__)("Failed to save offer. Please try again.","power-coupons");p(e)}}catch(e){console.error("Error saving offer:",e),p((0,Xc.__)("An error occurred while saving the offer. Please try again.","power-coupons"))}finally{l(!1)}};return(0,r.createElement)("div",{className:"bg-white w-full max-w-[760px] rounded-md px-4 sm:px-6 py-6 sm:py-8 shadow-[0px_1px_2px_-1px_#0000001A,0px_1px_3px_0px_#0000001A]"},(0,r.createElement)("div",{className:"flex items-center gap-2"},!t.id&&(0,r.createElement)("button",{type:"button",className:"m-0 p-0 bg-transparent border-none cursor-pointer leading-[0]",onClick:()=>e("offers")},hb("chevronLeft")),(0,r.createElement)("h3",{className:"m-0 text-2xl text-[#111827]"},t.id?(0,Xc.__)("Edit Offer","power-coupons")+": "+(t.name||g?.title):t?.name||g?.title||(0,Xc.__)("Create a New Offer","power-coupons"))),(0,r.createElement)("div",{className:"mt-6"},(0,r.createElement)(kN,{activeItem:i},(0,r.createElement)(kN.Group,{iconPosition:"left",orientation:"horizontal",size:"md",variant:"underline",width:"auto"},m.map((e,t)=>(0,r.createElement)(kN.Tab,{key:e.slug,type:"button",icon:f>t?(0,r.createElement)(CN,{color:"#16A34A"}):(0,r.createElement)(zN,{color:"#737373"}),className:"power-coupons-bogo-form-tab px-2.5 py-4 !cursor-default",slug:e.slug,text:e.title}))),(0,r.createElement)("div",{className:"py-5 flex flex-col text-left gap-6"},m.map(e=>(0,r.createElement)(kN.Panel,{key:e.slug,slug:e.slug},(0,r.createElement)(e.content,{formData:t,setFormData:n,presetData:g,setActiveTab:h,saveOffer:x,isLoading:s,errors:c,setErrors:u,clearError:y,formError:d})))))))},GN=({toggleModalOpen:e,editingOffer:t})=>{const[n,o]=(0,Uf.useState)(t?"form":"offers"),[i,a]=(0,Uf.useState)(t?{id:t.id,key:t.offer_type,name:t.name,description:t.description,activation_type:t.activation_type||"automatically",buy_quantity:t.buy_quantity||1,get_quantity:t.get_quantity||1,spend_amount:t.spend_amount||50,discount_type:t.discount_type||"free",discount_percent:t.discount_percent||10,discount_amount:t.discount_amount||0,free_shipping:t.free_shipping||!1,buy_product_ids:t.buy_product_ids||[],get_product_ids:t.get_product_ids||[],trigger_type:t.trigger_type||"any_product",start_date:t.start_date||"",end_date:t.end_date||"",progress_bar_enabled:t.progress_bar_enabled||!1,progress_bar_icon:t.progress_bar_icon||"gift",progress_bar_priority:t.progress_bar_priority||1,progress_bar_message:t.progress_bar_message||"",progress_bar_success_msg:t.progress_bar_success_msg||""}:{}),s=(e,t)=>{a(n=>({...n,[e]:t}))};return(0,r.createElement)("div",{className:"flex items-start sm:items-center justify-center text-center px-4 sm:px-6 lg:px-0 pt-14 pb-8 min-h-full box-border"},"offers"===n?(0,r.createElement)(VN,{setCurrentScreen:o,formData:i,setFormData:s}):(0,r.createElement)(HN,{toggleModalOpen:e,setCurrentScreen:o,formData:i,setFormData:s}))},$N=({toggleModalOpen:e,editingOffer:t})=>(0,r.createElement)("div",{id:"power-coupons-bogo-modal",className:"bg-background-secondary absolute top-0 left-0 w-full h-[100vh] z-[999] bg-[#F9FAFB] overflow-y-auto"},(0,r.createElement)(au,{className:"power_coupons-header--content !absolute h-14 min-h-[unset] p-0 border-0 border-b border-solid border-border-subtle bg-white !fixed items-center z-10 shadow-[0px_1px_2px_0px_#0000000D]",gap:0,role:"navigation","aria-label":(0,Xc.__)("Main Navigation","power-coupons")},(0,r.createElement)(au.Left,{className:"power_coupons-header--content-left lg:px-5 px-3"},(0,r.createElement)(au.Item,null,(0,r.createElement)("img",{className:"lg:block h-8 w-8",src:pu,alt:(0,Xc.__)("Power Coupons","power-coupons")}))),(0,r.createElement)(au.Right,{className:"power_coupons-header--content-right p-2 md:p-4 gap-2 md:gap-4",gap:"md"},(0,r.createElement)(au.Item,null,(0,r.createElement)("button",{type:"button",onClick:()=>e(),className:"bg-transparent border-none cursor-pointer"},hb("close"))))),(0,r.createElement)(GN,{toggleModalOpen:e,editingOffer:t}));function ZN({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}o.dn($N);const qN=r.forwardRef(ZN),XN=(0,r.createContext)({}),JN=()=>(0,r.useContext)(XN),KN={open:{opacity:1},exit:{opacity:0}},eE={duration:.2},tE=({open:e,setOpen:t,children:n,trigger:o=null,className:i,exitOnClickOutside:a=!1,exitOnEsc:s=!0,design:l="simple",scrollLock:c=!0})=>{const u=void 0!==e&&void 0!==t,[d,p]=(0,r.useState)(!1),m=(0,r.useRef)(null),f=(0,r.useRef)(null),g=(0,r.useMemo)(()=>u?e:d,[e,d]),h=(0,r.useMemo)(()=>u?t:p,[p,t]),{refs:y,context:x}=Zm({open:g,onOpenChange:h}),v=Wm(x),b=$m(x,{enabled:a||s,escapeKey:s,outsidePress:a}),M=lf(x,{role:"dialog"}),{getFloatingProps:w}=Km([v,b,M]),N=()=>{g||h(!0)},E=(0,r.useCallback)(()=>(0,r.isValidElement)(o)?(0,r.cloneElement)(o,{onClick:Xe(N,o?.props?.onClick),ref:y.setReference,"aria-haspopup":"dialog","aria-expanded":g}):"function"==typeof o?o({onClick:N}):null,[o,N,y.setReference,g]);return(0,ee.jsxs)(ee.Fragment,{children:[E(),(0,ee.jsx)(XN.Provider,{value:{open:g,setOpen:h,handleClose:()=>{g&&h(!1)},design:l,context:x,getFloatingProps:w,refs:y,dialogContainerRef:f,dialogRef:m,scrollLock:c,className:i},children:n})]})};tE.displayName="Dialog";const nE=({children:e,className:t})=>{const{open:n,handleClose:r,context:o,getFloatingProps:i,dialogRef:a,scrollLock:s,dialogContainerRef:l,className:c,refs:u}=JN();return(0,ee.jsx)(jn,{children:n&&(0,ee.jsx)(Fm,{ref:l,lockScroll:s,className:qe("z-999999",c),"aria-modal":"true",children:(0,ee.jsx)(Rm,{context:o,...u?.reference&&{returnFocus:u.reference},children:(0,ee.jsx)(Gc.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:KN,role:"dialog","aria-modal":"true",transition:eE,children:(0,ee.jsx)("div",{className:"flex items-center justify-center min-h-full",children:(0,ee.jsx)("div",{ref:e=>{e&&(a.current=e,o&&o.refs.setFloating(e))},...i?.(),className:qe("flex flex-col gap-5 w-120 h-fit bg-background-primary border border-solid border-border-subtle rounded-xl shadow-soft-shadow-2xl my-5 overflow-hidden",t),children:"function"==typeof e?e({close:r}):e})})})})})})};nE.displayName="Dialog.Panel";const rE=({children:e,...t})=>(0,ee.jsx)(Om,{...t,children:e});rE.displayName="Dialog.Portal";const oE=({className:e,...t})=>{const{open:n,dialogContainerRef:r}=JN();return r?.current?(0,ee.jsx)(ee.Fragment,{children:(0,dn.createPortal)((0,ee.jsx)(jn,{children:n&&(0,ee.jsx)(Gc.div,{className:qe("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:KN,transition:eE})}),r.current)}):null};oE.displayName="Dialog.Backdrop";const iE=({children:e,className:t,...n})=>(0,ee.jsx)("div",{className:qe("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});iE.displayName="Dialog.Header";const aE=({children:e,as:t="h3",className:n,...r})=>(0,ee.jsx)(t,{className:qe("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});aE.displayName="Dialog.Title";const sE=({children:e,as:t="p",className:n,...r})=>(0,ee.jsx)(t,{className:qe("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});sE.displayName="Dialog.Description";const lE=({className:e,...t})=>(0,ee.jsx)("button",{className:qe("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close dialog",...t,children:(0,ee.jsx)($t,{className:"size-4 text-text-primary shrink-0"})}),cE=({children:e,as:t=r.Fragment,...n})=>{const{handleClose:o}=JN();return e?t===r.Fragment?"function"==typeof e?e({close:o}):(0,r.cloneElement)(e,{onClick:o}):(0,ee.jsx)(t,{...n,onClick:o,"aria-label":"Close dialog",children:e}):(0,ee.jsx)(lE,{onClick:o,...n})};cE.displayName="Dialog.CloseButton";const uE=({children:e,className:t,...n})=>(0,ee.jsx)("div",{className:qe("px-5",t),...n,children:e});uE.displayName="Dialog.Body";const dE=({children:e,className:t})=>{const{design:n,handleClose:r}=JN();return(0,ee.jsx)("div",{className:qe("p-4 flex justify-end gap-3",{"bg-background-secondary":"footer-divided"===n},t),children:e?"function"==typeof e?e({close:r}):e:null})};function pE({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}dE.displayName="Dialog.Footer",tE.Panel=nE,tE.Portal=rE,tE.Title=aE,tE.Description=sE,tE.CloseButton=cE,tE.Header=iE,tE.Body=uE,tE.Footer=dE,tE.Backdrop=oE;const mE=r.forwardRef(pE),fE=({isOpen:e,onClose:t,onConfirm:n,title:o=(0,Xc.__)("Confirm Delete","power-coupons"),message:i=(0,Xc.__)("Are you sure you want to delete this item? This action cannot be undone.","power-coupons"),confirmText:a=(0,Xc.__)("Delete","power-coupons"),cancelText:s=(0,Xc.__)("Cancel","power-coupons"),isLoading:l=!1})=>(0,r.createElement)(tE,{open:e,setOpen:t,size:"sm",className:"max-w-md"},(0,r.createElement)(tE.Backdrop,null),(0,r.createElement)(tE.Panel,null,(0,r.createElement)("div",{className:"p-6"},(0,r.createElement)("div",{className:"flex items-center gap-4 mb-4"},(0,r.createElement)("div",{className:"flex-shrink-0"},(0,r.createElement)(mE,{className:"h-8 w-8 text-red-500"})),(0,r.createElement)(Xv,{size:"sm",tag:"h3",title:o,className:"[&_h2]:text-gray-900"})),(0,r.createElement)("div",{className:"mb-6"},(0,r.createElement)("p",{className:"text-gray-600 text-sm font-normal"},i)),(0,r.createElement)("div",{className:"flex gap-3 justify-end"},(0,r.createElement)(Jt,{variant:"primary",onClick:()=>{n()},disabled:l,destructive:!0},a),(0,r.createElement)(Jt,{variant:"outline",onClick:t,disabled:l},s))))),gE={"buy-x-get-x-free":(0,Xc.__)("Buy X Get X Free","power-coupons"),"buy-x-get-y":(0,Xc.__)("Buy X Get Y","power-coupons"),"buy-x-get-y-at-x-percent-off":(0,Xc.__)("Buy X Get Y at X% Off","power-coupons"),"spend-x-get-y-free":(0,Xc.__)("Spend $X Get Y for Free","power-coupons"),"spend-x-get-y-at-x-percent-off":(0,Xc.__)("Spend $X Get Y at X% Off","power-coupons"),"spend-x-get-free-shipping":(0,Xc.__)("Spend $X Get Free Shipping","power-coupons")},hE={free:(0,Xc.__)("Free","power-coupons"),percentage:(0,Xc.__)("Percentage","power-coupons"),fixed:(0,Xc.__)("Fixed Amount","power-coupons")},yE=["buy-x-get-x-free","buy-x-get-y","buy-x-get-y-at-x-percent-off"],xE=["spend-x-get-y-free","spend-x-get-y-at-x-percent-off","spend-x-get-free-shipping"],vE=({label:e})=>(0,r.createElement)("div",{className:"mb-2"},(0,r.createElement)("span",{className:"text-xs font-semibold uppercase tracking-wider text-text-tertiary"},e)),bE=({label:e,value:t})=>null==t||""===t?null:(0,r.createElement)("div",{className:"flex flex-row items-center justify-between py-2.5"},(0,r.createElement)("span",{className:"text-sm font-medium text-text-primary"},e),(0,r.createElement)("span",{className:"text-sm text-text-secondary text-right"},t)),ME=({offer:e,onClose:t})=>{const[n,o]=(0,Uf.useState)([]),[i,a]=(0,Uf.useState)([]),[s,l]=(0,Uf.useState)(!1);if((0,Uf.useEffect)(()=>{if(!e)return;const t=(e.buy_product_ids||[]).filter(Boolean),n=(e.get_product_ids||[]).filter(Boolean),r=[...t,...n];if(o([]),a([]),!r.length)return;l(!0);const i=new FormData;i.append("action","power_coupons_get_products_by_ids"),i.append("_wpnonce",window.powerCouponsSettings?.update_nonce||""),r.forEach((e,t)=>i.append(`ids[${t}]`,e)),fetch(ajaxurl,{method:"POST",body:i}).then(e=>e.json()).then(e=>{if(e.success&&Array.isArray(e.data)){const r={};e.data.forEach(e=>{r[e.id]=e.name}),o(t.map(e=>r[e]||`#${e}`)),a(n.map(e=>r[e]||`#${e}`))}}).catch(e=>{console.error("Error fetching product names:",e)}).finally(()=>l(!1))},[e]),!e)return null;const c=yE.includes(e.offer_type),u=xE.includes(e.offer_type),d=e.discount_type||"free",p="buy-x-get-x-free"!==e.offer_type&&"spend-x-get-free-shipping"!==e.offer_type,m=s?(0,Xc.__)("Loading…","power-coupons"):n.length?n.join(", "):(0,Xc.__)("Any Products","power-coupons"),f=s?(0,Xc.__)("Loading…","power-coupons"):i.length?i.join(", "):(0,Xc.__)("Any Products","power-coupons");return(0,r.createElement)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"bogo-preview-title"},(0,r.createElement)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[1px]",onClick:t}),(0,r.createElement)("div",{className:"relative bg-background-primary rounded-xl shadow-2xl w-full max-w-lg max-h-[90vh] flex flex-col overflow-hidden border border-solid border-border-subtle"},(0,r.createElement)("div",{className:"flex items-center justify-between px-6 py-5"},(0,r.createElement)("h2",{id:"bogo-preview-title",className:"m-0 text-base font-semibold text-text-primary"},e.name),(0,r.createElement)(Jt,{variant:"ghost",size:"xs",icon:(0,r.createElement)(qN,null),onClick:t,"aria-label":(0,Xc.__)("Close preview","power-coupons"),className:"text-icon-secondary hover:text-icon-primary shrink-0"})),(0,r.createElement)("div",{className:"flex-1 overflow-y-auto px-6 py-5 flex flex-col gap-5"},(0,r.createElement)("div",null,(0,r.createElement)(vE,{label:(0,Xc.__)("Offer Settings","power-coupons")}),(0,r.createElement)("div",{className:"rounded-lg border border-solid border-border-subtle px-4"},(0,r.createElement)(bE,{label:(0,Xc.__)("Activation","power-coupons"),value:"automatically"===e.activation_type?(0,Xc.__)("Automatic","power-coupons"):(0,Xc.__)("Via Coupon Code","power-coupons")}),(0,r.createElement)(bE,{label:(0,Xc.__)("Discount Type","power-coupons"),value:hE[d]}),"percentage"===d&&(0,r.createElement)(bE,{label:(0,Xc.__)("Discount","power-coupons"),value:`${e.discount_percent||0}%`}),"fixed"===d&&(0,r.createElement)(bE,{label:(0,Xc.__)("Discount Amount","power-coupons"),value:`${e.discount_amount||0}`}))),(0,r.createElement)("div",null,(0,r.createElement)(vE,{label:(0,Xc.__)("Conditions","power-coupons")}),(0,r.createElement)("div",{className:"rounded-lg border border-solid border-border-subtle px-4"},c&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(bE,{label:(0,Xc.__)("Buy Quantity","power-coupons"),value:e.buy_quantity||1}),(0,r.createElement)(bE,{label:(0,Xc.__)("Get Quantity","power-coupons"),value:e.get_quantity||1})),u&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(bE,{label:(0,Xc.__)("Minimum Spend","power-coupons"),value:`$${e.spend_amount||0}`}),"spend-x-get-free-shipping"!==e.offer_type&&(0,r.createElement)(bE,{label:(0,Xc.__)("Get Quantity","power-coupons"),value:e.get_quantity||1})),(0,r.createElement)(bE,{label:(0,Xc.__)("Trigger","power-coupons"),value:"specific_products"===e.trigger_type?(0,Xc.__)("Specific Products","power-coupons"):(0,Xc.__)("All Products","power-coupons")}))),(0,r.createElement)("div",null,(0,r.createElement)(vE,{label:(0,Xc.__)("Products","power-coupons")}),(0,r.createElement)("div",{className:"rounded-lg border border-solid border-border-subtle px-4"},(0,r.createElement)(bE,{label:(0,Xc.__)("Products to Buy","power-coupons"),value:m}),p&&(0,r.createElement)(bE,{label:(0,Xc.__)("Products to Get","power-coupons"),value:f})))),(0,r.createElement)("div",{className:"px-6 py-4 bg-background-primary flex items-center justify-between"},(0,r.createElement)("div",{className:"flex items-center gap-2"},(0,r.createElement)(du,{label:"active"===e.status?(0,Xc.__)("Active","power-coupons"):(0,Xc.__)("Inactive","power-coupons"),size:"xs",type:"pill",variant:"active"===e.status?"green":"neutral",disableHover:!0}),(0,r.createElement)(du,{label:gE[e.offer_type]||(0,Xc.__)("Custom","power-coupons"),size:"xs",type:"pill",variant:"yellow",disableHover:!0})),(0,r.createElement)(Jt,{variant:"outline",size:"sm",tag:"button",type:"button",onClick:t,className:"font-medium"},(0,Xc.__)("Close","power-coupons")))))},wE=[(0,Xc.__)("Choose whether the reward is free, percentage-discounted, or fixed-price discounted.","power-coupons"),(0,Xc.__)("Offer the same product or different products as the free or discounted reward.","power-coupons"),(0,Xc.__)("Fully compatible with WooCommerce coupons, cart, and checkout experience.","power-coupons")],NE=function({toast:e}){const[t,n]=(0,Uf.useState)(!1),[o,i]=(0,Uf.useState)(null),[a,s]=(0,Uf.useState)([]),[l,c]=(0,Uf.useState)(!0),[u,d]=(0,Uf.useState)(""),[p,m]=(0,Uf.useState)(!1),[f,g]=(0,Uf.useState)(null),[h,y]=(0,Uf.useState)(!1),[x,v]=(0,Uf.useState)({isOpen:!1,type:null,id:null}),b=(0,Uf.useRef)(null),M=(0,Uf.useRef)(!0),w=(0,Uf.useRef)(document.getElementById("power-coupons-settings")),N=(r,s=null)=>{if(document.querySelector("html").classList.toggle("power-coupon-modal-open"),s){const e=a.find(e=>e.id===s);i(e)}else i(null);n(!t),!0===r&&e.success(o?(0,Xc.__)("BOGO offer updated successfully!","power-coupons"):(0,Xc.__)("BOGO offer created successfully!","power-coupons"),{description:""}),E(!0,u)};(0,Uf.useEffect)(()=>{E()},[]),(0,Uf.useEffect)(()=>{if(!M.current)return m(!0),I([]),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{E(!0,u)},400),()=>{b.current&&clearTimeout(b.current)};M.current=!1},[u]);const E=async(e=!1,t="")=>{e||c(!0);try{const e={action:"power_coupons_get_bogo_offers",_wpnonce:window.powerCouponsSettings?.update_nonce||""};t.trim()&&(e.search=t.trim());const n=await fetch(ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(e)}),r=await n.json();r.success&&s(r.data||[])}catch(e){console.error("Error loading offers:",e)}c(!1),m(!1)},[j,D]=(0,Uf.useState)(null),[T,I]=(0,Uf.useState)([]),k=(e,t)=>{I(e?[...T,t.id]:T.filter(e=>e!==t.id))};return l||p||0!==a.length||u.trim()?(0,r.createElement)(r.Fragment,null,t&&(0,r.createElement)($N,{toggleModalOpen:N,editingOffer:o}),(0,r.createElement)("div",{className:"bg-background-primary rounded-xl border border-border-subtle p-4 flex flex-col gap-4"},(0,r.createElement)("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3"},(0,r.createElement)("div",{className:"flex items-center gap-4"},(0,r.createElement)("h2",{className:"m-0 text-xl font-semibold text-text-primary"},(0,Xc.__)("BOGO Offers","power-coupons")),!l&&T.length>0&&(0,r.createElement)("div",{className:"flex gap-4 items-center border-0 border-l border-solid border-gray-200"},(0,r.createElement)(Jt,{variant:"ghost",icon:(0,r.createElement)(qN,{className:"h-6 w-6 text-gray-500"}),size:"xs",className:"text-icon-secondary hover:text-icon-primary",onClick:()=>{I([])}}),(0,r.createElement)("span",{className:"text-sm font-normal text-gray-500"},T.length," ",(0,Xc.__)("Selected","power-coupons")),(0,r.createElement)(Jt,{className:"py-2 px-4 bg-red-50 text-red-600 outline-red-600 hover:bg-red-50 hover:outline-red-600",size:"sm",tag:"button",type:"button",variant:"outline",icon:(0,r.createElement)(iu,{className:"h-4 w-4"}),iconPosition:"left",onClick:()=>{T.length&&v({isOpen:!0,type:"bulk",id:null})}},(0,Xc.__)("Delete","power-coupons")))),(0,r.createElement)("div",{className:"flex items-center gap-3 sm:gap-4 w-full sm:w-auto"},(0,r.createElement)("div",{className:"relative flex-1 sm:flex-none"},(0,r.createElement)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"},p?(0,r.createElement)("svg",{className:"h-4 w-4 animate-spin",viewBox:"0 0 100 100"},(0,r.createElement)("circle",{fill:"none",strokeWidth:"10",className:"stroke-current opacity-40",cx:"50",cy:"50",r:"40"}),(0,r.createElement)("circle",{fill:"none",strokeWidth:"10",className:"stroke-current",strokeDasharray:"250",strokeDashoffset:"210",cx:"50",cy:"50",r:"40"})):hb("search")),(0,r.createElement)("input",{type:"text",className:"block w-full sm:w-64 pl-10 pr-3 py-2 border border-border-subtle rounded-md text-sm placeholder-text-tertiary focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-orange-500",placeholder:(0,Xc.__)("Search offers…","power-coupons"),value:u,onChange:e=>d(e.target.value)})),(0,r.createElement)("button",{type:"button",onClick:N,className:"flex items-center gap-2 px-4 py-2 text-white bg-orange-500 hover:bg-orange-600 rounded-md border-none cursor-pointer whitespace-nowrap"},hb("plus"),(0,r.createElement)("span",null,(0,Xc.__)("Create New Offer","power-coupons"))))),l?(0,r.createElement)("div",{className:"p-6 text-center"},(0,r.createElement)("div",{className:"inline-block animate-spin rounded-full h-6 w-6 border-b-2 border-orange-500"}),(0,r.createElement)("p",{className:"mt-2 text-text-tertiary"},(0,Xc.__)("Loading offers…","power-coupons"))):(0,r.createElement)("div",null,(0,r.createElement)(ft,{checkboxSelection:a.length>0,className:"whitespace-nowrap sm:whitespace-normal"},(0,r.createElement)(ft.Head,{selected:T.length>0,onChangeSelection:e=>{I(e?a.map(e=>e.id):[])},indeterminate:T.length>0&&T.length<a.length},(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Offer Name","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Description","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Offer Type","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Status","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,r.createElement)(Ft,{align:"center",className:"gap-2",justify:"end"},(0,Xc.__)("Actions","power-coupons")))),(0,r.createElement)(ft.Body,null,0===a.length?(0,r.createElement)(ft.Row,null,(0,r.createElement)(ft.Cell,{colSpan:5,className:"w-full text-center text-text-tertiary py-8"},(0,Xc.__)("No offers found matching your search.","power-coupons"))):a.map(t=>(0,r.createElement)(ft.Row,{key:t.id,value:t,selected:T.includes(t.id),onChangeSelection:k},(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},(0,r.createElement)("button",{type:"button",className:"bg-transparent border-none p-0 m-0 cursor-pointer text-text-secondary hover:text-orange-600 hover:underline text-sm font-normal text-left",onClick:()=>N(!1,t.id)},yb(t.name))),(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},yb(t.description)),(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},gb(t.offer_type)?.title||(0,Xc.__)("Custom","power-coupons")),(0,r.createElement)(ft.Cell,null,(0,r.createElement)(Wt,{"aria-label":"Switch Element",className:"[&>input]:!border-none",defaultValue:"active"===t.status,onChange:n=>(async(t,n)=>{try{const r=await fetch(ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"power_coupons_toggle_bogo_status",_wpnonce:window.powerCouponsSettings?.update_nonce||"",offer_id:t,status:n})});(await r.json()).success&&(E(!0,u),e.success("active"===n?(0,Xc.__)("BOGO offer enabled successfully!","power-coupons"):(0,Xc.__)("BOGO offer disabled successfully!","power-coupons"),{description:""}))}catch(e){console.error("Error toggling status:",e)}})(t.id,n?"active":"inactive"),size:"sm"})),(0,r.createElement)(ft.Cell,null,(0,r.createElement)(Ft,{align:"center",className:"gap-2",justify:"end"},(0,r.createElement)(ff,{content:"Preview",arrow:!0,placement:"top",tooltipPortalRoot:w.current},(0,r.createElement)(Jt,{onClick:()=>g(t),variant:"ghost",icon:(0,r.createElement)(Kc,null),size:"xs",className:"text-icon-secondary hover:text-icon-primary","aria-label":"Preview"})),(0,r.createElement)(ff,{content:"Edit",arrow:!0,placement:"top",tooltipPortalRoot:w.current},(0,r.createElement)(Jt,{onClick:()=>N(!1,t.id),variant:"ghost",icon:(0,r.createElement)(tu,null),size:"xs",className:"text-icon-secondary hover:text-icon-primary","aria-label":"Edit"})),(0,r.createElement)(ff,{content:"Clone",arrow:!0,placement:"top",tooltipPortalRoot:w.current},(0,r.createElement)(Jt,{onClick:()=>(async t=>{D(t);try{const n=await fetch(ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"power_coupons_clone_bogo_offer",_wpnonce:window.powerCouponsSettings?.update_nonce||"",offer_id:t})});(await n.json()).success?(E(!0,u),e.success((0,Xc.__)("BOGO offer cloned successfully!","power-coupons"),{description:""})):e.error((0,Xc.__)("Failed to clone offer. Please try again.","power-coupons"),{description:""})}catch(t){console.error("Error cloning offer:",t),e.error((0,Xc.__)("Failed to clone offer. Please try again.","power-coupons"),{description:""})}finally{D(null)}})(t.id),variant:"ghost",icon:(0,r.createElement)(ru,null),size:"xs",className:"text-icon-secondary hover:text-icon-primary","aria-label":"Clone",disabled:j===t.id})),(0,r.createElement)(ff,{content:"Delete",arrow:!0,placement:"top",tooltipPortalRoot:w.current},(0,r.createElement)(Jt,{onClick:()=>v({isOpen:!0,type:"single",id:t.id}),variant:"ghost",icon:(0,r.createElement)(iu,null),size:"xs",className:"text-icon-secondary hover:text-icon-primary","aria-label":"Delete"})))))))))),f&&(0,r.createElement)(ME,{offer:f,onClose:()=>g(null)}),(0,r.createElement)(fE,{isOpen:x.isOpen,onClose:()=>v({isOpen:!1,type:null,id:null}),onConfirm:()=>{"bulk"===x.type?(async()=>{y(!0);try{const t=await fetch(ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"power_coupons_bulk_delete_bogo_offers",_wpnonce:window.powerCouponsSettings?.update_nonce||"",offer_ids:JSON.stringify(T)})});(await t.json()).success&&(I([]),E(!0,u),e.success((0,Xc.__)("BOGO offers deleted successfully!","power-coupons"),{description:""}))}catch(e){console.error("Error bulk deleting offers:",e)}finally{y(!1),v({isOpen:!1,type:null,id:null})}})():(async()=>{y(!0);try{const t=await fetch(ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"power_coupons_delete_bogo_offer",_wpnonce:window.powerCouponsSettings?.update_nonce||"",offer_id:x.id})});(await t.json()).success&&(E(!0,u),e.success((0,Xc.__)("BOGO offer deleted successfully!","power-coupons"),{description:""}))}catch(e){console.error("Error deleting offer:",e)}finally{y(!1),v({isOpen:!1,type:null,id:null})}})()},title:"bulk"===x.type?(0,Xc.__)("Delete Selected Offers","power-coupons"):(0,Xc.__)("Delete Offer","power-coupons"),message:"bulk"===x.type?(0,Xc.sprintf)(/* translators: %s: number of selected offers */ /* translators: %s: number of selected offers */
(0,Xc.__)("Are you sure you want to delete %s selected offer(s)? This action cannot be undone.","power-coupons"),T.length):(0,Xc.__)("Are you sure you want to delete this offer? This action cannot be undone.","power-coupons"),isLoading:h})):(0,r.createElement)(r.Fragment,null,t&&(0,r.createElement)($N,{toggleModalOpen:N,editingOffer:o}),(0,r.createElement)("div",{className:"h-auto px-6 bg-background-primary rounded-[6px] shadow-sm flex justify-between gap-[121px]"},(0,r.createElement)("div",{className:"py-[32px]"},(0,r.createElement)("h2",{className:"m-0 font-semibold text-xl"},(0,Xc.__)("Let's Setup Your First BOGO Offer","power-coupons")),(0,r.createElement)("p",null,(0,Xc.__)("Boost your sales and increase average order value by creating powerful Buy One Get One offers in your store. Reward customers automatically and drive conversions with flexible, fully customizable BOGO promotions.","power-coupons")),(0,r.createElement)("ul",{className:"divide-y divide-gray-200 list-none pl-0 space-y-2"},wE.map((e,t)=>(0,r.createElement)("li",{key:e+t,className:"flex items-center space-x-2 text-field-label text-sm font-normal"},hb("check"),(0,r.createElement)("span",{className:"text-[#111827]"},e," ")))),(0,r.createElement)("button",{type:"button",onClick:N,className:"flex items-center gap-[8px] p-[10px] mt-[24px] cursor-pointer no-underline text-white hover:text-white bg-wpcolor hover:bg-wphovercolor rounded-md box-content outline-0 hover:outline-0 focus:ring-0 focus-visible:ring-1 ring-0 border-none"},hb("plus"),(0,r.createElement)("span",null,(0,Xc.__)("Create New Offer","power-coupons")))),(0,r.createElement)("img",{src:pb,alt:""})))};function EE({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const jE=r.forwardRef(EE);function DE({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z"}))}const TE=r.forwardRef(DE);function IE({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"}))}const kE=r.forwardRef(IE);function OE({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const _E=r.forwardRef(OE),CE=function(){const[e]=K(),t=!!e?.points_settings?.enable,n=t?"bg-green-50 text-green-700 ring-1 ring-inset ring-green-200":"bg-amber-50 text-amber-800 ring-1 ring-inset ring-amber-300";return(0,r.createElement)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium leading-none ${n}`,"aria-label":t?(0,Xc.__)("Loyalty Rewards is enabled","power-coupons"):(0,Xc.__)("Loyalty Rewards is disabled","power-coupons")},(0,r.createElement)("span",{"aria-hidden":"true",className:"inline-block h-1.5 w-1.5 rounded-full "+(t?"bg-green-500":"bg-amber-500")}),t?(0,Xc.__)("Active","power-coupons"):(0,Xc.__)("Disabled","power-coupons"))},AE=e=>{if(!e)return;const t=new Date(String(e).slice(0,10)+"T00:00:00");return isNaN(t.getTime())?void 0:t},SE=({id:e,label:t,value:n,placeholder:o,onChange:i,helper:a})=>{const[s,l]=(0,Uf.useState)(!1),[c,u]=(0,Uf.useState)(!1),d=(0,Uf.useRef)(null);(0,Uf.useEffect)(()=>{if(!s)return;const e=e=>{d.current&&!d.current.contains(e.target)&&l(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[s]);const p=AE(n);return(0,r.createElement)("div",{className:"flex flex-col gap-1.5",ref:d},(0,r.createElement)("label",{htmlFor:e,className:"text-sm font-medium text-text-primary"},t),(0,r.createElement)("div",{className:"relative"},(0,r.createElement)("button",{id:e,type:"button",onClick:()=>{if(!s&&d.current){const e=d.current.getBoundingClientRect();u(window.innerHeight-e.bottom<370)}l(e=>!e)},className:"w-full h-10 px-3.5 flex items-center gap-2 bg-white text-text-primary outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200 rounded text-sm text-left cursor-pointer hover:outline-border-strong focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2"},(0,r.createElement)(SN,{className:"w-4 h-4 text-text-tertiary flex-shrink-0"}),(0,r.createElement)("span",{className:n?"text-text-primary":"text-text-tertiary"},n?!(m=AE(n))||isNaN(m.getTime())?"":IM(m,"MMM d, yyyy"):o)),s&&(0,r.createElement)("div",{className:`pc-date-picker-popup absolute z-50 ${c?"bottom-full mb-1":"top-full mt-1"} left-0 shadow-lg rounded-md`},(0,r.createElement)(xN,{selectionType:"single",variant:"normal",selected:p,onApply:e=>{i((e=>IM(e,"yyyy-MM-dd"))(e)),l(!1)},onCancel:()=>{i(""),l(!1)},cancelButtonText:(0,Xc.__)("Clear","power-coupons")}))),(0,r.createElement)(RE,null,a));var m},LE=[{value:"order_earn",label:(0,Xc.__)("Order Earning","power-coupons"),description:(0,Xc.__)("Award credits when a customer completes an order.","power-coupons")},{value:"signup",label:(0,Xc.__)("Signup Bonus","power-coupons"),description:(0,Xc.__)("Award credits once when a new user registers an account.","power-coupons")},{value:"review",label:(0,Xc.__)("Product Review","power-coupons"),description:(0,Xc.__)("Award credits when a customer leaves an approved product review.","power-coupons")}],zE=[{value:"fixed",label:(0,Xc.__)("Fixed","power-coupons"),description:(0,Xc.__)("A fixed number of credits per order, regardless of total.","power-coupons")},{value:"per_currency",label:(0,Xc.__)("Per Currency Unit","power-coupons"),description:(0,Xc.__)("Credits based on amount spent. E.g. 2 = 2 credits per $1.","power-coupons")},{value:"percentage",label:(0,Xc.__)("Percentage","power-coupons"),description:(0,Xc.__)("Credits as a % of order total. E.g. 10 = 10% as credits.","power-coupons")}],PE=({htmlFor:e,text:t})=>(0,r.createElement)("label",{htmlFor:e,className:"text-sm font-medium text-text-primary"},t),RE=({children:e})=>e?(0,r.createElement)("p",{className:"m-0 text-xs text-text-tertiary leading-snug"},e):null,YE=({message:e})=>e?(0,r.createElement)("span",{className:"text-red-500 text-xs flex items-center gap-1 mt-0.5"},e):null,QE=[{slug:"basic-settings",title:(0,Xc.__)("Basic Settings","power-coupons"),content:({formData:e,setFormData:t,setActiveTab:n,errors:o,setErrors:i,clearError:a})=>{var s;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",null,(0,r.createElement)("strong",null,(0,Xc.__)("Campaign Basics","power-coupons")),(0,r.createElement)("p",null,(0,Xc.__)("Define the name, type, and earning rules for this campaign.","power-coupons"))),(0,r.createElement)("div",{className:"flex flex-col gap-5"},(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(cv,{value:null!==(s=e.title)&&void 0!==s?s:"",id:"campaign-input-title",label:(0,Xc.__)("Campaign Name","power-coupons"),size:"md",type:"text",placeholder:(0,Xc.__)("E.g. Order Credits — 1 per $1","power-coupons"),onChange:e=>{t("title",e),a("title")}}),(0,r.createElement)(YE,{message:o.title})),(0,r.createElement)("div",{className:"flex flex-col items-start gap-1.5"},(0,r.createElement)("label",{htmlFor:"campaign-textarea-description",className:"text-sm font-medium"},(0,Xc.__)("Description","power-coupons")),(0,r.createElement)("textarea",{id:"campaign-textarea-description",className:"!font-normal !text-sm h-20 bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary w-full outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200 p-3 py-2 rounded text-xs focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 hover:outline-border-strong",placeholder:(0,Xc.__)("Optional description for this campaign","power-coupons"),defaultValue:e.description||"",onChange:e=>t("description",e.target.value)})),(0,r.createElement)("div",{className:"flex flex-col gap-1.5"},(0,r.createElement)("span",{className:"text-sm font-medium"},(0,Xc.__)("Action Type","power-coupons")),(0,r.createElement)(wv.Group,{columns:3,onChange:e=>t("action_type",e),size:"md",defaultValue:e.action_type||"order_earn",style:"simple"},LE.map(e=>(0,r.createElement)(wv.Button,{key:e.value,label:{heading:e.label,description:e.description},value:e.value,borderOn:!0}))))),(0,r.createElement)("div",{className:"flex justify-end mt-4"},(0,r.createElement)("button",{type:"button",onClick:()=>{const t=(e=>{const t={};return(e.title||"").trim()||(t.title=(0,Xc.__)("Campaign name is required.","power-coupons")),t})(e);Object.keys(t).length>0?i(t):(i({}),n(QE[1].slug))},className:"flex items-center gap-2 px-5 py-2.5 text-white bg-wpcolor hover:bg-wphovercolor rounded-md border-none cursor-pointer text-sm font-medium"},(0,Xc.__)("Save & Continue","power-coupons"))))}},{slug:"earning-rules",title:(0,Xc.__)("Earning Rules","power-coupons"),content:({formData:e,setFormData:t,setActiveTab:n,saveOffer:o,isLoading:i,errors:a,setErrors:s,clearError:l,formError:c})=>{var u,d,p,m,f,g;const h="order_earn"===e.action_type;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",null,(0,r.createElement)("strong",null,(0,Xc.__)("Earning Configuration","power-coupons")),(0,r.createElement)("p",null,(0,Xc.__)("Set the credits value, limits, and schedule for this campaign.","power-coupons"))),(0,r.createElement)("div",{className:"flex flex-col gap-5"},h&&(0,r.createElement)("div",{className:"flex flex-col gap-1.5"},(0,r.createElement)("span",{className:"text-sm font-medium"},(0,Xc.__)("Earn Type","power-coupons")),(0,r.createElement)(wv.Group,{columns:3,onChange:e=>t("earn_type",e),size:"md",defaultValue:e.earn_type||"fixed",style:"simple"},zE.map(e=>(0,r.createElement)(wv.Button,{key:e.value,label:{heading:e.label,description:e.description},value:e.value,borderOn:!0})))),"review"===e.action_type&&(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)("div",{className:"flex items-center justify-between gap-3"},(0,r.createElement)("span",{className:"text-sm font-medium text-text-primary"},(0,Xc.__)("Verified Purchases Only","power-coupons")),(0,r.createElement)(Wt,{size:"sm",value:!!e.verified_purchase_only,onChange:()=>t("verified_purchase_only",!e.verified_purchase_only),className:"[&>input]:!border-none"})),(0,r.createElement)(RE,null,(0,Xc.__)("Only award credits to customers who have actually purchased the reviewed product.","power-coupons"))),(0,r.createElement)("div",{className:"grid gap-4 "+(h?"grid-cols-4":"grid-cols-2")},(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(PE,{htmlFor:"campaign-input-earn-value",text:h?(0,Xc.__)("Earn Value","power-coupons"):(0,Xc.__)("Credits to Award","power-coupons")}),(0,r.createElement)(cv,{value:null!==(u=e.earn_value)&&void 0!==u?u:"",id:"campaign-input-earn-value",size:"md",type:"number",placeholder:"0",onChange:e=>{t("earn_value",e),l("earn_value")}}),(0,r.createElement)(RE,null,(()=>{if(!h)return(0,Xc.__)("Fixed number of credits awarded each time this action occurs.","power-coupons");switch(e.earn_type){case"per_currency":return(0,Xc.__)('E.g. "2" means 2 credits for every $1 spent.',"power-coupons");case"percentage":return(0,Xc.__)('E.g. "10" means 10% of the order total as credits.',"power-coupons");default:return(0,Xc.__)("A fixed number of credits awarded per order, regardless of total.","power-coupons")}})()),(0,r.createElement)(YE,{message:a.earn_value})),h&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(PE,{htmlFor:"campaign-input-min-order",text:(0,Xc.__)("Min Order Total","power-coupons")}),(0,r.createElement)(cv,{value:null!==(d=e.min_order_total)&&void 0!==d?d:"",id:"campaign-input-min-order",size:"md",type:"number",placeholder:(0,Xc.__)("No minimum","power-coupons"),onChange:e=>t("min_order_total",e)}),(0,r.createElement)(RE,null,(0,Xc.__)("Leave blank for no minimum order requirement.","power-coupons"))),(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(PE,{htmlFor:"campaign-input-max-points",text:(0,Xc.__)("Max Credits Cap","power-coupons")}),(0,r.createElement)(cv,{value:null!==(p=e.max_points_cap)&&void 0!==p?p:"",id:"campaign-input-max-points",size:"md",type:"number",placeholder:(0,Xc.__)("No cap","power-coupons"),onChange:e=>t("max_points_cap",e)}),(0,r.createElement)(RE,null,(0,Xc.__)("Leave blank for no cap on credits per order.","power-coupons")))),(0,r.createElement)("div",{className:"flex flex-col gap-1"},(0,r.createElement)(PE,{htmlFor:"campaign-input-priority",text:(0,Xc.__)("Priority","power-coupons")}),(0,r.createElement)(cv,{value:null!==(m=e.priority)&&void 0!==m?m:"10",id:"campaign-input-priority",size:"md",type:"number",placeholder:"10",onChange:e=>t("priority",e)}),(0,r.createElement)(RE,null,(0,Xc.__)("Lower number = higher priority. The highest priority campaign wins when multiple match.","power-coupons")))),(0,r.createElement)("div",{className:"grid grid-cols-2 gap-4"},(0,r.createElement)(SE,{id:"campaign-input-start-date",label:(0,Xc.__)("Start Date","power-coupons"),value:null!==(f=e.start_date)&&void 0!==f?f:"",placeholder:(0,Xc.__)("Select start date","power-coupons"),onChange:e=>t("start_date",e),helper:(0,Xc.__)("Leave blank to start immediately.","power-coupons")}),(0,r.createElement)(SE,{id:"campaign-input-end-date",label:(0,Xc.__)("End Date","power-coupons"),value:null!==(g=e.end_date)&&void 0!==g?g:"",placeholder:(0,Xc.__)("Select end date","power-coupons"),onChange:e=>t("end_date",e),helper:(0,Xc.__)("Leave blank to never expire.","power-coupons")}))),c&&(0,r.createElement)("p",{className:"text-red-500 text-sm mt-2"},c),(0,r.createElement)("div",{className:"flex justify-between mt-4"},(0,r.createElement)("button",{type:"button",onClick:()=>n(QE[0].slug),className:"flex items-center gap-2 px-5 py-2.5 bg-transparent border border-solid border-border-subtle hover:bg-gray-50 rounded-md cursor-pointer text-sm font-medium text-text-primary"},hb("chevronLeft"),(0,Xc.__)("Back","power-coupons")),(0,r.createElement)("button",{type:"button",onClick:()=>{const t=(e=>{const t={};return(!e.earn_value||parseFloat(e.earn_value)<=0)&&(t.earn_value=(0,Xc.__)("Earn value must be greater than 0.","power-coupons")),t})(e);Object.keys(t).length>0?s(t):(s({}),o())},disabled:i,className:"flex items-center gap-2 px-5 py-2.5 text-white bg-wpcolor hover:bg-wphovercolor rounded-md border-none cursor-pointer text-sm font-medium disabled:opacity-50"},i?(0,Xc.__)("Saving…","power-coupons"):e.id?(0,Xc.__)("Update Campaign","power-coupons"):(0,Xc.__)("Create Campaign","power-coupons"))))}}],FE=({toggleModalOpen:e,formData:t,setFormData:n})=>{const[o,i]=(0,Uf.useState)(QE[0].slug),[a,s]=(0,Uf.useState)({}),[l,c]=(0,Uf.useState)(""),[u,d]=(0,Uf.useState)(!1),p=QE.findIndex(e=>e.slug===o),m=e=>{s({}),c(""),i(e)},f=e=>{s(t=>{if(!t[e])return t;const n={...t};return delete n[e],n})},g=async()=>{d(!0),c(""),s({});try{const n=t.action_type||"order_earn",r={action:"power_coupons_save_points_campaign",_wpnonce:window.powerCouponsSettings?.points_nonces?.campaigns||"",title:t.title||"",description:t.description||"",action_type:n,earn_type:"order_earn"===n&&t.earn_type||"fixed",earn_value:t.earn_value||"0",min_order_total:t.min_order_total||"0",max_points:t.max_points_cap||"0",priority:t.priority||"10",start_date:t.start_date||"",end_date:t.end_date||"",status:t.status||"active",verified_purchase_only:"review"===n&&t.verified_purchase_only?"true":"false"};t.id&&(r.id=t.id);const o=await fetch(ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(r)}),i=await o.json();i.success?e(!0):c("string"==typeof i.data?i.data:(0,Xc.__)("Failed to save campaign. Please try again.","power-coupons"))}catch(e){console.error("Error saving campaign:",e),c((0,Xc.__)("An error occurred. Please try again.","power-coupons"))}finally{d(!1)}};return(0,r.createElement)("div",{className:"bg-white w-full max-w-[760px] rounded-md px-4 sm:px-6 py-6 sm:py-8 shadow-[0px_1px_2px_-1px_#0000001A,0px_1px_3px_0px_#0000001A]"},(0,r.createElement)("div",{className:"flex items-center gap-2"},(0,r.createElement)("h3",{className:"m-0 text-2xl text-[#111827]"},t.id?(0,Xc.__)("Edit Campaign","power-coupons")+": "+(t.title||""):(0,Xc.__)("Create a New Campaign","power-coupons"))),(0,r.createElement)("div",{className:"mt-6"},(0,r.createElement)(kN,{activeItem:o},(0,r.createElement)(kN.Group,{iconPosition:"left",orientation:"horizontal",size:"md",variant:"underline",width:"auto"},QE.map((e,t)=>(0,r.createElement)(kN.Tab,{key:e.slug,type:"button",icon:p>t?(0,r.createElement)(CN,{color:"#16A34A"}):(0,r.createElement)(zN,{color:"#737373"}),className:"power-coupons-bogo-form-tab px-2.5 py-4 !cursor-default",slug:e.slug,text:e.title}))),(0,r.createElement)("div",{className:"py-5 flex flex-col text-left gap-6"},QE.map(e=>(0,r.createElement)(kN.Panel,{key:e.slug,slug:e.slug},(0,r.createElement)(e.content,{formData:t,setFormData:n,setActiveTab:m,saveOffer:g,isLoading:u,errors:a,setErrors:s,clearError:f,formError:l})))))))},UE=({toggleModalOpen:e,editingCampaign:t})=>{const[n,o]=(0,Uf.useState)(t?(()=>{const e=t.conditions?JSON.parse(t.conditions):{};return{id:t.id,title:t.title||"",description:t.description||"",action_type:t.action_type||"order_earn",earn_type:t.earn_type||"fixed",earn_value:t.earn_value||"",min_order_total:t.min_order_total||"",max_points_cap:t.max_points||"",priority:t.priority||"10",start_date:t.start_date||"",end_date:t.end_date||"",status:t.status||"active",verified_purchase_only:!!e.verified_purchase_only}})():{title:"",description:"",action_type:"order_earn",earn_type:"fixed",earn_value:"",min_order_total:"",max_points_cap:"",priority:"10",start_date:"",end_date:"",status:"active",verified_purchase_only:!1});return(0,r.createElement)("div",{id:"power-coupons-campaign-modal",className:"bg-background-secondary absolute top-0 left-0 w-full h-[100vh] z-[999] bg-[#F9FAFB] overflow-y-auto"},(0,r.createElement)(au,{className:"power_coupons-header--content !absolute h-14 min-h-[unset] p-0 border-0 border-b border-solid border-border-subtle bg-white !fixed items-center z-10 shadow-[0px_1px_2px_0px_#0000000D]",gap:0,role:"navigation","aria-label":(0,Xc.__)("Campaign Navigation","power-coupons")},(0,r.createElement)(au.Left,{className:"power_coupons-header--content-left lg:px-5 px-3"},(0,r.createElement)(au.Item,null,(0,r.createElement)("img",{className:"lg:block h-8 w-8",src:pu,alt:(0,Xc.__)("Power Coupons","power-coupons")}))),(0,r.createElement)(au.Right,{className:"power_coupons-header--content-right p-2 md:p-4 gap-2 md:gap-4",gap:"md"},(0,r.createElement)(au.Item,null,(0,r.createElement)("button",{type:"button",onClick:()=>e(),className:"bg-transparent border-none cursor-pointer"},hb("close"))))),(0,r.createElement)("div",{className:"flex items-start sm:items-center justify-center text-center px-4 sm:px-6 lg:px-0 pt-14 pb-8 min-h-full box-border"},(0,r.createElement)(FE,{toggleModalOpen:e,formData:n,setFormData:(e,t)=>{o(n=>({...n,[e]:t}))}})))};o.dn(UE);const BE={order_earn:(0,Xc.__)("Order Earning","power-coupons"),signup:(0,Xc.__)("Signup Bonus","power-coupons"),review:(0,Xc.__)("Product Review","power-coupons")},WE=[{key:"order_earn",Icon:jE,label:(0,Xc.__)("Order Earning","power-coupons"),description:(0,Xc.__)("Award credits when a customer completes an order.","power-coupons"),example:(0,Xc.__)("e.g. 2 credits per $1 spent.","power-coupons")},{key:"signup",Icon:TE,label:(0,Xc.__)("Signup Bonus","power-coupons"),description:(0,Xc.__)("Award credits once when a new user registers.","power-coupons"),example:(0,Xc.__)("e.g. 100 credits on signup.","power-coupons")},{key:"review",Icon:kE,label:(0,Xc.__)("Product Review","power-coupons"),description:(0,Xc.__)("Award credits when a customer leaves an approved product review.","power-coupons"),example:(0,Xc.__)("e.g. 50 credits per review.","power-coupons")}],VE={fixed:(0,Xc.__)("Fixed","power-coupons"),per_currency:(0,Xc.__)("Per Currency Unit","power-coupons"),percentage:(0,Xc.__)("Percentage","power-coupons")},HE={fixed:(0,Xc.__)("A fixed number of credits awarded per order, regardless of cart total.","power-coupons"),per_currency:(0,Xc.__)('Credits based on amount spent. E.g., "100" means 100 credits earned per $1 spent.',"power-coupons"),percentage:(0,Xc.__)('Credits as a percentage of the order total. E.g., "10" means 10 credits per $10 spent.',"power-coupons")},GE=function({toast:e,tabSelector:t}){const[n,o]=(0,Uf.useState)(!1),[i,a]=(0,Uf.useState)(null),[s,l]=(0,Uf.useState)([]),[c,u]=(0,Uf.useState)(!0),[d,p]=(0,Uf.useState)(""),[m,f]=(0,Uf.useState)(!1),[g,h]=(0,Uf.useState)([]),[y,x]=(0,Uf.useState)(!1),[v,b]=(0,Uf.useState)({isOpen:!1,type:null,id:null}),M=(0,Uf.useRef)(null),w=(0,Uf.useRef)(!0),N=(0,Uf.useRef)(document.getElementById("power-coupons-settings")),E=()=>window.powerCouponsSettings?.points_nonces?.campaigns||"",j=(t=!1,n=null)=>{document.querySelector("html").classList.toggle("power-coupon-modal-open");const r=!!i;if(n){const e=s.find(e=>e.id===n);a(e)}else a(null);if(o(e=>!e),!0===t){const t=r?(0,Xc.__)("Campaign updated successfully!","power-coupons"):(0,Xc.__)("Campaign created successfully!","power-coupons");e.success(t,{description:""})}D(!0,d)};(0,Uf.useEffect)(()=>{D()},[]),(0,Uf.useEffect)(()=>{if(!w.current)return f(!0),h([]),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>{D(!0,d)},400),()=>{M.current&&clearTimeout(M.current)};w.current=!1},[d]);const D=async(e=!1,t="")=>{e||u(!0);try{const e={action:"power_coupons_get_points_campaigns",_wpnonce:E()};t.trim()&&(e.search=t.trim());const n=await fetch(ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(e)}),r=await n.json();r.success&&l(r.data?.campaigns||[])}catch(e){console.error("Error loading campaigns:",e)}u(!1),f(!1)},T=(e,t)=>{h(e?[...g,t.id]:g.filter(e=>e!==t.id))};return c||m||0!==s.length||d.trim()?(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)(UE,{toggleModalOpen:j,editingCampaign:i}),(0,r.createElement)("div",{className:"bg-background-primary rounded-xl border border-border-subtle p-4 flex flex-col gap-4"},(0,r.createElement)("div",{className:"flex items-center gap-2 flex-wrap"},(0,r.createElement)("h2",{className:"m-0 text-xl font-semibold text-text-primary"},(0,Xc.__)("Loyalty Rewards","power-coupons")),(0,r.createElement)(CE,null)),(0,r.createElement)("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3"},(0,r.createElement)("div",{className:"flex items-center gap-4"},t,!c&&g.length>0&&(0,r.createElement)("div",{className:"flex gap-4 items-center border-0 border-l border-solid border-gray-200"},(0,r.createElement)(Jt,{variant:"ghost",icon:(0,r.createElement)(qN,{className:"h-6 w-6 text-gray-500"}),size:"xs",className:"text-icon-secondary hover:text-icon-primary",onClick:()=>{h([])}}),(0,r.createElement)("span",{className:"text-sm font-normal text-gray-500"},g.length," ",(0,Xc.__)("Selected","power-coupons")),(0,r.createElement)(Jt,{className:"py-2 px-4 bg-red-50 text-red-600 outline-red-600 hover:bg-red-50 hover:outline-red-600",size:"sm",tag:"button",type:"button",variant:"outline",icon:(0,r.createElement)(iu,{className:"h-4 w-4"}),iconPosition:"left",onClick:()=>{g.length&&b({isOpen:!0,type:"bulk",id:null})}},(0,Xc.__)("Delete","power-coupons")))),(0,r.createElement)("div",{className:"flex items-center gap-3 sm:gap-4 w-full sm:w-auto"},(0,r.createElement)("div",{className:"relative flex-1 sm:flex-none"},(0,r.createElement)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"},m?(0,r.createElement)("svg",{className:"h-4 w-4 animate-spin",viewBox:"0 0 100 100"},(0,r.createElement)("circle",{fill:"none",strokeWidth:"10",className:"stroke-current opacity-40",cx:"50",cy:"50",r:"40"}),(0,r.createElement)("circle",{fill:"none",strokeWidth:"10",className:"stroke-current",strokeDasharray:"250",strokeDashoffset:"210",cx:"50",cy:"50",r:"40"})):hb("search")),(0,r.createElement)("input",{type:"text",className:"block w-full sm:w-64 pl-10 pr-3 py-2 border-none outline outline-1 outline-border-subtle rounded-md text-sm placeholder-text-tertiary focus:outline-none focus:ring-2 focus:ring-orange-500",placeholder:(0,Xc.__)("Search campaigns…","power-coupons"),value:d,onChange:e=>p(e.target.value)})),(0,r.createElement)("button",{type:"button",onClick:()=>j(),className:"flex items-center gap-2 px-4 py-2 text-sm text-white bg-orange-500 hover:bg-orange-600 rounded-md border-none cursor-pointer whitespace-nowrap"},hb("plus"),(0,r.createElement)("span",null,(0,Xc.__)("Create New Campaign","power-coupons"))))),s.length>0&&(0,r.createElement)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-md bg-blue-50 text-blue-900 text-xs leading-snug"},(0,r.createElement)(_E,{"aria-hidden":"true",className:"h-4 w-4 mt-0.5 text-blue-600 flex-shrink-0"}),(0,r.createElement)("p",{className:"m-0"},(0,Xc.__)("You can run multiple campaigns simultaneously — Priority decides which one wins when more than one matches.","power-coupons"))),c?(0,r.createElement)("div",{className:"p-6 text-center"},(0,r.createElement)("div",{className:"inline-block animate-spin rounded-full h-6 w-6 border-b-2 border-orange-500"}),(0,r.createElement)("p",{className:"mt-2 text-text-tertiary"},(0,Xc.__)("Loading campaigns…","power-coupons"))):(0,r.createElement)("div",null,(0,r.createElement)(ft,{checkboxSelection:s.length>0,className:"whitespace-nowrap sm:whitespace-normal"},(0,r.createElement)(ft.Head,{selected:g.length>0,onChangeSelection:e=>{h(e?s.map(e=>e.id):[])},indeterminate:g.length>0&&g.length<s.length},(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Title","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Action Type","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Earn Type","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Earn Value","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Priority","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Status","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,r.createElement)(Ft,{align:"center",className:"gap-2",justify:"end"},(0,Xc.__)("Actions","power-coupons")))),(0,r.createElement)(ft.Body,null,0===s.length?(0,r.createElement)(ft.Row,null,(0,r.createElement)(ft.Cell,{colSpan:7,className:"w-full text-center text-text-tertiary py-8"},(0,Xc.__)("No campaigns found matching your search.","power-coupons"))):s.map(t=>(0,r.createElement)(ft.Row,{key:t.id,value:t,selected:g.includes(t.id),onChangeSelection:T},(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},(0,r.createElement)("button",{type:"button",className:"bg-transparent border-none p-0 m-0 cursor-pointer text-text-secondary hover:text-orange-600 hover:underline text-sm font-normal text-left",onClick:()=>j(!1,t.id)},t.title)),(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},BE[t.action_type]||t.action_type),(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},(e=>{if("order_earn"!==e.action_type)return(0,Xc.__)("-","power-coupons");const t=VE[e.earn_type]||e.earn_type||(0,Xc.__)("-","power-coupons");return HE[e.earn_type]?(0,r.createElement)(ff,{content:HE[e.earn_type],placement:"top",tooltipPortalRoot:N.current},(0,r.createElement)("span",{className:"cursor-help"},t)):t})(t)),(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},t.earn_value),(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},t.priority),(0,r.createElement)(ft.Cell,null,(0,r.createElement)(Wt,{"aria-label":"Switch Element",className:"[&>input]:!border-none",defaultValue:"active"===t.status,onChange:n=>(async(t,n)=>{try{const r=await fetch(ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"power_coupons_toggle_points_campaign_status",_wpnonce:E(),campaign_id:t,status:n})});(await r.json()).success&&(D(!0,d),e.success("active"===n?(0,Xc.__)("Campaign enabled successfully!","power-coupons"):(0,Xc.__)("Campaign disabled successfully!","power-coupons"),{description:""}))}catch(e){console.error("Error toggling campaign status:",e)}})(t.id,n?"active":"inactive"),size:"sm"})),(0,r.createElement)(ft.Cell,null,(0,r.createElement)(Ft,{align:"center",className:"gap-2",justify:"end"},(0,r.createElement)(ff,{content:"Edit",arrow:!0,placement:"top",tooltipPortalRoot:N.current},(0,r.createElement)(Jt,{onClick:()=>j(!1,t.id),variant:"ghost",icon:(0,r.createElement)(tu,null),size:"xs",className:"text-icon-secondary hover:text-icon-primary","aria-label":"Edit"})),(0,r.createElement)(ff,{content:"Delete",arrow:!0,placement:"top",tooltipPortalRoot:N.current},(0,r.createElement)(Jt,{onClick:()=>b({isOpen:!0,type:"single",id:t.id}),variant:"ghost",icon:(0,r.createElement)(iu,null),size:"xs",className:"text-icon-secondary hover:text-icon-primary","aria-label":"Delete"})))))))))),(0,r.createElement)(fE,{isOpen:v.isOpen,onClose:()=>b({isOpen:!1,type:null,id:null}),onConfirm:()=>{"bulk"===v.type?(async()=>{x(!0);try{const t=await fetch(ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"power_coupons_bulk_delete_points_campaigns",_wpnonce:E(),campaign_ids:JSON.stringify(g)})});(await t.json()).success&&(h([]),D(!0,d),e.success((0,Xc.__)("Campaigns deleted successfully!","power-coupons"),{description:""}))}catch(e){console.error("Error bulk deleting campaigns:",e)}finally{x(!1),b({isOpen:!1,type:null,id:null})}})():(async()=>{x(!0);try{const t=await fetch(ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"power_coupons_delete_points_campaign",_wpnonce:E(),campaign_id:v.id})});(await t.json()).success&&(D(!0,d),e.success((0,Xc.__)("Campaign deleted successfully!","power-coupons"),{description:""}))}catch(e){console.error("Error deleting campaign:",e)}finally{x(!1),b({isOpen:!1,type:null,id:null})}})()},title:"bulk"===v.type?(0,Xc.__)("Delete Selected Campaigns","power-coupons"):(0,Xc.__)("Delete Campaign","power-coupons"),message:"bulk"===v.type?(0,Xc.sprintf)(/* translators: %s: number of selected campaigns */ /* translators: %s: number of selected campaigns */
(0,Xc.__)("Are you sure you want to delete %s selected campaign(s)? This action cannot be undone.","power-coupons"),g.length):(0,Xc.__)("Are you sure you want to delete this campaign? This action cannot be undone.","power-coupons"),isLoading:y})):(0,r.createElement)(r.Fragment,null,n&&(0,r.createElement)(UE,{toggleModalOpen:j,editingCampaign:i}),(0,r.createElement)("div",{className:"bg-background-primary rounded-xl border border-border-subtle p-8 flex flex-col items-center text-center gap-5"},(0,r.createElement)("div",{className:"self-start"},t),(0,r.createElement)("h2",{className:"m-0 font-semibold text-xl"},(0,Xc.__)("Create Your First Credits Campaign","power-coupons")),(0,r.createElement)("p",{className:"m-0 text-text-secondary text-sm max-w-xl"},(0,Xc.__)("Reward customers with credits they can redeem for discounts. Choose from the program types below — and run as many as you like at once.","power-coupons")),(0,r.createElement)("div",{className:"grid w-full max-w-3xl grid-cols-1 sm:grid-cols-3 gap-3 mt-1","aria-label":(0,Xc.__)("Available reward program types","power-coupons")},WE.map(e=>(0,r.createElement)("div",{key:e.key,className:"flex flex-col items-start gap-2 p-4 rounded-lg border border-solid border-border-subtle bg-background-secondary text-left"},(0,r.createElement)("div",{className:"inline-flex items-center justify-center h-9 w-9 rounded-md bg-orange-50 text-orange-600"},(0,r.createElement)(e.Icon,{className:"h-5 w-5"})),(0,r.createElement)("strong",{className:"text-sm font-semibold text-text-primary"},e.label),(0,r.createElement)("p",{className:"m-0 text-xs text-text-secondary leading-snug"},e.description),(0,r.createElement)("p",{className:"m-0 text-xs text-text-tertiary leading-snug"},e.example)))),(0,r.createElement)("button",{type:"button",onClick:()=>j(),className:"flex items-center gap-2 px-4 py-2 mt-2 text-white bg-orange-500 hover:bg-orange-600 rounded-md border-none cursor-pointer whitespace-nowrap"},hb("plus"),(0,r.createElement)("span",null,(0,Xc.__)("Create New Campaign","power-coupons")))))},$E=(0,r.forwardRef)(({id:e,defaultValue:t="",value:n,size:o="sm",className:i="",disabled:a=!1,onChange:s=()=>{},error:l=!1,onError:c=()=>{},...u},d)=>{const p=(0,r.useMemo)(()=>e||`input-textarea-${rt()}`,[e]),m=(0,r.useMemo)(()=>typeof n<"u",[n]),[f,g]=(0,r.useState)(t),h=(0,r.useCallback)(()=>m?n:f,[m,n,f]),y=a?"hover:border-border-disabled":"hover:border-border-strong",x=l?"focus:border-focus-error-border focus:ring-field-color-error border-focus-error-border":"";return(0,ee.jsx)("textarea",{ref:d,id:p,className:qe("py-2 rounded border border-solid border-border-subtle bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary focus:outline-none transition ease-in-out duration-200",a?"border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",{sm:"px-3 rounded text-xs",md:"px-3 rounded-md text-sm",lg:"px-4 rounded-lg text-base"}[o],"focus:border-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",y,x,i),disabled:a,onChange:e=>{if(a)return;const t=e.target.value;m||g(t),"function"==typeof s&&s(t)},onInvalid:c,value:h(),...u})});function ZE({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"}))}$E.displayName="TextArea";const qE=r.forwardRef(ZE);function XE({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"}))}const JE=r.forwardRef(XE);function KE({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const ej=r.forwardRef(KE),tj={order_earn:(0,Xc.__)("Order Earning","power-coupons"),order_complete:(0,Xc.__)("Order Earning","power-coupons"),order_pending:(0,Xc.__)("Order Earning (Pending)","power-coupons"),redeem:(0,Xc.__)("Redemption","power-coupons"),admin_adjust:(0,Xc.__)("Admin Adjustment","power-coupons"),signup:(0,Xc.__)("Signup Bonus","power-coupons"),review:(0,Xc.__)("Product Review","power-coupons"),expiry:(0,Xc.__)("Expired","power-coupons"),cancel_reversal:(0,Xc.__)("Cancelled/Reversed","power-coupons"),order_refund:(0,Xc.__)("Refund","power-coupons")},nj=[{value:"",label:(0,Xc.__)("All Actions","power-coupons")},{value:"order_earn",label:(0,Xc.__)("Order Earning","power-coupons")},{value:"order_pending",label:(0,Xc.__)("Order Earning (Pending)","power-coupons")},{value:"redeem",label:(0,Xc.__)("Redemption","power-coupons")},{value:"admin_adjust",label:(0,Xc.__)("Admin Adjustment","power-coupons")},{value:"signup",label:(0,Xc.__)("Signup Bonus","power-coupons")},{value:"review",label:(0,Xc.__)("Product Review","power-coupons")},{value:"expiry",label:(0,Xc.__)("Expired","power-coupons")},{value:"cancel_reversal",label:(0,Xc.__)("Cancelled/Reversed","power-coupons")},{value:"order_refund",label:(0,Xc.__)("Refund","power-coupons")}],rj=function({toast:e,tabSelector:t}){const[n,o]=(0,Uf.useState)([]),[i,a]=(0,Uf.useState)(0),[s,l]=(0,Uf.useState)(!0),[c,u]=(0,Uf.useState)(1),[d,p]=(0,Uf.useState)(""),[m,f]=(0,Uf.useState)(""),[g,h]=(0,Uf.useState)(""),[y,x]=(0,Uf.useState)(""),[v,b]=(0,Uf.useState)(!1),[M,w]=(0,Uf.useState)(!1),N=(0,Uf.useRef)(null),[E,j]=(0,Uf.useState)(!1),[D,T]=(0,Uf.useState)(!1),[I,k]=(0,Uf.useState)({user_id:"",points:"",note:""}),[O,_]=(0,Uf.useState)(!1),[C,A]=(0,Uf.useState)({}),[S,L]=(0,Uf.useState)(""),[z,P]=(0,Uf.useState)([]),[R,Y]=(0,Uf.useState)(!1),[Q,F]=(0,Uf.useState)(null),[U,B]=(0,Uf.useState)(!1),W=(0,Uf.useRef)(null),[V,H]=(0,Uf.useState)([]),[G,$]=(0,Uf.useState)(!1),[Z,q]=(0,Uf.useState)(!1),X=(0,Uf.useRef)(null),J=(0,Uf.useRef)(!0);(0,Uf.useEffect)(()=>{if(!v)return;const e=e=>{N.current&&!N.current.contains(e.target)&&b(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[v]);const K=()=>window.powerCouponsSettings?.points_nonces?.history||"";(0,Uf.useEffect)(()=>{te()},[]),(0,Uf.useEffect)(()=>{J.current||te(!0)},[c]),(0,Uf.useEffect)(()=>{J.current||(u(1),te(!0))},[m,g,y]),(0,Uf.useEffect)(()=>{if(!J.current)return j(!0),X.current&&clearTimeout(X.current),X.current=setTimeout(()=>{u(1),te(!0)},400),()=>{X.current&&clearTimeout(X.current)};J.current=!1},[d]),(0,Uf.useEffect)(()=>(W.current&&clearTimeout(W.current),S.length>=2?(Y(!0),W.current=setTimeout(()=>{ee(S),B(!0)},400)):(P([]),B(!1)),()=>{W.current&&clearTimeout(W.current)}),[S]);const ee=async e=>{Y(!0);try{const t=new FormData;t.append("action","power_coupons_search_users"),t.append("_wpnonce",K()),t.append("term",e);const n=await fetch(ajaxurl,{method:"POST",body:t}),r=await n.json();r.success?P(r.data):P([])}catch(e){console.error("Error searching users:",e),P([])}Y(!1)},te=async(e=!1)=>{e||l(!0);try{const e={action:"power_coupons_get_points_history",_wpnonce:K(),page:c,per_page:20};d.trim()&&(e.search=d.trim()),m&&(e.action_filter=m),g&&(e.date_from=g),y&&(e.date_to=y);const t=await fetch(ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(e)}),n=await t.json();n.success&&(o(n.data?.entries||[]),a(n.data?.total||0))}catch(e){console.error("Error loading points history:",e)}l(!1),j(!1)},ne=Math.ceil(i/20),re=(e,t)=>{H(e?[...V,t.id]:V.filter(e=>e!==t.id))},oe=e=>IM(e,"yyyy-MM-dd");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"bg-background-primary rounded-xl border border-border-subtle p-4 flex flex-col gap-4"},(0,r.createElement)("div",{className:"flex items-center gap-2 flex-wrap"},(0,r.createElement)("h2",{className:"m-0 text-xl font-semibold text-text-primary"},(0,Xc.__)("Loyalty Rewards","power-coupons")),(0,r.createElement)(CE,null)),(0,r.createElement)("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3"},(0,r.createElement)("div",{className:"flex items-center gap-4"},t,!s&&V.length>0&&(0,r.createElement)("div",{className:"flex gap-4 items-center border-0 border-l border-solid border-gray-200"},(0,r.createElement)(Jt,{variant:"ghost",icon:(0,r.createElement)(qN,{className:"h-6 w-6 text-gray-500"}),size:"xs",className:"text-icon-secondary hover:text-icon-primary",onClick:()=>H([])}),(0,r.createElement)("span",{className:"text-sm font-normal text-gray-500"},V.length," ",(0,Xc.__)("Selected","power-coupons")),(0,r.createElement)(Jt,{className:"py-2 px-4 bg-red-50 text-red-600 outline-red-600 hover:bg-red-50 hover:outline-red-600",size:"sm",tag:"button",type:"button",variant:"outline",icon:(0,r.createElement)(iu,{className:"h-4 w-4"}),iconPosition:"left",onClick:()=>q(!0)},(0,Xc.__)("Delete","power-coupons")))),(0,r.createElement)("div",{className:"flex items-center gap-3 flex-wrap"},(0,r.createElement)("div",{className:"relative flex-1 sm:flex-none"},(0,r.createElement)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"},E?(0,r.createElement)("svg",{className:"h-4 w-4 animate-spin",viewBox:"0 0 100 100"},(0,r.createElement)("circle",{fill:"none",strokeWidth:"10",className:"stroke-current opacity-40",cx:"50",cy:"50",r:"40"}),(0,r.createElement)("circle",{fill:"none",strokeWidth:"10",className:"stroke-current",strokeDasharray:"250",strokeDashoffset:"210",cx:"50",cy:"50",r:"40"})):hb("search")),(0,r.createElement)("input",{type:"text",className:"block w-full sm:w-56 pl-10 pr-3 py-2 border-none outline outline-1 outline-border-subtle rounded-md text-sm placeholder-text-tertiary focus:outline-none focus:ring-2 focus:ring-orange-500",placeholder:(0,Xc.__)("Search user…","power-coupons"),value:d,onChange:e=>p(e.target.value)})),(0,r.createElement)("div",{className:"w-full sm:w-48"},(0,r.createElement)("select",{className:"bg-field-secondary-background text-text-primary !w-full !max-w-none outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200 px-3 py-2 rounded text-sm focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 hover:outline-border-strong",value:m,onChange:e=>f(e.target.value)},nj.map(e=>(0,r.createElement)("option",{key:e.value,value:e.value},e.label)))),(0,r.createElement)("div",{className:"relative",ref:N},(0,r.createElement)("button",{type:"button",onClick:()=>{if(!v&&N.current){const e=N.current.getBoundingClientRect();w(window.innerHeight-e.bottom<450)}b(e=>!e)},className:"flex items-center gap-2 bg-field-secondary-background text-text-primary outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200 px-3 py-2 rounded text-sm cursor-pointer hover:outline-border-strong focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2"},(0,r.createElement)(SN,{className:"w-4 h-4 text-text-tertiary flex-shrink-0"}),(0,r.createElement)("span",{className:g||y?"text-text-primary":"text-text-tertiary"},(()=>{if(!g&&!y)return(0,Xc.__)("All Dates","power-coupons");const e=g?IM(new Date(g+"T00:00:00"),"MMM d"):"",t=y?IM(new Date(y+"T00:00:00"),"MMM d, yyyy"):"";return e&&t?`${e} – ${t}`:e||t})())),(g||y)&&(0,r.createElement)("button",{type:"button",onClick:()=>{h(""),x("")},className:"absolute right-2 top-1/2 -translate-y-1/2 bg-transparent border-none cursor-pointer p-0.5 text-text-tertiary hover:text-text-primary","aria-label":(0,Xc.__)("Clear dates","power-coupons")},(0,r.createElement)(qN,{className:"w-3.5 h-3.5"})),v&&(0,r.createElement)("div",{className:`pc-date-picker-popup absolute z-50 ${M?"bottom-full mb-1":"top-full mt-1"} right-0 shadow-lg rounded-md`},(0,r.createElement)(xN,{selectionType:"range",variant:"presets",selected:g&&y?{from:new Date(g+"T00:00:00"),to:new Date(y+"T00:00:00")}:{from:void 0,to:void 0},onApply:e=>{e?.from&&h(oe(e.from)),e?.to&&x(oe(e.to)),b(!1)},onCancel:()=>{h(""),x(""),b(!1)}}))),(0,r.createElement)(ff,{content:(0,Xc.__)("Manually add or deduct credits for a specific user","power-coupons"),placement:"left",tooltipPortalRoot:document.getElementById("power-coupons-settings")},(0,r.createElement)("button",{type:"button",onClick:()=>{k({user_id:"",points:"",note:""}),A({}),F(null),L(""),P([]),B(!1),T(!0)},className:"flex items-center gap-2 px-4 py-2 text-sm text-white bg-orange-500 hover:bg-orange-600 rounded-md border-none cursor-pointer whitespace-nowrap"},(0,r.createElement)(qE,{className:"h-4 w-4"}),(0,r.createElement)("span",null,(0,Xc.__)("Manual Adjust","power-coupons")))))),s?(0,r.createElement)("div",{className:"p-6 text-center"},(0,r.createElement)("div",{className:"inline-block animate-spin rounded-full h-6 w-6 border-b-2 border-orange-500"}),(0,r.createElement)("p",{className:"mt-2 text-text-tertiary"},(0,Xc.__)("Loading history…","power-coupons"))):(0,r.createElement)("div",null,(0,r.createElement)(ft,{checkboxSelection:n.length>0,className:"whitespace-nowrap sm:whitespace-normal"},(0,r.createElement)(ft.Head,{selected:V.length>0,onChangeSelection:e=>{H(e?n.map(e=>e.id):[])},indeterminate:V.length>0&&V.length<n.length},(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Date","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("User","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Action","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Credits","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Balance After","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Note","power-coupons"))),(0,r.createElement)(ft.Body,null,0===n.length?(0,r.createElement)(ft.Row,null,(0,r.createElement)(ft.Cell,{colSpan:6,className:"w-full text-center text-text-tertiary py-8"},(0,Xc.__)("No history entries found.","power-coupons"))):n.map(e=>(0,r.createElement)(ft.Row,{key:e.id,value:e,selected:V.includes(e.id),onChangeSelection:re},(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},e.date),(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},(0,r.createElement)("div",{className:"flex flex-col"},(0,r.createElement)("span",null,e.user_name),e.user_email&&(0,r.createElement)("span",{className:"text-xs text-text-tertiary"},e.user_email))),(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},tj[e.action]||e.action),(0,r.createElement)(ft.Cell,{className:"text-sm"},(e=>{const t=parseInt(e);return t>0?(0,r.createElement)("span",{className:"text-green-600 font-medium"},"+",t):t<0?(0,r.createElement)("span",{className:"text-red-600 font-medium"},t):(0,r.createElement)("span",{className:"text-text-secondary"},t)})(e.points)),(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},e.balance_after),(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal max-w-[200px]"},(0,r.createElement)("div",{className:"flex flex-col gap-0.5"},e.note&&(0,r.createElement)("span",{className:"truncate"},(e=>{if(!e||"string"!=typeof e)return e;const t=document.createElement("textarea");return t.innerHTML=e,t.value})(e.note)),e.reference&&(0,r.createElement)("a",{href:e.reference.url,target:"_blank",rel:"noopener noreferrer",className:"text-text-secondary hover:text-orange-600 hover:underline truncate"},e.reference.label),!e.note&&!e.reference&&(0,Xc.__)("-","power-coupons"))))))),ne>1&&(0,r.createElement)("div",{className:"flex items-center justify-between mt-4 px-2"},(0,r.createElement)("span",{className:"text-sm text-text-tertiary"},(0,Xc.sprintf)(/* translators: 1: current range start, 2: current range end, 3: total entries */ /* translators: 1: current range start, 2: current range end, 3: total entries */
(0,Xc.__)("Showing %1$s-%2$s of %3$s","power-coupons"),20*(c-1)+1,Math.min(20*c,i),i)),(0,r.createElement)("div",{className:"flex items-center gap-2"},(0,r.createElement)(Jt,{variant:"outline",size:"xs",onClick:()=>u(c-1),disabled:c<=1,icon:(0,r.createElement)(JE,{className:"h-4 w-4"}),"aria-label":(0,Xc.__)("Previous page","power-coupons")}),(0,r.createElement)("span",{className:"text-sm text-text-secondary px-2"},(0,Xc.sprintf)(/* translators: 1: current page, 2: total pages */ /* translators: 1: current page, 2: total pages */
(0,Xc.__)("%1$s / %2$s","power-coupons"),c,ne)),(0,r.createElement)(Jt,{variant:"outline",size:"xs",onClick:()=>u(c+1),disabled:c>=ne,icon:(0,r.createElement)(ej,{className:"h-4 w-4"}),"aria-label":(0,Xc.__)("Next page","power-coupons")}))))),D&&(0,r.createElement)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center"},(0,r.createElement)("div",{className:"absolute inset-0 bg-black/50",onClick:()=>T(!1),role:"presentation"}),(0,r.createElement)("div",{className:"relative bg-white rounded-lg shadow-xl w-full max-w-md mx-4 z-10"},(0,r.createElement)("div",{className:"flex items-center justify-between p-5 border-0 border-b border-solid border-border-subtle"},(0,r.createElement)("h3",{className:"m-0 text-lg font-semibold text-text-primary"},(0,Xc.__)("Manual Credits Adjustment","power-coupons")),(0,r.createElement)("button",{type:"button",onClick:()=>T(!1),className:"bg-transparent border-none cursor-pointer p-1 text-text-tertiary hover:text-text-primary"},hb("close"))),(0,r.createElement)("div",{id:"power-coupons-points-adjust-modal",className:"p-5 flex flex-col gap-4"},(0,r.createElement)("div",{className:"flex flex-col gap-1.5"},(0,r.createElement)(ut,{required:!0},(0,Xc.__)("User","power-coupons")),Q?(0,r.createElement)(du,{closable:!0,onClose:()=>{F(null),k(e=>({...e,user_id:""})),L(""),P([])},label:`${Q.name} (${Q.email})`,size:"md",type:"pill",variant:"neutral"}):(0,r.createElement)(Cv,{variant:"secondary",closeAfterSelect:!1,loading:R,setOpen:B,open:U,size:"md"},(0,r.createElement)(Cv.Input,{className:"!w-full !box-border [&_span]:hidden",placeholder:(0,Xc.__)("Search by name or email…","power-coupons"),value:S,onChange:L}),(0,r.createElement)(Cv.Portal,{id:"power-coupons-points-adjust-modal"},(0,r.createElement)(Cv.Content,null,(0,r.createElement)(Cv.List,null,z.length>0?z.map(e=>(0,r.createElement)(Cv.Item,{className:"cursor-pointer",key:e.id,onClick:()=>{F(e),k(t=>({...t,user_id:e.id})),L(""),B(!1),P([])}},(0,r.createElement)("div",{className:"flex flex-col"},(0,r.createElement)("span",{className:"font-medium"},e.name),(0,r.createElement)("span",{className:"text-xs text-text-tertiary"},e.email)))):(0,r.createElement)(Cv.Empty,null,S.length<2?(0,Xc.__)("Type at least 2 characters to search","power-coupons"):R?(0,Xc.__)("Searching…","power-coupons"):(0,Xc.__)("No users found","power-coupons")))))),C.user_id&&(0,r.createElement)("span",{className:"text-red-500 text-xs"},C.user_id)),(0,r.createElement)("div",{className:"flex flex-col gap-1.5"},(0,r.createElement)(ut,{required:!0},(0,Xc.__)("Credits","power-coupons")),(0,r.createElement)(cv,{type:"number",size:"md",value:I.points,onChange:e=>k(t=>({...t,points:e})),placeholder:(0,Xc.__)("e.g. 50 or -25","power-coupons"),step:"1",error:!!C.points}),C.points&&(0,r.createElement)("span",{className:"text-red-500 text-xs"},C.points),(0,r.createElement)("span",{className:"text-xs text-text-tertiary"},(0,Xc.__)("Use positive values to add credits, negative to deduct.","power-coupons"))),(0,r.createElement)("div",{className:"flex flex-col gap-1.5"},(0,r.createElement)(ut,null,(0,Xc.__)("Note","power-coupons")),(0,r.createElement)($E,{size:"md",value:I.note,onChange:e=>k(t=>({...t,note:e})),placeholder:(0,Xc.__)("Optional note for this adjustment","power-coupons"),rows:2}))),(0,r.createElement)("div",{className:"flex gap-3 justify-end p-5 border-0 border-t border-solid border-border-subtle"},(0,r.createElement)("button",{type:"button",onClick:()=>T(!1),disabled:O,className:"px-4 py-2 bg-transparent border border-solid border-border-subtle hover:bg-gray-50 rounded-md cursor-pointer text-sm font-medium text-text-primary disabled:opacity-50"},(0,Xc.__)("Cancel","power-coupons")),(0,r.createElement)("button",{type:"button",onClick:async()=>{const t={};if(Q||(t.user_id=(0,Xc.__)("Please select a user.","power-coupons")),I.points&&0!==parseInt(I.points)||(t.points=(0,Xc.__)("Credits must be a non-zero value.","power-coupons")),A(t),!(Object.keys(t).length>0)){_(!0);try{const t=await fetch(ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"power_coupons_admin_adjust_points",_wpnonce:K(),user_id:Q.id,points:I.points,note:I.note})}),n=await t.json();n.success?(T(!1),e.success((0,Xc.__)("Credits adjusted successfully!","power-coupons"),{description:""}),te(!0)):e.error(n.data?.message||(0,Xc.__)("Failed to adjust credits.","power-coupons"),{description:""})}catch(e){console.error("Error adjusting points:",e)}finally{_(!1)}}},disabled:O,className:"px-4 py-2 text-white bg-orange-500 hover:bg-orange-600 rounded-md border-none cursor-pointer text-sm font-medium disabled:opacity-50"},O?(0,Xc.__)("Saving…","power-coupons"):(0,Xc.__)("Adjust Credits","power-coupons"))))),(0,r.createElement)(fE,{isOpen:Z,onClose:()=>q(!1),onConfirm:async()=>{$(!0);try{const t=await fetch(ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"power_coupons_bulk_delete_points_history",_wpnonce:K(),entry_ids:JSON.stringify(V)})}),n=await t.json();n.success&&(H([]),te(!0),e.success(n.data?.message||(0,Xc.__)("Entries deleted successfully!","power-coupons"),{description:""}))}catch(e){console.error("Error bulk deleting entries:",e)}finally{$(!1),q(!1)}},title:(0,Xc.__)("Delete Selected Entries","power-coupons"),message:(0,Xc.sprintf)(/* translators: %s: number of selected entries */ /* translators: %s: number of selected entries */
(0,Xc.__)("Are you sure you want to delete %s selected history entry(s)? This action cannot be undone.","power-coupons"),V.length),isLoading:G}))},oj=[{slug:"campaigns",title:(0,Xc.__)("Reward Campaigns","power-coupons")},{slug:"history",title:(0,Xc.__)("Logs","power-coupons")}],ij=function({toast:e}){const[t,n]=(0,Uf.useState)("campaigns"),[o]=K(),i=!!o?.points_settings?.enable,a=(0,r.createElement)(kN,{activeItem:t},(0,r.createElement)(kN.Group,{className:"pc-tabs-rounded",orientation:"horizontal",size:"md",variant:"rounded",width:"auto"},oj.map(e=>(0,r.createElement)(kN.Tab,{key:e.slug,slug:e.slug,text:e.title,type:"button",onClick:()=>n(e.slug)}))));return(0,r.createElement)("div",{className:"flex flex-col gap-4"},!i&&(0,r.createElement)("div",{role:"alert",className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 rounded-lg p-4 bg-amber-50 border border-solid border-amber-300 text-amber-900"},(0,r.createElement)("div",{className:"flex items-start gap-3"},(0,r.createElement)(mE,{className:"h-5 w-5 flex-shrink-0 mt-0.5 text-amber-600","aria-hidden":"true"}),(0,r.createElement)("div",null,(0,r.createElement)("p",{className:"m-0 font-semibold text-sm"},(0,Xc.__)("Loyalty Rewards is currently disabled.","power-coupons")),(0,r.createElement)("p",{className:"m-0 mt-1 text-sm text-amber-800"},(0,Xc.__)("Customers won't earn or redeem credits even when campaigns are marked Active. Turn on the master toggle to start running your program.","power-coupons")))),(0,r.createElement)(H,{to:{pathname:"admin.php",search:"?page=power_coupons_settings&path=settings&tab=power_coupons_points"},className:"inline-flex items-center justify-center gap-2 px-4 py-2 rounded-md text-sm font-medium text-white hover:text-white bg-orange-500 hover:bg-orange-600 no-underline whitespace-nowrap focus:outline-none focus:ring-2 focus:ring-orange-500 focus:ring-offset-2"},(0,Xc.__)("Open settings","power-coupons"))),"campaigns"===t&&(0,r.createElement)(GE,{toast:e,tabSelector:a}),"history"===t&&(0,r.createElement)(rj,{toast:e,tabSelector:a}))},aj=[(0,Xc.__)("BOGO Offers","power-coupons"),(0,Xc.__)("Advanced Discount Rules","power-coupons"),(0,Xc.__)("Cart Progress Bar","power-coupons"),(0,Xc.__)("Loyalty Points","power-coupons"),(0,Xc.__)("Coupon Analytics","power-coupons"),(0,Xc.__)("And More…","power-coupons")],sj=()=>(0,r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"shrink-0"},(0,r.createElement)("path",{d:"M10 3.00098L4.5 8.50098L2 6.00098",stroke:"#ea580c",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),lj=function({children:e}){const t=window.powerCouponsSettings.is_pro_installed,[n,o]=(0,r.useState)(!1);return(0,r.createElement)("div",{className:"relative"},(0,r.createElement)("div",{className:"pointer-events-none select-none opacity-50"},e),(0,r.createElement)("div",{className:"absolute inset-0 flex items-center justify-center z-[9] pt-4"},(0,r.createElement)("div",{className:"max-w-[520px] w-full bg-white rounded-xl shadow-xl border border-solid border-gray-200 p-8 text-center"},(0,r.createElement)("div",{className:"flex justify-center mb-4"},(0,r.createElement)("img",{src:pb,alt:(0,Xc.__)("Power Coupons Pro","power-coupons"),className:"h-[140px] w-auto"})),(0,r.createElement)("div",{className:"flex items-center justify-center gap-1.5 mb-2"},(0,r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"M8.834 1.333 2.667 9.333h5.334L7.168 14.667l6.166-8H8.001l.833-5.334Z",stroke:"#ea580c",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",fill:"#ea580c",fillOpacity:"0.15"})),(0,r.createElement)("span",{className:"text-sm font-semibold text-orange-600"},(0,Xc.__)("PRO Feature","power-coupons"))),(0,r.createElement)("h2",{className:"text-xl font-bold text-gray-900 m-0 mb-2"},(0,Xc.__)("Unlock the Full Power of Power Coupons Pro","power-coupons")),(0,r.createElement)("p",{className:"text-sm text-gray-500 m-0 mb-6 leading-relaxed"},(0,Xc.__)("Boost conversions with advanced coupon automation, smart discount rules, and powerful cart incentives designed to increase sales.","power-coupons")),(0,r.createElement)("div",{className:"grid grid-cols-2 gap-x-8 gap-y-2.5 text-left mb-8 px-2"},aj.map(e=>(0,r.createElement)("div",{key:e,className:"flex items-center gap-2 text-sm text-gray-700"},(0,r.createElement)(sj,null),e))),t?(0,r.createElement)("button",{type:"button",onClick:async()=>{o(!0);try{const e=await fetch(window.powerCouponsSettings.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"power_coupons_activate_pro",security:window.powerCouponsSettings.activate_pro_nonce})});(await e.json()).success?window.location.reload():o(!1)}catch{o(!1)}},disabled:n,className:"block w-full text-center rounded-lg py-3 text-sm font-semibold text-white bg-orange-500 hover:bg-orange-600 border-0 cursor-pointer disabled:opacity-70 disabled:cursor-not-allowed"},n?(0,Xc.__)("Activating…","power-coupons"):(0,Xc.__)("Activate Power Coupons Pro","power-coupons")):(0,r.createElement)("a",{href:"https://cartflows.com/power-coupons-for-woocommerce/pricing/?utm_source=dashboard&utm_medium=free-power-coupons&utm_campaign=go-pro",target:"_blank",rel:"noopener noreferrer",className:"block w-full text-center rounded-lg py-3 text-sm font-semibold no-underline text-white bg-orange-500 hover:bg-orange-600 border-0 ring-0 cursor-pointer"},(0,Xc.__)("Upgrade to PRO","power-coupons")))))},cj=[{title:"Order Points — 1 point per $1",action_type:"Order Earning",earn_type:"Per Currency Unit",earn_value:"1"},{title:"Welcome Bonus — 50 points",action_type:"Signup Bonus",earn_type:"Fixed",earn_value:"50"},{title:"Product Review — 25 points",action_type:"Product Review",earn_type:"Fixed",earn_value:"25"},{title:"Double Points Weekend",action_type:"Order Earning",earn_type:"Per Currency Unit",earn_value:"2"},{title:"Referral Reward — 100 points",action_type:"Referral",earn_type:"Fixed",earn_value:"100"},{title:"Premium Members — 5% bonus",action_type:"Order Earning",earn_type:"Percentage",earn_value:"5"}],uj=function(){return(0,r.createElement)("div",{className:"bg-background-primary rounded-xl border border-border-subtle p-4 flex flex-col gap-4"},(0,r.createElement)("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3"},(0,r.createElement)("h2",{className:"m-0 text-xl font-semibold text-text-primary"},(0,Xc.__)("Reward Campaigns","power-coupons")),(0,r.createElement)("button",{type:"button",className:"flex items-center gap-2 px-4 py-2 text-white bg-orange-500 rounded-md border-none cursor-default whitespace-nowrap",tabIndex:-1},(0,r.createElement)("span",null,(0,Xc.__)("Create New Campaign","power-coupons")))),(0,r.createElement)(ft,{checkboxSelection:!0,className:"whitespace-nowrap sm:whitespace-normal"},(0,r.createElement)(ft.Head,null,(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Title","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Action Type","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Earn Type","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Earn Value","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Status","power-coupons"))),(0,r.createElement)(ft.Body,null,cj.map((e,t)=>(0,r.createElement)(ft.Row,{key:t},(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},e.title),(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},e.action_type),(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},e.earn_type),(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},e.earn_value),(0,r.createElement)(ft.Cell,null,(0,r.createElement)(Wt,{size:"sm",defaultValue:t<4,className:"[&>input]:!border-none"})))))))},dj=[{name:"Buy 2 Get 1 Free — T-Shirts",description:"Buy any 2 t-shirts and get the 3rd free",type:"Buy X Get X"},{name:"BOGO 50% Off — Accessories",description:"Buy one accessory, get another at 50% off",type:"Buy X Get Y"},{name:"Spend $100 Get Free Gift",description:"Free gift item on orders above $100",type:"Spend X Get Y"},{name:"Buy 3 Get 1 Free — Socks",description:"Stock up and save on socks",type:"Buy X Get X"},{name:"Holiday BOGO — All Products",description:"Holiday season buy one get one on everything",type:"Buy X Get Y"},{name:"Summer Sale — Buy 2 Get 30% Off",description:"Summer clearance percentage discount",type:"Buy X Get X"},{name:"Flash Sale — Free Shipping Item",description:"Limited time free shipping product offer",type:"Spend X Get Y"},{name:"VIP Members — Extra 20% Off",description:"Exclusive member discount on second item",type:"Buy X Get Y"},{name:"Back to School — Buy 2 Get 1 Free",description:"Stock up on school supplies with BOGO savings",type:"Buy X Get X"},{name:"Clearance BOGO — Winter Collection",description:"Buy one winter item, get another free",type:"Buy X Get Y"},{name:"Spend $75 Get 15% Off Next Order",description:"Reward loyal shoppers with a future discount",type:"Spend X Get Y"},{name:"Bundle Deal — Buy 4 Pay for 3",description:"Mix and match any 4 items, cheapest is free",type:"Buy X Get X"}];function pj(){return(0,r.createElement)("div",{className:"bg-background-primary rounded-xl border border-border-subtle p-4 flex flex-col gap-4"},(0,r.createElement)("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3"},(0,r.createElement)("h2",{className:"m-0 text-xl font-semibold text-text-primary"},(0,Xc.__)("BOGO Offers","power-coupons")),(0,r.createElement)("div",{className:"flex items-center gap-3 sm:gap-4 w-full sm:w-auto"},(0,r.createElement)("div",{className:"relative flex-1 sm:flex-none"},(0,r.createElement)("input",{type:"text",className:"block w-full sm:w-64 pl-10 pr-3 py-2 border border-border-subtle rounded-md text-sm placeholder-text-tertiary",placeholder:(0,Xc.__)("Search offers…","power-coupons"),readOnly:!0,tabIndex:-1})),(0,r.createElement)("button",{type:"button",className:"flex items-center gap-2 px-4 py-2 text-white bg-orange-500 rounded-md border-none cursor-default whitespace-nowrap",tabIndex:-1},(0,r.createElement)("span",null,(0,Xc.__)("Create New Offer","power-coupons"))))),(0,r.createElement)(ft,{checkboxSelection:!0,className:"whitespace-nowrap sm:whitespace-normal"},(0,r.createElement)(ft.Head,null,(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Offer Name","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Description","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Offer Type","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,Xc.__)("Status","power-coupons")),(0,r.createElement)(ft.HeadCell,null,(0,r.createElement)(Ft,{align:"center",className:"gap-2",justify:"end"},(0,Xc.__)("Actions","power-coupons")))),(0,r.createElement)(ft.Body,null,dj.map((e,t)=>(0,r.createElement)(ft.Row,{key:t},(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},e.name),(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},e.description),(0,r.createElement)(ft.Cell,{className:"text-text-secondary text-sm font-normal"},e.type),(0,r.createElement)(ft.Cell,null,(0,r.createElement)(Wt,{size:"sm",defaultValue:t<7,className:"[&>input]:!border-none"})),(0,r.createElement)(ft.Cell,null,(0,r.createElement)(Ft,{align:"center",className:"gap-2",justify:"end"},(0,r.createElement)(Kc,{className:"h-4 w-4 text-icon-secondary"}),(0,r.createElement)(tu,{className:"h-4 w-4 text-icon-secondary"}),(0,r.createElement)(ru,{className:"h-4 w-4 text-icon-secondary"}),(0,r.createElement)(iu,{className:"h-4 w-4 text-icon-secondary"}))))))))}const mj=function(){const[e]=K(),[t,n]=(0,r.useState)(""),o=new URLSearchParams(Y(L).location.search),i=o.get("path")||"settings",[a,s]=(0,r.useState)(!1),l=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(!l.current)return void(l.current=!0);const t=new window.FormData;t.append("action","power_coupons_update_settings"),t.append("security",window.powerCouponsSettings.update_nonce),t.append("power_coupons_settings",JSON.stringify(e)),s(!0),cb()({url:window.powerCouponsSettings.ajax_url,method:"POST",body:t}).then(()=>{Gt.success("Successfully Saved!",{description:""})}).catch(()=>{Gt.error((0,Xc.__)("Failed to save settings.","power-coupons"),{description:""})}).finally(()=>{s(!1)})},[e]);const c=Y(S),u=[],d=window.powerCouponsSettings.settings_tabs?Object.values(window.powerCouponsSettings.settings_tabs):[];Object.values(d).sort((e,t)=>(e.priority||0)-(t.priority||0)).forEach(e=>{u.push({name:e.label||e.name,slug:e.slug})});const p=d.map(e=>e.slug).includes(o.get("tab"))?o.get("tab"):t||"power_coupons_general";function m(e){n(e),c.push("admin.php?page=power_coupons_settings&path=settings&tab="+e)}const f=!!e?.pro_version&&"Activated"!==e.license_status;return(0,r.createElement)("form",{className:"powerCouponsSettings",id:"powerCouponsSettings",method:"post"},(0,r.createElement)(Ft,{className:"h-full",containerType:"flex",direction:"column",gap:0},(0,r.createElement)(Ft.Item,null,(0,r.createElement)(fu,{processing:a,activePage:"power_coupons_settings",activePath:i})),"settings"===i&&(0,r.createElement)(Ft.Item,{className:"flex gap-4 bg-background-secondary max-h-[calc(100%_-_6rem)]"},(0,r.createElement)(qc,{position:"top-right",design:"stack",theme:"light",autoDismiss:!0,dismissAfter:2e3,className:"top-16"}),(0,r.createElement)(db,{navigation:u,tab:p,navigate:m})),"bogo"===i&&(0,r.createElement)(Ft.Item,{className:"m-[32px_32px_32px_12px]"},(0,r.createElement)(qc,{position:"top-right",design:"stack",theme:"light",autoDismiss:!0,dismissAfter:2e3,className:"top-16"}),!window.powerCouponsSettings.is_pro_active&&(0,r.createElement)(lj,null,(0,r.createElement)(pj,null)),window.powerCouponsSettings.is_pro_active&&f&&(0,r.createElement)(sb,{navigate:m}),window.powerCouponsSettings.is_pro_active&&!f&&(0,r.createElement)(NE,{navigation:u,tab:p,navigate:m,toast:Gt})),"points"===i&&(0,r.createElement)(Ft.Item,{className:"m-[32px_32px_32px_12px]"},(0,r.createElement)(qc,{position:"top-right",design:"stack",theme:"light",autoDismiss:!0,dismissAfter:2e3,className:"top-16"}),!window.powerCouponsSettings.is_pro_active&&(0,r.createElement)(lj,null,(0,r.createElement)(uj,null)),window.powerCouponsSettings.is_pro_active&&f&&(0,r.createElement)(sb,{navigate:m}),window.powerCouponsSettings.is_pro_active&&!f&&(0,r.createElement)(ij,{navigation:u,tab:p,navigate:m,toast:Gt}))))},fj=st("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),gj=(e,t)=>qe("rounded-full text-brand-primary-600 transition-colors duration-300",e[t].dot,e[t].ring),hj={sm:{dot:"size-2.5",ring:"size-5",numberIcon:"size-5 text-tiny",icon:"size-5",label:"text-xs"},md:{dot:"size-3",ring:"size-6",numberIcon:"size-6 text-sm",icon:"size-6",label:"text-sm"},lg:{dot:"size-3.5",ring:"size-7",numberIcon:"size-7 text-md",icon:"size-7",label:"text-sm"}},yj=({variant:e="dot",size:t="sm",type:n="inline",currentStep:o=1,children:i,className:a,lineClassName:s="min-w-10",completedVariant:l="icon",completedIcon:c=(0,ee.jsx)(ct,{}),...u})=>{const d=r.Children.count(i);-1===o&&(o=d+1);const p=r.Children.map(i,(i,a)=>{const u={isCompleted:a+1<o,isCurrent:a+1===o,sizeClasses:hj,size:t,variant:e,type:n,isLast:a+1===d,index:a,lineClassName:s,completedVariant:l,completedIcon:c};return(0,ee.jsx)(r.Fragment,{children:r.isValidElement(i)?r.cloneElement(i,u):i},a)});return(0,ee.jsx)("div",{className:qe("flex w-full",a,"inline"===n?"items-center justify-between":""),...u,children:p})},xj=({labelText:e="",icon:t=(0,ee.jsx)(fj,{}),isCurrent:n,isCompleted:r,className:o,type:i,variant:a,sizeClasses:s,size:l,isLast:c,index:u,lineClassName:d,completedVariant:p="icon",completedIcon:m=(0,ee.jsx)(ct,{}),...f})=>{const g=vj(a,r,n,s,l,t,u,p,m),h={lg:"left-[calc(50%+14px)] right-[calc(-50%+14px)]",md:"left-[calc(50%+12px)] right-[calc(-50%+12px)]",sm:"left-[calc(50%+10px)] right-[calc(-50%+10px)]"},y={lg:"top-3.5",md:"top-3",sm:"top-2.5"},x=()=>{if(e){const t=qe(s[l].label,"text-text-tertiary",n?"text-brand-primary-600":"","break-word","stack"===i?"mt-2 transform max-w-xs":"mx-2 max-w-32");return(0,ee.jsx)("span",{className:t,children:e})}return null},v=()=>{if(!c){const t=qe("block",r?"border-brand-primary-600":"border-border-subtle",d);return"stack"===i?(0,ee.jsx)("div",{className:qe("relative","flex","border-solid","border-y","absolute",r?"border-brand-primary-600":"border-border-subtle",y[l],h[l]),children:(0,ee.jsx)("span",{className:"block"})}):(0,ee.jsx)("div",{className:"flex-1",children:(0,ee.jsx)("span",{className:qe("mr-2 border-y border-solid",!e&&"ml-2",t)})})}return null};return"stack"===i?(0,ee.jsxs)("div",{className:"relative flex-1 justify-center",children:[(0,ee.jsxs)("div",{className:qe("flex items-center flex-col",o),...f,children:[g,x()]}),v()]}):(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)("div",{className:qe("flex items-center",o),...f,children:[g,x()]}),v()]})};xj.displayName="ProgressSteps.Step";const vj=(e,t,n,r,o,i,a,s="icon",l=(0,ee.jsx)(ct,{}))=>{if(t)return"number"===s?(0,ee.jsx)("span",{className:qe(gj(r,o),"flex items-center justify-center bg-brand-primary-600 text-text-on-color rounded-full"),children:a+1}):(0,ee.jsx)("span",{className:gj(r,o),children:l});const c=((e,t,n)=>qe("relative flex items-center rounded-full justify-center transition-colors z-10 duration-500 ring-1",e?"ring-brand-primary-600":"ring-border-subtle",t[n].ring))(!!n,r,o),u=((e,t,n,r)=>{const o=`absolute rounded-full transition-colors duration-500 ${n[r].dot}`;return"dot"===e?qe(o,n[r].dot,t?"bg-brand-primary-600":"bg-text-tertiary"):"number"===e?qe(o,n[r].dot,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):"icon"===e?qe(o,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):""})(e,n,r,o);let d=null;return"number"===e?d=a+1:"icon"===e&&i&&(d=i),(0,ee.jsx)("span",{className:c,children:(0,ee.jsx)("span",{className:u,children:d})})};yj.Step=xj;const bj=({heading:e,subHeading:t})=>(0,r.createElement)("div",{className:"p-[8px]"},(0,r.createElement)(ut,{className:"text-3xl font-semibold text-text-primary",size:"md"},e),(0,r.createElement)(ut,{className:"text-[#566A86] mt-2"},t));o.dn(bj);const Mj=(0,r.createContext)(null),wj=()=>{const e=(0,r.useContext)(Mj);if(!e)throw new Error("useOnboardingContext must be used within an OnboardingContextProvider");return e},Nj=({children:e,value:t})=>(0,r.createElement)(Mj.Provider,{value:t},e),Ej=({labels:e})=>{const{handleStepCount:t}=wj(),{increaseStep:n,decreaseStep:o,skipStep:i}=t();return(0,r.createElement)("div",{className:"flex justify-between"},null!==e?.back&&(0,r.createElement)(Jt,{icon:Pj("chevronLeft"),onClick:o,variant:"outline"},e?.back||(0,Xc.__)("Back","power-coupons")),(0,r.createElement)("div",{className:"flex gap-[12px]"},null!==e?.skip&&(0,r.createElement)(Jt,{onClick:i,variant:"ghost",className:"text-text-tertiary hover:text-text-primary"},e?.skip||(0,Xc.__)("Skip","power-coupons")),null!==e?.next&&(0,r.createElement)(Jt,{icon:Pj("chevronRight"),iconPosition:"right",onClick:n,variant:"primary",className:"p-[10px] w-max bg-wpcolor hover:bg-wphovercolor rounded-md box-content outline-0 hover:outline-0 focus:ring-0 focus-visible:ring-1 ring-black"},e?.next||(0,Xc.__)("Next","power-coupons"))))};o.dn(Ej);const jj=({children:e,className:t})=>(0,r.createElement)("div",{className:`!mt-0 p-[8px] ${t||""}`},e);o.dn(jj);const Dj=[(0,Xc.__)("Display available coupons beautifully on cart and checkout pages.","power-coupons"),(0,Xc.__)("Let customers apply coupons with a single click — no copy-pasting needed.","power-coupons"),(0,Xc.__)("Auto-apply coupons based on smart rules and conditions.","power-coupons"),(0,Xc.__)("Create BOGO offers to boost average order value.","power-coupons"),(0,Xc.__)("Customize coupon styles, colors, and text to match your brand.","power-coupons")],Tj=({title:e,description:t,value:n,onChange:o})=>(0,r.createElement)("section",{className:"py-6 border-0 border-b border-solid border-border-subtle last:border-b-0"},(0,r.createElement)("div",{className:"flex items-center justify-between"},(0,r.createElement)("div",null,(0,r.createElement)(ut,{className:"flex items-center gap-0.5 text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5 text-field-label [&>*]:text-field-label font-medium mb-1"},e),(0,r.createElement)("p",{className:"font-normal text-sm text-text-field-helper m-0 text-[#566A86]"},t)),(0,r.createElement)(Wt,{size:"md",value:n,onChange:o,className:"[&>input]:!border-none"}))),Ij=({title:e,value:t,onChange:n})=>(0,r.createElement)("div",{className:"w-full"},(0,r.createElement)(ut,{tag:"p",className:"text-[#566A86] mt-2"},e),(0,r.createElement)(cv,{size:"md",value:t,onChange:n})),kj=({plugin:e})=>(0,r.createElement)("div",{className:"p-2 gap-1 items-center bg-background-primary rounded-md shadow-soft-shadow-inner"},(0,r.createElement)(Ft,{align:"start",className:"gap-1 p-1",containerType:"flex",justify:"between"},(0,r.createElement)(Ft.Item,{className:"flex items-start gap-[12px]"},(0,r.createElement)("img",{width:24,src:e.logo,alt:e.name}),(0,r.createElement)("div",{className:"flex flex-col gap-[2px]"},(0,r.createElement)("strong",{className:"text-[#111827] font-[400] text-[16px] line-[24px]"},e.name),(0,r.createElement)("p",{className:"m-0 text-[#566A86] font-[400] text-[14px] line-[20px]"},e.description))),(0,r.createElement)(Ft.Item,{className:"flex"},(0,r.createElement)(dt,{size:"sm",checked:e.checked,onChange:e.onChange})))),Oj=o.p+"images/cartflows.b43bbec0.gif",_j=o.p+"images/wcar.95c1ba50.gif",Cj=o.p+"images/sureforms.652dad18.gif",Aj=o.p+"images/surerank.5134afe8.jpg",Sj=[()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(bj,{heading:(0,Xc.__)("Welcome to Power Coupons","power-coupons"),subHeading:(0,Xc.__)("Supercharge your WooCommerce store with powerful, flexible discount features!","power-coupons")}),(0,r.createElement)(jj,null,(0,r.createElement)("iframe",{className:"w-full aspect-video rounded-lg",src:"https://www.youtube.com/embed/Uj6ZMyXoLug?autoplay=1&mute=1",title:(0,Xc.__)("Power Coupons YouTube Video","power-coupons"),frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}),(0,r.createElement)("ul",{className:"divide-y divide-gray-200 list-none pl-0 space-y-2"},Dj.map((e,t)=>(0,r.createElement)("li",{key:e+t,className:"flex items-center space-x-2 text-field-label text-sm font-medium"},Pj("check"),(0,r.createElement)("span",{className:"text-[#566A86]"},e))))),(0,r.createElement)(Ej,{labels:{next:(0,Xc.__)("Let's Get Started","power-coupons"),skip:null,back:null}})),()=>{const{currentScreenData:e,handleData:t}=wj(),n=window.powerCouponsSettings.coupon_templates;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(bj,{heading:(0,Xc.__)("Configure Your Coupons","power-coupons"),subHeading:(0,Xc.__)("Set up coupon settings to match your store's needs in just a few clicks.","power-coupons")}),(0,r.createElement)(jj,null,(0,r.createElement)("section",{className:"py-6 border-0 border-b border-solid border-border-subtle"},(0,r.createElement)(ut,{className:"flex items-center gap-0.5 text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5 text-field-label [&>*]:text-field-label font-medium mb-1"},(0,Xc.__)("Choose Coupon Styling","power-coupons")),(0,r.createElement)("p",{className:"font-normal text-sm text-text-field-helper m-0 text-[#566A86]"},(0,Xc.__)("Select a visual style for how coupons will appear to your customers.","power-coupons")),(0,r.createElement)("div",{className:"mt-[8px]"},(0,r.createElement)(wv.Group,{columns:Object.keys(n).length,onChange:e=>t("coupon_style",e),size:"md",value:e.coupon_style||"style-1"},(0,r.createElement)("div",{className:"flex gap-6"},Object.keys(n).map(e=>(0,r.createElement)("div",{key:e,className:"flex gap-[26px]"},(0,r.createElement)("button",{onClick:()=>t("coupon_style",e),className:"bg-transparent border-0 p-0 m-0 cursor-pointer power-coupons-coupon-style-btn",style:{direction:"ltr"},type:"button"},Ff(n[e]),(0,r.createElement)(wv.Button,{value:e})))))))),(0,r.createElement)(Tj,{title:(0,Xc.__)("Show Coupons on Cart","power-coupons"),description:(0,Xc.__)("Display available coupons on the cart page so customers can easily apply discounts.","power-coupons"),value:e.show_on_cart,onChange:e=>t("show_on_cart",e)}),(0,r.createElement)(Tj,{title:(0,Xc.__)("Show Coupons on Checkout","power-coupons"),description:(0,Xc.__)("Display available coupons on the checkout page to boost conversions.","power-coupons"),value:e.show_on_checkout,onChange:e=>t("show_on_checkout",e)}),(0,r.createElement)(Tj,{title:(0,Xc.__)("Enable for Guest Users","power-coupons"),description:(0,Xc.__)("Allow guest users (not logged in) to see and use available coupons.","power-coupons"),value:e.enable_for_guests,onChange:e=>t("enable_for_guests",e)})),(0,r.createElement)(Ej,null))},()=>{const{currentScreenData:e,handleData:t}=wj();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(bj,{heading:(0,Xc.__)("Okay, Just One Last Step…","power-coupons"),subHeading:(0,Xc.__)("Subscribe to get the latest updates, tips, and features.","power-coupons")}),(0,r.createElement)(jj,{className:"flex flex-col gap-[24px]"},(0,r.createElement)("div",{className:"flex justify-between gap-[16px]"},(0,r.createElement)(Ij,{title:(0,Xc.__)("First Name","power-coupons"),value:e.user_detail_firstname,onChange:e=>t("user_detail_firstname",e)}),(0,r.createElement)(Ij,{title:(0,Xc.__)("Last Name","power-coupons"),value:e.user_detail_lastname,onChange:e=>t("user_detail_lastname",e)})),(0,r.createElement)(Ij,{title:(0,Xc.__)("Your Email","power-coupons"),value:e.user_detail_email,onChange:e=>t("user_detail_email",e)}),(0,r.createElement)("div",{className:"mt-[24px]"},(0,r.createElement)(dt,{size:"sm",checked:!!e.optin_usage_tracking,onChange:e=>t("optin_usage_tracking",e),label:{heading:(0,r.createElement)("span",null,(0,Xc.__)("Allow Power Coupons to track non-sensitive usage tracking data.","power-coupons")," ",(0,r.createElement)("a",{className:"text-wpcolor hover:text-wphovercolor no-underline",target:"_blank",href:"https://store.brainstormforce.com/usage-tracking/?utm_source=dashboard&utm_medium=power-coupons&utm_campaign=docs",rel:"noreferrer"},(0,Xc.__)("Learn More","power-coupons")))}}))),(0,r.createElement)(Ej,null))},()=>{const{currentScreenData:e,handleData:t}=wj();return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(bj,{heading:(0,Xc.__)("Add More Power to Your Website","power-coupons"),subHeading:(0,Xc.__)("These tools can help you build your website faster and easier. Try them out and see how they can help your website grow.","power-coupons")}),(0,r.createElement)(jj,null,(0,r.createElement)(Ft.Item,{className:"flex flex-col md:w-full lg:w-full bg-field-primary-background gap-1 p-1 rounded-lg"},Lj.map((n,o)=>(0,r.createElement)(kj,{key:o,plugin:{...n,checked:e[n.slug],onChange:e=>t(n.slug,e)}})))),(0,r.createElement)(Ej,null))},()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)(bj,{heading:(0,Xc.__)("You're Good to Go! 🚀","power-coupons"),subHeading:(0,Xc.__)("Great job! 🎉 With Power Coupons active, your store is ready to deliver smart discounts that keep customers happy and drive more revenue.","power-coupons")}),(0,r.createElement)(jj,{className:"flex flex-col gap-[24px]"},(0,r.createElement)("strong",null,(0,Xc.__)("Here's What Power Coupons Will Do for You Now:","power-coupons")),(0,r.createElement)("ul",{className:"list-none pl-0 m-0 space-y-3"},(0,r.createElement)("li",{className:"flex items-start gap-2 text-field-label text-sm font-medium leading-6"},(0,r.createElement)("span",{className:"shrink-0 mt-1.5"},Pj("check")),(0,r.createElement)("span",null,(0,r.createElement)("strong",null,(0,Xc.__)("Effortless discounts:","power-coupons"))," ",(0,Xc.__)("Customers see and apply coupons with a single click.","power-coupons"))),(0,r.createElement)("li",{className:"flex items-start gap-2 text-field-label text-sm font-medium leading-6"},(0,r.createElement)("span",{className:"shrink-0 mt-1.5"},Pj("check")),(0,r.createElement)("span",null,(0,r.createElement)("strong",null,(0,Xc.__)("Higher conversions:","power-coupons"))," ",(0,Xc.__)("Smart coupon display encourages customers to complete their purchase.","power-coupons"))),(0,r.createElement)("li",{className:"flex items-start gap-2 text-field-label text-sm font-medium leading-6"},(0,r.createElement)("span",{className:"shrink-0 mt-1.5"},Pj("check")),(0,r.createElement)("span",null,(0,r.createElement)("strong",null,(0,Xc.__)("Peace of mind:","power-coupons"))," ",(0,Xc.__)("Automated coupon rules work in the background so you can focus on growing your business.","power-coupons"))))),(0,r.createElement)("div",{className:"flex flex-col gap-[12px]"},(0,r.createElement)(Jt,{className:"px-4 bg-wpcolor hover:bg-wphovercolor rounded-md box-content outline-0 hover:outline-0 focus:ring-0 focus-visible:ring-1 ring-black",onClick:Rj,variant:"primary"},(0,Xc.__)("Go To Dashboard","power-coupons")),(0,r.createElement)(Jt,{className:"text-text-tertiary hover:text-text-primary",onClick:()=>window.location.href="admin.php?page=power_coupons_settings&path=settings",variant:"ghost"},(0,Xc.__)("View coupon settings","power-coupons"))))],Lj=[{name:"CartFlows",description:(0,Xc.__)("Create beautiful checkout pages & sales funnels for WooCommerce.","power-coupons"),slug:"cartflows",logo:Oj},{name:"Modern Cart",description:(0,Xc.__)("Add a sleek side cart and free shipping bar to keep shoppers buying.","power-coupons"),slug:"modern-cart",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUwIiBoZWlnaHQ9IjI1MyIgdmlld0JveD0iMCAwIDI1MCAyNTMiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik00My4zODAyIDk0LjAzMjFINi4xMDM1MmUtMDVWMTA1LjgxN0gyOC4zMzUxQzMwLjk0MjkgMTU5Ljk4IDY4LjM3MTggMTkzLjkxNSA4Ni43NjAzIDIwNC4xMTJDMTA1LjQxNiAxOTcuNjkzIDExNi4yNjYgMjExLjEzMyAxMTkuMzU4IDIxOC42NTZDMTI5Ljk5IDIyMy44NzIgMTUyLjA0IDIyMy41MDQgMTYxLjczNSAyMjIuNjY4QzE3My4wMTkgMjAyLjM1NyAxOTIuMzI3IDIwNy42MjMgMTk4LjM0NSAyMTIuMTM2QzIyMy44MjIgMTk5LjkgMjM4LjU0OSAxODIuNjMxIDI0Mi43MjggMTc1LjUyN0wyMzQuMjAzIDE2NS40OTZDMTg3LjQ2MiAyMjIuNjY4IDEyNi42MyAyMTAuNTQ4IDEwMi4wNTYgMTk3LjM0MkM1MC4xMDA0IDE3My4yNyA0MS4yOTA2IDExOC40MzkgNDMuMzgwMiA5NC4wMzIxWiIgZmlsbD0iI0VFNUEyRiIvPgo8Y2lyY2xlIGN4PSIxNDguMTk1IiBjeT0iMTAxLjgwNSIgcj0iMTAxLjgwNSIgZmlsbD0iI0VFNUEyRiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTk1Ljc4NzEgMjQ3LjI0MkMxMDcuMDA1IDI0Ny4yNDIgMTE2LjA5OCAyMzguMTQ4IDExNi4wOTggMjI2LjkzMUMxMTYuMDk4IDIxNS43MTMgMTA3LjAwNSAyMDYuNjIgOTUuNzg3MSAyMDYuNjJDODQuNTY5NyAyMDYuNjIgNzUuNDc2MiAyMTUuNzEzIDc1LjQ3NjIgMjI2LjkzMUM3NS40NzYyIDIzOC4xNDggODQuNTY5NyAyNDcuMjQyIDk1Ljc4NzEgMjQ3LjI0MlpNOTUuNzg3MiAyMzIuNjk4Qzk4Ljk3MjMgMjMyLjY5OCAxMDEuNTU0IDIzMC4xMTYgMTAxLjU1NCAyMjYuOTMxQzEwMS41NTQgMjIzLjc0NiA5OC45NzIzIDIyMS4xNjQgOTUuNzg3MiAyMjEuMTY0QzkyLjYwMiAyMjEuMTY0IDkwLjAxOTkgMjIzLjc0NiA5MC4wMTk5IDIyNi45MzFDOTAuMDE5OSAyMzAuMTE2IDkyLjYwMiAyMzIuNjk4IDk1Ljc4NzIgMjMyLjY5OFoiIGZpbGw9IiNFRTVBMkYiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xODQuODA1IDI1Mi43NThDMTk2LjAyMiAyNTIuNzU4IDIwNS4xMTYgMjQzLjY2NSAyMDUuMTE2IDIzMi40NDdDMjA1LjExNiAyMjEuMjMgMTk2LjAyMiAyMTIuMTM2IDE4NC44MDUgMjEyLjEzNkMxNzMuNTg3IDIxMi4xMzYgMTY0LjQ5NCAyMjEuMjMgMTY0LjQ5NCAyMzIuNDQ3QzE2NC40OTQgMjQzLjY2NSAxNzMuNTg3IDI1Mi43NTggMTg0LjgwNSAyNTIuNzU4Wk0xODQuODA1IDIzOC4yMTVDMTg3Ljk5IDIzOC4yMTUgMTkwLjU3MiAyMzUuNjMzIDE5MC41NzIgMjMyLjQ0N0MxOTAuNTcyIDIyOS4yNjIgMTg3Ljk5IDIyNi42OCAxODQuODA1IDIyNi42OEMxODEuNjE5IDIyNi42OCAxNzkuMDM3IDIyOS4yNjIgMTc5LjAzNyAyMzIuNDQ3QzE3OS4wMzcgMjM1LjYzMyAxODEuNjE5IDIzOC4yMTUgMTg0LjgwNSAyMzguMjE1WiIgZmlsbD0iI0VFNUEyRiIvPgo8cGF0aCBkPSJNMTA5LjkwNiA2Ni45MDA5TDc5LjIzNzUgMTQyLjQxSDk4Ljk3OEwxMjMuMTk1IDg1LjUyMjRMMTM2LjA3NiAxMDUuMTY3TDE0Ni4yOTggODguNTkxOUwxMzAuMTQ3IDY0Ljg1NDVDMTIxLjE1MSA1Mi4zNzIgMTEyLjM1OSA1OS45NDM0IDEwOS45MDYgNjYuOTAwOVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0xMzIuMTkxIDEyMi45N0wxMjAuOTQ2IDEwOC4yMzdMMTEyLjc2OCAxMjguNDk1TDEyMS43NjQgMTM4LjMxOEMxMjcuODk4IDE0Ni41MDMgMTM3LjA5OCAxNDYuMDk0IDE0MC45ODMgMTM5LjM0MUwxODcuMTg5IDY2LjkwMDlDMTgwLjgxIDUzLjgwNDQgMTcxLjAzNyA1OC43MTU2IDE2Ny41NjIgNjQuODU0NUwxMzIuMTkxIDEyMi45N1oiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0yMTcuNjUzIDE0Mi40MUwxOTAuMjU2IDczLjI0NDVMMTc3LjM3NSA5My4yOTg0TDE5Ny4yMDcgMTQyLjQxSDIxNy42NTNaIiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB4PSIzLjI1OTk1IiB5PSIxMTAuMzMxIiB3aWR0aD0iMjMuNTcwNyIgaGVpZ2h0PSI0LjUxMzU0IiBmaWxsPSIjRUU1QTJGIi8+CjxyZWN0IHg9IjguMjc0NzIiIHk9IjExOS4zNTgiIHdpZHRoPSIxOC41NTU3IiBoZWlnaHQ9IjQuNTEzNTQiIGZpbGw9IiNFRTVBMkYiLz4KPC9zdmc+Cg=="},{name:"Cart Abandonment Recovery",description:(0,Xc.__)("Start recovering lost revenue with ease in less than 10 minutes.","power-coupons"),slug:"woo-cart-abandonment-recovery",logo:_j},{name:"SureForms",description:(0,Xc.__)("Create forms that feel like a chat. One question at a time keeps users engaged.","power-coupons"),slug:"sureforms",logo:Cj},{name:"SureRank",description:(0,Xc.__)("Just a simple, lightweight SEO assistant that helps your site rise in the rankings.","power-coupons"),slug:"surerank",logo:Aj}],zj={check:'<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 3.00098L4.5 8.50098L2 6.00098" stroke="#566A86" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/></svg>',close:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 4L4 12" stroke="#111827" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" /><path d="M4 4L12 12" stroke="#111827" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" /></svg>',chevronLeft:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.5 15.001L7.5 10.001L12.5 5.00098" stroke="#111827" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/></svg>',chevronRight:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.5 15.001L12.5 10.001L7.5 5.00098" stroke="white" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/></svg>'},Pj=e=>Ff(zj[e]),Rj=()=>{window.location.href="admin.php?page=power_coupons_settings"},Yj=()=>{const[e,t]=(0,r.useState)(window.powerCouponsSettings.onboarding.defaults),[n,o]=(0,r.useState)(0),[i,a]=(0,r.useState)(!1),s=Sj[n],l=e?.[n]||{},c=()=>({increaseStep:()=>o(n+1),decreaseStep:()=>o(n-1),skipStep:()=>{u("hasSkipped",!0),c().increaseStep()}}),u=(e,r)=>{t(t=>({...t,[n]:{...t[n]||{},[e]:r}}))};return(0,r.useEffect)(()=>{n===Sj.length-1&&(a(!0),cb()({url:window.powerCouponsSettings.onboarding.ajaxUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(()=>{a(!1)}).catch(()=>{a(!1)}))},[n,e]),(0,r.createElement)(Nj,{value:{handleData:u,handleStepCount:c,currentScreenData:l}},(0,r.createElement)("div",{className:"bg-background-secondary w-full pb-10"},(0,r.createElement)(au,{className:"bg-background-secondary"},(0,r.createElement)(au.Left,null,(0,r.createElement)(au.Item,null,(0,r.createElement)("img",{alt:(0,Xc.__)("Power Coupons Logo","power-coupons"),className:"w-[30px]",src:pu}))),(0,r.createElement)(au.Middle,null,(0,r.createElement)(au.Item,{className:"w-[12rem]"},(0,r.createElement)(yj,{size:"md",variant:"number",currentStep:n+1,completedVariant:"number"},Sj.slice(0,-1).map((e,t)=>(0,r.createElement)(yj.Step,{key:t}))))),(0,r.createElement)(au.Right,null,(0,r.createElement)(au.Item,null,(0,r.createElement)(Jt,{icon:Pj("close"),iconPosition:"right",size:"xs",onClick:()=>{const e=window.powerCouponsSettings.onboarding.skipUrl;e?cb()({url:e,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({exit_step:["welcome","configure","user-details","recommend-plugins","final"][n]||"unknown"})}).finally(()=>{Rj()}):Rj()},variant:"ghost"},(0,Xc.__)("Exit Guided Setup","power-coupons"))))),(0,r.createElement)("div",{className:"md:w-[718px] box-border mx-auto p-[24px] mt-[24px] border border-solid border-border-subtle bg-background-primary rounded-xl shadow-sm space-y-6"},i&&(0,r.createElement)("div",{className:"absolute inset-0 bg-white opacity-50 z-50 flex items-center justify-center"},(0,r.createElement)(kv,{className:"",icon:null,size:"lg",variant:"primary"})),(0,r.createElement)(s,null))))},Qj=document.getElementById("power-coupons-settings");(0,s.H)(Qj).render((0,r.createElement)(()=>(0,r.createElement)(Q,null,(0,r.createElement)(J,{initialState:Z,reducer:q},window.powerCouponsSettings.onboarding?.inProgress?(0,r.createElement)(Yj,null):(0,r.createElement)(mj,null))),null))})()})();

Youez - 2016 - github.com/yon3zu
LinuXploit