PageSourceSearch

https://capitalai.ai/wp-content/plugins/wedocs-pro/assets/build/frontend.js?ver=420a37d80a2d2cb08d4c

js capitalai.ai collected 2026-10-05 13:46:22 UTC 200,483 bytes, 1 lines download raw bytes

1(()=>{var e={8465:function(e){e.exports=function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function n(e,t,n){return t=l(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,n||[],l(e).constructor):t.apply(e,n))}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,n){return e.get(t(e,n))}function a(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function i(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,p(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(){return s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},s.apply(null,arguments)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||f(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}var w={},g=function(e){return new Promise((function(t){if(!e)return t();var n=window.scrollX,r=window.scrollY;w.restoreFocusTimeout=setTimeout((function(){w.previousActiveElement instanceof HTMLElement?(w.previousActiveElement.focus(),w.previousActiveElement=null):document.body&&document.body.focus(),t()}),100),window.scrollTo(n,r)}))},v="swal2-",b=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","to
1p-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"].reduce((function(e,t){return e[t]=v+t,e}),{}),y=["success","warning","info","question","error"].reduce((function(e,t){return e[t]=v+t,e}),{}),x="SweetAlert2:",E=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},k=function(e){console.warn("".concat(x," ").concat("object"===h(e)?e.join(" "):e))},C=function(e){console.error("".concat(x," ").concat(e))},_=[],S=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t='"'.concat(e,'" is deprecated and will be removed in the next major release.').concat(n?' Use "'.concat(n,'" instead.'):""),_.includes(t)||(_.push(t),k(t))},L=function(e){return"function"==typeof e?e():e},A=function(e){return e&&"function"==typeof e.toPromise},N=function(e){return A(e)?e.toPromise():Promise.resolve(e)},M=function(e){return e&&Promise.resolve(e)===e},P=function(){return document.body.querySelector(".".concat(b.container))},T=function(e){var t=P();return t?t.querySelector(e):null},D=function(e){return T(".".concat(e))},j=function(){return D(b.popup)},B=function(){return D(b.icon)},R=function(){return D(b.title)},z=function(){return D(b["html-container"])},$=function(){return D(b.image)},O=function(){return D(b["progress-steps"])},I=function(){return D(b["validation-message"])},F=function(){return T(".".concat(b.actions," .").concat(b.confirm))},H=function(){return T(".".concat(b.actions," .").concat(b.cancel))},U=function(){return T(".".concat(b.actions," .").concat(b.deny))},V=function(){return T(".".concat(b.loader))},W=function(){return D(b.actions)},q=function(){return D(b.footer)},Y=function(){return D(b["timer-progress-bar"])},Z=function(){return D(b.close)},K=function(){var e=j();if(!e)return[];var t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),n=Array.from(t).sort((function(e,t){var n=parseInt(e.getAttribute("tabindex")||"0"),r=parseInt(t.getAttribute("tabindex")||"0");return n>r?1:n<r?-1:0})),r=e.querySelectorAll('\n  a[href],\n  area[href],\n  input:not([disabled]),\n  select:not([disabled]),\n  textarea:not([disabled]),\n  button:not([disabled]),\n  iframe,\n  object,\n  embed,\n  [tabindex="0"],\n  [contenteditable],\n  audio[controls],\n  video[controls],\n  summary\n'),o=Array.from(r).filter((function(e){return"-1"!==e.getAttribute("tabindex")}));return m(new Set(n.concat(o))).filter((function(e){return pe(e)}))},J=function(){return Q(document.body,b.shown)&&!Q(document.body,b["toast-shown"])&&!Q(document.body,b["no-backdrop"])},X=function(){var e=j();return!!e&&Q(e,b.toast)},G=function(e,t){if(e.textContent="",t){var n=(new DOMParser).parseFromString(t,"text/html"),r=n.querySelector("head");r&&Array.from(r.childNodes).forEach((function(t){e.appendChild(t)}));var o=n.querySelector("body");o&&Array.from(o.childNodes).forEach((function(t){t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},Q=function(e,t){if(!t)return!1;for(var n=t.split(/\s+/),r=0;r<n.length;r++)if(!e.classList.contains(n[r]))return!1;return!0},ee=function(e,t,n){if(function(e,t){Array.from(e.classList).forEach((function(n){Object.values(b).includes(n)||Object.values(y).includes(n)||Object.values(t.showClass||{}).includes(n)||e.classList.remove(n)}))}(e,t),t.customClass){var r=t.customClass[n];r&&("string"==typeof r||r.forEach?oe(e,r):k("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(h(r),'"')))}},te=function(e,t){if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(".".concat(b.popup," > .").concat(b[t]));case"checkbox":return e.querySelector(".".concat(b.popup," > .").concat(b.checkbox," input"));case"radio":return e.querySelector(".".concat(b.popup," > .").concat(b.radio," input:checked"))||e.querySelector(".".concat(b.popup," > .").concat(b.radio," input:first-child"));case"range":return e.querySelector(".".concat(b.popup," > .").concat(b.range," input"));default:return e.querySelector(".".concat(b.popup," > .").concat(b.input))}},ne=function(e){if(e.focus(),"file"!==e.type){var t=e.value;e.value="",e.value=t}},re=function(e,t,n){e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(
1Boolean)),t.forEach((function(t){Array.isArray(e)?e.forEach((function(e){n?e.classList.add(t):e.classList.remove(t)})):n?e.classList.add(t):e.classList.remove(t)})))},oe=function(e,t){re(e,t,!0)},ae=function(e,t){re(e,t,!1)},ie=function(e,t){for(var n=Array.from(e.children),r=0;r<n.length;r++){var o=n[r];if(o instanceof HTMLElement&&Q(o,t))return o}},se=function(e,t,n){n==="".concat(parseInt(n))&&(n=parseInt(n)),n||0===parseInt(n)?e.style.setProperty(t,"number"==typeof n?"".concat(n,"px"):n):e.style.removeProperty(t)},le=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e&&(e.style.display=t)},ce=function(e){e&&(e.style.display="none")},de=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"block";e&&new MutationObserver((function(){me(e,e.innerHTML,t)})).observe(e,{childList:!0,subtree:!0})},ue=function(e,t,n,r){var o=e.querySelector(t);o&&o.style.setProperty(n,r)},me=function(e,t){t?le(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex"):ce(e)},pe=function(e){return!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))},he=function(e){return!!(e.scrollHeight>e.clientHeight)},fe=function(e){var t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),r=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||r>0},we=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Y();n&&pe(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((function(){n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"}),10))},ge=function(){return"undefined"==typeof window||"undefined"==typeof document},ve='\n <div aria-labelledby="'.concat(b.title,'" aria-describedby="').concat(b["html-container"],'" class="').concat(b.popup,'" tabindex="-1">\n   <button type="button" class="').concat(b.close,'"></button>\n   <ul class="').concat(b["progress-steps"],'"></ul>\n   <div class="').concat(b.icon,'"></div>\n   <img class="').concat(b.image,'" />\n   <h2 class="').concat(b.title,'" id="').concat(b.title,'"></h2>\n   <div class="').concat(b["html-container"],'" id="').concat(b["html-container"],'"></div>\n   <input class="').concat(b.input,'" id="').concat(b.input,'" />\n   <input type="file" class="').concat(b.file,'" />\n   <div class="').concat(b.range,'">\n     <input type="range" />\n     <output></output>\n   </div>\n   <select class="').concat(b.select,'" id="').concat(b.select,'"></select>\n   <div class="').concat(b.radio,'"></div>\n   <label class="').concat(b.checkbox,'">\n     <input type="checkbox" id="').concat(b.checkbox,'" />\n     <span class="').concat(b.label,'"></span>\n   </label>\n   <textarea class="').concat(b.textarea,'" id="').concat(b.textarea,'"></textarea>\n   <div class="').concat(b["validation-message"],'" id="').concat(b["validation-message"],'"></div>\n   <div class="').concat(b.actions,'">\n     <div class="').concat(b.loader,'"></div>\n     <button type="button" class="').concat(b.confirm,'"></button>\n     <button type="button" class="').concat(b.deny,'"></button>\n     <button type="button" class="').concat(b.cancel,'"></button>\n   </div>\n   <div class="').concat(b.footer,'"></div>\n   <div class="').concat(b["timer-progress-bar-container"],'">\n     <div class="').concat(b["timer-progress-bar"],'"></div>\n   </div>\n </div>\n').replace(/(^|\n)\s*/g,""),be=function(){w.currentInstance.resetValidationMessage()},ye=function(e){var t,n,r,o,a,i,s,l,c,d,u=!!(t=P())&&(t.remove(),ae([document.documentElement,document.body],[b["no-backdrop"],b["toast-shown"],b["has-column"]]),!0);if(ge())C("SweetAlert2 requires document to initialize");else{var m=document.createElement("div");m.className=b.container,u&&oe(m,b["no-transition"]),G(m,ve);var p="string"==typeof(d=e.target)?document.querySelector(d):d;p.appendChild(m),function(e){var t=j();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")}(e),function(e){"rtl"===window.getComputedStyle(e).direction&&oe(P(),b.rtl)}
1(p),n=j(),r=ie(n,b.input),o=ie(n,b.file),a=n.querySelector(".".concat(b.range," input")),i=n.querySelector(".".concat(b.range," output")),s=ie(n,b.select),l=n.querySelector(".".concat(b.checkbox," input")),c=ie(n,b.textarea),r.oninput=be,o.onchange=be,s.onchange=be,l.onchange=be,c.oninput=be,a.oninput=function(){be(),i.value=a.value},a.onchange=function(){be(),i.value=a.value}}},xe=function(e,t){e instanceof HTMLElement?t.appendChild(e):"object"===h(e)?Ee(e,t):e&&G(t,e)},Ee=function(e,t){e.jquery?ke(t,e):G(t,e.toString())},ke=function(e,t){if(e.textContent="",0 in t)for(var n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},Ce=function(){if(ge())return!1;var e=document.createElement("div");return void 0!==e.style.webkitAnimation?"webkitAnimationEnd":void 0!==e.style.animation&&"animationend"}(),_e=function(e,t){var n=W(),r=V();n&&r&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?le(n):ce(n),ee(n,t,"actions"),function(e,t,n){var r=F(),o=U(),a=H();r&&o&&a&&(Se(r,"confirm",n),Se(o,"deny",n),Se(a,"cancel",n),function(e,t,n,r){r.buttonsStyling?(oe([e,t,n],b.styled),r.confirmButtonColor&&(e.style.backgroundColor=r.confirmButtonColor,oe(e,b["default-outline"])),r.denyButtonColor&&(t.style.backgroundColor=r.denyButtonColor,oe(t,b["default-outline"])),r.cancelButtonColor&&(n.style.backgroundColor=r.cancelButtonColor,oe(n,b["default-outline"]))):ae([e,t,n],b.styled)}(r,o,a,n),n.reverseButtons&&(n.toast?(e.insertBefore(a,r),e.insertBefore(o,r)):(e.insertBefore(a,t),e.insertBefore(o,t),e.insertBefore(r,t))))}(n,r,t),G(r,t.loaderHtml||""),ee(r,t,"loader"))};function Se(e,t,n){var r=E(t);me(e,n["show".concat(r,"Button")],"inline-block"),G(e,n["".concat(t,"ButtonText")]||""),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]||""),e.className=b[t],ee(e,n,"".concat(t,"Button"))}var Le=function(e,t){var n=P();n&&(function(e,t){"string"==typeof t?e.style.background=t:t||oe([document.documentElement,document.body],b["no-backdrop"])}(n,t.backdrop),function(e,t){t&&(t in b?oe(e,b[t]):(k('The "position" parameter is not valid, defaulting to "center"'),oe(e,b.center)))}(n,t.position),function(e,t){t&&oe(e,b["grow-".concat(t)])}(n,t.grow),ee(n,t,"container"))};var Ae={innerParams:new WeakMap,domCache:new WeakMap},Ne=["input","file","range","select","radio","checkbox","textarea"],Me=function(e){if(e.input)if(ze[e.input]){var t=Be(e.input),n=ze[e.input](t,e);le(t),e.inputAutoFocus&&setTimeout((function(){ne(n)}))}else C("Unexpected type of input! Expected ".concat(Object.keys(ze).join(" | "),', got "').concat(e.input,'"'))},Pe=function(e,t){var n=te(j(),e);if(n)for(var r in function(e){for(var t=0;t<e.attributes.length;t++){var n=e.attributes[t].name;["id","type","value","style"].includes(n)||e.removeAttribute(n)}}(n),t)n.setAttribute(r,t[r])},Te=function(e){var t=Be(e.input);"object"===h(e.customClass)&&oe(t,e.customClass.input)},De=function(e,t){e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},je=function(e,t,n){if(n.inputLabel){var r=document.createElement("label"),o=b["input-label"];r.setAttribute("for",e.id),r.className=o,"object"===h(n.customClass)&&oe(r,n.customClass.inputLabel),r.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",r)}},Be=function(e){return ie(j(),b[e]||b.input)},Re=function(e,t){["string","number"].includes(h(t))?e.value="".concat(t):M(t)||k('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(h(t),'"'))},ze={};ze.text=ze.email=ze.password=ze.number=ze.tel=ze.url=ze.search=ze.date=ze["datetime-local"]=ze.time=ze.week=ze.month=function(e,t){return Re(e,t.inputValue),je(e,e,t),De(e,t),e.type=t.input,e},ze.file=function(e,t){return je(e,e,t),De(e,t),e},ze.range=function(e,t){var n=e.querySelector("input"),r=e.querySelector("output");return Re(n,t.inputValue),n.type=t.input,Re(r,t.inputValue),je(n,e,t),e},ze.select=function(e,t){if(e.textContent="",t.inputPlaceholder){var n=document.createElement("option");G(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return je(e,e,t),e},ze.radio=function(e){return e.textContent="",e},ze.checkbox=function(e,t){var n=te(j(),"checkbox");n.value="1",n.checked=Boolean(t.inputValue);var r=e.querySelector("span");return G(r,t.inputPlaceholder),n},ze.textarea=function(e,t){Re(e,t.inputValue),De(e,t),je(e,e,t);return setTimeout((function(){if("MutationObserver"in window){var n=parseInt(window.getComputedStyle(j()).width);new MutationObserver((function(){if(document.body.contains(e)){var r=e.offsetWidth+(o=e,parseInt(window.getComputedStyle(o).marginLeft)+parseInt(window.getComputedStyle(o).marginRight));r>n?j().style.width="".concat(r,"px"):se(j(),"width",t.width)}var o})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};var $e=function(e,t){var n=z();n&&(de(n),ee(n,t,"htmlContainer"),t.html?(xe(t.html,n),le(n,"block")):t.text?(n.textContent=t.text,le(n,"block")):ce(n),function(e,t){var n=j();if(n){var r=Ae.innerParams.get(e),o=!r||t.input!==r.input;Ne.forEach((function(e){var r=ie(n,b[e]);r&&(Pe(e,t.inputAttributes),r.className=b[e],o&&ce(r))})),t.input&&(o&&Me(t),Te(t))}}(e,t))},Oe=function(e,t){for(var n=0,r=Object.entries(y);n<r.length;n++){var o=u(r[n],2),a=o[0],i=o[1];
1t.icon!==a&&ae(e,i)}oe(e,t.icon&&y[t.icon]),He(e,t),Ie(),ee(e,t,"icon")},Ie=function(){var e=j();if(e)for(var t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),r=0;r<n.length;r++)n[r].style.backgroundColor=t},Fe=function(e,t){if(t.icon||t.iconHtml){var n=e.innerHTML,r="";t.iconHtml?r=Ue(t.iconHtml):"success"===t.icon?(r='\n  <div class="swal2-success-circular-line-left"></div>\n  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n  <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n  <div class="swal2-success-circular-line-right"></div>\n',n=n.replace(/ style=".*?"/g,"")):"error"===t.icon?r='\n  <span class="swal2-x-mark">\n    <span class="swal2-x-mark-line-left"></span>\n    <span class="swal2-x-mark-line-right"></span>\n  </span>\n':t.icon&&(r=Ue({question:"?",warning:"!",info:"i"}[t.icon])),n.trim()!==r.trim()&&G(e,r)}},He=function(e,t){if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(var n=0,r=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];n<r.length;n++){ue(e,r[n],"background-color",t.iconColor)}ue(e,".swal2-success-ring","border-color",t.iconColor)}},Ue=function(e){return'<div class="'.concat(b["icon-content"],'">').concat(e,"</div>")},Ve=function(e,t){var n=t.showClass||{};e.className="".concat(b.popup," ").concat(pe(e)?n.popup:""),t.toast?(oe([document.documentElement,document.body],b["toast-shown"]),oe(e,b.toast)):oe(e,b.modal),ee(e,t,"popup"),"string"==typeof t.customClass&&oe(e,t.customClass),t.icon&&oe(e,b["icon-".concat(t.icon)])},We=function(e){var t=document.createElement("li");return oe(t,b["progress-step"]),G(t,e),t},qe=function(e){var t=document.createElement("li");return oe(t,b["progress-step-line"]),e.progressStepsDistance&&se(t,"width",e.progressStepsDistance),t},Ye=function(e,t){(function(e,t){var n=P(),r=j();if(n&&r){if(t.toast){se(n,"width",t.width),r.style.width="100%";var o=V();o&&r.insertBefore(o,B())}else se(r,"width",t.width);se(r,"padding",t.padding),t.color&&(r.style.color=t.color),t.background&&(r.style.background=t.background),ce(I()),Ve(r,t)}})(0,t),Le(0,t),function(e,t){var n=O();if(n){var r=t.progressSteps,o=t.currentProgressStep;r&&0!==r.length&&void 0!==o?(le(n),n.textContent="",o>=r.length&&k("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),r.forEach((function(e,a){var i=We(e);if(n.appendChild(i),a===o&&oe(i,b["active-progress-step"]),a!==r.length-1){var s=qe(t);n.appendChild(s)}}))):ce(n)}}(0,t),function(e,t){var n=Ae.innerParams.get(e),r=B();if(r){if(n&&t.icon===n.icon)return Fe(r,t),void Oe(r,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(y).indexOf(t.icon))return C('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(t.icon,'"')),void ce(r);le(r),Fe(r,t),Oe(r,t),oe(r,t.showClass&&t.showClass.icon)}else ce(r)}}(e,t),function(e,t){var n=$();n&&(t.imageUrl?(le(n,""),n.setAttribute("src",t.imageUrl),n.setAttribute("alt",t.imageAlt||""),se(n,"width",t.imageWidth),se(n,"height",t.imageHeight),n.className=b.image,ee(n,t,"image")):ce(n))}(0,t),function(e,t){var n=R();n&&(de(n),me(n,t.title||t.titleText,"block"),t.title&&xe(t.title,n),t.titleText&&(n.innerText=t.titleText),ee(n,t,"title"))}(0,t),function(e,t){var n=Z();n&&(G(n,t.closeButtonHtml||""),ee(n,t,"closeButton"),me(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel||""))}(0,t),$e(e,t),_e(0,t),function(e,t){var n=q();n&&(de(n),me(n,t.footer,"block"),t.footer&&xe(t.footer,n),ee(n,t,"footer"))}(0,t);var n=j();"function"==typeof t.didRender&&n&&t.didRender(n)},Ze=function(){var e;return null===(e=F())||void 0===e?void 0:e.click()},Ke=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Je=function(e){e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Xe=function(e,t){var n,r=K();if(r.length)return(e+=t)===r.length?e=0:-1===e&&(e=r.length-1),void r[e].focus();null===(n=j())||void 0===n||n.focus()},Ge=["ArrowRight","ArrowDown"],Qe=["ArrowLeft","ArrowUp"],et=function(e,t,n){e&&(t.isComposing||229===t.keyCode||(e.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?tt(t,e):"Tab"===t.key?nt(t):[].concat(Ge,Qe).includes(t.key)?rt(t.key):"Escape"===t.key&&ot(t,e,n)))},tt=function(e,t){if(L(t.allowEnterKey)){var n=te(j(),t.input);if(e.target&&n&&e.target instanceof HTMLElement&&e.target.outerHTML===n.outerHTML){if(["textarea","file"].includes(t.input))return;Ze(),e.preventDefault()}}},nt=function(e){for(var t=e.target,n=K(),r=-1,o=0;o<n.length;o++)if(t===n[o]){r=o;break}e.shiftKey?Xe(r,-1):Xe(r,1),e.stopPropagation(),e.preventDefault()},rt=function(e){var t=W(),n=F(),r=U(),o=H();
1if(t&&n&&r&&o){var a=[n,r,o];if(!(document.activeElement instanceof HTMLElement)||a.includes(document.activeElement)){var i=Ge.includes(e)?"nextElementSibling":"previousElementSibling",s=document.activeElement;if(s){for(var l=0;l<t.children.length;l++){if(!(s=s[i]))return;if(s instanceof HTMLButtonElement&&pe(s))break}s instanceof HTMLButtonElement&&s.focus()}}}},ot=function(e,t,n){L(t.allowEscapeKey)&&(e.preventDefault(),n(Ke.esc))},at={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},it=function(){Array.from(document.body.children).forEach((function(e){e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},st="undefined"!=typeof window&&!!window.GestureEvent,lt=function(){var e,t=P();t&&(t.ontouchstart=function(t){e=ct(t)},t.ontouchmove=function(t){e&&(t.preventDefault(),t.stopPropagation())})},ct=function(e){var t=e.target,n=P(),r=z();return!(!n||!r||dt(e)||ut(e)||t!==n&&(he(n)||!(t instanceof HTMLElement)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||he(r)&&r.contains(t)))},dt=function(e){return e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType},ut=function(e){return e.touches&&e.touches.length>1},mt=null,pt=function(e){null===mt&&(document.body.scrollHeight>window.innerHeight||"scroll"===e)&&(mt=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(mt+function(){var e=document.createElement("div");e.className=b["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t}(),"px"))};function ht(e,t,n,r){X()?Et(e,r):(g(n).then((function(){return Et(e,r)})),Je(w)),st?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),J()&&(null!==mt&&(document.body.style.paddingRight="".concat(mt,"px"),mt=null),function(){if(Q(document.body,b.iosfix)){var e=parseInt(document.body.style.top,10);ae(document.body,b.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}}(),it()),ae([document.documentElement,document.body],[b.shown,b["height-auto"],b["no-backdrop"],b["toast-shown"]])}function ft(e){e=bt(e);var t=at.swalPromiseResolve.get(this),n=wt(this);this.isAwaitingPromise?e.isDismissed||(vt(this),t(e)):n&&t(e)}var wt=function(e){var t=j();if(!t)return!1;var n=Ae.innerParams.get(e);if(!n||Q(t,n.hideClass.popup))return!1;ae(t,n.showClass.popup),oe(t,n.hideClass.popup);var r=P();return ae(r,n.showClass.backdrop),oe(r,n.hideClass.backdrop),yt(e,t,n),!0};function gt(e){var t=at.swalPromiseReject.get(this);vt(this),t&&t(e)}var vt=function(e){e.isAwaitingPromise&&(delete e.isAwaitingPromise,Ae.innerParams.get(e)||e._destroy())},bt=function(e){return void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e)},yt=function(e,t,n){var r=P(),o=Ce&&fe(t);"function"==typeof n.willClose&&n.willClose(t),o?xt(e,t,r,n.returnFocus,n.didClose):ht(e,r,n.returnFocus,n.didClose)},xt=function(e,t,n,r,o){Ce&&(w.swalCloseEventFinishedCallback=ht.bind(null,e,n,r,o),t.addEventListener(Ce,(function(e){e.target===t&&(w.swalCloseEventFinishedCallback(),delete w.swalCloseEventFinishedCallback)})))},Et=function(e,t){setTimeout((function(){"function"==typeof t&&t.bind(e.params)(),e._destroy&&e._destroy()}))},kt=function(e){var t=j();if(t||new ar,t=j()){var n=V();X()?ce(B()):Ct(t,e),le(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()}},Ct=function(e,t){var n=W(),r=V();n&&r&&(!t&&pe(F())&&(t=F()),le(n),t&&(ce(t),r.setAttribute("data-button-to-replace",t.className),n.insertBefore(r,t)),oe([e,n],b.loading))},_t=function(e){return e.checked?1:0},St=function(e){return e.checked?e.value:null},Lt=function(e){return e.files&&e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null},At=function(e,t){var n=j();if(n){var r=function(e){"select"===t.input?function(e,t,n){var r=ie(e,b.select);if(r){var o=function(e,t,r){var o=document.createElement("option");o.value=r,G(o,t),o.selected=Pt(r,n.inputValue),e.appendChild(o)};t.forEach((function(e){var t=e[0],n=e[1];if(Array.isArray(n)){var a=document.createElement("optgroup");
1a.label=t,a.disabled=!1,r.appendChild(a),n.forEach((function(e){return o(a,e[1],e[0])}))}else o(r,n,t)})),r.focus()}}(n,Mt(e),t):"radio"===t.input&&function(e,t,n){var r=ie(e,b.radio);if(r){t.forEach((function(e){var t=e[0],o=e[1],a=document.createElement("input"),i=document.createElement("label");a.type="radio",a.name=b.radio,a.value=t,Pt(t,n.inputValue)&&(a.checked=!0);var s=document.createElement("span");G(s,o),s.className=b.label,i.appendChild(a),i.appendChild(s),r.appendChild(i)}));var o=r.querySelectorAll("input");o.length&&o[0].focus()}}(n,Mt(e),t)};A(t.inputOptions)||M(t.inputOptions)?(kt(F()),N(t.inputOptions).then((function(t){e.hideLoading(),r(t)}))):"object"===h(t.inputOptions)?r(t.inputOptions):C("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(h(t.inputOptions)))}},Nt=function(e,t){var n=e.getInput();n&&(ce(n),N(t.inputValue).then((function(r){n.value="number"===t.input?"".concat(parseFloat(r)||0):"".concat(r),le(n),n.focus(),e.hideLoading()})).catch((function(t){C("Error in inputValue promise: ".concat(t)),n.value="",le(n),n.focus(),e.hideLoading()})))};var Mt=function e(t){var n=[];return t instanceof Map?t.forEach((function(t,r){var o=t;"object"===h(o)&&(o=e(o)),n.push([r,o])})):Object.keys(t).forEach((function(r){var o=t[r];"object"===h(o)&&(o=e(o)),n.push([r,o])})),n},Pt=function(e,t){return!!t&&t.toString()===e.toString()},Tt=void 0,Dt=function(e,t){var n=Ae.innerParams.get(e);if(n.input){var r=e.getInput(),o=function(e,t){var n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return _t(n);case"radio":return St(n);case"file":return Lt(n);default:return t.inputAutoTrim?n.value.trim():n.value}}(e,n);n.inputValidator?jt(e,o,t):r&&!r.checkValidity()?(e.enableButtons(),e.showValidationMessage(n.validationMessage||r.validationMessage)):"deny"===t?Bt(e,o):$t(e,o)}else C('The "input" parameter is needed to be set when using returnInputValueOn'.concat(E(t)))},jt=function(e,t,n){var r=Ae.innerParams.get(e);e.disableInput(),Promise.resolve().then((function(){return N(r.inputValidator(t,r.validationMessage))})).then((function(r){e.enableButtons(),e.enableInput(),r?e.showValidationMessage(r):"deny"===n?Bt(e,t):$t(e,t)}))},Bt=function(e,t){var n=Ae.innerParams.get(e||Tt);n.showLoaderOnDeny&&kt(U()),n.preDeny?(e.isAwaitingPromise=!0,Promise.resolve().then((function(){return N(n.preDeny(t,n.validationMessage))})).then((function(n){!1===n?(e.hideLoading(),vt(e)):e.close({isDenied:!0,value:void 0===n?t:n})})).catch((function(t){return zt(e||Tt,t)}))):e.close({isDenied:!0,value:t})},Rt=function(e,t){e.close({isConfirmed:!0,value:t})},zt=function(e,t){e.rejectPromise(t)},$t=function(e,t){var n=Ae.innerParams.get(e||Tt);n.showLoaderOnConfirm&&kt(),n.preConfirm?(e.resetValidationMessage(),e.isAwaitingPromise=!0,Promise.resolve().then((function(){return N(n.preConfirm(t,n.validationMessage))})).then((function(n){pe(I())||!1===n?(e.hideLoading(),vt(e)):Rt(e,void 0===n?t:n)})).catch((function(t){return zt(e||Tt,t)}))):Rt(e,t)};function Ot(){var e=Ae.innerParams.get(this);if(e){var t=Ae.domCache.get(this);ce(t.loader),X()?e.icon&&le(B()):It(t),ae([t.popup,t.actions],b.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}var It=function(e){var t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?le(t[0],"inline-block"):!pe(F())&&!pe(U())&&!pe(H())&&ce(e.actions)};function Ft(){var e=Ae.innerParams.get(this),t=Ae.domCache.get(this);return t?te(t.popup,e.input):null}function Ht(e,t,n){var r=Ae.domCache.get(e);t.forEach((function(e){r[e].disabled=n}))}function Ut(e,t){var n=j();if(n&&e)if("radio"===e.type)for(var r=n.querySelectorAll('[name="'.concat(b.radio,'"]')),o=0;o<r.length;o++)r[o].disabled=t;else e.disabled=t}function Vt(){Ht(this,["confirmButton","denyButton","cancelButton"],!1)}function Wt(){Ht(this,["confirmButton","denyButton","cancelButton"],!0)}function qt(){Ut(this.getInput(),!1)}function Yt(){Ut(this.getInput(),!0)}function Zt(e){var t=Ae.domCache.get(this),n=Ae.innerParams.get(this);G(t.validationMessage,e),t.validationMessage.className=b["validation-message"],n.customClass&&n.customClass.validationMessage&&oe(t.validationMessage,n.customClass.validationMessage),le(t.validationMessage);var r=this.getInput();r&&(r.setAttribute("aria-invalid","true"),r.setAttribute("aria-describedby",b["validation-message"]),ne(r),oe(r,b.inputerror))}function Kt(){var e=Ae.domCache.get(this);e.validationMessage&&ce(e.validationMessage);var t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),ae(t,b.inputerror))}var Jt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose
1:void 0,didDestroy:void 0,scrollbarPadding:!0},Xt=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Gt={allowEnterKey:void 0},Qt=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],en=function(e){return Object.prototype.hasOwnProperty.call(Jt,e)},tn=function(e){return-1!==Xt.indexOf(e)},nn=function(e){return Gt[e]},rn=function(e){en(e)||k('Unknown parameter "'.concat(e,'"'))},on=function(e){Qt.includes(e)&&k('The parameter "'.concat(e,'" is incompatible with toasts'))},an=function(e){var t=nn(e);t&&S(e,t)};function sn(e){var t=j(),n=Ae.innerParams.get(this);if(t&&!Q(t,n.hideClass.popup)){var r=ln(e),o=Object.assign({},n,r);Ye(this,o),Ae.innerParams.set(this,o),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}else k("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.")}var ln=function(e){var t={};return Object.keys(e).forEach((function(n){tn(n)?t[n]=e[n]:k("Invalid parameter to update: ".concat(n))})),t};function cn(){var e=Ae.domCache.get(this),t=Ae.innerParams.get(this);t?(e.popup&&w.swalCloseEventFinishedCallback&&(w.swalCloseEventFinishedCallback(),delete w.swalCloseEventFinishedCallback),"function"==typeof t.didDestroy&&t.didDestroy(),dn(this)):un(this)}var dn=function(e){un(e),delete e.params,delete w.keydownHandler,delete w.keydownTarget,delete w.currentInstance},un=function(e){e.isAwaitingPromise?(mn(Ae,e),e.isAwaitingPromise=!0):(mn(at,e),mn(Ae,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},mn=function(e,t){for(var n in e)e[n].delete(t)},pn=Object.freeze({__proto__:null,_destroy:cn,close:ft,closeModal:ft,closePopup:ft,closeToast:ft,disableButtons:Wt,disableInput:Yt,disableLoading:Ot,enableButtons:Vt,enableInput:qt,getInput:Ft,handleAwaitingPromise:vt,hideLoading:Ot,rejectPromise:gt,resetValidationMessage:Kt,showValidationMessage:Zt,update:sn}),hn=function(e,t,n){t.popup.onclick=function(){e&&(fn(e)||e.timer||e.input)||n(Ke.close)}},fn=function(e){return!!(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton)},wn=!1,gn=function(e){e.popup.onmousedown=function(){e.container.onmouseup=function(t){e.container.onmouseup=function(){},t.target===e.container&&(wn=!0)}}},vn=function(e){e.container.onmousedown=function(t){t.target===e.container&&t.preventDefault(),e.popup.onmouseup=function(t){e.popup.onmouseup=function(){},(t.target===e.popup||t.target instanceof HTMLElement&&e.popup.contains(t.target))&&(wn=!0)}}},bn=function(e,t,n){t.container.onclick=function(r){wn?wn=!1:r.target===t.container&&L(e.allowOutsideClick)&&n(Ke.backdrop)}},yn=function(e){return e instanceof Element||function(e){return"object"===h(e)&&e.jquery}(e)};var xn=function(){if(w.timeout)return function(){var e=Y();if(e){var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width="".concat(n,"%")}}(),w.timeout.stop()},En=function(){if(w.timeout){var e=w.timeout.start();return we(e),e}},kn=!1,Cn={};var Sn,Ln=function(e){for(var t=e.target;t&&t!==document;t=t.parentNode)for(var n in Cn){var r=t.getAttribute(n);if(r)return void Cn[n].fire({template:r})}},An=Object.freeze({__proto__:null,argsToParams:function(e){var t={};return"object"!==h(e[0])||yn(e[0])?["title","html","icon"].forEach((function(n,r){var o=e[r];"string"==typeof o||yn(o)?t[n]=o:void 0!==o&&C("Unexpected type of ".concat(n,'! Expected "string" or "Element", got ').concat(h(o)))})):Object.assign(t,e[0]),t},bindClickHandler:function(){Cn[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,kn||(document.body.addEventListener("click",Ln),kn=!0)},clickCancel:function(){var e;return null===(e=H())||void 0===e?void 0:e.click()},clickConfirm:Ze,clickDeny:function(){var e;return null===(e=U())||void 0===e?void 0:e.click()},enableLoading:kt,fire:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n){if(c())return Reflect.construct.apply(null,arguments);var r=[null];return r.push.apply(r,t),new(e.bind.apply(e,r))}(this,t)},getActions:W,getCancelButton:H,getCloseButton:Z,getConfirmButton:F,getContainer:P,getDenyButton:U,getFocusableElements:K,getFooter:q,getHtmlContainer:z,getIcon:B,getIconContent:function(){return D(b["icon-content"])},getImage:$,getInputLabel:function(){return D(b["input-label"])},getLoader:V,getPopup:j,getProgressSteps:O,getTimerLeft:function(){return w.timeout&&w.timeout.getTimerLeft()},getTimerProgressBar:Y,getTitle:R,getValidationMessage:I,increaseTimer:function(e){if(w.timeout){var t=w.timeout.increase(e);return we(t,!0),t}},isDeprecatedParameter:nn,isLoading:function(){var e=j();return!!e&&e.hasAttribute("data-loading")},isTimerRunning:function(){return!(!w.timeout||!w.timeout.isRunning())},isUpdatableParameter:tn,isValidParameter:en,isVisible:function(){return pe(j())},mixin:function(e){var t=function(t){function o(){return r(this,o),n(this,o,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(o,t),i(o,[{key:"_main",value:function(t,n){return s(l(o.prototype),"_main",this).call(this,t,Object.assign({},e,n))}}])}(this);return t}
1,resumeTimer:En,showLoading:kt,stopTimer:xn,toggleTimer:function(){var e=w.timeout;return e&&(e.running?xn():En())}}),Nn=function(){return i((function e(t,n){r(this,e),this.callback=t,this.remaining=n,this.running=!1,this.start()}),[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}},{key:"increase",value:function(e){var t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}])}(),Mn=["swal-title","swal-html","swal-footer"],Pn=function(e){var t={};return Array.from(e.querySelectorAll("swal-param")).forEach((function(e){On(e,["name","value"]);var n=e.getAttribute("name"),r=e.getAttribute("value");"boolean"==typeof Jt[n]?t[n]="false"!==r:"object"===h(Jt[n])?t[n]=JSON.parse(r):t[n]=r})),t},Tn=function(e){var t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((function(e){var n=e.getAttribute("name"),r=e.getAttribute("value");t[n]=new Function("return ".concat(r))()})),t},Dn=function(e){var t={};return Array.from(e.querySelectorAll("swal-button")).forEach((function(e){On(e,["type","color","aria-label"]);var n=e.getAttribute("type");t["".concat(n,"ButtonText")]=e.innerHTML,t["show".concat(E(n),"Button")]=!0,e.hasAttribute("color")&&(t["".concat(n,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t["".concat(n,"ButtonAriaLabel")]=e.getAttribute("aria-label"))})),t},jn=function(e){var t={},n=e.querySelector("swal-image");return n&&(On(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")||void 0),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")||void 0),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")||void 0),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt")||void 0)),t},Bn=function(e){var t={},n=e.querySelector("swal-icon");return n&&(On(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},Rn=function(e){var t={},n=e.querySelector("swal-input");n&&(On(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));var r=Array.from(e.querySelectorAll("swal-input-option"));return r.length&&(t.inputOptions={},r.forEach((function(e){On(e,["value"]);var n=e.getAttribute("value"),r=e.innerHTML;t.inputOptions[n]=r}))),t},zn=function(e,t){var n={};for(var r in t){var o=t[r],a=e.querySelector(o);a&&(On(a,[]),n[o.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},$n=function(e){var t=Mn.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((function(e){var n=e.tagName.toLowerCase();t.includes(n)||k("Unrecognized element <".concat(n,">"))}))},On=function(e,t){Array.from(e.attributes).forEach((function(n){-1===t.indexOf(n.name)&&k(['Unrecognized attribute "'.concat(n.name,'" on <').concat(e.tagName.toLowerCase(),">."),"".concat(t.length?"Allowed attributes are: ".concat(t.join(", ")):"To set the value, use HTML within the element.")])}))},In=function(e){var t=P(),n=j();"function"==typeof e.willOpen&&e.willOpen(n);var r=window.getComputedStyle(document.body).overflowY;Vn(t,n,e),setTimeout((function(){Hn(t,n)}),10),J()&&(Un(t,e.scrollbarPadding,r),function(){var e=P();Array.from(document.body.children).forEach((function(t){t.contains(e)||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")||""),t.setAttribute("aria-hidden","true"))}))}()),X()||w.previousActiveElement||(w.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((function(){return e.didOpen(n)})),ae(t,b["no-transition"])},Fn=function e(t){var n=j();if(t.target===n&&Ce){var r=P();n.removeEventListener(Ce,e),r.style.overflowY="auto"}},Hn=function(e,t){Ce&&fe(t)?(e.style.overflowY="hidden",t.addEventListener(Ce,Fn)):e.style.overflowY="auto"},Un=function(e,t,n){(function(){if(st&&!Q(document.body,b.iosfix)){var e=document.body.scrollTop;document.body.style.top="".concat(-1*e,"px"),oe(document.body,b.iosfix),lt()}}
1)(),t&&"hidden"!==n&&pt(n),setTimeout((function(){e.scrollTop=0}))},Vn=function(e,t,n){oe(e,n.showClass.backdrop),n.animation?(t.style.setProperty("opacity","0","important"),le(t,"grid"),setTimeout((function(){oe(t,n.showClass.popup),t.style.removeProperty("opacity")}),10)):le(t,"grid"),oe([document.documentElement,document.body],b.shown),n.heightAuto&&n.backdrop&&!n.toast&&oe([document.documentElement,document.body],b["height-auto"])},Wn={email:function(e,t){return/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address")},url:function(e,t){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")}};function qn(e){(function(e){e.inputValidator||("email"===e.input&&(e.inputValidator=Wn.email),"url"===e.input&&(e.inputValidator=Wn.url))})(e),e.showLoaderOnConfirm&&!e.preConfirm&&k("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(k('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),ye(e)}var Yn=new WeakMap,Zn=function(){return i((function e(){if(r(this,e),a(this,Yn,void 0),"undefined"!=typeof window){Sn=this;for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];var s=Object.freeze(this.constructor.argsToParams(o));this.params=s,this.isAwaitingPromise=!1,l=Yn,c=this,d=this._main(Sn.params),l.set(t(l,c),d)}var l,c,d}),[{key:"_main",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e){for(var t in!1===e.backdrop&&e.allowOutsideClick&&k('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),e)rn(t),e.toast&&on(t),an(t)}(Object.assign({},t,e)),w.currentInstance){var n=at.swalPromiseResolve.get(w.currentInstance),r=w.currentInstance.isAwaitingPromise;w.currentInstance._destroy(),r||n({isDismissed:!0}),J()&&it()}w.currentInstance=Sn;var o=Jn(e,t);qn(o),Object.freeze(o),w.timeout&&(w.timeout.stop(),delete w.timeout),clearTimeout(w.restoreFocusTimeout);var a=Xn(Sn);return Ye(Sn,o),Ae.innerParams.set(Sn,o),Kn(Sn,a,o)}},{key:"then",value:function(e){return o(Yn,this).then(e)}},{key:"finally",value:function(e){return o(Yn,this).finally(e)}}])}(),Kn=function(e,t,n){return new Promise((function(r,o){var a=function(t){e.close({isDismissed:!0,dismiss:t})};at.swalPromiseResolve.set(e,r),at.swalPromiseReject.set(e,o),t.confirmButton.onclick=function(){!function(e){var t=Ae.innerParams.get(e);e.disableButtons(),t.input?Dt(e,"confirm"):$t(e,!0)}(e)},t.denyButton.onclick=function(){!function(e){var t=Ae.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?Dt(e,"deny"):Bt(e,!1)}(e)},t.cancelButton.onclick=function(){!function(e,t){e.disableButtons(),t(Ke.cancel)}(e,a)},t.closeButton.onclick=function(){a(Ke.close)},function(e,t,n){e.toast?hn(e,t,n):(gn(t),vn(t),bn(e,t,n))}(n,t,a),function(e,t,n){Je(e),t.toast||(e.keydownHandler=function(e){return et(t,e,n)},e.keydownTarget=t.keydownListenerCapture?window:j(),e.keydownListenerCapture=t.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)}(w,n,a),function(e,t){"select"===t.input||"radio"===t.input?At(e,t):["text","email","number","tel","textarea"].some((function(e){return e===t.input}))&&(A(t.inputValue)||M(t.inputValue))&&(kt(F()),Nt(e,t))}(e,n),In(n),Gn(w,n,a),Qn(t,n),setTimeout((function(){t.container.scrollTop=0}))}))},Jn=function(e,t){var n=function(e){var t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};var n=t.content;return $n(n),Object.assign(Pn(n),Tn(n),Dn(n),jn(n),Bn(n),Rn(n),zn(n,Mn))}(e),r=Object.assign({},Jt,t,n,e);return r.showClass=Object.assign({},Jt.showClass,r.showClass),r.hideClass=Object.assign({},Jt.hideClass,r.hideClass),!1===r.animation&&(r.showClass={backdrop:"swal2-noanimation"},r.hideClass={}),r},Xn=function(e){var t={popup:j(),container:P(),actions:W(),confirmButton:F(),denyButton:U(),cancelButton:H(),loader:V(),closeButton:Z(),validationMessage:I(),progressSteps:O()};return Ae.domCache.set(e,t),t},Gn=function(e,t,n){var r=Y();ce(r),t.timer&&(e.timeout=new Nn((function(){n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(le(r),ee(r,t,"timerProgressBar"),setTimeout((function(){e.timeout&&e.timeout.running&&we(t.timer)}))))},Qn=function(e,t){if(!t.toast)return L(t.allowEnterKey)?void(er(e)||tr(e,t)||Xe(-1,1)):(S("allowEnterKey"),void nr())},er=function(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=f(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}(e.popup.querySelectorAll("[autofocus]"));try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r instanceof HTMLElement&&pe(r))return r.focus(),!0}}catch(e){n.e(e)}finally{n.f()}return!1},tr=function(e,t){return t.focusDeny&&pe(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&pe(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!pe(e.confirmButton)||(e.confirmButton.focus(),0))},nr=function(){document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){var rr=new Date,or=localStorage.getItem("swal-initiation");or?(rr.getTime()-Date.parse(or))/864e5>3&&setTimeout((function(){document.body.style.pointerEvents="none";var e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout((function(){e.play().catch((function(){}))}),2500)}),500):localStorage.setItem("swal-initiation","".concat(rr))}Zn.prototype.disableButtons=Wt,Zn.prototype.enableButtons=Vt,Zn.prototype.getInput=Ft,Zn.prototype.disableInput=Yt,Zn.prototype.enableInput=qt,Zn.prototype.hideLoading=Ot,Zn.prototype.disableLoading=Ot,Zn.prototype.showValidationMessage=Zt,Zn.prototype.resetValidationMessage=Kt,Zn.prototype.close=ft,Zn.prototype.closePopup=ft,Zn.prototype.closeModal=ft,Zn.prototype.closeToast=ft,Zn.prototype.rejectPromise=gt,Zn.prototype.update=sn,Zn.prototype._destroy=cn,Object.assign(Zn,An),Object.keys(pn).forEach((function(e){Zn[e]=function(){var t;return Sn&&Sn[e]?(t=Sn)[e].apply(t,arguments):null}})),Zn.DismissReason=Ke,Zn.version="11.12.1";var ar=Zn;return ar.default=ar,ar}(),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2),"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;
1left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start     top            top-end" "center-start  center         center-end" "bottom-start  bottom-center  bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;
1transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny:focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel:focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) .swal2-html-container{z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#facea8;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#9de0f6;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#c9dae1;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em
vendor: 6,363 bytes, line 1
1;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}
1')}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{"use strict";const e=window.React,t=window.wp.i18n,r=window.wp.element,o=function(e,n=60){const r=e?.substr(0,n);return r?.length>=n?(0,t.__)(`${r}...`,"wedocs-pro"):(0,t.__)(r,"wedocs-pro")},a=window.wp.data;function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}var s;!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(s||(s={}));const l="popstate";function c(e,t){if(!1===e||null==e)throw new Error(t)}function d(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function u(e,t){return{usr:e.state,key:e.key,idx:t}}function m(e,t,n,r){return void 0===n&&(n=null),i({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?h(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function p(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function h(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function f(e,t,n,r){void 0===r&&(r={});let{window:o=document.defaultView,v5Compat:a=!1}=r,d=o.history,h=s.Pop,f=null,w=g();function g(){return(d.state||{idx:null}).idx}function v(){h=s.Pop;let e=g(),t=null==e?null:e-w;w=e,f&&f({action:h,location:y.location,delta:t})}function b(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"==typeof e?e:p(e);return n=n.replace(/ $/,"%20"),c(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==w&&(w=0,d.replaceState(i({},d.state,{idx:w}),""));let y={get action(){return h},get location(){return e(o,d)},listen(e){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(l,v),f=e,()=>{o.removeEventListener(l,v),f=null}},createHref:e=>t(o,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){h=s.Push;let r=m(y.location,e,t);n&&n(r,e),w=g()+1;let i=u(r,w),l=y.createHref(r);try{d.pushState(i,"",l)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(l)}a&&f&&f({action:h,location:y.location,delta:1})},replace:function(e,t){h=s.Replace;let r=m(y.location,e,t);n&&n(r,e),w=g();let o=u(r,w),i=y.createHref(r);d.replaceState(o,"",i),a&&f&&f({action:h,location:y.location,delta:0})},go:e=>d.go(e)};return y}var w;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(w||(w={}));
1const g=new Set(["lazy","caseSensitive","path","id","index","children"]);function v(e,t,n,r){return void 0===n&&(n=[]),void 0===r&&(r={}),e.map(((e,o)=>{let a=[...n,String(o)],s="string"==typeof e.id?e.id:a.join("-");if(c(!0!==e.index||!e.children,"Cannot specify children on an index route"),c(!r[s],'Found a route id collision on id "'+s+"\".  Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let n=i({},e,t(e),{id:s});return r[s]=n,n}{let n=i({},e,t(e),{id:s,children:void 0});return r[s]=n,e.children&&(n.children=v(e.children,t,a,r)),n}}))}function b(e,t,n){return void 0===n&&(n="/"),y(e,t,n,!1)}function y(e,t,n,r){let o=j(("string"==typeof t?h(t):t).pathname||"/",n);if(null==o)return null;let a=x(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let i=null;for(let e=0;null==i&&e<a.length;++e){let t=D(o);i=P(a[e],t,r)}return i}function x(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let o=(e,o,a)=>{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(c(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let s=O([r,i.relativePath]),l=n.concat(i);e.children&&e.children.length>0&&(c(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),x(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:M(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of E(e.path))o(e,t,n);else o(e,t)})),t}function E(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return o?[a,""]:[a];let i=E(r.join("/")),s=[];return s.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&s.push(...i),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const k=/^:[\w-]+$/,C=3,_=2,S=1,L=10,A=-2,N=e=>"*"===e;function M(e,t){let n=e.split("/"),r=n.length;return n.some(N)&&(r+=A),t&&(r+=_),n.filter((e=>!N(e))).reduce(((e,t)=>e+(k.test(t)?C:""===t?S:L)),r)}function P(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},a="/",i=[];for(let e=0;e<r.length;++e){let s=r[e],l=e===r.length-1,c="/"===a?t:t.slice(a.length)||"/",d=T({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},c),u=s.route;if(!d&&l&&n&&!r[r.length-1].route.index&&(d=T({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!d)return null;
1Object.assign(o,d.params),i.push({params:o,pathname:O([a,d.pathname]),pathnameBase:I(O([a,d.pathnameBase])),route:u}),"/"!==d.pathnameBase&&(a=O([a,d.pathnameBase]))}return i}function T(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),d("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function D(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return d(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function j(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function B(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function R(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function z(e,t){let n=R(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function $(e,t,n,r){let o;void 0===r&&(r=!1),"string"==typeof e?o=h(e):(o=i({},e),c(!o.pathname||!o.pathname.includes("?"),B("?","pathname","search",o)),c(!o.pathname||!o.pathname.includes("#"),B("#","pathname","hash",o)),c(!o.search||!o.search.includes("#"),B("#","search","hash",o)));let a,s=""===e||""===o.pathname,l=s?"/":o.pathname;if(null==l)a=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let d=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"==typeof e?h(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:F(r),hash:H(o)}}(o,a),u=l&&"/"!==l&&l.endsWith("/"),m=(s||"."===l)&&n.endsWith("/");return d.pathname.endsWith("/")||!u&&!m||(d.pathname+="/"),d}const O=e=>e.join("/").replace(/\/\/+/g,"/"),I=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),F=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",H=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;class U{constructor(e,t,n,r){void 0===r&&(r=!1),this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function V(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const W=["post","put","patch","delete"],q=new Set(W),Y=["get",...W],Z=new Set(Y),K=new Set([301,302,303,307,308]),J=new Set([307,308]),X={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},G={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Q={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ee=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,te=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),ne="remix-router-transitions";function re(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,n=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement,r=!n;let o;if(c(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;o=e=>({hasErrorBoundary:t(e)})}else o=te;let a,l,u,p={},h=v(e.routes,o,void 0,p),f=e.basename||"/",g=e.unstable_dataStrategy||me,x=e.unstable_patchRoutesOnMiss,E=i({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prepe
1ndBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),k=null,C=new Set,_=null,S=null,L=null,A=null!=e.hydrationData,N=b(h,e.history.location,f),M=null;if(null==N&&!x){let t=ke(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Ee(h);N=n,M={[r.id]:t}}if(N&&x&&dt(N,h,e.history.location.pathname).active&&(N=null),N)if(N.some((e=>e.route.lazy)))l=!1;else if(N.some((e=>e.route.loader)))if(E.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=e=>!e.route.loader||("function"!=typeof e.route.loader||!0!==e.route.loader.hydrate)&&(t&&void 0!==t[e.route.id]||n&&void 0!==n[e.route.id]);if(n){let e=N.findIndex((e=>void 0!==n[e.route.id]));l=N.slice(0,e+1).every(r)}else l=N.every(r)}else l=null!=e.hydrationData;else l=!0;else l=!1,N=[];let P,T={historyAction:e.history.action,location:e.history.location,matches:N,initialized:l,navigation:X,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||M,fetchers:new Map,blockers:new Map},D=s.Pop,B=!1,R=!1,z=new Map,$=null,O=!1,I=!1,F=[],H=[],W=new Map,q=0,Y=-1,Z=new Map,re=new Set,se=new Map,le=new Map,we=new Set,ge=new Map,_e=new Map,De=new Map,Oe=!1;function Ie(e,t){void 0===t&&(t={}),T=i({},T,e);let n=[],r=[];E.v7_fetcherPersist&&T.fetchers.forEach(((e,t)=>{"idle"===e.state&&(we.has(t)?r.push(t):n.push(t))})),[...C].forEach((e=>e(T,{deletedFetchers:r,unstable_viewTransitionOpts:t.viewTransitionOpts,unstable_flushSync:!0===t.flushSync}))),E.v7_fetcherPersist&&(n.forEach((e=>T.fetchers.delete(e))),r.forEach((e=>Xe(e))))}function Fe(t,n,r){var o,l;let c,{flushSync:d}=void 0===r?{}:r,u=null!=T.actionData&&null!=T.navigation.formMethod&&Me(T.navigation.formMethod)&&"loading"===T.navigation.state&&!0!==(null==(o=t.state)?void 0:o._isRedirect);c=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:u?T.actionData:null;let m=n.loaderData?be(T.loaderData,n.loaderData,n.matches||[],n.errors):T.loaderData,p=T.blockers;p.size>0&&(p=new Map(p),p.forEach(((e,t)=>p.set(t,Q))));let f,w=!0===B||null!=T.navigation.formMethod&&Me(T.navigation.formMethod)&&!0!==(null==(l=t.state)?void 0:l._isRedirect);if(a&&(h=a,a=void 0),O||D===s.Pop||(D===s.Push?e.history.push(t,t.state):D===s.Replace&&e.history.replace(t,t.state)),D===s.Pop){let e=z.get(T.location.pathname);e&&e.has(t.pathname)?f={currentLocation:T.location,nextLocation:t}:z.has(t.pathname)&&(f={currentLocation:t,nextLocation:T.location})}else if(R){let e=z.get(T.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),z.set(T.location.pathname,e)),f={currentLocation:T.location,nextLocation:t}}Ie(i({},n,{actionData:c,loaderData:m,historyAction:D,location:t,initialized:!0,navigation:X,revalidation:"idle",restoreScrollPosition:ct(t,n.matches||T.matches),preventScrollReset:w,blockers:p}),{viewTransitionOpts:f,flushSync:!0===d}),D=s.Pop,B=!1,R=!1,O=!1,I=!1,F=[],H=[]}async function He(t,n,r){P&&P.abort(),P=null,D=t,O=!0===(r&&r.startUninterruptedRevalidation),function(e,t){if(_&&L){let n=lt(e,t);_[n]=L()}}(T.location,T.matches),B=!0===(r&&r.preventScrollReset),R=!0===(r&&r.enableViewTransition);let o=a||h,l=r&&r.overrideNavigation,c=b(o,n,f),d=!0===(r&&r.flushSync),u=dt(c,o,n.pathname);if(u.active&&u.matches&&(c=u.matches),!c){let{error:e,notFoundMatches:t,route:r}=at(n.pathname);return void Fe(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:d})}if(T.initialized&&!I&&(m=T.location,p=n,m.pathname===p.pathname&&m.search===p.search&&(""===m.hash?""!==p.hash:m.hash===p.hash||""!==p.hash))&&!(r&&r.submission&&Me(r.submission.formMethod)))return void Fe(n,{matches:c},{flushSync:d});var m,p;P=new AbortController;let g,v=fe(e.history,n,P.signal,r&&r.submission);if(r&&r.pendingError)g=[xe(c).route.id,{type:w.error,error:r.pendingError}];else if(r&&r.submission&&Me(r.submission.formMethod)){let t=await async function(e,t,n,r,o,a){void 0===a&&(a={}),Ye();let i,l=function(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}(t,n);if(Ie({navigation:l},{flushSync:!0===a.flushSync}),o){let n=await ut(r,t.pathname,e.signal);if("aborted"===n.type)return{shortCircuited:!0};if("error"===n.type){let{error:e,notFoundMatches:r,route:o}=it(t.pathname,n);return{matches:r,pendingActionResult:[o.id,{type:w.error,error:e}]}}if(!n.matches){let{notFoundMatches:e,error:n,route:r}=at(t.pathname);return{matches:e,pendingActionResult:[r.id,{type:w.error,error:n}]}}r=n.matches}let c=je(r,t);
1if(c.route.action||c.route.lazy){if(i=(await We("action",e,[c],r))[0],e.signal.aborted)return{shortCircuited:!0}}else i={type:w.error,error:ke(405,{method:e.method,pathname:t.pathname,routeId:c.route.id})};if(Ae(i)){let t;return t=a&&null!=a.replace?a.replace:he(i.response.headers.get("Location"),new URL(e.url),f)===T.location.pathname+T.location.search,await Ve(e,i,{submission:n,replace:t}),{shortCircuited:!0}}if(Se(i))throw ke(400,{type:"defer-action"});if(Le(i)){let e=xe(r,c.route.id);return!0!==(a&&a.replace)&&(D=s.Push),{matches:r,pendingActionResult:[e.route.id,i]}}return{matches:r,pendingActionResult:[c.route.id,i]}}(v,n,r.submission,c,u.active,{replace:r.replace,flushSync:d});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(Le(r)&&V(r.error)&&404===r.error.status)return P=null,void Fe(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}c=t.matches||c,g=t.pendingActionResult,l=Re(n,r.submission),d=!1,u.active=!1,v=fe(e.history,v.url,v.signal)}let{shortCircuited:y,matches:x,loaderData:k,errors:C}=await async function(t,n,r,o,s,l,c,d,u,m,p){let w=s||Re(n,l),g=l||c||Be(w),v=!(O||E.v7_partialHydration&&u);if(o){if(v){let e=Ue(p);Ie(i({navigation:w},void 0!==e?{actionData:e}:{}),{flushSync:m})}let e=await ut(r,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let{error:t,notFoundMatches:r,route:o}=it(n.pathname,e);return{matches:r,loaderData:{},errors:{[o.id]:t}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=at(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}r=e.matches}let b=a||h,[y,x]=ie(e.history,T,r,g,n,E.v7_partialHydration&&!0===u,E.unstable_skipActionErrorRevalidation,I,F,H,we,se,re,b,f,p);if(st((e=>!(r&&r.some((t=>t.route.id===e)))||y&&y.some((t=>t.route.id===e)))),Y=++q,0===y.length&&0===x.length){let e=et();return Fe(n,i({matches:r,loaderData:{},errors:p&&Le(p[1])?{[p[0]]:p[1].error}:null},ye(p),e?{fetchers:new Map(T.fetchers)}:{}),{flushSync:m}),{shortCircuited:!0}}if(v){let e={};if(!o){e.navigation=w;let t=Ue(p);void 0!==t&&(e.actionData=t)}x.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=T.fetchers.get(e.key),n=ze(void 0,t?t.data:void 0);T.fetchers.set(e.key,n)})),new Map(T.fetchers)}(x)),Ie(e,{flushSync:m})}x.forEach((e=>{W.has(e.key)&&Ge(e.key),e.controller&&W.set(e.key,e.controller)}));let k=()=>x.forEach((e=>Ge(e.key)));P&&P.signal.addEventListener("abort",k);let{loaderResults:C,fetcherResults:_}=await qe(T.matches,r,y,x,t);if(t.signal.aborted)return{shortCircuited:!0};P&&P.signal.removeEventListener("abort",k),x.forEach((e=>W.delete(e.key)));let S=Ce([...C,..._]);if(S){if(S.idx>=y.length){let e=x[S.idx-y.length].key;re.add(e)}return await Ve(t,S.result,{replace:d}),{shortCircuited:!0}}let{loaderData:L,errors:A}=ve(T,r,y,C,p,x,_,ge);ge.forEach(((e,t)=>{e.subscribe((n=>{(n||e.done)&&ge.delete(t)}))})),E.v7_partialHydration&&u&&T.errors&&Object.entries(T.errors).filter((e=>{let[t]=e;return!y.some((e=>e.route.id===t))})).forEach((e=>{let[t,n]=e;A=Object.assign(A||{},{[t]:n})}));let N=et(),M=tt(Y),D=N||M||x.length>0;return i({matches:r,loaderData:L,errors:A},D?{fetchers:new Map(T.fetchers)}:{})}(v,n,c,u.active,l,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&!0===r.initialHydration,d,g);y||(P=null,Fe(n,i({matches:x||c},ye(g),{loaderData:k,errors:C})))}function Ue(e){return e&&!Le(e[1])?{[e[0]]:e[1].data}:T.actionData?0===Object.keys(T.actionData).length?null:T.actionData:void 0}async function Ve(r,o,a){let{submission:l,fetcherSubmission:d,replace:u}=void 0===a?{}:a;o.response.headers.has("X-Remix-Revalidate")&&(I=!0);let p=o.response.headers.get("Location");c(p,"Expected a Location header on the redirect Response"),p=he(p,new URL(r.url),f);let h=m(T.location,p,{_isRedirect:!0});if(n){let n=!1;if(o.response.headers.has("X-Remix-Reload-Document"))n=!0;else if(ee.test(p)){const r=e.history.createURL(p);n=r.origin!==t.location.origin||null==j(r.pathname,f)}if(n)return void(u?t.location.replace(p):t.location.assign(p))}P=null;let w=!0===u?s.Replace:s.Push,{formMethod:g,formAction:v,formEncType:b}=T.navigation;!l&&!d&&g&&v&&b&&(l=Be(T.navigation));let y=l||d;if(J.has(o.response.status)&&y&&Me(y.formMethod))await He(w,h,{submission:i({},y,{formAction:p}),preventScrollReset:B});else{let e=Re(h,l);await He(w,h,{overrideNavigation:e,fetcherSubmission:d,preventScrollReset:B})}}async function We(e,t,n,r){try{let a=await async function(e,t,n,r,o,a,s,l){let d=r.reduce(((e,t)=>e.add(t.route.id)),new Set),u=new Set,m=await e({matches:o.map((e=>{let r=d.has(e.route.id);return i({},e,{shouldLoad:r,resolve:o=>(u.add(e.route.id),r?async function(e,t,n,r,o,a,i){let s,l,d=r=>{let o,s=new Promise(((e,t)=>o=t));l=()=>o(),t.signal.addEventListener("abort",l);let c,d=o=>"function"!=typeof r?Promise.reject(new Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+n.route.id+"]")):r({request:t,params:n.params,context:i},...void 0!==o?[o]:[]);return c=a?a((e=>d(e))):(async()=>{try{return{type:"data",result:await d()}}catch(e){return{type:"error",result:e}}})(),Promise.race([c,s])};try{let a=n.route[e];if(n.route.lazy)if(a){let e,[t]=await Promise.all([d(a).catch((t=>{e=t})),ue(n.route,o,r)]);if(void 0!==e)throw e;s=t}else{if(await ue(n.route,o,r),a=n.route[e],!a){if("action"===e){let e=new URL(t.url),r=e.pathname+e.search;throw ke(405,{method:t.method,pathname:r,routeId:n.route.id})}return{type:w.data,result:void 0}}s=await d(a)}else{if(!a){let e=new URL(t.url);throw ke(404,{pathname:e.pathname+e.search})}s=await d(a)}c(void 0!==s.result,"You defined "+("action"===e?"an action":"a loader")+' for route "'+n.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(e){return{type:w.error,result:e}}finally{l&&t.signal.removeEventListener("abort",l)}return s}(t,n,e,a,s,o,l):Promise.resolve({type:w.data,result:void 0}))})})),request:n,params:o[0].params,context:l});return o.forEach((e=>c(u.has(e.route.id),'`match.resolve()` was not called for route id "'+e.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.'))),m.filter(((e,t)=>d.has(o[t].route.id)))}(g,e,t,n,r,p,o);return await Promise.all(a.map(((e,o)=>{if(function(e){return Ne(e.result)&&K.has(e.result.status)}(e)){let a=e.result;return{type:w.redirect,response:pe(a,t,n[o].route.id,r,f,E.v7_relativeSplatPath)}}return async function(e){let{result:t,type:n,status:r}=e;if(Ne(t)){let e;try{let n=t.headers.get("Content-Type");e=n&&/\bapplication\/json\b/.test(n)?null==t.body?null:await t.json():await t.text()}catch(e){return{type:w.error,error:e}}return n===w.error?{type:w.error,error:new U(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:w.data,data:e,statusCode:t.status,headers:t.headers}}return n===w.error?{type:w.error,error:t,statusCode:V(t)?t.status:r}:function(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}(t)?{type:w.deferred,deferredData:t,statusCode:null==(o=t.init)?void 0:o.status,headers:(null==(a=t.init)?void 0:a.headers)&&new Headers(t.init.headers)}:{type:w.data,data:t,statusCode:r};var o,a}(e)})))}catch(e){return n.map((()=>({type:w.error,error:e})))}}async function qe(t,n,r,o,a){let[i,...s]=await Promise.all([r.length?We("loader",a,r,n):[],...o.map((t=>t.matches&&t.match&&t.controller?We("loader",fe(e.history,t.path,t.controller.signal),[t.match],t.matches).then((e=>e[0])):Promise.resolve({type:w.error,error:ke(404,{pathname:t.path})})))]);return await Promise.all([Pe(t,r,i,i.map((()=>a.signal)),!1,T.loaderData),Pe(t,o.map((e=>e.match)),s,o.map((e=>e.controller?e.controller.signal:null)),!0)]),{loaderResults:i,fetcherResults:s}}function Ye(){I=!0,F.push(...st()),se.forEach(((e,t)=>{W.has(t)&&(H.push(t),Ge(t))}))}function Ze(e,t,n){void 0===n&&(n={}),T.fetchers.set(e,t),Ie({fetchers:new Map(T.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function Ke(e,t,n,r){void 0===r&&(r={});let o=xe(T.matches,t);Xe(e),Ie({errors:{[o.route.id]:n},fetchers:new Map(T.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function Je(e){return E.v7_fetcherPersist&&(le.set(e,(le.get(e)||0)+1),we.has(e)&&we.delete(e)),T.fetchers.get(e)||G}function Xe(e){let t=T.fetchers.get(e);!W.has(e)||t&&"loading"===t.state&&Z.has(e)||Ge(e),se.delete(e),Z.delete(e),re.delete(e),we.delete(e),T.fetchers.delete(e)}function Ge(e){let t=W.get(e);c(t,"Expected fetch controller: "+e),t.abort(),W.delete(e)}function Qe(e){for(let t of e){let e=$e(Je(t).data);T.fetchers.set(t,e)}}function et(){let e=[],t=!1;for(let n of re){let r=T.fetchers.get(n);c(r,"Expected fetcher: "+n),"loading"===r.state&&(re.delete(n),e.push(n),t=!0)}return Qe(e),t}function tt(e){let t=[];for(let[n,r]of Z)if(r<e){let e=T.fetchers.get(n);c(e,"Expected fetcher: "+n),"loading"===e.state&&(Ge(n),Z.delete(n),t.push(n))}return Qe(t),t.length>0}function nt(e){T.blockers.delete(e),_e.delete(e)}function rt(e,t){let n=T.blockers.get(e)||Q;c("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state);let r=new Map(T.blockers);r.set(e,t),Ie({blockers:r})}function ot(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(0===_e.size)return;_e.size>1&&d(!1,"A router only supports one blocker at a time");let o=Array.from(_e.entries()),[a,i]=o[o.length-1],s=T.blockers.get(a);return s&&"proceeding"===s.state?void 0:i({currentLocation:t,nextLocation:n,historyAction:r})?a:void 0}function at(e){let t=ke(404,{pathname:e}),n=a||h,{matches:r,route:o}=Ee(n);return st(),{notFoundMatches:r,route:o,error:t}}function it(e,t){let n=t.partialMatches,r=n[n.length-1].route;return{notFoundMatches:n,route:r,error:ke(400,{type:"route-discovery",routeId:r.id,pathname:e,message:null!=t.error&&"message"in t.error?t.error:String(t.error)})}}function st(e){let t=[];return ge.forEach(((n,r)=>{e&&!e(r)||(n.cancel(),t.push(r),ge.delete(r))})),t}function lt(e,t){return S&&S(e,t.map((e=>function(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}(e,T.loaderData))))||e.key}function ct(e,t){if(_){let n=lt(e,t),r=_[n];if("number"==typeof r)return r}return null}function dt(e,t,n){if(x){if(!e)return{active:!0,matches:y(t,n,f,!0)||[]};{let r=e[e.length-1].route;if(r.path&&("*"===r.path||r.path.endsWith("/*")))return{active:!0,matches:y(t,n,f,!0)}}}return{active:!1,matches:null}}async function ut(e,t,n){let r=e,i=r.length>0?r[r.length-1].route:null;for(;;){let e=null==a,s=a||h;try{await ce(x,t,r,s,p,o,De,n)}catch(e){return{type:"error",error:e,partialMatches:r}}
1finally{e&&(h=[...h])}if(n.aborted)return{type:"aborted"};let l=b(s,t,f),c=!1;if(l){let e=l[l.length-1].route;if(e.index)return{type:"success",matches:l};if(e.path&&e.path.length>0){if("*"!==e.path)return{type:"success",matches:l};c=!0}}let d=y(s,t,f,!0);if(!d||r.map((e=>e.route.id)).join("-")===d.map((e=>e.route.id)).join("-"))return{type:"success",matches:c?l:null};if(r=d,i=r[r.length-1].route,"*"===i.path)return{type:"success",matches:r}}}return u={get basename(){return f},get future(){return E},get state(){return T},get routes(){return h},get window(){return t},initialize:function(){if(k=e.history.listen((t=>{let{action:n,location:r,delta:o}=t;if(Oe)return void(Oe=!1);d(0===_e.size||null!=o,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let a=ot({currentLocation:T.location,nextLocation:r,historyAction:n});return a&&null!=o?(Oe=!0,e.history.go(-1*o),void rt(a,{state:"blocked",location:r,proceed(){rt(a,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),e.history.go(o)},reset(){let e=new Map(T.blockers);e.set(a,Q),Ie({blockers:e})}})):He(n,r)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(ne);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(e){}}(t,z);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(ne,JSON.stringify(n))}catch(e){d(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}(t,z);t.addEventListener("pagehide",e),$=()=>t.removeEventListener("pagehide",e)}return T.initialized||He(s.Pop,T.location,{initialHydration:!0}),u},subscribe:function(e){return C.add(e),()=>C.delete(e)},enableScrollRestoration:function(e,t,n){if(_=e,L=t,S=n||null,!A&&T.navigation===X){A=!0;let e=ct(T.location,T.matches);null!=e&&Ie({restoreScrollPosition:e})}return()=>{_=null,L=null,S=null}},navigate:async function t(n,r){if("number"==typeof n)return void e.history.go(n);let o=oe(T.location,T.matches,f,E.v7_prependBasename,n,E.v7_relativeSplatPath,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:a,submission:l,error:c}=ae(E.v7_normalizeFormMethod,!1,o,r),d=T.location,u=m(T.location,a,r&&r.state);u=i({},u,e.history.encodeLocation(u));let p=r&&null!=r.replace?r.replace:void 0,h=s.Push;!0===p?h=s.Replace:!1===p||null!=l&&Me(l.formMethod)&&l.formAction===T.location.pathname+T.location.search&&(h=s.Replace);let w=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,g=!0===(r&&r.unstable_flushSync),v=ot({currentLocation:d,nextLocation:u,historyAction:h});if(!v)return await He(h,u,{submission:l,pendingError:c,preventScrollReset:w,replace:r&&r.replace,enableViewTransition:r&&r.unstable_viewTransition,flushSync:g});rt(v,{state:"blocked",location:u,proceed(){rt(v,{state:"proceeding",proceed:void 0,reset:void 0,location:u}),t(n,r)},reset(){let e=new Map(T.blockers);e.set(v,Q),Ie({blockers:e})}})},fetch:function(t,n,o,i){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");W.has(t)&&Ge(t);let s=!0===(i&&i.unstable_flushSync),l=a||h,d=oe(T.location,T.matches,f,E.v7_prependBasename,o,E.v7_relativeSplatPath,n,null==i?void 0:i.relative),u=b(l,d,f),m=dt(u,l,d);if(m.active&&m.matches&&(u=m.matches),!u)return void Ke(t,n,ke(404,{pathname:d}),{flushSync:s});let{path:p,submission:w,error:g}=ae(E.v7_normalizeFormMethod,!0,d,i);if(g)return void Ke(t,n,g,{flushSync:s});let v=je(u,p);B=!0===(i&&i.preventScrollReset),w&&Me(w.formMethod)?async function(t,n,r,o,i,s,l,d){function u(e){if(!e.route.action&&!e.route.lazy){let e=ke(405,{method:d.formMethod,pathname:r,routeId:n});return Ke(t,n,e,{flushSync:l}),!0}return!1}if(Ye(),se.delete(t),!s&&u(o))return;let m=T.fetchers.get(t);Ze(t,function(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}(d,m),{flushSync:l});let p=new AbortController,w=fe(e.history,r,p.signal,d);if(s){let e=await ut(i,r,w.signal);if("aborted"===e.type)return;if("error"===e.type){let{error:o}=it(r,e);return void Ke(t,n,o,{flushSync:l})}if(!e.matches)return void Ke(t,n,ke(404,{pathname:r}),{flushSync:l});if(u(o=je(i=e.matches,r)))return}W.set(t,p);let g=q,v=(await We("action",w,[o],i))[0];if(w.signal.aborted)return void(W.get(t)===p&&W.delete(t));if(E.v7_fetcherPersist&&we.has(t)){if(Ae(v)||Le(v))return void Ze(t,$e(void 0))}else{if(Ae(v))return W.delete(t),Y>g?void Ze(t,$e(void 0)):(re.add(t),Ze(t,ze(d)),Ve(w,v,{fetcherSubmission:d}));if(Le(v))return void Ke(t,n,v.error)}if(Se(v))throw ke(400,{type:"defer-action"});let y=T.navigation.location||T.location,x=fe(e.history,y,p.signal),k=a||h,C="idle"!==T.navigation.state?b(k,T.navigation.location,f):T.matches;c(C,"Didn't find any matches after fetcher action");let _=++q;Z.set(t,_);let S=ze(d,v.data);T.fetchers.set(t,S);let[L,A]=ie(e.history,T,C,d,y,!1,E.unstable_skipActionErrorRevalidation,I,F,H,we,se,re,k,f,[o.route.id,v]);A.filter((e=>
1e.key!==t)).forEach((e=>{let t=e.key,n=T.fetchers.get(t),r=ze(void 0,n?n.data:void 0);T.fetchers.set(t,r),W.has(t)&&Ge(t),e.controller&&W.set(t,e.controller)})),Ie({fetchers:new Map(T.fetchers)});let N=()=>A.forEach((e=>Ge(e.key)));p.signal.addEventListener("abort",N);let{loaderResults:M,fetcherResults:j}=await qe(T.matches,C,L,A,x);if(p.signal.aborted)return;p.signal.removeEventListener("abort",N),Z.delete(t),W.delete(t),A.forEach((e=>W.delete(e.key)));let B=Ce([...M,...j]);if(B){if(B.idx>=L.length){let e=A[B.idx-L.length].key;re.add(e)}return Ve(x,B.result)}let{loaderData:R,errors:z}=ve(T,T.matches,L,M,void 0,A,j,ge);if(T.fetchers.has(t)){let e=$e(v.data);T.fetchers.set(t,e)}tt(_),"loading"===T.navigation.state&&_>Y?(c(D,"Expected pending action"),P&&P.abort(),Fe(T.navigation.location,{matches:C,loaderData:R,errors:z,fetchers:new Map(T.fetchers)})):(Ie({errors:z,loaderData:be(T.loaderData,R,C,z),fetchers:new Map(T.fetchers)}),I=!1)}(t,n,p,v,u,m.active,s,w):(se.set(t,{routeId:n,path:p}),async function(t,n,r,o,a,i,s,l){let d=T.fetchers.get(t);Ze(t,ze(l,d?d.data:void 0),{flushSync:s});let u=new AbortController,m=fe(e.history,r,u.signal);if(i){let e=await ut(a,r,m.signal);if("aborted"===e.type)return;if("error"===e.type){let{error:o}=it(r,e);return void Ke(t,n,o,{flushSync:s})}if(!e.matches)return void Ke(t,n,ke(404,{pathname:r}),{flushSync:s});o=je(a=e.matches,r)}W.set(t,u);let p=q,h=(await We("loader",m,[o],a))[0];if(Se(h)&&(h=await Te(h,m.signal,!0)||h),W.get(t)===u&&W.delete(t),!m.signal.aborted){if(!we.has(t))return Ae(h)?Y>p?void Ze(t,$e(void 0)):(re.add(t),void await Ve(m,h)):void(Le(h)?Ke(t,n,h.error):(c(!Se(h),"Unhandled fetcher deferred data"),Ze(t,$e(h.data))));Ze(t,$e(void 0))}}(t,n,p,v,u,m.active,s,w))},revalidate:function(){Ye(),Ie({revalidation:"loading"}),"submitting"!==T.navigation.state&&("idle"!==T.navigation.state?He(D||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation}):He(T.historyAction,T.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Je,deleteFetcher:function(e){if(E.v7_fetcherPersist){let t=(le.get(e)||0)-1;t<=0?(le.delete(e),we.add(e)):le.set(e,t)}else Xe(e);Ie({fetchers:new Map(T.fetchers)})},dispose:function(){k&&k(),$&&$(),C.clear(),P&&P.abort(),T.fetchers.forEach(((e,t)=>Xe(t))),T.blockers.forEach(((e,t)=>nt(t)))},getBlocker:function(e,t){let n=T.blockers.get(e)||Q;return _e.get(e)!==t&&_e.set(e,t),n},deleteBlocker:nt,patchRoutes:function(e,t){let n=null==a;de(e,t,a||h,p,o),n&&(h=[...h],Ie({}))},_internalFetchControllers:W,_internalActiveDeferreds:ge,_internalSetRoutes:function(e){p={},a=v(e,o,void 0,p)}},u}function oe(e,t,n,r,o,a,i,s){let l,c;if(i){l=[];for(let e of t)if(l.push(e),e.route.id===i){c=e;break}}else l=t,c=t[t.length-1];let d=$(o||".",z(l,a),j(e.pathname,n)||e.pathname,"path"===s);return null==o&&(d.search=e.search,d.hash=e.hash),null!=o&&""!==o&&"."!==o||!c||!c.route.index||De(d.search)||(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&"/"!==n&&(d.pathname="/"===d.pathname?n:O([n,d.pathname])),p(d)}function ae(e,t,n,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:n};if(r.formMethod&&(o=r.formMethod,!Z.has(o.toLowerCase())))return{path:n,error:ke(405,{method:r.formMethod})};var o;let a,i,s=()=>({path:n,error:ke(400,{type:"invalid-body"})}),l=r.formMethod||"get",d=e?l.toUpperCase():l.toLowerCase(),u=_e(n);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!Me(d))return s();let e="string"==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce(((e,t)=>{let[n,r]=t;return""+e+n+"="+r+"\n"}),""):String(r.body);return{path:n,submission:{formMethod:d,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!Me(d))return s();try{let e="string"==typeof r.body?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:d,formAction:u,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return s()}}}if(c("function"==typeof FormData,"FormData is not available in this environment"),r.formData)a=we(r.formData),i=r.formData;else if(r.body instanceof FormData)a=we(r.body),i=r.body;else if(r.body instanceof URLSearchParams)a=r.body,i=ge(a);else if(null==r.body)a=new URLSearchParams,i=new FormData;else try{a=new URLSearchParams(r.body),i=ge(a)}catch(e){return s()}let m={formMethod:d,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(Me(m.formMethod))return{path:n,submission:m};let f=h(n);return t&&f.search&&De(f.search)&&a.append("index",""),f.search="?"+a,{path:p(f),submission:m}}function ie(e,t,n,r,o,a,s,l,c,d,u,m,p,h,f,w){let g=w?Le(w[1])?w[1].error:w[1].data:void 0,v=e.createURL(t.location),y=e.createURL(o),x=w&&Le(w[1])?w[0]:void 0,E=x?function(e,t){let n=e;if(t){let r=e.findIndex((e=>e.route.id===t));r>=0&&(n=e.slice(0,r))}return n}(n,x):n,k=w?w[1].statusCode:void 0,C=s&&k&&k>=400,_=E.filter(((e,n)=>{let{route:o}=e;if(o.lazy)return!0;
1if(null==o.loader)return!1;if(a)return!("function"==typeof o.loader&&!o.loader.hydrate&&(void 0!==t.loaderData[o.id]||t.errors&&void 0!==t.errors[o.id]));if(function(e,t,n){let r=!t||n.route.id!==t.route.id,o=void 0===e[n.route.id];return r||o}(t.loaderData,t.matches[n],e)||c.some((t=>t===e.route.id)))return!0;let s=t.matches[n],d=e;return le(e,i({currentUrl:v,currentParams:s.params,nextUrl:y,nextParams:d.params},r,{actionResult:g,unstable_actionStatus:k,defaultShouldRevalidate:!C&&(l||v.pathname+v.search===y.pathname+y.search||v.search!==y.search||se(s,d))}))})),S=[];return m.forEach(((e,o)=>{if(a||!n.some((t=>t.route.id===e.routeId))||u.has(o))return;let s=b(h,e.path,f);if(!s)return void S.push({key:o,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let c=t.fetchers.get(o),m=je(s,e.path),w=!1;w=!p.has(o)&&(!!d.includes(o)||(c&&"idle"!==c.state&&void 0===c.data?l:le(m,i({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:n[n.length-1].params},r,{actionResult:g,unstable_actionStatus:k,defaultShouldRevalidate:!C&&l})))),w&&S.push({key:o,routeId:e.routeId,path:e.path,matches:s,match:m,controller:new AbortController})})),[_,S]}function se(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function le(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}async function ce(e,t,n,r,o,a,i,s){let l=[t,...n.map((e=>e.route.id))].join("-");try{let d=i.get(l);d||(d=e({path:t,matches:n,patch:(e,t)=>{s.aborted||de(e,t,r,o,a)}}),i.set(l,d)),d&&"object"==typeof(c=d)&&null!=c&&"then"in c&&await d}finally{i.delete(l)}var c}function de(e,t,n,r,o){if(e){var a;let n=r[e];c(n,"No route found to patch children into: routeId = "+e);let i=v(t,o,[e,"patch",String((null==(a=n.children)?void 0:a.length)||"0")],r);n.children?n.children.push(...i):n.children=i}else{let e=v(t,o,["patch",String(n.length||"0")],r);n.push(...e)}}async function ue(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];c(o,"No route found in manifest");let a={};for(let e in r){let t=void 0!==o[e]&&"hasErrorBoundary"!==e;d(!t,'Route "'+o.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||g.has(e)||(a[e]=r[e])}Object.assign(o,a),Object.assign(o,i({},t(o),{lazy:void 0}))}function me(e){return Promise.all(e.matches.map((e=>e.resolve())))}function pe(e,t,n,r,o,a){let i=e.headers.get("Location");if(c(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!ee.test(i)){let s=r.slice(0,r.findIndex((e=>e.route.id===n))+1);i=oe(new URL(t.url),s,o,!0,i,a),e.headers.set("Location",i)}return e}function he(e,t,n){if(ee.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),a=null!=j(o.pathname,n);if(o.origin===t.origin&&a)return o.pathname+o.search+o.hash}return e}function fe(e,t,n,r){let o=e.createURL(_e(t)).toString(),a={signal:n};if(r&&Me(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),"application/json"===t?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):"text/plain"===t?a.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?a.body=we(r.formData):a.body=r.formData}return new Request(o,a)}function we(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"==typeof r?r:r.name);return t}function ge(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function ve(e,t,n,r,o,a,s,l){let{loaderData:d,errors:u}=function(e,t,n,r,o,a){let i,s={},l=null,d=!1,u={},m=r&&Le(r[1])?r[1].error:void 0;return n.forEach(((n,r)=>{let p=t[r].route.id;if(c(!Ae(n),"Cannot handle redirect results in processLoaderData"),Le(n)){let t=n.error;if(void 0!==m&&(t=m,m=void 0),l=l||{},a)l[p]=t;else{let n=xe(e,p);null==l[n.route.id]&&(l[n.route.id]=t)}s[p]=void 0,d||(d=!0,i=V(n.error)?n.error.status:500),n.headers&&(u[p]=n.headers)}else Se(n)?(o.set(p,n.deferredData),s[p]=n.deferredData.data,null==n.statusCode||200===n.statusCode||d||(i=n.statusCode),n.headers&&(u[p]=n.headers)):(s[p]=n.data,n.statusCode&&200!==n.statusCode&&!d&&(i=n.statusCode),n.headers&&(u[p]=n.headers))})),void 0!==m&&r&&(l={[r[0]]:m},s[r[0]]=void 0),{loaderData:s,errors:l,statusCode:i||200,loaderHeaders:u}}(t,n,r,o,l,!1);for(let t=0;t<a.length;t++){let{key:n,match:r,controller:o}=a[t];c(void 0!==s&&void 0!==s[t],"Did not find corresponding fetcher result");let l=s[t];if(!o||!o.signal.aborted)if(Le(l)){let t=xe(e.matches,null==r?void 0:r.route.id);u&&u[t.route.id]||(u=i({},u,{[t.route.id]:l.error})),e.fetchers.delete(n)}else if(Ae(l))c(!1,"Unhandled fetcher revalidation redirect");else if(Se(l))c(!1,"Unhandled fetcher deferred data");else{let t=$e(l.data);e.fetchers.set(n,t)}}return{loaderData:d,errors:u}}function be(e,t,n,r){let o=i({},t);for(let a of n){let n=a.route.id;if(t.hasOwnProperty(n)?void 0!==t[n]&&(o[n]=t[n]):void 0!==e[n]&&a.route.loader&&(o[n]=e[n]),r&&r.hasOwnProperty(n))break}return o}function ye(e){return e?Le(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function xe(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function Ee(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ke(e,t){let{pathname:n,routeId:r,method:o,type:a,message:i}=void 0===t?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";
1return 400===e?(s="Bad Request","route-discovery"===a?l='Unable to match URL "'+n+'" - the `children()` function for route `'+r+"` threw the following error:\n"+i:o&&n&&r?l="You made a "+o+' request to "'+n+'" but did not provide a `loader` for route "'+r+'", so there is no way to handle the request.':"defer-action"===a?l="defer() is not supported in actions":"invalid-body"===a&&(l="Unable to encode submission body")):403===e?(s="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):404===e?(s="Not Found",l='No route matches URL "'+n+'"'):405===e&&(s="Method Not Allowed",o&&n&&r?l="You made a "+o.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+r+'", so there is no way to handle the request.':o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new U(e||500,s,new Error(l),!0)}function Ce(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Ae(n))return{result:n,idx:t}}}function _e(e){return p(i({},"string"==typeof e?h(e):e,{hash:""}))}function Se(e){return e.type===w.deferred}function Le(e){return e.type===w.error}function Ae(e){return(e&&e.type)===w.redirect}function Ne(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function Me(e){return q.has(e.toLowerCase())}async function Pe(e,t,n,r,o,a){for(let i=0;i<n.length;i++){let s=n[i],l=t[i];if(!l)continue;let d=e.find((e=>e.route.id===l.route.id)),u=null!=d&&!se(d,l)&&void 0!==(a&&a[l.route.id]);if(Se(s)&&(o||u)){let e=r[i];c(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await Te(s,e,o).then((e=>{e&&(n[i]=e||n[i])}))}}}async function Te(e,t,n){if(void 0===n&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:w.data,data:e.deferredData.unwrappedData}}catch(e){return{type:w.error,error:e}}return{type:w.data,data:e.deferredData.data}}}function De(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function je(e,t){let n="string"==typeof t?h(t).search:t.search;if(e[e.length-1].route.index&&De(n||""))return e[e.length-1];let r=R(e);return r[r.length-1]}function Be(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:a,json:i}=e;if(t&&n&&r)return null!=o?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o}:null!=a?{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}:void 0}function Re(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function ze(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function $e(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Oe(){return Oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oe.apply(this,arguments)}Symbol("deferred");const Ie=e.createContext(null),Fe=e.createContext(null),He=e.createContext(null),Ue=e.createContext(null),Ve=e.createContext({outlet:null,matches:[],isDataRoute:!1}),We=e.createContext(null);function qe(){return null!=e.useContext(Ue)}function Ye(){return qe()||c(!1),e.useContext(Ue).location}function Ze(t){e.useContext(He).static||e.useLayoutEffect(t)}function Ke(){let{isDataRoute:t}=e.useContext(Ve);return t?function(){let{router:t}=function(t){let n=e.useContext(Ie);return n||c(!1),n}(nt.UseNavigateStable),n=ot(rt.UseNavigateStable),r=e.useRef(!1);return Ze((()=>{r.current=!0})),e.useCallback((function(e,o){void 0===o&&(o={}),r.current&&("number"==typeof e?t.navigate(e):t.navigate(e,Oe({fromRouteId:n},o)))}),[t,n])}():function(){qe()||c(!1);let t=e.useContext(Ie),{basename:n,future:r,navigator:o}=e.useContext(He),{matches:a}=e.useContext(Ve),{pathname:i}=Ye(),s=JSON.stringify(z(a,r.v7_relativeSplatPath)),l=e.useRef(!1);return Ze((()=>{l.current=!0})),e.useCallback((function(e,r){if(void 0===r&&(r={}),!l.current)return;if("number"==typeof e)return void o.go(e);let a=$(e,JSON.parse(s),i,"path"===r.relative);null==t&&"/"!==n&&(a.pathname="/"===a.pathname?n:O([n,a.pathname])),(r.replace?o.replace:o.push)(a,r.state,r)}),[n,o,s,i,t])}()}function Je(t,n){let{relative:r}=void 0===n?{}:n,{future:o}=e.useContext(He),{matches:a}=e.useContext(Ve),{pathname:i}=Ye(),s=JSON.stringify(z(a,o.v7_relativeSplatPath));return e.useMemo((()=>$(t,JSON.parse(s),i,"path"===r)),[t,s,i,r])}function Xe(t,n,r,o){qe()||c(!1);let{navigator:a}=e.useContext(He),{matches:i}=e.useContext(Ve),l=i[i.length-1],d=l?l.params:{},u=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let m,p=Ye();if(n){var f;let e="string"==typeof n?h(n):n;"/"===u||(null==(f=e.pathname)?void 0:f.startsWith(u))||c(!1),m=e}else m=p;let w=m.pathname||"/",g=w;if("/"!==u){let e=u.replace(/^\//,"").split("/");g="/"+w.replace(/^\//,"").split("/").slice(e.length).join("/")}let v=b(t,{pathname:g}),y=function(t,n,r,o){var a;if(void 0===n&&(n=[]),void 0===r&&(r=null),void 0===o&&(o=null),null==t){var i;if(null==(i=r)||!i.errors)return null;t=r.matches}let s=t,l=null==(a=r)?void 0:a.errors;if(null!=l){let e=s.findIndex((e=>e.route.id&&void 0!==(null==l?void 0:l[e.route.id])));e>=0||c(!1),s=s.slice(0,Math.min(s.length,e+1))}let d=!1,u=-1;if(r&&o&&o.v7_partialHydration)for(let e=0;e<s.length;e++){let t=s[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:n}=r,o=t.route.loader&&void 0===e[t.route.id]&&(!n||void 0===n[t.route.id]);if(t.route.lazy||o){d=!0,s=u>=0?s.slice(0,u+1):[s[0]];break}}}return s.reduceRight(((t,o,a)=>{let i,c=!1,m=null,p=null;var h;r&&(i=l&&o.route.id?l[o.route.id]:void 0,m=o.route.errorElement||Qe,d&&(u<0&&0===a?(at[h="route-fallback"]||(at[h]=!0),c=!0,p=null):u===a&&(c=!0,p=o.route.hydrateFallbackElement||null)));let f=n.concat(s.slice(0,a+1)),w=()=>{let n;return n=i?m:c?p:o.route.Component?e.createElement(o.route.Component,null):o.route.element?o.route.element:t,e.createElement(tt,{match:o,routeC
1ontext:{outlet:t,matches:f,isDataRoute:null!=r},children:n})};return r&&(o.route.ErrorBoundary||o.route.errorElement||0===a)?e.createElement(et,{location:r.location,revalidation:r.revalidation,component:m,error:i,children:w(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):w()}),null)}(v&&v.map((e=>Object.assign({},e,{params:Object.assign({},d,e.params),pathname:O([u,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:O([u,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),i,r,o);return n&&y?e.createElement(Ue.Provider,{value:{location:Oe({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:s.Pop}},y):y}function Ge(){let t=function(){var t;let n=e.useContext(We),r=function(t){let n=e.useContext(Fe);return n||c(!1),n}(rt.UseRouteError),o=ot(rt.UseRouteError);return void 0!==n?n:null==(t=r.errors)?void 0:t[o]}(),n=V(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},n),r?e.createElement("pre",{style:o},r):null,null)}const Qe=e.createElement(Ge,null);class et extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?e.createElement(Ve.Provider,{value:this.props.routeContext},e.createElement(We.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function tt(t){let{routeContext:n,match:r,children:o}=t,a=e.useContext(Ie);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),e.createElement(Ve.Provider,{value:n},o)}var nt=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(nt||{}),rt=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(rt||{});function ot(t){let n=function(t){let n=e.useContext(Ve);return n||c(!1),n}(),r=n.matches[n.matches.length-1];return r.route.id||c(!1),r.route.id}const at={};function it(e){c(!1)}function st(t){let{basename:n="/",children:r=null,location:o,navigationType:a=s.Pop,navigator:i,static:l=!1,future:d}=t;qe()&&c(!1);let u=n.replace(/^\/*/,"/"),m=e.useMemo((()=>({basename:u,navigator:i,static:l,future:Oe({v7_relativeSplatPath:!1},d)})),[u,d,i,l]);"string"==typeof o&&(o=h(o));let{pathname:p="/",search:f="",hash:w="",state:g=null,key:v="default"}=o,b=e.useMemo((()=>{let e=j(p,u);return null==e?null:{location:{pathname:e,search:f,hash:w,state:g,key:v},navigationType:a}}),[u,p,f,w,g,v,a]);return null==b?null:e.createElement(He.Provider,{value:m},e.createElement(Ue.Provider,{children:r,value:b}))}function lt(t){let n={hasErrorBoundary:null!=t.ErrorBoundary||null!=t.errorElement};return t.Component&&Object.assign(n,{element:e.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(n,{hydrateFallbackElement:e.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(n,{errorElement:e.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),n}e.startTransition,new Promise((()=>{})),e.Component;const ct=window.ReactDOM;function dt(){return dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dt.apply(this,arguments)}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const ut=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}function mt(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=dt({},t,{errors:pt(t.errors)})),t}function pt(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&"RouteErrorResponse"===r.__type)n[e]=new U(r.
1status,r.statusText,r.data,!0===r.internal);else if(r&&"Error"===r.__type){if(r.__subType){let t=window[r.__subType];if("function"==typeof t)try{let o=new t(r.message);o.stack="",n[e]=o}catch(e){}}if(null==n[e]){let t=new Error(r.message);t.stack="",n[e]=t}}else n[e]=r;return n}const ht=e.createContext({isTransitioning:!1}),ft=e.createContext(new Map),wt=e.startTransition,gt=ct.flushSync;function vt(e){gt?gt(e):e()}e.useId;class bt{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}}function yt(e){let{routes:t,future:n,state:r}=e;return Xe(t,void 0,r,n)}const xt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Et=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,kt=e.forwardRef((function(t,n){let r,{onClick:o,relative:a,reloadDocument:i,replace:s,state:l,target:d,to:u,preventScrollReset:m,unstable_viewTransition:h}=t,f=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,ut),{basename:w}=e.useContext(He),g=!1;if("string"==typeof u&&Et.test(u)&&(r=u,xt))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=j(t.pathname,w);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:g=!0}catch(e){}let v=function(t,n){let{relative:r}=void 0===n?{}:n;qe()||c(!1);let{basename:o,navigator:a}=e.useContext(He),{hash:i,pathname:s,search:l}=Je(t,{relative:r}),d=s;return"/"!==o&&(d="/"===s?o:O([o,s])),a.createHref({pathname:d,search:l,hash:i})}(u,{relative:a}),b=function(t,n){let{target:r,replace:o,state:a,preventScrollReset:i,relative:s,unstable_viewTransition:l}=void 0===n?{}:n,c=Ke(),d=Ye(),u=Je(t,{relative:s});return e.useCallback((e=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(e,r)){e.preventDefault();let n=void 0!==o?o:p(d)===p(u);c(t,{replace:n,state:a,preventScrollReset:i,relative:s,unstable_viewTransition:l})}}),[d,c,u,o,a,r,t,i,s,l])}(u,{replace:s,state:l,target:d,preventScrollReset:m,relative:a,unstable_viewTransition:h});return e.createElement("a",dt({},f,{href:r||v,onClick:g||i?o:function(e){o&&o(e),e.defaultPrevented||b(e)},ref:n,target:d}))}));var Ct,_t;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ct||(Ct={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(_t||(_t={}));const St=()=>(0,e.createElement)(kt,{to:"/",className:"inline-flex no-underline p-1.5 rounded-md items-center text-gray-500 hover:text-indigo-600 hover:bg-gray-100 focus:shadow-none transition-all duration-200"},(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2"},(0,e.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))),Lt=({docId:n})=>{const r=(0,a.useSelect)((e=>e("wedocs/docs").getDoc(parseInt(n))),[]);return(0,e.createElement)(kt,{to:r.link,target:"_blank",className:"inline-flex no-underline items-center text-gray-400 hover:text-indigo-600 focus:shadow-none p-1 transition-colors",title:(0,t.__)("View Doc","wedocs-pro")},(0,e.createElement)("svg",{width:"19",height:"14",viewBox:"0 0 19 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M11.6995 7.14388C11.6995 8.52459 10.5802 9.64388 9.1995 9.64388C7.81879 9.64388 6.6995 8.52459 6.6995 7.14388C6.6995 5.76317 7.81879 4.64388 9.1995 4.64388C10.5802 4.64388 11.6995 5.76317 11.6995 7.14388Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.createElement)("path",{d:"M1.24805 7.14385C2.30994 3.76294 5.46851 1.31055 9.19987 1.31055C12.9312 1.31055 16.0898 3.76298 17.1517 7.14391C16.0898 10.5248 12.9312 12.9772 9.19989 12.9772C5.46851 12.9772 2.30992 10.5248 1.24805 7.14385Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})))},At=()=>(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2"},(0,e.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 8V4m0 0h4M4 4l5 5m11-5h-4m4 0v4m0-4l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})),Nt=()=>(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2"},(0,e.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4m0 5H4m5 0L3 3m12 6h5m-5 0V4m0 5l6-6M9 15v5m0-5H4m5 0l-6 6m12-6h5m-5 0v5m0-5l6 6"})),Mt=({docId:n})=>{const o=`wedocs_feedback_${n}`,[a,i]=(0,r.useState)(null),s=weDocsPro_Front_Vars?.general_settings?.helpful;if((0,r.useEffect)((()=>{const e=localStorage.getItem(o);e&&i(e)}),[n]),"off"===s)return null;const l=e=>{a||(i(e),localStorage.setItem(o,e),wp.apiFetch({path:`/wp/v2/docs/${n}/helpfullness`,method:"POST",data:{type:e}}).catch((()=>{})))};return(0,e.createElement)("div",{className:"flex-shrink-0 relative bg-white rounded-b-[10px]"},(0,e.createElement)("div",{className:"absolute inset-x-0 top-0 h-4 -translate-y-full bg-gradient-to-t from-black/[0.07] to-transparent pointer-events-none"}),(0,e.createElement)("div",{className:"px-6 py-3"},a?(0,e.createElement)("div",{className:"flex items-center justify-center gap-2 py-1 rounded-lg bg-green-50 text-green-700 text-sm font-medium"},(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,e.createElement)("polyline",{points:"20 6 9 17 4 12"})),(0,t.__)("You already gave your feedback — thank you!","wedocs-pro")):(0,e.createElement)("div",{className:"flex items-center justify-between gap-3"},(0,e.createElement)("p",{className:"text-sm text-gray-500 m-0"},(0,t.__)("Did this answer your question?","wedocs-pro")),(0,e.createElement)("div",{className:"flex items-center gap-2 flex-shrink-0"},(0,e.createElement)("button",{onClick:()=>l("positive"),className:"group w-8 h-8 flex items-center justify-center rounded-full border border-gray-200 hover:border-green-400 hover:bg-green-50 transition-all duration-200",title:(0,t.__)("Yes","wedocs-pro")},(0,e.createElement)("span",{className:"text-base leading-none transition-transform duration-200 group-hover:scale-125"},"😊")),(0,e.createElement)("button",{onClick:()=>l("negative"),className:"group w-8 h-8 flex items-center justify-center rounded-full border border-gray-200 hover:border-red-400 hover:bg-red-50 transition-all duration-200",title:(0,t.__)("No","wedocs-pro")},(0,e.createElement)("span",{className:"text-base leading-none transition-transform duration-200 group-hover:scale-125"},"😞"))))))},Pt=({docId:t,isExpanded:n,setIsExpanded:r})=>{const o=(0,a.useSelect)((e=>e("wedocs/docs").getDoc(parseInt(t))),[]);return(0,e.createElement)("div",{className:"absolute inset-0 z-10 bg-white rounded-[10px] flex flex-col"},(0,e.createElement)("div",{className:"flex items-center justify-between px-5 py-3 bg-white/80 backdrop-blur-sm border-b border-white/20 sticky top-0 z-10 flex-shrink-0"},(0,e.createElement)(St,null),(0,e.createElement)("div",{className:"flex items-center gap-2"},r&&(0,e.createElement)("button",{onClick:()=>r(!n),className:"p-1.5 rounded-md text-gray-500 hover:text-indigo-600 hover:bg-gray-100 transition-all duration-300 ease-in-out",title:n?"Compress":"Expand"},n?(0,e.createElement)(Nt,null):(0,e.createElement)(At,null)),(0,e.createElement)(Lt,{docId:t}))),(0,e.createElement)("div",{className:"flex-1 overflow-y-auto px-6 py-4 doc-content-scroll"},(0,e.createElement)("div",{className:"doc-heading text-gray-900 font-medium text-lg mb-3",dangerouslySetInnerHTML:{__html:o?.title?.rendered}}),(0,e.createElement)("article",{className:"prose break-words",dangerouslySetInnerHTML:{__html:o?.content?.rendered}})),(0,e.createElement)(Mt,{docId:t}))};var Tt=n(8465),Dt=n.n(Tt);function jt({title:t,titleId:n,...r},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":n},r),t?e.createElement("title",{id:n},t):null,e.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const Bt=e.forwardRef(jt),Rt=({frontendPreview:n,previewColors:i,turnstileSiteKey:s})=>{const{sendBtnBg:l,sendBtnFont:c}=i,[d,u]=(0,r.useState)({}),[m,p]=(0,r.useState)(""),[h,f]=(0,r.useState)(!1),[w,g]=(0,r.useState)(""),[v,b]=(0,r.useState)(""),[y,x]=(0,r.useState)(!1),[E,k]=(0,r.useState)(!1),[C,_]=(0,r.useState)("..."),[S,L]=(0,r.useState)({name:!1,email:!1,body:!1}),A=weDocsPro_Front_Vars.userCapabilities.upload_files||!1;const{messaging_success_title:N,messaging_success_text:M}=(0,a.useSelect)((e=>e("wedocs/settings").getAssistantSettingsOption("message")),[]),P=e=>/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,5}
1)+$/.test(e),T=(e,t,n)=>{const r=e.target.value;t(r),L({...S,[n]:"email"===n?!Boolean(P(r)):0===r?.length})},D=e=>{u({src:e?.url,name:e?.filename})};return(0,r.useEffect)((()=>{n&&"undefined"!==s&&Boolean(s)&&!Boolean(h)&&(x(!0),turnstile.render("#wedocs-turnstile",{sitekey:s,callback:e=>{_(e),x(!1)},"error-callback":e=>{"invalid_sitekey"===e&&_("")}}))}),[s,h]),(0,e.createElement)(e.Fragment,null,Boolean(E)?(0,e.createElement)("div",{className:"success-message px-6 pb-5 h-96 flex items-center justify-center"},(0,e.createElement)("div",{className:"text-center"},(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"145",height:"66",fill:"none",className:"mx-auto mb-6"},(0,e.createElement)("path",{d:"M86.01 13.544L144.745.043l-27.923 42.665L86.01 13.544z",fill:"#ffc700"}),(0,e.createElement)("path",{d:"M97.343 24.404l4.963 15.769V28.098L144.745.043 97.343 24.404z",fill:"#f90"}),(0,e.createElement)("path",{d:"M107.928 34.302l-5.623 5.871V28.084l5.623 6.218z",fill:"#c96000"}),(0,e.createElement)("path",{d:"M96.506 47.499a.36.36 0 0 1-.242-.098c-.138-.132-.138-.351-.006-.489l1.186-1.243c.132-.138.351-.15.489-.017s.15.345.017.489l-1.197 1.255c-.069.069-.155.104-.248.104zM60.144 65.597c-.19 0-.34-.15-.345-.34s.15-.351.34-.351c1.105-.023 2.251-.115 3.408-.27.19-.023.363.109.386.294s-.109.363-.294.386a30.35 30.35 0 0 1-3.483.276zm-3.454-.144h-.034a25.17 25.17 0 0 1-3.448-.61.35.35 0 0 1-.253-.42.35.35 0 0 1 .42-.253 23.67 23.67 0 0 0 3.356.593c.19.023.328.19.305.38-.023.184-.173.311-.345.311zm10.298-.76c-.155 0-.299-.109-.334-.265a.34.34 0 0 1 .259-.415l3.304-.921a.344.344 0 1 1 .207.656l-3.356.932a.45.45 0 0 1-.081.012zm-16.975-.927c-.046 0-.092-.006-.132-.029a25.31 25.31 0 0 1-3.131-1.577c-.161-.098-.219-.311-.121-.472s.311-.219.472-.121a24.29 24.29 0 0 0 3.039 1.531.34.34 0 0 1 .184.449c-.052.138-.178.219-.311.219zm23.555-1.174c-.138 0-.265-.081-.322-.219-.069-.178.017-.38.196-.449l.604-.248 2.556-1.111c.173-.081.38-.006.46.173.081.173.006.38-.173.461l-2.579 1.122-.61.248c-.046.017-.092.023-.132.023zm-29.489-2.343a.33.33 0 0 1-.213-.075 28.81 28.81 0 0 1-2.412-2.124l-3.431-.15c-.19-.017-.334-.178-.317-.368s.178-.334.368-.317l3.177.144c.132-.132.351-.127.483.006a28.69 28.69 0 0 0 2.556 2.268.34.34 0 0 1 .058.484c-.069.086-.167.132-.271.132zm35.769-.535a.34.34 0 0 1-.305-.184c-.086-.167-.023-.38.15-.466l3.01-1.658c.167-.098.374-.04.472.127s.04.374-.127.472l-3.045 1.675c-.046.023-.098.035-.155.035zm-34.889-1.761c-.178 0-.334-.138-.345-.322-.011-.19.132-.357.322-.368l3.402-.386a.35.35 0 0 1 .397.288.35.35 0 0 1-.288.397l-3.465.391h-.023zm-10.344-.409c-.017 0-.029 0-.046-.006l-3.431-.564c-.19-.035-.311-.219-.276-.403.035-.19.219-.311.403-.276l3.396.558c.19.023.322.201.294.391-.023.173-.173.299-.34.299zm17.159-.691a.35.35 0 0 1-.334-.253c-.052-.184.058-.374.242-.426 1.157-.311 2.239-.691 3.212-1.122.173-.075.38 0 .455.173s0 .38-.173.455c-1.002.449-2.118.835-3.31 1.157a.3.3 0 0 1-.092.017zm-23.952-.599c-.029 0-.052-.006-.081-.011l-2.372-.61-.984-.276c-.184-.052-.288-.242-.236-.426s.242-.288.426-.236l.979.27 2.354.604c.184.046.299.23.253.415-.04.161-.184.27-.34.27zm57.994-.023c-.115 0-.224-.058-.288-.155a.35.35 0 0 1 .098-.478l2.826-1.957c.155-.115.368-.081.484.075s.081.368-.075.484L86 56.174c-.052.035-.121.058-.184.058zm-46.62-.858c-.104 0-.201-.046-.271-.132l-.886-1.174-1.122-1.687c-.098-.161-.052-.374.115-.478.161-.098.374-.052.478.115l1.099 1.646.863 1.145a.34.34 0 0 1-.058.483c-.069.058-.144.081-.219.081zM21.173 54.36a.39.39 0 0 1-.109-.017l-3.281-1.123a.35.35 0 0 1-.207-.443c.063-.178.265-.271.443-.207l3.264 1.117c.184.058.282.253.224.438a.36.36 0 0 1-.334.236zm36.84-.391c-.104 0-.207-.046-.276-.132-.115-.15-.086-.368.063-.483.944-.725 1.698-1.543 2.251-2.435.098-.161.311-.213.478-.109.161.098.213.311.109.478-.593.961-1.41 1.842-2.418 2.619a.37.37 0 0 1-.207.063zM91.4 52.15c-.098 0-.201-.046-.27-.127a.34.34 0 0 1 .052-.483l2.602-2.245c.144-.127.357-.121.489.023.127.144.121.357-.023.489l-2.631 2.268a.36.36 0 0 1-.219.075zm-76.736-.121c-.04 0-.086-.006-.127-.023l-3.218-1.284c-.178-.075-.259-.276-.19-.449.075-.178.276-.259.449-.19l3.206 1.278c.179.069.265.271.196.449-.046.138-.178.219-.317.219zm20.93-2.538c-.132 0-.259-.075-.317-.207-.489-1.111-.875-2.228-1.151-3.321-.046-.184.063-.374.253-.42.184-.046.374.063.42.253.265 1.053.639 2.13 1.111 3.206.075.173 0 .38-.178.455a.29.29 0 0 1-.138.035zM8.263 49.41a.4.4 0 0 1-.138-.029L4.953 48a.35.35 0 0 1-.178-.455.35.35 0 0 1 .455-.178l3.166 1.376a.35.35 0 0 1 .184.455c-.052.132-.178.213-.317.213zm53.245-1.197c-.017 0-.035 0-.058-.006-.19-.029-.317-.207-.288-.397.104-.627.15-1.312.15-2.032l-.017-.725-.04-.61c-.017-.19.127-.357.317-.374s.357.127.374.317l.04.639.017.754a13.21 13.21 0 0 1-.161 2.141c-.017.173-.167.294-.334.294zm-27.526-5.405a.35.35 0 0 1-.345-.334l-.006-.368a13.24 13.24 0 0 1 .075-1.439 11.5
17 11.57 0 0 1 .322-1.715.34.34 0 0 1 .42-.242c.184.052.294.236.248.42a11.03 11.03 0 0 0-.299 1.612l-.075 1.364.006.351c.006.19-.144.351-.334.357zm26.962-1.428c-.15 0-.282-.092-.328-.242a13.96 13.96 0 0 0-1.382-3.068c-.098-.161-.046-.374.115-.472s.374-.046.472.115c.599.99 1.088 2.072 1.451 3.223.058.184-.046.374-.224.432a.63.63 0 0 1-.104.012zM35.76 36.24a.33.33 0 0 1-.19-.058c-.161-.104-.207-.316-.104-.478a10.96 10.96 0 0 1 2.395-2.625c.15-.115.368-.092.483.058s.092.368-.058.483c-.875.685-1.629 1.514-2.245 2.458-.058.104-.173.161-.282.161zm21.597-.685a.34.34 0 0 1-.236-.092c-.426-.397-.886-.766-1.37-1.094a12.87 12.87 0 0 0-1.382-.817.35.35 0 0 1-.15-.466.35.35 0 0 1 .466-.15 12.77 12.77 0 0 1 1.456.864 12.22 12.22 0 0 1 1.45 1.163c.138.132.15.351.017.489-.069.069-.161.104-.253.104zm-6.044-3.218c-.034 0-.063-.006-.098-.012l-.863-.236c-.84-.213-1.669-.374-2.464-.489-.19-.029-.322-.201-.294-.391s.201-.322.391-.294a24.13 24.13 0 0 1 2.538.506l.886.242c.184.052.288.248.236.426a.35.35 0 0 1-.334.248zm-10.212-.282c-.144 0-.276-.092-.328-.23-.063-.178.035-.374.213-.437a11.21 11.21 0 0 1 1.157-.334 13.48 13.48 0 0 1 2.325-.317c.19-.012.351.138.363.328s-.138.351-.328.363c-.771.04-1.52.138-2.21.299l-1.082.311a.36.36 0 0 1-.109.017zM1.92 46.624a.4.4 0 0 1-.138-.029l-1.577-.702c-.173-.081-.253-.282-.173-.455s.282-.253.455-.173l1.577.702c.173.075.253.282.173.455-.058.127-.184.201-.317.201z",fill:"#6366f1"})),(0,e.createElement)("h2",{className:"text-3xl font-medium text-gray-900 mb-2.5"},N||(0,t.__)("Thanks","wedocs-pro")),(0,e.createElement)("p",{className:"text-gray-500 text-sm leading-6"},M?(0,e.createElement)("span",{className:"block"},M):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"block"},(0,t.__)("Your message has been sent!","wedocs-pro")),(0,e.createElement)("span",{className:"block"},(0,t.__)("We will reply to you as soon as possible!","wedocs-pro")))))):(0,e.createElement)("div",{className:"h-full flex flex-col"},(0,e.createElement)("div",{className:"flex-1 overflow-y-auto px-6 xxs:px-4 pt-5 xs:pt-3 space-y-5 xs:space-y-2"},(0,e.createElement)("div",{className:"relative"},(0,e.createElement)("input",{type:"text",placeholder:(0,t.__)("Full Name","wedocs-pro"),disabled:!n,className:`${n?"!py-2":"!py-1"} ${S?.name?"!border-red-500 focus:ring-red-500 focus:border-red-500":"!border-gray-300 focus:ring-blue-500 focus:border-blue-500"} !border w-full text-base !text-gray-500 leading-6 !px-3.5 !rounded-md !bg-white`,value:m,onChange:e=>T(e,p,"name")}),S?.name&&(0,e.createElement)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3"},(0,e.createElement)(Bt,{className:"h-5 w-5 text-red-500","aria-hidden":"true"}))),(0,e.createElement)("div",{className:"relative"},(0,e.createElement)("input",{type:"email",placeholder:(0,t.__)("Email","wedocs-pro"),disabled:!n,className:`${n?"!py-2":"!py-1"} ${S?.email?"!border-red-500 focus:ring-red-500 focus:border-red-500":"!border-gray-300 focus:ring-blue-500 focus:border-blue-500"} !border w-full text-base !text-gray-500 leading-6 !px-3.5 !py-1 !rounded-md !bg-white`,value:w,onChange:e=>T(e,g,"email")}),S?.email&&(0,e.createElement)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3"},(0,e.createElement)(Bt,{className:"h-5 w-5 text-red-500","aria-hidden":"true"}))),(0,e.createElement)("div",{className:"relative"},(0,e.createElement)("textarea",{rows:"7",disabled:!n,className:`${n?"!py-2":"!py-1"} ${S?.body?"!border-red-500 focus:ring-red-500 focus:border-red-500":"!border-gray-300 focus:ring-blue-500 focus:border-blue-500"} w-full text-base text-gray-500 leading-6 !px-3.5 !py-2 !rounded-md xs:!h-[88px] !bg-white`,placeholder:(0,t.__)("Message","wedocs-pro"),value:v,onChange:e=>T(e,b,"body")}),S?.body&&(0,e.createElement)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3"},(0,e.createElement)(Bt,{className:"h-5 w-5 text-red-500","aria-hidden":"true"}))),Boolean(A)&&(0,e.createElement)("div",{className:"attachment-contents xs:mt-1"},(0,e.createElement)("div",{className:(Object.keys(d).length>0?"flex items-center":"inline-block overflow-hidden")+" attachment-field flex items-center text-indigo-500 text-sm font-medium mb-1 cursor-pointer relative"},(0,e.createElement)("div",{className:"flex items-center",onClick:()=>{!function({callback:e,title:n=(0,t.__)("Select or upload media.","wedocs-pro"),selectMultiple:r=!1,fileType:o="image",dimension:a={}}){const i=wp.media({title:n,library:{type:o},multiple:r});i.open(),i.on("select",(()=>{const n=i.state().get("selection").first().toJSON();if(n?.type===o){if("image"===n?.type){const e=n.width,r=n.height;if(a?.width<e&&a.height<r)return void Dt().fire({title:(0,t.__)("Upload Failed","wedocs-pro"),text:(0,t.__)("The image dimensions are too big. The maximum size is 20x20 pixels.","wedocs-pro"),icon:"error",toast:!0,position:"bottom-end",showConfirmButton:!1,timer:3e3})}e(n)}else Dt().fire({title:(0,t.__)("Upload Failed","wedocs-pro"),text:(0,t.__)("The attachment type is not matched.","wedocs-pro"),icon:"error",toast:!0,position:"bottom-end",showConfirmButton:!1,timer:3e3})}))}({fileType:"application",selectMultiple:!1,callback:D})}},(0,t.__)("Attachment","wedocs-pro"),(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"18",fill:"none",className:"ml-3"},(0,e.createElement)("path",{stroke:"#9ca3af",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M10.609 4.771l-5.488 5.488c-.651.651-.651 1.706 0 2.357s1.706.651 2.357 0l5.345-5.488c1.302-1.302 1.302-3.412 0-4.714s-3.412-1.302-4.714 0L2.764 7.902a5 5 0 0 0 7.071 7.071l5.214-5.202"}))),Object.keys(d).length>0&&(0,e.createElement)("div",{id:"file-chosen",className:"flex items-center space-x-2.5 ml-auto"},(0,e.createElement)("span",{id:"file-chosen",className:"text-sm leading-5 font-medium text-gray-500"},o(d?.name,15)),(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,className:"w-4 h-4 stroke-gray-500 ml-2 relative z-50 cursor-pointer",onClick:()=>{u({})}},(0,e.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})))),(0,e.createElement)("label",{className:"text-sm text-gray-500"}
1,(0,t.__)("(Supported formats: Docs/PDF)","wedocs-pro"))),n&&s&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{id:"wedocs-turnstile",className:"wedocs-turnstile","data-sitekey":s}),!C&&(0,e.createElement)("div",{id:"turnstile-error",className:"text-sm text-red-500"},(0,t.__)("Cloudflare turnstile site key not valid.","wedocs-pro")))),(0,e.createElement)("div",{className:"flex-shrink-0 px-6 xxs:px-4 pb-2.5 xxs:pb-1 pt-3"},(0,e.createElement)("button",{type:"submit",disabled:!n||h||y,className:(n?"disabled:opacity-30":"")+" bg-indigo-600 hover:bg-indigo-800 focus:bg-indigo-600 border-indigo-600 text-white rounded-md w-full text-base capitalize font-medium py-2.5 cursor-pointer no-underline xs:py-2",onClick:()=>{if(""===m)return void L({...S,name:!0});if(!Boolean(P(w)))return void L({...S,email:!0});if(""===v)return void L({...S,body:!0});const e={name:m,from:w,token:C,message:v,attachment:{...d}};f(!0),(0,a.dispatch)("wedocs/docs").sendMessage(e).then((e=>{Boolean(e?.success)&&(b(""),p(""),g(""),k(e?.success),u({}),setTimeout((()=>{k(!1),f(!1)}),3e3))})).catch((e=>{console.log(e)}))},style:{color:`rgba(${c?.r}, ${c?.g}, ${c?.b}, ${c?.a})`,background:`rgba(${l?.r}, ${l?.g}, ${l?.b}, ${l?.a})`}},(0,t.__)(h?"Sending...":"Send","wedocs-pro")))))},zt=window.wp.apiFetch;var $t=n.n(zt);const Ot=({text:t,typingSpeed:n=25,children:o})=>{const[a,i]=(0,r.useState)(""),[s,l]=(0,r.useState)(0),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{if(t&&s<t.length){const e=setTimeout((()=>{i((e=>e+t[s])),l((e=>e+1))}),n);return()=>clearTimeout(e)}d(!0)}),[s,t,n]),(0,e.createElement)("span",null,a,c&&o)},It=n.p+"images/guest-avatar.5b164b46.jpg",Ft=({frontendPreview:n})=>{const o=(0,r.useRef)(null),[a,i]=(0,r.useState)([]),[s,l]=(0,r.useState)(""),[c,d]=(0,r.useState)(""),[u,m]=(0,r.useState)(""),[p,h]=(0,r.useState)(!1),f=(0,r.useRef)(null);let w=weDocsPro_Front_Vars?.currentUserId||null;(0,r.useEffect)((()=>{w&&$t()({path:"/wp/v2/users/"+w}).then((e=>d(e?.avatar_urls?.[96]||e?.avatar_urls?.[24]||""))).catch((()=>{}))}),[w]),(0,r.useEffect)((()=>{$t()({path:"/wp/v2/settings"}).then((e=>{e?.site_icon_url?m(e.site_icon_url):e?.site_icon&&$t()({path:"/wp/v2/media/"+e.site_icon}).then((e=>{m(e?.media_details?.sizes?.thumbnail?.source_url||e?.source_url||"")})).catch((()=>{}))})).catch((()=>{}))}),[]);const g=()=>u?(0,e.createElement)("img",{src:u,className:"flex-shrink-0 w-7 h-7 rounded-full object-cover shadow-sm",alt:(0,t.__)("Bot","wedocs-pro")}):(0,e.createElement)("div",{className:"ai-icon flex-shrink-0 w-7 h-7 rounded-full bg-[#FDA92A] flex items-center justify-center shadow-sm"},(0,e.createElement)("svg",{width:"18",height:"17",fill:"none"},(0,e.createElement)("path",{fill:"#fff",fillRule:"evenodd",d:"M3.295 3.38a1.33 1.33 0 0 1 .541 2.544v3.941l.215-.022c.974-4.101 4.804-6.463 9.381-6.463s8.406 2.361 9.381 6.461a4.78 4.78 0 0 1 .215.019V5.923a1.33 1.33 0 0 1 .542-2.543 1.33 1.33 0 0 1 .542 2.543v4.218c.707.324 1.184.913 1.233 1.827a67.2 67.2 0 0 1 .004.739l-.001.999c-.074 1.382-1.12 2.025-2.466 2.129-.845 4.297-4.755 6.784-9.45 6.784s-8.605-2.489-9.45-6.788c-1.345-.126-2.389-.879-2.461-2.258-.003-.052-.004-.814-.004-.866l.004-.606c.05-.914.526-1.552 1.234-1.914V5.923a1.33 1.33 0 0 1 .542-2.543zm17.635 8.384c.007.138.011 1.096.011 1.236l-.012 1.221c-.208 3.96-3.486 6.288-7.498 6.288s-7.289-2.328-7.498-6.288c-.007-.133-.01-1.086-.01-1.221l.011-1.236c.216-3.954 3.49-6.273 7.498-6.273s7.282 2.319 7.498 6.273zm-2.729-.127c0-.782-.632-1.415-1.415-1.415s-1.415.633-1.415 1.415.632 1.415 1.415 1.415 1.415-.632 1.415-1.415zm-6.716 0c0 .781-.633 1.415-1.415 1.415s-1.415-.633-1.415-1.415.633-1.415 1.415-1.415 1.415.633 1.415 1.415z"}))),v=async e=>{if(!e||""===e.trim()||!n)return;h(!0),l(""),i((t=>[...t,{text:e,image:c,isMe:!0}]));const t=await b(e);let r="";t.post_links&&t.post_links.length>0&&(r+='<br/><ul style="margin: 0; list-style: none;">',t.post_links.forEach(((e,t)=>{e?.title&&(r+='<li style="margin-bottom: 6px;"><sup style="margin-right: 8px;">['+(t+1)+']</sup><a href="'+e?.permalink+'" target="_blank" rel="noopener noreferrer">'+e?.title+"</a></li>")})),r+="</ul>"),h(!1),i((e=>[...e,{text:t.chat,readMore:r,isMe:!1}]))},b=async e=>""===e?"":await $t()({path:"/wp/v2/docs/settings/ai-integration/chat",data:{prompt:e},method:"POST"}).then((e=>e)).catch((()=>({chat:(0,t.__)("Sorry, I am not able to understand you. Please try again.","wedocs-pro"),post_links:[]})));return(0,r.useEffect)((()=>{o.current&&(o.current.scrollTop=o.current.scrollHeight)}),[a,p]),(0,e.createElement)("div",{className:"h-full flex flex-col"},(0,e.createElement)("div",{className:"flex flex-row flex-1 overflow-hidden bg-white"},(0,e.createElement)("div",{className:"w-full px-5 xxs:px-3 flex flex-col h-full"},(0,e.createElement)("div",{className:"flex flex-col mt-5 flex-1 overflow-auto space-y-3 pr-1",ref:o},a.map(((n,o)=>{let a="dynamicId"+o;return(0,e.createElement)(r.Fragment,{key:o},(0,e.createElement)("div",{className:"flex items-end gap-2 "+(n.isMe?"justify-end":"justify-start")},!n.isMe&&(0,e.createElement)(g,null),(0,e.createElement)("div",{id:a,ref:f,className:"max-w-[78%] text-sm leading-relaxed "+(n.isMe?"bg-indigo-500 text-white px-4 py-2.5 rounded-2xl rounded-br-sm shadow-sm":"bg-gray-100 text-gray-700 px-4 py-2.5 rounded-2xl rounded-bl-sm")},n.isMe?(0,e.createElement)("span",{dangerouslySetInnerHTML:{__html:n.text}}):(0,e.createElement)(Ot,{text:n.text},(0,e.createElement)("div",{dangerouslySetInnerHTML:{__html:n.readMore}}))),n.isMe&&(0,e.createElement)("div",{className:"flex-shrink-0"},(0,e.createElement)("img",{src:n.image||It,className:"w-7 h-7 rounded-full object-cover",alt:(0,t.__)("User Avatar","wedocs-pro"),onError:e=>{e.target.src=It}}))))})),(0,e.createElement)("style",null,"\n              @keyframes wedocsTyping {\n                0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }\n                30% { transform: translateY(-5px); opacity: 1; }\n              }\n            "),p&&(0,e.createElement)("div",{className:"flex items-end gap-2 justify-start"},(0,e.createElement)(g,null),(0,e.createElement)("div",{className:"bg-gray-100 px-4 py-3 rounded-2xl rounded-bl-sm flex items-center gap-1.5"},(0,e.createElement)("span",{className:"w-2 h-2 rounded-full bg-gray-400",style:{animation:"wedocsTyping 1.2s ease-in-out infinite",animationDelay:"0s"}}),(0,e.createElement)("span",{className:"w-2 h-2 rounded-full bg-gray-400",style:{animation:"wedocsTyping 1.2s ease-in-out infinite",animationDelay:"0.2s"}}),(0,e.createElement)("span",{className:"w-2 h-2 rounded-full bg-gray-400",style:{animation:"wedocsTyping 1.2s ease-in-out infinite",animationDelay:"0.4s"}})))),(0,e.createElement)("div",{className:"py-3 xxs:pb-2 flex-shrink-0"},(0,e.createElement)("div",{className:`flex items-center gap-2 rounded-2xl border ${n?"border-gray-200 shadow-[0_2px_12px_rgba(0,0,0,0.08)]":"border-gray-200"} bg-white px-4 py-2 transition-shadow focus-within:shadow-[0_2px_16px_rgba(99,102,241,0.15)] focus-within:border-indigo-300`}
1,(0,e.createElement)("input",{className:"flex-1 border-none !outline-none !shadow-none !ring-0 bg-transparent text-sm text-gray-700 placeholder-gray-400 !p-0 !m-0 !border-0 focus:!ring-0 focus:!border-0 focus:!outline-none",value:s,autoFocus:n,onChange:e=>l(e.currentTarget.value),onKeyUp:e=>{var t;"Enter"===(t=e).key&&v(t.currentTarget.value)},type:"text",readOnly:!n,placeholder:(0,t.__)("Ask me anything...","wedocs-pro")}),(0,e.createElement)("button",{onClick:()=>v(s),disabled:!n||!s.trim()||p,className:"flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-xl bg-indigo-500 hover:bg-indigo-600 disabled:opacity-40 disabled:cursor-not-allowed transition-all duration-150 cursor-pointer"},(0,e.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none"},(0,e.createElement)("path",{d:"M22 2L11 13",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.createElement)("path",{d:"M22 2L15 22L11 13L2 9L22 2Z",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"}))))))))},Ht=()=>(0,e.createElement)("div",{className:"animate-pulse flex flex-col flex-1 overflow-hidden"},(0,e.createElement)("div",{className:"flex-1 px-6 py-4 overflow-hidden"},(0,e.createElement)("div",{className:"h-5 w-3/4 bg-gray-200 rounded mb-5"}),(0,e.createElement)("div",{className:"space-y-2.5"},(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-5/6 bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-4/5 bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-3/4 bg-gray-100 rounded"})),(0,e.createElement)("div",{className:"mt-6 space-y-2.5"},(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-5/6 bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-2/3 bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-4/5 bg-gray-100 rounded"})),(0,e.createElement)("div",{className:"mt-6 space-y-2.5"},(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-3/4 bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}))),(0,e.createElement)("div",{className:"flex-shrink-0 border-t border-gray-100 px-6 py-3"},(0,e.createElement)("div",{className:"h-4 w-52 bg-gray-200 rounded"}))),Ut=({docId:n})=>{const[o,a]=(0,r.useState)(null),i=weDocsPro_Front_Vars?.general_settings?.helpful;if("off"===i)return null;const s=e=>{o||(a(e),wp.apiFetch({path:`/wp/v2/docs/${n}/helpfullness`,method:"POST",data:{type:e}}).catch((()=>{})))};return(0,e.createElement)("div",{className:"flex-shrink-0 border-t border-gray-100 px-6 py-3 bg-white rounded-b-[10px]"},o?(0,e.createElement)("div",{className:"flex items-center justify-center gap-2 py-1 rounded-lg bg-green-50 text-green-700 text-sm font-medium"},(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,e.createElement)("polyline",{points:"20 6 9 17 4 12"})),(0,t.__)("Thanks for your feedback","wedocs-pro")):(0,e.createElement)("div",{className:"flex items-center justify-between gap-3"},(0,e.createElement)("p",{className:"text-sm text-gray-500 m-0"},(0,t.__)("Did this answer your question?","wedocs-pro")),(0,e.createElement)("div",{className:"flex items-center gap-2 flex-shrink-0"},(0,e.createElement)("button",{onClick:()=>s("positive"),className:"group w-8 h-8 flex items-center justify-center rounded-full border border-gray-200 hover:border-green-400 hover:bg-green-50 transition-all duration-200",title:(0,t.__)("Yes","wedocs-pro")},(0,e.createElement)("span",{className:"text-base leading-none transition-transform duration-200 group-hover:scale-125"},"😊")),(0,e.createElement)("button",{onClick:()=>s("negative"),className:"group w-8 h-8 flex items-center justify-center rounded-full border border-gray-200 hover:border-red-400 hover:bg-red-50 transition-all duration-200",title:(0,t.__)("No","wedocs-pro")},(0,e.createElement)("span",{className:"text-base leading-none transition-transform duration-200 group-hover:scale-125"},"😞")))))},Vt=()=>(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2"},(0,e.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 8V4m0 0h4M4 4l5 5m11-5h-4m4 0v4m0-4l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})),Wt=()=>(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2"},(0,e.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4m0 5H4m5 0L3 3m12 6h5m-5 0V4m0 5l6-6M9 15v5m0-5H4m5 0l-6 6m12-6h5m-5 0v5m0-5l6 6"})),qt=()=>(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2"},(0,e.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})),Yt=({doc:n,setShowDocContent:r,isExpanded:o,setIsExpanded:a})=>(0,e.createElement)("div",{className:"absolute inset-0 z-10 bg-white rounded-[10px] flex flex-col"},(0,e.createElement)("div",{className:"flex items-center justify-between px-5 py-3 bg-white/80 backdrop-blur-sm border-b border-white/20 sticky top-0 z-10 flex-shrink-0"},(0,e.createElement)("button",{onClick:()=>r(!1),className:"p-1.5 rounded-md text-gray-500 hover:text-indigo-600 hover:bg-gray-100 focus:shadow-none transition-all duration-200",title:(0,t.__)("Close","wedocs-pro")},(0,e.createElement)(qt,null)),(0,e.createElement)("div",{className:"flex items-center gap-2"},a&&(0,e.createElement)("button",{onClick:()=>a(!o),className:"p-1.5 rounded-md text-gray-500 hover:text-indigo-600 hover:bg-gray-100 transition-all duration-300 ease-in-out",title:o?"Compress":"Expand"},o?(0,e.createElement)(Wt,null):(0,e.createElement)(Vt,null)),n?.link&&(0,e.createElement)("a",{href:n.link,target:"_blank",rel:"noreferrer",className:"inline-flex no-underline items-center text-gray-400 hover:text-indigo-600 focus:shadow-none p-1 transition-colors",title:(0,t.__)("View Doc","wedocs-pro")},(0,e.createElement)("svg",{width:"19",height:"14",viewBox:"0 0 19 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M11.6995 7.14388C11.6995 8.52459 10.5802 9.64388 9.1995 9.64388C7.81879 9.64388 6.6995 8.52459 6.6995 7.14388C6.6995 5.76317 7.81879 4.64388 9.1995 4.64388C10.5802 4.64388 11.6995 5.76317 11.6995 7.14388Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.createElement)("path",{d:"M1.24805 7.14385C2.30994 3.76294 5.46851 1.31055 9.19987 1.31055C12.9312 1.31055 16.0898 3.76298 17.1517 7.14391C16.0898 10.5248 12.9312 12.9772 9.19989 12.9772C5.46851 12.9772 2.30992 10.5248 1.24805 7.14385Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))))),n?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"flex-1 overflow-y-auto px-6 py-4 doc-content-scroll"},(0,e.createElement)("div",{className:"doc-heading text-gray-900 font-medium mb-3 "+(o?"text-xl":"text-lg"),dangerouslySetInnerHTML:{__html:n?.title?.rendered}}),(0,e.createElement)("article",{className:"prose break-words "+(o?"prose-lg":""),dangerouslySetInnerHTML:{__html:n?.content?.rendered}})),(0,e.createElement)(Ut,{docId:n?.id})):(0,e.createElement)(Ht,null)),Zt=({docId:n,classes:i,settings:s,previewColors:l,showDocContent:c,frontendPreview:d,setShowDocContent:u})=>{const{id:m}=function(){let{matches:t}=e.useContext(Ve),n=t[t.length-1];return n?n.params:{}}(),[p,h]=(0,r.useState)(null),[f,w]=(0,r.useState)(!1);(0,r.useEffect)((()=>
1{if(!d)return;const e=()=>{const e=window.innerWidth<=575,t=document.getElementById("wpadminbar")?.offsetHeight||0,n=e?144:160,r=e?16:32,o=window.innerHeight-t-n-r-8;h(Math.min(772,o))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[d]),(0,r.useEffect)((()=>{d&&w(Boolean(m)||Boolean(c))}),[m,c,d]);const g=[(0,t.__)("How to Install","wedocs-pro"),(0,t.__)("Activating & Deactivating WPUF Modules","wedocs-pro")],v=(0,a.useSelect)((e=>e("wedocs/docs").getHelpfulDocs()),[]),[b,y]=(0,r.useState)([...v]),{widgetBg:x,activeTabBg:E,activeTabFont:k,inactiveTabBg:C,inactiveTabFont:_,tabTitleFont:S,tabDescriptionFont:L,breadcrumbColor:A}=l,N=(0,r.useRef)({color:`rgba(${_?.r}, ${_?.g}, ${_?.b}, ${_?.a})`}),M=(0,r.useRef)({color:`rgba(${k?.r}, ${k?.g}, ${k?.b}, ${k?.a})`,background:`rgba(${E?.r}, ${E?.g}, ${E?.b}, ${E?.a})`}),P=(0,r.useRef)({fill:`rgba(${_?.r}, ${_?.g}, ${_?.b}, ${_?.a})`}),T=(0,r.useRef)({fill:`rgba(${k?.r}, ${k?.g}, ${k?.b}, ${k?.a})`}),[D,j]=(0,r.useState)(s?.placement?.order?.[0]||"explore");let B=[{key:"integrate_ai",name:(0,t.__)("A.I. chat","wedocs-pro"),enable:"off"!==s?.integrate_ai?.ai_enabled},{key:"explore",name:(0,t.__)("Explore","wedocs-pro"),enable:"off"!==s?.explore?.explore_enable},{key:"message",name:(0,t.__)("Messaging","wedocs-pro"),enable:"off"!==s?.message?.messaging_enable}];const[R,z]=(0,r.useState)([...B]);(0,r.useEffect)((()=>{"integrate_ai"===D&&"off"===s?.integrate_ai?.ai_enabled&&("on"===s?.explore?.explore_enable?j("explore"):"on"===s?.message?.messaging_enable&&j("message")),"message"===D&&"off"===s?.message?.messaging_enable&&("on"===s?.integrate_ai?.ai_enabled?j("integrate_ai"):"on"===s?.explore?.explore_enable&&j("explore")),"explore"===D&&"off"===s?.explore?.explore_enable&&("on"===s?.integrate_ai?.ai_enabled?j("integrate_ai"):"on"===s?.message?.messaging_enable&&j("message"))}),[s]),(0,r.useEffect)((()=>{if(s?.placement?.order?.length>0){const e=R?.sort(((e,t)=>s?.placement?.order?.indexOf(e?.key)-s?.placement?.order?.indexOf(t?.key)));z([...e])}}),[s?.placement?.order]),(0,r.useEffect)((()=>{const e={...M.current,background:`rgba(${E?.r}, ${E?.g}, ${E?.b}, ${E?.a})`};M.current=e}),[E]),(0,r.useEffect)((()=>{const e={...M.current,color:`rgba(${k?.r}, ${k?.g}, ${k?.b}, ${k?.a})`},t={...T.current,fill:`rgba(${k?.r}, ${k?.g}, ${k?.b}, ${k?.a})`};M.current=e,T.current=t}),[k]),(0,r.useEffect)((()=>{const e={...N.current,color:`rgba(${_?.r}, ${_?.g}, ${_?.b}, ${_?.a})`},t={...P.current,fill:`rgba(${_?.r}, ${_?.g}, ${_?.b}, ${_?.a})`};N.current=e,P.current=t}),[_]);const[$,O]=(0,r.useState)(""),I=(e,t=!1)=>{O(t?"":e.target.value)},F=(0,a.useSelect)((e=>e("wedocs/docs").getDocs()),[]),H=Boolean($)?F?.filter((e=>e?.title?.rendered?.toLowerCase().includes($.toLowerCase()))):b?.filter((e=>e?.title?.rendered?.toLowerCase().includes($.toLowerCase())));return(0,r.useEffect)((()=>{if("selected"===s?.explore?.show_content)y([...s?.explore?.selected_articles]);else{if(v?.length>10)return void y([...v]);const e=F?.filter((e=>0!==parseInt(e.parent))),t=e?.filter((t=>e?.find((e=>e?.id===t?.parent))));if(0===v?.length)return void y([...t?.filter(((e,t)=>t<10))]);const n=[],r=v?.map((e=>e?.id)),o=10-v.length;t?.filter(((e,t)=>{n.length>=o||!r?.includes(e?.id)&&n?.push(e)})),y([...v,...n])}}),[s?.explore?.show_content,v,F]),(0,e.createElement)("div",{className:`${i||""} ${d?f?"w-[580px]":"w-[400px]":"w-[22rem]"} xs:w-[300px] palette-preview-container transition-[width] duration-300 ease-in-out`},(0,e.createElement)("div",{className:(d?"pb-5 h-[772px] flex flex-col":"pb-4")+" palette-preview relative bg-white rounded-[10px] shadow-xl mb-5 overflow-hidden",style:p?{height:`${p}px`}:{}},(0,e.createElement)("div",{className:"preview-header flex items-center justify-center min-h-48 flex-shrink-0",style:{background:`rgba(${x?.r}, ${x?.g}, ${x?.b}, ${x?.a})`}},(0,e.createElement)("div",{className:"text-center"},(0,e.createElement)("div",{className:"tabs flex items-center font-medium text-sm leading-5 w-fit h-10 xs:h-9 shadow-sm rounded-[10px] mb-5 mx-auto mt-[26px]",style:{color:`rgba(${_?.r}, ${_?.g}, ${_?.b}, ${_?.a})`,background:`rgba(${C?.r}, ${C?.g}, ${C?.b}, ${C?.a})`}}
1,R&&R?.map((n=>(0,e.createElement)("div",{key:n?.key,className:(Boolean(n?.enable)?"":"hidden")+" tab flex items-center justify-center mx-auto gap-2 py-2.5 px-5 xs:px-3 rounded-[10px] cursor-pointer outline-none h-[100%] leading-4",onClick:()=>(e=>{j(e)})(n?.key),style:D===n?.key?M.current:N.current},s?.[n.key]?.[`${n.key}_tab_icon`]?.src?(0,e.createElement)("img",{src:s?.[n.key]?.[`${n.key}_tab_icon`]?.src,alt:s?.[n.key]?.[`${n.key}_tab_icon`]?.name,className:"max-h-5 max-w-5"}):(0,e.createElement)(e.Fragment,null,"integrate_ai"===n?.key&&(0,e.createElement)("svg",{width:"19",height:"16",fill:"none"},(0,e.createElement)("path",{fillRule:"evenodd",style:D===n?.key?T.current:P.current,d:"M1.703.818a1.02 1.02 0 0 1 1.022 1.022 1.02 1.02 0 0 1-.606.934v3.032l.165-.017C3.033 2.635 5.979.818 9.5.818s6.466 1.816 7.216 4.97l.165.014V2.775a1.02 1.02 0 0 1-.606-.934c0-.564.458-1.022 1.022-1.022a1.02 1.02 0 0 1 1.022 1.022 1.02 1.02 0 0 1-.606.934v3.245c.544.249.911.702.949 1.405l.003.568-.001.768c-.057 1.063-.862 1.557-1.897 1.638-.65 3.305-3.658 5.219-7.269 5.219s-6.62-1.914-7.269-5.221C1.195 10.3.392 9.72.337 8.659l-.003-.666.003-.466a1.68 1.68 0 0 1 .949-1.472v-3.28a1.02 1.02 0 0 1-.605-.934c0-.564.458-1.022 1.022-1.022zm13.566 6.45l.009.951-.01.939c-.16 3.046-2.682 4.837-5.768 4.837s-5.607-1.79-5.768-4.837l-.008-.939.009-.951c.166-3.042 2.685-4.826 5.768-4.826s5.601 1.784 5.768 4.826zM13.17 7.17c0-.602-.486-1.088-1.088-1.088s-1.088.486-1.088 1.088.486 1.088 1.088 1.088 1.088-.486 1.088-1.088zm-5.167 0a1.09 1.09 0 0 1-1.088 1.088A1.09 1.09 0 0 1 5.827 7.17a1.09 1.09 0 0 1 1.088-1.088A1.09 1.09 0 0 1 8.003 7.17z"})),"explore"===n?.key&&(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"18",style:D===n?.key?T.current:P.current},(0,e.createElement)("path",{d:"M1.161 2.514a2 2 0 0 1 2-2h4.586a2 2 0 0 1 1.414.586l3.414 3.414a2 2 0 0 1 .586 1.414v8.586a2 2 0 0 1-2 2H9.633c.95-1.062 1.528-2.463 1.528-4a6 6 0 0 0-6-6c-1.537 0-2.938.578-4 1.528V2.514z"}),(0,e.createElement)("path",{fillRule:"evenodd",d:"M5.161 8.514a4 4 0 0 0-4 4c0 .741.202 1.436.554 2.032L.454 15.807a1 1 0 0 0 0 1.414 1 1 0 0 0 1.414 0l1.261-1.261c.595.352 1.29.554 2.032.554a4 4 0 1 0 0-8zm-2 4a2 2 0 1 1 4 0 2 2 0 0 1-2 2 1.99 1.99 0 0 1-1.414-.586 1.99 1.99 0 0 1-.586-1.414z"})),"message"===n?.key&&(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"15",style:D===n?.key?T.current:P.current},(0,e.createElement)("path",{fillRule:"evenodd",d:"M16.161 7.514c0 3.866-3.582 7-8 7-1.492 0-2.888-.357-4.083-.979l-3.917.979 1.338-3.123C.654 10.281.161 8.948.161 7.514c0-3.866 3.582-7 8-7s8 3.134 8 7zm-11-1h-2v2h2v-2zm8 0h-2v2h2v-2zm-6 0h2v2h-2v-2z"}))),s?.[n.key]?.[`${n?.key}_title`]?o(s?.[n.key]?.[`${n?.key}_title`],10):(0,t.__)(n?.name,"wedocs-pro"))))),(0,e.createElement)("div",{className:`preview-heading xs:mb-0.5 mb-1.5 ${s?.preference?.widget_title_font?.size?`text-${s?.preference?.widget_title_font?.size}`:"text-lg"} ${s?.preference?.widget_title_font?.weight?`font-${s?.preference?.widget_title_font?.weight}`:"font-medium"}`,style:{color:`rgba(${S?.r}, ${S?.g}, ${S?.b}, ${S?.a})`}},s?.[D]?.[`${D}_subtitle_one`]?o(s?.[D]?.[`${D}_subtitle_one`],20):"explore"===D?(0,t.__)("Explore Feature","wedocs-pro"):"message"===D?(0,t.__)("Message Us","wedocs-pro"):(0,t.__)("A.I. Chat","wedocs-pro")),(0,e.createElement)("div",{className:`preview-description w-[360px] mx-auto mb-[30px] ${s?.preference?.widget_description_font?.size?`text-${s?.preference?.widget_description_font?.size}`:"text-base"} ${s?.preference?.widget_description_font?.weight?`font-${s?.preference?.widget_description_font?.weight}`:"font-normal"}`,style:{color:`rgba(${L?.r}, ${L?.g}, ${L?.b}, ${L?.a})`}},s?.[D]?.[`${D}_subtitle_two`]?o(s?.[D]?.[`${D}_subtitle_two`],80):"explore"===D?(0,t.__)("Search with keywords for quick answers","wedocs-pro"):"message"===D?(0,t.__)("Feel free to get in touch for any inquiries","wedocs-pro"):(0,t.__)("Feel free to ask any questions or inquiries","wedocs-pro")))),(0,e.createElement)("div",{className:`${"explore"!==D&&"hidden"} explore-tab -mt-5`},(0,e.createElement)("div",{className:`${d&&Boolean(m)&&"hidden"} listing-docs`},(0,e.createElement)("div",{className:"sticky top-0 z-10 bg-white px-4 pt-4 pb-3 border-b border-gray-100"},(0,e.createElement)("div",{className:(d?"!py-[9px] !px-3.5":"px-3 py-1")+" search-panel xs:!py-[7px] doc-search-panel relative flex items-center justify-center border border-solid border-[#D1D5DB] bg-white/90 rounded-md w-full mx-auto 
1shadow-sm"},(0,e.createElement)("input",{id:"doc-search",type:"text",className:"!border-0 !border-transparent !bg-white text-sm text-gray-900 placeholder-gray-400 w-full focus:!shadow-none !px-0 !py-0 disabled:shadow-none",placeholder:(0,t.__)("Search","wedocs-pro"),value:$,disabled:!d,onChange:I}),$&&$.length>0&&(0,e.createElement)("div",{onClick:e=>I(e,!0),className:"cursor-pointer absolute inset-y-0 right-9 flex items-center pr-2"},(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,className:"w-5 h-5 stroke-[#6b7280]"},(0,e.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))),(0,e.createElement)("label",{htmlFor:"doc-search"},(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",className:"cursor-pointer"},(0,e.createElement)("path",{d:"M16.661 16.094l-5-5m1.667-4.167c0 3.222-2.612 5.833-5.833 5.833s-5.833-2.612-5.833-5.833 2.612-5.833 5.833-5.833 5.833 2.612 5.833 5.833z",stroke:"#6b7280",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))))),(0,e.createElement)("div",{className:(d?"h-[510px] xs:h-[calc(100dvh-30rem)] overflow-y-auto":"h-[420px]")+" xs:px-4 pb-4 explore-docs"},d?(0,e.createElement)(e.Fragment,null,H?.length>0?H?.map(((t,n)=>(0,e.createElement)(kt,{key:n,to:`${window.location.origin}/${t?.id}`,className:"doc-section block no-underline border border-solid border-[#D1D5DB] box-border p-4 mb-2.5 last:mb-0 rounded-md w-[360px] xs:w-full mx-auto transition-shadow duration-200 hover:shadow-xl hover:border-gray-300 cursor-pointer"},(0,e.createElement)("div",{className:"doc-heading text-lg text-gray-900 font-medium mb-1.5",dangerouslySetInnerHTML:{__html:o(t?.title?.rendered,32)}}),(0,e.createElement)("div",{className:"doc-description text-sm font-normal text-gray-500 leading-5 break-words",dangerouslySetInnerHTML:{__html:o(t?.content?.rendered,100)}})))):(0,e.createElement)("div",{className:"flex items-center cursor-pointer text-base px-8 w-[340px] xs:w-full xs:px-2"},(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-6 h-6 mr-2"},(0,e.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"})),($&&$?.length>0?(0,t.__)("Search result","wedocs-pro"):(0,t.__)("Data","wedocs-pro"))+(0,t.__)(" not found","wedocs-pro")),(0,e.createElement)("div",{className:"h-4"})):(0,e.createElement)(e.Fragment,null,g&&g?.map(((n,r)=>(0,e.createElement)("div",{key:r,className:`${"explore"!==D&&"hidden"} doc-section border border-[#D1D5DB] box-border p-4 mb-2.5 last:mb-0 rounded-md w-[350px] mx-auto`},(0,e.createElement)("div",{className:"breadcrumbs text-sm mb-2 p-0",style:{color:`rgba(${A?.r}, ${A?.g}, ${A?.b}, ${A?.a})`}},(0,t.__)("WP User Frontend… > Getting Started","wedocs-pro")),(0,e.createElement)("div",{className:"doc-heading text-lg text-gray-900 mb-1.5"},n),(0,e.createElement)("div",{className:"doc-description text-sm font-normal text-gray-500 leading-5"},(0,t.__)("Here you will find everything about WP User Frontend, what it offers and its","wedocs-pro"))))),(0,e.createElement)("div",{className:"h-4"})))),Boolean(m)&&(0,e.createElement)(Pt,{docId:m,isExpanded:f,setIsExpanded:w})),"message"===D&&(0,e.createElement)("div",{className:"flex-1 overflow-hidden flex flex-col"},(0,e.createElement)(Rt,{turnstileSiteKey:s?.message?.turnstile_site_key||"",frontendPreview:d,previewColors:l})),"integrate_ai"===D&&(0,e.createElement)("div",{className:"flex-1 overflow-hidden flex flex-col"},(0,e.createElement)(Ft,{frontendPreview:d})),d&&c&&(0,e.createElement)(Yt,{setShowDocContent:u,doc:F?.find((e=>e?.id===parseInt(n))),isExpanded:f,setIsExpanded:w})))},Kt=({classes:t,show:n,setShow:r,previewColors:o})=>{const{bubbleBg:a,bubbleIcon:i}=o;return(0,e.createElement)("div",{onClick:()=>{r(!n)},className:`${t||""} msg-icon xs:w-12 xs:h-12 w-16 h-16 rounded-full ml-auto flex items-center justify-center`,style:{background:`rgba(${a?.r}, ${a?.g}, ${a?.b}, ${a?.a})`}},n?(0,e.createElement)("svg",{width:"22",height:"22",xmlns:"http://www.w3.org/2000/svg",className:"w-6 h-6 text-white rotate-180 transition-all cancel-svg",style:{fill:`rgba(${i?.r}, ${i?.g}, ${i?.b}, ${i?.a})`}}
1,(0,e.createElement)("path",{d:"M2.45.42A1.435 1.435 0 0 0 .42 2.45L8.97 11 .42 19.55a1.435 1.435 0 1 0 2.03 2.03L11 13.03l8.55 8.55a1.435 1.435 0 1 0 2.03-2.03L13.03 11l8.55-8.55A1.435 1.435 0 0 0 19.55.42L11 8.97 2.45.42Z"})):(0,e.createElement)("svg",{width:"25",height:"24",xmlns:"http://www.w3.org/2000/svg",className:"rotate-360 transition-all",style:{fill:`rgba(${i?.r}, ${i?.g}, ${i?.b}, ${i?.a})`}},(0,e.createElement)("path",{d:"M2.157 23.042a1.2 1.2 0 0 1-1.198-1.187V6.481A5.91 5.91 0 0 1 6.871.569h11.835a5.91 5.91 0 0 1 5.912 5.912v7.099a5.91 5.91 0 0 1-5.912 5.912H7.27L2.833 22.82c-.198.141-.434.219-.677.222zM6.882 2.943a3.55 3.55 0 0 0-3.549 3.549v13l2.84-2.13c.205-.152.454-.234.71-.233h11.824a3.55 3.55 0 0 0 3.55-3.549V6.481a3.55 3.55 0 0 0-3.55-3.549l-11.824.011zm8.264 5.934H8.058c-.165.016-.331-.003-.488-.055s-.302-.136-.424-.248-.221-.247-.288-.398-.102-.315-.102-.481.035-.329.102-.481.165-.287.288-.398.267-.196.424-.248.323-.071.488-.055h7.088c.165-.016.331.003.488.055s.302.136.424.248.221.247.288.398.102.315.102.481-.035.329-.102.481-.165.287-.288.398a1.19 1.19 0 0 1-.424.248c-.157.052-.323.071-.488.055zm-7.088 4.725h3.549c.165.016.331-.003.488-.055s.302-.136.424-.248.22-.247.287-.398a1.19 1.19 0 0 0 0-.961c-.067-.151-.165-.287-.287-.398s-.267-.196-.424-.248-.323-.071-.488-.055H8.058c-.165-.016-.331.003-.488.055s-.302.136-.424.248-.221.247-.288.398-.102.315-.102.481.035.329.102.481.165.287.288.398.267.196.424.248.323.071.488.055z"})))},Jt=({classes:t,settings:n,bodyClasses:o,iconClasses:a,previewColors:i,staticPreview:s,frontendPreview:l})=>{const[c,d]=(0,r.useState)(0),[u,m]=(0,r.useState)(!1),[p,h]=(0,r.useState)(!1),f=document.querySelectorAll('a[rel~="widget-link"]');return f?.forEach((e=>{e.addEventListener("click",(e=>{d(e?.target?.getAttribute("data-id")),m(!0),h(!0)}))})),(0,r.useEffect)((()=>{u||h(!1)}),[u]),(0,e.createElement)(e.Fragment,null,i&&(0,e.createElement)("div",{className:`${t||""} palette-preview-container relative`},s?(0,e.createElement)(Zt,{settings:n,classes:o,previewColors:i}):u&&(0,e.createElement)(Zt,{docId:c,settings:n,classes:o,previewColors:i,showDocContent:p,frontendPreview:l,setShowDocContent:h}),(0,e.createElement)(Kt,{setShow:m,settings:n,classes:a,previewColors:i,show:!s&&u})))},Xt=()=>(0,e.createElement)("div",{className:"animate-pulse flex flex-col flex-1 overflow-hidden"},(0,e.createElement)("div",{className:"flex-1 px-6 py-4 overflow-hidden"},(0,e.createElement)("div",{className:"h-5 w-3/4 bg-gray-200 rounded mb-5"}),(0,e.createElement)("div",{className:"space-y-2.5"},(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-5/6 bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-4/5 bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-3/4 bg-gray-100 rounded"})),(0,e.createElement)("div",{className:"mt-6 space-y-2.5"},(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-5/6 bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-2/3 bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-4/5 bg-gray-100 rounded"})),(0,e.createElement)("div",{className:"mt-6 space-y-2.5"},(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-3/4 bg-gray-100 rounded"}),(0,e.createElement)("div",{className:"h-3 w-full bg-gray-100 rounded"}))),(0,e.createElement)("div",{className:"flex-shrink-0 border-t border-gray-100 px-6 py-3"},(0,e.createElement)("div",{className:"h-4 w-52 bg-gray-200 rounded"}))),Gt=({docId:n})=>{const[o,a]=(0,r.useState)(null),i=weDocsPro_Front_Vars?.general_settings?.helpful;if("off"===i)return null;const s=e=>{o||(a(e),wp.apiFetch({path:`/wp/v2/docs/${n}/helpfullness`,method:"POST",data:{type:e}}).catch((()=>{})))};return(0,e.createElement)("div",{className:"flex-shrink-0 border-t border-gray-100 px-6 py-3 bg-white"},o?(0,e.createElement)("div",{className:"flex items-center justify-center gap-2 py-1 rounded-lg bg-green-50 text-green-700 text-sm font-medium"},(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,e.createElement)("polyline",{points:"20 6 9 17 4 12"})),(0,t.__)("Thanks for your feedback","wedocs-pro")):(0,e.createElement)("div",{className:"flex items-center justify-between gap-3"},(0,e.createElement)("p",{className:"text-sm text-gray-500 m-0"},(0,t.__)("Did this answer your question?","wedocs-pro")),(0,e.createElement)("div",{className:"flex items-center gap-2 flex-shrink-0"},(0,e.createElement)("button",{onClick:()=>s("positive"),className:"group w-8 h-8 flex items-center justify-center rounded-full border border-gray-200 hover:border-green-400 hover:bg-green-50 transition-all duration-200",title:(0,t.__)("Yes","wedocs-pro")},(0,e.createElement)("span",{className:"text-base leading-none transition-transform duration-200 group-hover:scale-125"},"😊")),(0,e.createElement)("button",{onClick:()=>s("negative"),className:"group w-8 h-8 flex items-center justify-center rounded-full border border-gray-200 hover:border-red-400 hover:bg-red-50 transition-all duration-200",title:(0,t.__)("No","wedocs-pro")},(0,e.createElement)("span",{className:"text-base leading-none transition-transform duration-200 group-hover:scale-125"},"😞")))))},Qt=()=>(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2"},(0,e.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 8V4m0 0h4M4 4l5 5m11-5h-4m4 0v4m0-4l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})),en=()=>(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2"},(0,e.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4m0 5H4m5 0L3 3m12 6h5m-5 0V4m0 5l6-6M9 15v5m0-5H4m5 0l-6 6m12-6h5m-5 0v5m0-5l6 6"})),tn=()=>(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2"},(0,e.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})),nn=({doc:n,onClose:r,isExpanded:o,setIsExpanded:a,loading:i,showClose:s})=>(0,e.createElement)("div",{className:"wedocs-single-wrap flex flex-col h-full bg-white rounded-[10px] overflow-hidden"},(0,e.createElement)("div",{className:"flex items-center justify-between px-5 py-3 bg-white/80 backdrop-blur-sm border-b border-gray-100 flex-shrink-0"},s?(0,e.createElement)("button",{onClick:r,className:"p-1.5 rounded-md text-gray-500 hover:text-indigo-600 hover:bg-gray-100 focus:outline-none transition-all duration-200",title:(0,t.__)("Close","wedocs-pro")},(0,e.createElement)(tn,null)):(0,e.createElement)("span",null),(0,e.createElement)("div",{className:"flex items-center gap-2"},a&&(0,e.createElement)("button",{onClick:()=>a(!o),className:"p-1.5 rounded-md text-gray-500 hover:text-indigo-600 hover:bg-gray-100 transition-all duration-300",title:o?"Compress":"Expand"},o?(0,e.createElement)(en,null):(0,e.createElement)(Qt,null)),!i&&n?.link&&(0,e.createElement)("a",{href:n.link,target:"_blank",rel:"noreferrer",className:"inline-flex items-center text-gray-400 hover:text-indigo-600 p-1 transition-colors",title:(0,t.__)("View Doc","wedocs-pro")},(0,e.createElement)("svg",{width:"19",height:"14",viewBox:"0 0 19 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M11.6995 7.14388C11.6995 8.52459 10.5802 9.64388 9.1995 9.64388C7.81879 9.64388 6.6995 8.52459 6.6995 7.14388C6.6995 5.76317 7.81879 4.64388 9.1995 4.64388C10.5802 4.64388 11.6995 5.76317 11.6995 7.14388Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.createElement)("path",{d:"M1.24805 7.14385C2.30994 3.76294 5.46851 1.31055 9.19987 1.31055C12.9312 1.31055 16.0898 3.76298 17.1517 7.14391C16.0898 10.5248 12.9312 12.9772 9.19989 12.9772C5.46851 12.9772 2.30992 10.5248 1.24805 7.14385Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))))),i?(0,e.createElement)(Xt,null):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"flex-1 overflow-y-auto px-6 py-4 doc-content-scroll"},(0,e.createElement)("div",{className:"doc-heading text-gray-900 font-medium mb-3 "+(o?"text-xl":"text-lg"),dangerouslySetInnerHTML:{__html:n?.title?.rendered}}),(0,e.createElement)("article",{className:"prose break-words "+(o?"prose-lg":""),dangerouslySetInnerHTML:{__html:n?.content?.rendered}})),(0,e.createElement)(Gt,{docId:n?.id}))),rn=({doc:t,onClose:n,loading:o})=>{const[a,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{"Escape"===e.key&&n()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[n]),(0,e.createElement)("div",{className:"wedocs-single-wrap",style:{position:"fixed",top:"var(--wp-admin--admin-bar--height, 0px)",right:0,bottom:0,left:0,zIndex:99999,display:"flex",alignItems:"center",justifyContent:"center"}},(0,e.createElement)("div",{onClick:n,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.12)",backdropFilter:"blur(1px)"}}),(0,e.createElement)("div",{style:{position:"relative",width:a?"700px":"480px",maxWidth:"95vw",height:a?"80vh":"600px",maxHeight:"90vh",transition:"width 0.3s ease, height 0.3s ease",borderRadius:"10px",overflow:"hidden",boxShadow:"0 25px 60px rgba(0,0,0,0.2)",display:"flex",flexDirection:"column"}},(0,e.createElement)(nn,{doc:t,onClose:n,isExpanded:a,setIsExpanded:i,loading:o,showClose:!0})))},on=({doc:t,onClose:n,loading:o})=>{const[a,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{"Escape"===e.key&&n()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[n]),(0,e.createElement)("div",{className:"wedocs-single-wrap",style:{position:"fixed",top:"var(--wp-admin--admin-bar--height, 0px)",right:0,bottom:0,left:0,zIndex:99999,display:"flex",justifyContent:"flex-end"}},(0,e.createElement)("div",{onClick:n,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.12)"}}),(0,e.createElement)("div",{style:{position:"relative",width:a?"600px":"420p
1x",maxWidth:"95vw",height:"100%",transition:"width 0.3s ease",boxShadow:"-4px 0 24px rgba(0,0,0,0.15)",display:"flex",flexDirection:"column",borderRadius:"10px 0 0 10px",overflow:"hidden"}},(0,e.createElement)(nn,{doc:t,onClose:n,isExpanded:a,setIsExpanded:i,loading:o,showClose:!0})))},an=({doc:t,onClose:n,anchorEl:o,loading:a})=>{const[i,s]=(0,r.useState)(!1),l=(0,r.useRef)(null),[c,d]=(0,r.useState)({top:0,left:0});return(0,r.useEffect)((()=>{if(o){const e=o.getBoundingClientRect(),t=i?480:360,n=480,r=window.innerWidth,a=window.innerHeight;let s=e.left;s+t>r-16&&(s=r-t-16);const l=e.bottom+8+n>a?e.top-n-8:e.bottom+8;d({top:l,left:Math.max(8,s)})}}),[o,i]),(0,r.useEffect)((()=>{const e=e=>{"Escape"===e.key&&n()},t=e=>{l.current&&!l.current.contains(e.target)&&e.target!==o&&n()};return document.addEventListener("keydown",e),document.addEventListener("mousedown",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("mousedown",t)}}),[n,o]),(0,e.createElement)("div",{className:"wedocs-single-wrap",style:{position:"fixed",zIndex:99999,top:c.top,left:c.left}},(0,e.createElement)("div",{ref:l,style:{width:i?"480px":"360px",height:"480px",maxWidth:"95vw",transition:"width 0.3s ease",borderRadius:"10px",overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.18)",display:"flex",flexDirection:"column",border:"1px solid #e5e7eb"}},(0,e.createElement)(nn,{doc:t,onClose:n,isExpanded:i,setIsExpanded:s,loading:a,showClose:!0})))},sn=()=>{const t="off"===weDocsPro_Front_Vars?.assistant_settings?.assist_enable,n="off"===weDocsPro_Front_Vars?.assistant_settings?.integrate_ai?.ai_enabled,o="off"===weDocsPro_Front_Vars?.assistant_settings?.explore?.explore_enable,a="off"===weDocsPro_Front_Vars?.assistant_settings?.message?.messaging_enable,[i,s]=(0,r.useState)(!1),[l,c]=(0,r.useState)({type:null,doc:null,anchorEl:null,loading:!1});(0,r.useEffect)((()=>{const e=()=>{"complete"===document.readyState&&(s(!0),setTimeout((()=>{s(!0)}),100))};return e(),window.addEventListener("load",e),()=>{window.removeEventListener("load",e)}}),[]),(0,r.useEffect)((()=>{const e=document.querySelectorAll('a[rel~="widget-link"]'),n=e=>{e.preventDefault()};t?e.forEach((e=>{const t=document.createElement("a");t.innerHTML=e.innerHTML;for(let n=0;n<e.attributes.length;n++){const r=e.attributes[n];t.setAttribute(r.name,r.value)}e.replaceWith(t)})):e.forEach((e=>e.addEventListener("click",n)))}),[t]),(0,r.useEffect)((()=>{const e=[];return[{selector:'a[rel~="inline-link"]',type:"inline"},{selector:'a[rel~="sidebar-link"]',type:"sidebar"},{selector:'a[rel~="modal-link"]',type:"modal"}].forEach((({selector:t,type:n})=>{document.querySelectorAll(t).forEach((t=>{const r=e=>{e.preventDefault();const r=t.getAttribute("data-id");r&&(c({type:n,doc:null,anchorEl:"inline"===n?t:null,loading:!0}),Promise.all([wp.apiFetch({path:`/wp/v2/docs/${r}?_embed`}),new Promise((e=>setTimeout(e,600)))]).then((([e])=>{c((t=>({...t,doc:e,loading:!1})))})).catch((()=>{c({type:null,doc:null,anchorEl:null,loading:!1})})))};t.addEventListener("click",r),e.push({linkDom:t,handler:r})}))})),()=>{e.forEach((({linkDom:e,handler:t})=>{e.removeEventListener("click",t)}))}}),[]);const d=()=>c({type:null,doc:null,anchorEl:null,loading:!1});return(0,e.createElement)("div",{style:{position:"fixed"},className:"xs:bottom-4 xs:right-6 xxs:right-3 md:bottom-4 md:right-6 bottom-8 right-14 z-[999]"},(0,e.createElement)("span",{className:"hidden font-extrabold"}),i&&weDocsPro_Front_Vars.assistant_settings&&!t&&!(n&&o&&a)&&(0,e.createElement)(Jt,{previewColors:weDocsPro_Front_Vars?.assistant_settings?.preference?.color_settings?.preview_colors,settings:weDocsPro_Front_Vars?.assistant_settings,bodyClasses:"-translate-y-full absolute right-0 ml-auto",iconClasses:"mt-24 cursor-pointer hover:bg-indigo-600",frontendPreview:!0}),"modal"===l.type&&(l.loading||l.doc)&&(0,e.createElement)(rn,{doc:l.doc,onClose:d,loading:l.loading}),"sidebar"===l.type&&(l.loading||l.doc)&&(0,e.createElement)(on,{doc:l.doc,onClose:d,loading:l.loading}),"inline"===l.type&&(l.loading||l.doc)&&(0,e.createElement)(an,{doc:l.doc,onClose:d,anchorEl:l.anchorEl,loading:l.loading}))},ln=document.createElement("div");ln.setAttribute("id","wedocs-messaging-bubble-root"),ln.setAttribute("class","wedocs-single-wrap"),document.body.appendChild(ln);const cn=document.getElementById("wedocs-messaging-bubble-root");let dn=[{path:"/",component:sn},{path:"/:id",component:sn},{path:"/*",component:sn}];const un=function(e,t){return re({basename:void 0,future:dt({}
1,void 0,{v7_prependBasename:!0}),history:(n={window:void 0},void 0===n&&(n={}),f((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=h(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),m("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:p(t))}),(function(e,t){d("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),n)),hydrationData:mt(),routes:e,mapRouteProperties:lt,unstable_dataStrategy:void 0,unstable_patchRoutesOnMiss:void 0,window:void 0}).initialize();var n}(function t(n,r){void 0===r&&(r=[]);let o=[];return e.Children.forEach(n,((n,a)=>{if(!e.isValidElement(n))return;let i=[...r,a];if(n.type===e.Fragment)return void o.push.apply(o,t(n.props.children,i));n.type!==it&&c(!1),n.props.index&&n.props.children&&c(!1);let s={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:null!=n.props.ErrorBoundary||null!=n.props.errorElement,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=t(n.props.children,i)),o.push(s)})),o}((0,e.createElement)(r.Fragment,null,dn&&dn.map(((t,n)=>(0,e.createElement)(it,{key:n,path:t.path,element:(0,e.createElement)(t.component,null),errorElement:(0,e.createElement)(t.component,null)}))))));cn&&(0,r.createRoot)(cn).render((0,e.createElement)((function(t){let{fallbackElement:n,router:r,future:o}=t,[a,i]=e.useState(r.state),[s,l]=e.useState(),[c,d]=e.useState({isTransitioning:!1}),[u,m]=e.useState(),[p,h]=e.useState(),[f,w]=e.useState(),g=e.useRef(new Map),{v7_startTransition:v}=o||{},b=e.useCallback((e=>{v?function(e){wt?wt(e):e()}(e):e()}),[v]),y=e.useCallback(((e,t)=>{let{deletedFetchers:n,unstable_flushSync:o,unstable_viewTransitionOpts:a}=t;n.forEach((e=>g.current.delete(e))),e.fetchers.forEach(((e,t)=>{void 0!==e.data&&g.current.set(t,e.data)}));let s=null==r.window||null==r.window.document||"function"!=typeof r.window.document.startViewTransition;if(a&&!s){if(o){vt((()=>{p&&(u&&u.resolve(),p.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:a.currentLocation,nextLocation:a.nextLocation})}));let t=r.window.document.startViewTransition((()=>{vt((()=>i(e)))}));return t.finished.finally((()=>{vt((()=>{m(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}
1))})),void vt((()=>h(t)))}p?(u&&u.resolve(),p.skipTransition(),w({state:e,currentLocation:a.currentLocation,nextLocation:a.nextLocation})):(l(e),d({isTransitioning:!0,flushSync:!1,currentLocation:a.currentLocation,nextLocation:a.nextLocation}))}else o?vt((()=>i(e))):b((()=>i(e)))}),[r.window,p,u,g,b]);e.useLayoutEffect((()=>r.subscribe(y)),[r,y]),e.useEffect((()=>{c.isTransitioning&&!c.flushSync&&m(new bt)}),[c]),e.useEffect((()=>{if(u&&s&&r.window){let e=s,t=u.promise,n=r.window.document.startViewTransition((async()=>{b((()=>i(e))),await t}));n.finished.finally((()=>{m(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})),h(n)}}),[b,s,u,r.window]),e.useEffect((()=>{u&&s&&a.location.key===s.location.key&&u.resolve()}),[u,p,a.location,s]),e.useEffect((()=>{!c.isTransitioning&&f&&(l(f.state),d({isTransitioning:!0,flushSync:!1,currentLocation:f.currentLocation,nextLocation:f.nextLocation}),w(void 0))}),[c.isTransitioning,f]),e.useEffect((()=>{}),[]);let x=e.useMemo((()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})})),[r]),E=r.basename||"/",k=e.useMemo((()=>({router:r,navigator:x,static:!1,basename:E})),[r,x,E]);return e.createElement(e.Fragment,null,e.createElement(Ie.Provider,{value:k},e.createElement(Fe.Provider,{value:a},e.createElement(ft.Provider,{value:g.current},e.createElement(ht.Provider,{value:c},e.createElement(st,{basename:E,location:a.location,navigationType:a.historyAction,navigator:x,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},a.initialized||r.future.v7_partialHydration?e.createElement(yt,{routes:r.routes,future:r.future,state:a}):n))))),null)}),{router:un}))})()})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.