(function(){var an={1609:(function(o){"use strict";o.exports=window.React}),3593:(function(o,M,L){"use strict";o.exports=L(3691)}),3691:(function(o,M,L){"use strict";/** @license React v17.0.2
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */L(9645);var f=L(1609),u=60103;if(M.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var g=Symbol.for;u=g("react.element"),M.Fragment=g("react.fragment")}var J=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,t=Object.prototype.hasOwnProperty,n={key:!0,ref:!0,__self:!0,__source:!0};function r(i,m,v){var x,y={},j=null,D=null;v!==void 0&&(j=""+v),m.key!==void 0&&(j=""+m.key),m.ref!==void 0&&(D=m.ref);for(x in m)t.call(m,x)&&!n.hasOwnProperty(x)&&(y[x]=m[x]);if(i&&i.defaultProps)for(x in m=i.defaultProps,m)y[x]===void 0&&(y[x]=m[x]);return{$$typeof:u,type:i,key:j,ref:D,props:y,_owner:J.current}}M.jsx=r,M.jsxs=r}),8140:(function(o,M,L){"use strict";/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var f=L(1609);function u(y,j){return y===j&&(y!==0||1/y===1/j)||y!==y&&j!==j}var g=typeof Object.is=="function"?Object.is:u,J=f.useState,t=f.useEffect,n=f.useLayoutEffect,r=f.useDebugValue;function i(y,j){var D=j(),q=J({inst:{value:D,getSnapshot:j}}),P=q[0].inst,Z=q[1];return n(function(){P.value=D,P.getSnapshot=j,m(P)&&Z({inst:P})},[y,D,j]),t(function(){return m(P)&&Z({inst:P}),y(function(){m(P)&&Z({inst:P})})},[y]),r(D),D}function m(y){var j=y.getSnapshot;y=y.value;try{var D=j();return!g(y,D)}catch{return!0}}function v(y,j){return j()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:i;M.useSyncExternalStore=f.useSyncExternalStore!==void 0?f.useSyncExternalStore:x}),8279:(function(o,M,L){"use strict";o.exports=L(8140)}),8623:(function(o){(function(M,L){o.exports=L()})(window,(()=>(()=>{"use strict";var M={d:(t,n)=>{for(var r in n)M.o(n,r)&&!M.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n)},L={};let f;M.d(L,{default:()=>J}),window.DoMini===void 0?(f=function(t,n){return arguments[2]!==void 0?this.constructor.call(this,t,n):arguments.length!==1||typeof arguments[0]!="function"?new f(t,n,!0):void(document.readyState==="complete"||document.readyState==="loaded"||document.readyState==="interactive"?arguments[0].apply(this,[f]):window.addEventListener("DOMContentLoaded",(()=>{arguments[0].apply(this,[f])})))},f.prototype=f.fn={constructor:function(t,n){if(this.length=0,n!==void 0){if(n instanceof f)return n.find(t);if(this.isValidNode(n)||typeof n=="string")return f(n).find(t)}else if(typeof t=="string"&&t!=="")this.push(...this._(t));else{if(t instanceof f)return t;this.isValidNode(t)&&this.push(t)}return this},_:function(t){return t.charAt(0)==="<"?f._fn.createElementsFromHTML(t):[...document.querySelectorAll(t)]},isValidNode:t=>t instanceof Element||t instanceof Document||t instanceof Window,push:Array.prototype.push,pop:Array.prototype.pop,sort:Array.prototype.sort,splice:Array.prototype.splice},f.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],f._fn={},f.version="0.2.8"):f=window.DoMini;const u=f;u.fn.get=function(t){return t===void 0?Array.from(this):this[t]},u.fn.extend=function(){for(let t=1;t<arguments.length;t++)for(let n in arguments[t])arguments[t].hasOwnProperty(n)&&(arguments[0][n]=arguments[t][n]);return arguments[0]},u.fn.forEach=function(t){return this.get().forEach((function(n,r,i){t.apply(n,[n,r,i])})),this},u.fn.each=function(t){return this.get().forEach((function(n,r,i){t.apply(n,[r,n,i])})),this},u.fn.css=function(t,n){for(const r of this)if(arguments.length===1){if(typeof t!="object")return window.getComputedStyle(r)[t];Object.keys(t).forEach((function(i){r.style[i]=t[i]}))}else r.style[t]=n;return this},u.fn.hasClass=function(t){let n=this.get(0);return n!=null&&n.classList.contains(t)},u.fn.addClass=function(t){let n=t;return typeof t=="string"&&(n=t.split(" ")),n=n.filter((function(r){return r.trim()!==""})),n.length>0&&this.forEach((function(r){r.classList.add.apply(r.classList,n)})),this},u.fn.removeClass=function(t){if(t!==void 0){let n=t;typeof t=="string"&&(n=t.split(" ")),n=n.filter((function(r){return r.trim()!==""})),n.length>0&&this.forEach((function(r){r.classList.remove.apply(r.classList,n)}))}else this.forEach((function(n){n.classList.length>0&&n.classList.remove.apply(n.classList,n.classList)}));return this},u.fn.isVisible=function(){let t,n=this.get(0),r=!0;for(;n!==null;){if(t=window.getComputedStyle(n),t.display==="none"||t.visibility==="hidden"||parseInt(t.opacity)===0){r=!1;break}n=n.parentElement}return r},u.fn.val=function(t){let n;if(arguments.length===1){for(const r of this)if(r.type==="select-multiple"){t=typeof t=="string"?t.split(","):t;for(let i,m=0,v=r.options.length;m<v;m++)i=r.options[m],i.selected=t.indexOf(i.value)!==-1}else r.value=t;n=this}else{let r=this.get(0);r!=null&&(n=r.type==="select-multiple"?Array.prototype.map.call(r.selectedOptions,(function(i){return i.value})):r.value)}return n},u.fn.attr=function(t,n){let r;for(const i of this)if(arguments.length===2)i.setAttribute(t,n),r=this;else{if(typeof t!="object"){r=i.getAttribute(t);break}Object.keys(t).forEach((function(m){i.setAttribute(m,t[m])}))}return r},u.fn.removeAttr=function(t){for(const n of this)n.removeAttribute(t);return this},u.fn.prop=function(t,n){let r;for(const i of this){if(arguments.length!==2){r=i[t]!==void 0?i[t]:null;break}i[t]=n}return arguments.length===2?this:r},u.fn.data=function(t,n){const r=t.replace(/-([a-z])/g,(function(i){return i[1].toUpperCase()}));if(arguments.length===2){for(const i of this)i!=null&&(i.dataset[r]=n);return this}{let i=this.get(0);return i!=null&&i.dataset[r]!==void 0?i.dataset[r]:""}},u.fn.html=function(t){if(arguments.length===1){for(const n of this)n.innerHTML=t;return this}{let n=this.get(0);return n==null?"":n.innerHTML}},u.fn.text=function(t){if(arguments.length===1){for(const n of this)n.textContent=t;return this}{let n=this.get(0);return n==null?"":n.textContent}},u.fn.position=function(){let t=this.get(0);return t!=null?{top:t.offsetTop,left:t.offsetLeft}:{top:0,left:0}},u.fn.offset=function(){let t=this.get(0);return t!=null?u._fn.hasFixedParent(t)?t.getBoundingClientRect():u._fn.absolutePosition(t):{top:0,left:0}},u.fn.outerWidth=function(t){t=t||!1;let n=this.get(0);return n!=null?t?parseInt(n.offsetWidth)+parseInt(this.css("marginLeft"))+parseInt(this.css("marginRight")):parseInt(n.offsetWidth):0},u.fn.outerHeight=function(t){t=t||!1;let n=this.get(0);return n!=null?t?parseInt(n.offsetHeight)+parseInt(this.css("marginTop"))+parseInt(this.css("marginBottom")):parseInt(n.offsetHeight):0},u.fn.noPaddingHeight=function(t){return t=t||!1,this.length>0?t?parseInt(this.css("height"))+parseInt(this.css("marginTop"))+parseInt(this.css("marginBottom")):parseInt(this.css("height")):0},u.fn.noPaddingWidth=function(t){return t=t||!1,this.length>0?t?parseInt(this.css("width"))+parseInt(this.css("marginLeft"))+parseInt(this.css("marginRight")):parseInt(this.css("width")):0},u.fn.innerWidth=function(){let t=this.get(0);if(t!=null){let n=window.getComputedStyle(t);return this.outerWidth()-parseFloat(n.borderLeftWidth)-parseFloat(n.borderRightWidth)}return 0},u.fn.innerHeight=function(){let t=this.get(0);if(t!=null){let n=window.getComputedStyle(t);return this.outerHeight()-parseFloat(n.borderTopWidth)-parseFloat(n.borderBottomtWidth)}return 0},u.fn.width=function(){return this.outerWidth()},u.fn.height=function(){return this.outerHeight()},u.fn.on=function(){let t=arguments,n=function(i,m){let v;if(m.type==="mouseenter"||m.type==="mouseleave"||m.type==="mouseover"){let x=document.elementFromPoint(m.clientX,m.clientY);if(!x.matches(i[1]))for(;(x=x.parentElement)&&!x.matches(i[1]););x!=null&&(v=u(x))}else v=u(m.target).closest(i[1]);if(v!=null&&v.closest(this).length>0){let x=[];if(x.push(m),i[4]!==void 0)for(let y=4;y<i.length;y++)x.push(i[y]);i[2].apply(v.get(0),x)}},r=t[0].split(" ");for(let i=0;i<r.length;i++){let m=r[i];if(typeof t[1]=="string")this.forEach((function(v){if(!u._fn.hasEventListener(v,m,t[2])){let x=n.bind(v,t);v.addEventListener(m,x,t[3]),v._domini_events=v._domini_events===void 0?[]:v._domini_events,v._domini_events.push({type:m,selector:t[1],func:x,trigger:t[2],args:t[3]})}}));else for(let v=0;v<r.length;v++){let x=r[v];this.forEach((function(y){u._fn.hasEventListener(y,x,t[1])||(y.addEventListener(x,t[1],t[2]),y._domini_events=y._domini_events===void 0?[]:y._domini_events,y._domini_events.push({type:x,func:t[1],trigger:t[1],args:t[2]}))}))}}return this},u.fn.off=function(t,n){return this.forEach((function(r){if(r._domini_events!==void 0&&r._domini_events.length>0)if(t===void 0){let i;for(;i=r._domini_events.pop();)r.removeEventListener(i.type,i.func,i.args);r._domini_events=[]}else t.split(" ").forEach((function(i){let m,v=[];for(;m=r._domini_events.pop();)m.type!==i||n!==void 0&&m.trigger!==n?v.push(m):r.removeEventListener(i,m.func,m.args);r._domini_events=v}))})),this},u.fn.offForced=function(){let t=this;return this.forEach((function(n,r){let i=n.cloneNode(!0);n.parentNode.replaceChild(i,n),t[r]=i})),this},u.fn.trigger=function(t,n,r,i){return r=r||!1,i=i||!1,this.forEach((function(m){let v=!1;if(i&&typeof jQuery<"u"&&jQuery._data!==void 0&&jQuery._data(m,"events")!==void 0&&jQuery._data(m,"events")[t]!==void 0&&(jQuery(m).trigger(t,n),v=!0),!v&&r){let x=new Event(t);x.detail=n,m.dispatchEvent(x)}if(m._domini_events!==void 0)m._domini_events.forEach((function(x){if(x.type===t){let y=new Event(t);x.trigger.apply(m,[y].concat(n))}}));else{let x=!1,y=m;for(;y=y.parentElement,y!=null&&(y._domini_events!==void 0&&y._domini_events.forEach((function(j){if(j.selector!==void 0){let D=u(y).find(j.selector);if(D.length>0&&D.get().indexOf(m)>=0&&j.type===t){let q=new Event(t);j.trigger.apply(m,[q].concat(n)),x=!0}}})),!x););}})),this},u.fn.clear=function(){for(const t of this)delete t._domini_events;return this},u.fn.clone=function(){let t=[];for(const n of this)t.push(n.cloneNode(!0));return u().add(t)},u.fn.detach=function(t){let n=this,r=[];t!==void 0&&(n=this.find(t));for(const i of n)i.parentElement!=null&&r.push(i.parentElement.removeChild(i));return u().add(r)},u.fn.remove=function(t){return this.detach(t).off().clear()},u.fn.prepend=function(t){if((t=u._fn.elementArrayFromAny(t)).length>0)for(const n of this)for(const r of t)n.insertBefore(r,n.children[0]);return this},u.fn.append=function(t){if((t=u._fn.elementArrayFromAny(t)).length>0)for(const n of this)for(const r of t)n.appendChild(r);return this},u.fn.is=function(t){let n=!1;for(const r of this)if(r.matches(t)){n=!0;break}return n},u.fn.parent=function(t){let n=[];for(const r of this){let i=r.parentElement;typeof t=="string"&&(i==null||i.matches(t)||(i=null)),n.push(i)}return u().add(n)},u.fn.copy=function(t,n){let r,i,m;if(typeof t!="object"||t===null)return r=t,r;for(i in r=new t.constructor,t)t.hasOwnProperty(i)&&(m=typeof t[i],n&&m==="object"&&t[i]!==null?r[i]=this.copy(t[i]):r[i]=t[i]);return r},u.fn.first=function(){return u(this[0])},u.fn.last=function(){return u(this[this.length-1])},u.fn.prev=function(t){let n=[];for(const r of this){let i;if(typeof t=="string")for(i=r.previousElementSibling;i!=null;){if(i.matches(t)){n.push(i);break}i=i.previousElementSibling}else n.push(r.previousElementSibling)}return u(null).add(n)},u.fn.next=function(t){let n=[];for(const r of this){let i;if(typeof t=="string")for(i=r.nextElementSibling;i!=null;){if(i.matches(t)){n.includes(i)||n.push(i);break}i=i.nextElementSibling}else n.push(r.nextElementSibling)}return u(null).add(n)},u.fn.closest=function(t){let n=[];for(let r of this)if(typeof t=="string"&&t!==""){for(;!r.matches(t)&&(r=r.parentElement););n.includes(r)||n.push(r)}else{if((t=t instanceof u?t.get(0):t)instanceof Element)for(;r!==t&&(r=r.parentElement););else r=null;n.includes(r)||n.push(r)}return u().add(n)},u.fn.add=function(t){let n=u._fn.elementArrayFromAny(t);for(const r of n)Array.from(this).includes(r)||this.push(r);return this},u.fn.find=function(t){const n=new u;if(typeof t=="string"){let r=[];this.get().forEach((function(i){const m=i.querySelectorAll?.(t)??[];r=r.concat(Array.from(m))})),r.length>0&&n.add(r)}return n},u._fn.bodyTransform=function(){let t=0,n=0;if(typeof WebKitCSSMatrix<"u"){let r=window.getComputedStyle(document.body);if(r.transform!==void 0){let i=new WebKitCSSMatrix(r.transform);i.m41!=="undefined"&&(t=i.m41),i.m42!=="undefined"&&(n=i.m42)}}return{x:t,y:n}},u._fn.bodyTransformY=function(){return this.bodyTransform().y},u._fn.bodyTransformX=function(){return this.bodyTransform().x},u._fn.hasFixedParent=function(t){if(u._fn.bodyTransformY()!=0)return!1;do if(window.getComputedStyle(t).position=="fixed")return!0;while(t=t.parentElement);return!1},u._fn.hasEventListener=function(t,n,r){if(t._domini_events===void 0)return!1;for(let i=0;i<t._domini_events.length;i++)if(t._domini_events[i].trigger===r&&t._domini_events[i].type===n)return!0;return!1},u._fn.allDescendants=function(t){let n=[],r=this;return Array.isArray(t)||(t=[t]),t.forEach((function(i){for(let m=0;m<i.childNodes.length;m++){let v=i.childNodes[m];n.push(v),n=n.concat(r.allDescendants(v))}})),n},u._fn.createElementsFromHTML=function(t){let n=document.createElement("template");return n.innerHTML=t.replace(/(\r\n|\n|\r)/gm,""),[...n.content.childNodes]},u._fn.elementArrayFromAny=function(t){if(typeof t=="string")t=u(t).get();else if(t instanceof u)t=t.get();else if(t instanceof Element)t=[t];else{if(!(t instanceof Array))return[];t=t.filter((n=>n instanceof Element))}return t},u._fn.ElementArrayFromAny=u._fn.elementArrayFromAny,u._fn.absolutePosition=function(t){if(!t.getClientRects().length)return{top:0,left:0};let n=t.getBoundingClientRect(),r=t.ownerDocument.defaultView;return{top:n.top+r.pageYOffset,left:n.left+r.pageXOffset}},u._fn.plugin=function(t,n){u.fn[t]=function(r){return r!==void 0&&n[r]?n[r].apply(this,Array.prototype.slice.call(arguments,1)):this.forEach((function(i){i["domini_"+t]=Object.create(n).init(r,i)}))}},document.dispatchEvent(new Event("domini-dom-core-loaded"));const g=u;u.fn.animate=function(t,n,r){n=n||200,r=r||"easeInOutQuad";for(const i of this){let m,v,x,y,j,D=0,q=60,P={},Z={};if(x=this.prop("_domini_animations"),x=x??[],t===!1)x.forEach((function(te){clearInterval(te)}));else{let te=function(){D++,D>m?clearInterval(y):(v=j(D/m),Object.keys(Z).forEach((function(V){V.indexOf("scroll")>-1?i[V]=P[V]+Z[V]*v:i.style[V]=P[V]+Z[V]*v+"px"})))};j=u.fn.animate.easing[r]??u.fn.animate.easing.easeInOutQuad,Object.keys(t).forEach((function(V){V.indexOf("scroll")>-1?(P[V]=i[V],Z[V]=t[V]-P[V]):(P[V]=parseInt(window.getComputedStyle(i)[V]),Z[V]=t[V]-P[V])})),m=n/1e3*q,y=setInterval(te,1e3/q),x.push(y),this.prop("_domini_animations",x)}}return this},u.fn.animate.easing={linear:function(t){return t},easeInOutQuad:function(t){return t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2},easeOutQuad:function(t){return 1-(1-t)*(1-t)}},u.fn.unhighlight=function(t){let n={className:"highlight",element:"span"};return u.fn.extend(n,t),this.find(n.element+"."+n.className).forEach((function(){let r=this.parentNode;r.replaceChild(this.firstChild,this),r.normalize()}))},u.fn.highlight=function(t,n){this.defaults={className:"highlight",element:"span",caseSensitive:!1,wordsOnly:!1,excludeParents:".excludeFromHighlight"};const r=u,i={...this.defaults,...n};if(t.constructor===String&&(t=[t]),(t=t.filter((function(j){return j!==""}))).forEach((function(j,D,q){q[D]=j.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&").normalize("NFD").replace(/[\u0300-\u036f]/g,"")})),t.length===0)return this;let m=i.caseSensitive?"":"i",v="("+t.join("|")+")";i.wordsOnly&&(v="(?:,|^|\\s)"+v+"(?:,|$|\\s)");let x=new RegExp(v,m);function y(j,D,q,P,Z){if(Z=Z===""?r.fn.highlight.defaults:Z,j.nodeType===3){if(!r(j.parentNode).is(Z)){let te=j.data.normalize("NFD").replace(/[\u0300-\u036f]/g,"").match(D);if(te){let V,Oe=document.createElement(q||"span");Oe.className=P||"highlight",V=/\.|,|\s/.test(te[0].charAt(0))?te.index+1:te.index;let X=j.splitText(V);X.splitText(te[1].length);let yt=X.cloneNode(!0);return Oe.appendChild(yt),X.parentNode.replaceChild(Oe,X),1}}}else if(j.nodeType===1&&j.childNodes&&!/(script|style)/i.test(j.tagName)&&!r(j).closest(Z).length>0&&(j.tagName!==q.toUpperCase()||j.className!==P))for(let te=0;te<j.childNodes.length;te++)te+=y(j.childNodes[te],D,q,P,Z);return 0}return this.forEach((function(j){y(j,x,i.element,i.className,i.excludeParents)}))},u.fn.serialize=function(){let t=this.get(0);if(!t||t.nodeName!=="FORM")return"";let n,r,i=[];for(n=t.elements.length-1;n>=0;n-=1)if(t.elements[n].name!=="")switch(t.elements[n].nodeName){case"INPUT":switch(t.elements[n].type){case"checkbox":case"radio":t.elements[n].checked&&i.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value));break;case"file":break;default:i.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value))}break;case"TEXTAREA":i.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value));break;case"SELECT":switch(t.elements[n].type){case"select-one":i.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value));break;case"select-multiple":for(r=t.elements[n].options.length-1;r>=0;r-=1)t.elements[n].options[r].selected&&i.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].options[r].value))}break;case"BUTTON":switch(t.elements[n].type){case"reset":case"submit":case"button":i.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value))}}return i.join("&")},u.fn.serializeObject=function(t,n){let r,i=[];for(r in t)if(t.hasOwnProperty(r)){let m=n?n+"["+r+"]":r,v=t[r];i.push(v!==null&&typeof v=="object"?u.fn.serializeObject(v,m):encodeURIComponent(m)+"="+encodeURIComponent(v))}return i.join("&")},u.fn.inViewPort=function(t,n){let r,i,m=this.get(0);if(m==null)return!1;t=t===void 0?0:t,n=n===void 0?window:typeof n=="string"?document.querySelector(n):n;let v=m.getBoundingClientRect(),x=v.top,y=v.bottom,j=v.left,D=v.right,q=!1;if(n==null&&(n=window),n===window)r=window.innerWidth||0,i=window.innerHeight||0;else{r=n.clientWidth,i=n.clientHeight;let P=n.getBoundingClientRect();x-=P.top,y-=P.top,j-=P.left,D-=P.left}return t=~~Math.round(parseFloat(t)),D<=0||j>=r||(q=t>0?x>=t&&y<i-t:(y>0&&x<=i-t)|(x<=0&&y>t)),q},u.fn.ajax=function(t){if((t=this.extend({url:"",method:"GET",cors:"cors",data:{},success:null,fail:null,accept:"text/html",contentType:"application/x-www-form-urlencoded; charset=UTF-8"},t)).cors==="cors"){let n=new XMLHttpRequest;return n.onreadystatechange=function(){t.success!=null&&this.readyState===4&&this.status>=200&&this.status<400&&t.success(this.responseText),t.fail!=null&&this.readyState===4&&this.status>=400&&t.fail(this)},n.open(t.method.toUpperCase(),t.url,!0),n.setRequestHeader("Content-type",t.contentType),n.setRequestHeader("Accept",t.accept),n.send(this.serializeObject(t.data)),n}{let n="ajax_cb_"+"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(i){let m=16*Math.random()|0;return(i==="x"?m:3&m|8).toString(16)})).replaceAll("-","");u.fn[n]=function(){t.success.apply(this,arguments),delete u.fn[t.data.fn]},t.data.callback="DoMini.fn."+n,t.data.fn=n;let r=document.createElement("script");r.type="text/javascript",r.src=t.url+"?"+this.serializeObject(t.data),r.onload=function(){this.remove()},document.body.appendChild(r)}};const J=g;return L.default})()))}),9645:(function(o){"use strict";/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var M=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;function u(J){if(J==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(J)}function g(){try{if(!Object.assign)return!1;var J=new String("abc");if(J[5]="de",Object.getOwnPropertyNames(J)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(m){return t[m]});if(r.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(m){i[m]=m}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}o.exports=g()?Object.assign:function(J,t){for(var n,r=u(J),i,m=1;m<arguments.length;m++){n=Object(arguments[m]);for(var v in n)L.call(n,v)&&(r[v]=n[v]);if(M){i=M(n);for(var x=0;x<i.length;x++)f.call(n,i[x])&&(r[i[x]]=n[i[x]])}}return r}})},vt={};function ee(o){var M=vt[o];if(M!==void 0)return M.exports;var L=vt[o]={exports:{}};return an[o](L,L.exports,ee),L.exports}(function(){ee.n=function(o){var M=o&&o.__esModule?function(){return o.default}:function(){return o};return ee.d(M,{a:M}),M}})(),(function(){ee.d=function(o,M){for(var L in M)ee.o(M,L)&&!ee.o(o,L)&&Object.defineProperty(o,L,{enumerable:!0,get:M[L]})}})(),(function(){ee.o=function(o,M){return Object.prototype.hasOwnProperty.call(o,M)}})();var Fs={};(function(){"use strict";var o=ee(3593),M=window.ReactDOM,L=ee.n(M),f=ee(1609),u=ee.n(f),g=window.wp.i18n,J=window.wp.apiFetch,t=ee.n(J);function n(e){var s,a,c="";if(typeof e=="string"||typeof e=="number")c+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(s=0;s<l;s++)e[s]&&(a=n(e[s]))&&(c&&(c+=" "),c+=a)}else for(a in e)e[a]&&(c&&(c+=" "),c+=a);return c}function r(){for(var e,s,a=0,c="",l=arguments.length;a<l;a++)(e=arguments[a])&&(s=n(e))&&(c&&(c+=" "),c+=s);return c}var i=r;const m=({children:e,onOverlayClick:s,isOpen:a=!1,...c})=>(0,o.jsx)("div",{className:i("wdo:modal",a&&"open"),onClick:s,children:(0,o.jsx)("div",{className:"wdo:modal-content",onClick:l=>l.stopPropagation(),...c,children:e})});var v=u().memo(m);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const x=(...e)=>e.filter((s,a,c)=>!!s&&s.trim()!==""&&c.indexOf(s)===a).join(" ").trim();/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const y=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const j=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,a,c)=>c?c.toUpperCase():a.toLowerCase());/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const D=e=>{const s=j(e);return s.charAt(0).toUpperCase()+s.slice(1)};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var q={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const P=e=>{for(const s in e)if(s.startsWith("aria-")||s==="role"||s==="title")return!0;return!1};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Z=(0,f.createContext)({});function te({children:e,size:s,color:a,strokeWidth:c,absoluteStrokeWidth:l,className:h}){const d=useMemo(()=>({size:s,color:a,strokeWidth:c,absoluteStrokeWidth:l,className:h}),[s,a,c,l,h]);return createElement(Z.Provider,{value:d},e)}const V=()=>(0,f.useContext)(Z);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Oe=(0,f.forwardRef)(({color:e,size:s,strokeWidth:a,absoluteStrokeWidth:c,className:l="",children:h,iconNode:d,...p},w)=>{const{size:N=24,strokeWidth:O=2,absoluteStrokeWidth:E=!1,color:A="currentColor",className:C=""}=V()??{},T=c??E?Number(a??O)*24/Number(s??N):a??O;return(0,f.createElement)("svg",{ref:w,...q,width:s??N??q.width,height:s??N??q.height,stroke:e??A,strokeWidth:T,className:x("lucide",C,l),...!h&&!P(p)&&{"aria-hidden":"true"},...p},[...d.map(([_,k])=>(0,f.createElement)(_,k)),...Array.isArray(h)?h:[h]])});/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const X=(e,s)=>{const a=(0,f.forwardRef)(({className:c,...l},h)=>(0,f.createElement)(Oe,{ref:h,iconNode:s,className:x(`lucide-${y(D(e))}`,`lucide-${e}`,c),...l}));return a.displayName=D(e),a};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cn=X("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),re=({className:e="",children:s,isLoading:a,...c})=>(0,o.jsx)("button",{className:`wdo:button ${e}`,...c,...a?{disabled:!0}:{},children:a?(0,o.jsx)(cn,{className:"wdo:animate-spin wdo:w-4 wdo:h-4"}):s}),Xe=({className:e="",children:s,...a})=>(0,o.jsx)(re,{className:`wdo:button-primary ${e}`,...a,children:s}),Vs=({className:e="",children:s,...a})=>jsx(re,{className:`wdo:button-danger ${e}`,...a,children:s}),Ws=({className:e="",children:s,...a})=>jsx(re,{className:`wdo:button-ghost ${e}`,...a,children:s});/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ln=X("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var dn=({className:e,children:s})=>(0,o.jsxs)("div",{className:`wdo:flex wdo:gap-3 wdo:items-center wdo:p-3 wdo:rounded-sm wdo:border wdo:border-amber-500/30 wdo:bg-amber-500/10 wdo:text-amber-700 wdo:dark:text-amber-400 wdo:text-sm ${e??""}`,children:[(0,o.jsx)(ln,{className:"wdo:w-5 wdo:h-5 wdo:shrink-0"}),(0,o.jsx)("div",{children:s})]}),un=({forceOpen:e,onClose:s})=>{const[a,c]=(0,f.useState)(!1),[l,h]=(0,f.useState)(""),[d,p]=(0,f.useState)(!1),[w,N]=(0,f.useState)("");(0,f.useEffect)(()=>{Number(ASP_BACKEND.asset_rev)>0&&c(!0),t()({path:"/ajax-search-pro/updates-help/check"}).then(C=>{C.message==="ok"&&c(!0)}).catch(()=>{})},[]),(0,f.useEffect)(()=>{e&&c(!0)},[e]);const O=()=>{c(!1),h(""),N(""),s?.()},E=()=>{p(!0),N(""),t()({path:"/ajax-search-pro/updates-help/activate",method:"POST",data:{key:l}}).then(()=>{O()}).catch(C=>{N(C?.message||(0,g.__)("Activation failed. Please try again.","ajax-search-pro"))}).finally(()=>{p(!1)})},A=()=>{O(),s||(window.history.length>1?window.history.back():window.location.href=ASP_BACKEND.admin_url)};return(0,o.jsx)(v,{isOpen:a,children:(0,o.jsxs)("div",{className:"wdo:p-8 wdo:min-w-[480px] wdo:max-w-lg",children:[(0,o.jsx)("h2",{className:"wdo:text-lg wdo:font-semibold wdo:text-gray-900 wdo:dark:text-white wdo:mb-3",children:(0,g.__)("Activate your license","ajax-search-pro")}),(0,o.jsx)("p",{className:"wdo:text-sm wdo:text-gray-600 wdo:dark:text-gray-400 wdo:mb-2",children:(0,g.__)("A valid license is required to use Ajax Search Pro. Enter your purchase code to activate it on this site.","ajax-search-pro")}),(0,o.jsx)("p",{className:"wdo:text-sm wdo:mb-5",children:(0,o.jsx)("a",{href:"https://documentation.ajaxsearchpro.com/plugin-updates/automatic-updates/purchase-code",target:"_blank",rel:"noreferrer",className:"wdo:text-blue-600 wdo:dark:text-blue-400 wdo:underline",children:(0,g.__)("Where do I find my license key?","ajax-search-pro")})}),w&&(0,o.jsx)(dn,{className:"wdo:mb-4",children:w}),(0,o.jsx)("label",{className:"wdo:block wdo:text-sm wdo:font-medium wdo:text-gray-700 wdo:dark:text-gray-200 wdo:mb-1",children:(0,g.__)("License key","ajax-search-pro")}),(0,o.jsx)("input",{type:"text",value:l,onChange:C=>{h(C.target.value),N("")},className:"wdo:block wdo:w-full wdo:mb-4 wdo:px-3 wdo:py-2 wdo:rounded wdo:border wdo:border-gray-300 wdo:dark:border-gray-600 wdo:dark:bg-gray-700 wdo:dark:text-white wdo:text-sm",placeholder:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}),(0,o.jsxs)("div",{className:"wdo:flex wdo:gap-3",children:[(0,o.jsx)(Xe,{isLoading:d,disabled:d||l.trim().length!==36,onClick:E,children:(0,g.__)("Activate","ajax-search-pro")}),e&&(0,o.jsx)(re,{disabled:d,onClick:A,children:(0,g.__)("Go back","ajax-search-pro")})]})]})})};const _t=["Yay","Top of the morning to you","You did it","All good chief","Looking good","Good job"],bt=["Something went south :(","Ooof, please try again","Ouch, that didn't work...","Ooops, that didn't work..."];let ge=[],Ie=[];const jt=()=>Ie.forEach(e=>e(ge)),Ze=e=>{ge=ge.filter(s=>s.id!==e),jt()},Le=(e,s="")=>{const a=Math.random().toString(36).substring(2,9);s===""&&(e==="success"?s=_t[Math.floor(Math.random()*_t.length)]:s=bt[Math.floor(Math.random()*bt.length)]),ge=[...ge,{id:a,type:e,text:s}],jt(),setTimeout(()=>Ze(a),e==="success"?3e3:15e3)},fn=(e="")=>Le("success",e),hn=(e="")=>{typeof e=="string"?Le("error",e):Le("error",e.message)},kt=()=>{const[e,s]=(0,f.useState)(ge);return(0,f.useEffect)(()=>(Ie.push(s),s(ge),()=>{Ie=Ie.filter(a=>a!==s)}),[]),{messages:e,addSuccess:fn,addError:hn,addMessage:Le,dismissMessage:Ze}};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pn=X("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mn=X("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Et=X("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),wn={success:(0,o.jsx)(pn,{className:"wdo:w-5 wdo:h-5 wdo:shrink-0"}),error:(0,o.jsx)(mn,{className:"wdo:w-5 wdo:h-5 wdo:shrink-0"})};var gn=({messages:e})=>(0,o.jsx)("div",{className:"wdo:fixed wdo:top-16 wdo:left-1/2 wdo:-translate-x-1/2 wdo:w-full wdo:max-w-md wdo:z-50 wdo:flex wdo:flex-col wdo:gap-2 wdo:px-4",children:e.map(s=>(0,o.jsxs)("div",{className:i("wdo:toast",s.type==="success"?"wdo:toast-success":"wdo:toast-error"),children:[(0,o.jsx)("span",{className:i("wdo:shrink-0",s.type==="success"?"wdo:text-green-600 wdo:dark:text-green-400":"wdo:text-red-600 wdo:dark:text-red-400"),children:wn[s.type]}),(0,o.jsx)("span",{className:"wdo:grow wdo:text-sm",children:s.text}),(0,o.jsx)("button",{className:"wdo:shrink-0 wdo:p-0.5 wdo:rounded wdo:border-0 wdo:cursor-pointer wdo:bg-transparent wdo:text-wp-admin-500 wdo:hover:text-wp-admin-800 wdo:dark:text-wp-admin-400 wdo:dark:hover:text-wp-admin-100 wdo:transition-colors",onClick:()=>Ze(s.id),"aria-label":"Dismiss",children:(0,o.jsx)(Et,{className:"wdo:w-4 wdo:h-4"})})]},s.id))});/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xn=X("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vn=X("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yn=X("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),St=(0,f.createContext)(void 0),Ct=e=>e==="light"||e==="dark"||e==="system",Nt=e=>e==="dark"?!0:e==="light"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,_n=({children:e})=>{const[s,a]=(0,f.useState)(()=>{const d=localStorage.getItem("wdo_darkmode");return Ct(d)?d:"system"}),[c,l]=(0,f.useState)(()=>Nt(s)),h=d=>{a(d),localStorage.setItem("wdo_darkmode",d)};return(0,f.useEffect)(()=>{l(Nt(s))},[s]),(0,f.useEffect)(()=>{if(s!=="system")return;const d=window.matchMedia("(prefers-color-scheme: dark)"),p=w=>l(w.matches);return d.addEventListener("change",p),()=>d.removeEventListener("change",p)},[s]),(0,f.useEffect)(()=>{document.body.classList.toggle("wdo:dark",c)},[c]),(0,f.useEffect)(()=>{const d=p=>{p.key==="wdo_darkmode"&&Ct(p.newValue)&&a(p.newValue)};return window.addEventListener("storage",d),()=>window.removeEventListener("storage",d)},[]),(0,o.jsx)(St.Provider,{value:{isDark:c,mode:s,setMode:h},children:e})},bn=()=>{const e=(0,f.useContext)(St);if(e===void 0)throw new Error("useIsDark must be used within a DarkModeProvider");return e},jn=[{mode:"light",icon:(0,o.jsx)(xn,{}),title:"Light"},{mode:"system",icon:(0,o.jsx)(vn,{}),title:"System"},{mode:"dark",icon:(0,o.jsx)(yn,{}),title:"Dark"}],kn=()=>{const{isDark:e,mode:s,setMode:a}=bn();return(0,o.jsx)("div",{className:i("wdo:inline-flex wdo:rounded-lg wdo:p-0.5 wdo:gap-0.5",e?"wdo:bg-wp-admin-700":"wdo:bg-wp-admin-200"),children:jn.map(({mode:c,icon:l,title:h})=>{const d=s===c;return(0,o.jsx)("button",{title:h,onClick:()=>a(c),className:i("wdo:rounded wdo:p-1.5 wdo:border-0 wdo:cursor-pointer","wdo:transition-colors wdo:flex wdo:items-center wdo:justify-center",d?e?"wdo:bg-wp-admin-500 wdo:text-white":"wdo:bg-white wdo:text-wp-admin-700 wdo:shadow-sm":e?"wdo:bg-transparent wdo:text-wp-admin-300":"wdo:bg-transparent wdo:text-wp-admin-500"),children:(0,o.jsx)("span",{className:"wdo:w-[18px] wdo:h-[18px] wdo:flex wdo:items-center wdo:justify-center",children:l})},c)})})};var En=()=>{const e=typeof window<"u"&&Array.isArray(window.wpdrmsSharedConflicts)?window.wpdrmsSharedConflicts:[];return e.length===0?null:(0,o.jsx)("div",{className:"wdo:flex wdo:flex-col wdo:gap-2 wdo:mb-4",children:e.map((s,a)=>(0,o.jsx)("div",{role:"alert",className:"wdo:p-3 wdo:rounded wdo:text-sm wdo:bg-red-50 wdo:text-red-800 wdo:dark:bg-red-900/20 wdo:dark:text-red-200",children:s.message},a))})},Sn=({subtitle:e="",logo:s,className:a=""})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(En,{}),(0,o.jsxs)("div",{className:"wdo:top-bar",children:[(0,o.jsxs)("div",{className:i("wdo:flex wdo:items-baseline wdo:gap-3",a),children:[s,e?(0,o.jsx)("h2",{children:e}):""]}),(0,o.jsx)(kn,{})]})]}),Cn=()=>(0,o.jsx)("svg",{height:"20",width:"20",viewBox:"0 0 20 20",style:{float:"right"},"aria-hidden":"true",focusable:"false",children:(0,o.jsx)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})}),Nn=()=>(0,o.jsx)("svg",{height:"20",width:"20",viewBox:"0 0 20 20",style:{float:"right",transform:"rotate(180deg)"},"aria-hidden":"true",focusable:"false",children:(0,o.jsx)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})});const Pe=(0,f.createContext)(null),On=({children:e})=>{const[s,a]=(0,f.useState)(null),[c,l]=(0,f.useState)(()=>window.location.hash.slice(1)||null),[h,d]=(0,f.useState)([]),p=(0,f.useRef)([]),[w,N]=(0,f.useState)(()=>({})),O=k=>{const I=p.current.reduce((b,K)=>(b[K]=!0,b),{});N(b=>({...b,...I,[k]:!0}))},E=k=>{N(I=>({...I,[k]:!1}))},A=k=>{N(I=>({...I,[k]:!(I[k]??!1)}))},C=k=>{d(I=>[...I,c]),l(k),k?window.history.pushState(null,"",`#${k}`):window.history.replaceState(null,"",window.location.pathname+window.location.search)},T=()=>{if(h.length===0)return;const k=h[h.length-1];d(I=>I.slice(0,-1)),l(k),k?window.history.pushState(null,"",`#${k}`):window.history.replaceState(null,"",window.location.pathname+window.location.search)},_=h.length>0;return(0,f.useEffect)(()=>{const k=()=>{l(window.location.hash.slice(1)||null),c&&O(c)};return c&&O(c),window.addEventListener("hashchange",k),()=>window.removeEventListener("hashchange",k)},[]),(0,o.jsx)(Pe.Provider,{value:{activeId:c,setActiveId:l,isOpen:w,toggleOpen:A,open:O,close:E,openedParents:p,confirmBeforeSwap:s,setConfirmBeforeSwap:a,navigate:C,goBack:T,canGoBack:_},children:e})},An=({children:e,...s})=>(0,o.jsx)("ul",{style:{listStyleType:"none",padding:0,userSelect:"none"},...s,children:f.Children.map(e,a=>(0,f.cloneElement)(a,{level:0}))}),Ot=({label:e,id:s,children:a,iconBefore:c,iconAfter:l,disabled:h,defaultActive:d=!1,level:p=0,parents:w=[],...N})=>{const O=(0,f.useContext)(Pe);if(!O)throw new Error("MenuItem must be used within a MenuProvider");const{activeId:E,isOpen:A,toggleOpen:C,openedParents:T,confirmBeforeSwap:_,setConfirmBeforeSwap:k,navigate:I}=O,b=E!==null?E===s:d,K=f.Children.count(a)>0,ne=K?A[s]:!1;b&&(K&&(T.current=[...new Set(T.current.concat([s]))]),w.length&&(T.current=[...new Set(T.current.concat(w))]));const B=["","wdo:pl-4","wdo:pl-6","wdo:pl-8","wdo:pl-10"];return(0,o.jsxs)("li",{...N,children:[(0,o.jsxs)("a",{href:s?`#${s}`:void 0,onClick:S=>{S.preventDefault(),K&&!ne&&C(s),!h&&(_===null||confirm(_))&&(k(null),K||I(s))},className:`
					${B[p]??""} 
					${b?"wdo:menu-item-active":""}
				    wdo:menu-item
				 `,children:[c&&(0,o.jsx)("span",{children:c}),(0,o.jsx)("span",{children:e}),l&&(0,o.jsx)("span",{children:l}),K&&(0,o.jsx)("span",{className:"wdo:dark:fill-gray-300",onClick:S=>{S.stopPropagation(),S.preventDefault(),C(s)},children:ne?(0,o.jsx)(Nn,{}):(0,o.jsx)(Cn,{})})]}),K&&(0,o.jsx)("ul",{style:{listStyleType:"none",padding:0,display:ne?"block":"none"},children:f.Children.map(a,S=>(0,f.cloneElement)(S,{level:p+1,parents:w.concat([s]),...N}))})]})};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rn=X("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Mn=X("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);var so=ee(8623);const oo=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),At=e=>{let s=!1;return typeof window.$<"u"&&(typeof e>"u"||typeof window.$.fn[e]<"u")&&(s=window.$),s===!1&&typeof window.jQuery<"u"&&(s=window.jQuery,(typeof e>"u"||typeof window.jQuery.fn[e]<"u")&&(s=window.jQuery)),s},ro=function(e,s){let a=e.find("input,textarea,select,button").get();if(arguments.length===1){const c={};return a.forEach(function(l){l.name&&!l.disabled&&(l.checked||/select|textarea/i.test(l.nodeName)||/text/i.test(l.type)||$(l).hasClass("hasDatepicker")||$(l).hasClass("asp_slider_hidden"))&&(c[l.name]===void 0&&(c[l.name]=[]),$(l).hasClass("hasDatepicker")?c[l.name].push($(l).parent().find(".asp_datepicker_hidden").val()):c[l.name].push($(l).val()))}),JSON.stringify(c)}else if(s!==void 0){const c=typeof s!="object"?JSON.parse(s):s;return a.forEach(function(l){if(l.name)if(c[l.name]){let h=c[l.name],d=$(l);if(Object.prototype.toString.call(h)!=="[object Array]"&&(h=[h]),l.type==="checkbox"||l.type==="radio"){let p=d.val(),w=!1;for(let N=0;N<h.length;N++)if(h[N]===p){w=!0;break}d.prop("checked",w)}else d.val(h[0]),$(l).hasClass("asp_gochosen")||$(l).hasClass("asp_goselect2")?intervalUntilExecute(function(p){p(l).trigger("change.asp_select2")},function(){return At("asp_select2")},50,3):$(l).hasClass("hasDatepicker")&&intervalUntilExecute(function(p){const w=d.get(0);if(w===void 0)return;let N=h[0],O=p(w).datepicker("option","dateFormat");p(w).datepicker("option","dateFormat","yy-mm-dd"),p(w).datepicker("setDate",N),p(w).datepicker("option","dateFormat",O),p(w).trigger("selectnochange")},function(){return At("datepicker")},50,3)}else(l.type==="checkbox"||l.type==="radio")&&$(l).prop("checked",!1)}),e}},ao=function(e,s,a,c="self"){let l;l=$('<form style="display: none;" />'),l.attr("action",e),l.attr("method",s),$("body").append(l),typeof a<"u"&&a!==null&&Object.keys(a).forEach(function(h){let d=a[h],p=$('<input type="hidden" />');p.attr("name",h),p.attr("value",d),l.append(p)}),c=="new"&&l.attr("target","_blank"),l.get(0).submit()},Tn=function(e){Object.assign(document.createElement("a"),{target:"_blank",href:e}).click()},io=function(e,s=0){for(const a of e)if(Dn(a))return window.scrollTo({top:a.getBoundingClientRect().top-120+window.pageYOffset+s,behavior:"smooth"}),!0;return!1},Dn=function(e){if(typeof e.checkVisibility>"u")return!0;let s=e,a=!0;for(;s!==null;){if(!s.checkVisibility({opacityProperty:!0,visibilityProperty:!0,contentVisibilityAuto:!0})){a=!1;break}s=s.parentElement}return a};var In=()=>(0,o.jsx)("svg",{width:"200",height:"100%",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 176.64 26.62",children:(0,o.jsxs)("g",{children:[(0,o.jsx)("path",{className:"wdo:fill-black wdo:dark:fill-white",d:"m13.59 20.4-1.32-2.93H5.78L4.46 20.4H.6L8.75 3.6h.55l8.15 16.8h-3.86Zm-6.5-5.81h3.84l-1.92-4.25-1.92 4.25Z"}),(0,o.jsx)("path",{className:"wdo:fill-black wdo:dark:fill-white",d:"M22.03 7.92V21.6c0 1.23-.34 2.16-1.01 2.78-.67.62-1.6.94-2.78.94-.66 0-1.53-.19-2.64-.58v-3.43c.19.05.41.11.66.18.25.07.44.13.58.17.14.04.29.08.46.11.17.03.32.05.47.05.56 0 .84-.45.84-1.34V7.92h3.43Zm0-4.32v3.05H18.6V3.6h3.43ZM29.63 7.78c.89 0 1.65.19 2.27.56.62.38.93.72.95 1.04V7.92h3.43V20.4h-3.43v-1.66c-.02.32-.34.7-.96 1.15-.62.45-1.38.67-2.25.67-.67 0-1.34-.13-2.01-.4s-1.29-.65-1.87-1.15c-.58-.5-1.04-1.18-1.4-2.03-.36-.85-.54-1.8-.54-2.86 0-1.97.6-3.52 1.81-4.66 1.21-1.14 2.54-1.7 4.02-1.7Zm2.56 3.76c-.53-.55-1.19-.83-1.99-.83s-1.49.31-2.09.94c-.59.62-.89 1.46-.89 2.5s.3 1.92.89 2.54c.59.62 1.29.94 2.09.94s1.46-.28 1.99-.85.79-1.44.79-2.63-.26-2.05-.79-2.6ZM46.7 20.4l-2.85-4.06L41 20.4h-3.86l4.79-6.41-4.31-6.07h3.76l2.47 3.72 2.47-3.72h3.76l-4.31 6.07 4.79 6.41H46.7ZM61.63 3.43c1.34 0 2.49.32 3.45.96.96.64 1.68 1.42 2.16 2.33l-3.09 1.06c-.42-.86-1.21-1.3-2.37-1.3-.58 0-1.06.13-1.45.38-.39.26-.59.58-.59.98s.14.78.42 1.09.81.6 1.59.85l.65.22c1.87.64 3.22 1.42 4.04 2.35.82.93 1.23 2.01 1.23 3.24 0 1.09-.34 2.02-1.01 2.81-.67.78-1.45 1.34-2.35 1.67-.9.33-1.81.49-2.76.49-1.53 0-2.85-.35-3.94-1.06-1.09-.7-1.87-1.66-2.31-2.88l2.9-1.3c.24.62.66 1.14 1.27 1.56s1.3.62 2.09.62c.67 0 1.27-.16 1.79-.48.52-.32.78-.8.78-1.44s-.19-1.08-.56-1.4c-.38-.33-1.08-.68-2.12-1.04l-.62-.24c-1.47-.51-2.61-1.16-3.4-1.96-.8-.79-1.2-1.83-1.2-3.11s.54-2.34 1.61-3.17c1.07-.83 2.34-1.25 3.81-1.25ZM74.84 7.78c.69 0 1.39.14 2.1.41s1.38.66 2.01 1.16c.63.5 1.14 1.18 1.53 2.03.39.85.59 1.79.59 2.83 0 .46-.03.88-.1 1.25h-8.92c.19.66.56 1.18 1.11 1.57.55.39 1.14.59 1.76.59.97 0 1.7-.26 2.18-.77l2.83 1.44c-1.33 1.52-3 2.28-5.03 2.28-.67 0-1.37-.13-2.09-.4s-1.41-.64-2.06-1.14c-.66-.5-1.19-1.16-1.61-2s-.62-1.78-.62-2.82.2-1.98.6-2.83.91-1.52 1.55-2.03c.63-.5 1.31-.89 2.03-1.16s1.43-.41 2.13-.41Zm0 2.98c-.62 0-1.19.18-1.69.55-.5.37-.85.89-1.04 1.56h5.49c-.18-.67-.53-1.19-1.06-1.56-.53-.37-1.09-.55-1.7-.55ZM88.1 7.78c.89 0 1.65.19 2.27.56.62.38.93.72.95 1.04V7.92h3.43V20.4h-3.43v-1.66c-.02.32-.34.7-.96 1.15-.62.45-1.38.67-2.25.67-.67 0-1.34-.13-2.01-.4s-1.29-.65-1.87-1.15c-.58-.5-1.04-1.18-1.4-2.03-.36-.85-.54-1.8-.54-2.86 0-1.97.6-3.52 1.81-4.66 1.21-1.14 2.54-1.7 4.02-1.7Zm2.56 3.76c-.53-.55-1.19-.83-1.99-.83s-1.49.31-2.09.94c-.59.62-.89 1.46-.89 2.5s.3 1.92.89 2.54c.59.62 1.29.94 2.09.94s1.46-.28 1.99-.85.79-1.44.79-2.63-.26-2.05-.79-2.6ZM103.94 7.8c.53 0 .92.03 1.17.1v3.19c-.27-.05-.67-.07-1.2-.07-1.07 0-1.98.37-2.72 1.1s-1.17 1.7-1.28 2.88v5.4h-3.4V7.92h3.4v4.01c.14-1.25.54-2.25 1.2-3 .66-.75 1.6-1.13 2.83-1.13ZM112.14 7.78c.96 0 1.92.24 2.88.71s1.74 1.18 2.35 2.12l-3.04 1.1c-.48-.67-1.21-1.01-2.18-1.01-.78 0-1.46.32-2.04.95-.58.63-.86 1.48-.86 2.56s.29 1.85.86 2.47c.58.62 1.25.94 2.04.94.99 0 1.72-.33 2.18-.98l3.07 1.1c-.62.94-1.41 1.65-2.37 2.12-.96.47-1.92.71-2.88.71-.67 0-1.36-.13-2.07-.4-.71-.26-1.39-.64-2.04-1.14-.65-.5-1.18-1.16-1.59-2s-.62-1.78-.62-2.82.21-2.01.62-2.87c.42-.86.95-1.53 1.59-2.03s1.33-.88 2.04-1.14c.71-.26 1.4-.4 2.07-.4ZM126.16 7.8c1.29 0 2.4.45 3.31 1.34.91.9 1.37 2.26 1.37 4.08v7.18h-3.43v-6.96c0-1.81-.67-2.71-2.01-2.71-.64 0-1.22.2-1.75.61s-.9.8-1.13 1.19c-.22.38-.36.69-.41.91v6.96h-3.43V3.6h3.43v6.67c.06-.48.47-1.01 1.22-1.6.75-.58 1.69-.88 2.83-.88ZM142.75 3.6c1.93 0 3.45.5 4.55 1.5 1.1 1 1.65 2.28 1.65 3.83s-.56 2.83-1.67 3.84c-1.11 1.01-2.62 1.51-4.54 1.51h-2.33v6.12h-3.52V3.6h5.85Zm-.1 7.54c.86 0 1.54-.19 2.04-.56.5-.38.74-.92.74-1.64s-.25-1.27-.74-1.64c-.5-.38-1.17-.56-2.04-.56h-2.23v4.42h2.23ZM158.05 7.8c.53 0 .92.03 1.17.1v3.19c-.27-.05-.67-.07-1.2-.07-1.07 0-1.98.37-2.72 1.1s-1.17 1.7-1.28 2.88v5.4h-3.4V7.92h3.4v4.01c.14-1.25.54-2.25 1.2-3 .66-.75 1.6-1.13 2.83-1.13ZM163.71 8.18c.73-.27 1.43-.41 2.1-.41s1.37.14 2.09.41 1.4.66 2.05 1.16c.65.5 1.18 1.18 1.59 2.03.42.85.62 1.79.62 2.83s-.21 1.98-.62 2.82c-.42.84-.95 1.51-1.59 2-.65.5-1.33.88-2.05 1.14s-1.41.4-2.09.4-1.37-.13-2.09-.4-1.41-.64-2.06-1.14c-.66-.5-1.19-1.16-1.61-2s-.62-1.78-.62-2.82.21-1.98.62-2.83.95-1.52 1.59-2.03c.65-.5 1.33-.89 2.06-1.16Zm2.1 2.52c-.78 0-1.47.31-2.06.94-.59.62-.89 1.48-.89 2.57s.3 1.89.89 2.5c.59.61 1.28.91 2.06.91s1.45-.3 2.04-.91.89-1.44.89-2.5-.3-1.94-.89-2.57c-.59-.62-1.27-.94-2.04-.94Z"}),(0,o.jsx)("path",{className:"wdo:fill-black wdo:dark:fill-white",d:"m174.49 24.75-6.88-7.26 1.29-1.39 7.74 6.34-2.15 2.31z"})]})});const Fe=({label:e,className:s,description:a,labelClass:c="wdo:basis-3/5",optionClass:l="",children:h,disabled:d=!1,optionDescription:p,footer:w})=>(0,o.jsxs)("div",{className:i("wdo:option",d&&"wdo:pointer-events-none wdo:select-none wdo:opacity-50",s),...d?{"aria-disabled":"true",tabIndex:-1}:{},children:[(0,o.jsxs)("div",{className:i("wdo:option-label-container wdo:lg:grow-0 wdo:grow",c),children:[(0,o.jsx)("p",{className:"wdo:option-label",children:e}),a&&(0,o.jsx)("p",{className:"wdo:option-description",children:a})]}),(0,o.jsx)("div",{className:l||void 0,children:(0,o.jsxs)("div",{className:"wdo:option-container",children:[(0,o.jsx)("div",{children:h}),p&&(0,o.jsx)("div",{className:"wdo:option-description",children:p})]})}),w&&(0,o.jsx)("div",{className:"wdo:basis-full",children:w})]}),Rt=({value:e,onChange:s,tabIndex:a=0})=>{const[c,l]=(0,f.useState)(e??!1);(0,f.useEffect)(()=>{e!==void 0&&l(e)},[e]);const h=()=>{const p=!c;l(p),s?.(p)},d=c?"on":"off";return(0,o.jsx)("div",{onClick:h,onKeyDown:p=>(p.key==="Enter"||p.key===" ")&&h(),"data-state":d,className:"wdo:on-off wdo:group",role:"switch","aria-checked":c,tabIndex:a,children:(0,o.jsx)("div",{className:"wdo:group-data-[state=on]:translate-x-[23px] wdo:group-data-[state=off]:translate-x-[3px]"})})},Ve=({className:e,...s})=>(0,o.jsx)("input",{type:"text",className:"wdo:input "+e,...s});var Ln=window.wp.url;let _e={};function lo(e,s=!1,a=!0){const c=JSON.stringify(e);if(!s&&_e[c])return _e[c];a&&(e.path=addQueryArgs(e.path,{timestamp:Date.now()}));const l=apiFetch(e).then(h=>h).catch(h=>{throw delete _e[c],h});return _e[c]=l,l}function Mt(e){if(e===void 0){_e={};return}delete _e[e]}var Pn=window.lodash,Fn=ee.n(Pn),Tt=ee(8279);const Dt=0,It=1,Lt=2,Pt=3;var Ft=Object.prototype.hasOwnProperty;function Qe(e,s){var a,c;if(e===s)return!0;if(e&&s&&(a=e.constructor)===s.constructor){if(a===Date)return e.getTime()===s.getTime();if(a===RegExp)return e.toString()===s.toString();if(a===Array){if((c=e.length)===s.length)for(;c--&&Qe(e[c],s[c]););return c===-1}if(!a||typeof e=="object"){c=0;for(a in e)if(Ft.call(e,a)&&++c&&!Ft.call(s,a)||!(a in s)||!Qe(e[a],s[a]))return!1;return Object.keys(s).length===c}}return e!==e&&s!==s}const fe=new WeakMap,he=()=>{},Y=he(),We=Object,R=e=>e===Y,ae=e=>typeof e=="function",pe=(e,s)=>({...e,...s}),Vt=e=>ae(e.then),Ke={},$e={},Ye="undefined",Ae=typeof window!=Ye,Je=typeof document!=Ye,Vn=Ae&&"Deno"in window,Wn=()=>Ae&&typeof window.requestAnimationFrame!=Ye,Wt=(e,s)=>{const a=fe.get(e);return[()=>!R(s)&&e.get(s)||Ke,c=>{if(!R(s)){const l=e.get(s);s in $e||($e[s]=l),a[5](s,pe(l,c),l||Ke)}},a[6],()=>!R(s)&&s in $e?$e[s]:!R(s)&&e.get(s)||Ke]};let et=!0;const $n=()=>et,[tt,nt]=Ae&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[he,he],Un=()=>{const e=Je&&document.visibilityState;return R(e)||e!=="hidden"},Bn=e=>(Je&&document.addEventListener("visibilitychange",e),tt("focus",e),()=>{Je&&document.removeEventListener("visibilitychange",e),nt("focus",e)}),qn=e=>{const s=()=>{et=!0,e()},a=()=>{et=!1};return tt("online",s),tt("offline",a),()=>{nt("online",s),nt("offline",a)}},Hn={isOnline:$n,isVisible:Un},zn={initFocus:Bn,initReconnect:qn},$t=!f.useId,be=!Ae||Vn,Gn=e=>Wn()?window.requestAnimationFrame(e):setTimeout(e,1),Ue=be?f.useEffect:f.useLayoutEffect,st=typeof navigator<"u"&&navigator.connection,Ut=!be&&st&&(["slow-2g","2g"].includes(st.effectiveType)||st.saveData),Be=new WeakMap,Xn=e=>We.prototype.toString.call(e),ot=(e,s)=>e===`[object ${s}]`;let Zn=0;const rt=e=>{const s=typeof e,a=Xn(e),c=ot(a,"Date"),l=ot(a,"RegExp"),h=ot(a,"Object");let d,p;if(We(e)===e&&!c&&!l){if(d=Be.get(e),d)return d;if(d=++Zn+"~",Be.set(e,d),Array.isArray(e)){for(d="@",p=0;p<e.length;p++)d+=rt(e[p])+",";Be.set(e,d)}if(h){d="#";const w=We.keys(e).sort();for(;!R(p=w.pop());)R(e[p])||(d+=p+":"+rt(e[p])+",");Be.set(e,d)}}else d=c?e.toJSON():s=="symbol"?e.toString():s=="string"?JSON.stringify(e):""+e;return d},at=e=>{if(ae(e))try{e=e()}catch{e=""}const s=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?rt(e):"",[e,s]};let Qn=0;const it=()=>++Qn;async function Bt(...e){const[s,a,c,l]=e,h=pe({populateCache:!0,throwOnError:!0},typeof l=="boolean"?{revalidate:l}:l||{});let d=h.populateCache;const p=h.rollbackOnError;let w=h.optimisticData;const N=A=>typeof p=="function"?p(A):p!==!1,O=h.throwOnError;if(ae(a)){const A=a,C=[],T=s.keys();for(const _ of T)!/^\$(inf|sub)\$/.test(_)&&A(s.get(_)._k)&&C.push(_);return Promise.all(C.map(E))}return E(a);async function E(A){const[C]=at(A);if(!C)return;const[T,_]=Wt(s,C),[k,I,b,K]=fe.get(s),ne=()=>{const ce=k[C];return(ae(h.revalidate)?h.revalidate(T().data,A):h.revalidate!==!1)&&(delete b[C],delete K[C],ce&&ce[0])?ce[0](Lt).then(()=>T().data):T().data};if(e.length<3)return ne();let B=c,S,W=!1;const ie=it();I[C]=[ie,0];const U=!R(w),je=T(),de=je.data,ke=je._c,xe=R(ke)?de:ke;if(U&&(w=ae(w)?w(xe,de):w,_({data:w,_c:xe})),ae(B))try{B=B(xe)}catch(ce){S=ce,W=!0}if(B&&Vt(B))if(B=await B.catch(ce=>{S=ce,W=!0}),ie!==I[C][0]){if(W)throw S;return B}else W&&U&&N(S)&&(d=!0,_({data:xe,_c:Y}));if(d&&!W)if(ae(d)){const ce=d(B,xe);_({data:ce,error:Y,_c:Y})}else _({data:B,error:Y,_c:Y});if(I[C][1]=it(),Promise.resolve(ne()).then(()=>{_({_c:Y})}),W){if(O)throw S;return}return B}}const qt=(e,s)=>{for(const a in e)e[a][0]&&e[a][0](s)},Ht=(e,s)=>{if(!fe.has(e)){const a=pe(zn,s),c=Object.create(null),l=Bt.bind(Y,e);let h=he;const d=Object.create(null),p=(O,E)=>{const A=d[O]||[];return d[O]=A,A.push(E),()=>A.splice(A.indexOf(E),1)},w=(O,E,A)=>{e.set(O,E);const C=d[O];if(C)for(const T of C)T(E,A)},N=()=>{if(!fe.has(e)&&(fe.set(e,[c,Object.create(null),Object.create(null),Object.create(null),l,w,p]),!be)){const O=a.initFocus(setTimeout.bind(Y,qt.bind(Y,c,Dt))),E=a.initReconnect(setTimeout.bind(Y,qt.bind(Y,c,It)));h=()=>{O&&O(),E&&E(),fe.delete(e)}}};return N(),[e,l,N,h]}return[e,fe.get(e)[4]]},Kn=(e,s,a,c,l)=>{const h=a.errorRetryCount,d=l.retryCount,p=~~((Math.random()+.5)*(1<<(d<8?d:8)))*a.errorRetryInterval;!R(h)&&d>h||setTimeout(c,p,l)},Yn=Qe,[ct,Jn]=Ht(new Map),zt=pe({onLoadingSlow:he,onSuccess:he,onError:he,onErrorRetry:Kn,onDiscarded:he,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Ut?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Ut?5e3:3e3,compare:Yn,isPaused:()=>!1,cache:ct,mutate:Jn,fallback:{}},Hn),Gt=(e,s)=>{const a=pe(e,s);if(s){const{use:c,fallback:l}=e,{use:h,fallback:d}=s;c&&h&&(a.use=c.concat(h)),l&&d&&(a.fallback=pe(l,d))}return a},lt=(0,f.createContext)({}),es=e=>{const{value:s}=e,a=(0,f.useContext)(lt),c=ae(s),l=(0,f.useMemo)(()=>c?s(a):s,[c,a,s]),h=(0,f.useMemo)(()=>c?l:Gt(a,l),[c,a,l]),d=l&&l.provider,p=(0,f.useRef)(Y);d&&!p.current&&(p.current=Ht(d(h.cache||ct),l));const w=p.current;return w&&(h.cache=w[0],h.mutate=w[1]),Ue(()=>{if(w)return w[2]&&w[2](),w[3]},[]),(0,f.createElement)(lt.Provider,pe(e,{value:h}))},ts="$inf$",Xt=Ae&&window.__SWR_DEVTOOLS_USE__,ns=Xt?window.__SWR_DEVTOOLS_USE__:[],ss=()=>{Xt&&(window.__SWR_DEVTOOLS_REACT__=f)},Zt=e=>ae(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],os=()=>{const e=(0,f.useContext)(lt);return(0,f.useMemo)(()=>pe(zt,e),[e])},uo=(e,s)=>{if(IS_SERVER)return;const[a,c]=serialize(e),[,,,l]=SWRGlobalState.get(cache);if(l[a])return l[a];const h=s(c);return l[a]=h,h},rs=e=>(s,a,c)=>e(s,a&&((...h)=>{const[d]=at(s),[,,,p]=fe.get(ct);if(d.startsWith(ts))return a(...h);const w=p[d];return R(w)?a(...h):(delete p[d],w)}),c),as=ns.concat(rs),is=e=>function(...a){const c=os(),[l,h,d]=Zt(a),p=Gt(c,d);let w=e;const{use:N}=p,O=(N||[]).concat(as);for(let E=O.length;E--;)w=O[E](w);return w(l,h||p.fetcher||null,p)},cs=(e,s,a)=>{const c=s[e]||(s[e]=[]);return c.push(a),()=>{const l=c.indexOf(a);l>=0&&(c[l]=c[c.length-1],c.pop())}},fo=(e,s)=>(...a)=>{const[c,l,h]=Zt(a),d=(h.use||[]).concat(s);return e(c,l,{...h,use:d})};ss();const ls=void 0,dt=null,Qt=e=>e===ls,ds=e=>typeof e=="function",qe=new WeakMap,us=e=>dt.prototype.toString.call(e),ut=(e,s)=>e===`[object ${s}]`;let fs=0;const ft=e=>{const s=typeof e,a=us(e),c=ut(a,"Date"),l=ut(a,"RegExp"),h=ut(a,"Object");let d,p;if(dt(e)===e&&!c&&!l){if(d=qe.get(e),d)return d;if(d=++fs+"~",qe.set(e,d),Array.isArray(e)){for(d="@",p=0;p<e.length;p++)d+=ft(e[p])+",";qe.set(e,d)}if(h){d="#";const w=dt.keys(e).sort();for(;!Qt(p=w.pop());)Qt(e[p])||(d+=p+":"+ft(e[p])+",");qe.set(e,d)}}else d=c?e.toJSON():s=="symbol"?e.toString():s=="string"?JSON.stringify(e):""+e;return d},hs=e=>{if(ds(e))try{e=e()}catch{e=""}const s=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?ft(e):"",[e,s]},po=e=>hs(e)[0],ht=f.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(s=>{e.status="fulfilled",e.value=s},s=>{e.status="rejected",e.reason=s}),e}}),pt={dedupe:!0},Kt=Promise.resolve(Y),ps=()=>he,ms=(e,s,a)=>{const{cache:c,compare:l,suspense:h,fallbackData:d,revalidateOnMount:p,revalidateIfStale:w,refreshInterval:N,refreshWhenHidden:O,refreshWhenOffline:E,keepPreviousData:A,strictServerPrefetchWarning:C}=a,[T,_,k,I]=fe.get(c),[b,K]=at(e),ne=(0,f.useRef)(!1),B=(0,f.useRef)(!1),S=(0,f.useRef)(b),W=(0,f.useRef)(s),ie=(0,f.useRef)(a),U=()=>ie.current,je=()=>U().isVisible()&&U().isOnline(),[de,ke,xe,ce]=Wt(c,b),Ee=(0,f.useRef)({}).current,Se=R(d)?R(a.fallback)?Y:a.fallback[b]:d,Jt=(F,H)=>{for(const z in Ee){const G=z;if(G==="data"){if(!l(F[G],H[G])&&(!R(F[G])||!l(Ge,H[G])))return!1}else if(H[G]!==F[G])return!1}return!0},mt=!ne.current,en=(0,f.useMemo)(()=>{const F=de(),H=ce(),z=Q=>{const le=pe(Q);return delete le._k,(()=>{if(!b||!s||U().isPaused())return!1;if(mt&&!R(p))return p;const De=R(Se)?le.data:Se;return R(De)||w})()?{isValidating:!0,isLoading:!0,...le}:le},G=z(F),ue=F===H?G:z(H);let se=G;return[()=>{const Q=z(de());return Jt(Q,se)?(se.data=Q.data,se.isLoading=Q.isLoading,se.isValidating=Q.isValidating,se.error=Q.error,se):(se=Q,Q)},()=>ue]},[c,b]),Ce=(0,Tt.useSyncExternalStore)((0,f.useCallback)(F=>xe(b,(H,z)=>{Jt(z,H)||F()}),[c,b]),en[0],en[1]),Ts=T[b]&&T[b].length>0,Ne=Ce.data,ve=R(Ne)?Se&&Vt(Se)?ht(Se):Se:Ne,ze=Ce.error,wt=(0,f.useRef)(ve),Ge=A?R(Ne)?R(wt.current)?ve:wt.current:Ne:ve,ye=b&&R(ve),Re=(0,f.useRef)(null);!be&&(0,Tt.useSyncExternalStore)(ps,()=>(Re.current=!1,Re),()=>(Re.current=!0,Re));const Ds=Re.current;C&&Ds&&!h&&ye&&console.warn(`Missing pre-initiated data for serialized key "${b}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const tn=!b||!s||U().isPaused()||Ts&&!R(ze)?!1:mt&&!R(p)?p:h?R(ve)?!1:w:R(ve)||w,nn=mt&&tn,Is=R(Ce.isValidating)?nn:Ce.isValidating,Ls=R(Ce.isLoading)?nn:Ce.isLoading,Me=(0,f.useCallback)(async F=>{const H=W.current;if(!b||!H||B.current||U().isPaused())return!1;let z,G,ue=!0;const se=F||{},Q=!k[b]||!se.dedupe,le=()=>$t?!B.current&&b===S.current&&ne.current:b===S.current,Te={isValidating:!1,isLoading:!1},De=()=>{ke(Te)},on=()=>{const oe=k[b];oe&&oe[1]===G&&delete k[b]},rn={isValidating:!0};R(de().data)&&(rn.isLoading=!0);try{if(Q&&(ke(rn),a.loadingTimeout&&R(de().data)&&setTimeout(()=>{ue&&le()&&U().onLoadingSlow(b,a)},a.loadingTimeout),k[b]=[H(K),it()]),[z,G]=k[b],z=await z,Q&&setTimeout(on,a.dedupingInterval),!k[b]||k[b][1]!==G)return Q&&le()&&U().onDiscarded(b),!1;Te.error=Y;const oe=_[b];if(!R(oe)&&(G<=oe[0]||G<=oe[1]||oe[1]===0))return De(),Q&&le()&&U().onDiscarded(b),!1;const me=de().data;Te.data=l(me,z)?me:z,Q&&le()&&U().onSuccess(z,b,a)}catch(oe){on();const me=U(),{shouldRetryOnError:gt}=me;me.isPaused()||(Te.error=oe,Q&&le()&&(me.onError(oe,b,me),(gt===!0||ae(gt)&&gt(oe))&&(!U().revalidateOnFocus||!U().revalidateOnReconnect||je())&&me.onErrorRetry(oe,b,me,Ps=>{const xt=T[b];xt&&xt[0]&&xt[0](Pt,Ps)},{retryCount:(se.retryCount||0)+1,dedupe:!0})))}return ue=!1,De(),!0},[b,c]),sn=(0,f.useCallback)((...F)=>Bt(c,S.current,...F),[]);if(Ue(()=>{W.current=s,ie.current=a,R(Ne)||(wt.current=Ne)}),Ue(()=>{if(!b)return;const F=Me.bind(Y,pt);let H=0;U().revalidateOnFocus&&(H=Date.now()+U().focusThrottleInterval);const G=cs(b,T,(ue,se={})=>{if(ue==Dt){const Q=Date.now();U().revalidateOnFocus&&Q>H&&je()&&(H=Q+U().focusThrottleInterval,F())}else if(ue==It)U().revalidateOnReconnect&&je()&&F();else{if(ue==Lt)return Me();if(ue==Pt)return Me(se)}});return B.current=!1,S.current=b,ne.current=!0,ke({_k:K}),tn&&(k[b]||(R(ve)||be?F():Gn(F))),()=>{B.current=!0,G()}},[b]),Ue(()=>{let F;function H(){const G=ae(N)?N(de().data):N;G&&F!==-1&&(F=setTimeout(z,G))}function z(){!de().error&&(O||U().isVisible())&&(E||U().isOnline())?Me(pt).then(H):H()}return H(),()=>{F&&(clearTimeout(F),F=-1)}},[N,O,E,b]),(0,f.useDebugValue)(Ge),h){if(!$t&&be&&ye)throw new Error("Fallback data is required when using Suspense in SSR.");ye&&(W.current=s,ie.current=a,B.current=!1);const F=I[b],H=!R(F)&&ye?sn(F):Kt;if(ht(H),!R(ze)&&ye)throw ze;const z=ye?Me(pt):Kt;!R(Ge)&&ye&&(z.status="fulfilled",z.value=!0),ht(z)}return{mutate:sn,get data(){return Ee.data=!0,Ge},get error(){return Ee.error=!0,ze},get isValidating(){return Ee.isValidating=!0,Is},get isLoading(){return Ee.isLoading=!0,Ls}}},mo=We.defineProperty(es,"defaultValue",{value:zt}),ws=is(ms);var gs=()=>{const e=(0,Ln.addQueryArgs)("/ajax-search-pro/options/analytics"),s=d=>t()({path:d}),{data:a,isLoading:c,mutate:l,error:h}=ws(e,s,{revalidateIfStale:!1,revalidateOnFocus:!0,revalidateOnReconnect:!1,revalidateOnMount:!0});return h?{data:void 0,error:h,isLoading:c,mutate:l}:{data:a||{},error:void 0,isLoading:c,mutate:l}};const He=e=>/^[a-zA-Z][a-zA-Z0-9_]*$/.test(e.trim()),xs=e=>{const s=["focus","search_start","search_end","magnifier","return","try_this","facet_change","result_click"];for(const a of s)for(const c of e[a]?.items??[]){if(!c.name.trim())return(0,g.__)("Event name is required.","ajax-search-pro");if(!He(c.action))return(0,g.__)("Event action must start with a letter and contain only letters, numbers, and underscores (no spaces).","ajax-search-pro");for(const l of c.params){if(!He(l.key))return(0,g.__)("Parameter name must start with a letter and contain only letters, numbers, and underscores.","ajax-search-pro");if(!l.value.trim())return(0,g.__)("Parameter value must not be empty.","ajax-search-pro")}}return null};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vs=X("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ys=X("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _s=X("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var bs=({item:e,availableVars:s,initialExpanded:a,onChange:c,onDelete:l})=>{const[h,d]=(0,f.useState)(a??!1),[p,w]=(0,f.useState)(!1),N=e.name.trim()==="",O=e.action!==""&&!He(e.action),E=(_,k)=>{c({...e,[_]:k})},A=(_,k,I)=>{const b=e.params.map((K,ne)=>ne===_?{...K,[k]:I}:K);E("params",b)},C=_=>{E("params",e.params.filter((k,I)=>I!==_))},T=()=>{E("params",[...e.params,{key:"",value:""}])};return(0,o.jsxs)("div",{className:"wdo:border wdo:border-gray-200 wdo:dark:border-gray-700 wdo:rounded-lg wdo:mb-2",children:[(0,o.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:gap-3 wdo:px-4 wdo:py-3 wdo:cursor-pointer",onClick:()=>d(_=>!_),children:[(0,o.jsx)("div",{onClick:_=>_.stopPropagation(),children:(0,o.jsx)(Rt,{value:e.active,onChange:_=>{E("active",_)}})}),(0,o.jsx)("input",{type:"text",className:"wdo:input wdo:flex-1 wdo:min-w-0"+(N?" wdo:!border-red-400":""),placeholder:(0,g.__)("Event name (e.g. Track search phrase)","ajax-search-pro"),value:e.name,onClick:_=>_.stopPropagation(),onChange:_=>E("name",_.target.value)}),(0,o.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:gap-2 wdo:ml-auto wdo:shrink-0",children:[p?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:"wdo:text-sm wdo:text-red-500",children:(0,g.__)("Delete?","ajax-search-pro")}),(0,o.jsx)(re,{className:"wdo:border-red-400 wdo:bg-transparent wdo:text-red-400 wdo:hover:bg-transparent wdo:text-sm wdo:py-1 wdo:px-2",onClick:_=>{_.stopPropagation(),l()},children:(0,g.__)("Yes","ajax-search-pro")}),(0,o.jsx)(re,{className:"wdo:text-sm wdo:py-1 wdo:px-2",onClick:_=>{_.stopPropagation(),w(!1)},children:(0,g.__)("No","ajax-search-pro")})]}):(0,o.jsx)(re,{className:"wdo:border-transparent wdo:bg-transparent wdo:text-gray-400 wdo:hover:text-red-400 wdo:hover:bg-transparent wdo:p-1",onClick:_=>{_.stopPropagation(),w(!0)},title:(0,g.__)("Delete event","ajax-search-pro"),children:(0,o.jsx)(vs,{size:16})}),h?(0,o.jsx)(ys,{size:16,className:"wdo:text-gray-400"}):(0,o.jsx)(_s,{size:16,className:"wdo:text-gray-400"})]})]}),h&&(0,o.jsxs)("div",{className:"wdo:border-t wdo:border-gray-200 wdo:dark:border-gray-700",children:[(0,o.jsx)(Fe,{label:(0,g.__)("Event action","ajax-search-pro"),description:(0,g.__)("Required. The GA4 event name \u2014 letters, numbers and underscores only, no spaces (e.g. search_start).","ajax-search-pro"),children:(0,o.jsx)(Ve,{value:e.action,className:O?"wdo:!border-red-400":"",onChange:_=>E("action",_.target.value)})}),(0,o.jsxs)(Fe,{label:(0,g.__)("Parameters","ajax-search-pro"),description:`${(0,g.__)("Available variables:","ajax-search-pro")} ${s.join(", ")}`,labelClass:"wdo:w-full",optionClass:"wdo:w-full",children:[e.params.length>0&&(0,o.jsxs)("div",{className:"wdo:mb-2",children:[(0,o.jsxs)("div",{className:"wdo:grid wdo:gap-x-2",style:{gridTemplateColumns:"1fr 1fr auto"},children:[(0,o.jsx)("span",{className:"wdo:text-xs wdo:text-wp-admin-400 wdo:dark:text-wp-admin-500 wdo:px-1",children:(0,g.__)("Parameter name","ajax-search-pro")}),(0,o.jsx)("span",{className:"wdo:text-xs wdo:text-wp-admin-400 wdo:dark:text-wp-admin-500 wdo:px-1",children:(0,g.__)("Value","ajax-search-pro")}),(0,o.jsx)("span",{})]}),e.params.map((_,k)=>(0,o.jsxs)("div",{className:"wdo:grid wdo:gap-x-2 wdo:mt-1 wdo:items-center",style:{gridTemplateColumns:"1fr 1fr auto"},children:[(0,o.jsx)(Ve,{placeholder:"event_category",value:_.key,className:_.key!==""&&!He(_.key)?"wdo:!border-red-400":"",onChange:I=>A(k,"key",I.target.value)}),(0,o.jsx)(Ve,{placeholder:"{phrase}",value:_.value,className:_.key!==""&&_.value.trim()===""?"wdo:!border-red-400":"",onChange:I=>A(k,"value",I.target.value)}),(0,o.jsx)("button",{className:"wdo:p-1 wdo:text-wp-admin-400 wdo:hover:text-red-400 wdo:transition-colors",onClick:()=>C(k),title:(0,g.__)("Remove parameter","ajax-search-pro"),children:(0,o.jsx)(Et,{size:14})})]},k))]}),(0,o.jsx)(re,{className:"wdo:text-sm wdo:py-1 wdo:px-3",onClick:T,children:(0,g.__)("+ Add parameter","ajax-search-pro")})]})]})]})};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const js=X("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),ks={active:!0,name:"",action:"",params:[]},we=["{search_id}","{search_name}"],Es={focus:["{phrase}",...we],search_start:["{phrase}",...we],search_end:["{phrase}","{results_count}",...we],magnifier:["{phrase}",...we],return:["{phrase}",...we],try_this:["{phrase}",...we],facet_change:["{phrase}","{option_label}","{option_value}",...we],result_click:["{phrase}","{result_title}","{result_url}",...we]};var Ss=({triggerKey:e,label:s,description:a,config:c,onChange:l})=>{const h=c?.items??[],[d,p]=(0,f.useState)(null),w=(E,A)=>{const C=[...h];C[E]=A,l({items:C})},N=E=>{l({items:h.filter((A,C)=>C!==E)})},O=()=>{p(h.length),l({items:[...h,{...ks}]})};return(0,o.jsx)("div",{className:"wdo:border-b wdo:border-gray-200 wdo:dark:border-gray-700 last:wdo:border-b-0",children:(0,o.jsxs)("div",{className:"wdo:px-6 wdo:pt-5 wdo:pb-2",children:[(0,o.jsxs)("div",{className:"wdo:flex wdo:items-start wdo:justify-between wdo:gap-4 wdo:mb-3",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"wdo:text-base wdo:font-semibold wdo:dark:text-white",children:s}),(0,o.jsx)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400 wdo:mt-0.5",children:a})]}),(0,o.jsxs)(re,{className:"wdo:shrink-0 wdo:flex wdo:items-center wdo:gap-1 wdo:text-sm wdo:py-1 wdo:px-3",onClick:O,children:[(0,o.jsx)(js,{size:14}),(0,g.__)("Add event","ajax-search-pro")]})]}),h.length>0?(0,o.jsx)("div",{className:"wdo:mb-3",children:h.map((E,A)=>(0,o.jsx)(bs,{item:E,availableVars:Es[e]??["{phrase}"],initialExpanded:d===A,onChange:C=>w(A,C),onDelete:()=>N(A)},A))}):(0,o.jsx)("p",{className:"wdo:text-sm wdo:text-gray-400 wdo:dark:text-gray-500 wdo:mb-3 wdo:italic",children:(0,g.__)('No events configured. Click "Add event" to create one.',"ajax-search-pro")})]})})};/**
 * @license lucide-react v1.14.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cs=X("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var Ns=({className:e,children:s})=>(0,o.jsxs)("div",{className:`wdo:flex wdo:gap-3 wdo:items-center wdo:p-3 wdo:rounded-sm wdo:border wdo:border-blue-500/30 wdo:bg-blue-500/10 wdo:text-blue-700 wdo:dark:text-blue-400 wdo:text-sm ${e??""}`,children:[(0,o.jsx)(Cs,{className:"wdo:w-5 wdo:h-5 wdo:shrink-0"}),(0,o.jsx)("div",{children:s})]});const Os=[{key:"focus",label:(0,g.__)("Input focus","ajax-search-pro"),description:(0,g.__)("Fires when the user clicks on the search input field.","ajax-search-pro")},{key:"search_start",label:(0,g.__)("Search start","ajax-search-pro"),description:(0,g.__)("Fires when the live search request begins.","ajax-search-pro")},{key:"search_end",label:(0,g.__)("Search end","ajax-search-pro"),description:(0,g.__)("Fires when the live search results are displayed.","ajax-search-pro")},{key:"magnifier",label:(0,g.__)("Magnifier click","ajax-search-pro"),description:(0,g.__)("Fires when the user clicks the magnifier icon.","ajax-search-pro")},{key:"return",label:(0,g.__)("Enter / Return key","ajax-search-pro"),description:(0,g.__)("Fires when the user presses Enter in the search input.","ajax-search-pro")},{key:"try_this",label:(0,g.__)('"Try this" keyword click',"ajax-search-pro"),description:(0,g.__)('Fires when the user clicks one of the "try this" keyword suggestions.',"ajax-search-pro")},{key:"facet_change",label:(0,g.__)("Filter change","ajax-search-pro"),description:(0,g.__)("Fires when the user changes a front-end filter option.","ajax-search-pro")},{key:"result_click",label:(0,g.__)("Result click","ajax-search-pro"),description:(0,g.__)("Fires when the user clicks on a search result.","ajax-search-pro")}],As=()=>{const[e,s]=(0,f.useState)(null),{data:a,isLoading:c,error:l,mutate:h}=gs(),[d,p]=(0,f.useState)(!1),[w,N]=(0,f.useState)(!1),[O,E]=(0,f.useState)(!1),{addSuccess:A,addError:C}=kt(),T=(0,f.useContext)(Pe);(0,f.useEffect)(()=>{a!==void 0&&s(a)},[c]);const _=S=>{Fn().isEqual(S,a)?T?.setConfirmBeforeSwap(null):T?.setConfirmBeforeSwap((0,g.__)("There are unsaved changes, are you sure you want to leave?","ajax-search-pro"))},k=S=>{if(!e)return;const W={...e,method:{value:S}};s(W),_(W)},I=S=>{if(!e)return;const W={...e,tracking_id:{value:S}};s(W),_(W)},b=(S,W)=>{if(!e)return;const ie={...e,[S]:W};s(ie),_(ie)},K=()=>{if(!e)return;const S=xs(e);if(S){C(S);return}p(!0),t()({path:"/ajax-search-pro/options/analytics",headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({...e})}).then(W=>{s(W),A((0,g.__)("Options saved successfully!","ajax-search-pro"))}).catch(W=>{C(W)}).finally(()=>{Mt(),h(),p(!1),T?.setConfirmBeforeSwap(null)})},ne=()=>{N(!0),t()({path:"/ajax-search-pro/options/analytics/reset",headers:{"Content-Type":"application/json"},method:"POST"}).then(S=>{s(S),A((0,g.__)("Options reset successfully!","ajax-search-pro"))}).catch(S=>{C(S)}).finally(()=>{Mt(),h(),N(!1),E(!1),T?.setConfirmBeforeSwap(null)})};if(c||e===null||Object.keys(e).length===0)return(0,o.jsx)("div",{className:"wdo:flex wdo:flex-col wdo:card wdo:m-4",children:(0,o.jsx)("p",{className:"wdo:p-6",children:(0,g.__)("Loading...","ajax-search-pro")})});if(l)return(0,o.jsx)("div",{className:"wdo:flex wdo:flex-col wdo:card wdo:m-4",children:(0,o.jsx)("p",{className:"wdo:p-6",children:(0,g.__)("Error loading options, please reload the page.","ajax-search-pro")})});const B=e.method.value;return(0,o.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:card wdo:m-4",children:[(0,o.jsx)("div",{className:"wdo:p-6",children:(0,o.jsx)("h1",{className:"wdo:text-[1.8em] wdo:dark:text-white",children:"Settings"})}),(0,o.jsx)(Fe,{label:(0,g.__)("Event tracking enabled","ajax-search-pro"),description:(0,g.__)("Send search interaction events to Google Analytics / GTM.","ajax-search-pro"),children:(0,o.jsx)(Rt,{value:e.method.value,onChange:k})}),B&&(0,o.jsx)(Fe,{label:(0,g.__)("Tracking ID (optional)","ajax-search-pro"),description:(0,g.__)("Leave empty to use the globally installed GA/GTM tracker. Provide a G-XXXXXXXX ID to send events to a specific property.","ajax-search-pro"),children:(0,o.jsx)(Ve,{value:e.tracking_id.value,placeholder:"G-XXXXXXXX",onChange:S=>I(S.target.value)})}),B&&(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"wdo:px-6 wdo:pt-4 wdo:pb-2",children:(0,o.jsx)(Ns,{children:(0,g.__)("Configure one or more GA events per trigger. Each event fires independently when its trigger occurs.","ajax-search-pro")})}),Os.map(({key:S,label:W,description:ie})=>(0,o.jsx)(Ss,{triggerKey:S,label:W,description:ie,config:e[S],onChange:U=>b(S,U)},S))]}),(0,o.jsxs)("div",{className:"wdo:p-6 wdo:flex wdo:gap-6",children:[(0,o.jsx)(Xe,{isLoading:d,disabled:d||w,onClick:S=>{S.preventDefault(),K()},children:(0,g.__)("Save!","ajax-search-pro")}),(0,o.jsx)(re,{isLoading:w,disabled:d||w,onClick:()=>E(!0),children:(0,g.__)("Reset to defaults","ajax-search-pro")})]}),(0,o.jsxs)(v,{isOpen:O,onOverlayClick:()=>E(!1),children:[(0,o.jsx)("h2",{className:"wdo:mb-2",children:(0,g.__)("Confirm","ajax-search-pro")}),(0,o.jsx)("p",{children:(0,g.__)("Are you sure you want to reset all analytics settings to defaults? All configured events will be removed.","ajax-search-pro")}),(0,o.jsxs)("div",{className:"wdo:flex wdo:mt-6 wdo:gap-6",children:[(0,o.jsx)(Xe,{isLoading:w,disabled:d||w,onClick:S=>{S.preventDefault(),ne()},children:(0,g.__)("Reset","ajax-search-pro")}),(0,o.jsx)(re,{disabled:d||w,onClick:()=>E(!1),children:(0,g.__)("Cancel","ajax-search-pro")})]})]})]})},Rs=()=>{const e=(0,f.useContext)(Pe);return e?.activeId==="settings"||!e?.activeId?(0,o.jsx)(As,{}):null};var Ms=()=>{const{messages:e}=kt();return(0,o.jsxs)(_n,{children:[(0,o.jsx)(gn,{messages:e}),(0,o.jsx)(un,{}),(0,o.jsx)(Sn,{subtitle:"Analytics",logo:(0,o.jsx)(In,{}),className:"wdo:items-center!"}),(0,o.jsx)(On,{children:(0,o.jsxs)("div",{className:"wdo:panel-container",children:[(0,o.jsx)("nav",{className:"wdo:menu-panel",children:(0,o.jsxs)(An,{children:[(0,o.jsx)(Ot,{label:(0,g.__)("Settings","ajax-search-pro"),id:"settings",defaultActive:!0,iconBefore:(0,o.jsx)(Rn,{})}),(0,o.jsx)(Ot,{label:(0,g.__)("Documentation","ajax-search-pro"),id:"documentation",onClick:s=>{s.preventDefault(),Tn("https://documentation.ajaxsearchpro.com/analytics-integration")},iconAfter:(0,o.jsx)(Mn,{})})]})}),(0,o.jsx)("div",{className:"wdo:content-panel",children:(0,o.jsx)(Rs,{})})]})})]})};const Yt=document.getElementById("asp-root");Yt!==null&&L().render((0,o.jsx)(Ms,{}),Yt)})()})();
