@ours.network/fleet 1.2.0-nightly.30 → 1.2.0-nightly.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +4 -4
- package/dist/cli.js +48 -16
- package/dist/minimal-setup.d.ts +2 -0
- package/dist/minimal-setup.js +43 -0
- package/dist/web/available-port.d.ts +2 -0
- package/dist/web/available-port.js +23 -0
- package/dist/web/runtime.js +17 -2
- package/dist/web/service.d.ts +5 -0
- package/dist/web/service.js +8 -0
- package/dist/web-app/assets/FleetApp-D58F4xje.css +1 -0
- package/dist/web-app/assets/FleetApp-Gjz3h8uS.js +302 -0
- package/dist/web-app/assets/FleetApp-Gjz3h8uS.js.map +1 -0
- package/dist/web-app/assets/abnfDiagram-VCTEODGH-t4h5V8Cs.js +2 -0
- package/dist/web-app/assets/abnfDiagram-VCTEODGH-t4h5V8Cs.js.map +1 -0
- package/dist/web-app/assets/arc-DbufDTF6.js +2 -0
- package/dist/web-app/assets/arc-DbufDTF6.js.map +1 -0
- package/dist/web-app/assets/architectureDiagram-5GKGNRK7-D6K8jMN5.js +37 -0
- package/dist/web-app/assets/architectureDiagram-5GKGNRK7-D6K8jMN5.js.map +1 -0
- package/dist/web-app/assets/blockDiagram-I7D4REHJ-CWvkET2x.js +130 -0
- package/dist/web-app/assets/blockDiagram-I7D4REHJ-CWvkET2x.js.map +1 -0
- package/dist/web-app/assets/browser-B7y08DsC.js +9 -0
- package/dist/web-app/assets/browser-B7y08DsC.js.map +1 -0
- package/dist/web-app/assets/c4Diagram-7LVT6UL2-RNWA7VnD.js +39 -0
- package/dist/web-app/assets/c4Diagram-7LVT6UL2-RNWA7VnD.js.map +1 -0
- package/dist/web-app/assets/channel-BF3U9sI8.js +2 -0
- package/dist/web-app/assets/channel-BF3U9sI8.js.map +1 -0
- package/dist/web-app/assets/chunk-2Q5K7J3B-pdEuY4vj.js +2 -0
- package/dist/web-app/assets/chunk-2Q5K7J3B-pdEuY4vj.js.map +1 -0
- package/dist/web-app/assets/chunk-5VM5RSS4-DuAUtdUC.js +16 -0
- package/dist/web-app/assets/chunk-5VM5RSS4-DuAUtdUC.js.map +1 -0
- package/dist/web-app/assets/chunk-F27PBJKO-6kpb80Xt.js +2 -0
- package/dist/web-app/assets/chunk-F27PBJKO-6kpb80Xt.js.map +1 -0
- package/dist/web-app/assets/chunk-IMKFNOWR-DWC84P6A.js +232 -0
- package/dist/web-app/assets/chunk-IMKFNOWR-DWC84P6A.js.map +1 -0
- package/dist/web-app/assets/chunk-JWPE2WC7-FHO-M3vi.js +2 -0
- package/dist/web-app/assets/chunk-JWPE2WC7-FHO-M3vi.js.map +1 -0
- package/dist/web-app/assets/chunk-POPQ4Y6H-CjnlKvmR.js +2 -0
- package/dist/web-app/assets/chunk-POPQ4Y6H-CjnlKvmR.js.map +1 -0
- package/dist/web-app/assets/chunk-SVP7TREG-WHYWJ6xq.js +89 -0
- package/dist/web-app/assets/chunk-SVP7TREG-WHYWJ6xq.js.map +1 -0
- package/dist/web-app/assets/chunk-TICWLB2K-POupMpyL.js +207 -0
- package/dist/web-app/assets/chunk-TICWLB2K-POupMpyL.js.map +1 -0
- package/dist/web-app/assets/chunk-XXDRQBXY-Cw5HHqH-.js +2 -0
- package/dist/web-app/assets/chunk-XXDRQBXY-Cw5HHqH-.js.map +1 -0
- package/dist/web-app/assets/classDiagram-ZZMXUADV-1hdMzIme.js +2 -0
- package/dist/web-app/assets/classDiagram-ZZMXUADV-1hdMzIme.js.map +1 -0
- package/dist/web-app/assets/classDiagram-v2-VYDZK3BY-1hdMzIme.js +2 -0
- package/dist/web-app/assets/classDiagram-v2-VYDZK3BY-1hdMzIme.js.map +1 -0
- package/dist/web-app/assets/cose-bilkent-JH36ORCC-Cp6Hjine.js +2 -0
- package/dist/web-app/assets/cose-bilkent-JH36ORCC-Cp6Hjine.js.map +1 -0
- package/dist/web-app/assets/cynefin-OW5HDTMX-DI-DeNUk.js +179 -0
- package/dist/web-app/assets/cynefin-OW5HDTMX-DI-DeNUk.js.map +1 -0
- package/dist/web-app/assets/cynefinDiagram-5FMLGOSQ-todBCANI.js +63 -0
- package/dist/web-app/assets/cynefinDiagram-5FMLGOSQ-todBCANI.js.map +1 -0
- package/dist/web-app/assets/cytoscape.esm-CtNdOvlO.js +332 -0
- package/dist/web-app/assets/cytoscape.esm-CtNdOvlO.js.map +1 -0
- package/dist/web-app/assets/dagre-GXQ25YYZ-BvIVo7eh.js +5 -0
- package/dist/web-app/assets/dagre-GXQ25YYZ-BvIVo7eh.js.map +1 -0
- package/dist/web-app/assets/defaultLocale-DX6XiGOO.js +2 -0
- package/dist/web-app/assets/defaultLocale-DX6XiGOO.js.map +1 -0
- package/dist/web-app/assets/diagram-S7CK7UJ4-k9vDGlB5.js +31 -0
- package/dist/web-app/assets/diagram-S7CK7UJ4-k9vDGlB5.js.map +1 -0
- package/dist/web-app/assets/diagram-UQ7AKVKN-Bv7BT1dE.js +42 -0
- package/dist/web-app/assets/diagram-UQ7AKVKN-Bv7BT1dE.js.map +1 -0
- package/dist/web-app/assets/diagram-VSXAHHWV-m9I9AumX.js +4 -0
- package/dist/web-app/assets/diagram-VSXAHHWV-m9I9AumX.js.map +1 -0
- package/dist/web-app/assets/diagram-VX7I27RA-4VJ2qozS.js +25 -0
- package/dist/web-app/assets/diagram-VX7I27RA-4VJ2qozS.js.map +1 -0
- package/dist/web-app/assets/diagram-Z3DM3KII-CvH8JIEd.js +25 -0
- package/dist/web-app/assets/diagram-Z3DM3KII-CvH8JIEd.js.map +1 -0
- package/dist/web-app/assets/ebnfDiagram-PWID7BFC-DAGs23hd.js +2 -0
- package/dist/web-app/assets/ebnfDiagram-PWID7BFC-DAGs23hd.js.map +1 -0
- package/dist/web-app/assets/erDiagram-RLTQ6QDP-CEMyWKIa.js +100 -0
- package/dist/web-app/assets/erDiagram-RLTQ6QDP-CEMyWKIa.js.map +1 -0
- package/dist/web-app/assets/flowDiagram-HODETNUW-BnraxJTV.js +169 -0
- package/dist/web-app/assets/flowDiagram-HODETNUW-BnraxJTV.js.map +1 -0
- package/dist/web-app/assets/ganttDiagram-EL5Y4UJY-V6d4ICW0.js +293 -0
- package/dist/web-app/assets/ganttDiagram-EL5Y4UJY-V6d4ICW0.js.map +1 -0
- package/dist/web-app/assets/gitGraphDiagram-WWUBYQGX-Bj_gqcba.js +107 -0
- package/dist/web-app/assets/gitGraphDiagram-WWUBYQGX-Bj_gqcba.js.map +1 -0
- package/dist/web-app/assets/index-C4BdeFB9.css +1 -0
- package/dist/web-app/assets/index-i9rKiqYX.js +430 -0
- package/dist/web-app/assets/index-i9rKiqYX.js.map +1 -0
- package/dist/web-app/assets/infoDiagram-27XIBGKW-Dfm89NLl.js +3 -0
- package/dist/web-app/assets/infoDiagram-27XIBGKW-Dfm89NLl.js.map +1 -0
- package/dist/web-app/assets/init-Gi6I4Gst.js +2 -0
- package/dist/web-app/assets/init-Gi6I4Gst.js.map +1 -0
- package/dist/web-app/assets/ishikawaDiagram-5VMMS53U-D-ISiJTS.js +71 -0
- package/dist/web-app/assets/ishikawaDiagram-5VMMS53U-D-ISiJTS.js.map +1 -0
- package/dist/web-app/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/web-app/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/web-app/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/web-app/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/web-app/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/dist/web-app/assets/journeyDiagram-3NMN7TZE-TTySrzws.js +140 -0
- package/dist/web-app/assets/journeyDiagram-3NMN7TZE-TTySrzws.js.map +1 -0
- package/dist/web-app/assets/kanban-definition-UXKFOSKX-BxntsBft.js +90 -0
- package/dist/web-app/assets/kanban-definition-UXKFOSKX-BxntsBft.js.map +1 -0
- package/dist/web-app/assets/katex-HP8lGamR.js +258 -0
- package/dist/web-app/assets/katex-HP8lGamR.js.map +1 -0
- package/dist/web-app/assets/layout-0sZak8Ho.js +2 -0
- package/dist/web-app/assets/layout-0sZak8Ho.js.map +1 -0
- package/dist/web-app/assets/linear-D4xk4kUi.js +2 -0
- package/dist/web-app/assets/linear-D4xk4kUi.js.map +1 -0
- package/dist/web-app/assets/mermaid.core-CNKolAgz.js +313 -0
- package/dist/web-app/assets/mermaid.core-CNKolAgz.js.map +1 -0
- package/dist/web-app/assets/mindmap-definition-YA3MSWOX-DLJijY_l.js +97 -0
- package/dist/web-app/assets/mindmap-definition-YA3MSWOX-DLJijY_l.js.map +1 -0
- package/dist/web-app/assets/ordinal-Cboi1Yqb.js +2 -0
- package/dist/web-app/assets/ordinal-Cboi1Yqb.js.map +1 -0
- package/dist/web-app/assets/pegDiagram-XKGWAZYB-xjrh9rBd.js +2 -0
- package/dist/web-app/assets/pegDiagram-XKGWAZYB-xjrh9rBd.js.map +1 -0
- package/dist/web-app/assets/pieDiagram-E7YTZNPT-CHE8ZMXN.js +40 -0
- package/dist/web-app/assets/pieDiagram-E7YTZNPT-CHE8ZMXN.js.map +1 -0
- package/dist/web-app/assets/quadrantDiagram-AXDQQJYC-CDlEe9sg.js +8 -0
- package/dist/web-app/assets/quadrantDiagram-AXDQQJYC-CDlEe9sg.js.map +1 -0
- package/dist/web-app/assets/railroadDiagram-O6MQD6OU-Dv7lFZ_v.js +2 -0
- package/dist/web-app/assets/railroadDiagram-O6MQD6OU-Dv7lFZ_v.js.map +1 -0
- package/dist/web-app/assets/requirementDiagram-BXWQKSXE-BetEel-k.js +85 -0
- package/dist/web-app/assets/requirementDiagram-BXWQKSXE-BetEel-k.js.map +1 -0
- package/dist/web-app/assets/sankeyDiagram-P5KCCOFB-DCQgLfvK.js +41 -0
- package/dist/web-app/assets/sankeyDiagram-P5KCCOFB-DCQgLfvK.js.map +1 -0
- package/dist/web-app/assets/sequenceDiagram-WJ2MYXX4-CsGOoqu_.js +163 -0
- package/dist/web-app/assets/sequenceDiagram-WJ2MYXX4-CsGOoqu_.js.map +1 -0
- package/dist/web-app/assets/sizeCapture-INFHLROL-CLQRMiEc.js +2 -0
- package/dist/web-app/assets/sizeCapture-INFHLROL-CLQRMiEc.js.map +1 -0
- package/dist/web-app/assets/stateDiagram-D77RDMKH-D2MRdC5Q.js +2 -0
- package/dist/web-app/assets/stateDiagram-D77RDMKH-D2MRdC5Q.js.map +1 -0
- package/dist/web-app/assets/stateDiagram-v2-MP3YSRHH-CToAT5fD.js +2 -0
- package/dist/web-app/assets/stateDiagram-v2-MP3YSRHH-CToAT5fD.js.map +1 -0
- package/dist/web-app/assets/swimlanes-42K2YHIH-BGjHfR8x.js +2 -0
- package/dist/web-app/assets/swimlanes-42K2YHIH-BGjHfR8x.js.map +1 -0
- package/dist/web-app/assets/swimlanesDiagram-VR7AAH4N-bLHg88Vk.js +9 -0
- package/dist/web-app/assets/swimlanesDiagram-VR7AAH4N-bLHg88Vk.js.map +1 -0
- package/dist/web-app/assets/timeline-definition-24CTP7MA-DhGtHQ0p.js +121 -0
- package/dist/web-app/assets/timeline-definition-24CTP7MA-DhGtHQ0p.js.map +1 -0
- package/dist/web-app/assets/vennDiagram-4TSXK5OY-Dv5irf00.js +35 -0
- package/dist/web-app/assets/vennDiagram-4TSXK5OY-Dv5irf00.js.map +1 -0
- package/dist/web-app/assets/wardleyDiagram-VM6X3IG4-JGiUTj5x.js +79 -0
- package/dist/web-app/assets/wardleyDiagram-VM6X3IG4-JGiUTj5x.js.map +1 -0
- package/dist/web-app/assets/xychartDiagram-S5SC5T6Z-Dw5ev7_Q.js +8 -0
- package/dist/web-app/assets/xychartDiagram-S5SC5T6Z-Dw5ev7_Q.js.map +1 -0
- package/dist/web-app/fleet-index.html +19 -0
- package/dist/web-app/fleet.webmanifest +37 -0
- package/dist/web-app/icons/apple-touch-icon.png +0 -0
- package/dist/web-app/icons/favicon-16.png +0 -0
- package/dist/web-app/icons/favicon-32.png +0 -0
- package/dist/web-app/icons/icon-192-maskable.png +0 -0
- package/dist/web-app/icons/icon-192.png +0 -0
- package/dist/web-app/icons/icon-512-maskable.png +0 -0
- package/dist/web-app/icons/icon-512.png +0 -0
- package/dist/web-app/index.html +19 -0
- package/dist/web-app/manifest.webmanifest +17 -0
- package/dist/web-app/sw.js +221 -0
- package/dist/web-app/version.json +1 -0
- package/dist/web-app/workspace-install.sh +148 -0
- package/dist/web-app/workspace-tunnel.sh +40 -0
- package/dist/workspace-enrollment.d.ts +3 -0
- package/dist/workspace-enrollment.js +18 -1
- package/package.json +2 -2
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./FleetApp-Gjz3h8uS.js","./browser-B7y08DsC.js","./FleetApp-D58F4xje.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
function Z8(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(r,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>r[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();const Z5="modulepreload",eA=function(e,t){return new URL(e,t).href},D9={},su=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let l=function(m){return Promise.all(m.map(h=>Promise.resolve(h).then(E=>({status:"fulfilled",value:E}),E=>({status:"rejected",reason:E}))))};const c=document.getElementsByTagName("link"),x=document.querySelector("meta[property=csp-nonce]"),f=x?.nonce||x?.getAttribute("nonce");o=l(n.map(m=>{if(m=eA(m,r),m in D9)return;D9[m]=!0;const h=m.endsWith(".css"),E=h?'[rel="stylesheet"]':"";if(!!r)for(let w=c.length-1;w>=0;w--){const B=c[w];if(B.href===m&&(!h||B.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${m}"]${E}`))return;const y=document.createElement("link");if(y.rel=h?"stylesheet":Z5,h||(y.as="script"),y.crossOrigin="",y.href=m,f&&y.setAttribute("nonce",f),document.head.appendChild(y),h)return new Promise((w,B)=>{y.addEventListener("load",w),y.addEventListener("error",()=>B(new Error(`Unable to preload CSS for ${m}`)))})}))}function a(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return o.then(l=>{for(const c of l||[])c.status==="rejected"&&a(c.reason);return t().catch(a)})};function au(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ix={exports:{}},Ws={},ox={exports:{}},ot={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var k9;function tA(){if(k9)return ot;k9=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.iterator;function E(I){return I===null||typeof I!="object"?null:(I=h&&I[h]||I["@@iterator"],typeof I=="function"?I:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,w={};function B(I,G,N){this.props=I,this.context=G,this.refs=w,this.updater=N||C}B.prototype.isReactComponent={},B.prototype.setState=function(I,G){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,G,"setState")},B.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function F(){}F.prototype=B.prototype;function b(I,G,N){this.props=I,this.context=G,this.refs=w,this.updater=N||C}var D=b.prototype=new F;D.constructor=b,y(D,B.prototype),D.isPureReactComponent=!0;var S=Array.isArray,k=Object.prototype.hasOwnProperty,P={current:null},R={key:!0,ref:!0,__self:!0,__source:!0};function M(I,G,N){var ae,Ee={},se=null,xe=null;if(G!=null)for(ae in G.ref!==void 0&&(xe=G.ref),G.key!==void 0&&(se=""+G.key),G)k.call(G,ae)&&!R.hasOwnProperty(ae)&&(Ee[ae]=G[ae]);var we=arguments.length-2;if(we===1)Ee.children=N;else if(1<we){for(var de=Array(we),et=0;et<we;et++)de[et]=arguments[et+2];Ee.children=de}if(I&&I.defaultProps)for(ae in we=I.defaultProps,we)Ee[ae]===void 0&&(Ee[ae]=we[ae]);return{$$typeof:e,type:I,key:se,ref:xe,props:Ee,_owner:P.current}}function O(I,G){return{$$typeof:e,type:I.type,key:G,ref:I.ref,props:I.props,_owner:I._owner}}function T(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function V(I){var G={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(N){return G[N]})}var z=/\/+/g;function J(I,G){return typeof I=="object"&&I!==null&&I.key!=null?V(""+I.key):G.toString(36)}function H(I,G,N,ae,Ee){var se=typeof I;(se==="undefined"||se==="boolean")&&(I=null);var xe=!1;if(I===null)xe=!0;else switch(se){case"string":case"number":xe=!0;break;case"object":switch(I.$$typeof){case e:case t:xe=!0}}if(xe)return xe=I,Ee=Ee(xe),I=ae===""?"."+J(xe,0):ae,S(Ee)?(N="",I!=null&&(N=I.replace(z,"$&/")+"/"),H(Ee,G,N,"",function(et){return et})):Ee!=null&&(T(Ee)&&(Ee=O(Ee,N+(!Ee.key||xe&&xe.key===Ee.key?"":(""+Ee.key).replace(z,"$&/")+"/")+I)),G.push(Ee)),1;if(xe=0,ae=ae===""?".":ae+":",S(I))for(var we=0;we<I.length;we++){se=I[we];var de=ae+J(se,we);xe+=H(se,G,N,de,Ee)}else if(de=E(I),typeof de=="function")for(I=de.call(I),we=0;!(se=I.next()).done;)se=se.value,de=ae+J(se,we++),xe+=H(se,G,N,de,Ee);else if(se==="object")throw G=String(I),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return xe}function W(I,G,N){if(I==null)return I;var ae=[],Ee=0;return H(I,ae,"","",function(se){return G.call(N,se,Ee++)}),ae}function re(I){if(I._status===-1){var G=I._result;G=G(),G.then(function(N){(I._status===0||I._status===-1)&&(I._status=1,I._result=N)},function(N){(I._status===0||I._status===-1)&&(I._status=2,I._result=N)}),I._status===-1&&(I._status=0,I._result=G)}if(I._status===1)return I._result.default;throw I._result}var Z={current:null},K={transition:null},ie={ReactCurrentDispatcher:Z,ReactCurrentBatchConfig:K,ReactCurrentOwner:P};function j(){throw Error("act(...) is not supported in production builds of React.")}return ot.Children={map:W,forEach:function(I,G,N){W(I,function(){G.apply(this,arguments)},N)},count:function(I){var G=0;return W(I,function(){G++}),G},toArray:function(I){return W(I,function(G){return G})||[]},only:function(I){if(!T(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},ot.Component=B,ot.Fragment=n,ot.Profiler=o,ot.PureComponent=b,ot.StrictMode=r,ot.Suspense=x,ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,ot.act=j,ot.cloneElement=function(I,G,N){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var ae=y({},I.props),Ee=I.key,se=I.ref,xe=I._owner;if(G!=null){if(G.ref!==void 0&&(se=G.ref,xe=P.current),G.key!==void 0&&(Ee=""+G.key),I.type&&I.type.defaultProps)var we=I.type.defaultProps;for(de in G)k.call(G,de)&&!R.hasOwnProperty(de)&&(ae[de]=G[de]===void 0&&we!==void 0?we[de]:G[de])}var de=arguments.length-2;if(de===1)ae.children=N;else if(1<de){we=Array(de);for(var et=0;et<de;et++)we[et]=arguments[et+2];ae.children=we}return{$$typeof:e,type:I.type,key:Ee,ref:se,props:ae,_owner:xe}},ot.createContext=function(I){return I={$$typeof:l,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:a,_context:I},I.Consumer=I},ot.createElement=M,ot.createFactory=function(I){var G=M.bind(null,I);return G.type=I,G},ot.createRef=function(){return{current:null}},ot.forwardRef=function(I){return{$$typeof:c,render:I}},ot.isValidElement=T,ot.lazy=function(I){return{$$typeof:m,_payload:{_status:-1,_result:I},_init:re}},ot.memo=function(I,G){return{$$typeof:f,type:I,compare:G===void 0?null:G}},ot.startTransition=function(I){var G=K.transition;K.transition={};try{I()}finally{K.transition=G}},ot.unstable_act=j,ot.useCallback=function(I,G){return Z.current.useCallback(I,G)},ot.useContext=function(I){return Z.current.useContext(I)},ot.useDebugValue=function(){},ot.useDeferredValue=function(I){return Z.current.useDeferredValue(I)},ot.useEffect=function(I,G){return Z.current.useEffect(I,G)},ot.useId=function(){return Z.current.useId()},ot.useImperativeHandle=function(I,G,N){return Z.current.useImperativeHandle(I,G,N)},ot.useInsertionEffect=function(I,G){return Z.current.useInsertionEffect(I,G)},ot.useLayoutEffect=function(I,G){return Z.current.useLayoutEffect(I,G)},ot.useMemo=function(I,G){return Z.current.useMemo(I,G)},ot.useReducer=function(I,G,N){return Z.current.useReducer(I,G,N)},ot.useRef=function(I){return Z.current.useRef(I)},ot.useState=function(I){return Z.current.useState(I)},ot.useSyncExternalStore=function(I,G,N){return Z.current.useSyncExternalStore(I,G,N)},ot.useTransition=function(){return Z.current.useTransition()},ot.version="18.3.1",ot}var F9;function wf(){return F9||(F9=1,ox.exports=tA()),ox.exports}/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-jsx-runtime.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var S9;function nA(){if(S9)return Ws;S9=1;var e=wf(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(c,x,f){var m,h={},E=null,C=null;f!==void 0&&(E=""+f),x.key!==void 0&&(E=""+x.key),x.ref!==void 0&&(C=x.ref);for(m in x)r.call(x,m)&&!a.hasOwnProperty(m)&&(h[m]=x[m]);if(c&&c.defaultProps)for(m in x=c.defaultProps,x)h[m]===void 0&&(h[m]=x[m]);return{$$typeof:t,type:c,key:E,ref:C,props:h,_owner:o.current}}return Ws.Fragment=n,Ws.jsx=l,Ws.jsxs=l,Ws}var b9;function rA(){return b9||(b9=1,ix.exports=nA()),ix.exports}var d=rA();async function iA(){const e=navigator,t=e.userAgent;let n="",r=e.userAgentData?.platform||(/iPhone/.test(t)?"iPhone":/iPad/.test(t)?"iPad":/Android/.test(t)?"Android":/Windows/.test(t)?"Windows":/Macintosh/.test(t)?"Mac":/Linux/.test(t)?"Linux":"Device");try{const a=await e.userAgentData?.getHighEntropyValues?.(["model","platform"]);n=a?.model?.trim()||"",r=a?.platform||r}catch{}const o=/Edg\//.test(t)?"Edge":/Firefox\//.test(t)?"Firefox":/Chrome\/|CriOS\//.test(t)?"Chrome":/Safari\//.test(t)?"Safari":"Browser";return`${n||r} · ${o}`.replace(/[\x00-\x1f\x7f]/g,"").slice(0,100)}var A=wf();const oA=au(A),Sa=Z8({__proto__:null,default:oA},[A]);/**
|
|
19
|
+
* @license lucide-react v0.468.0 - ISC
|
|
20
|
+
*
|
|
21
|
+
* This source code is licensed under the ISC license.
|
|
22
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/const sA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),e1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
24
|
+
* @license lucide-react v0.468.0 - ISC
|
|
25
|
+
*
|
|
26
|
+
* This source code is licensed under the ISC license.
|
|
27
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
28
|
+
*/var aA={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"};/**
|
|
29
|
+
* @license lucide-react v0.468.0 - ISC
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the ISC license.
|
|
32
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/const lA=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:l,...c},x)=>A.createElement("svg",{ref:x,...aA,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:e1("lucide",o),...c},[...l.map(([f,m])=>A.createElement(f,m)),...Array.isArray(a)?a:[a]]));/**
|
|
34
|
+
* @license lucide-react v0.468.0 - ISC
|
|
35
|
+
*
|
|
36
|
+
* This source code is licensed under the ISC license.
|
|
37
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
38
|
+
*/const Oe=(e,t)=>{const n=A.forwardRef(({className:r,...o},a)=>A.createElement(lA,{ref:a,iconNode:t,className:e1(`lucide-${sA(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
39
|
+
* @license lucide-react v0.468.0 - ISC
|
|
40
|
+
*
|
|
41
|
+
* This source code is licensed under the ISC license.
|
|
42
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
+
*/const cA=Oe("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
44
|
+
* @license lucide-react v0.468.0 - ISC
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the ISC license.
|
|
47
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/const t1=Oe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
49
|
+
* @license lucide-react v0.468.0 - ISC
|
|
50
|
+
*
|
|
51
|
+
* This source code is licensed under the ISC license.
|
|
52
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
+
*/const uA=Oe("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/**
|
|
54
|
+
* @license lucide-react v0.468.0 - ISC
|
|
55
|
+
*
|
|
56
|
+
* This source code is licensed under the ISC license.
|
|
57
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
+
*/const Ar=Oe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
59
|
+
* @license lucide-react v0.468.0 - ISC
|
|
60
|
+
*
|
|
61
|
+
* This source code is licensed under the ISC license.
|
|
62
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
+
*/const xA=Oe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
64
|
+
* @license lucide-react v0.468.0 - ISC
|
|
65
|
+
*
|
|
66
|
+
* This source code is licensed under the ISC license.
|
|
67
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
+
*/const dA=Oe("Bolt",[["path",{d:"M21 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.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/**
|
|
69
|
+
* @license lucide-react v0.468.0 - ISC
|
|
70
|
+
*
|
|
71
|
+
* This source code is licensed under the ISC license.
|
|
72
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
+
*/const cd=Oe("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
74
|
+
* @license lucide-react v0.468.0 - ISC
|
|
75
|
+
*
|
|
76
|
+
* This source code is licensed under the ISC license.
|
|
77
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
+
*/const ea=Oe("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
79
|
+
* @license lucide-react v0.468.0 - ISC
|
|
80
|
+
*
|
|
81
|
+
* This source code is licensed under the ISC license.
|
|
82
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
+
*/const P9=Oe("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"}]]);/**
|
|
84
|
+
* @license lucide-react v0.468.0 - ISC
|
|
85
|
+
*
|
|
86
|
+
* This source code is licensed under the ISC license.
|
|
87
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
+
*/const Go=Oe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
89
|
+
* @license lucide-react v0.468.0 - ISC
|
|
90
|
+
*
|
|
91
|
+
* This source code is licensed under the ISC license.
|
|
92
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
+
*/const n1=Oe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
94
|
+
* @license lucide-react v0.468.0 - ISC
|
|
95
|
+
*
|
|
96
|
+
* This source code is licensed under the ISC license.
|
|
97
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
+
*/const fA=Oe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
99
|
+
* @license lucide-react v0.468.0 - ISC
|
|
100
|
+
*
|
|
101
|
+
* This source code is licensed under the ISC license.
|
|
102
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
+
*/const r1=Oe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
104
|
+
* @license lucide-react v0.468.0 - ISC
|
|
105
|
+
*
|
|
106
|
+
* This source code is licensed under the ISC license.
|
|
107
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
+
*/const hA=Oe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
109
|
+
* @license lucide-react v0.468.0 - ISC
|
|
110
|
+
*
|
|
111
|
+
* This source code is licensed under the ISC license.
|
|
112
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
+
*/const mA=Oe("CirclePause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]);/**
|
|
114
|
+
* @license lucide-react v0.468.0 - ISC
|
|
115
|
+
*
|
|
116
|
+
* This source code is licensed under the ISC license.
|
|
117
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
+
*/const pA=Oe("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
|
|
119
|
+
* @license lucide-react v0.468.0 - ISC
|
|
120
|
+
*
|
|
121
|
+
* This source code is licensed under the ISC license.
|
|
122
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
+
*/const EA=Oe("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
|
|
124
|
+
* @license lucide-react v0.468.0 - ISC
|
|
125
|
+
*
|
|
126
|
+
* This source code is licensed under the ISC license.
|
|
127
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
+
*/const ud=Oe("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"}]]);/**
|
|
129
|
+
* @license lucide-react v0.468.0 - ISC
|
|
130
|
+
*
|
|
131
|
+
* This source code is licensed under the ISC license.
|
|
132
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
+
*/const i1=Oe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
134
|
+
* @license lucide-react v0.468.0 - ISC
|
|
135
|
+
*
|
|
136
|
+
* This source code is licensed under the ISC license.
|
|
137
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
+
*/const gA=Oe("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
139
|
+
* @license lucide-react v0.468.0 - ISC
|
|
140
|
+
*
|
|
141
|
+
* This source code is licensed under the ISC license.
|
|
142
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
+
*/const _9=Oe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
144
|
+
* @license lucide-react v0.468.0 - ISC
|
|
145
|
+
*
|
|
146
|
+
* This source code is licensed under the ISC license.
|
|
147
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
+
*/const CA=Oe("File",[["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"}]]);/**
|
|
149
|
+
* @license lucide-react v0.468.0 - ISC
|
|
150
|
+
*
|
|
151
|
+
* This source code is licensed under the ISC license.
|
|
152
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
+
*/const yA=Oe("Grid2x2",[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 12h18",key:"1i2n21"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]);/**
|
|
154
|
+
* @license lucide-react v0.468.0 - ISC
|
|
155
|
+
*
|
|
156
|
+
* This source code is licensed under the ISC license.
|
|
157
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
+
*/const vA=Oe("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"}]]);/**
|
|
159
|
+
* @license lucide-react v0.468.0 - ISC
|
|
160
|
+
*
|
|
161
|
+
* This source code is licensed under the ISC license.
|
|
162
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
+
*/const AA=Oe("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
|
164
|
+
* @license lucide-react v0.468.0 - ISC
|
|
165
|
+
*
|
|
166
|
+
* This source code is licensed under the ISC license.
|
|
167
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
+
*/const BA=Oe("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);/**
|
|
169
|
+
* @license lucide-react v0.468.0 - ISC
|
|
170
|
+
*
|
|
171
|
+
* This source code is licensed under the ISC license.
|
|
172
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
+
*/const o1=Oe("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
174
|
+
* @license lucide-react v0.468.0 - ISC
|
|
175
|
+
*
|
|
176
|
+
* This source code is licensed under the ISC license.
|
|
177
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
+
*/const wA=Oe("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"}]]);/**
|
|
179
|
+
* @license lucide-react v0.468.0 - ISC
|
|
180
|
+
*
|
|
181
|
+
* This source code is licensed under the ISC license.
|
|
182
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
+
*/const DA=Oe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
184
|
+
* @license lucide-react v0.468.0 - ISC
|
|
185
|
+
*
|
|
186
|
+
* This source code is licensed under the ISC license.
|
|
187
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
+
*/const kA=Oe("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"}]]);/**
|
|
189
|
+
* @license lucide-react v0.468.0 - ISC
|
|
190
|
+
*
|
|
191
|
+
* This source code is licensed under the ISC license.
|
|
192
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
+
*/const FA=Oe("MessageCircleReply",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}],["path",{d:"M7 12h7a2 2 0 0 1 2 2v1",key:"1gheu4"}]]);/**
|
|
194
|
+
* @license lucide-react v0.468.0 - ISC
|
|
195
|
+
*
|
|
196
|
+
* This source code is licensed under the ISC license.
|
|
197
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
+
*/const SA=Oe("MessageSquareText",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]]);/**
|
|
199
|
+
* @license lucide-react v0.468.0 - ISC
|
|
200
|
+
*
|
|
201
|
+
* This source code is licensed under the ISC license.
|
|
202
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
+
*/const sx=Oe("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/**
|
|
204
|
+
* @license lucide-react v0.468.0 - ISC
|
|
205
|
+
*
|
|
206
|
+
* This source code is licensed under the ISC license.
|
|
207
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
+
*/const bA=Oe("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
|
|
209
|
+
* @license lucide-react v0.468.0 - ISC
|
|
210
|
+
*
|
|
211
|
+
* This source code is licensed under the ISC license.
|
|
212
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
213
|
+
*/const PA=Oe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
214
|
+
* @license lucide-react v0.468.0 - ISC
|
|
215
|
+
*
|
|
216
|
+
* This source code is licensed under the ISC license.
|
|
217
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
218
|
+
*/const _A=Oe("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
219
|
+
* @license lucide-react v0.468.0 - ISC
|
|
220
|
+
*
|
|
221
|
+
* This source code is licensed under the ISC license.
|
|
222
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
223
|
+
*/const jA=Oe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
224
|
+
* @license lucide-react v0.468.0 - ISC
|
|
225
|
+
*
|
|
226
|
+
* This source code is licensed under the ISC license.
|
|
227
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
228
|
+
*/const TA=Oe("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);/**
|
|
229
|
+
* @license lucide-react v0.468.0 - ISC
|
|
230
|
+
*
|
|
231
|
+
* This source code is licensed under the ISC license.
|
|
232
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
233
|
+
*/const RA=Oe("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
234
|
+
* @license lucide-react v0.468.0 - ISC
|
|
235
|
+
*
|
|
236
|
+
* This source code is licensed under the ISC license.
|
|
237
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
238
|
+
*/const Df=Oe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
239
|
+
* @license lucide-react v0.468.0 - ISC
|
|
240
|
+
*
|
|
241
|
+
* This source code is licensed under the ISC license.
|
|
242
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
243
|
+
*/const NA=Oe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
244
|
+
* @license lucide-react v0.468.0 - ISC
|
|
245
|
+
*
|
|
246
|
+
* This source code is licensed under the ISC license.
|
|
247
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
248
|
+
*/const MA=Oe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
249
|
+
* @license lucide-react v0.468.0 - ISC
|
|
250
|
+
*
|
|
251
|
+
* This source code is licensed under the ISC license.
|
|
252
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
253
|
+
*/const IA=Oe("SendHorizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);/**
|
|
254
|
+
* @license lucide-react v0.468.0 - ISC
|
|
255
|
+
*
|
|
256
|
+
* This source code is licensed under the ISC license.
|
|
257
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
258
|
+
*/const LA=Oe("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
|
|
259
|
+
* @license lucide-react v0.468.0 - ISC
|
|
260
|
+
*
|
|
261
|
+
* This source code is licensed under the ISC license.
|
|
262
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
263
|
+
*/const OA=Oe("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"}]]);/**
|
|
264
|
+
* @license lucide-react v0.468.0 - ISC
|
|
265
|
+
*
|
|
266
|
+
* This source code is licensed under the ISC license.
|
|
267
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
268
|
+
*/const s1=Oe("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"}]]);/**
|
|
269
|
+
* @license lucide-react v0.468.0 - ISC
|
|
270
|
+
*
|
|
271
|
+
* This source code is licensed under the ISC license.
|
|
272
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
273
|
+
*/const zA=Oe("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"}]]);/**
|
|
274
|
+
* @license lucide-react v0.468.0 - ISC
|
|
275
|
+
*
|
|
276
|
+
* This source code is licensed under the ISC license.
|
|
277
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
278
|
+
*/const VA=Oe("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"}]]);/**
|
|
279
|
+
* @license lucide-react v0.468.0 - ISC
|
|
280
|
+
*
|
|
281
|
+
* This source code is licensed under the ISC license.
|
|
282
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
283
|
+
*/const UA=Oe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
284
|
+
* @license lucide-react v0.468.0 - ISC
|
|
285
|
+
*
|
|
286
|
+
* This source code is licensed under the ISC license.
|
|
287
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
288
|
+
*/const $A=Oe("UserRoundPlus",[["path",{d:"M2 21a8 8 0 0 1 13.292-6",key:"bjp14o"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M19 16v6",key:"tddt3s"}],["path",{d:"M22 19h-6",key:"vcuq98"}]]);/**
|
|
289
|
+
* @license lucide-react v0.468.0 - ISC
|
|
290
|
+
*
|
|
291
|
+
* This source code is licensed under the ISC license.
|
|
292
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
293
|
+
*/const xd=Oe("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
|
|
294
|
+
* @license lucide-react v0.468.0 - ISC
|
|
295
|
+
*
|
|
296
|
+
* This source code is licensed under the ISC license.
|
|
297
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
298
|
+
*/const j9=Oe("UsersRound",[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]]);/**
|
|
299
|
+
* @license lucide-react v0.468.0 - ISC
|
|
300
|
+
*
|
|
301
|
+
* This source code is licensed under the ISC license.
|
|
302
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
303
|
+
*/const WA=Oe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function HA({context:e,select:t,add:n,settings:r,logout:o}){const[a,l]=A.useState(!1),c=e.workspaces.find(f=>f.id===e.activeId),x=f=>{l(!1),f()};return d.jsxs("div",{className:"workspace-switcher",onKeyDown:f=>{f.key==="Escape"&&l(!1)},children:[d.jsxs("button",{className:"workspace-switch-trigger","aria-label":"Switch workspace","aria-haspopup":"dialog","aria-expanded":a,onClick:()=>l(f=>!f),children:[d.jsx("span",{children:c?.name||"Workspace"}),d.jsx(n1,{size:14})]}),a&&d.jsxs(d.Fragment,{children:[d.jsx("button",{className:"workspace-switch-backdrop","aria-label":"Close workspace switcher",onClick:()=>l(!1)}),d.jsxs("div",{className:"workspace-switch-menu",role:"dialog","aria-label":"Workspaces",children:[e.workspaces.map(f=>d.jsxs("button",{onClick:()=>x(()=>t(f.id)),"aria-current":f.id===e.activeId?"true":void 0,children:[d.jsxs("span",{children:[d.jsx("strong",{children:f.name}),!f.linked&&d.jsx("small",{children:f.status==="ready"?"Link this browser":"Finish installation"})]}),f.id===e.activeId&&d.jsx(Go,{size:16})]},f.id)),d.jsxs("button",{onClick:()=>x(n),children:[d.jsx(Df,{size:17}),"Add workspace"]}),d.jsxs("button",{onClick:()=>x(r),children:[d.jsx(OA,{size:17}),"Account Settings"]}),d.jsxs("button",{onClick:()=>x(o),children:[d.jsx(wA,{size:17}),"Sign out"]})]})]})]})}const GA={app:yA,back:t1,bolt:dA,chat:SA,check:Go,chevron:r1,chevronDown:n1,close:WA,clusters:P9,copy:ud,download:i1,edit:RA,inbox:vA,link:AA,lock:BA,mic:bA,maximize:DA,menu:kA,minus:PA,monitor:_9,monitorEye:_9,more:gA,paperclip:TA,pause:mA,play:pA,plus:Df,refresh:NA,reply:FA,search:MA,send:IA,settings:LA,shield:s1,sliders:zA,trash:UA,user:xd,invite:$A,agent:ea,network:P9};function Fe(e){const{name:t,size:n=18,stroke:r=1.8,fill:o=!1,style:a,className:l}=e,c=GA[t];return c?d.jsx(c,{className:"ic "+(l||""),width:n,height:n,strokeWidth:r,fill:o?"currentColor":"none",style:a,"aria-hidden":"true"}):null}function a1(e){const t=A.useRef(null),n=A.useRef(null),r=A.useRef(null),o=A.useRef(0),a=A.useRef(!0),[l,c]=A.useState("requesting"),[x,f]=A.useState(""),m=A.useCallback(()=>{o.current&&cancelAnimationFrame(o.current),r.current&&(r.current.getTracks().forEach(C=>C.stop()),r.current=null),t.current&&(t.current.srcObject=null)},[]),h=A.useCallback(C=>{r.current=C;const y=t.current;y.srcObject=C,y.setAttribute("playsinline","true"),y.play();const w=n.current,B=w.getContext("2d"),F=()=>{if(a.current)if(y.readyState>=y.HAVE_ENOUGH_DATA){const b=y.videoWidth||320,D=y.videoHeight||240;w.width=b,w.height=D,B.drawImage(y,0,0,b,D);const S=B.getImageData(0,0,b,D);su(()=>Promise.resolve().then(()=>XA),void 0,import.meta.url).then(k=>{const P=k.default,R=P(S.data,S.width,S.height,{inversionAttempts:"dontInvert"});if(R&&R.data&&a.current){m(),e.onDecode(R.data);return}a.current&&(o.current=requestAnimationFrame(F))})}else o.current=requestAnimationFrame(F)};o.current=requestAnimationFrame(F)},[m,e]);A.useEffect(()=>{if(a.current=!0,!navigator.mediaDevices?.getUserMedia){c("nocamera");return}return navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then(C=>{if(!a.current){C.getTracks().forEach(y=>y.stop());return}c("scanning"),h(C)}).catch(C=>{if(!a.current)return;const y=C.name??"";y==="NotAllowedError"||y==="PermissionDeniedError"?c("denied"):y==="NotFoundError"||y==="DevicesNotFoundError"?c("nocamera"):(c("error"),f(C.message??String(C)))}),()=>{a.current=!1,m()}},[]);const E=()=>{m(),e.onClose()};return d.jsxs("div",{"data-testid":"qr-scanner",style:{display:"flex",flexDirection:"column",gap:12,padding:"12px 0"},children:[(l==="requesting"||l==="scanning")&&d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.88rem"},children:l==="requesting"?"Requesting camera…":"Point your camera at the QR code."}),d.jsxs("div",{style:{position:"relative",borderRadius:8,overflow:"hidden",background:"#000",minHeight:200},children:[d.jsx("canvas",{ref:n,"data-testid":"scanner-canvas",style:{display:"none"}}),d.jsx("video",{ref:t,"data-testid":"scanner-video",muted:!0,playsInline:!0,style:{width:"100%",display:"block",borderRadius:8}}),l==="scanning"&&d.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:d.jsx("div",{style:{width:160,height:160,borderRadius:12,border:"2px solid var(--accent)",boxShadow:"0 0 0 9999px rgba(0,0,0,0.4)"}})})]})]}),l==="denied"&&d.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:"var(--text-2)"},children:[d.jsx(Fe,{name:"shield",size:16}),d.jsx("span",{style:{fontWeight:600,fontSize:"0.9rem"},children:"Camera access denied"})]}),d.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.88rem"},children:"Camera permission was denied. To scan QR codes, allow camera access in your browser settings, then try again. Or paste the invite text below instead."})]}),l==="nocamera"&&d.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:"var(--text-2)"},children:[d.jsx(Fe,{name:"close",size:16}),d.jsx("span",{style:{fontWeight:600,fontSize:"0.9rem"},children:"No camera available"})]}),d.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.88rem"},children:"No camera was found on this device. Paste the invite text below instead."})]}),l==="error"&&d.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:d.jsxs("p",{style:{margin:0,fontSize:"0.85rem",color:"var(--danger, #e53)"},children:["Camera error: ",x||"unknown error",". Paste the invite text below instead."]})}),d.jsx("button",{className:"btn",style:{justifyContent:"center"},onClick:E,children:l==="scanning"?d.jsxs(d.Fragment,{children:[d.jsx(Fe,{name:"close",size:14}),"Cancel scan"]}):d.jsxs(d.Fragment,{children:[d.jsx(Fe,{name:"close",size:14}),"Close scanner"]})})]})}var xc={exports:{}},qA=xc.exports,T9;function KA(){return T9||(T9=1,(function(e,t){(function(r,o){e.exports=o()})(typeof self<"u"?self:qA,function(){return(function(n){var r={};function o(a){if(r[a])return r[a].exports;var l=r[a]={i:a,l:!1,exports:{}};return n[a].call(l.exports,l,l.exports,o),l.l=!0,l.exports}return o.m=n,o.c=r,o.d=function(a,l,c){o.o(a,l)||Object.defineProperty(a,l,{configurable:!1,enumerable:!0,get:c})},o.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return o.d(l,"a",l),l},o.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)},o.p="",o(o.s=3)})([(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function l(c,x){this.width=x,this.height=c.length/x,this.data=c}return l.createEmpty=function(c,x){return new l(new Uint8ClampedArray(c*x),c)},l.prototype.get=function(c,x){return c<0||c>=this.width||x<0||x>=this.height?!1:!!this.data[x*this.width+c]},l.prototype.set=function(c,x,f){this.data[x*this.width+c]=f?1:0},l.prototype.setRegion=function(c,x,f,m,h){for(var E=x;E<x+m;E++)for(var C=c;C<c+f;C++)this.set(C,E,!!h)},l})();r.BitMatrix=a}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var a=o(2);function l(x,f){return x^f}r.addOrSubtractGF=l;var c=(function(){function x(f,m,h){this.primitive=f,this.size=m,this.generatorBase=h,this.expTable=new Array(this.size),this.logTable=new Array(this.size);for(var E=1,C=0;C<this.size;C++)this.expTable[C]=E,E=E*2,E>=this.size&&(E=(E^this.primitive)&this.size-1);for(var C=0;C<this.size-1;C++)this.logTable[this.expTable[C]]=C;this.zero=new a.default(this,Uint8ClampedArray.from([0])),this.one=new a.default(this,Uint8ClampedArray.from([1]))}return x.prototype.multiply=function(f,m){return f===0||m===0?0:this.expTable[(this.logTable[f]+this.logTable[m])%(this.size-1)]},x.prototype.inverse=function(f){if(f===0)throw new Error("Can't invert 0");return this.expTable[this.size-this.logTable[f]-1]},x.prototype.buildMonomial=function(f,m){if(f<0)throw new Error("Invalid monomial degree less than 0");if(m===0)return this.zero;var h=new Uint8ClampedArray(f+1);return h[0]=m,new a.default(this,h)},x.prototype.log=function(f){if(f===0)throw new Error("Can't take log(0)");return this.logTable[f]},x.prototype.exp=function(f){return this.expTable[f]},x})();r.default=c}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var a=o(1),l=(function(){function c(x,f){if(f.length===0)throw new Error("No coefficients.");this.field=x;var m=f.length;if(m>1&&f[0]===0){for(var h=1;h<m&&f[h]===0;)h++;if(h===m)this.coefficients=x.zero.coefficients;else{this.coefficients=new Uint8ClampedArray(m-h);for(var E=0;E<this.coefficients.length;E++)this.coefficients[E]=f[h+E]}}else this.coefficients=f}return c.prototype.degree=function(){return this.coefficients.length-1},c.prototype.isZero=function(){return this.coefficients[0]===0},c.prototype.getCoefficient=function(x){return this.coefficients[this.coefficients.length-1-x]},c.prototype.addOrSubtract=function(x){var f;if(this.isZero())return x;if(x.isZero())return this;var m=this.coefficients,h=x.coefficients;m.length>h.length&&(f=[h,m],m=f[0],h=f[1]);for(var E=new Uint8ClampedArray(h.length),C=h.length-m.length,y=0;y<C;y++)E[y]=h[y];for(var y=C;y<h.length;y++)E[y]=a.addOrSubtractGF(m[y-C],h[y]);return new c(this.field,E)},c.prototype.multiply=function(x){if(x===0)return this.field.zero;if(x===1)return this;for(var f=this.coefficients.length,m=new Uint8ClampedArray(f),h=0;h<f;h++)m[h]=this.field.multiply(this.coefficients[h],x);return new c(this.field,m)},c.prototype.multiplyPoly=function(x){if(this.isZero()||x.isZero())return this.field.zero;for(var f=this.coefficients,m=f.length,h=x.coefficients,E=h.length,C=new Uint8ClampedArray(m+E-1),y=0;y<m;y++)for(var w=f[y],B=0;B<E;B++)C[y+B]=a.addOrSubtractGF(C[y+B],this.field.multiply(w,h[B]));return new c(this.field,C)},c.prototype.multiplyByMonomial=function(x,f){if(x<0)throw new Error("Invalid degree less than 0");if(f===0)return this.field.zero;for(var m=this.coefficients.length,h=new Uint8ClampedArray(m+x),E=0;E<m;E++)h[E]=this.field.multiply(this.coefficients[E],f);return new c(this.field,h)},c.prototype.evaluateAt=function(x){var f=0;if(x===0)return this.getCoefficient(0);var m=this.coefficients.length;if(x===1)return this.coefficients.forEach(function(E){f=a.addOrSubtractGF(f,E)}),f;f=this.coefficients[0];for(var h=1;h<m;h++)f=a.addOrSubtractGF(this.field.multiply(x,f),this.coefficients[h]);return f},c})();r.default=l}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var a=o(4),l=o(5),c=o(11),x=o(12);function f(E){var C=x.locate(E);if(!C)return null;for(var y=0,w=C;y<w.length;y++){var B=w[y],F=c.extract(E,B),b=l.decode(F.matrix);if(b)return{binaryData:b.bytes,data:b.text,chunks:b.chunks,version:b.version,location:{topRightCorner:F.mappingFunction(B.dimension,0),topLeftCorner:F.mappingFunction(0,0),bottomRightCorner:F.mappingFunction(B.dimension,B.dimension),bottomLeftCorner:F.mappingFunction(0,B.dimension),topRightFinderPattern:B.topRight,topLeftFinderPattern:B.topLeft,bottomLeftFinderPattern:B.bottomLeft,bottomRightAlignmentPattern:B.alignmentPattern}}}return null}var m={inversionAttempts:"attemptBoth"};function h(E,C,y,w){w===void 0&&(w={});var B=m;Object.keys(B||{}).forEach(function(R){B[R]=w[R]||B[R]});var F=B.inversionAttempts==="attemptBoth"||B.inversionAttempts==="invertFirst",b=B.inversionAttempts==="onlyInvert"||B.inversionAttempts==="invertFirst",D=a.binarize(E,C,y,F),S=D.binarized,k=D.inverted,P=f(b?k:S);return!P&&(B.inversionAttempts==="attemptBoth"||B.inversionAttempts==="invertFirst")&&(P=f(b?S:k)),P}h.default=h,r.default=h}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var a=o(0),l=8,c=24;function x(h,E,C){return h<E?E:h>C?C:h}var f=(function(){function h(E,C){this.width=E,this.data=new Uint8ClampedArray(E*C)}return h.prototype.get=function(E,C){return this.data[C*this.width+E]},h.prototype.set=function(E,C,y){this.data[C*this.width+E]=y},h})();function m(h,E,C,y){if(h.length!==E*C*4)throw new Error("Malformed data passed to binarizer.");for(var w=new f(E,C),B=0;B<E;B++)for(var F=0;F<C;F++){var b=h[(F*E+B)*4+0],D=h[(F*E+B)*4+1],S=h[(F*E+B)*4+2];w.set(B,F,.2126*b+.7152*D+.0722*S)}for(var k=Math.ceil(E/l),P=Math.ceil(C/l),R=new f(k,P),M=0;M<P;M++)for(var O=0;O<k;O++){for(var T=0,V=1/0,z=0,F=0;F<l;F++)for(var B=0;B<l;B++){var J=w.get(O*l+B,M*l+F);T+=J,V=Math.min(V,J),z=Math.max(z,J)}var H=T/Math.pow(l,2);if(z-V<=c&&(H=V/2,M>0&&O>0)){var W=(R.get(O,M-1)+2*R.get(O-1,M)+R.get(O-1,M-1))/4;V<W&&(H=W)}R.set(O,M,H)}var re=a.BitMatrix.createEmpty(E,C),Z=null;y&&(Z=a.BitMatrix.createEmpty(E,C));for(var M=0;M<P;M++)for(var O=0;O<k;O++){for(var K=x(O,2,k-3),ie=x(M,2,P-3),T=0,j=-2;j<=2;j++)for(var I=-2;I<=2;I++)T+=R.get(K+j,ie+I);for(var G=T/25,j=0;j<l;j++)for(var I=0;I<l;I++){var B=O*l+j,F=M*l+I,N=w.get(B,F);re.set(B,F,N<=G),y&&Z.set(B,F,!(N<=G))}}return y?{binarized:re,inverted:Z}:{binarized:re}}r.binarize=m}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var a=o(0),l=o(6),c=o(9),x=o(10);function f(S,k){for(var P=S^k,R=0;P;)R++,P&=P-1;return R}function m(S,k){return k<<1|S}var h=[{bits:21522,formatInfo:{errorCorrectionLevel:1,dataMask:0}},{bits:20773,formatInfo:{errorCorrectionLevel:1,dataMask:1}},{bits:24188,formatInfo:{errorCorrectionLevel:1,dataMask:2}},{bits:23371,formatInfo:{errorCorrectionLevel:1,dataMask:3}},{bits:17913,formatInfo:{errorCorrectionLevel:1,dataMask:4}},{bits:16590,formatInfo:{errorCorrectionLevel:1,dataMask:5}},{bits:20375,formatInfo:{errorCorrectionLevel:1,dataMask:6}},{bits:19104,formatInfo:{errorCorrectionLevel:1,dataMask:7}},{bits:30660,formatInfo:{errorCorrectionLevel:0,dataMask:0}},{bits:29427,formatInfo:{errorCorrectionLevel:0,dataMask:1}},{bits:32170,formatInfo:{errorCorrectionLevel:0,dataMask:2}},{bits:30877,formatInfo:{errorCorrectionLevel:0,dataMask:3}},{bits:26159,formatInfo:{errorCorrectionLevel:0,dataMask:4}},{bits:25368,formatInfo:{errorCorrectionLevel:0,dataMask:5}},{bits:27713,formatInfo:{errorCorrectionLevel:0,dataMask:6}},{bits:26998,formatInfo:{errorCorrectionLevel:0,dataMask:7}},{bits:5769,formatInfo:{errorCorrectionLevel:3,dataMask:0}},{bits:5054,formatInfo:{errorCorrectionLevel:3,dataMask:1}},{bits:7399,formatInfo:{errorCorrectionLevel:3,dataMask:2}},{bits:6608,formatInfo:{errorCorrectionLevel:3,dataMask:3}},{bits:1890,formatInfo:{errorCorrectionLevel:3,dataMask:4}},{bits:597,formatInfo:{errorCorrectionLevel:3,dataMask:5}},{bits:3340,formatInfo:{errorCorrectionLevel:3,dataMask:6}},{bits:2107,formatInfo:{errorCorrectionLevel:3,dataMask:7}},{bits:13663,formatInfo:{errorCorrectionLevel:2,dataMask:0}},{bits:12392,formatInfo:{errorCorrectionLevel:2,dataMask:1}},{bits:16177,formatInfo:{errorCorrectionLevel:2,dataMask:2}},{bits:14854,formatInfo:{errorCorrectionLevel:2,dataMask:3}},{bits:9396,formatInfo:{errorCorrectionLevel:2,dataMask:4}},{bits:8579,formatInfo:{errorCorrectionLevel:2,dataMask:5}},{bits:11994,formatInfo:{errorCorrectionLevel:2,dataMask:6}},{bits:11245,formatInfo:{errorCorrectionLevel:2,dataMask:7}}],E=[function(S){return(S.y+S.x)%2===0},function(S){return S.y%2===0},function(S){return S.x%3===0},function(S){return(S.y+S.x)%3===0},function(S){return(Math.floor(S.y/2)+Math.floor(S.x/3))%2===0},function(S){return S.x*S.y%2+S.x*S.y%3===0},function(S){return(S.y*S.x%2+S.y*S.x%3)%2===0},function(S){return((S.y+S.x)%2+S.y*S.x%3)%2===0}];function C(S){var k=17+4*S.versionNumber,P=a.BitMatrix.createEmpty(k,k);P.setRegion(0,0,9,9,!0),P.setRegion(k-8,0,8,9,!0),P.setRegion(0,k-8,9,8,!0);for(var R=0,M=S.alignmentPatternCenters;R<M.length;R++)for(var O=M[R],T=0,V=S.alignmentPatternCenters;T<V.length;T++){var z=V[T];O===6&&z===6||O===6&&z===k-7||O===k-7&&z===6||P.setRegion(O-2,z-2,5,5,!0)}return P.setRegion(6,9,1,k-17,!0),P.setRegion(9,6,k-17,1,!0),S.versionNumber>6&&(P.setRegion(k-11,0,3,6,!0),P.setRegion(0,k-11,6,3,!0)),P}function y(S,k,P){for(var R=E[P.dataMask],M=S.height,O=C(k),T=[],V=0,z=0,J=!0,H=M-1;H>0;H-=2){H===6&&H--;for(var W=0;W<M;W++)for(var re=J?M-1-W:W,Z=0;Z<2;Z++){var K=H-Z;if(!O.get(K,re)){z++;var ie=S.get(K,re);R({y:re,x:K})&&(ie=!ie),V=m(ie,V),z===8&&(T.push(V),z=0,V=0)}}J=!J}return T}function w(S){var k=S.height,P=Math.floor((k-17)/4);if(P<=6)return x.VERSIONS[P-1];for(var R=0,M=5;M>=0;M--)for(var O=k-9;O>=k-11;O--)R=m(S.get(O,M),R);for(var T=0,O=5;O>=0;O--)for(var M=k-9;M>=k-11;M--)T=m(S.get(O,M),T);for(var V=1/0,z,J=0,H=x.VERSIONS;J<H.length;J++){var W=H[J];if(W.infoBits===R||W.infoBits===T)return W;var re=f(R,W.infoBits);re<V&&(z=W,V=re),re=f(T,W.infoBits),re<V&&(z=W,V=re)}if(V<=3)return z}function B(S){for(var k=0,P=0;P<=8;P++)P!==6&&(k=m(S.get(P,8),k));for(var R=7;R>=0;R--)R!==6&&(k=m(S.get(8,R),k));for(var M=S.height,O=0,R=M-1;R>=M-7;R--)O=m(S.get(8,R),O);for(var P=M-8;P<M;P++)O=m(S.get(P,8),O);for(var T=1/0,V=null,z=0,J=h;z<J.length;z++){var H=J[z],W=H.bits,re=H.formatInfo;if(W===k||W===O)return re;var Z=f(k,W);Z<T&&(V=re,T=Z),k!==O&&(Z=f(O,W),Z<T&&(V=re,T=Z))}return T<=3?V:null}function F(S,k,P){var R=k.errorCorrectionLevels[P],M=[],O=0;if(R.ecBlocks.forEach(function(ie){for(var j=0;j<ie.numBlocks;j++)M.push({numDataCodewords:ie.dataCodewordsPerBlock,codewords:[]}),O+=ie.dataCodewordsPerBlock+R.ecCodewordsPerBlock}),S.length<O)return null;S=S.slice(0,O);for(var T=R.ecBlocks[0].dataCodewordsPerBlock,V=0;V<T;V++)for(var z=0,J=M;z<J.length;z++){var H=J[z];H.codewords.push(S.shift())}if(R.ecBlocks.length>1)for(var W=R.ecBlocks[0].numBlocks,re=R.ecBlocks[1].numBlocks,V=0;V<re;V++)M[W+V].codewords.push(S.shift());for(;S.length>0;)for(var Z=0,K=M;Z<K.length;Z++){var H=K[Z];H.codewords.push(S.shift())}return M}function b(S){var k=w(S);if(!k)return null;var P=B(S);if(!P)return null;var R=y(S,k,P),M=F(R,k,P.errorCorrectionLevel);if(!M)return null;for(var O=M.reduce(function(Z,K){return Z+K.numDataCodewords},0),T=new Uint8ClampedArray(O),V=0,z=0,J=M;z<J.length;z++){var H=J[z],W=c.decode(H.codewords,H.codewords.length-H.numDataCodewords);if(!W)return null;for(var re=0;re<H.numDataCodewords;re++)T[V++]=W[re]}try{return l.decode(T,k.versionNumber)}catch{return null}}function D(S){if(S==null)return null;var k=b(S);if(k)return k;for(var P=0;P<S.width;P++)for(var R=P+1;R<S.height;R++)S.get(P,R)!==S.get(R,P)&&(S.set(P,R,!S.get(P,R)),S.set(R,P,!S.get(R,P)));return b(S)}r.decode=D}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var a=o(7),l=o(8),c;(function(w){w.Numeric="numeric",w.Alphanumeric="alphanumeric",w.Byte="byte",w.Kanji="kanji",w.ECI="eci"})(c=r.Mode||(r.Mode={}));var x;(function(w){w[w.Terminator=0]="Terminator",w[w.Numeric=1]="Numeric",w[w.Alphanumeric=2]="Alphanumeric",w[w.Byte=4]="Byte",w[w.Kanji=8]="Kanji",w[w.ECI=7]="ECI"})(x||(x={}));function f(w,B){for(var F=[],b="",D=[10,12,14][B],S=w.readBits(D);S>=3;){var k=w.readBits(10);if(k>=1e3)throw new Error("Invalid numeric value above 999");var P=Math.floor(k/100),R=Math.floor(k/10)%10,M=k%10;F.push(48+P,48+R,48+M),b+=P.toString()+R.toString()+M.toString(),S-=3}if(S===2){var k=w.readBits(7);if(k>=100)throw new Error("Invalid numeric value above 99");var P=Math.floor(k/10),R=k%10;F.push(48+P,48+R),b+=P.toString()+R.toString()}else if(S===1){var k=w.readBits(4);if(k>=10)throw new Error("Invalid numeric value above 9");F.push(48+k),b+=k.toString()}return{bytes:F,text:b}}var m=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function h(w,B){for(var F=[],b="",D=[9,11,13][B],S=w.readBits(D);S>=2;){var k=w.readBits(11),P=Math.floor(k/45),R=k%45;F.push(m[P].charCodeAt(0),m[R].charCodeAt(0)),b+=m[P]+m[R],S-=2}if(S===1){var P=w.readBits(6);F.push(m[P].charCodeAt(0)),b+=m[P]}return{bytes:F,text:b}}function E(w,B){for(var F=[],b="",D=[8,16,16][B],S=w.readBits(D),k=0;k<S;k++){var P=w.readBits(8);F.push(P)}try{b+=decodeURIComponent(F.map(function(R){return"%"+("0"+R.toString(16)).substr(-2)}).join(""))}catch{}return{bytes:F,text:b}}function C(w,B){for(var F=[],b="",D=[8,10,12][B],S=w.readBits(D),k=0;k<S;k++){var P=w.readBits(13),R=Math.floor(P/192)<<8|P%192;R<7936?R+=33088:R+=49472,F.push(R>>8,R&255),b+=String.fromCharCode(l.shiftJISTable[R])}return{bytes:F,text:b}}function y(w,B){for(var F,b,D,S,k=new a.BitStream(w),P=B<=9?0:B<=26?1:2,R={text:"",bytes:[],chunks:[],version:B};k.available()>=4;){var M=k.readBits(4);if(M===x.Terminator)return R;if(M===x.ECI)k.readBits(1)===0?R.chunks.push({type:c.ECI,assignmentNumber:k.readBits(7)}):k.readBits(1)===0?R.chunks.push({type:c.ECI,assignmentNumber:k.readBits(14)}):k.readBits(1)===0?R.chunks.push({type:c.ECI,assignmentNumber:k.readBits(21)}):R.chunks.push({type:c.ECI,assignmentNumber:-1});else if(M===x.Numeric){var O=f(k,P);R.text+=O.text,(F=R.bytes).push.apply(F,O.bytes),R.chunks.push({type:c.Numeric,text:O.text})}else if(M===x.Alphanumeric){var T=h(k,P);R.text+=T.text,(b=R.bytes).push.apply(b,T.bytes),R.chunks.push({type:c.Alphanumeric,text:T.text})}else if(M===x.Byte){var V=E(k,P);R.text+=V.text,(D=R.bytes).push.apply(D,V.bytes),R.chunks.push({type:c.Byte,bytes:V.bytes,text:V.text})}else if(M===x.Kanji){var z=C(k,P);R.text+=z.text,(S=R.bytes).push.apply(S,z.bytes),R.chunks.push({type:c.Kanji,bytes:z.bytes,text:z.text})}}if(k.available()===0||k.readBits(k.available())===0)return R}r.decode=y}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function l(c){this.byteOffset=0,this.bitOffset=0,this.bytes=c}return l.prototype.readBits=function(c){if(c<1||c>32||c>this.available())throw new Error("Cannot read "+c.toString()+" bits");var x=0;if(this.bitOffset>0){var f=8-this.bitOffset,m=c<f?c:f,h=f-m,E=255>>8-m<<h;x=(this.bytes[this.byteOffset]&E)>>h,c-=m,this.bitOffset+=m,this.bitOffset===8&&(this.bitOffset=0,this.byteOffset++)}if(c>0){for(;c>=8;)x=x<<8|this.bytes[this.byteOffset]&255,this.byteOffset++,c-=8;if(c>0){var h=8-c,E=255>>h<<h;x=x<<c|(this.bytes[this.byteOffset]&E)>>h,this.bitOffset+=c}}return x},l.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},l})();r.BitStream=a}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.shiftJISTable={32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,41:41,42:42,43:43,44:44,45:45,46:46,47:47,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,58:58,59:59,60:60,61:61,62:62,63:63,64:64,65:65,66:66,67:67,68:68,69:69,70:70,71:71,72:72,73:73,74:74,75:75,76:76,77:77,78:78,79:79,80:80,81:81,82:82,83:83,84:84,85:85,86:86,87:87,88:88,89:89,90:90,91:91,92:165,93:93,94:94,95:95,96:96,97:97,98:98,99:99,100:100,101:101,102:102,103:103,104:104,105:105,106:106,107:107,108:108,109:109,110:110,111:111,112:112,113:113,114:114,115:115,116:116,117:117,118:118,119:119,120:120,121:121,122:122,123:123,124:124,125:125,126:8254,33088:12288,33089:12289,33090:12290,33091:65292,33092:65294,33093:12539,33094:65306,33095:65307,33096:65311,33097:65281,33098:12443,33099:12444,33100:180,33101:65344,33102:168,33103:65342,33104:65507,33105:65343,33106:12541,33107:12542,33108:12445,33109:12446,33110:12291,33111:20189,33112:12293,33113:12294,33114:12295,33115:12540,33116:8213,33117:8208,33118:65295,33119:92,33120:12316,33121:8214,33122:65372,33123:8230,33124:8229,33125:8216,33126:8217,33127:8220,33128:8221,33129:65288,33130:65289,33131:12308,33132:12309,33133:65339,33134:65341,33135:65371,33136:65373,33137:12296,33138:12297,33139:12298,33140:12299,33141:12300,33142:12301,33143:12302,33144:12303,33145:12304,33146:12305,33147:65291,33148:8722,33149:177,33150:215,33152:247,33153:65309,33154:8800,33155:65308,33156:65310,33157:8806,33158:8807,33159:8734,33160:8756,33161:9794,33162:9792,33163:176,33164:8242,33165:8243,33166:8451,33167:65509,33168:65284,33169:162,33170:163,33171:65285,33172:65283,33173:65286,33174:65290,33175:65312,33176:167,33177:9734,33178:9733,33179:9675,33180:9679,33181:9678,33182:9671,33183:9670,33184:9633,33185:9632,33186:9651,33187:9650,33188:9661,33189:9660,33190:8251,33191:12306,33192:8594,33193:8592,33194:8593,33195:8595,33196:12307,33208:8712,33209:8715,33210:8838,33211:8839,33212:8834,33213:8835,33214:8746,33215:8745,33224:8743,33225:8744,33226:172,33227:8658,33228:8660,33229:8704,33230:8707,33242:8736,33243:8869,33244:8978,33245:8706,33246:8711,33247:8801,33248:8786,33249:8810,33250:8811,33251:8730,33252:8765,33253:8733,33254:8757,33255:8747,33256:8748,33264:8491,33265:8240,33266:9839,33267:9837,33268:9834,33269:8224,33270:8225,33271:182,33276:9711,33359:65296,33360:65297,33361:65298,33362:65299,33363:65300,33364:65301,33365:65302,33366:65303,33367:65304,33368:65305,33376:65313,33377:65314,33378:65315,33379:65316,33380:65317,33381:65318,33382:65319,33383:65320,33384:65321,33385:65322,33386:65323,33387:65324,33388:65325,33389:65326,33390:65327,33391:65328,33392:65329,33393:65330,33394:65331,33395:65332,33396:65333,33397:65334,33398:65335,33399:65336,33400:65337,33401:65338,33409:65345,33410:65346,33411:65347,33412:65348,33413:65349,33414:65350,33415:65351,33416:65352,33417:65353,33418:65354,33419:65355,33420:65356,33421:65357,33422:65358,33423:65359,33424:65360,33425:65361,33426:65362,33427:65363,33428:65364,33429:65365,33430:65366,33431:65367,33432:65368,33433:65369,33434:65370,33439:12353,33440:12354,33441:12355,33442:12356,33443:12357,33444:12358,33445:12359,33446:12360,33447:12361,33448:12362,33449:12363,33450:12364,33451:12365,33452:12366,33453:12367,33454:12368,33455:12369,33456:12370,33457:12371,33458:12372,33459:12373,33460:12374,33461:12375,33462:12376,33463:12377,33464:12378,33465:12379,33466:12380,33467:12381,33468:12382,33469:12383,33470:12384,33471:12385,33472:12386,33473:12387,33474:12388,33475:12389,33476:12390,33477:12391,33478:12392,33479:12393,33480:12394,33481:12395,33482:12396,33483:12397,33484:12398,33485:12399,33486:12400,33487:12401,33488:12402,33489:12403,33490:12404,33491:12405,33492:12406,33493:12407,33494:12408,33495:12409,33496:12410,33497:12411,33498:12412,33499:12413,33500:12414,33501:12415,33502:12416,33503:12417,33504:12418,33505:12419,33506:12420,33507:12421,33508:12422,33509:12423,33510:12424,33511:12425,33512:12426,33513:12427,33514:12428,33515:12429,33516:12430,33517:12431,33518:12432,33519:12433,33520:12434,33521:12435,33600:12449,33601:12450,33602:12451,33603:12452,33604:12453,33605:12454,33606:12455,33607:12456,33608:12457,33609:12458,33610:12459,33611:12460,33612:12461,33613:12462,33614:12463,33615:12464,33616:12465,33617:12466,33618:12467,33619:12468,33620:12469,33621:12470,33622:12471,33623:12472,33624:12473,33625:12474,33626:12475,33627:12476,33628:12477,33629:12478,33630:12479,33631:12480,33632:12481,33633:12482,33634:12483,33635:12484,33636:12485,33637:12486,33638:12487,33639:12488,33640:12489,33641:12490,33642:12491,33643:12492,33644:12493,33645:12494,33646:12495,33647:12496,33648:12497,33649:12498,33650:12499,33651:12500,33652:12501,33653:12502,33654:12503,33655:12504,33656:12505,33657:12506,33658:12507,33659:12508,33660:12509,33661:12510,33662:12511,33664:12512,33665:12513,33666:12514,33667:12515,33668:12516,33669:12517,33670:12518,33671:12519,33672:12520,33673:12521,33674:12522,33675:12523,33676:12524,33677:12525,33678:12526,33679:12527,33680:12528,33681:12529,33682:12530,33683:12531,33684:12532,33685:12533,33686:12534,33695:913,33696:914,33697:915,33698:916,33699:917,33700:918,33701:919,33702:920,33703:921,33704:922,33705:923,33706:924,33707:925,33708:926,33709:927,33710:928,33711:929,33712:931,33713:932,33714:933,33715:934,33716:935,33717:936,33718:937,33727:945,33728:946,33729:947,33730:948,33731:949,33732:950,33733:951,33734:952,33735:953,33736:954,33737:955,33738:956,33739:957,33740:958,33741:959,33742:960,33743:961,33744:963,33745:964,33746:965,33747:966,33748:967,33749:968,33750:969,33856:1040,33857:1041,33858:1042,33859:1043,33860:1044,33861:1045,33862:1025,33863:1046,33864:1047,33865:1048,33866:1049,33867:1050,33868:1051,33869:1052,33870:1053,33871:1054,33872:1055,33873:1056,33874:1057,33875:1058,33876:1059,33877:1060,33878:1061,33879:1062,33880:1063,33881:1064,33882:1065,33883:1066,33884:1067,33885:1068,33886:1069,33887:1070,33888:1071,33904:1072,33905:1073,33906:1074,33907:1075,33908:1076,33909:1077,33910:1105,33911:1078,33912:1079,33913:1080,33914:1081,33915:1082,33916:1083,33917:1084,33918:1085,33920:1086,33921:1087,33922:1088,33923:1089,33924:1090,33925:1091,33926:1092,33927:1093,33928:1094,33929:1095,33930:1096,33931:1097,33932:1098,33933:1099,33934:1100,33935:1101,33936:1102,33937:1103,33951:9472,33952:9474,33953:9484,33954:9488,33955:9496,33956:9492,33957:9500,33958:9516,33959:9508,33960:9524,33961:9532,33962:9473,33963:9475,33964:9487,33965:9491,33966:9499,33967:9495,33968:9507,33969:9523,33970:9515,33971:9531,33972:9547,33973:9504,33974:9519,33975:9512,33976:9527,33977:9535,33978:9501,33979:9520,33980:9509,33981:9528,33982:9538,34975:20124,34976:21782,34977:23043,34978:38463,34979:21696,34980:24859,34981:25384,34982:23030,34983:36898,34984:33909,34985:33564,34986:31312,34987:24746,34988:25569,34989:28197,34990:26093,34991:33894,34992:33446,34993:39925,34994:26771,34995:22311,34996:26017,34997:25201,34998:23451,34999:22992,35e3:34427,35001:39156,35002:32098,35003:32190,35004:39822,35005:25110,35006:31903,35007:34999,35008:23433,35009:24245,35010:25353,35011:26263,35012:26696,35013:38343,35014:38797,35015:26447,35016:20197,35017:20234,35018:20301,35019:20381,35020:20553,35021:22258,35022:22839,35023:22996,35024:23041,35025:23561,35026:24799,35027:24847,35028:24944,35029:26131,35030:26885,35031:28858,35032:30031,35033:30064,35034:31227,35035:32173,35036:32239,35037:32963,35038:33806,35039:34915,35040:35586,35041:36949,35042:36986,35043:21307,35044:20117,35045:20133,35046:22495,35047:32946,35048:37057,35049:30959,35050:19968,35051:22769,35052:28322,35053:36920,35054:31282,35055:33576,35056:33419,35057:39983,35058:20801,35059:21360,35060:21693,35061:21729,35062:22240,35063:23035,35064:24341,35065:39154,35066:28139,35067:32996,35068:34093,35136:38498,35137:38512,35138:38560,35139:38907,35140:21515,35141:21491,35142:23431,35143:28879,35144:32701,35145:36802,35146:38632,35147:21359,35148:40284,35149:31418,35150:19985,35151:30867,35152:33276,35153:28198,35154:22040,35155:21764,35156:27421,35157:34074,35158:39995,35159:23013,35160:21417,35161:28006,35162:29916,35163:38287,35164:22082,35165:20113,35166:36939,35167:38642,35168:33615,35169:39180,35170:21473,35171:21942,35172:23344,35173:24433,35174:26144,35175:26355,35176:26628,35177:27704,35178:27891,35179:27945,35180:29787,35181:30408,35182:31310,35183:38964,35184:33521,35185:34907,35186:35424,35187:37613,35188:28082,35189:30123,35190:30410,35191:39365,35192:24742,35193:35585,35194:36234,35195:38322,35196:27022,35197:21421,35198:20870,35200:22290,35201:22576,35202:22852,35203:23476,35204:24310,35205:24616,35206:25513,35207:25588,35208:27839,35209:28436,35210:28814,35211:28948,35212:29017,35213:29141,35214:29503,35215:32257,35216:33398,35217:33489,35218:34199,35219:36960,35220:37467,35221:40219,35222:22633,35223:26044,35224:27738,35225:29989,35226:20985,35227:22830,35228:22885,35229:24448,35230:24540,35231:25276,35232:26106,35233:27178,35234:27431,35235:27572,35236:29579,35237:32705,35238:35158,35239:40236,35240:40206,35241:40644,35242:23713,35243:27798,35244:33659,35245:20740,35246:23627,35247:25014,35248:33222,35249:26742,35250:29281,35251:20057,35252:20474,35253:21368,35254:24681,35255:28201,35256:31311,35257:38899,35258:19979,35259:21270,35260:20206,35261:20309,35262:20285,35263:20385,35264:20339,35265:21152,35266:21487,35267:22025,35268:22799,35269:23233,35270:23478,35271:23521,35272:31185,35273:26247,35274:26524,35275:26550,35276:27468,35277:27827,35278:28779,35279:29634,35280:31117,35281:31166,35282:31292,35283:31623,35284:33457,35285:33499,35286:33540,35287:33655,35288:33775,35289:33747,35290:34662,35291:35506,35292:22057,35293:36008,35294:36838,35295:36942,35296:38686,35297:34442,35298:20420,35299:23784,35300:25105,35301:29273,35302:30011,35303:33253,35304:33469,35305:34558,35306:36032,35307:38597,35308:39187,35309:39381,35310:20171,35311:20250,35312:35299,35313:22238,35314:22602,35315:22730,35316:24315,35317:24555,35318:24618,35319:24724,35320:24674,35321:25040,35322:25106,35323:25296,35324:25913,35392:39745,35393:26214,35394:26800,35395:28023,35396:28784,35397:30028,35398:30342,35399:32117,35400:33445,35401:34809,35402:38283,35403:38542,35404:35997,35405:20977,35406:21182,35407:22806,35408:21683,35409:23475,35410:23830,35411:24936,35412:27010,35413:28079,35414:30861,35415:33995,35416:34903,35417:35442,35418:37799,35419:39608,35420:28012,35421:39336,35422:34521,35423:22435,35424:26623,35425:34510,35426:37390,35427:21123,35428:22151,35429:21508,35430:24275,35431:25313,35432:25785,35433:26684,35434:26680,35435:27579,35436:29554,35437:30906,35438:31339,35439:35226,35440:35282,35441:36203,35442:36611,35443:37101,35444:38307,35445:38548,35446:38761,35447:23398,35448:23731,35449:27005,35450:38989,35451:38990,35452:25499,35453:31520,35454:27179,35456:27263,35457:26806,35458:39949,35459:28511,35460:21106,35461:21917,35462:24688,35463:25324,35464:27963,35465:28167,35466:28369,35467:33883,35468:35088,35469:36676,35470:19988,35471:39993,35472:21494,35473:26907,35474:27194,35475:38788,35476:26666,35477:20828,35478:31427,35479:33970,35480:37340,35481:37772,35482:22107,35483:40232,35484:26658,35485:33541,35486:33841,35487:31909,35488:21e3,35489:33477,35490:29926,35491:20094,35492:20355,35493:20896,35494:23506,35495:21002,35496:21208,35497:21223,35498:24059,35499:21914,35500:22570,35501:23014,35502:23436,35503:23448,35504:23515,35505:24178,35506:24185,35507:24739,35508:24863,35509:24931,35510:25022,35511:25563,35512:25954,35513:26577,35514:26707,35515:26874,35516:27454,35517:27475,35518:27735,35519:28450,35520:28567,35521:28485,35522:29872,35523:29976,35524:30435,35525:30475,35526:31487,35527:31649,35528:31777,35529:32233,35530:32566,35531:32752,35532:32925,35533:33382,35534:33694,35535:35251,35536:35532,35537:36011,35538:36996,35539:37969,35540:38291,35541:38289,35542:38306,35543:38501,35544:38867,35545:39208,35546:33304,35547:20024,35548:21547,35549:23736,35550:24012,35551:29609,35552:30284,35553:30524,35554:23721,35555:32747,35556:36107,35557:38593,35558:38929,35559:38996,35560:39e3,35561:20225,35562:20238,35563:21361,35564:21916,35565:22120,35566:22522,35567:22855,35568:23305,35569:23492,35570:23696,35571:24076,35572:24190,35573:24524,35574:25582,35575:26426,35576:26071,35577:26082,35578:26399,35579:26827,35580:26820,35648:27231,35649:24112,35650:27589,35651:27671,35652:27773,35653:30079,35654:31048,35655:23395,35656:31232,35657:32e3,35658:24509,35659:35215,35660:35352,35661:36020,35662:36215,35663:36556,35664:36637,35665:39138,35666:39438,35667:39740,35668:20096,35669:20605,35670:20736,35671:22931,35672:23452,35673:25135,35674:25216,35675:25836,35676:27450,35677:29344,35678:30097,35679:31047,35680:32681,35681:34811,35682:35516,35683:35696,35684:25516,35685:33738,35686:38816,35687:21513,35688:21507,35689:21931,35690:26708,35691:27224,35692:35440,35693:30759,35694:26485,35695:40653,35696:21364,35697:23458,35698:33050,35699:34384,35700:36870,35701:19992,35702:20037,35703:20167,35704:20241,35705:21450,35706:21560,35707:23470,35708:24339,35709:24613,35710:25937,35712:26429,35713:27714,35714:27762,35715:27875,35716:28792,35717:29699,35718:31350,35719:31406,35720:31496,35721:32026,35722:31998,35723:32102,35724:26087,35725:29275,35726:21435,35727:23621,35728:24040,35729:25298,35730:25312,35731:25369,35732:28192,35733:34394,35734:35377,35735:36317,35736:37624,35737:28417,35738:31142,35739:39770,35740:20136,35741:20139,35742:20140,35743:20379,35744:20384,35745:20689,35746:20807,35747:31478,35748:20849,35749:20982,35750:21332,35751:21281,35752:21375,35753:21483,35754:21932,35755:22659,35756:23777,35757:24375,35758:24394,35759:24623,35760:24656,35761:24685,35762:25375,35763:25945,35764:27211,35765:27841,35766:29378,35767:29421,35768:30703,35769:33016,35770:33029,35771:33288,35772:34126,35773:37111,35774:37857,35775:38911,35776:39255,35777:39514,35778:20208,35779:20957,35780:23597,35781:26241,35782:26989,35783:23616,35784:26354,35785:26997,35786:29577,35787:26704,35788:31873,35789:20677,35790:21220,35791:22343,35792:24062,35793:37670,35794:26020,35795:27427,35796:27453,35797:29748,35798:31105,35799:31165,35800:31563,35801:32202,35802:33465,35803:33740,35804:34943,35805:35167,35806:35641,35807:36817,35808:37329,35809:21535,35810:37504,35811:20061,35812:20534,35813:21477,35814:21306,35815:29399,35816:29590,35817:30697,35818:33510,35819:36527,35820:39366,35821:39368,35822:39378,35823:20855,35824:24858,35825:34398,35826:21936,35827:31354,35828:20598,35829:23507,35830:36935,35831:38533,35832:20018,35833:27355,35834:37351,35835:23633,35836:23624,35904:25496,35905:31391,35906:27795,35907:38772,35908:36705,35909:31402,35910:29066,35911:38536,35912:31874,35913:26647,35914:32368,35915:26705,35916:37740,35917:21234,35918:21531,35919:34219,35920:35347,35921:32676,35922:36557,35923:37089,35924:21350,35925:34952,35926:31041,35927:20418,35928:20670,35929:21009,35930:20804,35931:21843,35932:22317,35933:29674,35934:22411,35935:22865,35936:24418,35937:24452,35938:24693,35939:24950,35940:24935,35941:25001,35942:25522,35943:25658,35944:25964,35945:26223,35946:26690,35947:28179,35948:30054,35949:31293,35950:31995,35951:32076,35952:32153,35953:32331,35954:32619,35955:33550,35956:33610,35957:34509,35958:35336,35959:35427,35960:35686,35961:36605,35962:38938,35963:40335,35964:33464,35965:36814,35966:39912,35968:21127,35969:25119,35970:25731,35971:28608,35972:38553,35973:26689,35974:20625,35975:27424,35976:27770,35977:28500,35978:31348,35979:32080,35980:34880,35981:35363,35982:26376,35983:20214,35984:20537,35985:20518,35986:20581,35987:20860,35988:21048,35989:21091,35990:21927,35991:22287,35992:22533,35993:23244,35994:24314,35995:25010,35996:25080,35997:25331,35998:25458,35999:26908,36e3:27177,36001:29309,36002:29356,36003:29486,36004:30740,36005:30831,36006:32121,36007:30476,36008:32937,36009:35211,36010:35609,36011:36066,36012:36562,36013:36963,36014:37749,36015:38522,36016:38997,36017:39443,36018:40568,36019:20803,36020:21407,36021:21427,36022:24187,36023:24358,36024:28187,36025:28304,36026:29572,36027:29694,36028:32067,36029:33335,36030:35328,36031:35578,36032:38480,36033:20046,36034:20491,36035:21476,36036:21628,36037:22266,36038:22993,36039:23396,36040:24049,36041:24235,36042:24359,36043:25144,36044:25925,36045:26543,36046:28246,36047:29392,36048:31946,36049:34996,36050:32929,36051:32993,36052:33776,36053:34382,36054:35463,36055:36328,36056:37431,36057:38599,36058:39015,36059:40723,36060:20116,36061:20114,36062:20237,36063:21320,36064:21577,36065:21566,36066:23087,36067:24460,36068:24481,36069:24735,36070:26791,36071:27278,36072:29786,36073:30849,36074:35486,36075:35492,36076:35703,36077:37264,36078:20062,36079:39881,36080:20132,36081:20348,36082:20399,36083:20505,36084:20502,36085:20809,36086:20844,36087:21151,36088:21177,36089:21246,36090:21402,36091:21475,36092:21521,36160:21518,36161:21897,36162:22353,36163:22434,36164:22909,36165:23380,36166:23389,36167:23439,36168:24037,36169:24039,36170:24055,36171:24184,36172:24195,36173:24218,36174:24247,36175:24344,36176:24658,36177:24908,36178:25239,36179:25304,36180:25511,36181:25915,36182:26114,36183:26179,36184:26356,36185:26477,36186:26657,36187:26775,36188:27083,36189:27743,36190:27946,36191:28009,36192:28207,36193:28317,36194:30002,36195:30343,36196:30828,36197:31295,36198:31968,36199:32005,36200:32024,36201:32094,36202:32177,36203:32789,36204:32771,36205:32943,36206:32945,36207:33108,36208:33167,36209:33322,36210:33618,36211:34892,36212:34913,36213:35611,36214:36002,36215:36092,36216:37066,36217:37237,36218:37489,36219:30783,36220:37628,36221:38308,36222:38477,36224:38917,36225:39321,36226:39640,36227:40251,36228:21083,36229:21163,36230:21495,36231:21512,36232:22741,36233:25335,36234:28640,36235:35946,36236:36703,36237:40633,36238:20811,36239:21051,36240:21578,36241:22269,36242:31296,36243:37239,36244:40288,36245:40658,36246:29508,36247:28425,36248:33136,36249:29969,36250:24573,36251:24794,36252:39592,36253:29403,36254:36796,36255:27492,36256:38915,36257:20170,36258:22256,36259:22372,36260:22718,36261:23130,36262:24680,36263:25031,36264:26127,36265:26118,36266:26681,36267:26801,36268:28151,36269:30165,36270:32058,36271:33390,36272:39746,36273:20123,36274:20304,36275:21449,36276:21766,36277:23919,36278:24038,36279:24046,36280:26619,36281:27801,36282:29811,36283:30722,36284:35408,36285:37782,36286:35039,36287:22352,36288:24231,36289:25387,36290:20661,36291:20652,36292:20877,36293:26368,36294:21705,36295:22622,36296:22971,36297:23472,36298:24425,36299:25165,36300:25505,36301:26685,36302:27507,36303:28168,36304:28797,36305:37319,36306:29312,36307:30741,36308:30758,36309:31085,36310:25998,36311:32048,36312:33756,36313:35009,36314:36617,36315:38555,36316:21092,36317:22312,36318:26448,36319:32618,36320:36001,36321:20916,36322:22338,36323:38442,36324:22586,36325:27018,36326:32948,36327:21682,36328:23822,36329:22524,36330:30869,36331:40442,36332:20316,36333:21066,36334:21643,36335:25662,36336:26152,36337:26388,36338:26613,36339:31364,36340:31574,36341:32034,36342:37679,36343:26716,36344:39853,36345:31545,36346:21273,36347:20874,36348:21047,36416:23519,36417:25334,36418:25774,36419:25830,36420:26413,36421:27578,36422:34217,36423:38609,36424:30352,36425:39894,36426:25420,36427:37638,36428:39851,36429:30399,36430:26194,36431:19977,36432:20632,36433:21442,36434:23665,36435:24808,36436:25746,36437:25955,36438:26719,36439:29158,36440:29642,36441:29987,36442:31639,36443:32386,36444:34453,36445:35715,36446:36059,36447:37240,36448:39184,36449:26028,36450:26283,36451:27531,36452:20181,36453:20180,36454:20282,36455:20351,36456:21050,36457:21496,36458:21490,36459:21987,36460:22235,36461:22763,36462:22987,36463:22985,36464:23039,36465:23376,36466:23629,36467:24066,36468:24107,36469:24535,36470:24605,36471:25351,36472:25903,36473:23388,36474:26031,36475:26045,36476:26088,36477:26525,36478:27490,36480:27515,36481:27663,36482:29509,36483:31049,36484:31169,36485:31992,36486:32025,36487:32043,36488:32930,36489:33026,36490:33267,36491:35222,36492:35422,36493:35433,36494:35430,36495:35468,36496:35566,36497:36039,36498:36060,36499:38604,36500:39164,36501:27503,36502:20107,36503:20284,36504:20365,36505:20816,36506:23383,36507:23546,36508:24904,36509:25345,36510:26178,36511:27425,36512:28363,36513:27835,36514:29246,36515:29885,36516:30164,36517:30913,36518:31034,36519:32780,36520:32819,36521:33258,36522:33940,36523:36766,36524:27728,36525:40575,36526:24335,36527:35672,36528:40235,36529:31482,36530:36600,36531:23437,36532:38635,36533:19971,36534:21489,36535:22519,36536:22833,36537:23241,36538:23460,36539:24713,36540:28287,36541:28422,36542:30142,36543:36074,36544:23455,36545:34048,36546:31712,36547:20594,36548:26612,36549:33437,36550:23649,36551:34122,36552:32286,36553:33294,36554:20889,36555:23556,36556:25448,36557:36198,36558:26012,36559:29038,36560:31038,36561:32023,36562:32773,36563:35613,36564:36554,36565:36974,36566:34503,36567:37034,36568:20511,36569:21242,36570:23610,36571:26451,36572:28796,36573:29237,36574:37196,36575:37320,36576:37675,36577:33509,36578:23490,36579:24369,36580:24825,36581:20027,36582:21462,36583:23432,36584:25163,36585:26417,36586:27530,36587:29417,36588:29664,36589:31278,36590:33131,36591:36259,36592:37202,36593:39318,36594:20754,36595:21463,36596:21610,36597:23551,36598:25480,36599:27193,36600:32172,36601:38656,36602:22234,36603:21454,36604:21608,36672:23447,36673:23601,36674:24030,36675:20462,36676:24833,36677:25342,36678:27954,36679:31168,36680:31179,36681:32066,36682:32333,36683:32722,36684:33261,36685:33311,36686:33936,36687:34886,36688:35186,36689:35728,36690:36468,36691:36655,36692:36913,36693:37195,36694:37228,36695:38598,36696:37276,36697:20160,36698:20303,36699:20805,36700:21313,36701:24467,36702:25102,36703:26580,36704:27713,36705:28171,36706:29539,36707:32294,36708:37325,36709:37507,36710:21460,36711:22809,36712:23487,36713:28113,36714:31069,36715:32302,36716:31899,36717:22654,36718:29087,36719:20986,36720:34899,36721:36848,36722:20426,36723:23803,36724:26149,36725:30636,36726:31459,36727:33308,36728:39423,36729:20934,36730:24490,36731:26092,36732:26991,36733:27529,36734:28147,36736:28310,36737:28516,36738:30462,36739:32020,36740:24033,36741:36981,36742:37255,36743:38918,36744:20966,36745:21021,36746:25152,36747:26257,36748:26329,36749:28186,36750:24246,36751:32210,36752:32626,36753:26360,36754:34223,36755:34295,36756:35576,36757:21161,36758:21465,36759:22899,36760:24207,36761:24464,36762:24661,36763:37604,36764:38500,36765:20663,36766:20767,36767:21213,36768:21280,36769:21319,36770:21484,36771:21736,36772:21830,36773:21809,36774:22039,36775:22888,36776:22974,36777:23100,36778:23477,36779:23558,36780:23567,36781:23569,36782:23578,36783:24196,36784:24202,36785:24288,36786:24432,36787:25215,36788:25220,36789:25307,36790:25484,36791:25463,36792:26119,36793:26124,36794:26157,36795:26230,36796:26494,36797:26786,36798:27167,36799:27189,36800:27836,36801:28040,36802:28169,36803:28248,36804:28988,36805:28966,36806:29031,36807:30151,36808:30465,36809:30813,36810:30977,36811:31077,36812:31216,36813:31456,36814:31505,36815:31911,36816:32057,36817:32918,36818:33750,36819:33931,36820:34121,36821:34909,36822:35059,36823:35359,36824:35388,36825:35412,36826:35443,36827:35937,36828:36062,36829:37284,36830:37478,36831:37758,36832:37912,36833:38556,36834:38808,36835:19978,36836:19976,36837:19998,36838:20055,36839:20887,36840:21104,36841:22478,36842:22580,36843:22732,36844:23330,36845:24120,36846:24773,36847:25854,36848:26465,36849:26454,36850:27972,36851:29366,36852:30067,36853:31331,36854:33976,36855:35698,36856:37304,36857:37664,36858:22065,36859:22516,36860:39166,36928:25325,36929:26893,36930:27542,36931:29165,36932:32340,36933:32887,36934:33394,36935:35302,36936:39135,36937:34645,36938:36785,36939:23611,36940:20280,36941:20449,36942:20405,36943:21767,36944:23072,36945:23517,36946:23529,36947:24515,36948:24910,36949:25391,36950:26032,36951:26187,36952:26862,36953:27035,36954:28024,36955:28145,36956:30003,36957:30137,36958:30495,36959:31070,36960:31206,36961:32051,36962:33251,36963:33455,36964:34218,36965:35242,36966:35386,36967:36523,36968:36763,36969:36914,36970:37341,36971:38663,36972:20154,36973:20161,36974:20995,36975:22645,36976:22764,36977:23563,36978:29978,36979:23613,36980:33102,36981:35338,36982:36805,36983:38499,36984:38765,36985:31525,36986:35535,36987:38920,36988:37218,36989:22259,36990:21416,36992:36887,36993:21561,36994:22402,36995:24101,36996:25512,36997:27700,36998:28810,36999:30561,37e3:31883,37001:32736,37002:34928,37003:36930,37004:37204,37005:37648,37006:37656,37007:38543,37008:29790,37009:39620,37010:23815,37011:23913,37012:25968,37013:26530,37014:36264,37015:38619,37016:25454,37017:26441,37018:26905,37019:33733,37020:38935,37021:38592,37022:35070,37023:28548,37024:25722,37025:23544,37026:19990,37027:28716,37028:30045,37029:26159,37030:20932,37031:21046,37032:21218,37033:22995,37034:24449,37035:24615,37036:25104,37037:25919,37038:25972,37039:26143,37040:26228,37041:26866,37042:26646,37043:27491,37044:28165,37045:29298,37046:29983,37047:30427,37048:31934,37049:32854,37050:22768,37051:35069,37052:35199,37053:35488,37054:35475,37055:35531,37056:36893,37057:37266,37058:38738,37059:38745,37060:25993,37061:31246,37062:33030,37063:38587,37064:24109,37065:24796,37066:25114,37067:26021,37068:26132,37069:26512,37070:30707,37071:31309,37072:31821,37073:32318,37074:33034,37075:36012,37076:36196,37077:36321,37078:36447,37079:30889,37080:20999,37081:25305,37082:25509,37083:25666,37084:25240,37085:35373,37086:31363,37087:31680,37088:35500,37089:38634,37090:32118,37091:33292,37092:34633,37093:20185,37094:20808,37095:21315,37096:21344,37097:23459,37098:23554,37099:23574,37100:24029,37101:25126,37102:25159,37103:25776,37104:26643,37105:26676,37106:27849,37107:27973,37108:27927,37109:26579,37110:28508,37111:29006,37112:29053,37113:26059,37114:31359,37115:31661,37116:32218,37184:32330,37185:32680,37186:33146,37187:33307,37188:33337,37189:34214,37190:35438,37191:36046,37192:36341,37193:36984,37194:36983,37195:37549,37196:37521,37197:38275,37198:39854,37199:21069,37200:21892,37201:28472,37202:28982,37203:20840,37204:31109,37205:32341,37206:33203,37207:31950,37208:22092,37209:22609,37210:23720,37211:25514,37212:26366,37213:26365,37214:26970,37215:29401,37216:30095,37217:30094,37218:30990,37219:31062,37220:31199,37221:31895,37222:32032,37223:32068,37224:34311,37225:35380,37226:38459,37227:36961,37228:40736,37229:20711,37230:21109,37231:21452,37232:21474,37233:20489,37234:21930,37235:22766,37236:22863,37237:29245,37238:23435,37239:23652,37240:21277,37241:24803,37242:24819,37243:25436,37244:25475,37245:25407,37246:25531,37248:25805,37249:26089,37250:26361,37251:24035,37252:27085,37253:27133,37254:28437,37255:29157,37256:20105,37257:30185,37258:30456,37259:31379,37260:31967,37261:32207,37262:32156,37263:32865,37264:33609,37265:33624,37266:33900,37267:33980,37268:34299,37269:35013,37270:36208,37271:36865,37272:36973,37273:37783,37274:38684,37275:39442,37276:20687,37277:22679,37278:24974,37279:33235,37280:34101,37281:36104,37282:36896,37283:20419,37284:20596,37285:21063,37286:21363,37287:24687,37288:25417,37289:26463,37290:28204,37291:36275,37292:36895,37293:20439,37294:23646,37295:36042,37296:26063,37297:32154,37298:21330,37299:34966,37300:20854,37301:25539,37302:23384,37303:23403,37304:23562,37305:25613,37306:26449,37307:36956,37308:20182,37309:22810,37310:22826,37311:27760,37312:35409,37313:21822,37314:22549,37315:22949,37316:24816,37317:25171,37318:26561,37319:33333,37320:26965,37321:38464,37322:39364,37323:39464,37324:20307,37325:22534,37326:23550,37327:32784,37328:23729,37329:24111,37330:24453,37331:24608,37332:24907,37333:25140,37334:26367,37335:27888,37336:28382,37337:32974,37338:33151,37339:33492,37340:34955,37341:36024,37342:36864,37343:36910,37344:38538,37345:40667,37346:39899,37347:20195,37348:21488,37349:22823,37350:31532,37351:37261,37352:38988,37353:40441,37354:28381,37355:28711,37356:21331,37357:21828,37358:23429,37359:25176,37360:25246,37361:25299,37362:27810,37363:28655,37364:29730,37365:35351,37366:37944,37367:28609,37368:35582,37369:33592,37370:20967,37371:34552,37372:21482,37440:21481,37441:20294,37442:36948,37443:36784,37444:22890,37445:33073,37446:24061,37447:31466,37448:36799,37449:26842,37450:35895,37451:29432,37452:40008,37453:27197,37454:35504,37455:20025,37456:21336,37457:22022,37458:22374,37459:25285,37460:25506,37461:26086,37462:27470,37463:28129,37464:28251,37465:28845,37466:30701,37467:31471,37468:31658,37469:32187,37470:32829,37471:32966,37472:34507,37473:35477,37474:37723,37475:22243,37476:22727,37477:24382,37478:26029,37479:26262,37480:27264,37481:27573,37482:30007,37483:35527,37484:20516,37485:30693,37486:22320,37487:24347,37488:24677,37489:26234,37490:27744,37491:30196,37492:31258,37493:32622,37494:33268,37495:34584,37496:36933,37497:39347,37498:31689,37499:30044,37500:31481,37501:31569,37502:33988,37504:36880,37505:31209,37506:31378,37507:33590,37508:23265,37509:30528,37510:20013,37511:20210,37512:23449,37513:24544,37514:25277,37515:26172,37516:26609,37517:27880,37518:34411,37519:34935,37520:35387,37521:37198,37522:37619,37523:39376,37524:27159,37525:28710,37526:29482,37527:33511,37528:33879,37529:36015,37530:19969,37531:20806,37532:20939,37533:21899,37534:23541,37535:24086,37536:24115,37537:24193,37538:24340,37539:24373,37540:24427,37541:24500,37542:25074,37543:25361,37544:26274,37545:26397,37546:28526,37547:29266,37548:30010,37549:30522,37550:32884,37551:33081,37552:33144,37553:34678,37554:35519,37555:35548,37556:36229,37557:36339,37558:37530,37559:38263,37560:38914,37561:40165,37562:21189,37563:25431,37564:30452,37565:26389,37566:27784,37567:29645,37568:36035,37569:37806,37570:38515,37571:27941,37572:22684,37573:26894,37574:27084,37575:36861,37576:37786,37577:30171,37578:36890,37579:22618,37580:26626,37581:25524,37582:27131,37583:20291,37584:28460,37585:26584,37586:36795,37587:34086,37588:32180,37589:37716,37590:26943,37591:28528,37592:22378,37593:22775,37594:23340,37595:32044,37596:29226,37597:21514,37598:37347,37599:40372,37600:20141,37601:20302,37602:20572,37603:20597,37604:21059,37605:35998,37606:21576,37607:22564,37608:23450,37609:24093,37610:24213,37611:24237,37612:24311,37613:24351,37614:24716,37615:25269,37616:25402,37617:25552,37618:26799,37619:27712,37620:30855,37621:31118,37622:31243,37623:32224,37624:33351,37625:35330,37626:35558,37627:36420,37628:36883,37696:37048,37697:37165,37698:37336,37699:40718,37700:27877,37701:25688,37702:25826,37703:25973,37704:28404,37705:30340,37706:31515,37707:36969,37708:37841,37709:28346,37710:21746,37711:24505,37712:25764,37713:36685,37714:36845,37715:37444,37716:20856,37717:22635,37718:22825,37719:23637,37720:24215,37721:28155,37722:32399,37723:29980,37724:36028,37725:36578,37726:39003,37727:28857,37728:20253,37729:27583,37730:28593,37731:3e4,37732:38651,37733:20814,37734:21520,37735:22581,37736:22615,37737:22956,37738:23648,37739:24466,37740:26007,37741:26460,37742:28193,37743:30331,37744:33759,37745:36077,37746:36884,37747:37117,37748:37709,37749:30757,37750:30778,37751:21162,37752:24230,37753:22303,37754:22900,37755:24594,37756:20498,37757:20826,37758:20908,37760:20941,37761:20992,37762:21776,37763:22612,37764:22616,37765:22871,37766:23445,37767:23798,37768:23947,37769:24764,37770:25237,37771:25645,37772:26481,37773:26691,37774:26812,37775:26847,37776:30423,37777:28120,37778:28271,37779:28059,37780:28783,37781:29128,37782:24403,37783:30168,37784:31095,37785:31561,37786:31572,37787:31570,37788:31958,37789:32113,37790:21040,37791:33891,37792:34153,37793:34276,37794:35342,37795:35588,37796:35910,37797:36367,37798:36867,37799:36879,37800:37913,37801:38518,37802:38957,37803:39472,37804:38360,37805:20685,37806:21205,37807:21516,37808:22530,37809:23566,37810:24999,37811:25758,37812:27934,37813:30643,37814:31461,37815:33012,37816:33796,37817:36947,37818:37509,37819:23776,37820:40199,37821:21311,37822:24471,37823:24499,37824:28060,37825:29305,37826:30563,37827:31167,37828:31716,37829:27602,37830:29420,37831:35501,37832:26627,37833:27233,37834:20984,37835:31361,37836:26932,37837:23626,37838:40182,37839:33515,37840:23493,37841:37193,37842:28702,37843:22136,37844:23663,37845:24775,37846:25958,37847:27788,37848:35930,37849:36929,37850:38931,37851:21585,37852:26311,37853:37389,37854:22856,37855:37027,37856:20869,37857:20045,37858:20970,37859:34201,37860:35598,37861:28760,37862:25466,37863:37707,37864:26978,37865:39348,37866:32260,37867:30071,37868:21335,37869:26976,37870:36575,37871:38627,37872:27741,37873:20108,37874:23612,37875:24336,37876:36841,37877:21250,37878:36049,37879:32905,37880:34425,37881:24319,37882:26085,37883:20083,37884:20837,37952:22914,37953:23615,37954:38894,37955:20219,37956:22922,37957:24525,37958:35469,37959:28641,37960:31152,37961:31074,37962:23527,37963:33905,37964:29483,37965:29105,37966:24180,37967:24565,37968:25467,37969:25754,37970:29123,37971:31896,37972:20035,37973:24316,37974:20043,37975:22492,37976:22178,37977:24745,37978:28611,37979:32013,37980:33021,37981:33075,37982:33215,37983:36786,37984:35223,37985:34468,37986:24052,37987:25226,37988:25773,37989:35207,37990:26487,37991:27874,37992:27966,37993:29750,37994:30772,37995:23110,37996:32629,37997:33453,37998:39340,37999:20467,38e3:24259,38001:25309,38002:25490,38003:25943,38004:26479,38005:30403,38006:29260,38007:32972,38008:32954,38009:36649,38010:37197,38011:20493,38012:22521,38013:23186,38014:26757,38016:26995,38017:29028,38018:29437,38019:36023,38020:22770,38021:36064,38022:38506,38023:36889,38024:34687,38025:31204,38026:30695,38027:33833,38028:20271,38029:21093,38030:21338,38031:25293,38032:26575,38033:27850,38034:30333,38035:31636,38036:31893,38037:33334,38038:34180,38039:36843,38040:26333,38041:28448,38042:29190,38043:32283,38044:33707,38045:39361,38046:40614,38047:20989,38048:31665,38049:30834,38050:31672,38051:32903,38052:31560,38053:27368,38054:24161,38055:32908,38056:30033,38057:30048,38058:20843,38059:37474,38060:28300,38061:30330,38062:37271,38063:39658,38064:20240,38065:32624,38066:25244,38067:31567,38068:38309,38069:40169,38070:22138,38071:22617,38072:34532,38073:38588,38074:20276,38075:21028,38076:21322,38077:21453,38078:21467,38079:24070,38080:25644,38081:26001,38082:26495,38083:27710,38084:27726,38085:29256,38086:29359,38087:29677,38088:30036,38089:32321,38090:33324,38091:34281,38092:36009,38093:31684,38094:37318,38095:29033,38096:38930,38097:39151,38098:25405,38099:26217,38100:30058,38101:30436,38102:30928,38103:34115,38104:34542,38105:21290,38106:21329,38107:21542,38108:22915,38109:24199,38110:24444,38111:24754,38112:25161,38113:25209,38114:25259,38115:26e3,38116:27604,38117:27852,38118:30130,38119:30382,38120:30865,38121:31192,38122:32203,38123:32631,38124:32933,38125:34987,38126:35513,38127:36027,38128:36991,38129:38750,38130:39131,38131:27147,38132:31800,38133:20633,38134:23614,38135:24494,38136:26503,38137:27608,38138:29749,38139:30473,38140:32654,38208:40763,38209:26570,38210:31255,38211:21305,38212:30091,38213:39661,38214:24422,38215:33181,38216:33777,38217:32920,38218:24380,38219:24517,38220:30050,38221:31558,38222:36924,38223:26727,38224:23019,38225:23195,38226:32016,38227:30334,38228:35628,38229:20469,38230:24426,38231:27161,38232:27703,38233:28418,38234:29922,38235:31080,38236:34920,38237:35413,38238:35961,38239:24287,38240:25551,38241:30149,38242:31186,38243:33495,38244:37672,38245:37618,38246:33948,38247:34541,38248:39981,38249:21697,38250:24428,38251:25996,38252:27996,38253:28693,38254:36007,38255:36051,38256:38971,38257:25935,38258:29942,38259:19981,38260:20184,38261:22496,38262:22827,38263:23142,38264:23500,38265:20904,38266:24067,38267:24220,38268:24598,38269:25206,38270:25975,38272:26023,38273:26222,38274:28014,38275:29238,38276:31526,38277:33104,38278:33178,38279:33433,38280:35676,38281:36e3,38282:36070,38283:36212,38284:38428,38285:38468,38286:20398,38287:25771,38288:27494,38289:33310,38290:33889,38291:34154,38292:37096,38293:23553,38294:26963,38295:39080,38296:33914,38297:34135,38298:20239,38299:21103,38300:24489,38301:24133,38302:26381,38303:31119,38304:33145,38305:35079,38306:35206,38307:28149,38308:24343,38309:25173,38310:27832,38311:20175,38312:29289,38313:39826,38314:20998,38315:21563,38316:22132,38317:22707,38318:24996,38319:25198,38320:28954,38321:22894,38322:31881,38323:31966,38324:32027,38325:38640,38326:25991,38327:32862,38328:19993,38329:20341,38330:20853,38331:22592,38332:24163,38333:24179,38334:24330,38335:26564,38336:20006,38337:34109,38338:38281,38339:38491,38340:31859,38341:38913,38342:20731,38343:22721,38344:30294,38345:30887,38346:21029,38347:30629,38348:34065,38349:31622,38350:20559,38351:22793,38352:29255,38353:31687,38354:32232,38355:36794,38356:36820,38357:36941,38358:20415,38359:21193,38360:23081,38361:24321,38362:38829,38363:20445,38364:33303,38365:37610,38366:22275,38367:25429,38368:27497,38369:29995,38370:35036,38371:36628,38372:31298,38373:21215,38374:22675,38375:24917,38376:25098,38377:26286,38378:27597,38379:31807,38380:33769,38381:20515,38382:20472,38383:21253,38384:21574,38385:22577,38386:22857,38387:23453,38388:23792,38389:23791,38390:23849,38391:24214,38392:25265,38393:25447,38394:25918,38395:26041,38396:26379,38464:27861,38465:27873,38466:28921,38467:30770,38468:32299,38469:32990,38470:33459,38471:33804,38472:34028,38473:34562,38474:35090,38475:35370,38476:35914,38477:37030,38478:37586,38479:39165,38480:40179,38481:40300,38482:20047,38483:20129,38484:20621,38485:21078,38486:22346,38487:22952,38488:24125,38489:24536,38490:24537,38491:25151,38492:26292,38493:26395,38494:26576,38495:26834,38496:20882,38497:32033,38498:32938,38499:33192,38500:35584,38501:35980,38502:36031,38503:37502,38504:38450,38505:21536,38506:38956,38507:21271,38508:20693,38509:21340,38510:22696,38511:25778,38512:26420,38513:29287,38514:30566,38515:31302,38516:37350,38517:21187,38518:27809,38519:27526,38520:22528,38521:24140,38522:22868,38523:26412,38524:32763,38525:20961,38526:30406,38528:25705,38529:30952,38530:39764,38531:40635,38532:22475,38533:22969,38534:26151,38535:26522,38536:27598,38537:21737,38538:27097,38539:24149,38540:33180,38541:26517,38542:39850,38543:26622,38544:40018,38545:26717,38546:20134,38547:20451,38548:21448,38549:25273,38550:26411,38551:27819,38552:36804,38553:20397,38554:32365,38555:40639,38556:19975,38557:24930,38558:28288,38559:28459,38560:34067,38561:21619,38562:26410,38563:39749,38564:24051,38565:31637,38566:23724,38567:23494,38568:34588,38569:28234,38570:34001,38571:31252,38572:33032,38573:22937,38574:31885,38575:27665,38576:30496,38577:21209,38578:22818,38579:28961,38580:29279,38581:30683,38582:38695,38583:40289,38584:26891,38585:23167,38586:23064,38587:20901,38588:21517,38589:21629,38590:26126,38591:30431,38592:36855,38593:37528,38594:40180,38595:23018,38596:29277,38597:28357,38598:20813,38599:26825,38600:32191,38601:32236,38602:38754,38603:40634,38604:25720,38605:27169,38606:33538,38607:22916,38608:23391,38609:27611,38610:29467,38611:30450,38612:32178,38613:32791,38614:33945,38615:20786,38616:26408,38617:40665,38618:30446,38619:26466,38620:21247,38621:39173,38622:23588,38623:25147,38624:31870,38625:36016,38626:21839,38627:24758,38628:32011,38629:38272,38630:21249,38631:20063,38632:20918,38633:22812,38634:29242,38635:32822,38636:37326,38637:24357,38638:30690,38639:21380,38640:24441,38641:32004,38642:34220,38643:35379,38644:36493,38645:38742,38646:26611,38647:34222,38648:37971,38649:24841,38650:24840,38651:27833,38652:30290,38720:35565,38721:36664,38722:21807,38723:20305,38724:20778,38725:21191,38726:21451,38727:23461,38728:24189,38729:24736,38730:24962,38731:25558,38732:26377,38733:26586,38734:28263,38735:28044,38736:29494,38737:29495,38738:30001,38739:31056,38740:35029,38741:35480,38742:36938,38743:37009,38744:37109,38745:38596,38746:34701,38747:22805,38748:20104,38749:20313,38750:19982,38751:35465,38752:36671,38753:38928,38754:20653,38755:24188,38756:22934,38757:23481,38758:24248,38759:25562,38760:25594,38761:25793,38762:26332,38763:26954,38764:27096,38765:27915,38766:28342,38767:29076,38768:29992,38769:31407,38770:32650,38771:32768,38772:33865,38773:33993,38774:35201,38775:35617,38776:36362,38777:36965,38778:38525,38779:39178,38780:24958,38781:25233,38782:27442,38784:27779,38785:28020,38786:32716,38787:32764,38788:28096,38789:32645,38790:34746,38791:35064,38792:26469,38793:33713,38794:38972,38795:38647,38796:27931,38797:32097,38798:33853,38799:37226,38800:20081,38801:21365,38802:23888,38803:27396,38804:28651,38805:34253,38806:34349,38807:35239,38808:21033,38809:21519,38810:23653,38811:26446,38812:26792,38813:29702,38814:29827,38815:30178,38816:35023,38817:35041,38818:37324,38819:38626,38820:38520,38821:24459,38822:29575,38823:31435,38824:33870,38825:25504,38826:30053,38827:21129,38828:27969,38829:28316,38830:29705,38831:30041,38832:30827,38833:31890,38834:38534,38835:31452,38836:40845,38837:20406,38838:24942,38839:26053,38840:34396,38841:20102,38842:20142,38843:20698,38844:20001,38845:20940,38846:23534,38847:26009,38848:26753,38849:28092,38850:29471,38851:30274,38852:30637,38853:31260,38854:31975,38855:33391,38856:35538,38857:36988,38858:37327,38859:38517,38860:38936,38861:21147,38862:32209,38863:20523,38864:21400,38865:26519,38866:28107,38867:29136,38868:29747,38869:33256,38870:36650,38871:38563,38872:40023,38873:40607,38874:29792,38875:22593,38876:28057,38877:32047,38878:39006,38879:20196,38880:20278,38881:20363,38882:20919,38883:21169,38884:23994,38885:24604,38886:29618,38887:31036,38888:33491,38889:37428,38890:38583,38891:38646,38892:38666,38893:40599,38894:40802,38895:26278,38896:27508,38897:21015,38898:21155,38899:28872,38900:35010,38901:24265,38902:24651,38903:24976,38904:28451,38905:29001,38906:31806,38907:32244,38908:32879,38976:34030,38977:36899,38978:37676,38979:21570,38980:39791,38981:27347,38982:28809,38983:36034,38984:36335,38985:38706,38986:21172,38987:23105,38988:24266,38989:24324,38990:26391,38991:27004,38992:27028,38993:28010,38994:28431,38995:29282,38996:29436,38997:31725,38998:32769,38999:32894,39e3:34635,39001:37070,39002:20845,39003:40595,39004:31108,39005:32907,39006:37682,39007:35542,39008:20525,39009:21644,39010:35441,39011:27498,39012:36036,39013:33031,39014:24785,39015:26528,39016:40434,39017:20121,39018:20120,39019:39952,39020:35435,39021:34241,39022:34152,39023:26880,39024:28286,39025:30871,39026:33109,39071:24332,39072:19984,39073:19989,39074:20010,39075:20017,39076:20022,39077:20028,39078:20031,39079:20034,39080:20054,39081:20056,39082:20098,39083:20101,39084:35947,39085:20106,39086:33298,39087:24333,39088:20110,39089:20126,39090:20127,39091:20128,39092:20130,39093:20144,39094:20147,39095:20150,39096:20174,39097:20173,39098:20164,39099:20166,39100:20162,39101:20183,39102:20190,39103:20205,39104:20191,39105:20215,39106:20233,39107:20314,39108:20272,39109:20315,39110:20317,39111:20311,39112:20295,39113:20342,39114:20360,39115:20367,39116:20376,39117:20347,39118:20329,39119:20336,39120:20369,39121:20335,39122:20358,39123:20374,39124:20760,39125:20436,39126:20447,39127:20430,39128:20440,39129:20443,39130:20433,39131:20442,39132:20432,39133:20452,39134:20453,39135:20506,39136:20520,39137:20500,39138:20522,39139:20517,39140:20485,39141:20252,39142:20470,39143:20513,39144:20521,39145:20524,39146:20478,39147:20463,39148:20497,39149:20486,39150:20547,39151:20551,39152:26371,39153:20565,39154:20560,39155:20552,39156:20570,39157:20566,39158:20588,39159:20600,39160:20608,39161:20634,39162:20613,39163:20660,39164:20658,39232:20681,39233:20682,39234:20659,39235:20674,39236:20694,39237:20702,39238:20709,39239:20717,39240:20707,39241:20718,39242:20729,39243:20725,39244:20745,39245:20737,39246:20738,39247:20758,39248:20757,39249:20756,39250:20762,39251:20769,39252:20794,39253:20791,39254:20796,39255:20795,39256:20799,39257:20800,39258:20818,39259:20812,39260:20820,39261:20834,39262:31480,39263:20841,39264:20842,39265:20846,39266:20864,39267:20866,39268:22232,39269:20876,39270:20873,39271:20879,39272:20881,39273:20883,39274:20885,39275:20886,39276:20900,39277:20902,39278:20898,39279:20905,39280:20906,39281:20907,39282:20915,39283:20913,39284:20914,39285:20912,39286:20917,39287:20925,39288:20933,39289:20937,39290:20955,39291:20960,39292:34389,39293:20969,39294:20973,39296:20976,39297:20981,39298:20990,39299:20996,39300:21003,39301:21012,39302:21006,39303:21031,39304:21034,39305:21038,39306:21043,39307:21049,39308:21071,39309:21060,39310:21067,39311:21068,39312:21086,39313:21076,39314:21098,39315:21108,39316:21097,39317:21107,39318:21119,39319:21117,39320:21133,39321:21140,39322:21138,39323:21105,39324:21128,39325:21137,39326:36776,39327:36775,39328:21164,39329:21165,39330:21180,39331:21173,39332:21185,39333:21197,39334:21207,39335:21214,39336:21219,39337:21222,39338:39149,39339:21216,39340:21235,39341:21237,39342:21240,39343:21241,39344:21254,39345:21256,39346:30008,39347:21261,39348:21264,39349:21263,39350:21269,39351:21274,39352:21283,39353:21295,39354:21297,39355:21299,39356:21304,39357:21312,39358:21318,39359:21317,39360:19991,39361:21321,39362:21325,39363:20950,39364:21342,39365:21353,39366:21358,39367:22808,39368:21371,39369:21367,39370:21378,39371:21398,39372:21408,39373:21414,39374:21413,39375:21422,39376:21424,39377:21430,39378:21443,39379:31762,39380:38617,39381:21471,39382:26364,39383:29166,39384:21486,39385:21480,39386:21485,39387:21498,39388:21505,39389:21565,39390:21568,39391:21548,39392:21549,39393:21564,39394:21550,39395:21558,39396:21545,39397:21533,39398:21582,39399:21647,39400:21621,39401:21646,39402:21599,39403:21617,39404:21623,39405:21616,39406:21650,39407:21627,39408:21632,39409:21622,39410:21636,39411:21648,39412:21638,39413:21703,39414:21666,39415:21688,39416:21669,39417:21676,39418:21700,39419:21704,39420:21672,39488:21675,39489:21698,39490:21668,39491:21694,39492:21692,39493:21720,39494:21733,39495:21734,39496:21775,39497:21780,39498:21757,39499:21742,39500:21741,39501:21754,39502:21730,39503:21817,39504:21824,39505:21859,39506:21836,39507:21806,39508:21852,39509:21829,39510:21846,39511:21847,39512:21816,39513:21811,39514:21853,39515:21913,39516:21888,39517:21679,39518:21898,39519:21919,39520:21883,39521:21886,39522:21912,39523:21918,39524:21934,39525:21884,39526:21891,39527:21929,39528:21895,39529:21928,39530:21978,39531:21957,39532:21983,39533:21956,39534:21980,39535:21988,39536:21972,39537:22036,39538:22007,39539:22038,39540:22014,39541:22013,39542:22043,39543:22009,39544:22094,39545:22096,39546:29151,39547:22068,39548:22070,39549:22066,39550:22072,39552:22123,39553:22116,39554:22063,39555:22124,39556:22122,39557:22150,39558:22144,39559:22154,39560:22176,39561:22164,39562:22159,39563:22181,39564:22190,39565:22198,39566:22196,39567:22210,39568:22204,39569:22209,39570:22211,39571:22208,39572:22216,39573:22222,39574:22225,39575:22227,39576:22231,39577:22254,39578:22265,39579:22272,39580:22271,39581:22276,39582:22281,39583:22280,39584:22283,39585:22285,39586:22291,39587:22296,39588:22294,39589:21959,39590:22300,39591:22310,39592:22327,39593:22328,39594:22350,39595:22331,39596:22336,39597:22351,39598:22377,39599:22464,39600:22408,39601:22369,39602:22399,39603:22409,39604:22419,39605:22432,39606:22451,39607:22436,39608:22442,39609:22448,39610:22467,39611:22470,39612:22484,39613:22482,39614:22483,39615:22538,39616:22486,39617:22499,39618:22539,39619:22553,39620:22557,39621:22642,39622:22561,39623:22626,39624:22603,39625:22640,39626:27584,39627:22610,39628:22589,39629:22649,39630:22661,39631:22713,39632:22687,39633:22699,39634:22714,39635:22750,39636:22715,39637:22712,39638:22702,39639:22725,39640:22739,39641:22737,39642:22743,39643:22745,39644:22744,39645:22757,39646:22748,39647:22756,39648:22751,39649:22767,39650:22778,39651:22777,39652:22779,39653:22780,39654:22781,39655:22786,39656:22794,39657:22800,39658:22811,39659:26790,39660:22821,39661:22828,39662:22829,39663:22834,39664:22840,39665:22846,39666:31442,39667:22869,39668:22864,39669:22862,39670:22874,39671:22872,39672:22882,39673:22880,39674:22887,39675:22892,39676:22889,39744:22904,39745:22913,39746:22941,39747:20318,39748:20395,39749:22947,39750:22962,39751:22982,39752:23016,39753:23004,39754:22925,39755:23001,39756:23002,39757:23077,39758:23071,39759:23057,39760:23068,39761:23049,39762:23066,39763:23104,39764:23148,39765:23113,39766:23093,39767:23094,39768:23138,39769:23146,39770:23194,39771:23228,39772:23230,39773:23243,39774:23234,39775:23229,39776:23267,39777:23255,39778:23270,39779:23273,39780:23254,39781:23290,39782:23291,39783:23308,39784:23307,39785:23318,39786:23346,39787:23248,39788:23338,39789:23350,39790:23358,39791:23363,39792:23365,39793:23360,39794:23377,39795:23381,39796:23386,39797:23387,39798:23397,39799:23401,39800:23408,39801:23411,39802:23413,39803:23416,39804:25992,39805:23418,39806:23424,39808:23427,39809:23462,39810:23480,39811:23491,39812:23495,39813:23497,39814:23508,39815:23504,39816:23524,39817:23526,39818:23522,39819:23518,39820:23525,39821:23531,39822:23536,39823:23542,39824:23539,39825:23557,39826:23559,39827:23560,39828:23565,39829:23571,39830:23584,39831:23586,39832:23592,39833:23608,39834:23609,39835:23617,39836:23622,39837:23630,39838:23635,39839:23632,39840:23631,39841:23409,39842:23660,39843:23662,39844:20066,39845:23670,39846:23673,39847:23692,39848:23697,39849:23700,39850:22939,39851:23723,39852:23739,39853:23734,39854:23740,39855:23735,39856:23749,39857:23742,39858:23751,39859:23769,39860:23785,39861:23805,39862:23802,39863:23789,39864:23948,39865:23786,39866:23819,39867:23829,39868:23831,39869:23900,39870:23839,39871:23835,39872:23825,39873:23828,39874:23842,39875:23834,39876:23833,39877:23832,39878:23884,39879:23890,39880:23886,39881:23883,39882:23916,39883:23923,39884:23926,39885:23943,39886:23940,39887:23938,39888:23970,39889:23965,39890:23980,39891:23982,39892:23997,39893:23952,39894:23991,39895:23996,39896:24009,39897:24013,39898:24019,39899:24018,39900:24022,39901:24027,39902:24043,39903:24050,39904:24053,39905:24075,39906:24090,39907:24089,39908:24081,39909:24091,39910:24118,39911:24119,39912:24132,39913:24131,39914:24128,39915:24142,39916:24151,39917:24148,39918:24159,39919:24162,39920:24164,39921:24135,39922:24181,39923:24182,39924:24186,39925:40636,39926:24191,39927:24224,39928:24257,39929:24258,39930:24264,39931:24272,39932:24271,4e4:24278,40001:24291,40002:24285,40003:24282,40004:24283,40005:24290,40006:24289,40007:24296,40008:24297,40009:24300,40010:24305,40011:24307,40012:24304,40013:24308,40014:24312,40015:24318,40016:24323,40017:24329,40018:24413,40019:24412,40020:24331,40021:24337,40022:24342,40023:24361,40024:24365,40025:24376,40026:24385,40027:24392,40028:24396,40029:24398,40030:24367,40031:24401,40032:24406,40033:24407,40034:24409,40035:24417,40036:24429,40037:24435,40038:24439,40039:24451,40040:24450,40041:24447,40042:24458,40043:24456,40044:24465,40045:24455,40046:24478,40047:24473,40048:24472,40049:24480,40050:24488,40051:24493,40052:24508,40053:24534,40054:24571,40055:24548,40056:24568,40057:24561,40058:24541,40059:24755,40060:24575,40061:24609,40062:24672,40064:24601,40065:24592,40066:24617,40067:24590,40068:24625,40069:24603,40070:24597,40071:24619,40072:24614,40073:24591,40074:24634,40075:24666,40076:24641,40077:24682,40078:24695,40079:24671,40080:24650,40081:24646,40082:24653,40083:24675,40084:24643,40085:24676,40086:24642,40087:24684,40088:24683,40089:24665,40090:24705,40091:24717,40092:24807,40093:24707,40094:24730,40095:24708,40096:24731,40097:24726,40098:24727,40099:24722,40100:24743,40101:24715,40102:24801,40103:24760,40104:24800,40105:24787,40106:24756,40107:24560,40108:24765,40109:24774,40110:24757,40111:24792,40112:24909,40113:24853,40114:24838,40115:24822,40116:24823,40117:24832,40118:24820,40119:24826,40120:24835,40121:24865,40122:24827,40123:24817,40124:24845,40125:24846,40126:24903,40127:24894,40128:24872,40129:24871,40130:24906,40131:24895,40132:24892,40133:24876,40134:24884,40135:24893,40136:24898,40137:24900,40138:24947,40139:24951,40140:24920,40141:24921,40142:24922,40143:24939,40144:24948,40145:24943,40146:24933,40147:24945,40148:24927,40149:24925,40150:24915,40151:24949,40152:24985,40153:24982,40154:24967,40155:25004,40156:24980,40157:24986,40158:24970,40159:24977,40160:25003,40161:25006,40162:25036,40163:25034,40164:25033,40165:25079,40166:25032,40167:25027,40168:25030,40169:25018,40170:25035,40171:32633,40172:25037,40173:25062,40174:25059,40175:25078,40176:25082,40177:25076,40178:25087,40179:25085,40180:25084,40181:25086,40182:25088,40183:25096,40184:25097,40185:25101,40186:25100,40187:25108,40188:25115,40256:25118,40257:25121,40258:25130,40259:25134,40260:25136,40261:25138,40262:25139,40263:25153,40264:25166,40265:25182,40266:25187,40267:25179,40268:25184,40269:25192,40270:25212,40271:25218,40272:25225,40273:25214,40274:25234,40275:25235,40276:25238,40277:25300,40278:25219,40279:25236,40280:25303,40281:25297,40282:25275,40283:25295,40284:25343,40285:25286,40286:25812,40287:25288,40288:25308,40289:25292,40290:25290,40291:25282,40292:25287,40293:25243,40294:25289,40295:25356,40296:25326,40297:25329,40298:25383,40299:25346,40300:25352,40301:25327,40302:25333,40303:25424,40304:25406,40305:25421,40306:25628,40307:25423,40308:25494,40309:25486,40310:25472,40311:25515,40312:25462,40313:25507,40314:25487,40315:25481,40316:25503,40317:25525,40318:25451,40320:25449,40321:25534,40322:25577,40323:25536,40324:25542,40325:25571,40326:25545,40327:25554,40328:25590,40329:25540,40330:25622,40331:25652,40332:25606,40333:25619,40334:25638,40335:25654,40336:25885,40337:25623,40338:25640,40339:25615,40340:25703,40341:25711,40342:25718,40343:25678,40344:25898,40345:25749,40346:25747,40347:25765,40348:25769,40349:25736,40350:25788,40351:25818,40352:25810,40353:25797,40354:25799,40355:25787,40356:25816,40357:25794,40358:25841,40359:25831,40360:33289,40361:25824,40362:25825,40363:25260,40364:25827,40365:25839,40366:25900,40367:25846,40368:25844,40369:25842,40370:25850,40371:25856,40372:25853,40373:25880,40374:25884,40375:25861,40376:25892,40377:25891,40378:25899,40379:25908,40380:25909,40381:25911,40382:25910,40383:25912,40384:30027,40385:25928,40386:25942,40387:25941,40388:25933,40389:25944,40390:25950,40391:25949,40392:25970,40393:25976,40394:25986,40395:25987,40396:35722,40397:26011,40398:26015,40399:26027,40400:26039,40401:26051,40402:26054,40403:26049,40404:26052,40405:26060,40406:26066,40407:26075,40408:26073,40409:26080,40410:26081,40411:26097,40412:26482,40413:26122,40414:26115,40415:26107,40416:26483,40417:26165,40418:26166,40419:26164,40420:26140,40421:26191,40422:26180,40423:26185,40424:26177,40425:26206,40426:26205,40427:26212,40428:26215,40429:26216,40430:26207,40431:26210,40432:26224,40433:26243,40434:26248,40435:26254,40436:26249,40437:26244,40438:26264,40439:26269,40440:26305,40441:26297,40442:26313,40443:26302,40444:26300,40512:26308,40513:26296,40514:26326,40515:26330,40516:26336,40517:26175,40518:26342,40519:26345,40520:26352,40521:26357,40522:26359,40523:26383,40524:26390,40525:26398,40526:26406,40527:26407,40528:38712,40529:26414,40530:26431,40531:26422,40532:26433,40533:26424,40534:26423,40535:26438,40536:26462,40537:26464,40538:26457,40539:26467,40540:26468,40541:26505,40542:26480,40543:26537,40544:26492,40545:26474,40546:26508,40547:26507,40548:26534,40549:26529,40550:26501,40551:26551,40552:26607,40553:26548,40554:26604,40555:26547,40556:26601,40557:26552,40558:26596,40559:26590,40560:26589,40561:26594,40562:26606,40563:26553,40564:26574,40565:26566,40566:26599,40567:27292,40568:26654,40569:26694,40570:26665,40571:26688,40572:26701,40573:26674,40574:26702,40576:26803,40577:26667,40578:26713,40579:26723,40580:26743,40581:26751,40582:26783,40583:26767,40584:26797,40585:26772,40586:26781,40587:26779,40588:26755,40589:27310,40590:26809,40591:26740,40592:26805,40593:26784,40594:26810,40595:26895,40596:26765,40597:26750,40598:26881,40599:26826,40600:26888,40601:26840,40602:26914,40603:26918,40604:26849,40605:26892,40606:26829,40607:26836,40608:26855,40609:26837,40610:26934,40611:26898,40612:26884,40613:26839,40614:26851,40615:26917,40616:26873,40617:26848,40618:26863,40619:26920,40620:26922,40621:26906,40622:26915,40623:26913,40624:26822,40625:27001,40626:26999,40627:26972,40628:27e3,40629:26987,40630:26964,40631:27006,40632:26990,40633:26937,40634:26996,40635:26941,40636:26969,40637:26928,40638:26977,40639:26974,40640:26973,40641:27009,40642:26986,40643:27058,40644:27054,40645:27088,40646:27071,40647:27073,40648:27091,40649:27070,40650:27086,40651:23528,40652:27082,40653:27101,40654:27067,40655:27075,40656:27047,40657:27182,40658:27025,40659:27040,40660:27036,40661:27029,40662:27060,40663:27102,40664:27112,40665:27138,40666:27163,40667:27135,40668:27402,40669:27129,40670:27122,40671:27111,40672:27141,40673:27057,40674:27166,40675:27117,40676:27156,40677:27115,40678:27146,40679:27154,40680:27329,40681:27171,40682:27155,40683:27204,40684:27148,40685:27250,40686:27190,40687:27256,40688:27207,40689:27234,40690:27225,40691:27238,40692:27208,40693:27192,40694:27170,40695:27280,40696:27277,40697:27296,40698:27268,40699:27298,40700:27299,40768:27287,40769:34327,40770:27323,40771:27331,40772:27330,40773:27320,40774:27315,40775:27308,40776:27358,40777:27345,40778:27359,40779:27306,40780:27354,40781:27370,40782:27387,40783:27397,40784:34326,40785:27386,40786:27410,40787:27414,40788:39729,40789:27423,40790:27448,40791:27447,40792:30428,40793:27449,40794:39150,40795:27463,40796:27459,40797:27465,40798:27472,40799:27481,40800:27476,40801:27483,40802:27487,40803:27489,40804:27512,40805:27513,40806:27519,40807:27520,40808:27524,40809:27523,40810:27533,40811:27544,40812:27541,40813:27550,40814:27556,40815:27562,40816:27563,40817:27567,40818:27570,40819:27569,40820:27571,40821:27575,40822:27580,40823:27590,40824:27595,40825:27603,40826:27615,40827:27628,40828:27627,40829:27635,40830:27631,40832:40638,40833:27656,40834:27667,40835:27668,40836:27675,40837:27684,40838:27683,40839:27742,40840:27733,40841:27746,40842:27754,40843:27778,40844:27789,40845:27802,40846:27777,40847:27803,40848:27774,40849:27752,40850:27763,40851:27794,40852:27792,40853:27844,40854:27889,40855:27859,40856:27837,40857:27863,40858:27845,40859:27869,40860:27822,40861:27825,40862:27838,40863:27834,40864:27867,40865:27887,40866:27865,40867:27882,40868:27935,40869:34893,40870:27958,40871:27947,40872:27965,40873:27960,40874:27929,40875:27957,40876:27955,40877:27922,40878:27916,40879:28003,40880:28051,40881:28004,40882:27994,40883:28025,40884:27993,40885:28046,40886:28053,40887:28644,40888:28037,40889:28153,40890:28181,40891:28170,40892:28085,40893:28103,40894:28134,40895:28088,40896:28102,40897:28140,40898:28126,40899:28108,40900:28136,40901:28114,40902:28101,40903:28154,40904:28121,40905:28132,40906:28117,40907:28138,40908:28142,40909:28205,40910:28270,40911:28206,40912:28185,40913:28274,40914:28255,40915:28222,40916:28195,40917:28267,40918:28203,40919:28278,40920:28237,40921:28191,40922:28227,40923:28218,40924:28238,40925:28196,40926:28415,40927:28189,40928:28216,40929:28290,40930:28330,40931:28312,40932:28361,40933:28343,40934:28371,40935:28349,40936:28335,40937:28356,40938:28338,40939:28372,40940:28373,40941:28303,40942:28325,40943:28354,40944:28319,40945:28481,40946:28433,40947:28748,40948:28396,40949:28408,40950:28414,40951:28479,40952:28402,40953:28465,40954:28399,40955:28466,40956:28364,161:65377,162:65378,163:65379,164:65380,165:65381,166:65382,167:65383,168:65384,169:65385,170:65386,171:65387,172:65388,173:65389,174:65390,175:65391,176:65392,177:65393,178:65394,179:65395,180:65396,181:65397,182:65398,183:65399,184:65400,185:65401,186:65402,187:65403,188:65404,189:65405,190:65406,191:65407,192:65408,193:65409,194:65410,195:65411,196:65412,197:65413,198:65414,199:65415,200:65416,201:65417,202:65418,203:65419,204:65420,205:65421,206:65422,207:65423,208:65424,209:65425,210:65426,211:65427,212:65428,213:65429,214:65430,215:65431,216:65432,217:65433,218:65434,219:65435,220:65436,221:65437,222:65438,223:65439,57408:28478,57409:28435,57410:28407,57411:28550,57412:28538,57413:28536,57414:28545,57415:28544,57416:28527,57417:28507,57418:28659,57419:28525,57420:28546,57421:28540,57422:28504,57423:28558,57424:28561,57425:28610,57426:28518,57427:28595,57428:28579,57429:28577,57430:28580,57431:28601,57432:28614,57433:28586,57434:28639,57435:28629,57436:28652,57437:28628,57438:28632,57439:28657,57440:28654,57441:28635,57442:28681,57443:28683,57444:28666,57445:28689,57446:28673,57447:28687,57448:28670,57449:28699,57450:28698,57451:28532,57452:28701,57453:28696,57454:28703,57455:28720,57456:28734,57457:28722,57458:28753,57459:28771,57460:28825,57461:28818,57462:28847,57463:28913,57464:28844,57465:28856,57466:28851,57467:28846,57468:28895,57469:28875,57470:28893,57472:28889,57473:28937,57474:28925,57475:28956,57476:28953,57477:29029,57478:29013,57479:29064,57480:29030,57481:29026,57482:29004,57483:29014,57484:29036,57485:29071,57486:29179,57487:29060,57488:29077,57489:29096,57490:29100,57491:29143,57492:29113,57493:29118,57494:29138,57495:29129,57496:29140,57497:29134,57498:29152,57499:29164,57500:29159,57501:29173,57502:29180,57503:29177,57504:29183,57505:29197,57506:29200,57507:29211,57508:29224,57509:29229,57510:29228,57511:29232,57512:29234,57513:29243,57514:29244,57515:29247,57516:29248,57517:29254,57518:29259,57519:29272,57520:29300,57521:29310,57522:29314,57523:29313,57524:29319,57525:29330,57526:29334,57527:29346,57528:29351,57529:29369,57530:29362,57531:29379,57532:29382,57533:29380,57534:29390,57535:29394,57536:29410,57537:29408,57538:29409,57539:29433,57540:29431,57541:20495,57542:29463,57543:29450,57544:29468,57545:29462,57546:29469,57547:29492,57548:29487,57549:29481,57550:29477,57551:29502,57552:29518,57553:29519,57554:40664,57555:29527,57556:29546,57557:29544,57558:29552,57559:29560,57560:29557,57561:29563,57562:29562,57563:29640,57564:29619,57565:29646,57566:29627,57567:29632,57568:29669,57569:29678,57570:29662,57571:29858,57572:29701,57573:29807,57574:29733,57575:29688,57576:29746,57577:29754,57578:29781,57579:29759,57580:29791,57581:29785,57582:29761,57583:29788,57584:29801,57585:29808,57586:29795,57587:29802,57588:29814,57589:29822,57590:29835,57591:29854,57592:29863,57593:29898,57594:29903,57595:29908,57596:29681,57664:29920,57665:29923,57666:29927,57667:29929,57668:29934,57669:29938,57670:29936,57671:29937,57672:29944,57673:29943,57674:29956,57675:29955,57676:29957,57677:29964,57678:29966,57679:29965,57680:29973,57681:29971,57682:29982,57683:29990,57684:29996,57685:30012,57686:30020,57687:30029,57688:30026,57689:30025,57690:30043,57691:30022,57692:30042,57693:30057,57694:30052,57695:30055,57696:30059,57697:30061,57698:30072,57699:30070,57700:30086,57701:30087,57702:30068,57703:30090,57704:30089,57705:30082,57706:30100,57707:30106,57708:30109,57709:30117,57710:30115,57711:30146,57712:30131,57713:30147,57714:30133,57715:30141,57716:30136,57717:30140,57718:30129,57719:30157,57720:30154,57721:30162,57722:30169,57723:30179,57724:30174,57725:30206,57726:30207,57728:30204,57729:30209,57730:30192,57731:30202,57732:30194,57733:30195,57734:30219,57735:30221,57736:30217,57737:30239,57738:30247,57739:30240,57740:30241,57741:30242,57742:30244,57743:30260,57744:30256,57745:30267,57746:30279,57747:30280,57748:30278,57749:30300,57750:30296,57751:30305,57752:30306,57753:30312,57754:30313,57755:30314,57756:30311,57757:30316,57758:30320,57759:30322,57760:30326,57761:30328,57762:30332,57763:30336,57764:30339,57765:30344,57766:30347,57767:30350,57768:30358,57769:30355,57770:30361,57771:30362,57772:30384,57773:30388,57774:30392,57775:30393,57776:30394,57777:30402,57778:30413,57779:30422,57780:30418,57781:30430,57782:30433,57783:30437,57784:30439,57785:30442,57786:34351,57787:30459,57788:30472,57789:30471,57790:30468,57791:30505,57792:30500,57793:30494,57794:30501,57795:30502,57796:30491,57797:30519,57798:30520,57799:30535,57800:30554,57801:30568,57802:30571,57803:30555,57804:30565,57805:30591,57806:30590,57807:30585,57808:30606,57809:30603,57810:30609,57811:30624,57812:30622,57813:30640,57814:30646,57815:30649,57816:30655,57817:30652,57818:30653,57819:30651,57820:30663,57821:30669,57822:30679,57823:30682,57824:30684,57825:30691,57826:30702,57827:30716,57828:30732,57829:30738,57830:31014,57831:30752,57832:31018,57833:30789,57834:30862,57835:30836,57836:30854,57837:30844,57838:30874,57839:30860,57840:30883,57841:30901,57842:30890,57843:30895,57844:30929,57845:30918,57846:30923,57847:30932,57848:30910,57849:30908,57850:30917,57851:30922,57852:30956,57920:30951,57921:30938,57922:30973,57923:30964,57924:30983,57925:30994,57926:30993,57927:31001,57928:31020,57929:31019,57930:31040,57931:31072,57932:31063,57933:31071,57934:31066,57935:31061,57936:31059,57937:31098,57938:31103,57939:31114,57940:31133,57941:31143,57942:40779,57943:31146,57944:31150,57945:31155,57946:31161,57947:31162,57948:31177,57949:31189,57950:31207,57951:31212,57952:31201,57953:31203,57954:31240,57955:31245,57956:31256,57957:31257,57958:31264,57959:31263,57960:31104,57961:31281,57962:31291,57963:31294,57964:31287,57965:31299,57966:31319,57967:31305,57968:31329,57969:31330,57970:31337,57971:40861,57972:31344,57973:31353,57974:31357,57975:31368,57976:31383,57977:31381,57978:31384,57979:31382,57980:31401,57981:31432,57982:31408,57984:31414,57985:31429,57986:31428,57987:31423,57988:36995,57989:31431,57990:31434,57991:31437,57992:31439,57993:31445,57994:31443,57995:31449,57996:31450,57997:31453,57998:31457,57999:31458,58e3:31462,58001:31469,58002:31472,58003:31490,58004:31503,58005:31498,58006:31494,58007:31539,58008:31512,58009:31513,58010:31518,58011:31541,58012:31528,58013:31542,58014:31568,58015:31610,58016:31492,58017:31565,58018:31499,58019:31564,58020:31557,58021:31605,58022:31589,58023:31604,58024:31591,58025:31600,58026:31601,58027:31596,58028:31598,58029:31645,58030:31640,58031:31647,58032:31629,58033:31644,58034:31642,58035:31627,58036:31634,58037:31631,58038:31581,58039:31641,58040:31691,58041:31681,58042:31692,58043:31695,58044:31668,58045:31686,58046:31709,58047:31721,58048:31761,58049:31764,58050:31718,58051:31717,58052:31840,58053:31744,58054:31751,58055:31763,58056:31731,58057:31735,58058:31767,58059:31757,58060:31734,58061:31779,58062:31783,58063:31786,58064:31775,58065:31799,58066:31787,58067:31805,58068:31820,58069:31811,58070:31828,58071:31823,58072:31808,58073:31824,58074:31832,58075:31839,58076:31844,58077:31830,58078:31845,58079:31852,58080:31861,58081:31875,58082:31888,58083:31908,58084:31917,58085:31906,58086:31915,58087:31905,58088:31912,58089:31923,58090:31922,58091:31921,58092:31918,58093:31929,58094:31933,58095:31936,58096:31941,58097:31938,58098:31960,58099:31954,58100:31964,58101:31970,58102:39739,58103:31983,58104:31986,58105:31988,58106:31990,58107:31994,58108:32006,58176:32002,58177:32028,58178:32021,58179:32010,58180:32069,58181:32075,58182:32046,58183:32050,58184:32063,58185:32053,58186:32070,58187:32115,58188:32086,58189:32078,58190:32114,58191:32104,58192:32110,58193:32079,58194:32099,58195:32147,58196:32137,58197:32091,58198:32143,58199:32125,58200:32155,58201:32186,58202:32174,58203:32163,58204:32181,58205:32199,58206:32189,58207:32171,58208:32317,58209:32162,58210:32175,58211:32220,58212:32184,58213:32159,58214:32176,58215:32216,58216:32221,58217:32228,58218:32222,58219:32251,58220:32242,58221:32225,58222:32261,58223:32266,58224:32291,58225:32289,58226:32274,58227:32305,58228:32287,58229:32265,58230:32267,58231:32290,58232:32326,58233:32358,58234:32315,58235:32309,58236:32313,58237:32323,58238:32311,58240:32306,58241:32314,58242:32359,58243:32349,58244:32342,58245:32350,58246:32345,58247:32346,58248:32377,58249:32362,58250:32361,58251:32380,58252:32379,58253:32387,58254:32213,58255:32381,58256:36782,58257:32383,58258:32392,58259:32393,58260:32396,58261:32402,58262:32400,58263:32403,58264:32404,58265:32406,58266:32398,58267:32411,58268:32412,58269:32568,58270:32570,58271:32581,58272:32588,58273:32589,58274:32590,58275:32592,58276:32593,58277:32597,58278:32596,58279:32600,58280:32607,58281:32608,58282:32616,58283:32617,58284:32615,58285:32632,58286:32642,58287:32646,58288:32643,58289:32648,58290:32647,58291:32652,58292:32660,58293:32670,58294:32669,58295:32666,58296:32675,58297:32687,58298:32690,58299:32697,58300:32686,58301:32694,58302:32696,58303:35697,58304:32709,58305:32710,58306:32714,58307:32725,58308:32724,58309:32737,58310:32742,58311:32745,58312:32755,58313:32761,58314:39132,58315:32774,58316:32772,58317:32779,58318:32786,58319:32792,58320:32793,58321:32796,58322:32801,58323:32808,58324:32831,58325:32827,58326:32842,58327:32838,58328:32850,58329:32856,58330:32858,58331:32863,58332:32866,58333:32872,58334:32883,58335:32882,58336:32880,58337:32886,58338:32889,58339:32893,58340:32895,58341:32900,58342:32902,58343:32901,58344:32923,58345:32915,58346:32922,58347:32941,58348:20880,58349:32940,58350:32987,58351:32997,58352:32985,58353:32989,58354:32964,58355:32986,58356:32982,58357:33033,58358:33007,58359:33009,58360:33051,58361:33065,58362:33059,58363:33071,58364:33099,58432:38539,58433:33094,58434:33086,58435:33107,58436:33105,58437:33020,58438:33137,58439:33134,58440:33125,58441:33126,58442:33140,58443:33155,58444:33160,58445:33162,58446:33152,58447:33154,58448:33184,58449:33173,58450:33188,58451:33187,58452:33119,58453:33171,58454:33193,58455:33200,58456:33205,58457:33214,58458:33208,58459:33213,58460:33216,58461:33218,58462:33210,58463:33225,58464:33229,58465:33233,58466:33241,58467:33240,58468:33224,58469:33242,58470:33247,58471:33248,58472:33255,58473:33274,58474:33275,58475:33278,58476:33281,58477:33282,58478:33285,58479:33287,58480:33290,58481:33293,58482:33296,58483:33302,58484:33321,58485:33323,58486:33336,58487:33331,58488:33344,58489:33369,58490:33368,58491:33373,58492:33370,58493:33375,58494:33380,58496:33378,58497:33384,58498:33386,58499:33387,58500:33326,58501:33393,58502:33399,58503:33400,58504:33406,58505:33421,58506:33426,58507:33451,58508:33439,58509:33467,58510:33452,58511:33505,58512:33507,58513:33503,58514:33490,58515:33524,58516:33523,58517:33530,58518:33683,58519:33539,58520:33531,58521:33529,58522:33502,58523:33542,58524:33500,58525:33545,58526:33497,58527:33589,58528:33588,58529:33558,58530:33586,58531:33585,58532:33600,58533:33593,58534:33616,58535:33605,58536:33583,58537:33579,58538:33559,58539:33560,58540:33669,58541:33690,58542:33706,58543:33695,58544:33698,58545:33686,58546:33571,58547:33678,58548:33671,58549:33674,58550:33660,58551:33717,58552:33651,58553:33653,58554:33696,58555:33673,58556:33704,58557:33780,58558:33811,58559:33771,58560:33742,58561:33789,58562:33795,58563:33752,58564:33803,58565:33729,58566:33783,58567:33799,58568:33760,58569:33778,58570:33805,58571:33826,58572:33824,58573:33725,58574:33848,58575:34054,58576:33787,58577:33901,58578:33834,58579:33852,58580:34138,58581:33924,58582:33911,58583:33899,58584:33965,58585:33902,58586:33922,58587:33897,58588:33862,58589:33836,58590:33903,58591:33913,58592:33845,58593:33994,58594:33890,58595:33977,58596:33983,58597:33951,58598:34009,58599:33997,58600:33979,58601:34010,58602:34e3,58603:33985,58604:33990,58605:34006,58606:33953,58607:34081,58608:34047,58609:34036,58610:34071,58611:34072,58612:34092,58613:34079,58614:34069,58615:34068,58616:34044,58617:34112,58618:34147,58619:34136,58620:34120,58688:34113,58689:34306,58690:34123,58691:34133,58692:34176,58693:34212,58694:34184,58695:34193,58696:34186,58697:34216,58698:34157,58699:34196,58700:34203,58701:34282,58702:34183,58703:34204,58704:34167,58705:34174,58706:34192,58707:34249,58708:34234,58709:34255,58710:34233,58711:34256,58712:34261,58713:34269,58714:34277,58715:34268,58716:34297,58717:34314,58718:34323,58719:34315,58720:34302,58721:34298,58722:34310,58723:34338,58724:34330,58725:34352,58726:34367,58727:34381,58728:20053,58729:34388,58730:34399,58731:34407,58732:34417,58733:34451,58734:34467,58735:34473,58736:34474,58737:34443,58738:34444,58739:34486,58740:34479,58741:34500,58742:34502,58743:34480,58744:34505,58745:34851,58746:34475,58747:34516,58748:34526,58749:34537,58750:34540,58752:34527,58753:34523,58754:34543,58755:34578,58756:34566,58757:34568,58758:34560,58759:34563,58760:34555,58761:34577,58762:34569,58763:34573,58764:34553,58765:34570,58766:34612,58767:34623,58768:34615,58769:34619,58770:34597,58771:34601,58772:34586,58773:34656,58774:34655,58775:34680,58776:34636,58777:34638,58778:34676,58779:34647,58780:34664,58781:34670,58782:34649,58783:34643,58784:34659,58785:34666,58786:34821,58787:34722,58788:34719,58789:34690,58790:34735,58791:34763,58792:34749,58793:34752,58794:34768,58795:38614,58796:34731,58797:34756,58798:34739,58799:34759,58800:34758,58801:34747,58802:34799,58803:34802,58804:34784,58805:34831,58806:34829,58807:34814,58808:34806,58809:34807,58810:34830,58811:34770,58812:34833,58813:34838,58814:34837,58815:34850,58816:34849,58817:34865,58818:34870,58819:34873,58820:34855,58821:34875,58822:34884,58823:34882,58824:34898,58825:34905,58826:34910,58827:34914,58828:34923,58829:34945,58830:34942,58831:34974,58832:34933,58833:34941,58834:34997,58835:34930,58836:34946,58837:34967,58838:34962,58839:34990,58840:34969,58841:34978,58842:34957,58843:34980,58844:34992,58845:35007,58846:34993,58847:35011,58848:35012,58849:35028,58850:35032,58851:35033,58852:35037,58853:35065,58854:35074,58855:35068,58856:35060,58857:35048,58858:35058,58859:35076,58860:35084,58861:35082,58862:35091,58863:35139,58864:35102,58865:35109,58866:35114,58867:35115,58868:35137,58869:35140,58870:35131,58871:35126,58872:35128,58873:35148,58874:35101,58875:35168,58876:35166,58944:35174,58945:35172,58946:35181,58947:35178,58948:35183,58949:35188,58950:35191,58951:35198,58952:35203,58953:35208,58954:35210,58955:35219,58956:35224,58957:35233,58958:35241,58959:35238,58960:35244,58961:35247,58962:35250,58963:35258,58964:35261,58965:35263,58966:35264,58967:35290,58968:35292,58969:35293,58970:35303,58971:35316,58972:35320,58973:35331,58974:35350,58975:35344,58976:35340,58977:35355,58978:35357,58979:35365,58980:35382,58981:35393,58982:35419,58983:35410,58984:35398,58985:35400,58986:35452,58987:35437,58988:35436,58989:35426,58990:35461,58991:35458,58992:35460,58993:35496,58994:35489,58995:35473,58996:35493,58997:35494,58998:35482,58999:35491,59e3:35524,59001:35533,59002:35522,59003:35546,59004:35563,59005:35571,59006:35559,59008:35556,59009:35569,59010:35604,59011:35552,59012:35554,59013:35575,59014:35550,59015:35547,59016:35596,59017:35591,59018:35610,59019:35553,59020:35606,59021:35600,59022:35607,59023:35616,59024:35635,59025:38827,59026:35622,59027:35627,59028:35646,59029:35624,59030:35649,59031:35660,59032:35663,59033:35662,59034:35657,59035:35670,59036:35675,59037:35674,59038:35691,59039:35679,59040:35692,59041:35695,59042:35700,59043:35709,59044:35712,59045:35724,59046:35726,59047:35730,59048:35731,59049:35734,59050:35737,59051:35738,59052:35898,59053:35905,59054:35903,59055:35912,59056:35916,59057:35918,59058:35920,59059:35925,59060:35938,59061:35948,59062:35960,59063:35962,59064:35970,59065:35977,59066:35973,59067:35978,59068:35981,59069:35982,59070:35988,59071:35964,59072:35992,59073:25117,59074:36013,59075:36010,59076:36029,59077:36018,59078:36019,59079:36014,59080:36022,59081:36040,59082:36033,59083:36068,59084:36067,59085:36058,59086:36093,59087:36090,59088:36091,59089:36100,59090:36101,59091:36106,59092:36103,59093:36111,59094:36109,59095:36112,59096:40782,59097:36115,59098:36045,59099:36116,59100:36118,59101:36199,59102:36205,59103:36209,59104:36211,59105:36225,59106:36249,59107:36290,59108:36286,59109:36282,59110:36303,59111:36314,59112:36310,59113:36300,59114:36315,59115:36299,59116:36330,59117:36331,59118:36319,59119:36323,59120:36348,59121:36360,59122:36361,59123:36351,59124:36381,59125:36382,59126:36368,59127:36383,59128:36418,59129:36405,59130:36400,59131:36404,59132:36426,59200:36423,59201:36425,59202:36428,59203:36432,59204:36424,59205:36441,59206:36452,59207:36448,59208:36394,59209:36451,59210:36437,59211:36470,59212:36466,59213:36476,59214:36481,59215:36487,59216:36485,59217:36484,59218:36491,59219:36490,59220:36499,59221:36497,59222:36500,59223:36505,59224:36522,59225:36513,59226:36524,59227:36528,59228:36550,59229:36529,59230:36542,59231:36549,59232:36552,59233:36555,59234:36571,59235:36579,59236:36604,59237:36603,59238:36587,59239:36606,59240:36618,59241:36613,59242:36629,59243:36626,59244:36633,59245:36627,59246:36636,59247:36639,59248:36635,59249:36620,59250:36646,59251:36659,59252:36667,59253:36665,59254:36677,59255:36674,59256:36670,59257:36684,59258:36681,59259:36678,59260:36686,59261:36695,59262:36700,59264:36706,59265:36707,59266:36708,59267:36764,59268:36767,59269:36771,59270:36781,59271:36783,59272:36791,59273:36826,59274:36837,59275:36834,59276:36842,59277:36847,59278:36999,59279:36852,59280:36869,59281:36857,59282:36858,59283:36881,59284:36885,59285:36897,59286:36877,59287:36894,59288:36886,59289:36875,59290:36903,59291:36918,59292:36917,59293:36921,59294:36856,59295:36943,59296:36944,59297:36945,59298:36946,59299:36878,59300:36937,59301:36926,59302:36950,59303:36952,59304:36958,59305:36968,59306:36975,59307:36982,59308:38568,59309:36978,59310:36994,59311:36989,59312:36993,59313:36992,59314:37002,59315:37001,59316:37007,59317:37032,59318:37039,59319:37041,59320:37045,59321:37090,59322:37092,59323:25160,59324:37083,59325:37122,59326:37138,59327:37145,59328:37170,59329:37168,59330:37194,59331:37206,59332:37208,59333:37219,59334:37221,59335:37225,59336:37235,59337:37234,59338:37259,59339:37257,59340:37250,59341:37282,59342:37291,59343:37295,59344:37290,59345:37301,59346:37300,59347:37306,59348:37312,59349:37313,59350:37321,59351:37323,59352:37328,59353:37334,59354:37343,59355:37345,59356:37339,59357:37372,59358:37365,59359:37366,59360:37406,59361:37375,59362:37396,59363:37420,59364:37397,59365:37393,59366:37470,59367:37463,59368:37445,59369:37449,59370:37476,59371:37448,59372:37525,59373:37439,59374:37451,59375:37456,59376:37532,59377:37526,59378:37523,59379:37531,59380:37466,59381:37583,59382:37561,59383:37559,59384:37609,59385:37647,59386:37626,59387:37700,59388:37678,59456:37657,59457:37666,59458:37658,59459:37667,59460:37690,59461:37685,59462:37691,59463:37724,59464:37728,59465:37756,59466:37742,59467:37718,59468:37808,59469:37804,59470:37805,59471:37780,59472:37817,59473:37846,59474:37847,59475:37864,59476:37861,59477:37848,59478:37827,59479:37853,59480:37840,59481:37832,59482:37860,59483:37914,59484:37908,59485:37907,59486:37891,59487:37895,59488:37904,59489:37942,59490:37931,59491:37941,59492:37921,59493:37946,59494:37953,59495:37970,59496:37956,59497:37979,59498:37984,59499:37986,59500:37982,59501:37994,59502:37417,59503:38e3,59504:38005,59505:38007,59506:38013,59507:37978,59508:38012,59509:38014,59510:38017,59511:38015,59512:38274,59513:38279,59514:38282,59515:38292,59516:38294,59517:38296,59518:38297,59520:38304,59521:38312,59522:38311,59523:38317,59524:38332,59525:38331,59526:38329,59527:38334,59528:38346,59529:28662,59530:38339,59531:38349,59532:38348,59533:38357,59534:38356,59535:38358,59536:38364,59537:38369,59538:38373,59539:38370,59540:38433,59541:38440,59542:38446,59543:38447,59544:38466,59545:38476,59546:38479,59547:38475,59548:38519,59549:38492,59550:38494,59551:38493,59552:38495,59553:38502,59554:38514,59555:38508,59556:38541,59557:38552,59558:38549,59559:38551,59560:38570,59561:38567,59562:38577,59563:38578,59564:38576,59565:38580,59566:38582,59567:38584,59568:38585,59569:38606,59570:38603,59571:38601,59572:38605,59573:35149,59574:38620,59575:38669,59576:38613,59577:38649,59578:38660,59579:38662,59580:38664,59581:38675,59582:38670,59583:38673,59584:38671,59585:38678,59586:38681,59587:38692,59588:38698,59589:38704,59590:38713,59591:38717,59592:38718,59593:38724,59594:38726,59595:38728,59596:38722,59597:38729,59598:38748,59599:38752,59600:38756,59601:38758,59602:38760,59603:21202,59604:38763,59605:38769,59606:38777,59607:38789,59608:38780,59609:38785,59610:38778,59611:38790,59612:38795,59613:38799,59614:38800,59615:38812,59616:38824,59617:38822,59618:38819,59619:38835,59620:38836,59621:38851,59622:38854,59623:38856,59624:38859,59625:38876,59626:38893,59627:40783,59628:38898,59629:31455,59630:38902,59631:38901,59632:38927,59633:38924,59634:38968,59635:38948,59636:38945,59637:38967,59638:38973,59639:38982,59640:38991,59641:38987,59642:39019,59643:39023,59644:39024,59712:39025,59713:39028,59714:39027,59715:39082,59716:39087,59717:39089,59718:39094,59719:39108,59720:39107,59721:39110,59722:39145,59723:39147,59724:39171,59725:39177,59726:39186,59727:39188,59728:39192,59729:39201,59730:39197,59731:39198,59732:39204,59733:39200,59734:39212,59735:39214,59736:39229,59737:39230,59738:39234,59739:39241,59740:39237,59741:39248,59742:39243,59743:39249,59744:39250,59745:39244,59746:39253,59747:39319,59748:39320,59749:39333,59750:39341,59751:39342,59752:39356,59753:39391,59754:39387,59755:39389,59756:39384,59757:39377,59758:39405,59759:39406,59760:39409,59761:39410,59762:39419,59763:39416,59764:39425,59765:39439,59766:39429,59767:39394,59768:39449,59769:39467,59770:39479,59771:39493,59772:39490,59773:39488,59774:39491,59776:39486,59777:39509,59778:39501,59779:39515,59780:39511,59781:39519,59782:39522,59783:39525,59784:39524,59785:39529,59786:39531,59787:39530,59788:39597,59789:39600,59790:39612,59791:39616,59792:39631,59793:39633,59794:39635,59795:39636,59796:39646,59797:39647,59798:39650,59799:39651,59800:39654,59801:39663,59802:39659,59803:39662,59804:39668,59805:39665,59806:39671,59807:39675,59808:39686,59809:39704,59810:39706,59811:39711,59812:39714,59813:39715,59814:39717,59815:39719,59816:39720,59817:39721,59818:39722,59819:39726,59820:39727,59821:39730,59822:39748,59823:39747,59824:39759,59825:39757,59826:39758,59827:39761,59828:39768,59829:39796,59830:39827,59831:39811,59832:39825,59833:39830,59834:39831,59835:39839,59836:39840,59837:39848,59838:39860,59839:39872,59840:39882,59841:39865,59842:39878,59843:39887,59844:39889,59845:39890,59846:39907,59847:39906,59848:39908,59849:39892,59850:39905,59851:39994,59852:39922,59853:39921,59854:39920,59855:39957,59856:39956,59857:39945,59858:39955,59859:39948,59860:39942,59861:39944,59862:39954,59863:39946,59864:39940,59865:39982,59866:39963,59867:39973,59868:39972,59869:39969,59870:39984,59871:40007,59872:39986,59873:40006,59874:39998,59875:40026,59876:40032,59877:40039,59878:40054,59879:40056,59880:40167,59881:40172,59882:40176,59883:40201,59884:40200,59885:40171,59886:40195,59887:40198,59888:40234,59889:40230,59890:40367,59891:40227,59892:40223,59893:40260,59894:40213,59895:40210,59896:40257,59897:40255,59898:40254,59899:40262,59900:40264,59968:40285,59969:40286,59970:40292,59971:40273,59972:40272,59973:40281,59974:40306,59975:40329,59976:40327,59977:40363,59978:40303,59979:40314,59980:40346,59981:40356,59982:40361,59983:40370,59984:40388,59985:40385,59986:40379,59987:40376,59988:40378,59989:40390,59990:40399,59991:40386,59992:40409,59993:40403,59994:40440,59995:40422,59996:40429,59997:40431,59998:40445,59999:40474,6e4:40475,60001:40478,60002:40565,60003:40569,60004:40573,60005:40577,60006:40584,60007:40587,60008:40588,60009:40594,60010:40597,60011:40593,60012:40605,60013:40613,60014:40617,60015:40632,60016:40618,60017:40621,60018:38753,60019:40652,60020:40654,60021:40655,60022:40656,60023:40660,60024:40668,60025:40670,60026:40669,60027:40672,60028:40677,60029:40680,60030:40687,60032:40692,60033:40694,60034:40695,60035:40697,60036:40699,60037:40700,60038:40701,60039:40711,60040:40712,60041:30391,60042:40725,60043:40737,60044:40748,60045:40766,60046:40778,60047:40786,60048:40788,60049:40803,60050:40799,60051:40800,60052:40801,60053:40806,60054:40807,60055:40812,60056:40810,60057:40823,60058:40818,60059:40822,60060:40853,60061:40860,60062:40864,60063:22575,60064:27079,60065:36953,60066:29796,60067:20956,60068:29081}}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var a=o(1),l=o(2);function c(h,E,C,y){var w;E.degree()<C.degree()&&(w=[C,E],E=w[0],C=w[1]);for(var B=E,F=C,b=h.zero,D=h.one;F.degree()>=y/2;){var S=B,k=b;if(B=F,b=D,B.isZero())return null;F=S;for(var P=h.zero,R=B.getCoefficient(B.degree()),M=h.inverse(R);F.degree()>=B.degree()&&!F.isZero();){var O=F.degree()-B.degree(),T=h.multiply(F.getCoefficient(F.degree()),M);P=P.addOrSubtract(h.buildMonomial(O,T)),F=F.addOrSubtract(B.multiplyByMonomial(O,T))}if(D=P.multiplyPoly(b).addOrSubtract(k),F.degree()>=B.degree())return null}var V=D.getCoefficient(0);if(V===0)return null;var z=h.inverse(V);return[D.multiply(z),F.multiply(z)]}function x(h,E){var C=E.degree();if(C===1)return[E.getCoefficient(1)];for(var y=new Array(C),w=0,B=1;B<h.size&&w<C;B++)E.evaluateAt(B)===0&&(y[w]=h.inverse(B),w++);return w!==C?null:y}function f(h,E,C){for(var y=C.length,w=new Array(y),B=0;B<y;B++){for(var F=h.inverse(C[B]),b=1,D=0;D<y;D++)B!==D&&(b=h.multiply(b,a.addOrSubtractGF(1,h.multiply(C[D],F))));w[B]=h.multiply(E.evaluateAt(F),h.inverse(b)),h.generatorBase!==0&&(w[B]=h.multiply(w[B],F))}return w}function m(h,E){var C=new Uint8ClampedArray(h.length);C.set(h);for(var y=new a.default(285,256,0),w=new l.default(y,C),B=new Uint8ClampedArray(E),F=!1,b=0;b<E;b++){var D=w.evaluateAt(y.exp(b+y.generatorBase));B[B.length-1-b]=D,D!==0&&(F=!0)}if(!F)return C;var S=new l.default(y,B),k=c(y,y.buildMonomial(E,1),S,E);if(k===null)return null;var P=x(y,k[0]);if(P==null)return null;for(var R=f(y,k[1],P),M=0;M<P.length;M++){var O=C.length-1-y.log(P[M]);if(O<0)return null;C[O]=a.addOrSubtractGF(C[O],R[M])}return C}r.decode=m}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.VERSIONS=[{infoBits:null,versionNumber:1,alignmentPatternCenters:[],errorCorrectionLevels:[{ecCodewordsPerBlock:7,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:13,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:13}]},{ecCodewordsPerBlock:17,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:2,alignmentPatternCenters:[6,18],errorCorrectionLevels:[{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:34}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:28}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]}]},{infoBits:null,versionNumber:3,alignmentPatternCenters:[6,22],errorCorrectionLevels:[{ecCodewordsPerBlock:15,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:55}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:13}]}]},{infoBits:null,versionNumber:4,alignmentPatternCenters:[6,26],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:80}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:32}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:5,alignmentPatternCenters:[6,30],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:43}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:11},{numBlocks:2,dataCodewordsPerBlock:12}]}]},{infoBits:null,versionNumber:6,alignmentPatternCenters:[6,34],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:27}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:31892,versionNumber:7,alignmentPatternCenters:[6,22,38],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:78}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:31}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:13},{numBlocks:1,dataCodewordsPerBlock:14}]}]},{infoBits:34236,versionNumber:8,alignmentPatternCenters:[6,24,42],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:97}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:38},{numBlocks:2,dataCodewordsPerBlock:39}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:18},{numBlocks:2,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:14},{numBlocks:2,dataCodewordsPerBlock:15}]}]},{infoBits:39577,versionNumber:9,alignmentPatternCenters:[6,26,46],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:12},{numBlocks:4,dataCodewordsPerBlock:13}]}]},{infoBits:42195,versionNumber:10,alignmentPatternCenters:[6,28,50],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68},{numBlocks:2,dataCodewordsPerBlock:69}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:43},{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]}]},{infoBits:48118,versionNumber:11,alignmentPatternCenters:[6,30,54],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:81}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:50},{numBlocks:4,dataCodewordsPerBlock:51}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:22},{numBlocks:4,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:12},{numBlocks:8,dataCodewordsPerBlock:13}]}]},{infoBits:51042,versionNumber:12,alignmentPatternCenters:[6,32,58],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:92},{numBlocks:2,dataCodewordsPerBlock:93}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:20},{numBlocks:6,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:55367,versionNumber:13,alignmentPatternCenters:[6,34,62],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:37},{numBlocks:1,dataCodewordsPerBlock:38}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:20},{numBlocks:4,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:11},{numBlocks:4,dataCodewordsPerBlock:12}]}]},{infoBits:58893,versionNumber:14,alignmentPatternCenters:[6,26,46,66],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:40},{numBlocks:5,dataCodewordsPerBlock:41}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:16},{numBlocks:5,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:5,dataCodewordsPerBlock:13}]}]},{infoBits:63784,versionNumber:15,alignmentPatternCenters:[6,26,48,70],errorCorrectionLevels:[{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:87},{numBlocks:1,dataCodewordsPerBlock:88}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:41},{numBlocks:5,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:7,dataCodewordsPerBlock:13}]}]},{infoBits:68472,versionNumber:16,alignmentPatternCenters:[6,26,50,74],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:98},{numBlocks:1,dataCodewordsPerBlock:99}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:70749,versionNumber:17,alignmentPatternCenters:[6,30,54,78],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:1,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22},{numBlocks:15,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:17,dataCodewordsPerBlock:15}]}]},{infoBits:76311,versionNumber:18,alignmentPatternCenters:[6,30,56,82],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:120},{numBlocks:1,dataCodewordsPerBlock:121}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:43},{numBlocks:4,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:1,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:19,dataCodewordsPerBlock:15}]}]},{infoBits:79154,versionNumber:19,alignmentPatternCenters:[6,30,58,86],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:113},{numBlocks:4,dataCodewordsPerBlock:114}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:44},{numBlocks:11,dataCodewordsPerBlock:45}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:21},{numBlocks:4,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:13},{numBlocks:16,dataCodewordsPerBlock:14}]}]},{infoBits:84390,versionNumber:20,alignmentPatternCenters:[6,34,62,90],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:41},{numBlocks:13,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:5,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:15},{numBlocks:10,dataCodewordsPerBlock:16}]}]},{infoBits:87683,versionNumber:21,alignmentPatternCenters:[6,28,50,72,94],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:116},{numBlocks:4,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:16},{numBlocks:6,dataCodewordsPerBlock:17}]}]},{infoBits:92361,versionNumber:22,alignmentPatternCenters:[6,26,50,74,98],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:111},{numBlocks:7,dataCodewordsPerBlock:112}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:13}]}]},{infoBits:96236,versionNumber:23,alignmentPatternCenters:[6,30,54,74,102],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:121},{numBlocks:5,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:47},{numBlocks:14,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:16,dataCodewordsPerBlock:15},{numBlocks:14,dataCodewordsPerBlock:16}]}]},{infoBits:102084,versionNumber:24,alignmentPatternCenters:[6,28,54,80,106],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:45},{numBlocks:14,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:30,dataCodewordsPerBlock:16},{numBlocks:2,dataCodewordsPerBlock:17}]}]},{infoBits:102881,versionNumber:25,alignmentPatternCenters:[6,32,58,84,110],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:106},{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:47},{numBlocks:13,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:110507,versionNumber:26,alignmentPatternCenters:[6,30,58,86,114],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:114},{numBlocks:2,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:46},{numBlocks:4,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:28,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:33,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]}]},{infoBits:110734,versionNumber:27,alignmentPatternCenters:[6,34,62,90,118],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:23},{numBlocks:26,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:117786,versionNumber:28,alignmentPatternCenters:[6,26,50,74,98,122],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:117},{numBlocks:10,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:45},{numBlocks:23,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:24},{numBlocks:31,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:31,dataCodewordsPerBlock:16}]}]},{infoBits:119615,versionNumber:29,alignmentPatternCenters:[6,30,54,78,102,126],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:116},{numBlocks:7,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:21,dataCodewordsPerBlock:45},{numBlocks:7,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:23},{numBlocks:37,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:26,dataCodewordsPerBlock:16}]}]},{infoBits:126325,versionNumber:30,alignmentPatternCenters:[6,26,52,78,104,130],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:115},{numBlocks:10,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:47},{numBlocks:10,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:25,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:25,dataCodewordsPerBlock:16}]}]},{infoBits:127568,versionNumber:31,alignmentPatternCenters:[6,30,56,82,108,134],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:3,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:46},{numBlocks:29,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:24},{numBlocks:1,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:133589,versionNumber:32,alignmentPatternCenters:[6,34,60,86,112,138],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:24},{numBlocks:35,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:35,dataCodewordsPerBlock:16}]}]},{infoBits:136944,versionNumber:33,alignmentPatternCenters:[6,30,58,86,114,142],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:21,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:24},{numBlocks:19,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:141498,versionNumber:34,alignmentPatternCenters:[6,34,62,90,118,146],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:6,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:44,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:59,dataCodewordsPerBlock:16},{numBlocks:1,dataCodewordsPerBlock:17}]}]},{infoBits:145311,versionNumber:35,alignmentPatternCenters:[6,30,54,78,102,126,150],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:121},{numBlocks:7,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:47},{numBlocks:26,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:39,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:41,dataCodewordsPerBlock:16}]}]},{infoBits:150283,versionNumber:36,alignmentPatternCenters:[6,24,50,76,102,128,154],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:121},{numBlocks:14,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:47},{numBlocks:34,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:46,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:64,dataCodewordsPerBlock:16}]}]},{infoBits:152622,versionNumber:37,alignmentPatternCenters:[6,28,54,80,106,132,158],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:46},{numBlocks:14,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:49,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:24,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:158308,versionNumber:38,alignmentPatternCenters:[6,32,58,84,110,136,162],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:122},{numBlocks:18,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:46},{numBlocks:32,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:48,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:15},{numBlocks:32,dataCodewordsPerBlock:16}]}]},{infoBits:161089,versionNumber:39,alignmentPatternCenters:[6,26,54,82,110,138,166],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:40,dataCodewordsPerBlock:47},{numBlocks:7,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:43,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:15},{numBlocks:67,dataCodewordsPerBlock:16}]}]},{infoBits:167017,versionNumber:40,alignmentPatternCenters:[6,30,58,86,114,142,170],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:118},{numBlocks:6,dataCodewordsPerBlock:119}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:18,dataCodewordsPerBlock:47},{numBlocks:31,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:24},{numBlocks:34,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:15},{numBlocks:61,dataCodewordsPerBlock:16}]}]}]}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var a=o(0);function l(m,h,E,C){var y=m.x-h.x+E.x-C.x,w=m.y-h.y+E.y-C.y;if(y===0&&w===0)return{a11:h.x-m.x,a12:h.y-m.y,a13:0,a21:E.x-h.x,a22:E.y-h.y,a23:0,a31:m.x,a32:m.y,a33:1};var B=h.x-E.x,F=C.x-E.x,b=h.y-E.y,D=C.y-E.y,S=B*D-F*b,k=(y*D-F*w)/S,P=(B*w-y*b)/S;return{a11:h.x-m.x+k*h.x,a12:h.y-m.y+k*h.y,a13:k,a21:C.x-m.x+P*C.x,a22:C.y-m.y+P*C.y,a23:P,a31:m.x,a32:m.y,a33:1}}function c(m,h,E,C){var y=l(m,h,E,C);return{a11:y.a22*y.a33-y.a23*y.a32,a12:y.a13*y.a32-y.a12*y.a33,a13:y.a12*y.a23-y.a13*y.a22,a21:y.a23*y.a31-y.a21*y.a33,a22:y.a11*y.a33-y.a13*y.a31,a23:y.a13*y.a21-y.a11*y.a23,a31:y.a21*y.a32-y.a22*y.a31,a32:y.a12*y.a31-y.a11*y.a32,a33:y.a11*y.a22-y.a12*y.a21}}function x(m,h){return{a11:m.a11*h.a11+m.a21*h.a12+m.a31*h.a13,a12:m.a12*h.a11+m.a22*h.a12+m.a32*h.a13,a13:m.a13*h.a11+m.a23*h.a12+m.a33*h.a13,a21:m.a11*h.a21+m.a21*h.a22+m.a31*h.a23,a22:m.a12*h.a21+m.a22*h.a22+m.a32*h.a23,a23:m.a13*h.a21+m.a23*h.a22+m.a33*h.a23,a31:m.a11*h.a31+m.a21*h.a32+m.a31*h.a33,a32:m.a12*h.a31+m.a22*h.a32+m.a32*h.a33,a33:m.a13*h.a31+m.a23*h.a32+m.a33*h.a33}}function f(m,h){for(var E=c({x:3.5,y:3.5},{x:h.dimension-3.5,y:3.5},{x:h.dimension-6.5,y:h.dimension-6.5},{x:3.5,y:h.dimension-3.5}),C=l(h.topLeft,h.topRight,h.alignmentPattern,h.bottomLeft),y=x(C,E),w=a.BitMatrix.createEmpty(h.dimension,h.dimension),B=function(P,R){var M=y.a13*P+y.a23*R+y.a33;return{x:(y.a11*P+y.a21*R+y.a31)/M,y:(y.a12*P+y.a22*R+y.a32)/M}},F=0;F<h.dimension;F++)for(var b=0;b<h.dimension;b++){var D=b+.5,S=F+.5,k=B(D,S);w.set(b,F,m.get(Math.floor(k.x),Math.floor(k.y)))}return{matrix:w,mappingFunction:B}}r.extract=f}),(function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var a=4,l=.5,c=1.5,x=function(D,S){return Math.sqrt(Math.pow(S.x-D.x,2)+Math.pow(S.y-D.y,2))};function f(D){return D.reduce(function(S,k){return S+k})}function m(D,S,k){var P,R,M,O,T=x(D,S),V=x(S,k),z=x(D,k),J,H,W;return V>=T&&V>=z?(P=[S,D,k],J=P[0],H=P[1],W=P[2]):z>=V&&z>=T?(R=[D,S,k],J=R[0],H=R[1],W=R[2]):(M=[D,k,S],J=M[0],H=M[1],W=M[2]),(W.x-H.x)*(J.y-H.y)-(W.y-H.y)*(J.x-H.x)<0&&(O=[W,J],J=O[0],W=O[1]),{bottomLeft:J,topLeft:H,topRight:W}}function h(D,S,k,P){var R=(f(C(D,k,P,5))/7+f(C(D,S,P,5))/7+f(C(k,D,P,5))/7+f(C(S,D,P,5))/7)/4;if(R<1)throw new Error("Invalid module size");var M=Math.round(x(D,S)/R),O=Math.round(x(D,k)/R),T=Math.floor((M+O)/2)+7;switch(T%4){case 0:T++;break;case 2:T--;break}return{dimension:T,moduleSize:R}}function E(D,S,k,P){var R=[{x:Math.floor(D.x),y:Math.floor(D.y)}],M=Math.abs(S.y-D.y)>Math.abs(S.x-D.x),O,T,V,z;M?(O=Math.floor(D.y),T=Math.floor(D.x),V=Math.floor(S.y),z=Math.floor(S.x)):(O=Math.floor(D.x),T=Math.floor(D.y),V=Math.floor(S.x),z=Math.floor(S.y));for(var J=Math.abs(V-O),H=Math.abs(z-T),W=Math.floor(-J/2),re=O<V?1:-1,Z=T<z?1:-1,K=!0,ie=O,j=T;ie!==V+re;ie+=re){var I=M?j:ie,G=M?ie:j;if(k.get(I,G)!==K&&(K=!K,R.push({x:I,y:G}),R.length===P+1))break;if(W+=H,W>0){if(j===z)break;j+=Z,W-=J}}for(var N=[],ae=0;ae<P;ae++)R[ae]&&R[ae+1]?N.push(x(R[ae],R[ae+1])):N.push(0);return N}function C(D,S,k,P){var R,M=S.y-D.y,O=S.x-D.x,T=E(D,S,k,Math.ceil(P/2)),V=E(D,{x:D.x-O,y:D.y-M},k,Math.ceil(P/2)),z=T.shift()+V.shift()-1;return(R=V.concat(z)).concat.apply(R,T)}function y(D,S){var k=f(D)/f(S),P=0;return S.forEach(function(R,M){P+=Math.pow(D[M]-R*k,2)}),{averageSize:k,error:P}}function w(D,S,k){try{var P=C(D,{x:-1,y:D.y},k,S.length),R=C(D,{x:D.x,y:-1},k,S.length),M={x:Math.max(0,D.x-D.y)-1,y:Math.max(0,D.y-D.x)-1},O=C(D,M,k,S.length),T={x:Math.min(k.width,D.x+D.y)+1,y:Math.min(k.height,D.y+D.x)+1},V=C(D,T,k,S.length),z=y(P,S),J=y(R,S),H=y(O,S),W=y(V,S),re=Math.sqrt(z.error*z.error+J.error*J.error+H.error*H.error+W.error*W.error),Z=(z.averageSize+J.averageSize+H.averageSize+W.averageSize)/4,K=(Math.pow(z.averageSize-Z,2)+Math.pow(J.averageSize-Z,2)+Math.pow(H.averageSize-Z,2)+Math.pow(W.averageSize-Z,2))/Z;return re+K}catch{return 1/0}}function B(D,S){for(var k=Math.round(S.x);D.get(k,Math.round(S.y));)k--;for(var P=Math.round(S.x);D.get(P,Math.round(S.y));)P++;for(var R=(k+P)/2,M=Math.round(S.y);D.get(Math.round(R),M);)M--;for(var O=Math.round(S.y);D.get(Math.round(R),O);)O++;var T=(M+O)/2;return{x:R,y:T}}function F(D){for(var S=[],k=[],P=[],R=[],M=function(I){for(var G=0,N=!1,ae=[0,0,0,0,0],Ee=function(xe){var we=D.get(xe,I);if(we===N)G++;else{ae=[ae[1],ae[2],ae[3],ae[4],G],G=1,N=we;var de=f(ae)/7,et=Math.abs(ae[0]-de)<de&&Math.abs(ae[1]-de)<de&&Math.abs(ae[2]-3*de)<3*de&&Math.abs(ae[3]-de)<de&&Math.abs(ae[4]-de)<de&&!we,Ie=f(ae.slice(-3))/3,oe=Math.abs(ae[2]-Ie)<Ie&&Math.abs(ae[3]-Ie)<Ie&&Math.abs(ae[4]-Ie)<Ie&&we;if(et){var Me=xe-ae[3]-ae[4],be=Me-ae[2],Ye={startX:be,endX:Me,y:I},Je=k.filter(function(He){return be>=He.bottom.startX&&be<=He.bottom.endX||Me>=He.bottom.startX&&be<=He.bottom.endX||be<=He.bottom.startX&&Me>=He.bottom.endX&&ae[2]/(He.bottom.endX-He.bottom.startX)<c&&ae[2]/(He.bottom.endX-He.bottom.startX)>l});Je.length>0?Je[0].bottom=Ye:k.push({top:Ye,bottom:Ye})}if(oe){var Qe=xe-ae[4],yt=Qe-ae[3],Ye={startX:yt,y:I,endX:Qe},Je=R.filter(function(ct){return yt>=ct.bottom.startX&&yt<=ct.bottom.endX||Qe>=ct.bottom.startX&&yt<=ct.bottom.endX||yt<=ct.bottom.startX&&Qe>=ct.bottom.endX&&ae[2]/(ct.bottom.endX-ct.bottom.startX)<c&&ae[2]/(ct.bottom.endX-ct.bottom.startX)>l});Je.length>0?Je[0].bottom=Ye:R.push({top:Ye,bottom:Ye})}}},se=-1;se<=D.width;se++)Ee(se);S.push.apply(S,k.filter(function(xe){return xe.bottom.y!==I&&xe.bottom.y-xe.top.y>=2})),k=k.filter(function(xe){return xe.bottom.y===I}),P.push.apply(P,R.filter(function(xe){return xe.bottom.y!==I})),R=R.filter(function(xe){return xe.bottom.y===I})},O=0;O<=D.height;O++)M(O);S.push.apply(S,k.filter(function(I){return I.bottom.y-I.top.y>=2})),P.push.apply(P,R);var T=S.filter(function(I){return I.bottom.y-I.top.y>=2}).map(function(I){var G=(I.top.startX+I.top.endX+I.bottom.startX+I.bottom.endX)/4,N=(I.top.y+I.bottom.y+1)/2;if(D.get(Math.round(G),Math.round(N))){var ae=[I.top.endX-I.top.startX,I.bottom.endX-I.bottom.startX,I.bottom.y-I.top.y+1],Ee=f(ae)/ae.length,se=w({x:Math.round(G),y:Math.round(N)},[1,1,3,1,1],D);return{score:se,x:G,y:N,size:Ee}}}).filter(function(I){return!!I}).sort(function(I,G){return I.score-G.score}).map(function(I,G,N){if(G>a)return null;var ae=N.filter(function(se,xe){return G!==xe}).map(function(se){return{x:se.x,y:se.y,score:se.score+Math.pow(se.size-I.size,2)/I.size,size:se.size}}).sort(function(se,xe){return se.score-xe.score});if(ae.length<2)return null;var Ee=I.score+ae[0].score+ae[1].score;return{points:[I].concat(ae.slice(0,2)),score:Ee}}).filter(function(I){return!!I}).sort(function(I,G){return I.score-G.score});if(T.length===0)return null;var V=m(T[0].points[0],T[0].points[1],T[0].points[2]),z=V.topRight,J=V.topLeft,H=V.bottomLeft,W=b(D,P,z,J,H),re=[];W&&re.push({alignmentPattern:{x:W.alignmentPattern.x,y:W.alignmentPattern.y},bottomLeft:{x:H.x,y:H.y},dimension:W.dimension,topLeft:{x:J.x,y:J.y},topRight:{x:z.x,y:z.y}});var Z=B(D,z),K=B(D,J),ie=B(D,H),j=b(D,P,Z,K,ie);return j&&re.push({alignmentPattern:{x:j.alignmentPattern.x,y:j.alignmentPattern.y},bottomLeft:{x:ie.x,y:ie.y},topLeft:{x:K.x,y:K.y},topRight:{x:Z.x,y:Z.y},dimension:j.dimension}),re.length===0?null:re}r.locate=F;function b(D,S,k,P,R){var M,O,T;try{M=h(P,k,R,D),O=M.dimension,T=M.moduleSize}catch{return null}var V={x:k.x-P.x+R.x,y:k.y-P.y+R.y},z=(x(P,R)+x(P,k))/2/T,J=1-3/z,H={x:P.x+J*(V.x-P.x),y:P.y+J*(V.y-P.y)},W=S.map(function(Z){var K=(Z.top.startX+Z.top.endX+Z.bottom.startX+Z.bottom.endX)/4,ie=(Z.top.y+Z.bottom.y+1)/2;if(D.get(Math.floor(K),Math.floor(ie))){var j=[Z.top.endX-Z.top.startX,Z.bottom.endX-Z.bottom.startX,Z.bottom.y-Z.top.y+1];f(j)/j.length;var I=w({x:Math.floor(K),y:Math.floor(ie)},[1,1,1],D),G=I+x({x:K,y:ie},H);return{x:K,y:ie,score:G}}}).filter(function(Z){return!!Z}).sort(function(Z,K){return Z.score-K.score}),re=z>=15&&W.length?W[0]:H;return{alignmentPattern:re,dimension:O}}})]).default})})(xc)),xc.exports}var l1=KA();const c1=au(l1),XA=Z8({__proto__:null,default:c1},[l1]),kf=()=>new Promise((e,t)=>{const n=indexedDB.open("ours-workspace-devices",2);n.onupgradeneeded=()=>{const r=n.result;r.objectStoreNames.contains("credentials")||r.createObjectStore("credentials",{keyPath:"key"}),r.objectStoreNames.contains("accounts")||r.createObjectStore("accounts",{keyPath:"key"})},n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)});async function Hl(e,t,n){const r=await kf(),o=`${e}:${t}`;try{return await new Promise((a,l)=>{const c=r.transaction("credentials",n===void 0?"readonly":"readwrite"),x=c.objectStore("credentials"),f=n===void 0?x.get(o):n===null?x.delete(o):x.put({key:o,...n});let m;f.onsuccess=()=>{m=f.result},c.oncomplete=()=>a(m),c.onerror=()=>l(c.error)})}finally{r.close()}}async function YA(e){const t=await kf();try{await new Promise((n,r)=>{const o=t.transaction(["credentials","accounts"],"readwrite"),a=o.objectStore("credentials"),l=a.openCursor();o.objectStore("accounts").delete(e),l.onsuccess=()=>{const c=l.result;c&&(String(c.key).startsWith(e+":")&&c.delete(),c.continue())},o.oncomplete=()=>n(),o.onerror=()=>r(o.error)})}finally{t.close()}}async function R9(e,t){const n=await kf();try{return await new Promise((r,o)=>{const a=n.transaction("accounts",t===void 0?"readonly":"readwrite"),l=a.objectStore("accounts"),c=t===void 0?l.get(e):l.put({key:e,introductionComplete:t});let x=t??!1;c.onsuccess=()=>{t===void 0&&(x=c.result?.introductionComplete===!0)},a.oncomplete=()=>r(x),a.onerror=()=>o(a.error)})}finally{n.close()}}function nt({primary:e,className:t="",type:n="button",...r}){return d.jsx("button",{type:n,className:["btn",e&&"primary",t].filter(Boolean).join(" "),...r})}function Ff({className:e="",type:t="button",...n}){return d.jsx("button",{type:t,className:["icon-btn",e].filter(Boolean).join(" "),...n})}function Hs({className:e="",type:t="button",...n}){return d.jsx("button",{type:t,className:["linkbtn",e].filter(Boolean).join(" "),...n})}function u1({value:e,onChange:t,placeholder:n,label:r=n}){return d.jsxs("div",{className:"search adaptive-search",role:"search",children:[d.jsx("span",{className:"adaptive-search-icon","aria-hidden":!0,children:d.jsx(Fe,{name:"search"})}),d.jsx("input",{className:"field","aria-label":r,placeholder:n,value:e,onChange:o=>t(o.target.value),onKeyDown:o=>{o.key==="Escape"&&(o.preventDefault(),t(""))}})]})}function UI({title:e,subtitle:t,onClick:n,avatar:r,end:o,selected:a}){const l=d.jsxs(d.Fragment,{children:[d.jsxs("span",{className:"fleet-row-copy contact-copy",children:[d.jsx("strong",{className:"contact-name",children:e}),t&&d.jsx("small",{className:"contact-last",children:t})]}),o??(n&&d.jsx(r1,{size:16}))]});return n?d.jsxs("button",{className:a===void 0?"fleet-row contact-row":"fleet-row contact-row"+(a?" active":""),"aria-current":a||void 0,onClick:n,children:[l,a&&d.jsx("span",{className:"contact-active-glow","aria-hidden":!0})]}):d.jsx("div",{className:"fleet-row contact-row",children:l})}function Dn({label:e,children:t}){return d.jsxs("label",{className:"fleet-field",children:[d.jsx("span",{children:e}),A.isValidElement(t)?A.cloneElement(t,{"aria-label":e,className:"field"}):t]})}function $I(e){return d.jsx(u1,{...e})}function WI({title:e,subtitle:t,onBack:n,actions:r}){return d.jsxs("header",{className:"fleet-page-heading",children:[d.jsxs("div",{children:[n&&d.jsx(QA,{onClick:n}),d.jsx("h1",{children:e}),t&&d.jsx("p",{children:t})]}),d.jsx("div",{className:"fleet-actions",children:r})]})}function QA({onClick:e,label:t="Back"}){return d.jsx(Ff,{className:"fleet-back","aria-label":t,title:t,onClick:e,children:d.jsx(fA,{size:22})})}function HI({title:e,subtitle:t}){return d.jsxs("dl",{className:"fleet-property",children:[d.jsx("dt",{children:e}),d.jsx("dd",{children:t??"—"})]})}var JA=Object.defineProperty,ts=(e,t)=>JA(e,"name",{value:t,configurable:!0}),x1=!!(typeof window<"u"&&window.document&&window.document.createElement);function pi(e,t,{checkForDefaultPrevented:n=!0}={}){return ts(function(o){if(e?.(o),n===!1||!o||!o.defaultPrevented)return t?.(o)},"handleEvent")}ts(pi,"composeEventHandlers");function ZA(e){if(!x1)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}ts(ZA,"getOwnerWindow");function dd(e){if(!x1)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}ts(dd,"getOwnerDocument");function d1(e,t=!1){const{activeElement:n}=dd(e);if(!n?.nodeName)return null;if(f1(n)&&n.contentDocument)return d1(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=dd(n).getElementById(r);if(o)return o}}return n}ts(d1,"getActiveElement");function f1(e){return e.tagName==="IFRAME"}ts(f1,"isFrame");var eB=Object.defineProperty,Sf=(e,t)=>eB(e,"name",{value:t,configurable:!0});function fd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Sf(fd,"setRef");function h1(...e){return t=>{let n=!1;const r=e.map(o=>{const a=fd(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():fd(e[o],null)}}}}Sf(h1,"composeRefs");function ns(...e){return A.useCallback(h1(...e),e)}Sf(ns,"useComposedRefs");var tB=Object.defineProperty,Hn=(e,t)=>tB(e,"name",{value:t,configurable:!0});function nB(e,t){const n=A.createContext(t);n.displayName=e+"Context";const r=Hn(a=>{const{children:l,...c}=a,x=A.useMemo(()=>c,Object.values(c));return d.jsx(n.Provider,{value:x,children:l})},"Provider");r.displayName=e+"Provider";function o(a,l={}){const{optional:c=!1}=l,x=A.useContext(n);if(x)return x;if(t!==void 0)return t;if(!c)throw new Error(`\`${a}\` must be used within \`${e}\``)}return Hn(o,"useContext"),[r,o]}Hn(nB,"createContext");function m1(e,t=[]){let n=[];function r(a,l){const c=A.createContext(l);c.displayName=a+"Context";const x=n.length;n=[...n,l];const f=Hn(h=>{const{scope:E,children:C,...y}=h,w=E?.[e]?.[x]||c,B=A.useMemo(()=>y,Object.values(y));return d.jsx(w.Provider,{value:B,children:C})},"Provider");f.displayName=a+"Provider";function m(h,E,C={}){const{optional:y=!1}=C,w=E?.[e]?.[x]||c,B=A.useContext(w);if(B)return B;if(l!==void 0)return l;if(!y)throw new Error(`\`${h}\` must be used within \`${a}\``)}return Hn(m,"useContext"),[f,m]}Hn(r,"createContext");const o=Hn(()=>{const a=n.map(l=>A.createContext(l));return Hn(function(c){const x=c?.[e]||a;return A.useMemo(()=>({[`__scope${e}`]:{...c,[e]:x}}),[c,x])},"useScope")},"createScope");return o.scopeName=e,[r,p1(o,...t)]}Hn(m1,"createContextScope");function p1(...e){const t=e[0];if(e.length===1)return t;const n=Hn(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return Hn(function(a){const l=r.reduce((c,{useScope:x,scopeName:f})=>{const h=x(a)[`__scope${f}`];return{...c,...h}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}Hn(p1,"composeContextScopes");var Ei=globalThis?.document?A.useLayoutEffect:()=>{},rB=Object.defineProperty,iB=(e,t)=>rB(e,"name",{value:t,configurable:!0}),oB=Sa[" useId ".trim().toString()]||(()=>{}),sB=0;function dc(e){const[t,n]=A.useState(oB());return Ei(()=>{e||n(r=>r??String(sB++))},[e]),e||(t?`radix-${t}`:"")}iB(dc,"useId");var aB=Object.defineProperty,lB=(e,t)=>aB(e,"name",{value:t,configurable:!0}),N9=Sa[" useEffectEvent ".trim().toString()],M9=Sa[" useInsertionEffect ".trim().toString()];function E1(e){if(typeof N9=="function")return N9(e);const t=A.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof M9=="function"?M9(()=>{t.current=e}):Ei(()=>{t.current=e}),A.useMemo(()=>((...n)=>t.current?.(...n)),[])}lB(E1,"useEffectEvent");var cB=Object.defineProperty,ba=(e,t)=>cB(e,"name",{value:t,configurable:!0}),uB=Sa[" useInsertionEffect ".trim().toString()]||Ei;function g1({prop:e,defaultProp:t,onChange:n=ba(()=>{},"onChange"),caller:r}){const[o,a,l]=C1({defaultProp:t,onChange:n}),c=e!==void 0,x=c?e:o,f=A.useCallback(m=>{if(c){const h=y1(m)?m(e):m;h!==e&&l.current?.(h)}else a(m)},[c,e,a,l]);return[x,f]}ba(g1,"useControllableState");function C1({defaultProp:e,onChange:t}){const[n,r]=A.useState(e),o=A.useRef(n),a=A.useRef(t);return uB(()=>{a.current=t},[t]),A.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}ba(C1,"useUncontrolledState");function y1(e){return typeof e=="function"}ba(y1,"isFunction");var I9=Symbol("RADIX:SYNC_STATE");function xB(e,t,n,r){const{prop:o,defaultProp:a,onChange:l,caller:c}=t,x=o!==void 0,f=E1(l),m=[{...n,state:a}];r&&m.push(r);const[h,E]=A.useReducer((B,F)=>{if(F.type===I9)return{...B,state:F.state};const b=e(B,F);return x&&!Object.is(b.state,B.state)&&f(b.state),b},...m),C=h.state,y=A.useRef(C);A.useEffect(()=>{y.current!==C&&(y.current=C,x||f(C))},[C,y,x]);const w=A.useMemo(()=>o!==void 0?{...h,state:o}:h,[h,o]);return A.useEffect(()=>{x&&!Object.is(o,h.state)&&E({type:I9,state:o})},[o,h.state,x]),[w,E]}ba(xB,"useControllableStateReducer");var ax={exports:{}},wn={},lx={exports:{}},cx={};/**
|
|
304
|
+
* @license React
|
|
305
|
+
* scheduler.production.min.js
|
|
306
|
+
*
|
|
307
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
308
|
+
*
|
|
309
|
+
* This source code is licensed under the MIT license found in the
|
|
310
|
+
* LICENSE file in the root directory of this source tree.
|
|
311
|
+
*/var L9;function dB(){return L9||(L9=1,(function(e){function t(K,ie){var j=K.length;K.push(ie);e:for(;0<j;){var I=j-1>>>1,G=K[I];if(0<o(G,ie))K[I]=ie,K[j]=G,j=I;else break e}}function n(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var ie=K[0],j=K.pop();if(j!==ie){K[0]=j;e:for(var I=0,G=K.length,N=G>>>1;I<N;){var ae=2*(I+1)-1,Ee=K[ae],se=ae+1,xe=K[se];if(0>o(Ee,j))se<G&&0>o(xe,Ee)?(K[I]=xe,K[se]=j,I=se):(K[I]=Ee,K[ae]=j,I=ae);else if(se<G&&0>o(xe,j))K[I]=xe,K[se]=j,I=se;else break e}}return ie}function o(K,ie){var j=K.sortIndex-ie.sortIndex;return j!==0?j:K.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var x=[],f=[],m=1,h=null,E=3,C=!1,y=!1,w=!1,B=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function D(K){for(var ie=n(f);ie!==null;){if(ie.callback===null)r(f);else if(ie.startTime<=K)r(f),ie.sortIndex=ie.expirationTime,t(x,ie);else break;ie=n(f)}}function S(K){if(w=!1,D(K),!y)if(n(x)!==null)y=!0,re(k);else{var ie=n(f);ie!==null&&Z(S,ie.startTime-K)}}function k(K,ie){y=!1,w&&(w=!1,F(M),M=-1),C=!0;var j=E;try{for(D(ie),h=n(x);h!==null&&(!(h.expirationTime>ie)||K&&!V());){var I=h.callback;if(typeof I=="function"){h.callback=null,E=h.priorityLevel;var G=I(h.expirationTime<=ie);ie=e.unstable_now(),typeof G=="function"?h.callback=G:h===n(x)&&r(x),D(ie)}else r(x);h=n(x)}if(h!==null)var N=!0;else{var ae=n(f);ae!==null&&Z(S,ae.startTime-ie),N=!1}return N}finally{h=null,E=j,C=!1}}var P=!1,R=null,M=-1,O=5,T=-1;function V(){return!(e.unstable_now()-T<O)}function z(){if(R!==null){var K=e.unstable_now();T=K;var ie=!0;try{ie=R(!0,K)}finally{ie?J():(P=!1,R=null)}}else P=!1}var J;if(typeof b=="function")J=function(){b(z)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,W=H.port2;H.port1.onmessage=z,J=function(){W.postMessage(null)}}else J=function(){B(z,0)};function re(K){R=K,P||(P=!0,J())}function Z(K,ie){M=B(function(){K(e.unstable_now())},ie)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_continueExecution=function(){y||C||(y=!0,re(k))},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return E},e.unstable_getFirstCallbackNode=function(){return n(x)},e.unstable_next=function(K){switch(E){case 1:case 2:case 3:var ie=3;break;default:ie=E}var j=E;E=ie;try{return K()}finally{E=j}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(K,ie){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var j=E;E=K;try{return ie()}finally{E=j}},e.unstable_scheduleCallback=function(K,ie,j){var I=e.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?I+j:I):j=I,K){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=j+G,K={id:m++,callback:ie,priorityLevel:K,startTime:j,expirationTime:G,sortIndex:-1},j>I?(K.sortIndex=j,t(f,K),n(x)===null&&K===n(f)&&(w?(F(M),M=-1):w=!0,Z(S,j-I))):(K.sortIndex=G,t(x,K),y||C||(y=!0,re(k))),K},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(K){var ie=E;return function(){var j=E;E=ie;try{return K.apply(this,arguments)}finally{E=j}}}})(cx)),cx}var O9;function fB(){return O9||(O9=1,lx.exports=dB()),lx.exports}/**
|
|
312
|
+
* @license React
|
|
313
|
+
* react-dom.production.min.js
|
|
314
|
+
*
|
|
315
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
316
|
+
*
|
|
317
|
+
* This source code is licensed under the MIT license found in the
|
|
318
|
+
* LICENSE file in the root directory of this source tree.
|
|
319
|
+
*/var z9;function hB(){if(z9)return wn;z9=1;var e=wf(),t=fB();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,u=1;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){l(i,s),l(i+"Capture",s)}function l(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),x=Object.prototype.hasOwnProperty,f=/^[: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]*$/,m={},h={};function E(i){return x.call(h,i)?!0:x.call(m,i)?!1:f.test(i)?h[i]=!0:(m[i]=!0,!1)}function C(i,s,u,p){if(u!==null&&u.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return p?!1:u!==null?!u.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function y(i,s,u,p){if(s===null||typeof s>"u"||C(i,s,u,p))return!0;if(p)return!1;if(u!==null)switch(u.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function w(i,s,u,p,g,v,_){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=p,this.attributeNamespace=g,this.mustUseProperty=u,this.propertyName=i,this.type=s,this.sanitizeURL=v,this.removeEmptyString=_}var B={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){B[i]=new w(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];B[s]=new w(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){B[i]=new w(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){B[i]=new w(i,2,!1,i,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(i){B[i]=new w(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){B[i]=new w(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){B[i]=new w(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){B[i]=new w(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){B[i]=new w(i,5,!1,i.toLowerCase(),null,!1,!1)});var F=/[\-:]([a-z])/g;function b(i){return i[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(i){var s=i.replace(F,b);B[s]=new w(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(F,b);B[s]=new w(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(F,b);B[s]=new w(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){B[i]=new w(i,1,!1,i.toLowerCase(),null,!1,!1)}),B.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){B[i]=new w(i,1,!1,i.toLowerCase(),null,!0,!0)});function D(i,s,u,p){var g=B.hasOwnProperty(s)?B[s]:null;(g!==null?g.type!==0:p||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(y(s,u,g,p)&&(u=null),p||g===null?E(s)&&(u===null?i.removeAttribute(s):i.setAttribute(s,""+u)):g.mustUseProperty?i[g.propertyName]=u===null?g.type===3?!1:"":u:(s=g.attributeName,p=g.attributeNamespace,u===null?i.removeAttribute(s):(g=g.type,u=g===3||g===4&&u===!0?"":""+u,p?i.setAttributeNS(p,s,u):i.setAttribute(s,u))))}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),P=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),V=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),Z=Symbol.for("react.offscreen"),K=Symbol.iterator;function ie(i){return i===null||typeof i!="object"?null:(i=K&&i[K]||i["@@iterator"],typeof i=="function"?i:null)}var j=Object.assign,I;function G(i){if(I===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);I=s&&s[1]||""}return`
|
|
320
|
+
`+I+i}var N=!1;function ae(i,s){if(!i||N)return"";N=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(ee){var p=ee}Reflect.construct(i,[],s)}else{try{s.call()}catch(ee){p=ee}i.call(s.prototype)}else{try{throw Error()}catch(ee){p=ee}i()}}catch(ee){if(ee&&p&&typeof ee.stack=="string"){for(var g=ee.stack.split(`
|
|
321
|
+
`),v=p.stack.split(`
|
|
322
|
+
`),_=g.length-1,L=v.length-1;1<=_&&0<=L&&g[_]!==v[L];)L--;for(;1<=_&&0<=L;_--,L--)if(g[_]!==v[L]){if(_!==1||L!==1)do if(_--,L--,0>L||g[_]!==v[L]){var U=`
|
|
323
|
+
`+g[_].replace(" at new "," at ");return i.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",i.displayName)),U}while(1<=_&&0<=L);break}}}finally{N=!1,Error.prepareStackTrace=u}return(i=i?i.displayName||i.name:"")?G(i):""}function Ee(i){switch(i.tag){case 5:return G(i.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return i=ae(i.type,!1),i;case 11:return i=ae(i.type.render,!1),i;case 1:return i=ae(i.type,!0),i;default:return""}}function se(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case R:return"Fragment";case P:return"Portal";case O:return"Profiler";case M:return"StrictMode";case J:return"Suspense";case H:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case V:return(i.displayName||"Context")+".Consumer";case T:return(i._context.displayName||"Context")+".Provider";case z:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case W:return s=i.displayName||null,s!==null?s:se(i.type)||"Memo";case re:s=i._payload,i=i._init;try{return se(i(s))}catch{}}return null}function xe(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return se(s);case 8:return s===M?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function we(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function de(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function et(i){var s=de(i)?"checked":"value",u=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),p=""+i[s];if(!i.hasOwnProperty(s)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,v=u.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(_){p=""+_,v.call(this,_)}}),Object.defineProperty(i,s,{enumerable:u.enumerable}),{getValue:function(){return p},setValue:function(_){p=""+_},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Ie(i){i._valueTracker||(i._valueTracker=et(i))}function oe(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var u=s.getValue(),p="";return i&&(p=de(i)?i.checked?"true":"false":i.value),i=p,i!==u?(s.setValue(i),!0):!1}function Me(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function be(i,s){var u=s.checked;return j({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??i._wrapperState.initialChecked})}function Ye(i,s){var u=s.defaultValue==null?"":s.defaultValue,p=s.checked!=null?s.checked:s.defaultChecked;u=we(s.value!=null?s.value:u),i._wrapperState={initialChecked:p,initialValue:u,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Je(i,s){s=s.checked,s!=null&&D(i,"checked",s,!1)}function Qe(i,s){Je(i,s);var u=we(s.value),p=s.type;if(u!=null)p==="number"?(u===0&&i.value===""||i.value!=u)&&(i.value=""+u):i.value!==""+u&&(i.value=""+u);else if(p==="submit"||p==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?He(i,s.type,u):s.hasOwnProperty("defaultValue")&&He(i,s.type,we(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function yt(i,s,u){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var p=s.type;if(!(p!=="submit"&&p!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,u||s===i.value||(i.value=s),i.defaultValue=s}u=i.name,u!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,u!==""&&(i.name=u)}function He(i,s,u){(s!=="number"||Me(i.ownerDocument)!==i)&&(u==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+u&&(i.defaultValue=""+u))}var dt=Array.isArray;function ct(i,s,u,p){if(i=i.options,s){s={};for(var g=0;g<u.length;g++)s["$"+u[g]]=!0;for(u=0;u<i.length;u++)g=s.hasOwnProperty("$"+i[u].value),i[u].selected!==g&&(i[u].selected=g),g&&p&&(i[u].defaultSelected=!0)}else{for(u=""+we(u),s=null,g=0;g<i.length;g++){if(i[g].value===u){i[g].selected=!0,p&&(i[g].defaultSelected=!0);return}s!==null||i[g].disabled||(s=i[g])}s!==null&&(s.selected=!0)}}function Ke(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return j({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Vt(i,s){var u=s.value;if(u==null){if(u=s.children,s=s.defaultValue,u!=null){if(s!=null)throw Error(n(92));if(dt(u)){if(1<u.length)throw Error(n(93));u=u[0]}s=u}s==null&&(s=""),u=s}i._wrapperState={initialValue:we(u)}}function tt(i,s){var u=we(s.value),p=we(s.defaultValue);u!=null&&(u=""+u,u!==i.value&&(i.value=u),s.defaultValue==null&&i.defaultValue!==u&&(i.defaultValue=u)),p!=null&&(i.defaultValue=""+p)}function st(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function Y(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?Y(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var je,De=(function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,u,p,g){MSApp.execUnsafeLocalFunction(function(){return i(s,u,p,g)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(je=je||document.createElement("div"),je.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=je.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function qe(i,s){if(s){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=s;return}}i.textContent=s}var Et={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},Rt=["Webkit","ms","Moz","O"];Object.keys(Et).forEach(function(i){Rt.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Et[s]=Et[i]})});function q(i,s,u){return s==null||typeof s=="boolean"||s===""?"":u||typeof s!="number"||s===0||Et.hasOwnProperty(i)&&Et[i]?(""+s).trim():s+"px"}function ve(i,s){i=i.style;for(var u in s)if(s.hasOwnProperty(u)){var p=u.indexOf("--")===0,g=q(u,s[u],p);u==="float"&&(u="cssFloat"),p?i.setProperty(u,g):i[u]=g}}var he=j({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 Be(i,s){if(s){if(he[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Le(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){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 Ce=null;function lt(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var bt=null,vt=null,ft=null;function ht(i){if(i=bs(i)){if(typeof bt!="function")throw Error(n(280));var s=i.stateNode;s&&(s=sl(s),bt(i.stateNode,i.type,s))}}function kt(i){vt?ft?ft.push(i):ft=[i]:vt=i}function te(){if(vt){var i=vt,s=ft;if(ft=vt=null,ht(i),s)for(i=0;i<s.length;i++)ht(s[i])}}function me(i,s){return i(s)}function ze(){}var We=!1;function Re(i,s,u){if(We)return i(s,u);We=!0;try{return me(i,s,u)}finally{We=!1,(vt!==null||ft!==null)&&(ze(),te())}}function rt(i,s){var u=i.stateNode;if(u===null)return null;var p=sl(u);if(p===null)return null;u=p[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(n(231,s,typeof u));return u}var Pt=!1;if(c)try{var on={};Object.defineProperty(on,"passive",{get:function(){Pt=!0}}),window.addEventListener("test",on,on),window.removeEventListener("test",on,on)}catch{Pt=!1}function Nn(i,s,u,p,g,v,_,L,U){var ee=Array.prototype.slice.call(arguments,3);try{s.apply(u,ee)}catch(ue){this.onError(ue)}}var Lt=!1,Wr=null,xr=!1,oo=null,Bu={onError:function(i){Lt=!0,Wr=i}};function cs(i,s,u,p,g,v,_,L,U){Lt=!1,Wr=null,Nn.apply(Bu,arguments)}function wu(i,s,u,p,g,v,_,L,U){if(cs.apply(this,arguments),Lt){if(Lt){var ee=Wr;Lt=!1,Wr=null}else throw Error(n(198));xr||(xr=!0,oo=ee)}}function Yn(i){var s=i,u=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(u=s.return),i=s.return;while(i)}return s.tag===3?u:null}function us(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function ne(i){if(Yn(i)!==i)throw Error(n(188))}function fe(i){var s=i.alternate;if(!s){if(s=Yn(i),s===null)throw Error(n(188));return s!==i?null:i}for(var u=i,p=s;;){var g=u.return;if(g===null)break;var v=g.alternate;if(v===null){if(p=g.return,p!==null){u=p;continue}break}if(g.child===v.child){for(v=g.child;v;){if(v===u)return ne(g),i;if(v===p)return ne(g),s;v=v.sibling}throw Error(n(188))}if(u.return!==p.return)u=g,p=v;else{for(var _=!1,L=g.child;L;){if(L===u){_=!0,u=g,p=v;break}if(L===p){_=!0,p=g,u=v;break}L=L.sibling}if(!_){for(L=v.child;L;){if(L===u){_=!0,u=v,p=g;break}if(L===p){_=!0,p=v,u=g;break}L=L.sibling}if(!_)throw Error(n(189))}}if(u.alternate!==p)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?i:s}function Ae(i){return i=fe(i),i!==null?Ze(i):null}function Ze(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=Ze(i);if(s!==null)return s;i=i.sibling}return null}var Ut=t.unstable_scheduleCallback,$t=t.unstable_cancelCallback,Mn=t.unstable_shouldYield,dr=t.unstable_requestPaint,at=t.unstable_now,In=t.unstable_getCurrentPriorityLevel,Nt=t.unstable_ImmediatePriority,br=t.unstable_UserBlockingPriority,za=t.unstable_NormalPriority,f6=t.unstable_LowPriority,tm=t.unstable_IdlePriority,Va=null,fr=null;function h6(i){if(fr&&typeof fr.onCommitFiberRoot=="function")try{fr.onCommitFiberRoot(Va,i,void 0,(i.current.flags&128)===128)}catch{}}var Qn=Math.clz32?Math.clz32:E6,m6=Math.log,p6=Math.LN2;function E6(i){return i>>>=0,i===0?32:31-(m6(i)/p6|0)|0}var Ua=64,$a=4194304;function xs(i){switch(i&-i){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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Wa(i,s){var u=i.pendingLanes;if(u===0)return 0;var p=0,g=i.suspendedLanes,v=i.pingedLanes,_=u&268435455;if(_!==0){var L=_&~g;L!==0?p=xs(L):(v&=_,v!==0&&(p=xs(v)))}else _=u&~g,_!==0?p=xs(_):v!==0&&(p=xs(v));if(p===0)return 0;if(s!==0&&s!==p&&(s&g)===0&&(g=p&-p,v=s&-s,g>=v||g===16&&(v&4194240)!==0))return s;if((p&4)!==0&&(p|=u&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=p;0<s;)u=31-Qn(s),g=1<<u,p|=i[u],s&=~g;return p}function g6(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function C6(i,s){for(var u=i.suspendedLanes,p=i.pingedLanes,g=i.expirationTimes,v=i.pendingLanes;0<v;){var _=31-Qn(v),L=1<<_,U=g[_];U===-1?((L&u)===0||(L&p)!==0)&&(g[_]=g6(L,s)):U<=s&&(i.expiredLanes|=L),v&=~L}}function Du(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function nm(){var i=Ua;return Ua<<=1,(Ua&4194240)===0&&(Ua=64),i}function ku(i){for(var s=[],u=0;31>u;u++)s.push(i);return s}function ds(i,s,u){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Qn(s),i[s]=u}function y6(i,s){var u=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var p=i.eventTimes;for(i=i.expirationTimes;0<u;){var g=31-Qn(u),v=1<<g;s[g]=0,p[g]=-1,i[g]=-1,u&=~v}}function Fu(i,s){var u=i.entangledLanes|=s;for(i=i.entanglements;u;){var p=31-Qn(u),g=1<<p;g&s|i[p]&s&&(i[p]|=s),u&=~g}}var gt=0;function rm(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var im,Su,om,sm,am,bu=!1,Ha=[],Hr=null,Gr=null,qr=null,fs=new Map,hs=new Map,Kr=[],v6="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function lm(i,s){switch(i){case"focusin":case"focusout":Hr=null;break;case"dragenter":case"dragleave":Gr=null;break;case"mouseover":case"mouseout":qr=null;break;case"pointerover":case"pointerout":fs.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":hs.delete(s.pointerId)}}function ms(i,s,u,p,g,v){return i===null||i.nativeEvent!==v?(i={blockedOn:s,domEventName:u,eventSystemFlags:p,nativeEvent:v,targetContainers:[g]},s!==null&&(s=bs(s),s!==null&&Su(s)),i):(i.eventSystemFlags|=p,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function A6(i,s,u,p,g){switch(s){case"focusin":return Hr=ms(Hr,i,s,u,p,g),!0;case"dragenter":return Gr=ms(Gr,i,s,u,p,g),!0;case"mouseover":return qr=ms(qr,i,s,u,p,g),!0;case"pointerover":var v=g.pointerId;return fs.set(v,ms(fs.get(v)||null,i,s,u,p,g)),!0;case"gotpointercapture":return v=g.pointerId,hs.set(v,ms(hs.get(v)||null,i,s,u,p,g)),!0}return!1}function cm(i){var s=Bi(i.target);if(s!==null){var u=Yn(s);if(u!==null){if(s=u.tag,s===13){if(s=us(u),s!==null){i.blockedOn=s,am(i.priority,function(){om(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Ga(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var u=_u(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(u===null){u=i.nativeEvent;var p=new u.constructor(u.type,u);Ce=p,u.target.dispatchEvent(p),Ce=null}else return s=bs(u),s!==null&&Su(s),i.blockedOn=u,!1;s.shift()}return!0}function um(i,s,u){Ga(i)&&u.delete(s)}function B6(){bu=!1,Hr!==null&&Ga(Hr)&&(Hr=null),Gr!==null&&Ga(Gr)&&(Gr=null),qr!==null&&Ga(qr)&&(qr=null),fs.forEach(um),hs.forEach(um)}function ps(i,s){i.blockedOn===s&&(i.blockedOn=null,bu||(bu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,B6)))}function Es(i){function s(g){return ps(g,i)}if(0<Ha.length){ps(Ha[0],i);for(var u=1;u<Ha.length;u++){var p=Ha[u];p.blockedOn===i&&(p.blockedOn=null)}}for(Hr!==null&&ps(Hr,i),Gr!==null&&ps(Gr,i),qr!==null&&ps(qr,i),fs.forEach(s),hs.forEach(s),u=0;u<Kr.length;u++)p=Kr[u],p.blockedOn===i&&(p.blockedOn=null);for(;0<Kr.length&&(u=Kr[0],u.blockedOn===null);)cm(u),u.blockedOn===null&&Kr.shift()}var so=S.ReactCurrentBatchConfig,qa=!0;function w6(i,s,u,p){var g=gt,v=so.transition;so.transition=null;try{gt=1,Pu(i,s,u,p)}finally{gt=g,so.transition=v}}function D6(i,s,u,p){var g=gt,v=so.transition;so.transition=null;try{gt=4,Pu(i,s,u,p)}finally{gt=g,so.transition=v}}function Pu(i,s,u,p){if(qa){var g=_u(i,s,u,p);if(g===null)Ku(i,s,p,Ka,u),lm(i,p);else if(A6(g,i,s,u,p))p.stopPropagation();else if(lm(i,p),s&4&&-1<v6.indexOf(i)){for(;g!==null;){var v=bs(g);if(v!==null&&im(v),v=_u(i,s,u,p),v===null&&Ku(i,s,p,Ka,u),v===g)break;g=v}g!==null&&p.stopPropagation()}else Ku(i,s,p,null,u)}}var Ka=null;function _u(i,s,u,p){if(Ka=null,i=lt(p),i=Bi(i),i!==null)if(s=Yn(i),s===null)i=null;else if(u=s.tag,u===13){if(i=us(s),i!==null)return i;i=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Ka=i,null}function xm(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(In()){case Nt:return 1;case br:return 4;case za:case f6:return 16;case tm:return 536870912;default:return 16}default:return 16}}var Xr=null,ju=null,Xa=null;function dm(){if(Xa)return Xa;var i,s=ju,u=s.length,p,g="value"in Xr?Xr.value:Xr.textContent,v=g.length;for(i=0;i<u&&s[i]===g[i];i++);var _=u-i;for(p=1;p<=_&&s[u-p]===g[v-p];p++);return Xa=g.slice(i,1<p?1-p:void 0)}function Ya(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Qa(){return!0}function fm(){return!1}function bn(i){function s(u,p,g,v,_){this._reactName=u,this._targetInst=g,this.type=p,this.nativeEvent=v,this.target=_,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(u=i[L],this[L]=u?u(v):v[L]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Qa:fm,this.isPropagationStopped=fm,this}return j(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Qa)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Qa)},persist:function(){},isPersistent:Qa}),s}var ao={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tu=bn(ao),gs=j({},ao,{view:0,detail:0}),k6=bn(gs),Ru,Nu,Cs,Ja=j({},gs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Iu,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Cs&&(Cs&&i.type==="mousemove"?(Ru=i.screenX-Cs.screenX,Nu=i.screenY-Cs.screenY):Nu=Ru=0,Cs=i),Ru)},movementY:function(i){return"movementY"in i?i.movementY:Nu}}),hm=bn(Ja),F6=j({},Ja,{dataTransfer:0}),S6=bn(F6),b6=j({},gs,{relatedTarget:0}),Mu=bn(b6),P6=j({},ao,{animationName:0,elapsedTime:0,pseudoElement:0}),_6=bn(P6),j6=j({},ao,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),T6=bn(j6),R6=j({},ao,{data:0}),mm=bn(R6),N6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},M6={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},I6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function L6(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=I6[i])?!!s[i]:!1}function Iu(){return L6}var O6=j({},gs,{key:function(i){if(i.key){var s=N6[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Ya(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?M6[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Iu,charCode:function(i){return i.type==="keypress"?Ya(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Ya(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),z6=bn(O6),V6=j({},Ja,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pm=bn(V6),U6=j({},gs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Iu}),$6=bn(U6),W6=j({},ao,{propertyName:0,elapsedTime:0,pseudoElement:0}),H6=bn(W6),G6=j({},Ja,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),q6=bn(G6),K6=[9,13,27,32],Lu=c&&"CompositionEvent"in window,ys=null;c&&"documentMode"in document&&(ys=document.documentMode);var X6=c&&"TextEvent"in window&&!ys,Em=c&&(!Lu||ys&&8<ys&&11>=ys),gm=" ",Cm=!1;function ym(i,s){switch(i){case"keyup":return K6.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vm(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var lo=!1;function Y6(i,s){switch(i){case"compositionend":return vm(s);case"keypress":return s.which!==32?null:(Cm=!0,gm);case"textInput":return i=s.data,i===gm&&Cm?null:i;default:return null}}function Q6(i,s){if(lo)return i==="compositionend"||!Lu&&ym(i,s)?(i=dm(),Xa=ju=Xr=null,lo=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Em&&s.locale!=="ko"?null:s.data;default:return null}}var J6={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Am(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!J6[i.type]:s==="textarea"}function Bm(i,s,u,p){kt(p),s=rl(s,"onChange"),0<s.length&&(u=new Tu("onChange","change",null,u,p),i.push({event:u,listeners:s}))}var vs=null,As=null;function Z6(i){Vm(i,0)}function Za(i){var s=ho(i);if(oe(s))return i}function e5(i,s){if(i==="change")return s}var wm=!1;if(c){var Ou;if(c){var zu="oninput"in document;if(!zu){var Dm=document.createElement("div");Dm.setAttribute("oninput","return;"),zu=typeof Dm.oninput=="function"}Ou=zu}else Ou=!1;wm=Ou&&(!document.documentMode||9<document.documentMode)}function km(){vs&&(vs.detachEvent("onpropertychange",Fm),As=vs=null)}function Fm(i){if(i.propertyName==="value"&&Za(As)){var s=[];Bm(s,As,i,lt(i)),Re(Z6,s)}}function t5(i,s,u){i==="focusin"?(km(),vs=s,As=u,vs.attachEvent("onpropertychange",Fm)):i==="focusout"&&km()}function n5(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Za(As)}function r5(i,s){if(i==="click")return Za(s)}function i5(i,s){if(i==="input"||i==="change")return Za(s)}function o5(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Jn=typeof Object.is=="function"?Object.is:o5;function Bs(i,s){if(Jn(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var u=Object.keys(i),p=Object.keys(s);if(u.length!==p.length)return!1;for(p=0;p<u.length;p++){var g=u[p];if(!x.call(s,g)||!Jn(i[g],s[g]))return!1}return!0}function Sm(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function bm(i,s){var u=Sm(i);i=0;for(var p;u;){if(u.nodeType===3){if(p=i+u.textContent.length,i<=s&&p>=s)return{node:u,offset:s-i};i=p}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Sm(u)}}function Pm(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?Pm(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function _m(){for(var i=window,s=Me();s instanceof i.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)i=s.contentWindow;else break;s=Me(i.document)}return s}function Vu(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function s5(i){var s=_m(),u=i.focusedElem,p=i.selectionRange;if(s!==u&&u&&u.ownerDocument&&Pm(u.ownerDocument.documentElement,u)){if(p!==null&&Vu(u)){if(s=p.start,i=p.end,i===void 0&&(i=s),"selectionStart"in u)u.selectionStart=s,u.selectionEnd=Math.min(i,u.value.length);else if(i=(s=u.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var g=u.textContent.length,v=Math.min(p.start,g);p=p.end===void 0?v:Math.min(p.end,g),!i.extend&&v>p&&(g=p,p=v,v=g),g=bm(u,v);var _=bm(u,p);g&&_&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==_.node||i.focusOffset!==_.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),v>p?(i.addRange(s),i.extend(_.node,_.offset)):(s.setEnd(_.node,_.offset),i.addRange(s)))}}for(s=[],i=u;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<s.length;u++)i=s[u],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var a5=c&&"documentMode"in document&&11>=document.documentMode,co=null,Uu=null,ws=null,$u=!1;function jm(i,s,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;$u||co==null||co!==Me(p)||(p=co,"selectionStart"in p&&Vu(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),ws&&Bs(ws,p)||(ws=p,p=rl(Uu,"onSelect"),0<p.length&&(s=new Tu("onSelect","select",null,s,u),i.push({event:s,listeners:p}),s.target=co)))}function el(i,s){var u={};return u[i.toLowerCase()]=s.toLowerCase(),u["Webkit"+i]="webkit"+s,u["Moz"+i]="moz"+s,u}var uo={animationend:el("Animation","AnimationEnd"),animationiteration:el("Animation","AnimationIteration"),animationstart:el("Animation","AnimationStart"),transitionend:el("Transition","TransitionEnd")},Wu={},Tm={};c&&(Tm=document.createElement("div").style,"AnimationEvent"in window||(delete uo.animationend.animation,delete uo.animationiteration.animation,delete uo.animationstart.animation),"TransitionEvent"in window||delete uo.transitionend.transition);function tl(i){if(Wu[i])return Wu[i];if(!uo[i])return i;var s=uo[i],u;for(u in s)if(s.hasOwnProperty(u)&&u in Tm)return Wu[i]=s[u];return i}var Rm=tl("animationend"),Nm=tl("animationiteration"),Mm=tl("animationstart"),Im=tl("transitionend"),Lm=new Map,Om="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Yr(i,s){Lm.set(i,s),a(s,[i])}for(var Hu=0;Hu<Om.length;Hu++){var Gu=Om[Hu],l5=Gu.toLowerCase(),c5=Gu[0].toUpperCase()+Gu.slice(1);Yr(l5,"on"+c5)}Yr(Rm,"onAnimationEnd"),Yr(Nm,"onAnimationIteration"),Yr(Mm,"onAnimationStart"),Yr("dblclick","onDoubleClick"),Yr("focusin","onFocus"),Yr("focusout","onBlur"),Yr(Im,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ds="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),u5=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ds));function zm(i,s,u){var p=i.type||"unknown-event";i.currentTarget=u,wu(p,s,void 0,i),i.currentTarget=null}function Vm(i,s){s=(s&4)!==0;for(var u=0;u<i.length;u++){var p=i[u],g=p.event;p=p.listeners;e:{var v=void 0;if(s)for(var _=p.length-1;0<=_;_--){var L=p[_],U=L.instance,ee=L.currentTarget;if(L=L.listener,U!==v&&g.isPropagationStopped())break e;zm(g,L,ee),v=U}else for(_=0;_<p.length;_++){if(L=p[_],U=L.instance,ee=L.currentTarget,L=L.listener,U!==v&&g.isPropagationStopped())break e;zm(g,L,ee),v=U}}}if(xr)throw i=oo,xr=!1,oo=null,i}function Ft(i,s){var u=s[e0];u===void 0&&(u=s[e0]=new Set);var p=i+"__bubble";u.has(p)||(Um(s,i,2,!1),u.add(p))}function qu(i,s,u){var p=0;s&&(p|=4),Um(u,i,p,s)}var nl="_reactListening"+Math.random().toString(36).slice(2);function ks(i){if(!i[nl]){i[nl]=!0,r.forEach(function(u){u!=="selectionchange"&&(u5.has(u)||qu(u,!1,i),qu(u,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[nl]||(s[nl]=!0,qu("selectionchange",!1,s))}}function Um(i,s,u,p){switch(xm(s)){case 1:var g=w6;break;case 4:g=D6;break;default:g=Pu}u=g.bind(null,s,u,i),g=void 0,!Pt||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),p?g!==void 0?i.addEventListener(s,u,{capture:!0,passive:g}):i.addEventListener(s,u,!0):g!==void 0?i.addEventListener(s,u,{passive:g}):i.addEventListener(s,u,!1)}function Ku(i,s,u,p,g){var v=p;if((s&1)===0&&(s&2)===0&&p!==null)e:for(;;){if(p===null)return;var _=p.tag;if(_===3||_===4){var L=p.stateNode.containerInfo;if(L===g||L.nodeType===8&&L.parentNode===g)break;if(_===4)for(_=p.return;_!==null;){var U=_.tag;if((U===3||U===4)&&(U=_.stateNode.containerInfo,U===g||U.nodeType===8&&U.parentNode===g))return;_=_.return}for(;L!==null;){if(_=Bi(L),_===null)return;if(U=_.tag,U===5||U===6){p=v=_;continue e}L=L.parentNode}}p=p.return}Re(function(){var ee=v,ue=lt(u),pe=[];e:{var ce=Lm.get(i);if(ce!==void 0){var ke=Tu,Pe=i;switch(i){case"keypress":if(Ya(u)===0)break e;case"keydown":case"keyup":ke=z6;break;case"focusin":Pe="focus",ke=Mu;break;case"focusout":Pe="blur",ke=Mu;break;case"beforeblur":case"afterblur":ke=Mu;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ke=hm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ke=S6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ke=$6;break;case Rm:case Nm:case Mm:ke=_6;break;case Im:ke=H6;break;case"scroll":ke=k6;break;case"wheel":ke=q6;break;case"copy":case"cut":case"paste":ke=T6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ke=pm}var Te=(s&4)!==0,Ot=!Te&&i==="scroll",X=Te?ce!==null?ce+"Capture":null:ce;Te=[];for(var $=ee,Q;$!==null;){Q=$;var ye=Q.stateNode;if(Q.tag===5&&ye!==null&&(Q=ye,X!==null&&(ye=rt($,X),ye!=null&&Te.push(Fs($,ye,Q)))),Ot)break;$=$.return}0<Te.length&&(ce=new ke(ce,Pe,null,u,ue),pe.push({event:ce,listeners:Te}))}}if((s&7)===0){e:{if(ce=i==="mouseover"||i==="pointerover",ke=i==="mouseout"||i==="pointerout",ce&&u!==Ce&&(Pe=u.relatedTarget||u.fromElement)&&(Bi(Pe)||Pe[Pr]))break e;if((ke||ce)&&(ce=ue.window===ue?ue:(ce=ue.ownerDocument)?ce.defaultView||ce.parentWindow:window,ke?(Pe=u.relatedTarget||u.toElement,ke=ee,Pe=Pe?Bi(Pe):null,Pe!==null&&(Ot=Yn(Pe),Pe!==Ot||Pe.tag!==5&&Pe.tag!==6)&&(Pe=null)):(ke=null,Pe=ee),ke!==Pe)){if(Te=hm,ye="onMouseLeave",X="onMouseEnter",$="mouse",(i==="pointerout"||i==="pointerover")&&(Te=pm,ye="onPointerLeave",X="onPointerEnter",$="pointer"),Ot=ke==null?ce:ho(ke),Q=Pe==null?ce:ho(Pe),ce=new Te(ye,$+"leave",ke,u,ue),ce.target=Ot,ce.relatedTarget=Q,ye=null,Bi(ue)===ee&&(Te=new Te(X,$+"enter",Pe,u,ue),Te.target=Q,Te.relatedTarget=Ot,ye=Te),Ot=ye,ke&&Pe)t:{for(Te=ke,X=Pe,$=0,Q=Te;Q;Q=xo(Q))$++;for(Q=0,ye=X;ye;ye=xo(ye))Q++;for(;0<$-Q;)Te=xo(Te),$--;for(;0<Q-$;)X=xo(X),Q--;for(;$--;){if(Te===X||X!==null&&Te===X.alternate)break t;Te=xo(Te),X=xo(X)}Te=null}else Te=null;ke!==null&&$m(pe,ce,ke,Te,!1),Pe!==null&&Ot!==null&&$m(pe,Ot,Pe,Te,!0)}}e:{if(ce=ee?ho(ee):window,ke=ce.nodeName&&ce.nodeName.toLowerCase(),ke==="select"||ke==="input"&&ce.type==="file")var Ne=e5;else if(Am(ce))if(wm)Ne=i5;else{Ne=n5;var Ve=t5}else(ke=ce.nodeName)&&ke.toLowerCase()==="input"&&(ce.type==="checkbox"||ce.type==="radio")&&(Ne=r5);if(Ne&&(Ne=Ne(i,ee))){Bm(pe,Ne,u,ue);break e}Ve&&Ve(i,ce,ee),i==="focusout"&&(Ve=ce._wrapperState)&&Ve.controlled&&ce.type==="number"&&He(ce,"number",ce.value)}switch(Ve=ee?ho(ee):window,i){case"focusin":(Am(Ve)||Ve.contentEditable==="true")&&(co=Ve,Uu=ee,ws=null);break;case"focusout":ws=Uu=co=null;break;case"mousedown":$u=!0;break;case"contextmenu":case"mouseup":case"dragend":$u=!1,jm(pe,u,ue);break;case"selectionchange":if(a5)break;case"keydown":case"keyup":jm(pe,u,ue)}var Ue;if(Lu)e:{switch(i){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else lo?ym(i,u)&&(Ge="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Ge="onCompositionStart");Ge&&(Em&&u.locale!=="ko"&&(lo||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&lo&&(Ue=dm()):(Xr=ue,ju="value"in Xr?Xr.value:Xr.textContent,lo=!0)),Ve=rl(ee,Ge),0<Ve.length&&(Ge=new mm(Ge,i,null,u,ue),pe.push({event:Ge,listeners:Ve}),Ue?Ge.data=Ue:(Ue=vm(u),Ue!==null&&(Ge.data=Ue)))),(Ue=X6?Y6(i,u):Q6(i,u))&&(ee=rl(ee,"onBeforeInput"),0<ee.length&&(ue=new mm("onBeforeInput","beforeinput",null,u,ue),pe.push({event:ue,listeners:ee}),ue.data=Ue))}Vm(pe,s)})}function Fs(i,s,u){return{instance:i,listener:s,currentTarget:u}}function rl(i,s){for(var u=s+"Capture",p=[];i!==null;){var g=i,v=g.stateNode;g.tag===5&&v!==null&&(g=v,v=rt(i,u),v!=null&&p.unshift(Fs(i,v,g)),v=rt(i,s),v!=null&&p.push(Fs(i,v,g))),i=i.return}return p}function xo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function $m(i,s,u,p,g){for(var v=s._reactName,_=[];u!==null&&u!==p;){var L=u,U=L.alternate,ee=L.stateNode;if(U!==null&&U===p)break;L.tag===5&&ee!==null&&(L=ee,g?(U=rt(u,v),U!=null&&_.unshift(Fs(u,U,L))):g||(U=rt(u,v),U!=null&&_.push(Fs(u,U,L)))),u=u.return}_.length!==0&&i.push({event:s,listeners:_})}var x5=/\r\n?/g,d5=/\u0000|\uFFFD/g;function Wm(i){return(typeof i=="string"?i:""+i).replace(x5,`
|
|
324
|
+
`).replace(d5,"")}function il(i,s,u){if(s=Wm(s),Wm(i)!==s&&u)throw Error(n(425))}function ol(){}var Xu=null,Yu=null;function Qu(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Ju=typeof setTimeout=="function"?setTimeout:void 0,f5=typeof clearTimeout=="function"?clearTimeout:void 0,Hm=typeof Promise=="function"?Promise:void 0,h5=typeof queueMicrotask=="function"?queueMicrotask:typeof Hm<"u"?function(i){return Hm.resolve(null).then(i).catch(m5)}:Ju;function m5(i){setTimeout(function(){throw i})}function Zu(i,s){var u=s,p=0;do{var g=u.nextSibling;if(i.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"){if(p===0){i.removeChild(g),Es(s);return}p--}else u!=="$"&&u!=="$?"&&u!=="$!"||p++;u=g}while(u);Es(s)}function Qr(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function Gm(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"){if(s===0)return i;s--}else u==="/$"&&s++}i=i.previousSibling}return null}var fo=Math.random().toString(36).slice(2),hr="__reactFiber$"+fo,Ss="__reactProps$"+fo,Pr="__reactContainer$"+fo,e0="__reactEvents$"+fo,p5="__reactListeners$"+fo,E5="__reactHandles$"+fo;function Bi(i){var s=i[hr];if(s)return s;for(var u=i.parentNode;u;){if(s=u[Pr]||u[hr]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(i=Gm(i);i!==null;){if(u=i[hr])return u;i=Gm(i)}return s}i=u,u=i.parentNode}return null}function bs(i){return i=i[hr]||i[Pr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function ho(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function sl(i){return i[Ss]||null}var t0=[],mo=-1;function Jr(i){return{current:i}}function St(i){0>mo||(i.current=t0[mo],t0[mo]=null,mo--)}function Dt(i,s){mo++,t0[mo]=i.current,i.current=s}var Zr={},sn=Jr(Zr),Cn=Jr(!1),wi=Zr;function po(i,s){var u=i.type.contextTypes;if(!u)return Zr;var p=i.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===s)return p.__reactInternalMemoizedMaskedChildContext;var g={},v;for(v in u)g[v]=s[v];return p&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=g),g}function yn(i){return i=i.childContextTypes,i!=null}function al(){St(Cn),St(sn)}function qm(i,s,u){if(sn.current!==Zr)throw Error(n(168));Dt(sn,s),Dt(Cn,u)}function Km(i,s,u){var p=i.stateNode;if(s=s.childContextTypes,typeof p.getChildContext!="function")return u;p=p.getChildContext();for(var g in p)if(!(g in s))throw Error(n(108,xe(i)||"Unknown",g));return j({},u,p)}function ll(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Zr,wi=sn.current,Dt(sn,i),Dt(Cn,Cn.current),!0}function Xm(i,s,u){var p=i.stateNode;if(!p)throw Error(n(169));u?(i=Km(i,s,wi),p.__reactInternalMemoizedMergedChildContext=i,St(Cn),St(sn),Dt(sn,i)):St(Cn),Dt(Cn,u)}var _r=null,cl=!1,n0=!1;function Ym(i){_r===null?_r=[i]:_r.push(i)}function g5(i){cl=!0,Ym(i)}function ei(){if(!n0&&_r!==null){n0=!0;var i=0,s=gt;try{var u=_r;for(gt=1;i<u.length;i++){var p=u[i];do p=p(!0);while(p!==null)}_r=null,cl=!1}catch(g){throw _r!==null&&(_r=_r.slice(i+1)),Ut(Nt,ei),g}finally{gt=s,n0=!1}}return null}var Eo=[],go=0,ul=null,xl=0,Ln=[],On=0,Di=null,jr=1,Tr="";function ki(i,s){Eo[go++]=xl,Eo[go++]=ul,ul=i,xl=s}function Qm(i,s,u){Ln[On++]=jr,Ln[On++]=Tr,Ln[On++]=Di,Di=i;var p=jr;i=Tr;var g=32-Qn(p)-1;p&=~(1<<g),u+=1;var v=32-Qn(s)+g;if(30<v){var _=g-g%5;v=(p&(1<<_)-1).toString(32),p>>=_,g-=_,jr=1<<32-Qn(s)+g|u<<g|p,Tr=v+i}else jr=1<<v|u<<g|p,Tr=i}function r0(i){i.return!==null&&(ki(i,1),Qm(i,1,0))}function i0(i){for(;i===ul;)ul=Eo[--go],Eo[go]=null,xl=Eo[--go],Eo[go]=null;for(;i===Di;)Di=Ln[--On],Ln[On]=null,Tr=Ln[--On],Ln[On]=null,jr=Ln[--On],Ln[On]=null}var Pn=null,_n=null,_t=!1,Zn=null;function Jm(i,s){var u=$n(5,null,null,0);u.elementType="DELETED",u.stateNode=s,u.return=i,s=i.deletions,s===null?(i.deletions=[u],i.flags|=16):s.push(u)}function Zm(i,s){switch(i.tag){case 5:var u=i.type;return s=s.nodeType!==1||u.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Pn=i,_n=Qr(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Pn=i,_n=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(u=Di!==null?{id:jr,overflow:Tr}:null,i.memoizedState={dehydrated:s,treeContext:u,retryLane:1073741824},u=$n(18,null,null,0),u.stateNode=s,u.return=i,i.child=u,Pn=i,_n=null,!0):!1;default:return!1}}function o0(i){return(i.mode&1)!==0&&(i.flags&128)===0}function s0(i){if(_t){var s=_n;if(s){var u=s;if(!Zm(i,s)){if(o0(i))throw Error(n(418));s=Qr(u.nextSibling);var p=Pn;s&&Zm(i,s)?Jm(p,u):(i.flags=i.flags&-4097|2,_t=!1,Pn=i)}}else{if(o0(i))throw Error(n(418));i.flags=i.flags&-4097|2,_t=!1,Pn=i}}}function ep(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Pn=i}function dl(i){if(i!==Pn)return!1;if(!_t)return ep(i),_t=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Qu(i.type,i.memoizedProps)),s&&(s=_n)){if(o0(i))throw tp(),Error(n(418));for(;s;)Jm(i,s),s=Qr(s.nextSibling)}if(ep(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"){if(s===0){_n=Qr(i.nextSibling);break e}s--}else u!=="$"&&u!=="$!"&&u!=="$?"||s++}i=i.nextSibling}_n=null}}else _n=Pn?Qr(i.stateNode.nextSibling):null;return!0}function tp(){for(var i=_n;i;)i=Qr(i.nextSibling)}function Co(){_n=Pn=null,_t=!1}function a0(i){Zn===null?Zn=[i]:Zn.push(i)}var C5=S.ReactCurrentBatchConfig;function Ps(i,s,u){if(i=u.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var p=u.stateNode}if(!p)throw Error(n(147,i));var g=p,v=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===v?s.ref:(s=function(_){var L=g.refs;_===null?delete L[v]:L[v]=_},s._stringRef=v,s)}if(typeof i!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,i))}return i}function fl(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function np(i){var s=i._init;return s(i._payload)}function rp(i){function s(X,$){if(i){var Q=X.deletions;Q===null?(X.deletions=[$],X.flags|=16):Q.push($)}}function u(X,$){if(!i)return null;for(;$!==null;)s(X,$),$=$.sibling;return null}function p(X,$){for(X=new Map;$!==null;)$.key!==null?X.set($.key,$):X.set($.index,$),$=$.sibling;return X}function g(X,$){return X=li(X,$),X.index=0,X.sibling=null,X}function v(X,$,Q){return X.index=Q,i?(Q=X.alternate,Q!==null?(Q=Q.index,Q<$?(X.flags|=2,$):Q):(X.flags|=2,$)):(X.flags|=1048576,$)}function _(X){return i&&X.alternate===null&&(X.flags|=2),X}function L(X,$,Q,ye){return $===null||$.tag!==6?($=J0(Q,X.mode,ye),$.return=X,$):($=g($,Q),$.return=X,$)}function U(X,$,Q,ye){var Ne=Q.type;return Ne===R?ue(X,$,Q.props.children,ye,Q.key):$!==null&&($.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===re&&np(Ne)===$.type)?(ye=g($,Q.props),ye.ref=Ps(X,$,Q),ye.return=X,ye):(ye=Il(Q.type,Q.key,Q.props,null,X.mode,ye),ye.ref=Ps(X,$,Q),ye.return=X,ye)}function ee(X,$,Q,ye){return $===null||$.tag!==4||$.stateNode.containerInfo!==Q.containerInfo||$.stateNode.implementation!==Q.implementation?($=Z0(Q,X.mode,ye),$.return=X,$):($=g($,Q.children||[]),$.return=X,$)}function ue(X,$,Q,ye,Ne){return $===null||$.tag!==7?($=Ri(Q,X.mode,ye,Ne),$.return=X,$):($=g($,Q),$.return=X,$)}function pe(X,$,Q){if(typeof $=="string"&&$!==""||typeof $=="number")return $=J0(""+$,X.mode,Q),$.return=X,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case k:return Q=Il($.type,$.key,$.props,null,X.mode,Q),Q.ref=Ps(X,null,$),Q.return=X,Q;case P:return $=Z0($,X.mode,Q),$.return=X,$;case re:var ye=$._init;return pe(X,ye($._payload),Q)}if(dt($)||ie($))return $=Ri($,X.mode,Q,null),$.return=X,$;fl(X,$)}return null}function ce(X,$,Q,ye){var Ne=$!==null?$.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Ne!==null?null:L(X,$,""+Q,ye);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case k:return Q.key===Ne?U(X,$,Q,ye):null;case P:return Q.key===Ne?ee(X,$,Q,ye):null;case re:return Ne=Q._init,ce(X,$,Ne(Q._payload),ye)}if(dt(Q)||ie(Q))return Ne!==null?null:ue(X,$,Q,ye,null);fl(X,Q)}return null}function ke(X,$,Q,ye,Ne){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return X=X.get(Q)||null,L($,X,""+ye,Ne);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case k:return X=X.get(ye.key===null?Q:ye.key)||null,U($,X,ye,Ne);case P:return X=X.get(ye.key===null?Q:ye.key)||null,ee($,X,ye,Ne);case re:var Ve=ye._init;return ke(X,$,Q,Ve(ye._payload),Ne)}if(dt(ye)||ie(ye))return X=X.get(Q)||null,ue($,X,ye,Ne,null);fl($,ye)}return null}function Pe(X,$,Q,ye){for(var Ne=null,Ve=null,Ue=$,Ge=$=0,Zt=null;Ue!==null&&Ge<Q.length;Ge++){Ue.index>Ge?(Zt=Ue,Ue=null):Zt=Ue.sibling;var mt=ce(X,Ue,Q[Ge],ye);if(mt===null){Ue===null&&(Ue=Zt);break}i&&Ue&&mt.alternate===null&&s(X,Ue),$=v(mt,$,Ge),Ve===null?Ne=mt:Ve.sibling=mt,Ve=mt,Ue=Zt}if(Ge===Q.length)return u(X,Ue),_t&&ki(X,Ge),Ne;if(Ue===null){for(;Ge<Q.length;Ge++)Ue=pe(X,Q[Ge],ye),Ue!==null&&($=v(Ue,$,Ge),Ve===null?Ne=Ue:Ve.sibling=Ue,Ve=Ue);return _t&&ki(X,Ge),Ne}for(Ue=p(X,Ue);Ge<Q.length;Ge++)Zt=ke(Ue,X,Ge,Q[Ge],ye),Zt!==null&&(i&&Zt.alternate!==null&&Ue.delete(Zt.key===null?Ge:Zt.key),$=v(Zt,$,Ge),Ve===null?Ne=Zt:Ve.sibling=Zt,Ve=Zt);return i&&Ue.forEach(function(ci){return s(X,ci)}),_t&&ki(X,Ge),Ne}function Te(X,$,Q,ye){var Ne=ie(Q);if(typeof Ne!="function")throw Error(n(150));if(Q=Ne.call(Q),Q==null)throw Error(n(151));for(var Ve=Ne=null,Ue=$,Ge=$=0,Zt=null,mt=Q.next();Ue!==null&&!mt.done;Ge++,mt=Q.next()){Ue.index>Ge?(Zt=Ue,Ue=null):Zt=Ue.sibling;var ci=ce(X,Ue,mt.value,ye);if(ci===null){Ue===null&&(Ue=Zt);break}i&&Ue&&ci.alternate===null&&s(X,Ue),$=v(ci,$,Ge),Ve===null?Ne=ci:Ve.sibling=ci,Ve=ci,Ue=Zt}if(mt.done)return u(X,Ue),_t&&ki(X,Ge),Ne;if(Ue===null){for(;!mt.done;Ge++,mt=Q.next())mt=pe(X,mt.value,ye),mt!==null&&($=v(mt,$,Ge),Ve===null?Ne=mt:Ve.sibling=mt,Ve=mt);return _t&&ki(X,Ge),Ne}for(Ue=p(X,Ue);!mt.done;Ge++,mt=Q.next())mt=ke(Ue,X,Ge,mt.value,ye),mt!==null&&(i&&mt.alternate!==null&&Ue.delete(mt.key===null?Ge:mt.key),$=v(mt,$,Ge),Ve===null?Ne=mt:Ve.sibling=mt,Ve=mt);return i&&Ue.forEach(function(J5){return s(X,J5)}),_t&&ki(X,Ge),Ne}function Ot(X,$,Q,ye){if(typeof Q=="object"&&Q!==null&&Q.type===R&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case k:e:{for(var Ne=Q.key,Ve=$;Ve!==null;){if(Ve.key===Ne){if(Ne=Q.type,Ne===R){if(Ve.tag===7){u(X,Ve.sibling),$=g(Ve,Q.props.children),$.return=X,X=$;break e}}else if(Ve.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===re&&np(Ne)===Ve.type){u(X,Ve.sibling),$=g(Ve,Q.props),$.ref=Ps(X,Ve,Q),$.return=X,X=$;break e}u(X,Ve);break}else s(X,Ve);Ve=Ve.sibling}Q.type===R?($=Ri(Q.props.children,X.mode,ye,Q.key),$.return=X,X=$):(ye=Il(Q.type,Q.key,Q.props,null,X.mode,ye),ye.ref=Ps(X,$,Q),ye.return=X,X=ye)}return _(X);case P:e:{for(Ve=Q.key;$!==null;){if($.key===Ve)if($.tag===4&&$.stateNode.containerInfo===Q.containerInfo&&$.stateNode.implementation===Q.implementation){u(X,$.sibling),$=g($,Q.children||[]),$.return=X,X=$;break e}else{u(X,$);break}else s(X,$);$=$.sibling}$=Z0(Q,X.mode,ye),$.return=X,X=$}return _(X);case re:return Ve=Q._init,Ot(X,$,Ve(Q._payload),ye)}if(dt(Q))return Pe(X,$,Q,ye);if(ie(Q))return Te(X,$,Q,ye);fl(X,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,$!==null&&$.tag===6?(u(X,$.sibling),$=g($,Q),$.return=X,X=$):(u(X,$),$=J0(Q,X.mode,ye),$.return=X,X=$),_(X)):u(X,$)}return Ot}var yo=rp(!0),ip=rp(!1),hl=Jr(null),ml=null,vo=null,l0=null;function c0(){l0=vo=ml=null}function u0(i){var s=hl.current;St(hl),i._currentValue=s}function x0(i,s,u){for(;i!==null;){var p=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),i===u)break;i=i.return}}function Ao(i,s){ml=i,l0=vo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(vn=!0),i.firstContext=null)}function zn(i){var s=i._currentValue;if(l0!==i)if(i={context:i,memoizedValue:s,next:null},vo===null){if(ml===null)throw Error(n(308));vo=i,ml.dependencies={lanes:0,firstContext:i}}else vo=vo.next=i;return s}var Fi=null;function d0(i){Fi===null?Fi=[i]:Fi.push(i)}function op(i,s,u,p){var g=s.interleaved;return g===null?(u.next=u,d0(s)):(u.next=g.next,g.next=u),s.interleaved=u,Rr(i,p)}function Rr(i,s){i.lanes|=s;var u=i.alternate;for(u!==null&&(u.lanes|=s),u=i,i=i.return;i!==null;)i.childLanes|=s,u=i.alternate,u!==null&&(u.childLanes|=s),u=i,i=i.return;return u.tag===3?u.stateNode:null}var ti=!1;function f0(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sp(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Nr(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function ni(i,s,u){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(ut&2)!==0){var g=p.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),p.pending=s,Rr(i,u)}return g=p.interleaved,g===null?(s.next=s,d0(p)):(s.next=g.next,g.next=s),p.interleaved=s,Rr(i,u)}function pl(i,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194240)!==0)){var p=s.lanes;p&=i.pendingLanes,u|=p,s.lanes=u,Fu(i,u)}}function ap(i,s){var u=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,u===p)){var g=null,v=null;if(u=u.firstBaseUpdate,u!==null){do{var _={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};v===null?g=v=_:v=v.next=_,u=u.next}while(u!==null);v===null?g=v=s:v=v.next=s}else g=v=s;u={baseState:p.baseState,firstBaseUpdate:g,lastBaseUpdate:v,shared:p.shared,effects:p.effects},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=s:i.next=s,u.lastBaseUpdate=s}function El(i,s,u,p){var g=i.updateQueue;ti=!1;var v=g.firstBaseUpdate,_=g.lastBaseUpdate,L=g.shared.pending;if(L!==null){g.shared.pending=null;var U=L,ee=U.next;U.next=null,_===null?v=ee:_.next=ee,_=U;var ue=i.alternate;ue!==null&&(ue=ue.updateQueue,L=ue.lastBaseUpdate,L!==_&&(L===null?ue.firstBaseUpdate=ee:L.next=ee,ue.lastBaseUpdate=U))}if(v!==null){var pe=g.baseState;_=0,ue=ee=U=null,L=v;do{var ce=L.lane,ke=L.eventTime;if((p&ce)===ce){ue!==null&&(ue=ue.next={eventTime:ke,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Pe=i,Te=L;switch(ce=s,ke=u,Te.tag){case 1:if(Pe=Te.payload,typeof Pe=="function"){pe=Pe.call(ke,pe,ce);break e}pe=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=Te.payload,ce=typeof Pe=="function"?Pe.call(ke,pe,ce):Pe,ce==null)break e;pe=j({},pe,ce);break e;case 2:ti=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,ce=g.effects,ce===null?g.effects=[L]:ce.push(L))}else ke={eventTime:ke,lane:ce,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ue===null?(ee=ue=ke,U=pe):ue=ue.next=ke,_|=ce;if(L=L.next,L===null){if(L=g.shared.pending,L===null)break;ce=L,L=ce.next,ce.next=null,g.lastBaseUpdate=ce,g.shared.pending=null}}while(!0);if(ue===null&&(U=pe),g.baseState=U,g.firstBaseUpdate=ee,g.lastBaseUpdate=ue,s=g.shared.interleaved,s!==null){g=s;do _|=g.lane,g=g.next;while(g!==s)}else v===null&&(g.shared.lanes=0);Pi|=_,i.lanes=_,i.memoizedState=pe}}function lp(i,s,u){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var p=i[s],g=p.callback;if(g!==null){if(p.callback=null,p=u,typeof g!="function")throw Error(n(191,g));g.call(p)}}}var _s={},mr=Jr(_s),js=Jr(_s),Ts=Jr(_s);function Si(i){if(i===_s)throw Error(n(174));return i}function h0(i,s){switch(Dt(Ts,s),Dt(js,i),Dt(mr,_s),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:le(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=le(s,i)}St(mr),Dt(mr,s)}function Bo(){St(mr),St(js),St(Ts)}function cp(i){Si(Ts.current);var s=Si(mr.current),u=le(s,i.type);s!==u&&(Dt(js,i),Dt(mr,u))}function m0(i){js.current===i&&(St(mr),St(js))}var jt=Jr(0);function gl(i){for(var s=i;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var p0=[];function E0(){for(var i=0;i<p0.length;i++)p0[i]._workInProgressVersionPrimary=null;p0.length=0}var Cl=S.ReactCurrentDispatcher,g0=S.ReactCurrentBatchConfig,bi=0,Tt=null,Kt=null,Qt=null,yl=!1,Rs=!1,Ns=0,y5=0;function an(){throw Error(n(321))}function C0(i,s){if(s===null)return!1;for(var u=0;u<s.length&&u<i.length;u++)if(!Jn(i[u],s[u]))return!1;return!0}function y0(i,s,u,p,g,v){if(bi=v,Tt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Cl.current=i===null||i.memoizedState===null?w5:D5,i=u(p,g),Rs){v=0;do{if(Rs=!1,Ns=0,25<=v)throw Error(n(301));v+=1,Qt=Kt=null,s.updateQueue=null,Cl.current=k5,i=u(p,g)}while(Rs)}if(Cl.current=Bl,s=Kt!==null&&Kt.next!==null,bi=0,Qt=Kt=Tt=null,yl=!1,s)throw Error(n(300));return i}function v0(){var i=Ns!==0;return Ns=0,i}function pr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?Tt.memoizedState=Qt=i:Qt=Qt.next=i,Qt}function Vn(){if(Kt===null){var i=Tt.alternate;i=i!==null?i.memoizedState:null}else i=Kt.next;var s=Qt===null?Tt.memoizedState:Qt.next;if(s!==null)Qt=s,Kt=i;else{if(i===null)throw Error(n(310));Kt=i,i={memoizedState:Kt.memoizedState,baseState:Kt.baseState,baseQueue:Kt.baseQueue,queue:Kt.queue,next:null},Qt===null?Tt.memoizedState=Qt=i:Qt=Qt.next=i}return Qt}function Ms(i,s){return typeof s=="function"?s(i):s}function A0(i){var s=Vn(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=i;var p=Kt,g=p.baseQueue,v=u.pending;if(v!==null){if(g!==null){var _=g.next;g.next=v.next,v.next=_}p.baseQueue=g=v,u.pending=null}if(g!==null){v=g.next,p=p.baseState;var L=_=null,U=null,ee=v;do{var ue=ee.lane;if((bi&ue)===ue)U!==null&&(U=U.next={lane:0,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),p=ee.hasEagerState?ee.eagerState:i(p,ee.action);else{var pe={lane:ue,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null};U===null?(L=U=pe,_=p):U=U.next=pe,Tt.lanes|=ue,Pi|=ue}ee=ee.next}while(ee!==null&&ee!==v);U===null?_=p:U.next=L,Jn(p,s.memoizedState)||(vn=!0),s.memoizedState=p,s.baseState=_,s.baseQueue=U,u.lastRenderedState=p}if(i=u.interleaved,i!==null){g=i;do v=g.lane,Tt.lanes|=v,Pi|=v,g=g.next;while(g!==i)}else g===null&&(u.lanes=0);return[s.memoizedState,u.dispatch]}function B0(i){var s=Vn(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=i;var p=u.dispatch,g=u.pending,v=s.memoizedState;if(g!==null){u.pending=null;var _=g=g.next;do v=i(v,_.action),_=_.next;while(_!==g);Jn(v,s.memoizedState)||(vn=!0),s.memoizedState=v,s.baseQueue===null&&(s.baseState=v),u.lastRenderedState=v}return[v,p]}function up(){}function xp(i,s){var u=Tt,p=Vn(),g=s(),v=!Jn(p.memoizedState,g);if(v&&(p.memoizedState=g,vn=!0),p=p.queue,w0(hp.bind(null,u,p,i),[i]),p.getSnapshot!==s||v||Qt!==null&&Qt.memoizedState.tag&1){if(u.flags|=2048,Is(9,fp.bind(null,u,p,g,s),void 0,null),Jt===null)throw Error(n(349));(bi&30)!==0||dp(u,s,g)}return g}function dp(i,s,u){i.flags|=16384,i={getSnapshot:s,value:u},s=Tt.updateQueue,s===null?(s={lastEffect:null,stores:null},Tt.updateQueue=s,s.stores=[i]):(u=s.stores,u===null?s.stores=[i]:u.push(i))}function fp(i,s,u,p){s.value=u,s.getSnapshot=p,mp(s)&&pp(i)}function hp(i,s,u){return u(function(){mp(s)&&pp(i)})}function mp(i){var s=i.getSnapshot;i=i.value;try{var u=s();return!Jn(i,u)}catch{return!0}}function pp(i){var s=Rr(i,1);s!==null&&rr(s,i,1,-1)}function Ep(i){var s=pr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ms,lastRenderedState:i},s.queue=i,i=i.dispatch=B5.bind(null,Tt,i),[s.memoizedState,i]}function Is(i,s,u,p){return i={tag:i,create:s,destroy:u,deps:p,next:null},s=Tt.updateQueue,s===null?(s={lastEffect:null,stores:null},Tt.updateQueue=s,s.lastEffect=i.next=i):(u=s.lastEffect,u===null?s.lastEffect=i.next=i:(p=u.next,u.next=i,i.next=p,s.lastEffect=i)),i}function gp(){return Vn().memoizedState}function vl(i,s,u,p){var g=pr();Tt.flags|=i,g.memoizedState=Is(1|s,u,void 0,p===void 0?null:p)}function Al(i,s,u,p){var g=Vn();p=p===void 0?null:p;var v=void 0;if(Kt!==null){var _=Kt.memoizedState;if(v=_.destroy,p!==null&&C0(p,_.deps)){g.memoizedState=Is(s,u,v,p);return}}Tt.flags|=i,g.memoizedState=Is(1|s,u,v,p)}function Cp(i,s){return vl(8390656,8,i,s)}function w0(i,s){return Al(2048,8,i,s)}function yp(i,s){return Al(4,2,i,s)}function vp(i,s){return Al(4,4,i,s)}function Ap(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Bp(i,s,u){return u=u!=null?u.concat([i]):null,Al(4,4,Ap.bind(null,s,i),u)}function D0(){}function wp(i,s){var u=Vn();s=s===void 0?null:s;var p=u.memoizedState;return p!==null&&s!==null&&C0(s,p[1])?p[0]:(u.memoizedState=[i,s],i)}function Dp(i,s){var u=Vn();s=s===void 0?null:s;var p=u.memoizedState;return p!==null&&s!==null&&C0(s,p[1])?p[0]:(i=i(),u.memoizedState=[i,s],i)}function kp(i,s,u){return(bi&21)===0?(i.baseState&&(i.baseState=!1,vn=!0),i.memoizedState=u):(Jn(u,s)||(u=nm(),Tt.lanes|=u,Pi|=u,i.baseState=!0),s)}function v5(i,s){var u=gt;gt=u!==0&&4>u?u:4,i(!0);var p=g0.transition;g0.transition={};try{i(!1),s()}finally{gt=u,g0.transition=p}}function Fp(){return Vn().memoizedState}function A5(i,s,u){var p=si(i);if(u={lane:p,action:u,hasEagerState:!1,eagerState:null,next:null},Sp(i))bp(s,u);else if(u=op(i,s,u,p),u!==null){var g=fn();rr(u,i,p,g),Pp(u,s,p)}}function B5(i,s,u){var p=si(i),g={lane:p,action:u,hasEagerState:!1,eagerState:null,next:null};if(Sp(i))bp(s,g);else{var v=i.alternate;if(i.lanes===0&&(v===null||v.lanes===0)&&(v=s.lastRenderedReducer,v!==null))try{var _=s.lastRenderedState,L=v(_,u);if(g.hasEagerState=!0,g.eagerState=L,Jn(L,_)){var U=s.interleaved;U===null?(g.next=g,d0(s)):(g.next=U.next,U.next=g),s.interleaved=g;return}}catch{}finally{}u=op(i,s,g,p),u!==null&&(g=fn(),rr(u,i,p,g),Pp(u,s,p))}}function Sp(i){var s=i.alternate;return i===Tt||s!==null&&s===Tt}function bp(i,s){Rs=yl=!0;var u=i.pending;u===null?s.next=s:(s.next=u.next,u.next=s),i.pending=s}function Pp(i,s,u){if((u&4194240)!==0){var p=s.lanes;p&=i.pendingLanes,u|=p,s.lanes=u,Fu(i,u)}}var Bl={readContext:zn,useCallback:an,useContext:an,useEffect:an,useImperativeHandle:an,useInsertionEffect:an,useLayoutEffect:an,useMemo:an,useReducer:an,useRef:an,useState:an,useDebugValue:an,useDeferredValue:an,useTransition:an,useMutableSource:an,useSyncExternalStore:an,useId:an,unstable_isNewReconciler:!1},w5={readContext:zn,useCallback:function(i,s){return pr().memoizedState=[i,s===void 0?null:s],i},useContext:zn,useEffect:Cp,useImperativeHandle:function(i,s,u){return u=u!=null?u.concat([i]):null,vl(4194308,4,Ap.bind(null,s,i),u)},useLayoutEffect:function(i,s){return vl(4194308,4,i,s)},useInsertionEffect:function(i,s){return vl(4,2,i,s)},useMemo:function(i,s){var u=pr();return s=s===void 0?null:s,i=i(),u.memoizedState=[i,s],i},useReducer:function(i,s,u){var p=pr();return s=u!==void 0?u(s):s,p.memoizedState=p.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},p.queue=i,i=i.dispatch=A5.bind(null,Tt,i),[p.memoizedState,i]},useRef:function(i){var s=pr();return i={current:i},s.memoizedState=i},useState:Ep,useDebugValue:D0,useDeferredValue:function(i){return pr().memoizedState=i},useTransition:function(){var i=Ep(!1),s=i[0];return i=v5.bind(null,i[1]),pr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,u){var p=Tt,g=pr();if(_t){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),Jt===null)throw Error(n(349));(bi&30)!==0||dp(p,s,u)}g.memoizedState=u;var v={value:u,getSnapshot:s};return g.queue=v,Cp(hp.bind(null,p,v,i),[i]),p.flags|=2048,Is(9,fp.bind(null,p,v,u,s),void 0,null),u},useId:function(){var i=pr(),s=Jt.identifierPrefix;if(_t){var u=Tr,p=jr;u=(p&~(1<<32-Qn(p)-1)).toString(32)+u,s=":"+s+"R"+u,u=Ns++,0<u&&(s+="H"+u.toString(32)),s+=":"}else u=y5++,s=":"+s+"r"+u.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},D5={readContext:zn,useCallback:wp,useContext:zn,useEffect:w0,useImperativeHandle:Bp,useInsertionEffect:yp,useLayoutEffect:vp,useMemo:Dp,useReducer:A0,useRef:gp,useState:function(){return A0(Ms)},useDebugValue:D0,useDeferredValue:function(i){var s=Vn();return kp(s,Kt.memoizedState,i)},useTransition:function(){var i=A0(Ms)[0],s=Vn().memoizedState;return[i,s]},useMutableSource:up,useSyncExternalStore:xp,useId:Fp,unstable_isNewReconciler:!1},k5={readContext:zn,useCallback:wp,useContext:zn,useEffect:w0,useImperativeHandle:Bp,useInsertionEffect:yp,useLayoutEffect:vp,useMemo:Dp,useReducer:B0,useRef:gp,useState:function(){return B0(Ms)},useDebugValue:D0,useDeferredValue:function(i){var s=Vn();return Kt===null?s.memoizedState=i:kp(s,Kt.memoizedState,i)},useTransition:function(){var i=B0(Ms)[0],s=Vn().memoizedState;return[i,s]},useMutableSource:up,useSyncExternalStore:xp,useId:Fp,unstable_isNewReconciler:!1};function er(i,s){if(i&&i.defaultProps){s=j({},s),i=i.defaultProps;for(var u in i)s[u]===void 0&&(s[u]=i[u]);return s}return s}function k0(i,s,u,p){s=i.memoizedState,u=u(p,s),u=u==null?s:j({},s,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var wl={isMounted:function(i){return(i=i._reactInternals)?Yn(i)===i:!1},enqueueSetState:function(i,s,u){i=i._reactInternals;var p=fn(),g=si(i),v=Nr(p,g);v.payload=s,u!=null&&(v.callback=u),s=ni(i,v,g),s!==null&&(rr(s,i,g,p),pl(s,i,g))},enqueueReplaceState:function(i,s,u){i=i._reactInternals;var p=fn(),g=si(i),v=Nr(p,g);v.tag=1,v.payload=s,u!=null&&(v.callback=u),s=ni(i,v,g),s!==null&&(rr(s,i,g,p),pl(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var u=fn(),p=si(i),g=Nr(u,p);g.tag=2,s!=null&&(g.callback=s),s=ni(i,g,p),s!==null&&(rr(s,i,p,u),pl(s,i,p))}};function _p(i,s,u,p,g,v,_){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,v,_):s.prototype&&s.prototype.isPureReactComponent?!Bs(u,p)||!Bs(g,v):!0}function jp(i,s,u){var p=!1,g=Zr,v=s.contextType;return typeof v=="object"&&v!==null?v=zn(v):(g=yn(s)?wi:sn.current,p=s.contextTypes,v=(p=p!=null)?po(i,g):Zr),s=new s(u,v),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=wl,i.stateNode=s,s._reactInternals=i,p&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=v),s}function Tp(i,s,u,p){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,p),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,p),s.state!==i&&wl.enqueueReplaceState(s,s.state,null)}function F0(i,s,u,p){var g=i.stateNode;g.props=u,g.state=i.memoizedState,g.refs={},f0(i);var v=s.contextType;typeof v=="object"&&v!==null?g.context=zn(v):(v=yn(s)?wi:sn.current,g.context=po(i,v)),g.state=i.memoizedState,v=s.getDerivedStateFromProps,typeof v=="function"&&(k0(i,s,v,u),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&wl.enqueueReplaceState(g,g.state,null),El(i,u,g,p),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function wo(i,s){try{var u="",p=s;do u+=Ee(p),p=p.return;while(p);var g=u}catch(v){g=`
|
|
325
|
+
Error generating stack: `+v.message+`
|
|
326
|
+
`+v.stack}return{value:i,source:s,stack:g,digest:null}}function S0(i,s,u){return{value:i,source:null,stack:u??null,digest:s??null}}function b0(i,s){try{console.error(s.value)}catch(u){setTimeout(function(){throw u})}}var F5=typeof WeakMap=="function"?WeakMap:Map;function Rp(i,s,u){u=Nr(-1,u),u.tag=3,u.payload={element:null};var p=s.value;return u.callback=function(){_l||(_l=!0,W0=p),b0(i,s)},u}function Np(i,s,u){u=Nr(-1,u),u.tag=3;var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var g=s.value;u.payload=function(){return p(g)},u.callback=function(){b0(i,s)}}var v=i.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(u.callback=function(){b0(i,s),typeof p!="function"&&(ii===null?ii=new Set([this]):ii.add(this));var _=s.stack;this.componentDidCatch(s.value,{componentStack:_!==null?_:""})}),u}function Mp(i,s,u){var p=i.pingCache;if(p===null){p=i.pingCache=new F5;var g=new Set;p.set(s,g)}else g=p.get(s),g===void 0&&(g=new Set,p.set(s,g));g.has(u)||(g.add(u),i=V5.bind(null,i,s,u),s.then(i,i))}function Ip(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function Lp(i,s,u,p,g){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(s=Nr(-1,1),s.tag=2,ni(u,s,1))),u.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var S5=S.ReactCurrentOwner,vn=!1;function dn(i,s,u,p){s.child=i===null?ip(s,null,u,p):yo(s,i.child,u,p)}function Op(i,s,u,p,g){u=u.render;var v=s.ref;return Ao(s,g),p=y0(i,s,u,p,v,g),u=v0(),i!==null&&!vn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Mr(i,s,g)):(_t&&u&&r0(s),s.flags|=1,dn(i,s,p,g),s.child)}function zp(i,s,u,p,g){if(i===null){var v=u.type;return typeof v=="function"&&!Q0(v)&&v.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(s.tag=15,s.type=v,Vp(i,s,v,p,g)):(i=Il(u.type,null,p,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(v=i.child,(i.lanes&g)===0){var _=v.memoizedProps;if(u=u.compare,u=u!==null?u:Bs,u(_,p)&&i.ref===s.ref)return Mr(i,s,g)}return s.flags|=1,i=li(v,p),i.ref=s.ref,i.return=s,s.child=i}function Vp(i,s,u,p,g){if(i!==null){var v=i.memoizedProps;if(Bs(v,p)&&i.ref===s.ref)if(vn=!1,s.pendingProps=p=v,(i.lanes&g)!==0)(i.flags&131072)!==0&&(vn=!0);else return s.lanes=i.lanes,Mr(i,s,g)}return P0(i,s,u,p,g)}function Up(i,s,u){var p=s.pendingProps,g=p.children,v=i!==null?i.memoizedState:null;if(p.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},Dt(ko,jn),jn|=u;else{if((u&1073741824)===0)return i=v!==null?v.baseLanes|u:u,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,Dt(ko,jn),jn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=v!==null?v.baseLanes:u,Dt(ko,jn),jn|=p}else v!==null?(p=v.baseLanes|u,s.memoizedState=null):p=u,Dt(ko,jn),jn|=p;return dn(i,s,g,u),s.child}function $p(i,s){var u=s.ref;(i===null&&u!==null||i!==null&&i.ref!==u)&&(s.flags|=512,s.flags|=2097152)}function P0(i,s,u,p,g){var v=yn(u)?wi:sn.current;return v=po(s,v),Ao(s,g),u=y0(i,s,u,p,v,g),p=v0(),i!==null&&!vn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Mr(i,s,g)):(_t&&p&&r0(s),s.flags|=1,dn(i,s,u,g),s.child)}function Wp(i,s,u,p,g){if(yn(u)){var v=!0;ll(s)}else v=!1;if(Ao(s,g),s.stateNode===null)kl(i,s),jp(s,u,p),F0(s,u,p,g),p=!0;else if(i===null){var _=s.stateNode,L=s.memoizedProps;_.props=L;var U=_.context,ee=u.contextType;typeof ee=="object"&&ee!==null?ee=zn(ee):(ee=yn(u)?wi:sn.current,ee=po(s,ee));var ue=u.getDerivedStateFromProps,pe=typeof ue=="function"||typeof _.getSnapshotBeforeUpdate=="function";pe||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(L!==p||U!==ee)&&Tp(s,_,p,ee),ti=!1;var ce=s.memoizedState;_.state=ce,El(s,p,_,g),U=s.memoizedState,L!==p||ce!==U||Cn.current||ti?(typeof ue=="function"&&(k0(s,u,ue,p),U=s.memoizedState),(L=ti||_p(s,u,L,p,ce,U,ee))?(pe||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=p,s.memoizedState=U),_.props=p,_.state=U,_.context=ee,p=L):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),p=!1)}else{_=s.stateNode,sp(i,s),L=s.memoizedProps,ee=s.type===s.elementType?L:er(s.type,L),_.props=ee,pe=s.pendingProps,ce=_.context,U=u.contextType,typeof U=="object"&&U!==null?U=zn(U):(U=yn(u)?wi:sn.current,U=po(s,U));var ke=u.getDerivedStateFromProps;(ue=typeof ke=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(L!==pe||ce!==U)&&Tp(s,_,p,U),ti=!1,ce=s.memoizedState,_.state=ce,El(s,p,_,g);var Pe=s.memoizedState;L!==pe||ce!==Pe||Cn.current||ti?(typeof ke=="function"&&(k0(s,u,ke,p),Pe=s.memoizedState),(ee=ti||_p(s,u,ee,p,ce,Pe,U)||!1)?(ue||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(p,Pe,U),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(p,Pe,U)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||L===i.memoizedProps&&ce===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ce===i.memoizedState||(s.flags|=1024),s.memoizedProps=p,s.memoizedState=Pe),_.props=p,_.state=Pe,_.context=U,p=ee):(typeof _.componentDidUpdate!="function"||L===i.memoizedProps&&ce===i.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ce===i.memoizedState||(s.flags|=1024),p=!1)}return _0(i,s,u,p,v,g)}function _0(i,s,u,p,g,v){$p(i,s);var _=(s.flags&128)!==0;if(!p&&!_)return g&&Xm(s,u,!1),Mr(i,s,v);p=s.stateNode,S5.current=s;var L=_&&typeof u.getDerivedStateFromError!="function"?null:p.render();return s.flags|=1,i!==null&&_?(s.child=yo(s,i.child,null,v),s.child=yo(s,null,L,v)):dn(i,s,L,v),s.memoizedState=p.state,g&&Xm(s,u,!0),s.child}function Hp(i){var s=i.stateNode;s.pendingContext?qm(i,s.pendingContext,s.pendingContext!==s.context):s.context&&qm(i,s.context,!1),h0(i,s.containerInfo)}function Gp(i,s,u,p,g){return Co(),a0(g),s.flags|=256,dn(i,s,u,p),s.child}var j0={dehydrated:null,treeContext:null,retryLane:0};function T0(i){return{baseLanes:i,cachePool:null,transitions:null}}function qp(i,s,u){var p=s.pendingProps,g=jt.current,v=!1,_=(s.flags&128)!==0,L;if((L=_)||(L=i!==null&&i.memoizedState===null?!1:(g&2)!==0),L?(v=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),Dt(jt,g&1),i===null)return s0(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(_=p.children,i=p.fallback,v?(p=s.mode,v=s.child,_={mode:"hidden",children:_},(p&1)===0&&v!==null?(v.childLanes=0,v.pendingProps=_):v=Ll(_,p,0,null),i=Ri(i,p,u,null),v.return=s,i.return=s,v.sibling=i,s.child=v,s.child.memoizedState=T0(u),s.memoizedState=j0,i):R0(s,_));if(g=i.memoizedState,g!==null&&(L=g.dehydrated,L!==null))return b5(i,s,_,p,L,g,u);if(v){v=p.fallback,_=s.mode,g=i.child,L=g.sibling;var U={mode:"hidden",children:p.children};return(_&1)===0&&s.child!==g?(p=s.child,p.childLanes=0,p.pendingProps=U,s.deletions=null):(p=li(g,U),p.subtreeFlags=g.subtreeFlags&14680064),L!==null?v=li(L,v):(v=Ri(v,_,u,null),v.flags|=2),v.return=s,p.return=s,p.sibling=v,s.child=p,p=v,v=s.child,_=i.child.memoizedState,_=_===null?T0(u):{baseLanes:_.baseLanes|u,cachePool:null,transitions:_.transitions},v.memoizedState=_,v.childLanes=i.childLanes&~u,s.memoizedState=j0,p}return v=i.child,i=v.sibling,p=li(v,{mode:"visible",children:p.children}),(s.mode&1)===0&&(p.lanes=u),p.return=s,p.sibling=null,i!==null&&(u=s.deletions,u===null?(s.deletions=[i],s.flags|=16):u.push(i)),s.child=p,s.memoizedState=null,p}function R0(i,s){return s=Ll({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Dl(i,s,u,p){return p!==null&&a0(p),yo(s,i.child,null,u),i=R0(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function b5(i,s,u,p,g,v,_){if(u)return s.flags&256?(s.flags&=-257,p=S0(Error(n(422))),Dl(i,s,_,p)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(v=p.fallback,g=s.mode,p=Ll({mode:"visible",children:p.children},g,0,null),v=Ri(v,g,_,null),v.flags|=2,p.return=s,v.return=s,p.sibling=v,s.child=p,(s.mode&1)!==0&&yo(s,i.child,null,_),s.child.memoizedState=T0(_),s.memoizedState=j0,v);if((s.mode&1)===0)return Dl(i,s,_,null);if(g.data==="$!"){if(p=g.nextSibling&&g.nextSibling.dataset,p)var L=p.dgst;return p=L,v=Error(n(419)),p=S0(v,p,void 0),Dl(i,s,_,p)}if(L=(_&i.childLanes)!==0,vn||L){if(p=Jt,p!==null){switch(_&-_){case 4:g=2;break;case 16:g=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(p.suspendedLanes|_))!==0?0:g,g!==0&&g!==v.retryLane&&(v.retryLane=g,Rr(i,g),rr(p,i,g,-1))}return Y0(),p=S0(Error(n(421))),Dl(i,s,_,p)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=U5.bind(null,i),g._reactRetry=s,null):(i=v.treeContext,_n=Qr(g.nextSibling),Pn=s,_t=!0,Zn=null,i!==null&&(Ln[On++]=jr,Ln[On++]=Tr,Ln[On++]=Di,jr=i.id,Tr=i.overflow,Di=s),s=R0(s,p.children),s.flags|=4096,s)}function Kp(i,s,u){i.lanes|=s;var p=i.alternate;p!==null&&(p.lanes|=s),x0(i.return,s,u)}function N0(i,s,u,p,g){var v=i.memoizedState;v===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:g}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=p,v.tail=u,v.tailMode=g)}function Xp(i,s,u){var p=s.pendingProps,g=p.revealOrder,v=p.tail;if(dn(i,s,p.children,u),p=jt.current,(p&2)!==0)p=p&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Kp(i,u,s);else if(i.tag===19)Kp(i,u,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}p&=1}if(Dt(jt,p),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(u=s.child,g=null;u!==null;)i=u.alternate,i!==null&&gl(i)===null&&(g=u),u=u.sibling;u=g,u===null?(g=s.child,s.child=null):(g=u.sibling,u.sibling=null),N0(s,!1,g,u,v);break;case"backwards":for(u=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&gl(i)===null){s.child=g;break}i=g.sibling,g.sibling=u,u=g,g=i}N0(s,!0,u,null,v);break;case"together":N0(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function kl(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Mr(i,s,u){if(i!==null&&(s.dependencies=i.dependencies),Pi|=s.lanes,(u&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,u=li(i,i.pendingProps),s.child=u,u.return=s;i.sibling!==null;)i=i.sibling,u=u.sibling=li(i,i.pendingProps),u.return=s;u.sibling=null}return s.child}function P5(i,s,u){switch(s.tag){case 3:Hp(s),Co();break;case 5:cp(s);break;case 1:yn(s.type)&&ll(s);break;case 4:h0(s,s.stateNode.containerInfo);break;case 10:var p=s.type._context,g=s.memoizedProps.value;Dt(hl,p._currentValue),p._currentValue=g;break;case 13:if(p=s.memoizedState,p!==null)return p.dehydrated!==null?(Dt(jt,jt.current&1),s.flags|=128,null):(u&s.child.childLanes)!==0?qp(i,s,u):(Dt(jt,jt.current&1),i=Mr(i,s,u),i!==null?i.sibling:null);Dt(jt,jt.current&1);break;case 19:if(p=(u&s.childLanes)!==0,(i.flags&128)!==0){if(p)return Xp(i,s,u);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),Dt(jt,jt.current),p)break;return null;case 22:case 23:return s.lanes=0,Up(i,s,u)}return Mr(i,s,u)}var Yp,M0,Qp,Jp;Yp=function(i,s){for(var u=s.child;u!==null;){if(u.tag===5||u.tag===6)i.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},M0=function(){},Qp=function(i,s,u,p){var g=i.memoizedProps;if(g!==p){i=s.stateNode,Si(mr.current);var v=null;switch(u){case"input":g=be(i,g),p=be(i,p),v=[];break;case"select":g=j({},g,{value:void 0}),p=j({},p,{value:void 0}),v=[];break;case"textarea":g=Ke(i,g),p=Ke(i,p),v=[];break;default:typeof g.onClick!="function"&&typeof p.onClick=="function"&&(i.onclick=ol)}Be(u,p);var _;u=null;for(ee in g)if(!p.hasOwnProperty(ee)&&g.hasOwnProperty(ee)&&g[ee]!=null)if(ee==="style"){var L=g[ee];for(_ in L)L.hasOwnProperty(_)&&(u||(u={}),u[_]="")}else ee!=="dangerouslySetInnerHTML"&&ee!=="children"&&ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&ee!=="autoFocus"&&(o.hasOwnProperty(ee)?v||(v=[]):(v=v||[]).push(ee,null));for(ee in p){var U=p[ee];if(L=g?.[ee],p.hasOwnProperty(ee)&&U!==L&&(U!=null||L!=null))if(ee==="style")if(L){for(_ in L)!L.hasOwnProperty(_)||U&&U.hasOwnProperty(_)||(u||(u={}),u[_]="");for(_ in U)U.hasOwnProperty(_)&&L[_]!==U[_]&&(u||(u={}),u[_]=U[_])}else u||(v||(v=[]),v.push(ee,u)),u=U;else ee==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,L=L?L.__html:void 0,U!=null&&L!==U&&(v=v||[]).push(ee,U)):ee==="children"?typeof U!="string"&&typeof U!="number"||(v=v||[]).push(ee,""+U):ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&(o.hasOwnProperty(ee)?(U!=null&&ee==="onScroll"&&Ft("scroll",i),v||L===U||(v=[])):(v=v||[]).push(ee,U))}u&&(v=v||[]).push("style",u);var ee=v;(s.updateQueue=ee)&&(s.flags|=4)}},Jp=function(i,s,u,p){u!==p&&(s.flags|=4)};function Ls(i,s){if(!_t)switch(i.tailMode){case"hidden":s=i.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function ln(i){var s=i.alternate!==null&&i.alternate.child===i.child,u=0,p=0;if(s)for(var g=i.child;g!==null;)u|=g.lanes|g.childLanes,p|=g.subtreeFlags&14680064,p|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)u|=g.lanes|g.childLanes,p|=g.subtreeFlags,p|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=p,i.childLanes=u,s}function _5(i,s,u){var p=s.pendingProps;switch(i0(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ln(s),null;case 1:return yn(s.type)&&al(),ln(s),null;case 3:return p=s.stateNode,Bo(),St(Cn),St(sn),E0(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(i===null||i.child===null)&&(dl(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Zn!==null&&(q0(Zn),Zn=null))),M0(i,s),ln(s),null;case 5:m0(s);var g=Si(Ts.current);if(u=s.type,i!==null&&s.stateNode!=null)Qp(i,s,u,p,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!p){if(s.stateNode===null)throw Error(n(166));return ln(s),null}if(i=Si(mr.current),dl(s)){p=s.stateNode,u=s.type;var v=s.memoizedProps;switch(p[hr]=s,p[Ss]=v,i=(s.mode&1)!==0,u){case"dialog":Ft("cancel",p),Ft("close",p);break;case"iframe":case"object":case"embed":Ft("load",p);break;case"video":case"audio":for(g=0;g<Ds.length;g++)Ft(Ds[g],p);break;case"source":Ft("error",p);break;case"img":case"image":case"link":Ft("error",p),Ft("load",p);break;case"details":Ft("toggle",p);break;case"input":Ye(p,v),Ft("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!v.multiple},Ft("invalid",p);break;case"textarea":Vt(p,v),Ft("invalid",p)}Be(u,v),g=null;for(var _ in v)if(v.hasOwnProperty(_)){var L=v[_];_==="children"?typeof L=="string"?p.textContent!==L&&(v.suppressHydrationWarning!==!0&&il(p.textContent,L,i),g=["children",L]):typeof L=="number"&&p.textContent!==""+L&&(v.suppressHydrationWarning!==!0&&il(p.textContent,L,i),g=["children",""+L]):o.hasOwnProperty(_)&&L!=null&&_==="onScroll"&&Ft("scroll",p)}switch(u){case"input":Ie(p),yt(p,v,!0);break;case"textarea":Ie(p),st(p);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(p.onclick=ol)}p=g,s.updateQueue=p,p!==null&&(s.flags|=4)}else{_=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=Y(u)),i==="http://www.w3.org/1999/xhtml"?u==="script"?(i=_.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof p.is=="string"?i=_.createElement(u,{is:p.is}):(i=_.createElement(u),u==="select"&&(_=i,p.multiple?_.multiple=!0:p.size&&(_.size=p.size))):i=_.createElementNS(i,u),i[hr]=s,i[Ss]=p,Yp(i,s,!1,!1),s.stateNode=i;e:{switch(_=Le(u,p),u){case"dialog":Ft("cancel",i),Ft("close",i),g=p;break;case"iframe":case"object":case"embed":Ft("load",i),g=p;break;case"video":case"audio":for(g=0;g<Ds.length;g++)Ft(Ds[g],i);g=p;break;case"source":Ft("error",i),g=p;break;case"img":case"image":case"link":Ft("error",i),Ft("load",i),g=p;break;case"details":Ft("toggle",i),g=p;break;case"input":Ye(i,p),g=be(i,p),Ft("invalid",i);break;case"option":g=p;break;case"select":i._wrapperState={wasMultiple:!!p.multiple},g=j({},p,{value:void 0}),Ft("invalid",i);break;case"textarea":Vt(i,p),g=Ke(i,p),Ft("invalid",i);break;default:g=p}Be(u,g),L=g;for(v in L)if(L.hasOwnProperty(v)){var U=L[v];v==="style"?ve(i,U):v==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&De(i,U)):v==="children"?typeof U=="string"?(u!=="textarea"||U!=="")&&qe(i,U):typeof U=="number"&&qe(i,""+U):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(o.hasOwnProperty(v)?U!=null&&v==="onScroll"&&Ft("scroll",i):U!=null&&D(i,v,U,_))}switch(u){case"input":Ie(i),yt(i,p,!1);break;case"textarea":Ie(i),st(i);break;case"option":p.value!=null&&i.setAttribute("value",""+we(p.value));break;case"select":i.multiple=!!p.multiple,v=p.value,v!=null?ct(i,!!p.multiple,v,!1):p.defaultValue!=null&&ct(i,!!p.multiple,p.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=ol)}switch(u){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return ln(s),null;case 6:if(i&&s.stateNode!=null)Jp(i,s,i.memoizedProps,p);else{if(typeof p!="string"&&s.stateNode===null)throw Error(n(166));if(u=Si(Ts.current),Si(mr.current),dl(s)){if(p=s.stateNode,u=s.memoizedProps,p[hr]=s,(v=p.nodeValue!==u)&&(i=Pn,i!==null))switch(i.tag){case 3:il(p.nodeValue,u,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&il(p.nodeValue,u,(i.mode&1)!==0)}v&&(s.flags|=4)}else p=(u.nodeType===9?u:u.ownerDocument).createTextNode(p),p[hr]=s,s.stateNode=p}return ln(s),null;case 13:if(St(jt),p=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(_t&&_n!==null&&(s.mode&1)!==0&&(s.flags&128)===0)tp(),Co(),s.flags|=98560,v=!1;else if(v=dl(s),p!==null&&p.dehydrated!==null){if(i===null){if(!v)throw Error(n(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(n(317));v[hr]=s}else Co(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;ln(s),v=!1}else Zn!==null&&(q0(Zn),Zn=null),v=!0;if(!v)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=u,s):(p=p!==null,p!==(i!==null&&i.memoizedState!==null)&&p&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(jt.current&1)!==0?Xt===0&&(Xt=3):Y0())),s.updateQueue!==null&&(s.flags|=4),ln(s),null);case 4:return Bo(),M0(i,s),i===null&&ks(s.stateNode.containerInfo),ln(s),null;case 10:return u0(s.type._context),ln(s),null;case 17:return yn(s.type)&&al(),ln(s),null;case 19:if(St(jt),v=s.memoizedState,v===null)return ln(s),null;if(p=(s.flags&128)!==0,_=v.rendering,_===null)if(p)Ls(v,!1);else{if(Xt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(_=gl(i),_!==null){for(s.flags|=128,Ls(v,!1),p=_.updateQueue,p!==null&&(s.updateQueue=p,s.flags|=4),s.subtreeFlags=0,p=u,u=s.child;u!==null;)v=u,i=p,v.flags&=14680066,_=v.alternate,_===null?(v.childLanes=0,v.lanes=i,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=_.childLanes,v.lanes=_.lanes,v.child=_.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=_.memoizedProps,v.memoizedState=_.memoizedState,v.updateQueue=_.updateQueue,v.type=_.type,i=_.dependencies,v.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),u=u.sibling;return Dt(jt,jt.current&1|2),s.child}i=i.sibling}v.tail!==null&&at()>Fo&&(s.flags|=128,p=!0,Ls(v,!1),s.lanes=4194304)}else{if(!p)if(i=gl(_),i!==null){if(s.flags|=128,p=!0,u=i.updateQueue,u!==null&&(s.updateQueue=u,s.flags|=4),Ls(v,!0),v.tail===null&&v.tailMode==="hidden"&&!_.alternate&&!_t)return ln(s),null}else 2*at()-v.renderingStartTime>Fo&&u!==1073741824&&(s.flags|=128,p=!0,Ls(v,!1),s.lanes=4194304);v.isBackwards?(_.sibling=s.child,s.child=_):(u=v.last,u!==null?u.sibling=_:s.child=_,v.last=_)}return v.tail!==null?(s=v.tail,v.rendering=s,v.tail=s.sibling,v.renderingStartTime=at(),s.sibling=null,u=jt.current,Dt(jt,p?u&1|2:u&1),s):(ln(s),null);case 22:case 23:return X0(),p=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==p&&(s.flags|=8192),p&&(s.mode&1)!==0?(jn&1073741824)!==0&&(ln(s),s.subtreeFlags&6&&(s.flags|=8192)):ln(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function j5(i,s){switch(i0(s),s.tag){case 1:return yn(s.type)&&al(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Bo(),St(Cn),St(sn),E0(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return m0(s),null;case 13:if(St(jt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Co()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return St(jt),null;case 4:return Bo(),null;case 10:return u0(s.type._context),null;case 22:case 23:return X0(),null;case 24:return null;default:return null}}var Fl=!1,cn=!1,T5=typeof WeakSet=="function"?WeakSet:Set,Se=null;function Do(i,s){var u=i.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(p){Mt(i,s,p)}else u.current=null}function I0(i,s,u){try{u()}catch(p){Mt(i,s,p)}}var Zp=!1;function R5(i,s){if(Xu=qa,i=_m(),Vu(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var p=u.getSelection&&u.getSelection();if(p&&p.rangeCount!==0){u=p.anchorNode;var g=p.anchorOffset,v=p.focusNode;p=p.focusOffset;try{u.nodeType,v.nodeType}catch{u=null;break e}var _=0,L=-1,U=-1,ee=0,ue=0,pe=i,ce=null;t:for(;;){for(var ke;pe!==u||g!==0&&pe.nodeType!==3||(L=_+g),pe!==v||p!==0&&pe.nodeType!==3||(U=_+p),pe.nodeType===3&&(_+=pe.nodeValue.length),(ke=pe.firstChild)!==null;)ce=pe,pe=ke;for(;;){if(pe===i)break t;if(ce===u&&++ee===g&&(L=_),ce===v&&++ue===p&&(U=_),(ke=pe.nextSibling)!==null)break;pe=ce,ce=pe.parentNode}pe=ke}u=L===-1||U===-1?null:{start:L,end:U}}else u=null}u=u||{start:0,end:0}}else u=null;for(Yu={focusedElem:i,selectionRange:u},qa=!1,Se=s;Se!==null;)if(s=Se,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Se=i;else for(;Se!==null;){s=Se;try{var Pe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Pe!==null){var Te=Pe.memoizedProps,Ot=Pe.memoizedState,X=s.stateNode,$=X.getSnapshotBeforeUpdate(s.elementType===s.type?Te:er(s.type,Te),Ot);X.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var Q=s.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ye){Mt(s,s.return,ye)}if(i=s.sibling,i!==null){i.return=s.return,Se=i;break}Se=s.return}return Pe=Zp,Zp=!1,Pe}function Os(i,s,u){var p=s.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var g=p=p.next;do{if((g.tag&i)===i){var v=g.destroy;g.destroy=void 0,v!==void 0&&I0(s,u,v)}g=g.next}while(g!==p)}}function Sl(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var u=s=s.next;do{if((u.tag&i)===i){var p=u.create;u.destroy=p()}u=u.next}while(u!==s)}}function L0(i){var s=i.ref;if(s!==null){var u=i.stateNode;switch(i.tag){case 5:i=u;break;default:i=u}typeof s=="function"?s(i):s.current=i}}function e9(i){var s=i.alternate;s!==null&&(i.alternate=null,e9(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[hr],delete s[Ss],delete s[e0],delete s[p5],delete s[E5])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function t9(i){return i.tag===5||i.tag===3||i.tag===4}function n9(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||t9(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function O0(i,s,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?u.nodeType===8?u.parentNode.insertBefore(i,s):u.insertBefore(i,s):(u.nodeType===8?(s=u.parentNode,s.insertBefore(i,u)):(s=u,s.appendChild(i)),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=ol));else if(p!==4&&(i=i.child,i!==null))for(O0(i,s,u),i=i.sibling;i!==null;)O0(i,s,u),i=i.sibling}function z0(i,s,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,s?u.insertBefore(i,s):u.appendChild(i);else if(p!==4&&(i=i.child,i!==null))for(z0(i,s,u),i=i.sibling;i!==null;)z0(i,s,u),i=i.sibling}var tn=null,tr=!1;function ri(i,s,u){for(u=u.child;u!==null;)r9(i,s,u),u=u.sibling}function r9(i,s,u){if(fr&&typeof fr.onCommitFiberUnmount=="function")try{fr.onCommitFiberUnmount(Va,u)}catch{}switch(u.tag){case 5:cn||Do(u,s);case 6:var p=tn,g=tr;tn=null,ri(i,s,u),tn=p,tr=g,tn!==null&&(tr?(i=tn,u=u.stateNode,i.nodeType===8?i.parentNode.removeChild(u):i.removeChild(u)):tn.removeChild(u.stateNode));break;case 18:tn!==null&&(tr?(i=tn,u=u.stateNode,i.nodeType===8?Zu(i.parentNode,u):i.nodeType===1&&Zu(i,u),Es(i)):Zu(tn,u.stateNode));break;case 4:p=tn,g=tr,tn=u.stateNode.containerInfo,tr=!0,ri(i,s,u),tn=p,tr=g;break;case 0:case 11:case 14:case 15:if(!cn&&(p=u.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){g=p=p.next;do{var v=g,_=v.destroy;v=v.tag,_!==void 0&&((v&2)!==0||(v&4)!==0)&&I0(u,s,_),g=g.next}while(g!==p)}ri(i,s,u);break;case 1:if(!cn&&(Do(u,s),p=u.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=u.memoizedProps,p.state=u.memoizedState,p.componentWillUnmount()}catch(L){Mt(u,s,L)}ri(i,s,u);break;case 21:ri(i,s,u);break;case 22:u.mode&1?(cn=(p=cn)||u.memoizedState!==null,ri(i,s,u),cn=p):ri(i,s,u);break;default:ri(i,s,u)}}function i9(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var u=i.stateNode;u===null&&(u=i.stateNode=new T5),s.forEach(function(p){var g=$5.bind(null,i,p);u.has(p)||(u.add(p),p.then(g,g))})}}function nr(i,s){var u=s.deletions;if(u!==null)for(var p=0;p<u.length;p++){var g=u[p];try{var v=i,_=s,L=_;e:for(;L!==null;){switch(L.tag){case 5:tn=L.stateNode,tr=!1;break e;case 3:tn=L.stateNode.containerInfo,tr=!0;break e;case 4:tn=L.stateNode.containerInfo,tr=!0;break e}L=L.return}if(tn===null)throw Error(n(160));r9(v,_,g),tn=null,tr=!1;var U=g.alternate;U!==null&&(U.return=null),g.return=null}catch(ee){Mt(g,s,ee)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)o9(s,i),s=s.sibling}function o9(i,s){var u=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(nr(s,i),Er(i),p&4){try{Os(3,i,i.return),Sl(3,i)}catch(Te){Mt(i,i.return,Te)}try{Os(5,i,i.return)}catch(Te){Mt(i,i.return,Te)}}break;case 1:nr(s,i),Er(i),p&512&&u!==null&&Do(u,u.return);break;case 5:if(nr(s,i),Er(i),p&512&&u!==null&&Do(u,u.return),i.flags&32){var g=i.stateNode;try{qe(g,"")}catch(Te){Mt(i,i.return,Te)}}if(p&4&&(g=i.stateNode,g!=null)){var v=i.memoizedProps,_=u!==null?u.memoizedProps:v,L=i.type,U=i.updateQueue;if(i.updateQueue=null,U!==null)try{L==="input"&&v.type==="radio"&&v.name!=null&&Je(g,v),Le(L,_);var ee=Le(L,v);for(_=0;_<U.length;_+=2){var ue=U[_],pe=U[_+1];ue==="style"?ve(g,pe):ue==="dangerouslySetInnerHTML"?De(g,pe):ue==="children"?qe(g,pe):D(g,ue,pe,ee)}switch(L){case"input":Qe(g,v);break;case"textarea":tt(g,v);break;case"select":var ce=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!v.multiple;var ke=v.value;ke!=null?ct(g,!!v.multiple,ke,!1):ce!==!!v.multiple&&(v.defaultValue!=null?ct(g,!!v.multiple,v.defaultValue,!0):ct(g,!!v.multiple,v.multiple?[]:"",!1))}g[Ss]=v}catch(Te){Mt(i,i.return,Te)}}break;case 6:if(nr(s,i),Er(i),p&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,v=i.memoizedProps;try{g.nodeValue=v}catch(Te){Mt(i,i.return,Te)}}break;case 3:if(nr(s,i),Er(i),p&4&&u!==null&&u.memoizedState.isDehydrated)try{Es(s.containerInfo)}catch(Te){Mt(i,i.return,Te)}break;case 4:nr(s,i),Er(i);break;case 13:nr(s,i),Er(i),g=i.child,g.flags&8192&&(v=g.memoizedState!==null,g.stateNode.isHidden=v,!v||g.alternate!==null&&g.alternate.memoizedState!==null||($0=at())),p&4&&i9(i);break;case 22:if(ue=u!==null&&u.memoizedState!==null,i.mode&1?(cn=(ee=cn)||ue,nr(s,i),cn=ee):nr(s,i),Er(i),p&8192){if(ee=i.memoizedState!==null,(i.stateNode.isHidden=ee)&&!ue&&(i.mode&1)!==0)for(Se=i,ue=i.child;ue!==null;){for(pe=Se=ue;Se!==null;){switch(ce=Se,ke=ce.child,ce.tag){case 0:case 11:case 14:case 15:Os(4,ce,ce.return);break;case 1:Do(ce,ce.return);var Pe=ce.stateNode;if(typeof Pe.componentWillUnmount=="function"){p=ce,u=ce.return;try{s=p,Pe.props=s.memoizedProps,Pe.state=s.memoizedState,Pe.componentWillUnmount()}catch(Te){Mt(p,u,Te)}}break;case 5:Do(ce,ce.return);break;case 22:if(ce.memoizedState!==null){l9(pe);continue}}ke!==null?(ke.return=ce,Se=ke):l9(pe)}ue=ue.sibling}e:for(ue=null,pe=i;;){if(pe.tag===5){if(ue===null){ue=pe;try{g=pe.stateNode,ee?(v=g.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(L=pe.stateNode,U=pe.memoizedProps.style,_=U!=null&&U.hasOwnProperty("display")?U.display:null,L.style.display=q("display",_))}catch(Te){Mt(i,i.return,Te)}}}else if(pe.tag===6){if(ue===null)try{pe.stateNode.nodeValue=ee?"":pe.memoizedProps}catch(Te){Mt(i,i.return,Te)}}else if((pe.tag!==22&&pe.tag!==23||pe.memoizedState===null||pe===i)&&pe.child!==null){pe.child.return=pe,pe=pe.child;continue}if(pe===i)break e;for(;pe.sibling===null;){if(pe.return===null||pe.return===i)break e;ue===pe&&(ue=null),pe=pe.return}ue===pe&&(ue=null),pe.sibling.return=pe.return,pe=pe.sibling}}break;case 19:nr(s,i),Er(i),p&4&&i9(i);break;case 21:break;default:nr(s,i),Er(i)}}function Er(i){var s=i.flags;if(s&2){try{e:{for(var u=i.return;u!==null;){if(t9(u)){var p=u;break e}u=u.return}throw Error(n(160))}switch(p.tag){case 5:var g=p.stateNode;p.flags&32&&(qe(g,""),p.flags&=-33);var v=n9(i);z0(i,v,g);break;case 3:case 4:var _=p.stateNode.containerInfo,L=n9(i);O0(i,L,_);break;default:throw Error(n(161))}}catch(U){Mt(i,i.return,U)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function N5(i,s,u){Se=i,s9(i)}function s9(i,s,u){for(var p=(i.mode&1)!==0;Se!==null;){var g=Se,v=g.child;if(g.tag===22&&p){var _=g.memoizedState!==null||Fl;if(!_){var L=g.alternate,U=L!==null&&L.memoizedState!==null||cn;L=Fl;var ee=cn;if(Fl=_,(cn=U)&&!ee)for(Se=g;Se!==null;)_=Se,U=_.child,_.tag===22&&_.memoizedState!==null?c9(g):U!==null?(U.return=_,Se=U):c9(g);for(;v!==null;)Se=v,s9(v),v=v.sibling;Se=g,Fl=L,cn=ee}a9(i)}else(g.subtreeFlags&8772)!==0&&v!==null?(v.return=g,Se=v):a9(i)}}function a9(i){for(;Se!==null;){var s=Se;if((s.flags&8772)!==0){var u=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:cn||Sl(5,s);break;case 1:var p=s.stateNode;if(s.flags&4&&!cn)if(u===null)p.componentDidMount();else{var g=s.elementType===s.type?u.memoizedProps:er(s.type,u.memoizedProps);p.componentDidUpdate(g,u.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var v=s.updateQueue;v!==null&&lp(s,v,p);break;case 3:var _=s.updateQueue;if(_!==null){if(u=null,s.child!==null)switch(s.child.tag){case 5:u=s.child.stateNode;break;case 1:u=s.child.stateNode}lp(s,_,u)}break;case 5:var L=s.stateNode;if(u===null&&s.flags&4){u=L;var U=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&u.focus();break;case"img":U.src&&(u.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var ee=s.alternate;if(ee!==null){var ue=ee.memoizedState;if(ue!==null){var pe=ue.dehydrated;pe!==null&&Es(pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}cn||s.flags&512&&L0(s)}catch(ce){Mt(s,s.return,ce)}}if(s===i){Se=null;break}if(u=s.sibling,u!==null){u.return=s.return,Se=u;break}Se=s.return}}function l9(i){for(;Se!==null;){var s=Se;if(s===i){Se=null;break}var u=s.sibling;if(u!==null){u.return=s.return,Se=u;break}Se=s.return}}function c9(i){for(;Se!==null;){var s=Se;try{switch(s.tag){case 0:case 11:case 15:var u=s.return;try{Sl(4,s)}catch(U){Mt(s,u,U)}break;case 1:var p=s.stateNode;if(typeof p.componentDidMount=="function"){var g=s.return;try{p.componentDidMount()}catch(U){Mt(s,g,U)}}var v=s.return;try{L0(s)}catch(U){Mt(s,v,U)}break;case 5:var _=s.return;try{L0(s)}catch(U){Mt(s,_,U)}}}catch(U){Mt(s,s.return,U)}if(s===i){Se=null;break}var L=s.sibling;if(L!==null){L.return=s.return,Se=L;break}Se=s.return}}var M5=Math.ceil,bl=S.ReactCurrentDispatcher,V0=S.ReactCurrentOwner,Un=S.ReactCurrentBatchConfig,ut=0,Jt=null,Wt=null,nn=0,jn=0,ko=Jr(0),Xt=0,zs=null,Pi=0,Pl=0,U0=0,Vs=null,An=null,$0=0,Fo=1/0,Ir=null,_l=!1,W0=null,ii=null,jl=!1,oi=null,Tl=0,Us=0,H0=null,Rl=-1,Nl=0;function fn(){return(ut&6)!==0?at():Rl!==-1?Rl:Rl=at()}function si(i){return(i.mode&1)===0?1:(ut&2)!==0&&nn!==0?nn&-nn:C5.transition!==null?(Nl===0&&(Nl=nm()),Nl):(i=gt,i!==0||(i=window.event,i=i===void 0?16:xm(i.type)),i)}function rr(i,s,u,p){if(50<Us)throw Us=0,H0=null,Error(n(185));ds(i,u,p),((ut&2)===0||i!==Jt)&&(i===Jt&&((ut&2)===0&&(Pl|=u),Xt===4&&ai(i,nn)),Bn(i,p),u===1&&ut===0&&(s.mode&1)===0&&(Fo=at()+500,cl&&ei()))}function Bn(i,s){var u=i.callbackNode;C6(i,s);var p=Wa(i,i===Jt?nn:0);if(p===0)u!==null&&$t(u),i.callbackNode=null,i.callbackPriority=0;else if(s=p&-p,i.callbackPriority!==s){if(u!=null&&$t(u),s===1)i.tag===0?g5(x9.bind(null,i)):Ym(x9.bind(null,i)),h5(function(){(ut&6)===0&&ei()}),u=null;else{switch(rm(p)){case 1:u=Nt;break;case 4:u=br;break;case 16:u=za;break;case 536870912:u=tm;break;default:u=za}u=C9(u,u9.bind(null,i))}i.callbackPriority=s,i.callbackNode=u}}function u9(i,s){if(Rl=-1,Nl=0,(ut&6)!==0)throw Error(n(327));var u=i.callbackNode;if(So()&&i.callbackNode!==u)return null;var p=Wa(i,i===Jt?nn:0);if(p===0)return null;if((p&30)!==0||(p&i.expiredLanes)!==0||s)s=Ml(i,p);else{s=p;var g=ut;ut|=2;var v=f9();(Jt!==i||nn!==s)&&(Ir=null,Fo=at()+500,ji(i,s));do try{O5();break}catch(L){d9(i,L)}while(!0);c0(),bl.current=v,ut=g,Wt!==null?s=0:(Jt=null,nn=0,s=Xt)}if(s!==0){if(s===2&&(g=Du(i),g!==0&&(p=g,s=G0(i,g))),s===1)throw u=zs,ji(i,0),ai(i,p),Bn(i,at()),u;if(s===6)ai(i,p);else{if(g=i.current.alternate,(p&30)===0&&!I5(g)&&(s=Ml(i,p),s===2&&(v=Du(i),v!==0&&(p=v,s=G0(i,v))),s===1))throw u=zs,ji(i,0),ai(i,p),Bn(i,at()),u;switch(i.finishedWork=g,i.finishedLanes=p,s){case 0:case 1:throw Error(n(345));case 2:Ti(i,An,Ir);break;case 3:if(ai(i,p),(p&130023424)===p&&(s=$0+500-at(),10<s)){if(Wa(i,0)!==0)break;if(g=i.suspendedLanes,(g&p)!==p){fn(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=Ju(Ti.bind(null,i,An,Ir),s);break}Ti(i,An,Ir);break;case 4:if(ai(i,p),(p&4194240)===p)break;for(s=i.eventTimes,g=-1;0<p;){var _=31-Qn(p);v=1<<_,_=s[_],_>g&&(g=_),p&=~v}if(p=g,p=at()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*M5(p/1960))-p,10<p){i.timeoutHandle=Ju(Ti.bind(null,i,An,Ir),p);break}Ti(i,An,Ir);break;case 5:Ti(i,An,Ir);break;default:throw Error(n(329))}}}return Bn(i,at()),i.callbackNode===u?u9.bind(null,i):null}function G0(i,s){var u=Vs;return i.current.memoizedState.isDehydrated&&(ji(i,s).flags|=256),i=Ml(i,s),i!==2&&(s=An,An=u,s!==null&&q0(s)),i}function q0(i){An===null?An=i:An.push.apply(An,i)}function I5(i){for(var s=i;;){if(s.flags&16384){var u=s.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var p=0;p<u.length;p++){var g=u[p],v=g.getSnapshot;g=g.value;try{if(!Jn(v(),g))return!1}catch{return!1}}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ai(i,s){for(s&=~U0,s&=~Pl,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var u=31-Qn(s),p=1<<u;i[u]=-1,s&=~p}}function x9(i){if((ut&6)!==0)throw Error(n(327));So();var s=Wa(i,0);if((s&1)===0)return Bn(i,at()),null;var u=Ml(i,s);if(i.tag!==0&&u===2){var p=Du(i);p!==0&&(s=p,u=G0(i,p))}if(u===1)throw u=zs,ji(i,0),ai(i,s),Bn(i,at()),u;if(u===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Ti(i,An,Ir),Bn(i,at()),null}function K0(i,s){var u=ut;ut|=1;try{return i(s)}finally{ut=u,ut===0&&(Fo=at()+500,cl&&ei())}}function _i(i){oi!==null&&oi.tag===0&&(ut&6)===0&&So();var s=ut;ut|=1;var u=Un.transition,p=gt;try{if(Un.transition=null,gt=1,i)return i()}finally{gt=p,Un.transition=u,ut=s,(ut&6)===0&&ei()}}function X0(){jn=ko.current,St(ko)}function ji(i,s){i.finishedWork=null,i.finishedLanes=0;var u=i.timeoutHandle;if(u!==-1&&(i.timeoutHandle=-1,f5(u)),Wt!==null)for(u=Wt.return;u!==null;){var p=u;switch(i0(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&al();break;case 3:Bo(),St(Cn),St(sn),E0();break;case 5:m0(p);break;case 4:Bo();break;case 13:St(jt);break;case 19:St(jt);break;case 10:u0(p.type._context);break;case 22:case 23:X0()}u=u.return}if(Jt=i,Wt=i=li(i.current,null),nn=jn=s,Xt=0,zs=null,U0=Pl=Pi=0,An=Vs=null,Fi!==null){for(s=0;s<Fi.length;s++)if(u=Fi[s],p=u.interleaved,p!==null){u.interleaved=null;var g=p.next,v=u.pending;if(v!==null){var _=v.next;v.next=g,p.next=_}u.pending=p}Fi=null}return i}function d9(i,s){do{var u=Wt;try{if(c0(),Cl.current=Bl,yl){for(var p=Tt.memoizedState;p!==null;){var g=p.queue;g!==null&&(g.pending=null),p=p.next}yl=!1}if(bi=0,Qt=Kt=Tt=null,Rs=!1,Ns=0,V0.current=null,u===null||u.return===null){Xt=1,zs=s,Wt=null;break}e:{var v=i,_=u.return,L=u,U=s;if(s=nn,L.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var ee=U,ue=L,pe=ue.tag;if((ue.mode&1)===0&&(pe===0||pe===11||pe===15)){var ce=ue.alternate;ce?(ue.updateQueue=ce.updateQueue,ue.memoizedState=ce.memoizedState,ue.lanes=ce.lanes):(ue.updateQueue=null,ue.memoizedState=null)}var ke=Ip(_);if(ke!==null){ke.flags&=-257,Lp(ke,_,L,v,s),ke.mode&1&&Mp(v,ee,s),s=ke,U=ee;var Pe=s.updateQueue;if(Pe===null){var Te=new Set;Te.add(U),s.updateQueue=Te}else Pe.add(U);break e}else{if((s&1)===0){Mp(v,ee,s),Y0();break e}U=Error(n(426))}}else if(_t&&L.mode&1){var Ot=Ip(_);if(Ot!==null){(Ot.flags&65536)===0&&(Ot.flags|=256),Lp(Ot,_,L,v,s),a0(wo(U,L));break e}}v=U=wo(U,L),Xt!==4&&(Xt=2),Vs===null?Vs=[v]:Vs.push(v),v=_;do{switch(v.tag){case 3:v.flags|=65536,s&=-s,v.lanes|=s;var X=Rp(v,U,s);ap(v,X);break e;case 1:L=U;var $=v.type,Q=v.stateNode;if((v.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(ii===null||!ii.has(Q)))){v.flags|=65536,s&=-s,v.lanes|=s;var ye=Np(v,L,s);ap(v,ye);break e}}v=v.return}while(v!==null)}m9(u)}catch(Ne){s=Ne,Wt===u&&u!==null&&(Wt=u=u.return);continue}break}while(!0)}function f9(){var i=bl.current;return bl.current=Bl,i===null?Bl:i}function Y0(){(Xt===0||Xt===3||Xt===2)&&(Xt=4),Jt===null||(Pi&268435455)===0&&(Pl&268435455)===0||ai(Jt,nn)}function Ml(i,s){var u=ut;ut|=2;var p=f9();(Jt!==i||nn!==s)&&(Ir=null,ji(i,s));do try{L5();break}catch(g){d9(i,g)}while(!0);if(c0(),ut=u,bl.current=p,Wt!==null)throw Error(n(261));return Jt=null,nn=0,Xt}function L5(){for(;Wt!==null;)h9(Wt)}function O5(){for(;Wt!==null&&!Mn();)h9(Wt)}function h9(i){var s=g9(i.alternate,i,jn);i.memoizedProps=i.pendingProps,s===null?m9(i):Wt=s,V0.current=null}function m9(i){var s=i;do{var u=s.alternate;if(i=s.return,(s.flags&32768)===0){if(u=_5(u,s,jn),u!==null){Wt=u;return}}else{if(u=j5(u,s),u!==null){u.flags&=32767,Wt=u;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Xt=6,Wt=null;return}}if(s=s.sibling,s!==null){Wt=s;return}Wt=s=i}while(s!==null);Xt===0&&(Xt=5)}function Ti(i,s,u){var p=gt,g=Un.transition;try{Un.transition=null,gt=1,z5(i,s,u,p)}finally{Un.transition=g,gt=p}return null}function z5(i,s,u,p){do So();while(oi!==null);if((ut&6)!==0)throw Error(n(327));u=i.finishedWork;var g=i.finishedLanes;if(u===null)return null;if(i.finishedWork=null,i.finishedLanes=0,u===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var v=u.lanes|u.childLanes;if(y6(i,v),i===Jt&&(Wt=Jt=null,nn=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||jl||(jl=!0,C9(za,function(){return So(),null})),v=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||v){v=Un.transition,Un.transition=null;var _=gt;gt=1;var L=ut;ut|=4,V0.current=null,R5(i,u),o9(u,i),s5(Yu),qa=!!Xu,Yu=Xu=null,i.current=u,N5(u),dr(),ut=L,gt=_,Un.transition=v}else i.current=u;if(jl&&(jl=!1,oi=i,Tl=g),v=i.pendingLanes,v===0&&(ii=null),h6(u.stateNode),Bn(i,at()),s!==null)for(p=i.onRecoverableError,u=0;u<s.length;u++)g=s[u],p(g.value,{componentStack:g.stack,digest:g.digest});if(_l)throw _l=!1,i=W0,W0=null,i;return(Tl&1)!==0&&i.tag!==0&&So(),v=i.pendingLanes,(v&1)!==0?i===H0?Us++:(Us=0,H0=i):Us=0,ei(),null}function So(){if(oi!==null){var i=rm(Tl),s=Un.transition,u=gt;try{if(Un.transition=null,gt=16>i?16:i,oi===null)var p=!1;else{if(i=oi,oi=null,Tl=0,(ut&6)!==0)throw Error(n(331));var g=ut;for(ut|=4,Se=i.current;Se!==null;){var v=Se,_=v.child;if((Se.flags&16)!==0){var L=v.deletions;if(L!==null){for(var U=0;U<L.length;U++){var ee=L[U];for(Se=ee;Se!==null;){var ue=Se;switch(ue.tag){case 0:case 11:case 15:Os(8,ue,v)}var pe=ue.child;if(pe!==null)pe.return=ue,Se=pe;else for(;Se!==null;){ue=Se;var ce=ue.sibling,ke=ue.return;if(e9(ue),ue===ee){Se=null;break}if(ce!==null){ce.return=ke,Se=ce;break}Se=ke}}}var Pe=v.alternate;if(Pe!==null){var Te=Pe.child;if(Te!==null){Pe.child=null;do{var Ot=Te.sibling;Te.sibling=null,Te=Ot}while(Te!==null)}}Se=v}}if((v.subtreeFlags&2064)!==0&&_!==null)_.return=v,Se=_;else e:for(;Se!==null;){if(v=Se,(v.flags&2048)!==0)switch(v.tag){case 0:case 11:case 15:Os(9,v,v.return)}var X=v.sibling;if(X!==null){X.return=v.return,Se=X;break e}Se=v.return}}var $=i.current;for(Se=$;Se!==null;){_=Se;var Q=_.child;if((_.subtreeFlags&2064)!==0&&Q!==null)Q.return=_,Se=Q;else e:for(_=$;Se!==null;){if(L=Se,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:Sl(9,L)}}catch(Ne){Mt(L,L.return,Ne)}if(L===_){Se=null;break e}var ye=L.sibling;if(ye!==null){ye.return=L.return,Se=ye;break e}Se=L.return}}if(ut=g,ei(),fr&&typeof fr.onPostCommitFiberRoot=="function")try{fr.onPostCommitFiberRoot(Va,i)}catch{}p=!0}return p}finally{gt=u,Un.transition=s}}return!1}function p9(i,s,u){s=wo(u,s),s=Rp(i,s,1),i=ni(i,s,1),s=fn(),i!==null&&(ds(i,1,s),Bn(i,s))}function Mt(i,s,u){if(i.tag===3)p9(i,i,u);else for(;s!==null;){if(s.tag===3){p9(s,i,u);break}else if(s.tag===1){var p=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(ii===null||!ii.has(p))){i=wo(u,i),i=Np(s,i,1),s=ni(s,i,1),i=fn(),s!==null&&(ds(s,1,i),Bn(s,i));break}}s=s.return}}function V5(i,s,u){var p=i.pingCache;p!==null&&p.delete(s),s=fn(),i.pingedLanes|=i.suspendedLanes&u,Jt===i&&(nn&u)===u&&(Xt===4||Xt===3&&(nn&130023424)===nn&&500>at()-$0?ji(i,0):U0|=u),Bn(i,s)}function E9(i,s){s===0&&((i.mode&1)===0?s=1:(s=$a,$a<<=1,($a&130023424)===0&&($a=4194304)));var u=fn();i=Rr(i,s),i!==null&&(ds(i,s,u),Bn(i,u))}function U5(i){var s=i.memoizedState,u=0;s!==null&&(u=s.retryLane),E9(i,u)}function $5(i,s){var u=0;switch(i.tag){case 13:var p=i.stateNode,g=i.memoizedState;g!==null&&(u=g.retryLane);break;case 19:p=i.stateNode;break;default:throw Error(n(314))}p!==null&&p.delete(s),E9(i,u)}var g9;g9=function(i,s,u){if(i!==null)if(i.memoizedProps!==s.pendingProps||Cn.current)vn=!0;else{if((i.lanes&u)===0&&(s.flags&128)===0)return vn=!1,P5(i,s,u);vn=(i.flags&131072)!==0}else vn=!1,_t&&(s.flags&1048576)!==0&&Qm(s,xl,s.index);switch(s.lanes=0,s.tag){case 2:var p=s.type;kl(i,s),i=s.pendingProps;var g=po(s,sn.current);Ao(s,u),g=y0(null,s,p,i,g,u);var v=v0();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,yn(p)?(v=!0,ll(s)):v=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,f0(s),g.updater=wl,s.stateNode=g,g._reactInternals=s,F0(s,p,i,u),s=_0(null,s,p,!0,v,u)):(s.tag=0,_t&&v&&r0(s),dn(null,s,g,u),s=s.child),s;case 16:p=s.elementType;e:{switch(kl(i,s),i=s.pendingProps,g=p._init,p=g(p._payload),s.type=p,g=s.tag=H5(p),i=er(p,i),g){case 0:s=P0(null,s,p,i,u);break e;case 1:s=Wp(null,s,p,i,u);break e;case 11:s=Op(null,s,p,i,u);break e;case 14:s=zp(null,s,p,er(p.type,i),u);break e}throw Error(n(306,p,""))}return s;case 0:return p=s.type,g=s.pendingProps,g=s.elementType===p?g:er(p,g),P0(i,s,p,g,u);case 1:return p=s.type,g=s.pendingProps,g=s.elementType===p?g:er(p,g),Wp(i,s,p,g,u);case 3:e:{if(Hp(s),i===null)throw Error(n(387));p=s.pendingProps,v=s.memoizedState,g=v.element,sp(i,s),El(s,p,null,u);var _=s.memoizedState;if(p=_.element,v.isDehydrated)if(v={element:p,isDehydrated:!1,cache:_.cache,pendingSuspenseBoundaries:_.pendingSuspenseBoundaries,transitions:_.transitions},s.updateQueue.baseState=v,s.memoizedState=v,s.flags&256){g=wo(Error(n(423)),s),s=Gp(i,s,p,u,g);break e}else if(p!==g){g=wo(Error(n(424)),s),s=Gp(i,s,p,u,g);break e}else for(_n=Qr(s.stateNode.containerInfo.firstChild),Pn=s,_t=!0,Zn=null,u=ip(s,null,p,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Co(),p===g){s=Mr(i,s,u);break e}dn(i,s,p,u)}s=s.child}return s;case 5:return cp(s),i===null&&s0(s),p=s.type,g=s.pendingProps,v=i!==null?i.memoizedProps:null,_=g.children,Qu(p,g)?_=null:v!==null&&Qu(p,v)&&(s.flags|=32),$p(i,s),dn(i,s,_,u),s.child;case 6:return i===null&&s0(s),null;case 13:return qp(i,s,u);case 4:return h0(s,s.stateNode.containerInfo),p=s.pendingProps,i===null?s.child=yo(s,null,p,u):dn(i,s,p,u),s.child;case 11:return p=s.type,g=s.pendingProps,g=s.elementType===p?g:er(p,g),Op(i,s,p,g,u);case 7:return dn(i,s,s.pendingProps,u),s.child;case 8:return dn(i,s,s.pendingProps.children,u),s.child;case 12:return dn(i,s,s.pendingProps.children,u),s.child;case 10:e:{if(p=s.type._context,g=s.pendingProps,v=s.memoizedProps,_=g.value,Dt(hl,p._currentValue),p._currentValue=_,v!==null)if(Jn(v.value,_)){if(v.children===g.children&&!Cn.current){s=Mr(i,s,u);break e}}else for(v=s.child,v!==null&&(v.return=s);v!==null;){var L=v.dependencies;if(L!==null){_=v.child;for(var U=L.firstContext;U!==null;){if(U.context===p){if(v.tag===1){U=Nr(-1,u&-u),U.tag=2;var ee=v.updateQueue;if(ee!==null){ee=ee.shared;var ue=ee.pending;ue===null?U.next=U:(U.next=ue.next,ue.next=U),ee.pending=U}}v.lanes|=u,U=v.alternate,U!==null&&(U.lanes|=u),x0(v.return,u,s),L.lanes|=u;break}U=U.next}}else if(v.tag===10)_=v.type===s.type?null:v.child;else if(v.tag===18){if(_=v.return,_===null)throw Error(n(341));_.lanes|=u,L=_.alternate,L!==null&&(L.lanes|=u),x0(_,u,s),_=v.sibling}else _=v.child;if(_!==null)_.return=v;else for(_=v;_!==null;){if(_===s){_=null;break}if(v=_.sibling,v!==null){v.return=_.return,_=v;break}_=_.return}v=_}dn(i,s,g.children,u),s=s.child}return s;case 9:return g=s.type,p=s.pendingProps.children,Ao(s,u),g=zn(g),p=p(g),s.flags|=1,dn(i,s,p,u),s.child;case 14:return p=s.type,g=er(p,s.pendingProps),g=er(p.type,g),zp(i,s,p,g,u);case 15:return Vp(i,s,s.type,s.pendingProps,u);case 17:return p=s.type,g=s.pendingProps,g=s.elementType===p?g:er(p,g),kl(i,s),s.tag=1,yn(p)?(i=!0,ll(s)):i=!1,Ao(s,u),jp(s,p,g),F0(s,p,g,u),_0(null,s,p,!0,i,u);case 19:return Xp(i,s,u);case 22:return Up(i,s,u)}throw Error(n(156,s.tag))};function C9(i,s){return Ut(i,s)}function W5(i,s,u,p){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $n(i,s,u,p){return new W5(i,s,u,p)}function Q0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function H5(i){if(typeof i=="function")return Q0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===z)return 11;if(i===W)return 14}return 2}function li(i,s){var u=i.alternate;return u===null?(u=$n(i.tag,s,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=s,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&14680064,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,s=i.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u}function Il(i,s,u,p,g,v){var _=2;if(p=i,typeof i=="function")Q0(i)&&(_=1);else if(typeof i=="string")_=5;else e:switch(i){case R:return Ri(u.children,g,v,s);case M:_=8,g|=8;break;case O:return i=$n(12,u,s,g|2),i.elementType=O,i.lanes=v,i;case J:return i=$n(13,u,s,g),i.elementType=J,i.lanes=v,i;case H:return i=$n(19,u,s,g),i.elementType=H,i.lanes=v,i;case Z:return Ll(u,g,v,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:_=10;break e;case V:_=9;break e;case z:_=11;break e;case W:_=14;break e;case re:_=16,p=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=$n(_,u,s,g),s.elementType=i,s.type=p,s.lanes=v,s}function Ri(i,s,u,p){return i=$n(7,i,p,s),i.lanes=u,i}function Ll(i,s,u,p){return i=$n(22,i,p,s),i.elementType=Z,i.lanes=u,i.stateNode={isHidden:!1},i}function J0(i,s,u){return i=$n(6,i,null,s),i.lanes=u,i}function Z0(i,s,u){return s=$n(4,i.children!==null?i.children:[],i.key,s),s.lanes=u,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function G5(i,s,u,p,g){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ku(0),this.expirationTimes=ku(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ku(0),this.identifierPrefix=p,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function ex(i,s,u,p,g,v,_,L,U){return i=new G5(i,s,u,L,U),s===1?(s=1,v===!0&&(s|=8)):s=0,v=$n(3,null,null,s),i.current=v,v.stateNode=i,v.memoizedState={element:p,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},f0(v),i}function q5(i,s,u){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:P,key:p==null?null:""+p,children:i,containerInfo:s,implementation:u}}function y9(i){if(!i)return Zr;i=i._reactInternals;e:{if(Yn(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(yn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var u=i.type;if(yn(u))return Km(i,u,s)}return s}function v9(i,s,u,p,g,v,_,L,U){return i=ex(u,p,!0,i,g,v,_,L,U),i.context=y9(null),u=i.current,p=fn(),g=si(u),v=Nr(p,g),v.callback=s??null,ni(u,v,g),i.current.lanes=g,ds(i,g,p),Bn(i,p),i}function Ol(i,s,u,p){var g=s.current,v=fn(),_=si(g);return u=y9(u),s.context===null?s.context=u:s.pendingContext=u,s=Nr(v,_),s.payload={element:i},p=p===void 0?null:p,p!==null&&(s.callback=p),i=ni(g,s,_),i!==null&&(rr(i,g,_,v),pl(i,g,_)),_}function zl(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function A9(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<s?u:s}}function tx(i,s){A9(i,s),(i=i.alternate)&&A9(i,s)}function K5(){return null}var B9=typeof reportError=="function"?reportError:function(i){console.error(i)};function nx(i){this._internalRoot=i}Vl.prototype.render=nx.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Ol(i,s,null,null)},Vl.prototype.unmount=nx.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;_i(function(){Ol(null,i,null,null)}),s[Pr]=null}};function Vl(i){this._internalRoot=i}Vl.prototype.unstable_scheduleHydration=function(i){if(i){var s=sm();i={blockedOn:null,target:i,priority:s};for(var u=0;u<Kr.length&&s!==0&&s<Kr[u].priority;u++);Kr.splice(u,0,i),u===0&&cm(i)}};function rx(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Ul(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function w9(){}function X5(i,s,u,p,g){if(g){if(typeof p=="function"){var v=p;p=function(){var ee=zl(_);v.call(ee)}}var _=v9(s,p,i,0,null,!1,!1,"",w9);return i._reactRootContainer=_,i[Pr]=_.current,ks(i.nodeType===8?i.parentNode:i),_i(),_}for(;g=i.lastChild;)i.removeChild(g);if(typeof p=="function"){var L=p;p=function(){var ee=zl(U);L.call(ee)}}var U=ex(i,0,!1,null,null,!1,!1,"",w9);return i._reactRootContainer=U,i[Pr]=U.current,ks(i.nodeType===8?i.parentNode:i),_i(function(){Ol(s,U,u,p)}),U}function $l(i,s,u,p,g){var v=u._reactRootContainer;if(v){var _=v;if(typeof g=="function"){var L=g;g=function(){var U=zl(_);L.call(U)}}Ol(s,_,i,g)}else _=X5(u,s,i,g,p);return zl(_)}im=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var u=xs(s.pendingLanes);u!==0&&(Fu(s,u|1),Bn(s,at()),(ut&6)===0&&(Fo=at()+500,ei()))}break;case 13:_i(function(){var p=Rr(i,1);if(p!==null){var g=fn();rr(p,i,1,g)}}),tx(i,1)}},Su=function(i){if(i.tag===13){var s=Rr(i,134217728);if(s!==null){var u=fn();rr(s,i,134217728,u)}tx(i,134217728)}},om=function(i){if(i.tag===13){var s=si(i),u=Rr(i,s);if(u!==null){var p=fn();rr(u,i,s,p)}tx(i,s)}},sm=function(){return gt},am=function(i,s){var u=gt;try{return gt=i,s()}finally{gt=u}},bt=function(i,s,u){switch(s){case"input":if(Qe(i,u),s=u.name,u.type==="radio"&&s!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<u.length;s++){var p=u[s];if(p!==i&&p.form===i.form){var g=sl(p);if(!g)throw Error(n(90));oe(p),Qe(p,g)}}}break;case"textarea":tt(i,u);break;case"select":s=u.value,s!=null&&ct(i,!!u.multiple,s,!1)}},me=K0,ze=_i;var Y5={usingClientEntryPoint:!1,Events:[bs,ho,sl,kt,te,K0]},$s={findFiberByHostInstance:Bi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Q5={bundleType:$s.bundleType,version:$s.version,rendererPackageName:$s.rendererPackageName,rendererConfig:$s.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Ae(i),i===null?null:i.stateNode},findFiberByHostInstance:$s.findFiberByHostInstance||K5,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wl.isDisabled&&Wl.supportsFiber)try{Va=Wl.inject(Q5),fr=Wl}catch{}}return wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y5,wn.createPortal=function(i,s){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rx(s))throw Error(n(200));return q5(i,s,null,u)},wn.createRoot=function(i,s){if(!rx(i))throw Error(n(299));var u=!1,p="",g=B9;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=ex(i,1,!1,null,null,u,!1,p,g),i[Pr]=s.current,ks(i.nodeType===8?i.parentNode:i),new nx(s)},wn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=Ae(s),i=i===null?null:i.stateNode,i},wn.flushSync=function(i){return _i(i)},wn.hydrate=function(i,s,u){if(!Ul(s))throw Error(n(200));return $l(null,i,s,!0,u)},wn.hydrateRoot=function(i,s,u){if(!rx(i))throw Error(n(405));var p=u!=null&&u.hydratedSources||null,g=!1,v="",_=B9;if(u!=null&&(u.unstable_strictMode===!0&&(g=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onRecoverableError!==void 0&&(_=u.onRecoverableError)),s=v9(s,null,i,1,u??null,g,!1,v,_),i[Pr]=s.current,ks(i),p)for(i=0;i<p.length;i++)u=p[i],g=u._getVersion,g=g(u._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[u,g]:s.mutableSourceEagerHydrationData.push(u,g);return new Vl(s)},wn.render=function(i,s,u){if(!Ul(s))throw Error(n(200));return $l(null,i,s,!1,u)},wn.unmountComponentAtNode=function(i){if(!Ul(i))throw Error(n(40));return i._reactRootContainer?(_i(function(){$l(null,null,i,!1,function(){i._reactRootContainer=null,i[Pr]=null})}),!0):!1},wn.unstable_batchedUpdates=K0,wn.unstable_renderSubtreeIntoContainer=function(i,s,u,p){if(!Ul(u))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return $l(i,s,u,!1,p)},wn.version="18.3.1-next-f1338f8080-20240426",wn}var V9;function v1(){if(V9)return ax.exports;V9=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ax.exports=hB(),ax.exports}var A1=v1(),mB=Object.defineProperty,ur=(e,t)=>mB(e,"name",{value:t,configurable:!0});function bf(e){const t=A.forwardRef((n,r)=>{let{children:o,...a}=n,l=null,c=!1;const x=[];hd(o)&&typeof Gl=="function"&&(o=Gl(o._payload)),A.Children.forEach(o,E=>{if(k1(E)){c=!0;const C=E;let y="child"in C.props?C.props.child:C.props.children;hd(y)&&typeof Gl=="function"&&(y=Gl(y._payload)),l=EB(C,y),x.push(l?.props?.children)}else x.push(E)}),l?l=A.cloneElement(l,void 0,x):!c&&A.Children.count(o)===1&&A.isValidElement(o)&&(l=o);const f=l?D1(l):void 0,m=ns(r,f);if(!l){if(o||o===0)throw new Error(c?yB(e):CB(e));return o}const h=w1(a,l.props??{});return l.type!==A.Fragment&&(h.ref=r?m:f),A.cloneElement(l,h)});return t.displayName=`${e}.Slot`,t}ur(bf,"createSlot");var B1=Symbol.for("radix.slottable");function pB(e){const t=ur(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=B1,t}ur(pB,"createSlottable");var EB=ur((e,t)=>{if("child"in e.props){const n=e.props.child;return A.isValidElement(n)?A.cloneElement(n,void 0,e.props.children(n.props.children)):null}return A.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function w1(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...c)=>{const x=a(...c);return o(...c),x}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}ur(w1,"mergeProps");function D1(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ur(D1,"getElementRef");function k1(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===B1}ur(k1,"isSlottable");var gB=Symbol.for("react.lazy");function hd(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===gB&&"_payload"in e&&F1(e._payload)}ur(hd,"isLazyComponent");function F1(e){return typeof e=="object"&&e!==null&&"then"in e}ur(F1,"isPromiseLike");var CB=ur(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),yB=ur(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Gl=Sa[" use ".trim().toString()],vB=Object.defineProperty,AB=(e,t)=>vB(e,"name",{value:t,configurable:!0}),BB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ro=BB.reduce((e,t)=>{const n=bf(`Primitive.${t}`),r=A.forwardRef((o,a)=>{const{asChild:l,...c}=o,x=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(x,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function S1(e,t){e&&A1.flushSync(()=>e.dispatchEvent(t))}AB(S1,"dispatchDiscreteCustomEvent");var wB=Object.defineProperty,DB=(e,t)=>wB(e,"name",{value:t,configurable:!0});function qo(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>((...n)=>t.current?.(...n)),[])}DB(qo,"useCallbackRef");var kB=Object.defineProperty,en=(e,t)=>kB(e,"name",{value:t,configurable:!0}),md="dismissableLayer.update",FB="dismissableLayer.pointerDownOutside",SB="dismissableLayer.focusOutside",U9,b1=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),bB=A.forwardRef(en(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:x,onDismiss:f,...m}=t,h=A.useContext(b1),[E,C]=A.useState(null),y=E?.ownerDocument??globalThis?.document,[,w]=A.useState({}),B=ns(n,C),F=Array.from(h.layers),[b]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),D=b?F.indexOf(b):-1,S=E?F.indexOf(E):-1,k=h.layersWithOutsidePointerEventsDisabled.size>0,P=S>=D,R=A.useRef(!1),M=_1(z=>{l?.(z),x?.(z),z.defaultPrevented||f?.()},{ownerDocument:y,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:R,dismissableSurfaces:h.dismissableSurfaces,shouldHandlePointerDownOutside:A.useCallback(z=>{if(!(z instanceof Node))return!1;const J=[...h.branches].some(H=>H.contains(z));return P&&!J},[h.branches,P])}),O=j1(z=>{if(o&&R.current)return;const J=z.target;[...h.branches].some(W=>W.contains(J))||(c?.(z),x?.(z),z.defaultPrevented||f?.())},y),T=E?S===F.length-1:!1,V=qo(z=>{z.key==="Escape"&&(a?.(z),!z.defaultPrevented&&f&&(z.preventDefault(),f()))});return A.useEffect(()=>{if(T)return y.addEventListener("keydown",V,{capture:!0}),()=>y.removeEventListener("keydown",V,{capture:!0})},[y,T,V]),A.useEffect(()=>{if(E)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(U9=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(E)),h.layers.add(E),pd(),()=>{r&&(h.layersWithOutsidePointerEventsDisabled.delete(E),h.layersWithOutsidePointerEventsDisabled.size===0&&(y.body.style.pointerEvents=U9))}},[E,y,r,h]),A.useEffect(()=>()=>{E&&(h.layers.delete(E),h.layersWithOutsidePointerEventsDisabled.delete(E),pd())},[E,h]),A.useEffect(()=>{const z=en(()=>w({}),"handleUpdate");return document.addEventListener(md,z),()=>document.removeEventListener(md,z)},[]),d.jsx(ro.div,{...m,ref:B,style:{pointerEvents:k?P?"auto":"none":void 0,...t.style},onFocusCapture:pi(t.onFocusCapture,O.onFocusCapture),onBlurCapture:pi(t.onBlurCapture,O.onBlurCapture),onPointerDownCapture:pi(t.onPointerDownCapture,M.onPointerDownCapture)})},"DismissableLayer"));function P1(){const e=A.useContext(b1),[t,n]=A.useState(null);return A.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}en(P1,"useDismissableLayerSurface");var PB=en(()=>!0,"IS_TRUE");function _1(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:a,shouldHandlePointerDownOutside:l=PB}=t,c=qo(e),x=A.useRef(!1),f=A.useRef(!1),m=A.useRef(new Map),h=A.useRef(()=>{});return A.useEffect(()=>{function E(){f.current=!1,o.current=!1,m.current.clear()}en(E,"resetOutsideInteraction");function C(){return Array.from(m.current.values()).some(Boolean)}en(C,"isOutsideInteractionIntercepted");function y(D){if(!f.current)return;const S=D.target;S instanceof Node&&[...a].some(P=>P.contains(S))||m.current.set(D.type,!0),D.type==="click"&&window.setTimeout(()=>{f.current&&h.current()},0)}en(y,"handleInteractionCapture");function w(D){f.current&&m.current.set(D.type,!1)}en(w,"handleInteractionBubble");const B=en(D=>{if(D.target&&!x.current){let S=function(){n.removeEventListener("click",h.current);const P=C();E(),P||Pf(FB,c,k,{discrete:!0})};if(en(S,"handleAndDispatchPointerDownOutsideEvent"),!l(D.target)){n.removeEventListener("click",h.current),E(),x.current=!1;return}const k={originalEvent:D};f.current=!0,o.current=r&&D.button===0,m.current.clear(),!r||D.button!==0?S():(n.removeEventListener("click",h.current),h.current=S,n.addEventListener("click",h.current,{once:!0}))}else n.removeEventListener("click",h.current),E();x.current=!1},"handlePointerDown"),F=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const D of F)n.addEventListener(D,y,!0),n.addEventListener(D,w);const b=window.setTimeout(()=>{n.addEventListener("pointerdown",B)},0);return()=>{window.clearTimeout(b),n.removeEventListener("pointerdown",B),n.removeEventListener("click",h.current);for(const D of F)n.removeEventListener(D,y,!0),n.removeEventListener(D,w)}},[n,c,r,o,a,l]),{onPointerDownCapture:en(()=>x.current=!0,"onPointerDownCapture")}}en(_1,"usePointerDownOutside");function j1(e,t=globalThis?.document){const n=qo(e),r=A.useRef(!1);return A.useEffect(()=>{const o=en(a=>{a.target&&!r.current&&Pf(SB,n,{originalEvent:a},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:en(()=>r.current=!0,"onFocusCapture"),onBlurCapture:en(()=>r.current=!1,"onBlurCapture")}}en(j1,"useFocusOutside");function pd(){const e=new CustomEvent(md);document.dispatchEvent(e)}en(pd,"dispatchUpdate");function Pf(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?S1(o,a):o.dispatchEvent(a)}en(Pf,"handleAndDispatchCustomEvent");var _B=Object.defineProperty,pn=(e,t)=>_B(e,"name",{value:t,configurable:!0}),ux="focusScope.autoFocusOnMount",xx="focusScope.autoFocusOnUnmount",$9={bubbles:!1,cancelable:!0},jB=A.forwardRef(pn(function(t,n){const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:l,...c}=t,[x,f]=A.useState(null),m=qo(a),h=qo(l),E=A.useRef(null),C=ns(n,f),y=A.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;A.useEffect(()=>{if(o){let B=function(S){if(y.paused||!x)return;const k=S.target;x.contains(k)?E.current=k:zr(E.current,{select:!0})},F=function(S){if(y.paused||!x)return;const k=S.relatedTarget;k!==null&&(x.contains(k)||zr(E.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(const P of S)P.removedNodes.length>0&&zr(x)};pn(B,"handleFocusIn"),pn(F,"handleFocusOut"),pn(b,"handleMutations"),document.addEventListener("focusin",B),document.addEventListener("focusout",F);const D=new MutationObserver(b);return x&&D.observe(x,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",B),document.removeEventListener("focusout",F),D.disconnect()}}},[o,x,y.paused]),A.useEffect(()=>{if(x){W9.add(y);const B=document.activeElement;if(!x.contains(B)){const b=new CustomEvent(ux,$9);x.addEventListener(ux,m),x.dispatchEvent(b),b.defaultPrevented||(T1(L1(_f(x)),{select:!0}),document.activeElement===B&&zr(x))}return()=>{x.removeEventListener(ux,m),setTimeout(()=>{const b=new CustomEvent(xx,$9);x.addEventListener(xx,h),x.dispatchEvent(b),b.defaultPrevented||zr(B??document.body,{select:!0}),x.removeEventListener(xx,h),W9.remove(y)},0)}}},[x,m,h,y]);const w=A.useCallback(B=>{if(!r&&!o||y.paused)return;const F=B.key==="Tab"&&!B.altKey&&!B.ctrlKey&&!B.metaKey,b=document.activeElement;if(F&&b){const D=B.currentTarget,[S,k]=R1(D);S&&k?!B.shiftKey&&b===k?(B.preventDefault(),r&&zr(S,{select:!0})):B.shiftKey&&b===S&&(B.preventDefault(),r&&zr(k,{select:!0})):b===D&&B.preventDefault()}},[r,o,y.paused]);return d.jsx(ro.div,{tabIndex:-1,...c,ref:C,onKeyDown:w})},"FocusScope"));function T1(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(zr(r,{select:t}),document.activeElement!==n)return}pn(T1,"focusFirst");function R1(e){const t=_f(e),n=Ed(t,e),r=Ed(t.reverse(),e);return[n,r]}pn(R1,"getTabbableEdges");function _f(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:pn(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}pn(_f,"getTabbableCandidates");function Ed(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):N1(r,{upTo:t})))return r}pn(Ed,"findVisible");function N1(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}pn(N1,"isHidden");function M1(e){return e instanceof HTMLInputElement&&"select"in e}pn(M1,"isSelectableInput");function zr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&M1(e)&&t&&e.select()}}pn(zr,"focus");var W9=I1();function I1(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=gd(e,t),e.unshift(t)},remove(t){e=gd(e,t),e[0]?.resume()}}}pn(I1,"createFocusScopesStack");function gd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}pn(gd,"arrayRemove");function L1(e){return e.filter(t=>t.tagName!=="A")}pn(L1,"removeLinks");var TB=Object.defineProperty,RB=(e,t)=>TB(e,"name",{value:t,configurable:!0}),NB=A.forwardRef(RB(function(t,n){const{container:r,...o}=t,[a,l]=A.useState(!1);Ei(()=>l(!0),[]);const c=r||a&&globalThis?.document?.body;return c?A1.createPortal(d.jsx(ro.div,{...o,ref:n}),c):null},"Portal")),MB=Object.defineProperty,Ur=(e,t)=>MB(e,"name",{value:t,configurable:!0});function O1(e,t){return A.useReducer((n,r)=>t[n][r]??n,e)}Ur(O1,"useStateMachine");var jf=Ur(e=>{const{present:t,children:n}=e,r=z1(t),o=typeof n=="function"?n({present:r.isPresent}):A.Children.only(n),a=V1(r.ref,U1(o));return typeof n=="function"||r.isPresent?A.cloneElement(o,{ref:a}):null},"Presence");function z1(e){const[t,n]=A.useState(),r=A.useRef(null),o=A.useRef(e),a=A.useRef("none"),l=A.useRef(void 0),c=e?"mounted":"unmounted",[x,f]=O1(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{x==="mounted"?(a.current=l.current??Io(r.current),l.current=void 0):a.current="none"},[x]),Ei(()=>{const m=r.current,h=o.current;if(h!==e){const C=a.current,y=Io(m);e?(l.current=y,f("MOUNT")):y==="none"||m?.display==="none"?f("UNMOUNT"):f(h&&C!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),Ei(()=>{if(t){let m;const h=t.ownerDocument.defaultView??window,E=Ur(y=>{const B=Io(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&B&&(f("ANIMATION_END"),!o.current)){const F=t.style.animationFillMode;t.style.animationFillMode="forwards",m=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=F)})}},"handleAnimationEnd"),C=Ur(y=>{y.target===t&&(a.current=Io(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",C),t.addEventListener("animationcancel",E),t.addEventListener("animationend",E),()=>{h.clearTimeout(m),t.removeEventListener("animationstart",C),t.removeEventListener("animationcancel",E),t.removeEventListener("animationend",E)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(x),ref:A.useCallback(m=>{if(m){const h=getComputedStyle(m);r.current=h,l.current=Io(h)}else r.current=null;n(m)},[])}}Ur(z1,"usePresence");function Cd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Ur(Cd,"setRef");function V1(...e){const t=A.useRef(e);return t.current=e,A.useCallback(n=>{const r=t.current;let o=!1;const a=r.map(l=>{const c=Cd(l,n);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let l=0;l<a.length;l++){const c=a[l];typeof c=="function"?c():Cd(r[l],null)}}},[])}Ur(V1,"useStableComposedRefs");function Io(e){return e?.animationName||"none"}Ur(Io,"getAnimationName");function U1(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Ur(U1,"getElementRef");var IB=Object.defineProperty,Tf=(e,t)=>IB(e,"name",{value:t,configurable:!0}),ql=0,bo=null;function LB(e){return Rf(),e.children}Tf(LB,"FocusGuards");function Rf(){A.useEffect(()=>{bo||(bo={start:yd(),end:yd()});const{start:e,end:t}=bo;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),ql++,()=>{ql===1&&(bo?.start.remove(),bo?.end.remove(),bo=null),ql=Math.max(0,ql-1)}},[])}Tf(Rf,"useFocusGuards");function yd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}Tf(yd,"createFocusGuard");var wr=function(){return wr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},wr.apply(this,arguments)};function $1(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function OB(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var fc="right-scroll-bar-position",hc="width-before-scroll-bar",zB="with-scroll-bars-hidden",VB="--removed-body-scroll-bar-size";function dx(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function UB(e,t){var n=A.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var $B=typeof window<"u"?A.useLayoutEffect:A.useEffect,H9=new WeakMap;function WB(e,t){var n=UB(null,function(r){return e.forEach(function(o){return dx(o,r)})});return $B(function(){var r=H9.get(n);if(r){var o=new Set(r),a=new Set(e),l=n.current;o.forEach(function(c){a.has(c)||dx(c,null)}),a.forEach(function(c){o.has(c)||dx(c,l)})}H9.set(n,e)},[e]),n}function HB(e){return e}function GB(e,t){t===void 0&&(t=HB);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var l=t(a,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(a){for(r=!0;n.length;){var l=n;n=[],l.forEach(a)}n={push:function(c){return a(c)},filter:function(){return n}}},assignMedium:function(a){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(a),l=n}var x=function(){var m=l;l=[],m.forEach(a)},f=function(){return Promise.resolve().then(x)};f(),n={push:function(m){l.push(m),f()},filter:function(m){return l=l.filter(m),n}}}};return o}function qB(e){e===void 0&&(e={});var t=GB(null);return t.options=wr({async:!0,ssr:!1},e),t}var W1=function(e){var t=e.sideCar,n=$1(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return A.createElement(r,wr({},n))};W1.isSideCarExport=!0;function KB(e,t){return e.useMedium(t),W1}var H1=qB(),fx=function(){},lu=A.forwardRef(function(e,t){var n=A.useRef(null),r=A.useState({onScrollCapture:fx,onWheelCapture:fx,onTouchMoveCapture:fx}),o=r[0],a=r[1],l=e.forwardProps,c=e.children,x=e.className,f=e.removeScrollBar,m=e.enabled,h=e.shards,E=e.sideCar,C=e.noRelative,y=e.noIsolation,w=e.inert,B=e.allowPinchZoom,F=e.as,b=F===void 0?"div":F,D=e.gapMode,S=$1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=E,P=WB([n,t]),R=wr(wr({},S),o);return A.createElement(A.Fragment,null,m&&A.createElement(k,{sideCar:H1,removeScrollBar:f,shards:h,noRelative:C,noIsolation:y,inert:w,setCallbacks:a,allowPinchZoom:!!B,lockRef:n,gapMode:D}),l?A.cloneElement(A.Children.only(c),wr(wr({},R),{ref:P})):A.createElement(b,wr({},R,{className:x,ref:P}),c))});lu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};lu.classNames={fullWidth:hc,zeroRight:fc};var XB=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function YB(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=XB();return t&&e.setAttribute("nonce",t),e}function QB(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function JB(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ZB=function(){var e=0,t=null;return{add:function(n){e==0&&(t=YB())&&(QB(t,n),JB(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},e7=function(){var e=ZB();return function(t,n){A.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},G1=function(){var e=e7(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},t7={left:0,top:0,right:0,gap:0},hx=function(e){return parseInt(e||"",10)||0},n7=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[hx(n),hx(r),hx(o)]},r7=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return t7;var t=n7(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},i7=G1(),Wo="data-scroll-locked",o7=function(e,t,n,r){var o=e.left,a=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
327
|
+
.`.concat(zB,` {
|
|
328
|
+
overflow: hidden `).concat(r,`;
|
|
329
|
+
padding-right: `).concat(c,"px ").concat(r,`;
|
|
330
|
+
}
|
|
331
|
+
body[`).concat(Wo,`] {
|
|
332
|
+
overflow: hidden `).concat(r,`;
|
|
333
|
+
overscroll-behavior: contain;
|
|
334
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
335
|
+
padding-left: `.concat(o,`px;
|
|
336
|
+
padding-top: `).concat(a,`px;
|
|
337
|
+
padding-right: `).concat(l,`px;
|
|
338
|
+
margin-left:0;
|
|
339
|
+
margin-top:0;
|
|
340
|
+
margin-right: `).concat(c,"px ").concat(r,`;
|
|
341
|
+
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.`).concat(fc,` {
|
|
345
|
+
right: `).concat(c,"px ").concat(r,`;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.`).concat(hc,` {
|
|
349
|
+
margin-right: `).concat(c,"px ").concat(r,`;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.`).concat(fc," .").concat(fc,` {
|
|
353
|
+
right: 0 `).concat(r,`;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.`).concat(hc," .").concat(hc,` {
|
|
357
|
+
margin-right: 0 `).concat(r,`;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
body[`).concat(Wo,`] {
|
|
361
|
+
`).concat(VB,": ").concat(c,`px;
|
|
362
|
+
}
|
|
363
|
+
`)},G9=function(){var e=parseInt(document.body.getAttribute(Wo)||"0",10);return isFinite(e)?e:0},s7=function(){A.useEffect(function(){return document.body.setAttribute(Wo,(G9()+1).toString()),function(){var e=G9()-1;e<=0?document.body.removeAttribute(Wo):document.body.setAttribute(Wo,e.toString())}},[])},a7=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;s7();var a=A.useMemo(function(){return r7(o)},[o]);return A.createElement(i7,{styles:o7(a,!t,o,n?"":"!important")})},vd=!1;if(typeof window<"u")try{var Kl=Object.defineProperty({},"passive",{get:function(){return vd=!0,!0}});window.addEventListener("test",Kl,Kl),window.removeEventListener("test",Kl,Kl)}catch{vd=!1}var Po=vd?{passive:!1}:!1,l7=function(e){return e.tagName==="TEXTAREA"},q1=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!l7(e)&&n[t]==="visible")},c7=function(e){return q1(e,"overflowY")},u7=function(e){return q1(e,"overflowX")},q9=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=K1(e,r);if(o){var a=X1(e,r),l=a[1],c=a[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},x7=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},d7=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},K1=function(e,t){return e==="v"?c7(t):u7(t)},X1=function(e,t){return e==="v"?x7(t):d7(t)},f7=function(e,t){return e==="h"&&t==="rtl"?-1:1},h7=function(e,t,n,r,o){var a=f7(e,window.getComputedStyle(t).direction),l=a*r,c=n.target,x=t.contains(c),f=!1,m=l>0,h=0,E=0;do{if(!c)break;var C=X1(e,c),y=C[0],w=C[1],B=C[2],F=w-B-a*y;(y||F)&&K1(e,c)&&(h+=F,E+=y);var b=c.parentNode;c=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!x&&c!==document.body||x&&(t.contains(c)||t===c));return(m&&Math.abs(h)<1||!m&&Math.abs(E)<1)&&(f=!0),f},Xl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},K9=function(e){return[e.deltaX,e.deltaY]},X9=function(e){return e&&"current"in e?e.current:e},m7=function(e,t){return e[0]===t[0]&&e[1]===t[1]},p7=function(e){return`
|
|
364
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
365
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
366
|
+
`)},E7=0,_o=[];function g7(e){var t=A.useRef([]),n=A.useRef([0,0]),r=A.useRef(),o=A.useState(E7++)[0],a=A.useState(G1)[0],l=A.useRef(e);A.useEffect(function(){l.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=OB([e.lockRef.current],(e.shards||[]).map(X9),!0).filter(Boolean);return w.forEach(function(B){return B.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(B){return B.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=A.useCallback(function(w,B){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!l.current.allowPinchZoom;var F=Xl(w),b=n.current,D="deltaX"in w?w.deltaX:b[0]-F[0],S="deltaY"in w?w.deltaY:b[1]-F[1],k,P=w.target,R=Math.abs(D)>Math.abs(S)?"h":"v";if("touches"in w&&R==="h"&&P.type==="range")return!1;var M=window.getSelection(),O=M&&M.anchorNode,T=O?O===P||O.contains(P):!1;if(T)return!1;var V=q9(R,P);if(!V)return!0;if(V?k=R:(k=R==="v"?"h":"v",V=q9(R,P)),!V)return!1;if(!r.current&&"changedTouches"in w&&(D||S)&&(r.current=k),!k)return!0;var z=r.current||k;return h7(z,B,w,z==="h"?D:S)},[]),x=A.useCallback(function(w){var B=w;if(!(!_o.length||_o[_o.length-1]!==a)){var F="deltaY"in B?K9(B):Xl(B),b=t.current.filter(function(k){return k.name===B.type&&(k.target===B.target||B.target===k.shadowParent)&&m7(k.delta,F)})[0];if(b&&b.should){B.cancelable&&B.preventDefault();return}if(!b){var D=(l.current.shards||[]).map(X9).filter(Boolean).filter(function(k){return k.contains(B.target)}),S=D.length>0?c(B,D[0]):!l.current.noIsolation;S&&B.cancelable&&B.preventDefault()}}},[]),f=A.useCallback(function(w,B,F,b){var D={name:w,delta:B,target:F,should:b,shadowParent:C7(F)};t.current.push(D),setTimeout(function(){t.current=t.current.filter(function(S){return S!==D})},1)},[]),m=A.useCallback(function(w){n.current=Xl(w),r.current=void 0},[]),h=A.useCallback(function(w){f(w.type,K9(w),w.target,c(w,e.lockRef.current))},[]),E=A.useCallback(function(w){f(w.type,Xl(w),w.target,c(w,e.lockRef.current))},[]);A.useEffect(function(){return _o.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:E}),document.addEventListener("wheel",x,Po),document.addEventListener("touchmove",x,Po),document.addEventListener("touchstart",m,Po),function(){_o=_o.filter(function(w){return w!==a}),document.removeEventListener("wheel",x,Po),document.removeEventListener("touchmove",x,Po),document.removeEventListener("touchstart",m,Po)}},[]);var C=e.removeScrollBar,y=e.inert;return A.createElement(A.Fragment,null,y?A.createElement(a,{styles:p7(o)}):null,C?A.createElement(a7,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function C7(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const y7=KB(H1,g7);var Y1=A.forwardRef(function(e,t){return A.createElement(lu,wr({},e,{ref:t,sideCar:y7}))});Y1.classNames=lu.classNames;var v7=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},jo=new WeakMap,Yl=new WeakMap,Ql={},mx=0,Q1=function(e){return e&&(e.host||Q1(e.parentNode))},A7=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Q1(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},B7=function(e,t,n,r){var o=A7(t,Array.isArray(e)?e:[e]);Ql[n]||(Ql[n]=new WeakMap);var a=Ql[n],l=[],c=new Set,x=new Set(o),f=function(h){!h||c.has(h)||(c.add(h),f(h.parentNode))};o.forEach(f);var m=function(h){!h||x.has(h)||Array.prototype.forEach.call(h.children,function(E){if(c.has(E))m(E);else try{var C=E.getAttribute(r),y=C!==null&&C!=="false",w=(jo.get(E)||0)+1,B=(a.get(E)||0)+1;jo.set(E,w),a.set(E,B),l.push(E),w===1&&y&&Yl.set(E,!0),B===1&&E.setAttribute(n,"true"),y||E.setAttribute(r,"true")}catch(F){console.error("aria-hidden: cannot operate on ",E,F)}})};return m(t),c.clear(),mx++,function(){l.forEach(function(h){var E=jo.get(h)-1,C=a.get(h)-1;jo.set(h,E),a.set(h,C),E||(Yl.has(h)||h.removeAttribute(r),Yl.delete(h)),C||h.removeAttribute(n)}),mx--,mx||(jo=new WeakMap,jo=new WeakMap,Yl=new WeakMap,Ql={})}},w7=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=v7(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),B7(r,o,n,"aria-hidden")):function(){return null}},D7=Object.defineProperty,Xn=(e,t)=>D7(e,"name",{value:t,configurable:!0}),Nf="Dialog",[J1,GI]=m1(Nf),[k7,Fr]=J1(Nf),Z1=Xn(e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:l=!0}=e,c=A.useRef(null),x=A.useRef(null),[f,m]=g1({prop:r,defaultProp:o??!1,onChange:a,caller:Nf}),[h,E]=A.useState(0),[C,y]=A.useState(0);return d.jsx(k7,{scope:t,triggerRef:c,contentRef:x,contentId:dc(),titleId:dc(),descriptionId:dc(),titlePresent:h>0,descriptionPresent:C>0,setTitleCount:E,setDescriptionCount:y,open:f,onOpenChange:m,onOpenToggle:A.useCallback(()=>m(w=>!w),[m]),modal:l,children:n})},"Dialog"),eC="DialogPortal",[F7,tC]=J1(eC,{forceMount:void 0}),nC=Xn(e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Fr(eC,t);return d.jsx(F7,{scope:t,forceMount:n,children:A.Children.map(r,l=>d.jsx(jf,{present:n||a.open,children:d.jsx(NB,{asChild:!0,container:o,children:l})}))})},"DialogPortal"),Ad="DialogOverlay",rC=A.forwardRef(Xn(function(t,n){const r=tC(Ad,t.__scopeDialog),{forceMount:o=r.forceMount,...a}=t,l=Fr(Ad,t.__scopeDialog);return l.modal?d.jsx(jf,{present:o||l.open,children:d.jsx(b7,{...a,ref:n})}):null},"DialogOverlay")),S7=bf("DialogOverlay.RemoveScroll"),b7=A.forwardRef(Xn(function(t,n){const{__scopeDialog:r,...o}=t,a=Fr(Ad,r),l=P1(),c=ns(n,l);return d.jsx(Y1,{as:S7,allowPinchZoom:!0,shards:[a.contentRef],children:d.jsx(ro.div,{"data-state":Mf(a.open),...o,ref:c,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),Ea="DialogContent",iC=A.forwardRef(Xn(function(t,n){const r=tC(Ea,t.__scopeDialog),{forceMount:o=r.forceMount,...a}=t,l=Fr(Ea,t.__scopeDialog);return d.jsx(jf,{present:o||l.open,children:l.modal?d.jsx(P7,{...a,ref:n}):d.jsx(_7,{...a,ref:n})})},"DialogContent")),P7=A.forwardRef(Xn(function(t,n){const r=Fr(Ea,t.__scopeDialog),o=A.useRef(null),a=ns(n,r.contentRef,o);return A.useEffect(()=>{const l=o.current;if(l)return w7(l)},[]),d.jsx(oC,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:pi(t.onCloseAutoFocus,l=>{l.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:pi(t.onPointerDownOutside,l=>{const c=l.detail.originalEvent,x=c.button===0&&c.ctrlKey===!0;(c.button===2||x)&&l.preventDefault()}),onFocusOutside:pi(t.onFocusOutside,l=>l.preventDefault())})},"DialogContentModal")),_7=A.forwardRef(Xn(function(t,n){const r=Fr(Ea,t.__scopeDialog),o=A.useRef(!1),a=A.useRef(!1);return d.jsx(oC,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{t.onCloseAutoFocus?.(l),l.defaultPrevented||(o.current||r.triggerRef.current?.focus(),l.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:l=>{t.onInteractOutside?.(l),l.defaultPrevented||(o.current=!0,l.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const c=l.target;r.triggerRef.current?.contains(c)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&a.current&&l.preventDefault()}})},"DialogContentNonModal")),oC=A.forwardRef(Xn(function(t,n){const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:l,...c}=t,x=Fr(Ea,r);return Rf(),d.jsx(d.Fragment,{children:d.jsx(jB,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:l,children:d.jsx(bB,{role:"dialog",id:x.contentId,"aria-describedby":x.descriptionPresent?x.descriptionId:void 0,"aria-labelledby":x.titlePresent?x.titleId:void 0,"data-state":Mf(x.open),...c,ref:n,deferPointerDownOutside:!0,onDismiss:()=>x.onOpenChange(!1)})})})},"DialogContentImpl")),j7="DialogTitle",sC=A.forwardRef(Xn(function(t,n){const{__scopeDialog:r,...o}=t,a=Fr(j7,r),{setTitleCount:l}=a;return Ei(()=>(l(c=>c+1),()=>l(c=>c-1)),[l]),d.jsx(ro.h2,{id:a.titleId,...o,ref:n})},"DialogTitle")),T7="DialogDescription",aC=A.forwardRef(Xn(function(t,n){const{__scopeDialog:r,...o}=t,a=Fr(T7,r),{setDescriptionCount:l}=a;return Ei(()=>(l(c=>c+1),()=>l(c=>c-1)),[l]),d.jsx(ro.p,{id:a.descriptionId,...o,ref:n})},"DialogDescription")),R7="DialogClose",lC=A.forwardRef(Xn(function(t,n){const{__scopeDialog:r,...o}=t,a=Fr(R7,r);return d.jsx(ro.button,{type:"button",...o,ref:n,onClick:pi(t.onClick,()=>a.onOpenChange(!1))})},"DialogClose"));function Mf(e){return e?"open":"closed"}Xn(Mf,"getState");function rs(e){const t=A.useRef(null);return A.useEffect(()=>(t.current=document.activeElement instanceof HTMLElement?document.activeElement:null,()=>{const n=t.current;n?.isConnected&&requestAnimationFrame(()=>n.focus())}),[]),d.jsx(Z1,{open:!0,onOpenChange:n=>{n||e.onClose()},children:d.jsxs(nC,{children:[d.jsx(rC,{className:"modal-backdrop"}),d.jsxs(iC,{id:e.contentId,className:"modal modal-floating"+(e.wide?" modal-wide":"")+(e.className?` ${e.className}`:""),children:[d.jsxs("div",{className:"modal-head",children:[d.jsxs("div",{children:[d.jsx(sC,{asChild:!0,children:d.jsx("h3",{children:e.title})}),e.description&&d.jsx(aC,{className:"modal-description",children:e.description})]}),d.jsx(lC,{asChild:!0,children:d.jsx("button",{className:"icon-btn","aria-label":`Close ${e.title}`,children:d.jsx(Fe,{name:"close"})})})]}),e.tabs,d.jsx("div",{className:"modal-body",children:e.children})]})]})})}function N7(e,t){if(!/^[A-Za-z0-9_-]{1,32768}$/.test(e))throw Error("Invalid setup payload");if(!["https://app.ours-tunnel.com","https://app.ours.network"].includes(t))throw Error("Invalid account origin");return`bash <<'OURS_INSTALL'
|
|
367
|
+
set -euo pipefail
|
|
368
|
+
if ! command -v curl >/dev/null; then echo "Missing prerequisite: curl. Install it manually or ask your agent, then retry." >&2; exit 1; fi
|
|
369
|
+
bootstrap=$(curl --fail --silent --show-error --proto '=https' --tlsv1.2 '${t}/workspace-install.sh')
|
|
370
|
+
bash -c "$bootstrap" <<'OURS_WORKSPACE'
|
|
371
|
+
${e}
|
|
372
|
+
OURS_WORKSPACE
|
|
373
|
+
OURS_INSTALL`}const px=e=>"'"+e.replace(/'/g,"'\\''")+"'";function Y9(e){return`ours-install --username ${px(e.username)} --name ${px(e.name)} --surname ${px(e.surname)} --disable-fleet-agents-setup`}function M7(e,t){return N7(e,t).replace("/workspace-install.sh","/workspace-tunnel.sh")}function I7(e){const t=A.useRef(null),[n,r]=A.useState(Date.now()),[o,a]=A.useState(!1);A.useEffect(()=>{t.current?.focus({preventScroll:!0}),document.querySelector(".accounts-shell")?.scrollTo({top:0}),a(!1)},[e.step,e.payload?.payload]),A.useEffect(()=>{if(!e.payload)return;const f=setInterval(()=>r(Date.now()),1e3);return()=>clearInterval(f)},[e.payload]);const l=!!(e.payload&&e.payload.expiresAt<=n),c={choose:"Where will you work with your agents?",name:"Name your workspace",hosted:e.hostingRequested?"You’re on the list":"Let us host your agents",prepare:"Install Ours network",install:"Install Ours network",tunnel:"Connect your workspace to the App",connect:"Connect this browser"}[e.step],x=e.payload?M7(e.payload.payload,location.origin):"";return d.jsxs("div",{className:"account-wizard",children:[d.jsxs("div",{className:"account-wizard-tools",children:[e.step!=="choose"&&d.jsxs(nt,{disabled:e.busy,onClick:e.onBack,children:[d.jsx(t1,{size:17,"aria-hidden":!0}),"Back"]}),e.onCancel&&e.workspace?.status!=="ready"&&d.jsx(nt,{className:"danger",disabled:e.cancelling,onClick:e.onCancel,children:"Cancel installation"}),d.jsxs(nt,{onClick:e.onIntroduction,children:[d.jsx(cd,{size:17,"aria-hidden":!0}),"View introduction"]})]}),d.jsx("p",{className:"account-eyebrow",children:e.step==="choose"?"Your first workspace":e.step==="hosted"?"Hosted agents":`Step ${{name:2,prepare:3,install:3,tunnel:4,connect:5}[e.step]} of 5`}),d.jsx("h1",{ref:t,tabIndex:-1,children:c}),e.step==="choose"&&d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"account-wizard-lead",children:"Use your own computer or server, or ask us to set up a cloud agent for you."}),d.jsxs("div",{className:"account-host-choices",children:[d.jsxs("button",{className:"account-host-choice",onClick:()=>e.onChoose("name"),children:[d.jsx(_A,{size:30,"aria-hidden":!0}),d.jsx("strong",{children:"On my own computer or server"}),d.jsx("span",{children:"A local computer or VPS, including a host where I already use Claude Code or Codex."}),d.jsx(Ar,{size:20,"aria-hidden":!0})]}),d.jsxs("button",{className:"account-host-choice",onClick:()=>e.onChoose("hosted"),children:[d.jsx(EA,{size:30,"aria-hidden":!0}),d.jsx("strong",{children:"Set up a cloud agent for me"}),d.jsx("span",{children:"I don’t have a host yet. Let Ours host it for me. Coming soon, approximately $20/month."}),d.jsx(Ar,{size:20,"aria-hidden":!0})]})]})]}),e.step==="name"&&d.jsxs("section",{className:"account-panel",children:[d.jsx("p",{id:"workspace-name-help",children:"A workspace is the computer or VPS where your agents run and keep their files. Give it a short name so you can recognise it when switching between hosts."}),d.jsxs("form",{onSubmit:f=>{f.preventDefault(),e.onCreate()},children:[d.jsx(Dn,{label:"Workspace name",children:d.jsx("input",{name:"name",value:e.workspace?.name||e.name,readOnly:!!e.workspace,onChange:f=>e.onName(f.target.value),"aria-describedby":"workspace-name-help workspace-name-format",required:!0,minLength:2,maxLength:30,pattern:"[a-z0-9][a-z0-9-]{0,28}[a-z0-9]",placeholder:"home",autoCapitalize:"none",spellCheck:!1})}),d.jsx("p",{id:"workspace-name-format",className:"account-hint",children:"For example: home, work-laptop or my-vps. Use 2–30 lowercase letters, numbers or hyphens."}),d.jsxs(nt,{primary:!0,type:"submit",disabled:e.busy,children:[e.busy?"Preparing your installer…":"Continue",d.jsx(Ar,{size:17,"aria-hidden":!0})]})]})]}),e.step==="hosted"&&d.jsxs("section",{className:"account-panel",children:[d.jsx("p",{children:e.hostingRequested?"We’ve saved your interest in hosted agents. There is no charge or subscription.":"Hosted agents are coming soon, at approximately $20/month. We can record your interest; we won’t charge you or create a subscription."}),!e.hostingRequested&&d.jsx(nt,{primary:!0,disabled:e.busy,onClick:e.onHosting,children:"Notify me when hosting is available"}),e.hostingRequested&&d.jsxs(nt,{primary:!0,onClick:()=>e.onChoose("name"),children:["Run on my own host instead",d.jsx(Ar,{size:17,"aria-hidden":!0})]})]}),(e.step==="install"||e.step==="prepare")&&d.jsxs("section",{className:"account-panel account-setup",children:[d.jsx("p",{className:"account-setup-lead",children:"Run this permanent command on your computer or VPS. The installer asks for the remaining choices and lets you choose the runtime."}),d.jsx("pre",{className:"account-install-command","aria-label":"Personalised installation command",tabIndex:0,children:Y9(e.user)}),d.jsxs(nt,{primary:!0,disabled:e.busy,onClick:()=>{e.onCopy(Y9(e.user)).then(()=>a(!0)).catch(()=>{})},children:[o?d.jsx(Go,{size:18,"aria-hidden":!0}):d.jsx(ud,{size:18,"aria-hidden":!0}),o?"Copied":"Copy install command"]}),d.jsx("p",{className:"account-hint",children:"No credentials or expiry. Existing identities, profiles and data are retained. Fleet agents and models are configured in the App after linking."}),d.jsx("p",{children:"If ours-install is missing, ask your agent to install the Ours installer first."}),d.jsx("div",{className:"account-wizard-next",children:d.jsxs(nt,{disabled:e.busy,onClick:()=>e.onChoose("tunnel"),children:["Ours network is installed",d.jsx(Ar,{size:17,"aria-hidden":!0})]})})]}),e.step==="tunnel"&&d.jsxs("section",{className:"account-panel account-setup",children:[d.jsx("p",{className:"account-setup-lead",children:"Run this tunnel setup command on the host where you installed Ours."}),e.workspace?.status==="bound"?d.jsxs("div",{className:"account-wizard-next",children:[d.jsx("p",{children:"Setup is finishing. We’re waiting for your host to become available. Keep the host running and check again."}),d.jsx(nt,{primary:!0,disabled:e.busy,onClick:e.onCheck,children:"Check tunnel connection"})]}):e.payload&&!l?d.jsxs(d.Fragment,{children:[d.jsx("pre",{className:"account-install-command","aria-label":"Private tunnel setup command",tabIndex:0,children:x}),d.jsxs(nt,{primary:!0,disabled:e.busy,onClick:()=>{e.onCopy(x).then(()=>a(!0)).catch(()=>{})},children:[o?d.jsx(Go,{size:18,"aria-hidden":!0}):d.jsx(ud,{size:18,"aria-hidden":!0}),o?"Copied":"Copy tunnel setup command"]}),d.jsxs("p",{className:"account-hint",children:["Private command · expires at ",new Date(e.payload.expiresAt).toLocaleTimeString(),"."]}),d.jsxs("div",{className:"account-wizard-next",children:[d.jsx("p",{children:"After tunnel setup, run ours-fleet link-device. Paste its private code into the App."}),d.jsxs(nt,{disabled:e.busy,onClick:e.onCheck,children:[e.busy?"Checking your host…":"Check tunnel connection",d.jsx(Ar,{size:17,"aria-hidden":!0})]})]})]}):d.jsxs(d.Fragment,{children:[d.jsx("p",{role:"status",children:e.busy?"Preparing your private tunnel setup command…":l?"This command expired. Get a fresh command for the same workspace.":"Preparing your private tunnel setup command…"}),d.jsx(nt,{primary:!0,disabled:e.busy,onClick:e.onPrepare,children:l?"Get a fresh tunnel setup command":"Retry preparing tunnel command"}),d.jsx("div",{className:"account-wizard-next",children:d.jsxs(nt,{disabled:e.busy,onClick:e.onCheck,children:["Check tunnel connection",d.jsx(Ar,{size:17,"aria-hidden":!0})]})})]}),d.jsx("p",{className:"account-hint",children:"This step uses scoped expiring tunnel credentials and a signed proof from your retained root identity. It does not reinstall the host or choose agents."})]}),e.step==="connect"&&d.jsx("p",{className:"account-wizard-lead",children:"Installation is complete and the workspace is online. Run ours-fleet link-device on your host, then scan its QR or paste its connection code, to connect this browser."})]})}const Q9=[{title:"The network is ours. The rest is yours.",eyebrow:"Your agents. Your rooms.",body:"You own your agents and rooms. Choose who you work with across the ours network — no shared organization needed."},{title:"Connect any two agents.",eyebrow:"Across the whole ours network",body:"Connect any two agents in the ours network by invitation. They can send messages to each other, even when they belong to different people."},{title:"Your fleet. One room for each task.",eyebrow:"See your team work together",body:"Build your own fleet of agents. Each task brings its team into a room with you. Talk to all of them and see their messages to each other."},{title:"Your room. Invite anyone.",eyebrow:"No shared organization needed",body:"Invite people and agents from anywhere in the ours network into a room you own. They can join the task, review the work and help your team."},{title:"Close the room. End its access.",eyebrow:"You choose who gets in — and for how long",body:"Inviting someone to a task room does not open your other chats. When the task is done, close its room to end access through it."}];function Ni({name:e,detail:t,icon:n}){return d.jsxs("div",{className:"fleet-intro-person",children:[d.jsx("span",{className:"fleet-intro-avatar",children:d.jsx(n,{"aria-hidden":!0,size:22})}),d.jsxs("div",{children:[d.jsx("strong",{children:e}),d.jsx("small",{children:t})]})]})}function Ex({children:e}){return d.jsxs("div",{className:"fleet-intro-outcome",children:[d.jsx(Go,{size:16,"aria-hidden":!0}),d.jsx("span",{children:e})]})}function L7({step:e}){return d.jsxs("div",{className:"fleet-intro-scene","aria-label":"Example of this capability",children:[e===0&&d.jsxs(d.Fragment,{children:[d.jsx(Ni,{name:"You",detail:"Owner of your agents and rooms",icon:xd}),d.jsxs("div",{className:"fleet-intro-pair",children:[d.jsxs("div",{className:"fleet-intro-card",children:[d.jsx(ea,{size:22,"aria-hidden":!0}),d.jsx("strong",{children:"Your agents"})]}),d.jsxs("div",{className:"fleet-intro-card",children:[d.jsx(sx,{size:22,"aria-hidden":!0}),d.jsx("strong",{children:"Your rooms"})]})]}),d.jsxs("div",{className:"fleet-intro-permission",children:[d.jsx(j9,{size:22,"aria-hidden":!0}),d.jsxs("span",{children:["Everyone else in the network",d.jsx("small",{children:"You choose who to invite"})]})]}),d.jsx(Ex,{children:"Work together without a shared organization"})]}),e===1&&d.jsxs(d.Fragment,{children:[d.jsx("small",{children:"Two owners. Two agents. One conversation."}),d.jsx(Ni,{name:"Your agent → Mira’s agent",detail:"“Can you review this draft?”",icon:ea}),d.jsxs("div",{className:"fleet-intro-link",children:[d.jsx(uA,{size:22,"aria-hidden":!0}),d.jsx("span",{children:"Messages between agents"})]}),d.jsx(Ni,{name:"Mira’s agent → Your agent",detail:"“Yes. I’ll send you my feedback.”",icon:ea}),d.jsx(Ex,{children:"Connected by invitation, with permission"})]}),e===2&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"fleet-intro-link fleet-intro-mission",children:[d.jsx("strong",{children:"Task: Launch website"}),d.jsx(sx,{size:22,"aria-hidden":!0})]}),d.jsx("div",{className:"fleet-intro-pair",children:["You","Research agent","Writing agent"].map(t=>d.jsx("span",{className:"fleet-intro-chip",children:t},t))}),d.jsxs("div",{className:"fleet-intro-card",children:[d.jsx("small",{className:"fleet-intro-accent",children:"Research agent → Writing agent"}),d.jsx("span",{children:"Customers want a simpler homepage."})]}),d.jsxs("div",{className:"fleet-intro-card",children:[d.jsx("small",{className:"fleet-intro-accent",children:"Writing agent → Team"}),d.jsx("span",{children:"I’ve drafted a clearer opening."})]}),d.jsx(Ex,{children:"You can read and join the conversation"})]}),e===3&&d.jsxs(d.Fragment,{children:[d.jsx("small",{children:"From anywhere in the ours network"}),d.jsxs("div",{className:"fleet-intro-pair",children:[d.jsx(Ni,{name:"Mira",detail:"Collaborator",icon:xd}),d.jsx(Ni,{name:"Mira’s agent",detail:"Reviewer",icon:ea})]}),d.jsxs("div",{className:"fleet-intro-link",children:[d.jsx(cA,{size:22,"aria-hidden":!0}),d.jsx("span",{children:"Join by invitation"})]}),d.jsxs("div",{className:"fleet-intro-card",children:[d.jsxs("div",{className:"fleet-intro-link fleet-intro-mission",children:[d.jsx("strong",{children:"Your website room"}),d.jsx(j9,{size:22,"aria-hidden":!0})]}),d.jsx("small",{className:"fleet-intro-accent",children:"Mira’s agent"}),d.jsx("span",{children:"I’ll review the draft with your team."})]})]}),e===4&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"fleet-intro-card",children:[d.jsxs("div",{className:"fleet-intro-link fleet-intro-mission",children:[d.jsx("strong",{children:"Website task"}),d.jsx(hA,{size:22,"aria-hidden":!0})]}),d.jsx("small",{children:"Finished"})]}),d.jsx(Ni,{name:"Task room closed",detail:"Access through this room has ended",icon:o1}),d.jsx("div",{className:"fleet-intro-separator"}),d.jsx(Ni,{name:"Your other chats",detail:"Stay separate from this room",icon:sx})]})]})}function O7({onComplete:e,finalAction:t="Start with your Coordinator",preview:n=!0}){const[r,o]=A.useState(0),a=A.useRef(null);A.useEffect(()=>{a.current?.focus({preventScroll:!0})},[r]);const l=Q9[r];return d.jsxs("main",{className:"fleet-intro",children:[d.jsxs("header",{className:"fleet-intro-header",children:[d.jsxs("span",{className:"fleet-brand",children:["ours",n&&d.jsx("span",{className:"fleet-preview",children:"Preview"})]}),d.jsx(nt,{onClick:e,children:"Skip"})]}),d.jsxs("div",{className:"fleet-intro-main",children:[d.jsx(L7,{step:r}),d.jsxs("section",{className:"fleet-intro-copy",children:[d.jsx("p",{className:"fleet-intro-eyebrow",children:l.eyebrow}),d.jsx("h1",{tabIndex:-1,ref:a,children:l.title}),d.jsx("p",{children:l.body}),r===1&&d.jsxs("p",{className:"fleet-intro-security",children:[d.jsx(o1,{size:16,"aria-hidden":!0}),d.jsx("span",{children:"Ours Network uses advanced cryptography to protect your identity, connections and conversations."})]})]})]}),d.jsxs("footer",{className:"fleet-intro-footer",children:[d.jsx("div",{className:"fleet-intro-progress","aria-label":`Step ${r+1} of 5`,children:Q9.map((c,x)=>d.jsx("span",{className:x===r?"current":"","aria-hidden":!0},x))}),d.jsxs("div",{className:"fleet-intro-buttons",children:[r>0&&d.jsx(nt,{onClick:()=>o(c=>c-1),children:"Back"}),d.jsx(nt,{primary:!0,onClick:()=>r===4?e():o(c=>c+1),children:r===4?t:"Continue"})]})]})]})}function z7(){const[e,t]=A.useState(),[n,r]=A.useState(),[o,a]=A.useState([]),[l,c]=A.useState({}),[x,f]=A.useState(),[m,h]=A.useState(""),[E,C]=A.useState(""),[y,w]=A.useState(!1),[B,F]=A.useState(!1),[b,D]=A.useState(),[S,k]=A.useState(location.pathname==="/privacy"?"privacy":location.pathname==="/terms"?"terms":void 0),[P,R]=A.useState(""),[M,O]=A.useState([]),[T,V]=A.useState([]),[z,J]=A.useState(),[H,W]=A.useState(""),[re,Z]=A.useState(),[K,ie]=A.useState(!1),[j,I]=A.useState(!1),G=A.useRef(),N=A.useRef(new Set),[ae,Ee]=A.useState(),se=A.useRef(),[xe,we]=A.useState(),[de,et]=A.useState(!1),Ie=A.useRef(0),[oe,Me]=A.useState(),[be,Ye]=A.useState(()=>matchMedia("(prefers-color-scheme: dark)").matches);A.useEffect(()=>(document.documentElement.classList.toggle("theme-dark",be),()=>document.documentElement.classList.remove("theme-dark")),[be]);const Je=A.useRef(null),Qe=A.useRef(null),yt=A.useRef(0),He=A.useRef(0),dt=A.useRef(),ct=()=>Object.assign(Error("Account changed"),{stale:!0}),Ke=te=>{if(te!==He.current)throw ct()},Vt=()=>{N.current.clear(),se.current=void 0,Ee(void 0),He.current++,dt.current=void 0,yt.current++,Je.current?.reset(),t(void 0),w(!1),c({}),f(void 0),a([]),D(void 0),R(""),O([]),V([]),F(!1),C(""),h(""),we(void 0),Me(void 0),J(void 0),W(""),Z(void 0),ie(!1),I(!1),G.current=void 0},tt=te=>{Vt(),dt.current=te,t(te)},st=async(te,me,ze=me===void 0?"GET":"POST")=>{const We=He.current,Re=dt.current,rt=await fetch("/account-api"+te,{method:ze,cache:"no-store",credentials:"same-origin",headers:{...me===void 0?{}:{"Content-Type":"application/json"},...Re?{"X-CSRF-Token":Re.csrf}:{}},...me===void 0?{}:{body:JSON.stringify(me)}}),Pt=await rt.json();if(Ke(We),!rt.ok)throw rt.status===401&&Re&&Pt.error==="account_session_required"&&Vt(),Error(Pt.error||"Request failed");return Pt},Y=async te=>{Ie.current++,et(!0),h("");try{await te()}catch(me){me.stale||h(me.message)}finally{Ie.current--,et(Ie.current>0)}},le=async(te=dt.current)=>{if(!te)return;const me=He.current,ze=await st("/workspaces");Ke(me);const We={};for(const Re of ze.workspaces){if(N.current.has(Re.id))continue;const rt=await Hl(te.user.id,Re.id);rt&&rt.origin===`https://${Re.hostname}`&&rt.gatewayId===Re.gateway_id&&(We[Re.id]=rt)}Ke(me),a(ze.workspaces.filter(Re=>!N.current.has(Re.id))),c(Object.fromEntries(Object.entries(We).filter(([Re])=>!N.current.has(Re)))),I(!0)};A.useEffect(()=>{Y(async()=>{const te=await st("/policy");r(te);try{const me=await st("/auth/session");tt(me),await le(me)}catch{}})},[]);const je=()=>Object.fromEntries(new FormData(Je.current).entries());A.useEffect(()=>{if(!e)return;const te=He.current;let me=!1;return R9(e.user.id).then(ze=>{!me&&te===He.current&&Me(!ze)}).catch(()=>{!me&&te===He.current&&Me(!0)}),()=>{me=!0}},[e?.user.id]),A.useEffect(()=>{if(!e||oe!==!1||!j||G.current===e.user.id)return;G.current=e.user.id;const te=o.find(ze=>l[ze.id]);if(te){f(te.id);return}const me=o.find(ze=>ze.status!=="ready"||!ze.gateway_id);me?(Z(me.id),W(me.name),J(me.status==="bound"?"tunnel":"install")):o.length?f(o[0].id):J("choose")},[e?.user.id,oe,j,o,l]);const De=o.find(te=>te.id===re),qe=A.useRef();qe.current=re;const Et=async(te,me="tunnel")=>{const ze=He.current;Z(te.id),W(te.name),J(me);let We;try{We=await st(`/workspaces/${te.id}/setup`,{})}catch(Re){if(N.current.has(te.id)||se.current===te.id)return;throw Re}Ke(ze),!(qe.current!==te.id||N.current.has(te.id))&&(We.payload&&D({workspace:te,payload:We.payload,expiresAt:We.expiresAt}),await le(),Ke(ze),!(qe.current!==te.id||N.current.has(te.id))&&We.ready&&J("connect"))},Rt=A.useRef();A.useEffect(()=>{if(z!=="tunnel"){Rt.current=void 0;return}if(!e||!De||de||De.status==="bound"||De.status==="ready"||b?.workspace.id===De.id)return;const te=`${He.current}:${De.id}`;Rt.current!==te&&(Rt.current=te,Y(()=>Et(De)))},[z,e?.user.id,De,b,de]);const q=async()=>{if(De){J("install");return}const te=He.current,{workspace:me}=await st("/workspaces",{name:H});Ke(te),a(ze=>[...ze,me]),Z(me.id),W(me.name),J("install")},ve=async te=>{const me=await st(`/workspaces/${te.id}/status`);N.current.has(te.id)||(a(ze=>ze.map(We=>We.id===te.id?{...We,...me.workspace}:We)),me.workspace.status==="ready"&&me.workspace.gateway_id?(C(""),re===te.id&&J("connect")):C("Your host is not online yet. Complete setup-tunnel on your host to connect it to this account. Leave the host running, then check again."))},he=()=>{J("choose"),W(""),Z(void 0),D(void 0),C(""),h("")},Be=te=>{if(!e||ae||!confirm(`Cancel installation of “${te.name}”? Its setup command will stop working and its tunnel will be retired. Files and installed software on your host will remain. You can reuse the workspace name after cleanup finishes.`))return;const me=He.current,ze=e.user.id;se.current=te.id,Ee(te.id),Y(async()=>{await st(`/workspaces/${te.id}`,{},"DELETE"),Ke(me),N.current.add(te.id),qe.current===te.id&&(qe.current=void 0,Z(void 0),W(""),J("choose")),D(We=>We?.workspace.id===te.id?void 0:We),f(We=>We===te.id?void 0:We),we(We=>We===te.id?void 0:We),a(We=>We.filter(Re=>Re.id!==te.id)),c(We=>{const Re={...We};return delete Re[te.id],Re}),await Hl(ze,te.id,null),Ke(me),C("Installation cancelled. Tunnel cleanup retries automatically. Files on your host are unchanged.")}).finally(()=>{me===He.current&&(se.current=void 0,Ee(void 0))})},Le=async te=>{const me=He.current;try{await navigator.clipboard.writeText(te),Ke(me)}catch(ze){throw ze.stale||h("Could not copy the command. Select and copy it from the command box."),ze}},Ce=()=>{e&&Y(async()=>{const te=He.current;await R9(e.user.id,!0),Ke(te),F(!1),f(void 0),Me(!1)})};A.useEffect(()=>{const te=++yt.current,me=o.find(Re=>Re.id===x),ze=x?l[x]:void 0;if(!me||!ze||!e||ze.key!==`${e.user.id}:${me.id}`)return;const We=Re=>{if(!(te!==yt.current||Re.source!==Qe.current?.contentWindow||Re.origin!==ze.origin)){if(Re.data?.type==="ours.workspace.ready"&&typeof Re.data.nonce=="string"&&Re.source?.postMessage({type:"ours.workspace.authorize",token:ze.token,nonce:Re.data.nonce,context:{activeId:me.id,workspaces:o.map(rt=>({id:rt.id,name:rt.name,status:rt.status,linked:!!l[rt.id]}))}},{targetOrigin:ze.origin}),Re.data?.type==="ours.workspace.action"){const rt=Re.data.action;rt==="select"?vt(Re.data.id):rt==="add"?ft():rt==="settings"?(f(void 0),F(!0)):rt==="logout"&&Y(async()=>{await st("/auth/logout",{}),Vt()})}Re.data?.type==="ours.workspace.expired"&&(f(void 0),Hl(e.user.id,me.id,null),c(rt=>{const Pt={...rt};return delete Pt[me.id],Pt}),h("Workspace credential expired or was revoked. Link this device again."))}};return addEventListener("message",We),()=>{yt.current++,removeEventListener("message",We)}},[x,l,e,o]);async function lt(te,me){const ze=He.current,We=await iA();if(Ke(ze),!e||dt.current?.user.id!==e.user.id)throw Error("Sign in first");if(me.length>4096)throw Error("Invalid connection code");let Re;try{Re=JSON.parse(atob(me.replaceAll("-","+").replaceAll("_","/")))}catch{throw Error("Invalid connection code")}const rt=`https://${te.hostname}`;if(Re.version!==1||Re.origin!==rt||!te.gateway_id||Re.workspaceId!==te.gateway_id||!/^[\w-]{43}$/.test(Re.enrollment)||Re.expiresAt<=Date.now())throw Error("Code does not match this ready workspace or has expired");const Pt=await fetch(rt+"/fleet/api/v1/devices/enroll",{method:"POST",credentials:"omit",cache:"no-store",redirect:"error",headers:{"Content-Type":"application/json"},body:JSON.stringify({enrollment:Re.enrollment,workspaceId:Re.workspaceId,label:We})}),on=await Pt.json();if(Ke(ze),!Pt.ok||on.workspaceId!==te.gateway_id||typeof on.token!="string")throw Error("Device enrollment failed");const Nn={token:on.token,origin:rt,gatewayId:Re.workspaceId};await Hl(e.user.id,te.id,Nn),Ke(ze),c(Lt=>({...Lt,[te.id]:{key:`${e.user.id}:${te.id}`,...Nn}})),f(te.id)}const bt=(te,me,ze="text/plain")=>{const We=URL.createObjectURL(new Blob([te],{type:ze})),Re=document.createElement("a");Re.href=We,Re.download=me,Re.click(),setTimeout(()=>URL.revokeObjectURL(We),1e3)};function vt(te){const me=o.find(ze=>ze.id===te);me&&(F(!1),D(void 0),C(""),f(me.id),Z(void 0),J(void 0),me.status!=="ready"&&(f(void 0),Z(me.id),W(me.name),J("install")))}function ft(){f(void 0),F(!1),D(void 0),Z(void 0),W(""),J("choose"),C("")}const ht=o.find(te=>te.id===x),kt=d.jsxs("details",{className:"account-two-step",children:[d.jsx("summary",{children:"Use an authenticator or recovery code"}),d.jsx(Dn,{label:"Authenticator or recovery code (when enabled)",children:d.jsx("input",{name:"totp",autoComplete:"one-time-code"})})]});return d.jsxs("div",{className:`accounts-shell${ht&&l[ht.id]?" account-workspace-open":""}`,children:[!oe&&!(ht&&l[ht.id])&&d.jsxs("header",{className:`account-navigation${e?"":" account-navigation-auth"}`,children:[e&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"fleet-brand",children:"ours"}),d.jsxs("nav",{"aria-label":"Account navigation",children:[d.jsx(HA,{context:{activeId:x||"",workspaces:o.map(te=>({id:te.id,name:te.name,status:te.status,linked:!!l[te.id]}))},select:vt,add:ft,settings:()=>{f(void 0),F(!0)},logout:()=>void Y(async()=>{await st("/auth/logout",{}),Vt()})}),d.jsx(nt,{"aria-current":B?"page":void 0,onClick:()=>{f(void 0),F(!0)},children:"Account Settings"}),d.jsx(nt,{disabled:de,onClick:()=>void Y(async()=>{await st("/auth/logout",{}),Vt()}),children:"Sign out"})]})]}),d.jsx(Ff,{"aria-label":be?"Use light theme":"Use dark theme",title:be?"Use light theme":"Use dark theme",onClick:()=>Ye(te=>!te),children:be?d.jsx(VA,{size:20}):d.jsx(jA,{size:20})})]}),m&&d.jsx("div",{className:"account-feedback account-error",role:"alert",children:m.replaceAll("_"," ")}),E&&d.jsxs("div",{className:"account-feedback account-notice",role:"status",children:[d.jsx(Go,{size:18,"aria-hidden":!0}),d.jsx("span",{children:E})]}),xe&&d.jsx(a1,{onClose:()=>we(void 0),onDecode:te=>{const me=document.querySelector(`textarea[data-workspace="${xe}"]`);me&&(me.value=te),we(void 0)}}),S&&d.jsxs(rs,{title:S==="terms"?"Terms of use":"Privacy notice",description:"Account policies",onClose:()=>k(void 0),className:"account-policy",children:[d.jsx("pre",{children:n?.[S]||"Loading policy…"}),d.jsx(nt,{onClick:()=>k(void 0),children:"Close"})]}),e?oe===void 0?d.jsx("main",{className:"account-loading",children:d.jsx("p",{role:"status",children:"Opening your account…"})}):oe?d.jsx(O7,{preview:!1,finalAction:o.length?"Go to your workspaces":"Set up your workspace",onComplete:Ce}):ht&&l[ht.id]?d.jsx("iframe",{ref:Qe,title:`Workspace ${ht.name}`,src:`${l[ht.id].origin}/fleet?workspace-frame=1&account-origin=${encodeURIComponent(location.origin)}`,allow:"microphone"},ht.id):B?d.jsxs("main",{className:"account-page account-settings",children:[d.jsx("div",{className:"account-page-heading",children:d.jsxs("div",{children:[d.jsx("h1",{children:"Account Settings"}),d.jsx("p",{children:"Manage your account, security and personal data."})]})}),d.jsxs("section",{className:"account-settings-profile","aria-label":"Account information",children:[d.jsxs("div",{className:"account-settings-avatar","aria-hidden":!0,children:[e.user.name.slice(0,1),e.user.surname.slice(0,1)]}),d.jsxs("div",{children:[d.jsxs("h2",{children:[e.user.name," ",e.user.surname]}),d.jsxs("p",{children:["@",e.user.username]}),d.jsx("p",{children:e.user.email})]})]}),d.jsxs("section",{className:"account-panel",children:[d.jsx("div",{className:"account-settings-section-title",children:d.jsx("h2",{children:"Security"})}),d.jsxs("div",{className:"account-settings-section-content",children:[d.jsxs("div",{className:"account-settings-status",children:[d.jsx("span",{children:"Two-step authentication"}),d.jsx("span",{className:`account-badge${e.totpEnabled?" account-badge-ready":""}`,children:e.totpEnabled?"Enabled":"Not enabled"})]}),d.jsxs("p",{className:"account-hint",children:[e.totpEnabled?"Your authenticator adds another layer of account protection.":"Add an authenticator to help protect your account."," Confirm your identity before making changes."]}),d.jsxs("details",{className:"account-security",children:[d.jsx("summary",{children:"Confirm your identity for sensitive changes"}),d.jsx("p",{children:"Sign in again to make sensitive changes. Confirmation lasts five minutes."}),d.jsxs("form",{ref:Je,onSubmit:te=>{te.preventDefault();const me=Object.fromEntries(new FormData(te.currentTarget));Y(async()=>{await st("/auth/reauthenticate",me),C("Fresh authentication completed. Sensitive changes are available for five minutes.")})},children:[d.jsx(Dn,{label:"Password",children:d.jsx("input",{name:"password",type:"password",autoComplete:"current-password"})}),d.jsx(Dn,{label:"Authenticator/recovery code",children:d.jsx("input",{name:"totp",autoComplete:"one-time-code"})}),d.jsx(nt,{primary:!0,type:"submit",disabled:de,children:"Reauthenticate"})]})]}),!e.totpEnabled&&d.jsx(nt,{disabled:de,onClick:()=>void Y(async()=>{const te=await st("/totp/setup",{});R(te.secret)}),children:"Set up authenticator"}),P&&d.jsxs("div",{className:"account-private",children:[d.jsxs("p",{children:["Save this secret in your authenticator: ",d.jsx("code",{children:P})]}),d.jsxs("form",{onSubmit:te=>{te.preventDefault();const me=new FormData(te.currentTarget).get("code");Y(async()=>{const ze=await st("/totp/confirm",{code:me});O(ze.recoveryCodes),R("");const We={...e,totpEnabled:!0};dt.current=We,t(We)})},children:[d.jsx(Dn,{label:"Six-digit code",children:d.jsx("input",{name:"code",required:!0,inputMode:"numeric",autoComplete:"one-time-code"})}),d.jsx(nt,{primary:!0,type:"submit",disabled:de,children:"Confirm"})]})]}),M.length>0&&d.jsxs("div",{className:"account-private",children:[d.jsx("p",{children:"Save these recovery codes privately. Each works once."}),d.jsx("pre",{children:M.join(`
|
|
374
|
+
`)}),d.jsx(nt,{onClick:()=>{bt(M.join(`
|
|
375
|
+
`),"ours-recovery-codes.txt"),O([])},children:"Save recovery codes"})]}),e.totpEnabled&&d.jsxs("form",{onSubmit:te=>{te.preventDefault();const me=new FormData(te.currentTarget).get("code");Y(async()=>{await st("/totp/disable",{code:me}),Vt()})},children:[d.jsx(Dn,{label:"Fresh authenticator/recovery code",children:d.jsx("input",{name:"code",required:!0,autoComplete:"one-time-code"})}),d.jsx(nt,{type:"submit",disabled:de,children:"Disable two-step authentication"})]})]})]}),d.jsxs("section",{className:"account-panel",children:[d.jsx("div",{className:"account-settings-section-title",children:d.jsx("h2",{children:"Privacy & your data"})}),d.jsxs("div",{className:"account-settings-section-content",children:[d.jsx("p",{children:"Download your account information or send a request to the operator."}),d.jsxs("div",{className:"account-actions",children:[d.jsx(nt,{disabled:de,onClick:()=>void Y(async()=>bt(JSON.stringify(await st("/privacy/export"),null,2),"ours-account-export.json","application/json")),children:"Export my data"}),d.jsx(nt,{onClick:()=>k("privacy"),children:"Privacy notice"})]}),d.jsxs("form",{onSubmit:te=>{te.preventDefault();const me=new FormData(te.currentTarget).get("kind");Y(async()=>{await st("/privacy/requests",{kind:me}),C("Privacy request recorded.")})},children:[d.jsx(Dn,{label:"Privacy request",children:d.jsxs("select",{name:"kind",children:[d.jsx("option",{value:"correct",children:"Correct data"}),d.jsx("option",{value:"restrict",children:"Restrict processing"}),d.jsx("option",{value:"object",children:"Object to processing"})]})}),d.jsx(nt,{type:"submit",disabled:de,children:"Record request"})]})]})]}),d.jsxs("section",{className:"account-panel",children:[d.jsx("div",{className:"account-settings-section-title",children:d.jsx("h2",{children:"Getting started"})}),d.jsxs("div",{className:"account-settings-section-content",children:[d.jsx("p",{children:"Revisit the introduction to your agents, invitations and task rooms."}),d.jsxs(nt,{onClick:()=>{f(void 0),F(!1),Me(!0)},children:[d.jsx(cd,{size:18,"aria-hidden":!0}),"View introduction"]})]})]}),d.jsxs("section",{className:"account-panel account-danger",children:[d.jsx("div",{className:"account-settings-section-title",children:d.jsx("h2",{children:"Delete account"})}),d.jsxs("div",{className:"account-settings-section-content",children:[d.jsx("p",{children:"This retires your workspace tunnels. Self-hosted data stays on your equipment."}),d.jsx(nt,{className:"danger",disabled:de,onClick:()=>{confirm("Delete your account and retire its tunnels? Self-hosted data remains on your equipment.")&&Y(async()=>{await st("/account",{},"DELETE");const te=e.user.id;Vt(),await YA(te),C("Account data deleted. Tunnel retirement retries automatically.")})},children:"Delete my account"})]})]}),e.admin&&d.jsxs("section",{className:"account-panel",children:[d.jsx("div",{className:"account-settings-section-title",children:d.jsx("h2",{children:"Hosting requests"})}),d.jsxs("div",{className:"account-settings-section-content",children:[d.jsx(nt,{disabled:de,onClick:()=>void Y(async()=>V((await st("/admin/hosting-requests")).requests)),children:"Admin: hosting requests"}),d.jsx("pre",{children:JSON.stringify(T,null,2)})]})]})]}):d.jsxs("main",{className:"account-page",children:[z?d.jsx(I7,{step:z,user:e.user,workspace:De,name:H,onName:W,busy:de,payload:b?.workspace.id===re?b:void 0,hostingRequested:K,onChoose:J,onBack:()=>{h(""),C(""),J(z==="install"||z==="prepare"?"name":z==="tunnel"?"install":z==="connect"?"tunnel":"choose")},onCreate:()=>void Y(q),onPrepare:()=>{De&&Y(()=>Et(De))},onCheck:()=>{De&&Y(()=>ve(De))},onHosting:()=>void Y(async()=>{await st("/hosting-requests",{}),ie(!0)}),onIntroduction:()=>Me(!0),onCopy:Le,cancelling:!!ae,onCancel:De?()=>Be(De):void 0}):d.jsxs("div",{className:"account-page-heading",children:[d.jsxs("div",{children:[d.jsxs("p",{className:"account-eyebrow",children:["Welcome, ",e.user.name]}),d.jsx("h1",{children:"Your workspaces"}),d.jsx("p",{children:"Your agents and tasks, wherever you work."})]}),d.jsxs("div",{className:"account-actions",children:[d.jsxs(nt,{primary:!0,disabled:de,onClick:he,children:[d.jsx(Df,{size:18,"aria-hidden":!0}),"Add workspace"]}),d.jsxs(nt,{onClick:()=>Me(!0),children:[d.jsx(cd,{size:18,"aria-hidden":!0}),"View introduction"]})]})]}),d.jsx("div",{className:"account-workspace-list",children:(z?z==="connect"?o.filter(te=>te.id===re):[]:o.filter(te=>!x||te.id===x)).map(te=>d.jsxs("section",{className:"account-panel account-workspace-card",children:[d.jsxs("div",{className:"account-card-heading",children:[d.jsxs("div",{children:[d.jsx("h2",{children:te.name}),d.jsx("p",{className:"account-hostname",children:te.hostname})]}),d.jsx("span",{className:`account-badge${te.status==="ready"?" account-badge-ready":""}`,children:te.status})]}),d.jsxs("p",{className:"account-device-state",children:[d.jsx(s1,{size:17,"aria-hidden":!0}),l[te.id]?"linked on this browser":"not authenticated on this browser"]}),te.status!=="ready"||!te.gateway_id?d.jsxs("div",{className:"account-pending-installation",children:[d.jsx("p",{children:"Finish setting up this host before connecting a browser."}),d.jsxs(nt,{primary:!0,disabled:de,onClick:()=>{Z(te.id),W(te.name),J("install"),C("")},children:["Continue installation",d.jsx(Ar,{size:17,"aria-hidden":!0})]})]}):l[te.id]?d.jsxs(nt,{primary:!0,onClick:()=>f(te.id),children:["Open workspace",d.jsx(Ar,{size:17,"aria-hidden":!0})]}):d.jsxs("div",{className:"account-link-device",children:[d.jsx("p",{children:z==="connect"?"Use the QR or connection code from the installation terminal.":d.jsxs(d.Fragment,{children:["On this running host, use ",d.jsx("code",{children:"ours-fleet link-device"}),", or choose Link a device in a connected browser. Then scan or paste the connection code here."]})}),d.jsxs("form",{onSubmit:me=>{me.preventDefault();const ze=new FormData(me.currentTarget);Y(async()=>lt(te,String(ze.get("code"))))},children:[d.jsx(Dn,{label:"Connection code",children:d.jsx("textarea",{name:"code","data-workspace":te.id,required:!0,autoComplete:"off",spellCheck:!1})}),d.jsxs("div",{className:"account-actions",children:[d.jsx(nt,{onClick:()=>we(te.id),children:"Scan QR with camera"}),d.jsxs("label",{className:"account-file-picker",children:["Scan QR image",d.jsx("input",{type:"file",accept:"image/*",onChange:me=>{const ze=me.currentTarget.files?.[0],We=me.currentTarget.form;!ze||!We||Y(async()=>{const Re=await createImageBitmap(ze);if(Re.width*Re.height>16e6)throw Re.close(),Error("QR image too large");const rt=document.createElement("canvas");rt.width=Re.width,rt.height=Re.height;const Pt=rt.getContext("2d");Pt.drawImage(Re,0,0),Re.close();const on=Pt.getImageData(0,0,rt.width,rt.height),Nn=c1(on.data,on.width,on.height);if(!Nn)throw Error("No QR code found");We.elements.namedItem("code").value=Nn.data})}})]})]}),d.jsx(nt,{primary:!0,type:"submit",disabled:de,children:"Link this device"})]})]}),d.jsxs("div",{className:"account-actions account-card-footer",children:[d.jsx(nt,{disabled:de,onClick:()=>void Y(()=>ve(te)),children:"Check setup status"}),te.status!=="ready"&&d.jsx(nt,{className:"danger",disabled:!!ae,onClick:()=>Be(te),children:"Cancel installation"})]})]},te.id))})]}):d.jsxs("main",{className:"fleet-account fleet-form-page account-auth",children:[d.jsx("h2",{className:"fleet-brand",children:"ours"}),d.jsxs("div",{className:"account-auth-card",children:[d.jsxs("div",{className:"account-auth-heading",children:[d.jsx("h1",{children:y?"Create your account":"Sign in"}),d.jsx("p",{children:y?"One account for your agents and workspaces.":"Welcome back. Your workspace is waiting."})]}),d.jsxs("form",{ref:Je,"aria-busy":de,onSubmit:te=>{te.preventDefault(),Y(async()=>{const me=je(),ze=await st(y?"/auth/register":"/auth/login",{...me,acceptTerms:me.acceptTerms==="on",acknowledgePrivacy:me.acknowledgePrivacy==="on",policyVersion:n?.version});tt(ze),await le(ze)})},children:[y?d.jsxs(d.Fragment,{children:[d.jsx(Dn,{label:"Username",children:d.jsx("input",{name:"username",pattern:"[a-z0-9][a-z0-9-]{0,28}[a-z0-9]",minLength:2,maxLength:30,required:!0,autoComplete:"username",autoCapitalize:"none",spellCheck:!1})}),d.jsx("p",{className:"account-hint",children:"2–30 lowercase letters, numbers or hyphens."}),d.jsxs("div",{className:"account-field-pair",children:[d.jsx(Dn,{label:"Name",children:d.jsx("input",{name:"name",required:!0,maxLength:120,autoComplete:"given-name"})}),d.jsx(Dn,{label:"Surname",children:d.jsx("input",{name:"surname",required:!0,maxLength:120,autoComplete:"family-name"})})]}),d.jsx(Dn,{label:"Email",children:d.jsx("input",{name:"email",type:"email",required:!0,autoComplete:"email",autoCapitalize:"none"})})]}):d.jsx(Dn,{label:"Username or email",children:d.jsx("input",{name:"identifier",required:!0,autoComplete:"username",autoCapitalize:"none",spellCheck:!1})}),d.jsx(Dn,{label:"Password",children:d.jsx("input",{name:"password",type:"password",minLength:y?12:void 0,required:!0,autoComplete:y?"new-password":"current-password"})}),y&&d.jsx("p",{className:"account-hint",children:"Use at least 12 characters."}),!y&&kt,y&&d.jsxs("div",{className:"account-consent",children:[d.jsxs("label",{className:"fleet-check",children:[d.jsx("input",{type:"checkbox",name:"acceptTerms",required:!0}),d.jsxs("span",{children:["I accept the ",d.jsx(Hs,{onClick:()=>k("terms"),children:"Terms of use"}),"."]})]}),d.jsxs("label",{className:"fleet-check",children:[d.jsx("input",{type:"checkbox",name:"acknowledgePrivacy",required:!0}),d.jsxs("span",{children:["I have read the ",d.jsx(Hs,{onClick:()=>k("privacy"),children:"Privacy notice"}),"."]})]})]}),y&&n?.registrationAvailable===!1&&d.jsx("p",{className:"account-unavailable",role:"status",children:"New account registration is temporarily unavailable. Please try again once the operator has completed the privacy notice."}),d.jsxs(nt,{primary:!0,type:"submit",disabled:de||y&&n?.registrationAvailable!==!0,children:[de?"Please wait…":y?"Register":"Sign in",!de&&d.jsx(Ar,{size:17,"aria-hidden":!0})]})]}),d.jsxs("div",{className:"account-auth-switch",children:[d.jsx("span",{children:y?"Already a member?":"New to ours?"}),d.jsx(Hs,{onClick:()=>{w(te=>!te),h("")},children:y?"Already have an account":"Create an account"})]})]}),d.jsx("p",{className:"account-auth-footer",children:"Your agents. Your rooms. Your network."}),d.jsxs("div",{className:"account-policy-links",children:[d.jsx(Hs,{onClick:()=>k("terms"),children:"Terms of use"}),d.jsx(Hs,{onClick:()=>k("privacy"),children:"Privacy notice"})]})]})]})}let Gs="",cC;const qI=()=>cC,uC=window.parent!==window&&new URLSearchParams(location.search).get("workspace-frame")==="1",Pc=new URLSearchParams(location.search).get("account-origin")??"https://app.ours.network";function KI(e,t){If()&&["https://app.ours.network","https://app.ours-tunnel.com"].includes(Pc)&&parent.postMessage({type:"ours.workspace.action",action:e,id:t},Pc)}const If=()=>uC;function XI(e){if(!uC)return e;const t=new URL(e,location.href);if(t.origin!==location.origin)throw Error("Workspace navigation must remain on this origin");return t.searchParams.set("workspace-frame","1"),t.searchParams.set("account-origin",Pc),t.pathname+t.search+t.hash}async function V7(){if(!If())return;const e=Pc;if(!["https://app.ours.network","https://app.ours-tunnel.com"].includes(e))throw Error("Unsupported account launcher origin");const t=crypto.randomUUID();await new Promise((r,o)=>{const a=setTimeout(()=>{removeEventListener("message",l),o(Error("Open this workspace from your account launcher."))},15e3),l=c=>{c.source!==parent||c.origin!==e||c.data?.type!=="ours.workspace.authorize"||c.data.nonce!==t||typeof c.data.token!="string"||(cC=c.data.context,Gs=c.data.token,clearTimeout(a),removeEventListener("message",l),r())};addEventListener("message",l),parent.postMessage({type:"ours.workspace.ready",nonce:t},e)});const n=window.fetch.bind(window);window.fetch=async(r,o)=>{const a=new URL(r instanceof Request?r.url:String(r),location.href),l=new Headers(o?.headers??(r instanceof Request?r.headers:void 0)),c=a.origin===location.origin&&/^\/(fleet\/api|messenger|notifications|cowork|daemon)(\/|$)/.test(a.pathname);c&&l.set("Authorization",`Bearer ${Gs}`);const x=await n(r,{...o,headers:l,cache:"no-store",credentials:"omit"});return c&&x.status===401&&(Gs="",navigator.serviceWorker?.controller?.postMessage({type:"ours.workspace.credential",token:""}),parent.postMessage({type:"ours.workspace.expired"},e),dispatchEvent(new Event("fleet-session-expired"))),x},"serviceWorker"in navigator&&(await navigator.serviceWorker.register("/sw.js",{scope:"/"}),await navigator.serviceWorker.ready,navigator.serviceWorker.controller||await new Promise((r,o)=>{const a=setTimeout(()=>{navigator.serviceWorker.removeEventListener("controllerchange",l),o(Error("Workspace media service did not start. Reload the workspace."))},1e4),l=()=>{clearTimeout(a),r()};navigator.serviceWorker.addEventListener("controllerchange",l,{once:!0})}),await new Promise((r,o)=>{const a=new MessageChannel,l=setTimeout(()=>{a.port1.close(),o(Error("Workspace media authentication did not start. Reload the workspace."))},1e4);a.port1.onmessage=()=>{clearTimeout(l),a.port1.close(),r()},navigator.serviceWorker.controller.postMessage({type:"ours.workspace.credential",token:Gs},[a.port2])})),addEventListener("pagehide",()=>{Gs="",navigator.serviceWorker.controller?.postMessage({type:"ours.workspace.credential",token:""})})}function YI(e,t){if(!If()){const r=new EventSource(e);return r.onmessage=t,r.addEventListener("sync_required",t),()=>r.close()}const n=new AbortController;return(async()=>{for(;!n.signal.aborted;){try{const r=await fetch(e,{signal:n.signal});if(!r.ok||!r.body)break;const o=r.body.getReader(),a=new TextDecoder;let l="";for(;!n.signal.aborted;){const{value:c,done:x}=await o.read();if(x)break;l+=a.decode(c,{stream:!0}),l=l.replace(/\r\n/g,`
|
|
376
|
+
`);let f;for(;(f=l.indexOf(`
|
|
377
|
+
|
|
378
|
+
`))>=0;){const m=l.slice(0,f);l=l.slice(f+2),m.includes("data:")&&t()}}}catch{if(n.signal.aborted)break}await new Promise(r=>setTimeout(r,1e3))}})(),()=>n.abort()}var Jl={},J9;function U7(){if(J9)return Jl;J9=1;var e=v1();return Jl.createRoot=e.createRoot,Jl.hydrateRoot=e.hydrateRoot,Jl}var $7=U7();const Lf=A.createContext({});function Pa(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const W7=typeof window<"u",Of=W7?A.useLayoutEffect:A.useEffect,cu=A.createContext(null);function zf(e,t){e.indexOf(t)===-1&&e.push(t)}function Ko(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const kr=(e,t,n)=>n>t?t:n<e?e:n;let uu=()=>{};const gi={},xC=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),dC=e=>typeof e=="object"&&e!==null,fC=e=>/^0[^.\s]+$/u.test(e);function hC(e){let t;return()=>(t===void 0&&(t=e()),t)}const qn=e=>e,_a=(...e)=>e.reduce((t,n)=>r=>n(t(r))),Xo=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Vf{constructor(){this.subscriptions=[]}add(t){return zf(this.subscriptions,t),()=>Ko(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let a=0;a<o;a++){const l=this.subscriptions[a];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Fn=e=>e*1e3,Gn=e=>e/1e3,mC=(e,t)=>t?e*(1e3/t):0,H7=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},pC=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,G7=1e-7,q7=12;function K7(e,t,n,r,o){let a,l,c=0;do l=t+(n-t)/2,a=pC(l,r,o)-e,a>0?n=l:t=l;while(Math.abs(a)>G7&&++c<q7);return l}function ja(e,t,n,r){if(e===t&&n===r)return qn;const o=a=>K7(a,0,1,e,n);return a=>a===0||a===1?a:pC(o(a),t,r)}const EC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Uf=e=>t=>1-e(1-t),gC=ja(.33,1.53,.69,.99),$f=Uf(gC),CC=EC($f),yC=e=>e>=1?1:(e*=2)<1?.5*$f(e):.5*(2-Math.pow(2,-10*(e-1))),Wf=e=>1-Math.sin(Math.acos(e)),vC=Uf(Wf),AC=EC(Wf),X7=ja(.42,0,1,1),Y7=ja(0,0,.58,1),BC=ja(.42,0,.58,1),wC=e=>Array.isArray(e)&&typeof e[0]!="number";function DC(e,t){return wC(e)?e[H7(0,e.length,t)]:e}const kC=e=>Array.isArray(e)&&typeof e[0]=="number",Q7={linear:qn,easeIn:X7,easeInOut:BC,easeOut:Y7,circIn:Wf,circInOut:AC,circOut:vC,backIn:$f,backInOut:CC,backOut:gC,anticipate:yC},J7=e=>typeof e=="string",Z9=e=>{if(kC(e)){uu(e.length===4);const[t,n,r,o]=e;return ja(t,n,r,o)}else if(J7(e))return Q7[e];return e},Zl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Z7(e){let t=new Set,n=new Set,r=!1,o=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function c(f){a.has(f)&&(x.schedule(f),e()),f(l)}const x={schedule:(f,m=!1,h=!1)=>{const C=h&&r?t:n;return m&&a.add(f),C.add(f),f},cancel:f=>{n.delete(f),a.delete(f)},process:f=>{if(l=f,r){o=!0;return}r=!0;const m=t;t=n,n=m,t.forEach(c),t.clear(),r=!1,o&&(o=!1,x.process(f))}};return x}const e4=40;function FC(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,l=Zl.reduce((D,S)=>(D[S]=Z7(a),D),{}),{setup:c,read:x,resolveKeyframes:f,preUpdate:m,update:h,preRender:E,render:C,postRender:y}=l,w=()=>{const D=gi.useManualTiming,S=D?o.timestamp:performance.now();n=!1,D||(o.delta=r?1e3/60:Math.max(Math.min(S-o.timestamp,e4),1)),o.timestamp=S,o.isProcessing=!0,c.process(o),x.process(o),f.process(o),m.process(o),h.process(o),E.process(o),C.process(o),y.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(w))},B=()=>{n=!0,r=!0,o.isProcessing||e(w)};return{schedule:Zl.reduce((D,S)=>{const k=l[S];return D[S]=(P,R=!1,M=!1)=>(n||B(),k.schedule(P,R,M)),D},{}),cancel:D=>{for(let S=0;S<Zl.length;S++)l[Zl[S]].cancel(D)},state:o,steps:l}}const{schedule:Bt,cancel:Ci,state:rn,steps:gx}=FC(typeof requestAnimationFrame<"u"?requestAnimationFrame:qn,!0);let mc;function t4(){mc=void 0}const En={now:()=>(mc===void 0&&En.set(rn.isProcessing||gi.useManualTiming?rn.timestamp:performance.now()),mc),set:e=>{mc=e,queueMicrotask(t4)}},SC=e=>t=>typeof t=="string"&&t.startsWith(e),bC=SC("--"),n4=SC("var(--"),Hf=e=>n4(e)?r4.test(e.split("/*")[0].trim()):!1,r4=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function eE(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const is={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ga={...is,transform:e=>kr(0,1,e)},ec={...is,default:1},oa=e=>Math.round(e*1e5)/1e5,Gf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function i4(e){return e==null}const o4=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,qf=(e,t)=>n=>!!(typeof n=="string"&&o4.test(n)&&n.startsWith(e)||t&&!i4(n)&&Object.prototype.hasOwnProperty.call(n,t)),PC=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,a,l,c]=r.match(Gf);return{[e]:parseFloat(o),[t]:parseFloat(a),[n]:parseFloat(l),alpha:c!==void 0?parseFloat(c):1}},s4=e=>kr(0,255,e),Cx={...is,transform:e=>Math.round(s4(e))},qi={test:qf("rgb","red"),parse:PC("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Cx.transform(e)+", "+Cx.transform(t)+", "+Cx.transform(n)+", "+oa(ga.transform(r))+")"};function a4(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Bd={test:qf("#"),parse:a4,transform:qi.transform},Ta=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Or=Ta("deg"),Dr=Ta("%"),_e=Ta("px"),l4=Ta("vh"),c4=Ta("vw"),tE={...Dr,parse:e=>Dr.parse(e)/100,transform:e=>Dr.transform(e*100)},zo={test:qf("hsl","hue"),parse:PC("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Dr.transform(oa(t))+", "+Dr.transform(oa(n))+", "+oa(ga.transform(r))+")"},qt={test:e=>qi.test(e)||Bd.test(e)||zo.test(e),parse:e=>qi.test(e)?qi.parse(e):zo.test(e)?zo.parse(e):Bd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?qi.transform(e):zo.transform(e),getAnimatableNone:e=>{const t=qt.parse(e);return t.alpha=0,qt.transform(t)}},u4=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function x4(e){return isNaN(e)&&typeof e=="string"&&(e.match(Gf)?.length||0)+(e.match(u4)?.length||0)>0}const _C="number",jC="color",d4="var",f4="var(",nE="${}",h4=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Yo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let a=0;const c=t.replace(h4,x=>(qt.test(x)?(r.color.push(a),o.push(jC),n.push(qt.parse(x))):x.startsWith(f4)?(r.var.push(a),o.push(d4),n.push(x)):(r.number.push(a),o.push(_C),n.push(parseFloat(x))),++a,nE)).split(nE);return{values:n,split:c,indexes:r,types:o}}function m4(e){return Yo(e).values}function TC({split:e,types:t}){const n=e.length;return r=>{let o="";for(let a=0;a<n;a++)if(o+=e[a],r[a]!==void 0){const l=t[a];l===_C?o+=oa(r[a]):l===jC?o+=qt.transform(r[a]):o+=r[a]}return o}}function p4(e){return TC(Yo(e))}const E4=e=>typeof e=="number"?0:qt.test(e)?qt.getAnimatableNone(e):e,g4=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:E4(e);function C4(e){const t=Yo(e);return TC(t)(t.values.map((r,o)=>g4(r,t.split[o])))}const ar={test:x4,parse:m4,createTransformer:p4,getAnimatableNone:C4};function yx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function y4({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,a=0,l=0;if(!t)o=a=l=n;else{const c=n<.5?n*(1+t):n+t-n*t,x=2*n-c;o=yx(x,c,e+1/3),a=yx(x,c,e),l=yx(x,c,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(l*255),alpha:r}}function _c(e,t){return n=>n>0?t:e}const Ct=(e,t,n)=>e+(t-e)*n,vx=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},v4=[Bd,qi,zo],A4=e=>v4.find(t=>t.test(e));function rE(e){const t=A4(e);if(!t)return!1;let n=t.parse(e);return t===zo&&(n=y4(n)),n}const iE=(e,t)=>{const n=rE(e),r=rE(t);if(!n||!r)return _c(e,t);const o={...n};return a=>(o.red=vx(n.red,r.red,a),o.green=vx(n.green,r.green,a),o.blue=vx(n.blue,r.blue,a),o.alpha=Ct(n.alpha,r.alpha,a),qi.transform(o))},wd=new Set(["none","hidden"]);function B4(e,t){return wd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function w4(e,t){return n=>Ct(e,t,n)}function Kf(e){return typeof e=="number"?w4:typeof e=="string"?Hf(e)?_c:qt.test(e)?iE:F4:Array.isArray(e)?RC:typeof e=="object"?qt.test(e)?iE:D4:_c}function RC(e,t){const n=[...e],r=n.length,o=e.map((a,l)=>Kf(a)(a,t[l]));return a=>{for(let l=0;l<r;l++)n[l]=o[l](a);return n}}function D4(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Kf(e[o])(e[o],t[o]));return o=>{for(const a in r)n[a]=r[a](o);return n}}function k4(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],l=e.indexes[a][r[a]],c=e.values[l]??0;n[o]=c,r[a]++}return n}const F4=(e,t)=>{const n=ar.createTransformer(t),r=Yo(e),o=Yo(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?wd.has(e)&&!o.values.length||wd.has(t)&&!r.values.length?B4(e,t):_a(RC(k4(r,o),o.values),n):_c(e,t)};function NC(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ct(e,t,n):Kf(e)(e,t)}const S4=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Bt.update(t,n),stop:()=>Ci(t),now:()=>rn.isProcessing?rn.timestamp:En.now()}},MC=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let a=0;a<o;a++)r+=Math.round(e(a/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},jc=2e4;function Xf(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<jc;)t+=n,r=e.next(t);return t>=jc?1/0:t}function IC(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Xf(r),jc);return{type:"keyframes",ease:a=>r.next(o*a).value/t,duration:Gn(o)}}const It={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Dd(e,t){return e*Math.sqrt(1-t*t)}const b4=12;function P4(e,t,n){let r=n;for(let o=1;o<b4;o++)r=r-e(r)/t(r);return r}const Ax=.001;function _4({duration:e=It.duration,bounce:t=It.bounce,velocity:n=It.velocity,mass:r=It.mass}){let o,a,l=1-t;l=kr(It.minDamping,It.maxDamping,l),e=kr(It.minDuration,It.maxDuration,Gn(e)),l<1?(o=f=>{const m=f*l,h=m*e,E=m-n,C=Dd(f,l),y=Math.exp(-h);return Ax-E/C*y},a=f=>{const h=f*l*e,E=h*n+n,C=Math.pow(l,2)*Math.pow(f,2)*e,y=Math.exp(-h),w=Dd(Math.pow(f,2),l);return(-o(f)+Ax>0?-1:1)*((E-C)*y)/w}):(o=f=>{const m=Math.exp(-f*e),h=(f-n)*e+1;return-Ax+m*h},a=f=>{const m=Math.exp(-f*e),h=(n-f)*(e*e);return m*h});const c=5/e,x=P4(o,a,c);if(e=Fn(e),isNaN(x))return{stiffness:It.stiffness,damping:It.damping,duration:e};{const f=Math.pow(x,2)*r;return{stiffness:f,damping:l*2*Math.sqrt(r*f),duration:e}}}const j4=["duration","bounce"],T4=["stiffness","damping","mass"];function oE(e,t){return t.some(n=>e[n]!==void 0)}function R4(e){let t={velocity:It.velocity,stiffness:It.stiffness,damping:It.damping,mass:It.mass,isResolvedFromDuration:!1,...e};if(!oE(e,T4)&&oE(e,j4))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,a=2*kr(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:It.mass,stiffness:o,damping:a}}else{const n=_4({...e,velocity:0});t={...t,...n,mass:It.mass},t.isResolvedFromDuration=!0}return t}function Ca(e=It.visualDuration,t=It.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const a=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],c={done:!1,value:a},{stiffness:x,damping:f,mass:m,duration:h,velocity:E,isResolvedFromDuration:C}=R4({...n,velocity:-Gn(n.velocity||0)}),y=E||0,w=f/(2*Math.sqrt(x*m)),B=l-a,F=Gn(Math.sqrt(x/m)),b=Math.abs(B)<5;r||(r=b?It.restSpeed.granular:It.restSpeed.default),o||(o=b?It.restDelta.granular:It.restDelta.default);let D,S,k,P,R,M;if(w<1)k=Dd(F,w),P=(y+w*F*B)/k,D=T=>{const V=Math.exp(-w*F*T);return l-V*(P*Math.sin(k*T)+B*Math.cos(k*T))},R=w*F*P+B*k,M=w*F*B-P*k,S=T=>Math.exp(-w*F*T)*(R*Math.sin(k*T)+M*Math.cos(k*T));else if(w===1){D=V=>l-Math.exp(-F*V)*(B+(y+F*B)*V);const T=y+F*B;S=V=>Math.exp(-F*V)*(F*T*V-y)}else{const T=F*Math.sqrt(w*w-1);D=H=>{const W=Math.exp(-w*F*H),re=Math.min(T*H,300);return l-W*((y+w*F*B)*Math.sinh(re)+T*B*Math.cosh(re))/T};const V=(y+w*F*B)/T,z=w*F*V-B*T,J=w*F*B-V*T;S=H=>{const W=Math.exp(-w*F*H),re=Math.min(T*H,300);return W*(z*Math.sinh(re)+J*Math.cosh(re))}}const O={calculatedDuration:C&&h||null,velocity:T=>Fn(S(T)),next:T=>{if(!C&&w<1){const z=Math.exp(-w*F*T),J=Math.sin(k*T),H=Math.cos(k*T),W=l-z*(P*J+B*H),re=Fn(z*(R*J+M*H));return c.done=Math.abs(re)<=r&&Math.abs(l-W)<=o,c.value=c.done?l:W,c}const V=D(T);if(C)c.done=T>=h;else{const z=Fn(S(T));c.done=Math.abs(z)<=r&&Math.abs(l-V)<=o}return c.value=c.done?l:V,c},toString:()=>{const T=Math.min(Xf(O),jc),V=MC(z=>O.next(T*z).value,T,30);return T+"ms "+V},toTransition:()=>{}};return O}Ca.applyToOptions=e=>{const t=IC(e,100,Ca);return e.ease=t.ease,e.duration=Fn(t.duration),e.type="keyframes",e};const N4=5;function LC(e,t,n){const r=Math.max(t-N4,0);return mC(n-e(r),t-r)}function kd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:l,min:c,max:x,restDelta:f=.5,restSpeed:m}){const h=e[0],E={done:!1,value:h},C=M=>c!==void 0&&M<c||x!==void 0&&M>x,y=M=>c===void 0?x:x===void 0||Math.abs(c-M)<Math.abs(x-M)?c:x;let w=n*t;const B=h+w,F=l===void 0?B:l(B);F!==B&&(w=F-h);const b=M=>-w*Math.exp(-M/r),D=M=>F+b(M),S=M=>{const O=b(M),T=D(M);E.done=Math.abs(O)<=f,E.value=E.done?F:T};let k,P;const R=M=>{C(E.value)&&(k=M,P=Ca({keyframes:[E.value,y(E.value)],velocity:LC(D,M,E.value),damping:o,stiffness:a,restDelta:f,restSpeed:m}))};return R(0),{calculatedDuration:null,next:M=>{let O=!1;return!P&&k===void 0&&(O=!0,S(M),R(M)),k!==void 0&&M>=k?P.next(M-k):(!O&&S(M),E)}}}function M4(e,t,n){const r=[],o=n||gi.mix||NC,a=e.length-1;for(let l=0;l<a;l++){let c=o(e[l],e[l+1]);if(t){const x=Array.isArray(t)?t[l]||qn:t;c=_a(x,c)}r.push(c)}return r}function I4(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const a=e.length;if(uu(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=M4(t,r,o),x=c.length,f=m=>{if(l&&m<e[0])return t[0];let h=0;if(x>1)for(;h<e.length-2&&!(m<e[h+1]);h++);const E=Xo(e[h],e[h+1],m);return c[h](E)};return n?m=>f(kr(e[0],e[a-1],m)):f}function OC(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Xo(0,t,r);e.push(Ct(n,1,o))}}function zC(e){const t=[0];return OC(t,e.length-1),t}function L4(e,t){return e.map(n=>n*t)}function O4(e,t){return e.map(()=>t||BC).splice(0,e.length-1)}function sa({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=wC(r)?r.map(Z9):Z9(r),a={done:!1,value:t[0]},l=L4(n&&n.length===t.length?n:zC(t),e),c=I4(l,t,{ease:Array.isArray(o)?o:O4(t,o)});return{calculatedDuration:e,next:x=>(a.value=c(x),a.done=x>=e,a)}}const z4=e=>e!==null;function xu(e,{repeat:t,repeatType:n="loop"},r,o=1){const a=e.filter(z4),c=o<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!c||r===void 0?a[c]:r}const V4={decay:kd,inertia:kd,tween:sa,keyframes:sa,spring:Ca};function VC(e){typeof e.type=="string"&&(e.type=V4[e.type])}class Yf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const U4=e=>e/100;class Tc extends Yf{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==En.now()&&this.tick(En.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;VC(t);const{type:n=sa,repeat:r=0,repeatDelay:o=0,repeatType:a,velocity:l=0}=t;let{keyframes:c}=t;const x=n||sa;x!==sa&&typeof c[0]!="number"&&(this.mixKeyframes=_a(U4,NC(c[0],c[1])),c=[0,100]);const f=x({...t,keyframes:c});a==="mirror"&&(this.mirroredGenerator=x({...t,keyframes:[...c].reverse(),velocity:-l})),f.calculatedDuration===null&&(f.calculatedDuration=Xf(f));const{calculatedDuration:m}=f;this.calculatedDuration=m,this.resolvedDuration=m+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:a,mirroredGenerator:l,resolvedDuration:c,calculatedDuration:x}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:m,repeat:h,repeatType:E,repeatDelay:C,type:y,onUpdate:w,finalKeyframe:B}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const F=this.currentTime-f*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?F<0:F>o;this.currentTime=Math.max(F,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let D=this.currentTime,S=r;if(h){const M=Math.min(this.currentTime,o)/c;let O=Math.floor(M),T=M%1;!T&&M>=1&&(T=1),T===1&&O--,O=Math.min(O,h+1),!!(O%2)&&(E==="reverse"?(T=1-T,C&&(T-=C/c)):E==="mirror"&&(S=l)),D=kr(0,1,T)*c}let k;b?(this.delayState.value=m[0],k=this.delayState):k=S.next(D),a&&!b&&(k.value=a(k.value));let{done:P}=k;!b&&x!==null&&(P=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return R&&y!==kd&&(k.value=xu(m,this.options,B,this.speed)),w&&w(k.value),R&&this.finish(),k}then(t,n){return this.finished.then(t,n)}get duration(){return Gn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Gn(t)}get time(){return Gn(this.currentTime)}set time(t){t=Fn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return LC(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(En.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Gn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=S4,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(En.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function $4(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ki=e=>e*180/Math.PI,Fd=e=>{const t=Ki(Math.atan2(e[1],e[0]));return Sd(t)},W4={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Fd,rotateZ:Fd,skewX:e=>Ki(Math.atan(e[1])),skewY:e=>Ki(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Sd=e=>(e=e%360,e<0&&(e+=360),e),sE=Fd,aE=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),lE=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),H4={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:aE,scaleY:lE,scale:e=>(aE(e)+lE(e))/2,rotateX:e=>Sd(Ki(Math.atan2(e[6],e[5]))),rotateY:e=>Sd(Ki(Math.atan2(-e[2],e[0]))),rotateZ:sE,rotate:sE,skewX:e=>Ki(Math.atan(e[4])),skewY:e=>Ki(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function bd(e){return e.includes("scale")?1:0}function Pd(e,t){if(!e||e==="none")return bd(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=H4,o=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=W4,o=c}if(!o)return bd(t);const a=r[t],l=o[1].split(",").map(q4);return typeof a=="function"?a(l):l[a]}const G4=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Pd(n,t)};function q4(e){return parseFloat(e.trim())}const os=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ss=new Set([...os,"pathRotation"]),cE=e=>e===is||e===_e,K4=new Set(["x","y","z"]),X4=os.filter(e=>!K4.has(e));function Y4(e){const t=[];return X4.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const hi={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const o=e.max-e.min;return r==="border-box"?o:o-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const o=e.max-e.min;return r==="border-box"?o:o-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Pd(t,"x"),y:(e,{transform:t})=>Pd(t,"y")};hi.translateX=hi.x;hi.translateY=hi.y;const Yi=new Set;let _d=!1,jd=!1,Td=!1;function UC(){if(jd){const e=Array.from(Yi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Y4(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([a,l])=>{r.getValue(a)?.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}jd=!1,_d=!1,Yi.forEach(e=>e.complete(Td)),Yi.clear()}function $C(){Yi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(jd=!0)})}function Q4(){Td=!0,$C(),UC(),Td=!1}class Qf{constructor(t,n,r,o,a,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=a,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(Yi.add(this),_d||(_d=!0,Bt.read($C),Bt.resolveKeyframes(UC))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const a=o?.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),o&&a===void 0&&o.set(t[0])}$4(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Yi.delete(this)}cancel(){this.state==="scheduled"&&(Yi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const J4=e=>e.startsWith("--");function WC(e,t,n){J4(t)?e.style.setProperty(t,n):e.style[t]=n}const Z4={};function HC(e,t){const n=hC(e);return()=>Z4[t]??n()}const ew=HC(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),GC=HC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ta=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,uE={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ta([0,.65,.55,1]),circOut:ta([.55,0,1,.45]),backIn:ta([.31,.01,.66,-.59]),backOut:ta([.33,1.53,.69,.99])};function qC(e,t){if(e)return typeof e=="function"?GC()?MC(e,t):"ease-out":kC(e)?ta(e):Array.isArray(e)?e.map(n=>qC(n,t)||uE.easeOut):uE[e]}function tw(e,t,n,{delay:r=0,duration:o=300,repeat:a=0,repeatType:l="loop",ease:c="easeOut",times:x}={},f=void 0){const m={[t]:n};x&&(m.offset=x);const h=qC(c,o);Array.isArray(h)&&(m.easing=h);const E={delay:r,duration:o,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:a+1,direction:l==="reverse"?"alternate":"normal"};return f&&(E.pseudoElement=f),e.animate(m,E)}function Jf(e){return typeof e=="function"&&"applyToOptions"in e}function nw({type:e,...t}){return Jf(e)&&GC()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class KC extends Yf{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:a,allowFlatten:l=!1,finalKeyframe:c,onComplete:x}=t;this.isPseudoElement=!!a,this.allowFlatten=l,this.options=t,uu(typeof t.type!="string");const f=nw(t);this.animation=tw(n,r,o,f,a),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const m=xu(o,this.options,c,this.speed);this.updateMotionValue&&this.updateMotionValue(m),WC(n,r,m),this.animation.cancel()}x?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Gn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Gn(t)}get time(){return Gn(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Fn(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:o}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ew()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),qn):o(this)}}const XC={anticipate:yC,backInOut:CC,circInOut:AC};function rw(e){return e in XC}function iw(e){typeof e.ease=="string"&&rw(e.ease)&&(e.ease=XC[e.ease])}const Bx=10;class ow extends KC{constructor(t){iw(t),VC(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:a,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new Tc({...l,autoplay:!1}),x=Math.max(Bx,En.now()-this.startTime),f=kr(0,Bx,x-Bx),m=c.sample(x).value,{name:h}=this.options;a&&h&&WC(a,h,m),n.setWithVelocity(c.sample(Math.max(0,x-f)).value,m,f),c.stop()}}const xE=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ar.test(e)||e==="0")&&!e.startsWith("url("));function sw(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function aw(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],l=xE(o,t),c=xE(a,t);return!l||!c?!1:sw(e)||(n==="spring"||Jf(n))&&r}function Rd(e){e.duration=0,e.type="keyframes"}const YC=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),lw=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function cw(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&lw.test(e[t]))return!0;return!1}const uw=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),xw=hC(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function dw(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:a,type:l,keyframes:c}=e,x=t?.owner?.current;if(!(x instanceof HTMLElement)&&!(x instanceof SVGElement))return!1;const{onUpdate:f,transformTemplate:m}=t.owner.getProps();return xw()&&n&&(YC.has(n)||uw.has(n)&&cw(c))&&(n!=="transform"||!m)&&!f&&!r&&o!=="mirror"&&a!==0&&l!=="inertia"}const fw=40;class hw extends Yf{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:l="loop",keyframes:c,name:x,motionValue:f,element:m,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=En.now();const E={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:a,repeatType:l,name:x,motionValue:f,element:m,...h},C=m?.KeyframeResolver||Qf;this.keyframeResolver=new C(c,(y,w,B)=>this.onKeyframesResolved(y,w,E,!B),x,f,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:a,type:l,velocity:c,delay:x,isHandoff:f,onUpdate:m}=r;this.resolvedAt=En.now();let h=!0;aw(t,a,l,c)||(h=!1,(gi.instantAnimations||!x)&&m?.(xu(t,r,n)),t[0]=t[t.length-1],Rd(r),r.repeat=0);const C={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>fw?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},y=h&&!f&&dw(C),w=C.motionValue?.owner?.current;let B;if(y)try{B=new ow({...C,element:w})}catch{B=new Tc(C)}else B=new Tc(C);B.finished.then(()=>{this.notifyFinished()}).catch(qn),this.pendingTimeline&&(this.stopTimeline=B.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=B}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Q4()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class mw{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return dE(this.animations,"duration")}get iterationDuration(){return dE(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function dE(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o)}return n}class pw extends mw{then(t,n){return this.finished.finally(t).then(()=>{})}}function QC(e,t,n,r=0,o=1){const a=Array.from(e).sort((f,m)=>f.sortNodePosition(m)).indexOf(t),l=e.size,c=(l-1)*r;return typeof n=="function"?n(a,l):o===1?a*r:c-a*r}const fE=30,Ew=e=>!isNaN(parseFloat(e));class gw{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=En.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=En.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Ew(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Vf);const r=this.events[t].add(n);return t==="change"?()=>{r(),Bt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=En.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>fE)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,fE);return mC(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function yi(e,t){return new gw(e,t)}function Zf(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function eh(e,t){const n=e?.[t]??e?.default??e;return n!==e?Zf(n,e):n}const Cw={type:"spring",stiffness:500,damping:25,restSpeed:10},yw=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),vw={type:"keyframes",duration:.8},Aw={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Bw=(e,{keyframes:t})=>t.length>2?vw:ss.has(e)?e.startsWith("scale")?yw(t[1]):Cw:Aw,ww=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Dw(e){for(const t in e)if(!ww.has(t))return!0;return!1}const th=(e,t,n,r={},o,a)=>l=>{const c=eh(r,e)||{},x=c.delay||r.delay||0;let{elapsed:f=0}=r;f=f-Fn(x);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-f,onUpdate:E=>{t.set(E),c.onUpdate&&c.onUpdate(E)},onComplete:()=>{l(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:a?void 0:o};Dw(c)||Object.assign(m,Bw(e,m)),m.duration&&(m.duration=Fn(m.duration)),m.repeatDelay&&(m.repeatDelay=Fn(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let h=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(Rd(m),m.delay===0&&(h=!0)),(gi.instantAnimations||gi.skipAnimations||o?.shouldSkipAnimations||c.skipAnimations)&&(h=!0,Rd(m),m.delay=0),m.allowFlatten=!c.type&&!c.ease,h&&!a&&t.get()!==void 0){const E=xu(m.keyframes,c);if(E!==void 0){Bt.update(()=>{m.onUpdate(E),m.onComplete()});return}}return c.isSync?new Tc(m):new hw(m)},kw=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Fw(e){const t=kw.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}function JC(e,t,n=1){const[r,o]=Fw(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const l=a.trim();return xC(l)?parseFloat(l):l}return Hf(o)?JC(o,t,n+1):o}function hE(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function nh(e,t,n,r){if(typeof t=="function"){const[o,a]=hE(r);t=t(n!==void 0?n:e.custom,o,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,a]=hE(r);t=t(n!==void 0?n:e.custom,o,a)}return t}function Qi(e,t,n){const r=e.getProps();return nh(r,t,n!==void 0?n:r.custom,e)}const ZC=new Set(["width","height","top","left","right","bottom",...os]),Nd=e=>Array.isArray(e);function Sw(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,yi(n))}function bw(e){return Nd(e)?e[e.length-1]||0:e}function Pw(e,t){const n=Qi(e,t);let{transitionEnd:r={},transition:o={},...a}=n||{};a={...a,...r};for(const l in a){const c=bw(a[l]);Sw(e,l,c)}}const Yt=e=>!!(e&&e.getVelocity);function _w(e){return!!(Yt(e)&&e.add)}function Md(e,t){const n=e.getValue("willChange");if(_w(n))return n.add(t);if(!n&&gi.WillChange){const r=new gi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function rh(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const jw="framerAppearId",ey="data-"+rh(jw);function ty(e){return e.props[ey]}function Tw({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ih(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:a,transitionEnd:l,...c}=t;const x=e.getDefaultTransition();a=a?Zf(a,x):x;const f=a?.reduceMotion,m=a?.skipAnimations;r&&(a=r);const h=[],E=o&&e.animationState&&e.animationState.getState()[o],C=a?.path;C&&C.animateVisualElement(e,c,a,n,h);for(const y in c){const w=e.getValue(y,e.latestValues[y]??null),B=c[y];if(B===void 0||E&&Tw(E,y))continue;const F={delay:n,...eh(a||{},y)};m&&(F.skipAnimations=!0);const b=w.get();if(b!==void 0&&!w.isAnimating()&&!Array.isArray(B)&&B===b&&!F.velocity){Bt.update(()=>w.set(B));continue}let D=!1;if(window.MotionHandoffAnimation){const P=ty(e);if(P){const R=window.MotionHandoffAnimation(P,y,Bt);R!==null&&(F.startTime=R,D=!0)}}Md(e,y);const S=f??e.shouldReduceMotion;w.start(th(y,w,B,S&&ZC.has(y)?{type:!1}:F,e,D));const k=w.animation;k&&h.push(k)}if(l){const y=()=>Bt.update(()=>{l&&Pw(e,l)});h.length?Promise.all(h).then(y):y()}return h}function Id(e,t,n={}){const r=Qi(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const a=r?()=>Promise.all(ih(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(x=0)=>{const{delayChildren:f=0,staggerChildren:m,staggerDirection:h}=o;return Rw(e,t,x,f,m,h,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[x,f]=c==="beforeChildren"?[a,l]:[l,a];return x().then(()=>f())}else return Promise.all([a(),l(n.delay)])}function Rw(e,t,n=0,r=0,o=0,a=1,l){const c=[];for(const x of e.variantChildren)x.notify("AnimationStart",t),c.push(Id(x,t,{...l,delay:n+(typeof r=="function"?0:r)+QC(e.variantChildren,x,r,o,a)}).then(()=>x.notify("AnimationComplete",t)));return Promise.all(c)}function Nw(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(a=>Id(e,a,n));r=Promise.all(o)}else if(typeof t=="string")r=Id(e,t,n);else{const o=typeof t=="function"?Qi(e,t,n.custom):t;r=Promise.all(ih(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Mw={test:e=>e==="auto",parse:e=>e},ny=e=>t=>t.test(e),ry=[is,_e,Dr,Or,c4,l4,Mw],mE=e=>ry.find(ny(e));function Iw(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||fC(e):!0}const Lw=new Set(["brightness","contrast","saturate","opacity"]);function Ow(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Gf)||[];if(!r)return e;const o=n.replace(r,"");let a=Lw.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+o+")"}const zw=/\b([a-z-]*)\(.*?\)/gu,Ld={...ar,getAnimatableNone:e=>{const t=e.match(zw);return t?t.map(Ow).join(" "):e}},Od={...ar,getAnimatableNone:e=>{const t=ar.parse(e);return ar.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},pE={...is,transform:Math.round},Vw={rotate:Or,pathRotation:Or,rotateX:Or,rotateY:Or,rotateZ:Or,scale:ec,scaleX:ec,scaleY:ec,scaleZ:ec,skew:Or,skewX:Or,skewY:Or,distance:_e,translateX:_e,translateY:_e,translateZ:_e,x:_e,y:_e,z:_e,perspective:_e,transformPerspective:_e,opacity:ga,originX:tE,originY:tE,originZ:_e},Rc={borderWidth:_e,borderTopWidth:_e,borderRightWidth:_e,borderBottomWidth:_e,borderLeftWidth:_e,borderRadius:_e,borderTopLeftRadius:_e,borderTopRightRadius:_e,borderBottomRightRadius:_e,borderBottomLeftRadius:_e,width:_e,maxWidth:_e,height:_e,maxHeight:_e,top:_e,right:_e,bottom:_e,left:_e,inset:_e,insetBlock:_e,insetBlockStart:_e,insetBlockEnd:_e,insetInline:_e,insetInlineStart:_e,insetInlineEnd:_e,padding:_e,paddingTop:_e,paddingRight:_e,paddingBottom:_e,paddingLeft:_e,paddingBlock:_e,paddingBlockStart:_e,paddingBlockEnd:_e,paddingInline:_e,paddingInlineStart:_e,paddingInlineEnd:_e,margin:_e,marginTop:_e,marginRight:_e,marginBottom:_e,marginLeft:_e,marginBlock:_e,marginBlockStart:_e,marginBlockEnd:_e,marginInline:_e,marginInlineStart:_e,marginInlineEnd:_e,fontSize:_e,backgroundPositionX:_e,backgroundPositionY:_e,...Vw,zIndex:pE,fillOpacity:ga,strokeOpacity:ga,numOctaves:pE},Uw={...Rc,color:qt,backgroundColor:qt,outlineColor:qt,fill:qt,stroke:qt,borderColor:qt,borderTopColor:qt,borderRightColor:qt,borderBottomColor:qt,borderLeftColor:qt,filter:Ld,WebkitFilter:Ld,mask:Od,WebkitMask:Od},iy=e=>Uw[e],$w=new Set([Ld,Od]);function oy(e,t){let n=iy(e);return $w.has(n)||(n=ar),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ww=new Set(["auto","none","0"]);function Hw(e,t,n){let r=0,o;for(;r<e.length&&!o;){const a=e[r];typeof a=="string"&&!Ww.has(a)&&Yo(a).values.length&&(o=e[r]),r++}if(o&&n)for(const a of t)e[a]=oy(n,o)}class Gw extends Qf{constructor(t,n,r,o,a){super(t,n,r,o,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let h=t[m];if(typeof h=="string"&&(h=h.trim(),Hf(h))){const E=JC(h,n.current);E!==void 0&&(t[m]=E),m===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!ZC.has(r)||t.length!==2)return;const[o,a]=t,l=mE(o),c=mE(a),x=eE(o),f=eE(a);if(x!==f&&hi[r]){this.needsMeasurement=!0;return}if(l!==c)if(cE(l)&&cE(c))for(let m=0;m<t.length;m++){const h=t[m];typeof h=="string"&&(t[m]=parseFloat(h))}else hi[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||Iw(t[o]))&&r.push(o);r.length&&Hw(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=hi[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const a=r.length-1,l=r[a];r[a]=hi[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,x])=>{t.getValue(c).set(x)}),this.resolveNoneKeyframes()}}const oh=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function sh(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const zd=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function pc(e){return dC(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:ah}=FC(queueMicrotask,!1),or={x:!1,y:!1};function sy(){return or.x||or.y}function qw(e){return e==="x"||e==="y"?or[e]?null:(or[e]=!0,()=>{or[e]=!1}):or.x||or.y?null:(or.x=or.y=!0,()=>{or.x=or.y=!1})}function ay(e,t){const n=sh(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Kw(e){return!(e.pointerType==="touch"||sy())}function Xw(e,t,n={}){const[r,o,a]=ay(e,n);return r.forEach(l=>{let c=!1,x=!1,f;const m=()=>{l.removeEventListener("pointerleave",y)},h=B=>{f&&(f(B),f=void 0),m()},E=B=>{c=!1,window.removeEventListener("pointerup",E),window.removeEventListener("pointercancel",E),x&&(x=!1,h(B))},C=()=>{c=!0,window.addEventListener("pointerup",E,o),window.addEventListener("pointercancel",E,o)},y=B=>{if(B.pointerType!=="touch"){if(c){x=!0;return}h(B)}},w=B=>{if(!Kw(B))return;x=!1;const F=t(l,B);typeof F=="function"&&(f=F,l.addEventListener("pointerleave",y,o))};l.addEventListener("pointerenter",w,o),l.addEventListener("pointerdown",C,o)}),a}const ly=(e,t)=>t?e===t?!0:ly(e,t.parentElement):!1,lh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Yw=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Qw(e){return Yw.has(e.tagName)||e.isContentEditable===!0}const Jw=new Set(["INPUT","SELECT","TEXTAREA"]);function Zw(e){return Jw.has(e.tagName)||e.isContentEditable===!0}const Ec=new WeakSet;function EE(e){return t=>{t.key==="Enter"&&e(t)}}function wx(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const eD=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=EE(()=>{if(Ec.has(n))return;wx(n,"down");const o=EE(()=>{wx(n,"up")}),a=()=>wx(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function gE(e){return lh(e)&&!sy()}const CE=new WeakSet;function tD(e,t,n={}){const[r,o,a]=ay(e,n),l=c=>{const x=c.currentTarget;if(!gE(c)||CE.has(c))return;Ec.add(x),n.stopPropagation&&CE.add(c);const f=t(x,c),m={...o,capture:!0},h=(y,w)=>{window.removeEventListener("pointerup",E,m),window.removeEventListener("pointercancel",C,m),Ec.has(x)&&Ec.delete(x),gE(y)&&typeof f=="function"&&f(y,{success:w})},E=y=>{h(y,x===window||x===document||n.useGlobalTarget||ly(x,y.target))},C=y=>{h(y,!1)};window.addEventListener("pointerup",E,m),window.addEventListener("pointercancel",C,m)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",l,o),pc(c)&&(c.addEventListener("focus",f=>eD(f,o)),!Qw(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),a}function du(e){return dC(e)&&"ownerSVGElement"in e}const gc=new WeakMap;let Cc;const cy=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:du(r)&&"getBBox"in r?r.getBBox()[t]:r[n],nD=cy("inline","width","offsetWidth"),rD=cy("block","height","offsetHeight");function iD({target:e,borderBoxSize:t}){gc.get(e)?.forEach(n=>{n(e,{get width(){return nD(e,t)},get height(){return rD(e,t)}})})}function oD(e){e.forEach(iD)}function sD(){typeof ResizeObserver>"u"||(Cc=new ResizeObserver(oD))}function aD(e,t){Cc||sD();const n=sh(e);return n.forEach(r=>{let o=gc.get(r);o||(o=new Set,gc.set(r,o)),o.add(t),Cc?.observe(r)}),()=>{n.forEach(r=>{const o=gc.get(r);o?.delete(t),o?.size||Cc?.unobserve(r)})}}const yc=new Set;let Vo;function lD(){Vo=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};yc.forEach(t=>t(e))},window.addEventListener("resize",Vo)}function cD(e){return yc.add(e),Vo||lD(),()=>{yc.delete(e),!yc.size&&typeof Vo=="function"&&(window.removeEventListener("resize",Vo),Vo=void 0)}}function yE(e,t){return typeof e=="function"?cD(e):aD(e,t)}function uy(e){return du(e)&&e.tagName==="svg"}const uD=[...ry,qt,ar],xD=e=>uD.find(ny(e)),vE=()=>({translate:0,scale:1,origin:0,originPoint:0}),Uo=()=>({x:vE(),y:vE()}),AE=()=>({min:0,max:0}),Ht=()=>({x:AE(),y:AE()}),ya=new WeakMap;function fu(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function va(e){return typeof e=="string"||Array.isArray(e)}const ch=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],uh=["initial",...ch];function hu(e){return fu(e.animate)||uh.some(t=>va(e[t]))}function xy(e){return!!(hu(e)||e.variants)}function dD(e,t,n){for(const r in t){const o=t[r],a=n[r];if(Yt(o))e.addValue(r,o);else if(Yt(a))e.addValue(r,yi(o,{owner:e}));else if(a!==o)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(o):l.hasAnimated||l.set(o)}else{const l=e.getStaticValue(r);e.addValue(r,yi(l!==void 0?l:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Nc={current:null},xh={current:!1},fD=typeof window<"u";function dy(){if(xh.current=!0,!!fD)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Nc.current=e.matches;e.addEventListener("change",t),t()}else Nc.current=!1}const BE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Mc={};function fy(e){Mc=e}function hD(){return Mc}class hy{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,skipAnimations:a,blockInitialAnimation:l,visualState:c},x={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Qf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const C=En.now();this.renderScheduledAt<C&&(this.renderScheduledAt=C,Bt.render(this.render,!1,!0))};const{latestValues:f,renderState:m}=c;this.latestValues=f,this.baseTarget={...f},this.initialValues=n.initial?{...f}:{},this.renderState=m,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=a,this.options=x,this.blockInitialAnimation=!!l,this.isControllingVariants=hu(n),this.isVariantNode=xy(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...E}=this.scrapeMotionValuesFromProps(n,{},this);for(const C in E){const y=E[C];f[C]!==void 0&&Yt(y)&&y.set(f[C])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,ya.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(xh.current||dy(),this.shouldReduceMotion=Nc.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Ci(this.notifyUpdate),Ci(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&YC.has(t)&&this.current instanceof HTMLElement){const{factory:l,keyframes:c,times:x,ease:f,duration:m}=n.accelerate,h=new KC({element:this.current,name:t,keyframes:c,times:x,ease:f,duration:Fn(m)}),E=l(h);this.valueSubscriptions.set(t,()=>{E(),h.cancel()});return}const r=ss.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Bt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),a&&a()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Mc){const n=Mc[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ht()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<BE.length;r++){const o=BE[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const a="on"+o,l=t[a];l&&(this.propEventSubscriptions[o]=this.on(o,l))}this.prevMotionValues=dD(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=yi(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(xC(r)||fC(r))?r=parseFloat(r):!xD(r)&&ar.test(n)&&(r=oy(t,n)),this.setBaseTarget(t,Yt(r)?r.get():r)),Yt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=nh(this.props,n,this.presenceContext?.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Yt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Vf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ah.render(this.render)}}class my extends hy{constructor(){super(...arguments),this.KeyframeResolver=Gw}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Yt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class vi{constructor(t){this.isMounted=!1,this.node=t}update(){}}function py({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function mD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function pD(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Dx(e){return e===void 0||e===1}function Vd({scale:e,scaleX:t,scaleY:n}){return!Dx(e)||!Dx(t)||!Dx(n)}function Li(e){return Vd(e)||Ey(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ey(e){return wE(e.x)||wE(e.y)}function wE(e){return e&&e!=="0%"}function Ic(e,t,n){const r=e-n,o=t*r;return n+o}function DE(e,t,n,r,o){return o!==void 0&&(e=Ic(e,o,r)),Ic(e,n,r)+t}function Ud(e,t=0,n=1,r,o){e.min=DE(e.min,t,n,r,o),e.max=DE(e.max,t,n,r,o)}function gy(e,{x:t,y:n}){Ud(e.x,t.translate,t.scale,t.originPoint),Ud(e.y,n.translate,n.scale,n.originPoint)}const kE=.999999999999,FE=1.0000000000001;function ED(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let a,l;for(let c=0;c<o;c++){a=n[c],l=a.projectionDelta;const{visualElement:x}=a.options;x&&x.props.style&&x.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(Br(e.x,-a.scroll.offset.x),Br(e.y,-a.scroll.offset.y)),l&&(t.x*=l.x.scale,t.y*=l.y.scale,gy(e,l)),r&&Li(a.latestValues)&&vc(e,a.latestValues,a.layout?.layoutBox))}t.x<FE&&t.x>kE&&(t.x=1),t.y<FE&&t.y>kE&&(t.y=1)}function Br(e,t){e.min+=t,e.max+=t}function SE(e,t,n,r,o=.5){const a=Ct(e.min,e.max,o);Ud(e,t,n,a,r)}function bE(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function vc(e,t,n){const r=n??e;SE(e.x,bE(t.x,r.x),t.scaleX,t.scale,t.originX),SE(e.y,bE(t.y,r.y),t.scaleY,t.scale,t.originY)}function Cy(e,t){return py(pD(e.getBoundingClientRect(),t))}function gD(e,t,n){const r=Cy(e,n),{scroll:o}=t;return o&&(Br(r.x,o.offset.x),Br(r.y,o.offset.y)),r}const CD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},yD=os.length;function vD(e,t,n){let r="",o=!0;for(let l=0;l<yD;l++){const c=os[l],x=e[c];if(x===void 0)continue;let f=!0;if(typeof x=="number")f=x===(c.startsWith("scale")?1:0);else{const m=parseFloat(x);f=c.startsWith("scale")?m===1:m===0}if(!f||n){const m=zd(x,Rc[c]);if(!f){o=!1;const h=CD[c]||c;r+=`${h}(${m}) `}n&&(t[c]=m)}}const a=e.pathRotation;return a&&(o=!1,r+=`rotate(${zd(a,Rc.pathRotation)}) `),r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function dh(e,t,n){const{style:r,vars:o,transformOrigin:a}=e;let l=!1,c=!1;for(const x in t){const f=t[x];if(ss.has(x)){l=!0;continue}else if(bC(x)){o[x]=f;continue}else{const m=zd(f,Rc[x]);x.startsWith("origin")?(c=!0,a[x]=m):r[x]=m}}if(t.transform||(l||n?r.transform=vD(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:x="50%",originY:f="50%",originZ:m=0}=a;r.transformOrigin=`${x} ${f} ${m}`}}function yy(e,{style:t,vars:n},r,o){const a=e.style;let l;for(l in t)a[l]=t[l];o?.applyProjectionStyles(a,r);for(l in n)a.setProperty(l,n[l])}function PE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const qs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(_e.test(e))e=parseFloat(e);else return e;const n=PE(e,t.target.x),r=PE(e,t.target.y);return`${n}% ${r}%`}},AD={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ar.parse(e);if(o.length>5)return r;const a=ar.createTransformer(e),l=typeof o[0]!="number"?1:0,c=n.x.scale*t.x,x=n.y.scale*t.y;o[0+l]/=c,o[1+l]/=x;const f=Ct(c,x,.5);return typeof o[2+l]=="number"&&(o[2+l]/=f),typeof o[3+l]=="number"&&(o[3+l]/=f),a(o)}},$d={borderRadius:{...qs,applyTo:[...oh]},borderTopLeftRadius:qs,borderTopRightRadius:qs,borderBottomLeftRadius:qs,borderBottomRightRadius:qs,boxShadow:AD};function vy(e,{layout:t,layoutId:n}){return ss.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$d[e]||e==="opacity")}function fh(e,t,n){const r=e.style,o=t?.style,a={};if(!r)return a;for(const l in r)(Yt(r[l])||o&&Yt(o[l])||vy(l,e)||n?.getValue(l)?.liveStyle!==void 0)&&(a[l]=r[l]);return a}function BD(e){return window.getComputedStyle(e)}class Ay extends my{constructor(){super(...arguments),this.type="html",this.renderInstance=yy}mount(t){uu(!!t.style),super.mount(t)}readValueFromInstance(t,n){if(ss.has(n))return this.projection?.isProjecting?bd(n):G4(t,n);{const r=BD(t),o=(bC(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Cy(t,n)}build(t,n,r){dh(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return fh(t,n,r)}}function wD(e,t){return e in t}class DD extends hy{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(wD(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Ht()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const kD={offset:"stroke-dashoffset",array:"stroke-dasharray"},FD={offset:"strokeDashoffset",array:"strokeDasharray"};function SD(e,t,n=1,r=0,o=!0){e.pathLength=1;const a=o?kD:FD;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}const bD=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function By(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},x,f,m){if(dh(e,c,f),x){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:E}=e;h.transform&&(E.transform=h.transform,delete h.transform),(E.transform||h.transformOrigin)&&(E.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),E.transform&&(E.transformBox=m?.transformBox??"fill-box",delete h.transformBox);for(const C of bD)h[C]!==void 0&&(E[C]=h[C],delete h[C]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&SD(h,o,a,l,!1)}const wy=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Dy=e=>typeof e=="string"&&e.toLowerCase()==="svg";function PD(e,t,n,r){yy(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(wy.has(o)?o:rh(o),t.attrs[o])}function ky(e,t,n){const r=fh(e,t,n);for(const o in e)if(Yt(e[o])||Yt(t[o])){const a=os.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[a]=e[o]}return r}class Fy extends my{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ht}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ss.has(n)){const r=iy(n);return r&&r.default||0}return n=wy.has(n)?n:rh(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ky(t,n,r)}build(t,n,r){By(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){PD(t,n,r,o)}mount(t){this.isSVGTag=Dy(t.tagName),super.mount(t)}}const _D=uh.length;function Sy(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Sy(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<_D;n++){const r=uh[n],o=e.props[r];(va(o)||o===!1)&&(t[r]=o)}return t}function by(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const jD=[...ch].reverse(),TD=ch.length;function RD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Nw(e,n,r)))}function ND(e){let t=RD(e),n=_E(),r=!0,o=!1;const a=f=>(m,h)=>{const E=Qi(e,h,f==="exit"?e.presenceContext?.custom:void 0);if(E){const{transition:C,transitionEnd:y,...w}=E;m={...m,...w,...y}}return m};function l(f){t=f(e)}function c(f){const{props:m}=e,h=Sy(e.parent)||{},E=[],C=new Set;let y={},w=1/0;for(let F=0;F<TD;F++){const b=jD[F],D=n[b],S=m[b]!==void 0?m[b]:h[b],k=va(S),P=b===f?D.isActive:null;P===!1&&(w=F);let R=S===h[b]&&S!==m[b]&&k;if(R&&(r||o)&&e.manuallyAnimateOnMount&&(R=!1),D.protectedKeys={...y},!D.isActive&&P===null||!S&&!D.prevProp||fu(S)||typeof S=="boolean")continue;if(b==="exit"&&D.isActive&&P!==!0){D.prevResolvedValues&&(y={...y,...D.prevResolvedValues});continue}const M=MD(D.prevProp,S);let O=M||b===f&&D.isActive&&!R&&k||F>w&&k,T=!1;const V=Array.isArray(S)?S:[S];let z=V.reduce(a(b),{});P===!1&&(z={});const{prevResolvedValues:J={}}=D,H={...J,...z},W=K=>{O=!0,C.has(K)&&(T=!0,C.delete(K)),D.needsAnimating[K]=!0;const ie=e.getValue(K);ie&&(ie.liveStyle=!1)};for(const K in H){const ie=z[K],j=J[K];if(y.hasOwnProperty(K))continue;let I=!1;Nd(ie)&&Nd(j)?I=!by(ie,j)||M:I=ie!==j,I?ie!=null?W(K):C.add(K):ie!==void 0&&C.has(K)?W(K):D.protectedKeys[K]=!0}D.prevProp=S,D.prevResolvedValues=z,D.isActive&&(y={...y,...z}),(r||o)&&e.blockInitialAnimation&&(O=!1);const re=R&&M;O&&(!re||T)&&E.push(...V.map(K=>{const ie={type:b};if(typeof K=="string"&&(r||o)&&!re&&e.manuallyAnimateOnMount&&e.parent){const{parent:j}=e,I=Qi(j,K);if(j.enteringChildren&&I){const{delayChildren:G}=I.transition||{};ie.delay=QC(j.enteringChildren,e,G)}}return{animation:K,options:ie}}))}if(C.size){const F={};if(typeof m.initial!="boolean"){const b=Qi(e,Array.isArray(m.initial)?m.initial[0]:m.initial);b&&b.transition&&(F.transition=b.transition)}C.forEach(b=>{const D=e.getBaseTarget(b),S=e.getValue(b);S&&(S.liveStyle=!0),F[b]=D??null}),E.push({animation:F})}let B=!!E.length;return r&&(m.initial===!1||m.initial===m.animate)&&!e.manuallyAnimateOnMount&&(B=!1),r=!1,o=!1,B?t(E):Promise.resolve()}function x(f,m){if(n[f].isActive===m)return Promise.resolve();e.variantChildren?.forEach(E=>E.animationState?.setActive(f,m)),n[f].isActive=m;const h=c(f);for(const E in n)n[E].protectedKeys={};return h}return{animateChanges:c,setActive:x,setAnimateFunction:l,getState:()=>n,reset:()=>{n=_E(),o=!0}}}function MD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!by(t,e):!1}function Mi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _E(){return{animate:Mi(!0),whileInView:Mi(),whileHover:Mi(),whileTap:Mi(),whileDrag:Mi(),whileFocus:Mi(),exit:Mi()}}function Wd(e,t){e.min=t.min,e.max=t.max}function ir(e,t){Wd(e.x,t.x),Wd(e.y,t.y)}function jE(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Py=1e-4,ID=1-Py,LD=1+Py,_y=.01,OD=0-_y,zD=0+_y;function gn(e){return e.max-e.min}function VD(e,t,n){return Math.abs(e-t)<=n}function TE(e,t,n,r=.5){e.origin=r,e.originPoint=Ct(t.min,t.max,e.origin),e.scale=gn(n)/gn(t),e.translate=Ct(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ID&&e.scale<=LD||isNaN(e.scale))&&(e.scale=1),(e.translate>=OD&&e.translate<=zD||isNaN(e.translate))&&(e.translate=0)}function aa(e,t,n,r){TE(e.x,t.x,n.x,r?r.originX:void 0),TE(e.y,t.y,n.y,r?r.originY:void 0)}function RE(e,t,n,r=0){const o=r?Ct(n.min,n.max,r):n.min;e.min=o+t.min,e.max=e.min+gn(t)}function UD(e,t,n,r){RE(e.x,t.x,n.x,r?.x),RE(e.y,t.y,n.y,r?.y)}function NE(e,t,n,r=0){const o=r?Ct(n.min,n.max,r):n.min;e.min=t.min-o,e.max=e.min+gn(t)}function Lc(e,t,n,r){NE(e.x,t.x,n.x,r?.x),NE(e.y,t.y,n.y,r?.y)}function ME(e,t,n,r,o){return e-=t,e=Ic(e,1/n,r),o!==void 0&&(e=Ic(e,1/o,r)),e}function $D(e,t=0,n=1,r=.5,o,a=e,l=e){if(Dr.test(t)&&(t=parseFloat(t),t=Ct(l.min,l.max,t/100)-l.min),typeof t!="number")return;let c=Ct(a.min,a.max,r);e===a&&(c-=t),e.min=ME(e.min,t,n,c,o),e.max=ME(e.max,t,n,c,o)}function IE(e,t,[n,r,o],a,l){$D(e,t[n],t[r],t[o],t.scale,a,l)}const WD=["x","scaleX","originX"],HD=["y","scaleY","originY"];function LE(e,t,n,r){IE(e.x,t,WD,n?n.x:void 0,r?r.x:void 0),IE(e.y,t,HD,n?n.y:void 0,r?r.y:void 0)}function OE(e){return e.translate===0&&e.scale===1}function jy(e){return OE(e.x)&&OE(e.y)}function zE(e,t){return e.min===t.min&&e.max===t.max}function GD(e,t){return zE(e.x,t.x)&&zE(e.y,t.y)}function VE(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ty(e,t){return VE(e.x,t.x)&&VE(e.y,t.y)}function UE(e){return gn(e.x)/gn(e.y)}function $E(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function yr(e){return[e("x"),e("y")]}function qD(e,t,n){let r="";const o=e.x.translate/t.x,a=e.y.translate/t.y,l=n?.z||0;if((o||a||l)&&(r=`translate3d(${o}px, ${a}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:m,pathRotation:h,rotateX:E,rotateY:C,skewX:y,skewY:w}=n;f&&(r=`perspective(${f}px) ${r}`),m&&(r+=`rotate(${m}deg) `),h&&(r+=`rotate(${h}deg) `),E&&(r+=`rotateX(${E}deg) `),C&&(r+=`rotateY(${C}deg) `),y&&(r+=`skewX(${y}deg) `),w&&(r+=`skewY(${w}deg) `)}const c=e.x.scale*t.x,x=e.y.scale*t.y;return(c!==1||x!==1)&&(r+=`scale(${c}, ${x})`),r||"none"}const KD=oh.length,WE=e=>typeof e=="string"?parseFloat(e):e,HE=e=>typeof e=="number"||_e.test(e);function XD(e,t,n,r,o,a){o?(e.opacity=Ct(0,n.opacity??1,YD(r)),e.opacityExit=Ct(t.opacity??1,0,QD(r))):a&&(e.opacity=Ct(t.opacity??1,n.opacity??1,r));for(let l=0;l<KD;l++){const c=oh[l];let x=GE(t,c),f=GE(n,c);if(x===void 0&&f===void 0)continue;x||(x=0),f||(f=0),x===0||f===0||HE(x)===HE(f)?(e[c]=Math.max(Ct(WE(x),WE(f),r),0),(Dr.test(f)||Dr.test(x))&&(e[c]+="%")):e[c]=f}(t.rotate||n.rotate)&&(e.rotate=Ct(t.rotate||0,n.rotate||0,r))}function GE(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const YD=Ry(0,.5,vC),QD=Ry(.5,.95,qn);function Ry(e,t,n){return r=>r<e?0:r>t?1:n(Xo(e,t,r))}function Ny(e,t,n){const r=Yt(e)?e:yi(e);return r.start(th("",r,t,n)),r.animation}function Aa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}const JD=(e,t)=>e.depth-t.depth;class ZD{constructor(){this.children=[],this.isDirty=!1}add(t){zf(this.children,t),this.isDirty=!0}remove(t){Ko(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(JD),this.isDirty=!1,this.children.forEach(t)}}function ek(e,t){const n=En.now(),r=({timestamp:o})=>{const a=o-n;a>=t&&(Ci(r),e(a-t))};return Bt.setup(r,!0),()=>Ci(r)}function Ac(e){return Yt(e)?e.get():e}class tk{constructor(){this.members=[]}add(t){zf(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const o=r.instance;(!o||o.isConnected===!1)&&!r.snapshot&&(Ko(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Ko(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){for(let n=this.members.indexOf(t)-1;n>=0;n--){const r=this.members[n];if(r.isPresent!==!1&&r.instance?.isConnected!==!1)return this.promote(r),!0}return!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:o}=r.options,{layoutDependency:a}=t.options;(o===void 0||o!==a)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Bc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},kx=["","X","Y","Z"],nk=1e3;let rk=0;function Fx(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function My(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ty(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Bt,!(o||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&My(r)}function Iy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(l={},c=t?.()){this.id=rk++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(sk),this.nodes.forEach(dk),this.nodes.forEach(fk),this.nodes.forEach(ak)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let x=0;x<this.path.length;x++)this.path[x].shouldResetTransform=!0;this.root===this&&(this.nodes=new ZD)}addEventListener(l,c){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new Vf),this.eventHandlers.get(l).add(c)}notifyListeners(l,...c){const x=this.eventHandlers.get(l);x&&x.notify(...c)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=du(l)&&!uy(l),this.instance=l;const{layoutId:c,layout:x,visualElement:f}=this.options;if(f&&!f.current&&f.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(x||c)&&(this.isLayoutDirty=!0),e){let m,h=0;const E=()=>this.root.updateBlockedByResize=!1;Bt.read(()=>{h=window.innerWidth}),e(l,()=>{const C=window.innerWidth;C!==h&&(h=C,this.root.updateBlockedByResize=!0,m&&m(),m=ek(E,250),Bc.hasAnimatedSinceResize&&(Bc.hasAnimatedSinceResize=!1,this.nodes.forEach(XE)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||x)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:h,hasRelativeLayoutChanged:E,layout:C})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||f.getDefaultTransition()||gk,{onLayoutAnimationStart:w,onLayoutAnimationComplete:B}=f.getProps(),F=!this.targetLayout||!Ty(this.targetLayout,C),b=!h&&E;if(this.options.layoutRoot||this.resumeFrom||b||h&&(F||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const D={...eh(y,"layout"),onPlay:w,onComplete:B};(f.shouldReduceMotion||this.options.layoutRoot)&&(D.delay=0,D.type=!1),this.startAnimation(D),this.setAnimationOrigin(m,b,D.path)}else h||XE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=C})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ci(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(hk),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&My(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const h=this.path[m];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:c,layout:x}=this.options;if(c===void 0&&!x)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const x=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),x&&this.nodes.forEach(ck),this.nodes.forEach(qE);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(KE);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(uk),this.nodes.forEach(xk),this.nodes.forEach(ik),this.nodes.forEach(ok)):this.nodes.forEach(KE),this.clearAllSnapshots();const c=En.now();rn.delta=kr(0,1e3/60,c-rn.timestamp),rn.timestamp=c,rn.isProcessing=!0,gx.update.process(rn),gx.preRender.process(rn),gx.render.process(rn),rn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ah.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(lk),this.sharedNodes.forEach(mk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Bt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Bt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!gn(this.snapshot.measuredBox.x)&&!gn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let x=0;x<this.path.length;x++)this.path[x].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Ht()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(c=!1),c&&this.instance){const x=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:x,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:x}}}resetTransform(){if(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!jy(this.projectionDelta),x=this.getTransformTemplate(),f=x?x(this.latestValues,""):void 0,m=f!==this.prevTransformTemplateValue;l&&this.instance&&(c||Li(this.latestValues)||m)&&(o(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const c=this.measurePageBox();let x=this.removeElementScroll(c);return l&&(x=this.removeTransform(x)),Ck(x),{animationId:this.root.animationId,measuredBox:c,layoutBox:x,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return Ht();const c=l.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(yk))){const{scroll:f}=this.root;f&&(Br(c.x,f.offset.x),Br(c.y,f.offset.y))}return c}removeElementScroll(l){const c=Ht();if(ir(c,l),this.scroll?.wasRoot)return c;for(let x=0;x<this.path.length;x++){const f=this.path[x],{scroll:m,options:h}=f;f!==this.root&&m&&h.layoutScroll&&(m.wasRoot&&ir(c,l),Br(c.x,m.offset.x),Br(c.y,m.offset.y))}return c}applyTransform(l,c=!1,x){const f=x||Ht();ir(f,l);for(let m=0;m<this.path.length;m++){const h=this.path[m];!c&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(Br(f.x,-h.scroll.offset.x),Br(f.y,-h.scroll.offset.y)),Li(h.latestValues)&&vc(f,h.latestValues,h.layout?.layoutBox)}return Li(this.latestValues)&&vc(f,this.latestValues,this.layout?.layoutBox),f}removeTransform(l){const c=Ht();ir(c,l);for(let x=0;x<this.path.length;x++){const f=this.path[x];if(!Li(f.latestValues))continue;let m;f.instance&&(Vd(f.latestValues)&&f.updateSnapshot(),m=Ht(),ir(m,f.measurePageBox())),LE(c,f.latestValues,f.snapshot?.layoutBox,m)}return Li(this.latestValues)&&LE(c,this.latestValues),c}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==rn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const x=!!this.resumingFrom||this!==c;if(!(l||x&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:h}=this.options;if(!this.layout||!(m||h))return;this.resolvedRelativeTargetAt=rn.timestamp;const E=this.getClosestProjectingParent();E&&this.linkedParentVersion!==E.layoutVersion&&!E.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&E&&E.layout?this.createRelativeTarget(E,this.layout.layoutBox,E.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ht(),this.targetWithTransforms=Ht()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),UD(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):ir(this.target,this.layout.layoutBox),gy(this.target,this.targetDelta)):ir(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&E&&!!E.resumingFrom==!!this.resumingFrom&&!E.options.layoutScroll&&E.target&&this.animationProgress!==1?this.createRelativeTarget(E,this.target,E.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Vd(this.parent.latestValues)||Ey(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,c,x){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ht(),this.relativeTargetOrigin=Ht(),Lc(this.relativeTargetOrigin,c,x,this.options.layoutAnchor||void 0),ir(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const l=this.getLead(),c=!!this.resumingFrom||this!==l;let x=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(x=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(x=!1),this.resolvedRelativeTargetAt===rn.timestamp&&(x=!1),x)return;const{layout:f,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||m))return;ir(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,E=this.treeScale.y;ED(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Ht());const{target:C}=l;if(!C){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(jE(this.prevProjectionDelta.x,this.projectionDelta.x),jE(this.prevProjectionDelta.y,this.projectionDelta.y)),aa(this.projectionDelta,this.layoutCorrected,C,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==E||!$E(this.projectionDelta.x,this.prevProjectionDelta.x)||!$E(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",C))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.visualElement?.scheduleRender(),l){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Uo(),this.projectionDelta=Uo(),this.projectionDeltaWithTransform=Uo()}setAnimationOrigin(l,c=!1,x){const f=this.snapshot,m=f?f.latestValues:{},h={...this.latestValues},E=Uo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const C=Ht(),y=f?f.source:void 0,w=this.layout?this.layout.source:void 0,B=y!==w,F=this.getStack(),b=!F||F.members.length<=1,D=!!(B&&!b&&this.options.crossfade===!0&&!this.path.some(Ek));this.animationProgress=0;let S;const k=x?.interpolateProjection(l);this.mixTargetDelta=P=>{const R=P/1e3,M=k?.(R);M?(E.x.translate=M.x,E.x.scale=Ct(l.x.scale,1,R),E.x.origin=l.x.origin,E.x.originPoint=l.x.originPoint,E.y.translate=M.y,E.y.scale=Ct(l.y.scale,1,R),E.y.origin=l.y.origin,E.y.originPoint=l.y.originPoint):(YE(E.x,l.x,R),YE(E.y,l.y,R)),this.setTargetDelta(E),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lc(C,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),pk(this.relativeTarget,this.relativeTargetOrigin,C,R),S&&GD(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Ht()),ir(S,this.relativeTarget)),B&&(this.animationValues=h,XD(h,m,this.latestValues,R,D,b)),M&&M.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=M.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ci(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Bt.update(()=>{Bc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=yi(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ny(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),l.onUpdate&&l.onUpdate(c)},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(nk),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:c,target:x,layout:f,latestValues:m}=l;if(!(!c||!x||!f)){if(this!==l&&this.layout&&f&&Ly(this.options.animationType,this.layout.layoutBox,f.layoutBox)){x=this.target||Ht();const h=gn(this.layout.layoutBox.x);x.x.min=l.target.x.min,x.x.max=x.x.min+h;const E=gn(this.layout.layoutBox.y);x.y.min=l.target.y.min,x.y.max=x.y.min+E}ir(c,x),vc(c,m),aa(this.projectionDeltaWithTransform,this.layoutCorrected,c,m)}}registerSharedNode(l,c){this.sharedNodes.has(l)||this.sharedNodes.set(l,new tk),this.sharedNodes.get(l).add(c);const f=c.options.initialPromotionConfig;c.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(c):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){const{layoutId:l}=this.options;return l?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:l}=this.options;return l?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:c,preserveFollowOpacity:x}={}){const f=this.getStack();f&&f.promote(this,x),l&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let c=!1;const{latestValues:x}=l;if((x.z||x.rotate||x.rotateX||x.rotateY||x.rotateZ||x.skewX||x.skewY)&&(c=!0),!c)return;const f={};x.z&&Fx("z",l,f,this.animationValues);for(let m=0;m<kx.length;m++)Fx(`rotate${kx[m]}`,l,f,this.animationValues),Fx(`skew${kx[m]}`,l,f,this.animationValues);l.render();for(const m in f)l.setStaticValue(m,f[m]),this.animationValues&&(this.animationValues[m]=f[m]);l.scheduleRender()}applyProjectionStyles(l,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const x=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=Ac(c?.pointerEvents)||"",l.transform=x?x(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=Ac(c?.pointerEvents)||""),this.hasProjected&&!Li(this.latestValues)&&(l.transform=x?x({},""):"none",this.hasProjected=!1);return}l.visibility="";const m=f.animationValues||f.latestValues;this.applyTransformsToTarget();let h=qD(this.projectionDeltaWithTransform,this.treeScale,m);x&&(h=x(m,h)),l.transform=h;const{x:E,y:C}=this.projectionDelta;l.transformOrigin=`${E.origin*100}% ${C.origin*100}% 0`,f.animationValues?l.opacity=f===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:l.opacity=f===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const y in $d){if(m[y]===void 0)continue;const{correct:w,applyTo:B,isCSSVariable:F}=$d[y],b=h==="none"?m[y]:w(m[y],f);if(B){const D=B.length;for(let S=0;S<D;S++)l[B[S]]=b}else F?this.options.visualElement.renderState.vars[y]=b:l[y]=b}this.options.layoutId&&(l.pointerEvents=f===this?Ac(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>l.currentAnimation?.stop()),this.root.nodes.forEach(qE),this.root.sharedNodes.clear()}}}function ik(e){e.updateLayout()}function ok(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,a=t.source!==e.layout.source;if(o==="size")yr(m=>{const h=a?t.measuredBox[m]:t.layoutBox[m],E=gn(h);h.min=n[m].min,h.max=h.min+E});else if(o==="x"||o==="y"){const m=o==="x"?"y":"x";Wd(a?t.measuredBox[m]:t.layoutBox[m],n[m])}else Ly(o,t.layoutBox,n)&&yr(m=>{const h=a?t.measuredBox[m]:t.layoutBox[m],E=gn(n[m]);h.max=h.min+E,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+E)});const l=Uo();aa(l,n,t.layoutBox);const c=Uo();a?aa(c,e.applyTransform(r,!0),t.measuredBox):aa(c,n,t.layoutBox);const x=!jy(l);let f=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:h,layout:E}=m;if(h&&E){const C=e.options.layoutAnchor||void 0,y=Ht();Lc(y,t.layoutBox,h.layoutBox,C);const w=Ht();Lc(w,n,E.layoutBox,C),Ty(y,w)||(f=!0),m.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=y,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:x,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function sk(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ak(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function lk(e){e.clearSnapshot()}function qE(e){e.clearMeasurements()}function ck(e){e.isLayoutDirty=!0,e.updateLayout()}function KE(e){e.isLayoutDirty=!1}function uk(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function xk(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function XE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function dk(e){e.resolveTargetDelta()}function fk(e){e.calcProjection()}function hk(e){e.resetSkewAndRotation()}function mk(e){e.removeLeadSnapshot()}function YE(e,t,n){e.translate=Ct(t.translate,0,n),e.scale=Ct(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function QE(e,t,n,r){e.min=Ct(t.min,n.min,r),e.max=Ct(t.max,n.max,r)}function pk(e,t,n,r){QE(e.x,t.x,n.x,r),QE(e.y,t.y,n.y,r)}function Ek(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const gk={duration:.45,ease:[.4,0,.1,1]},JE=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ZE=JE("applewebkit/")&&!JE("chrome/")?Math.round:qn;function eg(e){e.min=ZE(e.min),e.max=ZE(e.max)}function Ck(e){eg(e.x),eg(e.y)}function Ly(e,t,n){return e==="position"||e==="preserve-aspect"&&!VD(UE(t),UE(n),.2)}function yk(e){return e!==e.root&&e.scroll?.wasRoot}const vk=Iy({attachResizeListener:(e,t)=>Aa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Sx={current:void 0},Oy=Iy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Sx.current){const e=new vk({});e.mount(window),e.setOptions({layoutScroll:!0}),Sx.current=e}return Sx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Qo=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function tg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ak(...e){return t=>{let n=!1;const r=e.map(o=>{const a=tg(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():tg(e[o],null)}}}}function Bk(...e){return A.useCallback(Ak(...e),e)}class wk extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(pc(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,o=pc(r)&&r.offsetWidth||0,a=pc(r)&&r.offsetHeight||0,l=getComputedStyle(n),c=this.props.sizeRef.current;c.height=parseFloat(l.height),c.width=parseFloat(l.width),c.top=n.offsetTop,c.left=n.offsetLeft,c.right=o-c.width-c.left,c.bottom=a-c.height-c.top,c.direction=l.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function Dk({children:e,isPresent:t,anchorX:n,anchorY:r,root:o,pop:a}){const l=A.useId(),c=A.useRef(null),x=A.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:f}=A.useContext(Qo),m=a!==!1?e.props?.ref??e?.ref:void 0,h=Bk(c,m);return A.useInsertionEffect(()=>{const{width:E,height:C,top:y,left:w,right:B,bottom:F,direction:b}=x.current;if(t||a===!1||!c.current||!E||!C)return;const D=b==="rtl",S=n==="left"?D?`right: ${B}`:`left: ${w}`:D?`left: ${w}`:`right: ${B}`,k=r==="bottom"?`bottom: ${F}`:`top: ${y}`;c.current.dataset.motionPopId=l;const P=document.createElement("style");f&&(P.nonce=f);const R=o??document.head;return R.appendChild(P),P.sheet&&P.sheet.insertRule(`
|
|
379
|
+
[data-motion-pop-id="${l}"] {
|
|
380
|
+
position: absolute !important;
|
|
381
|
+
width: ${E}px !important;
|
|
382
|
+
height: ${C}px !important;
|
|
383
|
+
${S}px !important;
|
|
384
|
+
${k}px !important;
|
|
385
|
+
}
|
|
386
|
+
`),()=>{c.current?.removeAttribute("data-motion-pop-id"),R.contains(P)&&R.removeChild(P)}},[t]),d.jsx(wk,{isPresent:t,childRef:c,sizeRef:x,pop:a,children:a===!1?e:A.cloneElement(e,{ref:h})})}const kk=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:a,mode:l,anchorX:c,anchorY:x,root:f})=>{const m=Pa(Fk),h=A.useId(),E=A.useRef(n),C=A.useRef(r);Of(()=>{E.current=n,C.current=r});let y=!0,w=A.useMemo(()=>(y=!1,{id:h,initial:t,isPresent:n,custom:o,onExitComplete:B=>{m.set(B,!0);for(const F of m.values())if(!F)return;r&&r()},register:B=>(m.set(B,!1),()=>{m.delete(B),!E.current&&!m.size&&C.current?.()})}),[n,m,r]);return a&&y&&(w={...w}),A.useMemo(()=>{m.forEach((B,F)=>m.set(F,!1))},[n]),A.useEffect(()=>{!n&&!m.size&&r&&r()},[n]),e=d.jsx(Dk,{pop:l==="popLayout",isPresent:n,anchorX:c,anchorY:x,root:f,children:e}),d.jsx(cu.Provider,{value:w,children:e})};function Fk(){return new Map}function zy(e=!0){const t=A.useContext(cu);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,a=A.useId();A.useEffect(()=>{if(e)return o(a)},[e]);const l=A.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,l]:[!0]}const tc=e=>e.key||"";function ng(e){const t=[];return A.Children.forEach(e,n=>{A.isValidElement(n)&&t.push(n)}),t}const Sk=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:a="sync",propagate:l=!1,anchorX:c="left",anchorY:x="top",root:f})=>{const[m,h]=zy(l),E=A.useMemo(()=>ng(e),[e]),C=l&&!m?[]:E.map(tc),y=A.useRef(!0),w=A.useRef(E),B=Pa(()=>new Map),F=A.useRef(new Set),[b,D]=A.useState(E),[S,k]=A.useState(E);Of(()=>{y.current=!1,w.current=E;for(let M=0;M<S.length;M++){const O=tc(S[M]);C.includes(O)?(B.delete(O),F.current.delete(O)):B.get(O)!==!0&&B.set(O,!1)}},[S,C.length,C.join("-")]);const P=[];if(E!==b){let M=[...E];for(let O=0;O<S.length;O++){const T=S[O],V=tc(T);C.includes(V)||(M.splice(O,0,T),P.push(T))}return a==="wait"&&P.length&&(M=P),k(ng(M)),D(E),null}const{forceRender:R}=A.useContext(Lf);return d.jsx(d.Fragment,{children:S.map(M=>{const O=tc(M),T=l&&!m?!1:E===S||C.includes(O),V=()=>{if(F.current.has(O))return;if(B.has(O))F.current.add(O),B.set(O,!0);else return;let z=!0;B.forEach(J=>{J||(z=!1)}),z&&(R?.(),k(w.current),l&&h?.(),r&&r())};return d.jsx(kk,{isPresent:T,initial:!y.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:a,root:f,onExitComplete:T?void 0:V,anchorX:c,anchorY:x,children:M},O)})})},Vy=A.createContext({strict:!1}),rg={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let ig=!1;function bk(){if(ig)return;const e={};for(const t in rg)e[t]={isEnabled:n=>rg[t].some(r=>!!n[r])};fy(e),ig=!0}function Uy(){return bk(),hD()}function Pk(e){const t=Uy();for(const n in e)t[n]={...t[n],...e[n]};fy(t)}const _k=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Oc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||_k.has(e)}let $y=e=>!Oc(e);function Wy(e){typeof e=="function"&&($y=t=>t.startsWith("on")?!Oc(t):e(t))}try{Wy(require("@emotion/is-prop-valid").default)}catch{}function jk(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||Yt(e[o])||($y(o)||n===!0&&Oc(o)||!t&&!Oc(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Tk({children:e,isValidProp:t,...n}){t&&Wy(t);const r=A.useContext(Qo);n={...r,...n},n.transition=Zf(n.transition,r.transition),n.isStatic=Pa(()=>n.isStatic);const o=A.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return d.jsx(Qo.Provider,{value:o,children:e})}const mu=A.createContext({});function Rk(e,t){if(hu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||va(n)?n:void 0,animate:va(r)?r:void 0}}return e.inherit!==!1?t:{}}function Nk(e){const{initial:t,animate:n}=Rk(e,A.useContext(mu));return A.useMemo(()=>({initial:t,animate:n}),[og(t),og(n)])}function og(e){return Array.isArray(e)?e.join(" "):e}const hh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Hy(e,t,n){for(const r in t)!Yt(t[r])&&!vy(r,n)&&(e[r]=t[r])}function Mk({transformTemplate:e},t){return A.useMemo(()=>{const n=hh();return dh(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Ik(e,t){const n=e.style||{},r={};return Hy(r,n,e),Object.assign(r,Mk(e,t)),r}function Lk(e,t){const n={},r=Ik(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Gy=()=>({...hh(),attrs:{}});function Ok(e,t,n,r){const o=A.useMemo(()=>{const a=Gy();return By(a,t,Dy(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Hy(a,e.style,e),o.style={...a,...o.style}}return o}const zk=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function mh(e){return typeof e!="string"||e.includes("-")?!1:!!(zk.indexOf(e)>-1||/[A-Z]/u.test(e))}function Vk(e,t,n,{latestValues:r},o,a=!1,l){const x=(l??mh(e)?Ok:Lk)(t,r,o,e),f=jk(t,typeof e=="string",a),m=e!==A.Fragment?{...f,...x,ref:n}:{},{children:h}=t,E=A.useMemo(()=>Yt(h)?h.get():h,[h]);return A.createElement(e,{...m,children:E})}function Uk({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:$k(n,r,o,e),renderState:t()}}function $k(e,t,n,r){const o={},a=r(e,{});for(const E in a)o[E]=Ac(a[E]);let{initial:l,animate:c}=e;const x=hu(e),f=xy(e);t&&f&&!x&&e.inherit!==!1&&(l===void 0&&(l=t.initial),c===void 0&&(c=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const h=m?c:l;if(h&&typeof h!="boolean"&&!fu(h)){const E=Array.isArray(h)?h:[h];for(let C=0;C<E.length;C++){const y=nh(e,E[C]);if(y){const{transitionEnd:w,transition:B,...F}=y;for(const b in F){let D=F[b];if(Array.isArray(D)){const S=m?D.length-1:0;D=D[S]}D!==null&&(o[b]=D)}for(const b in w)o[b]=w[b]}}}return o}const qy=e=>(t,n)=>{const r=A.useContext(mu),o=A.useContext(cu),a=()=>Uk(e,t,r,o);return n?a():Pa(a)},Wk=qy({scrapeMotionValuesFromProps:fh,createRenderState:hh}),Hk=qy({scrapeMotionValuesFromProps:ky,createRenderState:Gy}),Gk=Symbol.for("motionComponentSymbol");function qk(e,t,n){const r=A.useRef(n);A.useInsertionEffect(()=>{r.current=n});const o=A.useRef(null);return A.useCallback(a=>{a&&e.onMount?.(a),t&&(a?t.mount(a):t.unmount());const l=r.current;if(typeof l=="function")if(a){const c=l(a);typeof c=="function"&&(o.current=c)}else o.current?(o.current(),o.current=null):l(a);else l&&(l.current=a)},[t])}const Ky=A.createContext({});function Lo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Kk(e,t,n,r,o,a){const{visualElement:l}=A.useContext(mu),c=A.useContext(Vy),x=A.useContext(cu),f=A.useContext(Qo),m=f.reducedMotion,h=f.skipAnimations,E=A.useRef(null),C=A.useRef(!1);r=r||c.renderer,!E.current&&r&&(E.current=r(e,{visualState:t,parent:l,props:n,presenceContext:x,blockInitialAnimation:x?x.initial===!1:!1,reducedMotionConfig:m,skipAnimations:h,isSVG:a}),C.current&&E.current&&(E.current.manuallyAnimateOnMount=!0));const y=E.current,w=A.useContext(Ky);y&&!y.projection&&o&&(y.type==="html"||y.type==="svg")&&Xk(E.current,n,o,w);const B=A.useRef(!1);A.useInsertionEffect(()=>{y&&B.current&&y.update(n,x)});const F=n[ey],b=A.useRef(!!F&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(F)&&window.MotionHasOptimisedAnimation?.(F));return Of(()=>{C.current=!0,y&&(B.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),b.current&&y.animationState&&y.animationState.animateChanges())}),A.useEffect(()=>{y&&(!b.current&&y.animationState&&y.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(F)}),b.current=!1),y.enteringChildren=void 0)}),y}function Xk(e,t,n,r){const{layoutId:o,layout:a,drag:l,dragConstraints:c,layoutScroll:x,layoutRoot:f,layoutAnchor:m,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Xy(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:!!l||c&&Lo(c),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:x,layoutRoot:f,layoutAnchor:m})}function Xy(e){if(e)return e.options.allowProjection!==!1?e.projection:Xy(e.parent)}function bx(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&Pk(r);const a=n?n==="svg":mh(e),l=a?Hk:Wk;function c(f,m){let h;const E={...A.useContext(Qo),...f,layoutId:Yk(f)},{isStatic:C}=E,y=Nk(f),w=l(f,C);if(!C&&typeof window<"u"){Qk();const B=Jk(E);h=B.MeasureLayout,y.visualElement=Kk(e,w,E,o,B.ProjectionNode,a)}return d.jsxs(mu.Provider,{value:y,children:[h&&y.visualElement?d.jsx(h,{visualElement:y.visualElement,...E}):null,Vk(e,f,qk(w,y.visualElement,m),w,C,t,a)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const x=A.forwardRef(c);return x[Gk]=e,x}function Yk({layoutId:e}){const t=A.useContext(Lf).id;return t&&e!==void 0?t+"-"+e:e}function Qk(e,t){A.useContext(Vy).strict}function Jk(e){const t=Uy(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function Zk(e,t){if(typeof Proxy>"u")return bx;const n=new Map,r=(a,l)=>bx(a,l,e,t),o=(a,l)=>r(a,l);return new Proxy(o,{get:(a,l)=>l==="create"?r:(n.has(l)||n.set(l,bx(l,void 0,e,t)),n.get(l))})}const eF=(e,t)=>t.isSVG??mh(e)?new Fy(t):new Ay(t,{allowProjection:e!==A.Fragment});class tF extends vi{constructor(t){super(t),t.animationState||(t.animationState=ND(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();fu(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let nF=0;class rF extends vi{constructor(){super(...arguments),this.id=nF++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:a,custom:l}=this.node.getProps();if(typeof a=="string"||typeof a=="object"&&a!==null&&!Array.isArray(a)){const c=Qi(this.node,a,l);if(c){const{transition:x,transitionEnd:f,...m}=c;for(const h in m)this.node.getValue(h)?.jump(m[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const iF={animation:{Feature:tF},exit:{Feature:rF}};function Ra(e){return{point:{x:e.pageX,y:e.pageY}}}const oF=e=>t=>lh(t)&&e(t,Ra(t));function la(e,t,n,r){return Aa(e,t,oF(n),r)}const Yy=({current:e})=>e?e.ownerDocument.defaultView:null,sg=(e,t)=>Math.abs(e-t);function sF(e,t){const n=sg(e.x,t.x),r=sg(e.y,t.y);return Math.sqrt(n**2+r**2)}const ag=new Set(["auto","scroll"]);class Qy{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:a=!1,distanceThreshold:l=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=y=>{this.handleScroll(y.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=nc(this.lastRawMoveEventInfo,this.transformPagePoint));const y=Px(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,B=sF(y.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!B)return;const{point:F}=y,{timestamp:b}=rn;this.history.push({...F,timestamp:b});const{onStart:D,onMove:S}=this.handlers;w||(D&&D(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,y)},this.handlePointerMove=(y,w)=>{this.lastMoveEvent=y,this.lastRawMoveEventInfo=w,this.lastMoveEventInfo=nc(w,this.transformPagePoint),Bt.update(this.updatePoint,!0)},this.handlePointerUp=(y,w)=>{this.end();const{onEnd:B,onSessionEnd:F,resumeAnimation:b}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const D=Px(y.type==="pointercancel"?this.lastMoveEventInfo:nc(w,this.transformPagePoint),this.history);this.startEvent&&B&&B(y,D),F&&F(y,D)},!lh(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=o||window;const x=Ra(t),f=nc(x,this.transformPagePoint),{point:m}=f,{timestamp:h}=rn;this.history=[{...m,timestamp:h}];const{onSessionStart:E}=n;E&&E(t,Px(f,this.history));const C={passive:!0,capture:!0};this.removeListeners=_a(la(this.contextWindow,"pointermove",this.handlePointerMove,C),la(this.contextWindow,"pointerup",this.handlePointerUp,C),la(this.contextWindow,"pointercancel",this.handlePointerUp,C)),c&&this.startScrollTracking(c)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(ag.has(r.overflowX)||ag.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},a={x:o.x-n.x,y:o.y-n.y};a.x===0&&a.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(t,o),Bt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ci(this.updatePoint)}}function nc(e,t){return t?{point:t(e.point)}:e}function lg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Px({point:e},t){return{point:e,delta:lg(e,Jy(t)),offset:lg(e,aF(t)),velocity:lF(t,.1)}}function aF(e){return e[0]}function Jy(e){return e[e.length-1]}function lF(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Jy(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Fn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>Fn(t)*2&&(r=e[1]);const a=Gn(o.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const l={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function cF(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ct(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ct(n,e,r.max):Math.min(e,n)),e}function cg(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function uF(e,{top:t,left:n,bottom:r,right:o}){return{x:cg(e.x,n,o),y:cg(e.y,t,r)}}function ug(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function xF(e,t){return{x:ug(e.x,t.x),y:ug(e.y,t.y)}}function dF(e,t){let n=.5;const r=gn(e),o=gn(t);return o>r?n=Xo(t.min,t.max-r,e.min):r>o&&(n=Xo(e.min,e.max-o,t.min)),kr(0,1,n)}function fF(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Hd=.35;function hF(e=Hd){return e===!1?e=0:e===!0&&(e=Hd),{x:xg(e,"left","right"),y:xg(e,"top","bottom")}}function xg(e,t,n){return{min:dg(e,t),max:dg(e,n)}}function dg(e,t){return typeof e=="number"?e:e[t]||0}const mF=new WeakMap;class pF{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ht(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const a=h=>{n&&this.snapToCursor(Ra(h).point),this.stopAnimation()},l=(h,E)=>{const{drag:C,dragPropagation:y,onDragStart:w}=this.getProps();if(C&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=qw(C),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=E,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),yr(F=>{let b=this.getAxisMotionValue(F).get()||0;if(Dr.test(b)){const{projection:D}=this.visualElement;if(D&&D.layout){const S=D.layout.layoutBox[F];S&&(b=gn(S)*(parseFloat(b)/100))}}this.originPoint[F]=b}),w&&Bt.update(()=>w(h,E),!1,!0),Md(this.visualElement,"transform");const{animationState:B}=this.visualElement;B&&B.setActive("whileDrag",!0)},c=(h,E)=>{this.latestPointerEvent=h,this.latestPanInfo=E;const{dragPropagation:C,dragDirectionLock:y,onDirectionLock:w,onDrag:B}=this.getProps();if(!C&&!this.openDragLock)return;const{offset:F}=E;if(y&&this.currentDirection===null){this.currentDirection=gF(F),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",E.point,F),this.updateAxis("y",E.point,F),this.visualElement.render(),B&&Bt.update(()=>B(h,E),!1,!0)},x=(h,E)=>{this.latestPointerEvent=h,this.latestPanInfo=E,this.stop(h,E),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new Qy(t,{onSessionStart:a,onStart:l,onMove:c,onSessionEnd:x,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:Yy(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!o||!r)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&Bt.postRender(()=>c(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!rc(t,o,this.currentDirection))return;const a=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=cF(l,this.constraints[t],this.elastic[t])),a.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&Lo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=uF(r.layoutBox,t):this.constraints=!1,this.elastic=hF(n),o!==this.constraints&&!Lo(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&yr(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=fF(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Lo(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;o.root&&(o.root.scroll=void 0,o.root.updateScroll());const a=gD(r,o.root,this.visualElement.getTransformPagePoint());let l=xF(o.layout.layoutBox,a);if(n){const c=n(mD(l));this.hasMutatedConstraints=!!c,c&&(l=py(c))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:a,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),x=this.constraints||{},f=yr(m=>{if(!rc(m,n,this.currentDirection))return;let h=x&&x[m]||{};(l===!0||l===m)&&(h={min:0,max:0});const E=o?200:1e6,C=o?40:1e7,y={type:"inertia",velocity:r?t[m]:0,bounceStiffness:E,bounceDamping:C,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(m,y)});return Promise.all(f).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Md(this.visualElement,t),r.start(th(t,r,0,n,this.visualElement,!1))}stopAnimation(){yr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps()[n];return o||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){yr(n=>{const{drag:r}=this.getProps();if(!rc(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,a=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:c}=o.layout.layoutBox[n],x=a.get()||0;a.set(t[n]-Ct(l,c,.5)+x)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Lo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};yr(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const x=c.get();o[l]=dF({min:x,max:x},this.constraints[l])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),yr(l=>{if(!rc(l,t,null))return;const c=this.getAxisMotionValue(l),{min:x,max:f}=this.constraints[l];c.set(Ct(x,f,o[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;mF.set(this.visualElement,this);const t=this.visualElement.current,n=la(t,"pointerdown",f=>{const{drag:m,dragListener:h=!0}=this.getProps(),E=f.target,C=E!==t&&Zw(E);m&&h&&!C&&this.start(f)});let r;const o=()=>{const{dragConstraints:f}=this.getProps();Lo(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),r||(r=EF(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,l=a.addEventListener("measure",o);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Bt.read(o);const c=Aa(window,"resize",()=>this.scalePositionWithinConstraints()),x=a.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:m})=>{this.isDragging&&m&&(yr(h=>{const E=this.getAxisMotionValue(h);E&&(this.originPoint[h]+=f[h].translate,E.set(E.get()+f[h].translate))}),this.visualElement.render())}));return()=>{c(),n(),l(),x&&x(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:a=!1,dragElastic:l=Hd,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:a,dragElastic:l,dragMomentum:c}}}function fg(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function EF(e,t,n){const r=yE(e,fg(n)),o=yE(t,fg(n));return()=>{r(),o()}}function rc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function gF(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class CF extends vi{constructor(t){super(t),this.removeGroupControls=qn,this.removeListeners=qn,this.controls=new pF(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||qn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const _x=e=>(t,n)=>{e&&Bt.update(()=>e(t,n),!1,!0)};class yF extends vi{constructor(){super(...arguments),this.removePointerDownListener=qn}onPointerDown(t){this.session=new Qy(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yy(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:_x(t),onStart:_x(n),onMove:_x(r),onEnd:(a,l)=>{delete this.session,o&&Bt.postRender(()=>o(a,l))}}}mount(){this.removePointerDownListener=la(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let jx=!1;class vF extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:a}=t;a&&(n.group&&n.group.add(a),r&&r.register&&o&&r.register(a),jx&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Bc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:a}=this.props,{projection:l}=r;return l&&(l.isPresent=a,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),jx=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==a?l.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?l.promote():l.relegate()||Bt.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),ah.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;jx=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Zy(e){const[t,n]=zy(),r=A.useContext(Lf);return d.jsx(vF,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(Ky),isPresent:t,safeToRemove:n})}const AF={pan:{Feature:yF},drag:{Feature:CF,ProjectionNode:Oy,MeasureLayout:Zy}};function hg(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,a=r[o];a&&Bt.postRender(()=>a(t,Ra(t)))}class BF extends vi{mount(){const{current:t}=this.node;t&&(this.unmount=Xw(t,(n,r)=>(hg(this.node,r,"Start"),o=>hg(this.node,o,"End"))))}unmount(){}}class wF extends vi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_a(Aa(this.node.current,"focus",()=>this.onFocus()),Aa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function mg(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),a=r[o];a&&Bt.postRender(()=>a(t,Ra(t)))}class DF extends vi{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=tD(t,(o,a)=>(mg(this.node,a,"Start"),(l,{success:c})=>mg(this.node,l,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const Gd=new WeakMap,Tx=new WeakMap,kF=e=>{const t=Gd.get(e.target);t&&t(e)},FF=e=>{e.forEach(kF)};function SF({root:e,...t}){const n=e||document;Tx.has(n)||Tx.set(n,{});const r=Tx.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(FF,{root:e,...t})),r[o]}function bF(e,t,n){const r=SF(t);return Gd.set(e,n),r.observe(e),()=>{Gd.delete(e),r.unobserve(e)}}const PF={some:0,all:1};class _F extends vi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:a}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:PF[o]},c=x=>{const{isIntersecting:f}=x;if(this.isInView===f||(this.isInView=f,a&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:m,onViewportLeave:h}=this.node.getProps(),E=f?m:h;E&&E(x)};this.stopObserver=bF(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(jF(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function jF({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const TF={inView:{Feature:_F},tap:{Feature:DF},focus:{Feature:wF},hover:{Feature:BF}},RF={layout:{ProjectionNode:Oy,MeasureLayout:Zy}},NF={...iF,...TF,...AF,...RF},Xi=Zk(NF,eF);function MF(e){const t=Pa(()=>yi(e)),{isStatic:n}=A.useContext(Qo);if(n){const[,r]=A.useState(e);A.useEffect(()=>t.on("change",r),[])}return t}function IF(){!xh.current&&dy();const[e]=A.useState(Nc.current);return e}function ph(e){return typeof e=="object"&&!Array.isArray(e)}function ev(e,t,n,r){return e==null?[]:typeof e=="string"&&ph(t)?sh(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function LF(e,t,n){return e*(t+1)+n*t}function pg(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function OF(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Ko(e,o),r--)}}function zF(e,t,n,r,o,a){OF(e,o,a);for(let l=0;l<t.length;l++)e.push({value:t[l],at:Ct(o,a,r[l]),easing:DC(n,l)})}function VF(e,t,n=0){const r=t+1+t*n;for(let o=0;o<e.length;o++)e[o]=e[o]/r}function UF(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const $F="easeInOut",WF=20;function HF(e,{defaultTransition:t={},...n}={},r,o){const a=t.duration||.3,l=new Map,c=new Map,x={},f=new Map;let m=0,h=0,E=0;for(let C=0;C<e.length;C++){const y=e[C];if(typeof y=="string"){f.set(y,h);continue}else if(!Array.isArray(y)){f.set(y.name,pg(h,y.at,m,f));continue}let[w,B,F={}]=y;F.at!==void 0&&(h=pg(h,F.at,m,f));let b=0;const D=(S,k,P,R=0,M=0)=>{const O=GF(S),{delay:T=0,times:V=zC(O),type:z=t.type||"keyframes",repeat:J,repeatType:H,repeatDelay:W=0,...re}=k;let{ease:Z=t.ease||"easeOut",duration:K}=k;const ie=typeof T=="function"?T(R,M):T,j=O.length,I=Jf(z)?z:o?.[z||"keyframes"];if(j<=2&&I){let Ee=100;if(j===2&&XF(O)){const we=O[1]-O[0];Ee=Math.abs(we)}const se={...t,...re};K!==void 0&&(se.duration=Fn(K));const xe=IC(se,Ee,I);Z=xe.ease,K=xe.duration}K??(K=a);const G=h+ie;V.length===1&&V[0]===0&&(V[1]=1);const N=V.length-O.length;if(N>0&&OC(V,N),O.length===1&&O.unshift(null),J&&J<WF){const Ee=K>0?W/K:0;K=LF(K,J,W);const se=[...O],xe=[...V];Z=Array.isArray(Z)?[...Z]:[Z];const we=[...Z],de=H==="reverse"||H==="mirror";let et=se,Ie=we;de&&(et=[...se].reverse(),H==="reverse"&&(Ie=[...we].reverse().map(oe=>typeof oe=="function"?Uf(oe):oe)));for(let oe=0;oe<J;oe++){const Me=de&&oe%2===0,be=Me?et:se,Ye=Me?Ie:we,Je=(oe+1)*(1+Ee);Ee>0&&(O.push(O[O.length-1]),V.push(Je),Z.push("linear")),O.push(...be);for(let Qe=0;Qe<be.length;Qe++)V.push(xe[Qe]+Je),Z.push(Qe===0?"linear":DC(Ye,Qe-1))}VF(V,J,Ee)}const ae=G+K;zF(P,O,Z,V,G,ae),b=Math.max(ie+K,b),E=Math.max(ae,E)};if(Yt(w)){const S=Eg(w,c);D(B,F,gg("default",S))}else{const S=ev(w,B,r,x),k=S.length;for(let P=0;P<k;P++){B=B,F=F;const R=S[P],M=Eg(R,c);for(const O in B)D(B[O],qF(F,O),gg(O,M),P,k)}}m=h,h+=b}return c.forEach((C,y)=>{for(const w in C){const B=C[w];B.sort(UF);const F=[],b=[],D=[];for(let R=0;R<B.length;R++){const{at:M,value:O,easing:T}=B[R];F.push(O),b.push(Xo(0,E,M)),D.push(T||"easeOut")}b[0]!==0&&(b.unshift(0),F.unshift(F[0]),D.unshift($F)),b[b.length-1]!==1&&(b.push(1),F.push(null)),l.has(y)||l.set(y,{keyframes:{},transition:{}});const S=l.get(y);S.keyframes[w]=F;const{type:k,...P}=t;S.transition[w]={...P,duration:E,ease:D,times:b,...n}}}),l}function Eg(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function gg(e,t){return t[e]||(t[e]=[]),t[e]}function GF(e){return Array.isArray(e)?e:[e]}function qF(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const KF=e=>typeof e=="number",XF=e=>e.every(KF);function YF(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=du(e)&&!uy(e)?new Fy(t):new Ay(t);n.mount(e),ya.set(e,n)}function QF(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new DD(t);n.mount(e),ya.set(e,n)}function JF(e,t){return Yt(e)||typeof e=="number"||typeof e=="string"&&!ph(t)}function tv(e,t,n,r){const o=[];if(JF(e,t))o.push(Ny(e,ph(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const a=ev(e,t,r),l=a.length;for(let c=0;c<l;c++){const x=a[c],f=x instanceof Element?YF:QF;ya.has(x)||f(x);const m=ya.get(x),h={...n};"delay"in h&&typeof h.delay=="function"&&(h.delay=h.delay(c,l)),o.push(...ih(m,{...t,transition:h},{}))}}return o}function ZF(e,t,n){const r=[],o=e.map(l=>{if(Array.isArray(l)&&typeof l[0]=="function"){const c=l[0],x=yi(0);return x.on("change",c),l.length===1?[x,[0,1]]:l.length===2?[x,[0,1],l[1]]:[x,l[1],l[2]]}return l});return HF(o,t,n,{spring:Ca}).forEach(({keyframes:l,transition:c},x)=>{r.push(...tv(x,l,c))}),r}function e3(e){return Array.isArray(e)&&e.some(Array.isArray)}function t3(e={}){const{scope:t,reduceMotion:n,skipAnimations:r}=e;function o(a,l,c){let x=[],f;const m={};if(n!==void 0&&(m.reduceMotion=n),r!==void 0&&(m.skipAnimations=r),e3(a)){const{onComplete:E,...C}=l||{};typeof E=="function"&&(f=E),x=ZF(a,{...m,...C},t)}else{const{onComplete:E,...C}=c||{};typeof E=="function"&&(f=E),x=tv(a,l,{...m,...C},t)}const h=new pw(x);return f&&h.finished.then(f),t&&(t.animations.push(h),h.finished.then(()=>{Ko(t.animations,h)})),h}return o}const n3=t3();function Eh(){return typeof document>"u"?"/":document.querySelector('meta[name="ours-base-path"]')?.content??"/"}function Kn(e){return Eh()+e.replace(/^\//,"")}function r3(e){const t=Eh();return e.startsWith(t)?"/"+e.slice(t.length):e}class zc extends Error{constructor(t,n){super(n),this.status=t}}function i3(e){let t="";for(let r=0;r<e.length;r+=32768)t+=String.fromCharCode(...e.subarray(r,r+32768));return btoa(t)}function o3(e=globalThis.fetch.bind(globalThis)){async function t(n,r){const o=(r?.method??"GET").toUpperCase(),a=o!=="GET"&&o!=="HEAD",l=await e(Kn(n),{...r,cache:"no-store",credentials:"same-origin",headers:a?{"content-type":"application/json","X-Ours-Messenger-CSRF":"1",...r?.headers}:r?.headers}),c=await l.text();let x=null;if(c)try{x=JSON.parse(c)}catch{throw new zc(l.status,l.ok?"Server returned an invalid response":`HTTP ${l.status}`)}if(!l.ok){const f=x&&typeof x=="object"&&"error"in x&&x.error&&typeof x.error=="object"&&"message"in x.error&&typeof x.error.message=="string"?x.error.message:`HTTP ${l.status}`;throw new zc(l.status,f)}return x}return{identity:()=>t("/api/identity"),setBio:n=>t("/api/identity/bio",{method:"POST",body:JSON.stringify({bio:n})}),buildInfo:()=>t("/api/build-info"),identities:()=>t("/api/identities"),contacts:()=>t("/api/contacts"),invites:()=>t("/api/invites"),conversation:(n,r,o)=>t(`/api/conversations/${encodeURIComponent(n)}/page?limit=50${r?`&before=${encodeURIComponent(r)}`:""}`,{signal:o}),markRead:n=>t(`/api/conversations/${encodeURIComponent(n)}/read`,{method:"POST"}),send:(n,r,o,a)=>t("/api/messages/send",{method:"POST",signal:a,body:JSON.stringify({contact:n,text:r,...o?{reply_to_wire_id:o}:{}})}),commands:(n,r)=>t(`/api/contacts/${encodeURIComponent(n)}/commands`,{signal:r}),sendCommand:(n,r,o,a,l,c)=>t("/api/commands/send",{method:"POST",signal:c,body:JSON.stringify({contact:n,recipient_cid:n,command:r,arguments:o,invocation_id:a,catalog_fingerprint:l,confirmed:!0})}),sendFile:async(n,r,o,a,l)=>t("/api/messages/send-file",{method:"POST",body:JSON.stringify({contact:n,data_base64:i3(new Uint8Array(await r.arrayBuffer())),filename:o,mime:a,...l?{reply_to_wire_id:l}:{}})}),files:n=>t(`/api/conversations/${encodeURIComponent(n)}/files`),fetchFiles:n=>t("/api/files/fetch",{method:"POST",body:JSON.stringify({wire_ids:n})}),mediaUrl:n=>Kn(`/api/media/${encodeURIComponent(n)}`),createInvite:(n="one_time",r)=>t("/api/invites",{method:"POST",body:JSON.stringify({mode:n,...r?{name:r}:{}})}),addContact:(n,r)=>t("/api/contacts/add",{method:"POST",body:JSON.stringify({invite:n,...r?{name:r}:{}})}),renameContact:(n,r)=>t("/api/contacts/rename",{method:"POST",body:JSON.stringify({contact:n,name:r})}),removeContact:n=>t("/api/contacts/remove",{method:"POST",body:JSON.stringify({contact:n})}),revokeInvite:n=>t("/api/invites/revoke",{method:"POST",body:JSON.stringify({invite_id:n})}),respondToIntroduction:(n,r)=>t("/api/contacts/introductions",{method:"POST",body:JSON.stringify({contact:n,action:r})}),vapidPublicKey:()=>t("/api/push/vapid-public-key"),ensurePush:n=>t("/api/push/subscriptions/ensure",{method:"POST",body:JSON.stringify(n)}),deletePush:n=>t("/api/push/subscriptions/delete",{method:"POST",body:JSON.stringify({binding_id:n})})}}const xt=o3(),qd="ours-messenger-live-event";function nv(e){window.dispatchEvent(new CustomEvent(qd,{detail:e}))}function s3(e){const t=n=>{const r=n.detail;r?.v===1&&e(r)};return window.addEventListener(qd,t),()=>window.removeEventListener(qd,t)}function a3(e,t){const n=new EventSource(Kn("/api/events"));let r=!1;t("connecting"),n.onopen=()=>{r=!0,t("live")},n.onerror=()=>t(r?"retrying":"connecting");const o=a=>{n.addEventListener(a,l=>{try{const c=JSON.parse(l.data);c&&c.v===1&&e({...c,type:a})}catch{}})};return o("sync_required"),o("message_received"),o("receipt_received"),o("file_received"),()=>n.close()}function l3(e=window.location){return`${e.protocol==="https:"?"wss:":"ws:"}//${e.host}${Kn("/api/presence")}`}function c3(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e;if(t.type!=="event"||!t.event||typeof t.event!="object")return null;const n=t.event;return n.v===1?n:null}function u3(e){let t=!1,n=null,r,o=1e3,a=0;const l=()=>{r!==void 0&&clearTimeout(r),r=void 0;const m=n;n=null,m&&m.readyState<WebSocket.CLOSING&&m.close(1e3,"hidden")},c=()=>{if(t||document.visibilityState!=="visible")return;e.onState?.("retrying");const m=o;o=Math.min(3e4,o*2),r=setTimeout(()=>{r=void 0,x()},m)},x=async()=>{if(l(),t||document.visibilityState!=="visible")return;const m=++a;e.onState?.("connecting");try{const[h,E]=await Promise.all([e.identity(),e.registration.pushManager.getSubscription()]);if(t||m!==a||document.visibilityState!=="visible")return;const C=E?.toJSON(),y=E?.endpoint,w=C?.keys?.auth;if(!y||!w)return;const B=new WebSocket(l3());n=B,B.onopen=()=>B.send(JSON.stringify({identity:h.cid,endpoint:y,auth:w})),B.onmessage=F=>{let b;try{b=JSON.parse(String(F.data))}catch{return}if(b?.ok===!0){o=1e3,e.onState?.("live");return}const D=c3(b);D&&e.onEvent(D)},B.onclose=()=>{n===B&&(n=null),m===a&&c()},B.onerror=()=>B.close()}catch{m===a&&c()}},f=()=>{a++,document.visibilityState==="visible"?(o=1e3,x()):l()};return document.addEventListener("visibilitychange",f),window.addEventListener("pagehide",l),x(),()=>{t=!0,a++,document.removeEventListener("visibilitychange",f),window.removeEventListener("pagehide",l),l()}}function x3(e,t){return t.visibility==="visible"&&t.appRoute==="chats"&&t.selectedContactCid===e&&(t.desktopLayout||t.mobileDetailOpen)&&!t.conversationCoveringDialogOpen}class d3{#e=new Map;request(t,n){let r=this.#e.get(t);return r?.running?(r.rerun=!0,r.running):(r??={running:null,rerun:!1},this.#e.set(t,r),r.running=(async()=>{do r.rerun=!1,await n();while(r.rerun)})().finally(()=>{r.running=null,r.rerun||this.#e.delete(t)}),r.running)}}function Rx(e){if(e=r3(e),e==="/"||e==="/chats"||e==="/chats/")return{name:"chats",contactCid:null};const t=/^\/chats\/([^/]+)\/contact\/?$/.exec(e);if(t)try{const r=decodeURIComponent(t[1]);if(r)return{name:"contact",contactCid:r}}catch{}const n=/^\/chats\/([^/]+)\/?$/.exec(e);if(n)try{const r=decodeURIComponent(n[1]);if(r)return{name:"chats",contactCid:r}}catch{}return{name:"not_found",pathname:e}}function ui(e){return Kn(e?`/chats/${encodeURIComponent(e)}`:"/chats")}function f3(e){return Kn(`/chats/${encodeURIComponent(e)}/contact`)}function h3(e){return typeof e=="object"&&e!==null&&e.oursMessenger===!0?"back":"replace"}const Cg={read:2,delivered:1};function yg(e){return e&&Object.hasOwn(Cg,e)?Cg[e]:0}function Kd(e,t){return yg(t)>yg(e)?t:e}const m3=()=>({contacts:[],pending:[]});function p3(e){return{identity:null,contacts:m3(),route:e,pages:{},pendingSends:{},drafts:{},replies:{},connection:"connecting",search:"",mobileDetailOpen:e.name==="chats"&&e.contactCid!==null||e.name==="contact",coveringDialog:!1,dialogBusy:!1,generatedInvite:null,sendingDialog:null,error:null,loaded:!1}}function Oi(e,t){return`${e}:${t}`}function gr(e){return e.route.name==="chats"||e.route.name==="contact"?e.route.contactCid:null}function Cr(e,t){return e.identity?e.pages[Oi(e.identity.cid,t)]??null:null}function E3(e,t){const n=Kd(e.receipt,t.receipt);return n===t.receipt?t:{...t,receipt:n}}function To(e,t){const n=[...e],r=new Map;n.forEach((o,a)=>{o.wire_id&&r.set(o.wire_id,a)});for(const o of t){const a=o.wire_id?r.get(o.wire_id):void 0;a===void 0?(o.wire_id&&r.set(o.wire_id,n.length),n.push(o)):n[a]=E3(n[a],o)}return n}function vg(e,t){const n=gr(e);return!n||t.contacts.some(r=>r.container_id===n)?{}:{route:{name:"chats",contactCid:null},mobileDetailOpen:!1}}function Ag(e,t){switch(t.type){case"snapshot":{const n=e.identity!==null&&e.identity.cid!==t.identity.cid;return{...e,identity:t.identity,contacts:t.contacts,loaded:!0,error:null,...n?{pages:{},pendingSends:{},drafts:{},replies:{},sendingDialog:null,generatedInvite:null,coveringDialog:!1,dialogBusy:!1}:{},...vg(e,t.contacts)}}case"contacts":return{...e,contacts:t.contacts,...vg(e,t.contacts)};case"page":{if(!e.identity)return e;const n=Oi(e.identity.cid,t.contactCid),r=e.pages[n],o=e.pendingSends[n]??[],a=new Set(t.page.messages.map(E=>E.wire_id)),l=o.filter(E=>!a.has(E.wire_id)),c=new Map(r?.messages.map(E=>[E.wire_id,E.receipt])??[]),x=r?t.page.messages.map(E=>{const C=Kd(c.get(E.wire_id)??null,E.receipt);return C===E.receipt?E:{...E,receipt:C}}):t.page.messages,f=r&&r.messages.length>50?{...t.page,messages:To(r.messages,x),hasMore:r.hasMore,nextBefore:r.nextBefore}:{...t.page,messages:x},m=To(f.messages,l),h={...f,messages:m,total:Math.max(f.total+l.length,m.length)};return{...e,pages:{...e.pages,[n]:h},pendingSends:{...e.pendingSends,[n]:l.length?l:void 0}}}case"sent_message":{if(!e.identity)return e;const n=Oi(e.identity.cid,t.contactCid),r=e.pages[n];if(r?.messages.some(l=>l.wire_id===t.message.wire_id))return e;const o=To(e.pendingSends[n]??[],[t.message]);if(!r)return{...e,pendingSends:{...e.pendingSends,[n]:o}};const a=To(r.messages,[t.message]);return{...e,pages:{...e.pages,[n]:{...r,messages:a,total:Math.max(r.total+1,a.length)}},pendingSends:{...e.pendingSends,[n]:o}}}case"receipt":{if(!e.identity)return e;const n=Oi(e.identity.cid,t.contactCid),r=e.pages[n],o=e.pendingSends[n],a=new Set(t.wireIds),l=f=>{let m=!1;const h=f.map(E=>{if(!E.wire_id||!a.has(E.wire_id))return E;const C=Kd(E.receipt,t.kind);return C===E.receipt?E:(m=!0,{...E,receipt:C})});return m?h:f},c=r?l(r.messages):void 0,x=o?l(o):void 0;return c===r?.messages&&x===o?e:{...e,pages:r&&c?{...e.pages,[n]:{...r,messages:c}}:e.pages,pendingSends:o&&x?{...e.pendingSends,[n]:x}:e.pendingSends}}case"older_page":{if(!e.identity)return e;const n=Oi(e.identity.cid,t.contactCid),r=e.pages[n];if(!r)return e;const o=To(To(t.page.messages,t.newer),r.messages),a={...t.page,preview:r.preview,total:Math.max(t.page.total,r.total,o.length),messages:o};return{...e,pages:{...e.pages,[n]:a}}}case"route":return{...e,route:t.route,mobileDetailOpen:t.mobileDetailOpen??(t.route.name==="chats"&&t.route.contactCid!==null||t.route.name==="contact")};case"connection":return{...e,connection:t.connection};case"search":return{...e,search:t.search};case"draft":return e.identity?{...e,drafts:{...e.drafts,[Oi(e.identity.cid,t.contactCid)]:t.value}}:e;case"reply":return e.identity?{...e,replies:{...e.replies,[Oi(e.identity.cid,t.contactCid)]:t.wireId??void 0}}:e;case"sending":return{...e,sendingDialog:t.dialog};case"dialog":return{...e,coveringDialog:t.open,dialogBusy:t.open?e.dialogBusy:!1,generatedInvite:t.open?e.generatedInvite:null,error:null};case"dialog_busy":return{...e,dialogBusy:t.busy};case"generated_invite":return{...e,generatedInvite:t.blob};case"error":return{...e,error:t.message}}}function g3(e,t,n){return!e||t?"ignore":n?"defer":"reload"}function Na(){return{api:xt,notification:globalThis.Notification,navigator}}function fi(e,t,n){return new Promise((r,o)=>{const a=setTimeout(()=>o(new Error(`${n} did not complete within ${t/1e3}s — try again`)),t);e.then(l=>{clearTimeout(a),r(l)},l=>{clearTimeout(a),o(l)})})}async function C3(e,t={}){let n=null,r=!1,o=!1;const a="serviceWorker"in navigator&&window.isSecureContext,l=()=>e({supported:a,offline:!navigator.onLine,updateAvailable:r,registration:n}),c=()=>l(),x=()=>l(),f=()=>{document.visibilityState==="visible"&&n?.update().catch(()=>{})},m=C=>{if(C.data?.type==="ours-push-repair-required"){window.dispatchEvent(new Event("ours-push-repair-required"));return}if(C.data?.type==="ours-push-foreground"){const y=C.data.contact_id,w=C.data.wire_id,B=C.data.kind;typeof y=="string"&&typeof w=="string"&&nv({v:1,type:B==="file"?"file_received":"message_received",contact_id:y,wire_id:w,date:new Date().toISOString()})}},h=a&&!!navigator.serviceWorker.controller,E=()=>{const C=g3(h,o,t.shouldDeferReload?.()??!1);if(C!=="ignore"){if(C==="defer"){r=!0,l();return}o=!0,(t.reload??(()=>location.reload()))()}};if(window.addEventListener("online",c),window.addEventListener("offline",x),document.addEventListener("visibilitychange",f),navigator.serviceWorker?.addEventListener("message",m),navigator.serviceWorker?.addEventListener("controllerchange",E),a){n=await navigator.serviceWorker.register(Kn("/sw.js"),{scope:Kn("/"),updateViaCache:"none"}),await navigator.serviceWorker.ready;const C=y=>y?.addEventListener("statechange",()=>{y.state==="installed"&&navigator.serviceWorker.controller&&(r=!0,l())});C(n.installing),n.addEventListener("updatefound",()=>C(n?.installing??null)),n.update().catch(()=>{})}return l(),()=>{window.removeEventListener("online",c),window.removeEventListener("offline",x),document.removeEventListener("visibilitychange",f),navigator.serviceWorker?.removeEventListener("message",m),navigator.serviceWorker?.removeEventListener("controllerchange",E)}}async function Bg(e,t=()=>location.reload(),n=navigator.serviceWorker){const r=e.waiting;if(!r){t();return}let o=!1,a=()=>{};try{await fi(new Promise((l,c)=>{a=()=>{if(!o){o=!0;try{t(),l()}catch(x){c(x)}}},n.addEventListener("controllerchange",a),r.postMessage({type:"SKIP_WAITING"})}),1e4,"service-worker update")}finally{o=!0,n.removeEventListener("controllerchange",a)}}function y3(e){const t="=".repeat((4-e.length%4)%4),n=atob((e+t).replaceAll("-","+").replaceAll("_","/")),r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return r}function v3(e){return e?e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength):null}function wg(e,t){const n=v3(e);return!!n&&n.length===t.length&&n.every((r,o)=>r===t[o])}function Xd(e=navigator.userAgent){return/iP(?:hone|ad|od)/.test(e)}function Yd(e=navigator,t=window){return Xd(e.userAgent)&&(e.standalone===!0||t.matchMedia("(display-mode: standalone)").matches)}function A3(){return Xd()&&!Yd()?"On iPhone or iPad, tap Share → Add to Home Screen, then open messenger from its Home Screen icon (iOS 16.4 or later).":!("Notification"in window)||!window.PushManager||!("serviceWorker"in navigator)?"Notifications require a current secure browser with service-worker and Web Push support.":Notification.permission==="denied"?Xd()?"Allow messenger in iOS Settings → Notifications, then return and choose Repair.":"Allow notifications in this site’s browser settings, then return and choose Repair.":null}function B3(e={}){const t=e.notification??Na().notification;if(!t)return Promise.reject(new Error("notification permission is unavailable"));const n=new Promise((r,o)=>{let a=!1;const l=c=>{if(a)return;const x=c??t.permission;x!=="granted"&&x!=="denied"&&x!=="default"||(a=!0,r(x))};try{const c=t.requestPermission(l);c&&typeof c.then=="function"&&c.then(l,o)}catch(c){o(c)}});return fi(n,e.timeoutMs??15e3,"notification permission")}function rv(e,t){return!!e&&!!e.pushManager&&!!t.notification&&!!t.navigator.serviceWorker}function Ji(e,t={}){return{status:e,preview:"full",...t}}async function w3(e,t,n){let r=await fi(e.pushManager.getSubscription(),5e3,"push subscription lookup");if((n||r?.options.applicationServerKey&&!wg(r.options.applicationServerKey,t))&&(r&&await fi(r.unsubscribe(),5e3,"stale push unsubscribe"),r=null),r&&wg(r.options.applicationServerKey,t))return r;try{return await fi(e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t}),15e3,"push subscribe")}catch(o){const a=await e.pushManager.getSubscription();if(!a)throw o;return await fi(a.unsubscribe(),5e3,"stale push unsubscribe"),fi(e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t}),15e3,"push repair")}}async function iv(e,t,n,r){const o=await r.api.vapidPublicKey(),l=await fi(Promise.resolve(r.navigator.serviceWorker.ready),1e4,"service-worker readiness")??e,c=y3(o.publicKey),f=(await w3(l,c,n)).toJSON();if(!f.endpoint||!f.keys?.p256dh||!f.keys.auth)throw new Error("browser returned an incomplete push subscription");const m=await r.api.ensurePush({...f,label:r.navigator.userAgent.slice(0,160),...t===void 0?{}:{preview:t}});if(m.status!=="on"||m.fingerprint!==o.fingerprint||m.configEpoch!==o.configEpoch)throw new Error("server did not acknowledge the current Web Push configuration");return Ji("on",{bindingId:m.binding_id,fingerprint:m.fingerprint,configEpoch:m.configEpoch,preview:m.preview})}async function Dg(e,t=Na()){return rv(e,t)?t.notification.permission!=="granted"?Ji("needs-permission",{blocked:t.notification.permission==="denied"}):await e.pushManager.getSubscription()?iv(e,void 0,!1,t):Ji("off"):Ji("unsupported")}async function ov(e,t={},n=Na()){if(!rv(e,n))return Ji("unsupported");const r=await B3({notification:n.notification});return r!=="granted"?Ji("needs-permission",{blocked:r==="denied"}):iv(e,t.preview??"full",t.forceFresh??!1,n)}const D3=(e,t,n=Na())=>ov(e,{preview:t,forceFresh:!0},n);async function k3(e,t,n=Na()){const r=await e.pushManager.getSubscription(),o=[];if(t.bindingId)try{await n.api.deletePush(t.bindingId)}catch(a){o.push(a)}if(r)try{await r.unsubscribe()}catch(a){o.push(a)}if(o.length)throw new Error("notification disable did not fully converge — choose Repair and try again");return Ji("off",{preview:t.preview})}function F3(e=15e3){if(!("serviceWorker"in navigator))return()=>{};let t;const n=()=>{const a={type:"ours-visibility",state:document.visibilityState,ts:Date.now(),iosStandalone:Yd()};navigator.serviceWorker.ready.then(l=>{(navigator.serviceWorker.controller??l.active)?.postMessage(a)}).catch(()=>{})},r=()=>{n(),t!==void 0&&clearInterval(t),t=document.visibilityState==="visible"?setInterval(n,e):void 0,document.visibilityState==="visible"&&sv()},o=a=>{a.data?.type!=="ours-visibility-query"||!a.ports?.[0]||a.ports[0].postMessage({type:"ours-visibility-reply",state:document.visibilityState,iosStandalone:Yd()})};return document.addEventListener("visibilitychange",r),navigator.serviceWorker.addEventListener("message",o),r(),()=>{document.removeEventListener("visibilitychange",r),navigator.serviceWorker.removeEventListener("message",o),t!==void 0&&clearInterval(t)}}async function sv(){try{if(!("serviceWorker"in navigator))return;const t=await(await navigator.serviceWorker.getRegistration())?.getNotifications()??[];for(const n of t)n.close();"clearAppBadge"in navigator&&await navigator.clearAppBadge()}catch{}}function Nx({outgoing:e=!1,className:t="",...n}){return d.jsx("div",{...n,className:`chat-message ${e?"chat-message-out":"chat-message-in"} ${t}`})}const S3=A.forwardRef(function({className:t="",...n},r){return d.jsx("div",{...n,ref:r,className:`chat-header ${t}`})});function b3({className:e="",...t}){return d.jsx("div",{...t,className:`chat-composer-surface ${e}`})}const P3=A.forwardRef(function({className:t="",onKeyDown:n,value:r,...o},a){const l=A.useRef(null),c=A.useRef("");return A.useLayoutEffect(()=>{const x=l.current;if(!x)return;const f=String(r??x.value);f.startsWith(c.current)||(x.style.height="0px");const m=x.scrollHeight;x.style.height=`${Math.max(44,Math.min(m,132))}px`,x.style.overflowY=m>132?"auto":"hidden",c.current=f},[r]),d.jsx("textarea",{...o,value:r,ref:x=>{l.current=x,typeof a=="function"?a(x):a&&(a.current=x)},className:`chat-textarea ${t}`,onKeyDown:x=>{x.nativeEvent.isComposing||x.keyCode===229||x.key==="Enter"&&(x.shiftKey||window.matchMedia("(pointer: coarse)").matches||window.innerWidth<=860)||n?.(x)}})});function av({url:e,name:t}){return d.jsx("a",{className:"chat-photo",href:e,target:"_blank",rel:"noreferrer",title:t,"aria-label":"Preview "+t,children:d.jsx("img",{src:e,alt:t,loading:"lazy"})})}function lv({name:e,size:t,actions:n}){const r=t<1024?`${t} B`:t<1048576?`${Math.ceil(t/1024)} KB`:`${(t/1048576).toFixed(1)} MB`;return d.jsxs("div",{className:"chat-file filecard",children:[d.jsx(CA,{size:22}),d.jsxs("div",{className:"chat-file-info filecard-meta",children:[d.jsx("strong",{className:"filecard-name",title:e,children:e}),d.jsx("small",{className:"filecard-sub",children:r})]}),n]})}function JI({items:e}){return d.jsx("div",{className:"chat-attachments",children:e.map(t=>/^image\/(png|jpeg|gif|webp|avif)$/.test(t.mimeType)?d.jsx(av,{name:t.name,url:t.url},t.id):d.jsx(lv,{name:t.name,size:t.size,actions:d.jsx("a",{className:"icon-btn",href:t.url,download:t.name,"aria-label":"Download "+t.name,children:d.jsx(i1,{size:18})})},t.id))})}function _3({label:e,options:t,value:n,onChange:r}){const o=A.useRef(null),a=MF(0),l=IF(),c=A.useRef(n);c.current=n;const x=A.useRef(),f=A.useRef({id:-1,x:0,y:0,start:0,active:!1,samples:[]}),m=A.useRef(!1),h=()=>((o.current?.clientWidth??8)-8)/t.length,E=(y,w=0)=>{x.current?.stop();const B=t.findIndex(b=>b.id===y)*h(),F=Math.abs(B-a.get())*20;w=Math.max(-F,Math.min(F,w)),l?a.set(B):x.current=n3(a,B,{type:"spring",stiffness:400,damping:40,velocity:w})};A.useLayoutEffect(()=>{E(n)},[n,l]),A.useLayoutEffect(()=>{if(!o.current)return;const y=new ResizeObserver(()=>{x.current?.stop(),a.set(t.findIndex(w=>w.id===c.current)*h())});return y.observe(o.current),()=>{y.disconnect(),x.current?.stop()}},[]);const C=(y,w)=>{const B=f.current,F=o.current;if(B.id!==y||!F)return;let b=n,D=0;if(w&&B.active){const S=B.samples[0],k=B.samples.at(-1);S&&k&&k.t>S.t&&performance.now()-k.t<100&&(D=(k.x-S.x)*1e3/(k.t-S.t));const P=a.get()+D/1e3*.99/(1-.99);b=t[Math.max(0,Math.min(t.length-1,Math.round(P/h())))].id,m.current=!0,setTimeout(()=>{m.current=!1},0)}f.current={id:-1,x:0,y:0,start:0,active:!1,samples:[]},F.hasPointerCapture(y)&&F.releasePointerCapture(y),E(b,D),b!==n&&r(b)};return d.jsxs("div",{ref:o,className:"conversation-list-modes shared-segmented-switch",role:"tablist","aria-label":e,onPointerDown:y=>{y.isPrimary&&(x.current?.stop(),f.current={id:y.pointerId,x:y.clientX,y:y.clientY,start:a.get(),active:!1,samples:[{x:y.clientX,t:performance.now()}]})},onPointerMove:y=>{const w=f.current;if(w.id!==y.pointerId)return;const B=y.clientX-w.x,F=y.clientY-w.y;if(!w.active){if(Math.abs(B)<10&&Math.abs(F)<10)return;if(Math.abs(F)>Math.abs(B)){C(y.pointerId,!1);return}x.current?.stop(),w.active=!0,y.currentTarget.setPointerCapture(y.pointerId)}y.preventDefault(),a.set(Math.max(0,Math.min(h()*(t.length-1),w.start+B)));const b=performance.now();w.samples=[...w.samples.filter(D=>b-D.t<100),{x:y.clientX,t:b}]},onPointerUp:y=>C(y.pointerId,!0),onPointerCancel:y=>C(y.pointerId,!1),onLostPointerCapture:y=>{y.target===y.currentTarget&&C(y.pointerId,!1)},children:[d.jsx(Xi.span,{"aria-hidden":!0,className:"shared-segmented-thumb",style:{x:a,width:`calc((100% - 8px) / ${t.length})`}}),t.map((y,w)=>d.jsxs("button",{type:"button",role:"tab","aria-selected":n===y.id,tabIndex:n===y.id?0:-1,onClick:()=>{m.current||r(y.id)},onKeyDown:B=>{if(!["ArrowLeft","ArrowRight","Home","End"].includes(B.key))return;B.preventDefault();const F=B.key==="Home"?0:B.key==="End"?t.length-1:(w+(B.key==="ArrowRight"?1:-1)+t.length)%t.length;r(t[F].id),o.current?.querySelectorAll("button")[F]?.focus()},children:[y.label,y.badge]},y.id))]})}function cv(e){if(typeof e!="string")return null;const t=/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-]\d{2}:\d{2})|\s*\(UTC\))?$/i.exec(e.trim());if(!t)return null;const n=t[7]?t[7].slice(0,3).padEnd(3,"0"):"000",r=`${t[1]}-${t[2]}-${t[3]}T${t[4]}:${t[5]}:${t[6]}.${n}`,o=new Date(`${r}Z`);if(Number.isNaN(o.getTime())||o.getUTCFullYear()!==Number(t[1])||o.getUTCMonth()+1!==Number(t[2])||o.getUTCDate()!==Number(t[3])||o.getUTCHours()!==Number(t[4])||o.getUTCMinutes()!==Number(t[5])||o.getUTCSeconds()!==Number(t[6]))return null;if(t[9]){const a=new Date(`${r}${t[9]}`);return Number.isNaN(a.getTime())?null:a.toISOString()}return o.toISOString()}function Vc(e){const t=cv(e);if(t){const r=Date.parse(t);if(!Number.isNaN(r))return r}const n=new Date(e).getTime();return Number.isNaN(n)?0:n}function j3(e){const t=cv(e);if(t){const r=new Date(t);if(!Number.isNaN(r.getTime()))return r}const n=new Date(e);return Number.isNaN(n.getTime())?null:n}const Ks="room",T3="room_",Uc="ours-cowork-room:",kg="ours-cowork:",Fg="ours-cowork-",Sg="cowork-room-",Qd=/^[0-7][0-9a-hjkmnp-tv-z]{25}$/,R3=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,N3=25,M3=64,I3=80,bg=1e3,Ba=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),hn=e=>typeof e=="string"&&e.length>0;function L3(e,t){if(typeof e!="string")return null;const n=e.trim();if(!n.startsWith("{")||!n.endsWith("}"))return null;let r;try{r=JSON.parse(n)}catch{return null}return!Ba(r)||r.version!==1||!hn(r.kind)||!r.kind.startsWith(T3)||!hn(r.room_id)||t&&!hn(r.signature)?null:r}function O3(e){const t=Ba(e.author)?e.author:{};return{name:hn(t.display_name)?t.display_name:"",role:hn(t.role)?t.role:""}}function Mx(e){const n=Array.from(String(e)).slice(0,I3).join("").replace(/^room_/,"").split("_").filter(Boolean);return n.length===0?"Room notice":n.join(" ").replace(/^./,r=>r.toUpperCase())}function z3(e){if(!Ba(e))return null;const t=hn(e.kind)?e.kind:"",n=O3(e),r=typeof e.text=="string"?e.text:"",o=Number.isSafeInteger(e.briefing_version)&&e.briefing_version>0?e.briefing_version:null,a={roomName:uv(e.room_name)??"",authoredAt:hn(e.at)?e.at:""};switch(t){case"room_msg":return n.role===Ks?di(t,"Room message",r||"Room notice",{...a,authoredBy:n.name}):{variant:"chat",kind:t,author:n.name||"Unknown member",role:n.role,label:"",text:r,...a};case"room_briefing":return di(t,o===null?"Room briefing":`Room briefing · v${o}`,r||"The room briefing was updated.",{...a,authoredBy:n.name,presentation:"briefing"});case"room_role_briefing":{const l=hn(e.briefing_role)?e.briefing_role:"",c=["Role briefing",l,o===null?"":`v${o}`].filter(Boolean).join(" · ");return di(t,c,r||"Your role briefing was updated.",{...a,authoredBy:n.name,presentation:"role",details:l?[`Role: ${l}`]:[]})}case"room_membership":{const l=Ba(e.membership)?e.membership:{},c=[hn(l.action)?`Status: ${$3(l.action)}`:"",hn(l.alias)?`Member: ${l.alias}`:"",hn(l.role)?`Role: ${l.role}`:"",Number.isSafeInteger(l.epoch)&&l.epoch>=0?`Epoch: ${l.epoch}`:""].filter(Boolean);return di(t,"Membership",r||q3(l),{...a,authoredBy:n.name,presentation:"membership",details:c})}case"room_file":{const l=hn(e.filename)?e.filename:"Shared file",c=[hn(e.mime)?`Type: ${e.mime}`:"",Number.isSafeInteger(e.size)&&e.size>=0?`Size: ${W3(e.size)}`:"",hn(e.sha256)?`SHA-256: ${H3(e.sha256)}`:""].filter(Boolean);return di(t,"Room file",l,{...a,authoredBy:n.name,role:n.role,presentation:"file",details:c})}case"room_not_member":return di(t,"Room access","You are no longer a member of this room.",{...a,presentation:"lifecycle",details:["Status: Removed"]});default:return r?{variant:n.role&&n.role!==Ks?"chat":"system",kind:t,author:n.role&&n.role!==Ks?n.name||"Unknown member":"",role:n.role&&n.role!==Ks?n.role:"",label:n.role&&n.role!==Ks?"":Mx(t),text:G3(r),...a}:di(t,Mx(t),`${Mx(t)} from the room.`,a)}}function V3(e,t){if(!U3(e))return null;const n=yh(e)?.roomId??null,r=gh(e),o=Ch(e),a=L3(t,n===null&&o===null);return a!==null&&n!==null&&a.room_id!==n||a!==null&&r!==null&&a.room_id!==r?Pg("Room provenance mismatch"):z3(a)}function uv(e){if(typeof e!="string"||/[\p{Cc}\p{Cf}]/u.test(e))return null;const t=e.trim().normalize("NFC"),n=Array.from(t).length;return n>=1&&n<=M3?t:null}function gh(e){if(typeof e!="string"||!e.startsWith(Sg))return null;const t=e.slice(Sg.length);return Qd.test(t)?t:null}function Ch(e){return typeof e!="string"||!e.startsWith(kg)?null:uv(e.slice(kg.length))}function yh(e){if(typeof e!="string"||!e.startsWith(Fg))return null;const t=e.slice(Fg.length);if(Qd.test(t))return{roomId:t,slug:null};const n=t.slice(-26),r=t.at(-27),o=t.slice(0,-27);return r!=="-"||!Qd.test(n)||o.length<1||o.length>N3?null:R3.test(o)?{roomId:n,slug:o}:null}function U3(e){const t=String(e??"").trim();return t.startsWith(Uc)&&t.slice(Uc.length).trim().length>0||Ch(e)!==null||yh(e)!==null||gh(e)!==null}function di(e,t,n,r={}){return{variant:"system",kind:e,author:"",role:"",label:t,text:n,...r}}function $3(e){return String(e).replace(/_/g," ").replace(/^./,t=>t.toUpperCase())}function W3(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KiB`:`${(e/(1024*1024)).toFixed(1)} MiB`}function H3(e){const t=String(e);return t.length<=20?t:`${t.slice(0,12)}…${t.slice(-6)}`}function G3(e){const t=Array.from(String(e));return t.length<=bg?t.join(""):`${t.slice(0,bg).join("")}…`}function Pg(e){return di("room_invalid","Room notice","This room envelope could not be displayed safely.",{presentation:"lifecycle",details:[`Status: ${e}`]})}function q3(e){if(!Ba(e))return"The room membership changed.";const t=hn(e.alias)?e.alias:"A member";return e.action==="remove"?`${t} left the room.`:"The room membership changed."}function K3(e){if(!e)return"";const t=e.variant==="chat"?e.author:e.label,n=X3(e.text);return t?n?`${t} · ${n}`:t:n}function X3(e){return String(e??"").replace(/\s+/g," ").trim()}function Y3(e){const t=String(e??"").trim();if(t.startsWith(Uc))return t.slice(Uc.length).trim()||null;const n=Ch(e);if(n!==null)return n;const r=yh(e);if(r?.slug)return r.slug.replace(/-/g," ").replace(/[a-z]/,l=>l.toUpperCase());if(r)return`Room ${r.roomId.slice(0,8)}`;const o=gh(e);return o===null?null:`Room ${o.slice(0,8)}`}const vh=j3;function Jd(e){const t=e.trim().split(/\s+/).filter(Boolean);if(!t.length)return"?";const n=r=>Array.from(r).find(o=>/[\p{L}\p{N}]/u.test(o))??Array.from(r)[0]??"";if(t.length===1){const r=Array.from(t[0]),o=r.filter(a=>/[\p{L}\p{N}]/u.test(a));return(o.length?o.slice(0,2).join(""):r[0]??"?").toUpperCase()}return(n(t[0])+n(t.at(-1)??"")).toUpperCase()}function Q3(e){const t=vh(e);if(!t)return"";const n=new Date;return t.toDateString()===n.toDateString()?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString([],{month:"short",day:"numeric"})}function Zi(e){const t=vh(e);return t?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):""}function J3(e){const t=vh(e);return t?t.toLocaleString():e}function xv(e){return e.length<=14?e:`${e.slice(0,8)}…${e.slice(-4)}`}function Z3(e){return/^[0-9A-Fa-f]{40,}$/.test(e.trim())}function eS(e,t,n){const r=(e??"").trim(),o=Y3(r);return o||(r&&!Z3(r)?r:r?xv(r):"Unnamed")}function $c(e){return e.display_name?.trim()||eS(e.name)}const tS="x-ours-kind=voice-message",dv="voice-message-",na=20*1024*1024;let wa=null,Zd=[];const Ah=new Map;function nS(e){wa=e;for(const t of Zd)t(e);Zd=[]}function _g(e){for(const t of e)Ah.set(t.wire_id,{id:t.wire_id,dir:t.dir,filename:t.filename,mime:t.mime,size:t.size,date:t.date,available:t.available,logicalName:t.logical_name,version:t.version,transcription:t.transcription})}function rS(){Ah.clear()}function fv(e){return Ah.get(e)??null}function iS(e){return wa?.url(e)??null}function oS(e){return`${e}; ${tS}`}function Jo(e,t){return/x-ours-kind\s*=\s*voice-message/i.test(e)||t.toLowerCase().startsWith(dv)&&e.toLowerCase().startsWith("audio/")}function sS(e,t){const n=e??"file",r=t??"";return Jo(r,n)?"🎤 Voice message":r.toLowerCase().startsWith("image/")?"🖼 Photo":`📎 ${n}`}async function pu(e){return(wa??await new Promise(n=>Zd.push(n))).bytes(e)}async function aS(e){if(!wa)throw new Error("Media provider is not ready");await wa.fetch(e)}function Zo(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function lS(e,t=!1){return e==="read"?{state:"read",label:"read",glyph:"✓✓"}:e==="delivered"?{state:"delivered",label:"delivered",glyph:"✓✓"}:t?{state:"untracked",label:"sent, and cannot report delivery",glyph:"✓"}:{state:"sent",label:"sent",glyph:"✓"}}function ef({receipt:e,content:t="Message",receiptless:n=!1}){const r=lS(e,n);return d.jsx("span",{className:"ticks"+(r.state==="read"?" read":""),"data-receipt-status":r.state,role:"img","aria-label":`${t} ${r.label}`,title:r.label,children:r.glyph})}function jg(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}const mn=Ai(/[A-Za-z]/),un=Ai(/[\dA-Za-z]/),cS=Ai(/[#-'*+\--9=?A-Z^-~]/);function Wc(e){return e!==null&&(e<32||e===127)}const tf=Ai(/\d/),uS=Ai(/[\dA-Fa-f]/),xS=Ai(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function wt(e){return e!==null&&(e<0||e===32)}function it(e){return e===-2||e===-1||e===32}const Eu=Ai(/\p{P}|\p{S}/u),no=Ai(/\s/);function Ai(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function dS(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const gu=(function(e){if(e==null)return pS;if(typeof e=="function")return Cu(e);if(typeof e=="object")return Array.isArray(e)?fS(e):hS(e);if(typeof e=="string")return mS(e);throw new Error("Expected function, string, or object as test")});function fS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=gu(e[n]);return Cu(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function hS(e){const t=e;return Cu(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function mS(e){return Cu(t);function t(n){return n&&n.type===e}}function Cu(e){return t;function t(n,r,o){return!!(ES(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function pS(){return!0}function ES(e){return e!==null&&typeof e=="object"&&"type"in e}const hv=[],gS=!0,nf=!1,CS="skip";function mv(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=gu(o),l=r?-1:1;c(e,void 0,[])();function c(x,f,m){const h=x&&typeof x=="object"?x:{};if(typeof h.type=="string"){const C=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(x.type+(C?"<"+C+">":""))+")"})}return E;function E(){let C=hv,y,w,B;if((!t||a(x,f,m[m.length-1]||void 0))&&(C=yS(n(x,m)),C[0]===nf))return C;if("children"in x&&x.children){const F=x;if(F.children&&C[0]!==CS)for(w=(r?F.children.length:-1)+l,B=m.concat(F);w>-1&&w<F.children.length;){const b=F.children[w];if(y=c(b,w,B)(),y[0]===nf)return y;w=typeof y[1]=="number"?y[1]:w+l}}return C}}}function yS(e){return Array.isArray(e)?e:typeof e=="number"?[gS,e]:e==null?hv:[e]}function vS(e,t,n){const o=gu((n||{}).ignore||[]),a=AS(t);let l=-1;for(;++l<a.length;)mv(e,"text",c);function c(f,m){let h=-1,E;for(;++h<m.length;){const C=m[h],y=E?E.children:void 0;if(o(C,y?y.indexOf(C):void 0,E))return;E=C}if(E)return x(f,m)}function x(f,m){const h=m[m.length-1],E=a[l][0],C=a[l][1];let y=0;const B=h.children.indexOf(f);let F=!1,b=[];E.lastIndex=0;let D=E.exec(f.value);for(;D;){const S=D.index,k={index:D.index,input:D.input,stack:[...m,f]};let P=C(...D,k);if(typeof P=="string"&&(P=P.length>0?{type:"text",value:P}:void 0),P===!1?E.lastIndex=S+1:(y!==S&&b.push({type:"text",value:f.value.slice(y,S)}),Array.isArray(P)?b.push(...P):P&&b.push(P),y=S+D[0].length,F=!0),!E.global)break;D=E.exec(f.value)}return F?(y<f.value.length&&b.push({type:"text",value:f.value.slice(y)}),h.children.splice(B,1,...b)):b=[f],B+b.length}}function AS(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([BS(o[0]),wS(o[1])])}return t}function BS(e){return typeof e=="string"?new RegExp(dS(e),"g"):e}function wS(e){return typeof e=="function"?e:function(){return e}}const Ix="phrasing",Lx=["autolink","link","image","label"];function DS(){return{transforms:[jS],enter:{literalAutolink:FS,literalAutolinkEmail:Ox,literalAutolinkHttp:Ox,literalAutolinkWww:Ox},exit:{literalAutolink:_S,literalAutolinkEmail:PS,literalAutolinkHttp:SS,literalAutolinkWww:bS}}}function kS(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ix,notInConstruct:Lx},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ix,notInConstruct:Lx},{character:":",before:"[ps]",after:"\\/",inConstruct:Ix,notInConstruct:Lx}]}}function FS(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ox(e){this.config.enter.autolinkProtocol.call(this,e)}function SS(e){this.config.exit.autolinkProtocol.call(this,e)}function bS(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function PS(e){this.config.exit.autolinkEmail.call(this,e)}function _S(e){this.exit(e)}function jS(e){vS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,TS],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,RS]],{ignore:["link","linkReference"]})}function TS(e,t,n,r,o){let a="";if(!pv(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!NS(n)))return!1;const l=MS(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function RS(e,t,n,r){return!pv(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function NS(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function MS(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=jg(e,"(");let a=jg(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function pv(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||no(n)||Eu(n))&&(!t||n!==47)}function lr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Ev.peek=HS;function IS(){this.buffer()}function LS(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function OS(){this.buffer()}function zS(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function VS(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=lr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function US(e){this.exit(e)}function $S(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=lr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function WS(e){this.exit(e)}function HS(){return"["}function Ev(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),l(),a+=o.move("]"),a}function GS(){return{enter:{gfmFootnoteCallString:IS,gfmFootnoteCall:LS,gfmFootnoteDefinitionLabelString:OS,gfmFootnoteDefinition:zS},exit:{gfmFootnoteCallString:VS,gfmFootnoteCall:US,gfmFootnoteDefinitionLabelString:$S,gfmFootnoteDefinition:WS}}}function qS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ev},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,l){const c=a.createTracker(l);let x=c.move("[^");const f=a.enter("footnoteDefinition"),m=a.enter("label");return x+=c.move(a.safe(a.associationId(r),{before:x,after:"]"})),m(),x+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),x+=c.move((t?`
|
|
387
|
+
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?gv:KS))),f(),x}}function KS(e,t,n){return t===0?e:gv(e,t,n)}function gv(e,t,n){return(n?"":" ")+e}const XS=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Bh.attention=eb;Bh.peek=tb;function YS(){return{canContainEols:["delete"],enter:{strikethrough:JS},exit:{strikethrough:ZS}}}function QS(){return{handlers:{delete:Bh},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:XS}]}}function JS(e){this.enter({type:"delete",children:[],position:void 0},e)}function ZS(e){this.exit(e)}function Bh(e,t,n,r){const o=n.createTracker(r),a=n.stack.includes("strikethrough")?"~":"~~",l=n.enter("strikethrough");let c=o.move(a);return c+=n.containerPhrasing(e,{...o.current(),before:c,after:"~"}),c+=o.move(a),l(),c}function eb(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function tb(){return"~"}function nb(e){return e.length}function rb(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||nb,a=[],l=[],c=[],x=[];let f=0,m=-1;for(;++m<e.length;){const w=[],B=[];let F=-1;for(e[m].length>f&&(f=e[m].length);++F<e[m].length;){const b=ib(e[m][F]);if(n.alignDelimiters!==!1){const D=o(b);B[F]=D,(x[F]===void 0||D>x[F])&&(x[F]=D)}w.push(b)}l[m]=w,c[m]=B}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<f;)a[h]=Tg(r[h]);else{const w=Tg(r);for(;++h<f;)a[h]=w}h=-1;const E=[],C=[];for(;++h<f;){const w=a[h];let B="",F="";w===99?(B=":",F=":"):w===108?B=":":w===114&&(F=":");let b=n.alignDelimiters===!1?1:Math.max(1,x[h]-B.length-F.length);const D=B+"-".repeat(b)+F;n.alignDelimiters!==!1&&(b=B.length+b+F.length,b>x[h]&&(x[h]=b),C[h]=b),E[h]=D}l.splice(1,0,E),c.splice(1,0,C),m=-1;const y=[];for(;++m<l.length;){const w=l[m],B=c[m];h=-1;const F=[];for(;++h<f;){const b=w[h]||"";let D="",S="";if(n.alignDelimiters!==!1){const k=x[h]-(B[h]||0),P=a[h];P===114?D=" ".repeat(k):P===99?k%2?(D=" ".repeat(k/2+.5),S=" ".repeat(k/2-.5)):(D=" ".repeat(k/2),S=D):S=" ".repeat(k)}n.delimiterStart!==!1&&!h&&F.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||h)&&F.push(" "),n.alignDelimiters!==!1&&F.push(D),F.push(b),n.alignDelimiters!==!1&&F.push(S),n.padding!==!1&&F.push(" "),(n.delimiterEnd!==!1||h!==f-1)&&F.push("|")}y.push(n.delimiterEnd===!1?F.join("").replace(/ +$/,""):F.join(""))}return y.join(`
|
|
388
|
+
`)}function ib(e){return e==null?"":String(e)}function Tg(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const ob=gu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function sb(e,t,n,r){const o=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const l=n.indentLines(n.containerFlow(e,a.current()),ab);return o(),l}function ab(e,t,n){return">"+(n?"":" ")+e}function lb(e,t){return Rg(e,t.inConstruct,!0)&&!Rg(e,t.notInConstruct,!1)}function Rg(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ng(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;){const a=n.unsafe[o];if(a.character===`
|
|
389
|
+
`&&!a.before&&!a.after&&lb(n.stack,a))return/[\t ]/.test(r.before)?"":" "}return`\\
|
|
390
|
+
`}function cb(e,t){const n=String(e);let r=n.indexOf(t),o=r,a=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++a>l&&(l=a):a=1,o=r+t.length,r=n.indexOf(t,o);return l}function ub(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function xb(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function db(e,t,n,r){const o=xb(n),a=e.value||"";if(ub(e,n)){const h=n.enter("codeIndented"),E=n.indentLines(a,fb);return h(),E}const l=n.createTracker(r),c=o.repeat(Math.max(cb(a,o)+1,3)),x=n.enter("codeFenced"),f=o==="`"?"GraveAccent":"Tilde";let m=l.move(c);if(e.lang){const h=n.enter(`codeFencedLang${f}`);m+=l.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...l.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${f}`);m+=l.move(" "),m+=l.move(n.safe(e.meta,{before:m,after:`
|
|
391
|
+
`,encode:["`"],...l.current()})),h()}return m+=l.move(`
|
|
392
|
+
`),a&&(m+=l.move(a+`
|
|
393
|
+
`)),m+=l.move(c),x(),m}function fb(e,t,n){return(n?"":" ")+e}function wh(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function hb(e,t,n,r){const o=wh(n),a=o==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const x=n.createTracker(r);let f=x.move("[");return f+=x.move(n.safe(n.associationId(e),{before:f,after:"]",...x.current()})),f+=x.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=x.move("<"),f+=x.move(n.safe(e.url,{before:f,after:">",...x.current()})),f+=x.move(">")):(c=n.enter("destinationRaw"),f+=x.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
394
|
+
`,...x.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=x.move(" "+o),f+=x.move(n.safe(e.title,{before:f,after:o,...x.current()})),f+=x.move(o),c()),l(),f}function mb(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}Dh.attention=pb;Dh.peek=Eb;function Dh(e,t,n,r){const o=n.enter("phrasing"),a=n.containerPhrasing({type:"root",children:[e]},r);return o(),a}function pb(e,t){return{construct:"emphasis",markers:mb(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function Eb(e,t,n){return n.options.emphasis||"*"}function gb(e){return"&#x"+e.toString(16).toUpperCase()+";"}function kh(e,t,n,r){let o,a,l;typeof t=="function"&&typeof n!="function"?(a=void 0,l=t,o=n):(a=t,l=n,o=r),mv(e,a,c,o);function c(x,f){const m=f[f.length-1],h=m?m.children.indexOf(x):void 0;return l(x,h,m)}}const Cb={};function Fh(e,t){const n=Cb,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Cv(e,r,o)}function Cv(e,t,n){if(yb(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Mg(e.children,t,n)}return Array.isArray(e)?Mg(e,t,n):""}function Mg(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Cv(e[o],t,n);return r.join("")}function yb(e){return!!(e&&typeof e=="object")}function vb(e,t){let n=!1;return kh(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,nf}),!!((!e.depth||e.depth<3)&&Fh(e)&&(t.options.setext||n))}function Ab(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(vb(e,n)){const h=n.enter("headingSetext"),E=n.enter("phrasing"),C=n.containerPhrasing(e,{...a.current(),before:`
|
|
395
|
+
`,after:`
|
|
396
|
+
`});return E(),h(),C+`
|
|
397
|
+
`+(o===1?"=":"-").repeat(C.length-(Math.max(C.lastIndexOf("\r"),C.lastIndexOf(`
|
|
398
|
+
`))+1))}const l="#".repeat(o),c=n.enter("headingAtx"),x=n.enter("phrasing");a.move(l+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
399
|
+
`,...a.current()});const m=f.charCodeAt(0);return(m===9||m===32)&&(f=gb(m)+f.slice(1)),f=f?l+" "+f:l,n.options.closeAtx&&(f+=" "+l),x(),c(),f}yv.peek=Bb;function yv(e){return e.value||""}function Bb(){return"<"}vv.peek=wb;function vv(e,t,n,r){const o=wh(n),a=o==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const x=n.createTracker(r);let f=x.move("![");return f+=x.move(n.safe(e.alt,{before:f,after:"]",...x.current()})),f+=x.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=x.move("<"),f+=x.move(n.safe(e.url,{before:f,after:">",...x.current()})),f+=x.move(">")):(c=n.enter("destinationRaw"),f+=x.move(n.safe(e.url,{before:f,after:e.title?" ":")",...x.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=x.move(" "+o),f+=x.move(n.safe(e.title,{before:f,after:o,...x.current()})),f+=x.move(o),c()),f+=x.move(")"),l(),f}function wb(){return"!"}Av.peek=Db;function Av(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let x=c.move("![");const f=n.safe(e.alt,{before:x,after:"]",...c.current()});x+=c.move(f+"]["),l();const m=n.stack;n.stack=m.filter(function(E){return E!=="phrasing"}),l=n.enter("reference");const h=n.safe(n.associationId(e),{before:x,after:"]",...c.current()});return l(),n.stack=m,a(),o==="full"||!f||f!==h?x+=c.move(h+"]"):o==="shortcut"?x=x.slice(0,-1):x+=c.move("]"),x}function Db(){return"!"}Bv.peek=kb;function Bv(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const l=n.unsafe[a],c=n.compilePattern(l);if(!l.atBreak)continue;let x;for(;x=c.exec(r);){let f=x.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(x.index+1)}}return o+r+o}function kb(){return"`"}function wv(e,t){const n=Fh(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Dv.peek=Fb;function Dv(e,t,n,r){const o=wh(n),a=o==='"'?"Quote":"Apostrophe",l=n.createTracker(r);if(wv(e,n)){const m=n.stack;n.stack=m.filter(function(C){return C!=="phrasing"});const h=n.enter("autolink");let E=l.move("<");return E+=l.move(n.containerPhrasing(e,{before:E,after:">",...l.current()})),E+=l.move(">"),h(),n.stack=m,E}const c=n.enter("link");let x=n.enter("label"),f=l.move("[");return f+=l.move(n.containerPhrasing(e,{before:f,after:"](",...l.current()})),f+=l.move("]("),x(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(x=n.enter("destinationLiteral"),f+=l.move("<"),f+=l.move(n.safe(e.url,{before:f,after:">",...l.current()})),f+=l.move(">")):(x=n.enter("destinationRaw"),f+=l.move(n.safe(e.url,{before:f,after:e.title?" ":")",...l.current()}))),x(),e.title&&(x=n.enter(`title${a}`),f+=l.move(" "+o),f+=l.move(n.safe(e.title,{before:f,after:o,...l.current()})),f+=l.move(o),x()),f+=l.move(")"),c(),f}function Fb(e,t,n){return wv(e,n)?"<":"["}kv.peek=Sb;function kv(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let x=c.move("[");const f=n.containerPhrasing(e,{before:x,after:"]",...c.current()});x+=c.move(f+"]["),l();const m=n.stack;n.stack=m.filter(function(E){return E!=="phrasing"}),l=n.enter("reference");const h=n.safe(n.associationId(e),{before:x,after:"]",...c.current()});return l(),n.stack=m,a(),o==="full"||!f||f!==h?x+=c.move(h+"]"):o==="shortcut"?x=x.slice(0,-1):x+=c.move("]"),x}function Sb(){return"["}function Sh(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function bb(e){const t=Sh(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Pb(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Fv(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function _b(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?Pb(n):Sh(n);const c=e.ordered?l==="."?")":".":bb(n);let x=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(x=!0),Fv(n)===l&&m){let h=-1;for(;++h<e.children.length;){const E=e.children[h];if(E&&E.type==="listItem"&&E.children&&E.children[0]&&E.children[0].type==="thematicBreak"){x=!0;break}}}}x&&(l=c),n.bulletCurrent=l;const f=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,o(),f}function jb(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Tb(e,t,n,r){const o=jb(n);let a=n.bulletCurrent||Sh(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let l=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(l-a.length)),c.shift(l);const x=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),m);return x(),f;function m(h,E,C){return E?(C?"":" ".repeat(l))+h:(C?a:a+" ".repeat(l-a.length))+h}}function Rb(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),o(),l}function Nb(e,t,n,r){if(!e.children.some(function(c){return ob(c)}))return n.containerFlow(e,r);const a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),l}function Mb(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}bh.attention=Ib;bh.peek=Lb;function bh(e,t,n,r){const o=n.enter("phrasing"),a=n.containerPhrasing({type:"root",children:[e]},r);return o(),a}function Ib(e,t){return{construct:"strong",markers:Mb(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function Lb(e,t,n){return n.options.strong||"*"}function Ob(e,t,n,r){return n.safe(e.value,r)}function zb(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Vb(e,t,n){const r=(Fv(n)+(n.options.ruleSpaces?" ":"")).repeat(zb(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Sv={blockquote:sb,break:Ng,code:db,definition:hb,emphasis:Dh,hardBreak:Ng,heading:Ab,html:yv,image:vv,imageReference:Av,inlineCode:Bv,link:Dv,linkReference:kv,list:_b,listItem:Tb,paragraph:Rb,root:Nb,strong:bh,text:Ob,thematicBreak:Vb},Ub=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ig=["pre","script","style","textarea"],Lg=document.createElement("i");function Ph(e){const t="&"+e+";";Lg.innerHTML=t;const n=Lg.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function bv(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const $b=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Wb(e){return e.replace($b,Hb)}function Hb(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return bv(n.slice(a?2:1),a?16:10)}return Ph(n)||e}function Hc(e){if(e===null||wt(e)||no(e))return 1;if(Eu(e))return 2}function Gb(){return{enter:{table:qb,tableData:Og,tableHeader:Og,tableRow:Xb},exit:{codeText:Yb,table:Kb,tableData:zx,tableHeader:zx,tableRow:zx}}}function qb(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Kb(e){this.exit(e),this.data.inTable=void 0}function Xb(e){this.enter({type:"tableRow",children:[]},e)}function zx(e){this.exit(e)}function Og(e){this.enter({type:"tableCell",children:[]},e)}function Yb(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Qb));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Qb(e,t){return t==="|"?t:e}function Jb(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
400
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:E,table:l,tableCell:x,tableRow:c}};function l(C,y,w,B){return f(m(C,w,B),C.align)}function c(C,y,w,B){const F=h(C,w,B),b=f([F]);return b.slice(0,b.indexOf(`
|
|
401
|
+
`))}function x(C,y,w,B){const F=w.enter("tableCell"),b=w.enter("phrasing"),D=w.containerPhrasing(C,{...B,before:a,after:a});return b(),F(),D}function f(C,y){return rb(C,{align:y,alignDelimiters:r,padding:n,stringLength:o})}function m(C,y,w){const B=C.children;let F=-1;const b=[],D=y.enter("table");for(;++F<B.length;)b[F]=h(B[F],y,w);return D(),b}function h(C,y,w){const B=C.children;let F=-1;const b=[],D=y.enter("tableRow");for(;++F<B.length;)b[F]=x(B[F],C,y,w);return D(),b}function E(C,y,w){let B=Sv.inlineCode(C,y,w);return w.stack.includes("tableCell")&&(B=B.replace(/\|/g,"\\$&")),B}}function Zb(){return{exit:{taskListCheckValueChecked:zg,taskListCheckValueUnchecked:zg,paragraph:tP}}}function eP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:nP}}}function zg(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function tP(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,l;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){l=c;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function nP(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(l);let x=Sv.listItem(e,t,n,{...r,...c.current()});return a&&(x=x.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),x;function f(m){return m+l}}function Pv(){return[DS(),GS(),YS(),Gb(),Zb()]}function rP(e){return{extensions:[kS(),qS(e),QS(),Jb(e),eP()]}}function cr(e,t,n,r){const o=e.length;let a=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function Wn(e,t){return e.length>0?(cr(e,e.length,0,t),e):t}const Vg={}.hasOwnProperty;function _v(e){const t={};let n=-1;for(;++n<e.length;)iP(t,e[n]);return t}function iP(e,t){let n;for(n in t){const o=(Vg.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){Vg.call(o,l)||(o[l]=[]);const c=a[l];oP(o[l],Array.isArray(c)?c:c?[c]:[])}}}function oP(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);cr(e,0,0,r)}function as(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&un(e.charCodeAt(n+1))&&un(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(l=String.fromCharCode(a,c),o=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function pt(e,t,n,r){const o=r?r-1:1/0;let a=0;return l;function l(x){return it(x)?(e.enter(n),c(x)):t(x)}function c(x){return it(x)&&a++<o?(e.consume(x),c):(e.exit(n),t(x))}}function jv(e,t,n,r,o,a){let l=0;return c;function c(m){return it(m)?(e.enter(r),x(m)):f(m)}function x(m){return it(m)&&l<a?(e.consume(m),l++,x):(e.exit(r),f(m))}function f(m){return l>=o?t(m):n(m)}}const sP={tokenize:aP};function aP(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),pt(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const x=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=x),n=x,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return $e(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),l)}}let Gc=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){Ug(this,t,n,r,!1)}addBefore(t,n,r){Ug(this,t,n,r,!0)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0,this.index.clear()}};function Ug(e,t,n,r,o){if(n===0&&r.length===0)return;const a=e.index.get(t);if(a){a[1]+=n,o?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}const l=[t,n,r];e.map.push(l),e.index.set(t,l)}const lP={tokenize:cP},$g={tokenize:uP};function cP(e){const t=this,n=[];let r=0,o,a,l;return c;function c(D){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,x,f)(D)}return f(D)}function x(D){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&b();const S=t.events.length;let k=S,P;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){P=t.events[k][1].end;break}F(r);let R=S;for(;R<t.events.length;)t.events[R][1].end={...P},R++;const M=new Gc;return M.add(k+1,0,t.events.slice(S)),M.add(S,R-S,[]),M.consume(t.events),f(D)}return c(D)}function f(D){if(r===n.length){if(!o)return E(D);if(o.currentConstruct&&o.currentConstruct.concrete)return y(D);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($g,m,h)(D)}function m(D){return o&&b(),F(r),E(D)}function h(D){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,y(D)}function E(D){return t.containerState={},e.attempt($g,C,y)(D)}function C(D){return r++,n.push([t.currentConstruct,t.containerState]),E(D)}function y(D){if(D===null){o&&b(),F(0),e.consume(D);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),w(D)}function w(D){if(D===null){B(e.exit("chunkFlow"),!0),F(0),e.consume(D);return}return $e(D)?(e.consume(D),B(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(D),w)}function B(D,S){const k=t.sliceStream(D);if(S&&k.push(null),D.previous=a,a&&(a.next=D),a=D,o.defineSkip(D.start),o.write(k),t.parser.lazy[D.start.line]){let P=o.events.length;for(;P--;)if(o.events[P][1].start.offset<l&&(!o.events[P][1].end||o.events[P][1].end.offset>l))return;const R=t.events.length;let M=R,O,T;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){if(O){T=t.events[M][1].end;break}O=!0}for(F(r),P=R;P<t.events.length;)t.events[P][1].end={...T},P++;const V=new Gc;V.add(M+1,0,t.events.slice(R)),V.add(R,P-R,[]),V.consume(t.events)}}function F(D){let S=n.length;for(;S-- >D;){const k=n[S];t.containerState=k[1],k[0].exit.call(t,e)}n.length=D}function b(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function uP(e,t,n){return pt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function yu(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const rf={name:"attention",resolveAll:xP,tokenize:dP};function xP(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let o=n;for(;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[o][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const a=e[o][1].end.offset-e[o][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,l={...e[o][1].end},c={...e[n][1].start};Wg(l,-a),Wg(c,a);const x={type:a>1?"strongSequence":"emphasisSequence",start:l,end:{...e[o][1].end}},f={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:c},m={type:a>1?"strongText":"emphasisText",start:{...e[o][1].end},end:{...e[n][1].start}},h={type:a>1?"strong":"emphasis",start:{...x.start},end:{...f.end}};e[o][1].end={...x.start},e[n][1].start={...f.end},r=[],e[o][1].end.offset-e[o][1].start.offset&&(r=Wn(r,[["enter",e[o][1],t],["exit",e[o][1],t]])),r=Wn(r,[["enter",h,t],["enter",x,t],["exit",x,t],["enter",m,t]]),r=Wn(r,yu(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),r=Wn(r,[["exit",m,t],["enter",f,t],["exit",f,t],["exit",h,t]]);let E=0;e[n][1].end.offset-e[n][1].start.offset&&(E=2,r=Wn(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),cr(e,o-1,n-o+3,r),n=o+r.length-E-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function dP(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Hc(r);let a;return l;function l(x){return a=x,e.enter("attentionSequence"),c(x)}function c(x){if(x===a)return e.consume(x),c;const f=e.exit("attentionSequence"),m=Hc(x),h=!m||m===2&&o||n.includes(x)&&x!==42&&x!==95,E=!o||o===2&&m||n.includes(r)&&r!==42&&r!==95;return f._open=!!(a===42?h:h&&(o||!E)),f._close=!!(a===42?E:E&&(m||!h)),t(x)}}function Wg(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const fP={name:"autolink",tokenize:hP};function hP(e,t,n){let r=0;return o;function o(C){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(C),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(C){return mn(C)?(e.consume(C),l):C===64?n(C):f(C)}function l(C){return C===43||C===45||C===46||un(C)?(r=1,c(C)):f(C)}function c(C){return C===58?(e.consume(C),r=0,x):(C===43||C===45||C===46||un(C))&&r++<32?(e.consume(C),c):(r=0,f(C))}function x(C){return C===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(C),e.exit("autolinkMarker"),e.exit("autolink"),t):C===null||C===32||C===60||Wc(C)?n(C):(e.consume(C),x)}function f(C){return C===64?(e.consume(C),m):cS(C)?(e.consume(C),f):n(C)}function m(C){return un(C)?h(C):n(C)}function h(C){return C===46?(e.consume(C),r=0,m):C===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(C),e.exit("autolinkMarker"),e.exit("autolink"),t):E(C)}function E(C){if((C===45||un(C))&&r++<63){const y=C===45?E:h;return e.consume(C),y}return n(C)}}const Ma={partial:!0,tokenize:mP};function mP(e,t,n){return r;function r(a){return it(a)?pt(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||$e(a)?t(a):n(a)}}const Tv={continuation:{tokenize:EP},exit:gP,name:"blockQuote",tokenize:pP};function pP(e,t,n){const r=this;return o;function o(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return it(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function EP(e,t,n){const r=this;return o;function o(l){return it(l)?pt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(Tv,t,n)(l)}}function gP(e){e.exit("blockQuote")}const Rv={name:"characterEscape",tokenize:CP};function CP(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return xS(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Nv={name:"characterReference",tokenize:yP};function yP(e,t,n){const r=this;let o=0,a,l;return c;function c(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),x}function x(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,l=un,m(h))}function f(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=uS,m):(e.enter("characterReferenceValue"),a=7,l=tf,m(h))}function m(h){if(h===59&&o){const E=e.exit("characterReferenceValue");return l===un&&!Ph(r.sliceSerialize(E))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(h)&&o++<a?(e.consume(h),m):n(h)}}const of={partial:!0,tokenize:vP};function vP(e,t,n){const r=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Hg={concrete:!0,name:"codeFenced",tokenize:AP};function AP(e,t,n){const r=this,o={partial:!0,tokenize:k};let a=0,l=0,c;return x;function x(P){return f(P)}function f(P){const R=r.events[r.events.length-1];return a=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,c=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(P)}function m(P){return P===c?(l++,e.consume(P),m):l<3?n(P):(e.exit("codeFencedFenceSequence"),it(P)?pt(e,h,"whitespace")(P):h(P))}function h(P){return P===null||$e(P)?(e.exit("codeFencedFence"),r.interrupt?t(P):e.check(of,w,S)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),E(P))}function E(P){return P===null||$e(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(P)):it(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),pt(e,C,"whitespace")(P)):P===96&&P===c?n(P):(e.consume(P),E)}function C(P){return P===null||$e(P)?h(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(P))}function y(P){return P===null||$e(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(P)):P===96&&P===c?n(P):(e.consume(P),y)}function w(P){return e.attempt(o,S,B)(P)}function B(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),F}function F(P){return a>0&&it(P)?pt(e,b,"linePrefix",a+1)(P):b(P)}function b(P){return P===null||$e(P)?e.check(of,w,S)(P):(e.enter("codeFlowValue"),D(P))}function D(P){return P===null||$e(P)?(e.exit("codeFlowValue"),b(P)):(e.consume(P),D)}function S(P){return e.exit("codeFenced"),t(P)}function k(P,R,M){let O=0;return T;function T(W){return P.enter("lineEnding"),P.consume(W),P.exit("lineEnding"),V}function V(W){return P.enter("codeFencedFence"),it(W)?pt(P,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):z(W)}function z(W){return W===c?(P.enter("codeFencedFenceSequence"),J(W)):M(W)}function J(W){return W===c?(O++,P.consume(W),J):O>=l?(P.exit("codeFencedFenceSequence"),it(W)?pt(P,H,"whitespace")(W):H(W)):M(W)}function H(W){return W===null||$e(W)?(P.exit("codeFencedFence"),R(W)):M(W)}}}const Vx={name:"codeIndented",tokenize:wP},BP={partial:!0,tokenize:DP};function wP(e,t,n){return r;function r(c){return e.enter("codeIndented"),jv(e,o,n,"linePrefix",4,4)(c)}function o(c){return c===null?l(c):$e(c)?e.attempt(BP,o,l)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||$e(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function l(c){return e.exit("codeIndented"),t(c)}}function DP(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):$e(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):jv(e,t,a,"linePrefix",4,4)(l)}function a(l){return $e(l)?o(l):n(l)}}const kP={name:"codeText",previous:SP,resolve:FP,tokenize:bP};function FP(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function SP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function bP(e,t,n){let r=0,o,a;return l;function l(h){return e.enter("codeText"),e.enter("codeTextSequence"),c(h)}function c(h){return h===96?(e.consume(h),r++,c):(e.exit("codeTextSequence"),x(h))}function x(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),x):h===96?(a=e.enter("codeTextSequence"),o=0,m(h)):$e(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),x):(e.enter("codeTextData"),f(h))}function f(h){return h===null||h===32||h===96||$e(h)?(e.exit("codeTextData"),x(h)):(e.consume(h),f)}function m(h){return h===96?(e.consume(h),o++,m):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(a.type="codeTextData",f(h))}}class PP{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Xs(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Xs(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Xs(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Xs(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Xs(this.left,n.reverse())}}}function Xs(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Mv(e){const t={};let n=-1,r,o,a,l,c,x,f;const m=new PP(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(x=r[1]._tokenizer.events,a=0,a<x.length&&x[a][1].type==="lineEndingBlank"&&(a+=2),a<x.length&&x[a][1].type==="content"))for(;++a<x.length&&x[a][1].type!=="content";)x[a][1].type==="chunkText"&&(x[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,_P(m,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(l=m.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(m.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(r[1].end={...m.get(o)[1].start},c=m.slice(o,n),c.unshift(r),m.splice(o,n-o+1,c))}}return cr(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!f}function _P(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,x=[],f={};let m,h,E=-1,C=n,y=0,w=0;const B=[w];for(;C;){for(;e.get(++o)[1]!==C;);a.push(o),C._tokenizer||(m=r.sliceStream(C),C.next||m.push(null),h&&l.defineSkip(C.start),C._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(m),C._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),h=C,C=C.next}for(C=n;++E<c.length;)c[E][0]==="exit"&&c[E-1][0]==="enter"&&c[E][1].type===c[E-1][1].type&&c[E][1].start.line!==c[E][1].end.line&&(w=E+1,B.push(w),C._tokenizer=void 0,C.previous=void 0,C=C.next);for(l.events=[],C?(C._tokenizer=void 0,C.previous=void 0):B.pop(),E=B.length;E--;){const F=c.slice(B[E],B[E+1]),b=a.pop();x.push([b,b+F.length-1]),e.splice(b,2,F)}for(x.reverse(),E=-1;++E<x.length;)f[y+x[E][0]]=y+x[E][1],y+=x[E][1]-x[E][0]-1;return f}const jP={resolve:RP,tokenize:NP},TP={partial:!0,tokenize:MP};function RP(e){return Mv(e),e}function NP(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):$e(c)?e.check(TP,l,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function MP(e,t,n){const r=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),pt(e,a,"linePrefix")}function a(l){if(l===null||$e(l))return n(l);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Iv(e,t,n,r,o,a,l,c,x){const f=x||Number.POSITIVE_INFINITY;let m=0;return h;function h(F){return F===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(F),e.exit(a),E):F===null||F===32||F===41||Wc(F)?n(F):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),w(F))}function E(F){return F===62?(e.enter(a),e.consume(F),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),C(F))}function C(F){return F===62?(e.exit("chunkString"),e.exit(c),E(F)):F===null||F===60||$e(F)?n(F):(e.consume(F),F===92?y:C)}function y(F){return F===60||F===62||F===92?(e.consume(F),C):C(F)}function w(F){return!m&&(F===null||F===41||wt(F))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(F)):m<f&&F===40?(e.consume(F),m++,w):F===41?(e.consume(F),m--,w):F===null||F===32||F===40||Wc(F)?n(F):(e.consume(F),F===92?B:w)}function B(F){return F===40||F===41||F===92?(e.consume(F),w):w(F)}}function Lv(e,t,n,r,o,a){const l=this;let c=0,x;return f;function f(C){return e.enter(r),e.enter(o),e.consume(C),e.exit(o),e.enter(a),m}function m(C){return c>999||C===null||C===91||C===93&&!x||C===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(C):C===93?(e.exit(a),e.enter(o),e.consume(C),e.exit(o),e.exit(r),t):$e(C)?(e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||C===91||C===93||$e(C)||c++>999?(e.exit("chunkString"),m(C)):(e.consume(C),x||(x=!it(C)),C===92?E:h)}function E(C){return C===91||C===92||C===93?(e.consume(C),c++,h):h(C)}}function Ov(e,t,n,r,o,a){let l;return c;function c(E){return E===34||E===39||E===40?(e.enter(r),e.enter(o),e.consume(E),e.exit(o),l=E===40?41:E,x):n(E)}function x(E){return E===l?(e.enter(o),e.consume(E),e.exit(o),e.exit(r),t):(e.enter(a),f(E))}function f(E){return E===l?(e.exit(a),x(l)):E===null?n(E):$e(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),pt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===l||E===null||$e(E)?(e.exit("chunkString"),f(E)):(e.consume(E),E===92?h:m)}function h(E){return E===l||E===92?(e.consume(E),m):m(E)}}function ca(e,t){let n;return r;function r(o){return $e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):it(o)?pt(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const IP={name:"definition",tokenize:OP},LP={partial:!0,tokenize:zP};function OP(e,t,n){const r=this;let o;return a;function a(C){return e.enter("definition"),l(C)}function l(C){return Lv.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(C)}function c(C){return o=lr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),C===58?(e.enter("definitionMarker"),e.consume(C),e.exit("definitionMarker"),x):n(C)}function x(C){return wt(C)?ca(e,f)(C):f(C)}function f(C){return Iv(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(C)}function m(C){return e.attempt(LP,h,h)(C)}function h(C){return it(C)?pt(e,E,"whitespace")(C):E(C)}function E(C){return C===null||$e(C)?(e.exit("definition"),r.parser.defined.push(o),t(C)):n(C)}}function zP(e,t,n){return r;function r(c){return wt(c)?ca(e,o)(c):n(c)}function o(c){return Ov(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return it(c)?pt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||$e(c)?t(c):n(c)}}const VP={name:"hardBreakEscape",tokenize:UP};function UP(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return $e(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const $P={name:"headingAtx",resolve:WP,tokenize:HP};function WP(e,t){let n=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r){const o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};cr(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])}return e}function HP(e,t,n){let r=0;return o;function o(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),l(m)}function l(m){return m===35&&r++<6?(e.consume(m),l):m===null||wt(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),x(m)):m===null||$e(m)?(e.exit("atxHeading"),t(m)):it(m)?pt(e,c,"whitespace")(m):(e.enter("atxHeadingText"),f(m))}function x(m){return m===35?(e.consume(m),x):(e.exit("atxHeadingSequence"),c(m))}function f(m){return m===null||m===35||wt(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),f)}}const GP={concrete:!0,name:"htmlFlow",resolveTo:KP,tokenize:XP},qP={partial:!0,tokenize:YP};function KP(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function XP(e,t,n){const r=this;let o,a,l,c,x;return f;function f(N){return m(N)}function m(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),h}function h(N){return N===33?(e.consume(N),E):N===47?(e.consume(N),a=!0,w):N===63?(e.consume(N),o=3,r.interrupt?t:j):mn(N)?(e.consume(N),l=String.fromCharCode(N),B):n(N)}function E(N){return N===45?(e.consume(N),o=2,C):N===91?(e.consume(N),o=5,c=0,y):mn(N)?(e.consume(N),o=4,r.interrupt?t:j):n(N)}function C(N){return N===45?(e.consume(N),r.interrupt?t:j):n(N)}function y(N){const ae="CDATA[";return N===ae.charCodeAt(c++)?(e.consume(N),c===ae.length?r.interrupt?t:z:y):n(N)}function w(N){return mn(N)?(e.consume(N),l=String.fromCharCode(N),B):n(N)}function B(N){if(N===null||N===47||N===62||wt(N)){const ae=N===47,Ee=l.toLowerCase();return!ae&&!a&&Ig.includes(Ee)?(o=1,r.interrupt?t(N):z(N)):Ub.includes(l.toLowerCase())?(o=6,ae?(e.consume(N),F):r.interrupt?t(N):z(N)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):a?b(N):D(N))}return N===45||un(N)?(e.consume(N),l+=String.fromCharCode(N),B):n(N)}function F(N){return N===62?(e.consume(N),r.interrupt?t:z):n(N)}function b(N){return it(N)?(e.consume(N),b):T(N)}function D(N){return N===47?(e.consume(N),T):N===58||N===95||mn(N)?(e.consume(N),S):it(N)?(e.consume(N),D):T(N)}function S(N){return N===45||N===46||N===58||N===95||un(N)?(e.consume(N),S):k(N)}function k(N){return N===61?(e.consume(N),P):it(N)?(e.consume(N),k):D(N)}function P(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),x=N,R):it(N)?(e.consume(N),P):M(N)}function R(N){return N===x?(e.consume(N),x=null,O):N===null||$e(N)?n(N):(e.consume(N),R)}function M(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||wt(N)?k(N):(e.consume(N),M)}function O(N){return N===47||N===62||it(N)?D(N):n(N)}function T(N){return N===62?(e.consume(N),V):n(N)}function V(N){return N===null||$e(N)?z(N):it(N)?(e.consume(N),V):n(N)}function z(N){return N===45&&o===2?(e.consume(N),re):N===60&&o===1?(e.consume(N),Z):N===62&&o===4?(e.consume(N),I):N===63&&o===3?(e.consume(N),j):N===93&&o===5?(e.consume(N),ie):$e(N)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(qP,G,J)(N)):N===null||$e(N)?(e.exit("htmlFlowData"),J(N)):(e.consume(N),z)}function J(N){return e.check(of,H,G)(N)}function H(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),W}function W(N){return N===null||$e(N)?J(N):(e.enter("htmlFlowData"),z(N))}function re(N){return N===45?(e.consume(N),j):z(N)}function Z(N){return N===47?(e.consume(N),l="",K):z(N)}function K(N){if(N===62){const ae=l.toLowerCase();return Ig.includes(ae)?(e.consume(N),I):z(N)}return mn(N)&&l.length<8?(e.consume(N),l+=String.fromCharCode(N),K):z(N)}function ie(N){return N===93?(e.consume(N),j):z(N)}function j(N){return N===62?(e.consume(N),I):N===45&&o===2?(e.consume(N),j):z(N)}function I(N){return N===null||$e(N)?(e.exit("htmlFlowData"),G(N)):(e.consume(N),I)}function G(N){return e.exit("htmlFlow"),t(N)}}function YP(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ma,t,n)}}const QP={name:"htmlText",tokenize:JP};function JP(e,t,n){const r=this;let o,a,l;return c;function c(j){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(j),x}function x(j){return j===33?(e.consume(j),f):j===47?(e.consume(j),k):j===63?(e.consume(j),D):mn(j)?(e.consume(j),M):n(j)}function f(j){return j===45?(e.consume(j),m):j===91?(e.consume(j),a=0,y):mn(j)?(e.consume(j),b):n(j)}function m(j){return j===45?(e.consume(j),C):n(j)}function h(j){return j===null?n(j):j===45?(e.consume(j),E):$e(j)?(l=h,Z(j)):(e.consume(j),h)}function E(j){return j===45?(e.consume(j),C):h(j)}function C(j){return j===62?re(j):j===45?E(j):h(j)}function y(j){const I="CDATA[";return j===I.charCodeAt(a++)?(e.consume(j),a===I.length?w:y):n(j)}function w(j){return j===null?n(j):j===93?(e.consume(j),B):$e(j)?(l=w,Z(j)):(e.consume(j),w)}function B(j){return j===93?(e.consume(j),F):w(j)}function F(j){return j===62?re(j):j===93?(e.consume(j),F):w(j)}function b(j){return j===null||j===62?re(j):$e(j)?(l=b,Z(j)):(e.consume(j),b)}function D(j){return j===null?n(j):j===63?(e.consume(j),S):$e(j)?(l=D,Z(j)):(e.consume(j),D)}function S(j){return j===62?re(j):D(j)}function k(j){return mn(j)?(e.consume(j),P):n(j)}function P(j){return j===45||un(j)?(e.consume(j),P):R(j)}function R(j){return $e(j)?(l=R,Z(j)):it(j)?(e.consume(j),R):re(j)}function M(j){return j===45||un(j)?(e.consume(j),M):j===47||j===62||wt(j)?O(j):n(j)}function O(j){return j===47?(e.consume(j),re):j===58||j===95||mn(j)?(e.consume(j),T):$e(j)?(l=O,Z(j)):it(j)?(e.consume(j),O):re(j)}function T(j){return j===45||j===46||j===58||j===95||un(j)?(e.consume(j),T):V(j)}function V(j){return j===61?(e.consume(j),z):$e(j)?(l=V,Z(j)):it(j)?(e.consume(j),V):O(j)}function z(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),o=j,J):$e(j)?(l=z,Z(j)):it(j)?(e.consume(j),z):(e.consume(j),H)}function J(j){return j===o?(e.consume(j),o=void 0,W):j===null?n(j):$e(j)?(l=J,Z(j)):(e.consume(j),J)}function H(j){return j===null||j===34||j===39||j===60||j===61||j===96?n(j):j===47||j===62||wt(j)?O(j):(e.consume(j),H)}function W(j){return j===47||j===62||wt(j)?O(j):n(j)}function re(j){return j===62?(e.consume(j),e.exit("htmlTextData"),e.exit("htmlText"),t):n(j)}function Z(j){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),K}function K(j){return it(j)?pt(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):ie(j)}function ie(j){return e.enter("htmlTextData"),l(j)}}const _h={name:"labelEnd",resolveAll:n_,resolveTo:r_,tokenize:i_},ZP={tokenize:o_},e_={tokenize:s_},t_={tokenize:a_};function n_(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&cr(e,0,e.length,n),e}function r_(e,t){let n=e.length,r=0,o,a,l;for(;n--;){const m=e[n][1];if(o){if(m.type==="link"||m.type==="labelLink"&&m._inactive)break;e[n][0]==="enter"&&m.type==="labelLink"&&(m._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(m.type==="labelImage"||m.type==="labelLink")&&!m._balanced&&(o=n,m.type!=="labelLink")){r=2;break}}else m.type==="labelEnd"&&(a=n)}const c={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},x={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[a-2][1].start}};return l=[["enter",c,t],["enter",x,t]],l=Wn(l,e.slice(o+1,o+r+3)),l=Wn(l,[["enter",f,t]]),l=Wn(l,yu(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),l=Wn(l,[["exit",f,t],e[a-2],e[a-1],["exit",x,t]]),l=Wn(l,e.slice(a+1)),l=Wn(l,[["exit",c,t]]),cr(e,o,e.length,l),e}function i_(e,t,n){const r=this,o=r._labelStarts;let a,l;if(o){for(;o.length>0&&o[o.length-1]._balanced;)o.pop();a=o[o.length-1]}return c;function c(E){return a?a._inactive?h(E):(l=r.parser.defined.includes(lr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(E),e.exit("labelMarker"),e.exit("labelEnd"),x):n(E)}function x(E){return E===40?e.attempt(ZP,m,l?m:h)(E):E===91?e.attempt(e_,m,l?f:h)(E):l?m(E):h(E)}function f(E){return e.attempt(t_,m,h)(E)}function m(E){return o.pop(),t(E)}function h(E){return a._balanced=!0,n(E)}}function o_(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),o}function o(h){return wt(h)?ca(e,a)(h):a(h)}function a(h){return h===41?m(h):Iv(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function l(h){return wt(h)?ca(e,x)(h):m(h)}function c(h){return n(h)}function x(h){return h===34||h===39||h===40?Ov(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):m(h)}function f(h){return wt(h)?ca(e,m)(h):m(h)}function m(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function s_(e,t,n){const r=this;return o;function o(c){return Lv.call(r,e,a,l,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(lr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function a_(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const l_={name:"labelStartImage",resolveAll:_h.resolveAll,tokenize:c_};function c_(e,t,n){const r=this;let o;return a;function a(x){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(x),e.exit("labelImageMarker"),l}function l(x){return x===91?(e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),o=e.exit("labelImage"),c):n(x)}function c(x){return x===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(x):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(o),t(x))}}const u_={name:"labelStartLink",resolveAll:_h.resolveAll,tokenize:x_};function x_(e,t,n){const r=this;let o;return a;function a(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),o=e.exit("labelLink"),l}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(o),t(c))}}const Ux={name:"lineEnding",tokenize:d_};function d_(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),pt(e,t,"linePrefix")}}const wc={name:"thematicBreak",tokenize:f_};function f_(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),l(f)}function l(f){return o=f,c(f)}function c(f){return f===o?(e.enter("thematicBreakSequence"),x(f)):r>=3&&(f===null||$e(f))?(e.exit("thematicBreak"),t(f)):n(f)}function x(f){return f===o?(e.consume(f),r++,x):(e.exit("thematicBreakSequence"),it(f)?pt(e,c,"whitespace")(f):c(f))}}const kn={continuation:{tokenize:E_},exit:C_,name:"list",tokenize:p_},h_={partial:!0,tokenize:y_},m_={partial:!0,tokenize:g_};function p_(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return c;function c(C){const y=r.containerState.type||(C===42||C===43||C===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||C===r.containerState.marker:tf(C)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),C===42||C===45?e.check(wc,n,f)(C):f(C);if(!r.interrupt||C===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),x(C)}return n(C)}function x(C){return tf(C)&&++l<10?(e.consume(C),x):(!r.interrupt||l<2)&&(r.containerState.marker?C===r.containerState.marker:C===41||C===46)?(e.exit("listItemValue"),f(C)):n(C)}function f(C){return e.enter("listItemMarker"),e.consume(C),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||C,e.check(Ma,r.interrupt?n:m,e.attempt(h_,E,h))}function m(C){return r.containerState.initialBlankLine=!0,a++,E(C)}function h(C){return it(C)?(e.enter("listItemPrefixWhitespace"),e.consume(C),e.exit("listItemPrefixWhitespace"),E):n(C)}function E(C){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(C)}}function E_(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ma,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,pt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!it(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(m_,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,pt(e,e.attempt(kn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function g_(e,t,n){const r=this;return pt(e,o,"listItemIndent",r.containerState.size+1);function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function C_(e){e.exit(this.containerState.type)}function y_(e,t,n){const r=this;return pt(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const l=r.events[r.events.length-1];return!it(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Gg={name:"setextUnderline",resolveTo:v_,tokenize:A_};function v_(e,t){const n=new Gc;let r=e.length,o,a,l;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){o=r;break}e[r][1].type==="paragraph"&&(a=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!l&&e[r][1].type==="definition"&&(l=r);const c={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",l?(n.add(a,0,[["enter",c,t]]),n.add(l+1,0,[["exit",e[o][1],t]]),e[o][1].end={...e[l][1].end}):e[o][1]=c,n.add(e.length,0,[["exit",c,t]]),n.consume(e),e}function A_(e,t,n){const r=this;let o;return a;function a(f){let m=r.events.length,h;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){h=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),o=f,l(f)):n(f)}function l(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===o?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),it(f)?pt(e,x,"lineSuffix")(f):x(f))}function x(f){return f===null||$e(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const B_={tokenize:w_};function w_(e){const t=this,n=e.attempt(Ma,r,e.attempt(this.parser.constructs.flowInitial,o,pt(e,e.attempt(this.parser.constructs.flow,o,e.attempt(jP,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const D_={resolveAll:Vv()},k_=zv("string"),F_=zv("text");function zv(e){return{resolveAll:Vv(e==="text"?S_:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,l,c);return l;function l(m){return f(m)?a(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),x}function x(m){return f(m)?(n.exit("data"),a(m)):(n.consume(m),x)}function f(m){if(m===null)return!0;const h=o[m];let E=-1;if(h)for(;++E<h.length;){const C=h[E];if(!C.previous||C.previous.call(r,r.previous))return!0}return!1}}}function Vv(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function S_(e,t){const n=new Gc;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const o=e[r-1][1],a=t.sliceStream(o);let l=a.length,c=-1,x=0,f;for(;l--;){const m=a[l];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)x++,c--;if(c)break;c=-1}else if(m===-2)f=!0,x++;else if(m!==-1){l++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(x=0),x){const m={type:r===e.length||f||x<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?c:o.start._bufferIndex+c,_index:o.start._index+l,line:o.end.line,column:o.end.column-x,offset:o.end.offset-x},end:{...o.end}};o.end={...m.start},o.start.offset===o.end.offset?Object.assign(o,m):n.add(r,0,[["enter",m,t],["exit",m,t]])}r++}return n.consume(e),e}const b_={42:kn,43:kn,45:kn,48:kn,49:kn,50:kn,51:kn,52:kn,53:kn,54:kn,55:kn,56:kn,57:kn,62:Tv},P_={91:IP},__={[-2]:Vx,[-1]:Vx,32:Vx},j_={35:$P,42:wc,45:[Gg,wc],60:GP,61:Gg,95:wc,96:Hg,126:Hg},T_={38:Nv,92:Rv},R_={[-5]:Ux,[-4]:Ux,[-3]:Ux,33:l_,38:Nv,42:rf,60:[fP,QP],91:u_,92:[VP,Rv],93:_h,95:rf,96:kP},N_={null:[rf,D_]},M_={null:[42,95]},I_={null:[]},L_=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:M_,contentInitial:P_,disable:I_,document:b_,flow:j_,flowInitial:__,insideSpan:N_,string:T_,text:R_},Symbol.toStringTag,{value:"Module"}));function O_(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let l=[],c=[];const x={attempt:R(k),check:R(P),consume:b,enter:D,exit:S,interrupt:R(P,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:y,parser:e,previous:null,sliceSerialize:E,sliceStream:C,write:h};let m=t.tokenize.call(f,x);return t.resolveAll&&a.push(t),f;function h(V){return l=Wn(l,V),B(),l[l.length-1]!==null?[]:(M(t,0),f.events=yu(a,f.events,f),f.events)}function E(V,z){return V_(C(V),z)}function C(V){return z_(l,V)}function y(){const{_bufferIndex:V,_index:z,line:J,column:H,offset:W}=r;return{_bufferIndex:V,_index:z,line:J,column:H,offset:W}}function w(V){o[V.line]=V.column,T()}function B(){for(;r._index<l.length;){const V=l[r._index];if(typeof V=="string"){const z=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===z&&r._bufferIndex<V.length;)F(V.charCodeAt(r._bufferIndex))}else F(V)}}function F(V){m=m(V)}function b(V){$e(V)?(r.line++,r.column=1,r.offset+=V===-3?2:1,T()):V!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=V}function D(V,z){const J=z||{};return J.type=V,J.start=y(),f.events.push(["enter",J,f]),c.push(J),J}function S(V){const z=c.pop();return z.end=y(),f.events.push(["exit",z,f]),z}function k(V,z){M(V,z.from)}function P(V,z){z.restore()}function R(V,z){return J;function J(H,W,re){let Z,K,ie,j;return Array.isArray(H)?G(H):"tokenize"in H?G([H]):I(H);function I(se){return xe;function xe(we){const de=we!==null&&se[we],et=we!==null&&se.null,Ie=[...Array.isArray(de)?de:de?[de]:[],...Array.isArray(et)?et:et?[et]:[]];return G(Ie)(we)}}function G(se){return Z=se,K=0,se.length===0?re:N(se[K])}function N(se){return xe;function xe(we){return j=O(),ie=se,se.partial||(f.currentConstruct=se),se.name&&f.parser.constructs.disable.null.includes(se.name)?Ee():se.tokenize.call(z?Object.assign(Object.create(f),z):f,x,ae,Ee)(we)}}function ae(se){return V(ie,j),W}function Ee(se){return j.restore(),++K<Z.length?N(Z[K]):re}}}function M(V,z){V.resolveAll&&!a.includes(V)&&a.push(V),V.resolve&&cr(f.events,z,f.events.length-z,V.resolve(f.events.slice(z),f)),V.resolveTo&&(f.events=V.resolveTo(f.events,f))}function O(){const V=y(),z=f.previous,J=f.currentConstruct,H=f.events.length,W=Array.from(c);return{from:H,restore:re};function re(){r=V,f.previous=z,f.currentConstruct=J,f.events.length=H,c=W,T()}}function T(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function z_(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,a)];else{if(l=e.slice(n,o),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}a>0&&l.push(e[o].slice(0,a))}return l}function V_(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
|
|
402
|
+
`;break}case-3:{l=`\r
|
|
403
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(a)}o=a===-2,r.push(l)}return r.join("")}function U_(e){const r={constructs:_v([L_,...(e||{}).extensions||[]]),content:o(sP),defined:[],document:o(lP),flow:o(B_),lazy:{},string:o(k_),text:o(F_)};return r;function o(a){return l;function l(c){return O_(r,a,c)}}}function $_(e){for(;!Mv(e););return e}const qg=/[\0\t\n\r]/g;function W_(){let e=1,t="",n=!0,r;return o;function o(a,l,c){a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a));const x=[];let f=0;for(t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){qg.lastIndex=f;const m=qg.exec(a),h=m&&m.index!==void 0?m.index:a.length,E=a.charCodeAt(h);if(!m){t=a.slice(f);break}if(E===10&&f===h&&r)x.push(-3),r=void 0;else switch(r&&(x.push(-5),r=void 0),f<h&&(x.push(a.slice(f,h)),e+=h-f),E){case 0:{x.push(65533),e++;break}case 9:{const C=Math.ceil(e/4)*4;for(x.push(-2);e++<C;)x.push(-1);break}case 10:{x.push(-4),e=1;break}default:r=!0,e=1}f=h+1}return c&&(r&&x.push(-5),t&&x.push(t),x.push(null)),x}}function ua(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Kg(e.position):"start"in e||"end"in e?Kg(e):"line"in e||"column"in e?sf(e):""}function sf(e){return Xg(e&&e.line)+":"+Xg(e&&e.column)}function Kg(e){return sf(e&&e.start)+"-"+sf(e&&e.end)}function Xg(e){return e&&typeof e=="number"?e:1}const Uv={}.hasOwnProperty;function $v(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),H_(n)($_(U_(n).document().write(W_()(e,t,!0))))}function H_(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(He),autolinkProtocol:O,autolinkEmail:O,atxHeading:a(Ye),blockQuote:a(et),characterEscape:O,characterReference:O,codeFenced:a(Ie),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(Ie,l),codeText:a(oe,l),codeTextData:O,data:O,codeFlowValue:O,definition:a(Me),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(be),hardBreakEscape:a(Je),hardBreakTrailing:a(Je),htmlFlow:a(Qe,l),htmlFlowData:O,htmlText:a(Qe,l),htmlTextData:O,image:a(yt),label:l,link:a(He),listItem:a(ct),listItemValue:E,listOrdered:a(dt,h),listUnordered:a(dt),paragraph:a(Ke),reference:N,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Ye),strong:a(Vt),thematicBreak:a(st)},exit:{atxHeading:x(),atxHeadingSequence:k,autolink:x(),autolinkEmail:de,autolinkProtocol:we,blockQuote:x(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:se,characterReference:xe,codeFenced:x(B),codeFencedFence:w,codeFencedFenceInfo:C,codeFencedFenceMeta:y,codeFlowValue:T,codeIndented:x(F),codeText:x(W),codeTextData:T,data:T,definition:x(),definitionDestinationString:S,definitionLabelString:b,definitionTitleString:D,emphasis:x(),hardBreakEscape:x(z),hardBreakTrailing:x(z),htmlFlow:x(J),htmlFlowData:T,htmlText:x(H),htmlTextData:T,image:x(Z),label:ie,labelText:K,lineEnding:V,link:x(re),listItem:x(),listOrdered:x(),listUnordered:x(),paragraph:x(),referenceString:ae,resourceDestinationString:j,resourceTitleString:I,resource:G,setextHeading:x(M),setextHeadingLineSequence:R,setextHeadingText:P,strong:x(),thematicBreak:x()}};Wv(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Y){let le={type:"root",children:[]};const je={stack:[le],tokenStack:[],config:t,enter:c,exit:f,buffer:l,resume:m,data:n},De=[];let qe=-1;for(;++qe<Y.length;)if(Y[qe][1].type==="listOrdered"||Y[qe][1].type==="listUnordered")if(Y[qe][0]==="enter")De.push(qe);else{const Et=De.pop();qe=o(Y,Et,qe)}for(qe=-1;++qe<Y.length;){const Et=t[Y[qe][0]];Uv.call(Et,Y[qe][1].type)&&Et[Y[qe][1].type].call(Object.assign({sliceSerialize:Y[qe][2].sliceSerialize},je),Y[qe][1])}if(je.tokenStack.length>0){const Et=je.tokenStack[je.tokenStack.length-1];(Et[1]||Yg).call(je,void 0,Et[0])}for(le.position={start:xi(Y.length>0?Y[0][1].start:{line:1,column:1,offset:0}),end:xi(Y.length>0?Y[Y.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe<t.transforms.length;)le=t.transforms[qe](le)||le;return le}function o(Y,le,je){let De=le-1,qe=-1,Et=!1,Rt,q,ve,he;for(;++De<=je;){const Be=Y[De];switch(Be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Be[0]==="enter"?qe++:qe--,he=void 0;break}case"lineEndingBlank":{Be[0]==="enter"&&(Rt&&!he&&!qe&&!ve&&(ve=De),he=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:he=void 0}if(!qe&&Be[0]==="enter"&&Be[1].type==="listItemPrefix"||qe===-1&&Be[0]==="exit"&&(Be[1].type==="listUnordered"||Be[1].type==="listOrdered")){if(Rt){let Le=De;for(q=void 0;Le--;){const Ce=Y[Le];if(Ce[1].type==="lineEnding"||Ce[1].type==="lineEndingBlank"){if(Ce[0]==="exit")continue;q&&(Y[q][1].type="lineEndingBlank",Et=!0),Ce[1].type="lineEnding",q=Le}else if(!(Ce[1].type==="linePrefix"||Ce[1].type==="blockQuotePrefix"||Ce[1].type==="blockQuotePrefixWhitespace"||Ce[1].type==="blockQuoteMarker"||Ce[1].type==="listItemIndent"))break}ve&&(!q||ve<q)&&(Rt._spread=!0),Rt.end=Object.assign({},q?Y[q][1].start:Be[1].end),Y.splice(q||De,0,["exit",Rt,Be[2]]),De++,je++}if(Be[1].type==="listItemPrefix"){const Le={type:"listItem",_spread:!1,start:Object.assign({},Be[1].start),end:void 0};Rt=Le,Y.splice(De,0,["enter",Le,Be[2]]),De++,je++,ve=void 0,he=!0}}}return Y[le][1]._spread=Et,je}function a(Y,le){return je;function je(De){c.call(this,Y(De),De),le&&le.call(this,De)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(Y,le,je){this.stack[this.stack.length-1].children.push(Y),this.stack.push(Y),this.tokenStack.push([le,je||void 0]),Y.position={start:xi(le.start),end:void 0}}function x(Y){return le;function le(je){Y&&Y.call(this,je),f.call(this,je)}}function f(Y,le){const je=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==Y.type&&(le?le.call(this,Y,De[0]):(De[1]||Yg).call(this,Y,De[0]));else throw new Error("Cannot close `"+Y.type+"` ("+ua({start:Y.start,end:Y.end})+"): it’s not open");je.position.end=xi(Y.end)}function m(){return Fh(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function E(Y){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(Y),10),this.data.expectingFirstListItemValue=void 0}}function C(){const Y=this.resume(),le=this.stack[this.stack.length-1];le.lang=Y}function y(){const Y=this.resume(),le=this.stack[this.stack.length-1];le.meta=Y}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function B(){const Y=this.resume(),le=this.stack[this.stack.length-1];le.value=Y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function F(){const Y=this.resume(),le=this.stack[this.stack.length-1];le.value=Y.replace(/(\r?\n|\r)$/g,"")}function b(Y){const le=this.resume(),je=this.stack[this.stack.length-1];je.label=le,je.identifier=lr(this.sliceSerialize(Y)).toLowerCase()}function D(){const Y=this.resume(),le=this.stack[this.stack.length-1];le.title=Y}function S(){const Y=this.resume(),le=this.stack[this.stack.length-1];le.url=Y}function k(Y){const le=this.stack[this.stack.length-1];if(!le.depth){const je=this.sliceSerialize(Y).length;le.depth=je}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function R(Y){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(Y).codePointAt(0)===61?1:2}function M(){this.data.setextHeadingSlurpLineEnding=void 0}function O(Y){const je=this.stack[this.stack.length-1].children;let De=je[je.length-1];(!De||De.type!=="text")&&(De=tt(),De.position={start:xi(Y.start),end:void 0},je.push(De)),this.stack.push(De)}function T(Y){const le=this.stack.pop();le.value+=this.sliceSerialize(Y),le.position.end=xi(Y.end)}function V(Y){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const je=le.children[le.children.length-1];je.position.end=xi(Y.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(le.type)&&(O.call(this,Y),T.call(this,Y))}function z(){this.data.atHardBreak=!0}function J(){const Y=this.resume(),le=this.stack[this.stack.length-1];le.value=Y}function H(){const Y=this.resume(),le=this.stack[this.stack.length-1];le.value=Y}function W(){const Y=this.resume(),le=this.stack[this.stack.length-1];le.value=Y}function re(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=le,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function Z(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=le,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function K(Y){const le=this.sliceSerialize(Y),je=this.stack[this.stack.length-2];je.label=Wb(le),je.identifier=lr(le).toLowerCase()}function ie(){const Y=this.stack[this.stack.length-1],le=this.resume(),je=this.stack[this.stack.length-1];if(this.data.inReference=!0,je.type==="link"){const De=Y.children;je.children=De}else je.alt=le}function j(){const Y=this.resume(),le=this.stack[this.stack.length-1];le.url=Y}function I(){const Y=this.resume(),le=this.stack[this.stack.length-1];le.title=Y}function G(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function ae(Y){const le=this.resume(),je=this.stack[this.stack.length-1];je.label=le,je.identifier=lr(this.sliceSerialize(Y)).toLowerCase(),this.data.referenceType="full"}function Ee(Y){this.data.characterReferenceType=Y.type}function se(Y){const le=this.sliceSerialize(Y),je=this.data.characterReferenceType;let De;je?(De=bv(le,je==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=Ph(le);const qe=this.stack[this.stack.length-1];qe.value+=De}function xe(Y){const le=this.stack.pop();le.position.end=xi(Y.end)}function we(Y){T.call(this,Y);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(Y)}function de(Y){T.call(this,Y);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(Y)}function et(){return{type:"blockquote",children:[]}}function Ie(){return{type:"code",lang:null,meta:null,value:""}}function oe(){return{type:"inlineCode",value:""}}function Me(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function be(){return{type:"emphasis",children:[]}}function Ye(){return{type:"heading",depth:0,children:[]}}function Je(){return{type:"break"}}function Qe(){return{type:"html",value:""}}function yt(){return{type:"image",title:null,url:"",alt:null}}function He(){return{type:"link",title:null,url:"",children:[]}}function dt(Y){return{type:"list",ordered:Y.type==="listOrdered",start:null,spread:Y._spread,children:[]}}function ct(Y){return{type:"listItem",spread:Y._spread,checked:null,children:[]}}function Ke(){return{type:"paragraph",children:[]}}function Vt(){return{type:"strong",children:[]}}function tt(){return{type:"text",value:""}}function st(){return{type:"thematicBreak"}}}function xi(e){return{line:e.line,column:e.column,offset:e.offset}}function Wv(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Wv(e,r):G_(e,r)}}function G_(e,t){let n;for(n in t)if(Uv.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Yg(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ua({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ua({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ua({start:t.start,end:t.end})+") is still open")}const q_={tokenize:Z_,partial:!0},Hv={tokenize:ej,partial:!0},Gv={tokenize:tj,partial:!0},qv={tokenize:nj,partial:!0},K_={tokenize:rj,partial:!0},Kv={name:"wwwAutolink",tokenize:Q_,previous:Yv},Xv={name:"protocolAutolink",tokenize:J_,previous:Qv},$r={name:"emailAutolink",tokenize:Y_,previous:Jv},Sr={};function X_(){return{text:Sr}}let Ii=48;for(;Ii<123;)Sr[Ii]=$r,Ii++,Ii===58?Ii=65:Ii===91&&(Ii=97);Sr[43]=$r;Sr[45]=$r;Sr[46]=$r;Sr[95]=$r;Sr[72]=[$r,Xv];Sr[104]=[$r,Xv];Sr[87]=[$r,Kv];Sr[119]=[$r,Kv];function Y_(e,t,n){const r=this;let o,a;return l;function l(h){return!af(h)||!Jv.call(r,r.previous)||jh(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(h))}function c(h){return af(h)?(e.consume(h),c):h===64?(e.consume(h),x):n(h)}function x(h){return h===46?e.check(K_,m,f)(h):h===45||h===95||un(h)?(a=!0,e.consume(h),x):m(h)}function f(h){return e.consume(h),o=!0,x}function m(h){return a&&o&&mn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function Q_(e,t,n){const r=this;return o;function o(l){return l!==87&&l!==119||!Yv.call(r,r.previous)||jh(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(q_,e.attempt(Hv,e.attempt(Gv,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function J_(e,t,n){const r=this;let o="",a=!1;return l;function l(h){return(h===72||h===104)&&Qv.call(r,r.previous)&&!jh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(h),e.consume(h),c):n(h)}function c(h){if(mn(h)&&o.length<5)return o+=String.fromCodePoint(h),e.consume(h),c;if(h===58){const E=o.toLowerCase();if(E==="http"||E==="https")return e.consume(h),x}return n(h)}function x(h){return h===47?(e.consume(h),a?f:(a=!0,x)):n(h)}function f(h){return h===null||Wc(h)||wt(h)||no(h)||Eu(h)?n(h):e.attempt(Hv,e.attempt(Gv,m),n)(h)}function m(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function Z_(e,t,n){let r=0;return o;function o(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),o):l===46&&r===3?(e.consume(l),a):n(l)}function a(l){return l===null?n(l):t(l)}}function ej(e,t,n){let r,o,a;return l;function l(f){return f===46||f===95?e.check(qv,x,c)(f):f===null||wt(f)||no(f)||f!==45&&Eu(f)?x(f):(a=!0,e.consume(f),l)}function c(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),l}function x(f){return o||r||!a?n(f):t(f)}}function tj(e,t){let n=0,r=0;return o;function o(l){return l===40?(n++,e.consume(l),o):l===41&&r<n?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(qv,t,a)(l):l===null||wt(l)||no(l)?t(l):(e.consume(l),o)}function a(l){return l===41&&r++,e.consume(l),o}}function nj(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||wt(c)||no(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||wt(c)||no(c)?t(c):r(c)}function a(c){return mn(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):mn(c)?(e.consume(c),l):n(c)}}function rj(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return un(a)?n(a):t(a)}}function Yv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||wt(e)}function Qv(e){return!mn(e)}function Jv(e){return!(e===47||af(e))}function af(e){return e===43||e===45||e===46||e===95||un(e)}function jh(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const ij={tokenize:dj,partial:!0};function oj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:cj,continuation:{tokenize:uj},exit:xj}},text:{91:{name:"gfmFootnoteCall",tokenize:lj},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:sj,resolveTo:aj}}}}function sj(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const x=r.events[o][1];if(x.type==="labelImage"){l=x;break}if(x.type==="gfmFootnoteCall"||x.type==="labelLink"||x.type==="label"||x.type==="image"||x.type==="link")break}return c;function c(x){if(!l||!l._balanced)return n(x);const f=lr(r.sliceSerialize({start:l.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(x):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(x),e.exit("gfmFootnoteCallLabelMarker"),t(x))}}function aj(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function lj(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return c;function c(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),x}function x(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(h){if(a>999||h===93&&!l||h===null||h===91||wt(h))return n(h);if(h===93){e.exit("chunkString");const E=e.exit("gfmFootnoteCallString");return o.includes(lr(r.sliceSerialize(E)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return wt(h)||(l=!0),a++,e.consume(h),h===92?m:f}function m(h){return h===91||h===92||h===93?(e.consume(h),a++,f):f(h)}}function cj(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,c;return x;function x(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(y)}function m(y){if(l>999||y===93&&!c||y===null||y===91||wt(y))return n(y);if(y===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=lr(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),E}return wt(y)||(c=!0),l++,e.consume(y),y===92?h:m}function h(y){return y===91||y===92||y===93?(e.consume(y),l++,m):m(y)}function E(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),o.includes(a)||o.push(a),pt(e,C,"gfmFootnoteDefinitionWhitespace")):n(y)}function C(y){return t(y)}}function uj(e,t,n){return e.check(Ma,t,e.attempt(ij,t,n))}function xj(e){e.exit("gfmFootnoteDefinition")}function dj(e,t,n){const r=this;return pt(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):n(a)}}function fj(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(l,c){let x=-1;for(;++x<l.length;)if(l[x][0]==="enter"&&l[x][1].type==="strikethroughSequenceTemporary"&&l[x][1]._close){let f=x;for(;f--;)if(l[f][0]==="exit"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._open&&l[x][1].end.offset-l[x][1].start.offset===l[f][1].end.offset-l[f][1].start.offset){l[x][1].type="strikethroughSequence",l[f][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},l[f][1].start),end:Object.assign({},l[x][1].end)},h={type:"strikethroughText",start:Object.assign({},l[f][1].end),end:Object.assign({},l[x][1].start)},E=[["enter",m,c],["enter",l[f][1],c],["exit",l[f][1],c],["enter",h,c]],C=c.parser.constructs.insideSpan.null;C&&cr(E,E.length,0,yu(C,l.slice(f+1,x),c)),cr(E,E.length,0,[["exit",h,c],["enter",l[x][1],c],["exit",l[x][1],c],["exit",m,c]]),cr(l,f-1,x-f+3,E),x=f+E.length-2;break}}for(x=-1;++x<l.length;)l[x][1].type==="strikethroughSequenceTemporary"&&(l[x][1].type="data");return l}function a(l,c,x){const f=this.previous,m=this.events;let h=0;return E;function E(y){return f===126&&m[m.length-1][1].type!=="characterEscape"?x(y):(l.enter("strikethroughSequenceTemporary"),C(y))}function C(y){const w=Hc(f);if(y===126)return h>1?x(y):(l.consume(y),h++,C);if(h<2&&!n)return x(y);const B=l.exit("strikethroughSequenceTemporary"),F=Hc(y);return B._open=!F||F===2&&!!w,B._close=!w||w===2&&!!F,c(y)}}}class hj{constructor(){this.map=[],this.index=new Map}add(t,n,r){mj(this,t,n,r)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0,this.index.clear()}}function mj(e,t,n,r){if(n===0&&r.length===0)return;const o=e.index.get(t);if(o){o[1]+=n,o[2].push(...r);return}const a=[t,n,r];e.map.push(a),e.index.set(t,a)}function pj(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Ej(){return{flow:{null:{name:"table",tokenize:gj,resolveAll:Cj}}}}function gj(e,t,n){const r=this;let o=0,a=0,l;return c;function c(T){let V=r.events.length-1;for(;V>-1;){const{type:H}=r.events[V][1];if(H==="lineEnding"||H==="linePrefix")V--;else break}const z=V>-1?r.events[V][1].type:null,J=z==="tableHead"||z==="tableRow"?P:x;return J===P&&r.parser.lazy[r.now().line]?n(T):J(T)}function x(T){return e.enter("tableHead"),e.enter("tableRow"),f(T)}function f(T){return T===124||(l=!0,a+=1),m(T)}function m(T){return T===null?n(T):$e(T)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),C):n(T):it(T)?pt(e,m,"whitespace")(T):(a+=1,l&&(l=!1,o+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),l=!0,m):(e.enter("data"),h(T)))}function h(T){return T===null||T===124||wt(T)?(e.exit("data"),m(T)):(e.consume(T),T===92?E:h)}function E(T){return T===92||T===124?(e.consume(T),h):h(T)}function C(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(T):(e.enter("tableDelimiterRow"),l=!1,it(T)?pt(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):y(T))}function y(T){return T===45||T===58?B(T):T===124?(l=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),w):k(T)}function w(T){return it(T)?pt(e,B,"whitespace")(T):B(T)}function B(T){return T===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),F):T===45?(a+=1,F(T)):T===null||$e(T)?S(T):k(T)}function F(T){return T===45?(e.enter("tableDelimiterFiller"),b(T)):k(T)}function b(T){return T===45?(e.consume(T),b):T===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),D):(e.exit("tableDelimiterFiller"),D(T))}function D(T){return it(T)?pt(e,S,"whitespace")(T):S(T)}function S(T){return T===124?y(T):T===null||$e(T)?!l||o!==a?k(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):k(T)}function k(T){return n(T)}function P(T){return e.enter("tableRow"),R(T)}function R(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),R):T===null||$e(T)?(e.exit("tableRow"),t(T)):it(T)?pt(e,R,"whitespace")(T):(e.enter("data"),M(T))}function M(T){return T===null||T===124||wt(T)?(e.exit("data"),R(T)):(e.consume(T),T===92?O:M)}function O(T){return T===92||T===124?(e.consume(T),M):M(T)}}function Cj(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],l=[0,0,0,0],c=!1,x=0,f,m,h;const E=new hj;for(;++n<e.length;){const C=e[n],y=C[1];C[0]==="enter"?y.type==="tableHead"?(c=!1,x!==0&&(Qg(E,t,x,f,m),m=void 0,x=0),f={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},E.add(n,0,[["enter",f,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,h=void 0,a=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},E.add(n,0,[["enter",m,t]])),o=y.type==="tableDelimiterRow"?2:m?3:1):o&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],h=ic(E,t,a,o,void 0,h),a=[0,0,0,0]),l[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],h=ic(E,t,a,o,void 0,h)),a=l,l=[a[1],n,0,0])):y.type==="tableHead"?(c=!0,x=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(x=n,a[1]!==0?(l[0]=l[1],h=ic(E,t,a,o,n,h)):l[1]!==0&&(h=ic(E,t,l,o,n,h)),o=0):o&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(l[3]=n)}for(x!==0&&Qg(E,t,x,f,m),E.consume(t.events),n=-1;++n<t.events.length;){const C=t.events[n];C[0]==="enter"&&C[1].type==="table"&&(C[1]._align=pj(t.events,n))}return e}function ic(e,t,n,r,o,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},Oo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const x=Oo(t.events,n[1]);if(a={type:l,start:Object.assign({},x),end:Object.assign({},x)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=Oo(t.events,n[2]),m=Oo(t.events,n[3]),h={type:c,start:Object.assign({},f),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const E=t.events[n[2]],C=t.events[n[3]];if(E[1].end=Object.assign({},C[1].end),E[1].type="chunkText",E[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,w=n[3]-n[2]-1;e.add(y,w,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return o!==void 0&&(a.end=Object.assign({},Oo(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function Qg(e,t,n,r,o){const a=[],l=Oo(t.events,n);o&&(o.end=Object.assign({},l),a.push(["exit",o,t])),r.end=Object.assign({},l),a.push(["exit",r,t]),e.add(n+1,0,a)}function Oo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const yj={name:"tasklistCheck",tokenize:Aj};function vj(){return{text:{91:yj}}}function Aj(e,t,n){const r=this;return o;function o(x){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(x):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(x),e.exit("taskListCheckMarker"),a)}function a(x){return wt(x)?(e.enter("taskListCheckValueUnchecked"),e.consume(x),e.exit("taskListCheckValueUnchecked"),l):x===88||x===120?(e.enter("taskListCheckValueChecked"),e.consume(x),e.exit("taskListCheckValueChecked"),l):n(x)}function l(x){return x===93?(e.enter("taskListCheckMarker"),e.consume(x),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(x)}function c(x){return $e(x)?t(x):it(x)?e.check({tokenize:Bj},t,n)(x):n(x)}}function Bj(e,t,n){return pt(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function Zv(e){return _v([X_(),oj(),fj(e),Ej(),vj()])}function e2(e){return typeof e=="string"&&/\.md$/i.test(e.trim())}function wj(e,t){const n=String(e??"").trim().split(/\r?\n/).map(o=>`> ${o}`).join(`
|
|
404
|
+
`),r=String(t??"").trim();return n&&r?`${n}
|
|
405
|
+
|
|
406
|
+
${r}`:n||r}function Dj(e){const t=String(e??""),n=t.lastIndexOf(".");return`${n>0?t.slice(0,n):t}_review.md`}function kj(e,t,n){const r=String(e??""),o=String(t??""),a=Math.max(0,Number(n)||0);if(!o)return 0;let l=0,c=0;for(;c<=r.length;){const x=r.indexOf(o,c);if(x<0||x>=a)return l;l+=1,c=x+Math.max(o.length,1)}return l}function Fj(e){return(String(e??"").match(/https?:\/\/[^\s<>()\[\]{}"']+/gi)??[]).map(n=>n.replace(/[.,!?;:]+$/,""))}function lf(e){return e?.kind!=="file"?null:String(e.mime??"").toLowerCase().startsWith("image/")?"photo":"file"}function Sj(e){const t=r=>{const o=Date.parse(String(r??""));return Number.isFinite(o)?o:0},n=new Map;for(const r of e??[]){const o=String(r?.message?.filename||"file"),a=n.get(o)??[];a.push(r),n.set(o,a)}return[...n.entries()].map(([r,o])=>({filename:r,versions:o.sort((a,l)=>t(l.message?.date)-t(a.message?.date))})).sort((r,o)=>t(o.versions[0]?.message?.date)-t(r.versions[0]?.message?.date))}const bj=new Set(["delete","emphasis","inlineCode","link","linkReference","strong"]);function Pj(e){const t=$v(e,{extensions:[Zv()],mdastExtensions:[Pv()]}),n=[],r=[],o=[],a=(c,x)=>{const f=String(c??""),m=x.position?.start?.offset,h=x.position?.end?.offset;if(!f||!Number.isInteger(m)||!Number.isInteger(h))return;const E=e.slice(m,h),C=E.indexOf(f);if(C>=0){for(let w=0;w<f.length;w+=1)n.push(f[w]),r.push(m+C+w+1);return}let y=0;for(const w of f){const B=E.indexOf(w,y),F=B>=0?B:Math.min(y,Math.max(E.length-1,0));n.push(w),r.push(m+F+1),y=F+1}},l=c=>{const x=n.length;if(c.type==="text"||c.type==="inlineCode"||c.type==="code")a(c.value,c);else for(const h of c.children??[])l(h);const f=n.length,m=c.position?.end?.offset;f>x&&bj.has(c.type)&&Number.isInteger(m)&&o.push({visibleEnd:f,rawEnd:m})};return l(t),{text:n.join(""),rawEnds:r,trailingRanges:o}}function _j(e,t,n){let r=-1,o=0;for(let a=0;a<=n;a+=1){if(r=e.indexOf(t,o),r<0)return-1;o=r+Math.max(t.length,1)}return r}function jj(e,t){const n=String(e??""),r=Pj(n),o=new Map,a=[];for(const[x,f]of(t??[]).entries()){const m=String(f?.selection??"").trim(),h=String(f?.comment??"").trim().replace(/\s+/g," ").replace(/\]\]/g,"] ]");if(!h)continue;const E=`[[REVIEW COMMENT ${x+1}: ${h}]]`,C=Number.isInteger(f?.occurrence)&&f.occurrence>=0?f.occurrence:0,y=m?_j(r.text,m,C):-1,w=y+m.length;let B=y>=0?r.rawEnds[w-1]:void 0;if(!Number.isInteger(B)){a.push(`[[REVIEW COMMENT ${x+1} — ANCHOR NOT FOUND: ${h}]]`);continue}for(const b of r.trailingRanges)b.visibleEnd===w&&(B=Math.max(B,b.rawEnd));const F=o.get(B)??[];F.push(E),o.set(B,F)}let l=n;const c=[...o.keys()].sort((x,f)=>f-x);for(const x of c)l=`${l.slice(0,x)} ${o.get(x).join(" ")}${l.slice(x)}`;return a.length>0&&(l=`${l.trimEnd()}
|
|
407
|
+
|
|
408
|
+
${a.join(`
|
|
409
|
+
`)}
|
|
410
|
+
`),l}const Tj="",Rj="application/octet-stream",Nj=/\.([A-Za-z0-9]{1,12})$/;function t2(e){return String(e??"").split(";")[0].trim().toLowerCase()}function n2(e){const t=Nj.exec(String(e??"").trim());return t?t[1].toLowerCase():""}function Mj(e){const t=n2(e);return t==="html"||t==="htm"}function Ia(e,t){return Mj(e)?!0:n2(e)?!1:t2(t)==="text/html"}function Th(e,t){const n=t2(e);return n==="text/html"||Ia(t,e)?Rj:n}const cf=48e3,Ij=Object.freeze([{rec:"audio/webm;codecs=opus",base:"audio/webm",ext:"webm"},{rec:"audio/ogg;codecs=opus",base:"audio/ogg",ext:"ogg"},{rec:"audio/webm",base:"audio/webm",ext:"webm"},{rec:"audio/mp4",base:"audio/mp4",ext:"m4a"}]),r2="x-ours-duration",Lj=4e3;function Oj(e){return!Number.isFinite(e)||e<=0?null:String(Math.round(e*100)/100)}function zj(e,t){const n=t===null?null:Oj(t);return n===null?e:`${e};${r2}=${n}`}function uf(e){if(!e)return null;const t=new RegExp(`${r2}\\s*=\\s*([0-9]*\\.?[0-9]+)`,"i").exec(e);if(!t)return null;const n=Number(t[1]);return Number.isFinite(n)&&n>0?n:null}function Vj(e,t=Lj){return typeof Audio!="function"||typeof URL?.createObjectURL!="function"?Promise.resolve(null):new Promise(n=>{const r=URL.createObjectURL(e),o=new Audio;let a=!1;const l=x=>{a||(a=!0,clearTimeout(c),o.removeAttribute("src"),o.load(),URL.revokeObjectURL(r),n(Number.isFinite(x)&&(x??0)>0?x:null))},c=setTimeout(()=>l(null),t);o.addEventListener("loadedmetadata",()=>{Number.isFinite(o.duration)&&o.duration>0?l(o.duration):o.currentTime=Number.MAX_SAFE_INTEGER},{once:!0}),o.addEventListener("durationchange",()=>{Number.isFinite(o.duration)&&o.duration>0&&l(o.duration)}),o.addEventListener("error",()=>l(null),{once:!0}),o.preload="metadata",o.src=r})}const i2=40,Uj=44,o2=.14,$j=.5,Wj=e=>e<0?0:e>1?1:e;function s2(e,{floor:t=o2,gamma:n=$j}={}){const r=Math.pow(Wj(Number.isFinite(e)?e:0),n);return t+(1-t)*r}function Hj(e,t=i2){const n=Math.max(1,Math.floor(t)),r=new Array(n).fill(0);if(!e||e.length===0)return r;const o=e.length/n;for(let a=0;a<n;a++){const l=Math.floor(a*o),c=Math.min(e.length,Math.max(l+1,Math.floor((a+1)*o)));let x=0;for(let f=l;f<c;f++)x+=e[f]*e[f];r[a]=Math.sqrt(x/(c-l))}return r}function Gj(e,t={}){const{silenceFloor:n=1e-4}=t,r=e.reduce((o,a)=>a>o?a:o,0);return r>n?e.map(o=>s2(o/r,t)):e.map(()=>o2)}function qj({decay:e=.995,minReference:t=.02}={}){let n=t;return{push(r){const o=Number.isFinite(r)&&r>0?r:0;return n=Math.max(t,n*e,o),s2(o/n)},get reference(){return n}}}function a2(e){return Th(e.mime,e.filename)}function Rh(e){const[t,n]=A.useState({url:null,size:0,loaded:!1});return A.useEffect(()=>{let r=null,o=!1;n({url:null,size:0,loaded:!1});const a=e.available?iS(e.id):null;return a?(n({url:a,size:e.size,loaded:!0}),()=>{}):(pu(e.id).then(l=>{if(o)return;if(!l){n({url:null,size:0,loaded:!0});return}const c=URL.createObjectURL(new Blob([l],{type:a2(e)}));r=c,n({url:c,size:l.byteLength,loaded:!0})}),()=>{o=!0,r&&URL.revokeObjectURL(r)})},[e.id,e.available]),t}function Nh({label:e}){return d.jsxs("div",{className:"file-offdevice",children:[d.jsx("div",{className:"file-offdevice-ic",children:d.jsx(Fe,{name:"inbox",size:16})}),d.jsxs("div",{className:"filecard-meta",children:[d.jsx("div",{className:"filecard-name",title:e,children:e}),d.jsx("div",{className:"filecard-sub",children:"Available on your original device"})]})]})}function Jg({rec:e}){if(!e.transcription)return null;const t=e.transcription.text?.trim();return d.jsx("div",{className:"voice-transcript",children:t||`Transcription ${e.transcription.status??"unavailable"}${e.transcription.error_category?` · ${e.transcription.error_category}`:""}`})}function Kj({rec:e,receipt:t,receiptless:n,onPreview:r,onFetch:o}){const a=e.dir==="out",l=`bubble file-bubble${a?" me":""}`,c=Jo(e.mime,e.filename)?"Voice message":"File",x=d.jsxs("div",{className:"bubble-at",children:[Zi(e.date),a&&d.jsx(ef,{receipt:t,content:c,receiptless:n})]});return e.mime.startsWith("image/")?d.jsx(Xj,{rec:e,cls:l,footer:x,onFetch:o}):Jo(e.mime,e.filename)?d.jsx(Yj,{rec:e,cls:l,footer:x,onFetch:o}):d.jsx(Qj,{rec:e,cls:l,footer:x,onPreview:r,onFetch:o})}function Mh({rec:e,onFetch:t}){const[n,r]=A.useState(!1),[o,a]=A.useState(!1);return d.jsxs("div",{className:"file-offdevice",children:[d.jsx("div",{className:"file-offdevice-ic",children:d.jsx(Fe,{name:"inbox",size:16})}),d.jsxs("div",{className:"filecard-meta",children:[d.jsx("div",{className:"filecard-name",title:e.filename,children:Jo(e.mime,e.filename)?"Voice message":e.filename}),d.jsx("div",{className:"filecard-sub",children:o?"Could not fetch media":"Available after explicit fetch"})]}),d.jsx("button",{className:"btn sm",disabled:n,onClick:()=>{r(!0),a(!1),(t?.(e.id)??aS(e.id)).catch(()=>a(!0)).finally(()=>r(!1))},children:n?"Fetching…":"Fetch"})]})}function Xj({rec:e,cls:t,footer:n,onFetch:r}){const{url:o,loaded:a}=Rh(e);return a&&!o?d.jsxs("div",{className:t+" filecard-bubble file-offdevice-bubble",children:[e.available===!1?d.jsx(Mh,{rec:e,onFetch:r}):d.jsx(Nh,{label:e.filename&&e.filename!=="file"?e.filename:"Photo"}),n]}):d.jsxs("div",{className:t+" image-bubble",children:[o?d.jsx(av,{url:o,name:e.filename}):d.jsx("div",{className:"file-loading",children:"loading…"}),n]})}function Yj({rec:e,cls:t,footer:n,onFetch:r}){const{url:o,loaded:a}=Rh(e),l=A.useRef(null),c=A.useRef(null),[x,f]=A.useState(!1),[m,h]=A.useState(0),[E,C]=A.useState(()=>uf(e.mime)),[y,w]=A.useState(!1),[B,F]=A.useState(null);if(A.useEffect(()=>{if(!o)return;let M=!1;const O=typeof window>"u"?void 0:window.AudioContext||window.webkitAudioContext;if(!O)return;const T=new O,V=()=>{try{T.close()?.catch?.(()=>{})}catch{}};return(async()=>{try{const z=await fetch(o).then(H=>H.arrayBuffer()),J=await T.decodeAudioData(z);if(M)return;F(Gj(Hj(J.getChannelData(0),i2)))}catch{}finally{V()}})(),()=>{M=!0,V()}},[o]),a&&!o)return d.jsxs("div",{className:t+" filecard-bubble file-offdevice-bubble",children:[e.available===!1?d.jsx(Mh,{rec:e,onFetch:r}):d.jsx(Nh,{label:"Voice message"}),n,d.jsx(Jg,{rec:e})]});const b=()=>{const M=l.current;M&&(x?M.pause():M.play())},D=M=>{const O=c.current;if(!O)return 0;const T=O.getBoundingClientRect();return Math.max(0,Math.min(1,(M-T.left)/T.width))},S=M=>{const O=l.current;h(M),O&&E&&isFinite(E)&&(O.currentTime=M*E)},k=M=>{o&&(M.currentTarget.setPointerCapture?.(M.pointerId),w(!0),S(D(M.clientX)))},P=M=>{y&&S(D(M.clientX))},R=M=>{y&&(M.currentTarget.releasePointerCapture?.(M.pointerId),w(!1))};return d.jsxs("div",{className:t+" voice-bubble",children:[d.jsx("button",{className:"voice-play",onClick:b,disabled:!o,title:x?"Pause":"Play",children:d.jsx(Fe,{name:x?"pause":"play",size:14})}),d.jsxs("div",{className:"voice-track"+(o?" seekable":"")+(y?" scrubbing":"")+(B?" has-wave":""),ref:c,onPointerDown:k,onPointerMove:P,onPointerUp:R,onPointerCancel:R,role:o?"slider":void 0,"aria-label":o?"Seek":void 0,"aria-valuenow":Math.round(m*100),children:[B?d.jsx("div",{className:"voice-wave","aria-hidden":!0,children:B.map((M,O)=>d.jsx("span",{className:"voice-wave-bar"+(O/B.length<m?" played":""),style:{height:`${Math.round(M*100)}%`}},O))}):d.jsx("div",{className:"voice-track-fill",style:{width:`${m*100}%`}}),o&&d.jsx("span",{className:"voice-track-knob",style:{left:`${m*100}%`}})]}),d.jsx("span",{className:"voice-dur mono",children:E!==null?`${Math.floor(E/60)}:${String(Math.floor(E%60)).padStart(2,"0")}`:"·:··"}),o&&d.jsx("audio",{ref:l,src:o,onPlay:()=>f(!0),onPause:()=>f(!1),onEnded:()=>{f(!1),h(0)},onTimeUpdate:M=>{const O=M.currentTarget;!y&&O.duration>0&&isFinite(O.duration)&&h(O.currentTime/O.duration)},onLoadedMetadata:M=>{const O=M.currentTarget.duration;isFinite(O)&&O>0&&C(O)}}),n,d.jsx(Jg,{rec:e})]})}function Qj({rec:e,cls:t,footer:n,onPreview:r,onFetch:o}){const{url:a,size:l,loaded:c}=Rh(e);return c&&!a?d.jsxs("div",{className:t+" filecard-bubble file-offdevice-bubble",children:[e.available===!1?d.jsx(Mh,{rec:e,onFetch:o}):d.jsx(Nh,{label:e.filename}),n]}):d.jsxs("div",{className:t+" filecard-bubble",children:[d.jsx(lv,{name:e.filename,size:l||e.size||0,actions:d.jsxs(d.Fragment,{children:[e2(e.filename)&&a&&r&&d.jsx("button",{className:"icon-btn",onClick:()=>r(e),title:"Preview markdown",children:d.jsx(Fe,{name:"monitor",size:16})}),Ia(e.filename,e.mime)&&a&&r&&d.jsx("button",{className:"icon-btn",onClick:()=>r(e),title:"Preview HTML",children:d.jsx(Fe,{name:"monitor",size:16})}),d.jsx("a",{className:"icon-btn"+(a?"":" disabled"),href:a??void 0,download:e.filename,title:"Download",children:d.jsx(Fe,{name:"download",size:16})})]})}),n]})}function l2(e){const{att:t}=e,n=A.useRef(null),[r,o]=A.useState(!1),[a,l]=A.useState(0),[c,x]=A.useState(uf(t.mime)??0),[f,m]=A.useState(""),[h,E]=A.useState(null);return A.useEffect(()=>{const C=a2({mime:t.mime,filename:t.filename}),y=URL.createObjectURL(new Blob([t.bytes],{type:C}));E(y),o(!1),l(0),x(uf(t.mime)??0),m("");const w=n.current;return()=>{w?.pause(),URL.revokeObjectURL(y)}},[t]),e.compact&&t.voice?d.jsxs("div",{className:"attach-preview attach-preview-compact",role:"group","aria-label":"Recording preview",children:[d.jsx("audio",{ref:n,src:h??void 0,preload:"metadata",onPlay:()=>o(!0),onPause:()=>o(!1),onEnded:()=>o(!1),onTimeUpdate:()=>l(n.current?.currentTime??0),onLoadedMetadata:()=>{const C=n.current?.duration;C&&Number.isFinite(C)&&x(C)},onError:()=>m("Preview unavailable. You can still transcribe this recording.")}),d.jsx("button",{type:"button",className:"icon-btn voice-preview-play","aria-label":r?"Pause recording":"Play recording",onClick:()=>{const C=n.current;C&&(r?C.pause():C.play().catch(()=>m("Unable to play this recording.")))},children:d.jsx(Fe,{name:r?"pause":"play",size:18})}),d.jsxs("div",{className:"voice-preview-timeline",children:[d.jsx("input",{type:"range","aria-label":"Recording position","aria-valuetext":`${Dc(a)} of ${Dc(c)}`,min:0,max:c||1,step:.1,value:Math.min(a,c||1),disabled:!c,onChange:C=>{const y=Number(C.target.value);n.current&&(n.current.currentTime=y),l(y)}}),d.jsx("span",{"aria-hidden":"true",children:Dc(r||a?a:c)})]}),d.jsx("button",{type:"button",className:"voice-preview-add","aria-label":e.sending?e.busyLabel??"Sending…":e.actionLabel??"Send",disabled:e.sending,onClick:e.onSend,children:e.sending?"Recognizing…":e.actionLabel??"Send"}),d.jsx("button",{type:"button",className:"icon-btn",title:"Discard",disabled:e.sending&&!e.allowDiscardWhileBusy,onClick:e.onDiscard,children:d.jsx(Fe,{name:"close",size:18})}),f&&d.jsx("p",{className:"voice-preview-error",role:"status",children:f})]}):d.jsxs("div",{className:"attach-preview",children:[t.mime.startsWith("image/")&&h?d.jsx("img",{className:"attach-thumb",src:h,alt:t.filename}):t.voice&&h?d.jsx("audio",{className:"attach-audio","aria-label":"Recording preview",src:h,controls:!0}):d.jsx("div",{className:"filecard-ic",children:d.jsx(Fe,{name:"copy",size:16})}),d.jsxs("div",{className:"filecard-meta",children:[d.jsx("div",{className:"filecard-name",title:t.filename,children:t.voice?"Voice message":t.filename}),d.jsxs("div",{className:"filecard-sub",children:[Zo(t.bytes.length),t.originalSize&&t.originalSize>t.bytes.length?` · optimized from ${Zo(t.originalSize)}`:""]})]}),d.jsx("button",{type:"button",className:"btn primary sm",disabled:e.sending,onClick:e.onSend,children:e.sending?e.busyLabel??"Sending…":e.actionLabel??"Send"}),d.jsx("button",{type:"button",className:"icon-btn",title:"Discard",disabled:e.sending&&!e.allowDiscardWhileBusy,onClick:e.onDiscard,children:d.jsx(Fe,{name:"close"})})]})}const Jj={channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0},Dc=e=>`${Math.floor(e/60)}:${String(Math.floor(e%60)).padStart(2,"0")}`,Zg=84,e8=120,Zj=550,eT=Math.floor(na/(cf/8)),tT=Math.min(300,eT),nT=Uj;function c2(e){const[t,n]=A.useState("idle"),[r,o]=A.useState(0),[a,l]=A.useState([]),[c,x]=A.useState(0),[f,m]=A.useState(0),h=A.useRef("idle"),E=A.useRef(!0),C=A.useRef(!1),y=A.useRef(""),w=A.useRef(null),B=A.useRef(null),F=A.useRef(null),b=A.useRef([]),D=A.useRef("webm"),S=A.useRef("audio/webm"),k=A.useRef(!1),P=A.useRef({x:0,y:0}),R=A.useRef(0),M=A.useRef(!1),O=A.useRef(null),T=A.useRef(null),V=A.useRef(null),z=A.useRef(e.onReady),J=A.useRef(e.onError),H=A.useRef(e.onActiveChange);z.current=e.onReady,J.current=e.onError,H.current=e.onActiveChange;const W=oe=>{h.current=oe,n(oe),H.current?.(oe==="recording"||oe==="locked"||oe==="arming")},re=()=>{T.current!=null&&cancelAnimationFrame(T.current),T.current=null,V.current&&clearInterval(V.current),V.current=null,O.current?.close().catch(()=>{}),O.current=null,F.current?.getTracks().forEach(oe=>oe.stop()),F.current=null},Z=()=>{window.removeEventListener("pointermove",Ee),window.removeEventListener("pointerup",se),window.removeEventListener("pointercancel",se)},K=oe=>{k.current=oe;const Me=B.current;C.current||(Me&&Me.state!=="inactive"?(C.current=!0,Me.stop()):N(),Z())},ie=oe=>{oe.isPrimary&&(y.current=oe.pointerType,w.current=oe.pointerType==="touch"?{id:oe.pointerId,button:oe.currentTarget}:null,oe.preventDefault())},j=oe=>{w.current?.id===oe.pointerId&&(w.current=null)},I=(oe,Me)=>{oe.detail!==0&&y.current==="touch"||K(Me)},G=(oe,Me)=>{if(oe.pointerType!=="touch"||!oe.isPrimary||w.current?.id!==oe.pointerId||w.current.button!==oe.currentTarget)return;w.current=null;const be=oe.currentTarget.getBoundingClientRect();if(oe.clientX<be.left||oe.clientX>be.right||oe.clientY<be.top||oe.clientY>be.bottom)return;const Ye=oe.currentTarget.ownerDocument,Je=oe.pointerId,Qe=oe.clientX,yt=oe.clientY,He=()=>{Ye.removeEventListener("click",dt,!0),window.clearTimeout(ct)},dt=Ke=>{Ke.detail!==0&&("pointerId"in Ke&&Ke.pointerId!==Je||Math.abs(Ke.clientX-Qe)>2||Math.abs(Ke.clientY-yt)>2||(Ke.preventDefault(),Ke.stopImmediatePropagation(),He()))},ct=window.setTimeout(He,750);Ye.addEventListener("click",dt,!0),K(Me)},N=()=>{re(),C.current=!1,E.current&&(W("idle"),o(0),l([]),x(0),m(0))},ae=()=>{h.current==="recording"&&(Z(),m(0),W("locked"))};function Ee(oe){if(h.current!=="recording")return;const Me=P.current.y-oe.clientY,be=P.current.x-oe.clientX,Ye=Math.max(0,Math.min(1,Me/Zg)),Je=Math.max(0,Math.min(1,be/e8));x(Ye),m(Je),Me>=Zg?ae():be>=e8&&K(!0)}function se(){if(h.current==="arming"){M.current=!0,Z();return}if(h.current!=="recording")return;const oe=Date.now()-R.current<Zj;K(oe)}const xe=oe=>{e.disabled||C.current||h.current!=="idle"||(oe.preventDefault(),P.current={x:oe.clientX,y:oe.clientY},M.current=!1,k.current=!1,b.current=[],x(0),m(0),W("arming"),window.addEventListener("pointermove",Ee),window.addEventListener("pointerup",se),window.addEventListener("pointercancel",se),we())};async function we(){let oe;try{oe=await navigator.mediaDevices.getUserMedia({audio:Jj})}catch{if(!E.current)return;J.current("Microphone unavailable — check the browser permission."),Z(),W("idle");return}if(!E.current||M.current||h.current==="idle"){oe.getTracks().forEach(Ye=>Ye.stop()),E.current&&W("idle");return}F.current=oe;const Me=Ij.find(Ye=>typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported(Ye.rec));D.current=Me?.ext??"webm",S.current=Me?.base??"audio/webm";let be;try{be=Me?new MediaRecorder(oe,{mimeType:Me.rec,audioBitsPerSecond:cf}):new MediaRecorder(oe,{audioBitsPerSecond:cf})}catch{re(),Z(),W("idle"),J.current("Unable to start voice recording.");return}B.current=be,be.ondataavailable=Ye=>{Ye.data.size>0&&b.current.push(Ye.data)},be.onstop=()=>{if(C.current=!0,re(),k.current){N();return}const Je=new Blob(b.current,{type:S.current});Promise.all([Je.arrayBuffer(),Vj(Je)]).then(([Qe,yt])=>{const He=k.current||!E.current;if(N(),He||Qe.byteLength===0)return;const dt=new Date().toISOString().replace(/[-:]/g,"").replace(/\..+/,"").replace("T","-");z.current({filename:`${dv}${dt}.${D.current}`,mime:zj(oS(S.current),yt),bytes:new Uint8Array(Qe),voice:!0})}).catch(()=>{N(),E.current&&J.current("Unable to prepare voice recording.")})},be.onerror=()=>{k.current=!0,be.onstop=null,be.ondataavailable=null,be.onerror=null,be.state!=="inactive"&&be.stop(),Z(),N(),E.current&&J.current("Voice recording failed.")};try{be.start()}catch{be.onstop=null,be.ondataavailable=null,be.onerror=null,k.current=!0,Z(),N(),J.current("Unable to start voice recording.");return}R.current=Date.now(),W("recording"),o(0),V.current=setInterval(()=>{o(Ye=>{const Je=Ye+1;return Je>=tT&&K(!1),Je})},1e3),de(oe)}function de(oe){try{const Me=window.AudioContext||window.webkitAudioContext,be=new Me;O.current=be;const Ye=be.createMediaStreamSource(oe),Je=be.createAnalyser();Je.fftSize=256,Ye.connect(Je);const Qe=new Uint8Array(Je.fftSize),yt=qj();let He=0;const dt=ct=>{if(T.current=requestAnimationFrame(dt),ct-He<80)return;He=ct,Je.getByteTimeDomainData(Qe);let Ke=0;for(let st=0;st<Qe.length;st++){const Y=(Qe[st]-128)/128;Ke+=Y*Y}const Vt=Math.sqrt(Ke/Qe.length),tt=yt.push(Vt);l(st=>{const Y=st.length>=nT?st.slice(1):st.slice();return Y.push(tt),Y})};T.current=requestAnimationFrame(dt)}catch{}}A.useEffect(()=>(E.current=!0,()=>{E.current=!1,k.current=!0,h.current="idle";const oe=B.current;oe&&(oe.onstop=null,oe.ondataavailable=null,oe.onerror=null,oe.state!=="inactive"&&oe.stop()),Z(),re()}),[]);const et=t==="recording"||t==="locked"||t==="arming",Ie=d.jsx("div",{className:"vr-wave","aria-hidden":!0,children:a.map((oe,Me)=>d.jsx("span",{className:"vr-bar",style:{height:`${Math.round(oe*100)}%`}},Me))});return d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button","aria-label":"Record voice message",className:"icon-btn composer-tool vr-mic",title:"Hold to record a voice message",disabled:e.disabled,onPointerDown:xe,onContextMenu:oe=>oe.preventDefault(),children:d.jsx(Fe,{name:"mic",size:18})}),et&&d.jsxs("div",{className:"voice-rec-overlay","data-mode":t,children:[t==="recording"&&d.jsxs("div",{className:"vr-lock",style:{"--p":c},"aria-hidden":!0,children:[d.jsx(Fe,{name:"lock",size:13}),d.jsx(Fe,{name:"chevronDown",size:12})]}),d.jsx("span",{className:"voice-rec-dot"}),d.jsx("span",{className:"vr-time mono",children:Dc(r)}),t==="locked"?d.jsxs(d.Fragment,{children:[Ie,d.jsx("button",{type:"button",className:"icon-btn vr-trash",title:"Cancel",onPointerDown:ie,onPointerCancel:j,onLostPointerCapture:j,onPointerUp:oe=>G(oe,!0),onClick:oe=>I(oe,!0),children:d.jsx(Fe,{name:"trash",size:16})}),d.jsxs("button",{type:"button",className:"btn primary sm vr-stop",onPointerDown:ie,onPointerCancel:j,onLostPointerCapture:j,onPointerUp:oe=>G(oe,!1),onClick:oe=>I(oe,!1),children:[d.jsx(Fe,{name:"check",size:13}),"Stop"]})]}):d.jsxs("div",{className:"vr-slide",style:{opacity:1-f},children:[Ie,d.jsx("span",{className:"vr-hint",children:"‹ slide to cancel · slide up to lock"})]})]})]})}function rT(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const iT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oT=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sT={};function t8(e,t){return(sT.jsx?oT:iT).test(e)}const aT=/[ \t\n\f\r]/g;function lT(e){return typeof e=="object"?e.type==="text"?n8(e.value):!1:n8(e)}function n8(e){return e.replace(aT,"")===""}class La{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}La.prototype.normal={};La.prototype.property={};La.prototype.space=void 0;function u2(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new La(n,r,t)}function xf(e){return e.toLowerCase()}class Sn{constructor(t,n){this.attribute=n,this.property=t}}Sn.prototype.attribute="";Sn.prototype.booleanish=!1;Sn.prototype.boolean=!1;Sn.prototype.commaOrSpaceSeparated=!1;Sn.prototype.commaSeparated=!1;Sn.prototype.defined=!1;Sn.prototype.mustUseProperty=!1;Sn.prototype.number=!1;Sn.prototype.overloadedBoolean=!1;Sn.prototype.property="";Sn.prototype.spaceSeparated=!1;Sn.prototype.space=void 0;let cT=0;const Xe=io(),Gt=io(),df=io(),ge=io(),At=io(),eo=io(),Tn=io();function io(){return 2**++cT}const ff=Object.freeze(Object.defineProperty({__proto__:null,boolean:Xe,booleanish:Gt,commaOrSpaceSeparated:Tn,commaSeparated:eo,number:ge,overloadedBoolean:df,spaceSeparated:At},Symbol.toStringTag,{value:"Module"})),$x=Object.keys(ff);class Ih extends Sn{constructor(t,n,r,o){let a=-1;if(super(t,n),r8(this,"space",o),typeof r=="number")for(;++a<$x.length;){const l=$x[a];r8(this,$x[a],(r&ff[l])===ff[l])}}}Ih.prototype.defined=!0;function r8(e,t,n){n&&(e[t]=n)}function ls(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Ih(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[xf(r)]=r,n[xf(a.attribute)]=r}return new La(t,n,e.space)}const x2=ls({properties:{ariaActiveDescendant:null,ariaAtomic:Gt,ariaAutoComplete:null,ariaBusy:Gt,ariaChecked:Gt,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:At,ariaCurrent:null,ariaDescribedBy:At,ariaDetails:null,ariaDisabled:Gt,ariaDropEffect:At,ariaErrorMessage:null,ariaExpanded:Gt,ariaFlowTo:At,ariaGrabbed:Gt,ariaHasPopup:null,ariaHidden:Gt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:At,ariaLevel:ge,ariaLive:null,ariaModal:Gt,ariaMultiLine:Gt,ariaMultiSelectable:Gt,ariaOrientation:null,ariaOwns:At,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:Gt,ariaReadOnly:Gt,ariaRelevant:null,ariaRequired:Gt,ariaRoleDescription:At,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:Gt,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function d2(e,t){return t in e?e[t]:t}function f2(e,t){return d2(e,t.toLowerCase())}const uT=ls({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:eo,acceptCharset:At,accessKey:At,action:null,allow:null,allowFullScreen:Xe,allowPaymentRequest:Xe,allowUserMedia:Xe,alpha:Xe,alt:null,as:null,async:Xe,autoCapitalize:null,autoComplete:At,autoFocus:Xe,autoPlay:Xe,blocking:At,capture:null,charSet:null,checked:Xe,cite:null,className:At,closedBy:null,colorSpace:null,cols:ge,colSpan:ge,command:null,commandFor:null,content:null,contentEditable:Gt,controls:Xe,controlsList:At,coords:ge|eo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Xe,defer:Xe,dir:null,dirName:null,disabled:Xe,download:df,draggable:Gt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Xe,formTarget:null,headers:At,height:ge,hidden:df,high:ge,href:null,hrefLang:null,htmlFor:At,httpEquiv:At,id:null,imageSizes:null,imageSrcSet:null,inert:Xe,inputMode:null,integrity:null,is:null,isMap:Xe,itemId:null,itemProp:At,itemRef:At,itemScope:Xe,itemType:At,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Xe,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Xe,muted:Xe,name:null,nonce:null,noModule:Xe,noValidate:Xe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Xe,optimum:ge,pattern:null,ping:At,placeholder:null,playsInline:Xe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Xe,referrerPolicy:null,rel:At,required:Xe,reversed:Xe,rows:ge,rowSpan:ge,sandbox:At,scope:null,scoped:Xe,seamless:Xe,selected:Xe,shadowRootClonable:Xe,shadowRootCustomElementRegistry:Xe,shadowRootDelegatesFocus:Xe,shadowRootMode:null,shadowRootSerializable:Xe,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:Gt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:Xe,useMap:null,value:Gt,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:At,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Xe,declare:Xe,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Xe,noHref:Xe,noShade:Xe,noWrap:Xe,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:Gt,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Xe,disablePictureInPicture:Xe,disableRemotePlayback:Xe,exportParts:eo,part:At,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:f2}),xT=ls({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Tn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:At,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:Xe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:eo,g2:eo,glyphName:eo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Tn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ge,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:At,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Tn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Tn,rev:Tn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Tn,requiredFeatures:Tn,requiredFonts:Tn,requiredFormats:Tn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Tn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Tn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Tn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:d2}),h2=ls({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),m2=ls({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:f2}),p2=ls({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),dT={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},fT=/[A-Z]/g,i8=/-[a-z]/g,hT=/^data[-\w.:]+$/i;function mT(e,t){const n=xf(t);let r=t,o=Sn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&hT.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(i8,ET);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!i8.test(a)){let l=a.replace(fT,pT);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=Ih}return new o(r,t)}function pT(e){return"-"+e.toLowerCase()}function ET(e){return e.charAt(1).toUpperCase()}const gT=u2([x2,uT,h2,m2,p2],"html"),Lh=u2([x2,xT,h2,m2,p2],"svg");function CT(e){return e.join(" ").trim()}var Ro={},Wx,o8;function yT(){if(o8)return Wx;o8=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,x=`
|
|
411
|
+
`,f="/",m="*",h="",E="comment",C="declaration";function y(B,F){if(typeof B!="string")throw new TypeError("First argument must be a string");if(!B)return[];F=F||{};var b=1,D=1;function S(H){var W=H.match(t);W&&(b+=W.length);var re=H.lastIndexOf(x);D=~re?H.length-re:D+H.length}function k(){var H={line:b,column:D};return function(W){return W.position=new P(H),O(),W}}function P(H){this.start=H,this.end={line:b,column:D},this.source=F.source}P.prototype.content=B;function R(H){var W=new Error(F.source+":"+b+":"+D+": "+H);if(W.reason=H,W.filename=F.source,W.line=b,W.column=D,W.source=B,!F.silent)throw W}function M(H){var W=H.exec(B);if(W){var re=W[0];return S(re),B=B.slice(re.length),W}}function O(){M(n)}function T(H){var W;for(H=H||[];W=V();)W!==!1&&H.push(W);return H}function V(){var H=k();if(!(f!=B.charAt(0)||m!=B.charAt(1))){for(var W=2;h!=B.charAt(W)&&(m!=B.charAt(W)||f!=B.charAt(W+1));)++W;if(W+=2,h===B.charAt(W-1))return R("End of comment missing");var re=B.slice(2,W-2);return D+=2,S(re),B=B.slice(W),D+=2,H({type:E,comment:re})}}function z(){var H=k(),W=M(r);if(W){if(V(),!M(o))return R("property missing ':'");var re=M(a),Z=H({type:C,property:w(W[0].replace(e,h)),value:re?w(re[0].replace(e,h)):h});return M(l),Z}}function J(){var H=[];T(H);for(var W;W=z();)W!==!1&&(H.push(W),T(H));return H}return O(),J()}function w(B){return B?B.replace(c,h):h}return Wx=y,Wx}var s8;function vT(){if(s8)return Ro;s8=1;var e=Ro&&Ro.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.default=n;const t=e(yT());function n(r,o){let a=null;if(!r||typeof r!="string")return a;const l=(0,t.default)(r),c=typeof o=="function";return l.forEach(x=>{if(x.type!=="declaration")return;const{property:f,value:m}=x;c?o(f,m,x):m&&(a=a||{},a[f]=m)}),a}return Ro}var Ys={},a8;function AT(){if(a8)return Ys;a8=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},l=function(f,m){return m.toUpperCase()},c=function(f,m){return"".concat(m,"-")},x=function(f,m){return m===void 0&&(m={}),a(f)?f:(f=f.toLowerCase(),m.reactCompat?f=f.replace(o,c):f=f.replace(r,c),f.replace(t,l))};return Ys.camelCase=x,Ys}var Qs,l8;function BT(){if(l8)return Qs;l8=1;var e=Qs&&Qs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(vT()),n=AT();function r(o,a){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(c,x){c&&x&&(l[(0,n.camelCase)(c,a)]=x)}),l}return r.default=r,Qs=r,Qs}var wT=BT();const DT=au(wT),E2=g2("end"),Oh=g2("start");function g2(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function kT(e){const t=Oh(e),n=E2(e);if(t&&n)return{start:t,end:n}}class xn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?o=t:!a.cause&&t&&(l=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const x=r.indexOf(":");x===-1?a.ruleId=r:(a.source=r.slice(0,x),a.ruleId=r.slice(x+1))}if(!a.place&&a.ancestors&&a.ancestors){const x=a.ancestors[a.ancestors.length-1];x&&(a.place=x.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=c?c.line:void 0,this.name=ua(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}xn.prototype.file="";xn.prototype.name="";xn.prototype.reason="";xn.prototype.message="";xn.prototype.stack="";xn.prototype.column=void 0;xn.prototype.line=void 0;xn.prototype.ancestors=void 0;xn.prototype.cause=void 0;xn.prototype.fatal=void 0;xn.prototype.place=void 0;xn.prototype.ruleId=void 0;xn.prototype.source=void 0;const zh={}.hasOwnProperty,FT=new Map,ST=/[A-Z]/g,bT=new Set(["table","tbody","thead","tfoot","tr"]),PT=new Set(["td","th"]),C2="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _T(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=OT(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=LT(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Lh:gT,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=y2(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function y2(e,t,n){if(t.type==="element")return jT(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return TT(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return NT(e,t,n);if(t.type==="mdxjsEsm")return RT(e,t);if(t.type==="root")return MT(e,t,n);if(t.type==="text")return IT(e,t)}function jT(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Lh,e.schema=o),e.ancestors.push(t);const a=A2(e,t.tagName,!1),l=zT(e,t);let c=Uh(e,t);return bT.has(t.tagName)&&(c=c.filter(function(x){return typeof x=="string"?!lT(x):!0})),v2(e,l,a,t),Vh(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function TT(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Da(e,t.position)}function RT(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Da(e,t.position)}function NT(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Lh,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:A2(e,t.name,!0),l=VT(e,t),c=Uh(e,t);return v2(e,l,a,t),Vh(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function MT(e,t,n){const r={};return Vh(r,Uh(e,t)),e.create(t,e.Fragment,r,n)}function IT(e,t){return t.value}function v2(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Vh(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function LT(e,t,n){return r;function r(o,a,l,c){const f=Array.isArray(l.children)?n:t;return c?f(a,l,c):f(a,l)}}function OT(e,t){return n;function n(r,o,a,l){const c=Array.isArray(a.children),x=Oh(r);return t(o,a,l,c,{columnNumber:x?x.column-1:void 0,fileName:e,lineNumber:x?x.line:void 0},void 0)}}function zT(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&zh.call(t.properties,o)){const a=UT(e,o,t.properties[o]);if(a){const[l,c]=a;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&PT.has(t.tagName)?r=c:n[l]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function VT(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Da(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Da(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Uh(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:FT;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const x=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(x){const f=o.get(x)||0;l=x+"-"+f,o.set(x,f+1)}}const c=y2(e,a,l);c!==void 0&&n.push(c)}return n}function UT(e,t,n){const r=mT(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?rT(n):CT(n)),r.property==="style"){let o=typeof n=="object"?n:$T(e,String(n));return e.stylePropertyNameCase==="css"&&(o=WT(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?dT[r.property]||r.property:r.attribute,n]}}function $T(e,t){try{return DT(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new xn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=C2+"#cannot-parse-style-attribute",o}}function A2(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,l;for(;++a<o.length;){const c=t8(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=l}else r=t8(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return zh.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Da(e)}function Da(e,t){const n=new xn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=C2+"#cannot-handle-mdx-estrees-without-createevaluater",n}function WT(e){const t={};let n;for(n in e)zh.call(e,n)&&(t[HT(n)]=e[n]);return t}function HT(e){let t=e.replace(ST,GT);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function GT(e){return"-"+e.toLowerCase()}const Hx={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};function qT(e){const t=this;t.parser=n;function n(r){return $v(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function KT(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function XT(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
412
|
+
`}]}function YT(e,t){const n=t.value?t.value+`
|
|
413
|
+
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function QT(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JT(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZT(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=as(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,c+=1,e.footnoteCounts.set(r,c);const x={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,x);const f={type:"element",tagName:"sup",properties:{},children:[x]};return e.patch(t,f),e.applyData(t,f)}function eR(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tR(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function B2(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=r:o.push({type:"text",value:r}),o}function nR(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return B2(e,t);const o={src:as(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,a),e.applyData(t,a)}function rR(e,t){const n={src:as(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function iR(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function oR(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return B2(e,t);const o={href:as(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const a={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function sR(e,t){const n={href:as(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function aR(e,t,n){const r=e.all(t),o=n?lR(n):w2(t),a={},l=[];if(typeof t.checked=="boolean"){const m=r[0];let h;m&&m.type==="element"&&m.tagName==="p"?h=m:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const m=r[c];(o||c!==0||m.type!=="element"||m.tagName!=="p")&&l.push({type:"text",value:`
|
|
414
|
+
`}),m.type==="element"&&m.tagName==="p"&&!o?l.push(...m.children):l.push(m)}const x=r[r.length-1];x&&(o||x.type!=="element"||x.tagName!=="p")&&l.push({type:"text",value:`
|
|
415
|
+
`});const f={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,f),e.applyData(t,f)}function lR(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=w2(n[r])}return t}function w2(e){const t=e.spread;return t??e.children.length>1}function cR(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const l=r[o];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function uR(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xR(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function dR(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fR(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Oh(t.children[1]),x=E2(t.children[t.children.length-1]);c&&x&&(l.position={start:c,end:x}),o.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function hR(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let x=-1;const f=[];for(;++x<c;){const h=t.children[x],E={},C=l?l[x]:void 0;C&&(E.align=C);let y={type:"element",tagName:a,properties:E,children:[]};h&&(y.children=e.all(h),e.patch(h,y),y=e.applyData(h,y)),f.push(y)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,m),e.applyData(t,m)}function mR(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const c8=9,u8=32;function pR(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(x8(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(x8(t.slice(o),o>0,!1)),a.join("")}function x8(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===c8||a===u8;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===c8||a===u8;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function ER(e,t){const n={type:"text",value:pR(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function gR(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const CR={blockquote:KT,break:XT,code:YT,delete:QT,emphasis:JT,footnoteReference:ZT,heading:eR,html:tR,imageReference:nR,image:rR,inlineCode:iR,linkReference:oR,link:sR,listItem:aR,list:cR,paragraph:uR,root:xR,strong:dR,table:fR,tableCell:mR,tableRow:hR,text:ER,thematicBreak:gR,toml:oc,yaml:oc,definition:oc,footnoteDefinition:oc};function oc(){}const D2=-1,vu=0,xa=1,qc=2,$h=3,Wh=4,Hh=5,Gh=6,k2=7,F2=8,{defineProperty:yR}=Object,S2=typeof self=="object"?self:globalThis,d8=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new S2[e](t)},vR=(e,t)=>{const n=(o,a)=>(e.set(a,o),o),r=o=>{if(e.has(o))return e.get(o);const[a,l]=t[o];switch(a){case vu:case D2:return n(l,o);case xa:{const c=n([],o);for(const x of l)c.push(r(x));return c}case qc:{const c=n({},o);for(const[x,f]of l){const m=r(x),h=r(f);m==="__proto__"?yR(c,m,{value:h,configurable:!0,enumerable:!0,writable:!0}):c[m]=h}return c}case $h:return n(new Date(l),o);case Wh:{const{source:c,flags:x}=l;return n(new RegExp(c,x),o)}case Hh:{const c=n(new Map,o);for(const[x,f]of l)c.set(r(x),r(f));return c}case Gh:{const c=n(new Set,o);for(const x of l)c.add(r(x));return c}case k2:{const{name:c,message:x}=l;return n(typeof S2[c]=="function"?d8(c,x):new Error(x),o)}case F2:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}case"-0":return-0}return n(d8(a,l),o)};return r},f8=e=>vR(new Map,e)(0),zi="",{toString:AR}={},{keys:BR,is:wR}=Object,Js=e=>{const t=typeof e;if(t!=="object"||!e)return[vu,t];const n=AR.call(e).slice(8,-1);switch(n){case"Array":return[xa,zi];case"Object":return[qc,zi];case"Date":return[$h,zi];case"RegExp":return[Wh,zi];case"Map":return[Hh,zi];case"Set":return[Gh,zi];case"DataView":return[xa,n]}return n.includes("Array")?[xa,n]:e instanceof Error?[k2,e.name||"Error"]:[qc,n]},sc=([e,t])=>e===vu&&(t==="function"||t==="symbol"),DR=(e,t,n,r)=>{const o=(l,c)=>{const x=r.push(l)-1;return n.set(c,x),x},a=l=>{if(n.has(l))return n.get(l);let[c,x]=Js(l);switch(c){case vu:{let m=l;switch(x){case"bigint":c=F2,m=l.toString();break;case"number":if(!l&&wR(l,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+x);m=null;break;case"undefined":return o([D2],l)}return o([c,m],l)}case xa:{if(x){let E=l;return x==="DataView"?E=new Uint8Array(l.buffer):x==="ArrayBuffer"&&(E=new Uint8Array(l)),o([x,[...E]],l)}const m=[],h=o([c,m],l);for(const E of l)m.push(a(E));return h}case qc:{if(x)switch(x){case"BigInt":return o([x,l.toString()],l);case"Boolean":case"Number":case"String":return o([x,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const m=[],h=o([c,m],l);for(const E of BR(l))(e||!sc(Js(l[E])))&&m.push([a(E),a(l[E])]);return h}case $h:return o([c,isNaN(l.getTime())?zi:l.toISOString()],l);case Wh:{const{source:m,flags:h}=l;return o([c,{source:m,flags:h}],l)}case Hh:{const m=[],h=o([c,m],l);for(const[E,C]of l)(e||!(sc(Js(E))||sc(Js(C))))&&m.push([a(E),a(C)]);return h}case Gh:{const m=[],h=o([c,m],l);for(const E of l)(e||!sc(Js(E)))&&m.push(a(E));return h}}const{message:f}=l;return o([c,{name:x,message:f}],l)};return a},h8=(e,{json:t,lossy:n}={})=>{const r=[];return DR(!(t||n),!!t,new Map,r)(e),r},Kc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?f8(h8(e,t)):structuredClone(e):(e,t)=>f8(h8(e,t));function kR(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function FR(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function SR(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||kR,r=e.options.footnoteBackLabel||FR,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let x=-1;for(;++x<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[x]);if(!f)continue;const m=e.all(f),h=String(f.identifier).toUpperCase(),E=as(h.toLowerCase());let C=0;const y=[],w=e.footnoteCounts.get(h);for(;w!==void 0&&++C<=w;){y.length>0&&y.push({type:"text",value:" "});let b=typeof n=="string"?n:n(x,C);typeof b=="string"&&(b={type:"text",value:b}),y.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+E+(C>1?"-"+C:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(x,C),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const B=m[m.length-1];if(B&&B.type==="element"&&B.tagName==="p"){const b=B.children[B.children.length-1];b&&b.type==="text"?b.value+=" ":B.children.push({type:"text",value:" "}),B.children.push(...y)}else m.push(...y);const F={type:"element",tagName:"li",properties:{id:t+"fn-"+E},children:e.wrap(m,!0)};e.patch(f,F),c.push(F)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Kc(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
416
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
417
|
+
`}]}}const hf={}.hasOwnProperty,bR={};function PR(e,t){const n=t||bR,r=new Map,o=new Map,a=new Map,l={...CR,...n.handlers},c={all:f,applyData:jR,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:l,one:x,options:n,patch:_R,wrap:RR};return kh(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const h=m.type==="definition"?r:o,E=String(m.identifier).toUpperCase();h.has(E)||h.set(E,m)}}),c;function x(m,h){const E=m.type,C=c.handlers[E];if(hf.call(c.handlers,E)&&C)return C(c,m,h);if(c.options.passThrough&&c.options.passThrough.includes(E)){if("children"in m){const{children:w,...B}=m,F=Kc(B);return F.children=c.all(m),F}return Kc(m)}return(c.options.unknownHandler||TR)(c,m,h)}function f(m){const h=[];if("children"in m){const E=m.children;let C=-1;for(;++C<E.length;){const y=c.one(E[C],m);if(y){if(C&&E[C-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=m8(y.value)),!Array.isArray(y)&&y.type==="element")){const w=y.children[0];w&&w.type==="text"&&(w.value=m8(w.value))}Array.isArray(y)?h.push(...y):h.push(y)}}}return h}}function _R(e,t){e.position&&(t.position=kT(e))}function jR(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&a&&Object.assign(n.properties,Kc(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function TR(e,t){const n=t.data||{},r="value"in t&&!(hf.call(n,"hProperties")||hf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function RR(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
418
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
419
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
420
|
+
`}),n}function m8(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function p8(e,t){const n=PR(e,t),r=n.one(e,void 0),o=SR(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
|
|
421
|
+
`},o),a}function NR(e,t){return e&&"run"in e?async function(n,r){const o=p8(n,{file:r,...t});await e.run(o,r)}:function(n,r){return p8(n,{file:r,...e||t})}}function E8(e){if(e)throw e}var Gx,g8;function MR(){if(g8)return Gx;g8=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var m=e.call(f,"constructor"),h=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!m&&!h)return!1;var E;for(E in f);return typeof E>"u"||e.call(f,E)},l=function(f,m){n&&m.name==="__proto__"?n(f,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):f[m.name]=m.newValue},c=function(f,m){if(m==="__proto__")if(e.call(f,m)){if(r)return r(f,m).value}else return;return f[m]};return Gx=function x(){var f,m,h,E,C,y,w=arguments[0],B=1,F=arguments.length,b=!1;for(typeof w=="boolean"&&(b=w,w=arguments[1]||{},B=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});B<F;++B)if(f=arguments[B],f!=null)for(m in f)h=c(w,m),E=c(f,m),w!==E&&(b&&E&&(a(E)||(C=o(E)))?(C?(C=!1,y=h&&o(h)?h:[]):y=h&&a(h)?h:{},l(w,{name:m,newValue:x(b,y,E)})):typeof E<"u"&&l(w,{name:m,newValue:E}));return w},Gx}var IR=MR();const qx=au(IR);function mf(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function LR(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...o);function c(x,...f){const m=e[++a];let h=-1;if(x){l(x);return}for(;++h<o.length;)(f[h]===null||f[h]===void 0)&&(f[h]=o[h]);o=f,m?OR(m,c)(...f):l(null,...f)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function OR(e,t){let n;return r;function r(...l){const c=e.length>l.length;let x;c&&l.push(o);try{x=e.apply(this,l)}catch(f){const m=f;if(c&&n)throw m;return o(m)}c||(x&&x.then&&typeof x.then=="function"?x.then(a,o):x instanceof Error?o(x):a(x))}function o(l,...c){n||(n=!0,t(l,...c))}function a(l){o(null,l)}}const vr={basename:zR,dirname:VR,extname:UR,join:$R,sep:"/"};function zR(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Oa(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else l<0&&(a=!0,l=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function VR(e){if(Oa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function UR(e){Oa(e);let t=e.length,n=-1,r=0,o=-1,a=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function $R(...e){let t=-1,n;for(;++t<e.length;)Oa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":WR(n)}function WR(e){Oa(e);const t=e.codePointAt(0)===47;let n=HR(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function HR(e,t){let n="",r=0,o=-1,a=0,l=-1,c,x;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(o===l-1||a===1))if(o!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(x=n.lastIndexOf("/"),x!==n.length-1){x<0?(n="",r=0):(n=n.slice(0,x),r=n.length-1-n.lastIndexOf("/")),o=l,a=0;continue}}else if(n.length>0){n="",r=0,o=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),r=l-o-1;o=l,a=0}else c===46&&a>-1?a++:a=-1}return n}function Oa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const GR={cwd:qR};function qR(){return"/"}function pf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function KR(e){if(typeof e=="string")e=new URL(e);else if(!pf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return XR(e)}function XR(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Kx=["history","path","basename","stem","extname","dirname"];class b2{constructor(t){let n;t?pf(t)?n={path:t}:typeof t=="string"||YR(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":GR.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Kx.length;){const a=Kx[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)Kx.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?vr.basename(this.path):void 0}set basename(t){Yx(t,"basename"),Xx(t,"basename"),this.path=vr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?vr.dirname(this.path):void 0}set dirname(t){C8(this.basename,"dirname"),this.path=vr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?vr.extname(this.path):void 0}set extname(t){if(Xx(t,"extname"),C8(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=vr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){pf(t)&&(t=KR(t)),Yx(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?vr.basename(this.path,this.extname):void 0}set stem(t){Yx(t,"stem"),Xx(t,"stem"),this.path=vr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new xn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Xx(e,t){if(e&&e.includes(vr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vr.sep+"`")}function Yx(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function C8(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function YR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const QR=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),JR={}.hasOwnProperty;class qh extends QR{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=LR()}copy(){const t=new qh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(qx(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Zx("data",this.frozen),this.namespace[t]=n,this):JR.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Zx("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ac(t),r=this.parser||this.Parser;return Qx("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Qx("process",this.parser||this.Parser),Jx("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,l){const c=ac(t),x=r.parse(c);r.run(x,c,function(m,h,E){if(m||!h||!E)return f(m);const C=h,y=r.stringify(C,E);tN(y)?E.value=y:E.result=y,f(m,E)});function f(m,h){m||!h?l(m):a?a(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),Qx("processSync",this.parser||this.Parser),Jx("processSync",this.compiler||this.Compiler),this.process(t,o),v8("processSync","process",n),r;function o(a,l){n=!0,E8(a),r=l}}run(t,n,r){y8(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,c){const x=ac(n);o.run(t,x,f);function f(m,h,E){const C=h||t;m?c(m):l?l(C):r(void 0,C,E)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),v8("runSync","run",r),o;function a(l,c){E8(l),o=c,r=!0}}stringify(t,n){this.freeze();const r=ac(n),o=this.compiler||this.Compiler;return Jx("stringify",o),y8(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Zx("use",this.frozen),t!=null)if(typeof t=="function")x(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")x(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[m,...h]=f;x(m,h)}else l(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function l(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(o.settings=qx(!0,o.settings,f.settings))}function c(f){let m=-1;if(f!=null)if(Array.isArray(f))for(;++m<f.length;){const h=f[m];a(h)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function x(f,m){let h=-1,E=-1;for(;++h<r.length;)if(r[h][0]===f){E=h;break}if(E===-1)r.push([f,...m]);else if(m.length>0){let[C,...y]=m;const w=r[E][1];mf(w)&&mf(C)&&(C=qx(!0,w,C)),r[E]=[f,C,...y]}}}}const ZR=new qh().freeze();function Qx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Jx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Zx(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function y8(e){if(!mf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function v8(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ac(e){return eN(e)?e:new b2(e)}function eN(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function tN(e){return typeof e=="string"||nN(e)}function nN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rN="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",A8=[],B8={allowDangerousHtml:!0},iN=/^(https?|ircs?|mailto|xmpp)$/i,oN=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function P2(e){const t=sN(e),n=aN(e);return lN(t.runSync(t.parse(n),n),e)}function sN(e){const t=e.rehypePlugins||A8,n=e.remarkPlugins||A8,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...B8}:B8;return ZR().use(qT).use(n).use(NR,r).use(t)}function aN(e){const t=e.children||"",n=new b2;return typeof t=="string"&&(n.value=t),n}function lN(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,x=t.urlTransform||cN;for(const m of oN)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+rN+m.id,void 0);return kh(e,f),_T(e,{Fragment:d.Fragment,components:o,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function f(m,h,E){if(m.type==="raw"&&E&&typeof h=="number")return l?E.children.splice(h,1):E.children[h]={type:"text",value:m.value},h;if(m.type==="element"){let C;for(C in Hx)if(Object.hasOwn(Hx,C)&&Object.hasOwn(m.properties,C)){const y=m.properties[C],w=Hx[C];(w===null||w.includes(m.tagName))&&(m.properties[C]=x(String(y||""),C,m))}}if(m.type==="element"){let C=n?!n.includes(m.tagName):a?a.includes(m.tagName):!1;if(!C&&r&&typeof h=="number"&&(C=!r(m,h,E)),C&&E&&typeof h=="number")return c&&m.children?E.children.splice(h,1,...m.children):E.children.splice(h,1),h}}}function cN(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||iN.test(e.slice(0,t))?e:""}const uN={};function _2(e){const t=this,n=e||uN,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(Zv(n)),a.push(Pv()),l.push(rP(n))}let xN=0;const dN=.25,fN=8;let w8=Promise.resolve();function D8(){return typeof document<"u"&&document.documentElement.classList.contains("theme-dark")?"dark":"default"}function hN(){const[e,t]=A.useState(D8);return A.useEffect(()=>{const n=document.documentElement,r=()=>t(D8()),o=new MutationObserver(r);return o.observe(n,{attributes:!0,attributeFilter:["class"]}),r(),()=>o.disconnect()},[]),e}function mN(e,t,n,r){const o=w8.then(async()=>{if(!r())return"";const{default:a}=await su(async()=>{const{default:c}=await import("./mermaid.core-CNKolAgz.js").then(x=>x.cb);return{default:c}},[],import.meta.url);if(!r())return"";if(a.initialize({startOnLoad:!1,securityLevel:"strict",theme:n,fontFamily:"Arial, sans-serif",htmlLabels:!1,flowchart:{htmlLabels:!1},suppressErrorRendering:!0}),t.length>5e4)throw new Error("Diagram exceeds the rendering limit.");if(/^\s*---(?:\r?\n|$)|%%\s*\{/.test(t))throw new Error("Diagram configuration overrides are not supported.");if(await document.fonts.ready,!r())return"";const l=document.createElement("div");l.style.fontFamily="Arial, sans-serif",l.style.fontSize="16px",l.style.lineHeight="normal",l.style.position="absolute",l.style.visibility="hidden",document.body.append(l);try{const c=await a.render(e,t,l),f=new DOMParser().parseFromString(c.svg,"image/svg+xml").documentElement,m=f.getAttribute("viewBox")?.trim().split(/[\s,]+/).map(Number);if(f.localName!=="svg"||!m||m.length!==4||!m.every(Number.isFinite)||m[2]<=0||m[3]<=0)throw new Error("Diagram has no usable dimensions.");return f.setAttribute("width",String(m[2])),f.setAttribute("height",String(m[3])),URL.createObjectURL(new Blob([new XMLSerializer().serializeToString(f)],{type:"image/svg+xml"}))}finally{l.remove()}});return w8=o.then(()=>{},()=>{}),o}function pN(e){return Math.min(fN,Math.max(dN,e))}function EN(e){const t=A.useRef(null),n=A.useRef(null),[r,o]=A.useState(1),[a,l]=A.useState({x:0,y:0}),[c,x]=A.useState(!1),f=()=>{o(1),l({x:0,y:0})},m=(h,E,C)=>{const y=pN(h);if(y===r)return;const w=t.current?.getBoundingClientRect();if(w){const B=(E??w.left+w.width/2)-w.left-w.width/2,F=(C??w.top+w.height/2)-w.top-w.height/2,b=y/r;l(D=>({x:B-b*(B-D.x),y:F-b*(F-D.y)}))}o(y)};return A.useEffect(()=>{const h=E=>{E.key==="+"||E.key==="="?(E.preventDefault(),m(r*1.25)):E.key==="-"?(E.preventDefault(),m(r/1.25)):E.key==="0"&&(E.preventDefault(),f())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)}),d.jsx(Z1,{open:!0,onOpenChange:h=>{h||e.onClose()},children:d.jsxs(nC,{children:[d.jsx(rC,{className:"mermaid-fullscreen-backdrop"}),d.jsxs(iC,{className:"mermaid-fullscreen","data-mermaid-theme":e.theme,"aria-describedby":"mermaid-fullscreen-help",children:[d.jsx(sC,{className:"mermaid-fullscreen-title",children:"Diagram viewer"}),d.jsxs("div",{className:"mermaid-fullscreen-tools",children:[d.jsx("button",{className:"icon-btn","aria-label":"Zoom out",title:"Zoom out (−)",onClick:()=>m(r/1.25),children:d.jsx(Fe,{name:"minus"})}),d.jsxs("button",{className:"mermaid-zoom-value",onClick:f,title:"Reset zoom and position",children:[Math.round(r*100),"%"]}),d.jsx("button",{className:"icon-btn","aria-label":"Zoom in",title:"Zoom in (+)",onClick:()=>m(r*1.25),children:d.jsx(Fe,{name:"plus"})}),d.jsx(lC,{asChild:!0,children:d.jsx("button",{className:"icon-btn","aria-label":"Close diagram viewer",title:"Close (Esc)",children:d.jsx(Fe,{name:"close"})})})]}),d.jsx("div",{ref:t,tabIndex:0,role:"region","aria-label":"Diagram navigation; use arrow keys to pan",onKeyDown:h=>{const E={ArrowLeft:[40,0],ArrowRight:[-40,0],ArrowUp:[0,40],ArrowDown:[0,-40]}[h.key];E&&(h.preventDefault(),l(C=>({x:C.x+E[0],y:C.y+E[1]})))},className:"mermaid-fullscreen-viewport"+(c?" dragging":""),onWheel:h=>{h.preventDefault(),m(r*Math.exp(-h.deltaY*.0015),h.clientX,h.clientY)},onDoubleClick:h=>m(r*1.5,h.clientX,h.clientY),onPointerDown:h=>{h.button===0&&(n.current={pointerId:h.pointerId,startX:h.clientX,startY:h.clientY,panX:a.x,panY:a.y},h.currentTarget.setPointerCapture(h.pointerId),x(!0))},onPointerMove:h=>{const E=n.current;!E||E.pointerId!==h.pointerId||l({x:E.panX+h.clientX-E.startX,y:E.panY+h.clientY-E.startY})},onPointerUp:h=>{n.current?.pointerId===h.pointerId&&(n.current=null,x(!1),h.currentTarget.releasePointerCapture(h.pointerId))},onPointerCancel:()=>{n.current=null,x(!1)},children:d.jsx("div",{className:"mermaid-fullscreen-canvas",style:{transform:`translate(${a.x}px, ${a.y}px) scale(${r})`},children:d.jsx("img",{src:e.svg,alt:"Mermaid diagram"})})}),d.jsx(aC,{id:"mermaid-fullscreen-help",className:"mermaid-fullscreen-help",children:"Scroll or +/− to zoom · drag or arrow keys to move · 0 to reset"})]})]})})}function j2({source:e}){const t=A.useId(),[n,r]=A.useState(""),[o,a]=A.useState(""),[l,c]=A.useState("default"),[x,f]=A.useState(!1),m=hN();return A.useEffect(()=>{let h=!0,E="";const C=`mermaid-${++xN}-${t.replace(/[^a-zA-Z0-9_-]/g,"")}`;return r(""),a(""),f(!1),mN(C,e,m,()=>h).then(y=>{h?(c(m),E=y,r(y)):URL.revokeObjectURL(y)}).catch(y=>{h&&a(y instanceof Error?y.message:String(y))}),()=>{h=!1,E&&URL.revokeObjectURL(E)}},[t,e,m]),d.jsxs("div",{className:"mermaid-block",children:[o?d.jsxs("p",{className:"markdown-mermaid-error",role:"status",children:["Unable to render diagram: ",o]}):n?d.jsxs("div",{className:"markdown-mermaid","data-mermaid-theme":l,children:[d.jsx("button",{className:"icon-btn markdown-mermaid-expand","aria-label":"View diagram fullscreen",title:"View diagram fullscreen",onClick:()=>f(!0),children:d.jsx(Fe,{name:"maximize"})}),d.jsx("div",{className:"markdown-mermaid-diagram",tabIndex:0,role:"region","aria-label":"Scrollable Mermaid diagram",children:d.jsx("img",{src:n,alt:"Mermaid diagram; original source follows",onError:()=>a("Diagram image could not be displayed.")})})]}):d.jsx("div",{className:"markdown-mermaid-loading",role:"status",children:"Rendering diagram…"}),d.jsxs("details",{className:"mermaid-source",open:o?!0:void 0,children:[d.jsx("summary",{children:"Mermaid source"}),d.jsx("pre",{children:d.jsx("code",{children:e})})]}),x&&n&&!o&&d.jsx(EN,{svg:n,theme:l,onClose:()=>f(!1)})]})}const gN=A.memo(function(t){return d.jsx("article",{className:"markdown-body",ref:t.contentRef,children:d.jsx(P2,{remarkPlugins:[_2],components:{a:({children:n,...r})=>d.jsx("a",{...r,target:"_blank",rel:"noreferrer",children:n}),pre:({children:n})=>{const r=A.isValidElement(n)?n:null;return r?.props.className==="language-mermaid"?d.jsx(j2,{source:String(r.props.children).replace(/\n$/,"")}):d.jsx("pre",{children:n})}},children:t.markdown})})});function T2(e){const{rec:t}=e,n=A.useRef(null),[r,o]=A.useState(""),[a,l]=A.useState(!1),[c,x]=A.useState(null),[f,m]=A.useState("loading"),[h,E]=A.useState(""),[C,y]=A.useState(0),[w,B]=A.useState(""),[F,b]=A.useState(0),[D,S]=A.useState(!1),[k,P]=A.useState(""),[R,M]=A.useState(!1),[O,T]=A.useState(!1),[V,z]=A.useState([]),[J,H]=A.useState(!1),[W,re]=A.useState(null),[Z,K]=A.useState(!1),[ie,j]=A.useState("");A.useEffect(()=>{let Ee=!0,se=null;return m("loading"),pu(t.id).then(xe=>{if(Ee){if(!xe){m("missing");return}o(new TextDecoder("utf-8").decode(xe)),se=URL.createObjectURL(new Blob([xe],{type:"text/markdown;charset=utf-8"})),x(se),m("ready")}}).catch(()=>{Ee&&m("error")}),()=>{Ee=!1,se&&URL.revokeObjectURL(se)}},[t.id]),A.useEffect(()=>{const Ee=()=>{const se=window.getSelection(),xe=n.current;if(!se||se.isCollapsed||!xe){E(""),y(0);return}if(!xe.contains(se.anchorNode)||!xe.contains(se.focusNode)){E(""),y(0);return}const we=se.getRangeAt(0),de=se.toString(),et=de.length-de.trimStart().length,Ie=de.trim().slice(0,4e3),oe=document.createRange();oe.selectNodeContents(xe),oe.setEnd(we.startContainer,we.startOffset);const Me=oe.toString().length+et;E(Ie),y(kj(xe.textContent,Ie,Me))};return document.addEventListener("selectionchange",Ee),()=>document.removeEventListener("selectionchange",Ee)},[]);const I=()=>{h&&(B(h),b(C),S(!0),j(""))},G=async()=>{if(O){if(!w||!k.trim())return;z(se=>[...se,{selection:w,comment:k.trim(),occurrence:F}]),P(""),S(!1),j("Comment added to review");return}const Ee=wj(w,k);if(!(!Ee||!k.trim()||R)){M(!0),j("");try{await e.onSendText(Ee,t.id||void 0),P(""),S(!1),j("Feedback sent")}catch(se){j(`Send failed: ${String(se)}`)}finally{M(!1)}}},N=async()=>{if(V.length===0||J)return;const Ee=jj(r,V);H(!0),j("");try{e.onSendFile?await e.onSendFile({filename:Dj(t.filename),mime:"text/markdown",bytes:new TextEncoder().encode(Ee)},t.id||void 0):await e.onSendText(Ee,t.id||void 0),z([]),T(!1),j("Review submitted")}catch(se){j(`Review send failed: ${String(se)}`)}finally{H(!1)}},ae=async()=>{if(!(!W||!e.onSendFile||Z)){K(!0),j("");try{await e.onSendFile(W,t.id||void 0),re(null),j("Voice feedback sent")}catch(Ee){j(`Voice send failed: ${String(Ee)}`)}finally{K(!1)}}};return d.jsx(rs,{title:t.filename,description:"Markdown preview · select text to send precise feedback",onClose:e.onClose,wide:!0,className:"markdown-modal"+(a?" markdown-reader-fullscreen":""),children:d.jsxs("div",{className:"markdown-preview",children:[d.jsxs("div",{className:"markdown-review-toolbar",children:[d.jsxs("button",{className:"btn sm",type:"button","aria-label":a?"Exit reader fullscreen":"View reader fullscreen","aria-pressed":a,onMouseDown:Ee=>Ee.preventDefault(),onClick:()=>l(Ee=>!Ee),children:[d.jsx(Fe,{name:"maximize",size:14}),a?"Exit fullscreen":"Fullscreen"]}),d.jsxs("button",{className:"btn sm",disabled:!h,onMouseDown:Ee=>Ee.preventDefault(),onClick:I,children:[d.jsx(Fe,{name:"reply",size:14}),O?"Add review comment":"Quick message",h?` (${h.length})`:""]}),O?d.jsx("button",{className:"btn sm",onClick:()=>{T(!1),z([]),S(!1),j("Review discarded")},children:"Cancel review"}):d.jsxs("button",{className:"btn sm",onClick:()=>{T(!0),z([]),j("Review started — select passages to add comments")},children:[d.jsx(Fe,{name:"edit",size:14}),"Start review"]}),c&&d.jsxs("a",{className:"btn sm",href:c,download:t.filename,children:[d.jsx(Fe,{name:"download",size:14}),"Download"]}),e.onSendFile&&d.jsx(c2,{disabled:!!W||Z,onReady:re,onError:j}),d.jsx("span",{className:"markdown-review-hint",children:h?"Selection ready for feedback":"Highlight any passage to comment on it"})]}),D&&d.jsxs("div",{className:"markdown-feedback",children:[d.jsx("blockquote",{children:w}),d.jsx("textarea",{className:"field",rows:3,autoFocus:!0,placeholder:"What should change?",value:k,onChange:Ee=>P(Ee.target.value)}),d.jsxs("div",{className:"markdown-feedback-actions",children:[d.jsx("button",{className:"btn sm",onClick:()=>S(!1),children:"Cancel"}),d.jsxs("button",{className:"btn sm primary",disabled:!k.trim()||R,onClick:()=>void G(),children:[d.jsx(Fe,{name:"send",size:14}),O?"Add to review":R?"Sending…":"Send feedback"]})]})]}),O&&d.jsxs("div",{className:"markdown-review-draft",children:[d.jsxs("div",{className:"markdown-review-draft-head",children:[d.jsxs("strong",{children:["Review · ",V.length," comment",V.length===1?"":"s"]}),d.jsxs("button",{className:"btn sm primary",disabled:V.length===0||J,onClick:()=>void N(),children:[d.jsx(Fe,{name:"send",size:14}),J?"Submitting…":"Submit review"]})]}),V.map((Ee,se)=>d.jsxs("div",{className:"markdown-review-comment",children:[d.jsx("span",{children:se+1}),d.jsxs("div",{children:[d.jsx("blockquote",{children:Ee.selection}),d.jsx("p",{children:Ee.comment})]}),d.jsx("button",{className:"icon-btn",title:"Remove comment",onClick:()=>z(xe=>xe.filter((we,de)=>de!==se)),children:d.jsx(Fe,{name:"close",size:14})})]},`${se}-${Ee.selection.slice(0,24)}`))]}),W&&d.jsx(l2,{att:W,sending:Z,onSend:()=>void ae(),onDiscard:()=>re(null)}),ie&&d.jsx("div",{className:"markdown-review-status",role:"status",children:ie}),d.jsxs("div",{className:"markdown-preview-scroll",children:[f==="loading"&&d.jsx("div",{className:"markdown-empty",children:"Loading preview…"}),f==="missing"&&d.jsx("div",{className:"markdown-empty",children:"This file is available on the original device only."}),f==="error"&&d.jsx("div",{className:"markdown-empty",children:"The file could not be opened."}),f==="ready"&&d.jsx(gN,{markdown:r,contentRef:n})]})]})})}function R2(e){const{rec:t}=e,[n,r]=A.useState(null),[o,a]=A.useState(0),[l,c]=A.useState(!1),[x,f]=A.useState("loading");return A.useEffect(()=>{let m=!0,h=null;return f("loading"),pu(t.id).then(E=>{if(m){if(!E){f("missing");return}a(E.byteLength),h=URL.createObjectURL(new Blob([E],{type:Th(t.mime,t.filename)})),r(h),f("ready")}}).catch(()=>{m&&f("error")}),()=>{m=!1,h&&URL.revokeObjectURL(h)}},[t.id,t.mime,t.filename]),d.jsx(rs,{title:t.filename,description:"Transformed safe preview · external navigation disabled",onClose:e.onClose,wide:!0,className:"markdown-modal html-modal"+(l?" html-modal-fullscreen":""),children:d.jsxs("div",{className:"html-preview",children:[d.jsxs("div",{className:"html-preview-toolbar",children:[d.jsxs("span",{className:"html-preview-shield",children:[d.jsx(Fe,{name:"shield",size:14}),"Scripts, forms and network requests are blocked"]}),d.jsxs("span",{className:"html-preview-actions",children:[x==="ready"&&d.jsxs("button",{className:"btn sm",type:"button",title:"View HTML fullscreen","aria-label":"View HTML fullscreen",onClick:()=>c(!0),children:[d.jsx(Fe,{name:"maximize",size:14}),"Fullscreen"]}),n&&d.jsxs("a",{className:"btn sm",href:n,download:t.filename,children:[d.jsx(Fe,{name:"download",size:14}),"Download original",o?` · ${Zo(o)}`:""]})]})]}),d.jsxs("div",{className:"html-preview-frame",children:[x==="loading"&&d.jsx("div",{className:"markdown-empty",children:"Loading preview…"}),x==="missing"&&d.jsx("div",{className:"markdown-empty",children:"This file is available on the original device only."}),x==="error"&&d.jsx("div",{className:"markdown-empty",children:"The file could not be opened."}),x==="ready"&&d.jsx("iframe",{className:"html-preview-iframe",title:`Sandboxed preview of ${t.filename}`,sandbox:Tj,referrerPolicy:"no-referrer",src:location.pathname.startsWith("/fleet")?`/messenger/api/html-preview/${encodeURIComponent(t.id)}`:Kn(`/api/html-preview/${encodeURIComponent(t.id)}`)},t.id)]})]})})}function N2(e){const t=(n,r)=>{const{key:o}=n;if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(o))return;n.preventDefault();const a=e.options.length-1,l=o==="Home"?0:o==="End"?a:o==="ArrowLeft"||o==="ArrowUp"?(r-1+e.options.length)%e.options.length:(r+1)%e.options.length,c=e.options[l];c&&(e.onChange(c.id),document.getElementById(`${e.idPrefix}-${c.id}`)?.focus())};return d.jsx("div",{className:e.className,role:"tablist","aria-label":e.label,children:e.options.map((n,r)=>d.jsxs("button",{id:`${e.idPrefix}-${n.id}`,type:"button",role:"tab","aria-selected":e.value===n.id,"aria-controls":e.panelId,tabIndex:e.value===n.id?0:-1,className:"tab"+(e.value===n.id?" active":""),onClick:()=>e.onChange(n.id),onKeyDown:o=>t(o,r),children:[n.label,n.count===void 0?null:d.jsxs(d.Fragment,{children:[" ",d.jsx("span",{children:n.count})]})]},n.id))})}function Ef(e){const{message:t}=e,[n,r]=A.useState(null),[o,a]=A.useState(0),l=fv(t.wireId)??{id:t.wireId,dir:t.dir,filename:t.filename??"file",mime:t.mime??"application/octet-stream",size:o,date:t.date};A.useEffect(()=>{let f=!0,m=null;if(t.wireId)return pu(t.wireId).then(h=>{!f||!h||(a(h.byteLength),m=URL.createObjectURL(new Blob([h],{type:Th(l.mime,l.filename)})),r(m))}).catch(()=>{}),()=>{f=!1,m&&URL.revokeObjectURL(m)}},[t.wireId,l.mime,l.filename]);const c=lf(t)==="photo",x=Jo(l.mime,l.filename);return d.jsxs("div",{className:"shared-media-item"+(c?" shared-photo-item":""),children:[d.jsxs("button",{className:"shared-media-jump",onClick:()=>e.onJump(e.messageKey),children:[c&&n?d.jsx("img",{src:n,alt:l.filename}):d.jsx("span",{className:"shared-media-icon",children:d.jsx(Fe,{name:x?"mic":"copy",size:18})}),d.jsxs("span",{className:"shared-media-copy",children:[d.jsx("strong",{children:c?l.filename||"Photo":x?"Voice message":l.filename}),d.jsxs("span",{children:[e.versionLabel?`${e.versionLabel} · `:"",Zi(l.date),o?` · ${Zo(o)}`:""]})]})]}),d.jsxs("span",{className:"shared-media-actions",children:[e2(l.filename)&&n&&d.jsx("button",{className:"icon-btn",title:"Preview markdown",onClick:()=>e.onPreview(l),children:d.jsx(Fe,{name:"monitor",size:16})}),Ia(l.filename,l.mime)&&n&&d.jsx("button",{className:"icon-btn",title:"Preview HTML",onClick:()=>e.onPreview(l),children:d.jsx(Fe,{name:"monitor",size:16})}),d.jsx("a",{className:"icon-btn"+(n?"":" disabled"),href:n??void 0,download:l.filename,title:"Download",children:d.jsx(Fe,{name:"download",size:16})})]})]})}function CN(e){const[t,n]=A.useState(!1);if(e.versions.length===1){const r=e.versions[0];return d.jsx(Ef,{message:r.message,messageKey:r.key,onJump:e.onJump,onPreview:e.onPreview})}return d.jsxs("div",{className:"file-version-stack"+(t?" expanded":""),children:[d.jsxs("button",{className:"file-version-stack-head",onClick:()=>n(r=>!r),children:[d.jsx("span",{className:"shared-media-icon",children:d.jsx(Fe,{name:"copy",size:18})}),d.jsxs("span",{className:"shared-media-copy",children:[d.jsx("strong",{children:e.filename}),d.jsxs("span",{children:[e.versions.length," versions · newest ",Zi(e.versions[0].message.date)]})]}),d.jsx(Fe,{name:t?"chevronDown":"chevron",size:16})]}),t&&d.jsx("div",{className:"file-version-stack-list",children:e.versions.map((r,o)=>d.jsx(Ef,{message:r.message,messageKey:r.key,versionLabel:`Version ${e.versions.length-o}`,onJump:e.onJump,onPreview:e.onPreview},r.key))})]})}function yN(e){const[t,n]=A.useState("photo"),r=e.messages.map((f,m)=>({message:f,key:f.wireId||`${f.date}-${(e.indexOffset??0)+m}`})),o=r.filter(({message:f})=>lf(f)==="photo"),a=r.filter(({message:f})=>lf(f)==="file"),l=Sj(a),c=r.flatMap(({message:f,key:m})=>f.kind==="file"?[]:Fj(f.text).map(h=>({url:h,message:f,key:m}))),x=[{id:"photo",label:"Photos",count:o.length},{id:"file",label:"Files",count:a.length},{id:"link",label:"Links",count:c.length}];return d.jsx(rs,{title:"Shared media",description:"Photos, files, and links from this conversation",onClose:e.onClose,wide:!0,className:"shared-media-modal",tabs:d.jsx(N2,{className:"shared-media-tabs",label:"Shared media type",options:x,value:t,onChange:n,idPrefix:"shared-media-tab",panelId:"shared-media-panel"}),children:d.jsxs("div",{id:"shared-media-panel",role:"tabpanel","aria-labelledby":`shared-media-tab-${t}`,className:"shared-media-list"+(t==="photo"?" photos":""),children:[t==="photo"&&o.map(f=>d.jsx(Ef,{message:f.message,messageKey:f.key,onJump:e.onJump,onPreview:e.onPreview},f.key)),t==="file"&&l.map(f=>d.jsx(CN,{filename:f.filename,versions:f.versions,onJump:e.onJump,onPreview:e.onPreview},f.filename)),t==="link"&&c.map((f,m)=>d.jsxs("div",{className:"shared-media-item",children:[d.jsxs("a",{className:"shared-media-jump",href:f.url,target:"_blank",rel:"noreferrer",children:[d.jsx("span",{className:"shared-media-icon",children:d.jsx(Fe,{name:"link",size:18})}),d.jsxs("span",{className:"shared-media-copy",children:[d.jsx("strong",{children:f.url}),d.jsx("span",{children:Zi(f.message.date)})]})]}),d.jsx("button",{className:"icon-btn",title:"Jump to message",onClick:()=>e.onJump(f.key),children:d.jsx(Fe,{name:"reply",size:16})})]},`${f.key}-${f.url}-${m}`)),(t==="photo"&&o.length===0||t==="file"&&a.length===0||t==="link"&&c.length===0)&&d.jsxs("div",{className:"markdown-empty",children:["No ",t==="photo"?"photos":`${t}s`," in this chat yet."]})]})})}const vN=Object.freeze(["image/avif","image/bmp","image/heic","image/heif","image/jpeg","image/jpg","image/png","image/webp"]),AN=/\.(avif|bmp|heic|heif|jpe?g|png|webp)$/i;function M2(e,t=""){return vN.includes(String(e??"").toLowerCase())||AN.test(String(t??""))}function BN(e){return`${(String(e||"photo").trim()||"photo").replace(/\.[^./\\]+$/,"")||"photo"}.jpg`}function wN(e,t,n){const r=Math.max(1,Number(e)||1),o=Math.max(1,Number(t)||1),a=Math.max(1,Number(n)||1),l=Math.min(1,a/Math.max(r,o));return{width:Math.max(1,Math.round(r*l)),height:Math.max(1,Math.round(o*l))}}const DN=2048,kN=640,FN=.82,SN=[.84,.7,.56,.44],bN=.94;function PN(e){return new Promise((t,n)=>{const r=URL.createObjectURL(e),o=new Image,a=()=>URL.revokeObjectURL(r);o.onload=()=>t({image:o,release:a}),o.onerror=()=>{a(),n(new Error("This browser could not decode the selected image."))},o.src=r})}function _N(e,t){return new Promise((n,r)=>{e.toBlob(o=>o?n(o):r(new Error("This browser could not encode the optimized photo.")),"image/jpeg",t)})}async function jN(e,t){if(!M2(e.type,e.name))throw new Error("This image format cannot be optimized safely in this browser.");const n=Math.max(1,Math.floor(t*bN)),{image:r,release:o}=await PN(e),a=document.createElement("canvas"),l=a.getContext("2d",{alpha:!1});if(!l)throw o(),new Error("Photo optimization is unavailable in this browser.");try{let c=Math.min(DN,Math.max(r.naturalWidth,r.naturalHeight));for(;c>=kN;){const x=wN(r.naturalWidth,r.naturalHeight,c);a.width=x.width,a.height=x.height,l.fillStyle="#fff",l.fillRect(0,0,a.width,a.height),l.drawImage(r,0,0,a.width,a.height);for(const f of SN){const m=await _N(a,f);if(m.size<=n)return{filename:BN(e.name),mime:"image/jpeg",bytes:new Uint8Array(await m.arrayBuffer()),width:a.width,height:a.height,originalSize:e.size}}c=Math.floor(c*FN)}}finally{o(),a.width=1,a.height=1}throw new Error("The photo is still too large after optimization.")}const TN=5e4,RN=new Set(["http:","https:","mailto:"]);function I2(e){if(!(!e||e!==e.trim()||/[\u0000-\u001f\u007f]/u.test(e)))try{const t=new URL(e);return RN.has(t.protocol.toLowerCase())?e:void 0}catch{return}}function L2(e){const t="language-";return e?.startsWith(t)&&e.slice(t.length)||void 0}function k8(e){return e.split(/(\n[ \t]*\n)/).map(t=>{if(/^\n[ \t]*\n$/.test(t))return t;const n=t.split(`
|
|
422
|
+
`),r=n.filter(l=>l.trim().length>0);if(r.length===0)return t;const o=r.map(l=>l.match(/^[ \t]+/)?.[0]??"");if(o.some(l=>l.length===0))return t;const a=Math.min(...o.map(l=>l.length));return n.map(l=>l.trim().length>0?l.slice(a):l).join(`
|
|
423
|
+
`)}).join("")}function NN(e){const t=[];let n=[],r="";for(const o of e.split(`
|
|
424
|
+
`))if(r){n.push(o);const a=/^ {0,3}(`+|~+)[ \t]*$/.exec(o);a&&a[1][0]===r[0]&&a[1].length>=r.length&&(t.push(n.join(`
|
|
425
|
+
`)),n=[],r="")}else{const a=/^ {0,3}(`{3,}|~{3,})(.*)$/.exec(o);a&&!(a[1][0]==="`"&&a[2].includes("`"))?(n.length&&t.push(k8(n.join(`
|
|
426
|
+
`))),n=[o],r=a[1]):n.push(o)}return n.length&&t.push(r?n.join(`
|
|
427
|
+
`):k8(n.join(`
|
|
428
|
+
`))),t.join(`
|
|
429
|
+
`)}function MN({children:e}){const t=A.isValidElement(e)?e:null,n=L2(t?.props.className);return n==="mermaid"?d.jsx(j2,{source:String(t?.props.children??"").replace(/\n$/,"")}):d.jsxs("div",{className:"message-code-block","data-language":n||void 0,children:[n&&d.jsx("div",{className:"message-code-language",children:n}),d.jsx("pre",{children:e})]})}const IN=[_2],LN={a:({node:e,children:t,href:n,...r})=>{const o=I2(n);return o?d.jsx("a",{...r,href:o,target:"_blank",rel:"noopener noreferrer",children:t}):d.jsx("span",{className:"message-link-blocked",children:t})},img:({alt:e})=>d.jsxs("span",{className:"message-image-placeholder",children:["[image: ",e||"remote image blocked","]"]}),pre:MN,code:({node:e,className:t,children:n,...r})=>d.jsx("code",{className:t,"data-language":L2(t),...r,children:n})},F8=A.memo(function({text:t,className:n="bubble-text message-markdown"}){return t.length>TN?d.jsx("div",{className:`${n} message-markdown-plaintext`,"data-render-mode":"plaintext",children:t}):d.jsx("div",{className:n,"data-render-mode":"markdown",children:d.jsx(P2,{remarkPlugins:IN,components:LN,urlTransform:r=>I2(r)??"",children:NN(t)})})}),O2=2025;let lc,cc;function ON(e){return e<65?!1:e<91?!0:e<97?!1:e<123?!0:V2(e)}function z2(e){return e<48?!1:e<58?!0:e<65?!1:e<91||e===95?!0:e<97?!1:e<123?!0:V2(e)||zN(e)}function V2(e){return U2(e,lc??(lc=VN()))}function zN(e){return U2(e,cc??(cc=UN()))}function VN(){return $2("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 6 h 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 2 1 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 v 2 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 a 6 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 29 l g 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 4 1f d 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 7 p 13 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 13 r a m 6z 15 7 1 h 5 1l s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 v 9 2 0 3 0 2 11 2 0 q 0 2 0 19 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 5k w w 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 o 17 79 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 q 32y 6 g6 5a2 t 1cz fs 8 u i 26 i t j 1b h 3 w k 6 i c1 18 5w 1r x o 3 o 19 22 6 0 1v c 1t 1 2 0 f 4 a 5p1 16 v 2q 36 6pq 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r 6d t 3 0 5s u 2 2 2 1 2 6 3 4 a 1 69 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 3dp 3 4gd 3 5rk g h9 1wj f1 15v 3t6 6 6jt")}function UN(){return $2("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1o 8 17 n 2 w 1j 2 2 h 2 6 b 1 3 9 i 2 1l 0 2 6 3 1 3 2 a 0 b 1 3 9 f 0 3 2 1l 0 2 4 5 1 3 2 4 0 l b 4 0 c 2 1l 0 2 7 2 2 2 2 l 1 3 9 b 5 2 2 1l 0 2 6 3 1 3 2 8 2 b 1 3 9 j 0 1o 4 4 2 2 3 a 0 f 9 h 4 1k 0 2 6 2 2 2 3 8 1 c 1 3 9 i 2 1l 0 2 6 2 2 2 3 8 1 c 1 3 9 4 0 d 3 1k 1 2 6 2 2 2 3 a 0 b 1 3 9 i 2 1z 0 5 5 2 0 2 7 7 9 3 1 1q 0 3 6 d 7 2 9 2g 0 3 8 c 6 2 9 1r 1 7 9 c 0 2 0 2 0 5 1 1e j 2 1 6 a 2 z a 0 2t j 2 9 d 3 5 2 2 2 3 6 4 3 e b 2 e jk 2 a 8 pt 3 t 2 u 1 v 1 1t v a 0 3 9 y 2 2 a 40 0 3b b 5 b b 9 3l a 1p 4 1m 9 2 s 3 a 7 9 n d 2 u 3 b l 4 1c g c 9 i 8 d 2 v c 3 9 19 d 1d j 9 9 7 9 3b 2 2 k 5 0 7 0 3 2 5j 1r el 1 1e 1 k 0 3g c 5 0 4 b 2db 2 3y 0 2p v ff 5 2y 1 2p 0 n51 9 1y 0 5 9 x 1 29 1 7l 0 4 0 5 0 o 4 5 0 2c 1 1f h b 9 7 h e a t 7 q c 19 3 1c d g 9 c 0 b 9 1c d d 0 9 1 3 9 y 2 1f 0 2 2 3 1 6 1 2 0 16 4 6 1 6l 7 2 1 3 9 fmt 0 ki f h f 4 1 p 2 5d 9 12 0 12 0 ig 0 6b 0 46 4 86 9 120 2 2 1 6 3 15 2 5 0 4m 1 fy 3 9 9 7 9 w 4 8u 1 26 5 1z a 1e 3 3f 2 1i e w a 3 1 b 3 1a a 8 0 1a 9 7 2 11 d 2 9 6 1 19 0 d 2 1d d 9 3 2 b 2b b 7 0 3 0 4e b 6 9 7 3 1k 1 2 6 3 1 3 2 a 0 b 1 3 6 4 4 1w 8 2 0 3 0 2 3 2 4 2 0 f 1 2b h a 9 5 0 2a j d 9 5y 6 3 8 s 1 2b g g 9 2a c 9 9 7 j 1m e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f 5j 7 3t 9 1i 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 1j 9 7e 3 a 1 2 0 1d 6 4 4 e a 44m 0 7 e 8uh r 1t3 9 2f 9 13 4 1o 6 q 9 ev 9 d2 0 2 1i 8 3 2a 0 c 1 f58 1 382 9 ef 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d 6t 1 2 9 6h 0 3 0 8 1 6 0 d7 6 32 6 6 9 3o7 9 gvt3 6n")}function U2(e,t){let n=0,r=t.length/2|0,o=0,a=0,l=0;for(;n<r;)if(o=(n+r)/2|0,a=t[2*o],l=t[2*o+1],e<a)r=o;else if(e>l)n=o+1;else return!0;return!1}function $2(e){let t=0;return e.split(" ").map(n=>t+=parseInt(n,36)|0)}class Au{constructor(t,n,r,o,a,l,c,x,f){this._raw2018=t,this._raw2019=n,this._raw2020=r,this._raw2021=o,this._raw2022=a,this._raw2023=l,this._raw2024=c,this._raw2025=x,this._raw2026=f}get es2018(){var t;return(t=this._set2018)!==null&&t!==void 0?t:this._set2018=new Set(this._raw2018.split(" "))}get es2019(){var t;return(t=this._set2019)!==null&&t!==void 0?t:this._set2019=new Set(this._raw2019.split(" "))}get es2020(){var t;return(t=this._set2020)!==null&&t!==void 0?t:this._set2020=new Set(this._raw2020.split(" "))}get es2021(){var t;return(t=this._set2021)!==null&&t!==void 0?t:this._set2021=new Set(this._raw2021.split(" "))}get es2022(){var t;return(t=this._set2022)!==null&&t!==void 0?t:this._set2022=new Set(this._raw2022.split(" "))}get es2023(){var t;return(t=this._set2023)!==null&&t!==void 0?t:this._set2023=new Set(this._raw2023.split(" "))}get es2024(){var t;return(t=this._set2024)!==null&&t!==void 0?t:this._set2024=new Set(this._raw2024.split(" "))}get es2025(){var t;return(t=this._set2025)!==null&&t!==void 0?t:this._set2025=new Set(this._raw2025.split(" "))}get es2026(){var t;return(t=this._set2026)!==null&&t!==void 0?t:this._set2026=new Set(this._raw2026.split(" "))}}const $N=new Set(["General_Category","gc"]),WN=new Set(["Script","Script_Extensions","sc","scx"]),HN=new Au("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct","","","","","","","",""),No=new Au("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy","Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo","Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho","Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi","Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi","Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz","","",""),ed=new Au("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space","Extended_Pictographic","","EBase EComp EMod EPres ExtPict","","","","",""),GN=new Au("","","","","","","Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji RGI_Emoji_Flag_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence","","");function S8(e,t,n){return $N.has(t)?e>=2018&&HN.es2018.has(n):WN.has(t)?e>=2018&&No.es2018.has(n)||e>=2019&&No.es2019.has(n)||e>=2020&&No.es2020.has(n)||e>=2021&&No.es2021.has(n)||e>=2022&&No.es2022.has(n)||e>=2023&&No.es2023.has(n):!1}function qN(e,t){return e>=2018&&ed.es2018.has(t)||e>=2019&&ed.es2019.has(t)||e>=2021&&ed.es2021.has(t)}function KN(e,t){return e>=2024&&GN.es2024.has(t)}const b8=8,XN=9,W2=10,YN=11,QN=12,H2=13,Xc=33,G2=35,es=36,q2=37,Vi=38,Ui=40,$i=41,da=42,Yc=43,Kh=44,Rn=45,Qc=46,ra=47,mi=48,JN=49,ZN=55,Jc=57,Zc=58,K2=59,fa=60,ha=61,Xh=62,sr=63,X2=64,eu=65,eM=66,tM=68,Y2=70,nM=80,rM=83,iM=87,oM=90,Yh=95,tu=97,td=98,Mo=99,gf=100,Qh=102,Q2=103,Jh=105,P8=107,Zh=109,sM=110,aM=112,lM=113,cM=114,nu=115,uM=116,kc=117,Cf=118,xM=119,dM=120,J2=121,fM=122,Wi=91,zt=92,Vr=93,$o=94,Z2=96,Hi=123,ma=124,Gi=125,e6=126,hM=8204,mM=8205,pM=8232,EM=8233,gM=0,CM=1114111;function t6(e){return e>=eu&&e<=oM||e>=tu&&e<=fM}function Fc(e){return e>=mi&&e<=Jc}function yM(e){return e>=mi&&e<=ZN}function _8(e){return e>=mi&&e<=Jc||e>=eu&&e<=Y2||e>=tu&&e<=Qh}function vM(e){return e===W2||e===H2||e===pM||e===EM}function AM(e){return e>=gM&&e<=CM}function nd(e){return e>=tu&&e<=Qh?e-tu+10:e>=eu&&e<=Y2?e-eu+10:e-mi}function rd(e){return e>=55296&&e<=56319}function id(e){return e>=56320&&e<=57343}function od(e,t){return(e-55296)*1024+(t-56320)+65536}class BM{constructor(){this.groupName=new Set}clear(){this.groupName.clear()}isEmpty(){return!this.groupName.size}hasInPattern(t){return this.groupName.has(t)}hasInScope(t){return this.hasInPattern(t)}addToScope(t){this.groupName.add(t)}enterDisjunction(){}enterAlternative(){}leaveDisjunction(){}}class ka{constructor(t,n){this.parent=t,this.base=n??this}separatedFrom(t){var n,r;return this.base===t.base&&this!==t||t.parent&&this.separatedFrom(t.parent)?!0:(r=(n=this.parent)===null||n===void 0?void 0:n.separatedFrom(t))!==null&&r!==void 0?r:!1}child(){return new ka(this,null)}sibling(){return new ka(this.parent,this.base)}}class wM{constructor(){this.branchID=new ka(null,null),this.groupNames=new Map}clear(){this.branchID=new ka(null,null),this.groupNames.clear()}isEmpty(){return!this.groupNames.size}enterDisjunction(){this.branchID=this.branchID.child()}enterAlternative(t){t!==0&&(this.branchID=this.branchID.sibling())}leaveDisjunction(){this.branchID=this.branchID.parent}hasInPattern(t){return this.groupNames.has(t)}hasInScope(t){const n=this.groupNames.get(t);if(!n)return!1;for(const r of n)if(!r.separatedFrom(this.branchID))return!0;return!1}addToScope(t){const n=this.groupNames.get(t);if(n){n.push(this.branchID);return}this.groupNames.set(t,[this.branchID])}}const j8={at(e,t,n){return n<t?e.charCodeAt(n):-1},width(e){return 1}},DM={at(e,t,n){return n<t?e.codePointAt(n):-1},width(e){return e>65535?2:1}};class kM{constructor(){this._impl=j8,this._s="",this._i=0,this._end=0,this._cp1=-1,this._w1=1,this._cp2=-1,this._w2=1,this._cp3=-1,this._w3=1,this._cp4=-1}get source(){return this._s}get index(){return this._i}get currentCodePoint(){return this._cp1}get nextCodePoint(){return this._cp2}get nextCodePoint2(){return this._cp3}get nextCodePoint3(){return this._cp4}reset(t,n,r,o){this._impl=o?DM:j8,this._s=t,this._end=r,this.rewind(n)}rewind(t){const n=this._impl;this._i=t,this._cp1=n.at(this._s,this._end,t),this._w1=n.width(this._cp1),this._cp2=n.at(this._s,this._end,t+this._w1),this._w2=n.width(this._cp2),this._cp3=n.at(this._s,this._end,t+this._w1+this._w2),this._w3=n.width(this._cp3),this._cp4=n.at(this._s,this._end,t+this._w1+this._w2+this._w3)}advance(){if(this._cp1!==-1){const t=this._impl;this._i+=this._w1,this._cp1=this._cp2,this._w1=this._w2,this._cp2=this._cp3,this._w2=t.width(this._cp2),this._cp3=this._cp4,this._w3=t.width(this._cp3),this._cp4=t.at(this._s,this._end,this._i+this._w1+this._w2+this._w3)}}eat(t){return this._cp1===t?(this.advance(),!0):!1}eat2(t,n){return this._cp1===t&&this._cp2===n?(this.advance(),this.advance(),!0):!1}eat3(t,n,r){return this._cp1===t&&this._cp2===n&&this._cp3===r?(this.advance(),this.advance(),this.advance(),!0):!1}}class FM extends SyntaxError{constructor(t,n){super(t),this.index=n}}function SM(e,t,n,r){let o="";if(e.kind==="literal"){const a=e.source.slice(e.start,e.end);a&&(o=`: ${a}`)}else if(e.kind==="pattern"){const a=e.source.slice(e.start,e.end),l=`${t.unicode?"u":""}${t.unicodeSets?"v":""}`;o=`: /${a}/${l}`}return new FM(`Invalid regular expression${o}: ${r}`,n)}const bM=new Set([$o,es,zt,Qc,da,Yc,sr,Ui,$i,Wi,Vr,Hi,Gi,ma]),PM=new Set([Vi,Xc,G2,es,q2,da,Yc,Kh,Qc,Zc,K2,fa,ha,Xh,sr,X2,$o,Z2,e6]),_M=new Set([Ui,$i,Wi,Vr,Hi,Gi,ra,Rn,zt,ma]),jM=new Set([Vi,Rn,Xc,G2,q2,Kh,Zc,K2,fa,ha,Xh,X2,Z2,e6]),n6={global:Q2,ignoreCase:Jh,multiline:Zh,unicode:kc,sticky:J2,dotAll:nu,hasIndices:gf,unicodeSets:Cf},TM=Object.fromEntries(Object.entries(n6).map(([e,t])=>[t,e]));function T8(e){return bM.has(e)}function R8(e){return PM.has(e)}function RM(e){return _M.has(e)}function NM(e){return jM.has(e)}function MM(e){return ON(e)||e===es||e===Yh}function IM(e){return z2(e)||e===es||e===hM||e===mM}function r6(e){return t6(e)||e===Yh}function LM(e){return r6(e)||Fc(e)}function OM(e){return e===Jh||e===Zh||e===nu}class zM{constructor(t){this._reader=new kM,this._unicodeMode=!1,this._unicodeSetsMode=!1,this._nFlag=!1,this._lastIntValue=0,this._lastRange={min:0,max:Number.POSITIVE_INFINITY},this._lastStrValue="",this._lastAssertionIsQuantifiable=!1,this._numCapturingParens=0,this._backreferenceNames=new Set,this._srcCtx=null,this._options=t??{},this._groupSpecifiers=this.ecmaVersion>=2025?new wM:new BM}validateLiteral(t,n=0,r=t.length){if(this._srcCtx={source:t,start:n,end:r,kind:"literal"},this._unicodeSetsMode=this._unicodeMode=this._nFlag=!1,this.reset(t,n,r),this.onLiteralEnter(n),this.eat(ra)&&this.eatRegExpBody()&&this.eat(ra)){const o=this.index,a=t.includes("u",o),l=t.includes("v",o);this.validateFlagsInternal(t,o,r),this.validatePatternInternal(t,n+1,o-1,{unicode:a,unicodeSets:l})}else if(n>=r)this.raise("Empty");else{const o=String.fromCodePoint(this.currentCodePoint);this.raise(`Unexpected character '${o}'`)}this.onLiteralLeave(n,r)}validateFlags(t,n=0,r=t.length){this._srcCtx={source:t,start:n,end:r,kind:"flags"},this.validateFlagsInternal(t,n,r)}validatePattern(t,n=0,r=t.length,o=void 0){this._srcCtx={source:t,start:n,end:r,kind:"pattern"},this.validatePatternInternal(t,n,r,o)}validatePatternInternal(t,n=0,r=t.length,o=void 0){const a=this._parseFlagsOptionToMode(o,r);this._unicodeMode=a.unicodeMode,this._nFlag=a.nFlag,this._unicodeSetsMode=a.unicodeSetsMode,this.reset(t,n,r),this.consumePattern(),!this._nFlag&&this.ecmaVersion>=2018&&!this._groupSpecifiers.isEmpty()&&(this._nFlag=!0,this.rewind(n),this.consumePattern())}validateFlagsInternal(t,n,r){const o=this.parseFlags(t,n,r);this.onRegExpFlags(n,r,o)}_parseFlagsOptionToMode(t,n){let r=!1,o=!1;t&&this.ecmaVersion>=2015&&(typeof t=="object"?(r=!!t.unicode,this.ecmaVersion>=2024&&(o=!!t.unicodeSets)):r=t),r&&o&&this.raise("Invalid regular expression flags",{index:n+1,unicode:r,unicodeSets:o});const a=r||o,l=r&&this.ecmaVersion>=2018||o||!!(this._options.strict&&this.ecmaVersion>=2023);return{unicodeMode:a,nFlag:l,unicodeSetsMode:o}}get strict(){return!!this._options.strict||this._unicodeMode}get ecmaVersion(){var t;return(t=this._options.ecmaVersion)!==null&&t!==void 0?t:O2}onLiteralEnter(t){this._options.onLiteralEnter&&this._options.onLiteralEnter(t)}onLiteralLeave(t,n){this._options.onLiteralLeave&&this._options.onLiteralLeave(t,n)}onRegExpFlags(t,n,r){this._options.onRegExpFlags&&this._options.onRegExpFlags(t,n,r),this._options.onFlags&&this._options.onFlags(t,n,r.global,r.ignoreCase,r.multiline,r.unicode,r.sticky,r.dotAll,r.hasIndices)}onPatternEnter(t){this._options.onPatternEnter&&this._options.onPatternEnter(t)}onPatternLeave(t,n){this._options.onPatternLeave&&this._options.onPatternLeave(t,n)}onDisjunctionEnter(t){this._options.onDisjunctionEnter&&this._options.onDisjunctionEnter(t)}onDisjunctionLeave(t,n){this._options.onDisjunctionLeave&&this._options.onDisjunctionLeave(t,n)}onAlternativeEnter(t,n){this._options.onAlternativeEnter&&this._options.onAlternativeEnter(t,n)}onAlternativeLeave(t,n,r){this._options.onAlternativeLeave&&this._options.onAlternativeLeave(t,n,r)}onGroupEnter(t){this._options.onGroupEnter&&this._options.onGroupEnter(t)}onGroupLeave(t,n){this._options.onGroupLeave&&this._options.onGroupLeave(t,n)}onModifiersEnter(t){this._options.onModifiersEnter&&this._options.onModifiersEnter(t)}onModifiersLeave(t,n){this._options.onModifiersLeave&&this._options.onModifiersLeave(t,n)}onAddModifiers(t,n,r){this._options.onAddModifiers&&this._options.onAddModifiers(t,n,r)}onRemoveModifiers(t,n,r){this._options.onRemoveModifiers&&this._options.onRemoveModifiers(t,n,r)}onCapturingGroupEnter(t,n){this._options.onCapturingGroupEnter&&this._options.onCapturingGroupEnter(t,n)}onCapturingGroupLeave(t,n,r){this._options.onCapturingGroupLeave&&this._options.onCapturingGroupLeave(t,n,r)}onQuantifier(t,n,r,o,a){this._options.onQuantifier&&this._options.onQuantifier(t,n,r,o,a)}onLookaroundAssertionEnter(t,n,r){this._options.onLookaroundAssertionEnter&&this._options.onLookaroundAssertionEnter(t,n,r)}onLookaroundAssertionLeave(t,n,r,o){this._options.onLookaroundAssertionLeave&&this._options.onLookaroundAssertionLeave(t,n,r,o)}onEdgeAssertion(t,n,r){this._options.onEdgeAssertion&&this._options.onEdgeAssertion(t,n,r)}onWordBoundaryAssertion(t,n,r,o){this._options.onWordBoundaryAssertion&&this._options.onWordBoundaryAssertion(t,n,r,o)}onAnyCharacterSet(t,n,r){this._options.onAnyCharacterSet&&this._options.onAnyCharacterSet(t,n,r)}onEscapeCharacterSet(t,n,r,o){this._options.onEscapeCharacterSet&&this._options.onEscapeCharacterSet(t,n,r,o)}onUnicodePropertyCharacterSet(t,n,r,o,a,l,c){this._options.onUnicodePropertyCharacterSet&&this._options.onUnicodePropertyCharacterSet(t,n,r,o,a,l,c)}onCharacter(t,n,r){this._options.onCharacter&&this._options.onCharacter(t,n,r)}onBackreference(t,n,r){this._options.onBackreference&&this._options.onBackreference(t,n,r)}onCharacterClassEnter(t,n,r){this._options.onCharacterClassEnter&&this._options.onCharacterClassEnter(t,n,r)}onCharacterClassLeave(t,n,r){this._options.onCharacterClassLeave&&this._options.onCharacterClassLeave(t,n,r)}onCharacterClassRange(t,n,r,o){this._options.onCharacterClassRange&&this._options.onCharacterClassRange(t,n,r,o)}onClassIntersection(t,n){this._options.onClassIntersection&&this._options.onClassIntersection(t,n)}onClassSubtraction(t,n){this._options.onClassSubtraction&&this._options.onClassSubtraction(t,n)}onClassStringDisjunctionEnter(t){this._options.onClassStringDisjunctionEnter&&this._options.onClassStringDisjunctionEnter(t)}onClassStringDisjunctionLeave(t,n){this._options.onClassStringDisjunctionLeave&&this._options.onClassStringDisjunctionLeave(t,n)}onStringAlternativeEnter(t,n){this._options.onStringAlternativeEnter&&this._options.onStringAlternativeEnter(t,n)}onStringAlternativeLeave(t,n,r){this._options.onStringAlternativeLeave&&this._options.onStringAlternativeLeave(t,n,r)}get index(){return this._reader.index}get currentCodePoint(){return this._reader.currentCodePoint}get nextCodePoint(){return this._reader.nextCodePoint}get nextCodePoint2(){return this._reader.nextCodePoint2}get nextCodePoint3(){return this._reader.nextCodePoint3}reset(t,n,r){this._reader.reset(t,n,r,this._unicodeMode)}rewind(t){this._reader.rewind(t)}advance(){this._reader.advance()}eat(t){return this._reader.eat(t)}eat2(t,n){return this._reader.eat2(t,n)}eat3(t,n,r){return this._reader.eat3(t,n,r)}raise(t,n){var r,o,a;throw SM(this._srcCtx,{unicode:(r=n?.unicode)!==null&&r!==void 0?r:this._unicodeMode&&!this._unicodeSetsMode,unicodeSets:(o=n?.unicodeSets)!==null&&o!==void 0?o:this._unicodeSetsMode},(a=n?.index)!==null&&a!==void 0?a:this.index,t)}eatRegExpBody(){const t=this.index;let n=!1,r=!1;for(;;){const o=this.currentCodePoint;if(o===-1||vM(o)){const a=n?"character class":"regular expression";this.raise(`Unterminated ${a}`)}if(r)r=!1;else if(o===zt)r=!0;else if(o===Wi)n=!0;else if(o===Vr)n=!1;else if(o===ra&&!n||o===da&&this.index===t)break;this.advance()}return this.index!==t}consumePattern(){const t=this.index;this._numCapturingParens=this.countCapturingParens(),this._groupSpecifiers.clear(),this._backreferenceNames.clear(),this.onPatternEnter(t),this.consumeDisjunction();const n=this.currentCodePoint;if(this.currentCodePoint!==-1){n===$i&&this.raise("Unmatched ')'"),n===zt&&this.raise("\\ at end of pattern"),(n===Vr||n===Gi)&&this.raise("Lone quantifier brackets");const r=String.fromCodePoint(n);this.raise(`Unexpected character '${r}'`)}for(const r of this._backreferenceNames)this._groupSpecifiers.hasInPattern(r)||this.raise("Invalid named capture referenced");this.onPatternLeave(t,this.index)}countCapturingParens(){const t=this.index;let n=!1,r=!1,o=0,a=0;for(;(a=this.currentCodePoint)!==-1;)r?r=!1:a===zt?r=!0:a===Wi?n=!0:a===Vr?n=!1:a===Ui&&!n&&(this.nextCodePoint!==sr||this.nextCodePoint2===fa&&this.nextCodePoint3!==ha&&this.nextCodePoint3!==Xc)&&(o+=1),this.advance();return this.rewind(t),o}consumeDisjunction(){const t=this.index;let n=0;this._groupSpecifiers.enterDisjunction(),this.onDisjunctionEnter(t);do this.consumeAlternative(n++);while(this.eat(ma));this.consumeQuantifier(!0)&&this.raise("Nothing to repeat"),this.eat(Hi)&&this.raise("Lone quantifier brackets"),this.onDisjunctionLeave(t,this.index),this._groupSpecifiers.leaveDisjunction()}consumeAlternative(t){const n=this.index;for(this._groupSpecifiers.enterAlternative(t),this.onAlternativeEnter(n,t);this.currentCodePoint!==-1&&this.consumeTerm(););this.onAlternativeLeave(n,this.index,t)}consumeTerm(){return this._unicodeMode||this.strict?this.consumeAssertion()||this.consumeAtom()&&this.consumeOptionalQuantifier():this.consumeAssertion()&&(!this._lastAssertionIsQuantifiable||this.consumeOptionalQuantifier())||this.consumeExtendedAtom()&&this.consumeOptionalQuantifier()}consumeOptionalQuantifier(){return this.consumeQuantifier(),!0}consumeAssertion(){const t=this.index;if(this._lastAssertionIsQuantifiable=!1,this.eat($o))return this.onEdgeAssertion(t,this.index,"start"),!0;if(this.eat(es))return this.onEdgeAssertion(t,this.index,"end"),!0;if(this.eat2(zt,eM))return this.onWordBoundaryAssertion(t,this.index,"word",!0),!0;if(this.eat2(zt,td))return this.onWordBoundaryAssertion(t,this.index,"word",!1),!0;if(this.eat2(Ui,sr)){const n=this.ecmaVersion>=2018&&this.eat(fa);let r=!1;if(this.eat(ha)||(r=this.eat(Xc))){const o=n?"lookbehind":"lookahead";return this.onLookaroundAssertionEnter(t,o,r),this.consumeDisjunction(),this.eat($i)||this.raise("Unterminated group"),this._lastAssertionIsQuantifiable=!n&&!this.strict,this.onLookaroundAssertionLeave(t,this.index,o,r),!0}this.rewind(t)}return!1}consumeQuantifier(t=!1){const n=this.index;let r=0,o=0,a=!1;if(this.eat(da))r=0,o=Number.POSITIVE_INFINITY;else if(this.eat(Yc))r=1,o=Number.POSITIVE_INFINITY;else if(this.eat(sr))r=0,o=1;else if(this.eatBracedQuantifier(t))({min:r,max:o}=this._lastRange);else return!1;return a=!this.eat(sr),t||this.onQuantifier(n,this.index,r,o,a),!0}eatBracedQuantifier(t){const n=this.index;if(this.eat(Hi)){if(this.eatDecimalDigits()){const r=this._lastIntValue;let o=r;if(this.eat(Kh)&&(o=this.eatDecimalDigits()?this._lastIntValue:Number.POSITIVE_INFINITY),this.eat(Gi))return!t&&o<r&&this.raise("numbers out of order in {} quantifier"),this._lastRange={min:r,max:o},!0}!t&&(this._unicodeMode||this.strict)&&this.raise("Incomplete quantifier"),this.rewind(n)}return!1}consumeAtom(){return this.consumePatternCharacter()||this.consumeDot()||this.consumeReverseSolidusAtomEscape()||!!this.consumeCharacterClass()||this.consumeCapturingGroup()||this.consumeUncapturingGroup()}consumeDot(){return this.eat(Qc)?(this.onAnyCharacterSet(this.index-1,this.index,"any"),!0):!1}consumeReverseSolidusAtomEscape(){const t=this.index;if(this.eat(zt)){if(this.consumeAtomEscape())return!0;this.rewind(t)}return!1}consumeUncapturingGroup(){const t=this.index;return this.eat2(Ui,sr)?(this.onGroupEnter(t),this.ecmaVersion>=2025&&this.consumeModifiers(),this.eat(Zc)||(this.rewind(t+1),this.raise("Invalid group")),this.consumeDisjunction(),this.eat($i)||this.raise("Unterminated group"),this.onGroupLeave(t,this.index),!0):!1}consumeModifiers(){const t=this.index,n=this.eatModifiers(),r=this.index,o=this.eat(Rn);if(!n&&!o)return!1;this.onModifiersEnter(t);const a=this.parseModifiers(t,r);if(this.onAddModifiers(t,r,a),o){const l=this.index;!this.eatModifiers()&&!n&&this.currentCodePoint===Zc&&this.raise("Invalid empty flags");const c=this.parseModifiers(l,this.index);for(const[x]of Object.entries(c).filter(([,f])=>f))a[x]&&this.raise(`Duplicated flag '${String.fromCodePoint(n6[x])}'`);this.onRemoveModifiers(l,this.index,c)}return this.onModifiersLeave(t,this.index),!0}consumeCapturingGroup(){const t=this.index;if(this.eat(Ui)){let n=null;if(this.ecmaVersion>=2018){if(this.consumeGroupSpecifier())n=this._lastStrValue;else if(this.currentCodePoint===sr)return this.rewind(t),!1}else if(this.currentCodePoint===sr)return this.rewind(t),!1;return this.onCapturingGroupEnter(t,n),this.consumeDisjunction(),this.eat($i)||this.raise("Unterminated group"),this.onCapturingGroupLeave(t,this.index,n),!0}return!1}consumeExtendedAtom(){return this.consumeDot()||this.consumeReverseSolidusAtomEscape()||this.consumeReverseSolidusFollowedByC()||!!this.consumeCharacterClass()||this.consumeCapturingGroup()||this.consumeUncapturingGroup()||this.consumeInvalidBracedQuantifier()||this.consumeExtendedPatternCharacter()}consumeReverseSolidusFollowedByC(){const t=this.index;return this.currentCodePoint===zt&&this.nextCodePoint===Mo?(this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(t,this.index,zt),!0):!1}consumeInvalidBracedQuantifier(){return this.eatBracedQuantifier(!0)&&this.raise("Nothing to repeat"),!1}consumePatternCharacter(){const t=this.index,n=this.currentCodePoint;return n!==-1&&!T8(n)?(this.advance(),this.onCharacter(t,this.index,n),!0):!1}consumeExtendedPatternCharacter(){const t=this.index,n=this.currentCodePoint;return n!==-1&&n!==$o&&n!==es&&n!==zt&&n!==Qc&&n!==da&&n!==Yc&&n!==sr&&n!==Ui&&n!==$i&&n!==Wi&&n!==ma?(this.advance(),this.onCharacter(t,this.index,n),!0):!1}consumeGroupSpecifier(){const t=this.index;if(this.eat(sr)){if(this.eatGroupName()){if(!this._groupSpecifiers.hasInScope(this._lastStrValue))return this._groupSpecifiers.addToScope(this._lastStrValue),!0;this.raise("Duplicate capture group name")}this.rewind(t)}return!1}consumeAtomEscape(){return this.consumeBackreference()||this.consumeCharacterClassEscape()||this.consumeCharacterEscape()||this._nFlag&&this.consumeKGroupName()?!0:((this.strict||this._unicodeMode)&&this.raise("Invalid escape"),!1)}consumeBackreference(){const t=this.index;if(this.eatDecimalEscape()){const n=this._lastIntValue;if(n<=this._numCapturingParens)return this.onBackreference(t-1,this.index,n),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(t)}return!1}consumeCharacterClassEscape(){var t;const n=this.index;if(this.eat(gf))return this._lastIntValue=-1,this.onEscapeCharacterSet(n-1,this.index,"digit",!1),{};if(this.eat(tM))return this._lastIntValue=-1,this.onEscapeCharacterSet(n-1,this.index,"digit",!0),{};if(this.eat(nu))return this._lastIntValue=-1,this.onEscapeCharacterSet(n-1,this.index,"space",!1),{};if(this.eat(rM))return this._lastIntValue=-1,this.onEscapeCharacterSet(n-1,this.index,"space",!0),{};if(this.eat(xM))return this._lastIntValue=-1,this.onEscapeCharacterSet(n-1,this.index,"word",!1),{};if(this.eat(iM))return this._lastIntValue=-1,this.onEscapeCharacterSet(n-1,this.index,"word",!0),{};let r=!1;if(this._unicodeMode&&this.ecmaVersion>=2018&&(this.eat(aM)||(r=this.eat(nM)))){this._lastIntValue=-1;let o=null;if(this.eat(Hi)&&(o=this.eatUnicodePropertyValueExpression())&&this.eat(Gi))return r&&o.strings&&this.raise("Invalid property name"),this.onUnicodePropertyCharacterSet(n-1,this.index,"property",o.key,o.value,r,(t=o.strings)!==null&&t!==void 0?t:!1),{mayContainStrings:o.strings};this.raise("Invalid property name")}return null}consumeCharacterEscape(){const t=this.index;return this.eatControlEscape()||this.eatCControlLetter()||this.eatZero()||this.eatHexEscapeSequence()||this.eatRegExpUnicodeEscapeSequence()||!this.strict&&!this._unicodeMode&&this.eatLegacyOctalEscapeSequence()||this.eatIdentityEscape()?(this.onCharacter(t-1,this.index,this._lastIntValue),!0):!1}consumeKGroupName(){const t=this.index;if(this.eat(P8)){if(this.eatGroupName()){const n=this._lastStrValue;return this._backreferenceNames.add(n),this.onBackreference(t-1,this.index,n),!0}this.raise("Invalid named reference")}return!1}consumeCharacterClass(){const t=this.index;if(this.eat(Wi)){const n=this.eat($o);this.onCharacterClassEnter(t,n,this._unicodeSetsMode);const r=this.consumeClassContents();return this.eat(Vr)||(this.currentCodePoint===-1&&this.raise("Unterminated character class"),this.raise("Invalid character in character class")),n&&r.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(t,this.index,n),r}return null}consumeClassContents(){if(this._unicodeSetsMode)return this.currentCodePoint===Vr?{}:this.consumeClassSetExpression();const t=this.strict||this._unicodeMode;for(;;){const n=this.index;if(!this.consumeClassAtom())break;const r=this._lastIntValue;if(!this.eat(Rn))continue;if(this.onCharacter(this.index-1,this.index,Rn),!this.consumeClassAtom())break;const o=this._lastIntValue;if(r===-1||o===-1){t&&this.raise("Invalid character class");continue}r>o&&this.raise("Range out of order in character class"),this.onCharacterClassRange(n,this.index,r,o)}return{}}consumeClassAtom(){const t=this.index,n=this.currentCodePoint;if(n!==-1&&n!==zt&&n!==Vr)return this.advance(),this._lastIntValue=n,this.onCharacter(t,this.index,this._lastIntValue),!0;if(this.eat(zt)){if(this.consumeClassEscape())return!0;if(!this.strict&&this.currentCodePoint===Mo)return this._lastIntValue=zt,this.onCharacter(t,this.index,this._lastIntValue),!0;(this.strict||this._unicodeMode)&&this.raise("Invalid escape"),this.rewind(t)}return!1}consumeClassEscape(){const t=this.index;if(this.eat(td))return this._lastIntValue=b8,this.onCharacter(t-1,this.index,this._lastIntValue),!0;if(this._unicodeMode&&this.eat(Rn))return this._lastIntValue=Rn,this.onCharacter(t-1,this.index,this._lastIntValue),!0;let n=0;return!this.strict&&!this._unicodeMode&&this.currentCodePoint===Mo&&(Fc(n=this.nextCodePoint)||n===Yh)?(this.advance(),this.advance(),this._lastIntValue=n%32,this.onCharacter(t-1,this.index,this._lastIntValue),!0):!!this.consumeCharacterClassEscape()||this.consumeCharacterEscape()}consumeClassSetExpression(){const t=this.index;let n=!1,r=null;if(this.consumeClassSetCharacter()){if(this.consumeClassSetRangeFromOperator(t))return this.consumeClassUnionRight({}),{};n=!1}else if(r=this.consumeClassSetOperand())n=r.mayContainStrings;else{const o=this.currentCodePoint;o===zt&&(this.advance(),this.raise("Invalid escape")),o===this.nextCodePoint&&R8(o)&&this.raise("Invalid set operation in character class"),this.raise("Invalid character in character class")}if(this.eat2(Vi,Vi)){for(;this.currentCodePoint!==Vi&&(r=this.consumeClassSetOperand());)if(this.onClassIntersection(t,this.index),r.mayContainStrings||(n=!1),!this.eat2(Vi,Vi))return{mayContainStrings:n};this.raise("Invalid character in character class")}if(this.eat2(Rn,Rn)){for(;this.consumeClassSetOperand();)if(this.onClassSubtraction(t,this.index),!this.eat2(Rn,Rn))return{mayContainStrings:n};this.raise("Invalid character in character class")}return this.consumeClassUnionRight({mayContainStrings:n})}consumeClassUnionRight(t){let n=t.mayContainStrings;for(;;){const r=this.index;if(this.consumeClassSetCharacter()){this.consumeClassSetRangeFromOperator(r);continue}const o=this.consumeClassSetOperand();if(o){o.mayContainStrings&&(n=!0);continue}break}return{mayContainStrings:n}}consumeClassSetRangeFromOperator(t){const n=this.index,r=this._lastIntValue;if(this.eat(Rn)){if(this.consumeClassSetCharacter()){const o=this._lastIntValue;return(r===-1||o===-1)&&this.raise("Invalid character class"),r>o&&this.raise("Range out of order in character class"),this.onCharacterClassRange(t,this.index,r,o),!0}this.rewind(n)}return!1}consumeClassSetOperand(){let t=null;return(t=this.consumeNestedClass())||(t=this.consumeClassStringDisjunction())?t:this.consumeClassSetCharacter()?{}:null}consumeNestedClass(){const t=this.index;if(this.eat(Wi)){const n=this.eat($o);this.onCharacterClassEnter(t,n,!0);const r=this.consumeClassContents();return this.eat(Vr)||this.raise("Unterminated character class"),n&&r.mayContainStrings&&this.raise("Negated character class may contain strings"),this.onCharacterClassLeave(t,this.index,n),r}if(this.eat(zt)){const n=this.consumeCharacterClassEscape();if(n)return n;this.rewind(t)}return null}consumeClassStringDisjunction(){const t=this.index;if(this.eat3(zt,lM,Hi)){this.onClassStringDisjunctionEnter(t);let n=0,r=!1;do this.consumeClassString(n++).mayContainStrings&&(r=!0);while(this.eat(ma));if(this.eat(Gi))return this.onClassStringDisjunctionLeave(t,this.index),{mayContainStrings:r};this.raise("Unterminated class string disjunction")}return null}consumeClassString(t){const n=this.index;let r=0;for(this.onStringAlternativeEnter(n,t);this.currentCodePoint!==-1&&this.consumeClassSetCharacter();)r++;return this.onStringAlternativeLeave(n,this.index,t),{mayContainStrings:r!==1}}consumeClassSetCharacter(){const t=this.index,n=this.currentCodePoint;if((n!==this.nextCodePoint||!R8(n))&&n!==-1&&!RM(n))return this._lastIntValue=n,this.advance(),this.onCharacter(t,this.index,this._lastIntValue),!0;if(this.eat(zt)){if(this.consumeCharacterEscape())return!0;if(NM(this.currentCodePoint))return this._lastIntValue=this.currentCodePoint,this.advance(),this.onCharacter(t,this.index,this._lastIntValue),!0;if(this.eat(td))return this._lastIntValue=b8,this.onCharacter(t,this.index,this._lastIntValue),!0;this.rewind(t)}return!1}eatGroupName(){if(this.eat(fa)){if(this.eatRegExpIdentifierName()&&this.eat(Xh))return!0;this.raise("Invalid capture group name")}return!1}eatRegExpIdentifierName(){if(this.eatRegExpIdentifierStart()){for(this._lastStrValue=String.fromCodePoint(this._lastIntValue);this.eatRegExpIdentifierPart();)this._lastStrValue+=String.fromCodePoint(this._lastIntValue);return!0}return!1}eatRegExpIdentifierStart(){const t=this.index,n=!this._unicodeMode&&this.ecmaVersion>=2020;let r=this.currentCodePoint;return this.advance(),r===zt&&this.eatRegExpUnicodeEscapeSequence(n)?r=this._lastIntValue:n&&rd(r)&&id(this.currentCodePoint)&&(r=od(r,this.currentCodePoint),this.advance()),MM(r)?(this._lastIntValue=r,!0):(this.index!==t&&this.rewind(t),!1)}eatRegExpIdentifierPart(){const t=this.index,n=!this._unicodeMode&&this.ecmaVersion>=2020;let r=this.currentCodePoint;return this.advance(),r===zt&&this.eatRegExpUnicodeEscapeSequence(n)?r=this._lastIntValue:n&&rd(r)&&id(this.currentCodePoint)&&(r=od(r,this.currentCodePoint),this.advance()),IM(r)?(this._lastIntValue=r,!0):(this.index!==t&&this.rewind(t),!1)}eatCControlLetter(){const t=this.index;if(this.eat(Mo)){if(this.eatControlLetter())return!0;this.rewind(t)}return!1}eatZero(){return this.currentCodePoint===mi&&!Fc(this.nextCodePoint)?(this._lastIntValue=0,this.advance(),!0):!1}eatControlEscape(){return this.eat(Qh)?(this._lastIntValue=QN,!0):this.eat(sM)?(this._lastIntValue=W2,!0):this.eat(cM)?(this._lastIntValue=H2,!0):this.eat(uM)?(this._lastIntValue=XN,!0):this.eat(Cf)?(this._lastIntValue=YN,!0):!1}eatControlLetter(){const t=this.currentCodePoint;return t6(t)?(this.advance(),this._lastIntValue=t%32,!0):!1}eatRegExpUnicodeEscapeSequence(t=!1){const n=this.index,r=t||this._unicodeMode;if(this.eat(kc)){if(r&&this.eatRegExpUnicodeSurrogatePairEscape()||this.eatFixedHexDigits(4)||r&&this.eatRegExpUnicodeCodePointEscape())return!0;(this.strict||r)&&this.raise("Invalid unicode escape"),this.rewind(n)}return!1}eatRegExpUnicodeSurrogatePairEscape(){const t=this.index;if(this.eatFixedHexDigits(4)){const n=this._lastIntValue;if(rd(n)&&this.eat(zt)&&this.eat(kc)&&this.eatFixedHexDigits(4)){const r=this._lastIntValue;if(id(r))return this._lastIntValue=od(n,r),!0}this.rewind(t)}return!1}eatRegExpUnicodeCodePointEscape(){const t=this.index;return this.eat(Hi)&&this.eatHexDigits()&&this.eat(Gi)&&AM(this._lastIntValue)?!0:(this.rewind(t),!1)}eatIdentityEscape(){const t=this.currentCodePoint;return this.isValidIdentityEscape(t)?(this._lastIntValue=t,this.advance(),!0):!1}isValidIdentityEscape(t){return t===-1?!1:this._unicodeMode?T8(t)||t===ra:this.strict?!z2(t):this._nFlag?!(t===Mo||t===P8):t!==Mo}eatDecimalEscape(){this._lastIntValue=0;let t=this.currentCodePoint;if(t>=JN&&t<=Jc){do this._lastIntValue=10*this._lastIntValue+(t-mi),this.advance();while((t=this.currentCodePoint)>=mi&&t<=Jc);return!0}return!1}eatUnicodePropertyValueExpression(){const t=this.index;if(this.eatUnicodePropertyName()&&this.eat(ha)){const n=this._lastStrValue;if(this.eatUnicodePropertyValue()){const r=this._lastStrValue;if(S8(this.ecmaVersion,n,r))return{key:n,value:r||null};this.raise("Invalid property name")}}if(this.rewind(t),this.eatLoneUnicodePropertyNameOrValue()){const n=this._lastStrValue;if(S8(this.ecmaVersion,"General_Category",n))return{key:"General_Category",value:n||null};if(qN(this.ecmaVersion,n))return{key:n,value:null};if(this._unicodeSetsMode&&KN(this.ecmaVersion,n))return{key:n,value:null,strings:!0};this.raise("Invalid property name")}return null}eatUnicodePropertyName(){for(this._lastStrValue="";r6(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatUnicodePropertyValue(){for(this._lastStrValue="";LM(this.currentCodePoint);)this._lastStrValue+=String.fromCodePoint(this.currentCodePoint),this.advance();return this._lastStrValue!==""}eatLoneUnicodePropertyNameOrValue(){return this.eatUnicodePropertyValue()}eatHexEscapeSequence(){const t=this.index;if(this.eat(dM)){if(this.eatFixedHexDigits(2))return!0;(this._unicodeMode||this.strict)&&this.raise("Invalid escape"),this.rewind(t)}return!1}eatDecimalDigits(){const t=this.index;for(this._lastIntValue=0;Fc(this.currentCodePoint);)this._lastIntValue=10*this._lastIntValue+nd(this.currentCodePoint),this.advance();return this.index!==t}eatHexDigits(){const t=this.index;for(this._lastIntValue=0;_8(this.currentCodePoint);)this._lastIntValue=16*this._lastIntValue+nd(this.currentCodePoint),this.advance();return this.index!==t}eatLegacyOctalEscapeSequence(){if(this.eatOctalDigit()){const t=this._lastIntValue;if(this.eatOctalDigit()){const n=this._lastIntValue;t<=3&&this.eatOctalDigit()?this._lastIntValue=t*64+n*8+this._lastIntValue:this._lastIntValue=t*8+n}else this._lastIntValue=t;return!0}return!1}eatOctalDigit(){const t=this.currentCodePoint;return yM(t)?(this.advance(),this._lastIntValue=t-mi,!0):(this._lastIntValue=0,!1)}eatFixedHexDigits(t){const n=this.index;this._lastIntValue=0;for(let r=0;r<t;++r){const o=this.currentCodePoint;if(!_8(o))return this.rewind(n),!1;this._lastIntValue=16*this._lastIntValue+nd(o),this.advance()}return!0}eatModifiers(){let t=!1;for(;OM(this.currentCodePoint);)this.advance(),t=!0;return t}parseModifiers(t,n){const{ignoreCase:r,multiline:o,dotAll:a}=this.parseFlags(this._reader.source,t,n);return{ignoreCase:r,multiline:o,dotAll:a}}parseFlags(t,n,r){const o={global:!1,ignoreCase:!1,multiline:!1,unicode:!1,sticky:!1,dotAll:!1,hasIndices:!1,unicodeSets:!1},a=new Set;a.add(Q2),a.add(Jh),a.add(Zh),this.ecmaVersion>=2015&&(a.add(kc),a.add(J2),this.ecmaVersion>=2018&&(a.add(nu),this.ecmaVersion>=2022&&(a.add(gf),this.ecmaVersion>=2024&&a.add(Cf))));for(let l=n;l<r;++l){const c=t.charCodeAt(l);if(a.has(c)){const x=TM[c];o[x]&&this.raise(`Duplicated flag '${t[l]}'`,{index:n}),o[x]=!0}else this.raise(`Invalid flag '${t[l]}'`,{index:n})}return o}}const VM={},UM={},$M={};function uc(e){return e.type==="Character"||e.type==="CharacterSet"||e.type==="CharacterClass"||e.type==="ExpressionCharacterClass"||e.type==="ClassStringDisjunction"}class WM{constructor(t){var n;this._node=VM,this._expressionBufferMap=new Map,this._flags=UM,this._backreferences=[],this._capturingGroups=[],this.source="",this.strict=!!t?.strict,this.ecmaVersion=(n=t?.ecmaVersion)!==null&&n!==void 0?n:O2}get pattern(){if(this._node.type!=="Pattern")throw new Error("UnknownError");return this._node}get flags(){if(this._flags.type!=="Flags")throw new Error("UnknownError");return this._flags}onRegExpFlags(t,n,{global:r,ignoreCase:o,multiline:a,unicode:l,sticky:c,dotAll:x,hasIndices:f,unicodeSets:m}){this._flags={type:"Flags",parent:null,start:t,end:n,raw:this.source.slice(t,n),global:r,ignoreCase:o,multiline:a,unicode:l,sticky:c,dotAll:x,hasIndices:f,unicodeSets:m}}onPatternEnter(t){this._node={type:"Pattern",parent:null,start:t,end:t,raw:"",alternatives:[]},this._backreferences.length=0,this._capturingGroups.length=0}onPatternLeave(t,n){this._node.end=n,this._node.raw=this.source.slice(t,n);for(const r of this._backreferences){const o=r.ref,a=typeof o=="number"?[this._capturingGroups[o-1]]:this._capturingGroups.filter(l=>l.name===o);if(a.length===1){const l=a[0];r.ambiguous=!1,r.resolved=l}else r.ambiguous=!0,r.resolved=a;for(const l of a)l.references.push(r)}}onAlternativeEnter(t){const n=this._node;if(n.type!=="Assertion"&&n.type!=="CapturingGroup"&&n.type!=="Group"&&n.type!=="Pattern")throw new Error("UnknownError");this._node={type:"Alternative",parent:n,start:t,end:t,raw:"",elements:[]},n.alternatives.push(this._node)}onAlternativeLeave(t,n){const r=this._node;if(r.type!=="Alternative")throw new Error("UnknownError");r.end=n,r.raw=this.source.slice(t,n),this._node=r.parent}onGroupEnter(t){const n=this._node;if(n.type!=="Alternative")throw new Error("UnknownError");const r={type:"Group",parent:n,start:t,end:t,raw:"",modifiers:null,alternatives:[]};this._node=r,n.elements.push(this._node)}onGroupLeave(t,n){const r=this._node;if(r.type!=="Group"||r.parent.type!=="Alternative")throw new Error("UnknownError");r.end=n,r.raw=this.source.slice(t,n),this._node=r.parent}onModifiersEnter(t){const n=this._node;if(n.type!=="Group")throw new Error("UnknownError");this._node={type:"Modifiers",parent:n,start:t,end:t,raw:"",add:null,remove:null},n.modifiers=this._node}onModifiersLeave(t,n){const r=this._node;if(r.type!=="Modifiers"||r.parent.type!=="Group")throw new Error("UnknownError");r.end=n,r.raw=this.source.slice(t,n),this._node=r.parent}onAddModifiers(t,n,{ignoreCase:r,multiline:o,dotAll:a}){const l=this._node;if(l.type!=="Modifiers")throw new Error("UnknownError");l.add={type:"ModifierFlags",parent:l,start:t,end:n,raw:this.source.slice(t,n),ignoreCase:r,multiline:o,dotAll:a}}onRemoveModifiers(t,n,{ignoreCase:r,multiline:o,dotAll:a}){const l=this._node;if(l.type!=="Modifiers")throw new Error("UnknownError");l.remove={type:"ModifierFlags",parent:l,start:t,end:n,raw:this.source.slice(t,n),ignoreCase:r,multiline:o,dotAll:a}}onCapturingGroupEnter(t,n){const r=this._node;if(r.type!=="Alternative")throw new Error("UnknownError");this._node={type:"CapturingGroup",parent:r,start:t,end:t,raw:"",name:n,alternatives:[],references:[]},r.elements.push(this._node),this._capturingGroups.push(this._node)}onCapturingGroupLeave(t,n){const r=this._node;if(r.type!=="CapturingGroup"||r.parent.type!=="Alternative")throw new Error("UnknownError");r.end=n,r.raw=this.source.slice(t,n),this._node=r.parent}onQuantifier(t,n,r,o,a){const l=this._node;if(l.type!=="Alternative")throw new Error("UnknownError");const c=l.elements.pop();if(c==null||c.type==="Quantifier"||c.type==="Assertion"&&c.kind!=="lookahead")throw new Error("UnknownError");const x={type:"Quantifier",parent:l,start:c.start,end:n,raw:this.source.slice(c.start,n),min:r,max:o,greedy:a,element:c};l.elements.push(x),c.parent=x}onLookaroundAssertionEnter(t,n,r){const o=this._node;if(o.type!=="Alternative")throw new Error("UnknownError");const a=this._node={type:"Assertion",parent:o,start:t,end:t,raw:"",kind:n,negate:r,alternatives:[]};o.elements.push(a)}onLookaroundAssertionLeave(t,n){const r=this._node;if(r.type!=="Assertion"||r.parent.type!=="Alternative")throw new Error("UnknownError");r.end=n,r.raw=this.source.slice(t,n),this._node=r.parent}onEdgeAssertion(t,n,r){const o=this._node;if(o.type!=="Alternative")throw new Error("UnknownError");o.elements.push({type:"Assertion",parent:o,start:t,end:n,raw:this.source.slice(t,n),kind:r})}onWordBoundaryAssertion(t,n,r,o){const a=this._node;if(a.type!=="Alternative")throw new Error("UnknownError");a.elements.push({type:"Assertion",parent:a,start:t,end:n,raw:this.source.slice(t,n),kind:r,negate:o})}onAnyCharacterSet(t,n,r){const o=this._node;if(o.type!=="Alternative")throw new Error("UnknownError");o.elements.push({type:"CharacterSet",parent:o,start:t,end:n,raw:this.source.slice(t,n),kind:r})}onEscapeCharacterSet(t,n,r,o){const a=this._node;if(a.type!=="Alternative"&&a.type!=="CharacterClass")throw new Error("UnknownError");a.elements.push({type:"CharacterSet",parent:a,start:t,end:n,raw:this.source.slice(t,n),kind:r,negate:o})}onUnicodePropertyCharacterSet(t,n,r,o,a,l,c){const x=this._node;if(x.type!=="Alternative"&&x.type!=="CharacterClass")throw new Error("UnknownError");const f={type:"CharacterSet",parent:null,start:t,end:n,raw:this.source.slice(t,n),kind:r,strings:null,key:o};if(c){if(x.type==="CharacterClass"&&!x.unicodeSets||l||a!==null)throw new Error("UnknownError");x.elements.push(Object.assign(Object.assign({},f),{parent:x,strings:c,value:a,negate:l}))}else x.elements.push(Object.assign(Object.assign({},f),{parent:x,strings:c,value:a,negate:l}))}onCharacter(t,n,r){const o=this._node;if(o.type!=="Alternative"&&o.type!=="CharacterClass"&&o.type!=="StringAlternative")throw new Error("UnknownError");o.elements.push({type:"Character",parent:o,start:t,end:n,raw:this.source.slice(t,n),value:r})}onBackreference(t,n,r){const o=this._node;if(o.type!=="Alternative")throw new Error("UnknownError");const a={type:"Backreference",parent:o,start:t,end:n,raw:this.source.slice(t,n),ref:r,ambiguous:!1,resolved:$M};o.elements.push(a),this._backreferences.push(a)}onCharacterClassEnter(t,n,r){const o=this._node,a={type:"CharacterClass",parent:o,start:t,end:t,raw:"",unicodeSets:r,negate:n,elements:[]};if(o.type==="Alternative"){const l=Object.assign(Object.assign({},a),{parent:o});this._node=l,o.elements.push(l)}else if(o.type==="CharacterClass"&&o.unicodeSets&&r){const l=Object.assign(Object.assign({},a),{parent:o,unicodeSets:r});this._node=l,o.elements.push(l)}else throw new Error("UnknownError")}onCharacterClassLeave(t,n){const r=this._node;if(r.type!=="CharacterClass"||r.parent.type!=="Alternative"&&r.parent.type!=="CharacterClass")throw new Error("UnknownError");const o=r.parent;r.end=n,r.raw=this.source.slice(t,n),this._node=o;const a=this._expressionBufferMap.get(r);if(!a)return;if(r.elements.length>0)throw new Error("UnknownError");this._expressionBufferMap.delete(r);const l={type:"ExpressionCharacterClass",parent:o,start:r.start,end:r.end,raw:r.raw,negate:r.negate,expression:a};if(a.parent=l,r!==o.elements.pop())throw new Error("UnknownError");o.elements.push(l)}onCharacterClassRange(t,n){const r=this._node;if(r.type!=="CharacterClass")throw new Error("UnknownError");const o=r.elements,a=o.pop();if(!a||a.type!=="Character")throw new Error("UnknownError");if(!r.unicodeSets){const x=o.pop();if(!x||x.type!=="Character"||x.value!==Rn)throw new Error("UnknownError")}const l=o.pop();if(!l||l.type!=="Character")throw new Error("UnknownError");const c={type:"CharacterClassRange",parent:r,start:t,end:n,raw:this.source.slice(t,n),min:l,max:a};l.parent=c,a.parent=c,o.push(c)}onClassIntersection(t,n){var r;const o=this._node;if(o.type!=="CharacterClass"||!o.unicodeSets)throw new Error("UnknownError");const a=o.elements.pop(),l=(r=this._expressionBufferMap.get(o))!==null&&r!==void 0?r:o.elements.pop();if(!l||!a||l.type==="ClassSubtraction"||l.type!=="ClassIntersection"&&!uc(l)||!uc(a))throw new Error("UnknownError");const c={type:"ClassIntersection",parent:o,start:t,end:n,raw:this.source.slice(t,n),left:l,right:a};l.parent=c,a.parent=c,this._expressionBufferMap.set(o,c)}onClassSubtraction(t,n){var r;const o=this._node;if(o.type!=="CharacterClass"||!o.unicodeSets)throw new Error("UnknownError");const a=o.elements.pop(),l=(r=this._expressionBufferMap.get(o))!==null&&r!==void 0?r:o.elements.pop();if(!l||!a||l.type==="ClassIntersection"||l.type!=="ClassSubtraction"&&!uc(l)||!uc(a))throw new Error("UnknownError");const c={type:"ClassSubtraction",parent:o,start:t,end:n,raw:this.source.slice(t,n),left:l,right:a};l.parent=c,a.parent=c,this._expressionBufferMap.set(o,c)}onClassStringDisjunctionEnter(t){const n=this._node;if(n.type!=="CharacterClass"||!n.unicodeSets)throw new Error("UnknownError");this._node={type:"ClassStringDisjunction",parent:n,start:t,end:t,raw:"",alternatives:[]},n.elements.push(this._node)}onClassStringDisjunctionLeave(t,n){const r=this._node;if(r.type!=="ClassStringDisjunction"||r.parent.type!=="CharacterClass")throw new Error("UnknownError");r.end=n,r.raw=this.source.slice(t,n),this._node=r.parent}onStringAlternativeEnter(t){const n=this._node;if(n.type!=="ClassStringDisjunction")throw new Error("UnknownError");this._node={type:"StringAlternative",parent:n,start:t,end:t,raw:"",elements:[]},n.alternatives.push(this._node)}onStringAlternativeLeave(t,n){const r=this._node;if(r.type!=="StringAlternative")throw new Error("UnknownError");r.end=n,r.raw=this.source.slice(t,n),this._node=r.parent}}class HM{constructor(t){this._state=new WM(t),this._validator=new zM(this._state)}parseLiteral(t,n=0,r=t.length){this._state.source=t,this._validator.validateLiteral(t,n,r);const o=this._state.pattern,a=this._state.flags,l={type:"RegExpLiteral",parent:null,start:n,end:r,raw:t,pattern:o,flags:a};return o.parent=l,a.parent=l,l}parseFlags(t,n=0,r=t.length){return this._state.source=t,this._validator.validateFlags(t,n,r),this._state.flags}parsePattern(t,n=0,r=t.length,o=void 0){return this._state.source=t,this._validator.validatePattern(t,n,r,o),this._state.pattern}}const N8=256,sd=256,M8=24,GM=64;class i6 extends Error{}function qM(){return{remaining:1e5}}function Lr(e){if(--e.remaining<0)throw new i6("pattern validation work limit exceeded")}const Zs=new Map;function o6(e){const t=Zs.get(e);if(t!==void 0)return t;if(e.length>N8)return`pattern exceeds ${N8} characters`;if(!e.startsWith("^")||!e.endsWith("$"))return"pattern must be anchored with ^ and $";let n;try{const r=new HM({ecmaVersion:2024}).parsePattern(e,0,e.length,{unicode:!0}),o=new Map,a=(l,c)=>{if(c>M8)throw Error(`pattern depth exceeds ${M8}`);switch(l.type){case"Pattern":case"Group":case"CapturingGroup":if(l.type==="Group"&&l.modifiers)throw Error("pattern group modifiers are not supported");for(const x of l.alternatives)a(x,c+1);break;case"Alternative":for(const x of l.elements)a(x,c+1);break;case"Quantifier":if(l.min>sd||Number.isFinite(l.max)&&l.max>sd)throw Error(`pattern repetition must not exceed ${sd}`);a(l.element,c+1);break;case"Assertion":if(l.kind==="lookbehind")throw Error("pattern lookbehind is not supported");if(l.kind==="lookahead")for(const x of l.alternatives)a(x,c+1);break;case"Character":case"CharacterSet":case"CharacterClass":o.set(l,new RegExp(`^(?:${l.raw})$`,"u"));break;default:throw Error(`pattern ${l.type} is not supported`)}};a(r,0),n={root:r,atoms:o}}catch(r){n=r instanceof SyntaxError?"pattern has invalid Unicode syntax":r.message}return Zs.size>=GM&&Zs.delete(Zs.keys().next().value),Zs.set(e,n),n}function KM(e){if(typeof e!="string")return"pattern must be a string";const t=o6(e);return typeof t=="string"?t:null}function XM(e,t,n){const r=o6(e);if(typeof r=="string")throw Error(r);const o=Array.from(t),a=(m,h)=>{Lr(n),m.add(h)},l=(m,h)=>{for(const E of h)a(m,E)},c=(m,h)=>{const E=new Set;for(const C of m)Lr(n),l(E,f(C,h));return E},x=(m,h)=>{const E=new Set;for(const C of h)Lr(n),l(E,f(m,C));return E},f=(m,h)=>{switch(Lr(n),m.type){case"Pattern":case"Group":case"CapturingGroup":return c(m.alternatives,h);case"Alternative":{let E=new Set([h]);for(const C of m.elements)if(Lr(n),E=x(C,E),!E.size)break;return E}case"Quantifier":{let E=new Set([h]);for(let y=0;y<m.min;y++)if(Lr(n),E=x(m.element,E),!E.size)return E;const C=new Set;l(C,E);for(let y=m.min;y<m.max&&E.size;y++){Lr(n);const w=x(m.element,E);if(m.max===1/0)for(const B of w)Lr(n),C.has(B)&&w.delete(B);l(C,w),E=w}return C}case"Assertion":{let E;if(m.kind==="start")E=h===0;else if(m.kind==="end")E=h===o.length;else if(m.kind==="word"){const C=y=>y!==void 0&&/^[a-zA-Z0-9_]$/.test(y);E=C(o[h-1])!==C(o[h])!==m.negate}else if(m.kind==="lookahead")E=c(m.alternatives,h).size>0!==m.negate;else throw Error("unsupported assertion");return new Set(E?[h]:[])}default:{const E=r.atoms.get(m);return new Set(h<o.length&&E.test(o[h])?[h+1]:[])}}};for(let m=0;m<=o.length;m++)if(Lr(n),f(r.root,m).size>0)return!0;return!1}const YM=new Set(["type","title","description","default","enum","const","minimum","maximum","minLength","maxLength","pattern","properties","required","items","minItems","maxItems","additionalProperties","anyOf","uniqueItems"]),I8=6,L8=64,O8=12,z8=2048,V8=64*1024;function Ho(e,t=0,n={value:0}){if(t>I8)return`Schema depth exceeds ${I8}`;if(n.value++,n.value>L8)return`Schema exceeds ${L8} controls`;const r=Object.keys(e).find(a=>!YM.has(a));if(r)return`Unsupported JSON Schema keyword: ${r}`;if(e.title!==void 0&&typeof e.title!="string")return"title must be a string";if(e.description!==void 0&&typeof e.description!="string")return"description must be a string";if(e.enum!==void 0&&(!Array.isArray(e.enum)||e.enum.length===0))return"enum must be a non-empty array";const o=e.type;if(o===void 0&&e.enum===void 0&&!Object.hasOwn(e,"const")&&e.anyOf===void 0)return"An explicit type, enum, or const is required";if(e.anyOf!==void 0){if(!Array.isArray(e.anyOf)||e.anyOf.length===0)return"anyOf must be a non-empty array of schemas";for(let a=0;a<e.anyOf.length;a++){const l=e.anyOf[a];if(!l||typeof l!="object"||Array.isArray(l))return`anyOf[${a}] must be a schema object`;const c=Ho(l,t+1,n);if(c)return`anyOf[${a}]: ${c}`}}if(e.uniqueItems!==void 0){if(typeof e.uniqueItems!="boolean")return"uniqueItems must be boolean";if(o!=="array")return"uniqueItems requires array type"}if(o!==void 0&&(typeof o!="string"||!["object","array","string","number","integer","boolean","null"].includes(o)))return`Unsupported JSON Schema type: ${String(o)}`;for(const a of["minimum","maximum"])if(e[a]!==void 0&&(typeof e[a]!="number"||!Number.isFinite(e[a])))return`${a} must be a finite number`;for(const a of["minLength","maxLength","minItems","maxItems"])if(e[a]!==void 0&&(typeof e[a]!="number"||!Number.isInteger(e[a])||e[a]<0))return`${a} must be a non-negative integer`;if((e.minimum!==void 0||e.maximum!==void 0)&&o!=="number"&&o!=="integer")return"minimum/maximum require a numeric type";if((e.minLength!==void 0||e.maxLength!==void 0)&&o!=="string")return"minLength/maxLength require string type";if(e.pattern!==void 0){if(o!=="string")return"pattern requires a string type";const a=KM(e.pattern);if(a)return a}if((e.minItems!==void 0||e.maxItems!==void 0)&&o!=="array")return"minItems/maxItems require array type";if(e.additionalProperties!==void 0){if(o!=="object")return"additionalProperties requires an object type";if(e.additionalProperties===!0)return"additionalProperties: true is not supported";if(e.additionalProperties!==!1)return e.additionalProperties&&typeof e.additionalProperties=="object"&&!Array.isArray(e.additionalProperties)?"Schema-valued additionalProperties is not supported":"additionalProperties must be false"}if((e.properties!==void 0||e.required!==void 0)&&o!=="object")return"properties/required require object type";if(e.items!==void 0&&o!=="array")return"items requires array type";if(o==="object"){const a=e.properties;if(a!==void 0&&(!a||typeof a!="object"||Array.isArray(a)))return"properties must be an object";if(e.required!==void 0&&(!Array.isArray(e.required)||e.required.some(l=>typeof l!="string")))return"required must be an array of property names";for(const l of Object.values(a??{})){if(!l||typeof l!="object"||Array.isArray(l))return"property schema must be an object";const c=Ho(l,t+1,n);if(c)return c}}return o==="array"&&e.items!==void 0?!e.items||typeof e.items!="object"||Array.isArray(e.items)?"items must be one schema object":Ho(e.items,t+1,n):null}function ru(e,t){if(e===t)return!0;if(e===null||t===null||typeof e!="object"||typeof t!="object")return!1;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((o,a)=>ru(o,t[a]));const n=Object.keys(e).sort(),r=Object.keys(t).sort();return n.length===r.length&&n.every((o,a)=>o===r[a]&&ru(e[o],t[o]))}function QM(e,t){let n=0;const r=(a,l)=>{if(l>O8)return`${t} exceeds depth ${O8}`;if(n++,n>z8)return`${t} exceeds ${z8} JSON values`;if(a===null||typeof a!="object")return null;for(const c of Array.isArray(a)?a:Object.values(a)){const x=r(c,l+1);if(x)return x}return null},o=r(e,0);return o||(new TextEncoder().encode(JSON.stringify(e)).byteLength>V8?`${t} exceeds ${V8} UTF-8 bytes`:null)}function Sc(e,t,n,r){if(Array.isArray(e.anyOf)&&!e.anyOf.some(o=>Sc(o,t,n,r)===null))return`${n} must match at least one anyOf alternative`;if(Object.hasOwn(e,"const")&&!ru(e.const,t))return`${n} must use the fixed value`;if(Array.isArray(e.enum)&&!e.enum.some(o=>ru(o,t)))return`${n} is not an allowed value`;if(e.type==="null")return t===null?null:`${n} must be null`;if(e.type==="boolean")return typeof t=="boolean"?null:`${n} must be boolean`;if(e.type==="string")return typeof t!="string"?`${n} must be text`:typeof e.minLength=="number"&&Array.from(t).length<e.minLength?`${n} is too short`:typeof e.maxLength=="number"&&Array.from(t).length>e.maxLength?`${n} is too long`:e.pattern!==void 0&&!XM(e.pattern,t,r)?`${n} does not match the required format`:null;if(e.type==="number"||e.type==="integer")return typeof t!="number"||!Number.isFinite(t)?`${n} must be a finite number`:e.type==="integer"&&!Number.isInteger(t)?`${n} must be an integer`:typeof e.minimum=="number"&&t<e.minimum?`${n} is below the minimum`:typeof e.maximum=="number"&&t>e.maximum?`${n} is above the maximum`:null;if(e.type==="array"){if(!Array.isArray(t))return`${n} must be an array`;if(typeof e.minItems=="number"&&t.length<e.minItems)return`${n} has too few items`;if(typeof e.maxItems=="number"&&t.length>e.maxItems)return`${n} has too many items`;if(e.uniqueItems===!0){const o=new Set;for(const a of t){const l=yf(a);if(o.has(l))return`${n} must contain unique items`;o.add(l)}}if(e.items&&typeof e.items=="object"&&!Array.isArray(e.items))for(let o=0;o<t.length;o++){const a=Sc(e.items,t[o],`${n}[${o}]`,r);if(a)return a}return null}if(e.type==="object"){if(!t||typeof t!="object"||Array.isArray(t))return`${n} must be an object`;const o=e.properties??{};for(const l of Object.keys(t))if(e.additionalProperties===!1&&!Object.hasOwn(o,l))return`${n}.${l||"(empty key)"} is not declared by the schema`;const a=Array.isArray(e.required)?e.required:[];for(const l of a)if(!Object.hasOwn(t,l))return`${n}.${l||"(empty key)"} is required`;for(const[l,c]of Object.entries(o)){if(!Object.hasOwn(t,l))continue;const x=Sc(c,t[l],`${n}.${l||"(empty key)"}`,r);if(x)return x}}return null}function iu(e,t,n="Arguments"){const r=Ho(e);if(r)return`${n} cannot be validated safely: ${r}`;try{return QM(t,n)??Sc(e,t,n,qM())}catch(o){if(o instanceof i6)return`${n} cannot be validated safely: ${o.message}`;throw o}}function yf(e){return e===null||typeof e!="object"?JSON.stringify(e):Array.isArray(e)?`[${e.map(yf).join(",")}]`:`{${Object.keys(e).sort().map(t=>`${JSON.stringify(t)}:${yf(e[t])}`).join(",")}}`}function em(e){if(e.type!==void 0)return e.type;if(Array.isArray(e.anyOf)&&e.anyOf.length){const t=e.anyOf.map(n=>em(n));if(t.every(n=>n===t[0])&&["string","number","integer","boolean","null"].includes(String(t[0])))return t[0]}}function to(e){if(Object.hasOwn(e,"const"))return e.const;if(e.default!==void 0)return e.default;if(Array.isArray(e.enum)&&e.enum.length)return e.enum[0];if(Array.isArray(e.anyOf)&&e.anyOf.length&&!e.type)return to(e.anyOf[0]);if(e.type==="object"){const t=Object.create(null),n=new Set(Array.isArray(e.required)?e.required.filter(r=>typeof r=="string"):[]);for(const[r,o]of Object.entries(e.properties??{})){const a=o;(n.has(r)||a.default!==void 0)&&(t[r]=to(a))}return t}return e.type==="array"?[]:e.type==="boolean"?!1:e.type==="number"||e.type==="integer"?0:e.type==="null"?null:""}function U8(e,t){return typeof e.title=="string"&&e.title?e.title:t||"(empty key)"}function $8(e,t,n){const r=Object.create(null);for(const[o,a]of Object.entries(e))r[o]=a;return r[t]=n,r}function JM(e,t){const n=Object.create(null);for(const[r,o]of Object.entries(e))r!==t&&(n[r]=o);return n}function W8(e){const{schema:t,label:n,path:r,value:o,required:a,description:l,arrayOnly:c,onChange:x,onValidityChange:f}=e,m=A.useId().replace(/[^a-zA-Z0-9_-]/g,""),E=`command-json-${r.replace(/[^a-zA-Z0-9_-]+/g,"-").replace(/^-|-$/g,"")||"root"}-${m}-help`,[C,y]=A.useState(()=>JSON.stringify(o,null,2)),[w,B]=A.useState(null),F=A.useRef(JSON.stringify(o));A.useEffect(()=>{const D=JSON.stringify(o);D!==F.current&&(F.current=D,y(JSON.stringify(o,null,2)),B(null),f(r,null))},[f,r,o]),A.useEffect(()=>()=>f(r,null),[f,r]);const b=D=>{y(D);let S;try{S=JSON.parse(D)}catch{const P=`${n} must contain valid JSON`;B(P),f(r,P);return}if(c&&!Array.isArray(S)){const P=`${n} must be a JSON array`;B(P),f(r,P);return}const k=iu(t,S,n);B(k),f(r,k),F.current=JSON.stringify(S),x(S)};return d.jsxs("label",{className:"command-field",children:[d.jsxs("span",{children:[n,a?" *":""]}),d.jsx("textarea",{value:C,rows:3,"aria-describedby":E,"aria-invalid":w?"true":void 0,onChange:D=>b(D.target.value)}),d.jsx("small",{id:E,children:l??(c?"JSON array":"JSON value matching any allowed alternative")}),w&&d.jsx("span",{className:"command-field-error",role:"alert",children:w})]})}function ZM(e){const{schema:t,label:n,path:r,value:o,required:a,description:l,numeric:c,onChange:x,onValidityChange:f}=e,m=iu(t,o,n);return A.useEffect(()=>(f(r,m),()=>f(r,null)),[m,f,r]),d.jsxs("label",{className:"command-field",children:[d.jsxs("span",{children:[n,a?" *":""]}),d.jsx("input",{type:c?"number":"text",value:String(o??""),min:typeof t.minimum=="number"?t.minimum:void 0,max:typeof t.maximum=="number"?t.maximum:void 0,step:em(t)==="integer"?1:c?"any":void 0,required:a,"aria-invalid":m?"true":void 0,onChange:h=>x(c?Number(h.target.value):h.target.value)}),l&&d.jsx("small",{children:l}),m&&d.jsx("span",{className:"command-field-error",role:"alert",children:m})]})}function s6(e){const{schema:t,name:n,path:r,value:o,required:a,onChange:l,onValidityChange:c}=e,x=U8(t,n),f=typeof t.description=="string"?t.description:void 0;if(Object.hasOwn(t,"const"))return d.jsxs("div",{className:"command-field",children:[d.jsxs("span",{children:[x,a?" *":""]}),d.jsxs("small",{children:["Fixed value: ",JSON.stringify(t.const)]})]});if(Array.isArray(t.enum))return d.jsxs("label",{className:"command-field",children:[d.jsxs("span",{children:[x,a?" *":""]}),d.jsx("select",{value:JSON.stringify(o),onChange:E=>l(JSON.parse(E.target.value)),children:t.enum.map((E,C)=>d.jsx("option",{value:JSON.stringify(E),children:String(E)},C))}),f&&d.jsx("small",{children:f})]});const m=em(t);if(t.anyOf&&(m===void 0||m==="object"||m==="array"))return d.jsx(W8,{schema:t,label:x,path:r,value:o,required:a,description:f,onChange:l,onValidityChange:c});if(m==="object"){const E=o&&typeof o=="object"&&!Array.isArray(o)?o:{},C=new Set(Array.isArray(t.required)?t.required.filter(y=>typeof y=="string"):[]);return d.jsxs("fieldset",{className:"command-object",children:[d.jsx("legend",{children:x}),f&&d.jsx("p",{children:f}),Object.entries(t.properties??{}).map(([y,w])=>{const B=w,F=Object.hasOwn(E,y),b=U8(B,y),D=`${r}.${y||"(empty key)"}`;return!F&&!C.has(y)?d.jsxs("button",{type:"button",className:"linkbtn command-property-add",onClick:()=>l($8(E,y,to(B))),children:["Add ",b]},y):d.jsxs("div",{className:"command-property",children:[d.jsx(s6,{schema:B,name:y,path:D,value:F?E[y]:to(B),required:C.has(y),onValidityChange:c,onChange:S=>l($8(E,y,S))}),!C.has(y)&&d.jsx("button",{type:"button",className:"linkbtn command-property-remove","aria-label":`Remove ${b}`,onClick:()=>l(JM(E,y)),children:"Remove"})]},y)})]})}if(m==="array")return d.jsx(W8,{arrayOnly:!0,schema:t,label:x,path:r,value:o,required:a,description:f,onChange:l,onValidityChange:c});if(m==="boolean")return d.jsxs("label",{className:"command-check",children:[d.jsx("input",{type:"checkbox",checked:o===!0,onChange:E=>l(E.target.checked)})," ",x]});if(m==="null")return d.jsxs("div",{className:"command-field",children:[d.jsx("span",{children:x}),d.jsx("small",{children:"Null value"})]});const h=m==="number"||m==="integer";return d.jsx(ZM,{schema:t,label:x,path:r,value:o,required:a,description:f,numeric:h,onChange:l,onValidityChange:c})}function eI(e){const t=e.catalog.commands.find(D=>D.name===e.initialCommandName)??e.catalog.commands[0],[n,r]=A.useState(t?.name??""),o=e.catalog.commands.find(D=>D.name===n)??t,a=A.useMemo(()=>o?Ho(o.input_schema):null,[o]),[l,c]=A.useState(()=>t&&!a?to(t.input_schema):null),[x,f]=A.useState(""),[m,h]=A.useState("idle"),[E,C]=A.useState({}),y=A.useRef(0),w=A.useCallback((D,S)=>{C(k=>{if(S===null){if(!Object.hasOwn(k,D))return k;const P={...k};return delete P[D],P}return k[D]===S?k:{...k,[D]:S}})},[]),B=D=>{const S=e.catalog.commands.find(k=>k.name===D);r(D),c(S&&!Ho(S.input_schema)?to(S.input_schema):null),f(""),h("idle"),C({})},F=D=>{if(D.preventDefault(),!o||a||e.busy)return;const k=Object.values(E)[0]??iu(o.input_schema,l);if(k){f(`Validation denied: ${k}`),h("error");return}const P=++y.current,R=o,M=l;c(to(R.input_schema)),C({}),f(`Sending ${R.name}…`),h("pending"),e.onSend(R,M,crypto.randomUUID(),e.catalog.fingerprint).then(O=>{y.current===P&&(O.status==="failed"?(f(`${R.name} was refused before delivery.`),h("error")):O.status==="pending"?(f(`${R.name} delivery is pending.`),h("warning")):O.status==="indeterminate"||!O.wire_id?(f(`${R.name} delivery could not be confirmed.`),h("indeterminate")):(f(`${R.name} sent. Its result will appear in the conversation.`),h("success")))}).catch(()=>{y.current===P&&(f(`${R.name} could not be sent. You can try it again.`),h("error"))})},b=o&&!a?iu(o.input_schema,l):null;return d.jsxs("form",{noValidate:!0,className:"command-panel","aria-label":"Send a typed command",onSubmit:F,onKeyDown:D=>{D.key==="Escape"&&e.onClose()},children:[d.jsxs("div",{className:"command-panel-head",children:[d.jsxs("div",{className:"command-panel-recipient",children:[d.jsxs("strong",{children:["Commands for ",e.recipientName]}),d.jsxs("span",{className:"mono",title:e.catalog.recipient_cid,children:[e.catalog.recipient_cid.slice(0,12),"…"]})]}),d.jsx("button",{type:"button",className:"linkbtn",onClick:e.onRefresh,children:"Refresh"}),d.jsx("button",{type:"button",className:"icon-btn","aria-label":"Close commands",onClick:e.onClose,children:"×"})]}),e.catalog.commands.length===0?d.jsx("p",{role:"status",children:"This recipient does not advertise commands."}):d.jsxs(d.Fragment,{children:[d.jsxs("label",{className:"command-field",children:[d.jsx("span",{children:"Command"}),d.jsx("select",{autoFocus:!0,value:n,onChange:D=>B(D.target.value),children:e.catalog.commands.map(D=>d.jsx("option",{value:D.name,children:D.name},D.name))})]}),o?.description&&d.jsx("p",{children:o.description}),a?d.jsxs("div",{className:"banner error",role:"alert",children:["Cannot render this command safely: ",a]}):o&&d.jsx(s6,{schema:o.input_schema,name:"Arguments",path:"Arguments",value:l,onChange:c,onValidityChange:w},o.name),b?.includes("cannot be validated safely")&&!Object.values(E).some(D=>D.includes("cannot be validated safely"))&&d.jsx("div",{className:"banner error",role:"alert",children:b}),o&&d.jsx("button",{className:"btn primary",disabled:!!a||e.busy||!!b||Object.keys(E).length>0,children:"Send command"}),d.jsx("div",{className:`command-status ${m}`,"data-state":m,role:"status","aria-live":"polite",children:x})]})]})}const ia={type:"spring",stiffness:430,damping:38,mass:.72},H8=10,a6=56,tI=18,nI=650;function rI(e,t){return Math.abs(e)<H8&&Math.abs(t)<H8?"pending":Math.abs(e)>Math.abs(t)&&e>0?"drag":"reject"}function iI(e){const t=e.at(-1),n=t?e.slice(0,-1).reverse().find(r=>r.x!==t.x&&t.time-r.time<=100):void 0;return n&&t&&t.time>n.time?(t.x-n.x)/(t.time-n.time)*1e3:0}function oI(e,t){const n=iI(t);return n>=0&&(e>=a6||e>=tI&&n>=nI)}const vf="ours.chats.listMode",pa="recent";function l6(){try{return globalThis.localStorage}catch{return}}function sI(e=l6()){try{return e?.getItem(vf)==="identity"?"identity":pa}catch{return pa}}function aI(e,t=l6()){const n=e==="identity"?"identity":pa;try{return t?.setItem(vf,n),t?.getItem(vf)===n?n:pa}catch{return pa}}function Fa(e){return typeof e=="string"?e:""}function ou(e,t){const n=Fa(e),r=Fa(t),o=n.normalize().toLowerCase(),a=r.normalize().toLowerCase();return o<a?-1:o>a?1:n<r?-1:n>r?1:0}function lI(e,t){const n=Vc(Fa(t.activityAt))-Vc(Fa(e.activityAt));if(n!==0)return n;const r=ou(e.name,t.name);return r!==0?r:ou(e.id,t.id)}function Af(e){return[...e].sort(lI)}function G8(e){return e.contacts.length>0?Vc(Fa(e.contacts[0].activityAt)):0}function cI(e,t){const n=new Map,r=[];for(const a of e){const l=a.root||(t?.[a.id]?a.id:null);if(!l){r.push(a);continue}const c=t?.[l]||{label:l,note:""};let x=n.get(l);x||(x={id:`root:${l}`,rootId:l,label:c.label,note:c.note,contacts:[]},n.set(l,x)),x.contacts.push(a)}const o=[...n.values()].map(a=>({...a,contacts:Af(a.contacts)}));return r.length>0&&o.push({id:"rootless",rootId:null,label:"Independent identities",note:"People, agents and apps without a verified Human/root group",contacts:Af(r)}),o.sort((a,l)=>{const c=G8(l)-G8(a);if(c!==0)return c;const x=ou(a.label,l.label);return x!==0?x:ou(a.id,l.id)})}const uI=15e3;function ad(e){const{c:t,active:n,grouped:r}=e,[o,a]=A.useState(!1),l=async(f,m)=>{if(!(!f||o)){a(!0);try{const h=await f();requestAnimationFrame(()=>{h?document.getElementById("chat-list-title")?.focus():m.focus()})}finally{a(!1)}}},c=d.jsxs(d.Fragment,{children:[!e.hideAvatar&&d.jsx("span",{className:"contact-avatar","aria-hidden":!0,children:t.initials}),d.jsxs("span",{className:"contact-copy",children:[d.jsxs("span",{className:"contact-row-topline",children:[d.jsx("span",{className:"contact-name",children:t.name}),e.category&&d.jsx("span",{className:"contact-category",children:e.category}),t.when&&d.jsx("span",{className:"contact-time",children:t.when})]}),d.jsxs("span",{className:"contact-row-bottomline",children:[d.jsx("span",{className:"contact-last",children:t.last}),t.status==="pending"&&d.jsx("span",{className:"chip",children:"pending approval"})]})]}),!!t.unread&&d.jsx("span",{className:"contact-unread",children:t.unread}),t.status==="pending"&&d.jsxs("span",{className:"pending-actions",role:"group","aria-label":`Decide whether to accept ${t.name}`,children:[d.jsx("button",{type:"button",className:"linkbtn",disabled:o,onClick:f=>void l(e.onApprove,f.currentTarget),children:"Approve"}),d.jsx("button",{type:"button",className:"linkbtn quiet",disabled:o,onClick:f=>void l(e.onReject,f.currentTarget),children:"Reject"})]}),n&&d.jsx(Xi.span,{className:"contact-active-glow",layoutId:"active-contact",transition:ia})]}),x="contact-row"+(n?" active":"")+(r?" grouped":"")+(t.status==="pending"?" pending":"");return t.status==="pending"?d.jsx("div",{className:x,"data-preview-id":e.previewId??t.id,children:c}):d.jsx(Xi.button,{type:"button",className:x,"aria-current":n||void 0,"data-preview-id":e.previewId??t.id,onClick:e.onClick,children:c})}function xI(e){const{contacts:t,roots:n,selected:r}=e,[o,a]=A.useState(""),l=A.useRef(null),c=A.useRef(null),[x,f]=A.useState(()=>sI()),m=b=>b.name.toLowerCase().includes(o.toLowerCase()),h=t.filter(b=>b.status!=="pending"&&m(b)),E=t.filter(b=>b.status==="pending"&&m(b)),C=Af(h),y=cI(h,n),w=h.length===0&&E.length===0,B=b=>{f(aI(b))},F=[{id:"recent",label:"Recent"},{id:"identity",label:"By identity"}];return A.useLayoutEffect(()=>{const b=l.current,D=c.current;if(!b||!D)return;const S=()=>b.style.setProperty("--list-bottom-chrome-height",`${D.getBoundingClientRect().height}px`);S();const k=new ResizeObserver(S);return k.observe(D),()=>{k.disconnect(),b.style.removeProperty("--list-bottom-chrome-height")}},[]),d.jsxs("div",{className:"listcol",ref:l,children:[d.jsxs("div",{className:"listcol-head",children:[d.jsxs("div",{className:"listcol-titlebar",children:[d.jsxs("h2",{id:"chat-list-title",className:"listcol-title messenger-lockup",tabIndex:-1,children:[d.jsx("span",{className:"messenger-brand-ours",children:"Ours"}),d.jsx("span",{className:"messenger-brand-product",children:"messenger"})]}),d.jsxs("div",{className:"listcol-actions",children:[d.jsx(nt,{className:"icon-btn desktop-invite","aria-label":"Invite",title:"Invite",onClick:e.onInvite,children:d.jsx(Fe,{name:"invite",size:18})}),d.jsx(Ff,{"aria-label":"Settings",title:"Settings",onClick:e.onSettings,children:d.jsx(Fe,{name:"settings",size:18})})]})]}),d.jsx(_3,{label:"Conversation list layout",value:x,options:F,onChange:b=>B(b)})]}),d.jsxs("div",{id:"conversation-list-panel",className:"listcol-scroll",role:"tabpanel","aria-labelledby":`conversation-list-${x}`,children:[x==="recent"&&C.length>0&&d.jsx("div",{className:"conversation-group",children:C.map(b=>d.jsx(ad,{hideAvatar:e.hideAvatars,category:e.category,c:b,active:r===b.id,onClick:()=>e.onSelect(b.id)},b.id))}),x==="identity"&&y.map(b=>d.jsxs("div",{children:[d.jsxs("div",{className:"group-label",title:b.note,children:[b.rootId&&d.jsx(Fe,{name:"clusters"}),d.jsx("span",{children:b.label}),b.note&&d.jsxs("span",{className:"gl-note",children:["· ",b.note]})]}),d.jsx("div",{className:"conversation-group",children:b.contacts.map(D=>d.jsx(ad,{hideAvatar:e.hideAvatars,category:e.category,c:D,grouped:b.rootId!==null,active:r===D.id,onClick:()=>e.onSelect(D.id)},D.id))})]},b.id)),E.length>0&&d.jsxs("div",{children:[d.jsx("div",{className:"group-label",children:d.jsx("span",{children:"Pending"})}),d.jsx("div",{className:"conversation-group",children:E.map(b=>d.jsx(ad,{hideAvatar:e.hideAvatars,category:e.category,c:b,active:!1,onClick:()=>{},onApprove:()=>e.onApprovePending(b.id.slice(8)),onReject:()=>e.onRejectPending(b.id.slice(8))},b.id))})]}),w&&d.jsx("p",{className:"muted",style:{padding:"14px 10px",fontSize:"0.85rem"},children:"No contacts yet — share an invite to start."})]}),d.jsxs("div",{className:"list-bottom-chrome",ref:c,children:[d.jsx(u1,{value:o,onChange:a,placeholder:"Search people, agents, apps…"}),d.jsx("button",{type:"button",className:"icon-btn list-bottom-invite","aria-label":"Invite",title:"Invite",onClick:e.onInvite,children:d.jsx(Fe,{name:"invite",size:20})})]})]})}function dI(e){const[t,n]=A.useState(!1),[r,o]=A.useState(e.contact.name),[a,l]=A.useState(!1),[c,x]=A.useState(null),f=A.useRef(!1);A.useEffect(()=>{const h=E=>{E.key!=="Escape"||a||c||t||(E.preventDefault(),e.onBack())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[t,c,e.onBack,a]);const m=()=>{if(f.current)return;f.current=!0;const h=r.trim();h&&h!==e.contact.name?e.onRename(h):o(e.contact.name),n(!1)};return d.jsxs("div",{className:"detail contact-screen",children:[d.jsxs("div",{className:"detail-head contact-screen-head",children:[d.jsx("button",{type:"button",className:"icon-btn detail-back contact-back","aria-label":"Back to conversation",onClick:e.onBack,children:d.jsx(Fe,{name:"back"})}),d.jsx("strong",{children:"Contact"})]}),d.jsxs("div",{className:"contact-screen-scroll",children:[d.jsxs("section",{className:"contact-hero","aria-labelledby":"contact-screen-name",children:[d.jsx("div",{className:"avatar accent contact-avatar-large","aria-hidden":!0,children:e.contact.initials}),t?d.jsx("input",{id:"contact-screen-name",className:"field contact-name-input",value:r,autoFocus:!0,onChange:h=>o(h.target.value),onBlur:m,onKeyDown:h=>{h.key==="Enter"&&m(),h.key==="Escape"&&(f.current=!0,o(e.contact.name),n(!1))}}):d.jsx("h2",{id:"contact-screen-name",children:e.contact.name}),d.jsxs("p",{children:[d.jsx(Fe,{name:"lock",size:13})," End-to-end encrypted connection"]})]}),d.jsxs("section",{className:"contact-action-group","aria-label":"Contact actions",children:[d.jsxs("button",{type:"button",onClick:()=>l(!0),children:[d.jsxs("span",{children:[d.jsx(Fe,{name:"paperclip"}),"Shared photos, files, and links"]}),d.jsx(Fe,{name:"chevron"})]}),d.jsxs("button",{type:"button",onClick:()=>{f.current=!1,o(e.contact.name),n(!0)},children:[d.jsxs("span",{children:[d.jsx(Fe,{name:"edit"}),"Rename contact"]}),d.jsx(Fe,{name:"chevron"})]})]}),d.jsxs("section",{className:"contact-identity","aria-labelledby":"contact-identity-title",children:[d.jsx("h3",{id:"contact-identity-title",children:"Verified identity"}),e.contact.roleId&&d.jsxs("p",{children:["Role ",d.jsx("strong",{children:e.contact.roleId})," of ",d.jsx("strong",{children:e.contact.rootName})]}),d.jsx("code",{children:e.contact.id}),d.jsxs("button",{type:"button",className:"btn sm",onClick:()=>void navigator.clipboard.writeText(e.contact.id),children:[d.jsx(Fe,{name:"copy",size:14}),"Copy identity"]})]}),d.jsxs("button",{type:"button",className:"contact-remove",onClick:e.onRemove,children:[d.jsx(Fe,{name:"trash"}),"Remove contact"]})]}),a&&d.jsx(yN,{messages:e.messages,indexOffset:e.indexOffset,onClose:()=>l(!1),onJump:e.onOpenMessage,onPreview:h=>{l(!1),x(h)}}),c&&(Ia(c.filename,c.mime)?d.jsx(R2,{rec:c,onClose:()=>x(null)}):d.jsx(T2,{rec:c,onClose:()=>x(null),onSendText:e.onSendText,onSendFile:e.onSendFile}))]})}const bc=e=>`chat-message-${encodeURIComponent(e)}`,c6=()=>typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function ld(e){const{dir:t,canReply:n,onReply:r}=e,o=A.useRef(null),a=A.useRef(null),l=A.useRef(null),c=A.useRef(r);c.current=r;const x=t==="in"?1:-1,f=a6,m=84,h=()=>({id:-1,x0:0,y0:0,mode:"idle",armed:!1,distance:0,samples:[]}),E=A.useRef(h()),C=b=>{const D=a.current,S=l.current,k=c6();if(D&&(D.style.transform=b&&!k?`translateX(${b}px)`:""),S){const P=Math.min(1,Math.abs(b)/f);S.style.opacity=String(P),S.style.transform=k?"scale(1)":`scale(${.5+.5*P})`}},y=(b,D)=>{const S=E.current;if(S.id!==b)return;const k=D&&S.mode==="drag"&&oI(S.distance,S.samples);E.current=h(),a.current?.classList.remove("swiping"),l.current?.classList.remove("armed"),C(0);const P=o.current;P?.hasPointerCapture?.(b)&&P.releasePointerCapture(b),k&&c.current()};A.useEffect(()=>{const b=o.current;if(!b)return;const D=S=>y(S.pointerId,!1);return b.addEventListener("lostpointercapture",D),()=>{b.removeEventListener("lostpointercapture",D);const S=E.current.id;S!==-1&&y(S,!1)}},[]);const w=b=>{const D=b.target,S=window.getSelection?.();!n||!b.isPrimary||b.pointerType==="mouse"||b.pointerType==="pen"&&b.button!==0||E.current.id!==-1||S&&!S.isCollapsed||D.closest('a, button, input, textarea, select, [role="button"], audio, video, img, [draggable="true"], .filecard, .filecard-bubble, .image-bubble, .voice-bubble, .ours-message-file, .attachment')||(E.current={id:b.pointerId,x0:b.clientX,y0:b.clientY,mode:"maybe",armed:!1,distance:0,samples:[{x:b.clientX*x,time:b.timeStamp}]},C(0))},B=b=>{const D=E.current;if(D.id!==b.pointerId||D.mode==="idle")return;const S=b.clientX-D.x0,k=b.clientY-D.y0,P=window.getSelection?.();if(P&&!P.isCollapsed){y(b.pointerId,!1);return}if(D.mode==="maybe"){const V=rI(S*x,k);if(V==="pending")return;if(V==="drag")D.mode="drag",b.currentTarget.setPointerCapture?.(b.pointerId),a.current?.classList.add("swiping");else{D.mode="idle";return}}b.preventDefault();const R=b.timeStamp;D.samples.push({x:b.clientX*x,time:R}),D.samples=D.samples.filter(V=>R-V.time<=120);let M=S*x;M<0&&(M=0),M>f&&(M=f+(M-f)*.35),M=Math.min(M,m),D.distance=M;const O=M*x,T=Math.abs(O)>=f;T!==D.armed&&(D.armed=T,l.current?.classList.toggle("armed",T),T&&navigator.vibrate?.(10)),C(O)},F=b=>{const D=E.current;D.id===b.pointerId&&D.mode==="drag"&&(D.samples.push({x:b.clientX*x,time:b.timeStamp}),D.distance=Math.max(0,(b.clientX-D.x0)*x),D.armed=D.distance>=f),y(b.pointerId,!0)};return d.jsxs("div",{ref:o,className:"msg-row "+(e.rowClass??t),style:n?{touchAction:"pan-y"}:void 0,onPointerDown:w,onPointerMove:B,onPointerUp:F,onPointerCancel:b=>y(b.pointerId,!1),onLostPointerCapture:b=>y(b.pointerId,!1),children:[n&&d.jsx("span",{className:"swipe-cue",ref:l,"aria-hidden":!0,children:d.jsx(Fe,{name:"reply",size:16})}),d.jsx("div",{className:"bubble-wrap",ref:a,children:e.children}),e.after]})}const fI=A.memo(function(t){const{messages:n,optimisticSend:r,sentKeys:o,hiddenEarlier:a,unreadWireId:l,roomLines:c,contactCid:x,contactName:f,onStartReply:m,onRevealMessage:h,onPreview:E,onFetchFile:C}=t,y=new Map;for(const k of n)k.wireId&&y.set(k.wireId,k);const w=k=>c.get(k)??null,B=k=>{if(k.dir==="out")return"You";const P=w(k);return P&&P.variant==="chat"?P.author:f},F=k=>{if(k.kind==="file")return k.mime?.startsWith("image/")?"Photo":Jo(k.mime??"",k.filename??"")?"Voice message":k.filename||"File";const P=w(k);return P?P.text||K3(P):k.text},b=k=>{if(!k.replyTo)return null;const P=y.get(k.replyTo.wireId);return P?{author:B(P),text:F(P)}:{author:"",text:"Original message"}},D=k=>{k.wireId&&m({wireId:k.wireId,author:B(k),text:F(k)})},S=k=>{if(!k)return null;const P=w(k);return P?P.variant==="system"?"room:system":`room:chat:${P.author}${P.role}`:k.dir};return d.jsx(Sk,{initial:!1,children:n.map((k,P)=>{const R=k===r?.message?r.key:k.wireId&&o.get(k.wireId)||k.wireId||`${k.date}-${a+P}`,M=bc(k.wireId||R),O=n[P-1],T=n[P+1],V=w(k),z=S(k),J=!!O&&S(O)===z&&z!=="room:system",H=!!T&&S(T)===z&&z!=="room:system",W=(k.dir==="out"?"out":"in")+(J?" cont-top":"")+(H?" cont-bot":""),re=k.wireId?d.jsx("button",{className:"msg-reply",title:"Reply",onClick:()=>D(k),children:d.jsx(Fe,{name:"reply",size:15})}):null,Z=b(k),K=Z&&k.replyTo?d.jsxs("button",{type:"button",className:"quote","aria-label":`Show original message${Z.author?` from ${Z.author}`:""}`,onClick:()=>h(k.replyTo.wireId),children:[Z.author&&d.jsx("span",{className:"quote-author",children:Z.author}),d.jsx("span",{className:"quote-text",children:Z.text})]}):null,ie=k.wireId===l?d.jsx("div",{id:`unread-${M}`,className:"unread-divider",role:"separator",children:d.jsx("span",{children:"Unread messages"})}):null;if(V&&V.variant==="system"){const j=V.presentation??"system";return d.jsxs(Xi.div,{className:"message-motion",id:M,initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0},transition:ia,children:[ie,d.jsxs("div",{className:`room-system room-${j}-card`,role:"note",children:[K,V.label&&d.jsx("span",{className:"room-system-label",children:V.label}),V.roomName&&d.jsx("strong",{className:"room-card-name",children:V.roomName}),d.jsx(F8,{text:V.text,className:"room-system-text message-markdown"}),!!V.details?.length&&d.jsx("ul",{className:"room-card-details","aria-label":"Room event details",children:V.details.map(I=>d.jsx("li",{children:I},I))}),d.jsxs("span",{className:"room-card-provenance",children:[V.authoredBy&&d.jsx("span",{className:"room-card-author",children:V.authoredBy}),d.jsx("span",{className:"room-system-at",children:Zi(k.date)})]})]})]},R)}if(k.kind==="file"){const j=fv(k.wireId)??{id:k.wireId,dir:k.dir,filename:k.filename??"file",mime:k.mime??"application/octet-stream",size:0,date:k.date};return d.jsxs(Xi.div,{className:"message-motion",id:M,initial:{opacity:0,y:12,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.98},transition:ia,children:[ie,d.jsx(ld,{dir:k.dir==="out"?"out":"in",rowClass:W,canReply:!!k.wireId,onReply:()=>D(k),after:re,children:d.jsxs(Nx,{outgoing:k.dir==="out",className:`ours-message ours-message-file ours-message--${k.dir}`,children:[K,d.jsx(Kj,{rec:j,receipt:k.receipt,receiptless:k.receiptless,onPreview:E,onFetch:C})]})})]},R)}if(k.typed){const j=k.typed.kind==="command_result"&&k.replyTo?y.get(k.replyTo.wireId):void 0,I=k.typed.kind==="command_result"&&k.dir==="in"&&k.peerCid===x&&j?.dir==="out"&&j.peerCid===x&&j.typed?.kind==="command",G=k.typed.kind==="command_result"&&!k.typed.outcome.ok?k.typed.outcome.error.toLowerCase():"",N=k.typed.kind==="command"?k.dir==="out"?"Accepted · pending result":"Received command":k.typed.kind==="unknown"?"Safe failure":k.dir==="out"?"Result sent":I?G==="validation_denied"||G==="validation_failed"?"Validation denied":G==="policy_denied"||G==="unauthorized"||G==="forbidden"?"Policy denied":k.typed.outcome.ok?"Completed":"Failed":"Unmatched result · safe failure",ae=k.typed.kind==="command"?k.typed.command:k.typed.kind==="command_result"?`Result for ${I&&j?.typed?.kind==="command"?j.typed.command:"unmatched command"}`:`Unsupported ${k.typed.wire_kind}`,Ee=k.typed.kind==="command"?k.typed.arguments:k.typed.kind==="command_result"?k.typed.outcome:{safe_failure:k.typed.malformed?"Malformed typed message":"Future typed message preserved"};return d.jsxs(Xi.div,{className:"message-motion",id:M,initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0},transition:ia,children:[ie,d.jsx(ld,{dir:k.dir,rowClass:W,canReply:!!k.wireId,onReply:()=>D(k),after:re,children:d.jsxs(Nx,{outgoing:k.dir==="out",className:`ours-message typed-message ours-message--${k.dir}`,children:[K,d.jsx("div",{className:"typed-message-kind",children:k.typed.kind==="command"?"Command":k.typed.kind==="command_result"?"Result":"Typed message"}),d.jsx("strong",{children:ae}),d.jsx("div",{className:"typed-message-state",role:"status",children:N}),d.jsx("pre",{children:JSON.stringify(Ee,null,2)}),d.jsxs("div",{className:"bubble-at",children:[Zi(k.date),k.dir==="out"&&d.jsx(ef,{receipt:k.receipt,receiptless:k.receiptless})]})]})})]},R)}return d.jsxs(Xi.div,{className:"message-motion",id:M,initial:{opacity:0,y:12,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.98},transition:ia,children:[ie,d.jsx(ld,{dir:k.dir==="out"?"out":"in",rowClass:W,canReply:!!k.wireId,onReply:()=>D(k),after:re,children:d.jsxs(Nx,{outgoing:k.dir==="out",className:`ours-message ours-message--${k.dir}`,children:[K,V&&!J&&d.jsxs(d.Fragment,{children:[V.roomName&&d.jsx("div",{className:"room-message-room",children:V.roomName}),d.jsxs("div",{className:"room-author",children:[d.jsx("span",{className:"room-author-name",children:V.author}),V.role&&d.jsx("span",{className:"room-author-role",children:V.role})]})]}),d.jsx(F8,{text:V?V.text:k.text}),d.jsxs("div",{className:"bubble-at",children:[Zi(k.date),k.dir==="out"&&d.jsx(ef,{receipt:k.receipt,receiptless:k.receiptless})]})]})})]},R)})})});function hI(e){const{contact:t,messages:n}=e,[r,o]=A.useState(""),[a,l]=A.useState(!1),[c,x]=A.useState(null),[f,m]=A.useState(null),[h,E]=A.useState(null),[C,y]=A.useState(null),[w,B]=A.useState(null),[F,b]=A.useState(!1),[D,S]=A.useState(!1),[k,P]=A.useState(!1),[R,M]=A.useState(null),[O,T]=A.useState(null),[V,z]=A.useState(!1),[J,H]=A.useState(!1),[W,re]=A.useState(!1),[Z,K]=A.useState(!1),[ie,j]=A.useState(!1),[I,G]=A.useState(null),[N,ae]=A.useState(null),Ee=A.useRef(null),se=A.useRef(null),xe=A.useRef(null),we=O?.recipient_cid===t?.id?O:null,et=/^\/[^\s/]*$/.test(r)&&W&&!V&&!Z&&!ie,Ie=et&&e.onSendCommand?we?.commands.filter(ne=>ne.name.toLowerCase().startsWith(r.slice(1).toLowerCase()))??[]:[],oe=JSON.stringify([t?.id,we?.fingerprint,r]),Me=I?.key===oe?Ie.findIndex(ne=>ne.name===I.name):-1,be=A.useRef(null),Ye=A.useRef(null),Je=A.useRef(null),Qe=A.useRef(null),yt=A.useRef(null),He=A.useRef(null),dt=A.useRef(null),ct=A.useRef(!1),Ke=A.useRef(null),Vt=A.useRef(!1),[tt,st]=A.useState(!1),[Y,le]=A.useState(0),je=A.useRef(null),De=A.useRef(!0),qe=A.useRef(null),Et=A.useRef(0),Rt=A.useRef(null),q=A.useRef(new Map),ve=A.useRef(0),he=A.useRef(null),Be=A.useRef(null),Le=A.useRef(0),Ce=A.useRef(null),lt=A.useRef(null),bt=A.useRef(null),vt=A.useRef(null),[ft,ht]=A.useState(null),[kt,te]=A.useState(""),me=A.useCallback(()=>{lt.current?.abort(),lt.current=null,vt.current!==null&&clearTimeout(vt.current),vt.current=null,bt.current?.classList.remove("reply-highlight"),bt.current=null,ht(null),te("")},[]);A.useLayoutEffect(()=>(me(),me),[t?.id,me]);const ze=A.useCallback(async ne=>{me();const fe=new AbortController;lt.current=fe;const Ae=Ke.current;he.current=null,Be.current=null,De.current=!1,Vt.current=!0,Rt.current=null,Ae&&Ae.scrollTo({top:Ae.scrollTop,behavior:"instant"}),window.location.hash.startsWith("#chat-message-")&&window.history.replaceState(window.history.state,"",window.location.pathname+window.location.search);const Ze=setTimeout(()=>{fe.abort(),te("Could not load the original message. Please try again.")},1e4);try{let Ut="found";const $t=document.getElementById(bc(ne));if((!$t||!Ae?.contains($t))&&(te("Finding original message…"),Ut=await e.onRevealMessage?.(ne,fe.signal)??"unavailable"),fe.signal.aborted)return;if(Ut!=="found"){te(Ut==="limit"?"Original message is beyond the search limit. Load earlier messages and try again.":"Original message is unavailable.");return}te(""),ht({wireId:ne,controller:fe})}catch{fe.signal.aborted||te("Could not load the original message. Please try again.")}finally{clearTimeout(Ze)}},[me,e.onRevealMessage]);A.useLayoutEffect(()=>{if(!ft)return;const ne=requestAnimationFrame(()=>{if(ft.controller.signal.aborted)return;const fe=document.getElementById(bc(ft.wireId)),Ae=Ke.current;if(!fe||!Ae?.contains(fe)){te("Original message is unavailable."),ht(null);return}Rt.current=null,De.current=!1;const Ze=fe.getBoundingClientRect(),Ut=Ae.getBoundingClientRect(),$t=Math.max(16,(Ae.clientHeight-Ze.height)/2);Ae.scrollTo({top:Ae.scrollTop+Ze.top-Ut.top-$t,behavior:"instant"}),fe.classList.remove("reply-highlight"),fe.offsetWidth,fe.classList.add("reply-highlight"),bt.current=fe,fe.setAttribute("tabindex","-1"),fe.focus({preventScroll:!0}),vt.current=setTimeout(()=>{fe.classList.remove("reply-highlight"),bt.current=null,vt.current=null},1500),ht(null),xr()});return()=>cancelAnimationFrame(ne)},[ft]),A.useLayoutEffect(()=>{const ne=yt.current,fe=He.current,Ae=dt.current;if(!ne||!fe||!Ae)return;let Ze=-1,Ut=-1,$t=null;const Mn=()=>{const at=Math.round(fe.getBoundingClientRect().height),In=Math.round(Ae.getBoundingClientRect().height);if(at!==Ze&&(Ze=at,ne.style.setProperty("--conversation-head-height",`${at}px`)),In!==Ut){const Nt=De.current;Ut=In,ne.style.setProperty("--conversation-compose-height",`${In}px`),Nt&&($t!==null&&cancelAnimationFrame($t),$t=requestAnimationFrame(()=>{$t=null;const br=Ke.current;br&&De.current&&(br.scrollTop=Math.max(0,br.scrollHeight-br.clientHeight))}))}};Mn();const dr=new ResizeObserver(Mn);return dr.observe(fe),dr.observe(Ae),()=>{dr.disconnect(),$t!==null&&cancelAnimationFrame($t),ne.style.removeProperty("--conversation-head-height"),ne.style.removeProperty("--conversation-compose-height")}},[t?.id]),A.useEffect(()=>{o(""),m(null),E(null),x(null),y(null),B(null),b(!1),S(!1),P(!1),Et.current+=1,M(null),be.current?.abort(),T(null),z(!1),H(!1),G(null),j(!1),K(!1),q.current.clear(),he.current=null,Be.current=null},[t?.id]);const We=async(ne=!0,fe=!0)=>{if(!t||!e.onLoadCommands)return;be.current?.abort();const Ae=new AbortController;be.current=Ae,H(!0),fe&&m(null);try{const Ze=await e.onLoadCommands(t.id,Ae.signal);!Ae.signal.aborted&&Ze.recipient_cid===t.id?(T(Ze),Ze.commands.length===0?(z(!1),V&&requestAnimationFrame(()=>Qe.current?.focus({preventScroll:!0}))):ne&&z(!0)):Ae.signal.aborted||(T(null),z(!1),fe&&m("Command discovery was refused because the authenticated recipient changed."))}catch(Ze){Ae.signal.aborted||(T(null),z(!1),fe&&m(Ze instanceof zc?`Command discovery failed: ${Ze.message}`:"Command discovery failed safely. The recipient may be offline or unsupported."))}finally{be.current===Ae&&H(!1)}};A.useEffect(()=>(We(!1,!1),()=>be.current?.abort()),[t?.id]);const Re=()=>{z(!1),Ye.current?.focus()},rt=A.useRef(We);rt.current=We,A.useEffect(()=>{if(!et||!e.onLoadCommands)return;let ne=!1,fe;const Ae=async()=>{await rt.current(!1,!1),ne||(fe=setTimeout(Ae,2e3))};return Ae(),()=>{ne=!0,clearTimeout(fe),be.current?.abort()}},[et,t?.id]),A.useEffect(()=>{xe.current?.querySelector('[aria-selected="true"]')?.scrollIntoView({block:"nearest",behavior:"instant"})},[Me,oe]);const Pt=()=>{Ee.current=null,ae(null)};A.useLayoutEffect(Pt,[et,oe]),A.useLayoutEffect(()=>{se.current!==null&&(Qe.current?.setSelectionRange(se.current,se.current),se.current=null)},[r]);const on=ne=>{if(!et||!Ie.some(Ae=>Ae.name===ne))return;const fe=`/${ne} `;se.current=fe.length,o(fe),G(null),j(!0),Pt(),Qe.current?.focus({preventScroll:!0})};A.useEffect(()=>{if(!h)return;const ne=h.reply?.wireId;n.some(Ae=>Ae.kind!=="file"&&Ae.dir==="out"&&!!Ae.wireId&&!h.wireIds.has(Ae.wireId)&&Ae.text===h.text&&(Ae.replyTo?.wireId??void 0)===ne)&&(E(null),m(null),o(Ae=>Ae===h.draft?"":Ae),y(Ae=>Ae===h.reply?null:Ae))},[n,h]);const Nn=!!c?.wireId&&n.some(ne=>ne.wireId===c.wireId),Lt=A.useMemo(()=>c&&!Nn?[...n,c.message]:n,[n,c,Nn]);A.useEffect(()=>{Nn&&x(null)},[Nn]);const Wr=ne=>{const fe=Ke.current;if(!fe)return;const Ae=Math.max(0,fe.scrollHeight-fe.clientHeight);if(Math.abs(fe.scrollTop-Ae)<1){he.current=null,Be.current=null;return}const Ze=ne&&!c6();he.current=Ze?Ae:null,Be.current=Ze?fe.scrollTop:null,Ze?fe.scrollTo({top:Ae,behavior:"smooth"}):fe.scrollTop=Ae},xr=()=>{je.current===null&&(je.current=requestAnimationFrame(()=>{je.current=null;const ne=Ke.current;if(!ne)return;const fe=ne.scrollHeight-ne.clientHeight-ne.scrollTop>48;st(fe),fe||le(0)}))};A.useLayoutEffect(()=>{if(!t){qe.current=null,De.current=!0,Le.current=0;return}const ne=Ke.current;if(!ne)return;const fe=qe.current!==t.id,Ae=Le.current,Ze=Lt.length!==Ae,Ut=Lt.at(-1),$t=Ut?Ut.wireId||`${Ut.date}:${Ut.text}`:null,Mn=Ce.current;if(Le.current=Lt.length,Ce.current=$t,!fe&&!Ze&&he.current===null&&(De.current=ne.scrollHeight-ne.clientHeight-ne.scrollTop<=48),fe||De.current)Wr(Ze&&!fe&&qe.current!==null),De.current=!0;else if(Ze&&Lt.length>Ae&&$t!==Mn){const dr=Mn===null?-1:Lt.findIndex(at=>(at.wireId||`${at.date}:${at.text}`)===Mn);le(at=>at+Math.max(1,Lt.length-Math.max(0,dr+1)))}qe.current=t.id,xr()},[t,Lt.length]),A.useLayoutEffect(()=>{if(Vt.current||!e.unreadOpen||window.location.hash.startsWith("#chat-message-"))return;const ne=Ke.current,fe=document.getElementById(`unread-${bc(e.unreadOpen.wireId)}`);!ne||!fe||(ne.scrollTop=Math.max(0,fe.offsetTop-16),De.current=!1,Vt.current=!0,xr())},[e.unreadOpen,Lt.length]),A.useLayoutEffect(()=>{const ne=window.location.hash;if(!ne.startsWith("#chat-message-"))return;const fe=document.getElementById(ne.slice(1));fe&&(fe.scrollIntoView({block:"center"}),De.current=!1)},[t?.id,Lt.length]),A.useLayoutEffect(()=>{const ne=Rt.current,fe=Ke.current;if(ne===null||!fe)return;const Ae=requestAnimationFrame(()=>{Rt.current===ne&&(fe.scrollTop=ne.top+fe.scrollHeight-ne.height,Rt.current=null)});return()=>cancelAnimationFrame(Ae)},[Lt.length]),A.useEffect(()=>{const ne=Ke.current;if(!ne||typeof ResizeObserver>"u")return;const fe=ne.firstElementChild;if(!fe)return;const Ae=new ResizeObserver(()=>{De.current&&Wr(he.current!==null),xr()});return Ae.observe(fe),Ae.observe(ne),()=>{Ae.disconnect(),je.current!==null&&cancelAnimationFrame(je.current)}},[t?.id]);const oo=async ne=>{const fe=++Et.current;m(null),P(!0);try{if(ne.size>na&&M2(ne.type,ne.name)){const Ze=await jN(ne,na);if(fe!==Et.current)return;B({filename:Ze.filename,mime:Ze.mime,bytes:Ze.bytes,originalSize:Ze.originalSize});return}if(ne.size>na){m(`"${ne.name}" is ${Zo(ne.size)} — files up to ${Zo(na)} can be sent.`);return}const Ae=await ne.arrayBuffer();if(fe!==Et.current)return;B({filename:ne.name||"file",mime:ne.type||"application/octet-stream",bytes:new Uint8Array(Ae)})}catch(Ae){fe===Et.current&&m(`Photo optimization failed: ${Ae instanceof Error?Ae.message:String(Ae)}`)}finally{fe===Et.current&&P(!1)}},Bu=()=>{!w||!e.onSendFile||D||(S(!0),e.onSendFile(w,C?.wireId).then(()=>{B(null),y(null)}).catch(ne=>m(`File send failed: ${String(ne)} — it was not delivered.`)).finally(()=>S(!1)))},cs=e.onDraftChange;A.useEffect(()=>(cs?.(r.trim().length>0||a),()=>cs?.(!1)),[r,a,cs]);const wu=A.useMemo(()=>{const ne=new Map;for(const fe of Lt)ne.set(fe,fe.kind==="file"?null:fe.dir==="in"?V3(t?.announcedName??"",fe.text):null);return ne},[Lt,t?.announcedName]);if(!t)return e.emptyOverride?d.jsx(d.Fragment,{children:e.emptyOverride}):d.jsx("div",{className:"detail",children:d.jsxs("div",{className:"detail-empty",children:[d.jsx(Fe,{name:"chat"}),d.jsxs("div",{children:[d.jsx("div",{style:{fontWeight:650,color:"var(--text-2)"},children:"Select a conversation"}),d.jsx("div",{style:{fontSize:"0.85rem"},children:"Chat with people, agents and apps across ours."})]})]})});const Yn=async()=>{const ne=r,fe=ne.trim(),Ae=!!h&&ne===h.draft&&(C?.wireId??void 0)===h.reply?.wireId;if(!fe||F||ct.current||Ae)return;h&&E(null),ct.current=!0,l(!0),m(null);const Ze=C,Ut=Ze?.wireId,$t=new AbortController;let Mn=!1,dr=0;o(""),y(null);const at=`optimistic-${++ve.current}`;x({key:at,wireId:null,message:{dir:"out",text:fe,date:new Date().toISOString(),read:!0,wireId:"",replyTo:Ut?{wireId:Ut}:null}});try{const In=await Promise.race([e.onSend(fe,Ut,$t.signal),new Promise((Nt,br)=>{dr=window.setTimeout(()=>{Mn=!0,$t.abort(),br(new Error("send timeout"))},uI)})]);In?(q.current.set(In,at),x(Nt=>Nt?.key===at?{...Nt,wireId:In}:Nt)):x(Nt=>Nt?.key===at?null:Nt),E(null)}catch(In){x(null),o(Nt=>Nt===""?ne:Nt),y(Nt=>Nt===null?Ze:Nt),Mn||!(In instanceof zc)?(E({draft:ne,text:fe,reply:Ze,wireIds:new Set(n.flatMap(Nt=>Nt.wireId?[Nt.wireId]:[]))}),m(`${Mn?"Send timed out":"Send connection was interrupted"} — delivery status is unknown. Check the conversation; edit the draft before sending again.`)):m(`Send failed: ${String(In)} — the message was not delivered.`)}finally{window.clearTimeout(dr),ct.current=!1,l(!1)}},us=!!h&&r===h.draft&&(C?.wireId??void 0)===h.reply?.wireId;return d.jsxs("div",{className:"detail detail-chat chat-canvas",ref:yt,children:[d.jsxs(S3,{className:"detail-head",ref:He,children:[d.jsxs("div",{className:"conv-peer",children:[d.jsxs("button",{className:"icon-btn detail-back","aria-label":"Back to conversations",onClick:e.onBack,children:[d.jsx(Fe,{name:"back"}),e.backAdornment]}),d.jsxs("div",{className:"conv-peer-status",children:[d.jsx("span",{className:"conv-peer-name",children:t.name}),e.syncing&&d.jsxs("div",{className:"conv-sync",role:"status","aria-live":"polite",children:[d.jsx("span",{className:"conv-sync-dot","aria-hidden":!0}),e.syncing==="connecting"?"Connecting…":"Updating…"]}),!e.syncing&&d.jsxs("span",{className:"conv-contact-status",children:[d.jsx(Fe,{name:"lock",size:11}),"Encrypted connection"]})]}),!e.hideContactAvatar&&d.jsx("button",{type:"button",className:"conv-contact-trigger conv-contact-avatar","data-contact-trigger":!0,onClick:e.onOpenContact,disabled:!e.onOpenContact,"aria-label":`Open contact details for ${t.name}`,children:d.jsx("span",{className:"conv-contact-initials","aria-hidden":!0,children:t.initials})}),e.headerActions]}),e.headerAccessory]}),d.jsx("div",{className:"messages",ref:Ke,tabIndex:-1,"aria-label":"Conversation timeline",onScroll:ne=>{const fe=ne.currentTarget,Ae=fe.scrollHeight-fe.clientHeight-fe.scrollTop;if(he.current!==null){const Ze=Be.current;if(Ze===null||fe.scrollTop>=Ze-1){Be.current=fe.scrollTop,Ae<=4&&(he.current=null,Be.current=null);return}he.current=null,Be.current=null}De.current=Ae<=48,xr()},onPointerDown:()=>{me(),he.current=null,Be.current=null},onTouchStart:()=>{me(),he.current=null,Be.current=null},onWheel:()=>{me(),he.current=null,Be.current=null},onKeyDown:ne=>{["ArrowUp","ArrowDown","PageUp","PageDown","Home","End"," ","Escape"].includes(ne.key)&&me()},onDragOver:ne=>{e.onSendFile&&ne.preventDefault()},onDrop:ne=>{if(!e.onSendFile)return;ne.preventDefault();const fe=ne.dataTransfer.files?.[0];fe&&oo(fe)},children:d.jsxs("div",{className:"messages-inner",children:[d.jsxs("div",{className:"e2e-note",children:[d.jsx(Fe,{name:"lock"}),"End-to-end encrypted · the broker only sees ciphertext"]}),(e.hiddenEarlier??0)>0&&e.onLoadEarlier&&d.jsxs("button",{className:"btn sm chat-load-earlier",onClick:()=>{De.current=!1;const ne=Ke.current;Rt.current=ne?{height:ne.scrollHeight,top:ne.scrollTop}:null,e.onLoadEarlier?.()},children:["Load earlier messages (",e.hiddenEarlier," remaining)"]}),d.jsx(fI,{messages:Lt,optimisticSend:c,sentKeys:q.current,hiddenEarlier:e.hiddenEarlier??0,unreadWireId:e.unreadOpen?.wireId,roomLines:wu,contactCid:t.id,contactName:t.name,onStartReply:y,onRevealMessage:ze,onPreview:M,onFetchFile:e.onFetchFile}),e.timelineFooter,d.jsx("div",{className:"thread-end","aria-hidden":!0})]})},t.id),tt&&d.jsxs("button",{type:"button",className:"jump-latest btn sm","aria-label":Y?`Jump to latest, ${Y} new messages`:"Jump to latest",onClick:ne=>{const fe=ne.currentTarget===document.activeElement;me(),le(0),Wr(!0),fe&&requestAnimationFrame(()=>Ke.current?.focus({preventScroll:!0}))},children:[d.jsx("span",{children:"Jump to latest"}),!!Y&&d.jsx("span",{className:"jump-latest-count","aria-live":"polite",children:Y})]}),kt&&d.jsx("div",{className:"banner",role:"status",children:kt}),f&&d.jsxs("div",{className:"banner error",role:"alert",children:[f,f.startsWith("Send failed:")&&d.jsx("span",{className:"banner-actions",children:d.jsx("button",{className:"linkbtn",onClick:()=>void Yn(),children:"retry"})})]}),d.jsx("div",{className:"composer-wrap",ref:dt,"data-app-update-busy":!!r.trim()||a||F||!!w||D||k||!!h,children:e.readOnlyNotice?d.jsx("div",{className:"composer-readonly",role:"status",children:e.readOnlyNotice}):d.jsxs(d.Fragment,{children:[V&&we&&e.onSendCommand&&d.jsx(eI,{catalog:we,recipientName:t.name,busy:J,onRefresh:()=>void We(!0,!0),onClose:Re,onSend:async(ne,fe,Ae,Ze)=>{if(!t||t.id!==we.recipient_cid)throw new Error("Recipient changed; refresh commands");return e.onSendCommand(t.id,ne.name,fe,Ae,Ze)}},`${we.recipient_cid}:${we.fingerprint}`),Ie.length>0&&d.jsx("div",{ref:xe,id:"composer-command-suggestions",className:"command-suggestions",role:"listbox","aria-label":"Suggested contact commands",onScroll:Pt,children:Ie.map((ne,fe)=>d.jsxs("div",{id:`composer-command-option-${fe}`,role:"option","aria-selected":fe===Me,className:"command-suggestion","data-pressed":N?.key===oe&&N.name===ne.name||void 0,onMouseDown:Ae=>{Ae.button===0&&Ae.preventDefault()},onPointerDown:Ae=>{!Ae.isPrimary||Ae.button!==0||(Ee.current={key:oe,name:ne.name},ae({key:oe,name:ne.name,pointer:Ae.pointerId,x:Ae.clientX,y:Ae.clientY}))},onPointerMove:Ae=>{N?.pointer===Ae.pointerId&&Math.hypot(Ae.clientX-N.x,Ae.clientY-N.y)>10&&Pt()},onPointerUp:()=>ae(null),onPointerCancel:Pt,onPointerLeave:Ae=>{Ae.buttons!==0&&Pt()},onClick:Ae=>{const Ze=Ee.current;Pt(),(Ae.detail===0||Ze?.key===oe&&Ze.name===ne.name)&&on(ne.name)},children:[d.jsxs("strong",{children:["/",ne.name]}),ne.description&&d.jsx("span",{children:ne.description})]},`${oe}:${ne.name}`))}),C&&d.jsxs("div",{className:"reply-bar",children:[d.jsx("div",{className:"reply-bar-line"}),d.jsxs("div",{className:"reply-bar-body",children:[d.jsxs("div",{className:"reply-bar-author",children:["Replying to ",C.author]}),d.jsx("div",{className:"reply-bar-text",children:C.text})]}),d.jsx("button",{className:"icon-btn",title:"Cancel reply",onClick:()=>y(null),children:d.jsx(Fe,{name:"close",size:16})})]}),w&&d.jsx(l2,{att:w,sending:D,onSend:Bu,onDiscard:()=>B(null)}),k&&d.jsx("div",{className:"attachment-processing",role:"status",children:"Optimizing photo for secure delivery…"}),d.jsxs(b3,{className:"composer"+(F?" recording":""),children:[e.onLoadCommands&&we&&we.commands.length>0&&d.jsx("button",{ref:Ye,type:"button",className:"icon-btn composer-tool command-trigger",title:"Recipient commands","aria-label":"Recipient commands","aria-expanded":V,disabled:J,onClick:()=>{V?Re():z(!0)},children:d.jsx(Fe,{name:"menu",size:19})}),e.onSendFile&&d.jsxs(d.Fragment,{children:[d.jsx("input",{ref:Je,type:"file",style:{display:"none"},onChange:ne=>{const fe=ne.target.files?.[0];fe&&oo(fe),ne.target.value=""}}),d.jsx("button",{className:"icon-btn composer-tool chat-attach",title:"Attach a file or photo",disabled:D||k||F,onClick:()=>Je.current?.click(),children:d.jsx(Fe,{name:"paperclip",size:18})})]}),e.onSendFile&&d.jsx(c2,{disabled:D||k||!!w,onReady:ne=>{b(!1),B(ne)},onError:ne=>{b(!1),m(ne)},onActiveChange:b},t.id),d.jsx(P3,{ref:Qe,className:"field",rows:1,placeholder:(C?"Reply to "+C.author:"Message "+t.name)+"…",value:r,"aria-busy":a,"aria-autocomplete":Ie.length?"list":void 0,"aria-controls":Ie.length?"composer-command-suggestions":void 0,"aria-activedescendant":Me>=0?`composer-command-option-${Me}`:void 0,onFocus:()=>re(!0),onBlur:()=>{re(!1),G(null)},onCompositionStart:()=>{K(!0),G(null)},onCompositionEnd:()=>K(!1),onChange:ne=>{o(ne.target.value),G(null),j(!1)},onKeyDown:ne=>{if(!(Z||ne.nativeEvent.isComposing||ne.keyCode===229)){if(Ie.length&&!ne.shiftKey&&!ne.altKey&&!ne.ctrlKey&&!ne.metaKey){if(ne.key==="ArrowDown"||ne.key==="ArrowUp"){ne.preventDefault();const fe=Me<0?ne.key==="ArrowDown"?0:Ie.length-1:(Me+(ne.key==="ArrowDown"?1:-1)+Ie.length)%Ie.length;G({key:oe,name:Ie[fe].name});return}if((ne.key==="Enter"||ne.key==="Tab")&&Me>=0){ne.preventDefault(),on(Ie[Me].name);return}if(ne.key==="Escape"){ne.preventDefault(),j(!0),G(null);return}}ne.key==="Enter"?!(window.matchMedia("(pointer: coarse)").matches||window.innerWidth<=860)&&!ne.shiftKey&&(ne.preventDefault(),Yn()):ne.key==="Escape"&&y(null)}}}),d.jsx("button",{className:"btn primary chat-send","aria-label":"Send",onPointerDown:ne=>{ne.button===0&&document.activeElement===Qe.current&&ne.preventDefault()},onClick:()=>void Yn(),disabled:a||F||us||!r.trim(),title:us?"Delivery status unknown — edit before sending again":void 0,children:d.jsx(xA,{className:"ic",size:20})})]})]})}),R&&(Ia(R.filename,R.mime)?d.jsx(R2,{rec:R,onClose:()=>M(null)}):d.jsx(T2,{rec:R,onClose:()=>M(null),onSendText:e.onSend,onSendFile:e.onSendFile}))]})}const u6=3;function mI(e,t,n=u6){return[t,...e.filter(r=>r.cid!==t.cid)].slice(0,n)}function pI(e,t){return e.filter(n=>n.id!==t)}const EI=6e3,gI=mI,CI=pI;function yI(){const[e,t]=A.useState([]),n=A.useRef(0),r=A.useCallback((l,c,x)=>{const f=Date.now(),m={id:`${l}:${f}:${n.current++}`,cid:l,name:c,preview:"",at:f};t(h=>gI(h,m,u6))},[]),o=A.useCallback(l=>t(c=>CI(c,l)),[]),a=A.useCallback(l=>t(c=>c.filter(x=>x.cid!==l)),[]);return{toasts:e,push:r,dismiss:o,clear:a}}function vI(e){const{item:t,onOpen:n,onDismiss:r}=e,[o,a]=A.useState(!1),[l,c]=A.useState(!1),x=o||l;return A.useEffect(()=>{if(x)return;const f=setTimeout(()=>r(t.id),EI);return()=>clearTimeout(f)},[t.id,x,r]),d.jsxs("div",{className:"banner msg",role:"status",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>c(!0),onBlur:f=>{f.currentTarget.contains(f.relatedTarget)||c(!1)},children:[d.jsxs("button",{className:"msg-open",title:`Open the conversation with ${t.name}`,onClick:()=>n(t.cid),children:[d.jsx("span",{className:"avatar sm accent","aria-hidden":"true",children:Jd(t.name)}),d.jsxs("span",{className:"msg-text",children:[d.jsx("strong",{className:"msg-name",children:t.name}),d.jsx("span",{className:"msg-preview",children:t.preview||"New message"})]})]}),d.jsx("button",{className:"icon-btn msg-close",title:"Dismiss","aria-label":`Dismiss the notification from ${t.name}`,onClick:()=>r(t.id),children:d.jsx(Fe,{name:"close",size:15})})]})}function AI(e){return d.jsx(d.Fragment,{children:e.items.map(t=>d.jsx(vI,{item:t,onOpen:e.onOpen,onDismiss:e.onDismiss},t.id))})}function BI(e){const t=A.useRef(null),{text:n,size:r=240}=e;return A.useEffect(()=>{if(!t.current||!n)return;const o=t.current;su(()=>import("./browser-B7y08DsC.js").then(a=>a.b),[],import.meta.url).then(a=>{a.toCanvas(o,n,{width:r,margin:2,errorCorrectionLevel:"M",color:{dark:"#000000",light:"#ffffff"}})})},[n,r]),d.jsx("div",{style:{display:"flex",justifyContent:"center",margin:"8px 0"},children:d.jsx("canvas",{ref:t,"data-testid":"qr-canvas","data-invite":n,width:r,height:r,style:{borderRadius:8,border:"1px solid var(--line)",imageRendering:"pixelated"}})})}function wI(e){const[t,n]=A.useState("generate"),[r,o]=A.useState("one_time"),[a,l]=A.useState(""),[c,x]=A.useState(null),[f,m]=A.useState("one_time"),[h,E]=A.useState(""),[C,y]=A.useState(""),[w,B]=A.useState(!1),[F,b]=A.useState(null),[D,S]=A.useState(null),[k,P]=A.useState(!1),[R,M]=A.useState(null),O=A.useRef(!1),T=async()=>{if(!O.current){O.current=!0,B(!0),S(null),b(null);try{m(r),x(await e.onCreate(r,r==="one_time"&&a.trim()||void 0))}catch(z){S(z instanceof Error?z.message:String(z))}finally{O.current=!1,B(!1)}}},V=d.jsx(N2,{className:"modal-tabs",label:"Invite mode",options:[{id:"generate",label:"Generate invite"},{id:"accept",label:"Accept invite"}],value:t,onChange:n,idPrefix:"invite-tab",panelId:"invite-panel"});return d.jsx(rs,{title:t==="generate"?"Invite a contact":"Accept an invite",onClose:()=>{O.current||e.onClose()},tabs:V,children:d.jsxs("div",{id:"invite-panel",role:"tabpanel","aria-labelledby":`invite-tab-${t}`,children:[t==="generate"&&!c&&d.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:13},children:[d.jsxs("p",{className:"muted","data-testid":"invite-identity",style:{margin:0,fontSize:"0.85rem"},children:["Creating as ",d.jsx("strong",{children:e.identity.name})," · ",d.jsxs("span",{className:"mono",children:["@",xv(e.identity.cid)]})]}),d.jsxs("div",{role:"radiogroup","aria-label":"Invite kind",style:{display:"flex",flexDirection:"column",gap:7},children:[d.jsxs("label",{children:[d.jsx("input",{type:"radio",name:"invite-kind",checked:r==="one_time",onChange:()=>o("one_time")})," One person (one time)"]}),d.jsxs("label",{children:[d.jsx("input",{type:"radio",name:"invite-kind",checked:r==="public",onChange:()=>o("public")})," Reusable public invite"]})]}),r==="one_time"?d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.9rem"},children:"Optionally name the person or agent this invite is for."}),d.jsx("input",{className:"field",value:a,onChange:z=>l(z.target.value),placeholder:"Their name (optional), e.g. Bob",maxLength:64})]}):d.jsx("p",{className:"onb-warning","data-testid":"public-invite-warning",style:{margin:0,fontSize:"0.9rem"},children:"Anyone with this invite can connect until you revoke it. It has no expiry and stays valid across server restarts."}),d.jsx("button",{className:"btn primary",style:{justifyContent:"center"},disabled:w,onClick:()=>void T(),children:w?"Generating…":r==="public"?"Create public invite":"Generate invite"}),r==="public"&&d.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[d.jsx("h4",{style:{margin:0,fontSize:"0.9rem"},children:"Active reusable invites"}),e.invites.filter(z=>z.mode==="public").length===0&&d.jsx("p",{className:"muted",style:{margin:0},children:"None right now."}),e.invites.filter(z=>z.mode==="public").map(z=>d.jsxs("div",{"data-testid":"public-invite-row",style:{padding:"8px 10px",background:"var(--inset)",borderRadius:7},children:[d.jsx("span",{className:"mono",children:z.invite_id}),d.jsxs("p",{className:"muted",children:["Created ",z.created?J3(z.created):"unknown"," · Active until revoked · No expiry"]}),R===z.invite_id?d.jsxs("span",{children:[d.jsx("button",{className:"btn sm danger",onClick:()=>void e.onRevoke(z.invite_id).then(()=>(M(null),e.onRefresh())).catch(J=>S(String(J))),children:"Confirm revoke"})," ",d.jsx("button",{className:"btn sm",onClick:()=>M(null),children:"Keep it"})]}):d.jsx("button",{className:"btn sm",onClick:()=>M(z.invite_id),children:"Revoke"})]},z.invite_id))]}),F&&d.jsx("p",{className:"muted",children:F}),D&&d.jsx("p",{className:"onb-error",children:D})]}),t==="generate"&&c&&d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"muted","data-testid":f==="public"?"public-result-note":void 0,children:f==="public"?"Shown only on this screen. Copy it now; the text cannot be recovered later. The invite stays active until revoked.":`Send this invite to ${a.trim()||"your contact"}. It can be redeemed once.`}),d.jsx("textarea",{className:"field mono","data-testid":"invite-result-text",readOnly:!0,rows:5,value:c,onFocus:z=>z.currentTarget.select()}),f==="one_time"&&d.jsx(BI,{text:c}),d.jsxs("button",{className:"btn primary",onClick:()=>void navigator.clipboard.writeText(c).then(()=>b("Copied to clipboard.")),children:[d.jsx(Fe,{name:"copy",size:15}),"Copy invite"]}),f==="public"&&d.jsx("button",{className:"btn","data-testid":"done-hide-invite",onClick:()=>{x(null),l(""),e.onRefresh()},children:"Done — hide invite"}),F&&d.jsx("p",{className:"muted",children:F})]}),t==="accept"&&d.jsxs("form",{style:{display:"flex",flexDirection:"column",gap:13},onSubmit:z=>{z.preventDefault(),!(!h.trim()||w)&&(B(!0),S(null),e.onAccept(h.trim(),C.trim()||void 0).then(()=>{b("Invite accepted — the contact will appear once the sender verifies your identity."),E(""),y("")}).catch(J=>S(String(J))).finally(()=>B(!1)))},children:[d.jsx("p",{className:"muted",children:"Paste the invite you received, or scan a QR code."}),k?d.jsx(a1,{onDecode:z=>{E(z),P(!1)},onClose:()=>P(!1)}):d.jsxs("button",{type:"button",className:"btn",onClick:()=>P(!0),children:[d.jsx(Fe,{name:"monitor",size:15}),"Scan QR code"]}),d.jsx("textarea",{className:"field mono","aria-label":"Invite",rows:5,value:h,onChange:z=>E(z.target.value),placeholder:"Paste invite text…"}),d.jsx("input",{className:"field",value:C,onChange:z=>y(z.target.value),placeholder:"Rename them (optional)",maxLength:64}),d.jsx("button",{className:"btn primary",type:"submit",disabled:w||!h.trim(),children:w?"Connecting…":"Add contact"}),F&&d.jsx("p",{className:"muted",children:F}),D&&d.jsx("p",{className:"onb-error",children:D})]})]})})}function DI(e){const[t,n]=A.useState(e.identity.bio??""),[r,o]=A.useState(!1),[a,l]=A.useState(null),[c,x]=A.useState(e.push.preview),f=A3(),m=!e.workerSupported||e.push.status==="unsupported"?f??"Unavailable — requires a secure browser with service-worker support.":e.push.status==="needs-permission"?f??"Needs permission — allow notifications, then choose Enable or Repair.":e.push.status==="on"?"On — this browser and the server agree on the current Web Push configuration.":e.push.status==="repairing"?"Repairing — checking the browser subscription and server acknowledgement…":e.push.status==="error"?"Repair needed — the browser and server could not confirm the same subscription.":"Off — enable notifications for this browser.";return d.jsxs(rs,{title:"Settings",onClose:e.onClose,wide:!0,children:[d.jsxs("div",{children:[d.jsx("span",{className:"lbl",children:"Display name"}),d.jsx("input",{className:"field",readOnly:!0,value:e.identity.name})]}),d.jsxs("div",{children:[d.jsx("span",{className:"lbl",children:"Your address"}),d.jsx("input",{className:"field mono",readOnly:!0,value:e.identity.cid,onFocus:h=>h.currentTarget.select()}),d.jsx("p",{className:"muted",children:"Your public address on ours. Share an invite to connect more easily."})]}),d.jsxs("div",{children:[d.jsx("span",{className:"lbl",children:"Public bio"}),d.jsx("textarea",{className:"field",rows:3,value:t,onChange:h=>{n(h.target.value),o(!1),l(null)}}),d.jsx("button",{className:"btn sm",onClick:()=>{l(null),e.onSaveBio(t).then(()=>o(!0)).catch(h=>l(String(h)))},children:r?"Saved":"Save bio"}),a&&d.jsx("p",{className:"onb-error",children:a})]}),d.jsxs("label",{style:{display:"flex",gap:9},children:[d.jsx("input",{type:"checkbox",checked:e.dark,onChange:e.onToggleDark})," Dark mode"]}),d.jsxs("div",{style:{borderTop:"1px solid var(--line)",paddingTop:16},children:[d.jsx("h4",{children:"Notifications"}),d.jsx("p",{className:e.push.status==="needs-permission"||e.push.status==="error"?"onb-error":"muted",children:m}),f&&f!==m&&d.jsx("p",{className:"muted","data-testid":"push-platform-guidance",children:f}),d.jsxs("fieldset",{style:{border:0,padding:0,margin:"12px 0"},children:[d.jsx("legend",{className:"lbl",children:"Lock-screen preview"}),d.jsxs("label",{style:{display:"block",marginTop:7},children:[d.jsx("input",{type:"radio",name:"push-preview",checked:c==="full",onChange:()=>x("full")})," Full — sender and message text or filename"]}),d.jsxs("label",{style:{display:"block",marginTop:7},children:[d.jsx("input",{type:"radio",name:"push-preview",checked:c==="private",onChange:()=>x("private")})," Private — generic content only"]})]}),d.jsx("p",{className:"muted",children:"Full previews can expose sender names, message text, and filenames on the lock screen. The push provider still sees delivery endpoint, timing, and payload size metadata in either mode."}),d.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:e.push.status==="on"?d.jsxs(d.Fragment,{children:[d.jsx("button",{className:"btn",disabled:e.busy,onClick:()=>void e.onPushAction("disable",c),children:"Disable notifications"}),d.jsx("button",{className:"btn",disabled:e.busy,onClick:()=>void e.onPushAction("repair",c),children:"Repair"}),c!==e.push.preview&&d.jsx("button",{className:"btn primary",disabled:e.busy,onClick:()=>void e.onPushAction("enable",c),children:"Save preview"})]}):d.jsx("button",{className:"btn primary",disabled:e.busy||!e.workerSupported||e.push.status==="unsupported",onClick:()=>void e.onPushAction(e.push.status==="error"||e.push.blocked?"repair":"enable",c),children:e.busy?"Repairing…":e.push.status==="error"||e.push.blocked?"Repair":"Enable notifications"})})]}),d.jsxs("div",{style:{borderTop:"1px solid var(--line)",paddingTop:16},children:[d.jsx("h4",{children:"App status"}),d.jsx("p",{className:"muted",children:e.offline?"Offline — reconnecting. Message and identity data are never cached.":"Online."}),e.onInstall&&d.jsx("button",{className:"btn",onClick:e.onInstall,children:"Install app"}),e.updateAvailable&&d.jsx("button",{className:"btn primary",onClick:e.onReloadUpdate,children:"Reload to update"})]}),d.jsxs("div",{style:{borderTop:"1px solid var(--line)",paddingTop:16},children:[d.jsx("h4",{children:"Build"}),d.jsx("input",{className:"field mono",readOnly:!0,value:e.build?`${e.build.version} · ${e.build.sha}`:"Loading…"})]})]})}function kI(e,t,n,r,o=6e4){return!t||!t.sha?"current":t.sha===e?(n.remoteSha=null,n.firstMismatchAt=null,"current"):(n.remoteSha=t.sha,(n.firstMismatchAt===null||n.firstMismatchAt===void 0)&&(n.firstMismatchAt=r),n.controllerChanged?"newer-available":r-n.firstMismatchAt>=o?"stuck":"newer-available")}const FI="21b1610c125e41982803ecc8c389c169dd1252c4",SI=15*6e4,bI=6e4,PI=kI;async function _I(){try{const e=await fetch(Kn("/version.json"),{cache:"no-store"});return e.ok?await e.json():null}catch{return null}}function jI(e){const t={remoteSha:null,firstMismatchAt:null,controllerChanged:!1},n=()=>{t.controllerChanged=!0};navigator.serviceWorker?.addEventListener("controllerchange",n);let r=!1;const o=async()=>{const x=await _I(),f=PI(FI,x,t,Date.now(),bI);f==="newer-available"?(e.onUpdateAvailable(x.sha),navigator.serviceWorker?.getRegistration().then(m=>m?.update()).catch(()=>{})):f==="stuck"&&!r&&(r=!0,e.onStuck(x.sha))},a=setTimeout(()=>void o(),5e3),l=setInterval(()=>void o(),SI),c=()=>{document.visibilityState==="visible"&&o()};return document.addEventListener("visibilitychange",c),()=>{clearTimeout(a),clearInterval(l),document.removeEventListener("visibilitychange",c),navigator.serviceWorker?.removeEventListener("controllerchange",n)}}async function TI(e,t={}){try{const r=await navigator.serviceWorker.getRegistrations(),o=new URL(Kn("/"),location.origin).href,a=new URL(Kn("/sw.js"),location.origin).href;await Promise.all(r.filter(c=>!t.appOnly||c.scope===o&&[c.active,c.waiting,c.installing].some(x=>x?.scriptURL===a)).map(c=>c.unregister()));const l=await caches.keys();t.appOnly?await Promise.all(l.map(async c=>{const x=await caches.open(c);for(const f of await x.keys()){const m=new URL(f.url),h=new URL(o).pathname,E=m.pathname.slice(h.length);m.origin===location.origin&&m.pathname.startsWith(h)&&(E===""||E==="index.html"||E==="fleet-index.html"||E==="fleet"||E.startsWith("fleet/")||E.startsWith("assets/"))&&await x.delete(f)}})):await Promise.all(l.map(c=>caches.delete(c)))}catch{}if(t.beforeNavigate&&!t.beforeNavigate())throw new Error("A new draft must be cleared before updating.");const n=new URL(location.href);return t.preserveNavigation?(n.searchParams.set("v",e),location.replace(n.pathname+n.search+n.hash)):location.replace(location.pathname+"?v="+encodeURIComponent(e)),new Promise(()=>{})}function RI(){const e=new URL(location.href);e.searchParams.has("v")&&(e.searchParams.delete("v"),history.replaceState(null,"",e.pathname+e.search+e.hash))}const q8=[0,100,400,1e3,3e3,6e3],K8=e=>new Promise(t=>setTimeout(t,e)),X8={delivered:1,read:2},Y8="ours-dark-v3",Q8="#chat-message-",J8=Vc,NI=e=>e instanceof Error&&e.message?e.message:"The request could not be completed.";function x6(e,t){const n=new Map,r=[];for(const o of e?.messages??[]){const a={dir:o.dir,text:o.text,date:o.date,read:o.read,wireId:o.wire_id,replyTo:o.reply_to?{wireId:o.reply_to.wire_id}:null,peerCid:o.peer_cid,receipt:o.receipt??void 0,receiptless:o.dir==="out"&&!o.wire_id,messageKind:o.message_kind,typed:o.typed};o.wire_id?n.set(o.wire_id,a):r.push(a)}for(const o of t){const a=n.get(o.wire_id);n.set(o.wire_id,{dir:o.dir,text:"",date:o.date,read:a?.read??o.dir==="out",wireId:o.wire_id,replyTo:o.reply_to?{wireId:o.reply_to.wire_id}:a?.replyTo??null,kind:"file",filename:o.filename,mime:o.mime,receipt:a?.receipt})}return[...r,...n.values()].sort((o,a)=>{const l=J8(o.date)-J8(a.date);return l===0?o.wireId.localeCompare(a.wireId):l})}function MI(e){const t={};for(const n of Object.values(e.roots??{}))t[n.root_cid]={label:n.root_name,note:"Verified identity"};return t}function II(e,t){return[...e.contacts.contacts.map(r=>{const o=e.contacts.roots?.[r.container_id],a=Cr(e,r.container_id),c=x6(a,t[r.container_id]??[]).at(-1),x=$c(r);return{id:r.container_id,name:x,announcedName:r.name,initials:Jd(x),when:c?Q3(c.date):"",activityAt:c?.date??"",last:c?.kind==="file"?sS(c.filename,c.mime):a?.preview??c?.text??"",unread:a?.unread??0,status:"active",root:o?.root_cid??null,sub:o?`role “${o.role_id}” of ${o.root_name}`:"",roleId:o?.role_id??null,rootName:o?.root_name??null,mine:!1,kind:o?"agent":"person"}}),...e.contacts.pending.map(r=>{const o=$c(r);return{id:`pending:${r.container_id}`,name:o,announcedName:r.name,initials:Jd(o),when:"",activityAt:"",last:`${r.queued} queued · approval required`,unread:0,status:"pending",root:null,sub:"",roleId:null,rootName:null,mine:!1,kind:"person"}})]}function LI(){return d.jsx(OI,{})}function OI(){const e=A.useRef(p3(Rx(window.location.pathname))).current,[t,n]=A.useReducer(Ag,e),[r,o]=A.useState(null),a=A.useRef(0),l=A.useRef(null),c=A.useRef(t),x=A.useRef(new d3),f=A.useRef(null),m=A.useRef(new Map),h=A.useRef(new Map),[E,C]=A.useState({}),y=A.useRef(E),[w,B]=A.useState(null),F=A.useRef(new Set),[b,D]=A.useState(null),S=A.useRef(b),k=A.useRef(!1),[P,R]=A.useState([]),[M,O]=A.useState(null),[T,V]=A.useState(()=>localStorage.getItem(Y8)!=="0"),[z,J]=A.useState(null),[H,W]=A.useState({supported:!1,offline:!navigator.onLine,updateAvailable:!1,registration:null}),[re,Z]=A.useState({status:"unsupported",preview:"full"}),[K,ie]=A.useState(!1),j=A.useRef(!1),[I,G]=A.useState(()=>window.location.hash.startsWith(Q8)),{toasts:N,push:ae,dismiss:Ee,clear:se}=yI(),xe=A.useCallback(q=>{c.current=Ag(c.current,q),n(q)},[]),we=A.useCallback(q=>{k.current=q},[]);A.useEffect(()=>{c.current=t},[t]),S.current=b,y.current=E,A.useMemo(()=>(_g(Object.values(E).flat()),null),[E]),A.useEffect(()=>(document.documentElement.classList.toggle("theme-dark",T),()=>document.documentElement.classList.remove("theme-dark")),[T]);const de=A.useCallback(q=>xe({type:"error",message:NI(q)}),[xe]),et=A.useCallback(()=>{const q=c.current;return{visibility:document.visibilityState,appRoute:q.route.name==="chats"?"chats":"other",selectedContactCid:gr(q),desktopLayout:f.current?.matches??window.innerWidth>=861,mobileDetailOpen:q.mobileDetailOpen,conversationCoveringDialogOpen:S.current!==null}},[]),Ie=A.useCallback(async(q,ve=!0)=>{try{const he=await xt.conversation(q);return xe({type:"page",contactCid:q,page:he}),he}catch(he){return ve&&de(he),null}},[xe,de]),oe=A.useCallback(async(q,ve=!0)=>{try{const he=await xt.files(q);return _g(he.files),C(Be=>({...Be,[q]:he.files})),he.files}catch(he){return ve&&de(he),null}},[de]);A.useEffect(()=>jI({onUpdateAvailable:()=>W(q=>({...q,updateAvailable:!0})),onStuck:q=>{TI(q)}}),[]);const Me=A.useCallback(async()=>{const q=await xt.contacts();return xe({type:"contacts",contacts:{...q,pending:q.pending??[]}}),q},[xe]),be=A.useCallback(async()=>{try{const[q,ve,he]=await Promise.all([xt.identity(),xt.contacts(),xt.buildInfo()]),Be={...ve,pending:ve.pending??[]};return c.current.identity&&c.current.identity.cid!==q.cid&&(rS(),y.current={},C({})),xe({type:"snapshot",identity:q,contacts:Be}),O(he),await Promise.all(Be.contacts.flatMap(Le=>[Ie(Le.container_id,!1),oe(Le.container_id,!1)])),gr(c.current)}catch(q){return de(q),null}},[xe,oe,Ie,de]),Ye=A.useCallback(async q=>{await x.current.request(q,async()=>{x3(q,et())&&(await xt.markRead(q),await Promise.all([Ie(q),Me()]))}).catch(de)},[et,Me,Ie,de]),Je=A.useCallback(async q=>{const ve=++a.current;l.current?.abort();const he=new AbortController;l.current=he,o(null),se(q),oe(q,!1);let Be;try{Be=await xt.conversation(q,void 0,he.signal)}catch(kt){he.signal.aborted||de(kt);return}if(he.signal.aborted||ve!==a.current)return;xe({type:"page",contactCid:q,page:Be});const Le=Be.unread;let Ce=[...Be.messages],lt=Be.nextBefore;const bt=new Set,vt=new Set(Ce.map(kt=>kt.wire_id).filter(Boolean)),ft=()=>Ce.filter(kt=>kt.dir==="in"&&!kt.read);for(;ft().length<Le&<&&!bt.has(lt);){bt.add(lt);let kt;try{kt=await xt.conversation(q,lt,he.signal)}catch{break}if(he.signal.aborted||ve!==a.current)return;const te=kt.messages.filter(me=>!me.wire_id||!vt.has(me.wire_id));if(!te.length&&kt.nextBefore===lt)break;for(const me of te)me.wire_id&&vt.add(me.wire_id);Ce=[...te,...Ce],xe({type:"older_page",contactCid:q,page:kt,newer:Be.messages}),lt=kt.nextBefore}const ht=ft()[0];ht?.wire_id&&ve===a.current&&!he.signal.aborted&&o({contactCid:q,wireId:ht.wire_id,count:Le}),await Ye(q)},[se,xe,Ye,oe,de]),Qe=A.useCallback(async(q,ve,he="page")=>{const Be=`page:${q}:${he}`,Le=(m.current.get(Be)??0)+1;m.current.set(Be,Le);for(const Ce of q8){if(Ce&&await K8(Ce),m.current.get(Be)!==Le)return;const lt=await Ie(q,!1);if(lt&&ve(lt))return}},[Ie]),yt=A.useCallback(async(q,ve)=>{const he=`file:${q}`,Be=(m.current.get(he)??0)+1;m.current.set(he,Be);for(const Le of q8)if(Le&&await K8(Le),m.current.get(he)!==Be||(await oe(q,!1))?.some(lt=>lt.wire_id===ve))return},[oe]),He=A.useRef(!1);A.useEffect(()=>{if(!I||!t.loaded)return;const q=decodeURIComponent(window.location.hash.slice(Q8.length)),ve=gr(c.current);if(!q||!ve){G(!1);return}if(Cr(c.current,ve)?.messages.some(he=>he.wire_id===q)){G(!1);return}He.current||(He.current=!0,Qe(ve,he=>he.messages.some(Be=>Be.wire_id===q),`anchor:${q}`).catch(()=>{}).finally(()=>G(!1)))},[I,Qe,t.loaded,t.pages]),A.useMemo(()=>(nS({url:q=>Object.values(y.current).flat().find(he=>he.wire_id===q)?.available?xt.mediaUrl(q):null,bytes:async q=>{if(!Object.values(y.current).flat().find(Be=>Be.wire_id===q)?.available)return null;const he=await fetch(xt.mediaUrl(q),{cache:"no-store",credentials:"same-origin"});if(!he.ok)throw new Error(`Media request failed (HTTP ${he.status})`);return new Uint8Array(await he.arrayBuffer())},fetch:async q=>{const ve=Object.values(y.current).flat().find(he=>he.wire_id===q);if(!ve)throw new Error("Media record is unavailable");await xt.fetchFiles([q]),await oe(ve.contact_id)}}),null),[oe]),A.useEffect(()=>{let q;C3(he=>{W(he),Dg(he.registration).then(Z).catch(()=>Z(Be=>({...Be,status:"error"})))},{shouldDeferReload:()=>k.current||S.current!==null}).then(he=>{q=he}).catch(de);const ve=he=>{he.preventDefault(),J(he)};return window.addEventListener("beforeinstallprompt",ve),()=>{q?.(),window.removeEventListener("beforeinstallprompt",ve)}},[de]),A.useEffect(()=>F3(),[]),A.useEffect(()=>{if(!(!H.registration||re.status!=="on"))return u3({registration:H.registration,identity:xt.identity,onEvent:nv})},[re.status,re.bindingId,H.registration]),A.useEffect(()=>{const q=()=>Z(ve=>({...ve,status:"error"}));return window.addEventListener("ours-push-repair-required",q),()=>window.removeEventListener("ours-push-repair-required",q)},[]),A.useEffect(()=>{window.location.pathname===Eh()&&window.history.replaceState(null,"",ui()),f.current=window.matchMedia("(min-width: 861px)");const q=()=>{const Ce=Rx(window.location.pathname);l.current?.abort(),a.current+=1,o(null),xe({type:"route",route:Ce}),j.current&&Ce.name==="chats"&&Ce.contactCid&&(j.current=!1,requestAnimationFrame(()=>document.querySelector("[data-contact-trigger]")?.focus({preventScroll:!0}))),Ce.name==="chats"&&Ce.contactCid&&Je(Ce.contactCid)},ve=()=>{if(document.visibilityState!=="visible")return;const Ce=gr(c.current);Ce&&Ye(Ce),sv(),H.registration&&Dg(H.registration).then(Z).catch(()=>Z(lt=>({...lt,status:"error"})))};window.addEventListener("popstate",q),document.addEventListener("visibilitychange",ve);const he=Ce=>{const lt=Ce.type==="sync_required"?`${Ce.type}:${Ce.reason}`:Ce.type==="receipt_received"?`${Ce.type}:${Ce.contact_id}:${Ce.kind}:${Ce.wire_ids.join(",")}`:`${Ce.type}:${Ce.contact_id}:${Ce.wire_id}`,bt=Date.now(),vt=h.current.get(lt)??0;h.current.set(lt,bt);for(const[ft,ht]of h.current)bt-ht>6e4&&h.current.delete(ft);bt-vt<6e4||(async()=>{if(Ce.type==="sync_required"){await be();return}if(Me().catch(de),Ce.type==="file_received"){await yt(Ce.contact_id,Ce.wire_id);const ft=c.current.contacts.contacts.find(ht=>ht.container_id===Ce.contact_id);gr(c.current)!==Ce.contact_id&&ft&&ae(Ce.contact_id,$c(ft),"New file");return}if(Ce.type==="message_received"){const ft=c.current.contacts.contacts.find(ht=>ht.container_id===Ce.contact_id);await Qe(Ce.contact_id,ht=>ht.messages.some(kt=>kt.wire_id===Ce.wire_id),`message:${Ce.wire_id}`),gr(c.current)===Ce.contact_id?await Ye(Ce.contact_id):ft&&ae(Ce.contact_id,$c(ft),"New message");return}xe({type:"receipt",contactCid:Ce.contact_id,kind:Ce.kind,wireIds:Ce.wire_ids}),await Qe(Ce.contact_id,ft=>Ce.wire_ids.every(ht=>{const kt=ft.messages.find(te=>te.wire_id===ht);return!!kt?.receipt&&X8[kt.receipt]>=X8[Ce.kind]}),`receipt:${Ce.wire_ids.join(",")}`)})().catch(de)},Be=s3(he),Le=a3(he,Ce=>xe({type:"connection",connection:Ce}));return be().then(Ce=>{Ce&&Je(Ce)}),()=>{Le(),Be(),window.removeEventListener("popstate",q),document.removeEventListener("visibilitychange",ve)}},[Qe,yt,xe,Ye,Je,ae,Me,be,de,H.registration]);const dt=(q,ve,he)=>{window.history.pushState({oursMessenger:!0},"",ve),xe({type:"route",route:q,mobileDetailOpen:he})},ct=async q=>{dt({name:"chats",contactCid:q},ui(q),!0),await Je(q)},Ke=async q=>{const ve=Cr(c.current,q);if(!(!ve?.nextBefore||F.current.has(q))){F.current.add(q),B(q);try{const he=await xt.conversation(q,ve.nextBefore);xe({type:"older_page",contactCid:q,page:he,newer:ve.messages})}catch(he){de(he)}finally{F.current.delete(q),B(null)}}},Vt=A.useCallback(async(q,ve)=>{const he=c.current,Be=gr(he);if(!Be)return"unavailable";const Le=Cr(he,Be);if(!Le)return"unavailable";if(Le.messages.some(vt=>vt.wire_id===q))return"found";let Ce=Le.nextBefore;const lt=new Set;let bt=[...Le.messages];for(let vt=0;Ce&&!lt.has(Ce)&&vt<10;vt++){lt.add(Ce);const ft=await xt.conversation(Be,Ce,ve);if(ve.aborted||c.current.identity?.cid!==he.identity?.cid||gr(c.current)!==Be)return"unavailable";if(bt=[...ft.messages,...bt],ft.messages.some(ht=>ht.wire_id===q))return xe({type:"older_page",contactCid:Be,page:ft,newer:bt}),"found";Ce=ft.nextBefore}return Ce?"limit":"unavailable"},[xe]),tt=gr(t),st=t.contacts.contacts.find(q=>q.container_id===tt),Y=A.useMemo(()=>II(t,E),[t,E]),le=Y.find(q=>q.id===tt)??null,je=tt?x6(Cr(t,tt),E[tt]??[]):[],De=t.identity;A.useEffect(()=>{if(!t.loaded)return;const q=Rx(window.location.pathname),ve=q.name==="chats"||q.name==="contact"?q.contactCid:null;!ve||t.contacts.contacts.some(he=>he.container_id===ve)||(window.history.replaceState({oursMessenger:!0},"",ui()),r?.contactCid===ve&&(l.current?.abort(),a.current+=1,o(null)))},[t.loaded,t.contacts.contacts,r]);const qe=t.loaded?tt&&!Cr(t,tt)||I?"updating":t.connection!=="live"?"connecting":null:"connecting",Et=async(q,ve=re.preview)=>{if(H.registration){ie(!0),Z(he=>({...he,status:"repairing",preview:ve}));try{Z(await(q==="enable"?ov(H.registration,{preview:ve}):q==="repair"?D3(H.registration,ve):k3(H.registration,re)))}catch(he){Z(Be=>({...Be,status:"error"})),de(he)}finally{ie(!1)}}},Rt=()=>{R([]),D("invite"),xt.invites().then(R).catch(de)};return t.route.name==="not_found"?d.jsxs("div",{className:"centered-screen",children:[d.jsx("h1",{children:"Page not found"}),d.jsx("button",{className:"btn primary",onClick:()=>dt({name:"chats",contactCid:null},ui()),children:"Open chats"})]}):De?d.jsx("div",{className:T?"theme-dark":"",style:{height:"100%"},children:d.jsxs("div",{className:"app signal-app",children:[d.jsxs("main",{className:"section signal-stage"+(t.mobileDetailOpen?" show-detail":""),children:[d.jsx(xI,{contacts:Y,roots:MI(t.contacts),selected:tt,onSelect:q=>{q.startsWith("pending:")||ct(q)},onInvite:Rt,onSettings:()=>D("settings"),onApprovePending:async q=>{try{return await xt.respondToIntroduction(q,"approve"),await be(),!0}catch(ve){return de(ve),!1}},onRejectPending:async q=>{try{return await xt.respondToIntroduction(q,"reject"),await be(),!0}catch(ve){return de(ve),!1}}}),t.route.name==="contact"&&le?d.jsx(dI,{contact:le,messages:je,onBack:()=>{j.current=!0,h3(window.history.state)==="back"?window.history.back():(window.history.replaceState({oursMessenger:!0},"",ui(le.id)),xe({type:"route",route:{name:"chats",contactCid:le.id},mobileDetailOpen:!0}),requestAnimationFrame(()=>document.querySelector("[data-contact-trigger]")?.focus({preventScroll:!0})),j.current=!1)},onRename:q=>void xt.renameContact(le.id,q).then(be).catch(de),onRemove:()=>{confirm(`Remove “${st?.name??"contact"}”?`)&&xt.removeContact(le.id).then(()=>(window.history.replaceState({oursMessenger:!0},"",ui()),xe({type:"route",route:{name:"chats",contactCid:null},mobileDetailOpen:!1}),be())).catch(de)},onOpenMessage:q=>{dt({name:"chats",contactCid:le.id},ui(le.id),!0);let ve=12;const he=()=>{const Be=document.getElementById(`chat-message-${encodeURIComponent(q)}`),Le=Be?.closest(".messages");if((!Be||!Le||Le.clientHeight<=0)&&ve-- >0){requestAnimationFrame(he);return}if(!Be||!Le)return;const Ce=Be.getBoundingClientRect(),lt=Le.getBoundingClientRect(),bt=Le.scrollTop+Ce.top-lt.top-Math.max(0,(Le.clientHeight-Ce.height)/2),vt=Math.max(0,Math.min(bt,Le.scrollHeight-Le.clientHeight));Le.scrollTo({top:vt,behavior:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"})};requestAnimationFrame(he)},indexOffset:Cr(t,le.id)?.hasMore?Math.max(1,(Cr(t,le.id)?.total??je.length)-je.length):0,onSendText:async(q,ve)=>{const he=await xt.send(le.id,q,ve);return await Ie(le.id,!1),he.wire_id??void 0},onSendFile:async(q,ve)=>{await xt.sendFile(le.id,new Blob([q.bytes],{type:q.mime}),q.filename,q.mime,ve),await Promise.all([oe(le.id),Ie(le.id,!1)])}}):d.jsx(hI,{contact:le,messages:je,syncing:qe,unreadOpen:r?.contactCid===tt?r:null,hiddenEarlier:Cr(t,tt??"")?.hasMore?Math.max(1,(Cr(t,tt??"")?.total??je.length)-je.length):0,onRevealMessage:Vt,onLoadEarlier:tt&&w!==tt?()=>void Ke(tt):void 0,onBack:()=>{l.current?.abort(),a.current+=1,o(null),dt({name:"chats",contactCid:null},ui(),!1)},onOpenContact:()=>{tt&&dt({name:"contact",contactCid:tt},f3(tt),!0)},onDraftChange:we,onSend:async(q,ve,he)=>{if(!tt)return;const Be=tt,Le=await xt.send(Be,q,ve,he);return xe({type:"sent_message",contactCid:Be,message:{dir:"out",text:q,date:new Date().toISOString(),read:!0,wire_id:Le.wire_id??"",receipt:null,reply_to:ve?{wire_id:ve}:null}}),Le.wire_id?Qe(Be,Ce=>Ce.messages.some(lt=>lt.wire_id===Le.wire_id),`send:${Le.wire_id}`):Me().catch(de),Le.wire_id??void 0},onLoadCommands:async(q,ve)=>xt.commands(q,ve),onSendCommand:async(q,ve,he,Be,Le,Ce)=>{const lt=await xt.sendCommand(q,ve,he,Be,Le,Ce);return Ie(q,!1),lt},onSendFile:async(q,ve)=>{tt&&(await xt.sendFile(tt,new Blob([q.bytes],{type:q.mime}),q.filename,q.mime,ve),await Promise.all([oe(tt),Ie(tt,!1)]))},onFetchFile:async q=>{await xt.fetchFiles([q]),tt&&await oe(tt)}},tt??"no-conversation")]}),d.jsxs("div",{className:"app-banners",children:[H.offline&&d.jsx("div",{className:"banner warn",role:"status","aria-live":"polite",children:"Offline — reconnecting to the network…"}),t.connection!=="live"&&d.jsx("div",{className:"banner warn",role:"status","aria-live":"polite",children:t.connection==="retrying"?"Live updates interrupted — reconnecting…":"Connecting to live updates…"}),H.updateAvailable&&d.jsxs("div",{className:"banner info",children:[d.jsx("span",{role:"status","aria-live":"polite",children:"A new version is available."}),d.jsx("span",{className:"banner-actions",children:d.jsx("button",{className:"linkbtn",onClick:()=>{H.registration&&Bg(H.registration)},children:"Restart now"})})]}),d.jsx(AI,{items:N,onDismiss:Ee,onOpen:q=>void ct(q)})]}),b==="invite"&&d.jsx(wI,{identity:De,invites:P,onRefresh:async()=>R(await xt.invites()),onCreate:async(q,ve)=>(await xt.createInvite(q,ve)).blob,onAccept:async(q,ve)=>{await xt.addContact(q,ve),await be()},onRevoke:async q=>{await xt.revokeInvite(q)},onClose:()=>{D(null),be()}}),b==="settings"&&d.jsx(DI,{identity:De,push:re,workerSupported:H.supported,busy:K,offline:H.offline,updateAvailable:H.updateAvailable,build:M,dark:T,onToggleDark:()=>V(q=>(localStorage.setItem(Y8,q?"0":"1"),!q)),onSaveBio:async q=>{await xt.setBio(q),await be()},onPushAction:Et,onInstall:z?()=>void z.prompt().then(()=>J(null)):void 0,onReloadUpdate:()=>{H.registration&&Bg(H.registration)},onClose:()=>{S.current=null,D(null),tt&&Ye(tt)}}),t.error&&d.jsxs("div",{className:"banner error",role:"alert","aria-live":"assertive",children:[t.error,d.jsx("button",{className:"linkbtn",onClick:()=>xe({type:"error",message:null}),children:"dismiss"})]})]})}):d.jsx("div",{className:T?"theme-dark":"",style:{height:"100%"},children:d.jsx("div",{className:"centered-screen",children:d.jsx("p",{className:"muted",children:"Loading…"})})})}const zI=A.lazy(()=>su(()=>import("./FleetApp-Gjz3h8uS.js"),__vite__mapDeps([0,1,2]),import.meta.url));RI();const d6=window.location.pathname==="/fleet"||window.location.pathname.startsWith("/fleet/");d6&&(document.querySelector('link[rel="manifest"]').href="/fleet.webmanifest",document.title="ours network");const Bf=document.getElementById("root");if(!Bf)throw new Error("missing #root");const VI=["app.ours.network","app.ours-tunnel.com"].includes(location.hostname)||location.pathname==="/accounts";V7().then(()=>$7.createRoot(Bf).render(d.jsx(Tk,{reducedMotion:"user",children:VI?d.jsx(z7,{}):d6?d.jsx(A.Suspense,{fallback:d.jsx("div",{className:"centered-screen",children:"Loading preview…"}),children:d.jsx(zI,{})}):d.jsx(LI,{})}))).catch(e=>{Bf.textContent=e.message});export{jI as $,Sk as A,nt as B,r1 as C,rs as D,ea as E,CA as F,zA as G,S3 as H,Ff as I,QA as J,Nx as K,Lf as L,b3 as M,P3 as N,xA as O,WI as P,oA as Q,UI as R,$I as S,JI as T,xd as U,c2 as V,HA as W,WA as X,gA as Y,cA as Z,C3 as _,o3 as a,TI as a0,Bg as a1,OA as a2,UA as a3,HI as a4,Df as a5,AA as a6,_3 as a7,K3 as a8,xI as a9,ad as aa,u1 as ab,Q3 as ac,XI as ad,YI as ae,Hs as af,VA as ag,jA as ah,hI as ai,su as aj,$c as b,Oe as c,_g as d,nS as e,Bt as f,au as g,qI as h,Jd as i,d as j,KI as k,RA as l,Xi as m,ia as n,o1 as o,V3 as p,TA as q,A as r,F3 as s,l2 as t,Of as u,uf as v,If as w,Dn as x,n1 as y,Go as z};
|
|
430
|
+
//# sourceMappingURL=index-i9rKiqYX.js.map
|