const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PlatformLoginPage-CX1Ly_Nf.js","assets/Callout-DDv5ybru.js","assets/OverviewPage-BBYwpqbx.js","assets/Card-qZID8oIC.js","assets/KpiCard-DQ7_W9QT.js","assets/kpiValor-YrSjSHp7.js","assets/money-EykUdu7e.js","assets/PageHeader-DNhiXCgW.js","assets/chartColors-CT4zJfv0.js","assets/DonutChart-DoSHu6QX.js","assets/value-3LWPH8SZ.js","assets/usePlatform-DiOQ1usT.js","assets/AuditPage-DdAwfh8t.js","assets/LoadingState-BXVA2un9.js","assets/TenantsPage-D9pIGSxW.js","assets/DataTable-sbUB_Dt9.js","assets/SecretValue-BVsuOCjn.js","assets/clipboard-check-CNWYVl5t.js","assets/clipboard-copy-OuT6K0Oi.js","assets/bytes-DkRyiVca.js","assets/DataPair-CZ_PufB4.js","assets/eye-CUczgtmb.js","assets/eye-off-DN3IuqFp.js","assets/settings-2-De1SDSja.js","assets/pencil-BmjIEXxx.js","assets/trash-2-CahAnUkN.js","assets/play-DVv1CBzA.js","assets/plus-Dh7LRYMr.js","assets/BrandingPage-BojwZcBL.js","assets/BrandingAssets-CwYG14GT.js","assets/FileUpload-BxSpfvvE.js","assets/Slider-BfXeSVAi.js","assets/zoom-out-DqbC2aVf.js","assets/StringsPage-Cnit_nsG.js","assets/usePlatformI18n-B0NjVzPi.js","assets/download-CRIs1sxZ.js","assets/download-88bU69Jb.js","assets/LanguagesPage-CXPBl5yi.js","assets/MaintenancePage-DZml9Lhb.js","assets/DbMigrationsPage-DQQpeCz9.js","assets/LoginPage-CzfTwPH6.js","assets/AuthCard-OSdgRWGw.js","assets/useOauth-B2rZKOWk.js","assets/useIdentity-DurTtlWf.js","assets/MfaStep-9jz3zGFZ.js","assets/ForgotPasswordPage-CfK0hySw.js","assets/mail-check-Bt5WSjAi.js","assets/ResetPasswordPage-DsMkv1GQ.js","assets/RegisterPage-DuN59a4K.js","assets/AcceptInvitationPage-BX-DmmuY.js","assets/useInvitations-BrZ1-7uO.js","assets/corner-down-right-YO0-Wvqo.js","assets/PortalPage-BDNxTeg1.js","assets/usePortal-C-4wkx2f.js","assets/units-K9V8DJgY.js","assets/send-BkXv8t5p.js","assets/AckPage-BhdHU3k0.js","assets/StyleguidePage-Bl2esPPh.js","assets/StatusButton-BGWflMO9.js","assets/OptionList-Cfln351-.js","assets/UrgencyChip-DX10Wf6I.js","assets/ScoreChip-DNz-5m0Y.js","assets/MiniProgress-CRUTcUUJ.js","assets/ProgressBar-J2mViYny.js","assets/ViewAllLink-Dk5sWs-V.js","assets/arrow-right-CYtxevMk.js","assets/AddTile-BGPyBrcB.js","assets/SummaryPanel-ZOVluDec.js","assets/Timeline-B7G7WyFD.js","assets/clock-TtfU8IhC.js","assets/Stepper-CqqP3C9W.js","assets/BarChart-C0NT0U97.js","assets/BoxPlot-C8mm-EqX.js","assets/Pagination-CuOfpLfX.js","assets/queryFilter-cYX6Ao26.js","assets/ListToolbar-Cu164R8s.js","assets/ColumnManager-C6PRd_ej.js","assets/FilterBar-CbVfTJBb.js","assets/SavedFiltersMenu-CfnPkK88.js","assets/FilterCheckboxList-JXlYz00-.js","assets/bookmark-ChKbDpR9.js","assets/BulkBar-BSn3w_9N.js","assets/MultiSelect-DHJaz4aQ.js","assets/SegmentedControl-SM5hbDra.js","assets/Comments-CRDoO_Kx.js","assets/map-pin-7qKka2rK.js","assets/undo-2-Bk6n7Hvx.js","assets/AttachmentChip-B8PkxWyQ.js","assets/EmailComposer-CTuhTw7g.js","assets/FileViewer-23rt0Yte.js","assets/paperclip-hYSrcYdB.js","assets/DashboardPage-CCdxLMYf.js","assets/rotate-ccw-DFJbpgJJ.js","assets/DashboardPage-ChDF2ngo.css","assets/AlertasPage-B3Isj9sH.js","assets/ExportMenu-b6QuemOL.js","assets/alertMessage-8BepdI3h.js","assets/useSavedFilters-BA7G6RBZ.js","assets/ArtigosPage-Bb3kztxL.js","assets/useListColumns-C7tJNjVI.js","assets/usePageSize-DEsQpBmu.js","assets/useTableToolbar-BG3Py-sR.js","assets/useListFilter-yvw6O7_j.js","assets/useCatalog-Bt41Pw8Z.js","assets/useCcu-wEhvdFoN.js","assets/settingsLevel-Cye_lVm-.js","assets/FamiliasPage-DHX5Q8gx.js","assets/FornecedoresPage-B6mqpRrO.js","assets/FornecedorDetalhePage-Bzn3pMmL.js","assets/validityStatus-CXYt9ZSF.js","assets/useEvaluations-DCIUEvb4.js","assets/useHistory-Didv3Erz.js","assets/useMoney-CZcayhVy.js","assets/evaluationStatus-BrUSpr-_.js","assets/NecessidadesPage-CYvKwt7-.js","assets/ProportionBar-hWfon3Nj.js","assets/needStatus-B0LESseS.js","assets/useNeeds-B7rE_XN0.js","assets/attachColumns-B71cFpgq.js","assets/useRfqs-Cfz38Tw4.js","assets/emailToast-BUhH5BNQ.js","assets/poStatus-DRX8nNQT.js","assets/rfqStatus-lKSm4Amz.js","assets/NewPoDrawer-D1sc4ica.js","assets/usePurchaseOrders-0vxgMLgi.js","assets/useSupplierPrices-0vv3m58k.js","assets/link-2-Cm2fZdfO.js","assets/NecessidadeFormPage-BmmL1N1Q.js","assets/NeedFormFields-BnmyF3cy.js","assets/NecessidadeDetalhePage-ChhR_tGu.js","assets/AttachmentsPanel-HFGmWvmx.js","assets/transitionStyle-C3dkPKC_.js","assets/lock-DDs4YUcP.js","assets/ApprovalChain-BTLan3kI.js","assets/timelineItems-rhiEik-2.js","assets/NeedApprovalCard-BGFhKRhh.js","assets/useApprovals-C6GzsESF.js","assets/detailSubtitle-CxUjYtaU.js","assets/git-compare-arrows-C_2Uis0x.js","assets/ProcessTrail-Dlop0-fv.js","assets/receptionStatus-DyIrfY_3.js","assets/minimize-2-8W61gqdC.js","assets/ComprasCentralizadasPage-BtuVEHey.js","assets/file-plus-2-Bx8LFOky.js","assets/AprovacoesPage-xZvcZNnb.js","assets/RfqsPage-B8pExotW.js","assets/useOpenKey-bWv7f8Eq.js","assets/RfqDetalhePage-BGyGK5Lo.js","assets/CentralReadOnlyBanner-BnGyrIJQ.js","assets/ProposalRevisionModal-DDLguKmS.js","assets/Unavailable-CZgyHs-1.js","assets/EmailThread-D8r_B0-a.js","assets/useMessageTemplates-C5UYmwRE.js","assets/ViaResposta-BR-OM1tI.js","assets/file-check-2-Ch7LXTiN.js","assets/CcuModals-DUXrMueX.js","assets/CaixaEntradaPage-CjPd2DPg.js","assets/useReceptionArea-xD3QnJRo.js","assets/RececoesPage-BArFiJ_S.js","assets/useReceptions-DON0Ugld.js","assets/split-D7YBEZYS.js","assets/RececaoDetalhePage-DeUV4Aw-.js","assets/NcsPage-BcYVttLs.js","assets/NcDetalhePage-xTL6-baq.js","assets/mail-plus-D4mb_S1A.js","assets/arrow-left-BP-0KoJb.js","assets/ComparacaoPage-LJlAIDPH.js","assets/useComparison-B-hKFri4.js","assets/useSavedComparisons-Cu3LIglw.js","assets/ScoreBreakdownModal-69N4DfAQ.js","assets/ComparacoesGuardadasPage-BT4Pa5R7.js","assets/HistoricoPage-DDFz9VKl.js","assets/TabelaPrecosPage-DzAAxLLW.js","assets/PrecosPraticadosPage-BI6HV3D-.js","assets/AvaliacoesPage-D5wJeiw4.js","assets/RelatoriosPage-Dp2OIzYC.js","assets/useReportDefs-Cfx0J1Pf.js","assets/ReportBuilderPage-BvTRzm7C.js","assets/OrdensCompraPage-Br0VbL6E.js","assets/PoDetalhePage-DjWxuKmk.js","assets/refresh-cw-C6EgCY7S.js","assets/NotificacoesPage-C9-JMfHu.js","assets/PerfilPage-DJXN8zNA.js","assets/DefinicoesLayout-C--r8RPQ.js","assets/SettingsHub-DprpGSrz.js","assets/ImpostosPage-DEX1GPFc.js","assets/useSettingsCascade-B7gUNbMR.js","assets/arrow-down-to-line-Blr3Mbl8.js","assets/LevelSwitch-CF0xo3SU.js","assets/ScorePage-DCsd7jpD.js","assets/useSettings-2l5gjuiQ.js","assets/DecisaoPage-DW7RK99d.js","assets/ReplicacaoPage-mzaejdwU.js","assets/PropostasPage-CCFU3bm4.js","assets/PropostaDetalhePage-BLtZmyhY.js","assets/AuditoriaPage-Do0rM9YM.js","assets/SegurancaPage-CMMvrae6.js","assets/useRoles-DPvibaCR.js","assets/ChavesApiPage-C804pDzT.js","assets/WebhooksPage-Bw20HlbE.js","assets/InheritedFrom-Dvl9vuxK.js","assets/runStatus-Dfxi0i72.js","assets/ImportacaoPage-DX_od10W.js","assets/UtilizadoresPage-BoZVfdwX.js","assets/useUsers-B_cZTL-0.js","assets/EmpresasPage-B092LhAQ.js","assets/useObjectUrls-BrKo1s5Z.js","assets/GruposPage-CGgRt1lJ.js","assets/useGroups-DdlQOdIe.js","assets/CentrosCustoPage-D_WLk5N_.js","assets/DelegacoesPage-CE-YrJAw.js","assets/FluxoAprovacaoPage-D7C0-syw.js","assets/FluxoAprovacaoPage-BnuhLJ6X.css","assets/NumeracaoPage-BdSNHhQZ.js","assets/CatalogosNcPage-BazlIUr4.js","assets/CcuPage-pvcQUsxl.js","assets/RolesPage-BS2fgg2n.js","assets/SmtpPage-ChzwgUfR.js","assets/CaixaImapPage-BFGqO6dv.js","assets/OpcoesPage-edl-PZ5T.js","assets/TemplatesEmailPage-6QbD-Bgi.js","assets/useEmailTemplates-CZ3fNjV5.js","assets/TemplatesPage-Cg6lnlDC.js","assets/OauthPage-DyplZd7Y.js","assets/LdapPage-B8A9940O.js","assets/IntegracoesPage-BUpyyG9K.js","assets/ExportacaoPage-DKSpXY8I.js","assets/CancelamentosPage-8McF14lD.js","assets/BackupPage-DerP-3bh.js","assets/ArmazenamentoPage-BG2qBFyK.js","assets/MarcaPage-BCO0JVxG.js","assets/IdentidadePage-B5zH7KMY.js","assets/AvaliacaoPage-BesEO9mc.js","assets/RelatoriosAgendadosPage-lkmF7iYQ.js"])))=>i.map(i=>d[i]); var $m=e=>{throw TypeError(e)};var dd=(e,t,n)=>t.has(e)||$m("Cannot "+n);var _=(e,t,n)=>(dd(e,t,"read from private field"),n?n.call(e):t.get(e)),oe=(e,t,n)=>t.has(e)?$m("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),W=(e,t,n,r)=>(dd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),pe=(e,t,n)=>(dd(e,t,"access private method"),n);var Ml=(e,t,n,r)=>({set _(s){W(e,t,s,n)},get _(){return _(e,t,r)}});function h0(e,t){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var a3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function p0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function l3(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var m0={exports:{}},Cc={},g0={exports:{}},ve={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var fl=Symbol.for("react.element"),g2=Symbol.for("react.portal"),y2=Symbol.for("react.fragment"),v2=Symbol.for("react.strict_mode"),x2=Symbol.for("react.profiler"),w2=Symbol.for("react.provider"),b2=Symbol.for("react.context"),S2=Symbol.for("react.forward_ref"),E2=Symbol.for("react.suspense"),_2=Symbol.for("react.memo"),C2=Symbol.for("react.lazy"),Bm=Symbol.iterator;function k2(e){return e===null||typeof e!="object"?null:(e=Bm&&e[Bm]||e["@@iterator"],typeof e=="function"?e:null)}var y0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v0=Object.assign,x0={};function ki(e,t,n){this.props=e,this.context=t,this.refs=x0,this.updater=n||y0}ki.prototype.isReactComponent={};ki.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ki.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function w0(){}w0.prototype=ki.prototype;function ip(e,t,n){this.props=e,this.context=t,this.refs=x0,this.updater=n||y0}var ap=ip.prototype=new w0;ap.constructor=ip;v0(ap,ki.prototype);ap.isPureReactComponent=!0;var Vm=Array.isArray,b0=Object.prototype.hasOwnProperty,lp={current:null},S0={key:!0,ref:!0,__self:!0,__source:!0};function E0(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)b0.call(t,r)&&!S0.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1>>1,ce=I[Y];if(0>>1;Ys(Ae,G))res(Le,Ae)?(I[Y]=Le,I[re]=G,Y=re):(I[Y]=Ae,I[Re]=G,Y=Re);else if(res(Le,G))I[Y]=Le,I[re]=G,Y=re;else break e}}return V}function s(I,V){var G=I.sortIndex-V.sortIndex;return G!==0?G:I.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],u=[],d=1,c=null,f=3,g=!1,x=!1,w=!1,b=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(I){for(var V=n(u);V!==null;){if(V.callback===null)r(u);else if(V.startTime<=I)r(u),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(u)}}function S(I){if(w=!1,v(I),!x)if(n(l)!==null)x=!0,X(C);else{var V=n(u);V!==null&&ne(S,V.startTime-I)}}function C(I,V){x=!1,w&&(w=!1,m(k),k=-1),g=!0;var G=f;try{for(v(V),c=n(l);c!==null&&(!(c.expirationTime>V)||I&&!A());){var Y=c.callback;if(typeof Y=="function"){c.callback=null,f=c.priorityLevel;var ce=Y(c.expirationTime<=V);V=e.unstable_now(),typeof ce=="function"?c.callback=ce:c===n(l)&&r(l),v(V)}else r(l);c=n(l)}if(c!==null)var Pe=!0;else{var Re=n(u);Re!==null&&ne(S,Re.startTime-V),Pe=!1}return Pe}finally{c=null,f=G,g=!1}}var N=!1,E=null,k=-1,T=5,P=-1;function A(){return!(e.unstable_now()-PI||125Y?(I.sortIndex=G,t(u,I),n(l)===null&&I===n(u)&&(w?(m(k),k=-1):w=!0,ne(S,G-Y))):(I.sortIndex=ce,t(l,I),x||g||(x=!0,X(C))),I},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(I){var V=f;return function(){var G=f;f=V;try{return I.apply(this,arguments)}finally{f=G}}}})(N0);R0.exports=N0;var M2=R0.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var F2=p,Sn=M2;function U(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),af=Object.prototype.hasOwnProperty,z2=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Gm={},Km={};function U2(e){return af.call(Km,e)?!0:af.call(Gm,e)?!1:z2.test(e)?Km[e]=!0:(Gm[e]=!0,!1)}function $2(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function B2(e,t,n,r){if(t===null||typeof t>"u"||$2(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function qt(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Ct={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ct[e]=new qt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ct[t]=new qt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ct[e]=new qt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ct[e]=new qt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ct[e]=new qt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ct[e]=new qt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ct[e]=new qt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ct[e]=new qt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ct[e]=new qt(e,5,!1,e.toLowerCase(),null,!1,!1)});var cp=/[\-:]([a-z])/g;function dp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(cp,dp);Ct[t]=new qt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(cp,dp);Ct[t]=new qt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(cp,dp);Ct[t]=new qt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ct[e]=new qt(e,1,!1,e.toLowerCase(),null,!1,!1)});Ct.xlinkHref=new qt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ct[e]=new qt(e,1,!1,e.toLowerCase(),null,!0,!0)});function fp(e,t,n,r){var s=Ct.hasOwnProperty(t)?Ct[t]:null;(s!==null?s.type!==0:r||!(2a||s[i]!==o[a]){var l=` `+s[i].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{pd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ca(e):""}function V2(e){switch(e.tag){case 5:return ca(e.type);case 16:return ca("Lazy");case 13:return ca("Suspense");case 19:return ca("SuspenseList");case 0:case 2:case 15:return e=md(e.type,!1),e;case 11:return e=md(e.type.render,!1),e;case 1:return e=md(e.type,!0),e;default:return""}}function df(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ao:return"Fragment";case Oo:return"Portal";case lf:return"Profiler";case hp:return"StrictMode";case uf:return"Suspense";case cf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case O0:return(e.displayName||"Context")+".Consumer";case L0:return(e._context.displayName||"Context")+".Provider";case pp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mp:return t=e.displayName||null,t!==null?t:df(e.type)||"Memo";case Wr:t=e._payload,e=e._init;try{return df(e(t))}catch{}}return null}function H2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return df(t);case 8:return t===hp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ws(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function T0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function G2(e){var t=T0(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ul(e){e._valueTracker||(e._valueTracker=G2(e))}function j0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=T0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Iu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ff(e,t){var n=t.checked;return Ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ws(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function D0(e,t){t=t.checked,t!=null&&fp(e,"checked",t,!1)}function hf(e,t){D0(e,t);var n=ws(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pf(e,t.type,n):t.hasOwnProperty("defaultValue")&&pf(e,t.type,ws(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Qm(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function pf(e,t,n){(t!=="number"||Iu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var da=Array.isArray;function Ho(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=$l.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Da(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var va={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},K2=["Webkit","ms","Moz","O"];Object.keys(va).forEach(function(e){K2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),va[t]=va[e]})});function z0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||va.hasOwnProperty(e)&&va[e]?(""+t).trim():t+"px"}function U0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=z0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var W2=Ke({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function yf(e,t){if(t){if(W2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function vf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xf=null;function gp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wf=null,Go=null,Ko=null;function Jm(e){if(e=gl(e)){if(typeof wf!="function")throw Error(U(280));var t=e.stateNode;t&&(t=Lc(t),wf(e.stateNode,e.type,t))}}function $0(e){Go?Ko?Ko.push(e):Ko=[e]:Go=e}function B0(){if(Go){var e=Go,t=Ko;if(Ko=Go=null,Jm(e),t)for(e=0;e>>=0,e===0?32:31-(sE(e)/oE|0)|0}var Bl=64,Vl=4194304;function fa(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Uu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=fa(a):(o&=i,o!==0&&(r=fa(o)))}else i=n&~s,i!==0?r=fa(i):o!==0&&(r=fa(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function pl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Vn(t),e[t]=n}function uE(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=wa),ag=" ",lg=!1;function l1(e,t){switch(e){case"keyup":return ME.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function u1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var To=!1;function zE(e,t){switch(e){case"compositionend":return u1(t);case"keypress":return t.which!==32?null:(lg=!0,ag);case"textInput":return e=t.data,e===ag&&lg?null:e;default:return null}}function UE(e,t){if(To)return e==="compositionend"||!_p&&l1(e,t)?(e=i1(),yu=bp=as=null,To=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=fg(n)}}function h1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?h1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function p1(){for(var e=window,t=Iu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Iu(e.document)}return t}function Cp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function QE(e){var t=p1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&h1(n.ownerDocument.documentElement,n)){if(r!==null&&Cp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=hg(n,o);var i=hg(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,jo=null,kf=null,Sa=null,Rf=!1;function pg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rf||jo==null||jo!==Iu(r)||(r=jo,"selectionStart"in r&&Cp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Sa&&$a(Sa,r)||(Sa=r,r=Vu(kf,"onSelect"),0Mo||(e.current=Tf[Mo],Tf[Mo]=null,Mo--)}function Me(e,t){Mo++,Tf[Mo]=e.current,e.current=t}var bs={},Mt=_s(bs),sn=_s(!1),eo=bs;function fi(e,t){var n=e.type.contextTypes;if(!n)return bs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function on(e){return e=e.childContextTypes,e!=null}function Gu(){Ue(sn),Ue(Mt)}function bg(e,t,n){if(Mt.current!==bs)throw Error(U(168));Me(Mt,t),Me(sn,n)}function E1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(U(108,H2(e)||"Unknown",s));return Ke({},n,r)}function Ku(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||bs,eo=Mt.current,Me(Mt,e),Me(sn,sn.current),!0}function Sg(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=E1(e,t,eo),r.__reactInternalMemoizedMergedChildContext=e,Ue(sn),Ue(Mt),Me(Mt,e)):Ue(sn),Me(sn,n)}var br=null,Oc=!1,Pd=!1;function _1(e){br===null?br=[e]:br.push(e)}function a_(e){Oc=!0,_1(e)}function Cs(){if(!Pd&&br!==null){Pd=!0;var e=0,t=je;try{var n=br;for(je=1;e>=i,s-=i,kr=1<<32-Vn(t)+s|n<k?(T=E,E=null):T=E.sibling;var P=f(m,E,v[k],S);if(P===null){E===null&&(E=T);break}e&&E&&P.alternate===null&&t(m,E),y=o(P,y,k),N===null?C=P:N.sibling=P,N=P,E=T}if(k===v.length)return n(m,E),Be&&Os(m,k),C;if(E===null){for(;kk?(T=E,E=null):T=E.sibling;var A=f(m,E,P.value,S);if(A===null){E===null&&(E=T);break}e&&E&&A.alternate===null&&t(m,E),y=o(A,y,k),N===null?C=A:N.sibling=A,N=A,E=T}if(P.done)return n(m,E),Be&&Os(m,k),C;if(E===null){for(;!P.done;k++,P=v.next())P=c(m,P.value,S),P!==null&&(y=o(P,y,k),N===null?C=P:N.sibling=P,N=P);return Be&&Os(m,k),C}for(E=r(m,E);!P.done;k++,P=v.next())P=g(E,m,k,P.value,S),P!==null&&(e&&P.alternate!==null&&E.delete(P.key===null?k:P.key),y=o(P,y,k),N===null?C=P:N.sibling=P,N=P);return e&&E.forEach(function(D){return t(m,D)}),Be&&Os(m,k),C}function b(m,y,v,S){if(typeof v=="object"&&v!==null&&v.type===Ao&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case zl:e:{for(var C=v.key,N=y;N!==null;){if(N.key===C){if(C=v.type,C===Ao){if(N.tag===7){n(m,N.sibling),y=s(N,v.props.children),y.return=m,m=y;break e}}else if(N.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Wr&&Cg(C)===N.type){n(m,N.sibling),y=s(N,v.props),y.ref=Yi(m,N,v),y.return=m,m=y;break e}n(m,N);break}else t(m,N);N=N.sibling}v.type===Ao?(y=Ys(v.props.children,m.mode,S,v.key),y.return=m,m=y):(S=Cu(v.type,v.key,v.props,null,m.mode,S),S.ref=Yi(m,y,v),S.return=m,m=S)}return i(m);case Oo:e:{for(N=v.key;y!==null;){if(y.key===N)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(m,y.sibling),y=s(y,v.children||[]),y.return=m,m=y;break e}else{n(m,y);break}else t(m,y);y=y.sibling}y=Md(v,m.mode,S),y.return=m,m=y}return i(m);case Wr:return N=v._init,b(m,y,N(v._payload),S)}if(da(v))return x(m,y,v,S);if(Ki(v))return w(m,y,v,S);Xl(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,y!==null&&y.tag===6?(n(m,y.sibling),y=s(y,v),y.return=m,m=y):(n(m,y),y=Id(v,m.mode,S),y.return=m,m=y),i(m)):n(m,y)}return b}var pi=N1(!0),P1=N1(!1),Qu=_s(null),Xu=null,Uo=null,Pp=null;function Lp(){Pp=Uo=Xu=null}function Op(e){var t=Qu.current;Ue(Qu),e._currentValue=t}function If(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function qo(e,t){Xu=e,Pp=Uo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(rn=!0),e.firstContext=null)}function Tn(e){var t=e._currentValue;if(Pp!==e)if(e={context:e,memoizedValue:t,next:null},Uo===null){if(Xu===null)throw Error(U(308));Uo=e,Xu.dependencies={lanes:0,firstContext:e}}else Uo=Uo.next=e;return t}var Is=null;function Ap(e){Is===null?Is=[e]:Is.push(e)}function L1(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Ap(t)):(n.next=s.next,s.next=n),t.interleaved=n,Tr(e,r)}function Tr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var qr=!1;function Tp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function O1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Nr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ps(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,_e&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Tr(e,n)}return s=r.interleaved,s===null?(t.next=t,Ap(r)):(t.next=s.next,s.next=t),r.interleaved=t,Tr(e,n)}function xu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vp(e,n)}}function kg(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Yu(e,t,n,r){var s=e.updateQueue;qr=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,i===null?o=u:i.next=u,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(o!==null){var c=s.baseState;i=0,d=u=l=null,a=o;do{var f=a.lane,g=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,w=a;switch(f=t,g=n,w.tag){case 1:if(x=w.payload,typeof x=="function"){c=x.call(g,c,f);break e}c=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=w.payload,f=typeof x=="function"?x.call(g,c,f):x,f==null)break e;c=Ke({},c,f);break e;case 2:qr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else g={eventTime:g,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=g,l=c):d=d.next=g,i|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(l=c),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);ro|=i,e.lanes=i,e.memoizedState=c}}function Rg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Od.transition;Od.transition={};try{e(!1),t()}finally{je=n,Od.transition=r}}function q1(){return jn().memoizedState}function d_(e,t,n){var r=gs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Q1(e))X1(t,n);else if(n=L1(e,t,n,r),n!==null){var s=Kt();Hn(n,e,r,s),Y1(n,t,r)}}function f_(e,t,n){var r=gs(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Q1(e))X1(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(s.hasEagerState=!0,s.eagerState=a,Kn(a,i)){var l=t.interleaved;l===null?(s.next=s,Ap(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=L1(e,t,s,r),n!==null&&(s=Kt(),Hn(n,e,r,s),Y1(n,t,r))}}function Q1(e){var t=e.alternate;return e===Ge||t!==null&&t===Ge}function X1(e,t){Ea=Zu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Y1(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vp(e,n)}}var ec={readContext:Tn,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useInsertionEffect:Lt,useLayoutEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useMutableSource:Lt,useSyncExternalStore:Lt,useId:Lt,unstable_isNewReconciler:!1},h_={readContext:Tn,useCallback:function(e,t){return rr().memoizedState=[e,t===void 0?null:t],e},useContext:Tn,useEffect:Pg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,bu(4194308,4,V1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return bu(4194308,4,e,t)},useInsertionEffect:function(e,t){return bu(4,2,e,t)},useMemo:function(e,t){var n=rr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=rr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=d_.bind(null,Ge,e),[r.memoizedState,e]},useRef:function(e){var t=rr();return e={current:e},t.memoizedState=e},useState:Ng,useDebugValue:$p,useDeferredValue:function(e){return rr().memoizedState=e},useTransition:function(){var e=Ng(!1),t=e[0];return e=c_.bind(null,e[1]),rr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ge,s=rr();if(Be){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),wt===null)throw Error(U(349));no&30||D1(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Pg(M1.bind(null,r,o,e),[e]),r.flags|=2048,Qa(9,I1.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=rr(),t=wt.identifierPrefix;if(Be){var n=Rr,r=kr;n=(r&~(1<<32-Vn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Wa++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[ar]=t,e[Ha]=r,ax(e,t,!1,!1),t.stateNode=e;e:{switch(i=vf(n,r),n){case"dialog":ze("cancel",e),ze("close",e),s=r;break;case"iframe":case"object":case"embed":ze("load",e),s=r;break;case"video":case"audio":for(s=0;syi&&(t.flags|=128,r=!0,Ji(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ju(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ji(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Be)return Ot(t),null}else 2*Je()-o.renderingStartTime>yi&&n!==1073741824&&(t.flags|=128,r=!0,Ji(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Je(),t.sibling=null,n=Ve.current,Me(Ve,r?n&1|2:n&1),t):(Ot(t),null);case 22:case 23:return Wp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?pn&1073741824&&(Ot(t),t.subtreeFlags&6&&(t.flags|=8192)):Ot(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function b_(e,t){switch(Rp(t),t.tag){case 1:return on(t.type)&&Gu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return mi(),Ue(sn),Ue(Mt),Ip(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Dp(t),null;case 13:if(Ue(Ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(Ve),null;case 4:return mi(),null;case 10:return Op(t.type._context),null;case 22:case 23:return Wp(),null;case 24:return null;default:return null}}var Jl=!1,jt=!1,S_=typeof WeakSet=="function"?WeakSet:Set,Z=null;function $o(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Xe(e,t,r)}else n.current=null}function Gf(e,t,n){try{n()}catch(r){Xe(e,t,r)}}var Ug=!1;function E_(e,t){if(Nf=$u,e=p1(),Cp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,u=0,d=0,c=e,f=null;t:for(;;){for(var g;c!==n||s!==0&&c.nodeType!==3||(a=i+s),c!==o||r!==0&&c.nodeType!==3||(l=i+r),c.nodeType===3&&(i+=c.nodeValue.length),(g=c.firstChild)!==null;)f=c,c=g;for(;;){if(c===e)break t;if(f===n&&++u===s&&(a=i),f===o&&++d===r&&(l=i),(g=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=g}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pf={focusedElem:e,selectionRange:n},$u=!1,Z=t;Z!==null;)if(t=Z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Z=e;else for(;Z!==null;){t=Z;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var w=x.memoizedProps,b=x.memoizedState,m=t.stateNode,y=m.getSnapshotBeforeUpdate(t.elementType===t.type?w:Fn(t.type,w),b);m.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(S){Xe(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Z=e;break}Z=t.return}return x=Ug,Ug=!1,x}function _a(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&Gf(t,n,o)}s=s.next}while(s!==r)}}function jc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Kf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function cx(e){var t=e.alternate;t!==null&&(e.alternate=null,cx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ar],delete t[Ha],delete t[Af],delete t[o_],delete t[i_])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function dx(e){return e.tag===5||e.tag===3||e.tag===4}function $g(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||dx(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Hu));else if(r!==4&&(e=e.child,e!==null))for(Wf(e,t,n),e=e.sibling;e!==null;)Wf(e,t,n),e=e.sibling}function qf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(qf(e,t,n),e=e.sibling;e!==null;)qf(e,t,n),e=e.sibling}var St=null,Un=!1;function $r(e,t,n){for(n=n.child;n!==null;)fx(e,t,n),n=n.sibling}function fx(e,t,n){if(ur&&typeof ur.onCommitFiberUnmount=="function")try{ur.onCommitFiberUnmount(kc,n)}catch{}switch(n.tag){case 5:jt||$o(n,t);case 6:var r=St,s=Un;St=null,$r(e,t,n),St=r,Un=s,St!==null&&(Un?(e=St,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):St.removeChild(n.stateNode));break;case 18:St!==null&&(Un?(e=St,n=n.stateNode,e.nodeType===8?Nd(e.parentNode,n):e.nodeType===1&&Nd(e,n),za(e)):Nd(St,n.stateNode));break;case 4:r=St,s=Un,St=n.stateNode.containerInfo,Un=!0,$r(e,t,n),St=r,Un=s;break;case 0:case 11:case 14:case 15:if(!jt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Gf(n,t,i),s=s.next}while(s!==r)}$r(e,t,n);break;case 1:if(!jt&&($o(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Xe(n,t,a)}$r(e,t,n);break;case 21:$r(e,t,n);break;case 22:n.mode&1?(jt=(r=jt)||n.memoizedState!==null,$r(e,t,n),jt=r):$r(e,t,n);break;default:$r(e,t,n)}}function Bg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new S_),t.forEach(function(r){var s=A_.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Mn(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=i),r&=~o}if(r=s,r=Je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*C_(r/1960))-r,10e?16:e,ls===null)var r=!1;else{if(e=ls,ls=null,rc=0,_e&6)throw Error(U(331));var s=_e;for(_e|=4,Z=e.current;Z!==null;){var o=Z,i=o.child;if(Z.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lJe()-Gp?Xs(e,0):Hp|=n),an(e,t)}function wx(e,t){t===0&&(e.mode&1?(t=Vl,Vl<<=1,!(Vl&130023424)&&(Vl=4194304)):t=1);var n=Kt();e=Tr(e,t),e!==null&&(pl(e,t,n),an(e,n))}function O_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),wx(e,n)}function A_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(U(314))}r!==null&&r.delete(t),wx(e,n)}var bx;bx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||sn.current)rn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return rn=!1,x_(e,t,n);rn=!!(e.flags&131072)}else rn=!1,Be&&t.flags&1048576&&C1(t,qu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Su(e,t),e=t.pendingProps;var s=fi(t,Mt.current);qo(t,n),s=Fp(null,t,r,e,s,n);var o=zp();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,on(r)?(o=!0,Ku(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Tp(t),s.updater=Tc,t.stateNode=s,s._reactInternals=t,Ff(t,r,e,n),t=$f(null,t,r,!0,o,n)):(t.tag=0,Be&&o&&kp(t),Ht(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Su(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=j_(r),e=Fn(r,e),s){case 0:t=Uf(null,t,r,e,n);break e;case 1:t=Mg(null,t,r,e,n);break e;case 11:t=Dg(null,t,r,e,n);break e;case 14:t=Ig(null,t,r,Fn(r.type,e),n);break e}throw Error(U(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Fn(r,s),Uf(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Fn(r,s),Mg(e,t,r,s,n);case 3:e:{if(sx(t),e===null)throw Error(U(387));r=t.pendingProps,o=t.memoizedState,s=o.element,O1(e,t),Yu(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=gi(Error(U(423)),t),t=Fg(e,t,r,n,s);break e}else if(r!==s){s=gi(Error(U(424)),t),t=Fg(e,t,r,n,s);break e}else for(wn=hs(t.stateNode.containerInfo.firstChild),bn=t,Be=!0,Bn=null,n=P1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(hi(),r===s){t=jr(e,t,n);break e}Ht(e,t,r,n)}t=t.child}return t;case 5:return A1(t),e===null&&Df(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Lf(r,s)?i=null:o!==null&&Lf(r,o)&&(t.flags|=32),rx(e,t),Ht(e,t,i,n),t.child;case 6:return e===null&&Df(t),null;case 13:return ox(e,t,n);case 4:return jp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=pi(t,null,r,n):Ht(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Fn(r,s),Dg(e,t,r,s,n);case 7:return Ht(e,t,t.pendingProps,n),t.child;case 8:return Ht(e,t,t.pendingProps.children,n),t.child;case 12:return Ht(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,Me(Qu,r._currentValue),r._currentValue=i,o!==null)if(Kn(o.value,i)){if(o.children===s.children&&!sn.current){t=jr(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Nr(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),If(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(U(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),If(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Ht(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,qo(t,n),s=Tn(s),r=r(s),t.flags|=1,Ht(e,t,r,n),t.child;case 14:return r=t.type,s=Fn(r,t.pendingProps),s=Fn(r.type,s),Ig(e,t,r,s,n);case 15:return tx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Fn(r,s),Su(e,t),t.tag=1,on(r)?(e=!0,Ku(t)):e=!1,qo(t,n),J1(t,r,s),Ff(t,r,s,n),$f(null,t,r,!0,e,n);case 19:return ix(e,t,n);case 22:return nx(e,t,n)}throw Error(U(156,t.tag))};function Sx(e,t){return Q0(e,t)}function T_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function On(e,t,n,r){return new T_(e,t,n,r)}function Qp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function j_(e){if(typeof e=="function")return Qp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===pp)return 11;if(e===mp)return 14}return 2}function ys(e,t){var n=e.alternate;return n===null?(n=On(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Cu(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")Qp(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ao:return Ys(n.children,s,o,t);case hp:i=8,s|=8;break;case lf:return e=On(12,n,t,s|2),e.elementType=lf,e.lanes=o,e;case uf:return e=On(13,n,t,s),e.elementType=uf,e.lanes=o,e;case cf:return e=On(19,n,t,s),e.elementType=cf,e.lanes=o,e;case A0:return Ic(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case L0:i=10;break e;case O0:i=9;break e;case pp:i=11;break e;case mp:i=14;break e;case Wr:i=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=On(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function Ys(e,t,n,r){return e=On(7,e,r,t),e.lanes=n,e}function Ic(e,t,n,r){return e=On(22,e,r,t),e.elementType=A0,e.lanes=n,e.stateNode={isHidden:!1},e}function Id(e,t,n){return e=On(6,e,null,t),e.lanes=n,e}function Md(e,t,n){return t=On(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function D_(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yd(0),this.expirationTimes=yd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yd(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Xp(e,t,n,r,s,o,i,a,l){return e=new D_(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=On(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Tp(o),e}function I_(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kx)}catch(e){console.error(e)}}kx(),k0.exports=En;var Dt=k0.exports;const $_=p0(Dt),B_=h0({__proto__:null,default:$_},[Dt]);var Rx,Xg=Dt;Rx=Xg.createRoot,Xg.hydrateRoot;var Pi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},$s,Jr,Jo,n0,V_=(n0=class extends Pi{constructor(){super();oe(this,$s);oe(this,Jr);oe(this,Jo);W(this,Jo,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){_(this,Jr)||this.setEventListener(_(this,Jo))}onUnsubscribe(){var t;this.hasListeners()||((t=_(this,Jr))==null||t.call(this),W(this,Jr,void 0))}setEventListener(t){var n;W(this,Jo,t),(n=_(this,Jr))==null||n.call(this),W(this,Jr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){_(this,$s)!==t&&(W(this,$s,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof _(this,$s)=="boolean"?_(this,$s):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},$s=new WeakMap,Jr=new WeakMap,Jo=new WeakMap,n0),em=new V_,H_={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Zr,op,r0,G_=(r0=class{constructor(){oe(this,Zr,H_);oe(this,op,!1)}setTimeoutProvider(e){W(this,Zr,e)}setTimeout(e,t){return _(this,Zr).setTimeout(e,t)}clearTimeout(e){_(this,Zr).clearTimeout(e)}setInterval(e,t){return _(this,Zr).setInterval(e,t)}clearInterval(e){_(this,Zr).clearInterval(e)}},Zr=new WeakMap,op=new WeakMap,r0),Fs=new G_;function K_(e){setTimeout(e,0)}var W_=typeof window>"u"||"Deno"in globalThis;function Gt(){}function q_(e,t){return typeof e=="function"?e(t):e}function Zf(e){return typeof e=="number"&&e>=0&&e!==1/0}function Nx(e,t){return Math.max(e+(t||0)-Date.now(),0)}function vs(e,t){return typeof e=="function"?e(t):e}function yn(e,t){return typeof e=="function"?e(t):e}function Yg(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:i,stale:a}=e;if(i){if(r){if(t.queryHash!==tm(i,t.options))return!1}else if(!vi(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||o&&!o(t))}function Jg(e,t){const{exact:n,status:r,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(oo(t.options.mutationKey)!==oo(o))return!1}else if(!vi(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function tm(e,t){return((t==null?void 0:t.queryKeyHashFn)||oo)(e)}function oo(e){return JSON.stringify(e,(t,n)=>eh(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function vi(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){for(let r=0;r500)return t;const r=Zg(e)&&Zg(t);if(!r&&!(eh(e)&&eh(t)))return t;const o=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),a=i.length,l=r?new Array(a):{};let u=0;for(let d=0;d{Fs.setTimeout(t,e)})}function th(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Px(e,t):t}function u3(e){return e}function Y_(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function J_(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var nm=Symbol();function Lx(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===nm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function rm(e,t){return typeof e=="function"?e(...t):!!e}function Z_(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var Ya=(()=>{let e=()=>W_;return{isServer(){return e()},setIsServer(t){e=t}}})();function nh(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var eC=K_;function tC(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=eC;const o=a=>{t?e.push(a):s(()=>{n(a)})},i=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var ct=tC(),Zo,es,ei,s0,nC=(s0=class extends Pi{constructor(){super();oe(this,Zo,!0);oe(this,es);oe(this,ei);W(this,ei,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){_(this,es)||this.setEventListener(_(this,ei))}onUnsubscribe(){var t;this.hasListeners()||((t=_(this,es))==null||t.call(this),W(this,es,void 0))}setEventListener(t){var n;W(this,ei,t),(n=_(this,es))==null||n.call(this),W(this,es,t(this.setOnline.bind(this)))}setOnline(t){_(this,Zo)!==t&&(W(this,Zo,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return _(this,Zo)}},Zo=new WeakMap,es=new WeakMap,ei=new WeakMap,s0),ac=new nC;function rC(e){return Math.min(1e3*2**e,3e4)}function Ox(e){return(e??"online")==="online"?ac.isOnline():!0}var rh=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ax(e){let t=!1,n=0,r;const s=nh(),o=()=>s.status!=="pending",i=w=>{var b;if(!o()){const m=new rh(w);f(m),(b=e.onCancel)==null||b.call(e,m)}},a=()=>{t=!0},l=()=>{t=!1},u=()=>em.isFocused()&&(e.networkMode==="always"||ac.isOnline())&&e.canRun(),d=()=>Ox(e.networkMode)&&e.canRun(),c=w=>{o()||(r==null||r(),s.resolve(w))},f=w=>{o()||(r==null||r(),s.reject(w))},g=()=>new Promise(w=>{var b;r=m=>{(o()||u())&&w(m)},(b=e.onPause)==null||b.call(e)}).then(()=>{var w;r=void 0,o()||(w=e.onContinue)==null||w.call(e)}),x=()=>{if(o())return;let w;const b=n===0?e.initialPromise:void 0;try{w=b??e.fn()}catch(m){w=Promise.reject(m)}Promise.resolve(w).then(c).catch(m=>{var N;if(o())return;const y=e.retry??(Ya.isServer()?0:3),v=e.retryDelay??rC,S=typeof v=="function"?v(n,m):v,C=y===!0||typeof y=="number"&&nu()?void 0:g()).then(()=>{t?f(m):x()})})};return{promise:s,status:()=>s.status,cancel:i,continue:()=>(r==null||r(),s),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?x():g().then(x),s)}}var Bs,o0,Tx=(o0=class{constructor(){oe(this,Bs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zf(this.gcTime)&&W(this,Bs,Fs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ya.isServer()?1/0:5*60*1e3))}clearGcTimeout(){_(this,Bs)!==void 0&&(Fs.clearTimeout(_(this,Bs)),W(this,Bs,void 0))}},Bs=new WeakMap,o0);function sC(e){return{onFetch:(t,n)=>{var d,c,f,g,x;const r=t.options,s=(f=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:f.direction,o=((g=t.state.data)==null?void 0:g.pages)||[],i=((x=t.state.data)==null?void 0:x.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let w=!1;const b=v=>{Z_(v,()=>t.signal,()=>w=!0)},m=Lx(t.options,t.fetchOptions),y=async(v,S,C)=>{if(w)return Promise.reject(t.signal.reason);if(S==null&&v.pages.length)return Promise.resolve(v);const E=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};return b(A),A})(),k=await m(E),{maxPages:T}=t.options,P=C?J_:Y_;return{pages:P(v.pages,k,T),pageParams:P(v.pageParams,S,T)}};if(s&&o.length){const v=s==="backward",S=v?oC:ty,C={pages:o,pageParams:i},N=S(r,C);a=await y(C,N,v)}else{const v=e??o.length;do{const S=l===0?i[0]??r.initialPageParam:ty(r,a);if(l>0&&S==null)break;a=await y(a,S),l++}while(l{var w,b;return(b=(w=t.options).persister)==null?void 0:b.call(w,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function ty(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function oC(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var ti,Vs,ni,kn,Hs,gt,al,Gs,mn,jx,vr,i0,iC=(i0=class extends Tx{constructor(t){super();oe(this,mn);oe(this,ti);oe(this,Vs);oe(this,ni);oe(this,kn);oe(this,Hs);oe(this,gt);oe(this,al);oe(this,Gs);W(this,Gs,!1),W(this,al,t.defaultOptions),this.setOptions(t.options),this.observers=[],W(this,Hs,t.client),W(this,kn,_(this,Hs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,W(this,Vs,ry(this.options)),this.state=t.state??_(this,Vs),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return _(this,ti)}get promise(){var t;return(t=_(this,gt))==null?void 0:t.promise}setOptions(t){if(this.options={..._(this,al),...t},t!=null&&t._type&&W(this,ti,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=ry(this.options);n.data!==void 0&&(this.setState(ny(n.data,n.dataUpdatedAt)),W(this,Vs,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_(this,kn).remove(this)}setData(t,n){const r=th(this.state.data,t,this.options);return pe(this,mn,vr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){pe(this,mn,vr).call(this,{type:"setState",state:t})}cancel(t){var r,s;const n=(r=_(this,gt))==null?void 0:r.promise;return(s=_(this,gt))==null||s.cancel(t),n?n.then(Gt).catch(Gt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return _(this,Vs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>yn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>vs(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Nx(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=_(this,gt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=_(this,gt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),_(this,kn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(_(this,gt)&&(_(this,Gs)||pe(this,mn,jx).call(this)?_(this,gt).cancel({revert:!0}):_(this,gt).cancelRetry()),this.scheduleGc()),_(this,kn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||pe(this,mn,vr).call(this,{type:"invalidate"})}async fetch(t,n){var u,d,c,f,g,x,w,b,m,y,v;if(this.state.fetchStatus!=="idle"&&((u=_(this,gt))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(_(this,gt))return _(this,gt).continueRetry(),_(this,gt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(C=>C.options.queryFn);S&&this.setOptions(S.options)}const r=new AbortController,s=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(W(this,Gs,!0),r.signal)})},o=()=>{const S=Lx(this.options,n),N=(()=>{const E={client:_(this,Hs),queryKey:this.queryKey,meta:this.meta};return s(E),E})();return W(this,Gs,!1),this.options.persister?this.options.persister(S,N,this):S(N)},a=(()=>{const S={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:_(this,Hs),state:this.state,fetchFn:o};return s(S),S})(),l=_(this,ti)==="infinite"?sC(this.options.pages):this.options.behavior;l==null||l.onFetch(a,this),W(this,ni,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&pe(this,mn,vr).call(this,{type:"fetch",meta:(c=a.fetchOptions)==null?void 0:c.meta}),W(this,gt,Ax({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:S=>{S instanceof rh&&S.revert&&this.setState({..._(this,ni),fetchStatus:"idle"}),r.abort()},onFail:(S,C)=>{pe(this,mn,vr).call(this,{type:"failed",failureCount:S,error:C})},onPause:()=>{pe(this,mn,vr).call(this,{type:"pause"})},onContinue:()=>{pe(this,mn,vr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const S=await _(this,gt).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(g=(f=_(this,kn).config).onSuccess)==null||g.call(f,S,this),(w=(x=_(this,kn).config).onSettled)==null||w.call(x,S,this.state.error,this),S}catch(S){if(S instanceof rh){if(S.silent)return _(this,gt).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw pe(this,mn,vr).call(this,{type:"error",error:S}),(m=(b=_(this,kn).config).onError)==null||m.call(b,S,this),(v=(y=_(this,kn).config).onSettled)==null||v.call(y,this.state.data,S,this),S}finally{this.scheduleGc()}}},ti=new WeakMap,Vs=new WeakMap,ni=new WeakMap,kn=new WeakMap,Hs=new WeakMap,gt=new WeakMap,al=new WeakMap,Gs=new WeakMap,mn=new WeakSet,jx=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},vr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Dx(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...ny(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return W(this,ni,t.manual?s:void 0),s;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ct.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),_(this,kn).notify({query:this,type:"updated",action:t})})},i0);function Dx(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ox(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ny(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ry(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Jt,be,ll,Vt,Ks,ri,Sr,ts,ul,si,oi,Ws,qs,ns,ii,Oe,pa,sh,oh,ih,ah,lh,uh,ch,Ix,a0,aC=(a0=class extends Pi{constructor(t,n){super();oe(this,Oe);oe(this,Jt);oe(this,be);oe(this,ll);oe(this,Vt);oe(this,Ks);oe(this,ri);oe(this,Sr);oe(this,ts);oe(this,ul);oe(this,si);oe(this,oi);oe(this,Ws);oe(this,qs);oe(this,ns);oe(this,ii,new Set);this.options=n,W(this,Jt,t),W(this,ts,null),W(this,Sr,nh()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(this,be).addObserver(this),sy(_(this,be),this.options)?pe(this,Oe,pa).call(this):this.updateResult(),pe(this,Oe,ah).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return dh(_(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return dh(_(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,pe(this,Oe,lh).call(this),pe(this,Oe,uh).call(this),_(this,be).removeObserver(this)}setOptions(t){const n=this.options,r=_(this,be);if(this.options=_(this,Jt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yn(this.options.enabled,_(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");pe(this,Oe,ch).call(this),_(this,be).setOptions(this.options),n._defaulted&&!ic(this.options,n)&&_(this,Jt).getQueryCache().notify({type:"observerOptionsUpdated",query:_(this,be),observer:this});const s=this.hasListeners();s&&oy(_(this,be),r,this.options,n)&&pe(this,Oe,pa).call(this),this.updateResult(),s&&(_(this,be)!==r||yn(this.options.enabled,_(this,be))!==yn(n.enabled,_(this,be))||vs(this.options.staleTime,_(this,be))!==vs(n.staleTime,_(this,be)))&&pe(this,Oe,sh).call(this);const o=pe(this,Oe,oh).call(this);s&&(_(this,be)!==r||yn(this.options.enabled,_(this,be))!==yn(n.enabled,_(this,be))||o!==_(this,ns))&&pe(this,Oe,ih).call(this,o)}getOptimisticResult(t){const n=_(this,Jt).getQueryCache().build(_(this,Jt),t),r=this.createResult(n,t);return uC(this,r)&&(W(this,Vt,r),W(this,ri,this.options),W(this,Ks,_(this,be).state)),r}getCurrentResult(){return _(this,Vt)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&_(this,Sr).status==="pending"&&_(this,Sr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){_(this,ii).add(t)}getCurrentQuery(){return _(this,be)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=_(this,Jt).defaultQueryOptions(t),r=_(this,Jt).getQueryCache().build(_(this,Jt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return pe(this,Oe,pa).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),_(this,Vt)))}createResult(t,n){var T;const r=_(this,be),s=this.options,o=_(this,Vt),i=_(this,Ks),a=_(this,ri),u=t!==r?t.state:_(this,ll),{state:d}=t;let c={...d},f=!1,g;if(n._optimisticResults){const P=this.hasListeners(),A=!P&&sy(t,n),D=P&&oy(t,r,n,s);(A||D)&&(c={...c,...Dx(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:x,errorUpdatedAt:w,status:b}=c;g=c.data;let m=!1;if(n.placeholderData!==void 0&&g===void 0&&b==="pending"){let P;o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(P=o.data,m=!0):P=typeof n.placeholderData=="function"?n.placeholderData((T=_(this,oi))==null?void 0:T.state.data,_(this,oi)):n.placeholderData,P!==void 0&&(b="success",g=th(o==null?void 0:o.data,P,n),f=!0)}if(n.select&&g!==void 0&&!m)if(o&&g===(i==null?void 0:i.data)&&n.select===_(this,ul))g=_(this,si);else try{W(this,ul,n.select),g=n.select(g),g=th(o==null?void 0:o.data,g,n),W(this,si,g),W(this,ts,null)}catch(P){W(this,ts,P)}_(this,ts)&&(x=_(this,ts),g=_(this,si),w=Date.now(),b="error");const y=c.fetchStatus==="fetching",v=b==="pending",S=b==="error",C=v&&y,N=g!==void 0,k={status:b,fetchStatus:c.fetchStatus,isPending:v,isSuccess:b==="success",isError:S,isInitialLoading:C,isLoading:C,data:g,dataUpdatedAt:c.dataUpdatedAt,error:x,errorUpdatedAt:w,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:y,isRefetching:y&&!v,isLoadingError:S&&!N,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&N,isStale:sm(t,n),refetch:this.refetch,promise:_(this,Sr),isEnabled:yn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=k.data!==void 0,A=k.status==="error"&&!P,D=le=>{A?le.reject(k.error):P&&le.resolve(k.data)},F=()=>{const le=W(this,Sr,k.promise=nh());D(le)},H=_(this,Sr);switch(H.status){case"pending":t.queryHash===r.queryHash&&D(H);break;case"fulfilled":(A||k.data!==H.value)&&F();break;case"rejected":(!A||k.error!==H.reason)&&F();break}}return k}updateResult(){const t=_(this,Vt),n=this.createResult(_(this,be),this.options);if(W(this,Ks,_(this,be).state),W(this,ri,this.options),_(this,Ks).data!==void 0&&W(this,oi,_(this,be)),ic(n,t))return;W(this,Vt,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!_(this,ii).size)return!0;const i=new Set(o??_(this,ii));return this.options.throwOnError&&i.add("error"),Object.keys(_(this,Vt)).some(a=>{const l=a;return _(this,Vt)[l]!==t[l]&&i.has(l)})};pe(this,Oe,Ix).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&pe(this,Oe,ah).call(this)}},Jt=new WeakMap,be=new WeakMap,ll=new WeakMap,Vt=new WeakMap,Ks=new WeakMap,ri=new WeakMap,Sr=new WeakMap,ts=new WeakMap,ul=new WeakMap,si=new WeakMap,oi=new WeakMap,Ws=new WeakMap,qs=new WeakMap,ns=new WeakMap,ii=new WeakMap,Oe=new WeakSet,pa=function(t){pe(this,Oe,ch).call(this);let n=_(this,be).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Gt)),n},sh=function(){pe(this,Oe,lh).call(this);const t=vs(this.options.staleTime,_(this,be));if(Ya.isServer()||_(this,Vt).isStale||!Zf(t))return;const r=Nx(_(this,Vt).dataUpdatedAt,t)+1;W(this,Ws,Fs.setTimeout(()=>{_(this,Vt).isStale||this.updateResult()},r))},oh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(_(this,be)):this.options.refetchInterval)??!1},ih=function(t){pe(this,Oe,uh).call(this),W(this,ns,t),!(Ya.isServer()||yn(this.options.enabled,_(this,be))===!1||!Zf(_(this,ns))||_(this,ns)===0)&&W(this,qs,Fs.setInterval(()=>{(this.options.refetchIntervalInBackground||em.isFocused())&&pe(this,Oe,pa).call(this)},_(this,ns)))},ah=function(){pe(this,Oe,sh).call(this),pe(this,Oe,ih).call(this,pe(this,Oe,oh).call(this))},lh=function(){_(this,Ws)!==void 0&&(Fs.clearTimeout(_(this,Ws)),W(this,Ws,void 0))},uh=function(){_(this,qs)!==void 0&&(Fs.clearInterval(_(this,qs)),W(this,qs,void 0))},ch=function(){const t=_(this,Jt).getQueryCache().build(_(this,Jt),this.options);if(t===_(this,be))return;const n=_(this,be);W(this,be,t),W(this,ll,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Ix=function(t){ct.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(_(this,Vt))}),_(this,Jt).getQueryCache().notify({query:_(this,be),type:"observerResultsUpdated"})})},a0);function lC(e,t){return yn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&yn(t.retryOnMount,e)===!1)}function sy(e,t){return lC(e,t)||e.state.data!==void 0&&dh(e,t,t.refetchOnMount)}function dh(e,t,n){if(yn(t.enabled,e)!==!1&&vs(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&sm(e,t)}return!1}function oy(e,t,n,r){return(e!==t||yn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&sm(e,n)}function sm(e,t){return yn(t.enabled,e)!==!1&&e.isStaleByTime(vs(t.staleTime,e))}function uC(e,t){return!ic(e.getCurrentResult(),t)}var cl,sr,Tt,Qs,or,Hr,l0,cC=(l0=class extends Tx{constructor(t){super();oe(this,or);oe(this,cl);oe(this,sr);oe(this,Tt);oe(this,Qs);W(this,cl,t.client),this.mutationId=t.mutationId,W(this,Tt,t.mutationCache),W(this,sr,[]),this.state=t.state||Mx(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){_(this,sr).includes(t)||(_(this,sr).push(t),this.clearGcTimeout(),_(this,Tt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){W(this,sr,_(this,sr).filter(n=>n!==t)),this.scheduleGc(),_(this,Tt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){_(this,sr).length||(this.state.status==="pending"?this.scheduleGc():_(this,Tt).remove(this))}continue(){var t;return((t=_(this,Qs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,l,u,d,c,f,g,x,w,b,m,y,v,S,C,N,E;const n=()=>{pe(this,or,Hr).call(this,{type:"continue"})},r={client:_(this,cl),meta:this.options.meta,mutationKey:this.options.mutationKey};W(this,Qs,Ax({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(k,T)=>{pe(this,or,Hr).call(this,{type:"failed",failureCount:k,error:T})},onPause:()=>{pe(this,or,Hr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_(this,Tt).canRun(this)}));const s=this.state.status==="pending",o=!_(this,Qs).canStart();try{if(s)n();else{pe(this,or,Hr).call(this,{type:"pending",variables:t,isPaused:o}),_(this,Tt).config.onMutate&&await _(this,Tt).config.onMutate(t,this,r);const T=await((a=(i=this.options).onMutate)==null?void 0:a.call(i,t,r));T!==this.state.context&&pe(this,or,Hr).call(this,{type:"pending",context:T,variables:t,isPaused:o})}const k=await _(this,Qs).start();return await((u=(l=_(this,Tt).config).onSuccess)==null?void 0:u.call(l,k,t,this.state.context,this,r)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(d,k,t,this.state.context,r)),await((g=(f=_(this,Tt).config).onSettled)==null?void 0:g.call(f,k,null,this.state.variables,this.state.context,this,r)),await((w=(x=this.options).onSettled)==null?void 0:w.call(x,k,null,t,this.state.context,r)),pe(this,or,Hr).call(this,{type:"success",data:k}),k}catch(k){try{await((m=(b=_(this,Tt).config).onError)==null?void 0:m.call(b,k,t,this.state.context,this,r))}catch(T){Promise.reject(T)}try{await((v=(y=this.options).onError)==null?void 0:v.call(y,k,t,this.state.context,r))}catch(T){Promise.reject(T)}try{await((C=(S=_(this,Tt).config).onSettled)==null?void 0:C.call(S,void 0,k,this.state.variables,this.state.context,this,r))}catch(T){Promise.reject(T)}try{await((E=(N=this.options).onSettled)==null?void 0:E.call(N,void 0,k,t,this.state.context,r))}catch(T){Promise.reject(T)}throw pe(this,or,Hr).call(this,{type:"error",error:k}),k}finally{_(this,Tt).runNext(this)}}},cl=new WeakMap,sr=new WeakMap,Tt=new WeakMap,Qs=new WeakMap,or=new WeakSet,Hr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ct.batch(()=>{_(this,sr).forEach(r=>{r.onMutationUpdate(t)}),_(this,Tt).notify({mutation:this,type:"updated",action:t})})},l0);function Mx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Er,zn,dl,u0,Fx=(u0=class extends Pi{constructor(t={}){super();oe(this,Er);oe(this,zn);oe(this,dl);this.config=t,W(this,Er,new Set),W(this,zn,new Map),W(this,dl,0)}build(t,n,r){const s=new cC({client:t,mutationCache:this,mutationId:++Ml(this,dl)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){_(this,Er).add(t);const n=tu(t);if(typeof n=="string"){const r=_(this,zn).get(n);r?r.push(t):_(this,zn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(_(this,Er).delete(t)){const n=tu(t);if(typeof n=="string"){const r=_(this,zn).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&_(this,zn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=tu(t);if(typeof n=="string"){const r=_(this,zn).get(n),s=r==null?void 0:r.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=tu(t);if(typeof n=="string"){const s=(r=_(this,zn).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ct.batch(()=>{_(this,Er).forEach(t=>{this.notify({type:"removed",mutation:t})}),_(this,Er).clear(),_(this,zn).clear()})}getAll(){return Array.from(_(this,Er))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Jg(n,r))}findAll(t={}){return this.getAll().filter(n=>Jg(t,n))}notify(t){ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ct.batch(()=>Promise.all(t.map(n=>n.continue().catch(Gt))))}},Er=new WeakMap,zn=new WeakMap,dl=new WeakMap,u0);function tu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var _r,rs,Zt,Cr,Lr,ku,fh,c0,dC=(c0=class extends Pi{constructor(n,r){super();oe(this,Lr);oe(this,_r);oe(this,rs);oe(this,Zt);oe(this,Cr);W(this,_r,n),this.setOptions(r),this.bindMethods(),pe(this,Lr,ku).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=_(this,_r).defaultMutationOptions(n),ic(this.options,r)||_(this,_r).getMutationCache().notify({type:"observerOptionsUpdated",mutation:_(this,Zt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&oo(r.mutationKey)!==oo(this.options.mutationKey)?this.reset():((s=_(this,Zt))==null?void 0:s.state.status)==="pending"&&_(this,Zt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=_(this,Zt))==null||n.removeObserver(this)}onMutationUpdate(n){pe(this,Lr,ku).call(this),pe(this,Lr,fh).call(this,n)}getCurrentResult(){return _(this,rs)}reset(){var n;(n=_(this,Zt))==null||n.removeObserver(this),W(this,Zt,void 0),pe(this,Lr,ku).call(this),pe(this,Lr,fh).call(this)}mutate(n,r){var s;return W(this,Cr,r),(s=_(this,Zt))==null||s.removeObserver(this),W(this,Zt,_(this,_r).getMutationCache().build(_(this,_r),this.options)),_(this,Zt).addObserver(this),_(this,Zt).execute(n)}},_r=new WeakMap,rs=new WeakMap,Zt=new WeakMap,Cr=new WeakMap,Lr=new WeakSet,ku=function(){var r;const n=((r=_(this,Zt))==null?void 0:r.state)??Mx();W(this,rs,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},fh=function(n){ct.batch(()=>{var r,s,o,i,a,l,u,d;if(_(this,Cr)&&this.hasListeners()){const c=_(this,rs).variables,f=_(this,rs).context,g={client:_(this,_r),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(r=_(this,Cr)).onSuccess)==null||s.call(r,n.data,c,f,g)}catch(x){Promise.reject(x)}try{(i=(o=_(this,Cr)).onSettled)==null||i.call(o,n.data,null,c,f,g)}catch(x){Promise.reject(x)}}else if((n==null?void 0:n.type)==="error"){try{(l=(a=_(this,Cr)).onError)==null||l.call(a,n.error,c,f,g)}catch(x){Promise.reject(x)}try{(d=(u=_(this,Cr)).onSettled)==null||d.call(u,void 0,n.error,c,f,g)}catch(x){Promise.reject(x)}}}this.listeners.forEach(c=>{c(_(this,rs))})})},c0),ir,d0,fC=(d0=class extends Pi{constructor(t={}){super();oe(this,ir);this.config=t,W(this,ir,new Map)}build(t,n,r){const s=n.queryKey,o=n.queryHash??tm(s,n);let i=this.get(o);return i||(i=new iC({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){_(this,ir).has(t.queryHash)||(_(this,ir).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=_(this,ir).get(t.queryHash);n&&(t.destroy(),n===t&&_(this,ir).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return _(this,ir).get(t)}getAll(){return[..._(this,ir).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Yg(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Yg(t,r)):n}notify(t){ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ct.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ct.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ir=new WeakMap,d0),Qe,ss,os,ai,li,is,ui,ci,f0,hC=(f0=class{constructor(e={}){oe(this,Qe);oe(this,ss);oe(this,os);oe(this,ai);oe(this,li);oe(this,is);oe(this,ui);oe(this,ci);W(this,Qe,e.queryCache||new fC),W(this,ss,e.mutationCache||new Fx),W(this,os,e.defaultOptions||{}),W(this,ai,new Map),W(this,li,new Map),W(this,is,0)}mount(){Ml(this,is)._++,_(this,is)===1&&(W(this,ui,em.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,Qe).onFocus())})),W(this,ci,ac.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,Qe).onOnline())})))}unmount(){var e,t;Ml(this,is)._--,_(this,is)===0&&((e=_(this,ui))==null||e.call(this),W(this,ui,void 0),(t=_(this,ci))==null||t.call(this),W(this,ci,void 0))}isFetching(e){return _(this,Qe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return _(this,ss).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=_(this,Qe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=_(this,Qe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(vs(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return _(this,Qe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=_(this,Qe).get(r.queryHash),o=s==null?void 0:s.state.data,i=q_(t,o);if(i!==void 0)return _(this,Qe).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return ct.batch(()=>_(this,Qe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=_(this,Qe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=_(this,Qe);ct.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=_(this,Qe);return ct.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ct.batch(()=>_(this,Qe).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Gt).catch(Gt)}invalidateQueries(e,t={}){return ct.batch(()=>(_(this,Qe).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ct.batch(()=>_(this,Qe).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Gt)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Gt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=_(this,Qe).build(this,t);return n.isStaleByTime(vs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Gt).catch(Gt)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Gt).catch(Gt)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return ac.isOnline()?_(this,ss).resumePausedMutations():Promise.resolve()}getQueryCache(){return _(this,Qe)}getMutationCache(){return _(this,ss)}getDefaultOptions(){return _(this,os)}setDefaultOptions(e){W(this,os,e)}setQueryDefaults(e,t){_(this,ai).set(oo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[..._(this,ai).values()],n={};return t.forEach(r=>{vi(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){_(this,li).set(oo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[..._(this,li).values()],n={};return t.forEach(r=>{vi(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={..._(this,os).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=tm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===nm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{..._(this,os).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){_(this,Qe).clear(),_(this,ss).clear()}},Qe=new WeakMap,ss=new WeakMap,os=new WeakMap,ai=new WeakMap,li=new WeakMap,is=new WeakMap,ui=new WeakMap,ci=new WeakMap,f0),zx=p.createContext(void 0),Dn=e=>{const t=p.useContext(zx);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},pC=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(zx.Provider,{value:e,children:t})),Ux=p.createContext(!1),mC=()=>p.useContext(Ux);Ux.Provider;function gC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var yC=p.createContext(gC()),vC=()=>p.useContext(yC),xC=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?rm(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},wC=e=>{p.useEffect(()=>{e.clearReset()},[e])},bC=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||rm(n,[e.error,r])),SC=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},EC=(e,t)=>e.isLoading&&e.isFetching&&!t,_C=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,iy=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function CC(e,t,n){var g,x,w,b;const r=mC(),s=vC(),o=Dn(),i=o.defaultQueryOptions(e);(x=(g=o.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||x.call(g,i);const a=o.getQueryCache().get(i.queryHash),l=e.subscribed!==!1;i._optimisticResults=r?"isRestoring":l?"optimistic":void 0,SC(i),xC(i,s,a),wC(s);const u=!o.getQueryCache().get(i.queryHash),[d]=p.useState(()=>new t(o,i)),c=d.getOptimisticResult(i),f=!r&&l;if(p.useSyncExternalStore(p.useCallback(m=>{const y=f?d.subscribe(ct.batchCalls(m)):Gt;return d.updateResult(),y},[d,f]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),p.useEffect(()=>{d.setOptions(i)},[i,d]),_C(i,c))throw iy(i,d,s);if(bC({result:c,errorResetBoundary:s,throwOnError:i.throwOnError,query:a,suspense:i.suspense}))throw c.error;if((b=(w=o.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||b.call(w,i,c),i.experimental_prefetchInRender&&!Ya.isServer()&&EC(c,r)){const m=u?iy(i,d,s):a==null?void 0:a.promise;m==null||m.catch(Gt).finally(()=>{d.updateResult()})}return i.notifyOnChangeProps?c:d.trackResult(c)}function kt(e,t){return CC(e,aC)}function He(e,t){const n=Dn(),[r]=p.useState(()=>new dC(n,e));p.useEffect(()=>{r.setOptions(e)},[r,e]);const s=p.useSyncExternalStore(p.useCallback(i=>r.subscribe(ct.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=p.useCallback((i,a)=>{r.mutate(i,a).catch(Gt)},[r]);if(s.error&&rm(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function $e(){return $e=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function io(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function RC(){return Math.random().toString(36).substr(2,8)}function ly(e,t){return{usr:e.state,key:e.key,idx:t}}function Ja(e,t,n,r){return n===void 0&&(n=null),$e({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ks(t):t,{state:n,key:t&&t.key||r||RC()})}function ao(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 ks(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 NC(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,a=rt.Pop,l=null,u=d();u==null&&(u=0,i.replaceState($e({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function c(){a=rt.Pop;let b=d(),m=b==null?null:b-u;u=b,l&&l({action:a,location:w.location,delta:m})}function f(b,m){a=rt.Push;let y=Ja(w.location,b,m);u=d()+1;let v=ly(y,u),S=w.createHref(y);try{i.pushState(v,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(S)}o&&l&&l({action:a,location:w.location,delta:1})}function g(b,m){a=rt.Replace;let y=Ja(w.location,b,m);u=d();let v=ly(y,u),S=w.createHref(y);i.replaceState(v,"",S),o&&l&&l({action:a,location:w.location,delta:0})}function x(b){let m=s.location.origin!=="null"?s.location.origin:s.location.href,y=typeof b=="string"?b:ao(b);return y=y.replace(/ $/,"%20"),ge(m,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,m)}let w={get action(){return a},get location(){return e(s,i)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(ay,c),l=b,()=>{s.removeEventListener(ay,c),l=null}},createHref(b){return t(s,b)},createURL:x,encodeLocation(b){let m=x(b);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:g,go(b){return i.go(b)}};return w}var Te;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Te||(Te={}));const PC=new Set(["lazy","caseSensitive","path","id","index","children"]);function LC(e){return e.index===!0}function lc(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((s,o)=>{let i=[...n,String(o)],a=typeof s.id=="string"?s.id:i.join("-");if(ge(s.index!==!0||!s.children,"Cannot specify children on an index route"),ge(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),LC(s)){let l=$e({},s,t(s),{id:a});return r[a]=l,l}else{let l=$e({},s,t(s),{id:a,children:void 0});return r[a]=l,s.children&&(l.children=lc(s.children,t,i,r)),l}})}function Ts(e,t,n){return n===void 0&&(n="/"),Ru(e,t,n,!1)}function Ru(e,t,n,r){let s=typeof t=="string"?ks(t):t,o=Wn(s.pathname||"/",n);if(o==null)return null;let i=$x(e);AC(i);let a=null,l=VC(o);for(let u=0;a==null&&u{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(ge(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Pr([r,l.relativePath]),d=n.concat(l);o.children&&o.children.length>0&&(ge(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),$x(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:zC(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of Bx(o.path))s(o,i,l)}),t}function Bx(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=Bx(r.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function AC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:UC(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const TC=/^:[\w-]+$/,jC=3,DC=2,IC=1,MC=10,FC=-2,uy=e=>e==="*";function zC(e,t){let n=e.split("/"),r=n.length;return n.some(uy)&&(r+=FC),t&&(r+=DC),n.filter(s=>!uy(s)).reduce((s,o)=>s+(TC.test(o)?jC:o===""?IC:MC),r)}function UC(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function $C(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},o="/",i=[];for(let a=0;a{let{paramName:f,isOptional:g}=d;if(f==="*"){let w=a[c]||"";i=o.slice(0,o.length-w.length).replace(/(.)\/+$/,"$1")}const x=a[c];return g&&!x?u[f]=void 0:u[f]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function BC(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),io(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=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function VC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return io(!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 Wn(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)||"/"}const HC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,GC=e=>HC.test(e);function KC(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?ks(e):e,o;if(n)if(GC(n))o=n;else{if(n.includes("//")){let i=n;n=om(n),io(!1,"Pathnames cannot have embedded double slashes - normalizing "+(i+" -> "+n))}n.startsWith("/")?o=cy(n.substring(1),"/"):o=cy(n,t)}else o=t;return{pathname:o,search:qC(r),hash:QC(s)}}function cy(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Fd(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 and the router will parse it for you.'}function Vx(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function $c(e,t){let n=Vx(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Bc(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=ks(e):(s=$e({},e),ge(!s.pathname||!s.pathname.includes("?"),Fd("?","pathname","search",s)),ge(!s.pathname||!s.pathname.includes("#"),Fd("#","pathname","hash",s)),ge(!s.search||!s.search.includes("#"),Fd("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=n;else{let c=t.length-1;if(!r&&i.startsWith("..")){let f=i.split("/");for(;f[0]==="..";)f.shift(),c-=1;s.pathname=f.join("/")}a=c>=0?t[c]:"/"}let l=KC(s,a),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const om=e=>e.replace(/\/\/+/g,"/"),Pr=e=>om(e.join("/")),WC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),qC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,QC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class cc{constructor(t,n,r,s){s===void 0&&(s=!1),this.status=t,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Za(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Hx=["post","put","patch","delete"],XC=new Set(Hx),YC=["get",...Hx],JC=new Set(YC),ZC=new Set([301,302,303,307,308]),ek=new Set([307,308]),zd={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},tk={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Po={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},im=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,nk=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Gx="remix-router-transitions";function rk(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;ge(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(e.mapRouteProperties)s=e.mapRouteProperties;else if(e.detectErrorBoundary){let R=e.detectErrorBoundary;s=O=>({hasErrorBoundary:R(O)})}else s=nk;let o={},i=lc(e.routes,s,void 0,o),a,l=e.basename||"/",u=e.dataStrategy||ak,d=e.patchRoutesOnNavigation,c=$e({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),f=null,g=new Set,x=null,w=null,b=null,m=e.hydrationData!=null,y=Ts(i,e.history.location,l),v=!1,S=null;if(y==null&&!d){let R=en(404,{pathname:e.history.location.pathname}),{matches:O,route:j}=by(i);y=O,S={[j.id]:R}}y&&!e.hydrationData&&mt(y,i,e.history.location.pathname).active&&(y=null);let C;if(y)if(y.some(R=>R.route.lazy))C=!1;else if(!y.some(R=>R.route.loader))C=!0;else if(c.v7_partialHydration){let R=e.hydrationData?e.hydrationData.loaderData:null,O=e.hydrationData?e.hydrationData.errors:null;if(O){let j=y.findIndex(M=>O[M.route.id]!==void 0);C=y.slice(0,j+1).every(M=>!ph(M.route,R,O))}else C=y.every(j=>!ph(j.route,R,O))}else C=e.hydrationData!=null;else if(C=!1,y=[],c.v7_partialHydration){let R=mt(null,i,e.history.location.pathname);R.active&&R.matches&&(v=!0,y=R.matches)}let N,E={historyAction:e.history.action,location:e.history.location,matches:y,initialized:C,navigation:zd,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},k=rt.Pop,T=!1,P,A=!1,D=new Map,F=null,H=!1,le=!1,X=[],ne=new Set,I=new Map,V=0,G=-1,Y=new Map,ce=new Set,Pe=new Map,Re=new Map,Ae=new Set,re=new Map,Le=new Map,ft;function Xt(){if(f=e.history.listen(R=>{let{action:O,location:j,delta:M}=R;if(ft){ft(),ft=void 0;return}io(Le.size===0||M!=null,"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 K=jl({currentLocation:E.location,nextLocation:j,historyAction:O});if(K&&M!=null){let te=new Promise(de=>{ft=de});e.history.go(M*-1),wo(K,{state:"blocked",location:j,proceed(){wo(K,{state:"proceeding",proceed:void 0,reset:void 0,location:j}),te.then(()=>e.history.go(M))},reset(){let de=new Map(E.blockers);de.set(K,Po),we({blockers:de})}});return}return ue(O,j)}),n){bk(t,D);let R=()=>Sk(t,D);t.addEventListener("pagehide",R),F=()=>t.removeEventListener("pagehide",R)}return E.initialized||ue(rt.Pop,E.location,{initialHydration:!0}),N}function Ce(){f&&f(),F&&F(),g.clear(),P&&P.abort(),E.fetchers.forEach((R,O)=>hn(O)),E.blockers.forEach((R,O)=>$i(O))}function Xn(R){return g.add(R),()=>g.delete(R)}function we(R,O){O===void 0&&(O={}),E=$e({},E,R);let j=[],M=[];c.v7_fetcherPersist&&E.fetchers.forEach((K,te)=>{K.state==="idle"&&(Ae.has(te)?M.push(te):j.push(te))}),Ae.forEach(K=>{!E.fetchers.has(K)&&!I.has(K)&&M.push(K)}),[...g].forEach(K=>K(E,{deletedFetchers:M,viewTransitionOpts:O.viewTransitionOpts,flushSync:O.flushSync===!0})),c.v7_fetcherPersist?(j.forEach(K=>E.fetchers.delete(K)),M.forEach(K=>hn(K))):M.forEach(K=>Ae.delete(K))}function Rt(R,O,j){var M,K;let{flushSync:te}=j===void 0?{}:j,de=E.actionData!=null&&E.navigation.formMethod!=null&&$n(E.navigation.formMethod)&&E.navigation.state==="loading"&&((M=R.state)==null?void 0:M._isRedirect)!==!0,J;O.actionData?Object.keys(O.actionData).length>0?J=O.actionData:J=null:de?J=E.actionData:J=null;let se=O.loaderData?xy(E.loaderData,O.loaderData,O.matches||[],O.errors):E.loaderData,ee=E.blockers;ee.size>0&&(ee=new Map(ee),ee.forEach((Ee,bt)=>ee.set(bt,Po)));let ae=T===!0||E.navigation.formMethod!=null&&$n(E.navigation.formMethod)&&((K=R.state)==null?void 0:K._isRedirect)!==!0;a&&(i=a,a=void 0),H||k===rt.Pop||(k===rt.Push?e.history.push(R,R.state):k===rt.Replace&&e.history.replace(R,R.state));let he;if(k===rt.Pop){let Ee=D.get(E.location.pathname);Ee&&Ee.has(R.pathname)?he={currentLocation:E.location,nextLocation:R}:D.has(R.pathname)&&(he={currentLocation:R,nextLocation:E.location})}else if(A){let Ee=D.get(E.location.pathname);Ee?Ee.add(R.pathname):(Ee=new Set([R.pathname]),D.set(E.location.pathname,Ee)),he={currentLocation:E.location,nextLocation:R}}we($e({},O,{actionData:J,loaderData:se,historyAction:k,location:R,initialized:!0,navigation:zd,revalidation:"idle",restoreScrollPosition:$t(R,O.matches||E.matches),preventScrollReset:ae,blockers:ee}),{viewTransitionOpts:he,flushSync:te===!0}),k=rt.Pop,T=!1,A=!1,H=!1,le=!1,X=[]}async function Nt(R,O){if(typeof R=="number"){e.history.go(R);return}let j=hh(E.location,E.matches,l,c.v7_prependBasename,R,c.v7_relativeSplatPath,O==null?void 0:O.fromRouteId,O==null?void 0:O.relative),{path:M,submission:K,error:te}=dy(c.v7_normalizeFormMethod,!1,j,O),de=E.location,J=Ja(E.location,M,O&&O.state);J=$e({},J,e.history.encodeLocation(J));let se=O&&O.replace!=null?O.replace:void 0,ee=rt.Push;se===!0?ee=rt.Replace:se===!1||K!=null&&$n(K.formMethod)&&K.formAction===E.location.pathname+E.location.search&&(ee=rt.Replace);let ae=O&&"preventScrollReset"in O?O.preventScrollReset===!0:void 0,he=(O&&O.flushSync)===!0,Ee=jl({currentLocation:de,nextLocation:J,historyAction:ee});if(Ee){wo(Ee,{state:"blocked",location:J,proceed(){wo(Ee,{state:"proceeding",proceed:void 0,reset:void 0,location:J}),Nt(R,O)},reset(){let bt=new Map(E.blockers);bt.set(Ee,Po),we({blockers:bt})}});return}return await ue(ee,J,{submission:K,pendingError:te,preventScrollReset:ae,replace:O&&O.replace,enableViewTransition:O&&O.viewTransition,flushSync:he})}function ht(){if(Jn(),we({revalidation:"loading"}),E.navigation.state!=="submitting"){if(E.navigation.state==="idle"){ue(E.historyAction,E.location,{startUninterruptedRevalidation:!0});return}ue(k||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation,enableViewTransition:A===!0})}}async function ue(R,O,j){P&&P.abort(),P=null,k=R,H=(j&&j.startUninterruptedRevalidation)===!0,er(E.location,E.matches),T=(j&&j.preventScrollReset)===!0,A=(j&&j.enableViewTransition)===!0;let M=a||i,K=j&&j.overrideNavigation,te=j!=null&&j.initialHydration&&E.matches&&E.matches.length>0&&!v?E.matches:Ts(M,O,l),de=(j&&j.flushSync)===!0;if(te&&E.initialized&&!le&&hk(E.location,O)&&!(j&&j.submission&&$n(j.submission.formMethod))){Rt(O,{matches:te},{flushSync:de});return}let J=mt(te,M,O.pathname);if(J.active&&J.matches&&(te=J.matches),!te){let{error:De,notFoundMatches:Ne,route:We}=Bi(O.pathname);Rt(O,{matches:Ne,loaderData:{},errors:{[We.id]:De}},{flushSync:de});return}P=new AbortController;let se=Co(e.history,O,P.signal,j&&j.submission),ee;if(j&&j.pendingError)ee=[js(te).route.id,{type:Te.error,error:j.pendingError}];else if(j&&j.submission&&$n(j.submission.formMethod)){let De=await pt(se,O,j.submission,te,J.active,{replace:j.replace,flushSync:de});if(De.shortCircuited)return;if(De.pendingActionResult){let[Ne,We]=De.pendingActionResult;if(vn(We)&&Za(We.error)&&We.error.status===404){P=null,Rt(O,{matches:De.matches,loaderData:{},errors:{[Ne]:We.error}});return}}te=De.matches||te,ee=De.pendingActionResult,K=Ud(O,j.submission),de=!1,J.active=!1,se=Co(e.history,se.url,se.signal)}let{shortCircuited:ae,matches:he,loaderData:Ee,errors:bt}=await dn(se,O,te,J.active,K,j&&j.submission,j&&j.fetcherSubmission,j&&j.replace,j&&j.initialHydration===!0,de,ee);ae||(P=null,Rt(O,$e({matches:he||te},wy(ee),{loaderData:Ee,errors:bt})))}async function pt(R,O,j,M,K,te){te===void 0&&(te={}),Jn();let de=xk(O,j);if(we({navigation:de},{flushSync:te.flushSync===!0}),K){let ee=await Bt(M,O.pathname,R.signal);if(ee.type==="aborted")return{shortCircuited:!0};if(ee.type==="error"){let ae=js(ee.partialMatches).route.id;return{matches:ee.partialMatches,pendingActionResult:[ae,{type:Te.error,error:ee.error}]}}else if(ee.matches)M=ee.matches;else{let{notFoundMatches:ae,error:he,route:Ee}=Bi(O.pathname);return{matches:ae,pendingActionResult:[Ee.id,{type:Te.error,error:he}]}}}let J,se=ma(M,O);if(!se.route.action&&!se.route.lazy)J={type:Te.error,error:en(405,{method:R.method,pathname:O.pathname,routeId:se.route.id})};else if(J=(await Rs("action",E,R,[se],M,null))[se.route.id],R.signal.aborted)return{shortCircuited:!0};if(zs(J)){let ee;return te&&te.replace!=null?ee=te.replace:ee=gy(J.response.headers.get("Location"),new URL(R.url),l,e.history)===E.location.pathname+E.location.search,await Yn(R,J,!0,{submission:j,replace:ee}),{shortCircuited:!0}}if(us(J))throw en(400,{type:"defer-action"});if(vn(J)){let ee=js(M,se.route.id);return(te&&te.replace)!==!0&&(k=rt.Push),{matches:M,pendingActionResult:[ee.route.id,J]}}return{matches:M,pendingActionResult:[se.route.id,J]}}async function dn(R,O,j,M,K,te,de,J,se,ee,ae){let he=K||Ud(O,te),Ee=te||de||Ey(he),bt=!H&&(!c.v7_partialHydration||!se);if(M){if(bt){let qe=Yt(ae);we($e({navigation:he},qe!==void 0?{actionData:qe}:{}),{flushSync:ee})}let ke=await Bt(j,O.pathname,R.signal);if(ke.type==="aborted")return{shortCircuited:!0};if(ke.type==="error"){let qe=js(ke.partialMatches).route.id;return{matches:ke.partialMatches,loaderData:{},errors:{[qe]:ke.error}}}else if(ke.matches)j=ke.matches;else{let{error:qe,notFoundMatches:So,route:Gi}=Bi(O.pathname);return{matches:So,loaderData:{},errors:{[Gi.id]:qe}}}}let De=a||i,[Ne,We]=hy(e.history,E,j,Ee,O,c.v7_partialHydration&&se===!0,c.v7_skipActionErrorRevalidation,le,X,ne,Ae,Pe,ce,De,l,ae);if(et(ke=>!(j&&j.some(qe=>qe.route.id===ke))||Ne&&Ne.some(qe=>qe.route.id===ke)),G=++V,Ne.length===0&&We.length===0){let ke=xo();return Rt(O,$e({matches:j,loaderData:{},errors:ae&&vn(ae[1])?{[ae[0]]:ae[1].error}:null},wy(ae),ke?{fetchers:new Map(E.fetchers)}:{}),{flushSync:ee}),{shortCircuited:!0}}if(bt){let ke={};if(!M){ke.navigation=he;let qe=Yt(ae);qe!==void 0&&(ke.actionData=qe)}We.length>0&&(ke.fetchers=fn(We)),we(ke,{flushSync:ee})}We.forEach(ke=>{Zn(ke.key),ke.controller&&I.set(ke.key,ke.controller)});let bo=()=>We.forEach(ke=>Zn(ke.key));P&&P.signal.addEventListener("abort",bo);let{loaderResults:Vi,fetcherResults:gr}=await Ol(E,j,Ne,We,R);if(R.signal.aborted)return{shortCircuited:!0};P&&P.signal.removeEventListener("abort",bo),We.forEach(ke=>I.delete(ke.key));let tr=nu(Vi);if(tr)return await Yn(R,tr.result,!0,{replace:J}),{shortCircuited:!0};if(tr=nu(gr),tr)return ce.add(tr.key),await Yn(R,tr.result,!0,{replace:J}),{shortCircuited:!0};let{loaderData:cd,errors:Hi}=vy(E,j,Vi,ae,We,gr,re);re.forEach((ke,qe)=>{ke.subscribe(So=>{(So||ke.done)&&re.delete(qe)})}),c.v7_partialHydration&&se&&E.errors&&(Hi=$e({},E.errors,Hi));let Ns=xo(),Dl=Ui(G),Il=Ns||Dl||We.length>0;return $e({matches:j,loaderData:cd,errors:Hi},Il?{fetchers:new Map(E.fetchers)}:{})}function Yt(R){if(R&&!vn(R[1]))return{[R[0]]:R[1].data};if(E.actionData)return Object.keys(E.actionData).length===0?null:E.actionData}function fn(R){return R.forEach(O=>{let j=E.fetchers.get(O.key),M=ea(void 0,j?j.data:void 0);E.fetchers.set(O.key,M)}),new Map(E.fetchers)}function zr(R,O,j,M){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.");Zn(R);let K=(M&&M.flushSync)===!0,te=a||i,de=hh(E.location,E.matches,l,c.v7_prependBasename,j,c.v7_relativeSplatPath,O,M==null?void 0:M.relative),J=Ts(te,de,l),se=mt(J,te,de);if(se.active&&se.matches&&(J=se.matches),!J){zt(R,O,en(404,{pathname:de}),{flushSync:K});return}let{path:ee,submission:ae,error:he}=dy(c.v7_normalizeFormMethod,!0,de,M);if(he){zt(R,O,he,{flushSync:K});return}let Ee=ma(J,ee),bt=(M&&M.preventScrollReset)===!0;if(ae&&$n(ae.formMethod)){Cn(R,O,ee,Ee,J,se.active,K,bt,ae);return}Pe.set(R,{routeId:O,path:ee}),Ll(R,O,ee,Ee,J,se.active,K,bt,ae)}async function Cn(R,O,j,M,K,te,de,J,se){Jn(),Pe.delete(R);function ee(tt){if(!tt.route.action&&!tt.route.lazy){let Eo=en(405,{method:se.formMethod,pathname:j,routeId:O});return zt(R,O,Eo,{flushSync:de}),!0}return!1}if(!te&&ee(M))return;let ae=E.fetchers.get(R);Ft(R,wk(se,ae),{flushSync:de});let he=new AbortController,Ee=Co(e.history,j,he.signal,se);if(te){let tt=await Bt(K,new URL(Ee.url).pathname,Ee.signal,R);if(tt.type==="aborted")return;if(tt.type==="error"){zt(R,O,tt.error,{flushSync:de});return}else if(tt.matches){if(K=tt.matches,M=ma(K,j),ee(M))return}else{zt(R,O,en(404,{pathname:j}),{flushSync:de});return}}I.set(R,he);let bt=V,Ne=(await Rs("action",E,Ee,[M],K,R))[M.route.id];if(Ee.signal.aborted){I.get(R)===he&&I.delete(R);return}if(c.v7_fetcherPersist&&Ae.has(R)){if(zs(Ne)||vn(Ne)){Ft(R,Gr(void 0));return}}else{if(zs(Ne))if(I.delete(R),G>bt){Ft(R,Gr(void 0));return}else return ce.add(R),Ft(R,ea(se)),Yn(Ee,Ne,!1,{fetcherSubmission:se,preventScrollReset:J});if(vn(Ne)){zt(R,O,Ne.error);return}}if(us(Ne))throw en(400,{type:"defer-action"});let We=E.navigation.location||E.location,bo=Co(e.history,We,he.signal),Vi=a||i,gr=E.navigation.state!=="idle"?Ts(Vi,E.navigation.location,l):E.matches;ge(gr,"Didn't find any matches after fetcher action");let tr=++V;Y.set(R,tr);let cd=ea(se,Ne.data);E.fetchers.set(R,cd);let[Hi,Ns]=hy(e.history,E,gr,se,We,!1,c.v7_skipActionErrorRevalidation,le,X,ne,Ae,Pe,ce,Vi,l,[M.route.id,Ne]);Ns.filter(tt=>tt.key!==R).forEach(tt=>{let Eo=tt.key,Um=E.fetchers.get(Eo),m2=ea(void 0,Um?Um.data:void 0);E.fetchers.set(Eo,m2),Zn(Eo),tt.controller&&I.set(Eo,tt.controller)}),we({fetchers:new Map(E.fetchers)});let Dl=()=>Ns.forEach(tt=>Zn(tt.key));he.signal.addEventListener("abort",Dl);let{loaderResults:Il,fetcherResults:ke}=await Ol(E,gr,Hi,Ns,bo);if(he.signal.aborted)return;he.signal.removeEventListener("abort",Dl),Y.delete(R),I.delete(R),Ns.forEach(tt=>I.delete(tt.key));let qe=nu(Il);if(qe)return Yn(bo,qe.result,!1,{preventScrollReset:J});if(qe=nu(ke),qe)return ce.add(qe.key),Yn(bo,qe.result,!1,{preventScrollReset:J});let{loaderData:So,errors:Gi}=vy(E,gr,Il,void 0,Ns,ke,re);if(E.fetchers.has(R)){let tt=Gr(Ne.data);E.fetchers.set(R,tt)}Ui(tr),E.navigation.state==="loading"&&tr>G?(ge(k,"Expected pending action"),P&&P.abort(),Rt(E.navigation.location,{matches:gr,loaderData:So,errors:Gi,fetchers:new Map(E.fetchers)})):(we({errors:Gi,loaderData:xy(E.loaderData,So,gr,Gi),fetchers:new Map(E.fetchers)}),le=!1)}async function Ll(R,O,j,M,K,te,de,J,se){let ee=E.fetchers.get(R);Ft(R,ea(se,ee?ee.data:void 0),{flushSync:de});let ae=new AbortController,he=Co(e.history,j,ae.signal);if(te){let Ne=await Bt(K,new URL(he.url).pathname,he.signal,R);if(Ne.type==="aborted")return;if(Ne.type==="error"){zt(R,O,Ne.error,{flushSync:de});return}else if(Ne.matches)K=Ne.matches,M=ma(K,j);else{zt(R,O,en(404,{pathname:j}),{flushSync:de});return}}I.set(R,ae);let Ee=V,De=(await Rs("loader",E,he,[M],K,R))[M.route.id];if(us(De)&&(De=await am(De,he.signal,!0)||De),I.get(R)===ae&&I.delete(R),!he.signal.aborted){if(Ae.has(R)){Ft(R,Gr(void 0));return}if(zs(De))if(G>Ee){Ft(R,Gr(void 0));return}else{ce.add(R),await Yn(he,De,!1,{preventScrollReset:J});return}if(vn(De)){zt(R,O,De.error);return}ge(!us(De),"Unhandled fetcher deferred data"),Ft(R,Gr(De.data))}}async function Yn(R,O,j,M){let{submission:K,fetcherSubmission:te,preventScrollReset:de,replace:J}=M===void 0?{}:M;O.response.headers.has("X-Remix-Revalidate")&&(le=!0);let se=O.response.headers.get("Location");ge(se,"Expected a Location header on the redirect Response"),se=gy(se,new URL(R.url),l,e.history);let ee=Ja(E.location,se,{_isRedirect:!0});if(n){let Ne=!1;if(O.response.headers.has("X-Remix-Reload-Document"))Ne=!0;else if(im.test(se)){const We=e.history.createURL(se);Ne=We.origin!==t.location.origin||Wn(We.pathname,l)==null}if(Ne){J?t.location.replace(se):t.location.assign(se);return}}P=null;let ae=J===!0||O.response.headers.has("X-Remix-Replace")?rt.Replace:rt.Push,{formMethod:he,formAction:Ee,formEncType:bt}=E.navigation;!K&&!te&&he&&Ee&&bt&&(K=Ey(E.navigation));let De=K||te;if(ek.has(O.response.status)&&De&&$n(De.formMethod))await ue(ae,ee,{submission:$e({},De,{formAction:se}),preventScrollReset:de||T,enableViewTransition:j?A:void 0});else{let Ne=Ud(ee,K);await ue(ae,ee,{overrideNavigation:Ne,fetcherSubmission:te,preventScrollReset:de||T,enableViewTransition:j?A:void 0})}}async function Rs(R,O,j,M,K,te){let de,J={};try{de=await lk(u,R,O,j,M,K,te,o,s)}catch(se){return M.forEach(ee=>{J[ee.route.id]={type:Te.error,error:se}}),J}for(let[se,ee]of Object.entries(de))if(pk(ee)){let ae=ee.result;J[se]={type:Te.redirect,response:dk(ae,j,se,K,l,c.v7_relativeSplatPath)}}else J[se]=await ck(ee);return J}async function Ol(R,O,j,M,K){let te=R.matches,de=Rs("loader",R,K,j,O,null),J=Promise.all(M.map(async ae=>{if(ae.matches&&ae.match&&ae.controller){let Ee=(await Rs("loader",R,Co(e.history,ae.path,ae.controller.signal),[ae.match],ae.matches,ae.key))[ae.match.route.id];return{[ae.key]:Ee}}else return Promise.resolve({[ae.key]:{type:Te.error,error:en(404,{pathname:ae.path})}})})),se=await de,ee=(await J).reduce((ae,he)=>Object.assign(ae,he),{});return await Promise.all([yk(O,se,K.signal,te,R.loaderData),vk(O,ee,M)]),{loaderResults:se,fetcherResults:ee}}function Jn(){le=!0,X.push(...et()),Pe.forEach((R,O)=>{I.has(O)&&ne.add(O),Zn(O)})}function Ft(R,O,j){j===void 0&&(j={}),E.fetchers.set(R,O),we({fetchers:new Map(E.fetchers)},{flushSync:(j&&j.flushSync)===!0})}function zt(R,O,j,M){M===void 0&&(M={});let K=js(E.matches,O);hn(R),we({errors:{[K.route.id]:j},fetchers:new Map(E.fetchers)},{flushSync:(M&&M.flushSync)===!0})}function zi(R){return Re.set(R,(Re.get(R)||0)+1),Ae.has(R)&&Ae.delete(R),E.fetchers.get(R)||tk}function hn(R){let O=E.fetchers.get(R);I.has(R)&&!(O&&O.state==="loading"&&Y.has(R))&&Zn(R),Pe.delete(R),Y.delete(R),ce.delete(R),c.v7_fetcherPersist&&Ae.delete(R),ne.delete(R),E.fetchers.delete(R)}function Al(R){let O=(Re.get(R)||0)-1;O<=0?(Re.delete(R),Ae.add(R),c.v7_fetcherPersist||hn(R)):Re.set(R,O),we({fetchers:new Map(E.fetchers)})}function Zn(R){let O=I.get(R);O&&(O.abort(),I.delete(R))}function Tl(R){for(let O of R){let j=zi(O),M=Gr(j.data);E.fetchers.set(O,M)}}function xo(){let R=[],O=!1;for(let j of ce){let M=E.fetchers.get(j);ge(M,"Expected fetcher: "+j),M.state==="loading"&&(ce.delete(j),R.push(j),O=!0)}return Tl(R),O}function Ui(R){let O=[];for(let[j,M]of Y)if(M0}function ud(R,O){let j=E.blockers.get(R)||Po;return Le.get(R)!==O&&Le.set(R,O),j}function $i(R){E.blockers.delete(R),Le.delete(R)}function wo(R,O){let j=E.blockers.get(R)||Po;ge(j.state==="unblocked"&&O.state==="blocked"||j.state==="blocked"&&O.state==="blocked"||j.state==="blocked"&&O.state==="proceeding"||j.state==="blocked"&&O.state==="unblocked"||j.state==="proceeding"&&O.state==="unblocked","Invalid blocker state transition: "+j.state+" -> "+O.state);let M=new Map(E.blockers);M.set(R,O),we({blockers:M})}function jl(R){let{currentLocation:O,nextLocation:j,historyAction:M}=R;if(Le.size===0)return;Le.size>1&&io(!1,"A router only supports one blocker at a time");let K=Array.from(Le.entries()),[te,de]=K[K.length-1],J=E.blockers.get(te);if(!(J&&J.state==="proceeding")&&de({currentLocation:O,nextLocation:j,historyAction:M}))return te}function Bi(R){let O=en(404,{pathname:R}),j=a||i,{matches:M,route:K}=by(j);return et(),{notFoundMatches:M,route:K,error:O}}function et(R){let O=[];return re.forEach((j,M)=>{(!R||R(M))&&(j.cancel(),O.push(M),re.delete(M))}),O}function Ut(R,O,j){if(x=R,b=O,w=j||null,!m&&E.navigation===zd){m=!0;let M=$t(E.location,E.matches);M!=null&&we({restoreScrollPosition:M})}return()=>{x=null,b=null,w=null}}function Pt(R,O){return w&&w(R,O.map(M=>OC(M,E.loaderData)))||R.key}function er(R,O){if(x&&b){let j=Pt(R,O);x[j]=b()}}function $t(R,O){if(x){let j=Pt(R,O),M=x[j];if(typeof M=="number")return M}return null}function mt(R,O,j){if(d)if(R){if(Object.keys(R[0].params).length>0)return{active:!0,matches:Ru(O,j,l,!0)}}else return{active:!0,matches:Ru(O,j,l,!0)||[]};return{active:!1,matches:null}}async function Bt(R,O,j,M){if(!d)return{type:"success",matches:R};let K=R;for(;;){let te=a==null,de=a||i,J=o;try{await d({signal:j,path:O,matches:K,fetcherKey:M,patch:(ae,he)=>{j.aborted||my(ae,he,de,J,s)}})}catch(ae){return{type:"error",error:ae,partialMatches:K}}finally{te&&!j.aborted&&(i=[...i])}if(j.aborted)return{type:"aborted"};let se=Ts(de,O,l);if(se)return{type:"success",matches:se};let ee=Ru(de,O,l,!0);if(!ee||K.length===ee.length&&K.every((ae,he)=>ae.route.id===ee[he].route.id))return{type:"success",matches:null};K=ee}}function Ur(R){o={},a=lc(R,s,void 0,o)}function ot(R,O){let j=a==null;my(R,O,a||i,o,s),j&&(i=[...i],we({}))}return N={get basename(){return l},get future(){return c},get state(){return E},get routes(){return i},get window(){return t},initialize:Xt,subscribe:Xn,enableScrollRestoration:Ut,navigate:Nt,fetch:zr,revalidate:ht,createHref:R=>e.history.createHref(R),encodeLocation:R=>e.history.encodeLocation(R),getFetcher:zi,deleteFetcher:Al,dispose:Ce,getBlocker:ud,deleteBlocker:$i,patchRoutes:ot,_internalFetchControllers:I,_internalActiveDeferreds:re,_internalSetRoutes:Ur},N}function sk(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function hh(e,t,n,r,s,o,i,a){let l,u;if(i){l=[];for(let c of t)if(l.push(c),c.route.id===i){u=c;break}}else l=t,u=t[t.length-1];let d=Bc(s||".",$c(l,o),Wn(e.pathname,n)||e.pathname,a==="path");if(s==null&&(d.search=e.search,d.hash=e.hash),(s==null||s===""||s===".")&&u){let c=lm(d.search);if(u.route.index&&!c)d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&c){let f=new URLSearchParams(d.search),g=f.getAll("index");f.delete("index"),g.filter(w=>w).forEach(w=>f.append("index",w));let x=f.toString();d.search=x?"?"+x:""}}return r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Pr([n,d.pathname])),ao(d)}function dy(e,t,n,r){if(!r||!sk(r))return{path:n};if(r.formMethod&&!gk(r.formMethod))return{path:n,error:en(405,{method:r.formMethod})};let s=()=>({path:n,error:en(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=qx(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!$n(i))return s();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((g,x)=>{let[w,b]=x;return""+g+w+"="+b+` `},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!$n(i))return s();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return s()}}}ge(typeof FormData=="function","FormData is not available in this environment");let l,u;if(r.formData)l=mh(r.formData),u=r.formData;else if(r.body instanceof FormData)l=mh(r.body),u=r.body;else if(r.body instanceof URLSearchParams)l=r.body,u=yy(l);else if(r.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(r.body),u=yy(l)}catch{return s()}let d={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if($n(d.formMethod))return{path:n,submission:d};let c=ks(n);return t&&c.search&&lm(c.search)&&l.append("index",""),c.search="?"+l,{path:ao(c),submission:d}}function fy(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(s=>s.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function hy(e,t,n,r,s,o,i,a,l,u,d,c,f,g,x,w){let b=w?vn(w[1])?w[1].error:w[1].data:void 0,m=e.createURL(t.location),y=e.createURL(s),v=n;o&&t.errors?v=fy(n,Object.keys(t.errors)[0],!0):w&&vn(w[1])&&(v=fy(n,w[0]));let S=w?w[1].statusCode:void 0,C=i&&S&&S>=400,N=v.filter((k,T)=>{let{route:P}=k;if(P.lazy)return!0;if(P.loader==null)return!1;if(o)return ph(P,t.loaderData,t.errors);if(ok(t.loaderData,t.matches[T],k)||l.some(F=>F===k.route.id))return!0;let A=t.matches[T],D=k;return py(k,$e({currentUrl:m,currentParams:A.params,nextUrl:y,nextParams:D.params},r,{actionResult:b,actionStatus:S,defaultShouldRevalidate:C?!1:a||m.pathname+m.search===y.pathname+y.search||m.search!==y.search||Kx(A,D)}))}),E=[];return c.forEach((k,T)=>{if(o||!n.some(H=>H.route.id===k.routeId)||d.has(T))return;let P=Ts(g,k.path,x);if(!P){E.push({key:T,routeId:k.routeId,path:k.path,matches:null,match:null,controller:null});return}let A=t.fetchers.get(T),D=ma(P,k.path),F=!1;f.has(T)?F=!1:u.has(T)?(u.delete(T),F=!0):A&&A.state!=="idle"&&A.data===void 0?F=a:F=py(D,$e({currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:n[n.length-1].params},r,{actionResult:b,actionStatus:S,defaultShouldRevalidate:C?!1:a})),F&&E.push({key:T,routeId:k.routeId,path:k.path,matches:P,match:D,controller:new AbortController})}),[N,E]}function ph(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,s=n!=null&&n[e.id]!==void 0;return!r&&s?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!s}function ok(e,t,n){let r=!t||n.route.id!==t.route.id,s=e[n.route.id]===void 0;return r||s}function Kx(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function py(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function my(e,t,n,r,s){var o;let i;if(e){let u=r[e];ge(u,"No route found to patch children into: routeId = "+e),u.children||(u.children=[]),i=u.children}else i=n;let a=t.filter(u=>!i.some(d=>Wx(u,d))),l=lc(a,s,[e||"_","patch",String(((o=i)==null?void 0:o.length)||"0")],r);i.push(...l)}function Wx(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var s;return(s=t.children)==null?void 0:s.some(o=>Wx(n,o))}):!1}async function ik(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let s=n[e.id];ge(s,"No route found in manifest");let o={};for(let i in r){let l=s[i]!==void 0&&i!=="hasErrorBoundary";io(!l,'Route "'+s.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!l&&!PC.has(i)&&(o[i]=r[i])}Object.assign(s,o),Object.assign(s,$e({},t(s),{lazy:void 0}))}async function ak(e){let{matches:t}=e,n=t.filter(s=>s.shouldLoad);return(await Promise.all(n.map(s=>s.resolve()))).reduce((s,o,i)=>Object.assign(s,{[n[i].route.id]:o}),{})}async function lk(e,t,n,r,s,o,i,a,l,u){let d=o.map(g=>g.route.lazy?ik(g.route,l,a):void 0),c=o.map((g,x)=>{let w=d[x],b=s.some(y=>y.route.id===g.route.id);return $e({},g,{shouldLoad:b,resolve:async y=>(y&&r.method==="GET"&&(g.route.lazy||g.route.loader)&&(b=!0),b?uk(t,r,g,w,y,u):Promise.resolve({type:Te.data,result:void 0}))})}),f=await e({matches:c,request:r,params:o[0].params,fetcherKey:i,context:u});try{await Promise.all(d)}catch{}return f}async function uk(e,t,n,r,s,o){let i,a,l=u=>{let d,c=new Promise((x,w)=>d=w);a=()=>d(),t.signal.addEventListener("abort",a);let f=x=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):u({request:t,params:n.params,context:o},...x!==void 0?[x]:[]),g=(async()=>{try{return{type:"data",result:await(s?s(w=>f(w)):f())}}catch(x){return{type:"error",result:x}}})();return Promise.race([g,c])};try{let u=n.route[e];if(r)if(u){let d,[c]=await Promise.all([l(u).catch(f=>{d=f}),r]);if(d!==void 0)throw d;i=c}else if(await r,u=n.route[e],u)i=await l(u);else if(e==="action"){let d=new URL(t.url),c=d.pathname+d.search;throw en(405,{method:t.method,pathname:c,routeId:n.route.id})}else return{type:Te.data,result:void 0};else if(u)i=await l(u);else{let d=new URL(t.url),c=d.pathname+d.search;throw en(404,{pathname:c})}ge(i.result!==void 0,"You defined "+(e==="action"?"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(u){return{type:Te.error,result:u}}finally{a&&t.signal.removeEventListener("abort",a)}return i}async function ck(e){let{result:t,type:n}=e;if(Qx(t)){let c;try{let f=t.headers.get("Content-Type");f&&/\bapplication\/json\b/.test(f)?t.body==null?c=null:c=await t.json():c=await t.text()}catch(f){return{type:Te.error,error:f}}return n===Te.error?{type:Te.error,error:new cc(t.status,t.statusText,c),statusCode:t.status,headers:t.headers}:{type:Te.data,data:c,statusCode:t.status,headers:t.headers}}if(n===Te.error){if(Sy(t)){var r,s;if(t.data instanceof Error){var o,i;return{type:Te.error,error:t.data,statusCode:(o=t.init)==null?void 0:o.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:Te.error,error:new cc(((r=t.init)==null?void 0:r.status)||500,void 0,t.data),statusCode:Za(t)?t.status:void 0,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:Te.error,error:t,statusCode:Za(t)?t.status:void 0}}if(mk(t)){var a,l;return{type:Te.deferred,deferredData:t,statusCode:(a=t.init)==null?void 0:a.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}if(Sy(t)){var u,d;return{type:Te.data,data:t.data,statusCode:(u=t.init)==null?void 0:u.status,headers:(d=t.init)!=null&&d.headers?new Headers(t.init.headers):void 0}}return{type:Te.data,data:t}}function dk(e,t,n,r,s,o){let i=e.headers.get("Location");if(ge(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!im.test(i)){let a=r.slice(0,r.findIndex(l=>l.route.id===n)+1);i=hh(new URL(t.url),a,s,!0,i,o),e.headers.set("Location",i)}return e}function gy(e,t,n,r){let s=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(im.test(e)){let o=e,i=o.startsWith("//")?new URL(t.protocol+o):new URL(o);if(s.includes(i.protocol))throw new Error("Invalid redirect location");let a=Wn(i.pathname,n)!=null;if(i.origin===t.origin&&a)return om(i.pathname)+i.search+i.hash}try{let o=r.createURL(e);if(s.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Co(e,t,n,r){let s=e.createURL(qx(t)).toString(),o={signal:n};if(r&&$n(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=mh(r.formData):o.body=r.formData}return new Request(s,o)}function mh(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function yy(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function fk(e,t,n,r,s){let o={},i=null,a,l=!1,u={},d=n&&vn(n[1])?n[1].error:void 0;return e.forEach(c=>{if(!(c.route.id in t))return;let f=c.route.id,g=t[f];if(ge(!zs(g),"Cannot handle redirect results in processLoaderData"),vn(g)){let x=g.error;d!==void 0&&(x=d,d=void 0),i=i||{};{let w=js(e,f);i[w.route.id]==null&&(i[w.route.id]=x)}o[f]=void 0,l||(l=!0,a=Za(g.error)?g.error.status:500),g.headers&&(u[f]=g.headers)}else us(g)?(r.set(f,g.deferredData),o[f]=g.deferredData.data,g.statusCode!=null&&g.statusCode!==200&&!l&&(a=g.statusCode),g.headers&&(u[f]=g.headers)):(o[f]=g.data,g.statusCode&&g.statusCode!==200&&!l&&(a=g.statusCode),g.headers&&(u[f]=g.headers))}),d!==void 0&&n&&(i={[n[0]]:d},o[n[0]]=void 0),{loaderData:o,errors:i,statusCode:a||200,loaderHeaders:u}}function vy(e,t,n,r,s,o,i){let{loaderData:a,errors:l}=fk(t,n,r,i);return s.forEach(u=>{let{key:d,match:c,controller:f}=u,g=o[d];if(ge(g,"Did not find corresponding fetcher result"),!(f&&f.signal.aborted))if(vn(g)){let x=js(e.matches,c==null?void 0:c.route.id);l&&l[x.route.id]||(l=$e({},l,{[x.route.id]:g.error})),e.fetchers.delete(d)}else if(zs(g))ge(!1,"Unhandled fetcher revalidation redirect");else if(us(g))ge(!1,"Unhandled fetcher deferred data");else{let x=Gr(g.data);e.fetchers.set(d,x)}}),{loaderData:a,errors:l}}function xy(e,t,n,r){let s=$e({},t);for(let o of n){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(s[i]=t[i]):e[i]!==void 0&&o.route.loader&&(s[i]=e[i]),r&&r.hasOwnProperty(i))break}return s}function wy(e){return e?vn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function js(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function by(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function en(e,t){let{pathname:n,routeId:r,method:s,type:o,message:i}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",s&&n&&r?l="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",l='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",s&&n&&r?l="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(l='Invalid request method "'+s.toUpperCase()+'"')),new cc(e||500,a,new Error(l),!0)}function nu(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,s]=t[n];if(zs(s))return{key:r,result:s}}}function qx(e){let t=typeof e=="string"?ks(e):e;return ao($e({},t,{hash:""}))}function hk(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function pk(e){return Qx(e.result)&&ZC.has(e.result.status)}function us(e){return e.type===Te.deferred}function vn(e){return e.type===Te.error}function zs(e){return(e&&e.type)===Te.redirect}function Sy(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function mk(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Qx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function gk(e){return JC.has(e.toLowerCase())}function $n(e){return XC.has(e.toLowerCase())}async function yk(e,t,n,r,s){let o=Object.entries(t);for(let i=0;i(f==null?void 0:f.route.id)===a);if(!u)continue;let d=r.find(f=>f.route.id===u.route.id),c=d!=null&&!Kx(d,u)&&(s&&s[u.route.id])!==void 0;us(l)&&c&&await am(l,n,!1).then(f=>{f&&(t[a]=f)})}}async function vk(e,t,n){for(let r=0;r(u==null?void 0:u.route.id)===o)&&us(a)&&(ge(i,"Expected an AbortController for revalidating fetcher deferred result"),await am(a,i.signal,!0).then(u=>{u&&(t[s]=u)}))}}async function am(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Te.data,data:e.deferredData.unwrappedData}}catch(s){return{type:Te.error,error:s}}return{type:Te.data,data:e.deferredData.data}}}function lm(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function ma(e,t){let n=typeof t=="string"?ks(t).search:t.search;if(e[e.length-1].route.index&&lm(n||""))return e[e.length-1];let r=Vx(e);return r[r.length-1]}function Ey(e){let{formMethod:t,formAction:n,formEncType:r,text:s,formData:o,json:i}=e;if(!(!t||!n||!r)){if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function Ud(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 xk(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}}function ea(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 wk(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}}function Gr(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 bk(e,t){try{let n=e.sessionStorage.getItem(Gx);if(n){let r=JSON.parse(n);for(let[s,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(s,new Set(o||[]))}}catch{}}function Sk(e,t){if(t.size>0){let n={};for(let[r,s]of t)n[r]=[...s];try{e.sessionStorage.setItem(Gx,JSON.stringify(n))}catch(r){io(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function xi(){return xi=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),p.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let c=Bc(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Pr([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,i,o,e])}const kk=p.createContext(null);function Rk(e){let t=p.useContext(pr).outlet;return t&&p.createElement(kk.Provider,{value:e},t)}function d3(){let{matches:e}=p.useContext(pr),t=e[e.length-1];return t?t.params:{}}function Hc(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=p.useContext(Fr),{matches:s}=p.useContext(pr),{pathname:o}=un(),i=JSON.stringify($c(s,r.v7_relativeSplatPath));return p.useMemo(()=>Bc(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function Nk(e,t,n,r){Oi()||ge(!1);let{navigator:s}=p.useContext(Fr),{matches:o}=p.useContext(pr),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u=un(),d;d=u;let c=d.pathname||"/",f=c;if(l!=="/"){let w=l.replace(/^\//,"").split("/");f="/"+c.replace(/^\//,"").split("/").slice(w.length).join("/")}let g=Ts(e,{pathname:f});return Tk(g&&g.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:Pr([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Pr([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,n,r)}function Pk(){let e=Dk(),t=Za(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:s},n):null,null)}const Lk=p.createElement(Pk,null);class Ok extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?p.createElement(pr.Provider,{value:this.props.routeContext},p.createElement(Xx.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ak(e){let{routeContext:t,match:n,children:r}=e,s=p.useContext(Li);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(pr.Provider,{value:t},r)}function Tk(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=i.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);d>=0||ge(!1),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,c,f)=>{let g,x=!1,w=null,b=null;n&&(g=a&&c.route.id?a[c.route.id]:void 0,w=c.route.errorElement||Lk,l&&(u<0&&f===0?(zk("route-fallback"),x=!0,b=null):u===f&&(x=!0,b=c.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,f+1)),y=()=>{let v;return g?v=w:x?v=b:c.route.Component?v=p.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=d,p.createElement(Ak,{match:c,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:v})};return n&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?p.createElement(Ok,{location:n.location,revalidation:n.revalidation,component:w,error:g,children:y(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):y()},null)}var Jx=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Jx||{}),Zx=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}(Zx||{});function ew(e){let t=p.useContext(Li);return t||ge(!1),t}function tw(e){let t=p.useContext(um);return t||ge(!1),t}function jk(e){let t=p.useContext(pr);return t||ge(!1),t}function nw(e){let t=jk(),n=t.matches[t.matches.length-1];return n.route.id||ge(!1),n.route.id}function Dk(){var e;let t=p.useContext(Xx),n=tw(),r=nw();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}let Ik=0;function Mk(e){let{router:t,basename:n}=ew(),r=tw(),[s,o]=p.useState(""),i=p.useCallback(a=>{if(typeof e!="function")return!!e;if(n==="/")return e(a);let{currentLocation:l,nextLocation:u,historyAction:d}=a;return e({currentLocation:xi({},l,{pathname:Wn(l.pathname,n)||l.pathname}),nextLocation:xi({},u,{pathname:Wn(u.pathname,n)||u.pathname}),historyAction:d})},[n,e]);return p.useEffect(()=>{let a=String(++Ik);return o(a),()=>t.deleteBlocker(a)},[t]),p.useEffect(()=>{s!==""&&t.getBlocker(s,i)},[t,s,i]),s&&r.blockers.has(s)?r.blockers.get(s):Po}function Fk(){let{router:e}=ew(Jx.UseNavigateStable),t=nw(Zx.UseNavigateStable),n=p.useRef(!1);return Yx(()=>{n.current=!0}),p.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,xi({fromRouteId:t},o)))},[e,t])}const _y={};function zk(e,t,n){_y[e]||(_y[e]=!0)}function Uk(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function el(e){let{to:t,replace:n,state:r,relative:s}=e;Oi()||ge(!1);let{future:o,static:i}=p.useContext(Fr),{matches:a}=p.useContext(pr),{pathname:l}=un(),u=go(),d=Bc(t,$c(a,o.v7_relativeSplatPath),l,s==="path"),c=JSON.stringify(d);return p.useEffect(()=>u(JSON.parse(c),{replace:n,state:r,relative:s}),[u,c,s,n,r]),null}function Gc(e){return Rk(e.context)}function $k(e){let{basename:t="/",children:n=null,location:r,navigationType:s=rt.Pop,navigator:o,static:i=!1,future:a}=e;Oi()&&ge(!1);let l=t.replace(/^\/*/,"/"),u=p.useMemo(()=>({basename:l,navigator:o,static:i,future:xi({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof r=="string"&&(r=ks(r));let{pathname:d="/",search:c="",hash:f="",state:g=null,key:x="default"}=r,w=p.useMemo(()=>{let b=Wn(d,l);return b==null?null:{location:{pathname:b,search:c,hash:f,state:g,key:x},navigationType:s}},[l,d,c,f,g,x,s]);return w==null?null:p.createElement(Fr.Provider,{value:u},p.createElement(Vc.Provider,{children:n,value:w}))}new Promise(()=>{});function Bk(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:p.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:p.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:p.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function wi(){return wi=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function Gk(e,t){let n=gh(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const Kk=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Wk=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],qk="6";try{window.__reactRouterVersion=qk}catch{}function sw(e,t){return rk({basename:t==null?void 0:t.basename,future:wi({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:kC({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||Qk(),routes:e,mapRouteProperties:Bk,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function Qk(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=wi({},t,{errors:Xk(t.errors)})),t}function Xk(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,s]of t)if(s&&s.__type==="RouteErrorResponse")n[r]=new cc(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let o=window[s.__subType];if(typeof o=="function")try{let i=new o(s.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(s.message);o.stack="",n[r]=o}}else n[r]=s;return n}const ow=p.createContext({isTransitioning:!1}),Yk=p.createContext(new Map),Jk="startTransition",Cy=hl[Jk],Zk="flushSync",ky=B_[Zk];function eR(e){Cy?Cy(e):e()}function ta(e){ky?ky(e):e()}class tR{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function nR(e){let{fallbackElement:t,router:n,future:r}=e,[s,o]=p.useState(n.state),[i,a]=p.useState(),[l,u]=p.useState({isTransitioning:!1}),[d,c]=p.useState(),[f,g]=p.useState(),[x,w]=p.useState(),b=p.useRef(new Map),{v7_startTransition:m}=r||{},y=p.useCallback(k=>{m?eR(k):k()},[m]),v=p.useCallback((k,T)=>{let{deletedFetchers:P,flushSync:A,viewTransitionOpts:D}=T;k.fetchers.forEach((H,le)=>{H.data!==void 0&&b.current.set(le,H.data)}),P.forEach(H=>b.current.delete(H));let F=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!D||F){A?ta(()=>o(k)):y(()=>o(k));return}if(A){ta(()=>{f&&(d&&d.resolve(),f.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:D.currentLocation,nextLocation:D.nextLocation})});let H=n.window.document.startViewTransition(()=>{ta(()=>o(k))});H.finished.finally(()=>{ta(()=>{c(void 0),g(void 0),a(void 0),u({isTransitioning:!1})})}),ta(()=>g(H));return}f?(d&&d.resolve(),f.skipTransition(),w({state:k,currentLocation:D.currentLocation,nextLocation:D.nextLocation})):(a(k),u({isTransitioning:!0,flushSync:!1,currentLocation:D.currentLocation,nextLocation:D.nextLocation}))},[n.window,f,d,b,y]);p.useLayoutEffect(()=>n.subscribe(v),[n,v]),p.useEffect(()=>{l.isTransitioning&&!l.flushSync&&c(new tR)},[l]),p.useEffect(()=>{if(d&&i&&n.window){let k=i,T=d.promise,P=n.window.document.startViewTransition(async()=>{y(()=>o(k)),await T});P.finished.finally(()=>{c(void 0),g(void 0),a(void 0),u({isTransitioning:!1})}),g(P)}},[y,i,d,n.window]),p.useEffect(()=>{d&&i&&s.location.key===i.location.key&&d.resolve()},[d,f,s.location,i]),p.useEffect(()=>{!l.isTransitioning&&x&&(a(x.state),u({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),w(void 0))},[l.isTransitioning,x]),p.useEffect(()=>{},[]);let S=p.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:k=>n.navigate(k),push:(k,T,P)=>n.navigate(k,{state:T,preventScrollReset:P==null?void 0:P.preventScrollReset}),replace:(k,T,P)=>n.navigate(k,{replace:!0,state:T,preventScrollReset:P==null?void 0:P.preventScrollReset})}),[n]),C=n.basename||"/",N=p.useMemo(()=>({router:n,navigator:S,static:!1,basename:C}),[n,S,C]),E=p.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return p.useEffect(()=>Uk(r,n.future),[r,n.future]),p.createElement(p.Fragment,null,p.createElement(Li.Provider,{value:N},p.createElement(um.Provider,{value:s},p.createElement(Yk.Provider,{value:b.current},p.createElement(ow.Provider,{value:l},p.createElement($k,{basename:C,location:s.location,navigationType:s.historyAction,navigator:S,future:E},s.initialized||n.future.v7_partialHydration?p.createElement(rR,{routes:n.routes,future:n.future,state:s}):t))))),null)}const rR=p.memo(sR);function sR(e){let{routes:t,future:n,state:r}=e;return Nk(t,void 0,r,n)}const oR=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",iR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lo=p.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:o,replace:i,state:a,target:l,to:u,preventScrollReset:d,viewTransition:c}=t,f=rw(t,Kk),{basename:g}=p.useContext(Fr),x,w=!1;if(typeof u=="string"&&iR.test(u)&&(x=u,oR))try{let v=new URL(window.location.href),S=u.startsWith("//")?new URL(v.protocol+u):new URL(u),C=Wn(S.pathname,g);S.origin===v.origin&&C!=null?u=C+S.search+S.hash:w=!0}catch{}let b=Ek(u,{relative:s}),m=uR(u,{replace:i,state:a,target:l,preventScrollReset:d,relative:s,viewTransition:c});function y(v){r&&r(v),v.defaultPrevented||m(v)}return p.createElement("a",wi({},f,{href:x||b,onClick:w||o?r:y,ref:n,target:l}))}),aR=p.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:o="",end:i=!1,style:a,to:l,viewTransition:u,children:d}=t,c=rw(t,Wk),f=Hc(l,{relative:c.relative}),g=un(),x=p.useContext(um),{navigator:w,basename:b}=p.useContext(Fr),m=x!=null&&cR(f)&&u===!0,y=w.encodeLocation?w.encodeLocation(f).pathname:f.pathname,v=g.pathname,S=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;s||(v=v.toLowerCase(),S=S?S.toLowerCase():null,y=y.toLowerCase()),S&&b&&(S=Wn(S,b)||S);const C=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let N=v===y||!i&&v.startsWith(y)&&v.charAt(C)==="/",E=S!=null&&(S===y||!i&&S.startsWith(y)&&S.charAt(y.length)==="/"),k={isActive:N,isPending:E,isTransitioning:m},T=N?r:void 0,P;typeof o=="function"?P=o(k):P=[o,N?"active":null,E?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let A=typeof a=="function"?a(k):a;return p.createElement(lo,wi({},c,{"aria-current":T,className:P,ref:n,style:A,to:l,viewTransition:u}),typeof d=="function"?d(k):d)});var yh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(yh||(yh={}));var Ry;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ry||(Ry={}));function lR(e){let t=p.useContext(Li);return t||ge(!1),t}function uR(e,t){let{target:n,replace:r,state:s,preventScrollReset:o,relative:i,viewTransition:a}=t===void 0?{}:t,l=go(),u=un(),d=Hc(e,{relative:i});return p.useCallback(c=>{if(Hk(c,n)){c.preventDefault();let f=r!==void 0?r:ao(u)===ao(d);l(e,{replace:f,state:s,preventScrollReset:o,relative:i,viewTransition:a})}},[u,l,d,r,s,n,e,o,i,a])}function f3(e){let t=p.useRef(gh(e)),n=p.useRef(!1),r=un(),s=p.useMemo(()=>Gk(r.search,n.current?null:t.current),[r.search]),o=go(),i=p.useCallback((a,l)=>{const u=gh(typeof a=="function"?a(s):a);n.current=!0,o("?"+u,l)},[o,s]);return[s,i]}function cR(e,t){t===void 0&&(t={});let n=p.useContext(ow);n==null&&ge(!1);let{basename:r}=lR(yh.useViewTransitionState),s=Hc(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Wn(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=Wn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return uc(s.pathname,i)!=null||uc(s.pathname,o)!=null}/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const dR=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),iw=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var fR={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const hR=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},l)=>p.createElement("svg",{ref:l,...fR,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:iw("lucide",s),...a},[...i.map(([u,d])=>p.createElement(u,d)),...Array.isArray(o)?o:[o]]));/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Q=(e,t)=>{const n=p.forwardRef(({className:r,...s},o)=>p.createElement(hR,{ref:o,iconNode:t,className:iw(`lucide-${dR(e)}`,r),...s}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pR=Q("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const aw=Q("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const lw=Q("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Kc=Q("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mR=Q("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const gR=Q("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yR=Q("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vR=Q("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xR=Q("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wR=Q("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const uw=Q("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vl=Q("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bR=Q("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vh=Q("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const cw=Q("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const dw=Q("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const SR=Q("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ER=Q("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ny=Q("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _R=Q("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const CR=Q("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kR=Q("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const RR=Q("DatabaseBackup",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 12a9 3 0 0 0 5 2.69",key:"1ui2ym"}],["path",{d:"M21 9.3V5",key:"6k6cib"}],["path",{d:"M3 5v14a9 3 0 0 0 6.47 2.88",key:"i62tjy"}],["path",{d:"M12 12v4h4",key:"1bxaet"}],["path",{d:"M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16",key:"1f4ei9"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const NR=Q("DatabaseZap",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 15 21.84",key:"14ibmq"}],["path",{d:"M21 5V8",key:"1marbg"}],["path",{d:"M21 12L18 17H22L19 22",key:"zafso"}],["path",{d:"M3 12A9 3 0 0 0 14.59 14.87",key:"1y4wr8"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const PR=Q("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const LR=Q("FileChartColumnIncreasing",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M12 18v-4",key:"q1q25u"}],["path",{d:"M16 18v-6",key:"15y0np"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const OR=Q("FileDigit",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["rect",{width:"4",height:"6",x:"2",y:"12",rx:"2",key:"jm304g"}],["path",{d:"M10 12h2v6",key:"12zw74"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xh=Q("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const AR=Q("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const TR=Q("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jR=Q("Gavel",[["path",{d:"m14.5 12.5-8 8a2.119 2.119 0 1 1-3-3l8-8",key:"15492f"}],["path",{d:"m16 16 6-6",key:"vzrcl6"}],["path",{d:"m8 8 6-6",key:"18bi4p"}],["path",{d:"m9 7 8 8",key:"5jnvq1"}],["path",{d:"m21 11-8-8",key:"z4y7zo"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const DR=Q("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const fw=Q("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const IR=Q("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const MR=Q("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const hw=Q("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pw=Q("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wh=Q("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mw=Q("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const FR=Q("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const gw=Q("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zR=Q("LayoutTemplate",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const cm=Q("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yw=Q("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vw=Q("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xw=Q("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const UR=Q("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $R=Q("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const BR=Q("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const VR=Q("PackageCheck",[["path",{d:"m16 16 2 2 4-4",key:"gfu2re"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const HR=Q("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ww=Q("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const GR=Q("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const KR=Q("Ruler",[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bw=Q("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Sw=Q("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Py=Q("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const WR=Q("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ly=Q("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const qR=Q("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Oy=Q("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const QR=Q("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ew=Q("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const XR=Q("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const YR=Q("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const JR=Q("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ZR=Q("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const eN=Q("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const tN=Q("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _w=Q("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const nN=Q("Webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const rN=Q("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Cw=Q("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** * @license lucide-react v0.451.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xl=Q("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function kw(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t{const t=aN(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(dm);return a[0]===""&&a.length!==1&&a.shift(),Rw(a,t)||iN(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},Rw=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Rw(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(dm);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},Ay=/^\[(.+)\]$/,iN=e=>{if(Ay.test(e)){const t=Ay.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},aN=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return uN(Object.entries(e.classGroups),n).forEach(([o,i])=>{bh(i,r,o,t)}),r},bh=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Ty(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(lN(s)){bh(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{bh(i,Ty(t,o),n,r)})})},Ty=(e,t)=>{let n=e;return t.split(dm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},lN=e=>e.isThemeGetter,uN=(e,t)=>t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[n,s]}):e,cN=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}},Nw="!",dN=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length,i=a=>{const l=[];let u=0,d=0,c;for(let b=0;bd?c-d:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:x,maybePostfixModifierPosition:w}};return n?a=>n({className:a,parseClassName:i}):i},fN=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},hN=e=>({cache:cN(e.cacheSize),parseClassName:dN(e),...oN(e)}),pN=/\s+/,mN=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(pN);let a="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{modifiers:d,hasImportantModifier:c,baseClassName:f,maybePostfixModifierPosition:g}=n(u);let x=!!g,w=r(x?f.substring(0,g):f);if(!w){if(!x){a=u+(a.length>0?" "+a:a);continue}if(w=r(f),!w){a=u+(a.length>0?" "+a:a);continue}x=!1}const b=fN(d).join(":"),m=c?b+Nw:b,y=m+w;if(o.includes(y))continue;o.push(y);const v=s(w,x);for(let S=0;S0?" "+a:a)}return a};function gN(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rc(d),e());return n=hN(u),r=n.cache.get,s=n.cache.set,o=a,a(l)}function a(l){const u=r(l);if(u)return u;const d=mN(l,n);return s(l,d),d}return function(){return o(gN.apply(null,arguments))}}const Fe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Lw=/^\[(?:([a-z-]+):)?(.+)\]$/i,yN=/^\d+\/\d+$/,vN=new Set(["px","full","screen"]),xN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wN=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,bN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,SN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,EN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yr=e=>Xo(e)||vN.has(e)||yN.test(e),Br=e=>Ai(e,"length",ON),Xo=e=>!!e&&!Number.isNaN(Number(e)),$d=e=>Ai(e,"number",Xo),na=e=>!!e&&Number.isInteger(Number(e)),_N=e=>e.endsWith("%")&&Xo(e.slice(0,-1)),me=e=>Lw.test(e),Vr=e=>xN.test(e),CN=new Set(["length","size","percentage"]),kN=e=>Ai(e,CN,Ow),RN=e=>Ai(e,"position",Ow),NN=new Set(["image","url"]),PN=e=>Ai(e,NN,TN),LN=e=>Ai(e,"",AN),ra=()=>!0,Ai=(e,t,n)=>{const r=Lw.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},ON=e=>wN.test(e)&&!bN.test(e),Ow=()=>!1,AN=e=>SN.test(e),TN=e=>EN.test(e),Dy=()=>{const e=Fe("colors"),t=Fe("spacing"),n=Fe("blur"),r=Fe("brightness"),s=Fe("borderColor"),o=Fe("borderRadius"),i=Fe("borderSpacing"),a=Fe("borderWidth"),l=Fe("contrast"),u=Fe("grayscale"),d=Fe("hueRotate"),c=Fe("invert"),f=Fe("gap"),g=Fe("gradientColorStops"),x=Fe("gradientColorStopPositions"),w=Fe("inset"),b=Fe("margin"),m=Fe("opacity"),y=Fe("padding"),v=Fe("saturate"),S=Fe("scale"),C=Fe("sepia"),N=Fe("skew"),E=Fe("space"),k=Fe("translate"),T=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto",me,t],D=()=>[me,t],F=()=>["",yr,Br],H=()=>["auto",Xo,me],le=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],X=()=>["solid","dashed","dotted","double","none"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",me],G=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>[Xo,me];return{cacheSize:500,separator:":",theme:{colors:[ra],spacing:[yr,Br],blur:["none","",Vr,me],brightness:Y(),borderColor:[e],borderRadius:["none","","full",Vr,me],borderSpacing:D(),borderWidth:F(),contrast:Y(),grayscale:V(),hueRotate:Y(),invert:V(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[_N,Br],inset:A(),margin:A(),opacity:Y(),padding:D(),saturate:Y(),scale:Y(),sepia:V(),skew:Y(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",me]}],container:["container"],columns:[{columns:[Vr]}],"break-after":[{"break-after":G()}],"break-before":[{"break-before":G()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...le(),me]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",na,me]}],basis:[{basis:A()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",me]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",na,me]}],"grid-cols":[{"grid-cols":[ra]}],"col-start-end":[{col:["auto",{span:["full",na,me]},me]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[ra]}],"row-start-end":[{row:["auto",{span:[na,me]},me]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",me]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",me]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",me,t]}],"min-w":[{"min-w":[me,t,"min","max","fit"]}],"max-w":[{"max-w":[me,t,"none","full","min","max","fit","prose",{screen:[Vr]},Vr]}],h:[{h:[me,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[me,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[me,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[me,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Vr,Br]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$d]}],"font-family":[{font:[ra]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",me]}],"line-clamp":[{"line-clamp":["none",Xo,$d]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yr,me]}],"list-image":[{"list-image":["none",me]}],"list-style-type":[{list:["none","disc","decimal",me]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yr,Br]}],"underline-offset":[{"underline-offset":["auto",yr,me]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...le(),RN]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kN]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},PN]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...X(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:X()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...X()]}],"outline-offset":[{"outline-offset":[yr,me]}],"outline-w":[{outline:[yr,Br]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[yr,Br]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Vr,LN]}],"shadow-color":[{shadow:[ra]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...ne(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ne()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Vr,me]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[v]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",me]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",me]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",me]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[na,me]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",me]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",me]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",me]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[yr,Br,$d]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},jN=(e,{cacheSize:t,prefix:n,separator:r,experimentalParseClassName:s,extend:o={},override:i={}})=>{ga(e,"cacheSize",t),ga(e,"prefix",n),ga(e,"separator",r),ga(e,"experimentalParseClassName",s);for(const a in i)DN(e[a],i[a]);for(const a in o)IN(e[a],o[a]);return e},ga=(e,t,n)=>{n!==void 0&&(e[t]=n)},DN=(e,t)=>{if(t)for(const n in t)ga(e,n,t[n])},IN=(e,t)=>{if(t)for(const n in t){const r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}},MN=(e,...t)=>typeof e=="function"?jy(Dy,e,...t):jy(()=>jN(Dy(),e),...t),FN=["text-display","text-heading","text-kpi","text-subtitle","text-body","text-caption","text-micro","text-overline"],zN=["z-sticky","z-nav","z-dirtybar","z-drawer","z-popover-below-modal","z-modal","z-popover","z-tooltip","z-maintenance","z-toast"],UN=MN({extend:{classGroups:{"font-size":FN,z:zN}}});function z(...e){return UN(sN(e))}const $N=(e,t,n,r)=>{var o,i,a,l;const s=[n,{code:t,...r||{}}];if((i=(o=e==null?void 0:e.services)==null?void 0:o.logger)!=null&&i.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);Js(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(l=(a=e==null?void 0:e.services)==null?void 0:a.logger)!=null&&l.warn?e.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},Iy={},Sh=(e,t,n,r)=>{Js(n)&&Iy[n]||(Js(n)&&(Iy[n]=new Date),$N(e,t,n,r))},Aw=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Eh=(e,t,n)=>{e.loadNamespaces(t,Aw(e,n))},My=(e,t,n,r)=>{if(Js(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Eh(e,n,r);n.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,Aw(e,r))},BN=(e,t,n={})=>!t.languages||!t.languages.length?(Sh(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,s)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,e))return!1}}),Js=e=>typeof e=="string",VN=e=>typeof e=="object"&&e!==null,HN=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,GN={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},KN=e=>GN[e],WN=e=>e.replace(HN,KN);let _h={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:WN};const qN=(e={})=>{_h={..._h,...e}},QN=()=>_h;let Tw;const XN=e=>{Tw=e},YN=()=>Tw,JN={type:"3rdParty",init(e){qN(e.options.react),XN(e)}},ZN=p.createContext();class eP{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const tP=(e,t)=>{const n=p.useRef();return p.useEffect(()=>{n.current=e},[e,t]),n.current},jw=(e,t,n,r)=>e.getFixedT(t,n,r),nP=(e,t,n,r)=>p.useCallback(jw(e,t,n,r),[e,t,n,r]),xe=(e,t={})=>{var S,C,N,E;const{i18n:n}=t,{i18n:r,defaultNS:s}=p.useContext(ZN)||{},o=n||r||YN();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new eP),!o){Sh(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const k=(P,A)=>Js(A)?A:VN(A)&&Js(A.defaultValue)?A.defaultValue:Array.isArray(P)?P[P.length-1]:P,T=[k,{},!1];return T.t=k,T.i18n={},T.ready=!1,T}(S=o.options.react)!=null&&S.wait&&Sh(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...QN(),...o.options.react,...t},{useSuspense:a,keyPrefix:l}=i;let u=s||((C=o.options)==null?void 0:C.defaultNS);u=Js(u)?[u]:u||["translation"],(E=(N=o.reportNamespaces).addUsedNamespaces)==null||E.call(N,u);const d=(o.isInitialized||o.initializedStoreOnce)&&u.every(k=>BN(k,o,i)),c=nP(o,t.lng||null,i.nsMode==="fallback"?u:u[0],l),f=()=>c,g=()=>jw(o,t.lng||null,i.nsMode==="fallback"?u:u[0],l),[x,w]=p.useState(f);let b=u.join();t.lng&&(b=`${t.lng}${b}`);const m=tP(b),y=p.useRef(!0);p.useEffect(()=>{const{bindI18n:k,bindI18nStore:T}=i;y.current=!0,!d&&!a&&(t.lng?My(o,t.lng,u,()=>{y.current&&w(g)}):Eh(o,u,()=>{y.current&&w(g)})),d&&m&&m!==b&&y.current&&w(g);const P=()=>{y.current&&w(g)};return k&&(o==null||o.on(k,P)),T&&(o==null||o.store.on(T,P)),()=>{y.current=!1,o&&k&&(k==null||k.split(" ").forEach(A=>o.off(A,P))),T&&o&&T.split(" ").forEach(A=>o.store.off(A,P))}},[o,b]),p.useEffect(()=>{y.current&&d&&w(f)},[o,l,d]);const v=[x,o,d];if(v.t=x,v.i18n=o,v.ready=d,d||!d&&!a)return v;throw new Promise(k=>{t.lng?My(o,t.lng,u,()=>k()):Eh(o,u,()=>k())})},sa=8,Ch=14,rP=Ch/2;function Dw({x:e,y:t,children:n,className:r}){const s=p.useRef(null),[o,i]=p.useState({x:e+Ch,y:t});return p.useLayoutEffect(()=>{const a=s.current;if(!a)return;const{width:l,height:u}=a.getBoundingClientRect();let d=e+Ch,c=t;d+l>window.innerWidth-sa&&(d=Math.max(sa,window.innerWidth-l-sa)),c+u>window.innerHeight-sa&&(c=Math.max(sa,t-u-rP)),i({x:d,y:c})},[e,t]),Dt.createPortal(h.jsx("div",{ref:s,className:z("fixed z-tooltip w-max text-start","max-w-[min(20rem,calc(100vw-1rem))]",r),style:{left:o.x,top:o.y},children:n}),document.body)}const sP=400,oP="pointer-events-none rounded-control border border-border bg-surface-inverse px-2.5 py-1.5 text-micro text-surface-inverse-fg shadow-card";function Wc(e,t){const[n,r]=p.useState(null),s=p.useRef(void 0),o=p.useId(),i=p.useRef(!1),a=e==null||e===!1||e==="",l=f=>{const g=f==null?void 0:f.getBoundingClientRect();g&&r({x:g.left,y:g.bottom-4})},u=f=>{if(a)return;const g=f.currentTarget;window.clearTimeout(s.current),s.current=window.setTimeout(()=>l(g),sP)},d=f=>{a||(window.clearTimeout(s.current),l(f.currentTarget))},c=()=>{window.clearTimeout(s.current),i.current=!1,r(null)};return p.useEffect(()=>{if(!n)return;const f=g=>{g.key==="Escape"&&c()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[n]),p.useEffect(()=>()=>window.clearTimeout(s.current),[]),{open:!!n&&!a,id:o,handlers:a?{}:{onMouseEnter:u,onMouseLeave:c,onFocus:f=>{i.current=!0,d(f)},onBlur:c},toggle:f=>{const g=!!n&&!i.current;i.current=!1,g?c():d(f)},card:n&&!a?h.jsx(Dw,{x:n.x,y:n.y,className:z(oP,t==null?void 0:t.className),children:h.jsx("div",{id:o,role:"tooltip",className:"space-y-1.5",children:e})}):null}}function kh(e){return e==null||typeof e=="boolean"?!1:typeof e=="string"?e.trim().length>0:typeof e=="number"?!0:Array.isArray(e)?e.some(kh):p.isValidElement(e)?kh(e.props.children):!1}const Fy=p.createContext(!1),iP=new Set(["input","img","br","hr","area","base","col","embed","source","track","wbr"]),aP=p.forwardRef(function({as:t,content:n,children:r,...s},o){const i=p.useContext(Fy),a=Wc(i?null:n),l=t||"span",u=typeof l=="string"&&iP.has(l),d={...s};for(const[f,g]of Object.entries(a.handlers)){const x=d[f],w=g;d[f]=x?b=>{w(b),x(b)}:w}const c=h.jsx(l,{ref:o,"aria-label":!kh(r)&&typeof n=="string"?n:void 0,"aria-describedby":a.open?a.id:void 0,...d,className:z(t==="button"&&"shrink-0",d.className),children:u?void 0:h.jsxs(Fy.Provider,{value:!0,children:[r,a.card]})});return u?h.jsxs(h.Fragment,{children:[c,a.card]}):c}),bi=aP;function h3({children:e,label:t,size:n="xs",className:r}){const{t:s}=xe(),o=Wc(e);return h.jsxs("button",{type:"button","aria-label":`${s("LANG_i18n_common.help")}: ${t}`,"aria-expanded":o.open,onClick:o.toggle,...o.handlers,className:z("inline-flex align-middle text-text-muted transition-colors hover:text-text-body","rounded-control focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",r),children:[h.jsx(pw,{className:n==="xs"?"h-3 w-3":"h-3.5 w-3.5","aria-hidden":!0}),o.card]})}const Si={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",neutral:"bg-neutral",accent:"bg-accent",purple:"bg-purple"},Iw={success:"bg-success-soft",warning:"bg-warning-soft",danger:"bg-danger-soft",info:"bg-info-soft",neutral:"bg-neutral-soft",accent:"bg-accent-soft",purple:"bg-purple-soft"},Vo={success:"text-success",warning:"text-warning",danger:"text-danger",info:"text-info",neutral:"text-neutral",accent:"text-accent-soft-fg",purple:"text-purple"},Mw=Object.keys(Si),Rh=Object.fromEntries(Mw.map(e=>[e,"text-text-inverse"]));function Fw(e,t){return Object.fromEntries(Mw.map(n=>[n,`${e[n]} ${t[n]}`]))}const p3={success:"border-success",warning:"border-warning",danger:"border-danger",info:"border-info",neutral:"border-border-strong",accent:"border-accent",purple:"border-purple"},m3={success:"border-s-success",warning:"border-s-warning",danger:"border-s-danger",info:"border-s-info",neutral:"border-s-border-strong",accent:"border-s-accent",purple:"border-s-purple"},lP=Fw(Iw,Vo),zw=Fw(Si,Rh),Nu={success:"border border-success text-success",warning:"border border-warning text-warning",danger:"border border-danger text-danger",info:"border border-info text-info",neutral:"border border-border-strong text-text-muted",accent:"border border-accent text-accent",purple:"border border-purple text-purple"},uP={default:{primary:"bg-btn-accent text-btn-fg hover:bg-btn-accent-hover",secondary:`bg-surface-inverse ${Rh.neutral} hover:opacity-90`,danger:"bg-btn-danger text-btn-fg hover:bg-btn-danger-hover",success:`${Si.success} ${Rh.success} hover:opacity-90`},outlined:{primary:`bg-surface-raised ${Nu.accent} hover:bg-accent-soft`,secondary:"bg-surface-raised border border-border text-text-muted hover:bg-neutral-soft",danger:`bg-surface-raised ${Nu.danger} hover:bg-danger-soft`,success:`bg-surface-raised ${Nu.success} hover:bg-success-soft`},ghost:{primary:`bg-transparent ${Vo.accent} hover:bg-accent-soft`,secondary:`bg-transparent ${Vo.neutral} hover:bg-neutral-soft`,danger:`bg-transparent ${Vo.danger} hover:bg-danger-soft`,success:`bg-transparent ${Vo.success} hover:bg-success-soft`}},cP={default:"primary",outlined:"secondary",ghost:"secondary"},dP={sm:"h-8 px-3 text-caption gap-1.5",md:"h-10 px-4 text-caption gap-2"},dr=p.forwardRef(function({variant:t="default",color:n,size:r="md",icon:s,iconEnd:o,loading:i,disabled:a,unavailableReason:l,className:u,children:d,onClick:c,...f},g){const x=!!l,w=Wc(l),b=h.jsxs(h.Fragment,{children:[i?h.jsx(cm,{className:"h-4 w-4 shrink-0 animate-spin","aria-hidden":!0}):s,d,o]}),m=h.jsx("button",{ref:g,type:"button",disabled:x?void 0:!!a||!!i,"aria-busy":i||void 0,"aria-disabled":x||void 0,onClick:x?y=>y.preventDefault():c,className:z("inline-flex flex-none items-center justify-center rounded-control font-medium","[&>svg]:h-4 [&>svg]:w-4 [&>svg]:shrink-0","transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent","disabled:cursor-not-allowed disabled:opacity-50",x&&"cursor-not-allowed opacity-50",uP[t][n??cP[t]],dP[r],u),"aria-describedby":w.open?w.id:void 0,...f,...w.handlers,children:b});return h.jsxs(h.Fragment,{children:[m,w.card]})}),fP={ghost:"text-text-muted hover:bg-surface-sunken hover:text-text-body",soft:"bg-surface-sunken text-text-muted hover:bg-border hover:text-text-body",danger:"text-danger hover:bg-danger-soft",accent:"text-accent hover:bg-accent-soft",warning:"text-warning hover:bg-warning-soft",success:"text-success hover:bg-success-soft"},hP={form:"h-4 w-4","2xs":"h-3.5 w-3.5",xs:"h-4 w-4",sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"},pP={"2xs":"h-6 w-6 [&>svg]:h-3.5 [&>svg]:w-3.5",xs:"h-6 w-6 [&>svg]:h-4 [&>svg]:w-4",sm:"h-8 w-8 [&>svg]:h-4 [&>svg]:w-4",md:"h-9 w-9 [&>svg]:h-4 [&>svg]:w-4",lg:"h-9 w-9 [&>svg]:h-5 [&>svg]:w-5",form:"h-10 w-10 [&>svg]:h-4 [&>svg]:w-4"},fr=p.forwardRef(function({label:t,icon:n,variant:r="ghost",size:s="md",loading:o,disabled:i,className:a,...l},u){return h.jsx(bi,{as:"button",ref:u,type:"button",content:t,disabled:!!i||!!o,"aria-busy":o||void 0,className:z("inline-flex items-center justify-center overflow-visible rounded-control transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent","disabled:cursor-not-allowed disabled:opacity-50",pP[s],fP[r],a),...l,children:o?h.jsx(cm,{className:z("animate-spin",hP[s]),"aria-hidden":!0}):n})}),mP=new Set(["button","input","meter","output","progress","select","textarea"]);function zy({label:e,hint:t,error:n,required:r,labelHidden:s=!1,layout:o="stacked",below:i,children:a}){const l=p.useId(),u=n?`${l}-error`:t?`${l}-hint`:void 0,d=typeof a.type=="string"&&!mP.has(a.type),c=p.cloneElement(a,d?{role:"group","aria-labelledby":e?`${l}-label`:void 0,"aria-describedby":u}:{id:l,"aria-invalid":!!n,"aria-describedby":u}),f=s?"sr-only":"text-caption font-medium text-text-body",g=e&&(d?h.jsxs("span",{id:`${l}-label`,className:f,children:[e,r&&h.jsx("span",{className:"ms-0.5 text-danger",children:"*"})]}):h.jsxs("label",{htmlFor:l,className:f,children:[e,r&&h.jsx("span",{className:"ms-0.5 text-danger",children:"*"})]})),x=t&&!n&&h.jsx("p",{id:`${l}-hint`,className:"text-micro text-text-muted",children:t}),w=n&&h.jsx("p",{id:`${l}-error`,className:"text-micro text-danger",children:n});return o==="block"?h.jsxs("div",{className:"grid gap-2 py-4",children:[h.jsxs("div",{className:"grid gap-1",children:[g,x,w]}),c,i&&h.jsx("div",{className:"flex flex-wrap items-center gap-2",children:i})]}):o==="row"?h.jsx("div",{className:"field-row py-4",children:h.jsxs("div",{className:"field-row-grid",children:[h.jsxs("div",{className:"grid gap-1",children:[g,x,w]}),h.jsxs("div",{className:"grid justify-items-start gap-1.5",children:[c,i&&h.jsx("div",{className:"flex flex-wrap items-center gap-2",children:i})]})]})}):h.jsxs("div",{className:"flex flex-col gap-1.5",children:[g,c,x,w,i]})}function g3({children:e,className:t}){return h.jsx("div",{className:z("-my-4 divide-y divide-border",t),children:e})}const yo="w-full rounded-control border border-border-strong bg-surface-raised px-3 text-caption text-text-body placeholder:text-text-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:border-accent disabled:cursor-not-allowed disabled:opacity-50 aria-[invalid=true]:border-danger aria-[invalid=true]:focus-visible:ring-danger",Uy=p.forwardRef(function({className:t,...n},r){return h.jsx("input",{ref:r,className:z(yo,"h-10",t),...n})});function dc({tone:e="neutral",variant:t="soft",children:n,className:r,onClick:s,pressed:o,onRemove:i,removeLabel:a}){const l=t==="solid"?zw:t==="outline"?Nu:lP;return h.jsxs("span",{className:z("inline-flex flex-none items-center gap-1 rounded-pill px-2.5 py-0.5 text-micro font-medium",l[e],r),children:[s?h.jsx("button",{type:"button",onClick:s,"aria-pressed":o,className:"rounded-pill focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:n}):n,i&&h.jsx("button",{type:"button","aria-label":a,className:"rounded-full text-text-muted transition-colors hover:text-danger focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",onClick:i,children:h.jsx(xl,{className:"h-3.5 w-3.5","aria-hidden":!0})})]})}const gP=p.forwardRef(function({label:t,className:n,id:r,indeterminate:s=!1,labelHidden:o=!1,...i},a){const l=p.useId(),u=r??l,d=p.useRef(null);return p.useEffect(()=>{d.current&&(d.current.indeterminate=s)},[s]),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("span",{className:"relative inline-flex h-4 w-4 shrink-0 items-center justify-center",children:[h.jsx("input",{ref:c=>{d.current=c,typeof a=="function"?a(c):a&&(a.current=c)},id:u,type:"checkbox","aria-checked":s?"mixed":void 0,className:z("peer h-4 w-4 shrink-0 appearance-none border bg-surface transition-colors","rounded border-border-strong","hover:border-accent","checked:border-accent checked:bg-accent","indeterminate:border-accent indeterminate:bg-accent","disabled:cursor-not-allowed disabled:opacity-50","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",n),...i}),h.jsx(uw,{"aria-hidden":!0,className:"pointer-events-none absolute hidden h-3 w-3 text-text-inverse peer-checked:block",strokeWidth:3}),h.jsx(UR,{"aria-hidden":!0,className:"pointer-events-none absolute hidden h-3 w-3 text-text-inverse peer-indeterminate:block",strokeWidth:3})]}),t&&h.jsx("label",{htmlFor:u,className:z(o?"sr-only":"text-caption text-text-body"),children:t})]})});function yP({icon:e,title:t,description:n,action:r,size:s="md"}){return h.jsxs("div",{className:z("flex flex-col items-center justify-center gap-3 px-6 text-center",s==="sm"?"py-6":"py-12"),children:[h.jsx("div",{className:"text-text-muted [&>svg]:h-6 [&>svg]:w-6",children:e??h.jsx(hw,{"aria-hidden":!0})}),h.jsxs("div",{children:[h.jsx("p",{className:"font-medium text-text-strong",children:t}),n&&h.jsx("p",{className:"mt-1 text-caption text-text-muted",children:n})]}),r]})}const ru=[];let $y=0;function fm(e,t,n=!0){const r=p.useRef(t);r.current=t;const s=p.useRef(n);s.current=n;const o=p.useRef(null);e&&o.current===null&&(o.current=++$y),e||(o.current=null),p.useEffect(()=>{if(!e)return;const i=Symbol("overlay");ru.push({id:i,ordem:o.current??++$y});const a=l=>{l.key!=="Escape"||ru.reduce((d,c)=>c.ordem>d.ordem?c:d).id!==i||s.current&&r.current()};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a),ru.splice(ru.findIndex(l=>l.id===i),1)}},[e])}const vP={sm:"max-w-sm",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-5xl"};function hm({open:e,onClose:t,title:n,children:r,footer:s,size:o="md",dismissible:i=!0,fullscreen:a=!1}){const{t:l}=xe(),u=p.useRef(null),d=p.useId();return p.useEffect(()=>{var c;e&&((c=u.current)==null||c.focus())},[e]),fm(e,t,i),e?Dt.createPortal(h.jsxs("div",{className:z("fixed inset-0 z-modal flex",a?"p-0":"items-center justify-center max-sm:p-0 sm:p-4"),children:[h.jsx("div",{className:"absolute inset-0 bg-overlay",onClick:i?t:void 0,"aria-hidden":!0}),h.jsxs("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":n?d:void 0,tabIndex:-1,className:z("relative z-10 flex w-full flex-col border border-border bg-surface-raised shadow-card focus-visible:outline-none","max-h-full",a?"h-full max-w-none rounded-none":z("max-sm:h-full max-sm:max-w-none max-sm:rounded-none sm:rounded-card",vP[o])),children:[n&&h.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-4 px-6 pb-0 pt-4",children:[h.jsx("h2",{id:d,className:"text-subtitle text-text-strong",children:n}),i&&h.jsx(fr,{label:l("LANG_i18n_common.close"),icon:h.jsx(xl,{}),onClick:t})]}),h.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-6 py-5",children:r}),s&&h.jsx("div",{className:"flex shrink-0 justify-end gap-2 border-t border-border px-6 py-4",children:s})]})]}),document.body):null}const xP="modulepreload",wP=function(e){return"/"+e},By={},$=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=wP(l),l in By)return;By[l]=!0;const u=l.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":xP,u||(c.as="script"),c.crossOrigin="",c.href=l,a&&c.setAttribute("nonce",a),document.head.appendChild(c),u)return new Promise((f,g)=>{c.addEventListener("load",f),c.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return s.then(i=>{for(const a of i||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})};function Uw(e,t){return function(){return e.apply(t,arguments)}}const{toString:bP}=Object.prototype,{getPrototypeOf:Ei}=Object,{iterator:wl,toStringTag:$w}=Symbol,fc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),tl=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),fc(n,t))return!0;n=Ei(n)}return!1},SP=(e,t)=>e!=null&&tl(e,t)?e[t]:void 0,pm=(e=>t=>{const n=bP.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),In=e=>(e=e.toLowerCase(),t=>pm(t)===e),qc=e=>t=>typeof t===e,{isArray:uo}=Array,co=qc("undefined");function Ti(e){return e!==null&&!co(e)&&e.constructor!==null&&!co(e.constructor)&&ln(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Bw=In("ArrayBuffer");function EP(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Bw(e.buffer),t}const _P=qc("string"),ln=qc("function"),Vw=qc("number"),ji=e=>e!==null&&typeof e=="object",CP=e=>e===!0||e===!1,Pu=e=>{if(!ji(e))return!1;const t=Ei(e);return(t===null||t===Object.prototype||Ei(t)===null)&&!tl(e,$w)&&!tl(e,wl)},kP=e=>{if(!ji(e)||Ti(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},RP=In("Date"),NP=In("File"),PP=e=>!!(e&&typeof e.uri<"u"),LP=e=>e&&typeof e.getParts<"u",OP=In("Blob"),AP=In("FileList"),TP=In("Set"),jP=e=>ji(e)&&ln(e.pipe);function DP(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Vy=DP(),Hy=typeof Vy.FormData<"u"?Vy.FormData:void 0,IP=e=>{if(!e)return!1;if(Hy&&e instanceof Hy)return!0;const t=Ei(e);if(!t||t===Object.prototype||!ln(e.append))return!1;const n=pm(e);return n==="formdata"||n==="object"&&ln(e.toString)&&e.toString()==="[object FormData]"},MP=In("URLSearchParams"),[FP,zP,UP,$P]=["ReadableStream","Request","Response","Headers"].map(In),BP=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bl(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),uo(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Us=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Gw=e=>!co(e)&&e!==Us;function Nh(...e){const{caseless:t,skipUndefined:n}=Gw(this)&&this||{},r={},s=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const a=t&&typeof i=="string"&&Hw(r,i)||i,l=fc(r,a)?r[a]:void 0;Pu(l)&&Pu(o)?r[a]=Nh(l,o):Pu(o)?r[a]=Nh({},o):uo(o)?r[a]=o.slice():(!n||!co(o))&&(r[a]=o)};for(let o=0,i=e.length;o(bl(t,(s,o)=>{n&&ln(s)?Object.defineProperty(e,o,{__proto__:null,value:Uw(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),HP=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),GP=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},KP=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&Ei(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},WP=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},qP=e=>{if(!e)return null;if(uo(e))return e;let t=e.length;if(!Vw(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},QP=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ei(Uint8Array)),XP=(e,t)=>{const r=(e&&e[wl]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},YP=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},JP=In("HTMLFormElement"),ZP=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:eL}=Object.prototype,tL=In("RegExp"),Kw=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};bl(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},nL=e=>{Kw(e,(t,n)=>{if(ln(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(ln(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},rL=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return uo(e)?r(e):r(String(e).split(t)),n},sL=()=>{},oL=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function iL(e){return!!(e&&ln(e.append)&&e[$w]==="FormData"&&e[wl])}const aL=e=>{const t=new WeakSet,n=r=>{if(ji(r)){if(t.has(r))return;if(Ti(r))return r;if(!("toJSON"in r)){t.add(r);let s;if(TP(r)){s=[];for(const o of r){const i=n(o);!co(i)&&s.push(i)}}else s=uo(r)?[]:{},bl(r,(o,i)=>{const a=n(o);!co(a)&&(s[i]=a)});return t.delete(r),s}}return r};return n(e)},lL=In("AsyncFunction"),uL=e=>e&&(ji(e)||ln(e))&&ln(e.then)&&ln(e.catch),Ww=((e,t)=>e?setImmediate:t?((n,r)=>(Us.addEventListener("message",({source:s,data:o})=>{s===Us&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Us.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ln(Us.postMessage)),cL=typeof queueMicrotask<"u"?queueMicrotask.bind(Us):typeof process<"u"&&process.nextTick||Ww,qw=e=>e!=null&&ln(e[wl]),dL=e=>e!=null&&tl(e,wl)&&qw(e),L={isArray:uo,isArrayBuffer:Bw,isBuffer:Ti,isFormData:IP,isArrayBufferView:EP,isString:_P,isNumber:Vw,isBoolean:CP,isObject:ji,isPlainObject:Pu,isEmptyObject:kP,isReadableStream:FP,isRequest:zP,isResponse:UP,isHeaders:$P,isUndefined:co,isDate:RP,isFile:NP,isReactNativeBlob:PP,isReactNative:LP,isBlob:OP,isRegExp:tL,isFunction:ln,isStream:jP,isURLSearchParams:MP,isTypedArray:QP,isFileList:AP,forEach:bl,merge:Nh,extend:VP,trim:BP,stripBOM:HP,inherits:GP,toFlatObject:KP,kindOf:pm,kindOfTest:In,endsWith:WP,toArray:qP,forEachEntry:XP,matchAll:YP,isHTMLForm:JP,hasOwnProperty:fc,hasOwnProp:fc,hasOwnInPrototypeChain:tl,getSafeProp:SP,reduceDescriptors:Kw,freezeMethods:nL,toObjectSet:rL,toCamelCase:ZP,noop:sL,toFiniteNumber:oL,findKey:Hw,global:Us,isContextDefined:Gw,isSpecCompliantForm:iL,toJSONObject:aL,isAsyncFn:lL,isThenable:uL,setImmediate:Ww,asap:cL,isIterable:qw,isSafeIterable:dL},fL=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),hL=e=>{const t={};let n,r,s;return e&&e.split(` `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim();const a=L.hasOwnProp(t,n);!n||a&&L.hasOwnProp(fL,n)||(n==="set-cookie"?a?t[n].push(r):t[n]=[r]:t[n]=a?t[n]+", "+r:r)}),t};function pL(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const mL=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),gL=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function mm(e,t){return L.isArray(e)?e.map(n=>mm(n,t)):pL(String(e).replace(t,""))}const yL=e=>mm(e,mL),vL=e=>mm(e,gL);function Qw(e){const t=Object.create(null);return L.forEach(e.toJSON(),(n,r)=>{t[r]=vL(n)}),t}const Gy=Symbol("internals");function oa(e){return e&&String(e).trim().toLowerCase()}function Lu(e){return e===!1||e==null?e:L.isArray(e)?e.map(Lu):yL(String(e))}function xL(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const wL=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Bd(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function bL(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r=t))return e;n+=e[r]}return n}function SL(e){const t=Object.create(null),n=String(e);let r=0,s=!1,o=!1;function i(a){const l=Bd(n.slice(r,a)),u=l.indexOf("=");if(u<1)return;const d=Bd(l.slice(0,u));if(!wL.test(d))return;const c=d.toLowerCase();if(c==="__proto__"||c==="constructor"||c==="prototype")return;const f=Bd(l.slice(u+1));t[c]=bL(f)}for(let a=0;a/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Vd(e,t,n,r,s){if(L.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!L.isString(t)){if(L.isString(r))return t.indexOf(r)!==-1;if(L.isRegExp(r))return r.test(t)}}function _L(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function CL(e,t){const n=L.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let It=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(a,l,u){const d=oa(l);if(!d)return;const c=L.findKey(s,d);(!c||s[c]===void 0||u===!0||u===void 0&&s[c]!==!1)&&(s[c||l]=Lu(a))}const i=(a,l)=>L.forEach(a,(u,d)=>o(u,d,l));if(L.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(L.isString(t)&&(t=t.trim())&&!EL(t))i(hL(t),n);else if(L.isObject(t)&&L.isSafeIterable(t)){let a=Object.create(null),l,u;for(const d of t){if(!L.isArray(d))throw new TypeError("Object iterator must return a key-value pair");u=d[0],L.hasOwnProp(a,u)?(l=a[u],a[u]=L.isArray(l)?[...l,d[1]]:[l,d[1]]):a[u]=d[1]}i(a,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=oa(t),t){const r=L.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return xL(s);if(L.isFunction(n))return n.call(this,s,r);if(L.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=oa(t),t){const r=L.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Vd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=oa(i),i){const a=L.findKey(r,i);a&&(!n||Vd(r,r[a],a,n))&&(delete r[a],s=!0)}}return L.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||Vd(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return L.forEach(this,(s,o)=>{const i=L.findKey(r,o);if(i){n[i]=Lu(s),delete n[o];return}const a=t?_L(o):String(o).trim();a!==o&&delete n[o],n[a]=Lu(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return L.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&L.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}getSetCookie(){const t=this.get("set-cookie");return L.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return SL(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Gy]=this[Gy]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=oa(i);r[a]||(CL(s,i),r[a]=!0)}return L.isArray(t)?t.forEach(o):o(t),this}};It.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);L.reduceDescriptors(It.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});L.freezeMethods(It);const hc="[REDACTED ****]";function kL(e){if(L.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(L.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function RL(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],s=o=>{if(o===null||typeof o!="object"||L.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof It&&(o=o.toJSON()),r.push(o);let i;if(L.isArray(o))i=[],o.forEach((a,l)=>{const u=s(a);L.isUndefined(u)||(i[l]=u)});else{if(!L.isPlainObject(o)&&kL(o))return r.pop(),o;i=Object.create(null);for(const[a,l]of Object.entries(o)){const u=n.has(a.toLowerCase())?hc:s(l);L.isUndefined(u)||(i[a]=u)}}return r.pop(),i};return s(e)}function Ky(e){try{return String(e)}catch{return""}}function NL(e){return e.errors.map(n=>{try{return n&&n.message?Ky(n.message):Ky(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let q=class Xw extends Error{static from(t,n,r,s,o,i){let a=t.message;!a&&L.isArray(t.errors)&&t.errors.length&&(a=NL(t));const l=new Xw(a,n||t.code,r,s,o);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),i&&Object.assign(l,i),l}constructor(t,n,r,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&L.hasOwnProp(t,"redact")?t.redact:void 0,r=L.isArray(n)&&n.length>0?RL(t,n):L.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};q.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";q.ERR_BAD_OPTION="ERR_BAD_OPTION";q.ECONNABORTED="ECONNABORTED";q.ETIMEDOUT="ETIMEDOUT";q.ECONNREFUSED="ECONNREFUSED";q.ERR_NETWORK="ERR_NETWORK";q.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";q.ERR_DEPRECATED="ERR_DEPRECATED";q.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";q.ERR_BAD_REQUEST="ERR_BAD_REQUEST";q.ERR_CANCELED="ERR_CANCELED";q.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";q.ERR_INVALID_URL="ERR_INVALID_URL";q.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const PL=null,Yw=100;function Ph(e){return L.isPlainObject(e)||L.isArray(e)}function Jw(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function Hd(e,t,n){return e?e.concat(t).map(function(s,o){return s=Jw(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function LL(e){return L.isArray(e)&&!e.some(Ph)}const OL=L.toFlatObject(L,{},null,function(t){return/^is[A-Z]/.test(t)});function Qc(e,t,n){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=L.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,v){return!L.isUndefined(v[y])});const r=n.metaTokens,s=n.visitor||x,o=n.dots,i=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?Yw:n.maxDepth,u=a&&L.isSpecCompliantForm(t),d=[];if(!L.isFunction(s))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(L.isDate(m))return m.toISOString();if(L.isBoolean(m))return m.toString();if(!u&&L.isBlob(m))throw new q("Blob is not supported. Use a Buffer instead.");if(L.isArrayBuffer(m)||L.isTypedArray(m)){if(u&&typeof a=="function")return new a([m]);throw new q("Blob is not supported. Use a Buffer instead.",q.ERR_NOT_SUPPORT)}return m}function f(m){if(m>l)throw new q("Object is too deeply nested ("+m+" levels). Max depth: "+l,q.ERR_FORM_DATA_DEPTH_EXCEEDED)}function g(m,y){if(l===1/0)return JSON.stringify(m);const v=[];return JSON.stringify(m,function(C,N){if(!L.isObject(N))return N;for(;v.length&&v[v.length-1]!==this;)v.pop();return v.push(N),f(y+v.length-1),N})}function x(m,y,v){let S=m;if(L.isReactNative(t)&&L.isReactNativeBlob(m))return t.append(Hd(v,y,o),c(m)),!1;if(m&&!v&&typeof m=="object"){if(L.endsWith(y,"{}"))y=r?y:y.slice(0,-2),m=g(m,1);else if(L.isArray(m)&&LL(m)||(L.isFileList(m)||L.endsWith(y,"[]"))&&(S=L.toArray(m)))return y=Jw(y),S.forEach(function(N,E){!(L.isUndefined(N)||N===null)&&t.append(i===!0?Hd([y],E,o):i===null?y:y+"[]",c(N))}),!1}return Ph(m)?!0:(t.append(Hd(v,y,o),c(m)),!1)}const w=Object.assign(OL,{defaultVisitor:x,convertValue:c,isVisitable:Ph});function b(m,y,v=0){if(!L.isUndefined(m)){if(f(v),d.indexOf(m)!==-1)throw new Error("Circular reference detected in "+y.join("."));d.push(m),L.forEach(m,function(C,N){(!(L.isUndefined(C)||C===null)&&s.call(t,C,L.isString(N)?N.trim():N,y,w))===!0&&b(C,y?y.concat(N):[N],v+1)}),d.pop()}}if(!L.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Wy(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function gm(e,t){this._pairs=[],e&&Qc(e,this,t)}const Zw=gm.prototype;Zw.append=function(t,n){this._pairs.push([t,n])};Zw.toString=function(t){const n=t?r=>t.call(this,r,Wy):Wy;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function AL(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function eb(e,t,n){if(!t)return e;e=e||"";const r=L.isFunction(n)?{serialize:n}:n,s=L.getSafeProp(r,"encode")||AL,o=L.getSafeProp(r,"serialize");let i;if(o?i=o(t,r):i=L.isURLSearchParams(t)?t.toString():new gm(t,r).toString(s),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class qy{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){L.forEach(this.handlers,function(r){r!==null&&t(r)})}}const ym={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},TL=typeof URLSearchParams<"u"?URLSearchParams:gm,jL=typeof FormData<"u"?FormData:null,DL=typeof Blob<"u"?Blob:null,IL={isBrowser:!0,classes:{URLSearchParams:TL,FormData:jL,Blob:DL},protocols:["http","https","file","blob","url","data"]},vm=typeof window<"u"&&typeof document<"u",Lh=typeof navigator=="object"&&navigator||void 0,ML=vm&&(!Lh||["ReactNative","NativeScript","NS"].indexOf(Lh.product)<0),FL=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",zL=vm&&window.location.href||"http://localhost",UL=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:vm,hasStandardBrowserEnv:ML,hasStandardBrowserWebWorkerEnv:FL,navigator:Lh,origin:zL},Symbol.toStringTag,{value:"Module"})),Et={...UL,...IL};function $L(e,t){return Qc(e,new Et.classes.URLSearchParams,{visitor:function(n,r,s,o){return Et.isNode&&L.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const Qy=Yw;function tb(e){if(e>Qy)throw new q("FormData field is too deeply nested ("+e+" levels). Max depth: "+Qy,q.ERR_FORM_DATA_DEPTH_EXCEEDED)}function BL(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)tb(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function VL(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r=n.length;return i=!i&&L.isArray(s)?s.length:i,l?(L.hasOwnProp(s,i)?s[i]=L.isArray(s[i])?s[i].concat(r):[s[i],r]:s[i]=r,!a):((!L.hasOwnProp(s,i)||!L.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&L.isArray(s[i])&&(s[i]=VL(s[i])),!a)}if(L.isFormData(e)&&L.isFunction(e.entries)){const n={};return L.forEachEntry(e,(r,s)=>{t(BL(r),s,n,0)}),n}return null}const ko=(e,t)=>e!=null&&L.hasOwnProp(e,t)?e[t]:void 0;function HL(e,t,n){if(L.isString(e))try{return(t||JSON.parse)(e),L.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Sl={transitional:ym,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=L.isObject(t);if(o&&L.isHTMLForm(t)&&(t=new FormData(t)),L.isFormData(t))return s?JSON.stringify(nb(t)):t;if(L.isArrayBuffer(t)||L.isBuffer(t)||L.isStream(t)||L.isFile(t)||L.isBlob(t)||L.isReadableStream(t))return t;if(L.isArrayBufferView(t))return t.buffer;if(L.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){const l=ko(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return $L(t,l).toString();if((a=L.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=ko(this,"env"),d=u&&u.FormData;return Qc(a?{"files[]":t}:t,d&&new d,l)}}return o||s?(n.setContentType("application/json",!1),HL(t)):t}],transformResponse:[function(t){const n=ko(this,"transitional")||Sl.transitional,r=n&&n.forcedJSONParsing,s=ko(this,"responseType"),o=s==="json";if(L.isResponse(t)||L.isReadableStream(t))return t;if(t&&L.isString(t)&&(r&&!s||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,ko(this,"parseReviver"))}catch(l){if(a)throw l.name==="SyntaxError"?q.from(l,q.ERR_BAD_RESPONSE,this,null,ko(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Et.classes.FormData,Blob:Et.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch","query"],e=>{Sl.headers[e]={}});function Gd(e,t){const n=this||Sl,r=t||n,s=It.from(r.headers);let o=r.data;return L.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function rb(e){return!!(e&&e.__CANCEL__)}let El=class extends q{constructor(t,n,r){super(t??"canceled",q.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function sb(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new q("Request failed with status code "+n.status,n.status>=400&&n.status<500?q.ERR_BAD_REQUEST:q.ERR_BAD_RESPONSE,n.config,n.request,n))}function GL(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function KL(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),d=r[o];i||(i=u),n[s]=l,r[s]=u;let c=o,f=0;for(;c!==s;)f+=n[c++],c=c%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i{n=d,s=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const d=Date.now(),c=d-n;c>=r?i(u,d):(s=u,o||(o=setTimeout(()=>{o=null,i(s)},r-c)))},()=>s&&i(s)]}const pc=(e,t,n=3)=>{let r=0;const s=KL(50,250);return WL(o=>{if(!o||typeof o.loaded!="number")return;const i=o.loaded,a=o.lengthComputable?o.total:void 0,l=Math.max(0,a!=null?Math.min(i,a):i),u=Math.max(0,l-r),d=s(u);r=Math.max(r,l);const c={loaded:l,total:a,progress:a?l/a:void 0,bytes:u,rate:d||void 0,estimated:d&&a?(a-l)/d:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(c)},n)},Xy=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Yy=(e,t=L.asap)=>(...n)=>t(()=>e(...n)),qL=Et.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Et.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Et.origin),Et.navigator&&/(msie|trident)/i.test(Et.navigator.userAgent)):()=>!0,QL=Et.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];L.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),L.isString(r)&&a.push(`path=${r}`),L.isString(s)&&a.push(`domain=${s}`),o===!0&&a.push("secure"),L.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const JL=/^https?:(?!\/\/)/i,ZL=/[\t\n\r]/g;function eO(e){let t=0;for(;t`${n}${r}${hc}`)}function rO(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${hc}@`),n=t.indexOf("#"),s=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${hc}`);return n===-1?s:`${s}#${nO(t.slice(n+1))}`}function Jy(e,t){if(typeof e=="string"){const n=tO(e);if(JL.test(n))throw new q(`Invalid URL ${JSON.stringify(rO(n))}: missing "//" after protocol`,q.ERR_INVALID_URL,t)}}function ob(e,t,n,r){Jy(t,r);let s=!XL(t);return e&&(s||n===!1)?(Jy(e,r),YL(e,t)):t}const Zy=e=>e instanceof It?{...e}:e,sO=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function fo(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(d,c,f,g){return L.isPlainObject(d)&&L.isPlainObject(c)?L.merge.call({caseless:g},d,c):L.isPlainObject(c)?L.merge({},c):L.isArray(c)?c.slice():c}function s(d,c,f,g){if(L.isUndefined(c)){if(!L.isUndefined(d))return r(void 0,d,f,g)}else return r(d,c,f,g)}function o(d,c){if(!L.isUndefined(c))return r(void 0,c)}function i(d,c){if(L.isUndefined(c)){if(!L.isUndefined(d))return r(void 0,d)}else return r(void 0,c)}function a(d){const c=L.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!L.isUndefined(c))if(L.isPlainObject(c)){if(L.hasOwnProp(c,d))return c[d]}else return;const f=L.hasOwnProp(e,"transitional")?e.transitional:void 0;if(L.isPlainObject(f)&&L.hasOwnProp(f,d))return f[d]}function l(d,c,f){if(L.hasOwnProp(t,f))return r(d,c);if(L.hasOwnProp(e,f))return r(void 0,d)}const u={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:l,headers:(d,c,f)=>s(Zy(d),Zy(c),f,!0)};return L.forEach(sO({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const f=L.hasOwnProp(u,c)?u[c]:s,g=L.hasOwnProp(e,c)?e[c]:void 0,x=L.hasOwnProp(t,c)?t[c]:void 0,w=f(g,x,c);L.isUndefined(w)&&f!==l||(n[c]=w)}),L.hasOwnProp(t,"validateStatus")&&L.isUndefined(t.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(L.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const oO=["content-type","content-length"];function iO(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{oO.includes(r.toLowerCase())&&e.set(r,s)})}const aO=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function ib(e){const t=fo({},e),n=f=>L.hasOwnProp(t,f)?t[f]:void 0,r=n("data");let s=n("withXSRFToken");const o=n("xsrfHeaderName"),i=n("xsrfCookieName");let a=n("headers");const l=n("auth"),u=n("baseURL"),d=n("allowAbsoluteUrls"),c=n("url");if(t.headers=a=It.from(a),t.url=eb(ob(u,c,d,t),n("params"),n("paramsSerializer")),l){const f=L.getSafeProp(l,"username")||"",g=L.getSafeProp(l,"password")||"";try{a.set("Authorization","Basic "+btoa(f+":"+(g?aO(g):"")))}catch(x){throw q.from(x,q.ERR_BAD_OPTION_VALUE,e)}}if(L.isFormData(r)&&(Et.hasStandardBrowserEnv||Et.hasStandardBrowserWebWorkerEnv||L.isReactNative(r)?a.setContentType(void 0):L.isFunction(r.getHeaders)&&iO(a,r.getHeaders(),n("formDataHeaderPolicy"))),Et.hasStandardBrowserEnv&&(L.isFunction(s)&&(s=s(t)),s===!0||s==null&&qL(t.url))){const g=o&&i&&QL.read(i);g&&a.set(o,g)}return t}const lO=typeof XMLHttpRequest<"u",uO=lO&&function(e){return new Promise(function(n,r){const s=ib(e);let o=s.data;const i=It.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,d,c,f,g,x;function w(){g&&g(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function m(){if(!b)return;const v=It.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:v,config:e,request:b};sb(function(E){n(E),w()},function(E){r(E),w()},C),b=null}"onloadend"in b?b.onloadend=m:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(m)},b.onabort=function(){b&&(r(new q("Request aborted",q.ECONNABORTED,e,b)),w(),b=null)},b.onerror=function(S){const C=S&&S.message?S.message:"Network Error",N=new q(C,q.ERR_NETWORK,e,b);N.event=S||null,r(N),w(),b=null},b.ontimeout=function(){let S=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const C=s.transitional||ym;s.timeoutErrorMessage&&(S=s.timeoutErrorMessage),r(new q(S,C.clarifyTimeoutError?q.ETIMEDOUT:q.ECONNABORTED,e,b)),w(),b=null},o===void 0&&i.setContentType(null),"setRequestHeader"in b&&L.forEach(Qw(i),function(S,C){b.setRequestHeader(C,S)}),L.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),a&&a!=="json"&&(b.responseType=s.responseType),u&&([f,x]=pc(u,!0),b.addEventListener("progress",f)),l&&b.upload&&([c,g]=pc(l),b.upload.addEventListener("progress",c),b.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(d=v=>{b&&(r(!v||v.type?new El(null,e,b):v),b.abort(),w(),b=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const y=GL(s.url);if(y&&!Et.protocols.includes(y)){r(new q("Unsupported protocol "+y+":",q.ERR_BAD_REQUEST,e)),w();return}b.send(o||null)})},cO=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(l){if(!r){r=!0,i();const u=l instanceof Error?l:this.reason;n.abort(u instanceof q?u:new El(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,s(new q(`timeout of ${t}ms exceeded`,q.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>{if(!r){if(l.aborted){s.call(l);return}l.addEventListener("abort",s,{once:!0})}});const{signal:a}=n;return a.unsubscribe=()=>L.asap(i),a},dO=function*(e,t){let n=e.byteLength;if(n{const s=fO(e,t);let o=0,i,a=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await s.next();if(u){a(),l.close();return}let c=d.byteLength;if(n){let f=o+=c;n(f)}l.enqueue(new Uint8Array(d))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},tv=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,ab=(e,t,n)=>t+2e<=57?e-48:(e&223)-55,pO=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,mO=e=>e===9||e===10||e===12||e===13||e===32,gO=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},yO=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},vO=e=>{const t=e.length;let n=0,r=0,s=!1;for(let o=0;o0){s=!0;continue}n++}}return s||r>2||r>0&&(n+r)%4!==0||n%4===1?yO(e):gO(n)},xO=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),s=e.slice(n+1);if(/;base64/i.test(r))return t(s);let i=0;for(let a=0,l=s.length;a=55296&&u<=56319&&a+1=56320&&d<=57343?(i+=4,a++):i+=3}else i+=3}return i};function wO(e){const t=typeof e=="string"?e.indexOf("#"):-1;return xO(t===-1?e:e.slice(0,t),vO)}const xm="1.19.0",rv=64*1024,{isFunction:su}=L,bO=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),sv=e=>{if(!L.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},ov=(e,...t)=>{try{return!!e(...t)}catch{return!1}},SO=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},EO=e=>{const t=L.global!==void 0&&L.global!==null?L.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=L.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:o,Response:i}=e,a=s?su(s):typeof fetch=="function",l=su(o),u=su(i);if(!a)return!1;const d=a&&su(n),c=a&&(typeof r=="function"?(m=>y=>m.encode(y))(new r):async m=>new Uint8Array(await new o(m).arrayBuffer())),f=l&&d&&ov(()=>{let m=!1;const y=new o(Et.origin,{body:new n,method:"POST",get duplex(){return m=!0,"half"}}),v=y.headers.has("Content-Type");return y.body!=null&&y.body.cancel(),m&&!v}),g=u&&d&&ov(()=>L.isReadableStream(new i("").body)),x={stream:g&&(m=>m.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!x[m]&&(x[m]=(y,v)=>{let S=y&&y[m];if(S)return S.call(y);throw new q(`Response type '${m}' is not supported`,q.ERR_NOT_SUPPORT,v)})});const w=async m=>{if(m==null)return 0;if(L.isBlob(m))return m.size;if(L.isSpecCompliantForm(m))return(await new o(Et.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(L.isArrayBufferView(m)||L.isArrayBuffer(m))return m.byteLength;if(L.isURLSearchParams(m)&&(m=m+""),L.isString(m))return(await c(m)).byteLength},b=async(m,y)=>{const v=L.toFiniteNumber(m.getContentLength());return v??w(y)};return async m=>{let{url:y,method:v,data:S,signal:C,cancelToken:N,timeout:E,onDownloadProgress:k,onUploadProgress:T,responseType:P,headers:A,withCredentials:D="same-origin",fetchOptions:F,maxContentLength:H,maxBodyLength:le}=ib(m);const X=L.isNumber(H)&&H>-1,ne=L.isNumber(le)&&le>-1,I=re=>L.hasOwnProp(m,re)?m[re]:void 0;let V=s||fetch;P=P?(P+"").toLowerCase():"text";let G=cO([C,N&&N.toAbortSignal()],E),Y=null;const ce=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let Pe,Re=null;const Ae=()=>new q("Request body larger than maxBodyLength limit",q.ERR_BAD_REQUEST,m,Y);try{let re;const Le=I("auth");if(Le){const ue=L.getSafeProp(Le,"username")||"",pt=L.getSafeProp(Le,"password")||"";re={username:ue,password:pt}}if(SO(y)){const ue=new URL(y,Et.origin);if(!re&&(ue.username||ue.password)){const pt=sv(ue.username),dn=sv(ue.password);re={username:pt,password:dn}}(ue.username||ue.password)&&(ue.username="",ue.password="",y=ue.href)}if(re&&(A.delete("authorization"),A.set("Authorization","Basic "+btoa(bO((re.username||"")+":"+(re.password||""))))),X&&typeof y=="string"&&y.startsWith("data:")&&wO(y)>H)throw new q("maxContentLength size of "+H+" exceeded",q.ERR_BAD_RESPONSE,m,Y);if(ne&&v!=="get"&&v!=="head"){const ue=await w(S);if(typeof ue=="number"&&isFinite(ue)&&(Pe=ue,ue>le))throw Ae()}const ft=ne&&(L.isReadableStream(S)||L.isStream(S)),Xt=(ue,pt,dn)=>ev(ue,rv,Yt=>{if(ne&&Yt>le)throw Re=Ae();pt&&pt(Yt)},dn);if(f&&v!=="get"&&v!=="head"&&(T||ft)){if(Pe=Pe??await b(A,S),Pe!==0||ft){let ue=new o(y,{method:"POST",body:S,duplex:"half"}),pt;if(L.isFormData(S)&&(pt=ue.headers.get("content-type"))&&A.setContentType(pt),ue.body){const[dn,Yt]=T&&Xy(Pe,pc(Yy(T)))||[];S=Xt(ue.body,dn,Yt)}}}else if(ft&&!l&&d&&v!=="get"&&v!=="head")S=Xt(S);else if(ft&&l&&!f&&v!=="get"&&v!=="head")throw new q("Stream request bodies are not supported by the current fetch implementation",q.ERR_NOT_SUPPORT,m,Y);L.isString(D)||(D=D?"include":"omit");const Ce=l&&"credentials"in o.prototype;if(L.isFormData(S)){const ue=A.getContentType();ue&&/^multipart\/form-data/i.test(ue)&&!/boundary=/i.test(ue)&&A.delete("content-type")}A.set("User-Agent","axios/"+xm,!1);const Xn={...F,signal:G,method:v.toUpperCase(),headers:Qw(A.normalize()),body:S,duplex:"half",credentials:Ce?D:void 0};Y=l&&new o(y,Xn);let we=await(l?V(Y,F):V(y,Xn));const Rt=It.from(we.headers);if(X){const ue=L.toFiniteNumber(Rt.getContentLength());if(ue!=null&&ue>H)throw new q("maxContentLength size of "+H+" exceeded",q.ERR_BAD_RESPONSE,m,Y)}const Nt=g&&(P==="stream"||P==="response");if(g&&we.body&&(k||X||Nt&&ce)){const ue={};["status","statusText","headers"].forEach(Cn=>{ue[Cn]=we[Cn]});const pt=L.toFiniteNumber(Rt.getContentLength()),[dn,Yt]=k&&Xy(pt,pc(Yy(k),!0))||[];let fn=0;const zr=Cn=>{if(X&&(fn=Cn,fn>H))throw new q("maxContentLength size of "+H+" exceeded",q.ERR_BAD_RESPONSE,m,Y);dn&&dn(Cn)};we=new i(ev(we.body,rv,zr,()=>{Yt&&Yt(),ce&&ce()}),ue)}P=P||"text";let ht=await x[L.findKey(x,P)||"text"](we,m);if(X&&!g&&!Nt){let ue;if(ht!=null&&(typeof ht.byteLength=="number"?ue=ht.byteLength:typeof ht.size=="number"?ue=ht.size:typeof ht=="string"&&(ue=typeof r=="function"?new r().encode(ht).byteLength:ht.length)),typeof ue=="number"&&ue>H)throw new q("maxContentLength size of "+H+" exceeded",q.ERR_BAD_RESPONSE,m,Y)}return!Nt&&ce&&ce(),await new Promise((ue,pt)=>{sb(ue,pt,{data:ht,headers:It.from(we.headers),status:we.status,statusText:we.statusText,config:m,request:Y})})}catch(re){if(ce&&ce(),G&&G.aborted&&G.reason instanceof q){const Le=G.reason;throw Le.config=m,Y&&(Le.request=Y),re!==Le&&Object.defineProperty(Le,"cause",{__proto__:null,value:re,writable:!0,enumerable:!1,configurable:!0}),Le}if(Re)throw Y&&!Re.request&&(Re.request=Y),Re;if(re instanceof q)throw Y&&!re.request&&(re.request=Y),re;if(re&&re.name==="TypeError"&&/Load failed|fetch/i.test(re.message)){const Le=new q("Network Error",q.ERR_NETWORK,m,Y,re&&re.response);throw Object.defineProperty(Le,"cause",{__proto__:null,value:re.cause||re,writable:!0,enumerable:!1,configurable:!0}),Le}throw q.from(re,re&&re.code,m,Y,re&&re.response)}}},_O=new Map,lb=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,a=i,l,u,d=_O;for(;a--;)l=o[a],u=d.get(l),u===void 0&&d.set(l,u=a?new Map:EO(t)),d=u;return u};lb();const wm={http:PL,xhr:uO,fetch:{get:lb}};L.forEach(wm,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const iv=e=>`- ${e}`,CO=e=>L.isFunction(e)||e===null||e===!1;function kO(e,t){e=L.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since : `+i.map(iv).join(` `):" "+iv(i[0]):"as no adapter specified";throw new q("There is no suitable adapter to dispatch the request "+a,q.ERR_NOT_SUPPORT)}return s}const ub={getAdapter:kO,adapters:wm};function Kd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new El(null,e)}function Wd(e){return Kd(e),e.headers=It.from(e.headers),e.data=Gd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ub.getAdapter(e.adapter||Sl.adapter,e)(e).then(function(r){Kd(e),e.response=r;try{r.data=Gd.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=It.from(r.headers),r},function(r){if(!rb(r)&&(Kd(e),r&&r.response)){e.response=r.response;try{r.response.data=Gd.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=It.from(r.response.headers)}return Promise.reject(r)})}const Xc={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Xc[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const av={};Xc.transitional=function(t,n,r){function s(o,i){return"[Axios v"+xm+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(t===!1)throw new q(s(i," has been removed"+(n?" in "+n:"")),q.ERR_DEPRECATED);return n&&!av[i]&&(av[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,a):!0}};Xc.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function RO(e,t,n){if(typeof e!="object"||e===null)throw new q("options must be an object",q.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const a=e[o],l=a===void 0||i(a,o,e);if(l!==!0)throw new q("option "+o+" must be "+l,q.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new q("Unknown option "+o,q.ERR_BAD_OPTION)}}const Ou={assertOptions:RO,validators:Xc},At=Ou.validators;let Zs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new qy,response:new qy}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=(()=>{if(!s.stack)return"";const i=s.stack.indexOf(` `);return i===-1?"":s.stack.slice(i+1)})();try{if(!r.stack)r.stack=o;else if(o){const i=o.indexOf(` `),a=i===-1?-1:o.indexOf(` `,i+1),l=a===-1?"":o.slice(a+1);String(r.stack).endsWith(l)||(r.stack+=` `+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=fo(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Ou.assertOptions(r,{silentJSONParsing:At.transitional(At.boolean),forcedJSONParsing:At.transitional(At.boolean),clarifyTimeoutError:At.transitional(At.boolean),legacyInterceptorReqResOrdering:At.transitional(At.boolean),advertiseZstdAcceptEncoding:At.transitional(At.boolean),validateStatusUndefinedResolves:At.transitional(At.boolean)},!1),s!=null&&(L.isFunction(s)?n.paramsSerializer={serialize:s}:Ou.assertOptions(s,{encode:At.function,serialize:At.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ou.assertOptions(n,{baseUrl:At.spelling("baseURL"),withXsrfToken:At.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&L.merge(o.common,o[n.method]);o&&L.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete o[x]}),n.headers=It.concat(i,o);const a=[];let l=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(n)===!1)return;l=l&&w.synchronous;const b=n.transitional||ym;b&&b.legacyInterceptorReqResOrdering?a.unshift(w.fulfilled,w.rejected):a.push(w.fulfilled,w.rejected)});const u=[];this.interceptors.response.forEach(function(w){u.push(w.fulfilled,w.rejected)});let d,c=0,f;if(!l){const x=[Wd.bind(this),void 0];for(x.unshift(...a),x.push(...u),f=x.length,d=Promise.resolve(n);cWd.call(this,g)))}catch(m){d=Promise.reject(m)}break}}if(!d)try{d=Wd.call(this,g)}catch(x){d=Promise.reject(x)}for(c=0,f=u.length;c{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,a){r.reason||(r.reason=new El(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new cb(function(s){t=s}),cancel:t}}};function PO(e){return function(n){return e.apply(null,n)}}function LO(e){return L.isObject(e)&&e.isAxiosError===!0}const Oh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Oh).forEach(([e,t])=>{Oh[t]=e});function db(e){const t=new Zs(e),n=Uw(Zs.prototype.request,t);return L.extend(n,Zs.prototype,t,{allOwnKeys:!0}),L.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return db(fo(e,s))},n}const Ye=db(Sl);Ye.Axios=Zs;Ye.CanceledError=El;Ye.CancelToken=NO;Ye.isCancel=rb;Ye.VERSION=xm;Ye.toFormData=Qc;Ye.AxiosError=q;Ye.Cancel=Ye.CanceledError;Ye.all=function(t){return Promise.all(t)};Ye.spread=PO;Ye.isAxiosError=LO;Ye.mergeConfig=fo;Ye.AxiosHeaders=It;Ye.formToJSON=e=>nb(L.isHTMLForm(e)?new FormData(e):e);Ye.getAdapter=ub.getAdapter;Ye.HttpStatusCode=Oh;Ye.default=Ye;const{Axios:w3,AxiosError:b3,CanceledError:S3,isCancel:E3,CancelToken:_3,VERSION:C3,all:k3,Cancel:R3,isAxiosError:N3,spread:P3,toFormData:L3,AxiosHeaders:O3,HttpStatusCode:A3,formToJSON:T3,getAdapter:j3,mergeConfig:D3,create:I3}=Ye,Ah="procman.activeCompanyId";function bm(){return localStorage.getItem(Ah)}function Th(e){e?localStorage.setItem(Ah,e):localStorage.removeItem(Ah)}const OO="demo",jh="procman.tenant";function AO(e){const t=e.split(".");return t.length===4&&t.every(n=>/^\d{1,3}$/.test(n))}function TO(){const e=window.location.hostname;if(e.startsWith("[")||AO(e))return null;const t=e.split(".");return t.length>=3&&t[0]!=="www"?t[0].toLowerCase():null}function jO(){try{return window.sessionStorage.getItem(jh)}catch{return null}}function M3(e){try{e?window.sessionStorage.setItem(jh,e):window.sessionStorage.removeItem(jh)}catch{}}function _l(){return TO()??jO()??OO}const fe=e=>typeof e=="string",ia=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},lv=e=>e==null?"":""+e,DO=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},IO=/###/g,uv=e=>e&&e.indexOf("###")>-1?e.replace(IO,"."):e,cv=e=>!e||fe(e),Ra=(e,t,n)=>{const r=fe(t)?t.split("."):t;let s=0;for(;s{const{obj:r,k:s}=Ra(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let o=t[t.length-1],i=t.slice(0,t.length-1),a=Ra(e,i,Object);for(;a.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),a=Ra(e,i,Object),a&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},MO=(e,t,n,r)=>{const{obj:s,k:o}=Ra(e,t,Object);s[o]=s[o]||[],s[o].push(n)},mc=(e,t)=>{const{obj:n,k:r}=Ra(e,t);if(n)return n[r]},FO=(e,t,n)=>{const r=mc(e,n);return r!==void 0?r:mc(t,n)},fb=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?fe(e[r])||e[r]instanceof String||fe(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):fb(e[r],t[r],n):e[r]=t[r]);return e},Ro=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var zO={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const UO=e=>fe(e)?e.replace(/[&<>"'\/]/g,t=>zO[t]):e;class $O{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const BO=[" ",",","?","!",";"],VO=new $O(20),HO=(e,t,n)=>{t=t||"",n=n||"";const r=BO.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const s=VO.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let o=!s.test(e);if(!o){const i=e.indexOf(n);i>0&&!s.test(e.substring(0,i))&&(o=!0)}return o},Dh=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let s=e;for(let o=0;o-1&&le&&e.replace("_","-"),GO={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class yc{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||GO,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s{let[a,l]=i;for(let u=0;u{let[a,l]=i;for(let u=0;u1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):fe(r)&&o?a.push(...r.split(o)):a.push(r)));const l=mc(this.data,a);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),l||!i||!fe(r)?l:Dh(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(a=t.split("."),s=n,n=a[1]),this.addNamespaces(n),dv(this.data,a,s),o.silent||this.emit("added",t,n,r,s)}addResources(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(fe(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let l=mc(this.data,a)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?fb(l,r,o):l={...l,...r},dv(this.data,a,l),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var hb={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,s))}),t}};const hv={};class vc extends Yc{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),DO(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=lr.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!HO(t,r,s);if(i&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:fe(o)?[o]:o};const u=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(s)}return{key:t,namespaces:fe(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(t[t.length-1],n),l=a[a.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const S=n.nsSeparator||this.options.nsSeparator;return s?{res:`${l}${S}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${S}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:i}const c=this.resolve(t,n);let f=c&&c.res;const g=c&&c.usedKey||i,x=c&&c.exactUsedKey||i,w=Object.prototype.toString.apply(f),b=["[object Number]","[object Function]","[object RegExp]"],m=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,v=!fe(f)&&typeof f!="boolean"&&typeof f!="number";if(y&&f&&v&&b.indexOf(w)<0&&!(fe(m)&&Array.isArray(f))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,f,{...n,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(c.res=S,c.usedParams=this.getUsedParamsDetails(n),c):S}if(o){const S=Array.isArray(f),C=S?[]:{},N=S?x:g;for(const E in f)if(Object.prototype.hasOwnProperty.call(f,E)){const k=`${N}${o}${E}`;C[E]=this.translate(k,{...n,joinArrays:!1,ns:a}),C[E]===k&&(C[E]=f[E])}f=C}}else if(y&&fe(m)&&Array.isArray(f))f=f.join(m),f&&(f=this.extendTranslation(f,t,n,r));else{let S=!1,C=!1;const N=n.count!==void 0&&!fe(n.count),E=vc.hasDefaultValue(n),k=N?this.pluralResolver.getSuffix(u,n.count,n):"",T=n.ordinal&&N?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",P=N&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),A=P&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${k}`]||n[`defaultValue${T}`]||n.defaultValue;!this.isValidLookup(f)&&E&&(S=!0,f=A),this.isValidLookup(f)||(C=!0,f=i);const F=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:f,H=E&&A!==f&&this.options.updateMissing;if(C||S||H){if(this.logger.log(H?"updateKey":"missingKey",u,l,i,H?A:f),o){const I=this.resolve(i,{...n,keySeparator:!1});I&&I.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let le=[];const X=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&X&&X[0])for(let I=0;I{const Y=E&&G!==f?G:F;this.options.missingKeyHandler?this.options.missingKeyHandler(I,l,V,Y,H,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(I,l,V,Y,H,n),this.emit("missingKey",I,l,V,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&N?le.forEach(I=>{const V=this.pluralResolver.getSuffixes(I,n);P&&n[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(G=>{ne([I],i+G,n[`defaultValue${G}`]||A)})}):ne(le,i,A))}f=this.extendTranslation(f,t,n,c,r),C&&f===i&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${i}`),(C||S)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${i}`:i,S?f:void 0):f=this.options.parseMissingKeyHandler(f))}return s?(c.res=f,c.usedParams=this.getUsedParamsDetails(n),c):f}extendTranslation(t,n,r,s,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=fe(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const f=t.match(this.interpolator.nestingRegexp);d=f&&f.length}let c=r.replace&&!fe(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),t=this.interpolator.interpolate(t,c,r.lng||this.language||s.usedLng,r),u){const f=t.match(this.interpolator.nestingRegexp),g=f&&f.length;d1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,i,a;return fe(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),d=u.key;s=d;let c=u.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const f=n.count!==void 0&&!fe(n.count),g=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),x=n.context!==void 0&&(fe(n.context)||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);c.forEach(b=>{this.isValidLookup(r)||(a=b,!hv[`${w[0]}-${b}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(hv[`${w[0]}-${b}`]=!0,this.logger.warn(`key "${s}" for languages "${w.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(m=>{if(this.isValidLookup(r))return;i=m;const y=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(y,d,m,b,n);else{let S;f&&(S=this.pluralResolver.getSuffix(m,n.count,n));const C=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(y.push(d+S),n.ordinal&&S.indexOf(N)===0&&y.push(d+S.replace(N,this.options.pluralSeparator)),g&&y.push(d+C)),x){const E=`${d}${this.options.contextSeparator}${n.context}`;y.push(E),f&&(y.push(E+S),n.ordinal&&S.indexOf(N)===0&&y.push(E+S.replace(N,this.options.pluralSeparator)),g&&y.push(E+C))}}let v;for(;v=y.pop();)this.isValidLookup(r)||(o=v,r=this.getResource(m,b,v,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!fe(t.replace);let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const qd=e=>e.charAt(0).toUpperCase()+e.slice(1);class pv{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=lr.create("languageUtils")}getScriptPartFromCode(t){if(t=gc(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=gc(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(fe(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let s=Intl.getCanonicalLocales(t)[0];if(s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s)return s}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=qd(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=qd(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=qd(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),fe(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],o=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return fe(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):fe(t)&&o(this.formatLanguageCode(t)),r.forEach(i=>{s.indexOf(i)<0&&o(this.formatLanguageCode(i))}),s}}let KO=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],WO={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const qO=["v1","v2","v3"],QO=["v4"],mv={zero:0,one:1,two:2,few:3,many:4,other:5},XO=()=>{const e={};return KO.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:WO[t.fc]}})}),e};class YO{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=lr.create("pluralResolver"),(!this.options.compatibilityJSON||QO.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=XO(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=gc(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(r,{type:s})}catch{if(!t.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(l,n)}return this.pluralRulesCache[o]=i,i}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,o)=>mv[s]-mv[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(t,s,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let s=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const o=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!qO.includes(this.options.compatibilityJSON)}}const gv=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=FO(e,t,n);return!o&&s&&fe(n)&&(o=Dh(e,n,r),o===void 0&&(o=Dh(t,n,r))),o},Qd=e=>e.replace(/\$/g,"$$$$");class JO{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=lr.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:d,unescapePrefix:c,nestingPrefix:f,nestingPrefixEscaped:g,nestingSuffix:x,nestingSuffixEscaped:w,nestingOptionsSeparator:b,maxReplaces:m,alwaysFormat:y}=t.interpolation;this.escape=n!==void 0?n:UO,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?Ro(o):i||"{{",this.suffix=a?Ro(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=f?Ro(f):g||Ro("$t("),this.nestingSuffix=x?Ro(x):w||Ro(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=m||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,s){let o,i,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=g=>{if(g.indexOf(this.formatSeparator)<0){const m=gv(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,r,{...s,...n,interpolationkey:g}):m}const x=g.split(this.formatSeparator),w=x.shift().trim(),b=x.join(this.formatSeparator).trim();return this.format(gv(n,l,w,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...s,...n,interpolationkey:w})};this.resetRegExp();const d=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,c=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>Qd(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?Qd(this.escape(g)):Qd(g)}].forEach(g=>{for(a=0;o=g.regex.exec(t);){const x=o[1].trim();if(i=u(x),i===void 0)if(typeof d=="function"){const b=d(t,o,s);i=fe(b)?b:""}else if(s&&Object.prototype.hasOwnProperty.call(s,x))i="";else if(c){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${x} for interpolating ${t}`),i="";else!fe(i)&&!this.useRawValueToEscape&&(i=lv(i));const w=g.safeValue(i);if(t=t.replace(o[0],w),c?(g.regex.lastIndex+=i.length,g.regex.lastIndex-=o[0].length):g.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,i;const a=(l,u)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const c=l.split(new RegExp(`${d}[ ]*{`));let f=`{${c[1]}`;l=c[0],f=this.interpolate(f,i);const g=f.match(/'/g),x=f.match(/"/g);(g&&g.length%2===0&&!x||x.length%2!==0)&&(f=f.replace(/'/g,'"'));try{i=JSON.parse(f),u&&(i={...u,...i})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,w),`${l}${d}${f}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;s=this.nestingRegexp.exec(t);){let l=[];i={...r},i=i.replace&&!fe(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const d=s[1].split(this.formatSeparator).map(c=>c.trim());s[1]=d.shift(),l=d,u=!0}if(o=n(a.call(this,s[1].trim(),i),i),o&&s[0]===t&&!fe(o))return o;fe(o)||(o=lv(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),u&&(o=l.reduce((d,c)=>this.format(d,c,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const ZO=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(i=>{if(i){const[a,...l]=i.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),d=a.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},No=e=>{const t={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=r+JSON.stringify(o);let a=t[i];return a||(a=e(gc(r),s),t[i]=a),a(n)}};class eA{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=lr.create("formatter"),this.options=t,this.formats={number:No((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:No((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:No((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:No((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:No((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=No(n)}format(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(l=>l.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,l)=>{const{formatName:u,formatOptions:d}=ZO(l);if(this.formats[u]){let c=a;try{const f=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},g=f.locale||f.lng||s.locale||s.lng||r;c=this.formats[u](a,g,{...d,...s,...f})}catch(f){this.logger.warn(f)}return c}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}const tA=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class nA extends Yc{constructor(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=lr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(t,n,r,s){const o={},i={},a={},l={};return t.forEach(u=>{let d=!0;n.forEach(c=>{const f=`${u}|${c}`;!r.reload&&this.store.hasResourceBundle(u,c)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?i[f]===void 0&&(i[f]=!0):(this.state[f]=1,d=!1,i[f]===void 0&&(i[f]=!0),o[f]===void 0&&(o[f]=!0),l[c]===void 0&&(l[c]=!0)))}),d||(a[u]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const s=t.split("|"),o=s[0],i=s[1];n&&this.emit("failedLoading",o,i,n),!n&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(l=>{MO(l.loaded,[o],i),tA(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const d=l.loaded[u];d.length&&d.forEach(c=>{a[u][c]===void 0&&(a[u][c]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:o,callback:i});return}this.readingCalls++;const a=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(u&&d&&s{this.read.call(this,t,n,r,s+1,o*2,i)},o);return}i(u,d)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}return}return l(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();fe(t)&&(t=this.languageUtils.toResolveHierarchy(t)),fe(n)&&(n=[n]);const o=this.queueLoad(t,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(i,a)=>{i&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,i),!i&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,a),this.loaded(t,i,a)})}saveMissing(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(t,n,r,s,l):d=u(t,n,r,s),d&&typeof d.then=="function"?d.then(c=>a(null,c)).catch(a):a(null,d)}catch(d){a(d)}else u(t,n,r,s,a,l)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const yv=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),fe(e[1])&&(t.defaultValue=e[1]),fe(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),vv=e=>(fe(e.ns)&&(e.ns=[e.ns]),fe(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),fe(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),ou=()=>{},rA=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class nl extends Yc{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=vv(t),this.services={},this.logger=lr,this.modules={external:[]},rA(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(fe(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=yv();this.options={...s,...this.options,...vv(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?lr.init(o(this.modules.logger),this.options):lr.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=eA);const c=new pv(this.options);this.store=new fv(this.options.resources,this.options);const f=this.services;f.logger=lr,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new YO(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(f.formatter=o(d),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new JO(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new nA(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(g){for(var x=arguments.length,w=new Array(x>1?x-1:0),b=1;b1?x-1:0),b=1;b{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,r||(r=ou),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const l=ia(),u=()=>{const d=(c,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(c,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ou;const s=fe(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],i=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>i(l)),this.options.preload&&this.options.preload.forEach(a=>i(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const s=ia();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=ou),this.services.backendConnector.reload(t,n,o=>{s.resolve(),r(o)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&hb.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const s=ia();this.emit("languageChanging",t);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},i=(l,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const u=fe(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{i(d,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),s}getFixedT(t,n,r){var s=this;const o=function(i,a){let l;if(typeof a!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),c=2;c`${l.keyPrefix}${f}${x}`):g=l.keyPrefix?`${l.keyPrefix}${f}${i}`:i,s.t(g,l)};return fe(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,i);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!s||i(o,t)))}loadNamespaces(t,n){const r=ia();return this.options.ns?(fe(t)&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=ia();fe(t)&&(t=[t]);const s=this.options.preload||[],o=t.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return o.length?(this.options.preload=s.concat(o),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new pv(yv());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new nl(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ou;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new nl(s);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new fv(this.store.data,s),o.services.resourceStore=o.store),o.translator=new vc(o.services,s),o.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),d=1;d{const e=ye.t.bind(ye),t=(n,...r)=>e(typeof n=="string"?n.replace(sA,""):n,...r);ye.t=t,await Mh(Na),iu!==Na&&await Mh(iu),await lA(),gb(iu)});function Sm(){return ye.language||Na}function yb(){var t,n;const e=(n=(t=ye.options.interpolation)==null?void 0:t.defaultVariables)==null?void 0:n.app;return typeof e=="string"&&e?e:"{app}"}const cA={pt:"pt-PT"};function vb(){const e=Sm(),t=typeof navigator>"u"?"":navigator.language;return t&&t.split("-")[0]===e.split("-")[0]?t:cA[e]??e}function xb(e){localStorage.setItem(pb,e),Mh(e).then(()=>{ye.changeLanguage(e),gb(e)})}const ie=Ye.create({baseURL:"/",withCredentials:!0});ie.interceptors.request.use(e=>{e.headers.set("X-Tenant",_l()),e.headers.set("Accept-Language",Sm());const t=bm();return t&&e.headers.set("X-Company",t),e});const xv=["/auth/login","/auth/refresh","/auth/logout","/auth/mfa/"],aa={tenant:null,platform:null};async function dA(e){const t=e?"platform":"tenant";return aa[t]??(aa[t]=Ye.post(e?"/api/v1/platform/auth/refresh":"/api/v1/auth/refresh",null,{withCredentials:!0,headers:{"X-Tenant":_l(),"Accept-Language":Sm()}}).then(()=>!0).catch(()=>!1).finally(()=>{aa[t]=null})),aa[t]}ie.interceptors.response.use(e=>e,async e=>{var s,o;const t=e.config,n=(t==null?void 0:t.url)??"",r=n.startsWith("/api/v1/platform");if(((s=e.response)==null?void 0:s.status)===401&&t&&!t._retried&&!xv.some(i=>n.includes(i))&&await dA(r))return t._retried=!0,ie.request(t);if(((o=e.response)==null?void 0:o.status)===401&&!xv.some(i=>n.includes(i)))if(r){const{usePlatformAuthStore:i}=await $(async()=>{const{usePlatformAuthStore:a}=await Promise.resolve().then(()=>UI);return{usePlatformAuthStore:a}},void 0);i.getState().markUnauthenticated()}else{const{useAuthStore:i}=await $(async()=>{const{useAuthStore:a}=await Promise.resolve().then(()=>EA);return{useAuthStore:a}},void 0);i.getState().markUnauthenticated()}return Promise.reject(e)});const wv=e=>{let t;const n=new Set,r=(u,d)=>{const c=typeof u=="function"?u(t):u;if(!Object.is(c,t)){const f=t;t=d??(typeof c!="object"||c===null)?c:Object.assign({},t,c),n.forEach(g=>g(t,f))}},s=()=>t,a={setState:r,getState:s,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=t=e(r,s,a);return a},fA=e=>e?wv(e):wv,hA=e=>e;function pA(e,t=hA){const n=ut.useSyncExternalStore(e.subscribe,ut.useCallback(()=>t(e.getState()),[e,t]),ut.useCallback(()=>t(e.getInitialState()),[e,t]));return ut.useDebugValue(n),n}const bv=e=>{const t=fA(e),n=r=>pA(t,r);return Object.assign(n,t),n},Cl=e=>e?bv(e):bv,mA="trail",Jc=new hC({defaultOptions:{queries:{retry:1,staleTime:3e4,refetchOnWindowFocus:!0}},mutationCache:new Fx({onSuccess:()=>{Jc.invalidateQueries({queryKey:[mA]})}})}),wb="procman.theme",bb="procman.nav-aberto",Sb="procman.sidebar-colapsada",Eb="procman.sidebar-largura",Xd="procman.gaveta-largura",Yd="procman.gaveta-altura",_b="procman.percurso-expandido";function gA(){return localStorage.getItem(Sb)==="1"}function yA(){return localStorage.getItem(_b)==="1"}function vA(){const e=Number(localStorage.getItem(Eb));return Number.isFinite(e)&&e>0?e:void 0}function Sv(e){const t=Number(localStorage.getItem(e));return Number.isFinite(t)&&t>0?t:void 0}function xA(){try{const e=localStorage.getItem(bb),t=e?JSON.parse(e):null;return t&&typeof t=="object"?t:{}}catch{return{}}}function wA(){const e=localStorage.getItem(wb);return e==="light"||e==="dark"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Cb(e){document.documentElement.classList.toggle("dark",e==="dark")}const Ze=Cl((e,t)=>({theme:"light",toggleTheme:()=>t().setTheme(t().theme==="dark"?"light":"dark"),setTheme:n=>{localStorage.setItem(wb,n),Cb(n),e({theme:n})},navOpen:xA(),setNavOpen:(n,r)=>{const s={...t().navOpen,[n]:r};localStorage.setItem(bb,JSON.stringify(s)),e({navOpen:s})},sidebarCollapsed:gA(),setSidebarCollapsed:n=>{localStorage.setItem(Sb,n?"1":"0"),e({sidebarCollapsed:n})},sidebarWidth:vA(),setSidebarWidth:n=>{localStorage.setItem(Eb,String(n)),e({sidebarWidth:n})},drawerSideWidth:Sv(Xd),setDrawerSideWidth:n=>{n===void 0?localStorage.removeItem(Xd):localStorage.setItem(Xd,String(n)),e({drawerSideWidth:n})},drawerBottomHeight:Sv(Yd),setDrawerBottomHeight:n=>{n===void 0?localStorage.removeItem(Yd):localStorage.setItem(Yd,String(n)),e({drawerBottomHeight:n})},mobileNavOpen:!1,setMobileNavOpen:n=>e({mobileNavOpen:n}),trailExpanded:yA(),setTrailExpanded:n=>{localStorage.setItem(_b,n?"1":"0"),e({trailExpanded:n})}}));function bA(){const e=wA();Cb(e),Ze.setState({theme:e})}function kb({theme:e,language:t},{resolveSystem:n=!1}={}){e==="light"||e==="dark"?Ze.getState().setTheme(e):e===""&&n&&Ze.getState().setTheme(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),t&&xb(t)}const Rb="procman.passkey.suppress";function SA(e){var n;const t=bm();return t&&e.some(r=>r.company_id===t)?t:((n=e[0])==null?void 0:n.company_id)??null}function Jd(e,t){Jc.clear();const n=SA(t.companies),r=oA(),s=r||t.user.language;kb({theme:t.user.theme,language:s}),r&&r!==t.user.language&&ie.put("/api/v1/profile/",{language:s}).catch(()=>{}),Th(n),e({status:"authenticated",user:t.user,tenant:t.tenant,companies:t.companies,activeCompanyId:n})}const Qt=Cl((e,t)=>({status:"loading",user:null,tenant:null,companies:[],activeCompanyId:bm(),login:async(n,r,s=!1)=>{const{data:o}=await ie.post("/api/v1/auth/login",{email:n,password:r,remember:s});return"mfa_required"in o?o:(Jd(e,o),null)},completeMfa:async(n,r)=>{const{data:s}=await ie.post("/api/v1/auth/mfa/verify",{challenge:n,code:r});Jd(e,s)},logout:async()=>{try{await ie.post("/api/v1/auth/logout")}finally{try{window.sessionStorage.setItem(Rb,"1")}catch{}Th(null),e({status:"anonymous",user:null,companies:[],activeCompanyId:null}),Jc.clear()}},bootstrap:async()=>{try{const{data:n}=await ie.get("/api/v1/auth/me");Jd(e,n)}catch{e({status:"anonymous",user:null,companies:[]})}},setActiveCompany:n=>{n!==t().activeCompanyId&&(Th(n),e({activeCompanyId:n}))},markUnauthenticated:()=>{t().status!=="anonymous"&&e({status:"anonymous",user:null,companies:[]})}})),EA=Object.freeze(Object.defineProperty({__proto__:null,PASSKEY_SUPPRESS_KEY:Rb,useAuthStore:Qt},Symbol.toStringTag,{value:"Module"}));function _A(e,t){const n=Qt(r=>r.activeCompanyId);return kt({queryKey:["delete-preview",n,e,t],enabled:!!(e&&t),staleTime:0,retry:!1,queryFn:async()=>(await ie.get(`/api/v1/delete-preview/${e}/${t}`)).data})}const Ev={delete:{tone:"danger",chave:"LANG_i18n_deletePreview.effect.delete"},update:{tone:"warning",chave:"LANG_i18n_deletePreview.effect.update"}};function CA({target:e,onPendingChange:t}){const{t:n}=xe(),{data:r,isLoading:s,isError:o}=_A(e.resource,e.id);return p.useEffect(()=>{t==null||t(s)},[s,t]),s?h.jsxs("p",{role:"status",className:"mt-4 flex items-center gap-2 text-caption text-text-muted",children:[h.jsx(cm,{className:"h-4 w-4 animate-spin","aria-hidden":!0}),n("LANG_i18n_deletePreview.loading")]}):o||!r?h.jsxs("div",{role:"alert",className:"mt-4 flex items-start gap-2 rounded-control bg-warning-soft px-3 py-2 text-caption text-warning",children:[h.jsx(JR,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":!0}),h.jsx("span",{children:n("LANG_i18n_deletePreview.failed")})]}):r.entries.length===0&&r.blockers.length===0?null:h.jsxs("div",{className:"mt-4 space-y-4",children:[r.entries.length>0&&h.jsxs("section",{children:[h.jsx("h3",{className:"text-caption font-medium text-text-strong",children:n("LANG_i18n_deletePreview.title")}),h.jsx("ul",{className:"mt-2 divide-y divide-border rounded-control border border-border",children:r.entries.map(i=>h.jsxs("li",{className:"flex items-center justify-between gap-3 px-3 py-2",children:[h.jsx("span",{className:"text-caption text-text-body",children:n(i.label_key)}),h.jsxs(dc,{tone:Ev[i.effect].tone,children:[h.jsx("span",{className:"font-semibold",children:i.count}),h.jsx("span",{children:n(Ev[i.effect].chave)})]})]},`${i.collection}:${i.effect}`))})]}),r.blockers.length>0&&h.jsxs("section",{children:[h.jsx("h3",{className:"text-caption font-medium text-danger",children:n("LANG_i18n_deletePreview.blockedTitle")}),h.jsx("ul",{className:"mt-2 divide-y divide-border rounded-control border border-danger",children:r.blockers.map(i=>h.jsxs("li",{className:"flex items-center justify-between gap-3 px-3 py-2",children:[h.jsx("span",{className:"text-caption text-text-body",children:n(i.label_key)}),h.jsxs(dc,{tone:"danger",variant:"outline",children:[h.jsx("span",{className:"font-semibold",children:i.count}),h.jsx("span",{children:n("LANG_i18n_deletePreview.blocking")})]})]},i.collection))}),h.jsx("p",{className:"mt-2 text-micro text-text-muted",children:n("LANG_i18n_deletePreview.blockedHint")})]})]})}function kA({open:e,title:t,message:n,confirmLabel:r,cancelLabel:s,danger:o,loading:i=!1,preview:a,onConfirm:l,onClose:u}){const{t:d}=xe(),c=a?`${a.resource}:${a.id}`:"",[f,g]=p.useState(null),x=!!c&&f!==c,w=p.useCallback(b=>g(b?null:c),[c]);return h.jsxs(hm,{open:e,onClose:u,title:t,size:a?"md":"sm",footer:h.jsxs(h.Fragment,{children:[h.jsx(dr,{variant:"outlined",disabled:i,onClick:u,children:s??d("LANG_i18n_common.cancel")}),h.jsx(dr,{variant:"default",color:o?"danger":"primary",disabled:i||x,onClick:l,children:r??d("LANG_i18n_common.confirm")})]}),children:[h.jsx("p",{className:"text-caption text-text-body",children:n}),a&&h.jsx(CA,{target:a,onPendingChange:w})]})}function Nb(){const[e,t]=p.useState(null),[n,r]=p.useState(!1),s=p.useRef(null),o=p.useCallback(l=>(t(l),new Promise(u=>{s.current=u})),[]),i=p.useCallback(l=>{var u;(u=s.current)==null||u.call(s,l),s.current=null,t(null),r(!1)},[]);return[e?h.jsx(kA,{open:!0,title:e.title,message:e.message??"",confirmLabel:e.confirmLabel,cancelLabel:e.cancelLabel,danger:e.danger,preview:e.preview,loading:n,onConfirm:()=>i(!0),onClose:()=>i(!1)}):null,o,r]}const RA={align:"end",vertical:"below",shiftX:0,top:0,left:0},Ps=8;function vo({trigger:e,children:t,align:n="start",widthClassName:r="w-popover-lg",className:s,zIndexClassName:o="z-popover",wrapperClassName:i,open:a,onOpenChange:l,portal:u=!0}){const[d,c]=p.useState(!1),f=a!==void 0,g=f?a:d,x=N=>{f||c(N),l==null||l(N)},w=p.useRef(null),b=p.useRef(null),[m,y]=p.useState(RA),v=p.useCallback(()=>{const N=w.current,E=b.current;if(!N||!E)return;const k=N.getBoundingClientRect(),T=E.offsetWidth,P=E.offsetHeight,A=getComputedStyle(N).direction==="rtl",D=G=>(G==="start"?!A:A)?[k.left,k.left+T]:[k.right-T,k.right],F=([G,Y])=>G>=Ps&&Y<=window.innerWidth-Ps;let H=n;if(!F(D(n))){const G=n==="end"?"start":"end";F(D(G))&&(H=G)}const[le]=D(H),X=lene?"above":"below";y({align:H,vertical:V,shiftX:X,top:V==="below"?k.bottom+Ps:k.top-P-Ps,left:le+X})},[n]);p.useLayoutEffect(()=>{g&&v()},[g,v]),p.useEffect(()=>{if(g)return window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[g,v]),p.useEffect(()=>{if(!(!g||!u))return window.addEventListener("scroll",v,!0),()=>window.removeEventListener("scroll",v,!0)},[g,u,v]),fm(g,()=>x(!1)),p.useEffect(()=>{if(!g)return;const N=E=>{var T,P;const k=E.target;(T=w.current)!=null&&T.contains(k)||(P=b.current)!=null&&P.contains(k)||x(!1)};return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[g]);const S=typeof t=="function"?t({close:()=>x(!1)}):t,C=g&&h.jsx("div",{ref:b,style:u?{position:"fixed",top:m.top,left:m.left}:m.shiftX?{transform:`translateX(${m.shiftX}px)`}:void 0,className:z(o,"max-w-[calc(100vw-1rem)] rounded-card border border-border bg-surface-raised shadow-card",u?void 0:z("absolute",m.vertical==="below"?"top-full mt-2":"bottom-full mb-2",m.align==="end"?"end-0":"start-0"),r,s),children:S});return h.jsxs("div",{ref:w,className:z("relative",i),children:[e({open:g,toggle:()=>x(!g)}),u?g&&Dt.createPortal(C,document.body):C]})}const xs="flex w-full items-center gap-2 rounded-control px-3 py-2 text-start text-caption text-text-body hover:bg-surface-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent",z3=p.forwardRef(function({className:t,rows:n=3,...r},s){return h.jsx("textarea",{ref:s,rows:n,className:z(yo,"py-2",t),...r})}),U3=p.forwardRef(function({options:t,placeholder:n,className:r,controlClassName:s,...o},i){const a=o["aria-label"]??(o["aria-labelledby"]||o.id?void 0:n);return h.jsxs("div",{className:z("relative",r),children:[h.jsxs("select",{ref:i,className:z(yo,"h-10 appearance-none pe-9",s),"aria-label":a,...o,children:[n&&h.jsx("option",{value:"",children:n}),t.map(l=>h.jsx("option",{value:l.value,children:l.label},l.value))]}),h.jsx(vl,{className:"pointer-events-none absolute end-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-muted","aria-hidden":!0})]})}),NA=p.forwardRef(function({className:t,controlClassName:n,onClear:r,value:s,collapsible:o,placeholder:i,onBlur:a,...l},u){const{t:d}=xe(),c=typeof s=="string"&&s.length>0,f=!!r&&c,[g,x]=p.useState(!1),w=p.useRef(null);return p.useEffect(()=>{var b;o&&g&&((b=w.current)==null||b.focus())},[o,g]),o&&!g&&!c?h.jsx(fr,{size:"form",label:typeof i=="string"?i:d("LANG_i18n_common.search"),icon:h.jsx(Py,{}),"aria-expanded":!1,onClick:()=>x(!0)}):h.jsxs("div",{className:z("relative",t),children:[h.jsx(Py,{className:"pointer-events-none absolute start-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-muted","aria-hidden":!0}),h.jsx("input",{ref:b=>{w.current=b,typeof u=="function"?u(b):u&&(u.current=b)},type:"search",value:s,placeholder:i,className:z(yo,"h-10 ps-9",f&&"pe-9 [&::-webkit-search-cancel-button]:hidden",n),...l,onBlur:b=>{o&&!c&&x(!1),a==null||a(b)}}),f&&h.jsx("button",{type:"button",onClick:r,"aria-label":d("LANG_i18n_common.clear"),className:z("absolute end-2 top-1/2 -translate-y-1/2 rounded-control p-1 text-text-muted","hover:bg-surface-sunken hover:text-text-body","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"),children:h.jsx(xl,{className:"h-4 w-4","aria-hidden":!0})})]})}),$3=p.forwardRef(function({label:t,className:n,id:r,labelHidden:s=!1,disabled:o,...i},a){const l=p.useId(),u=r??l;return h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("span",{className:"relative inline-flex shrink-0",children:[h.jsx("input",{ref:a,id:u,type:"checkbox",role:"switch",disabled:o,"aria-label":s?t:void 0,className:z("peer h-5 w-9 cursor-pointer appearance-none rounded-pill border border-border-strong bg-surface-sunken","transition-colors checked:border-accent checked:bg-accent","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-surface-raised","disabled:cursor-not-allowed disabled:opacity-50",n),...i}),h.jsx("span",{"aria-hidden":!0,className:z("pointer-events-none absolute top-0.5 start-0.5 h-4 w-4 rounded-full bg-surface-raised shadow-card","transition-transform peer-checked:translate-x-4 rtl:peer-checked:-translate-x-4")})]}),t&&!s&&h.jsx("label",{htmlFor:u,className:"cursor-pointer text-caption text-text-body",children:t})]})}),B3=p.forwardRef(function({className:t,controlClassName:n,disabled:r,...s},o){const i=p.useRef(null),a=l=>{const u=i.current;!u||r||(l===1?u.stepUp():u.stepDown(),u.dispatchEvent(new Event("input",{bubbles:!0})))};return h.jsxs("div",{className:z("relative",t),children:[h.jsx("input",{ref:l=>{i.current=l,typeof o=="function"?o(l):o&&(o.current=l)},type:"number",inputMode:"decimal",disabled:r,className:z(yo,"h-10 w-full pe-8 text-end tabular-nums","[appearance:textfield]","[&::-webkit-inner-spin-button]:appearance-none","[&::-webkit-outer-spin-button]:appearance-none",n),...s}),h.jsxs("span",{className:"pointer-events-none absolute end-1 top-1/2 grid -translate-y-1/2",children:[h.jsx("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:r,onClick:()=>a(1),className:"pointer-events-auto flex h-4 w-5 items-center justify-center rounded-sm text-text-muted hover:bg-surface-sunken hover:text-text-body disabled:pointer-events-none disabled:opacity-50",children:h.jsx(cw,{className:"h-3 w-3"})}),h.jsx("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:r,onClick:()=>a(-1),className:"pointer-events-auto flex h-4 w-5 items-center justify-center rounded-sm text-text-muted hover:bg-surface-sunken hover:text-text-body disabled:pointer-events-none disabled:opacity-50",children:h.jsx(vl,{className:"h-3 w-3"})})]})]})}),Pb="——",PA=/^\d{4}-\d{2}-\d{2}$/,_v=new Map;function Em(e,t){const n=vb(),r=`${n}:${e}`;let s=_v.get(r);return s||(s=new Intl.DateTimeFormat(n,t),_v.set(r,s)),s}function Lb(e){if(e==null||e==="")return null;if(e instanceof Date)return Number.isNaN(e.getTime())?null:e;if(PA.test(e)){const[n,r,s]=e.split("-").map(Number);return new Date(n,r-1,s)}const t=new Date(e);return Number.isNaN(t.getTime())?null:t}const _m={year:"numeric",month:"2-digit",day:"2-digit"},LA={hour:"2-digit",minute:"2-digit"};function Ob(e){const t=Lb(e);return t===null?Pb:Em("date",_m).format(t)}function V3(e){const t=Lb(e);return t===null?Pb:Em("datetime",{..._m,...LA}).format(t)}const OA=/[‎‏؜]/g,AA=new Date(2026,10,22);function Cm(){var r;const e=Em("date",_m).formatToParts(AA),t=e.map(s=>s.type).filter(s=>s==="day"||s==="month"||s==="year"),n=(r=e.find(s=>s.type==="literal"))==null?void 0:r.value.replace(OA,"").trim();return{order:t,separator:n||"/"}}const au=e=>String(e).padStart(2,"0");function TA(e){const t=/^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2}))?/.exec(e??"");if(!t)return"";const n={year:t[1],month:t[2],day:t[3]},{order:r,separator:s}=Cm(),o=r.map(i=>n[i]).join(s);return t[4]?`${o} ${t[4]}:${t[5]}`:o}function jA(e,t=!1){var y;const n=e.match(/\d+/g)??[],{order:r}=Cm();let s=n.slice(0,3),o=n.slice(3);const i=n[0];if(i!==void 0&&i.length===8){let v=0;s=r.map(S=>{const C=S==="year"?4:2,N=i.slice(v,v+C);return v+=C,N}),o=n.slice(1)}if(s.length!==3)return null;const a=((y=s[0])==null?void 0:y.length)===4?["year","month","day"]:r,l=Object.fromEntries(a.map((v,S)=>[v,s[S]]));if(l.year.length!==4||l.month.length>2||l.day.length>2)return null;const[u,d,c]=[Number(l.year),Number(l.month),Number(l.day)],f=new Date(u,d-1,c);if(f.getFullYear()!==u||f.getMonth()!==d-1||f.getDate()!==c)return null;const g=`${l.year}-${au(d)}-${au(c)}`;if(!t)return o.length===0?g:null;const[x,w]=o;if(o.length!==2||x===void 0||w===void 0)return null;const[b,m]=[Number(x),Number(w)];return x.length>2||w.length!==2||b>23||m>59?null:`${g}T${au(b)}:${au(m)}`}const Kr=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`;function Zd(e){const t=/^(\d{4})-(\d{2})-(\d{2})/.exec(e??"");return t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3])):null}function wr(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)}function lu(e,t){const n=new Date(e.getFullYear(),e.getMonth()+t+1,0).getDate();return new Date(e.getFullYear(),e.getMonth()+t,Math.min(e.getDate(),n))}const DA=new Date(2021,0,4);function IA(e){const t=new Date(e.getFullYear(),e.getMonth(),1),n=(t.getDay()+6)%7,r=wr(t,-n);return Array.from({length:6},(s,o)=>Array.from({length:7},(i,a)=>wr(r,o*7+a)))}const MA=e=>e.charAt(0).toLocaleUpperCase()+e.slice(1),H3=p.forwardRef(function({className:t,withTime:n=!1,value:r="",onChange:s,min:o,max:i,disabled:a,onBlur:l,onKeyDown:u,...d},c){var P;const{t:f}=xe(),[g,x]=p.useState(!1),[w,b]=p.useState(null),m=p.useRef(null),y=w??TA(r),v=n?((P=/T(\d{2}:\d{2})/.exec(r))==null?void 0:P[1])??"":"",S=A=>{A!==r&&(s==null||s({target:{value:A}}))},{order:C,separator:N}=Cm(),E={day:f("LANG_i18n_common.datePicker.dayToken"),month:f("LANG_i18n_common.datePicker.monthToken"),year:f("LANG_i18n_common.datePicker.yearToken")},k=C.map(A=>E[A]).join(N)+(n?` ${f("LANG_i18n_common.datePicker.timeToken")}`:""),T=A=>{var D;S(n?`${A}T${v||"00:00"}`:A),b(null),x(!1),(D=m.current)==null||D.focus()};return h.jsx(vo,{open:g,onOpenChange:x,align:"start",widthClassName:"w-popover-md",wrapperClassName:z("w-full",t),trigger:()=>h.jsxs("div",{className:"relative",children:[h.jsx("input",{ref:A=>{m.current=A,typeof c=="function"?c(A):c&&(c.current=A)},type:"text",inputMode:"numeric",autoComplete:"off",placeholder:k,disabled:a,value:y,className:z(yo,"h-10 pe-10 tabular-nums"),onChange:A=>{const D=A.target.value;if(b(D),D.trim()==="")return S("");const F=jA(D,n);F&&S(F)},onBlur:A=>{b(null),l==null||l(A)},onKeyDown:A=>{A.altKey&&A.key==="ArrowDown"&&(A.preventDefault(),x(!0)),u==null||u(A)},...d}),h.jsx(fr,{size:"sm",label:f("LANG_i18n_common.datePicker.open"),icon:h.jsx(vR,{}),disabled:a,"aria-haspopup":"dialog","aria-expanded":g,className:"absolute end-1 top-1/2 -translate-y-1/2",onClick:()=>x(!g)})]}),children:h.jsx(FA,{valor:r,min:o,max:i,withTime:n,hora:v,onEscolher:T,onHora:A=>{const D=r.slice(0,10)||Kr(new Date);S(`${D}T${A}`)},onLimpar:()=>{var A;S(""),b(null),x(!1),(A=m.current)==null||A.focus()}})})});function FA({valor:e,min:t,max:n,withTime:r,hora:s,onEscolher:o,onHora:i,onLimpar:a}){const{t:l}=xe(),u=p.useId(),d=new Date,c=Zd(e),f=Zd(t),g=Zd(n),[x,w]=p.useState(()=>c||(f&&dg?g:d)),[b,m]=p.useState(null),y=p.useRef(null),v=p.useRef(!1),S=vb(),C=MA(new Intl.DateTimeFormat(S,{month:"long",year:"numeric"}).format(x)),N=new Intl.DateTimeFormat(S,{weekday:"narrow"}),E=new Intl.DateTimeFormat(S,{weekday:"long"}),k=Array.from({length:7},(D,F)=>wr(DA,F)),T=D=>f!==null&&Dg;p.useEffect(()=>{var D,F;v.current&&((F=(D=y.current)==null?void 0:D.querySelector(`button[data-iso="${Kr(x)}"]`))==null||F.focus())},[x]);const P=D=>{const F=getComputedStyle(D.currentTarget).direction==="rtl",le={ArrowLeft:()=>wr(x,F?1:-1),ArrowRight:()=>wr(x,F?-1:1),ArrowUp:()=>wr(x,-7),ArrowDown:()=>wr(x,7),Home:()=>wr(x,-((x.getDay()+6)%7)),End:()=>wr(x,6-(x.getDay()+6)%7),PageUp:()=>lu(x,-1),PageDown:()=>lu(x,1)}[D.key];le&&(D.preventDefault(),v.current=!0,w(le()))},A=b??s;return h.jsxs("div",{role:"dialog","aria-labelledby":u,className:"p-3",children:[h.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[h.jsx(fr,{size:"sm",label:l("LANG_i18n_common.datePicker.prevMonth"),icon:h.jsx(bR,{}),onClick:()=>w(lu(x,-1))}),h.jsx("span",{id:u,"aria-live":"polite",className:"text-caption font-medium text-text-strong",children:C}),h.jsx(fr,{size:"sm",label:l("LANG_i18n_common.datePicker.nextMonth"),icon:h.jsx(vh,{}),onClick:()=>w(lu(x,1))})]}),h.jsxs("table",{ref:y,role:"grid","aria-labelledby":u,className:"w-full",onKeyDown:P,children:[h.jsx("thead",{children:h.jsx("tr",{children:k.map(D=>h.jsx("th",{scope:"col",abbr:E.format(D),className:"pb-1 text-center text-micro font-medium text-text-muted",children:N.format(D)},D.getDay()))})}),h.jsx("tbody",{children:IA(x).map(D=>h.jsx("tr",{children:D.map(F=>{const H=Kr(F),le=c!==null&&H===Kr(c),X=H===Kr(d),ne=F.getMonth()===x.getMonth();return h.jsx("td",{"aria-selected":le,className:"p-0.5 text-center",children:h.jsx("button",{type:"button","data-iso":H,tabIndex:H===Kr(x)?0:-1,"aria-label":Ob(F),"aria-current":X?"date":void 0,disabled:T(F),onClick:()=>o(H),className:z("h-8 w-8 rounded-control text-caption tabular-nums","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent","disabled:cursor-not-allowed disabled:opacity-50",le?"bg-accent text-text-inverse":z("hover:bg-surface-sunken",ne?"text-text-body":"text-text-muted",X&&"font-semibold text-accent")),children:F.getDate()})},H)})},Kr(D[0])))})]}),r&&h.jsxs("label",{className:"mt-3 flex items-center gap-2 text-caption text-text-body",children:[h.jsx("span",{children:l("LANG_i18n_common.datePicker.time")}),h.jsx("input",{type:"text",inputMode:"numeric",autoComplete:"off",placeholder:l("LANG_i18n_common.datePicker.timeToken"),value:A,className:z(yo,"h-10 w-24 tabular-nums"),onChange:D=>{m(D.target.value);const F=/^(\d{1,2}):(\d{2})$/.exec(D.target.value.trim());F&&Number(F[1])<24&&Number(F[2])<60&&i(`${F[1].padStart(2,"0")}:${F[2]}`)},onBlur:()=>m(null)})]}),h.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2",children:[h.jsx(dr,{size:"sm",variant:"ghost",disabled:T(new Date(d.getFullYear(),d.getMonth(),d.getDate())),onClick:()=>o(Kr(d)),children:l("LANG_i18n_common.datePicker.today")}),h.jsx(dr,{size:"sm",variant:"ghost",onClick:a,children:l("LANG_i18n_common.clear")})]})]})}function zA({isDirty:e,isDirtyFn:t,onClose:n,title:r,description:s,confirmLabel:o}){const{t:i}=xe(),[a,l]=Nb();return{handleClose:p.useCallback(async()=>{if(!(t?t():!!e)){n();return}await l({title:r??i("LANG_i18n_common.closeGuard.title"),message:s??i("LANG_i18n_common.closeGuard.description"),confirmLabel:o??i("LANG_i18n_common.closeGuard.discard"),danger:!0})&&n()},[e,t,n,l,i,r,s,o]),confirmUI:a}}function Ab({children:e,count:t,dot:n=!1,tone:r="danger",className:s}){return h.jsxs("span",{className:z("relative inline-flex flex-none",s),children:[e,t>0&&(n?h.jsx("span",{"aria-hidden":!0,className:z("absolute -end-1.5 -top-1.5 h-2.5 w-2.5 rounded-full ring-2 ring-surface-raised",Si[r])}):h.jsx("span",{className:z("absolute -end-1.5 -top-1.5 inline-flex h-4 min-w-4 items-center justify-center rounded-pill px-1","text-micro font-semibold leading-none text-surface-inverse-fg ring-2 ring-surface-raised",Si[r]),children:t>9?"9+":t}))]})}function Fh({tone:e,color:t,className:n}){return h.jsx("span",{"aria-hidden":!0,className:z("h-2 w-2 shrink-0 rounded-full",e&&Si[e],n),style:t?{backgroundColor:t}:void 0})}function UA({open:e,className:t}){return h.jsx(vl,{"aria-hidden":!0,className:z("h-4 w-4 shrink-0 transition-transform duration-100",e?"rotate-0":"-rotate-90 rtl:rotate-90",t)})}const Tb=p.createContext(!1);function G3({rente:e,children:t}){return h.jsx(Tb.Provider,{value:e,children:t})}function K3(){return p.useContext(Tb)}const jb=p.createContext(!1);function $A({children:e}){return h.jsx(jb.Provider,{value:!0,children:e})}function W3(){return p.useContext(jb)}const zh="rounded-control text-accent hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",Cv={...Vo,neutral:"text-text-muted"};function q3({items:e,variant:t="compact"}){const n=e.some(r=>r.leading);return t==="full"?h.jsx("ul",{className:"divide-y divide-border",children:e.map((r,s)=>{const o=r.tone??"neutral";return h.jsxs("li",{className:"flex items-start gap-3 px-6 py-4",children:[n&&h.jsx("span",{className:"pt-0.5",children:r.leading}),h.jsxs("span",{className:"min-w-0 flex-1",children:[h.jsx("span",{className:z("inline-flex rounded-control px-2 py-0.5 text-micro font-semibold uppercase tracking-wide",zw[o]),children:r.label}),h.jsx("span",{className:"mt-1.5 block text-body font-semibold text-text-strong",children:r.to?h.jsx(lo,{to:r.to,className:zh,children:r.message}):r.message}),r.description&&h.jsx("span",{className:"mt-0.5 block text-caption text-text-muted",children:r.description}),r.subject&&h.jsx("span",{className:z("mt-1 block text-caption font-semibold",Cv[o]),children:r.subject})]}),h.jsxs("span",{className:"flex shrink-0 items-center gap-2 pt-0.5",children:[r.unread&&h.jsx(Fh,{tone:"accent"}),r.meta,r.action]})]},r.id??`${r.label}-${s}`)})}):h.jsx("ul",{className:z("grid gap-y-2",n?"grid-cols-[auto_auto_1fr_auto]":"grid-cols-[auto_1fr_auto]"),children:e.map((r,s)=>{const o=r.tone??"neutral",i=r.to?h.jsx(lo,{to:r.to,className:z(zh,"text-text-body"),children:r.message}):h.jsx("span",{className:"text-text-body",children:r.message});return h.jsxs("li",{className:z("grid grid-cols-subgrid items-center gap-x-3 rounded-control px-3 py-2.5 text-caption",n?"col-span-4":"col-span-3",Iw[o]),children:[n&&h.jsx("span",{children:r.leading}),h.jsx("span",{className:z("whitespace-nowrap text-micro font-semibold uppercase",Cv[o]),children:r.label}),h.jsx("span",{className:"min-w-0",children:i}),h.jsxs("span",{className:"flex items-center justify-end gap-2",children:[r.unread&&h.jsx(Fh,{tone:"accent"}),r.meta,r.action]})]},r.id??`${r.label}-${s}`)})})}function BA(){for(var e=arguments.length,t=new Array(e),n=0;nr=>{t.forEach(s=>s(r))},t)}const Zc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Di(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function km(e){return"nodeType"in e}function cn(e){var t,n;return e?Di(e)?e:km(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Rm(e){const{Document:t}=cn(e);return e instanceof t}function kl(e){return Di(e)?!1:e instanceof cn(e).HTMLElement}function Db(e){return e instanceof cn(e).SVGElement}function Ii(e){return e?Di(e)?e.document:km(e)?Rm(e)?e:kl(e)||Db(e)?e.ownerDocument:document:document:document}const hr=Zc?p.useLayoutEffect:p.useEffect;function Nm(e){const t=p.useRef(e);return hr(()=>{t.current=e}),p.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s{e.current=setInterval(r,s)},[]),n=p.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function rl(e,t){t===void 0&&(t=[e]);const n=p.useRef(e);return hr(()=>{n.current!==e&&(n.current=e)},t),n}function Rl(e,t){const n=p.useRef();return p.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function xc(e){const t=Nm(e),n=p.useRef(null),r=p.useCallback(s=>{s!==n.current&&(t==null||t(s,n.current)),n.current=s},[]);return[n,r]}function Uh(e){const t=p.useRef();return p.useEffect(()=>{t.current=e},[e]),t.current}let ef={};function Nl(e,t){return p.useMemo(()=>{if(t)return t;const n=ef[e]==null?0:ef[e]+1;return ef[e]=n,e+"-"+n},[e,t])}function Ib(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s{const a=Object.entries(i);for(const[l,u]of a){const d=o[l];d!=null&&(o[l]=d+e*u)}return o},{...t})}}const Yo=Ib(1),sl=Ib(-1);function HA(e){return"clientX"in e&&"clientY"in e}function Pm(e){if(!e)return!1;const{KeyboardEvent:t}=cn(e.target);return t&&e instanceof t}function GA(e){if(!e)return!1;const{TouchEvent:t}=cn(e.target);return t&&e instanceof t}function $h(e){if(GA(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return HA(e)?{x:e.clientX,y:e.clientY}:null}const ol=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[ol.Translate.toString(e),ol.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),kv="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function KA(e){return e.matches(kv)?e:e.querySelector(kv)}const WA={display:"none"};function qA(e){let{id:t,value:n}=e;return ut.createElement("div",{id:t,style:WA},n)}function QA(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ut.createElement("div",{id:t,style:s,role:"status","aria-live":r,"aria-atomic":!0},n)}function XA(){const[e,t]=p.useState("");return{announce:p.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Mb=p.createContext(null);function YA(e){const t=p.useContext(Mb);p.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function JA(){const[e]=p.useState(()=>new Set),t=p.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[p.useCallback(r=>{let{type:s,event:o}=r;e.forEach(i=>{var a;return(a=i[s])==null?void 0:a.call(i,o)})},[e]),t]}const ZA={draggable:` To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. `},eT={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function tT(e){let{announcements:t=eT,container:n,hiddenTextDescribedById:r,screenReaderInstructions:s=ZA}=e;const{announce:o,announcement:i}=XA(),a=Nl("DndLiveRegion"),[l,u]=p.useState(!1);if(p.useEffect(()=>{u(!0)},[]),YA(p.useMemo(()=>({onDragStart(c){let{active:f}=c;o(t.onDragStart({active:f}))},onDragMove(c){let{active:f,over:g}=c;t.onDragMove&&o(t.onDragMove({active:f,over:g}))},onDragOver(c){let{active:f,over:g}=c;o(t.onDragOver({active:f,over:g}))},onDragEnd(c){let{active:f,over:g}=c;o(t.onDragEnd({active:f,over:g}))},onDragCancel(c){let{active:f,over:g}=c;o(t.onDragCancel({active:f,over:g}))}}),[o,t])),!l)return null;const d=ut.createElement(ut.Fragment,null,ut.createElement(qA,{id:r,value:s.draggable}),ut.createElement(QA,{id:a,announcement:i}));return n?Dt.createPortal(d,n):d}var at;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(at||(at={}));function wc(){}function Q3(e,t){return p.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function X3(){for(var e=arguments.length,t=new Array(e),n=0;n[...t].filter(r=>r!=null),[...t])}const qn=Object.freeze({x:0,y:0});function Fb(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function zb(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function nT(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Rv(e){let{left:t,top:n,height:r,width:s}=e;return[{x:t,y:n},{x:t+s,y:n},{x:t,y:n+r},{x:t+s,y:n+r}]}function Ub(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Nv(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const Y3=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const s=Nv(t,t.left,t.top),o=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const u=Fb(Nv(l),s);o.push({id:a,data:{droppableContainer:i,value:u}})}}return o.sort(zb)},rT=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const s=Rv(t),o=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const u=Rv(l),d=s.reduce((f,g,x)=>f+Fb(u[x],g),0),c=Number((d/4).toFixed(4));o.push({id:a,data:{droppableContainer:i,value:c}})}}return o.sort(zb)};function sT(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),s=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),i=s-r,a=o-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const s=[];for(const o of r){const{id:i}=o,a=n.get(i);if(a){const l=sT(a,t);l>0&&s.push({id:i,data:{droppableContainer:o,value:l}})}}return s.sort(nT)};function iT(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function $b(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:qn}function aT(e){return function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o({...i,top:i.top+e*a.y,bottom:i.bottom+e*a.y,left:i.left+e*a.x,right:i.right+e*a.x}),{...n})}}const lT=aT(1);function uT(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function cT(e,t,n){const r=uT(t);if(!r)return e;const{scaleX:s,scaleY:o,x:i,y:a}=r,l=e.left-i-(1-s)*parseFloat(n),u=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=s?e.width/s:e.width,c=o?e.height/o:e.height;return{width:d,height:c,top:u,right:l+d,bottom:u+c,left:l}}const dT={ignoreTransform:!1};function Mi(e,t){t===void 0&&(t=dT);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=cn(e).getComputedStyle(e);u&&(n=cT(n,u,d))}const{top:r,left:s,width:o,height:i,bottom:a,right:l}=n;return{top:r,left:s,width:o,height:i,bottom:a,right:l}}function Pv(e){return Mi(e,{ignoreTransform:!0})}function fT(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function hT(e,t){return t===void 0&&(t=cn(e).getComputedStyle(e)),t.position==="fixed"}function pT(e,t){t===void 0&&(t=cn(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const o=t[s];return typeof o=="string"?n.test(o):!1})}function ed(e,t){const n=[];function r(s){if(t!=null&&n.length>=t||!s)return n;if(Rm(s)&&s.scrollingElement!=null&&!n.includes(s.scrollingElement))return n.push(s.scrollingElement),n;if(!kl(s)||Db(s)||n.includes(s))return n;const o=cn(e).getComputedStyle(s);return s!==e&&pT(s,o)&&n.push(s),hT(s,o)?n:r(s.parentNode)}return e?r(e):n}function Bb(e){const[t]=ed(e,1);return t??null}function tf(e){return!Zc||!e?null:Di(e)?e:km(e)?Rm(e)||e===Ii(e).scrollingElement?window:kl(e)?e:null:null}function Vb(e){return Di(e)?e.scrollX:e.scrollLeft}function Hb(e){return Di(e)?e.scrollY:e.scrollTop}function Bh(e){return{x:Vb(e),y:Hb(e)}}var vt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(vt||(vt={}));function Gb(e){return!Zc||!e?!1:e===document.scrollingElement}function Kb(e){const t={x:0,y:0},n=Gb(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},s=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:s,isLeft:o,isBottom:i,isRight:a,maxScroll:r,minScroll:t}}const mT={x:.2,y:.2};function gT(e,t,n,r,s){let{top:o,left:i,right:a,bottom:l}=n;r===void 0&&(r=10),s===void 0&&(s=mT);const{isTop:u,isBottom:d,isLeft:c,isRight:f}=Kb(e),g={x:0,y:0},x={x:0,y:0},w={height:t.height*s.y,width:t.width*s.x};return!u&&o<=t.top+w.height?(g.y=vt.Backward,x.y=r*Math.abs((t.top+w.height-o)/w.height)):!d&&l>=t.bottom-w.height&&(g.y=vt.Forward,x.y=r*Math.abs((t.bottom-w.height-l)/w.height)),!f&&a>=t.right-w.width?(g.x=vt.Forward,x.x=r*Math.abs((t.right-w.width-a)/w.width)):!c&&i<=t.left+w.width&&(g.x=vt.Backward,x.x=r*Math.abs((t.left+w.width-i)/w.width)),{direction:g,speed:x}}function yT(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:i}=window;return{top:0,left:0,right:o,bottom:i,width:o,height:i}}const{top:t,left:n,right:r,bottom:s}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:s,width:e.clientWidth,height:e.clientHeight}}function Wb(e){return e.reduce((t,n)=>Yo(t,Bh(n)),qn)}function vT(e){return e.reduce((t,n)=>t+Vb(n),0)}function xT(e){return e.reduce((t,n)=>t+Hb(n),0)}function wT(e,t){if(t===void 0&&(t=Mi),!e)return;const{top:n,left:r,bottom:s,right:o}=t(e);Bb(e)&&(s<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const bT=[["x",["left","right"],vT],["y",["top","bottom"],xT]];class Lm{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=ed(n),s=Wb(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,i,a]of bT)for(const l of i)Object.defineProperty(this,l,{get:()=>{const u=a(r),d=s[o]-u;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Pa{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var s;(s=this.target)==null||s.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function ST(e){const{EventTarget:t}=cn(e);return e instanceof t?e:Ii(e)}function nf(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Rn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Rn||(Rn={}));function Lv(e){e.preventDefault()}function ET(e){e.stopPropagation()}var Se;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Se||(Se={}));const qb={start:[Se.Space,Se.Enter],cancel:[Se.Esc],end:[Se.Space,Se.Enter,Se.Tab]},_T=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Se.Right:return{...n,x:n.x+25};case Se.Left:return{...n,x:n.x-25};case Se.Down:return{...n,y:n.y+25};case Se.Up:return{...n,y:n.y-25}}};class Qb{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Pa(Ii(n)),this.windowListeners=new Pa(cn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Rn.Resize,this.handleCancel),this.windowListeners.add(Rn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Rn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&wT(r),n(qn)}handleKeyDown(t){if(Pm(t)){const{active:n,context:r,options:s}=this.props,{keyboardCodes:o=qb,coordinateGetter:i=_T,scrollBehavior:a="smooth"}=s,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=r.current,d=u?{x:u.left,y:u.top}:qn;this.referenceCoordinates||(this.referenceCoordinates=d);const c=i(t,{active:n,context:r.current,currentCoordinates:d});if(c){const f=sl(c,d),g={x:0,y:0},{scrollableAncestors:x}=r.current;for(const w of x){const b=t.code,{isTop:m,isRight:y,isLeft:v,isBottom:S,maxScroll:C,minScroll:N}=Kb(w),E=yT(w),k={x:Math.min(b===Se.Right?E.right-E.width/2:E.right,Math.max(b===Se.Right?E.left:E.left+E.width/2,c.x)),y:Math.min(b===Se.Down?E.bottom-E.height/2:E.bottom,Math.max(b===Se.Down?E.top:E.top+E.height/2,c.y))},T=b===Se.Right&&!y||b===Se.Left&&!v,P=b===Se.Down&&!S||b===Se.Up&&!m;if(T&&k.x!==c.x){const A=w.scrollLeft+f.x,D=b===Se.Right&&A<=C.x||b===Se.Left&&A>=N.x;if(D&&!f.y){w.scrollTo({left:A,behavior:a});return}D?g.x=w.scrollLeft-A:g.x=b===Se.Right?w.scrollLeft-C.x:w.scrollLeft-N.x,g.x&&w.scrollBy({left:-g.x,behavior:a});break}else if(P&&k.y!==c.y){const A=w.scrollTop+f.y,D=b===Se.Down&&A<=C.y||b===Se.Up&&A>=N.y;if(D&&!f.x){w.scrollTo({top:A,behavior:a});return}D?g.y=w.scrollTop-A:g.y=b===Se.Down?w.scrollTop-C.y:w.scrollTop-N.y,g.y&&w.scrollBy({top:-g.y,behavior:a});break}}this.handleMove(t,Yo(sl(c,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Qb.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=qb,onActivation:s}=t,{active:o}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const a=o.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),s==null||s({event:e.nativeEvent}),!0)}return!1}}];function Ov(e){return!!(e&&"distance"in e)}function Av(e){return!!(e&&"delay"in e)}class Om{constructor(t,n,r){var s;r===void 0&&(r=ST(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:i}=o;this.props=t,this.events=n,this.document=Ii(i),this.documentListeners=new Pa(this.document),this.listeners=new Pa(r),this.windowListeners=new Pa(cn(i)),this.initialCoordinates=(s=$h(o))!=null?s:qn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Rn.Resize,this.handleCancel),this.windowListeners.add(Rn.DragStart,Lv),this.windowListeners.add(Rn.VisibilityChange,this.handleCancel),this.windowListeners.add(Rn.ContextMenu,Lv),this.documentListeners.add(Rn.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Av(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Ov(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:s}=this.props;s(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Rn.Click,ET,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Rn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:s,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!s)return;const l=(n=$h(t))!=null?n:qn,u=sl(s,l);if(!r&&a){if(Ov(a)){if(a.tolerance!=null&&nf(u,a.tolerance))return this.handleCancel();if(nf(u,a.distance))return this.handleStart()}if(Av(a)&&nf(u,a.tolerance))return this.handleCancel();this.handlePending(a,u);return}t.cancelable&&t.preventDefault(),i(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Se.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const CT={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Xb extends Om{constructor(t){const{event:n}=t,r=Ii(n.target);super(t,CT,r)}}Xb.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const kT={move:{name:"mousemove"},end:{name:"mouseup"}};var Vh;(function(e){e[e.RightClick=2]="RightClick"})(Vh||(Vh={}));class RT extends Om{constructor(t){super(t,kT,Ii(t.event.target))}}RT.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Vh.RightClick?!1:(r==null||r({event:n}),!0)}}];const rf={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class NT extends Om{constructor(t){super(t,rf)}static setup(){return window.addEventListener(rf.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(rf.move.name,t)};function t(){}}}NT.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:s}=n;return s.length>1?!1:(r==null||r({event:n}),!0)}}];var La;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(La||(La={}));var bc;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(bc||(bc={}));function PT(e){let{acceleration:t,activator:n=La.Pointer,canScroll:r,draggingRect:s,enabled:o,interval:i=5,order:a=bc.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:c,threshold:f}=e;const g=OT({delta:c,disabled:!o}),[x,w]=VA(),b=p.useRef({x:0,y:0}),m=p.useRef({x:0,y:0}),y=p.useMemo(()=>{switch(n){case La.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case La.DraggableRect:return s}},[n,s,l]),v=p.useRef(null),S=p.useCallback(()=>{const N=v.current;if(!N)return;const E=b.current.x*m.current.x,k=b.current.y*m.current.y;N.scrollBy(E,k)},[]),C=p.useMemo(()=>a===bc.TreeOrder?[...u].reverse():u,[a,u]);p.useEffect(()=>{if(!o||!u.length||!y){w();return}for(const N of C){if((r==null?void 0:r(N))===!1)continue;const E=u.indexOf(N),k=d[E];if(!k)continue;const{direction:T,speed:P}=gT(N,k,y,t,f);for(const A of["x","y"])g[A][T[A]]||(P[A]=0,T[A]=0);if(P.x>0||P.y>0){w(),v.current=N,x(S,i),b.current=P,m.current=T;return}}b.current={x:0,y:0},m.current={x:0,y:0},w()},[t,S,r,w,o,i,JSON.stringify(y),JSON.stringify(g),x,u,C,d,JSON.stringify(f)])}const LT={x:{[vt.Backward]:!1,[vt.Forward]:!1},y:{[vt.Backward]:!1,[vt.Forward]:!1}};function OT(e){let{delta:t,disabled:n}=e;const r=Uh(t);return Rl(s=>{if(n||!r||!s)return LT;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[vt.Backward]:s.x[vt.Backward]||o.x===-1,[vt.Forward]:s.x[vt.Forward]||o.x===1},y:{[vt.Backward]:s.y[vt.Backward]||o.y===-1,[vt.Forward]:s.y[vt.Forward]||o.y===1}}},[n,t,r])}function AT(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Rl(s=>{var o;return t==null?null:(o=r??s)!=null?o:null},[r,t])}function TT(e,t){return p.useMemo(()=>e.reduce((n,r)=>{const{sensor:s}=r,o=s.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...o]},[]),[e,t])}var il;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(il||(il={}));var Hh;(function(e){e.Optimized="optimized"})(Hh||(Hh={}));const Tv=new Map;function jT(e,t){let{dragging:n,dependencies:r,config:s}=t;const[o,i]=p.useState(null),{frequency:a,measure:l,strategy:u}=s,d=p.useRef(e),c=b(),f=rl(c),g=p.useCallback(function(m){m===void 0&&(m=[]),!f.current&&i(y=>y===null?m:y.concat(m.filter(v=>!y.includes(v))))},[f]),x=p.useRef(null),w=Rl(m=>{if(c&&!n)return Tv;if(!m||m===Tv||d.current!==e||o!=null){const y=new Map;for(let v of e){if(!v)continue;if(o&&o.length>0&&!o.includes(v.id)&&v.rect.current){y.set(v.id,v.rect.current);continue}const S=v.node.current,C=S?new Lm(l(S),S):null;v.rect.current=C,C&&y.set(v.id,C)}return y}return m},[e,o,n,c,l]);return p.useEffect(()=>{d.current=e},[e]),p.useEffect(()=>{c||g()},[n,c]),p.useEffect(()=>{o&&o.length>0&&i(null)},[JSON.stringify(o)]),p.useEffect(()=>{c||typeof a!="number"||x.current!==null||(x.current=setTimeout(()=>{g(),x.current=null},a))},[a,c,g,...r]),{droppableRects:w,measureDroppableContainers:g,measuringScheduled:o!=null};function b(){switch(u){case il.Always:return!1;case il.BeforeDragging:return n;default:return!n}}}function Yb(e,t){return Rl(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function DT(e,t){return Yb(e,t)}function IT(e){let{callback:t,disabled:n}=e;const r=Nm(t),s=p.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return p.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function td(e){let{callback:t,disabled:n}=e;const r=Nm(t),s=p.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return p.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function MT(e){return new Lm(Mi(e),e)}function jv(e,t,n){t===void 0&&(t=MT);const[r,s]=p.useState(null);function o(){s(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l??n)!=null?u:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const i=IT({callback(l){if(e)for(const u of l){const{type:d,target:c}=u;if(d==="childList"&&c instanceof HTMLElement&&c.contains(e)){o();break}}}}),a=td({callback:o});return hr(()=>{o(),e?(a==null||a.observe(e),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),i==null||i.disconnect())},[e]),r}function FT(e){const t=Yb(e);return $b(e,t)}const Dv=[];function zT(e){const t=p.useRef(e),n=Rl(r=>e?r&&r!==Dv&&e&&t.current&&e.parentNode===t.current.parentNode?r:ed(e):Dv,[e]);return p.useEffect(()=>{t.current=e},[e]),n}function UT(e){const[t,n]=p.useState(null),r=p.useRef(e),s=p.useCallback(o=>{const i=tf(o.target);i&&n(a=>a?(a.set(i,Bh(i)),new Map(a)):null)},[]);return p.useEffect(()=>{const o=r.current;if(e!==o){i(o);const a=e.map(l=>{const u=tf(l);return u?(u.addEventListener("scroll",s,{passive:!0}),[u,Bh(u)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(o)};function i(a){a.forEach(l=>{const u=tf(l);u==null||u.removeEventListener("scroll",s)})}},[s,e]),p.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,i)=>Yo(o,i),qn):Wb(e):qn,[e,t])}function Iv(e,t){t===void 0&&(t=[]);const n=p.useRef(null);return p.useEffect(()=>{n.current=null},t),p.useEffect(()=>{const r=e!==qn;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?sl(e,n.current):qn}function $T(e){p.useEffect(()=>{if(!Zc)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function BT(e,t){return p.useMemo(()=>e.reduce((n,r)=>{let{eventName:s,handler:o}=r;return n[s]=i=>{o(i,t)},n},{}),[e,t])}function Jb(e){return p.useMemo(()=>e?fT(e):null,[e])}const Mv=[];function VT(e,t){t===void 0&&(t=Mi);const[n]=e,r=Jb(n?cn(n):null),[s,o]=p.useState(Mv);function i(){o(()=>e.length?e.map(l=>Gb(l)?r:new Lm(t(l),l)):Mv)}const a=td({callback:i});return hr(()=>{a==null||a.disconnect(),i(),e.forEach(l=>a==null?void 0:a.observe(l))},[e]),s}function HT(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return kl(t)?t:e}function GT(e){let{measure:t}=e;const[n,r]=p.useState(null),s=p.useCallback(u=>{for(const{target:d}of u)if(kl(d)){r(c=>{const f=t(d);return c?{...c,width:f.width,height:f.height}:f});break}},[t]),o=td({callback:s}),i=p.useCallback(u=>{const d=HT(u);o==null||o.disconnect(),d&&(o==null||o.observe(d)),r(d?t(d):null)},[t,o]),[a,l]=xc(i);return p.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const KT=[{sensor:Xb,options:{}},{sensor:Qb,options:{}}],WT={current:{}},Au={draggable:{measure:Pv},droppable:{measure:Pv,strategy:il.WhileDragging,frequency:Hh.Optimized},dragOverlay:{measure:Mi}};class Oa extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const qT={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Oa,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:wc},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Au,measureDroppableContainers:wc,windowRect:null,measuringScheduled:!1},QT={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:wc,draggableNodes:new Map,over:null,measureDroppableContainers:wc},nd=p.createContext(QT),Zb=p.createContext(qT);function XT(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Oa}}}function YT(e,t){switch(t.type){case at.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case at.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case at.DragEnd:case at.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case at.RegisterDroppable:{const{element:n}=t,{id:r}=n,s=new Oa(e.droppable.containers);return s.set(r,n),{...e,droppable:{...e.droppable,containers:s}}}case at.SetDroppableDisabled:{const{id:n,key:r,disabled:s}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Oa(e.droppable.containers);return i.set(n,{...o,disabled:s}),{...e,droppable:{...e.droppable,containers:i}}}case at.UnregisterDroppable:{const{id:n,key:r}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const o=new Oa(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function JT(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:s}=p.useContext(nd),o=Uh(r),i=Uh(n==null?void 0:n.id);return p.useEffect(()=>{if(!t&&!r&&o&&i!=null){if(!Pm(o)||document.activeElement===o.target)return;const a=s.get(i);if(!a)return;const{activatorNode:l,node:u}=a;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[l.current,u.current]){if(!d)continue;const c=KA(d);if(c){c.focus();break}}})}},[r,t,s,i,o]),null}function ZT(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((s,o)=>o({transform:s,...r}),n):n}function ej(e){return p.useMemo(()=>({draggable:{...Au.draggable,...e==null?void 0:e.draggable},droppable:{...Au.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Au.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function tj(e){let{activeNode:t,measure:n,initialRect:r,config:s=!0}=e;const o=p.useRef(!1),{x:i,y:a}=typeof s=="boolean"?{x:s,y:s}:s;hr(()=>{if(!i&&!a||!t){o.current=!1;return}if(o.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),c=$b(d,r);if(i||(c.x=0),a||(c.y=0),o.current=!0,Math.abs(c.x)>0||Math.abs(c.y)>0){const f=Bb(u);f&&f.scrollBy({top:c.y,left:c.x})}},[t,i,a,r,n])}const eS=p.createContext({...qn,scaleX:1,scaleY:1});var Qr;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Qr||(Qr={}));const J3=p.memo(function(t){var n,r,s,o;let{id:i,accessibility:a,autoScroll:l=!0,children:u,sensors:d=KT,collisionDetection:c=oT,measuring:f,modifiers:g,...x}=t;const w=p.useReducer(YT,void 0,XT),[b,m]=w,[y,v]=JA(),[S,C]=p.useState(Qr.Uninitialized),N=S===Qr.Initialized,{draggable:{active:E,nodes:k,translate:T},droppable:{containers:P}}=b,A=E!=null?k.get(E):null,D=p.useRef({initial:null,translated:null}),F=p.useMemo(()=>{var et;return E!=null?{id:E,data:(et=A==null?void 0:A.data)!=null?et:WT,rect:D}:null},[E,A]),H=p.useRef(null),[le,X]=p.useState(null),[ne,I]=p.useState(null),V=rl(x,Object.values(x)),G=Nl("DndDescribedBy",i),Y=p.useMemo(()=>P.getEnabled(),[P]),ce=ej(f),{droppableRects:Pe,measureDroppableContainers:Re,measuringScheduled:Ae}=jT(Y,{dragging:N,dependencies:[T.x,T.y],config:ce.droppable}),re=AT(k,E),Le=p.useMemo(()=>ne?$h(ne):null,[ne]),ft=Bi(),Xt=DT(re,ce.draggable.measure);tj({activeNode:E!=null?k.get(E):null,config:ft.layoutShiftCompensation,initialRect:Xt,measure:ce.draggable.measure});const Ce=jv(re,ce.draggable.measure,Xt),Xn=jv(re?re.parentElement:null),we=p.useRef({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:Pe,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Rt=P.getNodeFor((n=we.current.over)==null?void 0:n.id),Nt=GT({measure:ce.dragOverlay.measure}),ht=(r=Nt.nodeRef.current)!=null?r:re,ue=N?(s=Nt.rect)!=null?s:Ce:null,pt=!!(Nt.nodeRef.current&&Nt.rect),dn=FT(pt?null:Ce),Yt=Jb(ht?cn(ht):null),fn=zT(N?Rt??re:null),zr=VT(fn),Cn=ZT(g,{transform:{x:T.x-dn.x,y:T.y-dn.y,scaleX:1,scaleY:1},activatorEvent:ne,active:F,activeNodeRect:Ce,containerNodeRect:Xn,draggingNodeRect:ue,over:we.current.over,overlayNodeRect:Nt.rect,scrollableAncestors:fn,scrollableAncestorRects:zr,windowRect:Yt}),Ll=Le?Yo(Le,T):null,Yn=UT(fn),Rs=Iv(Yn),Ol=Iv(Yn,[Ce]),Jn=Yo(Cn,Rs),Ft=ue?lT(ue,Cn):null,zt=F&&Ft?c({active:F,collisionRect:Ft,droppableRects:Pe,droppableContainers:Y,pointerCoordinates:Ll}):null,zi=Ub(zt,"id"),[hn,Al]=p.useState(null),Zn=pt?Cn:Yo(Cn,Ol),Tl=iT(Zn,(o=hn==null?void 0:hn.rect)!=null?o:null,Ce),xo=p.useRef(null),Ui=p.useCallback((et,Ut)=>{let{sensor:Pt,options:er}=Ut;if(H.current==null)return;const $t=k.get(H.current);if(!$t)return;const mt=et.nativeEvent,Bt=new Pt({active:H.current,activeNode:$t,event:mt,options:er,context:we,onAbort(ot){if(!k.get(ot))return;const{onDragAbort:O}=V.current,j={id:ot};O==null||O(j),y({type:"onDragAbort",event:j})},onPending(ot,R,O,j){if(!k.get(ot))return;const{onDragPending:K}=V.current,te={id:ot,constraint:R,initialCoordinates:O,offset:j};K==null||K(te),y({type:"onDragPending",event:te})},onStart(ot){const R=H.current;if(R==null)return;const O=k.get(R);if(!O)return;const{onDragStart:j}=V.current,M={activatorEvent:mt,active:{id:R,data:O.data,rect:D}};Dt.unstable_batchedUpdates(()=>{j==null||j(M),C(Qr.Initializing),m({type:at.DragStart,initialCoordinates:ot,active:R}),y({type:"onDragStart",event:M}),X(xo.current),I(mt)})},onMove(ot){m({type:at.DragMove,coordinates:ot})},onEnd:Ur(at.DragEnd),onCancel:Ur(at.DragCancel)});xo.current=Bt;function Ur(ot){return async function(){const{active:O,collisions:j,over:M,scrollAdjustedTranslate:K}=we.current;let te=null;if(O&&K){const{cancelDrop:de}=V.current;te={activatorEvent:mt,active:O,collisions:j,delta:K,over:M},ot===at.DragEnd&&typeof de=="function"&&await Promise.resolve(de(te))&&(ot=at.DragCancel)}H.current=null,Dt.unstable_batchedUpdates(()=>{m({type:ot}),C(Qr.Uninitialized),Al(null),X(null),I(null),xo.current=null;const de=ot===at.DragEnd?"onDragEnd":"onDragCancel";if(te){const J=V.current[de];J==null||J(te),y({type:de,event:te})}})}}},[k]),ud=p.useCallback((et,Ut)=>(Pt,er)=>{const $t=Pt.nativeEvent,mt=k.get(er);if(H.current!==null||!mt||$t.dndKit||$t.defaultPrevented)return;const Bt={active:mt};et(Pt,Ut.options,Bt)===!0&&($t.dndKit={capturedBy:Ut.sensor},H.current=er,Ui(Pt,Ut))},[k,Ui]),$i=TT(d,ud);$T(d),hr(()=>{Ce&&S===Qr.Initializing&&C(Qr.Initialized)},[Ce,S]),p.useEffect(()=>{const{onDragMove:et}=V.current,{active:Ut,activatorEvent:Pt,collisions:er,over:$t}=we.current;if(!Ut||!Pt)return;const mt={active:Ut,activatorEvent:Pt,collisions:er,delta:{x:Jn.x,y:Jn.y},over:$t};Dt.unstable_batchedUpdates(()=>{et==null||et(mt),y({type:"onDragMove",event:mt})})},[Jn.x,Jn.y]),p.useEffect(()=>{const{active:et,activatorEvent:Ut,collisions:Pt,droppableContainers:er,scrollAdjustedTranslate:$t}=we.current;if(!et||H.current==null||!Ut||!$t)return;const{onDragOver:mt}=V.current,Bt=er.get(zi),Ur=Bt&&Bt.rect.current?{id:Bt.id,rect:Bt.rect.current,data:Bt.data,disabled:Bt.disabled}:null,ot={active:et,activatorEvent:Ut,collisions:Pt,delta:{x:$t.x,y:$t.y},over:Ur};Dt.unstable_batchedUpdates(()=>{Al(Ur),mt==null||mt(ot),y({type:"onDragOver",event:ot})})},[zi]),hr(()=>{we.current={activatorEvent:ne,active:F,activeNode:re,collisionRect:Ft,collisions:zt,droppableRects:Pe,draggableNodes:k,draggingNode:ht,draggingNodeRect:ue,droppableContainers:P,over:hn,scrollableAncestors:fn,scrollAdjustedTranslate:Jn},D.current={initial:ue,translated:Ft}},[F,re,zt,Ft,k,ht,ue,Pe,P,hn,fn,Jn]),PT({...ft,delta:T,draggingRect:Ft,pointerCoordinates:Ll,scrollableAncestors:fn,scrollableAncestorRects:zr});const wo=p.useMemo(()=>({active:F,activeNode:re,activeNodeRect:Ce,activatorEvent:ne,collisions:zt,containerNodeRect:Xn,dragOverlay:Nt,draggableNodes:k,droppableContainers:P,droppableRects:Pe,over:hn,measureDroppableContainers:Re,scrollableAncestors:fn,scrollableAncestorRects:zr,measuringConfiguration:ce,measuringScheduled:Ae,windowRect:Yt}),[F,re,Ce,ne,zt,Xn,Nt,k,P,Pe,hn,Re,fn,zr,ce,Ae,Yt]),jl=p.useMemo(()=>({activatorEvent:ne,activators:$i,active:F,activeNodeRect:Ce,ariaDescribedById:{draggable:G},dispatch:m,draggableNodes:k,over:hn,measureDroppableContainers:Re}),[ne,$i,F,Ce,m,G,k,hn,Re]);return ut.createElement(Mb.Provider,{value:v},ut.createElement(nd.Provider,{value:jl},ut.createElement(Zb.Provider,{value:wo},ut.createElement(eS.Provider,{value:Tl},u)),ut.createElement(JT,{disabled:(a==null?void 0:a.restoreFocus)===!1})),ut.createElement(tT,{...a,hiddenTextDescribedById:G}));function Bi(){const et=(le==null?void 0:le.autoScrollEnabled)===!1,Ut=typeof l=="object"?l.enabled===!1:l===!1,Pt=N&&!et&&!Ut;return typeof l=="object"?{...l,enabled:Pt}:{enabled:Pt}}}),nj=p.createContext(null),Fv="button",rj="Draggable";function sj(e){let{id:t,data:n,disabled:r=!1,attributes:s}=e;const o=Nl(rj),{activators:i,activatorEvent:a,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:c,over:f}=p.useContext(nd),{role:g=Fv,roleDescription:x="draggable",tabIndex:w=0}=s??{},b=(l==null?void 0:l.id)===t,m=p.useContext(b?eS:nj),[y,v]=xc(),[S,C]=xc(),N=BT(i,t),E=rl(n);hr(()=>(c.set(t,{id:t,key:o,node:y,activatorNode:S,data:E}),()=>{const T=c.get(t);T&&T.key===o&&c.delete(t)}),[c,t]);const k=p.useMemo(()=>({role:g,tabIndex:w,"aria-disabled":r,"aria-pressed":b&&g===Fv?!0:void 0,"aria-roledescription":x,"aria-describedby":d.draggable}),[r,g,w,b,x,d.draggable]);return{active:l,activatorEvent:a,activeNodeRect:u,attributes:k,isDragging:b,listeners:r?void 0:N,node:y,over:f,setNodeRef:v,setActivatorNodeRef:C,transform:m}}function oj(){return p.useContext(Zb)}const ij="Droppable",aj={timeout:25};function lj(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:s}=e;const o=Nl(ij),{active:i,dispatch:a,over:l,measureDroppableContainers:u}=p.useContext(nd),d=p.useRef({disabled:n}),c=p.useRef(!1),f=p.useRef(null),g=p.useRef(null),{disabled:x,updateMeasurementsFor:w,timeout:b}={...aj,...s},m=rl(w??r),y=p.useCallback(()=>{if(!c.current){c.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{u(Array.isArray(m.current)?m.current:[m.current]),g.current=null},b)},[b]),v=td({callback:y,disabled:x||!i}),S=p.useCallback((k,T)=>{v&&(T&&(v.unobserve(T),c.current=!1),k&&v.observe(k))},[v]),[C,N]=xc(S),E=rl(t);return p.useEffect(()=>{!v||!C.current||(v.disconnect(),c.current=!1,v.observe(C.current))},[C,v]),p.useEffect(()=>(a({type:at.RegisterDroppable,element:{id:r,key:o,disabled:n,node:C,rect:f,data:E}}),()=>a({type:at.UnregisterDroppable,key:o,id:r})),[r]),p.useEffect(()=>{n!==d.current.disabled&&(a({type:at.SetDroppableDisabled,id:r,key:o,disabled:n}),d.current.disabled=n)},[r,o,n,a]),{active:i,rect:f,isOver:(l==null?void 0:l.id)===r,node:C,over:l,setNodeRef:N}}function tS(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function uj(e,t){return e.reduce((n,r,s)=>{const o=t.get(r);return o&&(n[s]=o),n},Array(e.length))}function uu(e){return e!==null&&e>=0}function cj(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{var t;let{rects:n,activeNodeRect:r,activeIndex:s,overIndex:o,index:i}=e;const a=(t=n[s])!=null?t:r;if(!a)return null;const l=hj(n,i,s);if(i===s){const u=n[o];return u?{x:ss&&i<=o?{x:-a.width-l,y:0,...cu}:i=o?{x:a.width+l,y:0,...cu}:{x:0,y:0,...cu}};function hj(e,t,n){const r=e[t],s=e[t-1],o=e[t+1];return!r||!s&&!o?0:n{let{rects:t,activeIndex:n,overIndex:r,index:s}=e;const o=tS(t,r,n),i=t[s],a=o[s];return!a||!i?null:{x:a.left-i.left,y:a.top-i.top,scaleX:a.width/i.width,scaleY:a.height/i.height}},du={scaleX:1,scaleY:1},Z3=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:s,rects:o,overIndex:i}=e;const a=(t=o[n])!=null?t:r;if(!a)return null;if(s===n){const u=o[i];return u?{x:0,y:nn&&s<=i?{x:0,y:-a.height-l,...du}:s=i?{x:0,y:a.height+l,...du}:{x:0,y:0,...du}};function pj(e,t,n){const r=e[t],s=e[t-1],o=e[t+1];return r?nr.map(N=>typeof N=="object"&&"id"in N?N.id:N),[r]),x=i!=null,w=i?g.indexOf(i.id):-1,b=u?g.indexOf(u.id):-1,m=p.useRef(g),y=!cj(g,m.current),v=b!==-1&&w===-1||y,S=dj(o);hr(()=>{y&&x&&d(g)},[y,g,x,d]),p.useEffect(()=>{m.current=g},[g]);const C=p.useMemo(()=>({activeIndex:w,containerId:c,disabled:S,disableTransforms:v,items:g,overIndex:b,useDragOverlay:f,sortedRects:uj(g,l),strategy:s}),[w,c,S.draggable,S.droppable,v,g,b,l,f,s]);return ut.createElement(sS.Provider,{value:C},t)}const gj=e=>{let{id:t,items:n,activeIndex:r,overIndex:s}=e;return tS(n,r,s).indexOf(t)},yj=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:s,items:o,newIndex:i,previousItems:a,previousContainerId:l,transition:u}=e;return!u||!r||a!==o&&s===i?!1:n?!0:i!==s&&t===l},vj={duration:200,easing:"ease"},oS="transform",xj=ol.Transition.toString({property:oS,duration:0,easing:"linear"}),wj={roleDescription:"sortable"};function bj(e){let{disabled:t,index:n,node:r,rect:s}=e;const[o,i]=p.useState(null),a=p.useRef(n);return hr(()=>{if(!t&&n!==a.current&&r.current){const l=s.current;if(l){const u=Mi(r.current,{ignoreTransform:!0}),d={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(d.x||d.y)&&i(d)}}n!==a.current&&(a.current=n)},[t,n,r,s]),p.useEffect(()=>{o&&i(null)},[o]),o}function Sj(e){let{animateLayoutChanges:t=yj,attributes:n,disabled:r,data:s,getNewIndex:o=gj,id:i,strategy:a,resizeObserverConfig:l,transition:u=vj}=e;const{items:d,containerId:c,activeIndex:f,disabled:g,disableTransforms:x,sortedRects:w,overIndex:b,useDragOverlay:m,strategy:y}=p.useContext(sS),v=Ej(r,g),S=d.indexOf(i),C=p.useMemo(()=>({sortable:{containerId:c,index:S,items:d},...s}),[c,s,S,d]),N=p.useMemo(()=>d.slice(d.indexOf(i)),[d,i]),{rect:E,node:k,isOver:T,setNodeRef:P}=lj({id:i,data:C,disabled:v.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...l}}),{active:A,activatorEvent:D,activeNodeRect:F,attributes:H,setNodeRef:le,listeners:X,isDragging:ne,over:I,setActivatorNodeRef:V,transform:G}=sj({id:i,data:C,attributes:{...wj,...n},disabled:v.draggable}),Y=BA(P,le),ce=!!A,Pe=ce&&!x&&uu(f)&&uu(b),Re=!m&&ne,Ae=Re&&Pe?G:null,Le=Pe?Ae??(a??y)({rects:w,activeNodeRect:F,activeIndex:f,overIndex:b,index:S}):null,ft=uu(f)&&uu(b)?o({id:i,items:d,activeIndex:f,overIndex:b}):S,Xt=A==null?void 0:A.id,Ce=p.useRef({activeId:Xt,items:d,newIndex:ft,containerId:c}),Xn=d!==Ce.current.items,we=t({active:A,containerId:c,isDragging:ne,isSorting:ce,id:i,index:S,items:d,newIndex:Ce.current.newIndex,previousItems:Ce.current.items,previousContainerId:Ce.current.containerId,transition:u,wasDragging:Ce.current.activeId!=null}),Rt=bj({disabled:!we,index:S,node:k,rect:E});return p.useEffect(()=>{ce&&Ce.current.newIndex!==ft&&(Ce.current.newIndex=ft),c!==Ce.current.containerId&&(Ce.current.containerId=c),d!==Ce.current.items&&(Ce.current.items=d)},[ce,ft,c,d]),p.useEffect(()=>{if(Xt===Ce.current.activeId)return;if(Xt!=null&&Ce.current.activeId==null){Ce.current.activeId=Xt;return}const ht=setTimeout(()=>{Ce.current.activeId=Xt},50);return()=>clearTimeout(ht)},[Xt]),{active:A,activeIndex:f,attributes:H,data:C,rect:E,index:S,newIndex:ft,items:d,isOver:T,isSorting:ce,isDragging:ne,listeners:X,node:k,overIndex:b,over:I,setNodeRef:Y,setActivatorNodeRef:V,setDroppableNodeRef:P,setDraggableNodeRef:le,transform:Rt??Le,transition:Nt()};function Nt(){if(Rt||Xn&&Ce.current.newIndex===S)return xj;if(!(Re&&!Pm(D)||!u)&&(ce||we))return ol.Transition.toString({...u,property:oS})}}function Ej(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function Sc(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const _j=[Se.Down,Se.Right,Se.Up,Se.Left],e8=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:s,droppableContainers:o,over:i,scrollableAncestors:a}}=t;if(_j.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];o.getEnabled().forEach(c=>{if(!c||c!=null&&c.disabled)return;const f=s.get(c.id);if(f)switch(e.code){case Se.Down:r.topf.top&&l.push(c);break;case Se.Left:r.left>f.left&&l.push(c);break;case Se.Right:r.left1&&(d=u[1].id),d!=null){const c=o.get(n.id),f=o.get(d),g=f?s.get(f.id):null,x=f==null?void 0:f.node.current;if(x&&g&&c&&f){const b=ed(x).some((N,E)=>a[E]!==N),m=iS(c,f),y=Cj(c,f),v=b||!m?{x:0,y:0}:{x:y?r.width-g.width:0,y:y?r.height-g.height:0},S={x:g.left,y:g.top};return v.x&&v.y?S:sl(S,v)}}}};function iS(e,t){return!Sc(e)||!Sc(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Cj(e,t){return!Sc(e)||!Sc(t)||!iS(e,t)?!1:e.data.current.sortable.indexe==null||e==="",Rj=e=>e.sortKey??e.key;function Nj(e,t,n){return e instanceof Date||t instanceof Date?new Date(e).getTime()-new Date(t).getTime():typeof e=="number"&&typeof t=="number"?e-t:typeof e=="boolean"&&typeof t=="boolean"?Number(e)-Number(t):String(e).localeCompare(String(t),n,{numeric:!0,sensitivity:"base"})}function t8(e,t,n,r){if(!n)return e;const s=t.find(a=>Rj(a)===n.key);if(!s)return e;const o=s.sortValue??(a=>a[s.key]),i=n.dir==="asc"?1:-1;return[...e].sort((a,l)=>{const u=o(a),d=o(l);return la(u)||la(d)?la(u)&&la(d)?0:la(u)?1:-1:i*Nj(u,d,r)})}function n8(e,t){return typeof e.header=="string"&&e.header.trim()?e.header:e.srHeader??t}const Pj={start:"text-start",center:"text-center",end:"text-end"},Lj={start:"justify-start",center:"justify-center",end:"justify-end"};function Oj(e){if(!e)return 0;const t=parseFloat(e);return Number.isNaN(t)?0:e.trim().endsWith("rem")?t*16:t}const Aj=44,Tj=40,jj=50;function r8(e,t,n){const r=e.reduce((s,o)=>s+Oj(o.width),0);return r===0?0:r+(t?Aj:0)+(n?Tj:0)}function Dj(e,t,n,r,s){e.preventDefault(),e.stopPropagation();const o=e.clientX,i=n.getBoundingClientRect().width,a={cursor:document.body.style.cursor,select:document.body.style.userSelect};s(!0),document.body.style.cursor="col-resize",document.body.style.userSelect="none";const l=n.closest("[data-datatable-card]"),u=l?Array.from(l.querySelectorAll("[data-col-key]")).filter(g=>g.dataset.colKey===t):[n];let d=i;const c=g=>{d=Math.max(jj,i+(g.clientX-o));const x=`${d}px`;for(const w of u)w.style.width=x,w.style.minWidth=x,w.tagName==="TD"&&(w.style.maxWidth=x)},f=()=>{window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",f),document.body.style.cursor=a.cursor,document.body.style.userSelect=a.select,s(!1),r(t,d)};window.addEventListener("mousemove",c),window.addEventListener("mouseup",f)}function Ij({col:e,onResize:t}){const{t:n}=xe(),[r,s]=p.useState(!1),o=typeof e.header=="string"&&e.header.trim()?e.header:e.srHeader??e.key;return h.jsx(bi,{role:"separator","aria-orientation":"vertical",content:n("LANG_i18n_common.resizeColumn",{column:o}),onMouseDown:i=>Dj(i,e.key,i.currentTarget.parentElement,t,s),className:z("group/resize absolute end-0 top-0 flex h-full w-2 cursor-col-resize select-none items-center justify-center",r&&"bg-accent"),children:h.jsx("span",{"aria-hidden":!0,className:z("w-0.5 transition-all group-hover/resize:h-full group-hover/resize:bg-accent",r?"h-full bg-accent":"h-1/2 bg-border-strong opacity-0 group-hover/cabecalho:opacity-100")})})}const Gh="sticky top-0 z-sticky bg-surface-sunken shadow-header-rule",aS="group/cabecalho text-start text-overline text-text-muted",s8=z(aS,"border-b border-border"),o8="py-2 pe-3 last:pe-0 text-start",Mj={asc:"LANG_i18n_common.sortAsc",desc:"LANG_i18n_common.sortDesc",none:"LANG_i18n_common.sortNone"};function Fj({col:e,ordenavel:t,dir:n,sortAtual:r,onOrdenar:s,chaveSort:o,onResize:i,arrastavel:a}){var y;const{t:l}=xe(),{attributes:u,listeners:d,setNodeRef:c,transform:f,transition:g,isDragging:x}=Sj({id:e.key,disabled:!a||e.fixed}),w=e.align??"start",b=!!i&&!!e.header,m=typeof e.header=="string"&&e.header.trim()?e.header:e.srHeader;return h.jsxs("th",{ref:c,style:{transform:ol.Transform.toString(f),transition:g,width:e.width,minWidth:e.width},"data-col-key":e.key,"aria-label":m,"aria-sort":t?n==="asc"?"ascending":n==="desc"?"descending":"none":void 0,className:z(Gh,"group/th px-4 py-3",Pj[w],e.editable&&"text-accent",x&&"opacity-50"),children:[a&&!e.fixed&&h.jsx("button",{type:"button",...u,...d,className:z("absolute start-0.5 top-1/2 -translate-y-1/2 cursor-grab text-text-muted","transition-opacity active:cursor-grabbing","opacity-0 group-hover/th:opacity-60 hover:!opacity-100","focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"),"aria-label":l("LANG_i18n_common.dragColumn",{column:String(e.header??e.key)}),children:h.jsx(fw,{className:"h-3.5 w-3.5"})}),h.jsx("div",{className:z("flex min-w-0 items-center gap-1",Lj[w],w==="start"&&"flex-1"),children:t?h.jsxs(bi,{as:"button",type:"button",content:l(Mj[((y=kj(r,o))==null?void 0:y.dir)??"none"]),onClick:s,className:"inline-flex min-w-0 items-center gap-1 rounded-control uppercase hover:text-text-body focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:[h.jsx("span",{className:"truncate",children:e.header}),n==="asc"?h.jsx(cw,{className:"h-3.5 w-3.5"}):n==="desc"?h.jsx(vl,{className:"h-3.5 w-3.5"}):h.jsx(dw,{className:"h-3.5 w-3.5 opacity-40"})]}):e.header||h.jsx("span",{className:"sr-only",children:e.srHeader??l("LANG_i18n_common.actions")})}),b&&h.jsx(Ij,{col:e,onResize:i})]})}function i8({columns:e,selecionavel:t,todasVisiveis:n,parcial:r,onAlternarVisiveis:s,temExpandir:o,podeOrdenar:i,sortAtual:a,chaveDeOrdenacao:l,onOrdenar:u,onResize:d,onColumnsReorder:c}){const{t:f}=xe(),g=c!==void 0;return h.jsx("thead",{children:h.jsxs("tr",{className:aS,children:[t&&h.jsx("th",{className:z(Gh,"w-11 px-3 py-3"),children:h.jsx(gP,{label:f("LANG_i18n_common.selectVisible"),labelHidden:!0,checked:n,indeterminate:r,onChange:s})}),o&&h.jsx("th",{className:z(Gh,"w-10"),children:h.jsx("span",{className:"sr-only",children:f("LANG_i18n_common.expand")})}),h.jsx(mj,{items:e.map(x=>x.key),strategy:fj,children:e.map(x=>{const w=i(x),b=l(x),m=w&&(a==null?void 0:a.key)===b?a.dir:null;return h.jsx(Fj,{col:x,ordenavel:w,dir:m,sortAtual:a,chaveSort:b,onOrdenar:()=>u(b),onResize:d,arrastavel:g},x.key)})})]})})}function zj(e){return e.split(" ").filter(Boolean).slice(0,2).map(t=>{var n;return(n=t[0])==null?void 0:n.toUpperCase()}).join("")}const zv={sm:"h-8 w-8 text-micro",md:"h-10 w-10 text-caption",lg:"h-20 w-20 text-heading"};function rd({name:e,src:t,size:n="md",className:r,alt:s}){const[o,i]=p.useState(!1);return p.useEffect(()=>i(!1),[t]),t&&!o?h.jsx("img",{src:t,alt:s??e,onError:()=>i(!0),className:z("shrink-0 rounded-full object-cover",zv[n],r)}):h.jsx("span",{className:z("inline-flex shrink-0 items-center justify-center rounded-full bg-surface-inverse font-semibold text-surface-inverse-fg",zv[n],r),"aria-hidden":!0,children:zj(e)})}const Uj="/assets/logo-D_XkRdbZ.svg",$j="data:image/svg+xml,%3csvg%20width='26'%20height='28'%20viewBox='0%200%2026%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.39126e-07%205.88431C-7.57036e-08%20-1.86288%2010.9709%20-1.86288%2010.9709%205.88431C10.9709%2013.6315%205.53956e-07%2013.6315%202.39126e-07%205.88431Z'%20fill='url(%23paint0_linear_490_223)'/%3e%3cpath%20d='M5.48652%2015.9964C-1.73609%2015.9964%20-1.73609%2027.7665%205.48652%2027.7665C8.54024%2027.7665%2011.016%2025.0819%2010.9709%2021.8051C10.8937%2016.1153%2015.1428%2011.7686%2020.398%2011.7686C27.6188%2011.7686%2027.6202%20-1.29863e-06%2020.398%20-9.59058e-07C17.3447%20-8.15501e-07%2014.869%202.68456%2014.9128%205.9614C14.95%208.74609%2014.0167%2011.1528%2012.1767%2013.1107C10.2833%2015.1263%208.13974%2015.9964%205.48652%2015.9964Z'%20fill='url(%23paint1_linear_490_223)'/%3e%3ccircle%20cx='21.3579'%20cy='19.1457'%20r='2.58726'%20fill='url(%23paint2_linear_490_223)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_490_223'%20x1='0.268663'%20y1='13.1071'%20x2='15.642'%20y2='19.8066'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0.288462'%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_490_223'%20x1='0.268663'%20y1='13.1071'%20x2='15.642'%20y2='19.8066'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0.288462'%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_490_223'%20x1='21.2132'%20y1='16.6123'%20x2='22.6224'%20y2='19.6186'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0.288462'%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";function lS({size:e,withWordmark:t=!1,stacked:n=!1,className:r,variant:s="auto",brand:o}){const i=Ze(x=>x.theme),a=(o==null?void 0:o.name)||yb(),[l,u]=p.useState(!1);p.useEffect(()=>u(!1),[o==null?void 0:o.logoUrl]);const d=!!(o!=null&&o.logoUrl)&&!l,g=d?o==null?void 0:o.logoUrl:(s==="auto"?i:s)==="dark"?$j:Uj;return h.jsxs("span",{className:z("flex min-w-0",n?"flex-col items-start gap-3":"items-center gap-2",r),children:[h.jsx("img",{src:g,alt:a,onError:()=>u(!0),style:{height:n?e??"6em":t?"0.8em":e??"1em"},className:z("w-auto shrink-0",d&&"max-w-[6em] object-contain")}),t&&h.jsx("span",{className:"min-w-0 truncate font-bold leading-none tracking-tight",children:a})]})}function uS({onChange:e,className:t}){const{t:n}=xe(),r=Ze(i=>i.theme),s=Ze(i=>i.setTheme),o=r==="dark"?"light":"dark";return h.jsx(fr,{type:"button",size:"lg",label:n(`LANG_i18n_app.themeTo.${o}`),icon:r==="dark"?h.jsx(XR,{"aria-hidden":!0}):h.jsx($R,{"aria-hidden":!0}),className:z("text-text-body",t),onClick:()=>{s(o),e==null||e(o)}})}function Bj(){return kt({queryKey:["i18n-locales"],queryFn:async()=>(await ie.get("/api/v1/i18n/locales")).data,staleTime:10*6e4})}function Vj({onChange:e,compact:t=!1,className:n}){const{t:r,i18n:s}=xe(),{data:o}=Bj(),i=(o??[]).filter(l=>l.enabled);if(i.length<2)return null;const a=i.find(l=>l.code===s.language)??i[0];return h.jsx(vo,{align:"end",widthClassName:"w-popover-sm",className:n,trigger:({open:l,toggle:u})=>h.jsxs("button",{type:"button",onClick:u,"aria-expanded":l,"aria-label":r("LANG_i18n_app.changeLanguage"),className:z("inline-flex h-9 items-center gap-1.5 rounded-control px-2 text-caption text-text-body","hover:bg-surface-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",l&&"bg-surface-sunken"),children:[h.jsx(mw,{className:"h-5 w-5","aria-hidden":!0}),t?h.jsx("span",{className:"text-micro font-medium uppercase",children:a.code}):h.jsx("span",{children:a.label})]}),children:({close:l})=>h.jsx("ul",{className:"py-1",children:i.map(u=>h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:()=>{xb(u.code),e==null||e(u.code),l()},className:z(xs,"justify-between",u.code===a.code&&"text-text-strong"),children:[h.jsxs("span",{className:"flex items-center gap-2",children:[u.flag&&h.jsx("span",{"aria-hidden":!0,children:u.flag}),u.label]}),u.code===a.code&&h.jsx(uw,{className:"h-4 w-4 text-accent","aria-hidden":!0})]})},u.code))})})}const Hj="flex-none -mb-px mt-1 rounded-t-card border border-transparent px-4 py-2.5 text-caption transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",a8=p.forwardRef(function({tabs:t,active:n,onChange:r,className:s},o){return h.jsx("div",{ref:o,role:"tablist",className:z("flex items-end gap-1 overflow-x-auto overflow-y-hidden border-b border-border","[&+*]:!mt-0 [&+*]:!rounded-t-none [&+*>*]:!rounded-t-none",s),children:t.map(i=>{const a=i.id===n;return h.jsxs("button",{type:"button",role:"tab","aria-selected":a,onClick:()=>r(i.id),className:z(Hj,a?"border-border border-b-transparent bg-surface-raised font-semibold text-text-strong":"font-medium text-text-muted hover:bg-surface-sunken hover:text-text-body"),children:[i.label,i.count!==void 0&&h.jsxs("span",{className:"ms-1 text-text-muted",children:["(",i.count,")"]})]},i.id)})})}),Gj=3;function Kj({items:e}){const{t}=xe();if(e.length===0)return null;const n=e.length>=Gj,r=n?e.slice(0,-1):[];return h.jsx("nav",{"aria-label":t("LANG_i18n_common.breadcrumb"),children:h.jsxs("ol",{className:"flex items-center gap-1.5 text-overline text-text-muted",children:[n&&h.jsxs("li",{className:"flex items-center gap-1.5 sm:hidden",children:[h.jsx(vo,{align:"start",widthClassName:"w-popover-sm",trigger:({open:s,toggle:o})=>h.jsx("button",{type:"button",onClick:o,"aria-expanded":s,"aria-label":t("LANG_i18n_common.breadcrumbFull"),className:z("rounded-control px-1 hover:text-text-body","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"),children:"…"}),children:({close:s})=>h.jsx("ol",{className:"py-1",children:r.map(o=>h.jsx("li",{children:o.to?h.jsx(lo,{to:o.to,onClick:s,className:xs,children:o.label}):h.jsx("span",{className:"block px-3 py-2 text-caption text-text-muted",children:o.label})},o.label))})}),h.jsx(vh,{className:"h-4 w-4 shrink-0","aria-hidden":!0})]}),e.map((s,o)=>{const i=o===e.length-1;return h.jsxs("li",{className:z("flex items-center gap-1.5",!i&&n&&"hidden sm:flex"),children:[s.to&&!i?h.jsx(lo,{to:s.to,className:"rounded-control hover:text-text-body hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:s.label}):h.jsx("span",{className:z("truncate",i&&"text-text-strong"),"aria-current":i?"page":void 0,children:s.label}),!i&&h.jsx(vh,{className:"h-4 w-4 shrink-0","aria-hidden":!0})]},`${s.label}-${o}`)})]})})}function Dr(e,t){return e===t||e.startsWith(`${t}/`)}const cS="group flex items-center rounded-control transition-colors duration-100",dS="bg-accent-soft",fS="hover:bg-surface-sunken",Wj="flex items-center gap-3 rounded-control px-3 text-caption focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",qj=1.5,Qj="font-semibold text-accent",Xj={naLinha:{extra:"w-full",inativo:"font-medium text-text-body group-hover:text-text-strong"},sub:{extra:"ps-9",inativo:"font-medium text-text-body hover:text-text-strong"},flyout:{extra:"w-full hover:bg-accent-soft",inativo:"font-medium text-text-body hover:text-text-strong"}},Yj="rounded-card border-border bg-surface-raised text-text-body shadow-card",sd={expandida:"h-8",recolhida:"h-10"};function Ec({item:e,variante:t,forceActive:n,collapsed:r=!1,className:s,...o}){const{extra:i,inativo:a}=Xj[t];return h.jsxs(aR,{to:e.to,end:e.end,...o,className:({isActive:l})=>{const u=l||!!n;return z(Wj,sd[r?"recolhida":"expandida"],r&&"justify-center",i,u?Qj:a,s)},children:[e.icon&&h.jsx(e.icon,{className:"h-5 w-5 shrink-0",strokeWidth:qj,"aria-hidden":!0}),h.jsx("span",{className:z("truncate",r&&"sr-only"),children:e.label})]})}const Jj=150;function Zj({item:e}){const{pathname:t}=un(),[n,r]=p.useState(null),s=p.useRef(void 0),o=p.useRef(null),i=p.useRef(null),a=p.useRef(!1);p.useEffect(()=>()=>window.clearTimeout(s.current),[]),p.useEffect(()=>{var m,y;n&&a.current&&((y=(m=i.current)==null?void 0:m.querySelector("a"))==null||y.focus(),a.current=!1)},[n]);const l=()=>{var m;return(m=o.current)==null?void 0:m.querySelector("a")},u=()=>{var y;window.clearTimeout(s.current);const m=(y=o.current)==null?void 0:y.getBoundingClientRect();m&&r({x:m.right,y:m.top})},d=()=>{s.current=window.setTimeout(()=>r(null),Jj)},c=m=>{var v,S;const y=m;y&&((v=o.current)!=null&&v.contains(y)||(S=i.current)!=null&&S.contains(y))||d()},f={onMouseEnter:u,onFocus:u,onMouseLeave:d,onBlur:m=>c(m.relatedTarget)};p.useEffect(()=>{if(!n)return;const m=y=>{var v;y.key==="Escape"&&((v=l())==null||v.focus(),r(null))};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[n]);const g=e.children??[],x=g.length>0,w=g.some(m=>Dr(t,m.to)),b=w||Dr(t,e.to);return h.jsxs(h.Fragment,{children:[h.jsx("div",{ref:o,...f,className:z(cS,sd.recolhida,b?dS:fS),children:h.jsx(Ec,{item:e,variante:"naLinha",collapsed:!0,forceActive:w,"aria-haspopup":x||void 0,"aria-expanded":x?n!==null:void 0,onKeyDown:m=>{x&&m.key==="ArrowDown"&&(m.preventDefault(),a.current=!0,u())}})}),n&&h.jsx(Dw,{x:n.x,y:n.y,className:"z-popover rounded-card border border-border bg-surface-raised p-2 text-text-body shadow-card",children:h.jsxs("div",{ref:i,...f,children:[h.jsx("p",{className:z("px-3 text-micro font-semibold text-text-strong",x&&"pb-1.5"),children:e.label}),x&&h.jsx("ul",{className:"space-y-0.5",children:g.map(m=>h.jsx("li",{children:h.jsx(Ec,{item:m,variante:"flyout"})},m.to))})]})})]})}function hS({className:e}){const{t}=xe(),n=Ze(s=>s.sidebarCollapsed),r=Ze(s=>s.setSidebarCollapsed);return h.jsx("button",{type:"button",onClick:()=>r(!n),"aria-expanded":!n,"aria-label":t(n?"LANG_i18n_common.expand":"LANG_i18n_common.collapse"),className:z("shrink-0 rounded-control text-text-muted transition-colors hover:text-text-body","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",e),children:h.jsx(xw,{className:"h-5 w-5","aria-hidden":!0})})}const Uv=16;function eD({item:e}){const{pathname:t}=un(),n=Ze(l=>l.navOpen[e.to]),r=Ze(l=>l.setNavOpen),s=e.children??[],o=s.some(l=>Dr(t,l.to)),i=n??o,a=s.length>0;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:z(cS,sd.expandida,a&&"pe-1",o||Dr(t,e.to)?dS:fS),children:[h.jsx("div",{className:"min-w-0 flex-1",children:h.jsx(Ec,{item:e,variante:"naLinha",forceActive:o,onClick:a?()=>r(e.to,!0):void 0})}),a&&h.jsx("button",{type:"button",onClick:()=>r(e.to,!i),"aria-expanded":i,"aria-label":e.label,className:z("shrink-0 rounded-control p-1 text-text-muted transition-colors","group-hover:text-text-body","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"),children:h.jsx(UA,{open:i})})]}),i&&h.jsx("ul",{className:"relative mt-0.5",children:s.map((l,u)=>{const d=u===s.length-1;return h.jsxs("li",{className:"relative",children:[h.jsx("span",{className:z("absolute start-5 top-0 h-4 w-3 border-b-1.5 border-s-1.5","rounded-es-md border-border-strong"),"aria-hidden":!0}),!d&&h.jsx("span",{className:"absolute bottom-0 start-5 top-4 border-s-1.5 border-border-strong","aria-hidden":!0}),h.jsx(Ec,{item:l,variante:"sub"})]},l.to)})})]})}function pS({brand:e,groups:t,footer:n,resize:r,toggle:s=!0,forceExpanded:o=!1}){const{t:i}=xe(),a=Ze(m=>m.sidebarCollapsed),l=o?!1:a,u=n==null?void 0:n(l),[d,c]=p.useState(!1),f=p.useRef(!1),g=p.useRef(null);p.useEffect(()=>()=>{var m;return(m=g.current)==null?void 0:m.call(g)},[]);const x=p.useCallback(m=>{if(!r)return;m.preventDefault(),f.current=!0,c(!0),document.body.style.cursor="col-resize",document.body.style.userSelect="none";const y=C=>{if(!f.current)return;const N=document.documentElement.dir==="rtl";r.preview(N?window.innerWidth-C.clientX:C.clientX)},v=()=>{f.current=!1,c(!1),document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",y),window.removeEventListener("mouseup",S),g.current=null},S=()=>{v(),r.commit()};g.current=v,window.addEventListener("mousemove",y),window.addEventListener("mouseup",S)},[r]),w=m=>{if(!r)return;const y=document.documentElement.dir==="rtl";if(m.key===(y?"ArrowLeft":"ArrowRight"))r.preview(r.width+Uv);else if(m.key===(y?"ArrowRight":"ArrowLeft"))r.preview(r.width-Uv);else return;m.preventDefault()},b=m=>{r&&(m.key==="ArrowLeft"||m.key==="ArrowRight")&&r.commit()};return h.jsxs("aside",{className:z("relative z-nav flex h-full shrink-0 flex-col overflow-hidden border-e border-border bg-surface-raised text-text-body",!d&&"transition-[width] duration-200",l?"w-sidebar-collapsed":!r&&"w-sidebar"),style:!l&&r?{width:r.width}:void 0,children:[h.jsxs("div",{className:z("flex h-header shrink-0 items-center border-b border-border text-heading text-text-strong",l?"flex-col justify-center gap-2":"justify-between gap-2 px-4"),children:[s&&h.jsx(hS,{className:l?"flex w-full justify-center":"order-last"}),l?h.jsx("div",{className:"flex w-full justify-center",children:e}):h.jsx("div",{className:"min-w-0",children:e})]}),h.jsx("nav",{className:z("flex-1 overflow-y-auto overflow-x-hidden py-5",l?"px-2 scroll-goteira-simetrica":"px-4 scroll-goteira-estavel"),children:t.map((m,y)=>h.jsxs("div",{className:z("mb-3.5 last:mb-0",l&&y>0&&"border-t border-border pt-3.5"),children:[!l&&h.jsx("p",{className:"px-3 pb-1.5 text-overline text-text-muted",children:m.label}),h.jsx("ul",{className:"space-y-0.5",children:m.items.map(v=>h.jsx("li",{children:l?h.jsx(Zj,{item:v}):h.jsx(eD,{item:v})},v.to))})]},m.label))}),u&&h.jsx("div",{className:"shrink-0 border-t border-border p-4",children:u}),r&&!l&&h.jsx(bi,{as:"div",content:i("LANG_i18n_common.sidebarResize"),role:"separator","aria-orientation":"vertical","aria-valuenow":r.width,"aria-valuemin":r.min,"aria-valuemax":r.max,tabIndex:0,onKeyDown:w,onKeyUp:b,onMouseDown:x,onDoubleClick:r.reset,className:z("absolute inset-y-0 end-0 z-10 w-1.5 cursor-col-resize","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent","transition-colors hover:bg-accent/30",d&&"bg-accent/40")})]})}function tD({brand:e,groups:t,footer:n}){const r=Ze(o=>o.mobileNavOpen),s=Ze(o=>o.setMobileNavOpen);return p.useEffect(()=>{if(!r)return;const o=i=>i.key==="Escape"&&s(!1);return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[r,s]),r?Dt.createPortal(h.jsxs("div",{className:"fixed inset-0 z-drawer sm:hidden",children:[h.jsx("div",{className:"absolute inset-0 bg-overlay",onClick:()=>s(!1),"aria-hidden":!0}),h.jsx("div",{className:"absolute inset-y-0 start-0",children:h.jsx(pS,{brand:e,groups:t,footer:n,toggle:!1,forceExpanded:!0})})]}),document.body):null}function mS({brand:e,nav:t,sidebarFooter:n,sidebarResize:r,sidebarToggle:s,topbar:o,children:i}){const a=p.useRef(null),{pathname:l}=un(),u=_k(),{t:d}=xe(),c=Ze(g=>g.setMobileNavOpen),f=Ze(g=>g.sidebarCollapsed);return p.useEffect(()=>{var g;u!=="POP"&&((g=a.current)==null||g.scrollTo({top:0}))},[l,u]),p.useEffect(()=>c(!1),[l,c]),h.jsxs("div",{className:"flex h-screen overflow-hidden bg-surface",children:[h.jsx("div",{className:"hidden sm:flex",children:h.jsx(pS,{brand:e(f),groups:t,footer:n,resize:r,toggle:s})}),h.jsx(tD,{brand:e(!1),groups:t,footer:n}),h.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[h.jsxs("div",{className:"flex",children:[h.jsx("button",{type:"button",onClick:()=>c(!0),"aria-label":d("LANG_i18n_app.openNav"),className:"flex h-header shrink-0 items-center border-b border-border bg-surface-raised px-4 text-text-muted transition-colors hover:text-text-body focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent sm:hidden",children:h.jsx(xw,{className:"h-5 w-5","aria-hidden":!0})}),h.jsx("div",{className:"min-w-0 flex-1",children:o})]}),h.jsx("main",{ref:a,className:"relative flex-1 overflow-y-auto",children:i})]})]})}function gS({start:e,search:t,actions:n}){return h.jsxs("header",{className:"relative z-nav flex h-header items-center gap-4 border-b border-border bg-surface-raised px-6",children:[e&&h.jsx("div",{className:"hidden min-w-0 sm:block",children:e}),h.jsx("div",{className:"mx-auto w-full max-w-xl",children:t}),h.jsx("div",{className:"flex items-center gap-3",children:n})]})}function nD({count:e=0,open:t,onClick:n}){const{t:r}=xe(),s=e>0;return h.jsx(fr,{label:s?r("LANG_i18n_app.notificationsUnread",{count:e}):r("LANG_i18n_app.notifications"),size:"lg",onClick:n,"aria-expanded":t,className:t?"bg-surface-sunken":void 0,icon:h.jsx(Ab,{count:e,tone:"accent",children:h.jsx(aw,{className:"h-5 w-5","aria-hidden":!0})})})}function yS({name:e,avatarSrc:t,open:n,onClick:r}){const{t:s}=xe();return h.jsxs("button",{type:"button",onClick:r,"aria-expanded":n,"aria-label":s("LANG_i18n_app.userMenu",{name:e}),className:z("inline-flex flex-none items-center gap-2 rounded-control p-1 text-text-body","hover:bg-surface-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",n&&"bg-surface-sunken"),children:[h.jsx(rd,{name:e,src:t,size:"sm"}),h.jsx(vl,{className:"h-4 w-4 text-text-muted","aria-hidden":!0})]})}function vS({name:e,caption:t,icon:n,onClick:r,collapsed:s=!1,className:o}){const i=Wc(s?`${e} — ${t}`:null,{className:Yj});return h.jsx("button",{type:"button",onClick:r,"aria-label":s?`${e} — ${t}`:void 0,"aria-describedby":i.open?i.id:void 0,...i.handlers,className:z("flex w-full items-center rounded-control border border-border transition-colors hover:bg-surface-sunken","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",s?z(sd.recolhida,"justify-center text-text-muted"):"gap-3 p-3 text-start text-text-body",o),children:s?h.jsxs(h.Fragment,{children:[n,i.card]}):h.jsxs(h.Fragment,{children:[n&&h.jsx("span",{className:"text-text-muted",children:n}),h.jsxs("span",{className:"min-w-0 flex-1",children:[h.jsx("span",{className:"block truncate text-caption font-semibold text-text-strong",children:e}),h.jsx("span",{className:"block truncate text-micro text-text-muted",children:t})]}),h.jsx(dw,{className:"h-4 w-4 shrink-0 text-text-muted","aria-hidden":!0})]})})}function rD({name:e,collapsed:t}){const{t:n}=xe();return h.jsx(vS,{name:e,caption:n("LANG_i18n_app.parentCompany"),icon:h.jsx(mR,{className:"h-5 w-5"}),collapsed:t})}function sD({name:e,isParent:t=!1,isCenter:n=!1,buysVia:r,onClick:s,collapsed:o}){const{t:i}=xe(),a=i(t?"LANG_i18n_app.parentCompany":"LANG_i18n_app.subsidiary"),l=n?i("LANG_i18n_app.centralCaption"):r?i("LANG_i18n_app.buysVia",{name:r}):"";return h.jsx(vS,{name:e,caption:l?`${a} · ${l}`:a,icon:h.jsx(Kc,{className:"h-5 w-5"}),onClick:s,collapsed:o})}const oD=250,l8=600;function iD(e,t=300){const[n,r]=p.useState(e);return p.useEffect(()=>{const s=setTimeout(()=>r(e),t);return()=>clearTimeout(s)},[e,t]),n}const xS=320,wS=.9,bS=240,SS=.9;function aD(e,t,n){const[r,s]=p.useState(null),o=p.useRef(null);return{size:r??e,preview:i=>{const a=n(i);o.current=a,s(a)},commit:()=>{o.current!==null&&o.current!==e&&t(o.current)},reset:()=>{o.current=null,s(null),t(void 0)}}}function lD(e){const t=Ze(u=>u.drawerSideWidth),n=Ze(u=>u.setDrawerSideWidth),r=Ze(u=>u.drawerBottomHeight),s=Ze(u=>u.setDrawerBottomHeight),o=e==="bottom",i=o?r:t,a=o?s:n,l=p.useCallback(u=>Math.round(o?Math.min(window.innerHeight*SS,Math.max(bS,u)):Math.min(window.innerWidth*wS,Math.max(xS,u))),[o]);return aD(i,a,l)}const uD={right:{pos:"top-0 h-full end-0",radius:"rounded-s-drawer",size:"w-full",teto:"max-w-xl",scrim:"bg-overlay",grip:!1},left:{pos:"top-0 h-full start-0",radius:"rounded-e-drawer",size:"w-full",teto:"max-w-xl",scrim:"bg-overlay",grip:!1},bottom:{pos:"bottom-0 start-0 end-0",radius:"rounded-t-drawer",size:"",teto:"max-h-sheet",scrim:"bg-overlay-soft",grip:!0}},cD=16;let fu=0;function dD({open:e,onClose:t,title:n,context:r,children:s,footer:o,side:i="right",sizeClassName:a,fillBody:l=!1}){const{t:u}=xe(),d=p.useRef(null),c=lD(i),f=a===void 0,[g,x]=p.useState(!1),w=p.useRef(!1),b=p.useRef(null);fm(e,t),p.useEffect(()=>{if(e)return fu===0&&(document.body.style.overflow="hidden"),fu+=1,()=>{fu-=1,fu===0&&(document.body.style.overflow="")}},[e]),p.useEffect(()=>{var E;e&&((E=d.current)==null||E.focus())},[e]),p.useEffect(()=>()=>{var E;return(E=b.current)==null?void 0:E.call(b)},[]);const m=p.useCallback(()=>i==="right"!=(document.documentElement.dir==="rtl"),[i]),y=p.useCallback(E=>{if(!f)return;E.preventDefault(),w.current=!0,x(!0),document.body.style.cursor=i==="bottom"?"row-resize":"col-resize",document.body.style.userSelect="none";const k=m(),T=D=>{w.current&&(i==="bottom"?c.preview(window.innerHeight-D.clientY):c.preview(k?window.innerWidth-D.clientX:D.clientX))},P=()=>{w.current=!1,x(!1),document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",T),window.removeEventListener("mouseup",A),b.current=null},A=()=>{P(),c.commit()};b.current=P,window.addEventListener("mousemove",T),window.addEventListener("mouseup",A)},[f,i,c,m]),v=p.useCallback(E=>{var T,P;if(!f)return;const k=c.size??(i==="bottom"?(T=d.current)==null?void 0:T.offsetHeight:(P=d.current)==null?void 0:P.offsetWidth)??0;c.preview(k+(E?1:-1)*cD),c.commit()},[f,c,i]),S=E=>{if(f){if(i==="bottom")if(E.key==="ArrowUp")v(!0);else if(E.key==="ArrowDown")v(!1);else return;else{const k=m();if(E.key===(k?"ArrowLeft":"ArrowRight"))v(!0);else if(E.key===(k?"ArrowRight":"ArrowLeft"))v(!1);else return}E.preventDefault()}};if(!e)return null;const C=uD[i],N=f&&c.size!==void 0?i==="bottom"?{height:c.size}:{width:c.size}:void 0;return Dt.createPortal(h.jsxs("div",{className:"fixed inset-0 z-drawer",children:[h.jsx("div",{className:z("absolute inset-0",C.scrim),onClick:t,"aria-hidden":!0}),h.jsxs("div",{ref:d,role:"dialog","aria-modal":"true",tabIndex:-1,className:z("absolute flex flex-col bg-surface-raised shadow-card focus-visible:outline-none",!g&&"transition-[width,height] duration-200",C.pos,C.radius,a??C.size,!a&&N===void 0&&C.teto),style:N,children:[C.grip&&!f&&h.jsx("div",{className:"flex justify-center pt-3","aria-hidden":!0,children:h.jsx("span",{className:"h-1.5 w-10 rounded-pill bg-border-strong"})}),C.grip&&f&&h.jsx(bi,{as:"div",content:u("LANG_i18n_common.drawerResize"),role:"separator","aria-orientation":"horizontal","aria-valuenow":c.size,"aria-valuemin":bS,"aria-valuemax":Math.round(window.innerHeight*SS),tabIndex:0,onMouseDown:y,onDoubleClick:()=>c.reset(),onKeyDown:S,className:"flex cursor-row-resize justify-center pt-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent",children:h.jsx("span",{"aria-hidden":!0,className:z("h-1.5 w-10 rounded-pill bg-border-strong transition-colors",g&&"bg-accent")})}),f&&i!=="bottom"&&h.jsx(bi,{as:"div",content:u("LANG_i18n_common.drawerResize"),role:"separator","aria-orientation":"vertical","aria-valuenow":c.size,"aria-valuemin":xS,"aria-valuemax":Math.round(window.innerWidth*wS),tabIndex:0,onMouseDown:y,onDoubleClick:()=>c.reset(),onKeyDown:S,className:z("absolute inset-y-0 z-10 w-1.5 cursor-col-resize transition-colors hover:bg-accent/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent",i==="right"?"start-0":"end-0",g&&"bg-accent/40")}),n&&h.jsxs("div",{className:"flex items-start justify-between gap-4 border-b border-border px-6 py-4",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("h2",{className:"text-subtitle text-text-strong",children:n}),r&&h.jsx("p",{className:"mt-0.5 truncate text-caption text-text-muted",children:r})]}),h.jsx(fr,{label:u("LANG_i18n_common.close"),icon:h.jsx(xl,{}),onClick:t})]}),h.jsx("div",{className:z("flex-1 px-6 py-5",l?"flex min-h-0 flex-col overflow-hidden":"overflow-y-auto"),children:l?h.jsx($A,{children:s}):s}),o&&h.jsx("div",{className:"flex justify-end gap-2 border-t border-border px-6 py-4",children:o})]})]}),document.body)}var fD=Object.defineProperty,Fi=(e,t)=>fD(e,"name",{value:t,configurable:!0}),ES=!!(typeof window<"u"&&window.document&&window.document.createElement);function nn(e,t,{checkForDefaultPrevented:n=!0}={}){return Fi(function(s){if(e==null||e(s),n===!1||!s||!s.defaultPrevented)return t==null?void 0:t(s)},"handleEvent")}Fi(nn,"composeEventHandlers");function hD(e){var t;if(!ES)throw new Error("Cannot access window outside of the DOM");return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)??window}Fi(hD,"getOwnerWindow");function Kh(e){if(!ES)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}Fi(Kh,"getOwnerDocument");function _S(e,t=!1){const{activeElement:n}=Kh(e);if(!(n!=null&&n.nodeName))return null;if(CS(n)&&n.contentDocument)return _S(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const s=Kh(n).getElementById(r);if(s)return s}}return n}Fi(_S,"getActiveElement");function CS(e){return e.tagName==="IFRAME"}Fi(CS,"isFrame");var pD=Object.defineProperty,Am=(e,t)=>pD(e,"name",{value:t,configurable:!0});function Wh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Am(Wh,"setRef");function kS(...e){return t=>{let n=!1;const r=e.map(s=>{const o=Wh(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;smD(e,"name",{value:t,configurable:!0});function gD(e,t){const n=p.createContext(t);n.displayName=e+"Context";const r=Ln(o=>{const{children:i,...a}=o,l=p.useMemo(()=>a,Object.values(a));return h.jsx(n.Provider,{value:l,children:i})},"Provider");r.displayName=e+"Provider";function s(o,i={}){const{optional:a=!1}=i,l=p.useContext(n);if(l)return l;if(t!==void 0)return t;if(!a)throw new Error(`\`${o}\` must be used within \`${e}\``)}return Ln(s,"useContext"),[r,s]}Ln(gD,"createContext");function od(e,t=[]){let n=[];function r(o,i){const a=p.createContext(i);a.displayName=o+"Context";const l=n.length;n=[...n,i];const u=Ln(c=>{var m;const{scope:f,children:g,...x}=c,w=((m=f==null?void 0:f[e])==null?void 0:m[l])||a,b=p.useMemo(()=>x,Object.values(x));return h.jsx(w.Provider,{value:b,children:g})},"Provider");u.displayName=o+"Provider";function d(c,f,g={}){var m;const{optional:x=!1}=g,w=((m=f==null?void 0:f[e])==null?void 0:m[l])||a,b=p.useContext(w);if(b)return b;if(i!==void 0)return i;if(!x)throw new Error(`\`${c}\` must be used within \`${o}\``)}return Ln(d,"useContext"),[u,d]}Ln(r,"createContext");const s=Ln(()=>{const o=n.map(i=>p.createContext(i));return Ln(function(a){const l=(a==null?void 0:a[e])||o;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])},"useScope")},"createScope");return s.scopeName=e,[r,RS(s,...t)]}Ln(od,"createContextScope");function RS(...e){const t=e[0];if(e.length===1)return t;const n=Ln(()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return Ln(function(o){const i=r.reduce((a,{useScope:l,scopeName:u})=>{const c=l(o)[`__scope${u}`];return{...a,...c}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}Ln(RS,"composeContextScopes");var yD=Object.defineProperty,Qn=(e,t)=>yD(e,"name",{value:t,configurable:!0});function _i(e){const t=p.forwardRef((n,r)=>{let{children:s,...o}=n,i=null,a=!1;const l=[];qh(s)&&typeof hu=="function"&&(s=hu(s._payload)),p.Children.forEach(s,f=>{var g;if(OS(f)){a=!0;const x=f;let w="child"in x.props?x.props.child:x.props.children;qh(w)&&typeof hu=="function"&&(w=hu(w._payload)),i=xD(x,w),l.push((g=i==null?void 0:i.props)==null?void 0:g.children)}else l.push(f)}),i?i=p.cloneElement(i,void 0,l):!a&&p.Children.count(s)===1&&p.isValidElement(s)&&(i=s);const u=i?LS(i):void 0,d=Gn(r,u);if(!i){if(s||s===0)throw new Error(a?SD(e):bD(e));return s}const c=PS(o,i.props??{});return i.type!==p.Fragment&&(c.ref=r?d:u),p.cloneElement(i,c)});return t.displayName=`${e}.Slot`,t}Qn(_i,"createSlot");var NS=Symbol.for("radix.slottable");function vD(e){const t=Qn(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=NS,t}Qn(vD,"createSlottable");var xD=Qn((e,t)=>{if("child"in e.props){const n=e.props.child;return p.isValidElement(n)?p.cloneElement(n,void 0,e.props.children(n.props.children)):null}return p.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function PS(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{const l=o(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}Qn(PS,"mergeProps");function LS(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Qn(LS,"getElementRef");function OS(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===NS}Qn(OS,"isSlottable");var wD=Symbol.for("react.lazy");function qh(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===wD&&"_payload"in e&&AS(e._payload)}Qn(qh,"isLazyComponent");function AS(e){return typeof e=="object"&&e!==null&&"then"in e}Qn(AS,"isPromiseLike");var bD=Qn(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),SD=Qn(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),hu=hl[" use ".trim().toString()],ED=Object.defineProperty,xt=(e,t)=>ED(e,"name",{value:t,configurable:!0});function TS(e){const t=e+"CollectionProvider",[n,r]=od(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=xt(w=>{const{scope:b,children:m}=w,y=p.useRef(null),v=p.useRef(new Map).current;return h.jsx(s,{scope:b,itemMap:v,collectionRef:y,children:m})},"CollectionProvider");i.displayName=t;const a=e+"CollectionSlot",l=_i(a),u=p.forwardRef((w,b)=>{const{scope:m,children:y}=w,v=o(a,m),S=Gn(b,v.collectionRef);return h.jsx(l,{ref:S,children:y})});u.displayName=a;const d=e+"CollectionItemSlot",c="data-radix-collection-item",f=_i(d),g=p.forwardRef((w,b)=>{const{scope:m,children:y,...v}=w,S=p.useRef(null),C=Gn(b,S),N=o(d,m);return p.useEffect(()=>(N.itemMap.set(S,{ref:S,...v}),()=>void N.itemMap.delete(S))),h.jsx(f,{[c]:"",ref:C,children:y})});g.displayName=d;function x(w){const b=o(e+"CollectionConsumer",w);return p.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const v=Array.from(y.querySelectorAll(`[${c}]`));return Array.from(b.itemMap.values()).sort((N,E)=>v.indexOf(N.ref.current)-v.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return xt(x,"useCollection"),[{Provider:i,Slot:u,ItemSlot:g},x,r]}xt(TS,"createCollection");var $v=new WeakMap,nt,gn,sf=(gn=class extends Map{constructor(n){super(n);oe(this,nt);W(this,nt,[...super.keys()]),$v.set(this,!0)}set(n,r){return $v.get(this)&&(this.has(n)?_(this,nt)[_(this,nt).indexOf(n)]=n:_(this,nt).push(n)),super.set(n,r),this}insert(n,r,s){const o=this.has(r),i=_(this,nt).length,a=Tm(n);let l=a>=0?a:i+a;const u=l<0||l>=i?-1:l;if(u===this.size||o&&u===this.size-1||u===-1)return this.set(r,s),this;const d=this.size+(o?0:1);a<0&&l++;const c=[..._(this,nt)];let f,g=!1;for(let x=l;x=this.size&&(o=this.size-1),this.at(o)}keyFrom(n,r){const s=this.indexOf(n);if(s===-1)return;let o=s+r;return o<0&&(o=0),o>=this.size&&(o=this.size-1),this.keyAt(o)}find(n,r){let s=0;for(const o of this){if(Reflect.apply(n,r,[o,s,this]))return o;s++}}findIndex(n,r){let s=0;for(const o of this){if(Reflect.apply(n,r,[o,s,this]))return s;s++}return-1}filter(n,r){const s=[];let o=0;for(const i of this)Reflect.apply(n,r,[i,o,this])&&s.push(i),o++;return new gn(s)}map(n,r){const s=[];let o=0;for(const i of this)s.push([i[0],Reflect.apply(n,r,[i,o,this])]),o++;return new gn(s)}reduce(...n){const[r,s]=n;let o=0,i=s??this.at(0);for(const a of this)o===0&&n.length===1?i=a:i=Reflect.apply(r,this,[i,a,o,this]),o++;return i}reduceRight(...n){const[r,s]=n;let o=s??this.at(-1);for(let i=this.size-1;i>=0;i--){const a=this.at(i);i===this.size-1&&n.length===1?o=a:o=Reflect.apply(r,this,[o,a,i,this])}return o}toSorted(n){const r=[...this.entries()].sort(n);return new gn(r)}toReversed(){const n=new gn;for(let r=this.size-1;r>=0;r--){const s=this.keyAt(r),o=this.get(s);n.set(s,o)}return n}toSpliced(...n){const r=[...this.entries()];return r.splice(...n),new gn(r)}slice(n,r){const s=new gn;let o=this.size-1;if(n===void 0)return s;n<0&&(n=n+this.size),r!==void 0&&r>0&&(o=r-1);for(let i=n;i<=o;i++){const a=this.keyAt(i),l=this.get(a);s.set(a,l)}return s}every(n,r){let s=0;for(const o of this){if(!Reflect.apply(n,r,[o,s,this]))return!1;s++}return!0}some(n,r){let s=0;for(const o of this){if(Reflect.apply(n,r,[o,s,this]))return!0;s++}return!1}},nt=new WeakMap,xt(gn,"OrderedDict"),gn);function Tu(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=jS(e,t);return n===-1?void 0:e[n]}xt(Tu,"at");function jS(e,t){const n=e.length,r=Tm(t),s=r>=0?r:n+r;return s<0||s>=n?-1:s}xt(jS,"toSafeIndex");function Tm(e){return e!==e||e===0?0:Math.trunc(e)}xt(Tm,"toSafeInteger");function _D(e){const t=e+"CollectionProvider",[n,r]=od(t),[s,o]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new sf,setItemMap:xt(()=>{},"setItemMap")}),i=xt(({state:v,...S})=>v?h.jsx(l,{...S,state:v}):h.jsx(a,{...S}),"CollectionProvider");i.displayName=t;const a=xt(v=>{const S=b();return h.jsx(l,{...v,state:S})},"CollectionInit");a.displayName=t+"Init";const l=xt(v=>{const{scope:S,children:C,state:N}=v,E=p.useRef(null),[k,T]=p.useState(null),P=Gn(E,T),[A,D]=N;return p.useEffect(()=>{if(!k)return;const F=MS(()=>{});return F.observe(k,{childList:!0,subtree:!0}),()=>{F.disconnect()}},[k]),h.jsx(s,{scope:S,itemMap:A,setItemMap:D,collectionRef:P,collectionRefObject:E,collectionElement:k,children:C})},"CollectionProviderImpl");l.displayName=t+"Impl";const u=e+"CollectionSlot",d=_i(u),c=p.forwardRef((v,S)=>{const{scope:C,children:N}=v,E=o(u,C),k=Gn(S,E.collectionRef);return h.jsx(d,{ref:k,children:N})});c.displayName=u;const f=e+"CollectionItemSlot",g="data-radix-collection-item",x=_i(f),w=p.forwardRef((v,S)=>{const{scope:C,children:N,...E}=v,k=p.useRef(null),[T,P]=p.useState(null),A=Gn(S,k,P),D=o(f,C),{setItemMap:F}=D,H=p.useRef(E);DS(H.current,E)||(H.current=E);const le=H.current;return p.useEffect(()=>{const X=le;return F(ne=>T?ne.has(T)?ne.set(T,{...X,element:T}).toSorted(Qh):(ne.set(T,{...X,element:T}),ne.toSorted(Qh)):ne),()=>{F(ne=>!T||!ne.has(T)?ne:(ne.delete(T),new sf(ne)))}},[T,le,F]),h.jsx(x,{[g]:"",ref:A,children:N})});w.displayName=f;function b(){return p.useState(new sf)}xt(b,"useInitCollection");function m(v){const{itemMap:S}=o(e+"CollectionConsumer",v);return S}return xt(m,"useCollection"),[{Provider:i,Slot:c,ItemSlot:w},{createCollectionScope:r,useCollection:m,useInitCollection:b}]}xt(_D,"createCollection");function DS(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n)if(!Object.prototype.hasOwnProperty.call(t,s)||e[s]!==t[s])return!1;return!0}xt(DS,"shallowEqual");function IS(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}xt(IS,"isElementPreceding");function Qh(e,t){return!e[1].element||!t[1].element?0:IS(e[1].element,t[1].element)?-1:1}xt(Qh,"sortByDocumentPosition");function MS(e){return new MutationObserver(n=>{for(const r of n)if(r.type==="childList"){e();return}})}xt(MS,"getChildListObserver");var CD=Object.defineProperty,kD=(e,t)=>CD(e,"name",{value:t,configurable:!0}),RD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],mr=RD.reduce((e,t)=>{const n=_i(`Primitive.${t}`),r=p.forwardRef((s,o)=>{const{asChild:i,...a}=s,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function jm(e,t){e&&Dt.flushSync(()=>e.dispatchEvent(t))}kD(jm,"dispatchDiscreteCustomEvent");var ND=Object.defineProperty,PD=(e,t)=>ND(e,"name",{value:t,configurable:!0});function Ss(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}PD(Ss,"useCallbackRef");var LD=Object.defineProperty,lt=(e,t)=>LD(e,"name",{value:t,configurable:!0}),Xh="dismissableLayer.update",OD="dismissableLayer.pointerDownOutside",AD="dismissableLayer.focusOutside",Bv,Dm=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),TD=p.forwardRef(lt(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:s=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:u,...d}=t,c=p.useContext(Dm),[f,g]=p.useState(null),x=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=p.useState({}),b=Gn(n,g),m=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=y?m.indexOf(y):-1,S=f?m.indexOf(f):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,N=S>=v,E=p.useRef(!1),k=FS(D=>{i==null||i(D),l==null||l(D),D.defaultPrevented||u==null||u()},{ownerDocument:x,deferPointerDownOutside:s,isDeferredPointerDownOutsideRef:E,dismissableSurfaces:c.dismissableSurfaces,shouldHandlePointerDownOutside:p.useCallback(D=>{if(!(D instanceof Node))return!1;const F=[...c.branches].some(H=>H.contains(D));return N&&!F},[c.branches,N])}),T=zS(D=>{if(s&&E.current)return;const F=D.target;[...c.branches].some(le=>le.contains(F))||(a==null||a(D),l==null||l(D),D.defaultPrevented||u==null||u())},x),P=f?S===m.length-1:!1,A=Ss(D=>{D.key==="Escape"&&(o==null||o(D),!D.defaultPrevented&&u&&(D.preventDefault(),u()))});return p.useEffect(()=>{if(P)return x.addEventListener("keydown",A,{capture:!0}),()=>x.removeEventListener("keydown",A,{capture:!0})},[x,P,A]),p.useEffect(()=>{if(f)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Bv=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),Yh(),()=>{r&&(c.layersWithOutsidePointerEventsDisabled.delete(f),c.layersWithOutsidePointerEventsDisabled.size===0&&(x.body.style.pointerEvents=Bv))}},[f,x,r,c]),p.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),Yh())},[f,c]),p.useEffect(()=>{const D=lt(()=>w({}),"handleUpdate");return document.addEventListener(Xh,D),()=>document.removeEventListener(Xh,D)},[]),h.jsx(mr.div,{...d,ref:b,style:{pointerEvents:C?N?"auto":"none":void 0,...t.style},onFocusCapture:nn(t.onFocusCapture,T.onFocusCapture),onBlurCapture:nn(t.onBlurCapture,T.onBlurCapture),onPointerDownCapture:nn(t.onPointerDownCapture,k.onPointerDownCapture)})},"DismissableLayer")),jD=p.forwardRef(lt(function(t,n){const r=p.useContext(Dm),s=p.useRef(null),o=Gn(n,s);return p.useEffect(()=>{const i=s.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),h.jsx(mr.div,{...t,ref:o})},"DismissableLayerBranch"));function DD(){const e=p.useContext(Dm),[t,n]=p.useState(null);return p.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}lt(DD,"useDismissableLayerSurface");var ID=lt(()=>!0,"IS_TRUE");function FS(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:o,shouldHandlePointerDownOutside:i=ID}=t,a=Ss(e),l=p.useRef(!1),u=p.useRef(!1),d=p.useRef(new Map),c=p.useRef(()=>{});return p.useEffect(()=>{function f(){u.current=!1,s.current=!1,d.current.clear()}lt(f,"resetOutsideInteraction");function g(){return Array.from(d.current.values()).some(Boolean)}lt(g,"isOutsideInteractionIntercepted");function x(v){if(!u.current)return;const S=v.target;S instanceof Node&&[...o].some(N=>N.contains(S))||d.current.set(v.type,!0),v.type==="click"&&window.setTimeout(()=>{u.current&&c.current()},0)}lt(x,"handleInteractionCapture");function w(v){u.current&&d.current.set(v.type,!1)}lt(w,"handleInteractionBubble");const b=lt(v=>{if(v.target&&!l.current){let S=function(){n.removeEventListener("click",c.current);const N=g();f(),N||Im(OD,a,C,{discrete:!0})};if(lt(S,"handleAndDispatchPointerDownOutsideEvent"),!i(v.target)){n.removeEventListener("click",c.current),f(),l.current=!1;return}const C={originalEvent:v};u.current=!0,s.current=r&&v.button===0,d.current.clear(),!r||v.button!==0?S():(n.removeEventListener("click",c.current),c.current=S,n.addEventListener("click",c.current,{once:!0}))}else n.removeEventListener("click",c.current),f();l.current=!1},"handlePointerDown"),m=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const v of m)n.addEventListener(v,x,!0),n.addEventListener(v,w);const y=window.setTimeout(()=>{n.addEventListener("pointerdown",b)},0);return()=>{window.clearTimeout(y),n.removeEventListener("pointerdown",b),n.removeEventListener("click",c.current);for(const v of m)n.removeEventListener(v,x,!0),n.removeEventListener(v,w)}},[n,a,r,s,o,i]),{onPointerDownCapture:lt(()=>l.current=!0,"onPointerDownCapture")}}lt(FS,"usePointerDownOutside");function zS(e,t=globalThis==null?void 0:globalThis.document){const n=Ss(e),r=p.useRef(!1);return p.useEffect(()=>{const s=lt(o=>{o.target&&!r.current&&Im(AD,n,{originalEvent:o},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:lt(()=>r.current=!0,"onFocusCapture"),onBlurCapture:lt(()=>r.current=!1,"onBlurCapture")}}lt(zS,"useFocusOutside");function Yh(){const e=new CustomEvent(Xh);document.dispatchEvent(e)}lt(Yh,"dispatchUpdate");function Im(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?jm(s,o):s.dispatchEvent(o)}lt(Im,"handleAndDispatchCustomEvent");var MD=TD,FD=jD,Ci=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},zD=Object.defineProperty,UD=(e,t)=>zD(e,"name",{value:t,configurable:!0}),$D=p.forwardRef(UD(function(t,n){var l;const{container:r,...s}=t,[o,i]=p.useState(!1);Ci(()=>i(!0),[]);const a=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?Dt.createPortal(h.jsx(mr.div,{...s,ref:n}),a):null},"Portal")),BD=Object.defineProperty,Ir=(e,t)=>BD(e,"name",{value:t,configurable:!0});function US(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}Ir(US,"useStateMachine");var VD=Ir(e=>{const{present:t,children:n}=e,r=$S(t),s=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),o=BS(r.ref,VS(s));return typeof n=="function"||r.isPresent?p.cloneElement(s,{ref:o}):null},"Presence");function $S(e){const[t,n]=p.useState(),r=p.useRef(null),s=p.useRef(e),o=p.useRef("none"),i=p.useRef(void 0),a=e?"mounted":"unmounted",[l,u]=US(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{l==="mounted"?(o.current=i.current??Lo(r.current),i.current=void 0):o.current="none"},[l]),Ci(()=>{const d=r.current,c=s.current;if(c!==e){const g=o.current,x=Lo(d);e?(i.current=x,u("MOUNT")):x==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(c&&g!==x?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,u]),Ci(()=>{if(t){let d;const c=t.ownerDocument.defaultView??window,f=Ir(x=>{const b=Lo(r.current).includes(CSS.escape(x.animationName));if(x.target===t&&b&&(u("ANIMATION_END"),!s.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",d=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},"handleAnimationEnd"),g=Ir(x=>{x.target===t&&(o.current=Lo(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback(d=>{if(d){const c=getComputedStyle(d);r.current=c,i.current=Lo(c)}else r.current=null;n(d)},[])}}Ir($S,"usePresence");function Jh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Ir(Jh,"setRef");function BS(...e){const t=p.useRef(e);return t.current=e,p.useCallback(n=>{const r=t.current;let s=!1;const o=r.map(i=>{const a=Jh(i,n);return!s&&typeof a=="function"&&(s=!0),a});if(s)return()=>{for(let i=0;iHD(e,"name",{value:t,configurable:!0}),Vv=hl[" useEffectEvent ".trim().toString()],Hv=hl[" useInsertionEffect ".trim().toString()];function HS(e){if(typeof Vv=="function")return Vv(e);const t=p.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Hv=="function"?Hv(()=>{t.current=e}):Ci(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}GD(HS,"useEffectEvent");var KD=Object.defineProperty,Pl=(e,t)=>KD(e,"name",{value:t,configurable:!0}),WD=hl[" useInsertionEffect ".trim().toString()]||Ci;function GS({prop:e,defaultProp:t,onChange:n=Pl(()=>{},"onChange"),caller:r}){const[s,o,i]=KS({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:s,u=p.useCallback(d=>{var c;if(a){const f=WS(d)?d(e):d;f!==e&&((c=i.current)==null||c.call(i,f))}else o(d)},[a,e,o,i]);return[l,u]}Pl(GS,"useControllableState");function KS({defaultProp:e,onChange:t}){const[n,r]=p.useState(e),s=p.useRef(n),o=p.useRef(t);return WD(()=>{o.current=t},[t]),p.useEffect(()=>{var i;s.current!==n&&((i=o.current)==null||i.call(o,n),s.current=n)},[n,s]),[n,r,o]}Pl(KS,"useUncontrolledState");function WS(e){return typeof e=="function"}Pl(WS,"isFunction");var Gv=Symbol("RADIX:SYNC_STATE");function qD(e,t,n,r){const{prop:s,defaultProp:o,onChange:i,caller:a}=t,l=s!==void 0,u=HS(i),d=[{...n,state:o}];r&&d.push(r);const[c,f]=p.useReducer((b,m)=>{if(m.type===Gv)return{...b,state:m.state};const y=e(b,m);return l&&!Object.is(y.state,b.state)&&u(y.state),y},...d),g=c.state,x=p.useRef(g);p.useEffect(()=>{x.current!==g&&(x.current=g,l||u(g))},[g,x,l]);const w=p.useMemo(()=>s!==void 0?{...c,state:s}:c,[c,s]);return p.useEffect(()=>{l&&!Object.is(s,c.state)&&f({type:Gv,state:s})},[s,c.state,l]),[w,f]}Pl(qD,"useControllableStateReducer");var QD=Object.defineProperty,XD=(e,t)=>QD(e,"name",{value:t,configurable:!0}),YD=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),qS=p.forwardRef(XD(function(t,n){return h.jsx(mr.span,{...t,ref:n,style:{...YD,...t.style}})},"VisuallyHidden")),JD=Object.defineProperty,Ie=(e,t)=>JD(e,"name",{value:t,configurable:!0}),QS="ToastProvider",[Mm,XS,ZD]=TS("Toast"),[YS,u8]=od("Toast",[ZD]),[eI,id]=YS(QS),tI=Ie(e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,announcerContainer:i,children:a}=e,[l,u]=p.useState(null),[d,c]=p.useState(0),f=p.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${QS}\`. Expected non-empty \`string\`.`),h.jsx(Mm.Provider,{scope:t,children:h.jsx(eI,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:d,viewport:l,onViewportChange:u,onToastAdd:p.useCallback(()=>c(g=>g+1),[]),onToastRemove:p.useCallback(()=>c(g=>g-1),[]),isClosePausedRef:f,announcerContainer:i,children:a})})},"ToastProvider"),nI="ToastViewport",rI=["F8"],Zh="toast.viewportPause",ep="toast.viewportResume",sI=p.forwardRef(Ie(function(t,n){const{__scopeToast:r,hotkey:s=rI,label:o="Notifications ({hotkey})",...i}=t,a=id(nI,r),l=XS(r),u=p.useRef(null),d=p.useRef(null),c=p.useRef(null),f=p.useRef(null),g=Gn(n,f,a.onViewportChange),x=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=a.toastCount>0;p.useEffect(()=>{const m=Ie(y=>{var S;s.length!==0&&s.every(C=>y[C]||y.code===C)&&((S=f.current)==null||S.focus())},"handleKeyDown");return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[s]),p.useEffect(()=>{const m=u.current,y=f.current;if(w&&m&&y){const v=Ie(()=>{if(!a.isClosePausedRef.current){const E=new CustomEvent(Zh);y.dispatchEvent(E),a.isClosePausedRef.current=!0}},"handlePause"),S=Ie(()=>{if(a.isClosePausedRef.current){const E=new CustomEvent(ep);y.dispatchEvent(E),a.isClosePausedRef.current=!1}},"handleResume"),C=Ie(E=>{!m.contains(E.relatedTarget)&&S()},"handleFocusOutResume"),N=Ie(()=>{m.contains(document.activeElement)||S()},"handlePointerLeaveResume");return m.addEventListener("focusin",v),m.addEventListener("focusout",C),m.addEventListener("pointermove",v),m.addEventListener("pointerleave",N),window.addEventListener("blur",v),window.addEventListener("focus",S),()=>{m.removeEventListener("focusin",v),m.removeEventListener("focusout",C),m.removeEventListener("pointermove",v),m.removeEventListener("pointerleave",N),window.removeEventListener("blur",v),window.removeEventListener("focus",S)}}},[w,a.isClosePausedRef]);const b=p.useCallback(({tabbingDirection:m})=>{const v=l().map(S=>{const C=S.ref.current,N=[C,...e2(C)];return m==="forwards"?N:N.reverse()});return(m==="forwards"?v.reverse():v).flat()},[l]);return p.useEffect(()=>{const m=f.current;if(m){const y=Ie(v=>{var N,E,k;const S=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!S){const T=document.activeElement,P=v.shiftKey;if(v.target===m&&P){(N=d.current)==null||N.focus();return}const F=b({tabbingDirection:P?"backwards":"forwards"}),H=F.findIndex(le=>le===T);ju(F.slice(H+1))?v.preventDefault():P?(E=d.current)==null||E.focus():(k=c.current)==null||k.focus()}},"handleKeyDown");return m.addEventListener("keydown",y),()=>m.removeEventListener("keydown",y)}},[l,b]),h.jsxs(FD,{ref:u,role:"region","aria-label":o.replace("{hotkey}",x),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&h.jsx(Kv,{ref:d,onFocusFromOutsideViewport:()=>{const m=b({tabbingDirection:"forwards"});ju(m)}}),h.jsx(Mm.Slot,{scope:r,children:h.jsx(mr.ol,{tabIndex:-1,...i,ref:g})}),w&&h.jsx(Kv,{ref:c,onFocusFromOutsideViewport:()=>{const m=b({tabbingDirection:"backwards"});ju(m)}})]})},"ToastViewport")),oI="ToastFocusProxy",Kv=p.forwardRef(Ie(function(t,n){const{__scopeToast:r,onFocusFromOutsideViewport:s,...o}=t,i=id(oI,r);return h.jsx(qS,{tabIndex:0,...o,ref:n,style:{position:"fixed"},onFocus:a=>{var d;const l=a.relatedTarget;!((d=i.viewport)!=null&&d.contains(l))&&s()}})},"ToastFocusProxy")),ad="Toast",iI="toast.swipeStart",aI="toast.swipeMove",lI="toast.swipeCancel",uI="toast.swipeEnd",cI=p.forwardRef(Ie(function(t,n){const{forceMount:r,open:s,defaultOpen:o,onOpenChange:i,...a}=t,[l,u]=GS({prop:s,defaultProp:o??!0,onChange:i,caller:ad});return h.jsx(VD,{present:r||l,children:h.jsx(hI,{open:l,...a,ref:n,onClose:()=>u(!1),onPause:Ss(t.onPause),onResume:Ss(t.onResume),onSwipeStart:nn(t.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:nn(t.onSwipeMove,d=>{const{x:c,y:f}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:nn(t.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:nn(t.onSwipeEnd,d=>{const{x:c,y:f}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),u(!1)})})})},"Toast")),[dI,fI]=YS(ad,{onClose(){}}),hI=p.forwardRef(Ie(function(t,n){const{__scopeToast:r,type:s="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:l,onPause:u,onResume:d,onSwipeStart:c,onSwipeMove:f,onSwipeCancel:g,onSwipeEnd:x,...w}=t,b=id(ad,r),m=XS(r),[y,v]=p.useState(null),S=Gn(n,v),C=p.useRef(null),N=p.useRef(null),E=o||b.duration,k=p.useRef(0),T=p.useRef(E),P=p.useRef(0),{onToastAdd:A,onToastRemove:D}=b,F=Ss(()=>{var ne;(y==null?void 0:y.contains(document.activeElement))&&((ne=b.viewport)==null||ne.focus()),a()}),H=p.useCallback(X=>{!X||X===1/0||(window.clearTimeout(P.current),k.current=new Date().getTime(),P.current=window.setTimeout(F,X))},[F]);p.useEffect(()=>{const X=b.viewport;if(X){const ne=Ie(()=>{H(T.current),d==null||d()},"handleResume"),I=Ie(()=>{const V=new Date().getTime()-k.current;T.current=T.current-V,window.clearTimeout(P.current),u==null||u()},"handlePause");return X.addEventListener(Zh,I),X.addEventListener(ep,ne),()=>{X.removeEventListener(Zh,I),X.removeEventListener(ep,ne)}}},[b.viewport,E,u,d,H]),p.useEffect(()=>{i&&!b.isClosePausedRef.current&&H(E)},[i,E,b.isClosePausedRef,H]),p.useEffect(()=>()=>{window.clearTimeout(P.current)},[]),p.useEffect(()=>(A(),()=>D()),[A,D]);const le=p.useMemo(()=>y?Fm(y):null,[y]);return b.viewport?h.jsxs(h.Fragment,{children:[le&&h.jsx(pI,{__scopeToast:r,role:"status","aria-live":s==="foreground"?"assertive":"polite",children:le}),h.jsx(dI,{scope:r,onClose:F,children:Dt.createPortal(h.jsx(Mm.ItemSlot,{scope:r,children:h.jsx(MD,{asChild:!0,onEscapeKeyDown:nn(l,X=>{m().some(I=>{var V;return(V=I.ref.current)==null?void 0:V.contains(X.target)})||F()}),children:h.jsx(mr.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":b.swipeDirection,...w,ref:S,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:nn(t.onKeyDown,X=>{X.key==="Escape"&&(l==null||l(X.nativeEvent),X.nativeEvent.defaultPrevented||F())}),onPointerDown:nn(t.onPointerDown,X=>{X.button===0&&(C.current={x:X.clientX,y:X.clientY})}),onPointerMove:nn(t.onPointerMove,X=>{if(!C.current)return;const ne=X.clientX-C.current.x,I=X.clientY-C.current.y,V=!!N.current,G=["left","right"].includes(b.swipeDirection),Y=["left","up"].includes(b.swipeDirection)?Math.min:Math.max,ce=G?Y(0,ne):0,Pe=G?0:Y(0,I),Re=X.pointerType==="touch"?10:2,Ae={x:ce,y:Pe},re={originalEvent:X,delta:Ae};V?(N.current=Ae,ya(aI,f,re,{discrete:!1})):Wv(Ae,b.swipeDirection,Re)?(N.current=Ae,ya(iI,c,re,{discrete:!1}),X.target.setPointerCapture(X.pointerId)):(Math.abs(ne)>Re||Math.abs(I)>Re)&&(C.current=null)}),onPointerUp:nn(t.onPointerUp,X=>{const ne=N.current,I=X.target;if(I.hasPointerCapture(X.pointerId)&&I.releasePointerCapture(X.pointerId),N.current=null,C.current=null,ne){const V=X.currentTarget,G={originalEvent:X,delta:ne};Wv(ne,b.swipeDirection,b.swipeThreshold)?ya(uI,x,G,{discrete:!0}):ya(lI,g,G,{discrete:!0}),V.addEventListener("click",Y=>Y.preventDefault(),{once:!0})}})})})}),b.viewport)})]}):null},"ToastImpl")),pI=Ie(e=>{const{__scopeToast:t,children:n,...r}=e,s=id(ad,t),[o,i]=p.useState(!1),[a,l]=p.useState(!1);return JS(()=>i(!0)),p.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:h.jsx($D,{asChild:!0,container:s.announcerContainer||void 0,children:h.jsx(qS,{...r,children:o&&h.jsxs(h.Fragment,{children:[s.label," ",n]})})})},"ToastAnnounce"),mI=p.forwardRef(Ie(function(t,n){const{__scopeToast:r,...s}=t;return h.jsx(mr.div,{...s,ref:n})},"ToastTitle")),gI=p.forwardRef(Ie(function(t,n){const{__scopeToast:r,...s}=t;return h.jsx(mr.div,{...s,ref:n})},"ToastDescription")),yI="ToastClose",vI=p.forwardRef(Ie(function(t,n){const{__scopeToast:r,...s}=t,o=fI(yI,r);return h.jsx(xI,{asChild:!0,children:h.jsx(mr.button,{type:"button",...s,ref:n,onClick:nn(t.onClick,o.onClose)})})},"ToastClose")),xI=p.forwardRef(Ie(function(t,n){const{__scopeToast:r,altText:s,...o}=t;return h.jsx(mr.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...o,ref:n})},"ToastAnnounceExclude"));function Fm(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),ZS(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Fm(r))}}),t}Ie(Fm,"getAnnounceTextContent");function ya(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?jm(s,o):s.dispatchEvent(o)}Ie(ya,"handleAndDispatchCustomEvent");var Wv=Ie((e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n},"isDeltaInDirection");function JS(e=()=>{}){const t=Ss(e);Ci(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}Ie(JS,"useNextFrame");function ZS(e){return e.nodeType===e.ELEMENT_NODE}Ie(ZS,"isHTMLElement");function e2(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Ie(r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}Ie(e2,"getTabbableCandidates");function ju(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}Ie(ju,"focusFirst");var wI=tI,bI=sI,SI=cI,EI=mI,_I=gI,CI=vI;function t2(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`id-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}const Aa=Cl(e=>({toasts:[],add:t=>e(n=>({toasts:[...n.toasts,{...t,id:t2()}]})),remove:t=>e(n=>({toasts:n.toasts.filter(r=>r.id!==t)}))}));function Du(e){var t,n;if(e!=null){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(r=>typeof r=="object"&&r!==null&&"msg"in r?String(r.msg):String(r)).join(", ");if(typeof e=="object"){const r=e,s=(n=(t=r.response)==null?void 0:t.data)==null?void 0:n.detail;if(s!=null)return Du(s);if(typeof r.message=="string")return r.message}return String(e)}}const xn={success:(e,t)=>Aa.getState().add({title:e,description:Du(t),type:"success"}),error:(e,t)=>Aa.getState().add({title:e,description:Du(t),type:"error"}),info:(e,t,n)=>Aa.getState().add({title:e,description:Du(t),type:"info",...n})},qv={success:4e3,error:9e3,info:5e3},kI={success:h.jsx(ER,{className:"h-5 w-5 text-success","aria-hidden":!0}),error:h.jsx(SR,{className:"h-5 w-5 text-danger","aria-hidden":!0}),info:h.jsx(pw,{className:"h-5 w-5 text-accent","aria-hidden":!0})},Qv=["F8"];function RI(){const{toasts:e}=Aa(),t=e.filter(r=>r.place==="topo"),n=e.filter(r=>r.place!=="topo");return h.jsxs(h.Fragment,{children:[h.jsx(Xv,{itens:t,labelKey:"LANG_i18n_app.toastRegionNotifications",viewport:"fixed end-4 top-20 z-toast flex flex-col gap-2 outline-none focus-visible:ring-2 focus-visible:ring-accent"}),h.jsx(Xv,{itens:n,labelKey:"LANG_i18n_app.toastRegionFeedback",viewport:"fixed bottom-4 end-4 z-toast flex flex-col gap-2 outline-none focus-visible:ring-2 focus-visible:ring-accent"})]})}function Xv({itens:e,viewport:t,labelKey:n}){const{remove:r}=Aa(),{t:s}=xe();return h.jsxs(wI,{swipeDirection:"right",children:[e.map(o=>{const i=o.onOpen?"button":"div";return h.jsxs(SI,{defaultOpen:!0,onOpenChange:a=>{a||r(o.id)},duration:qv[o.type],type:o.type==="error"?"foreground":"background",className:z("toast-card relative flex w-80 max-w-[calc(100vw-2rem)] items-start gap-3","overflow-hidden rounded-card border border-border bg-surface-raised p-4 shadow-card","data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)]","data-[swipe=cancel]:translate-x-0"),children:[o.avatar?h.jsx(rd,{name:o.actor??"",src:o.avatar,alt:"",className:"h-9 w-9"}):kI[o.type],h.jsxs(i,{...o.onOpen?{type:"button",onClick:()=>{var a;(a=o.onOpen)==null||a.call(o),r(o.id)}}:{},className:z("min-w-0 flex-1 text-start",o.onOpen&&"cursor-pointer rounded-control focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"),children:[h.jsx(EI,{className:"text-caption font-medium text-text-strong",children:o.title}),o.description&&h.jsx(_I,{className:"mt-0.5 break-words text-micro text-text-muted",children:o.description})]}),h.jsx(CI,{asChild:!0,children:h.jsx("button",{type:"button","aria-label":s("LANG_i18n_common.close"),className:"rounded-control text-text-muted hover:text-text-body focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:h.jsx(xl,{className:"h-4 w-4","aria-hidden":!0})})}),h.jsx("span",{"aria-hidden":!0,className:z("toast-progress absolute inset-x-0 bottom-0 h-0.5",o.type==="error"?"bg-danger":o.type==="success"?"bg-success":"bg-accent"),style:{animationDuration:`${qv[o.type]}ms`}})]},o.id)}),h.jsx(bI,{className:t,label:s(n,{hotkey:Qv.join("+")}),hotkey:Qv})]})}function NI({dirty:e,saving:t,onSave:n,onReset:r,message:s}){const{t:o}=xe();return e?h.jsx("div",{role:"region","aria-label":o("LANG_i18n_common.dirtyBar.unsaved"),className:"fixed bottom-4 start-1/2 z-dirtybar -translate-x-1/2 rtl:translate-x-1/2",children:h.jsxs("div",{className:"flex items-center gap-2 rounded-card border border-accent bg-surface-raised px-3 py-2 shadow-card lg:gap-3 lg:px-4 lg:py-3",children:[h.jsx("span",{className:"hidden text-micro text-text-body lg:inline",children:s??o("LANG_i18n_common.dirtyBar.unsaved")}),r&&h.jsx(dr,{size:"sm",variant:"outlined",disabled:t,onClick:r,children:o("LANG_i18n_common.dirtyBar.discard")}),h.jsx(dr,{size:"sm",disabled:t,icon:h.jsx(bw,{}),onClick:n,children:o(t?"LANG_i18n_common.dirtyBar.saving":"LANG_i18n_common.dirtyBar.save")})]})}):null}function PI(e){return p.useContext(Li)?h.jsx(LI,{...e}):null}function LI(e){return h.jsx(h.Fragment,{children:OI(e)})}function OI({dirty:e,title:t,description:n,confirmLabel:r}){const{t:s}=xe(),[o,i]=Nb(),a=Mk(({currentLocation:l,nextLocation:u})=>e&&l.pathname!==u.pathname);return p.useEffect(()=>{a.state==="blocked"&&(async()=>{var u,d;await i({title:t??s("LANG_i18n_common.closeGuard.title"),message:n??s("LANG_i18n_common.navGuard.description"),confirmLabel:r??s("LANG_i18n_common.closeGuard.discard"),danger:!0})?(u=a.proceed)==null||u.call(a):(d=a.reset)==null||d.call(a)})()},[a,i,r,n,s,t]),p.useEffect(()=>{if(!e)return;const l=u=>u.preventDefault();return window.addEventListener("beforeunload",l),()=>window.removeEventListener("beforeunload",l)},[e]),o}const n2=p.createContext(null);function AI({children:e}){const{t}=xe(),[n,r]=p.useState({}),s=p.useCallback(c=>{r(f=>({...f,[c.id]:c}))},[]),o=p.useCallback(c=>{r(f=>{if(!(c in f))return f;const g={...f};return delete g[c],g})},[]),i=p.useMemo(()=>({register:s,unregister:o}),[s,o]),a=Object.values(n).filter(c=>c.dirty),l=Object.values(n).some(c=>c.saving),u=async()=>{await Promise.allSettled(a.map(c=>Promise.resolve(c.onSave())))},d=()=>a.forEach(c=>{var f;return(f=c.onReset)==null?void 0:f.call(c)});return h.jsxs(n2.Provider,{value:i,children:[e,h.jsx(PI,{dirty:a.length>0}),h.jsx(NI,{dirty:a.length>0,saving:l,onSave:u,onReset:d,message:t("LANG_i18n_common.dirtyBar.unsavedCount",{count:a.length})})]})}function c8(e){const t=p.useContext(n2),n=p.useRef(e);n.current=e,p.useEffect(()=>{if(t)return t.register({id:e.id,dirty:e.dirty,saving:e.saving,onSave:()=>n.current.onSave(),onReset:n.current.onReset?()=>{var r,s;return(s=(r=n.current).onReset)==null?void 0:s.call(r)}:void 0}),()=>t.unregister(e.id)},[t,e.id,e.dirty,e.saving])}const tp="/platform",d8="platform.i18n.";function TI(){if(typeof window>"u")return!1;const{pathname:e,search:t}=window.location;return new URLSearchParams(t).get("platform")==="1"?!0:Dr(e,tp)}function jI(){if(typeof window>"u")return;const{pathname:e,search:t}=window.location;if(new URLSearchParams(t).get("platform")==="1"){if(Dr(e,tp)){window.history.replaceState(null,"",e);return}window.history.replaceState(null,"",tp)}}const Yv="chunk_reload_at",DI=1e4;async function II(e){try{return await e()}catch(t){const n=Number(sessionStorage.getItem(Yv)||0);if(Date.now()-n>DI)return sessionStorage.setItem(Yv,String(Date.now())),window.location.reload(),new Promise(()=>{});throw t}}function B(e){return p.lazy(()=>II(e))}const zm=["profile-sessions"],r2=["profile"];function np(e,t){const n=t?`?v=${t}`:"";return`/api/v1/profile/avatar/${e}${n}`}function MI(){return kt({queryKey:r2,queryFn:async()=>(await ie.get("/api/v1/profile/")).data})}function s2(){const e=Dn(),t=(n,{resolveSystem:r=!1}={})=>{e.setQueryData(r2,n),kb({theme:n.theme,language:n.language},{resolveSystem:r}),Qt.getState().bootstrap()};return{update:He({mutationFn:async n=>(await ie.put("/api/v1/profile/",n)).data,onSuccess:n=>{t(n,{resolveSystem:!0}),xn.success(ye.t("LANG_i18n_common.saved"))},onError:n=>xn.error(ye.t("LANG_i18n_common.saveFailed"),n)}),updateSilently:He({mutationFn:async n=>(await ie.put("/api/v1/profile/",n)).data,onSuccess:n=>t(n),onError:n=>xn.error(ye.t("LANG_i18n_common.saveFailed"),n)}),changePassword:He({mutationFn:async n=>(await ie.post("/api/v1/profile/password",n)).data,onSuccess:()=>void e.invalidateQueries({queryKey:zm})}),uploadAvatar:He({mutationFn:async n=>{const r=new FormData;return r.append("file",n),(await ie.post("/api/v1/profile/avatar",r)).data},onSuccess:n=>{t(n),xn.success(ye.t("LANG_i18n_common.saved"))},onError:n=>xn.error(ye.t("LANG_i18n_common.saveFailed"),n)}),removeAvatar:He({mutationFn:async()=>(await ie.delete("/api/v1/profile/avatar")).data,onSuccess:n=>t(n)})}}function f8(){return kt({queryKey:zm,queryFn:async()=>(await ie.get("/api/v1/profile/sessions")).data})}function h8(){const e=Dn(),t=n=>e.setQueryData(zm,n);return{revoke:He({mutationFn:async n=>(await ie.delete(`/api/v1/profile/sessions/${n}`)).data,onSuccess:t}),revokeOthers:He({mutationFn:async()=>(await ie.delete("/api/v1/profile/sessions")).data,onSuccess:t})}}const of=255,o2=180,i2=420,Jv=e=>Math.min(i2,Math.max(o2,Math.round(e)));function a2(e,t){const[n,r]=p.useState(null),s=p.useRef(null),o=typeof e=="number"?Jv(e):of,i=n??o,a=u=>{const d=Jv(u);s.current=d,r(d)},l=u=>{u!==e&&t(u)};return{width:i,min:o2,max:i2,preview:a,commit:()=>{s.current!==null&&l(s.current)},reset:()=>{s.current=null,r(of),l(of)}}}function FI(){const{data:e}=MI(),{updateSilently:t}=s2();return a2(e==null?void 0:e.sidebar_width,n=>{t.mutateAsync({sidebar_width:n})})}function zI(){const e=Ze(n=>n.sidebarWidth),t=Ze(n=>n.setSidebarWidth);return a2(e,t)}const ua="/api/v1/platform/auth",ld=Cl((e,t)=>({status:"loading",admin:null,needsBootstrap:!1,bootstrapProbe:async()=>{try{const{data:n}=await ie.get(`${ua}/needs-bootstrap`);e({needsBootstrap:n.needs_bootstrap})}catch{e({needsBootstrap:!1})}},createFirst:async(n,r,s)=>{await ie.post(`${ua}/bootstrap`,{email:n,name:r,password:s}),e({needsBootstrap:!1}),await t().login(n,s)},login:async(n,r)=>{const{data:s}=await ie.post(`${ua}/login`,{email:n,password:r});e({status:"authenticated",admin:s})},logout:async()=>{try{await ie.post(`${ua}/logout`)}finally{e({status:"anonymous",admin:null})}},hydrate:async()=>{try{const{data:n}=await ie.get(`${ua}/me`);e({status:"authenticated",admin:n})}catch{e({status:"anonymous",admin:null}),await t().bootstrapProbe()}},markUnauthenticated:()=>{t().status!=="anonymous"&&e({status:"anonymous",admin:null})}})),UI=Object.freeze(Object.defineProperty({__proto__:null,usePlatformAuthStore:ld},Symbol.toStringTag,{value:"Module"}));function $I(){const e=ld(n=>n.status),t=un();return e==="loading"?h.jsx("div",{className:"grid h-screen place-items-center text-text-muted",children:"…"}):e==="anonymous"?h.jsx(el,{to:"/platform/login",replace:!0,state:{from:t.pathname}}):h.jsx(Gc,{})}function BI(){const{t:e}=xe(),{admin:t,logout:n}=ld(),r=zI(),[s,o]=p.useState(!1),i=[{label:e("LANG_i18n_platform.nav.group"),items:[{label:e("LANG_i18n_platform.overview.title"),to:"/platform",end:!0,icon:gw},{label:e("LANG_i18n_platform.tenants.title"),to:"/platform/tenants",icon:Kc},{label:e("LANG_i18n_platform.branding.title"),to:"/platform/branding",icon:ww},{label:e("LANG_i18n_platform.i18n.strings"),to:"/platform/i18n",icon:DR},{label:e("LANG_i18n_platform.i18n.languages"),to:"/platform/languages",icon:mw},{label:e("LANG_i18n_platform.migrations.title"),to:"/platform/db-migrations",icon:NR},{label:e("LANG_i18n_platform.audit.title"),to:"/platform/audit",icon:Sw},{label:e("LANG_i18n_platform.maintenance.title"),to:"/platform/maintenance",icon:Cw}]}];return h.jsxs(h.Fragment,{children:[h.jsx(mS,{brand:a=>h.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[h.jsx(lS,{withWordmark:!a}),!a&&h.jsx("span",{className:"text-overline text-text-muted",children:e("LANG_i18n_platform.shellTag")})]}),nav:i,sidebarResize:r,sidebarToggle:!1,topbar:h.jsx(gS,{start:h.jsx(hS,{}),actions:h.jsxs(h.Fragment,{children:[h.jsx(Vj,{compact:!0}),h.jsx(uS,{}),h.jsx(vo,{align:"end",widthClassName:"w-popover-md",trigger:({open:a,toggle:l})=>h.jsx(yS,{name:(t==null?void 0:t.name)??"?",open:a,onClick:l}),children:({close:a})=>h.jsxs("div",{className:"py-1",children:[h.jsxs("div",{className:"flex items-center gap-3 border-b border-border px-4 py-3",children:[h.jsx(rd,{name:(t==null?void 0:t.name)??"?"}),h.jsxs("span",{className:"min-w-0",children:[h.jsx("span",{className:"block truncate text-caption font-medium text-text-strong",children:t==null?void 0:t.name}),h.jsx("span",{className:"block truncate text-micro text-text-muted",children:t==null?void 0:t.email})]})]}),h.jsxs("button",{type:"button",className:xs,onClick:()=>{a(),o(!0)},children:[h.jsx(wh,{className:"h-4 w-4","aria-hidden":!0}),e("LANG_i18n_platform.password.action")]}),h.jsxs("button",{type:"button",onClick:()=>void n(),className:xs,children:[h.jsx(yw,{className:"h-4 w-4","aria-hidden":!0}),e("LANG_i18n_app.logout")]})]})})]})}),children:h.jsx(AI,{children:h.jsx(Gc,{})})}),h.jsx(VI,{open:s,onClose:()=>o(!1)})]})}function VI({open:e,onClose:t}){const{t:n}=xe(),[r,s]=p.useState(""),[o,i]=p.useState(""),[a,l]=p.useState(!1),u=()=>{s(""),i(""),t()},{handleClose:d,confirmUI:c}=zA({isDirty:!!(r||o),onClose:u}),f=async()=>{l(!0);try{await ie.post("/api/v1/platform/auth/me/change-password",{current_password:r,new_password:o}),xn.success(n("LANG_i18n_platform.password.done")),s(""),i(""),t()}catch(g){xn.error(n("LANG_i18n_common.saveFailed"),g)}finally{l(!1)}};return h.jsxs(hm,{open:e,onClose:d,title:n("LANG_i18n_platform.password.action"),size:"sm",children:[h.jsxs("div",{className:"space-y-4",children:[h.jsx(zy,{label:n("LANG_i18n_platform.password.current"),children:h.jsx(Uy,{type:"password",autoComplete:"current-password",value:r,onChange:g=>s(g.target.value)})}),h.jsx(zy,{label:n("LANG_i18n_platform.password.next"),hint:n("LANG_i18n_platform.login.passwordHint"),children:h.jsx(Uy,{type:"password",autoComplete:"new-password",value:o,onChange:g=>i(g.target.value)})}),h.jsx("p",{className:"text-micro text-text-muted",children:n("LANG_i18n_platform.password.revokesOthers")}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsx(dr,{variant:"outlined",onClick:d,children:n("LANG_i18n_common.cancel")}),h.jsx(dr,{icon:h.jsx(bw,{}),onClick:()=>void f(),loading:a,disabled:!r||!o,children:n("LANG_i18n_common.save")})]})]}),c]})}const HI=B(()=>$(()=>import("./PlatformLoginPage-CX1Ly_Nf.js"),__vite__mapDeps([0,1]))),GI=B(()=>$(()=>import("./OverviewPage-BBYwpqbx.js"),__vite__mapDeps([2,3,4,5,6,7,8,9,10,11,12,13]))),KI=B(()=>$(()=>import("./TenantsPage-D9pIGSxW.js"),__vite__mapDeps([14,7,3,13,15,16,17,18,11,1,19,20,21,22,23,24,25,26,27]))),WI=B(()=>$(()=>import("./BrandingPage-BojwZcBL.js"),__vite__mapDeps([28,3,7,29,30,31,32,25,11]))),qI=B(()=>$(()=>import("./StringsPage-Cnit_nsG.js"),__vite__mapDeps([33,30,7,34,3,13,11,12,35,36]))),QI=B(()=>$(()=>import("./LanguagesPage-CXPBl5yi.js"),__vite__mapDeps([37,7,34,3,13,11,12,35,15,25,27]))),XI=B(()=>$(()=>import("./AuditPage-DdAwfh8t.js"),__vite__mapDeps([12,3,13,7,11]))),YI=B(()=>$(()=>import("./MaintenancePage-DZml9Lhb.js"),__vite__mapDeps([38,3,1,7,11]))),JI=B(()=>$(()=>import("./DbMigrationsPage-DQQpeCz9.js"),__vite__mapDeps([39,3,13,7]))),ZI=sw([{path:"/platform/login",element:h.jsx(HI,{})},{element:h.jsx($I,{}),children:[{path:"/platform",element:h.jsx(BI,{}),children:[{index:!0,element:h.jsx(GI,{})},{path:"tenants",element:h.jsx(KI,{})},{path:"branding",element:h.jsx(WI,{})},{path:"i18n",element:h.jsx(qI,{})},{path:"languages",element:h.jsx(QI,{})},{path:"audit",element:h.jsx(XI,{})},{path:"maintenance",element:h.jsx(YI,{})},{path:"db-migrations",element:h.jsx(JI,{})}]}]},{path:"*",element:h.jsx(el,{to:"/platform",replace:!0})}]),eM=6e4;function l2(e=!1){const t=Qt(n=>n.activeCompanyId);return kt({queryKey:["notifications",t,e],queryFn:async()=>(await ie.get("/api/v1/notifications/",{params:{unread_only:e,page_size:50}})).data,refetchInterval:eM,staleTime:0})}function u2(){const e=Dn(),t=()=>void e.invalidateQueries({queryKey:["notifications"]});return{markRead:He({mutationFn:async n=>(await ie.post(`/api/v1/notifications/${n}/read`)).data,onSuccess:t}),markAllRead:He({mutationFn:async()=>(await ie.post("/api/v1/notifications/read-all")).data,onSuccess:t})}}function p8(){const e=Qt(t=>t.activeCompanyId);return kt({queryKey:["notification-preferences",e],queryFn:async()=>(await ie.get("/api/v1/notifications/preferences")).data})}function m8(){const e=Dn(),t=Qt(n=>n.activeCompanyId);return{save:He({mutationFn:async n=>(await ie.put("/api/v1/notifications/preferences",{channels:n})).data,onSuccess:n=>{e.setQueryData(["notification-preferences",t],n)}})}}const rp=6e4,sp=60*rp,_c=24*sp,tM=7*_c;function nM(e,t,n=Date.now()){const r=Date.parse(e);if(Number.isNaN(r))return"";const s=n-r;return s0?t("LANG_i18n_time.inDays",{count:u}):t("LANG_i18n_time.daysAgo",{count:-u})}function rM({notification:e,onRead:t,onNavigate:n}){const{t:r}=xe(),s=go(),o=()=>{e.is_read||t(e.id),e.link&&(s(e.link),n==null||n())};return h.jsxs("button",{type:"button",onClick:o,className:z("flex w-full gap-3 px-4 py-3 text-start hover:bg-surface-sunken","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent",!e.is_read&&"bg-accent-soft"),children:[h.jsx(Fh,{className:z("mt-1.5",e.is_read?"bg-transparent":"bg-accent")}),h.jsxs("span",{className:"min-w-0 flex-1",children:[h.jsxs("span",{className:"flex items-baseline justify-between gap-2",children:[h.jsx("span",{className:z("truncate text-caption",e.is_read?"text-text-body":"font-medium text-text-strong"),children:e.title}),h.jsx("span",{className:"shrink-0 text-micro text-text-muted",children:nM(e.created_at,r)})]}),h.jsx("span",{className:"mt-0.5 block text-caption text-text-muted",children:e.body}),e.actor_name&&h.jsx("span",{className:"mt-1 block text-micro text-text-muted",children:e.actor_name})]})]})}function sM(){const{t:e}=xe(),{data:t,isLoading:n}=l2(),{markRead:r,markAllRead:s}=u2(),o=(t==null?void 0:t.unread)??0,i=((t==null?void 0:t.items)??[]).slice(0,8);return h.jsx(vo,{align:"end",trigger:({open:a,toggle:l})=>h.jsx(nD,{count:o,open:a,onClick:l}),children:({close:a})=>h.jsxs("div",{className:"flex max-h-popover flex-col",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-border px-4 py-3",children:[h.jsx("h2",{className:"text-caption font-semibold text-text-strong",children:e("LANG_i18n_app.notifications")}),o>0&&h.jsx(dr,{size:"sm",variant:"ghost",icon:h.jsx(wR,{}),disabled:s.isPending,onClick:()=>s.mutate(),children:e("LANG_i18n_notificationsUi.markAllRead")})]}),h.jsx("div",{className:"min-h-0 flex-1 divide-y divide-border overflow-y-auto",children:n?h.jsx("p",{className:"px-4 py-6 text-caption text-text-muted",children:e("LANG_i18n_common.loading")}):i.length===0?h.jsx("div",{className:"px-4 py-6",children:h.jsx(yP,{title:e("LANG_i18n_notificationsUi.empty"),description:e("LANG_i18n_notificationsUi.emptyDesc")})}):i.map(l=>h.jsx(rM,{notification:l,onRead:u=>r.mutate(u),onNavigate:a},l.id))}),h.jsx("div",{className:"border-t border-border px-4 py-2 text-center",children:h.jsx(lo,{to:"/notifications",onClick:a,className:z(zh,"text-caption"),children:e("LANG_i18n_notificationsUi.seeAll")})})]})})}const oM=6e4;function iM({state:e,rfqId:t,poId:n,ncId:r,page:s=1,pageSize:o=20}={}){const i=Qt(l=>l.activeCompanyId),a=new URLSearchParams({page:String(s),page_size:String(o)});return e&&a.set("state",e),t&&a.set("rfq_id",t),n&&a.set("po_id",n),r&&a.set("nc_id",r),kt({queryKey:["inbox",i,e,t,n,r,s,o],queryFn:async()=>(await ie.get(`/api/v1/inbound-emails/?${a}`)).data,refetchInterval:oM})}function y8(){const e=Dn(),t=()=>{for(const n of["inbox","rfq","nc"])e.invalidateQueries({queryKey:[n]})};return{link:He({mutationFn:({id:n,rfqId:r,ncId:s})=>ie.post(`/api/v1/inbound-emails/${n}/link`,s?{nc_id:s}:{rfq_id:r}),onSuccess:t}),markRead:He({mutationFn:n=>ie.post(`/api/v1/inbound-emails/${n}/read`,{}),onSuccess:t}),ignore:He({mutationFn:n=>ie.post(`/api/v1/inbound-emails/${n}/ignore`,{}),onSuccess:t})}}function v8(){return He({mutationFn:async()=>(await ie.post("/api/v1/inbound-emails/settings/imap/test",{})).data})}function aM(){const{t:e}=xe(),t=go(),{data:n}=iM({state:"por_associar",pageSize:1}),r=(n==null?void 0:n.unlinked)??0;return r===0?null:h.jsx(fr,{label:e("LANG_i18n_inbox.pendingCount",{count:r}),size:"lg",onClick:()=>t("/rfqs-inbox"),icon:h.jsx(Ab,{count:r,children:h.jsx(vw,{className:"h-5 w-5","aria-hidden":!0})})})}function lM(){const{data:e}=l2(),t=go(),{markRead:n}=u2(),r=Dn(),s=p.useRef(null);return p.useEffect(()=>{if(!e)return;const o=e.items.map(a=>a.id);if(s.current===null){s.current=new Set(o);return}const i=e.items.filter(a=>!s.current.has(a.id));for(const a of i)s.current.add(a.id),!a.is_read&&xn.info(a.title,a.body,{place:"topo",...a.actor_id?{avatar:np(a.actor_id),actor:a.actor_name}:{},...a.link?{onOpen:()=>{a.is_read||n.mutate(a.id),t(a.link)}}:{}});i.length>0&&r.invalidateQueries({predicate:a=>a.queryKey[0]!=="notifications"}),s.current=new Set([...s.current].filter(a=>o.includes(a)))},[e]),null}function x8(){return kt({queryKey:["public-tenants"],queryFn:async()=>(await ie.get("/api/v1/public/tenants")).data,staleTime:5*6e4})}function uM(e){return kt({queryKey:["login-policy",e],queryFn:async()=>(await ie.get("/api/v1/auth/login-policy")).data})}const ho="/api/v1/auth/webauthn";function c2(){return typeof window<"u"&&!!window.PublicKeyCredential}async function w8(){if(!c2())return!1;const e=window.PublicKeyCredential.isConditionalMediationAvailable;return typeof e=="function"&&await e.call(window.PublicKeyCredential)}function Ta(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=atob(t.padEnd(t.length+(4-t.length%4)%4,"=")),r=new Uint8Array(n.length);for(let s=0;s({...n,type:"public-key",id:Ta(n.id)}))}}}function dM(e,t,n){const r=e;return{mediation:t,signal:n,publicKey:{...r,challenge:Ta(r.challenge),allowCredentials:(r.allowCredentials??[]).map(s=>({...s,type:"public-key",id:Ta(s.id)}))}}}function d2(e){const t=e.response,n={id:e.id,rawId:Ls(e.rawId),type:e.type,clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:e.authenticatorAttachment};return"attestationObject"in t&&t.attestationObject?n.response={clientDataJSON:Ls(t.clientDataJSON),attestationObject:Ls(t.attestationObject),transports:typeof t.getTransports=="function"?t.getTransports():void 0}:n.response={clientDataJSON:Ls(t.clientDataJSON),authenticatorData:Ls(t.authenticatorData),signature:Ls(t.signature),userHandle:t.userHandle?Ls(t.userHandle):null},n}async function fM(){const{data:e}=await ie.post(`${ho}/register/begin`,{}),t=await navigator.credentials.create(cM(e.options));if(!t)throw new DOMException("","NotAllowedError");await ie.post(`${ho}/register/verify`,{credential:d2(t)})}async function b8(e="",t="optional",n){const r=t2();try{const{data:s}=await ie.post(`${ho}/assert/begin`,{challenge_ref:r,email:e}),o=await navigator.credentials.get(dM(s.options,t,n));return o?(await ie.post(`${ho}/assert/verify`,{challenge_ref:r,credential:d2(o)}),!0):!1}catch(s){if(s instanceof DOMException&&(s.name==="NotAllowedError"||s.name==="AbortError"))return!1;throw s}}function hM(e=!0){return kt({queryKey:["passkeys"],enabled:e,queryFn:async()=>(await ie.get(`${ho}/credentials`)).data.items})}function pM(){const e=Dn(),t=()=>void e.invalidateQueries({queryKey:["passkeys"]}),n=i=>xn.error(ye.t("LANG_i18n_common.saveFailed"),i),r=He({mutationFn:fM,onSuccess:()=>{t(),xn.success(ye.t("LANG_i18n_profile.passkeys.added"))},onError:i=>{i instanceof DOMException&&i.name==="NotAllowedError"||n(i)}}),s=He({mutationFn:async({id:i,name:a})=>ie.patch(`${ho}/credentials/${i}`,{device_name:a}),onSuccess:t,onError:n}),o=He({mutationFn:async i=>ie.delete(`${ho}/credentials/${i}`),onSuccess:t,onError:n});return{register:r,rename:s,remove:o}}function mM(){const{t:e}=xe(),{data:t}=uM(_l()),n=c2()&&!!(t!=null&&t.allow_passkey_signin)&&!!(t!=null&&t.require_passkey_enrollment),{data:r}=hM(n),{register:s}=pM();return!n||r===void 0||r.length>0?null:h.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-b border-border bg-warning-soft px-6 py-2 text-caption text-text-body",children:[h.jsx(AR,{className:"h-4 w-4 shrink-0 text-warning","aria-hidden":!0}),h.jsx("span",{className:"flex-1",children:e("LANG_i18n_profile.passkeys.requiredBanner")}),h.jsx(dr,{size:"sm",disabled:s.isPending,onClick:()=>s.mutate(),children:e("LANG_i18n_profile.passkeys.add")})]})}function gM(){const{t:e}=xe(),t=go(),n=Qt(c=>c.activeCompanyId),[r,s]=p.useState(""),o=iD(r.trim(),oD),[i,a]=p.useState(!1),{data:l}=kt({queryKey:["search",n,o],enabled:o.length>=2,queryFn:async()=>(await ie.get("/api/v1/search",{params:{q:o}})).data}),u=c=>{t(c),a(!1),s("")},d=o.length<((l==null?void 0:l.min_query)??2);return h.jsx(vo,{align:"end",widthClassName:"w-popover-lg",open:i&&r.trim().length>0,onOpenChange:a,trigger:()=>h.jsx(NA,{collapsible:!0,className:"w-64",placeholder:e("LANG_i18n_app.searchPlaceholder"),value:r,onChange:c=>{s(c.target.value),a(!0)},onClear:()=>s(""),onFocus:()=>a(!0)}),children:d?h.jsx("p",{className:"px-4 py-3 text-caption text-text-muted",children:e("LANG_i18n_app.search.hint",{min:(l==null?void 0:l.min_query)??2})}):!l||l.groups.length===0?h.jsx("p",{className:"px-4 py-3 text-caption text-text-muted",children:e("LANG_i18n_app.search.empty",{term:o})}):h.jsx("div",{className:"max-h-popover overflow-y-auto py-1",children:l.groups.map(c=>h.jsxs("div",{children:[h.jsx("p",{className:"px-4 pb-1 pt-2 text-overline text-text-muted",children:e(`LANG_i18n_app.search.group.${c.type}`)}),h.jsx("ul",{children:c.items.map(f=>h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:()=>u(f.link),className:z(xs,"items-baseline px-4"),children:[f.code&&h.jsx("span",{className:"shrink-0 font-medium text-text-strong",children:f.code}),h.jsx("span",{className:"min-w-0 flex-1 truncate text-text-body",children:f.label})]})},f.id))})]},c.type))})})}const yM=[{page:"dashboard",match:"/dashboard",entries:[{key:"kpis"},{key:"pipeline"},{key:"alerts"},{key:"editSchema"},{key:"addWidgets"},{key:"dragResize"},{key:"configWidget"},{key:"resetSchema"},{key:"openItems"}]},{page:"needs",match:"/needs",entries:[{key:"create"},{key:"urgency"},{key:"merge"},{key:"bulkStatus"},{key:"attachToRfq"},{key:"rfqSheet"},{key:"filterSort"}]},{page:"approvals",match:"/approvals",entries:[{key:"decide"},{key:"bulkApprove"},{key:"pending"},{key:"delegate"},{key:"chain"}]},{page:"rfqs",match:"/rfqs",entries:[{key:"create"},{key:"send"},{key:"duplicate"},{key:"pivot"},{key:"track"},{key:"filterState"},{key:"addLines"},{key:"print"},{key:"dimensions"},{key:"registerQuote"},{key:"newRound"},{key:"askImprovement"},{key:"message"},{key:"resend"},{key:"replies"}]},{page:"rfqInbox",match:"/rfqs-inbox",entries:[{key:"why"},{key:"link"},{key:"ignore"},{key:"read"}]},{page:"proposals",match:"/negotiation/proposals",entries:[{key:"pickArticle"},{key:"register"},{key:"revision"},{key:"state"},{key:"compare"}]},{page:"priceList",match:"/price-list",entries:[{key:"new"},{key:"tiers"},{key:"validity"},{key:"import"},{key:"filterSupplier"}]},{page:"comparison",match:"/comparison",entries:[{key:"matrix"},{key:"recommendation"},{key:"hide"},{key:"decide"},{key:"createPo"}]},{page:"purchaseOrders",match:"/purchase-orders",entries:[{key:"create"},{key:"approve"},{key:"send"},{key:"receive"},{key:"erpState"},{key:"exportPrint"},{key:"message"},{key:"resend"},{key:"replies"}]},{page:"receptions",match:"/receptions",entries:[{key:"register"},{key:"nc"},{key:"conformity"},{key:"certificates"},{key:"filter"}]},{page:"templates",match:"/templates",entries:[{key:"pdfTexts"},{key:"terms"},{key:"systemEmails"},{key:"messageModels"},{key:"useModel"}]}];function vM(e){return yM.find(t=>Dr(e,t.match))??null}function xM(){const{t:e}=xe(),{pathname:t}=un(),[n,r]=p.useState(!1),s=vM(t);return s?h.jsxs(h.Fragment,{children:[h.jsx(fr,{type:"button",size:"lg",label:e("LANG_i18n_guide.open"),icon:h.jsx(Ny,{}),onClick:()=>r(!0)}),h.jsx(dD,{open:n,onClose:()=>r(!1),title:h.jsxs("span",{className:"flex items-center gap-3",children:[h.jsx("span",{"aria-hidden":!0,className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-control bg-accent-soft text-accent-soft-fg",children:h.jsx(Ny,{className:"h-5 w-5"})}),e("LANG_i18n_guide.title")]}),context:e(`LANG_i18n_guide.${s.page}.subtitle`),sizeClassName:"w-full max-w-md",children:h.jsx("ul",{className:"space-y-3",children:s.entries.map(o=>h.jsxs("li",{className:"rounded-control border border-border bg-surface-raised p-4",children:[h.jsx("p",{className:"text-caption font-semibold text-text-strong",children:e(`LANG_i18n_guide.${s.page}.${o.key}.title`)}),h.jsx("p",{className:"mt-1 text-caption text-text-body",children:e(`LANG_i18n_guide.${s.page}.${o.key}.body`)})]},o.key))})})]}):null}function S8(e,t,n){const r=encodeURIComponent(n);return`/api/v1/settings/general/companies/${e}/assets/${t}?v=${r}`}function wM(e,t){const n=`/api/v1/public/branding/assets/${e}`;return t===void 0?n:`${n}?v=${encodeURIComponent(t)}`}function E8(e){return kt({queryKey:["general","company",e],enabled:e!==null,queryFn:async()=>(await ie.get(`/api/v1/settings/general/companies/${e}`)).data})}function _8(){const e=Dn(),t=()=>void e.invalidateQueries({queryKey:["general"]}),n=()=>t(),r=s=>xn.error(ye.t("LANG_i18n_common.saveFailed"),s);return{save:He({mutationFn:async({companyId:s,body:o})=>(await ie.put(`/api/v1/settings/general/companies/${s}`,o)).data,onSuccess:n,onError:r}),uploadAsset:He({mutationFn:async({companyId:s,asset:o,file:i})=>{const a=new FormData;a.append("file",i),await ie.post(`/api/v1/settings/general/companies/${s}/assets/${o}`,a)},onSuccess:n,onError:r}),removeAsset:He({mutationFn:async({companyId:s,asset:o})=>{await ie.delete(`/api/v1/settings/general/companies/${s}/assets/${o}`)},onSuccess:n,onError:r})}}function bM(e=!0){var s,o,i;const{data:t,dataUpdatedAt:n}=kt({queryKey:["public-branding"],queryFn:async()=>(await ie.get("/api/v1/public/branding")).data,enabled:e,staleTime:3e5}),r=(a,l)=>l?wM(a,String(n)):null;return{name:(t==null?void 0:t.name)||yb(),logoUrl:r("logo",(s=t==null?void 0:t.assets)==null?void 0:s.logo),faviconUrl:r("favicon",(o=t==null?void 0:t.assets)==null?void 0:o.favicon),maintenanceUrl:r("maintenance",(i=t==null?void 0:t.assets)==null?void 0:i.maintenance)}}function SM(e){p.useEffect(()=>{const t=document.title;return document.title=e,()=>{document.title=t}},[e])}function EM(e){p.useEffect(()=>{if(!e)return;let t=!1,n=null,r=null;const s=new Image;return s.onload=()=>{t||(r=document.querySelector('link[rel~="icon"]'),r||(r=document.createElement("link"),r.rel="icon",document.head.appendChild(r)),n=r.getAttribute("href"),r.href=e)},s.src=e,()=>{t=!0,r&&n&&r.setAttribute("href",n)}},[e])}function _M(){const{data:e}=kt({queryKey:["public-maintenance"],queryFn:async()=>(await ie.get("/api/v1/public/maintenance")).data,staleTime:3e4,refetchInterval:3e4}),t=!!(e!=null&&e.enabled),[n,r]=p.useState(()=>Date.now());return p.useEffect(()=>{if(!t)return;const s=setInterval(()=>r(Date.now()),1e3);return()=>clearInterval(s)},[t]),p.useMemo(()=>{const s=(e==null?void 0:e.message)??"";if(!t)return{status:"off",remainingMs:0,message:""};const o=e!=null&&e.starts_at?Date.parse(e.starts_at):NaN;if(!Number.isFinite(o))return{status:"active",remainingMs:0,message:s};const i=o-n;return i>0?{status:"scheduled",remainingMs:i,message:s}:{status:"active",remainingMs:0,message:s}},[e,t,n])}function CM(e){const t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/86400),r=o=>String(o).padStart(2,"0"),s=[Math.floor(t%86400/3600),Math.floor(t%3600/60),t%60].map(r).join(":");return n>0?`${n}d ${s}`:s}function kM(){const{t:e}=xe(),t=_M(),n=Qt(u=>u.markUnauthenticated),[r,s]=p.useState(null),[o,i]=p.useState(!1);p.useEffect(()=>{t.status==="active"&&n()},[t.status,n]),p.useEffect(()=>{t.status!=="scheduled"&&s(null)},[t.status]);const a=p.useRef(null);p.useEffect(()=>()=>{var u;return(u=a.current)==null?void 0:u.call(a)},[]);const l=p.useCallback(u=>{u.preventDefault(),i(!0);const d=u.currentTarget.closest("[data-manutencao]")??null,c=d==null?void 0:d.getBoundingClientRect(),f=u.clientX,g=u.clientY,x=(c==null?void 0:c.left)??16,w=(c==null?void 0:c.top)??16;document.body.style.cursor="grabbing",document.body.style.userSelect="none";const b=y=>{const v=(d==null?void 0:d.offsetWidth)??320,S=(d==null?void 0:d.offsetHeight)??100;s({x:Math.max(8,Math.min(window.innerWidth-v-8,x+y.clientX-f)),y:Math.max(8,Math.min(window.innerHeight-S-8,w+y.clientY-g))})},m=()=>{i(!1),document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",m),a.current=null};a.current=m,window.addEventListener("pointermove",b),window.addEventListener("pointerup",m)},[]);return t.status!=="scheduled"?null:h.jsxs("div",{"data-manutencao":!0,className:"fixed z-maintenance max-w-80 overflow-hidden rounded-card border border-danger bg-surface-raised shadow-card",style:r?{top:r.y,left:r.x}:{top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:[h.jsxs("div",{onPointerDown:l,className:`flex items-center gap-2 bg-danger-soft px-3 py-1.5 ${o?"cursor-grabbing":"cursor-grab"}`,style:{touchAction:"none"},children:[h.jsx(Cw,{className:"h-3.5 w-3.5 shrink-0 text-danger","aria-hidden":!0}),h.jsx("span",{className:"min-w-0 flex-1 truncate text-micro font-semibold text-danger",children:e("LANG_i18n_app.maintenanceTitle")}),h.jsx(fw,{className:"h-3.5 w-3.5 shrink-0 text-danger opacity-50","aria-hidden":!0})]}),h.jsxs("div",{className:"px-3 py-2.5",children:[h.jsx("p",{className:"text-micro text-text-muted",children:t.message||e("LANG_i18n_app.maintenanceSubtitle")}),h.jsx("p",{className:"mt-1.5 font-mono text-heading tabular-nums text-danger",children:CM(t.remainingMs)})]})]})}const C8=[{id:"system"},{id:"identity",labelKey:"LANG_i18n_settings.navGroups.identity"},{id:"procurement",labelKey:"LANG_i18n_settings.navGroups.procurement"}],k8={general:"LANG_i18n_settings.navSubgroups.general",security:"LANG_i18n_settings.navSubgroups.security",communications:"LANG_i18n_settings.navSubgroups.communications",integrations:"LANG_i18n_settings.navSubgroups.integrations",data:"LANG_i18n_settings.navSubgroups.data"},RM=[{labelKey:"LANG_i18n_settings.flags.title",path:"options",icon:Oy,group:"system",subgroup:"general"},{labelKey:"LANG_i18n_settings.companies.title",path:"companies",icon:Kc,group:"system",subgroup:"general"},{labelKey:"LANG_i18n_settings.branding.title",path:"branding",icon:ww,group:"system",subgroup:"general"},{labelKey:"LANG_i18n_settings.costCenters.title",path:"cost-centers",icon:CR,group:"system",subgroup:"general"},{labelKey:"LANG_i18n_settings.security.title",path:"security",icon:qR,group:"system",subgroup:"security"},{labelKey:"LANG_i18n_settings.audit.title",path:"audit",icon:Sw,group:"system",subgroup:"security"},{labelKey:"LANG_i18n_settings.smtp.title",path:"smtp",icon:vw,group:"system",subgroup:"communications"},{labelKey:"LANG_i18n_settings.imap.title",path:"inbox",icon:hw,group:"system",subgroup:"communications"},{labelKey:"LANG_i18n_settings.oauth.title",path:"oauth",icon:wh,group:"system",subgroup:"communications"},{labelKey:"LANG_i18n_settings.ldap.title",path:"ldap",icon:BR,group:"system",subgroup:"communications"},{labelKey:"LANG_i18n_settings.identity.title",path:"identity",icon:Ly,group:"system",subgroup:"communications"},{labelKey:"LANG_i18n_settings.emailTemplates.title",path:"email-templates",icon:xh,group:"system",subgroup:"communications"},{labelKey:"LANG_i18n_settings.templates.title",path:"templates",icon:zR,group:"system",subgroup:"communications"},{labelKey:"LANG_i18n_settings.webhooks.title",path:"webhooks",icon:nN,group:"system",subgroup:"communications"},{labelKey:"LANG_i18n_settings.integrations.title",path:"integrations",icon:GR,group:"system",subgroup:"communications"},{labelKey:"LANG_i18n_settings.reports.title",path:"reports",icon:yR,group:"system",subgroup:"communications"},{labelKey:"LANG_i18n_settings.apiKeys.title",path:"api-keys",icon:wh,group:"system",subgroup:"integrations"},{labelKey:"LANG_i18n_settings.import.title",path:"import",icon:ZR,group:"system",subgroup:"data"},{labelKey:"LANG_i18n_settings.export.title",path:"export",icon:PR,group:"system",subgroup:"data"},{labelKey:"LANG_i18n_settings.storage.title",path:"storage",icon:IR,group:"system",subgroup:"data"},{labelKey:"LANG_i18n_settings.backup.title",path:"backup",icon:RR,group:"system",subgroup:"data"},{labelKey:"LANG_i18n_settings.users.title",path:"users",icon:_w,group:"identity"},{labelKey:"LANG_i18n_settings.roles.title",path:"roles",icon:Ly,group:"identity"},{labelKey:"LANG_i18n_settings.groups.title",path:"groups",icon:lw,group:"identity"},{labelKey:"LANG_i18n_settings.delegations.title",path:"delegations",icon:eN,group:"identity"},{labelKey:"LANG_i18n_settings.tax.title",path:"tax",icon:gR,group:"procurement"},{labelKey:"LANG_i18n_settings.score.title",path:"score",icon:Oy,group:"procurement"},{labelKey:"LANG_i18n_settings.evaluation.title",path:"evaluation",icon:Ew,group:"procurement"},{labelKey:"LANG_i18n_settings.decision.title",path:"decision",icon:jR,group:"procurement"},{labelKey:"LANG_i18n_settings.approvalWorkflow.title",path:"approval-workflow",icon:rN,group:"procurement"},{labelKey:"LANG_i18n_settings.numbering.title",path:"numbering",icon:OR,group:"procurement"},{labelKey:"LANG_i18n_settings.replication.title",path:"replication",icon:kR,group:"procurement"},{labelKey:"LANG_i18n_settings.ncCatalogs.title",path:"nc-catalogs",icon:xh,group:"procurement"},{labelKey:"LANG_i18n_settings.cancellations.title",path:"cancellations",icon:pR,group:"procurement"},{labelKey:"LANG_i18n_settings.ccu.title",path:"ccu",icon:KR,group:"procurement"}],f2=[{labelKey:"LANG_i18n_nav.group.compras",items:[{labelKey:"LANG_i18n_nav.dashboard",to:"/dashboard",icon:gw},{labelKey:"LANG_i18n_nav.alertas",to:"/alerts",icon:aw},{labelKey:"LANG_i18n_nav.necessidades",to:"/needs",icon:_R,resource:"needs"},{labelKey:"LANG_i18n_nav.comprasCentralizadas",to:"/central-purchasing",icon:Kc,resource:"needs",centerOnly:!0},{labelKey:"LANG_i18n_nav.aprovacoes",to:"/approvals",icon:QR,resource:"approvals"},{labelKey:"LANG_i18n_nav.rfqs",resource:"rfqs",to:"/rfqs",icon:FR,children:[{labelKey:"LANG_i18n_nav.pedidos",to:"/rfqs",resource:"rfqs"},{labelKey:"LANG_i18n_nav.caixaEntrada",to:"/rfqs-inbox",resource:"rfqs"}]},{labelKey:"LANG_i18n_nav.negociacao",resource:"proposals",to:"/negotiation/proposals",icon:xR,children:[{labelKey:"LANG_i18n_nav.propostas",resource:"proposals",to:"/negotiation/proposals"},{labelKey:"LANG_i18n_nav.tabelaPrecos",resource:"pricing",to:"/price-list"},{labelKey:"LANG_i18n_nav.comparacoesGuardadas",resource:"proposals",to:"/saved-comparisons"}]},{labelKey:"LANG_i18n_nav.ordensCompra",to:"/purchase-orders",icon:HR,resource:"purchase_orders"},{labelKey:"LANG_i18n_nav.rececoes",to:"/receptions",icon:VR,resource:"receptions",children:[{labelKey:"LANG_i18n_nav.rececoes",to:"/receptions",end:!0,resource:"receptions"},{labelKey:"LANG_i18n_nav.naoConformidades",to:"/receptions/ncs",resource:"receptions"}]}]},{labelKey:"LANG_i18n_nav.group.analise",items:[{labelKey:"LANG_i18n_nav.historico",to:"/history",icon:MR,resource:"purchase_orders"},{labelKey:"LANG_i18n_nav.precosPraticados",to:"/prices-paid",icon:YR,resource:"pricing"},{labelKey:"LANG_i18n_nav.avaliacoes",to:"/supplier-evaluations",icon:Ew,resource:"suppliers"},{labelKey:"LANG_i18n_nav.relatorios",to:"/reports",icon:LR,resource:"reports"}]},{labelKey:"LANG_i18n_nav.group.catalogo",items:[{labelKey:"LANG_i18n_nav.artigos",to:"/items",icon:lw,resource:"items"},{labelKey:"LANG_i18n_nav.familias",to:"/item-families",icon:TR,resource:"items"},{labelKey:"LANG_i18n_nav.fornecedores",to:"/suppliers",icon:_w,resource:"suppliers"}]},{labelKey:"LANG_i18n_nav.group.administracao",items:[{labelKey:"LANG_i18n_nav.templates",to:"/templates",icon:xh,resource:"settings"},{labelKey:"LANG_i18n_nav.definicoes",to:"/settings",icon:WR,resource:"settings"}]}];function NM(e){var o;const t=[],n=[];for(const i of f2)for(const a of i.items){n.push({item:a});for(const l of a.children??[])n.push({item:l,pai:a})}const r=n.filter(({item:i})=>Dr(e,i.to)).sort((i,a)=>a.item.to.length-i.item.to.length||+!!a.pai-+!!i.pai)[0];r&&(r.pai&&t.push({labelKey:r.pai.labelKey,to:r.pai.to}),r.item.labelKey!==((o=r.pai)==null?void 0:o.labelKey)&&t.push({labelKey:r.item.labelKey,to:r.item.to}));const s=RM.filter(i=>Dr(e,`/settings/${i.path}`)).sort((i,a)=>a.path.length-i.path.length)[0];return s&&t.push({labelKey:s.labelKey,to:`/settings/${s.path}`}),t}function PM(){const e=Qt(t=>t.activeCompanyId);return kt({queryKey:["permissions",e],queryFn:async()=>(await ie.get("/api/v1/auth/permissions")).data,staleTime:5*60*1e3})}function LM(){const{data:e,isPending:t}=PM();return p.useCallback((n,r="view")=>t||!e?!1:e.grants.includes(`${n}:${r}`),[e,t])}const h2=Cl(e=>({leaf:null,setLeaf:t=>e({leaf:t})}));function R8(e){const t=h2(n=>n.setLeaf);p.useEffect(()=>(t(e??null),()=>t(null)),[e,t])}function OM(){return h2(e=>e.leaf)}function AM(){return kt({queryKey:["companies"],queryFn:async()=>(await ie.get("/api/v1/companies")).data,staleTime:5*6e4})}function N8(){return kt({queryKey:["admin-companies"],queryFn:async()=>(await ie.get("/api/v1/admin/companies")).data})}function P8(){const e=Dn(),t={onSuccess:()=>{for(const n of["admin-companies","companies"])e.invalidateQueries({queryKey:[n]});Qt.getState().bootstrap(),xn.success(ye.t("LANG_i18n_common.saved"))},onError:n=>xn.error(ye.t("LANG_i18n_common.saveFailed"),n)};return{create:He({mutationFn:async n=>(await ie.post("/api/v1/admin/companies",n)).data,...t}),update:He({mutationFn:async({id:n,body:r})=>(await ie.put(`/api/v1/admin/companies/${n}`,r)).data,...t}),remove:He({mutationFn:async n=>{await ie.delete(`/api/v1/admin/companies/${n}`)},...t})}}const Zv=["mousemove","keydown","mousedown","touchstart","scroll"];function TM(){const e=Qt(t=>t.logout);p.useEffect(()=>{let t=0,n,r=!1;const s=()=>{n&&window.clearTimeout(n),t>0&&(n=window.setTimeout(()=>void e(),t*6e4))};return ie.get("/api/v1/auth/login-policy").then(({data:o})=>{if(!r&&(t=o.session_timeout_minutes??0,t>0)){for(const i of Zv)window.addEventListener(i,s,{passive:!0});document.addEventListener("visibilitychange",s),s()}}).catch(()=>{}),()=>{r=!0,n&&window.clearTimeout(n);for(const o of Zv)window.removeEventListener(o,s);document.removeEventListener("visibilitychange",s)}},[e])}function jM(){var T;const{t:e}=xe(),t=Dn();TM();const{user:n,companies:r,activeCompanyId:s,setActiveCompany:o,logout:i}=Qt(),{pathname:a}=un(),l=OM(),u=[...NM(a).map(P=>({label:e(P.labelKey),to:P.to})),...l?[{label:l}]:[]],[d,c]=p.useState(!1),{update:f}=s2(),g=FI(),x=bM();EM(x.faviconUrl),SM(x.name);const{data:w}=AM(),b=r.find(P=>P.company_id===s),m=w==null?void 0:w.find(P=>P.parent_company_id===null),y=(b==null?void 0:b.company_id)===(m==null?void 0:m.id),v=w==null?void 0:w.find(P=>P.id===s),S=(T=w==null?void 0:w.find(P=>P.id===(v==null?void 0:v.default_purchasing_company_id)))==null?void 0:T.name,C=!!(v!=null&&v.is_purchasing_center),N=LM(),E=p.useMemo(()=>f2.map(P=>({label:e(P.labelKey),items:P.items.filter(A=>!A.resource||N(A.resource)).filter(A=>!A.centerOnly||C).map(A=>{var D;return{label:e(A.labelKey),to:A.to,icon:A.icon,end:A.end,children:(D=A.children)==null?void 0:D.filter(F=>!F.resource||N(F.resource)).map(F=>({label:e(F.labelKey),to:F.to,icon:F.icon,end:F.end}))}})})).filter(P=>P.items.length>0),[e,N,C]),k=P=>{o(P),t.invalidateQueries(),c(!1)};return h.jsxs(h.Fragment,{children:[h.jsx(lM,{}),h.jsxs(mS,{brand:P=>h.jsx(lS,{withWordmark:!P,brand:x}),nav:E,sidebarResize:g,sidebarFooter:P=>h.jsxs("div",{className:"space-y-2",children:[m&&h.jsx(rD,{name:m.name,collapsed:P}),b&&h.jsx(sD,{name:b.company_name,isParent:y,isCenter:!!(v!=null&&v.is_purchasing_center),buysVia:S,onClick:r.length>1?()=>c(!0):void 0,collapsed:P})]}),topbar:h.jsx(gS,{start:u.length>0?h.jsx(Kj,{items:u}):void 0,actions:h.jsxs(h.Fragment,{children:[h.jsx(gM,{}),h.jsx(xM,{}),h.jsx(uS,{onChange:P=>f.mutate({theme:P})}),h.jsx(aM,{}),h.jsx(sM,{}),h.jsx(vo,{align:"end",widthClassName:"w-popover-md",trigger:({open:P,toggle:A})=>h.jsx(yS,{name:(n==null?void 0:n.name)??"?",avatarSrc:n!=null&&n.has_avatar?np(n.id):void 0,open:P,onClick:A}),children:({close:P})=>h.jsxs("div",{className:"py-1",children:[h.jsxs("div",{className:"flex items-center gap-3 border-b border-border px-4 py-3",children:[h.jsx(rd,{name:(n==null?void 0:n.name)??"?",src:n!=null&&n.has_avatar?np(n.id):void 0}),h.jsxs("span",{className:"min-w-0",children:[h.jsx("span",{className:"block truncate text-caption font-medium text-text-strong",children:n==null?void 0:n.name}),h.jsx("span",{className:"block truncate text-micro text-text-muted",children:n==null?void 0:n.email})]})]}),h.jsxs(lo,{to:"/profile",onClick:P,className:xs,children:[h.jsx(tN,{className:"h-4 w-4","aria-hidden":!0}),e("LANG_i18n_profile.title")]}),h.jsxs("button",{type:"button",onClick:()=>void i(),className:xs,children:[h.jsx(yw,{className:"h-4 w-4","aria-hidden":!0}),e("LANG_i18n_app.logout")]})]})})]})}),children:[h.jsx(mM,{}),h.jsx(kM,{}),h.jsx(Gc,{})]}),h.jsx(hm,{open:d,onClose:()=>c(!1),title:e("LANG_i18n_app.switchCompany"),size:"sm",children:h.jsx("ul",{className:"space-y-1",children:r.map(P=>{var A;return h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:()=>k(P.company_id),className:z(xs,"justify-between"),children:[h.jsx("span",{children:P.company_name}),h.jsxs("span",{className:"flex items-center gap-2",children:[((A=w==null?void 0:w.find(D=>D.id===P.company_id))==null?void 0:A.is_purchasing_center)&&h.jsx(dc,{tone:"info",children:e("LANG_i18n_app.centerChip")}),P.company_id===s&&h.jsx(dc,{tone:"accent",children:e("LANG_i18n_app.active")})]})]})},P.company_id)})})})]})}function DM(){const{t:e}=xe(),t=Qt(r=>r.status),n=un();return t==="loading"?h.jsx("div",{className:"grid h-screen place-items-center text-text-muted",children:e("LANG_i18n_common.loading")}):t==="anonymous"?h.jsx(el,{to:"/login",replace:!0,state:{from:n.pathname}}):h.jsx(Gc,{})}const IM=B(()=>$(()=>import("./LoginPage-CzfTwPH6.js"),__vite__mapDeps([40,1,41,42,43,44]))),MM=B(()=>$(()=>import("./ForgotPasswordPage-CfK0hySw.js"),__vite__mapDeps([45,41,1,46]))),FM=B(()=>$(()=>import("./ResetPasswordPage-DsMkv1GQ.js"),__vite__mapDeps([47,1,41]))),zM=B(()=>$(()=>import("./RegisterPage-DuN59a4K.js"),__vite__mapDeps([48,1,41]))),UM=B(()=>$(()=>import("./AcceptInvitationPage-BX-DmmuY.js"),__vite__mapDeps([49,1,41,50,51]))),$M=B(()=>$(()=>import("./PortalPage-BDNxTeg1.js"),__vite__mapDeps([52,3,1,13,53,54,6,36,55]))),BM=B(()=>$(()=>import("./AckPage-BhdHU3k0.js"),__vite__mapDeps([56,3,1,13,53,46,36])));B(()=>$(()=>import("./StyleguidePage-Bl2esPPh.js"),__vite__mapDeps([57,58,59,60,61,62,63,6,64,65,27,24,25,66,3,4,5,1,13,67,20,68,69,70,71,8,9,10,72,15,73,74,75,76,77,78,79,80,81,30,82,83,84,85,86,36,87,21,31,88,89,32,90,55])));const VM=B(()=>$(()=>import("./DashboardPage-CCdxLMYf.js"),__vite__mapDeps([91,3,6,13,7,9,8,10,60,5,15,71,23,27,92,93]))),HM=B(()=>$(()=>import("./AlertasPage-B3Isj9sH.js"),__vite__mapDeps([94,95,36,3,13,7,78,74,79,24,25,27,80,96,6,97,69,21]))),GM=B(()=>$(()=>import("./ArtigosPage-Bb3kztxL.js"),__vite__mapDeps([98,99,100,73,101,102,74,97,15,7,75,76,77,78,79,24,25,27,80,103,104,105,54,6]))),KM=B(()=>$(()=>import("./FamiliasPage-DHX5Q8gx.js"),__vite__mapDeps([106,15,7,103,24,25,27]))),WM=B(()=>$(()=>import("./FornecedoresPage-B6mqpRrO.js"),__vite__mapDeps([107,99,100,73,101,102,74,97,15,7,75,76,77,78,79,24,25,27,80,103]))),qM=B(()=>$(()=>import("./FornecedorDetalhePage-Bzn3pMmL.js"),__vite__mapDeps([108,3,20,6,13,67,15,7,109,27,103,110,111,112,113,54]))),QM=B(()=>$(()=>import("./NecessidadesPage-CYvKwt7-.js"),__vite__mapDeps([114,99,100,73,101,102,74,97,95,36,3,4,5,64,65,15,7,75,76,77,78,79,24,25,27,80,8,81,115,6,13,96,69,60,116,54,117,118,103,119,35,120,66,112,121,122,123,124,125,126]))),e0=B(()=>$(()=>import("./NecessidadeFormPage-BmmL1N1Q.js"),__vite__mapDeps([127,7,128,3,103,116,117,27,80]))),XM=B(()=>$(()=>import("./NecessidadeDetalhePage-ChhR_tGu.js"),__vite__mapDeps([129,130,19,30,89,32,36,90,22,25,27,60,3,13,131,132,86,67,20,15,7,133,6,68,69,134,135,64,65,136,137,112,54,118,103,119,35,120,66,77,76,99,121,122,123,124,125,95,117,126,24,111,138,116,139,8,115,140,102,74,85,141]))),YM=B(()=>$(()=>import("./ComprasCentralizadasPage-BtuVEHey.js"),__vite__mapDeps([142,60,4,3,5,6,13,15,7,81,118,103,119,35,120,66,27,77,76,99,112,121,122,54,143,126]))),JM=B(()=>$(()=>import("./AprovacoesPage-xZvcZNnb.js"),__vite__mapDeps([144,99,101,102,74,97,100,73,95,36,3,4,5,6,64,65,15,7,75,76,77,78,79,24,25,27,80,133,68,69,134,81,136,60,63]))),ZM=B(()=>$(()=>import("./RfqsPage-B8pExotW.js"),__vite__mapDeps([145,99,100,73,101,102,74,97,95,36,3,4,5,62,63,6,64,65,15,7,75,76,77,78,79,24,25,27,80,8,9,10,81,128,103,116,119,35,120,60,112,122,138,146]))),e4=B(()=>$(()=>import("./RfqDetalhePage-BGyGK5Lo.js"),__vite__mapDeps([147,130,19,30,89,32,36,90,22,25,27,3,6,13,131,132,86,7,148,117,119,35,120,54,55,95,133,68,69,134,137,20,103,112,24,149,150,122,151,88,87,21,152,105,153,154,51,15,75,76,77,78,74,79,80,104,155,99,101,102,97,4,5,72,8,135,64,65,136,139,115,140,85,141]))),t4=B(()=>$(()=>import("./CaixaEntradaPage-CjPd2DPg.js"),__vite__mapDeps([156,100,73,89,32,36,3,13,87,21,7,77,83,59,119,35,120,157,153,154,90,126]))),n4=B(()=>$(()=>import("./RececoesPage-BArFiJ_S.js"),__vite__mapDeps([158,4,3,5,15,73,7,74,75,76,77,78,79,24,25,27,80,58,59,112,6,159,120,157,140,54,99,100,101,102,97,90,17,160]))),r4=B(()=>$(()=>import("./RececaoDetalhePage-DeUV4Aw-.js"),__vite__mapDeps([161,95,36,137,3,20,68,69,13,131,132,86,7,133,6,134,135,64,65,136,30,157,83,58,59,15,112,159,120,140,54,8,9,10,27,139,115,122,102,74,85,141,143]))),s4=B(()=>$(()=>import("./NcsPage-BcYVttLs.js"),__vite__mapDeps([162,95,36,4,3,5,64,65,15,73,7,74,75,76,77,78,79,24,25,27,80,99,100,101,102,97,157,140]))),o4=B(()=>$(()=>import("./NcDetalhePage-xTL6-baq.js"),__vite__mapDeps([163,137,3,20,68,69,13,131,132,86,7,67,133,6,134,84,66,27,30,25,83,85,36,135,64,65,136,151,88,87,21,89,32,90,55,152,105,153,154,51,119,35,120,159,140,164,165]))),i4=B(()=>$(()=>import("./ComparacaoPage-LJlAIDPH.js"),__vite__mapDeps([166,95,36,3,13,7,167,124,6,112,54,120,168,61,122,169,86,135,133,68,69,134,64,65,136,15,80,25,165,27]))),a4=B(()=>$(()=>import("./ComparacoesGuardadasPage-BT4Pa5R7.js"),__vite__mapDeps([170,99,100,73,101,102,74,97,3,15,7,75,76,77,78,79,24,25,27,80,168]))),l4=B(()=>$(()=>import("./HistoricoPage-DDFz9VKl.js"),__vite__mapDeps([171,95,36,4,3,5,6,15,73,7,75,76,77,78,74,79,24,25,27,80,99,101,102,97,100,111,112,54]))),u4=B(()=>$(()=>import("./TabelaPrecosPage-DzAAxLLW.js"),__vite__mapDeps([172,99,101,102,74,97,100,73,95,36,4,3,5,15,7,75,76,77,78,79,24,25,27,80,81,103,125,109,112,6,54]))),c4=B(()=>$(()=>import("./PrecosPraticadosPage-BI6HV3D-.js"),__vite__mapDeps([173,95,36,6,15,73,7,75,76,77,78,74,79,24,25,27,80,99,101,102,97,100,111,112]))),d4=B(()=>$(()=>import("./AvaliacoesPage-D5wJeiw4.js"),__vite__mapDeps([174,99,101,102,74,97,95,36,4,3,5,6,15,7,75,76,77,78,79,24,25,27,80,20,13,68,69,110,134,113,17]))),f4=B(()=>$(()=>import("./RelatoriosPage-Dp2OIzYC.js"),__vite__mapDeps([175,3,13,15,7,176,36,24,25,27]))),h4=B(()=>$(()=>import("./ReportBuilderPage-BvTRzm7C.js"),__vite__mapDeps([177,3,13,7,176,165,36,25,27]))),p4=B(()=>$(()=>import("./OrdensCompraPage-Br0VbL6E.js"),__vite__mapDeps([178,99,100,73,101,102,74,97,95,36,3,4,5,6,64,65,15,7,75,76,77,78,79,24,25,27,80,8,81,115,123,124,112,54,120,125,103,13,150,167,146,136,121]))),m4=B(()=>$(()=>import("./PoDetalhePage-DjWxuKmk.js"),__vite__mapDeps([179,130,19,30,89,32,36,90,22,25,27,3,13,131,132,86,7,148,124,6,112,54,120,159,135,133,68,69,134,64,65,136,15,140,160,67,20,121,180,95,55,117,151,88,87,21,152,105,153,154,51,119,35,63,70,137,139,8,115,122,102,74,85,141]))),g4=B(()=>$(()=>import("./NotificacoesPage-C9-JMfHu.js"),__vite__mapDeps([181,3,13,7]))),y4=B(()=>$(()=>import("./PerfilPage-DJXN8zNA.js"),__vite__mapDeps([182,13,7,30,3,25,43,44,24]))),v4=B(()=>$(()=>import("./DefinicoesLayout-C--r8RPQ.js"),__vite__mapDeps([183,7]))),x4=B(()=>$(()=>import("./SettingsHub-DprpGSrz.js"),__vite__mapDeps([184,3,164,132]))),w4=B(()=>$(()=>import("./ImpostosPage-DEX1GPFc.js"),__vite__mapDeps([185,3,6,13,186,132,24,187,92,188,83,25,27]))),b4=B(()=>$(()=>import("./ScorePage-DCsd7jpD.js"),__vite__mapDeps([189,3,13,186,132,24,187,92,188,83,190,105]))),S4=B(()=>$(()=>import("./DecisaoPage-DW7RK99d.js"),__vite__mapDeps([191,3,13,186,132,24,187,92,188,83,190,105]))),E4=B(()=>$(()=>import("./ReplicacaoPage-mzaejdwU.js"),__vite__mapDeps([192,3,6,13,15,186,132,24,187,92,190,105,146,188,83,27]))),_4=B(()=>$(()=>import("./PropostasPage-CCFU3bm4.js"),__vite__mapDeps([193,99,101,102,74,97,100,73,4,3,5,15,7,75,76,77,78,79,24,25,27,80,81,122,112,6,119,35,120,149,150,54,138]))),C4=B(()=>$(()=>import("./PropostaDetalhePage-BLtZmyhY.js"),__vite__mapDeps([194,58,59,61,3,137,20,68,69,4,5,6,13,15,7,169,154,119,35,120,122,112,149,150,54,27,25,88,87,21,89,32,36,30,90,55,167,139,8,115,140,102,74,85,141,65,134,138]))),k4=B(()=>$(()=>import("./AuditoriaPage-Do0rM9YM.js"),__vite__mapDeps([195,3,13,15,73,75,76,77,78,74,79,24,25,27,80,99,100,101,102,97,190,105]))),R4=B(()=>$(()=>import("./SegurancaPage-CMMvrae6.js"),__vite__mapDeps([196,3,13,186,132,24,187,92,188,83,197,190,105]))),N4=B(()=>$(()=>import("./ChavesApiPage-C804pDzT.js"),__vite__mapDeps([198,146,3,1,13,15,16,17,18,190,105,27]))),P4=B(()=>$(()=>import("./WebhooksPage-Bw20HlbE.js"),__vite__mapDeps([199,3,13,15,16,17,18,200,187,188,83,190,105,201,24,25,27,55,21]))),L4=B(()=>$(()=>import("./ImportacaoPage-DX_od10W.js"),__vite__mapDeps([202,30,3,15,190,105]))),O4=B(()=>$(()=>import("./UtilizadoresPage-BoZVfdwX.js"),__vite__mapDeps([203,3,15,73,75,76,77,78,74,79,24,25,27,80,99,100,101,102,97,204,13,150,51,50,55,164,18,146]))),A4=B(()=>$(()=>import("./EmpresasPage-B092LhAQ.js"),__vite__mapDeps([205,3,13,29,30,31,32,25,206,27,24]))),T4=B(()=>$(()=>import("./GruposPage-CGgRt1lJ.js"),__vite__mapDeps([207,146,3,13,15,200,187,188,83,204,208,105,24,25,27]))),j4=B(()=>$(()=>import("./CentrosCustoPage-D_WLk5N_.js"),__vite__mapDeps([209,146,3,63,6,13,15,200,187,188,83,105,112,24,25,27]))),D4=B(()=>$(()=>import("./DelegacoesPage-CE-YrJAw.js"),__vite__mapDeps([210,3,13,15,204,65,24,25,27]))),I4=B(()=>$(()=>import("./FluxoAprovacaoPage-D7C0-syw.js"),__vite__mapDeps([211,3,13,200,187,82,79,105,103,25,27,10,141,26,1,208,204,188,83,186,132,24,92,109,212]))),M4=B(()=>$(()=>import("./NumeracaoPage-BdSNHhQZ.js"),__vite__mapDeps([213,3,13,186,132,24,187,92,188,83,190,105,15,200,25,27]))),F4=B(()=>$(()=>import("./CatalogosNcPage-BazlIUr4.js"),__vite__mapDeps([214,3,6,13,15,200,187,188,83,105,27,24,25]))),z4=B(()=>$(()=>import("./CcuPage-pvcQUsxl.js"),__vite__mapDeps([215,95,36,3,13,15,200,187,188,83,104,105,155,54,6,25,27,24]))),U4=B(()=>$(()=>import("./RolesPage-BS2fgg2n.js"),__vite__mapDeps([216,3,13,197,132,24,25,27]))),$4=B(()=>$(()=>import("./SmtpPage-ChzwgUfR.js"),__vite__mapDeps([217,3,13,186,132,24,187,92,188,83,55]))),B4=B(()=>$(()=>import("./CaixaImapPage-BFGqO6dv.js"),__vite__mapDeps([218,3,13,186,132,24,187,92,188,83]))),V4=B(()=>$(()=>import("./OpcoesPage-edl-PZ5T.js"),__vite__mapDeps([219,3,13,186,132,24,187,92,188,83]))),H4=B(()=>$(()=>import("./TemplatesEmailPage-6QbD-Bgi.js"),__vite__mapDeps([220,3,13,15,221,105,186,132,24,187,92,188,83]))),G4=B(()=>$(()=>import("./TemplatesPage-Cg6lnlDC.js"),__vite__mapDeps([222,89,32,36,3,13,7,221,105,152,188,83,66,27,25,30,21]))),K4=B(()=>$(()=>import("./OauthPage-DyplZd7Y.js"),__vite__mapDeps([223,3,13,42]))),W4=B(()=>$(()=>import("./LdapPage-B8A9940O.js"),__vite__mapDeps([224,3,13,208,105,25,27]))),q4=B(()=>$(()=>import("./IntegracoesPage-BUpyyG9K.js"),__vite__mapDeps([225,3,13,15,200,187,146,105,188,83,24,25,27,73,100,201,180]))),Q4=B(()=>$(()=>import("./ExportacaoPage-DKSpXY8I.js"),__vite__mapDeps([226,3,13,186,132,24,187,92,188,83]))),X4=B(()=>$(()=>import("./CancelamentosPage-8McF14lD.js"),__vite__mapDeps([227,3,13,186,132,24,187,92,188,83]))),Y4=B(()=>$(()=>import("./BackupPage-DerP-3bh.js"),__vite__mapDeps([228,30,3,63,1,15,35,36]))),J4=B(()=>$(()=>import("./ArmazenamentoPage-BG2qBFyK.js"),__vite__mapDeps([229,19,3,13,186,132,24,187,92,188,83,25]))),Z4=B(()=>$(()=>import("./MarcaPage-BCO0JVxG.js"),__vite__mapDeps([230,3,13,29,30,31,32,25,188,83,206]))),e3=B(()=>$(()=>import("./IdentidadePage-B5zH7KMY.js"),__vite__mapDeps([231,3,1,13,43,27,25]))),t3=B(()=>$(()=>import("./OauthCallbackPage-CItr3yHH.js"),[])),n3=B(()=>$(()=>import("./AvaliacaoPage-BesEO9mc.js"),__vite__mapDeps([232,3,13,186,132,24,187,92,188,83,110]))),r3=B(()=>$(()=>import("./RelatoriosAgendadosPage-lkmF7iYQ.js"),__vite__mapDeps([233,3,13,15,176,201,55,24,25,27]))),s3=sw([{path:"/login",element:h.jsx(IM,{})},{path:"/oauth/callback",element:h.jsx(t3,{})},{path:"/forgot-password",element:h.jsx(MM,{})},{path:"/reset-password",element:h.jsx(FM,{})},{path:"/register",element:h.jsx(zM,{})},{path:"/accept-invitation",element:h.jsx(UM,{})},{path:"/portal/:token",element:h.jsx($M,{})},{path:"/ack/:token",element:h.jsx(BM,{})},{element:h.jsx(DM,{}),children:[{element:h.jsx(jM,{}),children:[{path:"/",element:h.jsx(el,{to:"/dashboard",replace:!0})},{path:"/dashboard",element:h.jsx(VM,{})},{path:"/alerts",element:h.jsx(HM,{})},{path:"/needs",element:h.jsx(QM,{})},{path:"/needs/new",element:h.jsx(e0,{})},{path:"/needs/:id",element:h.jsx(XM,{})},{path:"/needs/:id/edit",element:h.jsx(e0,{})},{path:"/central-purchasing",element:h.jsx(YM,{})},{path:"/approvals",element:h.jsx(JM,{})},{path:"/rfqs",element:h.jsx(ZM,{})},{path:"/rfqs/:id",element:h.jsx(e4,{})},{path:"/rfqs-inbox",element:h.jsx(t4,{})},{path:"/purchase-orders",element:h.jsx(p4,{})},{path:"/purchase-orders/:id",element:h.jsx(m4,{})},{path:"/receptions",element:h.jsx(n4,{})},{path:"/receptions/ncs",element:h.jsx(s4,{})},{path:"/receptions/ncs/:id",element:h.jsx(o4,{})},{path:"/receptions/:id",element:h.jsx(r4,{})},{path:"/templates",element:h.jsx(G4,{})},{path:"/comparison",element:h.jsx(i4,{})},{path:"/negotiation/proposals",element:h.jsx(_4,{})},{path:"/negotiation/proposals/:id",element:h.jsx(C4,{})},{path:"/saved-comparisons",element:h.jsx(a4,{})},{path:"/history",element:h.jsx(l4,{})},{path:"/price-list",element:h.jsx(u4,{})},{path:"/prices-paid",element:h.jsx(c4,{})},{path:"/supplier-evaluations",element:h.jsx(d4,{})},{path:"/reports",element:h.jsx(f4,{})},{path:"/reports/:id",element:h.jsx(h4,{})},{path:"/items",element:h.jsx(GM,{})},{path:"/item-families",element:h.jsx(KM,{})},{path:"/suppliers",element:h.jsx(WM,{})},{path:"/suppliers/:id",element:h.jsx(qM,{})},{path:"/notifications",element:h.jsx(g4,{})},{path:"/profile",element:h.jsx(y4,{})},{path:"/settings",element:h.jsx(v4,{}),children:[{index:!0,element:h.jsx(x4,{})},{path:"tax",element:h.jsx(w4,{})},{path:"score",element:h.jsx(b4,{})},{path:"decision",element:h.jsx(S4,{})},{path:"evaluation",element:h.jsx(n3,{})},{path:"replication",element:h.jsx(E4,{})},{path:"audit",element:h.jsx(k4,{})},{path:"security",element:h.jsx(R4,{})},{path:"api-keys",element:h.jsx(N4,{})},{path:"webhooks",element:h.jsx(P4,{})},{path:"import",element:h.jsx(L4,{})},{path:"users",element:h.jsx(O4,{})},{path:"companies",element:h.jsx(A4,{})},{path:"groups",element:h.jsx(T4,{})},{path:"cost-centers",element:h.jsx(j4,{})},{path:"delegations",element:h.jsx(D4,{})},{path:"approval-workflow",element:h.jsx(I4,{})},{path:"numbering",element:h.jsx(M4,{})},{path:"nc-catalogs",element:h.jsx(F4,{})},{path:"cancellations",element:h.jsx(X4,{})},{path:"ccu",element:h.jsx(z4,{})},{path:"roles",element:h.jsx(U4,{})},{path:"smtp",element:h.jsx($4,{})},{path:"oauth",element:h.jsx(K4,{})},{path:"ldap",element:h.jsx(W4,{})},{path:"integrations",element:h.jsx(q4,{})},{path:"identity",element:h.jsx(e3,{})},{path:"inbox",element:h.jsx(B4,{})},{path:"options",element:h.jsx(V4,{})},{path:"email-templates",element:h.jsx(H4,{})},{path:"templates",element:h.jsx(el,{to:"/templates",replace:!0})},{path:"reports",element:h.jsx(r3,{})},{path:"export",element:h.jsx(Q4,{})},{path:"backup",element:h.jsx(Y4,{})},{path:"storage",element:h.jsx(J4,{})},{path:"branding",element:h.jsx(Z4,{})}]}]}]}],{future:{v7_relativeSplatPath:!0}});jI();const t0=TI();function o3(){const e=Qt(r=>r.bootstrap),t=ld(r=>r.hydrate),[,n]=p.useState(!1);return p.useEffect(()=>{(t0?t:e)().finally(()=>n(!0))},[t,e]),h.jsxs(pC,{client:Jc,children:[h.jsx(p.Suspense,{fallback:null,children:h.jsx(nR,{router:t0?ZI:s3,future:{v7_startTransition:!0}})}),h.jsx(RI,{})]})}bA();const p2=document.getElementById("root");if(!p2)throw new Error("Elemento #root não encontrado");uA.finally(()=>{Rx(p2).render(h.jsx(p.StrictMode,{children:h.jsx(o3,{})}))});export{c2 as $,Dn as A,dr as B,ER as C,Fh as D,yP as E,zy as F,He as G,ye as H,Uy as I,kt as J,V3 as K,Vj as L,hm as M,el as N,JR as O,H3 as P,s8 as Q,o8 as R,Ly as S,uS as T,Qt as U,go as V,x8 as W,jO as X,TO as Y,uM as Z,_l as _,ld as a,W3 as a$,Rb as a0,w8 as a1,AR as a2,M3 as a3,b8 as a4,f3 as a5,lS as a6,yb as a7,CM as a8,bM as a9,VR as aA,fw as aB,xl as aC,E8 as aD,vo as aE,Oy as aF,g8 as aG,R8 as aH,Ew as aI,AM as aJ,YR as aK,PI as aL,HR as aM,vl as aN,xh as aO,Vo as aP,Iw as aQ,G3 as aR,vb as aS,Wc as aT,cP as aU,a3 as aV,p0 as aW,cm as aX,UA as aY,Pj as aZ,K3 as a_,EM as aa,SM as ab,_M as ac,F3 as ad,d3 as ae,Ye as af,uw as ag,Ab as ah,t8 as ai,Kj as aj,a8 as ak,q3 as al,B3 as am,FR as an,$3 as ao,Ze as ap,dD as aq,kA as ar,XR as as,$R as at,ut as au,sN as av,$_ as aw,l3 as ax,xs as ay,_R as az,Kc as b,C8 as b$,r8 as b0,X3 as b1,Q3 as b2,J3 as b3,Y3 as b4,i8 as b5,tS as b6,e8 as b7,Qb as b8,Xb as b9,vw as bA,y8 as bB,iM as bC,g3 as bD,zw as bE,AI as bF,pw as bG,un as bH,h3 as bI,MR as bJ,l8 as bK,jR as bL,nM as bM,yR as bN,l2 as bO,u2 as bP,wR as bQ,rM as bR,np as bS,p8 as bT,m8 as bU,hM as bV,pM as bW,Bj as bX,f8 as bY,h8 as bZ,yw as b_,kj as ba,ZR as bb,$ as bc,Si as bd,Rh as be,yo as bf,rd as bg,bR as bh,vh as bi,mj as bj,Z3 as bk,Sj as bl,n8 as bm,ol as bn,iD as bo,u3 as bp,MI as bq,s2 as br,jj as bs,N3 as bt,pR as bu,m3 as bv,fm as bw,mA as bx,p3 as by,kR as bz,Q as c,RM as c0,k8 as c1,Gc as c2,aR as c3,Sw as c4,wh as c5,nN as c6,eN as c7,CR as c8,_w as c9,lP as ca,DR as cb,N8 as cc,_8 as cd,S8 as ce,P8 as cf,Dt as cg,NI as ch,v8 as ci,wM as cj,Pb as d,dc as e,lo as f,z as g,zA as h,gP as i,h as j,bi as k,bw as l,Nb as m,fr as n,Ob as o,PR as p,c8 as q,p as r,z3 as s,zh as t,xe as u,ie as v,U3 as w,NA as x,xn as y,d8 as z};