@ours.network/messenger-server 0.1.3 → 1.0.1
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/README.md +3 -3
- package/dist/chunks/{chunk-XVPKSCRB.js → chunk-LYV2Y5XE.js} +1 -1
- package/dist/chunks/{server-WGWDNI4R.js → server-A2X3ONIW.js} +163 -25
- package/dist/cli.js +2 -2
- package/dist/web/assets/{abnfDiagram-N423BO3Z-7fD4vfRu.js → abnfDiagram-N423BO3Z-CSp6NRwP.js} +2 -2
- package/dist/web/assets/{abnfDiagram-N423BO3Z-7fD4vfRu.js.map → abnfDiagram-N423BO3Z-CSp6NRwP.js.map} +1 -1
- package/dist/web/assets/{arc-Cp6lomZC.js → arc-4IykQt9D.js} +2 -2
- package/dist/web/assets/{arc-Cp6lomZC.js.map → arc-4IykQt9D.js.map} +1 -1
- package/dist/web/assets/{architectureDiagram-T3A2C74G-CCfQC7wz.js → architectureDiagram-T3A2C74G-CL9LPWsH.js} +2 -2
- package/dist/web/assets/{architectureDiagram-T3A2C74G-CCfQC7wz.js.map → architectureDiagram-T3A2C74G-CL9LPWsH.js.map} +1 -1
- package/dist/web/assets/{blockDiagram-VBNYF7ZC-t1y3b-Vr.js → blockDiagram-VBNYF7ZC-yC0791PW.js} +2 -2
- package/dist/web/assets/{blockDiagram-VBNYF7ZC-t1y3b-Vr.js.map → blockDiagram-VBNYF7ZC-yC0791PW.js.map} +1 -1
- package/dist/web/assets/{browser-BNMxq99E.js → browser-aSjxdi-G.js} +2 -2
- package/dist/web/assets/{browser-BNMxq99E.js.map → browser-aSjxdi-G.js.map} +1 -1
- package/dist/web/assets/{c4Diagram-5PPSVZJV-_fzHOoNV.js → c4Diagram-5PPSVZJV-DqgWj3tY.js} +2 -2
- package/dist/web/assets/{c4Diagram-5PPSVZJV-_fzHOoNV.js.map → c4Diagram-5PPSVZJV-DqgWj3tY.js.map} +1 -1
- package/dist/web/assets/channel-jfpEU_2y.js +2 -0
- package/dist/web/assets/{channel-a40DqgLG.js.map → channel-jfpEU_2y.js.map} +1 -1
- package/dist/web/assets/{chunk-2GRJ4B5K-C7bSs1Bs.js → chunk-2GRJ4B5K-BWs5rfuK.js} +2 -2
- package/dist/web/assets/{chunk-2GRJ4B5K-C7bSs1Bs.js.map → chunk-2GRJ4B5K-BWs5rfuK.js.map} +1 -1
- package/dist/web/assets/{chunk-2Q5K7J3B-CB6pcjHM.js → chunk-2Q5K7J3B-DKBbJc9E.js} +2 -2
- package/dist/web/assets/{chunk-2Q5K7J3B-CB6pcjHM.js.map → chunk-2Q5K7J3B-DKBbJc9E.js.map} +1 -1
- package/dist/web/assets/{chunk-5RXB4S5H-DGriCScm.js → chunk-5RXB4S5H-IaRBqmdn.js} +2 -2
- package/dist/web/assets/{chunk-5RXB4S5H-DGriCScm.js.map → chunk-5RXB4S5H-IaRBqmdn.js.map} +1 -1
- package/dist/web/assets/{chunk-5VM5RSS4-BXQhNaWP.js → chunk-5VM5RSS4-DdMb5ZAE.js} +2 -2
- package/dist/web/assets/{chunk-5VM5RSS4-BXQhNaWP.js.map → chunk-5VM5RSS4-DdMb5ZAE.js.map} +1 -1
- package/dist/web/assets/{chunk-6Q2QTUOP-DZak_lrB.js → chunk-6Q2QTUOP-CYMlpG2Z.js} +2 -2
- package/dist/web/assets/{chunk-6Q2QTUOP-DZak_lrB.js.map → chunk-6Q2QTUOP-CYMlpG2Z.js.map} +1 -1
- package/dist/web/assets/{chunk-GF5L2VYU-BhIg_LDW.js → chunk-GF5L2VYU-BuKSmGxd.js} +2 -2
- package/dist/web/assets/{chunk-GF5L2VYU-BhIg_LDW.js.map → chunk-GF5L2VYU-BuKSmGxd.js.map} +1 -1
- package/dist/web/assets/{chunk-JWPE2WC7-DRT5vrQ1.js → chunk-JWPE2WC7-Cj_r5SZM.js} +2 -2
- package/dist/web/assets/{chunk-JWPE2WC7-DRT5vrQ1.js.map → chunk-JWPE2WC7-Cj_r5SZM.js.map} +1 -1
- package/dist/web/assets/{chunk-KBJHAD2P-D-1yZi0Q.js → chunk-KBJHAD2P-DCCYhI_8.js} +2 -2
- package/dist/web/assets/{chunk-KBJHAD2P-D-1yZi0Q.js.map → chunk-KBJHAD2P-DCCYhI_8.js.map} +1 -1
- package/dist/web/assets/{chunk-RYQCIY6F-CORP_3zW.js → chunk-RYQCIY6F-D3VqOBN6.js} +2 -2
- package/dist/web/assets/{chunk-RYQCIY6F-CORP_3zW.js.map → chunk-RYQCIY6F-D3VqOBN6.js.map} +1 -1
- package/dist/web/assets/{chunk-XXDRQBXY-k7JDg6pT.js → chunk-XXDRQBXY-BxQt3H1p.js} +2 -2
- package/dist/web/assets/{chunk-XXDRQBXY-k7JDg6pT.js.map → chunk-XXDRQBXY-BxQt3H1p.js.map} +1 -1
- package/dist/web/assets/classDiagram-JCYQIIEL-Cvo-b8Qq.js +2 -0
- package/dist/web/assets/{classDiagram-JCYQIIEL-DEVG-qK8.js.map → classDiagram-JCYQIIEL-Cvo-b8Qq.js.map} +1 -1
- package/dist/web/assets/classDiagram-v2-OCEON4UE-Cvo-b8Qq.js +2 -0
- package/dist/web/assets/{classDiagram-v2-OCEON4UE-DEVG-qK8.js.map → classDiagram-v2-OCEON4UE-Cvo-b8Qq.js.map} +1 -1
- package/dist/web/assets/{cose-bilkent-JH36ORCC-BRuFmEKf.js → cose-bilkent-JH36ORCC-D2wUnCFw.js} +2 -2
- package/dist/web/assets/{cose-bilkent-JH36ORCC-BRuFmEKf.js.map → cose-bilkent-JH36ORCC-D2wUnCFw.js.map} +1 -1
- package/dist/web/assets/{cynefin-VYW2F7L2-BIBC3C1E.js → cynefin-VYW2F7L2-BhGyk9U8.js} +2 -2
- package/dist/web/assets/{cynefin-VYW2F7L2-BIBC3C1E.js.map → cynefin-VYW2F7L2-BhGyk9U8.js.map} +1 -1
- package/dist/web/assets/{cynefinDiagram-MW4NZA55-B1GP4GAZ.js → cynefinDiagram-MW4NZA55-8xsqHZI1.js} +2 -2
- package/dist/web/assets/{cynefinDiagram-MW4NZA55-B1GP4GAZ.js.map → cynefinDiagram-MW4NZA55-8xsqHZI1.js.map} +1 -1
- package/dist/web/assets/{dagre-VZM6K2ZE-DNG5skDU.js → dagre-VZM6K2ZE-CRZ4XP8D.js} +2 -2
- package/dist/web/assets/{dagre-VZM6K2ZE-DNG5skDU.js.map → dagre-VZM6K2ZE-CRZ4XP8D.js.map} +1 -1
- package/dist/web/assets/{diagram-7IWD3JNH-CQUg24YJ.js → diagram-7IWD3JNH-CH1OHs8U.js} +2 -2
- package/dist/web/assets/{diagram-7IWD3JNH-CQUg24YJ.js.map → diagram-7IWD3JNH-CH1OHs8U.js.map} +1 -1
- package/dist/web/assets/{diagram-B4RE2ZJO-qbAY07Pq.js → diagram-B4RE2ZJO-Cgrp934H.js} +2 -2
- package/dist/web/assets/{diagram-B4RE2ZJO-qbAY07Pq.js.map → diagram-B4RE2ZJO-Cgrp934H.js.map} +1 -1
- package/dist/web/assets/{diagram-LBJQPF4R-BE1Kdgp2.js → diagram-LBJQPF4R-De8kC6ko.js} +2 -2
- package/dist/web/assets/{diagram-LBJQPF4R-BE1Kdgp2.js.map → diagram-LBJQPF4R-De8kC6ko.js.map} +1 -1
- package/dist/web/assets/{diagram-Q27KOJAE-p-O0kqgj.js → diagram-Q27KOJAE-CZuiMy7h.js} +2 -2
- package/dist/web/assets/{diagram-Q27KOJAE-p-O0kqgj.js.map → diagram-Q27KOJAE-CZuiMy7h.js.map} +1 -1
- package/dist/web/assets/{diagram-UB23O5K3-xdGc2e52.js → diagram-UB23O5K3-B9yVlHWE.js} +2 -2
- package/dist/web/assets/{diagram-UB23O5K3-xdGc2e52.js.map → diagram-UB23O5K3-B9yVlHWE.js.map} +1 -1
- package/dist/web/assets/{ebnfDiagram-BXEA7PRR-BlJlcjUV.js → ebnfDiagram-BXEA7PRR-Bpz82JkA.js} +2 -2
- package/dist/web/assets/{ebnfDiagram-BXEA7PRR-BlJlcjUV.js.map → ebnfDiagram-BXEA7PRR-Bpz82JkA.js.map} +1 -1
- package/dist/web/assets/{erDiagram-JOGREHBK-Bg5-2m62.js → erDiagram-JOGREHBK-C5a_pyMQ.js} +2 -2
- package/dist/web/assets/{erDiagram-JOGREHBK-Bg5-2m62.js.map → erDiagram-JOGREHBK-C5a_pyMQ.js.map} +1 -1
- package/dist/web/assets/{flowDiagram-UKHOOZJN-Dmoemhzb.js → flowDiagram-UKHOOZJN-DbZd2-Tp.js} +2 -2
- package/dist/web/assets/{flowDiagram-UKHOOZJN-Dmoemhzb.js.map → flowDiagram-UKHOOZJN-DbZd2-Tp.js.map} +1 -1
- package/dist/web/assets/{ganttDiagram-PKOTCBZU-Dc-IwQME.js → ganttDiagram-PKOTCBZU-DWI87QsT.js} +2 -2
- package/dist/web/assets/{ganttDiagram-PKOTCBZU-Dc-IwQME.js.map → ganttDiagram-PKOTCBZU-DWI87QsT.js.map} +1 -1
- package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-CN7YIxrd.js → gitGraphDiagram-DS77QQ5N-CECQyFvT.js} +2 -2
- package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-CN7YIxrd.js.map → gitGraphDiagram-DS77QQ5N-CECQyFvT.js.map} +1 -1
- package/dist/web/assets/index-0ny2lCl9.js +322 -0
- package/dist/web/assets/index-0ny2lCl9.js.map +1 -0
- package/dist/web/assets/index-B1juqaE-.css +1 -0
- package/dist/web/assets/{infoDiagram-6WML65LV-D-n8AFI2.js → infoDiagram-6WML65LV-DjP_yFP1.js} +2 -2
- package/dist/web/assets/{infoDiagram-6WML65LV-D-n8AFI2.js.map → infoDiagram-6WML65LV-DjP_yFP1.js.map} +1 -1
- package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-Cn-GcDLv.js → ishikawaDiagram-WSZJBQD7-B2surd2T.js} +2 -2
- package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-Cn-GcDLv.js.map → ishikawaDiagram-WSZJBQD7-B2surd2T.js.map} +1 -1
- package/dist/web/assets/{journeyDiagram-NVQOT4AX-CPPrighZ.js → journeyDiagram-NVQOT4AX-GvN2Rb4g.js} +2 -2
- package/dist/web/assets/{journeyDiagram-NVQOT4AX-CPPrighZ.js.map → journeyDiagram-NVQOT4AX-GvN2Rb4g.js.map} +1 -1
- package/dist/web/assets/{jsQR-BXk0yjjs.js → jsQR-2VAxy2ky.js} +2 -2
- package/dist/web/assets/{jsQR-BXk0yjjs.js.map → jsQR-2VAxy2ky.js.map} +1 -1
- package/dist/web/assets/{kanban-definition-27J2QSJJ-fT4ITqjW.js → kanban-definition-27J2QSJJ-CrW-YmkU.js} +2 -2
- package/dist/web/assets/{kanban-definition-27J2QSJJ-fT4ITqjW.js.map → kanban-definition-27J2QSJJ-CrW-YmkU.js.map} +1 -1
- package/dist/web/assets/{linear-nobKP7yF.js → linear-CQDslaR_.js} +2 -2
- package/dist/web/assets/{linear-nobKP7yF.js.map → linear-CQDslaR_.js.map} +1 -1
- package/dist/web/assets/{mermaid.core-BisAkIyL.js → mermaid.core-CgO1XnMl.js} +5 -5
- package/dist/web/assets/{mermaid.core-BisAkIyL.js.map → mermaid.core-CgO1XnMl.js.map} +1 -1
- package/dist/web/assets/{mindmap-definition-FAOFIHXS-Bnutlp7Z.js → mindmap-definition-FAOFIHXS-CGUWfBSf.js} +2 -2
- package/dist/web/assets/{mindmap-definition-FAOFIHXS-Bnutlp7Z.js.map → mindmap-definition-FAOFIHXS-CGUWfBSf.js.map} +1 -1
- package/dist/web/assets/{pegDiagram-VL7TDLO6-CzCgLmQq.js → pegDiagram-VL7TDLO6-Co20Kd21.js} +2 -2
- package/dist/web/assets/{pegDiagram-VL7TDLO6-CzCgLmQq.js.map → pegDiagram-VL7TDLO6-Co20Kd21.js.map} +1 -1
- package/dist/web/assets/{pieDiagram-7S7Q4E2Y-DEr0yE7X.js → pieDiagram-7S7Q4E2Y-DeuESLr1.js} +2 -2
- package/dist/web/assets/{pieDiagram-7S7Q4E2Y-DEr0yE7X.js.map → pieDiagram-7S7Q4E2Y-DeuESLr1.js.map} +1 -1
- package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-C2LgzIJW.js → quadrantDiagram-CIZ2JOQS-DyG_Rlre.js} +2 -2
- package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-C2LgzIJW.js.map → quadrantDiagram-CIZ2JOQS-DyG_Rlre.js.map} +1 -1
- package/dist/web/assets/{railroadDiagram-AXF67PYL-x-LatX3A.js → railroadDiagram-AXF67PYL-u8mUY3Rb.js} +2 -2
- package/dist/web/assets/{railroadDiagram-AXF67PYL-x-LatX3A.js.map → railroadDiagram-AXF67PYL-u8mUY3Rb.js.map} +1 -1
- package/dist/web/assets/{requirementDiagram-LRYGKXZP-CGzjkfeX.js → requirementDiagram-LRYGKXZP-PQf6qnA1.js} +2 -2
- package/dist/web/assets/{requirementDiagram-LRYGKXZP-CGzjkfeX.js.map → requirementDiagram-LRYGKXZP-PQf6qnA1.js.map} +1 -1
- package/dist/web/assets/{sankeyDiagram-W5VNT64P-BTISD1zZ.js → sankeyDiagram-W5VNT64P-Dbcg6vhd.js} +2 -2
- package/dist/web/assets/{sankeyDiagram-W5VNT64P-BTISD1zZ.js.map → sankeyDiagram-W5VNT64P-Dbcg6vhd.js.map} +1 -1
- package/dist/web/assets/{sequenceDiagram-SI44F4Z6-DbJ7oF41.js → sequenceDiagram-SI44F4Z6-RDUrI-vZ.js} +2 -2
- package/dist/web/assets/{sequenceDiagram-SI44F4Z6-DbJ7oF41.js.map → sequenceDiagram-SI44F4Z6-RDUrI-vZ.js.map} +1 -1
- package/dist/web/assets/{sizeCapture-X5ZJPWSS-CRPNTj6C.js → sizeCapture-X5ZJPWSS-JXUi75QS.js} +2 -2
- package/dist/web/assets/{sizeCapture-X5ZJPWSS-CRPNTj6C.js.map → sizeCapture-X5ZJPWSS-JXUi75QS.js.map} +1 -1
- package/dist/web/assets/{stateDiagram-OKZ733FA-nnD41U4P.js → stateDiagram-OKZ733FA-CWejbS_n.js} +2 -2
- package/dist/web/assets/{stateDiagram-OKZ733FA-nnD41U4P.js.map → stateDiagram-OKZ733FA-CWejbS_n.js.map} +1 -1
- package/dist/web/assets/stateDiagram-v2-UEYNNEHI-zZFXI91O.js +2 -0
- package/dist/web/assets/{stateDiagram-v2-UEYNNEHI-BW2payX0.js.map → stateDiagram-v2-UEYNNEHI-zZFXI91O.js.map} +1 -1
- package/dist/web/assets/{swimlanes-SLNWSIFB-CUfYRF4W.js → swimlanes-SLNWSIFB-Bq-l7_tt.js} +3 -3
- package/dist/web/assets/{swimlanes-SLNWSIFB-CUfYRF4W.js.map → swimlanes-SLNWSIFB-Bq-l7_tt.js.map} +1 -1
- package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-D4RKaS7N.js +9 -0
- package/dist/web/assets/{swimlanesDiagram-ULZ7WXOC-Bwk7oU9y.js.map → swimlanesDiagram-ULZ7WXOC-D4RKaS7N.js.map} +1 -1
- package/dist/web/assets/{timeline-definition-Z64GVDOM-tQRIpPqw.js → timeline-definition-Z64GVDOM-BM1qRR9l.js} +2 -2
- package/dist/web/assets/{timeline-definition-Z64GVDOM-tQRIpPqw.js.map → timeline-definition-Z64GVDOM-BM1qRR9l.js.map} +1 -1
- package/dist/web/assets/{vennDiagram-T6HMQDX7-B6xd83uW.js → vennDiagram-T6HMQDX7-nJF5zPxG.js} +2 -2
- package/dist/web/assets/{vennDiagram-T6HMQDX7-B6xd83uW.js.map → vennDiagram-T6HMQDX7-nJF5zPxG.js.map} +1 -1
- package/dist/web/assets/{wardleyDiagram-T6FBY63Y-CpKP_cr3.js → wardleyDiagram-T6FBY63Y-DTFZj_j_.js} +2 -2
- package/dist/web/assets/{wardleyDiagram-T6FBY63Y-CpKP_cr3.js.map → wardleyDiagram-T6FBY63Y-DTFZj_j_.js.map} +1 -1
- package/dist/web/assets/{xychartDiagram-ELKLHX3M-BeTRjYgI.js → xychartDiagram-ELKLHX3M-D0sYk6hI.js} +2 -2
- package/dist/web/assets/{xychartDiagram-ELKLHX3M-BeTRjYgI.js.map → xychartDiagram-ELKLHX3M-D0sYk6hI.js.map} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +5 -5
- package/dist/web/version.json +1 -1
- package/package.json +3 -3
- package/dist/web/assets/channel-a40DqgLG.js +0 -2
- package/dist/web/assets/classDiagram-JCYQIIEL-DEVG-qK8.js +0 -2
- package/dist/web/assets/classDiagram-v2-OCEON4UE-DEVG-qK8.js +0 -2
- package/dist/web/assets/index-Bja4dmXL.css +0 -1
- package/dist/web/assets/index-D7uZ1ZOu.js +0 -322
- package/dist/web/assets/index-D7uZ1ZOu.js.map +0 -1
- package/dist/web/assets/stateDiagram-v2-UEYNNEHI-BW2payX0.js +0 -2
- package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-Bwk7oU9y.js +0 -9
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
function zb(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();function Td(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rc={exports:{}},Uo={},Ac={exports:{}},Le={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Cg;function Vb(){if(Cg)return Le;Cg=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.iterator;function y(_){return _===null||typeof _!="object"?null:(_=p&&_[p]||_["@@iterator"],typeof _=="function"?_:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,C={};function T(_,Q,R){this.props=_,this.context=Q,this.refs=C,this.updater=R||w}T.prototype.isReactComponent={},T.prototype.setState=function(_,Q){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,Q,"setState")},T.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function E(){}E.prototype=T.prototype;function M(_,Q,R){this.props=_,this.context=Q,this.refs=C,this.updater=R||w}var A=M.prototype=new E;A.constructor=M,k(A,T.prototype),A.isPureReactComponent=!0;var L=Array.isArray,H=Object.prototype.hasOwnProperty,D={current:null},Y={key:!0,ref:!0,__self:!0,__source:!0};function W(_,Q,R){var Z,de={},ie=null,Ce=null;if(Q!=null)for(Z in Q.ref!==void 0&&(Ce=Q.ref),Q.key!==void 0&&(ie=""+Q.key),Q)H.call(Q,Z)&&!Y.hasOwnProperty(Z)&&(de[Z]=Q[Z]);var ge=arguments.length-2;if(ge===1)de.children=R;else if(1<ge){for(var Te=Array(ge),je=0;je<ge;je++)Te[je]=arguments[je+2];de.children=Te}if(_&&_.defaultProps)for(Z in ge=_.defaultProps,ge)de[Z]===void 0&&(de[Z]=ge[Z]);return{$$typeof:e,type:_,key:ie,ref:Ce,props:de,_owner:D.current}}function X(_,Q){return{$$typeof:e,type:_.type,key:Q,ref:_.ref,props:_.props,_owner:_._owner}}function j(_){return typeof _=="object"&&_!==null&&_.$$typeof===e}function G(_){var Q={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(R){return Q[R]})}var $=/\/+/g;function fe(_,Q){return typeof _=="object"&&_!==null&&_.key!=null?G(""+_.key):Q.toString(36)}function se(_,Q,R,Z,de){var ie=typeof _;(ie==="undefined"||ie==="boolean")&&(_=null);var Ce=!1;if(_===null)Ce=!0;else switch(ie){case"string":case"number":Ce=!0;break;case"object":switch(_.$$typeof){case e:case t:Ce=!0}}if(Ce)return Ce=_,de=de(Ce),_=Z===""?"."+fe(Ce,0):Z,L(de)?(R="",_!=null&&(R=_.replace($,"$&/")+"/"),se(de,Q,R,"",function(je){return je})):de!=null&&(j(de)&&(de=X(de,R+(!de.key||Ce&&Ce.key===de.key?"":(""+de.key).replace($,"$&/")+"/")+_)),Q.push(de)),1;if(Ce=0,Z=Z===""?".":Z+":",L(_))for(var ge=0;ge<_.length;ge++){ie=_[ge];var Te=Z+fe(ie,ge);Ce+=se(ie,Q,R,Te,de)}else if(Te=y(_),typeof Te=="function")for(_=Te.call(_),ge=0;!(ie=_.next()).done;)ie=ie.value,Te=Z+fe(ie,ge++),Ce+=se(ie,Q,R,Te,de);else if(ie==="object")throw Q=String(_),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return Ce}function te(_,Q,R){if(_==null)return _;var Z=[],de=0;return se(_,Z,"","",function(ie){return Q.call(R,ie,de++)}),Z}function xe(_){if(_._status===-1){var Q=_._result;Q=Q(),Q.then(function(R){(_._status===0||_._status===-1)&&(_._status=1,_._result=R)},function(R){(_._status===0||_._status===-1)&&(_._status=2,_._result=R)}),_._status===-1&&(_._status=0,_._result=Q)}if(_._status===1)return _._result.default;throw _._result}var Ee={current:null},q={transition:null},le={ReactCurrentDispatcher:Ee,ReactCurrentBatchConfig:q,ReactCurrentOwner:D};function P(){throw Error("act(...) is not supported in production builds of React.")}return Le.Children={map:te,forEach:function(_,Q,R){te(_,function(){Q.apply(this,arguments)},R)},count:function(_){var Q=0;return te(_,function(){Q++}),Q},toArray:function(_){return te(_,function(Q){return Q})||[]},only:function(_){if(!j(_))throw Error("React.Children.only expected to receive a single React element child.");return _}},Le.Component=T,Le.Fragment=n,Le.Profiler=s,Le.PureComponent=M,Le.StrictMode=i,Le.Suspense=d,Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=le,Le.act=P,Le.cloneElement=function(_,Q,R){if(_==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+_+".");var Z=k({},_.props),de=_.key,ie=_.ref,Ce=_._owner;if(Q!=null){if(Q.ref!==void 0&&(ie=Q.ref,Ce=D.current),Q.key!==void 0&&(de=""+Q.key),_.type&&_.type.defaultProps)var ge=_.type.defaultProps;for(Te in Q)H.call(Q,Te)&&!Y.hasOwnProperty(Te)&&(Z[Te]=Q[Te]===void 0&&ge!==void 0?ge[Te]:Q[Te])}var Te=arguments.length-2;if(Te===1)Z.children=R;else if(1<Te){ge=Array(Te);for(var je=0;je<Te;je++)ge[je]=arguments[je+2];Z.children=ge}return{$$typeof:e,type:_.type,key:de,ref:ie,props:Z,_owner:Ce}},Le.createContext=function(_){return _={$$typeof:a,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},_.Provider={$$typeof:l,_context:_},_.Consumer=_},Le.createElement=W,Le.createFactory=function(_){var Q=W.bind(null,_);return Q.type=_,Q},Le.createRef=function(){return{current:null}},Le.forwardRef=function(_){return{$$typeof:c,render:_}},Le.isValidElement=j,Le.lazy=function(_){return{$$typeof:m,_payload:{_status:-1,_result:_},_init:xe}},Le.memo=function(_,Q){return{$$typeof:h,type:_,compare:Q===void 0?null:Q}},Le.startTransition=function(_){var Q=q.transition;q.transition={};try{_()}finally{q.transition=Q}},Le.unstable_act=P,Le.useCallback=function(_,Q){return Ee.current.useCallback(_,Q)},Le.useContext=function(_){return Ee.current.useContext(_)},Le.useDebugValue=function(){},Le.useDeferredValue=function(_){return Ee.current.useDeferredValue(_)},Le.useEffect=function(_,Q){return Ee.current.useEffect(_,Q)},Le.useId=function(){return Ee.current.useId()},Le.useImperativeHandle=function(_,Q,R){return Ee.current.useImperativeHandle(_,Q,R)},Le.useInsertionEffect=function(_,Q){return Ee.current.useInsertionEffect(_,Q)},Le.useLayoutEffect=function(_,Q){return Ee.current.useLayoutEffect(_,Q)},Le.useMemo=function(_,Q){return Ee.current.useMemo(_,Q)},Le.useReducer=function(_,Q,R){return Ee.current.useReducer(_,Q,R)},Le.useRef=function(_){return Ee.current.useRef(_)},Le.useState=function(_){return Ee.current.useState(_)},Le.useSyncExternalStore=function(_,Q,R){return Ee.current.useSyncExternalStore(_,Q,R)},Le.useTransition=function(){return Ee.current.useTransition()},Le.version="18.3.1",Le}var Eg;function Pd(){return Eg||(Eg=1,Ac.exports=Vb()),Ac.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Tg;function Bb(){if(Tg)return Uo;Tg=1;var e=Pd(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(c,d,h){var m,p={},y=null,w=null;h!==void 0&&(y=""+h),d.key!==void 0&&(y=""+d.key),d.ref!==void 0&&(w=d.ref);for(m in d)i.call(d,m)&&!l.hasOwnProperty(m)&&(p[m]=d[m]);if(c&&c.defaultProps)for(m in d=c.defaultProps,d)p[m]===void 0&&(p[m]=d[m]);return{$$typeof:t,type:c,key:y,ref:w,props:p,_owner:s.current}}return Uo.Fragment=n,Uo.jsx=a,Uo.jsxs=a,Uo}var Pg;function $b(){return Pg||(Pg=1,Rc.exports=Bb()),Rc.exports}var v=$b(),za={},Mc={exports:{}},Gt={},Nc={exports:{}},jc={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Rg;function Ub(){return Rg||(Rg=1,function(e){function t(q,le){var P=q.length;q.push(le);e:for(;0<P;){var _=P-1>>>1,Q=q[_];if(0<s(Q,le))q[_]=le,q[P]=Q,P=_;else break e}}function n(q){return q.length===0?null:q[0]}function i(q){if(q.length===0)return null;var le=q[0],P=q.pop();if(P!==le){q[0]=P;e:for(var _=0,Q=q.length,R=Q>>>1;_<R;){var Z=2*(_+1)-1,de=q[Z],ie=Z+1,Ce=q[ie];if(0>s(de,P))ie<Q&&0>s(Ce,de)?(q[_]=Ce,q[ie]=P,_=ie):(q[_]=de,q[Z]=P,_=Z);else if(ie<Q&&0>s(Ce,P))q[_]=Ce,q[ie]=P,_=ie;else break e}}return le}function s(q,le){var P=q.sortIndex-le.sortIndex;return P!==0?P:q.id-le.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var d=[],h=[],m=1,p=null,y=3,w=!1,k=!1,C=!1,T=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(q){for(var le=n(h);le!==null;){if(le.callback===null)i(h);else if(le.startTime<=q)i(h),le.sortIndex=le.expirationTime,t(d,le);else break;le=n(h)}}function L(q){if(C=!1,A(q),!k)if(n(d)!==null)k=!0,xe(H);else{var le=n(h);le!==null&&Ee(L,le.startTime-q)}}function H(q,le){k=!1,C&&(C=!1,E(W),W=-1),w=!0;var P=y;try{for(A(le),p=n(d);p!==null&&(!(p.expirationTime>le)||q&&!G());){var _=p.callback;if(typeof _=="function"){p.callback=null,y=p.priorityLevel;var Q=_(p.expirationTime<=le);le=e.unstable_now(),typeof Q=="function"?p.callback=Q:p===n(d)&&i(d),A(le)}else i(d);p=n(d)}if(p!==null)var R=!0;else{var Z=n(h);Z!==null&&Ee(L,Z.startTime-le),R=!1}return R}finally{p=null,y=P,w=!1}}var D=!1,Y=null,W=-1,X=5,j=-1;function G(){return!(e.unstable_now()-j<X)}function $(){if(Y!==null){var q=e.unstable_now();j=q;var le=!0;try{le=Y(!0,q)}finally{le?fe():(D=!1,Y=null)}}else D=!1}var fe;if(typeof M=="function")fe=function(){M($)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,te=se.port2;se.port1.onmessage=$,fe=function(){te.postMessage(null)}}else fe=function(){T($,0)};function xe(q){Y=q,D||(D=!0,fe())}function Ee(q,le){W=T(function(){q(e.unstable_now())},le)}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(q){q.callback=null},e.unstable_continueExecution=function(){k||w||(k=!0,xe(H))},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(q){switch(y){case 1:case 2:case 3:var le=3;break;default:le=y}var P=y;y=le;try{return q()}finally{y=P}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,le){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var P=y;y=q;try{return le()}finally{y=P}},e.unstable_scheduleCallback=function(q,le,P){var _=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?_+P:_):P=_,q){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=P+Q,q={id:m++,callback:le,priorityLevel:q,startTime:P,expirationTime:Q,sortIndex:-1},P>_?(q.sortIndex=P,t(h,q),n(d)===null&&q===n(h)&&(C?(E(W),W=-1):C=!0,Ee(L,P-_))):(q.sortIndex=Q,t(d,q),k||w||(k=!0,xe(H))),q},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(q){var le=y;return function(){var P=y;y=le;try{return q.apply(this,arguments)}finally{y=P}}}}(jc)),jc}var Ag;function Hb(){return Ag||(Ag=1,Nc.exports=Ub()),Nc.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Mg;function Wb(){if(Mg)return Gt;Mg=1;var e=Pd(),t=Hb();function n(r){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,s={};function l(r,o){a(r,o),a(r+"Capture",o)}function a(r,o){for(s[r]=o,r=0;r<o.length;r++)i.add(o[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,h=/^[: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={},p={};function y(r){return d.call(p,r)?!0:d.call(m,r)?!1:h.test(r)?p[r]=!0:(m[r]=!0,!1)}function w(r,o,u,f){if(u!==null&&u.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return f?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function k(r,o,u,f){if(o===null||typeof o>"u"||w(r,o,u,f))return!0;if(f)return!1;if(u!==null)switch(u.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function C(r,o,u,f,g,x,b){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=f,this.attributeNamespace=g,this.mustUseProperty=u,this.propertyName=r,this.type=o,this.sanitizeURL=x,this.removeEmptyString=b}var T={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){T[r]=new C(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var o=r[0];T[o]=new C(o,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){T[r]=new C(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){T[r]=new C(r,2,!1,r,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(r){T[r]=new C(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){T[r]=new C(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){T[r]=new C(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){T[r]=new C(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){T[r]=new C(r,5,!1,r.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function M(r){return r[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(r){var o=r.replace(E,M);T[o]=new C(o,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var o=r.replace(E,M);T[o]=new C(o,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var o=r.replace(E,M);T[o]=new C(o,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){T[r]=new C(r,1,!1,r.toLowerCase(),null,!1,!1)}),T.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){T[r]=new C(r,1,!1,r.toLowerCase(),null,!0,!0)});function A(r,o,u,f){var g=T.hasOwnProperty(o)?T[o]:null;(g!==null?g.type!==0:f||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(k(o,u,g,f)&&(u=null),f||g===null?y(o)&&(u===null?r.removeAttribute(o):r.setAttribute(o,""+u)):g.mustUseProperty?r[g.propertyName]=u===null?g.type===3?!1:"":u:(o=g.attributeName,f=g.attributeNamespace,u===null?r.removeAttribute(o):(g=g.type,u=g===3||g===4&&u===!0?"":""+u,f?r.setAttributeNS(f,o,u):r.setAttribute(o,u))))}var L=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,H=Symbol.for("react.element"),D=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),G=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),Ee=Symbol.for("react.offscreen"),q=Symbol.iterator;function le(r){return r===null||typeof r!="object"?null:(r=q&&r[q]||r["@@iterator"],typeof r=="function"?r:null)}var P=Object.assign,_;function Q(r){if(_===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);_=o&&o[1]||""}return`
|
|
34
|
+
`+_+r}var R=!1;function Z(r,o){if(!r||R)return"";R=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(K){var f=K}Reflect.construct(r,[],o)}else{try{o.call()}catch(K){f=K}r.call(o.prototype)}else{try{throw Error()}catch(K){f=K}r()}}catch(K){if(K&&f&&typeof K.stack=="string"){for(var g=K.stack.split(`
|
|
35
|
+
`),x=f.stack.split(`
|
|
36
|
+
`),b=g.length-1,N=x.length-1;1<=b&&0<=N&&g[b]!==x[N];)N--;for(;1<=b&&0<=N;b--,N--)if(g[b]!==x[N]){if(b!==1||N!==1)do if(b--,N--,0>N||g[b]!==x[N]){var I=`
|
|
37
|
+
`+g[b].replace(" at new "," at ");return r.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",r.displayName)),I}while(1<=b&&0<=N);break}}}finally{R=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?Q(r):""}function de(r){switch(r.tag){case 5:return Q(r.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return r=Z(r.type,!1),r;case 11:return r=Z(r.type.render,!1),r;case 1:return r=Z(r.type,!0),r;default:return""}}function ie(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case Y:return"Fragment";case D:return"Portal";case X:return"Profiler";case W:return"StrictMode";case fe:return"Suspense";case se:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case G:return(r.displayName||"Context")+".Consumer";case j:return(r._context.displayName||"Context")+".Provider";case $:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case te:return o=r.displayName||null,o!==null?o:ie(r.type)||"Memo";case xe:o=r._payload,r=r._init;try{return ie(r(o))}catch{}}return null}function Ce(r){var o=r.type;switch(r.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=o.render,r=r.displayName||r.name||"",o.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ie(o);case 8:return o===W?"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 o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function ge(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Te(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function je(r){var o=Te(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,o),f=""+r[o];if(!r.hasOwnProperty(o)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,x=u.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return g.call(this)},set:function(b){f=""+b,x.call(this,b)}}),Object.defineProperty(r,o,{enumerable:u.enumerable}),{getValue:function(){return f},setValue:function(b){f=""+b},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function Ue(r){r._valueTracker||(r._valueTracker=je(r))}function kt(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var u=o.getValue(),f="";return r&&(f=Te(r)?r.checked?"true":"false":r.value),r=f,r!==u?(o.setValue(r),!0):!1}function gt(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function It(r,o){var u=o.checked;return P({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function Jt(r,o){var u=o.defaultValue==null?"":o.defaultValue,f=o.checked!=null?o.checked:o.defaultChecked;u=ge(o.value!=null?o.value:u),r._wrapperState={initialChecked:f,initialValue:u,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Ht(r,o){o=o.checked,o!=null&&A(r,"checked",o,!1)}function it(r,o){Ht(r,o);var u=ge(o.value),f=o.type;if(u!=null)f==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(f==="submit"||f==="reset"){r.removeAttribute("value");return}o.hasOwnProperty("value")?_e(r,o.type,u):o.hasOwnProperty("defaultValue")&&_e(r,o.type,ge(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(r.defaultChecked=!!o.defaultChecked)}function _t(r,o,u){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var f=o.type;if(!(f!=="submit"&&f!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+r._wrapperState.initialValue,u||o===r.value||(r.value=o),r.defaultValue=o}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function _e(r,o,u){(o!=="number"||gt(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var ln=Array.isArray;function Lt(r,o,u,f){if(r=r.options,o){o={};for(var g=0;g<u.length;g++)o["$"+u[g]]=!0;for(u=0;u<r.length;u++)g=o.hasOwnProperty("$"+r[u].value),r[u].selected!==g&&(r[u].selected=g),g&&f&&(r[u].defaultSelected=!0)}else{for(u=""+ge(u),o=null,g=0;g<r.length;g++){if(r[g].value===u){r[g].selected=!0,f&&(r[g].defaultSelected=!0);return}o!==null||r[g].disabled||(o=r[g])}o!==null&&(o.selected=!0)}}function Dn(r,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return P({},o,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function un(r,o){var u=o.value;if(u==null){if(u=o.children,o=o.defaultValue,u!=null){if(o!=null)throw Error(n(92));if(ln(u)){if(1<u.length)throw Error(n(93));u=u[0]}o=u}o==null&&(o=""),u=o}r._wrapperState={initialValue:ge(u)}}function z(r,o){var u=ge(o.value),f=ge(o.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),o.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),f!=null&&(r.defaultValue=""+f)}function he(r){var o=r.textContent;o===r._wrapperState.initialValue&&o!==""&&o!==null&&(r.value=o)}function V(r){switch(r){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 ee(r,o){return r==null||r==="http://www.w3.org/1999/xhtml"?V(o):r==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var F,oe=function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,u,f,g){MSApp.execUnsafeLocalFunction(function(){return r(o,u,f,g)})}:r}(function(r,o){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=o;else{for(F=F||document.createElement("div"),F.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=F.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;o.firstChild;)r.appendChild(o.firstChild)}});function J(r,o){if(o){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=o;return}}r.textContent=o}var Me={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},Fe=["Webkit","ms","Moz","O"];Object.keys(Me).forEach(function(r){Fe.forEach(function(o){o=o+r.charAt(0).toUpperCase()+r.substring(1),Me[o]=Me[r]})});function pe(r,o,u){return o==null||typeof o=="boolean"||o===""?"":u||typeof o!="number"||o===0||Me.hasOwnProperty(r)&&Me[r]?(""+o).trim():o+"px"}function Ie(r,o){r=r.style;for(var u in o)if(o.hasOwnProperty(u)){var f=u.indexOf("--")===0,g=pe(u,o[u],f);u==="float"&&(u="cssFloat"),f?r.setProperty(u,g):r[u]=g}}var Tt=P({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 ot(r,o){if(o){if(Tt[r]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function Ze(r,o){if(r.indexOf("-")===-1)return typeof o.is=="string";switch(r){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 He=null;function Pt(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var oo=null,ci=null,fi=null;function Bh(r){if(r=Ro(r)){if(typeof oo!="function")throw Error(n(280));var o=r.stateNode;o&&(o=ea(o),oo(r.stateNode,r.type,o))}}function $h(r){ci?fi?fi.push(r):fi=[r]:ci=r}function Uh(){if(ci){var r=ci,o=fi;if(fi=ci=null,Bh(r),o)for(r=0;r<o.length;r++)Bh(o[r])}}function Hh(r,o){return r(o)}function Wh(){}var Wl=!1;function Kh(r,o,u){if(Wl)return r(o,u);Wl=!0;try{return Hh(r,o,u)}finally{Wl=!1,(ci!==null||fi!==null)&&(Wh(),Uh())}}function so(r,o){var u=r.stateNode;if(u===null)return null;var f=ea(u);if(f===null)return null;u=f[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(r=r.type,f=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!f;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,o,typeof u));return u}var Kl=!1;if(c)try{var ao={};Object.defineProperty(ao,"passive",{get:function(){Kl=!0}}),window.addEventListener("test",ao,ao),window.removeEventListener("test",ao,ao)}catch{Kl=!1}function Wk(r,o,u,f,g,x,b,N,I){var K=Array.prototype.slice.call(arguments,3);try{o.apply(u,K)}catch(re){this.onError(re)}}var lo=!1,js=null,Ds=!1,ql=null,Kk={onError:function(r){lo=!0,js=r}};function qk(r,o,u,f,g,x,b,N,I){lo=!1,js=null,Wk.apply(Kk,arguments)}function Xk(r,o,u,f,g,x,b,N,I){if(qk.apply(this,arguments),lo){if(lo){var K=js;lo=!1,js=null}else throw Error(n(198));Ds||(Ds=!0,ql=K)}}function _r(r){var o=r,u=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,(o.flags&4098)!==0&&(u=o.return),r=o.return;while(r)}return o.tag===3?u:null}function qh(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function Xh(r){if(_r(r)!==r)throw Error(n(188))}function Yk(r){var o=r.alternate;if(!o){if(o=_r(r),o===null)throw Error(n(188));return o!==r?null:r}for(var u=r,f=o;;){var g=u.return;if(g===null)break;var x=g.alternate;if(x===null){if(f=g.return,f!==null){u=f;continue}break}if(g.child===x.child){for(x=g.child;x;){if(x===u)return Xh(g),r;if(x===f)return Xh(g),o;x=x.sibling}throw Error(n(188))}if(u.return!==f.return)u=g,f=x;else{for(var b=!1,N=g.child;N;){if(N===u){b=!0,u=g,f=x;break}if(N===f){b=!0,f=g,u=x;break}N=N.sibling}if(!b){for(N=x.child;N;){if(N===u){b=!0,u=x,f=g;break}if(N===f){b=!0,f=x,u=g;break}N=N.sibling}if(!b)throw Error(n(189))}}if(u.alternate!==f)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:o}function Yh(r){return r=Yk(r),r!==null?Gh(r):null}function Gh(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var o=Gh(r);if(o!==null)return o;r=r.sibling}return null}var Qh=t.unstable_scheduleCallback,Zh=t.unstable_cancelCallback,Gk=t.unstable_shouldYield,Qk=t.unstable_requestPaint,lt=t.unstable_now,Zk=t.unstable_getCurrentPriorityLevel,Xl=t.unstable_ImmediatePriority,Jh=t.unstable_UserBlockingPriority,Is=t.unstable_NormalPriority,Jk=t.unstable_LowPriority,ep=t.unstable_IdlePriority,_s=null,In=null;function eS(r){if(In&&typeof In.onCommitFiberRoot=="function")try{In.onCommitFiberRoot(_s,r,void 0,(r.current.flags&128)===128)}catch{}}var kn=Math.clz32?Math.clz32:rS,tS=Math.log,nS=Math.LN2;function rS(r){return r>>>=0,r===0?32:31-(tS(r)/nS|0)|0}var Ls=64,Os=4194304;function uo(r){switch(r&-r){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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Fs(r,o){var u=r.pendingLanes;if(u===0)return 0;var f=0,g=r.suspendedLanes,x=r.pingedLanes,b=u&268435455;if(b!==0){var N=b&~g;N!==0?f=uo(N):(x&=b,x!==0&&(f=uo(x)))}else b=u&~g,b!==0?f=uo(b):x!==0&&(f=uo(x));if(f===0)return 0;if(o!==0&&o!==f&&(o&g)===0&&(g=f&-f,x=o&-o,g>=x||g===16&&(x&4194240)!==0))return o;if((f&4)!==0&&(f|=u&16),o=r.entangledLanes,o!==0)for(r=r.entanglements,o&=f;0<o;)u=31-kn(o),g=1<<u,f|=r[u],o&=~g;return f}function iS(r,o){switch(r){case 1:case 2:case 4:return o+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 o+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 oS(r,o){for(var u=r.suspendedLanes,f=r.pingedLanes,g=r.expirationTimes,x=r.pendingLanes;0<x;){var b=31-kn(x),N=1<<b,I=g[b];I===-1?((N&u)===0||(N&f)!==0)&&(g[b]=iS(N,o)):I<=o&&(r.expiredLanes|=N),x&=~N}}function Yl(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function tp(){var r=Ls;return Ls<<=1,(Ls&4194240)===0&&(Ls=64),r}function Gl(r){for(var o=[],u=0;31>u;u++)o.push(r);return o}function co(r,o,u){r.pendingLanes|=o,o!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,o=31-kn(o),r[o]=u}function sS(r,o){var u=r.pendingLanes&~o;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=o,r.mutableReadLanes&=o,r.entangledLanes&=o,o=r.entanglements;var f=r.eventTimes;for(r=r.expirationTimes;0<u;){var g=31-kn(u),x=1<<g;o[g]=0,f[g]=-1,r[g]=-1,u&=~x}}function Ql(r,o){var u=r.entangledLanes|=o;for(r=r.entanglements;u;){var f=31-kn(u),g=1<<f;g&o|r[f]&o&&(r[f]|=o),u&=~g}}var We=0;function np(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var rp,Zl,ip,op,sp,Jl=!1,zs=[],or=null,sr=null,ar=null,fo=new Map,ho=new Map,lr=[],aS="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 ap(r,o){switch(r){case"focusin":case"focusout":or=null;break;case"dragenter":case"dragleave":sr=null;break;case"mouseover":case"mouseout":ar=null;break;case"pointerover":case"pointerout":fo.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":ho.delete(o.pointerId)}}function po(r,o,u,f,g,x){return r===null||r.nativeEvent!==x?(r={blockedOn:o,domEventName:u,eventSystemFlags:f,nativeEvent:x,targetContainers:[g]},o!==null&&(o=Ro(o),o!==null&&Zl(o)),r):(r.eventSystemFlags|=f,o=r.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),r)}function lS(r,o,u,f,g){switch(o){case"focusin":return or=po(or,r,o,u,f,g),!0;case"dragenter":return sr=po(sr,r,o,u,f,g),!0;case"mouseover":return ar=po(ar,r,o,u,f,g),!0;case"pointerover":var x=g.pointerId;return fo.set(x,po(fo.get(x)||null,r,o,u,f,g)),!0;case"gotpointercapture":return x=g.pointerId,ho.set(x,po(ho.get(x)||null,r,o,u,f,g)),!0}return!1}function lp(r){var o=Lr(r.target);if(o!==null){var u=_r(o);if(u!==null){if(o=u.tag,o===13){if(o=qh(u),o!==null){r.blockedOn=o,sp(r.priority,function(){ip(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Vs(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var u=tu(r.domEventName,r.eventSystemFlags,o[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var f=new u.constructor(u.type,u);He=f,u.target.dispatchEvent(f),He=null}else return o=Ro(u),o!==null&&Zl(o),r.blockedOn=u,!1;o.shift()}return!0}function up(r,o,u){Vs(r)&&u.delete(o)}function uS(){Jl=!1,or!==null&&Vs(or)&&(or=null),sr!==null&&Vs(sr)&&(sr=null),ar!==null&&Vs(ar)&&(ar=null),fo.forEach(up),ho.forEach(up)}function mo(r,o){r.blockedOn===o&&(r.blockedOn=null,Jl||(Jl=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,uS)))}function go(r){function o(g){return mo(g,r)}if(0<zs.length){mo(zs[0],r);for(var u=1;u<zs.length;u++){var f=zs[u];f.blockedOn===r&&(f.blockedOn=null)}}for(or!==null&&mo(or,r),sr!==null&&mo(sr,r),ar!==null&&mo(ar,r),fo.forEach(o),ho.forEach(o),u=0;u<lr.length;u++)f=lr[u],f.blockedOn===r&&(f.blockedOn=null);for(;0<lr.length&&(u=lr[0],u.blockedOn===null);)lp(u),u.blockedOn===null&&lr.shift()}var di=L.ReactCurrentBatchConfig,Bs=!0;function cS(r,o,u,f){var g=We,x=di.transition;di.transition=null;try{We=1,eu(r,o,u,f)}finally{We=g,di.transition=x}}function fS(r,o,u,f){var g=We,x=di.transition;di.transition=null;try{We=4,eu(r,o,u,f)}finally{We=g,di.transition=x}}function eu(r,o,u,f){if(Bs){var g=tu(r,o,u,f);if(g===null)vu(r,o,f,$s,u),ap(r,f);else if(lS(g,r,o,u,f))f.stopPropagation();else if(ap(r,f),o&4&&-1<aS.indexOf(r)){for(;g!==null;){var x=Ro(g);if(x!==null&&rp(x),x=tu(r,o,u,f),x===null&&vu(r,o,f,$s,u),x===g)break;g=x}g!==null&&f.stopPropagation()}else vu(r,o,f,null,u)}}var $s=null;function tu(r,o,u,f){if($s=null,r=Pt(f),r=Lr(r),r!==null)if(o=_r(r),o===null)r=null;else if(u=o.tag,u===13){if(r=qh(o),r!==null)return r;r=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null);return $s=r,null}function cp(r){switch(r){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(Zk()){case Xl:return 1;case Jh:return 4;case Is:case Jk:return 16;case ep:return 536870912;default:return 16}default:return 16}}var ur=null,nu=null,Us=null;function fp(){if(Us)return Us;var r,o=nu,u=o.length,f,g="value"in ur?ur.value:ur.textContent,x=g.length;for(r=0;r<u&&o[r]===g[r];r++);var b=u-r;for(f=1;f<=b&&o[u-f]===g[x-f];f++);return Us=g.slice(r,1<f?1-f:void 0)}function Hs(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function Ws(){return!0}function dp(){return!1}function en(r){function o(u,f,g,x,b){this._reactName=u,this._targetInst=g,this.type=f,this.nativeEvent=x,this.target=b,this.currentTarget=null;for(var N in r)r.hasOwnProperty(N)&&(u=r[N],this[N]=u?u(x):x[N]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?Ws:dp,this.isPropagationStopped=dp,this}return P(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Ws)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Ws)},persist:function(){},isPersistent:Ws}),o}var hi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ru=en(hi),yo=P({},hi,{view:0,detail:0}),dS=en(yo),iu,ou,vo,Ks=P({},yo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:au,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==vo&&(vo&&r.type==="mousemove"?(iu=r.screenX-vo.screenX,ou=r.screenY-vo.screenY):ou=iu=0,vo=r),iu)},movementY:function(r){return"movementY"in r?r.movementY:ou}}),hp=en(Ks),hS=P({},Ks,{dataTransfer:0}),pS=en(hS),mS=P({},yo,{relatedTarget:0}),su=en(mS),gS=P({},hi,{animationName:0,elapsedTime:0,pseudoElement:0}),yS=en(gS),vS=P({},hi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),xS=en(vS),wS=P({},hi,{data:0}),pp=en(wS),kS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},SS={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"},bS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function CS(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=bS[r])?!!o[r]:!1}function au(){return CS}var ES=P({},yo,{key:function(r){if(r.key){var o=kS[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=Hs(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?SS[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:au,charCode:function(r){return r.type==="keypress"?Hs(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Hs(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),TS=en(ES),PS=P({},Ks,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mp=en(PS),RS=P({},yo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:au}),AS=en(RS),MS=P({},hi,{propertyName:0,elapsedTime:0,pseudoElement:0}),NS=en(MS),jS=P({},Ks,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),DS=en(jS),IS=[9,13,27,32],lu=c&&"CompositionEvent"in window,xo=null;c&&"documentMode"in document&&(xo=document.documentMode);var _S=c&&"TextEvent"in window&&!xo,gp=c&&(!lu||xo&&8<xo&&11>=xo),yp=" ",vp=!1;function xp(r,o){switch(r){case"keyup":return IS.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wp(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var pi=!1;function LS(r,o){switch(r){case"compositionend":return wp(o);case"keypress":return o.which!==32?null:(vp=!0,yp);case"textInput":return r=o.data,r===yp&&vp?null:r;default:return null}}function OS(r,o){if(pi)return r==="compositionend"||!lu&&xp(r,o)?(r=fp(),Us=nu=ur=null,pi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return gp&&o.locale!=="ko"?null:o.data;default:return null}}var FS={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 kp(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!FS[r.type]:o==="textarea"}function Sp(r,o,u,f){$h(f),o=Qs(o,"onChange"),0<o.length&&(u=new ru("onChange","change",null,u,f),r.push({event:u,listeners:o}))}var wo=null,ko=null;function zS(r){Vp(r,0)}function qs(r){var o=xi(r);if(kt(o))return r}function VS(r,o){if(r==="change")return o}var bp=!1;if(c){var uu;if(c){var cu="oninput"in document;if(!cu){var Cp=document.createElement("div");Cp.setAttribute("oninput","return;"),cu=typeof Cp.oninput=="function"}uu=cu}else uu=!1;bp=uu&&(!document.documentMode||9<document.documentMode)}function Ep(){wo&&(wo.detachEvent("onpropertychange",Tp),ko=wo=null)}function Tp(r){if(r.propertyName==="value"&&qs(ko)){var o=[];Sp(o,ko,r,Pt(r)),Kh(zS,o)}}function BS(r,o,u){r==="focusin"?(Ep(),wo=o,ko=u,wo.attachEvent("onpropertychange",Tp)):r==="focusout"&&Ep()}function $S(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return qs(ko)}function US(r,o){if(r==="click")return qs(o)}function HS(r,o){if(r==="input"||r==="change")return qs(o)}function WS(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var Sn=typeof Object.is=="function"?Object.is:WS;function So(r,o){if(Sn(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var u=Object.keys(r),f=Object.keys(o);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var g=u[f];if(!d.call(o,g)||!Sn(r[g],o[g]))return!1}return!0}function Pp(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Rp(r,o){var u=Pp(r);r=0;for(var f;u;){if(u.nodeType===3){if(f=r+u.textContent.length,r<=o&&f>=o)return{node:u,offset:o-r};r=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Pp(u)}}function Ap(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?Ap(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function Mp(){for(var r=window,o=gt();o instanceof r.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)r=o.contentWindow;else break;o=gt(r.document)}return o}function fu(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}function KS(r){var o=Mp(),u=r.focusedElem,f=r.selectionRange;if(o!==u&&u&&u.ownerDocument&&Ap(u.ownerDocument.documentElement,u)){if(f!==null&&fu(u)){if(o=f.start,r=f.end,r===void 0&&(r=o),"selectionStart"in u)u.selectionStart=o,u.selectionEnd=Math.min(r,u.value.length);else if(r=(o=u.ownerDocument||document)&&o.defaultView||window,r.getSelection){r=r.getSelection();var g=u.textContent.length,x=Math.min(f.start,g);f=f.end===void 0?x:Math.min(f.end,g),!r.extend&&x>f&&(g=f,f=x,x=g),g=Rp(u,x);var b=Rp(u,f);g&&b&&(r.rangeCount!==1||r.anchorNode!==g.node||r.anchorOffset!==g.offset||r.focusNode!==b.node||r.focusOffset!==b.offset)&&(o=o.createRange(),o.setStart(g.node,g.offset),r.removeAllRanges(),x>f?(r.addRange(o),r.extend(b.node,b.offset)):(o.setEnd(b.node,b.offset),r.addRange(o)))}}for(o=[],r=u;r=r.parentNode;)r.nodeType===1&&o.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<o.length;u++)r=o[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var qS=c&&"documentMode"in document&&11>=document.documentMode,mi=null,du=null,bo=null,hu=!1;function Np(r,o,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;hu||mi==null||mi!==gt(f)||(f=mi,"selectionStart"in f&&fu(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),bo&&So(bo,f)||(bo=f,f=Qs(du,"onSelect"),0<f.length&&(o=new ru("onSelect","select",null,o,u),r.push({event:o,listeners:f}),o.target=mi)))}function Xs(r,o){var u={};return u[r.toLowerCase()]=o.toLowerCase(),u["Webkit"+r]="webkit"+o,u["Moz"+r]="moz"+o,u}var gi={animationend:Xs("Animation","AnimationEnd"),animationiteration:Xs("Animation","AnimationIteration"),animationstart:Xs("Animation","AnimationStart"),transitionend:Xs("Transition","TransitionEnd")},pu={},jp={};c&&(jp=document.createElement("div").style,"AnimationEvent"in window||(delete gi.animationend.animation,delete gi.animationiteration.animation,delete gi.animationstart.animation),"TransitionEvent"in window||delete gi.transitionend.transition);function Ys(r){if(pu[r])return pu[r];if(!gi[r])return r;var o=gi[r],u;for(u in o)if(o.hasOwnProperty(u)&&u in jp)return pu[r]=o[u];return r}var Dp=Ys("animationend"),Ip=Ys("animationiteration"),_p=Ys("animationstart"),Lp=Ys("transitionend"),Op=new Map,Fp="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 cr(r,o){Op.set(r,o),l(o,[r])}for(var mu=0;mu<Fp.length;mu++){var gu=Fp[mu],XS=gu.toLowerCase(),YS=gu[0].toUpperCase()+gu.slice(1);cr(XS,"on"+YS)}cr(Dp,"onAnimationEnd"),cr(Ip,"onAnimationIteration"),cr(_p,"onAnimationStart"),cr("dblclick","onDoubleClick"),cr("focusin","onFocus"),cr("focusout","onBlur"),cr(Lp,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Co="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(" "),GS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Co));function zp(r,o,u){var f=r.type||"unknown-event";r.currentTarget=u,Xk(f,o,void 0,r),r.currentTarget=null}function Vp(r,o){o=(o&4)!==0;for(var u=0;u<r.length;u++){var f=r[u],g=f.event;f=f.listeners;e:{var x=void 0;if(o)for(var b=f.length-1;0<=b;b--){var N=f[b],I=N.instance,K=N.currentTarget;if(N=N.listener,I!==x&&g.isPropagationStopped())break e;zp(g,N,K),x=I}else for(b=0;b<f.length;b++){if(N=f[b],I=N.instance,K=N.currentTarget,N=N.listener,I!==x&&g.isPropagationStopped())break e;zp(g,N,K),x=I}}}if(Ds)throw r=ql,Ds=!1,ql=null,r}function Je(r,o){var u=o[Cu];u===void 0&&(u=o[Cu]=new Set);var f=r+"__bubble";u.has(f)||(Bp(o,r,2,!1),u.add(f))}function yu(r,o,u){var f=0;o&&(f|=4),Bp(u,r,f,o)}var Gs="_reactListening"+Math.random().toString(36).slice(2);function Eo(r){if(!r[Gs]){r[Gs]=!0,i.forEach(function(u){u!=="selectionchange"&&(GS.has(u)||yu(u,!1,r),yu(u,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[Gs]||(o[Gs]=!0,yu("selectionchange",!1,o))}}function Bp(r,o,u,f){switch(cp(o)){case 1:var g=cS;break;case 4:g=fS;break;default:g=eu}u=g.bind(null,o,u,r),g=void 0,!Kl||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(g=!0),f?g!==void 0?r.addEventListener(o,u,{capture:!0,passive:g}):r.addEventListener(o,u,!0):g!==void 0?r.addEventListener(o,u,{passive:g}):r.addEventListener(o,u,!1)}function vu(r,o,u,f,g){var x=f;if((o&1)===0&&(o&2)===0&&f!==null)e:for(;;){if(f===null)return;var b=f.tag;if(b===3||b===4){var N=f.stateNode.containerInfo;if(N===g||N.nodeType===8&&N.parentNode===g)break;if(b===4)for(b=f.return;b!==null;){var I=b.tag;if((I===3||I===4)&&(I=b.stateNode.containerInfo,I===g||I.nodeType===8&&I.parentNode===g))return;b=b.return}for(;N!==null;){if(b=Lr(N),b===null)return;if(I=b.tag,I===5||I===6){f=x=b;continue e}N=N.parentNode}}f=f.return}Kh(function(){var K=x,re=Pt(u),ae=[];e:{var ne=Op.get(r);if(ne!==void 0){var me=ru,we=r;switch(r){case"keypress":if(Hs(u)===0)break e;case"keydown":case"keyup":me=TS;break;case"focusin":we="focus",me=su;break;case"focusout":we="blur",me=su;break;case"beforeblur":case"afterblur":me=su;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":me=hp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=pS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=AS;break;case Dp:case Ip:case _p:me=yS;break;case Lp:me=NS;break;case"scroll":me=dS;break;case"wheel":me=DS;break;case"copy":case"cut":case"paste":me=xS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=mp}var Se=(o&4)!==0,ut=!Se&&r==="scroll",B=Se?ne!==null?ne+"Capture":null:ne;Se=[];for(var O=K,U;O!==null;){U=O;var ce=U.stateNode;if(U.tag===5&&ce!==null&&(U=ce,B!==null&&(ce=so(O,B),ce!=null&&Se.push(To(O,ce,U)))),ut)break;O=O.return}0<Se.length&&(ne=new me(ne,we,null,u,re),ae.push({event:ne,listeners:Se}))}}if((o&7)===0){e:{if(ne=r==="mouseover"||r==="pointerover",me=r==="mouseout"||r==="pointerout",ne&&u!==He&&(we=u.relatedTarget||u.fromElement)&&(Lr(we)||we[qn]))break e;if((me||ne)&&(ne=re.window===re?re:(ne=re.ownerDocument)?ne.defaultView||ne.parentWindow:window,me?(we=u.relatedTarget||u.toElement,me=K,we=we?Lr(we):null,we!==null&&(ut=_r(we),we!==ut||we.tag!==5&&we.tag!==6)&&(we=null)):(me=null,we=K),me!==we)){if(Se=hp,ce="onMouseLeave",B="onMouseEnter",O="mouse",(r==="pointerout"||r==="pointerover")&&(Se=mp,ce="onPointerLeave",B="onPointerEnter",O="pointer"),ut=me==null?ne:xi(me),U=we==null?ne:xi(we),ne=new Se(ce,O+"leave",me,u,re),ne.target=ut,ne.relatedTarget=U,ce=null,Lr(re)===K&&(Se=new Se(B,O+"enter",we,u,re),Se.target=U,Se.relatedTarget=ut,ce=Se),ut=ce,me&&we)t:{for(Se=me,B=we,O=0,U=Se;U;U=yi(U))O++;for(U=0,ce=B;ce;ce=yi(ce))U++;for(;0<O-U;)Se=yi(Se),O--;for(;0<U-O;)B=yi(B),U--;for(;O--;){if(Se===B||B!==null&&Se===B.alternate)break t;Se=yi(Se),B=yi(B)}Se=null}else Se=null;me!==null&&$p(ae,ne,me,Se,!1),we!==null&&ut!==null&&$p(ae,ut,we,Se,!0)}}e:{if(ne=K?xi(K):window,me=ne.nodeName&&ne.nodeName.toLowerCase(),me==="select"||me==="input"&&ne.type==="file")var be=VS;else if(kp(ne))if(bp)be=HS;else{be=$S;var Pe=BS}else(me=ne.nodeName)&&me.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(be=US);if(be&&(be=be(r,K))){Sp(ae,be,u,re);break e}Pe&&Pe(r,ne,K),r==="focusout"&&(Pe=ne._wrapperState)&&Pe.controlled&&ne.type==="number"&&_e(ne,"number",ne.value)}switch(Pe=K?xi(K):window,r){case"focusin":(kp(Pe)||Pe.contentEditable==="true")&&(mi=Pe,du=K,bo=null);break;case"focusout":bo=du=mi=null;break;case"mousedown":hu=!0;break;case"contextmenu":case"mouseup":case"dragend":hu=!1,Np(ae,u,re);break;case"selectionchange":if(qS)break;case"keydown":case"keyup":Np(ae,u,re)}var Re;if(lu)e:{switch(r){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else pi?xp(r,u)&&(Ne="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ne="onCompositionStart");Ne&&(gp&&u.locale!=="ko"&&(pi||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&pi&&(Re=fp()):(ur=re,nu="value"in ur?ur.value:ur.textContent,pi=!0)),Pe=Qs(K,Ne),0<Pe.length&&(Ne=new pp(Ne,r,null,u,re),ae.push({event:Ne,listeners:Pe}),Re?Ne.data=Re:(Re=wp(u),Re!==null&&(Ne.data=Re)))),(Re=_S?LS(r,u):OS(r,u))&&(K=Qs(K,"onBeforeInput"),0<K.length&&(re=new pp("onBeforeInput","beforeinput",null,u,re),ae.push({event:re,listeners:K}),re.data=Re))}Vp(ae,o)})}function To(r,o,u){return{instance:r,listener:o,currentTarget:u}}function Qs(r,o){for(var u=o+"Capture",f=[];r!==null;){var g=r,x=g.stateNode;g.tag===5&&x!==null&&(g=x,x=so(r,u),x!=null&&f.unshift(To(r,x,g)),x=so(r,o),x!=null&&f.push(To(r,x,g))),r=r.return}return f}function yi(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function $p(r,o,u,f,g){for(var x=o._reactName,b=[];u!==null&&u!==f;){var N=u,I=N.alternate,K=N.stateNode;if(I!==null&&I===f)break;N.tag===5&&K!==null&&(N=K,g?(I=so(u,x),I!=null&&b.unshift(To(u,I,N))):g||(I=so(u,x),I!=null&&b.push(To(u,I,N)))),u=u.return}b.length!==0&&r.push({event:o,listeners:b})}var QS=/\r\n?/g,ZS=/\u0000|\uFFFD/g;function Up(r){return(typeof r=="string"?r:""+r).replace(QS,`
|
|
38
|
+
`).replace(ZS,"")}function Zs(r,o,u){if(o=Up(o),Up(r)!==o&&u)throw Error(n(425))}function Js(){}var xu=null,wu=null;function ku(r,o){return r==="textarea"||r==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Su=typeof setTimeout=="function"?setTimeout:void 0,JS=typeof clearTimeout=="function"?clearTimeout:void 0,Hp=typeof Promise=="function"?Promise:void 0,eb=typeof queueMicrotask=="function"?queueMicrotask:typeof Hp<"u"?function(r){return Hp.resolve(null).then(r).catch(tb)}:Su;function tb(r){setTimeout(function(){throw r})}function bu(r,o){var u=o,f=0;do{var g=u.nextSibling;if(r.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"){if(f===0){r.removeChild(g),go(o);return}f--}else u!=="$"&&u!=="$?"&&u!=="$!"||f++;u=g}while(u);go(o)}function fr(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return r}function Wp(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(o===0)return r;o--}else u==="/$"&&o++}r=r.previousSibling}return null}var vi=Math.random().toString(36).slice(2),_n="__reactFiber$"+vi,Po="__reactProps$"+vi,qn="__reactContainer$"+vi,Cu="__reactEvents$"+vi,nb="__reactListeners$"+vi,rb="__reactHandles$"+vi;function Lr(r){var o=r[_n];if(o)return o;for(var u=r.parentNode;u;){if(o=u[qn]||u[_n]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(r=Wp(r);r!==null;){if(u=r[_n])return u;r=Wp(r)}return o}r=u,u=r.parentNode}return null}function Ro(r){return r=r[_n]||r[qn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function xi(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function ea(r){return r[Po]||null}var Eu=[],wi=-1;function dr(r){return{current:r}}function et(r){0>wi||(r.current=Eu[wi],Eu[wi]=null,wi--)}function Ge(r,o){wi++,Eu[wi]=r.current,r.current=o}var hr={},Rt=dr(hr),Wt=dr(!1),Or=hr;function ki(r,o){var u=r.type.contextTypes;if(!u)return hr;var f=r.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===o)return f.__reactInternalMemoizedMaskedChildContext;var g={},x;for(x in u)g[x]=o[x];return f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=o,r.__reactInternalMemoizedMaskedChildContext=g),g}function Kt(r){return r=r.childContextTypes,r!=null}function ta(){et(Wt),et(Rt)}function Kp(r,o,u){if(Rt.current!==hr)throw Error(n(168));Ge(Rt,o),Ge(Wt,u)}function qp(r,o,u){var f=r.stateNode;if(o=o.childContextTypes,typeof f.getChildContext!="function")return u;f=f.getChildContext();for(var g in f)if(!(g in o))throw Error(n(108,Ce(r)||"Unknown",g));return P({},u,f)}function na(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||hr,Or=Rt.current,Ge(Rt,r),Ge(Wt,Wt.current),!0}function Xp(r,o,u){var f=r.stateNode;if(!f)throw Error(n(169));u?(r=qp(r,o,Or),f.__reactInternalMemoizedMergedChildContext=r,et(Wt),et(Rt),Ge(Rt,r)):et(Wt),Ge(Wt,u)}var Xn=null,ra=!1,Tu=!1;function Yp(r){Xn===null?Xn=[r]:Xn.push(r)}function ib(r){ra=!0,Yp(r)}function pr(){if(!Tu&&Xn!==null){Tu=!0;var r=0,o=We;try{var u=Xn;for(We=1;r<u.length;r++){var f=u[r];do f=f(!0);while(f!==null)}Xn=null,ra=!1}catch(g){throw Xn!==null&&(Xn=Xn.slice(r+1)),Qh(Xl,pr),g}finally{We=o,Tu=!1}}return null}var Si=[],bi=0,ia=null,oa=0,cn=[],fn=0,Fr=null,Yn=1,Gn="";function zr(r,o){Si[bi++]=oa,Si[bi++]=ia,ia=r,oa=o}function Gp(r,o,u){cn[fn++]=Yn,cn[fn++]=Gn,cn[fn++]=Fr,Fr=r;var f=Yn;r=Gn;var g=32-kn(f)-1;f&=~(1<<g),u+=1;var x=32-kn(o)+g;if(30<x){var b=g-g%5;x=(f&(1<<b)-1).toString(32),f>>=b,g-=b,Yn=1<<32-kn(o)+g|u<<g|f,Gn=x+r}else Yn=1<<x|u<<g|f,Gn=r}function Pu(r){r.return!==null&&(zr(r,1),Gp(r,1,0))}function Ru(r){for(;r===ia;)ia=Si[--bi],Si[bi]=null,oa=Si[--bi],Si[bi]=null;for(;r===Fr;)Fr=cn[--fn],cn[fn]=null,Gn=cn[--fn],cn[fn]=null,Yn=cn[--fn],cn[fn]=null}var tn=null,nn=null,tt=!1,bn=null;function Qp(r,o){var u=mn(5,null,null,0);u.elementType="DELETED",u.stateNode=o,u.return=r,o=r.deletions,o===null?(r.deletions=[u],r.flags|=16):o.push(u)}function Zp(r,o){switch(r.tag){case 5:var u=r.type;return o=o.nodeType!==1||u.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(r.stateNode=o,tn=r,nn=fr(o.firstChild),!0):!1;case 6:return o=r.pendingProps===""||o.nodeType!==3?null:o,o!==null?(r.stateNode=o,tn=r,nn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(u=Fr!==null?{id:Yn,overflow:Gn}:null,r.memoizedState={dehydrated:o,treeContext:u,retryLane:1073741824},u=mn(18,null,null,0),u.stateNode=o,u.return=r,r.child=u,tn=r,nn=null,!0):!1;default:return!1}}function Au(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Mu(r){if(tt){var o=nn;if(o){var u=o;if(!Zp(r,o)){if(Au(r))throw Error(n(418));o=fr(u.nextSibling);var f=tn;o&&Zp(r,o)?Qp(f,u):(r.flags=r.flags&-4097|2,tt=!1,tn=r)}}else{if(Au(r))throw Error(n(418));r.flags=r.flags&-4097|2,tt=!1,tn=r}}}function Jp(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;tn=r}function sa(r){if(r!==tn)return!1;if(!tt)return Jp(r),tt=!0,!1;var o;if((o=r.tag!==3)&&!(o=r.tag!==5)&&(o=r.type,o=o!=="head"&&o!=="body"&&!ku(r.type,r.memoizedProps)),o&&(o=nn)){if(Au(r))throw em(),Error(n(418));for(;o;)Qp(r,o),o=fr(o.nextSibling)}if(Jp(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(o===0){nn=fr(r.nextSibling);break e}o--}else u!=="$"&&u!=="$!"&&u!=="$?"||o++}r=r.nextSibling}nn=null}}else nn=tn?fr(r.stateNode.nextSibling):null;return!0}function em(){for(var r=nn;r;)r=fr(r.nextSibling)}function Ci(){nn=tn=null,tt=!1}function Nu(r){bn===null?bn=[r]:bn.push(r)}var ob=L.ReactCurrentBatchConfig;function Ao(r,o,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var f=u.stateNode}if(!f)throw Error(n(147,r));var g=f,x=""+r;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===x?o.ref:(o=function(b){var N=g.refs;b===null?delete N[x]:N[x]=b},o._stringRef=x,o)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function aa(r,o){throw r=Object.prototype.toString.call(o),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r))}function tm(r){var o=r._init;return o(r._payload)}function nm(r){function o(B,O){if(r){var U=B.deletions;U===null?(B.deletions=[O],B.flags|=16):U.push(O)}}function u(B,O){if(!r)return null;for(;O!==null;)o(B,O),O=O.sibling;return null}function f(B,O){for(B=new Map;O!==null;)O.key!==null?B.set(O.key,O):B.set(O.index,O),O=O.sibling;return B}function g(B,O){return B=Sr(B,O),B.index=0,B.sibling=null,B}function x(B,O,U){return B.index=U,r?(U=B.alternate,U!==null?(U=U.index,U<O?(B.flags|=2,O):U):(B.flags|=2,O)):(B.flags|=1048576,O)}function b(B){return r&&B.alternate===null&&(B.flags|=2),B}function N(B,O,U,ce){return O===null||O.tag!==6?(O=Sc(U,B.mode,ce),O.return=B,O):(O=g(O,U),O.return=B,O)}function I(B,O,U,ce){var be=U.type;return be===Y?re(B,O,U.props.children,ce,U.key):O!==null&&(O.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===xe&&tm(be)===O.type)?(ce=g(O,U.props),ce.ref=Ao(B,O,U),ce.return=B,ce):(ce=Na(U.type,U.key,U.props,null,B.mode,ce),ce.ref=Ao(B,O,U),ce.return=B,ce)}function K(B,O,U,ce){return O===null||O.tag!==4||O.stateNode.containerInfo!==U.containerInfo||O.stateNode.implementation!==U.implementation?(O=bc(U,B.mode,ce),O.return=B,O):(O=g(O,U.children||[]),O.return=B,O)}function re(B,O,U,ce,be){return O===null||O.tag!==7?(O=qr(U,B.mode,ce,be),O.return=B,O):(O=g(O,U),O.return=B,O)}function ae(B,O,U){if(typeof O=="string"&&O!==""||typeof O=="number")return O=Sc(""+O,B.mode,U),O.return=B,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case H:return U=Na(O.type,O.key,O.props,null,B.mode,U),U.ref=Ao(B,null,O),U.return=B,U;case D:return O=bc(O,B.mode,U),O.return=B,O;case xe:var ce=O._init;return ae(B,ce(O._payload),U)}if(ln(O)||le(O))return O=qr(O,B.mode,U,null),O.return=B,O;aa(B,O)}return null}function ne(B,O,U,ce){var be=O!==null?O.key:null;if(typeof U=="string"&&U!==""||typeof U=="number")return be!==null?null:N(B,O,""+U,ce);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case H:return U.key===be?I(B,O,U,ce):null;case D:return U.key===be?K(B,O,U,ce):null;case xe:return be=U._init,ne(B,O,be(U._payload),ce)}if(ln(U)||le(U))return be!==null?null:re(B,O,U,ce,null);aa(B,U)}return null}function me(B,O,U,ce,be){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return B=B.get(U)||null,N(O,B,""+ce,be);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case H:return B=B.get(ce.key===null?U:ce.key)||null,I(O,B,ce,be);case D:return B=B.get(ce.key===null?U:ce.key)||null,K(O,B,ce,be);case xe:var Pe=ce._init;return me(B,O,U,Pe(ce._payload),be)}if(ln(ce)||le(ce))return B=B.get(U)||null,re(O,B,ce,be,null);aa(O,ce)}return null}function we(B,O,U,ce){for(var be=null,Pe=null,Re=O,Ne=O=0,xt=null;Re!==null&&Ne<U.length;Ne++){Re.index>Ne?(xt=Re,Re=null):xt=Re.sibling;var $e=ne(B,Re,U[Ne],ce);if($e===null){Re===null&&(Re=xt);break}r&&Re&&$e.alternate===null&&o(B,Re),O=x($e,O,Ne),Pe===null?be=$e:Pe.sibling=$e,Pe=$e,Re=xt}if(Ne===U.length)return u(B,Re),tt&&zr(B,Ne),be;if(Re===null){for(;Ne<U.length;Ne++)Re=ae(B,U[Ne],ce),Re!==null&&(O=x(Re,O,Ne),Pe===null?be=Re:Pe.sibling=Re,Pe=Re);return tt&&zr(B,Ne),be}for(Re=f(B,Re);Ne<U.length;Ne++)xt=me(Re,B,Ne,U[Ne],ce),xt!==null&&(r&&xt.alternate!==null&&Re.delete(xt.key===null?Ne:xt.key),O=x(xt,O,Ne),Pe===null?be=xt:Pe.sibling=xt,Pe=xt);return r&&Re.forEach(function(br){return o(B,br)}),tt&&zr(B,Ne),be}function Se(B,O,U,ce){var be=le(U);if(typeof be!="function")throw Error(n(150));if(U=be.call(U),U==null)throw Error(n(151));for(var Pe=be=null,Re=O,Ne=O=0,xt=null,$e=U.next();Re!==null&&!$e.done;Ne++,$e=U.next()){Re.index>Ne?(xt=Re,Re=null):xt=Re.sibling;var br=ne(B,Re,$e.value,ce);if(br===null){Re===null&&(Re=xt);break}r&&Re&&br.alternate===null&&o(B,Re),O=x(br,O,Ne),Pe===null?be=br:Pe.sibling=br,Pe=br,Re=xt}if($e.done)return u(B,Re),tt&&zr(B,Ne),be;if(Re===null){for(;!$e.done;Ne++,$e=U.next())$e=ae(B,$e.value,ce),$e!==null&&(O=x($e,O,Ne),Pe===null?be=$e:Pe.sibling=$e,Pe=$e);return tt&&zr(B,Ne),be}for(Re=f(B,Re);!$e.done;Ne++,$e=U.next())$e=me(Re,B,Ne,$e.value,ce),$e!==null&&(r&&$e.alternate!==null&&Re.delete($e.key===null?Ne:$e.key),O=x($e,O,Ne),Pe===null?be=$e:Pe.sibling=$e,Pe=$e);return r&&Re.forEach(function(Fb){return o(B,Fb)}),tt&&zr(B,Ne),be}function ut(B,O,U,ce){if(typeof U=="object"&&U!==null&&U.type===Y&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case H:e:{for(var be=U.key,Pe=O;Pe!==null;){if(Pe.key===be){if(be=U.type,be===Y){if(Pe.tag===7){u(B,Pe.sibling),O=g(Pe,U.props.children),O.return=B,B=O;break e}}else if(Pe.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===xe&&tm(be)===Pe.type){u(B,Pe.sibling),O=g(Pe,U.props),O.ref=Ao(B,Pe,U),O.return=B,B=O;break e}u(B,Pe);break}else o(B,Pe);Pe=Pe.sibling}U.type===Y?(O=qr(U.props.children,B.mode,ce,U.key),O.return=B,B=O):(ce=Na(U.type,U.key,U.props,null,B.mode,ce),ce.ref=Ao(B,O,U),ce.return=B,B=ce)}return b(B);case D:e:{for(Pe=U.key;O!==null;){if(O.key===Pe)if(O.tag===4&&O.stateNode.containerInfo===U.containerInfo&&O.stateNode.implementation===U.implementation){u(B,O.sibling),O=g(O,U.children||[]),O.return=B,B=O;break e}else{u(B,O);break}else o(B,O);O=O.sibling}O=bc(U,B.mode,ce),O.return=B,B=O}return b(B);case xe:return Pe=U._init,ut(B,O,Pe(U._payload),ce)}if(ln(U))return we(B,O,U,ce);if(le(U))return Se(B,O,U,ce);aa(B,U)}return typeof U=="string"&&U!==""||typeof U=="number"?(U=""+U,O!==null&&O.tag===6?(u(B,O.sibling),O=g(O,U),O.return=B,B=O):(u(B,O),O=Sc(U,B.mode,ce),O.return=B,B=O),b(B)):u(B,O)}return ut}var Ei=nm(!0),rm=nm(!1),la=dr(null),ua=null,Ti=null,ju=null;function Du(){ju=Ti=ua=null}function Iu(r){var o=la.current;et(la),r._currentValue=o}function _u(r,o,u){for(;r!==null;){var f=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,f!==null&&(f.childLanes|=o)):f!==null&&(f.childLanes&o)!==o&&(f.childLanes|=o),r===u)break;r=r.return}}function Pi(r,o){ua=r,ju=Ti=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&o)!==0&&(qt=!0),r.firstContext=null)}function dn(r){var o=r._currentValue;if(ju!==r)if(r={context:r,memoizedValue:o,next:null},Ti===null){if(ua===null)throw Error(n(308));Ti=r,ua.dependencies={lanes:0,firstContext:r}}else Ti=Ti.next=r;return o}var Vr=null;function Lu(r){Vr===null?Vr=[r]:Vr.push(r)}function im(r,o,u,f){var g=o.interleaved;return g===null?(u.next=u,Lu(o)):(u.next=g.next,g.next=u),o.interleaved=u,Qn(r,f)}function Qn(r,o){r.lanes|=o;var u=r.alternate;for(u!==null&&(u.lanes|=o),u=r,r=r.return;r!==null;)r.childLanes|=o,u=r.alternate,u!==null&&(u.childLanes|=o),u=r,r=r.return;return u.tag===3?u.stateNode:null}var mr=!1;function Ou(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function om(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Zn(r,o){return{eventTime:r,lane:o,tag:0,payload:null,callback:null,next:null}}function gr(r,o,u){var f=r.updateQueue;if(f===null)return null;if(f=f.shared,(Be&2)!==0){var g=f.pending;return g===null?o.next=o:(o.next=g.next,g.next=o),f.pending=o,Qn(r,u)}return g=f.interleaved,g===null?(o.next=o,Lu(f)):(o.next=g.next,g.next=o),f.interleaved=o,Qn(r,u)}function ca(r,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194240)!==0)){var f=o.lanes;f&=r.pendingLanes,u|=f,o.lanes=u,Ql(r,u)}}function sm(r,o){var u=r.updateQueue,f=r.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var g=null,x=null;if(u=u.firstBaseUpdate,u!==null){do{var b={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};x===null?g=x=b:x=x.next=b,u=u.next}while(u!==null);x===null?g=x=o:x=x.next=o}else g=x=o;u={baseState:f.baseState,firstBaseUpdate:g,lastBaseUpdate:x,shared:f.shared,effects:f.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=o:r.next=o,u.lastBaseUpdate=o}function fa(r,o,u,f){var g=r.updateQueue;mr=!1;var x=g.firstBaseUpdate,b=g.lastBaseUpdate,N=g.shared.pending;if(N!==null){g.shared.pending=null;var I=N,K=I.next;I.next=null,b===null?x=K:b.next=K,b=I;var re=r.alternate;re!==null&&(re=re.updateQueue,N=re.lastBaseUpdate,N!==b&&(N===null?re.firstBaseUpdate=K:N.next=K,re.lastBaseUpdate=I))}if(x!==null){var ae=g.baseState;b=0,re=K=I=null,N=x;do{var ne=N.lane,me=N.eventTime;if((f&ne)===ne){re!==null&&(re=re.next={eventTime:me,lane:0,tag:N.tag,payload:N.payload,callback:N.callback,next:null});e:{var we=r,Se=N;switch(ne=o,me=u,Se.tag){case 1:if(we=Se.payload,typeof we=="function"){ae=we.call(me,ae,ne);break e}ae=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Se.payload,ne=typeof we=="function"?we.call(me,ae,ne):we,ne==null)break e;ae=P({},ae,ne);break e;case 2:mr=!0}}N.callback!==null&&N.lane!==0&&(r.flags|=64,ne=g.effects,ne===null?g.effects=[N]:ne.push(N))}else me={eventTime:me,lane:ne,tag:N.tag,payload:N.payload,callback:N.callback,next:null},re===null?(K=re=me,I=ae):re=re.next=me,b|=ne;if(N=N.next,N===null){if(N=g.shared.pending,N===null)break;ne=N,N=ne.next,ne.next=null,g.lastBaseUpdate=ne,g.shared.pending=null}}while(!0);if(re===null&&(I=ae),g.baseState=I,g.firstBaseUpdate=K,g.lastBaseUpdate=re,o=g.shared.interleaved,o!==null){g=o;do b|=g.lane,g=g.next;while(g!==o)}else x===null&&(g.shared.lanes=0);Ur|=b,r.lanes=b,r.memoizedState=ae}}function am(r,o,u){if(r=o.effects,o.effects=null,r!==null)for(o=0;o<r.length;o++){var f=r[o],g=f.callback;if(g!==null){if(f.callback=null,f=u,typeof g!="function")throw Error(n(191,g));g.call(f)}}}var Mo={},Ln=dr(Mo),No=dr(Mo),jo=dr(Mo);function Br(r){if(r===Mo)throw Error(n(174));return r}function Fu(r,o){switch(Ge(jo,o),Ge(No,r),Ge(Ln,Mo),r=o.nodeType,r){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ee(null,"");break;default:r=r===8?o.parentNode:o,o=r.namespaceURI||null,r=r.tagName,o=ee(o,r)}et(Ln),Ge(Ln,o)}function Ri(){et(Ln),et(No),et(jo)}function lm(r){Br(jo.current);var o=Br(Ln.current),u=ee(o,r.type);o!==u&&(Ge(No,r),Ge(Ln,u))}function zu(r){No.current===r&&(et(Ln),et(No))}var nt=dr(0);function da(r){for(var o=r;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Vu=[];function Bu(){for(var r=0;r<Vu.length;r++)Vu[r]._workInProgressVersionPrimary=null;Vu.length=0}var ha=L.ReactCurrentDispatcher,$u=L.ReactCurrentBatchConfig,$r=0,rt=null,ht=null,yt=null,pa=!1,Do=!1,Io=0,sb=0;function At(){throw Error(n(321))}function Uu(r,o){if(o===null)return!1;for(var u=0;u<o.length&&u<r.length;u++)if(!Sn(r[u],o[u]))return!1;return!0}function Hu(r,o,u,f,g,x){if($r=x,rt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,ha.current=r===null||r.memoizedState===null?cb:fb,r=u(f,g),Do){x=0;do{if(Do=!1,Io=0,25<=x)throw Error(n(301));x+=1,yt=ht=null,o.updateQueue=null,ha.current=db,r=u(f,g)}while(Do)}if(ha.current=ya,o=ht!==null&&ht.next!==null,$r=0,yt=ht=rt=null,pa=!1,o)throw Error(n(300));return r}function Wu(){var r=Io!==0;return Io=0,r}function On(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?rt.memoizedState=yt=r:yt=yt.next=r,yt}function hn(){if(ht===null){var r=rt.alternate;r=r!==null?r.memoizedState:null}else r=ht.next;var o=yt===null?rt.memoizedState:yt.next;if(o!==null)yt=o,ht=r;else{if(r===null)throw Error(n(310));ht=r,r={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},yt===null?rt.memoizedState=yt=r:yt=yt.next=r}return yt}function _o(r,o){return typeof o=="function"?o(r):o}function Ku(r){var o=hn(),u=o.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=ht,g=f.baseQueue,x=u.pending;if(x!==null){if(g!==null){var b=g.next;g.next=x.next,x.next=b}f.baseQueue=g=x,u.pending=null}if(g!==null){x=g.next,f=f.baseState;var N=b=null,I=null,K=x;do{var re=K.lane;if(($r&re)===re)I!==null&&(I=I.next={lane:0,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),f=K.hasEagerState?K.eagerState:r(f,K.action);else{var ae={lane:re,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null};I===null?(N=I=ae,b=f):I=I.next=ae,rt.lanes|=re,Ur|=re}K=K.next}while(K!==null&&K!==x);I===null?b=f:I.next=N,Sn(f,o.memoizedState)||(qt=!0),o.memoizedState=f,o.baseState=b,o.baseQueue=I,u.lastRenderedState=f}if(r=u.interleaved,r!==null){g=r;do x=g.lane,rt.lanes|=x,Ur|=x,g=g.next;while(g!==r)}else g===null&&(u.lanes=0);return[o.memoizedState,u.dispatch]}function qu(r){var o=hn(),u=o.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=u.dispatch,g=u.pending,x=o.memoizedState;if(g!==null){u.pending=null;var b=g=g.next;do x=r(x,b.action),b=b.next;while(b!==g);Sn(x,o.memoizedState)||(qt=!0),o.memoizedState=x,o.baseQueue===null&&(o.baseState=x),u.lastRenderedState=x}return[x,f]}function um(){}function cm(r,o){var u=rt,f=hn(),g=o(),x=!Sn(f.memoizedState,g);if(x&&(f.memoizedState=g,qt=!0),f=f.queue,Xu(hm.bind(null,u,f,r),[r]),f.getSnapshot!==o||x||yt!==null&&yt.memoizedState.tag&1){if(u.flags|=2048,Lo(9,dm.bind(null,u,f,g,o),void 0,null),vt===null)throw Error(n(349));($r&30)!==0||fm(u,o,g)}return g}function fm(r,o,u){r.flags|=16384,r={getSnapshot:o,value:u},o=rt.updateQueue,o===null?(o={lastEffect:null,stores:null},rt.updateQueue=o,o.stores=[r]):(u=o.stores,u===null?o.stores=[r]:u.push(r))}function dm(r,o,u,f){o.value=u,o.getSnapshot=f,pm(o)&&mm(r)}function hm(r,o,u){return u(function(){pm(o)&&mm(r)})}function pm(r){var o=r.getSnapshot;r=r.value;try{var u=o();return!Sn(r,u)}catch{return!0}}function mm(r){var o=Qn(r,1);o!==null&&Pn(o,r,1,-1)}function gm(r){var o=On();return typeof r=="function"&&(r=r()),o.memoizedState=o.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_o,lastRenderedState:r},o.queue=r,r=r.dispatch=ub.bind(null,rt,r),[o.memoizedState,r]}function Lo(r,o,u,f){return r={tag:r,create:o,destroy:u,deps:f,next:null},o=rt.updateQueue,o===null?(o={lastEffect:null,stores:null},rt.updateQueue=o,o.lastEffect=r.next=r):(u=o.lastEffect,u===null?o.lastEffect=r.next=r:(f=u.next,u.next=r,r.next=f,o.lastEffect=r)),r}function ym(){return hn().memoizedState}function ma(r,o,u,f){var g=On();rt.flags|=r,g.memoizedState=Lo(1|o,u,void 0,f===void 0?null:f)}function ga(r,o,u,f){var g=hn();f=f===void 0?null:f;var x=void 0;if(ht!==null){var b=ht.memoizedState;if(x=b.destroy,f!==null&&Uu(f,b.deps)){g.memoizedState=Lo(o,u,x,f);return}}rt.flags|=r,g.memoizedState=Lo(1|o,u,x,f)}function vm(r,o){return ma(8390656,8,r,o)}function Xu(r,o){return ga(2048,8,r,o)}function xm(r,o){return ga(4,2,r,o)}function wm(r,o){return ga(4,4,r,o)}function km(r,o){if(typeof o=="function")return r=r(),o(r),function(){o(null)};if(o!=null)return r=r(),o.current=r,function(){o.current=null}}function Sm(r,o,u){return u=u!=null?u.concat([r]):null,ga(4,4,km.bind(null,o,r),u)}function Yu(){}function bm(r,o){var u=hn();o=o===void 0?null:o;var f=u.memoizedState;return f!==null&&o!==null&&Uu(o,f[1])?f[0]:(u.memoizedState=[r,o],r)}function Cm(r,o){var u=hn();o=o===void 0?null:o;var f=u.memoizedState;return f!==null&&o!==null&&Uu(o,f[1])?f[0]:(r=r(),u.memoizedState=[r,o],r)}function Em(r,o,u){return($r&21)===0?(r.baseState&&(r.baseState=!1,qt=!0),r.memoizedState=u):(Sn(u,o)||(u=tp(),rt.lanes|=u,Ur|=u,r.baseState=!0),o)}function ab(r,o){var u=We;We=u!==0&&4>u?u:4,r(!0);var f=$u.transition;$u.transition={};try{r(!1),o()}finally{We=u,$u.transition=f}}function Tm(){return hn().memoizedState}function lb(r,o,u){var f=wr(r);if(u={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null},Pm(r))Rm(o,u);else if(u=im(r,o,u,f),u!==null){var g=Ft();Pn(u,r,f,g),Am(u,o,f)}}function ub(r,o,u){var f=wr(r),g={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null};if(Pm(r))Rm(o,g);else{var x=r.alternate;if(r.lanes===0&&(x===null||x.lanes===0)&&(x=o.lastRenderedReducer,x!==null))try{var b=o.lastRenderedState,N=x(b,u);if(g.hasEagerState=!0,g.eagerState=N,Sn(N,b)){var I=o.interleaved;I===null?(g.next=g,Lu(o)):(g.next=I.next,I.next=g),o.interleaved=g;return}}catch{}finally{}u=im(r,o,g,f),u!==null&&(g=Ft(),Pn(u,r,f,g),Am(u,o,f))}}function Pm(r){var o=r.alternate;return r===rt||o!==null&&o===rt}function Rm(r,o){Do=pa=!0;var u=r.pending;u===null?o.next=o:(o.next=u.next,u.next=o),r.pending=o}function Am(r,o,u){if((u&4194240)!==0){var f=o.lanes;f&=r.pendingLanes,u|=f,o.lanes=u,Ql(r,u)}}var ya={readContext:dn,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useInsertionEffect:At,useLayoutEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useMutableSource:At,useSyncExternalStore:At,useId:At,unstable_isNewReconciler:!1},cb={readContext:dn,useCallback:function(r,o){return On().memoizedState=[r,o===void 0?null:o],r},useContext:dn,useEffect:vm,useImperativeHandle:function(r,o,u){return u=u!=null?u.concat([r]):null,ma(4194308,4,km.bind(null,o,r),u)},useLayoutEffect:function(r,o){return ma(4194308,4,r,o)},useInsertionEffect:function(r,o){return ma(4,2,r,o)},useMemo:function(r,o){var u=On();return o=o===void 0?null:o,r=r(),u.memoizedState=[r,o],r},useReducer:function(r,o,u){var f=On();return o=u!==void 0?u(o):o,f.memoizedState=f.baseState=o,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:o},f.queue=r,r=r.dispatch=lb.bind(null,rt,r),[f.memoizedState,r]},useRef:function(r){var o=On();return r={current:r},o.memoizedState=r},useState:gm,useDebugValue:Yu,useDeferredValue:function(r){return On().memoizedState=r},useTransition:function(){var r=gm(!1),o=r[0];return r=ab.bind(null,r[1]),On().memoizedState=r,[o,r]},useMutableSource:function(){},useSyncExternalStore:function(r,o,u){var f=rt,g=On();if(tt){if(u===void 0)throw Error(n(407));u=u()}else{if(u=o(),vt===null)throw Error(n(349));($r&30)!==0||fm(f,o,u)}g.memoizedState=u;var x={value:u,getSnapshot:o};return g.queue=x,vm(hm.bind(null,f,x,r),[r]),f.flags|=2048,Lo(9,dm.bind(null,f,x,u,o),void 0,null),u},useId:function(){var r=On(),o=vt.identifierPrefix;if(tt){var u=Gn,f=Yn;u=(f&~(1<<32-kn(f)-1)).toString(32)+u,o=":"+o+"R"+u,u=Io++,0<u&&(o+="H"+u.toString(32)),o+=":"}else u=sb++,o=":"+o+"r"+u.toString(32)+":";return r.memoizedState=o},unstable_isNewReconciler:!1},fb={readContext:dn,useCallback:bm,useContext:dn,useEffect:Xu,useImperativeHandle:Sm,useInsertionEffect:xm,useLayoutEffect:wm,useMemo:Cm,useReducer:Ku,useRef:ym,useState:function(){return Ku(_o)},useDebugValue:Yu,useDeferredValue:function(r){var o=hn();return Em(o,ht.memoizedState,r)},useTransition:function(){var r=Ku(_o)[0],o=hn().memoizedState;return[r,o]},useMutableSource:um,useSyncExternalStore:cm,useId:Tm,unstable_isNewReconciler:!1},db={readContext:dn,useCallback:bm,useContext:dn,useEffect:Xu,useImperativeHandle:Sm,useInsertionEffect:xm,useLayoutEffect:wm,useMemo:Cm,useReducer:qu,useRef:ym,useState:function(){return qu(_o)},useDebugValue:Yu,useDeferredValue:function(r){var o=hn();return ht===null?o.memoizedState=r:Em(o,ht.memoizedState,r)},useTransition:function(){var r=qu(_o)[0],o=hn().memoizedState;return[r,o]},useMutableSource:um,useSyncExternalStore:cm,useId:Tm,unstable_isNewReconciler:!1};function Cn(r,o){if(r&&r.defaultProps){o=P({},o),r=r.defaultProps;for(var u in r)o[u]===void 0&&(o[u]=r[u]);return o}return o}function Gu(r,o,u,f){o=r.memoizedState,u=u(f,o),u=u==null?o:P({},o,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var va={isMounted:function(r){return(r=r._reactInternals)?_r(r)===r:!1},enqueueSetState:function(r,o,u){r=r._reactInternals;var f=Ft(),g=wr(r),x=Zn(f,g);x.payload=o,u!=null&&(x.callback=u),o=gr(r,x,g),o!==null&&(Pn(o,r,g,f),ca(o,r,g))},enqueueReplaceState:function(r,o,u){r=r._reactInternals;var f=Ft(),g=wr(r),x=Zn(f,g);x.tag=1,x.payload=o,u!=null&&(x.callback=u),o=gr(r,x,g),o!==null&&(Pn(o,r,g,f),ca(o,r,g))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var u=Ft(),f=wr(r),g=Zn(u,f);g.tag=2,o!=null&&(g.callback=o),o=gr(r,g,f),o!==null&&(Pn(o,r,f,u),ca(o,r,f))}};function Mm(r,o,u,f,g,x,b){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(f,x,b):o.prototype&&o.prototype.isPureReactComponent?!So(u,f)||!So(g,x):!0}function Nm(r,o,u){var f=!1,g=hr,x=o.contextType;return typeof x=="object"&&x!==null?x=dn(x):(g=Kt(o)?Or:Rt.current,f=o.contextTypes,x=(f=f!=null)?ki(r,g):hr),o=new o(u,x),r.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=va,r.stateNode=o,o._reactInternals=r,f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=g,r.__reactInternalMemoizedMaskedChildContext=x),o}function jm(r,o,u,f){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,f),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,f),o.state!==r&&va.enqueueReplaceState(o,o.state,null)}function Qu(r,o,u,f){var g=r.stateNode;g.props=u,g.state=r.memoizedState,g.refs={},Ou(r);var x=o.contextType;typeof x=="object"&&x!==null?g.context=dn(x):(x=Kt(o)?Or:Rt.current,g.context=ki(r,x)),g.state=r.memoizedState,x=o.getDerivedStateFromProps,typeof x=="function"&&(Gu(r,o,x,u),g.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(o=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),o!==g.state&&va.enqueueReplaceState(g,g.state,null),fa(r,u,g,f),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308)}function Ai(r,o){try{var u="",f=o;do u+=de(f),f=f.return;while(f);var g=u}catch(x){g=`
|
|
39
|
+
Error generating stack: `+x.message+`
|
|
40
|
+
`+x.stack}return{value:r,source:o,stack:g,digest:null}}function Zu(r,o,u){return{value:r,source:null,stack:u??null,digest:o??null}}function Ju(r,o){try{console.error(o.value)}catch(u){setTimeout(function(){throw u})}}var hb=typeof WeakMap=="function"?WeakMap:Map;function Dm(r,o,u){u=Zn(-1,u),u.tag=3,u.payload={element:null};var f=o.value;return u.callback=function(){Ea||(Ea=!0,pc=f),Ju(r,o)},u}function Im(r,o,u){u=Zn(-1,u),u.tag=3;var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var g=o.value;u.payload=function(){return f(g)},u.callback=function(){Ju(r,o)}}var x=r.stateNode;return x!==null&&typeof x.componentDidCatch=="function"&&(u.callback=function(){Ju(r,o),typeof f!="function"&&(vr===null?vr=new Set([this]):vr.add(this));var b=o.stack;this.componentDidCatch(o.value,{componentStack:b!==null?b:""})}),u}function _m(r,o,u){var f=r.pingCache;if(f===null){f=r.pingCache=new hb;var g=new Set;f.set(o,g)}else g=f.get(o),g===void 0&&(g=new Set,f.set(o,g));g.has(u)||(g.add(u),r=Pb.bind(null,r,o,u),o.then(r,r))}function Lm(r){do{var o;if((o=r.tag===13)&&(o=r.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return r;r=r.return}while(r!==null);return null}function Om(r,o,u,f,g){return(r.mode&1)===0?(r===o?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(o=Zn(-1,1),o.tag=2,gr(u,o,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=g,r)}var pb=L.ReactCurrentOwner,qt=!1;function Ot(r,o,u,f){o.child=r===null?rm(o,null,u,f):Ei(o,r.child,u,f)}function Fm(r,o,u,f,g){u=u.render;var x=o.ref;return Pi(o,g),f=Hu(r,o,u,f,x,g),u=Wu(),r!==null&&!qt?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~g,Jn(r,o,g)):(tt&&u&&Pu(o),o.flags|=1,Ot(r,o,f,g),o.child)}function zm(r,o,u,f,g){if(r===null){var x=u.type;return typeof x=="function"&&!kc(x)&&x.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(o.tag=15,o.type=x,Vm(r,o,x,f,g)):(r=Na(u.type,null,f,o,o.mode,g),r.ref=o.ref,r.return=o,o.child=r)}if(x=r.child,(r.lanes&g)===0){var b=x.memoizedProps;if(u=u.compare,u=u!==null?u:So,u(b,f)&&r.ref===o.ref)return Jn(r,o,g)}return o.flags|=1,r=Sr(x,f),r.ref=o.ref,r.return=o,o.child=r}function Vm(r,o,u,f,g){if(r!==null){var x=r.memoizedProps;if(So(x,f)&&r.ref===o.ref)if(qt=!1,o.pendingProps=f=x,(r.lanes&g)!==0)(r.flags&131072)!==0&&(qt=!0);else return o.lanes=r.lanes,Jn(r,o,g)}return ec(r,o,u,f,g)}function Bm(r,o,u){var f=o.pendingProps,g=f.children,x=r!==null?r.memoizedState:null;if(f.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ge(Ni,rn),rn|=u;else{if((u&1073741824)===0)return r=x!==null?x.baseLanes|u:u,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:r,cachePool:null,transitions:null},o.updateQueue=null,Ge(Ni,rn),rn|=r,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=x!==null?x.baseLanes:u,Ge(Ni,rn),rn|=f}else x!==null?(f=x.baseLanes|u,o.memoizedState=null):f=u,Ge(Ni,rn),rn|=f;return Ot(r,o,g,u),o.child}function $m(r,o){var u=o.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(o.flags|=512,o.flags|=2097152)}function ec(r,o,u,f,g){var x=Kt(u)?Or:Rt.current;return x=ki(o,x),Pi(o,g),u=Hu(r,o,u,f,x,g),f=Wu(),r!==null&&!qt?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~g,Jn(r,o,g)):(tt&&f&&Pu(o),o.flags|=1,Ot(r,o,u,g),o.child)}function Um(r,o,u,f,g){if(Kt(u)){var x=!0;na(o)}else x=!1;if(Pi(o,g),o.stateNode===null)wa(r,o),Nm(o,u,f),Qu(o,u,f,g),f=!0;else if(r===null){var b=o.stateNode,N=o.memoizedProps;b.props=N;var I=b.context,K=u.contextType;typeof K=="object"&&K!==null?K=dn(K):(K=Kt(u)?Or:Rt.current,K=ki(o,K));var re=u.getDerivedStateFromProps,ae=typeof re=="function"||typeof b.getSnapshotBeforeUpdate=="function";ae||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N!==f||I!==K)&&jm(o,b,f,K),mr=!1;var ne=o.memoizedState;b.state=ne,fa(o,f,b,g),I=o.memoizedState,N!==f||ne!==I||Wt.current||mr?(typeof re=="function"&&(Gu(o,u,re,f),I=o.memoizedState),(N=mr||Mm(o,u,N,f,ne,I,K))?(ae||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(o.flags|=4194308)):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=f,o.memoizedState=I),b.props=f,b.state=I,b.context=K,f=N):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),f=!1)}else{b=o.stateNode,om(r,o),N=o.memoizedProps,K=o.type===o.elementType?N:Cn(o.type,N),b.props=K,ae=o.pendingProps,ne=b.context,I=u.contextType,typeof I=="object"&&I!==null?I=dn(I):(I=Kt(u)?Or:Rt.current,I=ki(o,I));var me=u.getDerivedStateFromProps;(re=typeof me=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N!==ae||ne!==I)&&jm(o,b,f,I),mr=!1,ne=o.memoizedState,b.state=ne,fa(o,f,b,g);var we=o.memoizedState;N!==ae||ne!==we||Wt.current||mr?(typeof me=="function"&&(Gu(o,u,me,f),we=o.memoizedState),(K=mr||Mm(o,u,K,f,ne,we,I)||!1)?(re||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(f,we,I),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(f,we,I)),typeof b.componentDidUpdate=="function"&&(o.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof b.componentDidUpdate!="function"||N===r.memoizedProps&&ne===r.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===r.memoizedProps&&ne===r.memoizedState||(o.flags|=1024),o.memoizedProps=f,o.memoizedState=we),b.props=f,b.state=we,b.context=I,f=K):(typeof b.componentDidUpdate!="function"||N===r.memoizedProps&&ne===r.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===r.memoizedProps&&ne===r.memoizedState||(o.flags|=1024),f=!1)}return tc(r,o,u,f,x,g)}function tc(r,o,u,f,g,x){$m(r,o);var b=(o.flags&128)!==0;if(!f&&!b)return g&&Xp(o,u,!1),Jn(r,o,x);f=o.stateNode,pb.current=o;var N=b&&typeof u.getDerivedStateFromError!="function"?null:f.render();return o.flags|=1,r!==null&&b?(o.child=Ei(o,r.child,null,x),o.child=Ei(o,null,N,x)):Ot(r,o,N,x),o.memoizedState=f.state,g&&Xp(o,u,!0),o.child}function Hm(r){var o=r.stateNode;o.pendingContext?Kp(r,o.pendingContext,o.pendingContext!==o.context):o.context&&Kp(r,o.context,!1),Fu(r,o.containerInfo)}function Wm(r,o,u,f,g){return Ci(),Nu(g),o.flags|=256,Ot(r,o,u,f),o.child}var nc={dehydrated:null,treeContext:null,retryLane:0};function rc(r){return{baseLanes:r,cachePool:null,transitions:null}}function Km(r,o,u){var f=o.pendingProps,g=nt.current,x=!1,b=(o.flags&128)!==0,N;if((N=b)||(N=r!==null&&r.memoizedState===null?!1:(g&2)!==0),N?(x=!0,o.flags&=-129):(r===null||r.memoizedState!==null)&&(g|=1),Ge(nt,g&1),r===null)return Mu(o),r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((o.mode&1)===0?o.lanes=1:r.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(b=f.children,r=f.fallback,x?(f=o.mode,x=o.child,b={mode:"hidden",children:b},(f&1)===0&&x!==null?(x.childLanes=0,x.pendingProps=b):x=ja(b,f,0,null),r=qr(r,f,u,null),x.return=o,r.return=o,x.sibling=r,o.child=x,o.child.memoizedState=rc(u),o.memoizedState=nc,r):ic(o,b));if(g=r.memoizedState,g!==null&&(N=g.dehydrated,N!==null))return mb(r,o,b,f,N,g,u);if(x){x=f.fallback,b=o.mode,g=r.child,N=g.sibling;var I={mode:"hidden",children:f.children};return(b&1)===0&&o.child!==g?(f=o.child,f.childLanes=0,f.pendingProps=I,o.deletions=null):(f=Sr(g,I),f.subtreeFlags=g.subtreeFlags&14680064),N!==null?x=Sr(N,x):(x=qr(x,b,u,null),x.flags|=2),x.return=o,f.return=o,f.sibling=x,o.child=f,f=x,x=o.child,b=r.child.memoizedState,b=b===null?rc(u):{baseLanes:b.baseLanes|u,cachePool:null,transitions:b.transitions},x.memoizedState=b,x.childLanes=r.childLanes&~u,o.memoizedState=nc,f}return x=r.child,r=x.sibling,f=Sr(x,{mode:"visible",children:f.children}),(o.mode&1)===0&&(f.lanes=u),f.return=o,f.sibling=null,r!==null&&(u=o.deletions,u===null?(o.deletions=[r],o.flags|=16):u.push(r)),o.child=f,o.memoizedState=null,f}function ic(r,o){return o=ja({mode:"visible",children:o},r.mode,0,null),o.return=r,r.child=o}function xa(r,o,u,f){return f!==null&&Nu(f),Ei(o,r.child,null,u),r=ic(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function mb(r,o,u,f,g,x,b){if(u)return o.flags&256?(o.flags&=-257,f=Zu(Error(n(422))),xa(r,o,b,f)):o.memoizedState!==null?(o.child=r.child,o.flags|=128,null):(x=f.fallback,g=o.mode,f=ja({mode:"visible",children:f.children},g,0,null),x=qr(x,g,b,null),x.flags|=2,f.return=o,x.return=o,f.sibling=x,o.child=f,(o.mode&1)!==0&&Ei(o,r.child,null,b),o.child.memoizedState=rc(b),o.memoizedState=nc,x);if((o.mode&1)===0)return xa(r,o,b,null);if(g.data==="$!"){if(f=g.nextSibling&&g.nextSibling.dataset,f)var N=f.dgst;return f=N,x=Error(n(419)),f=Zu(x,f,void 0),xa(r,o,b,f)}if(N=(b&r.childLanes)!==0,qt||N){if(f=vt,f!==null){switch(b&-b){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&(f.suspendedLanes|b))!==0?0:g,g!==0&&g!==x.retryLane&&(x.retryLane=g,Qn(r,g),Pn(f,r,g,-1))}return wc(),f=Zu(Error(n(421))),xa(r,o,b,f)}return g.data==="$?"?(o.flags|=128,o.child=r.child,o=Rb.bind(null,r),g._reactRetry=o,null):(r=x.treeContext,nn=fr(g.nextSibling),tn=o,tt=!0,bn=null,r!==null&&(cn[fn++]=Yn,cn[fn++]=Gn,cn[fn++]=Fr,Yn=r.id,Gn=r.overflow,Fr=o),o=ic(o,f.children),o.flags|=4096,o)}function qm(r,o,u){r.lanes|=o;var f=r.alternate;f!==null&&(f.lanes|=o),_u(r.return,o,u)}function oc(r,o,u,f,g){var x=r.memoizedState;x===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:g}:(x.isBackwards=o,x.rendering=null,x.renderingStartTime=0,x.last=f,x.tail=u,x.tailMode=g)}function Xm(r,o,u){var f=o.pendingProps,g=f.revealOrder,x=f.tail;if(Ot(r,o,f.children,u),f=nt.current,(f&2)!==0)f=f&1|2,o.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&qm(r,u,o);else if(r.tag===19)qm(r,u,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}f&=1}if(Ge(nt,f),(o.mode&1)===0)o.memoizedState=null;else switch(g){case"forwards":for(u=o.child,g=null;u!==null;)r=u.alternate,r!==null&&da(r)===null&&(g=u),u=u.sibling;u=g,u===null?(g=o.child,o.child=null):(g=u.sibling,u.sibling=null),oc(o,!1,g,u,x);break;case"backwards":for(u=null,g=o.child,o.child=null;g!==null;){if(r=g.alternate,r!==null&&da(r)===null){o.child=g;break}r=g.sibling,g.sibling=u,u=g,g=r}oc(o,!0,u,null,x);break;case"together":oc(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function wa(r,o){(o.mode&1)===0&&r!==null&&(r.alternate=null,o.alternate=null,o.flags|=2)}function Jn(r,o,u){if(r!==null&&(o.dependencies=r.dependencies),Ur|=o.lanes,(u&o.childLanes)===0)return null;if(r!==null&&o.child!==r.child)throw Error(n(153));if(o.child!==null){for(r=o.child,u=Sr(r,r.pendingProps),o.child=u,u.return=o;r.sibling!==null;)r=r.sibling,u=u.sibling=Sr(r,r.pendingProps),u.return=o;u.sibling=null}return o.child}function gb(r,o,u){switch(o.tag){case 3:Hm(o),Ci();break;case 5:lm(o);break;case 1:Kt(o.type)&&na(o);break;case 4:Fu(o,o.stateNode.containerInfo);break;case 10:var f=o.type._context,g=o.memoizedProps.value;Ge(la,f._currentValue),f._currentValue=g;break;case 13:if(f=o.memoizedState,f!==null)return f.dehydrated!==null?(Ge(nt,nt.current&1),o.flags|=128,null):(u&o.child.childLanes)!==0?Km(r,o,u):(Ge(nt,nt.current&1),r=Jn(r,o,u),r!==null?r.sibling:null);Ge(nt,nt.current&1);break;case 19:if(f=(u&o.childLanes)!==0,(r.flags&128)!==0){if(f)return Xm(r,o,u);o.flags|=128}if(g=o.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),Ge(nt,nt.current),f)break;return null;case 22:case 23:return o.lanes=0,Bm(r,o,u)}return Jn(r,o,u)}var Ym,sc,Gm,Qm;Ym=function(r,o){for(var u=o.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},sc=function(){},Gm=function(r,o,u,f){var g=r.memoizedProps;if(g!==f){r=o.stateNode,Br(Ln.current);var x=null;switch(u){case"input":g=It(r,g),f=It(r,f),x=[];break;case"select":g=P({},g,{value:void 0}),f=P({},f,{value:void 0}),x=[];break;case"textarea":g=Dn(r,g),f=Dn(r,f),x=[];break;default:typeof g.onClick!="function"&&typeof f.onClick=="function"&&(r.onclick=Js)}ot(u,f);var b;u=null;for(K in g)if(!f.hasOwnProperty(K)&&g.hasOwnProperty(K)&&g[K]!=null)if(K==="style"){var N=g[K];for(b in N)N.hasOwnProperty(b)&&(u||(u={}),u[b]="")}else K!=="dangerouslySetInnerHTML"&&K!=="children"&&K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&K!=="autoFocus"&&(s.hasOwnProperty(K)?x||(x=[]):(x=x||[]).push(K,null));for(K in f){var I=f[K];if(N=g?.[K],f.hasOwnProperty(K)&&I!==N&&(I!=null||N!=null))if(K==="style")if(N){for(b in N)!N.hasOwnProperty(b)||I&&I.hasOwnProperty(b)||(u||(u={}),u[b]="");for(b in I)I.hasOwnProperty(b)&&N[b]!==I[b]&&(u||(u={}),u[b]=I[b])}else u||(x||(x=[]),x.push(K,u)),u=I;else K==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,N=N?N.__html:void 0,I!=null&&N!==I&&(x=x||[]).push(K,I)):K==="children"?typeof I!="string"&&typeof I!="number"||(x=x||[]).push(K,""+I):K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&(s.hasOwnProperty(K)?(I!=null&&K==="onScroll"&&Je("scroll",r),x||N===I||(x=[])):(x=x||[]).push(K,I))}u&&(x=x||[]).push("style",u);var K=x;(o.updateQueue=K)&&(o.flags|=4)}},Qm=function(r,o,u,f){u!==f&&(o.flags|=4)};function Oo(r,o){if(!tt)switch(r.tailMode){case"hidden":o=r.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:f.sibling=null}}function Mt(r){var o=r.alternate!==null&&r.alternate.child===r.child,u=0,f=0;if(o)for(var g=r.child;g!==null;)u|=g.lanes|g.childLanes,f|=g.subtreeFlags&14680064,f|=g.flags&14680064,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)u|=g.lanes|g.childLanes,f|=g.subtreeFlags,f|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=f,r.childLanes=u,o}function yb(r,o,u){var f=o.pendingProps;switch(Ru(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(o),null;case 1:return Kt(o.type)&&ta(),Mt(o),null;case 3:return f=o.stateNode,Ri(),et(Wt),et(Rt),Bu(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(r===null||r.child===null)&&(sa(o)?o.flags|=4:r===null||r.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,bn!==null&&(yc(bn),bn=null))),sc(r,o),Mt(o),null;case 5:zu(o);var g=Br(jo.current);if(u=o.type,r!==null&&o.stateNode!=null)Gm(r,o,u,f,g),r.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!f){if(o.stateNode===null)throw Error(n(166));return Mt(o),null}if(r=Br(Ln.current),sa(o)){f=o.stateNode,u=o.type;var x=o.memoizedProps;switch(f[_n]=o,f[Po]=x,r=(o.mode&1)!==0,u){case"dialog":Je("cancel",f),Je("close",f);break;case"iframe":case"object":case"embed":Je("load",f);break;case"video":case"audio":for(g=0;g<Co.length;g++)Je(Co[g],f);break;case"source":Je("error",f);break;case"img":case"image":case"link":Je("error",f),Je("load",f);break;case"details":Je("toggle",f);break;case"input":Jt(f,x),Je("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!x.multiple},Je("invalid",f);break;case"textarea":un(f,x),Je("invalid",f)}ot(u,x),g=null;for(var b in x)if(x.hasOwnProperty(b)){var N=x[b];b==="children"?typeof N=="string"?f.textContent!==N&&(x.suppressHydrationWarning!==!0&&Zs(f.textContent,N,r),g=["children",N]):typeof N=="number"&&f.textContent!==""+N&&(x.suppressHydrationWarning!==!0&&Zs(f.textContent,N,r),g=["children",""+N]):s.hasOwnProperty(b)&&N!=null&&b==="onScroll"&&Je("scroll",f)}switch(u){case"input":Ue(f),_t(f,x,!0);break;case"textarea":Ue(f),he(f);break;case"select":case"option":break;default:typeof x.onClick=="function"&&(f.onclick=Js)}f=g,o.updateQueue=f,f!==null&&(o.flags|=4)}else{b=g.nodeType===9?g:g.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=V(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=b.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof f.is=="string"?r=b.createElement(u,{is:f.is}):(r=b.createElement(u),u==="select"&&(b=r,f.multiple?b.multiple=!0:f.size&&(b.size=f.size))):r=b.createElementNS(r,u),r[_n]=o,r[Po]=f,Ym(r,o,!1,!1),o.stateNode=r;e:{switch(b=Ze(u,f),u){case"dialog":Je("cancel",r),Je("close",r),g=f;break;case"iframe":case"object":case"embed":Je("load",r),g=f;break;case"video":case"audio":for(g=0;g<Co.length;g++)Je(Co[g],r);g=f;break;case"source":Je("error",r),g=f;break;case"img":case"image":case"link":Je("error",r),Je("load",r),g=f;break;case"details":Je("toggle",r),g=f;break;case"input":Jt(r,f),g=It(r,f),Je("invalid",r);break;case"option":g=f;break;case"select":r._wrapperState={wasMultiple:!!f.multiple},g=P({},f,{value:void 0}),Je("invalid",r);break;case"textarea":un(r,f),g=Dn(r,f),Je("invalid",r);break;default:g=f}ot(u,g),N=g;for(x in N)if(N.hasOwnProperty(x)){var I=N[x];x==="style"?Ie(r,I):x==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,I!=null&&oe(r,I)):x==="children"?typeof I=="string"?(u!=="textarea"||I!=="")&&J(r,I):typeof I=="number"&&J(r,""+I):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(s.hasOwnProperty(x)?I!=null&&x==="onScroll"&&Je("scroll",r):I!=null&&A(r,x,I,b))}switch(u){case"input":Ue(r),_t(r,f,!1);break;case"textarea":Ue(r),he(r);break;case"option":f.value!=null&&r.setAttribute("value",""+ge(f.value));break;case"select":r.multiple=!!f.multiple,x=f.value,x!=null?Lt(r,!!f.multiple,x,!1):f.defaultValue!=null&&Lt(r,!!f.multiple,f.defaultValue,!0);break;default:typeof g.onClick=="function"&&(r.onclick=Js)}switch(u){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Mt(o),null;case 6:if(r&&o.stateNode!=null)Qm(r,o,r.memoizedProps,f);else{if(typeof f!="string"&&o.stateNode===null)throw Error(n(166));if(u=Br(jo.current),Br(Ln.current),sa(o)){if(f=o.stateNode,u=o.memoizedProps,f[_n]=o,(x=f.nodeValue!==u)&&(r=tn,r!==null))switch(r.tag){case 3:Zs(f.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Zs(f.nodeValue,u,(r.mode&1)!==0)}x&&(o.flags|=4)}else f=(u.nodeType===9?u:u.ownerDocument).createTextNode(f),f[_n]=o,o.stateNode=f}return Mt(o),null;case 13:if(et(nt),f=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(tt&&nn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)em(),Ci(),o.flags|=98560,x=!1;else if(x=sa(o),f!==null&&f.dehydrated!==null){if(r===null){if(!x)throw Error(n(318));if(x=o.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(n(317));x[_n]=o}else Ci(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Mt(o),x=!1}else bn!==null&&(yc(bn),bn=null),x=!0;if(!x)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=u,o):(f=f!==null,f!==(r!==null&&r.memoizedState!==null)&&f&&(o.child.flags|=8192,(o.mode&1)!==0&&(r===null||(nt.current&1)!==0?pt===0&&(pt=3):wc())),o.updateQueue!==null&&(o.flags|=4),Mt(o),null);case 4:return Ri(),sc(r,o),r===null&&Eo(o.stateNode.containerInfo),Mt(o),null;case 10:return Iu(o.type._context),Mt(o),null;case 17:return Kt(o.type)&&ta(),Mt(o),null;case 19:if(et(nt),x=o.memoizedState,x===null)return Mt(o),null;if(f=(o.flags&128)!==0,b=x.rendering,b===null)if(f)Oo(x,!1);else{if(pt!==0||r!==null&&(r.flags&128)!==0)for(r=o.child;r!==null;){if(b=da(r),b!==null){for(o.flags|=128,Oo(x,!1),f=b.updateQueue,f!==null&&(o.updateQueue=f,o.flags|=4),o.subtreeFlags=0,f=u,u=o.child;u!==null;)x=u,r=f,x.flags&=14680066,b=x.alternate,b===null?(x.childLanes=0,x.lanes=r,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=b.childLanes,x.lanes=b.lanes,x.child=b.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=b.memoizedProps,x.memoizedState=b.memoizedState,x.updateQueue=b.updateQueue,x.type=b.type,r=b.dependencies,x.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return Ge(nt,nt.current&1|2),o.child}r=r.sibling}x.tail!==null&<()>ji&&(o.flags|=128,f=!0,Oo(x,!1),o.lanes=4194304)}else{if(!f)if(r=da(b),r!==null){if(o.flags|=128,f=!0,u=r.updateQueue,u!==null&&(o.updateQueue=u,o.flags|=4),Oo(x,!0),x.tail===null&&x.tailMode==="hidden"&&!b.alternate&&!tt)return Mt(o),null}else 2*lt()-x.renderingStartTime>ji&&u!==1073741824&&(o.flags|=128,f=!0,Oo(x,!1),o.lanes=4194304);x.isBackwards?(b.sibling=o.child,o.child=b):(u=x.last,u!==null?u.sibling=b:o.child=b,x.last=b)}return x.tail!==null?(o=x.tail,x.rendering=o,x.tail=o.sibling,x.renderingStartTime=lt(),o.sibling=null,u=nt.current,Ge(nt,f?u&1|2:u&1),o):(Mt(o),null);case 22:case 23:return xc(),f=o.memoizedState!==null,r!==null&&r.memoizedState!==null!==f&&(o.flags|=8192),f&&(o.mode&1)!==0?(rn&1073741824)!==0&&(Mt(o),o.subtreeFlags&6&&(o.flags|=8192)):Mt(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function vb(r,o){switch(Ru(o),o.tag){case 1:return Kt(o.type)&&ta(),r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 3:return Ri(),et(Wt),et(Rt),Bu(),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 5:return zu(o),null;case 13:if(et(nt),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Ci()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return et(nt),null;case 4:return Ri(),null;case 10:return Iu(o.type._context),null;case 22:case 23:return xc(),null;case 24:return null;default:return null}}var ka=!1,Nt=!1,xb=typeof WeakSet=="function"?WeakSet:Set,ye=null;function Mi(r,o){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(f){st(r,o,f)}else u.current=null}function ac(r,o,u){try{u()}catch(f){st(r,o,f)}}var Zm=!1;function wb(r,o){if(xu=Bs,r=Mp(),fu(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var g=f.anchorOffset,x=f.focusNode;f=f.focusOffset;try{u.nodeType,x.nodeType}catch{u=null;break e}var b=0,N=-1,I=-1,K=0,re=0,ae=r,ne=null;t:for(;;){for(var me;ae!==u||g!==0&&ae.nodeType!==3||(N=b+g),ae!==x||f!==0&&ae.nodeType!==3||(I=b+f),ae.nodeType===3&&(b+=ae.nodeValue.length),(me=ae.firstChild)!==null;)ne=ae,ae=me;for(;;){if(ae===r)break t;if(ne===u&&++K===g&&(N=b),ne===x&&++re===f&&(I=b),(me=ae.nextSibling)!==null)break;ae=ne,ne=ae.parentNode}ae=me}u=N===-1||I===-1?null:{start:N,end:I}}else u=null}u=u||{start:0,end:0}}else u=null;for(wu={focusedElem:r,selectionRange:u},Bs=!1,ye=o;ye!==null;)if(o=ye,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,ye=r;else for(;ye!==null;){o=ye;try{var we=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(we!==null){var Se=we.memoizedProps,ut=we.memoizedState,B=o.stateNode,O=B.getSnapshotBeforeUpdate(o.elementType===o.type?Se:Cn(o.type,Se),ut);B.__reactInternalSnapshotBeforeUpdate=O}break;case 3:var U=o.stateNode.containerInfo;U.nodeType===1?U.textContent="":U.nodeType===9&&U.documentElement&&U.removeChild(U.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ce){st(o,o.return,ce)}if(r=o.sibling,r!==null){r.return=o.return,ye=r;break}ye=o.return}return we=Zm,Zm=!1,we}function Fo(r,o,u){var f=o.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&r)===r){var x=g.destroy;g.destroy=void 0,x!==void 0&&ac(o,u,x)}g=g.next}while(g!==f)}}function Sa(r,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&r)===r){var f=u.create;u.destroy=f()}u=u.next}while(u!==o)}}function lc(r){var o=r.ref;if(o!==null){var u=r.stateNode;switch(r.tag){case 5:r=u;break;default:r=u}typeof o=="function"?o(r):o.current=r}}function Jm(r){var o=r.alternate;o!==null&&(r.alternate=null,Jm(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&(delete o[_n],delete o[Po],delete o[Cu],delete o[nb],delete o[rb])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function eg(r){return r.tag===5||r.tag===3||r.tag===4}function tg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||eg(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function uc(r,o,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,o?u.nodeType===8?u.parentNode.insertBefore(r,o):u.insertBefore(r,o):(u.nodeType===8?(o=u.parentNode,o.insertBefore(r,u)):(o=u,o.appendChild(r)),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=Js));else if(f!==4&&(r=r.child,r!==null))for(uc(r,o,u),r=r.sibling;r!==null;)uc(r,o,u),r=r.sibling}function cc(r,o,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,o?u.insertBefore(r,o):u.appendChild(r);else if(f!==4&&(r=r.child,r!==null))for(cc(r,o,u),r=r.sibling;r!==null;)cc(r,o,u),r=r.sibling}var St=null,En=!1;function yr(r,o,u){for(u=u.child;u!==null;)ng(r,o,u),u=u.sibling}function ng(r,o,u){if(In&&typeof In.onCommitFiberUnmount=="function")try{In.onCommitFiberUnmount(_s,u)}catch{}switch(u.tag){case 5:Nt||Mi(u,o);case 6:var f=St,g=En;St=null,yr(r,o,u),St=f,En=g,St!==null&&(En?(r=St,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):St.removeChild(u.stateNode));break;case 18:St!==null&&(En?(r=St,u=u.stateNode,r.nodeType===8?bu(r.parentNode,u):r.nodeType===1&&bu(r,u),go(r)):bu(St,u.stateNode));break;case 4:f=St,g=En,St=u.stateNode.containerInfo,En=!0,yr(r,o,u),St=f,En=g;break;case 0:case 11:case 14:case 15:if(!Nt&&(f=u.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){g=f=f.next;do{var x=g,b=x.destroy;x=x.tag,b!==void 0&&((x&2)!==0||(x&4)!==0)&&ac(u,o,b),g=g.next}while(g!==f)}yr(r,o,u);break;case 1:if(!Nt&&(Mi(u,o),f=u.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=u.memoizedProps,f.state=u.memoizedState,f.componentWillUnmount()}catch(N){st(u,o,N)}yr(r,o,u);break;case 21:yr(r,o,u);break;case 22:u.mode&1?(Nt=(f=Nt)||u.memoizedState!==null,yr(r,o,u),Nt=f):yr(r,o,u);break;default:yr(r,o,u)}}function rg(r){var o=r.updateQueue;if(o!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new xb),o.forEach(function(f){var g=Ab.bind(null,r,f);u.has(f)||(u.add(f),f.then(g,g))})}}function Tn(r,o){var u=o.deletions;if(u!==null)for(var f=0;f<u.length;f++){var g=u[f];try{var x=r,b=o,N=b;e:for(;N!==null;){switch(N.tag){case 5:St=N.stateNode,En=!1;break e;case 3:St=N.stateNode.containerInfo,En=!0;break e;case 4:St=N.stateNode.containerInfo,En=!0;break e}N=N.return}if(St===null)throw Error(n(160));ng(x,b,g),St=null,En=!1;var I=g.alternate;I!==null&&(I.return=null),g.return=null}catch(K){st(g,o,K)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)ig(o,r),o=o.sibling}function ig(r,o){var u=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(Tn(o,r),Fn(r),f&4){try{Fo(3,r,r.return),Sa(3,r)}catch(Se){st(r,r.return,Se)}try{Fo(5,r,r.return)}catch(Se){st(r,r.return,Se)}}break;case 1:Tn(o,r),Fn(r),f&512&&u!==null&&Mi(u,u.return);break;case 5:if(Tn(o,r),Fn(r),f&512&&u!==null&&Mi(u,u.return),r.flags&32){var g=r.stateNode;try{J(g,"")}catch(Se){st(r,r.return,Se)}}if(f&4&&(g=r.stateNode,g!=null)){var x=r.memoizedProps,b=u!==null?u.memoizedProps:x,N=r.type,I=r.updateQueue;if(r.updateQueue=null,I!==null)try{N==="input"&&x.type==="radio"&&x.name!=null&&Ht(g,x),Ze(N,b);var K=Ze(N,x);for(b=0;b<I.length;b+=2){var re=I[b],ae=I[b+1];re==="style"?Ie(g,ae):re==="dangerouslySetInnerHTML"?oe(g,ae):re==="children"?J(g,ae):A(g,re,ae,K)}switch(N){case"input":it(g,x);break;case"textarea":z(g,x);break;case"select":var ne=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!x.multiple;var me=x.value;me!=null?Lt(g,!!x.multiple,me,!1):ne!==!!x.multiple&&(x.defaultValue!=null?Lt(g,!!x.multiple,x.defaultValue,!0):Lt(g,!!x.multiple,x.multiple?[]:"",!1))}g[Po]=x}catch(Se){st(r,r.return,Se)}}break;case 6:if(Tn(o,r),Fn(r),f&4){if(r.stateNode===null)throw Error(n(162));g=r.stateNode,x=r.memoizedProps;try{g.nodeValue=x}catch(Se){st(r,r.return,Se)}}break;case 3:if(Tn(o,r),Fn(r),f&4&&u!==null&&u.memoizedState.isDehydrated)try{go(o.containerInfo)}catch(Se){st(r,r.return,Se)}break;case 4:Tn(o,r),Fn(r);break;case 13:Tn(o,r),Fn(r),g=r.child,g.flags&8192&&(x=g.memoizedState!==null,g.stateNode.isHidden=x,!x||g.alternate!==null&&g.alternate.memoizedState!==null||(hc=lt())),f&4&&rg(r);break;case 22:if(re=u!==null&&u.memoizedState!==null,r.mode&1?(Nt=(K=Nt)||re,Tn(o,r),Nt=K):Tn(o,r),Fn(r),f&8192){if(K=r.memoizedState!==null,(r.stateNode.isHidden=K)&&!re&&(r.mode&1)!==0)for(ye=r,re=r.child;re!==null;){for(ae=ye=re;ye!==null;){switch(ne=ye,me=ne.child,ne.tag){case 0:case 11:case 14:case 15:Fo(4,ne,ne.return);break;case 1:Mi(ne,ne.return);var we=ne.stateNode;if(typeof we.componentWillUnmount=="function"){f=ne,u=ne.return;try{o=f,we.props=o.memoizedProps,we.state=o.memoizedState,we.componentWillUnmount()}catch(Se){st(f,u,Se)}}break;case 5:Mi(ne,ne.return);break;case 22:if(ne.memoizedState!==null){ag(ae);continue}}me!==null?(me.return=ne,ye=me):ag(ae)}re=re.sibling}e:for(re=null,ae=r;;){if(ae.tag===5){if(re===null){re=ae;try{g=ae.stateNode,K?(x=g.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none"):(N=ae.stateNode,I=ae.memoizedProps.style,b=I!=null&&I.hasOwnProperty("display")?I.display:null,N.style.display=pe("display",b))}catch(Se){st(r,r.return,Se)}}}else if(ae.tag===6){if(re===null)try{ae.stateNode.nodeValue=K?"":ae.memoizedProps}catch(Se){st(r,r.return,Se)}}else if((ae.tag!==22&&ae.tag!==23||ae.memoizedState===null||ae===r)&&ae.child!==null){ae.child.return=ae,ae=ae.child;continue}if(ae===r)break e;for(;ae.sibling===null;){if(ae.return===null||ae.return===r)break e;re===ae&&(re=null),ae=ae.return}re===ae&&(re=null),ae.sibling.return=ae.return,ae=ae.sibling}}break;case 19:Tn(o,r),Fn(r),f&4&&rg(r);break;case 21:break;default:Tn(o,r),Fn(r)}}function Fn(r){var o=r.flags;if(o&2){try{e:{for(var u=r.return;u!==null;){if(eg(u)){var f=u;break e}u=u.return}throw Error(n(160))}switch(f.tag){case 5:var g=f.stateNode;f.flags&32&&(J(g,""),f.flags&=-33);var x=tg(r);cc(r,x,g);break;case 3:case 4:var b=f.stateNode.containerInfo,N=tg(r);uc(r,N,b);break;default:throw Error(n(161))}}catch(I){st(r,r.return,I)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function kb(r,o,u){ye=r,og(r)}function og(r,o,u){for(var f=(r.mode&1)!==0;ye!==null;){var g=ye,x=g.child;if(g.tag===22&&f){var b=g.memoizedState!==null||ka;if(!b){var N=g.alternate,I=N!==null&&N.memoizedState!==null||Nt;N=ka;var K=Nt;if(ka=b,(Nt=I)&&!K)for(ye=g;ye!==null;)b=ye,I=b.child,b.tag===22&&b.memoizedState!==null?lg(g):I!==null?(I.return=b,ye=I):lg(g);for(;x!==null;)ye=x,og(x),x=x.sibling;ye=g,ka=N,Nt=K}sg(r)}else(g.subtreeFlags&8772)!==0&&x!==null?(x.return=g,ye=x):sg(r)}}function sg(r){for(;ye!==null;){var o=ye;if((o.flags&8772)!==0){var u=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Nt||Sa(5,o);break;case 1:var f=o.stateNode;if(o.flags&4&&!Nt)if(u===null)f.componentDidMount();else{var g=o.elementType===o.type?u.memoizedProps:Cn(o.type,u.memoizedProps);f.componentDidUpdate(g,u.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var x=o.updateQueue;x!==null&&am(o,x,f);break;case 3:var b=o.updateQueue;if(b!==null){if(u=null,o.child!==null)switch(o.child.tag){case 5:u=o.child.stateNode;break;case 1:u=o.child.stateNode}am(o,b,u)}break;case 5:var N=o.stateNode;if(u===null&&o.flags&4){u=N;var I=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":I.autoFocus&&u.focus();break;case"img":I.src&&(u.src=I.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var K=o.alternate;if(K!==null){var re=K.memoizedState;if(re!==null){var ae=re.dehydrated;ae!==null&&go(ae)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Nt||o.flags&512&&lc(o)}catch(ne){st(o,o.return,ne)}}if(o===r){ye=null;break}if(u=o.sibling,u!==null){u.return=o.return,ye=u;break}ye=o.return}}function ag(r){for(;ye!==null;){var o=ye;if(o===r){ye=null;break}var u=o.sibling;if(u!==null){u.return=o.return,ye=u;break}ye=o.return}}function lg(r){for(;ye!==null;){var o=ye;try{switch(o.tag){case 0:case 11:case 15:var u=o.return;try{Sa(4,o)}catch(I){st(o,u,I)}break;case 1:var f=o.stateNode;if(typeof f.componentDidMount=="function"){var g=o.return;try{f.componentDidMount()}catch(I){st(o,g,I)}}var x=o.return;try{lc(o)}catch(I){st(o,x,I)}break;case 5:var b=o.return;try{lc(o)}catch(I){st(o,b,I)}}}catch(I){st(o,o.return,I)}if(o===r){ye=null;break}var N=o.sibling;if(N!==null){N.return=o.return,ye=N;break}ye=o.return}}var Sb=Math.ceil,ba=L.ReactCurrentDispatcher,fc=L.ReactCurrentOwner,pn=L.ReactCurrentBatchConfig,Be=0,vt=null,ct=null,bt=0,rn=0,Ni=dr(0),pt=0,zo=null,Ur=0,Ca=0,dc=0,Vo=null,Xt=null,hc=0,ji=1/0,er=null,Ea=!1,pc=null,vr=null,Ta=!1,xr=null,Pa=0,Bo=0,mc=null,Ra=-1,Aa=0;function Ft(){return(Be&6)!==0?lt():Ra!==-1?Ra:Ra=lt()}function wr(r){return(r.mode&1)===0?1:(Be&2)!==0&&bt!==0?bt&-bt:ob.transition!==null?(Aa===0&&(Aa=tp()),Aa):(r=We,r!==0||(r=window.event,r=r===void 0?16:cp(r.type)),r)}function Pn(r,o,u,f){if(50<Bo)throw Bo=0,mc=null,Error(n(185));co(r,u,f),((Be&2)===0||r!==vt)&&(r===vt&&((Be&2)===0&&(Ca|=u),pt===4&&kr(r,bt)),Yt(r,f),u===1&&Be===0&&(o.mode&1)===0&&(ji=lt()+500,ra&&pr()))}function Yt(r,o){var u=r.callbackNode;oS(r,o);var f=Fs(r,r===vt?bt:0);if(f===0)u!==null&&Zh(u),r.callbackNode=null,r.callbackPriority=0;else if(o=f&-f,r.callbackPriority!==o){if(u!=null&&Zh(u),o===1)r.tag===0?ib(cg.bind(null,r)):Yp(cg.bind(null,r)),eb(function(){(Be&6)===0&&pr()}),u=null;else{switch(np(f)){case 1:u=Xl;break;case 4:u=Jh;break;case 16:u=Is;break;case 536870912:u=ep;break;default:u=Is}u=vg(u,ug.bind(null,r))}r.callbackPriority=o,r.callbackNode=u}}function ug(r,o){if(Ra=-1,Aa=0,(Be&6)!==0)throw Error(n(327));var u=r.callbackNode;if(Di()&&r.callbackNode!==u)return null;var f=Fs(r,r===vt?bt:0);if(f===0)return null;if((f&30)!==0||(f&r.expiredLanes)!==0||o)o=Ma(r,f);else{o=f;var g=Be;Be|=2;var x=dg();(vt!==r||bt!==o)&&(er=null,ji=lt()+500,Wr(r,o));do try{Eb();break}catch(N){fg(r,N)}while(!0);Du(),ba.current=x,Be=g,ct!==null?o=0:(vt=null,bt=0,o=pt)}if(o!==0){if(o===2&&(g=Yl(r),g!==0&&(f=g,o=gc(r,g))),o===1)throw u=zo,Wr(r,0),kr(r,f),Yt(r,lt()),u;if(o===6)kr(r,f);else{if(g=r.current.alternate,(f&30)===0&&!bb(g)&&(o=Ma(r,f),o===2&&(x=Yl(r),x!==0&&(f=x,o=gc(r,x))),o===1))throw u=zo,Wr(r,0),kr(r,f),Yt(r,lt()),u;switch(r.finishedWork=g,r.finishedLanes=f,o){case 0:case 1:throw Error(n(345));case 2:Kr(r,Xt,er);break;case 3:if(kr(r,f),(f&130023424)===f&&(o=hc+500-lt(),10<o)){if(Fs(r,0)!==0)break;if(g=r.suspendedLanes,(g&f)!==f){Ft(),r.pingedLanes|=r.suspendedLanes&g;break}r.timeoutHandle=Su(Kr.bind(null,r,Xt,er),o);break}Kr(r,Xt,er);break;case 4:if(kr(r,f),(f&4194240)===f)break;for(o=r.eventTimes,g=-1;0<f;){var b=31-kn(f);x=1<<b,b=o[b],b>g&&(g=b),f&=~x}if(f=g,f=lt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*Sb(f/1960))-f,10<f){r.timeoutHandle=Su(Kr.bind(null,r,Xt,er),f);break}Kr(r,Xt,er);break;case 5:Kr(r,Xt,er);break;default:throw Error(n(329))}}}return Yt(r,lt()),r.callbackNode===u?ug.bind(null,r):null}function gc(r,o){var u=Vo;return r.current.memoizedState.isDehydrated&&(Wr(r,o).flags|=256),r=Ma(r,o),r!==2&&(o=Xt,Xt=u,o!==null&&yc(o)),r}function yc(r){Xt===null?Xt=r:Xt.push.apply(Xt,r)}function bb(r){for(var o=r;;){if(o.flags&16384){var u=o.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var f=0;f<u.length;f++){var g=u[f],x=g.getSnapshot;g=g.value;try{if(!Sn(x(),g))return!1}catch{return!1}}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function kr(r,o){for(o&=~dc,o&=~Ca,r.suspendedLanes|=o,r.pingedLanes&=~o,r=r.expirationTimes;0<o;){var u=31-kn(o),f=1<<u;r[u]=-1,o&=~f}}function cg(r){if((Be&6)!==0)throw Error(n(327));Di();var o=Fs(r,0);if((o&1)===0)return Yt(r,lt()),null;var u=Ma(r,o);if(r.tag!==0&&u===2){var f=Yl(r);f!==0&&(o=f,u=gc(r,f))}if(u===1)throw u=zo,Wr(r,0),kr(r,o),Yt(r,lt()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=o,Kr(r,Xt,er),Yt(r,lt()),null}function vc(r,o){var u=Be;Be|=1;try{return r(o)}finally{Be=u,Be===0&&(ji=lt()+500,ra&&pr())}}function Hr(r){xr!==null&&xr.tag===0&&(Be&6)===0&&Di();var o=Be;Be|=1;var u=pn.transition,f=We;try{if(pn.transition=null,We=1,r)return r()}finally{We=f,pn.transition=u,Be=o,(Be&6)===0&&pr()}}function xc(){rn=Ni.current,et(Ni)}function Wr(r,o){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,JS(u)),ct!==null)for(u=ct.return;u!==null;){var f=u;switch(Ru(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&ta();break;case 3:Ri(),et(Wt),et(Rt),Bu();break;case 5:zu(f);break;case 4:Ri();break;case 13:et(nt);break;case 19:et(nt);break;case 10:Iu(f.type._context);break;case 22:case 23:xc()}u=u.return}if(vt=r,ct=r=Sr(r.current,null),bt=rn=o,pt=0,zo=null,dc=Ca=Ur=0,Xt=Vo=null,Vr!==null){for(o=0;o<Vr.length;o++)if(u=Vr[o],f=u.interleaved,f!==null){u.interleaved=null;var g=f.next,x=u.pending;if(x!==null){var b=x.next;x.next=g,f.next=b}u.pending=f}Vr=null}return r}function fg(r,o){do{var u=ct;try{if(Du(),ha.current=ya,pa){for(var f=rt.memoizedState;f!==null;){var g=f.queue;g!==null&&(g.pending=null),f=f.next}pa=!1}if($r=0,yt=ht=rt=null,Do=!1,Io=0,fc.current=null,u===null||u.return===null){pt=1,zo=o,ct=null;break}e:{var x=r,b=u.return,N=u,I=o;if(o=bt,N.flags|=32768,I!==null&&typeof I=="object"&&typeof I.then=="function"){var K=I,re=N,ae=re.tag;if((re.mode&1)===0&&(ae===0||ae===11||ae===15)){var ne=re.alternate;ne?(re.updateQueue=ne.updateQueue,re.memoizedState=ne.memoizedState,re.lanes=ne.lanes):(re.updateQueue=null,re.memoizedState=null)}var me=Lm(b);if(me!==null){me.flags&=-257,Om(me,b,N,x,o),me.mode&1&&_m(x,K,o),o=me,I=K;var we=o.updateQueue;if(we===null){var Se=new Set;Se.add(I),o.updateQueue=Se}else we.add(I);break e}else{if((o&1)===0){_m(x,K,o),wc();break e}I=Error(n(426))}}else if(tt&&N.mode&1){var ut=Lm(b);if(ut!==null){(ut.flags&65536)===0&&(ut.flags|=256),Om(ut,b,N,x,o),Nu(Ai(I,N));break e}}x=I=Ai(I,N),pt!==4&&(pt=2),Vo===null?Vo=[x]:Vo.push(x),x=b;do{switch(x.tag){case 3:x.flags|=65536,o&=-o,x.lanes|=o;var B=Dm(x,I,o);sm(x,B);break e;case 1:N=I;var O=x.type,U=x.stateNode;if((x.flags&128)===0&&(typeof O.getDerivedStateFromError=="function"||U!==null&&typeof U.componentDidCatch=="function"&&(vr===null||!vr.has(U)))){x.flags|=65536,o&=-o,x.lanes|=o;var ce=Im(x,N,o);sm(x,ce);break e}}x=x.return}while(x!==null)}pg(u)}catch(be){o=be,ct===u&&u!==null&&(ct=u=u.return);continue}break}while(!0)}function dg(){var r=ba.current;return ba.current=ya,r===null?ya:r}function wc(){(pt===0||pt===3||pt===2)&&(pt=4),vt===null||(Ur&268435455)===0&&(Ca&268435455)===0||kr(vt,bt)}function Ma(r,o){var u=Be;Be|=2;var f=dg();(vt!==r||bt!==o)&&(er=null,Wr(r,o));do try{Cb();break}catch(g){fg(r,g)}while(!0);if(Du(),Be=u,ba.current=f,ct!==null)throw Error(n(261));return vt=null,bt=0,pt}function Cb(){for(;ct!==null;)hg(ct)}function Eb(){for(;ct!==null&&!Gk();)hg(ct)}function hg(r){var o=yg(r.alternate,r,rn);r.memoizedProps=r.pendingProps,o===null?pg(r):ct=o,fc.current=null}function pg(r){var o=r;do{var u=o.alternate;if(r=o.return,(o.flags&32768)===0){if(u=yb(u,o,rn),u!==null){ct=u;return}}else{if(u=vb(u,o),u!==null){u.flags&=32767,ct=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{pt=6,ct=null;return}}if(o=o.sibling,o!==null){ct=o;return}ct=o=r}while(o!==null);pt===0&&(pt=5)}function Kr(r,o,u){var f=We,g=pn.transition;try{pn.transition=null,We=1,Tb(r,o,u,f)}finally{pn.transition=g,We=f}return null}function Tb(r,o,u,f){do Di();while(xr!==null);if((Be&6)!==0)throw Error(n(327));u=r.finishedWork;var g=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var x=u.lanes|u.childLanes;if(sS(r,x),r===vt&&(ct=vt=null,bt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||Ta||(Ta=!0,vg(Is,function(){return Di(),null})),x=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||x){x=pn.transition,pn.transition=null;var b=We;We=1;var N=Be;Be|=4,fc.current=null,wb(r,u),ig(u,r),KS(wu),Bs=!!xu,wu=xu=null,r.current=u,kb(u),Qk(),Be=N,We=b,pn.transition=x}else r.current=u;if(Ta&&(Ta=!1,xr=r,Pa=g),x=r.pendingLanes,x===0&&(vr=null),eS(u.stateNode),Yt(r,lt()),o!==null)for(f=r.onRecoverableError,u=0;u<o.length;u++)g=o[u],f(g.value,{componentStack:g.stack,digest:g.digest});if(Ea)throw Ea=!1,r=pc,pc=null,r;return(Pa&1)!==0&&r.tag!==0&&Di(),x=r.pendingLanes,(x&1)!==0?r===mc?Bo++:(Bo=0,mc=r):Bo=0,pr(),null}function Di(){if(xr!==null){var r=np(Pa),o=pn.transition,u=We;try{if(pn.transition=null,We=16>r?16:r,xr===null)var f=!1;else{if(r=xr,xr=null,Pa=0,(Be&6)!==0)throw Error(n(331));var g=Be;for(Be|=4,ye=r.current;ye!==null;){var x=ye,b=x.child;if((ye.flags&16)!==0){var N=x.deletions;if(N!==null){for(var I=0;I<N.length;I++){var K=N[I];for(ye=K;ye!==null;){var re=ye;switch(re.tag){case 0:case 11:case 15:Fo(8,re,x)}var ae=re.child;if(ae!==null)ae.return=re,ye=ae;else for(;ye!==null;){re=ye;var ne=re.sibling,me=re.return;if(Jm(re),re===K){ye=null;break}if(ne!==null){ne.return=me,ye=ne;break}ye=me}}}var we=x.alternate;if(we!==null){var Se=we.child;if(Se!==null){we.child=null;do{var ut=Se.sibling;Se.sibling=null,Se=ut}while(Se!==null)}}ye=x}}if((x.subtreeFlags&2064)!==0&&b!==null)b.return=x,ye=b;else e:for(;ye!==null;){if(x=ye,(x.flags&2048)!==0)switch(x.tag){case 0:case 11:case 15:Fo(9,x,x.return)}var B=x.sibling;if(B!==null){B.return=x.return,ye=B;break e}ye=x.return}}var O=r.current;for(ye=O;ye!==null;){b=ye;var U=b.child;if((b.subtreeFlags&2064)!==0&&U!==null)U.return=b,ye=U;else e:for(b=O;ye!==null;){if(N=ye,(N.flags&2048)!==0)try{switch(N.tag){case 0:case 11:case 15:Sa(9,N)}}catch(be){st(N,N.return,be)}if(N===b){ye=null;break e}var ce=N.sibling;if(ce!==null){ce.return=N.return,ye=ce;break e}ye=N.return}}if(Be=g,pr(),In&&typeof In.onPostCommitFiberRoot=="function")try{In.onPostCommitFiberRoot(_s,r)}catch{}f=!0}return f}finally{We=u,pn.transition=o}}return!1}function mg(r,o,u){o=Ai(u,o),o=Dm(r,o,1),r=gr(r,o,1),o=Ft(),r!==null&&(co(r,1,o),Yt(r,o))}function st(r,o,u){if(r.tag===3)mg(r,r,u);else for(;o!==null;){if(o.tag===3){mg(o,r,u);break}else if(o.tag===1){var f=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(vr===null||!vr.has(f))){r=Ai(u,r),r=Im(o,r,1),o=gr(o,r,1),r=Ft(),o!==null&&(co(o,1,r),Yt(o,r));break}}o=o.return}}function Pb(r,o,u){var f=r.pingCache;f!==null&&f.delete(o),o=Ft(),r.pingedLanes|=r.suspendedLanes&u,vt===r&&(bt&u)===u&&(pt===4||pt===3&&(bt&130023424)===bt&&500>lt()-hc?Wr(r,0):dc|=u),Yt(r,o)}function gg(r,o){o===0&&((r.mode&1)===0?o=1:(o=Os,Os<<=1,(Os&130023424)===0&&(Os=4194304)));var u=Ft();r=Qn(r,o),r!==null&&(co(r,o,u),Yt(r,u))}function Rb(r){var o=r.memoizedState,u=0;o!==null&&(u=o.retryLane),gg(r,u)}function Ab(r,o){var u=0;switch(r.tag){case 13:var f=r.stateNode,g=r.memoizedState;g!==null&&(u=g.retryLane);break;case 19:f=r.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(o),gg(r,u)}var yg;yg=function(r,o,u){if(r!==null)if(r.memoizedProps!==o.pendingProps||Wt.current)qt=!0;else{if((r.lanes&u)===0&&(o.flags&128)===0)return qt=!1,gb(r,o,u);qt=(r.flags&131072)!==0}else qt=!1,tt&&(o.flags&1048576)!==0&&Gp(o,oa,o.index);switch(o.lanes=0,o.tag){case 2:var f=o.type;wa(r,o),r=o.pendingProps;var g=ki(o,Rt.current);Pi(o,u),g=Hu(null,o,f,r,g,u);var x=Wu();return o.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Kt(f)?(x=!0,na(o)):x=!1,o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Ou(o),g.updater=va,o.stateNode=g,g._reactInternals=o,Qu(o,f,r,u),o=tc(null,o,f,!0,x,u)):(o.tag=0,tt&&x&&Pu(o),Ot(null,o,g,u),o=o.child),o;case 16:f=o.elementType;e:{switch(wa(r,o),r=o.pendingProps,g=f._init,f=g(f._payload),o.type=f,g=o.tag=Nb(f),r=Cn(f,r),g){case 0:o=ec(null,o,f,r,u);break e;case 1:o=Um(null,o,f,r,u);break e;case 11:o=Fm(null,o,f,r,u);break e;case 14:o=zm(null,o,f,Cn(f.type,r),u);break e}throw Error(n(306,f,""))}return o;case 0:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Cn(f,g),ec(r,o,f,g,u);case 1:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Cn(f,g),Um(r,o,f,g,u);case 3:e:{if(Hm(o),r===null)throw Error(n(387));f=o.pendingProps,x=o.memoizedState,g=x.element,om(r,o),fa(o,f,null,u);var b=o.memoizedState;if(f=b.element,x.isDehydrated)if(x={element:f,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},o.updateQueue.baseState=x,o.memoizedState=x,o.flags&256){g=Ai(Error(n(423)),o),o=Wm(r,o,f,u,g);break e}else if(f!==g){g=Ai(Error(n(424)),o),o=Wm(r,o,f,u,g);break e}else for(nn=fr(o.stateNode.containerInfo.firstChild),tn=o,tt=!0,bn=null,u=rm(o,null,f,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Ci(),f===g){o=Jn(r,o,u);break e}Ot(r,o,f,u)}o=o.child}return o;case 5:return lm(o),r===null&&Mu(o),f=o.type,g=o.pendingProps,x=r!==null?r.memoizedProps:null,b=g.children,ku(f,g)?b=null:x!==null&&ku(f,x)&&(o.flags|=32),$m(r,o),Ot(r,o,b,u),o.child;case 6:return r===null&&Mu(o),null;case 13:return Km(r,o,u);case 4:return Fu(o,o.stateNode.containerInfo),f=o.pendingProps,r===null?o.child=Ei(o,null,f,u):Ot(r,o,f,u),o.child;case 11:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Cn(f,g),Fm(r,o,f,g,u);case 7:return Ot(r,o,o.pendingProps,u),o.child;case 8:return Ot(r,o,o.pendingProps.children,u),o.child;case 12:return Ot(r,o,o.pendingProps.children,u),o.child;case 10:e:{if(f=o.type._context,g=o.pendingProps,x=o.memoizedProps,b=g.value,Ge(la,f._currentValue),f._currentValue=b,x!==null)if(Sn(x.value,b)){if(x.children===g.children&&!Wt.current){o=Jn(r,o,u);break e}}else for(x=o.child,x!==null&&(x.return=o);x!==null;){var N=x.dependencies;if(N!==null){b=x.child;for(var I=N.firstContext;I!==null;){if(I.context===f){if(x.tag===1){I=Zn(-1,u&-u),I.tag=2;var K=x.updateQueue;if(K!==null){K=K.shared;var re=K.pending;re===null?I.next=I:(I.next=re.next,re.next=I),K.pending=I}}x.lanes|=u,I=x.alternate,I!==null&&(I.lanes|=u),_u(x.return,u,o),N.lanes|=u;break}I=I.next}}else if(x.tag===10)b=x.type===o.type?null:x.child;else if(x.tag===18){if(b=x.return,b===null)throw Error(n(341));b.lanes|=u,N=b.alternate,N!==null&&(N.lanes|=u),_u(b,u,o),b=x.sibling}else b=x.child;if(b!==null)b.return=x;else for(b=x;b!==null;){if(b===o){b=null;break}if(x=b.sibling,x!==null){x.return=b.return,b=x;break}b=b.return}x=b}Ot(r,o,g.children,u),o=o.child}return o;case 9:return g=o.type,f=o.pendingProps.children,Pi(o,u),g=dn(g),f=f(g),o.flags|=1,Ot(r,o,f,u),o.child;case 14:return f=o.type,g=Cn(f,o.pendingProps),g=Cn(f.type,g),zm(r,o,f,g,u);case 15:return Vm(r,o,o.type,o.pendingProps,u);case 17:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Cn(f,g),wa(r,o),o.tag=1,Kt(f)?(r=!0,na(o)):r=!1,Pi(o,u),Nm(o,f,g),Qu(o,f,g,u),tc(null,o,f,!0,r,u);case 19:return Xm(r,o,u);case 22:return Bm(r,o,u)}throw Error(n(156,o.tag))};function vg(r,o){return Qh(r,o)}function Mb(r,o,u,f){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mn(r,o,u,f){return new Mb(r,o,u,f)}function kc(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Nb(r){if(typeof r=="function")return kc(r)?1:0;if(r!=null){if(r=r.$$typeof,r===$)return 11;if(r===te)return 14}return 2}function Sr(r,o){var u=r.alternate;return u===null?(u=mn(r.tag,o,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=o,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,o=r.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function Na(r,o,u,f,g,x){var b=2;if(f=r,typeof r=="function")kc(r)&&(b=1);else if(typeof r=="string")b=5;else e:switch(r){case Y:return qr(u.children,g,x,o);case W:b=8,g|=8;break;case X:return r=mn(12,u,o,g|2),r.elementType=X,r.lanes=x,r;case fe:return r=mn(13,u,o,g),r.elementType=fe,r.lanes=x,r;case se:return r=mn(19,u,o,g),r.elementType=se,r.lanes=x,r;case Ee:return ja(u,g,x,o);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case j:b=10;break e;case G:b=9;break e;case $:b=11;break e;case te:b=14;break e;case xe:b=16,f=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return o=mn(b,u,o,g),o.elementType=r,o.type=f,o.lanes=x,o}function qr(r,o,u,f){return r=mn(7,r,f,o),r.lanes=u,r}function ja(r,o,u,f){return r=mn(22,r,f,o),r.elementType=Ee,r.lanes=u,r.stateNode={isHidden:!1},r}function Sc(r,o,u){return r=mn(6,r,null,o),r.lanes=u,r}function bc(r,o,u){return o=mn(4,r.children!==null?r.children:[],r.key,o),o.lanes=u,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}function jb(r,o,u,f,g){this.tag=o,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gl(0),this.expirationTimes=Gl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gl(0),this.identifierPrefix=f,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Cc(r,o,u,f,g,x,b,N,I){return r=new jb(r,o,u,N,I),o===1?(o=1,x===!0&&(o|=8)):o=0,x=mn(3,null,null,o),r.current=x,x.stateNode=r,x.memoizedState={element:f,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ou(x),r}function Db(r,o,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:f==null?null:""+f,children:r,containerInfo:o,implementation:u}}function xg(r){if(!r)return hr;r=r._reactInternals;e:{if(_r(r)!==r||r.tag!==1)throw Error(n(170));var o=r;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Kt(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(Kt(u))return qp(r,u,o)}return o}function wg(r,o,u,f,g,x,b,N,I){return r=Cc(u,f,!0,r,g,x,b,N,I),r.context=xg(null),u=r.current,f=Ft(),g=wr(u),x=Zn(f,g),x.callback=o??null,gr(u,x,g),r.current.lanes=g,co(r,g,f),Yt(r,f),r}function Da(r,o,u,f){var g=o.current,x=Ft(),b=wr(g);return u=xg(u),o.context===null?o.context=u:o.pendingContext=u,o=Zn(x,b),o.payload={element:r},f=f===void 0?null:f,f!==null&&(o.callback=f),r=gr(g,o,b),r!==null&&(Pn(r,g,b,x),ca(r,g,b)),b}function Ia(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function kg(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<o?u:o}}function Ec(r,o){kg(r,o),(r=r.alternate)&&kg(r,o)}function Ib(){return null}var Sg=typeof reportError=="function"?reportError:function(r){console.error(r)};function Tc(r){this._internalRoot=r}_a.prototype.render=Tc.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(n(409));Da(r,o,null,null)},_a.prototype.unmount=Tc.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;Hr(function(){Da(null,r,null,null)}),o[qn]=null}};function _a(r){this._internalRoot=r}_a.prototype.unstable_scheduleHydration=function(r){if(r){var o=op();r={blockedOn:null,target:r,priority:o};for(var u=0;u<lr.length&&o!==0&&o<lr[u].priority;u++);lr.splice(u,0,r),u===0&&lp(r)}};function Pc(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function La(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function bg(){}function _b(r,o,u,f,g){if(g){if(typeof f=="function"){var x=f;f=function(){var K=Ia(b);x.call(K)}}var b=wg(o,f,r,0,null,!1,!1,"",bg);return r._reactRootContainer=b,r[qn]=b.current,Eo(r.nodeType===8?r.parentNode:r),Hr(),b}for(;g=r.lastChild;)r.removeChild(g);if(typeof f=="function"){var N=f;f=function(){var K=Ia(I);N.call(K)}}var I=Cc(r,0,!1,null,null,!1,!1,"",bg);return r._reactRootContainer=I,r[qn]=I.current,Eo(r.nodeType===8?r.parentNode:r),Hr(function(){Da(o,I,u,f)}),I}function Oa(r,o,u,f,g){var x=u._reactRootContainer;if(x){var b=x;if(typeof g=="function"){var N=g;g=function(){var I=Ia(b);N.call(I)}}Da(o,b,r,g)}else b=_b(u,o,r,g,f);return Ia(b)}rp=function(r){switch(r.tag){case 3:var o=r.stateNode;if(o.current.memoizedState.isDehydrated){var u=uo(o.pendingLanes);u!==0&&(Ql(o,u|1),Yt(o,lt()),(Be&6)===0&&(ji=lt()+500,pr()))}break;case 13:Hr(function(){var f=Qn(r,1);if(f!==null){var g=Ft();Pn(f,r,1,g)}}),Ec(r,1)}},Zl=function(r){if(r.tag===13){var o=Qn(r,134217728);if(o!==null){var u=Ft();Pn(o,r,134217728,u)}Ec(r,134217728)}},ip=function(r){if(r.tag===13){var o=wr(r),u=Qn(r,o);if(u!==null){var f=Ft();Pn(u,r,o,f)}Ec(r,o)}},op=function(){return We},sp=function(r,o){var u=We;try{return We=r,o()}finally{We=u}},oo=function(r,o,u){switch(o){case"input":if(it(r,u),o=u.name,u.type==="radio"&&o!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<u.length;o++){var f=u[o];if(f!==r&&f.form===r.form){var g=ea(f);if(!g)throw Error(n(90));kt(f),it(f,g)}}}break;case"textarea":z(r,u);break;case"select":o=u.value,o!=null&&Lt(r,!!u.multiple,o,!1)}},Hh=vc,Wh=Hr;var Lb={usingClientEntryPoint:!1,Events:[Ro,xi,ea,$h,Uh,vc]},$o={findFiberByHostInstance:Lr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ob={bundleType:$o.bundleType,version:$o.version,rendererPackageName:$o.rendererPackageName,rendererConfig:$o.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:L.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Yh(r),r===null?null:r.stateNode},findFiberByHostInstance:$o.findFiberByHostInstance||Ib,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 Fa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fa.isDisabled&&Fa.supportsFiber)try{_s=Fa.inject(Ob),In=Fa}catch{}}return Gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Lb,Gt.createPortal=function(r,o){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Pc(o))throw Error(n(200));return Db(r,o,null,u)},Gt.createRoot=function(r,o){if(!Pc(r))throw Error(n(299));var u=!1,f="",g=Sg;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onRecoverableError!==void 0&&(g=o.onRecoverableError)),o=Cc(r,1,!1,null,null,u,!1,f,g),r[qn]=o.current,Eo(r.nodeType===8?r.parentNode:r),new Tc(o)},Gt.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var o=r._reactInternals;if(o===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Yh(o),r=r===null?null:r.stateNode,r},Gt.flushSync=function(r){return Hr(r)},Gt.hydrate=function(r,o,u){if(!La(o))throw Error(n(200));return Oa(null,r,o,!0,u)},Gt.hydrateRoot=function(r,o,u){if(!Pc(r))throw Error(n(405));var f=u!=null&&u.hydratedSources||null,g=!1,x="",b=Sg;if(u!=null&&(u.unstable_strictMode===!0&&(g=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onRecoverableError!==void 0&&(b=u.onRecoverableError)),o=wg(o,null,r,1,u??null,g,!1,x,b),r[qn]=o.current,Eo(r),f)for(r=0;r<f.length;r++)u=f[r],g=u._getVersion,g=g(u._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[u,g]:o.mutableSourceEagerHydrationData.push(u,g);return new _a(o)},Gt.render=function(r,o,u){if(!La(o))throw Error(n(200));return Oa(null,r,o,!1,u)},Gt.unmountComponentAtNode=function(r){if(!La(r))throw Error(n(40));return r._reactRootContainer?(Hr(function(){Oa(null,null,r,!1,function(){r._reactRootContainer=null,r[qn]=null})}),!0):!1},Gt.unstable_batchedUpdates=vc,Gt.unstable_renderSubtreeIntoContainer=function(r,o,u,f){if(!La(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Oa(r,o,u,!1,f)},Gt.version="18.3.1-next-f1338f8080-20240426",Gt}var Ng;function Tx(){if(Ng)return Mc.exports;Ng=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(),Mc.exports=Wb(),Mc.exports}var jg;function Kb(){if(jg)return za;jg=1;var e=Tx();return za.createRoot=e.createRoot,za.hydrateRoot=e.hydrateRoot,za}var qb=Kb(),S=Pd();const Xb=Td(S),ks=zb({__proto__:null,default:Xb},[S]);class kf extends Error{constructor(t,n){super(n),this.status=t}}function Yb(e){let t="";for(let i=0;i<e.length;i+=32768)t+=String.fromCharCode(...e.subarray(i,i+32768));return btoa(t)}function Gb(e=globalThis.fetch.bind(globalThis)){async function t(n,i){const s=(i?.method??"GET").toUpperCase(),a=await e(n,{...i,cache:"no-store",credentials:"same-origin",headers:s!=="GET"&&s!=="HEAD"?{"content-type":"application/json","X-Ours-Messenger-CSRF":"1",...i?.headers}:i?.headers}),c=await a.text();let d=null;if(c)try{d=JSON.parse(c)}catch{throw new kf(a.status,a.ok?"Server returned an invalid response":`HTTP ${a.status}`)}if(!a.ok){const h=d&&typeof d=="object"&&"error"in d&&d.error&&typeof d.error=="object"&&"message"in d.error&&typeof d.error.message=="string"?d.error.message:`HTTP ${a.status}`;throw new kf(a.status,h)}return d}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,i)=>t(`/api/conversations/${encodeURIComponent(n)}/page?limit=50${i?`&before=${encodeURIComponent(i)}`:""}`),markRead:n=>t(`/api/conversations/${encodeURIComponent(n)}/read`,{method:"POST"}),send:(n,i,s,l)=>t("/api/messages/send",{method:"POST",signal:l,body:JSON.stringify({contact:n,text:i,...s?{reply_to_wire_id:s}:{}})}),sendFile:async(n,i,s,l,a)=>t("/api/messages/send-file",{method:"POST",body:JSON.stringify({contact:n,data_base64:Yb(new Uint8Array(await i.arrayBuffer())),filename:s,mime:l,...a?{reply_to_wire_id:a}:{}})}),files:n=>t(`/api/conversations/${encodeURIComponent(n)}/files`),fetchFiles:n=>t("/api/files/fetch",{method:"POST",body:JSON.stringify({wire_ids:n})}),mediaUrl:n=>`/api/media/${encodeURIComponent(n)}`,createInvite:(n="one_time",i)=>t("/api/invites",{method:"POST",body:JSON.stringify({mode:n,...i?{name:i}:{}})}),addContact:(n,i)=>t("/api/contacts/add",{method:"POST",body:JSON.stringify({invite:n,...i?{name:i}:{}})}),renameContact:(n,i)=>t("/api/contacts/rename",{method:"POST",body:JSON.stringify({contact:n,name:i})}),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,i)=>t("/api/contacts/introductions",{method:"POST",body:JSON.stringify({contact:n,action:i})}),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 Qe=Gb(),Sf="ours-messenger-live-event";function Px(e){window.dispatchEvent(new CustomEvent(Sf,{detail:e}))}function Qb(e){const t=n=>{const i=n.detail;i?.v===1&&e(i)};return window.addEventListener(Sf,t),()=>window.removeEventListener(Sf,t)}function Zb(e,t){const n=new EventSource("/api/events");let i=!1;t("connecting"),n.onopen=()=>{i=!0,t("live")},n.onerror=()=>t(i?"retrying":"connecting");const s=l=>{n.addEventListener(l,a=>{try{const c=JSON.parse(a.data);c&&c.v===1&&e({...c,type:l})}catch{}})};return s("sync_required"),s("message_received"),s("receipt_received"),s("file_received"),()=>n.close()}function Jb(e=window.location){return`${e.protocol==="https:"?"wss:":"ws:"}//${e.host}/api/presence`}function eC(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 tC(e){let t=!1,n=null,i,s=1e3,l=0;const a=()=>{i!==void 0&&clearTimeout(i),i=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=s;s=Math.min(3e4,s*2),i=setTimeout(()=>{i=void 0,d()},m)},d=async()=>{if(a(),t||document.visibilityState!=="visible")return;const m=++l;e.onState?.("connecting");try{const[p,y]=await Promise.all([e.identity(),e.registration.pushManager.getSubscription()]);if(t||m!==l||document.visibilityState!=="visible")return;const w=y?.toJSON(),k=y?.endpoint,C=w?.keys?.auth;if(!k||!C)return;const T=new WebSocket(Jb());n=T,T.onopen=()=>T.send(JSON.stringify({identity:p.cid,endpoint:k,auth:C})),T.onmessage=E=>{let M;try{M=JSON.parse(String(E.data))}catch{return}if(M?.ok===!0){s=1e3,e.onState?.("live");return}const A=eC(M);A&&e.onEvent(A)},T.onclose=()=>{n===T&&(n=null),m===l&&c()},T.onerror=()=>T.close()}catch{m===l&&c()}},h=()=>{l++,document.visibilityState==="visible"?(s=1e3,d()):a()};return document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",a),d(),()=>{t=!0,l++,document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",a),a()}}function nC(e,t){return t.visibility==="visible"&&t.appRoute==="chats"&&t.selectedContactCid===e&&(t.desktopLayout||t.mobileDetailOpen)&&!t.conversationCoveringDialogOpen}class rC{#e=new Map;request(t,n){let i=this.#e.get(t);return i?.running?(i.rerun=!0,i.running):(i??={running:null,rerun:!1},this.#e.set(t,i),i.running=(async()=>{do i.rerun=!1,await n();while(i.rerun)})().finally(()=>{i.running=null,i.rerun||this.#e.delete(t)}),i.running)}}function Dg(e){if(e==="/"||e==="/chats"||e==="/chats/")return{name:"chats",contactCid:null};const t=/^\/chats\/([^/]+)\/?$/.exec(e);if(t)try{const n=decodeURIComponent(t[1]);if(n)return{name:"chats",contactCid:n}}catch{}return{name:"not_found",pathname:e}}function Ho(e){return e?`/chats/${encodeURIComponent(e)}`:"/chats"}const Ig={read:2,delivered:1};function _g(e){return e&&Object.hasOwn(Ig,e)?Ig[e]:0}function bf(e,t){return _g(t)>_g(e)?t:e}const iC=()=>({contacts:[],pending:[]});function oC(e){return{identity:null,contacts:iC(),route:e,pages:{},pendingSends:{},drafts:{},replies:{},connection:"connecting",search:"",mobileDetailOpen:e.name==="chats"&&e.contactCid!==null,coveringDialog:!1,dialogBusy:!1,generatedInvite:null,sendingDialog:null,error:null,loaded:!1}}function Qr(e,t){return`${e}:${t}`}function Xr(e){return e.route.name==="chats"?e.route.contactCid:null}function Zr(e,t){return e.identity?e.pages[Qr(e.identity.cid,t)]??null:null}function sC(e,t){const n=bf(e.receipt,t.receipt);return n===t.receipt?t:{...t,receipt:n}}function Ii(e,t){const n=[...e],i=new Map;n.forEach((s,l)=>{s.wire_id&&i.set(s.wire_id,l)});for(const s of t){const l=s.wire_id?i.get(s.wire_id):void 0;l===void 0?(s.wire_id&&i.set(s.wire_id,n.length),n.push(s)):n[l]=sC(n[l],s)}return n}function Lg(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}:{}}}case"contacts":return{...e,contacts:t.contacts};case"page":{if(!e.identity)return e;const n=Qr(e.identity.cid,t.contactCid),i=e.pages[n],s=e.pendingSends[n]??[],l=new Set(t.page.messages.map(y=>y.wire_id)),a=s.filter(y=>!l.has(y.wire_id)),c=new Map(i?.messages.map(y=>[y.wire_id,y.receipt])??[]),d=i?t.page.messages.map(y=>{const w=bf(c.get(y.wire_id)??null,y.receipt);return w===y.receipt?y:{...y,receipt:w}}):t.page.messages,h=i&&i.messages.length>50?{...t.page,messages:Ii(i.messages,d),hasMore:i.hasMore,nextBefore:i.nextBefore}:{...t.page,messages:d},m=Ii(h.messages,a),p={...h,messages:m,total:Math.max(h.total+a.length,m.length)};return{...e,pages:{...e.pages,[n]:p},pendingSends:{...e.pendingSends,[n]:a.length?a:void 0}}}case"sent_message":{if(!e.identity)return e;const n=Qr(e.identity.cid,t.contactCid),i=e.pages[n];if(i?.messages.some(a=>a.wire_id===t.message.wire_id))return e;const s=Ii(e.pendingSends[n]??[],[t.message]);if(!i)return{...e,pendingSends:{...e.pendingSends,[n]:s}};const l=Ii(i.messages,[t.message]);return{...e,pages:{...e.pages,[n]:{...i,messages:l,total:Math.max(i.total+1,l.length)}},pendingSends:{...e.pendingSends,[n]:s}}}case"receipt":{if(!e.identity)return e;const n=Qr(e.identity.cid,t.contactCid),i=e.pages[n],s=e.pendingSends[n],l=new Set(t.wireIds),a=h=>{let m=!1;const p=h.map(y=>{if(!y.wire_id||!l.has(y.wire_id))return y;const w=bf(y.receipt,t.kind);return w===y.receipt?y:(m=!0,{...y,receipt:w})});return m?p:h},c=i?a(i.messages):void 0,d=s?a(s):void 0;return c===i?.messages&&d===s?e:{...e,pages:i&&c?{...e.pages,[n]:{...i,messages:c}}:e.pages,pendingSends:s&&d?{...e.pendingSends,[n]:d}:e.pendingSends}}case"older_page":{if(!e.identity)return e;const n=Qr(e.identity.cid,t.contactCid),i=e.pages[n];if(!i)return e;const s=Ii(Ii(t.page.messages,t.newer),i.messages),l={...t.page,preview:i.preview,total:Math.max(t.page.total,i.total,s.length),messages:s};return{...e,pages:{...e.pages,[n]:l}}}case"route":return{...e,route:t.route,mobileDetailOpen:t.mobileDetailOpen??(t.route.name==="chats"&&t.route.contactCid!==null)};case"connection":return{...e,connection:t.connection};case"search":return{...e,search:t.search};case"draft":return e.identity?{...e,drafts:{...e.drafts,[Qr(e.identity.cid,t.contactCid)]:t.value}}:e;case"reply":return e.identity?{...e,replies:{...e.replies,[Qr(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 aC(e,t,n){return!e||t?"ignore":n?"defer":"reload"}function Ss(){return{api:Qe,notification:globalThis.Notification,navigator}}function Tr(e,t,n){return new Promise((i,s)=>{const l=setTimeout(()=>s(new Error(`${n} did not complete within ${t/1e3}s — try again`)),t);e.then(a=>{clearTimeout(l),i(a)},a=>{clearTimeout(l),s(a)})})}async function lC(e,t={}){let n=null,i=!1,s=!1;const l="serviceWorker"in navigator&&window.isSecureContext,a=()=>e({supported:l,offline:!navigator.onLine,updateAvailable:i,registration:n}),c=()=>a(),d=()=>a(),h=()=>{document.visibilityState==="visible"&&n?.update().catch(()=>{})},m=w=>{if(w.data?.type==="ours-push-repair-required"){window.dispatchEvent(new Event("ours-push-repair-required"));return}if(w.data?.type==="ours-push-foreground"){const k=w.data.contact_id,C=w.data.wire_id,T=w.data.kind;typeof k=="string"&&typeof C=="string"&&Px({v:1,type:T==="file"?"file_received":"message_received",contact_id:k,wire_id:C,date:new Date().toISOString()})}},p=l&&!!navigator.serviceWorker.controller,y=()=>{const w=aC(p,s,t.shouldDeferReload?.()??!1);if(w!=="ignore"){if(w==="defer"){i=!0,a();return}s=!0,(t.reload??(()=>location.reload()))()}};if(window.addEventListener("online",c),window.addEventListener("offline",d),document.addEventListener("visibilitychange",h),navigator.serviceWorker?.addEventListener("message",m),navigator.serviceWorker?.addEventListener("controllerchange",y),l){n=await navigator.serviceWorker.register("/sw.js",{scope:"/",updateViaCache:"none"}),await navigator.serviceWorker.ready;const w=k=>k?.addEventListener("statechange",()=>{k.state==="installed"&&navigator.serviceWorker.controller&&(i=!0,a())});w(n.installing),n.addEventListener("updatefound",()=>w(n?.installing??null)),n.update().catch(()=>{})}return a(),()=>{window.removeEventListener("online",c),window.removeEventListener("offline",d),document.removeEventListener("visibilitychange",h),navigator.serviceWorker?.removeEventListener("message",m),navigator.serviceWorker?.removeEventListener("controllerchange",y)}}async function Og(e,t=()=>location.reload(),n=navigator.serviceWorker){const i=e.waiting;if(!i){t();return}await Tr(new Promise(s=>{let l=!1;const a=()=>{l||(l=!0,n.removeEventListener("controllerchange",a),t(),s())};n.addEventListener("controllerchange",a),i.postMessage({type:"SKIP_WAITING"})}),1e4,"service-worker update")}function uC(e){const t="=".repeat((4-e.length%4)%4),n=atob((e+t).replaceAll("-","+").replaceAll("_","/")),i=new Uint8Array(n.length);for(let s=0;s<n.length;s++)i[s]=n.charCodeAt(s);return i}function cC(e){return e?e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength):null}function Fg(e,t){const n=cC(e);return!!n&&n.length===t.length&&n.every((i,s)=>i===t[s])}function Cf(e=navigator.userAgent){return/iP(?:hone|ad|od)/.test(e)}function Ef(e=navigator,t=window){return Cf(e.userAgent)&&(e.standalone===!0||t.matchMedia("(display-mode: standalone)").matches)}function fC(){return Cf()&&!Ef()?"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"?Cf()?"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 dC(e={}){const t=e.notification??Ss().notification;if(!t)return Promise.reject(new Error("notification permission is unavailable"));const n=new Promise((i,s)=>{let l=!1;const a=c=>{if(l)return;const d=c??t.permission;d!=="granted"&&d!=="denied"&&d!=="default"||(l=!0,i(d))};try{const c=t.requestPermission(a);c&&typeof c.then=="function"&&c.then(a,s)}catch(c){s(c)}});return Tr(n,e.timeoutMs??15e3,"notification permission")}function Rx(e,t){return!!e&&!!e.pushManager&&!!t.notification&&!!t.navigator.serviceWorker}function ri(e,t={}){return{status:e,preview:"full",...t}}async function hC(e,t,n){let i=await Tr(e.pushManager.getSubscription(),5e3,"push subscription lookup");if((n||i?.options.applicationServerKey&&!Fg(i.options.applicationServerKey,t))&&(i&&await Tr(i.unsubscribe(),5e3,"stale push unsubscribe"),i=null),i&&Fg(i.options.applicationServerKey,t))return i;try{return await Tr(e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t}),15e3,"push subscribe")}catch(s){const l=await e.pushManager.getSubscription();if(!l)throw s;return await Tr(l.unsubscribe(),5e3,"stale push unsubscribe"),Tr(e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t}),15e3,"push repair")}}async function Ax(e,t,n,i){const s=await i.api.vapidPublicKey(),a=await Tr(Promise.resolve(i.navigator.serviceWorker.ready),1e4,"service-worker readiness")??e,c=uC(s.publicKey),h=(await hC(a,c,n)).toJSON();if(!h.endpoint||!h.keys?.p256dh||!h.keys.auth)throw new Error("browser returned an incomplete push subscription");const m=await i.api.ensurePush({...h,label:i.navigator.userAgent.slice(0,160),...t===void 0?{}:{preview:t}});if(m.status!=="on"||m.fingerprint!==s.fingerprint||m.configEpoch!==s.configEpoch)throw new Error("server did not acknowledge the current Web Push configuration");return ri("on",{bindingId:m.binding_id,fingerprint:m.fingerprint,configEpoch:m.configEpoch,preview:m.preview})}async function zg(e,t=Ss()){return Rx(e,t)?t.notification.permission!=="granted"?ri("needs-permission",{blocked:t.notification.permission==="denied"}):await e.pushManager.getSubscription()?Ax(e,void 0,!1,t):ri("off"):ri("unsupported")}async function Mx(e,t={},n=Ss()){if(!Rx(e,n))return ri("unsupported");const i=await dC({notification:n.notification});return i!=="granted"?ri("needs-permission",{blocked:i==="denied"}):Ax(e,t.preview??"full",t.forceFresh??!1,n)}const pC=(e,t,n=Ss())=>Mx(e,{preview:t,forceFresh:!0},n);async function mC(e,t,n=Ss()){const i=await e.pushManager.getSubscription(),s=[];if(t.bindingId)try{await n.api.deletePush(t.bindingId)}catch(l){s.push(l)}if(i)try{await i.unsubscribe()}catch(l){s.push(l)}if(s.length)throw new Error("notification disable did not fully converge — choose Repair and try again");return ri("off",{preview:t.preview})}function gC(e=15e3){if(!("serviceWorker"in navigator))return()=>{};let t;const n=()=>{const l={type:"ours-visibility",state:document.visibilityState,ts:Date.now(),iosStandalone:Ef()};navigator.serviceWorker.ready.then(a=>{(navigator.serviceWorker.controller??a.active)?.postMessage(l)}).catch(()=>{})},i=()=>{n(),t!==void 0&&clearInterval(t),t=document.visibilityState==="visible"?setInterval(n,e):void 0,document.visibilityState==="visible"&&Nx()},s=l=>{l.data?.type!=="ours-visibility-query"||!l.ports?.[0]||l.ports[0].postMessage({type:"ours-visibility-reply",state:document.visibilityState,iosStandalone:Ef()})};return document.addEventListener("visibilitychange",i),navigator.serviceWorker.addEventListener("message",s),i(),()=>{document.removeEventListener("visibilitychange",i),navigator.serviceWorker.removeEventListener("message",s),t!==void 0&&clearInterval(t)}}async function Nx(){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{}}/**
|
|
41
|
+
* @license lucide-react v0.468.0 - ISC
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the ISC license.
|
|
44
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/const yC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jx=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();/**
|
|
46
|
+
* @license lucide-react v0.468.0 - ISC
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the ISC license.
|
|
49
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/var vC={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"};/**
|
|
51
|
+
* @license lucide-react v0.468.0 - ISC
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the ISC license.
|
|
54
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/const xC=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:a,...c},d)=>S.createElement("svg",{ref:d,...vC,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:jx("lucide",s),...c},[...a.map(([h,m])=>S.createElement(h,m)),...Array.isArray(l)?l:[l]]));/**
|
|
56
|
+
* @license lucide-react v0.468.0 - ISC
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the ISC license.
|
|
59
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/const ze=(e,t)=>{const n=S.forwardRef(({className:i,...s},l)=>S.createElement(xC,{ref:l,iconNode:t,className:jx(`lucide-${yC(e)}`,i),...s}));return n.displayName=`${e}`,n};/**
|
|
61
|
+
* @license lucide-react v0.468.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const wC=ze("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
66
|
+
* @license lucide-react v0.468.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const kC=ze("Bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);/**
|
|
71
|
+
* @license lucide-react v0.468.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const SC=ze("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"}]]);/**
|
|
76
|
+
* @license lucide-react v0.468.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const bC=ze("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"}]]);/**
|
|
81
|
+
* @license lucide-react v0.468.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const Vg=ze("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"}]]);/**
|
|
86
|
+
* @license lucide-react v0.468.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const CC=ze("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
91
|
+
* @license lucide-react v0.468.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const EC=ze("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
96
|
+
* @license lucide-react v0.468.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const TC=ze("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
101
|
+
* @license lucide-react v0.468.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const PC=ze("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"}]]);/**
|
|
106
|
+
* @license lucide-react v0.468.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const RC=ze("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
|
|
111
|
+
* @license lucide-react v0.468.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const AC=ze("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"}]]);/**
|
|
116
|
+
* @license lucide-react v0.468.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const MC=ze("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"}]]);/**
|
|
121
|
+
* @license lucide-react v0.468.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const NC=ze("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"}]]);/**
|
|
126
|
+
* @license lucide-react v0.468.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const Bg=ze("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"}]]);/**
|
|
131
|
+
* @license lucide-react v0.468.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const jC=ze("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"}]]);/**
|
|
136
|
+
* @license lucide-react v0.468.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const DC=ze("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"}]]);/**
|
|
141
|
+
* @license lucide-react v0.468.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const IC=ze("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"}]]);/**
|
|
146
|
+
* @license lucide-react v0.468.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const _C=ze("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"}]]);/**
|
|
151
|
+
* @license lucide-react v0.468.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const LC=ze("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"}]]);/**
|
|
156
|
+
* @license lucide-react v0.468.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const OC=ze("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"}]]);/**
|
|
161
|
+
* @license lucide-react v0.468.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const FC=ze("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"}]]);/**
|
|
166
|
+
* @license lucide-react v0.468.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const zC=ze("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"}]]);/**
|
|
171
|
+
* @license lucide-react v0.468.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const VC=ze("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
176
|
+
* @license lucide-react v0.468.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const BC=ze("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"}]]);/**
|
|
181
|
+
* @license lucide-react v0.468.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const $C=ze("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"}]]);/**
|
|
186
|
+
* @license lucide-react v0.468.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const UC=ze("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
191
|
+
* @license lucide-react v0.468.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const HC=ze("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"}]]);/**
|
|
196
|
+
* @license lucide-react v0.468.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const WC=ze("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
201
|
+
* @license lucide-react v0.468.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const KC=ze("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"}]]);/**
|
|
206
|
+
* @license lucide-react v0.468.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const qC=ze("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"}]]);/**
|
|
211
|
+
* @license lucide-react v0.468.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const XC=ze("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"}]]);/**
|
|
216
|
+
* @license lucide-react v0.468.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const YC=ze("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"}]]);/**
|
|
221
|
+
* @license lucide-react v0.468.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const GC=ze("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"}]]);/**
|
|
226
|
+
* @license lucide-react v0.468.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const QC=ze("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
|
|
231
|
+
* @license lucide-react v0.468.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const ZC=ze("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),JC={app:jC,back:wC,bell:kC,bolt:SC,chat:FC,check:CC,chevron:TC,chevronDown:EC,close:ZC,clusters:Vg,copy:AC,download:MC,edit:$C,inbox:DC,link:IC,lock:_C,mic:zC,maximize:LC,minus:VC,monitor:Bg,monitorEye:Bg,more:NC,paperclip:BC,pause:PC,play:RC,plus:UC,refresh:HC,reply:OC,search:WC,send:KC,settings:qC,shield:XC,sliders:YC,trash:GC,user:QC,agent:bC,network:Vg};function ve(e){const{name:t,size:n=18,stroke:i=1.8,fill:s=!1,style:l,className:a}=e,c=JC[t];return c?v.jsx(c,{className:"ic "+(a||""),width:n,height:n,strokeWidth:i,fill:s?"currentColor":"none",style:l,"aria-hidden":"true"}):null}function Dx(e){if(typeof e!="string")return null;const t=/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?/.exec(e.trim());if(!t)return null;const n=t[7]?t[7].slice(0,3).padEnd(3,"0"):"000";return`${t[1]}-${t[2]}-${t[3]}T${t[4]}:${t[5]}:${t[6]}.${n}Z`}function pl(e){const t=Dx(e);if(t){const i=Date.parse(t);if(!Number.isNaN(i))return i}const n=new Date(e).getTime();return Number.isNaN(n)?0:n}function eE(e){const t=Dx(e);if(t){const i=new Date(t);if(!Number.isNaN(i.getTime()))return i}const n=new Date(e);return Number.isNaN(n.getTime())?null:n}const Wo="room",tE="room_",ml="ours-cowork-room:",$g="ours-cowork:",Ug="ours-cowork-",Hg="cowork-room-",Tf=/^[0-7][0-9a-hjkmnp-tv-z]{25}$/,nE=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,rE=25,iE=64,oE=80,Wg=1e3,us=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),zt=e=>typeof e=="string"&&e.length>0;function sE(e,t){if(typeof e!="string")return null;const n=e.trim();if(!n.startsWith("{")||!n.endsWith("}"))return null;let i;try{i=JSON.parse(n)}catch{return null}return!us(i)||i.version!==1||!zt(i.kind)||!i.kind.startsWith(tE)||!zt(i.room_id)||t&&!zt(i.signature)?null:i}function aE(e){const t=us(e.author)?e.author:{};return{name:zt(t.display_name)?t.display_name:"",role:zt(t.role)?t.role:""}}function Dc(e){const n=Array.from(String(e)).slice(0,oE).join("").replace(/^room_/,"").split("_").filter(Boolean);return n.length===0?"Room notice":n.join(" ").replace(/^./,i=>i.toUpperCase())}function lE(e){if(!us(e))return null;const t=zt(e.kind)?e.kind:"",n=aE(e),i=typeof e.text=="string"?e.text:"",s=Number.isSafeInteger(e.briefing_version)&&e.briefing_version>0?e.briefing_version:null,l={roomName:Ix(e.room_name)??"",authoredAt:zt(e.at)?e.at:""};switch(t){case"room_msg":return n.role===Wo?Er(t,"Room message",i||"Room notice",{...l,authoredBy:n.name}):{variant:"chat",kind:t,author:n.name||"Unknown member",role:n.role,label:"",text:i,...l};case"room_briefing":return Er(t,s===null?"Room briefing":`Room briefing · v${s}`,i||"The room briefing was updated.",{...l,authoredBy:n.name,presentation:"briefing"});case"room_role_briefing":{const a=zt(e.briefing_role)?e.briefing_role:"",c=["Role briefing",a,s===null?"":`v${s}`].filter(Boolean).join(" · ");return Er(t,c,i||"Your role briefing was updated.",{...l,authoredBy:n.name,presentation:"role",details:a?[`Role: ${a}`]:[]})}case"room_membership":{const a=us(e.membership)?e.membership:{},c=[zt(a.action)?`Status: ${fE(a.action)}`:"",zt(a.alias)?`Member: ${a.alias}`:"",zt(a.role)?`Role: ${a.role}`:"",Number.isSafeInteger(a.epoch)&&a.epoch>=0?`Epoch: ${a.epoch}`:""].filter(Boolean);return Er(t,"Membership",i||mE(a),{...l,authoredBy:n.name,presentation:"membership",details:c})}case"room_file":{const a=zt(e.filename)?e.filename:"Shared file",c=[zt(e.mime)?`Type: ${e.mime}`:"",Number.isSafeInteger(e.size)&&e.size>=0?`Size: ${dE(e.size)}`:"",zt(e.sha256)?`SHA-256: ${hE(e.sha256)}`:""].filter(Boolean);return Er(t,"Room file",a,{...l,authoredBy:n.name,role:n.role,presentation:"file",details:c})}case"room_not_member":return Er(t,"Room access","You are no longer a member of this room.",{...l,presentation:"lifecycle",details:["Status: Removed"]});default:return i?{variant:n.role&&n.role!==Wo?"chat":"system",kind:t,author:n.role&&n.role!==Wo?n.name||"Unknown member":"",role:n.role&&n.role!==Wo?n.role:"",label:n.role&&n.role!==Wo?"":Dc(t),text:pE(i),...l}:Er(t,Dc(t),`${Dc(t)} from the room.`,l)}}function uE(e,t){if(!cE(e))return null;const n=Md(e)?.roomId??null,i=Rd(e),s=Ad(e),l=sE(t,n===null&&s===null);return l!==null&&n!==null&&l.room_id!==n||l!==null&&i!==null&&l.room_id!==i?Kg("Room provenance mismatch"):lE(l)}function Ix(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<=iE?t:null}function Rd(e){if(typeof e!="string"||!e.startsWith(Hg))return null;const t=e.slice(Hg.length);return Tf.test(t)?t:null}function Ad(e){return typeof e!="string"||!e.startsWith($g)?null:Ix(e.slice($g.length))}function Md(e){if(typeof e!="string"||!e.startsWith(Ug))return null;const t=e.slice(Ug.length);if(Tf.test(t))return{roomId:t,slug:null};const n=t.slice(-26),i=t.at(-27),s=t.slice(0,-27);return i!=="-"||!Tf.test(n)||s.length<1||s.length>rE?null:nE.test(s)?{roomId:n,slug:s}:null}function cE(e){const t=String(e??"").trim();return t.startsWith(ml)&&t.slice(ml.length).trim().length>0||Ad(e)!==null||Md(e)!==null||Rd(e)!==null}function Er(e,t,n,i={}){return{variant:"system",kind:e,author:"",role:"",label:t,text:n,...i}}function fE(e){return String(e).replace(/_/g," ").replace(/^./,t=>t.toUpperCase())}function dE(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KiB`:`${(e/(1024*1024)).toFixed(1)} MiB`}function hE(e){const t=String(e);return t.length<=20?t:`${t.slice(0,12)}…${t.slice(-6)}`}function pE(e){const t=Array.from(String(e));return t.length<=Wg?t.join(""):`${t.slice(0,Wg).join("")}…`}function Kg(e){return Er("room_invalid","Room notice","This room envelope could not be displayed safely.",{presentation:"lifecycle",details:[`Status: ${e}`]})}function mE(e){if(!us(e))return"The room membership changed.";const t=zt(e.alias)?e.alias:"A member";return e.action==="remove"?`${t} left the room.`:"The room membership changed."}function gE(e){if(!e)return"";const t=e.variant==="chat"?e.author:e.label,n=yE(e.text);return t?n?`${t} · ${n}`:t:n}function yE(e){return String(e??"").replace(/\s+/g," ").trim()}function vE(e){const t=String(e??"").trim();if(t.startsWith(ml))return t.slice(ml.length).trim()||null;const n=Ad(e);if(n!==null)return n;const i=Md(e);if(i?.slug)return i.slug.replace(/-/g," ").replace(/[a-z]/,a=>a.toUpperCase());if(i)return`Room ${i.roomId.slice(0,8)}`;const s=Rd(e);return s===null?null:`Room ${s.slice(0,8)}`}const Nd=eE;function cs(e){const t=e.trim().split(/\s+/).filter(Boolean);if(!t.length)return"?";const n=i=>Array.from(i).find(s=>/[\p{L}\p{N}]/u.test(s))??Array.from(i)[0]??"";if(t.length===1){const i=Array.from(t[0]),s=i.filter(l=>/[\p{L}\p{N}]/u.test(l));return(s.length?s.slice(0,2).join(""):i[0]??"?").toUpperCase()}return(n(t[0])+n(t.at(-1)??"")).toUpperCase()}function xE(e){const t=Nd(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 fs(e){const t=Nd(e);return t?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):""}function wE(e){const t=Nd(e);return t?t.toLocaleString():e}function jd(e){return e.length<=14?e:`${e.slice(0,8)}…${e.slice(-4)}`}function kE(e){return/^[0-9A-Fa-f]{40,}$/.test(e.trim())}function SE(e,t,n){const i=(e??"").trim(),s=vE(i);return s||(i&&!kE(i)?i:i?jd(i):"Unnamed")}function Jo(e){return e.display_name?.trim()||SE(e.name)}const bE="x-ours-kind=voice-message",_x="voice-message-",Qo=20*1024*1024;let ds=null,Pf=[];const Dd=new Map;function CE(e){ds=e;for(const t of Pf)t(e);Pf=[]}function qg(e){for(const t of e)Dd.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 EE(){Dd.clear()}function Lx(e){return Dd.get(e)??null}function TE(e){return ds?.url(e)??null}function PE(e){return`${e}; ${bE}`}function qi(e,t){return/x-ours-kind\s*=\s*voice-message/i.test(e)||t.toLowerCase().startsWith(_x)&&e.toLowerCase().startsWith("audio/")}function RE(e,t){const n=e??"file",i=t??"";return qi(i,n)?"🎤 Voice message":i.toLowerCase().startsWith("image/")?"🖼 Photo":`📎 ${n}`}async function Nl(e){return(ds??await new Promise(n=>Pf.push(n))).bytes(e)}async function AE(e){if(!ds)throw new Error("Media provider is not ready");await ds.fetch(e)}function Ar(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function ME(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 Ox({receipt:e,content:t="Message",receiptless:n=!1}){const i=ME(e,n);return v.jsx("span",{className:"ticks"+(i.state==="read"?" read":""),"data-receipt-status":i.state,role:"img","aria-label":`${t} ${i.label}`,title:i.label,children:i.glyph})}function Xg(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,s=n.indexOf(t);for(;s!==-1;)i++,s=n.indexOf(t,s+t.length);return i}const Vt=Dr(/[A-Za-z]/),jt=Dr(/[\dA-Za-z]/),NE=Dr(/[#-'*+\--9=?A-Z^-~]/);function gl(e){return e!==null&&(e<32||e===127)}const Rf=Dr(/\d/),jE=Dr(/[\dA-Fa-f]/),DE=Dr(/[!-/:-@[-`{-~]/);function Ae(e){return e!==null&&e<-2}function Ye(e){return e!==null&&(e<0||e===32)}function Oe(e){return e===-2||e===-1||e===32}const jl=Dr(/\p{P}|\p{S}/u),ai=Dr(/\s/);function Dr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function IE(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Dl=function(e){if(e==null)return FE;if(typeof e=="function")return Il(e);if(typeof e=="object")return Array.isArray(e)?_E(e):LE(e);if(typeof e=="string")return OE(e);throw new Error("Expected function, string, or object as test")};function _E(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Dl(e[n]);return Il(i);function i(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function LE(e){const t=e;return Il(n);function n(i){const s=i;let l;for(l in e)if(s[l]!==t[l])return!1;return!0}}function OE(e){return Il(t);function t(n){return n&&n.type===e}}function Il(e){return t;function t(n,i,s){return!!(zE(n)&&e.call(this,n,typeof i=="number"?i:void 0,s||void 0))}}function FE(){return!0}function zE(e){return e!==null&&typeof e=="object"&&"type"in e}const Fx=[],VE=!0,Af=!1,BE="skip";function zx(e,t,n,i){let s;typeof t=="function"&&typeof n!="function"?(i=n,n=t):s=t;const l=Dl(s),a=i?-1:1;c(e,void 0,[])();function c(d,h,m){const p=d&&typeof d=="object"?d:{};if(typeof p.type=="string"){const w=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(d.type+(w?"<"+w+">":""))+")"})}return y;function y(){let w=Fx,k,C,T;if((!t||l(d,h,m[m.length-1]||void 0))&&(w=$E(n(d,m)),w[0]===Af))return w;if("children"in d&&d.children){const E=d;if(E.children&&w[0]!==BE)for(C=(i?E.children.length:-1)+a,T=m.concat(E);C>-1&&C<E.children.length;){const M=E.children[C];if(k=c(M,C,T)(),k[0]===Af)return k;C=typeof k[1]=="number"?k[1]:C+a}}return w}}}function $E(e){return Array.isArray(e)?e:typeof e=="number"?[VE,e]:e==null?Fx:[e]}function UE(e,t,n){const s=Dl((n||{}).ignore||[]),l=HE(t);let a=-1;for(;++a<l.length;)zx(e,"text",c);function c(h,m){let p=-1,y;for(;++p<m.length;){const w=m[p],k=y?y.children:void 0;if(s(w,k?k.indexOf(w):void 0,y))return;y=w}if(y)return d(h,m)}function d(h,m){const p=m[m.length-1],y=l[a][0],w=l[a][1];let k=0;const T=p.children.indexOf(h);let E=!1,M=[];y.lastIndex=0;let A=y.exec(h.value);for(;A;){const L=A.index,H={index:A.index,input:A.input,stack:[...m,h]};let D=w(...A,H);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?y.lastIndex=L+1:(k!==L&&M.push({type:"text",value:h.value.slice(k,L)}),Array.isArray(D)?M.push(...D):D&&M.push(D),k=L+A[0].length,E=!0),!y.global)break;A=y.exec(h.value)}return E?(k<h.value.length&&M.push({type:"text",value:h.value.slice(k)}),p.children.splice(T,1,...M)):M=[h],T+M.length}}function HE(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 i=-1;for(;++i<n.length;){const s=n[i];t.push([WE(s[0]),KE(s[1])])}return t}function WE(e){return typeof e=="string"?new RegExp(IE(e),"g"):e}function KE(e){return typeof e=="function"?e:function(){return e}}const Ic="phrasing",_c=["autolink","link","image","label"];function qE(){return{transforms:[eT],enter:{literalAutolink:YE,literalAutolinkEmail:Lc,literalAutolinkHttp:Lc,literalAutolinkWww:Lc},exit:{literalAutolink:JE,literalAutolinkEmail:ZE,literalAutolinkHttp:GE,literalAutolinkWww:QE}}}function XE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ic,notInConstruct:_c},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ic,notInConstruct:_c},{character:":",before:"[ps]",after:"\\/",inConstruct:Ic,notInConstruct:_c}]}}function YE(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Lc(e){this.config.enter.autolinkProtocol.call(this,e)}function GE(e){this.config.exit.autolinkProtocol.call(this,e)}function QE(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 ZE(e){this.config.exit.autolinkEmail.call(this,e)}function JE(e){this.exit(e)}function eT(e){UE(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,tT],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,nT]],{ignore:["link","linkReference"]})}function tT(e,t,n,i,s){let l="";if(!Vx(s)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!rT(n)))return!1;const a=iT(n+i);if(!a[0])return!1;const c={type:"link",title:null,url:l+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[c,{type:"text",value:a[1]}]:c}function nT(e,t,n,i){return!Vx(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function rT(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 iT(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const s=Xg(e,"(");let l=Xg(e,")");for(;i!==-1&&s>l;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),l++;return[e,n]}function Vx(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ai(n)||jl(n))&&(!t||n!==47)}function Mn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Bx.peek=hT;function oT(){this.buffer()}function sT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function aT(){this.buffer()}function lT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function uT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function cT(e){this.exit(e)}function fT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dT(e){this.exit(e)}function hT(){return"["}function Bx(e,t,n,i){const s=n.createTracker(i);let l=s.move("[^");const a=n.enter("footnoteReference"),c=n.enter("reference");return l+=s.move(n.safe(n.associationId(e),{after:"]",before:l})),c(),a(),l+=s.move("]"),l}function pT(){return{enter:{gfmFootnoteCallString:oT,gfmFootnoteCall:sT,gfmFootnoteDefinitionLabelString:aT,gfmFootnoteDefinition:lT},exit:{gfmFootnoteCallString:uT,gfmFootnoteCall:cT,gfmFootnoteDefinitionLabelString:fT,gfmFootnoteDefinition:dT}}}function mT(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Bx},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,s,l,a){const c=l.createTracker(a);let d=c.move("[^");const h=l.enter("footnoteDefinition"),m=l.enter("label");return d+=c.move(l.safe(l.associationId(i),{before:d,after:"]"})),m(),d+=c.move("]:"),i.children&&i.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
236
|
+
`:" ")+l.indentLines(l.containerFlow(i,c.current()),t?$x:gT))),h(),d}}function gT(e,t,n){return t===0?e:$x(e,t,n)}function $x(e,t,n){return(n?"":" ")+e}const yT=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ux.peek=ST;function vT(){return{canContainEols:["delete"],enter:{strikethrough:wT},exit:{strikethrough:kT}}}function xT(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:yT}],handlers:{delete:Ux}}}function wT(e){this.enter({type:"delete",children:[]},e)}function kT(e){this.exit(e)}function Ux(e,t,n,i){const s=n.createTracker(i),l=n.enter("strikethrough");let a=s.move("~~");return a+=n.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),l(),a}function ST(){return"~"}function bT(e){return e.length}function CT(e,t){const n=t||{},i=(n.align||[]).concat(),s=n.stringLength||bT,l=[],a=[],c=[],d=[];let h=0,m=-1;for(;++m<e.length;){const C=[],T=[];let E=-1;for(e[m].length>h&&(h=e[m].length);++E<e[m].length;){const M=ET(e[m][E]);if(n.alignDelimiters!==!1){const A=s(M);T[E]=A,(d[E]===void 0||A>d[E])&&(d[E]=A)}C.push(M)}a[m]=C,c[m]=T}let p=-1;if(typeof i=="object"&&"length"in i)for(;++p<h;)l[p]=Yg(i[p]);else{const C=Yg(i);for(;++p<h;)l[p]=C}p=-1;const y=[],w=[];for(;++p<h;){const C=l[p];let T="",E="";C===99?(T=":",E=":"):C===108?T=":":C===114&&(E=":");let M=n.alignDelimiters===!1?1:Math.max(1,d[p]-T.length-E.length);const A=T+"-".repeat(M)+E;n.alignDelimiters!==!1&&(M=T.length+M+E.length,M>d[p]&&(d[p]=M),w[p]=M),y[p]=A}a.splice(1,0,y),c.splice(1,0,w),m=-1;const k=[];for(;++m<a.length;){const C=a[m],T=c[m];p=-1;const E=[];for(;++p<h;){const M=C[p]||"";let A="",L="";if(n.alignDelimiters!==!1){const H=d[p]-(T[p]||0),D=l[p];D===114?A=" ".repeat(H):D===99?H%2?(A=" ".repeat(H/2+.5),L=" ".repeat(H/2-.5)):(A=" ".repeat(H/2),L=A):L=" ".repeat(H)}n.delimiterStart!==!1&&!p&&E.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&M==="")&&(n.delimiterStart!==!1||p)&&E.push(" "),n.alignDelimiters!==!1&&E.push(A),E.push(M),n.alignDelimiters!==!1&&E.push(L),n.padding!==!1&&E.push(" "),(n.delimiterEnd!==!1||p!==h-1)&&E.push("|")}k.push(n.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return k.join(`
|
|
237
|
+
`)}function ET(e){return e==null?"":String(e)}function Yg(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}function TT(e,t,n,i){const s=n.enter("blockquote"),l=n.createTracker(i);l.move("> "),l.shift(2);const a=n.indentLines(n.containerFlow(e,l.current()),PT);return s(),a}function PT(e,t,n){return">"+(n?"":" ")+e}function RT(e,t){return Gg(e,t.inConstruct,!0)&&!Gg(e,t.notInConstruct,!1)}function Gg(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function Qg(e,t,n,i){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
238
|
+
`&&RT(n.stack,n.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
239
|
+
`}function AT(e,t){const n=String(e);let i=n.indexOf(t),s=i,l=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===s?++l>a&&(a=l):l=1,s=i+t.length,i=n.indexOf(t,s);return a}function MT(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function NT(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 jT(e,t,n,i){const s=NT(n),l=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(MT(e,n)){const p=n.enter("codeIndented"),y=n.indentLines(l,DT);return p(),y}const c=n.createTracker(i),d=s.repeat(Math.max(AT(l,s)+1,3)),h=n.enter("codeFenced");let m=c.move(d);if(e.lang){const p=n.enter(`codeFencedLang${a}`);m+=c.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...c.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${a}`);m+=c.move(" "),m+=c.move(n.safe(e.meta,{before:m,after:`
|
|
240
|
+
`,encode:["`"],...c.current()})),p()}return m+=c.move(`
|
|
241
|
+
`),l&&(m+=c.move(l+`
|
|
242
|
+
`)),m+=c.move(d),h(),m}function DT(e,t,n){return(n?"":" ")+e}function Id(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 IT(e,t,n,i){const s=Id(n),l=s==='"'?"Quote":"Apostrophe",a=n.enter("definition");let c=n.enter("label");const d=n.createTracker(i);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
243
|
+
`,...d.current()}))),c(),e.title&&(c=n.enter(`title${l}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),c()),a(),h}function _T(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function hs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Xi(e){if(e===null||Ye(e)||ai(e))return 1;if(jl(e))return 2}function yl(e,t,n){const i=Xi(e),s=Xi(t);return i===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Hx.peek=LT;function Hx(e,t,n,i){const s=_T(n),l=n.enter("emphasis"),a=n.createTracker(i),c=a.move(s);let d=a.move(n.containerPhrasing(e,{after:s,before:c,...a.current()}));const h=d.charCodeAt(0),m=yl(i.before.charCodeAt(i.before.length-1),h,s);m.inside&&(d=hs(h)+d.slice(1));const p=d.charCodeAt(d.length-1),y=yl(i.after.charCodeAt(0),p,s);y.inside&&(d=d.slice(0,-1)+hs(p));const w=a.move(s);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:m.outside},c+d+w}function LT(e,t,n){return n.options.emphasis||"*"}function _d(e,t,n,i){let s,l,a;typeof t=="function"&&typeof n!="function"?(l=void 0,a=t,s=n):(l=t,a=n,s=i),zx(e,l,c,s);function c(d,h){const m=h[h.length-1],p=m?m.children.indexOf(d):void 0;return a(d,p,m)}}const OT={};function Ld(e,t){const n=OT,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Wx(e,i,s)}function Wx(e,t,n){if(FT(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 Zg(e.children,t,n)}return Array.isArray(e)?Zg(e,t,n):""}function Zg(e,t,n){const i=[];let s=-1;for(;++s<e.length;)i[s]=Wx(e[s],t,n);return i.join("")}function FT(e){return!!(e&&typeof e=="object")}function zT(e,t){let n=!1;return _d(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Af}),!!((!e.depth||e.depth<3)&&Ld(e)&&(t.options.setext||n))}function VT(e,t,n,i){const s=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(i);if(zT(e,n)){const m=n.enter("headingSetext"),p=n.enter("phrasing"),y=n.containerPhrasing(e,{...l.current(),before:`
|
|
244
|
+
`,after:`
|
|
245
|
+
`});return p(),m(),y+`
|
|
246
|
+
`+(s===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
247
|
+
`))+1))}const a="#".repeat(s),c=n.enter("headingAtx"),d=n.enter("phrasing");l.move(a+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
248
|
+
`,...l.current()});return/^[\t ]/.test(h)&&(h=hs(h.charCodeAt(0))+h.slice(1)),h=h?a+" "+h:a,n.options.closeAtx&&(h+=" "+a),d(),c(),h}Kx.peek=BT;function Kx(e){return e.value||""}function BT(){return"<"}qx.peek=$T;function qx(e,t,n,i){const s=Id(n),l=s==='"'?"Quote":"Apostrophe",a=n.enter("image");let c=n.enter("label");const d=n.createTracker(i);let h=d.move("![");return h+=d.move(n.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${l}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),c()),h+=d.move(")"),a(),h}function $T(){return"!"}Xx.peek=UT;function Xx(e,t,n,i){const s=e.referenceType,l=n.enter("imageReference");let a=n.enter("label");const c=n.createTracker(i);let d=c.move("![");const h=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return a(),n.stack=m,l(),s==="full"||!h||h!==p?d+=c.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function UT(){return"!"}Yx.peek=HT;function Yx(e,t,n){let i=e.value||"",s="`",l=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++l<n.unsafe.length;){const a=n.unsafe[l],c=n.compilePattern(a);let d;if(a.atBreak)for(;d=c.exec(i);){let h=d.index;i.charCodeAt(h)===10&&i.charCodeAt(h-1)===13&&h--,i=i.slice(0,h)+" "+i.slice(d.index+1)}}return s+i+s}function HT(){return"`"}function Gx(e,t){const n=Ld(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))}Qx.peek=WT;function Qx(e,t,n,i){const s=Id(n),l=s==='"'?"Quote":"Apostrophe",a=n.createTracker(i);let c,d;if(Gx(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let p=a.move("<");return p+=a.move(n.containerPhrasing(e,{before:p,after:">",...a.current()})),p+=a.move(">"),c(),n.stack=m,p}c=n.enter("link"),d=n.enter("label");let h=a.move("[");return h+=a.move(n.containerPhrasing(e,{before:h,after:"](",...a.current()})),h+=a.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=a.move("<"),h+=a.move(n.safe(e.url,{before:h,after:">",...a.current()})),h+=a.move(">")):(d=n.enter("destinationRaw"),h+=a.move(n.safe(e.url,{before:h,after:e.title?" ":")",...a.current()}))),d(),e.title&&(d=n.enter(`title${l}`),h+=a.move(" "+s),h+=a.move(n.safe(e.title,{before:h,after:s,...a.current()})),h+=a.move(s),d()),h+=a.move(")"),c(),h}function WT(e,t,n){return Gx(e,n)?"<":"["}Zx.peek=KT;function Zx(e,t,n,i){const s=e.referenceType,l=n.enter("linkReference");let a=n.enter("label");const c=n.createTracker(i);let d=c.move("[");const h=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return a(),n.stack=m,l(),s==="full"||!h||h!==p?d+=c.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function KT(){return"["}function Od(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 qT(e){const t=Od(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 XT(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 Jx(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 YT(e,t,n,i){const s=n.enter("list"),l=n.bulletCurrent;let a=e.ordered?XT(n):Od(n);const c=e.ordered?a==="."?")":".":qT(n);let d=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&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&&(d=!0),Jx(n)===a&&m){let p=-1;for(;++p<e.children.length;){const y=e.children[p];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(a=c),n.bulletCurrent=a;const h=n.containerFlow(e,i);return n.bulletLastUsed=a,n.bulletCurrent=l,s(),h}function GT(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 QT(e,t,n,i){const s=GT(n);let l=n.bulletCurrent||Od(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let a=l.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const c=n.createTracker(i);c.move(l+" ".repeat(a-l.length)),c.shift(a);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),m);return d(),h;function m(p,y,w){return y?(w?"":" ".repeat(a))+p:(w?l:l+" ".repeat(a-l.length))+p}}function ZT(e,t,n,i){const s=n.enter("paragraph"),l=n.enter("phrasing"),a=n.containerPhrasing(e,i);return l(),s(),a}const JT=Dl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function eP(e,t,n,i){return(e.children.some(function(a){return JT(a)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function tP(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ew.peek=nP;function ew(e,t,n,i){const s=tP(n),l=n.enter("strong"),a=n.createTracker(i),c=a.move(s+s);let d=a.move(n.containerPhrasing(e,{after:s,before:c,...a.current()}));const h=d.charCodeAt(0),m=yl(i.before.charCodeAt(i.before.length-1),h,s);m.inside&&(d=hs(h)+d.slice(1));const p=d.charCodeAt(d.length-1),y=yl(i.after.charCodeAt(0),p,s);y.inside&&(d=d.slice(0,-1)+hs(p));const w=a.move(s+s);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:m.outside},c+d+w}function nP(e,t,n){return n.options.strong||"*"}function rP(e,t,n,i){return n.safe(e.value,i)}function iP(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 oP(e,t,n){const i=(Jx(n)+(n.options.ruleSpaces?" ":"")).repeat(iP(n));return n.options.ruleSpaces?i.slice(0,-1):i}const tw={blockquote:TT,break:Qg,code:jT,definition:IT,emphasis:Hx,hardBreak:Qg,heading:VT,html:Kx,image:qx,imageReference:Xx,inlineCode:Yx,link:Qx,linkReference:Zx,list:YT,listItem:QT,paragraph:ZT,root:eP,strong:ew,text:rP,thematicBreak:oP},Jg=document.createElement("i");function Fd(e){const t="&"+e+";";Jg.innerHTML=t;const n=Jg.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function nw(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 sP=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function aP(e){return e.replace(sP,lP)}function lP(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),l=s===120||s===88;return nw(n.slice(l?2:1),l?16:10)}return Fd(n)||e}function uP(){return{enter:{table:cP,tableData:ey,tableHeader:ey,tableRow:dP},exit:{codeText:hP,table:fP,tableData:Oc,tableHeader:Oc,tableRow:Oc}}}function cP(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 fP(e){this.exit(e),this.data.inTable=void 0}function dP(e){this.enter({type:"tableRow",children:[]},e)}function Oc(e){this.exit(e)}function ey(e){this.enter({type:"tableCell",children:[]},e)}function hP(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,pP));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function pP(e,t){return t==="|"?t:e}function mP(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,s=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
249
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:a,tableCell:d,tableRow:c}};function a(w,k,C,T){return h(m(w,C,T),w.align)}function c(w,k,C,T){const E=p(w,C,T),M=h([E]);return M.slice(0,M.indexOf(`
|
|
250
|
+
`))}function d(w,k,C,T){const E=C.enter("tableCell"),M=C.enter("phrasing"),A=C.containerPhrasing(w,{...T,before:l,after:l});return M(),E(),A}function h(w,k){return CT(w,{align:k,alignDelimiters:i,padding:n,stringLength:s})}function m(w,k,C){const T=w.children;let E=-1;const M=[],A=k.enter("table");for(;++E<T.length;)M[E]=p(T[E],k,C);return A(),M}function p(w,k,C){const T=w.children;let E=-1;const M=[],A=k.enter("tableRow");for(;++E<T.length;)M[E]=d(T[E],w,k,C);return A(),M}function y(w,k,C){let T=tw.inlineCode(w,k,C);return C.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function gP(){return{exit:{taskListCheckValueChecked:ty,taskListCheckValueUnchecked:ty,paragraph:vP}}}function yP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:xP}}}function ty(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function vP(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 i=n.children[0];if(i&&i.type==="text"){const s=t.children;let l=-1,a;for(;++l<s.length;){const c=s[l];if(c.type==="paragraph"){a=c;break}}a===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function xP(e,t,n,i){const s=e.children[0],l=typeof e.checked=="boolean"&&s&&s.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(i);l&&c.move(a);let d=tw.listItem(e,t,n,{...i,...c.current()});return l&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(m){return m+a}}function rw(){return[qE(),pT(),vT(),uP(),gP()]}function wP(e){return{extensions:[XE(),mT(e),xT(),mP(e),yP()]}}function sn(e,t,n,i){const s=e.length;let l=0,a;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,i.length<1e4)a=Array.from(i),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);l<i.length;)a=i.slice(l,l+1e4),a.unshift(t,0),e.splice(...a),l+=1e4,t+=1e4}function gn(e,t){return e.length>0?(sn(e,e.length,0,t),e):t}const ny={}.hasOwnProperty;function iw(e){const t={};let n=-1;for(;++n<e.length;)kP(t,e[n]);return t}function kP(e,t){let n;for(n in t){const s=(ny.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let a;if(l)for(a in l){ny.call(s,a)||(s[a]=[]);const c=l[a];SP(s[a],Array.isArray(c)?c:c?[c]:[])}}}function SP(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);sn(e,0,0,i)}function Zi(e){const t=[];let n=-1,i=0,s=0;for(;++n<e.length;){const l=e.charCodeAt(n);let a="";if(l===37&&jt(e.charCodeAt(n+1))&&jt(e.charCodeAt(n+2)))s=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const c=e.charCodeAt(n+1);l<56320&&c>56319&&c<57344?(a=String.fromCharCode(l,c),s=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(i,n),encodeURIComponent(a)),i=n+s+1,a=""),s&&(n+=s,s=0)}return t.join("")+e.slice(i)}function Ve(e,t,n,i){const s=i?i-1:Number.POSITIVE_INFINITY;let l=0;return a;function a(d){return Oe(d)?(e.enter(n),c(d)):t(d)}function c(d){return Oe(d)&&l++<s?(e.consume(d),c):(e.exit(n),t(d))}}const bP={tokenize:CP};function CP(e){const t=e.attempt(this.parser.constructs.contentInitial,i,s);let n;return t;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ve(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),l(c)}function l(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Ae(c)?(e.consume(c),e.exit("chunkText"),l):(e.consume(c),a)}}const EP={tokenize:TP},ry={tokenize:PP};function TP(e){const t=this,n=[];let i=0,s,l,a;return c;function c(A){if(i<n.length){const L=n[i];return t.containerState=L[1],e.attempt(L[0].continuation,d,h)(A)}return h(A)}function d(A){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&M();const L=t.events.length;let H=L,D;for(;H--;)if(t.events[H][0]==="exit"&&t.events[H][1].type==="chunkFlow"){D=t.events[H][1].end;break}E(i);let Y=L;for(;Y<t.events.length;)t.events[Y][1].end={...D},Y++;return sn(t.events,H+1,0,t.events.slice(L)),t.events.length=Y,h(A)}return c(A)}function h(A){if(i===n.length){if(!s)return y(A);if(s.currentConstruct&&s.currentConstruct.concrete)return k(A);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ry,m,p)(A)}function m(A){return s&&M(),E(i),y(A)}function p(A){return t.parser.lazy[t.now().line]=i!==n.length,a=t.now().offset,k(A)}function y(A){return t.containerState={},e.attempt(ry,w,k)(A)}function w(A){return i++,n.push([t.currentConstruct,t.containerState]),y(A)}function k(A){if(A===null){s&&M(),E(0),e.consume(A);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:l}),C(A)}function C(A){if(A===null){T(e.exit("chunkFlow"),!0),E(0),e.consume(A);return}return Ae(A)?(e.consume(A),T(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(A),C)}function T(A,L){const H=t.sliceStream(A);if(L&&H.push(null),A.previous=l,l&&(l.next=A),l=A,s.defineSkip(A.start),s.write(H),t.parser.lazy[A.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<a&&(!s.events[D][1].end||s.events[D][1].end.offset>a))return;const Y=t.events.length;let W=Y,X,j;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){if(X){j=t.events[W][1].end;break}X=!0}for(E(i),D=Y;D<t.events.length;)t.events[D][1].end={...j},D++;sn(t.events,W+1,0,t.events.slice(Y)),t.events.length=D}}function E(A){let L=n.length;for(;L-- >A;){const H=n[L];t.containerState=H[1],H[0].exit.call(t,e)}n.length=A}function M(){s.write([null]),l=void 0,s=void 0,t.containerState._closeFlow=void 0}}function PP(e,t,n){return Ve(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _l(e,t,n){const i=[];let s=-1;for(;++s<e.length;){const l=e[s].resolveAll;l&&!i.includes(l)&&(t=l(t,n),i.push(l))}return t}const Mf={name:"attention",resolveAll:RP,tokenize:AP};function RP(e,t){let n=-1,i,s,l,a,c,d,h,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[i][1].end},y={...e[n][1].start};iy(p,-d),iy(y,d),a={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[i][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},l={type:d>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...a.start},end:{...c.end}},e[i][1].end={...a.start},e[n][1].start={...c.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=gn(h,[["enter",e[i][1],t],["exit",e[i][1],t]])),h=gn(h,[["enter",s,t],["enter",a,t],["exit",a,t],["enter",l,t]]),h=gn(h,_l(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),h=gn(h,[["exit",l,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=gn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,sn(e,i-1,n-i+3,h),n=i+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function AP(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,s=Xi(i);let l;return a;function a(d){return l=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===l)return e.consume(d),c;const h=e.exit("attentionSequence"),m=Xi(d),p=!m||m===2&&s||n.includes(d),y=!s||s===2&&m||n.includes(i);return h._open=!!(l===42?p:p&&(s||!y)),h._close=!!(l===42?y:y&&(m||!p)),t(d)}}function iy(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const MP={name:"autolink",tokenize:NP};function NP(e,t,n){let i=0;return s;function s(w){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(w){return Vt(w)?(e.consume(w),a):w===64?n(w):h(w)}function a(w){return w===43||w===45||w===46||jt(w)?(i=1,c(w)):h(w)}function c(w){return w===58?(e.consume(w),i=0,d):(w===43||w===45||w===46||jt(w))&&i++<32?(e.consume(w),c):(i=0,h(w))}function d(w){return w===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):w===null||w===32||w===60||gl(w)?n(w):(e.consume(w),d)}function h(w){return w===64?(e.consume(w),m):NE(w)?(e.consume(w),h):n(w)}function m(w){return jt(w)?p(w):n(w)}function p(w){return w===46?(e.consume(w),i=0,m):w===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):y(w)}function y(w){if((w===45||jt(w))&&i++<63){const k=w===45?y:p;return e.consume(w),k}return n(w)}}const bs={partial:!0,tokenize:jP};function jP(e,t,n){return i;function i(l){return Oe(l)?Ve(e,s,"linePrefix")(l):s(l)}function s(l){return l===null||Ae(l)?t(l):n(l)}}const ow={continuation:{tokenize:IP},exit:_P,name:"blockQuote",tokenize:DP};function DP(e,t,n){const i=this;return s;function s(a){if(a===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return n(a)}function l(a){return Oe(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function IP(e,t,n){const i=this;return s;function s(a){return Oe(a)?Ve(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(ow,t,n)(a)}}function _P(e){e.exit("blockQuote")}const sw={name:"characterEscape",tokenize:LP};function LP(e,t,n){return i;function i(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),s}function s(l){return DE(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const aw={name:"characterReference",tokenize:OP};function OP(e,t,n){const i=this;let s=0,l,a;return c;function c(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),l=31,a=jt,m(p))}function h(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=jE,m):(e.enter("characterReferenceValue"),l=7,a=Rf,m(p))}function m(p){if(p===59&&s){const y=e.exit("characterReferenceValue");return a===jt&&!Fd(i.sliceSerialize(y))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(p)&&s++<l?(e.consume(p),m):n(p)}}const oy={partial:!0,tokenize:zP},sy={concrete:!0,name:"codeFenced",tokenize:FP};function FP(e,t,n){const i=this,s={partial:!0,tokenize:H};let l=0,a=0,c;return d;function d(D){return h(D)}function h(D){const Y=i.events[i.events.length-1];return l=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,c=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(D)}function m(D){return D===c?(a++,e.consume(D),m):a<3?n(D):(e.exit("codeFencedFenceSequence"),Oe(D)?Ve(e,p,"whitespace")(D):p(D))}function p(D){return D===null||Ae(D)?(e.exit("codeFencedFence"),i.interrupt?t(D):e.check(oy,C,L)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(D))}function y(D){return D===null||Ae(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(D)):Oe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ve(e,w,"whitespace")(D)):D===96&&D===c?n(D):(e.consume(D),y)}function w(D){return D===null||Ae(D)?p(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(D))}function k(D){return D===null||Ae(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(D)):D===96&&D===c?n(D):(e.consume(D),k)}function C(D){return e.attempt(s,L,T)(D)}function T(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),E}function E(D){return l>0&&Oe(D)?Ve(e,M,"linePrefix",l+1)(D):M(D)}function M(D){return D===null||Ae(D)?e.check(oy,C,L)(D):(e.enter("codeFlowValue"),A(D))}function A(D){return D===null||Ae(D)?(e.exit("codeFlowValue"),M(D)):(e.consume(D),A)}function L(D){return e.exit("codeFenced"),t(D)}function H(D,Y,W){let X=0;return j;function j(te){return D.enter("lineEnding"),D.consume(te),D.exit("lineEnding"),G}function G(te){return D.enter("codeFencedFence"),Oe(te)?Ve(D,$,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):$(te)}function $(te){return te===c?(D.enter("codeFencedFenceSequence"),fe(te)):W(te)}function fe(te){return te===c?(X++,D.consume(te),fe):X>=a?(D.exit("codeFencedFenceSequence"),Oe(te)?Ve(D,se,"whitespace")(te):se(te)):W(te)}function se(te){return te===null||Ae(te)?(D.exit("codeFencedFence"),Y(te)):W(te)}}}function zP(e,t,n){const i=this;return s;function s(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}const Fc={name:"codeIndented",tokenize:BP},VP={partial:!0,tokenize:$P};function BP(e,t,n){const i=this;return s;function s(h){return e.enter("codeIndented"),Ve(e,l,"linePrefix",5)(h)}function l(h){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(h):n(h)}function a(h){return h===null?d(h):Ae(h)?e.attempt(VP,a,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Ae(h)?(e.exit("codeFlowValue"),a(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function $P(e,t,n){const i=this;return s;function s(a){return i.parser.lazy[i.now().line]?n(a):Ae(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):Ve(e,l,"linePrefix",5)(a)}function l(a){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):Ae(a)?s(a):n(a)}}const UP={name:"codeText",previous:WP,resolve:HP,tokenize:KP};function HP(e){let t=e.length-4,n=3,i,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)s===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(s=i):(i===t||e[i][1].type==="lineEnding")&&(e[s][1].type="codeTextData",i!==s+2&&(e[s][1].end=e[i-1][1].end,e.splice(s+2,i-s-2),t-=i-s-2,i=s+2),s=void 0);return e}function WP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function KP(e,t,n){let i=0,s,l;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),c(p)}function c(p){return p===96?(e.consume(p),i++,c):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(l=e.enter("codeTextSequence"),s=0,m(p)):Ae(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||Ae(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),h)}function m(p){return p===96?(e.consume(p),s++,m):s===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(l.type="codeTextData",h(p))}}class qP{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 i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const s=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&Ko(this.left,i),l.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),Ko(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ko(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);Ko(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ko(this.left,n.reverse())}}}function Ko(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 lw(e){const t={};let n=-1,i,s,l,a,c,d,h;const m=new qP(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(i=m.get(n),n&&i[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(d=i[1]._tokenizer.events,l=0,l<d.length&&d[l][1].type==="lineEndingBlank"&&(l+=2),l<d.length&&d[l][1].type==="content"))for(;++l<d.length&&d[l][1].type!=="content";)d[l][1].type==="chunkText"&&(d[l][1]._isInFirstContentOfListItem=!0,l++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,XP(m,n)),n=t[n],h=!0);else if(i[1]._container){for(l=n,s=void 0;l--;)if(a=m.get(l),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(s&&(m.get(s)[1].type="lineEndingBlank"),a[1].type="lineEnding",s=l);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;s&&(i[1].end={...m.get(s)[1].start},c=m.slice(s,n),c.unshift(i),m.splice(s,n-s+1,c))}}return sn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function XP(e,t){const n=e.get(t)[1],i=e.get(t)[2];let s=t-1;const l=[];let a=n._tokenizer;a||(a=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,d=[],h={};let m,p,y=-1,w=n,k=0,C=0;const T=[C];for(;w;){for(;e.get(++s)[1]!==w;);l.push(s),w._tokenizer||(m=i.sliceStream(w),w.next||m.push(null),p&&a.defineSkip(w.start),w._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(m),w._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=w,w=w.next}for(w=n;++y<c.length;)c[y][0]==="exit"&&c[y-1][0]==="enter"&&c[y][1].type===c[y-1][1].type&&c[y][1].start.line!==c[y][1].end.line&&(C=y+1,T.push(C),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(a.events=[],w?(w._tokenizer=void 0,w.previous=void 0):T.pop(),y=T.length;y--;){const E=c.slice(T[y],T[y+1]),M=l.pop();d.push([M,M+E.length-1]),e.splice(M,2,E)}for(d.reverse(),y=-1;++y<d.length;)h[k+d[y][0]]=k+d[y][1],k+=d[y][1]-d[y][0]-1;return h}const YP={resolve:QP,tokenize:ZP},GP={partial:!0,tokenize:JP};function QP(e){return lw(e),e}function ZP(e,t){let n;return i;function i(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?l(c):Ae(c)?e.check(GP,a,l)(c):(e.consume(c),s)}function l(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function JP(e,t,n){const i=this;return s;function s(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ve(e,l,"linePrefix")}function l(a){if(a===null||Ae(a))return n(a);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):e.interrupt(i.parser.constructs.flow,n,t)(a)}}function uw(e,t,n,i,s,l,a,c,d){const h=d||Number.POSITIVE_INFINITY;let m=0;return p;function p(E){return E===60?(e.enter(i),e.enter(s),e.enter(l),e.consume(E),e.exit(l),y):E===null||E===32||E===41||gl(E)?n(E):(e.enter(i),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),C(E))}function y(E){return E===62?(e.enter(l),e.consume(E),e.exit(l),e.exit(s),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),w(E))}function w(E){return E===62?(e.exit("chunkString"),e.exit(c),y(E)):E===null||E===60||Ae(E)?n(E):(e.consume(E),E===92?k:w)}function k(E){return E===60||E===62||E===92?(e.consume(E),w):w(E)}function C(E){return!m&&(E===null||E===41||Ye(E))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(i),t(E)):m<h&&E===40?(e.consume(E),m++,C):E===41?(e.consume(E),m--,C):E===null||E===32||E===40||gl(E)?n(E):(e.consume(E),E===92?T:C)}function T(E){return E===40||E===41||E===92?(e.consume(E),C):C(E)}}function cw(e,t,n,i,s,l){const a=this;let c=0,d;return h;function h(w){return e.enter(i),e.enter(s),e.consume(w),e.exit(s),e.enter(l),m}function m(w){return c>999||w===null||w===91||w===93&&!d||w===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?n(w):w===93?(e.exit(l),e.enter(s),e.consume(w),e.exit(s),e.exit(i),t):Ae(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||w===91||w===93||Ae(w)||c++>999?(e.exit("chunkString"),m(w)):(e.consume(w),d||(d=!Oe(w)),w===92?y:p)}function y(w){return w===91||w===92||w===93?(e.consume(w),c++,p):p(w)}}function fw(e,t,n,i,s,l){let a;return c;function c(y){return y===34||y===39||y===40?(e.enter(i),e.enter(s),e.consume(y),e.exit(s),a=y===40?41:y,d):n(y)}function d(y){return y===a?(e.enter(s),e.consume(y),e.exit(s),e.exit(i),t):(e.enter(l),h(y))}function h(y){return y===a?(e.exit(l),d(a)):y===null?n(y):Ae(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Ve(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===a||y===null||Ae(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?p:m)}function p(y){return y===a||y===92?(e.consume(y),m):m(y)}}function es(e,t){let n;return i;function i(s){return Ae(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,i):Oe(s)?Ve(e,i,n?"linePrefix":"lineSuffix")(s):t(s)}}const eR={name:"definition",tokenize:nR},tR={partial:!0,tokenize:rR};function nR(e,t,n){const i=this;let s;return l;function l(w){return e.enter("definition"),a(w)}function a(w){return cw.call(i,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function c(w){return s=Mn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),d):n(w)}function d(w){return Ye(w)?es(e,h)(w):h(w)}function h(w){return uw(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function m(w){return e.attempt(tR,p,p)(w)}function p(w){return Oe(w)?Ve(e,y,"whitespace")(w):y(w)}function y(w){return w===null||Ae(w)?(e.exit("definition"),i.parser.defined.push(s),t(w)):n(w)}}function rR(e,t,n){return i;function i(c){return Ye(c)?es(e,s)(c):n(c)}function s(c){return fw(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function l(c){return Oe(c)?Ve(e,a,"whitespace")(c):a(c)}function a(c){return c===null||Ae(c)?t(c):n(c)}}const iR={name:"hardBreakEscape",tokenize:oR};function oR(e,t,n){return i;function i(l){return e.enter("hardBreakEscape"),e.consume(l),s}function s(l){return Ae(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const sR={name:"headingAtx",resolve:aR,tokenize:lR};function aR(e,t){let n=e.length-2,i=3,s,l;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(s={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},l={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},sn(e,i,n-i+1,[["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]])),e}function lR(e,t,n){let i=0;return s;function s(m){return e.enter("atxHeading"),l(m)}function l(m){return e.enter("atxHeadingSequence"),a(m)}function a(m){return m===35&&i++<6?(e.consume(m),a):m===null||Ye(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||Ae(m)?(e.exit("atxHeading"),t(m)):Oe(m)?Ve(e,c,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),c(m))}function h(m){return m===null||m===35||Ye(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),h)}}const uR=["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"],ay=["pre","script","style","textarea"],cR={concrete:!0,name:"htmlFlow",resolveTo:hR,tokenize:pR},fR={partial:!0,tokenize:gR},dR={partial:!0,tokenize:mR};function hR(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 pR(e,t,n){const i=this;let s,l,a,c,d;return h;function h(R){return m(R)}function m(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),p}function p(R){return R===33?(e.consume(R),y):R===47?(e.consume(R),l=!0,C):R===63?(e.consume(R),s=3,i.interrupt?t:P):Vt(R)?(e.consume(R),a=String.fromCharCode(R),T):n(R)}function y(R){return R===45?(e.consume(R),s=2,w):R===91?(e.consume(R),s=5,c=0,k):Vt(R)?(e.consume(R),s=4,i.interrupt?t:P):n(R)}function w(R){return R===45?(e.consume(R),i.interrupt?t:P):n(R)}function k(R){const Z="CDATA[";return R===Z.charCodeAt(c++)?(e.consume(R),c===Z.length?i.interrupt?t:$:k):n(R)}function C(R){return Vt(R)?(e.consume(R),a=String.fromCharCode(R),T):n(R)}function T(R){if(R===null||R===47||R===62||Ye(R)){const Z=R===47,de=a.toLowerCase();return!Z&&!l&&ay.includes(de)?(s=1,i.interrupt?t(R):$(R)):uR.includes(a.toLowerCase())?(s=6,Z?(e.consume(R),E):i.interrupt?t(R):$(R)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(R):l?M(R):A(R))}return R===45||jt(R)?(e.consume(R),a+=String.fromCharCode(R),T):n(R)}function E(R){return R===62?(e.consume(R),i.interrupt?t:$):n(R)}function M(R){return Oe(R)?(e.consume(R),M):j(R)}function A(R){return R===47?(e.consume(R),j):R===58||R===95||Vt(R)?(e.consume(R),L):Oe(R)?(e.consume(R),A):j(R)}function L(R){return R===45||R===46||R===58||R===95||jt(R)?(e.consume(R),L):H(R)}function H(R){return R===61?(e.consume(R),D):Oe(R)?(e.consume(R),H):A(R)}function D(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),d=R,Y):Oe(R)?(e.consume(R),D):W(R)}function Y(R){return R===d?(e.consume(R),d=null,X):R===null||Ae(R)?n(R):(e.consume(R),Y)}function W(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Ye(R)?H(R):(e.consume(R),W)}function X(R){return R===47||R===62||Oe(R)?A(R):n(R)}function j(R){return R===62?(e.consume(R),G):n(R)}function G(R){return R===null||Ae(R)?$(R):Oe(R)?(e.consume(R),G):n(R)}function $(R){return R===45&&s===2?(e.consume(R),xe):R===60&&s===1?(e.consume(R),Ee):R===62&&s===4?(e.consume(R),_):R===63&&s===3?(e.consume(R),P):R===93&&s===5?(e.consume(R),le):Ae(R)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(fR,Q,fe)(R)):R===null||Ae(R)?(e.exit("htmlFlowData"),fe(R)):(e.consume(R),$)}function fe(R){return e.check(dR,se,Q)(R)}function se(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),te}function te(R){return R===null||Ae(R)?fe(R):(e.enter("htmlFlowData"),$(R))}function xe(R){return R===45?(e.consume(R),P):$(R)}function Ee(R){return R===47?(e.consume(R),a="",q):$(R)}function q(R){if(R===62){const Z=a.toLowerCase();return ay.includes(Z)?(e.consume(R),_):$(R)}return Vt(R)&&a.length<8?(e.consume(R),a+=String.fromCharCode(R),q):$(R)}function le(R){return R===93?(e.consume(R),P):$(R)}function P(R){return R===62?(e.consume(R),_):R===45&&s===2?(e.consume(R),P):$(R)}function _(R){return R===null||Ae(R)?(e.exit("htmlFlowData"),Q(R)):(e.consume(R),_)}function Q(R){return e.exit("htmlFlow"),t(R)}}function mR(e,t,n){const i=this;return s;function s(a){return Ae(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l):n(a)}function l(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}function gR(e,t,n){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(bs,t,n)}}const yR={name:"htmlText",tokenize:vR};function vR(e,t,n){const i=this;let s,l,a;return c;function c(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),d}function d(P){return P===33?(e.consume(P),h):P===47?(e.consume(P),H):P===63?(e.consume(P),A):Vt(P)?(e.consume(P),W):n(P)}function h(P){return P===45?(e.consume(P),m):P===91?(e.consume(P),l=0,k):Vt(P)?(e.consume(P),M):n(P)}function m(P){return P===45?(e.consume(P),w):n(P)}function p(P){return P===null?n(P):P===45?(e.consume(P),y):Ae(P)?(a=p,Ee(P)):(e.consume(P),p)}function y(P){return P===45?(e.consume(P),w):p(P)}function w(P){return P===62?xe(P):P===45?y(P):p(P)}function k(P){const _="CDATA[";return P===_.charCodeAt(l++)?(e.consume(P),l===_.length?C:k):n(P)}function C(P){return P===null?n(P):P===93?(e.consume(P),T):Ae(P)?(a=C,Ee(P)):(e.consume(P),C)}function T(P){return P===93?(e.consume(P),E):C(P)}function E(P){return P===62?xe(P):P===93?(e.consume(P),E):C(P)}function M(P){return P===null||P===62?xe(P):Ae(P)?(a=M,Ee(P)):(e.consume(P),M)}function A(P){return P===null?n(P):P===63?(e.consume(P),L):Ae(P)?(a=A,Ee(P)):(e.consume(P),A)}function L(P){return P===62?xe(P):A(P)}function H(P){return Vt(P)?(e.consume(P),D):n(P)}function D(P){return P===45||jt(P)?(e.consume(P),D):Y(P)}function Y(P){return Ae(P)?(a=Y,Ee(P)):Oe(P)?(e.consume(P),Y):xe(P)}function W(P){return P===45||jt(P)?(e.consume(P),W):P===47||P===62||Ye(P)?X(P):n(P)}function X(P){return P===47?(e.consume(P),xe):P===58||P===95||Vt(P)?(e.consume(P),j):Ae(P)?(a=X,Ee(P)):Oe(P)?(e.consume(P),X):xe(P)}function j(P){return P===45||P===46||P===58||P===95||jt(P)?(e.consume(P),j):G(P)}function G(P){return P===61?(e.consume(P),$):Ae(P)?(a=G,Ee(P)):Oe(P)?(e.consume(P),G):X(P)}function $(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),s=P,fe):Ae(P)?(a=$,Ee(P)):Oe(P)?(e.consume(P),$):(e.consume(P),se)}function fe(P){return P===s?(e.consume(P),s=void 0,te):P===null?n(P):Ae(P)?(a=fe,Ee(P)):(e.consume(P),fe)}function se(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||Ye(P)?X(P):(e.consume(P),se)}function te(P){return P===47||P===62||Ye(P)?X(P):n(P)}function xe(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):n(P)}function Ee(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),q}function q(P){return Oe(P)?Ve(e,le,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):le(P)}function le(P){return e.enter("htmlTextData"),a(P)}}const zd={name:"labelEnd",resolveAll:SR,resolveTo:bR,tokenize:CR},xR={tokenize:ER},wR={tokenize:TR},kR={tokenize:PR};function SR(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",t+=s}}return e.length!==n.length&&sn(e,0,e.length,n),e}function bR(e,t){let n=e.length,i=0,s,l,a,c;for(;n--;)if(s=e[n][1],l){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(l=n,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(a=n);const d={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[l][1].start},end:{...e[a][1].end}},m={type:"labelText",start:{...e[l+i+2][1].end},end:{...e[a-2][1].start}};return c=[["enter",d,t],["enter",h,t]],c=gn(c,e.slice(l+1,l+i+3)),c=gn(c,[["enter",m,t]]),c=gn(c,_l(t.parser.constructs.insideSpan.null,e.slice(l+i+4,a-3),t)),c=gn(c,[["exit",m,t],e[a-2],e[a-1],["exit",h,t]]),c=gn(c,e.slice(a+1)),c=gn(c,[["exit",d,t]]),sn(e,l,e.length,c),e}function CR(e,t,n){const i=this;let s=i.events.length,l,a;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){l=i.events[s][1];break}return c;function c(y){return l?l._inactive?p(y):(a=i.parser.defined.includes(Mn(i.sliceSerialize({start:l.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),d):n(y)}function d(y){return y===40?e.attempt(xR,m,a?m:p)(y):y===91?e.attempt(wR,m,a?h:p)(y):a?m(y):p(y)}function h(y){return e.attempt(kR,m,p)(y)}function m(y){return t(y)}function p(y){return l._balanced=!0,n(y)}}function ER(e,t,n){return i;function i(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),s}function s(p){return Ye(p)?es(e,l)(p):l(p)}function l(p){return p===41?m(p):uw(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return Ye(p)?es(e,d)(p):m(p)}function c(p){return n(p)}function d(p){return p===34||p===39||p===40?fw(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function h(p){return Ye(p)?es(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function TR(e,t,n){const i=this;return s;function s(c){return cw.call(i,e,l,a,"reference","referenceMarker","referenceString")(c)}function l(c){return i.parser.defined.includes(Mn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function a(c){return n(c)}}function PR(e,t,n){return i;function i(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),s}function s(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const RR={name:"labelStartImage",resolveAll:zd.resolveAll,tokenize:AR};function AR(e,t,n){const i=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),l}function l(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):n(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):t(c)}}const MR={name:"labelStartLink",resolveAll:zd.resolveAll,tokenize:NR};function NR(e,t,n){const i=this;return s;function s(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(a):t(a)}}const zc={name:"lineEnding",tokenize:jR};function jR(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ve(e,t,"linePrefix")}}const tl={name:"thematicBreak",tokenize:DR};function DR(e,t,n){let i=0,s;return l;function l(h){return e.enter("thematicBreak"),a(h)}function a(h){return s=h,c(h)}function c(h){return h===s?(e.enter("thematicBreakSequence"),d(h)):i>=3&&(h===null||Ae(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===s?(e.consume(h),i++,d):(e.exit("thematicBreakSequence"),Oe(h)?Ve(e,c,"whitespace")(h):c(h))}}const Qt={continuation:{tokenize:OR},exit:zR,name:"list",tokenize:LR},IR={partial:!0,tokenize:VR},_R={partial:!0,tokenize:FR};function LR(e,t,n){const i=this,s=i.events[i.events.length-1];let l=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return c;function c(w){const k=i.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!i.containerState.marker||w===i.containerState.marker:Rf(w)){if(i.containerState.type||(i.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),w===42||w===45?e.check(tl,n,h)(w):h(w);if(!i.interrupt||w===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(w)}return n(w)}function d(w){return Rf(w)&&++a<10?(e.consume(w),d):(!i.interrupt||a<2)&&(i.containerState.marker?w===i.containerState.marker:w===41||w===46)?(e.exit("listItemValue"),h(w)):n(w)}function h(w){return e.enter("listItemMarker"),e.consume(w),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||w,e.check(bs,i.interrupt?n:m,e.attempt(IR,y,p))}function m(w){return i.containerState.initialBlankLine=!0,l++,y(w)}function p(w){return Oe(w)?(e.enter("listItemPrefixWhitespace"),e.consume(w),e.exit("listItemPrefixWhitespace"),y):n(w)}function y(w){return i.containerState.size=l+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(w)}}function OR(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(bs,s,l);function s(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ve(e,t,"listItemIndent",i.containerState.size+1)(c)}function l(c){return i.containerState.furtherBlankLines||!Oe(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,a(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(_R,t,a)(c))}function a(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ve(e,e.attempt(Qt,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function FR(e,t,n){const i=this;return Ve(e,s,"listItemIndent",i.containerState.size+1);function s(l){const a=i.events[i.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===i.containerState.size?t(l):n(l)}}function zR(e){e.exit(this.containerState.type)}function VR(e,t,n){const i=this;return Ve(e,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(l){const a=i.events[i.events.length-1];return!Oe(l)&&a&&a[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const ly={name:"setextUnderline",resolveTo:BR,tokenize:$R};function BR(e,t){let n=e.length,i,s,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",l?(e.splice(s,0,["enter",a,t]),e.splice(l+1,0,["exit",e[i][1],t]),e[i][1].end={...e[l][1].end}):e[i][1]=a,e.push(["exit",a,t]),e}function $R(e,t,n){const i=this;let s;return l;function l(h){let m=i.events.length,p;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){p=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||p)?(e.enter("setextHeadingLine"),s=h,a(h)):n(h)}function a(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===s?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Oe(h)?Ve(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Ae(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const UR={tokenize:HR};function HR(e){const t=this,n=e.attempt(bs,i,e.attempt(this.parser.constructs.flowInitial,s,Ve(e,e.attempt(this.parser.constructs.flow,s,e.attempt(YP,s)),"linePrefix")));return n;function i(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const WR={resolveAll:hw()},KR=dw("string"),qR=dw("text");function dw(e){return{resolveAll:hw(e==="text"?XR:void 0),tokenize:t};function t(n){const i=this,s=this.parser.constructs[e],l=n.attempt(s,a,c);return a;function a(m){return h(m)?l(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return h(m)?(n.exit("data"),l(m)):(n.consume(m),d)}function h(m){if(m===null)return!0;const p=s[m];let y=-1;if(p)for(;++y<p.length;){const w=p[y];if(!w.previous||w.previous.call(i,i.previous))return!0}return!1}}}function hw(e){return t;function t(n,i){let s=-1,l;for(;++s<=n.length;)l===void 0?n[s]&&n[s][1].type==="data"&&(l=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==l+2&&(n[l][1].end=n[s-1][1].end,n.splice(l+2,s-l-2),s=l+2),l=void 0);return e?e(n,i):n}}function XR(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],s=t.sliceStream(i);let l=s.length,a=-1,c=0,d;for(;l--;){const h=s[l];if(typeof h=="string"){for(a=h.length;h.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(h===-2)d=!0,c++;else if(h!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:i.start._bufferIndex+a,_index:i.start._index+l,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const YR={42:Qt,43:Qt,45:Qt,48:Qt,49:Qt,50:Qt,51:Qt,52:Qt,53:Qt,54:Qt,55:Qt,56:Qt,57:Qt,62:ow},GR={91:eR},QR={[-2]:Fc,[-1]:Fc,32:Fc},ZR={35:sR,42:tl,45:[ly,tl],60:cR,61:ly,95:tl,96:sy,126:sy},JR={38:aw,92:sw},e2={[-5]:zc,[-4]:zc,[-3]:zc,33:RR,38:aw,42:Mf,60:[MP,yR],91:MR,92:[iR,sw],93:zd,95:Mf,96:UP},t2={null:[Mf,WR]},n2={null:[42,95]},r2={null:[]},i2=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:n2,contentInitial:GR,disable:r2,document:YR,flow:ZR,flowInitial:QR,insideSpan:t2,string:JR,text:e2},Symbol.toStringTag,{value:"Module"}));function o2(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},l=[];let a=[],c=[];const d={attempt:Y(H),check:Y(D),consume:M,enter:A,exit:L,interrupt:Y(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:C,events:[],now:k,parser:e,previous:null,sliceSerialize:y,sliceStream:w,write:p};let m=t.tokenize.call(h,d);return t.resolveAll&&l.push(t),h;function p(G){return a=gn(a,G),T(),a[a.length-1]!==null?[]:(W(t,0),h.events=_l(l,h.events,h),h.events)}function y(G,$){return a2(w(G),$)}function w(G){return s2(a,G)}function k(){const{_bufferIndex:G,_index:$,line:fe,column:se,offset:te}=i;return{_bufferIndex:G,_index:$,line:fe,column:se,offset:te}}function C(G){s[G.line]=G.column,j()}function T(){let G;for(;i._index<a.length;){const $=a[i._index];if(typeof $=="string")for(G=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===G&&i._bufferIndex<$.length;)E($.charCodeAt(i._bufferIndex));else E($)}}function E(G){m=m(G)}function M(G){Ae(G)?(i.line++,i.column=1,i.offset+=G===-3?2:1,j()):G!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===a[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=G}function A(G,$){const fe=$||{};return fe.type=G,fe.start=k(),h.events.push(["enter",fe,h]),c.push(fe),fe}function L(G){const $=c.pop();return $.end=k(),h.events.push(["exit",$,h]),$}function H(G,$){W(G,$.from)}function D(G,$){$.restore()}function Y(G,$){return fe;function fe(se,te,xe){let Ee,q,le,P;return Array.isArray(se)?Q(se):"tokenize"in se?Q([se]):_(se);function _(ie){return Ce;function Ce(ge){const Te=ge!==null&&ie[ge],je=ge!==null&&ie.null,Ue=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(je)?je:je?[je]:[]];return Q(Ue)(ge)}}function Q(ie){return Ee=ie,q=0,ie.length===0?xe:R(ie[q])}function R(ie){return Ce;function Ce(ge){return P=X(),le=ie,ie.partial||(h.currentConstruct=ie),ie.name&&h.parser.constructs.disable.null.includes(ie.name)?de():ie.tokenize.call($?Object.assign(Object.create(h),$):h,d,Z,de)(ge)}}function Z(ie){return G(le,P),te}function de(ie){return P.restore(),++q<Ee.length?R(Ee[q]):xe}}}function W(G,$){G.resolveAll&&!l.includes(G)&&l.push(G),G.resolve&&sn(h.events,$,h.events.length-$,G.resolve(h.events.slice($),h)),G.resolveTo&&(h.events=G.resolveTo(h.events,h))}function X(){const G=k(),$=h.previous,fe=h.currentConstruct,se=h.events.length,te=Array.from(c);return{from:se,restore:xe};function xe(){i=G,h.previous=$,h.currentConstruct=fe,h.events.length=se,c=te,j()}}function j(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function s2(e,t){const n=t.start._index,i=t.start._bufferIndex,s=t.end._index,l=t.end._bufferIndex;let a;if(n===s)a=[e[n].slice(i,l)];else{if(a=e.slice(n,s),i>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(i):a.shift()}l>0&&a.push(e[s].slice(0,l))}return a}function a2(e,t){let n=-1;const i=[];let s;for(;++n<e.length;){const l=e[n];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
|
|
251
|
+
`;break}case-3:{a=`\r
|
|
252
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&s)continue;a=" ";break}default:a=String.fromCharCode(l)}s=l===-2,i.push(a)}return i.join("")}function l2(e){const i={constructs:iw([i2,...(e||{}).extensions||[]]),content:s(bP),defined:[],document:s(EP),flow:s(UR),lazy:{},string:s(KR),text:s(qR)};return i;function s(l){return a;function a(c){return o2(i,l,c)}}}function u2(e){for(;!lw(e););return e}const uy=/[\0\t\n\r]/g;function c2(){let e=1,t="",n=!0,i;return s;function s(l,a,c){const d=[];let h,m,p,y,w;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(a||void 0).decode(l)),p=0,t="",n&&(l.charCodeAt(0)===65279&&p++,n=void 0);p<l.length;){if(uy.lastIndex=p,h=uy.exec(l),y=h&&h.index!==void 0?h.index:l.length,w=l.charCodeAt(y),!h){t=l.slice(p);break}if(w===10&&p===y&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),p<y&&(d.push(l.slice(p,y)),e+=y-p),w){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:i=!0,e=1}p=y+1}return c&&(i&&d.push(-5),t&&d.push(t),d.push(null)),d}}function ts(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?cy(e.position):"start"in e||"end"in e?cy(e):"line"in e||"column"in e?Nf(e):""}function Nf(e){return fy(e&&e.line)+":"+fy(e&&e.column)}function cy(e){return Nf(e&&e.start)+"-"+Nf(e&&e.end)}function fy(e){return e&&typeof e=="number"?e:1}const pw={}.hasOwnProperty;function mw(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),f2(n)(u2(l2(n).document().write(c2()(e,t,!0))))}function f2(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(_e),autolinkProtocol:X,autolinkEmail:X,atxHeading:l(Jt),blockQuote:l(je),characterEscape:X,characterReference:X,codeFenced:l(Ue),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(Ue,a),codeText:l(kt,a),codeTextData:X,data:X,codeFlowValue:X,definition:l(gt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(It),hardBreakEscape:l(Ht),hardBreakTrailing:l(Ht),htmlFlow:l(it,a),htmlFlowData:X,htmlText:l(it,a),htmlTextData:X,image:l(_t),label:a,link:l(_e),listItem:l(Lt),listItemValue:y,listOrdered:l(ln,p),listUnordered:l(ln),paragraph:l(Dn),reference:R,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(Jt),strong:l(un),thematicBreak:l(he)},exit:{atxHeading:d(),atxHeadingSequence:H,autolink:d(),autolinkEmail:Te,autolinkProtocol:ge,blockQuote:d(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:ie,characterReference:Ce,codeFenced:d(T),codeFencedFence:C,codeFencedFenceInfo:w,codeFencedFenceMeta:k,codeFlowValue:j,codeIndented:d(E),codeText:d(te),codeTextData:j,data:j,definition:d(),definitionDestinationString:L,definitionLabelString:M,definitionTitleString:A,emphasis:d(),hardBreakEscape:d($),hardBreakTrailing:d($),htmlFlow:d(fe),htmlFlowData:j,htmlText:d(se),htmlTextData:j,image:d(Ee),label:le,labelText:q,lineEnding:G,link:d(xe),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Z,resourceDestinationString:P,resourceTitleString:_,resource:Q,setextHeading:d(W),setextHeadingLineSequence:Y,setextHeadingText:D,strong:d(),thematicBreak:d()}};gw(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(V){let ee={type:"root",children:[]};const F={stack:[ee],tokenStack:[],config:t,enter:c,exit:h,buffer:a,resume:m,data:n},oe=[];let J=-1;for(;++J<V.length;)if(V[J][1].type==="listOrdered"||V[J][1].type==="listUnordered")if(V[J][0]==="enter")oe.push(J);else{const Me=oe.pop();J=s(V,Me,J)}for(J=-1;++J<V.length;){const Me=t[V[J][0]];pw.call(Me,V[J][1].type)&&Me[V[J][1].type].call(Object.assign({sliceSerialize:V[J][2].sliceSerialize},F),V[J][1])}if(F.tokenStack.length>0){const Me=F.tokenStack[F.tokenStack.length-1];(Me[1]||dy).call(F,void 0,Me[0])}for(ee.position={start:Cr(V.length>0?V[0][1].start:{line:1,column:1,offset:0}),end:Cr(V.length>0?V[V.length-2][1].end:{line:1,column:1,offset:0})},J=-1;++J<t.transforms.length;)ee=t.transforms[J](ee)||ee;return ee}function s(V,ee,F){let oe=ee-1,J=-1,Me=!1,Fe,pe,Ie,Tt;for(;++oe<=F;){const ot=V[oe];switch(ot[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ot[0]==="enter"?J++:J--,Tt=void 0;break}case"lineEndingBlank":{ot[0]==="enter"&&(Fe&&!Tt&&!J&&!Ie&&(Ie=oe),Tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tt=void 0}if(!J&&ot[0]==="enter"&&ot[1].type==="listItemPrefix"||J===-1&&ot[0]==="exit"&&(ot[1].type==="listUnordered"||ot[1].type==="listOrdered")){if(Fe){let Ze=oe;for(pe=void 0;Ze--;){const He=V[Ze];if(He[1].type==="lineEnding"||He[1].type==="lineEndingBlank"){if(He[0]==="exit")continue;pe&&(V[pe][1].type="lineEndingBlank",Me=!0),He[1].type="lineEnding",pe=Ze}else if(!(He[1].type==="linePrefix"||He[1].type==="blockQuotePrefix"||He[1].type==="blockQuotePrefixWhitespace"||He[1].type==="blockQuoteMarker"||He[1].type==="listItemIndent"))break}Ie&&(!pe||Ie<pe)&&(Fe._spread=!0),Fe.end=Object.assign({},pe?V[pe][1].start:ot[1].end),V.splice(pe||oe,0,["exit",Fe,ot[2]]),oe++,F++}if(ot[1].type==="listItemPrefix"){const Ze={type:"listItem",_spread:!1,start:Object.assign({},ot[1].start),end:void 0};Fe=Ze,V.splice(oe,0,["enter",Ze,ot[2]]),oe++,F++,Ie=void 0,Tt=!0}}}return V[ee][1]._spread=Me,F}function l(V,ee){return F;function F(oe){c.call(this,V(oe),oe),ee&&ee.call(this,oe)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(V,ee,F){this.stack[this.stack.length-1].children.push(V),this.stack.push(V),this.tokenStack.push([ee,F||void 0]),V.position={start:Cr(ee.start),end:void 0}}function d(V){return ee;function ee(F){V&&V.call(this,F),h.call(this,F)}}function h(V,ee){const F=this.stack.pop(),oe=this.tokenStack.pop();if(oe)oe[0].type!==V.type&&(ee?ee.call(this,V,oe[0]):(oe[1]||dy).call(this,V,oe[0]));else throw new Error("Cannot close `"+V.type+"` ("+ts({start:V.start,end:V.end})+"): it’s not open");F.position.end=Cr(V.end)}function m(){return Ld(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function y(V){if(this.data.expectingFirstListItemValue){const ee=this.stack[this.stack.length-2];ee.start=Number.parseInt(this.sliceSerialize(V),10),this.data.expectingFirstListItemValue=void 0}}function w(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.lang=V}function k(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.meta=V}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.value=V.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.value=V.replace(/(\r?\n|\r)$/g,"")}function M(V){const ee=this.resume(),F=this.stack[this.stack.length-1];F.label=ee,F.identifier=Mn(this.sliceSerialize(V)).toLowerCase()}function A(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.title=V}function L(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.url=V}function H(V){const ee=this.stack[this.stack.length-1];if(!ee.depth){const F=this.sliceSerialize(V).length;ee.depth=F}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function Y(V){const ee=this.stack[this.stack.length-1];ee.depth=this.sliceSerialize(V).codePointAt(0)===61?1:2}function W(){this.data.setextHeadingSlurpLineEnding=void 0}function X(V){const F=this.stack[this.stack.length-1].children;let oe=F[F.length-1];(!oe||oe.type!=="text")&&(oe=z(),oe.position={start:Cr(V.start),end:void 0},F.push(oe)),this.stack.push(oe)}function j(V){const ee=this.stack.pop();ee.value+=this.sliceSerialize(V),ee.position.end=Cr(V.end)}function G(V){const ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const F=ee.children[ee.children.length-1];F.position.end=Cr(V.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ee.type)&&(X.call(this,V),j.call(this,V))}function $(){this.data.atHardBreak=!0}function fe(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.value=V}function se(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.value=V}function te(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.value=V}function xe(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=ee,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function Ee(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=ee,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function q(V){const ee=this.sliceSerialize(V),F=this.stack[this.stack.length-2];F.label=aP(ee),F.identifier=Mn(ee).toLowerCase()}function le(){const V=this.stack[this.stack.length-1],ee=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const oe=V.children;F.children=oe}else F.alt=ee}function P(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.url=V}function _(){const V=this.resume(),ee=this.stack[this.stack.length-1];ee.title=V}function Q(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function Z(V){const ee=this.resume(),F=this.stack[this.stack.length-1];F.label=ee,F.identifier=Mn(this.sliceSerialize(V)).toLowerCase(),this.data.referenceType="full"}function de(V){this.data.characterReferenceType=V.type}function ie(V){const ee=this.sliceSerialize(V),F=this.data.characterReferenceType;let oe;F?(oe=nw(ee,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):oe=Fd(ee);const J=this.stack[this.stack.length-1];J.value+=oe}function Ce(V){const ee=this.stack.pop();ee.position.end=Cr(V.end)}function ge(V){j.call(this,V);const ee=this.stack[this.stack.length-1];ee.url=this.sliceSerialize(V)}function Te(V){j.call(this,V);const ee=this.stack[this.stack.length-1];ee.url="mailto:"+this.sliceSerialize(V)}function je(){return{type:"blockquote",children:[]}}function Ue(){return{type:"code",lang:null,meta:null,value:""}}function kt(){return{type:"inlineCode",value:""}}function gt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function It(){return{type:"emphasis",children:[]}}function Jt(){return{type:"heading",depth:0,children:[]}}function Ht(){return{type:"break"}}function it(){return{type:"html",value:""}}function _t(){return{type:"image",title:null,url:"",alt:null}}function _e(){return{type:"link",title:null,url:"",children:[]}}function ln(V){return{type:"list",ordered:V.type==="listOrdered",start:null,spread:V._spread,children:[]}}function Lt(V){return{type:"listItem",spread:V._spread,checked:null,children:[]}}function Dn(){return{type:"paragraph",children:[]}}function un(){return{type:"strong",children:[]}}function z(){return{type:"text",value:""}}function he(){return{type:"thematicBreak"}}}function Cr(e){return{line:e.line,column:e.column,offset:e.offset}}function gw(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?gw(e,i):d2(e,i)}}function d2(e,t){let n;for(n in t)if(pw.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function dy(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ts({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ts({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ts({start:t.start,end:t.end})+") is still open")}const h2={tokenize:x2,partial:!0},yw={tokenize:w2,partial:!0},vw={tokenize:k2,partial:!0},xw={tokenize:S2,partial:!0},p2={tokenize:b2,partial:!0},ww={name:"wwwAutolink",tokenize:y2,previous:Sw},kw={name:"protocolAutolink",tokenize:v2,previous:bw},ir={name:"emailAutolink",tokenize:g2,previous:Cw},Wn={};function m2(){return{text:Wn}}let Yr=48;for(;Yr<123;)Wn[Yr]=ir,Yr++,Yr===58?Yr=65:Yr===91&&(Yr=97);Wn[43]=ir;Wn[45]=ir;Wn[46]=ir;Wn[95]=ir;Wn[72]=[ir,kw];Wn[104]=[ir,kw];Wn[87]=[ir,ww];Wn[119]=[ir,ww];function g2(e,t,n){const i=this;let s,l;return a;function a(p){return!jf(p)||!Cw.call(i,i.previous)||Vd(i.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(p))}function c(p){return jf(p)?(e.consume(p),c):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(p2,m,h)(p):p===45||p===95||jt(p)?(l=!0,e.consume(p),d):m(p)}function h(p){return e.consume(p),s=!0,d}function m(p){return l&&s&&Vt(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function y2(e,t,n){const i=this;return s;function s(a){return a!==87&&a!==119||!Sw.call(i,i.previous)||Vd(i.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(h2,e.attempt(yw,e.attempt(vw,l),n),n)(a))}function l(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function v2(e,t,n){const i=this;let s="",l=!1;return a;function a(p){return(p===72||p===104)&&bw.call(i,i.previous)&&!Vd(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(p),e.consume(p),c):n(p)}function c(p){if(Vt(p)&&s.length<5)return s+=String.fromCodePoint(p),e.consume(p),c;if(p===58){const y=s.toLowerCase();if(y==="http"||y==="https")return e.consume(p),d}return n(p)}function d(p){return p===47?(e.consume(p),l?h:(l=!0,d)):n(p)}function h(p){return p===null||gl(p)||Ye(p)||ai(p)||jl(p)?n(p):e.attempt(yw,e.attempt(vw,m),n)(p)}function m(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function x2(e,t,n){let i=0;return s;function s(a){return(a===87||a===119)&&i<3?(i++,e.consume(a),s):a===46&&i===3?(e.consume(a),l):n(a)}function l(a){return a===null?n(a):t(a)}}function w2(e,t,n){let i,s,l;return a;function a(h){return h===46||h===95?e.check(xw,d,c)(h):h===null||Ye(h)||ai(h)||h!==45&&jl(h)?d(h):(l=!0,e.consume(h),a)}function c(h){return h===95?i=!0:(s=i,i=void 0),e.consume(h),a}function d(h){return s||i||!l?n(h):t(h)}}function k2(e,t){let n=0,i=0;return s;function s(a){return a===40?(n++,e.consume(a),s):a===41&&i<n?l(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(xw,t,l)(a):a===null||Ye(a)||ai(a)?t(a):(e.consume(a),s)}function l(a){return a===41&&i++,e.consume(a),s}}function S2(e,t,n){return i;function i(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),i):c===38?(e.consume(c),l):c===93?(e.consume(c),s):c===60||c===null||Ye(c)||ai(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||Ye(c)||ai(c)?t(c):i(c)}function l(c){return Vt(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),i):Vt(c)?(e.consume(c),a):n(c)}}function b2(e,t,n){return i;function i(l){return e.consume(l),s}function s(l){return jt(l)?n(l):t(l)}}function Sw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ye(e)}function bw(e){return!Vt(e)}function Cw(e){return!(e===47||jf(e))}function jf(e){return e===43||e===45||e===46||e===95||jt(e)}function Vd(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const C2={tokenize:j2,partial:!0};function E2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:A2,continuation:{tokenize:M2},exit:N2}},text:{91:{name:"gfmFootnoteCall",tokenize:R2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:T2,resolveTo:P2}}}}function T2(e,t,n){const i=this;let s=i.events.length;const l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a;for(;s--;){const d=i.events[s][1];if(d.type==="labelImage"){a=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!a||!a._balanced)return n(d);const h=Mn(i.sliceSerialize({start:a.end,end:i.now()}));return h.codePointAt(0)!==94||!l.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function P2(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 i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},c=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...c),e}function R2(e,t,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l=0,a;return c;function c(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(p){if(l>999||p===93&&!a||p===null||p===91||Ye(p))return n(p);if(p===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return s.includes(Mn(i.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Ye(p)||(a=!0),l++,e.consume(p),p===92?m:h}function m(p){return p===91||p===92||p===93?(e.consume(p),l++,h):h(p)}}function A2(e,t,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,a=0,c;return d;function d(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(k)}function m(k){if(a>999||k===93&&!c||k===null||k===91||Ye(k))return n(k);if(k===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return l=Mn(i.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Ye(k)||(c=!0),a++,e.consume(k),k===92?p:m}function p(k){return k===91||k===92||k===93?(e.consume(k),a++,m):m(k)}function y(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),s.includes(l)||s.push(l),Ve(e,w,"gfmFootnoteDefinitionWhitespace")):n(k)}function w(k){return t(k)}}function M2(e,t,n){return e.check(bs,t,e.attempt(C2,t,n))}function N2(e){e.exit("gfmFootnoteDefinition")}function j2(e,t,n){const i=this;return Ve(e,s,"gfmFootnoteDefinitionIndent",5);function s(l){const a=i.events[i.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(l):n(l)}}function D2(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:l,resolveAll:s};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(a,c){let d=-1;for(;++d<a.length;)if(a[d][0]==="enter"&&a[d][1].type==="strikethroughSequenceTemporary"&&a[d][1]._close){let h=d;for(;h--;)if(a[h][0]==="exit"&&a[h][1].type==="strikethroughSequenceTemporary"&&a[h][1]._open&&a[d][1].end.offset-a[d][1].start.offset===a[h][1].end.offset-a[h][1].start.offset){a[d][1].type="strikethroughSequence",a[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},a[h][1].start),end:Object.assign({},a[d][1].end)},p={type:"strikethroughText",start:Object.assign({},a[h][1].end),end:Object.assign({},a[d][1].start)},y=[["enter",m,c],["enter",a[h][1],c],["exit",a[h][1],c],["enter",p,c]],w=c.parser.constructs.insideSpan.null;w&&sn(y,y.length,0,_l(w,a.slice(h+1,d),c)),sn(y,y.length,0,[["exit",p,c],["enter",a[d][1],c],["exit",a[d][1],c],["exit",m,c]]),sn(a,h-1,d-h+3,y),d=h+y.length-2;break}}for(d=-1;++d<a.length;)a[d][1].type==="strikethroughSequenceTemporary"&&(a[d][1].type="data");return a}function l(a,c,d){const h=this.previous,m=this.events;let p=0;return y;function y(k){return h===126&&m[m.length-1][1].type!=="characterEscape"?d(k):(a.enter("strikethroughSequenceTemporary"),w(k))}function w(k){const C=Xi(h);if(k===126)return p>1?d(k):(a.consume(k),p++,w);if(p<2&&!n)return d(k);const T=a.exit("strikethroughSequenceTemporary"),E=Xi(k);return T._open=!E||E===2&&!!C,T._close=!C||C===2&&!!E,c(k)}}}class I2{constructor(){this.map=[]}add(t,n,i){_2(this,t,n,i)}consume(t){if(this.map.sort(function(l,a){return l[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let s=i.pop();for(;s;){for(const l of s)t.push(l);s=i.pop()}this.map.length=0}}function _2(e,t,n,i){let s=0;if(!(n===0&&i.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...i);return}s+=1}e.map.push([t,n,i])}}function L2(e,t){let n=!1;const i=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=i.length-1;i[l]=i[l]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function O2(){return{flow:{null:{name:"table",tokenize:F2,resolveAll:z2}}}}function F2(e,t,n){const i=this;let s=0,l=0,a;return c;function c(j){let G=i.events.length-1;for(;G>-1;){const se=i.events[G][1].type;if(se==="lineEnding"||se==="linePrefix")G--;else break}const $=G>-1?i.events[G][1].type:null,fe=$==="tableHead"||$==="tableRow"?D:d;return fe===D&&i.parser.lazy[i.now().line]?n(j):fe(j)}function d(j){return e.enter("tableHead"),e.enter("tableRow"),h(j)}function h(j){return j===124||(a=!0,l+=1),m(j)}function m(j){return j===null?n(j):Ae(j)?l>1?(l=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),w):n(j):Oe(j)?Ve(e,m,"whitespace")(j):(l+=1,a&&(a=!1,s+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),a=!0,m):(e.enter("data"),p(j)))}function p(j){return j===null||j===124||Ye(j)?(e.exit("data"),m(j)):(e.consume(j),j===92?y:p)}function y(j){return j===92||j===124?(e.consume(j),p):p(j)}function w(j){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(j):(e.enter("tableDelimiterRow"),a=!1,Oe(j)?Ve(e,k,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):k(j))}function k(j){return j===45||j===58?T(j):j===124?(a=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),C):H(j)}function C(j){return Oe(j)?Ve(e,T,"whitespace")(j):T(j)}function T(j){return j===58?(l+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),E):j===45?(l+=1,E(j)):j===null||Ae(j)?L(j):H(j)}function E(j){return j===45?(e.enter("tableDelimiterFiller"),M(j)):H(j)}function M(j){return j===45?(e.consume(j),M):j===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(j))}function A(j){return Oe(j)?Ve(e,L,"whitespace")(j):L(j)}function L(j){return j===124?k(j):j===null||Ae(j)?!a||s!==l?H(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):H(j)}function H(j){return n(j)}function D(j){return e.enter("tableRow"),Y(j)}function Y(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),Y):j===null||Ae(j)?(e.exit("tableRow"),t(j)):Oe(j)?Ve(e,Y,"whitespace")(j):(e.enter("data"),W(j))}function W(j){return j===null||j===124||Ye(j)?(e.exit("data"),Y(j)):(e.consume(j),j===92?X:W)}function X(j){return j===92||j===124?(e.consume(j),W):W(j)}}function z2(e,t){let n=-1,i=!0,s=0,l=[0,0,0,0],a=[0,0,0,0],c=!1,d=0,h,m,p;const y=new I2;for(;++n<e.length;){const w=e[n],k=w[1];w[0]==="enter"?k.type==="tableHead"?(c=!1,d!==0&&(hy(y,t,d,h,m),m=void 0,d=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",h,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(i=!0,p=void 0,l=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",m,t]])),s=k.type==="tableDelimiterRow"?2:m?3:1):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(i=!1,a[2]===0&&(l[1]!==0&&(a[0]=a[1],p=Va(y,t,l,s,void 0,p),l=[0,0,0,0]),a[2]=n)):k.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(a[0]=a[1],p=Va(y,t,l,s,void 0,p)),l=a,a=[l[1],n,0,0])):k.type==="tableHead"?(c=!0,d=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(d=n,l[1]!==0?(a[0]=a[1],p=Va(y,t,l,s,n,p)):a[1]!==0&&(p=Va(y,t,a,s,n,p)),s=0):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(a[3]=n)}for(d!==0&&hy(y,t,d,h,m),y.consume(t.events),n=-1;++n<t.events.length;){const w=t.events[n];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=L2(t.events,n))}return e}function Va(e,t,n,i,s,l){const a=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(l.end=Object.assign({},Vi(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const d=Vi(t.events,n[1]);if(l={type:a,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const h=Vi(t.events,n[2]),m=Vi(t.events,n[3]),p={type:c,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",p,t]]),i!==2){const y=t.events[n[2]],w=t.events[n[3]];if(y[1].end=Object.assign({},w[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,C=n[3]-n[2]-1;e.add(k,C,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return s!==void 0&&(l.end=Object.assign({},Vi(t.events,s)),e.add(s,0,[["exit",l,t]]),l=void 0),l}function hy(e,t,n,i,s){const l=[],a=Vi(t.events,n);s&&(s.end=Object.assign({},a),l.push(["exit",s,t])),i.end=Object.assign({},a),l.push(["exit",i,t]),e.add(n+1,0,l)}function Vi(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const V2={name:"tasklistCheck",tokenize:$2};function B2(){return{text:{91:V2}}}function $2(e,t,n){const i=this;return s;function s(d){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),l)}function l(d){return Ye(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),a):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),a):n(d)}function a(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Ae(d)?t(d):Oe(d)?e.check({tokenize:U2},t,n)(d):n(d)}}function U2(e,t,n){return Ve(e,i,"whitespace");function i(s){return s===null?n(s):t(s)}}function Ew(e){return iw([m2(),E2(),D2(e),O2(),B2()])}function Tw(e){return typeof e=="string"&&/\.md$/i.test(e.trim())}function H2(e,t){const n=String(e??"").trim().split(/\r?\n/).map(s=>`> ${s}`).join(`
|
|
253
|
+
`),i=String(t??"").trim();return n&&i?`${n}
|
|
254
|
+
|
|
255
|
+
${i}`:n||i}function W2(e){const t=String(e??""),n=t.lastIndexOf(".");return`${n>0?t.slice(0,n):t}_review.md`}function K2(e,t,n){const i=String(e??""),s=String(t??""),l=Math.max(0,Number(n)||0);if(!s)return 0;let a=0,c=0;for(;c<=i.length;){const d=i.indexOf(s,c);if(d<0||d>=l)return a;a+=1,c=d+Math.max(s.length,1)}return a}function q2(e){return(String(e??"").match(/https?:\/\/[^\s<>()\[\]{}"']+/gi)??[]).map(n=>n.replace(/[.,!?;:]+$/,""))}function Df(e){return e?.kind!=="file"?null:String(e.mime??"").toLowerCase().startsWith("image/")?"photo":"file"}function X2(e){const t=i=>{const s=Date.parse(String(i??""));return Number.isFinite(s)?s:0},n=new Map;for(const i of e??[]){const s=String(i?.message?.filename||"file"),l=n.get(s)??[];l.push(i),n.set(s,l)}return[...n.entries()].map(([i,s])=>({filename:i,versions:s.sort((l,a)=>t(a.message?.date)-t(l.message?.date))})).sort((i,s)=>t(s.versions[0]?.message?.date)-t(i.versions[0]?.message?.date))}const Y2=new Set(["delete","emphasis","inlineCode","link","linkReference","strong"]);function G2(e){const t=mw(e,{extensions:[Ew()],mdastExtensions:[rw()]}),n=[],i=[],s=[],l=(c,d)=>{const h=String(c??""),m=d.position?.start?.offset,p=d.position?.end?.offset;if(!h||!Number.isInteger(m)||!Number.isInteger(p))return;const y=e.slice(m,p),w=y.indexOf(h);if(w>=0){for(let C=0;C<h.length;C+=1)n.push(h[C]),i.push(m+w+C+1);return}let k=0;for(const C of h){const T=y.indexOf(C,k),E=T>=0?T:Math.min(k,Math.max(y.length-1,0));n.push(C),i.push(m+E+1),k=E+1}},a=c=>{const d=n.length;if(c.type==="text"||c.type==="inlineCode"||c.type==="code")l(c.value,c);else for(const p of c.children??[])a(p);const h=n.length,m=c.position?.end?.offset;h>d&&Y2.has(c.type)&&Number.isInteger(m)&&s.push({visibleEnd:h,rawEnd:m})};return a(t),{text:n.join(""),rawEnds:i,trailingRanges:s}}function Q2(e,t,n){let i=-1,s=0;for(let l=0;l<=n;l+=1){if(i=e.indexOf(t,s),i<0)return-1;s=i+Math.max(t.length,1)}return i}function Z2(e,t){const n=String(e??""),i=G2(n),s=new Map,l=[];for(const[d,h]of(t??[]).entries()){const m=String(h?.selection??"").trim(),p=String(h?.comment??"").trim().replace(/\s+/g," ").replace(/\]\]/g,"] ]");if(!p)continue;const y=`[[REVIEW COMMENT ${d+1}: ${p}]]`,w=Number.isInteger(h?.occurrence)&&h.occurrence>=0?h.occurrence:0,k=m?Q2(i.text,m,w):-1,C=k+m.length;let T=k>=0?i.rawEnds[C-1]:void 0;if(!Number.isInteger(T)){l.push(`[[REVIEW COMMENT ${d+1} — ANCHOR NOT FOUND: ${p}]]`);continue}for(const M of i.trailingRanges)M.visibleEnd===C&&(T=Math.max(T,M.rawEnd));const E=s.get(T)??[];E.push(y),s.set(T,E)}let a=n;const c=[...s.keys()].sort((d,h)=>h-d);for(const d of c)a=`${a.slice(0,d)} ${s.get(d).join(" ")}${a.slice(d)}`;return l.length>0&&(a=`${a.trimEnd()}
|
|
256
|
+
|
|
257
|
+
${l.join(`
|
|
258
|
+
`)}
|
|
259
|
+
`),a}const J2=["default-src 'none'","script-src 'none'","connect-src 'none'","frame-src 'none'","child-src 'none'","object-src 'none'","worker-src 'none'","manifest-src 'none'","form-action 'none'","base-uri 'none'","img-src data: blob:","media-src data: blob:","font-src data:","style-src 'unsafe-inline'"].join("; "),eA="",tA="application/octet-stream",nA=/\.([A-Za-z0-9]{1,12})$/;function Pw(e){return String(e??"").split(";")[0].trim().toLowerCase()}function Rw(e){const t=nA.exec(String(e??"").trim());return t?t[1].toLowerCase():""}function rA(e){const t=Rw(e);return t==="html"||t==="htm"}function Ll(e,t){return rA(e)?!0:Rw(e)?!1:Pw(t)==="text/html"}function Bd(e,t){const n=Pw(e);return n==="text/html"||Ll(t,e)?tA:n}const iA=[":root{color-scheme:light}","html{background:#fff}","body{margin:0;padding:24px;color:#0f172a;font:15px/1.65 ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;overflow-wrap:break-word}","img,video,svg,canvas,iframe{max-width:100%;height:auto}","pre{overflow:auto}","table{max-width:100%}"].join("");function oA(e){return["<!doctype html>","<html>","<head>",`<meta http-equiv="Content-Security-Policy" content="${J2}">`,'<meta charset="utf-8">','<meta name="referrer" content="no-referrer">','<meta name="viewport" content="width=device-width, initial-scale=1">',`<style>${iA}</style>`,"</head>","<body>",String(e??""),"</body>","</html>"].join(`
|
|
260
|
+
`)}const If=48e3,sA=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"}]),Aw="x-ours-duration",aA=4e3;function lA(e){return!Number.isFinite(e)||e<=0?null:String(Math.round(e*100)/100)}function uA(e,t){const n=t===null?null:lA(t);return n===null?e:`${e};${Aw}=${n}`}function cA(e){if(!e)return null;const t=new RegExp(`${Aw}\\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 fA(e,t=aA){return typeof Audio!="function"||typeof URL?.createObjectURL!="function"?Promise.resolve(null):new Promise(n=>{const i=URL.createObjectURL(e),s=new Audio;let l=!1;const a=d=>{l||(l=!0,clearTimeout(c),s.removeAttribute("src"),s.load(),URL.revokeObjectURL(i),n(Number.isFinite(d)&&(d??0)>0?d:null))},c=setTimeout(()=>a(null),t);s.addEventListener("loadedmetadata",()=>{Number.isFinite(s.duration)&&s.duration>0?a(s.duration):s.currentTime=Number.MAX_SAFE_INTEGER},{once:!0}),s.addEventListener("durationchange",()=>{Number.isFinite(s.duration)&&s.duration>0&&a(s.duration)}),s.addEventListener("error",()=>a(null),{once:!0}),s.preload="metadata",s.src=i})}const Mw=40,dA=44,Nw=.14,hA=.5,pA=e=>e<0?0:e>1?1:e;function jw(e,{floor:t=Nw,gamma:n=hA}={}){const i=Math.pow(pA(Number.isFinite(e)?e:0),n);return t+(1-t)*i}function mA(e,t=Mw){const n=Math.max(1,Math.floor(t)),i=new Array(n).fill(0);if(!e||e.length===0)return i;const s=e.length/n;for(let l=0;l<n;l++){const a=Math.floor(l*s),c=Math.min(e.length,Math.max(a+1,Math.floor((l+1)*s)));let d=0;for(let h=a;h<c;h++)d+=e[h]*e[h];i[l]=Math.sqrt(d/(c-a))}return i}function gA(e,t={}){const{silenceFloor:n=1e-4}=t,i=e.reduce((s,l)=>l>s?l:s,0);return i>n?e.map(s=>jw(s/i,t)):e.map(()=>Nw)}function yA({decay:e=.995,minReference:t=.02}={}){let n=t;return{push(i){const s=Number.isFinite(i)&&i>0?i:0;return n=Math.max(t,n*e,s),jw(s/n)},get reference(){return n}}}function Dw(e){return Bd(e.mime,e.filename)}function $d(e){const[t,n]=S.useState({url:null,size:0,loaded:!1});return S.useEffect(()=>{let i=null,s=!1;n({url:null,size:0,loaded:!1});const l=e.available?TE(e.id):null;return l?(n({url:l,size:e.size,loaded:!0}),()=>{}):(Nl(e.id).then(a=>{if(s)return;if(!a){n({url:null,size:0,loaded:!0});return}const c=URL.createObjectURL(new Blob([a],{type:Dw(e)}));i=c,n({url:c,size:a.byteLength,loaded:!0})}),()=>{s=!0,i&&URL.revokeObjectURL(i)})},[e.id,e.available]),t}function Ud({label:e}){return v.jsxs("div",{className:"file-offdevice",children:[v.jsx("div",{className:"file-offdevice-ic",children:v.jsx(ve,{name:"inbox",size:16})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:e,children:e}),v.jsx("div",{className:"filecard-sub",children:"Available on your original device"})]})]})}function vA(e){const t=new Date(e);return isNaN(t.getTime())?"":t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function py({rec:e}){if(!e.transcription)return null;const t=e.transcription.text?.trim();return v.jsx("div",{className:"voice-transcript",children:t||`Transcription ${e.transcription.status??"unavailable"}${e.transcription.error_category?` · ${e.transcription.error_category}`:""}`})}function xA({rec:e,receipt:t,receiptless:n,onPreview:i,onFetch:s}){const l=e.dir==="out",a=`bubble file-bubble${l?" me":""}`,c=qi(e.mime,e.filename)?"Voice message":"File",d=v.jsxs("div",{className:"bubble-at",children:[vA(e.date),l&&v.jsx(Ox,{receipt:t,content:c,receiptless:n})]});return e.mime.startsWith("image/")?v.jsx(wA,{rec:e,cls:a,footer:d,onFetch:s}):qi(e.mime,e.filename)?v.jsx(kA,{rec:e,cls:a,footer:d,onFetch:s}):v.jsx(SA,{rec:e,cls:a,footer:d,onPreview:i,onFetch:s})}function Hd({rec:e,onFetch:t}){const[n,i]=S.useState(!1),[s,l]=S.useState(!1);return v.jsxs("div",{className:"file-offdevice",children:[v.jsx("div",{className:"file-offdevice-ic",children:v.jsx(ve,{name:"inbox",size:16})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:e.filename,children:qi(e.mime,e.filename)?"Voice message":e.filename}),v.jsx("div",{className:"filecard-sub",children:s?"Could not fetch media":"Available after explicit fetch"})]}),v.jsx("button",{className:"btn sm",disabled:n,onClick:()=>{i(!0),l(!1),(t?.(e.id)??AE(e.id)).catch(()=>l(!0)).finally(()=>i(!1))},children:n?"Fetching…":"Fetch"})]})}function wA({rec:e,cls:t,footer:n,onFetch:i}){const{url:s,loaded:l}=$d(e);return l&&!s?v.jsxs("div",{className:t+" filecard-bubble file-offdevice-bubble",children:[e.available===!1?v.jsx(Hd,{rec:e,onFetch:i}):v.jsx(Ud,{label:e.filename&&e.filename!=="file"?e.filename:"Photo"}),n]}):v.jsxs("div",{className:t+" image-bubble",children:[s?v.jsx("a",{href:s,target:"_blank",rel:"noreferrer",title:e.filename,children:v.jsx("img",{src:s,alt:e.filename})}):v.jsx("div",{className:"file-loading",children:"loading…"}),n]})}function kA({rec:e,cls:t,footer:n,onFetch:i}){const{url:s,loaded:l}=$d(e),a=S.useRef(null),c=S.useRef(null),[d,h]=S.useState(!1),[m,p]=S.useState(0),[y,w]=S.useState(()=>cA(e.mime)),[k,C]=S.useState(!1),[T,E]=S.useState(null);if(S.useEffect(()=>{if(!s)return;let W=!1;const X=typeof window>"u"?void 0:window.AudioContext||window.webkitAudioContext;if(!X)return;const j=new X,G=()=>{try{j.close()?.catch?.(()=>{})}catch{}};return(async()=>{try{const $=await fetch(s).then(se=>se.arrayBuffer()),fe=await j.decodeAudioData($);if(W)return;E(gA(mA(fe.getChannelData(0),Mw)))}catch{}finally{G()}})(),()=>{W=!0,G()}},[s]),l&&!s)return v.jsxs("div",{className:t+" filecard-bubble file-offdevice-bubble",children:[e.available===!1?v.jsx(Hd,{rec:e,onFetch:i}):v.jsx(Ud,{label:"Voice message"}),n,v.jsx(py,{rec:e})]});const M=()=>{const W=a.current;W&&(d?W.pause():W.play())},A=W=>{const X=c.current;if(!X)return 0;const j=X.getBoundingClientRect();return Math.max(0,Math.min(1,(W-j.left)/j.width))},L=W=>{const X=a.current;p(W),X&&y&&isFinite(y)&&(X.currentTime=W*y)},H=W=>{s&&(W.currentTarget.setPointerCapture?.(W.pointerId),C(!0),L(A(W.clientX)))},D=W=>{k&&L(A(W.clientX))},Y=W=>{k&&(W.currentTarget.releasePointerCapture?.(W.pointerId),C(!1))};return v.jsxs("div",{className:t+" voice-bubble",children:[v.jsx("button",{className:"voice-play",onClick:M,disabled:!s,title:d?"Pause":"Play",children:v.jsx(ve,{name:d?"pause":"play",size:14})}),v.jsxs("div",{className:"voice-track"+(s?" seekable":"")+(k?" scrubbing":"")+(T?" has-wave":""),ref:c,onPointerDown:H,onPointerMove:D,onPointerUp:Y,onPointerCancel:Y,role:s?"slider":void 0,"aria-label":s?"Seek":void 0,"aria-valuenow":Math.round(m*100),children:[T?v.jsx("div",{className:"voice-wave","aria-hidden":!0,children:T.map((W,X)=>v.jsx("span",{className:"voice-wave-bar"+(X/T.length<m?" played":""),style:{height:`${Math.round(W*100)}%`}},X))}):v.jsx("div",{className:"voice-track-fill",style:{width:`${m*100}%`}}),s&&v.jsx("span",{className:"voice-track-knob",style:{left:`${m*100}%`}})]}),v.jsx("span",{className:"voice-dur mono",children:y!==null?`${Math.floor(y/60)}:${String(Math.floor(y%60)).padStart(2,"0")}`:"·:··"}),s&&v.jsx("audio",{ref:a,src:s,onPlay:()=>h(!0),onPause:()=>h(!1),onEnded:()=>{h(!1),p(0)},onTimeUpdate:W=>{const X=W.currentTarget;!k&&X.duration>0&&isFinite(X.duration)&&p(X.currentTime/X.duration)},onLoadedMetadata:W=>{const X=W.currentTarget.duration;isFinite(X)&&X>0&&w(X)}}),n,v.jsx(py,{rec:e})]})}function SA({rec:e,cls:t,footer:n,onPreview:i,onFetch:s}){const{url:l,size:a,loaded:c}=$d(e);return c&&!l?v.jsxs("div",{className:t+" filecard-bubble file-offdevice-bubble",children:[e.available===!1?v.jsx(Hd,{rec:e,onFetch:s}):v.jsx(Ud,{label:e.filename}),n]}):v.jsxs("div",{className:t+" filecard-bubble",children:[v.jsxs("div",{className:"filecard",children:[v.jsx("div",{className:"filecard-ic",children:v.jsx(ve,{name:"copy",size:18})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:e.filename,children:e.filename}),v.jsx("div",{className:"filecard-sub",children:a?Ar(a):e.size?Ar(e.size):""})]}),Tw(e.filename)&&l&&i&&v.jsx("button",{className:"icon-btn",onClick:()=>i(e),title:"Preview markdown",children:v.jsx(ve,{name:"monitor",size:16})}),Ll(e.filename,e.mime)&&l&&i&&v.jsx("button",{className:"icon-btn",onClick:()=>i(e),title:"Preview HTML",children:v.jsx(ve,{name:"monitor",size:16})}),v.jsx("a",{className:"icon-btn"+(l?"":" disabled"),href:l??void 0,download:e.filename,title:"Download",children:v.jsx(ve,{name:"download",size:16})})]}),n]})}function Iw(e){const{att:t}=e,[n,i]=S.useState(null);return S.useEffect(()=>{const s=Dw({mime:t.mime,filename:t.filename}),l=URL.createObjectURL(new Blob([t.bytes],{type:s}));return i(l),()=>URL.revokeObjectURL(l)},[t]),v.jsxs("div",{className:"attach-preview",children:[t.mime.startsWith("image/")&&n?v.jsx("img",{className:"attach-thumb",src:n,alt:t.filename}):t.voice&&n?v.jsx("audio",{className:"attach-audio",src:n,controls:!0}):v.jsx("div",{className:"filecard-ic",children:v.jsx(ve,{name:"copy",size:16})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:t.filename,children:t.voice?"Voice message":t.filename}),v.jsxs("div",{className:"filecard-sub",children:[Ar(t.bytes.length),t.originalSize&&t.originalSize>t.bytes.length?` · optimized from ${Ar(t.originalSize)}`:""]})]}),v.jsx("button",{className:"btn primary sm",disabled:e.sending,onClick:e.onSend,children:e.sending?"Sending…":"Send"}),v.jsx("button",{className:"icon-btn",title:"Discard",disabled:e.sending,onClick:e.onDiscard,children:v.jsx(ve,{name:"close"})})]})}const bA={channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0},CA=e=>`${Math.floor(e/60)}:${String(Math.floor(e%60)).padStart(2,"0")}`,my=84,gy=120,EA=550,TA=Math.floor(Qo/(If/8)),PA=Math.min(300,TA),RA=dA;function _w(e){const[t,n]=S.useState("idle"),[i,s]=S.useState(0),[l,a]=S.useState([]),[c,d]=S.useState(0),[h,m]=S.useState(0),p=S.useRef("idle"),y=S.useRef(null),w=S.useRef(null),k=S.useRef([]),C=S.useRef("webm"),T=S.useRef("audio/webm"),E=S.useRef(!1),M=S.useRef({x:0,y:0}),A=S.useRef(0),L=S.useRef(!1),H=S.useRef(null),D=S.useRef(null),Y=S.useRef(null),W=S.useRef(e.onReady),X=S.useRef(e.onError),j=S.useRef(e.onActiveChange);W.current=e.onReady,X.current=e.onError,j.current=e.onActiveChange;const G=Z=>{p.current=Z,n(Z),j.current?.(Z==="recording"||Z==="locked"||Z==="arming")},$=()=>{D.current!=null&&cancelAnimationFrame(D.current),D.current=null,Y.current&&clearInterval(Y.current),Y.current=null,H.current?.close().catch(()=>{}),H.current=null,w.current?.getTracks().forEach(Z=>Z.stop()),w.current=null},fe=()=>{window.removeEventListener("pointermove",Ee),window.removeEventListener("pointerup",q),window.removeEventListener("pointercancel",q)},se=Z=>{E.current=Z;const de=y.current;de&&de.state!=="inactive"?de.stop():te(),fe()},te=()=>{$(),G("idle"),s(0),a([]),d(0),m(0)},xe=()=>{p.current==="recording"&&(fe(),m(0),G("locked"))};function Ee(Z){if(p.current!=="recording")return;const de=M.current.y-Z.clientY,ie=M.current.x-Z.clientX,Ce=Math.max(0,Math.min(1,de/my)),ge=Math.max(0,Math.min(1,ie/gy));d(Ce),m(ge),de>=my?xe():ie>=gy&&se(!0)}function q(){if(p.current==="arming"){L.current=!0,fe();return}if(p.current!=="recording")return;const Z=Date.now()-A.current<EA;se(Z)}const le=Z=>{e.disabled||p.current!=="idle"||(Z.preventDefault(),M.current={x:Z.clientX,y:Z.clientY},L.current=!1,E.current=!1,k.current=[],d(0),m(0),G("arming"),window.addEventListener("pointermove",Ee),window.addEventListener("pointerup",q),window.addEventListener("pointercancel",q),P())};async function P(){let Z;try{Z=await navigator.mediaDevices.getUserMedia({audio:bA})}catch{X.current("Microphone unavailable — check the browser permission."),fe(),G("idle");return}if(L.current||p.current==="idle"){Z.getTracks().forEach(Ce=>Ce.stop()),G("idle");return}w.current=Z;const de=sA.find(Ce=>typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported(Ce.rec));C.current=de?.ext??"webm",T.current=de?.base??"audio/webm";const ie=de?new MediaRecorder(Z,{mimeType:de.rec,audioBitsPerSecond:If}):new MediaRecorder(Z,{audioBitsPerSecond:If});y.current=ie,ie.ondataavailable=Ce=>{Ce.data.size>0&&k.current.push(Ce.data)},ie.onstop=()=>{if(E.current){te();return}const ge=new Blob(k.current,{type:T.current});Promise.all([ge.arrayBuffer(),fA(ge)]).then(([Te,je])=>{if(te(),Te.byteLength===0)return;const Ue=new Date().toISOString().replace(/[-:]/g,"").replace(/\..+/,"").replace("T","-");W.current({filename:`${_x}${Ue}.${C.current}`,mime:uA(PE(T.current),je),bytes:new Uint8Array(Te),voice:!0})})},ie.start(),A.current=Date.now(),G("recording"),s(0),Y.current=setInterval(()=>{s(Ce=>{const ge=Ce+1;return ge>=PA&&se(!1),ge})},1e3),_(Z)}function _(Z){try{const de=window.AudioContext||window.webkitAudioContext,ie=new de;H.current=ie;const Ce=ie.createMediaStreamSource(Z),ge=ie.createAnalyser();ge.fftSize=256,Ce.connect(ge);const Te=new Uint8Array(ge.fftSize),je=yA();let Ue=0;const kt=gt=>{if(D.current=requestAnimationFrame(kt),gt-Ue<80)return;Ue=gt,ge.getByteTimeDomainData(Te);let It=0;for(let it=0;it<Te.length;it++){const _t=(Te[it]-128)/128;It+=_t*_t}const Jt=Math.sqrt(It/Te.length),Ht=je.push(Jt);a(it=>{const _t=it.length>=RA?it.slice(1):it.slice();return _t.push(Ht),_t})};D.current=requestAnimationFrame(kt)}catch{}}S.useEffect(()=>()=>{E.current=!0,y.current?.stop(),fe(),$()},[]);const Q=t==="recording"||t==="locked"||t==="arming",R=v.jsx("div",{className:"vr-wave","aria-hidden":!0,children:l.map((Z,de)=>v.jsx("span",{className:"vr-bar",style:{height:`${Math.round(Z*100)}%`}},de))});return v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"icon-btn composer-tool vr-mic",title:"Hold to record a voice message",disabled:e.disabled,onPointerDown:le,onContextMenu:Z=>Z.preventDefault(),children:v.jsx(ve,{name:"mic",size:18})}),Q&&v.jsxs("div",{className:"voice-rec-overlay","data-mode":t,children:[t==="recording"&&v.jsxs("div",{className:"vr-lock",style:{"--p":c},"aria-hidden":!0,children:[v.jsx(ve,{name:"lock",size:13}),v.jsx(ve,{name:"chevronDown",size:12})]}),v.jsx("span",{className:"voice-rec-dot"}),v.jsx("span",{className:"vr-time mono",children:CA(i)}),t==="locked"?v.jsxs(v.Fragment,{children:[R,v.jsx("button",{className:"icon-btn vr-trash",title:"Cancel",onClick:()=>se(!0),children:v.jsx(ve,{name:"trash",size:16})}),v.jsxs("button",{className:"btn primary sm vr-stop",onClick:()=>se(!1),children:[v.jsx(ve,{name:"check",size:13}),"Stop"]})]}):v.jsxs("div",{className:"vr-slide",style:{opacity:1-h},children:[R,v.jsx("span",{className:"vr-hint",children:"‹ slide to cancel · slide up to lock"})]})]})]})}const AA="modulepreload",MA=function(e){return"/"+e},yy={},Wd=function(t,n,i){let s=Promise.resolve();if(n&&n.length>0){let a=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");s=a(n.map(h=>{if(h=MA(h),h in yy)return;yy[h]=!0;const m=h.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const y=document.createElement("link");if(y.rel=m?"stylesheet":AA,m||(y.as="script"),y.crossOrigin="",y.href=h,d&&y.setAttribute("nonce",d),document.head.appendChild(y),m)return new Promise((w,k)=>{y.addEventListener("load",w),y.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return s.then(a=>{for(const c of a||[])c.status==="rejected"&&l(c.reason);return t().catch(l)})};var NA=Object.defineProperty,Ji=(e,t)=>NA(e,"name",{value:t,configurable:!0}),Lw=!!(typeof window<"u"&&window.document&&window.document.createElement);function Rr(e,t,{checkForDefaultPrevented:n=!0}={}){return Ji(function(s){if(e?.(s),n===!1||!s||!s.defaultPrevented)return t?.(s)},"handleEvent")}Ji(Rr,"composeEventHandlers");function jA(e){if(!Lw)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}Ji(jA,"getOwnerWindow");function _f(e){if(!Lw)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}Ji(_f,"getOwnerDocument");function Ow(e,t=!1){const{activeElement:n}=_f(e);if(!n?.nodeName)return null;if(Fw(n)&&n.contentDocument)return Ow(n.contentDocument.body,t);if(t){const i=n.getAttribute("aria-activedescendant");if(i){const s=_f(n).getElementById(i);if(s)return s}}return n}Ji(Ow,"getActiveElement");function Fw(e){return e.tagName==="IFRAME"}Ji(Fw,"isFrame");var DA=Object.defineProperty,Kd=(e,t)=>DA(e,"name",{value:t,configurable:!0});function Lf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Kd(Lf,"setRef");function zw(...e){return t=>{let n=!1;const i=e.map(s=>{const l=Lf(s,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():Lf(e[s],null)}}}}Kd(zw,"composeRefs");function eo(...e){return S.useCallback(zw(...e),e)}Kd(eo,"useComposedRefs");var IA=Object.defineProperty,yn=(e,t)=>IA(e,"name",{value:t,configurable:!0});function _A(e,t){const n=S.createContext(t);n.displayName=e+"Context";const i=yn(l=>{const{children:a,...c}=l,d=S.useMemo(()=>c,Object.values(c));return v.jsx(n.Provider,{value:d,children:a})},"Provider");i.displayName=e+"Provider";function s(l,a={}){const{optional:c=!1}=a,d=S.useContext(n);if(d)return d;if(t!==void 0)return t;if(!c)throw new Error(`\`${l}\` must be used within \`${e}\``)}return yn(s,"useContext"),[i,s]}yn(_A,"createContext");function Vw(e,t=[]){let n=[];function i(l,a){const c=S.createContext(a);c.displayName=l+"Context";const d=n.length;n=[...n,a];const h=yn(p=>{const{scope:y,children:w,...k}=p,C=y?.[e]?.[d]||c,T=S.useMemo(()=>k,Object.values(k));return v.jsx(C.Provider,{value:T,children:w})},"Provider");h.displayName=l+"Provider";function m(p,y,w={}){const{optional:k=!1}=w,C=y?.[e]?.[d]||c,T=S.useContext(C);if(T)return T;if(a!==void 0)return a;if(!k)throw new Error(`\`${p}\` must be used within \`${l}\``)}return yn(m,"useContext"),[h,m]}yn(i,"createContext");const s=yn(()=>{const l=n.map(a=>S.createContext(a));return yn(function(c){const d=c?.[e]||l;return S.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])},"useScope")},"createScope");return s.scopeName=e,[i,Bw(s,...t)]}yn(Vw,"createContextScope");function Bw(...e){const t=e[0];if(e.length===1)return t;const n=yn(()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return yn(function(l){const a=i.reduce((c,{useScope:d,scopeName:h})=>{const p=d(l)[`__scope${h}`];return{...c,...p}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}yn(Bw,"composeContextScopes");var Mr=globalThis?.document?S.useLayoutEffect:()=>{},LA=Object.defineProperty,OA=(e,t)=>LA(e,"name",{value:t,configurable:!0}),FA=ks[" useId ".trim().toString()]||(()=>{}),zA=0;function nl(e){const[t,n]=S.useState(FA());return Mr(()=>{e||n(i=>i??String(zA++))},[e]),e||(t?`radix-${t}`:"")}OA(nl,"useId");var VA=Object.defineProperty,BA=(e,t)=>VA(e,"name",{value:t,configurable:!0}),vy=ks[" useEffectEvent ".trim().toString()],xy=ks[" useInsertionEffect ".trim().toString()];function $w(e){if(typeof vy=="function")return vy(e);const t=S.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof xy=="function"?xy(()=>{t.current=e}):Mr(()=>{t.current=e}),S.useMemo(()=>(...n)=>t.current?.(...n),[])}BA($w,"useEffectEvent");var $A=Object.defineProperty,Cs=(e,t)=>$A(e,"name",{value:t,configurable:!0}),UA=ks[" useInsertionEffect ".trim().toString()]||Mr;function Uw({prop:e,defaultProp:t,onChange:n=Cs(()=>{},"onChange"),caller:i}){const[s,l,a]=Hw({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:s,h=S.useCallback(m=>{if(c){const p=Ww(m)?m(e):m;p!==e&&a.current?.(p)}else l(m)},[c,e,l,a]);return[d,h]}Cs(Uw,"useControllableState");function Hw({defaultProp:e,onChange:t}){const[n,i]=S.useState(e),s=S.useRef(n),l=S.useRef(t);return UA(()=>{l.current=t},[t]),S.useEffect(()=>{s.current!==n&&(l.current?.(n),s.current=n)},[n,s]),[n,i,l]}Cs(Hw,"useUncontrolledState");function Ww(e){return typeof e=="function"}Cs(Ww,"isFunction");var wy=Symbol("RADIX:SYNC_STATE");function HA(e,t,n,i){const{prop:s,defaultProp:l,onChange:a,caller:c}=t,d=s!==void 0,h=$w(a),m=[{...n,state:l}];i&&m.push(i);const[p,y]=S.useReducer((T,E)=>{if(E.type===wy)return{...T,state:E.state};const M=e(T,E);return d&&!Object.is(M.state,T.state)&&h(M.state),M},...m),w=p.state,k=S.useRef(w);S.useEffect(()=>{k.current!==w&&(k.current=w,d||h(w))},[w,k,d]);const C=S.useMemo(()=>s!==void 0?{...p,state:s}:p,[p,s]);return S.useEffect(()=>{d&&!Object.is(s,p.state)&&y({type:wy,state:s})},[s,p.state,d]),[C,y]}Cs(HA,"useControllableStateReducer");var Kw=Tx(),WA=Object.defineProperty,jn=(e,t)=>WA(e,"name",{value:t,configurable:!0});function qd(e){const t=S.forwardRef((n,i)=>{let{children:s,...l}=n,a=null,c=!1;const d=[];Of(s)&&typeof Ba=="function"&&(s=Ba(s._payload)),S.Children.forEach(s,y=>{if(Gw(y)){c=!0;const w=y;let k="child"in w.props?w.props.child:w.props.children;Of(k)&&typeof Ba=="function"&&(k=Ba(k._payload)),a=qA(w,k),d.push(a?.props?.children)}else d.push(y)}),a?a=S.cloneElement(a,void 0,d):!c&&S.Children.count(s)===1&&S.isValidElement(s)&&(a=s);const h=a?Yw(a):void 0,m=eo(i,h);if(!a){if(s||s===0)throw new Error(c?GA(e):YA(e));return s}const p=Xw(l,a.props??{});return a.type!==S.Fragment&&(p.ref=i?m:h),S.cloneElement(a,p)});return t.displayName=`${e}.Slot`,t}jn(qd,"createSlot");var qw=Symbol.for("radix.slottable");function KA(e){const t=jn(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=qw,t}jn(KA,"createSlottable");var qA=jn((e,t)=>{if("child"in e.props){const n=e.props.child;return S.isValidElement(n)?S.cloneElement(n,void 0,e.props.children(n.props.children)):null}return S.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function Xw(e,t){const n={...t};for(const i in t){const s=e[i],l=t[i];/^on[A-Z]/.test(i)?s&&l?n[i]=(...c)=>{const d=l(...c);return s(...c),d}:s&&(n[i]=s):i==="style"?n[i]={...s,...l}:i==="className"&&(n[i]=[s,l].filter(Boolean).join(" "))}return{...e,...n}}jn(Xw,"mergeProps");function Yw(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)}jn(Yw,"getElementRef");function Gw(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qw}jn(Gw,"isSlottable");var XA=Symbol.for("react.lazy");function Of(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===XA&&"_payload"in e&&Qw(e._payload)}jn(Of,"isLazyComponent");function Qw(e){return typeof e=="object"&&e!==null&&"then"in e}jn(Qw,"isPromiseLike");var YA=jn(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),GA=jn(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Ba=ks[" use ".trim().toString()],QA=Object.defineProperty,ZA=(e,t)=>QA(e,"name",{value:t,configurable:!0}),JA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],li=JA.reduce((e,t)=>{const n=qd(`Primitive.${t}`),i=S.forwardRef((s,l)=>{const{asChild:a,...c}=s,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(d,{...c,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function Zw(e,t){e&&Kw.flushSync(()=>e.dispatchEvent(t))}ZA(Zw,"dispatchDiscreteCustomEvent");var eM=Object.defineProperty,tM=(e,t)=>eM(e,"name",{value:t,configurable:!0});function Yi(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>t.current?.(...n),[])}tM(Yi,"useCallbackRef");var nM=Object.defineProperty,wt=(e,t)=>nM(e,"name",{value:t,configurable:!0}),Ff="dismissableLayer.update",rM="dismissableLayer.pointerDownOutside",iM="dismissableLayer.focusOutside",ky,Jw=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),oM=S.forwardRef(wt(function(t,n){const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:s=!1,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:d,onDismiss:h,...m}=t,p=S.useContext(Jw),[y,w]=S.useState(null),k=y?.ownerDocument??globalThis?.document,[,C]=S.useState({}),T=eo(n,w),E=Array.from(p.layers),[M]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),A=M?E.indexOf(M):-1,L=y?E.indexOf(y):-1,H=p.layersWithOutsidePointerEventsDisabled.size>0,D=L>=A,Y=S.useRef(!1),W=t0($=>{a?.($),d?.($),$.defaultPrevented||h?.()},{ownerDocument:k,deferPointerDownOutside:s,isDeferredPointerDownOutsideRef:Y,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:S.useCallback($=>{if(!($ instanceof Node))return!1;const fe=[...p.branches].some(se=>se.contains($));return D&&!fe},[p.branches,D])}),X=n0($=>{if(s&&Y.current)return;const fe=$.target;[...p.branches].some(te=>te.contains(fe))||(c?.($),d?.($),$.defaultPrevented||h?.())},k),j=y?L===E.length-1:!1,G=Yi($=>{$.key==="Escape"&&(l?.($),!$.defaultPrevented&&h&&($.preventDefault(),h()))});return S.useEffect(()=>{if(j)return k.addEventListener("keydown",G,{capture:!0}),()=>k.removeEventListener("keydown",G,{capture:!0})},[k,j,G]),S.useEffect(()=>{if(y)return i&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(ky=k.body.style.pointerEvents,k.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(y)),p.layers.add(y),zf(),()=>{i&&(p.layersWithOutsidePointerEventsDisabled.delete(y),p.layersWithOutsidePointerEventsDisabled.size===0&&(k.body.style.pointerEvents=ky))}},[y,k,i,p]),S.useEffect(()=>()=>{y&&(p.layers.delete(y),p.layersWithOutsidePointerEventsDisabled.delete(y),zf())},[y,p]),S.useEffect(()=>{const $=wt(()=>C({}),"handleUpdate");return document.addEventListener(Ff,$),()=>document.removeEventListener(Ff,$)},[]),v.jsx(li.div,{...m,ref:T,style:{pointerEvents:H?D?"auto":"none":void 0,...t.style},onFocusCapture:Rr(t.onFocusCapture,X.onFocusCapture),onBlurCapture:Rr(t.onBlurCapture,X.onBlurCapture),onPointerDownCapture:Rr(t.onPointerDownCapture,W.onPointerDownCapture)})},"DismissableLayer"));function e0(){const e=S.useContext(Jw),[t,n]=S.useState(null);return S.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}wt(e0,"useDismissableLayerSurface");var sM=wt(()=>!0,"IS_TRUE");function t0(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:l,shouldHandlePointerDownOutside:a=sM}=t,c=Yi(e),d=S.useRef(!1),h=S.useRef(!1),m=S.useRef(new Map),p=S.useRef(()=>{});return S.useEffect(()=>{function y(){h.current=!1,s.current=!1,m.current.clear()}wt(y,"resetOutsideInteraction");function w(){return Array.from(m.current.values()).some(Boolean)}wt(w,"isOutsideInteractionIntercepted");function k(A){if(!h.current)return;const L=A.target;L instanceof Node&&[...l].some(D=>D.contains(L))||m.current.set(A.type,!0),A.type==="click"&&window.setTimeout(()=>{h.current&&p.current()},0)}wt(k,"handleInteractionCapture");function C(A){h.current&&m.current.set(A.type,!1)}wt(C,"handleInteractionBubble");const T=wt(A=>{if(A.target&&!d.current){let L=function(){n.removeEventListener("click",p.current);const D=w();y(),D||Xd(rM,c,H,{discrete:!0})};if(wt(L,"handleAndDispatchPointerDownOutsideEvent"),!a(A.target)){n.removeEventListener("click",p.current),y(),d.current=!1;return}const H={originalEvent:A};h.current=!0,s.current=i&&A.button===0,m.current.clear(),!i||A.button!==0?L():(n.removeEventListener("click",p.current),p.current=L,n.addEventListener("click",p.current,{once:!0}))}else n.removeEventListener("click",p.current),y();d.current=!1},"handlePointerDown"),E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const A of E)n.addEventListener(A,k,!0),n.addEventListener(A,C);const M=window.setTimeout(()=>{n.addEventListener("pointerdown",T)},0);return()=>{window.clearTimeout(M),n.removeEventListener("pointerdown",T),n.removeEventListener("click",p.current);for(const A of E)n.removeEventListener(A,k,!0),n.removeEventListener(A,C)}},[n,c,i,s,l,a]),{onPointerDownCapture:wt(()=>d.current=!0,"onPointerDownCapture")}}wt(t0,"usePointerDownOutside");function n0(e,t=globalThis?.document){const n=Yi(e),i=S.useRef(!1);return S.useEffect(()=>{const s=wt(l=>{l.target&&!i.current&&Xd(iM,n,{originalEvent:l},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:wt(()=>i.current=!0,"onFocusCapture"),onBlurCapture:wt(()=>i.current=!1,"onBlurCapture")}}wt(n0,"useFocusOutside");function zf(){const e=new CustomEvent(Ff);document.dispatchEvent(e)}wt(zf,"dispatchUpdate");function Xd(e,t,n,{discrete:i}){const s=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),i?Zw(s,l):s.dispatchEvent(l)}wt(Xd,"handleAndDispatchCustomEvent");var aM=Object.defineProperty,Bt=(e,t)=>aM(e,"name",{value:t,configurable:!0}),Vc="focusScope.autoFocusOnMount",Bc="focusScope.autoFocusOnUnmount",Sy={bubbles:!1,cancelable:!0},lM=S.forwardRef(Bt(function(t,n){const{loop:i=!1,trapped:s=!1,onMountAutoFocus:l,onUnmountAutoFocus:a,...c}=t,[d,h]=S.useState(null),m=Yi(l),p=Yi(a),y=S.useRef(null),w=eo(n,h),k=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(s){let T=function(L){if(k.paused||!d)return;const H=L.target;d.contains(H)?y.current=H:nr(y.current,{select:!0})},E=function(L){if(k.paused||!d)return;const H=L.relatedTarget;H!==null&&(d.contains(H)||nr(y.current,{select:!0}))},M=function(L){if(document.activeElement===document.body)for(const D of L)D.removedNodes.length>0&&nr(d)};Bt(T,"handleFocusIn"),Bt(E,"handleFocusOut"),Bt(M,"handleMutations"),document.addEventListener("focusin",T),document.addEventListener("focusout",E);const A=new MutationObserver(M);return d&&A.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",T),document.removeEventListener("focusout",E),A.disconnect()}}},[s,d,k.paused]),S.useEffect(()=>{if(d){by.add(k);const T=document.activeElement;if(!d.contains(T)){const M=new CustomEvent(Vc,Sy);d.addEventListener(Vc,m),d.dispatchEvent(M),M.defaultPrevented||(r0(l0(Yd(d)),{select:!0}),document.activeElement===T&&nr(d))}return()=>{d.removeEventListener(Vc,m),setTimeout(()=>{const M=new CustomEvent(Bc,Sy);d.addEventListener(Bc,p),d.dispatchEvent(M),M.defaultPrevented||nr(T??document.body,{select:!0}),d.removeEventListener(Bc,p),by.remove(k)},0)}}},[d,m,p,k]);const C=S.useCallback(T=>{if(!i&&!s||k.paused)return;const E=T.key==="Tab"&&!T.altKey&&!T.ctrlKey&&!T.metaKey,M=document.activeElement;if(E&&M){const A=T.currentTarget,[L,H]=i0(A);L&&H?!T.shiftKey&&M===H?(T.preventDefault(),i&&nr(L,{select:!0})):T.shiftKey&&M===L&&(T.preventDefault(),i&&nr(H,{select:!0})):M===A&&T.preventDefault()}},[i,s,k.paused]);return v.jsx(li.div,{tabIndex:-1,...c,ref:w,onKeyDown:C})},"FocusScope"));function r0(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(nr(i,{select:t}),document.activeElement!==n)return}Bt(r0,"focusFirst");function i0(e){const t=Yd(e),n=Vf(t,e),i=Vf(t.reverse(),e);return[n,i]}Bt(i0,"getTabbableEdges");function Yd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Bt(i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}Bt(Yd,"getTabbableCandidates");function Vf(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const i of e)if(!(n?!i.checkVisibility({checkVisibilityCSS:!0}):o0(i,{upTo:t})))return i}Bt(Vf,"findVisible");function o0(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}Bt(o0,"isHidden");function s0(e){return e instanceof HTMLInputElement&&"select"in e}Bt(s0,"isSelectableInput");function nr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&s0(e)&&t&&e.select()}}Bt(nr,"focus");var by=a0();function a0(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Bf(e,t),e.unshift(t)},remove(t){e=Bf(e,t),e[0]?.resume()}}}Bt(a0,"createFocusScopesStack");function Bf(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}Bt(Bf,"arrayRemove");function l0(e){return e.filter(t=>t.tagName!=="A")}Bt(l0,"removeLinks");var uM=Object.defineProperty,cM=(e,t)=>uM(e,"name",{value:t,configurable:!0}),fM=S.forwardRef(cM(function(t,n){const{container:i,...s}=t,[l,a]=S.useState(!1);Mr(()=>a(!0),[]);const c=i||l&&globalThis?.document?.body;return c?Kw.createPortal(v.jsx(li.div,{...s,ref:n}),c):null},"Portal")),dM=Object.defineProperty,rr=(e,t)=>dM(e,"name",{value:t,configurable:!0});function u0(e,t){return S.useReducer((n,i)=>t[n][i]??n,e)}rr(u0,"useStateMachine");var Gd=rr(e=>{const{present:t,children:n}=e,i=c0(t),s=typeof n=="function"?n({present:i.isPresent}):S.Children.only(n),l=f0(i.ref,d0(s));return typeof n=="function"||i.isPresent?S.cloneElement(s,{ref:l}):null},"Presence");function c0(e){const[t,n]=S.useState(),i=S.useRef(null),s=S.useRef(e),l=S.useRef("none"),a=S.useRef(void 0),c=e?"mounted":"unmounted",[d,h]=u0(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{d==="mounted"?(l.current=a.current??Bi(i.current),a.current=void 0):l.current="none"},[d]),Mr(()=>{const m=i.current,p=s.current;if(p!==e){const w=l.current,k=Bi(m);e?(a.current=k,h("MOUNT")):k==="none"||m?.display==="none"?h("UNMOUNT"):h(p&&w!==k?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,h]),Mr(()=>{if(t){let m;const p=t.ownerDocument.defaultView??window,y=rr(k=>{const T=Bi(i.current).includes(CSS.escape(k.animationName));if(k.target===t&&T&&(h("ANIMATION_END"),!s.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",m=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},"handleAnimationEnd"),w=rr(k=>{k.target===t&&(l.current=Bi(i.current))},"handleAnimationStart");return t.addEventListener("animationstart",w),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{p.clearTimeout(m),t.removeEventListener("animationstart",w),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:S.useCallback(m=>{if(m){const p=getComputedStyle(m);i.current=p,a.current=Bi(p)}else i.current=null;n(m)},[])}}rr(c0,"usePresence");function $f(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}rr($f,"setRef");function f0(...e){const t=S.useRef(e);return t.current=e,S.useCallback(n=>{const i=t.current;let s=!1;const l=i.map(a=>{const c=$f(a,n);return!s&&typeof c=="function"&&(s=!0),c});if(s)return()=>{for(let a=0;a<l.length;a++){const c=l[a];typeof c=="function"?c():$f(i[a],null)}}},[])}rr(f0,"useStableComposedRefs");function Bi(e){return e?.animationName||"none"}rr(Bi,"getAnimationName");function d0(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)}rr(d0,"getElementRef");var hM=Object.defineProperty,Qd=(e,t)=>hM(e,"name",{value:t,configurable:!0}),$a=0,_i=null;function pM(e){return Zd(),e.children}Qd(pM,"FocusGuards");function Zd(){S.useEffect(()=>{_i||(_i={start:Uf(),end:Uf()});const{start:e,end:t}=_i;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),$a++,()=>{$a===1&&(_i?.start.remove(),_i?.end.remove(),_i=null),$a=Math.max(0,$a-1)}},[])}Qd(Zd,"useFocusGuards");function Uf(){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}Qd(Uf,"createFocusGuard");var $n=function(){return $n=Object.assign||function(t){for(var n,i=1,s=arguments.length;i<s;i++){n=arguments[i];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},$n.apply(this,arguments)};function h0(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]]);return n}function mM(e,t,n){if(n||arguments.length===2)for(var i=0,s=t.length,l;i<s;i++)(l||!(i in t))&&(l||(l=Array.prototype.slice.call(t,0,i)),l[i]=t[i]);return e.concat(l||Array.prototype.slice.call(t))}var rl="right-scroll-bar-position",il="width-before-scroll-bar",gM="with-scroll-bars-hidden",yM="--removed-body-scroll-bar-size";function $c(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vM(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var s=n.value;s!==i&&(n.value=i,n.callback(i,s))}}}})[0];return n.callback=t,n.facade}var xM=typeof window<"u"?S.useLayoutEffect:S.useEffect,Cy=new WeakMap;function wM(e,t){var n=vM(null,function(i){return e.forEach(function(s){return $c(s,i)})});return xM(function(){var i=Cy.get(n);if(i){var s=new Set(i),l=new Set(e),a=n.current;s.forEach(function(c){l.has(c)||$c(c,null)}),l.forEach(function(c){s.has(c)||$c(c,a)})}Cy.set(n,e)},[e]),n}function kM(e){return e}function SM(e,t){t===void 0&&(t=kM);var n=[],i=!1,s={read:function(){if(i)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(l){var a=t(l,i);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(l){for(i=!0;n.length;){var a=n;n=[],a.forEach(l)}n={push:function(c){return l(c)},filter:function(){return n}}},assignMedium:function(l){i=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(l),a=n}var d=function(){var m=a;a=[],m.forEach(l)},h=function(){return Promise.resolve().then(d)};h(),n={push:function(m){a.push(m),h()},filter:function(m){return a=a.filter(m),n}}}};return s}function bM(e){e===void 0&&(e={});var t=SM(null);return t.options=$n({async:!0,ssr:!1},e),t}var p0=function(e){var t=e.sideCar,n=h0(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return S.createElement(i,$n({},n))};p0.isSideCarExport=!0;function CM(e,t){return e.useMedium(t),p0}var m0=bM(),Uc=function(){},Ol=S.forwardRef(function(e,t){var n=S.useRef(null),i=S.useState({onScrollCapture:Uc,onWheelCapture:Uc,onTouchMoveCapture:Uc}),s=i[0],l=i[1],a=e.forwardProps,c=e.children,d=e.className,h=e.removeScrollBar,m=e.enabled,p=e.shards,y=e.sideCar,w=e.noRelative,k=e.noIsolation,C=e.inert,T=e.allowPinchZoom,E=e.as,M=E===void 0?"div":E,A=e.gapMode,L=h0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),H=y,D=wM([n,t]),Y=$n($n({},L),s);return S.createElement(S.Fragment,null,m&&S.createElement(H,{sideCar:m0,removeScrollBar:h,shards:p,noRelative:w,noIsolation:k,inert:C,setCallbacks:l,allowPinchZoom:!!T,lockRef:n,gapMode:A}),a?S.cloneElement(S.Children.only(c),$n($n({},Y),{ref:D})):S.createElement(M,$n({},Y,{className:d,ref:D}),c))});Ol.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ol.classNames={fullWidth:il,zeroRight:rl};var EM=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function TM(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=EM();return t&&e.setAttribute("nonce",t),e}function PM(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function RM(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var AM=function(){var e=0,t=null;return{add:function(n){e==0&&(t=TM())&&(PM(t,n),RM(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},MM=function(){var e=AM();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},g0=function(){var e=MM(),t=function(n){var i=n.styles,s=n.dynamic;return e(i,s),null};return t},NM={left:0,top:0,right:0,gap:0},Hc=function(e){return parseInt(e||"",10)||0},jM=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Hc(n),Hc(i),Hc(s)]},DM=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return NM;var t=jM(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},IM=g0(),Ki="data-scroll-locked",_M=function(e,t,n,i){var s=e.left,l=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
261
|
+
.`.concat(gM,` {
|
|
262
|
+
overflow: hidden `).concat(i,`;
|
|
263
|
+
padding-right: `).concat(c,"px ").concat(i,`;
|
|
264
|
+
}
|
|
265
|
+
body[`).concat(Ki,`] {
|
|
266
|
+
overflow: hidden `).concat(i,`;
|
|
267
|
+
overscroll-behavior: contain;
|
|
268
|
+
`).concat([t&&"position: relative ".concat(i,";"),n==="margin"&&`
|
|
269
|
+
padding-left: `.concat(s,`px;
|
|
270
|
+
padding-top: `).concat(l,`px;
|
|
271
|
+
padding-right: `).concat(a,`px;
|
|
272
|
+
margin-left:0;
|
|
273
|
+
margin-top:0;
|
|
274
|
+
margin-right: `).concat(c,"px ").concat(i,`;
|
|
275
|
+
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.`).concat(rl,` {
|
|
279
|
+
right: `).concat(c,"px ").concat(i,`;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.`).concat(il,` {
|
|
283
|
+
margin-right: `).concat(c,"px ").concat(i,`;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.`).concat(rl," .").concat(rl,` {
|
|
287
|
+
right: 0 `).concat(i,`;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.`).concat(il," .").concat(il,` {
|
|
291
|
+
margin-right: 0 `).concat(i,`;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
body[`).concat(Ki,`] {
|
|
295
|
+
`).concat(yM,": ").concat(c,`px;
|
|
296
|
+
}
|
|
297
|
+
`)},Ey=function(){var e=parseInt(document.body.getAttribute(Ki)||"0",10);return isFinite(e)?e:0},LM=function(){S.useEffect(function(){return document.body.setAttribute(Ki,(Ey()+1).toString()),function(){var e=Ey()-1;e<=0?document.body.removeAttribute(Ki):document.body.setAttribute(Ki,e.toString())}},[])},OM=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;LM();var l=S.useMemo(function(){return DM(s)},[s]);return S.createElement(IM,{styles:_M(l,!t,s,n?"":"!important")})},Hf=!1;if(typeof window<"u")try{var Ua=Object.defineProperty({},"passive",{get:function(){return Hf=!0,!0}});window.addEventListener("test",Ua,Ua),window.removeEventListener("test",Ua,Ua)}catch{Hf=!1}var Li=Hf?{passive:!1}:!1,FM=function(e){return e.tagName==="TEXTAREA"},y0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!FM(e)&&n[t]==="visible")},zM=function(e){return y0(e,"overflowY")},VM=function(e){return y0(e,"overflowX")},Ty=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=v0(e,i);if(s){var l=x0(e,i),a=l[1],c=l[2];if(a>c)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},BM=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},$M=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},v0=function(e,t){return e==="v"?zM(t):VM(t)},x0=function(e,t){return e==="v"?BM(t):$M(t)},UM=function(e,t){return e==="h"&&t==="rtl"?-1:1},HM=function(e,t,n,i,s){var l=UM(e,window.getComputedStyle(t).direction),a=l*i,c=n.target,d=t.contains(c),h=!1,m=a>0,p=0,y=0;do{if(!c)break;var w=x0(e,c),k=w[0],C=w[1],T=w[2],E=C-T-l*k;(k||E)&&v0(e,c)&&(p+=E,y+=k);var M=c.parentNode;c=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(m&&Math.abs(p)<1||!m&&Math.abs(y)<1)&&(h=!0),h},Ha=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Py=function(e){return[e.deltaX,e.deltaY]},Ry=function(e){return e&&"current"in e?e.current:e},WM=function(e,t){return e[0]===t[0]&&e[1]===t[1]},KM=function(e){return`
|
|
298
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
299
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
300
|
+
`)},qM=0,Oi=[];function XM(e){var t=S.useRef([]),n=S.useRef([0,0]),i=S.useRef(),s=S.useState(qM++)[0],l=S.useState(g0)[0],a=S.useRef(e);S.useEffect(function(){a.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var C=mM([e.lockRef.current],(e.shards||[]).map(Ry),!0).filter(Boolean);return C.forEach(function(T){return T.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),C.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var c=S.useCallback(function(C,T){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!a.current.allowPinchZoom;var E=Ha(C),M=n.current,A="deltaX"in C?C.deltaX:M[0]-E[0],L="deltaY"in C?C.deltaY:M[1]-E[1],H,D=C.target,Y=Math.abs(A)>Math.abs(L)?"h":"v";if("touches"in C&&Y==="h"&&D.type==="range")return!1;var W=window.getSelection(),X=W&&W.anchorNode,j=X?X===D||X.contains(D):!1;if(j)return!1;var G=Ty(Y,D);if(!G)return!0;if(G?H=Y:(H=Y==="v"?"h":"v",G=Ty(Y,D)),!G)return!1;if(!i.current&&"changedTouches"in C&&(A||L)&&(i.current=H),!H)return!0;var $=i.current||H;return HM($,T,C,$==="h"?A:L)},[]),d=S.useCallback(function(C){var T=C;if(!(!Oi.length||Oi[Oi.length-1]!==l)){var E="deltaY"in T?Py(T):Ha(T),M=t.current.filter(function(H){return H.name===T.type&&(H.target===T.target||T.target===H.shadowParent)&&WM(H.delta,E)})[0];if(M&&M.should){T.cancelable&&T.preventDefault();return}if(!M){var A=(a.current.shards||[]).map(Ry).filter(Boolean).filter(function(H){return H.contains(T.target)}),L=A.length>0?c(T,A[0]):!a.current.noIsolation;L&&T.cancelable&&T.preventDefault()}}},[]),h=S.useCallback(function(C,T,E,M){var A={name:C,delta:T,target:E,should:M,shadowParent:YM(E)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(L){return L!==A})},1)},[]),m=S.useCallback(function(C){n.current=Ha(C),i.current=void 0},[]),p=S.useCallback(function(C){h(C.type,Py(C),C.target,c(C,e.lockRef.current))},[]),y=S.useCallback(function(C){h(C.type,Ha(C),C.target,c(C,e.lockRef.current))},[]);S.useEffect(function(){return Oi.push(l),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:y}),document.addEventListener("wheel",d,Li),document.addEventListener("touchmove",d,Li),document.addEventListener("touchstart",m,Li),function(){Oi=Oi.filter(function(C){return C!==l}),document.removeEventListener("wheel",d,Li),document.removeEventListener("touchmove",d,Li),document.removeEventListener("touchstart",m,Li)}},[]);var w=e.removeScrollBar,k=e.inert;return S.createElement(S.Fragment,null,k?S.createElement(l,{styles:KM(s)}):null,w?S.createElement(OM,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function YM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const GM=CM(m0,XM);var w0=S.forwardRef(function(e,t){return S.createElement(Ol,$n({},e,{ref:t,sideCar:GM}))});w0.classNames=Ol.classNames;var QM=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Fi=new WeakMap,Wa=new WeakMap,Ka={},Wc=0,k0=function(e){return e&&(e.host||k0(e.parentNode))},ZM=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=k0(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},JM=function(e,t,n,i){var s=ZM(t,Array.isArray(e)?e:[e]);Ka[n]||(Ka[n]=new WeakMap);var l=Ka[n],a=[],c=new Set,d=new Set(s),h=function(p){!p||c.has(p)||(c.add(p),h(p.parentNode))};s.forEach(h);var m=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(y){if(c.has(y))m(y);else try{var w=y.getAttribute(i),k=w!==null&&w!=="false",C=(Fi.get(y)||0)+1,T=(l.get(y)||0)+1;Fi.set(y,C),l.set(y,T),a.push(y),C===1&&k&&Wa.set(y,!0),T===1&&y.setAttribute(n,"true"),k||y.setAttribute(i,"true")}catch(E){console.error("aria-hidden: cannot operate on ",y,E)}})};return m(t),c.clear(),Wc++,function(){a.forEach(function(p){var y=Fi.get(p)-1,w=l.get(p)-1;Fi.set(p,y),l.set(p,w),y||(Wa.has(p)||p.removeAttribute(i),Wa.delete(p)),w||p.removeAttribute(n)}),Wc--,Wc||(Fi=new WeakMap,Fi=new WeakMap,Wa=new WeakMap,Ka={})}},eN=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),s=QM(e);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),JM(i,s,n,"aria-hidden")):function(){return null}},tN=Object.defineProperty,wn=(e,t)=>tN(e,"name",{value:t,configurable:!0}),Jd="Dialog",[S0,Ez]=Vw(Jd),[nN,Kn]=S0(Jd),b0=wn(e=>{const{__scopeDialog:t,children:n,open:i,defaultOpen:s,onOpenChange:l,modal:a=!0}=e,c=S.useRef(null),d=S.useRef(null),[h,m]=Uw({prop:i,defaultProp:s??!1,onChange:l,caller:Jd}),[p,y]=S.useState(0),[w,k]=S.useState(0);return v.jsx(nN,{scope:t,triggerRef:c,contentRef:d,contentId:nl(),titleId:nl(),descriptionId:nl(),titlePresent:p>0,descriptionPresent:w>0,setTitleCount:y,setDescriptionCount:k,open:h,onOpenChange:m,onOpenToggle:S.useCallback(()=>m(C=>!C),[m]),modal:a,children:n})},"Dialog"),C0="DialogPortal",[rN,E0]=S0(C0,{forceMount:void 0}),T0=wn(e=>{const{__scopeDialog:t,forceMount:n,children:i,container:s}=e,l=Kn(C0,t);return v.jsx(rN,{scope:t,forceMount:n,children:S.Children.map(i,a=>v.jsx(Gd,{present:n||l.open,children:v.jsx(fM,{asChild:!0,container:s,children:a})}))})},"DialogPortal"),Wf="DialogOverlay",P0=S.forwardRef(wn(function(t,n){const i=E0(Wf,t.__scopeDialog),{forceMount:s=i.forceMount,...l}=t,a=Kn(Wf,t.__scopeDialog);return a.modal?v.jsx(Gd,{present:s||a.open,children:v.jsx(oN,{...l,ref:n})}):null},"DialogOverlay")),iN=qd("DialogOverlay.RemoveScroll"),oN=S.forwardRef(wn(function(t,n){const{__scopeDialog:i,...s}=t,l=Kn(Wf,i),a=e0(),c=eo(n,a);return v.jsx(w0,{as:iN,allowPinchZoom:!0,shards:[l.contentRef],children:v.jsx(li.div,{"data-state":eh(l.open),...s,ref:c,style:{pointerEvents:"auto",...s.style}})})},"DialogOverlayImpl")),ps="DialogContent",R0=S.forwardRef(wn(function(t,n){const i=E0(ps,t.__scopeDialog),{forceMount:s=i.forceMount,...l}=t,a=Kn(ps,t.__scopeDialog);return v.jsx(Gd,{present:s||a.open,children:a.modal?v.jsx(sN,{...l,ref:n}):v.jsx(aN,{...l,ref:n})})},"DialogContent")),sN=S.forwardRef(wn(function(t,n){const i=Kn(ps,t.__scopeDialog),s=S.useRef(null),l=eo(n,i.contentRef,s);return S.useEffect(()=>{const a=s.current;if(a)return eN(a)},[]),v.jsx(A0,{...t,ref:l,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:Rr(t.onCloseAutoFocus,a=>{a.preventDefault(),i.triggerRef.current?.focus()}),onPointerDownOutside:Rr(t.onPointerDownOutside,a=>{const c=a.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&a.preventDefault()}),onFocusOutside:Rr(t.onFocusOutside,a=>a.preventDefault())})},"DialogContentModal")),aN=S.forwardRef(wn(function(t,n){const i=Kn(ps,t.__scopeDialog),s=S.useRef(!1),l=S.useRef(!1);return v.jsx(A0,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),a.defaultPrevented||(s.current||i.triggerRef.current?.focus(),a.preventDefault()),s.current=!1,l.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),a.defaultPrevented||(s.current=!0,a.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const c=a.target;i.triggerRef.current?.contains(c)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&l.current&&a.preventDefault()}})},"DialogContentNonModal")),A0=S.forwardRef(wn(function(t,n){const{__scopeDialog:i,trapFocus:s,onOpenAutoFocus:l,onCloseAutoFocus:a,...c}=t,d=Kn(ps,i);return Zd(),v.jsx(v.Fragment,{children:v.jsx(lM,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:l,onUnmountAutoFocus:a,children:v.jsx(oM,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionPresent?d.descriptionId:void 0,"aria-labelledby":d.titlePresent?d.titleId:void 0,"data-state":eh(d.open),...c,ref:n,deferPointerDownOutside:!0,onDismiss:()=>d.onOpenChange(!1)})})})},"DialogContentImpl")),lN="DialogTitle",M0=S.forwardRef(wn(function(t,n){const{__scopeDialog:i,...s}=t,l=Kn(lN,i),{setTitleCount:a}=l;return Mr(()=>(a(c=>c+1),()=>a(c=>c-1)),[a]),v.jsx(li.h2,{id:l.titleId,...s,ref:n})},"DialogTitle")),uN="DialogDescription",N0=S.forwardRef(wn(function(t,n){const{__scopeDialog:i,...s}=t,l=Kn(uN,i),{setDescriptionCount:a}=l;return Mr(()=>(a(c=>c+1),()=>a(c=>c-1)),[a]),v.jsx(li.p,{id:l.descriptionId,...s,ref:n})},"DialogDescription")),cN="DialogClose",j0=S.forwardRef(wn(function(t,n){const{__scopeDialog:i,...s}=t,l=Kn(cN,i);return v.jsx(li.button,{type:"button",...s,ref:n,onClick:Rr(t.onClick,()=>l.onOpenChange(!1))})},"DialogClose"));function eh(e){return e?"open":"closed"}wn(eh,"getState");function fN(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const dN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pN={};function Ay(e,t){return(pN.jsx?hN:dN).test(e)}const mN=/[ \t\n\f\r]/g;function gN(e){return typeof e=="object"?e.type==="text"?My(e.value):!1:My(e)}function My(e){return e.replace(mN,"")===""}class Es{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}Es.prototype.normal={};Es.prototype.property={};Es.prototype.space=void 0;function D0(e,t){const n={},i={};for(const s of e)Object.assign(n,s.property),Object.assign(i,s.normal);return new Es(n,i,t)}function Kf(e){return e.toLowerCase()}class Zt{constructor(t,n){this.attribute=n,this.property=t}}Zt.prototype.attribute="";Zt.prototype.booleanish=!1;Zt.prototype.boolean=!1;Zt.prototype.commaOrSpaceSeparated=!1;Zt.prototype.commaSeparated=!1;Zt.prototype.defined=!1;Zt.prototype.mustUseProperty=!1;Zt.prototype.number=!1;Zt.prototype.overloadedBoolean=!1;Zt.prototype.property="";Zt.prototype.spaceSeparated=!1;Zt.prototype.space=void 0;let yN=0;const De=ui(),ft=ui(),qf=ui(),ue=ui(),Ke=ui(),ii=ui(),on=ui();function ui(){return 2**++yN}const Xf=Object.freeze(Object.defineProperty({__proto__:null,boolean:De,booleanish:ft,commaOrSpaceSeparated:on,commaSeparated:ii,number:ue,overloadedBoolean:qf,spaceSeparated:Ke},Symbol.toStringTag,{value:"Module"})),Kc=Object.keys(Xf);class th extends Zt{constructor(t,n,i,s){let l=-1;if(super(t,n),Ny(this,"space",s),typeof i=="number")for(;++l<Kc.length;){const a=Kc[l];Ny(this,Kc[l],(i&Xf[a])===Xf[a])}}}th.prototype.defined=!0;function Ny(e,t,n){n&&(e[t]=n)}function to(e){const t={},n={};for(const[i,s]of Object.entries(e.properties)){const l=new th(i,e.transform(e.attributes||{},i),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),t[i]=l,n[Kf(i)]=i,n[Kf(l.attribute)]=i}return new Es(t,n,e.space)}const I0=to({properties:{ariaActiveDescendant:null,ariaAtomic:ft,ariaAutoComplete:null,ariaBusy:ft,ariaChecked:ft,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:Ke,ariaCurrent:null,ariaDescribedBy:Ke,ariaDetails:null,ariaDisabled:ft,ariaDropEffect:Ke,ariaErrorMessage:null,ariaExpanded:ft,ariaFlowTo:Ke,ariaGrabbed:ft,ariaHasPopup:null,ariaHidden:ft,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ke,ariaLevel:ue,ariaLive:null,ariaModal:ft,ariaMultiLine:ft,ariaMultiSelectable:ft,ariaOrientation:null,ariaOwns:Ke,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:ft,ariaReadOnly:ft,ariaRelevant:null,ariaRequired:ft,ariaRoleDescription:Ke,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:ft,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function _0(e,t){return t in e?e[t]:t}function L0(e,t){return _0(e,t.toLowerCase())}const vN=to({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ii,acceptCharset:Ke,accessKey:Ke,action:null,allow:null,allowFullScreen:De,allowPaymentRequest:De,allowUserMedia:De,alpha:De,alt:null,as:null,async:De,autoCapitalize:null,autoComplete:Ke,autoFocus:De,autoPlay:De,blocking:Ke,capture:null,charSet:null,checked:De,cite:null,className:Ke,closedBy:null,colorSpace:null,cols:ue,colSpan:ue,command:null,commandFor:null,content:null,contentEditable:ft,controls:De,controlsList:Ke,coords:ue|ii,crossOrigin:null,data:null,dateTime:null,decoding:null,default:De,defer:De,dir:null,dirName:null,disabled:De,download:qf,draggable:ft,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:De,formTarget:null,headers:Ke,height:ue,hidden:qf,high:ue,href:null,hrefLang:null,htmlFor:Ke,httpEquiv:Ke,id:null,imageSizes:null,imageSrcSet:null,inert:De,inputMode:null,integrity:null,is:null,isMap:De,itemId:null,itemProp:Ke,itemRef:Ke,itemScope:De,itemType:Ke,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:De,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:De,muted:De,name:null,nonce:null,noModule:De,noValidate:De,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:De,optimum:ue,pattern:null,ping:Ke,placeholder:null,playsInline:De,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:De,referrerPolicy:null,rel:Ke,required:De,reversed:De,rows:ue,rowSpan:ue,sandbox:Ke,scope:null,scoped:De,seamless:De,selected:De,shadowRootClonable:De,shadowRootCustomElementRegistry:De,shadowRootDelegatesFocus:De,shadowRootMode:null,shadowRootSerializable:De,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:ft,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:De,useMap:null,value:ft,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ke,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:De,declare:De,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:De,noHref:De,noShade:De,noWrap:De,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:ft,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:De,disablePictureInPicture:De,disableRemotePlayback:De,exportParts:ii,part:Ke,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:L0}),xN=to({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:on,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:Ke,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:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:De,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,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:ii,g2:ii,glyphName:ii,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:on,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,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:ue,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:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ke,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:on,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:on,rev:on,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:on,requiredFeatures:on,requiredFonts:on,requiredFormats:on,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:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:on,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:on,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:on,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:_0}),O0=to({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()}}),F0=to({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:L0}),z0=to({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),wN={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"},kN=/[A-Z]/g,jy=/-[a-z]/g,SN=/^data[-\w.:]+$/i;function bN(e,t){const n=Kf(t);let i=t,s=Zt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&SN.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(jy,EN);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!jy.test(l)){let a=l.replace(kN,CN);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}s=th}return new s(i,t)}function CN(e){return"-"+e.toLowerCase()}function EN(e){return e.charAt(1).toUpperCase()}const TN=D0([I0,vN,O0,F0,z0],"html"),nh=D0([I0,xN,O0,F0,z0],"svg");function PN(e){return e.join(" ").trim()}var zi={},qc,Dy;function RN(){if(Dy)return qc;Dy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
301
|
+
`,h="/",m="*",p="",y="comment",w="declaration";function k(T,E){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];E=E||{};var M=1,A=1;function L(se){var te=se.match(t);te&&(M+=te.length);var xe=se.lastIndexOf(d);A=~xe?se.length-xe:A+se.length}function H(){var se={line:M,column:A};return function(te){return te.position=new D(se),X(),te}}function D(se){this.start=se,this.end={line:M,column:A},this.source=E.source}D.prototype.content=T;function Y(se){var te=new Error(E.source+":"+M+":"+A+": "+se);if(te.reason=se,te.filename=E.source,te.line=M,te.column=A,te.source=T,!E.silent)throw te}function W(se){var te=se.exec(T);if(te){var xe=te[0];return L(xe),T=T.slice(xe.length),te}}function X(){W(n)}function j(se){var te;for(se=se||[];te=G();)te!==!1&&se.push(te);return se}function G(){var se=H();if(!(h!=T.charAt(0)||m!=T.charAt(1))){for(var te=2;p!=T.charAt(te)&&(m!=T.charAt(te)||h!=T.charAt(te+1));)++te;if(te+=2,p===T.charAt(te-1))return Y("End of comment missing");var xe=T.slice(2,te-2);return A+=2,L(xe),T=T.slice(te),A+=2,se({type:y,comment:xe})}}function $(){var se=H(),te=W(i);if(te){if(G(),!W(s))return Y("property missing ':'");var xe=W(l),Ee=se({type:w,property:C(te[0].replace(e,p)),value:xe?C(xe[0].replace(e,p)):p});return W(a),Ee}}function fe(){var se=[];j(se);for(var te;te=$();)te!==!1&&(se.push(te),j(se));return se}return X(),fe()}function C(T){return T?T.replace(c,p):p}return qc=k,qc}var Iy;function AN(){if(Iy)return zi;Iy=1;var e=zi&&zi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(zi,"__esModule",{value:!0}),zi.default=n;const t=e(RN());function n(i,s){let l=null;if(!i||typeof i!="string")return l;const a=(0,t.default)(i),c=typeof s=="function";return a.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:m}=d;c?s(h,m,d):m&&(l=l||{},l[h]=m)}),l}return zi}var qo={},_y;function MN(){if(_y)return qo;_y=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(h){return!h||n.test(h)||e.test(h)},a=function(h,m){return m.toUpperCase()},c=function(h,m){return"".concat(m,"-")},d=function(h,m){return m===void 0&&(m={}),l(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(s,c):h=h.replace(i,c),h.replace(t,a))};return qo.camelCase=d,qo}var Xo,Ly;function NN(){if(Ly)return Xo;Ly=1;var e=Xo&&Xo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(AN()),n=MN();function i(s,l){var a={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(a[(0,n.camelCase)(c,l)]=d)}),a}return i.default=i,Xo=i,Xo}var jN=NN();const DN=Td(jN),V0=B0("end"),rh=B0("start");function B0(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function IN(e){const t=rh(e),n=V0(e);if(t&&n)return{start:t,end:n}}class Dt extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let s="",l={},a=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?s=t:!l.cause&&t&&(a=!0,s=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof i=="string"){const d=i.indexOf(":");d===-1?l.ruleId=i:(l.source=i.slice(0,d),l.ruleId=i.slice(d+1))}if(!l.place&&l.ancestors&&l.ancestors){const d=l.ancestors[l.ancestors.length-1];d&&(l.place=d.position)}const c=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=c?c.line:void 0,this.name=ts(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=a&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Dt.prototype.file="";Dt.prototype.name="";Dt.prototype.reason="";Dt.prototype.message="";Dt.prototype.stack="";Dt.prototype.column=void 0;Dt.prototype.line=void 0;Dt.prototype.ancestors=void 0;Dt.prototype.cause=void 0;Dt.prototype.fatal=void 0;Dt.prototype.place=void 0;Dt.prototype.ruleId=void 0;Dt.prototype.source=void 0;const ih={}.hasOwnProperty,_N=new Map,LN=/[A-Z]/g,ON=new Set(["table","tbody","thead","tfoot","tr"]),FN=new Set(["td","th"]),$0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function zN(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=qN(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");i=KN(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,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"?nh:TN,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=U0(s,e,void 0);return l&&typeof l!="string"?l:s.create(e,s.Fragment,{children:l||void 0},void 0)}function U0(e,t,n){if(t.type==="element")return VN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return BN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return UN(e,t,n);if(t.type==="mdxjsEsm")return $N(e,t);if(t.type==="root")return HN(e,t,n);if(t.type==="text")return WN(e,t)}function VN(e,t,n){const i=e.schema;let s=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=nh,e.schema=s),e.ancestors.push(t);const l=W0(e,t.tagName,!1),a=XN(e,t);let c=sh(e,t);return ON.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!gN(d):!0})),H0(e,a,l,t),oh(a,c),e.ancestors.pop(),e.schema=i,e.create(t,l,a,n)}function BN(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}ms(e,t.position)}function $N(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ms(e,t.position)}function UN(e,t,n){const i=e.schema;let s=i;t.name==="svg"&&i.space==="html"&&(s=nh,e.schema=s),e.ancestors.push(t);const l=t.name===null?e.Fragment:W0(e,t.name,!0),a=YN(e,t),c=sh(e,t);return H0(e,a,l,t),oh(a,c),e.ancestors.pop(),e.schema=i,e.create(t,l,a,n)}function HN(e,t,n){const i={};return oh(i,sh(e,t)),e.create(t,e.Fragment,i,n)}function WN(e,t){return t.value}function H0(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function oh(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function KN(e,t,n){return i;function i(s,l,a,c){const h=Array.isArray(a.children)?n:t;return c?h(l,a,c):h(l,a)}}function qN(e,t){return n;function n(i,s,l,a){const c=Array.isArray(l.children),d=rh(i);return t(s,l,a,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function XN(e,t){const n={};let i,s;for(s in t.properties)if(s!=="children"&&ih.call(t.properties,s)){const l=GN(e,s,t.properties[s]);if(l){const[a,c]=l;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&FN.has(t.tagName)?i=c:n[a]=c}}if(i){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function YN(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const l=i.data.estree.body[0];l.type;const a=l.expression;a.type;const c=a.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else ms(e,t.position);else{const s=i.name;let l;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,l=e.evaluater.evaluateExpression(c.expression)}else ms(e,t.position);else l=i.value===null?!0:i.value;n[s]=l}return n}function sh(e,t){const n=[];let i=-1;const s=e.passKeys?new Map:_N;for(;++i<t.children.length;){const l=t.children[i];let a;if(e.passKeys){const d=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(d){const h=s.get(d)||0;a=d+"-"+h,s.set(d,h+1)}}const c=U0(e,l,a);c!==void 0&&n.push(c)}return n}function GN(e,t,n){const i=bN(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?fN(n):PN(n)),i.property==="style"){let s=typeof n=="object"?n:QN(e,String(n));return e.stylePropertyNameCase==="css"&&(s=ZN(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&i.space?wN[i.property]||i.property:i.attribute,n]}}function QN(e,t){try{return DN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,s=new Dt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=$0+"#cannot-parse-style-attribute",s}}function W0(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let l=-1,a;for(;++l<s.length;){const c=Ay(s[l])?{type:"Identifier",name:s[l]}:{type:"Literal",value:s[l]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(l&&c.type==="Literal"),optional:!1}:c}i=a}else i=Ay(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const s=i.value;return ih.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(i);ms(e)}function ms(e,t){const n=new Dt("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=$0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ZN(e){const t={};let n;for(n in e)ih.call(e,n)&&(t[JN(n)]=e[n]);return t}function JN(e){let t=e.replace(LN,ej);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ej(e){return"-"+e.toLowerCase()}const Xc={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 tj(e){const t=this;t.parser=n;function n(i){return mw(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function nj(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 rj(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
302
|
+
`}]}function ij(e,t){const n=t.value?t.value+`
|
|
303
|
+
`:"",i={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(i.className=["language-"+s[0]]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function oj(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sj(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aj(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),s=Zi(i.toLowerCase()),l=e.footnoteOrder.indexOf(i);let a,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),a=e.footnoteOrder.length):a=l+1,c+=1,e.footnoteCounts.set(i,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function lj(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 uj(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function K0(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const s=e.all(t),l=s[0];l&&l.type==="text"?l.value="["+l.value:s.unshift({type:"text",value:"["});const a=s[s.length-1];return a&&a.type==="text"?a.value+=i:s.push({type:"text",value:i}),s}function cj(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return K0(e,t);const s={src:Zi(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(s.title=i.title);const l={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,l),e.applyData(t,l)}function fj(e,t){const n={src:Zi(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 i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function dj(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function hj(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return K0(e,t);const s={href:Zi(i.url||"")};i.title!==null&&i.title!==void 0&&(s.title=i.title);const l={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function pj(e,t){const n={href:Zi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function mj(e,t,n){const i=e.all(t),s=n?gj(n):q0(t),l={},a=[];if(typeof t.checked=="boolean"){const m=i[0];let p;m&&m.type==="element"&&m.tagName==="p"?p=m:(p={type:"element",tagName:"p",properties:{},children:[]},i.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const m=i[c];(s||c!==0||m.type!=="element"||m.tagName!=="p")&&a.push({type:"text",value:`
|
|
304
|
+
`}),m.type==="element"&&m.tagName==="p"&&!s?a.push(...m.children):a.push(m)}const d=i[i.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
|
|
305
|
+
`});const h={type:"element",tagName:"li",properties:l,children:a};return e.patch(t,h),e.applyData(t,h)}function gj(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=q0(n[i])}return t}function q0(e){const t=e.spread;return t??e.children.length>1}function yj(e,t){const n={},i=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<i.length;){const a=i[s];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function vj(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xj(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function wj(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kj(e,t){const n=e.all(t),i=n.shift(),s=[];if(i){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],a),s.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=rh(t.children[1]),d=V0(t.children[t.children.length-1]);c&&d&&(a.position={start:c,end:d}),s.push(a)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)}function Sj(e,t,n){const i=n?n.children:void 0,l=(i?i.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,c=a?a.length:t.children.length;let d=-1;const h=[];for(;++d<c;){const p=t.children[d],y={},w=a?a[d]:void 0;w&&(y.align=w);let k={type:"element",tagName:l,properties:y,children:[]};p&&(k.children=e.all(p),e.patch(p,k),k=e.applyData(p,k)),h.push(k)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,m),e.applyData(t,m)}function bj(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Oy=9,Fy=32;function Cj(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),s=0;const l=[];for(;i;)l.push(zy(t.slice(s,i.index),s>0,!0),i[0]),s=i.index+i[0].length,i=n.exec(t);return l.push(zy(t.slice(s),s>0,!1)),l.join("")}function zy(e,t,n){let i=0,s=e.length;if(t){let l=e.codePointAt(i);for(;l===Oy||l===Fy;)i++,l=e.codePointAt(i)}if(n){let l=e.codePointAt(s-1);for(;l===Oy||l===Fy;)s--,l=e.codePointAt(s-1)}return s>i?e.slice(i,s):""}function Ej(e,t){const n={type:"text",value:Cj(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Tj(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Pj={blockquote:nj,break:rj,code:ij,delete:oj,emphasis:sj,footnoteReference:aj,heading:lj,html:uj,imageReference:cj,image:fj,inlineCode:dj,linkReference:hj,link:pj,listItem:mj,list:yj,paragraph:vj,root:xj,strong:wj,table:kj,tableCell:bj,tableRow:Sj,text:Ej,thematicBreak:Tj,toml:qa,yaml:qa,definition:qa,footnoteDefinition:qa};function qa(){}const X0=-1,Fl=0,ns=1,vl=2,ah=3,lh=4,uh=5,ch=6,Y0=7,G0=8,Q0=typeof self=="object"?self:globalThis,Vy=(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 Q0[e](t)},Rj=(e,t)=>{const n=(s,l)=>(e.set(l,s),s),i=s=>{if(e.has(s))return e.get(s);const[l,a]=t[s];switch(l){case Fl:case X0:return n(a,s);case ns:{const c=n([],s);for(const d of a)c.push(i(d));return c}case vl:{const c=n({},s);for(const[d,h]of a)c[i(d)]=i(h);return c}case ah:return n(new Date(a),s);case lh:{const{source:c,flags:d}=a;return n(new RegExp(c,d),s)}case uh:{const c=n(new Map,s);for(const[d,h]of a)c.set(i(d),i(h));return c}case ch:{const c=n(new Set,s);for(const d of a)c.add(i(d));return c}case Y0:{const{name:c,message:d}=a;return n(typeof Q0[c]=="function"?Vy(c,d):new Error(d),s)}case G0:return n(BigInt(a),s);case"BigInt":return n(Object(BigInt(a)),s);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:c}=new Uint8Array(a);return n(new DataView(c),a)}}return n(Vy(l,a),s)};return i},By=e=>Rj(new Map,e)(0),Jr="",{toString:Aj}={},{keys:Mj}=Object,Yo=e=>{const t=typeof e;if(t!=="object"||!e)return[Fl,t];const n=Aj.call(e).slice(8,-1);switch(n){case"Array":return[ns,Jr];case"Object":return[vl,Jr];case"Date":return[ah,Jr];case"RegExp":return[lh,Jr];case"Map":return[uh,Jr];case"Set":return[ch,Jr];case"DataView":return[ns,n]}return n.includes("Array")?[ns,n]:e instanceof Error?[Y0,e.name||"Error"]:[vl,n]},Xa=([e,t])=>e===Fl&&(t==="function"||t==="symbol"),Nj=(e,t,n,i)=>{const s=(a,c)=>{const d=i.push(a)-1;return n.set(c,d),d},l=a=>{if(n.has(a))return n.get(a);let[c,d]=Yo(a);switch(c){case Fl:{let m=a;switch(d){case"bigint":c=G0,m=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return s([X0],a)}return s([c,m],a)}case ns:{if(d){let y=a;return d==="DataView"?y=new Uint8Array(a.buffer):d==="ArrayBuffer"&&(y=new Uint8Array(a)),s([d,[...y]],a)}const m=[],p=s([c,m],a);for(const y of a)m.push(l(y));return p}case vl:{if(d)switch(d){case"BigInt":return s([d,a.toString()],a);case"Boolean":case"Number":case"String":return s([d,a.valueOf()],a)}if(t&&"toJSON"in a)return l(a.toJSON());const m=[],p=s([c,m],a);for(const y of Mj(a))(e||!Xa(Yo(a[y])))&&m.push([l(y),l(a[y])]);return p}case ah:return s([c,isNaN(a.getTime())?Jr:a.toISOString()],a);case lh:{const{source:m,flags:p}=a;return s([c,{source:m,flags:p}],a)}case uh:{const m=[],p=s([c,m],a);for(const[y,w]of a)(e||!(Xa(Yo(y))||Xa(Yo(w))))&&m.push([l(y),l(w)]);return p}case ch:{const m=[],p=s([c,m],a);for(const y of a)(e||!Xa(Yo(y)))&&m.push(l(y));return p}}const{message:h}=a;return s([c,{name:d,message:h}],a)};return l},$y=(e,{json:t,lossy:n}={})=>{const i=[];return Nj(!(t||n),!!t,new Map,i)(e),i},xl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?By($y(e,t)):structuredClone(e):(e,t)=>By($y(e,t));function jj(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 Dj(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Ij(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||jj,i=e.options.footnoteBackLabel||Dj,s=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const m=e.all(h),p=String(h.identifier).toUpperCase(),y=Zi(p.toLowerCase());let w=0;const k=[],C=e.footnoteCounts.get(p);for(;C!==void 0&&++w<=C;){k.length>0&&k.push({type:"text",value:" "});let M=typeof n=="string"?n:n(d,w);typeof M=="string"&&(M={type:"text",value:M}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,w),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const T=m[m.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const M=T.children[T.children.length-1];M&&M.type==="text"?M.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...k)}else m.push(...k);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(m,!0)};e.patch(h,E),c.push(E)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...xl(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
306
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
307
|
+
`}]}}const Yf={}.hasOwnProperty,_j={};function Lj(e,t){const n=t||_j,i=new Map,s=new Map,l=new Map,a={...Pj,...n.handlers},c={all:h,applyData:Fj,definitionById:i,footnoteById:s,footnoteCounts:l,footnoteOrder:[],handlers:a,one:d,options:n,patch:Oj,wrap:Vj};return _d(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const p=m.type==="definition"?i:s,y=String(m.identifier).toUpperCase();p.has(y)||p.set(y,m)}}),c;function d(m,p){const y=m.type,w=c.handlers[y];if(Yf.call(c.handlers,y)&&w)return w(c,m,p);if(c.options.passThrough&&c.options.passThrough.includes(y)){if("children"in m){const{children:C,...T}=m,E=xl(T);return E.children=c.all(m),E}return xl(m)}return(c.options.unknownHandler||zj)(c,m,p)}function h(m){const p=[];if("children"in m){const y=m.children;let w=-1;for(;++w<y.length;){const k=c.one(y[w],m);if(k){if(w&&y[w-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Uy(k.value)),!Array.isArray(k)&&k.type==="element")){const C=k.children[0];C&&C.type==="text"&&(C.value=Uy(C.value))}Array.isArray(k)?p.push(...k):p.push(k)}}}return p}}function Oj(e,t){e.position&&(t.position=IN(e))}function Fj(e,t){let n=t;if(e&&e.data){const i=e.data.hName,s=e.data.hChildren,l=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const a="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:a}}n.type==="element"&&l&&Object.assign(n.properties,xl(l)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function zj(e,t){const n=t.data||{},i="value"in t&&!(Yf.call(n,"hProperties")||Yf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Vj(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
|
|
308
|
+
`});++i<e.length;)i&&n.push({type:"text",value:`
|
|
309
|
+
`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
310
|
+
`}),n}function Uy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Hy(e,t){const n=Lj(e,t),i=n.one(e,void 0),s=Ij(n),l=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return s&&l.children.push({type:"text",value:`
|
|
311
|
+
`},s),l}function Bj(e,t){return e&&"run"in e?async function(n,i){const s=Hy(n,{file:i,...t});await e.run(s,i)}:function(n,i){return Hy(n,{file:i,...e||t})}}function Wy(e){if(e)throw e}var Yc,Ky;function $j(){if(Ky)return Yc;Ky=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},l=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!p)return!1;var y;for(y in h);return typeof y>"u"||e.call(h,y)},a=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},c=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(i)return i(h,m).value}else return;return h[m]};return Yc=function d(){var h,m,p,y,w,k,C=arguments[0],T=1,E=arguments.length,M=!1;for(typeof C=="boolean"&&(M=C,C=arguments[1]||{},T=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});T<E;++T)if(h=arguments[T],h!=null)for(m in h)p=c(C,m),y=c(h,m),C!==y&&(M&&y&&(l(y)||(w=s(y)))?(w?(w=!1,k=p&&s(p)?p:[]):k=p&&l(p)?p:{},a(C,{name:m,newValue:d(M,k,y)})):typeof y<"u"&&a(C,{name:m,newValue:y}));return C},Yc}var Uj=$j();const Gc=Td(Uj);function Gf(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 Hj(){const e=[],t={run:n,use:i};return t;function n(...s){let l=-1;const a=s.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...s);function c(d,...h){const m=e[++l];let p=-1;if(d){a(d);return}for(;++p<s.length;)(h[p]===null||h[p]===void 0)&&(h[p]=s[p]);s=h,m?Wj(m,c)(...h):a(null,...h)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function Wj(e,t){let n;return i;function i(...a){const c=e.length>a.length;let d;c&&a.push(s);try{d=e.apply(this,a)}catch(h){const m=h;if(c&&n)throw m;return s(m)}c||(d&&d.then&&typeof d.then=="function"?d.then(l,s):d instanceof Error?s(d):l(d))}function s(a,...c){n||(n=!0,t(a,...c))}function l(a){s(null,a)}}const zn={basename:Kj,dirname:qj,extname:Xj,join:Yj,sep:"/"};function Kj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ts(e);let n=0,i=-1,s=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else i<0&&(l=!0,i=s+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let a=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else a<0&&(l=!0,a=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(i=s):(c=-1,i=a));return n===i?i=a:i<0&&(i=e.length),e.slice(n,i)}function qj(e){if(Ts(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Xj(e){Ts(e);let t=e.length,n=-1,i=0,s=-1,l=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){i=t+1;break}continue}n<0&&(a=!0,n=t+1),c===46?s<0?s=t:l!==1&&(l=1):s>-1&&(l=-1)}return s<0||n<0||l===0||l===1&&s===n-1&&s===i+1?"":e.slice(s,n)}function Yj(...e){let t=-1,n;for(;++t<e.length;)Ts(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Gj(n)}function Gj(e){Ts(e);const t=e.codePointAt(0)===47;let n=Qj(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Qj(e,t){let n="",i=0,s=-1,l=0,a=-1,c,d;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(s===a-1||l===1))if(s!==a-1&&l===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",i=0):(n=n.slice(0,d),i=n.length-1-n.lastIndexOf("/")),s=a,l=0;continue}}else if(n.length>0){n="",i=0,s=a,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(s+1,a):n=e.slice(s+1,a),i=a-s-1;s=a,l=0}else c===46&&l>-1?l++:l=-1}return n}function Ts(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Zj={cwd:Jj};function Jj(){return"/"}function Qf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function eD(e){if(typeof e=="string")e=new URL(e);else if(!Qf(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 tD(e)}function tD(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Qc=["history","path","basename","stem","extname","dirname"];class Z0{constructor(t){let n;t?Qf(t)?n={path:t}:typeof t=="string"||nD(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Zj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Qc.length;){const l=Qc[i];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let s;for(s in n)Qc.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?zn.basename(this.path):void 0}set basename(t){Jc(t,"basename"),Zc(t,"basename"),this.path=zn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?zn.dirname(this.path):void 0}set dirname(t){qy(this.basename,"dirname"),this.path=zn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?zn.extname(this.path):void 0}set extname(t){if(Zc(t,"extname"),qy(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=zn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qf(t)&&(t=eD(t)),Jc(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?zn.basename(this.path,this.extname):void 0}set stem(t){Jc(t,"stem"),Zc(t,"stem"),this.path=zn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const s=this.message(t,n,i);throw s.fatal=!0,s}info(t,n,i){const s=this.message(t,n,i);return s.fatal=void 0,s}message(t,n,i){const s=new Dt(t,n,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Zc(e,t){if(e&&e.includes(zn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+zn.sep+"`")}function Jc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function qy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function nD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rD=function(e){const i=this.constructor.prototype,s=i[e],l=function(){return s.apply(l,arguments)};return Object.setPrototypeOf(l,i),l},iD={}.hasOwnProperty;class fh extends rD{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=Hj()}copy(){const t=new fh;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Gc(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(nf("data",this.frozen),this.namespace[t]=n,this):iD.call(this.namespace,t)&&this.namespace[t]||void 0:t?(nf("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,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=n.call(t,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ya(t),i=this.parser||this.Parser;return ef("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),ef("process",this.parser||this.Parser),tf("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(l,a){const c=Ya(t),d=i.parse(c);i.run(d,c,function(m,p,y){if(m||!p||!y)return h(m);const w=p,k=i.stringify(w,y);aD(k)?y.value=k:y.result=k,h(m,y)});function h(m,p){m||!p?a(m):l?l(p):n(void 0,p)}}}processSync(t){let n=!1,i;return this.freeze(),ef("processSync",this.parser||this.Parser),tf("processSync",this.compiler||this.Compiler),this.process(t,s),Yy("processSync","process",n),i;function s(l,a){n=!0,Wy(l),i=a}}run(t,n,i){Xy(t),this.freeze();const s=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?l(void 0,i):new Promise(l);function l(a,c){const d=Ya(n);s.run(t,d,h);function h(m,p,y){const w=p||t;m?c(m):a?a(w):i(void 0,w,y)}}}runSync(t,n){let i=!1,s;return this.run(t,n,l),Yy("runSync","run",i),s;function l(a,c){Wy(a),s=c,i=!0}}stringify(t,n){this.freeze();const i=Ya(n),s=this.compiler||this.Compiler;return tf("stringify",s),Xy(t),s(t,i)}use(t,...n){const i=this.attachers,s=this.namespace;if(nf("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...p]=h;d(m,p)}else a(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function a(h){if(!("plugins"in h)&&!("settings"in h))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(h.plugins),h.settings&&(s.settings=Gc(!0,s.settings,h.settings))}function c(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const p=h[m];l(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,m){let p=-1,y=-1;for(;++p<i.length;)if(i[p][0]===h){y=p;break}if(y===-1)i.push([h,...m]);else if(m.length>0){let[w,...k]=m;const C=i[y][1];Gf(C)&&Gf(w)&&(w=Gc(!0,C,w)),i[y]=[h,w,...k]}}}}const oD=new fh().freeze();function ef(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function tf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function nf(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 Xy(e){if(!Gf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Yy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ya(e){return sD(e)?e:new Z0(e)}function sD(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function aD(e){return typeof e=="string"||lD(e)}function lD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uD="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Gy=[],Qy={allowDangerousHtml:!0},cD=/^(https?|ircs?|mailto|xmpp)$/i,fD=[{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 J0(e){const t=dD(e),n=hD(e);return pD(t.runSync(t.parse(n),n),e)}function dD(e){const t=e.rehypePlugins||Gy,n=e.remarkPlugins||Gy,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Qy}:Qy;return oD().use(tj).use(n).use(Bj,i).use(t)}function hD(e){const t=e.children||"",n=new Z0;return typeof t=="string"&&(n.value=t),n}function pD(e,t){const n=t.allowedElements,i=t.allowElement,s=t.components,l=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||mD;for(const m of fD)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+uD+m.id,void 0);return _d(e,h),zN(e,{Fragment:v.Fragment,components:s,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function h(m,p,y){if(m.type==="raw"&&y&&typeof p=="number")return a?y.children.splice(p,1):y.children[p]={type:"text",value:m.value},p;if(m.type==="element"){let w;for(w in Xc)if(Object.hasOwn(Xc,w)&&Object.hasOwn(m.properties,w)){const k=m.properties[w],C=Xc[w];(C===null||C.includes(m.tagName))&&(m.properties[w]=d(String(k||""),w,m))}}if(m.type==="element"){let w=n?!n.includes(m.tagName):l?l.includes(m.tagName):!1;if(!w&&i&&typeof p=="number"&&(w=!i(m,p,y)),w&&y&&typeof p=="number")return c&&m.children?y.children.splice(p,1,...m.children):y.children.splice(p,1),p}}}function mD(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||i!==-1&&t>i||cD.test(e.slice(0,t))?e:""}const gD={};function e1(e){const t=this,n=e||gD,i=t.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),a=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(Ew(n)),l.push(rw()),a.push(wP(n))}function Ps(e){return v.jsx(b0,{open:!0,onOpenChange:t=>{t||e.onClose()},children:v.jsxs(T0,{children:[v.jsx(P0,{className:"modal-backdrop"}),v.jsxs(R0,{className:"modal"+(e.wide?" modal-wide":"")+(e.className?` ${e.className}`:""),children:[v.jsxs("div",{className:"modal-head",children:[v.jsxs("div",{children:[v.jsx(M0,{asChild:!0,children:v.jsx("h3",{children:e.title})}),e.description&&v.jsx(N0,{className:"modal-description",children:e.description})]}),v.jsx(j0,{asChild:!0,children:v.jsx("button",{className:"icon-btn","aria-label":`Close ${e.title}`,children:v.jsx(ve,{name:"close"})})})]}),e.tabs,v.jsx("div",{className:"modal-body",children:e.children})]})]})})}const yD=.25,vD=8;let Zy=Promise.resolve();function Jy(){return document.documentElement.classList.contains("theme-dark")?"dark":"default"}function xD(){const[e,t]=S.useState(Jy);return S.useEffect(()=>{const n=document.documentElement,i=()=>t(Jy()),s=new MutationObserver(i);return s.observe(n,{attributes:!0,attributeFilter:["class"]}),i(),()=>s.disconnect()},[]),e}function wD(e,t,n){const i=Zy.then(async()=>{const{default:s}=await Wd(async()=>{const{default:l}=await import("./mermaid.core-CgO1XnMl.js").then(a=>a.bp);return{default:l}},[]);return s.initialize({startOnLoad:!1,securityLevel:"strict",theme:n,fontFamily:"var(--sans)"}),s.render(e,t)});return Zy=i.then(()=>{},()=>{}),i}function kD(e){return Math.min(vD,Math.max(yD,e))}function SD(e){const t=S.useRef(null),n=S.useRef(null),[i,s]=S.useState(1),[l,a]=S.useState({x:0,y:0}),[c,d]=S.useState(!1),h=()=>{s(1),a({x:0,y:0})},m=(p,y,w)=>{const k=kD(p);if(k===i)return;const C=t.current?.getBoundingClientRect();if(C){const T=(y??C.left+C.width/2)-C.left-C.width/2,E=(w??C.top+C.height/2)-C.top-C.height/2,M=k/i;a(A=>({x:T-M*(T-A.x),y:E-M*(E-A.y)}))}s(k)};return S.useEffect(()=>{const p=y=>{y.key==="+"||y.key==="="?(y.preventDefault(),m(i*1.25)):y.key==="-"?(y.preventDefault(),m(i/1.25)):y.key==="0"&&(y.preventDefault(),h())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)}),v.jsx(b0,{open:!0,onOpenChange:p=>{p||e.onClose()},children:v.jsxs(T0,{children:[v.jsx(P0,{className:"mermaid-fullscreen-backdrop"}),v.jsxs(R0,{className:"mermaid-fullscreen","data-mermaid-theme":e.theme,"aria-describedby":"mermaid-fullscreen-help",children:[v.jsx(M0,{className:"mermaid-fullscreen-title",children:"Diagram viewer"}),v.jsxs("div",{className:"mermaid-fullscreen-tools",children:[v.jsx("button",{className:"icon-btn","aria-label":"Zoom out",title:"Zoom out (−)",onClick:()=>m(i/1.25),children:v.jsx(ve,{name:"minus"})}),v.jsxs("button",{className:"mermaid-zoom-value",onClick:h,title:"Reset zoom and position",children:[Math.round(i*100),"%"]}),v.jsx("button",{className:"icon-btn","aria-label":"Zoom in",title:"Zoom in (+)",onClick:()=>m(i*1.25),children:v.jsx(ve,{name:"plus"})}),v.jsx(j0,{asChild:!0,children:v.jsx("button",{className:"icon-btn","aria-label":"Close diagram viewer",title:"Close (Esc)",children:v.jsx(ve,{name:"close"})})})]}),v.jsx("div",{ref:t,className:"mermaid-fullscreen-viewport"+(c?" dragging":""),onWheel:p=>{p.preventDefault(),m(i*Math.exp(-p.deltaY*.0015),p.clientX,p.clientY)},onDoubleClick:p=>m(i*1.5,p.clientX,p.clientY),onPointerDown:p=>{p.button===0&&(n.current={pointerId:p.pointerId,startX:p.clientX,startY:p.clientY,panX:l.x,panY:l.y},p.currentTarget.setPointerCapture(p.pointerId),d(!0))},onPointerMove:p=>{const y=n.current;!y||y.pointerId!==p.pointerId||a({x:y.panX+p.clientX-y.startX,y:y.panY+p.clientY-y.startY})},onPointerUp:p=>{n.current?.pointerId===p.pointerId&&(n.current=null,d(!1),p.currentTarget.releasePointerCapture(p.pointerId))},onPointerCancel:()=>{n.current=null,d(!1)},children:v.jsx("div",{className:"mermaid-fullscreen-canvas",style:{transform:`translate(${l.x}px, ${l.y}px) scale(${i})`},dangerouslySetInnerHTML:{__html:e.svg}})}),v.jsx(N0,{id:"mermaid-fullscreen-help",className:"mermaid-fullscreen-help",children:"Scroll to zoom · drag to move · double-click to zoom in"})]})]})})}function bD({source:e}){const t=S.useId(),[n,i]=S.useState(""),[s,l]=S.useState(""),[a,c]=S.useState("default"),[d,h]=S.useState(!1),m=xD();return S.useEffect(()=>{let p=!0;const y=`mermaid-${t.replace(/[^a-zA-Z0-9_-]/g,"")}`;return i(""),l(""),wD(y,e,m).then(w=>{p&&(c(m),i(w.svg))}).catch(w=>{p&&l(w instanceof Error?w.message:String(w))}),()=>{p=!1,document.getElementById(`d${y}`)?.remove()}},[t,e,m]),s?v.jsxs("pre",{className:"markdown-mermaid-error",children:["Mermaid error: ",s]}):n?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"markdown-mermaid","data-mermaid-theme":a,children:[v.jsx("button",{className:"icon-btn markdown-mermaid-expand","aria-label":"View diagram fullscreen",title:"View diagram fullscreen",onClick:()=>h(!0),children:v.jsx(ve,{name:"maximize"})}),v.jsx("div",{className:"markdown-mermaid-diagram",dangerouslySetInnerHTML:{__html:n}})]}),d&&v.jsx(SD,{svg:n,theme:a,onClose:()=>h(!1)})]}):v.jsx("div",{className:"markdown-mermaid-loading",children:"Rendering diagram…"})}const CD=S.memo(function(t){return v.jsx("article",{className:"markdown-body",ref:t.contentRef,children:v.jsx(J0,{remarkPlugins:[e1],components:{a:({children:n,...i})=>v.jsx("a",{...i,target:"_blank",rel:"noreferrer",children:n}),code:({className:n,children:i,...s})=>{const l=/language-([\w-]+)/.exec(n??"")?.[1],a=String(i).replace(/\n$/,"");return l==="mermaid"?v.jsx(bD,{source:a}):v.jsx("code",{className:n,...s,children:i})}},children:t.markdown})})});function ED(e){const{rec:t}=e,n=S.useRef(null),[i,s]=S.useState(""),[l,a]=S.useState(null),[c,d]=S.useState("loading"),[h,m]=S.useState(""),[p,y]=S.useState(0),[w,k]=S.useState(""),[C,T]=S.useState(0),[E,M]=S.useState(!1),[A,L]=S.useState(""),[H,D]=S.useState(!1),[Y,W]=S.useState(!1),[X,j]=S.useState([]),[G,$]=S.useState(!1),[fe,se]=S.useState(null),[te,xe]=S.useState(!1),[Ee,q]=S.useState("");S.useEffect(()=>{let R=!0,Z=null;return d("loading"),Nl(t.id).then(de=>{if(R){if(!de){d("missing");return}s(new TextDecoder("utf-8").decode(de)),Z=URL.createObjectURL(new Blob([de],{type:"text/markdown;charset=utf-8"})),a(Z),d("ready")}}).catch(()=>{R&&d("error")}),()=>{R=!1,Z&&URL.revokeObjectURL(Z)}},[t.id]),S.useEffect(()=>{const R=()=>{const Z=window.getSelection(),de=n.current;if(!Z||Z.isCollapsed||!de){m(""),y(0);return}if(!de.contains(Z.anchorNode)||!de.contains(Z.focusNode)){m(""),y(0);return}const ie=Z.getRangeAt(0),Ce=Z.toString(),ge=Ce.length-Ce.trimStart().length,Te=Ce.trim().slice(0,4e3),je=document.createRange();je.selectNodeContents(de),je.setEnd(ie.startContainer,ie.startOffset);const Ue=je.toString().length+ge;m(Te),y(K2(de.textContent,Te,Ue))};return document.addEventListener("selectionchange",R),()=>document.removeEventListener("selectionchange",R)},[]);const le=()=>{h&&(k(h),T(p),M(!0),q(""))},P=async()=>{if(Y){if(!w||!A.trim())return;j(Z=>[...Z,{selection:w,comment:A.trim(),occurrence:C}]),L(""),M(!1),q("Comment added to review");return}const R=H2(w,A);if(!(!R||!A.trim()||H)){D(!0),q("");try{await e.onSendText(R,t.id||void 0),L(""),M(!1),q("Feedback sent")}catch(Z){q(`Send failed: ${String(Z)}`)}finally{D(!1)}}},_=async()=>{if(X.length===0||G)return;const R=Z2(i,X);$(!0),q("");try{e.onSendFile?await e.onSendFile({filename:W2(t.filename),mime:"text/markdown",bytes:new TextEncoder().encode(R)},t.id||void 0):await e.onSendText(R,t.id||void 0),j([]),W(!1),q("Review submitted")}catch(Z){q(`Review send failed: ${String(Z)}`)}finally{$(!1)}},Q=async()=>{if(!(!fe||!e.onSendFile||te)){xe(!0),q("");try{await e.onSendFile(fe,t.id||void 0),se(null),q("Voice feedback sent")}catch(R){q(`Voice send failed: ${String(R)}`)}finally{xe(!1)}}};return v.jsx(Ps,{title:t.filename,description:"Markdown preview · select text to send precise feedback",onClose:e.onClose,wide:!0,className:"markdown-modal",children:v.jsxs("div",{className:"markdown-preview",children:[v.jsxs("div",{className:"markdown-review-toolbar",children:[v.jsxs("button",{className:"btn sm",disabled:!h,onMouseDown:R=>R.preventDefault(),onClick:le,children:[v.jsx(ve,{name:"reply",size:14}),Y?"Add review comment":"Quick message",h?` (${h.length})`:""]}),Y?v.jsx("button",{className:"btn sm",onClick:()=>{W(!1),j([]),M(!1),q("Review discarded")},children:"Cancel review"}):v.jsxs("button",{className:"btn sm",onClick:()=>{W(!0),j([]),q("Review started — select passages to add comments")},children:[v.jsx(ve,{name:"edit",size:14}),"Start review"]}),l&&v.jsxs("a",{className:"btn sm",href:l,download:t.filename,children:[v.jsx(ve,{name:"download",size:14}),"Download"]}),e.onSendFile&&v.jsx(_w,{disabled:!!fe||te,onReady:se,onError:q}),v.jsx("span",{className:"markdown-review-hint",children:h?"Selection ready for feedback":"Highlight any passage to comment on it"})]}),E&&v.jsxs("div",{className:"markdown-feedback",children:[v.jsx("blockquote",{children:w}),v.jsx("textarea",{className:"field",rows:3,autoFocus:!0,placeholder:"What should change?",value:A,onChange:R=>L(R.target.value)}),v.jsxs("div",{className:"markdown-feedback-actions",children:[v.jsx("button",{className:"btn sm",onClick:()=>M(!1),children:"Cancel"}),v.jsxs("button",{className:"btn sm primary",disabled:!A.trim()||H,onClick:()=>void P(),children:[v.jsx(ve,{name:"send",size:14}),Y?"Add to review":H?"Sending…":"Send feedback"]})]})]}),Y&&v.jsxs("div",{className:"markdown-review-draft",children:[v.jsxs("div",{className:"markdown-review-draft-head",children:[v.jsxs("strong",{children:["Review · ",X.length," comment",X.length===1?"":"s"]}),v.jsxs("button",{className:"btn sm primary",disabled:X.length===0||G,onClick:()=>void _(),children:[v.jsx(ve,{name:"send",size:14}),G?"Submitting…":"Submit review"]})]}),X.map((R,Z)=>v.jsxs("div",{className:"markdown-review-comment",children:[v.jsx("span",{children:Z+1}),v.jsxs("div",{children:[v.jsx("blockquote",{children:R.selection}),v.jsx("p",{children:R.comment})]}),v.jsx("button",{className:"icon-btn",title:"Remove comment",onClick:()=>j(de=>de.filter((ie,Ce)=>Ce!==Z)),children:v.jsx(ve,{name:"close",size:14})})]},`${Z}-${R.selection.slice(0,24)}`))]}),fe&&v.jsx(Iw,{att:fe,sending:te,onSend:()=>void Q(),onDiscard:()=>se(null)}),Ee&&v.jsx("div",{className:"markdown-review-status",role:"status",children:Ee}),v.jsxs("div",{className:"markdown-preview-scroll",children:[c==="loading"&&v.jsx("div",{className:"markdown-empty",children:"Loading preview…"}),c==="missing"&&v.jsx("div",{className:"markdown-empty",children:"This file is available on the original device only."}),c==="error"&&v.jsx("div",{className:"markdown-empty",children:"The file could not be opened."}),c==="ready"&&v.jsx(CD,{markdown:i,contentRef:n})]})]})})}function TD(e){const{rec:t}=e,[n,i]=S.useState(""),[s,l]=S.useState(null),[a,c]=S.useState(0),[d,h]=S.useState("loading");return S.useEffect(()=>{let m=!0,p=null;return h("loading"),Nl(t.id).then(y=>{if(m){if(!y){h("missing");return}i(oA(new TextDecoder("utf-8").decode(y))),c(y.byteLength),p=URL.createObjectURL(new Blob([y],{type:Bd(t.mime,t.filename)})),l(p),h("ready")}}).catch(()=>{m&&h("error")}),()=>{m=!1,p&&URL.revokeObjectURL(p)}},[t.id,t.mime,t.filename]),v.jsx(Ps,{title:t.filename,description:"HTML preview · sandboxed, static rendering only",onClose:e.onClose,wide:!0,className:"markdown-modal html-modal",children:v.jsxs("div",{className:"html-preview",children:[v.jsxs("div",{className:"html-preview-toolbar",children:[v.jsxs("span",{className:"html-preview-shield",children:[v.jsx(ve,{name:"shield",size:14}),"Scripts, forms and network requests are blocked"]}),s&&v.jsxs("a",{className:"btn sm",href:s,download:t.filename,children:[v.jsx(ve,{name:"download",size:14}),"Download original",a?` · ${Ar(a)}`:""]})]}),v.jsxs("div",{className:"html-preview-frame",children:[d==="loading"&&v.jsx("div",{className:"markdown-empty",children:"Loading preview…"}),d==="missing"&&v.jsx("div",{className:"markdown-empty",children:"This file is available on the original device only."}),d==="error"&&v.jsx("div",{className:"markdown-empty",children:"The file could not be opened."}),d==="ready"&&v.jsx("iframe",{className:"html-preview-iframe",title:`Sandboxed preview of ${t.filename}`,sandbox:eA,referrerPolicy:"no-referrer",srcDoc:n})]})]})})}function Zf(e){const{message:t}=e,[n,i]=S.useState(null),[s,l]=S.useState(0),a=Lx(t.wireId)??{id:t.wireId,dir:t.dir,filename:t.filename??"file",mime:t.mime??"application/octet-stream",size:s,date:t.date};S.useEffect(()=>{let h=!0,m=null;if(t.wireId)return Nl(t.wireId).then(p=>{!h||!p||(l(p.byteLength),m=URL.createObjectURL(new Blob([p],{type:Bd(a.mime,a.filename)})),i(m))}).catch(()=>{}),()=>{h=!1,m&&URL.revokeObjectURL(m)}},[t.wireId,a.mime,a.filename]);const c=Df(t)==="photo",d=qi(a.mime,a.filename);return v.jsxs("div",{className:"shared-media-item"+(c?" shared-photo-item":""),children:[v.jsxs("button",{className:"shared-media-jump",onClick:()=>e.onJump(e.messageKey),children:[c&&n?v.jsx("img",{src:n,alt:a.filename}):v.jsx("span",{className:"shared-media-icon",children:v.jsx(ve,{name:d?"mic":"copy",size:18})}),v.jsxs("span",{className:"shared-media-copy",children:[v.jsx("strong",{children:c?a.filename||"Photo":d?"Voice message":a.filename}),v.jsxs("span",{children:[e.versionLabel?`${e.versionLabel} · `:"",fs(a.date),s?` · ${Ar(s)}`:""]})]})]}),v.jsxs("span",{className:"shared-media-actions",children:[Tw(a.filename)&&n&&v.jsx("button",{className:"icon-btn",title:"Preview markdown",onClick:()=>e.onPreview(a),children:v.jsx(ve,{name:"monitor",size:16})}),Ll(a.filename,a.mime)&&n&&v.jsx("button",{className:"icon-btn",title:"Preview HTML",onClick:()=>e.onPreview(a),children:v.jsx(ve,{name:"monitor",size:16})}),v.jsx("a",{className:"icon-btn"+(n?"":" disabled"),href:n??void 0,download:a.filename,title:"Download",children:v.jsx(ve,{name:"download",size:16})})]})]})}function PD(e){const[t,n]=S.useState(!1);if(e.versions.length===1){const i=e.versions[0];return v.jsx(Zf,{message:i.message,messageKey:i.key,onJump:e.onJump,onPreview:e.onPreview})}return v.jsxs("div",{className:"file-version-stack"+(t?" expanded":""),children:[v.jsxs("button",{className:"file-version-stack-head",onClick:()=>n(i=>!i),children:[v.jsx("span",{className:"shared-media-icon",children:v.jsx(ve,{name:"copy",size:18})}),v.jsxs("span",{className:"shared-media-copy",children:[v.jsx("strong",{children:e.filename}),v.jsxs("span",{children:[e.versions.length," versions · newest ",fs(e.versions[0].message.date)]})]}),v.jsx(ve,{name:t?"chevronDown":"chevron",size:16})]}),t&&v.jsx("div",{className:"file-version-stack-list",children:e.versions.map((i,s)=>v.jsx(Zf,{message:i.message,messageKey:i.key,versionLabel:`Version ${e.versions.length-s}`,onJump:e.onJump,onPreview:e.onPreview},i.key))})]})}function RD(e){const[t,n]=S.useState("photo"),i=e.messages.map((h,m)=>({message:h,key:h.wireId||`${h.date}-${(e.indexOffset??0)+m}`})),s=i.filter(({message:h})=>Df(h)==="photo"),l=i.filter(({message:h})=>Df(h)==="file"),a=X2(l),c=i.flatMap(({message:h,key:m})=>h.kind==="file"?[]:q2(h.text).map(p=>({url:p,message:h,key:m}))),d=[{id:"photo",label:"Photos",count:s.length},{id:"file",label:"Files",count:l.length},{id:"link",label:"Links",count:c.length}];return v.jsx(Ps,{title:"Shared media",description:"Photos, files, and links from this conversation",onClose:e.onClose,wide:!0,className:"shared-media-modal",tabs:v.jsx("div",{className:"shared-media-tabs",role:"tablist","aria-label":"Shared media type",children:d.map(h=>v.jsxs("button",{role:"tab","aria-selected":t===h.id,className:t===h.id?"active":"",onClick:()=>n(h.id),children:[h.label," ",v.jsx("span",{children:h.count})]},h.id))}),children:v.jsxs("div",{className:"shared-media-list"+(t==="photo"?" photos":""),children:[t==="photo"&&s.map(h=>v.jsx(Zf,{message:h.message,messageKey:h.key,onJump:e.onJump,onPreview:e.onPreview},h.key)),t==="file"&&a.map(h=>v.jsx(PD,{filename:h.filename,versions:h.versions,onJump:e.onJump,onPreview:e.onPreview},h.filename)),t==="link"&&c.map((h,m)=>v.jsxs("div",{className:"shared-media-item",children:[v.jsxs("a",{className:"shared-media-jump",href:h.url,target:"_blank",rel:"noreferrer",children:[v.jsx("span",{className:"shared-media-icon",children:v.jsx(ve,{name:"link",size:18})}),v.jsxs("span",{className:"shared-media-copy",children:[v.jsx("strong",{children:h.url}),v.jsx("span",{children:fs(h.message.date)})]})]}),v.jsx("button",{className:"icon-btn",title:"Jump to message",onClick:()=>e.onJump(h.key),children:v.jsx(ve,{name:"reply",size:16})})]},`${h.key}-${h.url}-${m}`)),(t==="photo"&&s.length===0||t==="file"&&l.length===0||t==="link"&&c.length===0)&&v.jsxs("div",{className:"markdown-empty",children:["No ",t==="photo"?"photos":`${t}s`," in this chat yet."]})]})})}const AD=Object.freeze(["image/avif","image/bmp","image/heic","image/heif","image/jpeg","image/jpg","image/png","image/webp"]),MD=/\.(avif|bmp|heic|heif|jpe?g|png|webp)$/i;function t1(e,t=""){return AD.includes(String(e??"").toLowerCase())||MD.test(String(t??""))}function ND(e){return`${(String(e||"photo").trim()||"photo").replace(/\.[^./\\]+$/,"")||"photo"}.jpg`}function jD(e,t,n){const i=Math.max(1,Number(e)||1),s=Math.max(1,Number(t)||1),l=Math.max(1,Number(n)||1),a=Math.min(1,l/Math.max(i,s));return{width:Math.max(1,Math.round(i*a)),height:Math.max(1,Math.round(s*a))}}const DD=2048,ID=640,_D=.82,LD=[.84,.7,.56,.44],OD=.94;function FD(e){return new Promise((t,n)=>{const i=URL.createObjectURL(e),s=new Image,l=()=>URL.revokeObjectURL(i);s.onload=()=>t({image:s,release:l}),s.onerror=()=>{l(),n(new Error("This browser could not decode the selected image."))},s.src=i})}function zD(e,t){return new Promise((n,i)=>{e.toBlob(s=>s?n(s):i(new Error("This browser could not encode the optimized photo.")),"image/jpeg",t)})}async function VD(e,t){if(!t1(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*OD)),{image:i,release:s}=await FD(e),l=document.createElement("canvas"),a=l.getContext("2d",{alpha:!1});if(!a)throw s(),new Error("Photo optimization is unavailable in this browser.");try{let c=Math.min(DD,Math.max(i.naturalWidth,i.naturalHeight));for(;c>=ID;){const d=jD(i.naturalWidth,i.naturalHeight,c);l.width=d.width,l.height=d.height,a.fillStyle="#fff",a.fillRect(0,0,l.width,l.height),a.drawImage(i,0,0,l.width,l.height);for(const h of LD){const m=await zD(l,h);if(m.size<=n)return{filename:ND(e.name),mime:"image/jpeg",bytes:new Uint8Array(await m.arrayBuffer()),width:l.width,height:l.height,originalSize:e.size}}c=Math.floor(c*_D)}}finally{s(),l.width=1,l.height=1}throw new Error("The photo is still too large after optimization.")}const BD=5e4,$D=new Set(["http:","https:","mailto:"]);function n1(e){if(!(!e||e!==e.trim()||/[\u0000-\u001f\u007f]/u.test(e)))try{const t=new URL(e);return $D.has(t.protocol.toLowerCase())?e:void 0}catch{return}}function r1(e){const t="language-";return e?.startsWith(t)&&e.slice(t.length)||void 0}function UD(e){return e.split(/(\n[ \t]*\n)/).map(t=>{if(/^\n[ \t]*\n$/.test(t))return t;const n=t.split(`
|
|
312
|
+
`),i=n.filter(a=>a.trim().length>0);if(i.length===0)return t;const s=i.map(a=>a.match(/^[ \t]+/)?.[0]??"");if(s.some(a=>a.length===0))return t;const l=Math.min(...s.map(a=>a.length));return n.map(a=>a.trim().length>0?a.slice(l):a).join(`
|
|
313
|
+
`)}).join("")}function HD({children:e}){const t=S.isValidElement(e)?e:null,n=r1(t?.props.className);return v.jsxs("div",{className:"message-code-block","data-language":n||void 0,children:[n&&v.jsx("div",{className:"message-code-language",children:n}),v.jsx("pre",{children:e})]})}const WD=[e1],KD={a:({node:e,children:t,href:n,...i})=>{const s=n1(n);return s?v.jsx("a",{...i,href:s,target:"_blank",rel:"noopener noreferrer",children:t}):v.jsx("span",{className:"message-link-blocked",children:t})},img:({alt:e})=>v.jsxs("span",{className:"message-image-placeholder",children:["[image: ",e||"remote image blocked","]"]}),pre:HD,code:({node:e,className:t,children:n,...i})=>v.jsx("code",{className:t,"data-language":r1(t),...i,children:n})},ev=S.memo(function({text:t,className:n="bubble-text message-markdown"}){return t.length>BD?v.jsx("div",{className:`${n} message-markdown-plaintext`,"data-render-mode":"plaintext",children:t}):v.jsx("div",{className:n,"data-render-mode":"markdown",children:v.jsx(J0,{remarkPlugins:WD,components:KD,urlTransform:i=>n1(i)??"",children:UD(t)})})}),dh=S.createContext({});function hh(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const qD=typeof window<"u",ph=qD?S.useLayoutEffect:S.useEffect,zl=S.createContext(null);function mh(e,t){e.indexOf(t)===-1&&e.push(t)}function wl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Hn=(e,t,n)=>n>t?t:n<e?e:n;let Vl=()=>{};const Nr={},i1=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),o1=e=>typeof e=="object"&&e!==null,s1=e=>/^0[^.\s]+$/u.test(e);function a1(e){let t;return()=>(t===void 0&&(t=e()),t)}const xn=e=>e,Rs=(...e)=>e.reduce((t,n)=>i=>n(t(i))),gs=(e,t,n)=>{const i=t-e;return i?(n-e)/i:1};class gh{constructor(){this.subscriptions=[]}add(t){return mh(this.subscriptions,t),()=>wl(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let l=0;l<s;l++){const a=this.subscriptions[l];a&&a(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const an=e=>e*1e3,vn=e=>e/1e3,l1=(e,t)=>t?e*(1e3/t):0,u1=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,XD=1e-7,YD=12;function GD(e,t,n,i,s){let l,a,c=0;do a=t+(n-t)/2,l=u1(a,i,s)-e,l>0?n=a:t=a;while(Math.abs(l)>XD&&++c<YD);return a}function As(e,t,n,i){if(e===t&&n===i)return xn;const s=l=>GD(l,0,1,e,n);return l=>l===0||l===1?l:u1(s(l),t,i)}const c1=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,f1=e=>t=>1-e(1-t),d1=As(.33,1.53,.69,.99),yh=f1(d1),h1=c1(yh),p1=e=>e>=1?1:(e*=2)<1?.5*yh(e):.5*(2-Math.pow(2,-10*(e-1))),vh=e=>1-Math.sin(Math.acos(e)),m1=f1(vh),g1=c1(vh),QD=As(.42,0,1,1),ZD=As(0,0,.58,1),y1=As(.42,0,.58,1),JD=e=>Array.isArray(e)&&typeof e[0]!="number",v1=e=>Array.isArray(e)&&typeof e[0]=="number",eI={linear:xn,easeIn:QD,easeInOut:y1,easeOut:ZD,circIn:vh,circInOut:g1,circOut:m1,backIn:yh,backInOut:h1,backOut:d1,anticipate:p1},tI=e=>typeof e=="string",tv=e=>{if(v1(e)){Vl(e.length===4);const[t,n,i,s]=e;return As(t,n,i,s)}else if(tI(e))return eI[e];return e},Ga=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function nI(e){let t=new Set,n=new Set,i=!1,s=!1;const l=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(h){l.has(h)&&(d.schedule(h),e()),h(a)}const d={schedule:(h,m=!1,p=!1)=>{const w=p&&i?t:n;return m&&l.add(h),w.add(h),h},cancel:h=>{n.delete(h),l.delete(h)},process:h=>{if(a=h,i){s=!0;return}i=!0;const m=t;t=n,n=m,t.forEach(c),t.clear(),i=!1,s&&(s=!1,d.process(h))}};return d}const rI=40;function x1(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,a=Ga.reduce((A,L)=>(A[L]=nI(l),A),{}),{setup:c,read:d,resolveKeyframes:h,preUpdate:m,update:p,preRender:y,render:w,postRender:k}=a,C=()=>{const A=Nr.useManualTiming,L=A?s.timestamp:performance.now();n=!1,A||(s.delta=i?1e3/60:Math.max(Math.min(L-s.timestamp,rI),1)),s.timestamp=L,s.isProcessing=!0,c.process(s),d.process(s),h.process(s),m.process(s),p.process(s),y.process(s),w.process(s),k.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(C))},T=()=>{n=!0,i=!0,s.isProcessing||e(C)};return{schedule:Ga.reduce((A,L)=>{const H=a[L];return A[L]=(D,Y=!1,W=!1)=>(n||T(),H.schedule(D,Y,W)),A},{}),cancel:A=>{for(let L=0;L<Ga.length;L++)a[Ga[L]].cancel(A)},state:s,steps:a}}const{schedule:Xe,cancel:jr,state:Ct,steps:rf}=x1(typeof requestAnimationFrame<"u"?requestAnimationFrame:xn,!0);let ol;function iI(){ol=void 0}const $t={now:()=>(ol===void 0&&$t.set(Ct.isProcessing||Nr.useManualTiming?Ct.timestamp:performance.now()),ol),set:e=>{ol=e,queueMicrotask(iI)}},w1=e=>t=>typeof t=="string"&&t.startsWith(e),k1=w1("--"),oI=w1("var(--"),xh=e=>oI(e)?sI.test(e.split("/*")[0].trim()):!1,sI=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function nv(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const no={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ys={...no,transform:e=>Hn(0,1,e)},Qa={...no,default:1},rs=e=>Math.round(e*1e5)/1e5,wh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function aI(e){return e==null}const lI=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,kh=(e,t)=>n=>!!(typeof n=="string"&&lI.test(n)&&n.startsWith(e)||t&&!aI(n)&&Object.prototype.hasOwnProperty.call(n,t)),S1=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,l,a,c]=i.match(wh);return{[e]:parseFloat(s),[t]:parseFloat(l),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},uI=e=>Hn(0,255,e),of={...no,transform:e=>Math.round(uI(e))},ti={test:kh("rgb","red"),parse:S1("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+of.transform(e)+", "+of.transform(t)+", "+of.transform(n)+", "+rs(ys.transform(i))+")"};function cI(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Jf={test:kh("#"),parse:cI,transform:ti.transform},Ms=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),tr=Ms("deg"),Un=Ms("%"),ke=Ms("px"),fI=Ms("vh"),dI=Ms("vw"),rv={...Un,parse:e=>Un.parse(e)/100,transform:e=>Un.transform(e*100)},Ui={test:kh("hsl","hue"),parse:S1("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+Un.transform(rs(t))+", "+Un.transform(rs(n))+", "+rs(ys.transform(i))+")"},dt={test:e=>ti.test(e)||Jf.test(e)||Ui.test(e),parse:e=>ti.test(e)?ti.parse(e):Ui.test(e)?Ui.parse(e):Jf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ti.transform(e):Ui.transform(e),getAnimatableNone:e=>{const t=dt.parse(e);return t.alpha=0,dt.transform(t)}},hI=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function pI(e){return isNaN(e)&&typeof e=="string"&&(e.match(wh)?.length||0)+(e.match(hI)?.length||0)>0}const b1="number",C1="color",mI="var",gI="var(",iv="${}",yI=/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 Gi(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let l=0;const c=t.replace(yI,d=>(dt.test(d)?(i.color.push(l),s.push(C1),n.push(dt.parse(d))):d.startsWith(gI)?(i.var.push(l),s.push(mI),n.push(d)):(i.number.push(l),s.push(b1),n.push(parseFloat(d))),++l,iv)).split(iv);return{values:n,split:c,indexes:i,types:s}}function vI(e){return Gi(e).values}function E1({split:e,types:t}){const n=e.length;return i=>{let s="";for(let l=0;l<n;l++)if(s+=e[l],i[l]!==void 0){const a=t[l];a===b1?s+=rs(i[l]):a===C1?s+=dt.transform(i[l]):s+=i[l]}return s}}function xI(e){return E1(Gi(e))}const wI=e=>typeof e=="number"?0:dt.test(e)?dt.getAnimatableNone(e):e,kI=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:wI(e);function SI(e){const t=Gi(e);return E1(t)(t.values.map((i,s)=>kI(i,t.split[s])))}const Nn={test:pI,parse:vI,createTransformer:xI,getAnimatableNone:SI};function sf(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 bI({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,l=0,a=0;if(!t)s=l=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,d=2*n-c;s=sf(d,c,e+1/3),l=sf(d,c,e),a=sf(d,c,e-1/3)}return{red:Math.round(s*255),green:Math.round(l*255),blue:Math.round(a*255),alpha:i}}function kl(e,t){return n=>n>0?t:e}const qe=(e,t,n)=>e+(t-e)*n,af=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},CI=[Jf,ti,Ui],EI=e=>CI.find(t=>t.test(e));function ov(e){const t=EI(e);if(!t)return!1;let n=t.parse(e);return t===Ui&&(n=bI(n)),n}const sv=(e,t)=>{const n=ov(e),i=ov(t);if(!n||!i)return kl(e,t);const s={...n};return l=>(s.red=af(n.red,i.red,l),s.green=af(n.green,i.green,l),s.blue=af(n.blue,i.blue,l),s.alpha=qe(n.alpha,i.alpha,l),ti.transform(s))},ed=new Set(["none","hidden"]);function TI(e,t){return ed.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function PI(e,t){return n=>qe(e,t,n)}function Sh(e){return typeof e=="number"?PI:typeof e=="string"?xh(e)?kl:dt.test(e)?sv:MI:Array.isArray(e)?T1:typeof e=="object"?dt.test(e)?sv:RI:kl}function T1(e,t){const n=[...e],i=n.length,s=e.map((l,a)=>Sh(l)(l,t[a]));return l=>{for(let a=0;a<i;a++)n[a]=s[a](l);return n}}function RI(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=Sh(e[s])(e[s],t[s]));return s=>{for(const l in i)n[l]=i[l](s);return n}}function AI(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const l=t.types[s],a=e.indexes[l][i[l]],c=e.values[a]??0;n[s]=c,i[l]++}return n}const MI=(e,t)=>{const n=Nn.createTransformer(t),i=Gi(e),s=Gi(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?ed.has(e)&&!s.values.length||ed.has(t)&&!i.values.length?TI(e,t):Rs(T1(AI(i,s),s.values),n):kl(e,t)};function P1(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?qe(e,t,n):Sh(e)(e,t)}const NI=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Xe.update(t,n),stop:()=>jr(t),now:()=>Ct.isProcessing?Ct.timestamp:$t.now()}},R1=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let l=0;l<s;l++)i+=Math.round(e(l/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Sl=2e4;function bh(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<Sl;)t+=n,i=e.next(t);return t>=Sl?1/0:t}function jI(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(bh(i),Sl);return{type:"keyframes",ease:l=>i.next(s*l).value/t,duration:vn(s)}}const at={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 td(e,t){return e*Math.sqrt(1-t*t)}const DI=12;function II(e,t,n){let i=n;for(let s=1;s<DI;s++)i=i-e(i)/t(i);return i}const lf=.001;function _I({duration:e=at.duration,bounce:t=at.bounce,velocity:n=at.velocity,mass:i=at.mass}){let s,l,a=1-t;a=Hn(at.minDamping,at.maxDamping,a),e=Hn(at.minDuration,at.maxDuration,vn(e)),a<1?(s=h=>{const m=h*a,p=m*e,y=m-n,w=td(h,a),k=Math.exp(-p);return lf-y/w*k},l=h=>{const p=h*a*e,y=p*n+n,w=Math.pow(a,2)*Math.pow(h,2)*e,k=Math.exp(-p),C=td(Math.pow(h,2),a);return(-s(h)+lf>0?-1:1)*((y-w)*k)/C}):(s=h=>{const m=Math.exp(-h*e),p=(h-n)*e+1;return-lf+m*p},l=h=>{const m=Math.exp(-h*e),p=(n-h)*(e*e);return m*p});const c=5/e,d=II(s,l,c);if(e=an(e),isNaN(d))return{stiffness:at.stiffness,damping:at.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:a*2*Math.sqrt(i*h),duration:e}}}const LI=["duration","bounce"],OI=["stiffness","damping","mass"];function av(e,t){return t.some(n=>e[n]!==void 0)}function FI(e){let t={velocity:at.velocity,stiffness:at.stiffness,damping:at.damping,mass:at.mass,isResolvedFromDuration:!1,...e};if(!av(e,OI)&&av(e,LI))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,l=2*Hn(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:at.mass,stiffness:s,damping:l}}else{const n=_I({...e,velocity:0});t={...t,...n,mass:at.mass},t.isResolvedFromDuration=!0}return t}function bl(e=at.visualDuration,t=at.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const l=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:l},{stiffness:d,damping:h,mass:m,duration:p,velocity:y,isResolvedFromDuration:w}=FI({...n,velocity:-vn(n.velocity||0)}),k=y||0,C=h/(2*Math.sqrt(d*m)),T=a-l,E=vn(Math.sqrt(d/m)),M=Math.abs(T)<5;i||(i=M?at.restSpeed.granular:at.restSpeed.default),s||(s=M?at.restDelta.granular:at.restDelta.default);let A,L,H,D,Y,W;if(C<1)H=td(E,C),D=(k+C*E*T)/H,A=j=>{const G=Math.exp(-C*E*j);return a-G*(D*Math.sin(H*j)+T*Math.cos(H*j))},Y=C*E*D+T*H,W=C*E*T-D*H,L=j=>Math.exp(-C*E*j)*(Y*Math.sin(H*j)+W*Math.cos(H*j));else if(C===1){A=G=>a-Math.exp(-E*G)*(T+(k+E*T)*G);const j=k+E*T;L=G=>Math.exp(-E*G)*(E*j*G-k)}else{const j=E*Math.sqrt(C*C-1);A=se=>{const te=Math.exp(-C*E*se),xe=Math.min(j*se,300);return a-te*((k+C*E*T)*Math.sinh(xe)+j*T*Math.cosh(xe))/j};const G=(k+C*E*T)/j,$=C*E*G-T*j,fe=C*E*T-G*j;L=se=>{const te=Math.exp(-C*E*se),xe=Math.min(j*se,300);return te*($*Math.sinh(xe)+fe*Math.cosh(xe))}}const X={calculatedDuration:w&&p||null,velocity:j=>an(L(j)),next:j=>{if(!w&&C<1){const $=Math.exp(-C*E*j),fe=Math.sin(H*j),se=Math.cos(H*j),te=a-$*(D*fe+T*se),xe=an($*(Y*fe+W*se));return c.done=Math.abs(xe)<=i&&Math.abs(a-te)<=s,c.value=c.done?a:te,c}const G=A(j);if(w)c.done=j>=p;else{const $=an(L(j));c.done=Math.abs($)<=i&&Math.abs(a-G)<=s}return c.value=c.done?a:G,c},toString:()=>{const j=Math.min(bh(X),Sl),G=R1($=>X.next(j*$).value,j,30);return j+"ms "+G},toTransition:()=>{}};return X}bl.applyToOptions=e=>{const t=jI(e,100,bl);return e.ease=t.ease,e.duration=an(t.duration),e.type="keyframes",e};const zI=5;function A1(e,t,n){const i=Math.max(t-zI,0);return l1(n-e(i),t-i)}function nd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:l=500,modifyTarget:a,min:c,max:d,restDelta:h=.5,restSpeed:m}){const p=e[0],y={done:!1,value:p},w=W=>c!==void 0&&W<c||d!==void 0&&W>d,k=W=>c===void 0?d:d===void 0||Math.abs(c-W)<Math.abs(d-W)?c:d;let C=n*t;const T=p+C,E=a===void 0?T:a(T);E!==T&&(C=E-p);const M=W=>-C*Math.exp(-W/i),A=W=>E+M(W),L=W=>{const X=M(W),j=A(W);y.done=Math.abs(X)<=h,y.value=y.done?E:j};let H,D;const Y=W=>{w(y.value)&&(H=W,D=bl({keyframes:[y.value,k(y.value)],velocity:A1(A,W,y.value),damping:s,stiffness:l,restDelta:h,restSpeed:m}))};return Y(0),{calculatedDuration:null,next:W=>{let X=!1;return!D&&H===void 0&&(X=!0,L(W),Y(W)),H!==void 0&&W>=H?D.next(W-H):(!X&&L(W),y)}}}function VI(e,t,n){const i=[],s=n||Nr.mix||P1,l=e.length-1;for(let a=0;a<l;a++){let c=s(e[a],e[a+1]);if(t){const d=Array.isArray(t)?t[a]||xn:t;c=Rs(d,c)}i.push(c)}return i}function BI(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const l=e.length;if(Vl(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=VI(t,i,s),d=c.length,h=m=>{if(a&&m<e[0])return t[0];let p=0;if(d>1)for(;p<e.length-2&&!(m<e[p+1]);p++);const y=gs(e[p],e[p+1],m);return c[p](y)};return n?m=>h(Hn(e[0],e[l-1],m)):h}function $I(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=gs(0,t,i);e.push(qe(n,1,s))}}function UI(e){const t=[0];return $I(t,e.length-1),t}function HI(e,t){return e.map(n=>n*t)}function WI(e,t){return e.map(()=>t||y1).splice(0,e.length-1)}function is({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=JD(i)?i.map(tv):tv(i),l={done:!1,value:t[0]},a=HI(n&&n.length===t.length?n:UI(t),e),c=BI(a,t,{ease:Array.isArray(s)?s:WI(t,s)});return{calculatedDuration:e,next:d=>(l.value=c(d),l.done=d>=e,l)}}const KI=e=>e!==null;function Bl(e,{repeat:t,repeatType:n="loop"},i,s=1){const l=e.filter(KI),c=s<0||t&&n!=="loop"&&t%2===1?0:l.length-1;return!c||i===void 0?l[c]:i}const qI={decay:nd,inertia:nd,tween:is,keyframes:is,spring:bl};function M1(e){typeof e.type=="string"&&(e.type=qI[e.type])}class Ch{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 XI=e=>e/100;class Cl extends Ch{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!==$t.now()&&this.tick($t.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;M1(t);const{type:n=is,repeat:i=0,repeatDelay:s=0,repeatType:l,velocity:a=0}=t;let{keyframes:c}=t;const d=n||is;d!==is&&typeof c[0]!="number"&&(this.mixKeyframes=Rs(XI,P1(c[0],c[1])),c=[0,100]);const h=d({...t,keyframes:c});l==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...c].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=bh(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=h}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:i,totalDuration:s,mixKeyframes:l,mirroredGenerator:a,resolvedDuration:c,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:m,repeat:p,repeatType:y,repeatDelay:w,type:k,onUpdate:C,finalKeyframe:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const E=this.currentTime-h*(this.playbackSpeed>=0?1:-1),M=this.playbackSpeed>=0?E<0:E>s;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let A=this.currentTime,L=i;if(p){const W=Math.min(this.currentTime,s)/c;let X=Math.floor(W),j=W%1;!j&&W>=1&&(j=1),j===1&&X--,X=Math.min(X,p+1),!!(X%2)&&(y==="reverse"?(j=1-j,w&&(j-=w/c)):y==="mirror"&&(L=a)),A=Hn(0,1,j)*c}let H;M?(this.delayState.value=m[0],H=this.delayState):H=L.next(A),l&&!M&&(H.value=l(H.value));let{done:D}=H;!M&&d!==null&&(D=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const Y=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return Y&&k!==nd&&(H.value=Bl(m,this.options,T,this.speed)),C&&C(H.value),Y&&this.finish(),H}then(t,n){return this.finished.then(t,n)}get duration(){return vn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+vn(t)}get time(){return vn(this.currentTime)}set time(t){t=an(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 A1(i=>this.generator.next(i).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime($t.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=vn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=NI,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),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($t.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 YI(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ni=e=>e*180/Math.PI,rd=e=>{const t=ni(Math.atan2(e[1],e[0]));return id(t)},GI={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:rd,rotateZ:rd,skewX:e=>ni(Math.atan(e[1])),skewY:e=>ni(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},id=e=>(e=e%360,e<0&&(e+=360),e),lv=rd,uv=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),cv=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),QI={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:uv,scaleY:cv,scale:e=>(uv(e)+cv(e))/2,rotateX:e=>id(ni(Math.atan2(e[6],e[5]))),rotateY:e=>id(ni(Math.atan2(-e[2],e[0]))),rotateZ:lv,rotate:lv,skewX:e=>ni(Math.atan(e[4])),skewY:e=>ni(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function od(e){return e.includes("scale")?1:0}function sd(e,t){if(!e||e==="none")return od(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=QI,s=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=GI,s=c}if(!s)return od(t);const l=i[t],a=s[1].split(",").map(JI);return typeof l=="function"?l(a):a[l]}const ZI=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return sd(n,t)};function JI(e){return parseFloat(e.trim())}const ro=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],io=new Set([...ro,"pathRotation"]),fv=e=>e===no||e===ke,e_=new Set(["x","y","z"]),t_=ro.filter(e=>!e_.has(e));function n_(e){const t=[];return t_.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Pr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-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})=>sd(t,"x"),y:(e,{transform:t})=>sd(t,"y")};Pr.translateX=Pr.x;Pr.translateY=Pr.y;const oi=new Set;let ad=!1,ld=!1,ud=!1;function N1(){if(ld){const e=Array.from(oi).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=n_(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([l,a])=>{i.getValue(l)?.set(a)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}ld=!1,ad=!1,oi.forEach(e=>e.complete(ud)),oi.clear()}function j1(){oi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ld=!0)})}function r_(){ud=!0,j1(),N1(),ud=!1}class Eh{constructor(t,n,i,s,l,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=l,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(oi.add(this),ad||(ad=!0,Xe.read(j1),Xe.resolveKeyframes(N1))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const l=s?.get(),a=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&n){const c=i.readValue(n,a);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=a),s&&l===void 0&&s.set(t[0])}YI(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),oi.delete(this)}cancel(){this.state==="scheduled"&&(oi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const i_=e=>e.startsWith("--");function D1(e,t,n){i_(t)?e.style.setProperty(t,n):e.style[t]=n}const o_={};function I1(e,t){const n=a1(e);return()=>o_[t]??n()}const s_=I1(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),_1=I1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Zo=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,dv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Zo([0,.65,.55,1]),circOut:Zo([.55,0,1,.45]),backIn:Zo([.31,.01,.66,-.59]),backOut:Zo([.33,1.53,.69,.99])};function L1(e,t){if(e)return typeof e=="function"?_1()?R1(e,t):"ease-out":v1(e)?Zo(e):Array.isArray(e)?e.map(n=>L1(n,t)||dv.easeOut):dv[e]}function a_(e,t,n,{delay:i=0,duration:s=300,repeat:l=0,repeatType:a="loop",ease:c="easeOut",times:d}={},h=void 0){const m={[t]:n};d&&(m.offset=d);const p=L1(c,s);Array.isArray(p)&&(m.easing=p);const y={delay:i,duration:s,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:l+1,direction:a==="reverse"?"alternate":"normal"};return h&&(y.pseudoElement=h),e.animate(m,y)}function O1(e){return typeof e=="function"&&"applyToOptions"in e}function l_({type:e,...t}){return O1(e)&&_1()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class F1 extends Ch{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:l,allowFlatten:a=!1,finalKeyframe:c,onComplete:d}=t;this.isPseudoElement=!!l,this.allowFlatten=a,this.options=t,Vl(typeof t.type!="string");const h=l_(t);this.animation=a_(n,i,s,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const m=Bl(s,this.options,c,this.speed);this.updateMotionValue&&this.updateMotionValue(m),D1(n,i,m),this.animation.cancel()}d?.(),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 vn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+vn(t)}get time(){return vn(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=an(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:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&s_()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),xn):s(this)}}const z1={anticipate:p1,backInOut:h1,circInOut:g1};function u_(e){return e in z1}function c_(e){typeof e.ease=="string"&&u_(e.ease)&&(e.ease=z1[e.ease])}const uf=10;class f_ extends F1{constructor(t){c_(t),M1(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:l,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new Cl({...a,autoplay:!1}),d=Math.max(uf,$t.now()-this.startTime),h=Hn(0,uf,d-uf),m=c.sample(d).value,{name:p}=this.options;l&&p&&D1(l,p,m),n.setWithVelocity(c.sample(Math.max(0,d-h)).value,m,h),c.stop()}}const hv=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Nn.test(e)||e==="0")&&!e.startsWith("url("));function d_(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 h_(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],a=hv(s,t),c=hv(l,t);return!a||!c?!1:d_(e)||(n==="spring"||O1(n))&&i}function cd(e){e.duration=0,e.type="keyframes"}const V1=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),p_=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function m_(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&p_.test(e[t]))return!0;return!1}const g_=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),y_=a1(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function v_(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:l,type:a,keyframes:c}=e,d=t?.owner?.current;if(!(d instanceof HTMLElement)&&!(d instanceof SVGElement))return!1;const{onUpdate:h,transformTemplate:m}=t.owner.getProps();return y_()&&n&&(V1.has(n)||g_.has(n)&&m_(c))&&(n!=="transform"||!m)&&!h&&!i&&s!=="mirror"&&l!==0&&a!=="inertia"}const x_=40;class w_ extends Ch{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:l=0,repeatType:a="loop",keyframes:c,name:d,motionValue:h,element:m,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=$t.now();const y={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:l,repeatType:a,name:d,motionValue:h,element:m,...p},w=m?.KeyframeResolver||Eh;this.keyframeResolver=new w(c,(k,C,T)=>this.onKeyframesResolved(k,C,y,!T),d,h,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:l,type:a,velocity:c,delay:d,isHandoff:h,onUpdate:m}=i;this.resolvedAt=$t.now();let p=!0;h_(t,l,a,c)||(p=!1,(Nr.instantAnimations||!d)&&m?.(Bl(t,i,n)),t[0]=t[t.length-1],cd(i),i.repeat=0);const w={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>x_?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},k=p&&!h&&v_(w),C=w.motionValue?.owner?.current;let T;if(k)try{T=new f_({...w,element:C})}catch{T=new Cl(w)}else T=new Cl(w);T.finished.then(()=>{this.notifyFinished()}).catch(xn),this.pendingTimeline&&(this.stopTimeline=T.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=T}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(),r_()),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()}}function B1(e,t,n,i=0,s=1){const l=Array.from(e).sort((h,m)=>h.sortNodePosition(m)).indexOf(t),a=e.size,c=(a-1)*i;return typeof n=="function"?n(l,a):s===1?l*i:c-l*i}const pv=30,k_=e=>!isNaN(parseFloat(e));class S_{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=$t.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=$t.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=k_(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 gh);const i=this.events[t].add(n);return t==="change"?()=>{i(),Xe.read(()=>{this.events.change.getSize()||this.stop()})}:i}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,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}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=$t.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>pv)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,pv);return l1(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 Qi(e,t){return new S_(e,t)}function $1(e,t){if(e?.inherit&&t){const{inherit:n,...i}=e;return{...t,...i}}return e}function Th(e,t){const n=e?.[t]??e?.default??e;return n!==e?$1(n,e):n}const b_={type:"spring",stiffness:500,damping:25,restSpeed:10},C_=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),E_={type:"keyframes",duration:.8},T_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},P_=(e,{keyframes:t})=>t.length>2?E_:io.has(e)?e.startsWith("scale")?C_(t[1]):b_:T_,R_=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function A_(e){for(const t in e)if(!R_.has(t))return!0;return!1}const Ph=(e,t,n,i={},s,l)=>a=>{const c=Th(i,e)||{},d=c.delay||i.delay||0;let{elapsed:h=0}=i;h=h-an(d);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-h,onUpdate:y=>{t.set(y),c.onUpdate&&c.onUpdate(y)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:l?void 0:s};A_(c)||Object.assign(m,P_(e,m)),m.duration&&(m.duration=an(m.duration)),m.repeatDelay&&(m.repeatDelay=an(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let p=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(cd(m),m.delay===0&&(p=!0)),(Nr.instantAnimations||Nr.skipAnimations||s?.shouldSkipAnimations||c.skipAnimations)&&(p=!0,cd(m),m.delay=0),m.allowFlatten=!c.type&&!c.ease,p&&!l&&t.get()!==void 0){const y=Bl(m.keyframes,c);if(y!==void 0){Xe.update(()=>{m.onUpdate(y),m.onComplete()});return}}return c.isSync?new Cl(m):new w_(m)},M_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function N_(e){const t=M_.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}function U1(e,t,n=1){const[i,s]=N_(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const a=l.trim();return i1(a)?parseFloat(a):a}return xh(s)?U1(s,t,n+1):s}function mv(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function Rh(e,t,n,i){if(typeof t=="function"){const[s,l]=mv(i);t=t(n!==void 0?n:e.custom,s,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,l]=mv(i);t=t(n!==void 0?n:e.custom,s,l)}return t}function si(e,t,n){const i=e.getProps();return Rh(i,t,n!==void 0?n:i.custom,e)}const H1=new Set(["width","height","top","left","right","bottom",...ro]),fd=e=>Array.isArray(e);function j_(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qi(n))}function D_(e){return fd(e)?e[e.length-1]||0:e}function I_(e,t){const n=si(e,t);let{transitionEnd:i={},transition:s={},...l}=n||{};l={...l,...i};for(const a in l){const c=D_(l[a]);j_(e,a,c)}}const Et=e=>!!(e&&e.getVelocity);function __(e){return!!(Et(e)&&e.add)}function dd(e,t){const n=e.getValue("willChange");if(__(n))return n.add(t);if(!n&&Nr.WillChange){const i=new Nr.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function Ah(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const L_="framerAppearId",W1="data-"+Ah(L_);function K1(e){return e.props[W1]}function O_({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function q1(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:l,transitionEnd:a,...c}=t;const d=e.getDefaultTransition();l=l?$1(l,d):d;const h=l?.reduceMotion,m=l?.skipAnimations;i&&(l=i);const p=[],y=s&&e.animationState&&e.animationState.getState()[s],w=l?.path;w&&w.animateVisualElement(e,c,l,n,p);for(const k in c){const C=e.getValue(k,e.latestValues[k]??null),T=c[k];if(T===void 0||y&&O_(y,k))continue;const E={delay:n,...Th(l||{},k)};m&&(E.skipAnimations=!0);const M=C.get();if(M!==void 0&&!C.isAnimating()&&!Array.isArray(T)&&T===M&&!E.velocity){Xe.update(()=>C.set(T));continue}let A=!1;if(window.MotionHandoffAnimation){const D=K1(e);if(D){const Y=window.MotionHandoffAnimation(D,k,Xe);Y!==null&&(E.startTime=Y,A=!0)}}dd(e,k);const L=h??e.shouldReduceMotion;C.start(Ph(k,C,T,L&&H1.has(k)?{type:!1}:E,e,A));const H=C.animation;H&&p.push(H)}if(a){const k=()=>Xe.update(()=>{a&&I_(e,a)});p.length?Promise.all(p).then(k):k()}return p}function hd(e,t,n={}){const i=si(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const l=i?()=>Promise.all(q1(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:p}=s;return F_(e,t,d,h,m,p,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[d,h]=c==="beforeChildren"?[l,a]:[a,l];return d().then(()=>h())}else return Promise.all([l(),a(n.delay)])}function F_(e,t,n=0,i=0,s=0,l=1,a){const c=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),c.push(hd(d,t,{...a,delay:n+(typeof i=="function"?0:i)+B1(e.variantChildren,d,i,s,l)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(c)}function z_(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(l=>hd(e,l,n));i=Promise.all(s)}else if(typeof t=="string")i=hd(e,t,n);else{const s=typeof t=="function"?si(e,t,n.custom):t;i=Promise.all(q1(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const V_={test:e=>e==="auto",parse:e=>e},X1=e=>t=>t.test(e),Y1=[no,ke,Un,tr,dI,fI,V_],gv=e=>Y1.find(X1(e));function B_(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||s1(e):!0}const $_=new Set(["brightness","contrast","saturate","opacity"]);function U_(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(wh)||[];if(!i)return e;const s=n.replace(i,"");let l=$_.has(t)?1:0;return i!==n&&(l*=100),t+"("+l+s+")"}const H_=/\b([a-z-]*)\(.*?\)/gu,pd={...Nn,getAnimatableNone:e=>{const t=e.match(H_);return t?t.map(U_).join(" "):e}},md={...Nn,getAnimatableNone:e=>{const t=Nn.parse(e);return Nn.createTransformer(e)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},yv={...no,transform:Math.round},W_={rotate:tr,pathRotation:tr,rotateX:tr,rotateY:tr,rotateZ:tr,scale:Qa,scaleX:Qa,scaleY:Qa,scaleZ:Qa,skew:tr,skewX:tr,skewY:tr,distance:ke,translateX:ke,translateY:ke,translateZ:ke,x:ke,y:ke,z:ke,perspective:ke,transformPerspective:ke,opacity:ys,originX:rv,originY:rv,originZ:ke},El={borderWidth:ke,borderTopWidth:ke,borderRightWidth:ke,borderBottomWidth:ke,borderLeftWidth:ke,borderRadius:ke,borderTopLeftRadius:ke,borderTopRightRadius:ke,borderBottomRightRadius:ke,borderBottomLeftRadius:ke,width:ke,maxWidth:ke,height:ke,maxHeight:ke,top:ke,right:ke,bottom:ke,left:ke,inset:ke,insetBlock:ke,insetBlockStart:ke,insetBlockEnd:ke,insetInline:ke,insetInlineStart:ke,insetInlineEnd:ke,padding:ke,paddingTop:ke,paddingRight:ke,paddingBottom:ke,paddingLeft:ke,paddingBlock:ke,paddingBlockStart:ke,paddingBlockEnd:ke,paddingInline:ke,paddingInlineStart:ke,paddingInlineEnd:ke,margin:ke,marginTop:ke,marginRight:ke,marginBottom:ke,marginLeft:ke,marginBlock:ke,marginBlockStart:ke,marginBlockEnd:ke,marginInline:ke,marginInlineStart:ke,marginInlineEnd:ke,fontSize:ke,backgroundPositionX:ke,backgroundPositionY:ke,...W_,zIndex:yv,fillOpacity:ys,strokeOpacity:ys,numOctaves:yv},K_={...El,color:dt,backgroundColor:dt,outlineColor:dt,fill:dt,stroke:dt,borderColor:dt,borderTopColor:dt,borderRightColor:dt,borderBottomColor:dt,borderLeftColor:dt,filter:pd,WebkitFilter:pd,mask:md,WebkitMask:md},G1=e=>K_[e],q_=new Set([pd,md]);function Q1(e,t){let n=G1(e);return q_.has(n)||(n=Nn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const X_=new Set(["auto","none","0"]);function Y_(e,t,n){let i=0,s;for(;i<e.length&&!s;){const l=e[i];typeof l=="string"&&!X_.has(l)&&Gi(l).values.length&&(s=e[i]),i++}if(s&&n)for(const l of t)e[l]=Q1(n,s)}class G_ extends Eh{constructor(t,n,i,s,l){super(t,n,i,s,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let p=t[m];if(typeof p=="string"&&(p=p.trim(),xh(p))){const y=U1(p,n.current);y!==void 0&&(t[m]=y),m===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!H1.has(i)||t.length!==2)return;const[s,l]=t,a=gv(s),c=gv(l),d=nv(s),h=nv(l);if(d!==h&&Pr[i]){this.needsMeasurement=!0;return}if(a!==c)if(fv(a)&&fv(c))for(let m=0;m<t.length;m++){const p=t[m];typeof p=="string"&&(t[m]=parseFloat(p))}else Pr[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||B_(t[s]))&&i.push(s);i.length&&Y_(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Pr[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const l=i.length-1,a=i[l];i[l]=Pr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,d])=>{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}const Mh=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Z1(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=n?.[e]??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}const gd=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function sl(e){return o1(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Nh}=x1(queueMicrotask,!1),An={x:!1,y:!1};function J1(){return An.x||An.y}function Q_(e){return e==="x"||e==="y"?An[e]?null:(An[e]=!0,()=>{An[e]=!1}):An.x||An.y?null:(An.x=An.y=!0,()=>{An.x=An.y=!1})}function ek(e,t){const n=Z1(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function Z_(e){return!(e.pointerType==="touch"||J1())}function J_(e,t,n={}){const[i,s,l]=ek(e,n);return i.forEach(a=>{let c=!1,d=!1,h;const m=()=>{a.removeEventListener("pointerleave",k)},p=T=>{h&&(h(T),h=void 0),m()},y=T=>{c=!1,window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),d&&(d=!1,p(T))},w=()=>{c=!0,window.addEventListener("pointerup",y,s),window.addEventListener("pointercancel",y,s)},k=T=>{if(T.pointerType!=="touch"){if(c){d=!0;return}p(T)}},C=T=>{if(!Z_(T))return;d=!1;const E=t(a,T);typeof E=="function"&&(h=E,a.addEventListener("pointerleave",k,s))};a.addEventListener("pointerenter",C,s),a.addEventListener("pointerdown",w,s)}),l}const tk=(e,t)=>t?e===t?!0:tk(e,t.parentElement):!1,jh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,eL=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function tL(e){return eL.has(e.tagName)||e.isContentEditable===!0}const nL=new Set(["INPUT","SELECT","TEXTAREA"]);function rL(e){return nL.has(e.tagName)||e.isContentEditable===!0}const al=new WeakSet;function vv(e){return t=>{t.key==="Enter"&&e(t)}}function cf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const iL=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=vv(()=>{if(al.has(n))return;cf(n,"down");const s=vv(()=>{cf(n,"up")}),l=()=>cf(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",l,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function xv(e){return jh(e)&&!J1()}const wv=new WeakSet;function oL(e,t,n={}){const[i,s,l]=ek(e,n),a=c=>{const d=c.currentTarget;if(!xv(c)||wv.has(c))return;al.add(d),n.stopPropagation&&wv.add(c);const h=t(d,c),m={...s,capture:!0},p=(k,C)=>{window.removeEventListener("pointerup",y,m),window.removeEventListener("pointercancel",w,m),al.has(d)&&al.delete(d),xv(k)&&typeof h=="function"&&h(k,{success:C})},y=k=>{p(k,d===window||d===document||n.useGlobalTarget||tk(d,k.target))},w=k=>{p(k,!1)};window.addEventListener("pointerup",y,m),window.addEventListener("pointercancel",w,m)};return i.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,s),sl(c)&&(c.addEventListener("focus",h=>iL(h,s)),!tL(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),l}function Dh(e){return o1(e)&&"ownerSVGElement"in e}const ll=new WeakMap;let ul;const nk=(e,t,n)=>(i,s)=>s&&s[0]?s[0][e+"Size"]:Dh(i)&&"getBBox"in i?i.getBBox()[t]:i[n],sL=nk("inline","width","offsetWidth"),aL=nk("block","height","offsetHeight");function lL({target:e,borderBoxSize:t}){ll.get(e)?.forEach(n=>{n(e,{get width(){return sL(e,t)},get height(){return aL(e,t)}})})}function uL(e){e.forEach(lL)}function cL(){typeof ResizeObserver>"u"||(ul=new ResizeObserver(uL))}function fL(e,t){ul||cL();const n=Z1(e);return n.forEach(i=>{let s=ll.get(i);s||(s=new Set,ll.set(i,s)),s.add(t),ul?.observe(i)}),()=>{n.forEach(i=>{const s=ll.get(i);s?.delete(t),s?.size||ul?.unobserve(i)})}}const cl=new Set;let Hi;function dL(){Hi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};cl.forEach(t=>t(e))},window.addEventListener("resize",Hi)}function hL(e){return cl.add(e),Hi||dL(),()=>{cl.delete(e),!cl.size&&typeof Hi=="function"&&(window.removeEventListener("resize",Hi),Hi=void 0)}}function kv(e,t){return typeof e=="function"?hL(e):fL(e,t)}function pL(e){return Dh(e)&&e.tagName==="svg"}const mL=[...Y1,dt,Nn],gL=e=>mL.find(X1(e)),Sv=()=>({translate:0,scale:1,origin:0,originPoint:0}),Wi=()=>({x:Sv(),y:Sv()}),bv=()=>({min:0,max:0}),mt=()=>({x:bv(),y:bv()}),yL=new WeakMap;function $l(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function vs(e){return typeof e=="string"||Array.isArray(e)}const Ih=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_h=["initial",...Ih];function Ul(e){return $l(e.animate)||_h.some(t=>vs(e[t]))}function rk(e){return!!(Ul(e)||e.variants)}function vL(e,t,n){for(const i in t){const s=t[i],l=n[i];if(Et(s))e.addValue(i,s);else if(Et(l))e.addValue(i,Qi(s,{owner:e}));else if(l!==s)if(e.hasValue(i)){const a=e.getValue(i);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(i);e.addValue(i,Qi(a!==void 0?a:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const yd={current:null},ik={current:!1},xL=typeof window<"u";function wL(){if(ik.current=!0,!!xL)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>yd.current=e.matches;e.addEventListener("change",t),t()}else yd.current=!1}const Cv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Tl={};function ok(e){Tl=e}function kL(){return Tl}class SL{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:l,blockInitialAnimation:a,visualState:c},d={}){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=Eh,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 w=$t.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,Xe.render(this.render,!1,!0))};const{latestValues:h,renderState:m}=c;this.latestValues=h,this.baseTarget={...h},this.initialValues=n.initial?{...h}:{},this.renderState=m,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=l,this.options=d,this.blockInitialAnimation=!!a,this.isControllingVariants=Ul(n),this.isVariantNode=rk(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...y}=this.scrapeMotionValuesFromProps(n,{},this);for(const w in y){const k=y[w];h[w]!==void 0&&Et(k)&&k.set(h[w])}}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,yL.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,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ik.current||wL(),this.shouldReduceMotion=yd.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(),jr(this.notifyUpdate),jr(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&&V1.has(t)&&this.current instanceof HTMLElement){const{factory:a,keyframes:c,times:d,ease:h,duration:m}=n.accelerate,p=new F1({element:this.current,name:t,keyframes:c,times:d,ease:h,duration:an(m)}),y=a(p);this.valueSubscriptions.set(t,()=>{y(),p.cancel()});return}const i=io.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Xe.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),l&&l()})}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 Tl){const n=Tl[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):mt()}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 i=0;i<Cv.length;i++){const s=Cv[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const l="on"+s,a=t[l];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=vL(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 i=this.values.get(t);n!==i&&(i&&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 i=this.values.get(t);return i===void 0&&n!==void 0&&(i=Qi(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(i1(i)||s1(i))?i=parseFloat(i):!gL(i)&&Nn.test(n)&&(i=Q1(t,n)),this.setBaseTarget(t,Et(i)?i.get():i)),Et(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const l=Rh(this.props,n,this.presenceContext?.custom);l&&(i=l[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Et(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new gh),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Nh.render(this.render)}}class sk extends SL{constructor(){super(...arguments),this.KeyframeResolver=G_}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Et(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ir{constructor(t){this.isMounted=!1,this.node=t}update(){}}function ak({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function bL({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function CL(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function ff(e){return e===void 0||e===1}function vd({scale:e,scaleX:t,scaleY:n}){return!ff(e)||!ff(t)||!ff(n)}function ei(e){return vd(e)||lk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function lk(e){return Ev(e.x)||Ev(e.y)}function Ev(e){return e&&e!=="0%"}function Pl(e,t,n){const i=e-n,s=t*i;return n+s}function Tv(e,t,n,i,s){return s!==void 0&&(e=Pl(e,s,i)),Pl(e,n,i)+t}function xd(e,t=0,n=1,i,s){e.min=Tv(e.min,t,n,i,s),e.max=Tv(e.max,t,n,i,s)}function uk(e,{x:t,y:n}){xd(e.x,t.translate,t.scale,t.originPoint),xd(e.y,n.translate,n.scale,n.originPoint)}const Pv=.999999999999,Rv=1.0000000000001;function EL(e,t,n,i=!1){const s=n.length;if(!s)return;t.x=t.y=1;let l,a;for(let c=0;c<s;c++){l=n[c],a=l.projectionDelta;const{visualElement:d}=l.options;d&&d.props.style&&d.props.style.display==="contents"||(i&&l.options.layoutScroll&&l.scroll&&l!==l.root&&(Bn(e.x,-l.scroll.offset.x),Bn(e.y,-l.scroll.offset.y)),a&&(t.x*=a.x.scale,t.y*=a.y.scale,uk(e,a)),i&&ei(l.latestValues)&&fl(e,l.latestValues,l.layout?.layoutBox))}t.x<Rv&&t.x>Pv&&(t.x=1),t.y<Rv&&t.y>Pv&&(t.y=1)}function Bn(e,t){e.min+=t,e.max+=t}function Av(e,t,n,i,s=.5){const l=qe(e.min,e.max,s);xd(e,t,n,l,i)}function Mv(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function fl(e,t,n){const i=n??e;Av(e.x,Mv(t.x,i.x),t.scaleX,t.scale,t.originX),Av(e.y,Mv(t.y,i.y),t.scaleY,t.scale,t.originY)}function ck(e,t){return ak(CL(e.getBoundingClientRect(),t))}function TL(e,t,n){const i=ck(e,n),{scroll:s}=t;return s&&(Bn(i.x,s.offset.x),Bn(i.y,s.offset.y)),i}const PL={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},RL=ro.length;function AL(e,t,n){let i="",s=!0;for(let a=0;a<RL;a++){const c=ro[a],d=e[c];if(d===void 0)continue;let h=!0;if(typeof d=="number")h=d===(c.startsWith("scale")?1:0);else{const m=parseFloat(d);h=c.startsWith("scale")?m===1:m===0}if(!h||n){const m=gd(d,El[c]);if(!h){s=!1;const p=PL[c]||c;i+=`${p}(${m}) `}n&&(t[c]=m)}}const l=e.pathRotation;return l&&(s=!1,i+=`rotate(${gd(l,El.pathRotation)}) `),i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function Lh(e,t,n){const{style:i,vars:s,transformOrigin:l}=e;let a=!1,c=!1;for(const d in t){const h=t[d];if(io.has(d)){a=!0;continue}else if(k1(d)){s[d]=h;continue}else{const m=gd(h,El[d]);d.startsWith("origin")?(c=!0,l[d]=m):i[d]=m}}if(t.transform||(a||n?i.transform=AL(t,e.transform,n):i.transform&&(i.transform="none")),c){const{originX:d="50%",originY:h="50%",originZ:m=0}=l;i.transformOrigin=`${d} ${h} ${m}`}}function fk(e,{style:t,vars:n},i,s){const l=e.style;let a;for(a in t)l[a]=t[a];s?.applyProjectionStyles(l,i);for(a in n)l.setProperty(a,n[a])}function Nv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Go={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ke.test(e))e=parseFloat(e);else return e;const n=Nv(e,t.target.x),i=Nv(e,t.target.y);return`${n}% ${i}%`}},ML={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=Nn.parse(e);if(s.length>5)return i;const l=Nn.createTransformer(e),a=typeof s[0]!="number"?1:0,c=n.x.scale*t.x,d=n.y.scale*t.y;s[0+a]/=c,s[1+a]/=d;const h=qe(c,d,.5);return typeof s[2+a]=="number"&&(s[2+a]/=h),typeof s[3+a]=="number"&&(s[3+a]/=h),l(s)}},wd={borderRadius:{...Go,applyTo:[...Mh]},borderTopLeftRadius:Go,borderTopRightRadius:Go,borderBottomLeftRadius:Go,borderBottomRightRadius:Go,boxShadow:ML};function dk(e,{layout:t,layoutId:n}){return io.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!wd[e]||e==="opacity")}function Oh(e,t,n){const i=e.style,s=t?.style,l={};if(!i)return l;for(const a in i)(Et(i[a])||s&&Et(s[a])||dk(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(l[a]=i[a]);return l}function NL(e){return window.getComputedStyle(e)}class jL extends sk{constructor(){super(...arguments),this.type="html",this.renderInstance=fk}mount(t){Vl(!!t.style),super.mount(t)}readValueFromInstance(t,n){if(io.has(n))return this.projection?.isProjecting?od(n):ZI(t,n);{const i=NL(t),s=(k1(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ck(t,n)}build(t,n,i){Lh(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return Oh(t,n,i)}}const DL={offset:"stroke-dashoffset",array:"stroke-dasharray"},IL={offset:"strokeDashoffset",array:"strokeDasharray"};function _L(e,t,n=1,i=0,s=!0){e.pathLength=1;const l=s?DL:IL;e[l.offset]=`${-i}`,e[l.array]=`${t} ${n}`}const LL=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function hk(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:l=1,pathOffset:a=0,...c},d,h,m){if(Lh(e,c,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:y}=e;p.transform&&(y.transform=p.transform,delete p.transform),(y.transform||p.transformOrigin)&&(y.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),y.transform&&(y.transformBox=m?.transformBox??"fill-box",delete p.transformBox);for(const w of LL)p[w]!==void 0&&(y[w]=p[w],delete p[w]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),i!==void 0&&(p.scale=i),s!==void 0&&_L(p,s,l,a,!1)}const pk=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"]),mk=e=>typeof e=="string"&&e.toLowerCase()==="svg";function OL(e,t,n,i){fk(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(pk.has(s)?s:Ah(s),t.attrs[s])}function gk(e,t,n){const i=Oh(e,t,n);for(const s in e)if(Et(e[s])||Et(t[s])){const l=ro.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[l]=e[s]}return i}class FL extends sk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(io.has(n)){const i=G1(n);return i&&i.default||0}return n=pk.has(n)?n:Ah(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return gk(t,n,i)}build(t,n,i){hk(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){OL(t,n,i,s)}mount(t){this.isSVGTag=mk(t.tagName),super.mount(t)}}const zL=_h.length;function yk(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?yk(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<zL;n++){const i=_h[n],s=e.props[i];(vs(s)||s===!1)&&(t[i]=s)}return t}function vk(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const VL=[...Ih].reverse(),BL=Ih.length;function $L(e){return t=>Promise.all(t.map(({animation:n,options:i})=>z_(e,n,i)))}function UL(e){let t=$L(e),n=jv(),i=!0,s=!1;const l=h=>(m,p)=>{const y=si(e,p,h==="exit"?e.presenceContext?.custom:void 0);if(y){const{transition:w,transitionEnd:k,...C}=y;m={...m,...C,...k}}return m};function a(h){t=h(e)}function c(h){const{props:m}=e,p=yk(e.parent)||{},y=[],w=new Set;let k={},C=1/0;for(let E=0;E<BL;E++){const M=VL[E],A=n[M],L=m[M]!==void 0?m[M]:p[M],H=vs(L),D=M===h?A.isActive:null;D===!1&&(C=E);let Y=L===p[M]&&L!==m[M]&&H;if(Y&&(i||s)&&e.manuallyAnimateOnMount&&(Y=!1),A.protectedKeys={...k},!A.isActive&&D===null||!L&&!A.prevProp||$l(L)||typeof L=="boolean")continue;if(M==="exit"&&A.isActive&&D!==!0){A.prevResolvedValues&&(k={...k,...A.prevResolvedValues});continue}const W=HL(A.prevProp,L);let X=W||M===h&&A.isActive&&!Y&&H||E>C&&H,j=!1;const G=Array.isArray(L)?L:[L];let $=G.reduce(l(M),{});D===!1&&($={});const{prevResolvedValues:fe={}}=A,se={...fe,...$},te=q=>{X=!0,w.has(q)&&(j=!0,w.delete(q)),A.needsAnimating[q]=!0;const le=e.getValue(q);le&&(le.liveStyle=!1)};for(const q in se){const le=$[q],P=fe[q];if(k.hasOwnProperty(q))continue;let _=!1;fd(le)&&fd(P)?_=!vk(le,P)||W:_=le!==P,_?le!=null?te(q):w.add(q):le!==void 0&&w.has(q)?te(q):A.protectedKeys[q]=!0}A.prevProp=L,A.prevResolvedValues=$,A.isActive&&(k={...k,...$}),(i||s)&&e.blockInitialAnimation&&(X=!1);const xe=Y&&W;X&&(!xe||j)&&y.push(...G.map(q=>{const le={type:M};if(typeof q=="string"&&(i||s)&&!xe&&e.manuallyAnimateOnMount&&e.parent){const{parent:P}=e,_=si(P,q);if(P.enteringChildren&&_){const{delayChildren:Q}=_.transition||{};le.delay=B1(P.enteringChildren,e,Q)}}return{animation:q,options:le}}))}if(w.size){const E={};if(typeof m.initial!="boolean"){const M=si(e,Array.isArray(m.initial)?m.initial[0]:m.initial);M&&M.transition&&(E.transition=M.transition)}w.forEach(M=>{const A=e.getBaseTarget(M),L=e.getValue(M);L&&(L.liveStyle=!0),E[M]=A??null}),y.push({animation:E})}let T=!!y.length;return i&&(m.initial===!1||m.initial===m.animate)&&!e.manuallyAnimateOnMount&&(T=!1),i=!1,s=!1,T?t(y):Promise.resolve()}function d(h,m){if(n[h].isActive===m)return Promise.resolve();e.variantChildren?.forEach(y=>y.animationState?.setActive(h,m)),n[h].isActive=m;const p=c(h);for(const y in n)n[y].protectedKeys={};return p}return{animateChanges:c,setActive:d,setAnimateFunction:a,getState:()=>n,reset:()=>{n=jv(),s=!0}}}function HL(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!vk(t,e):!1}function Gr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function jv(){return{animate:Gr(!0),whileInView:Gr(),whileHover:Gr(),whileTap:Gr(),whileDrag:Gr(),whileFocus:Gr(),exit:Gr()}}function kd(e,t){e.min=t.min,e.max=t.max}function Rn(e,t){kd(e.x,t.x),kd(e.y,t.y)}function Dv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const xk=1e-4,WL=1-xk,KL=1+xk,wk=.01,qL=0-wk,XL=0+wk;function Ut(e){return e.max-e.min}function YL(e,t,n){return Math.abs(e-t)<=n}function Iv(e,t,n,i=.5){e.origin=i,e.originPoint=qe(t.min,t.max,e.origin),e.scale=Ut(n)/Ut(t),e.translate=qe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=WL&&e.scale<=KL||isNaN(e.scale))&&(e.scale=1),(e.translate>=qL&&e.translate<=XL||isNaN(e.translate))&&(e.translate=0)}function os(e,t,n,i){Iv(e.x,t.x,n.x,i?i.originX:void 0),Iv(e.y,t.y,n.y,i?i.originY:void 0)}function _v(e,t,n,i=0){const s=i?qe(n.min,n.max,i):n.min;e.min=s+t.min,e.max=e.min+Ut(t)}function GL(e,t,n,i){_v(e.x,t.x,n.x,i?.x),_v(e.y,t.y,n.y,i?.y)}function Lv(e,t,n,i=0){const s=i?qe(n.min,n.max,i):n.min;e.min=t.min-s,e.max=e.min+Ut(t)}function Rl(e,t,n,i){Lv(e.x,t.x,n.x,i?.x),Lv(e.y,t.y,n.y,i?.y)}function Ov(e,t,n,i,s){return e-=t,e=Pl(e,1/n,i),s!==void 0&&(e=Pl(e,1/s,i)),e}function QL(e,t=0,n=1,i=.5,s,l=e,a=e){if(Un.test(t)&&(t=parseFloat(t),t=qe(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=qe(l.min,l.max,i);e===l&&(c-=t),e.min=Ov(e.min,t,n,c,s),e.max=Ov(e.max,t,n,c,s)}function Fv(e,t,[n,i,s],l,a){QL(e,t[n],t[i],t[s],t.scale,l,a)}const ZL=["x","scaleX","originX"],JL=["y","scaleY","originY"];function zv(e,t,n,i){Fv(e.x,t,ZL,n?n.x:void 0,i?i.x:void 0),Fv(e.y,t,JL,n?n.y:void 0,i?i.y:void 0)}function Vv(e){return e.translate===0&&e.scale===1}function kk(e){return Vv(e.x)&&Vv(e.y)}function Bv(e,t){return e.min===t.min&&e.max===t.max}function eO(e,t){return Bv(e.x,t.x)&&Bv(e.y,t.y)}function $v(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Sk(e,t){return $v(e.x,t.x)&&$v(e.y,t.y)}function Uv(e){return Ut(e.x)/Ut(e.y)}function Hv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Vn(e){return[e("x"),e("y")]}function tO(e,t,n){let i="";const s=e.x.translate/t.x,l=e.y.translate/t.y,a=n?.z||0;if((s||l||a)&&(i=`translate3d(${s}px, ${l}px, ${a}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:m,pathRotation:p,rotateX:y,rotateY:w,skewX:k,skewY:C}=n;h&&(i=`perspective(${h}px) ${i}`),m&&(i+=`rotate(${m}deg) `),p&&(i+=`rotate(${p}deg) `),y&&(i+=`rotateX(${y}deg) `),w&&(i+=`rotateY(${w}deg) `),k&&(i+=`skewX(${k}deg) `),C&&(i+=`skewY(${C}deg) `)}const c=e.x.scale*t.x,d=e.y.scale*t.y;return(c!==1||d!==1)&&(i+=`scale(${c}, ${d})`),i||"none"}const nO=Mh.length,Wv=e=>typeof e=="string"?parseFloat(e):e,Kv=e=>typeof e=="number"||ke.test(e);function rO(e,t,n,i,s,l){s?(e.opacity=qe(0,n.opacity??1,iO(i)),e.opacityExit=qe(t.opacity??1,0,oO(i))):l&&(e.opacity=qe(t.opacity??1,n.opacity??1,i));for(let a=0;a<nO;a++){const c=Mh[a];let d=qv(t,c),h=qv(n,c);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||Kv(d)===Kv(h)?(e[c]=Math.max(qe(Wv(d),Wv(h),i),0),(Un.test(h)||Un.test(d))&&(e[c]+="%")):e[c]=h}(t.rotate||n.rotate)&&(e.rotate=qe(t.rotate||0,n.rotate||0,i))}function qv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const iO=bk(0,.5,m1),oO=bk(.5,.95,xn);function bk(e,t,n){return i=>i<e?0:i>t?1:n(gs(e,t,i))}function sO(e,t,n){const i=Et(e)?e:Qi(e);return i.start(Ph("",i,t,n)),i.animation}function xs(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}const aO=(e,t)=>e.depth-t.depth;class lO{constructor(){this.children=[],this.isDirty=!1}add(t){mh(this.children,t),this.isDirty=!0}remove(t){wl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(aO),this.isDirty=!1,this.children.forEach(t)}}function uO(e,t){const n=$t.now(),i=({timestamp:s})=>{const l=s-n;l>=t&&(jr(i),e(l-t))};return Xe.setup(i,!0),()=>jr(i)}function dl(e){return Et(e)?e.get():e}class cO{constructor(){this.members=[]}add(t){mh(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(wl(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(wl(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 i=this.members[n];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:l}=t.options;(s===void 0||s!==l)&&(t.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&i.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 hl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},df=["","X","Y","Z"],fO=1e3;let dO=0;function hf(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Ck(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=K1(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Xe,!(s||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Ck(i)}function Ek({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(a={},c=t?.()){this.id=dO++,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(mO),this.nodes.forEach(kO),this.nodes.forEach(SO),this.nodes.forEach(gO)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,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 d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new lO)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new gh),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const d=this.eventHandlers.get(a);d&&d.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Dh(a)&&!pL(a),this.instance=a;const{layoutId:c,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||c)&&(this.isLayoutDirty=!0),e){let m,p=0;const y=()=>this.root.updateBlockedByResize=!1;Xe.read(()=>{p=window.innerWidth}),e(a,()=>{const w=window.innerWidth;w!==p&&(p=w,this.root.updateBlockedByResize=!0,m&&m(),m=uO(y,250),hl.hasAnimatedSinceResize&&(hl.hasAnimatedSinceResize=!1,this.nodes.forEach(Gv)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&h&&(c||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:p,hasRelativeLayoutChanged:y,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=this.options.transition||h.getDefaultTransition()||PO,{onLayoutAnimationStart:C,onLayoutAnimationComplete:T}=h.getProps(),E=!this.targetLayout||!Sk(this.targetLayout,w),M=!p&&y;if(this.options.layoutRoot||this.resumeFrom||M||p&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const A={...Th(k,"layout"),onPlay:C,onComplete:T};(h.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A),this.setAnimationOrigin(m,M,A.path)}else p||Gv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),jr(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(bO),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ck(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const p=this.path[m];p.shouldResetTransform=!0,(typeof p.latestValues.x=="string"||typeof p.latestValues.y=="string")&&(p.isLayoutDirty=!0),p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:d}=this.options;if(c===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const d=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),d&&this.nodes.forEach(vO),this.nodes.forEach(Xv);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Yv);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(xO),this.nodes.forEach(wO),this.nodes.forEach(hO),this.nodes.forEach(pO)):this.nodes.forEach(Yv),this.clearAllSnapshots();const c=$t.now();Ct.delta=Hn(0,1e3/60,c-Ct.timestamp),Ct.timestamp=c,Ct.isProcessing=!0,rf.update.process(Ct),rf.preRender.process(Ct),rf.render.process(Ct),Ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Nh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yO),this.sharedNodes.forEach(CO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ut(this.snapshot.measuredBox.x)&&!Ut(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 d=0;d<this.path.length;d++)this.path[d].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=mt()),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,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c&&this.instance){const d=i(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!kk(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;a&&this.instance&&(c||ei(this.latestValues)||m)&&(s(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let d=this.removeElementScroll(c);return a&&(d=this.removeTransform(d)),RO(d),{animationId:this.root.animationId,measuredBox:c,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return mt();const c=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(AO))){const{scroll:h}=this.root;h&&(Bn(c.x,h.offset.x),Bn(c.y,h.offset.y))}return c}removeElementScroll(a){const c=mt();if(Rn(c,a),this.scroll?.wasRoot)return c;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:m,options:p}=h;h!==this.root&&m&&p.layoutScroll&&(m.wasRoot&&Rn(c,a),Bn(c.x,m.offset.x),Bn(c.y,m.offset.y))}return c}applyTransform(a,c=!1,d){const h=d||mt();Rn(h,a);for(let m=0;m<this.path.length;m++){const p=this.path[m];!c&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(Bn(h.x,-p.scroll.offset.x),Bn(h.y,-p.scroll.offset.y)),ei(p.latestValues)&&fl(h,p.latestValues,p.layout?.layoutBox)}return ei(this.latestValues)&&fl(h,this.latestValues,this.layout?.layoutBox),h}removeTransform(a){const c=mt();Rn(c,a);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!ei(h.latestValues))continue;let m;h.instance&&(vd(h.latestValues)&&h.updateSnapshot(),m=mt(),Rn(m,h.measurePageBox())),zv(c,h.latestValues,h.snapshot?.layoutBox,m)}return ei(this.latestValues)&&zv(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==Ct.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==c;if(!(a||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:p}=this.options;if(!this.layout||!(m||p))return;this.resolvedRelativeTargetAt=Ct.timestamp;const y=this.getClosestProjectingParent();y&&this.linkedParentVersion!==y.layoutVersion&&!y.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&y&&y.layout?this.createRelativeTarget(y,this.layout.layoutBox,y.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=mt(),this.targetWithTransforms=mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),GL(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Rn(this.target,this.layout.layoutBox),uk(this.target,this.targetDelta)):Rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?this.createRelativeTarget(y,this.target,y.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||vd(this.parent.latestValues)||lk(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,c,d){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Rl(this.relativeTargetOrigin,c,d,this.options.layoutAnchor||void 0),Rn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),c=!!this.resumingFrom||this!==a;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===Ct.timestamp&&(d=!1),d)return;const{layout:h,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||!(h||m))return;Rn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,y=this.treeScale.y;EL(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=mt());const{target:w}=a;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Dv(this.prevProjectionDelta.x,this.projectionDelta.x),Dv(this.prevProjectionDelta.y,this.projectionDelta.y)),os(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==y||!Hv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Hv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Wi(),this.projectionDelta=Wi(),this.projectionDeltaWithTransform=Wi()}setAnimationOrigin(a,c=!1,d){const h=this.snapshot,m=h?h.latestValues:{},p={...this.latestValues},y=Wi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const w=mt(),k=h?h.source:void 0,C=this.layout?this.layout.source:void 0,T=k!==C,E=this.getStack(),M=!E||E.members.length<=1,A=!!(T&&!M&&this.options.crossfade===!0&&!this.path.some(TO));this.animationProgress=0;let L;const H=d?.interpolateProjection(a);this.mixTargetDelta=D=>{const Y=D/1e3,W=H?.(Y);W?(y.x.translate=W.x,y.x.scale=qe(a.x.scale,1,Y),y.x.origin=a.x.origin,y.x.originPoint=a.x.originPoint,y.y.translate=W.y,y.y.scale=qe(a.y.scale,1,Y),y.y.origin=a.y.origin,y.y.originPoint=a.y.originPoint):(Qv(y.x,a.x,Y),Qv(y.y,a.y,Y)),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rl(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),EO(this.relativeTarget,this.relativeTargetOrigin,w,Y),L&&eO(this.relativeTarget,L)&&(this.isProjectionDirty=!1),L||(L=mt()),Rn(L,this.relativeTarget)),T&&(this.animationValues=p,rO(p,m,this.latestValues,Y,A,M)),W&&W.rotate!==void 0&&(this.animationValues||(this.animationValues=p),this.animationValues.pathRotation=W.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=Y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(jr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xe.update(()=>{hl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Qi(0)),this.motionValue.jump(0,!1),this.currentAnimation=sO(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fO),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:d,layout:h,latestValues:m}=a;if(!(!c||!d||!h)){if(this!==a&&this.layout&&h&&Tk(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||mt();const p=Ut(this.layout.layoutBox.x);d.x.min=a.target.x.min,d.x.max=d.x.min+p;const y=Ut(this.layout.layoutBox.y);d.y.min=a.target.y.min,d.y.max=d.y.min+y}Rn(c,d),fl(c,m),os(this.projectionDeltaWithTransform,this.layoutCorrected,c,m)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new cO),this.sharedNodes.get(a).add(c);const h=c.options.initialPromotionConfig;c.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:d}=a;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(c=!0),!c)return;const h={};d.z&&hf("z",a,h,this.animationValues);for(let m=0;m<df.length;m++)hf(`rotate${df[m]}`,a,h,this.animationValues),hf(`skew${df[m]}`,a,h,this.animationValues);a.render();for(const m in h)a.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);a.scheduleRender()}applyProjectionStyles(a,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=dl(c?.pointerEvents)||"",a.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=dl(c?.pointerEvents)||""),this.hasProjected&&!ei(this.latestValues)&&(a.transform=d?d({},""):"none",this.hasProjected=!1);return}a.visibility="";const m=h.animationValues||h.latestValues;this.applyTransformsToTarget();let p=tO(this.projectionDeltaWithTransform,this.treeScale,m);d&&(p=d(m,p)),a.transform=p;const{x:y,y:w}=this.projectionDelta;a.transformOrigin=`${y.origin*100}% ${w.origin*100}% 0`,h.animationValues?a.opacity=h===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:a.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const k in wd){if(m[k]===void 0)continue;const{correct:C,applyTo:T,isCSSVariable:E}=wd[k],M=p==="none"?m[k]:C(m[k],h);if(T){const A=T.length;for(let L=0;L<A;L++)a[T[L]]=M}else E?this.options.visualElement.renderState.vars[k]=M:a[k]=M}this.options.layoutId&&(a.pointerEvents=h===this?dl(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Xv),this.root.sharedNodes.clear()}}}function hO(e){e.updateLayout()}function pO(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:s}=e.options,l=t.source!==e.layout.source;if(s==="size")Vn(m=>{const p=l?t.measuredBox[m]:t.layoutBox[m],y=Ut(p);p.min=n[m].min,p.max=p.min+y});else if(s==="x"||s==="y"){const m=s==="x"?"y":"x";kd(l?t.measuredBox[m]:t.layoutBox[m],n[m])}else Tk(s,t.layoutBox,n)&&Vn(m=>{const p=l?t.measuredBox[m]:t.layoutBox[m],y=Ut(n[m]);p.max=p.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+y)});const a=Wi();os(a,n,t.layoutBox);const c=Wi();l?os(c,e.applyTransform(i,!0),t.measuredBox):os(c,n,t.layoutBox);const d=!kk(a);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:p,layout:y}=m;if(p&&y){const w=e.options.layoutAnchor||void 0,k=mt();Rl(k,t.layoutBox,p.layoutBox,w);const C=mt();Rl(C,n,y.layoutBox,w),Sk(k,C)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=C,e.relativeTargetOrigin=k,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function mO(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 gO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function yO(e){e.clearSnapshot()}function Xv(e){e.clearMeasurements()}function vO(e){e.isLayoutDirty=!0,e.updateLayout()}function Yv(e){e.isLayoutDirty=!1}function xO(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function wO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Gv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function kO(e){e.resolveTargetDelta()}function SO(e){e.calcProjection()}function bO(e){e.resetSkewAndRotation()}function CO(e){e.removeLeadSnapshot()}function Qv(e,t,n){e.translate=qe(t.translate,0,n),e.scale=qe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Zv(e,t,n,i){e.min=qe(t.min,n.min,i),e.max=qe(t.max,n.max,i)}function EO(e,t,n,i){Zv(e.x,t.x,n.x,i),Zv(e.y,t.y,n.y,i)}function TO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const PO={duration:.45,ease:[.4,0,.1,1]},Jv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ex=Jv("applewebkit/")&&!Jv("chrome/")?Math.round:xn;function tx(e){e.min=ex(e.min),e.max=ex(e.max)}function RO(e){tx(e.x),tx(e.y)}function Tk(e,t,n){return e==="position"||e==="preserve-aspect"&&!YL(Uv(t),Uv(n),.2)}function AO(e){return e!==e.root&&e.scroll?.wasRoot}const MO=Ek({attachResizeListener:(e,t)=>xs(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),pf={current:void 0},Pk=Ek({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!pf.current){const e=new MO({});e.mount(window),e.setOptions({layoutScroll:!0}),pf.current=e}return pf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Fh=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function nx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function NO(...e){return t=>{let n=!1;const i=e.map(s=>{const l=nx(s,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():nx(e[s],null)}}}}function jO(...e){return S.useCallback(NO(...e),e)}class DO extends S.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(sl(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=n.offsetParent,s=sl(i)&&i.offsetWidth||0,l=sl(i)&&i.offsetHeight||0,a=getComputedStyle(n),c=this.props.sizeRef.current;c.height=parseFloat(a.height),c.width=parseFloat(a.width),c.top=n.offsetTop,c.left=n.offsetLeft,c.right=s-c.width-c.left,c.bottom=l-c.height-c.top,c.direction=a.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function IO({children:e,isPresent:t,anchorX:n,anchorY:i,root:s,pop:l}){const a=S.useId(),c=S.useRef(null),d=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:h}=S.useContext(Fh),m=l!==!1?e.props?.ref??e?.ref:void 0,p=jO(c,m);return S.useInsertionEffect(()=>{const{width:y,height:w,top:k,left:C,right:T,bottom:E,direction:M}=d.current;if(t||l===!1||!c.current||!y||!w)return;const A=M==="rtl",L=n==="left"?A?`right: ${T}`:`left: ${C}`:A?`left: ${C}`:`right: ${T}`,H=i==="bottom"?`bottom: ${E}`:`top: ${k}`;c.current.dataset.motionPopId=a;const D=document.createElement("style");h&&(D.nonce=h);const Y=s??document.head;return Y.appendChild(D),D.sheet&&D.sheet.insertRule(`
|
|
314
|
+
[data-motion-pop-id="${a}"] {
|
|
315
|
+
position: absolute !important;
|
|
316
|
+
width: ${y}px !important;
|
|
317
|
+
height: ${w}px !important;
|
|
318
|
+
${L}px !important;
|
|
319
|
+
${H}px !important;
|
|
320
|
+
}
|
|
321
|
+
`),()=>{c.current?.removeAttribute("data-motion-pop-id"),Y.contains(D)&&Y.removeChild(D)}},[t]),v.jsx(DO,{isPresent:t,childRef:c,sizeRef:d,pop:l,children:l===!1?e:S.cloneElement(e,{ref:p})})}const _O=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:l,mode:a,anchorX:c,anchorY:d,root:h})=>{const m=hh(LO),p=S.useId(),y=S.useRef(n),w=S.useRef(i);ph(()=>{y.current=n,w.current=i});let k=!0,C=S.useMemo(()=>(k=!1,{id:p,initial:t,isPresent:n,custom:s,onExitComplete:T=>{m.set(T,!0);for(const E of m.values())if(!E)return;i&&i()},register:T=>(m.set(T,!1),()=>{m.delete(T),!y.current&&!m.size&&w.current?.()})}),[n,m,i]);return l&&k&&(C={...C}),S.useMemo(()=>{m.forEach((T,E)=>m.set(E,!1))},[n]),S.useEffect(()=>{!n&&!m.size&&i&&i()},[n]),e=v.jsx(IO,{pop:a==="popLayout",isPresent:n,anchorX:c,anchorY:d,root:h,children:e}),v.jsx(zl.Provider,{value:C,children:e})};function LO(){return new Map}function Rk(e=!0){const t=S.useContext(zl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,l=S.useId();S.useEffect(()=>{if(e)return s(l)},[e]);const a=S.useCallback(()=>e&&i&&i(l),[l,i,e]);return!n&&i?[!1,a]:[!0]}const Za=e=>e.key||"";function rx(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const OO=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:l="sync",propagate:a=!1,anchorX:c="left",anchorY:d="top",root:h})=>{const[m,p]=Rk(a),y=S.useMemo(()=>rx(e),[e]),w=a&&!m?[]:y.map(Za),k=S.useRef(!0),C=S.useRef(y),T=hh(()=>new Map),E=S.useRef(new Set),[M,A]=S.useState(y),[L,H]=S.useState(y);ph(()=>{k.current=!1,C.current=y;for(let W=0;W<L.length;W++){const X=Za(L[W]);w.includes(X)?(T.delete(X),E.current.delete(X)):T.get(X)!==!0&&T.set(X,!1)}},[L,w.length,w.join("-")]);const D=[];if(y!==M){let W=[...y];for(let X=0;X<L.length;X++){const j=L[X],G=Za(j);w.includes(G)||(W.splice(X,0,j),D.push(j))}return l==="wait"&&D.length&&(W=D),H(rx(W)),A(y),null}const{forceRender:Y}=S.useContext(dh);return v.jsx(v.Fragment,{children:L.map(W=>{const X=Za(W),j=a&&!m?!1:y===L||w.includes(X),G=()=>{if(E.current.has(X))return;if(T.has(X))E.current.add(X),T.set(X,!0);else return;let $=!0;T.forEach(fe=>{fe||($=!1)}),$&&(Y?.(),H(C.current),a&&p?.(),i&&i())};return v.jsx(_O,{isPresent:j,initial:!k.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:l,root:h,onExitComplete:j?void 0:G,anchorX:c,anchorY:d,children:W},X)})})},Ak=S.createContext({strict:!1}),ix={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 ox=!1;function FO(){if(ox)return;const e={};for(const t in ix)e[t]={isEnabled:n=>ix[t].some(i=>!!n[i])};ok(e),ox=!0}function Mk(){return FO(),kL()}function zO(e){const t=Mk();for(const n in e)t[n]={...t[n],...e[n]};ok(t)}const VO=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 Al(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||VO.has(e)}let Nk=e=>!Al(e);function BO(e){typeof e=="function"&&(Nk=t=>t.startsWith("on")?!Al(t):e(t))}try{BO(require("@emotion/is-prop-valid").default)}catch{}function $O(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||Et(e[s])||(Nk(s)||n===!0&&Al(s)||!t&&!Al(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const Hl=S.createContext({});function UO(e,t){if(Ul(e)){const{initial:n,animate:i}=e;return{initial:n===!1||vs(n)?n:void 0,animate:vs(i)?i:void 0}}return e.inherit!==!1?t:{}}function HO(e){const{initial:t,animate:n}=UO(e,S.useContext(Hl));return S.useMemo(()=>({initial:t,animate:n}),[sx(t),sx(n)])}function sx(e){return Array.isArray(e)?e.join(" "):e}const zh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jk(e,t,n){for(const i in t)!Et(t[i])&&!dk(i,n)&&(e[i]=t[i])}function WO({transformTemplate:e},t){return S.useMemo(()=>{const n=zh();return Lh(n,t,e),Object.assign({},n.vars,n.style)},[t])}function KO(e,t){const n=e.style||{},i={};return jk(i,n,e),Object.assign(i,WO(e,t)),i}function qO(e,t){const n={},i=KO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.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=i,n}const Dk=()=>({...zh(),attrs:{}});function XO(e,t,n,i){const s=S.useMemo(()=>{const l=Dk();return hk(l,t,mk(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};jk(l,e.style,e),s.style={...l,...s.style}}return s}const YO=["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 Vh(e){return typeof e!="string"||e.includes("-")?!1:!!(YO.indexOf(e)>-1||/[A-Z]/u.test(e))}function GO(e,t,n,{latestValues:i},s,l=!1,a){const d=(a??Vh(e)?XO:qO)(t,i,s,e),h=$O(t,typeof e=="string",l),m=e!==S.Fragment?{...h,...d,ref:n}:{},{children:p}=t,y=S.useMemo(()=>Et(p)?p.get():p,[p]);return S.createElement(e,{...m,children:y})}function QO({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:ZO(n,i,s,e),renderState:t()}}function ZO(e,t,n,i){const s={},l=i(e,{});for(const y in l)s[y]=dl(l[y]);let{initial:a,animate:c}=e;const d=Ul(e),h=rk(e);t&&h&&!d&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let m=n?n.initial===!1:!1;m=m||a===!1;const p=m?c:a;if(p&&typeof p!="boolean"&&!$l(p)){const y=Array.isArray(p)?p:[p];for(let w=0;w<y.length;w++){const k=Rh(e,y[w]);if(k){const{transitionEnd:C,transition:T,...E}=k;for(const M in E){let A=E[M];if(Array.isArray(A)){const L=m?A.length-1:0;A=A[L]}A!==null&&(s[M]=A)}for(const M in C)s[M]=C[M]}}}return s}const Ik=e=>(t,n)=>{const i=S.useContext(Hl),s=S.useContext(zl),l=()=>QO(e,t,i,s);return n?l():hh(l)},JO=Ik({scrapeMotionValuesFromProps:Oh,createRenderState:zh}),eF=Ik({scrapeMotionValuesFromProps:gk,createRenderState:Dk}),tF=Symbol.for("motionComponentSymbol");function nF(e,t,n){const i=S.useRef(n);S.useInsertionEffect(()=>{i.current=n});const s=S.useRef(null);return S.useCallback(l=>{l&&e.onMount?.(l),t&&(l?t.mount(l):t.unmount());const a=i.current;if(typeof a=="function")if(l){const c=a(l);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):a(l);else a&&(a.current=l)},[t])}const _k=S.createContext({});function $i(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function rF(e,t,n,i,s,l){const{visualElement:a}=S.useContext(Hl),c=S.useContext(Ak),d=S.useContext(zl),h=S.useContext(Fh),m=h.reducedMotion,p=h.skipAnimations,y=S.useRef(null),w=S.useRef(!1);i=i||c.renderer,!y.current&&i&&(y.current=i(e,{visualState:t,parent:a,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:m,skipAnimations:p,isSVG:l}),w.current&&y.current&&(y.current.manuallyAnimateOnMount=!0));const k=y.current,C=S.useContext(_k);k&&!k.projection&&s&&(k.type==="html"||k.type==="svg")&&iF(y.current,n,s,C);const T=S.useRef(!1);S.useInsertionEffect(()=>{k&&T.current&&k.update(n,d)});const E=n[W1],M=S.useRef(!!E&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(E)&&window.MotionHasOptimisedAnimation?.(E));return ph(()=>{w.current=!0,k&&(T.current=!0,window.MotionIsMounted=!0,k.updateFeatures(),k.scheduleRenderMicrotask(),M.current&&k.animationState&&k.animationState.animateChanges())}),S.useEffect(()=>{k&&(!M.current&&k.animationState&&k.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(E)}),M.current=!1),k.enteringChildren=void 0)}),k}function iF(e,t,n,i){const{layoutId:s,layout:l,drag:a,dragConstraints:c,layoutScroll:d,layoutRoot:h,layoutAnchor:m,layoutCrossfade:p}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Lk(e.parent)),e.projection.setOptions({layoutId:s,layout:l,alwaysMeasureLayout:!!a||c&&$i(c),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:p,layoutScroll:d,layoutRoot:h,layoutAnchor:m})}function Lk(e){if(e)return e.options.allowProjection!==!1?e.projection:Lk(e.parent)}function mf(e,{forwardMotionProps:t=!1,type:n}={},i,s){i&&zO(i);const l=n?n==="svg":Vh(e),a=l?eF:JO;function c(h,m){let p;const y={...S.useContext(Fh),...h,layoutId:oF(h)},{isStatic:w}=y,k=HO(h),C=a(h,w);if(!w&&typeof window<"u"){sF();const T=aF(y);p=T.MeasureLayout,k.visualElement=rF(e,C,y,s,T.ProjectionNode,l)}return v.jsxs(Hl.Provider,{value:k,children:[p&&k.visualElement?v.jsx(p,{visualElement:k.visualElement,...y}):null,GO(e,h,nF(C,k.visualElement,m),C,w,t,l)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=S.forwardRef(c);return d[tF]=e,d}function oF({layoutId:e}){const t=S.useContext(dh).id;return t&&e!==void 0?t+"-"+e:e}function sF(e,t){S.useContext(Ak).strict}function aF(e){const t=Mk(),{drag:n,layout:i}=t;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n?.isEnabled(e)||i?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function lF(e,t){if(typeof Proxy>"u")return mf;const n=new Map,i=(l,a)=>mf(l,a,e,t),s=(l,a)=>i(l,a);return new Proxy(s,{get:(l,a)=>a==="create"?i:(n.has(a)||n.set(a,mf(a,void 0,e,t)),n.get(a))})}const uF=(e,t)=>t.isSVG??Vh(e)?new FL(t):new jL(t,{allowProjection:e!==S.Fragment});class cF extends Ir{constructor(t){super(t),t.animationState||(t.animationState=UL(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();$l(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 fF=0;class dF extends Ir{constructor(){super(...arguments),this.id=fF++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;if(t&&i===!1){if(this.isExitComplete){const{initial:l,custom:a}=this.node.getProps();if(typeof l=="string"||typeof l=="object"&&l!==null&&!Array.isArray(l)){const c=si(this.node,l,a);if(c){const{transition:d,transitionEnd:h,...m}=c;for(const p in m)this.node.getValue(p)?.jump(m[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.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 hF={animation:{Feature:cF},exit:{Feature:dF}};function Ns(e){return{point:{x:e.pageX,y:e.pageY}}}const pF=e=>t=>jh(t)&&e(t,Ns(t));function ss(e,t,n,i){return xs(e,t,pF(n),i)}const Ok=({current:e})=>e?e.ownerDocument.defaultView:null,ax=(e,t)=>Math.abs(e-t);function mF(e,t){const n=ax(e.x,t.x),i=ax(e.y,t.y);return Math.sqrt(n**2+i**2)}const lx=new Set(["auto","scroll"]);class Fk{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:l=!1,distanceThreshold:a=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=k=>{this.handleScroll(k.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ja(this.lastRawMoveEventInfo,this.transformPagePoint));const k=gf(this.lastMoveEventInfo,this.history),C=this.startEvent!==null,T=mF(k.offset,{x:0,y:0})>=this.distanceThreshold;if(!C&&!T)return;const{point:E}=k,{timestamp:M}=Ct;this.history.push({...E,timestamp:M});const{onStart:A,onMove:L}=this.handlers;C||(A&&A(this.lastMoveEvent,k),this.startEvent=this.lastMoveEvent),L&&L(this.lastMoveEvent,k)},this.handlePointerMove=(k,C)=>{this.lastMoveEvent=k,this.lastRawMoveEventInfo=C,this.lastMoveEventInfo=Ja(C,this.transformPagePoint),Xe.update(this.updatePoint,!0)},this.handlePointerUp=(k,C)=>{this.end();const{onEnd:T,onSessionEnd:E,resumeAnimation:M}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&M&&M(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=gf(k.type==="pointercancel"?this.lastMoveEventInfo:Ja(C,this.transformPagePoint),this.history);this.startEvent&&T&&T(k,A),E&&E(k,A)},!jh(t))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=a,this.contextWindow=s||window;const d=Ns(t),h=Ja(d,this.transformPagePoint),{point:m}=h,{timestamp:p}=Ct;this.history=[{...m,timestamp:p}];const{onSessionStart:y}=n;y&&y(t,gf(h,this.history));const w={passive:!0,capture:!0};this.removeListeners=Rs(ss(this.contextWindow,"pointermove",this.handlePointerMove,w),ss(this.contextWindow,"pointerup",this.handlePointerUp,w),ss(this.contextWindow,"pointercancel",this.handlePointerUp,w)),c&&this.startScrollTracking(c)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(lx.has(i.overflowX)||lx.has(i.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 i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},l={x:s.x-n.x,y:s.y-n.y};l.x===0&&l.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,s),Xe.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),jr(this.updatePoint)}}function Ja(e,t){return t?{point:t(e.point)}:e}function ux(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gf({point:e},t){return{point:e,delta:ux(e,zk(t)),offset:ux(e,gF(t)),velocity:yF(t,.1)}}function gF(e){return e[0]}function zk(e){return e[e.length-1]}function yF(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=zk(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>an(t)));)n--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&s.timestamp-i.timestamp>an(t)*2&&(i=e[1]);const l=vn(s.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const a={x:(s.x-i.x)/l,y:(s.y-i.y)/l};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function vF(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?qe(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?qe(n,e,i.max):Math.min(e,n)),e}function cx(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 xF(e,{top:t,left:n,bottom:i,right:s}){return{x:cx(e.x,n,s),y:cx(e.y,t,i)}}function fx(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function wF(e,t){return{x:fx(e.x,t.x),y:fx(e.y,t.y)}}function kF(e,t){let n=.5;const i=Ut(e),s=Ut(t);return s>i?n=gs(t.min,t.max-i,e.min):i>s&&(n=gs(e.min,e.max-s,t.min)),Hn(0,1,n)}function SF(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 Sd=.35;function bF(e=Sd){return e===!1?e=0:e===!0&&(e=Sd),{x:dx(e,"left","right"),y:dx(e,"top","bottom")}}function dx(e,t,n){return{min:hx(e,t),max:hx(e,n)}}function hx(e,t){return typeof e=="number"?e:e[t]||0}const CF=new WeakMap;class EF{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=mt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const l=p=>{n&&this.snapToCursor(Ns(p).point),this.stopAnimation()},a=(p,y)=>{const{drag:w,dragPropagation:k,onDragStart:C}=this.getProps();if(w&&!k&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Q_(w),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=y,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Vn(E=>{let M=this.getAxisMotionValue(E).get()||0;if(Un.test(M)){const{projection:A}=this.visualElement;if(A&&A.layout){const L=A.layout.layoutBox[E];L&&(M=Ut(L)*(parseFloat(M)/100))}}this.originPoint[E]=M}),C&&Xe.update(()=>C(p,y),!1,!0),dd(this.visualElement,"transform");const{animationState:T}=this.visualElement;T&&T.setActive("whileDrag",!0)},c=(p,y)=>{this.latestPointerEvent=p,this.latestPanInfo=y;const{dragPropagation:w,dragDirectionLock:k,onDirectionLock:C,onDrag:T}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:E}=y;if(k&&this.currentDirection===null){this.currentDirection=PF(E),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",y.point,E),this.updateAxis("y",y.point,E),this.visualElement.render(),T&&Xe.update(()=>T(p,y),!1,!0)},d=(p,y)=>{this.latestPointerEvent=p,this.latestPanInfo=y,this.stop(p,y),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new Fk(t,{onSessionStart:l,onStart:a,onMove:c,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:i,contextWindow:Ok(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!s||!i)return;const{velocity:a}=s;this.startAnimation(a);const{onDragEnd:c}=this.getProps();c&&Xe.postRender(()=>c(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&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,i){const{drag:s}=this.getProps();if(!i||!el(t,s,this.currentDirection))return;const l=this.getAxisMotionValue(t);let a=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(a=vF(a,this.constraints[t],this.elastic[t])),l.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&$i(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=xF(i.layoutBox,t):this.constraints=!1,this.elastic=bF(n),s!==this.constraints&&!$i(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&Vn(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=SF(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!$i(t))return!1;const i=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;s.root&&(s.root.scroll=void 0,s.root.updateScroll());const l=TL(i,s.root,this.visualElement.getTransformPagePoint());let a=wF(s.layout.layoutBox,l);if(n){const c=n(bL(a));this.hasMutatedConstraints=!!c,c&&(a=ak(c))}return a}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:l,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),d=this.constraints||{},h=Vn(m=>{if(!el(m,n,this.currentDirection))return;let p=d&&d[m]||{};(a===!0||a===m)&&(p={min:0,max:0});const y=s?200:1e6,w=s?40:1e7,k={type:"inertia",velocity:i?t[m]:0,bounceStiffness:y,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...l,...p};return this.startAxisValueAnimation(m,k)});return Promise.all(h).then(c)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return dd(this.visualElement,t),i.start(Ph(t,i,0,n,this.visualElement,!1))}stopAnimation(){Vn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Vn(n=>{const{drag:i}=this.getProps();if(!el(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,l=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:c}=s.layout.layoutBox[n],d=l.get()||0;l.set(t[n]-qe(a,c,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!$i(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Vn(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const d=c.get();s[a]=kF({min:d,max:d},this.constraints[a])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),Vn(a=>{if(!el(a,t,null))return;const c=this.getAxisMotionValue(a),{min:d,max:h}=this.constraints[a];c.set(qe(d,h,s[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;CF.set(this.visualElement,this);const t=this.visualElement.current,n=ss(t,"pointerdown",h=>{const{drag:m,dragListener:p=!0}=this.getProps(),y=h.target,w=y!==t&&rL(y);m&&p&&!w&&this.start(h)});let i;const s=()=>{const{dragConstraints:h}=this.getProps();$i(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),i||(i=TF(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,a=l.addEventListener("measure",s);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),Xe.read(s);const c=xs(window,"resize",()=>this.scalePositionWithinConstraints()),d=l.addEventListener("didUpdate",({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&(Vn(p=>{const y=this.getAxisMotionValue(p);y&&(this.originPoint[p]+=h[p].translate,y.set(y.get()+h[p].translate))}),this.visualElement.render())});return()=>{c(),n(),a(),d&&d(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:l=!1,dragElastic:a=Sd,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:l,dragElastic:a,dragMomentum:c}}}function px(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function TF(e,t,n){const i=kv(e,px(n)),s=kv(t,px(n));return()=>{i(),s()}}function el(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function PF(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class RF extends Ir{constructor(t){super(t),this.removeGroupControls=xn,this.removeListeners=xn,this.controls=new EF(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xn}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 yf=e=>(t,n)=>{e&&Xe.update(()=>e(t,n),!1,!0)};class AF extends Ir{constructor(){super(...arguments),this.removePointerDownListener=xn}onPointerDown(t){this.session=new Fk(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ok(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:yf(t),onStart:yf(n),onMove:yf(i),onEnd:(l,a)=>{delete this.session,s&&Xe.postRender(()=>s(l,a))}}}mount(){this.removePointerDownListener=ss(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 vf=!1;class MF extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:l}=t;l&&(n.group&&n.group.add(l),i&&i.register&&s&&i.register(l),vf&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),hl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:l}=this.props,{projection:a}=i;return a&&(a.isPresent=l,t.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),vf=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==l?a.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?a.promote():a.relegate()||Xe.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:i}=t;i&&(i.options.layoutAnchor=n,i.root.didUpdate(),Nh.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;vf=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Vk(e){const[t,n]=Rk(),i=S.useContext(dh);return v.jsx(MF,{...e,layoutGroup:i,switchLayoutGroup:S.useContext(_k),isPresent:t,safeToRemove:n})}const NF={pan:{Feature:AF},drag:{Feature:RF,ProjectionNode:Pk,MeasureLayout:Vk}};function mx(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,l=i[s];l&&Xe.postRender(()=>l(t,Ns(t)))}class jF extends Ir{mount(){const{current:t}=this.node;t&&(this.unmount=J_(t,(n,i)=>(mx(this.node,i,"Start"),s=>mx(this.node,s,"End"))))}unmount(){}}class DF extends Ir{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=Rs(xs(this.node.current,"focus",()=>this.onFocus()),xs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function gx(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),l=i[s];l&&Xe.postRender(()=>l(t,Ns(t)))}class IF extends Ir{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=oL(t,(s,l)=>(gx(this.node,l,"Start"),(a,{success:c})=>gx(this.node,a,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:i?.tap===!1})}unmount(){}}const bd=new WeakMap,xf=new WeakMap,_F=e=>{const t=bd.get(e.target);t&&t(e)},LF=e=>{e.forEach(_F)};function OF({root:e,...t}){const n=e||document;xf.has(n)||xf.set(n,{});const i=xf.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(LF,{root:e,...t})),i[s]}function FF(e,t,n){const i=OF(t);return bd.set(e,n),i.observe(e),()=>{bd.delete(e),i.unobserve(e)}}const zF={some:0,all:1};class VF extends Ir{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:l}=t,a={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:zF[s]},c=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,l&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:p}=this.node.getProps(),y=h?m:p;y&&y(d)};this.stopObserver=FF(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(BF(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function BF({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $F={inView:{Feature:VF},tap:{Feature:IF},focus:{Feature:DF},hover:{Feature:jF}},UF={layout:{ProjectionNode:Pk,MeasureLayout:Vk}},HF={...hF,...$F,...NF,...UF},as=lF(HF,uF),Cd="ours.chats.listMode",ls="recent";function Bk(){try{return globalThis.localStorage}catch{return}}function WF(e=Bk()){try{return e?.getItem(Cd)==="identity"?"identity":ls}catch{return ls}}function KF(e,t=Bk()){const n=e==="identity"?"identity":ls;try{return t?.setItem(Cd,n),t?.getItem(Cd)===n?n:ls}catch{return ls}}function ws(e){return typeof e=="string"?e:""}function Ml(e,t){const n=ws(e),i=ws(t),s=n.normalize().toLowerCase(),l=i.normalize().toLowerCase();return s<l?-1:s>l?1:n<i?-1:n>i?1:0}function qF(e,t){const n=pl(ws(t.activityAt))-pl(ws(e.activityAt));if(n!==0)return n;const i=Ml(e.name,t.name);return i!==0?i:Ml(e.id,t.id)}function Ed(e){return[...e].sort(qF)}function yx(e){return e.contacts.length>0?pl(ws(e.contacts[0].activityAt)):0}function XF(e,t){const n=new Map,i=[];for(const l of e){const a=l.root||(t?.[l.id]?l.id:null);if(!a){i.push(l);continue}const c=t?.[a]||{label:a,note:""};let d=n.get(a);d||(d={id:`root:${a}`,rootId:a,label:c.label,note:c.note,contacts:[]},n.set(a,d)),d.contacts.push(l)}const s=[...n.values()].map(l=>({...l,contacts:Ed(l.contacts)}));return i.length>0&&s.push({id:"rootless",rootId:null,label:"Independent identities",note:"People, agents and apps without a verified Human/root group",contacts:Ed(i)}),s.sort((l,a)=>{const c=yx(a)-yx(l);if(c!==0)return c;const d=Ml(l.label,a.label);return d!==0?d:Ml(l.id,a.id)})}const YF=15e3;function wf(e){const{c:t,active:n,grouped:i}=e;return v.jsxs(as.button,{type:"button",layout:!0,className:"contact-row"+(n?" active":"")+(i?" grouped":"")+(t.status==="pending"?" pending":""),onClick:e.onClick,whileHover:{x:3},whileTap:{scale:.985},transition:{type:"spring",stiffness:420,damping:32},children:[v.jsx("span",{className:"contact-avatar","aria-hidden":!0,children:t.initials}),v.jsxs("span",{className:"contact-copy",children:[v.jsxs("span",{className:"contact-row-topline",children:[v.jsx("span",{className:"contact-name",children:t.name}),t.when&&v.jsx("span",{className:"contact-time",children:t.when})]}),v.jsxs("span",{className:"contact-row-bottomline",children:[v.jsx("span",{className:"contact-last",children:t.last}),t.status==="pending"&&v.jsx("span",{className:"chip",children:"invited"}),!!t.unread&&v.jsx("span",{className:"contact-unread",children:t.unread})]})]}),n&&v.jsx(as.span,{className:"contact-active-glow",layoutId:"active-contact"})]})}function GF(e){const{contacts:t,roots:n,selected:i}=e,[s,l]=S.useState(""),[a,c]=S.useState(()=>WF()),d=E=>E.name.toLowerCase().includes(s.toLowerCase()),h=t.filter(E=>E.status!=="pending"&&d(E)),m=t.filter(E=>E.status==="pending"&&d(E)),p=Ed(h),y=XF(h,n),w=h.length===0&&m.length===0,k=E=>{c(KF(E))},C=[{id:"recent",label:"Recent"},{id:"identity",label:"By identity"}],T=(E,M)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(E.key))return;E.preventDefault();const L=E.key==="Home"?"recent":E.key==="End"||M==="recent"?"identity":"recent";k(L),document.getElementById(`conversation-list-${L}`)?.focus()};return v.jsxs("div",{className:"listcol",children:[v.jsxs("div",{className:"listcol-head",children:[v.jsxs("div",{className:"listcol-titlebar",children:[v.jsx("h2",{className:"listcol-title",children:"Chats"}),v.jsxs("div",{className:"listcol-actions",children:[v.jsxs("button",{className:"btn sm primary",onClick:e.onInvite,children:[v.jsx(ve,{name:"plus",size:15}),"Invite"]}),v.jsx("button",{className:"icon-btn",title:"Settings","aria-label":"Settings",onClick:e.onSettings,children:v.jsx(ve,{name:"settings"})})]})]}),v.jsxs("div",{className:"search",children:[v.jsx(ve,{name:"search"}),v.jsx("input",{className:"field",placeholder:"Search people, agents, apps…",value:s,onChange:E=>l(E.target.value)})]}),v.jsx("div",{className:"conversation-list-modes",role:"tablist","aria-label":"Conversation list layout",children:C.map(E=>v.jsx("button",{id:`conversation-list-${E.id}`,type:"button",role:"tab","aria-selected":a===E.id,"aria-controls":"conversation-list-panel",tabIndex:a===E.id?0:-1,className:a===E.id?"active":"",onClick:()=>k(E.id),onKeyDown:M=>T(M,E.id),children:E.label},E.id))})]}),v.jsxs("div",{id:"conversation-list-panel",className:"listcol-scroll",role:"tabpanel","aria-labelledby":`conversation-list-${a}`,children:[a==="recent"&&p.length>0&&v.jsx("div",{className:"conversation-group",children:p.map(E=>v.jsx(wf,{c:E,active:i===E.id,onClick:()=>e.onSelect(E.id)},E.id))}),a==="identity"&&y.map(E=>v.jsxs("div",{children:[v.jsxs("div",{className:"group-label",title:E.note,children:[E.rootId&&v.jsx(ve,{name:"clusters"}),v.jsx("span",{children:E.label}),E.note&&v.jsxs("span",{className:"gl-note",children:["· ",E.note]})]}),v.jsx("div",{className:"conversation-group",children:E.contacts.map(M=>v.jsx(wf,{c:M,grouped:E.rootId!==null,active:i===M.id,onClick:()=>e.onSelect(M.id)},M.id))})]},E.id)),m.length>0&&v.jsxs("div",{children:[v.jsx("div",{className:"group-label",children:v.jsx("span",{children:"Pending"})}),v.jsx("div",{className:"conversation-group",children:m.map(E=>v.jsx(wf,{c:E,active:!1,onClick:()=>{}},E.id))})]}),w&&v.jsx("p",{className:"muted",style:{padding:"14px 10px",fontSize:"0.85rem"},children:"No contacts yet — share an invite to start."})]})]})}const vx=e=>`chat-message-${encodeURIComponent(e)}`,QF=()=>typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function xx(e){const{dir:t,canReply:n,onReply:i}=e,s=S.useRef(null),l=S.useRef(null),a=t==="out"?-1:1,c=8,d=56,h=84,m=S.useRef({id:-1,x0:0,y0:0,mode:"idle",armed:!1}),p=C=>{const T=s.current,E=l.current;if(T&&(T.style.transform=C?`translateX(${C}px)`:""),E){const M=Math.min(1,Math.abs(C)/d);E.style.opacity=String(M),E.style.transform=`scale(${.5+.5*M})`}},y=C=>{!n||C.pointerType==="mouse"||(m.current={id:C.pointerId,x0:C.clientX,y0:C.clientY,mode:"maybe",armed:!1})},w=C=>{const T=m.current;if(T.id!==C.pointerId||T.mode==="idle")return;const E=C.clientX-T.x0,M=C.clientY-T.y0;if(T.mode==="maybe"){if(Math.abs(E)<c&&Math.abs(M)<c)return;if(Math.abs(E)>Math.abs(M)&&Math.sign(E)===a)T.mode="drag",s.current?.classList.add("swiping");else{T.mode="idle";return}}let A=E*a;A<0&&(A=0),A>d&&(A=d+(A-d)*.35),A=Math.min(A,h);const L=A*a,H=Math.abs(L)>=d;H!==T.armed&&(T.armed=H,l.current?.classList.toggle("armed",H),H&&navigator.vibrate?.(10)),p(L)},k=C=>{const T=m.current;if(T.id!==C.pointerId)return;const E=T.mode==="drag"&&T.armed;m.current={id:-1,x0:0,y0:0,mode:"idle",armed:!1},s.current?.classList.remove("swiping"),l.current?.classList.remove("armed"),p(0),E&&i()};return v.jsxs("div",{className:"msg-row "+(e.rowClass??t),style:n?{touchAction:"pan-y"}:void 0,onPointerDown:y,onPointerMove:w,onPointerUp:k,onPointerCancel:k,children:[n&&v.jsx("span",{className:"swipe-cue",ref:l,"aria-hidden":!0,children:v.jsx(ve,{name:"reply",size:16})}),v.jsx("div",{className:"bubble-wrap",ref:s,children:e.children}),e.after]})}function ZF(e){const{contact:t,messages:n}=e,[i,s]=S.useState(""),[l,a]=S.useState(!1),[c,d]=S.useState(null),[h,m]=S.useState(null),[p,y]=S.useState(null),[w,k]=S.useState(null),[C,T]=S.useState(null),[E,M]=S.useState(!1),[A,L]=S.useState(null),[H,D]=S.useState(!1),[Y,W]=S.useState(!1),[X,j]=S.useState(!1),[G,$]=S.useState(null),[fe,se]=S.useState(!1),te=S.useRef(null),xe=S.useRef(null),Ee=S.useRef(!1),q=S.useRef(null),le=S.useRef(!0),P=S.useRef(null),_=S.useRef(0),Q=S.useRef(null),R=S.useRef(new Map),Z=S.useRef(0),de=S.useRef(null),ie=S.useRef(null),Ce=S.useRef(0),ge=S.useRef(0);S.useEffect(()=>{s(""),m(null),y(null),d(null),k(null),T(null),M(!1),L(null),D(!1),W(!1),j(!1),_.current+=1,$(null),se(!1),R.current.clear(),de.current=null,ie.current=null},[t?.id]),S.useEffect(()=>{if(!p)return;const z=p.reply?.wireId;n.some(V=>V.kind!=="file"&&V.dir==="out"&&!!V.wireId&&!p.wireIds.has(V.wireId)&&V.text===p.text&&(V.replyTo?.wireId??void 0)===z)&&(y(null),m(null),s(V=>V===p.draft?"":V),k(V=>V===p.reply?null:V))},[n,p]);const Te=!!c?.wireId&&n.some(z=>z.wireId===c.wireId),je=S.useMemo(()=>c&&!Te?[...n,c.message]:n,[n,c,Te]);S.useEffect(()=>{Te&&d(null)},[Te]),S.useLayoutEffect(()=>{const z=xe.current;if(!z)return;z.style.height="0px";const he=Math.max(44,Math.min(z.scrollHeight,132));z.style.height=`${he}px`,z.style.overflowY=z.scrollHeight>132?"auto":"hidden"},[i,t?.id]);const Ue=z=>{const he=q.current;if(!he)return;const V=Math.max(0,he.scrollHeight-he.clientHeight+8);if(Math.abs(he.scrollTop-V)<1){de.current=null,ie.current=null;return}const ee=z&&!QF();if(de.current=ee?V:null,ie.current=ee?he.scrollTop:null,ee)he.scrollTo({top:V,behavior:"smooth"});else{he.scrollTop=V;const F=()=>{const oe=q.current;oe===he&&le.current&&(oe.scrollTop=oe.scrollHeight-oe.clientHeight+8)};requestAnimationFrame(F),window.setTimeout(F,50),window.setTimeout(F,200)}};S.useLayoutEffect(()=>{if(!t){P.current=null,le.current=!0,Ce.current=0,ge.current=0;return}const z=q.current;if(!z)return;const he=P.current!==t.id,V=je.length!==Ce.current,ee=ge.current;if(Ce.current=je.length,!he&&V&&ee>0){const F=z.scrollHeight-z.clientHeight-z.scrollTop;le.current=ee-z.clientHeight-z.scrollTop<=48||F<=160}!he&&!V&&de.current===null&&(le.current=z.scrollHeight-z.clientHeight-z.scrollTop<=48),(he||le.current)&&(Ue(V&&!he&&P.current!==null),le.current=!0),ge.current=z.scrollHeight,P.current=t.id},[t,je.length]),S.useLayoutEffect(()=>{const z=window.location.hash;if(!z.startsWith("#chat-message-"))return;const he=document.getElementById(z.slice(1));he&&(he.scrollIntoView({block:"center"}),le.current=!1)},[t?.id,je.length]),S.useLayoutEffect(()=>{const z=Q.current,he=q.current;if(z===null||!he)return;const V=requestAnimationFrame(()=>{Q.current===z&&(he.scrollTop=z.top+he.scrollHeight-z.height,Q.current=null)});return()=>cancelAnimationFrame(V)},[je.length]),S.useEffect(()=>{const z=q.current;if(!z||typeof ResizeObserver>"u")return;const he=z.firstElementChild;if(!he)return;const V=new ResizeObserver(ee=>{if(ee.some(F=>F.target===he)){const F=ge.current;if(F>0){const oe=z.scrollHeight-z.clientHeight-z.scrollTop;le.current=F-z.clientHeight-z.scrollTop<=48||oe<=160}ge.current=z.scrollHeight,le.current&&Ue(!1);return}le.current&&Ue(de.current!==null)});return V.observe(he),V.observe(z),()=>V.disconnect()},[t?.id]);const kt=async z=>{const he=++_.current;m(null),j(!0);try{if(z.size>Qo&&t1(z.type,z.name)){const ee=await VD(z,Qo);if(he!==_.current)return;L({filename:ee.filename,mime:ee.mime,bytes:ee.bytes,originalSize:ee.originalSize});return}if(z.size>Qo){m(`"${z.name}" is ${Ar(z.size)} — files up to ${Ar(Qo)} can be sent.`);return}const V=await z.arrayBuffer();if(he!==_.current)return;L({filename:z.name||"file",mime:z.type||"application/octet-stream",bytes:new Uint8Array(V)})}catch(V){he===_.current&&m(`Photo optimization failed: ${V instanceof Error?V.message:String(V)}`)}finally{he===_.current&&j(!1)}},gt=()=>{!A||!e.onSendFile||Y||(W(!0),e.onSendFile(A,w?.wireId).then(()=>{L(null),k(null)}).catch(z=>m(`File send failed: ${String(z)} — it was not delivered.`)).finally(()=>W(!1)))},It=e.onDraftChange;S.useEffect(()=>(It?.(i.trim().length>0||l),()=>It?.(!1)),[i,l,It]);const Jt=new Map;for(const z of je)z.wireId&&Jt.set(z.wireId,z);const Ht=S.useMemo(()=>{const z=new Map;for(const he of je)z.set(he,he.kind==="file"?null:he.dir==="in"?uE(t?.announcedName??"",he.text):null);return z},[je,t?.announcedName]),it=z=>Ht.get(z)??null,_t=z=>{if(z.dir==="out")return"You";const he=it(z);return he&&he.variant==="chat"?he.author:t?.name??"Them"},_e=z=>{if(z.kind==="file")return z.mime?.startsWith("image/")?"Photo":qi(z.mime??"",z.filename??"")?"Voice message":z.filename||"File";const he=it(z);return he?he.text||gE(he):z.text},ln=z=>{if(!z.replyTo)return null;const he=Jt.get(z.replyTo.wireId);return he?{author:_t(he),text:_e(he)}:{author:"",text:"Original message"}};if(!t)return e.emptyOverride?v.jsx(v.Fragment,{children:e.emptyOverride}):v.jsx("div",{className:"detail",children:v.jsxs("div",{className:"detail-empty",children:[v.jsx(ve,{name:"chat"}),v.jsxs("div",{children:[v.jsx("div",{style:{fontWeight:650,color:"var(--text-2)"},children:"Select a conversation"}),v.jsx("div",{style:{fontSize:"0.85rem"},children:"Chat with people, agents and apps across ours."})]})]})});const Lt=async()=>{const z=i,he=z.trim(),V=!!p&&z===p.draft&&(w?.wireId??void 0)===p.reply?.wireId;if(!he||Ee.current||V)return;p&&y(null),Ee.current=!0,a(!0),m(null);const ee=w,F=ee?.wireId,oe=new AbortController;let J=!1,Me=0;s(""),k(null);const Fe=`optimistic-${++Z.current}`;d({key:Fe,wireId:null,message:{dir:"out",text:he,date:new Date().toISOString(),read:!0,wireId:"",replyTo:F?{wireId:F}:null}});try{const pe=await Promise.race([e.onSend(he,F,oe.signal),new Promise((Ie,Tt)=>{Me=window.setTimeout(()=>{J=!0,oe.abort(),Tt(new Error("send timeout"))},YF)})]);pe?(R.current.set(pe,Fe),d(Ie=>Ie?.key===Fe?{...Ie,wireId:pe}:Ie)):d(Ie=>Ie?.key===Fe?null:Ie),y(null)}catch(pe){d(null),s(Ie=>Ie===""?z:Ie),k(Ie=>Ie===null?ee:Ie),J||!(pe instanceof kf)?(y({draft:z,text:he,reply:ee,wireIds:new Set(n.flatMap(Ie=>Ie.wireId?[Ie.wireId]:[]))}),m(`${J?"Send timed out":"Send connection was interrupted"} — delivery status is unknown. Check the conversation; edit the draft before sending again.`)):m(`Send failed: ${String(pe)} — the message was not delivered.`)}finally{window.clearTimeout(Me),Ee.current=!1,a(!1)}},Dn=!!p&&i===p.draft&&(w?.wireId??void 0)===p.reply?.wireId,un=z=>{z.wireId&&k({wireId:z.wireId,author:_t(z),text:_e(z)})};return v.jsxs("div",{className:"detail detail-chat",children:[v.jsxs("div",{className:"detail-head",children:[v.jsxs("div",{className:"conv-peer",children:[v.jsx("button",{className:"icon-btn detail-back",onClick:e.onBack,children:v.jsx(ve,{name:"back"})}),v.jsx("div",{className:"avatar accent",children:t.initials}),v.jsxs("div",{className:"conv-peer-meta",children:[C!==null?v.jsx("input",{className:"field name-edit",value:C,autoFocus:!0,placeholder:t.name,onChange:z=>T(z.target.value),onKeyDown:z=>{z.key==="Enter"?(e.onRename?.(C),T(null)):z.key==="Escape"&&T(null)},onBlur:()=>T(null)}):v.jsxs("div",{className:"conv-peer-name",children:[t.name,e.onRename&&v.jsx("button",{className:"icon-btn name-pencil",title:"Rename (only changes how they appear to you)",onClick:()=>T(t.name),children:v.jsx(ve,{name:"edit",size:13})})]}),e.syncing&&v.jsxs("div",{className:"conv-sync",role:"status","aria-live":"polite",children:[v.jsx("span",{className:"conv-sync-dot","aria-hidden":!0}),e.syncing==="connecting"?"Connecting…":"Updating…"]}),!e.syncing&&(t.roleId?v.jsxs("button",{className:"idchip",onClick:()=>M(!0),children:[v.jsx(ve,{name:"shield",size:11}),"verified role of ",t.rootName]}):t.status!=="pending"&&v.jsxs("button",{className:"idchip quiet",onClick:()=>M(!0),children:[v.jsx(ve,{name:"lock",size:11}),"verified identity"]}))]})]}),E&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"pop-backdrop",onClick:()=>M(!1)}),v.jsxs("div",{className:"idcard anim-scale",children:[v.jsx("h4",{children:"Verified identity"}),t.roleId&&v.jsxs("p",{children:["This is the role ",v.jsxs("strong",{children:["“",t.roleId,"”"]})," of"," ",v.jsx("strong",{children:t.rootName})," — the link is cryptographically signed, not self-declared."]}),v.jsx("div",{className:"idcard-fp mono",children:t.id}),v.jsx("p",{className:"idcard-note",children:"This id is the fingerprint of their key. Names are what people show you; the fingerprint is what guarantees you're always talking to the same identity — no one can impersonate it. Renaming only changes how they appear to you."})]})]}),v.jsxs("div",{className:"conv-actions",children:[v.jsxs("button",{className:"btn sm",title:"Shared photos, files, and links",onClick:()=>se(!0),children:[v.jsx(ve,{name:"paperclip",size:14}),"Media"]}),v.jsxs("button",{className:"btn sm danger",title:"Remove contact",onClick:e.onRemove,children:[v.jsx(ve,{name:"trash",size:14}),"Remove"]})]})]}),v.jsx("div",{className:"messages",ref:q,onScroll:z=>{const he=z.currentTarget,V=he.scrollHeight-he.clientHeight-he.scrollTop;if(de.current!==null){const ee=ie.current;if(ee===null||he.scrollTop>=ee-1){ie.current=he.scrollTop,V<=4&&(de.current=null,ie.current=null);return}de.current=null,ie.current=null}le.current=V<=48},onPointerDown:()=>{de.current=null,ie.current=null},onTouchStart:()=>{de.current=null,ie.current=null},onWheel:()=>{de.current=null,ie.current=null},onDragOver:z=>{e.onSendFile&&z.preventDefault()},onDrop:z=>{if(!e.onSendFile)return;z.preventDefault();const he=z.dataTransfer.files?.[0];he&&kt(he)},children:v.jsxs("div",{className:"messages-inner",children:[v.jsxs("div",{className:"e2e-note",children:[v.jsx(ve,{name:"lock"}),"End-to-end encrypted · the broker only sees ciphertext"]}),(e.hiddenEarlier??0)>0&&e.onLoadEarlier&&v.jsxs("button",{className:"btn sm chat-load-earlier",onClick:()=>{le.current=!1;const z=q.current;Q.current=z?{height:z.scrollHeight,top:z.scrollTop}:null,e.onLoadEarlier?.()},children:["Load earlier messages (",e.hiddenEarlier," remaining)"]}),v.jsx(OO,{initial:!1,children:je.map((z,he)=>{const V=z===c?.message?c.key:z.wireId&&R.current.get(z.wireId)||z.wireId||`${z.date}-${(e.hiddenEarlier??0)+he}`,ee=vx(z.wireId||V),F=je[he-1],oe=je[he+1],J=it(z),Me=He=>{if(!He)return null;const Pt=it(He);return Pt?Pt.variant==="system"?"room:system":`room:chat:${Pt.author}${Pt.role}`:He.dir},Fe=Me(z),pe=!!F&&Me(F)===Fe&&Fe!=="room:system",Ie=!!oe&&Me(oe)===Fe&&Fe!=="room:system",Tt=(z.dir==="out"?"out":"in")+(pe?" cont-top":"")+(Ie?" cont-bot":""),ot=z.wireId?v.jsx("button",{className:"msg-reply",title:"Reply",onClick:()=>un(z),children:v.jsx(ve,{name:"reply",size:15})}):null;if(J&&J.variant==="system"){const He=J.presentation??"system";return v.jsx(as.div,{className:"message-motion",id:ee,initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0},transition:{duration:.22,ease:[.22,1,.36,1]},children:v.jsxs("div",{className:`room-system room-${He}-card`,role:"note",children:[J.label&&v.jsx("span",{className:"room-system-label",children:J.label}),J.roomName&&v.jsx("strong",{className:"room-card-name",children:J.roomName}),v.jsx(ev,{text:J.text,className:"room-system-text message-markdown"}),!!J.details?.length&&v.jsx("ul",{className:"room-card-details","aria-label":"Room event details",children:J.details.map(Pt=>v.jsx("li",{children:Pt},Pt))}),v.jsxs("span",{className:"room-card-provenance",children:[J.authoredBy&&v.jsx("span",{className:"room-card-author",children:J.authoredBy}),v.jsx("span",{className:"room-system-at",children:fs(J.authoredAt||z.date)})]})]})},V)}if(z.kind==="file"){const He=Lx(z.wireId)??{id:z.wireId,dir:z.dir,filename:z.filename??"file",mime:z.mime??"application/octet-stream",size:0,date:z.date};return v.jsx(as.div,{className:"message-motion",id:ee,initial:{opacity:0,y:12,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.98},transition:{duration:.22,ease:[.22,1,.36,1]},children:v.jsx(xx,{dir:z.dir==="out"?"out":"in",rowClass:Tt,canReply:!!z.wireId,onReply:()=>un(z),after:ot,children:v.jsx("div",{className:`ours-message ours-message-file ours-message--${z.dir}`,children:v.jsx(xA,{rec:He,receipt:z.receipt,receiptless:z.receiptless,onPreview:$,onFetch:e.onFetchFile})})})},V)}const Ze=ln(z);return v.jsx(as.div,{className:"message-motion",id:ee,initial:{opacity:0,y:12,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.98},transition:{duration:.22,ease:[.22,1,.36,1]},children:v.jsx(xx,{dir:z.dir==="out"?"out":"in",rowClass:Tt,canReply:!!z.wireId,onReply:()=>un(z),after:ot,children:v.jsxs("div",{className:`ours-message ours-message--${z.dir}`,children:[Ze&&v.jsxs("div",{className:"quote",children:[Ze.author&&v.jsx("span",{className:"quote-author",children:Ze.author}),v.jsx("span",{className:"quote-text",children:Ze.text})]}),J&&!pe&&v.jsxs(v.Fragment,{children:[J.roomName&&v.jsx("div",{className:"room-message-room",children:J.roomName}),v.jsxs("div",{className:"room-author",children:[v.jsx("span",{className:"room-author-name",children:J.author}),J.role&&v.jsx("span",{className:"room-author-role",children:J.role})]})]}),v.jsx(ev,{text:J?J.text:z.text}),v.jsxs("div",{className:"bubble-at",children:[fs(J?.authoredAt||z.date),z.dir==="out"&&v.jsx(Ox,{receipt:z.receipt,receiptless:z.receiptless})]})]})})},V)})}),v.jsx("div",{className:"thread-end","aria-hidden":!0})]})},t.id),h&&v.jsxs("div",{className:"banner error",role:"alert",children:[h,h.startsWith("Send failed:")&&v.jsx("span",{className:"banner-actions",children:v.jsx("button",{className:"linkbtn",onClick:()=>void Lt(),children:"retry"})})]}),v.jsxs("div",{className:"composer-wrap",children:[w&&v.jsxs("div",{className:"reply-bar",children:[v.jsx("div",{className:"reply-bar-line"}),v.jsxs("div",{className:"reply-bar-body",children:[v.jsxs("div",{className:"reply-bar-author",children:["Replying to ",w.author]}),v.jsx("div",{className:"reply-bar-text",children:w.text})]}),v.jsx("button",{className:"icon-btn",title:"Cancel reply",onClick:()=>k(null),children:v.jsx(ve,{name:"close",size:16})})]}),A&&v.jsx(Iw,{att:A,sending:Y,onSend:gt,onDiscard:()=>L(null)}),X&&v.jsx("div",{className:"attachment-processing",role:"status",children:"Optimizing photo for secure delivery…"}),v.jsxs("div",{className:"composer"+(H?" recording":""),children:[e.onSendFile&&v.jsxs(v.Fragment,{children:[v.jsx("input",{ref:te,type:"file",style:{display:"none"},onChange:z=>{const he=z.target.files?.[0];he&&kt(he),z.target.value=""}}),v.jsx("button",{className:"icon-btn composer-tool",title:"Attach a file or photo",disabled:Y||X||H,onClick:()=>te.current?.click(),children:v.jsx(ve,{name:"paperclip",size:18})}),v.jsx(_w,{disabled:Y||X||!!A,onReady:z=>{D(!1),L(z)},onError:z=>{D(!1),m(z)},onActiveChange:D},t.id)]}),v.jsx("textarea",{ref:xe,className:"field",rows:1,placeholder:(w?"Reply to "+w.author:"Message "+t.name)+"…",value:i,"aria-busy":l,onChange:z=>s(z.target.value),onKeyDown:z=>{z.key==="Enter"?!(window.matchMedia("(pointer: coarse)").matches||window.innerWidth<=860)&&!z.shiftKey&&(z.preventDefault(),Lt()):z.key==="Escape"&&k(null)}}),v.jsxs("button",{className:"btn primary",onPointerDown:z=>{z.button===0&&document.activeElement===xe.current&&z.preventDefault()},onClick:()=>void Lt(),disabled:l||Dn||!i.trim(),title:Dn?"Delivery status unknown — edit before sending again":void 0,children:[v.jsx(ve,{name:"send",size:16}),"Send"]})]})]}),G&&(Ll(G.filename,G.mime)?v.jsx(TD,{rec:G,onClose:()=>$(null)}):v.jsx(ED,{rec:G,onClose:()=>$(null),onSendText:e.onSend,onSendFile:e.onSendFile})),fe&&v.jsx(RD,{messages:n,indexOffset:e.hiddenEarlier??0,onClose:()=>se(!1),onPreview:z=>{se(!1),$(z)},onJump:z=>{document.getElementById(vx(z))?.scrollIntoView({behavior:"smooth",block:"center"}),se(!1)}})]})}const $k=3;function JF(e,t,n=$k){return[t,...e.filter(i=>i.cid!==t.cid)].slice(0,n)}function ez(e,t){return e.filter(n=>n.id!==t)}const tz=6e3,nz=JF,rz=ez;function iz(){const[e,t]=S.useState([]),n=S.useRef(0),i=S.useCallback((a,c,d)=>{const h=Date.now(),m={id:`${a}:${h}:${n.current++}`,cid:a,name:c,preview:"",at:h};t(p=>nz(p,m,$k))},[]),s=S.useCallback(a=>t(c=>rz(c,a)),[]),l=S.useCallback(a=>t(c=>c.filter(d=>d.cid!==a)),[]);return{toasts:e,push:i,dismiss:s,clear:l}}function oz(e){const{item:t,onOpen:n,onDismiss:i}=e,[s,l]=S.useState(!1),[a,c]=S.useState(!1),d=s||a;return S.useEffect(()=>{if(d)return;const h=setTimeout(()=>i(t.id),tz);return()=>clearTimeout(h)},[t.id,d,i]),v.jsxs("div",{className:"banner msg",role:"status",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onFocus:()=>c(!0),onBlur:h=>{h.currentTarget.contains(h.relatedTarget)||c(!1)},children:[v.jsxs("button",{className:"msg-open",title:`Open the conversation with ${t.name}`,onClick:()=>n(t.cid),children:[v.jsx("span",{className:"avatar sm accent","aria-hidden":"true",children:cs(t.name)}),v.jsxs("span",{className:"msg-text",children:[v.jsx("strong",{className:"msg-name",children:t.name}),v.jsx("span",{className:"msg-preview",children:t.preview||"New message"})]})]}),v.jsx("button",{className:"icon-btn msg-close",title:"Dismiss","aria-label":`Dismiss the notification from ${t.name}`,onClick:()=>i(t.id),children:v.jsx(ve,{name:"close",size:15})})]})}function sz(e){return v.jsx(v.Fragment,{children:e.items.map(t=>v.jsx(oz,{item:t,onOpen:e.onOpen,onDismiss:e.onDismiss},t.id))})}function az(e){const t=S.useRef(null),{text:n,size:i=240}=e;return S.useEffect(()=>{if(!t.current||!n)return;const s=t.current;Wd(()=>import("./browser-aSjxdi-G.js").then(l=>l.b),[]).then(l=>{l.toCanvas(s,n,{width:i,margin:2,errorCorrectionLevel:"M",color:{dark:"#000000",light:"#ffffff"}})})},[n,i]),v.jsx("div",{style:{display:"flex",justifyContent:"center",margin:"8px 0"},children:v.jsx("canvas",{ref:t,"data-testid":"qr-canvas","data-invite":n,width:i,height:i,style:{borderRadius:8,border:"1px solid var(--line)",imageRendering:"pixelated"}})})}function lz(e){const t=S.useRef(null),n=S.useRef(null),i=S.useRef(null),s=S.useRef(0),l=S.useRef(!0),[a,c]=S.useState("requesting"),[d,h]=S.useState(""),m=S.useCallback(()=>{s.current&&cancelAnimationFrame(s.current),i.current&&(i.current.getTracks().forEach(w=>w.stop()),i.current=null),t.current&&(t.current.srcObject=null)},[]),p=S.useCallback(w=>{i.current=w;const k=t.current;k.srcObject=w,k.setAttribute("playsinline","true"),k.play();const C=n.current,T=C.getContext("2d"),E=()=>{if(l.current)if(k.readyState>=k.HAVE_ENOUGH_DATA){const M=k.videoWidth||320,A=k.videoHeight||240;C.width=M,C.height=A,T.drawImage(k,0,0,M,A);const L=T.getImageData(0,0,M,A);Wd(()=>import("./jsQR-2VAxy2ky.js").then(H=>H.j),[]).then(H=>{const D=H.default,Y=D(L.data,L.width,L.height,{inversionAttempts:"dontInvert"});if(Y&&Y.data&&l.current){m(),e.onDecode(Y.data);return}l.current&&(s.current=requestAnimationFrame(E))})}else s.current=requestAnimationFrame(E)};s.current=requestAnimationFrame(E)},[m,e]);S.useEffect(()=>{if(l.current=!0,!navigator.mediaDevices?.getUserMedia){c("nocamera");return}return navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then(w=>{if(!l.current){w.getTracks().forEach(k=>k.stop());return}c("scanning"),p(w)}).catch(w=>{if(!l.current)return;const k=w.name??"";k==="NotAllowedError"||k==="PermissionDeniedError"?c("denied"):k==="NotFoundError"||k==="DevicesNotFoundError"?c("nocamera"):(c("error"),h(w.message??String(w)))}),()=>{l.current=!1,m()}},[]);const y=()=>{m(),e.onClose()};return v.jsxs("div",{"data-testid":"qr-scanner",style:{display:"flex",flexDirection:"column",gap:12,padding:"12px 0"},children:[(a==="requesting"||a==="scanning")&&v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.88rem"},children:a==="requesting"?"Requesting camera…":"Point your camera at the QR code."}),v.jsxs("div",{style:{position:"relative",borderRadius:8,overflow:"hidden",background:"#000",minHeight:200},children:[v.jsx("canvas",{ref:n,"data-testid":"scanner-canvas",style:{display:"none"}}),v.jsx("video",{ref:t,"data-testid":"scanner-video",muted:!0,playsInline:!0,style:{width:"100%",display:"block",borderRadius:8}}),a==="scanning"&&v.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:v.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)"}})})]})]}),a==="denied"&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:"var(--text-2)"},children:[v.jsx(ve,{name:"shield",size:16}),v.jsx("span",{style:{fontWeight:600,fontSize:"0.9rem"},children:"Camera access denied"})]}),v.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."})]}),a==="nocamera"&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:"var(--text-2)"},children:[v.jsx(ve,{name:"close",size:16}),v.jsx("span",{style:{fontWeight:600,fontSize:"0.9rem"},children:"No camera available"})]}),v.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.88rem"},children:"No camera was found on this device. Paste the invite text below instead."})]}),a==="error"&&v.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:v.jsxs("p",{style:{margin:0,fontSize:"0.85rem",color:"var(--danger, #e53)"},children:["Camera error: ",d||"unknown error",". Paste the invite text below instead."]})}),v.jsx("button",{className:"btn",style:{justifyContent:"center"},onClick:y,children:a==="scanning"?v.jsxs(v.Fragment,{children:[v.jsx(ve,{name:"close",size:14}),"Cancel scan"]}):v.jsxs(v.Fragment,{children:[v.jsx(ve,{name:"close",size:14}),"Close scanner"]})})]})}function uz(e){const[t,n]=S.useState("generate"),[i,s]=S.useState("one_time"),[l,a]=S.useState(""),[c,d]=S.useState(null),[h,m]=S.useState("one_time"),[p,y]=S.useState(""),[w,k]=S.useState(""),[C,T]=S.useState(!1),[E,M]=S.useState(null),[A,L]=S.useState(null),[H,D]=S.useState(!1),[Y,W]=S.useState(null),X=S.useRef(!1),j=async()=>{if(!X.current){X.current=!0,T(!0),L(null),M(null);try{m(i),d(await e.onCreate(i,i==="one_time"&&l.trim()||void 0))}catch($){L($ instanceof Error?$.message:String($))}finally{X.current=!1,T(!1)}}},G=v.jsxs("div",{className:"modal-tabs",role:"tablist","aria-label":"Invite mode",children:[v.jsx("button",{type:"button",role:"tab","aria-selected":t==="generate",className:"btn sm"+(t==="generate"?" primary":""),onClick:()=>n("generate"),children:"Generate invite"}),v.jsx("button",{type:"button",role:"tab","aria-selected":t==="accept",className:"btn sm"+(t==="accept"?" primary":""),onClick:()=>n("accept"),children:"Accept invite"})]});return v.jsxs(Ps,{title:t==="generate"?"Invite a contact":"Accept an invite",onClose:()=>{X.current||e.onClose()},tabs:G,children:[t==="generate"&&!c&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:13},children:[v.jsxs("p",{className:"muted","data-testid":"invite-identity",style:{margin:0,fontSize:"0.85rem"},children:["Creating as ",v.jsx("strong",{children:e.identity.name})," · ",v.jsxs("span",{className:"mono",children:["@",jd(e.identity.cid)]})]}),v.jsxs("div",{role:"radiogroup","aria-label":"Invite kind",style:{display:"flex",flexDirection:"column",gap:7},children:[v.jsxs("label",{children:[v.jsx("input",{type:"radio",name:"invite-kind",checked:i==="one_time",onChange:()=>s("one_time")})," One person (one time)"]}),v.jsxs("label",{children:[v.jsx("input",{type:"radio",name:"invite-kind",checked:i==="public",onChange:()=>s("public")})," Reusable public invite"]})]}),i==="one_time"?v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.9rem"},children:"Optionally name the person or agent this invite is for."}),v.jsx("input",{className:"field",value:l,onChange:$=>a($.target.value),placeholder:"Their name (optional), e.g. Bob",maxLength:64})]}):v.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."}),v.jsx("button",{className:"btn primary",style:{justifyContent:"center"},disabled:C,onClick:()=>void j(),children:C?"Generating…":i==="public"?"Create public invite":"Generate invite"}),i==="public"&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[v.jsx("h4",{style:{margin:0,fontSize:"0.9rem"},children:"Active reusable invites"}),e.invites.filter($=>$.mode==="public").length===0&&v.jsx("p",{className:"muted",style:{margin:0},children:"None right now."}),e.invites.filter($=>$.mode==="public").map($=>v.jsxs("div",{"data-testid":"public-invite-row",style:{padding:"8px 10px",background:"var(--inset)",borderRadius:7},children:[v.jsx("span",{className:"mono",children:$.invite_id}),v.jsxs("p",{className:"muted",children:["Created ",$.created?wE($.created):"unknown"," · Active until revoked · No expiry"]}),Y===$.invite_id?v.jsxs("span",{children:[v.jsx("button",{className:"btn sm danger",onClick:()=>void e.onRevoke($.invite_id).then(()=>(W(null),e.onRefresh())).catch(fe=>L(String(fe))),children:"Confirm revoke"})," ",v.jsx("button",{className:"btn sm",onClick:()=>W(null),children:"Keep it"})]}):v.jsx("button",{className:"btn sm",onClick:()=>W($.invite_id),children:"Revoke"})]},$.invite_id))]}),E&&v.jsx("p",{className:"muted",children:E}),A&&v.jsx("p",{className:"onb-error",children:A})]}),t==="generate"&&c&&v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"muted","data-testid":h==="public"?"public-result-note":void 0,children:h==="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 ${l.trim()||"your contact"}. It can be redeemed once.`}),v.jsx("textarea",{className:"field mono","data-testid":"invite-result-text",readOnly:!0,rows:5,value:c,onFocus:$=>$.currentTarget.select()}),h==="one_time"&&v.jsx(az,{text:c}),v.jsxs("button",{className:"btn primary",onClick:()=>void navigator.clipboard.writeText(c).then(()=>M("Copied to clipboard.")),children:[v.jsx(ve,{name:"copy",size:15}),"Copy invite"]}),h==="public"&&v.jsx("button",{className:"btn","data-testid":"done-hide-invite",onClick:()=>{d(null),a(""),e.onRefresh()},children:"Done — hide invite"}),E&&v.jsx("p",{className:"muted",children:E})]}),t==="accept"&&v.jsxs("form",{style:{display:"flex",flexDirection:"column",gap:13},onSubmit:$=>{$.preventDefault(),!(!p.trim()||C)&&(T(!0),L(null),e.onAccept(p.trim(),w.trim()||void 0).then(()=>{M("Invite accepted — the contact will appear once the sender verifies your identity."),y(""),k("")}).catch(fe=>L(String(fe))).finally(()=>T(!1)))},children:[v.jsx("p",{className:"muted",children:"Paste the invite you received, or scan a QR code."}),H?v.jsx(lz,{onDecode:$=>{y($),D(!1)},onClose:()=>D(!1)}):v.jsxs("button",{type:"button",className:"btn",onClick:()=>D(!0),children:[v.jsx(ve,{name:"monitor",size:15}),"Scan QR code"]}),v.jsx("textarea",{className:"field mono","aria-label":"Invite",rows:5,value:p,onChange:$=>y($.target.value),placeholder:"Paste invite text…"}),v.jsx("input",{className:"field",value:w,onChange:$=>k($.target.value),placeholder:"Rename them (optional)",maxLength:64}),v.jsx("button",{className:"btn primary",type:"submit",disabled:C||!p.trim(),children:C?"Connecting…":"Add contact"}),E&&v.jsx("p",{className:"muted",children:E}),A&&v.jsx("p",{className:"onb-error",children:A})]})]})}function cz(e){const[t,n]=S.useState(e.identity.bio??""),[i,s]=S.useState(!1),[l,a]=S.useState(null),[c,d]=S.useState(e.push.preview),h=fC(),m=!e.workerSupported||e.push.status==="unsupported"?h??"Unavailable — requires a secure browser with service-worker support.":e.push.status==="needs-permission"?h??"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 v.jsxs(Ps,{title:"Settings",onClose:e.onClose,wide:!0,children:[v.jsxs("div",{children:[v.jsx("span",{className:"lbl",children:"Display name"}),v.jsx("input",{className:"field",readOnly:!0,value:e.identity.name})]}),v.jsxs("div",{children:[v.jsx("span",{className:"lbl",children:"Your address"}),v.jsx("input",{className:"field mono",readOnly:!0,value:e.identity.cid,onFocus:p=>p.currentTarget.select()}),v.jsx("p",{className:"muted",children:"Your public address on ours. Share an invite to connect more easily."})]}),v.jsxs("div",{children:[v.jsx("span",{className:"lbl",children:"Public bio"}),v.jsx("textarea",{className:"field",rows:3,value:t,onChange:p=>{n(p.target.value),s(!1),a(null)}}),v.jsx("button",{className:"btn sm",onClick:()=>{a(null),e.onSaveBio(t).then(()=>s(!0)).catch(p=>a(String(p)))},children:i?"Saved":"Save bio"}),l&&v.jsx("p",{className:"onb-error",children:l})]}),v.jsxs("label",{style:{display:"flex",gap:9},children:[v.jsx("input",{type:"checkbox",checked:e.dark,onChange:e.onToggleDark})," Dark mode"]}),v.jsxs("div",{style:{borderTop:"1px solid var(--line)",paddingTop:16},children:[v.jsx("h4",{children:"Notifications"}),v.jsx("p",{className:e.push.status==="needs-permission"||e.push.status==="error"?"onb-error":"muted",children:m}),h&&h!==m&&v.jsx("p",{className:"muted","data-testid":"push-platform-guidance",children:h}),v.jsxs("fieldset",{style:{border:0,padding:0,margin:"12px 0"},children:[v.jsx("legend",{className:"lbl",children:"Lock-screen preview"}),v.jsxs("label",{style:{display:"block",marginTop:7},children:[v.jsx("input",{type:"radio",name:"push-preview",checked:c==="full",onChange:()=>d("full")})," Full — sender and message text or filename"]}),v.jsxs("label",{style:{display:"block",marginTop:7},children:[v.jsx("input",{type:"radio",name:"push-preview",checked:c==="private",onChange:()=>d("private")})," Private — generic content only"]})]}),v.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."}),v.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:e.push.status==="on"?v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"btn",disabled:e.busy,onClick:()=>void e.onPushAction("disable",c),children:"Disable notifications"}),v.jsx("button",{className:"btn",disabled:e.busy,onClick:()=>void e.onPushAction("repair",c),children:"Repair"}),c!==e.push.preview&&v.jsx("button",{className:"btn primary",disabled:e.busy,onClick:()=>void e.onPushAction("enable",c),children:"Save preview"})]}):v.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"})})]}),v.jsxs("div",{style:{borderTop:"1px solid var(--line)",paddingTop:16},children:[v.jsx("h4",{children:"App status"}),v.jsx("p",{className:"muted",children:e.offline?"Offline — reconnecting. Message and identity data are never cached.":"Online."}),e.updateAvailable&&v.jsx("button",{className:"btn primary",onClick:e.onReloadUpdate,children:"Reload to update"})]}),v.jsxs("div",{style:{borderTop:"1px solid var(--line)",paddingTop:16},children:[v.jsx("h4",{children:"Build"}),v.jsx("input",{className:"field mono",readOnly:!0,value:e.build?`${e.build.version} · ${e.build.sha}`:"Loading…"})]})]})}function fz(e,t,n,i,s=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=i),n.controllerChanged?"newer-available":i-n.firstMismatchAt>=s?"stuck":"newer-available")}const dz="d760891b84055feeb0e95bf4e4356af534c00b83",hz=15*6e4,pz=6e4,mz=fz;async function gz(){try{const e=await fetch("/version.json",{cache:"no-store"});return e.ok?await e.json():null}catch{return null}}function yz(e){const t={remoteSha:null,firstMismatchAt:null,controllerChanged:!1},n=()=>{t.controllerChanged=!0};navigator.serviceWorker?.addEventListener("controllerchange",n);let i=!1;const s=async()=>{const d=await gz(),h=mz(dz,d,t,Date.now(),pz);h==="newer-available"?(e.onUpdateAvailable(),navigator.serviceWorker?.getRegistration().then(m=>m?.update())):h==="stuck"&&!i&&(i=!0,e.onStuck(d.sha))},l=setTimeout(()=>void s(),5e3),a=setInterval(()=>void s(),hz),c=()=>{document.visibilityState==="visible"&&s()};return document.addEventListener("visibilitychange",c),()=>{clearTimeout(l),clearInterval(a),document.removeEventListener("visibilitychange",c),navigator.serviceWorker?.removeEventListener("controllerchange",n)}}async function vz(e){try{const t=await navigator.serviceWorker.getRegistrations();await Promise.all(t.map(i=>i.unregister()));const n=await caches.keys();await Promise.all(n.map(i=>caches.delete(i)))}catch{}return location.replace(location.pathname+"?v="+encodeURIComponent(e)),new Promise(()=>{})}function xz(){const e=new URL(location.href);e.searchParams.has("v")&&(e.searchParams.delete("v"),history.replaceState(null,"",e.pathname+e.search+e.hash))}const wx=[0,100,400,1e3,3e3,6e3],kx=e=>new Promise(t=>setTimeout(t,e)),Sx={delivered:1,read:2},bx="ours-dark-v3",Cx="#chat-message-",Ex=pl,wz=e=>e instanceof Error&&e.message?e.message:"The request could not be completed.";function Uk(e,t){const n=new Map,i=[];for(const s of e?.messages??[]){const l={dir:s.dir,text:s.text,date:s.date,read:s.read,wireId:s.wire_id,replyTo:s.reply_to?{wireId:s.reply_to.wire_id}:null,receipt:s.receipt??void 0,receiptless:s.dir==="out"&&!s.wire_id};s.wire_id?n.set(s.wire_id,l):i.push(l)}for(const s of t){const l=n.get(s.wire_id);n.set(s.wire_id,{dir:s.dir,text:"",date:s.date,read:l?.read??s.dir==="out",wireId:s.wire_id,replyTo:s.reply_to?{wireId:s.reply_to.wire_id}:l?.replyTo??null,kind:"file",filename:s.filename,mime:s.mime,receipt:l?.receipt})}return[...i,...n.values()].sort((s,l)=>{const a=Ex(s.date)-Ex(l.date);return a===0?s.wireId.localeCompare(l.wireId):a})}function kz(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 Sz(e,t){return[...e.contacts.contacts.map(i=>{const s=e.contacts.roots?.[i.container_id],l=Zr(e,i.container_id),c=Uk(l,t[i.container_id]??[]).at(-1),d=Jo(i);return{id:i.container_id,name:d,announcedName:i.name,initials:cs(d),when:c?xE(c.date):"",activityAt:c?.date??"",last:c?.kind==="file"?RE(c.filename,c.mime):l?.preview??c?.text??"",unread:l?.unread??0,status:"active",root:s?.root_cid??null,sub:s?`role “${s.role_id}” of ${s.root_name}`:"",roleId:s?.role_id??null,rootName:s?.root_name??null,mine:!1,kind:s?"agent":"person"}}),...e.contacts.pending.map(i=>{const s=Jo(i);return{id:`pending:${i.container_id}`,name:s,announcedName:i.name,initials:cs(s),when:"",activityAt:"",last:`${i.queued} queued · approval required`,unread:0,status:"pending",root:null,sub:"",roleId:null,rootName:null,mine:!1,kind:"person"}})]}function bz(){return v.jsx(Cz,{})}function Cz(){const e=S.useRef(oC(Dg(window.location.pathname))).current,[t,n]=S.useReducer(Lg,e),i=S.useRef(t),s=S.useRef(new rC),l=S.useRef(null),a=S.useRef(new Map),c=S.useRef(new Map),[d,h]=S.useState({}),m=S.useRef(d),[p,y]=S.useState(null),w=S.useRef(new Set),[k,C]=S.useState(null),T=S.useRef(k),E=S.useRef(!1),[M,A]=S.useState([]),[L,H]=S.useState(null),[D,Y]=S.useState(()=>localStorage.getItem(bx)!=="0"),[W,X]=S.useState(null),[j,G]=S.useState({supported:!1,offline:!navigator.onLine,updateAvailable:!1,registration:null}),[$,fe]=S.useState({status:"unsupported",preview:"full"}),[se,te]=S.useState(!1),[xe,Ee]=S.useState(!1),[q,le]=S.useState(()=>window.location.hash.startsWith(Cx)),{toasts:P,push:_,dismiss:Q,clear:R}=iz(),Z=S.useCallback(F=>{i.current=Lg(i.current,F),n(F)},[]),de=S.useCallback(F=>{E.current=F},[]);S.useEffect(()=>{i.current=t},[t]),T.current=k,m.current=d,S.useMemo(()=>(qg(Object.values(d).flat()),null),[d]),S.useEffect(()=>(document.documentElement.classList.toggle("theme-dark",D),()=>document.documentElement.classList.remove("theme-dark")),[D]);const ie=S.useCallback(F=>Z({type:"error",message:wz(F)}),[Z]),Ce=S.useCallback(()=>{const F=i.current;return{visibility:document.visibilityState,appRoute:F.route.name==="chats"?"chats":"other",selectedContactCid:Xr(F),desktopLayout:l.current?.matches??window.innerWidth>=861,mobileDetailOpen:F.mobileDetailOpen,conversationCoveringDialogOpen:T.current!==null}},[]),ge=S.useCallback(async(F,oe=!0)=>{try{const J=await Qe.conversation(F);return Z({type:"page",contactCid:F,page:J}),J}catch(J){return oe&&ie(J),null}},[Z,ie]),Te=S.useCallback(async(F,oe=!0)=>{try{const J=await Qe.files(F);return qg(J.files),h(Me=>({...Me,[F]:J.files})),J.files}catch(J){return oe&&ie(J),null}},[ie]);S.useEffect(()=>yz({onUpdateAvailable:()=>G(F=>({...F,updateAvailable:!0})),onStuck:F=>{vz(F)}}),[]);const je=S.useCallback(async()=>{const F=await Qe.contacts();return Z({type:"contacts",contacts:{...F,pending:F.pending??[]}}),F},[Z]),Ue=S.useCallback(async()=>{try{const[F,oe,J]=await Promise.all([Qe.identity(),Qe.contacts(),Qe.buildInfo()]),Me={...oe,pending:oe.pending??[]};return i.current.identity&&i.current.identity.cid!==F.cid&&(EE(),m.current={},h({})),Z({type:"snapshot",identity:F,contacts:Me}),H(J),await Promise.all(Me.contacts.flatMap(Fe=>[ge(Fe.container_id,!1),Te(Fe.container_id,!1)])),Xr(i.current)}catch(F){return ie(F),null}},[Z,Te,ge,ie]),kt=S.useCallback(async F=>{await s.current.request(F,async()=>{nC(F,Ce())&&(await Qe.markRead(F),await Promise.all([ge(F),je()]))}).catch(ie)},[Ce,je,ge,ie]),gt=S.useCallback(async(F,oe,J="page")=>{const Me=`page:${F}:${J}`,Fe=(a.current.get(Me)??0)+1;a.current.set(Me,Fe);for(const pe of wx){if(pe&&await kx(pe),a.current.get(Me)!==Fe)return;const Ie=await ge(F,!1);if(Ie&&oe(Ie))return}},[ge]),It=S.useCallback(async(F,oe)=>{const J=`file:${F}`,Me=(a.current.get(J)??0)+1;a.current.set(J,Me);for(const Fe of wx)if(Fe&&await kx(Fe),a.current.get(J)!==Me||(await Te(F,!1))?.some(Ie=>Ie.wire_id===oe))return},[Te]),Jt=S.useRef(!1);S.useEffect(()=>{if(!q||!t.loaded)return;const F=decodeURIComponent(window.location.hash.slice(Cx.length)),oe=Xr(i.current);if(!F||!oe){le(!1);return}if(Zr(i.current,oe)?.messages.some(J=>J.wire_id===F)){le(!1);return}Jt.current||(Jt.current=!0,gt(oe,J=>J.messages.some(Me=>Me.wire_id===F),`anchor:${F}`).catch(()=>{}).finally(()=>le(!1)))},[q,gt,t.loaded,t.pages]),S.useMemo(()=>(CE({url:F=>Object.values(m.current).flat().find(J=>J.wire_id===F)?.available?Qe.mediaUrl(F):null,bytes:async F=>{if(!Object.values(m.current).flat().find(Me=>Me.wire_id===F)?.available)return null;const J=await fetch(Qe.mediaUrl(F),{cache:"no-store",credentials:"same-origin"});if(!J.ok)throw new Error(`Media request failed (HTTP ${J.status})`);return new Uint8Array(await J.arrayBuffer())},fetch:async F=>{const oe=Object.values(m.current).flat().find(J=>J.wire_id===F);if(!oe)throw new Error("Media record is unavailable");await Qe.fetchFiles([F]),await Te(oe.contact_id)}}),null),[Te]),S.useEffect(()=>{let F;lC(J=>{G(J),zg(J.registration).then(fe).catch(()=>fe(Me=>({...Me,status:"error"})))},{shouldDeferReload:()=>E.current||T.current!==null}).then(J=>{F=J}).catch(ie);const oe=J=>{J.preventDefault(),X(J)};return window.addEventListener("beforeinstallprompt",oe),()=>{F?.(),window.removeEventListener("beforeinstallprompt",oe)}},[ie]),S.useEffect(()=>gC(),[]),S.useEffect(()=>{if(!(!j.registration||$.status!=="on"))return tC({registration:j.registration,identity:Qe.identity,onEvent:Px})},[$.status,$.bindingId,j.registration]),S.useEffect(()=>{const F=()=>fe(oe=>({...oe,status:"error"}));return window.addEventListener("ours-push-repair-required",F),()=>window.removeEventListener("ours-push-repair-required",F)},[]),S.useEffect(()=>{window.location.pathname==="/"&&window.history.replaceState(null,"",Ho()),l.current=window.matchMedia("(min-width: 861px)");const F=()=>Z({type:"route",route:Dg(window.location.pathname)}),oe=()=>{if(document.visibilityState!=="visible")return;const pe=Xr(i.current);pe&&kt(pe),Nx(),j.registration&&zg(j.registration).then(fe).catch(()=>fe(Ie=>({...Ie,status:"error"})))};window.addEventListener("popstate",F),document.addEventListener("visibilitychange",oe);const J=pe=>{const Ie=pe.type==="sync_required"?`${pe.type}:${pe.reason}`:pe.type==="receipt_received"?`${pe.type}:${pe.contact_id}:${pe.kind}:${pe.wire_ids.join(",")}`:`${pe.type}:${pe.contact_id}:${pe.wire_id}`,Tt=Date.now(),ot=c.current.get(Ie)??0;c.current.set(Ie,Tt);for(const[Ze,He]of c.current)Tt-He>6e4&&c.current.delete(Ze);Tt-ot<6e4||(async()=>{if(pe.type==="sync_required"){await Ue();return}if(je().catch(ie),pe.type==="file_received"){await It(pe.contact_id,pe.wire_id);const Ze=i.current.contacts.contacts.find(He=>He.container_id===pe.contact_id);Xr(i.current)!==pe.contact_id&&Ze&&_(pe.contact_id,Jo(Ze),"New file");return}if(pe.type==="message_received"){const Ze=i.current.contacts.contacts.find(He=>He.container_id===pe.contact_id);await gt(pe.contact_id,He=>He.messages.some(Pt=>Pt.wire_id===pe.wire_id),`message:${pe.wire_id}`),Xr(i.current)===pe.contact_id?await kt(pe.contact_id):Ze&&_(pe.contact_id,Jo(Ze),"New message");return}Z({type:"receipt",contactCid:pe.contact_id,kind:pe.kind,wireIds:pe.wire_ids}),await gt(pe.contact_id,Ze=>pe.wire_ids.every(He=>{const Pt=Ze.messages.find(oo=>oo.wire_id===He);return!!Pt?.receipt&&Sx[Pt.receipt]>=Sx[pe.kind]}),`receipt:${pe.wire_ids.join(",")}`)})().catch(ie)},Me=Qb(J),Fe=Zb(J,pe=>Z({type:"connection",connection:pe}));return Ue().then(pe=>{pe&&kt(pe)}),()=>{Fe(),Me(),window.removeEventListener("popstate",F),document.removeEventListener("visibilitychange",oe)}},[gt,It,Z,kt,_,je,Ue,ie,j.registration]);const Ht=(F,oe,J)=>{window.history.pushState(null,"",oe),Z({type:"route",route:F,mobileDetailOpen:J})},it=async F=>{Ht({name:"chats",contactCid:F},Ho(F),!0),R(F),await Promise.all([ge(F),Te(F,!1)]),await kt(F)},_t=async F=>{const oe=Zr(i.current,F);if(!(!oe?.nextBefore||w.current.has(F))){w.current.add(F),y(F);try{const J=await Qe.conversation(F,oe.nextBefore);Z({type:"older_page",contactCid:F,page:J,newer:oe.messages})}catch(J){ie(J)}finally{w.current.delete(F),y(null)}}},_e=Xr(t),ln=t.contacts.contacts.find(F=>F.container_id===_e),Lt=S.useMemo(()=>Sz(t,d),[t,d]),Dn=Lt.find(F=>F.id===_e)??null,un=_e?Uk(Zr(t,_e),d[_e]??[]):[],z=t.identity,he=t.loaded?_e&&!Zr(t,_e)||q?"updating":t.connection!=="live"?"connecting":null:"connecting",V=async(F,oe=$.preview)=>{if(j.registration){te(!0),fe(J=>({...J,status:"repairing",preview:oe}));try{fe(await(F==="enable"?Mx(j.registration,{preview:oe}):F==="repair"?pC(j.registration,oe):mC(j.registration,$)))}catch(J){fe(Me=>({...Me,status:"error"})),ie(J)}finally{te(!1)}}},ee=()=>{A([]),C("invite"),Qe.invites().then(A).catch(ie)};return t.route.name==="not_found"?v.jsxs("div",{className:"centered-screen",children:[v.jsx("h1",{children:"Page not found"}),v.jsx("button",{className:"btn primary",onClick:()=>Ht({name:"chats",contactCid:null},Ho()),children:"Open chats"})]}):z?v.jsx("div",{className:D?"theme-dark":"",style:{height:"100%"},children:v.jsxs("div",{className:"app signal-app",children:[v.jsxs("header",{className:"commandbar",children:[v.jsxs("div",{className:"command-brand","aria-label":"ours network",children:[v.jsx("span",{className:"command-mark","aria-hidden":!0,children:"o"}),v.jsx("span",{children:"ours"})]}),v.jsxs("div",{className:"command-copy",children:[v.jsx("strong",{children:"Messenger"}),v.jsx("span",{className:"command-kicker",children:"Private conversations on ours"})]}),v.jsxs("div",{className:"command-health "+(t.connection==="live"?"is-live":"is-connecting"),role:"status",children:[v.jsx("span",{"aria-hidden":!0}),t.connection==="live"?"Connected":"Connecting"]}),v.jsxs("div",{className:"command-actions",children:[W&&v.jsx("button",{className:"command-action",onClick:()=>void W.prompt().then(()=>X(null)),children:"Install app"}),v.jsxs("button",{className:"command-action",onClick:ee,children:[v.jsx(ve,{name:"plus"}),v.jsx("span",{children:"New chat"})]}),v.jsx("button",{className:"icon-btn command-settings",title:"Settings","aria-label":"Settings",onClick:()=>C("settings"),children:v.jsx(ve,{name:"settings"})}),v.jsxs("button",{className:"rail-me command-me",title:z.name,onClick:()=>Ee(F=>!F),children:[cs(z.name),v.jsx("span",{className:"conn-dot "+(t.connection==="live"?"on":"off")})]})]})]}),v.jsxs("main",{className:"section signal-stage"+(t.mobileDetailOpen?" show-detail":""),children:[v.jsx(GF,{contacts:Lt,roots:kz(t.contacts),selected:_e,onSelect:F=>{F.startsWith("pending:")||it(F)},onInvite:ee,onSettings:()=>C("settings")}),v.jsx(ZF,{contact:Dn,messages:un,syncing:he,hiddenEarlier:Zr(t,_e??"")?.hasMore?Math.max(1,(Zr(t,_e??"")?.total??un.length)-un.length):0,onLoadEarlier:_e&&p!==_e?()=>void _t(_e):void 0,onBack:()=>Ht({name:"chats",contactCid:null},Ho(),!1),onDraftChange:de,onSend:async(F,oe,J)=>{if(!_e)return;const Me=_e,Fe=await Qe.send(Me,F,oe,J);return Z({type:"sent_message",contactCid:Me,message:{dir:"out",text:F,date:new Date().toISOString(),read:!0,wire_id:Fe.wire_id??"",receipt:null,reply_to:oe?{wire_id:oe}:null}}),Fe.wire_id?gt(Me,pe=>pe.messages.some(Ie=>Ie.wire_id===Fe.wire_id),`send:${Fe.wire_id}`):je().catch(ie),Fe.wire_id??void 0},onSendFile:async(F,oe)=>{_e&&(await Qe.sendFile(_e,new Blob([F.bytes],{type:F.mime}),F.filename,F.mime,oe),await Promise.all([Te(_e),ge(_e,!1)]))},onFetchFile:async F=>{await Qe.fetchFiles([F]),_e&&await Te(_e)},onRename:F=>{_e&&Qe.renameContact(_e,F).then(Ue).catch(ie)},onRemove:()=>{_e&&confirm(`Remove “${ln?.name??"contact"}”?`)&&Qe.removeContact(_e).then(()=>(Ht({name:"chats",contactCid:null},Ho(),!1),Ue())).catch(ie)}},_e??"no-conversation")]}),v.jsxs("nav",{className:"mobile-tabbar","aria-label":"Primary navigation",children:[v.jsxs("button",{className:"mobile-tab active","aria-current":"page",children:[v.jsx(ve,{name:"chat"}),v.jsx("span",{children:"Chats"})]}),v.jsxs("button",{className:"mobile-tab",onClick:()=>C("settings"),children:[v.jsx(ve,{name:"bell"}),v.jsx("span",{children:"Alerts"})]}),v.jsxs("button",{className:"mobile-tab",onClick:()=>C("settings"),children:[v.jsx(ve,{name:"settings"}),v.jsx("span",{children:"Settings"})]})]}),v.jsxs("div",{className:"app-banners",children:[j.offline&&v.jsx("div",{className:"banner warn",children:"Offline — reconnecting to the network…"}),t.connection!=="live"&&v.jsx("div",{className:"banner warn",children:t.connection==="retrying"?"Live updates interrupted — reconnecting…":"Connecting to live updates…"}),j.updateAvailable&&v.jsxs("div",{className:"banner info",children:["A new version is available.",v.jsx("span",{className:"banner-actions",children:v.jsx("button",{className:"linkbtn",onClick:()=>{j.registration&&Og(j.registration)},children:"Restart now"})})]}),t.contacts.pending.map(F=>v.jsxs("div",{className:"banner info",children:["Introduction from ",Jo(F)," · ",F.queued," queued",v.jsxs("span",{className:"banner-actions",children:[v.jsx("button",{className:"linkbtn",onClick:()=>void Qe.respondToIntroduction(F.container_id,"approve").then(Ue).catch(ie),children:"Approve"}),v.jsx("button",{className:"linkbtn quiet",onClick:()=>void Qe.respondToIntroduction(F.container_id,"reject").then(Ue).catch(ie),children:"Reject"})]})]},F.container_id)),v.jsx(sz,{items:P,onDismiss:Q,onOpen:F=>void it(F)})]}),xe&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"pop-backdrop",onClick:()=>Ee(!1)}),v.jsxs("div",{className:"menu command-menu",children:[v.jsxs("div",{className:"menu-head",children:[v.jsx("div",{className:"avatar accent lg",children:cs(z.name)}),v.jsxs("div",{children:[v.jsx("strong",{children:z.name}),v.jsxs("div",{className:"faint mono",children:["@",jd(z.cid)]})]})]}),v.jsxs("button",{className:"menu-item",onClick:()=>{Ee(!1),ee()},children:[v.jsx(ve,{name:"plus"}),"Invite a contact"]}),v.jsxs("button",{className:"menu-item",onClick:()=>{Ee(!1),C("settings")},children:[v.jsx(ve,{name:"settings"}),"Settings"]})]})]}),k==="invite"&&v.jsx(uz,{identity:z,invites:M,onRefresh:async()=>A(await Qe.invites()),onCreate:async(F,oe)=>(await Qe.createInvite(F,oe)).blob,onAccept:async(F,oe)=>{await Qe.addContact(F,oe),await Ue()},onRevoke:async F=>{await Qe.revokeInvite(F)},onClose:()=>{C(null),Ue()}}),k==="settings"&&v.jsx(cz,{identity:z,push:$,workerSupported:j.supported,busy:se,offline:j.offline,updateAvailable:j.updateAvailable,build:L,dark:D,onToggleDark:()=>Y(F=>(localStorage.setItem(bx,F?"0":"1"),!F)),onSaveBio:async F=>{await Qe.setBio(F),await Ue()},onPushAction:V,onReloadUpdate:()=>{j.registration&&Og(j.registration)},onClose:()=>{T.current=null,C(null),_e&&kt(_e)}}),t.error&&v.jsxs("div",{className:"banner error",children:[t.error,v.jsx("button",{className:"linkbtn",onClick:()=>Z({type:"error",message:null}),children:"dismiss"})]})]})}):v.jsx("div",{className:D?"theme-dark":"",style:{height:"100%"},children:v.jsx("div",{className:"centered-screen",children:v.jsx("p",{className:"muted",children:"Loading…"})})})}xz();const Hk=document.getElementById("root");if(!Hk)throw new Error("missing #root");qb.createRoot(Hk).render(v.jsx(bz,{}));export{Wd as _,Td as g};
|
|
322
|
+
//# sourceMappingURL=index-0ny2lCl9.js.map
|