intlayer-editor 8.5.2 → 8.6.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/client/dist/assets/CodeBlockShiki-B5GuXEsm.js +2 -0
- package/client/dist/assets/HTMLRendererPlugin-DLxXPoEg.js +1 -0
- package/client/dist/assets/MarkdownRendererPlugin-BSsrjjlq.js +1 -0
- package/client/dist/assets/andromeeda-0XDktqgj.js +1 -0
- package/client/dist/assets/angular-html-9qIvwM_V.js +1 -0
- package/client/dist/assets/angular-html-Bx9nzaDM.js +1 -0
- package/client/dist/assets/angular-ts-BLMAgpmA.js +1 -0
- package/client/dist/assets/angular-ts-BbMpE1er.js +1 -0
- package/client/dist/assets/astro-DI5V_MPG.js +1 -0
- package/client/dist/assets/astro-lDXD4viN.js +1 -0
- package/client/dist/assets/aurora-x-D4mn7xX6.js +1 -0
- package/client/dist/assets/ayu-dark-Dp-AueBk.js +1 -0
- package/client/dist/assets/ayu-light-BJFRcmX9.js +1 -0
- package/client/dist/assets/ayu-mirage-TfAvwX78.js +1 -0
- package/client/dist/assets/bash-DiWcZ0hC.js +1 -0
- package/client/dist/assets/blade-BFdRdBFC.js +1 -0
- package/client/dist/assets/bundle-web-B4YYF3DS.js +13 -0
- package/client/dist/assets/c-BNWaH7E7.js +1 -0
- package/client/dist/assets/catppuccin-frappe-Y1DB_OKs.js +1 -0
- package/client/dist/assets/catppuccin-latte-BG6MV5dU.js +1 -0
- package/client/dist/assets/catppuccin-macchiato-BTBbBNdn.js +1 -0
- package/client/dist/assets/catppuccin-mocha-CAj5BkPj.js +1 -0
- package/client/dist/assets/chunk-BEqpzyXh.js +1 -0
- package/client/dist/assets/coffee-WRBfkKV-.js +1 -0
- package/client/dist/assets/cpp-D5b_EZbt.js +1 -0
- package/client/dist/assets/css-b7zcPlgN.js +1 -0
- package/client/dist/assets/css-zi7P-eEt.js +1 -0
- package/client/dist/assets/csv-Bu6kPoHv.js +1 -0
- package/client/dist/assets/dark-plus-1VDj4Xxq.js +1 -0
- package/client/dist/assets/dist-BYl4fRzW.js +11 -0
- package/client/dist/assets/dracula-CKVVALiQ.js +1 -0
- package/client/dist/assets/dracula-soft-W-XBLfyI.js +1 -0
- package/client/dist/assets/everforest-dark-CDwdwIwE.js +1 -0
- package/client/dist/assets/everforest-light-ByJ2YCjY.js +1 -0
- package/client/dist/assets/github-dark-Bf4t07ru.js +1 -0
- package/client/dist/assets/github-dark-BnMCkaDw.js +1 -0
- package/client/dist/assets/github-dark-default-C2picufy.js +1 -0
- package/client/dist/assets/github-dark-dimmed-Baet4OXO.js +1 -0
- package/client/dist/assets/github-dark-high-contrast-DaysLZfa.js +1 -0
- package/client/dist/assets/github-light-Bvg8SNJc.js +1 -0
- package/client/dist/assets/github-light-CsDkALIm.js +1 -0
- package/client/dist/assets/github-light-default-DThmimvs.js +1 -0
- package/client/dist/assets/github-light-high-contrast-Cc8hu0Xr.js +1 -0
- package/client/dist/assets/glsl-Bnq8ooMM.js +1 -0
- package/client/dist/assets/graphql-lOsKvfJI.js +1 -0
- package/client/dist/assets/gruvbox-dark-hard-McdBbxPz.js +1 -0
- package/client/dist/assets/gruvbox-dark-medium-BBjdlW7Q.js +1 -0
- package/client/dist/assets/gruvbox-dark-soft-C4Rr1L0M.js +1 -0
- package/client/dist/assets/gruvbox-light-hard-jp7KLbtS.js +1 -0
- package/client/dist/assets/gruvbox-light-medium-C_5xhOdf.js +1 -0
- package/client/dist/assets/gruvbox-light-soft-CcUT7M44.js +1 -0
- package/client/dist/assets/haml-D_lkT2RQ.js +1 -0
- package/client/dist/assets/handlebars-Ch1wyrOp.js +1 -0
- package/client/dist/assets/horizon-BvoNyo6S.js +1 -0
- package/client/dist/assets/horizon-bright-Bg2G2wQC.js +1 -0
- package/client/dist/assets/houston-Db8qpd8x.js +1 -0
- package/client/dist/assets/html-BCpE6-2Z.js +1 -0
- package/client/dist/assets/html-BMJK4Rub.js +1 -0
- package/client/dist/assets/html-derivative-Bx9nGwvt.js +1 -0
- package/client/dist/assets/http--6dVsSTM.js +1 -0
- package/client/dist/assets/hurl-BtppqHon.js +1 -0
- package/client/dist/assets/imba-BBWMM8NK.js +1 -0
- package/client/dist/assets/index-CVP4RVz3.js +222 -0
- package/client/dist/assets/index-_kzSCFwU.css +2 -0
- package/client/dist/assets/java-hEWK8nZr.js +1 -0
- package/client/dist/assets/javascript-CfhYeRvs.js +1 -0
- package/client/dist/assets/javascript-lp40AXCI.js +1 -0
- package/client/dist/assets/jinja-iLxeCMup.js +1 -0
- package/client/dist/assets/jison-Dh_fjRu2.js +1 -0
- package/client/dist/assets/json-BSgmMBnQ.js +1 -0
- package/client/dist/assets/json-CS1NHdPo.js +1 -0
- package/client/dist/assets/json5-5VQOoHgl.js +1 -0
- package/client/dist/assets/json5-kGP92fYF.js +1 -0
- package/client/dist/assets/jsonc-D60JzQzY.js +1 -0
- package/client/dist/assets/jsonl-DwtO0Vqy.js +1 -0
- package/client/dist/assets/jsx-VkU8uxVH.js +1 -0
- package/client/dist/assets/jsx-runtime-sJGJLeig.js +1 -0
- package/client/dist/assets/julia-D4lUihVt.js +1 -0
- package/client/dist/assets/kanagawa-dragon-CTgCt2Yp.js +1 -0
- package/client/dist/assets/kanagawa-lotus--iQkF1jW.js +1 -0
- package/client/dist/assets/kanagawa-wave-DqXR5VjX.js +1 -0
- package/client/dist/assets/laserwave-C9GkFI91.js +1 -0
- package/client/dist/assets/less-DKKEtp-Q.js +1 -0
- package/client/dist/assets/light-plus-B9QgXrDS.js +1 -0
- package/client/dist/assets/markdown-CBe4XPCh.js +1 -0
- package/client/dist/assets/markdown-DIHUBMKX.js +1 -0
- package/client/dist/assets/marko-CT_Zxy4l.js +1 -0
- package/client/dist/assets/material-theme-BxXrHRux.js +1 -0
- package/client/dist/assets/material-theme-darker-DHK2WFsq.js +1 -0
- package/client/dist/assets/material-theme-lighter-DIYZSmZL.js +1 -0
- package/client/dist/assets/material-theme-ocean-D7sSVsTK.js +1 -0
- package/client/dist/assets/material-theme-palenight-CCrlT5dP.js +1 -0
- package/client/dist/assets/mdc-DzcqSNFt.js +1 -0
- package/client/dist/assets/mdx-DYhg87jk.js +1 -0
- package/client/dist/assets/min-dark-DtYnB4ZT.js +1 -0
- package/client/dist/assets/min-light-D9ZE82Vp.js +1 -0
- package/client/dist/assets/monokai-BoRzQdI3.js +1 -0
- package/client/dist/assets/night-owl-BfRFVCbP.js +1 -0
- package/client/dist/assets/night-owl-light-CgsPcGr8.js +1 -0
- package/client/dist/assets/nord-CIf7aABo.js +1 -0
- package/client/dist/assets/one-dark-pro-DR6bQqoX.js +1 -0
- package/client/dist/assets/one-light-CxgKmxQ1.js +1 -0
- package/client/dist/assets/php-8GVxmzsO.js +1 -0
- package/client/dist/assets/plastic-CtO17ju5.js +1 -0
- package/client/dist/assets/poimandres-CgvksVzz.js +1 -0
- package/client/dist/assets/postcss-CXRaJCbu.js +1 -0
- package/client/dist/assets/preload-helper-rov5CBGT.js +1 -0
- package/client/dist/assets/pug-DsFYRnDu.js +1 -0
- package/client/dist/assets/python-CqTCsi7P.js +1 -0
- package/client/dist/assets/r-BJTVXyLX.js +1 -0
- package/client/dist/assets/react-CFRkDy7n.js +1 -0
- package/client/dist/assets/red-DXaJt1DD.js +1 -0
- package/client/dist/assets/regexp-C06LRR7o.js +1 -0
- package/client/dist/assets/rose-pine-C1F1WseA.js +1 -0
- package/client/dist/assets/rose-pine-dawn-Caimw6RF.js +1 -0
- package/client/dist/assets/rose-pine-moon-CZ8RMQbI.js +1 -0
- package/client/dist/assets/sass-DPCtKeQo.js +1 -0
- package/client/dist/assets/scss-Czfxzwgj.js +1 -0
- package/client/dist/assets/shellscript-BZ3Zhi4t.js +1 -0
- package/client/dist/assets/slack-dark-l_y8vbhz.js +1 -0
- package/client/dist/assets/slack-ochin-Cw24xbQp.js +1 -0
- package/client/dist/assets/snazzy-light-D4MJ4eZA.js +1 -0
- package/client/dist/assets/solarized-dark-DmRM_Z4k.js +1 -0
- package/client/dist/assets/solarized-light-CamYlEHx.js +1 -0
- package/client/dist/assets/sql-CE7uhDt-.js +1 -0
- package/client/dist/assets/stylus-BkV1mxn8.js +1 -0
- package/client/dist/assets/svelte-BUwbQboq.js +1 -0
- package/client/dist/assets/svelte-sO7mwoJ5.js +1 -0
- package/client/dist/assets/synthwave-84-xB4DucW9.js +1 -0
- package/client/dist/assets/tokyo-night-BY1a2EkW.js +1 -0
- package/client/dist/assets/ts-tags-C2jqHH4O.js +1 -0
- package/client/dist/assets/tsx-B7HobzQz.js +1 -0
- package/client/dist/assets/tsx-D-YyH6eG.js +1 -0
- package/client/dist/assets/typescript-BhJsSQYB.js +1 -0
- package/client/dist/assets/typescript-Di5FgdVP.js +1 -0
- package/client/dist/assets/unmerged_dictionaries-B599AqSH.js +1 -0
- package/client/dist/assets/vesper-D2h9qQvw.js +1 -0
- package/client/dist/assets/vitesse-black-BuxZysgi.js +1 -0
- package/client/dist/assets/vitesse-dark-7iN3zIsP.js +1 -0
- package/client/dist/assets/vitesse-light-CgSzPXRp.js +1 -0
- package/client/dist/assets/vue-D6uIb0iF.js +1 -0
- package/client/dist/assets/vue-DY63VErZ.js +1 -0
- package/client/dist/assets/vue-html-QPOSaZWN.js +1 -0
- package/client/dist/assets/vue-vine-DegVq5xC.js +1 -0
- package/client/dist/assets/wasm-BCu9mGfE.js +1 -0
- package/client/dist/assets/wasm-D8u7Z6mB.js +1 -0
- package/client/dist/assets/wgsl-CpBCjDIx.js +1 -0
- package/client/dist/assets/wit-X7YW3B12.js +1 -0
- package/client/dist/assets/xml-Bnbq2zU5.js +1 -0
- package/client/dist/assets/xml-CsIXNDsk.js +1 -0
- package/client/dist/assets/yaml-Cp_Rm_Eg.js +1 -0
- package/client/dist/assets/yaml-wHllvieS.js +1 -0
- package/client/dist/index.html +6 -6
- package/package.json +15 -17
- package/client/dist/assets/CodeBlockShiki-DjsiIoFk.js +0 -135
- package/client/dist/assets/HTMLRendererPlugin-B6Eld7in.js +0 -260
- package/client/dist/assets/MarkdownRendererPlugin-CZjpMlL7.js +0 -12
- package/client/dist/assets/andromeeda-hO5jhASl.js +0 -4
- package/client/dist/assets/angular-html-CB13AsOD.js +0 -33
- package/client/dist/assets/angular-html-DBLVmRwL.js +0 -2
- package/client/dist/assets/angular-ts-C9ELUJYv.js +0 -2
- package/client/dist/assets/angular-ts-CCw7GlcU.js +0 -27
- package/client/dist/assets/astro-DvvtD-Rg.js +0 -19
- package/client/dist/assets/astro-sNYlBERO.js +0 -2
- package/client/dist/assets/aurora-x-DYBabLdU.js +0 -4
- package/client/dist/assets/ayu-dark-CGCXRUno.js +0 -4
- package/client/dist/assets/ayu-light-CJW_tG2g.js +0 -4
- package/client/dist/assets/ayu-mirage-DqhgbLpq.js +0 -4
- package/client/dist/assets/bash-WEGyGKlK.js +0 -2
- package/client/dist/assets/blade-Bcf_-uRd.js +0 -21
- package/client/dist/assets/bundle-web-CuX3_94g.js +0 -8463
- package/client/dist/assets/c-DNoS3b9n.js +0 -6
- package/client/dist/assets/catppuccin-frappe-D5Ih2hdC.js +0 -4
- package/client/dist/assets/catppuccin-latte-L9Sf5v9D.js +0 -4
- package/client/dist/assets/catppuccin-macchiato-BqPOcSaP.js +0 -4
- package/client/dist/assets/catppuccin-mocha-BAyTggB4.js +0 -4
- package/client/dist/assets/chunk-C0u3WHrm.js +0 -35
- package/client/dist/assets/coffee-Dzs5FG7f.js +0 -6
- package/client/dist/assets/cpp-DfI8x_Jv.js +0 -23
- package/client/dist/assets/css-OihuGpvm.js +0 -6
- package/client/dist/assets/csv-CroPVNz4.js +0 -3
- package/client/dist/assets/dark-plus-C_wf8Ao2.js +0 -4
- package/client/dist/assets/dist-D8J9DkzO.js +0 -721
- package/client/dist/assets/dracula-Be8Pz_27.js +0 -4
- package/client/dist/assets/dracula-soft-BE3WBpNy.js +0 -4
- package/client/dist/assets/everforest-dark-DgE6uJFn.js +0 -4
- package/client/dist/assets/everforest-light-7lFM_F2N.js +0 -4
- package/client/dist/assets/github-dark-Bqr3wypA.js +0 -4
- package/client/dist/assets/github-dark-BwJSAZXP.js +0 -2
- package/client/dist/assets/github-dark-default-Bk8amvZh.js +0 -4
- package/client/dist/assets/github-dark-dimmed-D0ohZRzn.js +0 -4
- package/client/dist/assets/github-dark-high-contrast-DSW7NhP6.js +0 -4
- package/client/dist/assets/github-light-CZ2m4Dvz.js +0 -2
- package/client/dist/assets/github-light-DLfy9Pka.js +0 -4
- package/client/dist/assets/github-light-default-D1WSOdh0.js +0 -4
- package/client/dist/assets/github-light-high-contrast-CxTSUXG2.js +0 -4
- package/client/dist/assets/glsl-BeVtM66e.js +0 -8
- package/client/dist/assets/graphql-DtJo7-ib.js +0 -15
- package/client/dist/assets/gruvbox-dark-hard-CnJdJSQC.js +0 -4
- package/client/dist/assets/gruvbox-dark-medium-DtSzz1hF.js +0 -4
- package/client/dist/assets/gruvbox-dark-soft-5m-HFbUp.js +0 -4
- package/client/dist/assets/gruvbox-light-hard-Cq-lsuZD.js +0 -4
- package/client/dist/assets/gruvbox-light-medium-Cg_1ZxY6.js +0 -4
- package/client/dist/assets/gruvbox-light-soft-Bw7bDwNH.js +0 -4
- package/client/dist/assets/haml-jUAPySRR.js +0 -11
- package/client/dist/assets/handlebars-AKXGiWPl.js +0 -15
- package/client/dist/assets/horizon-D_9nR5mx.js +0 -4
- package/client/dist/assets/horizon-bright-Bzw9PPoZ.js +0 -4
- package/client/dist/assets/houston-CHx-axEj.js +0 -4
- package/client/dist/assets/html-BOf-Tl1v.js +0 -13
- package/client/dist/assets/html-DLt87G20.js +0 -2
- package/client/dist/assets/html-derivative-ChmB54qu.js +0 -8
- package/client/dist/assets/http-yMcKwhsE.js +0 -15
- package/client/dist/assets/hurl-BTK0AsDR.js +0 -13
- package/client/dist/assets/imba-C6xgaoRA.js +0 -3
- package/client/dist/assets/index-B5Qkzjg3.css +0 -7548
- package/client/dist/assets/index-BpMyckzW.js +0 -61561
- package/client/dist/assets/java-BQH-XPpo.js +0 -6
- package/client/dist/assets/javascript-Bj8xG5Bf.js +0 -2
- package/client/dist/assets/javascript-J1IWIneD.js +0 -6
- package/client/dist/assets/jinja-O1M0YxgI.js +0 -10
- package/client/dist/assets/jison--O2q3sdA.js +0 -6
- package/client/dist/assets/json-C2t2Y3XK.js +0 -6
- package/client/dist/assets/json-DJtgMbAe.js +0 -2
- package/client/dist/assets/json5-CbjC9xwy.js +0 -3
- package/client/dist/assets/json5-O7Bjs0LT.js +0 -2
- package/client/dist/assets/jsonc-BOXsj9el.js +0 -3
- package/client/dist/assets/jsonl-VrRBFCbQ.js +0 -3
- package/client/dist/assets/jsx-BpEpKz6X.js +0 -6
- package/client/dist/assets/jsx-runtime-BkWmzJHO.js +0 -41
- package/client/dist/assets/julia-BeMhktm_.js +0 -17
- package/client/dist/assets/kanagawa-dragon-DgfKNqgM.js +0 -4
- package/client/dist/assets/kanagawa-lotus-CZl83ZkH.js +0 -4
- package/client/dist/assets/kanagawa-wave-B-IXJK_D.js +0 -4
- package/client/dist/assets/laserwave-WTVf4MDz.js +0 -4
- package/client/dist/assets/less-D1WDSXXK.js +0 -3
- package/client/dist/assets/light-plus-wB3HHb57.js +0 -4
- package/client/dist/assets/markdown-BGjF3M3Z.js +0 -3
- package/client/dist/assets/marko-C0SPr5bb.js +0 -15
- package/client/dist/assets/material-theme-7dk3Vek5.js +0 -4
- package/client/dist/assets/material-theme-darker-UFRC_EiD.js +0 -4
- package/client/dist/assets/material-theme-lighter-CXTDxR3K.js +0 -4
- package/client/dist/assets/material-theme-ocean-Rd_lleaT.js +0 -4
- package/client/dist/assets/material-theme-palenight-ClkrK8J4.js +0 -4
- package/client/dist/assets/mdc-DbE3_yUC.js +0 -13
- package/client/dist/assets/mdx-iXfLqJGi.js +0 -3
- package/client/dist/assets/min-dark-BZt9LRdr.js +0 -4
- package/client/dist/assets/min-light-Bp3XubLF.js +0 -4
- package/client/dist/assets/monokai-DoeoUkNO.js +0 -4
- package/client/dist/assets/night-owl-DaaszxSn.js +0 -4
- package/client/dist/assets/night-owl-light-Dk2LG9pq.js +0 -4
- package/client/dist/assets/nord-DlYz8Alw.js +0 -4
- package/client/dist/assets/one-dark-pro-CLReVwol.js +0 -4
- package/client/dist/assets/one-light-BJcofSe2.js +0 -4
- package/client/dist/assets/php-DJp3piDR.js +0 -19
- package/client/dist/assets/plastic-CLV82YRn.js +0 -4
- package/client/dist/assets/poimandres-DaFupUOt.js +0 -4
- package/client/dist/assets/postcss-D6F4Y6v1.js +0 -6
- package/client/dist/assets/preload-helper-B4JcPOPd.js +0 -61
- package/client/dist/assets/pug-CAxO-nBL.js +0 -13
- package/client/dist/assets/python-Dyu-4Mf1.js +0 -3
- package/client/dist/assets/r-DEywEym-.js +0 -3
- package/client/dist/assets/react-BI_C_976.js +0 -367
- package/client/dist/assets/red-BGrsKeuJ.js +0 -4
- package/client/dist/assets/regexp-CBpw7t4g.js +0 -6
- package/client/dist/assets/rose-pine-SkCKD6a8.js +0 -4
- package/client/dist/assets/rose-pine-dawn-CbNBqYaR.js +0 -4
- package/client/dist/assets/rose-pine-moon-DFgn0w7P.js +0 -4
- package/client/dist/assets/sass-DTVBHDch.js +0 -3
- package/client/dist/assets/scss-8p7XvvO5.js +0 -8
- package/client/dist/assets/shellscript-CH1oYrEq.js +0 -6
- package/client/dist/assets/slack-dark-BhRcHr0k.js +0 -4
- package/client/dist/assets/slack-ochin-kAJk7lNt.js +0 -4
- package/client/dist/assets/snazzy-light-kQQlZGCq.js +0 -4
- package/client/dist/assets/solarized-dark-BSUy1Uju.js +0 -4
- package/client/dist/assets/solarized-light-DemSzgMV.js +0 -4
- package/client/dist/assets/sql-DbMNSYuW.js +0 -6
- package/client/dist/assets/stylus-C9l2DL-7.js +0 -3
- package/client/dist/assets/svelte-CWntjIRI.js +0 -15
- package/client/dist/assets/synthwave-84-B0o-0JAK.js +0 -4
- package/client/dist/assets/tokyo-night-BACVheju.js +0 -4
- package/client/dist/assets/ts-tags-BpU3THeZ.js +0 -59
- package/client/dist/assets/tsx-BFOKZky4.js +0 -2
- package/client/dist/assets/tsx-CMmjdK2W.js +0 -6
- package/client/dist/assets/typescript-BEsCk2cy.js +0 -6
- package/client/dist/assets/typescript-BapAS8lG.js +0 -2
- package/client/dist/assets/unmerged_dictionaries-DFHIR2QQ.js +0 -5
- package/client/dist/assets/vesper-CrR5f1a1.js +0 -4
- package/client/dist/assets/vitesse-black-W4bmnfp8.js +0 -4
- package/client/dist/assets/vitesse-dark-CJH4rffg.js +0 -4
- package/client/dist/assets/vitesse-light-BwmcezJX.js +0 -4
- package/client/dist/assets/vue-B4mAn0SQ.js +0 -2
- package/client/dist/assets/vue-html-CMWsrORU.js +0 -6
- package/client/dist/assets/vue-vine-CR6wdmCv.js +0 -19
- package/client/dist/assets/vue-y9u52Whf.js +0 -31
- package/client/dist/assets/wasm-DMG-lL0H.js +0 -3
- package/client/dist/assets/wasm-cxA-GdWm.js +0 -7
- package/client/dist/assets/wgsl-BU619fT7.js +0 -3
- package/client/dist/assets/wit-CPBO0VIP.js +0 -3
- package/client/dist/assets/xml-0-pa_Fkm.js +0 -8
- package/client/dist/assets/xml-lldD3Wzd.js +0 -2
- package/client/dist/assets/yaml-BlkaZGrd.js +0 -3
- package/client/dist/assets/yaml-D0P8Qywa.js +0 -2
- package/server/dist/_virtual/rolldown_runtime.cjs +0 -29
- package/server/dist/_virtual/rolldown_runtime.mjs +0 -9
- package/server/dist/checkPortAvailability-BJtgxTDw.cjs +0 -60
- package/server/dist/checkPortAvailability-BJtgxTDw.cjs.map +0 -1
- package/server/dist/checkPortAvailability-BQTphbYJ.cjs +0 -2
- package/server/dist/checkPortAvailability-BQTphbYJ.cjs.map +0 -1
- package/server/dist/httpStatusCodes-Bscj19Pj.d.ts +0 -407
- package/server/dist/responseData-DcKPpb9v.d.ts +0 -87
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HTMLRendererPlugin-DLxXPoEg.js","assets/chunk-BEqpzyXh.js","assets/jsx-runtime-sJGJLeig.js","assets/react-CFRkDy7n.js","assets/CodeBlockShiki-B5GuXEsm.js","assets/preload-helper-rov5CBGT.js","assets/dist-BYl4fRzW.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,i as t,n,r,t as i}from"./chunk-BEqpzyXh.js";import{t as a}from"./react-CFRkDy7n.js";import{t as o}from"./jsx-runtime-sJGJLeig.js";import{t as s}from"./preload-helper-rov5CBGT.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var c=i((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),l=i(((e,t)=>{t.exports=c()})),u=i((e=>{var t=a();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=i.p;try{if(c.T=null,i.p=2,e)return e()}finally{c.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.4`})),d=i(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=u()})),f=i((e=>{var t=l(),n=a(),r=d();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(s(e)!==e)throw Error(i(188))}function p(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return f(a),e;if(o===r)return f(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var c=!1,l=a.child;l;){if(l===n){c=!0,n=a,r=o;break}if(l===r){c=!0,r=a,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=a;break}if(l===r){c=!0,r=o,n=a;break}l=l.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function ee(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ee(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var te=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function ae(e){return{current:e}}function oe(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function se(e,t){ie++,re[ie]=e.current,e.current=t}var ce=ae(null),le=ae(null),ue=ae(null),de=ae(null);function fe(e,t){switch(se(ue,t),se(le,e),se(ce,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Yd(t),e=Xd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}oe(ce),se(ce,e)}function pe(){oe(ce),oe(le),oe(ue)}function me(e){e.memoizedState!==null&&se(de,e);var t=ce.current,n=Xd(t,e.type);t!==n&&(se(le,e),se(ce,n))}function he(e){le.current===e&&(oe(ce),oe(le)),de.current===e&&(oe(de),op._currentValue=ne)}var ge,_e;function ve(e){if(ge===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ge=t&&t[1]||``,_e=-1<e.stack.indexOf(`
|
|
3
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
+
`+ge+e+_e}var ye=!1;function be(e,t){if(!e||ye)return``;ye=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
|
+
`),l=s.split(`
|
|
6
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ye=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ve(n):``}function xe(e,t){switch(e.tag){case 26:case 27:case 5:return ve(e.type);case 16:return ve(`Lazy`);case 13:return e.child!==t&&t!==null?ve(`Suspense Fallback`):ve(`Suspense`);case 19:return ve(`SuspenseList`);case 0:case 15:return be(e.type,!1);case 11:return be(e.type.render,!1);case 1:return be(e.type,!0);case 31:return ve(`Activity`);default:return``}}function I(e){try{var t=``,n=null;do t+=xe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
+
Error generating stack: `+e.message+`
|
|
9
|
+
`+e.stack}}var Se=Object.prototype.hasOwnProperty,Ce=t.unstable_scheduleCallback,we=t.unstable_cancelCallback,Te=t.unstable_shouldYield,Ee=t.unstable_requestPaint,De=t.unstable_now,Oe=t.unstable_getCurrentPriorityLevel,ke=t.unstable_ImmediatePriority,Ae=t.unstable_UserBlockingPriority,je=t.unstable_NormalPriority,Me=t.unstable_LowPriority,Ne=t.unstable_IdlePriority,Pe=t.log,Fe=t.unstable_setDisableYieldValue,Ie=null,Le=null;function Re(e){if(typeof Pe==`function`&&Fe(e),Le&&typeof Le.setStrictMode==`function`)try{Le.setStrictMode(Ie,e)}catch{}}var ze=Math.clz32?Math.clz32:He,Be=Math.log,Ve=Math.LN2;function He(e){return e>>>=0,e===0?32:31-(Be(e)/Ve|0)|0}var Ue=256,We=262144,Ge=4194304;function Ke(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ke(n))):i=Ke(o):i=Ke(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ke(n))):i=Ke(o)):i=Ke(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ye(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xe(){var e=Ge;return Ge<<=1,!(Ge&62914560)&&(Ge=4194304),e}function Ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $e(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&et(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function et(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function tt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function nt(e,t){var n=t&-t;return n=n&42?1:rt(n),(n&(e.suspendedLanes|t))===0?n:0}function rt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function it(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function at(){var e=F.p;return e===0?(e=window.event,e===void 0?32:Sp(e.type)):e}function ot(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var st=Math.random().toString(36).slice(2),ct=`__reactFiber$`+st,lt=`__reactProps$`+st,ut=`__reactContainer$`+st,dt=`__reactEvents$`+st,ft=`__reactListeners$`+st,pt=`__reactHandles$`+st,mt=`__reactResources$`+st,ht=`__reactMarker$`+st;function gt(e){delete e[ct],delete e[lt],delete e[dt],delete e[ft],delete e[pt]}function _t(e){var t=e[ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ut]||n[ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=yf(e);e!==null;){if(n=e[ct])return n;e=yf(e)}return t}e=n,n=e.parentNode}return null}function vt(e){if(e=e[ct]||e[ut]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function yt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function bt(e){var t=e[mt];return t||=e[mt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function xt(e){e[ht]=!0}var St=new Set,Ct={};function wt(e,t){Tt(e,t),Tt(e+`Capture`,t)}function Tt(e,t){for(Ct[e]=t,e=0;e<t.length;e++)St.add(t[e])}var Et=RegExp(`^[: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]*$`),Dt={},Ot={};function kt(e){return Se.call(Ot,e)?!0:Se.call(Dt,e)?!1:Et.test(e)?Ot[e]=!0:(Dt[e]=!0,!1)}function At(e,t,n){if(kt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function jt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Mt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Nt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Pt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ft(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function It(e){if(!e._valueTracker){var t=Pt(e)?`checked`:`value`;e._valueTracker=Ft(e,t,``+e[t])}}function Lt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Pt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Rt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var zt=/[\n"\\]/g;function Bt(e){return e.replace(zt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Vt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Nt(t)):e.value!==``+Nt(t)&&(e.value=``+Nt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ut(e,o,Nt(n)):Ut(e,o,Nt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Nt(s):e.removeAttribute(`name`)}function Ht(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){It(e);return}n=n==null?``:``+Nt(n),t=t==null?n:``+Nt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),It(e)}function Ut(e,t,n){t===`number`&&Rt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Wt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Nt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Gt(e,t,n){if(t!=null&&(t=``+Nt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Nt(n)}function Kt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(te(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Nt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),It(e)}function qt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Yt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Jt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Xt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Yt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Yt(e,o,t[o])}function Zt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Qt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`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`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`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`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`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`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),$t=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function en(e){return $t.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function tn(){}var nn=null;function rn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var an=null,on=null;function sn(e){var t=vt(e);if(t&&(e=t.stateNode)){var n=e[lt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Vt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Bt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[lt]||null;if(!a)throw Error(i(90));Vt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Lt(r)}break a;case`textarea`:Gt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Wt(e,!!n.multiple,t,!1)}}}var cn=!1;function ln(e,t,n){if(cn)return e(t,n);cn=!0;try{return e(t)}finally{if(cn=!1,(an!==null||on!==null)&&(Ou(),an&&(t=an,e=on,on=an=null,sn(t),e)))for(t=0;t<e.length;t++)sn(e[t])}}function un(e,t){var n=e.stateNode;if(n===null)return null;var r=n[lt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var dn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),fn=!1;if(dn)try{var pn={};Object.defineProperty(pn,`passive`,{get:function(){fn=!0}}),window.addEventListener(`test`,pn,pn),window.removeEventListener(`test`,pn,pn)}catch{fn=!1}var mn=null,hn=null,gn=null;function _n(){if(gn)return gn;var e,t=hn,n=t.length,r,i=`value`in mn?mn.value:mn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return gn=i.slice(e,1<r?1-r:void 0)}function vn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yn(){return!0}function bn(){return!1}function xn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?yn:bn,this.isPropagationStopped=bn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=yn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=yn)},persist:function(){},isPersistent:yn}),t}var Sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cn=xn(Sn),wn=h({},Sn,{view:0,detail:0}),Tn=xn(wn),En,Dn,On,kn=h({},wn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==On&&(On&&e.type===`mousemove`?(En=e.screenX-On.screenX,Dn=e.screenY-On.screenY):Dn=En=0,On=e),En)},movementY:function(e){return`movementY`in e?e.movementY:Dn}}),An=xn(kn),jn=xn(h({},kn,{dataTransfer:0})),Mn=xn(h({},wn,{relatedTarget:0})),Nn=xn(h({},Sn,{animationName:0,elapsedTime:0,pseudoElement:0})),Pn=xn(h({},Sn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Fn=xn(h({},Sn,{data:0})),In={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Ln={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`},Rn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function zn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Rn[e])?!!t[e]:!1}function Bn(){return zn}var Vn=xn(h({},wn,{key:function(e){if(e.key){var t=In[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=vn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Ln[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bn,charCode:function(e){return e.type===`keypress`?vn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?vn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Hn=xn(h({},kn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Un=xn(h({},wn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bn})),Wn=xn(h({},Sn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Gn=xn(h({},kn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Kn=xn(h({},Sn,{newState:0,oldState:0})),qn=[9,13,27,32],Jn=dn&&`CompositionEvent`in window,Yn=null;dn&&`documentMode`in document&&(Yn=document.documentMode);var Xn=dn&&`TextEvent`in window&&!Yn,Zn=dn&&(!Jn||Yn&&8<Yn&&11>=Yn),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Jn&&er(e,t)?(e=_n(),gn=hn=mn=null,nr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Zn&&t.locale!==`ko`?null:t.data;default:return null}}var ar={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 or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ar[e.type]:t===`textarea`}function sr(e,t,n,r){an?on?on.push(r):on=[r]:an=r,t=Nd(t,`onChange`),0<t.length&&(n=new Cn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var cr=null,lr=null;function ur(e){Td(e,0)}function dr(e){if(Lt(yt(e)))return e}function fr(e,t){if(e===`change`)return t}var pr=!1;if(dn){var mr;if(dn){var hr=`oninput`in document;if(!hr){var gr=document.createElement(`div`);gr.setAttribute(`oninput`,`return;`),hr=typeof gr.oninput==`function`}mr=hr}else mr=!1;pr=mr&&(!document.documentMode||9<document.documentMode)}function _r(){cr&&(cr.detachEvent(`onpropertychange`,vr),lr=cr=null)}function vr(e){if(e.propertyName===`value`&&dr(lr)){var t=[];sr(t,lr,e,rn(e)),ln(ur,t)}}function yr(e,t,n){e===`focusin`?(_r(),cr=t,lr=n,cr.attachEvent(`onpropertychange`,vr)):e===`focusout`&&_r()}function br(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return dr(lr)}function xr(e,t){if(e===`click`)return dr(t)}function Sr(e,t){if(e===`input`||e===`change`)return dr(t)}function Cr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var wr=typeof Object.is==`function`?Object.is:Cr;function Tr(e,t){if(wr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Se.call(t,i)||!wr(e[i],t[i]))return!1}return!0}function Er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dr(e,t){var n=Er(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Er(n)}}function Or(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Or(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Rt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Rt(e.document)}return t}function Ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var jr=dn&&`documentMode`in document&&11>=document.documentMode,Mr=null,Nr=null,Pr=null,Fr=!1;function Ir(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fr||Mr==null||Mr!==Rt(r)||(r=Mr,`selectionStart`in r&&Ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pr&&Tr(Pr,r)||(Pr=r,r=Nd(Nr,`onSelect`),0<r.length&&(t=new Cn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Mr)))}function Lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Rr={animationend:Lr(`Animation`,`AnimationEnd`),animationiteration:Lr(`Animation`,`AnimationIteration`),animationstart:Lr(`Animation`,`AnimationStart`),transitionrun:Lr(`Transition`,`TransitionRun`),transitionstart:Lr(`Transition`,`TransitionStart`),transitioncancel:Lr(`Transition`,`TransitionCancel`),transitionend:Lr(`Transition`,`TransitionEnd`)},zr={},Br={};dn&&(Br=document.createElement(`div`).style,`AnimationEvent`in window||(delete Rr.animationend.animation,delete Rr.animationiteration.animation,delete Rr.animationstart.animation),`TransitionEvent`in window||delete Rr.transitionend.transition);function Vr(e){if(zr[e])return zr[e];if(!Rr[e])return e;var t=Rr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Br)return zr[e]=t[n];return e}var Hr=Vr(`animationend`),Ur=Vr(`animationiteration`),Wr=Vr(`animationstart`),Gr=Vr(`transitionrun`),Kr=Vr(`transitionstart`),qr=Vr(`transitioncancel`),Jr=Vr(`transitionend`),Yr=new Map,Xr=`abort auxClick beforeToggle 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(` `);Xr.push(`scrollEnd`);function Zr(e,t){Yr.set(e,t),wt(t,[e])}var Qr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},$r=[],ei=0,ti=0;function ni(){for(var e=ei,t=ti=ei=0;t<e;){var n=$r[t];$r[t++]=null;var r=$r[t];$r[t++]=null;var i=$r[t];$r[t++]=null;var a=$r[t];if($r[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&oi(n,i,a)}}function ri(e,t,n,r){$r[ei++]=e,$r[ei++]=t,$r[ei++]=n,$r[ei++]=r,ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ii(e,t,n,r){return ri(e,t,n,r),si(e)}function ai(e,t){return ri(e,null,null,t),si(e)}function oi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function si(e){if(50<yu)throw yu=0,bu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ci={};function li(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ui(e,t,n,r){return new li(e,t,n,r)}function di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fi(e,t){var n=e.alternate;return n===null?(n=ui(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function pi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function mi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)di(e)&&(s=1);else if(typeof e==`string`)s=Zf(e,n,ce.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ui(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return hi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ui(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ui(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ui(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ui(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function hi(e,t,n,r){return e=ui(7,e,r,t),e.lanes=n,e}function gi(e,t,n){return e=ui(6,e,null,t),e.lanes=n,e}function _i(e){var t=ui(18,null,null,0);return t.stateNode=e,t}function vi(e,t,n){return t=ui(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var yi=new WeakMap;function bi(e,t){if(typeof e==`object`&&e){var n=yi.get(e);return n===void 0?(t={value:e,source:t,stack:I(t)},yi.set(e,t),t):n}return{value:e,source:t,stack:I(t)}}var xi=[],Si=0,Ci=null,wi=0,Ti=[],Ei=0,Di=null,Oi=1,ki=``;function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ci,Ci=e,wi=t}function ji(e,t,n){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Di=e;var r=Oi;e=ki;var i=32-ze(r)-1;r&=~(1<<i),n+=1;var a=32-ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Oi=1<<32-ze(t)+i|n<<i|r,ki=a+e}else Oi=1<<a|n<<i|r,ki=e}function Mi(e){e.return!==null&&(Ai(e,1),ji(e,1,0))}function Ni(e){for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null;for(;e===Di;)Di=Ti[--Ei],Ti[Ei]=null,ki=Ti[--Ei],Ti[Ei]=null,Oi=Ti[--Ei],Ti[Ei]=null}function Pi(e,t){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Oi=t.id,ki=t.overflow,Di=e}var Fi=null,Ii=null,Li=!1,Ri=null,zi=!1,Bi=Error(i(519));function Vi(e){throw qi(bi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Bi}function Hi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ct]=e,t[lt]=r,n){case`dialog`:Ed(`cancel`,t),Ed(`close`,t);break;case`iframe`:case`object`:case`embed`:Ed(`load`,t);break;case`video`:case`audio`:for(n=0;n<Cd.length;n++)Ed(Cd[n],t);break;case`source`:Ed(`error`,t);break;case`img`:case`image`:case`link`:Ed(`error`,t),Ed(`load`,t);break;case`details`:Ed(`toggle`,t);break;case`input`:Ed(`invalid`,t),Ht(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Ed(`invalid`,t);break;case`textarea`:Ed(`invalid`,t),Kt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||zd(t.textContent,n)?(r.popover!=null&&(Ed(`beforetoggle`,t),Ed(`toggle`,t)),r.onScroll!=null&&Ed(`scroll`,t),r.onScrollEnd!=null&&Ed(`scrollend`,t),r.onClick!=null&&(t.onclick=tn),t=!0):t=!1,t||Vi(e,!0)}function Ui(e){for(Fi=e.return;Fi;)switch(Fi.tag){case 5:case 31:case 13:zi=!1;return;case 27:case 3:zi=!0;return;default:Fi=Fi.return}}function Wi(e){if(e!==Fi)return!1;if(!Li)return Ui(e),Li=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Zd(e.type,e.memoizedProps)),n=!n),n&&Ii&&Vi(e),Ui(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ii=vf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ii=vf(e)}else t===27?(t=Ii,of(e.type)?(e=_f,_f=null,Ii=e):Ii=t):Ii=Fi?gf(e.stateNode.nextSibling):null;return!0}function Gi(){Ii=Fi=null,Li=!1}function Ki(){var e=Ri;return e!==null&&(au===null?au=e:au.push.apply(au,e),Ri=null),e}function qi(e){Ri===null?Ri=[e]:Ri.push(e)}var Ji=ae(null),Yi=null,Xi=null;function Zi(e,t,n){se(Ji,t._currentValue),t._currentValue=n}function Qi(e){e._currentValue=Ji.current,oe(Ji)}function $i(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ea(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),$i(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),$i(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ta(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;wr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===de.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[op]:e.push(op))}a=a.return}e!==null&&ea(t,e,n,r),t.flags|=262144}function na(e){for(e=e.firstContext;e!==null;){if(!wr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ra(e){Yi=e,Xi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ia(e){return oa(Yi,e)}function aa(e,t){return Yi===null&&ra(e),oa(e,t)}function oa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Xi===null){if(e===null)throw Error(i(308));Xi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Xi=Xi.next=t;return n}var sa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ca=t.unstable_scheduleCallback,la=t.unstable_NormalPriority,ua={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function da(){return{controller:new sa,data:new Map,refCount:0}}function fa(e){e.refCount--,e.refCount===0&&ca(la,function(){e.controller.abort()})}var pa=null,ma=0,ha=0,ga=null;function _a(e,t){if(pa===null){var n=pa=[];ma=0,ha=_d(),ga={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ma++,t.then(va,va),t}function va(){if(--ma===0&&pa!==null){ga!==null&&(ga.status=`fulfilled`);var e=pa;pa=null,ha=0,ga=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ya(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ba=P.S;P.S=function(e,t){cu=De(),typeof t==`object`&&t&&typeof t.then==`function`&&_a(e,t),ba!==null&&ba(e,t)};var xa=ae(null);function Sa(){var e=xa.current;return e===null?Wl.pooledCache:e}function Ca(e,t){t===null?se(xa,xa.current):se(xa,t.pool)}function wa(){var e=Sa();return e===null?null:{parent:ua._currentValue,pool:e}}var Ta=Error(i(460)),Ea=Error(i(474)),Da=Error(i(542)),Oa={then:function(){}};function ka(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Aa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(tn,tn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Pa(e),e;default:if(typeof t.status==`string`)t.then(tn,tn);else{if(e=Wl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Pa(e),e}throw Ma=t,Ta}}function ja(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ma=e,Ta):e}}var Ma=null;function Na(){if(Ma===null)throw Error(i(459));var e=Ma;return Ma=null,e}function Pa(e){if(e===Ta||e===Da)throw Error(i(483))}var Fa=null,Ia=0;function La(e){var t=Ia;return Ia+=1,Fa===null&&(Fa=[]),Aa(Fa,e,t)}function Ra(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function za(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ba(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=fi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=gi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&ja(i)===t.type)?(t=a(t,n.props),Ra(t,n),t.return=e,t):(t=mi(n.type,n.key,n.props,null,e.mode,r),Ra(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=vi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=hi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=gi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=mi(t.type,t.key,t.props,null,e.mode,n),Ra(n,t),n.return=e,n;case v:return t=vi(t,e.mode,n),t.return=e,t;case O:return t=ja(t),f(e,t,n)}if(te(t)||M(t))return t=hi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,La(t),n);if(t.$$typeof===C)return f(e,aa(e,t),n);za(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=ja(n),p(e,t,n,r)}if(te(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,La(n),r);if(n.$$typeof===C)return p(e,t,aa(e,n),r);za(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=ja(r),m(e,t,n,r,i)}if(te(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,La(r),i);if(r.$$typeof===C)return m(e,t,n,aa(t,r),i);za(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Li&&Ai(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Li&&Ai(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Li&&Ai(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Li&&Ai(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Li&&Ai(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Li&&Ai(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ja(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ra(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=hi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=mi(o.type,o.key,o.props,null,e.mode,c),Ra(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=vi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ja(o),b(e,r,o,c)}if(te(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,La(o),c);if(o.$$typeof===C)return b(e,r,aa(e,o),c);za(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=gi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ia=0;var i=b(e,t,n,r);return Fa=null,i}catch(t){if(t===Ta||t===Da)throw t;var a=ui(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Va=Ba(!0),Ha=Ba(!1),Ua=!1;function Wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ga(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ul&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=si(e),oi(e,null,n),t}return ri(e,r,t,n),si(e)}function Ja(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}function Ya(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Xa=!1;function Za(){if(Xa){var e=ga;if(e!==null)throw e}}function Qa(e,t,n,r){Xa=!1;var i=e.updateQueue;Ua=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Gl&f)===f:(r&f)===f){f!==0&&f===ha&&(Xa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ua=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),$l|=o,e.lanes=o,e.memoizedState=d}}function $a(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)$a(n[e],t)}var to=ae(null),no=ae(0);function ro(e,t){e=Zl,se(no,e),se(to,t),Zl=e|t.baseLanes}function io(){se(no,Zl),se(to,to.current)}function ao(){Zl=no.current,oe(to),oe(no)}var oo=ae(null),so=null;function co(e){var t=e.alternate;se(mo,mo.current&1),se(oo,e),so===null&&(t===null||to.current!==null||t.memoizedState!==null)&&(so=e)}function lo(e){se(mo,mo.current),se(oo,e),so===null&&(so=e)}function uo(e){e.tag===22?(se(mo,mo.current),se(oo,e),so===null&&(so=e)):fo(e)}function fo(){se(mo,mo.current),se(oo,oo.current)}function po(e){oe(oo),so===e&&(so=null),oe(mo)}var mo=ae(0);function ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||pf(n)||mf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var go=0,L=null,_o=null,vo=null,yo=!1,bo=!1,xo=!1,So=0,Co=0,wo=null,To=0;function Eo(){throw Error(i(321))}function Do(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wr(e[n],t[n]))return!1;return!0}function Oo(e,t,n,r,i,a){return go=a,L=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?B:Us,xo=!1,a=n(r,i),xo=!1,bo&&(a=Ao(t,n,r,i)),ko(e),a}function ko(e){P.H=Hs;var t=_o!==null&&_o.next!==null;if(go=0,vo=_o=L=null,yo=!1,Co=0,wo=null,t)throw Error(i(300));e===null||ac||(e=e.dependencies,e!==null&&na(e)&&(ac=!0))}function Ao(e,t,n,r){L=e;var a=0;do{if(bo&&(wo=null),Co=0,bo=!1,25<=a)throw Error(i(301));if(a+=1,vo=_o=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Ws,o=t(n,r)}while(bo);return o}function jo(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Ro(t):t,e=e.useState()[0],(_o===null?null:_o.memoizedState)!==e&&(L.flags|=1024),t}function Mo(){var e=So!==0;return So=0,e}function No(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Po(e){if(yo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}yo=!1}go=0,vo=_o=L=null,bo=!1,Co=So=0,wo=null}function Fo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vo===null?L.memoizedState=vo=e:vo=vo.next=e,vo}function Io(){if(_o===null){var e=L.alternate;e=e===null?null:e.memoizedState}else e=_o.next;var t=vo===null?L.memoizedState:vo.next;if(t!==null)vo=t,_o=e;else{if(e===null)throw L.alternate===null?Error(i(467)):Error(i(310));_o=e,e={memoizedState:_o.memoizedState,baseState:_o.baseState,baseQueue:_o.baseQueue,queue:_o.queue,next:null},vo===null?L.memoizedState=vo=e:vo=vo.next=e}return vo}function Lo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ro(e){var t=Co;return Co+=1,wo===null&&(wo=[]),e=Aa(wo,e,t),t=L,(vo===null?t.memoizedState:vo.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?B:Us),e}function zo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ro(e);if(e.$$typeof===C)return ia(e)}throw Error(i(438,String(e)))}function Bo(e){var t=null,n=L.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=L.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Lo(),L.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function Vo(e,t){return typeof t==`function`?t(e):t}function Ho(e){return Uo(Io(),_o,e)}function Uo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(go&f)===f:(Gl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ha&&(d=!0);else if((go&p)===p){u=u.next,p===ha&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,L.lanes|=p,$l|=p;f=u.action,xo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,L.lanes|=f,$l|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!wr(o,e.memoizedState)&&(ac=!0,d&&(n=ga,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Wo(e){var t=Io(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);wr(o,t.memoizedState)||(ac=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Go(e,t,n){var r=L,a=Io(),o=Li;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!wr((_o||a).memoizedState,n);if(s&&(a.memoizedState=n,ac=!0),a=a.queue,gs(Jo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||vo!==null&&vo.memoizedState.tag&1){if(r.flags|=2048,ds(9,{destroy:void 0},qo.bind(null,r,a,n,t),null),Wl===null)throw Error(i(349));o||go&127||Ko(r,t,n)}return n}function Ko(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=L.updateQueue,t===null?(t=Lo(),L.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function qo(e,t,n,r){t.value=n,t.getSnapshot=r,Yo(t)&&Xo(e)}function Jo(e,t,n){return n(function(){Yo(t)&&Xo(e)})}function Yo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wr(e,n)}catch{return!0}}function Xo(e){var t=ai(e,2);t!==null&&Cu(t,e,2)}function Zo(e){var t=Fo();if(typeof e==`function`){var n=e;if(e=n(),xo){Re(!0);try{n()}finally{Re(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:e},t}function Qo(e,t,n,r){return e.baseState=n,Uo(e,_o,typeof r==`function`?r:Vo)}function $o(e,t,n,r,a){if(zs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,es(t,o)):(o.next=n.next,t.pending=n.next=o)}}function es(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),ts(e,t,s)}catch(n){rs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),ts(e,t,a)}catch(n){rs(e,t,n)}}function ts(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ns(e,t,n)},function(n){return rs(e,t,n)}):ns(e,t,n)}function ns(e,t,n){t.status=`fulfilled`,t.value=n,is(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,es(e,n)))}function rs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,is(t),t=t.next;while(t!==r)}e.action=null}function is(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function as(e,t){return t}function os(e,t){if(Li){var n=Wl.formState;if(n!==null){a:{var r=L;if(Li){if(Ii){b:{for(var i=Ii,a=zi;i.nodeType!==8;){if(!a){i=null;break b}if(i=gf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ii=gf(i.nextSibling),r=i.data===`F!`;break a}}Vi(r)}r=!1}r&&(t=n[0])}}return n=Fo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:t},n.queue=r,n=Is.bind(null,L,r),r.dispatch=n,r=Zo(!1),a=Rs.bind(null,L,!1,r.queue),r=Fo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=$o.bind(null,L,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ss(e){return cs(Io(),_o,e)}function cs(e,t,n){if(t=Uo(e,t,as)[0],e=Ho(Vo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ro(t)}catch(e){throw e===Ta?Da:e}else r=t;t=Io();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(L.flags|=2048,ds(9,{destroy:void 0},ls.bind(null,i,n),null)),[r,a,e]}function ls(e,t){e.action=t}function us(e){var t=Io(),n=_o;if(n!==null)return cs(t,n,e);Io(),t=t.memoizedState,n=Io();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ds(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=L.updateQueue,t===null&&(t=Lo(),L.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function fs(){return Io().memoizedState}function ps(e,t,n,r){var i=Fo();L.flags|=e,i.memoizedState=ds(1|t,{destroy:void 0},n,r===void 0?null:r)}function ms(e,t,n,r){var i=Io();r=r===void 0?null:r;var a=i.memoizedState.inst;_o!==null&&r!==null&&Do(r,_o.memoizedState.deps)?i.memoizedState=ds(t,a,n,r):(L.flags|=e,i.memoizedState=ds(1|t,a,n,r))}function hs(e,t){ps(8390656,8,e,t)}function gs(e,t){ms(2048,8,e,t)}function _s(e){L.flags|=4;var t=L.updateQueue;if(t===null)t=Lo(),L.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function R(e){var t=Io().memoizedState;return _s({ref:t,nextImpl:e}),function(){if(Ul&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function vs(e,t){return ms(4,2,e,t)}function ys(e,t){return ms(4,4,e,t)}function bs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xs(e,t,n){n=n==null?null:n.concat([e]),ms(4,4,bs.bind(null,t,e),n)}function Ss(){}function Cs(e,t){var n=Io();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Do(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ws(e,t){var n=Io();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Do(t,r[1]))return r[0];if(r=e(),xo){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r}function z(e,t,n){return n===void 0||go&1073741824&&!(Gl&261930)?e.memoizedState=t:(e.memoizedState=n,e=Su(),L.lanes|=e,$l|=e,n)}function Ts(e,t,n,r){return wr(n,t)?n:to.current===null?!(go&42)||go&1073741824&&!(Gl&261930)?(ac=!0,e.memoizedState=n):(e=Su(),L.lanes|=e,$l|=e,t):(e=z(e,n,r),wr(e,t)||(ac=!0),e)}function Es(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Rs(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ls(e,t,ya(c,r),xu(e)):Ls(e,t,r,xu(e))}catch(n){Ls(e,t,{then:function(){},status:`rejected`,reason:n},xu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function Ds(){}function Os(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ks(e).queue;Es(e,a,t,ne,n===null?Ds:function(){return As(e),n(r)})}function ks(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function As(e){var t=ks(e);t.next===null&&(t=e.alternate.memoizedState),Ls(e,t.next.queue,{},xu())}function js(){return ia(op)}function Ms(){return Io().memoizedState}function Ns(){return Io().memoizedState}function Ps(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=xu();e=Ka(n);var r=qa(t,e,n);r!==null&&(Cu(r,t,n),Ja(r,t,n)),t={cache:da()},e.payload=t;return}t=t.return}}function Fs(e,t,n){var r=xu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zs(e)?Bs(t,n):(n=ii(e,t,n,r),n!==null&&(Cu(n,e,r),Vs(n,t,r)))}function Is(e,t,n){Ls(e,t,n,xu())}function Ls(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(zs(e))Bs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,wr(s,o))return ri(e,t,i,0),Wl===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return Cu(n,e,r),Vs(n,t,r),!0}return!1}function Rs(e,t,n,r){if(r={lane:2,revertLane:_d(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zs(e)){if(t)throw Error(i(479))}else t=ii(e,n,r,2),t!==null&&Cu(t,e,2)}function zs(e){var t=e.alternate;return e===L||t!==null&&t===L}function Bs(e,t){bo=yo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}var Hs={readContext:ia,use:zo,useCallback:Eo,useContext:Eo,useEffect:Eo,useImperativeHandle:Eo,useLayoutEffect:Eo,useInsertionEffect:Eo,useMemo:Eo,useReducer:Eo,useRef:Eo,useState:Eo,useDebugValue:Eo,useDeferredValue:Eo,useTransition:Eo,useSyncExternalStore:Eo,useId:Eo,useHostTransitionStatus:Eo,useFormState:Eo,useActionState:Eo,useOptimistic:Eo,useMemoCache:Eo,useCacheRefresh:Eo};Hs.useEffectEvent=Eo;var B={readContext:ia,use:zo,useCallback:function(e,t){return Fo().memoizedState=[e,t===void 0?null:t],e},useContext:ia,useEffect:hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ps(4194308,4,bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){ps(4,2,e,t)},useMemo:function(e,t){var n=Fo();t=t===void 0?null:t;var r=e();if(xo){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Fo();if(n!==void 0){var i=n(t);if(xo){Re(!0);try{n(t)}finally{Re(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Fs.bind(null,L,e),[r.memoizedState,e]},useRef:function(e){var t=Fo();return e={current:e},t.memoizedState=e},useState:function(e){e=Zo(e);var t=e.queue,n=Is.bind(null,L,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ss,useDeferredValue:function(e,t){return z(Fo(),e,t)},useTransition:function(){var e=Zo(!1);return e=Es.bind(null,L,e.queue,!0,!1),Fo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=L,a=Fo();if(Li){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Wl===null)throw Error(i(349));Gl&127||Ko(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,hs(Jo.bind(null,r,o,e),[e]),r.flags|=2048,ds(9,{destroy:void 0},qo.bind(null,r,o,n,t),null),n},useId:function(){var e=Fo(),t=Wl.identifierPrefix;if(Li){var n=ki,r=Oi;n=(r&~(1<<32-ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=So++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=To++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:js,useFormState:os,useActionState:os,useOptimistic:function(e){var t=Fo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Rs.bind(null,L,!0,n),n.dispatch=t,[e,t]},useMemoCache:Bo,useCacheRefresh:function(){return Fo().memoizedState=Ps.bind(null,L)},useEffectEvent:function(e){var t=Fo(),n={impl:e};return t.memoizedState=n,function(){if(Ul&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Us={readContext:ia,use:zo,useCallback:Cs,useContext:ia,useEffect:gs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Ho,useRef:fs,useState:function(){return Ho(Vo)},useDebugValue:Ss,useDeferredValue:function(e,t){return Ts(Io(),_o.memoizedState,e,t)},useTransition:function(){var e=Ho(Vo)[0],t=Io().memoizedState;return[typeof e==`boolean`?e:Ro(e),t]},useSyncExternalStore:Go,useId:Ms,useHostTransitionStatus:js,useFormState:ss,useActionState:ss,useOptimistic:function(e,t){return Qo(Io(),_o,e,t)},useMemoCache:Bo,useCacheRefresh:Ns};Us.useEffectEvent=R;var Ws={readContext:ia,use:zo,useCallback:Cs,useContext:ia,useEffect:gs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Wo,useRef:fs,useState:function(){return Wo(Vo)},useDebugValue:Ss,useDeferredValue:function(e,t){var n=Io();return _o===null?z(n,e,t):Ts(n,_o.memoizedState,e,t)},useTransition:function(){var e=Wo(Vo)[0],t=Io().memoizedState;return[typeof e==`boolean`?e:Ro(e),t]},useSyncExternalStore:Go,useId:Ms,useHostTransitionStatus:js,useFormState:us,useActionState:us,useOptimistic:function(e,t){var n=Io();return _o===null?(n.baseState=e,[e,n.queue.dispatch]):Qo(n,_o,e,t)},useMemoCache:Bo,useCacheRefresh:Ns};Ws.useEffectEvent=R;function Gs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ks={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xu(),i=Ka(r);i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(Cu(t,e,r),Ja(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xu(),i=Ka(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(Cu(t,e,r),Ja(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xu(),r=Ka(n);r.tag=2,t!=null&&(r.callback=t),t=qa(e,r,n),t!==null&&(Cu(t,e,n),Ja(t,e,n))}};function qs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Tr(n,r)||!Tr(i,a):!0}function Js(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ks.enqueueReplaceState(t,t.state,null)}function Ys(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Xs(e){Qr(e)}function Zs(e){console.error(e)}function Qs(e){Qr(e)}function $s(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function ec(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){return n=Ka(n),n.tag=3,n.payload={element:null},n.callback=function(){$s(e,t)},n}function nc(e){return e=Ka(e),e.tag=3,e}function rc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){ec(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){ec(t,n,r),typeof i!=`function`&&(du===null?du=new Set([this]):du.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function V(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ta(t,n,a,!0),n=oo.current,n!==null){switch(n.tag){case 31:case 13:return so===null?Fu():n.alternate===null&&Ql===0&&(Ql=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Oa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Zu(e,r,a)),!1;case 22:return n.flags|=65536,r===Oa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Zu(e,r,a)),!1}throw Error(i(435,n.tag))}return Zu(e,r,a),Fu(),!1}if(Li)return t=oo.current,t===null?(r!==Bi&&(t=Error(i(423),{cause:r}),qi(bi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=bi(r,n),a=tc(e.stateNode,r,a),Ya(e,a),Ql!==4&&(Ql=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Bi&&(e=Error(i(422),{cause:r}),qi(bi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=bi(o,n),iu===null?iu=[o]:iu.push(o),Ql!==4&&(Ql=2),t===null)return!0;r=bi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=tc(n.stateNode,r,e),Ya(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(du===null||!du.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=nc(a),rc(a,e,n,r),Ya(n,a),!1}n=n.return}while(n!==null);return!1}var ic=Error(i(461)),ac=!1;function oc(e,t,n,r){t.child=e===null?Ha(t,null,n,r):Va(t,e.child,n,r)}function sc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ra(t),r=Oo(e,t,n,o,a,i),s=Mo(),e!==null&&!ac?(No(e,t,i),jc(e,t,i)):(Li&&s&&Mi(t),t.flags|=1,oc(e,t,r,i),t.child)}function cc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!di(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,lc(e,t,a,r,i)):(e=mi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Mc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Tr:n,n(o,r)&&e.ref===t.ref)return jc(e,t,i)}return t.flags|=1,e=fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Tr(a,r)&&e.ref===t.ref)if(ac=!1,t.pendingProps=r=a,Mc(e,i))e.flags&131072&&(ac=!0);else return t.lanes=e.lanes,jc(e,t,i)}return _c(e,t,n,r,i)}function uc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return fc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ca(t,a===null?null:a.cachePool),a===null?io():ro(t,a),uo(t);else return r=t.lanes=536870912,fc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ca(t,null),io(),fo(t)):(Ca(t,a.cachePool),ro(t,a),fo(t),t.memoizedState=null);return oc(e,t,i,n),t.child}function dc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fc(e,t,n,r,i){var a=Sa();return a=a===null?null:{parent:ua._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ca(t,null),io(),uo(t),e!==null&&ta(e,t,r,!0),t.childLanes=i,null}function pc(e,t){return t=Ec({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function mc(e,t,n){return Va(t,e.child,null,n),e=pc(t,t.pendingProps),e.flags|=2,po(t),t.memoizedState=null,e}function hc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Li){if(r.mode===`hidden`)return e=pc(t,r),t.lanes=536870912,dc(null,e);if(lo(t),(e=Ii)?(e=ff(e,zi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,Ii=null)):e=null,e===null)throw Vi(t);return t.lanes=536870912,null}return pc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(lo(t),a)if(t.flags&256)t.flags&=-257,t=mc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ac||ta(e,t,n,!1),a=(n&e.childLanes)!==0,ac||a){if(r=Wl,r!==null&&(s=nt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ai(e,s),Cu(r,e,s),ic;Fu(),t=mc(e,t,n)}else e=o.treeContext,Ii=gf(s.nextSibling),Fi=t,Li=!0,Ri=null,zi=!1,e!==null&&Pi(t,e),t=pc(t,r),t.flags|=4096;return t}return e=fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function gc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function _c(e,t,n,r,i){return ra(t),n=Oo(e,t,n,r,void 0,i),r=Mo(),e!==null&&!ac?(No(e,t,i),jc(e,t,i)):(Li&&r&&Mi(t),t.flags|=1,oc(e,t,n,i),t.child)}function vc(e,t,n,r,i,a){return ra(t),t.updateQueue=null,n=Ao(t,r,n,i),ko(e),r=Mo(),e!==null&&!ac?(No(e,t,a),jc(e,t,a)):(Li&&r&&Mi(t),t.flags|=1,oc(e,t,n,a),t.child)}function yc(e,t,n,r,i){if(ra(t),t.stateNode===null){var a=ci,o=n.contextType;typeof o==`object`&&o&&(a=ia(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ks,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Wa(t),o=n.contextType,a.context=typeof o==`object`&&o?ia(o):ci,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Gs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ks.enqueueReplaceState(a,a.state,null),Qa(t,r,a,i),Za(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ys(n,s);a.props=c;var l=a.context,u=n.contextType;o=ci,typeof u==`object`&&u&&(o=ia(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Js(t,a,r,o),Ua=!1;var f=t.memoizedState;a.state=f,Qa(t,r,a,i),Za(),l=t.memoizedState,s||f!==l||Ua?(typeof d==`function`&&(Gs(t,n,d,r),l=t.memoizedState),(c=Ua||qs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ga(e,t),o=t.memoizedProps,u=Ys(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ci,typeof l==`object`&&l&&(c=ia(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Js(t,a,r,c),Ua=!1,f=t.memoizedState,a.state=f,Qa(t,r,a,i),Za();var p=t.memoizedState;o!==d||f!==p||Ua||e!==null&&e.dependencies!==null&&na(e.dependencies)?(typeof s==`function`&&(Gs(t,n,s,r),p=t.memoizedState),(u=Ua||qs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&na(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,gc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Va(t,e.child,null,i),t.child=Va(t,null,n,i)):oc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=jc(e,t,i),e}function bc(e,t,n,r){return Gi(),t.flags|=256,oc(e,t,n,r),t.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(e){return{baseLanes:e,cachePool:wa()}}function Cc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=nu),e}function wc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(mo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Li){if(a?co(t):fo(t),(e=Ii)?(e=ff(e,zi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,Ii=null)):e=null,e===null)throw Vi(t);return mf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(fo(t),a=t.mode,c=Ec({mode:`hidden`,children:c},a),r=hi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(null,r)):(co(t),Tc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(co(t),t.flags&=-257,t=Dc(e,t,n)):t.memoizedState===null?(fo(t),c=r.fallback,a=t.mode,r=Ec({mode:`visible`,children:r.children},a),c=hi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Va(t,e.child,null,n),r=t.child,r.memoizedState=Sc(n),r.childLanes=Cc(e,s,n),t.memoizedState=xc,t=dc(null,r)):(fo(t),t.child=e.child,t.flags|=128,t=null);else if(co(t),mf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,qi({value:r,source:null,stack:null}),t=Dc(e,t,n)}else if(ac||ta(e,t,n,!1),s=(n&e.childLanes)!==0,ac||s){if(s=Wl,s!==null&&(r=nt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ai(e,r),Cu(s,e,r),ic;pf(c)||Fu(),t=Dc(e,t,n)}else pf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ii=gf(c.nextSibling),Fi=t,Li=!0,Ri=null,zi=!1,e!==null&&Pi(t,e),t=Tc(t,r.children),t.flags|=4096);return t}return a?(fo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=fi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=hi(c,a,n,null),c.flags|=2):c=fi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,dc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Sc(n):(a=c.cachePool,a===null?a=wa():(l=ua._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Cc(e,s,n),t.memoizedState=xc,dc(e.child,r)):(co(t),n=e.child,e=n.sibling,n=fi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Tc(e,t){return t=Ec({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Ec(e,t){return e=ui(22,e,null,t),e.lanes=0,e}function Dc(e,t,n){return Va(t,e.child,null,n),e=Tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Oc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$i(e.return,t,n)}function kc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ac(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=mo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,se(mo,o),oc(e,t,r,n),r=Li?wi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Oc(e,n,t);else if(e.tag===19)Oc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ho(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),kc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ho(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}kc(t,!0,n,null,a,r);break;case`together`:kc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function jc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$l|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ta(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Mc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&na(e))):!0}function Nc(e,t,n){switch(t.tag){case 3:fe(t,t.stateNode.containerInfo),Zi(t,ua,e.memoizedState.cache),Gi();break;case 27:case 5:me(t);break;case 4:fe(t,t.stateNode.containerInfo);break;case 10:Zi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,lo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(co(t),e=jc(e,t,n),e===null?null:e.sibling):wc(e,t,n):(co(t),t.flags|=128,null);co(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ta(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ac(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),se(mo,mo.current),r)break;return null;case 22:return t.lanes=0,uc(e,t,n,t.pendingProps);case 24:Zi(t,ua,e.memoizedState.cache)}return jc(e,t,n)}function Pc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ac=!0;else{if(!Mc(e,n)&&!(t.flags&128))return ac=!1,Nc(e,t,n);ac=!!(e.flags&131072)}else ac=!1,Li&&t.flags&1048576&&ji(t,wi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ja(t.elementType),t.type=e,typeof e==`function`)di(e)?(r=Ys(e,r),t.tag=1,t=yc(null,t,e,r,n)):(t.tag=0,t=_c(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=sc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=cc(null,t,e,r,n);break a}}throw t=ee(e)||e,Error(i(306,t,``))}}return t;case 0:return _c(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ys(r,t.pendingProps),yc(e,t,r,a,n);case 3:a:{if(fe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ga(e,t),Qa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Zi(t,ua,r),r!==o.cache&&ea(t,[ua],n,!0),Za(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=bc(e,t,r,n);break a}else if(r!==a){a=bi(Error(i(424)),t),qi(a),t=bc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ii=gf(e.firstChild),Fi=t,Li=!0,Ri=null,zi=!0,n=Ha(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Gi(),r===a){t=jc(e,t,n);break a}oc(e,t,r,n)}t=t.child}return t;case 26:return gc(e,t),e===null?(n=Lf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Li||(n=t.type,e=t.pendingProps,r=Jd(ue.current).createElement(n),r[ct]=t,r[lt]=e,Hd(r,n,e),xt(r),t.stateNode=r):t.memoizedState=Lf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return me(t),e===null&&Li&&(r=t.stateNode=bf(t.type,t.pendingProps,ue.current),Fi=t,zi=!0,a=Ii,of(t.type)?(_f=a,Ii=gf(r.firstChild)):Ii=a),oc(e,t,t.pendingProps.children,n),gc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Li&&((a=r=Ii)&&(r=uf(r,t.type,t.pendingProps,zi),r===null?a=!1:(t.stateNode=r,Fi=t,Ii=gf(r.firstChild),zi=!1,a=!0)),a||Vi(t)),me(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Zd(a,o)?r=null:s!==null&&Zd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Oo(e,t,jo,null,null,n),op._currentValue=a),gc(e,t),oc(e,t,r,n),t.child;case 6:return e===null&&Li&&((e=n=Ii)&&(n=df(n,t.pendingProps,zi),n===null?e=!1:(t.stateNode=n,Fi=t,Ii=null,e=!0)),e||Vi(t)),null;case 13:return wc(e,t,n);case 4:return fe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Va(t,null,r,n):oc(e,t,r,n),t.child;case 11:return sc(e,t,t.type,t.pendingProps,n);case 7:return oc(e,t,t.pendingProps,n),t.child;case 8:return oc(e,t,t.pendingProps.children,n),t.child;case 12:return oc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Zi(t,t.type,r.value),oc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ra(t),a=ia(a),r=r(a),t.flags|=1,oc(e,t,r,n),t.child;case 14:return cc(e,t,t.type,t.pendingProps,n);case 15:return lc(e,t,t.type,t.pendingProps,n);case 19:return Ac(e,t,n);case 31:return hc(e,t,n);case 22:return uc(e,t,n,t.pendingProps);case 24:return ra(t),r=ia(ua),e===null?(a=Sa(),a===null&&(a=Wl,o=da(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Wa(t),Zi(t,ua,a)):((e.lanes&n)!==0&&(Ga(e,t),Qa(t,null,null,n),Za()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Zi(t,ua,r),r!==a.cache&&ea(t,[ua],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Zi(t,ua,r))),oc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Fc(e){e.flags|=4}function Ic(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Mu())e.flags|=8192;else throw Ma=Oa,Ea}else e.flags&=-16777217}function Lc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Qf(t))if(Mu())e.flags|=8192;else throw Ma=Oa,Ea}function Rc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Xe(),e.lanes|=t,ru|=t)}function zc(e,t){if(!Li)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Bc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Vc(e,t,n){var r=t.pendingProps;switch(Ni(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bc(t),null;case 1:return Bc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Qi(ua),pe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Wi(t)?Fc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ki())),Bc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Fc(t),o===null?(Bc(t),Ic(t,a,null,r,n)):(Bc(t),Lc(t,o))):o?o===e.memoizedState?(Bc(t),t.flags&=-16777217):(Fc(t),Bc(t),Lc(t,o)):(e=e.memoizedProps,e!==r&&Fc(t),Bc(t),Ic(t,a,e,r,n)),null;case 27:if(he(t),n=ue.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Bc(t),null}e=ce.current,Wi(t)?Hi(t,e):(e=bf(a,r,n),t.stateNode=e,Fc(t))}return Bc(t),null;case 5:if(he(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Bc(t),null}if(o=ce.current,Wi(t))Hi(t,o);else{var s=Jd(ue.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ct]=t,o[lt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Hd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Fc(t)}}return Bc(t),Ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Fc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ue.current,Wi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Fi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||zd(e.nodeValue,n)),e||Vi(t,!0)}else e=Jd(e).createTextNode(r),e[ct]=t,t.stateNode=e}return Bc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Wi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ct]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bc(t),e=!1}else n=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(po(t),t):(po(t),null);if(t.flags&128)throw Error(i(558))}return Bc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Wi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ct]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bc(t),a=!1}else a=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(po(t),t):(po(t),null)}return po(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Rc(t,t.updateQueue),Bc(t),null);case 4:return pe(),e===null&&kd(t.stateNode.containerInfo),Bc(t),null;case 10:return Qi(t.type),Bc(t),null;case 19:if(oe(mo),r=t.memoizedState,r===null)return Bc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)zc(r,!1);else{if(Ql!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ho(e),o!==null){for(t.flags|=128,zc(r,!1),e=o.updateQueue,t.updateQueue=e,Rc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)pi(n,e),n=n.sibling;return se(mo,mo.current&1|2),Li&&Ai(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&De()>lu&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304)}else{if(!a)if(e=ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Rc(t,e),zc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Li)return Bc(t),null}else 2*De()-r.renderingStartTime>lu&&n!==536870912&&(t.flags|=128,a=!0,zc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Bc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=De(),e.sibling=null,n=mo.current,se(mo,a?n&1|2:n&1),Li&&Ai(t,r.treeForkCount),e);case 22:case 23:return po(t),ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Bc(t),t.subtreeFlags&6&&(t.flags|=8192)):Bc(t),n=t.updateQueue,n!==null&&Rc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&oe(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qi(ua),Bc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Hc(e,t){switch(Ni(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qi(ua),pe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return he(t),null;case 31:if(t.memoizedState!==null){if(po(t),t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return oe(mo),null;case 4:return pe(),null;case 10:return Qi(t.type),null;case 22:case 23:return po(t),ao(),e!==null&&oe(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qi(ua),null;case 25:return null;default:return null}}function Uc(e,t){switch(Ni(t),t.tag){case 3:Qi(ua),pe();break;case 26:case 27:case 5:he(t);break;case 4:pe();break;case 31:t.memoizedState!==null&&po(t);break;case 13:po(t);break;case 19:oe(mo);break;case 10:Qi(t.type);break;case 22:case 23:po(t),ao(),e!==null&&oe(xa);break;case 24:Qi(ua)}}function Wc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Xu(t,t.return,e)}}function Gc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Xu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Xu(t,t.return,e)}}function Kc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{eo(t,n)}catch(t){Xu(e,e.return,t)}}}function qc(e,t,n){n.props=Ys(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Xu(e,t,n)}}function Jc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Xu(e,t,n)}}function Yc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Xu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Xu(e,t,n)}else n.current=null}function Xc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Xu(e,e.return,t)}}function Zc(e,t,n){try{var r=e.stateNode;Ud(r,e.type,n,t),r[lt]=t}catch(t){Xu(e,e.return,t)}}function Qc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&of(e.type)||e.tag===4}function $c(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Qc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&of(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function el(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=tn));else if(r!==4&&(r===27&&of(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&of(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(tl(e,t,n),e=e.sibling;e!==null;)tl(e,t,n),e=e.sibling}function nl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Hd(t,r,n),t[ct]=e,t[lt]=n}catch(t){Xu(e,e.return,t)}}var rl=!1,il=!1,al=!1,ol=typeof WeakSet==`function`?WeakSet:Set,sl=null;function cl(e,t){if(e=e.containerInfo,Kd=hp,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(qd={focusedElem:e,selectionRange:n},hp=!1,sl=t;sl!==null;)if(t=sl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,sl=e;else for(;sl!==null;){switch(t=sl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ys(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Xu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)lf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:lf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,sl=e;break}sl=t.return}}function ll(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:wl(e,n),r&4&&Wc(5,n);break;case 1:if(wl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Xu(n,n.return,e)}else{var i=Ys(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Xu(n,n.return,e)}}r&64&&Kc(n),r&512&&Jc(n,n.return);break;case 3:if(wl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{eo(e,t)}catch(e){Xu(n,n.return,e)}}break;case 27:t===null&&r&4&&nl(n);case 26:case 5:wl(e,n),t===null&&r&4&&Xc(n),r&512&&Jc(n,n.return);break;case 12:wl(e,n);break;case 31:wl(e,n),r&4&&hl(e,n);break;case 13:wl(e,n),r&4&&gl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=ed.bind(null,n),hf(e,n))));break;case 22:if(r=n.memoizedState!==null||rl,!r){t=t!==null&&t.memoizedState!==null||il,i=rl;var a=il;rl=r,(il=t)&&!a?El(e,n,(n.subtreeFlags&8772)!=0):wl(e,n),rl=i,il=a}break;case 30:break;default:wl(e,n)}}function ul(e){var t=e.alternate;t!==null&&(e.alternate=null,ul(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&>(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var dl=null,fl=!1;function pl(e,t,n){for(n=n.child;n!==null;)ml(e,t,n),n=n.sibling}function ml(e,t,n){if(Le&&typeof Le.onCommitFiberUnmount==`function`)try{Le.onCommitFiberUnmount(Ie,n)}catch{}switch(n.tag){case 26:il||Yc(n,t),pl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:il||Yc(n,t);var r=dl,i=fl;of(n.type)&&(dl=n.stateNode,fl=!1),pl(e,t,n),xf(n.stateNode),dl=r,fl=i;break;case 5:il||Yc(n,t);case 6:if(r=dl,i=fl,dl=null,pl(e,t,n),dl=r,fl=i,dl!==null)if(fl)try{(dl.nodeType===9?dl.body:dl.nodeName===`HTML`?dl.ownerDocument.body:dl).removeChild(n.stateNode)}catch(e){Xu(n,t,e)}else try{dl.removeChild(n.stateNode)}catch(e){Xu(n,t,e)}break;case 18:dl!==null&&(fl?(e=dl,sf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Vp(e)):sf(dl,n.stateNode));break;case 4:r=dl,i=fl,dl=n.stateNode.containerInfo,fl=!0,pl(e,t,n),dl=r,fl=i;break;case 0:case 11:case 14:case 15:Gc(2,n,t),il||Gc(4,n,t),pl(e,t,n);break;case 1:il||(Yc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&qc(n,t,r)),pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:il=(r=il)||n.memoizedState!==null,pl(e,t,n),il=r;break;default:pl(e,t,n)}}function hl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Vp(e)}catch(e){Xu(t,t.return,e)}}}function gl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Vp(e)}catch(e){Xu(t,t.return,e)}}function _l(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ol),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ol),t;default:throw Error(i(435,e.tag))}}function vl(e,t){var n=_l(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=td.bind(null,e,t);t.then(r,r)}})}function yl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(of(c.type)){dl=c.stateNode,fl=!1;break a}break;case 5:dl=c.stateNode,fl=!1;break a;case 3:case 4:dl=c.stateNode.containerInfo,fl=!0;break a}c=c.return}if(dl===null)throw Error(i(160));ml(o,s,a),dl=null,fl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)xl(t,e),t=t.sibling}var bl=null;function xl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:yl(t,e),Sl(e),r&4&&(Gc(3,e,e.return),Wc(3,e),Gc(5,e,e.return));break;case 1:yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),r&64&&rl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=bl;if(yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ht]||o[ct]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Hd(o,r,n),o[ct]=e,xt(o),r=o;break a;case`link`:var s=Yf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Hd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Yf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Hd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ct]=e,xt(o),r=o}e.stateNode=r}else Xf(a,e.type,e.stateNode);else e.stateNode=Wf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Zc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Xf(a,e.type,e.stateNode):Wf(a,r,e.memoizedProps))}break;case 27:yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),n!==null&&r&4&&Zc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(yl(t,e),Sl(e),r&512&&(il||n===null||Yc(n,n.return)),e.flags&32){a=e.stateNode;try{qt(a,``)}catch(t){Xu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Zc(e,a,n===null?a:n.memoizedProps)),r&1024&&(al=!0);break;case 6:if(yl(t,e),Sl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Xu(e,e.return,t)}}break;case 3:if(Jf=null,a=bl,bl=wf(t.containerInfo),yl(t,e),bl=a,Sl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Vp(t.containerInfo)}catch(t){Xu(e,e.return,t)}al&&(al=!1,Cl(e));break;case 4:r=bl,bl=wf(e.stateNode.containerInfo),yl(t,e),Sl(e),bl=r;break;case 12:yl(t,e),Sl(e);break;case 31:yl(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 13:yl(t,e),Sl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(su=De()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=rl,d=il;if(rl=u||a,il=d||l,yl(t,e),il=d,rl=u,Sl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||rl||il||Tl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Xu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Xu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?cf(m,!0):cf(l.stateNode,!1)}catch(e){Xu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,vl(e,n))));break;case 19:yl(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 30:break;case 21:break;default:yl(t,e),Sl(e)}}function Sl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Qc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;tl(e,$c(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(qt(o,``),n.flags&=-33),tl(e,$c(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;el(e,$c(e),s);break;default:throw Error(i(161))}}catch(t){Xu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Cl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Cl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ll(e,t.alternate,t),t=t.sibling}function Tl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Gc(4,t,t.return),Tl(t);break;case 1:Yc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&qc(t,t.return,n),Tl(t);break;case 27:xf(t.stateNode);case 26:case 5:Yc(t,t.return),Tl(t);break;case 22:t.memoizedState===null&&Tl(t);break;case 30:Tl(t);break;default:Tl(t)}e=e.sibling}}function El(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:El(i,a,n),Wc(4,a);break;case 1:if(El(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Xu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)$a(c[i],s)}catch(e){Xu(r,r.return,e)}}n&&o&64&&Kc(a),Jc(a,a.return);break;case 27:nl(a);case 26:case 5:El(i,a,n),n&&r===null&&o&4&&Xc(a),Jc(a,a.return);break;case 12:El(i,a,n);break;case 31:El(i,a,n),n&&o&4&&hl(i,a);break;case 13:El(i,a,n),n&&o&4&&gl(i,a);break;case 22:a.memoizedState===null&&El(i,a,n),Jc(a,a.return);break;case 30:break;default:El(i,a,n)}t=t.sibling}}function Dl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&fa(n))}function Ol(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e))}function kl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Al(e,t,n,r),t=t.sibling}function Al(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:kl(e,t,n,r),i&2048&&Wc(9,t);break;case 1:kl(e,t,n,r);break;case 3:kl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e)));break;case 12:if(i&2048){kl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Xu(t,t.return,e)}}else kl(e,t,n,r);break;case 31:kl(e,t,n,r);break;case 13:kl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?kl(e,t,n,r):(a._visibility|=2,jl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?kl(e,t,n,r):Ml(e,t),i&2048&&Dl(o,t);break;case 24:kl(e,t,n,r),i&2048&&Ol(t.alternate,t);break;default:kl(e,t,n,r)}}function jl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:jl(a,o,s,c,i),Wc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,jl(a,o,s,c,i)):u._visibility&2?jl(a,o,s,c,i):Ml(a,o),i&&l&2048&&Dl(o.alternate,o);break;case 24:jl(a,o,s,c,i),i&&l&2048&&Ol(o.alternate,o);break;default:jl(a,o,s,c,i)}t=t.sibling}}function Ml(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ml(n,r),i&2048&&Dl(r.alternate,r);break;case 24:Ml(n,r),i&2048&&Ol(r.alternate,r);break;default:Ml(n,r)}t=t.sibling}}var Nl=8192;function Pl(e,t,n){if(e.subtreeFlags&Nl)for(e=e.child;e!==null;)Fl(e,t,n),e=e.sibling}function Fl(e,t,n){switch(e.tag){case 26:Pl(e,t,n),e.flags&Nl&&e.memoizedState!==null&&$f(n,bl,e.memoizedState,e.memoizedProps);break;case 5:Pl(e,t,n);break;case 3:case 4:var r=bl;bl=wf(e.stateNode.containerInfo),Pl(e,t,n),bl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Nl,Nl=16777216,Pl(e,t,n),Nl=r):Pl(e,t,n));break;default:Pl(e,t,n)}}function Il(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sl=r,Bl(r,e)}Il(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rl(e),e=e.sibling}function Rl(e){switch(e.tag){case 0:case 11:case 15:Ll(e),e.flags&2048&&Gc(9,e,e.return);break;case 3:Ll(e);break;case 12:Ll(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zl(e)):Ll(e);break;default:Ll(e)}}function zl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sl=r,Bl(r,e)}Il(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Gc(8,t,t.return),zl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zl(t));break;default:zl(t)}e=e.sibling}}function Bl(e,t){for(;sl!==null;){var n=sl;switch(n.tag){case 0:case 11:case 15:Gc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,sl=r;else a:for(n=e;sl!==null;){r=sl;var i=r.sibling,a=r.return;if(ul(r),r===n){sl=null;break a}if(i!==null){i.return=a,sl=i;break a}sl=a}}}var Vl={getCacheForType:function(e){var t=ia(ua),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ia(ua).controller.signal}},Hl=typeof WeakMap==`function`?WeakMap:Map,Ul=0,Wl=null,H=null,Gl=0,Kl=0,ql=null,Jl=!1,Yl=!1,Xl=!1,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=0,iu=null,au=null,ou=!1,su=0,cu=0,lu=1/0,uu=null,du=null,fu=0,pu=null,mu=null,hu=0,gu=0,_u=null,vu=null,yu=0,bu=null;function xu(){return Ul&2&&Gl!==0?Gl&-Gl:P.T===null?at():_d()}function Su(){if(nu===0)if(!(Gl&536870912)||Li){var e=We;We<<=1,!(We&3932160)&&(We=262144),nu=e}else nu=536870912;return e=oo.current,e!==null&&(e.flags|=32),nu}function Cu(e,t,n){(e===Wl&&(Kl===2||Kl===9)||e.cancelPendingCommit!==null)&&(Au(e,0),Du(e,Gl,nu,!1)),Qe(e,n),(!(Ul&2)||e!==Wl)&&(e===Wl&&(!(Ul&2)&&(eu|=n),Ql===4&&Du(e,Gl,nu,!1)),ld(e))}function wu(e,t,n){if(Ul&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Je(e,t),a=r?Ru(e,t):Iu(e,t,!0),o=r;do{if(a===0){Yl&&!r&&Du(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Eu(n)){a=Iu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=iu;var l=c.current.memoizedState.isDehydrated;if(l&&(Au(c,s).flags|=256),s=Iu(c,s,!1),s!==2){if(Xl&&!l){c.errorRecoveryDisabledLanes|=o,eu|=o,a=4;break a}o=au,au=a,o!==null&&(au===null?au=o:au.push.apply(au,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Au(e,0),Du(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Du(r,t,nu,!Jl);break a;case 2:au=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=su+300-De(),10<a)){if(Du(r,t,nu,!Jl),qe(r,0,!0)!==0)break a;hu=t,r.timeoutHandle=ef(Tu.bind(null,r,n,au,uu,ou,t,nu,eu,ru,Jl,o,`Throttled`,-0,0),a);break a}Tu(r,n,au,uu,ou,t,nu,eu,ru,Jl,o,null,-0,0)}}break}while(1);ld(e)}function Tu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tn},Fl(t,a,d);var m=(a&62914560)===a?su-De():(a&4194048)===a?cu-De():0;if(m=tp(d,m),m!==null){hu=a,e.cancelPendingCommit=m(U.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Du(e,a,o,!l);return}}U(e,t,a,n,r,i,o,s,c)}function Eu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!wr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Du(e,t,n,r){t&=~tu,t&=~eu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&et(e,n,t)}function Ou(){return Ul&6?!0:(ud(0,!1),!1)}function ku(){if(H!==null){if(Kl===0)var e=H.return;else e=H,Xi=Yi=null,Po(e),Fa=null,Ia=0,e=H;for(;e!==null;)Uc(e.alternate,e),e=e.return;H=null}}function Au(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,tf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),hu=0,ku(),Wl=e,H=n=fi(e.current,null),Gl=t,Kl=0,ql=null,Jl=!1,Yl=Je(e,t),Xl=!1,ru=nu=tu=eu=$l=Ql=0,au=iu=null,ou=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-ze(r),a=1<<i;t|=e[i],r&=~a}return Zl=t,ni(),n}function ju(e,t){L=null,P.H=Hs,t===Ta||t===Da?(t=Na(),Kl=3):t===Ea?(t=Na(),Kl=4):Kl=t===ic?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ql=t,H===null&&(Ql=1,$s(e,bi(t,e.current)))}function Mu(){var e=oo.current;return e===null?!0:(Gl&4194048)===Gl?so===null:(Gl&62914560)===Gl||Gl&536870912?e===so:!1}function Nu(){var e=P.H;return P.H=Hs,e===null?Hs:e}function Pu(){var e=P.A;return P.A=Vl,e}function Fu(){Ql=4,Jl||(Gl&4194048)!==Gl&&oo.current!==null||(Yl=!0),!($l&134217727)&&!(eu&134217727)||Wl===null||Du(Wl,Gl,nu,!1)}function Iu(e,t,n){var r=Ul;Ul|=2;var i=Nu(),a=Pu();(Wl!==e||Gl!==t)&&(uu=null,Au(e,t)),t=!1;var o=Ql;a:do try{if(Kl!==0&&H!==null){var s=H,c=ql;switch(Kl){case 8:ku(),o=6;break a;case 3:case 2:case 9:case 6:oo.current===null&&(t=!0);var l=Kl;if(Kl=0,ql=null,Hu(e,s,c,l),n&&Yl){o=0;break a}break;default:l=Kl,Kl=0,ql=null,Hu(e,s,c,l)}}Lu(),o=Ql;break}catch(t){ju(e,t)}while(1);return t&&e.shellSuspendCounter++,Xi=Yi=null,Ul=r,P.H=i,P.A=a,H===null&&(Wl=null,Gl=0,ni()),o}function Lu(){for(;H!==null;)Bu(H)}function Ru(e,t){var n=Ul;Ul|=2;var r=Nu(),a=Pu();Wl!==e||Gl!==t?(uu=null,lu=De()+500,Au(e,t)):Yl=Je(e,t);a:do try{if(Kl!==0&&H!==null){t=H;var o=ql;b:switch(Kl){case 1:Kl=0,ql=null,Hu(e,t,o,1);break;case 2:case 9:if(ka(o)){Kl=0,ql=null,Vu(t);break}t=function(){Kl!==2&&Kl!==9||Wl!==e||(Kl=7),ld(e)},o.then(t,t);break a;case 3:Kl=7;break a;case 4:Kl=5;break a;case 7:ka(o)?(Kl=0,ql=null,Vu(t)):(Kl=0,ql=null,Hu(e,t,o,7));break;case 5:var s=null;switch(H.tag){case 26:s=H.memoizedState;case 5:case 27:var c=H;if(s?Qf(s):c.stateNode.complete){Kl=0,ql=null;var l=c.sibling;if(l!==null)H=l;else{var u=c.return;u===null?H=null:(H=u,Uu(u))}break b}}Kl=0,ql=null,Hu(e,t,o,5);break;case 6:Kl=0,ql=null,Hu(e,t,o,6);break;case 8:ku(),Ql=6;break a;default:throw Error(i(462))}}zu();break}catch(t){ju(e,t)}while(1);return Xi=Yi=null,P.H=r,P.A=a,Ul=n,H===null?(Wl=null,Gl=0,ni(),Ql):0}function zu(){for(;H!==null&&!Te();)Bu(H)}function Bu(e){var t=Pc(e.alternate,e,Zl);e.memoizedProps=e.pendingProps,t===null?Uu(e):H=t}function Vu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vc(n,t,t.pendingProps,t.type,void 0,Gl);break;case 11:t=vc(n,t,t.pendingProps,t.type.render,t.ref,Gl);break;case 5:Po(t);default:Uc(n,t),t=H=pi(t,Zl),t=Pc(n,t,Zl)}e.memoizedProps=e.pendingProps,t===null?Uu(e):H=t}function Hu(e,t,n,r){Xi=Yi=null,Po(t),Fa=null,Ia=0;var i=t.return;try{if(V(e,i,t,n,Gl)){Ql=1,$s(e,bi(n,e.current)),H=null;return}}catch(t){if(i!==null)throw H=i,t;Ql=1,$s(e,bi(n,e.current)),H=null;return}t.flags&32768?(Li||r===1?e=!0:Yl||Gl&536870912?e=!1:(Jl=e=!0,(r===2||r===9||r===3||r===6)&&(r=oo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Wu(t,e)):Uu(t)}function Uu(e){var t=e;do{if(t.flags&32768){Wu(t,Jl);return}e=t.return;var n=Vc(t.alternate,t,Zl);if(n!==null){H=n;return}if(t=t.sibling,t!==null){H=t;return}H=t=e}while(t!==null);Ql===0&&(Ql=5)}function Wu(e,t){do{var n=Hc(e.alternate,e);if(n!==null){n.flags&=32767,H=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){H=e;return}H=e=n}while(e!==null);Ql=6,H=null}function U(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do qu();while(fu!==0);if(Ul&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ti,$e(e,n,o,s,c,l),e===Wl&&(H=Wl=null,Gl=0),mu=t,pu=e,hu=n,gu=o,_u=a,vu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,nd(je,function(){return Ju(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,a=F.p,F.p=2,s=Ul,Ul|=4;try{cl(e,t,n)}finally{Ul=s,F.p=a,P.T=r}}fu=1,Gu(),W(),G()}}function Gu(){if(fu===1){fu=0;var e=pu,t=mu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Ul;Ul|=4;try{xl(t,e);var a=qd,o=kr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Or(s.ownerDocument.documentElement,s)){if(c!==null&&Ar(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Dr(s,h),v=Dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}hp=!!Kd,qd=Kd=null}finally{Ul=i,F.p=r,P.T=n}}e.current=t,fu=2}}function W(){if(fu===2){fu=0;var e=pu,t=mu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Ul;Ul|=4;try{ll(e,t.alternate,t)}finally{Ul=i,F.p=r,P.T=n}}fu=3}}function G(){if(fu===4||fu===3){fu=0,Ee();var e=pu,t=mu,n=hu,r=vu;t.subtreeFlags&10256||t.flags&10256?fu=5:(fu=0,mu=pu=null,Ku(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(du=null),it(n),t=t.stateNode,Le&&typeof Le.onCommitFiberRoot==`function`)try{Le.onCommitFiberRoot(Ie,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}hu&3&&qu(),ld(e),i=e.pendingLanes,n&261930&&i&42?e===bu?yu++:(yu=0,bu=e):yu=0,ud(0,!1)}}function Ku(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fa(t)))}function qu(){return Gu(),W(),G(),Ju()}function Ju(){if(fu!==5)return!1;var e=pu,t=gu;gu=0;var n=it(hu),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=_u,_u=null;var o=pu,s=hu;if(fu=0,mu=pu=null,hu=0,Ul&6)throw Error(i(331));var c=Ul;if(Ul|=4,Rl(o.current),Al(o,o.current,s,n),Ul=c,ud(0,!1),Le&&typeof Le.onPostCommitFiberRoot==`function`)try{Le.onPostCommitFiberRoot(Ie,o)}catch{}return!0}finally{F.p=a,P.T=r,Ku(e,t)}}function Yu(e,t,n){t=bi(n,t),t=tc(e.stateNode,t,2),e=qa(e,t,2),e!==null&&(Qe(e,2),ld(e))}function Xu(e,t,n){if(e.tag===3)Yu(e,e,n);else for(;t!==null;){if(t.tag===3){Yu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(du===null||!du.has(r))){e=bi(n,e),n=nc(2),r=qa(t,n,2),r!==null&&(rc(n,r,t,e),Qe(r,2),ld(r));break}}t=t.return}}function Zu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Xl=!0,i.add(n),e=Qu.bind(null,e,t,n),t.then(e,e))}function Qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Wl===e&&(Gl&n)===n&&(Ql===4||Ql===3&&(Gl&62914560)===Gl&&300>De()-su?!(Ul&2)&&Au(e,0):tu|=n,ru===Gl&&(ru=0)),ld(e)}function $u(e,t){t===0&&(t=Xe()),e=ai(e,t),e!==null&&(Qe(e,t),ld(e))}function ed(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$u(e,n)}function td(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),$u(e,n)}function nd(e,t){return Ce(e,t)}var rd=null,id=null,ad=!1,od=!1,sd=!1,cd=0;function ld(e){e!==id&&e.next===null&&(id===null?rd=id=e:id=id.next=e),od=!0,ad||(ad=!0,gd())}function ud(e,t){if(!sd&&od){sd=!0;do for(var n=!1,r=rd;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,hd(r,a))}else a=Gl,a=qe(r,r===Wl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Je(r,a)||(n=!0,hd(r,a));r=r.next}while(n);sd=!1}}function dd(){fd()}function fd(){od=ad=!1;var e=0;cd!==0&&$d()&&(e=cd);for(var t=De(),n=null,r=rd;r!==null;){var i=r.next,a=pd(r,t);a===0?(r.next=null,n===null?rd=i:n.next=i,i===null&&(id=n)):(n=r,(e!==0||a&3)&&(od=!0)),r=i}fu!==0&&fu!==5||ud(e,!1),cd!==0&&(cd=0)}function pd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ye(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Wl,n=Gl,n=qe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Kl===2||Kl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&we(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Je(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&we(r),it(n)){case 2:case 8:n=Ae;break;case 32:n=je;break;case 268435456:n=Ne;break;default:n=je}return r=md.bind(null,e),n=Ce(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&we(r),e.callbackPriority=2,e.callbackNode=null,2}function md(e,t){if(fu!==0&&fu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(qu()&&e.callbackNode!==n)return null;var r=Gl;return r=qe(e,e===Wl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(wu(e,r,t),pd(e,De()),e.callbackNode!=null&&e.callbackNode===n?md.bind(null,e):null)}function hd(e,t){if(qu())return null;wu(e,t,!0)}function gd(){rf(function(){Ul&6?Ce(ke,dd):fd()})}function _d(){if(cd===0){var e=ha;e===0&&(e=Ue,Ue<<=1,!(Ue&261888)&&(Ue=256)),cd=e}return cd}function vd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:en(``+e)}function yd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function bd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=vd((i[lt]||null).action),o=r.submitter;o&&(t=(t=o[lt]||null)?vd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Cn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(cd!==0){var e=o?yd(i,o):new FormData(i);Os(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?yd(i,o):new FormData(i),Os(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var xd=0;xd<Xr.length;xd++){var Sd=Xr[xd];Zr(Sd.toLowerCase(),`on`+(Sd[0].toUpperCase()+Sd.slice(1)))}Zr(Hr,`onAnimationEnd`),Zr(Ur,`onAnimationIteration`),Zr(Wr,`onAnimationStart`),Zr(`dblclick`,`onDoubleClick`),Zr(`focusin`,`onFocus`),Zr(`focusout`,`onBlur`),Zr(Gr,`onTransitionRun`),Zr(Kr,`onTransitionStart`),Zr(qr,`onTransitionCancel`),Zr(Jr,`onTransitionEnd`),Tt(`onMouseEnter`,[`mouseout`,`mouseover`]),Tt(`onMouseLeave`,[`mouseout`,`mouseover`]),Tt(`onPointerEnter`,[`pointerout`,`pointerover`]),Tt(`onPointerLeave`,[`pointerout`,`pointerover`]),wt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),wt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),wt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),wt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Cd=`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(` `),wd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Cd));function Td(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}}}}function Ed(e,t){var n=t[dt];n===void 0&&(n=t[dt]=new Set);var r=e+`__bubble`;n.has(r)||(Ad(t,e,2,!1),n.add(r))}function Dd(e,t,n){var r=0;t&&(r|=4),Ad(n,e,r,t)}var Od=`_reactListening`+Math.random().toString(36).slice(2);function kd(e){if(!e[Od]){e[Od]=!0,St.forEach(function(t){t!==`selectionchange`&&(wd.has(t)||Dd(t,!1,e),Dd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Od]||(t[Od]=!0,Dd(`selectionchange`,!1,t))}}function Ad(e,t,n,r){switch(Sp(t)){case 2:var i=gp;break;case 8:i=_p;break;default:i=vp}n=i.bind(null,t,n,e),i=void 0,!fn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function jd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=_t(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}ln(function(){var r=a,i=rn(n),o=[];a:{var c=Yr.get(e);if(c!==void 0){var l=Cn,u=e;switch(e){case`keypress`:if(vn(n)===0)break a;case`keydown`:case`keyup`:l=Vn;break;case`focusin`:u=`focus`,l=Mn;break;case`focusout`:u=`blur`,l=Mn;break;case`beforeblur`:case`afterblur`:l=Mn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=An;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=jn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Un;break;case Hr:case Ur:case Wr:l=Nn;break;case Jr:l=Wn;break;case`scroll`:case`scrollend`:l=Tn;break;case`wheel`:l=Gn;break;case`copy`:case`cut`:case`paste`:l=Pn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Hn;break;case`toggle`:case`beforetoggle`:l=Kn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=un(m,p),g!=null&&d.push(Md(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==nn&&(u=n.relatedTarget||n.fromElement)&&(_t(u)||u[ut]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?_t(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=An,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Hn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:yt(l),h=u==null?c:yt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,_t(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Pd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Fd(o,c,l,d,!1),u!==null&&f!==null&&Fd(o,f,u,d,!0)}}a:{if(c=r?yt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=fr;else if(or(c))if(pr)v=Sr;else{v=br;var y=yr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Zt(r.elementType)&&(v=fr):v=xr;if(v&&=v(e,r)){sr(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ut(c,`number`,c.value)}switch(y=r?yt(r):window,e){case`focusin`:(or(y)||y.contentEditable===`true`)&&(Mr=y,Nr=r,Pr=null);break;case`focusout`:Pr=Nr=Mr=null;break;case`mousedown`:Fr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Fr=!1,Ir(o,n,i);break;case`selectionchange`:if(jr)break;case`keydown`:case`keyup`:Ir(o,n,i)}var b;if(Jn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else nr?er(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Zn&&n.locale!==`ko`&&(nr||x!==`onCompositionStart`?x===`onCompositionEnd`&&nr&&(b=_n()):(mn=i,hn=`value`in mn?mn.value:mn.textContent,nr=!0)),y=Nd(r,x),0<y.length&&(x=new Fn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=tr(n),b!==null&&(x.data=b)))),(b=Xn?rr(e,n):ir(e,n))&&(x=Nd(r,`onBeforeInput`),0<x.length&&(y=new Fn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),bd(o,e,r,n,i)}Td(o,t)})}function Md(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Nd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=un(e,n),i!=null&&r.unshift(Md(e,i,a)),i=un(e,t),i!=null&&r.push(Md(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Pd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Fd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=un(n,a),l!=null&&o.unshift(Md(n,l,c))):i||(l=un(n,a),l!=null&&o.push(Md(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Id=/\r\n?/g,Ld=/\u0000|\uFFFD/g;function Rd(e){return(typeof e==`string`?e:``+e).replace(Id,`
|
|
10
|
+
`).replace(Ld,``)}function zd(e,t){return t=Rd(t),Rd(e)===t}function Bd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&qt(e,``+r);break;case`className`:jt(e,`class`,r);break;case`tabIndex`:jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:jt(e,n,r);break;case`style`:Xt(e,r,o);break;case`data`:if(t!==`object`){jt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=en(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Bd(e,t,`name`,a.name,a,null),Bd(e,t,`formEncType`,a.formEncType,a,null),Bd(e,t,`formMethod`,a.formMethod,a,null),Bd(e,t,`formTarget`,a.formTarget,a,null)):(Bd(e,t,`encType`,a.encType,a,null),Bd(e,t,`method`,a.method,a,null),Bd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=en(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=tn);break;case`onScroll`:r!=null&&Ed(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ed(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=en(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Ed(`beforetoggle`,e),Ed(`toggle`,e),At(e,`popover`,r);break;case`xlinkActuate`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:At(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Qt.get(n)||n,At(e,n,r))}}function Vd(e,t,n,r,a,o){switch(n){case`style`:Xt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&qt(e,``+r);break;case`onScroll`:r!=null&&Ed(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ed(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=tn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Ct.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[lt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):At(e,n,r)}}}function Hd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Ed(`error`,e),Ed(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Bd(e,t,o,s,n,null)}}a&&Bd(e,t,`srcSet`,n.srcSet,n,null),r&&Bd(e,t,`src`,n.src,n,null);return;case`input`:Ed(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Bd(e,t,r,d,n,null)}}Ht(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Ed(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Bd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Wt(e,!!r,n,!0):Wt(e,!!r,t,!1);return;case`textarea`:for(s in Ed(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Bd(e,t,s,c,n,null)}Kt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Bd(e,t,l,r,n,null)}return;case`dialog`:Ed(`beforetoggle`,e),Ed(`toggle`,e),Ed(`cancel`,e),Ed(`close`,e);break;case`iframe`:case`object`:Ed(`load`,e);break;case`video`:case`audio`:for(r=0;r<Cd.length;r++)Ed(Cd[r],e);break;case`image`:Ed(`error`,e),Ed(`load`,e);break;case`details`:Ed(`toggle`,e);break;case`embed`:case`source`:case`link`:Ed(`error`,e),Ed(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Bd(e,t,u,r,n,null)}return;default:if(Zt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Vd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Bd(e,t,c,r,n,null))}function Ud(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Bd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Bd(e,t,p,m,r,f)}}Vt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Bd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Bd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Wt(e,!!n,n?[]:``,!1):Wt(e,!!n,t,!0)):Wt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Bd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Bd(e,t,s,a,r,o)}Gt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Bd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Bd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Bd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Bd(e,t,u,p,r,m)}return;default:if(Zt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Vd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Vd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Bd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Bd(e,t,f,p,r,m)}function Wd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Gd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Wd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Wd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Kd=null,qd=null;function Jd(e){return e.nodeType===9?e:e.ownerDocument}function Yd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Xd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Zd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Qd=null;function $d(){var e=window.event;return e&&e.type===`popstate`?e===Qd?!1:(Qd=e,!0):(Qd=null,!1)}var ef=typeof setTimeout==`function`?setTimeout:void 0,tf=typeof clearTimeout==`function`?clearTimeout:void 0,nf=typeof Promise==`function`?Promise:void 0,rf=typeof queueMicrotask==`function`?queueMicrotask:nf===void 0?ef:function(e){return nf.resolve(null).then(e).catch(af)};function af(e){setTimeout(function(){throw e})}function of(e){return e===`head`}function sf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Vp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)xf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,xf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ht]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&xf(e.ownerDocument.body);n=i}while(n);Vp(t)}function cf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function lf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:lf(n),gt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function uf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[ht])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=gf(e.nextSibling),e===null)break}return null}function df(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=gf(e.nextSibling),e===null))return null;return e}function ff(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=gf(e.nextSibling),e===null))return null;return e}function pf(e){return e.data===`$?`||e.data===`$~`}function mf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function hf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function gf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var _f=null;function vf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return gf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function yf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function bf(e,t,n){switch(t=Jd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function xf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);gt(e)}var Sf=new Map,Cf=new Set;function wf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Tf=F.d;F.d={f:Ef,r:Df,D:Af,C:jf,L:Mf,m:Nf,X:Ff,S:Pf,M:If};function Ef(){var e=Tf.f(),t=Ou();return e||t}function Df(e){var t=vt(e);t!==null&&t.tag===5&&t.type===`form`?As(t):Tf.r(e)}var Of=typeof document>`u`?null:document;function kf(e,t,n){var r=Of;if(r&&typeof t==`string`&&t){var i=Bt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Cf.has(i)||(Cf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Hd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Af(e){Tf.D(e),kf(`dns-prefetch`,e,null)}function jf(e,t){Tf.C(e,t),kf(`preconnect`,e,t)}function Mf(e,t,n){Tf.L(e,t,n);var r=Of;if(r&&e&&t){var i=`link[rel="preload"][as="`+Bt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Bt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Bt(n.imageSizes)+`"]`)):i+=`[href="`+Bt(e)+`"]`;var a=i;switch(t){case`style`:a=Rf(e);break;case`script`:a=Hf(e)}Sf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Sf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(zf(a))||t===`script`&&r.querySelector(Uf(a))||(t=r.createElement(`link`),Hd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Nf(e,t){Tf.m(e,t);var n=Of;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Bt(r)+`"][href="`+Bt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Hf(e)}if(!Sf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),Sf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Uf(a)))return}r=n.createElement(`link`),Hd(r,`link`,e),xt(r),n.head.appendChild(r)}}}function Pf(e,t,n){Tf.S(e,t,n);var r=Of;if(r&&e){var i=bt(r).hoistableStyles,a=Rf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(zf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Sf.get(a))&&Kf(e,n);var c=o=r.createElement(`link`);xt(c),Hd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Gf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Ff(e,t){Tf.X(e,t);var n=Of;if(n&&e){var r=bt(n).hoistableScripts,i=Hf(e),a=r.get(i);a||(a=n.querySelector(Uf(i)),a||(e=h({src:e,async:!0},t),(t=Sf.get(i))&&qf(e,t),a=n.createElement(`script`),xt(a),Hd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function If(e,t){Tf.M(e,t);var n=Of;if(n&&e){var r=bt(n).hoistableScripts,i=Hf(e),a=r.get(i);a||(a=n.querySelector(Uf(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=Sf.get(i))&&qf(e,t),a=n.createElement(`script`),xt(a),Hd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lf(e,t,n,r){var a=(a=ue.current)?wf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Rf(n.href),n=bt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Rf(n.href);var o=bt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(zf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Sf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Sf.set(e,n),o||Vf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Hf(n),n=bt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Rf(e){return`href="`+Bt(e)+`"`}function zf(e){return`link[rel="stylesheet"][`+e+`]`}function Bf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Vf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Hd(t,`link`,n),xt(t),e.head.appendChild(t))}function Hf(e){return`[src="`+Bt(e)+`"]`}function Uf(e){return`script[async]`+e}function Wf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Bt(n.href)+`"]`);if(r)return t.instance=r,xt(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),xt(r),Hd(r,`style`,a),Gf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Rf(n.href);var o=e.querySelector(zf(a));if(o)return t.state.loading|=4,t.instance=o,xt(o),o;r=Bf(n),(a=Sf.get(a))&&Kf(r,a),o=(e.ownerDocument||e).createElement(`link`),xt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Hd(o,`link`,r),t.state.loading|=4,Gf(o,n.precedence,e),t.instance=o;case`script`:return o=Hf(n.src),(a=e.querySelector(Uf(o)))?(t.instance=a,xt(a),a):(r=n,(a=Sf.get(o))&&(r=h({},n),qf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),xt(a),Hd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Gf(r,n.precedence,e));return t.instance}function Gf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Kf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Jf=null;function Yf(e,t,n){if(Jf===null){var r=new Map,i=Jf=new Map;i.set(n,r)}else i=Jf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ht]||a[ct]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Xf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Zf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function $f(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Rf(r.href),a=t.querySelector(zf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=np.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,xt(a);return}a=t.ownerDocument||t,r=Bf(r),(i=Sf.get(i))&&Kf(r,i),a=a.createElement(`link`),xt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Hd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=np.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ep=0;function tp(e,t){return e.stylesheets&&e.count===0&&ip(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ip(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ep===0&&(ep=62500*Gd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ip(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ep?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function np(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ip(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var rp=null;function ip(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,rp=new Map,t.forEach(ap,e),rp=null,np.call(e))}function ap(e,t){if(!(t.state.loading&4)){var n=rp.get(e);if(n)var r=n.get(null);else{n=new Map,rp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=np.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var op={$$typeof:C,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function sp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ze(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ze(0),this.hiddenUpdates=Ze(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function cp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new sp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ui(3,null,null,t),e.current=a,a.stateNode=e,t=da(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Wa(a),e}function lp(e){return e?(e=ci,e):ci}function up(e,t,n,r,i,a){i=lp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ka(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=qa(e,r,t),n!==null&&(Cu(n,e,t),Ja(n,e,t))}function dp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function fp(e,t){dp(e,t),(e=e.alternate)&&dp(e,t)}function pp(e){if(e.tag===13||e.tag===31){var t=ai(e,67108864);t!==null&&Cu(t,e,67108864),fp(e,67108864)}}function mp(e){if(e.tag===13||e.tag===31){var t=xu();t=rt(t);var n=ai(e,t);n!==null&&Cu(n,e,t),fp(e,t)}}var hp=!0;function gp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,vp(e,t,n,r)}finally{F.p=a,P.T=i}}function _p(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,vp(e,t,n,r)}finally{F.p=a,P.T=i}}function vp(e,t,n,r){if(hp){var i=yp(r);if(i===null)jd(e,t,r,bp,n),jp(e,r);else if(Np(i,e,t,n,r))r.stopPropagation();else if(jp(e,r),t&4&&-1<Ap.indexOf(e)){for(;i!==null;){var a=vt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ke(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-ze(o);s.entanglements[1]|=c,o&=~c}ld(a),!(Ul&6)&&(lu=De()+500,ud(0,!1))}}break;case 31:case 13:s=ai(a,2),s!==null&&Cu(s,a,2),Ou(),fp(a,2)}if(a=yp(r),a===null&&jd(e,t,r,bp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else jd(e,t,r,null,n)}}function yp(e){return e=rn(e),xp(e)}var bp=null;function xp(e){if(bp=null,e=_t(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=u(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return bp=e,null}function Sp(e){switch(e){case`beforetoggle`: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`toggle`: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 2;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`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Oe()){case ke:return 2;case Ae:return 8;case je:case Me:return 32;case Ne:return 268435456;default:return 32}default:return 32}}var Cp=!1,wp=null,Tp=null,Ep=null,Dp=new Map,Op=new Map,kp=[],Ap=`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`.split(` `);function jp(e,t){switch(e){case`focusin`:case`focusout`:wp=null;break;case`dragenter`:case`dragleave`:Tp=null;break;case`mouseover`:case`mouseout`:Ep=null;break;case`pointerover`:case`pointerout`:Dp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Op.delete(t.pointerId)}}function Mp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=vt(t),t!==null&&pp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Np(e,t,n,r,i){switch(t){case`focusin`:return wp=Mp(wp,e,t,n,r,i),!0;case`dragenter`:return Tp=Mp(Tp,e,t,n,r,i),!0;case`mouseover`:return Ep=Mp(Ep,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Dp.set(a,Mp(Dp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Op.set(a,Mp(Op.get(a)||null,e,t,n,r,i)),!0}return!1}function Pp(e){var t=_t(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,ot(e.priority,function(){mp(n)});return}}else if(t===31){if(t=u(n),t!==null){e.blockedOn=t,ot(e.priority,function(){mp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=yp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);nn=r,n.target.dispatchEvent(r),nn=null}else return t=vt(n),t!==null&&pp(t),e.blockedOn=n,!1;t.shift()}return!0}function Ip(e,t,n){Fp(e)&&n.delete(t)}function Lp(){Cp=!1,wp!==null&&Fp(wp)&&(wp=null),Tp!==null&&Fp(Tp)&&(Tp=null),Ep!==null&&Fp(Ep)&&(Ep=null),Dp.forEach(Ip),Op.forEach(Ip)}function Rp(e,n){e.blockedOn===n&&(e.blockedOn=null,Cp||(Cp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Lp)))}var zp=null;function Bp(e){zp!==e&&(zp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){zp===e&&(zp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(xp(r||n)===null)continue;break}var a=vt(n);a!==null&&(e.splice(t,3),t-=3,Os(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Vp(e){function t(t){return Rp(t,e)}wp!==null&&Rp(wp,e),Tp!==null&&Rp(Tp,e),Ep!==null&&Rp(Ep,e),Dp.forEach(t),Op.forEach(t);for(var n=0;n<kp.length;n++){var r=kp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<kp.length&&(n=kp[0],n.blockedOn===null);)Pp(n),n.blockedOn===null&&kp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[lt]||null;if(typeof a==`function`)o||Bp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[lt]||null)s=o.formAction;else if(xp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Bp(n)}}}function Hp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Up(e){this._internalRoot=e}Wp.prototype.render=Up.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;up(n,xu(),e,t,null,null)},Wp.prototype.unmount=Up.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;up(e.current,2,null,e,null,null),Ou(),t[ut]=null}};function Wp(e){this._internalRoot=e}Wp.prototype.unstable_scheduleHydration=function(e){if(e){var t=at();e={blockedOn:null,target:e,priority:t};for(var n=0;n<kp.length&&t!==0&&t<kp[n].priority;n++);kp.splice(n,0,e),n===0&&Pp(e)}};var Gp=n.version;if(Gp!==`19.2.4`)throw Error(i(527,Gp,`19.2.4`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var Kp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var qp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qp.isDisabled&&qp.supportsFiber)try{Ie=qp.inject(Kp),Le=qp}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(i(299));var n=!1,r=``,a=Xs,s=Zs,c=Qs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=cp(e,1,!1,null,null,n,r,null,a,s,c,Hp),e[ut]=t.current,kd(e),new Up(t)}})),p=i(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=f()})),m=e(a(),1),h=p(),g={internationalization:{locales:[`en`,`en-GB`,`fr`,`es`,`de`,`ja`,`ko`,`zh`,`it`,`pt`,`hi`,`ar`,`ru`],defaultLocale:`en`},routing:{mode:`prefix-no-default`,storage:{cookies:[],localStorage:[{name:`INTLAYER_LOCALE`}],sessionStorage:[],headers:[]},basePath:``},editor:{editorURL:`http://localhost:8000`,cmsURL:`https://app.intlayer.org`,backendURL:`https://back.intlayer.org`,port:8e3,enabled:!1,dictionaryPriorityStrategy:`local_first`,liveSync:!0,liveSyncPort:4e3,liveSyncURL:`http://localhost:4000`},log:{mode:`default`,prefix:`\x1B[38;5;239m[intlayer] \x1B[0m`},metadata:{name:`Intlayer`,version:`8.6.1`,doc:`https://intlayer.org/docs`}},_=({children:e,dictionaryKey:t,keyPath:n})=>e,v=o(),y=({children:e,value:t,additionalProps:n})=>{let r=(0,m.isValidElement)(e)?e:(0,v.jsx)(v.Fragment,{children:e});return new Proxy(r,{get(e,r,i){return r===`value`?t:n&&Object.keys(n).includes(r)?n[r]:Reflect.get(e,r,i)}})},b=e=>{if(typeof e!=`object`||!e)return e;let{type:t,props:n}=(e=>{let t=e.props?.children;if(Array.isArray(t)){let n=t.map((e,t)=>{let n=b(e);if(typeof n==`object`&&n&&`type`in n){let e=n;return(0,m.createElement)(e.type,{...e.props,key:t},...Array.isArray(e.props?.children)?e.props.children:e.props?.children===void 0?[]:[e.props.children])}return n});return{...e,props:{...e.props,children:n}}}else if(t!=null){let n=b(t);return{...e,props:{...e.props,children:[n]}}}return{...e,props:{...e.props,children:[]}}})(e);return(0,m.createElement)(t??`span`,n,...n.children)},x=(e,t)=>{let n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},S=`translation`,C=`enumeration`,w=`condition`,T=`insertion`,E=`file`,D=`object`,O=`array`,k=`nested`,A=`reactNode`,j=`markdown`,M=`html`,N=`text`,ee=`number`,te=`boolean`,P=`gender`,F=`null`,ne=`unknown`,re=(e,t)=>{for(let n of t.plugins??[])if(n.canHandle(e))return n.transform(e,t,(e,t)=>re(e,t));if(typeof e!=`object`||!e||e.$$typeof!==void 0||e.__v_isVNode!==void 0||e._isVNode!==void 0||e.isJSX!==void 0||typeof e==`function`)return e;if(Array.isArray(e))return e.map((e,n)=>re(e,{...t,children:e,keyPath:[...t.keyPath,{type:O,key:n}]}));let n={};for(let r in e){let i={...t,children:e[r],keyPath:[...t.keyPath,{type:D,key:r}]};n[r]=re(e[r],i)}return n},ie=(e,t)=>e.replace(/\{\{\s*(.*?)\s*\}\}/g,(e,n)=>(t[n.trim()]??``).toString()),ae=e=>{if(typeof e!=`object`||!e||typeof e.then==`function`||e.$$typeof!==void 0||e.__v_isVNode!==void 0||e._isVNode!==void 0||e.isJSX!==void 0)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Array.isArray(e)},oe=(e,t)=>{if(e===void 0)return t;if(t===void 0||Array.isArray(e))return e;if(ae(e)&&ae(t)){let n={...e};for(let r of Object.keys(t))r===`__proto__`||r===`constructor`||t[r]===void 0||(n[r]=e[r]===void 0?t[r]:oe(e[r],t[r]));return n}return e},se=(e,t,n)=>{let r=t=>e[t],i=new Set,a=[],o=e=>{e&&!i.has(e)&&(i.add(e),a.push(e))};o(t),t.includes(`-`)&&o(t.split(`-`)[0]),o(n),n?.includes(`-`)&&o(n.split(`-`)[0]);let s=[];for(let e of a){let t=r(e);if(t!==void 0){if(typeof t==`string`){if(s.length===0)return t;continue}s.push(t)}}if(s.length!==0)return s.length===1||Array.isArray(s[0])?s[0]:s.reduce((e,t)=>oe(e,t))},ce={id:`fallback-plugin`,canHandle:()=>!1,transform:e=>e},le=(e,t)=>({}).INTLAYER_NODE_TYPE_TRANSLATION===`false`?ce:{id:`translation-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`translation`,transform:(n,r,i)=>{let a={...n.translation??{}};for(let e in a){let t={...r,children:a[e],keyPath:[...r.keyPath,{type:S,key:e}]};a[e]=i(a[e],t)}return se(a,e,t)}},ue=ce,de={}.INTLAYER_NODE_TYPE_CONDITION===`false`?ce:{id:`condition-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`condition`,transform:(e,t,n)=>{let r={...e[w]};for(let e in r){let i=r[e];r[e]=n(i,{...t,children:i,keyPath:[...t.keyPath,{type:w,key:e}]})}return e=>{let t=x(r,typeof e==`boolean`?e:e.value);return typeof t==`function`&&typeof e==`object`?t(e):t}}},fe={}.INTLAYER_NODE_TYPE_INSERTION===`false`?ce:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:T}],i=e[T],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,n,r)=>{let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=ie(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]})}},pe=ce,me=e=>ce,he=ce,ge=(e,t=!0)=>[le(e??g.internationalization.defaultLocale,t?g.internationalization.defaultLocale:void 0),ue,de,fe,me(e??g.internationalization.defaultLocale),he,pe].filter(Boolean),_e=(e,t,n=[])=>re(e,{...t,plugins:n}),ve=(e,t,n=ge(t))=>{let r={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:n};return _e(e.content,r,n)},ye=e=>e!=null&&typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`,be=/\{\{\s*(.*?)\s*\}\}/g,xe=(e,t={})=>{if(!Object.values(t).some(ye))return{isSimple:!0,parts:e.replace(be,(e,n)=>(t[n.trim()]??``).toString())};let n=e.split(be),r=[];for(let e=0;e<n.length;e++)if(e%2==0)n[e]&&r.push(n[e]);else{let i=t[n[e].trim()];i!=null&&r.push(i)}return{isSimple:!1,parts:r}},I={blockQuote:`0`,breakLine:`1`,breakThematic:`2`,codeBlock:`3`,codeFenced:`4`,codeInline:`5`,footnote:`6`,footnoteReference:`7`,gfmTask:`8`,heading:`9`,headingSetext:`10`,htmlBlock:`11`,htmlComment:`12`,htmlSelfClosing:`13`,customComponent:`34`,image:`14`,link:`15`,linkAngleBraceStyleDetector:`16`,linkBareUrlDetector:`17`,newlineCoalescer:`19`,orderedList:`20`,paragraph:`21`,ref:`22`,refImage:`23`,refLink:`24`,table:`25`,tableSeparator:`26`,text:`27`,textBolded:`28`,textEmphasized:`29`,textEscaped:`30`,textMarked:`31`,textStrikethroughed:`32`,unorderedList:`33`},Se={MAX:0,HIGH:1,MED:2,LOW:3,MIN:4},Ce=`allowFullScreen.allowTransparency.autoComplete.autoFocus.autoPlay.cellPadding.cellSpacing.charSet.classId.colSpan.contentEditable.contextMenu.crossOrigin.encType.formAction.formEncType.formMethod.formNoValidate.formTarget.frameBorder.hrefLang.inputMode.keyParams.keyType.marginHeight.marginWidth.maxLength.mediaGroup.minLength.noValidate.radioGroup.readOnly.rowSpan.spellCheck.srcDoc.srcLang.srcSet.tabIndex.useMap`.split(`.`).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:`className`,for:`htmlFor`}),we={amp:`&`,apos:`'`,gt:`>`,lt:`<`,nbsp:`\xA0`,quot:`“`},Te=[`style`,`script`,`pre`],Ee=[`src`,`href`,`data`,`formAction`,`srcDoc`,`action`],De=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Oe=/\n{2,}$/,ke=/^(\s*>[\s\S]*?)(?=\n\n|$)/,Ae=/^ *> ?/gm,je=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Me=/^ {2,}\n/,Ne=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,Pe=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,Fe=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Ie=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Le=/^(?:\n *)*\n/,Re=/\r\n?/g,ze=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,Be=/^\[\^([^\]]+)]/,Ve=/\f/g,He=/^---[ \t]*\n(.|\n)*?\n---[ \t]*\n/,Ue=/^\s*?\[(x|\s)\]/,We=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ge=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ke=/^([^\n]+)\n *(=|-)\2{2,} *\n/,qe=/^ *(?!<[a-zA-Z][^ >/]* ?\/>)<([a-zA-Z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,Je=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Ye=/^<!--[\s\S]*?(?:-->)/,Xe=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Ze=/^ *<([a-zA-Z][a-zA-Z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,Qe=/^ *<([A-Z][a-zA-Z0-9]*)(?:\s+((?:<.*?>|[^>])*))?>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/,$e=/^\{.*\}$/,et=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,tt=/^<([^ >]+[:@/][^ >]+)>/,nt=/-([a-z])?/gi,rt=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,it=/(^ *\||\| *$)/g,at=/^ *:-+: *$/,ot=/^ *:-+ *$/,st=/^ *-+: *$/,ct=/^[^\n]+(?: {2}\n|\n{2,})/,lt=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,ut=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,dt=/^\[([^\]]*)\] ?\[([^\]]*)\]/,ft=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,pt=/\t/g,mt=/^\n+/,ht=/^\n*([ \t]*)/,gt=/(?:^|\n)( *)$/,_t=`(?:\\d+\\.)`,vt=`(?:[*+-])`,yt=/^\\([^0-9A-Za-z\s])/,bt=/\\([^0-9A-Za-z\s])/g,xt=/^[\s\S](?:(?! {2}\n|[0-9]\.|http)[^=*_~\-\n:<`\\[!])*/,St=/^(:[a-zA-Z0-9-_]+:)/,Ct=e=>`(?=[\\s\\S]+?\\1${e?`\\1`:``})`,wt="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\[^\\s]|[\\s\\S])+?)",Tt=RegExp(`^([*_])\\1${Ct(1)}${wt}\\1\\1(?!\\1)`),Et=RegExp(`^([*_])${Ct(0)}${wt}\\1(?!\\1)`),Dt=RegExp(`^(==)${Ct(0)}${wt}\\1`),Ot=RegExp(`^(~~)${Ct(0)}${wt}\\1`),kt=e=>`( *)(`+(e===1?_t:vt)+`) +`,At=kt(1),jt=kt(2),Mt=e=>RegExp(`^`+(e===1?At:jt)),Nt=Mt(1),Pt=Mt(2),Ft=e=>RegExp(`^`+(e===1?At:jt)+`[^\\n]*(?:\\n(?!\\1`+(e===1?_t:vt)+` )[^\\n]*)*(\\n|$)`,`gm`),It=Ft(1),Lt=Ft(2),Rt=e=>{let t=e===1?_t:vt;return RegExp(`^( *)(`+t+`) [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1`+t+` (?!`+t+` ))\\n*|\\s*\\n*$)`)},zt=Rt(1),Bt=Rt(2),Vt=e=>{let t=e.length;for(;t>0&&e[t-1]<=` `;)t--;return e.slice(0,t)},Ht=(e,t)=>e.startsWith(t),Ut=e=>{let t=e[0];return(t===`"`||t===`'`)&&e.length>=2&&e[e.length-1]===t?e.slice(1,-1):e},Wt=e=>e&&e.replace(bt,`$1`),Gt=(...e)=>e.filter(Boolean).join(` `),Kt=(e,t,n)=>{let r=e,i=t.split(`.`);for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r??n},qt=e=>e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,`a`).replace(/[çÇ]/g,`c`).replace(/[ðÐ]/g,`d`).replace(/[ÈÉÊËéèêë]/g,`e`).replace(/[ÏïÎîÍíÌì]/g,`i`).replace(/[Ññ]/g,`n`).replace(/[øØœŒÕõÔôÓóÒò]/g,`o`).replace(/[ÜüÛûÚúÙù]/g,`u`).replace(/[ŸÿÝý]/g,`y`).replace(/[^a-z0-9- ]/gi,``).replace(/ /gi,`-`).toLowerCase(),Jt=/(javascript|vbscript|data(?!:image)):/i,Yt=e=>{try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,``);if(Jt.test(t))return console.warn(`Input contains an unsafe JavaScript/VBScript/data expression, it will not be rendered.`,t),null}catch{return console.warn(`Input could not be decoded due to malformed syntax or characters, it will not be rendered.`,e),null}return e},Xt=e=>{let t=performance.now(),n=e.replace(Re,`
|
|
11
|
+
`).replace(Ve,``).replace(pt,` `),r=performance.now()-t;return r>20&&console.log(`normalizeWhitespace: ${r.toFixed(3)}ms, source length: ${e.length}`),n},Zt=(e,t)=>{let n=performance.now();if(!t)return e;let r=e.split(`
|
|
12
|
+
`),i=!1,a=null,o=e=>e.match(/^\s*(`{3,}|~{3,})/),s=e=>{let t=o(e);if(!t)return;let n=t[1];i?a&&e.includes(a)&&(i=!1,a=null):(i=!0,a=n)},c=r.map(e=>{if(o(e)){let n=e.startsWith(t)?e.slice(t.length):e;return s(e),n}return i?e:e.startsWith(t)?e.slice(t.length):e}).join(`
|
|
13
|
+
`),l=performance.now()-n;return l>20&&console.log(`trimLeadingWhitespaceOutsideFences: ${l.toFixed(3)}ms, text length: ${e.length}, lines count: ${r.length}`),c},Qt=e=>(e.indexOf(`-`)!==-1&&e.match(Xe)===null&&(e=e.replace(nt,(e,t)=>t.toUpperCase())),e),$t=e=>{let t=performance.now(),n=[],r=``,i=!1,a=!1,o=``;if(!e)return n;for(let t=0;t<e.length;t++){let s=e[t];if((s===`"`||s===`'`)&&!i&&(a?s===o&&(a=!1,o=``):(a=!0,o=s)),s===`(`&&r.endsWith(`url`)?i=!0:s===`)`&&i&&(i=!1),s===`;`&&!a&&!i){let e=r.trim();if(e){let t=e.indexOf(`:`);if(t>0){let r=e.slice(0,t).trim(),i=e.slice(t+1).trim();n.push([r,i])}}r=``}else r+=s}let s=r.trim();if(s){let e=s.indexOf(`:`);if(e>0){let t=s.slice(0,e).trim(),r=s.slice(e+1).trim();n.push([t,r])}}let c=performance.now()-t;return c>20&&console.log(`parseStyleAttribute: ${c.toFixed(3)}ms, styleString length: ${e.length}, styles count: ${n.length}`),n},en=(e,t,n,r)=>t===`style`?$t(n).reduce((t,[n,i])=>{let a=n.replace(/(-[a-z])/g,e=>e[1].toUpperCase());return t[a]=r(i,e,n),t},{}):Ee.indexOf(t)===-1?(n.match($e)&&(n=Wt(n.slice(1,n.length-1))),n===`true`?!0:n===`false`?!1:n):r(Wt(n),e,t),tn=e=>st.test(e)?`right`:at.test(e)?`center`:(ot.test(e),`left`),nn=e=>e.replace(it,``).split(`|`).map(tn),rn=(e,t,n,r)=>{let i=performance.now(),a=n.inTable;n.inTable=!0;let o=[[]],s=``,c=()=>{if(!s)return;let e=o[o.length-1];e.push.apply(e,t(s,n)),s=``};e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((e,t,n)=>{if(e.trim()===`|`&&(c(),r)){t!==0&&t!==n.length-1&&o.push([]);return}s+=e}),c(),n.inTable=a;let l=performance.now()-i;return l>20&&console.log(`parseTableRow: ${l.toFixed(3)}ms, source length: ${e.length}, cells count: ${o.length}`),o},an=(e,t,n)=>{let r=performance.now(),i=e.trim().split(`
|
|
14
|
+
`),a=i.map(e=>rn(e,t,n,!0)),o=performance.now()-r;return o>20&&console.log(`parseTableCells: ${o.toFixed(3)}ms, source length: ${e.length}, rows count: ${i.length}`),a},on=(e,t,n)=>{if(Array.isArray(n)){for(let t=0;t<n.length;t++)if(Ht(e,n[t]))return!0;return!1}return n(e,t)},sn=e=>(e.inline=1,e),cn=e=>sn((t,n)=>n.inline?e.exec(t):null),ln=e=>sn((t,n)=>n.inline||n.simple?e.exec(t):null),un=e=>(t,n)=>n.inline||n.simple?null:e.exec(t),dn=e=>sn((t,n)=>typeof e==`function`?e(t,n):e.exec(t)),fn=(e,t,n)=>{let r=performance.now(),i=n.inline??!1,a=n.simple??!1;n.inline=!0,n.simple=!0;let o=e(t,n);n.inline=i,n.simple=a;let s=performance.now()-r;return s>20&&console.log(`parseInline: ${s.toFixed(3)}ms, children length: ${t.length}, result count: ${o.length}`),o},pn=(e,t,n)=>{let r=performance.now(),i=n.inline??!1,a=n.simple??!1;n.inline=!1,n.simple=!0;let o=e(t,n);n.inline=i,n.simple=a;let s=performance.now()-r;return s>20&&console.log(`parseSimpleInline: ${s.toFixed(3)}ms, children length: ${t.length}, result count: ${o.length}`),o},mn=(e,t,n={})=>{let r=performance.now(),i=n.inline||!1;n.inline=!1;let a=Vt(t),o=e(/\n\n$/.test(a)===!1?a.endsWith(`
|
|
15
|
+
`)?`${a}\n`:`${a}\n\n`:a,n);n.inline=i;let s=performance.now()-r;return s>20&&console.log(`parseBlock: ${s.toFixed(3)}ms, children length: ${t.length}, result count: ${o.length}`),o},hn=(e,t,n)=>({children:fn(t,e[2],n)}),gn=()=>({}),_n=()=>null,vn=(e,t)=>{for(let n=0;n<e.length;n++)if(e[n].test(t))return!0;return!1},yn=e=>{let t=performance.now(),n=Object.keys(e);n.forEach(t=>{let n=e[t]._order;(typeof n!=`number`||!Number.isFinite(n))&&console.warn(`intlayer: Invalid order for rule \`${t}\`: ${n}`)}),n.sort((t,n)=>e[t]._order-e[n]._order||(t<n?-1:1));let r=(t,i={})=>{let a=performance.now(),o=[];if(i.prevCapture=i.prevCapture||``,t.trim())for(;t;){let a=0;for(;a<n.length;){let s=n[a],c=e[s];if(c._qualify&&!on(t,i,c._qualify)){a++;continue}let l=performance.now(),u=c._match(t,i),d=performance.now()-l;if(d>1&&console.log(`${s}._match: ${d.toFixed(3)}ms, source length: ${t.length}`),u?.[0]){t=t.substring(u[0].length);let e=performance.now(),n=c._parse(u,r,i),a=performance.now()-e;a>1&&console.log(`${s}._parse: ${a.toFixed(3)}ms, capture length: ${u[0].length}`),i.prevCapture=(i.prevCapture||``)+u[0],n.type||=s,o.push(n);break}a++}}let s=performance.now()-a;return s>1&&console.log(`nestedParse: ${s.toFixed(3)}ms, source length: ${t.length}, result count: ${o.length}`),o},i=performance.now()-t;return i>20&&console.log(`parserFor: ${i.toFixed(3)}ms, rules count: ${n.length}`),(e,t)=>r(Xt(e),t)},bn=e=>(t,n={})=>{let r=performance.now(),i=(t,n={})=>bn(e)(t,n);if(Array.isArray(t)){let e=n.key,a=[],o=!1,s=0;for(let e=0;e<t.length;e++){let r=i(t[e],{...n,key:s}),c=typeof r==`string`;c&&o?a[a.length-1]=a[a.length-1]+r:r!==null&&(a.push(r),s++),o=c}n.key=e;let c=performance.now()-r;return c>20&&console.log(`renderFor (array): ${c.toFixed(3)}ms, ast length: ${t.length}`),a}let a=e(t,i,n),o=performance.now()-r;return o>20&&console.log(`renderFor (single): ${o.toFixed(3)}ms, ast type: ${t.type}`),a},xn=(e,t)=>(n,r,i)=>{let a=performance.now(),o=e[n.type]?._render,s=t?t(()=>o?.(n,r,i),n,r,i):o?.(n,r,i),c=performance.now()-a;return c>20&&console.log(`createRenderer: ${c.toFixed(3)}ms, ast type: ${n.type}, hasUserRender: ${!!t}`),s},Sn=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Cn=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),wn=(e,t)=>{if(typeof e!=`string`)return e;let n=Kt(t,e);if(!n&&typeof e==`string`){let r=e.toLowerCase(),i=Object.keys(t).find(e=>e.toLowerCase()===r);i&&(n=Kt(t,i))}return n||e},Tn=(e,t)=>{let{runtime:n,components:r={}}=e,i=t.tagfilter?[`title`,`textarea`,`style`,`xmp`,`iframe`,`noembed`,`noframes`,`script`,`plaintext`]:[];return(e,t,...a)=>{if(typeof e==`string`&&i.includes(e.toLowerCase()))return null;let o=typeof e==`string`,s=Gt(t?.className,t?.class),c={},l=!1;if(t)for(let e in t){let n=t[e];n!=null&&(e===`className`||e===`class`?l||=(s&&(c.className=s),!0):c[e]=n)}!l&&s&&(c.className=s);let u=c;n.normalizeProps&&o&&(u=n.normalizeProps(e,c));let d=wn(e,r);return n.createElement(d,u,...a.length===1?[a[0]]:a)}},En=(e,t,n,r,i,a,o,s)=>{let c=e=>t.slugify?t.slugify(e,qt):qt(e),l=t.sanitizer??Yt,u=t.namedCodesToUnicode?{...we,...t.namedCodesToUnicode}:we,d=t=>{let n=t===1,r=n?zt:Bt,i=n?It:Lt,a=n?Nt:Pt;return{_qualify:e=>a.test(e),_match:sn((e,t)=>{let n=gt.exec(t.prevCapture??``),i=t.list??(!t.inline&&!t.simple);if(n&&i){let t=(n[1]||``)+e;return r.exec(t)}return null}),_order:Se.HIGH,_parse(e,t,r){let o=e[2],s=n?+o.slice(0,-1):void 0,c=e[0].replace(Oe,`
|
|
16
|
+
`).match(i);if(!c)return{items:[],ordered:n,start:s};let l=!1;return{items:c.map((e,n)=>{let i=a.exec(e),o=i?i[0].length:0,s=RegExp(`^ {1,${o}}`,`gm`),u=e.replace(s,``).replace(a,``),d=n===c.length-1,f=u.indexOf(`
|
|
17
|
+
|
|
18
|
+
`)!==-1||d&&l;l=f;let p=r.inline,m=r.list;r.list=!0;let h;f?(r.inline=!1,h=`${Vt(u)}\n\n`):(r.inline=!0,h=Vt(u));let g=t(h,r);return r.inline=p,r.list=m,g}),ordered:n,start:s}},_render(t,n,r={}){let i=t.ordered?`ol`:`ul`,a={key:r.key};return t.ordered&&t.start!=null&&(a.start=t.start),e(i,a,...t.items.map((t,i)=>e(`li`,{key:i},n(t,r))))}}},f=(e,t)=>{if(t.inline||t.simple||t.inHTML&&e.indexOf(`
|
|
19
|
+
|
|
20
|
+
`)===-1&&t.prevCapture?.indexOf(`
|
|
21
|
+
|
|
22
|
+
`)===-1)return null;let n=0;for(;;){let t=e.indexOf(`
|
|
23
|
+
`,n),r=e.slice(n,t===-1?void 0:t+1);if(vn(s,r)||t===-1||!r.trim())break;n=t+1}let r=e.slice(0,n);if(r===``)return null;let i=Vt(r);return i===``?null:[r,void 0,i]};return{[I.blockQuote]:{_qualify:[`>`],_match:un(ke),_order:Se.HIGH,_parse(e,t,n){let r=e[0].replace(Ae,``).match(je),i=r?.[1],a=r?.[2]??``;return{alert:i,children:a.indexOf(`
|
|
24
|
+
`)===-1?fn(t,a,n):mn(t,a,n)}},_render(t,n,r={}){let i={key:r.key};return t.alert&&(i.className=`markdown-alert-${c(t.alert.toLowerCase())}`,t.children.unshift({attrs:{},children:[{type:I.text,text:t.alert}],noInnerParse:!0,type:I.htmlBlock,tag:`header`})),e(`blockquote`,i,n(t.children,r))}},[I.breakLine]:{_qualify:[` `],_match:dn(Me),_order:Se.HIGH,_parse:gn,_render(t,n,r={}){return e(`br`,{key:r.key})}},[I.breakThematic]:{_qualify:[`--`,`__`,`**`,`- `,`* `,`_ `],_match:un(Ne),_order:Se.HIGH,_parse:gn,_render(t,n,r={}){return e(`hr`,{key:r.key})}},[I.codeBlock]:{_qualify:[` `],_match:un(Fe),_order:Se.MAX,_parse(e){return{type:I.codeBlock,lang:void 0,text:Wt(Vt(e[0].replace(/^ {4}/gm,``)))}},_render(t,n,r={}){let i={...t.attrs??{}},a=t.lang?`lang-${t.lang}`:`lang-plaintext`;return i.className=i.className?`${i.className} ${a}`:a,t.lang&&!i.lang&&(i.lang=t.lang),e(`pre`,{key:r.key},e(`code`,i,t.text))}},[I.codeFenced]:{_qualify:["```",`~~~`],_match:un(Pe),_order:Se.MAX,_parse(e){return{attrs:a(`code`,e[3]??``),lang:e[2]||void 0,text:e[4],type:I.codeBlock}}},[I.codeInline]:{_qualify:["`"],_match:ln(Ie),_order:Se.LOW,_parse(e){return{text:Wt(e[2])}},_render(t,n,r={}){return e(`code`,{key:r.key},t.text)}},[I.footnote]:{_qualify:[`[^`],_match:un(ze),_order:Se.MAX,_parse(e){return r.push({footnote:e[2],identifier:e[1]}),{}},_render:_n},[I.footnoteReference]:{_qualify:[`[^`],_match:cn(Be),_order:Se.HIGH,_parse(e){return{target:`#${c(e[1])}`,text:e[1]}},_render(t,n,r={}){return e(`a`,{key:r.key,href:l(t.target,`a`,`href`)??void 0},e(`sup`,{key:r.key},t.text))}},[I.gfmTask]:{_qualify:[`[ ]`,`[x]`],_match:cn(Ue),_order:Se.HIGH,_parse(e){return{completed:e[1].toLowerCase()===`x`}},_render(t,n,r={}){return e(`input`,{checked:t.completed,key:r.key,readOnly:!0,type:`checkbox`})}},[I.heading]:{_qualify:[`#`],_match:un(n.enforceAtxHeadings?Ge:We),_order:Se.HIGH,_parse(e,t,n){return{children:fn(t,e[2],n),id:c(e[2]),level:e[1].length}},_render(t,n,r={}){return e(`h${t.level}`,{id:t.id,key:r.key},n(t.children,r))}},[I.headingSetext]:{_qualify:e=>{let t=e.indexOf(`
|
|
25
|
+
`);return t>0&&t<e.length-1&&(e[t+1]===`=`||e[t+1]===`-`)},_match:un(Ke),_order:Se.MAX,_parse(e,t,n){return{children:fn(t,e[1],n),level:e[2]===`=`?1:2,type:I.heading}}},[I.htmlBlock]:{_qualify:e=>{if(n.disableParsingRawHTML)return!1;let t=e.match(/^ *<([a-z][a-z0-9:-]*)\b/i);if(!t)return!1;let r=t[1];return e.toLowerCase().indexOf(`</${r.toLowerCase()}>`)!==-1},_match:dn(qe),_order:Se.HIGH,_parse(e,t,n){let r=e[3].match(ht)?.[1]??``,i=Zt(e[3],r),s=o(i)?mn:fn,c=e[1].trim(),l=Te.indexOf(c.toLowerCase())!==-1,u=l?c.toLowerCase():c,d={attrs:a(u,e[2]??``),noInnerParse:l,tag:u};if(n.inAnchor=n.inAnchor||c.toLowerCase()===`a`,l)d.text=e[3];else{let e=n.inHTML;n.inHTML=!0,d.children=s(t,i,n),n.inHTML=e}return n.inAnchor=!1,d},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}},t.text??(t.children?n(t.children,r):``))}},[I.htmlComment]:{_qualify:[`<!`],_match:dn(Ye),_order:Se.HIGH,_parse:gn,_render:_n},[I.htmlSelfClosing]:{_qualify:e=>n.disableParsingRawHTML?!1:/^ *<([a-zA-Z][a-zA-Z0-9:]*)[\s>/]/.test(e),_match:dn(Ze),_order:Se.HIGH,_parse(e){let t=e[1].trim();return{attrs:a(t,e[2]||``),tag:t}},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}})}},[I.customComponent]:{_qualify:e=>/^ *<([A-Z][a-zA-Z0-9]*)/.test(e),_match:dn(Qe),_order:Se.MAX,_parse(e,t,n){let r=e[3].match(ht)?.[1]??``,i=Zt(e[3],r),s=o(i)?mn:fn,c=e[1].trim(),l={attrs:a(c,e[2]??``),noInnerParse:!1,tag:c},u=n.inHTML;return n.inHTML=!0,l.children=s(t,i,n),n.inHTML=u,l},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}},t.text??(t.children?n(t.children,r):``))}},[I.paragraph]:{_match:f,_order:Se.LOW,_parse:hn,_render(t,n,r={}){return e(`p`,{key:r.key},n(t.children,r))}},[I.image]:{_qualify:[`![`],_match:ln(Sn),_order:Se.HIGH,_parse(e){return{alt:Wt(e[1]),target:Wt(e[2]),title:Wt(e[3])}},_render(t,n,r={}){return e(`img`,{key:r.key,alt:t.alt??void 0,title:t.title??void 0,src:l(t.target,`img`,`src`)??void 0})}},[I.link]:{_qualify:[`[`],_match:cn(Cn),_order:Se.LOW,_parse(e,t,n){return{children:pn(t,e[1],n),target:Wt(e[2]),title:Wt(e[3])}},_render(t,n,r={}){let i=l(t.target,`a`,`href`);return e(`a`,{key:r.key,href:i??void 0,title:t.title??void 0},n(t.children,r))}},[I.linkAngleBraceStyleDetector]:{_qualify:[`<`],_match:cn(tt),_order:Se.MAX,_parse(e){let t=e[1],n=!1;return t.indexOf(`@`)!==-1&&t.indexOf(`//`)===-1&&(n=!0,t=t.replace(`mailto:`,``)),{children:[{text:t,type:I.text}],target:n?`mailto:${t}`:t,type:I.link}}},[I.linkBareUrlDetector]:{_qualify:(e,t)=>!!(t.inline&&!t.inAnchor&&!n.disableAutoLink&&(Ht(e,`http://`)||Ht(e,`https://`))),_match:cn(et),_order:Se.MAX,_parse(e){return{children:[{text:e[1],type:I.text}],target:e[1],type:I.link}}},[I.newlineCoalescer]:{_match:un(Le),_order:Se.LOW,_parse:gn,_render(){return`
|
|
26
|
+
`}},[I.orderedList]:d(1),[I.unorderedList]:d(2),[I.ref]:{_qualify:[`[`],_match:dn(lt),_order:Se.MAX,_parse(e){return i[e[1]]={target:e[2],title:e[4]},{}},_render:_n},[I.refImage]:{_qualify:[`![`],_match:ln(ut),_order:Se.MAX,_parse(e){return{alt:e[1]?Wt(e[1]):void 0,ref:e[2]}},_render(t,n,r={}){let a=i[t.ref];return a?e(`img`,{key:r.key,alt:t.alt,src:l(a.target,`img`,`src`)??void 0,title:a.title}):null}},[I.refLink]:{_qualify:e=>e[0]===`[`&&e.indexOf(`](`)===-1,_match:cn(dt),_order:Se.MAX,_parse(e,t,n){return{children:pn(t,e[1],n),fallbackChildren:e[0],ref:e[2]}},_render(t,n,r={}){let a=i[t.ref];return a?e(`a`,{key:r.key,href:l(a.target,`a`,`href`)??void 0,title:a.title},n(t.children,r)):e(`span`,{key:r.key},t.fallbackChildren)}},[I.table]:{_qualify:[`|`],_match:un(rt),_order:Se.HIGH,_parse(e,t,n){n.inline=!0;let r=e[2]?nn(e[2]):[],i=e[3]?an(e[3],t,n):[],a=rn(e[1],t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:a,type:I.table}:{children:a.flat(),type:I.paragraph}},_render(t,n,r={}){let i=t,a=e=>i.align[e]&&i.align[e]!==`left`?{textAlign:i.align[e]}:{};return e(`table`,{key:r.key},e(`thead`,null,e(`tr`,null,...i.header.map((t,i)=>e(`th`,{key:i,style:a(i)},n(t,r))))),e(`tbody`,null,...i.cells.map((t,i)=>e(`tr`,{key:i},...t.map((t,i)=>e(`td`,{key:i,style:a(i)},n(t,r)))))))}},[I.tableSeparator]:{_match:(e,t)=>t.inTable&&e[0]===`|`?/^\|/.exec(e):null,_order:Se.HIGH,_parse(){return{type:I.tableSeparator}},_render(){return` | `}},[I.text]:{_match:sn((e,t)=>St.exec(e)||xt.exec(e)||/^[\s\S]/.exec(e)),_order:Se.MIN,_parse(e){let t=e[0];return{text:t.indexOf(`&`)===-1?t:t.replace(Je,(e,t)=>t.startsWith(`#x`)?String.fromCharCode(parseInt(t.slice(2),16)):t.startsWith(`#`)?String.fromCharCode(parseInt(t.slice(1),10)):u[t]||e)}},_render(e){return e.text}},[I.textBolded]:{_qualify:[`**`,`__`],_match:ln(Tt),_order:Se.MED,_parse(e,t,n){return{children:t(e[2],n)}},_render(t,n,r={}){return e(`strong`,{key:r.key},n(t.children,r))}},[I.textEmphasized]:{_qualify:[`*`,`_`],_match:ln(Et),_order:Se.LOW,_parse(e,t,n){return{children:t(e[2],n)}},_render(t,n,r={}){return e(`em`,{key:r.key},n(t.children,r))}},[I.textEscaped]:{_qualify:[`\\`],_match:ln(yt),_order:Se.HIGH,_parse(e){return{text:e[1],type:I.text}}},[I.textMarked]:{_qualify:[`==`],_match:ln(Dt),_order:Se.LOW,_parse:hn,_render(t,n,r={}){return e(`mark`,{key:r.key},n(t.children,r))}},[I.textStrikethroughed]:{_qualify:[`~~`],_match:ln(Ot),_order:Se.LOW,_parse:hn,_render(t,n,r={}){return e(`del`,{key:r.key},n(t.children,r))}}}},Dn=(e=``,t,n={})=>{let r=t.components??{},i=e=>t.slugify?t.slugify(e,qt):qt(e),a=Tn(t,n),o=[],s={},c=(e,n)=>{if(!n||!n.trim())return null;let r=n.match(De);return r?r.reduce((n,r)=>{let i=r.indexOf(`=`);if(i!==-1){let a=Qt(r.slice(0,i)).trim(),o=Ut(r.slice(i+1).trim()),s=Ce[a]??a;if(s===`ref`)return n;n[s]=en(e,a,o,t.sanitizer??Yt),typeof n[s]==`string`&&(qe.test(n[s])||Ze.test(n[s]))&&(n[s]=m(n[s].trim()))}else r!==`style`&&(n[Ce[r]??r]=!0);return n},{}):null},l=[ke,Pe,Fe,n.enforceAtxHeadings?Ge:We,Ke,rt,zt,Bt,Qe],u=En(a,t,n,o,s,c,e=>{let t=e.replace(mt,``),r=t.length>2048?t.slice(0,2048):t;return vn(n.disableParsingRawHTML?l:[...l,ct,qe,Ye,Ze,Qe],r)},l),d=n.disableParsingRawHTML?Object.keys(u).reduce((e,t)=>(t!==I.htmlBlock&&t!==I.htmlSelfClosing&&(e[t]=u[t]),e),{}):u,f=yn(d),p=bn(xn(d,n.renderRule)),m=e=>{let t=n.preserveFrontmatter?e:e.replace(He,``),i=n.forceInline||!n.forceBlock&&ft.test(t.replace(mt,``))===!1,o=p(f(i?t:`${Vt(t).replace(mt,``)}\n\n`,{inline:i}),{inline:i});for(;typeof o[o.length-1]==`string`&&!o[o.length-1].trim();)o.pop();if(n.wrapper===null)return o;let s=n.wrapper??(i?`span`:`div`);if(o.length>1||n.forceWrapper)return a(s,{key:`outer`},o);if(o.length===1){let e=o[0];if(typeof e==`string`){let t={key:`outer`};if(!i&&r){let n=Kt(r,`p.props`,{})??{},i=Gt(t.className,n.className),o={...t,...n};return i&&(o.className=i),a(`span`,o,e)}return a(`span`,t,e)}return e}return a(s,{key:`outer`},null)};if(typeof e!=`string`)throw console.error(`intlayer: the first argument must be a string. Received`,typeof e),Error(`intlayer: the first argument must be a string`);let h=m(e);return o.length?a(`div`,null,h,a(`footer`,{key:`footer`},...o.map(e=>a(`div`,{id:i(e.identifier),key:e.identifier},e.identifier,p(f(e.footnote,{inline:!0}),{inline:!0}))))):h};(0,m.lazy)(()=>s(()=>import(`./MarkdownRendererPlugin-BSsrjjlq.js`).then(e=>({default:e.MarkdownRendererPlugin})),[])),(0,m.lazy)(()=>s(()=>import(`./HTMLRendererPlugin-DLxXPoEg.js`).then(e=>({default:e.HTMLRendererPlugin})),__vite__mapDeps([0,1,2,3])));var On={}.INTLAYER_NODE_TYPE_INTLAYER_NODE===`false`?ce:{id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{plugins:t,...n})=>y({...n,value:n.children,children:g.editor.enabled?(0,v.jsx)(_,{...n,children:n.children}):n.children})},kn={}.INTLAYER_NODE_TYPE_REACT_NODE===`false`?ce:{id:`react-node-plugin`,canHandle:e=>typeof e==`object`&&e?.props!==void 0&&e.key!==void 0,transform:(e,{plugins:t,...n})=>y({...n,value:`[[react-element]]`,children:g.editor.enabled?(0,v.jsx)(_,{...n,children:b(e)}):b(e)})},An=(e,t)=>{let n=xe(e,t);return n.isSimple?n.parts:(0,m.createElement)(m.Fragment,null,...n.parts.map((e,t)=>(0,m.createElement)(m.Fragment,{key:t},e)))},jn={}.INTLAYER_NODE_TYPE_INSERTION===`false`?ce:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:T}],i=e[T],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,n,r)=>{let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=An(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}},o=n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]});return typeof i==`object`&&i&&`nodeType`in i&&[`enumeration`,`condition`].includes(i.nodeType)?e=>t=>{let n=o(t);return typeof n==`function`?n(e):n}:o}},Mn=ce,Nn={id:`markdown-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`markdown`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:j}],i=e[j];return n(i,{...t,children:i,keyPath:r,plugins:[Mn,...t.plugins??[]]})}},Pn=ce,Fn=(e,t=!0)=>[le(e??g.internationalization.defaultLocale,t?g.internationalization.defaultLocale:void 0),ue,de,me(e??g.internationalization.defaultLocale),he,pe,On,kn,jn,Nn,Pn].filter(Boolean),In=(e,t)=>ve(e,t,Fn(t)),Ln=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e),Rn=(e,t=g?.internationalization?.locales)=>{let n=Ln(e),r=e;e?.endsWith(`/`)&&(r=e.slice(0,-1));let i=n?new URL(r):new URL(r,`http://example.com`),a=i.pathname;a.startsWith(`/`)||(i.pathname=`/${a}`);let o=a.split(`/`),s=o[1];t?.includes(s)&&(o.splice(1,1),i.pathname=o.join(`/`)??`/`);let c=new URLSearchParams(i.search);return c.has(`locale`)&&(c.delete(`locale`),i.search=c.toString()),n?i.toString():i.toString().replace(`http://example.com`,``)},zn=`https://back.intlayer.org`,Bn=[`en`],Vn=`en`,Hn=(e={})=>{let{internationalization:t,routing:n}=g??{};return{defaultLocale:t?.defaultLocale??Vn,mode:n?.mode??`prefix-no-default`,locales:t?.locales??Bn,rewrite:n?.rewrite,...e}},Un=(e,t={})=>{let{defaultLocale:n,mode:r,locales:i}=Hn(t);return!e||!i.includes(e)?{prefix:``,localePrefix:void 0}:r===`prefix-all`||r===`prefix-no-default`&&n!==e?{prefix:`${e}/`,localePrefix:e}:{prefix:``,localePrefix:void 0}},Wn=(e,t=`url`)=>{if(e)return`url`in e?e[t]:{rules:Object.entries(e).map(([e,t])=>({canonical:e.startsWith(`/`)?e.replace(/\[([^\]]+)\]/g,`:$1`):`/${e.replace(/\[([^\]]+)\]/g,`:$1`)}`,localized:Object.fromEntries(Object.entries(t).map(([e,t])=>[e,t?.startsWith(`/`)?t.replace(/\[([^\]]+)\]/g,`:$1`):`/${(t||``).replace(/\[([^\]]+)\]/g,`:$1`)}`]))}))}},Gn=e=>{let t=e.replace(/\//g,`\\/`).replace(/\\\/:(?:[^/\\*+?]+)\*/g,`(?:\\/(.*))?`).replace(/\\\/:(?:[^/\\*+?]+)\?/g,`(?:\\/([^\\/]+))?`).replace(/:([^/\\*+?]+)\*/g,`(.*)`).replace(/:([^/\\*+?]+)\?/g,`([^\\/]*)`).replace(/:([^/\\*+?]+)\+/g,`(.+)`).replace(/:([^/\\*+?]+)/g,`([^\\/]+)`);return RegExp(`^${t}$`)},Kn=(e,t)=>{let n=0;return e.replace(/:([^/\\*+?]+)[*+?]?/g,()=>t[n++]??``).replace(/\/+/g,`/`).replace(/\/$/,``)||`/`},qn=(e,t)=>{let n=Gn(t),r=e.match(n);return r?r.slice(1):null},Jn=(e,t,n)=>{if(!n)return e;for(let r of n.rules){let{canonical:n,localized:i}=r,a=t?[t]:Object.keys(i);for(let t of a){let r=i[t];if(!r)continue;let a=qn(e,r);if(a)return Kn(n,a)}}return e},Yn=(e,t,n)=>{if(!n)return{path:e,isRewritten:!1};for(let r of n.rules){let{canonical:n,localized:i}=r,a=qn(e,n);if(a){let e=i[t];if(e)return{path:Kn(e,a),isRewritten:!0}}}return{path:e,isRewritten:!1}},Xn=(e,t=g?.internationalization?.defaultLocale,n={})=>{let{defaultLocale:r,mode:i,locales:a,rewrite:o}=Hn(n),s=Rn(e,a),c=Wn(o,`url`);if(i===`no-prefix`)return Yn(Jn(s,void 0,c),t,c).path;let l=Ln(s),u=l?new URL(s):new URL(s,`http://example.com`),d=Yn(Jn(u.pathname,void 0,c),t,c).path,f=l?`${u.protocol}//${u.host}`:``;if(i===`search-params`){let e=new URLSearchParams(u.search);e.set(`locale`,t.toString());let n=e.toString();return`${f}${n?`${d}?${n}`:d}${u.hash}`}let{prefix:p}=Un(t,{defaultLocale:r,mode:i,locales:a}),m=`/${p}${d}`.replace(/\/+/g,`/`);return m.length>1&&m.endsWith(`/`)&&(m=m.slice(0,-1)),`${f}${m}${u.search}${u.hash}`},Zn=(e,t=g?.internationalization?.locales,n=g?.internationalization?.defaultLocale)=>{let r=[e].flat(),i=e=>e.trim().toLowerCase();try{for(let e of r){let n=i(e),r=t.find(e=>i(e)===n);if(r)return r;let[a]=n.split(`-`),o=t.find(e=>i(e).split(`-`)[0]===a);if(o)return o}}catch{}return n},Qn=(e,t,n)=>{let r=[`${e}=${encodeURIComponent(t)}`];return n.path&&r.push(`Path=${n.path}`),n.domain&&r.push(`Domain=${n.domain}`),n.expires instanceof Date&&r.push(`Expires=${n.expires.toUTCString()}`),n.secure&&r.push(`Secure`),n.sameSite&&r.push(`SameSite=${n.sameSite}`),r.join(`; `)},$n=e=>{let{routing:t,internationalization:n}=g,{locales:r}=n,i=t.storage;if(e?.isCookieEnabled===!1)return;let a=e=>!!e&&r.includes(e);for(let t=0;t<i.cookies.length;t++)try{let n=e?.getCookie?.(i.cookies[t].name);if(a(n))return n}catch{}for(let t=0;t<i.localStorage.length;t++)try{let n=e?.getLocaleStorage?.(i.localStorage[t].name);if(a(n))return n}catch{}for(let t=0;t<i.sessionStorage.length;t++)try{let n=e?.getSessionStorage?.(i.sessionStorage[t].name);if(a(n))return n}catch{}},er=(e,t)=>{let{routing:n}=g,r=n.storage;if(t?.isCookieEnabled!==!1){for(let n=0;n<r.cookies.length;n++){let{name:i,attributes:a}=r.cookies[n];try{t?.setCookieStore&&t.setCookieStore(i,e,{...a,expires:a.expires instanceof Date?a.expires.getTime():a.expires})}catch{try{t?.setCookieString&&t.setCookieString(i,Qn(i,e,a))}catch{}}}if(t?.setLocaleStorage)for(let n=0;n<r.localStorage.length;n++){let{name:i}=r.localStorage[n];try{if(!(t?.overwrite??!0)&&t?.getLocaleStorage&&t.getLocaleStorage(i))continue;t.setLocaleStorage(i,e)}catch{}}if(t?.setSessionStorage)for(let n=0;n<r.sessionStorage.length;n++){let{name:i}=r.sessionStorage[n];try{if(!(t?.overwrite??!0)&&t?.getSessionStorage&&t.getSessionStorage(i))continue;t.setSessionStorage(i,e)}catch{}}}},tr={getCookie:e=>document.cookie.split(`;`).find(t=>t.trim().startsWith(`${e}=`))?.split(`=`)[1],getLocaleStorage:e=>localStorage.getItem(e),getSessionStorage:e=>sessionStorage.getItem(e),isCookieEnabled:!0,setCookieStore:(e,t,n)=>cookieStore.set({name:e,value:t,path:n.path,domain:n.domain,expires:n.expires,sameSite:n.sameSite}),setCookieString:(e,t)=>{document.cookie=t},setSessionStorage:(e,t)=>sessionStorage.setItem(e,t),setLocaleStorage:(e,t)=>localStorage.setItem(e,t)},nr=e=>{if(!e)return`ltr`;try{let t=new Intl.Locale(e);if(`getTextInfo`in t)return t.getTextInfo().direction;if(`textInfo`in t)return t.textInfo.direction;let n=t.maximize();return[`Arab`,`Hebr`,`Thaa`,`Syrc`,`Mand`,`Adlm`,`Rohg`,`Nkoo`].includes(n.script??``)?`rtl`:`ltr`}catch{return`ltr`}},rr=50,ir=new Map,ar=(e,t,n)=>{let r=t??g?.internationalization?.defaultLocale,i=`${r}|${n?JSON.stringify(n):``}`,a=ir.get(e);a||(a=new Map,ir.set(e,a));let o=a.get(i);return o||(a.size>rr&&a.clear(),o=new e(r,n),a.set(i,o)),o},or={Collator:function(e,t){return ar(Intl.Collator,e,t)},DateTimeFormat:function(e,t){return ar(Intl.DateTimeFormat,e,t)},DisplayNames:function(e,t){return ar(Intl.DisplayNames,e,t)},ListFormat:function(e,t){return ar(Intl.ListFormat,e,t)},NumberFormat:function(e,t){return ar(Intl.NumberFormat,e,t)},PluralRules:function(e,t){return ar(Intl.PluralRules,e,t)},RelativeTimeFormat:function(e,t){return ar(Intl.RelativeTimeFormat,e,t)},Segmenter:function(e,t){return ar(Intl.Segmenter,e,t)}},sr=(e,t=e)=>new or.DisplayNames(t,{type:`language`}).of(e)??`Unknown locale`,cr=e=>typeof e==`object`&&e?.key!==void 0&&e?.props!==void 0,lr=(e,t)=>e.every((e,n)=>t[n]&&t[n].key===e.key&&t[n].type===e.type),ur=$n(tr),dr=(e,t)=>er(e,{...tr,isCookieEnabled:t}),fr=(0,m.createContext)({locale:ur??g?.internationalization?.defaultLocale,setLocale:()=>null,isCookieEnabled:!0}),pr=({locale:e,defaultLocale:t,children:n,setLocale:r,disableEditor:i,isCookieEnabled:a})=>{let{internationalization:o}=g??{},{locales:s,defaultLocale:c}=o??{},[l,u]=(0,m.useState)(e??ur??t??c);(0,m.useEffect)(()=>{e&&e!==l&&u(e)},[e]);let d=r??(e=>{if(l.toString()!==e.toString()){if(!s?.map(String).includes(e)){console.error(`Locale ${e} is not available`);return}u(e),dr(e,a)}}),f=Zn(l);return(0,v.jsx)(fr.Provider,{value:{locale:f,setLocale:d,disableEditor:i},children:n})},mr=(e,t)=>{let{locale:n}=(0,m.useContext)(fr)??{};return(0,m.useMemo)(()=>In(e,t??n),[e.key,n,t])},hr=({isCookieEnabled:e,onLocaleChange:t}={})=>{let{defaultLocale:n,locales:r}=g?.internationalization??{},{locale:i,setLocale:a,isCookieEnabled:o}=(0,m.useContext)(fr)??{};return{locale:i,defaultLocale:n,availableLocales:r,setLocale:(0,m.useCallback)(n=>{if(!r?.map(String).includes(n)){console.error(`Locale ${n} is not available`);return}a(n),dr(n,e??o??!0),t?.(n)},[r,t,a,e])}},gr={createElement:m.createElement,cloneElement:m.cloneElement,Fragment:m.Fragment,normalizeProps:(e,t)=>t},_r=(e=``,t={})=>{let{createElement:n,disableAutoLink:r,disableParsingRawHTML:i,enforceAtxHeadings:a,forceBlock:o,forceInline:s,forceWrapper:c,namedCodesToUnicode:l,components:u,renderRule:d,sanitizer:f,slugify:p,wrapper:m,preserveFrontmatter:h,tagfilter:g}=t;return Dn(e,{runtime:n?{...gr,createElement:n}:gr,components:u,namedCodesToUnicode:l,sanitizer:f,slugify:p},{disableAutoLink:r,disableParsingRawHTML:i,enforceAtxHeadings:a,forceBlock:o,forceInline:s,forceWrapper:c,renderRule:d,wrapper:m,preserveFrontmatter:h,tagfilter:g})},vr=(0,m.createContext)(void 0),yr=()=>(0,m.useContext)(vr),br=(e,{components:t,wrapper:n,forceBlock:r,forceInline:i,preserveFrontmatter:a,tagfilter:o}={})=>_r(e,{components:t,forceBlock:r,forceInline:i,wrapper:n,forceWrapper:!!n,preserveFrontmatter:a,tagfilter:o}),xr=`popstate`;function Sr(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function Cr(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return Or(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:kr(t)}return jr(t,n,null,e)}function wr(e,t){if(e===!1||e==null)throw Error(t)}function Tr(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Er(){return Math.random().toString(36).substring(2,10)}function Dr(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Or(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?Ar(t):t,state:n,key:t&&t.key||r||Er(),unstable_mask:i}}function kr({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function Ar(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function jr(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=Sr(e)?e:Or(h.location,e,t);n&&n(r,e),l=u()+1;let d=Dr(r,l),f=h.createHref(r.unstable_mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=Sr(e)?e:Or(h.location,e,t);n&&n(r,e),l=u();let i=Dr(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return Mr(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(xr,d),c=e,()=>{i.removeEventListener(xr,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function Mr(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),wr(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:kr(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function Nr(e,t,n=`/`){return Pr(e,t,n,!1)}function Pr(e,t,n,r){let i=Qr((typeof t==`string`?Ar(t):t).pathname||`/`,n);if(i==null)return null;let a=Ir(e);Rr(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=Zr(i);o=Jr(a[e],t,r)}return o}function Fr(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function Ir(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;wr(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=oi([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(wr(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Ir(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Kr(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of Lr(e.path))a(e,t,!0,n)}),t}function Lr(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Lr(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function Rr(e){e.sort((e,t)=>e.score===t.score?qr(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var zr=/^:[\w-]+$/,Br=3,Vr=2,Hr=1,Ur=10,Wr=-2,Gr=e=>e===`*`;function Kr(e,t){let n=e.split(`/`),r=n.length;return n.some(Gr)&&(r+=Wr),t&&(r+=Vr),n.filter(e=>!Gr(e)).reduce((e,t)=>e+(zr.test(t)?Br:t===``?Hr:Ur),r)}function qr(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Jr(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=Yr({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=Yr({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:oi([a,u.pathname]),pathnameBase:si(oi([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=oi([a,u.pathnameBase]))}return o}function Yr(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Xr(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Xr(e,t=!1,n=!0){Tr(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Zr(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Tr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Qr(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var $r=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ei(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Ar(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?ti(n.substring(1),`/`):ti(n,t)):a=t,{pathname:a,search:ci(r),hash:li(i)}}function ti(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function ni(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ri(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ii(e){let t=ri(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function ai(e,t,n,r=!1){let i;typeof e==`string`?i=Ar(e):(i={...e},wr(!i.pathname||!i.pathname.includes(`?`),ni(`?`,`pathname`,`search`,i)),wr(!i.pathname||!i.pathname.includes(`#`),ni(`#`,`pathname`,`hash`,i)),wr(!i.search||!i.search.includes(`#`),ni(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=ei(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var oi=e=>e.join(`/`).replace(/\/\/+/g,`/`),si=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),ci=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,li=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,ui=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function di(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function fi(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var pi=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function mi(e,t){let n=e;if(typeof n!=`string`||!$r.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(pi)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=Qr(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{Tr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var hi=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(hi);var gi=[`GET`,...hi];new Set(gi);var _i=m.createContext(null);_i.displayName=`DataRouter`;var vi=m.createContext(null);vi.displayName=`DataRouterState`;var yi=m.createContext(!1),bi=m.createContext({isTransitioning:!1});bi.displayName=`ViewTransition`;var xi=m.createContext(new Map);xi.displayName=`Fetchers`;var Si=m.createContext(null);Si.displayName=`Await`;var Ci=m.createContext(null);Ci.displayName=`Navigation`;var wi=m.createContext(null);wi.displayName=`Location`;var Ti=m.createContext({outlet:null,matches:[],isDataRoute:!1});Ti.displayName=`Route`;var Ei=m.createContext(null);Ei.displayName=`RouteError`;var Di=`REACT_ROUTER_ERROR`,Oi=`REDIRECT`,ki=`ROUTE_ERROR_RESPONSE`;function Ai(e){if(e.startsWith(`${Di}:${Oi}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function ji(e){if(e.startsWith(`${Di}:${ki}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new ui(t.status,t.statusText,t.data)}catch{}}function Mi(e,{relative:t}={}){wr(Ni(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=m.useContext(Ci),{hash:i,pathname:a,search:o}=zi(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:oi([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Ni(){return m.useContext(wi)!=null}function Pi(){return wr(Ni(),`useLocation() may be used only in the context of a <Router> component.`),m.useContext(wi).location}var Fi=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Ii(e){m.useContext(Ci).static||m.useLayoutEffect(e)}function Li(){let{isDataRoute:e}=m.useContext(Ti);return e?ia():Ri()}function Ri(){wr(Ni(),`useNavigate() may be used only in the context of a <Router> component.`);let e=m.useContext(_i),{basename:t,navigator:n}=m.useContext(Ci),{matches:r}=m.useContext(Ti),{pathname:i}=Pi(),a=JSON.stringify(ii(r)),o=m.useRef(!1);return Ii(()=>{o.current=!0}),m.useCallback((r,s={})=>{if(Tr(o.current,Fi),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=ai(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:oi([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}m.createContext(null);function zi(e,{relative:t}={}){let{matches:n}=m.useContext(Ti),{pathname:r}=Pi(),i=JSON.stringify(ii(n));return m.useMemo(()=>ai(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Bi(e,t){return Vi(e,t)}function Vi(e,t,n){wr(Ni(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=m.useContext(Ci),{matches:i}=m.useContext(Ti),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;oa(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
27
|
+
|
|
28
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=Pi(),d;if(t){let e=typeof t==`string`?Ar(t):t;wr(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=Nr(e,{pathname:p});Tr(l||h!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Tr(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=Ji(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:oi([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:oi([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?m.createElement(wi.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},g):g}function Hi(){let e=ra(),t=di(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=m.createElement(m.Fragment,null,m.createElement(`p`,null,`💿 Hey developer 👋`),m.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,m.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,m.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),m.createElement(m.Fragment,null,m.createElement(`h2`,null,`Unexpected Application Error!`),m.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?m.createElement(`pre`,{style:i},n):null,o)}var Ui=m.createElement(Hi,null),Wi=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=ji(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:m.createElement(Ti.Provider,{value:this.props.routeContext},m.createElement(Ei.Provider,{value:e,children:this.props.component}));return this.context?m.createElement(Ki,{error:e},t):t}};Wi.contextType=yi;var Gi=new WeakMap;function Ki({children:e,error:t}){let{basename:n}=m.useContext(Ci);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Ai(t.digest);if(e){let r=Gi.get(t);if(r)throw r;let i=mi(e.location,n);if(pi&&!Gi.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Gi.set(t,n),n}return m.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function qi({routeContext:e,match:t,children:n}){let r=m.useContext(_i);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(Ti.Provider,{value:e},n)}function Ji(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);wr(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:fi(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Ui,o&&(s<0&&c===0?(oa(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=u?f:d?p:n.route.Component?m.createElement(n.route.Component,null):n.route.element?n.route.element:e,m.createElement(qi,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?m.createElement(Wi,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:l}):g()},null)}function Yi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Xi(e){let t=m.useContext(_i);return wr(t,Yi(e)),t}function Zi(e){let t=m.useContext(vi);return wr(t,Yi(e)),t}function Qi(e){let t=m.useContext(Ti);return wr(t,Yi(e)),t}function $i(e){let t=Qi(e),n=t.matches[t.matches.length-1];return wr(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function ea(){return $i(`useRouteId`)}function ta(){return Zi(`useNavigation`).navigation}function na(){let{matches:e,loaderData:t}=Zi(`useMatches`);return m.useMemo(()=>e.map(e=>Fr(e,t)),[e,t])}function ra(){let e=m.useContext(Ei),t=Zi(`useRouteError`),n=$i(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ia(){let{router:e}=Xi(`useNavigate`),t=$i(`useNavigate`),n=m.useRef(!1);return Ii(()=>{n.current=!0}),m.useCallback(async(r,i={})=>{Tr(n.current,Fi),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var aa={};function oa(e,t,n){!t&&!aa[e]&&(aa[e]=!0,Tr(!1,n))}m.useOptimistic,m.memo(sa);function sa({routes:e,future:t,state:n,isStatic:r,onError:i}){return Vi(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function ca(e){wr(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function la({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){wr(!Ni(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=m.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Ar(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:h}=n,g=m.useMemo(()=>{let e=Qr(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,unstable_mask:h},navigationType:r}},[s,l,u,d,f,p,r,h]);return Tr(g!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:m.createElement(Ci.Provider,{value:c},m.createElement(wi.Provider,{children:t,value:g}))}function ua({children:e,location:t}){return Bi(da(e),t)}m.Component;function da(e,t=[]){let n=[];return m.Children.forEach(e,(e,r)=>{if(!m.isValidElement(e))return;let i=[...t,r];if(e.type===m.Fragment){n.push.apply(n,da(e.props.children,i));return}wr(e.type===ca,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),wr(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=da(e.props.children,i)),n.push(a)}),n}var fa=`get`,pa=`application/x-www-form-urlencoded`;function ma(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function ha(e){return ma(e)&&e.tagName.toLowerCase()===`button`}function ga(e){return ma(e)&&e.tagName.toLowerCase()===`form`}function _a(e){return ma(e)&&e.tagName.toLowerCase()===`input`}function va(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ya(e,t){return e.button===0&&(!t||t===`_self`)&&!va(e)}var ba=null;function xa(){if(ba===null)try{new FormData(document.createElement(`form`),0),ba=!1}catch{ba=!0}return ba}var Sa=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Ca(e){return e!=null&&!Sa.has(e)?(Tr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${pa}"`),null):e}function wa(e,t){let n,r,i,a,o;if(ga(e)){let o=e.getAttribute(`action`);r=o?Qr(o,t):null,n=e.getAttribute(`method`)||fa,i=Ca(e.getAttribute(`enctype`))||pa,a=new FormData(e)}else if(ha(e)||_a(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Qr(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||fa,i=Ca(e.getAttribute(`formenctype`))||Ca(o.getAttribute(`enctype`))||pa,a=new FormData(o,e),!xa()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(ma(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=fa,r=null,i=pa,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ta={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Ea=/[&><\u2028\u2029]/g;function Da(e){return e.replace(Ea,e=>Ta[e])}function Oa(e,t){if(e===!1||e==null)throw Error(t)}function ka(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&Qr(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function Aa(e,t){if(e.id in t)return t[e.id];try{let n=await s(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ja(e){return e!=null&&typeof e.page==`string`}function Ma(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Na(e,t,n){return Ra((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Aa(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Ma).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Pa(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Fa(e,t,{includeHydrateFallback:n}={}){return Ia(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Ia(e){return[...new Set(e)]}function La(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ra(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!ja(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(La(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function za(){let e=m.useContext(_i);return Oa(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Ba(){let e=m.useContext(vi);return Oa(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Va=m.createContext(void 0);Va.displayName=`FrameworkContext`;function Ha(){let e=m.useContext(Va);return Oa(e,`You must render this element inside a <HydratedRouter> element`),e}function Ua(e,t){let n=m.useContext(Va),[r,i]=m.useState(!1),[a,o]=m.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=m.useRef(null);m.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),m.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Wa(s,p),onBlur:Wa(c,h),onMouseEnter:Wa(l,p),onMouseLeave:Wa(u,h),onTouchStart:Wa(d,p)}]:[a,f,{}]:[!1,f,{}]}function Wa(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ga({page:e,...t}){let{router:n}=za(),r=m.useMemo(()=>Nr(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?m.createElement(qa,{page:e,matches:r,...t}):null}function Ka(e){let{manifest:t,routeModules:n}=Ha(),[r,i]=m.useState([]);return m.useEffect(()=>{let r=!1;return Na(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function qa({page:e,matches:t,...n}){let r=Pi(),{future:i,manifest:a,routeModules:o}=Ha(),{basename:s}=za(),{loaderData:c,matches:l}=Ba(),u=m.useMemo(()=>Pa(e,t,l,a,r,`data`),[e,t,l,a,r]),d=m.useMemo(()=>Pa(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=m.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=ka(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=m.useMemo(()=>Fa(d,a),[d,a]),h=Ka(d);return m.createElement(m.Fragment,null,f.map(e=>m.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>m.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>m.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Ja(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}m.Component;var Ya=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Ya&&(window.__reactRouterVersion=`7.13.1`)}catch{}function Xa({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=m.useRef();i.current??=Cr({window:r,v5Compat:!0});let a=i.current,[o,s]=m.useState({action:a.action,location:a.location}),c=m.useCallback(e=>{n===!1?s(e):m.startTransition(()=>s(e))},[n]);return m.useLayoutEffect(()=>a.listen(c),[a,c]),m.createElement(la,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function Za({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=m.useState({action:n.action,location:n.location}),o=m.useCallback(e=>{r===!1?a(e):m.startTransition(()=>a(e))},[r]);return m.useLayoutEffect(()=>n.listen(o),[n,o]),m.createElement(la,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}Za.displayName=`unstable_HistoryRouter`;var Qa=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$a=m.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},h){let{basename:g,navigator:_,unstable_useTransitions:v}=m.useContext(Ci),y=typeof l==`string`&&Qa.test(l),b=mi(l,g);l=b.to;let x=Mi(l,{relative:r}),S=Pi(),C=null;if(o){let e=ai(o,[],S.unstable_mask?S.unstable_mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:oi([g,e.pathname])),C=_.createHref(e)}let[w,T,E]=Ua(n,p),D=oo(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=m.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:Ja(h,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?m.createElement(m.Fragment,null,A,m.createElement(Ga,{page:x})):A});$a.displayName=`Link`;var eo=m.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=zi(a,{relative:c.relative}),d=Pi(),f=m.useContext(vi),{navigator:p,basename:h}=m.useContext(Ci),g=f!=null&&L(u)&&o===!0,_=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=Qr(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return m.createElement($a,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});eo.displayName=`NavLink`;var to=m.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=fa,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},h)=>{let{unstable_useTransitions:g}=m.useContext(Ci),_=lo(),v=uo(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&Qa.test(s);return m.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});g&&n!==!1?m.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});to.displayName=`Form`;function no({getKey:e,storageKey:t,...n}){let r=m.useContext(Va),{basename:i}=m.useContext(Ci),a=Pi(),o=na();ho({getKey:e,storageKey:t});let s=m.useMemo(()=>{if(!r||!e)return null;let t=mo(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return m.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Da(JSON.stringify(t||fo))}, ${Da(JSON.stringify(s))})`}})}no.displayName=`ScrollRestoration`;function ro(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function io(e){let t=m.useContext(_i);return wr(t,ro(e)),t}function ao(e){let t=m.useContext(vi);return wr(t,ro(e)),t}function oo(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=Li(),d=Pi(),f=zi(e,{relative:o});return m.useCallback(p=>{if(ya(p,t)){p.preventDefault();let t=n===void 0?kr(d)===kr(f):n,h=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?m.startTransition(()=>h()):h()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var so=0,co=()=>`__${String(++so)}__`;function lo(){let{router:e}=io(`useSubmit`),{basename:t}=m.useContext(Ci),n=ea(),r=e.fetch,i=e.navigate;return m.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=wa(e,t);a.navigate===!1?await r(a.fetcherKey||co(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function uo(e,{relative:t}={}){let{basename:n}=m.useContext(Ci),r=m.useContext(Ti);wr(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...zi(e||`.`,{relative:t})},o=Pi();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:oi([n,a.pathname])),kr(a)}var fo=`react-router-scroll-positions`,po={};function mo(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:Qr(e.pathname,n)||e.pathname},t)),i??=e.key,i}function ho({getKey:e,storageKey:t}={}){let{router:n}=io(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=ao(`useScrollRestoration`),{basename:a}=m.useContext(Ci),o=Pi(),s=na(),c=ta();m.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),go(m.useCallback(()=>{if(c.state===`idle`){let t=mo(o,s,a,e);po[t]=window.scrollY}try{sessionStorage.setItem(t||fo,JSON.stringify(po))}catch(e){Tr(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(m.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||fo);e&&(po=JSON.parse(e))}catch{}},[t]),m.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(po,()=>window.scrollY,e?(t,n)=>mo(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),m.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{Tr(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function go(e,t){let{capture:n}=t||{};m.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function L(e,{relative:t}={}){let n=m.useContext(bi);wr(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=io(`useViewTransitionState`),i=zi(e,{relative:t});if(!n.isTransitioning)return!1;let a=Qr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Qr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Yr(i.pathname,o)!=null||Yr(i.pathname,a)!=null}function _o(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=_o(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function vo(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_o(e))&&(r&&(r+=` `),r+=t);return r}var yo=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},bo=(e,t)=>({classGroupId:e,validator:t}),xo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),So=`-`,Co=[],wo=`arbitrary..`,To=e=>{let t=Oo(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Do(e);let n=e.split(So);return Eo(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?yo(i,t):t:i||Co}return n[e]||Co}}},Eo=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Eo(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(So):e.slice(t).join(So),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Do=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?wo+r:void 0})(),Oo=e=>{let{theme:t,classGroups:n}=e;return ko(n,t)},ko=(e,t)=>{let n=xo();for(let r in e){let i=e[r];Ao(i,n,r,t)}return n},Ao=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];jo(i,t,n,r)}},jo=(e,t,n,r)=>{if(typeof e==`string`){Mo(e,t,n);return}if(typeof e==`function`){No(e,t,n,r);return}Po(e,t,n,r)},Mo=(e,t,n)=>{let r=e===``?t:Fo(t,e);r.classGroupId=n},No=(e,t,n,r)=>{if(Io(e)){Ao(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(bo(n,e))},Po=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Ao(o,Fo(t,a),n,r)}},Fo=(e,t)=>{let n=e,r=t.split(So),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=xo(),n.nextPart.set(t,i)),n=i}return n},Io=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Lo=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Ro=`!`,zo=`:`,Bo=[],Vo=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Ho=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===zo){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Ro)?(c=s.slice(0,-1),l=!0):s.startsWith(Ro)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Vo(t,l,c,u)};if(t){let e=t+zo,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Vo(Bo,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Uo=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Wo=e=>({cache:Lo(e.cacheSize),parseClassName:Ho(e),sortModifiers:Uo(e),...To(e)}),Go=/\s+/,Ko=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Go),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+Ro:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},qo=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Jo(n))&&(i&&(i+=` `),i+=r);return i},Jo=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Jo(e[r]))&&(n&&(n+=` `),n+=t);return n},Yo=(e,...t)=>{let n,r,i,a,o=o=>(n=Wo(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Ko(e,n);return i(e,a),a};return a=o,(...e)=>a(qo(...e))},Xo=[],Zo=e=>{let t=t=>t[e]||Xo;return t.isThemeGetter=!0,t},Qo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$o=/^\((?:(\w[\w-]*):)?(.+)\)$/i,es=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ts=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ns=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rs=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,is=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,as=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,os=e=>es.test(e),ss=e=>!!e&&!Number.isNaN(Number(e)),cs=e=>!!e&&Number.isInteger(Number(e)),ls=e=>e.endsWith(`%`)&&ss(e.slice(0,-1)),us=e=>ts.test(e),ds=()=>!0,fs=e=>ns.test(e)&&!rs.test(e),ps=()=>!1,ms=e=>is.test(e),hs=e=>as.test(e),gs=e=>!R(e)&&!z(e),_s=e=>Ms(e,Is,ps),R=e=>Qo.test(e),vs=e=>Ms(e,Ls,fs),ys=e=>Ms(e,Rs,ss),bs=e=>Ms(e,Bs,ds),xs=e=>Ms(e,zs,ps),Ss=e=>Ms(e,Ps,ps),Cs=e=>Ms(e,Fs,hs),ws=e=>Ms(e,Vs,ms),z=e=>$o.test(e),Ts=e=>Ns(e,Ls),Es=e=>Ns(e,zs),Ds=e=>Ns(e,Ps),Os=e=>Ns(e,Is),ks=e=>Ns(e,Fs),As=e=>Ns(e,Vs,!0),js=e=>Ns(e,Bs,!0),Ms=(e,t,n)=>{let r=Qo.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ns=(e,t,n=!1)=>{let r=$o.exec(e);return r?r[1]?t(r[1]):n:!1},Ps=e=>e===`position`||e===`percentage`,Fs=e=>e===`image`||e===`url`,Is=e=>e===`length`||e===`size`||e===`bg-size`,Ls=e=>e===`length`,Rs=e=>e===`number`,zs=e=>e===`family-name`,Bs=e=>e===`number`||e===`weight`,Vs=e=>e===`shadow`,Hs=Yo(()=>{let e=Zo(`color`),t=Zo(`font`),n=Zo(`text`),r=Zo(`font-weight`),i=Zo(`tracking`),a=Zo(`leading`),o=Zo(`breakpoint`),s=Zo(`container`),c=Zo(`spacing`),l=Zo(`radius`),u=Zo(`shadow`),d=Zo(`inset-shadow`),f=Zo(`text-shadow`),p=Zo(`drop-shadow`),m=Zo(`blur`),h=Zo(`perspective`),g=Zo(`aspect`),_=Zo(`ease`),v=Zo(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),z,R],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[z,R,c],T=()=>[os,`full`,`auto`,...w()],E=()=>[cs,`none`,`subgrid`,z,R],D=()=>[`auto`,{span:[`full`,cs,z,R]},cs,z,R],O=()=>[cs,`auto`,z,R],k=()=>[`auto`,`min`,`max`,`fr`,z,R],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[os,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[os,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],te=()=>[os,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,z,R],F=()=>[...b(),Ds,Ss,{position:[z,R]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,Os,_s,{size:[z,R]}],ie=()=>[ls,Ts,vs],ae=()=>[``,`none`,`full`,l,z,R],oe=()=>[``,ss,Ts,vs],se=()=>[`solid`,`dashed`,`dotted`,`double`],ce=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],le=()=>[ss,ls,Ds,Ss],ue=()=>[``,`none`,m,z,R],de=()=>[`none`,ss,z,R],fe=()=>[`none`,ss,z,R],pe=()=>[ss,z,R],me=()=>[os,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[us],breakpoint:[us],color:[ds],container:[us],"drop-shadow":[us],ease:[`in`,`out`,`in-out`],font:[gs],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[us],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[us],shadow:[us],spacing:[`px`,ss],text:[us],"text-shadow":[us],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,os,R,z,g]}],container:[`container`],columns:[{columns:[ss,R,z,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[cs,`auto`,z,R]}],basis:[{basis:[os,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[ss,os,`auto`,`initial`,`none`,R]}],grow:[{grow:[``,ss,z,R]}],shrink:[{shrink:[``,ss,z,R]}],order:[{order:[cs,`first`,`last`,`none`,z,R]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...te()]}],"min-block-size":[{"min-block":[`auto`,...te()]}],"max-block-size":[{"max-block":[`none`,...te()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,Ts,vs]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,js,bs]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ls,R]}],"font-family":[{font:[Es,xs,t]}],"font-features":[{"font-features":[R]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,z,R]}],"line-clamp":[{"line-clamp":[ss,`none`,z,ys]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,z,R]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,z,R]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...se(),`wavy`]}],"text-decoration-thickness":[{decoration:[ss,`from-font`,`auto`,z,vs]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[ss,`auto`,z,R]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,z,R]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,z,R]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},cs,z,R],radial:[``,z,R],conic:[cs,z,R]},ks,Cs]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-bs":[{"border-bs":oe()}],"border-w-be":[{"border-be":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...se(),`hidden`,`none`]}],"divide-style":[{divide:[...se(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...se(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[ss,z,R]}],"outline-w":[{outline:[``,ss,Ts,vs]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,As,ws]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,As,ws]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:oe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[ss,vs]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,As,ws]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[ss,z,R]}],"mix-blend":[{"mix-blend":[...ce(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[ss]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[z,R]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[ss]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,z,R]}],filter:[{filter:[``,`none`,z,R]}],blur:[{blur:ue()}],brightness:[{brightness:[ss,z,R]}],contrast:[{contrast:[ss,z,R]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,As,ws]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,ss,z,R]}],"hue-rotate":[{"hue-rotate":[ss,z,R]}],invert:[{invert:[``,ss,z,R]}],saturate:[{saturate:[ss,z,R]}],sepia:[{sepia:[``,ss,z,R]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,z,R]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[ss,z,R]}],"backdrop-contrast":[{"backdrop-contrast":[ss,z,R]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,ss,z,R]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ss,z,R]}],"backdrop-invert":[{"backdrop-invert":[``,ss,z,R]}],"backdrop-opacity":[{"backdrop-opacity":[ss,z,R]}],"backdrop-saturate":[{"backdrop-saturate":[ss,z,R]}],"backdrop-sepia":[{"backdrop-sepia":[``,ss,z,R]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,z,R]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[ss,`initial`,z,R]}],ease:[{ease:[`linear`,`initial`,_,z,R]}],delay:[{delay:[ss,z,R]}],animate:[{animate:[`none`,v,z,R]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,z,R]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:fe()}],"scale-x":[{"scale-x":fe()}],"scale-y":[{"scale-y":fe()}],"scale-z":[{"scale-z":fe()}],"scale-3d":[`scale-3d`],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[z,R,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:me()}],"translate-x":[{"translate-x":me()}],"translate-y":[{"translate-y":me()}],"translate-z":[{"translate-z":me()}],"translate-none":[`translate-none`],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,z,R]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,z,R]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[ss,Ts,vs,ys]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),B=(...e)=>Hs(vo(e));typeof window<`u`&&window.document&&window.document.createElement;function Us(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Ws(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Gs(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ws(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ws(e[t],null)}}}}function Ks(...e){return m.useCallback(Gs(...e),e)}function qs(e,t){let n=m.createContext(t),r=e=>{let{children:t,...r}=e,i=m.useMemo(()=>r,Object.values(r));return(0,v.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=m.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function Js(e,t=[]){let n=[];function r(t,r){let i=m.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=m.useMemo(()=>o,Object.values(o));return(0,v.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=m.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>m.createContext(e));return function(n){let r=n?.[e]||t;return m.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Ys(i,...t)]}function Ys(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function Xs(e){let t=Zs(e),n=m.forwardRef((e,n)=>{let{children:r,...i}=e,a=m.Children.toArray(r),o=a.find($s);if(o){let e=o.props.children,r=a.map(t=>t===o?m.Children.count(e)>1?m.Children.only(null):m.isValidElement(e)?e.props.children:null:t);return(0,v.jsx)(t,{...i,ref:n,children:m.isValidElement(e)?m.cloneElement(e,void 0,r):null})}return(0,v.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Zs(e){let t=m.forwardRef((e,t)=>{let{children:n,...r}=e;if(m.isValidElement(n)){let e=tc(n),i=ec(r,n.props);return n.type!==m.Fragment&&(i.ref=t?Gs(t,e):e),m.cloneElement(n,i)}return m.Children.count(n)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qs=Symbol(`radix.slottable`);function $s(e){return m.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Qs}function ec(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function tc(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)}function nc(e){let t=e+`CollectionProvider`,[n,r]=Js(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=m.useRef(null),a=m.useRef(new Map).current;return(0,v.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Xs(s),l=m.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,v.jsx)(c,{ref:Ks(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Xs(u),p=m.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=m.useRef(null),s=Ks(t,o),c=a(u,n);return m.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,v.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function h(t){let n=a(e+`CollectionConsumer`,t);return m.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},h,r]}var rc=e(d(),1),V=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Xs(`Primitive.${t}`),r=m.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,v.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ic(e,t){e&&rc.flushSync(()=>e.dispatchEvent(t))}function ac(e){let t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...e)=>t.current?.(...e),[])}function oc(e,t=globalThis?.document){let n=ac(e);m.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var sc=`DismissableLayer`,cc=`dismissableLayer.update`,lc=`dismissableLayer.pointerDownOutside`,uc=`dismissableLayer.focusOutside`,dc,fc=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),pc=m.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=m.useContext(fc),[u,d]=m.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=m.useState({}),h=Ks(t,e=>d(e)),g=Array.from(l.layers),[_]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(_),b=u?g.indexOf(u):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=gc(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!S||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),w=_c(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return oc(e=>{b===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),m.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(dc=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),vc(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=dc)}},[u,f,n,l]),m.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),vc())},[u,l]),m.useEffect(()=>{let e=()=>p({});return document.addEventListener(cc,e),()=>document.removeEventListener(cc,e)},[]),(0,v.jsx)(V.div,{...c,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:Us(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Us(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Us(e.onPointerDownCapture,C.onPointerDownCapture)})});pc.displayName=sc;var mc=`DismissableLayerBranch`,hc=m.forwardRef((e,t)=>{let n=m.useContext(fc),r=m.useRef(null),i=Ks(t,r);return m.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,v.jsx)(V.div,{...e,ref:i})});hc.displayName=mc;function gc(e,t=globalThis?.document){let n=ac(e),r=m.useRef(!1),i=m.useRef(()=>{});return m.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){yc(lc,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function _c(e,t=globalThis?.document){let n=ac(e),r=m.useRef(!1);return m.useEffect(()=>{let e=e=>{e.target&&!r.current&&yc(uc,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function vc(){let e=new CustomEvent(cc);document.dispatchEvent(e)}function yc(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ic(i,a):i.dispatchEvent(a)}var bc=pc,xc=hc,Sc=globalThis?.document?m.useLayoutEffect:()=>{},Cc=`Portal`,wc=m.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=m.useState(!1);Sc(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?rc.createPortal((0,v.jsx)(V.div,{...r,ref:t}),o):null});wc.displayName=Cc;function Tc(e,t){return m.useReducer((e,n)=>t[e][n]??e,e)}var Ec=e=>{let{present:t,children:n}=e,r=Dc(t),i=typeof n==`function`?n({present:r.isPresent}):m.Children.only(n),a=Ks(r.ref,kc(i));return typeof n==`function`||r.isPresent?m.cloneElement(i,{ref:a}):null};Ec.displayName=`Presence`;function Dc(e){let[t,n]=m.useState(),r=m.useRef(null),i=m.useRef(e),a=m.useRef(`none`),[o,s]=Tc(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return m.useEffect(()=>{let e=Oc(r.current);a.current=o===`mounted`?e:`none`},[o]),Sc(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Oc(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Sc(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Oc(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Oc(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:m.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Oc(e){return e?.animationName||`none`}function kc(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)}var Ac=m.useInsertionEffect||Sc;function jc({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Mc({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=m.useRef(e!==void 0);m.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,m.useCallback(t=>{if(s){let n=Nc(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Mc({defaultProp:e,onChange:t}){let[n,r]=m.useState(e),i=m.useRef(n),a=m.useRef(t);return Ac(()=>{a.current=t},[t]),m.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Nc(e){return typeof e==`function`}var Pc=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Fc=`VisuallyHidden`,Ic=m.forwardRef((e,t)=>(0,v.jsx)(V.span,{...e,ref:t,style:{...Pc,...e.style}}));Ic.displayName=Fc;var Lc=r({Action:()=>jl,Close:()=>Ml,Description:()=>Al,Provider:()=>El,Root:()=>Ol,Title:()=>kl,Toast:()=>al,ToastAction:()=>hl,ToastClose:()=>_l,ToastDescription:()=>pl,ToastProvider:()=>Kc,ToastTitle:()=>dl,ToastViewport:()=>Zc,Viewport:()=>Dl,createToastScope:()=>Uc}),Rc=`ToastProvider`,[zc,Bc,Vc]=nc(`Toast`),[Hc,Uc]=Js(`Toast`,[Vc]),[Wc,Gc]=Hc(Rc),Kc=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=m.useState(null),[l,u]=m.useState(0),d=m.useRef(!1),f=m.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Rc}\`. Expected non-empty \`string\`.`),(0,v.jsx)(zc.Provider,{scope:t,children:(0,v.jsx)(Wc,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:m.useCallback(()=>u(e=>e+1),[]),onToastRemove:m.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};Kc.displayName=Rc;var qc=`ToastViewport`,Jc=[`F8`],Yc=`toast.viewportPause`,Xc=`toast.viewportResume`,Zc=m.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=Jc,label:i=`Notifications ({hotkey})`,...a}=e,o=Gc(qc,n),s=Bc(n),c=m.useRef(null),l=m.useRef(null),u=m.useRef(null),d=m.useRef(null),f=Ks(t,d,o.onViewportChange),p=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),h=o.toastCount>0;m.useEffect(()=>{let e=e=>{r.length!==0&&r.every(t=>e[t]||e.code===t)&&d.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),m.useEffect(()=>{let e=c.current,t=d.current;if(h&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(Yc);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(Xc);t.dispatchEvent(e),o.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[h,o.isClosePausedRef]);let g=m.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...wl(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return m.useEffect(()=>{let e=d.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){l.current?.focus();return}let i=g({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);Tl(i.slice(a+1))?t.preventDefault():r?l.current?.focus():u.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,g]),(0,v.jsxs)(xc,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,p),tabIndex:-1,style:{pointerEvents:h?void 0:`none`},children:[h&&(0,v.jsx)($c,{ref:l,onFocusFromOutsideViewport:()=>{Tl(g({tabbingDirection:`forwards`}))}}),(0,v.jsx)(zc.Slot,{scope:n,children:(0,v.jsx)(V.ol,{tabIndex:-1,...a,ref:f})}),h&&(0,v.jsx)($c,{ref:u,onFocusFromOutsideViewport:()=>{Tl(g({tabbingDirection:`backwards`}))}})]})});Zc.displayName=qc;var Qc=`ToastFocusProxy`,$c=m.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=Gc(Qc,n);return(0,v.jsx)(Ic,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})});$c.displayName=Qc;var el=`Toast`,tl=`toast.swipeStart`,nl=`toast.swipeMove`,rl=`toast.swipeCancel`,il=`toast.swipeEnd`,al=m.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=jc({prop:r,defaultProp:i??!0,onChange:a,caller:el});return(0,v.jsx)(Ec,{present:n||s,children:(0,v.jsx)(cl,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:ac(e.onPause),onResume:ac(e.onResume),onSwipeStart:Us(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:Us(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:Us(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:Us(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})});al.displayName=el;var[ol,sl]=Hc(el,{onClose(){}}),cl=m.forwardRef((e,t)=>{let{__scopeToast:n,type:r=`foreground`,duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...h}=e,g=Gc(el,n),[_,y]=m.useState(null),b=Ks(t,e=>y(e)),x=m.useRef(null),S=m.useRef(null),C=i||g.duration,w=m.useRef(0),T=m.useRef(C),E=m.useRef(0),{onToastAdd:D,onToastRemove:O}=g,k=ac(()=>{_?.contains(document.activeElement)&&g.viewport?.focus(),o()}),A=m.useCallback(e=>{!e||e===1/0||(window.clearTimeout(E.current),w.current=new Date().getTime(),E.current=window.setTimeout(k,e))},[k]);m.useEffect(()=>{let e=g.viewport;if(e){let t=()=>{A(T.current),l?.()},n=()=>{let e=new Date().getTime()-w.current;T.current-=e,window.clearTimeout(E.current),c?.()};return e.addEventListener(Yc,n),e.addEventListener(Xc,t),()=>{e.removeEventListener(Yc,n),e.removeEventListener(Xc,t)}}},[g.viewport,C,c,l,A]),m.useEffect(()=>{a&&!g.isClosePausedRef.current&&A(C)},[a,C,g.isClosePausedRef,A]),m.useEffect(()=>(D(),()=>O()),[D,O]);let j=m.useMemo(()=>_?yl(_):null,[_]);return g.viewport?(0,v.jsxs)(v.Fragment,{children:[j&&(0,v.jsx)(ll,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,children:j}),(0,v.jsx)(ol,{scope:n,onClose:k,children:rc.createPortal((0,v.jsx)(zc.ItemSlot,{scope:n,children:(0,v.jsx)(bc,{asChild:!0,onEscapeKeyDown:Us(s,()=>{g.isFocusedToastEscapeKeyDownRef.current||k(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,v.jsx)(V.li,{tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":g.swipeDirection,...h,ref:b,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:Us(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,k()))}),onPointerDown:Us(e.onPointerDown,e=>{e.button===0&&(x.current={x:e.clientX,y:e.clientY})}),onPointerMove:Us(e.onPointerMove,e=>{if(!x.current)return;let t=e.clientX-x.current.x,n=e.clientY-x.current.y,r=!!S.current,i=[`left`,`right`].includes(g.swipeDirection),a=[`left`,`up`].includes(g.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},f={originalEvent:e,delta:l};r?(S.current=l,bl(nl,d,f,{discrete:!1})):xl(l,g.swipeDirection,c)?(S.current=l,bl(tl,u,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(x.current=null)}),onPointerUp:Us(e.onPointerUp,e=>{let t=S.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),S.current=null,x.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};xl(t,g.swipeDirection,g.swipeThreshold)?bl(il,p,r,{discrete:!0}):bl(rl,f,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),ll=e=>{let{__scopeToast:t,children:n,...r}=e,i=Gc(el,t),[a,o]=m.useState(!1),[s,c]=m.useState(!1);return Sl(()=>o(!0)),m.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:(0,v.jsx)(wc,{asChild:!0,children:(0,v.jsx)(Ic,{...r,children:a&&(0,v.jsxs)(v.Fragment,{children:[i.label,` `,n]})})})},ul=`ToastTitle`,dl=m.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,v.jsx)(V.div,{...r,ref:t})});dl.displayName=ul;var fl=`ToastDescription`,pl=m.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,v.jsx)(V.div,{...r,ref:t})});pl.displayName=fl;var ml=`ToastAction`,hl=m.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,v.jsx)(vl,{altText:n,asChild:!0,children:(0,v.jsx)(_l,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ml}\`. Expected non-empty \`string\`.`),null)});hl.displayName=ml;var gl=`ToastClose`,_l=m.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=sl(gl,n);return(0,v.jsx)(vl,{asChild:!0,children:(0,v.jsx)(V.button,{type:`button`,...r,ref:t,onClick:Us(e.onClick,i.onClose)})})});_l.displayName=gl;var vl=m.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return(0,v.jsx)(V.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function yl(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),Cl(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...yl(e))}}),t}function bl(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ic(i,a):i.dispatchEvent(a)}var xl=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function Sl(e=()=>{}){let t=ac(e);Sc(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function Cl(e){return e.nodeType===e.ELEMENT_NODE}function wl(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Tl(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var El=Kc,Dl=Zc,Ol=al,kl=dl,Al=pl,jl=hl,Ml=_l,Nl=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Pl=vo,Fl=(e,t)=>n=>{if(t?.variants==null)return Pl(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Nl(t)||Nl(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Pl(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Il=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Ll=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Rl=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),zl=e=>{let t=Rl(e);return t.charAt(0).toUpperCase()+t.slice(1)},Bl={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`},Vl=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Hl=(0,m.createContext)({}),Ul=()=>(0,m.useContext)(Hl),Wl=(0,m.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Ul()??{},h=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,m.createElement)(`svg`,{ref:c,...Bl,width:t??l??Bl.width,height:t??l??Bl.height,stroke:e??f,strokeWidth:h,className:Il(`lucide`,p,i),...!a&&!Vl(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,m.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),H=(e,t)=>{let n=(0,m.forwardRef)(({className:n,...r},i)=>(0,m.createElement)(Wl,{ref:i,iconNode:t,className:Il(`lucide-${Ll(zl(e))}`,`lucide-${e}`,n),...r}));return n.displayName=zl(e),n},Gl=H(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Kl=H(`arrow-up-from-line`,[[`path`,{d:`m18 9-6-6-6 6`,key:`kcunyi`}],[`path`,{d:`M12 3v14`,key:`7cf3v8`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),ql=H(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Jl=H(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Yl=H(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Xl=H(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Zl=H(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Ql=H(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),$l=H(`copy-check`,[[`path`,{d:`m12 15 2 2 4-4`,key:`2c609p`}],[`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`}]]),eu=H(`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`}]]),tu=H(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),nu=H(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ru=H(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),iu=H(`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`}]]),au=H(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),ou=H(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),su=H(`move-diagonal`,[[`path`,{d:`M11 19H5v-6`,key:`8awifj`}],[`path`,{d:`M13 5h6v6`,key:`7voy1q`}],[`path`,{d:`M19 5 5 19`,key:`wwaj1z`}]]),cu=H(`move-right`,[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]),lu=H(`move-vertical`,[[`path`,{d:`M12 2v20`,key:`t6zp3m`}],[`path`,{d:`m8 18 4 4 4-4`,key:`bh5tu3`}],[`path`,{d:`m8 6 4-4 4 4`,key:`ybng9g`}]]),uu=H(`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`}]]),du=H(`pencil-ruler`,[[`path`,{d:`M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13`,key:`orapub`}],[`path`,{d:`m8 6 2-2`,key:`115y1s`}],[`path`,{d:`m18 16 2-2`,key:`ee94s4`}],[`path`,{d:`m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17`,key:`cfq27r`}],[`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`}]]),fu=H(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),pu=H(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),mu=H(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),hu=H(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),gu=H(`trash`,[[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),_u=H(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),vu=H(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),yu=Lc,bu=({className:e,...t})=>(0,v.jsx)(Dl,{className:B(`fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]`,e),...t}),xu=Fl(`group data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md p-4 pr-6 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[state=closed]:animate-out data-[state=open]:animate-in data-[swipe=end]:animate-out data-[swipe=move]:transition-none`,{variants:{variant:{error:`bg-error/40 text-text`,success:`bg-success/30 text-text`,default:`bg-card/80 text-text`}},defaultVariants:{variant:`default`}}),Su=({className:e,variant:t,...n})=>(0,v.jsx)(Ol,{className:B(xu({variant:t}),e),...n}),Cu=({className:e,...t})=>(0,v.jsx)(Ml,{className:B(`absolute top-1 right-1 rounded-md p-1 text-text/50 opacity-0 transition-opacity hover:text-text/80 focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 group-[.destructive]:hover:text-red-50`,e),"toast-close":``,...t,children:(0,v.jsx)(vu,{className:`size-5`})}),wu=({className:e,...t})=>(0,v.jsx)(kl,{className:B(`font-semibold text-sm [&+div]:text-xs`,e),...t}),Tu=({className:e,...t})=>(0,v.jsx)(Al,{className:B(`text-sm opacity-90`,e),...t}),Eu=1,Du=900*1e3,Ou=function(e){return e.ADD_TOAST=`ADD_TOAST`,e.UPDATE_TOAST=`UPDATE_TOAST`,e.DISMISS_TOAST=`DISMISS_TOAST`,e.REMOVE_TOAST=`REMOVE_TOAST`,e}(Ou||{}),ku=0,Au=()=>(ku=(ku+1)%(2**53-1),ku.toString()),ju=new Map,Mu=e=>{if(ju.has(e))return;let t=setTimeout(()=>{ju.delete(e),Iu({type:Ou.REMOVE_TOAST,toastId:e})},Du);ju.set(e,t)},Nu=(e,t)=>{switch(t.type){case Ou.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,Eu)};case Ou.UPDATE_TOAST:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case Ou.DISMISS_TOAST:{let{toastId:n}=t;return n?Mu(n):e.toasts.forEach(e=>{Mu(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case Ou.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},Pu=[],Fu={toasts:[]},Iu=e=>{Fu=Nu(Fu,e),Pu.forEach(e=>{e(Fu)})},Lu=({...e})=>{let t=Au(),n=e=>Iu({type:Ou.UPDATE_TOAST,toast:{...e,id:t}}),r=()=>Iu({type:Ou.DISMISS_TOAST,toastId:t});return Iu({type:Ou.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}},Ru=()=>{let[e,t]=(0,m.useState)(Fu);return(0,m.useEffect)(()=>(Pu.push(t),()=>{let e=Pu.indexOf(t);e>-1&&Pu.splice(e,1)}),[e]),{...e,toast:Lu,dismiss:e=>Iu({type:Ou.DISMISS_TOAST,toastId:e})}},zu=()=>{let{toasts:e}=Ru();return(0,v.jsxs)(yu.Provider,{children:[e.map(({id:e,title:t,description:n,action:r,...i})=>(0,v.jsxs)(Su,{...i,children:[(0,v.jsxs)(`div`,{className:`grid gap-1`,children:[t&&(0,v.jsx)(wu,{children:t}),n&&(0,v.jsx)(Tu,{children:n})]}),r,(0,v.jsx)(Cu,{})]},e)),(0,v.jsx)(bu,{})]})},Bu=Fl(`flex flex-col text-text backdrop-blur`,{variants:{roundedSize:{none:`rounded-none`,sm:`rounded-sm [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-md`,md:`rounded-md [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-lg`,lg:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,xl:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,"2xl":`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,"3xl":`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"4xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,full:`rounded-full`},transparency:{none:`bg-card`,xs:`bg-card/95`,sm:`bg-card/90`,md:`bg-card/70`,lg:`bg-card/40`,xl:`bg-card/20`,full:``},padding:{none:`p-0`,sm:`px-3 py-2`,md:`px-4 py-3`,lg:`px-6 py-4`,xl:`px-8 py-6`,"2xl":`px-10 py-8`},separator:{without:``,x:`divide-x divide-dashed divide-text/20`,y:`divide-y divide-dashed divide-text/20`,both:`divide-x divide-y divide-dashed divide-text/20`},border:{none:``,with:`border-[1.3px]`},borderColor:{primary:`border-primary`,secondary:`border-secondary`,neutral:`border-neutral`,card:`border-card`,text:`border-text`,error:`border-error`,warning:`border-warning`,success:`border-success`},background:{none:``,hoverable:`bg-opacity-5! backdrop-blur-0 hover:bg-opacity-10! hover:backdrop-blur focus:bg-opacity-10! focus:backdrop-blur aria-selected:bg-opacity-15! aria-selected:backdrop-blur`,with:``},gap:{none:`gap-0`,sm:`gap-1`,md:`gap-3`,lg:`gap-5`,xl:`gap-8`,"2xl":`gap-10`}},defaultVariants:{roundedSize:`lg`,border:`none`,borderColor:`text`,transparency:`md`,padding:`none`,separator:`without`,gap:`none`},compoundVariants:[{background:`none`,class:`bg-transparent`}]}),Vu=function(e){return e.NONE=`none`,e.SM=`sm`,e.MD=`md`,e.LG=`lg`,e.XL=`xl`,e[`2xl`]=`2xl`,e[`3xl`]=`3xl`,e[`4xl`]=`4xl`,e[`5xl`]=`5xl`,e.FULL=`full`,e}({}),Hu=({children:e,roundedSize:t,padding:n,transparency:r,separator:i,className:a,border:o,borderColor:s,background:c,gap:l,...u})=>(0,v.jsx)(`div`,{className:B(Bu({roundedSize:t,transparency:r,padding:n,separator:i,border:typeof o==`boolean`?o?`with`:`none`:void 0,background:c,borderColor:s,gap:l}),a),...u,children:e}),Uu=({className:e,strokeWidth:t=4})=>(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`44`,height:`44`,viewBox:`0 0 44 44`,stroke:`currentColor`,role:`img`,"aria-label":`Spinner`,className:B(`size-full`,e),children:(0,v.jsxs)(`g`,{fill:`none`,fillRule:`evenodd`,strokeWidth:t,children:[(0,v.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,v.jsx)(`animate`,{attributeName:`r`,begin:`0s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),(0,v.jsx)(`animate`,{attributeName:`stroke-opacity`,begin:`0s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]}),(0,v.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,v.jsx)(`animate`,{attributeName:`r`,begin:`-0.9s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),(0,v.jsx)(`animate`,{attributeName:`stroke-opacity`,begin:`-0.9s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]})]})}),Wu=({children:e,isLoading:t=!0,keepChildren:n=!1,className:r,...i})=>(0,v.jsx)(v.Fragment,{children:t&&n?(0,v.jsxs)(`div`,{className:`relative size-full`,children:[(0,v.jsx)(`div`,{className:B(`absolute top-0 left-0 flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:(0,v.jsx)(Uu,{className:`size-10 max-h-full max-w-full`})}),e]}):t?(0,v.jsx)(`div`,{className:B(`flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:(0,v.jsx)(Uu,{className:`size-10 max-h-full max-w-full`})}):e??(0,v.jsx)(v.Fragment,{})}),U=function(e){return e.SM=`sm`,e.MD=`md`,e.LG=`lg`,e.XL=`xl`,e.ICON_SM=`icon-sm`,e.ICON_MD=`icon-md`,e.ICON_LG=`icon-lg`,e.ICON_XL=`icon-xl`,e}({}),Gu=Fl(`flex-none shrink-0`,{variants:{size:{[`${U.SM}`]:`size-3`,[`${U.MD}`]:`size-4`,[`${U.LG}`]:`size-5`,[`${U.XL}`]:`size-6`,[`${U.ICON_SM}`]:`size-3`,[`${U.ICON_MD}`]:`size-4`,[`${U.ICON_LG}`]:`size-4`,[`${U.ICON_XL}`]:`size-5`}},defaultVariants:{size:U.MD}}),W=function(e){return e.DEFAULT=`default`,e.NONE=`none`,e.OUTLINE=`outline`,e.LINK=`link`,e.INVISIBLE_LINK=`invisible-link`,e.HOVERABLE=`hoverable`,e.FADE=`fade`,e.INPUT=`input`,e}({}),G=function(e){return e.PRIMARY=`primary`,e.SECONDARY=`secondary`,e.DESTRUCTIVE=`destructive`,e.NEUTRAL=`neutral`,e.LIGHT=`light`,e.DARK=`dark`,e.TEXT=`text`,e.CARD=`card`,e.TEXT_INVERSE=`text-inverse`,e.CURRENT=`current`,e.ERROR=`error`,e.SUCCESS=`success`,e.CUSTOM=`custom`,e}({}),Ku=function(e){return e.LEFT=`left`,e.CENTER=`center`,e.RIGHT=`right`,e}({}),qu=Fl(`relative inline-flex cursor-pointer items-center justify-center font-medium ring-0 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{size:{[`${U.SM}`]:`min-h-7 px-3 text-xs max-md:py-1`,[`${U.MD}`]:`min-h-8 px-6 text-sm max-md:py-2`,[`${U.LG}`]:`min-h-10 px-8 text-lg max-md:py-3`,[`${U.XL}`]:`min-h-11 px-10 text-xl max-md:py-4`,[`${U.ICON_SM}`]:`p-1.5`,[`${U.ICON_MD}`]:`p-1.5`,[`${U.ICON_LG}`]:`p-2`,[`${U.ICON_XL}`]:`p-3`},color:{[`${G.PRIMARY}`]:`hover-primary-500/20 text-primary ring-primary-500/20 *:text-text-light`,[`${G.SECONDARY}`]:`hover-secondary-500/20 text-secondary ring-secondary-500/20 *:text-text-light`,[`${G.DESTRUCTIVE}`]:`hover-destructive-500/20 text-destructive ring-destructive-500/20 *:text-text-light`,[`${G.NEUTRAL}`]:`text-neutral ring-neutral-500/5 *:text-text-light`,[`${G.CARD}`]:`hover-card-500/20 text-card ring-card-500/20 *:text-text-light`,[`${G.LIGHT}`]:`hover-white-500/20 text-white ring-white/20 *:text-text-light`,[`${G.DARK}`]:`text-neutral-800 ring-text-light/50 *:text-text-light`,[`${G.TEXT}`]:`text-text ring-text/20 *:text-text-opposite`,[`${G.CURRENT}`]:`hover-current-500/10 text-current ring-current/10 *:text-text-light`,[`${G.TEXT_INVERSE}`]:`text-text-opposite ring-text-opposite/20 *:text-text`,[`${G.ERROR}`]:`hover-error-500/20 text-error ring-error/20 *:text-text-light`,[`${G.SUCCESS}`]:`hover-success-500/20 text-success ring-success/20 *:text-text-light`,[`${G.CUSTOM}`]:``},roundedSize:{[`${Vu.NONE}`]:`rounded-none`,[`${Vu.SM}`]:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,[`${Vu.MD}`]:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,[`${Vu.LG}`]:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,[`${Vu.XL}`]:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,[`${Vu[`2xl`]}`]:`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,[`${Vu[`3xl`]}`]:`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,[`${Vu[`4xl`]}`]:`rounded-[3rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[4rem]`,[`${Vu[`5xl`]}`]:`rounded-[4rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[5rem]`,[`${Vu.FULL}`]:`rounded-full`},variant:{[`${W.DEFAULT}`]:[`bg-current`,`hover:bg-current/90`,`hover:ring-5`,`aria-selected:ring-5`],[`${W.OUTLINE}`]:[`rounded-2xl border-[1.3px] border-current bg-current/0 *:text-current!`,`hover:bg-current/20 focus-visible:bg-current/20`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],[`${W.NONE}`]:`border-none bg-current/0 text-inherit hover:bg-current/0`,[`${W.LINK}`]:`h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 *:text-current! hover:bg-transparent hover:underline`,[`${W.INVISIBLE_LINK}`]:`h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 *:text-current! hover:bg-transparent`,[`${W.HOVERABLE}`]:`rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/20 aria-[current]:bg-current/5`,[`${W.FADE}`]:[`rounded-lg border-none bg-current/10 ring-current/5 transition *:text-current! hover:bg-current/20 aria-[current]:bg-current/5`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],[`${W.INPUT}`]:[`text-text`,`w-full select-text resize-none rounded-2xl text-base shadow-none outline-none supports-[corner-shape:squircle]:rounded-4xl`,`transition-shadow duration-100 md:text-sm`,`ring-0`,`disabled:opacity-50`,`text-text`,`bg-neutral-50 dark:bg-neutral-950`,`ring-neutral-100 dark:ring-neutral-700`,`hover:ring-3`,`aria-selected:ring-4`,`focus-visible:ring-3`,`disabled:ring-0`,`focus-visible:outline-none`,`[box-shadow:none] focus:[box-shadow:none]`,`aria-invalid:border-error`]},textAlign:{[`${Ku.LEFT}`]:`justify-start text-left`,[`${Ku.CENTER}`]:`justify-center text-center`,[`${Ku.RIGHT}`]:`justify-end text-right`},isFullWidth:{true:`w-full`,false:``}},defaultVariants:{variant:`${W.DEFAULT}`,size:`${U.MD}`,color:`${G.CUSTOM}`,roundedSize:`${Vu.MD}`,textAlign:`${Ku.CENTER}`,isFullWidth:!1}}),Ju=({variant:e,size:t,color:n,children:r,Icon:i,IconRight:a,iconClassName:o,isLoading:s=!1,isActive:c,isSelected:l,isFullWidth:u,roundedSize:d,textAlign:f,disabled:p,label:m,className:h,type:g=`button`,"aria-describedby":_,"aria-expanded":y,"aria-haspopup":b,"aria-pressed":x,...S})=>{let C=e===`${W.LINK}`||e===`${W.INVISIBLE_LINK}`,w=!r&&(i||a),T={"aria-label":w?m??void 0:void 0,"aria-labelledby":void 0,"aria-describedby":_,"aria-expanded":y,"aria-haspopup":b,"aria-pressed":c===void 0?x:c,"aria-busy":s,"aria-current":c?`page`:void 0,"aria-disabled":p||s,"aria-selected":l},E=t===U.ICON_SM||t===U.ICON_MD||t===U.ICON_LG||t===U.ICON_XL;return(0,v.jsxs)(`button`,{disabled:s||p,role:C?`link`:`button`,type:g,className:qu({variant:e,size:t,color:n,isFullWidth:u,roundedSize:d,textAlign:f??(a?Ku.LEFT:Ku.CENTER),className:h}),...T,...S,children:[i&&!s&&(0,v.jsx)(i,{className:Gu({size:t,className:B(!E&&`mr-3`,o)}),"aria-hidden":`true`}),(0,v.jsx)(`div`,{className:B(`flex items-center justify-center transition-[width] duration-300`,s&&t===U.SM&&`w-3`,s&&t===U.MD&&`w-4`,s&&t===U.LG&&`w-5`,s&&t===U.XL&&`w-6`),children:(0,v.jsx)(Wu,{className:Gu({size:t,className:B(!E&&`mr-3`,o)}),isLoading:s,"aria-hidden":`true`,"data-testid":`loader`})}),r&&(0,v.jsx)(`span`,{className:`flex-1 truncate whitespace-nowrap`,children:r}),!r&&w&&(0,v.jsx)(`span`,{className:`sr-only`,children:m}),a&&(0,v.jsx)(a,{className:Gu({size:t,className:B(!E&&`ml-3`,o)}),"aria-hidden":`true`})]})},Yu=({children:e,isHidden:t,className:n=``,isOverable:r=!1,isFocusable:i=!1,minHeight:a=0,...o})=>(0,v.jsx)(`div`,{"aria-hidden":i?t:void 0,tabIndex:i?0:void 0,role:i?`button`:`none`,className:B(`group/height-smoother relative grid w-full grid-rows-[0fr] overflow-hidden transition-all duration-700 ease-in-out`,t!==void 0&&!t&&`grid-rows-[1fr] overflow-x-auto`,r&&`hover:grid-rows-[1fr] hover:overflow-x-auto`,i&&`focus-within:grid-rows-[1fr] focus-within:overflow-x-auto focus:grid-rows-[1fr] focus:overflow-x-auto`,n),...o,children:(0,v.jsx)(`div`,{style:{minHeight:`${a}px`},className:B(r&&`group-hover/height-smoother:visible`,i&&`group-focus/height-smoother:visible`,n),children:e})}),Xu=({children:e,header:t,isOpen:n,defaultIsOpen:r=!1,onToggle:i,onClick:a,disabled:o=!1,contentClassName:s,headerClassName:c,contentId:l,"aria-label":u,...d})=>{let f=n!==void 0,[p,h]=(0,m.useState)(r),g=(0,m.useId)(),_=f?n:p,y=!_,b=l??`${g}-accordion-content`,x=e=>{if(o)return;let t=!_;f||h(t),i?.(t),a?.(e)};return(0,v.jsxs)(`div`,{className:`w-full`,children:[(0,v.jsx)(Ju,{variant:W.HOVERABLE,color:G.TEXT,onClick:x,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),x(e))},disabled:o,isFullWidth:!0,className:B(`flex items-center justify-between gap-2`,c),IconRight:Jl,iconClassName:B(`transform transition-transform duration-500 ease-in-out`,_?`rotate-0`:`-rotate-180`),"aria-expanded":_,"aria-controls":b,"aria-label":u,role:`button`,...d,children:t}),(0,v.jsx)(Yu,{id:b,tabIndex:y?-1:void 0,isHidden:y,className:s,role:`region`,"aria-labelledby":b,children:e})]})},Zu=function(e){return e.PRIMARY=`primary`,e.SECONDARY=`secondary`,e.DESTRUCTIVE=`destructive`,e.SUCCESS=`success`,e.ERROR=`error`,e.NEUTRAL=`neutral`,e.LIGHT=`light`,e.DARK=`dark`,e.TEXT=`text`,e.CUSTOM=`custom`,e}({}),Qu=function(e){return e.DEFAULT=`default`,e.NONE=`none`,e.OUTLINE=`outline`,e.HOVERABLE=`hoverable`,e}({}),$u=function(e){return e.SMALL=`sm`,e.MEDIUM=`md`,e.LARGE=`lg`,e}({}),ed=Fl(`inline-flex items-center rounded-md border px-2.5 py-0.5 font-semibold text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{color:{[`${Zu.PRIMARY}`]:`border-primary bg-primary text-primary hover:bg-primary-500`,[`${Zu.SECONDARY}`]:`border-secondary bg-secondary text-secondary hover:bg-secondary-300`,[`${Zu.DESTRUCTIVE}`]:`border-destructive bg-destructive text-destructive hover:bg-destructive-500`,[`${Zu.SUCCESS}`]:`border-success bg-success text-success hover:bg-success-500`,[`${Zu.ERROR}`]:`border-error bg-error text-error hover:bg-error-500`,[`${Zu.NEUTRAL}`]:`border-neutral bg-neutral text-neutral hover:bg-neutral-600`,[`${Zu.LIGHT}`]:`border-white bg-white text-white hover:bg-neutral-500`,[`${Zu.DARK}`]:`border-neutral-800 bg-neutral-800 text-neutral-800 hover:bg-neutral-900`,[`${Zu.TEXT}`]:`border-text bg-text text-text hover:opacity-80`,[`${Zu.CUSTOM}`]:``},variant:{[`${Qu.DEFAULT}`]:`rounded-lg text-text-opposite`,[`${Qu.NONE}`]:`border-none bg-opacity-0 text-inherit hover:bg-opacity-0`,[`${Qu.OUTLINE}`]:`rounded-lg border-[1.3px] bg-opacity-0 hover:bg-opacity-30`,[`${Qu.HOVERABLE}`]:`rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10`},size:{[`${$u.SMALL}`]:`px-2 py-0.5 text-xs`,[`${$u.MEDIUM}`]:`px-2.5 py-0.5 text-xs`,[`${$u.LARGE}`]:`px-3 py-1 text-sm`}},defaultVariants:{variant:Qu.DEFAULT,color:Zu.PRIMARY,size:$u.MEDIUM}}),td=({className:e,variant:t=Qu.DEFAULT,color:n=Zu.PRIMARY,size:r=$u.MEDIUM,children:i,clickable:a=!1,dismissible:o=!1,onClick:s,onDismiss:c,role:l,tabIndex:u,"aria-label":d,...f})=>{let p=a?`button`:`span`,m=e=>{a&&s&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s(e))},h=e=>{e.stopPropagation(),c?.()};return(0,v.jsxs)(p,{className:B(ed({variant:t,color:n,size:r}),a&&`cursor-pointer hover:opacity-80 focus-visible:ring-2 focus-visible:ring-offset-2`,o&&`pr-1`,e),onClick:a?s:void 0,onKeyDown:a?m:void 0,role:l||(a?`button`:`status`),tabIndex:a?u??0:u,"aria-label":d||(a?`${i} button`:void 0),...f,children:[i,o&&(0,v.jsx)(`button`,{type:`button`,className:`ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full hover:bg-black/10 focus:outline-none focus:ring-1 focus:ring-offset-1`,onClick:h,"aria-label":`Remove ${i} badge`,children:(0,v.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,v.jsx)(`title`,{children:`Remove badge`}),(0,v.jsx)(`path`,{fillRule:`evenodd`,d:`M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z`,clipRule:`evenodd`})]})})]})},nd=function(e){return e.DEFAULT=`default`,e.INVISIBLE_LINK=`invisible-link`,e.BUTTON=`button`,e.BUTTON_OUTLINED=`button-outlined`,e.HOVERABLE=`hoverable`,e}({}),rd=function(e){return e.PRIMARY=`primary`,e.SECONDARY=`secondary`,e.DESTRUCTIVE=`destructive`,e.NEUTRAL=`neutral`,e.LIGHT=`light`,e.DARK=`dark`,e.TEXT=`text`,e.TEXT_INVERSE=`text-inverse`,e.ERROR=`error`,e.SUCCESS=`success`,e.CUSTOM=`custom`,e}({}),id=function(e){return e.NONE=`none`,e.SM=`sm`,e.MD=`md`,e.LG=`lg`,e.XL=`xl`,e.TWO_XL=`2xl`,e.THREE_XL=`3xl`,e.FULL=`full`,e}({}),ad=function(e){return e.SM=`sm`,e.MD=`md`,e.LG=`lg`,e.XL=`xl`,e.CUSTOM=`custom`,e}({}),od=function(e){return e.DEFAULT=`default`,e.TRUE=`true`,e.FALSE=`false`,e}({}),sd=Fl(`gap-3 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{[`${nd.DEFAULT}`]:`h-auto justify-start border-inherit bg-current/0 px-1 font-medium decoration-[1.5] underline-offset-5 hover:bg-current/0 hover:text-current/80 hover:underline hover:underline-offset-6`,[`${nd.INVISIBLE_LINK}`]:`h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-5 hover:bg-current/0`,[`${nd.BUTTON}`]:`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current text-center font-medium text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5`,[`${nd.BUTTON_OUTLINED}`]:`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current text-center font-medium text-text ring-0 *:text-text hover:bg-current/20 hover:ring-5 aria-selected:ring-5`,[`${nd.HOVERABLE}`]:`block rounded-lg border-none bg-current/0 hover:bg-current/10 aria-[current]:bg-current/5`},roundedSize:{[`${id.NONE}`]:`rounded-none`,[`${id.SM}`]:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,[`${id.MD}`]:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,[`${id.LG}`]:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,[`${id.XL}`]:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,[`${id.TWO_XL}`]:`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,[`${id.THREE_XL}`]:`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,[`${id.FULL}`]:`rounded-full`},color:{[`${rd.PRIMARY}`]:`text-primary`,[`${rd.SECONDARY}`]:`text-secondary`,[`${rd.DESTRUCTIVE}`]:`text-destructive`,[`${rd.NEUTRAL}`]:`text-neutral`,[`${rd.LIGHT}`]:`text-white`,[`${rd.DARK}`]:`text-neutral-800`,[`${rd.TEXT}`]:`text-text`,[`${rd.TEXT_INVERSE}`]:`text-text-opposite`,[`${rd.ERROR}`]:`text-error`,[`${rd.SUCCESS}`]:`text-success`,[`${rd.CUSTOM}`]:``},size:{[`${ad.SM}`]:`text-sm`,[`${ad.MD}`]:`text-base`,[`${ad.LG}`]:`text-lg`,[`${ad.XL}`]:`text-xl`,[`${ad.CUSTOM}`]:``},underlined:{[od.DEFAULT]:``,[od.TRUE]:`underline`,[od.FALSE]:`no-underline`}},compoundVariants:[{variant:nd.BUTTON,color:rd.TEXT_INVERSE,class:`*:text-text`},{variant:nd.BUTTON_OUTLINED,color:rd.TEXT_INVERSE,class:`text-text-opposite *:text-text-opposite`},{variant:[nd.BUTTON,nd.BUTTON_OUTLINED],size:ad.SM,class:`min-h-7 px-3 max-md:py-1`},{variant:[nd.BUTTON,nd.BUTTON_OUTLINED],size:ad.MD,class:`min-h-8 px-6 max-md:py-2`},{variant:[nd.BUTTON,nd.BUTTON_OUTLINED],size:ad.LG,class:`min-h-10 px-8 max-md:py-3`},{variant:[nd.BUTTON,nd.BUTTON_OUTLINED],size:ad.XL,class:`min-h-11 px-10 max-md:py-4`},{variant:[nd.BUTTON,nd.BUTTON_OUTLINED],color:rd.PRIMARY,class:`ring-primary/20`},{variant:[nd.BUTTON,nd.BUTTON_OUTLINED],color:rd.SECONDARY,class:`ring-secondary/20`},{variant:[nd.BUTTON,nd.BUTTON_OUTLINED],color:rd.DESTRUCTIVE,class:`ring-destructive/20`},{variant:[nd.BUTTON,nd.BUTTON_OUTLINED],color:rd.NEUTRAL,class:`ring-neutral/20`},{variant:[nd.BUTTON,nd.BUTTON_OUTLINED],color:rd.LIGHT,class:`ring-white/20`},{variant:[nd.BUTTON,nd.BUTTON_OUTLINED],color:rd.DARK,class:`ring-neutral-800/20`},{variant:[nd.BUTTON,nd.BUTTON_OUTLINED],color:rd.TEXT,class:`ring-text/20`},{variant:[nd.BUTTON,nd.BUTTON_OUTLINED],color:rd.TEXT_INVERSE,class:`ring-text-opposite/20`},{variant:[nd.BUTTON,nd.BUTTON_OUTLINED],color:rd.ERROR,class:`ring-error/20`},{variant:[nd.BUTTON,nd.BUTTON_OUTLINED],color:rd.SUCCESS,class:`ring-success/20`}],defaultVariants:{variant:nd.DEFAULT,roundedSize:id.MD,underlined:od.DEFAULT,size:ad.MD}}),cd=({href:e,isExternalLink:t})=>{let n=typeof e==`string`&&e.trim()!==``;return t===!0||t===void 0&&n&&/^https?:\/\//.test(e)},ld=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(ld):(0,m.isValidElement)(e)?ld(e.props.children):!1,ud=e=>{let{variant:t=nd.DEFAULT,color:n=rd.CUSTOM,roundedSize:r,children:i,label:a,className:o,isActive:s,underlined:c,locale:l,size:u,isExternalLink:d,isPageSection:f,href:p,...m}=e,h=d??cd(e),g=f??p?.startsWith(`#`)??!1,_=ld(i),y=t===nd.BUTTON||t===nd.BUTTON_OUTLINED,b=h?`noopener noreferrer nofollow`:void 0,x=h?`_blank`:`_self`;return(0,v.jsxs)(`a`,{href:l&&p&&!h&&!g?Xn(p,l):p,"aria-label":a,rel:b,target:x,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:B(sd({variant:t,color:n,roundedSize:r,underlined:c,size:u,className:o})),...m,children:[y&&_?(0,v.jsx)(`span`,{children:i}):i,h&&_&&(0,v.jsx)(nu,{className:`ml-2 inline-block size-4`}),g&&(0,v.jsx)(cu,{className:`ml-2 inline-block size-4`})]})},dd={key:`breadcrumb`,content:{nodeType:`translation`,translation:{en:{linkLabel:`Go to`},"en-GB":{linkLabel:`Go to`},fr:{linkLabel:`Aller à`},es:{linkLabel:`Ir a`},de:{linkLabel:`Gehe zu`},ja:{linkLabel:`に移動`},ko:{linkLabel:`로 이동`},zh:{linkLabel:`转到`},it:{linkLabel:`Vai a`},pt:{linkLabel:`Ir para`},hi:{linkLabel:`कर जाएं`},ar:{linkLabel:`اذهب إلى`},ru:{linkLabel:`Перейти на`}}},localIds:[`breadcrumb::local::../@intlayer/design-system/dist/esm/components/Breadcrumb/breadcrumb.content.mjs`]},fd=e=>e&&{[rd.PRIMARY]:`text-primary`,[rd.SECONDARY]:`text-secondary`,[rd.DESTRUCTIVE]:`text-destructive`,[rd.NEUTRAL]:`text-neutral`,[rd.LIGHT]:`text-white`,[rd.DARK]:`text-neutral-800`,[rd.TEXT]:`text-text`,[rd.TEXT_INVERSE]:`text-text-opposite`,[rd.ERROR]:`text-error`,[rd.SUCCESS]:`text-success`,[rd.CUSTOM]:``}[e]||``,pd=Fl(`flex flex-row flex-wrap items-center text-sm`,{variants:{size:{small:`gap-1 text-xs`,medium:`gap-2 text-sm`,large:`gap-3 text-base`},spacing:{compact:`gap-1`,normal:`gap-2`,loose:`gap-4`}},defaultVariants:{size:`medium`,spacing:`normal`}}),md=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=ve(dd).linkLabel;return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(ud,{href:e,locale:o,color:i,onClick:r,itemProp:`item`,isExternalLink:!1,itemScope:!0,itemType:`https://schema.org/WebPage`,...c,label:`${l} ${n}`,itemID:e,size:`sm`,children:(0,v.jsx)(`span`,{itemProp:`name`,children:n})}),(0,v.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},hd=({children:e,onClick:t,color:n,position:r,className:i,...a})=>{let{linkLabel:o}=mr(dd);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(Ju,{onClick:t,variant:W.LINK,label:`${o} ${e}`,color:n,itemProp:`item`,...a,children:(0,v.jsx)(`span`,{itemProp:`name`,children:e})}),(0,v.jsx)(`meta`,{itemProp:`position`,content:r.toString()})]})},gd=({children:e,position:t,className:n,...r})=>(0,v.jsxs)(`span`,{itemProp:`item`,className:B(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,v.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,v.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),_d=({links:e,className:t,color:n=rd.TEXT,locale:r,elementType:i=`page`,separator:a=(0,v.jsx)(Xl,{size:10}),ariaLabel:o=`breadcrumb`,includeStructuredData:s=!0,maxItems:c,size:l,spacing:u,...d})=>{let f=c&&e.length>c?[...e.slice(0,1),`...`,...e.slice(-(c-2))]:e;return(0,v.jsx)(`nav`,{"aria-label":o,children:(0,v.jsx)(`ol`,{className:B(pd({size:l,spacing:u}),t),...s&&{itemScope:!0,itemType:`http://schema.org/BreadcrumbList`},...d,children:f.map((e,t)=>{let o=t===f.length-1,c=typeof e==`object`&&typeof e.href==`string`,l=typeof e==`object`&&typeof e.onClick==`function`,u=t===f.length-1,d=u?i:void 0,p=e===`...`,h=e.text??e,g=fd(n);if(p)return(0,v.jsxs)(m.Fragment,{children:[(0,v.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,v.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,v.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,v.jsx)(`span`,{className:B(g),children:a})})]},`truncated-${h}`);let _=(0,v.jsx)(gd,{position:t+1,"aria-current":d,className:B(`transition-colors duration-200`,u&&`text-neutral-900`),children:h},h);c?_=(0,v.jsx)(md,{href:e.href,color:n,position:t+1,locale:r,"aria-current":d,className:B(u&&`cursor-default text-neutral-900`),children:h},h):l&&(_=(0,v.jsx)(hd,{onClick:e.onClick,color:n,position:t+1,"aria-current":d,className:B(u&&`cursor-default text-neutral-900`),children:h},h));let y=(0,m.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:h,className:`flex items-center`},_);return o?y:(0,v.jsxs)(m.Fragment,{children:[y,(0,v.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,v.jsx)(`span`,{className:B(g),children:a})})]},h)})})})},vd=Fl([`appearance-none`,`relative cursor-pointer border-2`,`focus:outline-0`,`checked:border-current checked:bg-current checked:hover:bg-current/80`,`ring-current/20 ring-offset-current`,`hover:bg-current/20`,`disabled:opacity-50`,`ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6`,`checked:before:absolute checked:before:inset-0 checked:before:content-['✓']`,`checked:before:flex checked:before:items-center checked:before:justify-center`,`checked:before:text-text-opposite/80`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`after:absolute after:-inset-2 after:content-['']`].join(` `),{variants:{variant:{default:``},size:{xs:`size-3 rounded-sm`,sm:`size-4 rounded-md`,md:`size-5 rounded-lg`,lg:`size-6 rounded-xl`},color:{primary:`accent-primary`,secondary:`accent-secondary`,destructive:`accent-destructive`,neutral:`accent-neutral`,light:`accent-light`,text:`accent-text`,dark:`accent-dark`,error:`accent-error`,success:`accent-success`,custom:`accent-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`primary`,validationStyleEnabled:`disabled`,size:`md`}}),yd=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>(0,v.jsx)(`input`,{type:`checkbox`,className:B(vd({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),bd=e=>{let{label:t,name:n,id:r}=e;return t?(0,v.jsxs)(`label`,{htmlFor:r??n,className:B(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[(0,v.jsx)(yd,{id:r??n,...e}),t]}):(0,v.jsx)(yd,{id:r??n,...e})},xd=(...e)=>e.filter(Boolean).join(` `),Sd=Fl([`w-full select-text resize-none text-base shadow-none outline-none`,`transition-all duration-300 md:text-sm`,`ring-0`,`disabled:opacity-50`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`].join(` `),{variants:{variant:{default:[`text-text`,`bg-neutral-50 dark:bg-neutral-950`,`ring-text/20`,`disabled:ring-0`,`hover:ring-3`,`focus-within:ring-4`,`focus-visible:outline-none focus-visible:ring-4`,`[box-shadow:none] focus:[box-shadow:none]`,`aria-invalid:border-error`].join(` `),invisible:`border-none text-inherit outline-none ring-0`},size:{sm:`px-2 py-2 text-sm md:py-1.5 md:text-xs`,md:`px-2 py-3 md:py-2`,lg:`p-4`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,size:`md`,validationStyleEnabled:`disabled`}}),Cd=function(e){return e.DEFAULT=`default`,e.INVISIBLE=`invisible`,e}({}),wd=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>(0,v.jsx)(`input`,{className:xd(Sd({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),Td=e=>{let[t,n]=(0,m.useState)(!1),r=e=>{e.preventDefault(),e.stopPropagation(),n(e=>!e)},i=t?iu:ru;return(0,v.jsxs)(`div`,{className:`relative`,children:[(0,v.jsx)(wd,{...e,"aria-label":`password`,type:t?`text`:`password`}),(0,v.jsx)(`button`,{"data-testid":`eye-icon`,type:`button`,className:`absolute right-2 h-full flex-row items-center`,onClick:r,"aria-label":t?`Hide password`:`Show password`,children:(0,v.jsx)(i,{className:`mr-2 inline-block cursor-pointer text-neutral`,size:20})})]})},Ed=e=>[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)],Dd=(e,t)=>{try{e.insertRule(t)}catch{console.error(`input-otp could not insert CSS rule:`,t)}},Od=`
|
|
29
|
+
[data-input-otp] {
|
|
30
|
+
--nojs-bg: white !important;
|
|
31
|
+
--nojs-fg: black !important;
|
|
32
|
+
|
|
33
|
+
background-color: var(--nojs-bg) !important;
|
|
34
|
+
color: var(--nojs-fg) !important;
|
|
35
|
+
caret-color: var(--nojs-fg) !important;
|
|
36
|
+
letter-spacing: .25em !important;
|
|
37
|
+
text-align: center !important;
|
|
38
|
+
border: 1px solid var(--nojs-fg) !important;
|
|
39
|
+
border-radius: 4px !important;
|
|
40
|
+
width: 100% !important;
|
|
41
|
+
}
|
|
42
|
+
@media (prefers-color-scheme: dark) {
|
|
43
|
+
[data-input-otp] {
|
|
44
|
+
--nojs-bg: black !important;
|
|
45
|
+
--nojs-fg: white !important;
|
|
46
|
+
}
|
|
47
|
+
}`,kd=18,Ad=40,jd=`${Ad}px`,Md=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`),Nd=({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r})=>{let[i,a]=(0,m.useState)(!1),[o,s]=(0,m.useState)(!1),[c,l]=(0,m.useState)(!1),u=n===`none`?!1:(n===`increase-width`||n===`experimental-no-flickering`)&&i&&o,d=()=>{let r=e.current,i=t.current;if(!r||!i||c||n===`none`)return;let o=r,s=o.getBoundingClientRect().left+o.offsetWidth,u=o.getBoundingClientRect().top+o.offsetHeight/2,d=s-kd,f=u;document.querySelectorAll(Md).length===0&&document.elementFromPoint(d,f)===r||(a(!0),l(!0))};return(0,m.useEffect)(()=>{let t=e.current;if(!t||n===`none`)return;let r=()=>{s(window.innerWidth-t.getBoundingClientRect().right>=Ad)};r();let i=setInterval(r,1e3);return()=>{clearInterval(i)}},[e,n]),(0,m.useEffect)(()=>{let e=r||document.activeElement===t.current;if(n===`none`||!e)return;let i=setTimeout(d,0),a=setTimeout(d,2e3),o=setTimeout(d,5e3),s=setTimeout(()=>{l(!0)},6e3);return()=>{clearTimeout(i),clearTimeout(a),clearTimeout(o),clearTimeout(s)}},[t,r,n]),{hasPWMBadge:i,willPushPWMBadge:u,PWM_BADGE_SPACE_WIDTH:jd}},Pd=e=>{let t=(0,m.useRef)(void 0);return(0,m.useEffect)(()=>{t.current=e}),t.current},Fd=(0,m.createContext)({}),Id=({value:e,onChange:t,maxLength:n,pattern:r,placeholder:i,inputMode:a=`numeric`,onComplete:o,onActiveSlotChange:s,pushPasswordManagerStrategy:c=`increase-width`,pasteTransformer:l,containerClassName:u,noScriptCSSFallback:d=Od,render:f,children:p,...h})=>{let[g,_]=(0,m.useState)(typeof h.defaultValue==`string`?h.defaultValue:``),y=e??g,b=Pd(y),x=e=>{t?.(e),_(e)},S=r===void 0?null:typeof r==`string`?new RegExp(r):r,C=(0,m.useRef)(null),w=(0,m.useRef)(null),T=(0,m.useRef)({value:y,onChange:x,isIOS:typeof window<`u`&&window?.CSS?.supports?.(`-webkit-touch-callout`,`none`)}),E=(0,m.useRef)({prev:[C.current?.selectionStart??null,C.current?.selectionEnd??null,C.current?.selectionDirection??`none`]});(0,m.useEffect)(()=>{let e=C.current,t=w.current;if(!e||!t)return;T.current.value!==e.value&&T.current.onChange(e.value),E.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection??`none`];let n=()=>{if(document.activeElement!==e){M(null),ee(null),P(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=E.current.prev,s=-1,c=-1,l=r??`none`;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&C.current?.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l;P(t!==null&&n!==null?t===n?t:u:null),M(u),ee(d),E.current.prev=[u,d,f]};if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&A(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;Dd(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),Dd(e.sheet,`[data-input-otp]:autofill { ${t} }`),Dd(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),Dd(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),Dd(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[D,O]=(0,m.useState)(!1),[k,A]=(0,m.useState)(!1),[j,M]=(0,m.useState)(null),[N,ee]=(0,m.useState)(null),[te,P]=(0,m.useState)(null);(0,m.useEffect)(()=>{Ed(()=>{C.current?.dispatchEvent(new Event(`input`));let e=C.current?.selectionStart??null,t=C.current?.selectionEnd??null,n=C.current?.selectionDirection??`none`;e!==null&&t!==null&&(M(e),ee(t),P(e),E.current.prev=[e,t,n])})},[y,k]),(0,m.useEffect)(()=>{b!==void 0&&y!==b&&b.length<n&&y.length===n&&o?.(y)},[n,o,b,y]);let F=(0,m.useRef)(null);(0,m.useEffect)(()=>{let e=k&&te!==null?te:null;e!==F.current&&(F.current=e,s?.(e))},[k,te,s]);let ne=Nd({containerRef:w,inputRef:C,pushPasswordManagerStrategy:c,isFocused:k}),re=e=>{let t=e.currentTarget.value.slice(0,n);if(t.length>0&&S&&!S.test(t)){e.preventDefault();return}typeof b==`string`&&t.length<b.length&&document.dispatchEvent(new Event(`selectionchange`)),x(t)},ie=()=>{if(C.current){let e=Math.min(C.current.value.length,n-1),t=C.current.value.length;C.current?.setSelectionRange(e,t),M(e),ee(t)}A(!0)},ae=e=>{let t=C.current;if(!l&&(!T.current.isIOS||!e.clipboardData||!t))return;let r=e.clipboardData.getData(`text/plain`),i=l?l(r):r;e.preventDefault();let a=C.current?.selectionStart,o=C.current?.selectionEnd,s=(a===o?y.slice(0,a??0)+i+y.slice(a??0):y.slice(0,a??0)+i+y.slice(o??0)).slice(0,n);if(!(s.length>0&&S&&!S.test(s))&&t){t.value=s,x(s);let e=Math.min(s.length,n-1),r=s.length;t.setSelectionRange(e,r),M(e),ee(r)}},oe={width:ne.willPushPWMBadge?`calc(100% + ${ne.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:ne.willPushPWMBadge?`inset(0 ${ne.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,fontSize:`var(--root-height)`},se=(0,v.jsx)(`input`,{autoComplete:h.autoComplete||`one-time-code`,...h,"data-input-otp":!0,"data-input-otp-placeholder-shown":y.length===0||void 0,"data-input-otp-mss":j,"data-input-otp-mse":N,inputMode:a,pattern:S?.source,"aria-placeholder":i,className:`pointer-events-auto absolute inset-0 -z-10 flex h-full border-0 border-transparent bg-transparent text-center font-mono text-transparent tabular-nums leading-none tracking-[-.5em] caret-transparent opacity-100 shadow-none outline-none`,style:oe,maxLength:n,value:y,ref:C,onPaste:e=>{ae(e),h.onPaste?.(e)},onChange:re,onMouseOver:e=>{O(!0),h.onMouseOver?.(e)},onMouseLeave:e=>{O(!1),h.onMouseLeave?.(e)},onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&requestAnimationFrame(()=>{let e=C.current;if(e&&document.activeElement===e){let t=e.selectionStart,n=e.selectionEnd;t!==null&&n!==null&&P(t)}}),h.onKeyDown?.(e)},onFocus:e=>{ie(),h.onFocus?.(e)},onBlur:e=>{A(!1),h.onBlur?.(e)}}),ce={slots:Array.from({length:n}).map((e,t)=>{let n=k&&j!==null&&N!==null&&(j===N&&t===j||t>=j&&t<N),r=y[t]===void 0?null:y[t];return{char:r,placeholderChar:y[0]===void 0?i?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:k,isHovering:!h.disabled&&D,setSelection:e=>{let t=C.current;if(!t||h.disabled)return;let r=Math.max(0,Math.min(e,n-1));document.activeElement!==t&&t.focus();let i=y[r]!==void 0,a=r,o=i?r+1:r;t.setSelectionRange(a,o),M(a),ee(o),A(!0)}},le=f===void 0?(0,v.jsx)(Fd.Provider,{value:ce,children:p}):f(ce);return(0,v.jsxs)(v.Fragment,{children:[d!==null&&(0,v.jsx)(`noscript`,{children:(0,v.jsx)(`style`,{children:d})}),(0,v.jsxs)(`div`,{ref:w,className:B(`relative`,h.disabled?`cursor-default`:`cursor-text`,u),children:[le,(0,v.jsx)(`div`,{className:`absolute inset-0`,children:se})]})]})},Ld=({className:e,render:t,...n})=>(0,v.jsx)(Id,{containerClassName:`relative flex items-center gap-2 has-disabled:opacity-50`,className:B(`disabled:cursor-not-allowed`,e),render:t,...n}),Rd=({className:e,...t})=>(0,v.jsx)(`div`,{className:B(`z-10 flex items-center gap-3`,e),...t}),zd=({index:e,className:t,onClick:n,onKeyDown:r,...i})=>{let a=(0,m.useContext)(Fd),{char:o,isActive:s}=a?.slots[e]??{},{setSelection:c}=a??{};return(0,v.jsx)(Ju,{isSelected:s,variant:`input`,color:`custom`,tabIndex:-1,className:B(`relative z-10 px-2!`,s&&`ring-4!`,t),onClick:t=>{c?.(e),n?.(t)},onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),c?.(e)),r?.(t)},label:null,...i,children:(0,v.jsx)(`span`,{className:`relative z-10 flex h-6 w-4 items-center justify-center`,children:o})})},Bd=e=>(0,v.jsx)(`div`,{"aria-hidden":!0,className:`z-0 table h-0.5 w-3 rounded-full bg-border text-text/50`,...e,children:(0,v.jsx)(ou,{})}),Vd=e=>(0,v.jsx)(`div`,{"data-indicator":!0,className:`absolute top-0 z-0 h-full w-auto rounded-xl bg-text/20 ring-4 ring-text/20 transition-[left,width] duration-300 ease-in-out [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl motion-reduce:transition-none`,...e}),Hd=({className:e,...t})=>(0,v.jsxs)(`div`,{className:`relative flex w-full items-center gap-1`,children:[(0,v.jsx)(hu,{className:`absolute left-2 size-4`}),(0,v.jsx)(wd,{...t,type:`search`,className:B(`pl-8`,e)})]}),Ud=e=>{switch(e){case`xs`:return 480;case`sm`:return 640;case`md`:return 768;case`lg`:return 1024;case`xl`:return 1280;case`2xl`:return 1536;default:return e}},Wd=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/android|bb\d+|meego|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(?:hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(?:ob|in)i|palm(?: os)?|phone|p(?:ixi|re)\/|plucker|pocket|psp|series(?:4|6)0|symbian|treo|up\.(?:browser|link)|vodafone|wap|windows ce|windows phone|xda|xiino|zte-/i.test(e)},Gd=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},Kd=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},qd=e=>{if(!(typeof window>`u`))return(window?.innerWidth??0)<=e},Jd=(e=`md`)=>{let t=Ud(e),n=Wd(),r=qd(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n,isIOS:Gd(),isMac:Kd()}},Yd=(e=`md`)=>{let[t,n]=(0,m.useState)(Jd(e));return(0,m.useEffect)(()=>{let t=()=>{n(Jd(e))};return window.addEventListener(`resize`,t,{passive:!0}),()=>window.removeEventListener(`resize`,t)},[e]),t},Xd=e=>e.split(` + `).map(e=>e.trim()),Zd=e=>({"⌘":`Meta`,Ctrl:`Control`,Control:`Control`,Alt:`Alt`,"⌥":`Alt`,Shift:`Shift`,Meta:`Meta`,"↑":`ArrowUp`,"↓":`ArrowDown`,"←":`ArrowLeft`,"→":`ArrowRight`,ArrowUp:`ArrowUp`,ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowRight:`ArrowRight`})[e]||e,Qd=(e,t)=>{let n=t.map(Zd),r={Meta:n.includes(`Meta`),Control:n.includes(`Control`),Alt:n.includes(`Alt`),Shift:n.includes(`Shift`)};if(r.Meta!==e.metaKey||r.Control!==e.ctrlKey||r.Alt!==e.altKey||r.Shift!==e.shiftKey)return!1;let i=t.find(e=>![`⌘`,`Ctrl`,`Control`,`Alt`,`⌥`,`Shift`,`Meta`].includes(Zd(e)));if(!i)return!1;let a=Zd(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},$d=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,ef=(e,t)=>{let n=e;return t?(n=n.replace(/Ctrl/g,`⌘`),n=n.replace(/Alt/g,`⌥`)):(n=n.replace(/⌘/g,`Ctrl`),n=n.replace(/⌥/g,`Alt`)),n=n.replace(/ArrowUp/g,`↑`),n=n.replace(/ArrowDown/g,`↓`),n=n.replace(/ArrowLeft/g,`←`),n=n.replace(/ArrowRight/g,`→`),n},tf=({shortcut:e,onTriggered:t,display:n=!0,disabled:r=!1,className:i,size:a=`md`})=>{let{isMac:o}=Yd(),s=Xd(ef(e,o??!1)),[c,l]=(0,m.useState)(new Set);if((0,m.useEffect)(()=>{let e=e=>{let n=e.target,i=n.tagName===`INPUT`||n.tagName===`TEXTAREA`||n.isContentEditable,a=e.key,c=new Set;if(e.metaKey&&c.add(`⌘`),e.ctrlKey&&c.add(`Ctrl`),e.altKey&&c.add(o?`⌥`:`Alt`),e.shiftKey&&c.add(`Shift`),a.startsWith(`Arrow`)?(c.add(a),c.add($d(a))):c.add(a.toUpperCase()),l(c),!r&&t&&Qd(e,s)){let n=s.includes(`Escape`);if(i&&!n)return;e.preventDefault(),t()}},n=()=>{l(new Set)};return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,n),window.addEventListener(`blur`,n),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,n),window.removeEventListener(`blur`,n)}},[s,t,o,r]),!n)return null;let u=e=>{let t=e.toUpperCase(),n=Zd(e);return c.has(e)||c.has(t)||c.has(n)||e===`⌘`&&c.has(`Meta`)||e===`Ctrl`&&c.has(`Control`)||e===`⌥`&&c.has(`Alt`)||e===`Alt`&&c.has(`Alt`)||e===`←`&&c.has(`ArrowLeft`)||e===`→`&&c.has(`ArrowRight`)||e===`↑`&&c.has(`ArrowUp`)||e===`↓`&&c.has(`ArrowDown`)};return(0,v.jsx)(`kbd`,{className:B(`inline-flex items-center justify-center gap-0.5 p-0.5`,`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,`font-medium font-sans`,`border-1 border-neutral/20 text-neutral`,a===`sm`&&`text-xs`,a===`md`&&`text-sm`,a===`lg`&&`text-base`,i),children:s.map((t,n)=>{let r=`${t}-${n}-${e}`,i=$d(t);return(0,v.jsxs)(`span`,{className:`inline-flex items-center`,children:[n>0&&(0,v.jsx)(`span`,{className:`text-neutral/50`,children:`+`}),(0,v.jsx)(`span`,{className:B(`min-w-4 px-0.5 text-center`,u(t)&&`scale-120 font-bold text-text`),suppressHydrationWarning:!0,children:i})]},r)})})},nf=function(e){return e.START=`start`,e.CENTER=`center`,e.END=`end`,e}({}),rf=function(e){return e.BELOW=`bellow`,e.ABOVE=`above`,e}({}),af=({children:e,className:t,identifier:n,...r})=>(0,v.jsx)(`div`,{className:B(`group/popover relative flex cursor-pointer`,t),id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),of=({children:e,isHidden:t=void 0,isOverable:n=!0,isFocusable:r=!1,xAlign:i=nf.START,yAlign:a=rf.BELOW,identifier:o,className:s,displayArrow:c=!0,...l})=>(0,v.jsx)(Hu,{transparency:`xs`,role:`group`,"aria-hidden":t,"aria-labelledby":`unrollable-panel-button-${o}`,id:`unrollable-panel-${o}`,className:B(`absolute z-50 min-w-full rounded-md ring-1 ring-neutral`,i===`start`&&`left-0`,i===`center`&&`left-1/2 -translate-x-1/2`,i===`end`&&`right-0`,a===`bellow`&&`top-[calc(100%+1rem)]`,a===`above`&&`bottom-[calc(100%+1rem)]`,c&&`before:absolute before:z-[999] before:h-0 before:w-0 before:content-[""]`,c&&i===`start`&&`before:left-2`,c&&i===`center`&&`before:left-1/2 before:-translate-x-1/2`,c&&i===`end`&&`before:right-2`,c&&a===`bellow`&&`before:-top-[10px] before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral before:border-l-[10px] before:border-l-transparent`,c&&a===`above`&&`before:-bottom-[10px] before:border-t-[10px] before:border-t-neutral before:border-r-[10px] before:border-r-transparent before:border-l-[10px] before:border-l-transparent`,`overflow-x-visible opacity-0 transition-all duration-400 ease-in-out`,t===!1?`visible opacity-100 delay-800`:`invisible`,n&&`group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800`,r&&`group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800`,s),...l,children:e});af.Detail=of;var sf=e=>(0,v.jsx)(af,{...e}),cf=({xAlign:e=nf.START,yAlign:t=rf.BELOW,...n})=>{let r=(0,m.useRef)(null),[i,a]=(0,m.useState)(e),[o,s]=(0,m.useState)(t),[c,l]=(0,m.useState)(void 0);return(0,m.useEffect)(()=>{let i=()=>{if(!r.current)return;let i=r.current,o=document.getElementById(`unrollable-panel-button-${n.identifier}`);if(!o)return;let c=o.getBoundingClientRect(),u=window.innerWidth,d=window.innerHeight,f=u-c.left-16,p=c.right-16;l(Math.max(f,p));let m=i.classList.contains(`invisible`);m&&(i.style.visibility=`hidden`,i.classList.remove(`invisible`)),requestAnimationFrame(()=>{let n=i.getBoundingClientRect();m&&(i.style.visibility=``,i.classList.add(`invisible`));let r=t,o=d-c.bottom-16,l=c.top-16;t===rf.BELOW&&o<n.height?l>=n.height&&(r=rf.ABOVE):t===rf.ABOVE&&l<n.height&&o>=n.height&&(r=rf.BELOW);let f=e,p=u-c.left-16,h=c.right-16;e===nf.START&&p<n.width?h>=n.width&&(f=nf.END):e===nf.END&&h<n.width&&p>=n.width&&(f=nf.START),s(r),a(f)})},o=setTimeout(i,0),c=document.getElementById(`unrollable-panel-button-${n.identifier}`);c&&(c.addEventListener(`mouseenter`,i),c.addEventListener(`focusin`,i));let u=new ResizeObserver(()=>{i()});return r.current&&u.observe(r.current),window.addEventListener(`resize`,i),window.addEventListener(`scroll`,i,!0),()=>{clearTimeout(o),c&&(c.removeEventListener(`mouseenter`,i),c.removeEventListener(`focusin`,i)),u.disconnect(),window.removeEventListener(`resize`,i),window.removeEventListener(`scroll`,i,!0)}},[n.identifier,e,t]),(0,v.jsx)(of,{...n,xAlign:i,yAlign:o,ref:r,style:{...n.style,maxWidth:c?`${c}px`:void 0}})},lf=sf;lf.Detail=cf;var uf=m.useId||(()=>void 0),df=0;function ff(e){let[t,n]=m.useState(uf());return Sc(()=>{e||n(e=>e??String(df++))},[e]),e||(t?`radix-${t}`:``)}var pf=`focusScope.autoFocusOnMount`,mf=`focusScope.autoFocusOnUnmount`,hf={bubbles:!1,cancelable:!0},gf=`FocusScope`,_f=m.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=m.useState(null),l=ac(i),u=ac(a),d=m.useRef(null),f=Ks(t,e=>c(e)),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:wf(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||wf(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&wf(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),m.useEffect(()=>{if(s){Tf.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(pf,hf);s.addEventListener(pf,l),s.dispatchEvent(t),t.defaultPrevented||(vf(Of(bf(s)),{select:!0}),document.activeElement===e&&wf(s))}return()=>{s.removeEventListener(pf,l),setTimeout(()=>{let t=new CustomEvent(mf,hf);s.addEventListener(mf,u),s.dispatchEvent(t),t.defaultPrevented||wf(e??document.body,{select:!0}),s.removeEventListener(mf,u),Tf.remove(p)},0)}}},[s,l,u,p]);let h=m.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=yf(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&wf(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&wf(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,v.jsx)(V.div,{tabIndex:-1,...o,ref:f,onKeyDown:h})});_f.displayName=gf;function vf(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(wf(r,{select:t}),document.activeElement!==n)return}function yf(e){let t=bf(e);return[xf(t,e),xf(t.reverse(),e)]}function bf(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xf(e,t){for(let n of e)if(!Sf(n,{upTo:t}))return n}function Sf(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}function Cf(e){return e instanceof HTMLInputElement&&`select`in e}function wf(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Cf(e)&&t&&e.select()}}var Tf=Ef();function Ef(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Df(e,t),e.unshift(t)},remove(t){e=Df(e,t),e[0]?.resume()}}}function Df(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Of(e){return e.filter(e=>e.tagName!==`A`)}var kf=0;function Af(){m.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??jf()),document.body.insertAdjacentElement(`beforeend`,e[1]??jf()),kf++,()=>{kf===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),kf--}},[])}function jf(){let 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}var Mf=function(){return Mf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Mf.apply(this,arguments)};function Nf(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Pf(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ff=`right-scroll-bar-position`,If=`width-before-scroll-bar`,Lf=`with-scroll-bars-hidden`,Rf=`--removed-body-scroll-bar-size`;function zf(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Bf(e,t){var n=(0,m.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Vf=typeof window<`u`?m.useLayoutEffect:m.useEffect,Hf=new WeakMap;function Uf(e,t){var n=Bf(t||null,function(t){return e.forEach(function(e){return zf(e,t)})});return Vf(function(){var t=Hf.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||zf(e,null)}),i.forEach(function(e){r.has(e)||zf(e,a)})}Hf.set(n,e)},[e]),n}function Wf(e){return e}function Gf(e,t){t===void 0&&(t=Wf);var n=[],r=!1;return{read:function(){if(r)throw 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(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Kf(e){e===void 0&&(e={});var t=Gf(null);return t.options=Mf({async:!0,ssr:!1},e),t}var qf=function(e){var t=e.sideCar,n=Nf(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return m.createElement(r,Mf({},n))};qf.isSideCarExport=!0;function Jf(e,t){return e.useMedium(t),qf}var Yf=Kf(),Xf=function(){},Zf=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:Xf,onWheelCapture:Xf,onTouchMoveCapture:Xf}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Nf(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=Uf([n,t]),w=Mf(Mf({},x),i);return m.createElement(m.Fragment,null,u&&m.createElement(S,{sideCar:Yf,removeScrollBar:l,shards:d,noRelative:p,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?m.cloneElement(m.Children.only(s),Mf(Mf({},w),{ref:C})):m.createElement(y,Mf({},w,{className:c,ref:C}),s))});Zf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Zf.classNames={fullWidth:If,zeroRight:Ff};var Qf,$f=function(){if(Qf)return Qf;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function ep(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=$f();return t&&e.setAttribute(`nonce`,t),e}function tp(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function np(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var rp=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ep())&&(tp(t,n),np(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ip=function(){var e=rp();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ap=function(){var e=ip();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},op={left:0,top:0,right:0,gap:0},sp=function(e){return parseInt(e||``,10)||0},cp=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[sp(n),sp(r),sp(i)]},lp=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return op;var t=cp(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},up=ap(),dp=`data-scroll-locked`,fp=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
48
|
+
.${Lf} {
|
|
49
|
+
overflow: hidden ${r};
|
|
50
|
+
padding-right: ${s}px ${r};
|
|
51
|
+
}
|
|
52
|
+
body[${dp}] {
|
|
53
|
+
overflow: hidden ${r};
|
|
54
|
+
overscroll-behavior: contain;
|
|
55
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
56
|
+
padding-left: ${i}px;
|
|
57
|
+
padding-top: ${a}px;
|
|
58
|
+
padding-right: ${o}px;
|
|
59
|
+
margin-left:0;
|
|
60
|
+
margin-top:0;
|
|
61
|
+
margin-right: ${s}px ${r};
|
|
62
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.${Ff} {
|
|
66
|
+
right: ${s}px ${r};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.${If} {
|
|
70
|
+
margin-right: ${s}px ${r};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.${Ff} .${Ff} {
|
|
74
|
+
right: 0 ${r};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.${If} .${If} {
|
|
78
|
+
margin-right: 0 ${r};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
body[${dp}] {
|
|
82
|
+
${Rf}: ${s}px;
|
|
83
|
+
}
|
|
84
|
+
`},pp=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},mp=function(){m.useEffect(function(){return document.body.setAttribute(dp,(pp()+1).toString()),function(){var e=pp()-1;e<=0?document.body.removeAttribute(dp):document.body.setAttribute(dp,e.toString())}},[])},hp=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;mp();var a=m.useMemo(function(){return lp(i)},[i]);return m.createElement(up,{styles:fp(a,!t,i,n?``:`!important`)})},gp=!1;if(typeof window<`u`)try{var _p=Object.defineProperty({},`passive`,{get:function(){return gp=!0,!0}});window.addEventListener(`test`,_p,_p),window.removeEventListener(`test`,_p,_p)}catch{gp=!1}var vp=gp?{passive:!1}:!1,yp=function(e){return e.tagName===`TEXTAREA`},bp=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!yp(e)&&n[t]===`visible`)},xp=function(e){return bp(e,`overflowY`)},Sp=function(e){return bp(e,`overflowX`)},Cp=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Ep(e,r)){var i=Dp(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wp=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Tp=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Ep=function(e,t){return e===`v`?xp(t):Sp(t)},Dp=function(e,t){return e===`v`?wp(t):Tp(t)},Op=function(e,t){return e===`h`&&t===`rtl`?-1:1},kp=function(e,t,n,r,i){var a=Op(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Dp(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Ep(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Ap=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jp=function(e){return[e.deltaX,e.deltaY]},Mp=function(e){return e&&`current`in e?e.current:e},Np=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Pp=function(e){return`
|
|
85
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
86
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
87
|
+
`},Fp=0,Ip=[];function Lp(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),i=m.useState(Fp++)[0],a=m.useState(ap)[0],o=m.useRef(e);m.useEffect(function(){o.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Pf([e.lockRef.current],(e.shards||[]).map(Mp),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=m.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ap(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Cp(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Cp(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return kp(h,t,e,h===`h`?s:c,!0)},[]),c=m.useCallback(function(e){var n=e;if(!(!Ip.length||Ip[Ip.length-1]!==a)){var r=`deltaY`in n?jp(n):Ap(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Np(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Mp).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=m.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Rp(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=m.useCallback(function(e){n.current=Ap(e),r.current=void 0},[]),d=m.useCallback(function(t){l(t.type,jp(t),t.target,s(t,e.lockRef.current))},[]),f=m.useCallback(function(t){l(t.type,Ap(t),t.target,s(t,e.lockRef.current))},[]);m.useEffect(function(){return Ip.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,vp),document.addEventListener(`touchmove`,c,vp),document.addEventListener(`touchstart`,u,vp),function(){Ip=Ip.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,vp),document.removeEventListener(`touchmove`,c,vp),document.removeEventListener(`touchstart`,u,vp)}},[]);var p=e.removeScrollBar,h=e.inert;return m.createElement(m.Fragment,null,h?m.createElement(a,{styles:Pp(i)}):null,p?m.createElement(hp,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Rp(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var zp=Jf(Yf,Lp),Bp=m.forwardRef(function(e,t){return m.createElement(Zf,Mf({},e,{ref:t,sideCar:zp}))});Bp.classNames=Zf.classNames;var Vp=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Hp=new WeakMap,Up=new WeakMap,Wp={},Gp=0,Kp=function(e){return e&&(e.host||Kp(e.parentNode))},qp=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Kp(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Jp=function(e,t,n,r){var i=qp(t,Array.isArray(e)?e:[e]);Wp[n]||(Wp[n]=new WeakMap);var a=Wp[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Hp.get(e)||0)+1,l=(a.get(e)||0)+1;Hp.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Up.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Gp++,function(){o.forEach(function(e){var t=Hp.get(e)-1,i=a.get(e)-1;Hp.set(e,t),a.set(e,i),t||(Up.has(e)||e.removeAttribute(r),Up.delete(e)),i||e.removeAttribute(n)}),Gp--,Gp||(Hp=new WeakMap,Hp=new WeakMap,Up=new WeakMap,Wp={})}},Yp=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Vp(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Jp(r,i,n,`aria-hidden`)):function(){return null}},Xp=`Dialog`,[Zp,Qp]=Js(Xp),[$p,em]=Zp(Xp),tm=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=m.useRef(null),c=m.useRef(null),[l,u]=jc({prop:r,defaultProp:i??!1,onChange:a,caller:Xp});return(0,v.jsx)($p,{scope:t,triggerRef:s,contentRef:c,contentId:ff(),titleId:ff(),descriptionId:ff(),open:l,onOpenChange:u,onOpenToggle:m.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};tm.displayName=Xp;var nm=`DialogTrigger`,rm=m.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=em(nm,n),a=Ks(t,i.triggerRef);return(0,v.jsx)(V.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Cm(i.open),...r,ref:a,onClick:Us(e.onClick,i.onOpenToggle)})});rm.displayName=nm;var im=`DialogPortal`,[am,om]=Zp(im,{forceMount:void 0}),sm=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=em(im,t);return(0,v.jsx)(am,{scope:t,forceMount:n,children:m.Children.map(r,e=>(0,v.jsx)(Ec,{present:n||a.open,children:(0,v.jsx)(wc,{asChild:!0,container:i,children:e})}))})};sm.displayName=im;var cm=`DialogOverlay`,lm=m.forwardRef((e,t)=>{let n=om(cm,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=em(cm,e.__scopeDialog);return a.modal?(0,v.jsx)(Ec,{present:r||a.open,children:(0,v.jsx)(dm,{...i,ref:t})}):null});lm.displayName=cm;var um=Xs(`DialogOverlay.RemoveScroll`),dm=m.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=em(cm,n);return(0,v.jsx)(Bp,{as:um,allowPinchZoom:!0,shards:[i.contentRef],children:(0,v.jsx)(V.div,{"data-state":Cm(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),fm=`DialogContent`,pm=m.forwardRef((e,t)=>{let n=om(fm,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=em(fm,e.__scopeDialog);return(0,v.jsx)(Ec,{present:r||a.open,children:a.modal?(0,v.jsx)(mm,{...i,ref:t}):(0,v.jsx)(hm,{...i,ref:t})})});pm.displayName=fm;var mm=m.forwardRef((e,t)=>{let n=em(fm,e.__scopeDialog),r=m.useRef(null),i=Ks(t,n.contentRef,r);return m.useEffect(()=>{let e=r.current;if(e)return Yp(e)},[]),(0,v.jsx)(gm,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Us(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Us(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Us(e.onFocusOutside,e=>e.preventDefault())})}),hm=m.forwardRef((e,t)=>{let n=em(fm,e.__scopeDialog),r=m.useRef(!1),i=m.useRef(!1);return(0,v.jsx)(gm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),gm=m.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=em(fm,n),c=m.useRef(null),l=Ks(t,c);return Af(),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(_f,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,v.jsx)(pc,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Cm(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(Dm,{titleId:s.titleId}),(0,v.jsx)(km,{contentRef:c,descriptionId:s.descriptionId})]})]})}),_m=`DialogTitle`,vm=m.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=em(_m,n);return(0,v.jsx)(V.h2,{id:i.titleId,...r,ref:t})});vm.displayName=_m;var ym=`DialogDescription`,bm=m.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=em(ym,n);return(0,v.jsx)(V.p,{id:i.descriptionId,...r,ref:t})});bm.displayName=ym;var xm=`DialogClose`,Sm=m.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=em(xm,n);return(0,v.jsx)(V.button,{type:`button`,...r,ref:t,onClick:Us(e.onClick,()=>i.onOpenChange(!1))})});Sm.displayName=xm;function Cm(e){return e?`open`:`closed`}var wm=`DialogTitleWarning`,[Tm,Em]=qs(wm,{contentName:fm,titleName:_m,docsSlug:`dialog`}),Dm=({titleId:e})=>{let t=Em(wm),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
88
|
+
|
|
89
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
90
|
+
|
|
91
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return m.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Om=`DialogDescriptionWarning`,km=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Em(Om).contentName}}.`;return m.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Am=tm,jm=sm,Mm=lm,Nm=pm,Pm=1,Fm=.9,Im=.8,Lm=.17,Rm=.1,zm=.999,Bm=.9999,Vm=.99,Hm=/[\\\/_+.#"@\[\(\{&]/,Um=/[\\\/_+.#"@\[\(\{&]/g,Wm=/[\s-]/,Gm=/[\s-]/g;function Km(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?Pm:Vm;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Km(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=Pm:Hm.test(e.charAt(l-1))?(d*=Im,p=e.slice(i,l-1).match(Um),p&&i>0&&(d*=zm**+p.length)):Wm.test(e.charAt(l-1))?(d*=Fm,m=e.slice(i,l-1).match(Gm),m&&i>0&&(d*=zm**+m.length)):(d*=Lm,i>0&&(d*=zm**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Bm)),(d<Rm&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Km(e,t,n,r,l+1,a+2,o),f*Rm>d&&(d=f*Rm)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function qm(e){return e.toLowerCase().replace(Gm,` `)}function Jm(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Km(e,t,qm(e),qm(t),0,0,{})}var Ym=`[cmdk-group=""]`,Xm=`[cmdk-group-items=""]`,Zm=`[cmdk-group-heading=""]`,Qm=`[cmdk-item=""]`,$m=`${Qm}:not([aria-disabled="true"])`,eh=`cmdk-item-select`,th=`data-value`,nh=(e,t,n)=>Jm(e,t,n),rh=m.createContext(void 0),ih=()=>m.useContext(rh),ah=m.createContext(void 0),oh=()=>m.useContext(ah),sh=m.createContext(void 0),ch=m.forwardRef((e,t)=>{let n=Sh(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=Sh(()=>new Set),i=Sh(()=>new Map),a=Sh(()=>new Map),o=Sh(()=>new Set),s=bh(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:g=!1,vimBindings:_=!0,...v}=e,y=ff(),b=ff(),x=ff(),S=m.useRef(null),C=Th();xh(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),xh(()=>{C(6,A)},[]);let w=m.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)k(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(y))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=j()?.id,w.emit()}),r||C(5,A),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=m.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{k(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();C(4,()=>{k(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??nh;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;M().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(Xm);t?t.appendChild(e.parentElement===t?e:e.closest(`${Xm} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Xm} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${Ym}[${th}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(th);w.setState(`value`,e||void 0)}function k(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function A(){var e;let t=j();t&&(t.parentElement?.firstChild===t&&((e=t.closest(Ym)?.querySelector(Zm))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${Qm}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll($m)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(th))}function ee(e){var t;let n=j(),r=M(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(th))}function te(e){let t=j()?.closest(Ym),n;for(;t&&!n;)t=e>0?vh(t,Ym):yh(t,Ym),n=t?.querySelector($m);n?w.setState(`value`,n.getAttribute(th)):ee(e)}let P=()=>N(M().length-1),F=e=>{e.preventDefault(),e.metaKey?P():e.altKey?te(1):ee(1)},ne=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?te(-1):ee(-1)};return m.createElement(V.div,{ref:t,tabIndex:-1,...v,"cmdk-root":``,onKeyDown:e=>{var t;(t=v.onKeyDown)==null||t.call(v,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:_&&e.ctrlKey&&F(e);break;case`ArrowDown`:F(e);break;case`p`:case`k`:_&&e.ctrlKey&&ne(e);break;case`ArrowUp`:ne(e);break;case`Home`:e.preventDefault(),N(0);break;case`End`:e.preventDefault(),P();break;case`Enter`:{e.preventDefault();let t=j();if(t){let e=new Event(eh);t.dispatchEvent(e)}}}}},m.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:Oh},c),Dh(e,e=>m.createElement(ah.Provider,{value:w},m.createElement(rh.Provider,{value:T},e))))}),lh=m.forwardRef((e,t)=>{let n=ff(),r=m.useRef(null),i=m.useContext(sh),a=ih(),o=bh(e),s=o.current?.forceMount??i?.forceMount;xh(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=wh(n,r,[e.value,e.children,r],e.keywords),l=oh(),u=Ch(e=>e.value&&e.value===c.current),d=Ch(e=>s||a.filter()===!1?!0:e.search?e.filtered.items.get(n)>0:!0);m.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(eh,f),()=>t.removeEventListener(eh,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:h,value:g,onSelect:_,forceMount:v,keywords:y,...b}=e;return m.createElement(V.div,{ref:Gs(r,t),...b,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!h,"aria-selected":!!u,"data-disabled":!!h,"data-selected":!!u,onPointerMove:h||a.getDisablePointerSelection()?void 0:p,onClick:h?void 0:f},e.children)}),uh=m.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=ff(),s=m.useRef(null),c=m.useRef(null),l=ff(),u=ih(),d=Ch(e=>i||u.filter()===!1?!0:e.search?e.filtered.groups.has(o):!0);xh(()=>u.group(o),[]),wh(o,s,[e.value,e.heading,c]);let f=m.useMemo(()=>({id:o,forceMount:i}),[i]);return m.createElement(V.div,{ref:Gs(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:d?void 0:!0},n&&m.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),Dh(e,e=>m.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},m.createElement(sh.Provider,{value:f},e))))}),dh=m.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=m.useRef(null),a=Ch(e=>!e.search);return!n&&!a?null:m.createElement(V.div,{ref:Gs(i,t),...r,"cmdk-separator":``,role:`separator`})}),fh=m.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=oh(),o=Ch(e=>e.search),s=Ch(e=>e.selectedItemId),c=ih();return m.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),m.createElement(V.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),ph=m.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=m.useRef(null),o=m.useRef(null),s=Ch(e=>e.selectedItemId),c=ih();return m.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),m.createElement(V.div,{ref:Gs(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},Dh(e,e=>m.createElement(`div`,{ref:Gs(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),mh=m.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return m.createElement(Am,{open:n,onOpenChange:r},m.createElement(jm,{container:o},m.createElement(Mm,{"cmdk-overlay":``,className:i}),m.createElement(Nm,{"aria-label":e.label,"cmdk-dialog":``,className:a},m.createElement(ch,{ref:t,...s}))))}),hh=m.forwardRef((e,t)=>Ch(e=>e.filtered.count===0)?m.createElement(V.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),gh=m.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return m.createElement(V.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Dh(e,e=>m.createElement(`div`,{"aria-hidden":!0},e)))}),_h=Object.assign(ch,{List:ph,Item:lh,Input:fh,Group:uh,Separator:dh,Dialog:mh,Empty:hh,Loading:gh});function vh(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function yh(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function bh(e){let t=m.useRef(e);return xh(()=>{t.current=e}),t}var xh=typeof window>`u`?m.useEffect:m.useLayoutEffect;function Sh(e){let t=m.useRef();return t.current===void 0&&(t.current=e()),t}function Ch(e){let t=oh(),n=()=>e(t.snapshot());return m.useSyncExternalStore(t.subscribe,n,n)}function wh(e,t,n,r=[]){let i=m.useRef(),a=ih();return xh(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(th,s),i.current=s}),i}var Th=()=>{let[e,t]=m.useState(),n=Sh(()=>new Map);return xh(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function Eh(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function Dh({asChild:e,children:t},n){return e&&m.isValidElement(t)?m.cloneElement(Eh(t),{ref:t.ref},n(t.props.children)):n(t)}var Oh={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},kh=({className:e,...t})=>(0,v.jsx)(_h,{className:B(`flex flex-col overflow-hidden rounded-md`,e),...t}),Ah=({children:e,...t})=>(0,v.jsx)(tm,{...t,children:(0,v.jsx)(pm,{className:`overflow-hidden p-0`,children:(0,v.jsx)(kh,{className:`[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]_svg]:size-5`,children:e})})}),jh=({className:e,...t})=>(0,v.jsxs)(`div`,{className:`flex w-full items-center`,"cmdk-input-wrapper":``,children:[(0,v.jsx)(hu,{className:`mr-2 size-4 shrink-0 opacity-50`}),(0,v.jsx)(_h.Input,{className:B(`flex w-full rounded-md bg-transparent text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]}),Mh=({className:e,...t})=>(0,v.jsx)(_h.List,{className:B(`max-h-[300px] overflow-y-auto overflow-x-hidden`,e),...t}),Nh=e=>(0,v.jsx)(_h.Empty,{className:`py-6 text-center text-sm`,...e}),Ph=({className:e,...t})=>(0,v.jsx)(_h.Group,{className:B(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-xs`,e),...t}),Fh=({className:e,...t})=>(0,v.jsx)(_h.Separator,{className:B(`-mx-1 h-px bg-border`,e),...t}),Ih=({className:e,...t})=>(0,v.jsx)(_h.Item,{className:B(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50`,e),...t}),Lh=({className:e,...t})=>(0,v.jsx)(`span`,{className:B(`ml-auto text-muted-foreground text-xs tracking-widest`,e),...t}),Rh={...kh,Dialog:Ah,Input:jh,List:Mh,Empty:Nh,Group:Ph,Separator:Fh,Item:Ih,Shortcut:Lh},zh={key:`copy-button`,content:{nodeType:`translation`,translation:{en:{label:`Copy content`},"en-GB":{label:`Copy content`},fr:{label:`Copier le contenu`},es:{label:`Copiar contenido`},de:{label:`Inhalt kopieren`},ja:{label:`コンテンツをコピー`},ko:{label:`콘텐츠 복사`},zh:{label:`复制内容`},it:{label:`Copia contenuto`},pt:{label:`Copiar conteúdo`},hi:{label:`सामग्री कॉपी करें`},ar:{label:`نسخ المحتوى`},ru:{label:`Копировать содержимое`}}},localIds:[`copy-button::local::../@intlayer/design-system/dist/esm/components/CopyButton/CopyButton.content.mjs`]},Bh=({content:e,...t})=>{let[n,r]=(0,m.useState)(!1),[i,a]=(0,m.useState)(!1),{label:o}=mr(zh),s=async()=>{try{a(!1),await navigator.clipboard.writeText(e),r(!0)}catch(e){console.error(`Failed to copy text: `,e),a(!0)}};(0,m.useEffect)(()=>{if(n||i){let e=setTimeout(()=>{r(!1),a(!1)},1e3);return()=>clearTimeout(e)}},[n,i]);let c=()=>n?`Content copied to clipboard`:i?`Failed to copy content`:t.label??o.value;return(0,v.jsx)(Ju,{Icon:n?$l:eu,onClick:s,variant:W.HOVERABLE,color:G.TEXT,size:U.ICON_SM,tabIndex:0,title:c(),...t,label:c(),"aria-describedby":n?`copy-success`:i?`copy-error`:void 0})},Vh=(e,t=2e3,n,r)=>{let[i,a]=(0,m.useState)(!1);return{isCopied:i,copy:async()=>{if(e)try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(e);else{r?.(Error(`Clipboard API not supported in this browser`));return}a(!0),setTimeout(()=>a(!1),t),n?.()}catch(e){let t=e instanceof Error?e.message:`Failed to copy to clipboard`;r?.(e instanceof Error?e:Error(t))}}}},Hh=({text:e,children:t,className:n,"aria-label":r=`Copy to clipboard`,"aria-copied-label":i=`Copied to clipboard`,feedbackDuration:a=2e3,onCopySuccess:o,onCopyError:s,disable:c,preventDefault:l=!0,stopPropagation:u=!0,size:d=14})=>{let{isCopied:f,copy:p}=Vh(e,a,o,s);if(c)return(0,v.jsx)(`span`,{className:n,children:t});let m=e=>{(e.key===`Enter`||e.key===` `)&&h(e)},h=e=>{l&&e.preventDefault(),u&&e.stopPropagation(),p()},g=f?i:r,_=f?$l:eu;return(0,v.jsxs)(`span`,{className:B(`inline-flex max-w-full cursor-pointer items-center gap-2 rounded-md p-0.5 hover:bg-neutral/10`,n),onClick:h,onKeyDown:m,role:`button`,tabIndex:0,"aria-label":g,"aria-pressed":f,"data-testid":`copy-to-clipboard`,children:[(0,v.jsx)(`span`,{className:`min-w-0 break-all`,children:t}),e&&(0,v.jsx)(_,{className:`ml-1 ml-auto shrink-0`,size:d,"aria-hidden":`true`})]})},Uh=e=>e?.getAttribute(`aria-selected`)===`true`,Wh=(e,{selector:t=Uh,isHoverable:n=!1,orientation:r=`horizontal`}={selector:Uh,isHoverable:!1,orientation:`horizontal`})=>{let[i,a]=(0,m.useState)(null),[o,s]=(0,m.useState)(null),c=(0,m.useRef)(null),l=(0,m.useRef)(null),u=e.current.length,d=()=>{let n=null;if(o?(n=o,c.current&&=(clearTimeout(c.current),null)):n=e.current.find(t)??null,!n){a(r===`vertical`?e=>{let t=e,n={top:t?.top??0,height:t?.height??0,opacity:0};return l.current=n,n}:e=>{let t=e,n={left:t?.left??0,width:t?.width??0,opacity:0};return l.current=n,n});return}if(r===`vertical`){let e={top:n.offsetTop,height:n.offsetHeight,opacity:1};a(e),l.current=e}else{let e={left:n.offsetLeft,width:n.offsetWidth,opacity:1};a(e),l.current=e}};return(0,m.useEffect)(()=>{d(),window.addEventListener(`resize`,d),window.addEventListener(`DOMContentLoaded`,d);let r=[];e.current.forEach(e=>{if(e){let t=new MutationObserver(e=>{for(let t of e)if(t.type===`attributes`&&t.attributeName===`aria-selected`){d();break}});t.observe(e,{attributes:!0,attributeFilter:[`aria-selected`]}),r.push(t)}});let i=[],a=e=>{if(!e)return;let t=new ResizeObserver(()=>{d()});t.observe(e),i.push(t)},l=e.current.find(t)??null;l&&a(l),o&&a(o);let u=e=>{c.current&&=(clearTimeout(c.current),null),s(e.currentTarget)},f=()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{s(null)},150)};return n&&e.current.forEach(e=>{e?.addEventListener(`mouseenter`,u,{passive:!0}),e?.addEventListener(`mouseleave`,f,{passive:!0})}),()=>{c.current&&clearTimeout(c.current),window.removeEventListener(`resize`,d),window.removeEventListener(`DOMContentLoaded`,d),r.forEach(e=>{e.disconnect()}),i.forEach(e=>{e.disconnect()}),e.current.forEach(e=>{e?.removeEventListener(`mouseenter`,u),e?.removeEventListener(`mouseleave`,f)})}},[e,t,o,u,r]),{choiceIndicatorPosition:i,calculatePosition:d,orientation:r}},Gh=[{content:`Off`,value:!1},{content:`On`,value:!0}],Kh=function(e){return e.PRIMARY=`primary`,e.SECONDARY=`secondary`,e.DESTRUCTIVE=`destructive`,e.NEUTRAL=`neutral`,e.LIGHT=`light`,e.DARK=`dark`,e.TEXT=`text`,e}({}),qh=Fl(`flex w-fit cursor-pointer flex-row gap-2 rounded-full border-[1.3px] p-[1.5px]`,{variants:{color:{[`${Kh.PRIMARY}`]:`border-primary text-primary`,[`${Kh.SECONDARY}`]:`border-secondary text-secondary`,[`${Kh.DESTRUCTIVE}`]:`border-destructive bg-destructive text-destructive`,[`${Kh.NEUTRAL}`]:`border-neutral text-neutral`,[`${Kh.LIGHT}`]:`border-white text-white`,[`${Kh.DARK}`]:`border-neutral-800 text-neutral-800`,[`${Kh.TEXT}`]:`border-text text-text`},disabled:{true:`cursor-not-allowed opacity-50`,false:``}},defaultVariants:{color:`${Kh.PRIMARY}`,disabled:!1}}),Jh=function(e){return e.SM=`sm`,e.MD=`md`,e.LG=`lg`,e}({}),Yh=Fl(`z-1 w-full flex-1 cursor-pointer font-medium text-sm transition-all duration-300 ease-in-out aria-selected:cursor-default data-[indicator=true]:text-text-opposite motion-reduce:transition-none`,{variants:{size:{[`${Jh.SM}`]:`px-2 py-1 text-xs`,[`${Jh.MD}`]:`p-2 text-sm`,[`${Jh.LG}`]:`p-4 text-base`}},defaultVariants:{size:`${Jh.MD}`}}),Xh=Fl(`absolute top-0 z-0 h-full w-auto rounded-full transition-[left,width] duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{[`${Kh.PRIMARY}`]:`bg-primary data-[indicator=true]:text-text`,[`${Kh.SECONDARY}`]:`bg-secondary data-[indicator=true]:text-text`,[`${Kh.DESTRUCTIVE}`]:`bg-destructive data-[indicator=true]:text-text`,[`${Kh.NEUTRAL}`]:`bg-neutral data-[indicator=true]:text-white`,[`${Kh.LIGHT}`]:`bg-white data-[indicator=true]:text-black`,[`${Kh.DARK}`]:`bg-neutral-800 data-[indicator=true]:text-white`,[`${Kh.TEXT}`]:`bg-text data-[indicator=true]:text-text-opposite`}}}),Zh=({choices:e=Gh,value:t,defaultValue:n,onChange:r,color:i=Kh.PRIMARY,size:a=Jh.MD,className:o,itemClassName:s,hoverable:c=!0,disabled:l=!1})=>{let[u,d]=(0,m.useState)(t??n??e[0].value),[f,p]=(0,m.useState)(null),h=(0,m.useRef)([]),g=(0,m.useRef)(null),{choiceIndicatorPosition:_}=Wh(h,{isHoverable:c}),y=e.findIndex(e=>e.value===u),b=c&&f!==null?f:y,x=e=>{d(e),r?.(e)};return(0,m.useEffect)(()=>{t!==void 0&&d(t)},[t]),(0,v.jsx)(`div`,{className:qh({color:i,disabled:l,className:o}),role:`tablist`,"aria-disabled":l?`true`:void 0,children:(0,v.jsxs)(`div`,{className:`relative flex size-full flex-row items-center justify-center`,children:[e.map((e,t)=>{let{content:n,value:r,...i}=e,o=typeof r==`string`||typeof r==`number`,c=t===y,u=t===b;return(0,m.createElement)(`button`,{...i,className:B(Yh({size:a}),l&&`cursor-not-allowed`,s),key:o?r:t,role:`tab`,onClick:()=>x(r),"aria-selected":c?`true`:void 0,"data-indicator":u?`true`:void 0,disabled:l||c,tabIndex:c?0:-1,ref:e=>{h.current[t]=e},onMouseEnter:()=>!l&&p(t),onMouseLeave:()=>!l&&p(null)},n)}),_&&(0,v.jsx)(`div`,{className:B(Xh({color:i})),style:_,ref:g})]})})},Qh=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=(0,m.useState)(!1),l=(0,m.useRef)(null),u=e=>{e.stopPropagation(),c(!1),n()},d=e=>{e.stopPropagation(),c(!1),t()},f=!e||e===``?`-`:e,p=(0,m.useCallback)(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||l.current&&!l.current.contains(e.target)&&(c(!1),n())},[n]);return(0,m.useEffect)(()=>(s?document.addEventListener(`click`,p):document.removeEventListener(`click`,p),()=>document.removeEventListener(`click`,p)),[p,s]),(0,v.jsxs)(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:l,...o,children:[(0,v.jsxs)(`div`,{className:B(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,(0,v.jsx)(Ju,{label:`Save`,variant:W.HOVERABLE,size:U.ICON_SM,color:G.TEXT,Icon:ql,onClick:u,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),(0,v.jsx)(Ju,{label:`Cancel`,color:G.TEXT,variant:W.HOVERABLE,className:`!text-current`,size:U.ICON_SM,Icon:vu,onClick:d,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),(0,v.jsxs)(`div`,{className:B(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[(0,v.jsx)(`span`,{className:`ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:f}),(0,v.jsx)(Ju,{label:`Edit`,Icon:uu,color:G.TEXT,variant:W.HOVERABLE,size:U.ICON_SM,className:`!text-current invisible group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})},$h=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,m.useRef)(null);return(0,m.useImperativeHandle)(n,()=>i.current),(0,v.jsx)(Qh,{value:(0,m.useMemo)(()=>r.value??i.current?.value??r.defaultValue,[r.value,r.defaultValue,i.current?.value]),onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},children:(0,v.jsx)(wd,{ref:i,...r})})},eg=``,tg=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(eg).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===eg?``:t.split(eg).join(``)}).join(`
|
|
92
|
+
`)},ng=e=>{let t=e.split(`
|
|
93
|
+
`);return t.length===0?[``]:t},rg=(()=>{if(typeof Intl>`u`||!(`Segmenter`in Intl))return null;let e=Intl.Segmenter;return new e(void 0,{granularity:`grapheme`})})(),ig=(e,t)=>{if(t<=0)return 0;if(rg){let n=[...rg.segment(e.slice(0,t))],r=n[n.length-1];return r?t-r.segment.length:t-1}let n=e.charCodeAt(t-1);return n>=56320&&n<=57343&&t>=2?t-2:t-1},ag=(e,t)=>{if(t>=e.length)return e.length;if(rg){let n=[...rg.segment(e.slice(t))][0];return n?t+n.segment.length:t+1}let n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length?t+2:t+1},og=(e,t)=>{if(t<=0)return 0;let n=t-1;for(;n>0&&/\s/.test(e[n-1]);)n--;for(;n>0&&/\S/.test(e[n-1]);)n--;return n},sg=(e,t)=>{if(t>=e.length)return e.length;let n=t;for(;n<e.length&&/\S/.test(e[n]);)n++;for(;n<e.length&&/\s/.test(e[n]);)n++;return n},cg=(e,t)=>e.slice(0,t).lastIndexOf(`
|
|
94
|
+
`)+1,lg=(e,t)=>{let n=e.indexOf(`
|
|
95
|
+
`,t);return n===-1?e.length:n},ug=({value:e,defaultValue:t,onChange:n,disabled:r=!1})=>{let i=e??t??``,[a,o]=(0,m.useState)(()=>ng(i)),s=(0,m.useRef)(null),c=(0,m.useRef)(null),l=e!==void 0,u=(0,m.useRef)(a);u.current=a,(0,m.useEffect)(()=>{l&&e!==void 0&&o(ng(e))},[e,l]);let d=()=>u.current.join(`
|
|
96
|
+
`),f=()=>{let e=window.getSelection();if(!e?.rangeCount||!s.current)return null;let t=e.getRangeAt(0),n=s.current.querySelectorAll(`[data-line]`);for(let e=0;e<n.length;e++)if(n[e].contains(t.startContainer))return{line:e,offset:t.startOffset};return null},p=()=>{let e=window.getSelection();if(!e?.rangeCount||!s.current)return null;let t=e.getRangeAt(0),n=s.current.querySelectorAll(`[data-line]`),r=u.current,i=(e,t)=>{for(let i=0;i<n.length;i++)if(n[i].contains(e)){let e=0;for(let t=0;t<i;t++)e+=r[t].length+1;return e+Math.min(t,r[i]?.length??0)}return e===s.current?t===0?0:r.join(`
|
|
97
|
+
`).length:0},a=i(t.startContainer,t.startOffset),o=i(t.endContainer,t.endOffset);return{start:Math.min(a,o),end:Math.max(a,o),hasSelection:!t.collapsed}},h=e=>{if(!s.current)return;let t=s.current.querySelectorAll(`[data-line]`)[e.line];if(!t)return;let n=t.querySelector(`[data-editable]`),r=n?.firstChild??n??t.firstChild??t,i=window.getSelection();if(!i)return;let a=document.createRange(),o=Math.min(e.offset,r.textContent?.length??0);try{a.setStart(r,o),a.collapse(!0),i.removeAllRanges(),i.addRange(a)}catch{a.selectNodeContents(r),a.collapse(!1),i.removeAllRanges(),i.addRange(a)}};(0,m.useEffect)(()=>{c.current&&s.current&&(h(c.current),c.current=null)});let g=e=>{let t=u.current,n=0;for(let r=0;r<e.line;r++)n+=t[r].length+1;return n+e.offset},_=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){if(n<=t[e].length)return{line:e,offset:n};n-=t[e].length+1}return{line:t.length-1,offset:t[t.length-1]?.length??0}},v=()=>{let e=f();return e?g(e):0},y=(e,t)=>{let r=ng(e);c.current=_(t,r),o(r),n?.(e)};return{lines:a,containerRef:s,getText:d,handleInput:()=>{if(c.current!==null||r||!s.current)return;let e=f(),t=tg(s.current),i=ng(t);c.current=e,o(i),n?.(t)},handleBeforeInput:e=>{if(r)return;let t=e.nativeEvent;if(t.isComposing)return;let n=t.inputType;if(!(n===`insertParagraph`||n===`insertLineBreak`)){if(n===`deleteContentBackward`||n===`deleteContentForward`){e.preventDefault();let t=p();if(!t)return;let r=u.current.join(`
|
|
98
|
+
`);if(t.hasSelection)y(r.slice(0,t.start)+r.slice(t.end),t.start);else if(n===`deleteContentBackward`){if(t.start===0)return;let e=ig(r,t.start);y(r.slice(0,e)+r.slice(t.start),e)}else{if(t.start>=r.length)return;let e=ag(r,t.start);y(r.slice(0,t.start)+r.slice(e),t.start)}return}if(n===`insertReplacementText`){e.preventDefault();let n=p();if(!n)return;let r=u.current.join(`
|
|
99
|
+
`),i=t.data??t.dataTransfer?.getData(`text/plain`)??``;y(r.slice(0,n.start)+i+r.slice(n.end),n.start+i.length);return}if(n===`insertText`&&t.data){e.preventDefault();let n=p();if(!n)return;let r=u.current.join(`
|
|
100
|
+
`),i=t.data;y(r.slice(0,n.start)+i+r.slice(n.end),n.start+i.length)}}},handleKeyDown:e=>{if(r){e.preventDefault();return}if(e.nativeEvent.isComposing)return;if((e.metaKey||e.ctrlKey)&&e.key===`z`){e.preventDefault();return}let t=p();if(!t)return;let n=u.current.join(`
|
|
101
|
+
`);if(e.key===`Enter`){e.preventDefault(),y(n.slice(0,t.start)+`
|
|
102
|
+
`+n.slice(t.end),t.start+1);return}if(e.key===`Backspace`){if(e.preventDefault(),t.hasSelection)y(n.slice(0,t.start)+n.slice(t.end),t.start);else{if(t.start===0)return;let r;r=e.metaKey?cg(n,t.start):e.altKey?og(n,t.start):ig(n,t.start),y(n.slice(0,r)+n.slice(t.start),r)}return}if(e.key===`Delete`){if(e.preventDefault(),t.hasSelection)y(n.slice(0,t.start)+n.slice(t.end),t.start);else{if(t.start>=n.length)return;let r;r=e.metaKey?lg(n,t.start):e.altKey?sg(n,t.start):ag(n,t.start),y(n.slice(0,t.start)+n.slice(r),t.start)}return}},handleCut:e=>{if(r){e.preventDefault();return}e.preventDefault();let t=p();if(!t||!t.hasSelection)return;let n=u.current.join(`
|
|
103
|
+
`),i=n.slice(t.start,t.end);e.clipboardData.setData(`text/plain`,i),y(n.slice(0,t.start)+n.slice(t.end),t.start)},handlePaste:e=>{if(r){e.preventDefault();return}e.preventDefault();let t=e.clipboardData.getData(`text/plain`);if(!t)return;let n=p();if(!n)return;let i=u.current.join(`
|
|
104
|
+
`);y(i.slice(0,n.start)+t+i.slice(n.end),n.start+t.length)},handleDrop:e=>{e.preventDefault()},handleDragOver:e=>{e.preventDefault()},getCaretPosition:f,setCaretPosition:h,getCursorOffset:v,caretFromFlatOffset:_}},dg=({index:e,text:t,isLast:n,ghostText:r})=>(0,v.jsxs)(`span`,{"data-line":e,className:`block min-h-[1.5rem]`,children:[(0,v.jsx)(`span`,{"data-editable":!0,children:t||``}),r&&(0,v.jsx)(`span`,{"data-ghost":!0,className:`pointer-events-none select-none text-neutral`,"aria-hidden":`true`,children:r}),!n&&(0,v.jsx)(`br`,{})]}),fg=24,pg=12,mg=({value:e,defaultValue:t,onChange:n,placeholder:r,disabled:i=!1,minRows:a=1,maxRows:o=999,autoSize:s=!0,validationStyleEnabled:c=!1,variant:l,ghostText:u,ghostLine:d,ghostOffset:f,onClick:p,className:h,dir:g=`auto`,ref:_,...y})=>{let{lines:b,containerRef:x,getText:S,handleInput:C,handleBeforeInput:w,handleKeyDown:T,handleCut:E,handlePaste:D,handleDrop:O,handleDragOver:k,getCursorOffset:A,setCaretPosition:j,caretFromFlatOffset:M}=ug({value:e,defaultValue:t,onChange:n,disabled:i}),N=(0,m.useRef)(null),ee=e=>{N.current=e,x.current=e};(0,m.useImperativeHandle)(_,()=>({getContainer:()=>N.current,getText:S,focus:()=>N.current?.focus(),getCursorOffset:A,setCursorAtOffset:e=>{j(M(e,b))}})),(0,m.useEffect)(()=>{if(!s||!N.current)return;let e=N.current,t=fg*o+pg,n=fg*a+pg;e.style.height=`auto`;let r=e.scrollHeight;e.style.height=`${Math.max(Math.min(r,t),n)}px`,e.style.overflowY=r>t?`auto`:`hidden`},[b,s,o,a]);let te=b.length===1&&b[0]===``,P=u&&d!==void 0&&f!==void 0;return(0,v.jsxs)(`div`,{className:`relative w-full`,children:[te&&r&&(0,v.jsx)(`div`,{className:`pointer-events-none absolute inset-0 select-none px-2 py-3 text-base text-neutral-400 leading-[1.5rem] md:py-2 md:text-sm`,"aria-hidden":`true`,children:r}),(0,v.jsx)(`div`,{...y,ref:ee,role:`textbox`,"aria-multiline":`true`,"aria-placeholder":r,"aria-disabled":i,"aria-autocomplete":P?`inline`:void 0,tabIndex:i?-1:0,contentEditable:!i,suppressContentEditableWarning:!0,dir:g,onInput:C,onBeforeInput:w,onKeyDown:T,onCut:E,onPaste:D,onDrop:O,onDragOver:k,onClick:p,className:B(`resize-none whitespace-pre-wrap break-words outline-none`,Sd({variant:l,validationStyleEnabled:c?`enabled`:`disabled`}),s&&`overflow-y-auto`,h),children:b.map((e,t)=>(0,v.jsx)(dg,{index:t,text:e,isLast:t===b.length-1,ghostText:P&&d===t?u:void 0},t))})]})},hg=({isActive:e=!0,suggestion:t,...n})=>{let[r,i]=(0,m.useState)(String(n.value??n.defaultValue??``)),[a,o]=(0,m.useState)(``),s=(0,m.useRef)(null);(0,m.useEffect)(()=>{n.value!==void 0&&i(String(n.value??n.defaultValue??``))},[n.value,n.defaultValue]);let c=()=>{let e=t??a;if(!e)return;let n=s.current?.getCursorOffset()??r.length;i(r.slice(0,n)+e+r.slice(n)),o(``),setTimeout(()=>{s.current?.focus(),s.current?.setCursorAtOffset(n+e.length)},0)},l=e?t??(a||void 0):void 0,u=r.split(`
|
|
105
|
+
`);return(0,v.jsx)(mg,{ref:s,value:r,onChange:e=>{if(i(e),o(``),n.onChange){let t={target:{value:e},currentTarget:{value:e}};n.onChange(t)}},onKeyDown:e=>{e.key===`Tab`&&(t??a)&&(e.preventDefault(),c()),n.onKeyDown?.(e)},ghostText:l,ghostLine:t?u.length-1:void 0,ghostOffset:t?u[u.length-1]?.length??0:void 0,placeholder:n.placeholder,disabled:n.disabled,autoSize:n.autoSize,maxRows:n.maxRows,minRows:n.rows,variant:n.variant,validationStyleEnabled:n.validationStyleEnabled,className:n.className,dir:n.dir,"aria-label":n[`aria-label`],"aria-invalid":n[`aria-invalid`],"aria-describedby":n[`aria-describedby`],"data-testid":n[`data-testid`]})},gg=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>(0,v.jsx)(`textarea`,{className:B(`resize-none`,Sd({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r}),_g=24,vg=12,yg=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=(0,m.useRef)(null);(0,m.useImperativeHandle)(i,()=>o.current);let s=()=>{let e=o.current;if(!e||!t)return;let n=e.style;n.height=`auto`;let i=e.scrollHeight,a=_g*r+vg,s=_g+vg;n.height=`${Math.max(Math.min(i,a),s)}px`};return(0,m.useEffect)(()=>{s()},[a.value,a.defaultValue,s]),(0,v.jsx)(gg,{ref:e=>{o.current=e,e&&s()},onChange:e=>{n?.(e),s()},className:B(`overflow-y-auto`,t&&`resize-none`,e),...a})},bg=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,m.useRef)(null);return(0,m.useImperativeHandle)(n,()=>i.current),(0,v.jsx)(Qh,{value:r.value??i.current?.value??r.defaultValue??``,onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,v.jsx)(yg,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},xg=({level:e,title:t,description:n,children:r,rightParam:i,isSelected:a,...o})=>(0,v.jsx)(`div`,{className:B(`rounded-md p-2 transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,e===2&&`hover:bg-card/30`,e>=3&&``,a===!0&&`bg-card/40`),...o,children:(0,v.jsx)(Xu,{isOpen:a,label:t,header:(0,v.jsxs)(`div`,{className:`flex w-full`,children:[(0,v.jsxs)(`div`,{className:`flex w-full items-center justify-between`,children:[(0,v.jsx)(`span`,{className:B(e===0&&`text-lg`,e===1&&`text-md`,e===2&&`text-md`,e>=3&&`text-base`),children:t}),i&&(0,v.jsx)(`div`,{className:`flex w-auto items-center justify-between p-3`,children:i})]}),n&&(0,v.jsx)(`p`,{className:`pl-3 text-card text-sm`,children:n})]}),children:(0,v.jsx)(`div`,{className:`size-full px-2`,children:r})})}),Sg=e=>{let{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:i=[]}=e;return n.map((n,a)=>{let o={key:a,type:O},s=[...t,o];return(0,v.jsx)(xg,{level:t.length,title:`${a}`,description:``,isSelected:lr(s,i),onClick:e=>{e.stopPropagation(),r(s)},children:(0,v.jsx)(ry,{...e,keyPath:s,section:n})},JSON.stringify(n))})},Cg=(0,m.createContext)(null),wg=({children:e,manager:t})=>(0,v.jsx)(Cg.Provider,{value:t,children:e}),Tg=()=>(0,m.useContext)(Cg),Eg=()=>{let e=Tg(),[t,n]=(0,m.useState)(e?.focusedContent.value??null);return(0,m.useEffect)(()=>{if(!e)return;let t=e=>n(e.detail);return e.focusedContent.addEventListener(`change`,t),()=>e.focusedContent.removeEventListener(`change`,t)},[e]),{focusedContent:t,setFocusedContent:t=>e?.focusedContent.set(t),setFocusedContentKeyPath:t=>e?.setFocusedContentKeyPath(t)}},Dg=(e,t)=>{try{let n=new URL(e),r=new URL(t);if(n.protocol!==r.protocol||n.hostname!==r.hostname||n.port!==r.port)return!1;let i=n.pathname.replace(/\/$/,``),a=r.pathname.replace(/\/$/,``);return!(i!==``&&a!==``&&i!==a)}catch(n){return console.error(`Invalid URL(s)`,n,{url1:e,url2:t}),!1}},Og=function(e){return e.INTLAYER_CLIENT_READY=`INTLAYER_CLIENT_READY`,e.INTLAYER_ARE_YOU_THERE=`INTLAYER_ARE_YOU_THERE`,e.INTLAYER_EDITOR_ACTIVATE=`INTLAYER_EDITOR_ACTIVATE`,e.INTLAYER_EDITOR_ENABLED=`INTLAYER_EDITOR_ENABLED`,e.INTLAYER_CONFIGURATION=`INTLAYER_CONFIGURATION`,e.INTLAYER_CURRENT_LOCALE=`INTLAYER_CURRENT_LOCALE`,e.INTLAYER_URL_CHANGE=`INTLAYER_URL_CHANGE`,e.INTLAYER_LOCALE_DICTIONARIES_CHANGED=`INTLAYER_LOCALE_DICTIONARIES_CHANGED`,e.INTLAYER_DISTANT_DICTIONARIES_CHANGED=`INTLAYER_DISTANT_DICTIONARIES_CHANGED`,e.INTLAYER_HOVERED_CONTENT_CHANGED=`INTLAYER_HOVERED_CONTENT_CHANGED`,e.INTLAYER_FOCUSED_CONTENT_CHANGED=`INTLAYER_FOCUSED_CONTENT_CHANGED`,e.INTLAYER_EDITED_CONTENT_CHANGED=`INTLAYER_EDITED_CONTENT_CHANGED`,e.INTLAYER_IFRAME_CLICKED=`INTLAYER_IFRAME_CLICKED`,e}({}),kg=e=>{let t=new MouseEvent(`mousedown`,{bubbles:!0,cancelable:!0,view:window}),n=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window});Object.assign(n,{iframeData:e}),Object.assign(t,{iframeData:e}),window.dispatchEvent(n),window.dispatchEvent(t)},Ag=`__intlayer_editor_manager__`,jg=`__intlayer_editor_manager_events__`,Mg=()=>{if(typeof window>`u`)return new EventTarget;let e=window;return e[jg]||(e[jg]=new EventTarget),e[jg]},Ng=()=>typeof window>`u`?null:window[Ag]??null,Pg=e=>{if(typeof window<`u`){let t=window;t[Ag]=e}Mg().dispatchEvent(new CustomEvent(`change`,{detail:e}))},Fg=e=>{let t=Mg(),n=t=>{e(t.detail)};return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}};function Ig(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var Lg=globalThis,Rg=Lg.ShadowRoot&&(Lg.ShadyCSS===void 0||Lg.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,zg=Symbol(),Bg=new WeakMap,Vg=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==zg)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(Rg&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=Bg.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Bg.set(t,e))}return e}toString(){return this.cssText}},Hg=e=>new Vg(typeof e==`string`?e:e+``,void 0,zg),Ug=(e,...t)=>new Vg(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,zg),Wg=(e,t)=>{if(Rg)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let n of t){let t=document.createElement(`style`),r=Lg.litNonce;r!==void 0&&t.setAttribute(`nonce`,r),t.textContent=n.cssText,e.appendChild(t)}},Gg=Rg?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return Hg(t)})(e):e,{is:Kg,defineProperty:qg,getOwnPropertyDescriptor:Jg,getOwnPropertyNames:Yg,getOwnPropertySymbols:Xg,getPrototypeOf:Zg}=Object,Qg=globalThis,$g=Qg.trustedTypes,e_=$g?$g.emptyScript:``,t_=Qg.reactiveElementPolyfillSupport,n_=(e,t)=>e,r_={toAttribute(e,t){switch(t){case Boolean:e=e?e_:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},i_=(e,t)=>!Kg(e,t),a_={attribute:!0,type:String,converter:r_,reflect:!1,useDefault:!1,hasChanged:i_};Symbol.metadata??=Symbol(`metadata`),Qg.litPropertyMetadata??=new WeakMap;var o_=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=a_){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&qg(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=Jg(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??a_}static _$Ei(){if(this.hasOwnProperty(n_(`elementProperties`)))return;let e=Zg(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(n_(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(n_(`properties`))){let e=this.properties,t=[...Yg(e),...Xg(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(Gg(e))}else e!==void 0&&t.push(Gg(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Wg(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?r_:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?r_:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??i_)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};o_.elementStyles=[],o_.shadowRootOptions={mode:`open`},o_[n_(`elementProperties`)]=new Map,o_[n_(`finalized`)]=new Map,t_?.({ReactiveElement:o_}),(Qg.reactiveElementVersions??=[]).push(`2.1.2`);var s_=globalThis,c_=e=>e,l_=s_.trustedTypes,u_=l_?l_.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,d_=`$lit$`,f_=`lit$${Math.random().toFixed(9).slice(2)}$`,p_=`?`+f_,m_=`<${p_}>`,h_=document,g_=()=>h_.createComment(``),__=e=>e===null||typeof e!=`object`&&typeof e!=`function`,v_=Array.isArray,y_=e=>v_(e)||typeof e?.[Symbol.iterator]==`function`,b_=`[
|
|
106
|
+
\f\r]`,x_=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,S_=/-->/g,C_=/>/g,w_=RegExp(`>|${b_}(?:([^\\s"'>=/]+)(${b_}*=${b_}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),T_=/'/g,E_=/"/g,D_=/^(?:script|style|textarea|title)$/i,O_=(e=>(t,...n)=>({_$litType$:e,strings:t,values:n}))(1),k_=Symbol.for(`lit-noChange`),A_=Symbol.for(`lit-nothing`),j_=new WeakMap,M_=h_.createTreeWalker(h_,129);function N_(e,t){if(!v_(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return u_===void 0?t:u_.createHTML(t)}var P_=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=x_;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===x_?c[1]===`!--`?o=S_:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=w_):(D_.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=w_):o=C_:o===w_?c[0]===`>`?(o=i??x_,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?w_:c[3]===`"`?E_:T_):o===E_||o===T_?o=w_:o===S_||o===C_?o=x_:(o=w_,i=void 0);let d=o===w_&&e[t+1].startsWith(`/>`)?` `:``;a+=o===x_?n+m_:l>=0?(r.push(s),n.slice(0,l)+d_+n.slice(l)+f_+d):n+f_+(l===-2?t:d)}return[N_(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},F_=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=P_(t,n);if(this.el=e.createElement(l,r),M_.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=M_.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(d_)){let t=u[o++],n=i.getAttribute(e).split(f_),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?B_:r[1]===`?`?V_:r[1]===`@`?H_:z_}),i.removeAttribute(e)}else e.startsWith(f_)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(D_.test(i.tagName)){let e=i.textContent.split(f_),t=e.length-1;if(t>0){i.textContent=l_?l_.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],g_()),M_.nextNode(),c.push({type:2,index:++a});i.append(e[t],g_())}}}else if(i.nodeType===8)if(i.data===p_)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(f_,e+1))!==-1;)c.push({type:7,index:a}),e+=f_.length-1}a++}}static createElement(e,t){let n=h_.createElement(`template`);return n.innerHTML=e,n}};function I_(e,t,n=e,r){if(t===k_)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=__(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=I_(e,i._$AS(e,t.values),i,r)),t}var L_=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??h_).importNode(t,!0);M_.currentNode=r;let i=M_.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new R_(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new U_(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=M_.nextNode(),a++)}return M_.currentNode=h_,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},R_=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=A_,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=I_(this,e,t),__(e)?e===A_||e==null||e===``?(this._$AH!==A_&&this._$AR(),this._$AH=A_):e!==this._$AH&&e!==k_&&this._(e):e._$litType$===void 0?e.nodeType===void 0?y_(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==A_&&__(this._$AH)?this._$AA.nextSibling.data=e:this.T(h_.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=F_.createElement(N_(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new L_(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=j_.get(e.strings);return t===void 0&&j_.set(e.strings,t=new F_(e)),t}k(t){v_(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(g_()),this.O(g_()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=c_(e).nextSibling;c_(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},z_=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=A_,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=A_}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=I_(this,e,t,0),a=!__(e)||e!==this._$AH&&e!==k_,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=I_(this,r[n+o],t,o),s===k_&&(s=this._$AH[o]),a||=!__(s)||s!==this._$AH[o],s===A_?e=A_:e!==A_&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===A_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},B_=class extends z_{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===A_?void 0:e}},V_=class extends z_{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==A_)}},H_=class extends z_{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=I_(this,e,t,0)??A_)===k_)return;let n=this._$AH,r=e===A_&&n!==A_||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==A_&&(n===A_||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},U_=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){I_(this,e)}},W_=s_.litHtmlPolyfillSupport;W_?.(F_,R_),(s_.litHtmlVersions??=[]).push(`3.3.2`);var G_=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new R_(t.insertBefore(g_(),e),e,void 0,n??{})}return i._$AI(e),i},K_=globalThis,q_=class extends o_{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=G_(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return k_}};q_._$litElement$=!0,q_.finalized=!0,K_.litElementHydrateSupport?.({LitElement:q_});var J_=K_.litElementPolyfillSupport;J_?.({LitElement:q_}),(K_.litElementVersions??=[]).push(`4.2.2`);var Y_={attribute:!0,type:String,converter:r_,reflect:!1,hasChanged:i_},X_=(e=Y_,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function Z_(e){return(t,n)=>typeof n==`object`?X_(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function Q_(e){return Z_({...e,state:!0,attribute:!1})}var $_=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function ev(e,t){return(n,r,i)=>{let a=t=>t.renderRoot?.querySelector(e)??null;if(t){let{get:e,set:t}=typeof r==`object`?n:i??(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return $_(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return $_(n,r,{get(){return a(this)}})}}var tv=class extends q_{constructor(...e){super(...e),this.keyPathJson=`[]`,this.dictionaryKey=``,this._editorEnabled=!1,this._isInIframe=!1,this._isSelected=!1,this._editedValue=void 0,this._unsubManager=null,this._unsubEnabled=null,this._unsubFocused=null,this._unsubEditedContent=null}static{this.styles=Ug`
|
|
107
|
+
:host {
|
|
108
|
+
display: contents;
|
|
109
|
+
}
|
|
110
|
+
`}connectedCallback(){super.connectedCallback(),typeof window<`u`&&(this._isInIframe=window.self!==window.top),this._subscribeToManager()}disconnectedCallback(){super.disconnectedCallback(),this._teardown()}updated(e){if(e.has(`keyPathJson`)||e.has(`dictionaryKey`)){let e=Ng();e&&this._updateEditedValue(e)}}_teardown(){this._unsubManager?.(),this._unsubEnabled?.(),this._unsubFocused?.(),this._unsubEditedContent?.(),this._unsubManager=null,this._unsubEnabled=null,this._unsubFocused=null,this._unsubEditedContent=null}_subscribeToManager(){let e=Ng();e&&this._setupManagerSubscriptions(e),this._unsubManager=Fg(e=>{this._unsubEnabled?.(),this._unsubFocused?.(),this._unsubEditedContent?.(),this._unsubEnabled=null,this._unsubFocused=null,this._unsubEditedContent=null,e?this._setupManagerSubscriptions(e):(this._editorEnabled=!1,this._isSelected=!1,this._editedValue=void 0)})}_setupManagerSubscriptions(e){this._editorEnabled=e.editorEnabled.value??!1,this._updateIsSelected(e.focusedContent.value),this._updateEditedValue(e);let t=e=>{this._editorEnabled=e.detail},n=e=>{this._updateIsSelected(e.detail)},r=()=>{this._updateEditedValue(e)};e.editorEnabled.addEventListener(`change`,t),e.focusedContent.addEventListener(`change`,n),e.editedContent.addEventListener(`change`,r),this._unsubEnabled=()=>e.editorEnabled.removeEventListener(`change`,t),this._unsubFocused=()=>e.focusedContent.removeEventListener(`change`,n),this._unsubEditedContent=()=>e.editedContent.removeEventListener(`change`,r)}_getRawKeyPath(){try{return JSON.parse(this.keyPathJson)}catch{return[]}}_getFilteredKeyPath(){return this._getRawKeyPath().filter(e=>e.type!==S)}_updateEditedValue(e){let t=this._getFilteredKeyPath();if(!this.dictionaryKey||t.length===0){this._editedValue=void 0;return}let n=this._getRawKeyPath(),r=n[n.length-1]?.type;if(r===`markdown`||r===`html`||r===`insertion`||r===`file`){this._editedValue=void 0;return}let i=e.getContentValue(this.dictionaryKey,t);if(typeof i==`object`&&i&&i.nodeType===`translation`){let t=e.currentLocale.value;i=t?i[S][t]:void 0}this._editedValue=i}_updateIsSelected(e){if(!e){this._isSelected=!1;return}let t=this._getFilteredKeyPath();this._isSelected=e.dictionaryKey===this.dictionaryKey&&(e.keyPath?.length??0)>0&&lr(e.keyPath??[],t)}_handlePress(e){e.stopPropagation();let t=Ng();t&&t.focusedContent.set({dictionaryKey:this.dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleHover(e){e.stopPropagation(),Ng()?.messenger.send(`${Og.INTLAYER_HOVERED_CONTENT_CHANGED}/post`,{dictionaryKey:this.dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleUnhover(e){e.stopPropagation(),Ng()?.messenger.send(`${Og.INTLAYER_HOVERED_CONTENT_CHANGED}/post`,null)}render(){if(!this._isInIframe||!this._editorEnabled)return O_`<slot></slot>`;let e=this._editedValue,t=typeof e==`string`||typeof e==`number`||typeof e==`boolean`?e:O_`<slot></slot>`;return O_`
|
|
111
|
+
<intlayer-content-selector
|
|
112
|
+
?is-selecting=${this._isSelected}
|
|
113
|
+
@intlayer:press=${this._handlePress}
|
|
114
|
+
@intlayer:hover=${this._handleHover}
|
|
115
|
+
@intlayer:unhover=${this._handleUnhover}
|
|
116
|
+
>
|
|
117
|
+
${t}
|
|
118
|
+
</intlayer-content-selector>
|
|
119
|
+
`}};Ig([Z_({type:String,attribute:`key-path`})],tv.prototype,`keyPathJson`,void 0),Ig([Z_({type:String,attribute:`dictionary-key`})],tv.prototype,`dictionaryKey`,void 0),Ig([Q_()],tv.prototype,`_editorEnabled`,void 0),Ig([Q_()],tv.prototype,`_isInIframe`,void 0),Ig([Q_()],tv.prototype,`_isSelected`,void 0),Ig([Q_()],tv.prototype,`_editedValue`,void 0);var nv=()=>{typeof customElements>`u`||customElements.get(`intlayer-content-selector-wrapper`)||customElements.define(`intlayer-content-selector-wrapper`,tv)},rv=class extends q_{constructor(...e){super(...e),this.dictionaryKey=``,this.keyPathJson=`[]`,this.locale=``,this._editedText=null,this._unsubManager=null,this._unsubEditedContent=null}static{this.styles=Ug`
|
|
120
|
+
:host {
|
|
121
|
+
display: contents;
|
|
122
|
+
}
|
|
123
|
+
`}connectedCallback(){super.connectedCallback(),this._subscribeToManager()}disconnectedCallback(){super.disconnectedCallback(),this._teardown()}_teardown(){this._unsubManager?.(),this._unsubEditedContent?.(),this._unsubManager=null,this._unsubEditedContent=null}_getKeyPath(){try{return JSON.parse(this.keyPathJson)}catch{return[]}}_resolveEditedText(e){let t=this._getKeyPath(),n=e.getContentValue(this.dictionaryKey,t);if(n==null){this._editedText=null;return}if(typeof n==`string`||typeof n==`number`){this._editedText=String(n);return}if(typeof n==`object`){let e=this.locale||void 0,r=_e(n,{locale:e,dictionaryKey:this.dictionaryKey,keyPath:t},ge(e));typeof r==`string`||typeof r==`number`?this._editedText=String(r):(console.error(`[intlayer-edited-content] Incorrect edited content format. Expected string. Value: ${JSON.stringify(r)}`),this._editedText=null);return}this._editedText=null}_setupManagerSubscriptions(e){this._resolveEditedText(e);let t=()=>this._resolveEditedText(e);e.editedContent.addEventListener(`change`,t),this._unsubEditedContent=()=>e.editedContent.removeEventListener(`change`,t)}_subscribeToManager(){let e=Ng();e&&this._setupManagerSubscriptions(e),this._unsubManager=Fg(e=>{this._unsubEditedContent?.(),this._unsubEditedContent=null,e?this._setupManagerSubscriptions(e):this._editedText=null})}render(){return O_`
|
|
124
|
+
<intlayer-content-selector-wrapper
|
|
125
|
+
key-path=${this.keyPathJson}
|
|
126
|
+
dictionary-key=${this.dictionaryKey}
|
|
127
|
+
>
|
|
128
|
+
${this._editedText===null?O_`<slot></slot>`:this._editedText}
|
|
129
|
+
</intlayer-content-selector-wrapper>
|
|
130
|
+
`}};Ig([Z_({type:String,attribute:`dictionary-key`})],rv.prototype,`dictionaryKey`,void 0),Ig([Z_({type:String,attribute:`key-path`})],rv.prototype,`keyPathJson`,void 0),Ig([Z_({type:String,attribute:`locale`})],rv.prototype,`locale`,void 0),Ig([Q_()],rv.prototype,`_editedText`,void 0);var iv=()=>{typeof customElements>`u`||customElements.get(`intlayer-edited-content`)||customElements.define(`intlayer-edited-content`,rv)},av=()=>Math.random().toString(36).slice(2),ov=class{constructor(e){this._subscribers=new Map,this._windowHandler=null,this._seenMessageIds=new Set,this._config=e,this.senderId=av()}start(){typeof window>`u`||this._windowHandler||(this._windowHandler=e=>{this._handleMessage(e)},window.addEventListener(`message`,this._windowHandler))}stop(){this._windowHandler&&=(window.removeEventListener(`message`,this._windowHandler),null)}send(e,t){let n={type:e,data:t,senderId:this.senderId,messageId:av()};for(let e of this._config.allowedOrigins)e&&this._config.postMessageFn(n,e)}subscribe(e,t){return this._subscribers.has(e)||this._subscribers.set(e,new Set),this._subscribers.get(e).add(t),()=>{this._subscribers.get(e)?.delete(t)}}_handleMessage(e){let t=e.data;if(!t||typeof t!=`object`)return;let{type:n,data:r,senderId:i,messageId:a}=t;if(!n||typeof n!=`string`||i===this.senderId)return;if(a){if(this._seenMessageIds.has(a))return;this._seenMessageIds.add(a),this._seenMessageIds.size>200&&this._seenMessageIds.clear()}let{allowedOrigins:o}=this._config;if(!(!o||o.length===0||o.includes(`*`)||o.filter(e=>!!e&&e!==``).some(t=>Dg(t,e.origin))))return;let s=this._subscribers.get(n);if(s)for(let e of s)e(r,i)}},sv=class extends EventTarget{constructor(e,t,n={}){super(),this._unsubscribers=[],this._key=e,this._messenger=t,this._options={emit:n.emit??!0,receive:n.receive??!0},n.initialValue!==void 0&&(this._value=n.initialValue)}get value(){return this._value}set(e){this._value=e,this.dispatchEvent(new CustomEvent(`change`,{detail:e})),this._options.emit&&this._messenger.send(`${this._key}/post`,e)}start(){if(this._options.receive){let e=this._messenger.subscribe(`${this._key}/post`,e=>{this._value=e,this.dispatchEvent(new CustomEvent(`change`,{detail:e}))});this._unsubscribers.push(e)}if(this._options.emit){let e=this._messenger.subscribe(`${this._key}/get`,(e,t)=>{t!==this._messenger.senderId&&this._value!==void 0&&this._messenger.send(`${this._key}/post`,this._value)});this._unsubscribers.push(e)}this._options.receive&&this._value===void 0&&this._messenger.send(`${this._key}/get`)}stop(){for(let e of this._unsubscribers)e();this._unsubscribers.length=0}postCurrentValue(){this._value!==void 0&&this._messenger.send(`${this._key}/post`,this._value)}},cv=class{constructor(e){this._mousedownHandler=null,this._unsubscribeMerge=null,this._messenger=e}startInterceptor(){typeof window>`u`||(this._mousedownHandler=()=>{this._messenger.send(Og.INTLAYER_IFRAME_CLICKED)},window.addEventListener(`mousedown`,this._mousedownHandler))}startMerger(){this._unsubscribeMerge=this._messenger.subscribe(Og.INTLAYER_IFRAME_CLICKED,kg)}stopInterceptor(){this._mousedownHandler&&=(window.removeEventListener(`mousedown`,this._mousedownHandler),null)}stopMerger(){this._unsubscribeMerge?.(),this._unsubscribeMerge=null}},lv=class{constructor(e){this._originalPushState=null,this._originalReplaceState=null,this._listeners=[],this._messenger=e}start(){if(typeof window>`u`)return;let e=()=>{this._messenger.send(`${Og.INTLAYER_URL_CHANGE}/post`,window.location.pathname)};this._originalPushState=history.pushState,this._originalReplaceState=history.replaceState;let t=e=>function(...t){e.apply(this,t),window.dispatchEvent(new Event(`locationchange`))};history.pushState=t(this._originalPushState),history.replaceState=t(this._originalReplaceState);for(let t of[`locationchange`,`popstate`,`hashchange`,`load`]){let n=e;window.addEventListener(t,n),this._listeners.push([t,n])}e()}stop(){if(!(typeof window>`u`)){for(let[e,t]of this._listeners)window.removeEventListener(e,t);this._listeners=[],this._originalPushState&&=(history.pushState=this._originalPushState,null),this._originalReplaceState&&=(history.replaceState=this._originalReplaceState,null)}}},uv=(e,t,n)=>{let r=e,i=null,a=[];if(t.length===0)return n;try{for(let e=0;e<t.length;e++){let o=t[e];if(i=r,(o.type===`object`||o.type===`array`)&&(a=[o.key],(!r[o.key]||typeof r[o.key]!=`object`)&&(r[o.key]={}),r=r[o.key]),(o.type===`translation`||o.type===`enumeration`)&&(a=[o.type,o.key],(!r[o.type]||typeof r[o.type]!=`object`)&&(r[o.type]={}),(!r[o.type][o.key]||typeof r[o.type][o.key]!=`object`)&&(r[o.type][o.key]={}),r=r[o.type][o.key]),(o.type===`enumeration`||o.type===`condition`)&&o.type!==`enumeration`&&(a=[o.type,o.key],r=r[o.type][o.key]),(o.type===`markdown`||o.type===`html`||o.type===`insertion`)&&(a=[o.type],(!r[o.type]||typeof r[o.type]!=`object`)&&(r[o.type]=``),r=r[o.type]),o.type===`file`&&(a=[`content`],r=r.content),e===t.length-1&&i&&a.length>0){let e=i;for(let t of a.slice(0,-1))e=e[t];let t=a[a.length-1];if(n===void 0)if(Array.isArray(e)){let n=Number(t);!Number.isNaN(n)&&n>=0&&n<e.length&&e.splice(n,1)}else delete e[t];else e[t]=n}}return e}catch(r){return console.error(`Cannot edit dictionary by key path`,{dictionaryContent:e,keyPath:t,newValue:n},r),e}},dv=(e,t,n)=>{let r=structuredClone(e);for(let e of t)n&&r?.nodeType===`translation`&&(r=r?.[S]?.[n]),(e.type===`object`||e.type===`array`)&&(r=r?.[e.key]),(e.type===`translation`||e.type===`condition`||e.type===`enumeration`)&&(r=r?.[e.type]?.[e.key]),(e.type===`markdown`||e.type===`html`||e.type===`insertion`||e.type===`file`)&&(r=r?.[e.type]);return r},fv=(e,t,n)=>{let r=structuredClone(n);switch(e){case S:return{nodeType:S,[S]:Object.assign({},...t.map(e=>({[e]:structuredClone(r)??``})))};case C:return{nodeType:C,[C]:{1:r??``}};case w:return{nodeType:w,[w]:{true:r??``,false:r??``}};case T:return{nodeType:T,[T]:{insertion:r??``}};case k:return{nodeType:k,[k]:{dictionaryKey:``}};case j:return{nodeType:j,[j]:r??``};case M:return{nodeType:M,[M]:r??``,customComponents:[]};case E:return{nodeType:E,[E]:r??``};case D:return{newKey:r??``};case O:return[r??``];case N:return r??``;case ee:return r??0;case te:return r??!0;default:return r??``}},pv=e=>{if(typeof e==`string`)return``;if(typeof e==`number`)return 0;if(typeof e==`boolean`)return!0;if(typeof e?.nodeType==`string`){let t=e,n=t[t.nodeType];return t.nodeType===`translation`||t.nodeType===`enumeration`||t.nodeType===`condition`||t.nodeType===`insertion`||t.nodeType===`html`?pv(n):t.nodeType===`nested`?`dictionary-key`:t.nodeType===`file`?`file/path`:t.nodeType===`markdown`?pv(t):n}if(!e||typeof e!=`object`)return e;if(Array.isArray(e))return e.map(pv);let t=Object.entries(e).map(([e,t])=>[e,pv(t)]);return Object.fromEntries(t)},mv=e=>{if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e;if(typeof e?.nodeType==`string`){let t=e,n=t[t.nodeType];return t.nodeType===`translation`||t.nodeType===`enumeration`||t.nodeType===`condition`||t.nodeType===`insertion`||t.nodeType===`gender`||t.nodeType===`file`||t.nodeType===`markdown`||t.nodeType===`html`?n[Object.keys(n)[0]]:t.nodeType===`nested`?void 0:n}return!e||typeof e!=`object`?e:Array.isArray(e)?e[0]:e},hv=e=>typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`string`,gv=e=>[S,C,w,T,E,D,O,k,A,j,M,N,ee,te,P,F,ne].includes(e),_v=e=>{if(typeof e==`string`)return N;if(hv(e)){let t=e.nodeType;return gv(t)?t:ne}return Array.isArray(e)?O:cr(e)?A:typeof e==`number`?ee:typeof e==`boolean`?te:e&&typeof e==`object`?D:e===null?F:ne},vv=(e,t,n)=>{let r=e,i=null,a=null;for(let e of n)i=r,(e.type===`object`||e.type===`array`)&&(a=e.key,r=r[e.key]),(e.type===`translation`||e.type===`enumeration`||e.type===`condition`)&&(a=e.type,r=r[e.type][e.key]),(e.type===`markdown`||e.type===`reactNode`||e.type===`html`||e.type===`insertion`||e.type===`file`)&&(a=e.type,r=r[e.type]);if(i&&a!==null)if(Array.isArray(i))i[a]=r;else{let e={};for(let n of Object.keys(i))n===a&&t!==void 0?e[t]=r:e[n]=i[n];Object.keys(i).forEach(e=>{delete i[e]}),Object.assign(i,e)}return e},yv=class{constructor(e){this._unsubAreYouThere=null,this._unsubActivate=null,this._unsubClientReady=null,this._mode=e.mode,this._configuration=e.configuration,this.messenger=new ov(e.messenger),this.editorEnabled=new sv(Og.INTLAYER_EDITOR_ENABLED,this.messenger,{emit:!1,receive:!0,initialValue:!1}),this.focusedContent=new sv(Og.INTLAYER_FOCUSED_CONTENT_CHANGED,this.messenger,{emit:!0,receive:!0,initialValue:null}),this.localeDictionaries=new sv(Og.INTLAYER_LOCALE_DICTIONARIES_CHANGED,this.messenger),this.editedContent=new sv(Og.INTLAYER_EDITED_CONTENT_CHANGED,this.messenger),this.configuration=new sv(Og.INTLAYER_CONFIGURATION,this.messenger,{emit:!0,receive:!1,...e.configuration?{initialValue:e.configuration}:{}}),this.currentLocale=new sv(Og.INTLAYER_CURRENT_LOCALE,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`}),this._urlManager=new lv(this.messenger),this._iframeInterceptor=new cv(this.messenger)}start(){this.messenger.start(),this.editorEnabled.start(),this.focusedContent.start(),this.localeDictionaries.start(),this.editedContent.start(),this.configuration.start(),this.currentLocale.start(),this._mode===`client`?(this._urlManager.start(),this._iframeInterceptor.startInterceptor(),this._loadDictionaries(),this.messenger.send(`${Og.INTLAYER_EDITED_CONTENT_CHANGED}/get`),this._configuration?.editor?.enabled!==!1&&this._setupActivationHandshake()):(this._iframeInterceptor.startMerger(),this._setupEditorHandshake())}stop(){this._unsubAreYouThere?.(),this._unsubActivate?.(),this._unsubClientReady?.(),this._unsubAreYouThere=null,this._unsubActivate=null,this._unsubClientReady=null,this.messenger.stop(),this.editorEnabled.stop(),this.focusedContent.stop(),this.localeDictionaries.stop(),this.editedContent.stop(),this.configuration.stop(),this.currentLocale.stop(),this._urlManager.stop(),this._iframeInterceptor.stopInterceptor(),this._iframeInterceptor.stopMerger()}pingClient(){this._mode===`editor`&&this.messenger.send(Og.INTLAYER_ARE_YOU_THERE)}setFocusedContentKeyPath(e){let t=e.filter(e=>e.type!==S),n=this.focusedContent.value;n&&this.focusedContent.set({...n,keyPath:t})}setLocaleDictionary(e){if(!e.localId)return;let t=this.localeDictionaries.value??{};this.localeDictionaries.set({...t,[e.localId]:e})}setEditedDictionary(e){if(!e.localId){console.error(`setEditedDictionary: missing localId`,e);return}let t=this.editedContent.value??{};this.editedContent.set({...t,[e.localId]:e})}setEditedContent(e,t){let n=this.editedContent.value??{};this.editedContent.set({...n,[e]:{...n[e],content:t}})}addContent(e,t,n=[],r=!0){let i=this.editedContent.value??{},a=(this.localeDictionaries.value??{})[e]?.content,o=structuredClone(i[e]?.content??a),s=n;if(!r){let e=0,t=n.slice(0,-1),r=n[n.length-1],i=r.key;for(;dv(o,s)!==void 0;)e++,i=e===0?r.key:`${r.key} (${e})`,s=[...t,{...r,key:i}]}let c=uv(o,s,t);this.editedContent.set({...i,[e]:{...i[e],content:c}})}renameContent(e,t,n=[]){let r=this.editedContent.value??{},i=(this.localeDictionaries.value??{})[e]?.content,a=vv(structuredClone(r[e]?.content??i),t,n);this.editedContent.set({...r,[e]:{...r[e],content:a}})}removeContent(e,t){let n=this.editedContent.value??{},r=(this.localeDictionaries.value??{})[e]?.content,i=uv(structuredClone(n[e]?.content??r),t,dv(r,t));this.editedContent.set({...n,[e]:{...n[e],content:i}})}restoreContent(e){let t={...this.editedContent.value??{}};delete t[e],this.editedContent.set(t)}clearContent(e){let t={...this.editedContent.value??{}};delete t[e],this.editedContent.set(t)}clearAllContent(){this.editedContent.set({})}getContentValue(e,t){let n=this.editedContent.value;if(!n)return;let r=t.filter(e=>e.type!==S),i=this.localeDictionaries.value;if(e.includes(`:local:`)||e.includes(`:remote:`))return i&&!(e in i)?void 0:dv(n[e]?.content??{},r,this.currentLocale.value);let a=Object.keys(n).filter(t=>t.startsWith(`${e}:`)&&(!i||t in i));for(let e of a){let t=dv(n[e]?.content??{},r,this.currentLocale.value);if(t)return t}}_setupEditorHandshake(){this._unsubClientReady=this.messenger.subscribe(Og.INTLAYER_CLIENT_READY,()=>{this.editorEnabled.set(!0),this.messenger.send(Og.INTLAYER_EDITOR_ACTIVATE)}),this.messenger.send(Og.INTLAYER_ARE_YOU_THERE)}_setupActivationHandshake(){this.messenger.send(Og.INTLAYER_CLIENT_READY),this._unsubAreYouThere=this.messenger.subscribe(Og.INTLAYER_ARE_YOU_THERE,()=>{this.messenger.send(Og.INTLAYER_CLIENT_READY)}),this._unsubActivate=this.messenger.subscribe(Og.INTLAYER_EDITOR_ACTIVATE,()=>{this.editorEnabled.set(!0),this._broadcastData()})}_broadcastData(){let e=this.configuration.value;e&&this.messenger.send(`${Og.INTLAYER_CONFIGURATION}/post`,e);let t=this.currentLocale.value;t&&this.messenger.send(`${Og.INTLAYER_CURRENT_LOCALE}/post`,t);let n=this.localeDictionaries.value;n&&this.messenger.send(`${Og.INTLAYER_LOCALE_DICTIONARIES_CHANGED}/post`,n)}async _loadDictionaries(){try{let e=(await s(async()=>{let{getUnmergedDictionaries:e}=await import(`./unmerged_dictionaries-B599AqSH.js`);return{getUnmergedDictionaries:e}},[])).getUnmergedDictionaries(),t=Object.fromEntries(Object.values(e).flat().map(e=>[e.localId,e]));this.localeDictionaries.set(t),this.editorEnabled.value&&this._broadcastData()}catch(e){console.warn(`[intlayer] Failed to load unmerged dictionaries:`,e)}}},bv=class extends q_{constructor(...e){super(...e),this._initialized=!1,this._unsubManager=null}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._init()}disconnectedCallback(){super.disconnectedCallback(),this._unsubManager?.(),this._unsubManager=null,this._initialized&&=(Ov(),!1)}updated(e){e.has(`configuration`)&&!this._initialized&&this._init(),e.has(`locale`)&&this.locale&&this._syncLocale(this.locale)}_init(){this._initialized||(Dv(),this._initialized=!0,this.locale&&this._syncLocale(this.locale))}_syncLocale(e){let t=Ng();t?t.currentLocale.set(e):(this._unsubManager?.(),this._unsubManager=Fg(t=>{t&&(this._unsubManager?.(),this._unsubManager=null,t.currentLocale.set(e))}))}};Ig([Z_({attribute:!1})],bv.prototype,`configuration`,void 0),Ig([Z_({type:String})],bv.prototype,`locale`,void 0);var xv=()=>{typeof customElements>`u`||customElements.get(`intlayer-editor`)||customElements.define(`intlayer-editor`,bv)},Sv=250,Cv=class extends q_{constructor(...e){super(...e),this.isSelecting=!1,this.pressDuration=Sv,this._isHovered=!1,this._isSelectingState=!1,this._pressTimer=null,this._clickOutsideHandler=null}static{this.styles=Ug`
|
|
131
|
+
:host {
|
|
132
|
+
display: contents;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.wrapper {
|
|
136
|
+
display: inline-block;
|
|
137
|
+
cursor: pointer;
|
|
138
|
+
user-select: none;
|
|
139
|
+
border-radius: 0.375rem;
|
|
140
|
+
outline-width: 2px;
|
|
141
|
+
outline-offset: 4px;
|
|
142
|
+
outline-style: solid;
|
|
143
|
+
outline-color: transparent;
|
|
144
|
+
transition: all 100ms 50ms ease-in-out;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.wrapper[data-active] {
|
|
148
|
+
outline-color: inherit;
|
|
149
|
+
}
|
|
150
|
+
`}connectedCallback(){super.connectedCallback(),this._clickOutsideHandler=e=>{e.composedPath().includes(this)||(this._isSelectingState=!1,this._dispatch(`intlayer:click-outside`))},document.addEventListener(`mousedown`,this._clickOutsideHandler)}disconnectedCallback(){super.disconnectedCallback(),this._clickOutsideHandler&&=(document.removeEventListener(`mousedown`,this._clickOutsideHandler),null),this._clearPressTimer()}_clearPressTimer(){this._pressTimer!==null&&(clearTimeout(this._pressTimer),this._pressTimer=null)}_dispatch(e){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0}))}_handleMouseDown(){this._clearPressTimer(),this._pressTimer=setTimeout(()=>{this._isSelectingState=!0,this._dispatch(`intlayer:press`)},this.pressDuration)}_handleMouseEnter(){this._isHovered=!0,this._dispatch(`intlayer:hover`)}_handleMouseUpOrLeave(){this._isHovered&&(this._isHovered=!1,this._dispatch(`intlayer:unhover`)),this._clearPressTimer()}_handleClick(e){(this.isSelecting||this._isSelectingState)&&(e.preventDefault(),e.stopPropagation())}_handleBlur(){this._isSelectingState=!1}render(){return O_`
|
|
151
|
+
<span
|
|
152
|
+
class="wrapper"
|
|
153
|
+
?data-active=${this.isSelecting||this._isSelectingState||this._isHovered}
|
|
154
|
+
role="button"
|
|
155
|
+
tabindex="0"
|
|
156
|
+
@mousedown=${this._handleMouseDown}
|
|
157
|
+
@mouseup=${this._handleMouseUpOrLeave}
|
|
158
|
+
@mouseleave=${this._handleMouseUpOrLeave}
|
|
159
|
+
@mouseenter=${this._handleMouseEnter}
|
|
160
|
+
@click=${this._handleClick}
|
|
161
|
+
@touchstart=${this._handleMouseDown}
|
|
162
|
+
@touchend=${this._handleMouseUpOrLeave}
|
|
163
|
+
@touchcancel=${this._handleMouseUpOrLeave}
|
|
164
|
+
@blur=${this._handleBlur}
|
|
165
|
+
@keyup=${()=>{}}
|
|
166
|
+
>
|
|
167
|
+
<slot></slot>
|
|
168
|
+
</span>
|
|
169
|
+
`}};Ig([Z_({type:Boolean,attribute:`is-selecting`})],Cv.prototype,`isSelecting`,void 0),Ig([Z_({type:Number,attribute:`press-duration`})],Cv.prototype,`pressDuration`,void 0),Ig([Q_()],Cv.prototype,`_isHovered`,void 0),Ig([Q_()],Cv.prototype,`_isSelectingState`,void 0),Ig([ev(`.wrapper`)],Cv.prototype,`_wrapper`,void 0);var wv=()=>{typeof customElements>`u`||(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,Cv),nv(),iv(),xv())},Tv=()=>{let{editor:e}=g??{};return{allowedOrigins:[e?.editorURL,e?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&window.parent?.postMessage(e,t)}}},Ev=0,Dv=()=>{Ev++;let e=Ng();if(e)return e;let t=new yv({mode:`client`,messenger:Tv(),configuration:g});return Pg(t),wv(),t.start(),t},Ov=()=>{Ev=Math.max(0,Ev-1),!(Ev>0)&&(Ng()?.stop(),Pg(null))},kv=(e,t,n)=>{let r=Tg(),i=typeof t==`function`?t():t,[a,o]=(0,m.useState)(i),s=(0,m.useRef)(i),c=(0,m.useRef)(null);return(0,m.useEffect)(()=>{let{emit:t=!0,receive:a=!0}=n??{},l=new sv(e,r?.messenger,{emit:t,receive:a,initialValue:i});c.current=l;let u=e=>{let t=e.detail;s.current=t,o(t)};return l.addEventListener(`change`,u),l.start(),()=>{l.removeEventListener(`change`,u),l.stop(),c.current=null}},[e,r?.messenger,n?.emit,n?.receive]),[a,e=>{o(t=>{let n=typeof e==`function`?e(t):e;return s.current=n,c.current?.set(n),n})},()=>{c.current?.postCurrentValue()}]},Av=(e,t)=>kv(Og.INTLAYER_URL_CHANGE,e,t),jv=()=>{let e=Tg(),[t,n]=(0,m.useState)(e?.localeDictionaries.value??{});return(0,m.useEffect)(()=>{if(!e)return;let t=e=>n(e.detail??{});return e.localeDictionaries.addEventListener(`change`,t),()=>e.localeDictionaries.removeEventListener(`change`,t)},[e]),{localeDictionaries:t,setLocaleDictionaries:(0,m.useCallback)(t=>e?.localeDictionaries.set(t),[e]),setLocaleDictionary:(0,m.useCallback)(t=>e?.setLocaleDictionary(t),[e])}},Mv=()=>{let{setLocaleDictionaries:e,setLocaleDictionary:t}=jv();return{setLocaleDictionaries:e,setLocaleDictionary:t}},Nv=()=>{let e=Tg(),[t,n]=(0,m.useState)(e?.currentLocale.value);return(0,m.useEffect)(()=>{if(!e)return;let t=e=>n(e.detail);return e.currentLocale.addEventListener(`change`,t),()=>e.currentLocale.removeEventListener(`change`,t)},[e]),t},Pv=(e,t,n)=>{for(let r of t)try{if(dv(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},Fv=()=>{let{localeDictionaries:e}=jv(),t=Nv(),{setFocusedContent:n,setFocusedContentKeyPath:r,focusedContent:i}=Eg();return{focusedContent:(0,m.useMemo)(()=>{if(!i||!e||i.dictionaryLocalId)return i;let n=Object.values(e).filter(e=>e.key===i.dictionaryKey),r=Pv(i.keyPath??[],n,t);return{...i,...r}},[i,e,t]),setFocusedContent:n,setFocusedContentKeyPath:r}},Iv=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=(0,m.useRef)(null);i.current||=new yv({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return(0,m.useEffect)(()=>(wv(),Pg(a),a.start(),()=>{a.stop(),Pg(null)}),[a]),(0,v.jsx)(wg,{manager:a,children:e})},Lv=()=>{let e=Tg(),[t,n]=(0,m.useState)(e?.configuration.value);return(0,m.useEffect)(()=>{if(!e)return;let t=e=>n(e.detail);return e.configuration.addEventListener(`change`,t),()=>e.configuration.removeEventListener(`change`,t)},[e]),t},Rv=()=>{let e=Tg();return{setEditedContentState:t=>e?.editedContent.set(t),setEditedDictionary:t=>e?.setEditedDictionary(t),setEditedContent:(t,n)=>e?.setEditedContent(t,n),addEditedContent:(t,n,r,i)=>e?.addContent(t,n,r,i),renameEditedContent:(t,n,r)=>e?.renameContent(t,n,r),removeEditedContent:(t,n)=>e?.removeContent(t,n),restoreEditedContent:t=>e?.restoreContent(t),clearEditedDictionaryContent:t=>e?.clearContent(t),clearEditedContent:()=>e?.clearAllContent(),getEditedContentValue:(t,n)=>e?.getContentValue(t,n)}},zv=()=>{let e=Tg(),[t,n]=(0,m.useState)(e?.editedContent.value);return(0,m.useEffect)(()=>{if(!e)return;let t=e=>n(e.detail);return e.editedContent.addEventListener(`change`,t),()=>e.editedContent.removeEventListener(`change`,t)},[e]),{editedContent:t,...Rv()}},Bv=()=>{let e=Tg(),[t,n]=(0,m.useState)(e?.editorEnabled.value??!1);return(0,m.useEffect)(()=>{if(!e)return;let t=e=>n(e.detail);return e.editorEnabled.addEventListener(`change`,t),()=>e.editorEnabled.removeEventListener(`change`,t)},[e]),{enabled:t}},Vv=()=>{let e=Tg();return()=>e?.pingClient()},Hv=(e,t,n)=>{let r=Tg();return(0,m.useEffect)(()=>{if(t)return r?.messenger.subscribe(e,t)},[r,e,n]),t=>{r?.messenger.send(e,t)}},Uv=()=>{Hv(Og.INTLAYER_IFRAME_CLICKED,kg)},Wv=({keyPath:e,section:t,editedContent:n,onContentChange:r,onFocusKeyPath:i})=>{let a=dv(n,e,Nv());if(a!==void 0&&typeof a!=`boolean`)return(0,v.jsx)(v.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`});let o=e.length,s=a??t;return(0,v.jsx)(`button`,{type:`button`,className:B(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,o===2&&`hover:bg-card/30`,o>=3&&``),onClick:t=>{t.stopPropagation(),i(e)},children:(0,v.jsx)(Zh,{value:s,onChange:t=>r({keyPath:e,newValue:String(t)})})})},Gv=e=>{let{keyPath:t,section:n}=e;return(0,v.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!ny.includes(e)).map(r=>{let i={type:w,key:r},a=[...t,i],o=n[w][r];return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,m.createElement)(ry,{...e,key:r,keyPath:a,section:o})]})})})},Kv=e=>{let{keyPath:t,section:n}=e;return(0,v.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!ny.includes(e)).map(r=>{let i={type:C,key:r},a=[...t,i],o=n[C][r];return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,m.createElement)(ry,{...e,key:r,keyPath:a,section:o})]})})})},qv=({keyPath:e,section:t,editedContent:n,editedContentValue:r,onContentChange:i,onFocusKeyPath:a,renderSection:o})=>{let s=Nv(),c=r??dv(n,e,s);if(c&&typeof c!=`string`)return(0,v.jsx)(v.Fragment,{children:`Error loading section - Edited content Incoherence with the original content format`});let l=e.length,u=String(c??t);return(0,v.jsx)(`button`,{type:`button`,className:B(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,l===2&&`hover:bg-card/30`,l>=3&&``),onClick:t=>{t.stopPropagation(),a(e)},children:typeof o==`function`?o(u):(0,v.jsx)(bg,{"aria-label":`Editable field`,defaultValue:u,onSave:t=>i({keyPath:e,newValue:t}),onCancel:()=>null})})},Jv=e=>{let{keyPath:t,section:n}=e,{addEditedContent:r}=zv(),i=dv(e.editedContent,t),a=n[E],{content:o}=n,s=[...t,{type:E}];return(0,v.jsxs)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[(0,v.jsxs)(`span`,{className:`text-neutral text-sm`,children:[a,` `]}),(0,v.jsx)(qv,{...e,keyPath:s,section:o,editedContentValue:i?.content,onContentChange:i=>{r(e.dictionary.localId,{...n,content:i.newValue},t)}})]})},Yv=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:M}],i=n[M];return(0,v.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,v.jsx)(ry,{...e,keyPath:r,section:i})})},Xv=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:T}],i=n[T];return(0,v.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,v.jsx)(ry,{...e,keyPath:r,section:i})})},Zv=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:j}],i=n[j];return(0,v.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,v.jsx)(ry,{...e,keyPath:r,section:i})})},Qv=e=>{if(!e||typeof e!=`string`)return``;let t=e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`);return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()},$v=(0,m.memo)(e=>{let{keyPath:t,section:n,focusedKeyPath:r=[],onFocusKeyPath:i}=e;return(0,m.useMemo)(()=>Object.keys(n??{}).filter(e=>!ny.includes(e)),[n]).map(a=>{let o={key:a,type:D},s=[...t,o],c=lr(s,r);return(0,v.jsx)(xg,{level:t.length,title:Qv(a),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),i(c?[]:s)},children:(0,v.jsx)(ry,{...e,keyPath:s,section:n[a]})},a)})}),ey=({keyPath:e,section:t,editedContent:n,onContentChange:r,onFocusKeyPath:i})=>{let a=dv(n,e,Nv());if(a!==void 0&&typeof a!=`number`)return(0,v.jsx)(v.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`});let o=e.length,s=String(a??t);return(0,v.jsx)(`button`,{type:`button`,className:B(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,o===2&&`hover:bg-card/30`,o>=3&&``),onClick:t=>{t.stopPropagation(),i(e)},children:(0,v.jsx)($h,{"aria-label":`Editable number field`,type:`number`,defaultValue:s,onSave:t=>r({keyPath:e,newValue:t}),onCancel:()=>null})})},ty=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:S,key:r},a=[...t,i],o=n[S][r];return(0,v.jsx)(ry,{...e,keyPath:a,section:o})},ny=[`filePath`,`id`,`nodeType`],ry=(0,m.memo)(e=>{let t=Nv(),n=(0,m.useMemo)(()=>dv(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=(0,m.useMemo)(()=>_v(n),[n]);if(typeof n==`object`)return r===`reactNode`?(0,v.jsx)(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?(0,v.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):r===`markdown`?(0,v.jsx)(Zv,{...e,section:n}):r===`html`?(0,v.jsx)(Yv,{...e,section:n}):r===`translation`?(0,v.jsx)(ty,{...e,section:n}):r===`enumeration`?(0,v.jsx)(Kv,{...e,section:n}):r===`condition`?(0,v.jsx)(Gv,{...e,section:n}):r===`insertion`?(0,v.jsx)(Xv,{...e,section:n}):r===`array`?(0,v.jsx)(Sg,{...e,section:n}):r===`file`?(0,v.jsx)(Jv,{...e,section:n}):(0,v.jsx)($v,{...e,section:n});if(typeof n==`string`)return(0,v.jsx)(qv,{...e,section:n});if(typeof n==`number`)return(0,v.jsx)(ey,{...e,section:n});if(typeof n==`boolean`)return(0,v.jsx)(Wv,{...e,section:n})}),iy=({dictionary:e,...t})=>{let n=Nv(),{editedContent:r,addEditedContent:i}=zv(),{focusedContent:a,setFocusedContentKeyPath:o}=Fv();return(0,v.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,m.createElement)(ry,{...t,keyPath:[],locale:n,dictionary:e,key:`${JSON.stringify((r?.[e.localId]??e).content)}${n}`,editedContent:r?.[e.localId]?.content,focusedKeyPath:a?.keyPath,section:e.content,onContentChange:t=>{i(e.localId,t.newValue,t.keyPath)},onFocusKeyPath:o})})},ay=({children:e,className:t,identifier:n,...r})=>(0,v.jsx)(`div`,{className:B(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e}),oy=({children:e,identifier:t,className:n,label:r,...i})=>(0,v.jsx)(Ju,{className:B([`w-full cursor-pointer`,`group-focus-within/dropdown:bg-current/20 group-focus-within/dropdown:ring-4`,n]),label:r??`Open panel ${t}`,"aria-haspopup":`true`,"aria-controls":`dropdown-panel-${t}`,id:`dropdown-trigger-${t}`,onClick:e=>{e.currentTarget.focus()},variant:`none`,...i,children:e}),sy=function(e){return e.START=`start`,e.END=`end`,e}({}),cy=function(e){return e.BELOW=`below`,e.ABOVE=`above`,e}({});ay.Trigger=oy,ay.Panel=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:i=sy.START,yAlign:a=cy.BELOW,identifier:o,className:s,...c})=>(0,v.jsx)(`div`,{className:B(`absolute z-100 min-w-full`,i===sy.START&&`left-0`,i===sy.END&&`right-0`,a===cy.BELOW&&`top-[calc(100%+0.5rem)]`,a===cy.ABOVE&&`bottom-[calc(100%+0.5rem)]`,s),"aria-hidden":t,role:`region`,"aria-labelledby":`dropdown-trigger-${o}`,id:`dropdown-panel-${o}`,children:(0,v.jsx)(Yu,{isHidden:t,className:B(`overflow-x-visible`,t===!1&&`invisible`,t===!0&&`visible`,n&&`group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]`,r&&`group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]`),...c,children:e})});var ly=(e,t)=>{let[n,r]=(0,m.useState)(()=>{if(t!==void 0){let n=typeof t==`function`?t():t;if(typeof window>`u`)return n;let r=localStorage?.getItem(e);if(r)try{return JSON.parse(r)}catch(e){console.error(e)}return n}});(0,m.useEffect)(()=>{let i=localStorage?.getItem(e);if(i&&i!==`undefined`&&n===void 0)try{r(JSON.parse(i))}catch(e){console.error(e)}else t!==void 0&&n===void 0&&r(t)},[e,n]);let i=(0,m.useCallback)(t=>{r(n=>{let r=typeof t==`function`?t(n):t;return r===void 0?n:(localStorage?.setItem(e,JSON.stringify(r)),r)})},[e,r]),a=(0,m.useCallback)(()=>{let t=localStorage?.getItem(e);t&&r(JSON.parse(t))},[e,r]),o=(0,m.useCallback)(()=>{localStorage?.removeItem(e),r(void 0)},[e]);return(0,m.useMemo)(()=>[n,i,a,o],[n,i,a,o])},uy=(0,m.createContext)({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),dy=()=>(0,m.useContext)(uy),fy=({availableLocales:e,defaultSelectedLocales:t,children:n})=>{let{locale:r}=hr(),[i,a]=ly(`locale-content-selector-selected-locales`,t??[r]);return(0,v.jsx)(uy,{value:{availableLocales:e,selectedLocales:i,setSelectedLocales:a},children:n})},py={key:`locale-switcher-content`,content:{nodeType:`translation`,translation:{en:{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},"en-GB":{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},fr:{localeSwitcherLabel:`Changer de langue`,languageListLabel:`Liste des langues`,switchTo:`Passer à`,searchInput:{text:`Rechercher la locale`,placeholder:`Rechercher une locale`,ariaLabel:`Recherche de langue`},seeAllLocalesSwitch:{true:`Voir toutes les langues`,false:`Voir seulement les langues sélectionnées`}},es:{localeSwitcherLabel:`Cambiar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Cambiar a`,searchInput:{text:`Buscar idioma`,placeholder:`Buscar un idioma`,ariaLabel:`Búsqueda de idioma`},seeAllLocalesSwitch:{true:`Ver todos los idiomas`,false:`Ver solo los idiomas seleccionados`}},de:{localeSwitcherLabel:`Sprachwechsler`,languageListLabel:`Sprachliste`,switchTo:`Wechseln Sie zu`,searchInput:{text:`Sprache durchsuchen`,placeholder:`Sprache suchen`,ariaLabel:`Sprachsuche`},seeAllLocalesSwitch:{true:`Alle Sprachen anzeigen`,false:`Nur ausgewählte Sprachen anzeigen`}},ja:{localeSwitcherLabel:`言語スイッチャー`,languageListLabel:`言語リスト`,switchTo:`に切り替える`,searchInput:{text:`ロケールを検索`,placeholder:`ロケールを検索`,ariaLabel:`言語検索`},seeAllLocalesSwitch:{true:`すべての言語を表示`,false:`選択された言語のみを表示`}},ko:{localeSwitcherLabel:`언어 스위치`,languageListLabel:`언어 목록`,switchTo:`전환`,searchInput:{text:`언어 검색`,placeholder:`언어 검색`,ariaLabel:`언어 검색`},seeAllLocalesSwitch:{true:`모든 언어 보기`,false:`선택한 언어만 보기`}},zh:{localeSwitcherLabel:`语言切换器`,languageListLabel:`语言列表`,switchTo:`切换到`,searchInput:{text:`搜索语言`,placeholder:`搜索语言`,ariaLabel:`语言搜索`},seeAllLocalesSwitch:{true:`查看所有语言`,false:`仅查看选定的语言`}},it:{localeSwitcherLabel:`Cambia lingua`,languageListLabel:`Elenco lingue`,switchTo:`Passa a`,searchInput:{text:`Cerca lingua`,placeholder:`Cerca una lingua`,ariaLabel:`Ricerca lingua`},seeAllLocalesSwitch:{true:`Vedi tutte le lingue`,false:`Vedi solo le lingue selezionate`}},pt:{localeSwitcherLabel:`Mudar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Mudar para`,searchInput:{text:`Pesquisar idioma`,placeholder:`Pesquisar um idioma`,ariaLabel:`Pesquisa de idioma`},seeAllLocalesSwitch:{true:`Ver todos os idiomas`,false:`Ver apenas os idiomas selecionados`}},hi:{localeSwitcherLabel:`भाषा स्विचर`,languageListLabel:`भाषा सूची`,switchTo:`स्विच करें`,searchInput:{text:`भाषा खोजें`,placeholder:`भाषा खोजें`,ariaLabel:`भाषा खोजें`},seeAllLocalesSwitch:{true:`सभी भाषाओं को देखें`,false:`केवल चुने गए भाषाओं को देखें`}},ar:{localeSwitcherLabel:`مبدل اللغة`,languageListLabel:`قائمة اللغات`,switchTo:`التبديل إلى`,searchInput:{text:`بحث اللغة`,placeholder:`بحث اللغة`,ariaLabel:`بحث اللغة`},seeAllLocalesSwitch:{true:`عرض جميع اللغات`,false:`عرض اللغات المحددة فقط`}},ru:{localeSwitcherLabel:`Переключатель языка`,languageListLabel:`Список языков`,switchTo:`Переключиться на`,searchInput:{text:`Поиск языка`,placeholder:`Поиск языка`,ariaLabel:`Поиск языка`},seeAllLocalesSwitch:{true:`Показать все языки`,false:`Показать только выбранные языки`}}}},localIds:[`locale-switcher-content::local::../@intlayer/design-system/dist/esm/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs`]};function my(e){return Array.isArray?Array.isArray(e):Ty(e)===`[object Array]`}var hy=1/0;function gy(e){if(typeof e==`string`)return e;let t=e+``;return t==`0`&&1/e==-hy?`-0`:t}function _y(e){return e==null?``:gy(e)}function vy(e){return typeof e==`string`}function yy(e){return typeof e==`number`}function by(e){return e===!0||e===!1||Sy(e)&&Ty(e)==`[object Boolean]`}function xy(e){return typeof e==`object`}function Sy(e){return xy(e)&&e!==null}function Cy(e){return e!=null}function wy(e){return!e.trim().length}function Ty(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Ey=`Incorrect 'index' type`,Dy=e=>`Invalid value for key ${e}`,Oy=e=>`Pattern length exceeds max of ${e}.`,ky=e=>`Missing ${e} property in key`,Ay=e=>`Property 'weight' in key '${e}' must be a positive integer`,jy=Object.prototype.hasOwnProperty,My=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=Ny(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function Ny(e){let t=null,n=null,r=null,i=1,a=null;if(vy(e)||my(e))r=e,t=Py(e),n=Fy(e);else{if(!jy.call(e,`name`))throw Error(ky(`name`));let o=e.name;if(r=o,jy.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(Ay(o));t=Py(o),n=Fy(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function Py(e){return my(e)?e:e.split(`.`)}function Fy(e){return my(e)?e.join(`.`):e}function Iy(e,t){let n=[],r=!1,i=(e,t,a)=>{if(Cy(e))if(!t[a])n.push(e);else{let o=e[t[a]];if(!Cy(o))return;if(a===t.length-1&&(vy(o)||yy(o)||by(o)))n.push(_y(o));else if(my(o)){r=!0;for(let e=0,n=o.length;e<n;e+=1)i(o[e],t,a+1)}else t.length&&i(o,t,a+1)}};return i(e,vy(t)?t.split(`.`):t,0),r?n:n[0]}var Ly={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Ry={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},zy={location:0,threshold:.6,distance:100},By={useExtendedSearch:!1,getFn:Iy,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},K={...Ry,...Ly,...zy,...By},Vy=/[^ ]+/g;function Hy(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(Vy).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var Uy=class{constructor({getFn:e=K.getFn,fieldNormWeight:t=K.fieldNormWeight}={}){this.norm=Hy(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,vy(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();vy(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Cy(e)||wy(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(Cy(i)){if(my(i)){let e=[],t=[{nestedArrIndex:-1,value:i}];for(;t.length;){let{nestedArrIndex:n,value:r}=t.pop();if(Cy(r))if(vy(r)&&!wy(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else my(r)&&r.forEach((e,n)=>{t.push({nestedArrIndex:n,value:e})})}n.$[r]=e}else if(vy(i)&&!wy(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}};function Wy(e,t,{getFn:n=K.getFn,fieldNormWeight:r=K.fieldNormWeight}={}){let i=new Uy({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(Ny)),i.setSources(t),i.create(),i}function Gy(e,{getFn:t=K.getFn,fieldNormWeight:n=K.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new Uy({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function Ky(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=K.distance,ignoreLocation:a=K.ignoreLocation}={}){let o=t/e.length;if(a)return o;let s=Math.abs(r-n);return i?o+s/i:s?1:o}function qy(e=[],t=K.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}var Jy=32;function Yy(e,t,n,{location:r=K.location,distance:i=K.distance,threshold:a=K.threshold,findAllMatches:o=K.findAllMatches,minMatchCharLength:s=K.minMatchCharLength,includeMatches:c=K.includeMatches,ignoreLocation:l=K.ignoreLocation}={}){if(t.length>Jy)throw Error(Oy(Jy));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=s>1||c,g=h?Array(d):[],_;for(;(_=e.indexOf(t,m))>-1;){let e=Ky(t,{currentLocation:_,expectedLocation:f,distance:i,ignoreLocation:l});if(p=Math.min(e,p),m=_+u,h){let e=0;for(;e<u;)g[_+e]=1,e+=1}}m=-1;let v=[],y=1,b=u+d,x=1<<u-1;for(let r=0;r<u;r+=1){let a=0,s=b;for(;a<s;)Ky(t,{errors:r,currentLocation:f+s,expectedLocation:f,distance:i,ignoreLocation:l})<=p?a=s:b=s,s=Math.floor((b-a)/2+a);b=s;let c=Math.max(1,f-s+1),_=o?d:Math.min(f+s,d)+u,S=Array(_+2);S[_+1]=(1<<r)-1;for(let a=_;a>=c;--a){let o=a-1,s=n[e.charAt(o)];if(h&&(g[o]=+!!s),S[a]=(S[a+1]<<1|1)&s,r&&(S[a]|=(v[a+1]|v[a])<<1|1|v[a+1]),S[a]&x&&(y=Ky(t,{errors:r,currentLocation:o,expectedLocation:f,distance:i,ignoreLocation:l}),y<=p)){if(p=y,m=o,m<=f)break;c=Math.max(1,2*f-m)}}if(Ky(t,{errors:r+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:l})>p)break;v=S}let S={isMatch:m>=0,score:Math.max(.001,y)};if(h){let e=qy(g,s);e.length?c&&(S.indices=e):S.isMatch=!1}return S}function Xy(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var Zy=String.prototype.normalize?(e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``)):(e=>e),Qy=class{constructor(e,{location:t=K.location,threshold:n=K.threshold,distance:r=K.distance,includeMatches:i=K.includeMatches,findAllMatches:a=K.findAllMatches,minMatchCharLength:o=K.minMatchCharLength,isCaseSensitive:s=K.isCaseSensitive,ignoreDiacritics:c=K.ignoreDiacritics,ignoreLocation:l=K.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?Zy(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:Xy(e),startIndex:t})},d=this.pattern.length;if(d>Jy){let e=0,t=d%Jy,n=d-t;for(;e<n;)u(this.pattern.substr(e,Jy),e),e+=Jy;if(t){let e=d-Jy;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?Zy(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=Yy(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&(u=[...u,...g])});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=u),p}},$y=class{constructor(e){this.pattern=e}static isMultiMatch(e){return eb(e,this.multiRegex)}static isSingleMatch(e){return eb(e,this.singleRegex)}search(){}};function eb(e,t){let n=e.match(t);return n?n[1]:null}var tb=class extends $y{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},nb=class extends $y{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},rb=class extends $y{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},ib=class extends $y{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},ab=class extends $y{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},ob=class extends $y{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},sb=class extends $y{constructor(e,{location:t=K.location,threshold:n=K.threshold,distance:r=K.distance,includeMatches:i=K.includeMatches,findAllMatches:a=K.findAllMatches,minMatchCharLength:o=K.minMatchCharLength,isCaseSensitive:s=K.isCaseSensitive,ignoreDiacritics:c=K.ignoreDiacritics,ignoreLocation:l=K.ignoreLocation}={}){super(e),this._bitapSearch=new Qy(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},cb=class extends $y{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:a?0:1,indices:r}}},lb=[tb,cb,rb,ib,ob,ab,nb,sb],ub=lb.length,db=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,fb=`|`;function pb(e,t={}){return e.split(fb).map(e=>{let n=e.trim().split(db).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<ub;){let e=lb[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<ub;){let e=lb[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var mb=new Set([sb.type,cb.type]),hb=class{constructor(e,{isCaseSensitive:t=K.isCaseSensitive,ignoreDiacritics:n=K.ignoreDiacritics,includeMatches:r=K.includeMatches,minMatchCharLength:i=K.minMatchCharLength,ignoreLocation:a=K.ignoreLocation,findAllMatches:o=K.findAllMatches,location:s=K.location,threshold:c=K.threshold,distance:l=K.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?Zy(e):e,this.pattern=e,this.query=pb(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?Zy(e):e;let a=0,o=[],s=0;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:c,indices:l,score:u}=r.search(e);if(c){if(a+=1,s+=u,n){let e=r.constructor.type;mb.has(e)?o=[...o,...l]:o.push(l)}}else{s=0,a=0,o.length=0;break}}if(a){let e={isMatch:!0,score:s/a};return n&&(e.indices=o),e}}return{isMatch:!1,score:1}}},gb=[];function _b(...e){gb.push(...e)}function vb(e,t){for(let n=0,r=gb.length;n<r;n+=1){let r=gb[n];if(r.condition(e,t))return new r(e,t)}return new Qy(e,t)}var yb={AND:`$and`,OR:`$or`},bb={PATH:`$path`,PATTERN:`$val`},xb=e=>!!(e[yb.AND]||e[yb.OR]),Sb=e=>!!e[bb.PATH],Cb=e=>!my(e)&&xy(e)&&!xb(e),wb=e=>({[yb.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Tb(e,t,{auto:n=!0}={}){let r=e=>{let i=Object.keys(e),a=Sb(e);if(!a&&i.length>1&&!xb(e))return r(wb(e));if(Cb(e)){let r=a?e[bb.PATH]:i[0],o=a?e[bb.PATTERN]:e[r];if(!vy(o))throw Error(Dy(r));let s={keyId:Fy(r),pattern:o};return n&&(s.searcher=vb(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];my(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return xb(e)||(e=wb(e)),r(e)}function Eb(e,{ignoreFieldNorm:t=K.ignoreFieldNorm}){e.forEach(e=>{let n=1;e.matches.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),e.score=n})}function Db(e,t){let n=e.matches;t.matches=[],Cy(n)&&n.forEach(e=>{if(!Cy(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function Ob(e,t){t.score=e.score}function kb(e,t,{includeMatches:n=K.includeMatches,includeScore:r=K.includeScore}={}){let i=[];return n&&i.push(Db),r&&i.push(Ob),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var Ab=class{constructor(e,t={},n){this.options={...K,...t},this.options.useExtendedSearch,this._keyStore=new My(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Uy))throw Error(Ey);this._myIndex=t||Wy(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Cy(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let t=[];for(let n=0,r=this._docs.length;n<r;n+=1){let i=this._docs[n];e(i,n)&&(this.removeAt(n),--n,--r,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){let{includeMatches:n,includeScore:r,shouldSort:i,sortFn:a,ignoreFieldNorm:o}=this.options,s=vy(e)?vy(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Eb(s,{ignoreFieldNorm:o}),i&&s.sort(a),yy(t)&&t>-1&&(s=s.slice(0,t)),kb(s,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){let t=vb(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:e,i:n,n:i})=>{if(!Cy(e))return;let{isMatch:a,score:o,indices:s}=t.searchIn(e);a&&r.push({item:e,idx:n,matches:[{score:o,value:e,norm:i,indices:s}]})}),r}_searchLogical(e){let t=Tb(e,this.options),n=(e,t,r)=>{if(!e.children){let{keyId:n,searcher:i}=e,a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return a&&a.length?[{idx:r,item:t,matches:a}]:[]}let i=[];for(let a=0,o=e.children.length;a<o;a+=1){let o=e.children[a],s=n(o,t,r);if(s.length)i.push(...s);else if(e.operator===yb.AND)return[]}return i},r=this._myIndex.records,i={},a=[];return r.forEach(({$:e,i:r})=>{if(Cy(e)){let o=n(t,e,r);o.length&&(i[r]||(i[r]={idx:r,item:e,matches:[]},a.push(i[r])),o.forEach(({matches:e})=>{i[r].matches.push(...e)}))}}),a}_searchObjectList(e){let t=vb(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach(({$:e,i:r})=>{if(!Cy(e))return;let a=[];n.forEach((n,r)=>{a.push(...this._findMatches({key:n,value:e[r],searcher:t}))}),a.length&&i.push({idx:r,item:e,matches:a})}),i}_findMatches({key:e,value:t,searcher:n}){if(!Cy(t))return[];let r=[];if(my(t))t.forEach(({v:t,i,n:a})=>{if(!Cy(t))return;let{isMatch:o,score:s,indices:c}=n.searchIn(t);o&&r.push({score:s,key:e,value:t,idx:i,norm:a,indices:c})});else{let{v:i,n:a}=t,{isMatch:o,score:s,indices:c}=n.searchIn(i);o&&r.push({score:s,key:e,value:i,norm:a,indices:c})}return r}};Ab.version=`7.1.0`,Ab.createIndex=Wy,Ab.parseIndex=Gy,Ab.config=K,Ab.parseQuery=Tb,_b(hb);var jb=`locale-switcher-content`,Mb=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=mr(py),s=(0,m.useRef)(null),{locale:c}=hr(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=dy(),f=(0,m.useMemo)(()=>l.map(e=>({locale:e,englishName:sr(e,`en`),currentLocaleName:sr(e,c),ownLocaleName:sr(e)})),[l,c]),[p,h]=(0,m.useState)(``),[g,_]=ly(`locale-content-selector-see-all-locales`,!1),y=(0,m.useMemo)(()=>new Ab(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),b=(0,m.useMemo)(()=>p?y.search(p).map(e=>e.item):f,[p,f,y]),x=e=>{t?u.includes(e)?u.length>1&&d(t=>t.filter(t=>t!==e)):d(t=>[...t,e]):d([e])},S=e=>{_(e),d(e?l:[c])};return(0,v.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,v.jsxs)(ay,{identifier:jb,children:[(0,v.jsx)(ay.Trigger,{identifier:jb,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,children:(0,v.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,v.jsx)(`div`,{className:`px-2 py-1`,children:(0,v.jsx)(au,{size:16})}),(0,v.jsx)(lu,{className:`self-center`,size:16})]})}),(0,v.jsx)(ay.Panel,{identifier:jb,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,v.jsxs)(Hu,{className:`max-h-[60vh] min-w-28`,separator:`y`,role:`listbox`,transparency:`xs`,border:!0,roundedSize:`3xl`,borderColor:`text`,"aria-label":a.value,children:[t&&(0,v.jsx)(`div`,{className:`m-auto p-2`,children:(0,v.jsx)(Zh,{defaultValue:g,onChange:S,color:Kh.TEXT,size:Jh.SM,className:`!w-60`,choices:[{content:o.true.value,value:!0},{content:o.false.value,value:!1}]})}),!(t&&g)&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`div`,{className:`p-3`,children:(0,v.jsx)(wd,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>h(e.target.value),ref:s})}),(0,v.jsx)(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:b.map(({locale:e,currentLocaleName:r,ownLocaleName:i})=>(0,v.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,v.jsx)(Ju,{onClick:()=>x(e),label:`${n} ${r}`,disabled:!(l??l).includes(e),isActive:u.includes(e),variant:W.HOVERABLE,color:G.TEXT,isFullWidth:!0,textAlign:Ku.LEFT,size:U.SM,children:(0,v.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,v.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,v.jsx)(ql,{className:`size-full`})}),(0,v.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,v.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,v.jsx)(`span`,{dir:nr(e),lang:e,children:i}),(0,v.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,v.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},Nb=({htmlFor:e,required:t=!1,disabled:n=!1,className:r,children:i,...a})=>(0,v.jsxs)(`label`,{className:B(`select-none font-medium text-sm leading-none`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,n&&`cursor-not-allowed text-muted-foreground opacity-70`,r),htmlFor:e,suppressHydrationWarning:!0,...a,children:[i,t&&(0,v.jsx)(`span`,{className:`ml-1 text-destructive`,"aria-label":`required`,title:`This field is required`,children:`*`})]}),Pb=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,Fb=`after:content-['#'] after:scale-75 after:px-6 after:text-neutral after:absolute after:top-0 after:h-full after:-left-12 after:absolute after:to-neutral after:md:opacity-0 after:transition-opacity hover:after:opacity-80 after:duration-200 after:delay-100`,Ib=({className:e,...t})=>(0,v.jsx)(`h1`,{className:B(`font-bold text-2xl`,e),...t}),Lb=({className:e,...t})=>(0,v.jsx)(`h2`,{className:B(`mb-2 font-bold text-2xl`,Pb,e),...t}),Rb=({className:e,...t})=>(0,v.jsx)(`h3`,{className:B(`mb-2 font-bold text-xl`,Pb,e),...t}),zb=({className:e,...t})=>(0,v.jsx)(`h4`,{className:B(`font-bold text-lg`,Pb,e),...t}),Bb=({className:e,...t})=>(0,v.jsx)(`h5`,{className:B(`font-bold text-base`,Pb,e),...t}),Vb=({className:e,...t})=>(0,v.jsx)(`h6`,{className:B(`ml-3 font-bold text-base`,Pb,e),...t}),Hb=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),Ub=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},Wb=(e,t)=>{let n=e.getBoundingClientRect().left,r=e.getBoundingClientRect().top,i=window.getComputedStyle(e,`:after`),a=n+parseInt(i.getPropertyValue(`left`),10),o=a+parseInt(i.width,10),s=r+parseInt(i.getPropertyValue(`top`),10),c=s+parseInt(i.height,10),l=t.clientX,u=t.clientY;return l>=a&&l<=o&&u>=s&&u<=c},Gb=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?Hb(t):void 0;return(0,v.jsx)(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(Wb(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),Ub(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:B(r&&Fb,n),...i,children:t})},Kb=({isClickable:e,...t})=>(0,v.jsx)(Ib,{...t}),qb=({isClickable:e=!1,...t})=>(0,v.jsx)(Gb,{H:Lb,isClickable:e,...t}),Jb=({isClickable:e=!1,...t})=>(0,v.jsx)(Gb,{H:Rb,isClickable:e,...t}),Yb=({isClickable:e=!1,...t})=>(0,v.jsx)(Gb,{H:zb,isClickable:e,...t}),Xb=({isClickable:e=!1,...t})=>(0,v.jsx)(Gb,{H:Bb,isClickable:e,...t}),Zb=({isClickable:e=!1,...t})=>(0,v.jsx)(Gb,{H:Vb,isClickable:e,...t}),Qb={key:`expand-collapse`,content:{nodeType:`translation`,translation:{en:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},"en-GB":{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},fr:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Afficher tout`,false:`Afficher moins`}}},es:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar todo`,false:`Mostrar menos`}}},de:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mehr anzeigen`,false:`Weniger anzeigen`}}},ja:{expandCollapseContent:{nodeType:`condition`,condition:{true:`すべて表示`,false:`表示を減らす`}}},ko:{expandCollapseContent:{nodeType:`condition`,condition:{true:`모두 보기`,false:`간략히 보기`}}},zh:{expandCollapseContent:{nodeType:`condition`,condition:{true:`显示全部`,false:`显示较少`}}},it:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostra tutto`,false:`Mostra meno`}}},pt:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar tudo`,false:`Mostrar menos`}}},hi:{expandCollapseContent:{nodeType:`condition`,condition:{true:`सभी दिखाएँ`,false:`कम दिखाएँ`}}},ar:{expandCollapseContent:{nodeType:`condition`,condition:{true:`عرض الكل`,false:`عرض أقل`}}},ru:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Показать все`,false:`Показать меньше`}}}}},localIds:[`expand-collapse::local::../@intlayer/design-system/dist/esm/components/ExpandCollapse/expandCollapse.content.mjs`]},$b=700,ex=({isRollable:e=!0,minHeight:t=$b,children:n,className:r})=>{let[i,a]=(0,m.useState)(0),[o,s]=(0,m.useState)(!0),c=(0,m.useRef)(null),{expandCollapseContent:l}=mr(Qb),u=i>t;return(0,m.useEffect)(()=>{let e=()=>{c.current&&a(c.current.clientHeight)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[n]),e?u?(0,v.jsxs)(Yu,{isHidden:o,minHeight:t,className:`w-full overflow-x-auto overflow-y-hidden`,children:[(0,v.jsx)(`div`,{className:B(`grid w-full`,r),ref:c,children:n}),(0,v.jsx)(`button`,{className:B(`absolute right-0 bottom-0 flex w-full cursor-pointer items-center justify-center rounded-t-2xl bg-gradient-to-t from-card/80 to-transparent px-3 py-0.5 text-md text-neutral-700 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all duration-300 hover:py-1 dark:text-neutral-400`,o?`w-full`:`w-32`),type:`button`,onClick:()=>s(e=>!e),children:l(o)})]}):(0,v.jsx)(`div`,{className:B(`grid w-full`,r),ref:c,children:n}):n},tx=({children:e})=>(0,v.jsx)(`div`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,v.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:(0,v.jsx)(`code`,{children:typeof e==`string`?e.split(`
|
|
170
|
+
`).map((e,t)=>(0,v.jsx)(`span`,{className:`line block w-full`,children:e},`line-${t}-${e.slice(0,10)}`)):e})})}),nx=(0,m.lazy)(()=>s(()=>import(`./CodeBlockShiki-B5GuXEsm.js`).then(e=>({default:e.CodeBlockShiki})),__vite__mapDeps([4,1,5,2,3]))),rx=({className:e,onChange:t,isEditable:n,children:r,lang:i,isDarkMode:a,...o})=>(0,v.jsx)(`div`,{className:B(`flex w-full min-w-0 max-w-full overflow-x-auto`,e),...o,children:(0,v.jsx)(m.Suspense,{fallback:(0,v.jsx)(tx,{children:r}),children:(0,v.jsx)(nx,{lang:i,isDarkMode:a,children:r})})}),ix=(0,m.createContext)(null),ax=()=>{let e=(0,m.useContext)(ix);if(!e)throw Error(`useMultiSelect must be used within MultiSelectProvider`);return e},ox=({values:e,defaultValues:t,onValueChange:n,loop:r=!1,className:i,children:a,dir:o,...s})=>{let[c,l]=(0,m.useState)(t??[]),[u,d]=(0,m.useState)(``),[f,p]=(0,m.useState)(!1),[h,g]=(0,m.useState)(-1),_=(0,m.useRef)(null),[y,b]=(0,m.useState)(!1),[x,S]=(0,m.useState)(``);(0,m.useEffect)(()=>{e&&l(e)},[e]);let C=(0,m.useCallback)(e=>{if(c.includes(e)){let t=c.filter(t=>t!==e);l(t),n?.(t)}else{let t=[...c,e];l(t),n?.(t)}},[c]),w=(0,m.useCallback)(e=>{e.preventDefault();let t=e.currentTarget,n=t.value.substring(t.selectionStart??0,t.selectionEnd??0);S(n),b(n===u)},[u]),T=(0,m.useCallback)(e=>{e.stopPropagation();let t=_.current;if(!t)return;let n=()=>{let e=h+1;g(e>c.length-1?r?0:-1:e)},i=()=>{let e=h-1;g(e<0?c.length-1:e)},a=()=>{g(h-1<=0?c.length-1==0?-1:0:h-1)};switch(e.key){case`ArrowLeft`:o===`rtl`?c.length>0&&(h!==-1||r)&&n():c.length>0&&t.selectionStart===0&&i();break;case`ArrowRight`:o===`rtl`?c.length>0&&t.selectionStart===0&&i():c.length>0&&(h!==-1||r)&&n();break;case`Backspace`:case`Delete`:c.length>0&&(h!==-1&&h<c.length?(C(c[h]),a()):(t.selectionStart===0&&x===u||y)&&C(c[c.length-1]));break;case`Enter`:p(!0);break;case`Escape`:h===-1?f&&p(!1):g(-1);break}},[c,u,h,r]);return(0,v.jsx)(ix,{value:(0,m.useMemo)(()=>({value:c,onValueChange:C,open:f,setOpen:p,inputValue:u,setInputValue:d,activeIndex:h,setActiveIndex:g,ref:_,handleSelect:w}),[c,C,f,p,u,d,h,g,_,w]),children:(0,v.jsx)(kh,{onKeyDown:T,className:B(`flex w-full flex-col gap-2 overflow-visible bg-transparent`,i),dir:o,...s,children:a})})},sx=({className:e,getBadgeValue:t=e=>e,validationStyleEnabled:n=!1,children:r,...i})=>{let{value:a,onValueChange:o,activeIndex:s}=ax(),c=(0,m.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]);return(0,v.jsxs)(`div`,{className:B(`flex w-full flex-col gap-3`,`cursor-pointer select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-text`,`ring-0`,`focus-within:outline-none`,`focus-within:ring-3`,`focus-within:ring-neutral-200`,`dark:focus-within:ring-neutral-500`,`focus-within:ring-offset-white`,`dark:focus-within:ring-offset-neutral-500`,`[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,n&&`valid:border-success invalid:border-error`,e),...i,children:[a.length>0&&(0,v.jsx)(`div`,{className:`flex w-full flex-wrap gap-1`,children:a.map((e,n)=>(0,v.jsxs)(td,{className:B(`flex items-center gap-1 rounded-xl px-1`,s===n&&`ring-2 ring-muted-foreground`),color:Zu.TEXT,children:[(0,v.jsx)(`span`,{className:`text-xs`,children:t(e)}),(0,v.jsxs)(`button`,{"aria-label":`Remove ${e} option`,"aria-roledescription":`button to remove option`,onMouseDown:c,onClick:()=>o(e),children:[(0,v.jsxs)(`span`,{className:`sr-only`,children:[`Remove `,e,` option`]}),(0,v.jsx)(vu,{className:`size-4 cursor-pointer`})]})]},e))}),r]})},cx=({className:e,...t})=>{let{setOpen:n,inputValue:r,setInputValue:i,activeIndex:a,setActiveIndex:o,handleSelect:s,ref:c}=ax();return(0,v.jsx)(Rh.Input,{...t,tabIndex:0,ref:c,value:r,onValueChange:a===-1?i:void 0,onSelect:s,onBlur:()=>n(!1),onFocus:()=>n(!0),onClick:()=>o(-1),className:B(`ml-2 flex-1 cursor-pointer outline-hidden`,e,a!==-1&&`caret-transparent`)})},lx=({children:e})=>{let{open:t}=ax();return(0,v.jsx)(`div`,{className:`relative`,children:t&&e})},ux=({className:e,children:t})=>(0,v.jsxs)(Rh.List,{className:B(`absolute top-0 z-10 flex w-full flex-col gap-2`,`rounded-xl p-2 shadow-md`,`bg-white dark:bg-neutral-950`,`text-text`,`border border-neutral-200 dark:border-neutral-800`,`transition-colors`,e),children:[t,(0,v.jsx)(Rh.Empty,{children:(0,v.jsx)(`span`,{className:`text-muted-foreground`,children:`No results found`})})]}),dx=({className:e,value:t,children:n,...r})=>{let{value:i,onValueChange:a,setInputValue:o}=ax(),s=(0,m.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),c=i.includes(t);return(0,v.jsxs)(Rh.Item,{...r,onSelect:()=>{a(t),o(``)},className:B(`flex cursor-pointer justify-between`,`rounded-lg px-2 py-1`,`transition-colors`,`hover:bg-neutral/10`,c&&`opacity-50`,r.disabled&&`cursor-not-allowed opacity-50`,e),onMouseDown:s,children:[n,c&&(0,v.jsx)(ql,{className:`size-4`})]})},fx=ox;fx.Trigger=sx,fx.Input=cx,fx.Content=lx,fx.List=ux,fx.Item=dx;function px(e,[t,n]){return Math.min(n,Math.max(t,e))}var mx=m.createContext(void 0);function hx(e){let t=m.useContext(mx);return e||t||`ltr`}var gx=[`top`,`right`,`bottom`,`left`],_x=Math.min,vx=Math.max,yx=Math.round,bx=Math.floor,xx=e=>({x:e,y:e}),Sx={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Cx(e,t,n){return vx(e,_x(t,n))}function wx(e,t){return typeof e==`function`?e(t):e}function Tx(e){return e.split(`-`)[0]}function Ex(e){return e.split(`-`)[1]}function Dx(e){return e===`x`?`y`:`x`}function Ox(e){return e===`y`?`height`:`width`}function kx(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Ax(e){return Dx(kx(e))}function jx(e,t,n){n===void 0&&(n=!1);let r=Ex(e),i=Ax(e),a=Ox(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Bx(o)),[o,Bx(o)]}function Mx(e){let t=Bx(e);return[Nx(e),t,Nx(t)]}function Nx(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Px=[`left`,`right`],Fx=[`right`,`left`],Ix=[`top`,`bottom`],Lx=[`bottom`,`top`];function Rx(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Fx:Px:t?Px:Fx;case`left`:case`right`:return t?Ix:Lx;default:return[]}}function zx(e,t,n,r){let i=Ex(e),a=Rx(Tx(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Nx)))),a}function Bx(e){let t=Tx(e);return Sx[t]+e.slice(t.length)}function Vx(e){return{top:0,right:0,bottom:0,left:0,...e}}function Hx(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Vx(e)}function Ux(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Wx(e,t,n){let{reference:r,floating:i}=e,a=kx(t),o=Ax(t),s=Ox(o),c=Tx(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Ex(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Gx(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=wx(t,e),p=Hx(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ux(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Ux(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Kx=50,qx=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Gx},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Wx(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Kx&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Wx(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Jx=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=wx(e,t)||{};if(l==null)return{};let d=Hx(u),f={x:n,y:r},p=Ax(i),m=Ox(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=_x(d[_],T),D=_x(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=Cx(O,A,k),M=!c.arrow&&Ex(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Yx=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=wx(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Tx(r),_=kx(o),v=Tx(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Bx(o)]:Mx(o)),x=p!==`none`;!d&&x&&b.push(...zx(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=jx(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==kx(t))||T.every(e=>kx(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=kx(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Xx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Zx(e){return gx.some(t=>e[t]>=0)}var Qx=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=wx(e,t);switch(i){case`referenceHidden`:{let e=Xx(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Zx(e)}}}case`escaped`:{let e=Xx(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Zx(e)}}}default:return{}}}}},$x=new Set([`left`,`top`]);async function eS(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Tx(n),s=Ex(n),c=kx(n)===`y`,l=$x.has(o)?-1:1,u=a&&c?-1:1,d=wx(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var tS=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await eS(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},nS=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=wx(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=kx(Tx(i)),p=Dx(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Cx(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Cx(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},rS=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=wx(e,t),u={x:n,y:r},d=kx(i),f=Dx(d),p=u[f],m=u[d],h=wx(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=$x.has(Tx(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},iS=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=wx(e,t),u=await o.detectOverflow(t,l),d=Tx(i),f=Ex(i),p=kx(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=_x(h-u[g],v),x=_x(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=vx(u.left,0),t=vx(u.right,0),n=vx(u.top,0),r=vx(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:vx(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:vx(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function aS(){return typeof window<`u`}function oS(e){return lS(e)?(e.nodeName||``).toLowerCase():`#document`}function sS(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cS(e){return((lS(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function lS(e){return aS()?e instanceof Node||e instanceof sS(e).Node:!1}function uS(e){return aS()?e instanceof Element||e instanceof sS(e).Element:!1}function dS(e){return aS()?e instanceof HTMLElement||e instanceof sS(e).HTMLElement:!1}function fS(e){return!aS()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof sS(e).ShadowRoot}function pS(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=wS(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function mS(e){return/^(table|td|th)$/.test(oS(e))}function hS(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var gS=/transform|translate|scale|rotate|perspective|filter/,_S=/paint|layout|strict|content/,vS=e=>!!e&&e!==`none`,yS;function bS(e){let t=uS(e)?wS(e):e;return vS(t.transform)||vS(t.translate)||vS(t.scale)||vS(t.rotate)||vS(t.perspective)||!SS()&&(vS(t.backdropFilter)||vS(t.filter))||gS.test(t.willChange||``)||_S.test(t.contain||``)}function xS(e){let t=ES(e);for(;dS(t)&&!CS(t);){if(bS(t))return t;if(hS(t))return null;t=ES(t)}return null}function SS(){return yS??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),yS}function CS(e){return/^(html|body|#document)$/.test(oS(e))}function wS(e){return sS(e).getComputedStyle(e)}function TS(e){return uS(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ES(e){if(oS(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||fS(e)&&e.host||cS(e);return fS(t)?t.host:t}function DS(e){let t=ES(e);return CS(t)?e.ownerDocument?e.ownerDocument.body:e.body:dS(t)&&pS(t)?t:DS(t)}function OS(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=DS(e),i=r===e.ownerDocument?.body,a=sS(r);if(i){let e=kS(a);return t.concat(a,a.visualViewport||[],pS(r)?r:[],e&&n?OS(e):[])}else return t.concat(r,OS(r,[],n))}function kS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function AS(e){let t=wS(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=dS(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=yx(n)!==a||yx(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function jS(e){return uS(e)?e:e.contextElement}function MS(e){let t=jS(e);if(!dS(t))return xx(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=AS(t),o=(a?yx(n.width):n.width)/r,s=(a?yx(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var NS=xx(0);function PS(e){let t=sS(e);return!SS()||!t.visualViewport?NS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function FS(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==sS(e)?!1:t}function IS(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=jS(e),o=xx(1);t&&(r?uS(r)&&(o=MS(r)):o=MS(e));let s=FS(a,n,r)?PS(a):xx(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=sS(a),t=r&&uS(r)?sS(r):r,n=e,i=kS(n);for(;i&&r&&t!==n;){let e=MS(i),t=i.getBoundingClientRect(),r=wS(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=sS(i),i=kS(n)}}return Ux({width:u,height:d,x:c,y:l})}function LS(e,t){let n=TS(e).scrollLeft;return t?t.left+n:IS(cS(e)).left+n}function RS(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-LS(e,n),y:n.top+t.scrollTop}}function zS(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=cS(r),s=t?hS(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=xx(1),u=xx(0),d=dS(r);if((d||!d&&!a)&&((oS(r)!==`body`||pS(o))&&(c=TS(r)),d)){let e=IS(r);l=MS(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?RS(o,c):xx(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function BS(e){return Array.from(e.getClientRects())}function VS(e){let t=cS(e),n=TS(e),r=e.ownerDocument.body,i=vx(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=vx(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+LS(e),s=-n.scrollTop;return wS(r).direction===`rtl`&&(o+=vx(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var HS=25;function US(e,t){let n=sS(e),r=cS(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=SS();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=LS(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=HS&&(a-=o)}else l<=HS&&(a+=l);return{width:a,height:o,x:s,y:c}}function WS(e,t){let n=IS(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=dS(e)?MS(e):xx(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function GS(e,t,n){let r;if(t===`viewport`)r=US(e,n);else if(t===`document`)r=VS(cS(e));else if(uS(t))r=WS(t,n);else{let n=PS(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ux(r)}function KS(e,t){let n=ES(e);return n===t||!uS(n)||CS(n)?!1:wS(n).position===`fixed`||KS(n,t)}function qS(e,t){let n=t.get(e);if(n)return n;let r=OS(e,[],!1).filter(e=>uS(e)&&oS(e)!==`body`),i=null,a=wS(e).position===`fixed`,o=a?ES(e):e;for(;uS(o)&&!CS(o);){let t=wS(o),n=bS(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||pS(o)&&!n&&KS(e,o))?r=r.filter(e=>e!==o):i=t,o=ES(o)}return t.set(e,r),r}function JS(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?hS(t)?[]:qS(t,this._c):[].concat(n),r],o=GS(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=GS(t,a[e],i);s=vx(n.top,s),c=_x(n.right,c),l=_x(n.bottom,l),u=vx(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function YS(e){let{width:t,height:n}=AS(e);return{width:t,height:n}}function XS(e,t,n){let r=dS(t),i=cS(t),a=n===`fixed`,o=IS(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=xx(0);function l(){c.x=LS(i)}if(r||!r&&!a)if((oS(t)!==`body`||pS(i))&&(s=TS(t)),r){let e=IS(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?RS(i,s):xx(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function ZS(e){return wS(e).position===`static`}function QS(e,t){if(!dS(e)||wS(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return cS(e)===n&&(n=n.ownerDocument.body),n}function $S(e,t){let n=sS(e);if(hS(e))return n;if(!dS(e)){let t=ES(e);for(;t&&!CS(t);){if(uS(t)&&!ZS(t))return t;t=ES(t)}return n}let r=QS(e,t);for(;r&&mS(r)&&ZS(r);)r=QS(r,t);return r&&CS(r)&&ZS(r)&&!bS(r)?n:r||xS(e)||n}var eC=async function(e){let t=this.getOffsetParent||$S,n=this.getDimensions,r=await n(e.floating);return{reference:XS(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function tC(e){return wS(e).direction===`rtl`}var nC={convertOffsetParentRelativeRectToViewportRelativeRect:zS,getDocumentElement:cS,getClippingRect:JS,getOffsetParent:$S,getElementRects:eC,getClientRects:BS,getDimensions:YS,getScale:MS,isElement:uS,isRTL:tC};function rC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function iC(e,t){let n=null,r,i=cS(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=bx(d),h=bx(i.clientWidth-(u+f)),g=bx(i.clientHeight-(d+p)),_=bx(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:vx(0,_x(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!rC(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function aC(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=jS(e),u=i||a?[...l?OS(l):[],...t?OS(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?iC(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?IS(e):null;c&&g();function g(){let t=IS(e);h&&!rC(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var oC=tS,sC=nS,cC=Yx,lC=iS,uC=Qx,dC=Jx,fC=rS,pC=(e,t,n)=>{let r=new Map,i={platform:nC,...n},a={...i.platform,_c:r};return qx(e,t,{...i,platform:a})},mC=typeof document<`u`?m.useLayoutEffect:function(){};function hC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!hC(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!hC(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function gC(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _C(e,t){let n=gC(e);return Math.round(t*n)/n}function vC(e){let t=m.useRef(e);return mC(()=>{t.current=e}),t}function yC(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=m.useState(r);hC(f,r)||p(r);let[h,g]=m.useState(null),[_,v]=m.useState(null),y=m.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=m.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=m.useRef(null),w=m.useRef(null),T=m.useRef(u),E=c!=null,D=vC(c),O=vC(i),k=vC(l),A=m.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),pC(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!hC(T.current,t)&&(T.current=t,rc.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);mC(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=m.useRef(!1);mC(()=>(j.current=!0,()=>{j.current=!1}),[]),mC(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=m.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=m.useMemo(()=>({reference:x,floating:S}),[x,S]),ee=m.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=_C(N.floating,u.x),r=_C(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...gC(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:ee}),[u,A,M,N,ee])}var bC=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:dC({element:r.current,padding:i}).fn(n):r?dC({element:r,padding:i}).fn(n):{}}}},xC=(e,t)=>{let n=oC(e);return{name:n.name,fn:n.fn,options:[e,t]}},SC=(e,t)=>{let n=sC(e);return{name:n.name,fn:n.fn,options:[e,t]}},CC=(e,t)=>({fn:fC(e).fn,options:[e,t]}),wC=(e,t)=>{let n=cC(e);return{name:n.name,fn:n.fn,options:[e,t]}},TC=(e,t)=>{let n=lC(e);return{name:n.name,fn:n.fn,options:[e,t]}},EC=(e,t)=>{let n=uC(e);return{name:n.name,fn:n.fn,options:[e,t]}},DC=(e,t)=>{let n=bC(e);return{name:n.name,fn:n.fn,options:[e,t]}},OC=`Arrow`,kC=m.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,v.jsx)(V.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,v.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});kC.displayName=OC;var AC=kC;function jC(e){let[t,n]=m.useState(void 0);return Sc(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var MC=`Popper`,[NC,PC]=Js(MC),[FC,IC]=NC(MC),LC=e=>{let{__scopePopper:t,children:n}=e,[r,i]=m.useState(null);return(0,v.jsx)(FC,{scope:t,anchor:r,onAnchorChange:i,children:n})};LC.displayName=MC;var RC=`PopperAnchor`,zC=m.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=IC(RC,n),o=m.useRef(null),s=Ks(t,o),c=m.useRef(null);return m.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,v.jsx)(V.div,{...i,ref:s})});zC.displayName=RC;var BC=`PopperContent`,[VC,HC]=NC(BC),UC=m.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:h,...g}=e,_=IC(BC,n),[y,b]=m.useState(null),x=Ks(t,e=>b(e)),[S,C]=m.useState(null),w=jC(S),T=w?.width??0,E=w?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(qC),altBoundary:A},{refs:M,floatingStyles:N,placement:ee,isPositioned:te,middlewareData:P}=yC({strategy:`fixed`,placement:D,whileElementsMounted:(...e)=>aC(...e,{animationFrame:p===`always`}),elements:{reference:_.anchor},middleware:[xC({mainAxis:i+E,alignmentAxis:o}),c&&SC({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?CC():void 0,...j}),c&&wC({...j}),TC({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),S&&DC({element:S,padding:s}),JC({arrowWidth:T,arrowHeight:E}),f&&EC({strategy:`referenceHidden`,...j})]}),[F,ne]=YC(ee),re=ac(h);Sc(()=>{te&&re?.()},[te,re]);let ie=P.arrow?.x,ae=P.arrow?.y,oe=P.arrow?.centerOffset!==0,[se,ce]=m.useState();return Sc(()=>{y&&ce(window.getComputedStyle(y).zIndex)},[y]),(0,v.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:te?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:se,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(` `),...P.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,v.jsx)(VC,{scope:n,placedSide:F,onArrowChange:C,arrowX:ie,arrowY:ae,shouldHideArrow:oe,children:(0,v.jsx)(V.div,{"data-side":F,"data-align":ne,...g,ref:x,style:{...g.style,animation:te?void 0:`none`}})})})});UC.displayName=BC;var WC=`PopperArrow`,GC={top:`bottom`,right:`left`,bottom:`top`,left:`right`},KC=m.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=HC(WC,n),a=GC[i.placedSide];return(0,v.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,v.jsx)(AC,{...r,ref:t,style:{...r.style,display:`block`}})})});KC.displayName=WC;function qC(e){return e!==null}var JC=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=YC(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function YC(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var XC=LC,ZC=zC,QC=UC,$C=KC;function ew(e){let t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var tw=[` `,`Enter`,`ArrowUp`,`ArrowDown`],nw=[` `,`Enter`],rw=`Select`,[iw,aw,ow]=nc(rw),[sw,cw]=Js(rw,[ow,PC]),lw=PC(),[uw,dw]=sw(rw),[fw,pw]=sw(rw),mw=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:h}=e,g=lw(t),[_,y]=m.useState(null),[b,x]=m.useState(null),[S,C]=m.useState(!1),w=hx(l),[T,E]=jc({prop:r,defaultProp:i??!1,onChange:a,caller:rw}),[D,O]=jc({prop:o,defaultProp:s,onChange:c,caller:rw}),k=m.useRef(null),A=_?h||!!_.closest(`form`):!0,[j,M]=m.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,v.jsx)(XC,{...g,children:(0,v.jsxs)(uw,{required:p,scope:t,trigger:_,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:ff(),value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,children:[(0,v.jsx)(iw.Provider,{scope:t,children:(0,v.jsx)(fw,{scope:e.__scopeSelect,onNativeOptionAdd:m.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:m.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,v.jsxs)(lT,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:D,onChange:e=>O(e.target.value),disabled:f,form:h,children:[D===void 0?(0,v.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};mw.displayName=rw;var hw=`SelectTrigger`,gw=m.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=lw(n),o=dw(hw,n),s=o.disabled||r,c=Ks(t,o.onTriggerChange),l=aw(n),u=m.useRef(`touch`),[d,f,p]=dT(e=>{let t=l().filter(e=>!e.disabled),n=fT(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),h=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,v.jsx)(ZC,{asChild:!0,...a,children:(0,v.jsx)(V.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":uT(o.value)?``:void 0,...i,ref:c,onClick:Us(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&h(e)}),onPointerDown:Us(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(h(e),e.preventDefault())}),onKeyDown:Us(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&tw.includes(e.key)&&(h(),e.preventDefault())})})})});gw.displayName=hw;var _w=`SelectValue`,vw=m.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=dw(_w,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Ks(t,c.onValueNodeChange);return Sc(()=>{l(u)},[l,u]),(0,v.jsx)(V.span,{...s,ref:d,style:{pointerEvents:`none`},children:uT(c.value)?(0,v.jsx)(v.Fragment,{children:o}):a})});vw.displayName=_w;var yw=`SelectIcon`,bw=m.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,v.jsx)(V.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});bw.displayName=yw;var xw=`SelectPortal`,Sw=e=>(0,v.jsx)(wc,{asChild:!0,...e});Sw.displayName=xw;var Cw=`SelectContent`,ww=m.forwardRef((e,t)=>{let n=dw(Cw,e.__scopeSelect),[r,i]=m.useState();if(Sc(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?rc.createPortal((0,v.jsx)(Ew,{scope:e.__scopeSelect,children:(0,v.jsx)(iw.Slot,{scope:e.__scopeSelect,children:(0,v.jsx)(`div`,{children:e.children})})}),t):null}return(0,v.jsx)(Aw,{...e,ref:t})});ww.displayName=Cw;var Tw=10,[Ew,Dw]=sw(Cw),Ow=`SelectContentImpl`,kw=Xs(`SelectContent.RemoveScroll`),Aw=m.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:g,avoidCollisions:_,...y}=e,b=dw(Cw,n),[x,S]=m.useState(null),[C,w]=m.useState(null),T=Ks(t,e=>S(e)),[E,D]=m.useState(null),[O,k]=m.useState(null),A=aw(n),[j,M]=m.useState(!1),N=m.useRef(!1);m.useEffect(()=>{if(x)return Yp(x)},[x]),Af();let ee=m.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,C]),te=m.useCallback(()=>ee([E,x]),[ee,E,x]);m.useEffect(()=>{j&&te()},[j,te]);let{onOpenChange:P,triggerPointerDownPosRef:F}=b;m.useEffect(()=>{if(x){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||P(!1),document.removeEventListener(`pointermove`,t),F.current=null};return F.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[x,P,F]),m.useEffect(()=>{let e=()=>P(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[P]);let[ne,re]=dT(e=>{let t=A().filter(e=>!e.disabled),n=fT(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ie=m.useCallback((e,t,n)=>{let r=!N.current&&!n;(b.value!==void 0&&b.value===t||r)&&(D(e),r&&(N.current=!0))},[b.value]),ae=m.useCallback(()=>x?.focus(),[x]),oe=m.useCallback((e,t,n)=>{let r=!N.current&&!n;(b.value!==void 0&&b.value===t||r)&&k(e)},[b.value]),se=r===`popper`?Pw:Mw,ce=se===Pw?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:g,avoidCollisions:_}:{};return(0,v.jsx)(Ew,{scope:n,content:x,viewport:C,onViewportChange:w,itemRefCallback:ie,selectedItem:E,onItemLeave:ae,itemTextRefCallback:oe,focusSelectedItem:te,selectedItemText:O,position:r,isPositioned:j,searchRef:ne,children:(0,v.jsx)(Bp,{as:kw,allowPinchZoom:!0,children:(0,v.jsx)(_f,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Us(i,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,v.jsx)(pc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,v.jsx)(se,{role:`listbox`,id:b.contentId,"data-state":b.open?`open`:`closed`,dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...ce,onPlaced:()=>M(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,...y.style},onKeyDown:Us(y.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&re(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>ee(t)),e.preventDefault()}})})})})})})});Aw.displayName=Ow;var jw=`SelectItemAlignedPosition`,Mw=m.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=dw(Cw,n),o=Dw(Cw,n),[s,c]=m.useState(null),[l,u]=m.useState(null),d=Ks(t,e=>u(e)),f=aw(n),p=m.useRef(!1),h=m.useRef(!0),{viewport:g,selectedItem:_,selectedItemText:y,focusSelectedItem:b}=o,x=m.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&g&&_&&y){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=y.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Tw,d=px(a,[Tw,Math.max(Tw,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Tw,d=px(a,[Tw,Math.max(Tw,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Tw*2,u=g.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),v=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+h+u+b+v,S=Math.min(_.offsetHeight*5,x),C=window.getComputedStyle(g),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Tw,D=c-E,O=_.offsetHeight/2,k=_.offsetTop+O,A=m+h+k,j=x-A;if(A<=E){let e=o.length>0&&_===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-g.offsetTop-g.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+v);s.style.height=n+`px`}else{let e=o.length>0&&_===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+g.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,g.scrollTop=A-E+g.offsetTop}s.style.margin=`${Tw}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,g,_,y,a.dir,r]);Sc(()=>x(),[x]);let[S,C]=m.useState();return Sc(()=>{l&&C(window.getComputedStyle(l).zIndex)},[l]),(0,v.jsx)(Fw,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:m.useCallback(e=>{e&&h.current===!0&&(x(),b?.(),h.current=!1)},[x,b]),children:(0,v.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:S},children:(0,v.jsx)(V.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});Mw.displayName=jw;var Nw=`SelectPopperPosition`,Pw=m.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Tw,...a}=e,o=lw(n);return(0,v.jsx)(QC,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});Pw.displayName=Nw;var[Fw,Iw]=sw(Cw,{}),Lw=`SelectViewport`,Rw=m.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=Dw(Lw,n),o=Iw(Lw,n),s=Ks(t,a.onViewportChange),c=m.useRef(0);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,v.jsx)(iw.Slot,{scope:n,children:(0,v.jsx)(V.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Us(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-Tw*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});Rw.displayName=Lw;var zw=`SelectGroup`,[Bw,Vw]=sw(zw),Hw=m.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=ff();return(0,v.jsx)(Bw,{scope:n,id:i,children:(0,v.jsx)(V.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Hw.displayName=zw;var Uw=`SelectLabel`,Ww=m.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Vw(Uw,n);return(0,v.jsx)(V.div,{id:i.id,...r,ref:t})});Ww.displayName=Uw;var Gw=`SelectItem`,[Kw,qw]=sw(Gw),Jw=m.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=dw(Gw,n),c=Dw(Gw,n),l=s.value===r,[u,d]=m.useState(a??``),[f,p]=m.useState(!1),h=Ks(t,e=>c.itemRefCallback?.(e,r,i)),g=ff(),_=m.useRef(`touch`),y=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,v.jsx)(Kw,{scope:n,value:r,disabled:i,textId:g,isSelected:l,onItemTextChange:m.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,v.jsx)(iw.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,v.jsx)(V.div,{role:`option`,"aria-labelledby":g,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:h,onFocus:Us(o.onFocus,()=>p(!0)),onBlur:Us(o.onBlur,()=>p(!1)),onClick:Us(o.onClick,()=>{_.current!==`mouse`&&y()}),onPointerUp:Us(o.onPointerUp,()=>{_.current===`mouse`&&y()}),onPointerDown:Us(o.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:Us(o.onPointerMove,e=>{_.current=e.pointerType,i?c.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Us(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Us(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(nw.includes(e.key)&&y(),e.key===` `&&e.preventDefault())})})})})});Jw.displayName=Gw;var Yw=`SelectItemText`,Xw=m.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=dw(Yw,n),s=Dw(Yw,n),c=qw(Yw,n),l=pw(Yw,n),[u,d]=m.useState(null),f=Ks(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,h=m.useMemo(()=>(0,v.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return Sc(()=>(g(h),()=>_(h)),[g,_,h]),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(V.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?rc.createPortal(a.children,o.valueNode):null]})});Xw.displayName=Yw;var Zw=`SelectItemIndicator`,Qw=m.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return qw(Zw,n).isSelected?(0,v.jsx)(V.span,{"aria-hidden":!0,...r,ref:t}):null});Qw.displayName=Zw;var $w=`SelectScrollUpButton`,eT=m.forwardRef((e,t)=>{let n=Dw($w,e.__scopeSelect),r=Iw($w,e.__scopeSelect),[i,a]=m.useState(!1),o=Ks(t,r.onScrollButtonChange);return Sc(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,v.jsx)(rT,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});eT.displayName=$w;var tT=`SelectScrollDownButton`,nT=m.forwardRef((e,t)=>{let n=Dw(tT,e.__scopeSelect),r=Iw(tT,e.__scopeSelect),[i,a]=m.useState(!1),o=Ks(t,r.onScrollButtonChange);return Sc(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,v.jsx)(rT,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});nT.displayName=tT;var rT=m.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Dw(`SelectScrollButton`,n),o=m.useRef(null),s=aw(n),c=m.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return m.useEffect(()=>()=>c(),[c]),Sc(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,v.jsx)(V.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Us(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Us(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Us(i.onPointerLeave,()=>{c()})})}),iT=`SelectSeparator`,aT=m.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,v.jsx)(V.div,{"aria-hidden":!0,...r,ref:t})});aT.displayName=iT;var oT=`SelectArrow`,sT=m.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=lw(n),a=dw(oT,n),o=Dw(oT,n);return a.open&&o.position===`popper`?(0,v.jsx)($C,{...i,...r,ref:t}):null});sT.displayName=oT;var cT=`SelectBubbleInput`,lT=m.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=m.useRef(null),a=Ks(r,i),o=ew(t);return m.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,v.jsx)(V.select,{...n,style:{...Pc,...n.style},ref:a,defaultValue:t})});lT.displayName=cT;function uT(e){return e===``||e===void 0}function dT(e){let t=ac(e),n=m.useRef(``),r=m.useRef(0),i=m.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=m.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function fT(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=pT(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function pT(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var mT=mw,hT=gw,gT=vw,_T=bw,vT=Sw,yT=ww,bT=Rw,xT=Hw,ST=Ww,CT=Jw,wT=Xw,TT=Qw,ET=eT,DT=nT,OT=aT,kT=function(e){return e.POPPER=`popper`,e.ITEM_ALIGNED=`item-aligned`,e}({}),AT=mT,jT=xT,MT=gT,NT=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>(0,v.jsxs)(hT,{suppressHydrationWarning:!0,className:B(`flex w-full cursor-pointer items-center justify-between whitespace-nowrap`,`select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-text`,`ring-0`,`focus-visible:outline-none`,`focus-visible:ring-3`,`focus-visible:ring-neutral-200`,`dark:focus-visible:ring-neutral-500`,`focus-visible:ring-offset-white`,`dark:focus-visible:ring-offset-neutral-500`,`[box-shadow:none] focus:[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,`[&>span]:line-clamp-1`,e&&`valid:border-success invalid:border-error`,t),...r,children:[n,(0,v.jsx)(_T,{asChild:!0,children:(0,v.jsx)(Ql,{className:`size-4 opacity-50`})})]}),PT=({className:e,...t})=>(0,v.jsx)(ET,{className:B(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,v.jsx)(Zl,{})}),FT=({className:e,...t})=>(0,v.jsx)(DT,{className:B(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,v.jsx)(Jl,{})}),IT=({className:e,children:t,position:n=kT.POPPER,...r})=>(0,v.jsx)(vT,{children:(0,v.jsxs)(yT,{className:B(`relative z-50 max-h-96 min-w-32 overflow-hidden`,`rounded-xl shadow-md`,`bg-white dark:bg-neutral-950`,`text-text`,`border border-neutral-200 dark:border-neutral-800`,`data-[state=closed]:animate-out data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,n===`popper`&&`data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,v.jsx)(PT,{}),(0,v.jsx)(bT,{className:B(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),(0,v.jsx)(FT,{})]})}),LT=({className:e,...t})=>(0,v.jsx)(ST,{className:B(`px-1 py-0.5 font-semibold text-sm`,e),...t}),RT=({className:e,children:t,...n})=>(0,v.jsxs)(CT,{className:B(`relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-neutral/10 data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,v.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,v.jsx)(TT,{children:(0,v.jsx)(ql,{className:`size-4`})})}),(0,v.jsx)(wT,{children:t})]}),zT=({className:e,...t})=>(0,v.jsx)(OT,{className:B(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),q=AT;q.Group=jT,q.Value=MT,q.Trigger=NT,q.ScrollUpButton=PT,q.ScrollDownButton=FT,q.Content=IT,q.Label=LT,q.Item=RT,q.Separator=zT;var BT=(0,m.createContext)({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),VT=()=>(0,m.useContext)(BT),HT=({children:e})=>{let[t,n]=ly(`packageManager`,`npm`),[r,i]=ly(`codeFormat`,`typescript`),[a,o]=ly(`contentDeclarationFormat`,`typescript`);return(0,v.jsx)(BT,{value:{packageManager:t,setPackageManager:n,codeFormat:r,setCodeFormat:i,contentDeclarationFormat:a,setContentDeclarationFormat:o},children:e})},UT=({children:e,...t})=>{let{packageManager:n,codeFormat:r,contentDeclarationFormat:i}=VT(),a=t.packageManager===void 0,o=n===t.packageManager,s=t.codeFormat===void 0,c=r===t.codeFormat,l=t.contentDeclarationFormat===void 0,u=i===t.contentDeclarationFormat;return(a||o)&&(s||c)&&(l||u)?e:(0,v.jsx)(v.Fragment,{})},WT={key:`code-selectors`,content:{nodeType:`translation`,translation:{en:{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},"en-GB":{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},fr:{packageManager:{placeholder:`Gestionnaire de paquets`,label:`Sélectionner le gestionnaire de paquets`},codeFormat:{placeholder:`Format de code`,label:`Sélectionner le format de code`},contentDeclarationFormat:{placeholder:`Format de dictionnaire`,label:`Sélectionner le format de dictionnaire`}},es:{packageManager:{placeholder:`Gestor de paquetes`,label:`Seleccionar gestor de paquetes`},codeFormat:{placeholder:`Formato de código`,label:`Seleccionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de diccionario`,label:`Seleccionar formato de diccionario`}},de:{packageManager:{placeholder:`Paketmanager`,label:`Paketmanager auswählen`},codeFormat:{placeholder:`Code-Format`,label:`Code-Format auswählen`},contentDeclarationFormat:{placeholder:`Wörterbuchformat`,label:`Wörterbuchformat auswählen`}},ja:{packageManager:{placeholder:`パッケージマネージャー`,label:`パッケージマネージャーを選択`},codeFormat:{placeholder:`コード形式`,label:`コード形式を選択`},contentDeclarationFormat:{placeholder:`辞書形式`,label:`辞書形式を選択`}},ko:{packageManager:{placeholder:`패키지 관리자`,label:`패키지 관리자 선택`},codeFormat:{placeholder:`코드 형식`,label:`코드 형식 선택`},contentDeclarationFormat:{placeholder:`사전 형식`,label:`사전 형식 선택`}},zh:{packageManager:{placeholder:`包管理器`,label:`选择包管理器`},codeFormat:{placeholder:`代码格式`,label:`选择代码格式`},contentDeclarationFormat:{placeholder:`字典格式`,label:`选择字典格式`}},it:{packageManager:{placeholder:`Gestore dei pacchetti`,label:`Seleziona il gestore dei pacchetti`},codeFormat:{placeholder:`Formato del codice`,label:`Seleziona il formato del codice`},contentDeclarationFormat:{placeholder:`Formato del dizionario`,label:`Seleziona il formato del dizionario`}},pt:{packageManager:{placeholder:`Gerenciador de pacotes`,label:`Selecionar gerenciador de pacotes`},codeFormat:{placeholder:`Formato de código`,label:`Selecionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de dicionário`,label:`Selecionar formato de dicionário`}},hi:{packageManager:{placeholder:`पैकेज प्रबंधक`,label:`पैकेज प्रबंधक चुनें`},codeFormat:{placeholder:`कोड प्रारूप`,label:`कोड प्रारूप चुनें`},contentDeclarationFormat:{placeholder:`शब्दकोश प्रारूप`,label:`शब्दकोश प्रारूप चुनें`}},ar:{packageManager:{placeholder:`مدير الحزم`,label:`اختر مدير الحزم`},codeFormat:{placeholder:`تنسيق الكود`,label:`اختر تنسيق الكود`},contentDeclarationFormat:{placeholder:`تنسيق القاموس`,label:`اختر تنسيق القاموس`}},ru:{packageManager:{placeholder:`Менеджер пакетов`,label:`Выбрать менеджер пакетов`},codeFormat:{placeholder:`Формат кода`,label:`Выбрать формат кода`},contentDeclarationFormat:{placeholder:`Формат словаря`,label:`Выбрать формат словаря`}}}},localIds:[`code-selectors::local::../@intlayer/design-system/dist/esm/components/IDE/selectors.content.mjs`]},GT=()=>{let{codeFormat:e,setCodeFormat:t,setContentDeclarationFormat:n}=VT(),r=mr(WT);return(0,v.jsxs)(q,{value:e,onValueChange:e=>{t(e),n(e)},children:[(0,v.jsx)(q.Trigger,{className:`py-1!`,"aria-label":r.codeFormat.label.value,children:(0,v.jsx)(q.Value,{placeholder:r.codeFormat.placeholder.value})}),(0,v.jsxs)(q.Content,{children:[(0,v.jsx)(q.Item,{value:`typescript`,children:`TypeScript`}),(0,v.jsx)(q.Item,{value:`esm`,children:`ESM`}),(0,v.jsx)(q.Item,{value:`commonjs`,children:`CommonJS`})]})]})},KT=()=>{let{contentDeclarationFormat:e,setContentDeclarationFormat:t}=VT(),n=mr(WT);return(0,v.jsxs)(q,{value:e,onValueChange:t,children:[(0,v.jsx)(q.Trigger,{className:`py-1!`,"aria-label":n.contentDeclarationFormat.label.value,children:(0,v.jsx)(q.Value,{placeholder:n.contentDeclarationFormat.placeholder.value})}),(0,v.jsxs)(q.Content,{children:[(0,v.jsx)(q.Item,{value:`typescript`,children:`TypeScript`}),(0,v.jsx)(q.Item,{value:`commonjs`,children:`CommonJS`}),(0,v.jsx)(q.Item,{value:`esm`,children:`ESM`}),(0,v.jsx)(q.Item,{value:`json`,children:`JSON`})]})]})},qT={key:`code`,content:{nodeType:`translation`,translation:{en:{title:`Copy code`,description:`Copy the code to the clipboard`},"en-GB":{title:`Copy code`,description:`Copy the code to the clipboard`},fr:{title:`Copier le code`,description:`Copier le code dans le presse-papiers`},es:{title:`Copiar código`,description:`Copiar el código al portapapeles`},de:{title:`Code kopieren`,description:`Kopieren Sie den Code in die Zwischenablage`},ja:{title:`コードをコピー`,description:`コードをクリップボードにコピー`},ko:{title:`코드 복사`,description:`코드를 클립보드에 복사`},zh:{title:`复制代码`,description:`复制代码到剪贴板`},it:{title:`Copiare il codice`,description:`Copiare il codice nella clipboard`},pt:{title:`Copiar código`,description:`Copiar o código para a área de transferência`},hi:{title:`कोड कॉपी करें`,description:`कोड को क्लिपबोर्ड पर कॉपी करें`},ar:{title:`نسخ الكود`,description:`نسخ الكود إلى الحافظة`},ru:{title:`Копировать код`,description:`Копировать код в буфер обмена`}}},localIds:[`code::local::../@intlayer/design-system/dist/esm/components/IDE/code.content.mjs`,`code::local::../@intlayer/design-system/dist/esm/components/IDE/copyCode.content.mjs`]},JT=({code:e,...t})=>{let{title:n,description:r}=mr(qT);return(0,v.jsxs)(lf,{identifier:`copy`,children:[(0,v.jsx)(Bh,{content:e,...t}),(0,v.jsxs)(lf.Detail,{identifier:`copy`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:nf.END,children:[(0,v.jsx)(`strong`,{children:n}),(0,v.jsx)(`p`,{className:`text-neutral`,children:r})]})]})},YT=()=>{let{packageManager:e,setPackageManager:t}=VT(),n=mr(WT);return mr(WT),(0,v.jsxs)(q,{value:e,onValueChange:t,children:[(0,v.jsx)(q.Trigger,{className:`py-1!`,"aria-label":n.packageManager.label.value,children:(0,v.jsx)(q.Value,{placeholder:n.packageManager.placeholder.value})}),(0,v.jsxs)(q.Content,{children:[(0,v.jsx)(q.Item,{value:`npm`,children:`npm`}),(0,v.jsx)(q.Item,{value:`pnpm`,children:`pnpm`}),(0,v.jsx)(q.Item,{value:`yarn`,children:`yarn`}),(0,v.jsx)(q.Item,{value:`bun`,children:`bun`})]})]})},XT=700,ZT=({children:e,language:t,isDarkMode:n,showHeader:r=!0,showLineNumbers:i=!0,className:a,fileName:o,packageManager:s,codeFormat:c,contentDeclarationFormat:l,isRollable:u=!0,...d})=>{let f=e?.endsWith(`
|
|
171
|
+
`)?e.slice(0,-1):e,p=s||c||l;return(0,v.jsx)(UT,{packageManager:s,codeFormat:c,contentDeclarationFormat:l,children:(0,v.jsxs)(Hu,{className:B(`relative min-w-0 max-w-full text-sm leading-6`,i&&`with-line-number ml-0`,a),transparency:`lg`,...d,children:[r&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`div`,{className:`grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl bg-card/50 py-1.5 pr-12 pl-4 text-neutral text-xs`,children:[(0,v.jsx)(`span`,{className:`truncate`,children:o??t}),(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,v.jsx)(YT,{}),c&&(0,v.jsx)(GT,{}),l&&(0,v.jsx)(KT,{})]})]}),(0,v.jsx)(`div`,{className:`sticky top-46 z-20`,children:(0,v.jsx)(`div`,{className:B(`absolute right-2 bottom-0 flex h-7 items-center`,p&&`h-11`),children:(0,v.jsx)(JT,{code:f})})})]}),(0,v.jsx)(ex,{minHeight:XT,isRollable:u,className:`min-w-0 max-w-full overflow-x-auto p-2`,children:(0,v.jsx)(rx,{lang:t,isDarkMode:n,children:f})})]})})},QT=function(e){return e.PRIMARY=`primary`,e.SECONDARY=`secondary`,e.DESTRUCTIVE=`destructive`,e.NEUTRAL=`neutral`,e.LIGHT=`light`,e.DARK=`dark`,e.TEXT=`text`,e}({}),$T=Fl(`relative z-0 flex size-full flex-row items-center gap-2`,{variants:{color:{primary:`border-primary text-primary`,secondary:`border-secondary text-secondary`,destructive:`border-destructive bg-destructive text-destructive`,neutral:`border-neutral text-neutral`,light:`border-white text-white`,dark:`border-neutral-800 text-neutral-800`,text:`border-text text-text`}},defaultVariants:{color:`primary`}}),eE=Fl(`absolute -z-1 rounded-lg duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{primary:`bg-primary/10 aria-selected:text-text`,secondary:`bg-secondary/10 aria-selected:text-text`,destructive:`bg-destructive/10 aria-selected:text-text`,neutral:`bg-neutral/10 aria-selected:text-white/10`,light:`bg-white/10 aria-selected:text-black`,dark:`bg-neutral-800/10 aria-selected:text-white`,text:`bg-text/10 aria-selected:text-text-opposite`},orientation:{horizontal:`top-0 h-full w-auto transition-[left,width]`,vertical:`left-0 h-auto w-full transition-[top,height]`}},defaultVariants:{orientation:`horizontal`}}),tE=({tabs:e,selectedChoice:t,onTabClick:n,color:r=QT.PRIMARY,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=(0,m.useRef)([]),c=(0,m.useRef)(null),{choiceIndicatorPosition:l,calculatePosition:u}=Wh(s,{isHoverable:i,orientation:a});return(0,m.useEffect)(()=>{u()},[t,e]),(0,v.jsxs)(`div`,{className:B($T({color:r}),o),"aria-orientation":a,"aria-multiselectable":`false`,role:`tablist`,children:[e.map((e,r)=>{let i=e.key,a=t===i;return(0,m.cloneElement)(e,{key:i??r,role:`tab`,onClick:t=>{e.props?.onClick?.(t),n?.(i)},"aria-selected":a,"data-active":a,tabIndex:a?0:-1,ref:e=>{s.current[r]=e}})}),l&&(0,v.jsx)(`div`,{className:B(eE({color:r,orientation:a})),style:l,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},nE=e=>{let{enable:t=!0,onSwipeLeft:n,onSwipeRight:r,itemIndex:i,itemCount:a,thresholdPct:o=20,touchAction:s=`pan-y`,disableWhenSelectingText:c=!0}=e,l=(0,m.useRef)(null),[u,d]=(0,m.useState)(!1),[f,p]=(0,m.useState)(0),h=(0,m.useRef)({pointerId:null,startX:0,startY:0,lastX:0,axisLocked:!1,isHorizontal:!1}),g=(0,m.useRef)(!1),_=()=>{let e=l.current;return e?e.clientWidth:0},v=e=>{let t=i<=0,n=i>=a-1;return t&&e>0||n&&e<0?e/(1+Math.abs(e)/30):e},y=e=>{t&&h.current.pointerId===null&&(h.current.pointerId=e.pointerId,h.current.startX=e.clientX,h.current.startY=e.clientY,h.current.lastX=e.clientX,h.current.axisLocked=!1,h.current.isHorizontal=!1,g.current=!1,d(!1),p(0))},b=e=>{if(!t||h.current.pointerId!==e.pointerId)return;let n=_();if(!n)return;let r=e.clientX-h.current.startX,i=e.clientY-h.current.startY;if(c){let e=typeof window<`u`?window.getSelection?.():null;if(e&&e.rangeCount>0&&!e.isCollapsed){g.current=!0;return}}if(!h.current.axisLocked){let e=Math.abs(r),t=Math.abs(i);(e>6||t>6)&&(h.current.axisLocked=!0,h.current.isHorizontal=e>t)}if(h.current.isHorizontal){try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),u||d(!0),p(v(r/n*100)),h.current.lastX=e.clientX}},x=e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let t=h.current.isHorizontal,i=f;if(d(!1),p(0),h.current.pointerId=null,h.current.axisLocked=!1,h.current.isHorizontal=!1,g.current){g.current=!1;return}t&&(i>o?r?.():i<-o&&n?.())};return(0,m.useEffect)(()=>{p(0),d(!1)},[i]),{containerRef:l,isDragging:u,dragDeltaPct:f,containerProps:{ref:l,onPointerDown:y,onPointerMove:b,onPointerUp:e=>{t&&h.current.pointerId===e.pointerId&&x(e)},onPointerCancel:e=>{t&&h.current.pointerId===e.pointerId&&x(e)},style:{touchAction:s}}}},rE=(0,m.createContext)({tabsValues:{},setTabsValues:(()=>{})}),iE=()=>(0,m.useContext)(rE),aE=({children:e})=>{let[t,n]=(0,m.useState)({});return(0,v.jsx)(rE,{value:{tabsValues:t,setTabsValues:n},children:e})},oE=(0,m.createContext)(void 0),sE=Fl(`relative w-full rounded-lg`,{variants:{background:{with:`border border-neutral/20 bg-background/2 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur`,without:``},variant:{default:``,bordered:`border-2`,ghost:`border-0 bg-transparent shadow-none`}},defaultVariants:{variant:`default`}}),cE=({children:e,...t})=>(0,v.jsx)(`div`,{...t,children:e});cE.displayName=`TabItem`;var lE=Object.assign(({defaultTab:e,group:t,variant:n,children:r,className:i,headerClassName:a,fullHeight:o,...s})=>{let c=m.Children.toArray(r).filter(e=>(0,m.isValidElement)(e)&&e.type===cE),l=c[0]?.props?.value,{tabsValues:u,setTabsValues:d}=iE(),[f,p]=(0,m.useState)(e??l??``),h=(t&&typeof u==`object`?u?.[t]:f)??e??l,g=c.findIndex(e=>e.props.value===h),_=c.length,{containerProps:y,dragDeltaPct:b,isDragging:x}=nE({itemIndex:g,itemCount:_,onSwipeLeft:()=>{let e=c[Math.min(_-1,g+1)]?.props?.value;e&&S(e)},onSwipeRight:()=>{let e=c[Math.max(0,g-1)]?.props?.value;e&&S(e)}}),S=e=>{p(e),typeof d==`function`&&d(n=>({...n,[t]:e}))},C={activeTab:f??l??``,setActiveTab:S};return(0,v.jsx)(oE.Provider,{value:C,children:(0,v.jsxs)(`div`,{className:B(sE({variant:n}),o&&`flex h-full flex-col overflow-hidden`,i),...s,children:[(0,v.jsx)(`div`,{className:B(`flex shrink-0 gap-3 p-3`,a),children:(0,v.jsx)(tE,{selectedChoice:h,tabs:c.map(e=>{let{label:t,value:n,disabled:r}=e.props,i=h===n;return(0,v.jsx)(`button`,{className:B(`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,!i&&`text-neutral/70`),"data-active":i,disabled:r,onClick:()=>!r&&S(n),role:`tab`,"aria-selected":i,"aria-controls":`tabpanel-${n}`,id:`tab-${n}`,type:`button`,children:t??n},n)}),hoverable:!0,color:QT.TEXT})}),(0,v.jsx)(`div`,{className:B(`relative w-full min-w-0 overflow-x-clip [-webkit-clip-path:inset(0)] [clip-path:inset(0)]`,o&&`min-h-0 flex-1`),...y,children:(0,v.jsx)(`div`,{role:`tablist`,"aria-orientation":`horizontal`,className:B(`grid w-full min-w-0`,o&&`h-full`,x?`transition-none`:`transition-transform duration-300 ease-in-out`),style:{gridTemplateColumns:`repeat(${c.length}, 100%)`,transform:`translateX(-${g*100-(x?b:0)}%)`},children:c.map(({props:e},t)=>{let{value:n,children:r,className:i}=e,a=t===g;return(0,v.jsx)(`div`,{role:`tabpanel`,"aria-labelledby":`tab-${n}`,id:`tabpanel-${n}`,"aria-hidden":!a,tabIndex:a?0:-1,"data-active":a,className:B(`w-full min-w-0 p-6 opacity-100 transition-opacity duration-300 ease-in-out`,o&&`h-full overflow-y-auto`,!a&&`pointer-events-none opacity-0`,i),children:(0,v.jsx)(`div`,{className:B(`flex w-full min-w-0 flex-col items-stretch gap-6`,o&&`min-h-full`),children:r})},n)})})})]})})},{Item:cE}),uE=e=>{let[t,n]=(0,m.useState)(e);return(0,m.useEffect)(()=>{n(e??window.document.body)},[e]),t},dE=new class{listeners=new Set;scrollBlockers=[];subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.scrollBlockers;addBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);if(n){if(n.blockers.includes(e))return;this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:[...n.blockers,e]}:n)}else t.style.overflowY=`hidden`,t.style.overflowX=`hidden`,this.scrollBlockers=[...this.scrollBlockers,{element:t,blockers:[e]}];this.emit()};removeBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);n&&(n.blockers.length>1?this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:n.blockers.filter(t=>t!==e)}:n):(t.style.overflowY=``,t.style.overflowX=``,this.scrollBlockers=this.scrollBlockers.filter(e=>e.element!==t)),this.emit())};isElementScrollBlocked=e=>this.scrollBlockers.some(t=>t.element===e);emit=()=>{this.listeners.forEach(e=>{e()})}},fE=[],pE=()=>({scrollBlockers:(0,m.useSyncExternalStore)(dE.subscribe,dE.getSnapshot,()=>fE),addBlockage:dE.addBlockage,removeBlockage:dE.removeBlockage,isElementScrollBlocked:dE.isElementScrollBlocked}),mE=e=>{let{disableScroll:t=!1,element:n,key:r=`unnamed_blocker`}=e??{},{isElementScrollBlocked:i,addBlockage:a,removeBlockage:o}=pE(),s=uE(n);return(0,m.useEffect)(()=>{let e=n??window.document.body;return t?a(r,e):o(r,e),()=>{o(r,e)}},[a,t,n,r,o]),{isScrollBlocked:s?i(s):!1}},hE=(0,m.createContext)({});function gE(e){let t=(0,m.useRef)(null);return t.current===null&&(t.current=e()),t.current}var _E=typeof window<`u`?m.useLayoutEffect:m.useEffect,vE=(0,m.createContext)(null);function yE(e,t){e.indexOf(t)===-1&&e.push(t)}function bE(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var xE=(e,t,n)=>n>t?t:n<e?e:n,SE={},CE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function wE(e){return typeof e==`object`&&!!e}var TE=e=>/^0[^.\s]+$/u.test(e);function EE(e){let t;return()=>(t===void 0&&(t=e()),t)}var DE=e=>e,OE=(e,t)=>n=>t(e(n)),kE=(...e)=>e.reduce(OE),AE=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},jE=class{constructor(){this.subscriptions=[]}add(e){return yE(this.subscriptions,e),()=>bE(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},ME=e=>e*1e3,NE=e=>e/1e3;function PE(e,t){return t?1e3/t*e:0}var FE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,IE=1e-7,LE=12;function RE(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=FE(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>IE&&++s<LE);return o}function zE(e,t,n,r){if(e===t&&n===r)return DE;let i=t=>RE(t,0,1,e,n);return e=>e===0||e===1?e:FE(i(e),t,r)}var BE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,VE=e=>t=>1-e(1-t),HE=zE(.33,1.53,.69,.99),UE=VE(HE),WE=BE(UE),GE=e=>e>=1?1:(e*=2)<1?.5*UE(e):.5*(2-2**(-10*(e-1))),KE=e=>1-Math.sin(Math.acos(e)),qE=VE(KE),JE=BE(KE),YE=zE(.42,0,1,1),XE=zE(0,0,.58,1),ZE=zE(.42,0,.58,1),QE=e=>Array.isArray(e)&&typeof e[0]!=`number`,$E=e=>Array.isArray(e)&&typeof e[0]==`number`,eD={linear:DE,easeIn:YE,easeInOut:ZE,easeOut:XE,circIn:KE,circInOut:JE,circOut:qE,backIn:UE,backInOut:WE,backOut:HE,anticipate:GE},tD=e=>typeof e==`string`,nD=e=>{if($E(e)){e.length;let[t,n,r,i]=e;return zE(t,n,r,i)}else if(tD(e))return eD[e],`${e}`,eD[e];return e},rD=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],iD={value:null,addProjectionMetrics:null};function aD(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&iD.value&&iD.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var oD=40;function sD(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=rD.reduce((e,n)=>(e[n]=aD(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=SE.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,oD),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:rD.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<rD.length;t++)o[rD[t]].cancel(e)},state:i,steps:o}}var{schedule:cD,cancel:lD,state:uD,steps:dD}=sD(typeof requestAnimationFrame<`u`?requestAnimationFrame:DE,!0),fD;function pD(){fD=void 0}var mD={now:()=>(fD===void 0&&mD.set(uD.isProcessing||SE.useManualTiming?uD.timestamp:performance.now()),fD),set:e=>{fD=e,queueMicrotask(pD)}},hD={layout:0,mainThread:0,waapi:0},gD=e=>t=>typeof t==`string`&&t.startsWith(e),_D=gD(`--`),vD=gD(`var(--`),yD=e=>vD(e)?bD.test(e.split(`/*`)[0].trim()):!1,bD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function xD(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var SD={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},CD={...SD,transform:e=>xE(0,1,e)},wD={...SD,default:1},TD=e=>Math.round(e*1e5)/1e5,ED=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function DD(e){return e==null}var OD=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,kD=(e,t)=>n=>!!(typeof n==`string`&&OD.test(n)&&n.startsWith(e)||t&&!DD(n)&&Object.prototype.hasOwnProperty.call(n,t)),AD=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(ED);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},jD=e=>xE(0,255,e),MD={...SD,transform:e=>Math.round(jD(e))},ND={test:kD(`rgb`,`red`),parse:AD(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+MD.transform(e)+`, `+MD.transform(t)+`, `+MD.transform(n)+`, `+TD(CD.transform(r))+`)`};function PD(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var FD={test:kD(`#`),parse:PD,transform:ND.transform},ID=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),LD=ID(`deg`),RD=ID(`%`),J=ID(`px`),zD=ID(`vh`),BD=ID(`vw`),VD={...RD,parse:e=>RD.parse(e)/100,transform:e=>RD.transform(e*100)},HD={test:kD(`hsl`,`hue`),parse:AD(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+RD.transform(TD(t))+`, `+RD.transform(TD(n))+`, `+TD(CD.transform(r))+`)`},UD={test:e=>ND.test(e)||FD.test(e)||HD.test(e),parse:e=>ND.test(e)?ND.parse(e):HD.test(e)?HD.parse(e):FD.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?ND.transform(e):HD.transform(e),getAnimatableNone:e=>{let t=UD.parse(e);return t.alpha=0,UD.transform(t)}},WD=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function GD(e){return isNaN(e)&&typeof e==`string`&&(e.match(ED)?.length||0)+(e.match(WD)?.length||0)>0}var KD=`number`,qD=`color`,JD=`var`,YD=`var(`,XD="${}",ZD=/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 QD(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(ZD,e=>(UD.test(e)?(r.color.push(a),i.push(qD),n.push(UD.parse(e))):e.startsWith(YD)?(r.var.push(a),i.push(JD),n.push(e)):(r.number.push(a),i.push(KD),n.push(parseFloat(e))),++a,XD)).split(XD),indexes:r,types:i}}function $D(e){return QD(e).values}function eO({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===KD?i+=TD(r[a]):e===qD?i+=UD.transform(r[a]):i+=r[a]}return i}}function tO(e){return eO(QD(e))}var nO=e=>typeof e==`number`?0:UD.test(e)?UD.getAnimatableNone(e):e,rO=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:nO(e);function iO(e){let t=QD(e);return eO(t)(t.values.map((e,n)=>rO(e,t.split[n])))}var aO={test:GD,parse:$D,createTransformer:tO,getAnimatableNone:iO};function oO(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function sO({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=oO(s,r,e+1/3),a=oO(s,r,e),o=oO(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function cO(e,t){return n=>n>0?t:e}var lO=(e,t,n)=>e+(t-e)*n,uO=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},dO=[FD,ND,HD],fO=e=>dO.find(t=>t.test(e));function pO(e){let t=fO(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===HD&&(n=sO(n)),n}var mO=(e,t)=>{let n=pO(e),r=pO(t);if(!n||!r)return cO(e,t);let i={...n};return e=>(i.red=uO(n.red,r.red,e),i.green=uO(n.green,r.green,e),i.blue=uO(n.blue,r.blue,e),i.alpha=lO(n.alpha,r.alpha,e),ND.transform(i))},hO=new Set([`none`,`hidden`]);function gO(e,t){return hO.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function _O(e,t){return n=>lO(e,t,n)}function vO(e){return typeof e==`number`?_O:typeof e==`string`?yD(e)?cO:UD.test(e)?mO:SO:Array.isArray(e)?yO:typeof e==`object`?UD.test(e)?mO:bO:cO}function yO(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>vO(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function bO(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=vO(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function xO(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var SO=(e,t)=>{let n=aO.createTransformer(t),r=QD(e),i=QD(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?hO.has(e)&&!i.values.length||hO.has(t)&&!r.values.length?gO(e,t):kE(yO(xO(r,i),i.values),n):(`${e}${t}`,cO(e,t))};function CO(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?lO(e,t,n):vO(e)(e,t)}var wO=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>cD.update(t,e),stop:()=>lD(t),now:()=>uD.isProcessing?uD.timestamp:mD.now()}},TO=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},EO=2e4;function DO(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function OO(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(DO(r),EO);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:NE(i)}}var kO={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 AO(e,t){return e*Math.sqrt(1-t*t)}var jO=12;function MO(e,t,n){let r=n;for(let n=1;n<jO;n++)r-=e(r)/t(r);return r}var NO=.001;function PO({duration:e=kO.duration,bounce:t=kO.bounce,velocity:n=kO.velocity,mass:r=kO.mass}){let i,a;kO.maxDuration;let o=1-t;o=xE(kO.minDamping,kO.maxDamping,o),e=xE(kO.minDuration,kO.maxDuration,NE(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=AO(t,o),c=Math.exp(-i);return NO-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=AO(t**2,o);return(-i(t)+NO>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-NO+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=MO(i,a,s);if(e=ME(e),isNaN(c))return{stiffness:kO.stiffness,damping:kO.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var FO=[`duration`,`bounce`],IO=[`stiffness`,`damping`,`mass`];function LO(e,t){return t.some(t=>e[t]!==void 0)}function RO(e){let t={velocity:kO.velocity,stiffness:kO.stiffness,damping:kO.damping,mass:kO.mass,isResolvedFromDuration:!1,...e};if(!LO(e,IO)&&LO(e,FO))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*xE(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:kO.mass,stiffness:i,damping:a}}else{let n=PO({...e,velocity:0});t={...t,...n,mass:kO.mass},t.isResolvedFromDuration=!0}return t}function zO(e=kO.visualDuration,t=kO.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=RO({...n,velocity:-NE(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=NE(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?kO.restSpeed.granular:kO.restSpeed.default,i||=v?kO.restDelta.granular:kO.restDelta.default;let y,b,x,S,C,w;if(h<1)x=AO(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>ME(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=ME(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=ME(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(DO(T),EO),t=TO(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}zO.applyToOptions=e=>{let t=OO(e,100,zO);return e.ease=t.ease,e.duration=ME(t.duration),e.type=`keyframes`,e};var BO=5;function VO(e,t,n){let r=Math.max(t-BO,0);return PE(n-e(r),t-r)}function HO({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=zO({keyframes:[f.value,m(f.value)],velocity:VO(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function UO(e,t,n){let r=[],i=n||SE.mix||CO,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=kE(Array.isArray(t)?t[n]||DE:t,a)),r.push(a)}return r}function WO(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=UO(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=AE(e[r],e[r+1],n);return s[r](i)};return n?t=>l(xE(e[0],e[a-1],t)):l}function GO(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=AE(0,t,r);e.push(lO(n,1,i))}}function KO(e){let t=[0];return GO(t,e.length-1),t}function qO(e,t){return e.map(e=>e*t)}function JO(e,t){return e.map(()=>t||ZE).splice(0,e.length-1)}function YO({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=QE(r)?r.map(nD):nD(r),a={done:!1,value:t[0]},o=WO(qO(n&&n.length===t.length?n:KO(t),e),t,{ease:Array.isArray(i)?i:JO(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var XO=e=>e!==null;function ZO(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(XO),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var QO={decay:HO,inertia:HO,tween:YO,keyframes:YO,spring:zO};function $O(e){typeof e.type==`string`&&(e.type=QO[e.type])}var ek=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},tk=e=>e/100,nk=class extends ek{constructor(e){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=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==mD.now()&&this.tick(mD.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},hD.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;$O(e);let{type:t=YO,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||YO;s!==YO&&typeof o[0]!=`number`&&(this.mixKeyframes=kE(tk,CO(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=DO(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=xE(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==HO&&(b.value=ZO(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return NE(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+NE(e)}get time(){return NE(this.currentTime)}set time(e){e=ME(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return VO(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(mD.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=NE(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=wO,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,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(mD.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,hD.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function rk(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var ik=e=>e*180/Math.PI,ak=e=>sk(ik(Math.atan2(e[1],e[0]))),ok={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ak,rotateZ:ak,skewX:e=>ik(Math.atan(e[1])),skewY:e=>ik(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},sk=e=>(e%=360,e<0&&(e+=360),e),ck=ak,lk=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),uk=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),dk={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:lk,scaleY:uk,scale:e=>(lk(e)+uk(e))/2,rotateX:e=>sk(ik(Math.atan2(e[6],e[5]))),rotateY:e=>sk(ik(Math.atan2(-e[2],e[0]))),rotateZ:ck,rotate:ck,skewX:e=>ik(Math.atan(e[4])),skewY:e=>ik(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function fk(e){return e.includes(`scale`)?1:0}function pk(e,t){if(!e||e===`none`)return fk(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=dk,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ok,i=t}if(!i)return fk(t);let a=r[t],o=i[1].split(`,`).map(hk);return typeof a==`function`?a(o):o[a]}var mk=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return pk(n,t)};function hk(e){return parseFloat(e.trim())}var gk=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],_k=new Set(gk),vk=e=>e===SD||e===J,yk=new Set([`x`,`y`,`z`]),bk=gk.filter(e=>!yk.has(e));function xk(e){let t=[];return bk.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}var Sk={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-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})=>pk(t,`x`),y:(e,{transform:t})=>pk(t,`y`)};Sk.translateX=Sk.x,Sk.translateY=Sk.y;var Ck=new Set,wk=!1,Tk=!1,Ek=!1;function Dk(){if(Tk){let e=Array.from(Ck).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=xk(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Tk=!1,wk=!1,Ck.forEach(e=>e.complete(Ek)),Ck.clear()}function Ok(){Ck.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Tk=!0)})}function kk(){Ek=!0,Ok(),Dk(),Ek=!1}var Ak=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Ck.add(this),wk||(wk=!0,cD.read(Ok),cD.resolveKeyframes(Dk))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}rk(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ck.delete(this)}cancel(){this.state===`scheduled`&&(Ck.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},jk=e=>e.startsWith(`--`);function Mk(e,t,n){jk(t)?e.style.setProperty(t,n):e.style[t]=n}var Nk={};function Pk(e,t){let n=EE(e);return()=>Nk[t]??n()}var Fk=Pk(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Ik=Pk(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Lk=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Rk={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Lk([0,.65,.55,1]),circOut:Lk([.55,0,1,.45]),backIn:Lk([.31,.01,.66,-.59]),backOut:Lk([.33,1.53,.69,.99])};function zk(e,t){if(e)return typeof e==`function`?Ik()?TO(e,t):`ease-out`:$E(e)?Lk(e):Array.isArray(e)?e.map(e=>zk(e,t)||Rk.easeOut):Rk[e]}function Bk(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=zk(s,i);Array.isArray(d)&&(u.easing=d),iD.value&&hD.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return iD.value&&p.finished.finally(()=>{hD.waapi--}),p}function Vk(e){return typeof e==`function`&&`applyToOptions`in e}function Hk({type:e,...t}){return Vk(e)&&Ik()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Uk=class extends ek{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Hk(e);this.animation=Bk(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=ZO(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Mk(t,n,e),this.animation.cancel()}s?.(),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;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return NE(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+NE(e)}get time(){return NE(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ME(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Fk()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),DE):r(this)}},Wk={anticipate:GE,backInOut:WE,circInOut:JE};function Gk(e){return e in Wk}function Kk(e){typeof e.ease==`string`&&Gk(e.ease)&&(e.ease=Wk[e.ease])}var qk=10,Jk=class extends Uk{constructor(e){Kk(e),$O(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new nk({...a,autoplay:!1}),s=Math.max(qk,mD.now()-this.startTime),c=xE(0,qk,s-qk),l=o.sample(s).value,{name:u}=this.options;i&&u&&Mk(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Yk=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(aO.test(e)||e===`0`)&&!e.startsWith(`url(`));function Xk(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Zk(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Yk(i,t),s=Yk(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:Xk(e)||(n===`spring`||Vk(n))&&r}function Qk(e){e.duration=0,e.type=`keyframes`}var $k=new Set([`opacity`,`clipPath`,`filter`,`transform`]),eA=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function tA(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&eA.test(e[t]))return!0;return!1}var nA=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),rA=EE(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function iA(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return rA()&&n&&($k.has(n)||nA.has(n)&&tA(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var aA=40,oA=class extends ek{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=mD.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||Ak)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=mD.now();let u=!0;Zk(e,i,a,o)||(u=!1,(SE.instantAnimations||!s)&&l?.(ZO(e,n,t)),e[0]=e[e.length-1],Qk(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>aA?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&iA(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new Jk({...d,element:p})}catch{m=new nk(d)}else m=new nk(d);m.finished.then(()=>{this.notifyFinished()}).catch(DE),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),kk()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function sA(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var cA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function lA(e){let t=cA.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function uA(e,t,n=1){`${e}`;let[r,i]=lA(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return CE(e)?parseFloat(e):e}return yD(i)?uA(i,t,n+1):i}var dA={type:`spring`,stiffness:500,damping:25,restSpeed:10},fA=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),pA={type:`keyframes`,duration:.8},mA={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},hA=(e,{keyframes:t})=>t.length>2?pA:_k.has(e)?e.startsWith(`scale`)?fA(t[1]):dA:mA;function gA(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function _A(e,t){let n=e?.[t]??e?.default??e;return n===e?n:gA(n,e)}var vA=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function yA(e){for(let t in e)if(!vA.has(t))return!0;return!1}var bA=(e,t,n,r={},i,a)=>o=>{let s=_A(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=ME(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};yA(s)||Object.assign(u,hA(e,u)),u.duration&&=ME(u.duration),u.repeatDelay&&=ME(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Qk(u),u.delay===0&&(d=!0)),(SE.instantAnimations||SE.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,Qk(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=ZO(u.keyframes,s);if(e!==void 0){cD.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new nk(u):new oA(u)};function xA(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function SA(e,t,n,r){if(typeof t==`function`){let[i,a]=xA(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=xA(r);t=t(n===void 0?e.custom:n,i,a)}return t}function CA(e,t,n){let r=e.getProps();return SA(r,t,n===void 0?r.custom:n,e)}var wA=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...gk]),TA=30,EA=e=>!isNaN(parseFloat(e)),DA={current:void 0},OA=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=mD.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=mD.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=EA(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new jE);let n=this.events[e].add(t);return e===`change`?()=>{n(),cD.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return DA.current&&DA.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=mD.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>TA)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,TA);return PE(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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 kA(e,t){return new OA(e,t)}var AA=e=>Array.isArray(e);function jA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,kA(n))}function MA(e){return AA(e)?e[e.length-1]||0:e}function NA(e,t){let{transitionEnd:n={},transition:r={},...i}=CA(e,t)||{};i={...i,...n};for(let t in i)jA(e,t,MA(i[t]))}var PA=e=>!!(e&&e.getVelocity);function FA(e){return!!(PA(e)&&e.add)}function IA(e,t){let n=e.getValue(`willChange`);if(FA(n))return n.add(t);if(!n&&SE.WillChange){let n=new SE.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function LA(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var RA=`data-`+LA(`framerAppearId`);function zA(e){return e.props[RA]}function BA({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function VA(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?gA(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&BA(d,t))continue;let o={delay:n,..._A(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){cD.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=zA(e);if(n){let e=window.MotionHandoffAnimation(n,t,cD);e!==null&&(o.startTime=e,f=!0)}}IA(e,t);let p=l??e.shouldReduceMotion;r.start(bA(t,r,i,p&&wA.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>cD.update(()=>{o&&NA(e,o)});u.length?Promise.all(u).then(t):t()}return u}function HA(e,t,n={}){let r=CA(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(VA(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return UA(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function UA(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(HA(c,t,{...o,delay:n+(typeof r==`function`?0:r)+sA(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function WA(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>HA(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=HA(e,t,n);else{let i=typeof t==`function`?CA(e,t,n.custom):t;r=Promise.all(VA(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var GA={test:e=>e===`auto`,parse:e=>e},KA=e=>t=>t.test(e),qA=[SD,J,RD,LD,BD,zD,GA],JA=e=>qA.find(KA(e));function YA(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||TE(e)}var XA=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function ZA(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(ED)||[];if(!r)return e;let i=n.replace(r,``),a=XA.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}var QA=/\b([a-z-]*)\(.*?\)/gu,$A={...aO,getAnimatableNone:e=>{let t=e.match(QA);return t?t.map(ZA).join(` `):e}},ej={...aO,getAnimatableNone:e=>{let t=aO.parse(e);return aO.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},tj={...SD,transform:Math.round},nj={borderWidth:J,borderTopWidth:J,borderRightWidth:J,borderBottomWidth:J,borderLeftWidth:J,borderRadius:J,borderTopLeftRadius:J,borderTopRightRadius:J,borderBottomRightRadius:J,borderBottomLeftRadius:J,width:J,maxWidth:J,height:J,maxHeight:J,top:J,right:J,bottom:J,left:J,inset:J,insetBlock:J,insetBlockStart:J,insetBlockEnd:J,insetInline:J,insetInlineStart:J,insetInlineEnd:J,padding:J,paddingTop:J,paddingRight:J,paddingBottom:J,paddingLeft:J,paddingBlock:J,paddingBlockStart:J,paddingBlockEnd:J,paddingInline:J,paddingInlineStart:J,paddingInlineEnd:J,margin:J,marginTop:J,marginRight:J,marginBottom:J,marginLeft:J,marginBlock:J,marginBlockStart:J,marginBlockEnd:J,marginInline:J,marginInlineStart:J,marginInlineEnd:J,fontSize:J,backgroundPositionX:J,backgroundPositionY:J,rotate:LD,rotateX:LD,rotateY:LD,rotateZ:LD,scale:wD,scaleX:wD,scaleY:wD,scaleZ:wD,skew:LD,skewX:LD,skewY:LD,distance:J,translateX:J,translateY:J,translateZ:J,x:J,y:J,z:J,perspective:J,transformPerspective:J,opacity:CD,originX:VD,originY:VD,originZ:J,zIndex:tj,fillOpacity:CD,strokeOpacity:CD,numOctaves:tj},rj={...nj,color:UD,backgroundColor:UD,outlineColor:UD,fill:UD,stroke:UD,borderColor:UD,borderTopColor:UD,borderRightColor:UD,borderBottomColor:UD,borderLeftColor:UD,filter:$A,WebkitFilter:$A,mask:ej,WebkitMask:ej},ij=e=>rj[e],aj=new Set([$A,ej]);function oj(e,t){let n=ij(e);return aj.has(n)||(n=aO),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var sj=new Set([`auto`,`none`,`0`]);function cj(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!sj.has(t)&&QD(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=oj(n,i)}var lj=class extends Ak{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),yD(r))){let i=uA(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!wA.has(n)||e.length!==2)return;let[r,i]=e,a=JA(r),o=JA(i);if(xD(r)!==xD(i)&&Sk[n]){this.needsMeasurement=!0;return}if(a!==o)if(vk(a)&&vk(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else Sk[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||YA(e[t]))&&n.push(t);n.length&&cj(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Sk[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=Sk[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function uj(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var dj=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function fj(e){return wE(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:pj,cancel:mj}=sD(queueMicrotask,!1),hj={x:!1,y:!1};function gj(){return hj.x||hj.y}function _j(e){return e===`x`||e===`y`?hj[e]?null:(hj[e]=!0,()=>{hj[e]=!1}):hj.x||hj.y?null:(hj.x=hj.y=!0,()=>{hj.x=hj.y=!1})}function vj(e,t){let n=uj(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function yj(e){return!(e.pointerType===`touch`||gj())}function bj(e,t,n={}){let[r,i,a]=vj(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!yj(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var xj=(e,t)=>t?e===t?!0:xj(e,t.parentElement):!1,Sj=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Cj=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function wj(e){return Cj.has(e.tagName)||e.isContentEditable===!0}var Tj=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Ej(e){return Tj.has(e.tagName)||e.isContentEditable===!0}var Dj=new WeakSet;function Oj(e){return t=>{t.key===`Enter`&&e(t)}}function kj(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Aj=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Oj(()=>{if(Dj.has(n))return;kj(n,`down`);let e=Oj(()=>{kj(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>kj(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function jj(e){return Sj(e)&&!gj()}var Mj=new WeakSet;function Nj(e,t,n={}){let[r,i,a]=vj(e,n),o=e=>{let r=e.currentTarget;if(!jj(e)||Mj.has(e))return;Dj.add(r),n.stopPropagation&&Mj.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),Dj.has(r)&&Dj.delete(r),jj(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||xj(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),fj(e)&&(e.addEventListener(`focus`,e=>Aj(e,i)),!wj(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Pj(e){return wE(e)&&`ownerSVGElement`in e}var Fj=new WeakMap,Ij,Lj=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Pj(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Rj=Lj(`inline`,`width`,`offsetWidth`),zj=Lj(`block`,`height`,`offsetHeight`);function Bj({target:e,borderBoxSize:t}){Fj.get(e)?.forEach(n=>{n(e,{get width(){return Rj(e,t)},get height(){return zj(e,t)}})})}function Vj(e){e.forEach(Bj)}function Hj(){typeof ResizeObserver>`u`||(Ij=new ResizeObserver(Vj))}function Uj(e,t){Ij||Hj();let n=uj(e);return n.forEach(e=>{let n=Fj.get(e);n||(n=new Set,Fj.set(e,n)),n.add(t),Ij?.observe(e)}),()=>{n.forEach(e=>{let n=Fj.get(e);n?.delete(t),n?.size||Ij?.unobserve(e)})}}var Wj=new Set,Gj;function Kj(){Gj=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Wj.forEach(t=>t(e))},window.addEventListener(`resize`,Gj)}function qj(e){return Wj.add(e),Gj||Kj(),()=>{Wj.delete(e),!Wj.size&&typeof Gj==`function`&&(window.removeEventListener(`resize`,Gj),Gj=void 0)}}function Jj(e,t){return typeof e==`function`?qj(e):Uj(e,t)}function Yj(e){return Pj(e)&&e.tagName===`svg`}var Xj=[...qA,UD,aO],Zj=e=>Xj.find(KA(e)),Qj=()=>({translate:0,scale:1,origin:0,originPoint:0}),$j=()=>({x:Qj(),y:Qj()}),eM=()=>({min:0,max:0}),tM=()=>({x:eM(),y:eM()}),nM=new WeakMap;function rM(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function iM(e){return typeof e==`string`||Array.isArray(e)}var aM=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],oM=[`initial`,...aM];function sM(e){return rM(e.animate)||oM.some(t=>iM(e[t]))}function cM(e){return!!(sM(e)||e.variants)}function lM(e,t,n){for(let r in t){let i=t[r],a=n[r];if(PA(i))e.addValue(r,i);else if(PA(a))e.addValue(r,kA(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,kA(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var uM={current:null},dM={current:!1},fM=typeof window<`u`;function pM(){if(dM.current=!0,fM)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>uM.current=e.matches;e.addEventListener(`change`,t),t()}else uM.current=!1}var mM=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],hM={};function gM(e){hM=e}function _M(){return hM}var vM=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){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=Ak,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=()=>{let e=mD.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,cD.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=sM(t),this.isVariantNode=cM(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&PA(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,nM.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(dM.current||pM(),this.shouldReduceMotion=uM.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(),lD(this.notifyUpdate),lD(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&$k.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Uk({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:ME(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=_k.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&cD.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in hM){let t=hM[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):tM()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<mM.length;t++){let n=mM[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=lM(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=kA(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(CE(n)||TE(n))?n=parseFloat(n):!Zj(n)&&aO.test(t)&&(n=oj(e,t)),this.setBaseTarget(e,PA(n)?n.get():n)),PA(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=SA(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!PA(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new jE),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){pj.render(this.render)}},yM=class extends vM{constructor(){super(...arguments),this.KeyframeResolver=lj}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;PA(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},bM=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function xM({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function SM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function CM(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function wM(e){return e===void 0||e===1}function TM({scale:e,scaleX:t,scaleY:n}){return!wM(e)||!wM(t)||!wM(n)}function EM(e){return TM(e)||DM(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function DM(e){return OM(e.x)||OM(e.y)}function OM(e){return e&&e!==`0%`}function kM(e,t,n){return n+t*(e-n)}function AM(e,t,n,r,i){return i!==void 0&&(e=kM(e,i,r)),kM(e,n,r)+t}function jM(e,t=0,n=1,r,i){e.min=AM(e.min,t,n,r,i),e.max=AM(e.max,t,n,r,i)}function MM(e,{x:t,y:n}){jM(e.x,t.translate,t.scale,t.originPoint),jM(e.y,n.translate,n.scale,n.originPoint)}var NM=.999999999999,PM=1.0000000000001;function FM(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(IM(e.x,-a.scroll.offset.x),IM(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,MM(e,o)),r&&EM(a.latestValues)&&zM(e,a.latestValues,a.layout?.layoutBox))}t.x<PM&&t.x>NM&&(t.x=1),t.y<PM&&t.y>NM&&(t.y=1)}function IM(e,t){e.min+=t,e.max+=t}function LM(e,t,n,r,i=.5){jM(e,t,n,lO(e.min,e.max,i),r)}function RM(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function zM(e,t,n){let r=n??e;LM(e.x,RM(t.x,r.x),t.scaleX,t.scale,t.originX),LM(e.y,RM(t.y,r.y),t.scaleY,t.scale,t.originY)}function BM(e,t){return xM(CM(e.getBoundingClientRect(),t))}function VM(e,t,n){let r=BM(e,n),{scroll:i}=t;return i&&(IM(r.x,i.offset.x),IM(r.y,i.offset.y)),r}var HM={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},UM=gk.length;function WM(e,t,n){let r=``,i=!0;for(let a=0;a<UM;a++){let o=gk[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===(o.startsWith(`scale`)?1:0);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=dj(s,nj[o]);if(!c){i=!1;let t=HM[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function GM(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(_k.has(e)){o=!0;continue}else if(_D(e)){i[e]=n;continue}else{let t=dj(n,nj[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=WM(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function KM(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function qM(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var JM={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(J.test(e))e=parseFloat(e);else return e;return`${qM(e,t.target.x)}% ${qM(e,t.target.y)}%`}},YM={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=aO.parse(e);if(i.length>5)return r;let a=aO.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=lO(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},XM={borderRadius:{...JM,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:JM,borderTopRightRadius:JM,borderBottomLeftRadius:JM,borderBottomRightRadius:JM,boxShadow:YM};function ZM(e,{layout:t,layoutId:n}){return _k.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!XM[e]||e===`opacity`)}function QM(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(PA(r[t])||i&&PA(i[t])||ZM(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function $M(e){return window.getComputedStyle(e)}var eN=class extends yM{constructor(){super(...arguments),this.type=`html`,this.renderInstance=KM}readValueFromInstance(e,t){if(_k.has(t))return this.projection?.isProjecting?fk(t):mk(e,t);{let n=$M(e),r=(_D(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return BM(e,t)}build(e,t,n){GM(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return QM(e,t,n)}},tN={offset:`stroke-dashoffset`,array:`stroke-dasharray`},nN={offset:`strokeDashoffset`,array:`strokeDasharray`};function rN(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?tN:nN;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var iN=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function aN(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(GM(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of iN)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&rN(d,i,a,o,!1)}var oN=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`]),sN=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function cN(e,t,n,r){KM(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(oN.has(n)?n:LA(n),t.attrs[n])}function lN(e,t,n){let r=QM(e,t,n);for(let n in e)if(PA(e[n])||PA(t[n])){let t=gk.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var uN=class extends yM{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=tM}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(_k.has(t)){let e=ij(t);return e&&e.default||0}return t=oN.has(t)?t:LA(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return lN(e,t,n)}build(e,t,n){aN(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){cN(e,t,n,r)}mount(e){this.isSVGTag=sN(e.tagName),super.mount(e)}},dN=oM.length;function fN(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&fN(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<dN;n++){let r=oM[n],i=e.props[r];(iM(i)||i===!1)&&(t[r]=i)}return t}function pN(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var mN=[...aM].reverse(),hN=aM.length;function gN(e){return t=>Promise.all(t.map(({animation:t,options:n})=>WA(e,t,n)))}function _N(e){let t=gN(e),n=bN(),r=!0,i=!1,a=t=>(n,r)=>{let i=CA(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=fN(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<hN;t++){let p=mN[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=iM(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||rM(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=vN(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=AA(t)&&AA(n)?!pN(t,n):t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=CA(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=sA(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=CA(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=bN(),i=!0}}}function vN(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!pN(t,e):!1}function yN(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function bN(){return{animate:yN(!0),whileInView:yN(),whileHover:yN(),whileTap:yN(),whileDrag:yN(),whileFocus:yN(),exit:yN()}}function xN(e,t){e.min=t.min,e.max=t.max}function SN(e,t){xN(e.x,t.x),xN(e.y,t.y)}function CN(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var wN=1e-4,TN=1-wN,EN=1+wN,DN=.01,ON=0-DN,kN=0+DN;function AN(e){return e.max-e.min}function jN(e,t,n){return Math.abs(e-t)<=n}function MN(e,t,n,r=.5){e.origin=r,e.originPoint=lO(t.min,t.max,e.origin),e.scale=AN(n)/AN(t),e.translate=lO(n.min,n.max,e.origin)-e.originPoint,(e.scale>=TN&&e.scale<=EN||isNaN(e.scale))&&(e.scale=1),(e.translate>=ON&&e.translate<=kN||isNaN(e.translate))&&(e.translate=0)}function NN(e,t,n,r){MN(e.x,t.x,n.x,r?r.originX:void 0),MN(e.y,t.y,n.y,r?r.originY:void 0)}function PN(e,t,n,r=0){e.min=(r?lO(n.min,n.max,r):n.min)+t.min,e.max=e.min+AN(t)}function FN(e,t,n,r){PN(e.x,t.x,n.x,r?.x),PN(e.y,t.y,n.y,r?.y)}function IN(e,t,n,r=0){let i=r?lO(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+AN(t)}function LN(e,t,n,r){IN(e.x,t.x,n.x,r?.x),IN(e.y,t.y,n.y,r?.y)}function RN(e,t,n,r,i){return e-=t,e=kM(e,1/n,r),i!==void 0&&(e=kM(e,1/i,r)),e}function zN(e,t=0,n=1,r=.5,i,a=e,o=e){if(RD.test(t)&&(t=parseFloat(t),t=lO(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=lO(a.min,a.max,r);e===a&&(s-=t),e.min=RN(e.min,t,n,s,i),e.max=RN(e.max,t,n,s,i)}function BN(e,t,[n,r,i],a,o){zN(e,t[n],t[r],t[i],t.scale,a,o)}var VN=[`x`,`scaleX`,`originX`],HN=[`y`,`scaleY`,`originY`];function UN(e,t,n,r){BN(e.x,t,VN,n?n.x:void 0,r?r.x:void 0),BN(e.y,t,HN,n?n.y:void 0,r?r.y:void 0)}function WN(e){return e.translate===0&&e.scale===1}function GN(e){return WN(e.x)&&WN(e.y)}function KN(e,t){return e.min===t.min&&e.max===t.max}function qN(e,t){return KN(e.x,t.x)&&KN(e.y,t.y)}function JN(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function YN(e,t){return JN(e.x,t.x)&&JN(e.y,t.y)}function XN(e){return AN(e.x)/AN(e.y)}function ZN(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function QN(e){return[e(`x`),e(`y`)]}function $N(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var eP=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],tP=eP.length,nP=e=>typeof e==`string`?parseFloat(e):e,rP=e=>typeof e==`number`||J.test(e);function iP(e,t,n,r,i,a){i?(e.opacity=lO(0,n.opacity??1,oP(r)),e.opacityExit=lO(t.opacity??1,0,sP(r))):a&&(e.opacity=lO(t.opacity??1,n.opacity??1,r));for(let i=0;i<tP;i++){let a=eP[i],o=aP(t,a),s=aP(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||rP(o)===rP(s)?(e[a]=Math.max(lO(nP(o),nP(s),r),0),(RD.test(s)||RD.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=lO(t.rotate||0,n.rotate||0,r))}function aP(e,t){return e[t]===void 0?e.borderRadius:e[t]}var oP=cP(0,.5,qE),sP=cP(.5,.95,DE);function cP(e,t,n){return r=>r<e?0:r>t?1:n(AE(e,t,r))}function lP(e,t,n){let r=PA(e)?e:kA(e);return r.start(bA(``,r,t,n)),r.animation}function uP(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var dP=(e,t)=>e.depth-t.depth,fP=class{constructor(){this.children=[],this.isDirty=!1}add(e){yE(this.children,e),this.isDirty=!0}remove(e){bE(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(dP),this.isDirty=!1,this.children.forEach(e)}};function pP(e,t){let n=mD.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(lD(r),e(a-t))};return cD.setup(r,!0),()=>lD(r)}function mP(e){return PA(e)?e.get():e}var hP=class{constructor(){this.members=[]}add(e){yE(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(bE(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(bE(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},gP={hasAnimatedSinceResize:!0,hasEverUpdated:!1},_P={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},vP=[``,`X`,`Y`,`Z`],yP=1e3,bP=0;function xP(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function SP(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=zA(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,cD,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&SP(r)}function CP({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=bP++,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,iD.value&&(_P.nodes=_P.calculatedTargetDeltas=_P.calculatedProjections=0),this.nodes.forEach(EP),this.nodes.forEach(FP),this.nodes.forEach(IP),this.nodes.forEach(DP),iD.addProjectionMetrics&&iD.addProjectionMetrics(_P)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new fP)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new jE),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Pj(t)&&!Yj(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;cD.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=pP(i,250),gP.hasAnimatedSinceResize&&(gP.hasAnimatedSinceResize=!1,this.nodes.forEach(PP)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||UP,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!YN(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={..._A(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||PP(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),lD(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(LP),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&SP(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(AP),this.nodes.forEach(kP);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(jP);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(MP),this.nodes.forEach(NP),this.nodes.forEach(wP),this.nodes.forEach(TP)):this.nodes.forEach(jP),this.clearAllSnapshots();let e=mD.now();uD.delta=xE(0,1e3/60,e-uD.timestamp),uD.timestamp=e,uD.isProcessing=!0,dD.update.process(uD),dD.preRender.process(uD),dD.render.process(uD),uD.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pj.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(OP),this.sharedNodes.forEach(RP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,cD.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){cD.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!AN(this.snapshot.measuredBox.x)&&!AN(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 e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=tM(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!GN(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||EM(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),qP(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return tM();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(YP))){let{scroll:e}=this.root;e&&(IM(t.x,e.offset.x),IM(t.y,e.offset.y))}return t}removeElementScroll(e){let t=tM();if(SN(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&SN(t,e),IM(t.x,i.offset.x),IM(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||tM();SN(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(IM(r.x,-n.scroll.offset.x),IM(r.y,-n.scroll.offset.y)),EM(n.latestValues)&&zM(r,n.latestValues,n.layout?.layoutBox)}return EM(this.latestValues)&&zM(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=tM();SN(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!EM(n.latestValues))continue;let r;n.instance&&(TM(n.latestValues)&&n.updateSnapshot(),r=tM(),SN(r,n.measurePageBox())),UN(t,n.latestValues,n.snapshot?.layoutBox,r)}return EM(this.latestValues)&&UN(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}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!==uD.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=uD.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=tM(),this.targetWithTransforms=tM()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),FN(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):SN(this.target,this.layout.layoutBox),MM(this.target,this.targetDelta)):SN(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),iD.value&&_P.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||TM(this.parent.latestValues)||DM(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=tM(),this.relativeTargetOrigin=tM(),LN(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),SN(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===uD.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;SN(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;FM(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=tM());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(CN(this.prevProjectionDelta.x,this.projectionDelta.x),CN(this.prevProjectionDelta.y,this.projectionDelta.y)),NN(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!ZN(this.projectionDelta.x,this.prevProjectionDelta.x)||!ZN(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),iD.value&&_P.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=$j(),this.projectionDelta=$j(),this.projectionDeltaWithTransform=$j()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=$j();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=tM(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(HP));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;zP(a.x,e.x,n),zP(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(LN(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),VP(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&qN(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=tM(),SN(d,this.relativeTarget)),s&&(this.animationValues=i,iP(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(lD(this.pendingAnimation),void 0),this.pendingAnimation=cD.update(()=>{gP.hasAnimatedSinceResize=!0,hD.layout++,this.motionValue||=kA(0),this.motionValue.jump(0,!1),this.currentAnimation=lP(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{hD.layout--},onComplete:()=>{hD.layout--,e.onComplete&&e.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);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(yP),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&JP(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||tM();let t=AN(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=AN(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}SN(t,n),zM(t,i),NN(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new hP),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&xP(`z`,e,r,this.animationValues);for(let t=0;t<vP.length;t++)xP(`rotate${vP[t]}`,e,r,this.animationValues),xP(`skew${vP[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=mP(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=mP(t?.pointerEvents)||``),this.hasProjected&&!EM(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=$N(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in XM){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=XM[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?mP(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(kP),this.root.sharedNodes.clear()}}}function wP(e){e.updateLayout()}function TP(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)QN(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=AN(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;xN(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else JP(i,t.layoutBox,n)&&QN(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=AN(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=$j();NN(o,n,t.layoutBox);let s=$j();a?NN(s,e.applyTransform(r,!0),t.measuredBox):NN(s,n,t.layoutBox);let c=!GN(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=tM();LN(s,t.layoutBox,i.layoutBox,o);let c=tM();LN(c,n,a.layoutBox,o),YN(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function EP(e){iD.value&&_P.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function DP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function OP(e){e.clearSnapshot()}function kP(e){e.clearMeasurements()}function AP(e){e.isLayoutDirty=!0,e.updateLayout()}function jP(e){e.isLayoutDirty=!1}function MP(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function NP(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function PP(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function FP(e){e.resolveTargetDelta()}function IP(e){e.calcProjection()}function LP(e){e.resetSkewAndRotation()}function RP(e){e.removeLeadSnapshot()}function zP(e,t,n){e.translate=lO(t.translate,0,n),e.scale=lO(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function BP(e,t,n,r){e.min=lO(t.min,n.min,r),e.max=lO(t.max,n.max,r)}function VP(e,t,n,r){BP(e.x,t.x,n.x,r),BP(e.y,t.y,n.y,r)}function HP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var UP={duration:.45,ease:[.4,0,.1,1]},WP=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),GP=WP(`applewebkit/`)&&!WP(`chrome/`)?Math.round:DE;function KP(e){e.min=GP(e.min),e.max=GP(e.max)}function qP(e){KP(e.x),KP(e.y)}function JP(e,t,n){return e===`position`||e===`preserve-aspect`&&!jN(XN(t),XN(n),.2)}function YP(e){return e!==e.root&&e.scroll?.wasRoot}var XP=CP({attachResizeListener:(e,t)=>uP(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),ZP={current:void 0},QP=CP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ZP.current){let e=new XP({});e.mount(window),e.setOptions({layoutScroll:!0}),ZP.current=e}return ZP.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),$P=(0,m.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function eF(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function tF(...e){return t=>{let n=!1,r=e.map(e=>{let r=eF(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():eF(e[t],null)}}}}function nF(...e){return m.useCallback(tF(...e),e)}var rF=class extends m.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(fj(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=fj(e)&&e.offsetWidth||0,r=fj(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}};function iF({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,m.useId)(),s=(0,m.useRef)(null),c=(0,m.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=(0,m.useContext)($P),u=nF(s,e.props?.ref??e?.ref);return(0,m.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m}=c.current;if(t||a===!1||!s.current||!e||!u)return;let h=n===`left`?`left: ${f}`:`right: ${p}`,g=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let _=document.createElement(`style`);l&&(_.nonce=l);let v=i??document.head;return v.appendChild(_),_.sheet&&_.sheet.insertRule(`
|
|
172
|
+
[data-motion-pop-id="${o}"] {
|
|
173
|
+
position: absolute !important;
|
|
174
|
+
width: ${e}px !important;
|
|
175
|
+
height: ${u}px !important;
|
|
176
|
+
${h}px !important;
|
|
177
|
+
${g}px !important;
|
|
178
|
+
}
|
|
179
|
+
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),v.contains(_)&&v.removeChild(_)}},[t]),(0,v.jsx)(rF,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:m.cloneElement(e,{ref:u})})}var aF=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=gE(oF),d=(0,m.useId)(),f=!0,p=(0,m.useMemo)(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[n,u,r]);return a&&f&&(p={...p}),(0,m.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),m.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,v.jsx)(iF,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,v.jsx)(vE.Provider,{value:p,children:e})};function oF(){return new Map}function sF(e=!0){let t=(0,m.useContext)(vE);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,m.useId)();(0,m.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,m.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var cF=e=>e.key||``;function lF(e){let t=[];return m.Children.forEach(e,e=>{(0,m.isValidElement)(e)&&t.push(e)}),t}var uF=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=sF(o),f=(0,m.useMemo)(()=>lF(e),[e]),p=o&&!u?[]:f.map(cF),h=(0,m.useRef)(!0),g=(0,m.useRef)(f),_=gE(()=>new Map),y=(0,m.useRef)(new Set),[b,x]=(0,m.useState)(f),[S,C]=(0,m.useState)(f);_E(()=>{h.current=!1,g.current=f;for(let e=0;e<S.length;e++){let t=cF(S[e]);p.includes(t)?(_.delete(t),y.current.delete(t)):_.get(t)!==!0&&_.set(t,!1)}},[S,p.length,p.join(`-`)]);let w=[];if(f!==b){let e=[...f];for(let t=0;t<S.length;t++){let n=S[t],r=cF(n);p.includes(r)||(e.splice(t,0,n),w.push(n))}return a===`wait`&&w.length&&(e=w),C(lF(e)),x(f),null}let{forceRender:T}=(0,m.useContext)(hE);return(0,v.jsx)(v.Fragment,{children:S.map(e=>{let m=cF(e),b=o&&!u?!1:f===S||p.includes(m);return(0,v.jsx)(aF,{isPresent:b,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:b?void 0:()=>{if(y.current.has(m))return;if(_.has(m))y.current.add(m),_.set(m,!0);else return;let e=!0;_.forEach(t=>{t||(e=!1)}),e&&(T?.(),C(g.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},m)})})},dF=(0,m.createContext)({strict:!1}),fF={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`]},pF=!1;function mF(){if(pF)return;let e={};for(let t in fF)e[t]={isEnabled:e=>fF[t].some(t=>!!e[t])};gM(e),pF=!0}function hF(){return mF(),_M()}function gF(e){let t=hF();for(let n in e)t[n]={...t[n],...e[n]};gM(t)}function _F({children:e,features:t,strict:n=!1}){let[,r]=(0,m.useState)(!vF(t)),i=(0,m.useRef)(void 0);if(!vF(t)){let{renderer:e,...n}=t;i.current=e,gF(n)}return(0,m.useEffect)(()=>{vF(t)&&t().then(({renderer:e,...t})=>{gF(t),i.current=e,r(!0)})},[]),(0,v.jsx)(dF.Provider,{value:{renderer:i.current,strict:n},children:e})}function vF(e){return typeof e==`function`}var yF=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`.split(`.`));function bF(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||yF.has(e)}var xF=r({default:()=>SF}),SF,CF=n((()=>{throw SF={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),wF=e=>!bF(e);function TF(e){typeof e==`function`&&(wF=t=>t.startsWith(`on`)?!bF(t):e(t))}try{TF((CF(),t(xF)).default)}catch{}function EF(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||PA(e[i])||(wF(i)||n===!0&&bF(i)||!t&&!bF(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var DF=(0,m.createContext)({});function OF(e,t){if(sM(e)){let{initial:t,animate:n}=e;return{initial:t===!1||iM(t)?t:void 0,animate:iM(n)?n:void 0}}return e.inherit===!1?{}:t}function kF(e){let{initial:t,animate:n}=OF(e,(0,m.useContext)(DF));return(0,m.useMemo)(()=>({initial:t,animate:n}),[AF(t),AF(n)])}function AF(e){return Array.isArray(e)?e.join(` `):e}var jF=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function MF(e,t,n){for(let r in t)!PA(t[r])&&!ZM(r,n)&&(e[r]=t[r])}function NF({transformTemplate:e},t){return(0,m.useMemo)(()=>{let n=jF();return GM(n,t,e),Object.assign({},n.vars,n.style)},[t])}function PF(e,t){let n=e.style||{},r={};return MF(r,n,e),Object.assign(r,NF(e,t)),r}function FF(e,t){let n={},r=PF(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var IF=()=>({...jF(),attrs:{}});function LF(e,t,n,r){let i=(0,m.useMemo)(()=>{let n=IF();return aN(n,t,sN(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};MF(t,e.style,e),i.style={...t,...i.style}}return i}var RF=[`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 zF(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(RF.indexOf(e)>-1||/[A-Z]/u.test(e))}function BF(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??zF(e)?LF:FF)(t,r,i,e),c=EF(t,typeof e==`string`,a),l=e===m.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,m.useMemo)(()=>PA(u)?u.get():u,[u]);return(0,m.createElement)(e,{...l,children:d})}function VF({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:HF(n,r,i,e),renderState:t()}}function HF(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=mP(a[e]);let{initial:o,animate:s}=e,c=sM(e),l=cM(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!rM(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=SA(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var UF=e=>(t,n)=>{let r=(0,m.useContext)(DF),i=(0,m.useContext)(vE),a=()=>VF(e,t,r,i);return n?a():gE(a)},WF=UF({scrapeMotionValuesFromProps:QM,createRenderState:jF}),GF=UF({scrapeMotionValuesFromProps:lN,createRenderState:IF}),KF=Symbol.for(`motionComponentSymbol`);function qF(e,t,n){let r=(0,m.useRef)(n);(0,m.useInsertionEffect)(()=>{r.current=n});let i=(0,m.useRef)(null);return(0,m.useCallback)(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}var JF=(0,m.createContext)({});function YF(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function XF(e,t,n,r,i,a){let{visualElement:o}=(0,m.useContext)(DF),s=(0,m.useContext)(dF),c=(0,m.useContext)(vE),l=(0,m.useContext)($P),u=l.reducedMotion,d=l.skipAnimations,f=(0,m.useRef)(null),p=(0,m.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let h=f.current,g=(0,m.useContext)(JF);h&&!h.projection&&i&&(h.type===`html`||h.type===`svg`)&&ZF(f.current,n,i,g);let _=(0,m.useRef)(!1);(0,m.useInsertionEffect)(()=>{h&&_.current&&h.update(n,c)});let v=n[RA],y=(0,m.useRef)(!!v&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return _E(()=>{p.current=!0,h&&(_.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),(0,m.useEffect)(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),h.enteringChildren=void 0)}),h}function ZF(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:QF(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&YF(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function QF(e){if(e)return e.options.allowProjection===!1?QF(e.parent):e.projection}function $F(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&gF(r);let a=n?n===`svg`:zF(e),o=a?GF:WF;function s(n,s){let c,l={...(0,m.useContext)($P),...n,layoutId:eI(n)},{isStatic:u}=l,d=kF(n),f=o(n,u);if(!u&&typeof window<`u`){tI(l,r);let t=nI(l);c=t.MeasureLayout,d.visualElement=XF(e,f,l,i,t.ProjectionNode,a)}return(0,v.jsxs)(DF.Provider,{value:d,children:[c&&d.visualElement?(0,v.jsx)(c,{visualElement:d.visualElement,...l}):null,BF(e,n,qF(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,m.forwardRef)(s);return c[KF]=e,c}function eI({layoutId:e}){let t=(0,m.useContext)(hE).id;return t&&e!==void 0?t+`-`+e:e}function tI(e,t){(0,m.useContext)(dF).strict}function nI(e){let{drag:t,layout:n}=hF();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function rI(e,t){if(typeof Proxy>`u`)return $F;let n=new Map,r=(n,r)=>$F(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,$F(a,void 0,e,t)),n.get(a))})}var iI=(e,t)=>t.isSVG??zF(e)?new uN(t):new eN(t,{allowProjection:e!==m.Fragment}),aI=class extends bM{constructor(e){super(e),e.animationState||=_N(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();rM(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},oI=0,sI={animation:{Feature:aI},exit:{Feature:class extends bM{constructor(){super(...arguments),this.id=oI++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=CA(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function cI(e){return{point:{x:e.pageX,y:e.pageY}}}var lI=e=>t=>Sj(t)&&e(t,cI(t));function uI(e,t,n,r){return uP(e,t,lI(n),r)}var dI=({current:e})=>e?e.ownerDocument.defaultView:null,fI=(e,t)=>Math.abs(e-t);function pI(e,t){let n=fI(e.x,t.x),r=fI(e.y,t.y);return Math.sqrt(n**2+r**2)}var mI=new Set([`auto`,`scroll`]),hI=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){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=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=gI(this.lastRawMoveEventInfo,this.transformPagePoint));let e=vI(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=pI(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=uD;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=gI(t,this.transformPagePoint),cD.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=vI(e.type===`pointercancel`?this.lastMoveEventInfo:gI(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Sj(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=gI(cI(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=uD;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,vI(s,this.history)),this.removeListeners=kE(uI(this.contextWindow,`pointermove`,this.handlePointerMove),uI(this.contextWindow,`pointerup`,this.handlePointerUp),uI(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(mI.has(e.overflowX)||mI.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.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(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),cD.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),lD(this.updatePoint)}};function gI(e,t){return t?{point:t(e.point)}:e}function _I(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vI({point:e},t){return{point:e,delta:_I(e,bI(t)),offset:_I(e,yI(t)),velocity:xI(t,.1)}}function yI(e){return e[0]}function bI(e){return e[e.length-1]}function xI(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=bI(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ME(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>ME(t)*2&&(r=e[1]);let a=NE(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function SI(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?lO(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?lO(n,e,r.max):Math.min(e,n)),e}function CI(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function wI(e,{top:t,left:n,bottom:r,right:i}){return{x:CI(e.x,n,i),y:CI(e.y,t,r)}}function TI(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function EI(e,t){return{x:TI(e.x,t.x),y:TI(e.y,t.y)}}function DI(e,t){let n=.5,r=AN(e),i=AN(t);return i>r?n=AE(t.min,t.max-r,e.min):r>i&&(n=AE(e.min,e.max-i,t.min)),xE(0,1,n)}function OI(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var kI=.35;function AI(e=kI){return e===!1?e=0:e===!0&&(e=kI),{x:jI(e,`left`,`right`),y:jI(e,`top`,`bottom`)}}function jI(e,t,n){return{min:MI(e,t),max:MI(e,n)}}function MI(e,t){return typeof e==`number`?e:e[t]||0}var NI=new WeakMap,PI=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=tM(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(cI(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=_j(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),QN(e=>{let t=this.getAxisMotionValue(e).get()||0;if(RD.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=AN(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&cD.update(()=>i(e,t),!1,!0),IA(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=RI(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&cD.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new hI(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:dI(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&cD.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!LI(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=SI(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&YF(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=wI(n.layoutBox,e):this.constraints=!1,this.elastic=AI(t),r!==this.constraints&&!YF(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&QN(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=OI(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!YF(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=VM(n,r.root,this.visualElement.getTransformPagePoint()),a=EI(r.layout.layoutBox,i);if(t){let e=t(SM(a));this.hasMutatedConstraints=!!e,e&&(a=xM(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=QN(o=>{if(!LI(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return IA(this.visualElement,e),n.start(bA(e,n,0,t,this.visualElement,!1))}stopAnimation(){QN(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){QN(t=>{let{drag:n}=this.getProps();if(!LI(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-lO(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!YF(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};QN(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=DI({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),QN(t=>{if(!LI(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(lO(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;NI.set(this.visualElement,this);let e=this.visualElement.current,t=uI(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Ej(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();YF(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=II(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),cD.read(r);let o=uP(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(QN(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=kI,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function FI(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function II(e,t,n){let r=Jj(e,FI(n)),i=Jj(t,FI(n));return()=>{r(),i()}}function LI(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function RI(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var zI=class extends bM{constructor(e){super(e),this.removeGroupControls=DE,this.removeListeners=DE,this.controls=new PI(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||DE}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},BI=e=>(t,n)=>{e&&cD.update(()=>e(t,n),!1,!0)},VI=class extends bM{constructor(){super(...arguments),this.removePointerDownListener=DE}onPointerDown(e){this.session=new hI(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:dI(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:BI(e),onStart:BI(t),onMove:BI(n),onEnd:(e,t)=>{delete this.session,r&&cD.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=uI(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},HI=!1,UI=class extends m.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),HI&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),gP.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),HI=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||cD.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),pj.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;HI=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function WI(e){let[t,n]=sF(),r=(0,m.useContext)(hE);return(0,v.jsx)(UI,{...e,layoutGroup:r,switchLayoutGroup:(0,m.useContext)(JF),isPresent:t,safeToRemove:n})}var GI={pan:{Feature:VI},drag:{Feature:zI,ProjectionNode:QP,MeasureLayout:WI}};function KI(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&cD.postRender(()=>i(t,cI(t)))}var qI=class extends bM{mount(){let{current:e}=this.node;e&&(this.unmount=bj(e,(e,t)=>(KI(this.node,t,`Start`),e=>KI(this.node,e,`End`))))}unmount(){}},JI=class extends bM{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!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=kE(uP(this.node.current,`focus`,()=>this.onFocus()),uP(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function YI(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&cD.postRender(()=>i(t,cI(t)))}var XI=class extends bM{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Nj(e,(e,t)=>(YI(this.node,t,`Start`),(e,{success:t})=>YI(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},ZI=new WeakMap,QI=new WeakMap,$I=e=>{let t=ZI.get(e.target);t&&t(e)},eL=e=>{e.forEach($I)};function tL({root:e,...t}){let n=e||document;QI.has(n)||QI.set(n,{});let r=QI.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(eL,{root:e,...t})),r[i]}function nL(e,t,n){let r=tL(t);return ZI.set(e,n),r.observe(e),()=>{ZI.delete(e),r.unobserve(e)}}var rL={some:0,all:1},iL=class extends bM{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:rL[r]};this.stopObserver=nL(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(aL(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function aL({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var oL={inView:{Feature:iL},tap:{Feature:XI},focus:{Feature:JI},hover:{Feature:qI}},sL={layout:{ProjectionNode:QP,MeasureLayout:WI}},cL=rI({...sI,...oL,...GI,...sL},iI),lL={renderer:iI,...sI,...oL},uL=function(e){return e.SM=`sm`,e.MD=`md`,e.LG=`lg`,e.XL=`xl`,e.UNSET=`unset`,e}({}),dL=Fl(`flex cursor-default flex-col overflow-hidden shadow-sm`,{variants:{size:{sm:`h-auto max-h-[30vh] w-[95vw] max-w-xl`,md:`h-auto max-h-[50vh] w-[95vw] max-w-xl`,lg:`h-auto max-h-[70vh] w-[95vw] max-w-4xl`,xl:`h-auto max-h-[95vh] w-[95vw] max-w-6xl`,unset:`h-auto max-h-[95vh] w-[95vw]`}},defaultVariants:{size:`unset`}}),fL={none:`p-0`,sm:`px-2 py-4`,md:`px-4 py-6`,lg:`px-6 py-8`,xl:`px-8 py-10`,"2xl":`px-10 py-12`},pL=cL.create(Hu),mL=({children:e,isOpen:t,container:n,onClose:r,hasCloseButton:i=!1,title:a,size:o=uL.MD,className:s,isScrollable:c=!1,disableScroll:l=!0,padding:u=`none`,...d})=>{let f=uE(n);if(mE({key:`modal`,disableScroll:t&&l}),(0,m.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t&&r&&r()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[t,r]),!f)return(0,v.jsx)(v.Fragment,{});let p=!!a,h=fL[u||`none`];return(0,rc.createPortal)((0,v.jsx)(cL.div,{className:`invisible fixed top-0 left-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-hidden bg-background/40 backdrop-blur`,animate:t?`visible`:`invisible`,variants:{visible:{opacity:1,visibility:`visible`,transition:{duration:.1,when:`beforeChildren`}},invisible:{opacity:0,visibility:`hidden`,transition:{duration:.1,when:`afterChildren`}}},onClick:e=>{e.stopPropagation(),r?.()},"aria-hidden":!t,children:(0,v.jsxs)(pL,{onClick:e=>e.stopPropagation(),initial:{scale:t?.5:1},animate:{scale:t?1:.5},transition:{duration:.3},className:dL({size:o,className:s}),role:`dialog`,"aria-modal":!0,roundedSize:`4xl`,padding:`none`,...d,children:[(0,v.jsxs)(`div`,{className:B(`relative flex-none px-4 pt-4`,i&&p?`flex items-start`:i?`flex justify-end`:p?`items-center`:`hidden`),children:[p&&(0,v.jsx)(Jb,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:a}),i&&(0,v.jsx)(Ju,{variant:W.HOVERABLE,color:G.TEXT,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),r?.()},Icon:vu,size:U.ICON_MD})]}),(0,v.jsx)(`div`,{className:B(`flex min-h-0 w-full flex-1 flex-col`,c===!0&&`overflow-auto`,c===`y`&&`overflow-y-auto overflow-x-hidden`,c===`x`&&`overflow-x-auto overflow-y-hidden`,!c&&`overflow-visible`),children:(0,v.jsx)(`div`,{className:B(`flex h-full w-full flex-1 flex-col`,h),children:e})})]})}),f)},hL={key:`table`,content:{nodeType:`translation`,translation:{en:{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},"en-GB":{modal:{title:`Show all table content`,description:`Open the table in a modal to view all data content clearly`}},fr:{modal:{title:`Afficher tout le contenu du tableau`,description:`Ouvrir le tableau dans une fenêtre modale pour voir tout le contenu clairement`}},es:{modal:{title:`Mostrar todo el contenido de la tabla`,description:`Abrir la tabla en una ventana flotante para ver todo el contenido claramente`}},de:{modal:{title:`Alle Tabellendaten anzeigen`,description:`Tabelle in einem Modal öffnen, um alle Daten übersichtlich anzuzeigen`}},ja:{modal:{title:`テーブルのすべての内容を表示`,description:`テーブルをモーダルで開き、すべてのデータを明確に表示`}},ko:{modal:{title:`테이블의 모든 내용 표시`,description:`테이블을 모달로 열어 모든 데이터를 명확하게 확인`}},zh:{modal:{title:`显示表格的所有内容`,description:`在弹窗中打开表格以清晰地查看所有数据`}},it:{modal:{title:`Mostra tutto il contenuto della tabella`,description:`Apri la tabella in una finestra modale per visualizzare tutti i dati in modo chiaro`}},pt:{modal:{title:`Mostrar todo o conteúdo da tabela`,description:`Abrir a tabela em um modal para ver todo o conteúdo claramente`}},hi:{modal:{title:`सभी तालिका सामग्री दिखाएं`,description:`सभी डेटा सामग्री को स्पष्ट रूप से देखने के लिए तालिका को मोडल में खोलें`}},ar:{modal:{title:`اظهار جميع محتويات الجدول`,description:`افتح الجدول في نافذة منبثقة لعرض جميع محتويات البيانات بوضوح`}},ru:{modal:{title:`Показать все данные таблицы`,description:`Открыть таблицу в модальном окне для четкого просмотра всех данных`}}}},localIds:[`table::local::../@intlayer/design-system/dist/esm/components/Table/table.content.mjs`]},gL=({setIsModalOpen:e})=>{let{modal:t}=mr(hL);return(0,v.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 right-4 z-10`,children:(0,v.jsx)(`div`,{className:`pointer-events-auto sticky top-48 pt-4`,children:(0,v.jsxs)(lf,{identifier:`expand`,children:[(0,v.jsx)(Ju,{variant:`hoverable`,size:`icon-md`,onClick:()=>{e(!0)},label:t.title,Icon:su}),(0,v.jsxs)(lf.Detail,{identifier:`expand`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:nf.END,children:[(0,v.jsx)(`strong`,{children:t.title}),(0,v.jsx)(`p`,{className:`text-neutral`,children:t.description})]})]})})})},_L=.55,vL=5,yL=30,bL=(e,t,n)=>{(0,m.useEffect)(()=>{if(!e.current)return;let n=[];Array.from(e.current.querySelectorAll(`tr`)).forEach(e=>{Array.from(e.children).forEach((e,t)=>{let r=e.textContent?.trim().length??0;(n[t]===void 0||r>n[t])&&(n[t]=r)})});let r=e=>{let t=Array.from(e.querySelectorAll(`tr`));if(t.length===0)return;let r=(e,t)=>{let r=Math.min(yL,Math.max(vL,(n[t]??0)*_L));e.style.minWidth=`${r}rem`,e.style.maxWidth=`${yL}rem`};e.querySelectorAll(`th`).forEach((e,t)=>{r(e,t)}),t.forEach(e=>{e.querySelectorAll(`td`).forEach((e,t)=>{r(e,t)})})};r(e.current),t.current&&r(t.current)},n)},xL=({className:e,isRollable:t=!1,displayModal:n,onClick:r,...i})=>{let[a,o]=(0,m.useState)(!1),[s,c]=(0,m.useState)(null),l=(0,m.useRef)(null),u=(0,m.useRef)(null);bL(l,u,[i.children,a]),(0,m.useEffect)(()=>{if(a&&s!==null&&u.current){let e=u.current.rows[s];e&&(e.scrollIntoView({behavior:`smooth`,block:`center`}),e.classList.add(`bg-neutral/40`,`dark:bg-neutral-dark/40`),e.style.transition=`background-color 0.3s ease-in-out`)}},[a,s]),(0,m.useEffect)(()=>{a||c(null)},[a]);let d=e=>{if(n){let t=e.target.closest(`tr`);t?.closest(`tbody`)&&(c(t.rowIndex),o(!0))}r?.(e)};return(0,v.jsxs)(`div`,{className:`group relative`,children:[n&&(0,v.jsx)(gL,{setIsModalOpen:o}),(0,v.jsx)(ex,{isRollable:t,className:`max-w-full overflow-x-auto rounded-2xl bg-background text-left [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,children:(0,v.jsx)(`table`,{ref:l,className:B(`w-full table-auto overflow-hidden`,n&&`[&_tbody_tr:hover]:bg-neutral/40 [&_tbody_tr:hover]:dark:bg-neutral-dark/40 [&_tbody_tr]:cursor-pointer [&_tbody_tr]:transition-colors`,e),onClick:d,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&d(e)},...i})}),(0,v.jsx)(mL,{isOpen:a,onClose:()=>o(!1),size:uL.XL,hasCloseButton:!0,isScrollable:!0,children:a?(0,v.jsx)(`div`,{className:`grid`,children:(0,v.jsx)(`table`,{ref:u,className:B(`min-w-full max-w-full table-auto text-left`,e),...i})}):(0,v.jsx)(v.Fragment,{})})]})},SL=e=>(0,v.jsx)(Kb,{isClickable:!0,className:`text-text`,...e}),CL=e=>(0,v.jsx)(qb,{isClickable:!0,className:`mt-16 text-text`,...e}),wL=e=>(0,v.jsx)(Jb,{isClickable:!0,className:`mt-5 text-text`,...e}),TL=e=>(0,v.jsx)(Yb,{isClickable:!0,className:`mt-3 text-text`,...e}),EL=e=>(0,v.jsx)(Xb,{isClickable:!0,className:`mt-3 text-text`,...e}),DL=e=>(0,v.jsx)(Zb,{isClickable:!0,className:`mt-3 text-text`,...e}),OL=e=>(0,v.jsx)(`strong`,{className:`text-text`,...e}),kL=(0,m.memo)(({className:e,children:t,isDarkMode:n,...r})=>{let i=String(t??``).replace(/\n$/,``);if(!e)return(0,v.jsx)(`code`,{className:`rounded-md border border-neutral/30 bg-card/60 box-decoration-clone px-1.5 py-0.5 font-mono text-sm`,children:i.replace(/&(?:amp;)?#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10)))});let a=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return(0,v.jsx)(ZT,{...r,language:a,showHeader:!0,isDarkMode:n,children:i})},(e,t)=>e.children===t.children&&e.className===t.className&&e.isDarkMode===t.isDarkMode),AL=e=>function(t){return(0,v.jsx)(kL,{...t,isDarkMode:e})},jL=({className:e,...t})=>(0,v.jsx)(`blockquote`,{className:B(`mt-5 gap-3 border-card border-l-4 pl-5 text-neutral [&_strong]:text-neutral`,e),...t}),ML=({className:e,...t})=>(0,v.jsx)(`ul`,{className:B(`mt-5 flex list-disc flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),NL=({className:e,...t})=>(0,v.jsx)(`ol`,{className:B(`mt-5 flex list-decimal flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),PL=({className:e,alt:t,src:n,...r})=>(0,v.jsx)(`img`,{...r,alt:t??``,loading:`lazy`,className:B(`max-h-[80vh] max-w-full rounded-md`,e),src:n?.includes(`github.com`)?n?.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`):n}),FL=e=>t=>(0,v.jsx)(ud,{isExternalLink:t.href?.startsWith(`http`),underlined:!0,locale:e,label:``,color:`text`,...t}),IL={h1:SL,h2:CL,h3:wL,h4:TL,h5:EL,h6:DL,strong:OL,blockquote:jL,ul:ML,ol:NL,img:PL,pre:e=>(0,v.jsx)(v.Fragment,{children:e.children}),table:e=>(0,v.jsx)(xL,{isRollable:!0,displayModal:!0,...e}),th:({className:e,...t})=>(0,v.jsx)(`th`,{className:B(`border-neutral border-b bg-neutral/10 p-4`,e),...t}),tr:({className:e,...t})=>(0,v.jsx)(`tr`,{className:B(`hover:/10 hover:bg-neutral/10`,e),...t}),td:({className:e,...t})=>(0,v.jsx)(`td`,{className:B(`border-neutral-500/50 border-b p-4`,e),...t}),hr:({className:e,...t})=>(0,v.jsx)(`hr`,{className:B(`mx-6 mt-16 text-neutral`,e),...t}),Tabs:e=>(0,v.jsx)(lE,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:lE.Item,Columns:({className:e,...t})=>(0,v.jsx)(`div`,{className:B(`flex gap-4 max-md:flex-col`,e),...t}),Column:({className:e,...t})=>(0,v.jsx)(`div`,{className:B(`flex-1`,e),...t})},LL=(e,t)=>({...IL,code:AL(e),a:FL(t)}),RL=({children:e,isDarkMode:t=!1,locale:n,forceBlock:r,preserveFrontmatter:i,tagfilter:a,components:o,wrapper:s})=>(0,v.jsx)(HT,{children:(0,v.jsx)(aE,{children:br(e,{components:{...LL(t,n),...o},wrapper:s,forceBlock:r,preserveFrontmatter:i,tagfilter:a})})}),zL={key:`navigation-view`,content:{nodeType:`translation`,translation:{en:{tsxNotEditable:`React node is not editable`,goToField:{label:`Go to field`},addNewElement:{label:`Click to add element`,text:`Add new element`},removeElement:{label:`Click to remove element`,text:`Remove element`},addNewEnumeration:{label:`Click to add enumeration`,text:`Add new enumeration`},removeEnumeration:{label:`Click to remove enumeration`,text:`Remove enumeration`},addNewCondition:{label:`Click to add condition`,text:`Add new condition`}},"en-GB":{tsxNotEditable:`React node is not editable`,goToField:{label:`Go to field`},addNewElement:{label:`Click to add element`,text:`Add new element`},removeElement:{label:`Click to remove element`,text:`Remove element`},addNewEnumeration:{label:`Click to add enumeration`,text:`Add new enumeration`},removeEnumeration:{label:`Click to remove enumeration`,text:`Remove enumeration`},addNewCondition:{label:`Click to add condition`,text:`Add new condition`}},fr:{tsxNotEditable:`Node React non éditable`,goToField:{label:`Aller au champ`},addNewElement:{label:`Cliquez pour ajouter un élément`,text:`Ajouter un nouvel élément`},removeElement:{label:`Cliquez pour supprimer un élément`,text:`Supprimer l’élément`},addNewEnumeration:{label:`Cliquez pour ajouter une énumération`,text:`Ajouter une nouvelle énumération`},removeEnumeration:{label:`Cliquez pour supprimer une énumération`,text:`Supprimer l’énumération`},addNewCondition:{label:`Cliquez pour ajouter une condition`,text:`Ajouter une nouvelle condition`}},es:{tsxNotEditable:`Nodo React no editable`,goToField:{label:`Ir al campo`},addNewElement:{label:`Haga clic para agregar un elemento`,text:`Agregar nuevo elemento`},removeElement:{label:`Haga clic para eliminar un elemento`,text:`Eliminar elemento`},addNewEnumeration:{label:`Haga clic para agregar una enumeración`,text:`Agregar nueva enumeración`},removeEnumeration:{label:`Haga clic para eliminar una enumeración`,text:`Eliminar enumeración`},addNewCondition:{label:`Haga clic para agregar una condición`,text:`Agregar nueva condición`}},de:{tsxNotEditable:`React-Knoten ist nicht bearbeitbar`,goToField:{label:`Zum Feld gehen`},addNewElement:{label:`Klicken Sie, um ein Element hinzuzufügen`,text:`Neues Element hinzufügen`},removeElement:{label:`Klicken Sie, um ein Element zu entfernen`,text:`Element entfernen`},addNewEnumeration:{label:`Klicken Sie, um eine Aufzählung hinzuzufügen`,text:`Neue Aufzählung hinzufügen`},removeEnumeration:{label:`Klicken Sie, um eine Aufzählung zu entfernen`,text:`Aufzählung entfernen`},addNewCondition:{label:`Klicken Sie, um eine Bedingung hinzuzufügen`,text:`Neue Bedingung hinzufügen`}},ja:{tsxNotEditable:`編集できないReactノードです`,goToField:{label:`フィールドに移動`},addNewElement:{label:`要素を追加するにはクリック`,text:`新しい要素を追加`},removeElement:{label:`要素を削除するにはクリック`,text:`要素を削除`},addNewEnumeration:{label:`列挙を追加するにはクリック`,text:`新しい列挙を追加`},removeEnumeration:{label:`列挙を削除するにはクリック`,text:`列挙を削除`},addNewCondition:{label:`条件を追加するにはクリック`,text:`新しい条件を追加`}},ko:{tsxNotEditable:`편집할 수 없는 React 노드입니다`,goToField:{label:`필드로 이동`},addNewElement:{label:`요소를 추가하려면 클릭하세요`,text:`새 요소 추가`},removeElement:{label:`요소를 제거하려면 클릭하세요`,text:`요소 제거`},addNewEnumeration:{label:`열거를 추가하려면 클릭하세요`,text:`새 목록 추가`},removeEnumeration:{label:`목록을 제거하려면 클릭하세요`,text:`목록 제거`},addNewCondition:{label:`조건을 추가하려면 클릭하세요`,text:`새 조건 추가`}},zh:{tsxNotEditable:`不可编辑的 React 节点`,goToField:{label:`转到字段`},addNewElement:{label:`点击添加元素`,text:`添加新元素`},removeElement:{label:`点击删除元素`,text:`删除元素`},addNewEnumeration:{label:`点击添加枚举`,text:`添加新枚举`},removeEnumeration:{label:`点击删除枚举`,text:`删除枚举`},addNewCondition:{label:`点击添加条件`,text:`添加新条件`}},it:{tsxNotEditable:`Node React non modificabile`,goToField:{label:`Vai al campo`},addNewElement:{label:`Clicca per aggiungere un elemento`,text:`Aggiungi nuovo elemento`},removeElement:{label:`Clicca per rimuovere un elemento`,text:`Rimuovi elemento`},addNewEnumeration:{label:`Clicca per aggiungere un enumerazione`,text:`Aggiungi nuova enumerazione`},removeEnumeration:{label:`Clicca per rimuovere un'enumerazione`,text:`Rimuovi enumerazione`},addNewCondition:{label:`Clicca per aggiungere una condizione`,text:`Aggiungi nuova condizione`}},pt:{tsxNotEditable:`Nó React não editável`,goToField:{label:`Ir para o campo`},addNewElement:{label:`Clique para adicionar um elemento`,text:`Adicionar novo elemento`},removeElement:{label:`Clique para remover um elemento`,text:`Remover elemento`},addNewEnumeration:{label:`Clique para adicionar uma enumeração`,text:`Adicionar nova enumeração`},removeEnumeration:{label:`Clique para remover uma enumeração`,text:`Remover enumeração`},addNewCondition:{label:`Clique para adicionar uma condição`,text:`Adicionar nova condição`}},hi:{tsxNotEditable:`सम्पादित न करने योग्य React नोड`,goToField:{label:`फ़ील्ड पर जाएं`},addNewElement:{label:`तत्व जोड़ने के लिए क्लिक करें`,text:`नया तत्व जोड़ें`},removeElement:{label:`तत्व निकालने के लिए क्लिक करें`,text:`तत्व निकालें`},addNewEnumeration:{label:`सूची जोड़ने के लिए क्लिक करें`,text:`नया सूची जोड़ें`},removeEnumeration:{label:`सूची निकालने के लिए क्लिक करें`,text:`सूची निकालें`},addNewCondition:{label:`शर्ते जोड़ने के लिए क्लिक करें`,text:`नया शर्ते जोड़ें`}},ar:{tsxNotEditable:`عقدة React غير قابلة للتحرير`,goToField:{label:`اذهب إلى الحقل`},addNewElement:{label:`انقر لإضافة عنصر`,text:`أضف عنصرًا جديدًا`},removeElement:{label:`انقر لإزالة عنصر`,text:`إزالة عنصر`},addNewEnumeration:{label:`انقر لإضافة تعداد`,text:`أضف تعدادًا جديدًا`},removeEnumeration:{label:`انقر لإزالة تعداد`,text:`إزالة تعداد`},addNewCondition:{label:`انقر لإضافة شرط`,text:`أضف شرطًا جديدًا`}},ru:{tsxNotEditable:`React-узел не редактируемый`,goToField:{label:`Перейти к полю`},addNewElement:{label:`Нажмите, чтобы добавить элемент`,text:`Добавить новый элемент`},removeElement:{label:`Нажмите, чтобы удалить элемент`,text:`Удалить элемент`},addNewEnumeration:{label:`Нажмите, чтобы добавить перечисление`,text:`Добавить новое перечисление`},removeEnumeration:{label:`Нажмите, чтобы удалить перечисление`,text:`Удалить перечисление`},addNewCondition:{label:`Нажмите, чтобы добавить условие`,text:`Добавить новое условие`}}}},localIds:[`navigation-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs`]},BL=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},VL=new class extends BL{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},HL={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},UL=new class{#e=HL;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function WL(e){setTimeout(e,0)}var GL=typeof window>`u`||`Deno`in globalThis;function KL(){}function qL(e,t){return typeof e==`function`?e(t):e}function JL(e){return typeof e==`number`&&e>=0&&e!==1/0}function YL(e,t){return Math.max(e+(t||0)-Date.now(),0)}function XL(e,t){return typeof e==`function`?e(t):e}function ZL(e,t){return typeof e==`function`?e(t):e}function QL(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==eR(o,t.options))return!1}else if(!nR(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function $L(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(tR(t.options.mutationKey)!==tR(a))return!1}else if(!nR(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function eR(e,t){return(t?.queryKeyHashFn||tR)(e)}function tR(e){return JSON.stringify(e,(e,t)=>sR(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function nR(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>nR(e[n],t[n])):!1}var rR=Object.prototype.hasOwnProperty;function iR(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=oR(e)&&oR(t);if(!r&&!(sR(e)&&sR(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:rR.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=iR(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function aR(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function oR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function sR(e){if(!cR(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!cR(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function cR(e){return Object.prototype.toString.call(e)===`[object Object]`}function lR(e){return new Promise(t=>{UL.setTimeout(t,e)})}function uR(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:iR(e,t)}function dR(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function fR(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var pR=Symbol();function mR(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===pR?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function hR(e,t){return typeof e==`function`?e(...t):!!e}function gR(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var _R=(()=>{let e=()=>GL;return{isServer(){return e()},setIsServer(t){e=t}}})();function vR(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var yR=WL;function bR(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=yR,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var xR=bR(),SR=new class extends BL{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function CR(e){return Math.min(1e3*2**e,3e4)}function wR(e){return(e??`online`)===`online`?SR.isOnline():!0}var TR=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function ER(e){let t=!1,n=0,r,i=vR(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new TR(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>VL.isFocused()&&(e.networkMode===`always`||SR.isOnline())&&e.canRun(),u=()=>wR(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(_R.isServer()?0:3),o=e.retryDelay??CR,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),lR(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var DR=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),JL(this.gcTime)&&(this.#e=UL.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_R.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(UL.clearTimeout(this.#e),void 0)}},OR=class extends DR{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=jR(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=jR(this.options);e.data!==void 0&&(this.setState(AR(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=uR(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(KL).catch(KL):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>ZL(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pR||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>XL(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!YL(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=mR(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=ER({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof TR&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof TR){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...kR(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...AR(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),xR.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function kR(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:wR(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function AR(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function jR(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var MR=class extends BL{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=vR(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),PR(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return FR(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return FR(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof ZL(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!aR(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&IR(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||ZL(this.options.enabled,this.#t)!==ZL(t.enabled,this.#t)||XL(this.options.staleTime,this.#t)!==XL(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||ZL(this.options.enabled,this.#t)!==ZL(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return RR(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(KL)),t}#g(){this.#b();let e=XL(this.options.staleTime,this.#t);if(_R.isServer()||this.#r.isStale||!JL(e))return;let t=YL(this.#r.dataUpdatedAt,e)+1;this.#d=UL.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(_R.isServer()||ZL(this.options.enabled,this.#t)===!1||!JL(this.#p)||this.#p===0)&&(this.#f=UL.setInterval(()=>{(this.options.refetchIntervalInBackground||VL.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(UL.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(UL.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&PR(e,t),o=i&&IR(e,n,t,r);(a||o)&&(l={...l,...kR(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=uR(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=uR(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:LR(e,t),refetch:this.refetch,promise:this.#o,isEnabled:ZL(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=vR())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!aR(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){xR.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function NR(e,t){return ZL(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function PR(e,t){return NR(e,t)||e.state.data!==void 0&&FR(e,t,t.refetchOnMount)}function FR(e,t,n){if(ZL(t.enabled,e)!==!1&&XL(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&LR(e,t)}return!1}function IR(e,t,n,r){return(e!==t||ZL(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&LR(e,n)}function LR(e,t){return ZL(t.enabled,e)!==!1&&e.isStaleByTime(XL(t.staleTime,e))}function RR(e,t){return!aR(e.getCurrentResult(),t)}function zR(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{gR(e,()=>t.signal,()=>n=!0)},u=mR(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?fR:dR;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?VR:BR,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:BR(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function BR(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function VR(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var HR=class extends DR{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||UR(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=ER({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),xR.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function UR(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var WR=class extends BL{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new HR({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=GR(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=GR(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=GR(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=GR(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){xR.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>$L(t,e))}findAll(e={}){return this.getAll().filter(t=>$L(e,t))}notify(e){xR.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return xR.batch(()=>Promise.all(e.map(e=>e.continue().catch(KL))))}};function GR(e){return e.options.scope?.id}var KR=class extends BL{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),aR(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&tR(t.mutationKey)!==tR(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??UR();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){xR.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},qR=class extends BL{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??eR(r,t),a=this.get(i);return a||(a=new OR({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){xR.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>QL(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>QL(e,t)):t}notify(e){xR.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){xR.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){xR.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},JR=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new qR,this.#t=e.mutationCache||new WR,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=VL.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=SR.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(XL(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=qL(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return xR.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;xR.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return xR.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=xR.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(KL).catch(KL)}invalidateQueries(e,t={}){return xR.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=xR.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(KL)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(KL)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(XL(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(KL).catch(KL)}fetchInfiniteQuery(e){return e.behavior=zR(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(KL).catch(KL)}ensureInfiniteQueryData(e){return e.behavior=zR(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return SR.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(tR(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{nR(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(tR(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{nR(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=eR(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===pR&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},YR=m.createContext(void 0),XR=e=>{let t=m.useContext(YR);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},ZR=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,v.jsx)(YR.Provider,{value:e,children:t})),QR=m.createContext(!1),$R=()=>m.useContext(QR);QR.Provider;function ez(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var tz=m.createContext(ez()),nz=()=>m.useContext(tz),rz=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?hR(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},iz=e=>{m.useEffect(()=>{e.clearReset()},[e])},az=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||hR(n,[e.error,r])),oz=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},sz=(e,t)=>e.isLoading&&e.isFetching&&!t,cz=(e,t)=>e?.suspense&&t.isPending,lz=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function uz(e,t,n){let r=$R(),i=nz(),a=XR(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,oz(o),rz(o,i,s),iz(i);let c=!a.getQueryCache().get(o.queryHash),[l]=m.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(e=>{let t=d?l.subscribe(xR.batchCalls(e)):KL;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),m.useEffect(()=>{l.setOptions(o)},[o,l]),cz(o,u))throw lz(o,l,i);if(az({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!_R.isServer()&&sz(u,r)&&(c?lz(o,l,i):s?.promise)?.catch(KL).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function dz(e,t){return uz(e,MR,t)}function fz(e,t){let n=XR(t),[r]=m.useState(()=>new KR(n,e));m.useEffect(()=>{r.setOptions(e)},[r,e]);let i=m.useSyncExternalStore(m.useCallback(e=>r.subscribe(xR.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=m.useCallback((e,t)=>{r.mutate(e,t).catch(KL)},[r]);if(i.error&&hR(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var pz={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},mz=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),hz=e=>e.reduce((e,t)=>{let n=e??{},r=mz(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),Y=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=hz([pz,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=hz([pz.headers,...t.map(e=>e.headers)]),s=hz(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=hz(t.map(e=>e.body));i=o?.[`Content-Type`]===`application/x-www-form-urlencoded`?new URLSearchParams(e).toString():JSON.stringify(e)}Object.entries(s).length>0&&(r=`?${new URLSearchParams(s).toString()}`);let l={...a,headers:o,body:i,signal:n},u=`${e}${r}`,d=await fetch(u,l);if(!d.ok){let e=await d.json();throw Error(JSON.stringify(e.error)??`An error occurred`)}return await d.json()},gz=(e={},t)=>{let n=`${t.editor.backendURL}/api/ai`;return{customQuery:async(t,r={})=>await Y(n,e,r,{method:`POST`,body:t}),translateJSON:async(t,r={})=>await Y(`${n}/translate/json`,e,r,{method:`POST`,body:t}),auditContentDeclaration:async(t,r={})=>await Y(`${n}/audit/dictionary`,e,r,{method:`POST`,body:t}),auditContentDeclarationField:async(t,r={})=>await Y(`${n}/audit/dictionary/field`,e,r,{method:`POST`,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await Y(`${n}/audit/dictionary/metadata`,e,r,{method:`POST`,body:t}),auditTag:async(t,r={})=>await Y(`${n}/audit/tag`,e,r,{method:`POST`,body:t}),askDocQuestion:async(t,r={})=>{if(!t)return;let{onMessage:i,onDone:a,...o}=t,s=new AbortController;try{let t=await fetch(`${n}/ask`,{method:`POST`,headers:{"Content-Type":`application/json`,...e.headers,...r.headers},body:JSON.stringify({...o,...e.body,...r.body}),signal:s.signal,credentials:`include`});if(!t.ok){let e=`An error occurred`;try{let n=await t.json(),r=n.error??n;e=JSON.stringify(r)??`An error occurred`}catch{try{let n=await t.text();n&&(e=n)}catch{}}throw Error(e)}let c=t.body?.getReader();if(!c)throw Error(`No reader available`);let l=new TextDecoder,u=``;for(;;){let{done:e,value:t}=await c.read();if(e)break;u+=l.decode(t,{stream:!0});let n=u.split(`
|
|
180
|
+
`);u=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));t.chunk&&i?.(t.chunk),t.done&&t.response&&a?.(t.response)}catch(e){console.error(`Failed to parse SSE data:`,e)}}}catch(e){throw console.error(`Error in askDocQuestion:`,e),e}},autocomplete:async(t,r={})=>await Y(`${n}/autocomplete`,e,r,{method:`POST`,body:t}),getDiscussions:async(t,r={})=>await Y(`${n}/discussions`,e,r,{method:`GET`,params:t})}},_z=(e={},t)=>{let n=`${t.editor.backendURL}/api/scan`;return{discoverUrls:async(t,r={})=>await Y(`${n}/recursive/discover`,e,r,{method:`GET`,params:t}),scanUrl:async(t,r={})=>{if(!t?.url)return;let{url:i,onMessage:a,onDone:o}=t,s=`${n}?${new URLSearchParams({url:i}).toString()}`,c=await fetch(s,{method:`GET`,headers:{Accept:`text/event-stream`,...e.headers,...r.headers},credentials:`include`,signal:r.signal});if(!c.ok){let e=`An error occurred`;try{let t=await c.json();e=JSON.stringify(t.error)??e}catch{try{let t=await c.text();t&&(e=t)}catch{}}throw Error(e)}let l=c.body?.getReader();if(!l)throw Error(`No reader available`);let u=new TextDecoder,d=``;for(;;){let{done:e,value:t}=await l.read();if(e)break;d+=u.decode(t,{stream:!0});let n=d.split(`
|
|
181
|
+
`);d=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));a?.(t)}catch{}}o?.()},startRecursiveAudit:async(t,r={})=>await Y(`${n}/recursive/start`,e,r,{method:`POST`,params:t?.url?{url:t.url}:void 0,body:t?.urls===void 0?void 0:{urls:t.urls}}),getRecursiveAuditStatus:async(t,r={})=>await Y(`${n}/recursive/${t?.jobId}`,e,r,{method:`GET`}),cancelRecursiveAudit:async(t,r={})=>await Y(`${n}/recursive/${t?.jobId}/cancel`,e,r,{method:`POST`}),pauseRecursiveAudit:async(t,r={})=>await Y(`${n}/recursive/${t?.jobId}/pause`,e,r,{method:`POST`}),resumeRecursiveAudit:async(t,r={})=>await Y(`${n}/recursive/${t?.jobId}/resume`,e,r,{method:`POST`})}},vz=(e={},t)=>{let n=`${t.editor.backendURL}/api/bitbucket`;return{getAuthUrl:async(t,r={})=>await Y(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await Y(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await Y(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await Y(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await Y(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a,path:o}})}},yz=(e={},t)=>{let n=`${t.editor.backendURL}/api/dictionary`;return{getDictionaries:async(t,r={})=>await Y(n,e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await Y(`${n}/keys`,e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await Y(`${n}/update`,e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await Y(`${n}/${t}`,e,i,{params:r?{version:r.toString()}:void 0}),pushDictionaries:async(t,r={})=>await Y(`${n}`,e,r,{method:`PATCH`,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await Y(`${n}`,e,r,{method:`POST`,body:t}),updateDictionary:async(t,r={})=>await Y(`${n}/${t.id}`,e,r,{method:`PUT`,body:t}),deleteDictionary:async(t,r={})=>await Y(`${n}/${t}`,e,r,{method:`DELETE`})}},bz=(e={},t)=>{let n=t.editor.editorURL;if(!n)throw Error(`Editor URL is not defined in the Intlayer configuration.`);let r=`${n}/api`;return{getDictionaries:async(t={})=>(await Y(`${r}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await Y(`${r}/config`,e,t)).data,writeDictionary:async(t,n={})=>await Y(`${r}/dictionary`,e,n,{method:`POST`,body:t})}},xz=(e={},t)=>{let n=`${t.editor.backendURL}/api/github`;return{getAuthUrl:async(t,r={})=>await Y(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await Y(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await Y(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await Y(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await Y(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a,path:o}})}},Sz=(e={},t)=>{let n=`${t.editor.backendURL}/api/gitlab`;return{getAuthUrl:async(t,r,i={})=>await Y(`${n}/auth-url`,e,i,{params:{redirectUri:t,...r&&{instanceUrl:r}}}),authenticate:async(t,r,i,a={})=>await Y(`${n}/auth`,e,a,{method:`POST`,body:{code:t,redirectUri:r,instanceUrl:i}}),getProjects:async(t,r,i={})=>await Y(`${n}/projects`,e,i,{params:{...t&&{token:t},...r&&{instanceUrl:r}}}),checkIntlayerConfig:async(t,r,i=`main`,a,o={})=>await Y(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,...a&&{instanceUrl:a}}}),getConfigFile:async(t,r,i=`main`,a=`intlayer.config.ts`,o,s={})=>await Y(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,path:a,...o&&{instanceUrl:o}}})}},Cz=(e={},t)=>{let n=`${t.editor.backendURL}/api/newsletter`;return{subscribeToNewsletter:async(t,r={})=>await Y(`${n}/subscribe`,e,r,{method:`POST`,body:t}),unsubscribeFromNewsletter:async(t,r={})=>await Y(`${n}/unsubscribe`,e,r,{method:`POST`,body:t}),getNewsletterStatus:async(t={})=>await Y(`${n}/status`,e,t,{method:`GET`})}},wz=e=>{let t=e.editor.backendURL,{clientId:n,clientSecret:r}=e.editor;return{getOAuth2AccessToken:async(e={})=>await Y(`${t}/oauth2/token`,{},e,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:{grant_type:`client_credentials`,client_id:n,client_secret:r}})}},Tz=(e={},t)=>{let n=`${t.editor.backendURL}/api/organization`;return{getOrganizations:async(t,r={})=>await Y(n,e,r,{cache:`no-store`,params:t}),getOrganization:async(t,r={})=>await Y(`${n}/${String(t)}`,e,r),addOrganization:async(t,r={})=>await Y(n,e,r,{method:`POST`,body:t}),addOrganizationMember:async(t,r={})=>Y(`${n}/member`,e,r,{method:`POST`,body:t}),updateOrganization:async(t,r={})=>Y(n,e,r,{method:`PUT`,body:t}),updateOrganizationMembers:async(t,r={})=>Y(`${n}/members`,e,r,{method:`PUT`,body:t}),updateOrganizationMembersById:async(t,r,i={})=>Y(`${n}/${t}/members`,e,i,{method:`PUT`,body:r}),deleteOrganization:async(t={})=>await Y(n,e,t,{method:`DELETE`}),selectOrganization:async(t,r={})=>await Y(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectOrganization:async(t={})=>await Y(`${n}/logout`,e,t,{method:`POST`})}},Ez=(e={},t)=>{let n=`${t.editor.backendURL}/api/project`;return{getProjects:async(t,r={})=>await Y(n,e,r,{cache:`no-store`,params:t}),addProject:async(t,r={})=>await Y(`${n}`,e,r,{method:`POST`,body:t}),updateProject:async(t,r={})=>await Y(`${n}`,e,r,{method:`PUT`,body:t}),updateProjectMembers:async(t,r={})=>await Y(`${n}/members`,e,r,{method:`PUT`,body:t}),pushProjectConfiguration:async(t,r={})=>await Y(`${n}/configuration`,e,r,{method:`PUT`,body:t}),deleteProject:async(t={})=>await Y(`${n}`,e,t,{method:`DELETE`}),selectProject:async(t,r={})=>await Y(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectProject:async(t={})=>await Y(`${n}/logout`,e,t,{method:`POST`}),addNewAccessKey:async(t,r={})=>await Y(`${n}/access_key`,e,r,{method:`POST`,body:t}),deleteAccessKey:async(t,r={})=>await Y(`${n}/access_key`,e,r,{method:`DELETE`,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await Y(`${n}/access_key`,e,r,{method:`PATCH`,body:{clientId:t}}),triggerBuild:async(t={})=>await Y(`${n}/build`,e,t,{method:`POST`}),triggerWebhook:async(t,r={})=>await Y(`${n}/webhook`,e,r,{method:`POST`,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await Y(`${n}/ci`,e,t,{method:`GET`}),pushCIConfig:async(t={})=>await Y(`${n}/ci`,e,t,{method:`POST`})}},Dz=(e={},t)=>{let n=`${t.editor.backendURL}/api/search`;return{searchDoc:async(t,r={})=>await Y(`${n}/doc`,e,r,{method:`GET`,params:t})}},Oz=(e={},t=g)=>{let n=`${t?.editor?.backendURL}/api/stripe`;return{getPricing:async(t,r={})=>await Y(`${n}/pricing`,e,r,{method:`POST`,body:t}),getSubscription:async(t,r={})=>await Y(`${n}/create-subscription`,e,r,{method:`POST`,body:t}),cancelSubscription:async(t={})=>await Y(`${n}/cancel-subscription`,e,t,{method:`POST`})}},kz=(e={},t)=>{let n=`${t.editor.backendURL}/api/tag`;return{getTags:async(t,r={})=>await Y(n,e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await Y(`${n}`,e,r,{method:`POST`,body:t}),updateTag:async(t,r,i={})=>await Y(`${n}/${t}`,e,i,{method:`PUT`,body:r}),deleteTag:async(t,r={})=>await Y(`${n}/${t}`,e,r,{method:`DELETE`})}},Az=(e={},t)=>{let n=`${t.editor.backendURL}/api/user`;return{createUser:async(t,r={})=>await Y(`${n}/`,e,r,{method:`POST`,body:t}),getUsers:async(t,r={})=>await Y(n,e,r,{cache:`no-store`,params:t}),getUserById:async(t,r={})=>await Y(`${n}/${t}`,e,r,{cache:`no-store`}),getUserByAccount:async(t,r,i={})=>await Y(`${n}/account/${r}/${t}`,e,i,{cache:`no-store`}),getUserByEmail:async(t,r={})=>await Y(`${n}/email/${t}`,e,r,{cache:`no-store`}),updateUser:async(t,r={})=>await Y(`${n}`,e,r,{method:`PUT`,body:t}),deleteUser:async(t,r={})=>await Y(`${n}/${t}`,e,r,{method:`DELETE`}),getVerifyEmailStatusURL:e=>`${n}/verify-email-status/${String(e)}`}},jz=(e={},t)=>{let n=`${t.editor.backendURL}/api/showcase-project`;return{getShowcaseProjects:async(t,r={})=>{let i={};return t?.page!==void 0&&(i.page=String(t.page)),t?.pageSize!==void 0&&(i.pageSize=String(t.pageSize)),t?.search!==void 0&&(i.search=t.search),t?.isOpenSource!==void 0&&(i.isOpenSource=String(t.isOpenSource)),t?.selectedUseCases?.length&&(i.selectedUseCases=t.selectedUseCases),await Y(n,e,r,{method:`GET`,params:i})},getShowcaseProjectById:async(t,r={})=>await Y(`${n}/${t}`,e,r,{method:`GET`}),getOtherShowcaseProjects:async(t,r={})=>{let i={excludeId:t.excludeId};return t.limit!==void 0&&(i.limit=String(t.limit)),await Y(`${n}/others`,e,r,{method:`GET`,params:i})},submitShowcaseProject:async(t,r={})=>await Y(`${n}/submit`,e,r,{method:`POST`,body:t}),toggleShowcaseUpvote:async(t,r={})=>await Y(`${n}/upvote`,e,r,{method:`POST`,body:t}),toggleShowcaseDownvote:async(t,r={})=>await Y(`${n}/downvote`,e,r,{method:`POST`,body:t}),deleteShowcaseProject:async(t,r={})=>await Y(`${n}/${t}`,e,r,{method:`DELETE`}),updateShowcaseProject:async(t,r,i={})=>await Y(`${n}/${t}`,e,i,{method:`PATCH`,body:r})}};function Mz(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Nz(e,t,n=`.`,r){if(!Mz(t))return Nz(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:Mz(a)&&Mz(i[t])?i[t]=Nz(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function Pz(e){return(...t)=>t.reduce((t,n)=>Nz(t,n,``,e),{})}var Fz=Pz(),Iz=(e={},t)=>{let n=Fz(t??{},g);return{organization:Tz(e,n),project:Ez(e,n),user:Az(e,n),oAuth:wz(n),dictionary:yz(e,n),stripe:Oz(e,n),ai:gz(e,n),audit:_z(e,n),tag:kz(e,n),search:Dz(e,n),editor:bz(e,n),newsletter:Cz(e,n),github:xz(e,n),gitlab:Sz(e,n),bitbucket:vz(e,n),showcaseProject:jz(e,n)}},Lz=e=>{let t=Lv(),n=e??t??g,{data:r}=dz({queryKey:[`oAuth2AccessToken`],queryFn:wz(n).getOAuth2AccessToken,enabled:!!(n.editor.clientId&&n.editor.clientSecret),staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1});return{oAuth2AccessToken:r?.data}};function Rz(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var zz=Rz({CHALLENGE_NOT_FOUND:`Challenge not found`,YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:`You are not allowed to register this passkey`,FAILED_TO_VERIFY_REGISTRATION:`Failed to verify registration`,PASSKEY_NOT_FOUND:`Passkey not found`,AUTHENTICATION_FAILED:`Authentication failed`,UNABLE_TO_CREATE_SESSION:`Unable to create session`,FAILED_TO_UPDATE_PASSKEY:`Failed to update passkey`});function Bz(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function Vz(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function Hz(){return Uz.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var Uz={stubThis:e=>e};function Wz(e){let{id:t}=e;return{...e,id:Vz(t),transports:e.transports}}function Gz(e){return e===`localhost`||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}var Kz=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),Object.defineProperty(this,`code`,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=t}};function qz({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Kz({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new Kz({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new Kz({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new Kz({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new Kz({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new Kz({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new Kz({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new Kz({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!Gz(t))return new Kz({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new Kz({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new Kz({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new Kz({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}var Jz=new class{constructor(){Object.defineProperty(this,`controller`,{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},Yz=[`cross-platform`,`platform`];function Xz(e){if(e&&!(Yz.indexOf(e)<0))return e}async function Zz(e){!e.optionsJSON&&e.challenge&&(console.warn(`startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useAutoRegister:n=!1}=e;if(!Hz())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:Vz(t.challenge),user:{...t.user,id:Vz(t.user.id)},excludeCredentials:t.excludeCredentials?.map(Wz)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=Jz.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw qz({error:e,options:i})}if(!a)throw Error(`Registration was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;typeof c.getTransports==`function`&&(u=c.getTransports());let d;if(typeof c.getPublicKeyAlgorithm==`function`)try{d=c.getPublicKeyAlgorithm()}catch(e){Qz(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=Bz(e))}catch(e){Qz(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=Bz(c.getAuthenticatorData())}catch(e){Qz(`getAuthenticatorData()`,e)}return{id:o,rawId:Bz(s),response:{attestationObject:Bz(c.attestationObject),clientDataJSON:Bz(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:Xz(a.authenticatorAttachment)}}function Qz(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function $z(){if(!Hz())return eB.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?eB.stubThis(new Promise(e=>e(!1))):eB.stubThis(e.isConditionalMediationAvailable())}var eB={stubThis:e=>e};function tB({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Kz({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new Kz({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!Gz(t))return new Kz({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new Kz({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new Kz({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function nB(e){!e.optionsJSON&&e.challenge&&(console.warn(`startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!Hz())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(Wz));let a={...t,challenge:Vz(t.challenge),allowCredentials:i},o={};if(n){if(!await $z())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation=`conditional`,a.allowCredentials=[]}o.publicKey=a,o.signal=Jz.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw tB({error:e,options:o})}if(!s)throw Error(`Authentication was not completed`);let{id:c,rawId:l,response:u,type:d}=s,f;return u.userHandle&&(f=Bz(u.userHandle)),{id:c,rawId:Bz(l),response:{authenticatorData:Bz(u.authenticatorData),clientDataJSON:Bz(u.clientDataJSON),signature:Bz(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:Xz(s.authenticatorAttachment)}}var rB=Symbol.for(`better-auth:broadcast-channel`),iB=()=>Math.floor(Date.now()/1e3),aB=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>`u`))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:iB()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event!==`session`||!t?.data||this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function oB(e=`better-auth.message`){return globalThis[rB]||(globalThis[rB]=new aB(e)),globalThis[rB]}var sB=Symbol.for(`better-auth:focus-manager`),cB=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function lB(){return globalThis[sB]||(globalThis[sB]=new cB),globalThis[sB]}var uB=Symbol.for(`better-auth:online-manager`),dB=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function fB(){return globalThis[uB]||(globalThis[uB]=new dB),globalThis[uB]}var pB={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},mB=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,hB={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},gB=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function _B(e){return e instanceof Date&&!isNaN(e.getTime())}function vB(e){let t=gB.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return _B(f)?f:null}function yB(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim();if(o.length>0&&o[0]===`"`&&o.endsWith(`"`)&&!o.slice(1,-1).includes(`"`))return o.slice(1,-1);let s=o.toLowerCase();if(s.length<=9&&s in hB)return hB[s];if(!mB.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(pB).some(([e,t])=>{let n=t.test(o);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error(`[better-json] Potential prototype pollution attempt detected`);try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(a&&typeof t==`string`){let e=vB(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function bB(e,t={strict:!0}){return yB(e,t)}var xB=[],SB=0,CB=4,wB=0,TB=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=SB+CB;t<xB.length;)xB[t]===e?xB.splice(t,CB):t+=CB;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){wB++;let i=!xB.length;for(let i of t)xB.push(i,n.value,e,r);if(i){for(SB=0;SB<xB.length;SB+=CB)xB[SB](xB[SB+1],xB[SB+2],xB[SB+3]);xB.length=0}},off(){},set(e){let t=n.value;t!==e&&(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},EB=5,DB=6,OB=10,kB=(e,t,n,r)=>(e.events=e.events||{},e.events[n+OB]||(e.events[n+OB]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);r.splice(i,1),r.length||(delete e.events[n],e.events[n+OB](),delete e.events[n+OB])}),AB=1e3,jB=(e,t)=>kB(e,n=>{let r=t(n);r&&e.events[DB].push(r)},EB,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;return e.events[DB]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[DB])t();e.events[DB]=[]}},AB)},()=>{e.listen=n,e.off=r}}),MB=()=>typeof window>`u`,NB=(e,t,n,r)=>{let i=TB({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>a(e)}),a=async e=>new Promise(a=>{let o=typeof r==`function`?r({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):r;n(t,{...o,query:{...o?.query,...e?.query},async onSuccess(e){i.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onSuccess?.(e)},async onError(e){let{request:t}=e,n=typeof t.retry==`number`?t.retry:t.retry?.attempts,r=t.retryAttempt||0;if(n&&r<n)return;let a=e.error.status===401;i.set({error:e.error,data:a?null:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onError?.(e)},async onRequest(e){let t=i.get();i.set({isPending:t.data===null,data:t.data,error:null,isRefetching:!0,refetch:i.value.refetch}),await o?.onRequest?.(e)}}).catch(e=>{i.set({error:e,data:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{a(void 0)})});e=Array.isArray(e)?e:[e];let o=!1;for(let t of e)t.subscribe(async()=>{MB()||(o?await a():jB(i,()=>{let e=setTimeout(async()=>{o||=(await a(),!0)},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},PB=()=>Math.floor(Date.now()/1e3),FB=5;function IB(e){let{sessionAtom:t,sessionSignal:n,$fetch:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={lastSync:0,lastSessionRequest:0,cachedSession:void 0},l=()=>s||fB().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=PB(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=PB(),r(`/get-session`).then(async e=>{let a=e.data,o=e.error||null;if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});a=e.data,o=e.error||null}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=PB(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(PB()-c.lastSessionRequest<FB)return;c.lastSessionRequest=PB()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=PB(),n.set(!n.get()))},d=e=>{oB().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{t.get()?.data&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=oB().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=lB().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=fB().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),oB().setup(),lB().setup(),fB().setup()},cleanup:()=>{c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.lastSync=0,c.lastSessionRequest=0,c.cachedSession=void 0},triggerRefetch:u,broadcastSessionUpdate:d}}var LB=Object.create(null),RB=e=>({}),zB=new Proxy(LB,{get(e,t){return RB()[t]??LB[t]},has(e,t){return t in RB()||t in LB},set(e,t,n){let r=RB(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=RB(!0);return delete n[t],!0},ownKeys(){let e=RB(!0);return Object.keys(e)}});function BB(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return BB(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return BB(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return BB(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return BB(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return BB(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return BB(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return BB(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});var VB=1,HB=4,UB=8,WB=24,GB={eterm:HB,cons25:HB,console:HB,cygwin:HB,dtterm:HB,gnome:HB,hurd:HB,jfbterm:HB,konsole:HB,kterm:HB,mlterm:HB,mosh:WB,putty:HB,st:HB,"rxvt-unicode-24bit":WB,terminator:WB,"xterm-kitty":WB},KB=new Map(Object.entries({APPVEYOR:UB,BUILDKITE:UB,CIRCLECI:WB,DRONE:UB,GITEA_ACTIONS:WB,GITHUB_ACTIONS:WB,GITLAB_CI:UB,TRAVIS:UB})),qB=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function JB(){if(BB(`FORCE_COLOR`)!==void 0)switch(BB(`FORCE_COLOR`)){case``:case`1`:case`true`:return HB;case`2`:return UB;case`3`:return WB;default:return VB}if(BB(`NODE_DISABLE_COLORS`)!==void 0&&BB(`NODE_DISABLE_COLORS`)!==``||BB(`NO_COLOR`)!==void 0&&BB(`NO_COLOR`)!==``||BB(`TERM`)===`dumb`)return VB;if(BB(`TMUX`))return WB;if(`TF_BUILD`in zB&&`AGENT_NAME`in zB)return HB;if(`CI`in zB){for(let{0:e,1:t}of KB)if(e in zB)return t;return BB(`CI_NAME`)===`codeship`?UB:VB}if(`TEAMCITY_VERSION`in zB)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(BB(`TEAMCITY_VERSION`))===null?VB:HB;switch(BB(`TERM_PROGRAM`)){case`iTerm.app`:return!BB(`TERM_PROGRAM_VERSION`)||/^[0-2]\./.exec(BB(`TERM_PROGRAM_VERSION`))!==null?UB:WB;case`HyperTerm`:case`MacTerm`:return WB;case`Apple_Terminal`:return UB}if(BB(`COLORTERM`)===`truecolor`||BB(`COLORTERM`)===`24bit`)return WB;if(BB(`TERM`)){if(/truecolor/.exec(BB(`TERM`))!==null)return WB;if(/^xterm-256/.exec(BB(`TERM`))!==null)return UB;let e=BB(`TERM`).toLowerCase();if(GB[e])return GB[e];if(qB.some(t=>t.exec(e)!==null))return HB}return BB(`COLORTERM`)?HB:VB}var YB={reset:`\x1B[0m`,bright:`\x1B[1m`,dim:`\x1B[2m`,undim:`\x1B[22m`,underscore:`\x1B[4m`,blink:`\x1B[5m`,reverse:`\x1B[7m`,hidden:`\x1B[8m`,fg:{black:`\x1B[30m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,magenta:`\x1B[35m`,cyan:`\x1B[36m`,white:`\x1B[37m`},bg:{black:`\x1B[40m`,red:`\x1B[41m`,green:`\x1B[42m`,yellow:`\x1B[43m`,blue:`\x1B[44m`,magenta:`\x1B[45m`,cyan:`\x1B[46m`,white:`\x1B[47m`}},XB=[`debug`,`info`,`success`,`warn`,`error`];function ZB(e,t){return XB.indexOf(t)>=XB.indexOf(e)}var QB={info:YB.fg.blue,success:YB.fg.green,warn:YB.fg.yellow,error:YB.fg.red,debug:YB.fg.magenta},$B=(e,t,n)=>{let r=new Date().toISOString();return n?`${YB.dim}${r}${YB.reset} ${QB[e]}${e.toUpperCase()}${YB.reset} ${YB.bright}[Better Auth]:${YB.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`};(e=>{let t=e?.disabled!==!0,n=e?.level??`warn`,r=e?.disableColors===void 0?JB()!==1:!e.disableColors,i=(i,a,o=[])=>{if(!t||!ZB(n,i))return;let s=$B(i,a,r);if(!e||typeof e.log!=`function`){i===`error`?console.error(s,...o):i===`warn`?console.warn(s,...o):console.log(s,...o);return}e.log(i===`success`?`info`:i,a,...o)};return{...Object.fromEntries(XB.map(e=>[e,(...[t,...n])=>i(e,t,n)])),get level(){return n}}})(),Rz({USER_NOT_FOUND:`User not found`,FAILED_TO_CREATE_USER:`Failed to create user`,FAILED_TO_CREATE_SESSION:`Failed to create session`,FAILED_TO_UPDATE_USER:`Failed to update user`,FAILED_TO_GET_SESSION:`Failed to get session`,INVALID_PASSWORD:`Invalid password`,INVALID_EMAIL:`Invalid email`,INVALID_EMAIL_OR_PASSWORD:`Invalid email or password`,INVALID_USER:`Invalid user`,SOCIAL_ACCOUNT_ALREADY_LINKED:`Social account already linked`,PROVIDER_NOT_FOUND:`Provider not found`,INVALID_TOKEN:`Invalid token`,TOKEN_EXPIRED:`Token expired`,ID_TOKEN_NOT_SUPPORTED:`id_token not supported`,FAILED_TO_GET_USER_INFO:`Failed to get user info`,USER_EMAIL_NOT_FOUND:`User email not found`,EMAIL_NOT_VERIFIED:`Email not verified`,PASSWORD_TOO_SHORT:`Password too short`,PASSWORD_TOO_LONG:`Password too long`,USER_ALREADY_EXISTS:`User already exists.`,USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL:`User already exists. Use another email.`,EMAIL_CAN_NOT_BE_UPDATED:`Email can not be updated`,CREDENTIAL_ACCOUNT_NOT_FOUND:`Credential account not found`,SESSION_EXPIRED:`Session expired. Re-authenticate to perform this action.`,FAILED_TO_UNLINK_LAST_ACCOUNT:`You can't unlink your last account`,ACCOUNT_NOT_FOUND:`Account not found`,USER_ALREADY_HAS_PASSWORD:`User already has a password. Provide that to delete the account.`,CROSS_SITE_NAVIGATION_LOGIN_BLOCKED:`Cross-site navigation login blocked. This request appears to be a CSRF attack.`,VERIFICATION_EMAIL_NOT_ENABLED:`Verification email isn't enabled`,EMAIL_ALREADY_VERIFIED:`Email is already verified`,EMAIL_MISMATCH:`Email mismatch`,SESSION_NOT_FRESH:`Session is not fresh`,LINKED_ACCOUNT_ALREADY_EXISTS:`Linked account already exists`,INVALID_ORIGIN:`Invalid origin`,INVALID_CALLBACK_URL:`Invalid callbackURL`,INVALID_REDIRECT_URL:`Invalid redirectURL`,INVALID_ERROR_CALLBACK_URL:`Invalid errorCallbackURL`,INVALID_NEW_USER_CALLBACK_URL:`Invalid newUserCallbackURL`,MISSING_OR_NULL_ORIGIN:`Missing or null Origin`,CALLBACK_URL_REQUIRED:`callbackURL is required`,FAILED_TO_CREATE_VERIFICATION:`Unable to create verification`,FIELD_NOT_ALLOWED:`Field not allowed to be set`,ASYNC_VALIDATION_NOT_SUPPORTED:`Async validation is not supported`,VALIDATION_ERROR:`Validation Error`,MISSING_FIELD:`Field is required`,METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED:`POST method requires deferSessionRefresh to be enabled in session config`,BODY_MUST_BE_AN_OBJECT:`Body must be an object`,PASSWORD_ALREADY_SET:`User already has a password set`});function eV(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function tV(e){let t=e.split(`
|
|
182
|
+
at `);return t.length<=1?e:(t.splice(1,1),t.join(`
|
|
183
|
+
at `))}function nV(e,t){class n extends e{#e;constructor(...e){if(eV()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=tV(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(n.prototype,`constructor`,{get(){return t},enumerable:!1,configurable:!0}),n}var rV={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};nV(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:rV[e]){super(t?.message,t?.cause?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name=`APIError`,this.status=e,this.headers=n,this.statusCode=r,this.body=t}},Error);var iV=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function aV(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new iV(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function oV(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new iV(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof iV?t:new iV(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function sV(e,t=`/api/auth`){if(oV(e),aV(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function cV(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function lV(e,t,n,r,i){if(e)return sV(e,t);if(r!==!1){let e=zB.BETTER_AUTH_URL||zB.NEXT_PUBLIC_BETTER_AUTH_URL||zB.PUBLIC_BETTER_AUTH_URL||zB.NUXT_PUBLIC_BETTER_AUTH_URL||zB.NUXT_PUBLIC_AUTH_URL||(zB.BASE_URL===`/`?void 0:zB.BASE_URL);if(e)return sV(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&cV(o,`proto`)&&cV(a,`host`))try{return sV(`${o}://${a}`,t)}catch{}if(n){let e=uV(n.url);if(!e)throw new iV(`Could not get origin from request. Please provide a valid base URL.`);return sV(e,t)}if(typeof window<`u`&&window.location)return sV(window.location.origin,t)}function uV(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var dV={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function fV(e,t){let n=TB(!1),r=NB(n,`/get-session`,e,{method:`GET`}),i=()=>{};return jB(r,()=>{let a=IB({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),i=a.broadcastSessionUpdate,()=>{a.cleanup()}}),{session:r,$sessionSignal:n,broadcastSessionUpdate:e=>i(e)}}var pV=Object.defineProperty,mV=Object.defineProperties,hV=Object.getOwnPropertyDescriptors,gV=Object.getOwnPropertySymbols,_V=Object.prototype.hasOwnProperty,vV=Object.prototype.propertyIsEnumerable,yV=(e,t,n)=>t in e?pV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bV=(e,t)=>{for(var n in t||={})_V.call(t,n)&&yV(e,n,t[n]);if(gV)for(var n of gV(t))vV.call(t,n)&&yV(e,n,t[n]);return e},xV=(e,t)=>mV(e,hV(t)),SV=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},CV=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let r=await i.init?.call(i,e.toString(),t);n=r.options||n,e=r.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},wV=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},TV=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function EV(e){if(typeof e==`number`)return new wV({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new wV(e);case`exponential`:return new TV(e);default:throw Error(`Invalid retry strategy`)}}var DV=async e=>{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},OV=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function kV(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return OV.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function AV(e){try{return JSON.parse(e),!0}catch{return!1}}function jV(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function MV(e){try{return JSON.parse(e)}catch{return e}}function NV(e){return typeof e==`function`}function PV(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&NV(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&NV(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function FV(e){let t=new Headers(e?.headers),n=await DV(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=IV(e?.body);n&&t.set(`content-type`,n)}return t}function IV(e){return jV(e)?`application/json`:null}function LV(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(jV(e.body)&&!t.has(`content-type`)){for(let[t,n]of Object.entries(e?.body))n instanceof Date&&(e.body[t]=n.toISOString());return JSON.stringify(e.body)}return t.has(`content-type`)&&t.get(`content-type`)===`application/x-www-form-urlencoded`&&jV(e.body)?new URLSearchParams(e.body).toString():e.body}function RV(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return HV.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function zV(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var BV=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function VV(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new BV(n.issues);return n.value}var HV=[`get`,`post`,`put`,`patch`,`delete`],UV=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){let r=e.plugins?.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1)?.schema||e.schema;if(r){let e=t;r.config?.prefix&&e.startsWith(r.config.prefix)&&(e=e.replace(r.config.prefix,``),r.config.baseURL&&(t=t.replace(r.config.prefix,r.config.baseURL))),r.config?.baseURL&&e.startsWith(r.config.baseURL)&&(e=e.replace(r.config.baseURL,``));let i=r.schema[e];if(i){let e=xV(bV({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=xV(bV({},e),{body:i.input?await VV(i.input,n?.body):n?.body,params:i.params?await VV(i.params,n?.params):n?.params,query:i.query?await VV(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),WV=e=>{async function t(t,n){let r=xV(bV(bV({},e),n),{plugins:[...e?.plugins||[],UV(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await KV(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await KV(t,r)}return t};function GV(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``;if(e.startsWith(`@`)){let t=e.toString().split(`@`)[1].split(`/`)[0];HV.includes(t)&&(e=e.replace(`@${t}/`,`/`))}a.endsWith(`/`)||(a+=`/`);let[o,s]=e.replace(a,``).split(`?`),c=new URLSearchParams(s);for(let[e,t]of Object.entries(i||{})){if(t==null)continue;let n;if(typeof t==`string`)n=t;else if(Array.isArray(t)){for(let n of t)c.append(e,n);continue}else n=JSON.stringify(t);c.set(e,n)}if(r)if(Array.isArray(r)){let e=o.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];o=o.replace(n,e)}}else for(let[e,t]of Object.entries(r))o=o.replace(`:${e}`,String(t));o=o.split(`/`).map(encodeURIComponent).join(`/`),o.startsWith(`/`)&&(o=o.slice(1));let l=c.toString();return l=l.length>0?`?${l}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${o}${l}`,a):`${a}${o}${l}`}var KV=async(e,t)=>{let{hooks:n,url:r,options:i}=await CV(e,t),a=PV(i),o=new AbortController,s=i.signal??o.signal,c=GV(r,i),l=LV(i),u=await FV(i),d=RV(r,i),f=xV(bV({},i),{url:c,headers:u,body:l,method:d,signal:s});for(let e of n.onRequest)if(e){let t=await e(f);typeof t==`object`&&t&&(f=t)}(`pipeTo`in f&&typeof f.pipeTo==`function`||typeof t?.body?.pipe==`function`)&&(`duplex`in f||(f.duplex=`half`));let{clearTimeout:p}=zV(i,o),m=await a(f.url,f);p();let h={response:m,request:f};for(let e of n.onResponse)if(e){let n=await e(xV(bV({},h),{response:t?.hookOptions?.cloneResponse?m.clone():m}));n instanceof Response?m=n:typeof n==`object`&&n&&(m=n.response)}if(m.ok){if(f.method===`HEAD`)return{data:``,error:null};let e=kV(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??MV)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await VV(f.output,r.data));for(let e of n.onSuccess)e&&await e(xV(bV({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??MV,_=await m.text(),v=AV(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:xV(bV({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(xV(bV({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=EV(t.retry),i=t.retryAttempt??0;if(await r.shouldAttemptRetry(i,m)){for(let e of n.onRetry)e&&await e(h);let a=r.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await KV(e,xV(bV({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new SV(m.status,m.statusText,v?y:_);return{data:null,error:xV(bV({},y),{status:m.status,statusText:m.statusText})}},qV=e=>{if(typeof process>`u`)return;let t=e??`/api/auth`;if({}.NEXT_PUBLIC_AUTH_URL)return{}.NEXT_PUBLIC_AUTH_URL;if(typeof window>`u`){if({}.NEXTAUTH_URL)try{return{}.NEXTAUTH_URL}catch{}if({}.VERCEL_URL)try{let e={}.VERCEL_URL.startsWith(`http`)?``:`https://`;return`${new URL(`${e}${{}.VERCEL_URL}`).origin}${t}`}catch{}}},JV=(e,t)=>{let n=`credentials`in Request.prototype,r=lV(e?.baseURL,e?.basePath,void 0,t)??qV(e?.basePath)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=WV({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?bB(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[dV],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=fV(d,e),h=e?.plugins||[],g={},_={$sessionSignal:f,session:p},v={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},y=[{signal:`$sessionSignal`,matcher(e){return e===`/sign-out`||e===`/update-user`||e===`/update-session`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/change-email`},callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of h)e.getAtoms&&Object.assign(_,e.getAtoms?.(d)),e.pathMethods&&Object.assign(v,e.pathMethods),e.atomListeners&&y.push(...e.atomListeners);let b={notify:e=>{_[e].set(!_[e].get())},listen:(e,t)=>{_[e].subscribe(t)},atoms:_};for(let t of h)t.getActions&&(g=Fz(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function YV(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function XV(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function ZV(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||YV(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=XV(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10),e.callback?.(c)}}})}})}return a()}function QV(e){return e.charAt(0).toUpperCase()+e.slice(1)}function $V(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,atomListeners:a,$store:o}=JV(e),s={};for(let[e,t]of Object.entries(r))s[`use${QV(e)}`]=t;return ZV({...n,...s,$fetch:i,$store:o},i,t,r,a)}var eH=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(r,i)=>{let a=await e(`/passkey/generate-authenticate-options`,{method:`GET`,throw:!1});if(!a.data)return a;try{let o=await e(`/passkey/verify-authentication`,{body:{response:await nB({optionsJSON:a.data,useBrowserAutofill:r?.autoFill})},...r?.fetchOptions,...i,method:`POST`,throw:!1});return t.set(Math.random()),n.notify(`$sessionSignal`),o}catch(e){return console.error(`[Better Auth] Error verifying passkey`,e),{data:null,error:{code:`AUTH_CANCELLED`,message:`auth cancelled`,status:400,statusText:`BAD_REQUEST`}}}}},passkey:{addPasskey:async(n,r)=>{let i=await e(`/passkey/generate-register-options`,{method:`GET`,query:{...n?.authenticatorAttachment&&{authenticatorAttachment:n.authenticatorAttachment},...n?.name&&{name:n.name}},throw:!1});if(!i.data)return i;try{let a=await Zz({optionsJSON:i.data,useAutoRegister:n?.useAutoRegister}),o=await e(`/passkey/verify-registration`,{...n?.fetchOptions,...r,body:{response:a,name:n?.name},method:`POST`,throw:!1});return o.data&&t.set(Math.random()),o}catch(e){return e instanceof Kz?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:`previously registered`,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:`registration cancelled`,status:400,statusText:`BAD_REQUEST`}}:{data:null,error:{code:e.code,message:e.message,status:400,statusText:`BAD_REQUEST`}}:{data:null,error:{code:`UNKNOWN_ERROR`,message:e instanceof Error?e.message:`unknown error`,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),tH=()=>{let e=TB();return{id:`passkey`,$InferServerPlugin:{},getActions:(t,n)=>eH(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:NB(e,`/passkey/list-user-passkeys`,t,{method:`GET`}),$listPasskeys:e}},pathMethods:{"/passkey/register":`POST`,"/passkey/authenticate":`POST`},atomListeners:[{matcher(e){return e===`/passkey/verify-registration`||e===`/passkey/delete-passkey`||e===`/passkey/update-passkey`||e===`/sign-out`},signal:`$listPasskeys`},{matcher:e=>e===`/passkey/verify-authentication`,signal:`$sessionSignal`}],$ERROR_CODES:zz}},nH=e=>({id:`sso-client`,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}});Rz({FAILED_TO_CREATE_USER:`Failed to create user`,USER_ALREADY_EXISTS:`User already exists.`,USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL:`User already exists. Use another email.`,YOU_CANNOT_BAN_YOURSELF:`You cannot ban yourself`,YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:`You are not allowed to change users role`,YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:`You are not allowed to create users`,YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:`You are not allowed to list users`,YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:`You are not allowed to list users sessions`,YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:`You are not allowed to ban users`,YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:`You are not allowed to impersonate users`,YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:`You are not allowed to revoke users sessions`,YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:`You are not allowed to delete users`,YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:`You are not allowed to set users password`,BANNED_USER:`You have been banned from this application`,YOU_ARE_NOT_ALLOWED_TO_GET_USER:`You are not allowed to get user`,NO_DATA_TO_UPDATE:`No data to update`,YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS:`You are not allowed to update users`,YOU_CANNOT_REMOVE_YOURSELF:`You cannot remove yourself`,YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE:`You are not allowed to set a non-existent role value`,YOU_CANNOT_IMPERSONATE_ADMINS:`You cannot impersonate admins`,INVALID_ROLE_TYPE:`Invalid role type`});function rH(e){return{authorize(t,n=`AND`){let r=!1;for(let[i,a]of Object.entries(t)){let t=e[i];if(!t)return{success:!1,error:`You are not allowed to access resource: ${i}`};if(Array.isArray(a))r=a.every(e=>t.includes(e));else if(typeof a==`object`){let e=a;r=e.connector===`OR`?e.actions.some(e=>t.includes(e)):e.actions.every(e=>t.includes(e))}else throw new iV(`Invalid access control request`);if(r&&n===`OR`)return{success:r};if(!r&&n===`AND`)return{success:!1,error:`unauthorized to access resource "${i}"`}}return r?{success:r}:{success:!1,error:`Not authorized`}},statements:e}}function iH(e){return{newRole(e){return rH(e)},statements:e}}var aH=iH({user:[`create`,`list`,`set-role`,`ban`,`impersonate`,`impersonate-admins`,`delete`,`set-password`,`get`,`update`],session:[`list`,`revoke`,`delete`]});aH.newRole({user:[`create`,`list`,`set-role`,`ban`,`impersonate`,`delete`,`set-password`,`get`,`update`],session:[`list`,`revoke`,`delete`]}),aH.newRole({user:[],session:[]}),Rz({INVALID_EMAIL_FORMAT:`Email was not generated in a valid format`,FAILED_TO_CREATE_USER:`Failed to create user`,COULD_NOT_CREATE_SESSION:`Could not create session`,ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:`Anonymous users cannot sign in again anonymously`,FAILED_TO_DELETE_ANONYMOUS_USER:`Failed to delete anonymous user`,USER_IS_NOT_ANONYMOUS:`User is not anonymous`,DELETE_ANONYMOUS_USER_DISABLED:`Deleting anonymous users is disabled`}),Rz({OTP_EXPIRED:`OTP expired`,INVALID_OTP:`Invalid OTP`,TOO_MANY_ATTEMPTS:`Too many attempts`}),Rz({INVALID_OAUTH_CONFIGURATION:`Invalid OAuth configuration`,TOKEN_URL_NOT_FOUND:`Invalid OAuth configuration. Token URL not found.`,PROVIDER_CONFIG_NOT_FOUND:`No config found for provider`,PROVIDER_ID_REQUIRED:`Provider ID is required`,INVALID_OAUTH_CONFIG:`Invalid OAuth configuration.`,SESSION_REQUIRED:`Session is required`,ISSUER_MISMATCH:`OAuth issuer mismatch. The authorization server issuer does not match the expected value (RFC 9207).`,ISSUER_MISSING:`OAuth issuer parameter missing. The authorization server did not include the required iss parameter (RFC 9207).`});var oH=()=>({id:`magic-link`,$InferServerPlugin:{}});Rz({INVALID_SESSION_TOKEN:`Invalid session token`}),Rz({YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:`You are not allowed to create a new organization`,YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:`You have reached the maximum number of organizations`,ORGANIZATION_ALREADY_EXISTS:`Organization already exists`,ORGANIZATION_SLUG_ALREADY_TAKEN:`Organization slug already taken`,ORGANIZATION_NOT_FOUND:`Organization not found`,USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:`User is not a member of the organization`,YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:`You are not allowed to update this organization`,YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:`You are not allowed to delete this organization`,NO_ACTIVE_ORGANIZATION:`No active organization`,USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:`User is already a member of this organization`,MEMBER_NOT_FOUND:`Member not found`,ROLE_NOT_FOUND:`Role not found`,YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:`You are not allowed to create a new team`,TEAM_ALREADY_EXISTS:`Team already exists`,TEAM_NOT_FOUND:`Team not found`,YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:`You cannot leave the organization as the only owner`,YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER:`You cannot leave the organization without an owner`,YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:`You are not allowed to delete this member`,YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:`You are not allowed to invite users to this organization`,USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:`User is already invited to this organization`,INVITATION_NOT_FOUND:`Invitation not found`,YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:`You are not the recipient of the invitation`,EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION:`Email verification required before accepting or rejecting invitation`,YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:`You are not allowed to cancel this invitation`,INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:`Inviter is no longer a member of the organization`,YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:`You are not allowed to invite a user with this role`,FAILED_TO_RETRIEVE_INVITATION:`Failed to retrieve invitation`,YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:`You have reached the maximum number of teams`,UNABLE_TO_REMOVE_LAST_TEAM:`Unable to remove last team`,YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:`You are not allowed to update this member`,ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:`Organization membership limit reached`,YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:`You are not allowed to create teams in this organization`,YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:`You are not allowed to delete teams in this organization`,YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:`You are not allowed to update this team`,YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:`You are not allowed to delete this team`,INVITATION_LIMIT_REACHED:`Invitation limit reached`,TEAM_MEMBER_LIMIT_REACHED:`Team member limit reached`,USER_IS_NOT_A_MEMBER_OF_THE_TEAM:`User is not a member of the team`,YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM:`You are not allowed to list the members of this team`,YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM:`You do not have an active team`,YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER:`You are not allowed to create a new member`,YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER:`You are not allowed to remove a team member`,YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION:`You are not allowed to access this organization as an owner`,YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION:`You are not a member of this organization`,MISSING_AC_INSTANCE:`Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information`,YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE:`You must be in an organization to create a role`,YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE:`You are not allowed to create a role`,YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE:`You are not allowed to update a role`,YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE:`You are not allowed to delete a role`,YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE:`You are not allowed to read a role`,YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE:`You are not allowed to list a role`,YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE:`You are not allowed to get a role`,TOO_MANY_ROLES:`This organization has too many roles`,INVALID_RESOURCE:`The provided permission includes an invalid resource`,ROLE_NAME_IS_ALREADY_TAKEN:`That role name is already taken`,CANNOT_DELETE_A_PRE_DEFINED_ROLE:`Cannot delete a pre-defined role`,ROLE_IS_ASSIGNED_TO_MEMBERS:`Cannot delete a role that is assigned to members. Please reassign the members to a different role first`});var sH=iH({organization:[`update`,`delete`],member:[`create`,`update`,`delete`],invitation:[`create`,`cancel`],team:[`create`,`update`,`delete`],ac:[`create`,`read`,`update`,`delete`]});sH.newRole({organization:[`update`],invitation:[`create`,`cancel`],member:[`create`,`update`,`delete`],team:[`create`,`update`,`delete`],ac:[`create`,`read`,`update`,`delete`]}),sH.newRole({organization:[`update`,`delete`],member:[`create`,`update`,`delete`],invitation:[`create`,`cancel`],team:[`create`,`update`,`delete`],ac:[`create`,`read`,`update`,`delete`]}),sH.newRole({organization:[],member:[],invitation:[],team:[],ac:[`read`]}),Rz({INVALID_PHONE_NUMBER:`Invalid phone number`,PHONE_NUMBER_EXIST:`Phone number already exists`,PHONE_NUMBER_NOT_EXIST:`phone number isn't registered`,INVALID_PHONE_NUMBER_OR_PASSWORD:`Invalid phone number or password`,UNEXPECTED_ERROR:`Unexpected error`,OTP_NOT_FOUND:`OTP not found`,OTP_EXPIRED:`OTP expired`,INVALID_OTP:`Invalid OTP`,PHONE_NUMBER_NOT_VERIFIED:`Phone number not verified`,PHONE_NUMBER_CANNOT_BE_UPDATED:`Phone number cannot be updated`,SEND_OTP_NOT_IMPLEMENTED:`sendOTP not implemented`,TOO_MANY_ATTEMPTS:`Too many attempts`});var cH=Rz({OTP_NOT_ENABLED:`OTP not enabled`,OTP_HAS_EXPIRED:`OTP has expired`,TOTP_NOT_ENABLED:`TOTP not enabled`,TWO_FACTOR_NOT_ENABLED:`Two factor isn't enabled`,BACKUP_CODES_NOT_ENABLED:`Backup codes aren't enabled`,INVALID_BACKUP_CODE:`Invalid backup code`,INVALID_CODE:`Invalid code`,TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:`Too many attempts. Please request a new code.`,INVALID_TWO_FACTOR_COOKIE:`Invalid two factor cookie`}),lH=e=>({id:`two-factor`,$InferServerPlugin:{},atomListeners:[{matcher:e=>e.startsWith(`/two-factor/`),signal:`$sessionSignal`}],pathMethods:{"/two-factor/disable":`POST`,"/two-factor/enable":`POST`,"/two-factor/send-otp":`POST`,"/two-factor/generate-backup-codes":`POST`,"/two-factor/get-totp-uri":`POST`,"/two-factor/verify-totp":`POST`,"/two-factor/verify-otp":`POST`,"/two-factor/verify-backup-code":`POST`},fetchPlugins:[{id:`two-factor`,name:`two-factor`,hooks:{async onSuccess(t){t.data?.twoFactorRedirect&&e?.onTwoFactorRedirect&&await e.onTwoFactorRedirect()}}}],$ERROR_CODES:cH});Rz({INVALID_USERNAME_OR_PASSWORD:`Invalid username or password`,EMAIL_NOT_VERIFIED:`Email not verified`,UNEXPECTED_ERROR:`Unexpected error`,USERNAME_IS_ALREADY_TAKEN:`Username is already taken. Please try another.`,USERNAME_TOO_SHORT:`Username is too short`,USERNAME_TOO_LONG:`Username is too long`,INVALID_USERNAME:`Username is invalid`,INVALID_DISPLAY_USERNAME:`Display username is invalid`});var uH=e=>$V({baseURL:e,withCredentials:!0,plugins:[lH({onTwoFactorRedirect:()=>{let e=new URLSearchParams(window.location.search).get(`redirect_url`),t=e?`/auth/2fa?redirect_url=${encodeURIComponent(e)}`:`/auth/2fa`;window.location.href=t}}),tH(),oH(),nH()]}),dH=e=>{let t=e?.editor?.backendURL??g?.editor?.backendURL;t||(t=zn,console.dir({intlayerConfig:e,configuration:g},{depth:null}),console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=uH(t);return{getAuthClient:()=>n,signInEmail:async(...e)=>n.signIn.email(...e),signUpEmail:async(...e)=>n.signUp.email(...e),signOut:async(...e)=>n.signOut(...e),signInSocial:async(...e)=>n.signIn.social(...e),linkSocial:async(...e)=>n.linkSocial(...e),changePasswordSession:async(...e)=>n.changePassword(...e),requestPasswordResetSession:async(...e)=>n.requestPasswordReset(...e),resetPassword:async(...e)=>n.resetPassword(...e),verifyEmailSession:async(...e)=>n.verifyEmail(...e),getSession:async(...e)=>n.getSession(...e),forgetPassword:async(...e)=>n.requestPasswordReset(...e),sendVerificationEmail:async(...e)=>n.sendVerificationEmail(...e),changeEmail:async(...e)=>n.changeEmail(...e),deleteUser:async(...e)=>n.deleteUser(...e),revokeSession:async(...e)=>n.revokeSession(...e),revokeSessions:async(...e)=>n.revokeSessions(...e),revokeOtherSessions:async(...e)=>n.revokeOtherSessions(...e),listAccounts:async(...e)=>n.listAccounts(...e),unlinkAccount:async(...e)=>n.unlinkAccount(...e),refreshToken:async(...e)=>n.refreshToken(...e),getAccessToken:async(...e)=>n.getAccessToken(...e),accountInfo:async(...e)=>n.accountInfo(...e),updateUser:async(...e)=>n.updateUser(...e),listSessions:async(...e)=>n.listSessions(...e),enableTwoFactor:async(...e)=>n.twoFactor.enable(...e),disableTwoFactor:async(...e)=>n.twoFactor.disable(...e),verifyTotp:async(...e)=>n.twoFactor.verifyTotp(...e),verifyBackupCode:async(...e)=>n.twoFactor.verifyBackupCode(...e),addPasskey:async(...e)=>n.passkey.addPasskey(...e),signInPasskey:async(...e)=>n.signIn.passkey(...e),deletePasskey:async(...e)=>n.passkey.deletePasskey(...e),listPasskeys:async()=>n.$fetch(`/passkey/list-user-passkeys`,{method:`GET`}),signInMagicLink:async(...e)=>n.signIn.magicLink(...e),signInSSO:async(...e)=>n.signIn.sso(...e),registerSSO:async(...e)=>n.sso.register(...e),listSSOProviders:async()=>{},deleteSSOProvider:async e=>{}}},fH=(e,t)=>{let n=Lv(),r=t??n??g,i=XR(),{data:a,isFetched:o,refetch:s}=dz({queryKey:[`session`],queryFn:async()=>(await dH(r).getSession()).data,staleTime:60*1e3,gcTime:300*1e3,refetchOnMount:!0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,enabled:!e}),c=a??(o?null:void 0),l=e=>{i.setQueryData([`session`],e)},u=async()=>(await s()).data;return{session:c,fetchSession:u,revalidateSession:u,setSession:l}},pH=({session:e,intlayerConfiguration:t}={})=>{let{session:n,fetchSession:r,revalidateSession:i,setSession:a}=fH(e,t),{oAuth2AccessToken:o}=Lz(t);return{session:n,fetchSession:r,setSession:a,revalidateSession:i,oAuth2AccessToken:o,isAuthenticated:!!(n?.user||o)}},mH=e=>{let t=Lv(),{oAuth2AccessToken:n}=pH();return Iz({...n&&{headers:{Authorization:`Bearer ${n.accessToken}`}},...e?.options??{}},e?.intlayerConfiguration??t)},hH=e=>{let t=Lv();return dH(e?.intlayerConfiguration??t)},gH=({requireUser:e,requireProject:t,requireOrganization:n})=>{let{oAuth2AccessToken:r,session:i}=pH({intlayerConfiguration:Lv()}),a=i?i.user:r?.user,o=i?i.organization:r?.organization,s=i?i.project:r?.project;return{enable:(e?!!a:!0)&&(t?!!s:!0)&&(n?!!o:!0)}},_H=e=>{let{requireUser:t,requireProject:n,requireOrganization:r,...i}=e,{enable:a}=gH({requireUser:t,requireProject:n,requireOrganization:r});return dz({enabled:i?.enabled===!1?!1:a,...i})},vH=()=>{let e=hH();return fz({mutationKey:[`logout`],mutationFn:()=>e.signOut(),meta:{resetQueries:[[`session`],[`users`],[`organizations`],[`projects`],[`dictionaries`],[`tags`]]}})},yH=(e,t)=>{let n=mH();return _H({queryKey:[`projects`,e],queryFn:({signal:t})=>n.project.getProjects(e,{signal:t}),requireUser:!0,requireOrganization:!0,...t})},bH=()=>{let e=mH();return fz({mutationKey:[`dictionaries`],mutationFn:t=>e.dictionary.pushDictionaries(t.dictionaries),meta:{invalidateQueries:[[`dictionaries`],[`dictionariesKeys`]]}})},xH=()=>{let e=mH();return fz({mutationKey:[`dictionaries`],mutationFn:t=>e.dictionary.deleteDictionary(t.dictionaryId),meta:{invalidateQueries:[[`dictionaries`],[`dictionariesKeys`]]}})},SH=(e,t)=>{let n=mH();return _H({queryKey:[`tags`,e],queryFn:({signal:t})=>n.tag.getTags(e,{signal:t}),requireUser:!0,requireOrganization:!0,requireProject:!0,...t})},CH=()=>{let e=mH();return fz({mutationKey:[`ai-auditContentDeclarationMetadata`],mutationFn:t=>e.ai.auditContentDeclarationMetadata(t)})},wH=()=>{let e=mH();return fz({mutationKey:[`ai-auditContentDeclarationField`],mutationFn:t=>e.ai.auditContentDeclarationField(t)})},TH=()=>{let e=mH();return dz({queryKey:[`editor`,`dictionaries`],queryFn:()=>e.editor.getDictionaries()})},EH=()=>{let e=mH();return fz({mutationKey:[`editor`,`dictionaries`],mutationFn:t=>e.editor.writeDictionary(t)})},DH=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:i,...a})=>{let[o,s]=(0,m.useState)(e),[c,l]=(0,m.useState)(0),u=o!==e,d=()=>{s(e),l(e=>e+1)},f=()=>{t(o)},p=e=>{s(e.currentTarget.value)},h=e=>{e.key===`Enter`&&!n&&g?(e.preventDefault(),f()):e.key===`Escape`&&(e.preventDefault(),d())};(0,m.useEffect)(()=>{s(e),l(e=>e+1)},[e]);let g=r?.(o)??!0;return(0,v.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[(0,v.jsx)(wd,{onChange:p,onKeyDown:h,"aria-label":`Editable input value`,"aria-describedby":u||i?`content-editor-input-actions`:void 0,"aria-invalid":!g,variant:Cd.INVISIBLE,className:`size-full`,defaultValue:e,disabled:n,...a},c),(u||i)&&(0,v.jsxs)(`div`,{id:`content-editor-input-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[u&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(Ju,{Icon:ql,label:`Save changes${g?``:` (invalid content)`}`,variant:W.HOVERABLE,color:G.TEXT,size:U.ICON_SM,className:`cursor-pointer hover:scale-110`,disabled:n||!g,onClick:f,"aria-describedby":g?void 0:`validation-error`}),(0,v.jsx)(Ju,{Icon:vu,label:`Cancel changes`,variant:W.HOVERABLE,size:U.ICON_SM,color:G.TEXT,className:`cursor-pointer hover:scale-110`,onClick:d,disabled:n})]}),i]})]},String(e))},OH=()=>{let{session:e,revalidateSession:t,setSession:n}=pH(),{mutate:r}=vH(),i=e?.user?`authenticated`:`unauthenticated`;return{isAuthenticated:i===`authenticated`,isUnauthenticated:i===`unauthenticated`,user:e?.user,revalidateSession:t,logout:async()=>{n(null),r()}}},kH=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:i,...a})=>{let{isAuthenticated:o}=OH(),[s,c]=(0,m.useState)(e),[l,u]=(0,m.useState)(0),d=s!==e,f=()=>{c(e),u(e=>e+1)},p=()=>{t(s)},h=e=>c(e.currentTarget.value??``),g=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!n&&_?(e.preventDefault(),p()):e.key===`Escape`&&(e.preventDefault(),f())};(0,m.useEffect)(()=>{c(e),u(e=>e+1)},[e]);let _=r?.(s)??!0;return(0,v.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor textarea`,children:[(0,v.jsx)(hg,{onChange:h,onKeyDown:g,variant:`invisible`,className:`size-full`,value:e,isActive:o,disabled:n,"aria-label":`Editable textarea content`,"aria-describedby":d||i?`content-editor-textarea-actions`:void 0,"aria-invalid":!_,...a},l),(d||i)&&(0,v.jsxs)(`div`,{id:`content-editor-textarea-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[d&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(Ju,{Icon:ql,label:`Save changes${_?``:` (invalid content)`}`,variant:W.HOVERABLE,color:G.TEXT,size:U.ICON_SM,className:`cursor-pointer hover:scale-110`,disabled:n||!_,onClick:p,"aria-describedby":_?void 0:`textarea-validation-error`}),(0,v.jsx)(Ju,{Icon:vu,label:`Cancel changes`,variant:W.HOVERABLE,size:U.ICON_SM,color:G.TEXT,className:`cursor-pointer hover:scale-110`,onClick:f,disabled:n})]}),i]})]},e)},AH=(e,t,n)=>{let r={...e};for(let i of Object.keys(e))i===t?(r[n]=e[t],delete r[t]):r[i]=e[i];return r},jH=e=>{let t,n;if(typeof e==`number`||!Number.isNaN(Number(e)))t=`=`,n=e.toString();else if(typeof e==`string`){let r=[`<=`,`>=`,`<`,`>`,`=`].find(t=>e.startsWith(t));r&&(t=r,n=e.slice(r.length))}return{comparator:t,numberValue:n}},MH=({value:e,onChange:t})=>{let{comparator:n,numberValue:r}=(0,m.useMemo)(()=>jH(e),[e]),[i,a]=(0,m.useState)(n??null),[o,s]=(0,m.useState)(r??null);return(0,m.useEffect)(()=>{i&&o&&(i!==n||o!==r)&&t(`${i}${o}`)},[i,n,r,o,t]),(0,v.jsxs)(`div`,{className:`flex gap-1`,children:[(0,v.jsxs)(q,{onValueChange:a,defaultValue:n,children:[(0,v.jsx)(q.Trigger,{className:`w-20`,children:(0,v.jsx)(q.Value,{placeholder:`Select a comparator`})}),(0,v.jsxs)(q.Content,{children:[(0,v.jsx)(q.Item,{value:`<`,children:`<`}),(0,v.jsx)(q.Item,{value:`<=`,children:`<=`}),(0,v.jsx)(q.Item,{value:`=`,children:`=`}),(0,v.jsx)(q.Item,{value:`>=`,children:`>=`}),(0,v.jsx)(q.Item,{value:`>`,children:`>`})]})]}),(0,v.jsx)(wd,{type:`number`,"aria-label":`Quantity`,defaultValue:o??void 0,onChange:e=>s(e.target.value),className:`min-w-4`})]})},NH=({keyPath:e,dictionary:t,...n})=>{let{editedContent:r,addEditedContent:i}=zv(),a=Lv(),{mutate:o,isPending:s}=wH();return(0,v.jsx)(kH,{variant:Cd.DEFAULT,onContentChange:n=>i(t.localId,n,e),additionalButtons:(0,v.jsx)(Ju,{Icon:_u,label:`Audit`,variant:W.HOVERABLE,size:U.ICON_SM,color:G.TEXT,className:`cursor-pointer hover:scale-110`,isLoading:s,onClick:()=>{o({fileContent:JSON.stringify({...t,...r?.[t.localId]??{}}),keyPath:e,locales:a?.internationalization.locales??[],aiOptions:{apiKey:a?.ai?.apiKey,model:a?.ai?.model,temperature:a?.ai?.temperature}},{onSuccess:n=>{if(n?.data)try{let r=n.data.fileContent;i(t.localId,r,e)}catch(e){console.error(e)}}})}}),...n})},PH=({keyPath:e,dictionary:t,...n})=>{let{addEditedContent:r}=zv();return(0,v.jsx)(DH,{variant:Cd.DEFAULT,onContentChange:n=>r(t.localId,n,e),...n})},FH=[{content:`False`,value:!1},{content:`True`,value:!0}],IH=({dictionary:e,keyPath:t,...n})=>{let{addEditedContent:r}=zv();return(0,v.jsx)(Zh,{choices:FH,value:!0,onChange:n=>r(e.localId,n,t),color:Kh.TEXT,size:Jh.SM,...n})},LH=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{locale:i,defaultLocale:a}=hr(),{selectedLocales:o,availableLocales:s}=dy(),c=e[S],l=Object.keys(c),u=s.length>o.length?o:[...new Set([...s,...l])],d=e[S];return(0,v.jsx)(`table`,{className:`w-full`,children:(0,v.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:u.map(e=>{let o=`${JSON.stringify(t)}-translation-${e}`;return(0,v.jsxs)(m.Fragment,{children:[(0,v.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,v.jsx)(`td`,{className:`flex w-full`,children:sr(e,i)})}),(0,v.jsx)(`tr`,{className:`flex`,children:(0,v.jsx)(`td`,{className:`flex w-full`,children:(0,v.jsx)(ZH,{section:d[e]??pv(d[a]),keyPath:[...t,{type:S,key:e}],dictionary:n,renderSection:r})})})]},o)})})})},RH=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{addEditedContent:i}=zv(),{addNewEnumeration:a,removeEnumeration:o}=mr(zL),s=e[C],c=Object.keys(s)[0];return(0,v.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,v.jsx)(`table`,{className:`w-full`,children:(0,v.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(e[C]).map(a=>{let l=[...t,{type:C,key:a}],u=`${JSON.stringify(t)}-enumeration-${a}`;return(0,v.jsxs)(m.Fragment,{children:[(0,v.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,v.jsx)(`td`,{className:`flex w-full`,children:(0,v.jsx)(`div`,{className:`flex flex-1`,children:(0,v.jsx)(Ju,{label:o.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:gu,onClick:()=>i(n.localId,void 0,l),children:o.text})})})}),(0,v.jsx)(`tr`,{className:`w-full p-2`,children:(0,v.jsx)(`td`,{className:`flex w-full`,children:(0,v.jsx)(MH,{value:a,onChange:r=>{let o=e[C],s=AH(o,a,r),c={...e,[C]:s};console.log(`newValue`,c),i(n.localId,c,t)}})})}),(0,v.jsx)(`tr`,{className:`block w-full`,children:(0,v.jsx)(`td`,{className:`flex w-full`,children:(0,v.jsx)(XH,{section:s[a]??pv(s[c]),keyPath:l,dictionary:n,renderSection:r})})})]},u)})})}),(0,v.jsx)(Ju,{label:a.label.value,variant:W.HOVERABLE,color:G.NEUTRAL,textAlign:Ku.LEFT,isFullWidth:!0,onClick:()=>i(n.localId,pv(s[c])??``,[...t,{type:C,key:`unknown`}]),Icon:fu,className:`m-2`,children:a.text})]})},zH=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[w];return(0,v.jsx)(`table`,{className:`w-full`,children:(0,v.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`true`,`false`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-condition-${e}`;return(0,v.jsxs)(m.Fragment,{children:[(0,v.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,v.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,v.jsx)(`tr`,{className:`block w-full`,children:(0,v.jsx)(`td`,{className:`flex w-full`,children:(0,v.jsx)(ZH,{section:i[e]??pv(i.true),keyPath:[...t,{type:w,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},BH=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[P];return(0,v.jsx)(`table`,{className:`w-full`,children:(0,v.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`male`,`female`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-gender-${e}`;return(0,v.jsxs)(m.Fragment,{children:[(0,v.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,v.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,v.jsx)(`tr`,{className:`block w-full`,children:(0,v.jsx)(`td`,{className:`flex w-full`,children:(0,v.jsx)(ZH,{section:i[e]??pv(i.male),keyPath:[...t,{type:P,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},VH=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{addEditedContent:i}=zv(),{addNewElement:a,removeElement:o}=mr(zL);return(0,v.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,v.jsx)(`table`,{className:`w-full`,children:(0,v.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:e.map((a,s)=>{let c=`${JSON.stringify(t)}-array-${s}`;return(0,v.jsxs)(m.Fragment,{children:[(0,v.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,v.jsx)(`td`,{className:`flex w-full`,children:(0,v.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,v.jsx)(`span`,{className:`text-xs`,children:String(s)}),(0,v.jsx)(Ju,{label:o.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...t,{type:O,key:s}];i(n.localId,void 0,e)},Icon:gu,children:o.text})]})})}),(0,v.jsx)(`tr`,{className:`block w-full`,children:(0,v.jsx)(`td`,{className:`flex w-full`,children:(0,v.jsx)(ZH,{section:a??pv(e[0]),keyPath:[...t,{type:O,key:s}],dictionary:n,renderSection:r})})})]},c)})})}),(0,v.jsx)(Ju,{label:a.label.value,variant:W.HOVERABLE,color:G.NEUTRAL,textAlign:Ku.LEFT,isFullWidth:!0,onClick:()=>{let r=[...t,{type:O,key:e.length}];i(n.localId,pv(e[0])??``,r,!1)},Icon:fu,children:a.text})]})},HH=({section:e,keyPath:t,dictionary:n,renderSection:r})=>(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(`table`,{className:`w-full`,children:(0,v.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(e).map(i=>{let a=[...t,{type:D,key:i}],o=e,s=Object.keys(o)[0],c=o[i]??pv(o[s]),l=`${JSON.stringify(t)}-object-${i}`;return(0,v.jsxs)(m.Fragment,{children:[(0,v.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,v.jsx)(`td`,{className:`flex w-full`,children:String(i)})}),(0,v.jsx)(`tr`,{className:`block w-full`,children:(0,v.jsx)(`td`,{className:`flex w-full`,children:(0,v.jsx)(XH,{section:c,keyPath:a,dictionary:n,renderSection:r})})})]},l)})})})}),UH=function(e){return e[e.Edit=0]=`Edit`,e[e.Preview=1]=`Preview`,e}(UH||{}),WH=function(e){return e[e.Edit=0]=`Edit`,e[e.Preview=1]=`Preview`,e}(WH||{}),GH=({section:e,keyPath:t,dictionary:n})=>{let[r,i]=(0,m.useState)(WH.Edit),a=[{content:`Edit`,value:WH.Edit},{content:`Preview`,value:WH.Preview}],o=[...t,{type:M}],s=e[M];return(0,v.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,v.jsx)(Zh,{choices:a,value:r,onChange:i,color:Kh.TEXT,size:Jh.SM,className:`ml-auto`}),(0,v.jsx)(ZH,{section:s,keyPath:o,dictionary:n,renderSection:r===WH.Preview?e=>(0,v.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e}}):void 0})]})},KH=({section:e,keyPath:t,dictionary:n,isDarkMode:r})=>{let[i,a]=(0,m.useState)(UH.Edit),o=[{content:`Edit`,value:UH.Edit},{content:`Preview`,value:UH.Preview}],s=[...t,{type:j}],c=e[j];return(0,v.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,v.jsx)(Zh,{choices:o,value:i,onChange:a,color:Kh.TEXT,size:Jh.SM,className:`ml-auto`}),(0,v.jsx)(ZH,{section:c,keyPath:s,dictionary:n,renderSection:i===UH.Preview?e=>(0,v.jsx)(RL,{isDarkMode:r,children:e}):void 0})]})},qH=({section:e,keyPath:t,...n})=>{let r=[...t,{type:T}],i=e[T];return(0,v.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,v.jsx)(ZH,{section:i,keyPath:r,...n})})},JH=({section:e,keyPath:t,...n})=>{let r=[...t,{type:E}],i=e[E],{content:a}=e;return(0,v.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,v.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,v.jsx)(ZH,{section:a,keyPath:r,...n})]})},YH=({keyPath:e,dictionary:t,renderSection:n,section:r,...i})=>{let{addEditedContent:a}=zv(),o=r[k],s=[...e,{type:k}];return(0,v.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,v.jsx)(Nb,{children:`Dictionary key`}),(0,v.jsx)(DH,{"aria-label":`Edit field`,type:`text`,variant:Cd.DEFAULT,...i,onContentChange:e=>{a(t.localId,{...o,dictionaryKey:String(e)},s)},children:o.dictionaryKey??``}),(0,v.jsx)(Nb,{children:`Path (optional)`}),(0,v.jsx)(DH,{"aria-label":`Edit field`,type:`text`,variant:Cd.DEFAULT,...i,onContentChange:e=>{a(t.localId,{...o,path:e===``?void 0:e},s)},children:o.path??``})]})},XH=({section:e,keyPath:t,dictionary:n,renderSection:r,isDarkMode:i})=>{let{tsxNotEditable:a}=mr(zL),o=_v(e);return o===`reactNode`?(0,v.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,v.jsx)(`span`,{children:`(React Node)`}),(0,v.jsx)(`span`,{className:`flex text-neutral text-xs`,children:a})]}):o===`nested`?(0,v.jsx)(YH,{dictionary:n,renderSection:r,keyPath:t,section:e}):o===`translation`?(0,v.jsx)(LH,{dictionary:n,renderSection:r,keyPath:t,section:e}):o===`enumeration`?(0,v.jsx)(RH,{dictionary:n,renderSection:r,keyPath:t,section:e}):o===`condition`?(0,v.jsx)(zH,{dictionary:n,renderSection:r,keyPath:t,section:e}):o===`gender`?(0,v.jsx)(BH,{dictionary:n,renderSection:r,keyPath:t,section:e}):o===`insertion`?(0,v.jsx)(qH,{dictionary:n,renderSection:r,keyPath:t,section:e}):o===`markdown`?(0,v.jsx)(KH,{dictionary:n,keyPath:t,section:e,isDarkMode:i}):o===`html`?(0,v.jsx)(GH,{dictionary:n,keyPath:t,section:e}):o===`file`?(0,v.jsx)(JH,{dictionary:n,renderSection:r,keyPath:t,section:e}):o===`array`?(0,v.jsx)(VH,{dictionary:n,renderSection:r,keyPath:t,section:e}):o===`object`?(0,v.jsx)(HH,{dictionary:n,renderSection:r,keyPath:t,section:e}):o===`number`?(0,v.jsx)(`div`,{className:`w-full p-2`,children:(0,v.jsx)(PH,{dictionary:n,keyPath:t,type:`number`,"aria-label":`Edit field`,children:e})}):o===`text`?(0,v.jsx)(`div`,{className:`w-full p-2`,children:typeof r==`function`?r(e):(0,v.jsx)(NH,{variant:Cd.DEFAULT,"aria-label":`Edit field`,keyPath:t,dictionary:n,children:e})}):o===`boolean`?(0,v.jsx)(`div`,{className:`w-full p-2`,children:(0,v.jsx)(IH,{dictionary:n,keyPath:t,value:e})}):(0,v.jsxs)(`div`,{className:`w-full p-2`,children:[`Error. Format not supported.`,JSON.stringify(e,null,2),JSON.stringify(t,null,2),`NodeType : `,o]})},ZH=e=>(0,v.jsx)(Hu,{border:!0,background:`none`,className:`top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky`,roundedSize:`xl`,children:(0,v.jsx)(XH,{...e})}),QH=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>(0,v.jsx)(_d,{links:[...a?[{text:Qv(t),onClick:n?()=>n([]):void 0}]:[],...e.map((t,r)=>({onClick:n?()=>n?.(e.slice(0,r+1)):void 0,text:t.key?.toString()??``}))],locale:r,elementType:`location`,color:i}),$H=e=>{let t=mv(e),n=_v(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?$H(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},eU=({section:e,keyPath:t,dictionary:n})=>{let{locales:r}=g.internationalization,i=dv(e,t,Nv()),{addEditedContent:a}=Rv(),{setFocusedContentKeyPath:o,focusedContent:s}=Fv(),{addNewElement:c,goToField:l}=mr(zL),u=_v(i),d=e=>(s?.keyPath?.length??0)>0&&lr(e,s?.keyPath??[]),f=$H(i);return i?f?(0,v.jsx)(Ju,{label:l.label.value,variant:W.HOVERABLE,color:G.TEXT,className:`w-full`,onClick:()=>o(t),IconRight:Xl,children:Qv(t[t.length-1].key)}):typeof i==`object`?u===`reactNode`?(0,v.jsx)(v.Fragment,{children:`React Node`}):u===`translation`?(0,v.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:r.map(r=>(0,v.jsx)(eU,{keyPath:[...t,{type:S,key:r}],section:e,dictionary:n},r))}):u===`enumeration`||u===`condition`?(0,v.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(i[u]).map(r=>(0,v.jsx)(eU,{keyPath:[...t,{type:u,key:r}],section:e,dictionary:n},r))}):u===`array`?(0,v.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[i.map((r,i)=>{let a=[...t,{type:O,key:i}];return $H(r)?(0,v.jsxs)(Ju,{label:`${l.label.value} ${i}`,variant:W.HOVERABLE,color:G.TEXT,className:`w-full`,onClick:()=>o(a),IconRight:Xl,isActive:d(a),children:[`Item `,i]},JSON.stringify(a)):(0,v.jsx)(Xu,{label:`${l.label.value} ${i}`,header:`Item ${i}`,isActive:d(a),onClick:()=>o(a),children:(0,v.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,v.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,v.jsx)(eU,{keyPath:a,section:e,dictionary:n})})})},JSON.stringify(a))}),(0,v.jsx)(Ju,{label:c.label.value,variant:W.HOVERABLE,color:G.NEUTRAL,textAlign:Ku.LEFT,onClick:()=>{let e=[...t,{type:O,key:i.length}],r=i,s=pv(r[r.length-1])??``;a(n.localId,s,e,!1),o(e)},Icon:fu,children:c.text})]}):typeof i.nodeType==`string`?(0,v.jsx)(eU,{keyPath:[...t,{type:i.nodeType}],section:e,dictionary:n}):(0,v.jsx)(`div`,{className:`flex w-full max-w-full flex-col justify-between gap-2`,children:Object.keys(i).map(r=>{let i=[...t,{type:D,key:r}];return $H(dv(e,i))?(0,v.jsx)(Ju,{label:`${l.label.value} ${r}`,isActive:d(i),variant:W.HOVERABLE,color:G.TEXT,className:`w-full`,onClick:()=>o(i),IconRight:Xl,children:Qv(r)},r):(0,v.jsx)(Xu,{label:`${l.label.value} ${r}`,isActive:d(i),onClick:()=>o(i),header:Qv(r),children:(0,v.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,v.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,v.jsx)(eU,{keyPath:i,section:e,dictionary:n})})})},r)})}):(0,v.jsxs)(v.Fragment,{children:[`Error loading section --`,u,`--`,JSON.stringify(i),`--`,JSON.stringify(t)]}):(0,v.jsx)(v.Fragment,{})},tU=({dictionary:e,isDarkMode:t})=>{let{content:n,key:r,localId:i}=e,{editedContent:a}=zv(),{focusedContent:o,setFocusedContentKeyPath:s}=Fv(),c=o?.keyPath,l=a?.[i]?.content===void 0?n:a?.[i]?.content,u=Nv(),d=dv(l,c??[],u),f=$H(l),p=$H(d);return(0,m.useEffect)(()=>{d===void 0&&s(o?.keyPath?.slice(0,-1)??[])},[]),(0,v.jsxs)(`div`,{children:[(0,v.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,v.jsx)(QH,{dictionaryKey:r,keyPath:c??[],onClickKeyPath:s}),(0,v.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,v.jsx)(Mb,{})})]}),(0,v.jsxs)(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof l==`object`&&l&&!f&&Object.keys(l).length>0&&(0,v.jsx)(Hu,{border:!0,background:`none`,className:`top-30 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]`,roundedSize:`xl`,transparency:`xs`,children:(0,v.jsx)(eU,{keyPath:[],section:l,dictionary:e})}),(p||(c??[]).length>0)&&(0,v.jsx)(ZH,{keyPath:c??[],section:d,dictionary:e,isDarkMode:t})]})]})},nU=({id:e,...t})=>{let n=(0,m.useId)(),r=e??n;return(0,v.jsx)(rU,{value:{id:r},children:(0,v.jsx)(`div`,{className:`flex flex-col gap-2 p-2`,id:r,suppressHydrationWarning:!0,...t})})},rU=(0,m.createContext)({}),iU=e=>e.type===`checkbox`,aU=e=>e instanceof Date,oU=e=>e==null,sU=e=>typeof e==`object`,cU=e=>!oU(e)&&!Array.isArray(e)&&sU(e)&&!aU(e),lU=e=>cU(e)&&e.target?iU(e.target)?e.target.checked:e.target.value:e,uU=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,dU=(e,t)=>e.has(uU(t)),fU=e=>{let t=e.constructor&&e.constructor.prototype;return cU(t)&&t.hasOwnProperty(`isPrototypeOf`)},pU=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function mU(e){if(e instanceof Date)return new Date(e);let t=typeof FileList<`u`&&e instanceof FileList;if(pU&&(e instanceof Blob||t))return e;let n=Array.isArray(e);if(!n&&!(cU(e)&&fU(e)))return e;let r=n?[]:Object.create(Object.getPrototypeOf(e));for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=mU(e[t]));return r}var hU=e=>/^\w*$/.test(e),gU=e=>e===void 0,_U=e=>Array.isArray(e)?e.filter(Boolean):[],vU=e=>_U(e.replace(/["|']|\]/g,``).split(/\.|\[/)),X=(e,t,n)=>{if(!t||!cU(e))return n;let r=(hU(t)?[t]:vU(t)).reduce((e,t)=>oU(e)?e:e[t],e);return gU(r)||r===e?gU(e[t])?n:e[t]:r},yU=e=>typeof e==`boolean`,bU=e=>typeof e==`function`,xU=(e,t,n)=>{let r=-1,i=hU(t)?[t]:vU(t),a=i.length,o=a-1;for(;++r<a;){let t=i[r],a=n;if(r!==o){let n=e[t];a=cU(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if(t===`__proto__`||t===`constructor`||t===`prototype`)return;e[t]=a,e=e[t]}},SU={BLUR:`blur`,FOCUS_OUT:`focusout`,CHANGE:`change`,SUBMIT:`submit`,TRIGGER:`trigger`,VALID:`valid`},CU={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},wU={max:`max`,min:`min`,maxLength:`maxLength`,minLength:`minLength`,pattern:`pattern`,required:`required`,validate:`validate`},TU=`form`,EU=`root`,DU=m.createContext(null);DU.displayName=`HookFormControlContext`;var OU=()=>m.useContext(DU),kU=(e,t,n,r=!0)=>{let i={defaultValues:t._defaultValues};for(let a in e)Object.defineProperty(i,a,{get:()=>{let i=a;return t._proxyFormState[i]!==CU.all&&(t._proxyFormState[i]=!r||CU.all),n&&(n[i]=!0),e[i]}});return i},AU=typeof window<`u`?m.useLayoutEffect:m.useEffect;function jU(e){let t=OU(),{control:n=t,disabled:r,name:i,exact:a}=e||{},[o,s]=m.useState(n._formState),c=m.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return AU(()=>n._subscribe({name:i,formState:c.current,exact:a,callback:e=>{!r&&s({...n._formState,...e})}}),[i,r,a]),m.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),m.useMemo(()=>kU(o,n,c.current,!1),[o,n])}var MU=e=>typeof e==`string`,NU=(e,t,n,r,i)=>MU(e)?(r&&t.watch.add(e),X(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),X(n,e))):(r&&(t.watchAll=!0),n),PU=e=>oU(e)||!sU(e);function FU(e,t,n=new WeakSet){if(PU(e)||PU(t))return Object.is(e,t);if(aU(e)&&aU(t))return Object.is(e.getTime(),t.getTime());let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(let a of r){let r=e[a];if(!i.includes(a))return!1;if(a!==`ref`){let e=t[a];if(aU(r)&&aU(e)||cU(r)&&cU(e)||Array.isArray(r)&&Array.isArray(e)?!FU(r,e,n):!Object.is(r,e))return!1}}return!0}function IU(e){let t=OU(),{control:n=t,name:r,defaultValue:i,disabled:a,exact:o,compute:s}=e||{},c=m.useRef(i),l=m.useRef(s),u=m.useRef(void 0),d=m.useRef(n),f=m.useRef(r);l.current=s;let[p,h]=m.useState(()=>{let e=n._getWatch(r,c.current);return l.current?l.current(e):e}),g=m.useCallback(e=>{let t=NU(r,n._names,e||n._formValues,!1,c.current);return l.current?l.current(t):t},[n._formValues,n._names,r]),_=m.useCallback(e=>{if(!a){let t=NU(r,n._names,e||n._formValues,!1,c.current);if(l.current){let e=l.current(t);FU(e,u.current)||(h(e),u.current=e)}else h(t)}},[n._formValues,n._names,a,r]);AU(()=>((d.current!==n||!FU(f.current,r))&&(d.current=n,f.current=r,_()),n._subscribe({name:r,formState:{values:!0},exact:o,callback:e=>{_(e.values)}})),[n,o,r,_]),m.useEffect(()=>n._removeUnmounted());let v=d.current!==n,y=f.current,b=m.useMemo(()=>{if(a)return null;let e=!v&&!FU(y,r);return v||e?g():null},[a,v,r,y,g]);return b===null?p:b}function LU(e){let t=OU(),{name:n,disabled:r,control:i=t,shouldUnregister:a,defaultValue:o,exact:s=!0}=e,c=dU(i._names.array,n),l=IU({control:i,name:n,defaultValue:m.useMemo(()=>X(i._formValues,n,X(i._defaultValues,n,o)),[i,n,o]),exact:s}),u=jU({control:i,name:n,exact:s}),d=m.useRef(e),f=m.useRef(void 0),p=m.useRef(i.register(n,{...e.rules,value:l,...yU(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;let h=m.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!X(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!X(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!X(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!X(u.validatingFields,n)},error:{enumerable:!0,get:()=>X(u.errors,n)}}),[u,n]),g=m.useCallback(e=>p.current.onChange({target:{value:lU(e),name:n},type:SU.CHANGE}),[n]),_=m.useCallback(()=>p.current.onBlur({target:{value:X(i._formValues,n),name:n},type:SU.BLUR}),[n,i._formValues]),v=m.useCallback(e=>{let t=X(i._fields,n);t&&t._f&&e&&(t._f.ref={focus:()=>bU(e.focus)&&e.focus(),select:()=>bU(e.select)&&e.select(),setCustomValidity:t=>bU(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>bU(e.reportValidity)&&e.reportValidity()})},[i._fields,n]),y=m.useMemo(()=>({name:n,value:l,...yU(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:g,onBlur:_,ref:v}),[n,r,u.disabled,g,_,v,l]);return m.useEffect(()=>{let e=i._options.shouldUnregister||a,t=f.current;t&&t!==n&&!c&&i.unregister(t),i.register(n,{...d.current.rules,...yU(d.current.disabled)?{disabled:d.current.disabled}:{}});let r=(e,t)=>{let n=X(i._fields,e);n&&n._f&&(n._f.mount=t)};if(r(n,!0),e){let e=mU(X(i._options.defaultValues,n,d.current.defaultValue));xU(i._defaultValues,n,e),gU(X(i._formValues,n))&&xU(i._formValues,n,e)}return!c&&i.register(n),f.current=n,()=>{(c?e&&!i._state.action:e)?i.unregister(n):r(n,!1)}},[n,i,c,a]),m.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),m.useMemo(()=>({field:y,formState:u,fieldState:h}),[y,u,h])}var RU=e=>e.render(LU(e)),zU=m.createContext(null);zU.displayName=`HookFormContext`;var BU=()=>m.useContext(zU),VU=e=>{let{children:t,watch:n,getValues:r,getFieldState:i,setError:a,clearErrors:o,setValue:s,trigger:c,formState:l,resetField:u,reset:d,handleSubmit:f,unregister:p,control:h,register:g,setFocus:_,subscribe:v}=e;return m.createElement(zU.Provider,{value:m.useMemo(()=>({watch:n,getValues:r,getFieldState:i,setError:a,clearErrors:o,setValue:s,trigger:c,formState:l,resetField:u,reset:d,handleSubmit:f,unregister:p,control:h,register:g,setFocus:_,subscribe:v}),[o,h,l,i,r,f,g,d,u,a,_,s,v,c,p,n])},m.createElement(DU.Provider,{value:h},t))},HU=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},UU=e=>Array.isArray(e)?e:[e],WU=()=>{let e=[];return{get observers(){return e},next:t=>{for(let n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function GU(e,t){let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],a=t[r];if(i&&cU(i)&&a){let e=GU(i,a);cU(e)&&(n[r]=e)}else e[r]&&(n[r]=a)}return n}var KU=e=>cU(e)&&!Object.keys(e).length,qU=e=>e.type===`file`,JU=e=>{if(!pU)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},YU=e=>e.type===`select-multiple`,XU=e=>e.type===`radio`,ZU=e=>XU(e)||iU(e),QU=e=>JU(e)&&e.isConnected;function $U(e,t){let n=t.slice(0,-1).length,r=0;for(;r<n;)e=gU(e)?r++:e[t[r++]];return e}function eW(e){for(let t in e)if(e.hasOwnProperty(t)&&!gU(e[t]))return!1;return!0}function tW(e,t){let n=Array.isArray(t)?t:hU(t)?[t]:vU(t),r=n.length===1?e:$U(e,n),i=n.length-1,a=n[i];return r&&delete r[a],i!==0&&(cU(r)&&KU(r)||Array.isArray(r)&&eW(r))&&tW(e,n.slice(0,-1)),e}var nW=e=>{for(let t in e)if(bU(e[t]))return!0;return!1};function rW(e){return Array.isArray(e)||cU(e)&&!nW(e)}function iW(e,t={}){for(let n in e){let r=e[n];rW(r)?(t[n]=Array.isArray(r)?[]:{},iW(r,t[n])):gU(r)||(t[n]=!0)}return t}function aW(e,t,n){n||=iW(t);for(let r in e){let i=e[r];if(rW(i))gU(t)||PU(n[r])?n[r]=iW(i,Array.isArray(i)?[]:{}):aW(i,oU(t)?{}:t[r],n[r]);else{let e=t[r];n[r]=!FU(i,e)}}return n}var oW={value:!1,isValid:!1},sW={value:!0,isValid:!0},cW=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!gU(e[0].attributes.value)?gU(e[0].value)||e[0].value===``?sW:{value:e[0].value,isValid:!0}:sW:oW}return oW},lW=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>gU(e)?e:t?e===``?NaN:e&&+e:n&&MU(e)?new Date(e):r?r(e):e,uW={isValid:!1,value:null},dW=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,uW):uW;function fW(e){let t=e.ref;return qU(t)?t.files:XU(t)?dW(e.refs).value:YU(t)?[...t.selectedOptions].map(({value:e})=>e):iU(t)?cW(e.refs).value:lW(gU(t.value)?e.ref.value:t.value,e)}var pW=(e,t,n,r)=>{let i={};for(let n of e){let e=X(t,n);e&&xU(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},mW=e=>e instanceof RegExp,hW=e=>gU(e)?e:mW(e)?e.source:cU(e)?mW(e.value)?e.value.source:e.value:e,gW=e=>({isOnSubmit:!e||e===CU.onSubmit,isOnBlur:e===CU.onBlur,isOnChange:e===CU.onChange,isOnAll:e===CU.all,isOnTouch:e===CU.onTouched}),_W=`AsyncFunction`,vW=e=>!!e&&!!e.validate&&!!(bU(e.validate)&&e.validate.constructor.name===_W||cU(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===_W)),yW=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),bW=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))),xW=(e,t,n,r)=>{for(let i of n||Object.keys(e)){let n=X(e,i);if(n){let{_f:e,...a}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r||e.ref&&t(e.ref,e.name)&&!r)return!0;if(xW(a,t))break}else if(cU(a)&&xW(a,t))break}}};function SW(e,t,n){let r=X(e,n);if(r||hU(n))return{error:r,name:n};let i=n.split(`.`);for(;i.length;){let r=i.join(`.`),a=X(t,r),o=X(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};if(o&&o.root&&o.root.type)return{name:`${r}.root`,error:o.root};i.pop()}return{name:n}}var CW=(e,t,n,r)=>{n(e);let{name:i,...a}=e;return KU(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!r||CU.all))},wW=(e,t,n)=>!e||!t||e===t||UU(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),TW=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,EW=(e,t)=>!_U(X(e,t)).length&&tW(e,t),DW=(e,t,n)=>{let r=UU(X(e,n));return xU(r,EU,t[n]),xU(e,n,r),e};function OW(e,t,n=`validate`){if(MU(e)||Array.isArray(e)&&e.every(MU)||yU(e)&&!e)return{type:n,message:MU(e)?e:``,ref:t}}var kW=e=>cU(e)&&!mW(e)?e:{value:e,message:``},AW=async(e,t,n,r,i,a)=>{let{ref:o,refs:s,required:c,maxLength:l,minLength:u,min:d,max:f,pattern:p,validate:m,name:h,valueAsNumber:g,mount:_}=e._f,v=X(n,h);if(!_||t.has(h))return{};let y=s?s[0]:o,b=e=>{i&&y.reportValidity&&(y.setCustomValidity(yU(e)?``:e||``),y.reportValidity())},x={},S=XU(o),C=iU(o),w=S||C,T=(g||qU(o))&&gU(o.value)&&gU(v)||JU(o)&&o.value===``||v===``||Array.isArray(v)&&!v.length,E=HU.bind(null,h,r,x),D=(e,t,n,r=wU.maxLength,i=wU.minLength)=>{let a=e?t:n;x[h]={type:e?r:i,message:a,ref:o,...E(e?r:i,a)}};if(a?!Array.isArray(v)||!v.length:c&&(!w&&(T||oU(v))||yU(v)&&!v||C&&!cW(s).isValid||S&&!dW(s).isValid)){let{value:e,message:t}=MU(c)?{value:!!c,message:c}:kW(c);if(e&&(x[h]={type:wU.required,message:t,ref:y,...E(wU.required,t)},!r))return b(t),x}if(!T&&(!oU(d)||!oU(f))){let e,t,n=kW(f),i=kW(d);if(!oU(v)&&!isNaN(v)){let r=o.valueAsNumber||v&&+v;oU(n.value)||(e=r>n.value),oU(i.value)||(t=r<i.value)}else{let r=o.valueAsDate||new Date(v),a=e=>new Date(new Date().toDateString()+` `+e),s=o.type==`time`,c=o.type==`week`;MU(n.value)&&v&&(e=s?a(v)>a(n.value):c?v>n.value:r>new Date(n.value)),MU(i.value)&&v&&(t=s?a(v)<a(i.value):c?v<i.value:r<new Date(i.value))}if((e||t)&&(D(!!e,n.message,i.message,wU.max,wU.min),!r))return b(x[h].message),x}if((l||u)&&!T&&(MU(v)||a&&Array.isArray(v))){let e=kW(l),t=kW(u),n=!oU(e.value)&&v.length>+e.value,i=!oU(t.value)&&v.length<+t.value;if((n||i)&&(D(n,e.message,t.message),!r))return b(x[h].message),x}if(p&&!T&&MU(v)){let{value:e,message:t}=kW(p);if(mW(e)&&!v.match(e)&&(x[h]={type:wU.pattern,message:t,ref:o,...E(wU.pattern,t)},!r))return b(t),x}if(m){if(bU(m)){let e=OW(await m(v,n),y);if(e&&(x[h]={...e,...E(wU.validate,e.message)},!r))return b(e.message),x}else if(cU(m)){let e={};for(let t in m){if(!KU(e)&&!r)break;let i=OW(await m[t](v,n),y,t);i&&(e={...i,...E(t,i.message)},b(i.message),r&&(x[h]=e))}if(!KU(e)&&(x[h]={ref:y,...e},!r))return x}}return b(!0),x},jW={mode:CU.onSubmit,reValidateMode:CU.onChange,shouldFocusError:!0};function MW(e={}){let t={...jW,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:bU(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=(cU(t.defaultValues)||cU(t.values))&&mU(t.defaultValues||t.values)||{},a=t.shouldUnregister?{}:mU(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,l=0,u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={...u},f={...d},p={array:WU(),state:WU()},m=t.criteriaMode===CU.all,h=e=>t=>{clearTimeout(l),l=setTimeout(e,t)},g=async e=>{if(!o.keepIsValid&&!t.disabled&&(d.isValid||f.isValid||e)){let e;t.resolver?(e=KU((await w()).errors),_()):e=await D({fields:r,onlyCheckValid:!0,eventType:SU.VALID}),e!==n.isValid&&p.state.next({isValid:e})}},_=(e,r)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((e||Array.from(s.mount)).forEach(e=>{e&&(r?xU(n.validatingFields,e,r):tW(n.validatingFields,e))}),p.state.next({validatingFields:n.validatingFields,isValidating:!KU(n.validatingFields)}))},v=(e,s=[],c,l,u=!0,m=!0)=>{if(l&&c&&!t.disabled){if(o.action=!0,m&&Array.isArray(X(r,e))){let t=c(X(r,e),l.argA,l.argB);u&&xU(r,e,t)}if(m&&Array.isArray(X(n.errors,e))){let t=c(X(n.errors,e),l.argA,l.argB);u&&xU(n.errors,e,t),EW(n.errors,e)}if((d.touchedFields||f.touchedFields)&&m&&Array.isArray(X(n.touchedFields,e))){let t=c(X(n.touchedFields,e),l.argA,l.argB);u&&xU(n.touchedFields,e,t)}if(d.dirtyFields||f.dirtyFields){let t=aW(i,a),r=uU(e);xU(n.dirtyFields,r,X(t,r))}p.state.next({name:e,isDirty:k(e,s),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else xU(a,e,s)},y=(e,t)=>{xU(n.errors,e,t),p.state.next({errors:n.errors})},b=e=>{n.errors=e,p.state.next({errors:n.errors,isValid:!1})},x=(e,t,n,s)=>{let c=X(r,e);if(c){let r=X(a,e,gU(n)?X(i,e):n);gU(r)||s&&s.defaultChecked||t?xU(a,e,t?r:fW(c._f)):M(e,r),o.mount&&!o.action&&g()}},S=(e,r,a,o,s)=>{let c=!1,l=!1,u={name:e};if(!t.disabled){if(!a||o){(d.isDirty||f.isDirty)&&(l=n.isDirty,n.isDirty=u.isDirty=k(),c=l!==u.isDirty);let t=FU(X(i,e),r);l=!!X(n.dirtyFields,e),t?tW(n.dirtyFields,e):xU(n.dirtyFields,e,!0),u.dirtyFields=n.dirtyFields,c||=(d.dirtyFields||f.dirtyFields)&&l!==!t}if(a){let t=X(n.touchedFields,e);t||(xU(n.touchedFields,e,a),u.touchedFields=n.touchedFields,c||=(d.touchedFields||f.touchedFields)&&t!==a)}c&&s&&p.state.next(u)}return c?u:{}},C=(e,r,i,a)=>{let o=X(n.errors,e),s=(d.isValid||f.isValid)&&yU(r)&&n.isValid!==r;if(t.delayError&&i?(c=h(()=>y(e,i)),c(t.delayError)):(clearTimeout(l),c=null,i?xU(n.errors,e,i):tW(n.errors,e)),(i?!FU(o,i):o)||!KU(a)||s){let t={...a,...s&&yU(r)?{isValid:r}:{},errors:n.errors,name:e};n={...n,...t},p.state.next(t)}},w=async e=>(_(e,!0),await t.resolver(a,t.context,pW(e||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),T=async e=>{let{errors:t}=await w(e);if(_(e),e)for(let r of e){let e=X(t,r);e?xU(n.errors,r,e):tW(n.errors,r)}else n.errors=t;return t},E=async({name:t,eventType:r})=>{if(e.validate){let i=await e.validate({formValues:a,formState:n,name:t,eventType:r});if(cU(i))for(let e in i)i[e]&&ae(`${TU}.${e}`,{message:MU(i.message)?i.message:``,type:wU.validate});else MU(i)||!i?ae(TU,{message:i||``,type:wU.validate}):ie(TU);return i}return!0},D=async({fields:r,onlyCheckValid:i,name:o,eventType:c,context:l={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(l.runRootValidation=!0,!await E({name:o,eventType:c})&&(l.valid=!1,i)))return l.valid;for(let o in r){let u=r[o];if(u){let{_f:r,...f}=u;if(r){let o=s.array.has(r.name),c=u._f&&vW(u._f);c&&d.validatingFields&&_([r.name],!0);let f=await AW(u,s.disabled,a,m,t.shouldUseNativeValidation&&!i,o);if(c&&d.validatingFields&&_([r.name]),f[r.name]&&(l.valid=!1,i)||(!i&&(X(f,r.name)?o?DW(n.errors,f,r.name):xU(n.errors,r.name,f[r.name]):tW(n.errors,r.name)),e.shouldUseNativeValidation&&f[r.name]))break}!KU(f)&&await D({context:l,onlyCheckValid:i,fields:f,name:o,eventType:c})}}return l.valid},O=()=>{for(let e of s.unMount){let t=X(r,e);t&&(t._f.refs?t._f.refs.every(e=>!QU(e)):!QU(t._f.ref))&&le(e)}s.unMount=new Set},k=(e,n)=>!t.disabled&&(e&&n&&xU(a,e,n),!FU(ne(),i)),A=(e,t,n)=>NU(e,s,{...o.mount?a:gU(t)?i:MU(e)?{[e]:t}:t},n,t),j=e=>_U(X(o.mount?a:i,e,t.shouldUnregister?X(i,e,[]):[])),M=(e,t,n={})=>{let i=X(r,e),o=t;if(i){let n=i._f;n&&(!n.disabled&&xU(a,e,lW(t,n)),o=JU(n.ref)&&oU(t)?``:t,YU(n.ref)?[...n.ref.options].forEach(e=>e.selected=o.includes(e.value)):n.refs?iU(n.ref)?n.refs.forEach(e=>{(!e.defaultChecked||!e.disabled)&&(Array.isArray(o)?e.checked=!!o.find(t=>t===e.value):e.checked=o===e.value||!!o)}):n.refs.forEach(e=>e.checked=e.value===o):qU(n.ref)?n.ref.value=``:(n.ref.value=o,n.ref.type||p.state.next({name:e,values:mU(a)})))}(n.shouldDirty||n.shouldTouch)&&S(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&F(e)},N=(e,t,n)=>{for(let i in t){if(!t.hasOwnProperty(i))return;let a=t[i],o=e+`.`+i,c=X(r,o);(s.array.has(e)||cU(a)||c&&!c._f)&&!aU(a)?N(o,a,n):M(o,a,n)}},ee=(e,t,c={})=>{let l=X(r,e),u=s.array.has(e),m=mU(t);xU(a,e,m),u?(p.array.next({name:e,values:mU(a)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&c.shouldDirty&&p.state.next({name:e,dirtyFields:aW(i,a),isDirty:k(e,m)})):l&&!l._f&&!oU(m)?N(e,m,c):M(e,m,c),bW(e,s)?p.state.next({...n,name:e,values:mU(a)}):p.state.next({name:o.mount?e:void 0,values:mU(a)})},te=async i=>{o.mount=!0;let l=i.target,u=l.name,h=!0,v=X(r,u),y=e=>{h=Number.isNaN(e)||aU(e)&&isNaN(e.getTime())||FU(e,X(a,u,e))},b=gW(t.mode),x=gW(t.reValidateMode);if(v){let o,T,O=l.type?fW(v._f):lU(i),k=i.type===SU.BLUR||i.type===SU.FOCUS_OUT,A=!yW(v._f)&&!e.validate&&!t.resolver&&!X(n.errors,u)&&!v._f.deps||TW(k,X(n.touchedFields,u),n.isSubmitted,x,b),j=bW(u,s,k);xU(a,u,O),k?(!l||!l.readOnly)&&(v._f.onBlur&&v._f.onBlur(i),c&&c(0)):v._f.onChange&&v._f.onChange(i);let M=S(u,O,k),N=!KU(M)||j;if(!k&&p.state.next({name:u,type:i.type,values:mU(a)}),A)return(d.isValid||f.isValid)&&(t.mode===`onBlur`?k&&g():k||g()),N&&p.state.next({name:u,...j?{}:M});if(!t.resolver&&e.validate&&await E({name:u,eventType:i.type}),!k&&j&&p.state.next({...n}),t.resolver){let{errors:e}=await w([u]);if(_([u]),y(O),h){let t=SW(n.errors,r,u),i=SW(e,r,t.name||u);o=i.error,u=i.name,T=KU(e)}}else _([u],!0),o=(await AW(v,s.disabled,a,m,t.shouldUseNativeValidation))[u],_([u]),y(O),h&&(o?T=!1:(d.isValid||f.isValid)&&(T=await D({fields:r,onlyCheckValid:!0,name:u,eventType:i.type})));h&&(v._f.deps&&(!Array.isArray(v._f.deps)||v._f.deps.length>0)&&F(v._f.deps),C(u,T,o,M))}},P=(e,t)=>{if(X(n.errors,t)&&e.focus)return e.focus(),1},F=async(e,i={})=>{let a,o,c=UU(e);if(t.resolver){let t=await T(gU(e)?e:c);a=KU(t),o=e?!c.some(e=>X(t,e)):a}else e?(o=(await Promise.all(c.map(async e=>{let t=X(r,e);return await D({fields:t&&t._f?{[e]:t}:t,eventType:SU.TRIGGER})}))).every(Boolean),!(!o&&!n.isValid)&&g()):o=a=await D({fields:r,name:e,eventType:SU.TRIGGER});return p.state.next({...!MU(e)||(d.isValid||f.isValid)&&a!==n.isValid?{}:{name:e},...t.resolver||!e?{isValid:a}:{},errors:n.errors}),i.shouldFocus&&!o&&xW(r,P,e?c:s.mount),o},ne=(e,t)=>{let r={...o.mount?a:i};return t&&(r=GU(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),gU(e)?r:MU(e)?X(r,e):e.map(e=>X(r,e))},re=(e,t)=>({invalid:!!X((t||n).errors,e),isDirty:!!X((t||n).dirtyFields,e),error:X((t||n).errors,e),isValidating:!!X(n.validatingFields,e),isTouched:!!X((t||n).touchedFields,e)}),ie=e=>{let t=e?UU(e):void 0;t?.forEach(e=>tW(n.errors,e)),t?t.forEach(e=>{p.state.next({name:e,errors:n.errors})}):p.state.next({errors:{}})},ae=(e,t,i)=>{let a=(X(r,e,{_f:{}})._f||{}).ref,{ref:o,message:s,type:c,...l}=X(n.errors,e)||{};xU(n.errors,e,{...l,...t,ref:a}),p.state.next({name:e,errors:n.errors,isValid:!1}),i&&i.shouldFocus&&a&&a.focus&&a.focus()},oe=(e,t)=>bU(e)?p.state.subscribe({next:n=>`values`in n&&e(A(void 0,t),n)}):A(e,t,!0),se=e=>p.state.subscribe({next:t=>{wW(e.name,t.name,e.exact)&&CW(t,e.formState||d,ye,e.reRenderRoot)&&e.callback({values:{...a},...n,...t,defaultValues:i})}}).unsubscribe,ce=e=>(o.mount=!0,f={...f,...e.formState},se({...e,formState:{...u,...e.formState}})),le=(e,o={})=>{for(let c of e?UU(e):s.mount)s.mount.delete(c),s.array.delete(c),o.keepValue||(tW(r,c),tW(a,c)),!o.keepError&&tW(n.errors,c),!o.keepDirty&&tW(n.dirtyFields,c),!o.keepTouched&&tW(n.touchedFields,c),!o.keepIsValidating&&tW(n.validatingFields,c),!t.shouldUnregister&&!o.keepDefaultValue&&tW(i,c);p.state.next({values:mU(a)}),p.state.next({...n,...o.keepDirty?{isDirty:k()}:{}}),!o.keepIsValid&&g()},ue=({disabled:e,name:t})=>{if(yU(e)&&o.mount||e||s.disabled.has(t)){let n=s.disabled.has(t)!==!!e;e?s.disabled.add(t):s.disabled.delete(t),n&&o.mount&&!o.action&&g()}},de=(e,n={})=>{let a=X(r,e),c=yU(n.disabled)||yU(t.disabled);return xU(r,e,{...a||{},_f:{...a&&a._f?a._f:{ref:{name:e}},name:e,mount:!0,...n}}),s.mount.add(e),a?ue({disabled:yU(n.disabled)?n.disabled:t.disabled,name:e}):x(e,!0,n.value),{...c?{disabled:n.disabled||t.disabled}:{},...t.progressive?{required:!!n.required,min:hW(n.min),max:hW(n.max),minLength:hW(n.minLength),maxLength:hW(n.maxLength),pattern:hW(n.pattern)}:{},name:e,onChange:te,onBlur:te,ref:c=>{if(c){de(e,n),a=X(r,e);let t=gU(c.value)&&c.querySelectorAll&&c.querySelectorAll(`input,select,textarea`)[0]||c,o=ZU(t),s=a._f.refs||[];if(o?s.find(e=>e===t):t===a._f.ref)return;xU(r,e,{_f:{...a._f,...o?{refs:[...s.filter(QU),t,...Array.isArray(X(i,e))?[{}]:[]],ref:{type:t.type,name:e}}:{ref:t}}}),x(e,!1,void 0,t)}else a=X(r,e,{}),a._f&&(a._f.mount=!1),(t.shouldUnregister||n.shouldUnregister)&&!(dU(s.array,e)&&o.action)&&s.unMount.add(e)}}},fe=()=>t.shouldFocusError&&xW(r,P,s.mount),pe=e=>{yU(e)&&(p.state.next({disabled:e}),xW(r,(t,n)=>{let i=X(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0,!1))},me=(e,i)=>async o=>{let c;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=mU(a);if(p.state.next({isSubmitting:!0}),t.resolver){let{errors:e,values:t}=await w();_(),n.errors=e,l=mU(t)}else await D({fields:r,eventType:SU.SUBMIT});if(s.disabled.size)for(let e of s.disabled)tW(l,e);if(tW(n.errors,EU),KU(n.errors)){p.state.next({errors:{}});try{await e(l,o)}catch(e){c=e}}else i&&await i({...n.errors},o),fe(),setTimeout(fe);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:KU(n.errors)&&!c,submitCount:n.submitCount+1,errors:n.errors}),c)throw c},he=(e,t={})=>{X(r,e)&&(gU(t.defaultValue)?ee(e,mU(X(i,e))):(ee(e,t.defaultValue),xU(i,e,mU(t.defaultValue))),t.keepTouched||tW(n.touchedFields,e),t.keepDirty||(tW(n.dirtyFields,e),n.isDirty=t.defaultValue?k(e,mU(X(i,e))):k()),t.keepError||(tW(n.errors,e),d.isValid&&g()),p.state.next({...n}))},ge=(e,c={})=>{let l=e?mU(e):i,u=mU(l),f=KU(e),m=f?i:u;if(c.keepDefaultValues||(i=l),!c.keepValues){if(c.keepDirtyValues){let e=new Set([...s.mount,...Object.keys(aW(i,a))]);for(let t of Array.from(e)){let e=X(n.dirtyFields,t),r=X(a,t),i=X(m,t);e&&!gU(r)?xU(m,t,r):!e&&!gU(i)&&ee(t,i)}}else{if(pU&&gU(e))for(let e of s.mount){let t=X(r,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(JU(e)){let t=e.closest(`form`);if(t){t.reset();break}}}}if(c.keepFieldsRef)for(let e of s.mount)ee(e,X(m,e));else r={}}a=t.shouldUnregister?c.keepDefaultValues?mU(i):{}:mU(m),p.array.next({values:{...m}}),p.state.next({values:{...m}})}s={mount:c.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:``},o.mount=!d.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!t.shouldUnregister&&!KU(m),o.watch=!!t.shouldUnregister,o.keepIsValid=!!c.keepIsValid,o.action=!1,c.keepErrors||(n.errors={}),p.state.next({submitCount:c.keepSubmitCount?n.submitCount:0,isDirty:f?!1:c.keepDirty?n.isDirty:!!(c.keepDefaultValues&&!FU(e,i)),isSubmitted:c.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:f?{}:c.keepDirtyValues?c.keepDefaultValues&&a?aW(i,a):n.dirtyFields:c.keepDefaultValues&&e?aW(i,e):c.keepDirty?n.dirtyFields:{},touchedFields:c.keepTouched?n.touchedFields:{},errors:c.keepErrors?n.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},_e=(e,n)=>ge(bU(e)?e(a):e,{...t.resetOptions,...n}),ve=(e,t={})=>{let n=X(r,e),i=n&&n._f;if(i){let e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&bU(e.select)&&e.select()})}},ye=e=>{n={...n,...e}},be={control:{register:de,unregister:le,getFieldState:re,handleSubmit:me,setError:ae,_subscribe:se,_runSchema:w,_updateIsValidating:_,_focusError:fe,_getWatch:A,_getDirty:k,_setValid:g,_setFieldArray:v,_setDisabledField:ue,_setErrors:b,_getFieldArray:j,_reset:ge,_resetDefaultValues:()=>bU(t.defaultValues)&&t.defaultValues().then(e=>{_e(e,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:O,_disableForm:pe,_subjects:p,_proxyFormState:d,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(e){o=e},get _defaultValues(){return i},get _names(){return s},set _names(e){s=e},get _formState(){return n},get _options(){return t},set _options(e){t={...t,...e}}},subscribe:ce,trigger:F,register:de,handleSubmit:me,watch:oe,setValue:ee,getValues:ne,reset:_e,resetField:he,clearErrors:ie,unregister:le,setError:ae,setFocus:ve,getFieldState:re};return{...be,formControl:be}}function NW(e={}){let t=m.useRef(void 0),n=m.useRef(void 0),[r,i]=m.useState({isDirty:!1,isValidating:!1,isLoading:bU(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:bU(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!bU(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let{formControl:n,...i}=MW(e);t.current={...i,formState:r}}let a=t.current.control;return a._options=e,AU(()=>{let e=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(e=>({...e,isReady:!0})),a._formState.isReady=!0,e},[a]),m.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),m.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),m.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),m.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),m.useEffect(()=>{if(a._proxyFormState.isDirty){let e=a._getDirty();e!==r.isDirty&&a._subjects.state.next({isDirty:e})}},[a,r.isDirty]),m.useEffect(()=>{e.values&&!FU(e.values,n.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),a._options.resetOptions?.keepIsValid||a._setValid(),n.current=e.values,i(e=>({...e}))):a._resetDefaultValues()},[a,e.values]),m.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=m.useMemo(()=>kU(r,a),[a,r]),t.current}var PW=(0,m.createContext)({}),FW=({...e})=>(0,v.jsx)(PW,{value:(0,m.useMemo)(()=>({name:e.name}),[e.name]),children:(0,v.jsx)(RU,{...e})}),IW=()=>{let e=(0,m.useContext)(PW),t=(0,m.useContext)(rU),{getFieldState:n,formState:r}=BU(),i=n(e.name,r);if(!e)throw Error(`useFormField should be used within <FormField>`);let{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},LW=({className:e,children:t,...n})=>(0,v.jsxs)(`i`,{className:B(`text-neutral-400 text-xs`,e),...n,children:[`ⓘ `,t]}),RW=(e,t,n)=>{if(e&&`reportValidity`in e){let r=X(n,t);e.setCustomValidity(r&&r.message||``),e.reportValidity()}},zW=(e,t)=>{for(let n in t.fields){let r=t.fields[n];r&&r.ref&&`reportValidity`in r.ref?RW(r.ref,n,e):r&&r.refs&&r.refs.forEach(t=>RW(t,n,e))}},BW=(e,t)=>{t.shouldUseNativeValidation&&zW(e,t);let n={};for(let r in e){let i=X(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(VW(t.names||Object.keys(e),r)){let e=Object.assign({},X(n,r));xU(e,`root`,a),xU(n,r,e)}else xU(n,r,a)}return n},VW=(e,t)=>{let n=HW(t);return e.some(e=>HW(e).match(`^${n}\\.\\d+`))};function HW(e){return e.replace(/\]|\[/g,``)}Object.freeze({status:`aborted`});function Z(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var UW=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},WW=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},GW={};function KW(e){return e&&Object.assign(GW,e),GW}function qW(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function JW(e,t){return typeof t==`bigint`?t.toString():t}function YW(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function XW(e){return e==null}function ZW(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var QW=Symbol(`evaluating`);function $W(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==QW)return r===void 0&&(r=QW,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function eG(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function tG(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function nG(e){return JSON.stringify(e)}function rG(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var iG=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function aG(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var oG=YW(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function sG(e){if(aG(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(aG(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function cG(e){return sG(e)?{...e}:Array.isArray(e)?[...e]:e}var lG=new Set([`string`,`number`,`symbol`]);function uG(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function dG(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Q(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function fG(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function pG(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return dG(e,tG(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return eG(this,`shape`,e),e},checks:[]}))}function mG(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return dG(e,tG(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return eG(this,`shape`,r),r},checks:[]}))}function hG(e,t){if(!sG(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return dG(e,tG(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return eG(this,`shape`,n),n}}))}function gG(e,t){if(!sG(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return dG(e,tG(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return eG(this,`shape`,n),n}}))}function _G(e,t){return dG(e,tG(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return eG(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function vG(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return dG(t,tG(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return eG(this,`shape`,i),i},checks:[]}))}function yG(e,t,n){return dG(t,tG(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return eG(this,`shape`,i),i}}))}function bG(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function xG(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function SG(e){return typeof e==`string`?e:e?.message}function CG(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=SG(e.inst?._zod.def?.error?.(e))??SG(t?.error?.(e))??SG(n.customError?.(e))??SG(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function wG(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function TG(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var EG=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,JW,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},DG=Z(`$ZodError`,EG),OG=Z(`$ZodError`,EG,{Parent:Error});function kG(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function AG(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var jG=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new UW;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>CG(e,a,KW())));throw iG(t,i?.callee),t}return o.value},MG=jG(OG),NG=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>CG(e,a,KW())));throw iG(t,i?.callee),t}return o.value},PG=NG(OG),FG=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new UW;return a.issues.length?{success:!1,error:new(e??DG)(a.issues.map(e=>CG(e,i,KW())))}:{success:!0,data:a.value}},IG=FG(OG),LG=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>CG(e,i,KW())))}:{success:!0,data:a.value}},RG=LG(OG),zG=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return jG(e)(t,n,i)},BG=e=>(t,n,r)=>jG(e)(t,n,r),VG=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return NG(e)(t,n,i)},HG=e=>async(t,n,r)=>NG(e)(t,n,r),UG=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return FG(e)(t,n,i)},WG=e=>(t,n,r)=>FG(e)(t,n,r),GG=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return LG(e)(t,n,i)},KG=e=>async(t,n,r)=>LG(e)(t,n,r),qG=/^[cC][^\s-]{8,}$/,JG=/^[0-9a-z]+$/,YG=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,XG=/^[0-9a-vA-V]{20}$/,ZG=/^[A-Za-z0-9]{27}$/,QG=/^[a-zA-Z0-9_-]{21}$/,$G=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,eK=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,tK=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,nK=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,rK=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function iK(){return new RegExp(rK,`u`)}var aK=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sK=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,cK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,lK=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,uK=/^[A-Za-z0-9_-]*$/,dK=/^\+[1-9]\d{6,14}$/,fK=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,pK=RegExp(`^${fK}$`);function mK(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function hK(e){return RegExp(`^${mK(e)}$`)}function gK(e){let t=mK({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${fK}T(?:${r})$`)}var _K=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},vK=/^[^A-Z]*$/,yK=/^[^a-z]*$/,bK=Z(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),xK=Z(`$ZodCheckMaxLength`,(e,t)=>{var n;bK.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!XW(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=wG(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),SK=Z(`$ZodCheckMinLength`,(e,t)=>{var n;bK.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!XW(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=wG(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),CK=Z(`$ZodCheckLengthEquals`,(e,t)=>{var n;bK.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!XW(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=wG(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),wK=Z(`$ZodCheckStringFormat`,(e,t)=>{var n,r;bK.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),TK=Z(`$ZodCheckRegex`,(e,t)=>{wK.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),EK=Z(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=vK,wK.init(e,t)}),DK=Z(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=yK,wK.init(e,t)}),OK=Z(`$ZodCheckIncludes`,(e,t)=>{bK.init(e,t);let n=uG(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),kK=Z(`$ZodCheckStartsWith`,(e,t)=>{bK.init(e,t);let n=RegExp(`^${uG(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),AK=Z(`$ZodCheckEndsWith`,(e,t)=>{bK.init(e,t);let n=RegExp(`.*${uG(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),jK=Z(`$ZodCheckOverwrite`,(e,t)=>{bK.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),MK=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
184
|
+
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
185
|
+
`))}},NK={major:4,minor:3,patch:6},PK=Z(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=NK;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=bG(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new UW;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=bG(e,t))});else{if(e.issues.length===t)continue;r||=bG(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(bG(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new UW;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new UW;return o.then(e=>t(e,r,a))}return t(o,r,a)}}$W(e,`~standard`,()=>({validate:t=>{try{let n=IG(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return RG(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),FK=Z(`$ZodString`,(e,t)=>{PK.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??_K(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),IK=Z(`$ZodStringFormat`,(e,t)=>{wK.init(e,t),FK.init(e,t)}),LK=Z(`$ZodGUID`,(e,t)=>{t.pattern??=eK,IK.init(e,t)}),RK=Z(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=tK(e)}else t.pattern??=tK();IK.init(e,t)}),zK=Z(`$ZodEmail`,(e,t)=>{t.pattern??=nK,IK.init(e,t)}),BK=Z(`$ZodURL`,(e,t)=>{IK.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),VK=Z(`$ZodEmoji`,(e,t)=>{t.pattern??=iK(),IK.init(e,t)}),HK=Z(`$ZodNanoID`,(e,t)=>{t.pattern??=QG,IK.init(e,t)}),UK=Z(`$ZodCUID`,(e,t)=>{t.pattern??=qG,IK.init(e,t)}),WK=Z(`$ZodCUID2`,(e,t)=>{t.pattern??=JG,IK.init(e,t)}),GK=Z(`$ZodULID`,(e,t)=>{t.pattern??=YG,IK.init(e,t)}),KK=Z(`$ZodXID`,(e,t)=>{t.pattern??=XG,IK.init(e,t)}),qK=Z(`$ZodKSUID`,(e,t)=>{t.pattern??=ZG,IK.init(e,t)}),JK=Z(`$ZodISODateTime`,(e,t)=>{t.pattern??=gK(t),IK.init(e,t)}),YK=Z(`$ZodISODate`,(e,t)=>{t.pattern??=pK,IK.init(e,t)}),XK=Z(`$ZodISOTime`,(e,t)=>{t.pattern??=hK(t),IK.init(e,t)}),ZK=Z(`$ZodISODuration`,(e,t)=>{t.pattern??=$G,IK.init(e,t)}),QK=Z(`$ZodIPv4`,(e,t)=>{t.pattern??=aK,IK.init(e,t),e._zod.bag.format=`ipv4`}),$K=Z(`$ZodIPv6`,(e,t)=>{t.pattern??=oK,IK.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),eq=Z(`$ZodCIDRv4`,(e,t)=>{t.pattern??=sK,IK.init(e,t)}),tq=Z(`$ZodCIDRv6`,(e,t)=>{t.pattern??=cK,IK.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function nq(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var rq=Z(`$ZodBase64`,(e,t)=>{t.pattern??=lK,IK.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{nq(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function iq(e){if(!uK.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return nq(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var aq=Z(`$ZodBase64URL`,(e,t)=>{t.pattern??=uK,IK.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{iq(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),oq=Z(`$ZodE164`,(e,t)=>{t.pattern??=dK,IK.init(e,t)});function sq(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var cq=Z(`$ZodJWT`,(e,t)=>{IK.init(e,t),e._zod.check=n=>{sq(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),lq=Z(`$ZodUnknown`,(e,t)=>{PK.init(e,t),e._zod.parse=e=>e}),uq=Z(`$ZodNever`,(e,t)=>{PK.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function dq(e,t,n){e.issues.length&&t.issues.push(...xG(n,e.issues)),t.value[n]=e.value}var fq=Z(`$ZodArray`,(e,t)=>{PK.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>dq(t,n,e))):dq(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function pq(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...xG(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function mq(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=fG(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function hq(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>pq(e,n,i,t,u))):pq(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var gq=Z(`$ZodObject`,(e,t)=>{if(PK.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=YW(()=>mq(t));$W(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=aG,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>pq(n,t,e,s,r))):pq(i,t,e,s,r)}return i?hq(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),_q=Z(`$ZodObjectJIT`,(e,t)=>{gq.init(e,t);let n=e._zod.parse,r=YW(()=>mq(t)),i=e=>{let t=new MK([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=nG(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=nG(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
|
|
186
|
+
if (${n}.issues.length) {
|
|
187
|
+
if (${o} in input) {
|
|
188
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
189
|
+
...iss,
|
|
190
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
191
|
+
})));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if (${n}.value === undefined) {
|
|
196
|
+
if (${o} in input) {
|
|
197
|
+
newResult[${o}] = undefined;
|
|
198
|
+
}
|
|
199
|
+
} else {
|
|
200
|
+
newResult[${o}] = ${n}.value;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
`):t.write(`
|
|
204
|
+
if (${n}.issues.length) {
|
|
205
|
+
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
206
|
+
...iss,
|
|
207
|
+
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
208
|
+
})));
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (${n}.value === undefined) {
|
|
212
|
+
if (${o} in input) {
|
|
213
|
+
newResult[${o}] = undefined;
|
|
214
|
+
}
|
|
215
|
+
} else {
|
|
216
|
+
newResult[${o}] = ${n}.value;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=aG,s=!GW.jitless,c=s&&oG.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?hq([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function vq(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!bG(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>CG(e,r,KW())))}),t)}var yq=Z(`$ZodUnion`,(e,t)=>{PK.init(e,t),$W(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),$W(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),$W(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),$W(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>ZW(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>vq(t,i,e,a)):vq(s,i,e,a)}}),bq=Z(`$ZodIntersection`,(e,t)=>{PK.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Sq(e,t,n)):Sq(e,i,a)}});function xq(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(sG(e)&&sG(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=xq(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=xq(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Sq(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),bG(e))return e;let o=xq(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Cq=Z(`$ZodEnum`,(e,t)=>{PK.init(e,t);let n=qW(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>lG.has(typeof e)).map(e=>typeof e==`string`?uG(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),wq=Z(`$ZodTransform`,(e,t)=>{PK.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new WW(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new UW;return n.value=i,n}});function Tq(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var Eq=Z(`$ZodOptional`,(e,t)=>{PK.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,$W(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),$W(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ZW(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Tq(t,e.value)):Tq(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Dq=Z(`$ZodExactOptional`,(e,t)=>{Eq.init(e,t),$W(e._zod,`values`,()=>t.innerType._zod.values),$W(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Oq=Z(`$ZodNullable`,(e,t)=>{PK.init(e,t),$W(e._zod,`optin`,()=>t.innerType._zod.optin),$W(e._zod,`optout`,()=>t.innerType._zod.optout),$W(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ZW(e.source)}|null)$`):void 0}),$W(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),kq=Z(`$ZodDefault`,(e,t)=>{PK.init(e,t),e._zod.optin=`optional`,$W(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Aq(e,t)):Aq(r,t)}});function Aq(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var jq=Z(`$ZodPrefault`,(e,t)=>{PK.init(e,t),e._zod.optin=`optional`,$W(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Mq=Z(`$ZodNonOptional`,(e,t)=>{PK.init(e,t),$W(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Nq(t,e)):Nq(i,e)}});function Nq(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Pq=Z(`$ZodCatch`,(e,t)=>{PK.init(e,t),$W(e._zod,`optin`,()=>t.innerType._zod.optin),$W(e._zod,`optout`,()=>t.innerType._zod.optout),$W(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>CG(e,n,KW()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>CG(e,n,KW()))},input:e.value}),e.issues=[]),e)}}),Fq=Z(`$ZodPipe`,(e,t)=>{PK.init(e,t),$W(e._zod,`values`,()=>t.in._zod.values),$W(e._zod,`optin`,()=>t.in._zod.optin),$W(e._zod,`optout`,()=>t.out._zod.optout),$W(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Iq(e,t.in,n)):Iq(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Iq(e,t.out,n)):Iq(r,t.out,n)}});function Iq(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Lq=Z(`$ZodReadonly`,(e,t)=>{PK.init(e,t),$W(e._zod,`propValues`,()=>t.innerType._zod.propValues),$W(e._zod,`values`,()=>t.innerType._zod.values),$W(e._zod,`optin`,()=>t.innerType?._zod?.optin),$W(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Rq):Rq(r)}});function Rq(e){return e.value=Object.freeze(e.value),e}var zq=Z(`$ZodCustom`,(e,t)=>{bK.init(e,t),PK.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Bq(t,n,r,e));Bq(i,n,r,e)}});function Bq(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(TG(e))}}var Vq,Hq=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Uq(){return new Hq}(Vq=globalThis).__zod_globalRegistry??(Vq.__zod_globalRegistry=Uq());var Wq=globalThis.__zod_globalRegistry;function Gq(e,t){return new e({type:`string`,...Q(t)})}function Kq(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Q(t)})}function qq(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Q(t)})}function Jq(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Q(t)})}function Yq(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Q(t)})}function Xq(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Q(t)})}function Zq(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Q(t)})}function Qq(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Q(t)})}function $q(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Q(t)})}function eJ(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Q(t)})}function tJ(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Q(t)})}function nJ(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Q(t)})}function rJ(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Q(t)})}function iJ(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Q(t)})}function aJ(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Q(t)})}function oJ(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Q(t)})}function sJ(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Q(t)})}function cJ(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Q(t)})}function lJ(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Q(t)})}function uJ(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Q(t)})}function dJ(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Q(t)})}function fJ(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Q(t)})}function pJ(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Q(t)})}function mJ(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Q(t)})}function hJ(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Q(t)})}function gJ(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Q(t)})}function _J(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Q(t)})}function vJ(e){return new e({type:`unknown`})}function yJ(e,t){return new e({type:`never`,...Q(t)})}function bJ(e,t){return new xK({check:`max_length`,...Q(t),maximum:e})}function xJ(e,t){return new SK({check:`min_length`,...Q(t),minimum:e})}function SJ(e,t){return new CK({check:`length_equals`,...Q(t),length:e})}function CJ(e,t){return new TK({check:`string_format`,format:`regex`,...Q(t),pattern:e})}function wJ(e){return new EK({check:`string_format`,format:`lowercase`,...Q(e)})}function TJ(e){return new DK({check:`string_format`,format:`uppercase`,...Q(e)})}function EJ(e,t){return new OK({check:`string_format`,format:`includes`,...Q(t),includes:e})}function DJ(e,t){return new kK({check:`string_format`,format:`starts_with`,...Q(t),prefix:e})}function OJ(e,t){return new AK({check:`string_format`,format:`ends_with`,...Q(t),suffix:e})}function kJ(e){return new jK({check:`overwrite`,tx:e})}function AJ(e){return kJ(t=>t.normalize(e))}function jJ(){return kJ(e=>e.trim())}function MJ(){return kJ(e=>e.toLowerCase())}function NJ(){return kJ(e=>e.toUpperCase())}function PJ(){return kJ(e=>rG(e))}function FJ(e,t,n){return new e({type:`array`,element:t,...Q(n)})}function IJ(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Q(n)})}function LJ(e){let t=RJ(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(TG(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(TG(r))}},e(n.value,n)));return t}function RJ(e,t){let n=new bK({check:`custom`,...Q(t)});return n._zod.check=e,n}function zJ(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Wq,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function BJ(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,BJ(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&UJ(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function VJ(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
220
|
+
|
|
221
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function HJ(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:GJ(t,`input`,e.processors),output:GJ(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function UJ(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return UJ(r.element,n);if(r.type===`set`)return UJ(r.valueType,n);if(r.type===`lazy`)return UJ(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return UJ(r.innerType,n);if(r.type===`intersection`)return UJ(r.left,n)||UJ(r.right,n);if(r.type===`record`||r.type===`map`)return UJ(r.keyType,n)||UJ(r.valueType,n);if(r.type===`pipe`)return UJ(r.in,n)||UJ(r.out,n);if(r.type===`object`){for(let e in r.shape)if(UJ(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(UJ(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(UJ(e,n))return!0;return!!(r.rest&&UJ(r.rest,n))}return!1}var WJ=(e,t={})=>n=>{let r=zJ({...n,processors:t});return BJ(e,r),VJ(r,e),HJ(r,e)},GJ=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=zJ({...i??{},target:a,io:t,processors:n});return BJ(e,o),VJ(o,e),HJ(o,e)},KJ={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},qJ=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=KJ[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},JJ=(e,t,n,r)=>{n.not={}},YJ=(e,t,n,r)=>{let i=e._zod.def,a=qW(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},XJ=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},ZJ=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},QJ=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=BJ(a.element,t,{...r,path:[...r.path,`items`]})},$J=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=BJ(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=BJ(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},eY=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>BJ(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},tY=(e,t,n,r)=>{let i=e._zod.def,a=BJ(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=BJ(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},nY=(e,t,n,r)=>{let i=e._zod.def,a=BJ(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},rY=(e,t,n,r)=>{let i=e._zod.def;BJ(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},iY=(e,t,n,r)=>{let i=e._zod.def;BJ(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},aY=(e,t,n,r)=>{let i=e._zod.def;BJ(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},oY=(e,t,n,r)=>{let i=e._zod.def;BJ(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},sY=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;BJ(a,t,r);let o=t.seen.get(e);o.ref=a},cY=(e,t,n,r)=>{let i=e._zod.def;BJ(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},lY=(e,t,n,r)=>{let i=e._zod.def;BJ(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType};function uY(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function dY(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(`.`);if(!n[o])if(`unionErrors`in r){var s=r.unionErrors[0].errors[0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if(`unionErrors`in r&&r.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=HU(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n}function fY(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(`.`);if(!n[o])if(r.code===`invalid_union`&&r.errors.length>0){var s=r.errors[0][0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if(r.code===`invalid_union`&&r.errors.forEach(function(t){return t.forEach(function(t){return e.push(t)})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=HU(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n}function pY(e,t,n){if(n===void 0&&(n={}),function(e){return`_def`in e&&typeof e._def==`object`&&`typeName`in e._def}(e))return function(r,i,a){try{return Promise.resolve(uY(function(){return Promise.resolve(e[n.mode===`sync`?`parse`:`parseAsync`](r,t)).then(function(e){return a.shouldUseNativeValidation&&zW({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return Array.isArray(e?.issues)}(e))return{values:{},errors:BW(dY(e.errors,!a.shouldUseNativeValidation&&a.criteriaMode===`all`),a)};throw e}))}catch(e){return Promise.reject(e)}};if(function(e){return`_zod`in e&&typeof e._zod==`object`}(e))return function(r,i,a){try{return Promise.resolve(uY(function(){return Promise.resolve((n.mode===`sync`?MG:PG)(e,r,t)).then(function(e){return a.shouldUseNativeValidation&&zW({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return e instanceof DG}(e))return{values:{},errors:BW(fY(e.issues,!a.shouldUseNativeValidation&&a.criteriaMode===`all`),a)};throw e}))}catch(e){return Promise.reject(e)}};throw Error(`Invalid input: not a Zod schema`)}var mY=async e=>e&&typeof e.then==`function`?await e:e,hY=({schema:e,onSubmit:t,onSubmitSuccess:n,onSubmitError:r,className:i,children:a,autoComplete:o,...s})=>{let c=async i=>{let a=e?.safeParse(i)??{success:!0,data:void 0};await mY(t?.(i)),a.success?await mY(n?.(a.data)):await mY(r?.(Error(a.error.issues.map(e=>e.message).join(`, `))))};return(0,v.jsx)(VU,{...s,children:(0,v.jsx)(`form`,{className:B(`flex flex-col gap-y-6`,i),onSubmit:s.handleSubmit(c),autoComplete:o?`on`:`off`,noValidate:!0,children:a})})},gY=(e,t)=>{let n=NW({resolver:pY(e),...t}),{isSubmitting:r,isSubmitted:i,isLoading:a,isValid:o}=jU({control:n.control});return{form:n,isSubmitting:r,isSubmitted:i,isLoading:a,isValid:o}},_Y=({className:e,...t})=>{let{error:n,formItemId:r}=IW();return(0,v.jsx)(Nb,{className:B(`mb-2`,n&&`text-error`,e),htmlFor:r,...t})},vY=({isRequired:e})=>e?(0,v.jsx)(`span`,{"aria-label":`Asterisk meaning the field is required`,children:`*`}):(0,v.jsx)(v.Fragment,{}),yY=({children:e,isRequired:t,info:n,htmlFor:r,className:i})=>(0,v.jsxs)(`div`,{className:`ml-1 flex gap-1 align-middle text-base leading-none`,children:[e&&(0,v.jsxs)(_Y,{htmlFor:r,id:`${r}-label`,suppressHydrationWarning:!0,className:B(`font-bold`,i),children:[e,(0,v.jsx)(vY,{isRequired:t})]}),n&&(0,v.jsx)(LW,{content:n})]}),bY=({label:e,description:t,isRequired:n,info:r,children:i,showErrorMessage:a=!0,htmlFor:o})=>(0,v.jsxs)($.Item,{className:`flex w-full flex-col flex-wrap gap-2 px-1 py-2`,children:[(t||e)&&(0,v.jsxs)(`div`,{className:`flex flex-col gap-1 p-1 leading-none`,children:[e&&(0,v.jsx)(yY,{isRequired:n,info:r,htmlFor:o,children:e}),t&&(0,v.jsx)($.Description,{children:t})]}),(0,v.jsx)($.Control,{children:i}),a&&(0,v.jsx)($.Message,{"data-testid":`error-message`})]}),xY=({field:e,name:t,label:n,Element:r,isRequired:i=!1,info:a,description:o,showErrorMessage:s=!0,...c})=>{let{error:l}=IW(),{value:u,onChange:d,...f}=e??{},p=c,m=p.value===void 0?u??``:p.value,h=(...e)=>{typeof d==`function`&&d(...e),typeof p.onChange==`function`&&p.onChange(...e)};return(0,v.jsx)(bY,{htmlFor:t,label:n,description:o,isRequired:i,info:a,showErrorMessage:s,"aria-invalid":!!l,children:(0,v.jsx)(r,{"data-testid":`element`,id:t,...f,...c,value:m,onChange:h,children:c.children})})},SY=e=>{let{control:t}=BU();return(0,v.jsx)($.Field,{control:t,name:e.name,render:({field:t})=>(0,v.jsx)(xY,{...e,field:t})})},CY=e=>(0,v.jsx)(SY,{id:e.name,"data-testid":e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,Element:$h,...e}),wY=e=>(0,v.jsx)(SY,{id:e.name,"data-testid":e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,Element:bg,...e}),TY=e=>(0,v.jsx)(SY,{id:e.name,"data-testid":e.name,Element:wd,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),EY=({autoComplete:e,...t})=>(0,v.jsx)(SY,{Element:Td,id:t.name,"data-testid":t.name,"aria-labelledby":t.label?`${t.name}-label`:void 0,"aria-label":t.label?void 0:t.name,autoComplete:e,minLength:6,maxLength:255,...t}),DY=e=>e?.getAttribute(`aria-selected`)===`true`,OY=({field:e,name:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,children:s,slots:c=6,maxLength:l=6,...u})=>{let{error:d}=IW(),f=(0,m.useRef)([]),{choiceIndicatorPosition:p,calculatePosition:h}=Wh(f,{selector:DY,isHoverable:!0});return(0,m.useEffect)(()=>{h()},[]),(0,v.jsx)(bY,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!d,children:(0,v.jsx)(Ld,{onChange:e.onChange,defaultValue:e.value,maxLength:l,pattern:`^[0-9]+$`,onActiveSlotChange:h,...u,children:s??(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(Rd,{children:[(0,v.jsx)(zd,{index:0,ref:e=>{f.current[0]=e}}),(0,v.jsx)(zd,{index:1,ref:e=>{f.current[1]=e}}),(0,v.jsx)(zd,{index:2,ref:e=>{f.current[2]=e}})]}),(0,v.jsx)(Bd,{}),(0,v.jsxs)(Rd,{children:[(0,v.jsx)(zd,{index:3,ref:e=>{f.current[3]=e}}),(0,v.jsx)(zd,{index:4,ref:e=>{f.current[4]=e}}),(0,v.jsx)(zd,{index:5,ref:e=>{f.current[5]=e}})]}),p&&(0,v.jsx)(Vd,{style:p})]})})})},kY=({name:e,description:t,label:n,isRequired:r,info:i,showErrorMessage:a,children:o,slots:s=6,maxLength:c=6,...l})=>{let{control:u}=BU();return(0,v.jsx)($.Field,{control:u,name:e,render:({field:u})=>(0,v.jsx)(OY,{field:u,name:e,label:n,description:t,isRequired:r,info:i,showErrorMessage:a,slots:s,maxLength:c,...l,children:o})})},AY=e=>(0,v.jsx)(SY,{id:e.name,"data-testid":e.name,Element:Hd,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),jY=e=>(0,v.jsx)(SY,{Element:gg,id:e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,"data-testid":e.name,...e}),MY=e=>(0,v.jsx)(SY,{Element:yg,id:e.name,"data-testid":e.name,...e}),NY=({inputLabel:e,value:t,onChange:n,...r})=>(0,v.jsx)(bd,{...r,label:e,checked:!!t,onChange:n}),PY=({autoComplete:e,...t})=>(0,v.jsx)(SY,{Element:NY,id:t.name,"data-testid":t.name,autoComplete:e,...t}),FY=({field:e,name:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c})=>{let{error:l}=IW();return(0,v.jsx)(bY,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!l,children:(0,v.jsx)(fx,{onValueChange:e.onChange,values:e.value,...c,children:s})})},IY=({name:e,description:t,label:n,isRequired:r,info:i,showErrorMessage:a,children:o,...s})=>{let{control:c}=BU();return(0,v.jsx)($.Field,{control:c,name:e,render:({field:c})=>(0,v.jsx)(FY,{field:c,name:e,label:n,description:t,isRequired:r,info:i,showErrorMessage:a,...s,children:o})})},LY=({field:e,name:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c})=>{let{error:l}=IW();return(0,v.jsx)(bY,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!l,children:(0,v.jsx)(q,{onValueChange:e.onChange,defaultValue:e.value,...c,children:s})})},RY=({name:e,description:t,label:n,isRequired:r,info:i,showErrorMessage:a,children:o,...s})=>{let{control:c}=BU();return(0,v.jsx)($.Field,{control:c,name:e,render:({field:c})=>(0,v.jsx)(LY,{field:c,name:e,label:n,description:t,isRequired:r,info:i,showErrorMessage:a,...s,children:o})})},zY=({field:e,name:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c})=>{let{error:l}=IW();return(0,v.jsx)(bY,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!l,children:(0,v.jsx)(Zh,{...e,...c,children:s})})},BY=({name:e,description:t,label:n,isRequired:r,info:i,showErrorMessage:a,children:o,...s})=>{let{control:c}=BU();return(0,v.jsx)($.Field,{control:c,name:e,render:({field:c})=>(0,v.jsx)(zY,{field:c,name:e,label:n,description:t,isRequired:r,info:i,showErrorMessage:a,...s,children:o})})},VY=Symbol.for(`react.lazy`),HY=m.use;function UY(e){return typeof e==`object`&&!!e&&`then`in e}function WY(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===VY&&`_payload`in e&&UY(e._payload)}function GY(e){let t=qY(e),n=m.forwardRef((e,n)=>{let{children:r,...i}=e;WY(r)&&typeof HY==`function`&&(r=HY(r._payload));let a=m.Children.toArray(r),o=a.find(YY);if(o){let e=o.props.children,r=a.map(t=>t===o?m.Children.count(e)>1?m.Children.only(null):m.isValidElement(e)?e.props.children:null:t);return(0,v.jsx)(t,{...i,ref:n,children:m.isValidElement(e)?m.cloneElement(e,void 0,r):null})}return(0,v.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var KY=GY(`Slot`);function qY(e){let t=m.forwardRef((e,t)=>{let{children:n,...r}=e;if(WY(n)&&typeof HY==`function`&&(n=HY(n._payload)),m.isValidElement(n)){let e=ZY(n),i=XY(r,n.props);return n.type!==m.Fragment&&(i.ref=t?Gs(t,e):e),m.cloneElement(n,i)}return m.Children.count(n)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var JY=Symbol(`radix.slottable`);function YY(e){return m.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===JY}function XY(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function ZY(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)}var QY=e=>{let{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=IW();return(0,v.jsx)(KY,{id:n,"aria-describedby":t?`${r} ${i}`:`${r}`,"aria-invalid":!!t,...e})},$Y=e=>{let{formDescriptionId:t}=IW();return(0,v.jsx)(`p`,{className:`text-neutral text-sm`,id:t,...e})},eX=({children:e,...t})=>{let{error:n,formMessageId:r}=IW(),i=n?String(n?.message??``):e;return i?(0,v.jsx)(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:r,...t,children:i}):null},$=hY;$.Description=$Y,$.Control=QY,$.Field=FW,$.Item=nU,$.Label=yY,$.Message=eX,$.Element=SY,$.Input=TY,$.InputPassword=EY,$.Checkbox=PY,$.TextArea=jY,$.AutoSizedTextArea=MY,$.Button=Ju,$.Select=RY,$.MultiSelect=IY,$.EditableFieldInput=CY,$.EditableFieldTextArea=wY,$.SwitchSelector=BY,$.OTP=kY,$.SearchInput=AY;var tX=Z(`ZodISODateTime`,(e,t)=>{JK.init(e,t),DX.init(e,t)});function nX(e){return mJ(tX,e)}var rX=Z(`ZodISODate`,(e,t)=>{YK.init(e,t),DX.init(e,t)});function iX(e){return hJ(rX,e)}var aX=Z(`ZodISOTime`,(e,t)=>{XK.init(e,t),DX.init(e,t)});function oX(e){return gJ(aX,e)}var sX=Z(`ZodISODuration`,(e,t)=>{ZK.init(e,t),DX.init(e,t)});function cX(e){return _J(sX,e)}var lX=(e,t)=>{DG.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>AG(e,t)},flatten:{value:t=>kG(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,JW,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,JW,2)}},isEmpty:{get(){return e.issues.length===0}}})};Z(`ZodError`,lX);var uX=Z(`ZodError`,lX,{Parent:Error}),dX=jG(uX),fX=NG(uX),pX=FG(uX),mX=LG(uX),hX=zG(uX),gX=BG(uX),_X=VG(uX),vX=HG(uX),yX=UG(uX),bX=WG(uX),xX=GG(uX),SX=KG(uX),CX=Z(`ZodType`,(e,t)=>(PK.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:GJ(e,`input`),output:GJ(e,`output`)}}),e.toJSONSchema=WJ(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(tG(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>dG(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>dX(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>pX(e,t,n),e.parseAsync=async(t,n)=>fX(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>mX(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>hX(e,t,n),e.decode=(t,n)=>gX(e,t,n),e.encodeAsync=async(t,n)=>_X(e,t,n),e.decodeAsync=async(t,n)=>vX(e,t,n),e.safeEncode=(t,n)=>yX(e,t,n),e.safeDecode=(t,n)=>bX(e,t,n),e.safeEncodeAsync=async(t,n)=>xX(e,t,n),e.safeDecodeAsync=async(t,n)=>SX(e,t,n),e.refine=(t,n)=>e.check(OZ(t,n)),e.superRefine=t=>e.check(kZ(t)),e.overwrite=t=>e.check(kJ(t)),e.optional=()=>uZ(e),e.exactOptional=()=>fZ(e),e.nullable=()=>mZ(e),e.nullish=()=>uZ(mZ(e)),e.nonoptional=t=>bZ(e,t),e.array=()=>QX(e),e.or=t=>nZ([e,t]),e.and=t=>iZ(e,t),e.transform=t=>wZ(e,cZ(t)),e.default=t=>gZ(e,t),e.prefault=t=>vZ(e,t),e.catch=t=>SZ(e,t),e.pipe=t=>wZ(e,t),e.readonly=()=>EZ(e),e.describe=t=>{let n=e.clone();return Wq.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return Wq.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return Wq.get(e);let n=e.clone();return Wq.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),wX=Z(`_ZodString`,(e,t)=>{FK.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qJ(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(CJ(...t)),e.includes=(...t)=>e.check(EJ(...t)),e.startsWith=(...t)=>e.check(DJ(...t)),e.endsWith=(...t)=>e.check(OJ(...t)),e.min=(...t)=>e.check(xJ(...t)),e.max=(...t)=>e.check(bJ(...t)),e.length=(...t)=>e.check(SJ(...t)),e.nonempty=(...t)=>e.check(xJ(1,...t)),e.lowercase=t=>e.check(wJ(t)),e.uppercase=t=>e.check(TJ(t)),e.trim=()=>e.check(jJ()),e.normalize=(...t)=>e.check(AJ(...t)),e.toLowerCase=()=>e.check(MJ()),e.toUpperCase=()=>e.check(NJ()),e.slugify=()=>e.check(PJ())}),TX=Z(`ZodString`,(e,t)=>{FK.init(e,t),wX.init(e,t),e.email=t=>e.check(Kq(OX,t)),e.url=t=>e.check(Qq(jX,t)),e.jwt=t=>e.check(pJ(KX,t)),e.emoji=t=>e.check($q(MX,t)),e.guid=t=>e.check(qq(kX,t)),e.uuid=t=>e.check(Jq(AX,t)),e.uuidv4=t=>e.check(Yq(AX,t)),e.uuidv6=t=>e.check(Xq(AX,t)),e.uuidv7=t=>e.check(Zq(AX,t)),e.nanoid=t=>e.check(eJ(NX,t)),e.guid=t=>e.check(qq(kX,t)),e.cuid=t=>e.check(tJ(PX,t)),e.cuid2=t=>e.check(nJ(FX,t)),e.ulid=t=>e.check(rJ(IX,t)),e.base64=t=>e.check(uJ(UX,t)),e.base64url=t=>e.check(dJ(WX,t)),e.xid=t=>e.check(iJ(LX,t)),e.ksuid=t=>e.check(aJ(RX,t)),e.ipv4=t=>e.check(oJ(zX,t)),e.ipv6=t=>e.check(sJ(BX,t)),e.cidrv4=t=>e.check(cJ(VX,t)),e.cidrv6=t=>e.check(lJ(HX,t)),e.e164=t=>e.check(fJ(GX,t)),e.datetime=t=>e.check(nX(t)),e.date=t=>e.check(iX(t)),e.time=t=>e.check(oX(t)),e.duration=t=>e.check(cX(t))});function EX(e){return Gq(TX,e)}var DX=Z(`ZodStringFormat`,(e,t)=>{IK.init(e,t),wX.init(e,t)}),OX=Z(`ZodEmail`,(e,t)=>{zK.init(e,t),DX.init(e,t)}),kX=Z(`ZodGUID`,(e,t)=>{LK.init(e,t),DX.init(e,t)}),AX=Z(`ZodUUID`,(e,t)=>{RK.init(e,t),DX.init(e,t)}),jX=Z(`ZodURL`,(e,t)=>{BK.init(e,t),DX.init(e,t)}),MX=Z(`ZodEmoji`,(e,t)=>{VK.init(e,t),DX.init(e,t)}),NX=Z(`ZodNanoID`,(e,t)=>{HK.init(e,t),DX.init(e,t)}),PX=Z(`ZodCUID`,(e,t)=>{UK.init(e,t),DX.init(e,t)}),FX=Z(`ZodCUID2`,(e,t)=>{WK.init(e,t),DX.init(e,t)}),IX=Z(`ZodULID`,(e,t)=>{GK.init(e,t),DX.init(e,t)}),LX=Z(`ZodXID`,(e,t)=>{KK.init(e,t),DX.init(e,t)}),RX=Z(`ZodKSUID`,(e,t)=>{qK.init(e,t),DX.init(e,t)}),zX=Z(`ZodIPv4`,(e,t)=>{QK.init(e,t),DX.init(e,t)}),BX=Z(`ZodIPv6`,(e,t)=>{$K.init(e,t),DX.init(e,t)}),VX=Z(`ZodCIDRv4`,(e,t)=>{eq.init(e,t),DX.init(e,t)}),HX=Z(`ZodCIDRv6`,(e,t)=>{tq.init(e,t),DX.init(e,t)}),UX=Z(`ZodBase64`,(e,t)=>{rq.init(e,t),DX.init(e,t)}),WX=Z(`ZodBase64URL`,(e,t)=>{aq.init(e,t),DX.init(e,t)}),GX=Z(`ZodE164`,(e,t)=>{oq.init(e,t),DX.init(e,t)}),KX=Z(`ZodJWT`,(e,t)=>{cq.init(e,t),DX.init(e,t)}),qX=Z(`ZodUnknown`,(e,t)=>{lq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function JX(){return vJ(qX)}var YX=Z(`ZodNever`,(e,t)=>{uq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>JJ(e,t,n,r)});function XX(e){return yJ(YX,e)}var ZX=Z(`ZodArray`,(e,t)=>{fq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QJ(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(xJ(t,n)),e.nonempty=t=>e.check(xJ(1,t)),e.max=(t,n)=>e.check(bJ(t,n)),e.length=(t,n)=>e.check(SJ(t,n)),e.unwrap=()=>e.element});function QX(e,t){return FJ(ZX,e,t)}var $X=Z(`ZodObject`,(e,t)=>{_q.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$J(e,t,n,r),$W(e,`shape`,()=>t.shape),e.keyof=()=>oZ(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:JX()}),e.loose=()=>e.clone({...e._zod.def,catchall:JX()}),e.strict=()=>e.clone({...e._zod.def,catchall:XX()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>hG(e,t),e.safeExtend=t=>gG(e,t),e.merge=t=>_G(e,t),e.pick=t=>pG(e,t),e.omit=t=>mG(e,t),e.partial=(...t)=>vG(lZ,e,t[0]),e.required=(...t)=>yG(yZ,e,t[0])});function eZ(e,t){return new $X({type:`object`,shape:e??{},...Q(t)})}var tZ=Z(`ZodUnion`,(e,t)=>{yq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eY(e,t,n,r),e.options=t.options});function nZ(e,t){return new tZ({type:`union`,options:e,...Q(t)})}var rZ=Z(`ZodIntersection`,(e,t)=>{bq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tY(e,t,n,r)});function iZ(e,t){return new rZ({type:`intersection`,left:e,right:t})}var aZ=Z(`ZodEnum`,(e,t)=>{Cq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YJ(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new aZ({...t,checks:[],...Q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new aZ({...t,checks:[],...Q(r),entries:i})}});function oZ(e,t){return new aZ({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var sZ=Z(`ZodTransform`,(e,t)=>{wq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZJ(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new WW(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(TG(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(TG(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function cZ(e){return new sZ({type:`transform`,transform:e})}var lZ=Z(`ZodOptional`,(e,t)=>{Eq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lY(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uZ(e){return new lZ({type:`optional`,innerType:e})}var dZ=Z(`ZodExactOptional`,(e,t)=>{Dq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lY(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fZ(e){return new dZ({type:`optional`,innerType:e})}var pZ=Z(`ZodNullable`,(e,t)=>{Oq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nY(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function mZ(e){return new pZ({type:`nullable`,innerType:e})}var hZ=Z(`ZodDefault`,(e,t)=>{kq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iY(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function gZ(e,t){return new hZ({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():cG(t)}})}var _Z=Z(`ZodPrefault`,(e,t)=>{jq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aY(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vZ(e,t){return new _Z({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():cG(t)}})}var yZ=Z(`ZodNonOptional`,(e,t)=>{Mq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rY(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bZ(e,t){return new yZ({type:`nonoptional`,innerType:e,...Q(t)})}var xZ=Z(`ZodCatch`,(e,t)=>{Pq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oY(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function SZ(e,t){return new xZ({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var CZ=Z(`ZodPipe`,(e,t)=>{Fq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sY(e,t,n,r),e.in=t.in,e.out=t.out});function wZ(e,t){return new CZ({type:`pipe`,in:e,out:t})}var TZ=Z(`ZodReadonly`,(e,t)=>{Lq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cY(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function EZ(e){return new TZ({type:`readonly`,innerType:e})}var DZ=Z(`ZodCustom`,(e,t)=>{zq.init(e,t),CX.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XJ(e,t,n,r)});function OZ(e,t={}){return IJ(DZ,e,t)}function kZ(e){return LJ(e)}var AZ={key:`save-dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"en-GB":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"fr":{"deleteButton":{"text":"Supprimer le dictionnaire","label":"Cliquez pour supprimer le dictionnaire"},"resetButton":{"text":"Réinitialiser toutes les modifications","label":"Cliquez pour réinitialiser toutes les modifications"},"saveButton":{"text":"Enregistrer les modifications","label":"Cliquez pour enregistrer les modifications"},"publishButton":{"text":"Publier dictionnaire","label":"Cliquez pour publier dictionnaire"},"downloadButton":{"text":"Télécharger","label":"Cliquez pour télécharger"},"confirmation":{"title":"Confirmation","message":"Cela remplacera le dictionnaire existant. Êtes-vous sûr de vouloir continuer?","confirmButton":{"text":"Confirmer","label":"Cliquez pour confirmer"},"cancelButton":{"text":"Annuler","label":"Cliquez pour annuler"}}},"es":{"deleteButton":{"text":"Eliminar diccionario","label":"Haga clic para eliminar el diccionario"},"resetButton":{"text":"Restablecer todas las modificaciones","label":"Haga clic para restablecer todas las modificaciones"},"saveButton":{"text":"Guardar cambios","label":"Haga clic para guardar cambios"},"publishButton":{"text":"Publicar diccionario","label":"Haga clic para publicar diccionario"},"downloadButton":{"text":"Descargar","label":"Haga clic para descargar"},"confirmation":{"title":"Confirmación","message":"Esto sobrescribirá el diccionario existente. ¿Estás seguro de que quieres continuar?","confirmButton":{"text":"Confirmar","label":"Haga clic para confirmar"},"cancelButton":{"text":"Cancelar","label":"Haga clic para cancelar"}}},"de":{"deleteButton":{"text":"Wörterbuch löschen","label":"Klicken Sie, um das Wörterbuch zu löschen"},"resetButton":{"text":"Alle Änderungen zurücksetzen","label":"Klicken Sie, um alle Änderungen zurückzusetzen"},"saveButton":{"text":"Änderungen speichern","label":"Klicken Sie, um Änderungen zu speichern"},"publishButton":{"text":"Wörterbuch veröffentlichen","label":"Klicken Sie, um das Wörterbuch zu veröffentlichen"},"downloadButton":{"text":"Herunterladen","label":"Klicken Sie, um herunterzuladen"},"confirmation":{"title":"Bestätigung","message":"Dies wird das existierende Wörterbuch überschreiben. Sind Sie sicher, dass Sie fortfahren möchten?","confirmButton":{"text":"Bestätigen","label":"Klicken Sie, um zu bestätigen"},"cancelButton":{"text":"Abbrechen","label":"Klicken Sie, um abzubrechen"}}},"ja":{"deleteButton":{"text":"辞書を削除","label":"辞書を削除するにはクリックしてください"},"resetButton":{"text":"すべての変更をリセット","label":"すべての変更をリセットするにはクリックしてください"},"saveButton":{"text":"変更を保存","label":"変更を保存するにはクリックしてください"},"publishButton":{"text":"辞書を公開","label":"辞書を公開するにはクリックしてください"},"downloadButton":{"text":"ダウンロード","label":"ダウンロードするにはクリックしてください"},"confirmation":{"title":"確認","message":"既存の辞書を上書きします。続行しますか?","confirmButton":{"text":"確認","label":"確認するにはクリックしてください"},"cancelButton":{"text":"キャンセル","label":"キャンセルするにはクリックしてください"}}},"ko":{"deleteButton":{"text":"사전 삭제","label":"사전을 삭제하려면 클릭하세요"},"resetButton":{"text":"모든 변경 사항 초기화","label":"모든 변경 사항을 초기화하려면 클릭하세요"},"saveButton":{"text":"변경 사항 저장","label":"변경 사항을 저장하려면 클릭하세요"},"publishButton":{"text":"사전을 게시합니다","label":"사전을 게시하려면 클릭하세요"},"downloadButton":{"text":"다운로드","label":"다운로드를 클릭하세요"},"confirmation":{"title":"확인","message":"이는 기존 사전을 덮어 쓸 것입니다. 계속하시겠습니까?","confirmButton":{"text":"확인","label":"확인을 클릭하세요"},"cancelButton":{"text":"취소","label":"취소를 클릭하세요"}}},"zh":{"deleteButton":{"text":"删除字典","label":"单击以删除字典"},"resetButton":{"text":"重置所有更改","label":"单击以重置所有更改"},"saveButton":{"text":"保存更改","label":"单击保存更改"},"publishButton":{"text":"发布字典","label":"单击以发布字典"},"downloadButton":{"text":"下载","label":"单击下载"},"confirmation":{"title":"确认","message":"这将覆盖现有的字典。你确定要继续吗?","confirmButton":{"text":"确认","label":"单击确认"},"cancelButton":{"text":"取消","label":"单击取消"}}},"it":{"deleteButton":{"text":"Elimina dizionario","label":"Fai clic per eliminare il dizionario"},"resetButton":{"text":"Reimposta tutte le modifiche","label":"Fai clic per ripristinare tutte le modifiche"},"saveButton":{"text":"Salva le modifiche","label":"Fai clic per salvare le modifiche"},"publishButton":{"text":"Pubblica dizionario","label":"Fai clic per pubblicare il dizionario"},"downloadButton":{"text":"Scarica","label":"Fai clic per scaricare"},"confirmation":{"title":"Conferma","message":"Questo sovrascriverà il dizionario esistente. Sei sicuro di voler continuare?","confirmButton":{"text":"Conferma","label":"Fai clic per confermare"},"cancelButton":{"text":"Annulla","label":"Fai clic per annullare"}}},"pt":{"deleteButton":{"text":"Excluir dicionário","label":"Clique para excluir o dicionário"},"resetButton":{"text":"Redefinir todas as alterações","label":"Clique para redefinir todas as alterações"},"saveButton":{"text":"Salvar alterações","label":"Clique para salvar alterações"},"publishButton":{"text":"Publicar dicionário","label":"Clique para publicar dicionário"},"downloadButton":{"text":"Baixar","label":"Clique para baixar"},"confirmation":{"title":"Confirmação","message":"Isso sobrescreverá o dicionário existente. Você tem certeza de que deseja continuar?","confirmButton":{"text":"Confirmar","label":"Clique para confirmar"},"cancelButton":{"text":"Cancelar","label":"Clique para cancelar"}}},"hi":{"deleteButton":{"text":"शब्दकोश हटाएं","label":"शब्दकोश हटाने के लिए क्लिक करें"},"resetButton":{"text":"सभी परिवर्तनों को रीसेट करें","label":"सभी परिवर्तनों को रीसेट करने के लिए क्लिक करें"},"saveButton":{"text":"परिवर्तनों को सहेजें","label":"परिवर्तनों को सहेजने के लिए क्लिक करें"},"publishButton":{"text":"शब्दकोश प्रकाशित करें","label":"शब्दकोश प्रकाशित करने के लिए क्लिक करें"},"downloadButton":{"text":"डाउनलोड","label":"डाउनलोड करने के लिए क्लिक करें"},"confirmation":{"title":"पुष्टि करें","message":"यह मौजूदा शब्दकोश को अधिलेखित कर देगा। क्या आप जारी रखना चाहते हैं?","confirmButton":{"text":"पुष्टि करें","label":"पुष्टि करने के लिए क्लिक करें"},"cancelButton":{"text":"रद्द करें","label":"रद्द करने के लिए क्लिक करें"}}},"ar":{"deleteButton":{"text":"حذف القاموس","label":"انقر لحذف القاموس"},"resetButton":{"text":"إعادة تعيين جميع التغييرات","label":"انقر لإعادة تعيين جميع التغييرات"},"saveButton":{"text":"احفظ التغييرات","label":"انقر لحفظ التغييرات"},"publishButton":{"text":"نشر القاموس","label":"انقر لنشر القاموس"},"downloadButton":{"text":"تنزيل","label":"انقر لتنزيل"},"confirmation":{"title":"تأكيد","message":"سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟","confirmButton":{"text":"تأكيد","label":"انقر لتأكيد"},"cancelButton":{"text":"إلغاء","label":"انقر لإلغاء"}}},"ru":{"deleteButton":{"text":"Удалить словарь","label":"Нажмите, чтобы удалить словарь"},"resetButton":{"text":"Сбросить все изменения","label":"Нажмите, чтобы сбросить все изменения"},"saveButton":{"text":"Сохранить изменения","label":"Нажмите, чтобы сохранить изменения"},"publishButton":{"text":"Опубликовать словарь","label":"Нажмите, чтобы опубликовать словарь"},"downloadButton":{"text":"Скачать","label":"Нажмите, чтобы скачать"},"confirmation":{"title":"Подтверждение","message":"Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?","confirmButton":{"text":"Подтвердить","label":"Нажмите, чтобы подтвердить"},"cancelButton":{"text":"Отмена","label":"Нажмите, чтобы отменить"}}}}}`),localIds:[`save-dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs`]},jZ=({dictionary:e,mode:t,className:n,onDelete:r,onSave:i,...a})=>{let[o,s]=(0,m.useState)(!1),{setLocaleDictionary:c}=Mv(),{mutate:l,isPending:u}=xH(),{mutate:d,isPending:f}=EH(),{mutate:p,isPending:h}=bH(),g=f||h,{editedContent:_,restoreEditedContent:y}=zv(),{deleteButton:b,resetButton:x,saveButton:S,publishButton:C,downloadButton:w,confirmation:T}=mr(AZ),{isAuthenticated:E}=pH(),D=_?.[e.localId],O=D&&JSON.stringify(D)!==JSON.stringify(e),k=e?.id!==void 0,A=async()=>{_?.[e.localId]&&d({dictionary:{...e,..._?.[e.localId]}},{onSuccess:()=>{c(_?.[e.localId]),y(e.localId),s(!1),i?.()}})},j=()=>{let t={...e,..._?.[e.localId]};p({dictionaries:[t]},{onSuccess:n=>{n&&(c(t),y(e.localId),i?.())}})},M=()=>{e.id&&l({dictionaryId:e.id},{onSuccess:e=>{e&&r?.()}})};return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(mL,{isOpen:o,title:T.title.value,size:uL.MD,onClose:()=>s(!1),padding:`md`,children:(0,v.jsxs)(`form`,{className:`size-full`,children:[(0,v.jsx)(`p`,{className:`py-4 text-neutral text-sm`,children:T.message}),(0,v.jsxs)(`div`,{className:`mt-12 flex justify-end gap-2 max-md:flex-col`,children:[(0,v.jsx)($.Button,{label:T.cancelButton.label.value,disabled:!O||g,color:G.TEXT,className:`max-md:w-full`,variant:W.OUTLINE,onClick:()=>s(!1),children:T.cancelButton.text}),(0,v.jsx)($.Button,{label:T.confirmButton.label.value,disabled:!O||g,Icon:mu,color:G.TEXT,className:`max-md:w-full`,isLoading:h,onClick:A,children:T.confirmButton.text})]})]})}),(0,v.jsxs)(`form`,{className:B(`flex justify-end gap-2 max-md:flex-col`,n),...a,children:[t.includes(`remote`)&&k&&r&&E&&(0,v.jsx)($.Button,{label:b.label.value,Icon:gu,color:G.ERROR,variant:W.OUTLINE,className:`max-md:w-full`,isLoading:u,onClick:M,children:b.text}),O&&(0,v.jsx)($.Button,{label:x.label.value,disabled:!O,Icon:pu,variant:W.OUTLINE,color:G.TEXT,className:`max-md:w-full`,onClick:()=>y(e.localId),children:x.text}),t.includes(`local`)&&(0,v.jsx)($.Button,{label:w.label.value,disabled:!O||g,Icon:tu,color:G.TEXT,variant:E?W.OUTLINE:W.DEFAULT,className:`max-md:w-full`,isLoading:f,onClick:()=>s(!0),children:w.text}),t.includes(`remote`)&&E&&!k&&(0,v.jsx)($.Button,{label:C.label.value,disabled:g,Icon:Kl,color:G.TEXT,className:`max-md:w-full`,isLoading:h,onClick:j,children:C.text}),t.includes(`remote`)&&E&&k&&O&&(0,v.jsx)($.Button,{label:S.label.value,disabled:!O||g,Icon:mu,color:`text`,className:`max-md:w-full`,isLoading:h,onClick:j,children:S.text})]})]})},MZ={key:`dictionary-field-editor`,content:{nodeType:`translation`,translation:{en:{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},"en-GB":{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},fr:{returnToDictionaryList:{label:`Retourner à la liste des dictionnaires`,text:`Liste des dictionnaires`}},es:{returnToDictionaryList:{label:`Volver a la lista de diccionarios`,text:`Lista de diccionarios`}},de:{returnToDictionaryList:{label:`Zurück zur Wörterbuchliste`,text:`Wörterbuchliste`}},ja:{returnToDictionaryList:{label:`辞書リストに戻る`,text:`辞書リスト`}},ko:{returnToDictionaryList:{label:`사전 목록으로 돌아가기`,text:`사전 목록`}},zh:{returnToDictionaryList:{label:`返回字典列表`,text:`字典列表`}},it:{returnToDictionaryList:{label:`Torna alla lista dei dizionari`,text:`Elenco dei dizionari`}},pt:{returnToDictionaryList:{label:`Retornar à lista de dicionários`,text:`Lista de dicionários`}},hi:{returnToDictionaryList:{label:`शब्दकोश सूची पर वापस जाएं`,text:`शब्दकोश सूची`}},ar:{returnToDictionaryList:{label:`العودة إلى قائمة القوامل`,text:`قائمة المعاجم`}},ru:{returnToDictionaryList:{label:`Вернуться к списку словарей`,text:`Список словарей`}}}},localIds:[`dictionary-field-editor::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs`]},NZ={key:`dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary."},"projectInput":{"label":"Projects","description":"A dictionary can be associated with one or more projects. This allows you load the dictionary on different applications, and share it across different teams.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Distant","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"auditButton":{"label":"Audit"}},"en-GB":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary."},"projectInput":{"label":"Projects","description":"A dictionary can be associated with one or more projects. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Remote","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"auditButton":{"label":"Audit"}},"fr":{"titleInput":{"label":"Titre","description":"Le titre de votre dictionnaire permet de l'identifier facilement","placeholder":"Entrez le titre de votre dictionnaire"},"keyInput":{"label":"Clé","description":"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application","placeholder":"Entrez la clé de votre dictionnaire"},"descriptionInput":{"label":"Description","placeholder":"Entrez la description de votre dictionnaire","description":"La description de votre dictionnaire permet de l'identifier facilement en utilisant des mots-clés. Elle est également utilisée pour rechercher votre dictionnaire et pour aider l'IA à comprendre votre dictionnaire."},"projectInput":{"label":"Projets","description":"Un dictionnaire peut être associé à un ou plusieurs projets. Cela permet de charger le dictionnaire sur différentes applications et de le partager entre différentes équipes.","placeholder":"Sélectionnez un ou plusieurs projets à associer à votre dictionnaire"},"tagsSelect":{"label":"Tags","description":"Un dictionnaire peut être associé à un ou plusieurs tags. Cela permet de charger le dictionnaire dans différentes applications et de le partager entre différentes équipes.","placeholder":"Sélectionnez les tags à associer à votre dictionnaire"},"locationSelect":{"label":"Emplacement","local":"Local","remote":"Distant","testDescription":"La localisation détermine si votre dictionnaire est stocké localement, à distance ou les deux."},"importModeSelect":{"label":"Mode d'importation","description":"Le mode d'importation détermine comment votre dictionnaire est importé dans votre application.","static":"Statique","dynamic":"Dynamique","live":"Fetch"},"filePathInput":{"label":"Chemin du fichier","description":"Le chemin du fichier de votre dictionnaire permet de l'identifier dans votre projet.","placeholder":"Entrez le chemin du fichier de votre dictionnaire"},"auditButton":{"label":"Auditer"}},"es":{"titleInput":{"label":"Título","description":"El título de su diccionario le permite identificar fácilmente","placeholder":"Ingrese le título de su diccionario"},"keyInput":{"label":"Clave","description":"La clave de su diccionario se utiliza para identificarla en la aplicación","placeholder":"Ingrese la clave de su diccionario"},"descriptionInput":{"label":"Descripción","placeholder":"Ingrese la descripción de su diccionario","description":"La descripción de su diccionario le permite identificar fácilmente el contenido utilizando palabras clave. También se utiliza para buscar su diccionario y para ayudar a la IA a entender su diccionario."},"projectInput":{"label":"Proyectos","description":"Un diccionario puede estar asociado con uno o más proyectos. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione uno o más proyectos para asociar con su diccionario"},"tagsSelect":{"label":"Etiquetas","description":"Un diccionario puede estar asociado con una o más etiquetas. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione los tags para asociar con su diccionario"},"locationSelect":{"label":"Ubicación","local":"Local","remote":"Distante","testDescription":"La ubicación determina si su dictionnaire se almacena localmente, de forma remota o ambos."},"importModeSelect":{"label":"Modo de importación","description":"El modo de importación determina cómo se importa su dictionnaire en su aplicación.","static":"Estático","dynamic":"Dinámico","live":"Fetch"},"filePathInput":{"label":"Ruta del archivo","description":"La ruta del archivo de su dictionnaire le permite identificarlo en su proyecto.","placeholder":"Ingrese la ruta del archivo de su diccionario"},"auditButton":{"label":"Auditar"}},"de":{"titleInput":{"label":"Titel","description":"Der Titel Ihres Wörterbuchs ermöglicht es Ihnen, es leicht zu identifizieren","placeholder":"Geben Sie den Titel Ihres Wörterbuchs ein"},"keyInput":{"label":"Schlüssel","description":"Der Schlüssel Ihres Wörterbuchs wird verwendet, um es in der Anwendung zu identifizieren","placeholder":"Geben Sie den Schlüssel Ihres Wörterbuchs ein"},"descriptionInput":{"label":"Beschreibung","placeholder":"Geben Sie die Beschreibung Ihres Wörterbuchs ein","description":"Die Beschreibung Ihres Wörterbuchs ermöglicht es Ihnen, es mit Schlüsselwörtern leicht zu identifizieren. Sie wird auch verwendet, um nach Ihrem Wörterbuch zu suchen und der KI zu helfen, Ihr Wörterbuch zu verstehen."},"projectInput":{"label":"Projekte","description":"Ein Wörterbuch kann mit einem oder mehreren Projekten verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.","placeholder":"Wählen Sie ein oder mehrere Projekte aus, um sie mit Ihrem Wörterbuch zu verknüpfen"},"tagsSelect":{"label":"Tags","description":"Ein Wörterbuch kann mit einem oder mehreren Tags verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.","placeholder":"Wählen Sie die Tags, die mit Ihrem Wörterbuch verknüpft werden sollen"},"locationSelect":{"label":"Speicherort","local":"Lokal","remote":"Entfernt","testDescription":"Der Speicherort bestimmt, ob Ihr Wörterbuch lokal, remote oder beides gespeichert wird."},"importModeSelect":{"label":"Importmodus","description":"Der Importmodus bestimmt, wie Ihr Wörterbuch in Ihre Anwendung importiert wird.","static":"Statisch","dynamic":"Dynamisch","live":"Fetch"},"filePathInput":{"label":"Dateipfad","description":"Der Dateipfad Ihres Wörterbuchs ermöglicht es Ihnen, es in Ihrem Projekt zu identifizieren.","placeholder":"Geben Sie den Dateipfad Ihres Wörterbuchs ein"},"auditButton":{"label":"Prüfen"}},"ja":{"titleInput":{"label":"タイトル","description":"辞書のタイトルは、それを簡単に識別することができます","placeholder":"辞書のタイトルを入力してください"},"keyInput":{"label":"キー","description":"辞書のキーは、アプリケーション内でそれを識別するために使用されます","placeholder":"辞書のキーを入力してください"},"descriptionInput":{"label":"説明","placeholder":"辞書の説明を入力してください","description":"辞書の説明は、キーワードを使用して簡単に識別できます。また、辞書を検索するために使用され、AIが辞書を理解するのを助けます。"},"projectInput":{"label":"プロジェクト","description":"辞書は1つ以上のプロジェクトに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるプロジェクトを1つ以上選択してください"},"tagsSelect":{"label":"タグ","description":"辞書は1つ以上のタグに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるタグを選択してください"},"locationSelect":{"label":"場所","local":"ローカル","remote":"リモート","testDescription":"ロケーションは辞書がローカル、リモート、またはその両方に保存されるかを決定します。"},"importModeSelect":{"label":"インポートモード","description":"インポートモードは、辞書がアプリケーションにどのようにインポートされるかを決定します。","static":"静的","dynamic":"動的","live":"Fetch"},"filePathInput":{"label":"ファイルパス","description":"辞書のファイルパスにより、プロジェクト内でそれを識別できます。","placeholder":"辞書のファイルパスを入力してください"},"auditButton":{"label":"監査"}},"ko":{"titleInput":{"label":"제목","description":"사전의 제목은 이를 쉽게 식별할 수 있게 해줍니다","placeholder":"사전의 제목을 입력하세요"},"keyInput":{"label":"키","description":"사전의 키는 애플리케이션에서 이를 식별하는 데 사용됩니다","placeholder":"사전의 키를 입력하세요"},"descriptionInput":{"label":"설명","placeholder":"사전의 설명을 입력하세요","description":"사전의 설명은 키워드를 사용하여 쉽게 식별할 수 있습니다. 또한 사전을 검색하고 AI가 사전을 이해하는 데 도움을 줍니다."},"projectInput":{"label":"프로젝트","description":"사전은 하나 이상의 프로젝트와 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 하나 이상의 프로젝트를 선택하세요"},"tagsSelect":{"label":"태그","description":"사전은 태그를 하나 이상의 태그로 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 태그를 선택하세요"},"locationSelect":{"label":"위치","local":"로컬","remote":"원격","testDescription":"위치는 사전이 로컬, 원격 또는 둘 다에 저장되는지 결정합니다."},"importModeSelect":{"label":"가져오기 모드","description":"가져오기 모드는 사전이 애플리케이션에서 어떻게 가져와지는지 결정합니다.","static":"정적","dynamic":"동적","live":"Fetch"},"filePathInput":{"label":"파일 경로","description":"사전의 파일 경로를 통해 프로젝트에서 이를 식별할 수 있습니다.","placeholder":"사전의 파일 경로를 입력하세요"},"auditButton":{"label":"감사"}},"zh":{"titleInput":{"label":"标题","description":"字典的标题使您能够轻松识别它","placeholder":"输入字典的标题"},"keyInput":{"label":"键","description":"字典的键用于在应用程序中识别它","placeholder":"输入字典的键"},"descriptionInput":{"label":"描述","placeholder":"输入字典的描述","description":"您字典的描述使您能够使用关键字轻松地识别它。它还用于搜索您的字典,以及帮助 AI 理解您的字典。"},"projectInput":{"label":"项目","description":"字典可以与一个或多个项目关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择一个或多个项目以与您的字典关联"},"tagsSelect":{"label":"标签","description":"字典可以与一个 or 多个标签关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择与您的字典相关的标签"},"locationSelect":{"label":"位置","local":"本地","remote":"远程","testDescription":"位置决定您的词典是本地存储、远程存储还是同时两者。"},"importModeSelect":{"label":"导入模式","description":"导入模式决定了您的词典如何导入到您的应用程序中。","static":"静态","dynamic":"动态","live":"Fetch"},"filePathInput":{"label":"文件路径","description":"字典的文件路径使您能够在项目中识别它。","placeholder":"输入字典的文件路径"},"auditButton":{"label":"审核"}},"it":{"titleInput":{"label":"Titolo","description":"Il titolo del tuo dizionario ti consente di identificarlo facilmente","placeholder":"Inserisci il titolo del tuo dizionario"},"keyInput":{"label":"Chiave","description":"La chiave del tuo dizionario viene utilizzata per identificarlo nell'applicazione","placeholder":"Inserisci la chiave del tuo dizionario"},"descriptionInput":{"label":"Descrizione","placeholder":"Inserisci la descrizione del tuo dizionario","description":"La descrizione del tuo dizionario ti consente di identificarlo facilmente utilizzando parole chiave. Viene anche utilizzata per cercare il tuo dizionario e per assistere l'IA nella comprensione del tuo dizionario."},"projectInput":{"label":"Progetti","description":"Un dizionario può essere associato a uno o più progetti. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.","placeholder":"Seleziona uno o più progetti da associare al tuo dizionario"},"tagsSelect":{"label":"Tag","description":"Un dizionario può essere associato a uno o più tag. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.","placeholder":"Seleziona i tag da associare al tuo dizionario"},"locationSelect":{"label":"Posizione","local":"Locale","remote":"Remoto","testDescription":"La posizione determina se il tuo dizionario è archiviato localmente, da remoto o entrambi."},"importModeSelect":{"label":"Modalità di importazione","description":"La modalità di importazione determina il modo in cui il tuo dizionario viene importato nella tua applicazione.","static":"Statico","dynamic":"Dinamico","live":"Fetch"},"filePathInput":{"label":"Percorso del file","description":"Il percorso del file del tuo dizionario ti consente di identificarlo nel tuo progetto.","placeholder":"Inserisci il percorso del file del tuo dizionario"},"auditButton":{"label":"Controllare"}},"pt":{"titleInput":{"label":"Título","description":"O titolo do seu dicionário permite que você o identifique facilmente","placeholder":"Insira o título do seu dicionário"},"keyInput":{"label":"Chave","description":"A chave do seu dicionário é usada para identificá-lo no aplicativo","placeholder":"Insira a chave do seu dicionário"},"descriptionInput":{"label":"Descrição","placeholder":"Insira a descrição do seu dicionário","description":"A descrição do seu dicionário permite que você o identifique facilmente usando palavras-chave. Também é usada para pesquisar seu dicionário e para ajudar a IA a entender seu dicionário."},"projectInput":{"label":"Projetos","description":"Um dicionário pode ser associado a um ou mais projetos. Isso permite que você carregue o dicionário em differentes aplicativos e o compartilhe entre diferentes equipes.","placeholder":"Selecione um ou mais projetos para associar ao seu dicionário"},"tagsSelect":{"label":"Tags","description":"Um dicionário pode ser associado a um ou mais tags. Isso permite que você carregue o dicionário em diferentes aplicativos e o compartilhe entre diferentes equipes.","placeholder":"Selecione os tags para associar ao seu dicionário"},"locationSelect":{"label":"Localização","local":"Local","remote":"Remoto","testDescription":"A localização determina se o seu dicionário è armazenado localmente, remotamente ou ambos."},"importModeSelect":{"label":"Modo de importação","description":"O modo de importação determina como seu dicionário è importado em seu aplicativo.","static":"Estático","dynamic":"Dinâmico","live":"Fetch"},"filePathInput":{"label":"Caminho do arquivo","description":"O caminho do arquivo do seu dicionário permite que você o identifique em seu projeto.","placeholder":"Insira o caminho do arquivo do seu dicionário"},"auditButton":{"label":"Auditar"}},"hi":{"titleInput":{"label":"शीर्षक","description":"आपके शब्दकोश का शीर्षक इसे आसानी से पहचानने में मदद करता है","placeholder":"आपके शब्दकोश का शीर्षक दर्ज करें"},"keyInput":{"label":"कुंजी","description":"आपके शब्दकोश की कुंजी इसे एप्लिकेशन में पहचानने के लिए उपयोग की जाती है","placeholder":"अपने शब्दकोश की कुंजी दर्ज करें"},"descriptionInput":{"label":"विवरण","placeholder":"अपने शब्दकोश का विवरण दर्ज करें","description":"आपके शब्दकोश का विवरण आपको कुंजीशब्दों का उपयोग करके इसे आसानी से पहचानने की अनुमति देता है। इसका उपयोग आपके शब्दकोश की खोज करने और AI को आपके शब्दकोश को समझने में मदद करने के लिए भी किया जाता है।"},"projectInput":{"label":"परियोजनाएँ","description":"एक शब्दकोश को एक या अधिक परियोजनाओं से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए एक या अधिक परियोजनाएँ चुनें"},"tagsSelect":{"label":"टैग","description":"एक शब्दकोश को एक या अधिक टैग से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए टैग का चयन करें"},"locationSelect":{"label":"स्थान","local":"स्थानीय","remote":"दूरस्थ","testDescription":"स्थान निर्धारित करता है कि आपका शब्दकोश स्थानीय, दूरस्थ या दोनों में संग्रहीत है।"},"importModeSelect":{"label":"आयात मोड","description":"आयात मोड यह निर्धारित करता है कि आपके शब्दकोश को आपके आवेदन में कैसे आयात किया जाता है।","static":"स्थैतिक","dynamic":"गतिशील","live":"Fetch"},"filePathInput":{"label":"फ़ाइल पथ","description":"आपके शब्दकोश का फ़ाइल पथ आपको अपने प्रोजेक्ट में इसे पहचानने की अनुमति देता है।","placeholder":"अपने शब्दकोश का फ़ाइल पथ दर्ज करें"},"auditButton":{"label":"ऑडिट"}},"ar":{"titleInput":{"label":"العنوان","description":"يتيح لك عنوان القاموس الخاص بك التعرف عليه بسهولة","placeholder":"أدخل عنوان القاموس الخاص بك"},"keyInput":{"label":"مفتاح","description":"مفتاح القاموس الخاص بك يُستخدم لتحديده في التطبيق","placeholder":"أدخل مفتاح القاموس الخاص بك"},"descriptionInput":{"label":"الوصف","placeholder":"أدخل وصف القاموس الخاص بك","description":"يتيح لك وصف القاموس الخاص بك التعرف عليه بسهولة باستخدام الكلمات الرئيسية. كما أنه يستخدم للبحث عن القاموس الخاص بك ، ولمساعدة الذكاء الاصطناعي على فهم القاموس الخاص بك."},"projectInput":{"label":"المشاريع","description":"يمكن ربط قاموس بواحد أو أكثر من المشاريع. وهذا يتيح لك تحميل القاموس على تطبيقات مختلفة ومشاركته عبر فرق مختلفة.","placeholder":"حدد مشروعًا أو أكثر لربطه بقاموسك"},"tagsSelect":{"label":"الوسوم","description":"يمكن ربط قاموس بواحد أو أكثر من الوسوم. يتيح لك تحميل القاموس في تطبيقات مختلفة ومشاركته بين فرق مختلفة.","placeholder":"حدد الوسوم التي تريد ربطها بقاموسك"},"locationSelect":{"label":"الموقع","local":"محلي","remote":"بعيد","testDescription":"الموقع يحدد ما إذا كان قاموسك يتم تخزينه محليًا أو عن بُعد أو كليهما."},"importModeSelect":{"label":"وضع الاستيراد","description":"يحدد وضع الاستيراد كيفية استيراد قاموسك في تطبيقك.","static":"ثابت","dynamic":"ديناميكي","live":"Fetch"},"filePathInput":{"label":"مسار الملف","description":"مسار ملف القاموس الخاص بك يسمح لك بتحديده في مشروعك.","placeholder":"أدخل مسار ملف القاموس الخاص بك"},"auditButton":{"label":"التدقيق"}},"ru":{"titleInput":{"label":"Заголовок","description":"Название вашего словаря позволяет легко его идентифицировать","placeholder":"Введите название вашего словаря"},"keyInput":{"label":"Ключ","description":"Ключ вашего словаря используется для его идентификации в приложении","placeholder":"Введите ключ вашего словаря"},"descriptionInput":{"label":"Описание","placeholder":"Введите описание вашего словаря","description":"Описание вашего словаря позволяет легко его идентифицировать с помощью ключевых слов. Оно также используется для поиска вашего словаря и для помощи ИИ в понимании вашего словаря."},"projectInput":{"label":"Проекты","description":"Словарь можно ассоциировать с одним или несколькими проектами. Это позволяет загружать словарь в различных приложениях и делиться им между разными командами.","placeholder":"Выберите один или несколько проектов, чтобы связать их с вашим словарем"},"tagsSelect":{"label":"Теги","description":"Словарь можно связать с одним или несколькими тегами. Это позволяет загружать словарь в различных приложениях и делиться им между различными командами.","placeholder":"Выберите теги, которые нужно связать с словарем"},"locationSelect":{"label":"Расположение","local":"Локальный","remote":"Удаленный","testDescription":"Расположение определяет, хранится ли ваш словарь локально, удаленно или и там, и там."},"importModeSelect":{"label":"Режим импорта","description":"Режим импорта определяет, как ваш словарь импортируется в ваше приложение.","static":"Статический","dynamic":"Динамический","live":"Fetch"},"filePathInput":{"label":"Путь к файлу","description":"Путь к файлу вашего словаря позволяет идентифицировать его в вашем проекте.","placeholder":"Введите путь к файлу вашего словаря"},"auditButton":{"label":"Отслеживание"}}}}`),localIds:[`dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs`]},PZ={key:`dictionary-detail-schema`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"en-GB":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"fr":{"titleRequiredError":"Veuillez saisir un nom pour votre dictionnaire.","titleInvalidTypeError":"Le nom du dictionnaire doit être une chaîne valide.","titleMinLengthError":"Le nom du dictionnaire doit comporter au moins 4 caractères.","keyRequiredError":"Veuillez saisir une clé pour votre dictionnaire.","keyInvalidTypeError":"La clé doit être une chaîne valide.","keySpaceError":"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.","keyMinLengthError":"La clé doit comporter au moins 4 caractères.","descriptionRequiredError":"Veuillez saisir une description pour votre dictionnaire.","descriptionInvalidTypeError":"La description doit être une chaîne valide.","requiredErrorProjectId":"Veuillez sélectionner un projet","invalidTypeErrorProjectId":"Veuillez sélectionner un projet valide","invalidTypeErrorTags":"Veuillez saisir un tag valide","locationRequiredError":"Veuillez sélectionner un emplacement","locationInvalidTypeError":"Veuillez sélectionner un emplacement valide","filePathRequiredError":"Veuillez saisir un chemin de fichier","filePathInvalidTypeError":"Le chemin du fichier doit être une chaîne valide"},"es":{"titleRequiredError":"Por favor, ingrese un nombre para su diccionario.","titleInvalidTypeError":"El nombre del diccionario debe ser una cadena válida.","titleMinLengthError":"El nombre del diccionario debe tener al menos 4 caracteres.","keyRequiredError":"Por favor, ingrese una clave para su diccionario.","keyInvalidTypeError":"La clave debe ser una cadena válida.","keySpaceError":"La clave no puede contener espacios o caracteres especiales.","keyMinLengthError":"La clave debe tener al menos 4 caracteres.","descriptionRequiredError":"Por favor, ingrese una descripción para su diccionario.","descriptionInvalidTypeError":"La descripción debe ser una cadena válida.","requiredErrorProjectId":"Por favor, seleccione un proyecto","invalidTypeErrorProjectId":"Por favor, seleccione un proyecto válido","invalidTypeErrorTags":"Por favor, ingrese un tag válido","locationRequiredError":"Por favor, seleccione una ubicación","locationInvalidTypeError":"Por favor, seleccione una ubicación válida","filePathRequiredError":"Por favor, ingrese una ruta de archivo","filePathInvalidTypeError":"La ruta del archivo debe ser una cadena válida"},"de":{"titleRequiredError":"Bitte geben Sie einen Namen für Ihr Wörterbuch ein.","titleInvalidTypeError":"Der Name des Wörterbuchs muss eine gültige Zeichenfolge sein.","titleMinLengthError":"Der Name des Wörterbuchs muss mindestens 4 Zeichen lang sein.","keyRequiredError":"Bitte geben Sie einen Schlüssel für Ihr Wörterbuch ein.","keyInvalidTypeError":"Der Schlüssel muss eine gültige Zeichenfolge sein.","keySpaceError":"Der Schlüssel darf keine Leerzeichen oder Sonderzeichen enthalten.","keyMinLengthError":"Der Schlüssel muss mindestens 4 Zeichen lang sein.","descriptionRequiredError":"Bitte geben Sie eine Beschreibung für Ihr Wörterbuch ein.","descriptionInvalidTypeError":"Die Beschreibung muss eine gültige Zeichenfolge sein.","requiredErrorProjectId":"Bitte wählen Sie ein Projekt aus","invalidTypeErrorProjectId":"Bitte wählen Sie ein gültiges Projekt aus","invalidTypeErrorTags":"Bitte geben Sie einen gültigen Tag ein","locationRequiredError":"Bitte wählen Sie einen Standort aus","locationInvalidTypeError":"Bitte wählen Sie einen gültigen Standort aus","filePathRequiredError":"Bitte geben Sie einen Dateipfad ein","filePathInvalidTypeError":"Der Dateipfad muss eine gültige Zeichenfolge sein"},"ja":{"titleRequiredError":"辞書の名前を入力してください。","titleInvalidTypeError":"辞書名は有効な文字列である必要があります。","titleMinLengthError":"辞書名は4文字以上でなければなりません。","keyRequiredError":"辞書のためにキーを入力してください。","keyInvalidTypeError":"キーは有効な文字列である必要があります。","keySpaceError":"キーにはスペースや特殊文字を含めることはできません。","keyMinLengthError":"キーは4文字以上でなければなりません。","descriptionRequiredError":"辞書の説明を入力してください。","descriptionInvalidTypeError":"説明は有効な文字列である必要があります。","requiredErrorProjectId":"プロジェクトを選択してください","invalidTypeErrorProjectId":"有効なプロジェクトを選択してください","invalidTypeErrorTags":"有効なタグを入力してください","locationRequiredError":"場所を選択してください","locationInvalidTypeError":"有効な場所を選択してください","filePathRequiredError":"ファイルパスを入力してください","filePathInvalidTypeError":"ファイルパスは有効な文字列である必要があります"},"ko":{"titleRequiredError":"사전 이름을 입력하세요.","titleInvalidTypeError":"사전 이름은 유효한 문자열이어야 합니다.","titleMinLengthError":"사전 이름은 4자 이상이어야 합니다.","keyRequiredError":"사전에 대한 키를 입력하세요.","keyInvalidTypeError":"키는 유효한 문자열이어야 합니다.","keySpaceError":"키에는 공백이나 특수 문자가 포함될 수 없습니다.","keyMinLengthError":"키는 4자 이상이어야 합니다.","descriptionRequiredError":"사전에 대한 설명을 입력하세요.","descriptionInvalidTypeError":"설명은 유효한 문자열이어야 합니다.","requiredErrorProjectId":"프로젝트를 선택하세요","invalidTypeErrorProjectId":"유효한 프로젝트를 선택하세요","invalidTypeErrorTags":"유효한 태그를 입력하세요","locationRequiredError":"위치를 선택하세요","locationInvalidTypeError":"유효한 위치를 선택하세요","filePathRequiredError":"파일 경로를 입력하세요","filePathInvalidTypeError":"파일 경로는 유효한 문자열이어야 합니다"},"zh":{"titleRequiredError":"请输入您词典的名称。","titleInvalidTypeError":"词典名称必须是有效的字符串。","titleMinLengthError":"词典名称必须至少4个字符。","keyRequiredError":"请输入您词典的键。","keyInvalidTypeError":"关键字必须是有效的字符串。","keySpaceError":"关键字不能包含空格或特殊字符。","keyMinLengthError":"键必须至少为4个字符。","descriptionRequiredError":"请输入您词典的描述。","descriptionInvalidTypeError":"描述必须是有效的字符串。","requiredErrorProjectId":"请选择一个项目","invalidTypeErrorProjectId":"请选择有效的项目","invalidTypeErrorTags":"请输入有效的标签","locationRequiredError":"请选择一个位置","locationInvalidTypeError":"请选择有效的位置","filePathRequiredError":"请输入文件路径","filePathInvalidTypeError":"文件路径必须是有效的字符串"},"it":{"titleRequiredError":"Si prega di inserire un nome per il proprio dizionario.","titleInvalidTypeError":"Il nome del dizionario deve essere una stringa valida.","titleMinLengthError":"Il nome del dizionario deve essere lungo almeno 4 caratteri.","keyRequiredError":"Si prega di inserire una chiave per il proprio dizionario.","keyInvalidTypeError":"La chiave deve essere una stringa valida.","keySpaceError":"La chiave non può contenere spazi o caratteri speciali.","keyMinLengthError":"La chiave deve essere lunga almeno 4 caratteri.","descriptionRequiredError":"Si prega di inserire una descrizione per il proprio dizionario.","descriptionInvalidTypeError":"La descrizione deve essere una stringa valida.","requiredErrorProjectId":"Si prega di selezionare un progetto","invalidTypeErrorProjectId":"Si prega di selezionare un progetto valido","invalidTypeErrorTags":"Si prega di inserire un tag valido","locationRequiredError":"Si prega di selezionare una posizione","locationInvalidTypeError":"Si prega di selezionare una posizione valida","filePathRequiredError":"Si prega di inserire un percorso del file","filePathInvalidTypeError":"Il percorso del file deve essere una stringa valida"},"pt":{"titleRequiredError":"Por favor, insira um nome para o seu dicionário.","titleInvalidTypeError":"O nome do dicionário deve ser uma string válida.","titleMinLengthError":"O nome do dicionário deve ter pelo menos 4 caracteres.","keyRequiredError":"Por favor, insira uma chave para o seu dicionário.","keyInvalidTypeError":"A chave deve ser uma string válida.","keySpaceError":"A chave não pode conter espaços ou caracteres especiais.","keyMinLengthError":"A chave deve ter pelo menos 4 caracteres.","descriptionRequiredError":"Por favor, insira uma descrição para o seu dicionário.","descriptionInvalidTypeError":"A descrição deve ser uma string válida.","requiredErrorProjectId":"Por favor, selecione um projeto","invalidTypeErrorProjectId":"Por favor, selecione um projeto válido","invalidTypeErrorTags":"Por favor, insira um tag válido","locationRequiredError":"Por favor, selecione um local","locationInvalidTypeError":"Por favor, selecione um local válido","filePathRequiredError":"Por favor, insira um caminho de arquivo","filePathInvalidTypeError":"O caminho do arquivo deve ser uma string válida"},"hi":{"titleRequiredError":"कृपया अपने शब्दकोश का नाम दर्ज करें।","titleInvalidTypeError":"शब्दकोश का नाम एक वैध स्ट्रिंग होना चाहिए।","titleMinLengthError":"शब्दकोश का नाम कम से कम 4 वर्ण का होना चाहिए।","keyRequiredError":"कृपया अपने शब्दकोश के लिए एक कुंजी दर्ज करें।","keyInvalidTypeError":"कुंजी एक वैध स्ट्रिंग होनी चाहिए।","keySpaceError":"कुंजी में स्पेस या विशेष वर्ण नहीं हो सकते।","keyMinLengthError":"कुंजी में कम से कम 4 वर्ण होने चाहिए।","descriptionRequiredError":"कृपया अपने शब्दकोश का विवरण दर्ज करें।","descriptionInvalidTypeError":"विवरण एक वैध स्ट्रिंग होना चाहिए।","requiredErrorProjectId":"कृपया एक प्रोजेक्ट चुनें","invalidTypeErrorProjectId":"कृपया एक वैध परियोजना चुनें","invalidTypeErrorTags":"कृपया एक वैध टैग दर्ज करें","locationRequiredError":"कृपया एक स्थान चुनें","locationInvalidTypeError":"कृपया एक वैध स्थान चुनें","filePathRequiredError":"कृपया एक फ़ाइल पथ दर्ज करें","filePathInvalidTypeError":"फ़ाइल पथ एक वैध स्ट्रिंग होना चाहिए"},"ar":{"titleRequiredError":"يرجى إدخال اسم لقاموسك.","titleInvalidTypeError":"يجب أن يكون اسم القاموس سلسلة صحيحة.","titleMinLengthError":"يجب أن يكون اسم القاموس مكونًا من 4 أحرف على الأقل.","keyRequiredError":"يرجى إدخال مفتاح لقاموسك.","keyInvalidTypeError":"يجب أن يكون المفتاح سلسلة صحيحة.","keySpaceError":"لا يمكن أن يحتوي المفتاح على مسافات أو أحرف خاصة.","keyMinLengthError":"يجب أن يكون المفتاح مكونًا من 4 أحرف على الأقل.","descriptionRequiredError":"يرجى إدخال وصف لقاموسك.","descriptionInvalidTypeError":"يجب أن يكون الوصف سلسلة صحيحة.","requiredErrorProjectId":"يرجى اختيار مشروع","invalidTypeErrorProjectId":"يرجى اختيار مشروع صالح","invalidTypeErrorTags":"يرجى إدخال وسم صالح","locationRequiredError":"يرجى اختيار موقع","locationInvalidTypeError":"يرجى اختيار موقع صالح","filePathRequiredError":"يرجى إدخال مسار الملف","filePathInvalidTypeError":"يجب أن يكون مسار الملف سلسلة صحيحة"},"ru":{"titleRequiredError":"Пожалуйста, введите название вашего словаря.","titleInvalidTypeError":"Название словаря должно быть правильной строкой.","titleMinLengthError":"Название словаря должно содержать не менее 4 символов.","keyRequiredError":"Пожалуйста, введите ключ для вашего словаря.","keyInvalidTypeError":"Ключ должен быть правильной строкой.","keySpaceError":"Ключ не может содержать пробелы или специальные символы.","keyMinLengthError":"Ключ должен содержать не менее 4 символов.","descriptionRequiredError":"Пожалуйста, введите описание вашего словаря.","descriptionInvalidTypeError":"Описание должно быть правильной строкой.","requiredErrorProjectId":"Пожалуйста, выберите проект","invalidTypeErrorProjectId":"Пожалуйста, выберите действительный проект","invalidTypeErrorTags":"Пожалуйста, введите действительный тег","locationRequiredError":"Пожалуйста, выберите местоположение","locationInvalidTypeError":"Пожалуйста, выберите действительное местоположение","filePathRequiredError":"Пожалуйста, введите путь к файлу","filePathInvalidTypeError":"Путь к файлу должен быть правильной строкой"}}}`),localIds:[`dictionary-detail-schema::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs`]},FZ=e=>{let{titleRequiredError:t,titleInvalidTypeError:n,titleMinLengthError:r,keyRequiredError:i,keyInvalidTypeError:a,keySpaceError:o,keyMinLengthError:s,descriptionRequiredError:c,descriptionInvalidTypeError:l,requiredErrorProjectId:u,invalidTypeErrorProjectId:d,invalidTypeErrorTags:f,locationRequiredError:p,locationInvalidTypeError:m,filePathRequiredError:h,filePathInvalidTypeError:g}=mr(PZ);return eZ({title:EX({error:e=>e.input===void 0?t.value:n.value}).refine(e=>e.length===0||e.length>=4,{error:r.value}).optional(),key:EX({error:e=>e.input===void 0?i.value:a.value}).min(4,{error:s.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:o.value}).default(``),description:EX({error:e=>e.input===void 0?c.value:l.value}).optional(),projectIds:QX(EX({error:e=>e.input===void 0?u.value:d.value})).default([e]),tags:QX(EX({error:()=>f.value})).default([]),location:oZ([`local`,`remote`,`hybrid`,`plugin`],{error:e=>e.input===void 0?p.value:m.value}).optional(),importMode:oZ([`static`,`dynamic`,`fetch`]).optional(),filePath:EX({error:e=>e.input===void 0?h.value:g.value}).optional()})},IZ=({dictionary:e,mode:t})=>{let{session:n}=fH(),{project:r}=n??{},{data:i,isLoading:a}=yH(),{data:o}=SH(),s=i?.data??[],c=o?.data??[],l=FZ(String(r?.id)),{form:u,isSubmitting:d}=gY(l,{defaultValues:{...e,location:e.location??`remote`}}),{editedContent:f,setEditedDictionary:p}=zv(),{titleInput:h,keyInput:g,descriptionInput:_,projectInput:y,tagsSelect:b,locationSelect:x,importModeSelect:S,filePathInput:C,auditButton:w}=mr(NZ),{mutate:T,isPending:E}=CH(),D=f?.[e.localId];(0,m.useEffect)(()=>{u.reset({...e,location:e.location??`remote`})},[e,u?.reset]),(0,m.useEffect)(()=>{D===void 0&&u.reset({...e,location:e.location??`remote`})},[D]);let O=()=>{let t={...e,...D};T({fileContent:JSON.stringify(t)},{onSuccess:e=>{if(e?.data)try{let n=e.data.fileContent;p(e=>({...e,...t,...n})),u.reset({...t,...n})}catch(e){console.error(e)}}})},k=IU({control:u.control,name:`location`}),A=k===`local`||k===`hybrid`;return(0,v.jsxs)($,{className:`flex w-full flex-col gap-8`,...u,schema:l,children:[(0,v.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,v.jsx)($.EditableFieldInput,{name:`key`,label:g.label,placeholder:g.label.value,description:g.description,disabled:d,isRequired:!0,onSave:t=>{u.setValue(`key`,t,{shouldDirty:!0}),p(n=>({...e,...n??{},key:t}))}}),(0,v.jsx)($.EditableFieldInput,{name:`title`,label:h.label,placeholder:h.placeholder.value,description:h.description,disabled:d,onSave:t=>{u.setValue(`title`,t,{shouldDirty:!0}),p(n=>({...e,...n??{},title:t}))}})]}),(0,v.jsx)($.EditableFieldTextArea,{name:`description`,label:_.label,placeholder:_.placeholder.value,description:_.description,disabled:d,onSave:t=>{u.setValue(`description`,t,{shouldDirty:!0}),p(n=>({...e,...n??{},description:t}))}}),(0,v.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[(0,v.jsx)($.Field,{control:u.control,name:`location`,render:({field:n})=>{let r=n.value,i=r===`local`||r===`hybrid`,a=r===`remote`||r===`hybrid`,o=t=>{if(!t&&!a)return;let r=t?a?`hybrid`:`local`:`remote`;n.onChange(r);let i=t?u.getValues(`filePath`)??e.filePath:void 0;t||u.setValue(`filePath`,void 0),p(t=>({...e,...t??{},location:r,filePath:i}))},s=t=>{if(!t&&!i)return;let r=t?i?`hybrid`:`remote`:`local`;n.onChange(r),p(t=>({...e,...t??{},location:r}))};return(0,v.jsxs)($.Item,{className:`flex flex-col gap-2 px-1`,children:[(0,v.jsx)($.Label,{className:`ml-1`,children:x.label}),(0,v.jsxs)(`div`,{className:`ml-2 flex items-center gap-4 py-2`,children:[(0,v.jsx)(bd,{id:`location-local`,name:`location-local`,label:x.local.value,checked:i,disabled:!t.includes(`local`)&&!t.includes(`remote`),onChange:e=>o(e.target.checked)}),(0,v.jsx)(bd,{id:`location-remote`,name:`location-remote`,label:x.remote.value,checked:a,disabled:!t.includes(`remote`)&&e.location!==`remote`&&e.location!==`hybrid`,onChange:e=>s(e.target.checked)})]}),(0,v.jsx)($.Description,{children:x.testDescription}),(0,v.jsx)($.Message,{})]})}}),(0,v.jsx)(uF,{mode:`wait`,children:A&&(0,v.jsx)(cL.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},className:`overflow-hidden`,children:(0,v.jsx)($.Input,{name:`filePath`,label:C.label.value,placeholder:C.placeholder.value,description:C.description.value,disabled:d||!A,onChange:t=>{let n=t.target.value;p(t=>({...e,...t??{},filePath:n}))}})},`filePath-input`)})]}),(0,v.jsx)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:(0,v.jsxs)($.Select,{name:`importMode`,label:S.label.value,description:S.description.value,onValueChange:t=>{u.setValue(`importMode`,t,{shouldDirty:!0}),p(n=>({...e,...n??{},importMode:t}))},children:[(0,v.jsx)(q.Trigger,{children:(0,v.jsx)(q.Value,{placeholder:S.label.value})}),(0,v.jsxs)(q.Content,{children:[(0,v.jsx)(q.Item,{value:`static`,children:S.static.value}),(0,v.jsx)(q.Item,{value:`dynamic`,children:S.dynamic.value}),(0,v.jsx)(q.Item,{value:`live`,children:S.live.value})]})]})}),(0,v.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,v.jsxs)($.MultiSelect,{name:`projectIds`,label:y.label.value,description:y.description,onValueChange:t=>{let n=[t].flat();u.setValue(`projectIds`,n,{shouldDirty:!0}),p(t=>({...e,...t??{},projectIds:n}))},children:[(0,v.jsx)(fx.Trigger,{getBadgeValue:e=>s?.find(t=>String(t.id)===e)?.name??e,children:(0,v.jsx)(fx.Input,{placeholder:y.placeholder.value})}),(0,v.jsx)(fx.Content,{children:(0,v.jsx)(Wu,{isLoading:a,children:(0,v.jsx)(fx.List,{children:s?.map(e=>(0,v.jsx)(fx.Item,{value:String(e.id),children:e.name},String(e.id)))})})})]}),(0,v.jsxs)($.MultiSelect,{name:`tags`,label:b.label.value,description:b.description,onValueChange:t=>{let n=[t].flat();u.setValue(`tags`,n,{shouldDirty:!0}),p(t=>({...e,...t??{},tags:n}))},children:[(0,v.jsx)(fx.Trigger,{getBadgeValue:e=>c?.find(t=>String(t.key)===e)?.name??e,children:(0,v.jsx)(fx.Input,{placeholder:b.placeholder.value})}),(0,v.jsx)(fx.Content,{children:(0,v.jsx)(Wu,{isLoading:a,children:(0,v.jsx)(fx.List,{children:c?.map(e=>(0,v.jsx)(fx.Item,{value:String(e.key),children:e.name??e.key},String(e.key)))})})})]})]}),(0,v.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 max-md:flex-col`,children:(0,v.jsx)($.Button,{type:`button`,size:U.ICON_MD,label:w.label.value,Icon:_u,variant:W.OUTLINE,color:G.TEXT,className:`max-md:w-full`,onClick:O,disabled:d||E,isLoading:E})})]})},LZ=(0,m.lazy)(()=>s(()=>import(`./dist-BYl4fRzW.js`).then(e=>({default:e.Editor})),__vite__mapDeps([6,1,3]))),RZ=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=(0,m.useRef)(null),c=(0,m.useRef)(null),[l,u]=(0,m.useState)({height:0,width:0}),d=n?`vs-dark-transparent`:`hc-light-theme`,f=(e,t)=>{c.current=e;let n=(e.getContentHeight()??0)+25;t.editor.defineTheme(`vs-dark-transparent`,{base:`vs-dark`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.defineTheme(`hc-light-theme`,{base:`vs`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.setTheme(d),t.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),t.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),u({height:n,width:s.current?.clientWidth??0})},p=r??(typeof e==`string`?e.split(`
|
|
222
|
+
`).length>1:!1);return(0,v.jsxs)(`div`,{className:B(`relative h-full w-full text-sm`,r&&`ml-0`),children:[i&&(0,v.jsx)(`div`,{className:`sticky top-5 z-10`,children:(0,v.jsx)(`div`,{className:B(`absolute right-2 bottom-0 flex h-7 items-center`),children:(0,v.jsx)(Bh,{content:e})})}),(0,v.jsx)(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:(0,v.jsx)(m.Suspense,{fallback:(0,v.jsx)(Wu,{}),children:(0,v.jsx)(LZ,{...l,defaultLanguage:`typescript`,language:t,loading:(0,v.jsx)(Wu,{}),defaultValue:String(e).replace(/\n$/,``),onMount:f,onChange:o,options:{readOnly:a,cursorStyle:`line`,minimap:{enabled:!1},scrollbar:{vertical:`hidden`,verticalScrollbarSize:0,alwaysConsumeMouseWheel:!1},folding:!1,renderValidationDecorations:`off`,quickSuggestions:!1,parameterHints:{enabled:!1},suggestOnTriggerCharacters:!1,mouseWheelScrollSensitivity:0,fastScrollSensitivity:0,scrollBeyondLastLine:!1,lineNumbers:p?`on`:`off`},theme:d,className:`my-2 rounded-md`})})})]})},zZ=({dictionary:e,isDarkMode:t})=>{let{setEditedContent:n,editedContent:r}=zv(),i=e=>{try{return JSON.parse(e),!0}catch{return!1}},a=r?.[e.localId]?.content??e?.content;return(0,v.jsx)(RZ,{language:`json`,onChange:t=>{i(t??`{}`)&&n(e.localId,JSON.parse(t??`{}`))},isDarkMode:t,children:JSON.stringify(a,null,2)})},BZ={key:`structure-view`,content:{nodeType:`translation`,translation:{en:{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},"en-GB":{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},fr:{titleInput:{placeholder:`Entrez la clé de votre nœud`},deleteButton:{label:`Supprimer le nœud de la section`},addNodeButton:{label:`Cliquez pour ajouter un nouveau nœud`,text:`Ajouter un nouveau nœud`}},es:{titleInput:{placeholder:`Ingrese la clave de su nodo`},deleteButton:{label:`Eliminar el nodo de la sección`},addNodeButton:{label:`Haga clic para agregar un nuevo nodo`,text:`Agregar un nuevo nodo`}},de:{titleInput:{placeholder:`Geben Sie den Schlüssel Ihres Knotens ein`},deleteButton:{label:`Knoten aus dem Abschnitt entfernen`},addNodeButton:{label:`Klicken, um einen neuen Knoten hinzuzufügen`,text:`Neuen Knoten hinzufügen`}},ja:{titleInput:{placeholder:`ノードのキーを入力してください`},deleteButton:{label:`セクションからノードを削除`},addNodeButton:{label:`新しいノードを追加するにはクリックしてください`,text:`新しいノードを追加`}},ko:{titleInput:{placeholder:`노드의 키를 입력하세요`},deleteButton:{label:`섹션에서 노드를 제거`},addNodeButton:{label:`새 노드를 추가하려면 클릭하세요`,text:`새 노드 추가`}},zh:{titleInput:{placeholder:`输入您节点的键`},deleteButton:{label:`从部分中移除节点`},addNodeButton:{label:`点击添加新节点`,text:`添加新节点`}},it:{titleInput:{placeholder:`Inserisci la chiave del tuo nodo`},deleteButton:{label:`Rimuovi nodo dalla sezione`},addNodeButton:{label:`Fai clic per aggiungere un nuovo nodo`,text:`Aggiungi un nuovo nodo`}},pt:{titleInput:{placeholder:`Insira a chave do seu nó`},deleteButton:{label:`Remover nó da seção`},addNodeButton:{label:`Clique para adicionar um novo nó`,text:`Adicionar um novo nó`}},hi:{titleInput:{placeholder:`अपनी नोड की कुंजी दर्ज करें`},deleteButton:{label:`सेक्शन से नोड हटाएं`},addNodeButton:{label:`नया नोड जोड़ने के लिए क्लिक करें`,text:`नया नोड जोड़ें`}},ar:{titleInput:{placeholder:`أدخل مفتاح العقدة الخاص بك`},deleteButton:{label:`إزالة العقدة من القسم`},addNodeButton:{label:`انقر لإضافة عقدة جديدة`,text:`إضافة عقدة جديدة`}},ru:{titleInput:{placeholder:`Введите ключ вашего узла`},deleteButton:{label:`Удалить узел из секции`},addNodeButton:{label:`Нажмите, чтобы добавить новый узел`,text:`Добавить новый узел`}}}},localIds:[`structure-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/StructureView/structureView.content.mjs`]},VZ={key:`node-type-selector`,content:{nodeType:`translation`,translation:{en:{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,gender:`Gender`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},"en-GB":{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,gender:`Gender`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},fr:{triggerPlaceHolder:`Type du Nœud`,multilingual:`Contenu Multilingue`,text:`Texte`,number:`Nombre`,boolean:`Booléen`,node:`Objet`,array:`Tableau`,enumeration:`Énumération`,gender:`Genre`,nest:`Imbriquation`,insertion:`Insertion`,condition:`Condition`,file:`Fichier`,markdown:`Markdown`,reactNode:`Node React`},es:{triggerPlaceHolder:`Tipo del nodo`,multilingual:`Contenido multilingüe`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Arreglo`,enumeration:`Enumeración`,gender:`Género`,nest:`Anidación`,insertion:`Inserción`,condition:`Condición`,file:`Archivo`,markdown:`Markdown`,reactNode:`Nodo React`},de:{triggerPlaceHolder:`Knotentyp`,multilingual:`Mehrsprachiger Inhalt`,text:`Text`,number:`Zahl`,boolean:`Bool`,node:`Objekt`,array:`Array`,enumeration:`Enumeration`,gender:`Geschlecht`,nest:`Vererbung`,insertion:`Einfügung`,condition:`Bedingung`,file:`Datei`,markdown:`Markdown`,reactNode:`React-Knoten`},ja:{triggerPlaceHolder:`ノードタイプ`,multilingual:`複数言語コンテンツ`,text:`テキスト`,number:`数字`,boolean:`ブール`,node:`オブジェクト`,array:`配列`,enumeration:`列挙`,gender:`性別`,nest:`ネスト`,insertion:`挿入`,condition:`条件`,file:`ファイル`,markdown:`マークダウン`,reactNode:`リアル・ノード`},ko:{triggerPlaceHolder:`노드 유형`,multilingual:`다중 언어 콘텐츠`,text:`텍스트`,number:`숫자`,boolean:`불리언`,node:`객체`,array:`배열`,enumeration:`열거`,gender:`성별`,nest:`중첩`,insertion:`삽입`,condition:`조건`,file:`파일`,markdown:`마크다운`,reactNode:`리액 노드`},zh:{triggerPlaceHolder:`节点类型`,multilingual:`多语言内容`,text:`文本`,number:`数字`,boolean:`布尔`,node:`对象`,array:`数组`,enumeration:`枚举`,gender:`性别`,nest:`嵌套`,insertion:`插入`,condition:`条件`,file:`文件`,markdown:`Markdown`,reactNode:`React 节点`},it:{triggerPlaceHolder:`Tipo di nodo`,multilingual:`Contenuto multilingue`,text:`Testo`,number:`Numero`,boolean:`Booleano`,node:`Oggetto`,array:`Array`,enumeration:`Enumerazione`,gender:`Genere`,nest:`Nidificazione`,insertion:`Inserimento`,condition:`Condizione`,file:`File`,markdown:`Markdown`,reactNode:`Nodo React`},pt:{triggerPlaceHolder:`Tipo de nó`,multilingual:`Conteúdo multilíngue`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Array`,enumeration:`Enumeração`,gender:`Gênero`,nest:`Nido`,insertion:`Inserção`,condition:`Condição`,file:`Arquivo`,markdown:`Markdown`,reactNode:`Nó React`},hi:{triggerPlaceHolder:`नोड प्रकार`,multilingual:`बहुभाषी सामग्री`,text:`पाठ`,number:`संख्या`,boolean:`बूलियन`,node:`ऑब्जेक्ट`,array:`ऐरे`,enumeration:`गणना`,gender:`लिंग`,nest:`नेस्टेंस`,insertion:`सम्मिलन`,condition:`शर्त्ता`,file:`फ़ाइल`,markdown:`मार्कडाउन`,reactNode:`रेड नोड`},ar:{triggerPlaceHolder:`نوع العقدة`,multilingual:`محتوى متعدد اللغات`,text:`نص`,number:`رقم`,boolean:`منطقي`,node:`كائن`,array:`مصفوفة`,enumeration:`تعداد`,gender:`جنس`,nest:`مستوى`,insertion:`إدراج`,condition:`شرط`,file:`ملف`,markdown:`مارك داون`,reactNode:`عقدة رياكت`},ru:{triggerPlaceHolder:`Тип узла`,multilingual:`Многоязычный контент`,text:`Текст`,number:`Число`,boolean:`Булево`,node:`Объект`,array:`Массив`,enumeration:`Перечисление`,gender:`Пол`,nest:`Вложенность`,insertion:`Вставка`,condition:`Условие`,file:`Файл`,markdown:`Markdown`,reactNode:`Реакт узел`}}},localIds:[`node-type-selector::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs`]},HZ=({section:e,onValueChange:t})=>{let{multilingual:n,text:r,number:i,boolean:a,node:o,array:s,enumeration:c,triggerPlaceHolder:l,nest:u,gender:d,condition:f,markdown:p,insertion:h,reactNode:g,file:_}=mr(VZ),[y,b]=(0,m.useState)(_v(e));return(0,v.jsxs)(q,{value:y,onValueChange:e=>{b(e),t(e)},children:[(0,v.jsx)(q.Trigger,{children:(0,v.jsx)(q.Value,{placeholder:l})}),(0,v.jsxs)(q.Content,{children:[(0,v.jsx)(q.Item,{value:S,children:n}),(0,v.jsx)(q.Item,{value:N,children:r}),(0,v.jsx)(q.Item,{value:ee,children:i}),(0,v.jsx)(q.Item,{value:te,children:a}),(0,v.jsx)(q.Item,{value:D,children:o}),(0,v.jsx)(q.Item,{value:O,children:s}),(0,v.jsx)(q.Item,{value:C,children:c}),(0,v.jsx)(q.Item,{value:P,children:d}),(0,v.jsx)(q.Item,{value:T,children:h}),(0,v.jsx)(q.Item,{value:j,children:p}),(0,v.jsx)(q.Item,{value:k,children:u}),(0,v.jsx)(q.Item,{value:w,children:f}),(0,v.jsx)(q.Item,{value:A,disabled:!0,children:g}),(0,v.jsx)(q.Item,{value:E,children:_})]})]})},UZ=({section:e,dictionaryLocalId:t,keyPath:n,onNodeTypeChange:r})=>{let i=Lv()?.internationalization.locales??[],a=_v(e),o=mv(e),s=e=>{r(fv(a,i,e))};if(a===`translation`||a===`condition`||a===`gender`||a===`enumeration`){let c=Object.keys(e[a])[0],l=[...n,{type:a,key:c}];return(0,v.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,v.jsx)(HZ,{section:e,onValueChange:e=>r(fv(e,i))}),(0,v.jsx)(UZ,{section:o,keyPath:l,dictionaryLocalId:t,onNodeTypeChange:s})]})}if(a===`array`){let c=[...n,{type:a,key:0}];return(0,v.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,v.jsx)(HZ,{section:e,onValueChange:e=>r(fv(e,i))}),(0,v.jsx)(UZ,{section:o,keyPath:c,dictionaryLocalId:t,onNodeTypeChange:s})]})}return a===`object`?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(HZ,{section:e,onValueChange:e=>r(fv(e,i))}),(0,v.jsx)(`div`,{className:`mt-6 ml-10`,children:(0,v.jsx)(KZ,{keyPath:n,section:e,dictionaryLocalId:t})})]}):(0,v.jsx)(HZ,{section:e,onValueChange:e=>r(fv(e,i))})},WZ=({sectionKey:e,section:t,keyPath:n,dictionaryLocalId:r})=>{let{focusedContent:i,setFocusedContentKeyPath:a}=Fv(),{renameEditedContent:o,addEditedContent:s}=Rv(),{titleInput:c,deleteButton:l}=mr(BZ),u=e=>{o(r,e,n);let t=n.slice(0,-1),i=n[n.length-1];a([...t,{...i,key:e}])};return(0,v.jsx)(Hu,{transparency:`xl`,roundedSize:`xl`,className:`w-full min-w-80 gap-2 overflow-auto px-5 py-2`,border:!0,borderColor:`text`,background:`none`,"aria-selected":lr(n,i?.keyPath??[]),onClick:()=>a(n),children:(0,v.jsxs)(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof e==`string`&&(0,v.jsxs)(`div`,{className:`w-full`,children:[(0,v.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[(0,v.jsx)($h,{name:`key`,"aria-label":`Key`,placeholder:c.placeholder.value,defaultValue:e,onSave:e=>u(e),variant:Cd.INVISIBLE}),(0,v.jsx)(Ju,{label:l.label.value,variant:W.HOVERABLE,size:U.ICON_SM,color:G.TEXT,className:`translate-x-2`,Icon:gu,onClick:()=>{s(r,void 0,n),a(n.slice(0,-1))}})]}),(0,v.jsxs)(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,Qv(e),` )`]})]}),(0,v.jsx)(UZ,{keyPath:n,dictionaryLocalId:r,section:t,onNodeTypeChange:e=>{s(r,e,n)}})]})})},GZ=({section:e,keyPath:t,dictionaryLocalId:n})=>{let{addNodeButton:r}=mr(BZ),{setFocusedContentKeyPath:i}=Fv(),{addEditedContent:a}=Rv();return!e||typeof e!=`object`?(0,v.jsx)(`div`,{children:`Not an object`}):(0,v.jsxs)(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[(0,v.jsx)(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(e).map(r=>(0,v.jsx)(`li`,{className:`flex w-full`,children:(0,v.jsx)(WZ,{sectionKey:r,section:e?.[r],keyPath:[...t,{type:D,key:r}],dictionaryLocalId:n})},`${JSON.stringify(t)}-object-${r}`))}),(0,v.jsx)(Ju,{label:r.label.value,variant:W.HOVERABLE,size:U.MD,color:G.TEXT,Icon:fu,className:`flex-1`,onClick:()=>{let e=[...t,{type:D,key:`newKey`}];a(n,``,e),i(e)},children:r.text})]})},KZ=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?(0,v.jsx)(WZ,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):(0,v.jsx)(GZ,{section:e,keyPath:t,dictionaryLocalId:n}),qZ=({dictionary:e})=>{let{content:t,localId:n}=e,{editedContent:r}=zv();return(0,v.jsx)(WZ,{section:r?.[n]?.content===void 0?t:r?.[n]?.content,keyPath:[],dictionaryLocalId:n})},JZ=({dictionary:e,onClickDictionaryList:t,isDarkMode:n,mode:r,onDelete:i,onSave:a,showReturnButton:o=!0})=>{let s=Lv(),{returnToDictionaryList:c}=mr(MZ),{focusedContent:l,setFocusedContent:u}=Fv(),{setLocaleDictionary:d}=Mv();return(0,m.useEffect)(()=>{u({...l??{},dictionaryKey:e.key,dictionaryLocalId:e.localId}),d(e)},[]),(0,v.jsx)(fy,{availableLocales:s?.internationalization.locales??[],children:(0,v.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[o&&(0,v.jsx)(Ju,{onClick:t,variant:W.HOVERABLE,className:`z-10 mr-auto mb-6 ml-5 shrink-0`,color:G.TEXT,Icon:Gl,label:c.label.value,children:c.text}),(0,v.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,v.jsxs)(lE,{defaultTab:`content`,variant:`ghost`,fullHeight:!0,headerClassName:`sticky top-0 z-10 rounded-xl bg-background/20 pb-4`,children:[r.includes(`remote`)&&(0,v.jsx)(lE.Item,{label:`Details`,value:`details`,children:(0,v.jsx)(IZ,{dictionary:e,mode:r})}),(0,v.jsx)(lE.Item,{label:`Structure`,value:`structure`,children:(0,v.jsx)(qZ,{dictionary:e})}),(0,v.jsx)(lE.Item,{label:`Content`,value:`content`,children:(0,v.jsx)(tU,{dictionary:e,isDarkMode:n})}),(0,v.jsx)(lE.Item,{label:`JSON`,value:`json`,children:(0,v.jsx)(zZ,{dictionary:e,isDarkMode:n})})]})}),(0,v.jsxs)(`div`,{className:`sticky bottom-16 z-20 flex shrink-0 flex-wrap items-center justify-end gap-10 border-card border-t p-4 md:bottom-0`,children:[(0,v.jsx)(Hh,{text:e.id,className:`text-nowrap text-neutral text-sm`,size:9,children:e.id}),(0,v.jsx)(jZ,{dictionary:e,mode:r,onDelete:()=>{u(null),i?.()},onSave:a})]})]})})},YZ=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,className:i,...a})=>(0,v.jsx)(`div`,{className:B(`relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out`,t?``:`grid-cols-[1fr]`,i),"aria-hidden":t,inert:t?!0:void 0,...a,children:(0,v.jsx)(`div`,{style:{minWidth:`${n}px`},className:B(r===`right`&&`ml-auto`),children:e})}),XZ=new class{listeners=new Set;drawers={};subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.drawers;open=e=>{this.drawers[e]||(this.drawers={...this.drawers,[e]:!0},this.emit())};close=e=>{this.drawers[e]&&(this.drawers={...this.drawers,[e]:!1},this.emit())};set=e=>{let t=!1,n={...this.drawers};for(let[r,i]of Object.entries(e))n[r]!==i&&(n[r]=i,t=!0);t&&(this.drawers=n,this.emit())};emit=()=>{this.listeners.forEach(e=>{e()})}},ZZ=()=>{let e=(0,m.useSyncExternalStore)(XZ.subscribe,XZ.getSnapshot,()=>({}));return{open:XZ.open,close:XZ.close,set:XZ.set,isOpen:t=>!!e[t]}},QZ={key:`right-drawer`,content:{nodeType:`translation`,translation:{en:{goBack:`Go back`,closeDrawer:`Close Drawer`},"en-GB":{goBack:`Go back`,closeDrawer:`Close Drawer`},fr:{goBack:`Retour`,closeDrawer:`Fermer le tiroir`},es:{goBack:`Volver`,closeDrawer:`Cerrar cajón`},de:{goBack:`Zurück`,closeDrawer:`Schublade schließen`},ja:{goBack:`戻る`,closeDrawer:`引き出しを閉じる`},ko:{goBack:`뒤로`,closeDrawer:`서랍 닫기`},zh:{goBack:`返回`,closeDrawer:`关闭抽屉`},it:{goBack:`Indietro`,closeDrawer:`Chiudi cassetto`},pt:{goBack:`Voltar`,closeDrawer:`Fechar gaveta`},hi:{goBack:`वापस जाएं`,closeDrawer:`दराज बंद करें`},ar:{goBack:`رجوع`,closeDrawer:`إغلاق الدرج`},ru:{goBack:`Назад`,closeDrawer:`Закрыть панель`}}},localIds:[`right-drawer::local::../@intlayer/design-system/dist/esm/components/RightDrawer/rightDrawer.content.mjs`]},$Z=e=>{let t=e.getBoundingClientRect(),n=t.top,r=t.bottom-1;if(n>=0&&r<=window.innerHeight){let n=t.left+t.width/2,r=t.top+10,i=document.elementFromPoint(n,r);return e===i||e.contains(i)}return!1},eQ=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=mr(QZ),{isMobile:d}=Yd(`md`),f=(0,m.useRef)(null),p=(0,m.useRef)(null),h=uE(l),{open:g,close:_,isOpen:y}=ZZ(),b=y(t),x=b;mE({disableScroll:x,key:t?`right_drawer_${t}`:`right_drawer`}),(0,m.useEffect)(()=>{let e=e=>{try{if(!f.current)return;let n=x&&a,r=e.target&&!f.current.contains(e.target),i=$Z(f.current);(n&&r&&i||!e.target)&&(_(t),c?.())}catch{_(t),c?.()}};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[x,_,c,a,t]);let S=(0,m.useRef)(c);return(0,m.useEffect)(()=>{S.current=c},[c]),(0,m.useEffect)(()=>{s!==void 0&&s!==b&&(s?g(t):(_(t),S.current?.()))},[s,b,t,g,_]),h?(0,rc.createPortal)((0,v.jsx)(`div`,{className:`fixed top-0 right-0 z-50 flex h-full justify-end`,children:(0,v.jsx)(YZ,{isHidden:!x,align:`right`,children:(0,v.jsxs)(Hu,{className:`relative flex h-screen w-screen flex-col text-text md:w-[400px]`,ref:f,roundedSize:`none`,children:[(0,v.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[(0,v.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,v.jsx)(`div`,{children:o&&(0,v.jsx)(Ju,{variant:W.HOVERABLE,color:G.TEXT,label:o.text??u.goBack.value,onClick:o.onBack,Icon:Yl,children:o?.text})}),(0,v.jsx)(`div`,{children:(0,v.jsxs)(lf,{identifier:`close-drawer`,children:[(0,v.jsx)(Ju,{variant:W.HOVERABLE,color:G.TEXT,label:`Close`,className:`ml-auto`,onClick:()=>{_(t),c?.()},Icon:vu,size:U.ICON_MD}),(0,v.jsx)(lf.Detail,{identifier:`close-drawer`,children:(0,v.jsxs)(`div`,{className:`flex items-center gap-2 p-2`,children:[(0,v.jsx)(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:u.closeDrawer}),(0,v.jsx)(tf,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{_(t),c?.()}})]})})]})})]}),e&&(0,v.jsx)(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),(0,v.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:(0,v.jsx)(`div`,{className:`flex flex-1 flex-col outline-none`,onClick:e=>{e.target===e.currentTarget&&d&&(_(t),c?.())},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d&&(_(t),c?.()))},ref:p,role:`button`,tabIndex:0,children:n})}),i&&(0,v.jsx)(`div`,{className:`shrink-0`,children:i})]})})}),h):(0,v.jsx)(v.Fragment,{})},tQ=function(e){return e.NONE=`none`,e.SM=`sm`,e.MD=`md`,e.LG=`lg`,e.XL=`xl`,e.XXL=`2xl`,e.XXXL=`3xl`,e.FULL=`full`,e}({}),nQ=function(e){return e.PRIMARY=`primary`,e.SUCCESS=`success`,e.ERROR=`error`,e.WARNING=`warning`,e.NEUTRAL=`neutral`,e.TEXT=`text`,e.BLUE=`blue`,e.YELLOW=`yellow`,e.GREEN=`green`,e.RED=`red`,e.ORANGE=`orange`,e.PURPLE=`purple`,e.PINK=`pink`,e.BROWN=`brown`,e.GRAY=`gray`,e.BLACK=`black`,e.WHITE=`white`,e}({}),rQ=function(e){return e.XS=`xs`,e.SM=`sm`,e.MD=`md`,e.LG=`lg`,e.XL=`xl`,e}({}),iQ=function(e){return e.NONE=`none`,e.WITH=`with`,e}({}),aQ=function(e){return e.NONE=`none`,e.WITH=`with`,e}({}),oQ=Fl(`w-fit backdrop-blur`,{variants:{roundedSize:{[`${tQ.NONE}`]:`rounded-none`,[`${tQ.SM}`]:`rounded-sm`,[`${tQ.MD}`]:`rounded-md`,[`${tQ.LG}`]:`rounded-lg`,[`${tQ.XL}`]:`rounded-xl`,[`${tQ.XXL}`]:`rounded-2xl`,[`${tQ.XXXL}`]:`rounded-3xl`,[`${tQ.FULL}`]:`rounded-full`},color:{[`${nQ.PRIMARY}`]:`border-primary bg-primary/10 text-primary`,[`${nQ.SUCCESS}`]:`border-success bg-success/10 text-success`,[`${nQ.ERROR}`]:`border-error bg-error/10 text-error`,[`${nQ.WARNING}`]:`border-warning bg-warning/10 text-warning`,[`${nQ.NEUTRAL}`]:`/10 border-neutral bg-neutral/10 text-neutral`,[`${nQ.TEXT}`]:`border-text bg-text/10 text-text`,[`${nQ.BLUE}`]:`border-blue-500 bg-blue-500/10 text-blue-500 dark:text-blue-300`,[`${nQ.YELLOW}`]:`border-yellow-500 bg-yellow-500/10 text-yellow-500 dark:text-yellow-300`,[`${nQ.GREEN}`]:`border-green-500 bg-green-500/10 text-green-500 dark:text-green-300`,[`${nQ.RED}`]:`border-red-500 bg-red-500/10 text-red-500 dark:text-red-300`,[`${nQ.ORANGE}`]:`border-orange-500 bg-orange-500/10 text-orange-500 dark:text-orange-300`,[`${nQ.PURPLE}`]:`border-purple-500 bg-purple-500/10 text-purple-500 dark:text-purple-300`,[`${nQ.PINK}`]:`border-pink-500 bg-pink-500/10 text-pink-500 dark:text-pink-300`,[`${nQ.BROWN}`]:`border-brown-500 bg-brown-500/10 text-brown-500 dark:text-brown-300`,[`${nQ.GRAY}`]:`border-gray-500 bg-gray-500/10 text-gray-500 dark:text-gray-300`,[`${nQ.BLACK}`]:`border-black bg-black/10 text-black`,[`${nQ.WHITE}`]:`border-white bg-white/10 text-white`},size:{[`${rQ.XS}`]:`border-[1.2px] px-2 py-0.5 text-xs`,[`${rQ.SM}`]:`border-[1.3px] px-2 py-0.5 text-sm`,[`${rQ.MD}`]:`border-2 px-2 py-1 text-base`,[`${rQ.LG}`]:`border-2 px-3 py-2 text-lg`,[`${rQ.XL}`]:`border-2 px-3 py-2 text-xl`},border:{[`${iQ.NONE}`]:`border-none`,[`${iQ.WITH}`]:`border-[1.3px] border-text`},background:{[`${aQ.NONE}`]:`bg-none`,[`${aQ.WITH}`]:``}},defaultVariants:{roundedSize:tQ.FULL,border:iQ.NONE,color:nQ.TEXT,size:rQ.MD}}),sQ=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>(0,v.jsx)(`div`,{className:oQ({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e}),cQ={queries:{retry:1,staleTime:30*1e3,gcTime:300*1e3,refetchOnMount:!0,refetchOnWindowFocus:!1,refetchOnReconnect:!1},mutations:{retry:0}},lQ=e=>e.split(`_`).join(` `),uQ=()=>{let{toast:e}=Ru();return{onError:t=>{[(()=>{try{if(typeof t==`string`)return JSON.parse(t);if(t instanceof Error)return JSON.parse(t.message)}catch{}return t})()].flat().forEach(t=>{let n=t?.error??t;if(n?.code===`RATE_LIMIT_EXCEEDED_UNAUTHENTICATED`){e({title:n.message,variant:`error`});return}e({title:lQ(n?.title??t?.title??`Error`),description:n?.message??t?.message??String(n??`An error occurred`),variant:`error`})})},onSuccess:t=>{t?.error&&e({title:lQ(t.error.title??t.error.code??`Error`),description:t.error.message??t.error.code??`An error occurred`,variant:`error`}),t?.message&&e({title:t.message,description:t.description,variant:`success`})}}},dQ=({children:e})=>{let{onError:t,onSuccess:n}=uQ(),r=(0,m.useRef)(null);if(!r.current){let e=new JR({defaultOptions:cQ,mutationCache:new WR({onSuccess:n,onError:t,onSettled:(t,n,r,i,a)=>{a.meta?.invalidateQueries&&a.meta.invalidateQueries.forEach(t=>{e.invalidateQueries({queryKey:t})}),a.meta?.resetQueries&&a.meta.resetQueries.forEach(t=>{e.resetQueries({queryKey:t})})}})});r.current=e}return(0,v.jsx)(ZR,{client:r.current,children:e})},fQ=({children:e})=>(0,v.jsx)(_F,{features:lL,children:e}),pQ=({children:e})=>(0,v.jsx)(fQ,{children:(0,v.jsxs)(dQ,{children:[(0,v.jsx)(zu,{}),e]})}),mQ=({children:e})=>(0,v.jsx)(Xa,{children:(0,v.jsx)(ua,{children:(0,v.jsx)(ca,{path:`*`,element:e})})}),hQ={key:`dictionary-edition-drawer`,content:{nodeType:`translation`,translation:{en:{openDictionaryEditor:{popoverContent:`Open Dictionary in Editor`,label:`Click to open the dictionary in the editor`},backButtonText:`Dictionary list`,modalTitle:`Edit dictionary`,noDictionaryFocused:`No dictionary focused`,focusedDictionaryNotFound:`Focused dictionary not found`},"en-GB":{openDictionaryEditor:{popoverContent:`Click to open the dictionary in the editor`,label:`Click to open the dictionary in the editor`},backButtonText:`Dictionary list`,modalTitle:`Edit dictionary`,noDictionaryFocused:`No dictionary focused`,focusedDictionaryNotFound:`Focused dictionary not found`},fr:{openDictionaryEditor:{popoverContent:`Ouvrir le dictionnaire dans l’éditeur`,label:`Cliquez pour ouvrir le dictionnaire dans l’éditeur`},backButtonText:`Liste des dictionnaires`,modalTitle:`Modifier le dictionnaire`,noDictionaryFocused:`Aucun dictionnaire sélectionné`,focusedDictionaryNotFound:`Dictionnaire focalisé non trouvé`},es:{openDictionaryEditor:{popoverContent:`Abrir el diccionario en el editor`,label:`Haga clic para abrir el diccionario en el editor`},backButtonText:`Lista de diccionarios`,modalTitle:`Editar el diccionario`,noDictionaryFocused:`No hay diccionario enfocado`,focusedDictionaryNotFound:`Diccionario enfocado no encontrado`},de:{openDictionaryEditor:{popoverContent:`Wörterbuch im Editor öffnen`,label:`Klicken Sie hier, um das Wörterbuch im Editor zu öffnen`},backButtonText:`Wörterbuchliste`,modalTitle:`Wörterbuch bearbeiten`,noDictionaryFocused:`Kein Wörterbuch ausgewählt`,focusedDictionaryNotFound:`Ausgewähltes Wörterbuch nicht gefunden`},ja:{openDictionaryEditor:{popoverContent:`エディターで辞書を開く`,label:`エディターで辞書を開く`},backButtonText:`辞書リスト`,modalTitle:`辞書を編集`,noDictionaryFocused:`フォーカスされた辞書がありません`,focusedDictionaryNotFound:`フォーカスされた辞書が見つかりません`},ko:{openDictionaryEditor:{popoverContent:`편집기에서 사전 열기`,label:`편집기에서 사전 열기`},backButtonText:`사전 목록`,modalTitle:`사전 편집`,noDictionaryFocused:`포커스가 있는 사전이 없습니다`,focusedDictionaryNotFound:`포커스가 있는 사전이 없습니다`},zh:{openDictionaryEditor:{popoverContent:`点击打开词典到编辑器`,label:`点击打开词典到编辑器`},backButtonText:`词典列表`,modalTitle:`编辑词典`,noDictionaryFocused:`没有聚焦的词典`,focusedDictionaryNotFound:`没有聚焦的词典`},it:{openDictionaryEditor:{popoverContent:`Apri il dizionario nell’editor`,label:`Fai clic per aprire il dizionario nell’editor`},backButtonText:`Elenco di dizionari`,modalTitle:`Modifica dizionario`,noDictionaryFocused:`Nessun dizionario selezionato`,focusedDictionaryNotFound:`Nessun dizionario selezionato`},pt:{openDictionaryEditor:{popoverContent:`Abrir o dicionário no editor`,label:`Clique para abrir o dicionário no editor`},backButtonText:`Lista de dicionários`,modalTitle:`Editar dicionário`,noDictionaryFocused:`Nenhum dicionário focalizado`,focusedDictionaryNotFound:`Nenhum dicionário focalizado`},hi:{openDictionaryEditor:{popoverContent:`एडिटर में शब्दकोश खोलने के लिए क्लिक करें`,label:`एडिटर में शब्दकोश खोलने के लिए क्लिक करें`},backButtonText:`शब्दकोश सूची`,modalTitle:`शब्दकोश संपादित करें`,noDictionaryFocused:`कोई फोकस शब्दकोश नहीं है`,focusedDictionaryNotFound:`कोई फोकस शब्दकोश नहीं है`},ar:{openDictionaryEditor:{popoverContent:`انقر لفتح قاموس في المحرر`,label:`انقر لفتح قاموس في المحرر`},backButtonText:`قائمة القوامل`,modalTitle:`تحرير قاموس`,noDictionaryFocused:`لا يوجد قاموس مرتبط`,focusedDictionaryNotFound:`لا يوجد قاموس مرتبط`},ru:{openDictionaryEditor:{popoverContent:`Нажмите, чтобы открыть словарь в редакторе`,label:`Нажмите, чтобы открыть словарь в редакторе`},backButtonText:`Список словарей`,modalTitle:`Редактировать словарь`,noDictionaryFocused:`Нет фокусированного словаря`,focusedDictionaryNotFound:`Нет фокусированного словаря`}}},localIds:[`dictionary-edition-drawer::local::client/src/components/Editor/DictionaryEditionDrawer/dictionaryEditionDrawer.content.ts`]},gQ=e=>{let{minChars:t=3,debounceMs:n=300,trim:r=!0,defaultValue:i,onSearch:a,onClear:o}=e??{},s=(0,m.useRef)(``),c=(0,m.useRef)(null),[l,u]=(0,m.useState)(i??``),d=()=>{c.current&&=(clearTimeout(c.current),null)};return(0,m.useEffect)(()=>()=>{d()},[]),{setSearch:e=>{s.current=e;let i=r?e.trim():e;if(d(),i.length<t){u(``),o?.();return}c.current=setTimeout(()=>{let e=r?s.current.trim():s.current;e.length>=t?(u(e),a?.(e)):(u(``),o?.())},n)},search:l,hasMinChars:l.length>=t}},_Q=`dictionaryList`,vQ=e=>`dictionary_edition_${e}`,yQ=e=>{let t=vQ(e),{isOpen:n,open:r,close:i}=ZZ(),{getEditedContentValue:a}=Rv(),{focusedContent:o,setFocusedContent:s}=Fv();return(0,m.useEffect)(()=>{o&&(o.keyPath?.length??0)>0&&r(t)},[o,r,t]),{isOpen:n(t),focusedContent:o,getEditedContentValue:a,close:()=>{i(t),o?.dictionaryKey&&s({...o,keyPath:[]})}}},bQ=({dictionaryKey:e,isDarkMode:t})=>{let{backButtonText:n,openDictionaryEditor:r,modalTitle:i,noDictionaryFocused:a,focusedDictionaryNotFound:o}=mr(hQ),s=vQ(e),{focusedContent:c,close:l}=yQ(e),{setFocusedContent:u}=Fv(),{open:d}=ZZ(),f=()=>d(_Q),{data:p}=TH(),h=()=>{l(),u(null),f()},[g,_]=(0,m.useState)(!1),y=()=>{_(!1),h()};if(!c?.dictionaryKey)return(0,v.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:a});let b=p?.[c.dictionaryKey]?.find(e=>e.localId===c?.dictionaryLocalId);return b?(0,v.jsx)(eQ,{identifier:s,backButton:{onBack:h,text:n.value},onClose:l,header:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`header`,{className:`mb-5 flex w-full px-3`,children:[(0,v.jsx)(`h3`,{className:`w-full text-center text-lg`,children:b.title?b.title:b.key}),(0,v.jsxs)(lf,{identifier:`open-dictionary-editor`,children:[(0,v.jsx)(Ju,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:du,label:r.label.value,onClick:()=>_(!0)}),(0,v.jsx)(lf.Detail,{identifier:`open-dictionary-editor`,children:(0,v.jsx)(`span`,{className:`whitespace-nowrap p-2 text-neutral text-xs`,children:r.popoverContent})})]})]}),(0,v.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-x-4 gap-y-2 border-text/20 border-b border-dashed pb-3`,children:[(0,v.jsx)(sQ,{color:`text`,roundedSize:`full`,size:`xs`,children:b.key}),b.filePath&&(0,v.jsx)(sQ,{color:`blue`,roundedSize:`full`,size:`xs`,children:b.filePath.split(`/`).pop()}),b.id&&(0,v.jsx)(sQ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`})]})]}),footer:(0,v.jsx)(jZ,{dictionary:b,mode:[`local`,`remote`],className:`mb-4 flex-col px-3`,onDelete:h}),children:c&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(mL,{isOpen:g,onClose:()=>_(!1),hasCloseButton:!0,title:i,size:`xl`,transparency:`lg`,className:`h-full`,children:(0,v.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:(0,v.jsx)(JZ,{dictionary:b,onClickDictionaryList:y,isDarkMode:t,mode:[`local`,`remote`],onDelete:()=>{_(!1),h()},onSave:()=>{_(!1)}})})}),(0,v.jsx)(iy,{dictionary:b})]})}):(0,v.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:o})},xQ=({isDarkMode:e})=>{let{focusedContent:t}=Fv(),n=t?.dictionaryKey;return n?(0,v.jsx)(bQ,{dictionaryKey:n,isDarkMode:e}):(0,v.jsx)(v.Fragment,{})},SQ={key:`dictionary-list-drawer`,content:{nodeType:`translation`,translation:{en:{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},"en-GB":{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},fr:{drawerTitle:{label:`Liste des dictionnaires`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Ouvrir le dictionnaire dans l'éditeur {{dictionaryLocalId}}`}}},es:{drawerTitle:{label:`Lista de diccionarios`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir el diccionario en el editor {{dictionaryLocalId}}`}}},de:{drawerTitle:{label:`Wörterbuchliste`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Wörterbuch-Editor öffnen {{dictionaryLocalId}}`}}},ja:{drawerTitle:{label:`辞書リスト`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`辞書エディタを開く {{dictionaryLocalId}}`}}},ko:{drawerTitle:{label:`사전 목록`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`사전 편집기 열기 {{dictionaryLocalId}}`}}},zh:{drawerTitle:{label:`字典列表`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`打开字典编辑器 {{dictionaryLocalId}}`}}},it:{drawerTitle:{label:`Lista dei dizionari`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Apri editor dizionario {{dictionaryLocalId}}`}}},pt:{drawerTitle:{label:`Lista de dicionários`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir editor de dicionário {{dictionaryLocalId}}`}}},hi:{drawerTitle:{label:`शब्दकोश सूची`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`शब्दकोश संपादक खोलें {{dictionaryLocalId}}`}}},ar:{drawerTitle:{label:`قائمة القواميس`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`فتح محرر القاموس {{dictionaryLocalId}}`}}},ru:{drawerTitle:{label:`Список словарей`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Открыть редактор словаря {{dictionaryLocalId}}`}}}}},localIds:[`dictionary-list-drawer::local::client/src/components/Editor/DictionaryListDrawer/dictionaryListDrawer.content.ts`]},CQ=()=>{let{drawerTitle:e,buttonLabel:t}=mr(SQ),{set:n}=ZZ(),{localeDictionaries:r}=jv(),{editedContent:i}=zv(),{setFocusedContent:a}=Fv(),{setSearch:o,search:s}=gQ(),c=(0,m.useMemo)(()=>new Ab(Object.values(r),{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[r]),l=(0,m.useMemo)(()=>!s||s.trim()===``?Object.values(r):c.search(s).map(e=>e.item),[s,c,r]),u=e=>{a({dictionaryKey:e.key,dictionaryLocalId:e.localId,keyPath:[]}),n({[_Q]:!1,[vQ(e.key)]:!0})},d=e=>Object.keys(i??{}).includes(e);return(0,v.jsxs)(eQ,{title:e.label.value,identifier:_Q,children:[(0,v.jsx)(`div`,{className:`p-3 pb-4`,children:(0,v.jsx)(Hd,{placeholder:`Search dictionaries`,onChange:e=>o(e.target.value),type:`search`})}),(0,v.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.map(e=>(0,v.jsx)(`li`,{className:`w-full`,children:(0,v.jsx)(Ju,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>u(e),variant:`hoverable`,color:`text`,IconRight:Xl,size:`md`,isFullWidth:!0,Icon:d(e.localId)?uu:void 0,children:(0,v.jsx)(`div`,{className:`flex items-center gap-2 py-1`,children:(0,v.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1`,children:[(0,v.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[(0,v.jsx)(sQ,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&(0,v.jsx)(sQ,{color:`blue`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&(0,v.jsx)(sQ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`})]}),(0,v.jsx)(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},wQ={key:`long-press-message`,content:{nodeType:`translation`,translation:{en:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press to edit the "{{dictionaryKey}}" dictionary`}},"en-GB":{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press to edit the "{{dictionaryKey}}" dictionary`}},fr:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press pour éditer le dictionnaire "{{dictionaryKey}}"`}},es:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Presiona largo para editar el diccionario "{{dictionaryKey}}"`}},de:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Lang press für Bearbeitung des Wörterbuchs "{{dictionaryKey}}"`}},ja:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`長押しして編集 "{{dictionaryKey}}" 辞書`}},ko:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`길게 눌러 편집 "{{dictionaryKey}}" 사전`}},zh:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`长按编辑 "{{dictionaryKey}}" 字典`}},it:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Premi a lungo per modificare il dizionario "{{dictionaryKey}}"`}},pt:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Pressione longa para editar o dicionário "{{dictionaryKey}}"`}},hi:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`लंग प्रेस करें टू एडिट "{{dictionaryKey}}"`}},ar:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`اضغط طويلاً للتعديل "{{dictionaryKey}}"`}},ru:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Длительное нажатие для редактирования словаря "{{dictionaryKey}}"`}}}},localIds:[`long-press-message::local::client/src/components/Editor/LongPressMessage/index.content.ts`]},TQ=()=>{let{message:e}=mr(wQ),[t]=kv(Og.INTLAYER_HOVERED_CONTENT_CHANGED,null);return(0,v.jsx)(`div`,{className:B(`rounded-2xl bg-neutral/30 px-3 py-1 font-bold text-sm text-text transition-opacity duration-100`,t?.dictionaryKey?`opacity-100`:`opacity-0`),children:t?.dictionaryKey?e({dictionaryKey:t.dictionaryKey}):``})},EQ=({children:e})=>(0,v.jsxs)(`div`,{className:`relative size-full bg-card p-3`,children:[e,(0,v.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:(0,v.jsx)(TQ,{})}),(0,v.jsx)(xQ,{}),(0,v.jsx)(CQ,{})]}),DQ=()=>{let[e,t]=(0,m.useState)();return(0,m.useEffect)(()=>{fetch(`/api/config`).then(e=>e.json()).then(e=>t(e.data))},[]),e},OQ=({children:e,iframeRef:t})=>{let n=DQ(),r=n?.editor.applicationURL;return n?(0,v.jsx)(Iv,{postMessage:e=>{t.current?.contentWindow?.postMessage(e,r)},allowedOrigins:[r],configuration:n,children:e}):(0,v.jsx)(Wu,{})},kQ={key:`iframe-controller`,content:{nodeType:`translation`,translation:{en:{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},"en-GB":{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},fr:{intlayerApplication:`Application Intlayer`,enableEditor:`Activer l'éditeur`},es:{intlayerApplication:`Aplicación Intlayer`,enableEditor:`Activar el editor`},de:{intlayerApplication:`Intlayer-Anwendung`,enableEditor:`Editor aktivieren`},ja:{intlayerApplication:`Intlayerアプリケーション`,enableEditor:`エディタを有効にする`},ko:{intlayerApplication:`Intlayer 애플리케이션`,enableEditor:`에디터 활성화`},zh:{intlayerApplication:`Intlayer 应用程序`,enableEditor:`启用编辑器`},it:{intlayerApplication:`Applicazione Intlayer`,enableEditor:`Abilita l'editor`},pt:{intlayerApplication:`Aplicativo Intlayer`,enableEditor:`Ativar editor`},hi:{intlayerApplication:`इंटलेयर एप्लिकेशन`,enableEditor:`संपादक सक्षम करें`},ar:{intlayerApplication:`تطبيق Intlayer`,enableEditor:`تفعيل المحرر`},ru:{intlayerApplication:`Приложение Intlayer`,enableEditor:`Включить редактор`}}},localIds:[`iframe-controller::local::client/src/components/Editor/iframeController.content.ts`]},AQ=()=>{let{editedContent:e,setEditedContentState:t}=zv(),n=()=>{let e=localStorage?.getItem(`INTLAYER_EDITED_CONTENT_CHANGED`);if(e)try{t(JSON.parse(e))}catch(e){console.error(e)}};return(0,m.useEffect)(()=>{e!==void 0&&localStorage?.setItem(`INTLAYER_EDITED_CONTENT_CHANGED`,JSON.stringify(e))},[e]),(0,m.useEffect)(()=>{e===void 0&&n()},[]),n},jQ={key:`no-application-url-view`,content:{nodeType:`translation`,translation:{en:{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},"en-GB":{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},fr:{title:`Votre configuration de projet ne comprend pas l’URL de l’application`,description:`Pour utiliser l’éditeur, vous devez ajouter l’URL de l’application pour accéder au fichier de configuration.`,documentationLink:{label:`Cliquez ici pour accéder à la documentation de l’éditeur`,text:`Voir comment configurer l’éditeur`}},es:{title:`Su configuración de proyecto no incluye la URL de la aplicación`,description:`Para usar el editor, debe agregar la URL de la aplicación para acceder al archivo de configuración.`,documentationLink:{label:`Haga clic aquí para acceder a la documentación del editor`,text:`Vea cómo configurar el editor`}},de:{title:`Ihre Projektkonfiguration enthält keine Anwendungs-URL`,description:`Um den Editor zu verwenden, müssen Sie die URL der Anwendung hinzufügen, um auf die Konfigurationsdatei zuzugreifen.`,documentationLink:{label:`Klicken Sie hier, um die Editor-Dokumentation zu besuchen`,text:`Siehe, wie man den Editor konfiguriert`}},ja:{title:`あなたのプロジェクト構成にはアプリケーション URL が含まれていません`,description:`エディターを使用するには、アプリケーションの URL を設定ファイルに追加する必要があります。`,documentationLink:{label:`エディターのドキュメントに移動するには、ここをクリックしてください`,text:`エディターの設定方法を見る`}},ko:{title:`당신의 프로젝트 구성에 앱 URL이 포함되어 있지 않습니다.`,description:`에디터를 사용하려면 설정 파일에 앱 URL을 추가해야 합니다.`,documentationLink:{label:`에디터 문서로 이동하려면 여기를 클릭하십시오.`,text:`에디터 설정 방법을 보십시오`}},zh:{title:`您的项目配置未包含应用程序 URL`,description:`要使用编辑器,您需要将应用程序 URL 添加到访问配置文件。`,documentationLink:{label:`点击此处访问编辑器文档`,text:`查看如何配置编辑器`}},it:{title:`La configurazione del progetto non include l’URL dell’applicazione`,description:`Per utilizzare l’editor, è necessario aggiungere l’URL dell’applicazione per accedere al file di configurazione.`,documentationLink:{label:`Fai clic qui per accedere alla documentazione dell’editor`,text:`Vedi come configurare l’editor`}},pt:{title:`Sua configuração do projeto não inclui a URL do aplicativo`,description:`Para usar o editor, você precisa adicionar a URL do aplicativo para acessar o arquivo de configuração.`,documentationLink:{label:`Clique aqui para acessar a documentação do editor`,text:`Veja como configurar o editor`}},hi:{title:`आपके प्रोजेक्ट कॉन्फ़िगरेशन में ऐप का URL शामिल नहीं है`,description:`एडिटर का उपयोग करने के लिए, आपको कॉन्फ़िगरेशन फ़ाइल तक ऐप का URL को जोड़ना होगा।`,documentationLink:{label:`एडिटर को डॉक्यूमेंट पर जाए रखना चाहते हैं?`,text:`एडिटर को काने के बारे में देखें`}},ar:{title:`تم إنشاء مشروعك بدون تضمين عنوان URL التطبيق`,description:`لاستخدام المحرر، يجب عليك إضافة عنوان URL التطبيق للوصول إلى ملف التكوين.`,documentationLink:{label:`انقر هنا للوصول إلى وثائق المحرر`,text:`انظر كيفية تكوين المحرر`}},ru:{title:`Ваша конфигурация проекта не включает URL-адрес приложения`,description:`Чтобы использовать редактор, вам необходимо добавить URL-адрес приложения для доступа к файлу конфигурации.`,documentationLink:{label:`Нажмите, чтобы перейти к документации редактора`,text:`Смотрите, как настроить редактор`}}}},localIds:[`no-application-url-view::local::client/src/components/Editor/NoApplicationURLView/noApplicationURLView.content.ts`]},MQ=()=>{let{title:e,description:t,documentationLink:n}=mr(jQ);return(0,v.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,v.jsx)(Jb,{className:`mb-8`,children:e}),(0,v.jsx)(`strong`,{className:`block text-neutral`,children:t}),(0,v.jsx)(ud,{label:n.label.value,href:`https://intlayer.org/doc/concept/configuration#editor-configuration`,color:`text`,variant:`button`,className:`ml-auto`,isExternalLink:!0,children:n.text})]})},NQ=({iframeRef:e,applicationPath:t})=>{let n=mr(kQ),{editor:r}=Lv()??{},{enabled:i}=Bv(),a=Vv();AQ(),Uv();let[o,s]=(0,m.useState)(!0),[c]=Av(void 0,{receive:!0,emit:!1});return(0,m.useEffect)(()=>{typeof c==`string`&&window.history.replaceState({},``,c)},[c]),r?.applicationURL?(0,v.jsxs)(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[(0,v.jsx)(Wu,{isLoading:o}),(0,v.jsx)(`iframe`,{src:`${r.applicationURL}${t}`,title:n.intlayerApplication.value,sandbox:`allow-scripts allow-same-origin`,className:B(`size-full`,o&&`hidden`),ref:e,onLoad:()=>{s(!1)}}),!i&&(0,v.jsx)(`div`,{className:`fixed right-4 bottom-4`,children:(0,v.jsx)(Ju,{label:n.enableEditor.value,onClick:a,color:`text`,children:n.enableEditor})})]}):(0,v.jsx)(Hu,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:(0,v.jsx)(MQ,{})})},PQ=()=>{let e=(0,m.useRef)(null);return(0,v.jsx)(OQ,{iframeRef:e,children:(0,v.jsx)(pr,{disableEditor:!0,children:(0,v.jsx)(EQ,{children:(0,v.jsx)(NQ,{iframeRef:e,applicationPath:Pi().pathname})})})})};(0,h.createRoot)(document.getElementById(`root`)).render((0,v.jsx)(m.StrictMode,{children:(0,v.jsx)(()=>(0,v.jsx)(mQ,{children:(0,v.jsx)(pQ,{children:(0,v.jsx)(PQ,{})})}),{})}));export{yr as n,tx as t};
|