OwlCyberSecurity - MANAGER
Edit File: extendify-help-center-debbb074b5146b9e4d81.js
(()=>{var e,t,n={960:(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},915:function(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(960),s=n(790);o(n(790),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.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 s.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 s.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 s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.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 s.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},790:function(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 s=n(960),a=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),E(this,e)},e}();t.Node=a;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}(a);t.DataNode=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.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=s.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=s.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 h=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}(a);t.NodeWithChildren=h;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(h);t.CDATA=p;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=s.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(h);t.Document=m;var f=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.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}(h);function g(e){return(0,s.isTag)(e)}function y(e){return e.type===s.ElementType.CDATA}function v(e){return e.type===s.ElementType.Text}function x(e){return e.type===s.ElementType.Comment}function w(e){return e.type===s.ElementType.Directive}function b(e){return e.type===s.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new c(e.data);else if(x(e))n=new u(e.data);else if(g(e)){var r=t?S(e.children):[],o=new f(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?S(e.children):[];var s=new p(r);r.forEach((function(e){return e.parent=s})),n=s}else if(b(e)){r=t?S(e.children):[];var a=new m(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!w(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 S(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=f,t.isTag=g,t.isCDATA=y,t.isText=v,t.isComment=x,t.isDirective=w,t.isDocument=b,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=E},885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),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}),{})},276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,d=e.match(i),h=d&&d[1]?d[1].toLowerCase():"";switch(h){case n:var m=c(e);return s.test(e)||null===(t=null==(g=m.querySelector(r))?void 0:g.parentNode)||void 0===t||t.removeChild(g),a.test(e)||null===(u=null==(g=m.querySelector(o))?void 0:g.parentNode)||void 0===u||u.removeChild(g),m.querySelectorAll(n);case r:case o:var f=l(e).querySelectorAll(h);return a.test(e)&&s.test(e)?f[0].parentNode.childNodes:f;default:return p?p(e):(g=l(e,o).querySelector(o)).childNodes;var g}};var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,s=/<head[^]*>/i,a=/<body[^]*>/i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var h=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=h.documentElement.querySelector(t);return n&&(n.innerHTML=e),h}return h.documentElement.innerHTML=e,h}}var p,m="object"==typeof document&&document.createElement("template");m&&m.content&&(p=function(e){return m.innerHTML=e,m.content.childNodes})},152:function(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(s),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)};var o=r(n(276)),i=n(507),s=/<(![a-zA-Z\s]+)>/},507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var a,l=[],c=0,u=t.length;c<u;c++){var d=t[c];switch(d.nodeType){case 1:var h=s(d.nodeName);(a=new r.Element(h,i(d.attributes))).children=e("template"===h?d.content.childNodes:d.childNodes,a);break;case 3:a=new r.Text(d.nodeValue);break;case 8:a=new r.Comment(d.nodeValue);break;default:continue}var p=l[c-1]||null;p&&(p.next=a),a.parent=n,a.prev=p,a.next=null,l.push(a)}return o&&((a=new r.ProcessingInstruction(o.substring(0,o.indexOf(" ")).toLowerCase(),o)).next=l[0]||null,a.parent=n,l.unshift(a),l[1]&&(l[1].prev=l[0])),l};var r=n(915),o=n(885);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 s(e){return function(e){return o.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase())||e}},484:(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&&a[e.type]);for(var u in e){var d=e[u];if((0,r.isCustomAttribute)(u))n[u]=d;else{var h=u.toLowerCase(),p=l(h);if(p){var m=(0,r.getPropertyInfo)(p);switch(i.includes(p)&&s.includes(t)&&!c&&(p=l("default"+h)),n[p]=d,m&&m.type){case r.BOOLEAN:n[p]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[p]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,o.setStyleProp)(e.style,n),n};var r=n(726),o=n(606),i=["checked","value"],s=["input","select","textarea"],a={reset:!0,submit:!0};function l(e){return r.possibleStandardNames[e]}},670:function(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||s.returnFirstArg,u=n.library||a,d=u.cloneElement,h=u.createElement,p=u.isValidElement,m=t.length,f=0;f<m;f++){var g=t[f];if(o){var y=n.replace(g,f);if(p(y)){m>1&&(y=d(y,{key:y.key||f})),r.push(c(y,g,f));continue}}if("text"!==g.type){var v=g,x={};l(v)?((0,s.setStyleProp)(v.attribs.style,v.attribs),x=v.attribs):v.attribs&&(x=(0,i.default)(v.attribs,v.name));var w=void 0;switch(g.type){case"script":case"style":g.children[0]&&(x.dangerouslySetInnerHTML={__html:g.children[0].data});break;case"tag":"textarea"===g.name&&g.children[0]?x.defaultValue=g.children[0].data:g.children&&g.children.length&&(w=e(g.children,n));break;default:continue}m>1&&(x.key=f),r.push(c(h(g.name,x,w),g,f))}else{var b=!g.data.trim().length;if(b&&g.parent&&!(0,s.canTextBeChildOfNode)(g.parent))continue;if(n.trim&&b)continue;r.push(c(g.data,g,f))}}return 1===r.length?r[0]:r};var o=n(196),i=r(n(484)),s=n(606),a={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function l(e){return s.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,s.isCustomComponent)(e.name,e.attribs)}},426:function(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,s.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]};var o=r(n(152));t.htmlToDOM=o.default;var i=r(n(484));t.attributesToProps=i.default;var s=r(n(670));t.domToReact=s.default;var a=n(915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var l={lowerCaseAttributeNames:!1}},606:function(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("-")?!s.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,a)}catch(e){t.style={}}else t.style={}};var o=n(196),i=r(n(476)),s=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),a={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}},370:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\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,h=1;function p(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");h=~r?e.length-r:h+e.length}function m(){var e={line:d,column:h};return function(t){return t.position=new f(e),x(),t}}function f(e){this.start=e,this.end={line:d,column:h},this.source=l.source}f.prototype.content=e;var g=[];function y(t){var n=new Error(l.source+":"+d+":"+h+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=h,n.source=e,!l.silent)throw n;g.push(n)}function v(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function x(){v(r)}function w(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=m();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 y("End of comment missing");var r=e.slice(2,n-2);return h+=2,p(r),e=e.slice(n),h+=2,t({type:"comment",comment:r})}}function E(){var e=m(),n=v(o);if(n){if(b(),!v(i))return y("property missing ':'");var r=v(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return v(a),l}}return x(),function(){var e,t=[];for(w(t);e=E();)!1!==e&&(t.push(e),w(t));return t}()}},726:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,s){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=s}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,s=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,s);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,s);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,s);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:a,SAME:l,possibleStandardNames:c}=n(229),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===a?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},229:(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}},251:(e,t,n)=>{"use strict";var r=n(196),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=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)s.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:a.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},893:(e,t,n)=>{"use strict";e.exports=n(251)},476:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(174)),o=n(678);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},678:(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)-/,s=/^-(ms)-/,a=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(s,l):e.replace(i,l)).replace(r,a))}},174:function(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});var o=r(n(370));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,o.default)(e),i="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}})),n}},250:(e,t,n)=>{"use strict";var r=n(196),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.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return a((function(){o.value=n,o.getSnapshot=t,c(o)&&u({inst:o})}),[e,n,t]),s((function(){return c(o)&&u({inst:o}),e((function(){c(o)&&u({inst:o})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},139:(e,t,n)=>{"use strict";var r=n(196),o=n(688),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=o.useSyncExternalStore,a=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=a(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=c((function(){function e(e){if(!l){if(l=!0,s=e,e=r(e),void 0!==o&&h.hasValue){var t=h.value;if(o(t,e))return a=t}return a=e}if(t=a,i(s,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(s=e,a=n)}var s,a,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,o]);var p=s(e,d[0],d[1]);return l((function(){h.hasValue=!0,h.value=p}),[p]),u(p),p}},688:(e,t,n)=>{"use strict";e.exports=n(250)},798:(e,t,n)=>{"use strict";e.exports=n(139)},196:e=>{"use strict";e.exports=window.React},967:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=s(t,n));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e].call(i.exports,i,i.exports,o),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 s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>s[e]=()=>n[e]));return s.default=()=>n,o.d(i,s),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})},(()=>{"use strict";var e=o(196),t=o.t(e,2);const n=window.wp.domReady;var r=o.n(n);const i=window.wp.element;var s=o(893);const a=(0,e.createContext)(null);function l(t){const n=(0,e.useRef)(null);return null===n.current&&(n.current=t()),n.current}const c=(0,e.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class u extends e.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 d({children:t,isPresent:n}){const r=(0,e.useId)(),o=(0,e.useRef)(null),i=(0,e.useRef)({width:0,height:0,top:0,left:0}),{nonce:a}=(0,e.useContext)(c);return(0,e.useInsertionEffect)((()=>{const{width:e,height:t,top:s,left:l}=i.current;if(n||!o.current||!e||!t)return;o.current.dataset.motionPopId=r;const c=document.createElement("style");return a&&(c.nonce=a),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${r}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n top: ${s}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(c)}}),[n]),(0,s.jsx)(u,{isPresent:n,childRef:o,sizeRef:i,children:e.cloneElement(t,{ref:o})})}const h=({children:t,initial:n,isPresent:r,onExitComplete:o,custom:i,presenceAffectsLayout:c,mode:u})=>{const h=l(p),m=(0,e.useId)(),f=(0,e.useMemo)((()=>({id:m,initial:n,isPresent:r,custom:i,onExitComplete:e=>{h.set(e,!0);for(const e of h.values())if(!e)return;o&&o()},register:e=>(h.set(e,!1),()=>h.delete(e))})),c?[Math.random()]:[r]);return(0,e.useMemo)((()=>{h.forEach(((e,t)=>h.set(t,!1)))}),[r]),e.useEffect((()=>{!r&&!h.size&&o&&o()}),[r]),"popLayout"===u&&(t=(0,s.jsx)(d,{isPresent:r,children:t})),(0,s.jsx)(a.Provider,{value:f,children:t})};function p(){return new Map}const m=(0,e.createContext)({}),f=e=>e;let g=f,y=f;const v=e=>e.key||"";function x(t){const n=[];return e.Children.forEach(t,(t=>{(0,e.isValidElement)(t)&&n.push(t)})),n}const w="undefined"!=typeof window,b=w?e.useLayoutEffect:e.useEffect,E=({children:t,exitBeforeEnter:n,custom:r,initial:o=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:c="sync"})=>{y(!n,"Replace exitBeforeEnter with mode='wait'");const u=(0,e.useMemo)((()=>x(t)),[t]),d=u.map(v),p=(0,e.useRef)(!0),f=(0,e.useRef)(u),g=l((()=>new Map)),[w,E]=(0,e.useState)(u),[S,T]=(0,e.useState)(u);b((()=>{p.current=!1,f.current=u;for(let e=0;e<S.length;e++){const t=v(S[e]);d.includes(t)?g.delete(t):!0!==g.get(t)&&g.set(t,!1)}}),[S,d.length,d.join("-")]);const C=[];if(u!==w){let e=[...u];for(let t=0;t<S.length;t++){const n=S[t],r=v(n);d.includes(r)||(e.splice(t,0,n),C.push(n))}return"wait"===c&&C.length&&(e=C),T(x(e)),void E(u)}const{forceRender:P}=(0,e.useContext)(m);return(0,s.jsx)(s.Fragment,{children:S.map((e=>{const t=v(e),n=u===S||d.includes(t);return(0,s.jsx)(h,{isPresent:n,initial:!(p.current&&!o)&&void 0,custom:n?void 0:r,presenceAffectsLayout:a,mode:c,onExitComplete:n?void 0:()=>{if(!g.has(t))return;g.set(t,!0);let e=!0;g.forEach((t=>{t||(e=!1)})),e&&(null==P||P(),T(f.current),i&&i())},children:e},t)}))})},S=window.wp.i18n;var T=(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))(T||{}),C=Object.defineProperty,P=(e,t,n)=>(((e,t,n)=>{t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let k=new class{constructor(){P(this,"current",this.detect()),P(this,"handoffState","pending"),P(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}},A=(t,n)=>{k.isServer?(0,e.useEffect)(t,n):(0,e.useLayoutEffect)(t,n)};function _(t){let n=(0,e.useRef)(t);return A((()=>{n.current=t}),[t]),n}function L(t,n,r,o){let i=_(r);(0,e.useEffect)((()=>{function e(e){i.current(e)}return(t=null!=t?t:window).addEventListener(n,e,o),()=>t.removeEventListener(n,e,o)}),[t,n,o])}class D extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}}function M(e,t){let n=e(),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())))}}}function N(t){return(0,e.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getSnapshot)}let O=new D((()=>M((()=>[]),{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(-1===t)return this;let n=this.slice();return n.splice(t,1),n}})));function R(t,n){let r=O.get(n),o=(0,e.useId)(),i=N(r);if(A((()=>{if(t)return r.dispatch("ADD",o),()=>r.dispatch("REMOVE",o)}),[r,t]),!t)return!1;let s=i.indexOf(o),a=i.length;return-1===s&&(s=a,a+=1),s===a-1}let V=function(t){let n=_(t);return e.useCallback(((...e)=>n.current(...e)),[n])};function F(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function j(){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 F((()=>{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=j();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 I(e){return k.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let B=new Map,H=new Map;function z(e){var t;let n=null!=(t=H.get(e))?t:0;return H.set(e,n+1),0!==n||(B.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=B.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,B.delete(e))}(e)}function U(e,{allowed:t,disallowed:n}={}){let r=R(e,"inert-others");A((()=>{var e,o;if(!r)return;let i=j();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&i.add(z(t));let s=null!=(o=null==t?void 0:t())?o:[];for(let e of s){if(!e)continue;let t=I(e);if(!t)continue;let n=e.parentElement;for(;n&&n!==t.body;){for(let e of n.children)s.some((t=>e.contains(t)))||i.add(z(e));n=n.parentElement}}return i.dispose}),[r,t,n])}function W(t,n,r){let o=_((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&r()}));(0,e.useEffect)((()=>{if(!t)return;let e=null===n?null:n instanceof HTMLElement?n:n.current;if(!e)return;let r=j();if("undefined"!=typeof ResizeObserver){let t=new ResizeObserver((()=>o.current(e)));t.observe(e),r.add((()=>t.disconnect()))}if("undefined"!=typeof IntersectionObserver){let t=new IntersectionObserver((()=>o.current(e)));t.observe(e),r.add((()=>t.disconnect()))}return()=>r.dispose()}),[n,o,t])}function $(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,$),r}let q=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(","),G=["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var Y,K,X=((K=X||{})[K.First=1]="First",K[K.Previous=2]="Previous",K[K.Next=4]="Next",K[K.Last=8]="Last",K[K.WrapAround=16]="WrapAround",K[K.NoScroll=32]="NoScroll",K[K.AutoFocus=64]="AutoFocus",K),Z=((Y=Z||{})[Y.Error=0]="Error",Y[Y.Overflow=1]="Overflow",Y[Y.Success=2]="Success",Y[Y.Underflow=3]="Underflow",Y),J=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(J||{});var Q=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Q||{});var ee=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ee||{});function te(e){null==e||e.focus({preventScroll:!0})}"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 ne=["textarea","input"].join(",");function re(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?n?function(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}))}(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(G)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e):function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(q)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e);o.length>0&&s.length>1&&(s=s.filter((e=>!o.some((t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))))),r=null!=r?r:i.activeElement;let a,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,s.indexOf(r))-1;if(4&t)return Math.max(0,s.indexOf(r))+1;if(8&t)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=32&t?{preventScroll:!0}:{},d=0,h=s.length;do{if(d>=h||d+h<=0)return 0;let e=c+d;if(16&t)e=(e+h)%h;else{if(e<0)return 3;if(e>=h)return 1}a=s[e],null==a||a.focus(u),d+=l}while(a!==i.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,ne))&&n}(a)&&a.select(),2}function oe(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function ie(){return oe()||/Android/gi.test(window.navigator.userAgent)}function se(t,n,r,o){let i=_(r);(0,e.useEffect)((()=>{if(t)return document.addEventListener(n,e,o),()=>document.removeEventListener(n,e,o);function e(e){i.current(e)}}),[t,n,o])}function ae(t,n,r,o){let i=_(r);(0,e.useEffect)((()=>{if(t)return window.addEventListener(n,e,o),()=>window.removeEventListener(n,e,o);function e(e){i.current(e)}}),[t,n,o])}function le(...t){return(0,e.useMemo)((()=>I(...t)),[...t])}function ce(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}var ue=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(ue||{}),de=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(de||{});function he({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:a}){a=null!=a?a:me;let l=fe(t,e);if(i)return pe(l,n,r,s,a);let c=null!=o?o:0;if(2&c){let{static:e=!1,...t}=l;if(e)return pe(t,n,r,s,a)}if(1&c){let{unmount:e=!0,...t}=l;return $(e?0:1,{0:()=>null,1:()=>pe({...t,hidden:!0,style:{display:"none"}},n,r,s,a)})}return pe(l,n,r,s,a)}function pe(t,n={},r,o,i){let{as:s=r,children:a,refName:l="ref",...c}=ve(t,["unmount","static"]),u=void 0!==t.ref?{[l]:t.ref}:{},d="function"==typeof a?a(n):a;"className"in c&&c.className&&"function"==typeof c.className&&(c.className=c.className(n)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let h={};if(n){let e=!1,t=[];for(let[r,o]of Object.entries(n))"boolean"==typeof o&&(e=!0),!0===o&&t.push(r.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){h["data-headlessui-state"]=t.join(" ");for(let e of t)h[`data-${e}`]=""}}if(s===e.Fragment&&(Object.keys(ye(c)).length>0||Object.keys(ye(h)).length>0)){if((0,e.isValidElement)(d)&&!(Array.isArray(d)&&d.length>1)){let t=d.props,n=null==t?void 0:t.className,r="function"==typeof n?(...e)=>ce(n(...e),c.className):ce(n,c.className),o=r?{className:r}:{},s=fe(d.props,ye(ve(c,["ref"])));for(let e in h)e in s&&delete h[e];return(0,e.cloneElement)(d,Object.assign({},s,h,u,{ref:i(d.ref,u.ref)},o))}if(Object.keys(ye(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(ye(c)).concat(Object.keys(ye(h))).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,e.createElement)(s,Object.assign({},ve(c,["ref"]),s!==e.Fragment&&u,s!==e.Fragment&&h),d)}function me(...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 fe(...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 ge(t){var n;return Object.assign((0,e.forwardRef)(t),{displayName:null!=(n=t.displayName)?n:t.name})}function ye(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function ve(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}var xe=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(xe||{});let we=ge((function(e,t){var n;let{features:r=1,...o}=e;return he({ourProps:{ref:t,"aria-hidden":2==(2&r)||(null!=(n=o["aria-hidden"])?n:void 0),hidden:4==(4&r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...4==(4&r)&&2!=(2&r)&&{display:"none"}}},theirProps:o,slot:{},defaultTag:"span",name:"Hidden"})})),be=(0,e.createContext)(null);function Ee({children:t,node:n}){let[r,o]=(0,e.useState)(null),i=Se(null!=n?n:r);return e.createElement(be.Provider,{value:i},t,null===i&&e.createElement(we,{features:xe.Hidden,ref:e=>{var t,n;if(e)for(let r of null!=(n=null==(t=I(e))?void 0:t.querySelectorAll("html > *, body > *"))?n:[])if(r!==document.body&&r!==document.head&&r instanceof HTMLElement&&null!=r&&r.contains(e)){o(r);break}}}))}function Se(t=null){var n;return null!=(n=(0,e.useContext)(be))?n:t}function Te(){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 Ce(){return oe()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=j();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(t.target instanceof HTMLElement)try{let n=t.target.closest("a");if(!n)return;let{hash:o}=new URL(n.href),s=e.querySelector(o);s&&!r(s)&&(i=s)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(e.target instanceof HTMLElement)if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(e.target instanceof HTMLElement){if("INPUT"===e.target.tagName)return;if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;o!==t&&window.scrollTo(0,o),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)}))}))}}:{}}function Pe(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let ke=M((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:j(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:Pe(n)},o=[Ce(),Te(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];o.forEach((({before:e})=>null==e?void 0:e(r))),o.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function Ae(){let n=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in t&&(e=>e.useSyncExternalStore)(t)((()=>()=>{}),(()=>!1),(()=>!e))}(),[r,o]=e.useState(k.isHandoffComplete);return r&&!1===k.isHandoffComplete&&o(!1),e.useEffect((()=>{!0!==r&&o(!0)}),[r]),e.useEffect((()=>k.handoff()),[]),!n&&r}ke.subscribe((()=>{let e=ke.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)&&ke.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&ke.dispatch("TEARDOWN",n)}}));let _e=Symbol();function Le(...t){let n=(0,e.useRef)(t);(0,e.useEffect)((()=>{n.current=t}),[t]);let r=V((e=>{for(let t of n.current)null!=t&&("function"==typeof t?t(e):t.current=e)}));return t.every((e=>null==e||(null==e?void 0:e[_e])))?void 0:r}let De=(0,e.createContext)((()=>{}));function Me({value:t,children:n}){return e.createElement(De.Provider,{value:t},n)}let Ne=(0,e.createContext)(null);Ne.displayName="OpenClosedContext";var Oe=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Oe||{});function Re(){return(0,e.useContext)(Ne)}function Ve({value:t,children:n}){return e.createElement(Ne.Provider,{value:t},n)}function Fe({children:t}){return e.createElement(Ne.Provider,{value:null},t)}let je=(0,e.createContext)(!1);function Ie(t){return e.createElement(je.Provider,{value:t.force},t.children)}let Be=(0,e.createContext)(void 0),He=(0,e.createContext)(null);function ze(){let t=(0,e.useContext)(He);if(null===t){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,ze),e}return t}He.displayName="DescriptionContext";let Ue=ge((function(t,n){let r=(0,e.useId)(),o=(0,e.useContext)(Be),{id:i=`headlessui-description-${r}`,...s}=t,a=ze(),l=Le(n);A((()=>a.register(i)),[i,a.register]);let c=o||!1,u=(0,e.useMemo)((()=>({...a.slot,disabled:c})),[a.slot,c]);return he({ourProps:{ref:l,...a.props,id:i},theirProps:s,slot:u,defaultTag:"p",name:a.name||"Description"})})),We=Object.assign(Ue,{});function $e(){let[t]=(0,e.useState)(j);return(0,e.useEffect)((()=>()=>t.dispose()),[t]),t}function qe(){let t=(0,e.useRef)(!1);return A((()=>(t.current=!0,()=>{t.current=!1})),[]),t}function Ge(t){let n=V(t),r=(0,e.useRef)(!1);(0,e.useEffect)((()=>(r.current=!1,()=>{r.current=!0,F((()=>{r.current&&n()}))})),[n])}var Ye=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Ye||{});function Ke(t,n){let r=(0,e.useRef)([]),o=V(t);(0,e.useEffect)((()=>{let e=[...r.current];for(let[t,i]of n.entries())if(r.current[t]!==i){let t=o(n,e);return r.current=n,t}}),[o,...n])}let Xe=[];function Ze(e){if(!e)return new Set;if("function"==typeof e)return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}!function(e){function t(){"loading"!==document.readyState&&((()=>{function e(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||Xe[0]===e.target)return;let t=e.target;t=t.closest(q),Xe.unshift(null!=t?t:e.target),Xe=Xe.filter((e=>null!=e&&e.isConnected)),Xe.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})})(),document.removeEventListener("DOMContentLoaded",t))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",t),t())}();var Je=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(Je||{});let Qe=ge((function(t,n){let r=(0,e.useRef)(null),o=Le(r,n),{initialFocus:i,initialFocusFallback:s,containers:a,features:l=15,...c}=t;Ae()||(l=0);let u=le(r);!function(t,{ownerDocument:n}){let r=!!(8&t),o=function(t=!0){let n=(0,e.useRef)(Xe.slice());return Ke((([e],[t])=>{!0===t&&!1===e&&F((()=>{n.current.splice(0)})),!1===t&&!0===e&&(n.current=Xe.slice())}),[t,Xe,n]),V((()=>{var e;return null!=(e=n.current.find((e=>null!=e&&e.isConnected)))?e:null}))}(r);Ke((()=>{r||(null==n?void 0:n.activeElement)===(null==n?void 0:n.body)&&te(o())}),[r]),Ge((()=>{r&&te(o())}))}(l,{ownerDocument:u});let d=function(t,{ownerDocument:n,container:r,initialFocus:o,initialFocusFallback:i}){let s=(0,e.useRef)(null),a=R(!!(1&t),"focus-trap#initial-focus"),l=qe();return Ke((()=>{if(0===t)return;if(!a)return void(null!=i&&i.current&&te(i.current));let e=r.current;e&&F((()=>{if(!l.current)return;let r=null==n?void 0:n.activeElement;if(null!=o&&o.current){if((null==o?void 0:o.current)===r)return void(s.current=r)}else if(e.contains(r))return void(s.current=r);if(null!=o&&o.current)te(o.current);else{if(16&t){if(re(e,X.First|X.AutoFocus)!==Z.Error)return}else if(re(e,X.First)!==Z.Error)return;if(null!=i&&i.current&&(te(i.current),(null==n?void 0:n.activeElement)===i.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}s.current=null==n?void 0:n.activeElement}))}),[i,a,t]),s}(l,{ownerDocument:u,container:r,initialFocus:i,initialFocusFallback:s});!function(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let i=qe(),s=!!(4&e);L(null==t?void 0:t.defaultView,"focus",(e=>{if(!s||!i.current)return;let t=Ze(r);n.current instanceof HTMLElement&&t.add(n.current);let a=o.current;if(!a)return;let l=e.target;l&&l instanceof HTMLElement?tt(t,l)?(o.current=l,te(l)):(e.preventDefault(),e.stopPropagation(),te(a)):te(o.current)}),!0)}(l,{ownerDocument:u,container:r,containers:a,previousActiveElement:d});let h=function(){let t=(0,e.useRef)(0);return ae(!0,"keydown",(e=>{"Tab"===e.key&&(t.current=e.shiftKey?1:0)}),!0),t}(),p=V((e=>{let t=r.current;t&&$(h.current,{[Ye.Forwards]:()=>{re(t,X.First,{skipElements:[e.relatedTarget,s]})},[Ye.Backwards]:()=>{re(t,X.Last,{skipElements:[e.relatedTarget,s]})}})})),m=R(!!(2&l),"focus-trap#tab-lock"),f=$e(),g=(0,e.useRef)(!1),y={ref:o,onKeyDown(e){"Tab"==e.key&&(g.current=!0,f.requestAnimationFrame((()=>{g.current=!1})))},onBlur(e){if(!(4&l))return;let t=Ze(a);r.current instanceof HTMLElement&&t.add(r.current);let n=e.relatedTarget;n instanceof HTMLElement&&"true"!==n.dataset.headlessuiFocusGuard&&(tt(t,n)||(g.current?re(r.current,$(h.current,{[Ye.Forwards]:()=>X.Next,[Ye.Backwards]:()=>X.Previous})|X.WrapAround,{relativeTo:e.target}):e.target instanceof HTMLElement&&te(e.target)))}};return e.createElement(e.Fragment,null,m&&e.createElement(we,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:xe.Focusable}),he({ourProps:y,theirProps:c,defaultTag:"div",name:"FocusTrap"}),m&&e.createElement(we,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:xe.Focusable}))})),et=Object.assign(Qe,{features:Je});function tt(e,t){for(let n of e)if(n.contains(t))return!0;return!1}const nt=window.ReactDOM;let rt=e.Fragment,ot=ge((function(t,n){let r=t,o=(0,e.useRef)(null),i=Le(function(e,t=!0){return Object.assign(e,{[_e]:t})}((e=>{o.current=e})),n),s=le(o),a=function(t){let n=(0,e.useContext)(je),r=(0,e.useContext)(st),o=le(t),[i,s]=(0,e.useState)((()=>{var e;if(!n&&null!==r)return null!=(e=r.current)?e:null;if(k.isServer)return null;let t=null==o?void 0:o.getElementById("headlessui-portal-root");if(t)return t;if(null===o)return null;let i=o.createElement("div");return i.setAttribute("id","headlessui-portal-root"),o.body.appendChild(i)}));return(0,e.useEffect)((()=>{null!==i&&(null!=o&&o.body.contains(i)||null==o||o.body.appendChild(i))}),[i,o]),(0,e.useEffect)((()=>{n||null!==r&&s(r.current)}),[r,s,n]),i}(o),[l]=(0,e.useState)((()=>{var e;return k.isServer?null:null!=(e=null==s?void 0:s.createElement("div"))?e:null})),c=(0,e.useContext)(at),u=Ae();return A((()=>{!a||!l||a.contains(l)||(l.setAttribute("data-headlessui-portal",""),a.appendChild(l))}),[a,l]),A((()=>{if(l&&c)return c.register(l)}),[c,l]),Ge((()=>{var e;!a||!l||(l instanceof Node&&a.contains(l)&&a.removeChild(l),a.childNodes.length<=0&&(null==(e=a.parentElement)||e.removeChild(a)))})),u&&a&&l?(0,nt.createPortal)(he({ourProps:{ref:i},theirProps:r,slot:{},defaultTag:rt,name:"Portal"}),l):null})),it=e.Fragment,st=(0,e.createContext)(null),at=(0,e.createContext)(null),lt=ge((function(t,n){let r=Le(n),{enabled:o=!0,...i}=t;return o?e.createElement(ot,{...i,ref:r}):he({ourProps:{ref:r},theirProps:i,slot:{},defaultTag:rt,name:"Portal"})})),ct=ge((function(t,n){let{target:r,...o}=t,i={ref:Le(n)};return e.createElement(st.Provider,{value:r},he({ourProps:i,theirProps:o,defaultTag:it,name:"Popover.Group"}))})),ut=Object.assign(lt,{Group:ct});var dt,ht=((dt=ht||{})[dt.None=0]="None",dt[dt.Closed=1]="Closed",dt[dt.Enter=2]="Enter",dt[dt.Leave=4]="Leave",dt);function pt(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function mt(t){var n;return!!(t.enter||t.enterFrom||t.enterTo||t.leave||t.leaveFrom||t.leaveTo)||(null!=(n=t.as)?n:wt)!==e.Fragment||1===e.Children.count(t.children)}let ft=(0,e.createContext)(null);ft.displayName="TransitionContext";var gt=(e=>(e.Visible="visible",e.Hidden="hidden",e))(gt||{});let yt=(0,e.createContext)(null);function vt(e){return"children"in e?vt(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function xt(t,n){let r=_(t),o=(0,e.useRef)([]),i=qe(),s=$e(),a=V(((e,t=de.Hidden)=>{let n=o.current.findIndex((({el:t})=>t===e));-1!==n&&($(t,{[de.Unmount](){o.current.splice(n,1)},[de.Hidden](){o.current[n].state="hidden"}}),s.microTask((()=>{var e;!vt(o)&&i.current&&(null==(e=r.current)||e.call(r))})))})),l=V((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"}),()=>a(e,de.Unmount)})),c=(0,e.useRef)([]),u=(0,e.useRef)(Promise.resolve()),d=(0,e.useRef)({enter:[],leave:[]}),h=V(((e,t,r)=>{c.current.splice(0),n&&(n.chains.current[t]=n.chains.current[t].filter((([t])=>t!==e))),null==n||n.chains.current[t].push([e,new Promise((e=>{c.current.push(e)}))]),null==n||n.chains.current[t].push([e,new Promise((e=>{Promise.all(d.current[t].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===t?u.current=u.current.then((()=>null==n?void 0:n.wait.current)).then((()=>r(t))):r(t)})),p=V(((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,e.useMemo)((()=>({children:o,register:l,unregister:a,onStart:h,onStop:p,wait:u,chains:d})),[l,a,o,h,p,d,u])}yt.displayName="NestingContext";let wt=e.Fragment,bt=ue.RenderStrategy,Et=ge((function(t,n){let{show:r,appear:o=!1,unmount:i=!0,...s}=t,a=(0,e.useRef)(null),l=Le(...mt(t)?[a,n]:null===n?[]:[n]);Ae();let c=Re();if(void 0===r&&null!==c&&(r=(c&Oe.Open)===Oe.Open),void 0===r)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,d]=(0,e.useState)(r?"visible":"hidden"),h=xt((()=>{r||d("hidden")})),[p,m]=(0,e.useState)(!0),f=(0,e.useRef)([r]);A((()=>{!1!==p&&f.current[f.current.length-1]!==r&&(f.current.push(r),m(!1))}),[f,r]);let g=(0,e.useMemo)((()=>({show:r,appear:o,initial:p})),[r,o,p]);W(r,a,(()=>d("hidden"))),A((()=>{r?d("visible"):!vt(h)&&null!==a.current&&d("hidden")}),[r,h]);let y={unmount:i},v=V((()=>{var e;p&&m(!1),null==(e=t.beforeEnter)||e.call(t)})),x=V((()=>{var e;p&&m(!1),null==(e=t.beforeLeave)||e.call(t)}));return e.createElement(yt.Provider,{value:h},e.createElement(ft.Provider,{value:g},he({ourProps:{...y,as:e.Fragment,children:e.createElement(St,{ref:l,...y,...s,beforeEnter:v,beforeLeave:x})},theirProps:{},defaultTag:e.Fragment,features:bt,visible:"visible"===u,name:"Transition"})))})),St=ge((function(t,n){var r,o;let{transition:i=!0,beforeEnter:s,afterEnter:a,beforeLeave:l,afterLeave:c,enter:u,enterFrom:d,enterTo:h,entered:p,leave:m,leaveFrom:f,leaveTo:g,...y}=t,v=(0,e.useRef)(null),x=mt(t),w=Le(...x?[v,n]:null===n?[]:[n]),b=null==(r=y.unmount)||r?de.Unmount:de.Hidden,{show:E,appear:S,initial:T}=function(){let t=(0,e.useContext)(ft);if(null===t)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}(),[C,P]=(0,e.useState)(E?"visible":"hidden"),k=function(){let t=(0,e.useContext)(yt);if(null===t)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}(),{register:_,unregister:L}=k;A((()=>_(v)),[_,v]),A((()=>{if(b===de.Hidden&&v.current)return E&&"visible"!==C?void P("visible"):$(C,{hidden:()=>L(v),visible:()=>_(v)})}),[C,v,_,L,E,b]);let D=Ae();A((()=>{if(x&&D&&"visible"===C&&null===v.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[v,C,D,x]);let M=T&&!S,N=S&&E&&T,O=(0,e.useRef)(!1),R=xt((()=>{O.current||(P("hidden"),L(v))}),k),F=V((e=>{O.current=!0;let t=e?"enter":"leave";R.onStart(v,t,(e=>{"enter"===e?null==s||s():"leave"===e&&(null==l||l())}))})),I=V((e=>{let t=e?"enter":"leave";O.current=!1,R.onStop(v,t,(e=>{"enter"===e?null==a||a():"leave"===e&&(null==c||c())})),"leave"===t&&!vt(R)&&(P("hidden"),L(v))}));(0,e.useEffect)((()=>{x&&i||(F(E),I(E))}),[E,x,i]);let B=!(!i||!x||!D||M),[,H]=function(t,n,r,o){let[i,s]=(0,e.useState)(r),{hasFlag:a,addFlag:l,removeFlag:c}=function(t=0){let[n,r]=(0,e.useState)(t),o=(0,e.useCallback)((e=>r(e)),[n]),i=(0,e.useCallback)((e=>r((t=>t|e))),[n]),s=(0,e.useCallback)((e=>(n&e)===e),[n]),a=(0,e.useCallback)((e=>r((t=>t&~e))),[r]),l=(0,e.useCallback)((e=>r((t=>t^e))),[r]);return{flags:n,setFlag:o,addFlag:i,hasFlag:s,removeFlag:a,toggleFlag:l}}(t&&i?3:0),u=(0,e.useRef)(!1),d=(0,e.useRef)(!1),h=$e();return A((function e(){var i;if(!t)return;r&&s(!0);let a=n.current;return a?(null==(i=null==o?void 0:o.start)||i.call(o,r),function(e,{prepare:t,run:n,done:r,inFlight:o}){let i=j();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((()=>{i.add(function(e,t){let n=function(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}(t),r=j();if(!e)return r.dispose;let{transitionDuration:o,transitionDelay:i}=getComputedStyle(e),[s,a]=[o,i].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t})),l=s+a;if(0!==l){let t=r.group((r=>{let o=r.setTimeout((()=>{n(),r.dispose()}),l);r.addEventListener(e,"transitionrun",(i=>{i.target===i.currentTarget&&(o(),r.addEventListener(e,"transitioncancel",(e=>{e.target===e.currentTarget&&(n(),t())})))}))}));r.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(n(),r.dispose())}))}else n();return r.dispose}(e,r)),n()})),i.dispose}(a,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(r?(l(3),c(4)):(l(4),c(2)))},run(){d.current?r?(c(3),l(4)):(c(4),l(3)):r?c(1):l(1)},done(){var e;d.current&&"function"==typeof a.getAnimations&&a.getAnimations().length>0||(u.current=!1,c(7),r||s(!1),null==(e=null==o?void 0:o.end)||e.call(o,r))}})):r?(l(3),h.nextFrame((()=>e()))):void 0}),[t,r,n,h]),t?[i,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}(B,v,E,{start:F,end:I}),z=ye({ref:w,className:(null==(o=ce(y.className,N&&u,N&&d,H.enter&&u,H.enter&&H.closed&&d,H.enter&&!H.closed&&h,H.leave&&m,H.leave&&!H.closed&&f,H.leave&&H.closed&&g,!H.transition&&E&&p))?void 0:o.trim())||void 0,...pt(H)}),U=0;return"visible"===C&&(U|=Oe.Open),"hidden"===C&&(U|=Oe.Closed),H.enter&&(U|=Oe.Opening),H.leave&&(U|=Oe.Closing),e.createElement(yt.Provider,{value:R},e.createElement(Ve,{value:U},he({ourProps:z,theirProps:y,defaultTag:wt,features:bt,visible:"visible"===C,name:"Transition.Child"})))})),Tt=ge((function(t,n){let r=null!==(0,e.useContext)(ft),o=null!==Re();return e.createElement(e.Fragment,null,!r&&o?e.createElement(Et,{ref:n,...t}):e.createElement(St,{ref:n,...t}))})),Ct=Object.assign(Et,{Child:Tt,Root:Et});var Pt=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Pt||{}),kt=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(kt||{});let At={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},_t=(0,e.createContext)(null);function Lt(t){let n=(0,e.useContext)(_t);if(null===n){let e=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Lt),e}return n}function Dt(e,t){return $(t.type,At,e,t)}_t.displayName="DialogContext";let Mt=ge((function(t,n){let r=(0,e.useId)(),{id:o=`headlessui-dialog-${r}`,open:i,onClose:s,initialFocus:a,role:l="dialog",autoFocus:c=!0,__demoMode:u=!1,unmount:d=!1,...h}=t,p=(0,e.useRef)(!1);l="dialog"===l||"alertdialog"===l?l:(p.current||(p.current=!0,console.warn(`Invalid role [${l}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog");let m=Re();void 0===i&&null!==m&&(i=(m&Oe.Open)===Oe.Open);let f=(0,e.useRef)(null),g=Le(f,n),y=le(f),v=i?0:1,[x,w]=(0,e.useReducer)(Dt,{titleId:null,descriptionId:null,panelRef:(0,e.createRef)()}),b=V((()=>s(!1))),E=V((e=>w({type:0,id:e}))),S=!!Ae()&&0===v,[C,P]=function(){let t=(0,e.useContext)(at),n=(0,e.useRef)([]),r=V((e=>(n.current.push(e),t&&t.register(e),()=>o(e)))),o=V((e=>{let r=n.current.indexOf(e);-1!==r&&n.current.splice(r,1),t&&t.unregister(e)})),i=(0,e.useMemo)((()=>({register:r,unregister:o,portals:n})),[r,o,n]);return[n,(0,e.useMemo)((()=>function({children:t}){return e.createElement(at.Provider,{value:i},t)}),[i])]}(),k={get current(){var e;return null!=(e=x.panelRef.current)?e:f.current}},D=Se(),{resolveContainers:M}=function({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=le(n),o=V((()=>{var o,i;let s=[];for(let t of e)null!==t&&(t instanceof HTMLElement?s.push(t):"current"in t&&t.current instanceof HTMLElement&&s.push(t.current));if(null!=t&&t.current)for(let e of t.current)s.push(e);for(let e of null!=(o=null==r?void 0:r.querySelectorAll("html > *, body > *"))?o:[])e!==document.body&&e!==document.head&&e instanceof HTMLElement&&"headlessui-portal-root"!==e.id&&(n&&(e.contains(n)||e.contains(null==(i=null==n?void 0:n.getRootNode())?void 0:i.host))||s.some((t=>e.contains(t)))||s.push(e));return s}));return{resolveContainers:o,contains:V((e=>o().some((t=>t.contains(e)))))}}({mainTreeNode:D,portals:C,defaultContainers:[k]}),O=null!==m&&(m&Oe.Closing)===Oe.Closing;U(!u&&!O&&S,{allowed:V((()=>{var e,t;return[null!=(t=null==(e=f.current)?void 0:e.closest("[data-headlessui-portal]"))?t:null]})),disallowed:V((()=>{var e;return[null!=(e=null==D?void 0:D.closest("body > *:not(#headlessui-portal-root)"))?e:null]}))}),function(t,n,r){let o=R(t,"outside-click"),i=_((e=>{e.preventDefault(),b()})),s=(0,e.useCallback)((function(e,t){if(e.defaultPrevented)return;let r=t(e);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(n);for(let t of o){if(null===t)continue;let n=t instanceof HTMLElement?t:t.current;if(null!=n&&n.contains(r)||e.composed&&e.composedPath().includes(n))return}return!function(e,t=0){var n;return e!==(null==(n=I(e))?void 0:n.body)&&$(t,{0:()=>e.matches(q),1(){let t=e;for(;null!==t;){if(t.matches(q))return!0;t=t.parentElement}return!1}})}(r,Q.Loose)&&-1!==r.tabIndex&&e.preventDefault(),i.current(e,r)}),[i]),a=(0,e.useRef)(null);se(o,"pointerdown",(e=>{var t,n;a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),se(o,"mousedown",(e=>{var t,n;a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target}),!0),se(o,"click",(e=>{ie()||a.current&&(s(e,(()=>a.current)),a.current=null)}),!0);let l=(0,e.useRef)({x:0,y:0});se(o,"touchstart",(e=>{l.current.x=e.touches[0].clientX,l.current.y=e.touches[0].clientY}),!0),se(o,"touchend",(e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-l.current.x)>=30||Math.abs(n-l.current.y)>=30))return s(e,(()=>e.target instanceof HTMLElement?e.target:null))}),!0),ae(o,"blur",(e=>s(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}(S,M),function(e,t=("undefined"!=typeof document?document.defaultView:null),n){let r=R(e,"escape");L(t,"keydown",(e=>{r&&(e.defaultPrevented||e.key===T.Escape&&n(e))}))}(S,null==y?void 0:y.defaultView,(e=>{e.preventDefault(),e.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur(),b()})),function(e,t,n=(()=>[document.body])){!function(e,t,n=(()=>({containers:[]}))){let r=N(ke),o=t?r.get(t):void 0;o&&o.count,A((()=>{if(t&&e)return ke.dispatch("PUSH",t,n),()=>ke.dispatch("POP",t,n)}),[e,t])}(R(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}(!u&&!O&&S,y,M),W(S,f,b);let[F,j]=function(){let[t,n]=(0,e.useState)([]);return[t.length>0?t.join(" "):void 0,(0,e.useMemo)((()=>function(t){let r=V((e=>(n((t=>[...t,e])),()=>n((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),o=(0,e.useMemo)((()=>({register:r,slot:t.slot,name:t.name,props:t.props,value:t.value})),[r,t.slot,t.name,t.props,t.value]);return e.createElement(He.Provider,{value:o},t.children)}),[n])]}(),B=(0,e.useMemo)((()=>[{dialogState:v,close:b,setTitleId:E,unmount:d},x]),[v,x,b,E,d]),H=(0,e.useMemo)((()=>({open:0===v})),[v]),z={ref:g,id:o,role:l,tabIndex:-1,"aria-modal":u?void 0:0===v||void 0,"aria-labelledby":x.titleId,"aria-describedby":F,unmount:d},G=!function(){var t;let[n]=(0,e.useState)((()=>"undefined"!=typeof window&&"function"==typeof window.matchMedia?window.matchMedia("(pointer: coarse)"):null)),[r,o]=(0,e.useState)(null!=(t=null==n?void 0:n.matches)&&t);return A((()=>{if(n)return n.addEventListener("change",e),()=>n.removeEventListener("change",e);function e(e){o(e.matches)}}),[n]),r}(),Y=Je.None;return S&&!u&&(Y|=Je.RestoreFocus,Y|=Je.TabLock,c&&(Y|=Je.AutoFocus),G&&(Y|=Je.InitialFocus)),e.createElement(Fe,null,e.createElement(Ie,{force:!0},e.createElement(ut,null,e.createElement(_t.Provider,{value:B},e.createElement(ct,{target:f},e.createElement(Ie,{force:!1},e.createElement(j,{slot:H},e.createElement(P,null,e.createElement(et,{initialFocus:a,initialFocusFallback:f,containers:M,features:Y},e.createElement(Me,{value:b},he({ourProps:z,theirProps:h,slot:H,defaultTag:Nt,features:Ot,visible:0===v,name:"Dialog"})))))))))))})),Nt="div",Ot=ue.RenderStrategy|ue.Static,Rt=ge((function(t,n){let{transition:r=!1,open:o,...i}=t,s=Re(),a=t.hasOwnProperty("open")||null!==s,l=t.hasOwnProperty("onClose");if(!a&&!l)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!a)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!l)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!s&&"boolean"!=typeof t.open)throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${t.open}`);if("function"!=typeof t.onClose)throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${t.onClose}`);return void 0===o&&!r||i.static?e.createElement(Ee,null,e.createElement(Mt,{ref:n,open:o,...i})):e.createElement(Ee,null,e.createElement(Ct,{show:o,transition:r,unmount:i.unmount},e.createElement(Mt,{ref:n,...i})))})),Vt=ge((function(t,n){let r=(0,e.useId)(),{id:o=`headlessui-dialog-panel-${r}`,transition:i=!1,...s}=t,[{dialogState:a,unmount:l},c]=Lt("Dialog.Panel"),u=Le(n,c.panelRef),d=(0,e.useMemo)((()=>({open:0===a})),[a]),h={ref:u,id:o,onClick:V((e=>{e.stopPropagation()}))};return e.createElement(i?Tt:e.Fragment,{...i?{unmount:l}:{}},he({ourProps:h,theirProps:s,slot:d,defaultTag:"div",name:"Dialog.Panel"}))})),Ft=(ge((function(t,n){let{transition:r=!1,...o}=t,[{dialogState:i,unmount:s}]=Lt("Dialog.Backdrop"),a=(0,e.useMemo)((()=>({open:0===i})),[i]),l={ref:n,"aria-hidden":!0};return e.createElement(r?Tt:e.Fragment,{...r?{unmount:s}:{}},he({ourProps:l,theirProps:o,slot:a,defaultTag:"div",name:"Dialog.Backdrop"}))})),ge((function(t,n){let r=(0,e.useId)(),{id:o=`headlessui-dialog-title-${r}`,...i}=t,[{dialogState:s,setTitleId:a}]=Lt("Dialog.Title"),l=Le(n);(0,e.useEffect)((()=>(a(o),()=>a(null))),[o,a]);let c=(0,e.useMemo)((()=>({open:0===s})),[s]);return he({ourProps:{ref:l,id:o},theirProps:i,slot:c,defaultTag:"h2",name:"Dialog.Title"})}))),jt=Object.assign(Rt,{Panel:Vt,Title:Ft,Description:We});const It=(0,e.createContext)({}),Bt=(0,e.createContext)({strict:!1}),Ht=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),zt="data-"+Ht("framerAppearId"),Ut=["read","resolveKeyframes","update","preRender","render","postRender"];function Wt(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Ut.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){i.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,o=!1,s=!1)=>{const a=s&&r?t:n;return o&&i.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{s=e,r?o=!0:(r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(e)))}};return l}(i),e)),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=s,p=()=>{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,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(p))};return{schedule:Ut.reduce(((t,i)=>{const a=s[i];return t[i]=(t,i=!1,s=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(p)),a.schedule(t,i,s)),t}),{}),cancel:e=>{for(let t=0;t<Ut.length;t++)s[Ut[t]].cancel(e)},state:o,steps:s}}const{schedule:$t,cancel:qt}=Wt(queueMicrotask,!1);function Gt(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}const Yt=(0,e.createContext)({});let Kt=!1;function Xt(t,n,r,o,i){const{visualElement:s}=(0,e.useContext)(It),l=(0,e.useContext)(Bt),u=(0,e.useContext)(a),d=(0,e.useContext)(c).reducedMotion,h=(0,e.useRef)();o=o||l.renderer,!h.current&&o&&(h.current=o(t,{visualState:n,parent:s,props:r,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const p=h.current,m=(0,e.useContext)(Yt);!p||p.projection||!i||"html"!==p.type&&"svg"!==p.type||function(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Jt(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(s)||a&&Gt(a),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(h.current,r,i,m),(0,e.useInsertionEffect)((()=>{p&&p.update(r,u)}));const f=(0,e.useRef)(Boolean(r[zt]&&!window.HandoffComplete));return b((()=>{p&&(p.updateFeatures(),$t.render(p.render),f.current&&p.animationState&&p.animationState.animateChanges())})),(0,e.useEffect)((()=>{p&&(!f.current&&p.animationState&&p.animationState.animateChanges(),f.current&&(f.current=!1,Kt||(Kt=!0,queueMicrotask(Zt))))})),p}function Zt(){window.HandoffComplete=!0}function Jt(e){if(e)return!1!==e.options.allowProjection?e.projection:Jt(e.parent)}function Qt(t,n,r){return(0,e.useCallback)((e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),r&&("function"==typeof r?r(e):Gt(r)&&(r.current=e))}),[n])}function en(e){return"string"==typeof e||Array.isArray(e)}function tn(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const nn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],rn=["initial",...nn];function on(e){return tn(e.animate)||rn.some((t=>en(e[t])))}function sn(e){return Boolean(on(e)||e.variants)}function an(e){return Array.isArray(e)?e.join(" "):e}const ln={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"]},cn={};for(const e in ln)cn[e]={isEnabled:t=>ln[e].some((e=>!!t[e]))};const un=Symbol.for("motionComponentSymbol");function dn({preloadedFeatures:t,createVisualElement:n,useRender:r,useVisualState:o,Component:i}){t&&function(e){for(const t in e)cn[t]={...cn[t],...e[t]}}(t);const a=(0,e.forwardRef)((function(t,a){let l;const u={...(0,e.useContext)(c),...t,layoutId:hn(t)},{isStatic:d}=u,h=function(t){const{initial:n,animate:r}=function(e,t){if(on(e)){const{initial:t,animate:n}=e;return{initial:!1===t||en(t)?t:void 0,animate:en(n)?n:void 0}}return!1!==e.inherit?t:{}}(t,(0,e.useContext)(It));return(0,e.useMemo)((()=>({initial:n,animate:r})),[an(n),an(r)])}(t),p=o(t,d);if(!d&&w){(0,e.useContext)(Bt).strict;const t=function(e){const{drag:t,layout:n}=cn;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}}(u);l=t.MeasureLayout,h.visualElement=Xt(i,p,u,n,t.ProjectionNode)}return(0,s.jsxs)(It.Provider,{value:h,children:[l&&h.visualElement?(0,s.jsx)(l,{visualElement:h.visualElement,...u}):null,r(i,t,Qt(p,h.visualElement,a),p,d,h.visualElement)]})}));return a[un]=i,a}function hn({layoutId:t}){const n=(0,e.useContext)(m).id;return n&&void 0!==t?n+"-"+t:t}function pn(e){function t(t,n={}){return dn(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const mn=["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 fn(e){return"string"==typeof e&&!e.includes("-")&&!!(mn.indexOf(e)>-1||/[A-Z]/u.test(e))}const gn={},yn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vn=new Set(yn);function xn(e,{layout:t,layoutId:n}){return vn.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!gn[e]||"opacity"===e)}const wn=e=>Boolean(e&&e.getVelocity),bn=(e,t)=>t&&"number"==typeof e?t.transform(e):e,En=(e,t,n)=>n>t?t:n<e?e:n,Sn={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Tn={...Sn,transform:e=>En(0,1,e)},Cn={...Sn,default:1},Pn=e=>Math.round(1e5*e)/1e5,kn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,An=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Ln=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Dn(e){return"string"==typeof e}const Mn=e=>({test:t=>Dn(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Nn=Mn("deg"),On=Mn("%"),Rn=Mn("px"),Vn=Mn("vh"),Fn=Mn("vw"),jn={...On,parse:e=>On.parse(e)/100,transform:e=>On.transform(100*e)},In={...Sn,transform:Math.round},Bn={borderWidth:Rn,borderTopWidth:Rn,borderRightWidth:Rn,borderBottomWidth:Rn,borderLeftWidth:Rn,borderRadius:Rn,radius:Rn,borderTopLeftRadius:Rn,borderTopRightRadius:Rn,borderBottomRightRadius:Rn,borderBottomLeftRadius:Rn,width:Rn,maxWidth:Rn,height:Rn,maxHeight:Rn,size:Rn,top:Rn,right:Rn,bottom:Rn,left:Rn,padding:Rn,paddingTop:Rn,paddingRight:Rn,paddingBottom:Rn,paddingLeft:Rn,margin:Rn,marginTop:Rn,marginRight:Rn,marginBottom:Rn,marginLeft:Rn,rotate:Nn,rotateX:Nn,rotateY:Nn,rotateZ:Nn,scale:Cn,scaleX:Cn,scaleY:Cn,scaleZ:Cn,skew:Nn,skewX:Nn,skewY:Nn,distance:Rn,translateX:Rn,translateY:Rn,translateZ:Rn,x:Rn,y:Rn,z:Rn,perspective:Rn,transformPerspective:Rn,opacity:Tn,originX:jn,originY:jn,originZ:Rn,zIndex:In,backgroundPositionX:Rn,backgroundPositionY:Rn,fillOpacity:Tn,strokeOpacity:Tn,numOctaves:In},Hn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zn=yn.length,Un=e=>t=>"string"==typeof t&&t.startsWith(e),Wn=Un("--"),$n=Un("var(--"),qn=e=>!!$n(e)&&Gn.test(e.split("/*")[0].trim()),Gn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Yn(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const e in t){const n=t[e];if(vn.has(e))s=!0;else if(Wn(e))o[e]=n;else{const t=bn(n,Bn[e]);e.startsWith("origin")?(a=!0,i[e]=t):r[e]=t}}if(t.transform||(s||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<zn;i++){const s=yn[i],a=e[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const e=bn(a,Bn[s]);l||(o=!1,r+=`${Hn[s]||s}(${e}) `),n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}const Kn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Xn(e,t,n){for(const r in t)wn(t[r])||xn(r,n)||(e[r]=t[r])}function Zn(t,n){const r={},o=function(t,n){const r={};return Xn(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n){return(0,e.useMemo)((()=>{const e=Kn();return Yn(e,n,t),Object.assign({},e.vars,e.style)}),[n])}(t,n)),r}(t,n);return t.drag&&!1!==t.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=o,r}const Jn=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 Qn(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Jn.has(e)}let er=e=>!Qn(e);try{(tr=require("@emotion/is-prop-valid").default)&&(er=e=>e.startsWith("on")?!Qn(e):tr(e))}catch(e){}var tr;function nr(e,t,n){return"string"==typeof e?e:Rn.transform(t+n*e)}const rr={offset:"stroke-dashoffset",array:"stroke-dasharray"},or={offset:"strokeDashoffset",array:"strokeDasharray"};function ir(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Yn(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:m}=e;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(void 0!==o||void 0!==i||p.transform)&&(p.transformOrigin=function(e,t,n){return`${nr(t,e.x,e.width)} ${nr(n,e.y,e.height)}`}(m,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(h.x=t),void 0!==n&&(h.y=n),void 0!==r&&(h.scale=r),void 0!==s&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?rr:or;e[i.offset]=Rn.transform(-r);const s=Rn.transform(t),a=Rn.transform(n);e[i.array]=`${s} ${a}`}(h,s,a,l,!1)}const sr=()=>({...Kn(),attrs:{}}),ar=e=>"string"==typeof e&&"svg"===e.toLowerCase();function lr(t,n,r,o){const i=(0,e.useMemo)((()=>{const e=sr();return ir(e,n,ar(o),t.transformTemplate),{...e.attrs,style:{...e.style}}}),[n]);if(t.style){const e={};Xn(e,t.style,t),i.style={...e,...i.style}}return i}function cr(t=!1){return(n,r,o,{latestValues:i},s)=>{const a=(fn(n)?lr:Zn)(r,i,s,n),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(er(o)||!0===n&&Qn(o)||!t&&!Qn(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(r,"string"==typeof n,t),c=n!==e.Fragment?{...l,...a,ref:o}:{},{children:u}=r,d=(0,e.useMemo)((()=>wn(u)?u.get():u),[u]);return(0,e.createElement)(n,{...c,children:d})}}function ur(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 dr=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 hr(e,t,n,r){ur(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(dr.has(n)?n:Ht(n),t.attrs[n])}function pr(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(wn(o[s])||t.style&&wn(t.style[s])||xn(s,e)||void 0!==(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle))&&(i[s]=o[s]);return n&&o&&"string"==typeof o.willChange&&(n.applyWillChange=!1),i}function mr(e,t,n){const r=pr(e,t,n);for(const n in e)(wn(e[n])||wn(t[n]))&&(r[-1!==yn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}function fr(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function gr(e,t,n,r){if("function"==typeof t){const[o,i]=fr(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]=fr(r);t=t(void 0!==n?n:e.custom,o,i)}return t}const yr=e=>Array.isArray(e),vr=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),xr=e=>yr(e)?e[e.length-1]||0:e;function wr(e){const t=wn(e)?e.get():e;return vr(t)?t.toValue():t}const br=new Set(["opacity","clipPath","filter","transform"]);function Er(e){return vn.has(e)?"transform":br.has(e)?Ht(e):void 0}function Sr(e,t){-1===e.indexOf(t)&&e.push(t)}function Tr(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Cr=t=>(n,r)=>{const o=(0,e.useContext)(It),i=(0,e.useContext)(a),s=()=>function({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:Ar(o,i,s,!a&&e,t),renderState:n()};return r&&(l.mount=e=>r(o,e,l)),l}(t,n,o,i,r);return r?s():l(s)};function Pr(e,t){const n=Er(t);n&&Sr(e,n)}function kr(e,t,n){const r=Array.isArray(t)?t:[t];for(let t=0;t<r.length;t++){const o=gr(e,r[t]);if(o){const{transitionEnd:e,transition:t,...r}=o;n(r,e)}}}function Ar(e,t,n,r,o){var i;const s={},a=[],l=r&&void 0===(null===(i=e.style)||void 0===i?void 0:i.willChange),c=o(e,{});for(const e in c)s[e]=wr(c[e]);let{initial:u,animate:d}=e;const h=on(e),p=sn(e);t&&p&&!h&&!1!==e.inherit&&(void 0===u&&(u=t.initial),void 0===d&&(d=t.animate));let m=!!n&&!1===n.initial;m=m||!1===u;const f=m?d:u;return f&&"boolean"!=typeof f&&!tn(f)&&kr(e,f,((e,t)=>{for(const t in e){let n=e[t];Array.isArray(n)&&(n=n[m?n.length-1:0]),null!==n&&(s[t]=n)}for(const e in t)s[e]=t[e]})),l&&(d&&!1!==u&&!tn(d)&&kr(e,d,(e=>{for(const t in e)Pr(a,t)})),a.length&&(s.willChange=a.join(","))),s}const{schedule:_r,cancel:Lr,state:Dr,steps:Mr}=Wt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:f,!0),Nr={useVisualState:Cr({scrapeMotionValuesFromProps:mr,createRenderState:sr,onMount:(e,t,{renderState:n,latestValues:r})=>{_r.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}})),_r.render((()=>{ir(n,r,ar(t.tagName),e.transformTemplate),hr(t,n)}))}})},Or={useVisualState:Cr({applyWillChange:!0,scrapeMotionValuesFromProps:pr,createRenderState:Kn})};function Rr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Vr=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function Fr(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const jr=e=>t=>Vr(t)&&e(t,Fr(t));function Ir(e,t,n,r){return Rr(e,t,jr(n),r)}const Br=(e,t)=>n=>t(e(n)),Hr=(...e)=>e.reduce(Br);function zr(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}const Ur=zr("dragHorizontal"),Wr=zr("dragVertical");function $r(e){let t=!1;if("y"===e)t=Wr();else if("x"===e)t=Ur();else{const e=Ur(),n=Wr();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function qr(){const e=$r(!0);return!e||(e(),!1)}class Gr{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Yr(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return Ir(e.current,n,((n,o)=>{if("touch"===n.pointerType||qr())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t);const s=i[r];s&&_r.postRender((()=>s(n,o)))}),{passive:!e.getProps()[r]})}const Kr=(e,t)=>!!t&&(e===t||Kr(e,t.parentElement));function Xr(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Fr(n))}const Zr=new WeakMap,Jr=new WeakMap,Qr=e=>{const t=Zr.get(e.target);t&&t(e)},eo=e=>{e.forEach(Qr)};const to={some:0,all:1},no={inView:{Feature:class extends Gr{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:to[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;Jr.has(n)||Jr.set(n,{});const r=Jr.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(eo,{root:e,...t})),r[o]}(t);return Zr.set(e,n),r.observe(e),()=>{Zr.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 Gr{constructor(){super(...arguments),this.removeStartListeners=f,this.removeEndListeners=f,this.removeAccessibleListeners=f,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=Ir(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:o}=this.node.getProps(),i=o||Kr(this.node.current,e.target)?n:r;i&&_r.update((()=>i(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),o=Ir(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Hr(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=Rr(this.node.current,"keydown",(e=>{"Enter"!==e.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=Rr(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&Xr("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&_r.postRender((()=>n(e,t)))}))})),Xr("down",((e,t)=>{this.startPress(e,t)})))})),t=Rr(this.node.current,"blur",(()=>{this.isPressing&&Xr("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=Hr(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&_r.postRender((()=>n(e,t)))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!qr()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&_r.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=Ir(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Rr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Hr(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Gr{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=Hr(Rr(this.node.current,"focus",(()=>this.onFocus())),Rr(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Gr{mount(){this.unmount=Hr(Yr(this.node,!0),Yr(this.node,!1))}unmount(){}}}};function ro(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 oo(e,t,n){const r=e.getProps();return gr(r,t,void 0!==n?n:r.custom,e)}const io=e=>1e3*e,so=e=>e/1e3,ao={type:"spring",stiffness:500,damping:25,restSpeed:10},lo={type:"keyframes",duration:.8},co={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},uo=(e,{keyframes:t})=>t.length>2?lo:vn.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:ao:co;function ho(e,t){return e[t]||e.default||e}const po=e=>null!==e;function mo(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(po),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}let fo;function go(){fo=void 0}const yo={now:()=>(void 0===fo&&yo.set(Dr.isProcessing?Dr.timestamp:performance.now()),fo),set:e=>{fo=e,queueMicrotask(go)}},vo=e=>/^0[^.\s]+$/u.test(e),xo=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),wo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bo(e,t,n=1){y(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=wo.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 xo(e)?parseFloat(e):e}return qn(o)?bo(o,t,n+1):o}const Eo=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),So=e=>e===Sn||e===Rn,To=(e,t)=>parseFloat(e.split(", ")[t]),Co=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return To(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?To(t[1],e):0}},Po=new Set(["x","y","z"]),ko=yn.filter((e=>!Po.has(e))),Ao={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:Co(4,13),y:Co(5,14)};Ao.translateX=Ao.x,Ao.translateY=Ao.y;const _o=e=>t=>t.test(e),Lo=[Sn,Rn,On,Nn,Fn,Vn,{test:e=>"auto"===e,parse:e=>e}],Do=e=>Lo.find(_o(e)),Mo=new Set;let No=!1,Oo=!1;function Ro(){if(Oo){const e=Array.from(Mo).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 ko.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)}))}Oo=!1,No=!1,Mo.forEach((e=>e.complete())),Mo.clear()}function Vo(){Mo.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(Oo=!0)}))}class Fo{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?(Mo.add(this),No||(No=!0,_r.read(Vo),_r.resolveKeyframes(Ro))):(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),Mo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Mo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const jo=(e,t)=>n=>Boolean(Dn(n)&&Ln.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Io=(e,t,n)=>r=>{if(!Dn(r))return r;const[o,i,s,a]=r.match(kn);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Bo={...Sn,transform:e=>Math.round((e=>En(0,255,e))(e))},Ho={test:jo("rgb","red"),parse:Io("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Bo.transform(e)+", "+Bo.transform(t)+", "+Bo.transform(n)+", "+Pn(Tn.transform(r))+")"},zo={test:jo("#"),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:Ho.transform},Uo={test:jo("hsl","hue"),parse:Io("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+On.transform(Pn(t))+", "+On.transform(Pn(n))+", "+Pn(Tn.transform(r))+")"},Wo={test:e=>Ho.test(e)||zo.test(e)||Uo.test(e),parse:e=>Ho.test(e)?Ho.parse(e):Uo.test(e)?Uo.parse(e):zo.parse(e),transform:e=>Dn(e)?e:e.hasOwnProperty("red")?Ho.transform(e):Uo.transform(e)},$o="number",qo="color",Go="var",Yo="var(",Ko="${}",Xo=/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 Zo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(Xo,(e=>(Wo.test(e)?(r.color.push(i),o.push(qo),n.push(Wo.parse(e))):e.startsWith(Yo)?(r.var.push(i),o.push(Go),n.push(e)):(r.number.push(i),o.push($o),n.push(parseFloat(e))),++i,Ko))).split(Ko);return{values:n,split:s,indexes:r,types:o}}function Jo(e){return Zo(e).values}function Qo(e){const{split:t,types:n}=Zo(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===$o?Pn(e[i]):t===qo?Wo.transform(e[i]):e[i]}return o}}const ei=e=>"number"==typeof e?0:e,ti={test:function(e){var t,n;return isNaN(e)&&Dn(e)&&((null===(t=e.match(kn))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(An))||void 0===n?void 0:n.length)||0)>0},parse:Jo,createTransformer:Qo,getAnimatableNone:function(e){const t=Jo(e);return Qo(e)(t.map(ei))}},ni=new Set(["brightness","contrast","saturate","opacity"]);function ri(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(kn)||[];if(!r)return e;const o=n.replace(r,"");let i=ni.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const oi=/\b([a-z-]*)\(.*?\)/gu,ii={...ti,getAnimatableNone:e=>{const t=e.match(oi);return t?t.map(ri).join(" "):e}},si={...Bn,color:Wo,backgroundColor:Wo,outlineColor:Wo,fill:Wo,stroke:Wo,borderColor:Wo,borderTopColor:Wo,borderRightColor:Wo,borderBottomColor:Wo,borderLeftColor:Wo,filter:ii,WebkitFilter:ii},ai=e=>si[e];function li(e,t){let n=ai(e);return n!==ii&&(n=ti),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ci=new Set(["auto","none","0"]);class ui extends Fo{constructor(e,t,n,r){super(e,t,n,r,null==r?void 0:r.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),qn(r))){const o=bo(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Eo.has(n)||2!==e.length)return;const[r,o]=e,i=Do(r),s=Do(o);if(i!==s)if(So(i)&&So(s))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++)("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||vo(r))&&n.push(t);var r;n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!ci.has(t)&&Zo(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=li(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ao[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.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=Ao[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}function di(e){let t;return()=>(void 0===t&&(t=e()),t)}const hi=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!ti.test(e)&&"0"!==e||e.startsWith("url(")));class pi{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...s},this.updateFinishedPromise()}get resolved(){return this._resolved||this.hasAttemptedResolve||(Vo(),Ro()),this._resolved}onKeyframesResolved(e,t){this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(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],s=hi(o,t),a=hi(i,t);return g(s===a,`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.`),!(!s||!a)&&(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&&r)}(e,n,r,o)){if(!i)return null==a||a(mo(e,this.options,t)),null==s||s(),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)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}function mi(e,t){return t?e*(1e3/t):0}const fi=5;function gi(e,t,n){const r=Math.max(t-fi,0);return mi(n-e(r),t-r)}const yi=.001,vi=.01,xi=10,wi=.05,bi=1;const Ei=12;function Si(e,t){return e*Math.sqrt(1-t*t)}const Ti=["duration","bounce"],Ci=["stiffness","damping","mass"];function Pi(e,t){return t.some((t=>void 0!==e[t]))}function ki({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:h}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Pi(e,Ci)&&Pi(e,Ti)){const n=function({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;g(e<=io(xi),"Spring duration must be 10 seconds or less");let s=1-t;s=En(wi,bi,s),e=En(vi,xi,so(e)),s<1?(o=t=>{const r=t*s,o=r*e,i=r-n,a=Si(t,s),l=Math.exp(-o);return yi-i/a*l},i=t=>{const r=t*s*e,i=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=Si(Math.pow(t,2),s);return(-o(t)+yi>0?-1:1)*((i-a)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-yi,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let n=1;n<Ei;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=io(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...r,velocity:-so(r.velocity||0)}),p=d||0,m=l/(2*Math.sqrt(a*c)),f=i-o,y=so(Math.sqrt(a/c)),v=Math.abs(f)<5;let x;if(n||(n=v?.01:2),t||(t=v?.005:.5),m<1){const e=Si(y,m);x=t=>{const n=Math.exp(-m*y*t);return i-n*((p+m*y*f)/e*Math.sin(e*t)+f*Math.cos(e*t))}}else if(1===m)x=e=>i-Math.exp(-y*e)*(f+(p+y*f)*e);else{const e=y*Math.sqrt(m*m-1);x=t=>{const n=Math.exp(-m*y*t),r=Math.min(e*t,300);return i-n*((p+m*y*f)*Math.sinh(r)+e*f*Math.cosh(r))/e}}return{calculatedDuration:h&&u||null,next:e=>{const r=x(e);if(h)s.done=e>=u;else{let o=p;0!==e&&(o=m<1?gi(x,e,r):0);const a=Math.abs(o)<=n,l=Math.abs(i-r)<=t;s.done=a&&l}return s.value=s.done?i:r,s}}}function Ai({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let m=n*t;const f=d+m,g=void 0===s?f:s(f);g!==f&&(m=g-d);const y=e=>-m*Math.exp(-e/r),v=e=>g+y(e),x=e=>{const t=y(e),n=v(e);h.done=Math.abs(t)<=c,h.value=h.done?g:n};let w,b;const E=e=>{(e=>void 0!==a&&e<a||void 0!==l&&e>l)(h.value)&&(w=e,b=ki({keyframes:[h.value,p(h.value)],velocity:gi(v,e,h.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return b||void 0!==w||(t=!0,x(e),E(e)),void 0!==w&&e>=w?b.next(e-w):(!t&&x(e),h)}}}const _i=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Li(e,t,n,r){if(e===t&&n===r)return f;return o=>0===o||1===o?o:_i(function(e,t,n,r,o){let i,s,a=0;do{s=t+(n-t)/2,i=_i(s,r,o)-e,i>0?n=s:t=s}while(Math.abs(i)>1e-7&&++a<12);return s}(o,0,1,e,n),t,r)}const Di=Li(.42,0,1,1),Mi=Li(0,0,.58,1),Ni=Li(.42,0,.58,1),Oi=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ri=e=>t=>1-e(1-t),Vi=e=>1-Math.sin(Math.acos(e)),Fi=Ri(Vi),ji=Oi(Vi),Ii=Li(.33,1.53,.69,.99),Bi=Ri(Ii),Hi=Oi(Bi),zi={linear:f,easeIn:Di,easeInOut:Ni,easeOut:Mi,circIn:Vi,circInOut:ji,circOut:Fi,backIn:Bi,backInOut:Hi,backOut:Ii,anticipate:e=>(e*=2)<1?.5*Bi(e):.5*(2-Math.pow(2,-10*(e-1)))},Ui=e=>{if(Array.isArray(e)){y(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Li(t,n,r,o)}return"string"==typeof e?(y(void 0!==zi[e],`Invalid easing type '${e}'`),zi[e]):e},Wi=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},$i=(e,t,n)=>e+(t-e)*n;function qi(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 Gi(e,t){return n=>n>0?t:e}const Yi=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Ki=[zo,Ho,Uo];function Xi(e){const t=(e=>Ki.find((t=>t.test(e))))(e);if(g(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===Uo&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;o=qi(a,r,e+1/3),i=qi(a,r,e),s=qi(a,r,e-1/3)}else o=i=s=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*s),alpha:r}}(n)),n}const Zi=(e,t)=>{const n=Xi(e),r=Xi(t);if(!n||!r)return Gi(e,t);const o={...n};return e=>(o.red=Yi(n.red,r.red,e),o.green=Yi(n.green,r.green,e),o.blue=Yi(n.blue,r.blue,e),o.alpha=$i(n.alpha,r.alpha,e),Ho.transform(o))},Ji=new Set(["none","hidden"]);function Qi(e,t){return n=>$i(e,t,n)}function es(e){return"number"==typeof e?Qi:"string"==typeof e?qn(e)?Gi:Wo.test(e)?Zi:rs:Array.isArray(e)?ts:"object"==typeof e?Wo.test(e)?Zi:ns:Gi}function ts(e,t){const n=[...e],r=n.length,o=e.map(((e,n)=>es(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function ns(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=es(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const rs=(e,t)=>{const n=ti.createTransformer(t),r=Zo(e),o=Zo(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?Ji.has(e)&&!o.values.length||Ji.has(t)&&!r.values.length?function(e,t){return Ji.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Hr(ts(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;r[i]=l,o[s]++}return r}(r,o),o.values),n):(g(!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.`),Gi(e,t))};function os(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?$i(e,t,n):es(e)(e,t)}function is({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Ui):Ui(r),i={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Wi(0,t,r);e.push($i(n,1,o))}}(t,e.length-1),t}(t),e),a=function(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(y(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||os,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]||f:t;i=Hr(e,i)}r.push(i)}return r}(t,r,o),a=s.length,l=t=>{let n=0;if(a>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=Wi(e[n],e[n+1],t);return s[n](r)};return n?t=>l(En(e[0],e[i-1],t)):l}(s,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||Ni)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=a(t),i.done=t>=e,i)}}const ss=e=>{const t=({timestamp:t})=>e(t);return{start:()=>_r.update(t,!0),stop:()=>Lr(t),now:()=>Dr.isProcessing?Dr.timestamp:yo.now()}},as={decay:Ai,inertia:Ai,tween:is,keyframes:is,spring:ki},ls=e=>e/100;class cs extends pi{constructor({KeyframeResolver:e=Fo,...t}){super(t),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",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:n,motionValue:r,keyframes:o}=this.options,i=(e,t)=>this.onKeyframesResolved(e,t);n&&r&&r.owner?this.resolver=r.owner.resolveKeyframes(o,i,n,r):this.resolver=new e(o,i,n,r),this.resolver.scheduleResolve()}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,s=as[t]||is;let a,l;s!==is&&"number"!=typeof e[0]&&(a=Hr(ls,os(e[0],e[1])),e=[0,100]);const c=s({...this.options,keyframes:e});"mirror"===o&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:a,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:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:m,onUpdate:f}=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 g=this.currentTime-d*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let v=this.currentTime,x=o;if(h){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,h+1),Boolean(t%2)&&("reverse"===p?(n=1-n,m&&(n-=m/u)):"mirror"===p&&(x=i)),v=En(0,1,n)*u}const w=y?{done:!1,value:a[0]}:x.next(v);s&&(w.value=s(w.value));let{done:b}=w;y||null===l||(b=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const E=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return E&&void 0!==r&&(w.value=mo(a,this.options,r)),f&&f(w.value),E&&this.finish(),w}get duration(){const{resolved:e}=this;return e?so(e.calculatedDuration):0}get time(){return so(this.currentTime)}set time(e){e=io(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=so(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=ss,onPlay:t}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=n),"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 us=e=>Array.isArray(e)&&"number"==typeof e[0];function ds(e){return Boolean(!e||"string"==typeof e&&e in ps||us(e)||Array.isArray(e)&&e.every(ds))}const hs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ps={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:hs([0,.65,.55,1]),circOut:hs([.55,0,1,.45]),backIn:hs([.31,.01,.66,-.59]),backOut:hs([.33,1.53,.69,.99])};function ms(e){return fs(e)||ps.easeOut}function fs(e){return e?us(e)?hs(e):Array.isArray(e)?e.map(ms):ps[e]:void 0}const gs=di((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));class ys extends pi{constructor(e){super(e);const{name:t,motionValue:n,keyframes:r}=this.options;this.resolver=new ui(r,((e,t)=>this.onKeyframesResolved(e,t)),t,n),this.resolver.scheduleResolve()}initPlayback(e,t){var n;let{duration:r=300,times:o,ease:i,type:s,motionValue:a,name:l}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if("spring"===(c=this.options).type||!ds(c.ease)){const{onComplete:t,onUpdate:n,motionValue:a,...l}=this.options,c=function(e,t){const n=new cs({...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,l);1===(e=c.keyframes).length&&(e[1]=e[0]),r=c.duration,o=c.times,i=c.ease,s="keyframes"}var c;const u=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=fs(a);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"===s?"alternate":"normal"})}(a.owner.current,l,e,{...this.options,duration:r,times:o,ease:i});return u.startTime=yo.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;a.set(mo(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:s,ease:i,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return so(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return so(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=io(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}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return f;const{animation:n}=t;n.timeline=e,n.onfinish=null}else this.pendingTimeline=e;return f}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:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,...l}=this.options,c=new cs({...l,keyframes:n,duration:r,type:o,ease:i,times:s,isGenerator:!0}),u=io(this.time);e.setWithVelocity(c.sample(u-10).value,c.sample(u).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;return gs()&&n&&br.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==o&&0!==i&&"inertia"!==s}}const vs=di((()=>void 0!==window.ScrollTimeline));class xs{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}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){const t=this.animations.map((t=>{if(!vs()||!t.attachTimeline)return t.pause(),function(e,n){let r;const o=()=>{const{currentTime:e}=n,o=(null===e?0:e.value)/100;r!==o&&(e=>{t.time=t.duration*e})(o),r=o};return _r.update(o,!0),()=>Lr(o)}(0,e);t.attachTimeline(e)}));return()=>{t.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 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]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const ws=(e,t,n,r={},o,i,s)=>a=>{const l=ho(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u-=io(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(l)||(d={...d,...uo(e,d)}),d.duration&&(d.duration=io(d.duration)),d.repeatDelay&&(d.repeatDelay=io(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let h=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(h=!0)),h&&!i&&void 0!==t.get()){const e=mo(d.keyframes,l);if(void 0!==e)return _r.update((()=>{d.onUpdate(e),d.onComplete()})),new xs([])}return!i&&ys.supports(d)?new ys(d):new cs(d)};class bs{constructor(){this.subscriptions=[]}add(e){return Sr(this.subscriptions,e),()=>Tr(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}}const Es={current:void 0};class Ss{constructor(e,t={}){this.version="11.3.21",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=yo.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=yo.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 bs);const n=this.events[e].add(t);return"change"===e?()=>{n(),_r.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 Es.current&&Es.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=yo.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return mi(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 Ts(e,t){return new Ss(e,t)}function Cs(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ts(n))}function Ps(e){return e.getProps()[zt]}class ks extends Ss{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(e){const t=Er(e);if(!t)return;const n=this.counts.get(t)||0;this.counts.set(t,n+1),0===n&&(this.output.push(t),this.update());let r=!1;return()=>{if(r)return;r=!0;const e=this.counts.get(t)-1;this.counts.set(t,e),0===e&&(Tr(this.output,t),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}function As(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");return r||(null===(n=e.props.style)||void 0===n?void 0:n.willChange)||(r=new ks("auto"),e.addValue("willChange",r)),o=r,Boolean(wn(o)&&o.add)?r.add(t):void 0;var o}function _s({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Ls(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=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&&_s(u,t))continue;const a={delay:n,elapsed:0,...ho(s||{},t)};let d=!1;if(window.HandoffAppearAnimations){const n=Ps(e);if(n){const e=window.HandoffAppearAnimations(n,t,r,_r);null!==e&&(a.elapsed=e,d=!0)}}r.start(ws(t,r,o,e.shouldReduceMotion&&vn.has(t)?{type:!1}:a,e,d,As(e,t)));const h=r.animation;h&&c.push(h)}return a&&Promise.all(c).then((()=>{_r.update((()=>{a&&function(e,t){const n=oo(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)Cs(e,t,xr(i[t]))}(e,a)}))})),c}function Ds(e,t,n={}){var r;const o=oo(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 s=o?()=>Promise.all(Ls(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:s,staggerDirection:a}=i;return function(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(Ms).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push(Ds(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,o+r,s,a,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then((()=>t()))}return Promise.all([s(),a(n.delay)])}function Ms(e,t){return e.sortNodePosition(t)}const Ns=[...nn].reverse(),Os=nn.length;function Rs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Vs(){return{animate:Rs(!0),whileInView:Rs(),whileHover:Rs(),whileTap:Rs(),whileDrag:Rs(),whileFocus:Rs(),exit:Rs()}}let Fs=0;const js={animation:{Feature:class extends Gr{constructor(e){super(e),e.animationState||(e.animationState=function(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=>Ds(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=Ds(e,t,n);else{const o="function"==typeof t?oo(e,t,n.custom):t;r=Promise.all(Ls(e,o,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}(e),n=Vs(),r=!0;const o=t=>(n,r)=>{var o;const i=oo(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 s=e.getProps(),a=e.getVariantContext(!0)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Os;t++){const m=Ns[t],f=n[m],g=void 0!==s[m]?s[m]:a[m],y=en(g),v=m===i?f.isActive:null;!1===v&&(d=t);let x=g===a[m]&&g!==s[m]&&y;if(x&&r&&e.manuallyAnimateOnMount&&(x=!1),f.protectedKeys={...u},!f.isActive&&null===v||!g&&!f.prevProp||tn(g)||"boolean"==typeof g)continue;let w=(h=f.prevProp,("string"==typeof(p=g)?p!==h:!!Array.isArray(p)&&!ro(p,h))||m===i&&f.isActive&&!x&&y||t>d&&y),b=!1;const E=Array.isArray(g)?g:[g];let S=E.reduce(o(m),{});!1===v&&(S={});const{prevResolvedValues:T={}}=f,C={...T,...S},P=t=>{w=!0,c.has(t)&&(b=!0,c.delete(t)),f.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in C){const t=S[e],n=T[e];if(u.hasOwnProperty(e))continue;let r=!1;r=yr(t)&&yr(n)?!ro(t,n):t!==n,r?null!=t?P(e):c.add(e):void 0!==t&&c.has(e)?P(e):f.protectedKeys[e]=!0}f.prevProp=g,f.prevResolvedValues=S,f.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(w=!1),!w||x&&!b||l.push(...E.map((e=>({animation:e,options:{type:m}}))))}var h,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 m=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(m=!1),r=!1,m?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 s=i(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Vs(),r=!0}}}(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 Gr{constructor(){super(...arguments),this.id=Fs++}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(){}}}},Is=(e,t)=>Math.abs(e-t);class Bs{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=Us(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Is(e.x,t.x),r=Is(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}=Dr;this.history.push({...r,timestamp:o});const{onStart:i,onMove:s}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Hs(t,this.transformPagePoint),_r.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=Us("pointercancel"===e.type?this.lastMoveEventInfo:Hs(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!Vr(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=Hs(Fr(e),this.transformPagePoint),{point:s}=i,{timestamp:a}=Dr;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,Us(i,this.history)),this.removeListeners=Hr(Ir(this.contextWindow,"pointermove",this.handlePointerMove),Ir(this.contextWindow,"pointerup",this.handlePointerUp),Ir(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Lr(this.updatePoint)}}function Hs(e,t){return t?{point:t(e.point)}:e}function zs(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Us({point:e},t){return{point:e,delta:zs(e,$s(t)),offset:zs(e,Ws(t)),velocity:qs(t,.1)}}function Ws(e){return e[0]}function $s(e){return e[e.length-1]}function qs(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=$s(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>io(t)));)n--;if(!r)return{x:0,y:0};const i=so(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}const Gs=.9999,Ys=1.0001,Ks=-.01,Xs=.01;function Zs(e){return e.max-e.min}function Js(e,t,n,r=.5){e.origin=r,e.originPoint=$i(t.min,t.max,e.origin),e.scale=Zs(n)/Zs(t),e.translate=$i(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Gs&&e.scale<=Ys||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ks&&e.translate<=Xs||isNaN(e.translate))&&(e.translate=0)}function Qs(e,t,n,r){Js(e.x,t.x,n.x,r?r.originX:void 0),Js(e.y,t.y,n.y,r?r.originY:void 0)}function ea(e,t,n){e.min=n.min+t.min,e.max=e.min+Zs(t)}function ta(e,t,n){e.min=t.min-n.min,e.max=e.min+Zs(t)}function na(e,t,n){ta(e.x,t.x,n.x),ta(e.y,t.y,n.y)}function ra(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 oa(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 ia=.35;function sa(e,t,n){return{min:aa(e,t),max:aa(e,n)}}function aa(e,t){return"number"==typeof e?e:e[t]||0}const la=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),ca=()=>({x:{min:0,max:0},y:{min:0,max:0}});function ua(e){return[e("x"),e("y")]}function da({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ha(e){return void 0===e||1===e}function pa({scale:e,scaleX:t,scaleY:n}){return!ha(e)||!ha(t)||!ha(n)}function ma(e){return pa(e)||fa(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function fa(e){return ga(e.x)||ga(e.y)}function ga(e){return e&&"0%"!==e}function ya(e,t,n){return n+t*(e-n)}function va(e,t,n,r,o){return void 0!==o&&(e=ya(e,o,r)),ya(e,n,r)+t}function xa(e,t=0,n=1,r,o){e.min=va(e.min,t,n,r,o),e.max=va(e.max,t,n,r,o)}function wa(e,{x:t,y:n}){xa(e.x,t.translate,t.scale,t.originPoint),xa(e.y,n.translate,n.scale,n.originPoint)}const ba=.999999999999,Ea=1.0000000000001;function Sa(e,t){e.min=e.min+t,e.max=e.max+t}function Ta(e,t,n,r,o=.5){xa(e,t,n,$i(e.min,e.max,o),r)}function Ca(e,t){Ta(e.x,t.x,t.scaleX,t.scale,t.originX),Ta(e.y,t.y,t.scaleY,t.scale,t.originY)}function Pa(e,t){return da(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 ka=({current:e})=>e?e.ownerDocument.defaultView:null,Aa=new WeakMap;class _a{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ca(),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 Bs(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Fr(e,"page").point)},onStart:(e,t)=>{var n;const{drag:r,dragPropagation:o,onDragStart:i}=this.getProps();if(r&&!o&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=$r(r),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ua((e=>{let t=this.getAxisMotionValue(e).get()||0;if(On.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=Zs(r)*(parseFloat(t)/100))}}this.originPoint[e]=t})),i&&_r.postRender((()=>i(e,t))),null===(n=this.removeWillChange)||void 0===n||n.call(this),this.removeWillChange=As(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=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}(s),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>ua((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:ka(this.visualElement)})}stop(e,t){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=t;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&_r.postRender((()=>i(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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!La(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?$i(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?$i(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&&Gt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:ra(e.x,n,o),y:ra(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=ia){return!1===e?e=0:!0===e&&(e=ia),{x:sa(e,"left","right"),y:sa(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ua((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||!Gt(e))return!1;const n=e.current;y(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=Pa(e,n),{scroll:o}=t;return o&&(Sa(r.x,o.offset.x),Sa(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:oa(e.x,t.x),y:oa(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=da(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=ua((s=>{if(!La(s,t,this.currentDirection))return;let l=a&&a[s]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[s]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(s,d)}));return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(ws(e,n,0,t,this.visualElement,!1,As(this.visualElement,e)))}stopAnimation(){ua((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){ua((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){ua((t=>{const{drag:n}=this.getProps();if(!La(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]-$i(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Gt(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};ua((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=Zs(e),o=Zs(t);return o>r?n=Wi(t.min,t.max-r,e.min):r>o&&(n=Wi(e.min,e.max-o,t.min)),En(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(),ua((t=>{if(!La(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set($i(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Aa.set(this.visualElement,this);const e=Ir(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Gt(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()),_r.read(t);const o=Rr(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(ua((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=ia,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:s}}}function La(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Da=e=>(t,n)=>{e&&_r.postRender((()=>e(t,n)))},Ma={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Na(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Oa={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Rn.test(e))return e;e=parseFloat(e)}return`${Na(e,t.target.x)}% ${Na(e,t.target.y)}%`}},Ra={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ti.parse(e);if(o.length>5)return r;const i=ti.createTransformer(e),s="number"!=typeof o[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=$i(a,l,.5);return"number"==typeof o[2+s]&&(o[2+s]/=c),"number"==typeof o[3+s]&&(o[3+s]/=c),i(o)}};class Va extends e.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=ja,Object.assign(gn,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()})),Ma.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()||_r.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),$t.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 Fa(t){const[n,r]=function(){const t=(0,e.useContext)(a);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=(0,e.useId)();(0,e.useEffect)((()=>o(i)),[]);const s=(0,e.useCallback)((()=>r&&r(i)),[i,r]);return!n&&r?[!1,s]:[!0]}(),o=(0,e.useContext)(m);return(0,s.jsx)(Va,{...t,layoutGroup:o,switchLayoutGroup:(0,e.useContext)(Yt),isPresent:n,safeToRemove:r})}const ja={borderRadius:{...Oa,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Oa,borderTopRightRadius:Oa,borderBottomLeftRadius:Oa,borderBottomRightRadius:Oa,boxShadow:Ra},Ia=["TopLeft","TopRight","BottomLeft","BottomRight"],Ba=Ia.length,Ha=e=>"string"==typeof e?parseFloat(e):e,za=e=>"number"==typeof e||Rn.test(e);function Ua(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Wa=qa(0,.5,Fi),$a=qa(.5,.95,f);function qa(e,t,n){return r=>r<e?0:r>t?1:n(Wi(e,t,r))}function Ga(e,t){e.min=t.min,e.max=t.max}function Ya(e,t){Ga(e.x,t.x),Ga(e.y,t.y)}function Ka(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Xa(e,t,n,r,o){return e=ya(e-=t,1/n,r),void 0!==o&&(e=ya(e,1/o,r)),e}function Za(e,t,[n,r,o],i,s){!function(e,t=0,n=1,r=.5,o,i=e,s=e){if(On.test(t)&&(t=parseFloat(t),t=$i(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=$i(i.min,i.max,r);e===i&&(a-=t),e.min=Xa(e.min,t,n,a,o),e.max=Xa(e.max,t,n,a,o)}(e,t[n],t[r],t[o],t.scale,i,s)}const Ja=["x","scaleX","originX"],Qa=["y","scaleY","originY"];function el(e,t,n,r){Za(e.x,t,Ja,n?n.x:void 0,r?r.x:void 0),Za(e.y,t,Qa,n?n.y:void 0,r?r.y:void 0)}function tl(e){return 0===e.translate&&1===e.scale}function nl(e){return tl(e.x)&&tl(e.y)}function rl(e,t){return e.min===t.min&&e.max===t.max}function ol(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function il(e,t){return ol(e.x,t.x)&&ol(e.y,t.y)}function sl(e){return Zs(e.x)/Zs(e.y)}function al(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ll{constructor(){this.members=[]}add(e){Sr(this.members,e),e.scheduleRender()}remove(e){if(Tr(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 cl=(e,t)=>e.depth-t.depth;class ul{constructor(){this.children=[],this.isDirty=!1}add(e){Sr(this.children,e),this.isDirty=!0}remove(e){Tr(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(cl),this.isDirty=!1,this.children.forEach(e)}}const dl={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},hl="undefined"!=typeof window&&void 0!==window.MotionDebug,pl=["","X","Y","Z"],ml={visibility:"hidden"};let fl=0;function gl(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function yl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return!!t&&(!!Ps(t)||!(!e.parent||e.parent.hasCheckedOptimisedAppear)&&yl(e.parent))}function vl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=fl++,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,hl&&(dl.totalNodes=dl.resolvedTargetDeltas=dl.recalculatedProjection=0),this.nodes.forEach(bl),this.nodes.forEach(Al),this.nodes.forEach(_l),this.nodes.forEach(El),hl&&window.MotionDebug.record(dl)},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 ul)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new bs),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:s}=this.options;if(s&&!s.current&&s.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=yo.now(),r=({timestamp:t})=>{const o=t-n;o>=250&&(Lr(r),e(o-250))};return _r.read(r,!0),()=>Lr(r)}(r),Ma.hasAnimatedSinceResize&&(Ma.hasAnimatedSinceResize=!1,this.nodes.forEach(kl))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&s&&(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||s.getDefaultTransition()||Rl,{onLayoutAnimationStart:i,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!il(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={...ho(o,"layout"),onPlay:i,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||kl(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,Lr(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(Ll),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.HandoffCancelAllAnimations&&yl(this)&&window.HandoffCancelAllAnimations(),!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(Tl);this.isUpdating||this.nodes.forEach(Cl),this.isUpdating=!1,this.nodes.forEach(Pl),this.nodes.forEach(xl),this.nodes.forEach(wl),this.clearAllSnapshots();const e=yo.now();Dr.delta=En(0,1e3/60,e-Dr.timestamp),Dr.timestamp=e,Dr.isProcessing=!0,Mr.update.process(Dr),Mr.preRender.process(Dr),Mr.render.process(Dr),Dr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$t.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Sl),this.sharedNodes.forEach(Dl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_r.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_r.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=ca(),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&&!nl(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||ma(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)),jl((r=n).x),jl(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 ca();const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(Bl)){const{scroll:e}=this.root;e&&(Sa(n.x,e.offset.x),Sa(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n=ca();if(Ya(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&&Ya(n,e),Sa(n.x,o.offset.x),Sa(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n=ca();Ya(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&&Ca(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),ma(r.latestValues)&&Ca(n,r.latestValues)}return ma(this.latestValues)&&Ca(n,this.latestValues),n}removeTransform(e){const t=ca();Ya(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!ma(n.latestValues))continue;pa(n.latestValues)&&n.updateSnapshot();const r=ca();Ya(r,n.measurePageBox()),el(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return ma(this.latestValues)&&el(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!==Dr.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=Dr.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ca(),this.relativeTargetOrigin=ca(),na(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Ya(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=ca(),this.targetWithTransforms=ca()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,ea(s.x,a.x,l.x),ea(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ya(this.target,this.layout.layoutBox),wa(this.target,this.targetDelta)):Ya(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=ca(),this.relativeTargetOrigin=ca(),na(this.relativeTargetOrigin,this.target,e.target),Ya(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}hl&&dl.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!pa(this.parent.latestValues)&&!fa(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===Dr.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;Ya(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,s;t.x=t.y=1;for(let a=0;a<o;a++){i=n[a],s=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&&Ca(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,wa(e,s)),r&&ma(i.latestValues)&&Ca(e,i.latestValues))}t.x<Ea&&t.x>ba&&(t.x=1),t.y<Ea&&t.y>ba&&(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=ca());const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Ka(this.prevProjectionDelta.x,this.projectionDelta.x),Ka(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Qs(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&al(this.projectionDelta.x,this.prevProjectionDelta.x)&&al(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),hl&&dl.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=la(),this.projectionDelta=la(),this.projectionDeltaWithTransform=la()}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i=la();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s=ca(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Ol));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;Ml(i.x,e.x,n),Ml(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(na(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Nl(e.x,t.x,n.x,r),Nl(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,s,n),d&&function(e,t){return rl(e.x,t.x)&&rl(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=ca()),Ya(d,this.relativeTarget)),a&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=$i(0,void 0!==n.opacity?n.opacity:1,Wa(r)),e.opacityExit=$i(void 0!==t.opacity?t.opacity:1,0,$a(r))):i&&(e.opacity=$i(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<Ba;o++){const i=`border${Ia[o]}Radius`;let s=Ua(t,i),a=Ua(n,i);void 0===s&&void 0===a||(s||(s=0),a||(a=0),0===s||0===a||za(s)===za(a)?(e[i]=Math.max($i(Ha(s),Ha(a),r),0),(On.test(a)||On.test(s))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=$i(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&&(Lr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_r.update((()=>{Ma.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=wn(0)?0:Ts(0);return r.start(ws("",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&&Il(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||ca();const t=Zs(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Zs(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Ya(t,n),Ca(t,o),Qs(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ll),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&&gl("z",e,r,this.animationValues);for(let t=0;t<pl.length;t++)gl(`rotate${pl[t]}`,e,r,this.animationValues),gl(`skew${pl[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 ml;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=wr(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=wr(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!ma(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const s=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,s=(null==n?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}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:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),o&&(r.transform=o(s,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in gn){if(void 0===s[e])continue;const{correct:t,applyTo:n}=gn[e],o="none"===r.transform?s[e]:t(s[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?wr(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(Tl),this.root.sharedNodes.clear()}}}function xl(e){e.updateLayout()}function wl(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?ua((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=Zs(r);r.min=t[e].min,r.max=r.min+o})):Il(o,n.layoutBox,t)&&ua((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],s=Zs(t[r]);o.max=o.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)}));const s=la();Qs(s,t,n.layoutBox);const a=la();i?Qs(a,e.applyTransform(r,!0),n.measuredBox):Qs(a,t,n.layoutBox);const l=!nl(s);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const s=ca();na(s,n.layoutBox,o.layoutBox);const a=ca();na(a,t,i.layoutBox),il(s,a)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function bl(e){hl&&dl.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 El(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Sl(e){e.clearSnapshot()}function Tl(e){e.clearMeasurements()}function Cl(e){e.isLayoutDirty=!1}function Pl(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function kl(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Al(e){e.resolveTargetDelta()}function _l(e){e.calcProjection()}function Ll(e){e.resetSkewAndRotation()}function Dl(e){e.removeLeadSnapshot()}function Ml(e,t,n){e.translate=$i(t.translate,0,n),e.scale=$i(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Nl(e,t,n,r){e.min=$i(t.min,n.min,r),e.max=$i(t.max,n.max,r)}function Ol(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Rl={duration:.45,ease:[.4,0,.1,1]},Vl=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Fl=Vl("applewebkit/")&&!Vl("chrome/")?Math.round:f;function jl(e){e.min=Fl(e.min),e.max=Fl(e.max)}function Il(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=sl(t),o=sl(n),.2,!(Math.abs(r-o)<=.2));var r,o}function Bl(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Hl=vl({attachResizeListener:(e,t)=>Rr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),zl={current:void 0},Ul=vl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zl.current){const e=new Hl({});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)}),Wl={pan:{Feature:class extends Gr{constructor(){super(...arguments),this.removePointerDownListener=f}onPointerDown(e){this.session=new Bs(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ka(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Da(e),onStart:Da(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&_r.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Ir(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 Gr{constructor(e){super(e),this.removeGroupControls=f,this.removeListeners=f,this.controls=new _a(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||f}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ul,MeasureLayout:Fa}},$l={current:null},ql={current:!1},Gl=new WeakMap,Yl=[...Lo,Wo,ti],Kl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Xl=rn.length;class Zl{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},s={}){this.applyWillChange=!1,this.resolveKeyframes=(e,t,n,r)=>new this.KeyframeResolver(e,t,n,r,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Fo,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,_r.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=on(t),this.isVariantNode=sn(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==a[e]&&wn(t)&&t.set(a[e],!1)}}mount(e){this.current=e,Gl.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))),ql.current||function(){if(ql.current=!0,w)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>$l.current=e.matches;e.addListener(t),t()}else $l.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||$l.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Gl.delete(this.current),this.projection&&this.projection.unmount(),Lr(this.notifyUpdate),Lr(this.render),this.valueSubscriptions.forEach((e=>e())),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){const n=vn.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&_r.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),o(),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 cn){const t=cn[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):ca()}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<Kl.length;t++){const n=Kl[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(wn(o))e.addValue(r,o);else if(wn(i))e.addValue(r,Ts(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,Ts(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()}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}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let e=0;e<Xl;e++){const n=rn[e],r=this.props[n];(en(r)||!1===r)&&(t[n]=r)}return t}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=Ts(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&&(xo(r)||vo(r))?r=parseFloat(r):!(e=>Yl.find(_o(e)))(r)&&ti.test(t)&&(r=li(e,t)),this.setBaseTarget(e,wn(r)?r.get():r)),wn(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=gr(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||wn(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 bs),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class Jl extends Zl{constructor(){super(...arguments),this.KeyframeResolver=ui}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]}}class Ql extends Jl{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=ur}readValueFromInstance(e,t){if(vn.has(t)){const e=ai(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(Wn(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Pa(e,t)}build(e,t,n){Yn(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return pr(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;wn(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class ec extends Jl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ca}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(vn.has(t)){const e=ai(t);return e&&e.default||0}return t=dr.has(t)?t:Ht(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return mr(e,t,n)}build(e,t,n){ir(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){hr(e,t,0,r)}mount(e){this.isSVGTag=ar(e.tagName),super.mount(e)}}const tc=(t,n)=>fn(t)?new ec(n):new Ql(n,{allowProjection:t!==e.Fragment}),nc={...js,...no,...Wl,layout:{ProjectionNode:Ul,MeasureLayout:Fa}},rc=pn(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r){return{...fn(e)?Nr:Or,preloadedFeatures:n,useRender:cr(t),createVisualElement:r,Component:e}}(e,t,nc,tc))),oc=window.wp.apiFetch;var ic=o.n(oc);const sc=e=>{try{return JSON.parse(e)}catch(e){return{}}},ac=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=t=e(r,o,i);return i};var lc=o(798);const{useDebugValue:cc}=e,{useSyncExternalStoreWithSelector:uc}=lc;let dc=!1;const hc=e=>e,pc=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?(e=>e?ac(e):ac)(e):e,n=(e,n)=>function(e,t=hc,n){n&&!dc&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),dc=!0);const r=uc(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return cc(r),r}(t,e,n);return Object.assign(n,t),n},mc=e=>e?pc(e):pc,fc=new Map,gc=e=>{const t=fc.get(e);return t?Object.fromEntries(Object.entries(t.stores).map((([e,t])=>[e,t.getState()]))):{}},yc=(e,t={})=>(n,r,o)=>{const{enabled:i,anonymousActionType:s,store:a,...l}=t;let c;try{c=(null==i||i)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(e){}if(!c)return i&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,o);const{connection:u,...d}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};const r=fc.get(n.name);if(r)return{type:"tracked",store:e,...r};const o={connection:t.connect(n),stores:{}};return fc.set(n.name,o),{type:"tracked",store:e,...o}})(a,c,l);let h=!0;o.setState=(e,t,i)=>{const c=n(e,t);if(!h)return c;const d=void 0===i?{type:s||"anonymous"}:"string"==typeof i?{type:i}:i;return void 0===a?(null==u||u.send(d,r()),c):(null==u||u.send({...d,type:`${a}/${d.type}`},{...gc(l.name),[a]:o.getState()}),c)};const p=(...e)=>{const t=h;h=!1,n(...e),h=t},m=e(o.setState,r,o);if("untracked"===d.type?null==u||u.init(m):(d.stores[d.store]=o,null==u||u.init(Object.fromEntries(Object.entries(d.stores).map((([e,t])=>[e,e===d.store?m:t.getState()]))))),o.dispatchFromDevtools&&"function"==typeof o.dispatch){let e=!1;const t=o.dispatch;o.dispatch=(...n)=>{"__setState"!==n[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...n)}}return u.subscribe((e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):vc(e.payload,(e=>{if("__setState"!==e.type)o.dispatchFromDevtools&&"function"==typeof o.dispatch&&o.dispatch(e);else{if(void 0===a)return void p(e.state);1!==Object.keys(e.state).length&&console.error('\n [zustand devtools middleware] Unsupported __setState action format. \n When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n ');const t=e.state[a];if(null==t)return;JSON.stringify(o.getState())!==JSON.stringify(t)&&p(t)}}));case"DISPATCH":switch(e.payload.type){case"RESET":return p(m),void 0===a?null==u?void 0:u.init(o.getState()):null==u?void 0:u.init(gc(l.name));case"COMMIT":return void 0===a?void(null==u||u.init(o.getState())):null==u?void 0:u.init(gc(l.name));case"ROLLBACK":return vc(e.state,(e=>{if(void 0===a)return p(e),void(null==u||u.init(o.getState()));p(e[a]),null==u||u.init(gc(l.name))}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return vc(e.state,(e=>{void 0!==a?JSON.stringify(o.getState())!==JSON.stringify(e[a])&&p(e[a]):p(e)}));case"IMPORT_STATE":{const{nextLiftedState:n}=e.payload,r=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!r)return;return p(void 0===a?r:r[a]),void(null==u||u.send(null,n))}case"PAUSE_RECORDING":return h=!h}return}})),m},vc=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==n&&t(n)};function xc(e,t){let n;try{n=e()}catch(e){return}return{getItem:e=>{var r;const o=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(r=n.getItem(e))?r:null;return i instanceof Promise?i.then(o):o(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}const wc=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>wc(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>wc(t)(e)}}},bc=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),((e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1;const a=new Set,l=new Set;let c;try{c=i.getStorage()}catch(e){}if(!c)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...e)}),r,o);const u=wc(i.serialize),d=()=>{const e=i.partialize({...r()});let t;const n=u({state:e,version:i.version}).then((e=>c.setItem(i.name,e))).catch((e=>{t=e}));if(t)throw t;return n},h=o.setState;o.setState=(e,t)=>{h(e,t),d()};const p=e(((...e)=>{n(...e),d()}),r,o);let m;const f=()=>{var e;if(!c)return;s=!1,a.forEach((e=>e(r())));const t=(null==(e=i.onRehydrateStorage)?void 0:e.call(i,r()))||void 0;return wc(c.getItem.bind(c))(i.name).then((e=>{if(e)return i.deserialize(e)})).then((e=>{if(e){if("number"!=typeof e.version||e.version===i.version)return e.state;if(i.migrate)return i.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return m=i.merge(e,null!=(t=r())?t:p),n(m,!0),d()})).then((()=>{null==t||t(m,void 0),s=!0,l.forEach((e=>e(m)))})).catch((e=>{null==t||t(void 0,e)}))};return o.persist={setOptions:e=>{i={...i,...e},e.getStorage&&(c=e.getStorage())},clearStorage:()=>{null==c||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>f(),hasHydrated:()=>s,onHydrate:e=>(a.add(e),()=>{a.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},f(),m||p})(e,t)):((e,t)=>(n,r,o)=>{let i={storage:xc((()=>localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1;const a=new Set,l=new Set;let c=i.storage;if(!c)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...e)}),r,o);const u=()=>{const e=i.partialize({...r()});return c.setItem(i.name,{state:e,version:i.version})},d=o.setState;o.setState=(e,t)=>{d(e,t),u()};const h=e(((...e)=>{n(...e),u()}),r,o);let p;o.getInitialState=()=>h;const m=()=>{var e,t;if(!c)return;s=!1,a.forEach((e=>{var t;return e(null!=(t=r())?t:h)}));const o=(null==(t=i.onRehydrateStorage)?void 0:t.call(i,null!=(e=r())?e:h))||void 0;return wc(c.getItem.bind(c))(i.name).then((e=>{if(e){if("number"!=typeof e.version||e.version===i.version)return[!1,e.state];if(i.migrate)return[!0,i.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]})).then((e=>{var t;const[o,s]=e;if(p=i.merge(s,null!=(t=r())?t:h),n(p,!0),o)return u()})).then((()=>{null==o||o(p,void 0),p=r(),s=!0,l.forEach((e=>e(p)))})).catch((e=>{null==o||o(void 0,e)}))};return o.persist={setOptions:e=>{i={...i,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:e=>(a.add(e),()=>{a.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},i.skipHydration||m(),p||h})(e,t),Ec="/extendify/v1/shared/activity",Sc={getItem:()=>ic()({path:Ec}),setItem:(e,t)=>ic()({path:Ec,method:"POST",data:{state:t}})},Tc=sc(window.extSharedData.activity),Cc={actions:{}},Pc=mc(bc(yc(((e,t)=>{var n;return{...Cc,...null!==(n=Tc?.state)&&void 0!==n?n:{},incrementActivity:n=>{e((e=>({...e,actions:{...e.actions,[n]:Number(t().actions[n]||0)+1}})))}}}),{name:"Extendify Activity"}),{name:"extendify_shared_activity",storage:xc((()=>Sc)),skipHydration:!0})),kc=(0,i.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,i.cloneElement)(e,{width:t,height:t,...n,ref:r})})),Ac=window.wp.primitives,_c=(0,s.jsx)(Ac.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(Ac.Path,{d:"M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z"})}),Lc=(0,s.jsx)(Ac.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(Ac.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),Dc=window.wp.blocks;var Mc=o(967),Nc=o.n(Mc);const Oc=({text:t,reset:n})=>(0,e.createElement)("div",{className:"rounded-lg border border-solid border-red-500 bg-red-100 p-5"},(0,e.createElement)("p",{className:"m-0 mb-4 text-sm text-gray-800"},t),n&&(0,e.createElement)("p",{className:"m-0"},(0,e.createElement)("button",{type:"button",className:"cursor-pointer border-none bg-transparent p-0 underline",onClick:n},(0,S.__)("Please try again.","extendify-local")))),Rc=(0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("g",{clipPath:"url(#clip0_2114_35675)"},(0,e.createElement)("path",{d:"M11.2266 6.0469V4.93948C11.0919 4.889 10.9613 4.82828 10.8359 4.75784C10.345 4.46641 9.97524 4.00815 9.79416 3.46671C9.61308 2.92526 9.63277 2.33675 9.84962 1.80862C9.97012 1.5206 10.1452 1.25862 10.3652 1.03713C10.5846 0.817735 10.8447 0.643251 11.1309 0.523459C11.4193 0.403518 11.7287 0.342425 12.041 0.343772C12.5103 0.343706 12.9689 0.48286 13.359 0.74362C13.7491 1.00438 14.0531 1.37502 14.2324 1.80862C14.4719 2.38837 14.4719 3.03941 14.2324 3.61917C14.1131 3.90723 13.9378 4.16878 13.7168 4.3887L13.7051 4.40042C13.566 4.53722 13.4113 4.65718 13.2442 4.75784C13.1202 4.83102 12.9894 4.89186 12.8535 4.93948V6.0469H18.416C19.2143 6.04948 19.9792 6.36788 20.5435 6.93255C21.1078 7.49722 21.4257 8.26227 21.4278 9.06058V9.50784H22.459C22.8681 9.50939 23.2599 9.67272 23.549 9.96217C23.8381 10.2516 24.0009 10.6437 24.002 11.0528V14.6407C24.0009 15.0497 23.8381 15.4418 23.549 15.7313C23.2599 16.0207 22.8681 16.184 22.459 16.1856H21.4336V16.5899C21.431 17.389 21.1122 18.1547 20.5467 18.7194C19.9812 19.2841 19.2152 19.602 18.416 19.6036H10.7852L6.21094 23.5313C6.16052 23.5746 6.10202 23.6075 6.03882 23.6281C5.97562 23.6487 5.90897 23.6566 5.84271 23.6514C5.77644 23.6461 5.71188 23.6278 5.65273 23.5974C5.59357 23.5671 5.54101 23.5254 5.49805 23.4747C5.41215 23.3745 5.36809 23.2451 5.37501 23.1133L5.61915 19.5977H5.57813C4.78086 19.5956 4.01681 19.2781 3.45287 18.7146C2.88893 18.151 2.57094 17.3871 2.56836 16.5899V16.1856H1.54297C1.13355 16.1846 0.74119 16.0215 0.451684 15.7319C0.162178 15.4424 -0.00092183 15.0501 -0.00195312 14.6407L-0.00195312 11.0528C-0.000924304 10.6437 0.161907 10.2516 0.450991 9.96217C0.740076 9.67272 1.13193 9.50939 1.54102 9.50784H2.56836V9.05862C2.56991 8.26068 2.88744 7.49583 3.45149 6.93141C4.01554 6.367 4.78019 6.04897 5.57813 6.0469H11.2266ZM16.1582 9.58597C16.5198 9.58597 16.8732 9.69319 17.1739 9.89406C17.4745 10.0949 17.7088 10.3805 17.8472 10.7145C17.9856 11.0485 18.0218 11.4161 17.9512 11.7707C17.8807 12.1254 17.7066 12.4511 17.4509 12.7068C17.1952 12.9624 16.8695 13.1366 16.5149 13.2071C16.1602 13.2776 15.7927 13.2414 15.4586 13.1031C15.1246 12.9647 14.8391 12.7304 14.6382 12.4297C14.4373 12.1291 14.3301 11.7757 14.3301 11.4141C14.3301 10.9292 14.5227 10.4643 14.8655 10.1214C15.2084 9.77857 15.6734 9.58597 16.1582 9.58597ZM7.8418 9.58597C8.20337 9.58597 8.55682 9.69319 8.85746 9.89406C9.15809 10.0949 9.39241 10.3805 9.53077 10.7145C9.66914 11.0485 9.70534 11.4161 9.6348 11.7707C9.56427 12.1254 9.39015 12.4511 9.13448 12.7068C8.87882 12.9624 8.55308 13.1366 8.19845 13.2071C7.84383 13.2776 7.47626 13.2414 7.14221 13.1031C6.80816 12.9647 6.52265 12.7304 6.32177 12.4297C6.1209 12.1291 6.01368 11.7757 6.01368 11.4141C6.01368 10.9292 6.20628 10.4643 6.54912 10.1214C6.89196 9.77857 7.35695 9.58597 7.8418 9.58597ZM9.0879 15.711C9.06032 15.6892 9.03541 15.6643 9.01368 15.6368C8.95038 15.5625 8.91453 15.4687 8.91212 15.3711C8.91035 15.2731 8.94204 15.1773 9.00196 15.0996C9.02434 15.0714 9.0499 15.0459 9.07813 15.0235C9.18557 14.9388 9.31767 14.8915 9.45442 14.8887C9.59117 14.8859 9.72511 14.9277 9.83595 15.0078C10.1697 15.2712 10.5402 15.4844 10.9356 15.6407C11.2762 15.7724 11.6387 15.8387 12.0039 15.836C12.3737 15.8281 12.7393 15.7554 13.084 15.6211C13.4841 15.4612 13.8616 15.2498 14.207 14.9922C14.3204 14.9149 14.4558 14.8766 14.5928 14.8829C14.7298 14.8893 14.8611 14.94 14.9668 15.0274C14.9933 15.0518 15.0175 15.0786 15.0391 15.1075C15.0965 15.1867 15.1254 15.2831 15.1211 15.3809C15.1128 15.4787 15.073 15.5712 15.0078 15.6446C14.9831 15.6727 14.9548 15.6977 14.9238 15.7188C14.4846 16.0434 14.0029 16.3063 13.4922 16.5C13.0218 16.6774 12.5242 16.7719 12.0215 16.7793C11.5182 16.7864 11.0179 16.7016 10.5449 16.5293C10.0237 16.3343 9.53556 16.0603 9.09766 15.7168L9.0879 15.711ZM18.4141 7.06253H5.57813C5.04903 7.06459 4.54222 7.27582 4.16826 7.65014C3.79431 8.02445 3.58358 8.53147 3.58203 9.06058V16.5899C3.58358 17.119 3.79431 17.626 4.16826 18.0003C4.54222 18.3746 5.04903 18.5859 5.57813 18.5879H6.19727C6.33117 18.5979 6.45571 18.6604 6.54384 18.7617C6.63197 18.863 6.67658 18.995 6.66797 19.1289L6.47266 21.9766L10.2422 18.7325C10.2891 18.6856 10.3448 18.6485 10.4062 18.6233C10.4676 18.5982 10.5333 18.5855 10.5996 18.586H18.4121C18.9412 18.5839 19.448 18.3727 19.822 17.9984C20.1959 17.6241 20.4067 17.117 20.4082 16.5879V9.05862C20.4072 8.52988 20.1968 8.02306 19.8231 7.649C19.4494 7.27494 18.9428 7.06408 18.4141 7.06253Z"})),(0,e.createElement)("defs",null,(0,e.createElement)("clipPath",{id:"clip0_2114_35675"},(0,e.createElement)("rect",{width:"24",height:"23.3106",transform:"translate(0 0.34375)"})))),Vc=(0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M3.51 6.03L11.02 9.25L3.5 8.25L3.51 6.03ZM11.01 14.75L3.5 17.97V15.75L11.01 14.75ZM1.51 3L1.5 10L16.5 12L1.5 14L1.51 21L22.5 12L1.51 3Z"})),Fc=(0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M14.1818 5H7.63636C7.03273 5 6.51636 5.36364 6.29818 5.88727L4.10182 11.0145C4.03636 11.1818 4 11.3564 4 11.5455V13C4 13.8 4.65455 14.4545 5.45455 14.4545H10.0436L9.35273 17.7782L9.33091 18.0109C9.33091 18.3091 9.45455 18.5855 9.65091 18.7818L10.4218 19.5455L15.2145 14.7527C15.4764 14.4909 15.6364 14.1273 15.6364 13.7273V6.45455C15.6364 5.65455 14.9818 5 14.1818 5ZM14.1818 13.7273L11.0255 16.8836L12 13H5.45455V11.5455L7.63636 6.45455H14.1818V13.7273ZM17.0909 5H20V13.7273H17.0909V5Z"})),jc=(0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M9.81818 19.5455H16.3636C16.9673 19.5455 17.4836 19.1818 17.7018 18.6582L19.8982 13.5309C19.9636 13.3636 20 13.1891 20 13V11.5455C20 10.7455 19.3455 10.0909 18.5455 10.0909H13.9564L14.6473 6.76727L14.6691 6.53455C14.6691 6.23636 14.5455 5.96 14.3491 5.76364L13.5782 5L8.78545 9.79273C8.52364 10.0545 8.36364 10.4182 8.36364 10.8182V18.0909C8.36364 18.8909 9.01818 19.5455 9.81818 19.5455ZM9.81818 10.8182L12.9745 7.66182L12 11.5455H18.5455V13L16.3636 18.0909H9.81818V10.8182ZM4 10.8182H6.90909V19.5455H4V10.8182Z"})),Ic=(0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M9.70492 6L8.29492 7.41L12.8749 12L8.29492 16.59L9.70492 18L15.7049 12L9.70492 6Z"})),Bc=((0,e.createElement)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M15.5 4V11H5.67L4.5 12.17V4H15.5ZM16.5 2H3.5C2.95 2 2.5 2.45 2.5 3V17L6.5 13H16.5C17.05 13 17.5 12.55 17.5 12V3C17.5 2.45 17.05 2 16.5 2ZM21.5 6H19.5V15H6.5V17C6.5 17.55 6.95 18 7.5 18H18.5L22.5 22V7C22.5 6.45 22.05 6 21.5 6Z"})),"https://kb.extendify.com"),Hc="https://ai.extendify.com",zc=["siteId","partnerId","wpVersion","wpLanguage","devbuild","isBlockTheme","showAIConsent","userGaveConsent","userId"],Uc={...Object.fromEntries(Object.entries(window.extSharedData).filter((([e])=>zc.includes(e))))},Wc=({answerId:t})=>{const[n,r]=(0,i.useState)(void 0);return(0,i.useEffect)((()=>{t&&void 0!==n&&(({answerId:e,rating:t})=>{fetch(`${Hc}/api/chat/rate-answer`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({answerId:e,rating:t})})})({answerId:t,rating:n})}),[n,t]),(0,e.createElement)("div",{className:"mt-1 flex items-center justify-end gap-0.5 text-right"},(0,e.createElement)("button",{type:"button","aria-pressed":1===n,"aria-live":"polite",onClick:()=>r((e=>1===e?0:1)),"aria-label":1===n?(0,S.__)("Remove rating","extendify-local"):(0,S.__)("Rate that this answer was helpful","extendify-local"),className:Nc()("m-0 h-5 w-5 cursor-pointer border-0 bg-transparent p-0 hover:text-design-main",{"text-design-main":1===n,"text-gray-500":1!==n})},(0,e.createElement)(kc,{className:"fill-current",icon:jc})),(0,e.createElement)("button",{type:"button","aria-pressed":-1===n,"aria-live":"polite",onClick:()=>r((e=>-1===e?0:-1)),"aria-label":-1===n?(0,S.__)("Remove rating","extendify-local"):(0,S.__)("Rate that this answer was not helpful","extendify-local"),className:Nc()("m-0 h-5 w-5 cursor-pointer border-0 bg-transparent p-0 hover:text-design-main",{"text-design-main":-1===n,"text-gray-500":-1!==n})},(0,e.createElement)(kc,{className:"fill-current",icon:Fc})))},$c={experienceLevel:"beginner",currentQuestion:void 0},qc=mc(bc(yc(((e,t)=>({history:[],...$c,setCurrentQuestion:t=>e({currentQuestion:t}),setExperienceLevel:t=>e({experienceLevel:t}),addHistory:t=>e((e=>({history:[t,...e.history.filter((({answerId:e})=>e!==t.answerId)).slice(0,9)]}))),hasHistory:()=>t().history.length>0,clearHistory:()=>e({history:[]}),deleteFromHistory:t=>e((e=>({history:e.history.filter((({answerId:e})=>e!==t.answerId))}))),historyCount:()=>t().history.length,reset:()=>e({...$c})})),{name:"Extendify Chat History"}),{name:"extendify-chat-history",storage:xc((()=>localStorage))})),Gc=({question:t,answer:n,reset:r,error:o,answerId:s})=>{var a;const l=(0,i.useRef)(null),{addHistory:c,setCurrentQuestion:u}=qc(),d=(0,Dc.pasteHandler)({plainText:null!==(a=n?.replace(/[\r\n]+/g,"<br />"))&&void 0!==a?a:""}),h=Array.isArray(d)?(0,Dc.serialize)(d):d;return(0,i.useEffect)((()=>{if(!s)return;const e={answerId:s,htmlAnswer:h,question:t,time:Date.now()};c(e),u(e)}),[s,h,c,t,u]),o?(0,e.createElement)("div",{className:"overflow-y-auto p-6 pb-10",ref:l},(0,e.createElement)("div",{className:"relative mb-8 ml-4 flex justify-end"},(0,e.createElement)(Oc,{text:(0,S.__)("Oops! We were unable to send your question.","extendify-local"),reset:r}))):(0,e.createElement)("div",{className:"flex h-full flex-col"},(0,e.createElement)("div",{className:"flex-grow overflow-y-auto p-6 pb-10",ref:l},(0,e.createElement)("div",{className:"relative mb-8 ml-4 flex justify-end"},(0,e.createElement)("div",{className:"m-0 rounded-lg bg-gray-800 p-5 text-sm text-design-text"},t)),(0,e.createElement)("div",{className:"relative"},(0,e.createElement)("div",{className:"absolute z-10 -ml-2 -mt-4 flex items-center rounded-full bg-design-main p-2"},(0,e.createElement)(kc,{icon:Rc,className:"h-4 w-4 fill-current text-design-text"})),(0,e.createElement)("div",{className:Nc()("m-0 inline-block rounded-lg bg-gray-100 p-5 text-sm text-gray-800",{"animate-pulse bg-gray-300":"..."===n,"bg-gray-100":"..."!==n}),dangerouslySetInnerHTML:{__html:h}}),s&&(0,e.createElement)(Wc,{answerId:s}))),(0,e.createElement)("div",{className:"ask-another-question relative flex justify-center p-4"},(0,e.createElement)("button",{type:"button",onClick:r,className:"flex cursor-pointer items-center gap-2 rounded-sm border-none bg-design-main px-4 py-2 text-sm text-design-text"},(0,S.__)("Ask Another Question","extendify-local"),(0,e.createElement)(kc,{icon:Vc,className:"h-6 fill-current text-design-text"}))))},Yc=(0,s.jsx)(Ac.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(Ac.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})}),Kc=({setShowHistory:t})=>{const{history:n,setCurrentQuestion:r,deleteFromHistory:o}=qc();return(0,i.useEffect)((()=>{n.length>0||setTimeout((()=>t(!1)),750)}),[n,t]),(0,e.createElement)("div",{className:"relative h-full"},(0,e.createElement)("div",{className:"flex items-center justify-between bg-gray-100 p-4 px-6 text-gray-900"},(0,e.createElement)("h1",{className:"m-0 p-0 text-sm font-medium"},(0,S.__)("Chat History","extendify-local")),(0,e.createElement)("button",{type:"button",onClick:()=>t(!1),className:"m-0 cursor-pointer border-0 bg-transparent fill-current p-0 text-design-text"},(0,e.createElement)(kc,{icon:Yc,size:16}),(0,e.createElement)("span",{className:"sr-only"},(0,S.__)("Close history","extendify-local")))),(0,e.createElement)("ul",{className:"m-0 mt-3 h-full overflow-y-auto p-0"},[...n].sort(((e,t)=>e.time-t.time)).map((t=>(0,e.createElement)("li",{key:t.answerId,className:"group flex gap-1 px-2 pr-4"},(0,e.createElement)("button",{type:"button",onClick:()=>o(t),className:"m-0 cursor-pointer border-0 bg-transparent p-0 opacity-0 group-hover:opacity-100"},(0,e.createElement)(kc,{icon:Yc,size:12}),(0,e.createElement)("span",{className:"sr-only"},(0,S.__)("Remove from history","extendify-local"))),(0,e.createElement)("button",{type:"button",className:"m-0 flex w-full cursor-pointer items-center justify-between gap-2 rounded-md border border-gray-200 bg-transparent p-2.5 text-left hover:bg-gray-100",onClick:()=>r(t)},(0,e.createElement)("div",null,(0,e.createElement)("span",{className:"overflow-hidden truncate text-ellipsis"},t.question.substring(0,100))),(0,e.createElement)("span",null,(0,e.createElement)(kc,{className:"fill-current text-gray-900",icon:Ic}))))))))},Xc=window.wp.components,Zc=(0,s.jsx)(Ac.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(Ac.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})}),Jc=(0,s.jsx)(Ac.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(Ac.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),Qc=({setShowHistory:t})=>{const n={beginner:(0,S.__)("Beginner","extendify-local"),intermediate:(0,S.__)("Intermediate","extendify-local"),advanced:(0,S.__)("Advanced","extendify-local")},{historyCount:r,hasHistory:o,experienceLevel:i,setExperienceLevel:s}=qc();return(0,e.createElement)("nav",{className:"absolute right-0 z-10 mx-4 mt-3 flex items-center justify-between gap-2"},(0,e.createElement)("div",{className:"flex items-center gap-2"},(0,e.createElement)(Xc.Dropdown,{className:"flex",contentClassName:"origin-top-right rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none",popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:t})=>(0,e.createElement)("span",null,(0,e.createElement)(Xc.Icon,{icon:Zc,onClick:t,size:28,className:"cursor-pointer rounded fill-current p-1 text-design-text hover:bg-white/10"}),(0,e.createElement)("span",{className:"sr-only"},(0,S.__)("Toggle menu","extendify-local"))),renderContent:({onClose:a})=>(0,e.createElement)(Xc.MenuGroup,{label:(0,S.__)("WordPress Comfort Level","extendify-local")},Object.entries(n).map((([t,n])=>(0,e.createElement)(Xc.MenuItem,{key:t,isSelected:i===t,onClick:()=>{s(t),a()},icon:i===t?Jc:null},n))),(0,e.createElement)("hr",null),(0,e.createElement)(Xc.MenuItem,{disabled:!o(),onClick:()=>{t(!0),a()}},(0,S.sprintf)((0,S.__)("Chat History (%d)","extendify-local"),r)))})))},eu=({value:t,className:n,onChange:r,onKeyDown:o,disabled:s,placeholder:a,maxRows:l=6})=>{const c=(0,i.useRef)(null),[u,d]=(0,i.useState)("auto"),[h,p]=(0,i.useState)("auto");return(0,i.useLayoutEffect)((()=>{if(!c.current)return;const e=window.getComputedStyle(c.current),t=parseFloat(e.lineHeight);p(t)}),[]),(0,i.useLayoutEffect)((()=>{const e=document.createElement("textarea");e.value=t||a,e.rows=1;const n=window.getComputedStyle(c.current);["paddingTop","paddingBottom","paddingLeft","paddingRight","width","fontFamily","fontSize","borderWidth"].forEach((t=>e.style[t]=n[t])),Object.assign(e.style,{position:"absolute",left:"-9999px"}),document.body.appendChild(e),d(e.scrollHeight),document.body.removeChild(e)}),[t,a]),(0,i.useEffect)((()=>{const e=c.current;if(!e)return;if(document.activeElement===e)return;const t=e.value.length;e.focus(),e.setSelectionRange(t,t)}),[t]),(0,e.createElement)(E,null,(0,e.createElement)(rc.div,{key:"input",animate:{height:`${u}px`},transition:{duration:.2},style:{overflow:"hidden",maxHeight:h?h*l+16+"px":"none"}},(0,e.createElement)("label",{htmlFor:"draft-ai-textarea",className:"sr-only"},a),(0,e.createElement)("textarea",{ref:c,id:"draft-ai-textarea",disabled:s,className:n,value:t,rows:1,onChange:r,onKeyDown:o,placeholder:a,style:{overflowY:u<h*l?"hidden":"scroll",maxHeight:h?h*l+"px":"none",boxShadow:"none"}})))},tu=({onSubmit:t})=>{const[n,r]=(0,i.useState)(""),o=(0,i.useRef)(null);return(0,e.createElement)("form",{onSubmit:t,ref:o,className:""},(0,e.createElement)("p",{className:"m-0 mb-1 text-lg font-medium opacity-80"},(0,S.__)("Hi there!","extendify-local")),(0,e.createElement)("p",{className:"m-0 mb-6 text-2xl font-medium"},(0,S.__)("Ask me any questions about WordPress.","extendify-local")),(0,e.createElement)("div",{className:"relative rounded border border-gray-300 bg-white shadow"},(0,e.createElement)(eu,{value:n,className:"h-full w-full flex-1 resize-none py-4 pl-3 pr-10 placeholder-gray-600",placeholder:(0,S.__)("Ask your WordPress question…","extendify-local"),onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||o?.current?.requestSubmit()}}),(0,e.createElement)("button",{type:"submit",className:"absolute bottom-3.5 right-2.5 flex h-6 cursor-pointer items-center border-none bg-transparent fill-current text-gray-700 hover:text-gray-900",disabled:!n},(0,e.createElement)(kc,{icon:Vc,className:"h-4 w-4"}))))},nu=(0,s.jsx)(Ac.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(Ac.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})}),ru=({height:t})=>window.extHelpCenterData?.supportUrl?(0,e.createElement)("div",{className:"px-6 py-8"},(0,e.createElement)("a",{href:window.extHelpCenterData.supportUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-4 rounded border border-solid border-gray-300 px-4 py-3 text-sm text-gray-800 no-underline"},(0,e.createElement)("span",null,(0,S.__)("For other questions, visit our support page.","extendify-local")),(0,e.createElement)(kc,{icon:nu,className:"w-8 fill-current"}))):(0,e.createElement)("div",{className:`bg-design-main ${t}`}),ou=({onOpen:t})=>(0,e.createElement)("section",{className:""},(0,e.createElement)("button",{type:"button",onClick:t,className:"m-0 flex w-full cursor-pointer justify-between gap-2 rounded-md border border-gray-200 bg-transparent p-2.5 text-left hover:bg-gray-100"},(0,e.createElement)(kc,{icon:_c,className:"rounded-full border-0 bg-design-main fill-design-text p-2",size:48}),(0,e.createElement)("div",{className:"grow pl-1"},(0,e.createElement)("h1",{className:"m-0 p-0 text-lg font-medium"},(0,S.__)("Ask AI","extendify-local")),(0,e.createElement)("p",{className:"m-0 p-0 text-xs text-gray-800"},(0,S.__)("Got questions? Ask our AI chatbot","extendify-local"))),(0,e.createElement)("div",{className:"flex h-12 grow-0 items-center justify-end"},(0,e.createElement)(kc,{icon:Lc,size:24,className:"fill-current text-gray-700"})))),iu=({onAccept:t})=>(0,e.createElement)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/75 p-6"},(0,e.createElement)("div",{className:"rounded bg-white p-4"},(0,e.createElement)("h2",{className:"mb-2 mt-0 text-lg"},(0,S.__)("Terms of Use","extendify-local")),(0,e.createElement)("p",{className:"m-0",dangerouslySetInnerHTML:{__html:window.extSharedData.consentTermsHTML}}),(0,e.createElement)("button",{className:"mt-4 w-full cursor-pointer rounded border-0 bg-design-main px-4 py-2 text-center text-white",type:"button",onClick:t},(0,S.__)("Accept","extendify-local")))),su=[{slug:"ai-chat",title:(0,S.__)("AI Chatbot","extendify-local"),component:()=>{const[t,n]=(0,i.useState)(void 0),[r,o]=(0,i.useState)(void 0),[s,a]=(0,i.useState)(void 0),[l,c]=(0,i.useState)(!1),[u,d]=(0,i.useState)(!1),{experienceLevel:h,currentQuestion:p,setCurrentQuestion:m}=qc(),f=window.extSharedData?.showAIConsent,[g,y]=(0,i.useState)(window.extSharedData?.userGaveConsent);return(0,i.useLayoutEffect)((()=>{n(p?.question),o(p?.htmlAnswer),d(!1)}),[p]),f&&!g?(0,e.createElement)(iu,{onAccept:()=>{ic()({path:"/extendify/v1/shared/update-user-meta",method:"POST",data:{option:"ai_consent",value:true}}),y(!0)}}):t?(0,e.createElement)(Gc,{question:t,answer:r,answerId:s,reset:()=>{n(void 0),o(void 0),a(void 0),c(!1),d(!1),m(void 0)},error:l}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("section",{className:"flex h-full flex-col"},(0,e.createElement)(Qc,{setShowHistory:d,showHistory:u}),(0,e.createElement)("div",{className:"flex flex-grow items-center bg-design-main p-6 text-design-text"},(0,e.createElement)(tu,{onSubmit:async e=>{var t;e.preventDefault();const r=null!==(t=e.target?.[0]?.value)&&void 0!==t?t:"";if(!r)return;o("..."),n(r);const i=await(({question:e,experienceLevel:t})=>fetch(`${Hc}/api/chat/ask-question`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({question:e,experienceLevel:t,...Uc})}))({question:r,experienceLevel:h});if(i.ok)try{const e=i.body.getReader(),t=new TextDecoder;for(;;){const{value:n,done:r}=await e.read();if(r)break;const i=t.decode(n);o((e=>"..."===e?i:(e+i).replace(/\{"id":"[a-zA-Z0-9]+"\}/g,"")))}a(i.headers.get("x-extendify-chat-id")||void 0)}catch(e){console.error(e)}else c(!0)}})),(0,e.createElement)(ru,{height:"h-11"})),(0,e.createElement)(E,null,u&&(0,e.createElement)(rc.section,{initial:{x:50},animate:{x:0},exit:{x:0},transition:{duration:.2},style:{"--ext-design-text":"#000000"},className:"absolute bottom-0 left-0 right-0 top-0 z-20 ml-4 mt-4 flex h-full flex-col overflow-hidden rounded-tl-lg bg-white shadow-2xl"},(0,e.createElement)(Kc,{setShowHistory:d}))))}}];var au=o(426);const lu=au.default||au;var cu=o(688);const uu=()=>{},du=uu(),hu=Object,pu=e=>e===du,mu=e=>"function"==typeof e,fu=(e,t)=>({...e,...t}),gu=new WeakMap;let yu=0;const vu=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,i;if(hu(e)!==e||r||n==RegExp)o=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(o=gu.get(e),o)return o;if(o=++yu+"~",gu.set(e,o),n==Array){for(o="@",i=0;i<e.length;i++)o+=vu(e[i])+",";gu.set(e,o)}if(n==hu){o="#";const t=hu.keys(e).sort();for(;!pu(i=t.pop());)pu(e[i])||(o+=i+":"+vu(e[i])+",");gu.set(e,o)}}return o},xu=new WeakMap,wu={},bu={},Eu="undefined",Su=typeof window!=Eu,Tu=typeof document!=Eu,Cu=(e,t)=>{const n=xu.get(e);return[()=>!pu(t)&&e.get(t)||wu,r=>{if(!pu(t)){const o=e.get(t);t in bu||(bu[t]=o),n[5](t,fu(o,r),o||wu)}},n[6],()=>!pu(t)&&t in bu?bu[t]:!pu(t)&&e.get(t)||wu]};let Pu=!0;const[ku,Au]=Su&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[uu,uu],_u={isOnline:()=>Pu,isVisible:()=>{const e=Tu&&document.visibilityState;return pu(e)||"hidden"!==e}},Lu={initFocus:e=>(Tu&&document.addEventListener("visibilitychange",e),ku("focus",e),()=>{Tu&&document.removeEventListener("visibilitychange",e),Au("focus",e)}),initReconnect:e=>{const t=()=>{Pu=!0,e()},n=()=>{Pu=!1};return ku("online",t),ku("offline",n),()=>{Au("online",t),Au("offline",n)}}},Du=!e.useId,Mu=!Su||"Deno"in window,Nu=Mu?e.useEffect:e.useLayoutEffect,Ou="undefined"!=typeof navigator&&navigator.connection,Ru=!Mu&&Ou&&(["slow-2g","2g"].includes(Ou.effectiveType)||Ou.saveData),Vu=e=>{if(mu(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?vu(e):"",t]};let Fu=0;const ju=()=>++Fu;async function Iu(...e){const[t,n,r,o]=e,i=fu({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{});let s=i.populateCache;const a=i.rollbackOnError;let l=i.optimisticData;const c=i.throwOnError;if(mu(n)){const e=n,r=[],o=t.keys();for(const n of o)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(u))}return u(n);async function u(n){const[o]=Vu(n);if(!o)return;const[u,d]=Cu(t,o),[h,p,m,f]=xu.get(t),g=()=>{const e=h[o];return(mu(i.revalidate)?i.revalidate(u().data,n):!1!==i.revalidate)&&(delete m[o],delete f[o],e&&e[0])?e[0](2).then((()=>u().data)):u().data};if(e.length<3)return g();let y,v=r;const x=ju();p[o]=[x,0];const w=!pu(l),b=u(),E=b.data,S=b._c,T=pu(S)?E:S;if(w&&(l=mu(l)?l(T,E):l,d({data:l,_c:T})),mu(v))try{v=v(T)}catch(e){y=e}if(v&&(e=>mu(e.then))(v)){if(v=await v.catch((e=>{y=e})),x!==p[o][0]){if(y)throw y;return v}y&&w&&(e=>"function"==typeof a?a(e):!1!==a)(y)&&(s=!0,d({data:T,_c:du}))}if(s&&!y)if(mu(s)){const e=s(v,T);d({data:e,error:du,_c:du})}else d({data:v,error:du,_c:du});if(p[o][1]=ju(),Promise.resolve(g()).then((()=>{d({_c:du})})),!y)return v;if(c)throw y}}const Bu=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Hu=(e,t)=>{if(!xu.has(e)){const n=fu(Lu,t),r={},o=Iu.bind(du,e);let i=uu;const s={},a=(e,t)=>{const n=s[e]||[];return s[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},l=(t,n,r)=>{e.set(t,n);const o=s[t];if(o)for(const e of o)e(n,r)},c=()=>{if(!xu.has(e)&&(xu.set(e,[r,{},{},{},o,l,a]),!Mu)){const t=n.initFocus(setTimeout.bind(du,Bu.bind(du,r,0))),o=n.initReconnect(setTimeout.bind(du,Bu.bind(du,r,1)));i=()=>{t&&t(),o&&o(),xu.delete(e)}}};return c(),[e,o,c,i]}return[e,xu.get(e)[4]]},[zu,Uu]=Hu(new Map),Wu=fu({onLoadingSlow:uu,onSuccess:uu,onError:uu,onErrorRetry:(e,__,t,n,r)=>{const o=t.errorRetryCount,i=r.retryCount,s=~~((Math.random()+.5)*(1<<(i<8?i:8)))*t.errorRetryInterval;!pu(o)&&i>o||setTimeout(n,s,r)},onDiscarded:uu,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Ru?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Ru?5e3:3e3,compare:(e,t)=>vu(e)==vu(t),isPaused:()=>!1,cache:zu,mutate:Uu,fallback:{}},_u),$u=(e,t)=>{const n=fu(e,t);if(t){const{use:r,fallback:o}=e,{use:i,fallback:s}=t;r&&i&&(n.use=r.concat(i)),o&&s&&(n.fallback=fu(o,s))}return n},qu=(0,e.createContext)({}),Gu=Su&&window.__SWR_DEVTOOLS_USE__,Yu=Gu?window.__SWR_DEVTOOLS_USE__:[],Ku=e=>mu(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],Xu=Yu.concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const[r]=Vu(t),[,,,o]=xu.get(zu);if(r.startsWith("$inf$"))return n(...e);const i=o[r];return pu(i)?n(...e):(delete o[r],i)}),r)));Gu&&(window.__SWR_DEVTOOLS_REACT__=e);const Zu=e.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e)}),Ju={dedupe:!0};hu.defineProperty((t=>{const{value:n}=t,r=(0,e.useContext)(qu),o=mu(n),i=(0,e.useMemo)((()=>o?n(r):n),[o,r,n]),s=(0,e.useMemo)((()=>o?i:$u(r,i)),[o,r,i]),a=i&&i.provider,l=(0,e.useRef)(du);a&&!l.current&&(l.current=Hu(a(s.cache||zu),i));const c=l.current;return c&&(s.cache=c[0],s.mutate=c[1]),Nu((()=>{if(c)return c[2]&&c[2](),c[3]}),[]),(0,e.createElement)(qu.Provider,fu(t,{value:s}))}),"defaultValue",{value:Wu});const Qu=(ed=(t,n,r)=>{const{cache:o,compare:i,suspense:s,fallbackData:a,revalidateOnMount:l,revalidateIfStale:c,refreshInterval:u,refreshWhenHidden:d,refreshWhenOffline:h,keepPreviousData:p}=r,[m,f,g,y]=xu.get(o),[v,x]=Vu(t),w=(0,e.useRef)(!1),b=(0,e.useRef)(!1),E=(0,e.useRef)(v),S=(0,e.useRef)(n),T=(0,e.useRef)(r),C=()=>T.current,P=()=>C().isVisible()&&C().isOnline(),[k,A,_,L]=Cu(o,v),D=(0,e.useRef)({}).current,M=pu(a)?r.fallback[v]:a,N=(e,t)=>{for(const n in D){const r=n;if("data"===r){if(!i(e[r],t[r])){if(!pu(e[r]))return!1;if(!i(z,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},O=(0,e.useMemo)((()=>{const e=!!v&&!!n&&(pu(l)?!C().isPaused()&&!s&&(!!pu(c)||c):l),t=t=>{const n=fu(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=k(),o=L(),i=t(r),a=r===o?i:t(o);let u=i;return[()=>{const e=t(k());return N(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>a]}),[o,v]),R=(0,cu.useSyncExternalStore)((0,e.useCallback)((e=>_(v,((t,n)=>{N(n,t)||e()}))),[o,v]),O[0],O[1]),V=!w.current,F=m[v]&&m[v].length>0,j=R.data,I=pu(j)?M:j,B=R.error,H=(0,e.useRef)(I),z=p?pu(j)?H.current:j:I,U=!(F&&!pu(B))&&(V&&!pu(l)?l:!C().isPaused()&&(s?!pu(I)&&c:pu(I)||c)),W=!!(v&&n&&V&&U),$=pu(R.isValidating)?W:R.isValidating,q=pu(R.isLoading)?W:R.isLoading,G=(0,e.useCallback)((async e=>{const t=S.current;if(!v||!t||b.current||C().isPaused())return!1;let n,o,s=!0;const a=e||{},l=!g[v]||!a.dedupe,c=()=>Du?!b.current&&v===E.current&&w.current:v===E.current,u={isValidating:!1,isLoading:!1},d=()=>{A(u)},h=()=>{const e=g[v];e&&e[1]===o&&delete g[v]},p={isValidating:!0};pu(k().data)&&(p.isLoading=!0);try{if(l&&(A(p),r.loadingTimeout&&pu(k().data)&&setTimeout((()=>{s&&c()&&C().onLoadingSlow(v,r)}),r.loadingTimeout),g[v]=[t(x),ju()]),[n,o]=g[v],n=await n,l&&setTimeout(h,r.dedupingInterval),!g[v]||g[v][1]!==o)return l&&c()&&C().onDiscarded(v),!1;u.error=du;const e=f[v];if(!pu(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return d(),l&&c()&&C().onDiscarded(v),!1;const a=k().data;u.data=i(a,n)?a:n,l&&c()&&C().onSuccess(n,v,r)}catch(e){h();const t=C(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,l&&c()&&(t.onError(e,v,t),(!0===n||mu(n)&&n(e))&&(C().revalidateOnFocus&&C().revalidateOnReconnect&&!P()||t.onErrorRetry(e,v,t,(e=>{const t=m[v];t&&t[0]&&t[0](3,e)}),{retryCount:(a.retryCount||0)+1,dedupe:!0}))))}return s=!1,d(),!0}),[v,o]),Y=(0,e.useCallback)(((...e)=>Iu(o,E.current,...e)),[]);if(Nu((()=>{S.current=n,T.current=r,pu(j)||(H.current=j)})),Nu((()=>{if(!v)return;const e=G.bind(du,Ju);let t=0;const n=((e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}})(v,m,((n,r={})=>{if(0==n){const n=Date.now();C().revalidateOnFocus&&n>t&&P()&&(t=n+C().focusThrottleInterval,e())}else if(1==n)C().revalidateOnReconnect&&P()&&e();else{if(2==n)return G();if(3==n)return G(r)}}));return b.current=!1,E.current=v,w.current=!0,A({_k:x}),U&&(pu(I)||Mu?e():(e=>{Su&&typeof window.requestAnimationFrame!=Eu?window.requestAnimationFrame(e):setTimeout(e,1)})(e)),()=>{b.current=!0,n()}}),[v]),Nu((()=>{let e;function t(){const t=mu(u)?u(k().data):u;t&&-1!==e&&(e=setTimeout(n,t))}function n(){k().error||!d&&!C().isVisible()||!h&&!C().isOnline()?t():G(Ju).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[u,d,h,v]),(0,e.useDebugValue)(z),s&&pu(I)&&v){if(!Du&&Mu)throw new Error("Fallback data is required when using suspense in SSR.");S.current=n,T.current=r,b.current=!1;const e=y[v];if(!pu(e)){const t=Y(e);Zu(t)}if(!pu(B))throw B;{const e=G(Ju);pu(z)||(e.status="fulfilled",e.value=!0),Zu(e)}}return{mutate:Y,get data(){return D.data=!0,z},get error(){return D.error=!0,B},get isValidating(){return D.isValidating=!0,$},get isLoading(){return D.isLoading=!0,q}}},function(...t){const n=fu(Wu,(0,e.useContext)(qu)),[r,o,i]=Ku(t),s=$u(n,i);let a=ed;const{use:l}=s,c=(l||[]).concat(Xu);for(let e=c.length;e--;)a=c[e](a);return a(r,o||s.fetcher||null,s)});var ed;const td=((e,t)=>(...n)=>{const[r,o,i]=Ku(n),s=(i.use||[]).concat(t);return e(r,o,{...i,use:s})})(Qu,(e=>(t,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)))),nd=e=>{const t=window.extSharedData.wpLanguage||null,n=new URLSearchParams({lang:t});return fetch(`${Bc}/api/posts/${e}?${n.toString()}`).then((e=>{if(404===e.status)throw new Error("Not found");if(!e.ok)throw new Error(e.statusText);return e.json()}))};var rd;const od={articles:[],recentArticles:[],viewedArticles:[],searchTerm:"",...null!==(rd=sc(window.extHelpCenterData.userData.supportArticlesData)?.state)&&void 0!==rd?rd:{}},id=mc(bc(yc(((e,t)=>({...od,pushArticle:n=>{const{slug:r,title:o}=n,i=t(),s=(new Date).toISOString(),a=s,l=i.viewedArticles.find((e=>e.slug===r)),c=[...i.viewedArticles.filter((e=>e.slug!==r)),l?{...l,count:l.count+1,lastViewedAt:s}:{slug:r,title:o,firstViewedAt:a,lastViewedAt:s,count:1}];ic()({path:"/extendify/v1/help-center/support-articles-data",method:"POST",data:{state:{viewedArticles:c}}}),e({articles:[n,...i.articles],recentArticles:[n,...i.recentArticles.slice(0,9)],viewedArticles:c})},popArticle:()=>e((e=>({articles:e.articles.slice(1)}))),clearArticles:()=>e({articles:[]}),reset:()=>e({articles:[],searchTerm:""}),updateTitle:(t,n)=>e((e=>({articles:e.articles.map((e=>(e.slug===t&&(e.title=n),e)))}))),clearSearchTerm:()=>e({searchTerm:""}),setSearchTerm:t=>e({searchTerm:t})})),{name:"Extendify Help Center Knowledge Base"}),{name:"extendify-help-center-knowledge-base",storage:xc((()=>sessionStorage))})),sd=()=>{const{articles:t,pushArticle:n,popArticle:r,updateTitle:o}=id(),[s,a]=(0,i.useState)(),[l,c]=(0,i.useState)(!1),u=(0,i.useRef)(),d=t?.[0]?.slug,{data:h,error:p,loading:m}=(e=>{const{data:t,error:n}=td(e,nd);return{data:t,error:n,loading:!t&&!n}})(d),f=h?.title;return(0,i.useEffect)((()=>{if(!p)return a(!1);s||(a(!0),r(),window.open(`https://wordpress.org/documentation/article/${d}`,"_blank"))}),[p,d,s,r]),(0,i.useEffect)((()=>{d&&f&&o(d,f)}),[f,o,d]),(0,i.useEffect)((()=>{if(!u.current)return;const e=u.current?.querySelectorAll("a"),t=u.current?.querySelectorAll("figure"),r=u.current?.querySelectorAll("img");t.forEach((e=>{e.classList.add("mx-auto"),e.classList.add("my-4"),e.classList.add("block"),e.classList.add("w-full"),e.classList.remove("wp-block-image")})),r.forEach((e=>{e.classList.add("object-contain"),e.classList.add("max-w-[400px]"),e.classList.add("max-h-[250px]")}));const o=async e=>{var t;if(e.preventDefault(),e.ctrlKey||e.metaKey)return e.stopPropagation(),window.open(e.target.href,"_blank");const r=null!==(t=e.target?.href)&&void 0!==t?t:e.target?.closest("a")?.href,{pathname:o}=new URL(r),i=o.split("/").filter(Boolean)?.at(-1);c(!0);const s=await(a=o,ic()({path:`/extendify/v1/help-center/get-redirect?path=${a}`}));var a;if(c(!1),!s)return o.startsWith("/documentation/article/")?n({slug:i,title:void 0}):window.open(`https://wordpress.org${o}`,"_blank");n({slug:s.split("/").filter(Boolean)?.at(-1)})},i=e=>{e.preventDefault(),window.open(e.target.href,"_blank")},s=e=>e.preventDefault();return e.forEach((e=>{const{hash:t,host:n,pathname:r}=new URL(e.href);if(t&&n===window.location.host||r.startsWith("/support/category"))return e.addEventListener("click",s),e.setAttribute("aria-disabled","true"),void e.classList.add("link-disabled");if(r.match(/\.(jpg|jpeg|png|gif|pdf|doc|docx|xls|xlsx|ppt|pptx)$/))return void e.addEventListener("click",s);if(r.startsWith("/documentation/article")||r.startsWith("/support/article"))return void e.addEventListener("click",o);e.addEventListener("click",i);const a=document.createElement("span");a.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" class="components-external-link__icon css-rvs7bx esh4a730" aria-hidden="true" focusable="false"><path d="M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"></path></svg>',e.appendChild(a)})),()=>{e.forEach((e=>{e?.removeEventListener("click",o),e?.removeEventListener("click",i),e?.removeEventListener("click",s)}))}}),[h,n]),m||l?(0,e.createElement)("div",{className:"p-8 text-center text-base"},(0,e.createElement)(Xc.Spinner,null)):p?(0,e.createElement)("div",{className:"p-8 text-center text-base"},(0,S.__)("There was an error loading this article","extendify-local")):(0,e.createElement)("article",{ref:u,className:"extendify-documentation w-full","data-test":"kb-article-content"},(0,e.createElement)("h1",{className:"m-0 text-3xl"},f),h?.content&&lu(h?.content))},ad=(0,s.jsx)(Ac.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(Ac.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})}),ld=({articles:t})=>{const{pushArticle:n}=id(),{navigateTo:r}=Wd();return(0,e.createElement)("ul",{className:"m-0 flex flex-col gap-1 py-2","data-test":"help-center-kb-articles-list"},t.map((({slug:t,title:o})=>(0,e.createElement)("li",{key:t,className:"m-0 py-1 pl-2 pr-3"},(0,e.createElement)("button",{type:"button",className:"flex cursor-pointer gap-2 bg-transparent text-sm text-gray-800 hover:underline hover:underline-offset-4",onClick:()=>{n({slug:t,title:o}),r("knowledge-base-article")}},(0,e.createElement)(kc,{size:20,icon:ad,className:"rotate-180 transform fill-gray-700"}),o)))))},cd=(0,s.jsx)(Ac.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(Ac.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})}),ud=(0,s.jsx)(Ac.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(Ac.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})}),dd=({onChange:t})=>{const{searchTerm:n,clearSearchTerm:r,reset:o}=id(),s=(0,i.useRef)(!1),a=(0,i.useRef)();return(0,e.createElement)("form",{method:"get",onSubmit:e=>e.preventDefault(),className:"relative h-10 w-full"},(0,e.createElement)("label",{htmlFor:"ext-help-center-search",className:"sr-only"},(0,S.__)("Search for articles","extendify-local")),(0,e.createElement)("input",{ref:a,name:"ext-kb-search",autoFocus:!0,autoCapitalize:"off",id:"ext-help-center-search",type:"text",value:null!=n?n:"",onChange:e=>t(e.target.value),onFocus:()=>{s.current||(s.current=!0,fetch(`${Bc}/api/posts?boot=true`,{method:"POST"}))},placeholder:(0,S.__)("What do you need help with?","extendify-local"),className:"input border-text-800 h-10 w-full border px-3 text-sm placeholder-gray-600"}),(0,e.createElement)("div",{className:"absolute inset-y-5 right-2 flex items-center justify-center text-gray-400"},(0,e.createElement)(kc,{icon:n?ud:cd,className:Nc()("fill-current",{"cursor-pointer":n}),onClick:()=>{o(),r(),a.current?.focus()},size:24})))},hd=async e=>{if(e.length<3)return null;const t=new URLSearchParams({lang:window.extSharedData.wpLanguage||null,search:e});return await fetch(`${Bc}/api/posts?${t.toString()}`,{method:"POST"}).then((e=>{if(!e.ok)throw new Error(e.statusText);return e.json()}))},pd=["wordpress-block-editor","blocks-list","adding-a-new-block","block-pattern","block-pattern-directory"],md=sc(window.extSharedData.resourceData)?.supportArticles?.filter((e=>pd.includes(e.slug))),fd=({onOpen:t})=>{const{setSearchTerm:n}=id();return(0,e.createElement)("section",{className:"rounded-md border","data-test":"help-center-kb-section"},(0,e.createElement)("div",{className:"border-b border-gray-150 bg-gray-100 p-2.5 pb-4"},(0,e.createElement)("h1",{className:"m-0 mb-3 p-0 text-lg font-medium"},(0,S.__)("Knowledge Base","extendify-local")),(0,e.createElement)(dd,{onChange:e=>{n(e),t()}})),(0,e.createElement)(ld,{articles:md.slice(0,5)}))},gd=[{slug:"knowledge-base",title:(0,S.__)("Knowledge Base","extendify-local"),component:()=>{var t;const{setSearchTerm:n,searchTerm:r}=id(),{data:o,loading:i}=(e=>{const{data:t,error:n}=td(e||null,hd);return{data:t,error:n,loading:!t&&!n}})(r);return(0,e.createElement)("section",{className:"p-4"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:"mb-4"},(0,e.createElement)("h2",{className:"m-0 mb-2 text-sm"},r&&i?(0,S.__)("Searching...","extendify-local"):o?.length>0?(0,S.__)("Search results","extendify-local"):(0,S.__)("Search the knowledge base","extendify-local")),(0,e.createElement)(dd,{onChange:n})),i&&r?(0,e.createElement)("div",{className:"p-8 text-center text-base"},(0,e.createElement)(Xc.Spinner,null)):(0,e.createElement)(ld,{articles:null!==(t=o?.slice(0,10))&&void 0!==t?t:[]})))}},{slug:"knowledge-base-article",title:(0,S.__)("Knowledge Base","extendify-local"),component:()=>(0,e.createElement)("section",{className:"p-4"},(0,e.createElement)("div",{className:""},(0,e.createElement)("div",{className:""},(0,e.createElement)(sd,null))))}],yd=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M18.72,8.267L20,8.267L20,17.653C20,18.949 18.95,20 17.654,20L6.56,20L6.56,18.72L17.654,18.72C18.243,18.72 18.72,18.242 18.72,17.653L18.72,8.267Z"}),(0,e.createElement)("path",{d:"M16.8,5.387L16.8,15.413C16.8,16.179 16.179,16.8 15.413,16.8L5.387,16.8C4.621,16.8 4,16.179 4,15.413L4,5.387C4,4.621 4.621,4 5.387,4L15.413,4C16.179,4 16.8,4.621 16.8,5.387ZM15.52,5.387C15.52,5.328 15.472,5.28 15.413,5.28L5.387,5.28C5.328,5.28 5.28,5.328 5.28,5.387L5.28,15.413C5.28,15.472 5.328,15.52 5.387,15.52L15.413,15.52C15.472,15.52 15.52,15.472 15.52,15.413L15.52,5.387Z"}),(0,e.createElement)("path",{d:"M9.573,13.839L8.667,12.934L10.775,10.827L8.667,8.719L9.573,7.814L12.585,10.827L9.573,13.839Z"})),vd=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,e.createElement)("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM8 14.5V5.5L14 10L8 14.5Z",fill:"currentColor"})),xd=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,e.createElement)("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 16.5C6.69 16.5 4 13.81 4 10.5H6C6 12.71 7.79 14.5 10 14.5C12.21 14.5 14 12.71 14 10.5C14 8.26 12.15 6.41 9.84 6.51L11.41 8.08L10 9.5L6 5.5L10 1.5L11.41 2.91L9.81 4.51C13.28 4.4 16 7.18 16 10.5C16 13.81 13.31 16.5 10 16.5Z"})),wd=mc(bc(yc((e=>({visibility:!1,queuedTour:null,queueTourForRedirect:t=>e({queuedTour:t}),clearQueuedTour:()=>e({queuedTour:null}),setVisibility:t=>{if(!["open","minimized","closed"].includes(t))throw new Error("Invalid visibility state");e({visibility:t})}})),{name:"Extendify Help Center Globals Sync"}),{name:"extendify-help-center-globals-sync"}));var bd;const Ed={currentTour:null,currentStep:void 0,preparingStep:void 0,progress:[],...null!==(bd=sc(window.extHelpCenterData.userData.tourData)?.state)&&void 0!==bd?bd:{}},Sd="/extendify/v1/help-center/tour-data",Td={getItem:async()=>await ic()({path:Sd}),setItem:async(e,t)=>await ic()({path:Sd,method:"POST",data:{state:t}})},Cd=mc(bc(yc(((e,t)=>({...Ed,startTour:async n=>{const{trackTourProgress:r,updateProgress:o,getStepData:i,onTourPage:s}=t();s(n?.settings?.startFrom)&&(await(n?.onStart?.(n)),n.steps=n.steps?.filter((e=>e?.showOnlyIf?.()||void 0===e?.showOnlyIf?.()))||[],await(i(0,n)?.events?.beforeAttach?.(n))),e({currentTour:n,currentStep:0,preparingStep:void 0});const a=r(n.id);o(a.id,{openedCount:Number(a.openedCount)+1,lastAction:"started"})},onTourPage:(e=null)=>{const n=window.location.href;if(e?.includes(n))return!0;const{currentTour:r}=t();return r?.settings?.startFrom?.includes(n)},completeCurrentTour:async()=>{const{currentTour:n,wasCompleted:r,findTourProgress:o,updateProgress:i}=t(),s=o(n?.id);s?.id&&(r(s.id)||i(s.id,{completedAt:(new Date).toISOString(),lastAction:"completed"}),i(s.id,{completedCount:Number(s.completedCount)+1,lastAction:"completed"}),await(n?.onDetach?.()),await(n?.onFinish?.()),e({currentTour:null,currentStep:void 0}),"site-assistant-tour"===s?.id&&window.dispatchEvent(new CustomEvent("extendify-assist:is-tour-finished",{detail:{isFinished:!0}})))},closeCurrentTour:async n=>{const{currentTour:r,findTourProgress:o,updateProgress:i}=t(),s=o(r?.id);if(!s?.id)return;const a={};return["redirected"].includes(n)?i(s?.id,{lastAction:n}):["closed-by-caught-error"].includes(n)?i(s?.id,{lastAction:n,errored:!0}):("closed-manually"===n&&(a.closedManuallyCount=Number(s.closedManuallyCount)+1),await(r?.onDetach?.()),await(r?.onFinish?.()),i(s?.id,{lastAction:n,...a}),void e({currentTour:null,currentStep:void 0,preparingStep:void 0}))},findTourProgress:e=>t().progress.find((t=>t.id===e)),wasCompleted:e=>t().findTourProgress(e)?.completedAt,wasOpened:e=>{var n;return Number(null!==(n=t().findTourProgress(e)?.openedCount)&&void 0!==n?n:0)>0},isSeen:e=>t().findTourProgress(e)?.firstSeenAt,trackTourProgress:n=>{const{findTourProgress:r}=t();return r(n)||e((e=>({progress:[...e.progress,{id:n,firstSeenAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),completedAt:null,lastAction:"init",currentStep:0,openedCount:0,closedManuallyCount:0,completedCount:0,errored:!1}]}))),r(n)},updateProgress:(t,n)=>{var r;const o=null!==(r=n?.lastAction)&&void 0!==r?r:"unknown";e((e=>({progress:e.progress.map((e=>e.id===t?{...e,...n,lastAction:o,updatedAt:(new Date).toISOString()}:e))})))},getStepData:(e,n=t().currentTour)=>{var r;return null!==(r=n?.steps?.[e])&&void 0!==r?r:{}},hasNextStep:()=>!!t().currentTour&&Number(t().currentStep)<t().currentTour.steps.length-1,nextStep:async()=>{const{currentTour:e,goToStep:n,updateProgress:r,currentStep:o}=t(),i=Number(o)+1;await n(i),r(e.id,{currentStep:i,lastAction:"next"})},hasPreviousStep:()=>!!t().currentTour&&Number(t().currentStep)>0,prevStep:async()=>{const{currentTour:e,goToStep:n,updateProgress:r,currentStep:o}=t(),i=o-1;await n(i),r(e.id,{currentStep:i,lastAction:"prev"})},goToStep:async n=>{const{currentTour:r,updateProgress:o,closeCurrentTour:i,getStepData:s}=t(),a=r;if(n<0||n>a.steps.length-1)return void i("closed-by-caught-error");o(a.id,{currentStep:n,lastAction:`go-to-step-${n}`});const l=s(n)?.events;l?.beforeAttach&&(e((()=>({preparingStep:n}))),await Promise.allSettled([l.beforeAttach?.(a),new Promise((e=>setTimeout(e,300)))]),e((()=>({preparingStep:void 0})))),e((()=>({currentStep:n})))}})),{name:"Extendify Tour Progress"}),{name:"extendify-help-center-tour-progress",storage:xc((()=>Td)),skipHydration:!0,partialize:e=>{const{currentTour:t,currentStep:n,preparingStep:r,...o}=e;return o}})),Pd=e=>new Promise((t=>{const n=setInterval((()=>{document.querySelector(e)&&(clearInterval(n),t())}),50)})),kd=e=>new Promise((t=>{const n=setInterval((()=>{document.querySelector(e)||(clearInterval(n),t())}),50)})),Ad={id:"library-tour",title:(0,S.__)("Design Library","extendify-local"),settings:{allowOverflow:!0,hideDotsNav:!0,startFrom:[window.extSharedData.adminUrl+"post-new.php?post_type=page"]},onStart:async()=>{await Pd("#extendify-library-btn"),document.querySelector(`[aria-label="${(0,S.__)("Settings")}"].is-pressed`)?.click()},steps:[{title:(0,S.__)("Open the Pattern Library","extendify-local"),text:(0,S.__)("The Extendify pattern library can be opened by clicking the button to the left.","extendify-local"),attachTo:{element:'#extendify-library-btn [role="button"]',offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{beforeAttach:()=>dispatchEvent(new CustomEvent("extendify::close-library"))}},{title:(0,S.__)("Filter Patterns","extendify-local"),text:(0,S.__)("Click on any pattern category to refine the selection.","extendify-local"),attachTo:{element:"#extendify-library-category-control",position:{x:"right",y:"top"},hook:"top left"},options:{allowPointerEvents:!0},events:{beforeAttach:async()=>(dispatchEvent(new CustomEvent("extendify::open-library")),await Pd("#extendify-library-category-control"))}},{title:(0,S.__)("Select a Pattern","extendify-local"),text:(0,S.__)("Simply select any pattern you wish to insert into a page by clicking on it.","extendify-local"),attachTo:{element:"#extendify-library-patterns-list",position:{x:"left",y:"top"},hook:"top left"},events:{beforeAttach:async()=>{await Pd("#extendify-library-patterns-list")}}},{title:(0,S.__)("View the Inserted Pattern","extendify-local"),text:(0,S.__)("The selected pattern has been inserted into the page.","extendify-local"),attachTo:{element:".wp-block-group:last-child",frame:'iframe[name="editor-canvas"]',offset:{marginTop:15,marginLeft:0},position:{x:"right",y:"top"},hook:"top right"},events:{beforeAttach:async()=>(document.querySelector("#extendify-library-patterns-list .library-pattern")?.click(),await kd("#extendify-library-patterns-list"))},options:{hideBackButton:!0}}]},_d=()=>!!document.querySelector('iframe[name="editor-canvas"]'),Ld=e=>{var t;return null!==(t=13!==e.keyCode)&&void 0!==t?t:e.preventDefault()},Dd=(e="")=>`.edit-post-header-toolbar__inserter-toggle${e}, .editor-document-tools__inserter-toggle${e}`,Md={id:"page-editor-tour",title:(0,S.__)("Page editor","extendify-local"),settings:{allowOverflow:!0,startFrom:[window.extSharedData.adminUrl+"post-new.php?post_type=page"]},onStart:()=>(document.querySelector(`[aria-label="${(0,S.__)("Settings")}"].is-pressed`)?.click(),dispatchEvent(new CustomEvent("extendify::close-library"))),steps:[{title:(0,S.__)("Add a Block","extendify-local"),text:(0,S.__)("Click the plus to open the block inserter.","extendify-local"),attachTo:{element:Dd(),offset:{marginTop:15,marginLeft:0},position:{x:"left",y:"bottom"},hook:"top left"},events:{beforeAttach:async()=>(window.wp.data.select("core/edit-post").isFeatureActive("welcomeGuide")&&await window.wp.data.dispatch("core/edit-post").toggleFeature("welcomeGuide"),await Pd(Dd()))}},{title:(0,S.__)("Block Inserter","extendify-local"),text:(0,S.__)("Add a block by clicking or dragging it onto the page.","extendify-local"),attachTo:{element:".block-editor-inserter__menu",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{beforeAttach:async()=>(document.querySelector(Dd(":not(.is-pressed)"))?.click(),await Pd(".block-editor-inserter__tabs")),onAttach:()=>{const e=document.querySelector(Dd());Nd.observe(e,{attributes:!0}),window.addEventListener("keydown",Ld)},onDetach:async()=>{Nd.disconnect(),window.removeEventListener("keydown",Ld),document.querySelector(Dd(".is-pressed"))?.click(),await kd(".block-editor-inserter__block-list"),requestAnimationFrame((()=>{document.getElementById("help-center-tour-next-button")?.focus()}))}}},{title:(0,S.__)("Page Title","extendify-local"),text:(0,S.__)("Edit the page title by clicking it. Note: The title may or may not show up on the published page, depending on the page template used.","extendify-local"),attachTo:{element:()=>_d()?'iframe[name="editor-canvas"]':".wp-block-post-title",offset:()=>({marginTop:_d()?15:0,marginLeft:_d()?-15:15}),position:{x:"right",y:"top"},hook:()=>_d()?"top right":"top left"},events:{beforeAttach:async()=>{await window.wp.data.dispatch("core/editor").editPost({title:"Sample Post"})}}},{title:(0,S.__)("Blocks","extendify-local"),text:(0,S.__)("Each block will show up on the page and can be edited by clicking on it.","extendify-local"),attachTo:{element:()=>_d()?'iframe[name="editor-canvas"]':".wp-block-post-content > p",offset:()=>({marginTop:_d()?15:0,marginLeft:_d()?-15:15}),position:{x:"right",y:"top"},hook:()=>_d()?"top right":"top left"},events:{beforeAttach:async()=>{if(await window.wp.data.select("core/block-editor").getBlockCount()>0)return;const e=(0,Dc.createBlock)("core/paragraph",{content:(0,S.__)("This is a sample paragraph block. It can be several sentences long and will span multiple rows. You can add as many blocks as you'd like to the page.","extendify-local")});return await window.wp.data.dispatch("core/block-editor").insertBlock(e),_d()?await window.wp.data.dispatch("core/block-editor").flashBlock(e.clientId):null}}},{title:(0,S.__)("Page and Block Settings","extendify-local"),text:(0,S.__)("Select either page or block to change the settings for the entire page or the block that is selected.","extendify-local"),attachTo:{element:".interface-interface-skeleton__sidebar",offset:{marginTop:0,marginLeft:-15},position:{x:"left",y:"top"},hook:"top right"},events:{beforeAttach:async()=>{document.querySelector(`[aria-label="${(0,S.__)("Settings")}"]:not(.is-pressed)`)?.click(),await Pd(".interface-interface-skeleton__sidebar"),document.querySelector('.edit-post-sidebar__panel-tab,[data-tab-id="edit-post/document"]')?.click(),await Pd(".edit-post-post-status"),document.querySelector(".edit-post-post-status:not(.is-opened) button")?.click(),await Pd(".edit-post-post-status.is-opened")}}},{title:(0,S.__)("Preview","extendify-local"),text:(0,S.__)("Click preview to view how your changes look on the front end of your site.","extendify-local"),attachTo:{element:".block-editor-post-preview__button-toggle,.editor-preview-dropdown__toggle",offset:{marginTop:0,marginLeft:-15},position:{x:"left",y:"top"},hook:"top right"},events:{}},{title:(0,S.__)("Publish or Save","extendify-local"),text:(0,S.__)("Click publish or update to save the changes you have made to the page and make them live on the site.","extendify-local"),attachTo:{element:".editor-post-publish-button__button",offset:{marginTop:15},position:{x:"right",y:"bottom"},hook:"top right"},events:{}}]},Nd=new MutationObserver((()=>{document.querySelector(Dd(":not(.is-pressed)"))?.click()})),Od={id:"plugin-install-tour",title:(0,S.__)("Installing a plugin","extendify-local"),settings:{allowOverflow:!1,startFrom:[window.extSharedData.adminUrl+"plugin-install.php"]},onStart:()=>{document.body.classList.contains("folded")&&document.querySelector("#menu-plugins").classList.add("opensub")},steps:[{title:(0,S.__)("Add New plugin menu","extendify-local"),text:(0,S.__)("Click here to access the Add Plugins page.","extendify-local"),attachTo:{element:'#menu-plugins .wp-submenu a[href="plugin-install.php"]',offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{onDetach:()=>{document.body.classList.contains("folded")&&document.querySelector("#menu-plugins").classList.remove("opensub")}}},{title:(0,S.__)("Search","extendify-local"),text:(0,S.__)("Search for a plugin by name or functionality.","extendify-local"),attachTo:{element:".search-form.search-plugins",offset:{marginTop:5,marginLeft:-15},boxPadding:{top:-5,bottom:3,left:5,right:5},position:{x:"left",y:"top"},hook:"top right"},events:{}},{title:(0,S.__)("Plugin details","extendify-local"),text:(0,S.__)("See important information about each plugin.","extendify-local"),attachTo:{element:"#the-list .plugin-card:first-child .plugin-card-bottom",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"bottom"},hook:"bottom left"},events:{}},{title:(0,S.__)("Install now","extendify-local"),text:(0,S.__)("Install the plugin. Then, press this button again to activate the plugin.","extendify-local"),attachTo:{element:"#the-list .plugin-card:first-child .install-now",offset:{marginTop:-5,marginLeft:15},boxPadding:{top:5,bottom:5,left:5,right:5},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Upload Plugin","extendify-local"),text:(0,S.__)("If you have a plugin from an external source, you can upload it directly here.","extendify-local"),attachTo:{element:".upload-view-toggle",offset:{marginTop:-5,marginLeft:15},boxPadding:{top:5,bottom:5,left:5,right:5},position:{x:"right",y:"top"},hook:"top left"},events:{}}]},Rd={id:"plugin-management-tour",title:(0,S.__)("Plugin management","extendify-local"),settings:{allowOverflow:!1,startFrom:[window.extSharedData.adminUrl+"plugins.php"]},onStart:()=>{document.body.classList.contains("folded")&&document.querySelector("#menu-plugins").classList.add("opensub")},steps:[{title:(0,S.__)("Installed Plugins menu","extendify-local"),text:(0,S.__)("Click this menu to see and manage the plugins you have installed.","extendify-local"),attachTo:{element:"#menu-plugins ul > li:nth-child(2)",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{onDetach:()=>{document.body.classList.contains("folded")&&document.querySelector("#menu-plugins").classList.remove("opensub")}}},{title:(0,S.__)("Installed plugins","extendify-local"),text:(0,S.__)("See all plugins installed on your site. This includes plugins that are active and deactivated.","extendify-local"),attachTo:{element:"tbody#the-list > tr:nth-child(1)",offset:{marginTop:15,marginLeft:0},position:{x:"right",y:"bottom"},hook:"top right"},events:{}},{title:(0,S.__)("Deactivate/activate option","extendify-local"),text:(0,S.__)("Under each plugin you can activate or deactivate it.","extendify-local"),attachTo:{element:"tbody#the-list > tr:nth-child(1) > td.plugin-title",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Add another","extendify-local"),text:(0,S.__)("Click here to add another plugin to your site.","extendify-local"),attachTo:{element:"a.page-title-action",offset:{marginTop:-5,marginLeft:15},boxPadding:{top:5,bottom:5,left:5,right:5},position:{x:"right",y:"top"},hook:"top left"},events:{}}]},Vd={id:"site-assistant-tour",title:(0,S.__)("Site Assistant","extendify-local"),settings:{allowOverflow:!1,startFrom:[`${window.extSharedData.adminUrl}admin.php?page=extendify-assist#dashboard`]},steps:[{title:(0,S.__)("Tasks","extendify-local"),text:(0,S.__)("Now that you've created your starter site, make it your own with these follow up tasks.","extendify-local"),showOnlyIf:()=>document.getElementById("assist-tasks-module"),attachTo:{element:"#assist-tasks-module",offset:{marginTop:window.innerWidth<=1151?-15:2,marginLeft:window.innerWidth<=1151?-25:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Quick Links","extendify-local"),text:(0,S.__)("Easily access some of the most common items in WordPress with these quick links.","extendify-local"),attachTo:{element:"#assist-quick-links-module",offset:{marginTop:window.innerWidth<=1151?-15:2,marginLeft:window.innerWidth<=1151?-25:15},position:{x:"right",y:"top"},hook:"top left"},events:{onAttach:()=>{}}},{title:(0,S.__)("Website Tools & Plugins","extendify-local"),text:(0,S.__)("See our personalized recommendations for you that will help you accomplish your goals.","extendify-local"),showOnlyIf:()=>document.querySelector("#assist-recommendations-module"),attachTo:{element:"#assist-recommendations-module",offset:{marginTop:window.innerWidth<=1151?-15:2,marginLeft:window.innerWidth<=1151?-25:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Help Center","extendify-local"),text:(0,S.__)("You can always access the help center by clicking this button.","extendify-local"),showOnlyIf:()=>document.querySelector("#wp-admin-bar-help-center-btn"),attachTo:{element:"#wp-admin-bar-help-center-btn",offset:{marginTop:45,marginLeft:-5},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Visit your site","extendify-local"),text:(0,S.__)("You can always visit your site by clicking this button.","extendify-local"),attachTo:{element:"#assist-menu-bar",offset:{marginTop:20,marginLeft:-5},position:{x:"left",y:"bottom"},hook:"top left",boxPadding:{top:5,bottom:5,left:5,right:5}},events:{}},{title:(0,S.__)("Site Assistant","extendify-local"),text:(0,S.__)("Come back to the Site Assistant any time by clicking the menu item.","extendify-local"),attachTo:{element:"#toplevel_page_extendify-assist",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{onAttach:()=>{document.body.classList.contains("folded")&&(document.body.classList.remove("folded"),document.body.classList.add("temp-open"))},onDetach:()=>{document.body.classList.contains("temp-open")&&(document.body.classList.remove("temp-open"),document.body.classList.add("folded"))}}}]},Fd={id:"users-screen-tour",title:(0,S.__)("Users screen","extendify-local"),settings:{allowOverflow:!0,startFrom:[window.extSharedData.adminUrl+"users.php"]},onStart:()=>{document.body.classList.contains("folded")&&document.querySelector("#menu-users").classList.add("opensub")},steps:[{title:(0,S.__)("All Users menu","extendify-local"),text:(0,S.__)("Click here to view and manage the users on your site.","extendify-local"),attachTo:{element:"#menu-users ul > li:nth-child(2)",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{onDetach:()=>{document.body.classList.contains("folded")&&document.querySelector("#menu-users").classList.remove("opensub")}}},{title:(0,S.__)("Users","extendify-local"),text:(0,S.__)("See all of your users, including admin users in this table.","extendify-local"),attachTo:{element:"tbody#the-list > tr:nth-child(1)",offset:{marginTop:15,marginLeft:0},position:{x:"right",y:"bottom"},hook:"top right"},events:{}},{title:(0,S.__)("Edit user information","extendify-local"),text:(0,S.__)("Click the edit button to change the user's role, manage their account, or change their profile information.","extendify-local"),attachTo:{element:"tbody#the-list > tr:nth-child(1) > td.username",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{onAttach:()=>{document.querySelector("tbody#the-list > tr:nth-child(1) > td.username .row-actions").style.left="0"},onDetach:()=>{document.querySelector("tbody#the-list > tr:nth-child(1) > td.username .row-actions").style.left="-9999em"}}},{title:(0,S.__)("Search for users","extendify-local"),text:(0,S.__)("Use the search bar to find a particular user.","extendify-local"),attachTo:{element:"p.search-box",offset:{marginTop:-5,marginLeft:-15},boxPadding:{top:5,bottom:5,left:5,right:5},position:{x:"left",y:"top"},hook:"top right"},events:{}},{title:(0,S.__)("Add a new user","extendify-local"),text:(0,S.__)("Click the Add New button to add a new user to your site.","extendify-local"),attachTo:{element:".page-title-action",offset:{marginTop:-5,marginLeft:15},boxPadding:{top:5,bottom:5,left:5,right:5},position:{x:"right",y:"top"},hook:"top left"},events:{}}]},jd={"welcome-tour":{id:"welcome-tour",title:(0,S.__)("Getting started with WordPress","extendify-local"),settings:{allowOverflow:!0,startFrom:[window.extSharedData.adminUrl+"index.php",window.extSharedData.adminUrl+"admin.php?page=extendify-assist#dashboard"],minBoxWidth:"360px"},onStart:()=>{document.body.classList.contains("folded")&&(document.body.classList.remove("folded"),document.body.classList.add("temp-open"))},onFinish:()=>{document.body.classList.contains("temp-open")&&(document.body.classList.remove("temp-open"),document.body.classList.add("folded"))},steps:[{title:(0,S.__)("View Site","extendify-local"),text:(0,S.__)("At any time, you can view your site (from a visitor's perspective) from the top admin bar under your site's name.","extendify-local"),image:"https://assets.extendify.com/tours/welcome/view-site.gif",attachTo:{element:"#wp-admin-bar-view-site",offset:{marginTop:0,marginLeft:10},position:{x:"right",y:"top"},hook:"top left"},events:{beforeAttach:()=>{const e=document.querySelector("#wp-admin-bar-site-name .ab-sub-wrapper");e.style.position="relative",e.style.display="block"},onAttach:()=>{const e=document.querySelector("#wp-admin-bar-site-name .ab-sub-wrapper");e.style.position="relative",e.style.display="block"},onDetach:()=>{const e=document.querySelector("#wp-admin-bar-site-name .ab-sub-wrapper");e.style.position="absolute",e.style.display=""}}},{title:(0,S.__)("Site Assistant","extendify-local"),text:(0,S.__)("Access the Site Assistant at any time.","extendify-local"),attachTo:{element:"#toplevel_page_extendify-assist",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:document.getElementById("toplevel_page_wpSq")?.textContent?.replace(/[^\w\s²]/g,"").trim(),text:(0,S.__)("Click here to go to your website management dashboard. From there you will be able to create more websites, and manage your account settings.","extendify-local"),showOnlyIf:()=>document.getElementById("toplevel_page_wpSq"),attachTo:{element:"#toplevel_page_wpSq",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Dashboard","extendify-local"),text:(0,S.__)("The default WordPress dashboard will have some overall site metrics and modules added from certain plugins.","extendify-local"),attachTo:{element:"#menu-dashboard",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Posts","extendify-local"),text:(0,S.__)("Manage and create blog posts.","extendify-local"),attachTo:{element:"#menu-posts",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Media","extendify-local"),text:(0,S.__)("Add, edit, or remove images and other media from your library. When you upload an image to be used on your site, it will be added to the library.","extendify-local"),attachTo:{element:"#menu-media",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Pages","extendify-local"),text:(0,S.__)("Use the pages menu to add, delete, or edit the pages on your site.","extendify-local"),image:"https://assets.extendify.com/tours/welcome/add-pages.gif",attachTo:{element:"#menu-pages",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Comments","extendify-local"),text:(0,S.__)("If you have commenting enabled on your posts, you can manage those comments here.","extendify-local"),attachTo:{element:"#menu-comments",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Appearance","extendify-local"),text:(0,S.__)("Manage your theme and access the Site Editor from the Appearance menu. The Site Editor is where you can make global changes to your site (such as the menu, header/footer, and styles).","extendify-local"),attachTo:{element:"#menu-appearance",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Plugins","extendify-local"),text:(0,S.__)("Add or manage the plugins on your site.","extendify-local"),attachTo:{element:"#menu-plugins",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Users","extendify-local"),text:(0,S.__)("Add or manage users on your site, both admin users and others.","extendify-local"),attachTo:{element:"#menu-users",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Tools","extendify-local"),text:(0,S.__)("Import/export post data, check site health, and edit theme or plugin files directly in the WordPress admin.","extendify-local"),attachTo:{element:"#menu-tools",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Settings","extendify-local"),text:(0,S.__)("Advanced settings for your site and for certain plugins.","extendify-local"),attachTo:{element:"#menu-settings",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("Collapse menu","extendify-local"),text:(0,S.__)("Use this toggle to collapse or expand the sidebar menu.","extendify-local"),attachTo:{element:"#collapse-menu",offset:{marginTop:0,marginLeft:15},position:{x:"right",y:"top"},hook:"top left"},events:{}},{title:(0,S.__)("User","extendify-local"),text:(0,S.__)("Manage your profile or log out of your account here.","extendify-local"),attachTo:{element:"#wp-admin-bar-user-actions",offset:{marginTop:0,marginLeft:-15},position:{x:"left",y:"top"},hook:"top right"},events:{beforeAttach:()=>{const e=document.querySelector("#wp-admin-bar-my-account .ab-sub-wrapper");e.style.position="relative",e.style.display="block"},onAttach:()=>{const e=document.querySelector("#wp-admin-bar-my-account .ab-sub-wrapper");e.style.position="relative",e.style.display="block",document.querySelector("#help-center-tour-next-button")?.focus()},onDetach:()=>{const e=document.querySelector("#wp-admin-bar-my-account .ab-sub-wrapper");e.style.position="absolute",e.style.display=""}}}]},"plugin-install-tour":Od,"plugin-management-tour":Rd,"page-editor-tour":Md,"library-tour":Ad,"users-screen-tour":Fd,"site-assistant-tour":Vd},Id=({onOpen:t,classes:n})=>{const{startTour:r}=Cd(),{setVisibility:o}=wd(),i=Object.values(jd).filter((e=>e.settings.startFrom.includes(window.location.href)||!e.settings.startFrom));return(0,e.createElement)("section",{className:n,"data-test":"help-center-tours-section"},(0,e.createElement)("button",{"data-test":"help-center-tours-open-button",type:"button",onClick:t,className:Nc()("m-0 flex w-full cursor-pointer justify-between gap-2 rounded-md border border-gray-200 bg-transparent p-2.5 text-left hover:bg-gray-100",{"rounded-b-none":i.length>0})},(0,e.createElement)(kc,{icon:yd,className:"rounded-full border-0 bg-design-main fill-design-text p-2",size:48}),(0,e.createElement)("div",{className:"grow pl-1"},(0,e.createElement)("h1",{className:"m-0 p-0 text-lg font-medium"},(0,S.__)("Tours","extendify-local")),(0,e.createElement)("p",{className:"m-0 p-0 text-xs text-gray-800"},(0,S.__)("Learn more about your WordPress admin","extendify-local"))),(0,e.createElement)("div",{className:"flex h-12 grow-0 items-center justify-between"},(0,e.createElement)(kc,{icon:Lc,size:24,className:"fill-current text-gray-700"}))),i.length>0&&(0,e.createElement)("button",{type:"button",className:"text-md m-0 flex w-full cursor-pointer items-center justify-between gap-2 rounded-md rounded-t-none border border-t-0 border-gray-200 bg-transparent p-3 px-4 pl-[4.25rem] text-left font-medium text-gray-900 hover:bg-gray-100",onClick:()=>{o("minimized"),r(i[0])}},(0,S.__)("Tour this page","extendify-local"),(0,e.createElement)(kc,{icon:vd,size:16})))},Bd=[{slug:"tours",title:(0,S.__)("Tours","extendify-local"),component:()=>{const{wasCompleted:t,startTour:n}=Cd(),{setVisibility:r}=wd();return(0,e.createElement)("section",{className:"p-4"},(0,e.createElement)("ul",{className:"m-0 flex flex-col gap-2 p-0","data-test":"help-center-tours-items-list"},Object.values(jd).map((o=>{const{id:i,title:s}=o;return(0,e.createElement)("li",{key:i,className:"m-0 p-0"},(0,e.createElement)("button",{type:"button",className:"m-0 flex w-full cursor-pointer items-center justify-between gap-2 bg-gray-100 px-4 py-3.5 text-sm font-medium text-gray-900 hover:bg-gray-150",onClick:()=>{r("minimized"),n(o)}},s,t(i)?(0,e.createElement)(kc,{"data-test":"restart-tour-icon",icon:xd,size:16}):(0,e.createElement)(kc,{"data-test":"play-tour-icon",icon:vd,size:16})))}))))}}],Hd=[{slug:"dashboard",title:(0,S.__)("Help Center","extendify-local"),component:()=>{const{navigateTo:t}=Wd();return(0,e.createElement)("div",{className:"mx-auto flex w-full max-w-md flex-col gap-3 rounded-2xl p-4"},(0,e.createElement)(fd,{onOpen:()=>t("knowledge-base")}),(0,e.createElement)(Id,{onOpen:()=>t("tours"),classes:"hidden md:block"}),window.extSharedData?.aiChatEnabled&&(0,e.createElement)(ou,{onOpen:()=>t("ai-chat")}))}},...gd,...Bd,...su],zd={history:[],viewedPages:[],current:null},Ud=mc(bc(yc(((e,t)=>{var n;return{...zd,...null!==(n=sc(window.extHelpCenterData.userData.routerData)?.state)&&void 0!==n?n:{},goBack:()=>{if(t().history.length<2)return;const n=t().history[1];Pc.getState().incrementActivity(`hc-${n.slug}-back`),e((e=>({history:e.history.slice(1),current:n})))},setCurrent:n=>{if(!n)return;if(t().history[0]?.slug===n.slug)return;const r=t(),o=(new Date).toISOString(),i=o,s=r.viewedPages.find((e=>e.slug===n.slug)),a=[...r.viewedPages.filter((e=>e.slug!==n.slug)),s?{...s,count:Number(s.count)+1,lastViewedAt:o}:{slug:n.slug,firstViewedAt:i,lastViewedAt:o,count:1}];ic()({path:"/extendify/v1/help-center/router-data",method:"POST",data:{state:{viewedPages:a}}}),e({history:[n,...r.history].filter(Boolean),current:n,viewedPages:a})},reset:()=>e({...zd})}}),{name:"Extendify Help Center Router"}),{name:"extendify-help-center-router",storage:xc((()=>sessionStorage)),partialize:({history:e,current:t})=>({history:e,current:{...t,component:null}})})),Wd=()=>{var t,n;const{current:r,setCurrent:o,history:s,goBack:a,reset:l}=Ud(),c=null!==(t=null!==(n=r?.component)&&void 0!==n?n:Hd.find((e=>e.slug===r?.slug))?.component)&&void 0!==t?t:()=>null;return(0,i.useEffect)((()=>{r||o(Hd[0])}),[r,o]),{current:r,CurrentPage:(0,i.useCallback)((()=>(0,e.createElement)("div",{role:"region","aria-live":"polite",className:"h-full"},(0,e.createElement)("h1",{className:"sr-only"},r?.title),(0,e.createElement)(c,null))),[r]),navigateTo:e=>{const t=Hd.find((t=>t.slug===e));if(!t)return o(Hd[0]);Pc.getState().incrementActivity(`hc-${t.slug}`),o(t)},goBack:a,history:s,reset:l}},$d=()=>{const{CurrentPage:t}=Wd();return(0,e.createElement)("div",{className:"h-full w-full"},(0,e.createElement)(t,null))},qd=(0,s.jsx)(Ac.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(Ac.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})}),Gd=(0,s.jsx)(Ac.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(Ac.Path,{d:"M7 11.5h10V13H7z"})}),{partnerLogo:Yd,partnerName:Kd}=window.extSharedData,Xd=()=>{const{visibility:t,setVisibility:n}=wd(),{incrementActivity:r}=Pc(),{current:o,history:i}=Wd(),s="minimized"===t,a=()=>{const e=s?"open":"minimized";r(`hc-toggle-button-${e}`),n(e)};return(0,e.createElement)("div",{className:"relative flex items-center justify-end gap-x-2 bg-banner-main p-4"},(0,e.createElement)("div",{role:s?"button":"heading",onClick:s?a:void 0,"aria-label":s?(0,S.__)("Show Help Center","extendify-local"):void 0,"aria-expanded":s?"false":"true",className:Nc()("flex w-full justify-between bg-banner-main",{"cursor-pointer":s})},(0,e.createElement)("div",{className:Nc()("flex w-full gap-1",{"gap-4":1===i.length})},(0,e.createElement)(Zd,null),o?.title&&(0,e.createElement)("span",{className:"border-banner-text text-base font-medium text-banner-text"},o.title))),(0,e.createElement)("div",{className:"flex items-center justify-end gap-2.5"},(0,e.createElement)("button",{className:"m-0 cursor-pointer border-0 bg-transparent fill-banner-text p-0 text-banner-text",type:"button","data-test":"help-center-toggle-minimize-button",onClick:a},s?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(kc,{className:"rotate-90 fill-current",icon:qd,size:24}),(0,e.createElement)("span",{className:"sr-only"},(0,S.__)("Show Help Center","extendify-local"))):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(kc,{className:"fill-current",icon:Gd,size:24}),(0,e.createElement)("span",{className:"sr-only"},(0,S.__)("Minimize Help Center","extendify-local")))),(0,e.createElement)("button",{className:"m-0 cursor-pointer border-0 bg-transparent fill-banner-text p-0 text-banner-text",type:"button","data-test":"help-center-close-button",onClick:()=>{r(`hc-close-button-when-${t}`),n("closed")}},(0,e.createElement)(kc,{icon:ud,size:24}),(0,e.createElement)("span",{className:"sr-only"},(0,S.__)("close","extendify-local")))))},Zd=()=>{const{goBack:t,history:n}=Wd(),{visibility:r}=wd();return n.length>1&&"open"===r?(0,e.createElement)("button",{className:"m-0 cursor-pointer border-0 bg-transparent fill-banner-text p-0 text-banner-text",type:"button",onClick:t},(0,e.createElement)(kc,{icon:qd}),(0,e.createElement)("span",{className:"sr-only"},(0,S.__)("Go back","extendify-local"))):Yd?(0,e.createElement)("div",{className:"flex h-6 justify-center bg-banner-main after:relative after:-right-2 after:top-0.5 after:mr-2 after:text-banner-text after:opacity-40 after:content-['|']"},(0,e.createElement)("div",{className:"flex h-6 max-w-[9rem] overflow-hidden"},(0,e.createElement)("img",{className:"max-h-full max-w-full object-contain",src:Yd,alt:Kd}))):null},Jd=()=>(0,e.createElement)("div",{className:"overflow-hidden rounded-md border border-gray-500 shadow-2xl","data-test":"help-center-minimize-state"},(0,e.createElement)(Xd,null)),Qd=()=>{const{visibility:t}=wd(),{reset:n}=Wd(),{reset:r}=id(),{reset:o}=qc();return(0,i.useEffect)((()=>{"closed"===t&&(n(),r(),o())}),[o,r,n,t]),"minimized"===t?(0,e.createElement)("div",{className:"extendify-help-center"},(0,e.createElement)("div",{className:"fixed bottom-0 right-0 z-high mx-auto w-[420px] md:m-8"},(0,e.createElement)(Jd,null))):"open"!==t?null:(0,e.createElement)(jt,{ref:async()=>{await Promise.resolve(),document?.documentElement?.style&&(document.documentElement.style.overflow="unset")},className:"extendify-help-center","data-test":"help-center-modal",open:"open"===t,static:!0,onClose:()=>{}},(0,e.createElement)("div",{className:"fixed bottom-0 right-0 z-high mx-auto h-full max-h-[589px] w-full max-w-[420px] md:m-8 md:mt-20"},(0,e.createElement)(rc.div,{key:"help-center-modal",initial:{y:6,opacity:0},animate:{y:0,opacity:1},exit:{y:0,opacity:0},transition:{duration:.2,delay:.1},className:"relative mx-auto h-full w-full shadow-2xl-flipped sm:flex sm:overflow-hidden md:rounded-md md:shadow-2xl"},(0,e.createElement)(jt.Title,{className:"sr-only"},(0,S.__)("Extendify Help Center","extendify-local")),(0,e.createElement)("div",{className:"relative flex h-full w-full flex-col rounded-md border border-gray-400 bg-gray-50 md:overflow-hidden"},(0,e.createElement)(Xd,null),(0,e.createElement)("div",{className:"flex-grow overflow-y-auto overscroll-contain"},(0,e.createElement)($d,null))))))},eh=e=>{const{top:t,right:n,bottom:r,left:o,width:i,height:s,x:a,y:l}=e.getBoundingClientRect();return{top:t,right:n,bottom:r,left:o,width:i,height:s,x:a,y:l}},th=()=>{var t,n;const r=(0,i.useRef)(),{currentTour:o,currentStep:s,startTour:a,closeCurrentTour:l,getStepData:c,onTourPage:u}=Cd(),{settings:d}=o||{},{image:h,title:p,text:m,attachTo:f,events:g,options:y}=c(s),{queueTourForRedirect:v,queuedTour:x,clearQueuedTour:w}=wd(),{element:b,frame:T,offset:C,position:P,hook:k,boxPadding:A}=f||{},_=(0,i.useMemo)((()=>"function"==typeof b?b():b),[b]),L=(0,i.useMemo)((()=>"function"==typeof T?T():T),[T]),D=(0,i.useMemo)((()=>"function"==typeof C?C():C),[C]),M=(0,i.useMemo)((()=>"function"==typeof k?k():k),[k]),N=(0,i.useRef)(),O=(0,i.useRef)(!1),[R,V]=(0,i.useState)(null),[F,j]=(0,i.useState)(!1),[I,B]=(0,i.useState)(!1),[H,z]=(0,i.useState)(null),[U,W]=(0,i.useState)({x:void 0,y:void 0,...D}),$=(0,i.useCallback)(((e,t)=>{W(20===e?{x:e,y:t}:{x:e,y:t,...D})}),[D]),q=(0,i.useCallback)((()=>{const e=M?.split(" ")||[];return{x:e.includes("right")?r.current?.offsetWidth:0,y:e.includes("bottom")?r.current?.offsetHeight:0}}),[M]),G=(0,i.useCallback)((()=>{var e,t,n,o;if(!R)return;const i=L&&null!==(e=document.querySelector(L)?.contentDocument)&&void 0!==e?e:document,s=eh(null!==(t=i.querySelector(_))&&void 0!==t?t:R);if(i!==document){const e=eh(i.defaultView.frameElement);s.x+=e.x,s.left+=e.x,s.right+=e.x,s.y+=e.y,s.top+=e.y,s.bottom+=e.y}if(window.innerWidth<=960)return void l("closed-resize");if(void 0===P?.x)return $(void 0,void 0),z(null),void B(!1);const a=Math.max(20,s?.[P.x]-q().x),c=Math.max(20,s?.[P.y]-q().y),u=r.current;$(Math.min(a,window.innerWidth-(null!==(n=u?.offsetWidth)&&void 0!==n?n:0)-20),Math.min(c,window.innerHeight-(null!==(o=u?.offsetHeight)&&void 0!==o?o:0)-20)),z(s)}),[R,P,q,$,L,_,l]);if((0,i.useLayoutEffect)((()=>{d?.startFrom&&(u()||(j(!0),v(o.id),l("redirected"),window.location.assign(d?.startFrom[0]),window.location.href.split("#")[0]===d.startFrom[0].split("#")[0]&&window.location.reload()))}),[d?.startFrom,o,v,l,u]),(0,i.useEffect)((()=>{const e=e=>{const{tourSlug:t}=e.detail;jd[t]&&requestAnimationFrame((()=>{window.dispatchEvent(new CustomEvent("extendify-hc:minimize")),a(jd[t])}))};return window.addEventListener("extendify-assist:start-tour",e),()=>{window.removeEventListener("extendify-assist:start-tour",e)}}),[a]),(0,i.useLayoutEffect)((()=>{if(F)return;const e=x;let t=0;if(!e||!jd[e])return w();const n=()=>{requestAnimationFrame((()=>{a(jd[e])})),w()};return addEventListener("load",n),"complete"===document.readyState&&(t=requestAnimationFrame(n)),()=>{cancelAnimationFrame(t),removeEventListener("load",n)}}),[a,x,w,F]),(0,i.useEffect)((()=>{var e,t;if(!_)return;const n=null!==(t=(L&&null!==(e=document.querySelector(L)?.contentDocument)&&void 0!==e?e:document).querySelector(_))&&void 0!==t?t:document.querySelector(_);return n?(V(n),()=>V(null)):void 0}),[L,_]),(0,i.useLayoutEffect)((()=>{if(R&&!F)return B(!0),G(),addEventListener("resize",G),y?.allowPointerEvents||(R.style.pointerEvents="none"),()=>{removeEventListener("resize",G),R.style.pointerEvents="auto"}}),[F,R,G,y]),(0,i.useEffect)((()=>{O.current||s&&(O.current=!0)}),[s]),(0,i.useEffect)((()=>{if(void 0===s||!R)return;g?.onAttach?.(R);let e=0;const t=requestAnimationFrame((()=>{R.scrollIntoView({block:"start"}),G(),e=requestAnimationFrame(G)}));return N?.current?.focus(),()=>{g?.onDetach?.(R),cancelAnimationFrame(t),cancelAnimationFrame(e)}}),[s,g,R,G,N]),(0,i.useLayoutEffect)((()=>{if(d?.allowOverflow)return document.documentElement.classList.add("ext-force-overflow-auto"),()=>{document.documentElement.classList.remove("ext-force-overflow-auto")}}),[d]),!I)return null;const Y=oh(H,A);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(E,null,Boolean(o)&&(0,e.createElement)(jt,{as:rc.div,static:!0,initialFocus:N,className:"extendify-help-center",open:Boolean(o),onClose:()=>{}},(0,e.createElement)("div",{className:"relative z-max"},(0,e.createElement)(rc.div,{ref:r,animate:{opacity:1,...U},initial:{opacity:0,...U},onAnimationComplete:()=>{G()},transition:{duration:O.current?.5:0,ease:"easeInOut"},className:"fixed left-0 top-0 z-20 flex max-w-xs flex-col bg-transparent shadow-2xl sm:overflow-hidden",style:{minWidth:null!==(t=d?.minBoxWidth)&&void 0!==t?t:"325px"}},(0,e.createElement)("button",{"data-test":"close-tour",className:"absolute right-0 top-0 z-20 m-2 flex h-6 w-6 cursor-pointer items-center justify-center rounded-full border-0 bg-white p-0 leading-none outline-none ring-1 ring-gray-200 focus:shadow-none focus:ring-wp focus:ring-design-main",onClick:()=>l("closed-manually"),"aria-label":(0,S.__)("Close Modal","extendify-local")},(0,e.createElement)(kc,{icon:Yc,className:"h-4 w-4 fill-current"})),(0,e.createElement)(jt.Title,{className:"sr-only"},null!==(n=o?.title)&&void 0!==n?n:(0,S.__)("Tour","extendify-local")),h&&(0,e.createElement)("div",{className:"w-full p-6",style:{minHeight:150,background:"linear-gradient(58.72deg, #485563 7.71%, #29323C 92.87%)"}},(0,e.createElement)("img",{src:h,className:"block w-full",alt:p})),(0,e.createElement)("div",{className:"relative m-0 bg-white p-6 pt-0 text-left"},p&&(0,e.createElement)("h2",{className:"mb-2 text-xl font-medium"},p),m&&(0,e.createElement)("p",{className:"mb-6"},m),(0,e.createElement)(rh,{initialFocus:N})))))),y?.allowPointerEvents||(0,e.createElement)("div",{"aria-hidden":!0,className:"fixed inset-0 z-max-1"}),(0,e.createElement)(E,null,Boolean(o)&&void 0!==H?.left&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(rc.div,{initial:{opacity:0,clipPath:"polygon(0px 0px, 100% 0px, 100% 100%, 0px 100%, 0 0)"},animate:{opacity:1,clipPath:`polygon(0px 0px, 100% 0px, 100% 100%, 0px 100%, 0 0, ${Y.left}px 0, ${Y.left}px ${Y?.bottom}px, ${Y?.right}px ${Y.bottom}px, ${Y.right}px ${Y.top}px, ${Y.left}px ${Y.top}px)`},transition:{duration:O.current?.5:0,ease:"easeInOut"},className:"fixed inset-0 z-max-1 hidden bg-black/70 lg:block","aria-hidden":"true"}),(0,e.createElement)(nh,{rectWithPadding:Y,finishedStepOne:O}))))},nh=({rectWithPadding:t,finishedStepOne:n})=>{const[r,o]=(0,i.useState)(!1);return(0,e.createElement)(rc.div,{initial:{...null!=t?t:{}},animate:{...null!=t?t:{}},transition:{duration:n.current?.5:0,ease:"easeInOut"},onAnimationStart:()=>o(!1),onAnimationComplete:()=>o(!0),className:Nc()("fixed inset-0 z-high hidden border-2 lg:block",{"border-transparent":!r,"border-design-main":r}),"aria-hidden":"true"})},rh=({initialFocus:t})=>{const{goToStep:n,completeCurrentTour:r,currentStep:o,preparingStep:i,getStepData:s,hasNextStep:a,nextStep:l,hasPreviousStep:c,prevStep:u,currentTour:d}=Cd(),{options:h={}}=s(o),{hideBackButton:p=!1}=h,{steps:m,settings:f}=d||{};return(0,e.createElement)("div",{id:"extendify-tour-navigation",className:"flex w-full items-center justify-between"},(0,e.createElement)("div",{className:"flex flex-1 justify-start"},(0,e.createElement)(E,null,c()&&!p&&(0,e.createElement)(rc.div,{initial:{opacity:0},animate:{opacity:1}},(0,e.createElement)("button",{className:"flex h-8 items-center justify-center gap-2 rounded-sm bg-transparent p-0 text-gray-900 ring-design-main hover:bg-transparent focus:outline-none focus:ring-wp focus:ring-offset-1 focus:ring-offset-white disabled:opacity-60",onClick:u,disabled:i>-1},i<o&&(0,e.createElement)(Xc.Spinner,{className:"m-0 h-4 text-design-main"}),(0,e.createElement)("span",null,(0,S.__)("Back","extendify-local")))))),m?.length>2&&!f?.hideDotsNav?(0,e.createElement)("nav",{role:"navigation","aria-label":(0,S.__)("Tour Steps","extendify-local"),className:"flex flex-1 -translate-x-3 items-center justify-center gap-1"},m.map(((t,r)=>(0,e.createElement)("div",{key:r},(0,e.createElement)("button",{"aria-label":(0,S.sprintf)( // translators: %1$s is the current step, %2$s is the total number of steps (0,S.__)("%1$s of %2$s","extendify-local"),r+1,m.length),"aria-current":r===o,className:"m-0 block h-2.5 w-2.5 cursor-pointer rounded-full p-0 ring-offset-1 ring-offset-white focus:outline-none focus:ring-wp focus:ring-design-main "+(r===o?"bg-design-main":"bg-gray-300"),onClick:()=>n(r),disabled:i>-1}))))):null,(0,e.createElement)("div",{className:"flex flex-1 justify-end"},a()?(0,e.createElement)(Xc.Button,{ref:t,id:"help-center-tour-next-button","data-test":"help-center-tour-next-button",onClick:l,disabled:i>-1,className:"flex gap-2 bg-design-main text-design-text focus:text-design-text disabled:opacity-60",variant:"primary"},i>o&&(0,e.createElement)(Xc.Spinner,{className:"m-0 h-4 text-design-main"}),(0,e.createElement)("span",null,(0,S.__)("Next","extendify-local"))):(0,e.createElement)(Xc.Button,{id:"help-center-tour-next-button","data-test":"help-center-tour-next-button",onClick:()=>{r()},className:"bg-design-main",variant:"primary"},(0,S.__)("Done","extendify-local"))))},oh=(e,t)=>{var n,r,o,i,s,a,l,c,u,d;return{top:e.top-(null!==(n=t?.top)&&void 0!==n?n:0),left:e.left-(null!==(r=t?.left)&&void 0!==r?r:0),right:e.right+(null!==(o=t?.right)&&void 0!==o?o:0),bottom:e.bottom+(null!==(i=t?.bottom)&&void 0!==i?i:0),width:e.width+(null!==(s=t?.left)&&void 0!==s?s:0)+(null!==(a=t?.right)&&void 0!==a?a:0),height:e.height+(null!==(l=t?.top)&&void 0!==l?l:0)+(null!==(c=t?.bottom)&&void 0!==c?c:0),x:e.x-(null!==(u=t?.left)&&void 0!==u?u:0),y:e.y-(null!==(d=t?.top)&&void 0!==d?d:0)}},ih=()=>{const{setVisibility:t,visibility:n}=wd(),{navigateTo:r}=Wd();return(0,i.useEffect)((()=>{const e=e=>{e?.detail?.page&&r(e.detail.page),t("open")},o=()=>{"open"===n&&t("minimized")};return window.addEventListener("extendify-hc:open",e),window.addEventListener("extendify-hc:minimize",o),()=>{window.removeEventListener("extendify-hc:open",e),window.removeEventListener("extendify-hc:minimize",o)}}),[t,n,r]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(E,null,(0,e.createElement)(Qd,null)),(0,e.createElement)(th,null))},sh=(e,t)=>{"function"==typeof i.createRoot?(0,i.createRoot)(t).render(e):(0,i.render)(e,t)},ah=()=>{const e=new URLSearchParams(window.location.search);return["page"].includes(e.get("extendify-launch"))},lh=window.wp.plugins,ch=(0,s.jsx)(Ac.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:(0,s.jsx)(Ac.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm-1 16v-2h2v2h-2zm2-3v-1.141A3.991 3.991 0 0016 10a4 4 0 00-8 0h2c0-1.103.897-2 2-2s2 .897 2 2-.897 2-2 2a1 1 0 00-1 1v2h2z"})}),uh=()=>{const{setVisibility:t}=wd(),{incrementActivity:n}=Pc();return(0,e.createElement)("button",{type:"button","data-test":"help-center-adminbar-button",onClick:()=>{t("open"),n("hc-admin-bar-button")},className:"m-1.5 -mt-1 inline-flex h-6 cursor-pointer items-center justify-center gap-1 rounded-sm border-0 bg-wp-theme-main p-1 px-2 leading-extra-tight text-white ring-offset-1 ring-offset-wp-theme-bg focus:outline-none focus:ring-wp focus:ring-wp-theme-main"},(0,S.__)("Help","extendify-local"),(0,e.createElement)(Xc.Icon,{icon:ch,width:18,height:18,className:"fill-design-text"}))},dh=()=>{const{setVisibility:t}=wd(),{incrementActivity:n}=Pc();return(0,e.createElement)(Xc.Button,{className:"is-compact ml-1 inline-flex gap-1","data-test":"help-center-editor-page-button",onClick:()=>{t("open"),n("hc-editor-page-button")},variant:"primary"},(0,S.__)("Help","extendify-local"),(0,e.createElement)(kc,{icon:ch,width:18,height:18,className:"fill-design-text"}))};(()=>{if(ah())return;const t="wp-admin-bar-help-center-btn";if(document.getElementById(t))return;const n=Object.assign(document.createElement("li"),{className:"extendify-help-center",id:t});document.querySelector("#wp-admin-bar-my-account")?.after(n),sh((0,e.createElement)(uh,null),n)})(),(0,lh.registerPlugin)("extendify-help-center-buttons",{render:()=>(0,e.createElement)(hh,null)});const hh=()=>((0,i.useEffect)((()=>{if(ah())return;const t="extendify-gtnbrg-help-center-btn";if(document.getElementById(t))return;const n=Object.assign(document.createElement("span"),{className:"extendify-help-center",id:t});requestAnimationFrame((()=>{requestAnimationFrame((()=>{document.querySelector('[aria-controls="edit-post:document"]')?.after(n),document.querySelector('[aria-controls="edit-site:template"]')?.after(n),sh((0,e.createElement)(dh,null),n)}))}))}),[]),null);r()((()=>{if(ah())return;const t="extendify-help-center-main";if(document.getElementById(t))return;const n=Object.assign(document.createElement("div"),{className:"extendify-help-center",id:t});document.body.append(n),sh((0,e.createElement)(ih,null),n)}))})()})();