appos 0.1.0

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.
Files changed (156) hide show
  1. package/README.md +399 -0
  2. package/build/client/assets/IconMail-BZadZvAd.js +1 -0
  3. package/build/client/assets/_-CgPm6_fJ.js +1 -0
  4. package/build/client/assets/_index-BCLDp_mg.js +1 -0
  5. package/build/client/assets/_layout-CTmjtKOZ.js +1 -0
  6. package/build/client/assets/_layout-HsJ3Zu5t.js +1 -0
  7. package/build/client/assets/_layout-OcS85aOt.js +1 -0
  8. package/build/client/assets/app-sidebar-Bm6e4kn_.js +1 -0
  9. package/build/client/assets/app-sidebar-D2Nsi85j.js +1 -0
  10. package/build/client/assets/auth-provider-rkzBVtYX.js +1 -0
  11. package/build/client/assets/brand-CbTWw97e.js +1 -0
  12. package/build/client/assets/browser-ponyfill-D3yQFvRu.js +2 -0
  13. package/build/client/assets/button-DtZhoqpk.js +1 -0
  14. package/build/client/assets/check-D5D2EGI4.js +1 -0
  15. package/build/client/assets/checkbox-B35Nn166.js +1 -0
  16. package/build/client/assets/chunk-JG3XND5A-BetDbdG0.js +1 -0
  17. package/build/client/assets/chunk-UIGDSWPH-DeiamgQc.js +26 -0
  18. package/build/client/assets/chunk-vBKQ29Cd.js +1 -0
  19. package/build/client/assets/circle-alert-DB4JluX5.js +1 -0
  20. package/build/client/assets/compare-Br3z3FUS-BXkA2ojG.js +2 -0
  21. package/build/client/assets/compiler-runtime-Co9svCia.js +1 -0
  22. package/build/client/assets/config-ChcA_Pkv.js +1 -0
  23. package/build/client/assets/createReactComponent-C2TSpqC7.js +1 -0
  24. package/build/client/assets/dialog-CQrpvURm.js +1 -0
  25. package/build/client/assets/dist-B6TkSbxV.js +1 -0
  26. package/build/client/assets/dist-BNO39Rfs.js +1 -0
  27. package/build/client/assets/dist-BWnI-4xl.js +1 -0
  28. package/build/client/assets/dist-CA21wN5I.js +1 -0
  29. package/build/client/assets/dist-CBNvQRbZ.js +1 -0
  30. package/build/client/assets/dist-CYRPrwOb.js +1 -0
  31. package/build/client/assets/dist-DKtC0FSi.js +1 -0
  32. package/build/client/assets/dist-DhfcebhF.js +1 -0
  33. package/build/client/assets/dist-VqaKdvZu.js +1 -0
  34. package/build/client/assets/dist-Yn6lj8QC.js +5 -0
  35. package/build/client/assets/dropdown-menu-CbzduuDa.js +1 -0
  36. package/build/client/assets/empty-DQRarCKT.js +1 -0
  37. package/build/client/assets/entry.client-BN1GPjAL.js +10 -0
  38. package/build/client/assets/es2015-BJguufLZ.js +41 -0
  39. package/build/client/assets/eye-Ctrln70x.js +1 -0
  40. package/build/client/assets/file-preview-dialog-BRkWSRN4.js +14 -0
  41. package/build/client/assets/index-Del2yBnb.js +1 -0
  42. package/build/client/assets/initReactI18next-CyHiepAw.js +1 -0
  43. package/build/client/assets/input-V1lM1yoz.js +1 -0
  44. package/build/client/assets/jsx-runtime-SCjaiuzT.js +1 -0
  45. package/build/client/assets/lock-Bj7dxHab.js +1 -0
  46. package/build/client/assets/manifest-ca813980.js +1 -0
  47. package/build/client/assets/nav-user-BqPUBe9x.js +1 -0
  48. package/build/client/assets/nav-user-Yu7wt7b_.js +1 -0
  49. package/build/client/assets/org-switcher-BIuearbE.js +1 -0
  50. package/build/client/assets/password-input-bor7e4TM.js +1 -0
  51. package/build/client/assets/react-dom-Bhi-1tDD.js +1 -0
  52. package/build/client/assets/realtime-BmU1LPhx.js +1 -0
  53. package/build/client/assets/root-CS5YIV-V.js +3 -0
  54. package/build/client/assets/root-D0CFuQYc.css +2 -0
  55. package/build/client/assets/route-B9cwW-UK.js +1 -0
  56. package/build/client/assets/route-BD2nV1q2.js +1 -0
  57. package/build/client/assets/route-BEnDcljt.js +1 -0
  58. package/build/client/assets/route-BR4LdxHR.js +1 -0
  59. package/build/client/assets/route-BU5TYmVE.js +0 -0
  60. package/build/client/assets/route-BVmIPEvK.js +11 -0
  61. package/build/client/assets/route-BY244T48.js +1 -0
  62. package/build/client/assets/route-Bwd903CU.js +1 -0
  63. package/build/client/assets/route-CN9iChOk.js +1 -0
  64. package/build/client/assets/route-CQ3p9Qb1.js +1 -0
  65. package/build/client/assets/route-CVLnTONw.js +1 -0
  66. package/build/client/assets/route-CoMZag4T.js +1 -0
  67. package/build/client/assets/route-CsYSLbnx.js +1 -0
  68. package/build/client/assets/route-DWNrq2GE.js +1 -0
  69. package/build/client/assets/route-Dxfmap_u.js +1 -0
  70. package/build/client/assets/route-Gnx1fkRX.js +0 -0
  71. package/build/client/assets/route-NduA4SS_.js +1 -0
  72. package/build/client/assets/route-u2hskgE_.js +1 -0
  73. package/build/client/assets/route-v9Jwv-AW.js +1 -0
  74. package/build/client/assets/select-DATRE76_.js +1 -0
  75. package/build/client/assets/separator-Cla0V581.js +1 -0
  76. package/build/client/assets/shim-TRiHENXu.js +1 -0
  77. package/build/client/assets/sidebar-CqrdL512.js +1 -0
  78. package/build/client/assets/site-header-CZO3qBhf.js +1 -0
  79. package/build/client/assets/site-header-CwidwSv1.js +1 -0
  80. package/build/client/assets/social-providers-Bz7f1_yd.js +1 -0
  81. package/build/client/assets/test-WdoqKbLa.js +1 -0
  82. package/build/client/assets/tooltip-BeDraHQn.js +1 -0
  83. package/build/client/assets/trpc-C1CjVipH.js +6 -0
  84. package/build/client/assets/trust-indicator-D4tEs4Dr.js +20 -0
  85. package/build/client/assets/use-file-upload-CNPfWC6W.js +1 -0
  86. package/build/client/assets/useTranslation-Bz7VuQ7j.js +1 -0
  87. package/build/client/assets/utils-InBzhUf_.js +1 -0
  88. package/build/client/assets/x-4CC8aqOW.js +1 -0
  89. package/build/client/favicon.ico +0 -0
  90. package/build/client/locales/en/emails.json +11 -0
  91. package/build/client/locales/en/translation.json +411 -0
  92. package/build/client/locales/zh-CN/emails.json +11 -0
  93. package/build/client/locales/zh-CN/translation.json +1 -0
  94. package/build/client/locales/zh-TW/emails.json +11 -0
  95. package/build/client/locales/zh-TW/translation.json +1 -0
  96. package/build/client/logo-invert.png +0 -0
  97. package/build/client/logo.png +0 -0
  98. package/build/lib/adapter-factory-CLtf7vT5-CTKiMV2u.mjs +19675 -0
  99. package/build/lib/bun-sqlite-dialect-DN7EKoIB-0pWIoG0L.mjs +155 -0
  100. package/build/lib/chunk-BYI67GdN.mjs +1 -0
  101. package/build/lib/chunk-CkKlU7xI.mjs +44 -0
  102. package/build/lib/client-BtuhFgvy.mjs +65 -0
  103. package/build/lib/client.d.ts +2272 -0
  104. package/build/lib/client.js +24 -0
  105. package/build/lib/date.d.ts +1 -0
  106. package/build/lib/date.js +1 -0
  107. package/build/lib/dialect-BeMwdQoz-D41NdSow.mjs +72 -0
  108. package/build/lib/dist-cjs-B43A5HXv.mjs +169 -0
  109. package/build/lib/dist-cjs-B_wkbabY.mjs +214 -0
  110. package/build/lib/dist-cjs-BmbYbMhp.mjs +143 -0
  111. package/build/lib/dist-cjs-Cc337rwW.mjs +7 -0
  112. package/build/lib/dist-cjs-CgzfN8xY.mjs +4974 -0
  113. package/build/lib/dist-cjs-DBFcizQf.mjs +50 -0
  114. package/build/lib/dist-cjs-DC-UL-xx.mjs +97 -0
  115. package/build/lib/dist-cjs-DHlTgXUO.mjs +6975 -0
  116. package/build/lib/dist-cjs-DYAmJYzN.mjs +323 -0
  117. package/build/lib/dist-cjs-Ddm6Stp9.mjs +1294 -0
  118. package/build/lib/dist-cjs-GFGBhaZg.mjs +84 -0
  119. package/build/lib/dist-cjs-ieCOxrOi.mjs +181 -0
  120. package/build/lib/dist-cjs-nbOGa7i_.mjs +47 -0
  121. package/build/lib/dist-cjs-pN6ekzMW.mjs +66 -0
  122. package/build/lib/dist-cjs-yYlQ1OiO.mjs +102 -0
  123. package/build/lib/esm-DPet4lFW.mjs +15816 -0
  124. package/build/lib/event-streams-x9fP9BzF.mjs +185 -0
  125. package/build/lib/file-preview-dialog-Cugg8tEc.mjs +59 -0
  126. package/build/lib/kysely-adapter-BTWfu5rn.mjs +183 -0
  127. package/build/lib/magic-string.es-jZcifc5m.mjs +1013 -0
  128. package/build/lib/memory-adapter-DiU519m9.mjs +147 -0
  129. package/build/lib/node-ponyfill-Dmm1SWTU.mjs +38212 -0
  130. package/build/lib/node-sqlite-dialect-BqISUSC3-DYvTLBpY.mjs +155 -0
  131. package/build/lib/package-DfozRyK6.mjs +5 -0
  132. package/build/lib/react-dom-CPjM_WCt.mjs +42 -0
  133. package/build/lib/server.d.mts +76273 -0
  134. package/build/lib/server.mjs +325 -0
  135. package/build/lib/sso-oidc-Qom0PEDW.mjs +1036 -0
  136. package/build/lib/sts-CLRaHSW_.mjs +13 -0
  137. package/build/lib/sts-Dl7yZqX1.mjs +1405 -0
  138. package/build/lib/test.d.mts +8922 -0
  139. package/build/lib/test.mjs +175650 -0
  140. package/build/lib/ui/index.d.ts +1643 -0
  141. package/build/lib/ui/index.js +160 -0
  142. package/build/lib/utils.d.ts +21 -0
  143. package/build/lib/utils.js +1 -0
  144. package/build/lib/zod.d.ts +1 -0
  145. package/build/lib/zod.js +23 -0
  146. package/build/main.js +2383 -0
  147. package/build/server/assets/context-BoNg86Eh.js +35 -0
  148. package/build/server/assets/dialog-B8YbGNaz.js +54 -0
  149. package/build/server/assets/file-preview-dialog-qWSViOWQ.js +15 -0
  150. package/build/server/assets/react-CFQ4y0AA.js +13 -0
  151. package/build/server/assets/react-dom-Ca1YUVo2.js +5 -0
  152. package/build/server/assets/server-build-BMOfm0ad.js +118 -0
  153. package/build/server/assets/server.node-B2oksIp8.js +196 -0
  154. package/build/server/assets/server.node-VQzoub0A.js +1 -0
  155. package/build/server/index.js +123 -0
  156. package/package.json +224 -0
@@ -0,0 +1,118 @@
1
+ import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./react-CFQ4y0AA.js";import{C as c,D as l,E as u,O as d,S as f,T as p,_ as m,a as h,b as g,d as _,f as v,g as y,h as b,i as x,l as S,n as C,p as w,r as T,s as E,t as D,u as O,v as k,w as A,x as j,y as M}from"./context-BoNg86Eh.js";import{t as N}from"./react-dom-Ca1YUVo2.js";import{t as P}from"./server.node-B2oksIp8.js";import{A as F,B as I,C as ee,D as L,E as te,F as ne,G as re,H as ie,I as ae,L as oe,M as se,N as ce,O as le,P as ue,R as de,S as fe,T as pe,U as me,V as R,W as he,_ as ge,b as _e,c as ve,d as ye,f as be,g as xe,h as Se,j as z,k as Ce,l as we,m as Te,n as Ee,o as De,p as Oe,s as ke,t as Ae,u as je,v as Me,w as Ne,x as Pe,y as Fe,z as Ie}from"./dialog-B8YbGNaz.js";import{basename as Le,extname as Re,join as ze}from"node:path";import{readdir as Be}from"node:fs/promises";import{PassThrough as Ve,Writable as He}from"node:stream";var Ue=` daum[ /]| deusu/|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|(?<!cam)scan|24x7|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^azure|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|agent|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|fetcher|firephp|functionize|grab|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|java(?!;)|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|xtate/`,We=/bot|crawl|http|lighthouse|scan|search|spider/i,Ge;function Ke(){if(Ge instanceof RegExp)return Ge;try{Ge=new RegExp(Ue,`i`)}catch{Ge=We}return Ge}function qe(e){return!!e&&Ke().test(e)}var B=s();function Je({i18n:e,defaultNS:t,children:n}){let r=(0,B.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,B.createElement)(re.Provider,{value:r},n)}var Ye=n({default:()=>Qe,streamTimeout:()=>Ze}),Xe=P(),V=ie();const Ze=5e3;async function Qe(e,t,n,r,i){let a=i.get(D).container.i18n.cloneInstance();return await a.changeLanguage(i.get(D).language),new Promise((i,o)=>{let s=!1,c=e.headers.get(`user-agent`),l=c&&qe(c)||r.isSpaMode?`onAllReady`:`onShellReady`,{pipe:u,abort:d}=(0,Xe.renderToPipeableStream)((0,V.jsx)(Je,{i18n:a,children:(0,V.jsx)(E,{context:r,url:e.url})}),{[l](){s=!0;let e=new Ve,r=h(e);n.set(`Content-Type`,`text/html`),n.set(`Strict-Transport-Security`,`max-age=63072000; includeSubDomains; preload`),n.set(`X-Frame-Options`,`DENY`),n.set(`X-Content-Type-Options`,`nosniff`),i(new Response(r,{headers:n,status:t})),u(e)},onShellError(e){o(e)},onError(e){t=500,s&&console.error(e)}});setTimeout(d,Ze+1e3)})}var $e=t(r(((e,t)=>{(function(n,r){typeof define==`function`&&define.amd?define(r):typeof e==`object`?t.exports=r():n.NProgress=r()})(e,function(){var e={};e.version=`0.2.0`;var t=e.settings={minimum:.08,easing:`ease`,positionUsing:``,speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:`[role="bar"]`,spinnerSelector:`[role="spinner"]`,parent:`body`,template:`<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>`};e.configure=function(e){var n,r;for(n in e)r=e[n],r!==void 0&&e.hasOwnProperty(n)&&(t[n]=r);return this},e.status=null,e.set=function(r){var s=e.isStarted();r=n(r,t.minimum,1),e.status=r===1?null:r;var c=e.render(!s),l=c.querySelector(t.barSelector),u=t.speed,d=t.easing;return c.offsetWidth,a(function(n){t.positionUsing===``&&(t.positionUsing=e.getPositioningCSS()),o(l,i(r,u,d)),r===1?(o(c,{transition:`none`,opacity:1}),c.offsetWidth,setTimeout(function(){o(c,{transition:`all `+u+`ms linear`,opacity:0}),setTimeout(function(){e.remove(),n()},u)},u)):setTimeout(n,u)}),this},e.isStarted=function(){return typeof e.status==`number`},e.start=function(){e.status||e.set(0);var n=function(){setTimeout(function(){e.status&&(e.trickle(),n())},t.trickleSpeed)};return t.trickle&&n(),this},e.done=function(t){return!t&&!e.status?this:e.inc(.3+.5*Math.random()).set(1)},e.inc=function(t){var r=e.status;return r?(typeof t!=`number`&&(t=(1-r)*n(Math.random()*r,.1,.95)),r=n(r+t,0,.994),e.set(r)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},(function(){var t=0,n=0;e.promise=function(r){return!r||r.state()===`resolved`?this:(n===0&&e.start(),t++,n++,r.always(function(){n--,n===0?(t=0,e.done()):e.set((t-n)/t)}),this)}})(),e.render=function(n){if(e.isRendered())return document.getElementById(`nprogress`);c(document.documentElement,`nprogress-busy`);var i=document.createElement(`div`);i.id=`nprogress`,i.innerHTML=t.template;var a=i.querySelector(t.barSelector),s=n?`-100`:r(e.status||0),l=document.querySelector(t.parent),u;return o(a,{transition:`all 0 linear`,transform:`translate3d(`+s+`%,0,0)`}),t.showSpinner||(u=i.querySelector(t.spinnerSelector),u&&d(u)),l!=document.body&&c(l,`nprogress-custom-parent`),l.appendChild(i),i},e.remove=function(){l(document.documentElement,`nprogress-busy`),l(document.querySelector(t.parent),`nprogress-custom-parent`);var e=document.getElementById(`nprogress`);e&&d(e)},e.isRendered=function(){return!!document.getElementById(`nprogress`)},e.getPositioningCSS=function(){var e=document.body.style,t=`WebkitTransform`in e?`Webkit`:`MozTransform`in e?`Moz`:`msTransform`in e?`ms`:`OTransform`in e?`O`:``;return t+`Perspective`in e?`translate3d`:t+`Transform`in e?`translate`:`margin`};function n(e,t,n){return e<t?t:e>n?n:e}function r(e){return(-1+e)*100}function i(e,n,i){var a=t.positionUsing===`translate3d`?{transform:`translate3d(`+r(e)+`%,0,0)`}:t.positionUsing===`translate`?{transform:`translate(`+r(e)+`%,0)`}:{"margin-left":r(e)+`%`};return a.transition=`all `+n+`ms `+i,a}var a=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),e.length==1&&t()}}(),o=function(){var e=[`Webkit`,`O`,`Moz`,`ms`],t={};function n(e){return e.replace(/^-ms-/,`ms-`).replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function r(t){var n=document.body.style;if(t in n)return t;for(var r=e.length,i=t.charAt(0).toUpperCase()+t.slice(1),a;r--;)if(a=e[r]+i,a in n)return a;return t}function i(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=i(t),e.style[t]=n}return function(e,t){var n=arguments,r,i;if(n.length==2)for(r in t)i=t[r],i!==void 0&&t.hasOwnProperty(r)&&a(e,r,i);else a(e,n[1],n[2])}}();function s(e,t){return(typeof e==`string`?e:u(e)).indexOf(` `+t+` `)>=0}function c(e,t){var n=u(e),r=n+t;s(n,t)||(e.className=r.substring(1))}function l(e,t){var n=u(e),r;s(e,t)&&(r=n.replace(` `+t+` `,` `),e.className=r.substring(1,r.length-1))}function u(e){return(` `+(e.className||``)+` `).replace(/\s+/gi,` `)}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return e})}))(),1),et=R(),tt=at();function nt(e,...t){if(!tt)return;let n=it(e,...t);performance.mark(n);try{console.log(e,...t)}catch{console.log(n)}}function rt(e,...t){tt&&console.warn(e,...t)}function it(e,...t){return e.replace(/%[sfdO]/g,e=>{let n=t.shift();return e===`%O`&&n?JSON.stringify(n).replace(/"([^"]+)":/g,`$1:`):String(n)})}function at(){try{let e=`nuqs-localStorage-test`;if(typeof localStorage>`u`)return!1;localStorage.setItem(e,e);let t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem(`debug`)||``).includes(`nuqs`)}catch{return!1}}var ot={303:`Multiple adapter contexts detected. This might happen in monorepos.`,404:`nuqs requires an adapter to work with your framework.`,409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:`Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.`,422:"Invalid options combination: `limitUrlUpdates: debounce` should be used in SSR scenarios, with `shallow: false`",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:`Empty search params cache. Search params can't be accessed in Layouts.`,501:"Search params cache already populated. Have you called `parse` twice?"};function st(e){return`[nuqs] ${ot[e]}
2
+ See https://nuqs.dev/NUQS-${e}`}function ct(e){if(e.size===0)return``;let t=[];for(let[n,r]of e.entries()){let e=n.replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/\+/g,`%2B`).replace(/=/g,`%3D`).replace(/\?/g,`%3F`);t.push(`${e}=${lt(r)}`)}let n=`?`+t.join(`&`);return dt(n),n}function lt(e){return e.replace(/%/g,`%25`).replace(/\+/g,`%2B`).replace(/ /g,`+`).replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/"/g,`%22`).replace(/'/g,`%27`).replace(/`/g,`%60`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/[\x00-\x1F]/g,e=>encodeURIComponent(e))}var ut=2e3;function dt(e){if(process.env.NODE_ENV===`production`||typeof location>`u`)return;let t=new URL(location.href);t.search=e,t.href.length>ut&&console.warn(st(414))}var ft=(0,B.createContext)({useAdapter(){throw Error(st(404))}});ft.displayName=`NuqsAdapterContext`,tt&&typeof window<`u`&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==ft&&console.error(st(303)),window.__NuqsAdapterContext=ft);function pt(e){return({children:t,defaultOptions:n,processUrlSearchParams:r,...i})=>(0,B.createElement)(ft.Provider,{...i,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:r}},t)}function mt(e){let t=(0,B.useContext)(ft);if(!(`useAdapter`in t))throw Error(st(404));return t.useAdapter(e)}var ht=()=>(0,B.useContext)(ft).defaultOptions,gt=()=>(0,B.useContext)(ft).processUrlSearchParams;function _t(){if(typeof window>`u`||!window.GestureEvent)return 50;try{let e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}function vt(e){return{method:`throttle`,timeMs:e}}var yt=vt(_t());function bt(e){return e===null||Array.isArray(e)&&e.length===0}function xt(e,t,n){if(typeof e==`string`)n.set(t,e);else{n.delete(t);for(let r of e)n.append(t,r);n.has(t)||n.set(t,``)}return n}function St(){let e=new Map;return{on(t,n){let r=e.get(t)||[];return r.push(n),e.set(t,r),()=>this.off(t,n)},off(t,n){let r=e.get(t);r&&e.set(t,r.filter(e=>e!==n))},emit(t,n){e.get(t)?.forEach(e=>e(n))}}}function Ct(e,t,n){function r(){e(),n.removeEventListener(`abort`,a)}let i=setTimeout(r,t);function a(){clearTimeout(i),n.removeEventListener(`abort`,a)}n.addEventListener(`abort`,a)}function wt(){let e=Promise;if(Promise.hasOwnProperty(`withResolvers`))return Promise.withResolvers();let t=()=>{},n=()=>{};return{promise:new e((e,r)=>{t=e,n=r}),resolve:t,reject:n}}function Tt(e,t){let n=t;for(let t=e.length-1;t>=0;t--){let r=e[t];if(!r)continue;let i=n;n=()=>r(i)}n()}function Et(){return new URLSearchParams(location.search)}var Dt=class{updateMap=new Map;options={history:`replace`,scroll:!1,shallow:!0};timeMs=yt.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:n},r=yt.timeMs){this.resetQueueOnNextPush&&=(this.reset(),!1),nt(`[nuqs gtq] Enqueueing %s=%s %O`,e,t,n),this.updateMap.set(e,t),n.history===`push`&&(this.options.history=`push`),n.scroll&&(this.options.scroll=!0),n.shallow===!1&&(this.options.shallow=!1),n.startTransition&&this.transitions.add(n.startTransition),(!Number.isFinite(this.timeMs)||r>this.timeMs)&&(this.timeMs=r)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=Et}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=Et,rateLimitFactor:t=1,...n},r){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return nt(`[nuqs gtq] Skipping flush due to throttleMs=Infinity`),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=wt();let i=()=>{this.lastFlushedAt=performance.now();let[t,i]=this.applyPendingUpdates({...n,autoResetQueueOnUpdate:n.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},r);i===null?(this.resolvers.resolve(t),this.resetQueueOnNextPush=!0):this.resolvers.reject(t),this.resolvers=null};return Ct(()=>{let e=performance.now()-this.lastFlushedAt,n=this.timeMs,r=t*Math.max(0,n-e);nt(`[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)`,r,n,t),r===0?i():Ct(i,r,this.controller.signal)},0,this.controller.signal),this.resolvers.promise}abort(){return this.controller?.abort(),this.controller=new AbortController,this.resolvers?.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){let e=Array.from(this.updateMap.keys());return nt(`[nuqs gtq] Resetting queue %s`,JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:`replace`,scroll:!1,shallow:!0},this.timeMs=yt.timeMs,e}applyPendingUpdates(e,t){let{updateUrl:n,getSearchParamsSnapshot:r}=e,i=r();if(nt(`[nuqs gtq] Applying %d pending update(s) on top of %s`,this.updateMap.size,i.toString()),this.updateMap.size===0)return[i,null];let a=Array.from(this.updateMap.entries()),o={...this.options},s=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),nt(`[nuqs gtq] Flushing queue %O with options %O`,a,o);for(let[e,t]of a)t===null?i.delete(e):i=xt(t,e,i);t&&(i=t(i));try{return Tt(s,()=>{n(i,o)}),[i,null]}catch(e){return console.error(st(429),a.map(([e])=>e).join(),e),[i,e]}}},Ot=new Dt;function kt(e,t,n){let r=(0,B.useCallback)(()=>{let t=Object.fromEntries(e.map(e=>[e,n(e)]));return[JSON.stringify(t),t]},[e.join(`,`),n]),i=(0,B.useRef)(null);return i.current===null&&(i.current=r()),(0,B.useSyncExternalStore)((0,B.useCallback)(n=>{let r=e.map(e=>t(e,n));return()=>r.forEach(e=>e())},[e.join(`,`),t]),()=>{let[e,t]=r();return i.current[0]===e?i.current[1]:(i.current=[e,t],t)},()=>i.current[1])}var At=class{callback;resolvers=wt();controller=new AbortController;queuedValue=void 0;constructor(e){this.callback=e}abort(){this.controller.abort(),this.queuedValue=void 0}push(e,t){return this.queuedValue=e,this.controller.abort(),this.controller=new AbortController,Ct(()=>{let t=this.resolvers;try{nt(`[nuqs dq] Flushing debounce queue`,e);let n=this.callback(e);nt(`[nuqs dq] Reset debounce queue %O`,this.queuedValue),this.queuedValue=void 0,this.resolvers=wt(),n.then(e=>t.resolve(e)).catch(e=>t.reject(e))}catch(e){this.queuedValue=void 0,t.reject(e)}},t,this.controller.signal),this.resolvers.promise}},jt=new class{throttleQueue;queues=new Map;queuedQuerySync=St();constructor(e=new Dt){this.throttleQueue=e}useQueuedQueries(e){return kt(e,(e,t)=>this.queuedQuerySync.on(e,t),e=>this.getQueuedQuery(e))}push(e,t,n){if(!Number.isFinite(t)){let e=n.getSearchParamsSnapshot??Et;return Promise.resolve(e())}let r=e.key;if(!this.queues.has(r)){nt("[nuqs dqc] Creating debounce queue for `%s`",r);let e=new At(e=>(this.throttleQueue.push(e),this.throttleQueue.flush(n).finally(()=>{this.queues.get(e.key)?.queuedValue===void 0&&(nt("[nuqs dqc] Cleaning up empty queue for `%s`",e.key),this.queues.delete(e.key)),this.queuedQuerySync.emit(e.key)})));this.queues.set(r,e)}nt(`[nuqs dqc] Enqueueing debounce update %O`,e);let i=this.queues.get(r).push(e,t);return this.queuedQuerySync.emit(r),i}abort(e){let t=this.queues.get(e);return t?(nt(`[nuqs dqc] Aborting debounce queue %s=%s`,e,t.queuedValue?.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),e=>(e.then(t.resolvers.resolve,t.resolvers.reject),e)):e=>e}abortAll(){for(let[e,t]of this.queues.entries())nt(`[nuqs dqc] Aborting debounce queue %s=%s`,e,t.queuedValue?.query),t.abort(),t.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(e);this.queues.clear()}getQueuedQuery(e){let t=this.queues.get(e)?.queuedValue?.query;return t===void 0?this.throttleQueue.getQueuedQuery(e):t}}(Ot);function Mt(e,t){return e===t?!0:e===null||t===null||typeof e==`string`||typeof t==`string`||e.length!==t.length?!1:e.every((e,n)=>e===t[n])}function Nt(e,t,n){return r=>{if(!(t.length===0||t.some(t=>!Mt(r.getAll(t),e.getAll(t)))))return nt("[nuqs `%s`] no change, returning previous",t.join(`,`),r),r;let i=Pt(e,t,n);return nt(`[nuqs \`%s\`] subbed search params change
3
+ from %O
4
+ to %O`,t.join(`,`),r,i),i}}function Pt(e,t,n){if(t.length===0)return e;let r=n?new URLSearchParams(e):e;for(let n of e.keys())t.includes(n)||r.delete(n);return r}var Ft=0;function It(e=1){Ft=e}function Lt(){Ft=Math.max(0,Ft-1),!(Ft>0)&&Rt()}function Rt(){nt(`[nuqs] Aborting queues`),jt.abortAll(),Ot.abort().forEach(e=>jt.queuedQuerySync.emit(e))}var zt=`__nuqs__`;function Bt(e){if(e instanceof URL)return e.searchParams;if(e.startsWith(`?`))return new URLSearchParams(e);try{return new URL(e,location.origin).searchParams}catch{return new URLSearchParams(e)}}function Vt(e){return typeof history>`u`?!1:history.nuqs?.version&&history.nuqs.version!==`0.0.0-inject-version-here`?(console.error(st(409),history.nuqs.version,`0.0.0-inject-version-here`,e),!1):!history.nuqs?.adapters?.includes(e)}function Ht(e){history.nuqs=history.nuqs??{version:`0.0.0-inject-version-here`,adapters:[]},history.nuqs.adapters.push(e)}function Ut(e,t){if(!Vt(t))return;let n=typeof location==`object`?location.search:``;e.on(`update`,e=>{let t=e.toString();n=t.length?`?`+t:``}),window.addEventListener(`popstate`,()=>{n=location.search,Rt()}),nt(`[nuqs %s] Patching history (%s adapter)`,`0.0.0-inject-version-here`,t);function r(t){Lt();try{if(new URL(t,location.origin).search===n)return}catch{}try{e.emit(`update`,Bt(t))}catch(e){console.error(e)}}let i=history.pushState,a=history.replaceState;history.pushState=function(e,t,n){i.call(history,e,``,n),n&&t!==`__nuqs__`&&r(n)},history.replaceState=function(e,t,n){a.call(history,e,``,n),n&&t!==`__nuqs__`&&r(n)},Ht(t)}function Wt({adapter:e,useNavigate:t,useSearchParams:n}){let r=St();function i(n){let i=t();return{searchParams:a(n),updateUrl:(0,B.useCallback)((t,n)=>{(0,B.startTransition)(()=>{r.emit(`update`,t)});let a=new URL(location.href);a.search=ct(t),nt(`[nuqs ${e}] Updating url: %s`,a);let o=n.history===`push`?history.pushState:history.replaceState;It(n.shallow?1:2),o.call(history,history.state,zt,a),n.shallow===!1&&i({hash:a.hash,search:a.search},{replace:!0,preventScrollReset:!0,state:history.state?.usr}),n.scroll&&window.scrollTo(0,0)},[i]),autoResetQueueOnUpdate:!1}}function a(e=[]){let[t]=n(typeof location>`u`?new URLSearchParams:new URLSearchParams(location.search)),[i,a]=(0,B.useState)(()=>typeof location>`u`?Pt(t,e,!0):Pt(new URLSearchParams(location.search),e,!1));return(0,B.useEffect)(()=>{function t(){a(Nt(new URLSearchParams(location.search),e,!1))}function n(t){a(Nt(t,e,!0))}return r.on(`update`,n),window.addEventListener(`popstate`,t),()=>{r.off(`update`,n),window.removeEventListener(`popstate`,t)}},[e.join(`&`)]),i}return Ut(r,e),{NuqsAdapter:pt(i),useOptimisticSearchParams:a}}var Gt=Wt({adapter:`react-router-v7`,useNavigate:f,useSearchParams:l}),Kt=Gt.NuqsAdapter;Gt.useOptimisticSearchParams;var qt=I(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Jt=I(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Yt=I(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),Xt=I(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Zt=I(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Qt=I(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),$t=I(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),en=I(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),tn=I(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),nn=I(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),rn=I(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),an=I(`circle-user-round`,[[`path`,{d:`M18 20a6 6 0 0 0-12 0`,key:`1qehca`}],[`circle`,{cx:`12`,cy:`10`,r:`4`,key:`1h16sb`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),on=I(`cloud-upload`,[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`m8 17 4-4 4 4`,key:`1quai1`}]]),sn=I(`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`}]]),cn=I(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),ln=I(`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`}]]),un=I(`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`}]]),dn=I(`file-archive`,[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]),fn=I(`file-spreadsheet`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),pn=I(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),mn=I(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),hn=I(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),gn=I(`headphones`,[[`path`,{d:`M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3`,key:`1xhozi`}]]),_n=I(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),vn=I(`image-up`,[[`path`,{d:`M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21`,key:`9csbqa`}],[`path`,{d:`m14 19.5 3-3 3 3`,key:`9vmjn0`}],[`path`,{d:`M17 22v-5.5`,key:`1aa6fl`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),yn=I(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),bn=I(`inbox`,[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]),xn=I(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Sn=I(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Cn=I(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),wn=I(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),Tn=I(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),En=I(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),Dn=I(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`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`}]]),On=I(`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`}]]),kn=I(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),An=I(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),jn=I(`video`,[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]),Mn=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e;const Nn=ce,Pn=(e,t)=>n=>{if(t?.variants==null)return Nn(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=Mn(t)||Mn(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 Nn(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)};var Fn=Pn(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow-xs hover:bg-primary/90`,destructive:`bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function H(e){let t=(0,et.c)(14),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:n,variant:o,size:i,asChild:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a!==void 0&&a?ue:`button`,c;t[6]!==n||t[7]!==i||t[8]!==o?(c=z(Fn({variant:o,size:i,className:n})),t[6]=n,t[7]=i,t[8]=o,t[9]=c):c=t[9];let l;return t[10]!==s||t[11]!==r||t[12]!==c?(l=(0,V.jsx)(s,{"data-slot":`button`,className:c,...r}),t[10]=s,t[11]=r,t[12]=c,t[13]=l):l=t[13],l}var In=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`}),Ln=`VisuallyHidden`,Rn=B.forwardRef((e,t)=>(0,V.jsx)(Ce.span,{...e,ref:t,style:{...In,...e.style}}));Rn.displayName=Ln;var zn=Rn;function Bn(e){let t=e+`CollectionProvider`,[n,r]=le(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=B.useRef(null),a=B.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=ne(s),l=B.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,V.jsx)(c,{ref:de(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=ne(u),p=B.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=B.useRef(null),s=de(t,o),c=a(u,n);return B.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 m(t){let n=a(e+`CollectionConsumer`,t);return B.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},m,r]}var Vn=B.createContext(void 0);function Hn(e){let t=B.useContext(Vn);return e||t||`ltr`}var Un=`AlertDialog`,[Wn,Gn]=le(Un,[Se]),Kn=Se(),qn=e=>{let{__scopeAlertDialog:t,...n}=e,r=Kn(t);return(0,V.jsx)(ye,{...r,...n,modal:!0})};qn.displayName=Un;var Jn=`AlertDialogTrigger`,Yn=B.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Kn(n);return(0,V.jsx)(Oe,{...i,...r,ref:t})});Yn.displayName=Jn;var Xn=`AlertDialogPortal`,Zn=e=>{let{__scopeAlertDialog:t,...n}=e,r=Kn(t);return(0,V.jsx)(je,{...r,...n})};Zn.displayName=Xn;var Qn=`AlertDialogOverlay`,$n=B.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Kn(n);return(0,V.jsx)(we,{...i,...r,ref:t})});$n.displayName=Qn;var er=`AlertDialogContent`,[tr,nr]=Wn(er),rr=ae(`AlertDialogContent`),ir=B.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=Kn(n),o=B.useRef(null),s=de(t,o),c=B.useRef(null);return(0,V.jsx)(Te,{contentName:er,titleName:ar,docsSlug:`alert-dialog`,children:(0,V.jsx)(tr,{scope:n,cancelRef:c,children:(0,V.jsxs)(ke,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:L(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,V.jsx)(rr,{children:r}),(0,V.jsx)(pr,{contentRef:o})]})})})});ir.displayName=er;var ar=`AlertDialogTitle`,or=B.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Kn(n);return(0,V.jsx)(be,{...i,...r,ref:t})});or.displayName=ar;var sr=`AlertDialogDescription`,cr=B.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Kn(n);return(0,V.jsx)(ve,{...i,...r,ref:t})});cr.displayName=sr;var lr=`AlertDialogAction`,ur=B.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Kn(n);return(0,V.jsx)(De,{...i,...r,ref:t})});ur.displayName=lr;var dr=`AlertDialogCancel`,fr=B.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=nr(dr,n),a=Kn(n),o=de(t,i);return(0,V.jsx)(De,{...a,...r,ref:o})});fr.displayName=dr;var pr=({contentRef:e})=>{let t=`\`${er}\` requires a description for the component to be accessible for screen reader users.
5
+
6
+ You can add a description to the \`${er}\` by passing a \`${sr}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
7
+
8
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${er}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
9
+
10
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return B.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},mr=qn,hr=Zn,gr=$n,_r=ir,vr=ur,yr=fr,br=or,xr=cr,Sr=he();function Cr(){return(0,Sr.useSyncExternalStore)(wr,()=>!0,()=>!1)}function wr(){return()=>{}}var Tr=`Avatar`,[Er,Dr]=le(Tr),[Or,kr]=Er(Tr),Ar=B.forwardRef((e,t)=>{let{__scopeAvatar:n,...r}=e,[i,a]=B.useState(`idle`);return(0,V.jsx)(Or,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:(0,V.jsx)(Ce.span,{...r,ref:t})})});Ar.displayName=Tr;var jr=`AvatarImage`,Mr=B.forwardRef((e,t)=>{let{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=kr(jr,n),s=Ir(r,a),c=fe(e=>{i(e),o.onImageLoadingStatusChange(e)});return te(()=>{s!==`idle`&&c(s)},[s,c]),s===`loaded`?(0,V.jsx)(Ce.img,{...a,ref:t,src:r}):null});Mr.displayName=jr;var Nr=`AvatarFallback`,Pr=B.forwardRef((e,t)=>{let{__scopeAvatar:n,delayMs:r,...i}=e,a=kr(Nr,n),[o,s]=B.useState(r===void 0);return B.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(e)}},[r]),o&&a.imageLoadingStatus!==`loaded`?(0,V.jsx)(Ce.span,{...i,ref:t}):null});Pr.displayName=Nr;function Fr(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?`loaded`:`loading`):`error`:`idle`}function Ir(e,{referrerPolicy:t,crossOrigin:n}){let r=Cr(),i=B.useRef(null),a=(()=>r?(i.current||=new window.Image,i.current):null)(),[o,s]=B.useState(()=>Fr(a,e));return te(()=>{s(Fr(a,e))},[a,e]),te(()=>{let e=e=>()=>{s(e)};if(!a)return;let r=e(`loaded`),i=e(`error`);return a.addEventListener(`load`,r),a.addEventListener(`error`,i),t&&(a.referrerPolicy=t),typeof n==`string`&&(a.crossOrigin=n),()=>{a.removeEventListener(`load`,r),a.removeEventListener(`error`,i)}},[a,n,t]),o}var Lr=Ar,Rr=Mr,zr=Pr;function Br(e){let t=B.useRef({value:e,previous:e});return B.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Vr(e){let[t,n]=B.useState(void 0);return te(()=>{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 Hr=`Checkbox`,[Ur,Wr]=le(Hr),[Gr,Kr]=Ur(Hr);function qr(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=pe({prop:n,defaultProp:i??!1,onChange:c,caller:Hr}),[m,h]=B.useState(null),[g,_]=B.useState(null),v=B.useRef(!1),y=m?!!o||!!m.closest(`form`):!0,b={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:ni(i)?!1:i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,V.jsx)(Gr,{scope:t,...b,children:ti(d)?d(b):r})}var Jr=`CheckboxTrigger`,Yr=B.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=Kr(Jr,e),h=de(i,u),g=B.useRef(c);return B.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,V.jsx)(Ce.button,{type:`button`,role:`checkbox`,"aria-checked":ni(c)?`mixed`:c,"aria-required":l,"data-state":ri(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:L(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:L(n,e=>{d(e=>ni(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});Yr.displayName=Jr;var Xr=B.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,V.jsx)(qr,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Yr,{...d,ref:t,__scopeCheckbox:n}),e&&(0,V.jsx)(ei,{__scopeCheckbox:n})]})})});Xr.displayName=Hr;var Zr=`CheckboxIndicator`,Qr=B.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=Kr(Zr,n);return(0,V.jsx)(Ne,{present:r||ni(a.checked)||a.checked===!0,children:(0,V.jsx)(Ce.span,{"data-state":ri(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});Qr.displayName=Zr;var $r=`CheckboxBubbleInput`,ei=B.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=Kr($r,e),m=de(n,p),h=Br(a),g=Vr(r);B.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=ni(a),n.call(e,ni(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=B.useRef(ni(a)?!1:a);return(0,V.jsx)(Ce.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});ei.displayName=$r;function ti(e){return typeof e==`function`}function ni(e){return e===`indeterminate`}function ri(e){return ni(e)?`indeterminate`:e?`checked`:`unchecked`}var ii=[`top`,`right`,`bottom`,`left`],ai=Math.min,oi=Math.max,si=Math.round,ci=Math.floor,li=e=>({x:e,y:e}),ui={left:`right`,right:`left`,bottom:`top`,top:`bottom`},di={start:`end`,end:`start`};function fi(e,t,n){return oi(e,ai(t,n))}function pi(e,t){return typeof e==`function`?e(t):e}function mi(e){return e.split(`-`)[0]}function hi(e){return e.split(`-`)[1]}function gi(e){return e===`x`?`y`:`x`}function _i(e){return e===`y`?`height`:`width`}var vi=new Set([`top`,`bottom`]);function yi(e){return vi.has(mi(e))?`y`:`x`}function bi(e){return gi(yi(e))}function xi(e,t,n){n===void 0&&(n=!1);let r=hi(e),i=bi(e),a=_i(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ai(o)),[o,Ai(o)]}function Si(e){let t=Ai(e);return[Ci(e),t,Ci(t)]}function Ci(e){return e.replace(/start|end/g,e=>di[e])}var wi=[`left`,`right`],Ti=[`right`,`left`],Ei=[`top`,`bottom`],Di=[`bottom`,`top`];function Oi(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ti:wi:t?wi:Ti;case`left`:case`right`:return t?Ei:Di;default:return[]}}function ki(e,t,n,r){let i=hi(e),a=Oi(mi(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ci)))),a}function Ai(e){return e.replace(/left|right|bottom|top/g,e=>ui[e])}function ji(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mi(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ji(e)}function Ni(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 Pi(e,t,n){let{reference:r,floating:i}=e,a=yi(t),o=bi(t),s=_i(o),c=mi(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(hi(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}var Fi=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Pi(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=Pi(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function Ii(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}=pi(t,e),p=Mi(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Ni(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=Ni(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 Li=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}=pi(e,t)||{};if(l==null)return{};let d=Mi(u),f={x:n,y:r},p=bi(i),m=_i(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=ai(d[_],T),D=ai(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=fi(O,A,k),M=!c.arrow&&hi(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}}}),Ri=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}=pi(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=mi(r),_=yi(o),v=mi(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ai(o)]:Si(o)),x=p!==`none`;!d&&x&&b.push(...ki(o,m,p,y));let S=[o,...b],C=await Ii(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=xi(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`&&_!==yi(t))||T.every(e=>yi(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=yi(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 zi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bi(e){return ii.some(t=>e[t]>=0)}var Vi=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n}=t,{strategy:r=`referenceHidden`,...i}=pi(e,t);switch(r){case`referenceHidden`:{let e=zi(await Ii(t,{...i,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Bi(e)}}}case`escaped`:{let e=zi(await Ii(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Bi(e)}}}default:return{}}}}},Hi=new Set([`left`,`top`]);async function Ui(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=mi(n),s=hi(n),c=yi(n)===`y`,l=Hi.has(o)?-1:1,u=a&&c?-1:1,d=pi(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 Wi=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 Ui(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}}}}},Gi=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=pi(e,t),l={x:n,y:r},u=await Ii(t,c),d=yi(mi(i)),f=gi(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=fi(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=fi(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},Ki=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}=pi(e,t),u={x:n,y:r},d=yi(i),f=gi(d),p=u[f],m=u[d],h=pi(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=Hi.has(mi(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}}}},qi=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}=pi(e,t),u=await Ii(t,l),d=mi(i),f=hi(i),p=yi(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=ai(h-u[g],v),x=ai(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=oi(u.left,0),t=oi(u.right,0),n=oi(u.top,0),r=oi(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:oi(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:oi(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 Ji(){return typeof window<`u`}function Yi(e){return Qi(e)?(e.nodeName||``).toLowerCase():`#document`}function Xi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zi(e){return((Qi(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Qi(e){return Ji()?e instanceof Node||e instanceof Xi(e).Node:!1}function $i(e){return Ji()?e instanceof Element||e instanceof Xi(e).Element:!1}function ea(e){return Ji()?e instanceof HTMLElement||e instanceof Xi(e).HTMLElement:!1}function ta(e){return!Ji()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Xi(e).ShadowRoot}var na=new Set([`inline`,`contents`]);function ra(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ga(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!na.has(i)}var ia=new Set([`table`,`td`,`th`]);function aa(e){return ia.has(Yi(e))}var oa=[`:popover-open`,`:modal`];function sa(e){return oa.some(t=>{try{return e.matches(t)}catch{return!1}})}var ca=[`transform`,`translate`,`scale`,`rotate`,`perspective`],la=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],ua=[`paint`,`layout`,`strict`,`content`];function da(e){let t=pa(),n=$i(e)?ga(e):e;return ca.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||la.some(e=>(n.willChange||``).includes(e))||ua.some(e=>(n.contain||``).includes(e))}function fa(e){let t=va(e);for(;ea(t)&&!ha(t);){if(da(t))return t;if(sa(t))return null;t=va(t)}return null}function pa(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var ma=new Set([`html`,`body`,`#document`]);function ha(e){return ma.has(Yi(e))}function ga(e){return Xi(e).getComputedStyle(e)}function _a(e){return $i(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function va(e){if(Yi(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ta(e)&&e.host||Zi(e);return ta(t)?t.host:t}function ya(e){let t=va(e);return ha(t)?e.ownerDocument?e.ownerDocument.body:e.body:ea(t)&&ra(t)?t:ya(t)}function ba(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ya(e),i=r===e.ownerDocument?.body,a=Xi(r);if(i){let e=xa(a);return t.concat(a,a.visualViewport||[],ra(r)?r:[],e&&n?ba(e):[])}return t.concat(r,ba(r,[],n))}function xa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Sa(e){let t=ga(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=ea(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=si(n)!==a||si(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ca(e){return $i(e)?e:e.contextElement}function wa(e){let t=Ca(e);if(!ea(t))return li(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Sa(t),o=(a?si(n.width):n.width)/r,s=(a?si(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ta=li(0);function Ea(e){let t=Xi(e);return!pa()||!t.visualViewport?Ta:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Da(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Xi(e)?!1:t}function Oa(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ca(e),o=li(1);t&&(r?$i(r)&&(o=wa(r)):o=wa(e));let s=Da(a,n,r)?Ea(a):li(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=Xi(a),t=r&&$i(r)?Xi(r):r,n=e,i=xa(n);for(;i&&r&&t!==n;){let e=wa(i),t=i.getBoundingClientRect(),r=ga(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=Xi(i),i=xa(n)}}return Ni({width:u,height:d,x:c,y:l})}function ka(e,t){let n=_a(e).scrollLeft;return t?t.left+n:Oa(Zi(e)).left+n}function Aa(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ka(e,n),y:n.top+t.scrollTop}}function ja(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Zi(r),s=t?sa(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=li(1),u=li(0),d=ea(r);if((d||!d&&!a)&&((Yi(r)!==`body`||ra(o))&&(c=_a(r)),ea(r))){let e=Oa(r);l=wa(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Aa(o,c):li(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 Ma(e){return Array.from(e.getClientRects())}function Na(e){let t=Zi(e),n=_a(e),r=e.ownerDocument.body,i=oi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=oi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+ka(e),s=-n.scrollTop;return ga(r).direction===`rtl`&&(o+=oi(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Pa=25;function Fa(e,t){let n=Xi(e),r=Zi(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=pa();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=ka(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<=Pa&&(a-=o)}else l<=Pa&&(a+=l);return{width:a,height:o,x:s,y:c}}var Ia=new Set([`absolute`,`fixed`]);function La(e,t){let n=Oa(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ea(e)?wa(e):li(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ra(e,t,n){let r;if(t===`viewport`)r=Fa(e,n);else if(t===`document`)r=Na(Zi(e));else if($i(t))r=La(t,n);else{let n=Ea(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ni(r)}function za(e,t){let n=va(e);return n===t||!$i(n)||ha(n)?!1:ga(n).position===`fixed`||za(n,t)}function Ba(e,t){let n=t.get(e);if(n)return n;let r=ba(e,[],!1).filter(e=>$i(e)&&Yi(e)!==`body`),i=null,a=ga(e).position===`fixed`,o=a?va(e):e;for(;$i(o)&&!ha(o);){let t=ga(o),n=da(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&Ia.has(i.position)||ra(o)&&!n&&za(e,o))?r=r.filter(e=>e!==o):i=t,o=va(o)}return t.set(e,r),r}function Va(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?sa(t)?[]:Ba(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=Ra(t,n,i);return e.top=oi(r.top,e.top),e.right=ai(r.right,e.right),e.bottom=ai(r.bottom,e.bottom),e.left=oi(r.left,e.left),e},Ra(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Ha(e){let{width:t,height:n}=Sa(e);return{width:t,height:n}}function Ua(e,t,n){let r=ea(t),i=Zi(t),a=n===`fixed`,o=Oa(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=li(0);function l(){c.x=ka(i)}if(r||!r&&!a)if((Yi(t)!==`body`||ra(i))&&(s=_a(t)),r){let e=Oa(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?Aa(i,s):li(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 Wa(e){return ga(e).position===`static`}function Ga(e,t){if(!ea(e)||ga(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Zi(e)===n&&(n=n.ownerDocument.body),n}function Ka(e,t){let n=Xi(e);if(sa(e))return n;if(!ea(e)){let t=va(e);for(;t&&!ha(t);){if($i(t)&&!Wa(t))return t;t=va(t)}return n}let r=Ga(e,t);for(;r&&aa(r)&&Wa(r);)r=Ga(r,t);return r&&ha(r)&&Wa(r)&&!da(r)?n:r||fa(e)||n}var qa=async function(e){let t=this.getOffsetParent||Ka,n=this.getDimensions,r=await n(e.floating);return{reference:Ua(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ja(e){return ga(e).direction===`rtl`}var Ya={convertOffsetParentRelativeRectToViewportRelativeRect:ja,getDocumentElement:Zi,getClippingRect:Va,getOffsetParent:Ka,getElementRects:qa,getClientRects:Ma,getDimensions:Ha,getScale:wa,isElement:$i,isRTL:Ja};function Xa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Za(e,t){let n=null,r,i=Zi(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=ci(d),h=ci(i.clientWidth-(u+f)),g=ci(i.clientHeight-(d+p)),_=ci(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:oi(0,ai(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&&!Xa(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 Qa(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=Ca(e),u=i||a?[...l?ba(l):[],...ba(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Za(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?Oa(e):null;c&&g();function g(){let t=Oa(e);h&&!Xa(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 $a=Wi,eo=Gi,to=Ri,no=qi,ro=Vi,io=Li,ao=Ki,oo=(e,t,n)=>{let r=new Map,i={platform:Ya,...n},a={...i.platform,_c:r};return Fi(e,t,{...i,platform:a})},so=t(N(),1),co=typeof document<`u`?B.useLayoutEffect:function(){};function lo(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(!lo(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)&&!lo(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function uo(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fo(e,t){let n=uo(e);return Math.round(t*n)/n}function po(e){let t=B.useRef(e);return co(()=>{t.current=e}),t}function mo(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]=B.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=B.useState(r);lo(f,r)||p(r);let[m,h]=B.useState(null),[g,_]=B.useState(null),v=B.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=B.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=B.useRef(null),C=B.useRef(null),w=B.useRef(u),T=c!=null,E=po(c),D=po(i),O=po(l),k=B.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),oo(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!lo(w.current,t)&&(w.current=t,so.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);co(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=B.useRef(!1);co(()=>(A.current=!0,()=>{A.current=!1}),[]),co(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=B.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=B.useMemo(()=>({reference:b,floating:x}),[b,x]),N=B.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=fo(M.floating,u.x),r=fo(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...uo(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return B.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var ho=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?{}:io({element:r.current,padding:i}).fn(n):r?io({element:r,padding:i}).fn(n):{}}}},go=(e,t)=>({...$a(e),options:[e,t]}),_o=(e,t)=>({...eo(e),options:[e,t]}),vo=(e,t)=>({...ao(e),options:[e,t]}),yo=(e,t)=>({...to(e),options:[e,t]}),bo=(e,t)=>({...no(e),options:[e,t]}),xo=(e,t)=>({...ro(e),options:[e,t]}),So=(e,t)=>({...ho(e),options:[e,t]}),Co=`Arrow`,wo=B.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,V.jsx)(Ce.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`})})});wo.displayName=Co;var To=wo,Eo=`Popper`,[Do,Oo]=le(Eo),[ko,Ao]=Do(Eo),jo=e=>{let{__scopePopper:t,children:n}=e,[r,i]=B.useState(null);return(0,V.jsx)(ko,{scope:t,anchor:r,onAnchorChange:i,children:n})};jo.displayName=Eo;var Mo=`PopperAnchor`,No=B.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Ao(Mo,n),o=B.useRef(null),s=de(t,o),c=B.useRef(null);return B.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,V.jsx)(Ce.div,{...i,ref:s})});No.displayName=Mo;var Po=`PopperContent`,[Fo,Io]=Do(Po),Lo=B.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:m,...h}=e,g=Ao(Po,n),[_,v]=B.useState(null),y=de(t,e=>v(e)),[b,x]=B.useState(null),S=Vr(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(Vo),altBoundary:O},{refs:A,floatingStyles:j,placement:M,isPositioned:N,middlewareData:P}=mo({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>Qa(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[go({mainAxis:i+w,alignmentAxis:o}),c&&_o({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?vo():void 0,...k}),c&&yo({...k}),bo({...k,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`)}}),b&&So({element:b,padding:s}),Ho({arrowWidth:C,arrowHeight:w}),f&&xo({strategy:`referenceHidden`,...k})]}),[F,I]=Uo(M),ee=fe(m);te(()=>{N&&ee?.()},[N,ee]);let L=P.arrow?.x,ne=P.arrow?.y,re=P.arrow?.centerOffset!==0,[ie,ae]=B.useState();return te(()=>{_&&ae(window.getComputedStyle(_).zIndex)},[_]),(0,V.jsx)(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:N?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ie,"--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)(Fo,{scope:n,placedSide:F,onArrowChange:x,arrowX:L,arrowY:ne,shouldHideArrow:re,children:(0,V.jsx)(Ce.div,{"data-side":F,"data-align":I,...h,ref:y,style:{...h.style,animation:N?void 0:`none`}})})})});Lo.displayName=Po;var Ro=`PopperArrow`,zo={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Bo=B.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Io(Ro,n),a=zo[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)(To,{...r,ref:t,style:{...r.style,display:`block`}})})});Bo.displayName=Ro;function Vo(e){return e!==null}var Ho=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]=Uo(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 Uo(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Wo=jo,Go=No,Ko=Lo,qo=Bo,Jo=`rovingFocusGroup.onEntryFocus`,Yo={bubbles:!1,cancelable:!0},Xo=`RovingFocusGroup`,[Zo,Qo,$o]=Bn(Xo),[es,ts]=le(Xo,[$o]),[ns,rs]=es(Xo),is=B.forwardRef((e,t)=>(0,V.jsx)(Zo.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,V.jsx)(Zo.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,V.jsx)(as,{...e,ref:t})})}));is.displayName=Xo;var as=B.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=B.useRef(null),p=de(t,f),m=Hn(a),[h,g]=pe({prop:o,defaultProp:s??null,onChange:c,caller:Xo}),[_,v]=B.useState(!1),y=fe(l),b=Qo(n),x=B.useRef(!1),[S,C]=B.useState(0);return B.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(Jo,y),()=>e.removeEventListener(Jo,y)},[y]),(0,V.jsx)(ns,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:B.useCallback(e=>g(e),[g]),onItemShiftTab:B.useCallback(()=>v(!0),[]),onFocusableItemAdd:B.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:B.useCallback(()=>C(e=>e-1),[]),children:(0,V.jsx)(Ce.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:L(e.onMouseDown,()=>{x.current=!0}),onFocus:L(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(Jo,Yo);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);ds([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:L(e.onBlur,()=>v(!1))})})}),os=`RovingFocusGroupItem`,ss=B.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=ee(),l=a||c,u=rs(os,n),d=u.currentTabStopId===l,f=Qo(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return B.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,V.jsx)(Zo.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,V.jsx)(Ce.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:L(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:L(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:L(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=us(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?fs(n,r+1):n.slice(r+1)}setTimeout(()=>ds(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});ss.displayName=os;var cs={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function ls(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function us(e,t,n){let r=ls(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return cs[r]}function ds(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function fs(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ps=is,ms=ss,hs=[`Enter`,` `],gs=[`ArrowDown`,`PageUp`,`Home`],_s=[`ArrowUp`,`PageDown`,`End`],vs=[...gs,..._s],ys={ltr:[...hs,`ArrowRight`],rtl:[...hs,`ArrowLeft`]},bs={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},xs=`Menu`,[Ss,Cs,ws]=Bn(xs),[Ts,Es]=le(xs,[ws,Oo,ts]),Ds=Oo(),Os=ts(),[ks,As]=Ts(xs),[js,Ms]=Ts(xs),Ns=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Ds(t),[c,l]=B.useState(null),u=B.useRef(!1),d=fe(a),f=Hn(i);return B.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,V.jsx)(Wo,{...s,children:(0,V.jsx)(ks,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,V.jsx)(js,{scope:t,onClose:B.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Ns.displayName=xs;var Ps=`MenuAnchor`,Fs=B.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Ds(n);return(0,V.jsx)(Go,{...i,...r,ref:t})});Fs.displayName=Ps;var Is=`MenuPortal`,[Ls,Rs]=Ts(Is,{forceMount:void 0}),zs=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=As(Is,t);return(0,V.jsx)(Ls,{scope:t,forceMount:n,children:(0,V.jsx)(Ne,{present:n||a.open,children:(0,V.jsx)(Fe,{asChild:!0,container:i,children:r})})})};zs.displayName=Is;var Bs=`MenuContent`,[Vs,Hs]=Ts(Bs),Us=B.forwardRef((e,t)=>{let n=Rs(Bs,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=As(Bs,e.__scopeMenu),o=Ms(Bs,e.__scopeMenu);return(0,V.jsx)(Ss.Provider,{scope:e.__scopeMenu,children:(0,V.jsx)(Ne,{present:r||a.open,children:(0,V.jsx)(Ss.Slot,{scope:e.__scopeMenu,children:o.modal?(0,V.jsx)(Ws,{...i,ref:t}):(0,V.jsx)(Gs,{...i,ref:t})})})})}),Ws=B.forwardRef((e,t)=>{let n=As(Bs,e.__scopeMenu),r=B.useRef(null),i=de(t,r);return B.useEffect(()=>{let e=r.current;if(e)return xe(e)},[]),(0,V.jsx)(qs,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:L(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Gs=B.forwardRef((e,t)=>{let n=As(Bs,e.__scopeMenu);return(0,V.jsx)(qs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ks=ne(`MenuContent.ScrollLock`),qs=B.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=As(Bs,n),_=Ms(Bs,n),v=Ds(n),y=Os(n),b=Cs(n),[x,S]=B.useState(null),C=B.useRef(null),w=de(t,C,g.onContentChange),T=B.useRef(0),E=B.useRef(``),D=B.useRef(0),O=B.useRef(null),k=B.useRef(`right`),A=B.useRef(0),j=m?ge:B.Fragment,M=m?{as:Ks,allowPinchZoom:!0}:void 0,N=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=jc(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};B.useEffect(()=>()=>window.clearTimeout(T.current),[]),Me();let P=B.useCallback(e=>k.current===O.current?.side&&Nc(e,O.current?.area),[]);return(0,V.jsx)(Vs,{scope:n,searchRef:E,onItemEnter:B.useCallback(e=>{P(e)&&e.preventDefault()},[P]),onItemLeave:B.useCallback(e=>{P(e)||(C.current?.focus(),S(null))},[P]),onTriggerLeave:B.useCallback(e=>{P(e)&&e.preventDefault()},[P]),pointerGraceTimerRef:D,onPointerGraceIntentChange:B.useCallback(e=>{O.current=e},[]),children:(0,V.jsx)(j,{...M,children:(0,V.jsx)(_e,{asChild:!0,trapped:i,onMountAutoFocus:L(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,V.jsx)(Pe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,V.jsx)(ps,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:L(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,V.jsx)(Ko,{role:`menu`,"aria-orientation":`vertical`,"data-state":Ec(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:L(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&N(e.key));let i=C.current;if(e.target!==i||!vs.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);_s.includes(e.key)&&a.reverse(),kc(a)}),onBlur:L(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:L(e.onPointerMove,Pc(e=>{let t=e.target,n=A.current!==e.clientX;e.currentTarget.contains(t)&&n&&(k.current=e.clientX>A.current?`right`:`left`,A.current=e.clientX)}))})})})})})})});Us.displayName=Bs;var Js=`MenuGroup`,Ys=B.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,V.jsx)(Ce.div,{role:`group`,...r,ref:t})});Ys.displayName=Js;var Xs=`MenuLabel`,Zs=B.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,V.jsx)(Ce.div,{...r,ref:t})});Zs.displayName=Xs;var Qs=`MenuItem`,$s=`menu.itemSelect`,ec=B.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=B.useRef(null),o=Ms(Qs,e.__scopeMenu),s=Hs(Qs,e.__scopeMenu),c=de(t,a),l=B.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent($s,{bubbles:!0,cancelable:!0});e.addEventListener($s,e=>r?.(e),{once:!0}),F(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,V.jsx)(tc,{...i,ref:c,disabled:n,onClick:L(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:L(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:L(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||hs.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});ec.displayName=Qs;var tc=B.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Hs(Qs,n),s=Os(n),c=B.useRef(null),l=de(t,c),[u,d]=B.useState(!1),[f,p]=B.useState(``);return B.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,V.jsx)(Ss.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,V.jsx)(ms,{asChild:!0,...s,focusable:!r,children:(0,V.jsx)(Ce.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:L(e.onPointerMove,Pc(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:L(e.onPointerLeave,Pc(e=>o.onItemLeave(e))),onFocus:L(e.onFocus,()=>d(!0)),onBlur:L(e.onBlur,()=>d(!1))})})})}),nc=`MenuCheckboxItem`,rc=B.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,V.jsx)(dc,{scope:e.__scopeMenu,checked:n,children:(0,V.jsx)(ec,{role:`menuitemcheckbox`,"aria-checked":Dc(n)?`mixed`:n,...i,ref:t,"data-state":Oc(n),onSelect:L(i.onSelect,()=>r?.(Dc(n)?!0:!n),{checkForDefaultPrevented:!1})})})});rc.displayName=nc;var ic=`MenuRadioGroup`,[ac,oc]=Ts(ic,{value:void 0,onValueChange:()=>{}}),sc=B.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=fe(r);return(0,V.jsx)(ac,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,V.jsx)(Ys,{...i,ref:t})})});sc.displayName=ic;var cc=`MenuRadioItem`,lc=B.forwardRef((e,t)=>{let{value:n,...r}=e,i=oc(cc,e.__scopeMenu),a=n===i.value;return(0,V.jsx)(dc,{scope:e.__scopeMenu,checked:a,children:(0,V.jsx)(ec,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Oc(a),onSelect:L(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});lc.displayName=cc;var uc=`MenuItemIndicator`,[dc,fc]=Ts(uc,{checked:!1}),pc=B.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=fc(uc,n);return(0,V.jsx)(Ne,{present:r||Dc(a.checked)||a.checked===!0,children:(0,V.jsx)(Ce.span,{...i,ref:t,"data-state":Oc(a.checked)})})});pc.displayName=uc;var mc=`MenuSeparator`,hc=B.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,V.jsx)(Ce.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});hc.displayName=mc;var gc=`MenuArrow`,_c=B.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Ds(n);return(0,V.jsx)(qo,{...i,...r,ref:t})});_c.displayName=gc;var vc=`MenuSub`,[yc,bc]=Ts(vc),xc=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=As(vc,t),o=Ds(t),[s,c]=B.useState(null),[l,u]=B.useState(null),d=fe(i);return B.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,V.jsx)(Wo,{...o,children:(0,V.jsx)(ks,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,V.jsx)(yc,{scope:t,contentId:ee(),triggerId:ee(),trigger:s,onTriggerChange:c,children:n})})})};xc.displayName=vc;var Sc=`MenuSubTrigger`,Cc=B.forwardRef((e,t)=>{let n=As(Sc,e.__scopeMenu),r=Ms(Sc,e.__scopeMenu),i=bc(Sc,e.__scopeMenu),a=Hs(Sc,e.__scopeMenu),o=B.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=B.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return B.useEffect(()=>u,[u]),B.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,V.jsx)(Fs,{asChild:!0,...l,children:(0,V.jsx)(tc,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":Ec(n.open),...e,ref:oe(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:L(e.onPointerMove,Pc(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:L(e.onPointerLeave,Pc(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:L(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||ys[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Cc.displayName=Sc;var wc=`MenuSubContent`,Tc=B.forwardRef((e,t)=>{let n=Rs(Bs,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=As(Bs,e.__scopeMenu),o=Ms(Bs,e.__scopeMenu),s=bc(wc,e.__scopeMenu),c=B.useRef(null),l=de(t,c);return(0,V.jsx)(Ss.Provider,{scope:e.__scopeMenu,children:(0,V.jsx)(Ne,{present:r||a.open,children:(0,V.jsx)(Ss.Slot,{scope:e.__scopeMenu,children:(0,V.jsx)(qs,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:L(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:L(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:L(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=bs[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});Tc.displayName=wc;function Ec(e){return e?`open`:`closed`}function Dc(e){return e===`indeterminate`}function Oc(e){return Dc(e)?`indeterminate`:e?`checked`:`unchecked`}function kc(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Ac(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function jc(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=Ac(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Mc(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Nc(e,t){return t?Mc({x:e.clientX,y:e.clientY},t):!1}function Pc(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Fc=Ns,Ic=Fs,Lc=zs,Rc=Us,zc=Ys,Bc=Zs,Vc=ec,Hc=rc,Uc=sc,Wc=lc,Gc=pc,Kc=hc,qc=_c,Jc=Cc,Yc=Tc,Xc=`DropdownMenu`,[Zc,Qc]=le(Xc,[Es]),$c=Es(),[el,tl]=Zc(Xc),nl=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=$c(t),l=B.useRef(null),[u,d]=pe({prop:i,defaultProp:a??!1,onChange:o,caller:Xc});return(0,V.jsx)(el,{scope:t,triggerId:ee(),triggerRef:l,contentId:ee(),open:u,onOpenChange:d,onOpenToggle:B.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,V.jsx)(Fc,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};nl.displayName=Xc;var rl=`DropdownMenuTrigger`,il=B.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=tl(rl,n),o=$c(n);return(0,V.jsx)(Ic,{asChild:!0,...o,children:(0,V.jsx)(Ce.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:oe(t,a.triggerRef),onPointerDown:L(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:L(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});il.displayName=rl;var al=`DropdownMenuPortal`,ol=e=>{let{__scopeDropdownMenu:t,...n}=e,r=$c(t);return(0,V.jsx)(Lc,{...r,...n})};ol.displayName=al;var sl=`DropdownMenuContent`,cl=B.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=tl(sl,n),a=$c(n),o=B.useRef(!1);return(0,V.jsx)(Rc,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:L(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:L(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});cl.displayName=sl;var ll=`DropdownMenuGroup`,ul=B.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$c(n);return(0,V.jsx)(zc,{...i,...r,ref:t})});ul.displayName=ll;var dl=`DropdownMenuLabel`,fl=B.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$c(n);return(0,V.jsx)(Bc,{...i,...r,ref:t})});fl.displayName=dl;var pl=`DropdownMenuItem`,ml=B.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$c(n);return(0,V.jsx)(Vc,{...i,...r,ref:t})});ml.displayName=pl;var hl=`DropdownMenuCheckboxItem`,gl=B.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$c(n);return(0,V.jsx)(Hc,{...i,...r,ref:t})});gl.displayName=hl;var _l=`DropdownMenuRadioGroup`,vl=B.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$c(n);return(0,V.jsx)(Uc,{...i,...r,ref:t})});vl.displayName=_l;var yl=`DropdownMenuRadioItem`,bl=B.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$c(n);return(0,V.jsx)(Wc,{...i,...r,ref:t})});bl.displayName=yl;var xl=`DropdownMenuItemIndicator`,Sl=B.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$c(n);return(0,V.jsx)(Gc,{...i,...r,ref:t})});Sl.displayName=xl;var Cl=`DropdownMenuSeparator`,wl=B.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$c(n);return(0,V.jsx)(Kc,{...i,...r,ref:t})});wl.displayName=Cl;var Tl=`DropdownMenuArrow`,El=B.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$c(n);return(0,V.jsx)(qc,{...i,...r,ref:t})});El.displayName=Tl;var Dl=`DropdownMenuSubTrigger`,Ol=B.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$c(n);return(0,V.jsx)(Jc,{...i,...r,ref:t})});Ol.displayName=Dl;var kl=`DropdownMenuSubContent`,Al=B.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$c(n);return(0,V.jsx)(Yc,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Al.displayName=kl;var jl=nl,Ml=il,Nl=ol,Pl=cl,Fl=ul,Il=fl,Ll=ml,Rl=wl,zl=`Label`,Bl=B.forwardRef((e,t)=>(0,V.jsx)(Ce.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));Bl.displayName=zl;var Vl=Bl;function Hl(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ul=t(N(),1),Wl=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Gl=[` `,`Enter`],Kl=`Select`,[ql,Jl,Yl]=Bn(Kl),[Xl,Zl]=le(Kl,[Yl,Oo]),Ql=Oo(),[$l,eu]=Xl(Kl),[tu,nu]=Xl(Kl),ru=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:m}=e,h=Ql(t),[g,_]=B.useState(null),[v,y]=B.useState(null),[b,x]=B.useState(!1),S=Hn(l),[C,w]=pe({prop:r,defaultProp:i??!1,onChange:a,caller:Kl}),[T,E]=pe({prop:o,defaultProp:s,onChange:c,caller:Kl}),D=B.useRef(null),O=g?m||!!g.closest(`form`):!0,[k,A]=B.useState(new Set),j=Array.from(k).map(e=>e.props.value).join(`;`);return(0,V.jsx)(Wo,{...h,children:(0,V.jsxs)($l,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:ee(),value:T,onValueChange:E,open:C,onOpenChange:w,dir:S,triggerPointerDownPosRef:D,disabled:f,children:[(0,V.jsx)(ql.Provider,{scope:t,children:(0,V.jsx)(tu,{scope:e.__scopeSelect,onNativeOptionAdd:B.useCallback(e=>{A(t=>new Set(t).add(e))},[]),onNativeOptionRemove:B.useCallback(e=>{A(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),O?(0,V.jsxs)(Qu,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:e=>E(e.target.value),disabled:f,form:m,children:[T===void 0?(0,V.jsx)(`option`,{value:``}):null,Array.from(k)]},j):null]})})};ru.displayName=Kl;var iu=`SelectTrigger`,au=B.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Ql(n),o=eu(iu,n),s=o.disabled||r,c=de(t,o.onTriggerChange),l=Jl(n),u=B.useRef(`touch`),[d,f,p]=ed(e=>{let t=l().filter(e=>!e.disabled),n=td(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,V.jsx)(Go,{asChild:!0,...a,children:(0,V.jsx)(Ce.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":$u(o.value)?``:void 0,...i,ref:c,onClick:L(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:L(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`&&(m(e),e.preventDefault())}),onKeyDown:L(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Wl.includes(e.key)&&(m(),e.preventDefault())})})})});au.displayName=iu;var ou=`SelectValue`,su=B.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=eu(ou,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=de(t,c.onValueNodeChange);return te(()=>{l(u)},[l,u]),(0,V.jsx)(Ce.span,{...s,ref:d,style:{pointerEvents:`none`},children:$u(c.value)?(0,V.jsx)(V.Fragment,{children:o}):a})});su.displayName=ou;var cu=`SelectIcon`,lu=B.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,V.jsx)(Ce.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});lu.displayName=cu;var uu=`SelectPortal`,du=e=>(0,V.jsx)(Fe,{asChild:!0,...e});du.displayName=uu;var fu=`SelectContent`,pu=B.forwardRef((e,t)=>{let n=eu(fu,e.__scopeSelect),[r,i]=B.useState();if(te(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Ul.createPortal((0,V.jsx)(hu,{scope:e.__scopeSelect,children:(0,V.jsx)(ql.Slot,{scope:e.__scopeSelect,children:(0,V.jsx)(`div`,{children:e.children})})}),t):null}return(0,V.jsx)(yu,{...e,ref:t})});pu.displayName=fu;var mu=10,[hu,gu]=Xl(fu),_u=`SelectContentImpl`,vu=ne(`SelectContent.RemoveScroll`),yu=B.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:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=eu(fu,n),[y,b]=B.useState(null),[x,S]=B.useState(null),C=de(t,e=>b(e)),[w,T]=B.useState(null),[E,D]=B.useState(null),O=Jl(n),[k,A]=B.useState(!1),j=B.useRef(!1);B.useEffect(()=>{if(y)return xe(y)},[y]),Me();let M=B.useCallback(e=>{let[t,...n]=O().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&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),N=B.useCallback(()=>M([w,y]),[M,w,y]);B.useEffect(()=>{k&&N()},[k,N]);let{onOpenChange:P,triggerPointerDownPosRef:F}=v;B.useEffect(()=>{if(y){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():y.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})}}},[y,P,F]),B.useEffect(()=>{let e=()=>P(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[P]);let[I,ee]=ed(e=>{let t=O().filter(e=>!e.disabled),n=td(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),te=B.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(j.current=!0))},[v.value]),ne=B.useCallback(()=>y?.focus(),[y]),re=B.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),ie=r===`popper`?Cu:xu,ae=ie===Cu?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,V.jsx)(hu,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:te,selectedItem:w,onItemLeave:ne,itemTextRefCallback:re,focusSelectedItem:N,selectedItemText:E,position:r,isPositioned:k,searchRef:I,children:(0,V.jsx)(ge,{as:vu,allowPinchZoom:!0,children:(0,V.jsx)(_e,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:L(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,V.jsx)(Pe,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,V.jsx)(ie,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...ae,onPlaced:()=>A(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:L(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ee(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().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(()=>M(t)),e.preventDefault()}})})})})})})});yu.displayName=_u;var bu=`SelectItemAlignedPosition`,xu=B.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=eu(fu,n),o=gu(fu,n),[s,c]=B.useState(null),[l,u]=B.useState(null),d=de(t,e=>u(e)),f=Jl(n),p=B.useRef(!1),m=B.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=B.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.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-mu,d=Hl(a,[mu,Math.max(mu,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-mu,d=Hl(a,[mu,Math.max(mu,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-mu*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-mu,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${mu}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);te(()=>y(),[y]);let[b,x]=B.useState();return te(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,V.jsx)(wu,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:B.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,V.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,V.jsx)(Ce.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});xu.displayName=bu;var Su=`SelectPopperPosition`,Cu=B.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=mu,...a}=e,o=Ql(n);return(0,V.jsx)(Ko,{...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)`}})});Cu.displayName=Su;var[wu,Tu]=Xl(fu,{}),Eu=`SelectViewport`,Du=B.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=gu(Eu,n),o=Tu(Eu,n),s=de(t,a.onViewportChange),c=B.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)(ql.Slot,{scope:n,children:(0,V.jsx)(Ce.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:L(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-mu*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})})})]})});Du.displayName=Eu;var Ou=`SelectGroup`,[ku,Au]=Xl(Ou),ju=B.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=ee();return(0,V.jsx)(ku,{scope:n,id:i,children:(0,V.jsx)(Ce.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});ju.displayName=Ou;var Mu=`SelectLabel`,Nu=B.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Au(Mu,n);return(0,V.jsx)(Ce.div,{id:i.id,...r,ref:t})});Nu.displayName=Mu;var Pu=`SelectItem`,[Fu,Iu]=Xl(Pu),Lu=B.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=eu(Pu,n),c=gu(Pu,n),l=s.value===r,[u,d]=B.useState(a??``),[f,p]=B.useState(!1),m=de(t,e=>c.itemRefCallback?.(e,r,i)),h=ee(),g=B.useRef(`touch`),_=()=>{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)(Fu,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:B.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,V.jsx)(ql.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,V.jsx)(Ce.div,{role:`option`,"aria-labelledby":h,"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:m,onFocus:L(o.onFocus,()=>p(!0)),onBlur:L(o.onBlur,()=>p(!1)),onClick:L(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:L(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:L(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:L(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:L(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:L(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(Gl.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});Lu.displayName=Pu;var Ru=`SelectItemText`,zu=B.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=eu(Ru,n),s=gu(Ru,n),c=Iu(Ru,n),l=nu(Ru,n),[u,d]=B.useState(null),f=de(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=B.useMemo(()=>(0,V.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return te(()=>(h(m),()=>g(m)),[h,g,m]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Ce.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ul.createPortal(a.children,o.valueNode):null]})});zu.displayName=Ru;var Bu=`SelectItemIndicator`,Vu=B.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return Iu(Bu,n).isSelected?(0,V.jsx)(Ce.span,{"aria-hidden":!0,...r,ref:t}):null});Vu.displayName=Bu;var Hu=`SelectScrollUpButton`,Uu=B.forwardRef((e,t)=>{let n=gu(Hu,e.__scopeSelect),r=Tu(Hu,e.__scopeSelect),[i,a]=B.useState(!1),o=de(t,r.onScrollButtonChange);return te(()=>{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)(Ku,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Uu.displayName=Hu;var Wu=`SelectScrollDownButton`,Gu=B.forwardRef((e,t)=>{let n=gu(Wu,e.__scopeSelect),r=Tu(Wu,e.__scopeSelect),[i,a]=B.useState(!1),o=de(t,r.onScrollButtonChange);return te(()=>{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)(Ku,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Gu.displayName=Wu;var Ku=B.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=gu(`SelectScrollButton`,n),o=B.useRef(null),s=Jl(n),c=B.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return B.useEffect(()=>()=>c(),[c]),te(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,V.jsx)(Ce.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:L(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:L(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:L(i.onPointerLeave,()=>{c()})})}),qu=`SelectSeparator`,Ju=B.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,V.jsx)(Ce.div,{"aria-hidden":!0,...r,ref:t})});Ju.displayName=qu;var Yu=`SelectArrow`,Xu=B.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Ql(n),a=eu(Yu,n),o=gu(Yu,n);return a.open&&o.position===`popper`?(0,V.jsx)(qo,{...i,...r,ref:t}):null});Xu.displayName=Yu;var Zu=`SelectBubbleInput`,Qu=B.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=B.useRef(null),a=de(r,i),o=Br(t);return B.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)(Ce.select,{...n,style:{...In,...n.style},ref:a,defaultValue:t})});Qu.displayName=Zu;function $u(e){return e===``||e===void 0}function ed(e){let t=fe(e),n=B.useRef(``),r=B.useRef(0),i=B.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=B.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return B.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function td(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=nd(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 nd(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var rd=ru,id=au,ad=su,od=lu,sd=du,cd=pu,ld=Du,ud=Lu,dd=zu,fd=Vu,pd=Uu,md=Gu,hd=`Separator`,gd=`horizontal`,_d=[`horizontal`,`vertical`],vd=B.forwardRef((e,t)=>{let{decorative:n,orientation:r=gd,...i}=e,a=yd(r)?r:gd,o=a===`vertical`?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,V.jsx)(Ce.div,{"data-orientation":a,...s,...i,ref:t})});vd.displayName=hd;function yd(e){return _d.includes(e)}var bd=vd,[xd,Sd]=le(`Tooltip`,[Oo]),Cd=Oo(),wd=`TooltipProvider`,Td=700,Ed=`tooltip.open`,[Dd,Od]=xd(wd),kd=e=>{let{__scopeTooltip:t,delayDuration:n=Td,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=B.useRef(!0),s=B.useRef(!1),c=B.useRef(0);return B.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,V.jsx)(Dd,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:B.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:B.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:B.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};kd.displayName=wd;var Ad=`Tooltip`,[jd,Md]=xd(Ad),Nd=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=Od(Ad,e.__scopeTooltip),l=Cd(t),[u,d]=B.useState(null),f=ee(),p=B.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=B.useRef(!1),[_,v]=pe({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ed))):c.onClose(),a?.(e)},caller:Ad}),y=B.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),b=B.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),x=B.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),S=B.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return B.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,V.jsx)(Wo,{...l,children:(0,V.jsx)(jd,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:B.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:B.useCallback(()=>{m?x():(window.clearTimeout(p.current),p.current=0)},[x,m]),onOpen:b,onClose:x,disableHoverableContent:m,children:n})})};Nd.displayName=Ad;var Pd=`TooltipTrigger`,Fd=B.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Md(Pd,n),a=Od(Pd,n),o=Cd(n),s=de(t,B.useRef(null),i.onTriggerChange),c=B.useRef(!1),l=B.useRef(!1),u=B.useCallback(()=>c.current=!1,[]);return B.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,V.jsx)(Go,{asChild:!0,...o,children:(0,V.jsx)(Ce.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:L(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:L(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:L(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:L(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:L(e.onBlur,i.onClose),onClick:L(e.onClick,i.onClose)})})});Fd.displayName=Pd;var Id=`TooltipPortal`,[Ld,Rd]=xd(Id,{forceMount:void 0}),zd=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Md(Id,t);return(0,V.jsx)(Ld,{scope:t,forceMount:n,children:(0,V.jsx)(Ne,{present:n||a.open,children:(0,V.jsx)(Fe,{asChild:!0,container:i,children:r})})})};zd.displayName=Id;var Bd=`TooltipContent`,Vd=B.forwardRef((e,t)=>{let n=Rd(Bd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Md(Bd,e.__scopeTooltip);return(0,V.jsx)(Ne,{present:r||o.open,children:o.disableHoverableContent?(0,V.jsx)(Kd,{side:i,...a,ref:t}):(0,V.jsx)(Hd,{side:i,...a,ref:t})})}),Hd=B.forwardRef((e,t)=>{let n=Md(Bd,e.__scopeTooltip),r=Od(Bd,e.__scopeTooltip),i=B.useRef(null),a=de(t,i),[o,s]=B.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=B.useCallback(()=>{s(null),d(!1)},[d]),p=B.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Xd(r,Yd(r,n.getBoundingClientRect())),a=Zd(t.getBoundingClientRect());s($d([...i,...a])),d(!0)},[d]);return B.useEffect(()=>()=>f(),[f]),B.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),B.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Qd(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,V.jsx)(Kd,{...e,ref:a})}),[Ud,Wd]=xd(Ad,{isInside:!1}),Gd=ae(`TooltipContent`),Kd=B.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=Md(Bd,n),l=Cd(n),{onClose:u}=c;return B.useEffect(()=>(document.addEventListener(Ed,u),()=>document.removeEventListener(Ed,u)),[u]),B.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,V.jsx)(Pe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,V.jsxs)(Ko,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,V.jsx)(Gd,{children:r}),(0,V.jsx)(Ud,{scope:n,isInside:!0,children:(0,V.jsx)(zn,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});Vd.displayName=Bd;var qd=`TooltipArrow`,Jd=B.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Cd(n);return Wd(qd,n).isInside?null:(0,V.jsx)(qo,{...i,...r,ref:t})});Jd.displayName=qd;function Yd(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Xd(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Zd(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Qd(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function $d(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),ef(t)}function ef(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var tf=kd,nf=Nd,rf=Fd,af=zd,of=Vd,sf=Jd,cf=R();function lf(e){let t=(0,cf.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`empty`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function uf(e){let t=(0,cf.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`flex max-w-sm flex-col items-center gap-2 text-center`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`empty-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var df=Pn(`flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6`}},defaultVariants:{variant:`default`}});function ff(e){let t=(0,cf.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`default`:i,o;t[4]!==n||t[5]!==a?(o=z(df({variant:a,className:n})),t[4]=n,t[5]=a,t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==o||t[9]!==a?(s=(0,V.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":a,className:o,...r}),t[7]=r,t[8]=o,t[9]=a,t[10]=s):s=t[10],s}function pf(e){let t=(0,cf.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`text-lg font-medium tracking-tight`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`empty-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function mf(e){let t=(0,cf.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`empty-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function hf(e){let t=(0,cf.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`empty-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var gf=R();function _f(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`youch-error`&&`youchHtml`in e&&typeof e.youchHtml==`string`}function vf(e){let t=(0,gf.c)(14),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[`translation`],t[0]=r):r=t[0];let{t:i}=me(r),a=p(),[o,s]=(0,B.useState)(!0),c=f(),l=k(a)&&a.status===404,u=k(a)&&a.status>=500,d=l?`404`:u?`500`:`Oops!`,m=l?`translation:errors.boundary.title.404`:u?`translation:errors.boundary.title.500`:`translation:errors.boundary.title.generic`,h=l?`translation:errors.boundary.description.404`:u?`translation:errors.boundary.description.500`:`translation:errors.boundary.description.generic`,g;t[1]!==o||t[2]!==a?(g=k(a)&&_f(a.data)&&(0,V.jsx)(Ae,{open:o,onOpenChange:s,children:(0,V.jsx)(Ee,{className:`max-w-[95vw] w-full sm:max-w-[85vw] lg:max-w-[1200px] h-[90vh] p-0 overflow-hidden`,children:(0,V.jsx)(`iframe`,{srcDoc:a.data.youchHtml,title:`Error - Stack Trace`,className:`w-full h-full border-0`})})}),t[1]=o,t[2]=a,t[3]=g):g=t[3];let _;t[4]!==n||t[5]!==h||t[6]!==d||t[7]!==c||t[8]!==i||t[9]!==m?(_=n||(0,V.jsxs)(lf,{className:`max-w-2xl w-full border-0`,children:[(0,V.jsxs)(uf,{children:[(0,V.jsx)(ff,{className:`bg-transparent`,variant:`icon`,children:(0,V.jsx)(kn,{})}),(0,V.jsxs)(pf,{className:`flex items-center gap-2.5`,children:[d!==`Oops!`&&(0,V.jsx)(`span`,{className:`text-3xl font-bold tracking-tighter`,children:d}),i(m)]}),(0,V.jsx)(mf,{children:i(h)})]}),(0,V.jsxs)(hf,{className:`flex flex-row justify-center`,children:[(0,V.jsxs)(H,{className:`min-w-28`,onClick:()=>c(-1),variant:`outline`,children:[(0,V.jsx)(Jt,{}),i(`translation:errors.boundary.actions.goBack`)]}),(0,V.jsxs)(H,{className:`min-w-28`,onClick:()=>c(-1),children:[(0,V.jsx)(_n,{}),i(`translation:errors.boundary.actions.goHome`)]})]})]}),t[4]=n,t[5]=h,t[6]=d,t[7]=c,t[8]=i,t[9]=m,t[10]=_):_=t[10];let v;return t[11]!==g||t[12]!==_?(v=(0,V.jsxs)(`main`,{className:`min-h-screen w-full dark:from-gray-900 dark:to-gray-800 flex items-center justify-center p-6`,children:[g,_]}),t[11]=g,t[12]=_,t[13]=v):v=t[13],v}var yf=()=>({id:`sso-client`,$InferServerPlugin:{}}),bf=Object.create(null),xf=e=>globalThis.process?.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?bf:globalThis),Sf=new Proxy(bf,{get(e,t){return xf()[t]??bf[t]},has(e,t){return t in xf()||t in bf},set(e,t,n){let r=xf(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=xf(!0);return delete n[t],!0},ownKeys(){let e=xf(!0);return Object.keys(e)}});typeof process<`u`&&process.env&&process.env.NODE_ENV;function Cf(e,t){return typeof process<`u`&&process.env?process.env[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 Cf(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return Cf(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return Cf(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return Cf(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return Cf(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return Cf(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return Cf(`BETTER_AUTH_TELEMETRY_ENDPOINT`,`https://telemetry.better-auth.com/v1/track`)}});var wf=1,Tf=4,Ef=8,Df=24,Of={eterm:Tf,cons25:Tf,console:Tf,cygwin:Tf,dtterm:Tf,gnome:Tf,hurd:Tf,jfbterm:Tf,konsole:Tf,kterm:Tf,mlterm:Tf,mosh:Df,putty:Tf,st:Tf,"rxvt-unicode-24bit":Df,terminator:Df,"xterm-kitty":Df},kf=new Map(Object.entries({APPVEYOR:Ef,BUILDKITE:Ef,CIRCLECI:Df,DRONE:Ef,GITEA_ACTIONS:Df,GITHUB_ACTIONS:Df,GITLAB_CI:Ef,TRAVIS:Ef})),Af=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function jf(){if(Cf(`FORCE_COLOR`)!==void 0)switch(Cf(`FORCE_COLOR`)){case``:case`1`:case`true`:return Tf;case`2`:return Ef;case`3`:return Df;default:return wf}if(Cf(`NODE_DISABLE_COLORS`)!==void 0&&Cf(`NODE_DISABLE_COLORS`)!==``||Cf(`NO_COLOR`)!==void 0&&Cf(`NO_COLOR`)!==``||Cf(`TERM`)===`dumb`)return wf;if(Cf(`TMUX`))return Df;if(`TF_BUILD`in Sf&&`AGENT_NAME`in Sf)return Tf;if(`CI`in Sf){for(let{0:e,1:t}of kf)if(e in Sf)return t;return Cf(`CI_NAME`)===`codeship`?Ef:wf}if(`TEAMCITY_VERSION`in Sf)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(Cf(`TEAMCITY_VERSION`))===null?wf:Tf;switch(Cf(`TERM_PROGRAM`)){case`iTerm.app`:return!Cf(`TERM_PROGRAM_VERSION`)||/^[0-2]\./.exec(Cf(`TERM_PROGRAM_VERSION`))!==null?Ef:Df;case`HyperTerm`:case`MacTerm`:return Df;case`Apple_Terminal`:return Ef}if(Cf(`COLORTERM`)===`truecolor`||Cf(`COLORTERM`)===`24bit`)return Df;if(Cf(`TERM`)){if(/truecolor/.exec(Cf(`TERM`))!==null)return Df;if(/^xterm-256/.exec(Cf(`TERM`))!==null)return Ef;let e=Cf(`TERM`).toLowerCase();if(Of[e])return Of[e];if(Af.some(t=>t.exec(e)!==null))return Tf}return Cf(`COLORTERM`)?Tf:wf}var Mf={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`}},Nf=[`info`,`success`,`warn`,`error`,`debug`];function Pf(e,t){return Nf.indexOf(t)<=Nf.indexOf(e)}var Ff={info:Mf.fg.blue,success:Mf.fg.green,warn:Mf.fg.yellow,error:Mf.fg.red,debug:Mf.fg.magenta},If=(e,t,n)=>{let r=new Date().toISOString();return n?`${Mf.dim}${r}${Mf.reset} ${Ff[e]}${e.toUpperCase()}${Mf.reset} ${Mf.bright}[Better Auth]:${Mf.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`};(e=>{let t=e?.disabled!==!0,n=e?.level??`error`,r=e?.disableColors===void 0?jf()!==1:!e.disableColors,i=(i,a,o=[])=>{if(!t||!Pf(n,i))return;let s=If(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(Nf.map(e=>[e,(...[t,...n])=>i(e,t,n)])),get level(){return n}}})();var Lf=class extends Error{constructor(e,t){super(e),this.name=`BetterAuthError`,this.message=e,this.cause=t,this.stack=``}};function Rf(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new Lf(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function zf(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new Lf(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Lf?t:new Lf(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function Bf(e,t=`/api/auth`){if(zf(e),Rf(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function Vf(e,t,n,r){if(e)return Bf(e,t);if(r!==!1){let e=Sf.BETTER_AUTH_URL||Sf.NEXT_PUBLIC_BETTER_AUTH_URL||Sf.PUBLIC_BETTER_AUTH_URL||Sf.NUXT_PUBLIC_BETTER_AUTH_URL||Sf.NUXT_PUBLIC_AUTH_URL||(Sf.BASE_URL===`/`?void 0:Sf.BASE_URL);if(e)return Bf(e,t)}let i=n?.headers.get(`x-forwarded-host`),a=n?.headers.get(`x-forwarded-proto`);if(i&&a)return Bf(`${a}://${i}`,t);if(n){let e=Hf(n.url);if(!e)throw new Lf(`Could not get origin from request. Please provide a valid base URL.`);return Bf(e,t)}if(typeof window<`u`&&window.location)return Bf(window.location.origin,t)}function Hf(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var Uf={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*:/},Wf=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Gf={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},Kf=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function qf(e){return e instanceof Date&&!isNaN(e.getTime())}function Jf(e){let t=Kf.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 qf(f)?f:null}function Yf(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 Gf)return Gf[s];if(!Wf.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(Uf).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=Jf(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function Xf(e,t={strict:!0}){return Yf(e,t)}var Zf=Object.defineProperty,Qf=Object.defineProperties,$f=Object.getOwnPropertyDescriptors,ep=Object.getOwnPropertySymbols,tp=Object.prototype.hasOwnProperty,np=Object.prototype.propertyIsEnumerable,rp=(e,t,n)=>t in e?Zf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ip=(e,t)=>{for(var n in t||={})tp.call(t,n)&&rp(e,n,t[n]);if(ep)for(var n of ep(t))np.call(t,n)&&rp(e,n,t[n]);return e},ap=(e,t)=>Qf(e,$f(t)),op=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},sp=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}},cp=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}},lp=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 up(e){if(typeof e==`number`)return new cp({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new cp(e);case`exponential`:return new lp(e);default:throw Error(`Invalid retry strategy`)}}var dp=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=n(e.auth.username),i=n(e.auth.password);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let r=n(e.auth.value);if(!r)return t;t.authorization=`${n(e.auth.prefix)} ${r}`}}return t},fp=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function pp(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 fp.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function mp(e){try{return JSON.parse(e),!0}catch{return!1}}function hp(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 gp(e){try{return JSON.parse(e)}catch{return e}}function _p(e){return typeof e==`function`}function vp(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&_p(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&_p(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function yp(e){let t=new Headers(e?.headers),n=await dp(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=bp(e?.body);n&&t.set(`content-type`,n)}return t}function bp(e){return hp(e)?`application/json`:null}function xp(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(hp(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 e.body}function Sp(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return Ep.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function Cp(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var wp=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function Tp(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new wp(n.issues);return n.value}var Ep=[`get`,`post`,`put`,`patch`,`delete`],Dp=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=ap(ip({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=ap(ip({},e),{body:i.input?await Tp(i.input,n?.body):n?.body,params:i.params?await Tp(i.params,n?.params):n?.params,query:i.query?await Tp(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),Op=e=>{async function t(t,n){let r=ap(ip(ip({},e),n),{plugins:[...e?.plugins||[],Dp(e||{})]});if(e?.catchAllError)try{return await Ap(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 Ap(t,r)}return t};function kp(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];Ep.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||{}))t!=null&&c.set(e,String(t));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 Ap=async(e,t)=>{let{hooks:n,url:r,options:i}=await sp(e,t),a=vp(i),o=new AbortController,s=i.signal??o.signal,c=kp(r,i),l=xp(i),u=await yp(i),d=Sp(r,i),f=ap(ip({},i),{url:c,headers:u,body:l,method:d,signal:s});for(let e of n.onRequest)if(e){let t=await e(f);t instanceof Object&&(f=t)}(`pipeTo`in f&&typeof f.pipeTo==`function`||typeof t?.body?.pipe==`function`)&&(`duplex`in f||(f.duplex=`half`));let{clearTimeout:p}=Cp(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(ap(ip({},h),{response:t?.hookOptions?.cloneResponse?m.clone():m}));n instanceof Response?m=n:n instanceof Object&&(m=n.response)}if(m.ok){if(f.method===`HEAD`)return{data:``,error:null};let e=pp(m),r={data:``,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??gp)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await Tp(f.output,r.data));for(let e of n.onSuccess)e&&await e(ap(ip({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??gp,_=await m.text(),v=mp(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:ap(ip({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(ap(ip({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=up(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 Ap(e,ap(ip({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new op(m.status,m.statusText,v?y:_);return{data:null,error:ap(ip({},y),{status:m.status,statusText:m.statusText})}};let jp=Symbol(`clean`);var Mp=[],Np=0,Pp=4;let Fp=0,Ip=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=Np+Pp;t<Mp.length;)Mp[t]===e?Mp.splice(t,Pp):t+=Pp;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){Fp++;let i=!Mp.length;for(let i of t)Mp.push(i,n.value,e,r);if(i){for(Np=0;Np<Mp.length;Np+=Pp)Mp[Np](Mp[Np+1],Mp[Np+2],Mp[Np+3]);Mp.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 process.env.NODE_ENV!==`production`&&(n[jp]=()=>{t=[],n.lc=0,n.off()}),n};var Lp=5,Rp=6,zp=10;let Bp=(e,t,n,r)=>(e.events=e.events||{},e.events[n+zp]||(e.events[n+zp]=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+zp](),delete e.events[n+zp])}),Vp=(e,t)=>Bp(e,n=>{let r=t(n);r&&e.events[Rp].push(r)},Lp,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;if(e.events[Rp]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[Rp])t();e.events[Rp]=[]}},1e3)},process.env.NODE_ENV!==`production`){let t=e[jp];e[jp]=()=>{for(let t of e.events[Rp])t();e.events[Rp]=[],e.active=!1,t()}}return()=>{e.listen=n,e.off=r}});function Hp(e,t,n){let r=new Set(t).add(void 0);return e.listen((e,t,i)=>{r.has(i)&&n(e,t,i)})}var Up=()=>Math.floor(Date.now()/1e3);function Wp(e=`better-auth.message`){return{receive(t){let n=n=>{if(n.key!==e)return;let r=JSON.parse(n.newValue??`{}`);r?.event!==`session`||!r?.data||t(r)};return window.addEventListener(`storage`,n),()=>window.removeEventListener(`storage`,n)},post(t){if(!(typeof window>`u`))try{localStorage.setItem(e,JSON.stringify({...t,timestamp:Up()}))}catch{}}}}var Gp=()=>typeof window>`u`,Kp=(e,t,n,r)=>{let i=Ip({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>a(e)}),a=e=>{let a=typeof r==`function`?r({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):r;n(t,{...a,query:{...a?.query,...e?.query},async onSuccess(e){i.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await a?.onSuccess?.(e)},async onError(e){let{request:t}=e,n=typeof t.retry==`number`?t.retry:t.retry?.attempts,r=t.retryAttempt||0;n&&r<n||(i.set({error:e.error,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await a?.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 a?.onRequest?.(e)}}).catch(e=>{i.set({error:e,data:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch})})};e=Array.isArray(e)?e:[e];let o=!1;for(let t of e)t.subscribe(()=>{Gp()||(o?a():Vp(i,()=>{let e=setTimeout(()=>{o||=(a(),!0)},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},qp=()=>Math.floor(Date.now()/1e3);function Jp(e){let{sessionAtom:t,sessionSignal:n,options:r={}}=e,{refetchInterval:i=0,refetchOnWindowFocus:a=!0,refetchWhenOffline:o=!1}=r?.sessionOptions||{},s={lastSync:0,cachedSession:void 0},c=typeof navigator<`u`?navigator.onLine:!0,l=Wp(),u=()=>typeof window>`u`?!1:o||c,d=e=>{if(!u())return;if(e?.event===`storage`){s.lastSync=qp(),n.set(!n.get());return}let r=t.get();(r?.data===null||r?.data===void 0||e?.event===`poll`||e?.event===`visibilitychange`)&&(s.lastSync=qp(),n.set(!n.get()))},f=e=>{l.post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},p=()=>{i&&i>0&&(s.pollInterval=setInterval(()=>{t.get()?.data&&d({event:`poll`})},i*1e3))},m=()=>{s.unsubscribeBroadcast=l.receive(()=>{d({event:`storage`})})},h=()=>{if(!a||typeof document>`u`)return;let e=()=>{document.visibilityState===`visible`&&d({event:`visibilitychange`})};document.addEventListener(`visibilitychange`,e,!1),s.unsubscribeVisibility=()=>{document.removeEventListener(`visibilitychange`,e,!1)}},g=()=>{if(typeof window>`u`)return;let e=()=>{c=!0,d({event:`visibilitychange`})},t=()=>{c=!1};window.addEventListener(`online`,e),window.addEventListener(`offline`,t),s.unsubscribeOnline=()=>window.removeEventListener(`online`,e),s.unsubscribeOffline=()=>window.removeEventListener(`offline`,t)};return{init:()=>{typeof window>`u`||(p(),m(),h(),g())},cleanup:()=>{s.pollInterval&&=(clearInterval(s.pollInterval),void 0),s.unsubscribeBroadcast&&=(s.unsubscribeBroadcast(),void 0),s.unsubscribeVisibility&&=(s.unsubscribeVisibility(),void 0),s.unsubscribeOnline&&=(s.unsubscribeOnline(),void 0),s.unsubscribeOffline&&=(s.unsubscribeOffline(),void 0),s.lastSync=0,s.cachedSession=void 0},triggerRefetch:d,broadcastSessionUpdate:f}}var Yp={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{}}}},Xp={id:`user-agent`,name:`UserAgent`,hooks:{onRequest(e){e.headers.append(`user-agent`,`better-auth`)}}};function Zp(e,t){let n=Ip(!1),r=Kp(n,`/get-session`,e,{method:`GET`});return typeof window<`u`&&Vp(r,()=>{let i=Jp({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return i.init(),()=>{i.cleanup()}}),{session:r,$sessionSignal:n}}var Qp=(e,t)=>{let n=`credentials`in Request.prototype,r=Vf(e?.baseURL,e?.basePath,void 0,t)??`/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=Op({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?Xf(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,Xp,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[Yp],...i]}),{$sessionSignal:f,session:p}=Zp(d,e),m=e?.plugins||[],h={},g={$sessionSignal:f,session:p},_={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},v=[{signal:`$sessionSignal`,matcher(e){return e===`/sign-out`||e===`/update-user`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`}}];for(let e of m)e.getAtoms&&Object.assign(g,e.getAtoms?.(d)),e.pathMethods&&Object.assign(_,e.pathMethods),e.atomListeners&&v.push(...e.atomListeners);let y={notify:e=>{g[e].set(!g[e].get())},listen:(e,t)=>{g[e].subscribe(t)},atoms:g};for(let t of m)t.getActions&&Object.assign(h,t.getActions?.(d,y,e));return{get baseURL(){return r},pluginsActions:h,pluginsAtoms:g,pluginPathMethods:_,atomListeners:v,$fetch:d,$store:y}};function $p(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function em(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 tm(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`||$p(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=em(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)return;let t=i.filter(e=>e.matcher(c));if(t.length)for(let e of t){let t=r[e.signal];if(!t)return;let n=t.get();setTimeout(()=>{t.set(!n)},10)}}})}})}return a()}function nm(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 Lf(`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 rm(e){return{newRole(e){return nm(e)},statements:e}}var im=rm({user:[`create`,`list`,`set-role`,`ban`,`impersonate`,`delete`,`set-password`,`get`,`update`],session:[`list`,`revoke`,`delete`]}),am=im.newRole({user:[`create`,`list`,`set-role`,`ban`,`impersonate`,`delete`,`set-password`,`get`,`update`],session:[`list`,`revoke`,`delete`]}),om=im.newRole({user:[],session:[]}),sm={admin:am,user:om},cm=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions&&!e.permission)return!1;let t=(e.role||e.options?.defaultRole||`user`).split(`,`),n=e.options?.roles||sm;for(let r of t)if(n[r]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},lm=rm({organization:[`update`,`delete`],member:[`create`,`update`,`delete`],invitation:[`create`,`cancel`],team:[`create`,`update`,`delete`],ac:[`create`,`read`,`update`,`delete`]}),um=lm.newRole({organization:[`update`],invitation:[`create`,`cancel`],member:[`create`,`update`,`delete`],team:[`create`,`update`,`delete`],ac:[`create`,`read`,`update`,`delete`]}),dm=lm.newRole({organization:[`update`,`delete`],member:[`create`,`update`,`delete`],invitation:[`create`,`cancel`],team:[`create`,`update`,`delete`],ac:[`create`,`read`,`update`,`delete`]}),fm=lm.newRole({organization:[],member:[],invitation:[],team:[],ac:[`read`]}),pm={admin:um,owner:dm,member:fm},mm=(e,t)=>{if(!e.permissions&&!e.permission)return!1;let n=e.role.split(`,`),r=e.options.creatorRole||`owner`,i=n.includes(r),a=e.allowCreatorAllPermissions||!1;if(i&&a)return!0;for(let r of n)if(t[r]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},hm=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`},fetchPlugins:[{id:`two-factor`,name:`two-factor`,hooks:{async onSuccess(t){t.data?.twoFactorRedirect&&e?.onTwoFactorRedirect&&await e.onTwoFactorRedirect()}}}]}),gm=e=>{let t={admin:am,user:om,...e?.roles};return{id:`admin-client`,$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>cm({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":`GET`,"/admin/stop-impersonating":`POST`}}},_m=()=>({id:`api-key`,$InferServerPlugin:{},pathMethods:{"/api-key/create":`POST`,"/api-key/delete":`POST`,"/api-key/delete-all-expired-api-keys":`POST`}});function vm(e){if(typeof document>`u`)return null;let t=document.cookie.split(`; `).find(t=>t.startsWith(`${e}=`));return t?t.split(`=`)[1]:null}var ym=(e={})=>{let t=e.cookieName||`better-auth.last_used_login_method`;return{id:`last-login-method-client`,getActions(){return{getLastUsedLoginMethod:()=>vm(t),clearLastUsedLoginMethod:()=>{typeof document<`u`&&(document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`)},isLastUsedLoginMethod:e=>vm(t)===e}}}},bm=e=>mm(e,e.options.roles||pm),xm=e=>{let t=Ip(!1),n=Ip(!1),r=Ip(!1),i=Ip(!1),a={admin:um,member:fm,owner:dm,...e?.roles};return{id:`organization`,$InferServerPlugin:{},getActions:(t,n,r)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:t=>bm({role:t.role,options:{ac:e?.ac,roles:a},permissions:t.permissions??t.permission})}}),getAtoms:e=>{let a=Kp(t,`/organization/list`,e,{method:`GET`});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:r,$activeMemberRoleSignal:i,activeOrganization:Kp([n],`/organization/get-full-organization`,e,()=>({method:`GET`})),listOrganizations:a,activeMember:Kp([r],`/organization/get-active-member`,e,{method:`GET`}),activeMemberRole:Kp([i],`/organization/get-active-member-role`,e,{method:`GET`})}},pathMethods:{"/organization/get-full-organization":`GET`,"/organization/list-user-teams":`GET`},atomListeners:[{matcher(e){return e===`/organization/create`||e===`/organization/delete`||e===`/organization/update`},signal:`$listOrg`},{matcher(e){return e.startsWith(`/organization`)},signal:`$activeOrgSignal`},{matcher(e){return e.startsWith(`/organization/set-active`)},signal:`$sessionSignal`},{matcher(e){return e.includes(`/organization/update-member-role`)},signal:`$activeMemberSignal`},{matcher(e){return e.includes(`/organization/update-member-role`)},signal:`$activeMemberRoleSignal`}]}};function Sm(e,t={}){let n=(0,B.useRef)(e.get()),{keys:r,deps:i=[e,r]}=t,a=(0,B.useCallback)(t=>{let i=e=>{n.current!==e&&(n.current=e,t())};return i(e.value),r?.length?Hp(e,r,i):e.listen(i)},i),o=()=>n.current;return(0,B.useSyncExternalStore)(a,o,o)}function Cm(e){return`use${wm(e)}`}function wm(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Tm(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,$store:a,atomListeners:o}=Qp(e),s={};for(let[e,t]of Object.entries(r))s[Cm(e)]=()=>Sm(t);return tm({...n,...s,$fetch:i,$store:a},i,t,r,o)}function Em({features:e}){let t=[gm(Om)];return e.apiKey&&t.push(_m()),e.lastLoginMethod&&t.push(ym()),e.organization&&t.push(xm({ac:Om.ac,dynamicAccessControl:{enabled:!1},roles:Om.roles,team:{enabled:e.organization.teams??!1}})),e.sso&&t.push(yf()),e.twoFactor&&t.push(hm()),Tm({basePath:`/auth`,plugins:t})}var Dm=rm({accounts:[],apiKeys:[],invitations:[],members:[],organizations:[],sessions:[`list`,`revoke`,`delete`],ssoProviders:[],teamMembers:[],teams:[],twoFactors:[],users:[`ban`,`create`,`delete`,`impersonate`,`list`,`set-password`,`set-role`,`update`],verifications:[],storageAttachments:[],storageBlobs:[],storageVariantRecords:[]});const Om={ac:Dm,adminRoles:[`admin`],defaultRole:`user`,roles:{admin:Dm.newRole({sessions:[`list`,`revoke`,`delete`],users:[`create`,`list`,`set-role`,`ban`,`impersonate`,`delete`,`set-password`,`update`]}),user:Dm.newRole({users:[]})}};var km=R();const Am=(0,B.createContext)({});function jm(e){let t=(0,km.c)(8),{features:n,children:r}=e,i;t[0]===n?i=t[1]:(i=Em({features:n}),t[0]=n,t[1]=i);let a=i,o;t[2]!==a||t[3]!==n?(o={client:a,features:n},t[2]=a,t[3]=n,t[4]=o):o=t[4];let s;return t[5]!==r||t[6]!==o?(s=(0,V.jsx)(Am.Provider,{value:o,children:r}),t[5]=r,t[6]=o,t[7]=s):s=t[7],s}function Mm(){let e=(0,B.useContext)(Am);if(!e.client)throw Error(`useAuth must be used within AuthProvider`);return e}var Nm=t(r(((t,n)=>{var r=e(`fs`),i=e(`url`),a=e(`child_process`).spawn;n.exports=o,o.XMLHttpRequest=o;function o(t){t||={};var n=this,o=e(`http`),s=e(`https`),c,l,u={},d=!1,f={"User-Agent":`node-XMLHttpRequest`,Accept:`*/*`},p=Object.assign({},f),m=[`accept-charset`,`accept-encoding`,`access-control-request-headers`,`access-control-request-method`,`connection`,`content-length`,`content-transfer-encoding`,`cookie`,`cookie2`,`date`,`expect`,`host`,`keep-alive`,`origin`,`referer`,`te`,`trailer`,`transfer-encoding`,`upgrade`,`via`],h=[`TRACE`,`TRACK`,`CONNECT`],g=!1,_=!1,v=!1,y={};this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.readyState=this.UNSENT,this.onreadystatechange=null,this.responseText=``,this.responseXML=``,this.response=Buffer.alloc(0),this.status=null,this.statusText=null;var b=function(e){return d||e&&m.indexOf(e.toLowerCase())===-1},x=function(e){return e&&h.indexOf(e)===-1};this.open=function(e,t,n,r,i){if(this.abort(),_=!1,v=!1,!x(e))throw Error(`SecurityError: Request method not allowed`);u={method:e,url:t.toString(),async:typeof n==`boolean`?n:!0,user:r||null,password:i||null},S(this.OPENED)},this.setDisableHeaderCheck=function(e){d=e},this.setRequestHeader=function(e,t){if(this.readyState!=this.OPENED)throw Error(`INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN`);if(!b(e))return console.warn(`Refused to set unsafe header "`+e+`"`),!1;if(g)throw Error(`INVALID_STATE_ERR: send flag is true`);return p[e]=t,!0},this.getResponseHeader=function(e){return typeof e==`string`&&this.readyState>this.OPENED&&l.headers[e.toLowerCase()]&&!_?l.headers[e.toLowerCase()]:null},this.getAllResponseHeaders=function(){if(this.readyState<this.HEADERS_RECEIVED||_)return``;var e=``;for(var t in l.headers)t!==`set-cookie`&&t!==`set-cookie2`&&(e+=t+`: `+l.headers[t]+`\r
11
+ `);return e.substr(0,e.length-2)},this.getRequestHeader=function(e){return typeof e==`string`&&p[e]?p[e]:``},this.send=function(e){if(this.readyState!=this.OPENED)throw Error(`INVALID_STATE_ERR: connection must be opened before send() is called`);if(g)throw Error(`INVALID_STATE_ERR: send has already been called`);var d=!1,f=!1,m=i.parse(u.url),h;switch(m.protocol){case`https:`:d=!0;case`http:`:h=m.hostname;break;case`file:`:f=!0;break;case void 0:case``:h=`localhost`;break;default:throw Error(`Protocol not supported.`)}if(f){if(u.method!==`GET`)throw Error(`XMLHttpRequest: Only GET method is supported`);if(u.async)r.readFile(unescape(m.pathname),function(e,t){e?n.handleError(e,e.errno||-1):(n.status=200,n.responseText=t.toString(`utf8`),n.response=t,S(n.DONE))});else try{this.response=r.readFileSync(unescape(m.pathname)),this.responseText=this.response.toString(`utf8`),this.status=200,S(n.DONE)}catch(e){this.handleError(e,e.errno||-1)}return}var v=m.port||(d?443:80),y=m.pathname+(m.search?m.search:``);p.Host=h,d&&v===443||v===80||(p.Host+=`:`+m.port),u.user&&(u.password===void 0&&(u.password=``),p.Authorization=`Basic `+new Buffer(u.user+`:`+u.password).toString(`base64`)),u.method===`GET`||u.method===`HEAD`?e=null:e?(p[`Content-Length`]=Buffer.isBuffer(e)?e.length:Buffer.byteLength(e),Object.keys(p).some(function(e){return e.toLowerCase()===`content-type`})||(p[`Content-Type`]=`text/plain;charset=UTF-8`)):u.method===`POST`&&(p[`Content-Length`]=0);var b=t.agent||!1,x={host:h,port:v,path:y,method:u.method,headers:p,agent:b};if(d&&(x.pfx=t.pfx,x.key=t.key,x.passphrase=t.passphrase,x.cert=t.cert,x.ca=t.ca,x.ciphers=t.ciphers,x.rejectUnauthorized=t.rejectUnauthorized!==!1),_=!1,u.async){var C=d?s.request:o.request;g=!0,n.dispatchEvent(`readystatechange`);var w=function(e){if(l=e,l.statusCode===302||l.statusCode===303||l.statusCode===307){u.url=l.headers.location;var r=i.parse(u.url);h=r.hostname;var a={hostname:r.hostname,port:r.port,path:r.path,method:l.statusCode===303?`GET`:u.method,headers:p};d&&(a.pfx=t.pfx,a.key=t.key,a.passphrase=t.passphrase,a.cert=t.cert,a.ca=t.ca,a.ciphers=t.ciphers,a.rejectUnauthorized=t.rejectUnauthorized!==!1),c=C(a,w).on(`error`,T),c.end();return}S(n.HEADERS_RECEIVED),n.status=l.statusCode,l.on(`data`,function(e){if(e){var t=Buffer.from(e);n.response=Buffer.concat([n.response,t])}g&&S(n.LOADING)}),l.on(`end`,function(){g&&(g=!1,S(n.DONE),n.responseText=n.response.toString(`utf8`))}),l.on(`error`,function(e){n.handleError(e)})},T=function(e){if(c.reusedSocket&&e.code===`ECONNRESET`)return C(x,w).on(`error`,T);n.handleError(e)};c=C(x,w).on(`error`,T),t.autoUnref&&c.on(`socket`,e=>{e.unref()}),e&&c.write(e),c.end(),n.dispatchEvent(`loadstart`)}else{var E=`.node-xmlhttprequest-content-`+process.pid,D=`.node-xmlhttprequest-sync-`+process.pid;r.writeFileSync(D,``,`utf8`);for(var O=`var http = require('http'), https = require('https'), fs = require('fs');var doRequest = http`+(d?`s`:``)+`.request;var options = `+JSON.stringify(x)+`;var responseText = '';var responseData = Buffer.alloc(0);var req = doRequest(options, function(response) {response.on('data', function(chunk) { var data = Buffer.from(chunk); responseText += data.toString('utf8'); responseData = Buffer.concat([responseData, data]);});response.on('end', function() {fs.writeFileSync('`+E+`', JSON.stringify({err: null, data: {statusCode: response.statusCode, headers: response.headers, text: responseText, data: responseData.toString('base64')}}), 'utf8');fs.unlinkSync('`+D+`');});response.on('error', function(error) {fs.writeFileSync('`+E+`', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');fs.unlinkSync('`+D+`');});}).on('error', function(error) {fs.writeFileSync('`+E+`', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');fs.unlinkSync('`+D+`');});`+(e?`req.write('`+JSON.stringify(e).slice(1,-1).replace(/'/g,`\\'`)+`');`:``)+`req.end();`,k=a(process.argv[0],[`-e`,O]);r.existsSync(D););if(n.responseText=r.readFileSync(E,`utf8`),k.stdin.end(),r.unlinkSync(E),n.responseText.match(/^NODE-XMLHTTPREQUEST-ERROR:/)){var A=JSON.parse(n.responseText.replace(/^NODE-XMLHTTPREQUEST-ERROR:/,``));n.handleError(A,503)}else{n.status=n.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:([0-9]*),.*/,`$1`);var j=JSON.parse(n.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:[0-9]*,(.*)/,`$1`));l={statusCode:n.status,headers:j.data.headers},n.responseText=j.data.text,n.response=Buffer.from(j.data.data,`base64`),S(n.DONE,!0)}}},this.handleError=function(e,t){this.status=t||0,this.statusText=e,this.responseText=e.stack,_=!0,S(this.DONE)},this.abort=function(){c&&=(c.abort(),null),p=Object.assign({},f),this.responseText=``,this.responseXML=``,this.response=Buffer.alloc(0),_=v=!0,this.readyState!==this.UNSENT&&(this.readyState!==this.OPENED||g)&&this.readyState!==this.DONE&&(g=!1,S(this.DONE)),this.readyState=this.UNSENT},this.addEventListener=function(e,t){e in y||(y[e]=[]),y[e].push(t)},this.removeEventListener=function(e,t){e in y&&(y[e]=y[e].filter(function(e){return e!==t}))},this.dispatchEvent=function(e){if(typeof n[`on`+e]==`function`&&(this.readyState===this.DONE&&u.async?setTimeout(function(){n[`on`+e]()},0):n[`on`+e]()),e in y)for(let t=0,r=y[e].length;t<r;t++)this.readyState===this.DONE?setTimeout(function(){y[e][t].call(n)},0):y[e][t].call(n)};var S=function(e){if(!(n.readyState===e||n.readyState===n.UNSENT&&v)&&(n.readyState=e,(u.async||n.readyState<n.OPENED||n.readyState===n.DONE)&&n.dispatchEvent(`readystatechange`),n.readyState===n.DONE)){let e;e=v?`abort`:_?`error`:`load`,n.dispatchEvent(e),n.dispatchEvent(`loadend`)}}}}))()),Pm=Object.create(null);Pm.open=`0`,Pm.close=`1`,Pm.ping=`2`,Pm.pong=`3`,Pm.message=`4`,Pm.upgrade=`5`,Pm.noop=`6`;var Fm=Object.create(null);Object.keys(Pm).forEach(e=>{Fm[Pm[e]]=e});var Im={type:`error`,data:`parser error`};const Lm=({type:e,data:t},n,r)=>t instanceof ArrayBuffer||ArrayBuffer.isView(t)?r(n?t:`b`+Rm(t,!0).toString(`base64`)):r(Pm[e]+(t||``));var Rm=(e,t)=>Buffer.isBuffer(e)||e instanceof Uint8Array&&!t?e:e instanceof ArrayBuffer?Buffer.from(e):Buffer.from(e.buffer,e.byteOffset,e.byteLength),zm;function Bm(e,t){if(e.data instanceof ArrayBuffer||ArrayBuffer.isView(e.data))return t(Rm(e.data,!1));Lm(e,!0,e=>{zm||=new TextEncoder,t(zm.encode(e))})}const Vm=(e,t)=>{if(typeof e!=`string`)return{type:`message`,data:Hm(e,t)};let n=e.charAt(0);return n===`b`?{type:`message`,data:Hm(Buffer.from(e.substring(1),`base64`),t)}:Fm[n]?e.length>1?{type:Fm[n],data:e.substring(1)}:{type:Fm[n]}:Im};var Hm=(e,t)=>{switch(t){case`arraybuffer`:return e instanceof ArrayBuffer?e:Buffer.isBuffer(e)?e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):e.buffer;case`nodebuffer`:default:return Buffer.isBuffer(e)?e:Buffer.from(e)}},Um=``,Wm=(e,t)=>{let n=e.length,r=Array(n),i=0;e.forEach((e,a)=>{Lm(e,!1,e=>{r[a]=e,++i===n&&t(r.join(Um))})})},Gm=(e,t)=>{let n=e.split(Um),r=[];for(let e=0;e<n.length;e++){let i=Vm(n[e],t);if(r.push(i),i.type===`error`)break}return r};function Km(){return new TransformStream({transform(e,t){Bm(e,n=>{let r=n.length,i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);let e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);let e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!=`string`&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}var qm;function Jm(e){return e.reduce((e,t)=>e+t.length,0)}function Ym(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Xm(e,t){qm||=new TextDecoder;let n=[],r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(r===0){if(Jm(n)<1)break;let e=Ym(n,1);a=(e[0]&128)==128,i=e[0]&127,r=i<126?3:i===126?1:2}else if(r===1){if(Jm(n)<2)break;let e=Ym(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(r===2){if(Jm(n)<8)break;let e=Ym(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),a=t.getUint32(0);if(a>2**21-1){s.enqueue(Im);break}i=a*2**32+t.getUint32(4),r=3}else{if(Jm(n)<i)break;let e=Ym(n,i);s.enqueue(Vm(a?e:qm.decode(e),t)),r=0}if(i===0||i>e){s.enqueue(Im);break}}}})}function Zm(e){if(e)return Qm(e)}function Qm(e){for(var t in Zm.prototype)e[t]=Zm.prototype[t];return e}Zm.prototype.on=Zm.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},Zm.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Zm.prototype.off=Zm.prototype.removeListener=Zm.prototype.removeAllListeners=Zm.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},Zm.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},Zm.prototype.emitReserved=Zm.prototype.emit,Zm.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},Zm.prototype.hasListeners=function(e){return!!this.listeners(e).length};const $m=process.nextTick,eh=global;function th(){return new rh}function nh(e){let t=e.split(`; `),n=t[0].indexOf(`=`);if(n===-1)return;let r=t[0].substring(0,n).trim();if(!r.length)return;let i=t[0].substring(n+1).trim();i.charCodeAt(0)===34&&(i=i.slice(1,-1));let a={name:r,value:i};for(let e=1;e<t.length;e++){let n=t[e].split(`=`);if(n.length!==2)continue;let r=n[0].trim(),i=n[1].trim();switch(r){case`Expires`:a.expires=new Date(i);break;case`Max-Age`:let e=new Date;e.setUTCSeconds(e.getUTCSeconds()+parseInt(i,10)),a.expires=e;break;default:}}return a}var rh=class{constructor(){this._cookies=new Map}parseCookies(e){e&&e.forEach(e=>{let t=nh(e);t&&this._cookies.set(t.name,t)})}get cookies(){let e=Date.now();return this._cookies.forEach((t,n)=>{t.expires?.getTime()<e&&this._cookies.delete(n)}),this._cookies.entries()}addCookies(e){let t=[];for(let[e,n]of this.cookies)t.push(`${e}=${n.value}`);t.length&&(e.setDisableHeaderCheck(!0),e.setRequestHeader(`cookie`,t.join(`; `)))}appendCookies(e){for(let[t,n]of this.cookies)e.append(`cookie`,`${t}=${n.value}`)}};function ih(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}var ah=eh.setTimeout,oh=eh.clearTimeout;function sh(e,t){t.useNativeTimers?(e.setTimeoutFn=ah.bind(eh),e.clearTimeoutFn=oh.bind(eh)):(e.setTimeoutFn=eh.setTimeout.bind(eh),e.clearTimeoutFn=eh.clearTimeout.bind(eh))}var ch=1.33;function lh(e){return typeof e==`string`?uh(e):Math.ceil((e.byteLength||e.size)*ch)}function uh(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function dh(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function fh(e){let t=``;for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+=`&`),t+=encodeURIComponent(n)+`=`+encodeURIComponent(e[n]));return t}function ph(e){let t={},n=e.split(`&`);for(let e=0,r=n.length;e<r;e++){let r=n[e].split(`=`);t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}var mh=r(((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=c,n.disable=a,n.enable=i,n.enabled=o,n.humanize=x(),n.destroy=l,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]}n.selectColor=t;function n(e){let t,i=null,a,o;function s(...e){if(!s.enabled)return;let r=s,i=Number(new Date);r.diff=i-(t||i),r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,`enabled`,{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(t===void 0?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t,r=(typeof e==`string`?e:``).split(/[\s,]+/),i=r.length;for(t=0;t<i;t++)r[t]&&(e=r[t].replace(/\*/g,`.*?`),e[0]===`-`?n.skips.push(RegExp(`^`+e.slice(1)+`$`)):n.names.push(RegExp(`^`+e+`$`)))}function a(){let e=[...n.names.map(s),...n.skips.map(s).map(e=>`-`+e)].join(`,`);return n.enable(``),e}function o(e){if(e[e.length-1]===`*`)return!0;let t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,`*`)}function c(e){return e instanceof Error?e.stack||e.message:e}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n})),hh=r(((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function i(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function a(){let t;try{t=e.storage.getItem(`debug`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t=process.env.DEBUG),t}function o(){try{return localStorage}catch{}}t.exports=mh()(e);var{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}})),gh=r(((t,n)=>{var r=e(`tty`),a=e(`util`);t.init=f,t.log=l,t.formatArgs=s,t.save=u,t.load=d,t.useColors=o,t.destroy=a.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{let e=(C(),i(T));e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}t.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=/^(yes|on|true|enabled)$/i.test(r)?!0:/^(no|off|false|disabled)$/i.test(r)?!1:r===`null`?null:Number(r),e[n]=r,e},{});function o(){return`colors`in t.inspectOpts?!!t.inspectOpts.colors:r.isatty(process.stderr.fd)}function s(e){let{namespace:t,useColors:r}=this;if(r){let r=this.color,i=`\x1B[3`+(r<8?r:`8;5;`+r),a=` ${i};1m${t} \u001B[0m`;e[0]=a+e[0].split(`
12
+ `).join(`
13
+ `+a),e.push(i+`m+`+n.exports.humanize(this.diff)+`\x1B[0m`)}else e[0]=c()+t+` `+e[0]}function c(){return t.inspectOpts.hideDate?``:new Date().toISOString()+` `}function l(...e){return process.stderr.write(a.formatWithOptions(t.inspectOpts,...e)+`
14
+ `)}function u(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function d(){return process.env.DEBUG}function f(e){e.inspectOpts={};let n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]}n.exports=mh()(t);var{formatters:p}=n.exports;p.o=function(e){return this.inspectOpts.colors=this.useColors,a.inspect(e,this.inspectOpts).split(`
15
+ `).map(e=>e.trim()).join(` `)},p.O=function(e){return this.inspectOpts.colors=this.useColors,a.inspect(e,this.inspectOpts)}})),_h=r(((e,t)=>{typeof process>`u`||process.type===`renderer`||process.browser===!0||process.__nwjs?t.exports=hh():t.exports=gh()})),vh=(0,t(_h()).default)(`engine.io-client:transport`),yh=class extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type=`TransportError`}},bh=class extends Zm{constructor(e){super(),this.writable=!1,sh(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved(`error`,new yh(e,t,n)),this}open(){return this.readyState=`opening`,this.doOpen(),this}close(){return(this.readyState===`opening`||this.readyState===`open`)&&(this.doClose(),this.onClose()),this}send(e){this.readyState===`open`?this.write(e):vh(`transport is not open, discarding packets`)}onOpen(){this.readyState=`open`,this.writable=!0,super.emitReserved(`open`)}onData(e){let t=Vm(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved(`packet`,e)}onClose(e){this.readyState=`closed`,super.emitReserved(`close`,e)}pause(e){}createUri(e,t={}){return e+`://`+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(`:`)===-1?e:`[`+e+`]`}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?`:`+this.opts.port:``}_query(e){let t=fh(e);return t.length?`?`+t:``}},xh=(0,t(_h()).default)(`engine.io-client:polling`),Sh=class extends bh{constructor(){super(...arguments),this._polling=!1}get name(){return`polling`}doOpen(){this._poll()}pause(e){this.readyState=`pausing`;let t=()=>{xh(`paused`),this.readyState=`paused`,e()};if(this._polling||!this.writable){let e=0;this._polling&&(xh(`we are currently polling - waiting to pause`),e++,this.once(`pollComplete`,function(){xh(`pre-pause polling complete`),--e||t()})),this.writable||(xh(`we are currently writing - waiting to pause`),e++,this.once(`drain`,function(){xh(`pre-pause writing complete`),--e||t()}))}else t()}_poll(){xh(`polling`),this._polling=!0,this.doPoll(),this.emitReserved(`poll`)}onData(e){xh(`polling got data %s`,e),Gm(e,this.socket.binaryType).forEach(e=>{if(this.readyState===`opening`&&e.type===`open`&&this.onOpen(),e.type===`close`)return this.onClose({description:`transport closed by the server`}),!1;this.onPacket(e)}),this.readyState!==`closed`&&(this._polling=!1,this.emitReserved(`pollComplete`),this.readyState===`open`?this._poll():xh(`ignoring poll - transport state "%s"`,this.readyState))}doClose(){let e=()=>{xh(`writing close packet`),this.write([{type:`close`}])};this.readyState===`open`?(xh(`transport open - closing`),e()):(xh(`transport not open - deferring close`),this.once(`open`,e))}write(e){this.writable=!1,Wm(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved(`drain`)})})}uri(){let e=this.opts.secure?`https`:`http`,t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=dh()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},Ch=!1;try{Ch=typeof XMLHttpRequest<`u`&&`withCredentials`in new XMLHttpRequest}catch{}const wh=Ch;var Th=(0,t(_h()).default)(`engine.io-client:polling`);function Eh(){}var Dh=class extends Sh{constructor(e){if(super(e),typeof location<`u`){let t=location.protocol===`https:`,n=location.port;n||=t?`443`:`80`,this.xd=typeof location<`u`&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:`POST`,data:e});n.on(`success`,t),n.on(`error`,(e,t)=>{this.onError(`xhr post error`,e,t)})}doPoll(){Th(`xhr poll`);let e=this.request();e.on(`data`,this.onData.bind(this)),e.on(`error`,(e,t)=>{this.onError(`xhr poll error`,e,t)}),this.pollXhr=e}},Oh=class e extends Zm{constructor(e,t,n){super(),this.createRequest=e,sh(this,n),this._opts=n,this._method=n.method||`GET`,this._uri=t,this._data=n.data===void 0?null:n.data,this._create()}_create(){var t;let n=ih(this._opts,`agent`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`autoUnref`);n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{Th(`xhr open %s: %s`,this._method,this._uri),r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders)for(let e in r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0),this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}catch{}if(this._method===`POST`)try{r.setRequestHeader(`Content-type`,`text/plain;charset=UTF-8`)}catch{}try{r.setRequestHeader(`Accept`,`*/*`)}catch{}(t=this._opts.cookieJar)==null||t.addCookies(r),`withCredentials`in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;r.readyState===3&&((e=this._opts.cookieJar)==null||e.parseCookies(r.getResponseHeader(`set-cookie`))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status==`number`?r.status:0)},0))},Th(`xhr data %s`,this._data),r.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}typeof document<`u`&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved(`error`,e,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(this._xhr===void 0||this._xhr===null)){if(this._xhr.onreadystatechange=Eh,t)try{this._xhr.abort()}catch{}typeof document<`u`&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved(`data`,e),this.emitReserved(`success`),this._cleanup())}abort(){this._cleanup()}};if(Oh.requestsCount=0,Oh.requests={},typeof document<`u`){if(typeof attachEvent==`function`)attachEvent(`onunload`,kh);else if(typeof addEventListener==`function`){let e=`onpagehide`in eh?`pagehide`:`unload`;addEventListener(e,kh,!1)}}function kh(){for(let e in Oh.requests)Oh.requests.hasOwnProperty(e)&&Oh.requests[e].abort()}(function(){let e=Ah({xdomain:!1});return e&&e.responseType!==null})();function Ah(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<`u`&&(!t||wh))return new XMLHttpRequest}catch{}if(!t)try{return new eh[[`Active`,`Object`].join(`X`)](`Microsoft.XMLHTTP`)}catch{}}var jh=Nm.default||Nm,Mh=class extends Dh{request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.socket?._cookieJar},this.opts),new Oh(e=>new jh(e),this.uri(),e)}},Nh=r(((t,n)=>{var{Duplex:r}=e(`stream`);function i(e){e.emit(`close`)}function a(){!this.destroyed&&this._writableState.finished&&this.destroy()}function o(e){this.removeListener(`error`,o),this.destroy(),this.listenerCount(`error`)===0&&this.emit(`error`,e)}function s(e,t){let n=!0,s=new r({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on(`message`,function(t,n){let r=!n&&s._readableState.objectMode?t.toString():t;s.push(r)||e.pause()}),e.once(`error`,function(e){s.destroyed||(n=!1,s.destroy(e))}),e.once(`close`,function(){s.destroyed||s.push(null)}),s._destroy=function(t,r){if(e.readyState===e.CLOSED){r(t),process.nextTick(i,s);return}let a=!1;e.once(`error`,function(e){a=!0,r(e)}),e.once(`close`,function(){a||r(t),process.nextTick(i,s)}),n&&e.terminate()},s._final=function(t){if(e.readyState===e.CONNECTING){e.once(`open`,function(){s._final(t)});return}e._socket!==null&&(e._socket._writableState.finished?(t(),s._readableState.endEmitted&&s.destroy()):(e._socket.once(`finish`,function(){t()}),e.close()))},s._read=function(){e.isPaused&&e.resume()},s._write=function(t,n,r){if(e.readyState===e.CONNECTING){e.once(`open`,function(){s._write(t,n,r)});return}e.send(t,r)},s.on(`end`,a),s.on(`error`,o),s}n.exports=s})),Ph=r(((e,t)=>{t.exports={BINARY_TYPES:[`nodebuffer`,`arraybuffer`,`fragments`],EMPTY_BUFFER:Buffer.alloc(0),GUID:`258EAFA5-E914-47DA-95CA-C5AB0DC85B11`,kForOnEventAttribute:Symbol(`kIsForOnEventAttribute`),kListener:Symbol(`kListener`),kStatusCode:Symbol(`status-code`),kWebSocket:Symbol(`websocket`),NOOP:()=>{}}})),Fh=n({default:()=>Ih}),Ih,Lh=a((()=>{throw Ih={},Error(`Could not resolve "bufferutil" imported by "ws". Is it installed?`)})),Rh=r(((e,t)=>{var{EMPTY_BUFFER:n}=Ph(),r=Buffer[Symbol.species];function a(e,t){if(e.length===0)return n;if(e.length===1)return e[0];let i=Buffer.allocUnsafe(t),a=0;for(let t=0;t<e.length;t++){let n=e[t];i.set(n,a),a+=n.length}return a<t?new r(i.buffer,i.byteOffset,a):i}function o(e,t,n,r,i){for(let a=0;a<i;a++)n[r+a]=e[a]^t[a&3]}function s(e,t){for(let n=0;n<e.length;n++)e[n]^=t[n&3]}function c(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}function l(e){if(l.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new r(e):ArrayBuffer.isView(e)?t=new r(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),l.readOnly=!1),t}if(t.exports={concat:a,mask:o,toArrayBuffer:c,toBuffer:l,unmask:s},!process.env.WS_NO_BUFFER_UTIL)try{let e=(Lh(),i(Fh));t.exports.mask=function(t,n,r,i,a){a<48?o(t,n,r,i,a):e.mask(t,n,r,i,a)},t.exports.unmask=function(t,n){t.length<32?s(t,n):e.unmask(t,n)}}catch{}})),zh=r(((e,t)=>{var n=Symbol(`kDone`),r=Symbol(`kRun`);t.exports=class{constructor(e){this[n]=()=>{this.pending--,this[r]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[r]()}[r](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[n])}}}})),Bh=r(((t,n)=>{var r=e(`zlib`),i=Rh(),a=zh(),{kStatusCode:o}=Ph(),s=Buffer[Symbol.species],c=Buffer.from([0,0,255,255]),l=Symbol(`permessage-deflate`),u=Symbol(`total-length`),d=Symbol(`callback`),f=Symbol(`buffers`),p=Symbol(`error`),m;n.exports=class{constructor(e,t,n){this._maxPayload=n|0,this._options=e||{},this._threshold=this._options.threshold===void 0?1024:this._options.threshold,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,m||=new a(this._options.concurrencyLimit===void 0?10:this._options.concurrencyLimit)}static get extensionName(){return`permessage-deflate`}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits??(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&=(this._inflate.close(),null),this._deflate){let e=this._deflate[d];this._deflate.close(),this._deflate=null,e&&e(Error(`The deflate stream was closed while data was being processed`))}}acceptAsServer(e){let t=this._options,n=e.find(e=>!(t.serverNoContextTakeover===!1&&e.server_no_context_takeover||e.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits==`number`&&t.serverMaxWindowBits>e.server_max_window_bits)||typeof t.clientMaxWindowBits==`number`&&!e.client_max_window_bits));if(!n)throw Error(`None of the extension offers can be accepted`);return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof t.serverMaxWindowBits==`number`&&(n.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits==`number`?n.client_max_window_bits=t.clientMaxWindowBits:(n.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw Error(`Unexpected parameter "client_no_context_takeover"`);if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits==`number`&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits==`number`&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw Error(`Unexpected or invalid parameter "client_max_window_bits"`);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let n=e[t];if(n.length>1)throw Error(`Parameter "${t}" must have only a single value`);if(n=n[0],t===`client_max_window_bits`){if(n!==!0){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else if(t===`server_max_window_bits`){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(t===`client_no_context_takeover`||t===`server_no_context_takeover`){if(n!==!0)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else throw Error(`Unknown parameter "${t}"`);e[t]=n})}),e}decompress(e,t,n){m.add(r=>{this._decompress(e,t,(e,t)=>{r(),n(e,t)})})}compress(e,t,n){m.add(r=>{this._compress(e,t,(e,t)=>{r(),n(e,t)})})}_decompress(e,t,n){let a=this._isServer?`client`:`server`;if(!this._inflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:r.Z_DEFAULT_WINDOWBITS;this._inflate=r.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[l]=this,this._inflate[u]=0,this._inflate[f]=[],this._inflate.on(`error`,_),this._inflate.on(`data`,g)}this._inflate[d]=n,this._inflate.write(e),t&&this._inflate.write(c),this._inflate.flush(()=>{let e=this._inflate[p];if(e){this._inflate.close(),this._inflate=null,n(e);return}let r=i.concat(this._inflate[f],this._inflate[u]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[u]=0,this._inflate[f]=[],t&&this.params[`${a}_no_context_takeover`]&&this._inflate.reset()),n(null,r)})}_compress(e,t,n){let a=this._isServer?`server`:`client`;if(!this._deflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:r.Z_DEFAULT_WINDOWBITS;this._deflate=r.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[u]=0,this._deflate[f]=[],this._deflate.on(`data`,h)}this._deflate[d]=n,this._deflate.write(e),this._deflate.flush(r.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=i.concat(this._deflate[f],this._deflate[u]);t&&(e=new s(e.buffer,e.byteOffset,e.length-4)),this._deflate[d]=null,this._deflate[u]=0,this._deflate[f]=[],t&&this.params[`${a}_no_context_takeover`]&&this._deflate.reset(),n(null,e)})}};function h(e){this[f].push(e),this[u]+=e.length}function g(e){if(this[u]+=e.length,this[l]._maxPayload<1||this[u]<=this[l]._maxPayload){this[f].push(e);return}this[p]=RangeError(`Max payload size exceeded`),this[p].code=`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`,this[p][o]=1009,this.removeListener(`data`,g),this.reset()}function _(e){this[l]._inflate=null,e[o]=1007,this[d](e)}})),Vh=n({default:()=>Hh}),Hh,Uh=a((()=>{throw Hh={},Error(`Could not resolve "utf-8-validate" imported by "ws". Is it installed?`)})),Wh=r(((t,n)=>{var{isUtf8:r}=e(`buffer`),a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function o(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}function s(e){let t=e.length,n=0;for(;n<t;)if(!(e[n]&128))n++;else if((e[n]&224)==192){if(n+1===t||(e[n+1]&192)!=128||(e[n]&254)==192)return!1;n+=2}else if((e[n]&240)==224){if(n+2>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||e[n]===224&&(e[n+1]&224)==128||e[n]===237&&(e[n+1]&224)==160)return!1;n+=3}else if((e[n]&248)==240){if(n+3>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||(e[n+3]&192)!=128||e[n]===240&&(e[n+1]&240)==128||e[n]===244&&e[n+1]>143||e[n]>244)return!1;n+=4}else return!1;return!0}if(n.exports={isValidStatusCode:o,isValidUTF8:s,tokenChars:a},r)n.exports.isValidUTF8=function(e){return e.length<24?s(e):r(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=(Uh(),i(Vh));n.exports.isValidUTF8=function(t){return t.length<32?s(t):e(t)}}catch{}})),Gh=r(((t,n)=>{var{Writable:r}=e(`stream`),i=Bh(),{BINARY_TYPES:a,EMPTY_BUFFER:o,kStatusCode:s,kWebSocket:c}=Ph(),{concat:l,toArrayBuffer:u,unmask:d}=Rh(),{isValidStatusCode:f,isValidUTF8:p}=Wh(),m=Buffer[Symbol.species],h=0,g=1,_=2,v=3,y=4,b=5,x=6;n.exports=class extends r{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents===void 0?!0:e.allowSynchronousEvents,this._binaryType=e.binaryType||a[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[c]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=h}_write(e,t,n){if(this._opcode===8&&this._state==h)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let t=this._buffers[0];return this._buffers[0]=new m(t.buffer,t.byteOffset+e,t.length-e),new m(t.buffer,t.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new m(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case h:this.getInfo(e);break;case g:this.getPayloadLength16(e);break;case _:this.getPayloadLength64(e);break;case v:this.getMask();break;case y:this.getData(e);break;case b:case x:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if(t[0]&48){e(this.createError(RangeError,`RSV2 and RSV3 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_2_3`));return}let n=(t[0]&64)==64;if(n&&!this._extensions[i.extensionName]){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(this._fin=(t[0]&128)==128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(!this._fragmented){e(this.createError(RangeError,`invalid opcode 0`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){e(this.createError(RangeError,`FIN must be set`,!0,1002,`WS_ERR_EXPECTED_FIN`));return}if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,`WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH`));return}}else{e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)==128,this._isServer){if(!this._masked){e(this.createError(RangeError,`MASK must be set`,!0,1002,`WS_ERR_EXPECTED_MASK`));return}}else if(this._masked){e(this.createError(RangeError,`MASK must be clear`,!0,1002,`WS_ERR_UNEXPECTED_MASK`));return}this._payloadLength===126?this._state=g:this._payloadLength===127?this._state=_:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),n=t.readUInt32BE(0);if(n>2**21-1){e(this.createError(RangeError,`Unsupported WebSocket frame: payload length > 2^53 - 1`,!1,1009,`WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH`));return}this._payloadLength=n*2**32+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){e(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`));return}this._masked?this._state=v:this._state=y}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=y}getData(e){let t=o;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&d(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=b,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[i.extensionName].decompress(e,this._fin,(e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){t(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`));return}this._fragments.push(n)}this.dataMessage(t),this._state===h&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=h;return}let t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;r=this._binaryType===`nodebuffer`?l(n,t):this._binaryType===`arraybuffer`?u(l(n,t)):n,this._allowSynchronousEvents?(this.emit(`message`,r,!0),this._state=h):(this._state=x,setImmediate(()=>{this.emit(`message`,r,!0),this._state=h,this.startLoop(e)}))}else{let r=l(n,t);if(!this._skipUTF8Validation&&!p(r)){e(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._state===b||this._allowSynchronousEvents?(this.emit(`message`,r,!1),this._state=h):(this._state=x,setImmediate(()=>{this.emit(`message`,r,!1),this._state=h,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit(`conclude`,1005,o),this.end();else{let n=e.readUInt16BE(0);if(!f(n)){t(this.createError(RangeError,`invalid status code ${n}`,!0,1002,`WS_ERR_INVALID_CLOSE_CODE`));return}let r=new m(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!p(r)){t(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._loop=!1,this.emit(`conclude`,n,r),this.end()}this._state=h;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?`ping`:`pong`,e),this._state=h):(this._state=x,setImmediate(()=>{this.emit(this._opcode===9?`ping`:`pong`,e),this._state=h,this.startLoop(t)}))}createError(e,t,n,r,i){this._loop=!1,this._errored=!0;let a=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,this.createError),a.code=i,a[s]=r,a}}})),Kh=r(((t,n)=>{var{Duplex:r}=e(`stream`),{randomFillSync:i}=e(`crypto`),a=Bh(),{EMPTY_BUFFER:o}=Ph(),{isValidStatusCode:s}=Wh(),{mask:c,toBuffer:l}=Rh(),u=Symbol(`kByteLength`),d=Buffer.alloc(4),f=8*1024,p,m=f;n.exports=class e{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){let n,r=!1,a=2,o=!1;t.mask&&(n=t.maskBuffer||d,t.generateMask?t.generateMask(n):(m===f&&(p===void 0&&(p=Buffer.alloc(f)),i(p,0,f),m=0),n[0]=p[m++],n[1]=p[m++],n[2]=p[m++],n[3]=p[m++]),o=(n[0]|n[1]|n[2]|n[3])===0,a=6);let s;typeof e==`string`?(!t.mask||o)&&t[u]!==void 0?s=t[u]:(e=Buffer.from(e),s=e.length):(s=e.length,r=t.mask&&t.readOnly&&!o);let l=s;s>=65536?(a+=8,l=127):s>125&&(a+=2,l=126);let h=Buffer.allocUnsafe(r?s+a:a);return h[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(h[0]|=64),h[1]=l,l===126?h.writeUInt16BE(s,2):l===127&&(h[2]=h[3]=0,h.writeUIntBE(s,4,6)),!t.mask||(h[1]|=128,h[a-4]=n[0],h[a-3]=n[1],h[a-2]=n[2],h[a-1]=n[3],o)?[h,e]:r?(c(e,n,h,a,s),[h]):(c(e,n,e,0,s),[h,e])}close(t,n,r,i){let a;if(t===void 0)a=o;else if(typeof t!=`number`||!s(t))throw TypeError(`First argument must be a valid error code number`);else if(n===void 0||!n.length)a=Buffer.allocUnsafe(2),a.writeUInt16BE(t,0);else{let e=Buffer.byteLength(n);if(e>123)throw RangeError(`The message must not be greater than 123 bytes`);a=Buffer.allocUnsafe(2+e),a.writeUInt16BE(t,0),typeof n==`string`?a.write(n,2):a.set(n,2)}let c={[u]:a.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,a,!1,c,i]):this.sendFrame(e.frame(a,c),i)}ping(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):(t=l(t),i=t.length,a=l.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[u]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,o,r]):this.sendFrame(e.frame(t,o),r)}pong(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):(t=l(t),i=t.length,a=l.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[u]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,o,r]):this.sendFrame(e.frame(t,o),r)}send(t,n,r){let i=this._extensions[a.extensionName],o=n.binary?2:1,s=n.compress,c,d;if(typeof t==`string`?(c=Buffer.byteLength(t),d=!1):(t=l(t),c=t.length,d=l.readOnly),this._firstFragment?(this._firstFragment=!1,s&&i&&i.params[i._isServer?`server_no_context_takeover`:`client_no_context_takeover`]&&(s=c>=i._threshold),this._compress=s):(s=!1,o=0),n.fin&&(this._firstFragment=!0),i){let e={[u]:c,fin:n.fin,generateMask:this._generateMask,mask:n.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:d,rsv1:s};this._deflating?this.enqueue([this.dispatch,t,this._compress,e,r]):this.dispatch(t,this._compress,e,r)}else this.sendFrame(e.frame(t,{[u]:c,fin:n.fin,generateMask:this._generateMask,mask:n.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:d,rsv1:!1}),r)}dispatch(t,n,r,i){if(!n){this.sendFrame(e.frame(t,r),i);return}let o=this._extensions[a.extensionName];this._bufferedBytes+=r[u],this._deflating=!0,o.compress(t,r.fin,(t,n)=>{if(this._socket.destroyed){let e=Error(`The socket was closed while data was being compressed`);typeof i==`function`&&i(e);for(let t=0;t<this._queue.length;t++){let n=this._queue[t],r=n[n.length-1];typeof r==`function`&&r(e)}return}this._bufferedBytes-=r[u],this._deflating=!1,r.readOnly=!1,this.sendFrame(e.frame(n,r),i),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][u],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][u],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}}})),qh=r(((e,t)=>{var{kForOnEventAttribute:n,kListener:r}=Ph(),i=Symbol(`kCode`),a=Symbol(`kData`),o=Symbol(`kError`),s=Symbol(`kMessage`),c=Symbol(`kReason`),l=Symbol(`kTarget`),u=Symbol(`kType`),d=Symbol(`kWasClean`),f=class{constructor(e){this[l]=null,this[u]=e}get target(){return this[l]}get type(){return this[u]}};Object.defineProperty(f.prototype,`target`,{enumerable:!0}),Object.defineProperty(f.prototype,`type`,{enumerable:!0});var p=class extends f{constructor(e,t={}){super(e),this[i]=t.code===void 0?0:t.code,this[c]=t.reason===void 0?``:t.reason,this[d]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[i]}get reason(){return this[c]}get wasClean(){return this[d]}};Object.defineProperty(p.prototype,`code`,{enumerable:!0}),Object.defineProperty(p.prototype,`reason`,{enumerable:!0}),Object.defineProperty(p.prototype,`wasClean`,{enumerable:!0});var m=class extends f{constructor(e,t={}){super(e),this[o]=t.error===void 0?null:t.error,this[s]=t.message===void 0?``:t.message}get error(){return this[o]}get message(){return this[s]}};Object.defineProperty(m.prototype,`error`,{enumerable:!0}),Object.defineProperty(m.prototype,`message`,{enumerable:!0});var h=class extends f{constructor(e,t={}){super(e),this[a]=t.data===void 0?null:t.data}get data(){return this[a]}};Object.defineProperty(h.prototype,`data`,{enumerable:!0}),t.exports={CloseEvent:p,ErrorEvent:m,Event:f,EventTarget:{addEventListener(e,t,i={}){for(let a of this.listeners(e))if(!i[n]&&a[r]===t&&!a[n])return;let a;if(e===`message`)a=function(e,n){let r=new h(`message`,{data:n?e:e.toString()});r[l]=this,g(t,this,r)};else if(e===`close`)a=function(e,n){let r=new p(`close`,{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[l]=this,g(t,this,r)};else if(e===`error`)a=function(e){let n=new m(`error`,{error:e,message:e.message});n[l]=this,g(t,this,n)};else if(e===`open`)a=function(){let e=new f(`open`);e[l]=this,g(t,this,e)};else return;a[n]=!!i[n],a[r]=t,i.once?this.once(e,a):this.on(e,a)},removeEventListener(e,t){for(let i of this.listeners(e))if(i[r]===t&&!i[n]){this.removeListener(e,i);break}}},MessageEvent:h};function g(e,t,n){typeof e==`object`&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}})),Jh=r(((e,t)=>{var{tokenChars:n}=Wh();function r(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}function i(e){let t=Object.create(null),i=Object.create(null),a=!1,o=!1,s=!1,c,l,u=-1,d=-1,f=-1,p=0;for(;p<e.length;p++)if(d=e.charCodeAt(p),c===void 0)if(f===-1&&n[d]===1)u===-1&&(u=p);else if(p!==0&&(d===32||d===9))f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);d===44?(r(t,n,i),i=Object.create(null)):c=n,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`);else if(l===void 0)if(f===-1&&n[d]===1)u===-1&&(u=p);else if(d===32||d===9)f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p),r(i,e.slice(u,f),!0),d===44&&(r(t,c,i),i=Object.create(null),c=void 0),u=f=-1}else if(d===61&&u!==-1&&f===-1)l=e.slice(u,p),u=f=-1;else throw SyntaxError(`Unexpected character at index ${p}`);else if(o){if(n[d]!==1)throw SyntaxError(`Unexpected character at index ${p}`);u===-1?u=p:a||=!0,o=!1}else if(s)if(n[d]===1)u===-1&&(u=p);else if(d===34&&u!==-1)s=!1,f=p;else if(d===92)o=!0;else throw SyntaxError(`Unexpected character at index ${p}`);else if(d===34&&e.charCodeAt(p-1)===61)s=!0;else if(f===-1&&n[d]===1)u===-1&&(u=p);else if(u!==-1&&(d===32||d===9))f===-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);a&&=(n=n.replace(/\\/g,``),!1),r(i,l,n),d===44&&(r(t,c,i),i=Object.create(null),c=void 0),l=void 0,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`);if(u===-1||s||d===32||d===9)throw SyntaxError(`Unexpected end of input`);f===-1&&(f=p);let m=e.slice(u,f);return c===void 0?r(t,m,i):(l===void 0?r(i,m,!0):a?r(i,l,m.replace(/\\/g,``)):r(i,l,m),r(t,c,i)),t}function a(e){return Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>[t].concat(Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>e===!0?t:`${t}=${e}`).join(`; `)})).join(`; `)).join(`, `)}).join(`, `)}t.exports={format:a,parse:i}})),Yh=r(((t,n)=>{var r=e(`events`),i=e(`https`),a=e(`http`),o=e(`net`),s=e(`tls`),{randomBytes:c,createHash:l}=e(`crypto`),{Duplex:u,Readable:d}=e(`stream`),{URL:f}=e(`url`),p=Bh(),m=Gh(),h=Kh(),{BINARY_TYPES:g,EMPTY_BUFFER:_,GUID:v,kForOnEventAttribute:y,kListener:b,kStatusCode:x,kWebSocket:S,NOOP:C}=Ph(),{EventTarget:{addEventListener:w,removeEventListener:T}}=qh(),{format:E,parse:D}=Jh(),{toBuffer:O}=Rh(),k=30*1e3,A=Symbol(`kAborted`),j=[8,13],M=[`CONNECTING`,`OPEN`,`CLOSING`,`CLOSED`],N=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,P=class e extends r{constructor(t,n,r){super(),this._binaryType=g[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=_,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol=``,this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t===null?(this._autoPong=r.autoPong,this._isServer=!0):(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,n===void 0?n=[]:Array.isArray(n)||(typeof n==`object`&&n?(r=n,n=[]):n=[n]),F(this,t,n,r))}get binaryType(){return this._binaryType}set binaryType(e){g.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,n,r){let i=new m({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation});this._sender=new h(t,this._extensions,r.generateMask),this._receiver=i,this._socket=t,i[S]=this,t[S]=this,i.on(`conclude`,re),i.on(`drain`,ie),i.on(`error`,ae),i.on(`message`,se),i.on(`ping`,ce),i.on(`pong`,le),t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),n.length>0&&t.unshift(n),t.on(`close`,de),t.on(`data`,fe),t.on(`end`,pe),t.on(`error`,me),this._readyState=e.OPEN,this.emit(`open`)}emitClose(){if(!this._socket){this._readyState=e.CLOSED,this.emit(`close`,this._closeCode,this._closeMessage);return}this._extensions[p.extensionName]&&this._extensions[p.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit(`close`,this._closeCode,this._closeMessage)}close(t,n){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){te(this,this._req,`WebSocket was closed before the connection was established`);return}if(this.readyState===e.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=e.CLOSING,this._sender.close(t,n,!this._isServer,e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),k)}}pause(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof t==`function`?(r=t,t=n=void 0):typeof n==`function`&&(r=n,n=void 0),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){ne(this,t,r);return}n===void 0&&(n=!this._isServer),this._sender.ping(t||_,n,r)}pong(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof t==`function`?(r=t,t=n=void 0):typeof n==`function`&&(r=n,n=void 0),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){ne(this,t,r);return}n===void 0&&(n=!this._isServer),this._sender.pong(t||_,n,r)}resume(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof n==`function`&&(r=n,n={}),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){ne(this,t,r);return}let i={binary:typeof t!=`string`,mask:!this._isServer,compress:!0,fin:!0,...n};this._extensions[p.extensionName]||(i.compress=!1),this._sender.send(t||_,i,r)}terminate(){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){te(this,this._req,`WebSocket was closed before the connection was established`);return}this._socket&&(this._readyState=e.CLOSING,this._socket.destroy())}}};Object.defineProperty(P,`CONNECTING`,{enumerable:!0,value:M.indexOf(`CONNECTING`)}),Object.defineProperty(P.prototype,`CONNECTING`,{enumerable:!0,value:M.indexOf(`CONNECTING`)}),Object.defineProperty(P,`OPEN`,{enumerable:!0,value:M.indexOf(`OPEN`)}),Object.defineProperty(P.prototype,`OPEN`,{enumerable:!0,value:M.indexOf(`OPEN`)}),Object.defineProperty(P,`CLOSING`,{enumerable:!0,value:M.indexOf(`CLOSING`)}),Object.defineProperty(P.prototype,`CLOSING`,{enumerable:!0,value:M.indexOf(`CLOSING`)}),Object.defineProperty(P,`CLOSED`,{enumerable:!0,value:M.indexOf(`CLOSED`)}),Object.defineProperty(P.prototype,`CLOSED`,{enumerable:!0,value:M.indexOf(`CLOSED`)}),[`binaryType`,`bufferedAmount`,`extensions`,`isPaused`,`protocol`,`readyState`,`url`].forEach(e=>{Object.defineProperty(P.prototype,e,{enumerable:!0})}),[`open`,`error`,`close`,`message`].forEach(e=>{Object.defineProperty(P.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[y])return t[b];return null},set(t){for(let t of this.listeners(e))if(t[y]){this.removeListener(e,t);break}typeof t==`function`&&this.addEventListener(e,t,{[y]:!0})}})}),P.prototype.addEventListener=w,P.prototype.removeEventListener=T,n.exports=P;function F(e,t,n,r){let o={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:j[1],maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:`GET`,host:void 0,path:void 0,port:void 0};if(e._autoPong=o.autoPong,!j.includes(o.protocolVersion))throw RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${j.join(`, `)})`);let s;if(t instanceof f)s=t;else try{s=new f(t)}catch{throw SyntaxError(`Invalid URL: ${t}`)}s.protocol===`http:`?s.protocol=`ws:`:s.protocol===`https:`&&(s.protocol=`wss:`),e._url=s.href;let u=s.protocol===`wss:`,d=s.protocol===`ws+unix:`,m;if(s.protocol!==`ws:`&&!u&&!d?m=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:d&&!s.pathname?m=`The URL's pathname is empty`:s.hash&&(m=`The URL contains a fragment identifier`),m){let t=SyntaxError(m);if(e._redirects===0)throw t;I(e,t);return}let h=u?443:80,g=c(16).toString(`base64`),_=u?i.request:a.request,y=new Set,b;if(o.createConnection=o.createConnection||(u?L:ee),o.defaultPort=o.defaultPort||h,o.port=s.port||h,o.host=s.hostname.startsWith(`[`)?s.hostname.slice(1,-1):s.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":g,Connection:`Upgrade`,Upgrade:`websocket`},o.path=s.pathname+s.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(b=new p(o.perMessageDeflate===!0?{}:o.perMessageDeflate,!1,o.maxPayload),o.headers[`Sec-WebSocket-Extensions`]=E({[p.extensionName]:b.offer()})),n.length){for(let e of n){if(typeof e!=`string`||!N.test(e)||y.has(e))throw SyntaxError(`An invalid or duplicated subprotocol was specified`);y.add(e)}o.headers[`Sec-WebSocket-Protocol`]=n.join(`,`)}if(o.origin&&(o.protocolVersion<13?o.headers[`Sec-WebSocket-Origin`]=o.origin:o.headers.Origin=o.origin),(s.username||s.password)&&(o.auth=`${s.username}:${s.password}`),d){let e=o.path.split(`:`);o.socketPath=e[0],o.path=e[1]}let x;if(o.followRedirects){if(e._redirects===0){e._originalIpc=d,e._originalSecure=u,e._originalHostOrSocketPath=d?o.socketPath:s.host;let t=r&&r.headers;if(r={...r,headers:{}},t)for(let[e,n]of Object.entries(t))r.headers[e.toLowerCase()]=n}else if(e.listenerCount(`redirect`)===0){let t=d?e._originalIpc?o.socketPath===e._originalHostOrSocketPath:!1:e._originalIpc?!1:s.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!u)&&(delete o.headers.authorization,delete o.headers.cookie,t||delete o.headers.host,o.auth=void 0)}o.auth&&!r.headers.authorization&&(r.headers.authorization=`Basic `+Buffer.from(o.auth).toString(`base64`)),x=e._req=_(o),e._redirects&&e.emit(`redirect`,e.url,x)}else x=e._req=_(o);o.timeout&&x.on(`timeout`,()=>{te(e,x,`Opening handshake has timed out`)}),x.on(`error`,t=>{x===null||x[A]||(x=e._req=null,I(e,t))}),x.on(`response`,i=>{let a=i.headers.location,s=i.statusCode;if(a&&o.followRedirects&&s>=300&&s<400){if(++e._redirects>o.maxRedirects){te(e,x,`Maximum redirects exceeded`);return}x.abort();let i;try{i=new f(a,t)}catch{I(e,SyntaxError(`Invalid URL: ${a}`));return}F(e,i,n,r)}else e.emit(`unexpected-response`,x,i)||te(e,x,`Unexpected server response: ${i.statusCode}`)}),x.on(`upgrade`,(t,n,r)=>{if(e.emit(`upgrade`,t),e.readyState!==P.CONNECTING)return;x=e._req=null;let i=t.headers.upgrade;if(i===void 0||i.toLowerCase()!==`websocket`){te(e,n,`Invalid Upgrade header`);return}let a=l(`sha1`).update(g+v).digest(`base64`);if(t.headers[`sec-websocket-accept`]!==a){te(e,n,`Invalid Sec-WebSocket-Accept header`);return}let s=t.headers[`sec-websocket-protocol`],c;if(s===void 0?y.size&&(c=`Server sent no subprotocol`):y.size?y.has(s)||(c=`Server sent an invalid subprotocol`):c=`Server sent a subprotocol but none was requested`,c){te(e,n,c);return}s&&(e._protocol=s);let u=t.headers[`sec-websocket-extensions`];if(u!==void 0){if(!b){te(e,n,`Server sent a Sec-WebSocket-Extensions header but no extension was requested`);return}let t;try{t=D(u)}catch{te(e,n,`Invalid Sec-WebSocket-Extensions header`);return}let r=Object.keys(t);if(r.length!==1||r[0]!==p.extensionName){te(e,n,`Server indicated an extension that was not requested`);return}try{b.accept(t[p.extensionName])}catch{te(e,n,`Invalid Sec-WebSocket-Extensions header`);return}e._extensions[p.extensionName]=b}e.setSocket(n,r,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})}),o.finishRequest?o.finishRequest(x,e):x.end()}function I(e,t){e._readyState=P.CLOSING,e.emit(`error`,t),e.emitClose()}function ee(e){return e.path=e.socketPath,o.connect(e)}function L(e){return e.path=void 0,!e.servername&&e.servername!==``&&(e.servername=o.isIP(e.host)?``:e.host),s.connect(e)}function te(e,t,n){e._readyState=P.CLOSING;let r=Error(n);Error.captureStackTrace(r,te),t.setHeader?(t[A]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(I,e,r)):(t.destroy(r),t.once(`error`,e.emit.bind(e,`error`)),t.once(`close`,e.emitClose.bind(e)))}function ne(e,t,n){if(t){let n=O(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){let t=Error(`WebSocket is not open: readyState ${e.readyState} (${M[e.readyState]})`);process.nextTick(n,t)}}function re(e,t){let n=this[S];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,n._socket[S]!==void 0&&(n._socket.removeListener(`data`,fe),process.nextTick(ue,n._socket),e===1005?n.close():n.close(e,t))}function ie(){let e=this[S];e.isPaused||e._socket.resume()}function ae(e){let t=this[S];t._socket[S]!==void 0&&(t._socket.removeListener(`data`,fe),process.nextTick(ue,t._socket),t.close(e[x])),t.emit(`error`,e)}function oe(){this[S].emitClose()}function se(e,t){this[S].emit(`message`,e,t)}function ce(e){let t=this[S];t._autoPong&&t.pong(e,!this._isServer,C),t.emit(`ping`,e)}function le(e){this[S].emit(`pong`,e)}function ue(e){e.resume()}function de(){let e=this[S];this.removeListener(`close`,de),this.removeListener(`data`,fe),this.removeListener(`end`,pe),e._readyState=P.CLOSING;let t;!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&(t=e._socket.read())!==null&&e._receiver.write(t),e._receiver.end(),this[S]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on(`error`,oe),e._receiver.on(`finish`,oe))}function fe(e){this[S]._receiver.write(e)||this.pause()}function pe(){let e=this[S];e._readyState=P.CLOSING,e._receiver.end(),this.end()}function me(){let e=this[S];this.removeListener(`error`,me),this.on(`error`,C),e&&(e._readyState=P.CLOSING,this.destroy())}})),Xh=r(((e,t)=>{var{tokenChars:n}=Wh();function r(e){let t=new Set,r=-1,i=-1,a=0;for(;a<e.length;a++){let o=e.charCodeAt(a);if(i===-1&&n[o]===1)r===-1&&(r=a);else if(a!==0&&(o===32||o===9))i===-1&&r!==-1&&(i=a);else if(o===44){if(r===-1)throw SyntaxError(`Unexpected character at index ${a}`);i===-1&&(i=a);let n=e.slice(r,i);if(t.has(n))throw SyntaxError(`The "${n}" subprotocol is duplicated`);t.add(n),r=i=-1}else throw SyntaxError(`Unexpected character at index ${a}`)}if(r===-1||i!==-1)throw SyntaxError(`Unexpected end of input`);let o=e.slice(r,a);if(t.has(o))throw SyntaxError(`The "${o}" subprotocol is duplicated`);return t.add(o),t}t.exports={parse:r}})),Zh=r(((t,n)=>{var r=e(`events`),i=e(`http`),{Duplex:a}=e(`stream`),{createHash:o}=e(`crypto`),s=Jh(),c=Bh(),l=Xh(),u=Yh(),{GUID:d,kWebSocket:f}=Ph(),p=/^[+/0-9A-Za-z]{22}==$/,m=0,h=1,g=2;n.exports=class extends r{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:u,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw TypeError(`One and only one of the "port", "server", or "noServer" options must be specified`);if(e.port==null?e.server&&(this._server=e.server):(this._server=i.createServer((e,t)=>{let n=i.STATUS_CODES[426];t.writeHead(426,{"Content-Length":n.length,"Content-Type":`text/plain`}),t.end(n)}),this._server.listen(e.port,e.host,e.backlog,t)),this._server){let e=this.emit.bind(this,`connection`);this._removeListeners=_(this._server,{listening:this.emit.bind(this,`listening`),error:this.emit.bind(this,`error`),upgrade:(t,n,r)=>{this.handleUpgrade(t,n,r,e)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=m}address(){if(this.options.noServer)throw Error(`The server is operating in "noServer" mode`);return this._server?this._server.address():null}close(e){if(this._state===g){e&&this.once(`close`,()=>{e(Error(`The server is not running`))}),process.nextTick(v,this);return}if(e&&this.once(`close`,e),this._state!==h)if(this._state=h,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(v,this);else{let e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close(()=>{v(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf(`?`);if((t===-1?e.url:e.url.slice(0,t))!==this.options.path)return!1}return!0}handleUpgrade(e,t,n,r){t.on(`error`,y);let i=e.headers[`sec-websocket-key`],a=e.headers.upgrade,o=+e.headers[`sec-websocket-version`];if(e.method!==`GET`){x(this,e,t,405,`Invalid HTTP method`);return}if(a===void 0||a.toLowerCase()!==`websocket`){x(this,e,t,400,`Invalid Upgrade header`);return}if(i===void 0||!p.test(i)){x(this,e,t,400,`Missing or invalid Sec-WebSocket-Key header`);return}if(o!==8&&o!==13){x(this,e,t,400,`Missing or invalid Sec-WebSocket-Version header`);return}if(!this.shouldHandle(e)){b(t,400);return}let u=e.headers[`sec-websocket-protocol`],d=new Set;if(u!==void 0)try{d=l.parse(u)}catch{x(this,e,t,400,`Invalid Sec-WebSocket-Protocol header`);return}let f=e.headers[`sec-websocket-extensions`],m={};if(this.options.perMessageDeflate&&f!==void 0){let n=new c(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let e=s.parse(f);e[c.extensionName]&&(n.accept(e[c.extensionName]),m[c.extensionName]=n)}catch{x(this,e,t,400,`Invalid or unacceptable Sec-WebSocket-Extensions header`);return}}if(this.options.verifyClient){let a={origin:e.headers[`${o===8?`sec-websocket-origin`:`origin`}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(a,(a,o,s,c)=>{if(!a)return b(t,o||401,s,c);this.completeUpgrade(m,i,d,e,t,n,r)});return}if(!this.options.verifyClient(a))return b(t,401)}this.completeUpgrade(m,i,d,e,t,n,r)}completeUpgrade(e,t,n,r,i,a,l){if(!i.readable||!i.writable)return i.destroy();if(i[f])throw Error(`server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration`);if(this._state>m)return b(i,503);let u=[`HTTP/1.1 101 Switching Protocols`,`Upgrade: websocket`,`Connection: Upgrade`,`Sec-WebSocket-Accept: ${o(`sha1`).update(t+d).digest(`base64`)}`],p=new this.options.WebSocket(null,void 0,this.options);if(n.size){let e=this.options.handleProtocols?this.options.handleProtocols(n,r):n.values().next().value;e&&(u.push(`Sec-WebSocket-Protocol: ${e}`),p._protocol=e)}if(e[c.extensionName]){let t=e[c.extensionName].params,n=s.format({[c.extensionName]:[t]});u.push(`Sec-WebSocket-Extensions: ${n}`),p._extensions=e}this.emit(`headers`,u,r),i.write(u.concat(`\r
16
+ `).join(`\r
17
+ `)),i.removeListener(`error`,y),p.setSocket(i,a,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(p),p.on(`close`,()=>{this.clients.delete(p),this._shouldEmitClose&&!this.clients.size&&process.nextTick(v,this)})),l(p,r)}};function _(e,t){for(let n of Object.keys(t))e.on(n,t[n]);return function(){for(let n of Object.keys(t))e.removeListener(n,t[n])}}function v(e){e._state=g,e.emit(`close`)}function y(){this.destroy()}function b(e,t,n,r){n||=i.STATUS_CODES[t],r={Connection:`close`,"Content-Type":`text/html`,"Content-Length":Buffer.byteLength(n),...r},e.once(`finish`,e.destroy),e.end(`HTTP/1.1 ${t} ${i.STATUS_CODES[t]}\r\n`+Object.keys(r).map(e=>`${e}: ${r[e]}`).join(`\r
18
+ `)+`\r
19
+ \r
20
+ `+n)}function x(e,t,n,r,i){if(e.listenerCount(`wsClientError`)){let r=Error(i);Error.captureStackTrace(r,x),e.emit(`wsClientError`,r,n,t)}else b(n,r,i)}}));Nh(),Gh(),Kh();var Qh=t(Yh(),1);Zh();var $h=(0,t(_h()).default)(`engine.io-client:websocket`),eg=typeof navigator<`u`&&typeof navigator.product==`string`&&navigator.product.toLowerCase()===`reactnative`,tg=class extends bh{get name(){return`websocket`}doOpen(){let e=this.uri(),t=this.opts.protocols,n=eg?{}:ih(this.opts,`agent`,`perMessageDeflate`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`localAddress`,`protocolVersion`,`origin`,`maxPayload`,`family`,`checkServerIdentity`);this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved(`error`,e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:`websocket connection closed`,context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError(`websocket error`,e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;Lm(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch{$h(`websocket closed before onclose event`)}r&&$m(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){this.ws!==void 0&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?`wss`:`ws`,t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=dh()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}};eh.WebSocket||eh.MozWebSocket;var ng=class extends tg{createSocket(e,t,n){if(this.socket?._cookieJar){n.headers=n.headers||{},n.headers.cookie=typeof n.headers.cookie==`string`?[n.headers.cookie]:n.headers.cookie||[];for(let[e,t]of this.socket._cookieJar.cookies)n.headers.cookie.push(`${e}=${t.value}`)}return new Qh.default(e,t,n)}doWrite(e,t){let n={};e.options&&(n.compress=e.options.compress),this.opts.perMessageDeflate&&(typeof t==`string`?Buffer.byteLength(t):t.length)<this.opts.perMessageDeflate.threshold&&(n.compress=!1),this.ws.send(t,n)}},rg=(0,t(_h()).default)(`engine.io-client:webtransport`);const ig={websocket:ng,webtransport:class extends bh{get name(){return`webtransport`}doOpen(){try{this._transport=new WebTransport(this.createUri(`https`),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved(`error`,e)}this._transport.closed.then(()=>{rg(`transport closed gracefully`),this.onClose()}).catch(e=>{rg(`transport closed due to %s`,e),this.onError(`webtransport error`,e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=Xm(2**53-1,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=Km();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let i=()=>{n.read().then(({done:e,value:t})=>{if(e){rg(`session is closed`);return}rg(`received chunk: %o`,t),this.onPacket(t),i()}).catch(e=>{rg(`an error occurred while reading: %s`,e)})};i();let a={type:`open`};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&$m(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)==null||e.close()}},polling:Mh};var ag=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,og=[`source`,`protocol`,`authority`,`userInfo`,`user`,`password`,`host`,`port`,`relative`,`path`,`directory`,`file`,`query`,`anchor`];function sg(e){if(e.length>8e3)throw`URI too long`;let t=e,n=e.indexOf(`[`),r=e.indexOf(`]`);n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,`;`)+e.substring(r,e.length));let i=ag.exec(e||``),a={},o=14;for(;o--;)a[og[o]]=i[o]||``;return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,`:`),a.authority=a.authority.replace(`[`,``).replace(`]`,``).replace(/;/g,`:`),a.ipv6uri=!0),a.pathNames=cg(a,a.path),a.queryKey=lg(a,a.query),a}function cg(e,t){let n=t.replace(/\/{2,9}/g,`/`).split(`/`);return(t.slice(0,1)==`/`||t.length===0)&&n.splice(0,1),t.slice(-1)==`/`&&n.splice(n.length-1,1),n}function lg(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}var ug=(0,t(_h()).default)(`engine.io-client:socket`),dg=typeof addEventListener==`function`&&typeof removeEventListener==`function`,fg=[];dg&&addEventListener(`offline`,()=>{ug(`closing %d connection(s) because the network was lost`,fg.length),fg.forEach(e=>e())},!1);var pg=class e extends Zm{constructor(e,t){if(super(),this.binaryType=`nodebuffer`,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e==`object`&&(t=e,e=null),e){let n=sg(e);t.hostname=n.host,t.secure=n.protocol===`https`||n.protocol===`wss`,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=sg(t.host).host);sh(this,t),this.secure=t.secure==null?typeof location<`u`&&location.protocol===`https:`:t.secure,t.hostname&&!t.port&&(t.port=this.secure?`443`:`80`),this.hostname=t.hostname||(typeof location<`u`?location.hostname:`localhost`),this.port=t.port||(typeof location<`u`&&location.port?location.port:this.secure?`443`:`80`),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:`/engine.io`,agent:!1,withCredentials:!1,upgrade:!0,timestampParam:`t`,rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,``)+(this.opts.addTrailingSlash?`/`:``),typeof this.opts.query==`string`&&(this.opts.query=ph(this.opts.query)),dg&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(`beforeunload`,this._beforeunloadEventListener,!1)),this.hostname!==`localhost`&&(ug(`adding listener for the 'offline' event`),this._offlineEventListener=()=>{this._onClose(`transport close`,{description:`network connection lost`})},fg.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=th()),this._open()}createTransport(e){ug(`creating transport "%s"`,e);let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return ug(`options: %j`,n),new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved(`error`,`No transports available`)},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf(`websocket`)!==-1?`websocket`:this.transports[0];this.readyState=`opening`;let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(e){ug(`setting transport %s`,e.name),this.transport&&(ug(`clearing existing transport %s`,this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on(`drain`,this._onDrain.bind(this)).on(`packet`,this._onPacket.bind(this)).on(`error`,this._onError.bind(this)).on(`close`,e=>this._onClose(`transport close`,e))}onOpen(){ug(`socket open`),this.readyState=`open`,e.priorWebsocketSuccess=this.transport.name===`websocket`,this.emitReserved(`open`),this.flush()}_onPacket(e){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`)switch(ug(`socket receive: type "%s", data "%s"`,e.type,e.data),this.emitReserved(`packet`,e),this.emitReserved(`heartbeat`),e.type){case`open`:this.onHandshake(JSON.parse(e.data));break;case`ping`:this._sendPacket(`pong`),this.emitReserved(`ping`),this.emitReserved(`pong`),this._resetPingTimeout();break;case`error`:let t=Error(`server error`);t.code=e.data,this._onError(t);break;case`message`:this.emitReserved(`data`,e.data),this.emitReserved(`message`,e.data);break}else ug(`packet received with socket readyState "%s"`,this.readyState)}onHandshake(e){this.emitReserved(`handshake`,e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!==`closed`&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose(`ping timeout`)},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved(`drain`):this.flush()}flush(){if(this.readyState!==`closed`&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();ug(`flushing %d packets in socket`,e.length),this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved(`flush`)}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name===`polling`&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+=lh(n)),t>0&&e>this._maxPayload)return ug(`only send %d out of %d packets`,t,this.writeBuffer.length),this.writeBuffer.slice(0,t);e+=2}return ug(`payload size is %d (max: %d)`,e,this._maxPayload),this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(ug(`throttled timer detected, scheduling connection close`),this._pingTimeoutTime=0,$m(()=>{this._onClose(`ping timeout`)},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket(`message`,e,t,n),this}send(e,t,n){return this._sendPacket(`message`,e,t,n),this}_sendPacket(e,t,n,r){if(typeof t==`function`&&(r=t,t=void 0),typeof n==`function`&&(r=n,n=null),this.readyState===`closing`||this.readyState===`closed`)return;n||={},n.compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved(`packetCreate`,i),this.writeBuffer.push(i),r&&this.once(`flush`,r),this.flush()}close(){let e=()=>{this._onClose(`forced close`),ug(`socket closing - telling transport to close`),this.transport.close()},t=()=>{this.off(`upgrade`,t),this.off(`upgradeError`,t),e()},n=()=>{this.once(`upgrade`,t),this.once(`upgradeError`,t)};return(this.readyState===`opening`||this.readyState===`open`)&&(this.readyState=`closing`,this.writeBuffer.length?this.once(`drain`,()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(t){if(ug(`socket error %j`,t),e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState===`opening`)return ug(`trying next transport`),this.transports.shift(),this._open();this.emitReserved(`error`,t),this._onClose(`transport error`,t)}_onClose(e,t){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`){if(ug(`socket close with reason: "%s"`,e),this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners(`close`),this.transport.close(),this.transport.removeAllListeners(),dg&&(this._beforeunloadEventListener&&removeEventListener(`beforeunload`,this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=fg.indexOf(this._offlineEventListener);e!==-1&&(ug(`removing listener for the 'offline' event`),fg.splice(e,1))}this.readyState=`closed`,this.id=null,this.emitReserved(`close`,e,t),this.writeBuffer=[],this._prevBufferLen=0}}};pg.protocol=4;var mg=class extends pg{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState===`open`&&this.opts.upgrade){ug(`starting upgrade probes`);for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}}_probe(e){ug(`probing transport "%s"`,e);let t=this.createTransport(e),n=!1;pg.priorWebsocketSuccess=!1;let r=()=>{n||(ug(`probe transport "%s" opened`,e),t.send([{type:`ping`,data:`probe`}]),t.once(`packet`,r=>{if(!n)if(r.type===`pong`&&r.data===`probe`){if(ug(`probe transport "%s" pong`,e),this.upgrading=!0,this.emitReserved(`upgrading`,t),!t)return;pg.priorWebsocketSuccess=t.name===`websocket`,ug(`pausing current transport "%s"`,this.transport.name),this.transport.pause(()=>{n||this.readyState!==`closed`&&(ug(`changing transport and sending upgrade packet`),l(),this.setTransport(t),t.send([{type:`upgrade`}]),this.emitReserved(`upgrade`,t),t=null,this.upgrading=!1,this.flush())})}else{ug(`probe transport "%s" failed`,e);let n=Error(`probe error`);n.transport=t.name,this.emitReserved(`upgradeError`,n)}}))};function i(){n||(n=!0,l(),t.close(),t=null)}let a=n=>{let r=Error(`probe error: `+n);r.transport=t.name,i(),ug(`probe transport "%s" failed because of error: %s`,e,n),this.emitReserved(`upgradeError`,r)};function o(){a(`transport closed`)}function s(){a(`socket closed`)}function c(e){t&&e.name!==t.name&&(ug(`"%s" works - aborting "%s"`,e.name,t.name),i())}let l=()=>{t.removeListener(`open`,r),t.removeListener(`error`,a),t.removeListener(`close`,o),this.off(`close`,s),this.off(`upgrading`,c)};t.once(`open`,r),t.once(`error`,a),t.once(`close`,o),this.once(`close`,s),this.once(`upgrading`,c),this._upgrades.indexOf(`webtransport`)!==-1&&e!==`webtransport`?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}},hg=class extends mg{constructor(e,t={}){let n=typeof e==`object`?e:t;(!n.transports||n.transports&&typeof n.transports[0]==`string`)&&(n.transports=(n.transports||[`polling`,`websocket`,`webtransport`]).map(e=>ig[e]).filter(e=>!!e)),super(e,n)}};hg.protocol;var gg=(0,t(_h()).default)(`socket.io-client:url`);function _g(e,t=``,n){let r=e;n||=typeof location<`u`&&location,e??=n.protocol+`//`+n.host,typeof e==`string`&&(e.charAt(0)===`/`&&(e=e.charAt(1)===`/`?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(gg(`protocol-less url %s`,e),e=n===void 0?`https://`+e:n.protocol+`//`+e),gg(`parse %s`,e),r=sg(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port=`80`:/^(http|ws)s$/.test(r.protocol)&&(r.port=`443`)),r.path=r.path||`/`;let i=r.host.indexOf(`:`)===-1?r.host:`[`+r.host+`]`;return r.id=r.protocol+`://`+i+`:`+r.port+t,r.href=r.protocol+`://`+i+(n&&n.port===r.port?``:`:`+r.port),r}var vg=typeof ArrayBuffer==`function`,yg=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,bg=Object.prototype.toString,xg=typeof Blob==`function`||typeof Blob<`u`&&bg.call(Blob)===`[object BlobConstructor]`,Sg=typeof File==`function`||typeof File<`u`&&bg.call(File)===`[object FileConstructor]`;function Cg(e){return vg&&(e instanceof ArrayBuffer||yg(e))||xg&&e instanceof Blob||Sg&&e instanceof File}function wg(e,t){if(!e||typeof e!=`object`)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(wg(e[t]))return!0;return!1}if(Cg(e))return!0;if(e.toJSON&&typeof e.toJSON==`function`&&arguments.length===1)return wg(e.toJSON(),!0);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&wg(e[t]))return!0;return!1}function Tg(e){let t=[],n=e.data,r=e;return r.data=Eg(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Eg(e,t){if(!e)return e;if(Cg(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){let n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=Eg(e[r],t);return n}else if(typeof e==`object`&&!(e instanceof Date)){let n={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Eg(e[r],t));return n}return e}function Dg(e,t){return e.data=Og(e.data,t),delete e.attachments,e}function Og(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num==`number`&&e.num>=0&&e.num<t.length)return t[e.num];throw Error(`illegal attachments`)}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Og(e[n],t);else if(typeof e==`object`)for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Og(e[n],t));return e}var kg=n({Decoder:()=>Fg,Encoder:()=>Ng,PacketType:()=>Mg,protocol:()=>5}),Ag=(0,t(_h()).default)(`socket.io-parser`),jg=[`connect`,`connect_error`,`disconnect`,`disconnecting`,`newListener`,`removeListener`],Mg;(function(e){e[e.CONNECT=0]=`CONNECT`,e[e.DISCONNECT=1]=`DISCONNECT`,e[e.EVENT=2]=`EVENT`,e[e.ACK=3]=`ACK`,e[e.CONNECT_ERROR=4]=`CONNECT_ERROR`,e[e.BINARY_EVENT=5]=`BINARY_EVENT`,e[e.BINARY_ACK=6]=`BINARY_ACK`})(Mg||={});var Ng=class{constructor(e){this.replacer=e}encode(e){return Ag(`encoding packet %j`,e),(e.type===Mg.EVENT||e.type===Mg.ACK)&&wg(e)?this.encodeAsBinary({type:e.type===Mg.EVENT?Mg.BINARY_EVENT:Mg.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=``+e.type;return(e.type===Mg.BINARY_EVENT||e.type===Mg.BINARY_ACK)&&(t+=e.attachments+`-`),e.nsp&&e.nsp!==`/`&&(t+=e.nsp+`,`),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),Ag(`encoded %j as %s`,e,t),t}encodeAsBinary(e){let t=Tg(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}};function Pg(e){return Object.prototype.toString.call(e)===`[object Object]`}var Fg=class e extends Zm{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e==`string`){if(this.reconstructor)throw Error(`got plaintext data when reconstructing a packet`);t=this.decodeString(e);let n=t.type===Mg.BINARY_EVENT;n||t.type===Mg.BINARY_ACK?(t.type=n?Mg.EVENT:Mg.ACK,this.reconstructor=new Ig(t),t.attachments===0&&super.emitReserved(`decoded`,t)):super.emitReserved(`decoded`,t)}else if(Cg(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved(`decoded`,t));else throw Error(`got binary data when not reconstructing a packet`);else throw Error(`Unknown type: `+e)}decodeString(t){let n=0,r={type:Number(t.charAt(0))};if(Mg[r.type]===void 0)throw Error(`unknown packet type `+r.type);if(r.type===Mg.BINARY_EVENT||r.type===Mg.BINARY_ACK){let e=n+1;for(;t.charAt(++n)!==`-`&&n!=t.length;);let i=t.substring(e,n);if(i!=Number(i)||t.charAt(n)!==`-`)throw Error(`Illegal attachments`);r.attachments=Number(i)}if(t.charAt(n+1)===`/`){let e=n+1;for(;++n&&!(t.charAt(n)===`,`||n===t.length););r.nsp=t.substring(e,n)}else r.nsp=`/`;let i=t.charAt(n+1);if(i!==``&&Number(i)==i){let e=n+1;for(;++n;){let e=t.charAt(n);if(e==null||Number(e)!=e){--n;break}if(n===t.length)break}r.id=Number(t.substring(e,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(r.type,i))r.data=i;else throw Error(`invalid payload`)}return Ag(`decoded %s as %j`,t,r),r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case Mg.CONNECT:return Pg(t);case Mg.DISCONNECT:return t===void 0;case Mg.CONNECT_ERROR:return typeof t==`string`||Pg(t);case Mg.EVENT:case Mg.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&jg.indexOf(t[0])===-1);case Mg.ACK:case Mg.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&=(this.reconstructor.finishedReconstruction(),null)}},Ig=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let e=Dg(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function Lg(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var Rg=(0,t(_h()).default)(`socket.io-client:socket`),zg=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Bg=class extends Zm{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[Lg(e,`open`,this.onopen.bind(this)),Lg(e,`packet`,this.onpacket.bind(this)),Lg(e,`error`,this.onerror.bind(this)),Lg(e,`close`,this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState===`open`&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift(`message`),this.emit.apply(this,e),this}emit(e,...t){if(zg.hasOwnProperty(e))throw Error(`"`+e.toString()+`" is a reserved event name`);if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let n={type:Mg.EVENT,data:t};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof t[t.length-1]==`function`){let e=this.ids++;Rg(`emitting packet with ack id %d`,e);let r=t.pop();this._registerAckCallback(e,r),n.id=e}let r=this.io.engine?.transport?.writable,i=this.connected&&!this.io.engine?._hasPingExpired();return this.flags.volatile&&!r?Rg(`discard packet as the transport is not currently writable`):i?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n),this.flags={},this}_registerAckCallback(e,t){let n=this.flags.timeout??this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&(Rg(`removing packet with ack id %d from the buffer`,e),this.sendBuffer.splice(t,1));Rg(`event with ack id %d has timed out after %d ms`,e,n),t.call(this,Error(`operation has timed out`))},n),i=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]==`function`&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>{if(n===this._queue[0])return e===null?(Rg(`packet [%d] was successfully sent`,n.id),this._queue.shift(),t&&t(null,...r)):n.tryCount>this._opts.retries&&(Rg(`packet [%d] is discarded after %d tries`,n.id,n.tryCount),this._queue.shift(),t&&t(e)),n.pending=!1,this._drainQueue()}),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(Rg(`draining queue`),!this.connected||this._queue.length===0)return;let t=this._queue[0];if(t.pending&&!e){Rg(`packet [%d] has already been sent and is waiting for an ack`,t.id);return}t.pending=!0,t.tryCount++,Rg(`sending packet [%d] (try n°%d)`,t.id,t.tryCount),this.flags=t.flags,this.emit.apply(this,t.args)}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){Rg(`transport is open - connecting`),typeof this.auth==`function`?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Mg.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved(`connect_error`,e)}onclose(e,t){Rg(`close (%s)`,e),this.connected=!1,delete this.id,this.emitReserved(`disconnect`,e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error(`socket has been disconnected`))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Mg.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved(`connect_error`,Error(`It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)`));break;case Mg.EVENT:case Mg.BINARY_EVENT:this.onevent(e);break;case Mg.ACK:case Mg.BINARY_ACK:this.onack(e);break;case Mg.DISCONNECT:this.ondisconnect();break;case Mg.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved(`connect_error`,t);break}}onevent(e){let t=e.data||[];Rg(`emitting event %j`,t),e.id!=null&&(Rg(`attaching ack callback to event`),t.push(this.ack(e.id))),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]==`string`&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,Rg(`sending ack %j`,r),t.packet({type:Mg.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];if(typeof t!=`function`){Rg(`bad ack %s`,e.id);return}delete this.acks[e.id],Rg(`calling ack %s with %j`,e.id,e.data),t.withError&&e.data.unshift(null),t.apply(this,e.data)}onconnect(e,t){Rg(`socket connected with id %s`,e),this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved(`connect`),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){Rg(`server disconnect (%s)`,this.nsp),this.destroy(),this.onclose(`io server disconnect`)}destroy(){this.subs&&=(this.subs.forEach(e=>e()),void 0),this.io._destroy(this)}disconnect(){return this.connected&&(Rg(`performing disconnect (%s)`,this.nsp),this.packet({type:Mg.DISCONNECT})),this.destroy(),this.connected&&this.onclose(`io client disconnect`),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let n of t)n.apply(this,e.data)}}};function Vg(e){e||={},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Vg.prototype.duration=function(){var e=this.ms*this.factor**+ this.attempts++;if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},Vg.prototype.reset=function(){this.attempts=0},Vg.prototype.setMin=function(e){this.ms=e},Vg.prototype.setMax=function(e){this.max=e},Vg.prototype.setJitter=function(e){this.jitter=e};var Hg=(0,t(_h()).default)(`socket.io-client:manager`),Ug=class extends Zm{constructor(e,t){super(),this.nsps={},this.subs=[],e&&typeof e==`object`&&(t=e,e=void 0),t||={},t.path=t.path||`/socket.io`,this.opts=t,sh(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor??.5),this.backoff=new Vg({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState=`closed`,this.uri=e;let n=t.parser||kg;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)==null||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)==null||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)==null||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(Hg(`readyState %s`,this._readyState),~this._readyState.indexOf(`open`))return this;Hg(`opening %s`,this.uri),this.engine=new hg(this.uri,this.opts);let t=this.engine,n=this;this._readyState=`opening`,this.skipReconnect=!1;let r=Lg(t,`open`,function(){n.onopen(),e&&e()}),i=t=>{Hg(`error`),this.cleanup(),this._readyState=`closed`,this.emitReserved(`error`,t),e?e(t):this.maybeReconnectOnOpen()},a=Lg(t,`error`,i);if(!1!==this._timeout){let e=this._timeout;Hg(`connect attempt will timeout after %d`,e);let n=this.setTimeoutFn(()=>{Hg(`connect attempt timed out after %d`,e),r(),i(Error(`timeout`)),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){Hg(`open`),this.cleanup(),this._readyState=`open`,this.emitReserved(`open`);let e=this.engine;this.subs.push(Lg(e,`ping`,this.onping.bind(this)),Lg(e,`data`,this.ondata.bind(this)),Lg(e,`error`,this.onerror.bind(this)),Lg(e,`close`,this.onclose.bind(this)),Lg(this.decoder,`decoded`,this.ondecoded.bind(this)))}onping(){this.emitReserved(`ping`)}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose(`parse error`,e)}}ondecoded(e){$m(()=>{this.emitReserved(`packet`,e)},this.setTimeoutFn)}onerror(e){Hg(`error`,e),this.emitReserved(`error`,e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Bg(this,e,t),this.nsps[e]=n),n}_destroy(e){let t=Object.keys(this.nsps);for(let e of t)if(this.nsps[e].active){Hg(`socket %s is still active, skipping close`,e);return}this._close()}_packet(e){Hg(`writing packet %j`,e);let t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){Hg(`cleanup`),this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){Hg(`disconnect`),this.skipReconnect=!0,this._reconnecting=!1,this.onclose(`forced close`)}disconnect(){return this._close()}onclose(e,t){var n;Hg(`closed due to %s`,e),this.cleanup(),(n=this.engine)==null||n.close(),this.backoff.reset(),this._readyState=`closed`,this.emitReserved(`close`,e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)Hg(`reconnect failed`),this.backoff.reset(),this.emitReserved(`reconnect_failed`),this._reconnecting=!1;else{let t=this.backoff.duration();Hg(`will wait %dms before reconnect attempt`,t),this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(Hg(`attempting reconnect`),this.emitReserved(`reconnect_attempt`,e.backoff.attempts),!e.skipReconnect&&e.open(t=>{t?(Hg(`reconnect attempt error`),e._reconnecting=!1,e.reconnect(),this.emitReserved(`reconnect_error`,t)):(Hg(`reconnect success`),e.onreconnect())}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved(`reconnect`,e)}},Wg=(0,t(_h()).default)(`socket.io-client`),Gg={};function Kg(e,t){typeof e==`object`&&(t=e,e=void 0),t||={};let n=_g(e,t.path||`/socket.io`),r=n.source,i=n.id,a=n.path,o=Gg[i]&&a in Gg[i].nsps,s=t.forceNew||t[`force new connection`]||!1===t.multiplex||o,c;return s?(Wg(`ignoring socket cache for %s`,r),c=new Ug(r,t)):(Gg[i]||(Wg(`new io instance for %s`,r),Gg[i]=new Ug(r,t)),c=Gg[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(Kg,{Manager:Ug,Socket:Bg,io:Kg,connect:Kg});var qg=R(),Jg=(0,B.createContext)(null);function Yg(e){let t=(0,qg.c)(6),{children:n}=e,[r]=(0,B.useState)(Qg),i,a;t[0]===r?(i=t[1],a=t[2]):(i=()=>(r.connect(),r.on(`connect`,()=>{console.log(`🔌 Socket.IO connected:`,r.id)}),r.on(`disconnect`,Zg),r.on(`connect_error`,Xg),()=>{r.disconnect()}),a=[r],t[0]=r,t[1]=i,t[2]=a),(0,B.useEffect)(i,a);let o;return t[3]!==n||t[4]!==r?(o=(0,V.jsx)(Jg.Provider,{value:r,children:n}),t[3]=n,t[4]=r,t[5]=o):o=t[5],o}function Xg(e){console.error(`🔌 Socket.IO connection error:`,e.message)}function Zg(e){console.log(`🔌 Socket.IO disconnected:`,e)}function Qg(){return Kg({transports:[`websocket`]})}function $g(){let e=(0,B.useContext)(Jg);if(e===null)throw Error(`useRealtime must be used within a RealtimeProvider`);return e}var e_=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(){}},t_={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},n_=new class{#e=t_;#t=!1;setTimeoutProvider(e){process.env.NODE_ENV!==`production`&&this.#t&&e!==this.#e&&console.error(`[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`,{previous:this.#e,provider:e}),this.#e=e,process.env.NODE_ENV!==`production`&&(this.#t=!1)}setTimeout(e,t){return process.env.NODE_ENV!==`production`&&(this.#t=!0),this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!==`production`&&(this.#t=!0),this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function r_(e){setTimeout(e,0)}var i_=typeof window>`u`||`Deno`in globalThis;function a_(){}function o_(e,t){return typeof e==`function`?e(t):e}function s_(e){return typeof e==`number`&&e>=0&&e!==1/0}function c_(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l_(e,t){return typeof e==`function`?e(t):e}function u_(e,t){return typeof e==`function`?e(t):e}function d_(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==p_(o,t.options))return!1}else if(!h_(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 f_(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(m_(t.options.mutationKey)!==m_(a))return!1}else if(!h_(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function p_(e,t){return(t?.queryKeyHashFn||m_)(e)}function m_(e){return JSON.stringify(e,(e,t)=>b_(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function h_(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>h_(e[n],t[n])):!1}var g_=Object.prototype.hasOwnProperty;function __(e,t){if(e===t)return e;let n=y_(e)&&y_(t);if(!n&&!(b_(e)&&b_(t)))return t;let r=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),a=i.length,o=n?Array(a):{},s=0;for(let c=0;c<a;c++){let a=n?c:i[c],l=e[a],u=t[a];if(l===u){o[a]=l,(n?c<r:g_.call(e,a))&&s++;continue}if(l===null||u===null||typeof l!=`object`||typeof u!=`object`){o[a]=u;continue}let d=__(l,u);o[a]=d,d===l&&s++}return r===a&&s===r?e:o}function v_(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 y_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function b_(e){if(!x_(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!x_(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function x_(e){return Object.prototype.toString.call(e)===`[object Object]`}function S_(e){return new Promise(t=>{n_.setTimeout(t,e)})}function C_(e,t,n){if(typeof n.structuralSharing==`function`)return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!==`production`)try{return __(e,t)}catch(e){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`),e}return __(e,t)}return t}function w_(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function T_(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var E_=Symbol();function D_(e,t){return process.env.NODE_ENV!==`production`&&e.queryFn===E_&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===E_?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function O_(e,t){return typeof e==`function`?e(...t):!!e}var k_=new class extends e_{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!i_&&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`}};function A_(){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 j_=r_;function M_(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=j_,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 N_=M_(),P_=new class extends e_{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!i_&&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 F_(e){return Math.min(1e3*2**e,3e4)}function I_(e){return(e??`online`)===`online`?P_.isOnline():!0}var L_=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function R_(e){let t=!1,n=0,r,i=A_(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new L_(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>k_.isFocused()&&(e.networkMode===`always`||P_.isOnline())&&e.canRun(),u=()=>I_(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??(i_?0:3),o=e.retryDelay??F_,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),S_(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 z_=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),s_(this.gcTime)&&(this.#e=n_.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(i_?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(n_.clearTimeout(this.#e),void 0)}},B_=class extends z_{#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=U_(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=U_(this.options);e.data!==void 0&&(this.setState(H_(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=C_(this.state.data,e,this.options);return this.#s({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(a_).catch(a_):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>u_(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===E_||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>l_(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:!c_(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.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({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)}process.env.NODE_ENV!==`production`&&(Array.isArray(this.options.queryKey)||console.error(`As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`));let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=D_(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.#s({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=R_({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof L_&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#s({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#s({type:`pause`})},onContinue:()=>{this.#s({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 process.env.NODE_ENV!==`production`&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),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 L_){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#s({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#s(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,...V_(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...H_(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`};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),N_.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function V_(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I_(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function H_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function U_(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 W_=class extends e_{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=A_(),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),K_(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return q_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return q_(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 u_(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&&!v_(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&J_(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||u_(this.options.enabled,this.#t)!==u_(t.enabled,this.#t)||l_(this.options.staleTime,this.#t)!==l_(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||u_(this.options.enabled,this.#t)!==u_(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 X_(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(a_)),t}#g(){this.#b();let e=l_(this.options.staleTime,this.#t);if(i_||this.#r.isStale||!s_(e))return;let t=c_(this.#r.dataUpdatedAt,e)+1;this.#d=n_.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,!(i_||u_(this.options.enabled,this.#t)===!1||!s_(this.#p)||this.#p===0)&&(this.#f=n_.setInterval(()=>{(this.options.refetchIntervalInBackground||k_.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(n_.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(n_.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&&K_(e,t),o=i&&J_(e,n,t,r);(a||o)&&(l={...l,...V_(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=C_(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=C_(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:l.dataUpdateCount>0||l.errorUpdateCount>0,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:Y_(e,t),refetch:this.refetch,promise:this.#o,isEnabled:u_(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=e=>{x.status===`error`?e.reject(x.error):x.data!==void 0&&e.resolve(x.data)},r=()=>{t(this.#o=x.promise=A_())},i=this.#o;switch(i.status){case`pending`:e.queryHash===n.queryHash&&t(i);break;case`fulfilled`:(x.status===`error`||x.data!==i.value)&&r();break;case`rejected`:(x.status!==`error`||x.error!==i.reason)&&r();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),!v_(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){N_.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function G_(e,t){return u_(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function K_(e,t){return G_(e,t)||e.state.data!==void 0&&q_(e,t,t.refetchOnMount)}function q_(e,t,n){if(u_(t.enabled,e)!==!1&&l_(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Y_(e,t)}return!1}function J_(e,t,n,r){return(e!==t||u_(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Y_(e,n)}function Y_(e,t){return u_(t.enabled,e)!==!1&&e.isStaleByTime(l_(t.staleTime,e))}function X_(e,t){return!v_(e.getCurrentResult(),t)}function Z_(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=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener(`abort`,()=>{n=!0}),t.signal)})},u=D_(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?T_:w_;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?$_:Q_,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:Q_(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 Q_(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 $_(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ev(e,t){return t?Q_(e,t)!=null:!1}function tv(e,t){return!t||!e.getPreviousPageParam?!1:$_(e,t)!=null}var nv=class extends W_{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:Z_()})}getOptimisticResult(e){return e.behavior=Z_(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:ev(t,n.data),hasPreviousPage:tv(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},rv=class extends z_{#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||iv(),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=R_({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}),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{throw await this.#n.config.onError?.(t,e,this.state.context,this,n),await this.options.onError?.(t,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,t,e,this.state.context,n),t}finally{this.#i({type:`error`,error: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),N_.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function iv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var av=class extends e_{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 rv({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=ov(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=ov(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=ov(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=ov(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){N_.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=>f_(t,e))}findAll(e={}){return this.getAll().filter(t=>f_(e,t))}notify(e){N_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return N_.batch(()=>Promise.all(e.map(e=>e.continue().catch(a_))))}};function ov(e){return e.options.scope?.id}var sv=class extends e_{#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),v_(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&m_(t.mutationKey)!==m_(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??iv();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){N_.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};e?.type===`success`?(this.#r.onSuccess?.(e.data,t,n,r),this.#r.onSettled?.(e.data,null,t,n,r)):e?.type===`error`&&(this.#r.onError?.(e.error,t,n,r),this.#r.onSettled?.(void 0,e.error,t,n,r))}this.listeners.forEach(e=>{e(this.#t)})})}};function cv(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function lv(e,t,n){let r=e.slice(0);return r[t]=n,r}var uv=class extends e_{#e;#t;#n;#r;#i;#a;#o;#s;#c=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#f(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){if(this.#n=e,this.#r=t,process.env.NODE_ENV!==`production`){let t=e.map(e=>this.#e.defaultQueryOptions(e).queryHash);new Set(t).size!==t.length&&console.warn(`[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.`)}N_.batch(()=>{let e=this.#i,t=this.#d(this.#n);this.#c=t,t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!v_(e,n)});!o&&!s||(o&&(this.#i=n),this.#t=r,this.hasListeners()&&(o&&(cv(e,n).forEach(e=>{e.destroy()}),cv(n,e).forEach(e=>{e.subscribe(t=>{this.#f(e,t)})})),this.#p()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#d(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions));return[r,e=>this.#u(e??r,t),()=>this.#l(r,n)]}#l(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#u(e,t){return t?((!this.#a||this.#t!==this.#s||t!==this.#o)&&(this.#o=t,this.#s=this.#t,this.#a=__(this.#a,t(e))),this.#a):e}#d(e){let t=new Map(this.#i.map(e=>[e.options.queryHash,e])),n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash);i?n.push({defaultedQueryOptions:r,observer:i}):n.push({defaultedQueryOptions:r,observer:new W_(this.#e,r)})}),n}#f(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=lv(this.#t,n,t),this.#p())}#p(){if(this.hasListeners()){let e=this.#a,t=this.#l(this.#t,this.#c);e!==this.#u(t,this.#r?.combine)&&N_.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},dv=class extends e_{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??p_(r,t),a=this.get(i);return a||(a=new B_({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(){N_.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=>d_(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>d_(e,t)):t}notify(e){N_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){N_.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){N_.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},fv=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new dv,this.#t=e.mutationCache||new av,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=k_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=P_.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(l_(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=o_(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return N_.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;N_.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return N_.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=N_.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(a_).catch(a_)}invalidateQueries(e,t={}){return N_.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=N_.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(a_)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(a_)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(l_(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(a_).catch(a_)}fetchInfiniteQuery(e){return e.behavior=Z_(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(a_).catch(a_)}ensureInfiniteQueryData(e){return e.behavior=Z_(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return P_.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(m_(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{h_(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(m_(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{h_(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||=p_(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===E_&&(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()}},pv=B.createContext(void 0),mv=e=>{let t=B.useContext(pv);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},hv=({client:e,children:t})=>(B.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,V.jsx)(pv.Provider,{value:e,children:t})),gv=B.createContext(!1),_v=()=>B.useContext(gv);gv.Provider;function vv(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var yv=B.createContext(vv()),bv=()=>B.useContext(yv),xv=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Sv=e=>{B.useEffect(()=>{e.clearReset()},[e])},Cv=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||O_(n,[e.error,r])),wv=(e,t)=>t.state.data===void 0,Tv=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))}},Ev=(e,t)=>e.isLoading&&e.isFetching&&!t,Dv=(e,t)=>e?.suspense&&t.isPending,Ov=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function kv({queries:e,...t},n){let r=mv(n),i=_v(),a=bv(),o=B.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:`optimistic`,t}),[e,r,i]);o.forEach(e=>{Tv(e),xv(e,a)}),Sv(a);let[s]=B.useState(()=>new uv(r,o,t)),[c,l,u]=s.getOptimisticResult(o,t.combine),d=!i&&t.subscribed!==!1;B.useSyncExternalStore(B.useCallback(e=>d?s.subscribe(N_.batchCalls(e)):a_,[s,d]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),B.useEffect(()=>{s.setQueries(o,t)},[o,t,s]);let f=c.some((e,t)=>Dv(o[t],e))?c.flatMap((e,t)=>{let n=o[t];if(n){let t=new W_(r,n);if(Dv(n,e))return Ov(n,t,a);Ev(e,i)&&Ov(n,t,a)}return[]}):[];if(f.length>0)throw Promise.all(f);let p=c.find((e,t)=>{let n=o[t];return n&&Cv({result:e,errorResetBoundary:a,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(p?.error)throw p.error;return l(u())}function Av(e,t,n){if(process.env.NODE_ENV!==`production`&&(typeof e!=`object`||Array.isArray(e)))throw Error(`Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object`);let r=_v(),i=bv(),a=mv(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o),process.env.NODE_ENV!==`production`&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=r?`isRestoring`:`optimistic`,Tv(o),xv(o,i),Sv(i);let s=!a.getQueryCache().get(o.queryHash),[c]=B.useState(()=>new t(a,o)),l=c.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(B.useSyncExternalStore(B.useCallback(e=>{let t=u?c.subscribe(N_.batchCalls(e)):a_;return c.updateResult(),t},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),B.useEffect(()=>{c.setOptions(o)},[o,c]),Dv(o,l))throw Ov(o,c,i);if(Cv({result:l,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw l.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,l),o.experimental_prefetchInRender&&!i_&&Ev(l,r)&&(s?Ov(o,c,i):a.getQueryCache().get(o.queryHash)?.promise)?.catch(a_).finally(()=>{c.updateResult()}),o.notifyOnChangeProps?l:c.trackResult(l)}function jv(e,t){return Av(e,W_,t)}function Mv(e,t){return process.env.NODE_ENV!==`production`&&e.queryFn===E_&&console.error(`skipToken is not allowed for useSuspenseQuery`),Av({...e,enabled:!0,suspense:!0,throwOnError:wv,placeholderData:void 0},W_,t)}function Nv(e,t){return process.env.NODE_ENV!==`production`&&e.queryFn===E_&&console.error(`skipToken is not allowed for useSuspenseInfiniteQuery`),Av({...e,enabled:!0,suspense:!0,throwOnError:wv},nv,t)}function Pv(e,t){return kv({...e,queries:e.queries.map(e=>(process.env.NODE_ENV!==`production`&&e.queryFn===E_&&console.error(`skipToken is not allowed for useSuspenseQueries`),{...e,suspense:!0,throwOnError:wv,enabled:!0,placeholderData:void 0}))},t)}function Fv(e,t){let n=mv(t);n.getQueryState(e.queryKey)||n.prefetchQuery(e)}function Iv(e,t){let n=mv(t);n.getQueryState(e.queryKey)||n.prefetchInfiniteQuery(e)}function Lv(e){return e}function Rv(e){return e}function zv(e,t){let n=mv(t),[r]=B.useState(()=>new sv(n,e));B.useEffect(()=>{r.setOptions(e)},[r,e]);let i=B.useSyncExternalStore(B.useCallback(e=>r.subscribe(N_.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=B.useCallback((e,t)=>{r.mutate(e,t).catch(a_)},[r]);if(i.error&&O_(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function Bv(e,t){return Av(e,nv,t)}var Vv=Object.create,Hv=Object.defineProperty,Uv=Object.getOwnPropertyDescriptor,Wv=Object.getOwnPropertyNames,Gv=Object.getPrototypeOf,Kv=Object.prototype.hasOwnProperty,qv=(e,t)=>function(){return t||(0,e[Wv(e)[0]])((t={exports:{}}).exports,t),t.exports},Jv=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Wv(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Kv.call(e,s)&&s!==n&&Hv(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Uv(t,s))||r.enumerable});return e},Yv=(e,t,n)=>(n=e==null?{}:Vv(Gv(e)),Jv(t||!e||!e.__esModule?Hv(n,`default`,{value:e,enumerable:!0}):n,e)),Xv=qv({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Zv=qv({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=Xv().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Qv=qv({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=Xv().default,r=Zv();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),$v=qv({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=Qv();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),ey=qv({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=$v();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}});function ty(e){let t={subscribe(t){let n=null,r=!1,i=!1,a=!1;function o(){if(n===null){a=!0;return}i||(i=!0,typeof n==`function`?n():n&&n.unsubscribe())}return n=e({next(e){var n;r||(n=t.next)==null||n.call(t,e)},error(e){var n;r||(r=!0,(n=t.error)==null||n.call(t,e),o())},complete(){var e;r||(r=!0,(e=t.complete)==null||e.call(t),o())}}),a&&o(),{unsubscribe:o}},pipe(...e){return e.reduce(ny,t)}};return t}function ny(e,t){return t(e)}function ry(e){let t=new AbortController;return new Promise((n,r)=>{let i=!1;function a(){i||(i=!0,o.unsubscribe())}t.signal.addEventListener(`abort`,()=>{r(t.signal.reason)});let o=e.subscribe({next(e){i=!0,n(e),a()},error(e){r(e)},complete(){t.abort(),a()}})})}function iy(e){return e=>{let t=0,n=null,r=[];function i(){n||=e.subscribe({next(e){for(let n of r){var t;(t=n.next)==null||t.call(n,e)}},error(e){for(let n of r){var t;(t=n.error)==null||t.call(n,e)}},complete(){for(let t of r){var e;(e=t.complete)==null||e.call(t)}}})}function a(){if(t===0&&n){let e=n;n=null,e.unsubscribe()}}return ty(e=>(t++,r.push(e),i(),{unsubscribe(){t--,a();let n=r.findIndex(t=>t===e);n>-1&&r.splice(n,1)}}))}}function ay(e){return t=>ty(n=>t.subscribe({next(t){var r;(r=e.next)==null||r.call(e,t),n.next(t)},error(t){var r;(r=e.error)==null||r.call(e,t),n.error(t)},complete(){var t;(t=e.complete)==null||t.call(e),n.complete()}}))}function oy(e){let t=e,n=[],r=e=>{t!==void 0&&e.next(t),n.push(e)},i=e=>{n.splice(n.indexOf(e),1)},a=ty(e=>(r(e),()=>{i(e)}));return a.next=e=>{if(t!==e){t=e;for(let t of n)t.next(e)}},a.get=()=>t,a}function sy(e){return ty(t=>{function n(t=0,r=e.op){let i=e.links[t];if(!i)throw Error(`No more links to execute - did you forget to add an ending link?`);return i({op:r,next(e){return n(t+1,e)}})}return n().subscribe(t)})}var cy={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,BAD_GATEWAY:-32603,SERVICE_UNAVAILABLE:-32603,GATEWAY_TIMEOUT:-32603,UNAUTHORIZED:-32001,PAYMENT_REQUIRED:-32002,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNSUPPORTED_MEDIA_TYPE:-32015,UNPROCESSABLE_CONTENT:-32022,PRECONDITION_REQUIRED:-32028,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};cy.BAD_GATEWAY,cy.SERVICE_UNAVAILABLE,cy.GATEWAY_TIMEOUT,cy.INTERNAL_SERVER_ERROR;function ly(e){return!!e&&!Array.isArray(e)&&typeof e==`object`}var uy=typeof Symbol==`function`&&!!Symbol.asyncIterator;function dy(e){return uy&&ly(e)&&Symbol.asyncIterator in e}var fy=e=>e(),py=Object.create,my=Object.defineProperty,hy=Object.getOwnPropertyDescriptor,gy=Object.getOwnPropertyNames,_y=Object.getPrototypeOf,vy=Object.prototype.hasOwnProperty,yy=(e,t)=>function(){return t||(0,e[gy(e)[0]])((t={exports:{}}).exports,t),t.exports},by=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=gy(t),a=0,o=i.length,s;a<o;a++)s=i[a],!vy.call(e,s)&&s!==n&&my(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=hy(t,s))||r.enumerable});return e},xy=(e,t,n)=>(n=e==null?{}:py(_y(e)),by(t||!e||!e.__esModule?my(n,`default`,{value:e,enumerable:!0}):n,e)),Sy=()=>{},Cy=e=>{Object.freeze&&Object.freeze(e)};function wy(e,t,n){let r=t.join(`.`);return n[r]??(n[r]=new Proxy(Sy,{get(r,i){if(!(typeof i!=`string`||i===`then`))return wy(e,[...t,i],n)},apply(n,r,i){let a=t[t.length-1],o={args:i,path:t};return a===`call`?o={args:i.length>=2?[i[1]]:[],path:t.slice(0,-1)}:a===`apply`&&(o={args:i.length>=2?i[1]:[],path:t.slice(0,-1)}),Cy(o.args),Cy(o.path),e(o)}})),n[r]}var Ty=e=>wy(e,[],Object.create(null)),Ey=e=>new Proxy(Sy,{get(t,n){if(n!==`then`)return e(n)}}),Dy=yy({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Oy=yy({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=Dy().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),ky=yy({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=Dy().default,r=Oy();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ay=yy({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=ky();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),jy=yy({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=Ay();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}});xy(jy(),1),xy(jy(),1),xy(Ay(),1),Symbol.toStringTag;var My,Ny;(My=Symbol).dispose??(My.dispose=Symbol()),(Ny=Symbol).asyncDispose??(Ny.asyncDispose=Symbol());function Py(e,t){let n=e,r=n[Symbol.dispose];return n[Symbol.dispose]=()=>{t(),r?.()},n}var Fy=yy({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(e,t){function n(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Iy=yy({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(e,t){function n(e,t){this.v=e,this.k=t}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ly=yy({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(e,t){var n=Iy();function r(e){return new n(e,0)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ry=yy({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(e,t){var n=Iy();function r(e){return function(){return new i(e.apply(this,arguments))}}function i(e){var t,r;function i(t,r){try{var o=e[t](r),s=o.value,c=s instanceof n;Promise.resolve(c?s.v:s).then(function(n){if(c){var r=t===`return`?`return`:`next`;if(!s.k||n.done)return i(r,n);n=e[r](n).value}a(o.done?`return`:`normal`,n)},function(e){i(`throw`,e)})}catch(e){a(`throw`,e)}}function a(e,n){switch(e){case`return`:t.resolve({value:n,done:!0});break;case`throw`:t.reject(n);break;default:t.resolve({value:n,done:!1})}(t=t.next)?i(t.key,t.arg):r=null}this._invoke=function(e,n){return new Promise(function(a,o){var s={key:e,arg:n,resolve:a,reject:o,next:null};r?r=r.next=s:(t=r=s,i(e,n))})},typeof e.return!=`function`&&(this.return=void 0)}i.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},i.prototype.next=function(e){return this._invoke(`next`,e)},i.prototype.throw=function(e){return this._invoke(`throw`,e)},i.prototype.return=function(e){return this._invoke(`return`,e)},t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}});xy(Fy(),1),xy(Ly(),1),xy(Ry(),1);function zy(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}xy(Fy(),1),xy(Ly(),1),xy(Ry(),1),xy(Fy(),1),xy(Ly(),1),xy(Ry(),1);var By=yy({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function n(e){var t,n,i,a=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,i=Symbol.iterator);a--;){if(n&&(t=e[n])!=null)return t.call(e);if(i&&(t=e[i])!=null)return new r(t.call(e));n=`@@asyncIterator`,i=`@@iterator`}throw TypeError(`Object is not async iterable`)}function r(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return r=function(e){this.s=e,this.n=e.next},r.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new r(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Vy=xy(Ly(),1),Hy=xy(Ry(),1),Uy=xy(Fy(),1);xy(By(),1);var Wy=0,Gy=1,Ky=0,qy=1,Jy=0,Yy=1,Xy=2,Zy=class extends Error{constructor(e){super(`Received error from server`),this.data=e}},Qy=e=>({getReader(){return new ReadableStream({start(t){e.on(`data`,e=>{t.enqueue(e)}),e.on(`end`,()=>{t.close()}),e.on(`error`,e=>{t.error(e)})}}).getReader()}});function $y(e){let t=`getReader`in e?e.getReader():Qy(e).getReader(),n=``;return new ReadableStream({async pull(e){let{done:n,value:r}=await t.read();n?e.close():e.enqueue(r)},cancel(){return t.cancel()}}).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform(e,t){n+=e;let r=n.split(`
21
+ `);n=r.pop()??``;for(let e of r)t.enqueue(e)}}))}function eb(e){let t=$y(e),n=!1;return t.pipeThrough(new TransformStream({transform(e,t){if(n){let n=JSON.parse(e);t.enqueue(n)}else{let r=JSON.parse(e);t.enqueue(r),n=!0}}}))}function tb(e){let t=new Map;function n(){return Array.from(t.values()).every(e=>e.closed)}function r(){let t,r=new ReadableStream({start(e){t=e}}),i={enqueue:e=>t.enqueue(e),close:()=>{t.close(),a(),n()&&e.abort()},closed:!1,getReaderResource:()=>{let e=r.getReader();return Py(e,()=>{i.close(),e.releaseLock()})},error:e=>{t.error(e),a()}};function a(){Object.assign(i,{closed:!0,close:()=>{},enqueue:()=>{},getReaderResource:null,error:()=>{}})}return i}function i(e){let n=t.get(e);return n||(n=r(),t.set(e,n)),n}function a(e){for(let n of t.values())n.error(e)}return{getOrCreate:i,cancelAll:a}}async function nb(e){let{deserialize:t=e=>e}=e,n=eb(e.from);t&&(n=n.pipeThrough(new TransformStream({transform(e,n){n.enqueue(t(e))}})));let r=zy(),i=tb(e.abortController);function a(t){let[n,r,a]=t,s=i.getOrCreate(a);switch(r){case Wy:return fy(async()=>{try{var t=(0,Uy.default)();let{value:n}=await t.u(s.getReaderResource()).read(),[r,i,a]=n;switch(i){case Ky:return o(a);case qy:throw e.formatError?.call(e,{error:a})??new Zy(a)}}catch(e){t.e=e}finally{t.d()}});case Gy:return fy((0,Hy.default)(function*(){try{var t=(0,Uy.default)();let n=t.u(s.getReaderResource());for(;;){let{value:t}=yield(0,Vy.default)(n.read()),[r,i,a]=t;switch(i){case Yy:yield o(a);break;case Jy:return o(a);case Xy:throw e.formatError?.call(e,{error:a})??new Zy(a)}}}catch(e){t.e=e}finally{t.d()}}))}}function o(e){let[[t],...n]=e;for(let e of n){let[n]=e,r=a(e);if(n===null)return r;t[n]=r}return t}let s=e=>{r?.reject(e),i.cancelAll(e)};return n.pipeTo(new WritableStream({write(e){if(r){let t=e;for(let[n,r]of Object.entries(e))t[n]=o(r);r.resolve(t),r=null;return}let t=e,[n]=t;i.getOrCreate(n).enqueue(t)},close:s,abort:s})).catch(t=>{var n;(n=e.onError)==null||n.call(e,{error:t}),s(t)}),[await r.promise]}var rb=yy({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js"(e,t){var n=Iy();function r(e){var t={},r=!1;function i(t,i){return r=!0,i=new Promise(function(n){n(e[t](i))}),{done:!1,value:new n(i,1)}}return t[typeof Symbol<`u`&&Symbol.iterator||`@@iterator`]=function(){return this},t.next=function(e){return r?(r=!1,e):i(`next`,e)},typeof e.throw==`function`&&(t.throw=function(e){if(r)throw r=!1,e;return i(`throw`,e)}),typeof e.return==`function`&&(t.return=function(e){return r?(r=!1,e):i(`return`,e)}),t}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}});xy(By(),1),xy(Ly(),1),xy(Ry(),1),xy(rb(),1),xy(Fy(),1),xy(Ry(),1),xy(jy(),1);var ib=Yv($v(),1),ab=Yv(ey(),1);function ob(e){return e instanceof lb}function sb(e){return ly(e)&&ly(e.error)&&typeof e.error.code==`number`&&typeof e.error.message==`string`}function cb(e,t){return typeof e==`string`?e:ly(e)&&typeof e.message==`string`?e.message:t}var lb=class e extends Error{constructor(t,n){var r,i;let a=n?.cause;super(t,{cause:a}),(0,ib.default)(this,`cause`,void 0),(0,ib.default)(this,`shape`,void 0),(0,ib.default)(this,`data`,void 0),(0,ib.default)(this,`meta`,void 0),this.meta=n?.meta,this.cause=a,this.shape=n==null||(r=n.result)==null?void 0:r.error,this.data=n==null||(i=n.result)==null?void 0:i.error.data,this.name=`TRPCClientError`,Object.setPrototypeOf(this,e.prototype)}static from(t,n={}){let r=t;return ob(r)?(n.meta&&(r.meta=(0,ab.default)((0,ab.default)({},r.meta),n.meta)),r):sb(r)?new e(r.error.message,(0,ab.default)((0,ab.default)({},n),{},{result:r})):new e(cb(r,`Unknown error`),(0,ab.default)((0,ab.default)({},n),{},{cause:r}))}};function ub(e){let t=e;return t?`input`in t?t:{input:t,output:t}:{input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}}}var db=e=>typeof e==`function`;function fb(e){if(e)return e;if(typeof window<`u`&&db(window.fetch))return window.fetch;if(typeof globalThis<`u`&&db(globalThis.fetch))return globalThis.fetch;throw Error(`No fetch implementation found`)}var pb=Yv(ey(),1);function mb(e){return{url:e.url.toString(),fetch:e.fetch,transformer:ub(e.transformer),methodOverride:e.methodOverride}}function hb(e){let t={};for(let n=0;n<e.length;n++)t[n]=e[n];return t}var gb={query:`GET`,mutation:`POST`,subscription:`PATCH`};function _b(e){return`input`in e?e.transformer.input.serialize(e.input):hb(e.inputs.map(t=>e.transformer.input.serialize(t)))}var vb=e=>{let t=e.url.split(`?`),n=t[0].replace(/\/$/,``)+`/`+e.path,r=[];if(t[1]&&r.push(t[1]),`inputs`in e&&r.push(`batch=1`),e.type===`query`||e.type===`subscription`){let t=_b(e);t!==void 0&&e.methodOverride!==`POST`&&r.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return r.length&&(n+=`?`+r.join(`&`)),n},yb=e=>{if(e.type===`query`&&e.methodOverride!==`POST`)return;let t=_b(e);return t===void 0?void 0:JSON.stringify(t)},bb=class extends Error{constructor(){let e=`AbortError`;super(e),this.name=e,this.message=e}},xb=e=>{var t;if(e?.aborted)throw(t=e.throwIfAborted)==null||t.call(e),typeof DOMException<`u`?new DOMException(`AbortError`,`AbortError`):new bb};async function Sb(e){xb(e.signal);let t=e.getUrl(e),n=e.getBody(e),r=e.methodOverride??gb[e.type],i=await(async()=>{let t=await e.headers();return Symbol.iterator in t?Object.fromEntries(t):t})(),a=(0,pb.default)((0,pb.default)((0,pb.default)({},e.contentTypeHeader&&r!==`GET`?{"content-type":e.contentTypeHeader}:{}),e.trpcAcceptHeader?{"trpc-accept":e.trpcAcceptHeader}:void 0),i);return fb(e.fetch)(t,{method:r,signal:e.signal,body:n,headers:a})}Yv(ey(),1);var Cb=()=>{throw Error(`Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new`)};function wb(e){let t=null,n=null,r=()=>{clearTimeout(n),n=null,t=null};function i(t){let n=[[]],r=0;for(;;){let o=t[r];if(!o)break;let s=n[n.length-1];if(o.aborted){var i;(i=o.reject)==null||i.call(o,Error(`Aborted`)),r++;continue}if(e.validate(s.concat(o).map(e=>e.key))){s.push(o),r++;continue}if(s.length===0){var a;(a=o.reject)==null||a.call(o,Error(`Input is too big for a single dispatch`)),r++;continue}n.push([])}return n}function a(){let n=i(t);r();for(let t of n){if(!t.length)continue;let n={items:t};for(let e of t)e.batch=n;e.fetch(n.items.map(e=>e.key)).then(async e=>{await Promise.all(e.map(async(e,t)=>{let r=n.items[t];try{var i;let t=await Promise.resolve(e);(i=r.resolve)==null||i.call(r,t)}catch(e){var a;(a=r.reject)==null||a.call(r,e)}r.batch=null,r.reject=null,r.resolve=null}));for(let e of n.items){var t;(t=e.reject)==null||t.call(e,Error(`Missing result`)),e.batch=null}}).catch(e=>{for(let r of n.items){var t;(t=r.reject)==null||t.call(r,e),r.batch=null}})}}function o(e){let r={aborted:!1,key:e,batch:null,resolve:Cb,reject:Cb},i=new Promise((e,n)=>{r.reject=n,r.resolve=e,t??=[],t.push(r)});return n??=setTimeout(a),i}return{load:o}}function Tb(...e){let t=new AbortController,n=e.length,r=0,i=()=>{++r===n&&t.abort()};for(let t of e)t?.aborted?i():t?.addEventListener(`abort`,i,{once:!0});return t.signal}function Eb(...e){let t=new AbortController;for(let n of e)n?.aborted?t.abort():n?.addEventListener(`abort`,()=>t.abort(),{once:!0});return t.signal}Yv(ey(),1);var Db=Yv(ey(),1);function Ob(e){return typeof FormData>`u`?!1:e instanceof FormData}var kb={css:{query:[`72e3ff`,`3fb0d8`],mutation:[`c5a3fc`,`904dfc`],subscription:[`ff49e1`,`d83fbe`]},ansi:{regular:{query:[`\x1B[30;46m`,`\x1B[97;46m`],mutation:[`\x1B[30;45m`,`\x1B[97;45m`],subscription:[`\x1B[30;42m`,`\x1B[97;42m`]},bold:{query:[`\x1B[1;30;46m`,`\x1B[1;97;46m`],mutation:[`\x1B[1;30;45m`,`\x1B[1;97;45m`],subscription:[`\x1B[1;30;42m`,`\x1B[1;97;42m`]}}};function Ab(e){let{direction:t,type:n,withContext:r,path:i,id:a,input:o}=e,s=[],c=[];if(e.colorMode===`none`)s.push(t===`up`?`>>`:`<<`,n,`#${a}`,i);else if(e.colorMode===`ansi`){let[e,r]=kb.ansi.regular[n],[o,c]=kb.ansi.bold[n];s.push(t===`up`?e:r,t===`up`?`>>`:`<<`,n,t===`up`?o:c,`#${a}`,i,`\x1B[0m`)}else{let[e,r]=kb.css[n],o=`
22
+ background-color: #${t===`up`?e:r};
23
+ color: ${t===`up`?`black`:`white`};
24
+ padding: 2px;
25
+ `;s.push(`%c`,t===`up`?`>>`:`<<`,n,`#${a}`,`%c${i}%c`,`%O`),c.push(o,`${o}; font-weight: bold;`,`${o}; font-weight: normal;`)}return t===`up`?c.push(r?{input:o,context:e.context}:{input:o}):c.push((0,Db.default)({input:o,result:e.result,elapsedMs:e.elapsedMs},r&&{context:e.context})),{parts:s,args:c}}var jb=({c:e=console,colorMode:t=`css`,withContext:n})=>r=>{let i=r.input,a=Ob(i)?Object.fromEntries(i):i,{parts:o,args:s}=Ab((0,Db.default)((0,Db.default)({},r),{},{colorMode:t,input:a,withContext:n}));e[r.direction===`down`&&r.result&&(r.result instanceof Error||`error`in r.result.result&&r.result.result.error)?`error`:`log`].apply(null,[o.join(` `)].concat(s))};function Mb(e={}){let{enabled:t=()=>!0}=e,n=e.colorMode??(typeof window>`u`?`ansi`:`css`),r=e.withContext??n===`css`,{logger:i=jb({c:e.console,colorMode:n,withContext:r})}=e;return()=>({op:e,next:n})=>ty(r=>{t((0,Db.default)((0,Db.default)({},e),{},{direction:`up`}))&&i((0,Db.default)((0,Db.default)({},e),{},{direction:`up`}));let a=Date.now();function o(n){let r=Date.now()-a;t((0,Db.default)((0,Db.default)({},e),{},{direction:`down`,result:n}))&&i((0,Db.default)((0,Db.default)({},e),{},{direction:`down`,elapsedMs:r,result:n}))}return n(e).pipe(ay({next(e){o(e)},error(e){o(e)}})).subscribe(r)})}var Nb=(e,...t)=>typeof e==`function`?e(...t):e;Yv($v(),1);function Pb(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}async function Fb(e){let t=await Nb(e.url);return e.connectionParams?t+`${t.includes(`?`)?`&`:`?`}connectionParams=1`:t}async function Ib(e){let t={method:`connectionParams`,data:await Nb(e)};return JSON.stringify(t)}Yv($v(),1);var Lb=Yv($v(),1);function Rb(e){let{promise:t,resolve:n,reject:r}=Pb();return e.addEventListener(`open`,()=>{e.removeEventListener(`error`,r),n()}),e.addEventListener(`error`,r),t}function zb(e,{intervalMs:t,pongTimeoutMs:n}){let r,i;function a(){r=setTimeout(()=>{e.send(`PING`),i=setTimeout(()=>{e.close()},n)},t)}function o(){clearTimeout(r),a()}function s(){clearTimeout(i),o()}e.addEventListener(`open`,a),e.addEventListener(`message`,({data:e})=>{clearTimeout(r),a(),e===`PONG`&&s()}),e.addEventListener(`close`,()=>{clearTimeout(r),clearTimeout(i)})}var Bb=class e{constructor(t){if((0,Lb.default)(this,`id`,++e.connectCount),(0,Lb.default)(this,`WebSocketPonyfill`,void 0),(0,Lb.default)(this,`urlOptions`,void 0),(0,Lb.default)(this,`keepAliveOpts`,void 0),(0,Lb.default)(this,`wsObservable`,oy(null)),(0,Lb.default)(this,`openPromise`,null),this.WebSocketPonyfill=t.WebSocketPonyfill??WebSocket,!this.WebSocketPonyfill)throw Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive}get ws(){return this.wsObservable.get()}set ws(e){this.wsObservable.next(e)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var t=this;if(t.openPromise)return t.openPromise;t.id=++e.connectCount,t.openPromise=Fb(t.urlOptions).then(e=>new t.WebSocketPonyfill(e)).then(async e=>{t.ws=e,e.addEventListener(`message`,function({data:e}){e===`PING`&&this.send(`PONG`)}),t.keepAliveOpts.enabled&&zb(e,t.keepAliveOpts),e.addEventListener(`close`,()=>{t.ws===e&&(t.ws=null)}),await Rb(e),t.urlOptions.connectionParams&&e.send(await Ib(t.urlOptions.connectionParams))});try{await t.openPromise}finally{t.openPromise=null}}async close(){var e=this;try{await e.openPromise}finally{var t;(t=e.ws)==null||t.close()}}};(0,Lb.default)(Bb,`connectCount`,0),Yv($v(),1),Yv(ey(),1);var Vb=Yv($v(),1),Hb=Yv(ey(),1),Ub=class{constructor(e){(0,Vb.default)(this,`links`,void 0),(0,Vb.default)(this,`runtime`,void 0),(0,Vb.default)(this,`requestId`,void 0),this.requestId=0,this.runtime={},this.links=e.links.map(e=>e(this.runtime))}$request(e){return sy({links:this.links,op:(0,Hb.default)((0,Hb.default)({},e),{},{context:e.context??{},id:++this.requestId})}).pipe(iy())}async requestAsPromise(e){var t=this;try{return(await ry(t.$request(e))).result.data}catch(e){throw lb.from(e)}}query(e,t,n){return this.requestAsPromise({type:`query`,path:e,input:t,context:n?.context,signal:n?.signal})}mutation(e,t,n){return this.requestAsPromise({type:`mutation`,path:e,input:t,context:n?.context,signal:n?.signal})}subscription(e,t,n){return this.$request({type:`subscription`,path:e,input:t,context:n.context,signal:n.signal}).subscribe({next(e){switch(e.result.type){case`state`:var t;(t=n.onConnectionStateChange)==null||t.call(n,e.result);break;case`started`:var r;(r=n.onStarted)==null||r.call(n,{context:e.context});break;case`stopped`:var i;(i=n.onStopped)==null||i.call(n);break;case`data`:case void 0:var a;(a=n.onData)==null||a.call(n,e.result.data);break}},error(e){var t;(t=n.onError)==null||t.call(n,e)},complete(){var e;(e=n.onComplete)==null||e.call(n)}})}},Wb=Symbol.for(`trpc_untypedClient`),Gb={query:`query`,mutate:`mutation`,subscribe:`subscription`},Kb=e=>Gb[e];function qb(e){let t=Ty(({path:t,args:n})=>{let r=[...t],i=Kb(r.pop()),a=r.join(`.`);return e[i](a,...n)});return Ey(n=>n===Wb?e:t[n])}function Jb(e){return qb(new Ub(e))}function Yb(e){return e[Wb]}var Xb=Yv(ey(),1);function Zb(e){let t=mb(e),n=e.maxURLLength??1/0,r=e.maxItems??1/0;return()=>{let i=i=>({validate(e){if(n===1/0&&r===1/0)return!0;if(e.length>r)return!1;let a=e.map(e=>e.path).join(`,`),o=e.map(e=>e.input);return vb((0,Xb.default)((0,Xb.default)({},t),{},{type:i,path:a,inputs:o,signal:null})).length<=n},async fetch(n){let r=n.map(e=>e.path).join(`,`),a=n.map(e=>e.input),o=Tb(...n.map(e=>e.signal)),s=new AbortController,c=await Sb((0,Xb.default)((0,Xb.default)({},t),{},{signal:Eb(o,s.signal),type:i,contentTypeHeader:`application/json`,trpcAcceptHeader:`application/jsonl`,getUrl:vb,getBody:yb,inputs:a,path:r,headers(){return e.headers?typeof e.headers==`function`?e.headers({opList:n}):e.headers:{}}})),[l]=await nb({from:c.body,deserialize:e=>t.transformer.output.deserialize(e),formatError(e){let t=e.error;return lb.from({error:t})},abortController:s});return Object.keys(n).map(async e=>{let t=await Promise.resolve(l[e]);if(`result`in t){let e=await Promise.resolve(t.result);t={result:{data:await Promise.resolve(e.data)}}}return{json:t,meta:{response:c}}})}}),a={query:wb(i(`query`)),mutation:wb(i(`mutation`))};return({op:e})=>ty(t=>{if(e.type===`subscription`)throw Error("Subscriptions are unsupported by `httpBatchStreamLink` - use `httpSubscriptionLink` or `wsLink`");let n=a[e.type].load(e),r;return n.then(e=>{if(r=e,`error`in e.json){t.error(lb.from(e.json,{meta:e.meta}));return}else if(`result`in e.json){t.next({context:e.meta,result:e.json.result}),t.complete();return}t.complete()}).catch(e=>{t.error(lb.from(e,{meta:r?.meta}))}),()=>{}})}}Yv(ey(),1),Yv(qv({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function n(e){var t,n,i,a=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,i=Symbol.iterator);a--;){if(n&&(t=e[n])!=null)return t.call(e);if(i&&(t=e[i])!=null)return new r(t.call(e));n=`@@asyncIterator`,i=`@@iterator`}throw TypeError(`Object is not async iterable`)}function r(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return r=function(e){this.s=e,this.n=e.next},r.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new r(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}})(),1),Yv(ey(),1);var Qb=qv({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(e,t){function n(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),$b=qv({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(e,t){function n(e,t){this.v=e,this.k=t}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),ex=qv({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(e,t){var n=$b();function r(e){return new n(e,0)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),tx=qv({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(e,t){var n=$b();function r(e){return function(){return new i(e.apply(this,arguments))}}function i(e){var t,r;function i(t,r){try{var o=e[t](r),s=o.value,c=s instanceof n;Promise.resolve(c?s.v:s).then(function(n){if(c){var r=t===`return`?`return`:`next`;if(!s.k||n.done)return i(r,n);n=e[r](n).value}a(o.done?`return`:`normal`,n)},function(e){i(`throw`,e)})}catch(e){a(`throw`,e)}}function a(e,n){switch(e){case`return`:t.resolve({value:n,done:!0});break;case`throw`:t.reject(n);break;default:t.resolve({value:n,done:!1})}(t=t.next)?i(t.key,t.arg):r=null}this._invoke=function(e,n){return new Promise(function(a,o){var s={key:e,arg:n,resolve:a,reject:o,next:null};r?r=r.next=s:(t=r=s,i(e,n))})},typeof e.return!=`function`&&(this.return=void 0)}i.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},i.prototype.next=function(e){return this._invoke(`next`,e)},i.prototype.throw=function(e){return this._invoke(`throw`,e)},i.prototype.return=function(e){return this._invoke(`return`,e)},t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}});Yv(Qb(),1),Yv(ex(),1),Yv(tx(),1),Yv(ey(),1);var nx=Object.create,rx=Object.defineProperty,ix=Object.getOwnPropertyDescriptor,ax=Object.getOwnPropertyNames,ox=Object.getPrototypeOf,sx=Object.prototype.hasOwnProperty,cx=(e,t)=>function(){return t||(0,e[ax(e)[0]])((t={exports:{}}).exports,t),t.exports},lx=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ax(t),a=0,o=i.length,s;a<o;a++)s=i[a],!sx.call(e,s)&&s!==n&&rx(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=ix(t,s))||r.enumerable});return e},ux=(e,t,n)=>(n=e==null?{}:nx(ox(e)),lx(t||!e||!e.__esModule?rx(n,`default`,{value:e,enumerable:!0}):n,e)),dx=cx({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(e,t){function n(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),fx=cx({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(e,t){var n=dx();function r(e,t){if(e==null)return{};var r,i,a=n(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),px=cx({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),mx=cx({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=px().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),hx=cx({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=px().default,r=mx();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),gx=cx({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=hx();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),_x=cx({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=gx();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),vx=ux(fx(),1),yx=ux(_x(),1),bx=[`cursor`,`direction`];function xx(e,t,n){let r=e.flatMap(e=>e.split(`.`));if(!t&&(!n||n===`any`))return r.length?[r]:[];if(n===`infinite`&&ly(t)&&(`direction`in t||`cursor`in t)){let{cursor:e,direction:n}=t;return[r,{input:(0,vx.default)(t,bx),type:`infinite`}]}return[r,(0,yx.default)((0,yx.default)({},t!==void 0&&t!==E_&&{input:t}),n&&n!==`any`&&{type:n})]}function Sx(e){return xx(e,void 0,`any`)}function Cx(e){return Ty(({path:t,args:n})=>{let r=[...t],i=r.pop();if(i===`useMutation`)return e[i](r,...n);if(i===`_def`)return{path:r};let[a,...o]=n,s=o[0]??{};return e[i](r,a,s)})}var wx=[`client`,`ssrContext`,`ssrState`,`abortOnUnmount`],Tx=B.createContext?.call(B,null),Ex=e=>{switch(e){case`queryOptions`:case`fetch`:case`ensureData`:case`prefetch`:case`getData`:case`setData`:case`setQueriesData`:return`query`;case`infiniteQueryOptions`:case`fetchInfinite`:case`prefetchInfinite`:case`getInfiniteData`:case`setInfiniteData`:return`infinite`;case`setMutationDefaults`:case`getMutationDefaults`:case`isMutating`:case`cancel`:case`invalidate`:case`refetch`:case`reset`:return`any`}};function Dx(e){return Ty(t=>{let n=[...t.path],r=n.pop(),i=[...t.args],a=i.shift(),o=xx(n,a,Ex(r));return{infiniteQueryOptions:()=>e.infiniteQueryOptions(n,o,i[0]),queryOptions:()=>e.queryOptions(n,o,...i),fetch:()=>e.fetchQuery(o,...i),fetchInfinite:()=>e.fetchInfiniteQuery(o,i[0]),prefetch:()=>e.prefetchQuery(o,...i),prefetchInfinite:()=>e.prefetchInfiniteQuery(o,i[0]),ensureData:()=>e.ensureQueryData(o,...i),invalidate:()=>e.invalidateQueries(o,...i),reset:()=>e.resetQueries(o,...i),refetch:()=>e.refetchQueries(o,...i),cancel:()=>e.cancelQuery(o,...i),setData:()=>{e.setQueryData(o,i[0],i[1])},setQueriesData:()=>e.setQueriesData(o,i[0],i[1],i[2]),setInfiniteData:()=>{e.setInfiniteQueryData(o,i[0],i[1])},getData:()=>e.getQueryData(o),getInfiniteData:()=>e.getInfiniteQueryData(o),setMutationDefaults:()=>e.setMutationDefaults(Sx(n),a),getMutationDefaults:()=>e.getMutationDefaults(Sx(n)),isMutating:()=>e.isMutating({mutationKey:Sx(n)})}[r]()})}function Ox(e){let t=qb(e.client),n=Dx(e);return Ey(r=>{let i=r;return i===`client`?t:wx.includes(i)?e[i]:n[r]})}var kx=ux(_x(),1);function Ax(e){let t=e instanceof Ub?e:Yb(e);return Ty(e=>{let n=e.path,r=n.join(`.`),[i,a]=e.args;return(0,kx.default)({queryKey:xx(n,i,`query`),queryFn:()=>t.query(r,i,a?.trpc)},a)})}var jx=ux(_x(),1);function Mx(e,t,n){let r=e[0],i=e[1]?.input;return n&&(i=(0,jx.default)((0,jx.default)((0,jx.default)({},i??{}),n.pageParam?{cursor:n.pageParam}:{}),{},{direction:n.direction})),[r.join(`.`),i,t?.trpc]}var Nx=ux(cx({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function n(e){var t,n,i,a=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,i=Symbol.iterator);a--;){if(n&&(t=e[n])!=null)return t.call(e);if(i&&(t=e[i])!=null)return new r(t.call(e));n=`@@asyncIterator`,i=`@@iterator`}throw TypeError(`Object is not async iterable`)}function r(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return r=function(e){this.s=e,this.n=e.next},r.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new r(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}})(),1);function Px(e){return{path:e.path.join(`.`)}}function Fx(e){let t=Px(e);return B.useMemo(()=>t,[t])}async function Ix(e,t,n){let r=t.getQueryCache().build(t,{queryKey:n});r.setState({data:[],status:`success`});let i=[];var a=!1,o=!1,s;try{for(var c=(0,Nx.default)(e),l;a=!(l=await c.next()).done;a=!1){let e=l.value;i.push(e),r.setState({data:[...i]})}}catch(e){o=!0,s=e}finally{try{a&&c.return!=null&&await c.return()}finally{if(o)throw s}}return i}var Lx=ux(_x(),1);function Rx(e){let{client:t,queryClient:n}=e,r=t instanceof Ub?t:Yb(t);return{infiniteQueryOptions:(e,t,n)=>{let i=t[1]?.input===E_;return Object.assign(Rv((0,Lx.default)((0,Lx.default)({},n),{},{initialData:n?.initialData,queryKey:t,queryFn:i?E_:async e=>{var i;let a=(0,Lx.default)((0,Lx.default)({},n),{},{trpc:(0,Lx.default)((0,Lx.default)({},n?.trpc),!(n==null||(i=n.trpc)==null)&&i.abortOnUnmount?{signal:e.signal}:{signal:null})});return await r.query(...Mx(t,a,{direction:e.direction,pageParam:e.pageParam}))},initialPageParam:n?.initialCursor??null})),{trpc:Px({path:e})})},queryOptions:(e,t,i)=>{let a=t[1]?.input===E_;return Object.assign(Lv((0,Lx.default)((0,Lx.default)({},i),{},{initialData:i?.initialData,queryKey:t,queryFn:a?E_:async e=>{var a;let o=(0,Lx.default)((0,Lx.default)({},i),{},{trpc:(0,Lx.default)((0,Lx.default)({},i?.trpc),!(i==null||(a=i.trpc)==null)&&a.abortOnUnmount?{signal:e.signal}:{signal:null})}),s=await r.query(...Mx(t,o));return dy(s)?Ix(s,n,t):s}})),{trpc:Px({path:e})})},fetchQuery:(e,t)=>n.fetchQuery((0,Lx.default)((0,Lx.default)({},t),{},{queryKey:e,queryFn:()=>r.query(...Mx(e,t))})),fetchInfiniteQuery:(e,t)=>n.fetchInfiniteQuery((0,Lx.default)((0,Lx.default)({},t),{},{queryKey:e,queryFn:({pageParam:n,direction:i})=>r.query(...Mx(e,t,{pageParam:n,direction:i})),initialPageParam:t?.initialCursor??null})),prefetchQuery:(e,t)=>n.prefetchQuery((0,Lx.default)((0,Lx.default)({},t),{},{queryKey:e,queryFn:()=>r.query(...Mx(e,t))})),prefetchInfiniteQuery:(e,t)=>n.prefetchInfiniteQuery((0,Lx.default)((0,Lx.default)({},t),{},{queryKey:e,queryFn:({pageParam:n,direction:i})=>r.query(...Mx(e,t,{pageParam:n,direction:i})),initialPageParam:t?.initialCursor??null})),ensureQueryData:(e,t)=>n.ensureQueryData((0,Lx.default)((0,Lx.default)({},t),{},{queryKey:e,queryFn:()=>r.query(...Mx(e,t))})),invalidateQueries:(e,t,r)=>n.invalidateQueries((0,Lx.default)((0,Lx.default)({},t),{},{queryKey:e}),r),resetQueries:(e,t,r)=>n.resetQueries((0,Lx.default)((0,Lx.default)({},t),{},{queryKey:e}),r),refetchQueries:(e,t,r)=>n.refetchQueries((0,Lx.default)((0,Lx.default)({},t),{},{queryKey:e}),r),cancelQuery:(e,t)=>n.cancelQueries({queryKey:e},t),setQueryData:(e,t,r)=>n.setQueryData(e,t,r),setQueriesData:(e,t,r,i)=>n.setQueriesData((0,Lx.default)((0,Lx.default)({},t),{},{queryKey:e}),r,i),getQueryData:e=>n.getQueryData(e),setInfiniteQueryData:(e,t,r)=>n.setQueryData(e,t,r),getInfiniteQueryData:e=>n.getQueryData(e),setMutationDefaults:(t,i)=>{let a=t[0];return n.setMutationDefaults(t,typeof i==`function`?i({canonicalMutationFn:t=>r.mutation(...Mx([a,{input:t}],e))}):i)},getMutationDefaults:e=>n.getMutationDefaults(e),isMutating:e=>n.isMutating((0,Lx.default)((0,Lx.default)({},e),{},{exact:!0}))}}var U=ux(_x()),zx=(e,t)=>new Proxy(e,{get(e,n){return t(n),e[n]}});function Bx(e){var t;let n=(e==null||(t=e.overrides)==null||(t=t.useMutation)==null?void 0:t.onSuccess)??(e=>e.originalFn()),r=e?.context??Tx,i=Jb,a=e=>{let{abortOnUnmount:t=!1,queryClient:n,ssrContext:i}=e,[a,o]=B.useState(e.ssrState??!1),s=e.client instanceof Ub?e.client:Yb(e.client),c=B.useMemo(()=>Rx({client:s,queryClient:n}),[s,n]),l=B.useMemo(()=>(0,U.default)({abortOnUnmount:t,queryClient:n,client:s,ssrContext:i??null,ssrState:a},c),[t,s,c,n,i,a]);return B.useEffect(()=>{o(e=>e?`mounted`:!1)},[]),(0,V.jsx)(r.Provider,{value:l,children:e.children})};function o(){let e=B.useContext(r);if(!e)throw Error("Unable to find tRPC Context. Did you forget to wrap your App inside `withTRPC` HoC?");return e}function s(e,t){let{queryClient:n,ssrState:r}=o();return r&&r!==`mounted`&&n.getQueryCache().find({queryKey:e})?.state.status===`error`?(0,U.default)({retryOnMount:!1},t):t}function c(t,n,r){var i,a;let{abortOnUnmount:c,client:l,ssrState:u,queryClient:d,prefetchQuery:f}=o(),p=xx(t,n,`query`),m=d.getQueryDefaults(p),h=n===E_;typeof window>`u`&&u===`prepass`&&(r==null||(i=r.trpc)==null?void 0:i.ssr)!==!1&&(r?.enabled??m?.enabled)!==!1&&!h&&!d.getQueryCache().find({queryKey:p})&&f(p,r);let g=s(p,(0,U.default)((0,U.default)({},m),r)),_=(r==null||(a=r.trpc)==null?void 0:a.abortOnUnmount)??e?.abortOnUnmount??c,v=jv((0,U.default)((0,U.default)({},g),{},{queryKey:p,queryFn:h?n:async e=>{let t=(0,U.default)((0,U.default)({},g),{},{trpc:(0,U.default)((0,U.default)({},g?.trpc),_?{signal:e.signal}:{signal:null})}),n=await l.query(...Mx(p,t));return dy(n)?Ix(n,d,p):n}}),d);return v.trpc=Fx({path:t}),v}function l(t,n,r){var i;let a=o(),s=xx(t,n,`query`),c=n===E_,l=(r==null||(i=r.trpc)==null?void 0:i.abortOnUnmount)??e?.abortOnUnmount??a.abortOnUnmount;Fv((0,U.default)((0,U.default)({},r),{},{queryKey:s,queryFn:c?n:e=>{let t={trpc:(0,U.default)((0,U.default)({},r?.trpc),l?{signal:e.signal}:{})};return a.client.query(...Mx(s,t))}}))}function u(t,n,r){var i;let a=o(),s=xx(t,n,`query`),c=(r==null||(i=r.trpc)==null?void 0:i.abortOnUnmount)??e?.abortOnUnmount??a.abortOnUnmount,l=Mv((0,U.default)((0,U.default)({},r),{},{queryKey:s,queryFn:e=>{let t=(0,U.default)((0,U.default)({},r),{},{trpc:(0,U.default)((0,U.default)({},r?.trpc),c?{signal:e.signal}:{signal:null})});return a.client.query(...Mx(s,t))}}),a.queryClient);return l.trpc=Fx({path:t}),[l.data,l]}function d(e,t){let{client:r,queryClient:i}=o(),a=Sx(e),s=i.defaultMutationOptions(i.getMutationDefaults(a)),c=zv((0,U.default)((0,U.default)({},t),{},{mutationKey:a,mutationFn:n=>r.mutation(...Mx([e,{input:n}],t)),onSuccess(...e){return n({originalFn:()=>{var n,r;return(t==null||(n=t.onSuccess)==null?void 0:n.call(t,...e))??(s==null||(r=s.onSuccess)==null?void 0:r.call(s,...e))},queryClient:i,meta:t?.meta??s?.meta??{}})}}),i);return c.trpc=Fx({path:e}),c}let f={data:void 0,error:null,status:`idle`},p={data:void 0,error:null,status:`connecting`};function m(e,t,n){let r=n?.enabled??t!==E_,i=m_(xx(e,t,`any`)),{client:a}=o(),s=B.useRef(n);B.useEffect(()=>{s.current=n});let[c]=B.useState(new Set([])),l=B.useCallback(e=>{c.add(e)},[c]),u=B.useRef(null),d=B.useCallback(e=>{let t=h.current,n=h.current=e(t),r=!1;for(let e of c)if(t[e]!==n[e]){r=!0;break}r&&_(zx(n,l))},[l,c]),m=B.useCallback(()=>{var n;if((n=u.current)==null||n.unsubscribe(),!r){d(()=>(0,U.default)((0,U.default)({},f),{},{reset:m}));return}d(()=>(0,U.default)((0,U.default)({},p),{},{reset:m})),u.current=a.subscription(e.join(`.`),t??void 0,{onStarted:()=>{var e,t;(e=(t=s.current).onStarted)==null||e.call(t),d(e=>(0,U.default)((0,U.default)({},e),{},{status:`pending`,error:null}))},onData:e=>{var t,n;(t=(n=s.current).onData)==null||t.call(n,e),d(t=>(0,U.default)((0,U.default)({},t),{},{status:`pending`,data:e,error:null}))},onError:e=>{var t,n;(t=(n=s.current).onError)==null||t.call(n,e),d(t=>(0,U.default)((0,U.default)({},t),{},{status:`error`,error:e}))},onConnectionStateChange:e=>{d(t=>{switch(e.state){case`idle`:return(0,U.default)((0,U.default)({},t),{},{status:e.state,error:null,data:void 0});case`connecting`:return(0,U.default)((0,U.default)({},t),{},{error:e.error,status:e.state});case`pending`:return t}})},onComplete:()=>{var e,t;(e=(t=s.current).onComplete)==null||e.call(t),d(e=>(0,U.default)((0,U.default)({},e),{},{status:`idle`,error:null,data:void 0}))}})},[a,i,r,d]);B.useEffect(()=>(m(),()=>{var e;(e=u.current)==null||e.unsubscribe()}),[m]);let h=B.useRef(r?(0,U.default)((0,U.default)({},p),{},{reset:m}):(0,U.default)((0,U.default)({},f),{},{reset:m})),[g,_]=B.useState(zx(h.current,l));return g}function h(e,t,n){var r,i;let{client:a,ssrState:c,prefetchInfiniteQuery:l,queryClient:u,abortOnUnmount:d}=o(),f=xx(e,t,`infinite`),p=u.getQueryDefaults(f),m=t===E_;typeof window>`u`&&c===`prepass`&&(n==null||(r=n.trpc)==null?void 0:r.ssr)!==!1&&(n?.enabled??p?.enabled)!==!1&&!m&&!u.getQueryCache().find({queryKey:f})&&l(f,(0,U.default)((0,U.default)({},p),n));let h=s(f,(0,U.default)((0,U.default)({},p),n)),g=(n==null||(i=n.trpc)==null?void 0:i.abortOnUnmount)??d,_=Bv((0,U.default)((0,U.default)({},h),{},{initialPageParam:n.initialCursor??null,persister:n.persister,queryKey:f,queryFn:m?t:e=>{let t=(0,U.default)((0,U.default)({},h),{},{trpc:(0,U.default)((0,U.default)({},h?.trpc),g?{signal:e.signal}:{signal:null})});return a.query(...Mx(f,t,{pageParam:e.pageParam??n.initialCursor,direction:e.direction}))}}),u);return _.trpc=Fx({path:e}),_}function g(e,t,n){var r;let i=o(),a=xx(e,t,`infinite`),c=i.queryClient.getQueryDefaults(a),l=t===E_,u=s(a,(0,U.default)((0,U.default)({},c),n)),d=(n==null||(r=n.trpc)==null?void 0:r.abortOnUnmount)??i.abortOnUnmount;Iv((0,U.default)((0,U.default)({},n),{},{initialPageParam:n.initialCursor??null,queryKey:a,queryFn:l?t:e=>{let t=(0,U.default)((0,U.default)({},u),{},{trpc:(0,U.default)((0,U.default)({},u?.trpc),d?{signal:e.signal}:{})});return i.client.query(...Mx(a,t,{pageParam:e.pageParam??n.initialCursor,direction:e.direction}))}}))}function _(e,t,n){var r;let i=o(),a=xx(e,t,`infinite`),c=i.queryClient.getQueryDefaults(a),l=s(a,(0,U.default)((0,U.default)({},c),n)),u=(n==null||(r=n.trpc)==null?void 0:r.abortOnUnmount)??i.abortOnUnmount,d=Nv((0,U.default)((0,U.default)({},n),{},{initialPageParam:n.initialCursor??null,queryKey:a,queryFn:e=>{let t=(0,U.default)((0,U.default)({},l),{},{trpc:(0,U.default)((0,U.default)({},l?.trpc),u?{signal:e.signal}:{})});return i.client.query(...Mx(a,t,{pageParam:e.pageParam??n.initialCursor,direction:e.direction}))}}),i.queryClient);return d.trpc=Fx({path:e}),[d.data,d]}return{Provider:a,createClient:i,useContext:o,useUtils:o,useQuery:c,usePrefetchQuery:l,useSuspenseQuery:u,useQueries:(e,t)=>{let{ssrState:n,queryClient:r,prefetchQuery:i,client:a}=o(),s=e(Ax(a));if(typeof window>`u`&&n===`prepass`)for(let e of s){let t=e;t.trpc?.ssr!==!1&&!r.getQueryCache().find({queryKey:t.queryKey})&&i(t.queryKey,t)}return kv({queries:s.map(e=>(0,U.default)((0,U.default)({},e),{},{queryKey:e.queryKey})),combine:t?.combine},r)},useSuspenseQueries:e=>{let{queryClient:t,client:n}=o(),r=Pv({queries:e(Ax(n)).map(e=>(0,U.default)((0,U.default)({},e),{},{queryFn:e.queryFn,queryKey:e.queryKey}))},t);return[r.map(e=>e.data),r]},useMutation:d,useSubscription:m,useInfiniteQuery:h,usePrefetchInfiniteQuery:g,useSuspenseInfiniteQuery:_}}function Vx(e){let t=Cx(e);return Ey(n=>n===`useContext`||n===`useUtils`?()=>{let t=e.useUtils();return B.useMemo(()=>Ox(t),[t])}:e.hasOwnProperty(n)?e[n]:t[n])}function Hx(e){return Vx(Bx(e))}var Ux=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},Wx=class{constructor(e){this.generateIdentifier=e,this.kv=new Ux}register(e,t){this.kv.getByValue(e)||(t||=this.generateIdentifier(e),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}},Gx=class extends Wx{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t==`object`?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function Kx(e){if(`values`in Object)return Object.values(e);let t=[];for(let n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function qx(e,t){let n=Kx(e);if(`find`in n)return n.find(t);let r=n;for(let e=0;e<r.length;e++){let n=r[e];if(t(n))return n}}function Jx(e,t){Object.entries(e).forEach(([e,n])=>t(n,e))}function Yx(e,t){return e.indexOf(t)!==-1}function Xx(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(t(r))return r}}var Zx=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return qx(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}},Qx=e=>Object.prototype.toString.call(e).slice(8,-1);const $x=e=>e===void 0,eS=e=>e===null,tS=e=>typeof e!=`object`||!e||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,nS=e=>tS(e)&&Object.keys(e).length===0,rS=e=>Array.isArray(e),iS=e=>typeof e==`string`,aS=e=>typeof e==`number`&&!isNaN(e),oS=e=>typeof e==`boolean`,sS=e=>e instanceof RegExp,cS=e=>e instanceof Map,lS=e=>e instanceof Set,uS=e=>Qx(e)===`Symbol`,dS=e=>e instanceof Date&&!isNaN(e.valueOf()),fS=e=>e instanceof Error,pS=e=>typeof e==`number`&&isNaN(e),mS=e=>oS(e)||eS(e)||$x(e)||aS(e)||iS(e)||uS(e),hS=e=>typeof e==`bigint`,gS=e=>e===1/0||e===-1/0,_S=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),vS=e=>e instanceof URL,yS=e=>e.replace(/\\/g,`\\\\`).replace(/\./g,`\\.`),bS=e=>e.map(String).map(yS).join(`.`),xS=(e,t)=>{let n=[],r=``;for(let i=0;i<e.length;i++){let a=e.charAt(i);if(!t&&a===`\\`){let t=e.charAt(i+1);if(t===`\\`){r+=`\\`,i++;continue}else if(t!==`.`)throw Error(`invalid path`)}if(a===`\\`&&e.charAt(i+1)===`.`){r+=`.`,i++;continue}if(a===`.`){n.push(r),r=``;continue}r+=a}let i=r;return n.push(i),n};function SS(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var CS=[SS($x,`undefined`,()=>null,()=>void 0),SS(hS,`bigint`,e=>e.toString(),e=>typeof BigInt<`u`?BigInt(e):(console.error(`Please add a BigInt polyfill.`),e)),SS(dS,`Date`,e=>e.toISOString(),e=>new Date(e)),SS(fS,`Error`,(e,t)=>{let n={name:e.name,message:e.message};return`cause`in e&&(n.cause=e.cause),t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n},(e,t)=>{let n=Error(e.message,{cause:e.cause});return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n}),SS(sS,`regexp`,e=>``+e,e=>{let t=e.slice(1,e.lastIndexOf(`/`)),n=e.slice(e.lastIndexOf(`/`)+1);return new RegExp(t,n)}),SS(lS,`set`,e=>[...e.values()],e=>new Set(e)),SS(cS,`map`,e=>[...e.entries()],e=>new Map(e)),SS(e=>pS(e)||gS(e),`number`,e=>pS(e)?`NaN`:e>0?`Infinity`:`-Infinity`,Number),SS(e=>e===0&&1/e==-1/0,`number`,()=>`-0`,Number),SS(vS,`URL`,e=>e.toString(),e=>new URL(e))];function wS(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var TS=wS((e,t)=>uS(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>[`symbol`,t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{let r=n.symbolRegistry.getValue(t[1]);if(!r)throw Error(`Trying to deserialize unknown symbol`);return r}),ES=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),DS=wS(_S,e=>[`typed-array`,e.constructor.name],e=>[...e],(e,t)=>{let n=ES[t[1]];if(!n)throw Error(`Trying to deserialize unknown typed array`);return new n(e)});function OS(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var kS=wS(OS,(e,t)=>[`class`,t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{let n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};let r={};return n.forEach(t=>{r[t]=e[t]}),r},(e,t,n)=>{let r=n.classRegistry.getValue(t[1]);if(!r)throw Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),AS=wS((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>[`custom`,t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{let r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw Error(`Trying to deserialize unknown custom value`);return r.deserialize(e)}),jS=[kS,TS,AS,DS];const MS=(e,t)=>{let n=Xx(jS,n=>n.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};let r=Xx(CS,n=>n.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}};var NS={};CS.forEach(e=>{NS[e.annotation]=e});const PS=(e,t,n)=>{if(rS(t))switch(t[0]){case`symbol`:return TS.untransform(e,t,n);case`class`:return kS.untransform(e,t,n);case`custom`:return AS.untransform(e,t,n);case`typed-array`:return DS.untransform(e,t,n);default:throw Error(`Unknown transformation: `+t)}else{let r=NS[t];if(!r)throw Error(`Unknown transformation: `+t);return r.untransform(e,n)}};var FS=(e,t)=>{if(t>e.size)throw Error(`index out of bounds`);let n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function IS(e){if(Yx(e,`__proto__`))throw Error(`__proto__ is not allowed as a property`);if(Yx(e,`prototype`))throw Error(`prototype is not allowed as a property`);if(Yx(e,`constructor`))throw Error(`constructor is not allowed as a property`)}const LS=(e,t)=>{IS(t);for(let n=0;n<t.length;n++){let r=t[n];if(lS(e))e=FS(e,+r);else if(cS(e)){let i=+r,a=+t[++n]==0?`key`:`value`,o=FS(e,i);switch(a){case`key`:e=o;break;case`value`:e=e.get(o);break}}else e=e[r]}return e},RS=(e,t,n)=>{if(IS(t),t.length===0)return n(e);let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(rS(r)){let e=+n;r=r[e]}else if(tS(r))r=r[n];else if(lS(r)){let e=+n;r=FS(r,e)}else if(cS(r)){if(e===t.length-2)break;let i=+n,a=+t[++e]==0?`key`:`value`,o=FS(r,i);switch(a){case`key`:r=o;break;case`value`:r=r.get(o);break}}}let i=t[t.length-1];if(rS(r)?r[+i]=n(r[+i]):tS(r)&&(r[i]=n(r[i])),lS(r)){let e=FS(r,+i),t=n(e);e!==t&&(r.delete(e),r.add(t))}if(cS(r)){let e=+t[t.length-2],a=FS(r,e);switch(+i==0?`key`:`value`){case`key`:{let e=n(a);r.set(e,r.get(a)),e!==a&&r.delete(a);break}case`value`:r.set(a,n(r.get(a)));break}}return e};var zS=e=>e<1;function BS(e,t,n,r=[]){if(!e)return;let i=zS(n);if(!rS(e)){Jx(e,(e,a)=>BS(e,t,n,[...r,...xS(a,i)]));return}let[a,o]=e;o&&Jx(o,(e,a)=>{BS(e,t,n,[...r,...xS(a,i)])}),t(a,r)}function VS(e,t,n,r){return BS(t,(t,n)=>{e=RS(e,n,e=>PS(e,t,r))},n),e}function HS(e,t,n){let r=zS(n);function i(t,n){let i=LS(e,xS(n,r));t.map(e=>xS(e,r)).forEach(t=>{e=RS(e,t,()=>i)})}if(rS(t)){let[n,a]=t;n.forEach(t=>{e=RS(e,xS(t,r),()=>e)}),a&&Jx(a,i)}else Jx(t,i);return e}var US=(e,t)=>tS(e)||rS(e)||cS(e)||lS(e)||fS(e)||OS(e,t);function WS(e,t,n){let r=n.get(e);r?r.push(t):n.set(e,[t])}function GS(e,t){let n={},r;return e.forEach(e=>{if(e.length<=1)return;t||(e=e.map(e=>e.map(String)).sort((e,t)=>e.length-t.length));let[i,...a]=e;i.length===0?r=a.map(bS):n[bS(i)]=a.map(bS)}),r?nS(n)?[r]:[r,n]:nS(n)?void 0:n}const KS=(e,t,n,r,i=[],a=[],o=new Map)=>{let s=mS(e);if(!s){WS(e,i,t);let n=o.get(e);if(n)return r?{transformedValue:null}:n}if(!US(e,n)){let t=MS(e,n),r=t?{transformedValue:t.value,annotations:[t.type]}:{transformedValue:e};return s||o.set(e,r),r}if(Yx(a,e))return{transformedValue:null};let c=MS(e,n),l=c?.value??e,u=rS(l)?[]:{},d={};Jx(l,(s,c)=>{if(c===`__proto__`||c===`constructor`||c===`prototype`)throw Error(`Detected property ${c}. This is a prototype pollution risk, please remove it from your object.`);let l=KS(s,t,n,r,[...i,c],[...a,e],o);u[c]=l.transformedValue,rS(l.annotations)?d[yS(c)]=l.annotations:tS(l.annotations)&&Jx(l.annotations,(e,t)=>{d[yS(c)+`.`+t]=e})});let f=nS(d)?{transformedValue:u,annotations:c?[c.type]:void 0}:{transformedValue:u,annotations:c?[c.type,d]:d};return s||o.set(e,f),f};function qS(e){return Object.prototype.toString.call(e).slice(8,-1)}function JS(e){return qS(e)===`Array`}function YS(e){if(qS(e)!==`Object`)return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function XS(e,t,n,r,i){let a={}.propertyIsEnumerable.call(r,t)?`enumerable`:`nonenumerable`;a===`enumerable`&&(e[t]=n),i&&a===`nonenumerable`&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function ZS(e,t={}){if(JS(e))return e.map(e=>ZS(e,t));if(!YS(e))return e;let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((n,r)=>{if(r===`__proto__`||JS(t.props)&&!t.props.includes(r))return n;let i=e[r];return XS(n,r,ZS(i,t),e,t.nonenumerable),n},{})}var W=class{constructor({dedupe:e=!1}={}){this.classRegistry=new Gx,this.symbolRegistry=new Wx(e=>e.description??``),this.customTransformerRegistry=new Zx,this.allowedErrorProps=[],this.dedupe=e}serialize(e){let t=new Map,n=KS(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});let i=GS(t,this.dedupe);return i&&(r.meta={...r.meta,referentialEqualities:i}),r.meta&&(r.meta.v=1),r}deserialize(e,t){let{json:n,meta:r}=e,i=t?.inPlace?n:ZS(n);return r?.values&&(i=VS(i,r.values,r.v??0,this)),r?.referentialEqualities&&(i=HS(i,r.referentialEqualities,r.v??0)),i}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e),{inPlace:!0})}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};W.defaultInstance=new W,W.serialize=W.defaultInstance.serialize.bind(W.defaultInstance),W.deserialize=W.defaultInstance.deserialize.bind(W.defaultInstance),W.stringify=W.defaultInstance.stringify.bind(W.defaultInstance),W.parse=W.defaultInstance.parse.bind(W.defaultInstance),W.registerClass=W.defaultInstance.registerClass.bind(W.defaultInstance),W.registerSymbol=W.defaultInstance.registerSymbol.bind(W.defaultInstance),W.registerCustom=W.defaultInstance.registerCustom.bind(W.defaultInstance),W.allowErrorProps=W.defaultInstance.allowErrorProps.bind(W.defaultInstance),W.serialize,W.deserialize,W.stringify,W.parse,W.registerClass,W.registerCustom,W.registerSymbol,W.allowErrorProps;var QS=R();const $S=Hx();function eC(e){let t=(0,QS.c)(7),{children:n}=e,[r]=(0,B.useState)(rC),[i]=(0,B.useState)(tC),a;t[0]!==n||t[1]!==r?(a=(0,V.jsx)(hv,{client:r,children:n}),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o;return t[3]!==r||t[4]!==a||t[5]!==i?(o=(0,V.jsx)($S.Provider,{client:i,queryClient:r,children:a}),t[3]=r,t[4]=a,t[5]=i,t[6]=o):o=t[6],o}function tC(){return $S.createClient({links:[Mb({enabled:nC}),Zb({transformer:W,url:`/trpc`,async headers(){return{}}})]})}function nC(e){return process.env.NODE_ENV!==`production`||e.direction===`down`&&e.result instanceof Error}function rC(){return new fv({defaultOptions:{mutations:{retry:!1},queries:{gcTime:6e4,refetchOnWindowFocus:!0,refetchOnReconnect:!0,refetchOnMount:!0,retry:!1,retryDelay:iC,staleTime:0}}})}function iC(e){return Math.min(1e3*2**e,3e4)}var aC=`/assets/root-D0CFuQYc.css`,oC=n({ErrorBoundary:()=>vf,Layout:()=>dC,default:()=>fC,links:()=>cC,loader:()=>uC,meta:()=>lC}),sC=R();const cC=()=>[{rel:`stylesheet`,href:aC,precedence:`high`},{rel:`preconnect`,href:`https://fonts.googleapis.com`},{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossOrigin:`anonymous`},{rel:`stylesheet`,href:`https://fonts.googleapis.com/css2?family=Geist+Sans:wght@100;200;300;400;500;600;700;800;900&display=swap`},{rel:`stylesheet`,href:`https://fonts.googleapis.com/css2?family=Geist+Mono:wght@100;200;300;400;500;600;700;800;900&display=swap`},{rel:`icon`,href:`/favicon.ico`,type:`image/x-icon`}];function lC({loaderData:e}){return[{title:e?.env.APP_NAME||``},{name:`description`,content:e?.env.APP_DESC||``}]}async function uC({context:e,request:t}){let n=e.get(D);return m({dir:n.dir,env:{APP_NAME:n.container.config.APPOS_APP_NAME,APP_DESC:n.container.config.APPOS_APP_DESC,CF_TURNSTILE_SITE_KEY:n.container.config.APPOS_AUTH_CAPTCHA_SITE_KEY},features:n.container.auth.uiFeatures,lang:n.language},{headers:{}})}function dC(e){let t=(0,sC.c)(16),{children:n}=e,r=g(),i;t[0]===r?i=t[1]:(i=r||{env:{CF_TURNSTILE_SITE_KEY:`1x00000000000000000000AA`},features:{captcha:!1,apiKey:!0,lastLoginMethod:!0,organization:{teams:!0},sso:!0,twoFactor:!0},dir:`ltr`,lang:`en`},t[0]=r,t[1]=i);let{features:a,dir:o,lang:s}=i,c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,V.jsxs)(`head`,{children:[(0,V.jsx)(`meta`,{charSet:`utf-8`}),(0,V.jsx)(`meta`,{name:`viewport`,content:`width=device-width, initial-scale=1`}),(0,V.jsx)(v,{}),(0,V.jsx)(_,{})]}),t[2]=c):c=t[2];let l;t[3]===n?l=t[4]:(l=(0,V.jsx)(eC,{children:(0,V.jsx)(Yg,{children:n})}),t[3]=n,t[4]=l);let u;t[5]!==a||t[6]!==l?(u=(0,V.jsx)(Kt,{children:(0,V.jsx)(jm,{features:a,children:l})}),t[5]=a,t[6]=l,t[7]=u):u=t[7];let d,f;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,V.jsx)(y,{}),f=(0,V.jsx)(b,{}),t[8]=d,t[9]=f):(d=t[8],f=t[9]);let p;t[10]===u?p=t[11]:(p=(0,V.jsxs)(`body`,{children:[u,d,f]}),t[10]=u,t[11]=p);let m;return t[12]!==o||t[13]!==s||t[14]!==p?(m=(0,V.jsxs)(`html`,{dir:o,lang:s,children:[c,p]}),t[12]=o,t[13]=s,t[14]=p,t[15]=m):m=t[15],m}var fC=d(function(){let e=(0,sC.c)(4),t=c(),n,r;e[0]===t.state?(n=e[1],r=e[2]):(n=()=>{t.state===`loading`?$e.default.start():$e.default.done()},r=[t.state],e[0]=t.state,e[1]=n,e[2]=r),(0,B.useEffect)(n,r);let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,V.jsx)(w,{}),e[3]=i):i=e[3],i}),pC=R();function mC(e){let t=(0,pC.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,type:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=z(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==a||t[8]!==i?(o=(0,V.jsx)(`input`,{type:i,"data-slot":`input`,className:a,...r}),t[6]=r,t[7]=a,t[8]=i,t[9]=o):o=t[9],o}var hC=R();function gC(e){let t=(0,hC.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,orientation:i,decorative:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`horizontal`:i,s=a===void 0?!0:a,c;t[5]===n?c=t[6]:(c=z(`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,n),t[5]=n,t[6]=c);let l;return t[7]!==s||t[8]!==o||t[9]!==r||t[10]!==c?(l=(0,V.jsx)(bd,{"data-slot":`separator`,decorative:s,orientation:o,className:c,...r}),t[7]=s,t[8]=o,t[9]=r,t[10]=c,t[11]=l):l=t[11],l}var _C=R();function vC(e){let t=(0,_C.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,V.jsx)(ye,{"data-slot":`sheet`,...n}),t[2]=n,t[3]=r),r}function yC(e){let t=(0,_C.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,V.jsx)(je,{"data-slot":`sheet-portal`,...n}),t[2]=n,t[3]=r),r}function bC(e){let t=(0,_C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(we,{"data-slot":`sheet-overlay`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function xC(e){let t=(0,_C.c)(17),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,side:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`right`:a,s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,V.jsx)(bC,{}),t[5]=s):s=t[5];let c=o===`right`&&`data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm`,l=o===`left`&&`data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm`,u=o===`top`&&`data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b`,d=o===`bottom`&&`data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t`,f;t[6]!==r||t[7]!==c||t[8]!==l||t[9]!==u||t[10]!==d?(f=z(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500`,c,l,u,d,r),t[6]=r,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f):f=t[11];let p;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,V.jsxs)(De,{className:`ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none`,children:[(0,V.jsx)(Ie,{className:`size-4`}),(0,V.jsx)(`span`,{className:`sr-only`,children:`Close`})]}),t[12]=p):p=t[12];let m;return t[13]!==n||t[14]!==i||t[15]!==f?(m=(0,V.jsxs)(yC,{children:[s,(0,V.jsxs)(ke,{"data-slot":`sheet-content`,className:f,...i,children:[n,p]})]}),t[13]=n,t[14]=i,t[15]=f,t[16]=m):m=t[16],m}function SC(e){let t=(0,_C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`flex flex-col gap-1.5 p-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`sheet-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function CC(e){let t=(0,_C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`text-foreground font-semibold`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(be,{"data-slot":`sheet-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function wC(e){let t=(0,_C.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`text-muted-foreground text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(ve,{"data-slot":`sheet-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}R();var TC=R();function EC(e){let t=(0,TC.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({delayDuration:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?0:r,a;return t[3]!==i||t[4]!==n?(a=(0,V.jsx)(tf,{"data-slot":`tooltip-provider`,delayDuration:i,...n}),t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function DC(e){let t=(0,TC.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,V.jsx)(EC,{children:(0,V.jsx)(nf,{"data-slot":`tooltip`,...n})}),t[2]=n,t[3]=r),r}function OC(e){let t=(0,TC.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,V.jsx)(rf,{"data-slot":`tooltip-trigger`,...n}),t[2]=n,t[3]=r),r}function kC(e){let t=(0,TC.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,sideOffset:a,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?0:a,s;t[5]===r?s=t[6]:(s=z(`bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance`,r),t[5]=r,t[6]=s);let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,V.jsx)(sf,{className:`bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]`}),t[7]=c):c=t[7];let l;return t[8]!==n||t[9]!==i||t[10]!==o||t[11]!==s?(l=(0,V.jsx)(af,{children:(0,V.jsxs)(of,{"data-slot":`tooltip-content`,sideOffset:o,className:s,...i,children:[n,c]})}),t[8]=n,t[9]=i,t[10]=o,t[11]=s,t[12]=l):l=t[12],l}var AC=R(),jC=768;function MC(){let e=(0,AC.c)(2),[t,n]=B.useState(void 0),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=window.matchMedia(`(max-width: ${jC-1}px)`),t=()=>{n(window.innerWidth<jC)};return e.addEventListener(`change`,t),n(window.innerWidth<jC),()=>e.removeEventListener(`change`,t)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),B.useEffect(r,i),!!t}var NC=R(),PC=`sidebar_state`,FC=3600*24*7,IC=`3rem`,LC=`b`,RC=B.createContext(null);function zC(){let e=B.useContext(RC);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function BC(e){let t=(0,NC.c)(39),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({defaultOpen:c,open:i,onOpenChange:o,className:r,style:s,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=c===void 0?!0:c,u=MC(),[d,f]=B.useState(!1),[p,m]=B.useState(l),[h,g]=B.useState(!1),[_,v]=B.useState(),y=i??p,b;t[8]!==y||t[9]!==o?(b=e=>{let t=typeof e==`function`?e(y):e;o?o(t):m(t),document.cookie=`${PC}=${t}; path=/; max-age=${FC}`},t[8]=y,t[9]=o,t[10]=b):b=t[10];let x=b,S;t[11]!==u||t[12]!==x?(S=()=>u?f(HC):x(VC),t[11]=u,t[12]=x,t[13]=S):S=t[13];let C=S,w,T;t[14]===C?(w=t[15],T=t[16]):(w=()=>{let e=e=>{e.key===LC&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),C())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},T=[C],t[14]=C,t[15]=w,t[16]=T),B.useEffect(w,T);let E=y?`expanded`:`collapsed`,D;t[17]!==h||t[18]!==u||t[19]!==y||t[20]!==d||t[21]!==_||t[22]!==x||t[23]!==E||t[24]!==C?(D={state:E,open:y,setOpen:x,isMobile:u,openMobile:d,setOpenMobile:f,toggleSidebar:C,hasSecondaryContent:h,setHasSecondaryContent:g,secondaryContent:_,setSecondaryContent:v},t[17]=h,t[18]=u,t[19]=y,t[20]=d,t[21]=_,t[22]=x,t[23]=E,t[24]=C,t[25]=D):D=t[25];let O=D,k=h?`calc(var(--spacing) * 72)`:`calc(var(--spacing) * 14)`,A;t[26]!==s||t[27]!==k?(A={"--sidebar-width":k,"--sidebar-width-icon":IC,...s},t[26]=s,t[27]=k,t[28]=A):A=t[28];let j=A,M;t[29]===r?M=t[30]:(M=z(`group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full`,r),t[29]=r,t[30]=M);let N;t[31]!==n||t[32]!==a||t[33]!==M||t[34]!==j?(N=(0,V.jsx)(EC,{delayDuration:0,children:(0,V.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:j,className:M,...a,children:n})}),t[31]=n,t[32]=a,t[33]=M,t[34]=j,t[35]=N):N=t[35];let P;return t[36]!==O||t[37]!==N?(P=(0,V.jsx)(RC.Provider,{value:O,children:N}),t[36]=O,t[37]=N,t[38]=P):P=t[38],P}function VC(e){return!e}function HC(e){return!e}function UC(e){let t=(0,NC.c)(51),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({side:a,variant:o,collapsible:s,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a===void 0?`left`:a,l=o===void 0?`sidebar`:o,u=s===void 0?`offcanvas`:s,{isMobile:d,state:f,openMobile:p,setOpenMobile:m,hasSecondaryContent:h}=zC();if(u===`none`){let e;t[7]===r?e=t[8]:(e=z(`bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col`,r),t[7]=r,t[8]=e);let a;return t[9]!==n||t[10]!==i||t[11]!==e?(a=(0,V.jsx)(`div`,{"data-slot":`sidebar`,className:e,...i,children:n}),t[9]=n,t[10]=i,t[11]=e,t[12]=a):a=t[12],a}if(d){let e=h?`calc(var(--spacing) * 72)`:`calc(var(--sidebar-width-icon) + 1px)`,r=h?`flex-row`:`flex-col`,a;t[13]===e?a=t[14]:(a={"--sidebar-width":e},t[13]=e,t[14]=a);let o=a,s;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,V.jsxs)(SC,{className:`sr-only`,children:[(0,V.jsx)(CC,{children:`Sidebar`}),(0,V.jsx)(wC,{children:`Displays the mobile sidebar.`})]}),t[15]=s):s=t[15];let l;t[16]===r?l=t[17]:(l=z(`flex h-full w-full`,r),t[16]=r,t[17]=l);let u;t[18]!==n||t[19]!==l?(u=(0,V.jsx)(`div`,{className:l,children:n}),t[18]=n,t[19]=l,t[20]=u):u=t[20];let d;t[21]!==c||t[22]!==o||t[23]!==u?(d=(0,V.jsxs)(xC,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden`,style:o,side:c,children:[s,u]}),t[21]=c,t[22]=o,t[23]=u,t[24]=d):d=t[24];let f;return t[25]!==p||t[26]!==i||t[27]!==m||t[28]!==d?(f=(0,V.jsx)(vC,{open:p,onOpenChange:m,...i,children:d}),t[25]=p,t[26]=i,t[27]=m,t[28]=d,t[29]=f):f=t[29],f}let g=f===`collapsed`?u:``,_=l===`floating`||l===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,v;t[30]===_?v=t[31]:(v=z(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,_),t[30]=_,t[31]=v);let y;t[32]===v?y=t[33]:(y=(0,V.jsx)(`div`,{"data-slot":`sidebar-gap`,className:v}),t[32]=v,t[33]=y);let b=c===`left`?`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,x=l===`floating`||l===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,S;t[34]!==r||t[35]!==b||t[36]!==x?(S=z(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right] duration-200 ease-linear md:flex`,b,x,r),t[34]=r,t[35]=b,t[36]=x,t[37]=S):S=t[37];let C;t[38]===n?C=t[39]:(C=(0,V.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm`,children:n}),t[38]=n,t[39]=C);let w;t[40]!==i||t[41]!==S||t[42]!==C?(w=(0,V.jsx)(`div`,{"data-slot":`sidebar-container`,className:S,...i,children:C}),t[40]=i,t[41]=S,t[42]=C,t[43]=w):w=t[43];let T;return t[44]!==c||t[45]!==f||t[46]!==w||t[47]!==g||t[48]!==y||t[49]!==l?(T=(0,V.jsxs)(`div`,{className:`group peer text-sidebar-foreground hidden md:block`,"data-state":f,"data-collapsible":g,"data-variant":l,"data-side":c,"data-slot":`sidebar`,children:[y,w]}),t[44]=c,t[45]=f,t[46]=w,t[47]=g,t[48]=y,t[49]=l,t[50]=T):T=t[50],T}function WC(e){let t=(0,NC.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let{toggleSidebar:a}=zC(),o;t[4]===n?o=t[5]:(o=z(`size-7`,n),t[4]=n,t[5]=o);let s;t[6]!==r||t[7]!==a?(s=e=>{r?.(e),a()},t[6]=r,t[7]=a,t[8]=s):s=t[8];let c,l;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,V.jsx)(Cn,{}),l=(0,V.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`}),t[9]=c,t[10]=l):(c=t[9],l=t[10]);let u;return t[11]!==i||t[12]!==o||t[13]!==s?(u=(0,V.jsxs)(H,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon`,className:o,onClick:s,...i,children:[c,l]}),t[11]=i,t[12]=o,t[13]=s,t[14]=u):u=t[14],u}function GC(e){let t=(0,NC.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`bg-background relative flex w-full flex-1 flex-col`,`md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`main`,{"data-slot":`sidebar-inset`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function KC(e){let t=(0,NC.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function qC(e){let t=(0,NC.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function JC(e){let t=(0,NC.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`bg-sidebar-border mx-2 w-auto`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(gC,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function YC(e){let t=(0,NC.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function XC(e){let t=(0,NC.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`relative flex w-full min-w-0 flex-col p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ZC(e){let t=(0,NC.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,asChild:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i!==void 0&&i?ue:`div`,o;t[4]===n?o=t[5]:(o=z(`text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,n),t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==r||t[8]!==o?(s=(0,V.jsx)(a,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:o,...r}),t[6]=a,t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function QC(e){let t=(0,NC.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`w-full text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function $C(e){let t=(0,NC.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`flex w-full min-w-0 flex-col gap-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ew(e){let t=(0,NC.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`group/menu-item relative`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var tw=Pn(`peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function nw(e){let t=(0,NC.c)(28),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({asChild:i,isActive:a,variant:o,size:s,tooltip:c,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=i===void 0?!1:i,u=a===void 0?!1:a,d=o===void 0?`default`:o,f=s===void 0?`default`:s,p=l?ue:`button`,{isMobile:m,state:h}=zC(),g;t[8]!==n||t[9]!==f||t[10]!==d?(g=z(tw({variant:d,size:f}),n),t[8]=n,t[9]=f,t[10]=d,t[11]=g):g=t[11];let _;t[12]!==p||t[13]!==u||t[14]!==r||t[15]!==f||t[16]!==g?(_=(0,V.jsx)(p,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":f,"data-active":u,className:g,...r}),t[12]=p,t[13]=u,t[14]=r,t[15]=f,t[16]=g,t[17]=_):_=t[17];let v=_;if(!c)return v;if(typeof c==`string`){let e;t[18]===c?e=t[19]:(e={children:c},t[18]=c,t[19]=e),c=e}let y;t[20]===v?y=t[21]:(y=(0,V.jsx)(OC,{asChild:!0,children:v}),t[20]=v,t[21]=y);let b=h!==`collapsed`||m,x;t[22]!==b||t[23]!==c?(x=(0,V.jsx)(kC,{side:`right`,align:`center`,hidden:b,...c}),t[22]=b,t[23]=c,t[24]=x):x=t[24];let S;return t[25]!==y||t[26]!==x?(S=(0,V.jsxs)(DC,{children:[y,x]}),t[25]=y,t[26]=x,t[27]=S):S=t[27],S}var rw={outline:{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`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},iw=(e,t,n,r)=>{let i=(0,B.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,B.createElement)(`svg`,{ref:u,...rw[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,B.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,B.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},aw=iw(`outline`,`bell`,`Bell`,[[`path`,{d:`M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6`,key:`svg-0`}],[`path`,{d:`M9 17v1a3 3 0 0 0 6 0v-1`,key:`svg-1`}]]),ow=iw(`outline`,`book`,`Book`,[[`path`,{d:`M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0`,key:`svg-0`}],[`path`,{d:`M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0`,key:`svg-1`}],[`path`,{d:`M3 6l0 13`,key:`svg-2`}],[`path`,{d:`M12 6l0 13`,key:`svg-3`}],[`path`,{d:`M21 6l0 13`,key:`svg-4`}]]),sw=iw(`outline`,`box`,`Box`,[[`path`,{d:`M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5`,key:`svg-0`}],[`path`,{d:`M12 12l8 -4.5`,key:`svg-1`}],[`path`,{d:`M12 12l0 9`,key:`svg-2`}],[`path`,{d:`M12 12l-8 -4.5`,key:`svg-3`}]]),cw=iw(`outline`,`brand-apple`,`BrandApple`,[[`path`,{d:`M8.286 7.008c-3.216 0 -4.286 3.23 -4.286 5.92c0 3.229 2.143 8.072 4.286 8.072c1.165 -.05 1.799 -.538 3.214 -.538c1.406 0 1.607 .538 3.214 .538s4.286 -3.229 4.286 -5.381c-.03 -.011 -2.649 -.434 -2.679 -3.23c-.02 -2.335 2.589 -3.179 2.679 -3.228c-1.096 -1.606 -3.162 -2.113 -3.75 -2.153c-1.535 -.12 -3.032 1.077 -3.75 1.077c-.729 0 -2.036 -1.077 -3.214 -1.077z`,key:`svg-0`}],[`path`,{d:`M12 4a2 2 0 0 0 2 -2a2 2 0 0 0 -2 2`,key:`svg-1`}]]),lw=iw(`outline`,`brand-discord`,`BrandDiscord`,[[`path`,{d:`M8 12a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`,key:`svg-0`}],[`path`,{d:`M14 12a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`,key:`svg-1`}],[`path`,{d:`M15.5 17c0 1 1.5 3 2 3c1.5 0 2.833 -1.667 3.5 -3c.667 -1.667 .5 -5.833 -1.5 -11.5c-1.457 -1.015 -3 -1.34 -4.5 -1.5l-.972 1.923a11.913 11.913 0 0 0 -4.053 0l-.975 -1.923c-1.5 .16 -3.043 .485 -4.5 1.5c-2 5.667 -2.167 9.833 -1.5 11.5c.667 1.333 2 3 3.5 3c.5 0 2 -2 2 -3`,key:`svg-2`}],[`path`,{d:`M7 16.5c3.5 1 6.5 1 10 0`,key:`svg-3`}]]),uw=iw(`outline`,`brand-dropbox`,`BrandDropbox`,[[`path`,{d:`M7.5 10.625l-4.5 -2.813l4.5 -2.812l4.5 2.813m-4.5 2.812l4.5 -2.813m-4.5 2.813l-4.5 2.823l4.5 2.802m0 -5.625l4.5 2.823m0 -5.636l4.5 2.791l4.5 -2.812l-4.5 -2.791l-4.5 2.813zm-4.5 8.438l4.5 -2.802m-4.5 2.802v1.123l4.5 2.627l4.5 -2.627v-1.123m-4.5 -2.802l4.5 -2.823l4.5 2.823l-4.5 2.802m-4.5 -2.802l4.5 2.802`,key:`svg-0`}]]),dw=iw(`outline`,`brand-facebook`,`BrandFacebook`,[[`path`,{d:`M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3`,key:`svg-0`}]]),fw=iw(`outline`,`brand-github`,`BrandGithub`,[[`path`,{d:`M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5`,key:`svg-0`}]]),pw=iw(`outline`,`brand-gitlab`,`BrandGitlab`,[[`path`,{d:`M21 14l-9 7l-9 -7l3 -11l3 7h6l3 -7z`,key:`svg-0`}]]),mw=iw(`outline`,`brand-google`,`BrandGoogle`,[[`path`,{d:`M20.945 11a9 9 0 1 1 -3.284 -5.997l-2.655 2.392a5.5 5.5 0 1 0 2.119 6.605h-4.125v-3h7.945z`,key:`svg-0`}]]),hw=iw(`outline`,`brand-linkedin`,`BrandLinkedin`,[[`path`,{d:`M8 11v5`,key:`svg-0`}],[`path`,{d:`M8 8v.01`,key:`svg-1`}],[`path`,{d:`M12 16v-5`,key:`svg-2`}],[`path`,{d:`M16 16v-3a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4z`,key:`svg-4`}]]),gw=iw(`outline`,`brand-reddit`,`BrandReddit`,[[`path`,{d:`M12 8c2.648 0 5.028 .826 6.675 2.14a2.5 2.5 0 0 1 2.326 4.36c0 3.59 -4.03 6.5 -9 6.5c-4.875 0 -8.845 -2.8 -9 -6.294l-1 -.206a2.5 2.5 0 0 1 2.326 -4.36c1.646 -1.313 4.026 -2.14 6.674 -2.14z`,key:`svg-0`}],[`path`,{d:`M12 8l1 -5l6 1`,key:`svg-1`}],[`path`,{d:`M19 4m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`circle`,{cx:`9`,cy:`13`,r:`.5`,fill:`currentColor`,key:`svg-3`}],[`circle`,{cx:`15`,cy:`13`,r:`.5`,fill:`currentColor`,key:`svg-4`}],[`path`,{d:`M10 17c.667 .333 1.333 .5 2 .5s1.333 -.167 2 -.5`,key:`svg-5`}]]),_w=iw(`outline`,`brand-spotify`,`BrandSpotify`,[[`path`,{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M8 11.973c2.5 -1.473 5.5 -.973 7.5 .527`,key:`svg-1`}],[`path`,{d:`M9 15c1.5 -1 4 -1 5 .5`,key:`svg-2`}],[`path`,{d:`M7 9c2 -1 6 -2 10 .5`,key:`svg-3`}]]),vw=iw(`outline`,`brand-twitch`,`BrandTwitch`,[[`path`,{d:`M4 5v11a1 1 0 0 0 1 1h2v4l4 -4h5.584c.266 0 .52 -.105 .707 -.293l2.415 -2.414c.187 -.188 .293 -.442 .293 -.708v-8.585a1 1 0 0 0 -1 -1h-14a1 1 0 0 0 -1 1z`,key:`svg-0`}],[`path`,{d:`M16 8l0 4`,key:`svg-1`}],[`path`,{d:`M12 8l0 4`,key:`svg-2`}]]),yw=iw(`outline`,`brand-windows`,`BrandWindows`,[[`path`,{d:`M17.8 20l-12 -1.5c-1 -.1 -1.8 -.9 -1.8 -1.9v-9.2c0 -1 .8 -1.8 1.8 -1.9l12 -1.5c1.2 -.1 2.2 .8 2.2 1.9v12.1c0 1.2 -1.1 2.1 -2.2 1.9z`,key:`svg-0`}],[`path`,{d:`M12 5l0 14`,key:`svg-1`}],[`path`,{d:`M4 12l16 0`,key:`svg-2`}]]),bw=iw(`outline`,`brand-x`,`BrandX`,[[`path`,{d:`M4 4l11.733 16h4.267l-11.733 -16z`,key:`svg-0`}],[`path`,{d:`M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772`,key:`svg-1`}]]),xw=iw(`outline`,`building`,`Building`,[[`path`,{d:`M3 21l18 0`,key:`svg-0`}],[`path`,{d:`M9 8l1 0`,key:`svg-1`}],[`path`,{d:`M9 12l1 0`,key:`svg-2`}],[`path`,{d:`M9 16l1 0`,key:`svg-3`}],[`path`,{d:`M14 8l1 0`,key:`svg-4`}],[`path`,{d:`M14 12l1 0`,key:`svg-5`}],[`path`,{d:`M14 16l1 0`,key:`svg-6`}],[`path`,{d:`M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16`,key:`svg-7`}]]),Sw=iw(`outline`,`currency-dollar`,`CurrencyDollar`,[[`path`,{d:`M16.7 8a3 3 0 0 0 -2.7 -2h-4a3 3 0 0 0 0 6h4a3 3 0 0 1 0 6h-4a3 3 0 0 1 -2.7 -2`,key:`svg-0`}],[`path`,{d:`M12 3v3m0 12v3`,key:`svg-1`}]]),Cw=iw(`outline`,`dashboard`,`Dashboard`,[[`path`,{d:`M12 13m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M13.45 11.55l2.05 -2.05`,key:`svg-1`}],[`path`,{d:`M6.4 20a9 9 0 1 1 11.2 0z`,key:`svg-2`}]]),ww=iw(`outline`,`dots-vertical`,`DotsVertical`,[[`path`,{d:`M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}]]),Tw=iw(`outline`,`folder`,`Folder`,[[`path`,{d:`M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2`,key:`svg-0`}]]),Ew=iw(`outline`,`help`,`Help`,[[`path`,{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 17l0 .01`,key:`svg-1`}],[`path`,{d:`M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4`,key:`svg-2`}]]),Dw=iw(`outline`,`home`,`Home`,[[`path`,{d:`M5 12l-2 0l9 -9l9 9l-2 0`,key:`svg-0`}],[`path`,{d:`M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7`,key:`svg-1`}],[`path`,{d:`M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6`,key:`svg-2`}]]),Ow=iw(`outline`,`inbox`,`Inbox`,[[`path`,{d:`M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z`,key:`svg-0`}],[`path`,{d:`M4 13h3l3 3h4l3 -3h3`,key:`svg-1`}]]),kw=iw(`outline`,`layout-kanban`,`LayoutKanban`,[[`path`,{d:`M4 4l6 0`,key:`svg-0`}],[`path`,{d:`M14 4l6 0`,key:`svg-1`}],[`path`,{d:`M4 8m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z`,key:`svg-2`}],[`path`,{d:`M14 8m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z`,key:`svg-3`}]]),Aw=iw(`outline`,`lock`,`Lock`,[[`path`,{d:`M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z`,key:`svg-0`}],[`path`,{d:`M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 11v-4a4 4 0 1 1 8 0v4`,key:`svg-2`}]]),jw=iw(`outline`,`logout`,`Logout`,[[`path`,{d:`M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M9 12h12l-3 -3`,key:`svg-1`}],[`path`,{d:`M18 15l3 -3`,key:`svg-2`}]]),Mw=iw(`outline`,`mail`,`Mail`,[[`path`,{d:`M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z`,key:`svg-0`}],[`path`,{d:`M3 7l9 6l9 -6`,key:`svg-1`}]]),Nw=iw(`outline`,`notification`,`Notification`,[[`path`,{d:`M10 6h-3a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-3`,key:`svg-0`}],[`path`,{d:`M17 7m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`,key:`svg-1`}]]),Pw=iw(`outline`,`user-circle`,`UserCircle`,[[`path`,{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`,key:`svg-1`}],[`path`,{d:`M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855`,key:`svg-2`}]]),Fw=iw(`outline`,`users`,`Users`,[[`path`,{d:`M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`,key:`svg-0`}],[`path`,{d:`M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2`,key:`svg-1`}],[`path`,{d:`M16 3.13a4 4 0 0 1 0 7.75`,key:`svg-2`}],[`path`,{d:`M21 21v-2a4 4 0 0 0 -3 -3.85`,key:`svg-3`}]]),Iw=iw(`outline`,`world`,`World`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M3.6 9h16.8`,key:`svg-1`}],[`path`,{d:`M3.6 15h16.8`,key:`svg-2`}],[`path`,{d:`M11.5 3a17 17 0 0 0 0 18`,key:`svg-3`}],[`path`,{d:`M12.5 3a17 17 0 0 1 0 18`,key:`svg-4`}]]),Lw=R(),Rw={sm:{icon:`size-6`,iconInner:`size-4`,text:`text-base`},md:{icon:`size-8`,iconInner:`size-5`,text:`text-lg`},lg:{icon:`size-9`,iconInner:`size-6`,text:`text-2xl`}};const zw=(0,B.forwardRef)((e,t)=>{let n=(0,Lw.c)(36),r,i,a,o,s,c,l,u;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8]):({className:r,href:i,name:s,nameClassName:a,showName:c,size:l,spaNavigation:u,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c,n[7]=l,n[8]=u);let d=s===void 0?`AppOS`:s,f=c===void 0?!0:c,p=l===void 0?`sm`:l,m=u===void 0?!0:u,h=Rw[p],g;n[9]!==r||n[10]!==h.text?(g=z(`flex items-center gap-2 font-medium`,h.text,r),n[9]=r,n[10]=h.text,n[11]=g):g=n[11];let _=g,v;n[12]===h.icon?v=n[13]:(v=z(`flex items-center justify-center rounded-md`,h.icon),n[12]=h.icon,n[13]=v);let y;n[14]!==d||n[15]!==v?(y=(0,V.jsx)(`img`,{className:v,src:`/logo.png`,alt:d}),n[14]=d,n[15]=v,n[16]=y):y=n[16];let b;n[17]!==d||n[18]!==a||n[19]!==f?(b=f&&(0,V.jsx)(`span`,{className:z(`text-foreground`,a),children:d}),n[17]=d,n[18]=a,n[19]=f,n[20]=b):b=n[20];let x;n[21]!==y||n[22]!==b?(x=(0,V.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[y,b]}),n[21]=y,n[22]=b,n[23]=x):x=n[23];let S=x;if(i){let e;n[24]!==i||n[25]!==o||n[26]!==m?(e=e=>{if(!m){e.preventDefault(),window.location.href=i;return}o.onClick?.(e)},n[24]=i,n[25]=o,n[26]=m,n[27]=e):e=n[27];let t;return n[28]!==_||n[29]!==S||n[30]!==i||n[31]!==e?(t=(0,V.jsx)(O,{to:i,className:_,onClick:e,children:S}),n[28]=_,n[29]=S,n[30]=i,n[31]=e,n[32]=t):t=n[32],t}let C;return n[33]!==_||n[34]!==S?(C=(0,V.jsx)(`div`,{className:_,children:S}),n[33]=_,n[34]=S,n[35]=C):C=n[35],C});var Bw=R();function Vw(e){let t=(0,Bw.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`relative flex size-8 shrink-0 overflow-hidden rounded-full`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(Lr,{"data-slot":`avatar`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Hw(e){let t=(0,Bw.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`aspect-square size-full`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(Rr,{"data-slot":`avatar-image`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Uw(e){let t=(0,Bw.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`bg-muted flex size-full items-center justify-center rounded-full`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(zr,{"data-slot":`avatar-fallback`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Ww=R();function Gw(e){let t=(0,Ww.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,V.jsx)(jl,{"data-slot":`dropdown-menu`,...n}),t[2]=n,t[3]=r),r}function Kw(e){let t=(0,Ww.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,V.jsx)(Ml,{"data-slot":`dropdown-menu-trigger`,...n}),t[2]=n,t[3]=r),r}function qw(e){let t=(0,Ww.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,sideOffset:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?4:i,o;t[4]===n?o=t[5]:(o=z(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md`,n),t[4]=n,t[5]=o);let s;return t[6]!==r||t[7]!==a||t[8]!==o?(s=(0,V.jsx)(Nl,{children:(0,V.jsx)(Pl,{"data-slot":`dropdown-menu-content`,sideOffset:a,className:o,...r})}),t[6]=r,t[7]=a,t[8]=o,t[9]=s):s=t[9],s}function Jw(e){let t=(0,Ww.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,V.jsx)(Fl,{"data-slot":`dropdown-menu-group`,...n}),t[2]=n,t[3]=r),r}function Yw(e){let t=(0,Ww.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=z(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,V.jsx)(Ll,{"data-slot":`dropdown-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function Xw(e){let t=(0,Ww.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=z(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,V.jsx)(Il,{"data-slot":`dropdown-menu-label`,"data-inset":r,className:a,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function Zw(e){let t=(0,Ww.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`bg-border -mx-1 my-1 h-px`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(Rl,{"data-slot":`dropdown-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Qw(e){let t=(0,Ww.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`text-muted-foreground ml-auto text-xs tracking-widest`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`span`,{"data-slot":`dropdown-menu-shortcut`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var $w=n({NavUser:()=>tT}),eT=R();function tT(e){let t=(0,eT.c)(58),{user:n}=e,{client:r}=Mm(),i=f(),{isMobile:a}=zC(),o=n.image||``,s;t[0]!==o||t[1]!==n.name?(s=(0,V.jsx)(Hw,{src:o,alt:n.name}),t[0]=o,t[1]=n.name,t[2]=s):s=t[2];let c;t[3]===n.name?c=t[4]:(c=se(n.name),t[3]=n.name,t[4]=c);let l;t[5]===c?l=t[6]:(l=(0,V.jsx)(Uw,{className:`rounded-lg`,children:c}),t[5]=c,t[6]=l);let u;t[7]!==s||t[8]!==l?(u=(0,V.jsxs)(Vw,{className:`size-8 rounded-lg`,children:[s,l]}),t[7]=s,t[8]=l,t[9]=u):u=t[9];let d;t[10]===n.name?d=t[11]:(d=(0,V.jsx)(`span`,{className:`truncate font-medium`,children:n.name}),t[10]=n.name,t[11]=d);let p;t[12]===n.email?p=t[13]:(p=(0,V.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:n.email}),t[12]=n.email,t[13]=p);let m;t[14]!==d||t[15]!==p?(m=(0,V.jsxs)(`div`,{className:`sr-only grid flex-1 text-left text-sm leading-tight`,children:[d,p]}),t[14]=d,t[15]=p,t[16]=m):m=t[16];let h;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,V.jsx)(ww,{className:`ml-auto size-4 sr-only`}),t[17]=h):h=t[17];let g;t[18]!==u||t[19]!==m?(g=(0,V.jsx)(Kw,{asChild:!0,children:(0,V.jsxs)(nw,{className:`data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground h-8 p-0`,children:[u,m,h]})}),t[18]=u,t[19]=m,t[20]=g):g=t[20];let _=a?`bottom`:`right`,v=n.image||``,y;t[21]!==v||t[22]!==n.name?(y=(0,V.jsx)(Hw,{src:v,alt:n.name}),t[21]=v,t[22]=n.name,t[23]=y):y=t[23];let b;t[24]===n.name?b=t[25]:(b=se(n.name),t[24]=n.name,t[25]=b);let x;t[26]===b?x=t[27]:(x=(0,V.jsx)(Uw,{className:`rounded-lg`,children:b}),t[26]=b,t[27]=x);let C;t[28]!==y||t[29]!==x?(C=(0,V.jsxs)(Vw,{className:`h-8 w-8 rounded-lg`,children:[y,x]}),t[28]=y,t[29]=x,t[30]=C):C=t[30];let w;t[31]===n.name?w=t[32]:(w=(0,V.jsx)(`span`,{className:`truncate font-medium`,children:n.name}),t[31]=n.name,t[32]=w);let T;t[33]===n.email?T=t[34]:(T=(0,V.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:n.email}),t[33]=n.email,t[34]=T);let E;t[35]!==w||t[36]!==T?(E=(0,V.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[w,T]}),t[35]=w,t[36]=T,t[37]=E):E=t[37];let D;t[38]!==C||t[39]!==E?(D=(0,V.jsx)(Xw,{className:`p-0 font-normal`,children:(0,V.jsxs)(`div`,{className:`flex items-center gap-2 px-1 py-1.5 text-left text-sm`,children:[C,E]})}),t[38]=C,t[39]=E,t[40]=D):D=t[40];let O;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,V.jsx)(Zw,{}),t[41]=O):O=t[41];let k;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,V.jsxs)(Yw,{children:[(0,V.jsx)(Pw,{}),`Account`]}),t[42]=k):k=t[42];let A,j;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,V.jsxs)(Jw,{children:[k,(0,V.jsxs)(Yw,{children:[(0,V.jsx)(Nw,{}),`Notifications`]})]}),j=(0,V.jsx)(Zw,{}),t[43]=A,t[44]=j):(A=t[43],j=t[44]);let M;t[45]!==r||t[46]!==i?(M=async()=>{await r.signOut(),i(`${S(`/login`)}?returnTo=${encodeURIComponent(window.location.pathname+window.location.search)}`)},t[45]=r,t[46]=i,t[47]=M):M=t[47];let N;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,V.jsx)(jw,{}),t[48]=N):N=t[48];let P;t[49]===M?P=t[50]:(P=(0,V.jsxs)(Yw,{onClick:M,children:[N,`Log out`]}),t[49]=M,t[50]=P);let F;t[51]!==_||t[52]!==D||t[53]!==P?(F=(0,V.jsxs)(qw,{className:`w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg`,side:_,align:`end`,sideOffset:4,children:[D,O,A,j,P]}),t[51]=_,t[52]=D,t[53]=P,t[54]=F):F=t[54];let I;return t[55]!==g||t[56]!==F?(I=(0,V.jsx)($C,{children:(0,V.jsx)(ew,{children:(0,V.jsxs)(Gw,{children:[g,F]})})}),t[55]=g,t[56]=F,t[57]=I):I=t[57],I}var nT=n({AppSidebar:()=>rT});function rT({...e}){let t=j(),{client:n}=Mm(),{data:r}=n.useSession(),{t:i}=me(),{hasSecondaryContent:a,secondaryContent:o,setHasSecondaryContent:s,setOpenMobile:c,setSecondaryContent:l}=zC(),u=[{title:i(`sidebar.nav.home`),url:S(`/home`),icon:Dw},{title:i(`sidebar.nav.inbox`),url:S(`/inbox`),icon:Ow},{title:i(`sidebar.nav.board`),url:S(`/board`),icon:kw}],d=[{title:i(`sidebar.platform.auth`),url:S(`/platform/auth`),icon:Aw,secondaryNav:[{items:[{title:i(`sidebar.platform.authSecondary.overview`),url:S(`/platform/auth/overview`),icon:Cw},{title:i(`sidebar.platform.authSecondary.organizations`),url:S(`/platform/auth/organizations`),icon:xw},{title:i(`sidebar.platform.authSecondary.users`),url:S(`/platform/auth/users`),icon:Fw}]},{label:i(`sidebar.platform.authSecondary.configuration`),items:[{title:i(`sidebar.platform.authSecondary.authentication`),url:S(`/platform/auth/authentication`),icon:sw}]}]},{title:i(`sidebar.platform.billing`),url:S(`/platform/billing`),icon:Sw,secondaryNav:[]},{title:i(`sidebar.platform.docs`),url:S(`/platform/docs`),icon:ow,secondaryNav:[]},{title:i(`sidebar.platform.emails`),url:S(`/platform/emails`),icon:Mw,secondaryNav:[]},{title:i(`sidebar.platform.notifications`),url:S(`/platform/notifications`),icon:aw,secondaryNav:[]},{title:i(`sidebar.platform.site`),url:S(`/platform/site`),icon:Iw,secondaryNav:[]},{title:i(`sidebar.platform.storage`),url:S(`/platform/storage`),icon:Tw}],f=[{title:i(`sidebar.secondary.help`),url:S(`/help`),icon:Ew}],p=[...u,...d,...f].find(e=>t.pathname.startsWith(e.url));return(0,B.useEffect)(()=>{let e=d.find(e=>t.pathname.startsWith(e.url)&&e.secondaryNav);if(!e?.secondaryNav){s(!1),l(void 0);return}s(!0),l(e.secondaryNav.map((e,n)=>(0,V.jsxs)(XC,{className:`px-0`,children:[e.label&&(0,V.jsx)(ZC,{className:`px-3 text-xs`,children:e.label}),(0,V.jsx)(QC,{children:(0,V.jsx)($C,{children:e.items.map(e=>(0,V.jsx)(ew,{children:(0,V.jsx)(nw,{asChild:!0,isActive:t.pathname===e.url,children:(0,V.jsxs)(O,{to:e.url,onClick:()=>c(!1),children:[(0,V.jsx)(e.icon,{}),(0,V.jsx)(`span`,{children:e.title})]})})},e.title))})})]},n.toString())))},[t.pathname,s,l]),(0,V.jsxs)(UC,{collapsible:`icon`,className:`overflow-hidden *:data-[sidebar=sidebar]:flex-row p-0 pr-px`,...e,children:[(0,V.jsxs)(UC,{collapsible:`none`,className:z(`w-[calc(var(--sidebar-width-icon)+1px)]! border-r bg-background overflow-hidden`),children:[(0,V.jsx)(KC,{className:`pt-4 pb-1`,children:(0,V.jsx)(zw,{className:`ml-1`,showName:!1,size:`sm`,href:S(`/`)})}),(0,V.jsxs)(YC,{children:[(0,V.jsx)(XC,{children:(0,V.jsx)(QC,{className:`px-0`,children:(0,V.jsx)($C,{children:u.map(e=>(0,V.jsx)(ew,{children:(0,V.jsx)(nw,{asChild:!0,className:`px-2`,isActive:t.pathname.startsWith(e.url),tooltip:{children:e.title,hidden:!1},children:(0,V.jsxs)(O,{to:e.url,onClick:()=>c(!1),children:[(0,V.jsx)(e.icon,{}),(0,V.jsx)(`span`,{className:`sr-only`,children:e.title})]})})},e.title))})})}),(0,V.jsx)(JC,{className:`-ml-px`}),(0,V.jsx)(XC,{children:(0,V.jsx)(QC,{className:`px-0`,children:(0,V.jsx)($C,{children:d.map(e=>(0,V.jsx)(ew,{children:(0,V.jsx)(nw,{asChild:!0,tooltip:{children:e.title,hidden:!1},isActive:t.pathname.startsWith(e.url),className:`px-2`,children:(0,V.jsxs)(O,{to:e.url,children:[(0,V.jsx)(e.icon,{}),(0,V.jsx)(`span`,{className:`sr-only`,children:e.title})]})})},e.title))})})}),(0,V.jsx)(XC,{className:`mt-auto`,children:(0,V.jsx)(QC,{className:`px-0`,children:(0,V.jsx)($C,{children:f.map(e=>(0,V.jsx)(ew,{children:(0,V.jsx)(nw,{asChild:!0,tooltip:{children:e.title,hidden:!1},isActive:t.pathname.startsWith(e.url),className:`px-2`,children:(0,V.jsxs)(O,{to:e.url,onClick:()=>c(!1),children:[(0,V.jsx)(e.icon,{}),(0,V.jsx)(`span`,{className:`sr-only`,children:e.title})]})})},e.title))})})})]}),(0,V.jsx)(qC,{children:r?.user&&(0,V.jsx)(tT,{user:r.user})})]}),a&&(0,V.jsxs)(UC,{collapsible:`none`,className:`fill-mode-both flex-1 h-auto m-2 bg-background shadow-md rounded-lg animate-in fade-in slide-in-from-bottom-4 duration-300 delay-200`,children:[(0,V.jsx)(KC,{className:`border-b p-3.25`,children:(0,V.jsx)(`div`,{className:`flex w-full items-center justify-between`,children:(0,V.jsxs)(`div`,{className:`flex flex-row gap-1.25 text-foreground text-[0.875rem] font-medium`,children:[p?.icon&&(0,V.jsx)(p.icon,{className:`size-5`}),p?.title]})})}),(0,V.jsx)(YC,{className:`px-2`,children:o})]})]})}var iT=n({SiteHeader:()=>oT}),aT=R();function oT(){let e=(0,aT.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(`header`,{className:`flex h-(--header-height) shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height)`,children:(0,V.jsxs)(`div`,{className:`flex w-full items-center gap-1 px-2 md:px-4`,children:[(0,V.jsx)(WC,{className:`md:hidden cursor-pointer`}),(0,V.jsx)(gC,{orientation:`vertical`,className:`md:hidden ml-1 mr-2.5 data-[orientation=vertical]:h-4`}),(0,V.jsx)(`h1`,{className:`text-base font-medium`,children:`Platform`}),(0,V.jsx)(`div`,{className:`ml-auto flex items-center gap-2`})]})}),e[0]=t):t=e[0],t}var sT=n({default:()=>uT,middleware:()=>lT}),cT=R();const lT=[async({context:e,request:t})=>{let{session:n}=e.get(D);if(!n){let e=new URL(t.url);throw M(`${S(`/login`)}?returnTo=${encodeURIComponent(e.pathname+e.search)}`)}}];var uT=d(function(){let e=(0,cT.c)(4),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={"--header-height":`calc(var(--spacing) * 12)`},e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,V.jsx)(rT,{variant:`inset`}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,V.jsx)(oT,{}),e[2]=r):r=e[2];let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,V.jsxs)(BC,{style:t,children:[n,(0,V.jsxs)(GC,{children:[r,(0,V.jsx)(`div`,{className:`flex flex-1 flex-col`,children:(0,V.jsx)(`div`,{className:`@container/main flex flex-1 flex-col gap-2 p-3 md:p-4`,children:(0,V.jsx)(w,{})})})]})]}),e[3]=i):i=e[3],i}),dT=n({default:()=>pT}),fT=R(),pT=d(function(){let e=(0,fT.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(`div`,{children:`Board`}),e[0]=t):t=e[0],t}),mT=n({default:()=>gT}),hT=R(),gT=d(function(){let e=(0,hT.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(`div`,{children:`Help`}),e[0]=t):t=e[0],t}),_T=n({default:()=>yT}),vT=R(),yT=d(function(){let e=(0,vT.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(`div`,{children:`Home`}),e[0]=t):t=e[0],t}),bT=n({default:()=>ST}),xT=R(),ST=d(function(){let e=(0,xT.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(`div`,{children:`Inbox`}),e[0]=t):t=e[0],t}),CT=n({OrgSwitcher:()=>TT}),wT=R();function TT(e){let t=(0,wT.c)(25),{orgs:n}=e,{isMobile:r}=zC(),[i,a]=(0,B.useState)(n[0]);if(!i)return null;let o;t[0]===i.logo?o=t[1]:(o=(0,V.jsx)(`div`,{className:`bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg`,children:(0,V.jsx)(i.logo,{className:`size-4`})}),t[0]=i.logo,t[1]=o);let s;t[2]===i.name?s=t[3]:(s=(0,V.jsx)(`span`,{className:`truncate font-medium`,children:i.name}),t[2]=i.name,t[3]=s);let c;t[4]===i.plan?c=t[5]:(c=(0,V.jsx)(`span`,{className:`truncate text-xs`,children:i.plan}),t[4]=i.plan,t[5]=c);let l;t[6]!==s||t[7]!==c?(l=(0,V.jsxs)(`div`,{className:`sr-only grid flex-1 text-left text-sm leading-tight`,children:[s,c]}),t[6]=s,t[7]=c,t[8]=l):l=t[8];let u;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,V.jsx)(nn,{className:`ml-auto sr-only`}),t[9]=u):u=t[9];let d;t[10]!==o||t[11]!==l?(d=(0,V.jsx)(Kw,{asChild:!0,children:(0,V.jsxs)(nw,{className:`h-8 p-0 cursor-pointer`,children:[o,l,u]})}),t[10]=o,t[11]=l,t[12]=d):d=t[12];let f=r?`bottom`:`right`,p;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,V.jsx)(Xw,{className:`text-muted-foreground text-xs`,children:`Organizations`}),t[13]=p):p=t[13];let m;if(t[14]!==n){let e;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(e=(e,t)=>(0,V.jsxs)(Yw,{onClick:()=>a(e),className:`gap-2 p-2`,children:[(0,V.jsx)(`div`,{className:`flex size-6 items-center justify-center rounded-md border`,children:(0,V.jsx)(e.logo,{className:`size-3.5 shrink-0`})}),e.name,(0,V.jsxs)(Qw,{children:[`⌘`,t+1]})]},e.name),t[16]=e):e=t[16],m=n.map(e),t[14]=n,t[15]=m}else m=t[15];let h;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,V.jsx)(Zw,{}),t[17]=h):h=t[17];let g;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,V.jsxs)(Yw,{className:`gap-2 p-2`,children:[(0,V.jsx)(`div`,{className:`flex size-6 items-center justify-center rounded-md border bg-transparent`,children:(0,V.jsx)(Tn,{className:`size-4`})}),(0,V.jsx)(`div`,{className:`text-muted-foreground font-medium`,children:`Add organization`})]}),t[18]=g):g=t[18];let _;t[19]!==f||t[20]!==m?(_=(0,V.jsxs)(qw,{className:`w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg`,align:`start`,side:f,sideOffset:4,children:[p,m,h,g]}),t[19]=f,t[20]=m,t[21]=_):_=t[21];let v;return t[22]!==_||t[23]!==d?(v=(0,V.jsx)($C,{children:(0,V.jsx)(ew,{children:(0,V.jsxs)(Gw,{children:[d,_]})})}),t[22]=_,t[23]=d,t[24]=v):v=t[24],v}var ET=n({default:()=>OT}),DT=R(),OT=d(function(){let e=(0,DT.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(`div`,{children:`Auth - Authentication`}),e[0]=t):t=e[0],t}),kT=n({loader:()=>AT});async function AT(){throw M(S(`/platform/auth/overview`))}var jT=n({default:()=>NT}),MT=R(),NT=d(function(){let e=(0,MT.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(`div`,{children:`Auth - Organizations`}),e[0]=t):t=e[0],t}),PT=n({default:()=>IT}),FT=R(),IT=d(function(){let e=(0,FT.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(`div`,{children:`Auth - Overview`}),e[0]=t):t=e[0],t}),LT=n({default:()=>zT}),RT=R(),zT=d(function(){let e=(0,RT.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(`div`,{children:`Auth - Users`}),e[0]=t):t=e[0],t}),BT=n({default:()=>HT}),VT=R(),HT=d(function(){let e=(0,VT.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(`div`,{children:`Billing`}),e[0]=t):t=e[0],t}),UT=n({default:()=>GT}),WT=R(),GT=d(function(){let e=(0,WT.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(`div`,{children:`Docs`}),e[0]=t):t=e[0],t}),KT=n({default:()=>dN,languages:()=>XA,options:()=>$A,parsers:()=>ej,printers:()=>uN}),qT=Object.defineProperty,JT=e=>{throw TypeError(e)},YT=(e,t,n)=>t in e?qT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,XT=(e,t)=>{for(var n in t)qT(e,n,{get:t[n],enumerable:!0})},ZT=(e,t,n)=>YT(e,typeof t==`symbol`?t:t+``,n),QT=(e,t,n)=>t.has(e)||JT(`Cannot `+n),$T=(e,t,n)=>(QT(e,t,`read from private field`),n?n.call(e):t.get(e)),eE=(e,t,n)=>t.has(e)?JT(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),tE=(e,t,n,r)=>(QT(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),nE={};XT(nE,{languages:()=>XA,options:()=>$A,parsers:()=>ej,printers:()=>uN});var rE=(e,t,n,r)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},iE=`string`,aE=`array`,oE=`cursor`,sE=`indent`,cE=`align`,lE=`trim`,uE=`group`,dE=`fill`,fE=`if-break`,pE=`indent-if-break`,mE=`line-suffix`,hE=`line-suffix-boundary`,gE=`line`,_E=`label`,vE=`break-parent`,yE=new Set([oE,sE,cE,lE,uE,dE,fE,pE,mE,hE,gE,_E,vE]),bE=(e,t,n)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t==`string`?t[n<0?t.length+n:n]:t.at(n)};function xE(e){if(typeof e==`string`)return iE;if(Array.isArray(e))return aE;if(!e)return;let{type:t}=e;if(yE.has(t))return t}var SE=xE,CE=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function wE(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
26
+ Expected it to be 'string' or 'object'.`;if(SE(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=CE([...yE].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
27
+ Expected it to be ${r}.`}var TE=class extends Error{name=`InvalidDocError`;constructor(e){super(wE(e)),this.doc=e}};function EE(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){if(n.has(e))return n.get(e);let t=i(e);return n.set(e,t),t}function i(e){switch(SE(e)){case aE:return t(e.map(r));case dE:return t({...e,parts:e.parts.map(r)});case fE:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case uE:{let{expandedStates:n,contents:i}=e;return n?(n=n.map(r),i=n[0]):i=r(i),t({...e,contents:i,expandedStates:n})}case cE:case sE:case pE:case _E:case mE:return t({...e,contents:r(e.contents)});case iE:case oE:case lE:case hE:case gE:case vE:return t(e);default:throw new TE(e)}}}function DE(e,t=KE){return EE(e,e=>typeof e==`string`?qE(t,e.split(`
28
+ `)):e)}var OE=()=>{},kE=OE,AE=OE,jE=OE;function ME(e){return kE(e),{type:sE,contents:e}}function NE(e,t){return kE(t),{type:cE,contents:t,n:e}}function PE(e,t={}){return kE(e),AE(t.expandedStates,!0),{type:uE,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function FE(e){return NE(-1/0,e)}function IE(e){return NE({type:`root`},e)}function LE(e){return jE(e),{type:dE,parts:e}}function RE(e,t=``,n={}){return kE(e),t!==``&&kE(t),{type:fE,breakContents:e,flatContents:t,groupId:n.groupId}}function zE(e,t){return kE(e),{type:pE,contents:e,groupId:t.groupId,negate:t.negate}}var BE={type:vE},VE={type:gE,hard:!0},HE={type:gE,hard:!0,literal:!0},UE={type:gE},WE={type:gE,soft:!0},GE=[VE,BE],KE=[HE,BE];function qE(e,t){kE(e),AE(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}var JE=`'`,YE=`"`;function XE(e,t){let n=t===!0||t===JE?JE:YE,r=n===JE?YE:JE,i=0,a=0;for(let t of e)t===n?i++:t===r&&a++;return i>a?r:n}var ZE=XE;function QE(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var $E,eD=class{constructor(e){eE(this,$E),tE(this,$E,new Set(e))}getLeadingWhitespaceCount(e){let t=$T(this,$E),n=0;for(let r=0;r<e.length&&t.has(e.charAt(r));r++)n++;return n}getTrailingWhitespaceCount(e){let t=$T(this,$E),n=0;for(let r=e.length-1;r>=0&&t.has(e.charAt(r));r--)n++;return n}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return $T(this,$E).has(e.charAt(0))}hasTrailingWhitespace(e){return $T(this,$E).has(bE(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let n=`[${QE([...$T(this,$E)].join(``))}]+`,r=new RegExp(t?`(${n})`:n,`u`);return e.split(r)}hasWhitespaceCharacter(e){let t=$T(this,$E);return Array.prototype.some.call(e,e=>t.has(e))}hasNonWhitespaceCharacter(e){let t=$T(this,$E);return Array.prototype.some.call(e,e=>!t.has(e))}isWhitespaceOnly(e){let t=$T(this,$E);return Array.prototype.every.call(e,e=>t.has(e))}};$E=new WeakMap;var tD=new eD([` `,`
29
+ `,`\f`,`\r`,` `]),nD=class extends Error{name=`UnexpectedNodeError`;constructor(e,t,n=`type`){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}};function rD(e){return e?.type===`front-matter`}var iD=rD,aD=new Set([`sourceSpan`,`startSourceSpan`,`endSourceSpan`,`nameSpan`,`valueSpan`,`keySpan`,`tagDefinition`,`tokens`,`valueTokens`,`switchValueSourceSpan`,`expSourceSpan`,`valueSourceSpan`]),oD=new Set([`if`,`else if`,`for`,`switch`,`case`]);function sD(e,t){var n;if(e.type===`text`||e.type===`comment`||iD(e)||e.type===`yaml`||e.type===`toml`)return null;if(e.type===`attribute`&&delete t.value,e.type===`docType`&&delete t.value,e.type===`angularControlFlowBlock`&&(n=e.parameters)!=null&&n.children)for(let n of t.parameters.children)oD.has(e.name)?delete n.expression:n.expression=n.expression.trim();e.type===`angularIcuExpression`&&(t.switchValue=e.switchValue.trim()),e.type===`angularLetDeclarationInitializer`&&delete t.value}sD.ignoredProperties=aD;var cD=sD;async function lD(e,t){if(e.language===`yaml`){let n=e.value.trim(),r=n?await t(n,{parser:`yaml`}):``;return IE([e.startDelimiter,e.explicitLanguage,GE,r,r?GE:``,e.endDelimiter])}}var uD=lD;function dD(e,t=!0){return[ME([WE,e]),t?WE:``]}function fD(e,t){let n=e.type===`NGRoot`?e.node.type===`NGMicrosyntax`&&e.node.body.length===1&&e.node.body[0].type===`NGMicrosyntaxExpression`?e.node.body[0].expression:e.node:e.type===`JsExpressionRoot`?e.node:e;return n&&(n.type===`ObjectExpression`||n.type===`ArrayExpression`||(t.parser===`__vue_expression`||t.parser===`__vue_ts_expression`)&&(n.type===`TemplateLiteral`||n.type===`StringLiteral`))}async function pD(e,t,n,r){n={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...n};let i=!0;r&&(n.__onHtmlBindingRoot=(e,t)=>{i=r(e,t)});let a=await t(e,n,t);return i?PE(a):dD(a)}function mD(e,t,n,r){let{node:i}=n,a=r.originalText.slice(i.sourceSpan.start.offset,i.sourceSpan.end.offset);return/^\s*$/u.test(a)?``:pD(a,e,{parser:`__ng_directive`,__isInHtmlAttribute:!1},fD)}var hD=mD,gD=(e,t)=>{if(!(e&&t==null))return t.toReversed||!Array.isArray(t)?t.toReversed():[...t].reverse()};function _D(e){return Array.isArray(e)&&e.length>0}var vD=_D,yD=globalThis.Deno?.build.os===`windows`||(globalThis.navigator?.platform)?.startsWith(`Win`)||(globalThis.process?.platform)?.startsWith(`win`)||!1;function bD(e){if(e=e instanceof URL?e:new URL(e),e.protocol!==`file:`)throw TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function xD(e){return e=bD(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,`%25`))}function SD(e){e=bD(e);let t=decodeURIComponent(e.pathname.replace(/\//g,`\\`).replace(/%(?![0-9A-Fa-f]{2})/g,`%25`)).replace(/^\\*([A-Za-z]:)(\\|$)/,`$1\\`);return e.hostname!==``&&(t=`\\\\${e.hostname}${t}`),t}function CD(e){return yD?SD(e):xD(e)}var wD=CD,TD=e=>String(e).split(/[/\\]/u).pop();function ED(e,t){if(!t)return;let n=TD(t).toLowerCase();return e.find(({filenames:e})=>e?.some(e=>e.toLowerCase()===n))??e.find(({extensions:e})=>e?.some(e=>n.endsWith(e)))}function DD(e,t){if(t)return e.find(({name:e})=>e.toLowerCase()===t)??e.find(({aliases:e})=>e?.includes(t))??e.find(({extensions:e})=>e?.includes(`.${t}`))}function OD(e,t){if(t){if(String(t).startsWith(`file:`))try{t=wD(t)}catch{return}if(typeof t==`string`)return e.find(({isSupported:e})=>e?.({filepath:t}))}}function kD(e,t){let n=gD(!1,e.plugins).flatMap(e=>e.languages??[]);return(DD(n,t.language)??ED(n,t.physicalFile)??ED(n,t.file)??OD(n,t.physicalFile)??OD(n,t.file)??(t.physicalFile,void 0))?.parsers[0]}var AD=kD,jD=`inline`,MD={area:`none`,base:`none`,basefont:`none`,datalist:`none`,head:`none`,link:`none`,meta:`none`,noembed:`none`,noframes:`none`,param:`block`,rp:`none`,script:`block`,style:`none`,template:`inline`,title:`none`,html:`block`,body:`block`,address:`block`,blockquote:`block`,center:`block`,dialog:`block`,div:`block`,figure:`block`,figcaption:`block`,footer:`block`,form:`block`,header:`block`,hr:`block`,legend:`block`,listing:`block`,main:`block`,p:`block`,plaintext:`block`,pre:`block`,search:`block`,xmp:`block`,slot:`contents`,ruby:`ruby`,rt:`ruby-text`,article:`block`,aside:`block`,h1:`block`,h2:`block`,h3:`block`,h4:`block`,h5:`block`,h6:`block`,hgroup:`block`,nav:`block`,section:`block`,dir:`block`,dd:`block`,dl:`block`,dt:`block`,menu:`block`,ol:`block`,ul:`block`,li:`list-item`,table:`table`,caption:`table-caption`,colgroup:`table-column-group`,col:`table-column`,thead:`table-header-group`,tbody:`table-row-group`,tfoot:`table-footer-group`,tr:`table-row`,td:`table-cell`,th:`table-cell`,input:`inline-block`,button:`inline-block`,fieldset:`block`,details:`block`,summary:`block`,marquee:`inline-block`,source:`block`,track:`block`,meter:`inline-block`,progress:`inline-block`,object:`inline-block`,video:`inline-block`,audio:`inline-block`,select:`inline-block`,option:`block`,optgroup:`block`},ND=`normal`,PD={listing:`pre`,plaintext:`pre`,pre:`pre`,xmp:`pre`,nobr:`nowrap`,table:`initial`,textarea:`pre-wrap`};function FD(e){return e.type===`element`&&!e.hasExplicitNamespace&&![`html`,`svg`].includes(e.namespace)}var ID=FD,LD=e=>rE(!1,e,/^[\t\f\r ]*\n/gu,``),RD=e=>LD(tD.trimEnd(e)),zD=e=>{let t=e,n=tD.getLeadingWhitespace(t);n&&(t=t.slice(n.length));let r=tD.getTrailingWhitespace(t);return r&&(t=t.slice(0,-r.length)),{leadingWhitespace:n,trailingWhitespace:r,text:t}};function BD(e,t){return!!(e.type===`ieConditionalComment`&&e.lastChild&&!e.lastChild.isSelfClosing&&!e.lastChild.endSourceSpan||e.type===`ieConditionalComment`&&!e.complete||yO(e)&&e.children.some(e=>e.type!==`text`&&e.type!==`interpolation`)||AO(e,t)&&!WD(e,t)&&e.type!==`interpolation`)}function VD(e){return e.type===`attribute`||!e.parent||!e.prev?!1:HD(e.prev)}function HD(e){return e.type===`comment`&&e.value.trim()===`prettier-ignore`}function UD(e){return e.type===`text`||e.type===`comment`}function WD(e,t){return e.type===`element`&&(e.fullName===`script`||e.fullName===`style`||e.fullName===`svg:style`||e.fullName===`svg:script`||e.fullName===`mj-style`&&t.parser===`mjml`||ID(e)&&(e.name===`script`||e.name===`style`))}function GD(e,t){return e.children&&!WD(e,t)}function KD(e,t){return WD(e,t)||e.type===`interpolation`||qD(e)}function qD(e){return SO(e).startsWith(`pre`)}function JD(e,t){var n;let r=i();if(r&&!e.prev&&(n=e.parent?.tagDefinition)!=null&&n.ignoreFirstLf)return e.type===`interpolation`;return r;function i(){return iD(e)||e.type===`angularControlFlowBlock`?!1:(e.type===`text`||e.type===`interpolation`)&&e.prev&&(e.prev.type===`text`||e.prev.type===`interpolation`)?!0:!e.parent||e.parent.cssDisplay===`none`?!1:yO(e.parent)?!0:!(!e.prev&&(e.parent.type===`root`||yO(e)&&e.parent||WD(e.parent,t)||OO(e.parent,t)||!mO(e.parent.cssDisplay))||e.prev&&!_O(e.prev.cssDisplay))}}function YD(e,t){return iD(e)||e.type===`angularControlFlowBlock`?!1:(e.type===`text`||e.type===`interpolation`)&&e.next&&(e.next.type===`text`||e.next.type===`interpolation`)?!0:!e.parent||e.parent.cssDisplay===`none`?!1:yO(e.parent)?!0:!(!e.next&&(e.parent.type===`root`||yO(e)&&e.parent||WD(e.parent,t)||OO(e.parent,t)||!hO(e.parent.cssDisplay))||e.next&&!gO(e.next.cssDisplay))}function XD(e,t){return vO(e.cssDisplay)&&!WD(e,t)}function ZD(e){return iD(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+1<e.next.sourceSpan.start.line}function QD(e){return $D(e)||e.type===`element`&&e.children.length>0&&([`body`,`script`,`style`].includes(e.name)||e.children.some(e=>sO(e)))||e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.type!==`text`&&rO(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||iO(e.lastChild))}function $D(e){return e.type===`element`&&e.children.length>0&&([`html`,`head`,`ul`,`ol`,`select`].includes(e.name)||e.cssDisplay.startsWith(`table`)&&e.cssDisplay!==`table-cell`)}function eO(e){return aO(e)||e.prev&&tO(e.prev)||nO(e)}function tO(e){return aO(e)||e.type===`element`&&e.fullName===`br`||nO(e)}function nO(e){return rO(e)&&iO(e)}function rO(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.line<e.sourceSpan.start.line:e.parent.type===`root`||e.parent.startSourceSpan.end.line<e.sourceSpan.start.line)}function iO(e){return e.hasTrailingSpaces&&(e.next?e.next.sourceSpan.start.line>e.sourceSpan.end.line:e.parent.type===`root`||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function aO(e){switch(e.type){case`ieConditionalComment`:case`comment`:case`directive`:return!0;case`element`:return[`script`,`select`].includes(e.name)}return!1}function oO(e){return e.lastChild?oO(e.lastChild):e}function sO(e){return e.children?.some(e=>e.type!==`text`)}function cO(e){if(e)switch(e){case`module`:case`text/javascript`:case`text/babel`:case`text/jsx`:case`application/javascript`:return`babel`;case`application/x-typescript`:return`typescript`;case`text/markdown`:return`markdown`;case`text/html`:return`html`;case`text/x-handlebars-template`:return`glimmer`;default:if(e.endsWith(`json`)||e.endsWith(`importmap`)||e===`speculationrules`)return`json`}}function lO(e,t){let{name:n,attrMap:r}=e;if(n!==`script`||Object.prototype.hasOwnProperty.call(r,`src`))return;let{type:i,lang:a}=e.attrMap;return!a&&!i?`babel`:AD(t,{language:a})??cO(i)}function uO(e,t){if(!AO(e,t))return;let{attrMap:n}=e;if(Object.prototype.hasOwnProperty.call(n,`src`))return;let{type:r,lang:i}=n;return AD(t,{language:i})??cO(r)}function dO(e,t){if(e.name===`style`){let{lang:n}=e.attrMap;return n?AD(t,{language:n}):`css`}if(e.name===`mj-style`&&t.parser===`mjml`)return`css`}function fO(e,t){return lO(e,t)??dO(e,t)??uO(e,t)}function pO(e){return e===`block`||e===`list-item`||e.startsWith(`table`)}function mO(e){return!pO(e)&&e!==`inline-block`}function hO(e){return!pO(e)&&e!==`inline-block`}function gO(e){return!pO(e)}function _O(e){return!pO(e)}function vO(e){return!pO(e)&&e!==`inline-block`}function yO(e){return SO(e).startsWith(`pre`)}function bO(e,t){let n=e;for(;n;){if(t(n))return!0;n=n.parent}return!1}function xO(e,t){if(kO(e,t))return`block`;if(e.prev?.type===`comment`){let t=e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u);if(t)return t[1]}let n=!1;if(e.type===`element`&&e.namespace===`svg`)if(bO(e,e=>e.fullName===`svg:foreignObject`))n=!0;else return e.name===`svg`?`inline-block`:`block`;switch(t.htmlWhitespaceSensitivity){case`strict`:return`inline`;case`ignore`:return`block`;default:if(e.type===`element`&&(!e.namespace||n||ID(e))&&Object.prototype.hasOwnProperty.call(MD,e.name))return MD[e.name]}return jD}function SO(e){return e.type===`element`&&(!e.namespace||ID(e))&&Object.prototype.hasOwnProperty.call(PD,e.name)?PD[e.name]:ND}function CO(e){let t=1/0;for(let n of e.split(`
30
+ `)){if(n.length===0)continue;let e=tD.getLeadingWhitespaceCount(n);if(e===0)return 0;n.length!==e&&e<t&&(t=e)}return t===1/0?0:t}function wO(e,t=CO(e)){return t===0?e:e.split(`
31
+ `).map(e=>e.slice(t)).join(`
32
+ `)}function TO(e){return rE(!1,rE(!1,e,`&apos;`,`'`),`&quot;`,`"`)}function EO(e){return TO(e.value)}var DO=new Set([`template`,`style`,`script`]);function OO(e,t){return kO(e,t)&&!DO.has(e.fullName)}function kO(e,t){return t.parser===`vue`&&e.type===`element`&&e.parent.type===`root`&&e.fullName.toLowerCase()!==`html`}function AO(e,t){return kO(e,t)&&(OO(e,t)||e.attrMap.lang&&e.attrMap.lang!==`html`)}function jO(e){let t=e.fullName;return t.charAt(0)===`#`||t===`slot-scope`||t===`v-slot`||t.startsWith(`v-slot:`)}function MO(e,t){let n=e.parent;if(!kO(n,t))return!1;let r=n.fullName,i=e.fullName;return r===`script`&&i===`setup`||r===`style`&&i===`vars`}function NO(e,t=e.value){return e.parent.isWhitespaceSensitive?e.parent.isIndentationSensitive?DE(t):DE(wO(RD(t)),GE):qE(UE,tD.split(t))}function PO(e,t){return kO(e,t)&&e.name===`script`}var FO=/\{\{(.+?)\}\}/su;async function IO(e,t){let n=[];for(let[r,i]of e.split(FO).entries())if(r%2==0)n.push(DE(i));else try{n.push(PE([`{{`,ME([UE,await pD(i,t,{parser:`__ng_interpolation`,__isInHtmlInterpolation:!0})]),UE,`}}`]))}catch{n.push(`{{`,DE(i),`}}`)}return n}function LO({parser:e}){return(t,n,r)=>pD(EO(r.node),t,{parser:e},fD)}var RO=LO({parser:`__ng_action`}),zO=LO({parser:`__ng_binding`}),BO=LO({parser:`__ng_directive`});function VO(e,t){if(t.parser!==`angular`)return;let{node:n}=e,r=n.fullName;if(r.startsWith(`(`)&&r.endsWith(`)`)||r.startsWith(`on-`))return RO;if(r.startsWith(`[`)&&r.endsWith(`]`)||/^bind(?:on)?-/u.test(r)||/^ng-(?:if|show|hide|class|style)$/u.test(r))return zO;if(r.startsWith(`*`))return BO;let i=EO(n);if(/^i18n(?:-.+)?$/u.test(r))return()=>dD(LE(NO(n,i.trim())),!i.includes(`@@`));if(FO.test(i))return e=>IO(i,e)}var HO=VO;function UO(e,t){let{node:n}=e,r=EO(n);if(n.fullName===`class`&&!t.parentParser&&!r.includes(`{{`))return()=>r.trim().split(/\s+/u).join(` `)}var WO=UO;function GO(e){return e===` `||e===`
33
+ `||e===`\f`||e===`\r`||e===` `}var KO=/^[ \t\n\r\u000c]+/,qO=/^[, \t\n\r\u000c]+/,JO=/^[^ \t\n\r\u000c]+/,YO=/[,]+$/,XO=/^\d+$/,ZO=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function QO(e){let t=e.length,n,r,i,a,o,s=0,c;function l(t){let n,r=t.exec(e.substring(s));if(r)return[n]=r,s+=n.length,n}let u=[];for(;;){if(l(qO),s>=t){if(u.length===0)throw Error(`Must contain one or more image candidate strings.`);return u}c=s,n=l(JO),r=[],n.slice(-1)===`,`?(n=n.replace(YO,``),f()):d()}function d(){for(l(KO),i=``,a=`in descriptor`;;){if(o=e.charAt(s),a===`in descriptor`)if(GO(o))i&&(r.push(i),i=``,a=`after descriptor`);else if(o===`,`){s+=1,i&&r.push(i),f();return}else if(o===`(`)i+=o,a=`in parens`;else if(o===``){i&&r.push(i),f();return}else i+=o;else if(a===`in parens`)if(o===`)`)i+=o,a=`in descriptor`;else if(o===``){r.push(i),f();return}else i+=o;else if(a===`after descriptor`&&!GO(o))if(o===``){f();return}else a=`in descriptor`,--s;s+=1}}function f(){let t=!1,i,a,o,s,l={},d,f,p,m,h;for(s=0;s<r.length;s++)d=r[s],f=d[d.length-1],p=d.substring(0,d.length-1),m=parseInt(p,10),h=parseFloat(p),XO.test(p)&&f===`w`?((i||a)&&(t=!0),m===0?t=!0:i=m):ZO.test(p)&&f===`x`?((i||a||o)&&(t=!0),h<0?t=!0:a=h):XO.test(p)&&f===`h`?((o||a)&&(t=!0),m===0?t=!0:o=m):t=!0;if(!t)l.source={value:n,startOffset:c},i&&(l.width={value:i}),a&&(l.density={value:a}),o&&(l.height={value:o}),u.push(l);else throw Error(`Invalid srcset descriptor found in "${e}" at "${d}".`)}}var $O=QO;function ek(e){if(e.node.fullName===`srcset`&&(e.parent.fullName===`img`||e.parent.fullName===`source`))return()=>rk(EO(e.node))}var tk={width:`w`,height:`h`,density:`x`},nk=Object.keys(tk);function rk(e){let t=$O(e),n=nk.filter(e=>t.some(t=>Object.prototype.hasOwnProperty.call(t,e)));if(n.length>1)throw Error(`Mixed descriptor in srcset is not supported`);let[r]=n,i=tk[r],a=t.map(e=>e.source.value),o=Math.max(...a.map(e=>e.length)),s=t.map(e=>e[r]?String(e[r].value):``),c=s.map(e=>{let t=e.indexOf(`.`);return t===-1?e.length:t}),l=Math.max(...c);return dD(qE([`,`,UE],a.map((e,t)=>{let n=[e],r=s[t];if(r){let a=o-e.length+1,s=l-c[t],u=` `.repeat(a+s);n.push(RE(u,` `),r+i)}return n})))}var ik=ek;function ak(e,t){let{node:n}=e,r=EO(e.node).trim();if(n.fullName===`style`&&!t.parentParser&&!r.includes(`{{`))return async e=>dD(await e(r,{parser:`css`,__isHTMLStyleAttribute:!0}))}var ok=new WeakMap;function sk(e,t){let{root:n}=e;return ok.has(n)||ok.set(n,n.children.some(e=>PO(e,t)&&[`ts`,`typescript`].includes(e.attrMap.lang))),ok.get(n)}var ck=sk;function lk(e,t,n){let{node:r}=n;return pD(`type T<${EO(r)}> = any`,e,{parser:`babel-ts`,__isEmbeddedTypescriptGenericParameters:!0},fD)}function uk(e,t,{parseWithTs:n}){return pD(`function _(${e}) {}`,t,{parser:n?`babel-ts`:`babel`,__isVueBindings:!0})}async function dk(e,t,n,r){let{left:i,operator:a,right:o}=fk(EO(n.node)),s=ck(n,r);return[PE(await pD(`function _(${i}) {}`,e,{parser:s?`babel-ts`:`babel`,__isVueForBindingLeft:!0})),` `,a,` `,await pD(o,e,{parser:s?`__ts_expression`:`__js_expression`})]}function fk(e){let t=/(.*?)\s+(in|of)\s+(.*)/su,n=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,r=/^\(|\)$/gu,i=e.match(t);if(!i)return;let a={};if(a.for=i[3].trim(),!a.for)return;let o=rE(!1,i[1].trim(),r,``),s=o.match(n);s?(a.alias=o.replace(n,``),a.iterator1=s[1].trim(),s[2]&&(a.iterator2=s[2].trim())):a.alias=o;let c=[a.alias,a.iterator1,a.iterator2];if(!c.some((e,t)=>!e&&(t===0||c.slice(t+1).some(Boolean))))return{left:c.filter(Boolean).join(`,`),operator:i[2],right:a.for}}function pk(e,t){if(t.parser!==`vue`)return;let{node:n}=e,r=n.fullName;if(r===`v-for`)return dk;if(r===`generic`&&PO(n.parent,t))return lk;let i=EO(n),a=ck(e,t);if(jO(n)||MO(n,t))return e=>uk(i,e,{parseWithTs:a});if(r.startsWith(`@`)||r.startsWith(`v-on:`))return e=>mk(i,e,{parseWithTs:a});if(r.startsWith(`:`)||r.startsWith(`.`)||r.startsWith(`v-bind:`))return e=>hk(i,e,{parseWithTs:a});if(r.startsWith(`v-`))return e=>gk(i,e,{parseWithTs:a})}async function mk(e,t,{parseWithTs:n}){try{return await gk(e,t,{parseWithTs:n})}catch(e){if(e.cause?.code!==`BABEL_PARSER_SYNTAX_ERROR`)throw e}return pD(e,t,{parser:n?`__vue_ts_event_binding`:`__vue_event_binding`},fD)}function hk(e,t,{parseWithTs:n}){return pD(e,t,{parser:n?`__vue_ts_expression`:`__vue_expression`},fD)}function gk(e,t,{parseWithTs:n}){return pD(e,t,{parser:n?`__ts_expression`:`__js_expression`},fD)}var _k=pk;function vk(e,t){let{node:n}=e;if(n.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(t.originalText.slice(n.valueSpan.start.offset,n.valueSpan.end.offset))||t.parser===`lwc`&&n.value.startsWith(`{`)&&n.value.endsWith(`}`))return[n.rawName,`=`,n.value];for(let n of[ik,ak,WO,_k,HO]){let r=n(e,t);if(r)return yk(r)}}}function yk(e){return async(t,n,r,i)=>{let a=await e(t,n,r,i);if(a)return a=EE(a,e=>typeof e==`string`?rE(!1,e,`"`,`&quot;`):e),[r.node.rawName,`="`,PE(a),`"`]}}var bk=vk,xk=new Proxy(()=>{},{get:()=>xk});function Sk(e){return e.sourceSpan.start.offset}function Ck(e){return e.sourceSpan.end.offset}function wk(e,t){return[e.isSelfClosing?``:Tk(e,t),Ek(e,t)]}function Tk(e,t){return e.lastChild&&Pk(e.lastChild)?``:[Dk(e,t),kk(e,t)]}function Ek(e,t){return(e.next?Mk(e.next):Nk(e.parent))?``:[Ak(e,t),Ok(e,t)]}function Dk(e,t){return Nk(e)?Ak(e.lastChild,t):``}function Ok(e,t){return Pk(e)?kk(e.parent,t):Fk(e)?Wk(e.next,t):``}function kk(e,t){if(jk(e,t))return``;switch(e.type){case`ieConditionalComment`:return`<!`;case`element`:if(e.hasHtmComponentClosingTag)return`<//`;default:return`</${e.rawName}`}}function Ak(e,t){if(jk(e,t))return``;switch(e.type){case`ieConditionalComment`:case`ieConditionalEndComment`:return`[endif]-->`;case`ieConditionalStartComment`:return`]><!-->`;case`interpolation`:return`}}`;case`angularIcuExpression`:return`}`;case`element`:if(e.isSelfClosing)return`/>`;default:return`>`}}function jk(e,t){return!e.isSelfClosing&&!e.endSourceSpan&&(VD(e)||BD(e.parent,t))}function Mk(e){return e.prev&&e.prev.type!==`docType`&&e.type!==`angularControlFlowBlock`&&!UD(e.prev)&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function Nk(e){return e.lastChild?.isTrailingSpaceSensitive&&!e.lastChild.hasTrailingSpaces&&!UD(oO(e.lastChild))&&!yO(e)}function Pk(e){return!e.next&&!e.hasTrailingSpaces&&e.isTrailingSpaceSensitive&&UD(oO(e))}function Fk(e){return e.next&&!UD(e.next)&&UD(e)&&e.isTrailingSpaceSensitive&&!e.hasTrailingSpaces}function Ik(e){let t=e.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/su);return t?t[1]?t[1].split(/\s+/u):!0:!1}function Lk(e){return!e.prev&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function Rk(e,t,n){let{node:r}=e;if(!vD(r.attrs))return r.isSelfClosing?` `:``;let i=r.prev?.type===`comment`&&Ik(r.prev.value),a=typeof i==`boolean`?()=>i:Array.isArray(i)?e=>i.includes(e.rawName):()=>!1,o=e.map(({node:e})=>a(e)?DE(t.originalText.slice(Sk(e),Ck(e))):n(),`attrs`),s=r.type===`element`&&r.fullName===`script`&&r.attrs.length===1&&r.attrs[0].fullName===`src`&&r.children.length===0,c=t.singleAttributePerLine&&r.attrs.length>1&&!kO(r,t)?GE:UE,l=[ME([s?` `:UE,qE(c,o)])];return r.firstChild&&Lk(r.firstChild)||r.isSelfClosing&&Nk(r.parent)||s?l.push(r.isSelfClosing?` `:``):l.push(t.bracketSameLine?r.isSelfClosing?` `:``:r.isSelfClosing?UE:WE),l}function zk(e){return e.firstChild&&Lk(e.firstChild)?``:Gk(e)}function Bk(e,t,n){let{node:r}=e;return[Vk(r,t),Rk(e,t,n),r.isSelfClosing?``:zk(r)]}function Vk(e,t){return e.prev&&Fk(e.prev)?``:[Hk(e,t),Wk(e,t)]}function Hk(e,t){return Lk(e)?Gk(e.parent):Mk(e)?Ak(e.prev,t):``}var Uk=`<!doctype`;function Wk(e,t){switch(e.type){case`ieConditionalComment`:case`ieConditionalStartComment`:return`<!--[if ${e.condition}`;case`ieConditionalEndComment`:return`<!--<!`;case`interpolation`:return`{{`;case`docType`:{if(e.value===`html`){let{filepath:e}=t;if(e&&/\.html?$/u.test(e))return Uk}let n=Sk(e);return t.originalText.slice(n,n+Uk.length)}case`angularIcuExpression`:return`{`;case`element`:if(e.condition)return`<!--[if ${e.condition}]><!--><${e.rawName}`;default:return`<${e.rawName}`}}function Gk(e){switch(e.type){case`ieConditionalComment`:return`]>`;case`element`:if(e.condition)return`><!--<![endif]-->`;default:return`>`}}function Kk(e,t){if(!e.endSourceSpan)return``;let n=e.startSourceSpan.end.offset;e.firstChild&&Lk(e.firstChild)&&(n-=Gk(e).length);let r=e.endSourceSpan.start.offset;return e.lastChild&&Pk(e.lastChild)?r+=kk(e,t).length:Nk(e)&&(r-=Ak(e.lastChild,t).length),t.originalText.slice(n,r)}var qk=Kk,Jk=new Set([`if`,`else if`,`for`,`switch`,`case`]);function Yk(e,t){let{node:n}=e;switch(n.type){case`element`:if(WD(n,t)||n.type===`interpolation`)return;if(!n.isSelfClosing&&AO(n,t)){let r=fO(n,t);return r?async(i,a)=>{let o=qk(n,t),s=/^\s*$/u.test(o),c=``;return s||=(c=await i(RD(o),{parser:r,__embeddedInHtml:!0}),c===``),[Hk(n,t),PE(Bk(e,t,a)),s?``:GE,c,s?``:GE,wk(n,t),Ok(n,t)]}:void 0}break;case`text`:if(WD(n.parent,t)){let e=fO(n.parent,t);if(e)return async r=>{let i=e===`markdown`?wO(n.value.replace(/^[^\S\n]*\n/u,``)):n.value,a={parser:e,__embeddedInHtml:!0};if(t.parser===`html`&&e===`babel`){let e=`script`,{attrMap:t}=n.parent;t&&(t.type===`module`||(t.type===`text/babel`||t.type===`text/jsx`)&&t[`data-type`]===`module`)&&(e=`module`),a.__babelSourceType=e}return[BE,Hk(n,t),await r(i,a),Ok(n,t)]}}else if(n.parent.type===`interpolation`)return async r=>{let i={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return t.parser===`angular`?i.parser=`__ng_interpolation`:t.parser===`vue`?i.parser=ck(e,t)?`__vue_ts_expression`:`__vue_expression`:i.parser=`__js_expression`,[ME([UE,await r(n.value,i)]),n.parent.next&&Mk(n.parent.next)?` `:UE]};break;case`attribute`:return bk(e,t);case`front-matter`:return e=>uD(n,e);case`angularControlFlowBlockParameters`:return Jk.has(e.parent.name)?hD:void 0;case`angularLetDeclarationInitializer`:return e=>pD(n.value,e,{parser:`__ng_binding`,__isInHtmlAttribute:!1})}}var Xk=Yk,Zk=null;function Qk(e){if(Zk!==null&&typeof Zk.property){let e=Zk;return Zk=Qk.prototype=null,e}return Zk=Qk.prototype=e??Object.create(null),new Qk}var $k=10;for(let e=0;e<=$k;e++)Qk();function eA(e){return Qk(e)}function tA(e,t=`type`){eA(e);function n(n){let r=n[t],i=e[r];if(!Array.isArray(i))throw Object.assign(Error(`Missing visitor keys for '${r}'.`),{node:n});return i}return n}var nA=tA({"front-matter":[],root:[`children`],element:[`attrs`,`children`],ieConditionalComment:[`children`],ieConditionalStartComment:[],ieConditionalEndComment:[],interpolation:[`children`],text:[`children`],docType:[],comment:[],attribute:[],cdata:[],angularControlFlowBlock:[`children`,`parameters`],angularControlFlowBlockParameters:[`children`],angularControlFlowBlockParameter:[],angularLetDeclaration:[`init`],angularLetDeclarationInitializer:[],angularIcuExpression:[`cases`],angularIcuCase:[`expression`]}),rA=`format`,iA=/^\s*<!--\s*@(?:noformat|noprettier)\s*-->/u,aA=/^\s*<!--\s*@(?:format|prettier)\s*-->/u;function oA(e){return aA.test(e)}function sA(e){return iA.test(e)}function cA(e){return`<!-- @${rA} -->
34
+
35
+ ${e}`}var lA=new Map([[`if`,new Set([`else if`,`else`])],[`else if`,new Set([`else if`,`else`])],[`for`,new Set([`empty`])],[`defer`,new Set([`placeholder`,`error`,`loading`])],[`placeholder`,new Set([`placeholder`,`error`,`loading`])],[`error`,new Set([`placeholder`,`error`,`loading`])],[`loading`,new Set([`placeholder`,`error`,`loading`])]]);function uA(e){let t=Ck(e);return e.type===`element`&&!e.endSourceSpan&&vD(e.children)?Math.max(t,uA(bE(!1,e.children,-1))):t}function dA(e,t,n){let r=e.node;if(VD(r)){let e=uA(r);return[Hk(r,t),DE(tD.trimEnd(t.originalText.slice(Sk(r)+(r.prev&&Fk(r.prev)?Wk(r).length:0),e-(r.next&&Mk(r.next)?Ak(r,t).length:0)))),Ok(r,t)]}return n()}function fA(e,t){return UD(e)&&UD(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?eO(t)?GE:UE:``:eO(t)?GE:WE:Fk(e)&&(VD(t)||t.firstChild||t.isSelfClosing||t.type===`element`&&t.attrs.length>0)||e.type===`element`&&e.isSelfClosing&&Mk(t)?``:!t.isLeadingSpaceSensitive||eO(t)||Mk(t)&&e.lastChild&&Pk(e.lastChild)&&e.lastChild.lastChild&&Pk(e.lastChild.lastChild)?GE:t.hasLeadingSpaces?UE:WE}function pA(e,t,n){let{node:r}=e;if($D(r))return[BE,...e.map(e=>{let r=e.node,i=r.prev?fA(r.prev,r):``;return[i?[i,ZD(r.prev)?GE:``]:``,dA(e,t,n)]},`children`)];let i=r.children.map(()=>Symbol(``));return e.map((e,r)=>{let a=e.node;if(UD(a)){if(a.prev&&UD(a.prev)){let r=fA(a.prev,a);if(r)return ZD(a.prev)?[GE,GE,dA(e,t,n)]:[r,dA(e,t,n)]}return dA(e,t,n)}let o=[],s=[],c=[],l=[],u=a.prev?fA(a.prev,a):``,d=a.next?fA(a,a.next):``;return u&&(ZD(a.prev)?o.push(GE,GE):u===GE?o.push(GE):UD(a.prev)?s.push(u):s.push(RE(``,WE,{groupId:i[r-1]}))),d&&(ZD(a)?UD(a.next)&&l.push(GE,GE):d===GE?UD(a.next)&&l.push(GE):c.push(d)),[...o,PE([...s,PE([dA(e,t,n),...c],{id:i[r]})]),...l]},`children`)}function mA(e,t,n){let{node:r}=e,i=[];gA(e)&&i.push(`} `),i.push(`@`,r.name),r.parameters&&i.push(` (`,PE(n(`parameters`)),`)`),i.push(` {`);let a=hA(r);return r.children.length>0?(r.firstChild.hasLeadingSpaces=!0,r.lastChild.hasTrailingSpaces=!0,i.push(ME([GE,pA(e,t,n)])),a&&i.push(GE,`}`)):a&&i.push(`}`),PE(i,{shouldBreak:!0})}function hA(e){var t;return!(e.next?.type===`angularControlFlowBlock`&&(t=lA.get(e.name))!=null&&t.has(e.next.name))}function gA(e){let{previous:t}=e;return t?.type===`angularControlFlowBlock`&&!VD(t)&&!hA(t)}function _A(e,t,n){return[ME([WE,qE([`;`,UE],e.map(n,`children`))]),WE]}function vA(e,t,n){let{node:r}=e;return[Vk(r,t),PE([r.switchValue.trim(),`, `,r.clause,r.cases.length>0?[`,`,ME([UE,qE(UE,e.map(n,`cases`))])]:``,WE]),Ek(r,t)]}function yA(e,t,n){let{node:r}=e;return[r.value,` {`,PE([ME([WE,e.map(({node:e,isLast:t})=>{let r=[n()];return e.type===`text`&&(e.hasLeadingSpaces&&r.unshift(UE),e.hasTrailingSpaces&&!t&&r.push(UE)),r},`expression`)]),WE]),`}`]}function bA(e,t,n){let{node:r}=e;if(BD(r,t))return[Hk(r,t),PE(Bk(e,t,n)),DE(qk(r,t)),...wk(r,t),Ok(r,t)];let i=r.children.length===1&&(r.firstChild.type===`interpolation`||r.firstChild.type===`angularIcuExpression`)&&r.firstChild.isLeadingSpaceSensitive&&!r.firstChild.hasLeadingSpaces&&r.lastChild.isTrailingSpaceSensitive&&!r.lastChild.hasTrailingSpaces,a=Symbol(`element-attr-group-id`),o=i=>PE([PE(Bk(e,t,n),{id:a}),i,wk(r,t)]);return r.children.length===0?o(r.hasDanglingSpaces&&r.isDanglingSpaceSensitive?UE:``):o([QD(r)?BE:``,(e=>i?zE(e,{groupId:a}):(WD(r,t)||OO(r,t))&&r.parent.type===`root`&&t.parser===`vue`&&!t.vueIndentScriptAndStyle?e:ME(e))([(()=>i?RE(WE,``,{groupId:a}):r.firstChild.hasLeadingSpaces&&r.firstChild.isLeadingSpaceSensitive?UE:r.firstChild.type===`text`&&r.isWhitespaceSensitive&&r.isIndentationSensitive?FE(WE):WE)(),pA(e,t,n)]),(()=>(r.next?Mk(r.next):Nk(r.parent))?r.lastChild.hasTrailingSpaces&&r.lastChild.isTrailingSpaceSensitive?` `:``:i?RE(WE,``,{groupId:a}):r.lastChild.hasTrailingSpaces&&r.lastChild.isTrailingSpaceSensitive?UE:(r.lastChild.type===`comment`||r.lastChild.type===`text`&&r.isWhitespaceSensitive&&r.isIndentationSensitive)&&RegExp(`\\n[\\t ]{${t.tabWidth*(e.ancestors.length-1)}}$`,`u`).test(r.lastChild.value)?``:WE)()])}function xA(e){return e>=9&&e<=32||e==160}function SA(e){return 48<=e&&e<=57}function CA(e){return e>=97&&e<=122||e>=65&&e<=90}function wA(e){return e>=97&&e<=102||e>=65&&e<=70||SA(e)}function TA(e){return e===10||e===13}function EA(e){return 48<=e&&e<=55}function DA(e){return e===39||e===34||e===96}var OA=/-+([a-z0-9])/g;function kA(e){return e.replace(OA,(...e)=>e[1].toUpperCase())}var AA=class e{constructor(e,t,n,r){this.file=e,this.offset=t,this.line=n,this.col=r}toString(){return this.offset==null?this.file.url:`${this.file.url}@${this.line}:${this.col}`}moveBy(t){let n=this.file.content,r=n.length,i=this.offset,a=this.line,o=this.col;for(;i>0&&t<0;)if(i--,t++,n.charCodeAt(i)==10){a--;let e=n.substring(0,i-1).lastIndexOf(`
36
+ `);o=e>0?i-e:i}else o--;for(;i<r&&t>0;){let e=n.charCodeAt(i);i++,t--,e==10?(a++,o=0):o++}return new e(this.file,i,a,o)}getContext(e,t){let n=this.file.content,r=this.offset;if(r!=null){r>n.length-1&&(r=n.length-1);let i=r,a=0,o=0;for(;a<e&&r>0&&(r--,a++,!(n[r]==`
37
+ `&&++o==t)););for(a=0,o=0;a<e&&i<n.length-1&&(i++,a++,!(n[i]==`
38
+ `&&++o==t)););return{before:n.substring(r,this.offset),after:n.substring(this.offset,i+1)}}return null}},jA=class{constructor(e,t){this.content=e,this.url=t}},G=class{constructor(e,t,n=e,r=null){this.start=e,this.end=t,this.fullStart=n,this.details=r}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},MA;(function(e){e[e.WARNING=0]=`WARNING`,e[e.ERROR=1]=`ERROR`})(MA||={});var NA=class{constructor(e,t,n=MA.ERROR,r){this.span=e,this.msg=t,this.level=n,this.relatedError=r}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${MA[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:``;return`${this.contextualMessage()}: ${this.span.start}${e}`}},PA=[IA,LA,zA,VA,HA,GA,UA,WA,KA,BA];function FA(e,t){for(let n of PA)n(e,t);return e}function IA(e){e.walk(e=>{if(e.type===`element`&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&e.children[0].type===`text`&&e.children[0].value[0]===`
39
+ `){let t=e.children[0];t.value.length===1?e.removeChild(t):t.value=t.value.slice(1)}})}function LA(e){let t=e=>e.type===`element`&&e.prev?.type===`ieConditionalStartComment`&&e.prev.sourceSpan.end.offset===e.startSourceSpan.start.offset&&e.firstChild?.type===`ieConditionalEndComment`&&e.firstChild.sourceSpan.start.offset===e.startSourceSpan.end.offset;e.walk(e=>{if(e.children)for(let n=0;n<e.children.length;n++){let r=e.children[n];if(!t(r))continue;let i=r.prev,a=r.firstChild;e.removeChild(i),n--;let o=new G(i.sourceSpan.start,a.sourceSpan.end),s=new G(o.start,r.sourceSpan.end);r.condition=i.condition,r.sourceSpan=s,r.startSourceSpan=o,r.removeChild(a)}})}function RA(e,t,n){e.walk(e=>{if(e.children)for(let r=0;r<e.children.length;r++){let i=e.children[r];if(i.type!==`text`&&!t(i))continue;i.type!==`text`&&(i.type=`text`,i.value=n(i));let a=i.prev;!a||a.type!==`text`||(a.value+=i.value,a.sourceSpan=new G(a.sourceSpan.start,i.sourceSpan.end),e.removeChild(i),r--)}})}function zA(e){return RA(e,e=>e.type===`cdata`,e=>`<![CDATA[${e.value}]]>`)}function BA(e){let t=e=>e.type===`element`&&e.attrs.length===0&&e.children.length===1&&e.firstChild.type===`text`&&!tD.hasWhitespaceCharacter(e.children[0].value)&&!e.firstChild.hasLeadingSpaces&&!e.firstChild.hasTrailingSpaces&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces&&e.isTrailingSpaceSensitive&&!e.hasTrailingSpaces&&e.prev?.type===`text`&&e.next?.type===`text`;e.walk(e=>{if(e.children)for(let n=0;n<e.children.length;n++){let r=e.children[n];if(!t(r))continue;let i=r.prev,a=r.next;i.value+=`<${r.rawName}>`+r.firstChild.value+`</${r.rawName}>`+a.value,i.sourceSpan=new G(i.sourceSpan.start,a.sourceSpan.end),i.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,i.hasTrailingSpaces=a.hasTrailingSpaces,e.removeChild(r),n--,e.removeChild(a)}})}function VA(e,t){if(t.parser===`html`)return;let n=/\{\{(.+?)\}\}/su;e.walk(e=>{if(GD(e,t))for(let t of e.children){if(t.type!==`text`)continue;let r=t.sourceSpan.start,i=null,a=t.value.split(n);for(let n=0;n<a.length;n++,r=i){let o=a[n];if(n%2==0){i=r.moveBy(o.length),o.length>0&&e.insertChildBefore(t,{type:`text`,value:o,sourceSpan:new G(r,i)});continue}i=r.moveBy(o.length+4),e.insertChildBefore(t,{type:`interpolation`,sourceSpan:new G(r,i),children:o.length===0?[]:[{type:`text`,value:o,sourceSpan:new G(r.moveBy(2),i.moveBy(-2))}]})}e.removeChild(t)}})}function HA(e,t){e.walk(e=>{let n=e.$children;if(!n)return;if(n.length===0||n.length===1&&n[0].type===`text`&&tD.trim(n[0].value).length===0){e.hasDanglingSpaces=n.length>0,e.$children=[];return}let r=KD(e,t),i=qD(e);if(!r)for(let t=0;t<n.length;t++){let r=n[t];if(r.type!==`text`)continue;let{leadingWhitespace:i,text:a,trailingWhitespace:o}=zD(r.value),s=r.prev,c=r.next;a?(r.value=a,r.sourceSpan=new G(r.sourceSpan.start.moveBy(i.length),r.sourceSpan.end.moveBy(-o.length)),i&&(s&&(s.hasTrailingSpaces=!0),r.hasLeadingSpaces=!0),o&&(r.hasTrailingSpaces=!0,c&&(c.hasLeadingSpaces=!0))):(e.removeChild(r),t--,(i||o)&&(s&&(s.hasTrailingSpaces=!0),c&&(c.hasLeadingSpaces=!0)))}e.isWhitespaceSensitive=r,e.isIndentationSensitive=i})}function UA(e){e.walk(e=>{e.isSelfClosing=!e.children||e.type===`element`&&(e.tagDefinition.isVoid||e.endSourceSpan&&e.startSourceSpan.start===e.endSourceSpan.start&&e.startSourceSpan.end===e.endSourceSpan.end)})}function WA(e,t){e.walk(e=>{e.type===`element`&&(e.hasHtmComponentClosingTag=e.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(t.originalText.slice(e.endSourceSpan.start.offset,e.endSourceSpan.end.offset)))})}function GA(e,t){e.walk(e=>{e.cssDisplay=xO(e,t)})}function KA(e,t){e.walk(e=>{let{children:n}=e;if(n){if(n.length===0){e.isDanglingSpaceSensitive=XD(e,t);return}for(let e of n)e.isLeadingSpaceSensitive=JD(e,t),e.isTrailingSpaceSensitive=YD(e,t);for(let e=0;e<n.length;e++){let t=n[e];t.isLeadingSpaceSensitive=(e===0||t.prev.isTrailingSpaceSensitive)&&t.isLeadingSpaceSensitive,t.isTrailingSpaceSensitive=(e===n.length-1||t.next.isLeadingSpaceSensitive)&&t.isTrailingSpaceSensitive}}})}var qA=FA;function JA(e,t,n){let{node:r}=e;switch(r.type){case`front-matter`:return DE(r.raw);case`root`:return t.__onHtmlRoot&&t.__onHtmlRoot(r),[PE(pA(e,t,n)),GE];case`element`:case`ieConditionalComment`:return bA(e,t,n);case`angularControlFlowBlock`:return mA(e,t,n);case`angularControlFlowBlockParameters`:return _A(e,t,n);case`angularControlFlowBlockParameter`:return tD.trim(r.expression);case`angularLetDeclaration`:return PE([`@let `,PE([r.id,` =`,PE(ME([UE,n(`init`)]))]),`;`]);case`angularLetDeclarationInitializer`:return r.value;case`angularIcuExpression`:return vA(e,t,n);case`angularIcuCase`:return yA(e,t,n);case`ieConditionalStartComment`:case`ieConditionalEndComment`:return[Vk(r),Ek(r)];case`interpolation`:return[Vk(r,t),...e.map(n,`children`),Ek(r,t)];case`text`:{if(r.parent.type===`interpolation`){let e=/\n[^\S\n]*$/u,t=e.test(r.value);return[DE(t?r.value.replace(e,``):r.value),t?GE:``]}let e=Hk(r,t),n=NO(r),i=Ok(r,t);return n[0]=[e,n[0]],n.push([n.pop(),i]),LE(n)}case`docType`:return[PE([Vk(r,t),` `,rE(!1,r.value.replace(/^html\b/iu,`html`),/\s+/gu,` `)]),Ek(r,t)];case`comment`:return[Hk(r,t),DE(t.originalText.slice(Sk(r),Ck(r))),Ok(r,t)];case`attribute`:{if(r.value===null)return r.rawName;let e=TO(r.value),t=ZE(e,`"`);return[r.rawName,`=`,t,DE(t===`"`?rE(!1,e,`"`,`&quot;`):rE(!1,e,`'`,`&apos;`)),t]}case`cdata`:default:throw new nD(r,`HTML`)}}var YA={preprocess:qA,print:JA,insertPragma:cA,massageAstNode:cD,embed:Xk,getVisitorKeys:nA},XA=[{name:`Angular`,type:`markup`,extensions:[`.component.html`],tmScope:`text.html.basic`,aceMode:`html`,aliases:[`xhtml`],codemirrorMode:`htmlmixed`,codemirrorMimeType:`text/html`,parsers:[`angular`],vscodeLanguageIds:[`html`],filenames:[],linguistLanguageId:146},{name:`HTML`,type:`markup`,extensions:[`.html`,`.hta`,`.htm`,`.html.hl`,`.inc`,`.xht`,`.xhtml`],tmScope:`text.html.basic`,aceMode:`html`,aliases:[`xhtml`],codemirrorMode:`htmlmixed`,codemirrorMimeType:`text/html`,parsers:[`html`],vscodeLanguageIds:[`html`],linguistLanguageId:146},{name:`Lightning Web Components`,type:`markup`,extensions:[],tmScope:`text.html.basic`,aceMode:`html`,aliases:[`xhtml`],codemirrorMode:`htmlmixed`,codemirrorMimeType:`text/html`,parsers:[`lwc`],vscodeLanguageIds:[`html`],filenames:[],linguistLanguageId:146},{name:`MJML`,type:`markup`,extensions:[`.mjml`],tmScope:`text.mjml.basic`,aceMode:`html`,aliases:[`MJML`,`mjml`],codemirrorMode:`htmlmixed`,codemirrorMimeType:`text/html`,parsers:[`mjml`],filenames:[],vscodeLanguageIds:[`mjml`],linguistLanguageId:146},{name:`Vue`,type:`markup`,extensions:[`.vue`],tmScope:`source.vue`,aceMode:`html`,parsers:[`vue`],vscodeLanguageIds:[`vue`],linguistLanguageId:391}],ZA={bracketSpacing:{category:`Common`,type:`boolean`,default:!0,description:`Print spaces between brackets.`,oppositeDescription:`Do not print spaces between brackets.`},objectWrap:{category:`Common`,type:`choice`,default:`preserve`,description:`How to wrap object literals.`,choices:[{value:`preserve`,description:`Keep as multi-line, if there is a newline between the opening brace and first property.`},{value:`collapse`,description:`Fit to a single line when possible.`}]},singleQuote:{category:`Common`,type:`boolean`,default:!1,description:`Use single quotes instead of double quotes.`},proseWrap:{category:`Common`,type:`choice`,default:`preserve`,description:`How to wrap prose.`,choices:[{value:`always`,description:`Wrap prose if it exceeds the print width.`},{value:`never`,description:`Do not wrap prose.`},{value:`preserve`,description:`Wrap prose as-is.`}]},bracketSameLine:{category:`Common`,type:`boolean`,default:!1,description:`Put > of opening tags on the last line instead of on a new line.`},singleAttributePerLine:{category:`Common`,type:`boolean`,default:!1,description:`Enforce single attribute per line in HTML, Vue and JSX.`}},QA=`HTML`,$A={bracketSameLine:ZA.bracketSameLine,htmlWhitespaceSensitivity:{category:QA,type:`choice`,default:`css`,description:`How to handle whitespaces in HTML.`,choices:[{value:`css`,description:`Respect the default value of CSS display property.`},{value:`strict`,description:`Whitespaces are considered sensitive.`},{value:`ignore`,description:`Whitespaces are considered insensitive.`}]},singleAttributePerLine:ZA.singleAttributePerLine,vueIndentScriptAndStyle:{category:QA,type:`boolean`,default:!1,description:`Indent script and style tags in Vue files.`}},ej={};XT(ej,{angular:()=>sN,html:()=>iN,lwc:()=>lN,mjml:()=>oN,vue:()=>cN});var tj;(function(e){e[e.Emulated=0]=`Emulated`,e[e.None=2]=`None`,e[e.ShadowDom=3]=`ShadowDom`})(tj||={});var nj;(function(e){e[e.OnPush=0]=`OnPush`,e[e.Default=1]=`Default`})(nj||={});var rj;(function(e){e[e.None=0]=`None`,e[e.SignalBased=1]=`SignalBased`,e[e.HasDecoratorInputTransform=2]=`HasDecoratorInputTransform`})(rj||={});var ij={name:`custom-elements`},aj={name:`no-errors-schema`},oj;(function(e){e[e.NONE=0]=`NONE`,e[e.HTML=1]=`HTML`,e[e.STYLE=2]=`STYLE`,e[e.SCRIPT=3]=`SCRIPT`,e[e.URL=4]=`URL`,e[e.RESOURCE_URL=5]=`RESOURCE_URL`})(oj||={});var sj;(function(e){e[e.Error=0]=`Error`,e[e.Warning=1]=`Warning`,e[e.Ignore=2]=`Ignore`})(sj||={});var cj;(function(e){e[e.RAW_TEXT=0]=`RAW_TEXT`,e[e.ESCAPABLE_RAW_TEXT=1]=`ESCAPABLE_RAW_TEXT`,e[e.PARSABLE_DATA=2]=`PARSABLE_DATA`})(cj||={});function lj(e,t=!0){if(e[0]!=`:`)return[null,e];let n=e.indexOf(`:`,1);if(n===-1){if(t)throw Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[null,e]}return[e.slice(1,n),e.slice(n+1)]}function uj(e){return lj(e)[1]===`ng-container`}function dj(e){return lj(e)[1]===`ng-content`}function fj(e){return e===null?null:lj(e)[0]}function pj(e,t){return e?`:${e}:${t}`:t}var mj;function hj(){return mj||(mj={},gj(oj.HTML,[`iframe|srcdoc`,`*|innerHTML`,`*|outerHTML`]),gj(oj.STYLE,[`*|style`]),gj(oj.URL,[`*|formAction`,`area|href`,`area|ping`,`audio|src`,`a|href`,`a|ping`,`blockquote|cite`,`body|background`,`del|cite`,`form|action`,`img|src`,`input|src`,`ins|cite`,`q|cite`,`source|src`,`track|src`,`video|poster`,`video|src`]),gj(oj.RESOURCE_URL,[`applet|code`,`applet|codebase`,`base|href`,`embed|src`,`frame|src`,`head|profile`,`html|manifest`,`iframe|src`,`link|href`,`media|src`,`object|codebase`,`object|data`,`script|src`])),mj}function gj(e,t){for(let n of t)mj[n.toLowerCase()]=e}var _j=class{},vj=`boolean`,yj=`number`,bj=`string`,xj=`object`,Sj=`[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored.[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy.abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy.media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume.:svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex.:svg:graphics^:svg:|.:svg:animation^:svg:|*begin,*end,*repeat.:svg:geometry^:svg:|.:svg:componentTransferFunction^:svg:|.:svg:gradient^:svg:|.:svg:textContent^:svg:graphics|.:svg:textPositioning^:svg:textContent|.a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username.area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username.audio^media|.br^[HTMLElement]|clear.base^[HTMLElement]|href,target.body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink.button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value.canvas^[HTMLElement]|#height,#width.content^[HTMLElement]|select.dl^[HTMLElement]|!compact.data^[HTMLElement]|value.datalist^[HTMLElement]|.details^[HTMLElement]|!open.dialog^[HTMLElement]|!open,returnValue.dir^[HTMLElement]|!compact.div^[HTMLElement]|align.embed^[HTMLElement]|align,height,name,src,type,width.fieldset^[HTMLElement]|!disabled,name.font^[HTMLElement]|color,face,size.form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target.frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src.frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows.hr^[HTMLElement]|align,color,!noShade,size,width.head^[HTMLElement]|.h1,h2,h3,h4,h5,h6^[HTMLElement]|align.html^[HTMLElement]|version.iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width.img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width.input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width.li^[HTMLElement]|type,#value.label^[HTMLElement]|htmlFor.legend^[HTMLElement]|align.link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type.map^[HTMLElement]|name.marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width.menu^[HTMLElement]|!compact.meta^[HTMLElement]|content,httpEquiv,media,name,scheme.meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value.ins,del^[HTMLElement]|cite,dateTime.ol^[HTMLElement]|!compact,!reversed,#start,type.object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width.optgroup^[HTMLElement]|!disabled,label.option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value.output^[HTMLElement]|defaultValue,%htmlFor,name,value.p^[HTMLElement]|align.param^[HTMLElement]|name,type,value,valueType.picture^[HTMLElement]|.pre^[HTMLElement]|#width.progress^[HTMLElement]|#max,#value.q,blockquote,cite^[HTMLElement]|.script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type.select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value.slot^[HTMLElement]|name.source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width.span^[HTMLElement]|.style^[HTMLElement]|!disabled,media,type.caption^[HTMLElement]|align.th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width.col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width.table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width.tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign.tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign.template^[HTMLElement]|.textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap.time^[HTMLElement]|dateTime.title^[HTMLElement]|text.track^[HTMLElement]|!default,kind,label,src,srclang.ul^[HTMLElement]|!compact,type.unknown^[HTMLElement]|.video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width.:svg:a^:svg:graphics|.:svg:animate^:svg:animation|.:svg:animateMotion^:svg:animation|.:svg:animateTransform^:svg:animation|.:svg:circle^:svg:geometry|.:svg:clipPath^:svg:graphics|.:svg:defs^:svg:graphics|.:svg:desc^:svg:|.:svg:discard^:svg:|.:svg:ellipse^:svg:geometry|.:svg:feBlend^:svg:|.:svg:feColorMatrix^:svg:|.:svg:feComponentTransfer^:svg:|.:svg:feComposite^:svg:|.:svg:feConvolveMatrix^:svg:|.:svg:feDiffuseLighting^:svg:|.:svg:feDisplacementMap^:svg:|.:svg:feDistantLight^:svg:|.:svg:feDropShadow^:svg:|.:svg:feFlood^:svg:|.:svg:feFuncA^:svg:componentTransferFunction|.:svg:feFuncB^:svg:componentTransferFunction|.:svg:feFuncG^:svg:componentTransferFunction|.:svg:feFuncR^:svg:componentTransferFunction|.:svg:feGaussianBlur^:svg:|.:svg:feImage^:svg:|.:svg:feMerge^:svg:|.:svg:feMergeNode^:svg:|.:svg:feMorphology^:svg:|.:svg:feOffset^:svg:|.:svg:fePointLight^:svg:|.:svg:feSpecularLighting^:svg:|.:svg:feSpotLight^:svg:|.:svg:feTile^:svg:|.:svg:feTurbulence^:svg:|.:svg:filter^:svg:|.:svg:foreignObject^:svg:graphics|.:svg:g^:svg:graphics|.:svg:image^:svg:graphics|decoding.:svg:line^:svg:geometry|.:svg:linearGradient^:svg:gradient|.:svg:mpath^:svg:|.:svg:marker^:svg:|.:svg:mask^:svg:|.:svg:metadata^:svg:|.:svg:path^:svg:geometry|.:svg:pattern^:svg:|.:svg:polygon^:svg:geometry|.:svg:polyline^:svg:geometry|.:svg:radialGradient^:svg:gradient|.:svg:rect^:svg:geometry|.:svg:svg^:svg:graphics|#currentScale,#zoomAndPan.:svg:script^:svg:|type.:svg:set^:svg:animation|.:svg:stop^:svg:|.:svg:style^:svg:|!disabled,media,title,type.:svg:switch^:svg:graphics|.:svg:symbol^:svg:|.:svg:tspan^:svg:textPositioning|.:svg:text^:svg:textPositioning|.:svg:textPath^:svg:textContent|.:svg:title^:svg:|.:svg:use^:svg:graphics|.:svg:view^:svg:|#zoomAndPan.data^[HTMLElement]|value.keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name.menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default.summary^[HTMLElement]|.time^[HTMLElement]|dateTime.:svg:cursor^:svg:|.:math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex.:math:math^:math:|.:math:maction^:math:|.:math:menclose^:math:|.:math:merror^:math:|.:math:mfenced^:math:|.:math:mfrac^:math:|.:math:mi^:math:|.:math:mmultiscripts^:math:|.:math:mn^:math:|.:math:mo^:math:|.:math:mover^:math:|.:math:mpadded^:math:|.:math:mphantom^:math:|.:math:mroot^:math:|.:math:mrow^:math:|.:math:ms^:math:|.:math:mspace^:math:|.:math:msqrt^:math:|.:math:mstyle^:math:|.:math:msub^:math:|.:math:msubsup^:math:|.:math:msup^:math:|.:math:mtable^:math:|.:math:mtd^:math:|.:math:mtext^:math:|.:math:mtr^:math:|.:math:munder^:math:|.:math:munderover^:math:|.:math:semantics^:math:|`.split(`.`),Cj=new Map(Object.entries({class:`className`,for:`htmlFor`,formaction:`formAction`,innerHtml:`innerHTML`,readonly:`readOnly`,tabindex:`tabIndex`})),wj=Array.from(Cj).reduce((e,[t,n])=>(e.set(t,n),e),new Map),Tj=class extends _j{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,Sj.forEach(e=>{let t=new Map,n=new Set,[r,i]=e.split(`|`),a=i.split(`,`),[o,s]=r.split(`^`);o.split(`,`).forEach(e=>{this._schema.set(e.toLowerCase(),t),this._eventSchema.set(e.toLowerCase(),n)});let c=s&&this._schema.get(s.toLowerCase());if(c){for(let[e,n]of c)t.set(e,n);for(let e of this._eventSchema.get(s.toLowerCase()))n.add(e)}a.forEach(e=>{if(e.length>0)switch(e[0]){case`*`:n.add(e.substring(1));break;case`!`:t.set(e.substring(1),vj);break;case`#`:t.set(e.substring(1),yj);break;case`%`:t.set(e.substring(1),xj);break;default:t.set(e,bj)}})})}hasProperty(e,t,n){if(n.some(e=>e.name===aj.name))return!0;if(e.indexOf(`-`)>-1){if(uj(e)||dj(e))return!1;if(n.some(e=>e.name===ij.name))return!0}return(this._schema.get(e.toLowerCase())||this._schema.get(`unknown`)).has(t)}hasElement(e,t){return t.some(e=>e.name===aj.name)||e.indexOf(`-`)>-1&&(uj(e)||dj(e)||t.some(e=>e.name===ij.name))?!0:this._schema.has(e.toLowerCase())}securityContext(e,t,n){n&&(t=this.getMappedPropName(t)),e=e.toLowerCase(),t=t.toLowerCase();let r=hj()[e+`|`+t];return r||(r=hj()[`*|`+t],r||oj.NONE)}getMappedPropName(e){return Cj.get(e)??e}getDefaultComponentElementName(){return`ng-component`}validateProperty(e){return e.toLowerCase().startsWith(`on`)?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...
40
+ If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith(`on`)?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let t=this._schema.get(e.toLowerCase())||this._schema.get(`unknown`);return Array.from(t.keys()).map(e=>wj.get(e)??e)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return kA(e)}normalizeAnimationStyleValue(e,t,n){let r=``,i=n.toString().trim(),a=null;if(Ej(e)&&n!==0&&n!==`0`)if(typeof n==`number`)r=`px`;else{let e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&e[1].length==0&&(a=`Please provide a CSS unit value for ${t}:${n}`)}return{error:a,value:i+r}}};function Ej(e){switch(e){case`width`:case`height`:case`minWidth`:case`minHeight`:case`maxWidth`:case`maxHeight`:case`left`:case`top`:case`bottom`:case`right`:case`fontSize`:case`outlineWidth`:case`outlineOffset`:case`paddingTop`:case`paddingLeft`:case`paddingBottom`:case`paddingRight`:case`marginTop`:case`marginLeft`:case`marginBottom`:case`marginRight`:case`borderRadius`:case`borderWidth`:case`borderTopWidth`:case`borderLeftWidth`:case`borderRightWidth`:case`borderBottomWidth`:case`textIndent`:return!0;default:return!1}}var K=class{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:n=cj.PARSABLE_DATA,closedByParent:r=!1,isVoid:i=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:o=!1,canSelfClose:s=!1}={}){this.closedByChildren={},this.closedByParent=!1,e&&e.length>0&&e.forEach(e=>this.closedByChildren[e]=!0),this.isVoid=i,this.closedByParent=r||i,this.implicitNamespacePrefix=t||null,this.contentType=n,this.ignoreFirstLf=a,this.preventNamespaceInheritance=o,this.canSelfClose=s??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType==`object`?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},Dj,Oj;function kj(e){return Oj||(Dj=new K({canSelfClose:!0}),Oj=Object.assign(Object.create(null),{base:new K({isVoid:!0}),meta:new K({isVoid:!0}),area:new K({isVoid:!0}),embed:new K({isVoid:!0}),link:new K({isVoid:!0}),img:new K({isVoid:!0}),input:new K({isVoid:!0}),param:new K({isVoid:!0}),hr:new K({isVoid:!0}),br:new K({isVoid:!0}),source:new K({isVoid:!0}),track:new K({isVoid:!0}),wbr:new K({isVoid:!0}),p:new K({closedByChildren:`address.article.aside.blockquote.div.dl.fieldset.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.hr.main.nav.ol.p.pre.section.table.ul`.split(`.`),closedByParent:!0}),thead:new K({closedByChildren:[`tbody`,`tfoot`]}),tbody:new K({closedByChildren:[`tbody`,`tfoot`],closedByParent:!0}),tfoot:new K({closedByChildren:[`tbody`],closedByParent:!0}),tr:new K({closedByChildren:[`tr`],closedByParent:!0}),td:new K({closedByChildren:[`td`,`th`],closedByParent:!0}),th:new K({closedByChildren:[`td`,`th`],closedByParent:!0}),col:new K({isVoid:!0}),svg:new K({implicitNamespacePrefix:`svg`}),foreignObject:new K({implicitNamespacePrefix:`svg`,preventNamespaceInheritance:!0}),math:new K({implicitNamespacePrefix:`math`}),li:new K({closedByChildren:[`li`],closedByParent:!0}),dt:new K({closedByChildren:[`dt`,`dd`]}),dd:new K({closedByChildren:[`dt`,`dd`],closedByParent:!0}),rb:new K({closedByChildren:[`rb`,`rt`,`rtc`,`rp`],closedByParent:!0}),rt:new K({closedByChildren:[`rb`,`rt`,`rtc`,`rp`],closedByParent:!0}),rtc:new K({closedByChildren:[`rb`,`rtc`,`rp`],closedByParent:!0}),rp:new K({closedByChildren:[`rb`,`rt`,`rtc`,`rp`],closedByParent:!0}),optgroup:new K({closedByChildren:[`optgroup`],closedByParent:!0}),option:new K({closedByChildren:[`option`,`optgroup`],closedByParent:!0}),pre:new K({ignoreFirstLf:!0}),listing:new K({ignoreFirstLf:!0}),style:new K({contentType:cj.RAW_TEXT}),script:new K({contentType:cj.RAW_TEXT}),title:new K({contentType:{default:cj.ESCAPABLE_RAW_TEXT,svg:cj.PARSABLE_DATA}}),textarea:new K({contentType:cj.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new Tj().allKnownElementNames().forEach(e=>{!Oj[e]&&fj(e)===null&&(Oj[e]=new K({canSelfClose:!1}))})),Oj[e]??Dj}var Aj=class{constructor(e,t){this.sourceSpan=e,this.i18n=t}},jj=class extends Aj{constructor(e,t,n,r){super(t,r),this.value=e,this.tokens=n,this.type=`text`}visit(e,t){return e.visitText(this,t)}},Mj=class extends Aj{constructor(e,t,n,r){super(t,r),this.value=e,this.tokens=n,this.type=`cdata`}visit(e,t){return e.visitCdata(this,t)}},Nj=class extends Aj{constructor(e,t,n,r,i,a){super(r,a),this.switchValue=e,this.type=t,this.cases=n,this.switchValueSourceSpan=i}visit(e,t){return e.visitExpansion(this,t)}},Pj=class{constructor(e,t,n,r,i){this.value=e,this.expression=t,this.sourceSpan=n,this.valueSourceSpan=r,this.expSourceSpan=i,this.type=`expansionCase`}visit(e,t){return e.visitExpansionCase(this,t)}},Fj=class extends Aj{constructor(e,t,n,r,i,a,o){super(n,o),this.name=e,this.value=t,this.keySpan=r,this.valueSpan=i,this.valueTokens=a,this.type=`attribute`}visit(e,t){return e.visitAttribute(this,t)}get nameSpan(){return this.keySpan}},Ij=class extends Aj{constructor(e,t,n,r,i,a=null,o=null,s){super(r,s),this.name=e,this.attrs=t,this.children=n,this.startSourceSpan=i,this.endSourceSpan=a,this.nameSpan=o,this.type=`element`}visit(e,t){return e.visitElement(this,t)}},Lj=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type=`comment`}visit(e,t){return e.visitComment(this,t)}},Rj=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type=`docType`}visit(e,t){return e.visitDocType(this,t)}},zj=class extends Aj{constructor(e,t,n,r,i,a,o=null,s){super(r,s),this.name=e,this.parameters=t,this.children=n,this.nameSpan=i,this.startSourceSpan=a,this.endSourceSpan=o,this.type=`block`}visit(e,t){return e.visitBlock(this,t)}},Bj=class{constructor(e,t){this.expression=e,this.sourceSpan=t,this.type=`blockParameter`,this.startSourceSpan=null,this.endSourceSpan=null}visit(e,t){return e.visitBlockParameter(this,t)}},Vj=class{constructor(e,t,n,r,i){this.name=e,this.value=t,this.sourceSpan=n,this.nameSpan=r,this.valueSpan=i,this.type=`letDeclaration`,this.startSourceSpan=null,this.endSourceSpan=null}visit(e,t){return e.visitLetDeclaration(this,t)}};function Hj(e,t,n=null){let r=[],i=e.visit?t=>e.visit(t,n)||t.visit(e,n):t=>t.visit(e,n);return t.forEach(e=>{let t=i(e);t&&r.push(t)}),r}var Uj=class{constructor(){}visitElement(e,t){this.visitChildren(t,t=>{t(e.attrs),t(e.children)})}visitAttribute(e,t){}visitText(e,t){}visitCdata(e,t){}visitComment(e,t){}visitDocType(e,t){}visitExpansion(e,t){return this.visitChildren(t,t=>{t(e.cases)})}visitExpansionCase(e,t){}visitBlock(e,t){this.visitChildren(t,t=>{t(e.parameters),t(e.children)})}visitBlockParameter(e,t){}visitLetDeclaration(e,t){}visitChildren(e,t){let n=[],r=this;function i(t){t&&n.push(Hj(r,t,e))}return t(i),Array.prototype.concat.apply([],n)}},Wj={AElig:`Æ`,AMP:`&`,amp:`&`,Aacute:`Á`,Abreve:`Ă`,Acirc:`Â`,Acy:`А`,Afr:`𝔄`,Agrave:`À`,Alpha:`Α`,Amacr:`Ā`,And:`⩓`,Aogon:`Ą`,Aopf:`𝔸`,ApplyFunction:`⁡`,af:`⁡`,Aring:`Å`,angst:`Å`,Ascr:`𝒜`,Assign:`≔`,colone:`≔`,coloneq:`≔`,Atilde:`Ã`,Auml:`Ä`,Backslash:`∖`,setminus:`∖`,setmn:`∖`,smallsetminus:`∖`,ssetmn:`∖`,Barv:`⫧`,Barwed:`⌆`,doublebarwedge:`⌆`,Bcy:`Б`,Because:`∵`,becaus:`∵`,because:`∵`,Bernoullis:`ℬ`,Bscr:`ℬ`,bernou:`ℬ`,Beta:`Β`,Bfr:`𝔅`,Bopf:`𝔹`,Breve:`˘`,breve:`˘`,Bumpeq:`≎`,HumpDownHump:`≎`,bump:`≎`,CHcy:`Ч`,COPY:`©`,copy:`©`,Cacute:`Ć`,Cap:`⋒`,CapitalDifferentialD:`ⅅ`,DD:`ⅅ`,Cayleys:`ℭ`,Cfr:`ℭ`,Ccaron:`Č`,Ccedil:`Ç`,Ccirc:`Ĉ`,Cconint:`∰`,Cdot:`Ċ`,Cedilla:`¸`,cedil:`¸`,CenterDot:`·`,centerdot:`·`,middot:`·`,Chi:`Χ`,CircleDot:`⊙`,odot:`⊙`,CircleMinus:`⊖`,ominus:`⊖`,CirclePlus:`⊕`,oplus:`⊕`,CircleTimes:`⊗`,otimes:`⊗`,ClockwiseContourIntegral:`∲`,cwconint:`∲`,CloseCurlyDoubleQuote:`”`,rdquo:`”`,rdquor:`”`,CloseCurlyQuote:`’`,rsquo:`’`,rsquor:`’`,Colon:`∷`,Proportion:`∷`,Colone:`⩴`,Congruent:`≡`,equiv:`≡`,Conint:`∯`,DoubleContourIntegral:`∯`,ContourIntegral:`∮`,conint:`∮`,oint:`∮`,Copf:`ℂ`,complexes:`ℂ`,Coproduct:`∐`,coprod:`∐`,CounterClockwiseContourIntegral:`∳`,awconint:`∳`,Cross:`⨯`,Cscr:`𝒞`,Cup:`⋓`,CupCap:`≍`,asympeq:`≍`,DDotrahd:`⤑`,DJcy:`Ђ`,DScy:`Ѕ`,DZcy:`Џ`,Dagger:`‡`,ddagger:`‡`,Darr:`↡`,Dashv:`⫤`,DoubleLeftTee:`⫤`,Dcaron:`Ď`,Dcy:`Д`,Del:`∇`,nabla:`∇`,Delta:`Δ`,Dfr:`𝔇`,DiacriticalAcute:`´`,acute:`´`,DiacriticalDot:`˙`,dot:`˙`,DiacriticalDoubleAcute:`˝`,dblac:`˝`,DiacriticalGrave:"`",grave:"`",DiacriticalTilde:`˜`,tilde:`˜`,Diamond:`⋄`,diam:`⋄`,diamond:`⋄`,DifferentialD:`ⅆ`,dd:`ⅆ`,Dopf:`𝔻`,Dot:`¨`,DoubleDot:`¨`,die:`¨`,uml:`¨`,DotDot:`⃜`,DotEqual:`≐`,doteq:`≐`,esdot:`≐`,DoubleDownArrow:`⇓`,Downarrow:`⇓`,dArr:`⇓`,DoubleLeftArrow:`⇐`,Leftarrow:`⇐`,lArr:`⇐`,DoubleLeftRightArrow:`⇔`,Leftrightarrow:`⇔`,hArr:`⇔`,iff:`⇔`,DoubleLongLeftArrow:`⟸`,Longleftarrow:`⟸`,xlArr:`⟸`,DoubleLongLeftRightArrow:`⟺`,Longleftrightarrow:`⟺`,xhArr:`⟺`,DoubleLongRightArrow:`⟹`,Longrightarrow:`⟹`,xrArr:`⟹`,DoubleRightArrow:`⇒`,Implies:`⇒`,Rightarrow:`⇒`,rArr:`⇒`,DoubleRightTee:`⊨`,vDash:`⊨`,DoubleUpArrow:`⇑`,Uparrow:`⇑`,uArr:`⇑`,DoubleUpDownArrow:`⇕`,Updownarrow:`⇕`,vArr:`⇕`,DoubleVerticalBar:`∥`,par:`∥`,parallel:`∥`,shortparallel:`∥`,spar:`∥`,DownArrow:`↓`,ShortDownArrow:`↓`,darr:`↓`,downarrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,duarr:`⇵`,DownBreve:`̑`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,leftharpoondown:`↽`,lhard:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,rhard:`⇁`,rightharpoondown:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,top:`⊤`,DownTeeArrow:`↧`,mapstodown:`↧`,Dscr:`𝒟`,Dstrok:`Đ`,ENG:`Ŋ`,ETH:`Ð`,Eacute:`É`,Ecaron:`Ě`,Ecirc:`Ê`,Ecy:`Э`,Edot:`Ė`,Efr:`𝔈`,Egrave:`È`,Element:`∈`,in:`∈`,isin:`∈`,isinv:`∈`,Emacr:`Ē`,EmptySmallSquare:`◻`,EmptyVerySmallSquare:`▫`,Eogon:`Ę`,Eopf:`𝔼`,Epsilon:`Ε`,Equal:`⩵`,EqualTilde:`≂`,eqsim:`≂`,esim:`≂`,Equilibrium:`⇌`,rightleftharpoons:`⇌`,rlhar:`⇌`,Escr:`ℰ`,expectation:`ℰ`,Esim:`⩳`,Eta:`Η`,Euml:`Ë`,Exists:`∃`,exist:`∃`,ExponentialE:`ⅇ`,ee:`ⅇ`,exponentiale:`ⅇ`,Fcy:`Ф`,Ffr:`𝔉`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,blacksquare:`▪`,squarf:`▪`,squf:`▪`,Fopf:`𝔽`,ForAll:`∀`,forall:`∀`,Fouriertrf:`ℱ`,Fscr:`ℱ`,GJcy:`Ѓ`,GT:`>`,gt:`>`,Gamma:`Γ`,Gammad:`Ϝ`,Gbreve:`Ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,Gcy:`Г`,Gdot:`Ġ`,Gfr:`𝔊`,Gg:`⋙`,ggg:`⋙`,Gopf:`𝔾`,GreaterEqual:`≥`,ge:`≥`,geq:`≥`,GreaterEqualLess:`⋛`,gel:`⋛`,gtreqless:`⋛`,GreaterFullEqual:`≧`,gE:`≧`,geqq:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,gl:`≷`,gtrless:`≷`,GreaterSlantEqual:`⩾`,geqslant:`⩾`,ges:`⩾`,GreaterTilde:`≳`,gsim:`≳`,gtrsim:`≳`,Gscr:`𝒢`,Gt:`≫`,NestedGreaterGreater:`≫`,gg:`≫`,HARDcy:`Ъ`,Hacek:`ˇ`,caron:`ˇ`,Hat:`^`,Hcirc:`Ĥ`,Hfr:`ℌ`,Poincareplane:`ℌ`,HilbertSpace:`ℋ`,Hscr:`ℋ`,hamilt:`ℋ`,Hopf:`ℍ`,quaternions:`ℍ`,HorizontalLine:`─`,boxh:`─`,Hstrok:`Ħ`,HumpEqual:`≏`,bumpe:`≏`,bumpeq:`≏`,IEcy:`Е`,IJlig:`IJ`,IOcy:`Ё`,Iacute:`Í`,Icirc:`Î`,Icy:`И`,Idot:`İ`,Ifr:`ℑ`,Im:`ℑ`,image:`ℑ`,imagpart:`ℑ`,Igrave:`Ì`,Imacr:`Ī`,ImaginaryI:`ⅈ`,ii:`ⅈ`,Int:`∬`,Integral:`∫`,int:`∫`,Intersection:`⋂`,bigcap:`⋂`,xcap:`⋂`,InvisibleComma:`⁣`,ic:`⁣`,InvisibleTimes:`⁢`,it:`⁢`,Iogon:`Į`,Iopf:`𝕀`,Iota:`Ι`,Iscr:`ℐ`,imagline:`ℐ`,Itilde:`Ĩ`,Iukcy:`І`,Iuml:`Ï`,Jcirc:`Ĵ`,Jcy:`Й`,Jfr:`𝔍`,Jopf:`𝕁`,Jscr:`𝒥`,Jsercy:`Ј`,Jukcy:`Є`,KHcy:`Х`,KJcy:`Ќ`,Kappa:`Κ`,Kcedil:`Ķ`,Kcy:`К`,Kfr:`𝔎`,Kopf:`𝕂`,Kscr:`𝒦`,LJcy:`Љ`,LT:`<`,lt:`<`,Lacute:`Ĺ`,Lambda:`Λ`,Lang:`⟪`,Laplacetrf:`ℒ`,Lscr:`ℒ`,lagran:`ℒ`,Larr:`↞`,twoheadleftarrow:`↞`,Lcaron:`Ľ`,Lcedil:`Ļ`,Lcy:`Л`,LeftAngleBracket:`⟨`,lang:`⟨`,langle:`⟨`,LeftArrow:`←`,ShortLeftArrow:`←`,larr:`←`,leftarrow:`←`,slarr:`←`,LeftArrowBar:`⇤`,larrb:`⇤`,LeftArrowRightArrow:`⇆`,leftrightarrows:`⇆`,lrarr:`⇆`,LeftCeiling:`⌈`,lceil:`⌈`,LeftDoubleBracket:`⟦`,lobrk:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,dharl:`⇃`,downharpoonleft:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,lfloor:`⌊`,LeftRightArrow:`↔`,harr:`↔`,leftrightarrow:`↔`,LeftRightVector:`⥎`,LeftTee:`⊣`,dashv:`⊣`,LeftTeeArrow:`↤`,mapstoleft:`↤`,LeftTeeVector:`⥚`,LeftTriangle:`⊲`,vartriangleleft:`⊲`,vltri:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,ltrie:`⊴`,trianglelefteq:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,uharl:`↿`,upharpoonleft:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,leftharpoonup:`↼`,lharu:`↼`,LeftVectorBar:`⥒`,LessEqualGreater:`⋚`,leg:`⋚`,lesseqgtr:`⋚`,LessFullEqual:`≦`,lE:`≦`,leqq:`≦`,LessGreater:`≶`,lessgtr:`≶`,lg:`≶`,LessLess:`⪡`,LessSlantEqual:`⩽`,leqslant:`⩽`,les:`⩽`,LessTilde:`≲`,lesssim:`≲`,lsim:`≲`,Lfr:`𝔏`,Ll:`⋘`,Lleftarrow:`⇚`,lAarr:`⇚`,Lmidot:`Ŀ`,LongLeftArrow:`⟵`,longleftarrow:`⟵`,xlarr:`⟵`,LongLeftRightArrow:`⟷`,longleftrightarrow:`⟷`,xharr:`⟷`,LongRightArrow:`⟶`,longrightarrow:`⟶`,xrarr:`⟶`,Lopf:`𝕃`,LowerLeftArrow:`↙`,swarr:`↙`,swarrow:`↙`,LowerRightArrow:`↘`,searr:`↘`,searrow:`↘`,Lsh:`↰`,lsh:`↰`,Lstrok:`Ł`,Lt:`≪`,NestedLessLess:`≪`,ll:`≪`,Map:`⤅`,Mcy:`М`,MediumSpace:` `,Mellintrf:`ℳ`,Mscr:`ℳ`,phmmat:`ℳ`,Mfr:`𝔐`,MinusPlus:`∓`,mnplus:`∓`,mp:`∓`,Mopf:`𝕄`,Mu:`Μ`,NJcy:`Њ`,Nacute:`Ń`,Ncaron:`Ň`,Ncedil:`Ņ`,Ncy:`Н`,NegativeMediumSpace:`​`,NegativeThickSpace:`​`,NegativeThinSpace:`​`,NegativeVeryThinSpace:`​`,ZeroWidthSpace:`​`,NewLine:`
41
+ `,Nfr:`𝔑`,NoBreak:`⁠`,NonBreakingSpace:`\xA0`,nbsp:`\xA0`,Nopf:`ℕ`,naturals:`ℕ`,Not:`⫬`,NotCongruent:`≢`,nequiv:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,npar:`∦`,nparallel:`∦`,nshortparallel:`∦`,nspar:`∦`,NotElement:`∉`,notin:`∉`,notinva:`∉`,NotEqual:`≠`,ne:`≠`,NotEqualTilde:`≂̸`,nesim:`≂̸`,NotExists:`∄`,nexist:`∄`,nexists:`∄`,NotGreater:`≯`,ngt:`≯`,ngtr:`≯`,NotGreaterEqual:`≱`,nge:`≱`,ngeq:`≱`,NotGreaterFullEqual:`≧̸`,ngE:`≧̸`,ngeqq:`≧̸`,NotGreaterGreater:`≫̸`,nGtv:`≫̸`,NotGreaterLess:`≹`,ntgl:`≹`,NotGreaterSlantEqual:`⩾̸`,ngeqslant:`⩾̸`,nges:`⩾̸`,NotGreaterTilde:`≵`,ngsim:`≵`,NotHumpDownHump:`≎̸`,nbump:`≎̸`,NotHumpEqual:`≏̸`,nbumpe:`≏̸`,NotLeftTriangle:`⋪`,nltri:`⋪`,ntriangleleft:`⋪`,NotLeftTriangleBar:`⧏̸`,NotLeftTriangleEqual:`⋬`,nltrie:`⋬`,ntrianglelefteq:`⋬`,NotLess:`≮`,nless:`≮`,nlt:`≮`,NotLessEqual:`≰`,nle:`≰`,nleq:`≰`,NotLessGreater:`≸`,ntlg:`≸`,NotLessLess:`≪̸`,nLtv:`≪̸`,NotLessSlantEqual:`⩽̸`,nleqslant:`⩽̸`,nles:`⩽̸`,NotLessTilde:`≴`,nlsim:`≴`,NotNestedGreaterGreater:`⪢̸`,NotNestedLessLess:`⪡̸`,NotPrecedes:`⊀`,npr:`⊀`,nprec:`⊀`,NotPrecedesEqual:`⪯̸`,npre:`⪯̸`,npreceq:`⪯̸`,NotPrecedesSlantEqual:`⋠`,nprcue:`⋠`,NotReverseElement:`∌`,notni:`∌`,notniva:`∌`,NotRightTriangle:`⋫`,nrtri:`⋫`,ntriangleright:`⋫`,NotRightTriangleBar:`⧐̸`,NotRightTriangleEqual:`⋭`,nrtrie:`⋭`,ntrianglerighteq:`⋭`,NotSquareSubset:`⊏̸`,NotSquareSubsetEqual:`⋢`,nsqsube:`⋢`,NotSquareSuperset:`⊐̸`,NotSquareSupersetEqual:`⋣`,nsqsupe:`⋣`,NotSubset:`⊂⃒`,nsubset:`⊂⃒`,vnsub:`⊂⃒`,NotSubsetEqual:`⊈`,nsube:`⊈`,nsubseteq:`⊈`,NotSucceeds:`⊁`,nsc:`⊁`,nsucc:`⊁`,NotSucceedsEqual:`⪰̸`,nsce:`⪰̸`,nsucceq:`⪰̸`,NotSucceedsSlantEqual:`⋡`,nsccue:`⋡`,NotSucceedsTilde:`≿̸`,NotSuperset:`⊃⃒`,nsupset:`⊃⃒`,vnsup:`⊃⃒`,NotSupersetEqual:`⊉`,nsupe:`⊉`,nsupseteq:`⊉`,NotTilde:`≁`,nsim:`≁`,NotTildeEqual:`≄`,nsime:`≄`,nsimeq:`≄`,NotTildeFullEqual:`≇`,ncong:`≇`,NotTildeTilde:`≉`,nap:`≉`,napprox:`≉`,NotVerticalBar:`∤`,nmid:`∤`,nshortmid:`∤`,nsmid:`∤`,Nscr:`𝒩`,Ntilde:`Ñ`,Nu:`Ν`,OElig:`Œ`,Oacute:`Ó`,Ocirc:`Ô`,Ocy:`О`,Odblac:`Ő`,Ofr:`𝔒`,Ograve:`Ò`,Omacr:`Ō`,Omega:`Ω`,ohm:`Ω`,Omicron:`Ο`,Oopf:`𝕆`,OpenCurlyDoubleQuote:`“`,ldquo:`“`,OpenCurlyQuote:`‘`,lsquo:`‘`,Or:`⩔`,Oscr:`𝒪`,Oslash:`Ø`,Otilde:`Õ`,Otimes:`⨷`,Ouml:`Ö`,OverBar:`‾`,oline:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,tbrk:`⎴`,OverParenthesis:`⏜`,PartialD:`∂`,part:`∂`,Pcy:`П`,Pfr:`𝔓`,Phi:`Φ`,Pi:`Π`,PlusMinus:`±`,plusmn:`±`,pm:`±`,Popf:`ℙ`,primes:`ℙ`,Pr:`⪻`,Precedes:`≺`,pr:`≺`,prec:`≺`,PrecedesEqual:`⪯`,pre:`⪯`,preceq:`⪯`,PrecedesSlantEqual:`≼`,prcue:`≼`,preccurlyeq:`≼`,PrecedesTilde:`≾`,precsim:`≾`,prsim:`≾`,Prime:`″`,Product:`∏`,prod:`∏`,Proportional:`∝`,prop:`∝`,propto:`∝`,varpropto:`∝`,vprop:`∝`,Pscr:`𝒫`,Psi:`Ψ`,QUOT:`"`,quot:`"`,Qfr:`𝔔`,Qopf:`ℚ`,rationals:`ℚ`,Qscr:`𝒬`,RBarr:`⤐`,drbkarow:`⤐`,REG:`®`,circledR:`®`,reg:`®`,Racute:`Ŕ`,Rang:`⟫`,Rarr:`↠`,twoheadrightarrow:`↠`,Rarrtl:`⤖`,Rcaron:`Ř`,Rcedil:`Ŗ`,Rcy:`Р`,Re:`ℜ`,Rfr:`ℜ`,real:`ℜ`,realpart:`ℜ`,ReverseElement:`∋`,SuchThat:`∋`,ni:`∋`,niv:`∋`,ReverseEquilibrium:`⇋`,leftrightharpoons:`⇋`,lrhar:`⇋`,ReverseUpEquilibrium:`⥯`,duhar:`⥯`,Rho:`Ρ`,RightAngleBracket:`⟩`,rang:`⟩`,rangle:`⟩`,RightArrow:`→`,ShortRightArrow:`→`,rarr:`→`,rightarrow:`→`,srarr:`→`,RightArrowBar:`⇥`,rarrb:`⇥`,RightArrowLeftArrow:`⇄`,rightleftarrows:`⇄`,rlarr:`⇄`,RightCeiling:`⌉`,rceil:`⌉`,RightDoubleBracket:`⟧`,robrk:`⟧`,RightDownTeeVector:`⥝`,RightDownVector:`⇂`,dharr:`⇂`,downharpoonright:`⇂`,RightDownVectorBar:`⥕`,RightFloor:`⌋`,rfloor:`⌋`,RightTee:`⊢`,vdash:`⊢`,RightTeeArrow:`↦`,map:`↦`,mapsto:`↦`,RightTeeVector:`⥛`,RightTriangle:`⊳`,vartriangleright:`⊳`,vrtri:`⊳`,RightTriangleBar:`⧐`,RightTriangleEqual:`⊵`,rtrie:`⊵`,trianglerighteq:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVector:`↾`,uharr:`↾`,upharpoonright:`↾`,RightUpVectorBar:`⥔`,RightVector:`⇀`,rharu:`⇀`,rightharpoonup:`⇀`,RightVectorBar:`⥓`,Ropf:`ℝ`,reals:`ℝ`,RoundImplies:`⥰`,Rrightarrow:`⇛`,rAarr:`⇛`,Rscr:`ℛ`,realine:`ℛ`,Rsh:`↱`,rsh:`↱`,RuleDelayed:`⧴`,SHCHcy:`Щ`,SHcy:`Ш`,SOFTcy:`Ь`,Sacute:`Ś`,Sc:`⪼`,Scaron:`Š`,Scedil:`Ş`,Scirc:`Ŝ`,Scy:`С`,Sfr:`𝔖`,ShortUpArrow:`↑`,UpArrow:`↑`,uarr:`↑`,uparrow:`↑`,Sigma:`Σ`,SmallCircle:`∘`,compfn:`∘`,Sopf:`𝕊`,Sqrt:`√`,radic:`√`,Square:`□`,squ:`□`,square:`□`,SquareIntersection:`⊓`,sqcap:`⊓`,SquareSubset:`⊏`,sqsub:`⊏`,sqsubset:`⊏`,SquareSubsetEqual:`⊑`,sqsube:`⊑`,sqsubseteq:`⊑`,SquareSuperset:`⊐`,sqsup:`⊐`,sqsupset:`⊐`,SquareSupersetEqual:`⊒`,sqsupe:`⊒`,sqsupseteq:`⊒`,SquareUnion:`⊔`,sqcup:`⊔`,Sscr:`𝒮`,Star:`⋆`,sstarf:`⋆`,Sub:`⋐`,Subset:`⋐`,SubsetEqual:`⊆`,sube:`⊆`,subseteq:`⊆`,Succeeds:`≻`,sc:`≻`,succ:`≻`,SucceedsEqual:`⪰`,sce:`⪰`,succeq:`⪰`,SucceedsSlantEqual:`≽`,sccue:`≽`,succcurlyeq:`≽`,SucceedsTilde:`≿`,scsim:`≿`,succsim:`≿`,Sum:`∑`,sum:`∑`,Sup:`⋑`,Supset:`⋑`,Superset:`⊃`,sup:`⊃`,supset:`⊃`,SupersetEqual:`⊇`,supe:`⊇`,supseteq:`⊇`,THORN:`Þ`,TRADE:`™`,trade:`™`,TSHcy:`Ћ`,TScy:`Ц`,Tab:` `,Tau:`Τ`,Tcaron:`Ť`,Tcedil:`Ţ`,Tcy:`Т`,Tfr:`𝔗`,Therefore:`∴`,there4:`∴`,therefore:`∴`,Theta:`Θ`,ThickSpace:`  `,ThinSpace:` `,thinsp:` `,Tilde:`∼`,sim:`∼`,thicksim:`∼`,thksim:`∼`,TildeEqual:`≃`,sime:`≃`,simeq:`≃`,TildeFullEqual:`≅`,cong:`≅`,TildeTilde:`≈`,ap:`≈`,approx:`≈`,asymp:`≈`,thickapprox:`≈`,thkap:`≈`,Topf:`𝕋`,TripleDot:`⃛`,tdot:`⃛`,Tscr:`𝒯`,Tstrok:`Ŧ`,Uacute:`Ú`,Uarr:`↟`,Uarrocir:`⥉`,Ubrcy:`Ў`,Ubreve:`Ŭ`,Ucirc:`Û`,Ucy:`У`,Udblac:`Ű`,Ufr:`𝔘`,Ugrave:`Ù`,Umacr:`Ū`,UnderBar:`_`,lowbar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,bbrk:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,bigcup:`⋃`,xcup:`⋃`,UnionPlus:`⊎`,uplus:`⊎`,Uogon:`Ų`,Uopf:`𝕌`,UpArrowBar:`⤒`,UpArrowDownArrow:`⇅`,udarr:`⇅`,UpDownArrow:`↕`,updownarrow:`↕`,varr:`↕`,UpEquilibrium:`⥮`,udhar:`⥮`,UpTee:`⊥`,bot:`⊥`,bottom:`⊥`,perp:`⊥`,UpTeeArrow:`↥`,mapstoup:`↥`,UpperLeftArrow:`↖`,nwarr:`↖`,nwarrow:`↖`,UpperRightArrow:`↗`,nearr:`↗`,nearrow:`↗`,Upsi:`ϒ`,upsih:`ϒ`,Upsilon:`Υ`,Uring:`Ů`,Uscr:`𝒰`,Utilde:`Ũ`,Uuml:`Ü`,VDash:`⊫`,Vbar:`⫫`,Vcy:`В`,Vdash:`⊩`,Vdashl:`⫦`,Vee:`⋁`,bigvee:`⋁`,xvee:`⋁`,Verbar:`‖`,Vert:`‖`,VerticalBar:`∣`,mid:`∣`,shortmid:`∣`,smid:`∣`,VerticalLine:`|`,verbar:`|`,vert:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,wr:`≀`,wreath:`≀`,VeryThinSpace:` `,hairsp:` `,Vfr:`𝔙`,Vopf:`𝕍`,Vscr:`𝒱`,Vvdash:`⊪`,Wcirc:`Ŵ`,Wedge:`⋀`,bigwedge:`⋀`,xwedge:`⋀`,Wfr:`𝔚`,Wopf:`𝕎`,Wscr:`𝒲`,Xfr:`𝔛`,Xi:`Ξ`,Xopf:`𝕏`,Xscr:`𝒳`,YAcy:`Я`,YIcy:`Ї`,YUcy:`Ю`,Yacute:`Ý`,Ycirc:`Ŷ`,Ycy:`Ы`,Yfr:`𝔜`,Yopf:`𝕐`,Yscr:`𝒴`,Yuml:`Ÿ`,ZHcy:`Ж`,Zacute:`Ź`,Zcaron:`Ž`,Zcy:`З`,Zdot:`Ż`,Zeta:`Ζ`,Zfr:`ℨ`,zeetrf:`ℨ`,Zopf:`ℤ`,integers:`ℤ`,Zscr:`𝒵`,aacute:`á`,abreve:`ă`,ac:`∾`,mstpos:`∾`,acE:`∾̳`,acd:`∿`,acirc:`â`,acy:`а`,aelig:`æ`,afr:`𝔞`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,alpha:`α`,amacr:`ā`,amalg:`⨿`,and:`∧`,wedge:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,angle:`∠`,ange:`⦤`,angmsd:`∡`,measuredangle:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angzarr:`⍼`,aogon:`ą`,aopf:`𝕒`,apE:`⩰`,apacir:`⩯`,ape:`≊`,approxeq:`≊`,apid:`≋`,apos:`'`,aring:`å`,ascr:`𝒶`,ast:`*`,midast:`*`,atilde:`ã`,auml:`ä`,awint:`⨑`,bNot:`⫭`,backcong:`≌`,bcong:`≌`,backepsilon:`϶`,bepsi:`϶`,backprime:`‵`,bprime:`‵`,backsim:`∽`,bsim:`∽`,backsimeq:`⋍`,bsime:`⋍`,barvee:`⊽`,barwed:`⌅`,barwedge:`⌅`,bbrktbrk:`⎶`,bcy:`б`,bdquo:`„`,ldquor:`„`,bemptyv:`⦰`,beta:`β`,beth:`ℶ`,between:`≬`,twixt:`≬`,bfr:`𝔟`,bigcirc:`◯`,xcirc:`◯`,bigodot:`⨀`,xodot:`⨀`,bigoplus:`⨁`,xoplus:`⨁`,bigotimes:`⨂`,xotime:`⨂`,bigsqcup:`⨆`,xsqcup:`⨆`,bigstar:`★`,starf:`★`,bigtriangledown:`▽`,xdtri:`▽`,bigtriangleup:`△`,xutri:`△`,biguplus:`⨄`,xuplus:`⨄`,bkarow:`⤍`,rbarr:`⤍`,blacklozenge:`⧫`,lozf:`⧫`,blacktriangle:`▴`,utrif:`▴`,blacktriangledown:`▾`,dtrif:`▾`,blacktriangleleft:`◂`,ltrif:`◂`,blacktriangleright:`▸`,rtrif:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:`=⃥`,bnequiv:`≡⃥`,bnot:`⌐`,bopf:`𝕓`,bowtie:`⋈`,boxDL:`╗`,boxDR:`╔`,boxDl:`╖`,boxDr:`╓`,boxH:`═`,boxHD:`╦`,boxHU:`╩`,boxHd:`╤`,boxHu:`╧`,boxUL:`╝`,boxUR:`╚`,boxUl:`╜`,boxUr:`╙`,boxV:`║`,boxVH:`╬`,boxVL:`╣`,boxVR:`╠`,boxVh:`╫`,boxVl:`╢`,boxVr:`╟`,boxbox:`⧉`,boxdL:`╕`,boxdR:`╒`,boxdl:`┐`,boxdr:`┌`,boxhD:`╥`,boxhU:`╨`,boxhd:`┬`,boxhu:`┴`,boxminus:`⊟`,minusb:`⊟`,boxplus:`⊞`,plusb:`⊞`,boxtimes:`⊠`,timesb:`⊠`,boxuL:`╛`,boxuR:`╘`,boxul:`┘`,boxur:`└`,boxv:`│`,boxvH:`╪`,boxvL:`╡`,boxvR:`╞`,boxvh:`┼`,boxvl:`┤`,boxvr:`├`,brvbar:`¦`,bscr:`𝒷`,bsemi:`⁏`,bsol:`\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bumpE:`⪮`,cacute:`ć`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,caps:`∩︀`,caret:`⁁`,ccaps:`⩍`,ccaron:`č`,ccedil:`ç`,ccirc:`ĉ`,ccups:`⩌`,ccupssm:`⩐`,cdot:`ċ`,cemptyv:`⦲`,cent:`¢`,cfr:`𝔠`,chcy:`ч`,check:`✓`,checkmark:`✓`,chi:`χ`,cir:`○`,cirE:`⧃`,circ:`ˆ`,circeq:`≗`,cire:`≗`,circlearrowleft:`↺`,olarr:`↺`,circlearrowright:`↻`,orarr:`↻`,circledS:`Ⓢ`,oS:`Ⓢ`,circledast:`⊛`,oast:`⊛`,circledcirc:`⊚`,ocir:`⊚`,circleddash:`⊝`,odash:`⊝`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,clubs:`♣`,clubsuit:`♣`,colon:`:`,comma:`,`,commat:`@`,comp:`∁`,complement:`∁`,congdot:`⩭`,copf:`𝕔`,copysr:`℗`,crarr:`↵`,cross:`✗`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,curlyeqprec:`⋞`,cuesc:`⋟`,curlyeqsucc:`⋟`,cularr:`↶`,curvearrowleft:`↶`,cularrp:`⤽`,cup:`∪`,cupbrcap:`⩈`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curvearrowright:`↷`,curarrm:`⤼`,curlyvee:`⋎`,cuvee:`⋎`,curlywedge:`⋏`,cuwed:`⋏`,curren:`¤`,cwint:`∱`,cylcty:`⌭`,dHar:`⥥`,dagger:`†`,daleth:`ℸ`,dash:`‐`,hyphen:`‐`,dbkarow:`⤏`,rBarr:`⤏`,dcaron:`ď`,dcy:`д`,ddarr:`⇊`,downdownarrows:`⇊`,ddotseq:`⩷`,eDDot:`⩷`,deg:`°`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,dfr:`𝔡`,diamondsuit:`♦`,diams:`♦`,digamma:`ϝ`,gammad:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,djcy:`ђ`,dlcorn:`⌞`,llcorner:`⌞`,dlcrop:`⌍`,dollar:`$`,dopf:`𝕕`,doteqdot:`≑`,eDot:`≑`,dotminus:`∸`,minusd:`∸`,dotplus:`∔`,plusdo:`∔`,dotsquare:`⊡`,sdotb:`⊡`,drcorn:`⌟`,lrcorner:`⌟`,drcrop:`⌌`,dscr:`𝒹`,dscy:`ѕ`,dsol:`⧶`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,triangledown:`▿`,dwangle:`⦦`,dzcy:`џ`,dzigrarr:`⟿`,eacute:`é`,easter:`⩮`,ecaron:`ě`,ecir:`≖`,eqcirc:`≖`,ecirc:`ê`,ecolon:`≕`,eqcolon:`≕`,ecy:`э`,edot:`ė`,efDot:`≒`,fallingdotseq:`≒`,efr:`𝔢`,eg:`⪚`,egrave:`è`,egs:`⪖`,eqslantgtr:`⪖`,egsdot:`⪘`,el:`⪙`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,eqslantless:`⪕`,elsdot:`⪗`,emacr:`ē`,empty:`∅`,emptyset:`∅`,emptyv:`∅`,varnothing:`∅`,emsp13:` `,emsp14:` `,emsp:` `,eng:`ŋ`,ensp:` `,eogon:`ę`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,epsilon:`ε`,epsiv:`ϵ`,straightepsilon:`ϵ`,varepsilon:`ϵ`,equals:`=`,equest:`≟`,questeq:`≟`,equivDD:`⩸`,eqvparsl:`⧥`,erDot:`≓`,risingdotseq:`≓`,erarr:`⥱`,escr:`ℯ`,eta:`η`,eth:`ð`,euml:`ë`,euro:`€`,excl:`!`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,ffr:`𝔣`,filig:`fi`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,fopf:`𝕗`,fork:`⋔`,pitchfork:`⋔`,forkv:`⫙`,fpartint:`⨍`,frac12:`½`,half:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,sfrown:`⌢`,fscr:`𝒻`,gEl:`⪌`,gtreqqless:`⪌`,gacute:`ǵ`,gamma:`γ`,gap:`⪆`,gtrapprox:`⪆`,gbreve:`ğ`,gcirc:`ĝ`,gcy:`г`,gdot:`ġ`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,gfr:`𝔤`,gimel:`ℷ`,gjcy:`ѓ`,glE:`⪒`,gla:`⪥`,glj:`⪤`,gnE:`≩`,gneqq:`≩`,gnap:`⪊`,gnapprox:`⪊`,gne:`⪈`,gneq:`⪈`,gnsim:`⋧`,gopf:`𝕘`,gscr:`ℊ`,gsime:`⪎`,gsiml:`⪐`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtrdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrarr:`⥸`,gvertneqq:`≩︀`,gvnE:`≩︀`,hardcy:`ъ`,harrcir:`⥈`,harrw:`↭`,leftrightsquigarrow:`↭`,hbar:`ℏ`,hslash:`ℏ`,planck:`ℏ`,plankv:`ℏ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,mldr:`…`,hercon:`⊹`,hfr:`𝔥`,hksearow:`⤥`,searhk:`⤥`,hkswarow:`⤦`,swarhk:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,larrhk:`↩`,hookrightarrow:`↪`,rarrhk:`↪`,hopf:`𝕙`,horbar:`―`,hscr:`𝒽`,hstrok:`ħ`,hybull:`⁃`,iacute:`í`,icirc:`î`,icy:`и`,iecy:`е`,iexcl:`¡`,ifr:`𝔦`,igrave:`ì`,iiiint:`⨌`,qint:`⨌`,iiint:`∭`,tint:`∭`,iinfin:`⧜`,iiota:`℩`,ijlig:`ij`,imacr:`ī`,imath:`ı`,inodot:`ı`,imof:`⊷`,imped:`Ƶ`,incare:`℅`,infin:`∞`,infintie:`⧝`,intcal:`⊺`,intercal:`⊺`,intlarhk:`⨗`,intprod:`⨼`,iprod:`⨼`,iocy:`ё`,iogon:`į`,iopf:`𝕚`,iota:`ι`,iquest:`¿`,iscr:`𝒾`,isinE:`⋹`,isindot:`⋵`,isins:`⋴`,isinsv:`⋳`,itilde:`ĩ`,iukcy:`і`,iuml:`ï`,jcirc:`ĵ`,jcy:`й`,jfr:`𝔧`,jmath:`ȷ`,jopf:`𝕛`,jscr:`𝒿`,jsercy:`ј`,jukcy:`є`,kappa:`κ`,kappav:`ϰ`,varkappa:`ϰ`,kcedil:`ķ`,kcy:`к`,kfr:`𝔨`,kgreen:`ĸ`,khcy:`х`,kjcy:`ќ`,kopf:`𝕜`,kscr:`𝓀`,lAtail:`⤛`,lBarr:`⤎`,lEg:`⪋`,lesseqqgtr:`⪋`,lHar:`⥢`,lacute:`ĺ`,laemptyv:`⦴`,lambda:`λ`,langd:`⦑`,lap:`⪅`,lessapprox:`⪅`,laquo:`«`,larrbfs:`⤟`,larrfs:`⤝`,larrlp:`↫`,looparrowleft:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,leftarrowtail:`↢`,lat:`⪫`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lcub:`{`,lbrack:`[`,lsqb:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,lcaron:`ľ`,lcedil:`ļ`,lcy:`л`,ldca:`⤶`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,le:`≤`,leq:`≤`,leftleftarrows:`⇇`,llarr:`⇇`,leftthreetimes:`⋋`,lthree:`⋋`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessdot:`⋖`,ltdot:`⋖`,lfisht:`⥼`,lfr:`𝔩`,lgE:`⪑`,lharul:`⥪`,lhblk:`▄`,ljcy:`љ`,llhard:`⥫`,lltri:`◺`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnE:`≨`,lneqq:`≨`,lnap:`⪉`,lnapprox:`⪉`,lne:`⪇`,lneq:`⪇`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,longmapsto:`⟼`,xmap:`⟼`,looparrowright:`↬`,rarrlp:`↬`,lopar:`⦅`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,loz:`◊`,lozenge:`◊`,lpar:`(`,lparlt:`⦓`,lrhard:`⥭`,lrm:`‎`,lrtri:`⊿`,lsaquo:`‹`,lscr:`𝓁`,lsime:`⪍`,lsimg:`⪏`,lsquor:`‚`,sbquo:`‚`,lstrok:`ł`,ltcc:`⪦`,ltcir:`⩹`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltrPar:`⦖`,ltri:`◃`,triangleleft:`◃`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,mDDot:`∺`,macr:`¯`,strns:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,marker:`▮`,mcomma:`⨩`,mcy:`м`,mdash:`—`,mfr:`𝔪`,mho:`℧`,micro:`µ`,midcir:`⫰`,minus:`−`,minusdu:`⨪`,mlcp:`⫛`,models:`⊧`,mopf:`𝕞`,mscr:`𝓂`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nGg:`⋙̸`,nGt:`≫⃒`,nLeftarrow:`⇍`,nlArr:`⇍`,nLeftrightarrow:`⇎`,nhArr:`⇎`,nLl:`⋘̸`,nLt:`≪⃒`,nRightarrow:`⇏`,nrArr:`⇏`,nVDash:`⊯`,nVdash:`⊮`,nacute:`ń`,nang:`∠⃒`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,natur:`♮`,natural:`♮`,ncap:`⩃`,ncaron:`ň`,ncedil:`ņ`,ncongdot:`⩭̸`,ncup:`⩂`,ncy:`н`,ndash:`–`,neArr:`⇗`,nearhk:`⤤`,nedot:`≐̸`,nesear:`⤨`,toea:`⤨`,nfr:`𝔫`,nharr:`↮`,nleftrightarrow:`↮`,nhpar:`⫲`,nis:`⋼`,nisd:`⋺`,njcy:`њ`,nlE:`≦̸`,nleqq:`≦̸`,nlarr:`↚`,nleftarrow:`↚`,nldr:`‥`,nopf:`𝕟`,not:`¬`,notinE:`⋹̸`,notindot:`⋵̸`,notinvb:`⋷`,notinvc:`⋶`,notnivb:`⋾`,notnivc:`⋽`,nparsl:`⫽⃥`,npart:`∂̸`,npolint:`⨔`,nrarr:`↛`,nrightarrow:`↛`,nrarrc:`⤳̸`,nrarrw:`↝̸`,nscr:`𝓃`,nsub:`⊄`,nsubE:`⫅̸`,nsubseteqq:`⫅̸`,nsup:`⊅`,nsupE:`⫆̸`,nsupseteqq:`⫆̸`,ntilde:`ñ`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvDash:`⊭`,nvHarr:`⤄`,nvap:`≍⃒`,nvdash:`⊬`,nvge:`≥⃒`,nvgt:`>⃒`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:`≤⃒`,nvlt:`<⃒`,nvltrie:`⊴⃒`,nvrArr:`⤃`,nvrtrie:`⊵⃒`,nvsim:`∼⃒`,nwArr:`⇖`,nwarhk:`⤣`,nwnear:`⤧`,oacute:`ó`,ocirc:`ô`,ocy:`о`,odblac:`ő`,odiv:`⨸`,odsold:`⦼`,oelig:`œ`,ofcir:`⦿`,ofr:`𝔬`,ogon:`˛`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,olcir:`⦾`,olcross:`⦻`,olt:`⧀`,omacr:`ō`,omega:`ω`,omicron:`ο`,omid:`⦶`,oopf:`𝕠`,opar:`⦷`,operp:`⦹`,or:`∨`,vee:`∨`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,oscr:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oslash:`ø`,osol:`⊘`,otilde:`õ`,otimesas:`⨶`,ouml:`ö`,ovbar:`⌽`,para:`¶`,parsim:`⫳`,parsl:`⫽`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,pertenk:`‱`,pfr:`𝔭`,phi:`φ`,phiv:`ϕ`,straightphi:`ϕ`,varphi:`ϕ`,phone:`☎`,pi:`π`,piv:`ϖ`,varpi:`ϖ`,planckh:`ℎ`,plus:`+`,plusacir:`⨣`,pluscir:`⨢`,plusdu:`⨥`,pluse:`⩲`,plussim:`⨦`,plustwo:`⨧`,pointint:`⨕`,popf:`𝕡`,pound:`£`,prE:`⪳`,prap:`⪷`,precapprox:`⪷`,precnapprox:`⪹`,prnap:`⪹`,precneqq:`⪵`,prnE:`⪵`,precnsim:`⋨`,prnsim:`⋨`,prime:`′`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prurel:`⊰`,pscr:`𝓅`,psi:`ψ`,puncsp:` `,qfr:`𝔮`,qopf:`𝕢`,qprime:`⁗`,qscr:`𝓆`,quatint:`⨖`,quest:`?`,rAtail:`⤜`,rHar:`⥤`,race:`∽̱`,racute:`ŕ`,raemptyv:`⦳`,rangd:`⦒`,range:`⦥`,raquo:`»`,rarrap:`⥵`,rarrbfs:`⤠`,rarrc:`⤳`,rarrfs:`⤞`,rarrpl:`⥅`,rarrsim:`⥴`,rarrtl:`↣`,rightarrowtail:`↣`,rarrw:`↝`,rightsquigarrow:`↝`,ratail:`⤚`,ratio:`∶`,rbbrk:`❳`,rbrace:`}`,rcub:`}`,rbrack:`]`,rsqb:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,rcaron:`ř`,rcedil:`ŗ`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdsh:`↳`,rect:`▭`,rfisht:`⥽`,rfr:`𝔯`,rharul:`⥬`,rho:`ρ`,rhov:`ϱ`,varrho:`ϱ`,rightrightarrows:`⇉`,rrarr:`⇉`,rightthreetimes:`⋌`,rthree:`⋌`,ring:`˚`,rlm:`‏`,rmoust:`⎱`,rmoustache:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,ropar:`⦆`,ropf:`𝕣`,roplus:`⨮`,rotimes:`⨵`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rsaquo:`›`,rscr:`𝓇`,rtimes:`⋊`,rtri:`▹`,triangleright:`▹`,rtriltri:`⧎`,ruluhar:`⥨`,rx:`℞`,sacute:`ś`,scE:`⪴`,scap:`⪸`,succapprox:`⪸`,scaron:`š`,scedil:`ş`,scirc:`ŝ`,scnE:`⪶`,succneqq:`⪶`,scnap:`⪺`,succnapprox:`⪺`,scnsim:`⋩`,succnsim:`⋩`,scpolint:`⨓`,scy:`с`,sdot:`⋅`,sdote:`⩦`,seArr:`⇘`,sect:`§`,semi:`;`,seswar:`⤩`,tosa:`⤩`,sext:`✶`,sfr:`𝔰`,sharp:`♯`,shchcy:`щ`,shcy:`ш`,shy:`­`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,varsigma:`ς`,simdot:`⩪`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,smashp:`⨳`,smeparsl:`⧤`,smile:`⌣`,ssmile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:`⪬︀`,softcy:`ь`,sol:`/`,solb:`⧄`,solbar:`⌿`,sopf:`𝕤`,spades:`♠`,spadesuit:`♠`,sqcaps:`⊓︀`,sqcups:`⊔︀`,sscr:`𝓈`,star:`☆`,sub:`⊂`,subset:`⊂`,subE:`⫅`,subseteqq:`⫅`,subdot:`⪽`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subsetneqq:`⫋`,subne:`⊊`,subsetneq:`⊊`,subplus:`⪿`,subrarr:`⥹`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,sung:`♪`,sup1:`¹`,sup2:`²`,sup3:`³`,supE:`⫆`,supseteqq:`⫆`,supdot:`⪾`,supdsub:`⫘`,supedot:`⫄`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supsetneqq:`⫌`,supne:`⊋`,supsetneq:`⊋`,supplus:`⫀`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swArr:`⇙`,swnwar:`⤪`,szlig:`ß`,target:`⌖`,tau:`τ`,tcaron:`ť`,tcedil:`ţ`,tcy:`т`,telrec:`⌕`,tfr:`𝔱`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,vartheta:`ϑ`,thorn:`þ`,times:`×`,timesbar:`⨱`,timesd:`⨰`,topbot:`⌶`,topcir:`⫱`,topf:`𝕥`,topfork:`⫚`,tprime:`‴`,triangle:`▵`,utri:`▵`,triangleq:`≜`,trie:`≜`,tridot:`◬`,triminus:`⨺`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,tscr:`𝓉`,tscy:`ц`,tshcy:`ћ`,tstrok:`ŧ`,uHar:`⥣`,uacute:`ú`,ubrcy:`ў`,ubreve:`ŭ`,ucirc:`û`,ucy:`у`,udblac:`ű`,ufisht:`⥾`,ufr:`𝔲`,ugrave:`ù`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,umacr:`ū`,uogon:`ų`,uopf:`𝕦`,upsi:`υ`,upsilon:`υ`,upuparrows:`⇈`,uuarr:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,uring:`ů`,urtri:`◹`,uscr:`𝓊`,utdot:`⋰`,utilde:`ũ`,uuml:`ü`,uwangle:`⦧`,vBar:`⫨`,vBarv:`⫩`,vangrt:`⦜`,varsubsetneq:`⊊︀`,vsubne:`⊊︀`,varsubsetneqq:`⫋︀`,vsubnE:`⫋︀`,varsupsetneq:`⊋︀`,vsupne:`⊋︀`,varsupsetneqq:`⫌︀`,vsupnE:`⫌︀`,vcy:`в`,veebar:`⊻`,veeeq:`≚`,vellip:`⋮`,vfr:`𝔳`,vopf:`𝕧`,vscr:`𝓋`,vzigzag:`⦚`,wcirc:`ŵ`,wedbar:`⩟`,wedgeq:`≙`,weierp:`℘`,wp:`℘`,wfr:`𝔴`,wopf:`𝕨`,wscr:`𝓌`,xfr:`𝔵`,xi:`ξ`,xnis:`⋻`,xopf:`𝕩`,xscr:`𝓍`,yacute:`ý`,yacy:`я`,ycirc:`ŷ`,ycy:`ы`,yen:`¥`,yfr:`𝔶`,yicy:`ї`,yopf:`𝕪`,yscr:`𝓎`,yucy:`ю`,yuml:`ÿ`,zacute:`ź`,zcaron:`ž`,zcy:`з`,zdot:`ż`,zeta:`ζ`,zfr:`𝔷`,zhcy:`ж`,zigrarr:`⇝`,zopf:`𝕫`,zscr:`𝓏`,zwj:`‍`,zwnj:`‌`};Wj.ngsp=``;var Gj=[/@/,/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function Kj(e,t){if(t!=null&&!(Array.isArray(t)&&t.length==2))throw Error(`Expected '${e}' to be an array, [start, end].`);if(t!=null){let e=t[0],n=t[1];Gj.forEach(t=>{if(t.test(e)||t.test(n))throw Error(`['${e}', '${n}'] contains unusable interpolation symbol.`)})}}var qj=new class e{static fromArray(t){return t?(Kj(`interpolation`,t),new e(t[0],t[1])):qj}constructor(e,t){this.start=e,this.end=t}}(`{{`,`}}`),Jj=class extends NA{constructor(e,t,n){super(n,e),this.tokenType=t}},Yj=class{constructor(e,t,n){this.tokens=e,this.errors=t,this.nonNormalizedIcuExpressions=n}};function Xj(e,t,n,r={}){let i=new rM(new jA(e,t),n,r);return i.tokenize(),new Yj(mM(i.tokens),i.errors,i.nonNormalizedIcuExpressions)}var Zj=/\r\n?/g;function Qj(e){return`Unexpected character "${e===0?`EOF`:String.fromCharCode(e)}"`}function $j(e){return`Unknown entity "${e}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`}function eM(e,t){return`Unable to parse entity "${t}" - ${e} character reference entities must end with ";"`}var tM;(function(e){e.HEX=`hexadecimal`,e.DEC=`decimal`})(tM||={});var nM=class{constructor(e){this.error=e}},rM=class{constructor(e,t,n){this._getTagContentType=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||qj,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(e=>e.codePointAt(0)||0),this._canSelfClose=n.canSelfClose||!1,this._allowHtmComponentClosingTags=n.allowHtmComponentClosingTags||!1;let r=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new gM(e,r):new hM(e,r),this._preserveLineEndings=n.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=n.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=n.tokenizeBlocks??!0,this._tokenizeLet=n.tokenizeLet??!0;try{this._cursor.init()}catch(e){this.handleError(e)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(Zj,`
42
+ `)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr(`[CDATA[`)?this._consumeCdata(e):this._attemptStr(`--`)?this._consumeComment(e):this._attemptStrCaseInsensitive(`doctype`)?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let t=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._attemptStr(`@let`)?this._consumeLetDeclaration(e):this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(e){this.handleError(e)}}this._beginToken(34),this._endToken([])}_getBlockName(){let e=!1,t=this._cursor.clone();return this._attemptCharCodeUntilFn(t=>xA(t)?!e:fM(t)?(e=!0,!1):!0),this._cursor.getChars(t).trim()}_consumeBlockStart(e){this._beginToken(25,e);let t=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(iM),this._attemptCharCode(41))this._attemptCharCodeUntilFn(iM);else{t.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):t.type=29}_consumeBlockEnd(e){this._beginToken(27,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(pM);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let e=this._cursor.clone(),t=null,n=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||t!==null;){let e=this._cursor.peek();if(e===92)this._cursor.advance();else if(e===t)t=null;else if(t===null&&DA(e))t=e;else if(e===40&&t===null)n++;else if(e===41&&t===null){if(n===0)break;n>0&&n--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(pM)}}_consumeLetDeclaration(e){if(this._beginToken(30,e),xA(this._cursor.peek()))this._attemptCharCodeUntilFn(iM);else{let t=this._endToken([this._cursor.getChars(e)]);t.type=33;return}let t=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(iM),!this._attemptCharCode(61)){t.type=33;return}this._attemptCharCodeUntilFn(e=>iM(e)&&!TA(e)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(32),this._endToken([]),this._cursor.advance()):(t.type=33,t.sourceSpan=this._cursor.getSpan(e))}_getLetDeclarationName(){let e=this._cursor.clone(),t=!1;return this._attemptCharCodeUntilFn(e=>CA(e)||e===36||e===95||t&&SA(e)?(t=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeLetDeclarationValue(){let e=this._cursor.clone();for(this._beginToken(31,e);this._cursor.peek()!==0;){let e=this._cursor.peek();if(e===59)break;DA(e)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(t=>t===92?(this._cursor.advance(),!1):t===e)),this._cursor.advance()}this._endToken([this._cursor.getChars(e)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(lM(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t){if(this._currentTokenStart===null)throw new Jj(`Programming error - attempted to end a token when there was no start to the token`,this._currentTokenType,this._cursor.getSpan(t));if(this._currentTokenType===null)throw new Jj(`Programming error - attempted to end a token which has no token type`,null,this._cursor.getSpan(this._currentTokenStart));let n={type:this._currentTokenType,parts:e,sourceSpan:(t??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,t){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let n=new Jj(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new nM(n)}handleError(e){if(e instanceof _M&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof nM)this.errors.push(e.error);else throw e}_attemptCharCode(e){return this._cursor.peek()===e?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(e){return uM(this._cursor.peek(),e)?(this._cursor.advance(),!0):!1}_requireCharCode(e){let t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(Qj(this._cursor.peek()),this._cursor.getSpan(t))}_attemptStr(e){let t=e.length;if(this._cursor.charsLeft()<t)return!1;let n=this._cursor.clone();for(let r=0;r<t;r++)if(!this._attemptCharCode(e.charCodeAt(r)))return this._cursor=n,!1;return!0}_attemptStrCaseInsensitive(e){for(let t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t)))return!1;return!0}_requireStr(e){let t=this._cursor.clone();if(!this._attemptStr(e))throw this._createError(Qj(this._cursor.peek()),this._cursor.getSpan(t))}_requireStrCaseInsensitive(e){let t=this._cursor.clone();if(!this._attemptStrCaseInsensitive(e))throw this._createError(Qj(this._cursor.peek()),this._cursor.getSpan(t))}_attemptCharCodeUntilFn(e){for(;!e(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(e,t){let n=this._cursor.clone();if(this._attemptCharCodeUntilFn(e),this._cursor.diff(n)<t)throw this._createError(Qj(this._cursor.peek()),this._cursor.getSpan(n))}_attemptUntilChar(e){for(;this._cursor.peek()!==e;)this._cursor.advance()}_readChar(){let e=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),e}_consumeEntity(e){this._beginToken(9);let t=this._cursor.clone();if(this._cursor.advance(),this._attemptCharCode(35)){let e=this._attemptCharCode(120)||this._attemptCharCode(88),n=this._cursor.clone();if(this._attemptCharCodeUntilFn(sM),this._cursor.peek()!=59){this._cursor.advance();let n=e?tM.HEX:tM.DEC;throw this._createError(eM(n,this._cursor.getChars(t)),this._cursor.getSpan())}let r=this._cursor.getChars(n);this._cursor.advance();try{let n=parseInt(r,e?16:10);this._endToken([String.fromCharCode(n),this._cursor.getChars(t)])}catch{throw this._createError($j(this._cursor.getChars(t)),this._cursor.getSpan())}}else{let n=this._cursor.clone();if(this._attemptCharCodeUntilFn(cM),this._cursor.peek()!=59)this._beginToken(e,t),this._cursor=n,this._endToken([`&`]);else{let e=this._cursor.getChars(n);this._cursor.advance();let r=Wj[e];if(!r)throw this._createError($j(e),this._cursor.getSpan(t));this._endToken([r,`&${e};`])}}}_consumeRawText(e,t){this._beginToken(e?6:7);let n=[];for(;;){let r=this._cursor.clone(),i=t();if(this._cursor=r,i)break;e&&this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(n.join(``))]),n.length=0,this._consumeEntity(6),this._beginToken(6)):n.push(this._readChar())}this._endToken([this._processCarriageReturns(n.join(``))])}_consumeComment(e){this._beginToken(10,e),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr(`-->`)),this._beginToken(11),this._requireStr(`-->`),this._endToken([])}_consumeBogusComment(e){this._beginToken(10,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(11),this._cursor.advance(),this._endToken([])}_consumeCdata(e){this._beginToken(12,e),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr(`]]>`)),this._beginToken(13),this._requireStr(`]]>`),this._endToken([])}_consumeDocType(e){this._beginToken(18,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(19),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){let e=this._cursor.clone(),t=``;for(;this._cursor.peek()!==58&&!oM(this._cursor.peek());)this._cursor.advance();let n;this._cursor.peek()===58?(t=this._cursor.getChars(e),this._cursor.advance(),n=this._cursor.clone()):n=e,this._requireCharCodeUntilFn(aM,t===``?0:1);let r=this._cursor.getChars(n);return[t,r]}_consumeTagOpen(e){let t,n,r,i=[];try{if(!CA(this._cursor.peek()))throw this._createError(Qj(this._cursor.peek()),this._cursor.getSpan(e));for(r=this._consumeTagOpenStart(e),n=r.parts[0],t=r.parts[1],this._attemptCharCodeUntilFn(iM);this._cursor.peek()!==47&&this._cursor.peek()!==62&&this._cursor.peek()!==60&&this._cursor.peek()!==0;){let[e,t]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(iM),this._attemptCharCode(61)){this._attemptCharCodeUntilFn(iM);let n=this._consumeAttributeValue();i.push({prefix:e,name:t,value:n})}else i.push({prefix:e,name:t});this._attemptCharCodeUntilFn(iM)}this._consumeTagOpenEnd()}catch(t){if(t instanceof nM){r?r.type=4:(this._beginToken(5,e),this._endToken([`<`]));return}throw t}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===2)return;let a=this._getTagContentType(t,n,this._fullNameStack.length>0,i);this._handleFullNameStackForTagOpen(n,t),a===cj.RAW_TEXT?this._consumeRawTextWithTagClose(n,t,!1):a===cj.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,t,!0)}_consumeRawTextWithTagClose(e,t,n){this._consumeRawText(n,()=>!this._attemptCharCode(60)||!this._attemptCharCode(47)||(this._attemptCharCodeUntilFn(iM),!this._attemptStrCaseInsensitive(e?`${e}:${t}`:t))?!1:(this._attemptCharCodeUntilFn(iM),this._attemptCharCode(62))),this._beginToken(3),this._requireCharCodeUntilFn(e=>e===62,3),this._cursor.advance(),this._endToken([e,t]),this._handleFullNameStackForTagClose(e,t)}_consumeTagOpenStart(e){this._beginToken(0,e);let t=this._consumePrefixAndName();return this._endToken(t)}_consumeAttributeName(){let e=this._cursor.peek();if(e===39||e===34)throw this._createError(Qj(e),this._cursor.getSpan());this._beginToken(14);let t=this._consumePrefixAndName();return this._endToken(t),t}_consumeAttributeValue(){let e;if(this._cursor.peek()===39||this._cursor.peek()===34){let t=this._cursor.peek();this._consumeQuote(t);let n=()=>this._cursor.peek()===t;e=this._consumeWithInterpolation(16,17,n,n),this._consumeQuote(t)}else{let t=()=>aM(this._cursor.peek());e=this._consumeWithInterpolation(16,17,t,t)}return e}_consumeQuote(e){this._beginToken(15),this._requireCharCode(e),this._endToken([String.fromCodePoint(e)])}_consumeTagOpenEnd(){let e=this._attemptCharCode(47)?2:1;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){if(this._beginToken(3,e),this._attemptCharCodeUntilFn(iM),this._allowHtmComponentClosingTags&&this._attemptCharCode(47))this._attemptCharCodeUntilFn(iM),this._requireCharCode(62),this._endToken([]);else{let[e,t]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(iM),this._requireCharCode(62),this._endToken([e,t]),this._handleFullNameStackForTagClose(e,t)}}_consumeExpansionFormStart(){this._beginToken(20),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(20),this._beginToken(7);let e=this._readUntil(44),t=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([t]);else{let n=this._endToken([e]);t!==e&&this.nonNormalizedIcuExpressions.push(n)}this._requireCharCode(44),this._attemptCharCodeUntilFn(iM),this._beginToken(7);let n=this._readUntil(44);this._endToken([n]),this._requireCharCode(44),this._attemptCharCodeUntilFn(iM)}_consumeExpansionCaseStart(){this._beginToken(21);let e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(iM),this._beginToken(22),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(iM),this._expansionCaseStack.push(22)}_consumeExpansionCaseEnd(){this._beginToken(23),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(iM),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(24),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(e,t,n,r){this._beginToken(e);let i=[];for(;!n();){let n=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(i.join(``))],n),i.length=0,this._consumeInterpolation(t,n,r),this._beginToken(e)):this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(i.join(``))]),i.length=0,this._consumeEntity(e),this._beginToken(e)):i.push(this._readChar())}this._inInterpolation=!1;let a=this._processCarriageReturns(i.join(``));return this._endToken([a]),a}_consumeInterpolation(e,t,n){let r=[];this._beginToken(e,t),r.push(this._interpolationConfig.start);let i=this._cursor.clone(),a=null,o=!1;for(;this._cursor.peek()!==0&&(n===null||!n());){let e=this._cursor.clone();if(this._isTagStart()){this._cursor=e,r.push(this._getProcessedChars(i,e)),this._endToken(r);return}if(a===null)if(this._attemptStr(this._interpolationConfig.end)){r.push(this._getProcessedChars(i,e)),r.push(this._interpolationConfig.end),this._endToken(r);return}else this._attemptStr(`//`)&&(o=!0);let t=this._cursor.peek();this._cursor.advance(),t===92?this._cursor.advance():t===a?a=null:!o&&a===null&&DA(t)&&(a=t)}r.push(this._getProcessedChars(i,this._cursor)),this._endToken(r)}_getProcessedChars(e,t){return this._processCarriageReturns(t.getChars(e))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===0||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===125&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._cursor.peek()===64||this._cursor.peek()===125))}_isTagStart(){if(this._cursor.peek()===60){let e=this._cursor.clone();e.advance();let t=e.peek();if(97<=t&&t<=122||65<=t&&t<=90||t===47||t===33)return!0}return!1}_isBlockStart(){if(this._tokenizeBlocks&&this._cursor.peek()===64){let e=this._cursor.clone();if(e.advance(),fM(e.peek()))return!0}return!1}_readUntil(e){let t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===22}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===20}isExpansionFormStart(){if(this._cursor.peek()!==123)return!1;if(this._interpolationConfig){let e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}_handleFullNameStackForTagOpen(e,t){let n=pj(e,t);(this._fullNameStack.length===0||this._fullNameStack[this._fullNameStack.length-1]===n)&&this._fullNameStack.push(n)}_handleFullNameStackForTagClose(e,t){let n=pj(e,t);this._fullNameStack.length!==0&&this._fullNameStack[this._fullNameStack.length-1]===n&&this._fullNameStack.pop()}};function iM(e){return!xA(e)||e===0}function aM(e){return xA(e)||e===62||e===60||e===47||e===39||e===34||e===61||e===0}function oM(e){return(e<97||122<e)&&(e<65||90<e)&&(e<48||e>57)}function sM(e){return e===59||e===0||!wA(e)}function cM(e){return e===59||e===0||!CA(e)}function lM(e){return e!==125}function uM(e,t){return dM(e)===dM(t)}function dM(e){return e>=97&&e<=122?e-97+65:e}function fM(e){return CA(e)||SA(e)||e===95}function pM(e){return e!==59&&iM(e)}function mM(e){let t=[],n;for(let r=0;r<e.length;r++){let i=e[r];n&&n.type===5&&i.type===5||n&&n.type===16&&i.type===16?(n.parts[0]+=i.parts[0],n.sourceSpan.end=i.sourceSpan.end):(n=i,t.push(n))}return t}var hM=class e{constructor(t,n){if(t instanceof e){this.file=t.file,this.input=t.input,this.end=t.end;let e=t.state;this.state={peek:e.peek,offset:e.offset,line:e.line,column:e.column}}else{if(!n)throw Error(`Programming error: the range argument must be provided with a file argument.`);this.file=t,this.input=t.content,this.end=n.endPos,this.state={peek:-1,offset:n.startPos,line:n.startLine,column:n.startCol}}}clone(){return new e(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(e){return this.state.offset-e.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(e,t){e||=this;let n=e;if(t)for(;this.diff(e)>0&&t.indexOf(e.peek())!==-1;)n===e&&(e=e.clone()),e.advance();let r=this.locationFromCursor(e);return new G(r,this.locationFromCursor(this),n===e?r:this.locationFromCursor(n))}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new _M(`Unexpected character "EOF"`,this);let t=this.charAt(e.offset);t===10?(e.line++,e.column=0):TA(t)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?0:this.charAt(e.offset)}locationFromCursor(e){return new AA(e.file,e.state.offset,e.state.line,e.state.column)}},gM=class e extends hM{constructor(t,n){t instanceof e?(super(t),this.internalState={...t.internalState}):(super(t,n),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new e(this)}getChars(e){let t=e.clone(),n=``;for(;t.internalState.offset<this.internalState.offset;)n+=String.fromCodePoint(t.peek()),t.advance();return n}processEscapeSequence(){let e=()=>this.internalState.peek;if(e()===92)if(this.internalState={...this.state},this.advanceState(this.internalState),e()===110)this.state.peek=10;else if(e()===114)this.state.peek=13;else if(e()===118)this.state.peek=11;else if(e()===116)this.state.peek=9;else if(e()===98)this.state.peek=8;else if(e()===102)this.state.peek=12;else if(e()===117)if(this.advanceState(this.internalState),e()===123){this.advanceState(this.internalState);let t=this.clone(),n=0;for(;e()!==125;)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(t,n)}else{let e=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,4)}else if(e()===120){this.advanceState(this.internalState);let e=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(e,2)}else if(EA(e())){let t=``,n=0,r=this.clone();for(;EA(e())&&n<3;)r=this.clone(),t+=String.fromCodePoint(e()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(t,8),this.internalState=r.internalState}else TA(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,t){let n=this.input.slice(e.internalState.offset,e.internalState.offset+t),r=parseInt(n,16);if(isNaN(r))throw e.state=e.internalState,new _M(`Invalid hexadecimal escape sequence`,e);return r}},_M=class{constructor(e,t){this.msg=e,this.cursor=t}},vM=class e extends NA{static create(t,n,r){return new e(t,n,r)}constructor(e,t,n){super(t,n),this.elementName=e}},yM=class{constructor(e,t){this.rootNodes=e,this.errors=t}},bM=class{constructor(e){this.getTagDefinition=e}parse(e,t,n,r=!1,i){let a=e=>(t,...n)=>e(t.toLowerCase(),...n),o=r?this.getTagDefinition:a(this.getTagDefinition),s=e=>o(e).getContentType(),c=r?i:a(i),l=Xj(e,t,i?(e,t,n,r)=>{let i=c(e,t,n,r);return i===void 0?s(e):i}:s,n),u=n&&n.canSelfClose||!1,d=n&&n.allowHtmComponentClosingTags||!1,f=new xM(l.tokens,o,u,d,r);return f.build(),new yM(f.rootNodes,l.errors.concat(f.errors))}},xM=class e{constructor(e,t,n,r,i){this.tokens=e,this.getTagDefinition=t,this.canSelfClose=n,this.allowHtmComponentClosingTags=r,this.isTagNameCaseSensitive=i,this._index=-1,this._containerStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==34;)this._peek.type===0||this._peek.type===4?this._consumeStartTag(this._advance()):this._peek.type===3?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===20?this._consumeExpansion(this._advance()):this._peek.type===25?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===27?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===30?(this._closeVoidElement(),this._consumeLet(this._advance())):this._peek.type===18?this._consumeDocType(this._advance()):this._peek.type===33?(this._closeVoidElement(),this._consumeIncompleteLet(this._advance())):this._advance();for(let e of this._containerStack)e instanceof zj&&this.errors.push(vM.create(e.name,e.sourceSpan,`Unclosed block "${e.name}"`))}_advance(){let e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e}_advanceIf(e){return this._peek.type===e?this._advance():null}_consumeCdata(e){let t=this._advance(),n=this._getText(t),r=this._advanceIf(13);this._addToParent(new Mj(n,new G(e.sourceSpan.start,(r||t).sourceSpan.end),[t]))}_consumeComment(e){let t=this._advanceIf(7),n=this._advanceIf(11),r=t==null?null:t.parts[0].trim(),i=n==null?e.sourceSpan:new G(e.sourceSpan.start,n.sourceSpan.end,e.sourceSpan.fullStart);this._addToParent(new Lj(r,i))}_consumeDocType(e){let t=this._advanceIf(7),n=this._advanceIf(19),r=t==null?null:t.parts[0].trim(),i=new G(e.sourceSpan.start,(n||t||e).sourceSpan.end);this._addToParent(new Rj(r,i))}_consumeExpansion(e){let t=this._advance(),n=this._advance(),r=[];for(;this._peek.type===21;){let e=this._parseExpansionCase();if(!e)return;r.push(e)}if(this._peek.type!==24){this.errors.push(vM.create(null,this._peek.sourceSpan,`Invalid ICU message. Missing '}'.`));return}let i=new G(e.sourceSpan.start,this._peek.sourceSpan.end,e.sourceSpan.fullStart);this._addToParent(new Nj(t.parts[0],n.parts[0],r,i,t.sourceSpan)),this._advance()}_parseExpansionCase(){let t=this._advance();if(this._peek.type!==22)return this.errors.push(vM.create(null,this._peek.sourceSpan,`Invalid ICU message. Missing '{'.`)),null;let n=this._advance(),r=this._collectExpansionExpTokens(n);if(!r)return null;let i=this._advance();r.push({type:34,parts:[],sourceSpan:i.sourceSpan});let a=new e(r,this.getTagDefinition,this.canSelfClose,this.allowHtmComponentClosingTags,this.isTagNameCaseSensitive);if(a.build(),a.errors.length>0)return this.errors=this.errors.concat(a.errors),null;let o=new G(t.sourceSpan.start,i.sourceSpan.end,t.sourceSpan.fullStart),s=new G(n.sourceSpan.start,i.sourceSpan.end,n.sourceSpan.fullStart);return new Pj(t.parts[0],a.rootNodes,o,t.sourceSpan,s)}_collectExpansionExpTokens(e){let t=[],n=[22];for(;;){if((this._peek.type===20||this._peek.type===22)&&n.push(this._peek.type),this._peek.type===23)if(SM(n,22)){if(n.pop(),n.length===0)return t}else return this.errors.push(vM.create(null,e.sourceSpan,`Invalid ICU message. Missing '}'.`)),null;if(this._peek.type===24)if(SM(n,20))n.pop();else return this.errors.push(vM.create(null,e.sourceSpan,`Invalid ICU message. Missing '}'.`)),null;if(this._peek.type===34)return this.errors.push(vM.create(null,e.sourceSpan,`Invalid ICU message. Missing '}'.`)),null;t.push(this._advance())}}_getText(e){let t=e.parts[0];if(t.length>0&&t[0]==`
43
+ `){let e=this._getClosestParentElement();e!=null&&e.children.length==0&&this.getTagDefinition(e.name).ignoreFirstLf&&(t=t.substring(1))}return t}_consumeText(e){let t=[e],n=e.sourceSpan,r=e.parts[0];if(r.length>0&&r[0]===`
44
+ `){let n=this._getContainer();n!=null&&n.children.length===0&&this.getTagDefinition(n.name).ignoreFirstLf&&(r=r.substring(1),t[0]={type:e.type,sourceSpan:e.sourceSpan,parts:[r]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)e=this._advance(),t.push(e),e.type===8?r+=e.parts.join(``).replace(/&([^;]+);/g,CM):e.type===9?r+=e.parts[0]:r+=e.parts.join(``);if(r.length>0){let i=e.sourceSpan;this._addToParent(new jj(r,new G(n.start,i.end,n.fullStart,n.details),t))}}_closeVoidElement(){let e=this._getContainer();e instanceof Ij&&this.getTagDefinition(e.name).isVoid&&this._containerStack.pop()}_consumeStartTag(e){let[t,n]=e.parts,r=[];for(;this._peek.type===14;)r.push(this._consumeAttr(this._advance()));let i=this._getElementFullName(t,n,this._getClosestParentElement()),a=!1;if(this._peek.type===2){this._advance(),a=!0;let t=this.getTagDefinition(i);this.canSelfClose||t.canSelfClose||fj(i)!==null||t.isVoid||this.errors.push(vM.create(i,e.sourceSpan,`Only void, custom and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===1&&(this._advance(),a=!1);let o=this._peek.sourceSpan.fullStart,s=new G(e.sourceSpan.start,o,e.sourceSpan.fullStart),c=new Ij(i,r,[],s,new G(e.sourceSpan.start,o,e.sourceSpan.fullStart),void 0,new G(e.sourceSpan.start.moveBy(1),e.sourceSpan.end)),l=this._getContainer();this._pushContainer(c,l instanceof Ij&&this.getTagDefinition(l.name).isClosedByChild(c.name)),a?this._popContainer(i,Ij,s):e.type===4&&(this._popContainer(i,Ij,null),this.errors.push(vM.create(i,s,`Opening tag "${i}" not terminated.`)))}_pushContainer(e,t){t&&this._containerStack.pop(),this._addToParent(e),this._containerStack.push(e)}_consumeEndTag(e){let t=this.allowHtmComponentClosingTags&&e.parts.length===0?null:this._getElementFullName(e.parts[0],e.parts[1],this._getClosestParentElement());if(t&&this.getTagDefinition(t).isVoid)this.errors.push(vM.create(t,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popContainer(t,Ij,e.sourceSpan)){let n=`Unexpected closing tag "${t}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(vM.create(t,e.sourceSpan,n))}}_popContainer(e,t,n){let r=!1;for(let i=this._containerStack.length-1;i>=0;i--){let a=this._containerStack[i];if(fj(a.name)?a.name===e:(e==null||a.name.toLowerCase()===e.toLowerCase())&&a instanceof t)return a.endSourceSpan=n,a.sourceSpan.end=n===null?a.sourceSpan.end:n.end,this._containerStack.splice(i,this._containerStack.length-i),!r;(a instanceof zj||a instanceof Ij&&!this.getTagDefinition(a.name).closedByParent)&&(r=!0)}return!1}_consumeAttr(e){let t=pj(e.parts[0],e.parts[1]),n=e.sourceSpan.end,r;this._peek.type===15&&(r=this._advance());let i=``,a=[],o,s;if(this._peek.type===16)for(o=this._peek.sourceSpan,s=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let e=this._advance();a.push(e),e.type===17?i+=e.parts.join(``).replace(/&([^;]+);/g,CM):e.type===9?i+=e.parts[0]:i+=e.parts.join(``),s=n=e.sourceSpan.end}this._peek.type===15&&(s=n=this._advance().sourceSpan.end);let c=o&&s&&new G(r?.sourceSpan.start??o.start,s,r?.sourceSpan.fullStart??o.fullStart);return new Fj(t,i,new G(e.sourceSpan.start,n,e.sourceSpan.fullStart),e.sourceSpan,c,a.length>0?a:void 0,void 0)}_consumeBlockOpen(e){let t=[];for(;this._peek.type===28;){let e=this._advance();t.push(new Bj(e.parts[0],e.sourceSpan))}this._peek.type===26&&this._advance();let n=this._peek.sourceSpan.fullStart,r=new G(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new G(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new zj(e.parts[0],t,[],r,e.sourceSpan,i);this._pushContainer(a,!1)}_consumeBlockClose(e){this._popContainer(null,zj,e.sourceSpan)||this.errors.push(vM.create(null,e.sourceSpan,`Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "&#125;" HTML entity instead.`))}_consumeIncompleteBlock(e){let t=[];for(;this._peek.type===28;){let e=this._advance();t.push(new Bj(e.parts[0],e.sourceSpan))}let n=this._peek.sourceSpan.fullStart,r=new G(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new G(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new zj(e.parts[0],t,[],r,e.sourceSpan,i);this._pushContainer(a,!1),this._popContainer(null,zj,null),this.errors.push(vM.create(e.parts[0],r,`Incomplete block "${e.parts[0]}". If you meant to write the @ character, you should use the "&#64;" HTML entity instead.`))}_consumeLet(e){let t=e.parts[0],n,r;if(this._peek.type!==31){this.errors.push(vM.create(e.parts[0],e.sourceSpan,`Invalid @let declaration "${t}". Declaration must have a value.`));return}else n=this._advance();if(this._peek.type!==32){this.errors.push(vM.create(e.parts[0],e.sourceSpan,`Unterminated @let declaration "${t}". Declaration must be terminated with a semicolon.`));return}else r=this._advance();let i=r.sourceSpan.fullStart,a=new G(e.sourceSpan.start,i,e.sourceSpan.fullStart),o=e.sourceSpan.toString().lastIndexOf(t),s=new G(e.sourceSpan.start.moveBy(o),e.sourceSpan.end),c=new Vj(t,n.parts[0],a,s,n.sourceSpan);this._addToParent(c)}_consumeIncompleteLet(e){let t=e.parts[0]??``,n=t?` "${t}"`:``;if(t.length>0){let n=e.sourceSpan.toString().lastIndexOf(t),r=new G(e.sourceSpan.start.moveBy(n),e.sourceSpan.end),i=new G(e.sourceSpan.start,e.sourceSpan.start.moveBy(0)),a=new Vj(t,``,e.sourceSpan,r,i);this._addToParent(a)}this.errors.push(vM.create(e.parts[0],e.sourceSpan,`Incomplete @let declaration${n}. @let declarations must be written as \`@let <name> = <value>;\``))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestParentElement(){for(let e=this._containerStack.length-1;e>-1;e--)if(this._containerStack[e]instanceof Ij)return this._containerStack[e];return null}_addToParent(e){let t=this._getContainer();t===null?this.rootNodes.push(e):t.children.push(e)}_getElementFullName(e,t,n){if(e===``&&(e=this.getTagDefinition(t).implicitNamespacePrefix||``,e===``&&n!=null)){let t=lj(n.name)[1];this.getTagDefinition(t).preventNamespaceInheritance||(e=fj(n.name))}return pj(e,t)}};function SM(e,t){return e.length>0&&e[e.length-1]===t}function CM(e,t){return Wj[t]===void 0?/^#x[a-f0-9]+$/i.test(t)?String.fromCodePoint(parseInt(t.slice(2),16)):/^#\d+$/.test(t)?String.fromCodePoint(parseInt(t.slice(1),10)):e:Wj[t]||e}var wM=class extends bM{constructor(){super(kj)}parse(e,t,n,r=!1,i){return super.parse(e,t,n,r,i)}},TM=null,EM=()=>(TM||=new wM,TM);function DM(e,t={}){let{canSelfClose:n=!1,allowHtmComponentClosingTags:r=!1,isTagNameCaseSensitive:i=!1,getTagContentType:a,tokenizeAngularBlocks:o=!1,tokenizeAngularLetDeclaration:s=!1}=t;return EM().parse(e,`angular-html-parser`,{tokenizeExpansionForms:o,interpolationConfig:void 0,canSelfClose:n,allowHtmComponentClosingTags:r,tokenizeBlocks:o,tokenizeLet:s},i,a)}function OM(e,t){let n=SyntaxError(e+` (`+t.loc.start.line+`:`+t.loc.start.column+`)`);return Object.assign(n,t)}var kM=OM,AM=3;function jM(e){let t=e.slice(0,AM);if(t!==`---`&&t!==`+++`)return;let n=e.indexOf(`
45
+ `,AM);if(n===-1)return;let r=e.slice(AM,n).trim(),i=e.indexOf(`
46
+ ${t}`,n),a=r;if(a||=t===`+++`?`toml`:`yaml`,i===-1&&t===`---`&&a===`yaml`&&(i=e.indexOf(`
47
+ ...`,n)),i===-1)return;let o=i+1+AM,s=e.charAt(o+1);if(!/\s?/u.test(s))return;let c=e.slice(0,o);return{type:`front-matter`,language:a,explicitLanguage:r,value:e.slice(n+1,i),startDelimiter:t,endDelimiter:c.slice(-AM),raw:c}}function MM(e){let t=jM(e);if(!t)return{content:e};let{raw:n}=t;return{frontMatter:t,content:rE(!1,n,/[^\n]/gu,` `)+e.slice(n.length)}}var NM=MM,PM={attrs:!0,children:!0,cases:!0,expression:!0},FM=new Set([`parent`]),IM,LM,RM,zM=class e{constructor(e={}){eE(this,IM),ZT(this,`type`),ZT(this,`parent`);for(let t of new Set([...FM,...Object.keys(e)]))this.setProperty(t,e[t])}setProperty(e,t){if(this[e]!==t){if(e in PM&&(t=t.map(e=>this.createChild(e))),!FM.has(e)){this[e]=t;return}Object.defineProperty(this,e,{value:t,enumerable:!1,configurable:!0})}}map(t){let n;for(let r in PM){let i=this[r];if(i){let a=VM(i,e=>e.map(t));n!==i&&(n||=new e({parent:this.parent}),n.setProperty(r,a))}}if(n)for(let e in this)e in PM||(n[e]=this[e]);return t(n||this)}walk(e){for(let t in PM){let n=this[t];if(n)for(let t=0;t<n.length;t++)n[t].walk(e)}e(this)}createChild(t){let n=t instanceof e?t.clone():new e(t);return n.setProperty(`parent`,this),n}insertChildBefore(e,t){let n=this.$children;n.splice(n.indexOf(e),0,this.createChild(t))}removeChild(e){let t=this.$children;t.splice(t.indexOf(e),1)}replaceChild(e,t){let n=this.$children;n[n.indexOf(e)]=this.createChild(t)}clone(){return new e(this)}get $children(){return this[$T(this,IM,LM)]}set $children(e){this[$T(this,IM,LM)]=e}get firstChild(){return this.$children?.[0]}get lastChild(){return bE(!0,this.$children,-1)}get prev(){let e=$T(this,IM,RM);return e[e.indexOf(this)-1]}get next(){let e=$T(this,IM,RM);return e[e.indexOf(this)+1]}get rawName(){return this.hasExplicitNamespace?this.fullName:this.name}get fullName(){return this.namespace?this.namespace+`:`+this.name:this.name}get attrMap(){return Object.fromEntries(this.attrs.map(e=>[e.fullName,e.value]))}};IM=new WeakSet,LM=function(){return this.type===`angularIcuCase`?`expression`:this.type===`angularIcuExpression`?`cases`:`children`},RM=function(){return this.parent?.$children??[]};var BM=zM;function VM(e,t){let n=e.map(t);return n.some((t,n)=>t!==e[n])?n:e}var HM=[{regex:/^(\[if([^\]]*)\]>)(.*?)<!\s*\[endif\]$/su,parse:WM},{regex:/^\[if([^\]]*)\]><!$/u,parse:GM},{regex:/^<!\s*\[endif\]$/u,parse:KM}];function UM(e,t){if(e.value)for(let{regex:n,parse:r}of HM){let i=e.value.match(n);if(i)return r(e,t,i)}return null}function WM(e,t,n){let[,r,i,a]=n,o=4+r.length,s=e.sourceSpan.start.moveBy(o),c=s.moveBy(a.length),[l,u]=(()=>{try{return[!0,t(a,s).children]}catch{return[!1,[{type:`text`,value:a,sourceSpan:new G(s,c)}]]}})();return{type:`ieConditionalComment`,complete:l,children:u,condition:rE(!1,i.trim(),/\s+/gu,` `),sourceSpan:e.sourceSpan,startSourceSpan:new G(e.sourceSpan.start,s),endSourceSpan:new G(c,e.sourceSpan.end)}}function GM(e,t,n){let[,r]=n;return{type:`ieConditionalStartComment`,condition:rE(!1,r.trim(),/\s+/gu,` `),sourceSpan:e.sourceSpan}}function KM(e){return{type:`ieConditionalEndComment`,sourceSpan:e.sourceSpan}}var qM=new Map([[`*`,new Set(`accesskey.autocapitalize.autofocus.class.contenteditable.dir.draggable.enterkeyhint.hidden.id.inert.inputmode.is.itemid.itemprop.itemref.itemscope.itemtype.lang.nonce.popover.slot.spellcheck.style.tabindex.title.translate.writingsuggestions`.split(`.`))],[`a`,new Set([`charset`,`coords`,`download`,`href`,`hreflang`,`name`,`ping`,`referrerpolicy`,`rel`,`rev`,`shape`,`target`,`type`])],[`applet`,new Set([`align`,`alt`,`archive`,`code`,`codebase`,`height`,`hspace`,`name`,`object`,`vspace`,`width`])],[`area`,new Set([`alt`,`coords`,`download`,`href`,`hreflang`,`nohref`,`ping`,`referrerpolicy`,`rel`,`shape`,`target`,`type`])],[`audio`,new Set([`autoplay`,`controls`,`crossorigin`,`loop`,`muted`,`preload`,`src`])],[`base`,new Set([`href`,`target`])],[`basefont`,new Set([`color`,`face`,`size`])],[`blockquote`,new Set([`cite`])],[`body`,new Set([`alink`,`background`,`bgcolor`,`link`,`text`,`vlink`])],[`br`,new Set([`clear`])],[`button`,new Set([`disabled`,`form`,`formaction`,`formenctype`,`formmethod`,`formnovalidate`,`formtarget`,`name`,`popovertarget`,`popovertargetaction`,`type`,`value`])],[`canvas`,new Set([`height`,`width`])],[`caption`,new Set([`align`])],[`col`,new Set([`align`,`char`,`charoff`,`span`,`valign`,`width`])],[`colgroup`,new Set([`align`,`char`,`charoff`,`span`,`valign`,`width`])],[`data`,new Set([`value`])],[`del`,new Set([`cite`,`datetime`])],[`details`,new Set([`name`,`open`])],[`dialog`,new Set([`open`])],[`dir`,new Set([`compact`])],[`div`,new Set([`align`])],[`dl`,new Set([`compact`])],[`embed`,new Set([`height`,`src`,`type`,`width`])],[`fieldset`,new Set([`disabled`,`form`,`name`])],[`font`,new Set([`color`,`face`,`size`])],[`form`,new Set([`accept`,`accept-charset`,`action`,`autocomplete`,`enctype`,`method`,`name`,`novalidate`,`target`])],[`frame`,new Set([`frameborder`,`longdesc`,`marginheight`,`marginwidth`,`name`,`noresize`,`scrolling`,`src`])],[`frameset`,new Set([`cols`,`rows`])],[`h1`,new Set([`align`])],[`h2`,new Set([`align`])],[`h3`,new Set([`align`])],[`h4`,new Set([`align`])],[`h5`,new Set([`align`])],[`h6`,new Set([`align`])],[`head`,new Set([`profile`])],[`hr`,new Set([`align`,`noshade`,`size`,`width`])],[`html`,new Set([`manifest`,`version`])],[`iframe`,new Set([`align`,`allow`,`allowfullscreen`,`allowpaymentrequest`,`allowusermedia`,`frameborder`,`height`,`loading`,`longdesc`,`marginheight`,`marginwidth`,`name`,`referrerpolicy`,`sandbox`,`scrolling`,`src`,`srcdoc`,`width`])],[`img`,new Set([`align`,`alt`,`border`,`crossorigin`,`decoding`,`fetchpriority`,`height`,`hspace`,`ismap`,`loading`,`longdesc`,`name`,`referrerpolicy`,`sizes`,`src`,`srcset`,`usemap`,`vspace`,`width`])],[`input`,new Set(`accept.align.alt.autocomplete.checked.dirname.disabled.form.formaction.formenctype.formmethod.formnovalidate.formtarget.height.ismap.list.max.maxlength.min.minlength.multiple.name.pattern.placeholder.popovertarget.popovertargetaction.readonly.required.size.src.step.type.usemap.value.width`.split(`.`))],[`ins`,new Set([`cite`,`datetime`])],[`isindex`,new Set([`prompt`])],[`label`,new Set([`for`,`form`])],[`legend`,new Set([`align`])],[`li`,new Set([`type`,`value`])],[`link`,new Set([`as`,`blocking`,`charset`,`color`,`crossorigin`,`disabled`,`fetchpriority`,`href`,`hreflang`,`imagesizes`,`imagesrcset`,`integrity`,`media`,`referrerpolicy`,`rel`,`rev`,`sizes`,`target`,`type`])],[`map`,new Set([`name`])],[`menu`,new Set([`compact`])],[`meta`,new Set([`charset`,`content`,`http-equiv`,`media`,`name`,`scheme`])],[`meter`,new Set([`high`,`low`,`max`,`min`,`optimum`,`value`])],[`object`,new Set([`align`,`archive`,`border`,`classid`,`codebase`,`codetype`,`data`,`declare`,`form`,`height`,`hspace`,`name`,`standby`,`type`,`typemustmatch`,`usemap`,`vspace`,`width`])],[`ol`,new Set([`compact`,`reversed`,`start`,`type`])],[`optgroup`,new Set([`disabled`,`label`])],[`option`,new Set([`disabled`,`label`,`selected`,`value`])],[`output`,new Set([`for`,`form`,`name`])],[`p`,new Set([`align`])],[`param`,new Set([`name`,`type`,`value`,`valuetype`])],[`pre`,new Set([`width`])],[`progress`,new Set([`max`,`value`])],[`q`,new Set([`cite`])],[`script`,new Set([`async`,`blocking`,`charset`,`crossorigin`,`defer`,`fetchpriority`,`integrity`,`language`,`nomodule`,`referrerpolicy`,`src`,`type`])],[`select`,new Set([`autocomplete`,`disabled`,`form`,`multiple`,`name`,`required`,`size`])],[`slot`,new Set([`name`])],[`source`,new Set([`height`,`media`,`sizes`,`src`,`srcset`,`type`,`width`])],[`style`,new Set([`blocking`,`media`,`type`])],[`table`,new Set([`align`,`bgcolor`,`border`,`cellpadding`,`cellspacing`,`frame`,`rules`,`summary`,`width`])],[`tbody`,new Set([`align`,`char`,`charoff`,`valign`])],[`td`,new Set([`abbr`,`align`,`axis`,`bgcolor`,`char`,`charoff`,`colspan`,`headers`,`height`,`nowrap`,`rowspan`,`scope`,`valign`,`width`])],[`template`,new Set([`shadowrootclonable`,`shadowrootdelegatesfocus`,`shadowrootmode`])],[`textarea`,new Set([`autocomplete`,`cols`,`dirname`,`disabled`,`form`,`maxlength`,`minlength`,`name`,`placeholder`,`readonly`,`required`,`rows`,`wrap`])],[`tfoot`,new Set([`align`,`char`,`charoff`,`valign`])],[`th`,new Set([`abbr`,`align`,`axis`,`bgcolor`,`char`,`charoff`,`colspan`,`headers`,`height`,`nowrap`,`rowspan`,`scope`,`valign`,`width`])],[`thead`,new Set([`align`,`char`,`charoff`,`valign`])],[`time`,new Set([`datetime`])],[`tr`,new Set([`align`,`bgcolor`,`char`,`charoff`,`valign`])],[`track`,new Set([`default`,`kind`,`label`,`src`,`srclang`])],[`ul`,new Set([`compact`,`type`])],[`video`,new Set([`autoplay`,`controls`,`crossorigin`,`height`,`loop`,`muted`,`playsinline`,`poster`,`preload`,`src`,`width`])]]),JM=new Set(`a.abbr.acronym.address.applet.area.article.aside.audio.b.base.basefont.bdi.bdo.bgsound.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.command.content.data.datalist.dd.del.details.dfn.dialog.dir.div.dl.dt.em.embed.fieldset.figcaption.figure.font.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.image.img.input.ins.isindex.kbd.keygen.label.legend.li.link.listing.main.map.mark.marquee.math.menu.menuitem.meta.meter.multicol.nav.nextid.nobr.noembed.noframes.noscript.object.ol.optgroup.option.output.p.param.picture.plaintext.pre.progress.q.rb.rbc.rp.rt.rtc.ruby.s.samp.script.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.svg.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.tt.u.ul.var.video.wbr.xmp`.split(`.`));function YM(e){if(e.type===`block`){if(e.name=rE(!1,e.name.toLowerCase(),/\s+/gu,` `).trim(),e.type=`angularControlFlowBlock`,!vD(e.parameters)){delete e.parameters;return}for(let t of e.parameters)t.type=`angularControlFlowBlockParameter`;e.parameters={type:`angularControlFlowBlockParameters`,children:e.parameters,sourceSpan:new G(e.parameters[0].sourceSpan.start,bE(!1,e.parameters,-1).sourceSpan.end)}}}function XM(e){e.type===`letDeclaration`&&(e.type=`angularLetDeclaration`,e.id=e.name,e.init={type:`angularLetDeclarationInitializer`,sourceSpan:new G(e.valueSpan.start,e.valueSpan.end),value:e.value},delete e.name,delete e.value)}function ZM(e){(e.type===`plural`||e.type===`select`)&&(e.clause=e.type,e.type=`angularIcuExpression`),e.type===`expansionCase`&&(e.type=`angularIcuCase`)}function QM(e,t,n){let{name:r,canSelfClose:i=!0,normalizeTagName:a=!1,normalizeAttributeName:o=!1,allowHtmComponentClosingTags:s=!1,isTagNameCaseSensitive:c=!1,shouldParseAsRawText:l}=t,{rootNodes:u,errors:d}=DM(e,{canSelfClose:i,allowHtmComponentClosingTags:s,isTagNameCaseSensitive:c,getTagContentType:l?(...e)=>l(...e)?cj.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:r===`angular`?!0:void 0,tokenizeAngularLetDeclaration:r===`angular`?!0:void 0});if(r===`vue`){if(u.some(e=>e.type===`docType`&&e.value===`html`||e.type===`element`&&e.name.toLowerCase()===`html`))return QM(e,rN,n);let t,r=()=>t??=DM(e,{canSelfClose:i,allowHtmComponentClosingTags:s,isTagNameCaseSensitive:c}),a=e=>r().rootNodes.find(({startSourceSpan:t})=>t&&t.start.offset===e.startSourceSpan.start.offset)??e;for(let[e,t]of u.entries()){let{endSourceSpan:i,startSourceSpan:o}=t;if(i===null)d=r().errors,u[e]=a(t);else if($M(t,n)){let n=r().errors.find(e=>e.span.start.offset>o.start.offset&&e.span.start.offset<i.end.offset);n&&eN(n),u[e]=a(t)}}}d.length>0&&eN(d[0]);let f=e=>{let t=e.name.startsWith(`:`)?e.name.slice(1).split(`:`)[0]:null,n=e.nameSpan.toString(),r=t!==null&&n.startsWith(`${t}:`);e.name=r?n.slice(t.length+1):n,e.namespace=t,e.hasExplicitNamespace=r},p=e=>{switch(e.type){case`element`:f(e);for(let t of e.attrs)f(t),t.valueSpan?(t.value=t.valueSpan.toString(),/["']/u.test(t.value[0])&&(t.value=t.value.slice(1,-1))):t.value=null;break;case`comment`:e.value=e.sourceSpan.toString().slice(4,-3);break;case`text`:e.value=e.sourceSpan.toString();break}},m=(e,t)=>{let n=e.toLowerCase();return t(n)?n:e},h=e=>{if(e.type===`element`&&(a&&(!e.namespace||e.namespace===e.tagDefinition.implicitNamespacePrefix||ID(e))&&(e.name=m(e.name,e=>JM.has(e))),o))for(let t of e.attrs)t.namespace||(t.name=m(t.name,t=>qM.has(e.name)&&(qM.get(`*`).has(t)||qM.get(e.name).has(t))))},g=e=>{e.sourceSpan&&e.endSourceSpan&&(e.sourceSpan=new G(e.sourceSpan.start,e.endSourceSpan.end))},_=e=>{if(e.type===`element`){let t=kj(c?e.name:e.name.toLowerCase());!e.namespace||e.namespace===t.implicitNamespacePrefix||ID(e)?e.tagDefinition=t:e.tagDefinition=kj(``)}};return Hj(new class extends Uj{visitExpansionCase(e,t){r===`angular`&&this.visitChildren(t,t=>{t(e.expression)})}visit(e){p(e),_(e),h(e),g(e)}},u),u}function $M(e,t){if(e.type!==`element`||e.name!==`template`)return!1;let n=e.attrs.find(e=>e.name===`lang`)?.value;return!n||AD(t,{language:n})===`html`}function eN(e){let{msg:t,span:{start:n,end:r}}=e;throw kM(t,{loc:{start:{line:n.line+1,column:n.col+1},end:{line:r.line+1,column:r.col+1}},cause:e})}function tN(e,t,n={},r=!0){let{frontMatter:i,content:a}=r?NM(e):{frontMatter:null,content:e},o=new jA(e,n.filepath),s=new AA(o,0,0,0),c={type:`root`,sourceSpan:new G(s,s.moveBy(e.length)),children:QM(a,t,n)};if(i){let e=new AA(o,0,0,0);i.sourceSpan=new G(e,e.moveBy(i.raw.length)),c.children.unshift(i)}let l=new BM(c),u=(r,i)=>{let{offset:a}=i,o=tN(rE(!1,e.slice(0,a),/[^\n\r]/gu,` `)+r,t,n,!1);o.sourceSpan=new G(i,bE(!1,o.children,-1).sourceSpan.end);let s=o.children[0];return s.length===a?o.children.shift():(s.sourceSpan=new G(s.sourceSpan.start.moveBy(a),s.sourceSpan.end),s.value=s.value.slice(a)),o};return l.walk(e=>{if(e.type===`comment`){let t=UM(e,u);t&&e.parent.replaceChild(e,t)}YM(e),XM(e),ZM(e)}),l}function nN(e){return{parse:(t,n)=>tN(t,e,n),hasPragma:oA,hasIgnorePragma:sA,astFormat:`html`,locStart:Sk,locEnd:Ck}}var rN={name:`html`,normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0},iN=nN(rN),aN=new Set([`mj-style`,`mj-raw`]),oN=nN({...rN,name:`mjml`,shouldParseAsRawText:e=>aN.has(e)}),sN=nN({name:`angular`}),cN=nN({name:`vue`,isTagNameCaseSensitive:!0,shouldParseAsRawText(e,t,n,r){return e.toLowerCase()!==`html`&&!n&&(e!==`template`||r.some(({name:e,value:t})=>e===`lang`&&t!==`html`&&t!==``&&t!==void 0))}}),lN=nN({name:`lwc`,canSelfClose:!1}),uN={html:YA},dN=nE,fN=Object.create,pN=Object.defineProperty,mN=Object.getOwnPropertyDescriptor,hN=Object.getOwnPropertyNames,gN=Object.getPrototypeOf,_N=Object.prototype.hasOwnProperty,vN=e=>{throw TypeError(e)},yN=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),bN=(e,t)=>{for(var n in t)pN(e,n,{get:t[n],enumerable:!0})},xN=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of hN(t))!_N.call(e,i)&&i!==n&&pN(e,i,{get:()=>t[i],enumerable:!(r=mN(t,i))||r.enumerable});return e},SN=(e,t,n)=>(n=e==null?{}:fN(gN(e)),xN(t||!e||!e.__esModule?pN(n,`default`,{value:e,enumerable:!0}):n,e)),CN=(e,t,n)=>t.has(e)||vN(`Cannot `+n),wN=(e,t,n)=>t.has(e)?vN(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),TN=(e,t,n)=>(CN(e,t,`access private method`),n),EN=yN(e=>{Object.defineProperty(e,`__esModule`,{value:!0});function t(){return new Proxy({},{get:()=>e=>e})}var n=/\r\n|[\n\r\u2028\u2029]/;function r(e,t,n){let r=Object.assign({column:0,line:-1},e.start),i=Object.assign({},r,e.end),{linesAbove:a=2,linesBelow:o=3}=n||{},s=r.line,c=r.column,l=i.line,u=i.column,d=Math.max(s-(a+1),0),f=Math.min(t.length,l+o);s===-1&&(d=0),l===-1&&(f=t.length);let p=l-s,m={};if(p)for(let e=0;e<=p;e++){let n=e+s;c?e===0?m[n]=[c,t[n-1].length-c+1]:e===p?m[n]=[0,u]:m[n]=[0,t[n-e].length]:m[n]=!0}else c===u?c?m[s]=[c,0]:m[s]=!0:m[s]=[c,u-c];return{start:d,end:f,markerLines:m}}function i(e,i,a={}){let o=t(!1),{start:s,end:c,markerLines:l}=r(i,e.split(n),a),u=i.start&&typeof i.start.column==`number`,d=String(c).length,f=e.split(n,c).slice(s,c).map((e,t)=>{let n=s+1+t,r=` ${` ${n}`.slice(-d)} |`,i=l[n],c=!l[n+1];if(i){let t=``;if(Array.isArray(i)){let n=e.slice(0,Math.max(i[0]-1,0)).replace(/[^\t]/g,` `),s=i[1]||1;t=[`
48
+ `,o.gutter(r.replace(/\d/g,` `)),` `,n,o.marker(`^`).repeat(s)].join(``),c&&a.message&&(t+=` `+o.message(a.message))}return[o.marker(`>`),o.gutter(r),e.length>0?` ${e}`:``,t].join(``)}else return` ${o.gutter(r)}${e.length>0?` ${e}`:``}`}).join(`
49
+ `);return a.message&&!u&&(f=`${` `.repeat(d+1)}${a.message}
50
+ ${f}`),f}e.codeFrameColumns=i});bN({},{__debug:()=>bz,check:()=>vz,doc:()=>MR,format:()=>_z,formatWithCursor:()=>gz,getSupportInfo:()=>yz,util:()=>LR,version:()=>IR});var DN=(e,t,n,r)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},ON=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},kN=new class extends ON{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function AN(e,t,n){return kN.diff(e,t,n)}function jN(e){let t=e.indexOf(`\r`);return t===-1?`lf`:e.charAt(t+1)===`
51
+ `?`crlf`:`cr`}function MN(e){switch(e){case`cr`:return`\r`;case`crlf`:return`\r
52
+ `;default:return`
53
+ `}}function NN(e,t){let n;switch(t){case`
54
+ `:n=/\n/gu;break;case`\r`:n=/\r/gu;break;case`\r
55
+ `:n=/\r\n/gu;break;default:throw Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let r=e.match(n);return r?r.length:0}function PN(e){return DN(!1,e,/\r\n?/gu,`
56
+ `)}var FN=`string`,IN=`array`,LN=`cursor`,RN=`indent`,zN=`align`,BN=`trim`,VN=`group`,HN=`fill`,UN=`if-break`,WN=`indent-if-break`,GN=`line-suffix`,KN=`line-suffix-boundary`,qN=`line`,JN=`label`,YN=`break-parent`,XN=new Set([LN,RN,zN,BN,VN,HN,UN,WN,GN,KN,qN,JN,YN]),ZN=(e,t,n)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t==`string`?t[n<0?t.length+n:n]:t.at(n)};function QN(e){let t=e.length;for(;t>0&&(e[t-1]===`\r`||e[t-1]===`
57
+ `);)t--;return t<e.length?e.slice(0,t):e}function $N(e){if(typeof e==`string`)return FN;if(Array.isArray(e))return IN;if(!e)return;let{type:t}=e;if(XN.has(t))return t}var eP=$N,tP=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function nP(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
58
+ Expected it to be 'string' or 'object'.`;if(eP(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=tP([...XN].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
59
+ Expected it to be ${r}.`}var rP=class extends Error{name=`InvalidDocError`;constructor(e){super(nP(e)),this.doc=e}},iP={};function aP(e,t,n,r){let i=[e];for(;i.length>0;){let e=i.pop();if(e===iP){n(i.pop());continue}n&&i.push(e,iP);let a=eP(e);if(!a)throw new rP(e);if(t?.(e)!==!1)switch(a){case IN:case HN:{let t=a===IN?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case UN:i.push(e.flatContents,e.breakContents);break;case VN:if(r&&e.expandedStates)for(let t=e.expandedStates.length,n=t-1;n>=0;--n)i.push(e.expandedStates[n]);else i.push(e.contents);break;case zN:case RN:case WN:case JN:case GN:i.push(e.contents);break;case FN:case LN:case BN:case KN:case qN:case YN:break;default:throw new rP(e)}}}var oP=aP;function sP(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){if(n.has(e))return n.get(e);let t=i(e);return n.set(e,t),t}function i(e){switch(eP(e)){case IN:return t(e.map(r));case HN:return t({...e,parts:e.parts.map(r)});case UN:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case VN:{let{expandedStates:n,contents:i}=e;return n?(n=n.map(r),i=n[0]):i=r(i),t({...e,contents:i,expandedStates:n})}case zN:case RN:case WN:case JN:case GN:return t({...e,contents:r(e.contents)});case FN:case LN:case BN:case KN:case qN:case YN:return t(e);default:throw new rP(e)}}}function cP(e,t,n){let r=n,i=!1;function a(e){if(i)return!1;let n=t(e);n!==void 0&&(i=!0,r=n)}return oP(e,a),r}function lP(e){if(e.type===VN&&e.break||e.type===qN&&e.hard||e.type===YN)return!0}function uP(e){return cP(e,lP,!1)}function dP(e){if(e.length>0){let t=ZN(!1,e,-1);!t.expandedStates&&!t.break&&(t.break=`propagated`)}return null}function fP(e){let t=new Set,n=[];function r(e){if(e.type===YN&&dP(n),e.type===VN){if(n.push(e),t.has(e))return!1;t.add(e)}}function i(e){e.type===VN&&n.pop().break&&dP(n)}oP(e,r,i,!0)}function pP(e){return e.type===qN&&!e.hard?e.soft?``:` `:e.type===UN?e.flatContents:e}function mP(e){return sP(e,pP)}function hP(e){for(e=[...e];e.length>=2&&ZN(!1,e,-2).type===qN&&ZN(!1,e,-1).type===YN;)e.length-=2;if(e.length>0){let t=gP(ZN(!1,e,-1));e[e.length-1]=t}return e}function gP(e){switch(eP(e)){case RN:case WN:case VN:case GN:case JN:{let t=gP(e.contents);return{...e,contents:t}}case UN:return{...e,breakContents:gP(e.breakContents),flatContents:gP(e.flatContents)};case HN:return{...e,parts:hP(e.parts)};case IN:return hP(e);case FN:return QN(e);case zN:case LN:case BN:case KN:case qN:case YN:break;default:throw new rP(e)}return e}function _P(e){return gP(yP(e))}function vP(e){switch(eP(e)){case HN:if(e.parts.every(e=>e===``))return``;break;case VN:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return``;if(e.contents.type===VN&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case zN:case RN:case WN:case GN:if(!e.contents)return``;break;case UN:if(!e.flatContents&&!e.breakContents)return``;break;case IN:{let t=[];for(let n of e){if(!n)continue;let[e,...r]=Array.isArray(n)?n:[n];typeof e==`string`&&typeof ZN(!1,t,-1)==`string`?t[t.length-1]+=e:t.push(e),t.push(...r)}return t.length===0?``:t.length===1?t[0]:t}case FN:case LN:case BN:case KN:case qN:case JN:case YN:break;default:throw new rP(e)}return e}function yP(e){return sP(e,e=>vP(e))}function bP(e,t=qP){return sP(e,e=>typeof e==`string`?YP(t,e.split(`
60
+ `)):e)}function xP(e){if(e.type===qN)return!0}function SP(e){return cP(e,xP,!1)}function CP(e,t){return e.type===JN?{...e,contents:t(e.contents)}:t(e)}var wP=()=>{},TP=wP,EP=wP,DP=wP;function OP(e){return TP(e),{type:RN,contents:e}}function kP(e,t){return TP(t),{type:zN,contents:t,n:e}}function AP(e,t={}){return TP(e),EP(t.expandedStates,!0),{type:VN,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function jP(e){return kP(-1/0,e)}function MP(e){return kP({type:`root`},e)}function NP(e){return kP(-1,e)}function PP(e,t){return AP(e[0],{...t,expandedStates:e})}function FP(e){return DP(e),{type:HN,parts:e}}function IP(e,t=``,n={}){return TP(e),t!==``&&TP(t),{type:UN,breakContents:e,flatContents:t,groupId:n.groupId}}function LP(e,t){return TP(e),{type:WN,contents:e,groupId:t.groupId,negate:t.negate}}function RP(e){return TP(e),{type:GN,contents:e}}var zP={type:KN},BP={type:YN},VP={type:BN},HP={type:qN,hard:!0},UP={type:qN,hard:!0,literal:!0},WP={type:qN},GP={type:qN,soft:!0},KP=[HP,BP],qP=[UP,BP],JP={type:LN};function YP(e,t){TP(e),EP(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function XP(e,t,n){TP(e);let r=e;if(t>0){for(let e=0;e<Math.floor(t/n);++e)r=OP(r);r=kP(t%n,r),r=kP(-1/0,r)}return r}function ZP(e,t){return TP(t),e?{type:JN,label:e,contents:t}:t}function QP(e){if(!e)return``;if(Array.isArray(e)){let t=[];for(let n of e)if(Array.isArray(n))t.push(...QP(n));else{let e=QP(n);e!==``&&t.push(e)}return t}return e.type===UN?{...e,breakContents:QP(e.breakContents),flatContents:QP(e.flatContents)}:e.type===VN?{...e,contents:QP(e.contents),expandedStates:e.expandedStates?.map(QP)}:e.type===HN?{type:`fill`,parts:e.parts.map(QP)}:e.contents?{...e,contents:QP(e.contents)}:e}function $P(e){let t=Object.create(null),n=new Set;return r(QP(e));function r(e,t,n){if(typeof e==`string`)return JSON.stringify(e);if(Array.isArray(e)){let t=e.map(r).filter(Boolean);return t.length===1?t[0]:`[${t.join(`, `)}]`}if(e.type===qN){let r=n?.[t+1]?.type===YN;return e.literal?r?`literalline`:`literallineWithoutBreakParent`:e.hard?r?`hardline`:`hardlineWithoutBreakParent`:e.soft?`softline`:`line`}if(e.type===YN)return n?.[t-1]?.type===qN&&n[t-1].hard?void 0:`breakParent`;if(e.type===BN)return`trim`;if(e.type===RN)return`indent(`+r(e.contents)+`)`;if(e.type===zN)return e.n===-1/0?`dedentToRoot(`+r(e.contents)+`)`:e.n<0?`dedent(`+r(e.contents)+`)`:e.n.type===`root`?`markAsRoot(`+r(e.contents)+`)`:`align(`+JSON.stringify(e.n)+`, `+r(e.contents)+`)`;if(e.type===UN)return`ifBreak(`+r(e.breakContents)+(e.flatContents?`, `+r(e.flatContents):``)+(e.groupId?(e.flatContents?``:`, ""`)+`, { groupId: ${i(e.groupId)} }`:``)+`)`;if(e.type===WN){let t=[];e.negate&&t.push(`negate: true`),e.groupId&&t.push(`groupId: ${i(e.groupId)}`);let n=t.length>0?`, { ${t.join(`, `)} }`:``;return`indentIfBreak(${r(e.contents)}${n})`}if(e.type===VN){let t=[];e.break&&e.break!==`propagated`&&t.push(`shouldBreak: true`),e.id&&t.push(`id: ${i(e.id)}`);let n=t.length>0?`, { ${t.join(`, `)} }`:``;return e.expandedStates?`conditionalGroup([${e.expandedStates.map(e=>r(e)).join(`,`)}]${n})`:`group(${r(e.contents)}${n})`}if(e.type===HN)return`fill([${e.parts.map(e=>r(e)).join(`, `)}])`;if(e.type===GN)return`lineSuffix(`+r(e.contents)+`)`;if(e.type===KN)return`lineSuffixBoundary`;if(e.type===JN)return`label(${JSON.stringify(e.label)}, ${r(e.contents)})`;if(e.type===LN)return`cursor`;throw Error(`Unknown doc type `+e.type)}function i(e){if(typeof e!=`symbol`)return JSON.stringify(String(e));if(e in t)return t[e];let r=e.description||`symbol`;for(let i=0;;i++){let a=r+(i>0?` #${i}`:``);if(!n.has(a))return n.add(a),t[e]=`Symbol.for(${JSON.stringify(a)})`}}}var eF=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function tF(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function nF(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var rF=e=>!(tF(e)||nF(e)),iF=/[^\x20-\x7F]/u;function aF(e){if(!e)return 0;if(!iF.test(e))return e.length;e=e.replace(eF(),` `);let t=0;for(let n of e){let e=n.codePointAt(0);e<=31||e>=127&&e<=159||e>=768&&e<=879||(t+=rF(e)?1:2)}return t}var oF=aF,sF=Symbol(`MODE_BREAK`),cF=Symbol(`MODE_FLAT`),lF=Symbol(`cursor`),uF=Symbol(`DOC_FILL_PRINTED_LENGTH`);function dF(){return{value:``,length:0,queue:[]}}function fF(e,t){return mF(e,{type:`indent`},t)}function pF(e,t,n){return t===-1/0?e.root||dF():t<0?mF(e,{type:`dedent`},n):t?t.type===`root`?{...e,root:e}:mF(e,{type:typeof t==`string`?`stringAlign`:`numberAlign`,n:t},n):e}function mF(e,t,n){let r=t.type===`dedent`?e.queue.slice(0,-1):[...e.queue,t],i=``,a=0,o=0,s=0;for(let e of r)switch(e.type){case`indent`:u(),n.useTabs?c(1):l(n.tabWidth);break;case`stringAlign`:u(),i+=e.n,a+=e.n.length;break;case`numberAlign`:o+=1,s+=e.n;break;default:throw Error(`Unexpected type '${e.type}'`)}return f(),{...e,value:i,length:a,queue:r};function c(e){i+=` `.repeat(e),a+=n.tabWidth*e}function l(e){i+=` `.repeat(e),a+=e}function u(){n.useTabs?d():f()}function d(){o>0&&c(o),p()}function f(){s>0&&l(s),p()}function p(){o=0,s=0}}function hF(e){let t=0,n=0,r=e.length;e:for(;r--;){let i=e[r];if(i===lF){n++;continue}for(let n=i.length-1;n>=0;n--){let a=i[n];if(a===` `||a===` `)t++;else{e[r]=i.slice(0,n+1);break e}}}if(t>0||n>0)for(e.length=r+1;n-- >0;)e.push(lF);return t}function gF(e,t,n,r,i,a){if(n===1/0)return!0;let o=t.length,s=[e],c=[];for(;n>=0;){if(s.length===0){if(o===0)return!0;s.push(t[--o]);continue}let{mode:e,doc:l}=s.pop(),u=eP(l);switch(u){case FN:c.push(l),n-=oF(l);break;case IN:case HN:{let t=u===IN?l:l.parts,n=l[uF]??0;for(let r=t.length-1;r>=n;r--)s.push({mode:e,doc:t[r]});break}case RN:case zN:case WN:case JN:s.push({mode:e,doc:l.contents});break;case BN:n+=hF(c);break;case VN:{if(a&&l.break)return!1;let t=l.break?sF:e,n=l.expandedStates&&t===sF?ZN(!1,l.expandedStates,-1):l.contents;s.push({mode:t,doc:n});break}case UN:{let t=(l.groupId?i[l.groupId]||cF:e)===sF?l.breakContents:l.flatContents;t&&s.push({mode:e,doc:t});break}case qN:if(e===sF||l.hard)return!0;l.soft||(c.push(` `),n--);break;case GN:r=!0;break;case KN:if(r)return!1;break}}return!1}function _F(e,t){let n={},r=t.printWidth,i=MN(t.endOfLine),a=0,o=[{ind:dF(),mode:sF,doc:e}],s=[],c=!1,l=[],u=0;for(fP(e);o.length>0;){let{ind:e,mode:d,doc:f}=o.pop();switch(eP(f)){case FN:{let e=i===`
61
+ `?f:DN(!1,f,`
62
+ `,i);s.push(e),o.length>0&&(a+=oF(e));break}case IN:for(let t=f.length-1;t>=0;t--)o.push({ind:e,mode:d,doc:f[t]});break;case LN:if(u>=2)throw Error(`There are too many 'cursor' in doc.`);s.push(lF),u++;break;case RN:o.push({ind:fF(e,t),mode:d,doc:f.contents});break;case zN:o.push({ind:pF(e,f.n,t),mode:d,doc:f.contents});break;case BN:a-=hF(s);break;case VN:switch(d){case cF:if(!c){o.push({ind:e,mode:f.break?sF:cF,doc:f.contents});break}case sF:{c=!1;let t={ind:e,mode:cF,doc:f.contents},i=r-a,s=l.length>0;if(!f.break&&gF(t,o,i,s,n))o.push(t);else if(f.expandedStates){let t=ZN(!1,f.expandedStates,-1);if(f.break){o.push({ind:e,mode:sF,doc:t});break}else for(let r=1;r<f.expandedStates.length+1;r++)if(r>=f.expandedStates.length){o.push({ind:e,mode:sF,doc:t});break}else{let t={ind:e,mode:cF,doc:f.expandedStates[r]};if(gF(t,o,i,s,n)){o.push(t);break}}}else o.push({ind:e,mode:sF,doc:f.contents});break}}f.id&&(n[f.id]=ZN(!1,o,-1).mode);break;case HN:{let t=r-a,i=f[uF]??0,{parts:s}=f,c=s.length-i;if(c===0)break;let u=s[i+0],p=s[i+1],m={ind:e,mode:cF,doc:u},h={ind:e,mode:sF,doc:u},g=gF(m,[],t,l.length>0,n,!0);if(c===1){g?o.push(m):o.push(h);break}let _={ind:e,mode:cF,doc:p},v={ind:e,mode:sF,doc:p};if(c===2){g?o.push(_,m):o.push(v,h);break}let y=s[i+2],b={ind:e,mode:d,doc:{...f,[uF]:i+2}};gF({ind:e,mode:cF,doc:[u,p,y]},[],t,l.length>0,n,!0)?o.push(b,_,m):g?o.push(b,v,m):o.push(b,v,h);break}case UN:case WN:{let t=f.groupId?n[f.groupId]:d;if(t===sF){let t=f.type===UN?f.breakContents:f.negate?f.contents:OP(f.contents);t&&o.push({ind:e,mode:d,doc:t})}if(t===cF){let t=f.type===UN?f.flatContents:f.negate?OP(f.contents):f.contents;t&&o.push({ind:e,mode:d,doc:t})}break}case GN:l.push({ind:e,mode:d,doc:f.contents});break;case KN:l.length>0&&o.push({ind:e,mode:d,doc:HP});break;case qN:switch(d){case cF:if(f.hard)c=!0;else{f.soft||(s.push(` `),a+=1);break}case sF:if(l.length>0){o.push({ind:e,mode:d,doc:f},...l.reverse()),l.length=0;break}f.literal?e.root?(s.push(i,e.root.value),a=e.root.length):(s.push(i),a=0):(a-=hF(s),s.push(i+e.value),a=e.length);break}break;case JN:o.push({ind:e,mode:d,doc:f.contents});break;case YN:break;default:throw new rP(f)}o.length===0&&l.length>0&&(o.push(...l.reverse()),l.length=0)}let d=s.indexOf(lF);if(d!==-1){let e=s.indexOf(lF,d+1);if(e===-1)return{formatted:s.filter(e=>e!==lF).join(``)};let t=s.slice(0,d).join(``),n=s.slice(d+1,e).join(``),r=s.slice(e+1).join(``);return{formatted:t+n+r,cursorNodeStart:t.length,cursorNodeText:n}}return{formatted:s.join(``)}}function vF(e,t,n=0){let r=0;for(let i=n;i<e.length;++i)e[i]===` `?r=r+t-r%t:r++;return r}var yF=vF,bF,xF,SF,CF=class{constructor(e){wN(this,bF),this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return ZN(!1,e,t===null?-2:-4)??null}get index(){return this.siblings===null?null:ZN(!1,this.stack,-2)}get node(){return ZN(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:e}=this,t=ZN(!1,e,-3);return Array.isArray(t)?t:null}get next(){let{siblings:e}=this;return e===null?null:e[this.index+1]}get previous(){let{siblings:e}=this;return e===null?null:e[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:e,index:t}=this;return e!==null&&t===e.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...TN(this,bF,SF).call(this)]}getName(){let{stack:e}=this,{length:t}=e;return t>1?ZN(!1,e,-2):null}getValue(){return ZN(!1,this.stack,-1)}getNode(e=0){let t=TN(this,bF,xF).call(this,e);return t===-1?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}call(e,...t){let{stack:n}=this,{length:r}=n,i=ZN(!1,n,-1);for(let e of t)i=i[e],n.push(e,i);try{return e(this)}finally{n.length=r}}callParent(e,t=0){let n=TN(this,bF,xF).call(this,t+1),r=this.stack.splice(n+1);try{return e(this)}finally{this.stack.push(...r)}}each(e,...t){let{stack:n}=this,{length:r}=n,i=ZN(!1,n,-1);for(let e of t)i=i[e],n.push(e,i);try{for(let t=0;t<i.length;++t)n.push(t,i[t]),e(this,t,i),n.length-=2}finally{n.length=r}}map(e,...t){let n=[];return this.each((t,r,i)=>{n[r]=e(t,r,i)},...t),n}match(...e){let t=this.stack.length-1,n=null,r=this.stack[t--];for(let i of e){if(r===void 0)return!1;let e=null;if(typeof n==`number`&&(e=n,n=this.stack[t--],r=this.stack[t--]),i&&!i(r,n,e))return!1;n=this.stack[t--],r=this.stack[t--]}return!0}findAncestor(e){for(let t of TN(this,bF,SF).call(this))if(e(t))return t}hasAncestor(e){for(let t of TN(this,bF,SF).call(this))if(e(t))return!0;return!1}};bF=new WeakSet,xF=function(e){let{stack:t}=this;for(let n=t.length-1;n>=0;n-=2)if(!Array.isArray(t[n])&&--e<0)return n;return-1},SF=function*(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let n=e[t];Array.isArray(n)||(yield n)}};var wF=CF,TF=new Proxy(()=>{},{get:()=>TF}),EF=TF;function DF(e){return typeof e==`object`&&!!e}var OF=DF;function*kF(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=e=>OF(e)&&r(e);for(let t of n(e)){let n=e[t];if(Array.isArray(n))for(let e of n)i(e)&&(yield e);else i(n)&&(yield n)}}function*AF(e,t){let n=[e];for(let e=0;e<n.length;e++){let r=n[e];for(let e of kF(r,t))yield e,n.push(e)}}function jF(e,t){return kF(e,t).next().done}function MF(e){return(t,n,r)=>{let i=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:a}=t,o=n;for(;o>=0&&o<a;){let n=t.charAt(o);if(e instanceof RegExp){if(!e.test(n))return o}else if(!e.includes(n))return o;i?o--:o++}return o===-1||o===a?o:!1}}var NF=MF(/\s/u),PF=MF(` `),FF=MF(`,; `),IF=MF(/[^\n\r]/u);function LF(e,t,n){let r=!!(n!=null&&n.backwards);if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
63
+ `)return t-2;if(i===`
64
+ `||i===`\r`||i===`\u2028`||i===`\u2029`)return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
65
+ `)return t+2;if(i===`
66
+ `||i===`\r`||i===`\u2028`||i===`\u2029`)return t+1}return t}var RF=LF;function zF(e,t,n={}){let r=PF(e,n.backwards?t-1:t,n);return r!==RF(e,r,n)}var BF=zF;function VF(e){return Array.isArray(e)&&e.length>0}var HF=VF,UF=new Set([`tokens`,`comments`,`parent`,`enclosingNode`,`precedingNode`,`followingNode`]),WF=e=>Object.keys(e).filter(e=>!UF.has(e));function GF(e){return e?t=>e(t,UF):WF}var KF=GF;function qF(e){let t=e.type||e.kind||`(unknown type)`,n=String(e.name||e.id&&(typeof e.id==`object`?e.id.name:e.id)||e.key&&(typeof e.key==`object`?e.key.name:e.key)||e.value&&(typeof e.value==`object`?``:String(e.value))||e.operator||``);return n.length>20&&(n=n.slice(0,19)+`…`),t+(n?` `+n:``)}function JF(e,t){(e.comments??=[]).push(t),t.printed=!1,t.nodeDescription=qF(e)}function YF(e,t){t.leading=!0,t.trailing=!1,JF(e,t)}function XF(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),JF(e,t)}function ZF(e,t){t.leading=!1,t.trailing=!0,JF(e,t)}var QF=new WeakMap;function $F(e,t){if(QF.has(e))return QF.get(e);let{printer:{getCommentChildNodes:n,canAttachComment:r,getVisitorKeys:i},locStart:a,locEnd:o}=t;if(!r)return[];let s=(n?.(e,t)??[...kF(e,{getVisitorKeys:KF(i)})]).flatMap(e=>r(e)?[e]:$F(e,t));return s.sort((e,t)=>a(e)-a(t)||o(e)-o(t)),QF.set(e,s),s}function eI(e,t,n,r){let{locStart:i,locEnd:a}=n,o=i(t),s=a(t),c=$F(e,n),l,u,d=0,f=c.length;for(;d<f;){let e=d+f>>1,r=c[e],p=i(r),m=a(r);if(p<=o&&s<=m)return eI(r,t,n,r);if(m<=o){l=r,d=e+1;continue}if(s<=p){u=r,f=e;continue}throw Error(`Comment location overlaps with node location`)}if(r?.type===`TemplateLiteral`){let{quasis:e}=r,i=sI(e,t,n);l&&sI(e,l,n)!==i&&(l=null),u&&sI(e,u,n)!==i&&(u=null)}return{enclosingNode:r,precedingNode:l,followingNode:u}}var tI=()=>!1;function nI(e,t){let{comments:n}=e;if(delete e.comments,!HF(n)||!t.printer.canAttachComment)return;let r=[],{printer:{experimentalFeatures:{avoidAstMutation:i=!1}={},handleComments:a={}},originalText:o}=t,{ownLine:s=tI,endOfLine:c=tI,remaining:l=tI}=a,u=n.map((r,i)=>({...eI(e,r,t),comment:r,text:o,options:t,ast:e,isLastComment:n.length-1===i}));for(let[e,t]of u.entries()){let{comment:n,precedingNode:a,enclosingNode:o,followingNode:d,text:f,options:p,ast:m,isLastComment:h}=t,g;if(i?g=[t]:(n.enclosingNode=o,n.precedingNode=a,n.followingNode=d,g=[n,f,p,m,h]),iI(f,p,u,e))n.placement=`ownLine`,s(...g)||(d?YF(d,n):a?ZF(a,n):XF(o||m,n));else if(aI(f,p,u,e))n.placement=`endOfLine`,c(...g)||(a?ZF(a,n):d?YF(d,n):XF(o||m,n));else if(n.placement=`remaining`,!l(...g))if(a&&d){let e=r.length;e>0&&r[e-1].followingNode!==d&&oI(r,p),r.push(t)}else a?ZF(a,n):d?YF(d,n):XF(o||m,n)}if(oI(r,t),!i)for(let e of n)delete e.precedingNode,delete e.enclosingNode,delete e.followingNode}var rI=e=>!/[\S\n\u2028\u2029]/u.test(e);function iI(e,t,n,r){let{comment:i,precedingNode:a}=n[r],{locStart:o,locEnd:s}=t,c=o(i);if(a)for(let t=r-1;t>=0;t--){let{comment:r,precedingNode:i}=n[t];if(i!==a||!rI(e.slice(s(r),c)))break;c=o(r)}return BF(e,c,{backwards:!0})}function aI(e,t,n,r){let{comment:i,followingNode:a}=n[r],{locStart:o,locEnd:s}=t,c=s(i);if(a)for(let t=r+1;t<n.length;t++){let{comment:r,followingNode:i}=n[t];if(i!==a||!rI(e.slice(c,o(r))))break;c=s(r)}return BF(e,c)}function oI(e,t){var n;let r=e.length;if(r===0)return;let{precedingNode:i,followingNode:a}=e[0],o=t.locStart(a),s;for(s=r;s>0;--s){let{comment:r,precedingNode:c,followingNode:l}=e[s-1];EF.strictEqual(c,i),EF.strictEqual(l,a);let u=t.originalText.slice(t.locEnd(r),o);if((n=t.printer).isGap?.call(n,u,t)??/^[\s(]*$/u.test(u))o=t.locStart(r);else break}for(let[t,{comment:n}]of e.entries())t<s?ZF(i,n):YF(a,n);for(let e of[i,a])e.comments&&e.comments.length>1&&e.comments.sort((e,n)=>t.locStart(e)-t.locStart(n));e.length=0}function sI(e,t,n){let r=n.locStart(t)-1;for(let t=1;t<e.length;++t)if(r<n.locStart(e[t]))return t-1;return 0}function cI(e,t){let n=t-1;n=PF(e,n,{backwards:!0}),n=RF(e,n,{backwards:!0}),n=PF(e,n,{backwards:!0});let r=RF(e,n,{backwards:!0});return n!==r}var lI=cI;function uI(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function dI(e,t){let n=e.node,r=[uI(e,t)],{printer:i,originalText:a,locStart:o,locEnd:s}=t;if(i.isBlockComment?.call(i,n)){let e=BF(a,s(n))?BF(a,o(n),{backwards:!0})?KP:WP:` `;r.push(e)}else r.push(KP);let c=RF(a,PF(a,s(n)));return c!==!1&&BF(a,c)&&r.push(KP),r}function fI(e,t,n){let r=e.node,i=uI(e,t),{printer:a,originalText:o,locStart:s}=t,c=a.isBlockComment?.call(a,r);return n!=null&&n.hasLineSuffix&&!(n!=null&&n.isBlock)||BF(o,s(r),{backwards:!0})?{doc:RP([KP,lI(o,s(r))?KP:``,i]),isBlock:c,hasLineSuffix:!0}:!c||n!=null&&n.hasLineSuffix?{doc:[RP([` `,i]),BP],isBlock:c,hasLineSuffix:!0}:{doc:[` `,i],isBlock:c,hasLineSuffix:!1}}function pI(e,t){let n=e.node;if(!n)return{};let r=t[Symbol.for(`printedComments`)];if((n.comments||[]).filter(e=>!r.has(e)).length===0)return{leading:``,trailing:``};let i=[],a=[],o;return e.each(()=>{let n=e.node;if(r!=null&&r.has(n))return;let{leading:s,trailing:c}=n;s?i.push(dI(e,t)):c&&(o=fI(e,t,o),a.push(o.doc))},`comments`),{leading:i,trailing:a}}function mI(e,t,n){let{leading:r,trailing:i}=pI(e,n);return!r&&!i?t:CP(t,e=>[r,e,i])}function hI(e){let{[Symbol.for(`comments`)]:t,[Symbol.for(`printedComments`)]:n}=e;for(let e of t){if(!e.printed&&!n.has(e))throw Error(`Comment "`+e.value.trim()+`" was not printed. Please report this error!`);delete e.printed}}function gI(e){return()=>{}}var _I=gI,vI=class extends Error{name=`ConfigError`},yI=class extends Error{name=`UndefinedParserError`},bI={checkIgnorePragma:{category:`Special`,type:`boolean`,default:!1,description:`Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.`,cliCategory:`Other`},cursorOffset:{category:`Special`,type:`int`,default:-1,range:{start:-1,end:1/0,step:1},description:`Print (to stderr) where a cursor at the given position would move to after formatting.`,cliCategory:`Editor`},endOfLine:{category:`Global`,type:`choice`,default:`lf`,description:`Which end of line characters to apply.`,choices:[{value:`lf`,description:`Line Feed only (\\n), common on Linux and macOS as well as inside git repos`},{value:`crlf`,description:`Carriage Return + Line Feed characters (\\r\\n), common on Windows`},{value:`cr`,description:`Carriage Return character only (\\r), used very rarely`},{value:`auto`,description:`Maintain existing
67
+ (mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:`Special`,type:`path`,description:`Specify the input filepath. This will be used to do parser inference.`,cliName:`stdin-filepath`,cliCategory:`Other`,cliDescription:`Path to the file to pretend that stdin comes from.`},insertPragma:{category:`Special`,type:`boolean`,default:!1,description:`Insert @format pragma into file's first docblock comment.`,cliCategory:`Other`},parser:{category:`Global`,type:`choice`,default:void 0,description:`Which parser to use.`,exception:e=>typeof e==`string`||typeof e==`function`,choices:[{value:`flow`,description:`Flow`},{value:`babel`,description:`JavaScript`},{value:`babel-flow`,description:`Flow`},{value:`babel-ts`,description:`TypeScript`},{value:`typescript`,description:`TypeScript`},{value:`acorn`,description:`JavaScript`},{value:`espree`,description:`JavaScript`},{value:`meriyah`,description:`JavaScript`},{value:`css`,description:`CSS`},{value:`less`,description:`Less`},{value:`scss`,description:`SCSS`},{value:`json`,description:`JSON`},{value:`json5`,description:`JSON5`},{value:`jsonc`,description:`JSON with Comments`},{value:`json-stringify`,description:`JSON.stringify`},{value:`graphql`,description:`GraphQL`},{value:`markdown`,description:`Markdown`},{value:`mdx`,description:`MDX`},{value:`vue`,description:`Vue`},{value:`yaml`,description:`YAML`},{value:`glimmer`,description:`Ember / Handlebars`},{value:`html`,description:`HTML`},{value:`angular`,description:`Angular`},{value:`lwc`,description:`Lightning Web Components`},{value:`mjml`,description:`MJML`}]},plugins:{type:`path`,array:!0,default:[{value:[]}],category:`Global`,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e==`string`||typeof e==`object`,cliName:`plugin`,cliCategory:`Config`},printWidth:{category:`Global`,type:`int`,default:80,description:`The line length where Prettier will try wrap.`,range:{start:0,end:1/0,step:1}},rangeEnd:{category:`Special`,type:`int`,default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive).
68
+ The range will extend forwards to the end of the selected statement.`,cliCategory:`Editor`},rangeStart:{category:`Special`,type:`int`,default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset.
69
+ The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:`Editor`},requirePragma:{category:`Special`,type:`boolean`,default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.`,cliCategory:`Other`},tabWidth:{type:`int`,category:`Global`,default:2,description:`Number of spaces per indentation level.`,range:{start:0,end:1/0,step:1}},useTabs:{category:`Global`,type:`boolean`,default:!1,description:`Indent with tabs instead of spaces.`},embeddedLanguageFormatting:{category:`Global`,type:`choice`,default:`auto`,description:`Control how Prettier formats quoted code embedded in the file.`,choices:[{value:`auto`,description:`Format embedded code if Prettier can automatically identify it.`},{value:`off`,description:`Never automatically format embedded code.`}]}};function xI({plugins:e=[],showDeprecated:t=!1}={}){let n=e.flatMap(e=>e.languages??[]),r=[];for(let i of CI(Object.assign({},...e.map(({options:e})=>e),bI)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(e=>!e.deprecated)),i.name===`parser`&&(i.choices=[...i.choices,...SI(i.choices,n,e)])),i.pluginDefaults=Object.fromEntries(e.filter(e=>e.defaultOptions?.[i.name]!==void 0).map(e=>[e.name,e.defaultOptions[i.name]])),r.push(i));return{languages:n,options:r}}function*SI(e,t,n){let r=new Set(e.map(e=>e.value));for(let e of t)if(e.parsers){for(let t of e.parsers)if(!r.has(t)){r.add(t);let i=n.find(e=>e.parsers&&Object.prototype.hasOwnProperty.call(e.parsers,t)),a=e.name;i!=null&&i.name&&(a+=` (plugin: ${i.name})`),yield{value:t,description:a}}}}function CI(e){let t=[];for(let[n,r]of Object.entries(e)){let e={name:n,...r};Array.isArray(e.default)&&(e.default=ZN(!1,e.default,-1).value),t.push(e)}return t}var wI=(e,t)=>{if(!(e&&t==null))return t.toReversed||!Array.isArray(t)?t.toReversed():[...t].reverse()},TI=globalThis.Deno?.build.os===`windows`||(globalThis.navigator?.platform)?.startsWith(`Win`)||(globalThis.process?.platform)?.startsWith(`win`)||!1;function EI(e){if(e=e instanceof URL?e:new URL(e),e.protocol!==`file:`)throw TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function DI(e){return e=EI(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,`%25`))}function OI(e){e=EI(e);let t=decodeURIComponent(e.pathname.replace(/\//g,`\\`).replace(/%(?![0-9A-Fa-f]{2})/g,`%25`)).replace(/^\\*([A-Za-z]:)(\\|$)/,`$1\\`);return e.hostname!==``&&(t=`\\\\${e.hostname}${t}`),t}function kI(e){return TI?OI(e):DI(e)}var AI=kI,jI=e=>String(e).split(/[/\\]/u).pop();function MI(e,t){if(!t)return;let n=jI(t).toLowerCase();return e.find(({filenames:e})=>e?.some(e=>e.toLowerCase()===n))??e.find(({extensions:e})=>e?.some(e=>n.endsWith(e)))}function NI(e,t){if(t)return e.find(({name:e})=>e.toLowerCase()===t)??e.find(({aliases:e})=>e?.includes(t))??e.find(({extensions:e})=>e?.includes(`.${t}`))}function PI(e,t){if(t){if(String(t).startsWith(`file:`))try{t=AI(t)}catch{return}if(typeof t==`string`)return e.find(({isSupported:e})=>e?.({filepath:t}))}}function FI(e,t){let n=wI(!1,e.plugins).flatMap(e=>e.languages??[]);return(NI(n,t.language)??MI(n,t.physicalFile)??MI(n,t.file)??PI(n,t.physicalFile)??PI(n,t.file)??(t.physicalFile,void 0))?.parsers[0]}var II=FI,LI={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(typeof e!=`object`||!e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(e=>LI.value(e)).join(`, `)}]`;let t=Object.keys(e);return t.length===0?`{}`:`{ ${t.map(t=>`${LI.key(t)}: ${LI.value(e[t])}`).join(`, `)} }`},pair:({key:e,value:t})=>LI.value({[e]:t})},RI=new Proxy(String,{get:()=>RI}),zI=RI,BI=(e,t,{descriptor:n})=>{let r=[`${zI.yellow(typeof e==`string`?n.key(e):n.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${zI.blue(typeof t==`string`?n.key(t):n.pair(t))}`),r.join(`; `)+`.`},VI=Symbol.for(`vnopts.VALUE_NOT_EXIST`),HI=Symbol.for(`vnopts.VALUE_UNCHANGED`),UI=` `.repeat(2),WI=(e,t,n)=>{let{text:r,list:i}=n.normalizeExpectedResult(n.schemas[e].expected(n)),a=[];return r&&a.push(GI(e,t,r,n.descriptor)),i&&a.push([GI(e,t,i.title,n.descriptor)].concat(i.values.map(e=>KI(e,n.loggerPrintWidth))).join(`
70
+ `)),qI(a,n.loggerPrintWidth)};function GI(e,t,n,r){return[`Invalid ${zI.red(r.key(e))} value.`,`Expected ${zI.blue(n)},`,`but received ${t===VI?zI.gray(`nothing`):zI.red(r.value(t))}.`].join(` `)}function KI({text:e,list:t},n){let r=[];return e&&r.push(`- ${zI.blue(e)}`),t&&r.push([`- ${zI.blue(t.title)}:`].concat(t.values.map(e=>KI(e,n-UI.length).replace(/^|\n/g,`$&${UI}`))).join(`
71
+ `)),qI(r,n)}function qI(e,t){if(e.length===1)return e[0];let[n,r]=e,[i,a]=e.map(e=>e.split(`
72
+ `,1)[0].length);return i>t&&i>a?r:n}var JI=[],YI=[];function XI(e,t){if(e===t)return 0;let n=e;e.length>t.length&&(e=t,t=n);let r=e.length,i=t.length;for(;r>0&&e.charCodeAt(~-r)===t.charCodeAt(~-i);)r--,i--;let a=0;for(;a<r&&e.charCodeAt(a)===t.charCodeAt(a);)a++;if(r-=a,i-=a,r===0)return i;let o,s,c,l,u=0,d=0;for(;u<r;)YI[u]=e.charCodeAt(a+u),JI[u]=++u;for(;d<i;)for(o=t.charCodeAt(a+d),c=d++,s=d,u=0;u<r;u++)l=o===YI[u]?c:c+1,c=JI[u],s=JI[u]=c>s?l>s?s+1:l:l>c?c+1:l;return s}var ZI=(e,t,{descriptor:n,logger:r,schemas:i})=>{let a=[`Ignored unknown option ${zI.yellow(n.pair({key:e,value:t}))}.`],o=Object.keys(i).sort().find(t=>XI(e,t)<3);o&&a.push(`Did you mean ${zI.blue(n.key(o))}?`),r.warn(a.join(` `))},QI=[`default`,`expected`,`validate`,`deprecated`,`forward`,`redirect`,`overlap`,`preprocess`,`postprocess`];function $I(e,t){let n=new e(t),r=Object.create(n);for(let e of QI)e in t&&(r[e]=tL(t[e],n,eL.prototype[e].length));return r}var eL=class{static create(e){return $I(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return`nothing`}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,n){return e}preprocess(e,t){return e}postprocess(e,t){return HI}};function tL(e,t,n){return typeof e==`function`?(...r)=>e(...r.slice(0,n-1),t,...r.slice(n-1)):()=>e}var nL=class extends eL{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},rL=class extends eL{expected(){return`anything`}validate(){return!0}},iL=class extends eL{constructor({valueSchema:e,name:t=e.name,...n}){super({...n,name:t}),this._valueSchema=e}expected(e){let{text:t,list:n}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:n&&{title:`an array of the following values`,values:[{list:n}]}}}validate(e,t){if(!Array.isArray(e))return!1;let n=[];for(let r of e){let e=t.normalizeValidateResult(this._valueSchema.validate(r,t),r);e!==!0&&n.push(e.value)}return n.length===0?!0:{value:n}}deprecated(e,t){let n=[];for(let r of e){let e=t.normalizeDeprecatedResult(this._valueSchema.deprecated(r,t),r);e!==!1&&n.push(...e.map(({value:e})=>({value:[e]})))}return n}forward(e,t){let n=[];for(let r of e){let e=t.normalizeForwardResult(this._valueSchema.forward(r,t),r);n.push(...e.map(aL))}return n}redirect(e,t){let n=[],r=[];for(let i of e){let e=t.normalizeRedirectResult(this._valueSchema.redirect(i,t),i);`remain`in e&&n.push(e.remain),r.push(...e.redirect.map(aL))}return n.length===0?{redirect:r}:{redirect:r,remain:n}}overlap(e,t){return e.concat(t)}};function aL({from:e,to:t}){return{from:[e],to:t}}var oL=class extends eL{expected(){return`true or false`}validate(e){return typeof e==`boolean`}};function sL(e,t){let n=Object.create(null);for(let r of e){let e=r[t];if(n[e])throw Error(`Duplicate ${t} ${JSON.stringify(e)}`);n[e]=r}return n}function cL(e,t){let n=new Map;for(let r of e){let e=r[t];if(n.has(e))throw Error(`Duplicate ${t} ${JSON.stringify(e)}`);n.set(e,r)}return n}function lL(){let e=Object.create(null);return t=>{let n=JSON.stringify(t);return e[n]?!0:(e[n]=!0,!1)}}function uL(e,t){let n=[],r=[];for(let i of e)t(i)?n.push(i):r.push(i);return[n,r]}function dL(e){return e===Math.floor(e)}function fL(e,t){if(e===t)return 0;let n=typeof e,r=typeof t,i=[`undefined`,`object`,`boolean`,`number`,`string`];return n===r?n===`string`?e.localeCompare(t):Number(e)-Number(t):i.indexOf(n)-i.indexOf(r)}function pL(e){return(...t)=>{let n=e(...t);return typeof n==`string`?Error(n):n}}function mL(e){return e===void 0?{}:e}function hL(e){if(typeof e==`string`)return{text:e};let{text:t,list:n}=e;return xL((t||n)!==void 0,"Unexpected `expected` result, there should be at least one field."),n?{text:t,list:{title:n.title,values:n.values.map(hL)}}:{text:t}}function gL(e,t){return e===!0?!0:e===!1?{value:t}:e}function _L(e,t,n=!1){return e===!1?!1:e===!0?n?!0:[{value:t}]:`value`in e?[e]:e.length===0?!1:e}function vL(e,t){return typeof e==`string`||`key`in e?{from:t,to:e}:`from`in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function yL(e,t){return e===void 0?[]:Array.isArray(e)?e.map(e=>vL(e,t)):[vL(e,t)]}function bL(e,t){let n=yL(typeof e==`object`&&`redirect`in e?e.redirect:e,t);return n.length===0?{remain:t,redirect:n}:typeof e==`object`&&`remain`in e?{remain:e.remain,redirect:n}:{redirect:n}}function xL(e,t){if(!e)throw Error(t)}var SL=class extends eL{constructor(e){super(e),this._choices=cL(e.choices.map(e=>e&&typeof e==`object`?e:{value:e}),`value`)}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map(e=>this._choices.get(e)).filter(({hidden:e})=>!e).map(e=>e.value).sort(fL).map(e.value),n=t.slice(0,-2),r=t.slice(-2);return{text:n.concat(r.join(` or `)).join(`, `),list:{title:`one of the following values`,values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return t&&t.deprecated?{value:e}:!1}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},CL=class extends eL{expected(){return`a number`}validate(e,t){return typeof e==`number`}},wL=class extends CL{expected(){return`an integer`}validate(e,t){return t.normalizeValidateResult(super.validate(e,t),e)===!0&&dL(e)}},TL=class extends eL{expected(){return`a string`}validate(e){return typeof e==`string`}},EL=LI,DL=ZI,OL=WI,kL=BI,AL=class{constructor(e,t){let{logger:n=console,loggerPrintWidth:r=80,descriptor:i=EL,unknown:a=DL,invalid:o=OL,deprecated:s=kL,missing:c=()=>!1,required:l=()=>!1,preprocess:u=e=>e,postprocess:d=()=>HI}=t||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:r,schemas:sL(e,`name`),normalizeDefaultResult:mL,normalizeExpectedResult:hL,normalizeDeprecatedResult:_L,normalizeForwardResult:yL,normalizeRedirectResult:bL,normalizeValidateResult:gL},this._unknownHandler=a,this._invalidHandler=pL(o),this._deprecatedHandler=s,this._identifyMissing=(e,t)=>!(e in t)||c(e,t),this._identifyRequired=l,this._preprocess=u,this._postprocess=d,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=lL()}normalize(e){let t={},n=[this._preprocess(e,this._utils)],r=()=>{for(;n.length!==0;){let e=n.shift(),r=this._applyNormalization(e,t);n.push(...r)}};r();for(let e of Object.keys(this._utils.schemas)){let r=this._utils.schemas[e];if(!(e in t)){let t=mL(r.default(this._utils));`value`in t&&n.push({[e]:t.value})}}r();for(let e of Object.keys(this._utils.schemas)){if(!(e in t))continue;let n=this._utils.schemas[e],r=t[e],i=n.postprocess(r,this._utils);i!==HI&&(this._applyValidation(i,e,n),t[e]=i)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let n=[],{knownKeys:r,unknownKeys:i}=this._partitionOptionKeys(e);for(let i of r){let r=this._utils.schemas[i],a=r.preprocess(e[i],this._utils);this._applyValidation(a,i,r);let o=({from:e,to:t})=>{n.push(typeof t==`string`?{[t]:e}:{[t.key]:t.value})},s=({value:e,redirectTo:t})=>{let n=_L(r.deprecated(e,this._utils),a,!0);if(n!==!1)if(n===!0)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,t,this._utils));else for(let{value:e}of n){let n={key:i,value:e};if(!this._hasDeprecationWarned(n)){let r=typeof t==`string`?{key:t,value:e}:t;this._utils.logger.warn(this._deprecatedHandler(n,r,this._utils))}}};yL(r.forward(a,this._utils),a).forEach(o);let c=bL(r.redirect(a,this._utils),a);if(c.redirect.forEach(o),`remain`in c){let e=c.remain;t[i]=i in t?r.overlap(t[i],e,this._utils):e,s({value:e})}for(let{from:e,to:t}of c.redirect)s({value:e,redirectTo:t})}for(let r of i){let i=e[r];this._applyUnknownHandler(r,i,t,(e,t)=>{n.push({[e]:t})})}return n}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,VI,this._utils)}_partitionOptionKeys(e){let[t,n]=uL(Object.keys(e).filter(t=>!this._identifyMissing(t,e)),e=>e in this._utils.schemas);return{knownKeys:t,unknownKeys:n}}_applyValidation(e,t,n){let r=gL(n.validate(e,this._utils),e);if(r!==!0)throw this._invalidHandler(t,r.value,this._utils)}_applyUnknownHandler(e,t,n,r){let i=this._unknownHandler(e,t,this._utils);if(i)for(let e of Object.keys(i)){if(this._identifyMissing(e,i))continue;let t=i[e];e in this._utils.schemas?r(e,t):n[e]=t}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==HI){if(t.delete)for(let n of t.delete)delete e[n];if(t.override){let{knownKeys:n,unknownKeys:r}=this._partitionOptionKeys(t.override);for(let r of n){let n=t.override[r];this._applyValidation(n,r,this._utils.schemas[r]),e[r]=n}for(let n of r){let r=t.override[n];this._applyUnknownHandler(n,r,e,(t,n)=>{let r=this._utils.schemas[t];this._applyValidation(n,t,r),e[t]=n})}}}}},jL;function ML(e,t,{logger:n=!1,isCLI:r=!1,passThrough:i=!1,FlagSchema:a,descriptor:o}={}){if(r){if(!a)throw Error(`'FlagSchema' option is required.`);if(!o)throw Error(`'descriptor' option is required.`)}else o=LI;let s=i?Array.isArray(i)?(e,t)=>i.includes(e)?{[e]:t}:void 0:(e,t)=>({[e]:t}):(e,t,n)=>{let{_:r,...i}=n.schemas;return ZI(e,t,{...n,schemas:i})},c=new AL(NL(t,{isCLI:r,FlagSchema:a}),{logger:n,unknown:s,descriptor:o}),l=n!==!1;l&&jL&&(c._hasDeprecationWarned=jL);let u=c.normalize(e);return l&&(jL=c._hasDeprecationWarned),u}function NL(e,{isCLI:t,FlagSchema:n}){let r=[];t&&r.push(rL.create({name:`_`}));for(let i of e)r.push(PL(i,{isCLI:t,optionInfos:e,FlagSchema:n})),i.alias&&t&&r.push(nL.create({name:i.alias,sourceName:i.name}));return r}function PL(e,{isCLI:t,optionInfos:n,FlagSchema:r}){let{name:i}=e,a={name:i},o,s={};switch(e.type){case`int`:o=wL,t&&(a.preprocess=Number);break;case`string`:o=TL;break;case`choice`:o=SL,a.choices=e.choices.map(t=>t!=null&&t.redirect?{...t,redirect:{to:{key:e.name,value:t.redirect}}}:t);break;case`boolean`:o=oL;break;case`flag`:o=r,a.flags=n.flatMap(e=>[e.alias,e.description&&e.name,e.oppositeDescription&&`no-${e.name}`].filter(Boolean));break;case`path`:o=TL;break;default:throw Error(`Unexpected type ${e.type}`)}if(e.exception?a.validate=(t,n,r)=>e.exception(t)||n.validate(t,r):a.validate=(e,t,n)=>e===void 0||t.validate(e,n),e.redirect&&(s.redirect=t=>t?{to:typeof e.redirect==`string`?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(s.deprecated=!0),t&&!e.array){let e=a.preprocess||(e=>e);a.preprocess=(t,n,r)=>n.preprocess(e(Array.isArray(t)?ZN(!1,t,-1):t),r)}return e.array?iL.create({...t?{preprocess:e=>Array.isArray(e)?e:[e]}:{},...s,valueSchema:o.create(a)}):o.create({...a,...s})}var FL=ML,IL=(e,t,n)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(n);for(let e=t.length-1;e>=0;e--){let r=t[e];if(n(r,e,t))return r}}};function LL(e,t){if(!t)throw Error(`parserName is required.`);let n=IL(!1,e,e=>e.parsers&&Object.prototype.hasOwnProperty.call(e.parsers,t));if(n)return n;let r=`Couldn't resolve parser "${t}".`;throw r+=` Plugins must be explicitly added to the standalone bundle.`,new vI(r)}function RL(e,t){if(!t)throw Error(`astFormat is required.`);let n=IL(!1,e,e=>e.printers&&Object.prototype.hasOwnProperty.call(e.printers,t));if(n)return n;let r=`Couldn't find plugin for AST format "${t}".`;throw r+=` Plugins must be explicitly added to the standalone bundle.`,new vI(r)}function zL({plugins:e,parser:t}){return BL(LL(e,t),t)}function BL(e,t){let n=e.parsers[t];return typeof n==`function`?n():n}function VL(e,t){let n=e.printers[t];return typeof n==`function`?n():n}var HL={astFormat:`estree`,printer:{},originalText:void 0,locStart:null,locEnd:null};async function UL(e,t={}){var n;let r={...e};if(!r.parser)if(r.filepath){if(r.parser=II(r,{physicalFile:r.filepath}),!r.parser)throw new yI(`No parser could be inferred for file "${r.filepath}".`)}else throw new yI(`No parser and no file path given, couldn't infer a parser.`);let i=xI({plugins:e.plugins,showDeprecated:!0}).options,a={...HL,...Object.fromEntries(i.filter(e=>e.default!==void 0).map(e=>[e.name,e.default]))},o=LL(r.plugins,r.parser),s=await BL(o,r.parser);r.astFormat=s.astFormat,r.locEnd=s.locEnd,r.locStart=s.locStart;let c=(n=o.printers)!=null&&n[s.astFormat]?o:RL(r.plugins,s.astFormat);r.printer=await VL(c,s.astFormat);let l=c.defaultOptions?Object.fromEntries(Object.entries(c.defaultOptions).filter(([,e])=>e!==void 0)):{},u={...a,...l};for(let[e,t]of Object.entries(u))(r[e]===null||r[e]===void 0)&&(r[e]=t);return r.parser===`json`&&(r.trailingComma=`none`),FL(r,i,{passThrough:Object.keys(HL),...t})}var WL=UL,GL=SN(EN(),1);async function KL(e,t){let n=await zL(t),r=n.preprocess?n.preprocess(e,t):e;t.originalText=r;let i;try{i=await n.parse(r,t,t)}catch(t){qL(t,e)}return{text:r,ast:i}}function qL(e,t){let{loc:n}=e;if(n){let r=(0,GL.codeFrameColumns)(t,n,{highlightCode:!0});throw e.message+=`
73
+ `+r,e.codeFrame=r,e}throw e}var JL=KL;async function YL(e,t,n,r,i){let{embeddedLanguageFormatting:a,printer:{embed:o,hasPrettierIgnore:s=()=>!1,getVisitorKeys:c}}=n;if(!o||a!==`auto`)return;if(o.length>2)throw Error(`printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed`);let l=KF(o.getVisitorKeys??c),u=[];p();let d=e.stack;for(let{print:r,node:a,pathStack:o}of u)try{e.stack=o;let s=await r(f,t,e,n);s&&i.set(a,s)}catch(e){if(globalThis.PRETTIER_DEBUG)throw e}e.stack=d;function f(e,t){return XL(e,t,n,r)}function p(){let{node:t}=e;if(typeof t!=`object`||!t||s(e))return;for(let n of l(t))Array.isArray(t[n])?e.each(p,n):e.call(p,n);let r=o(e,n);if(r){if(typeof r==`function`){u.push({print:r,node:t,pathStack:[...e.stack]});return}i.set(t,r)}}}async function XL(e,t,n,r){let i=await WL({...n,...t,parentParser:n.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:a}=await JL(e,i);return _P(await r(a,i))}function ZL(e,t){let{originalText:n,[Symbol.for(`comments`)]:r,locStart:i,locEnd:a,[Symbol.for(`printedComments`)]:o}=t,{node:s}=e,c=i(s),l=a(s);for(let e of r)i(e)>=c&&a(e)<=l&&o.add(e);return n.slice(c,l)}var QL=ZL;async function $L(e,t){({ast:e}=await tR(e,t));let n=new Map,r=new wF(e),i=_I(t),a=new Map;await YL(r,s,t,$L,a);let o=await eR(r,t,s,void 0,a);if(hI(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[JP,o];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[o,JP]}return o;function s(e,t){return e===void 0||e===r?c(t):Array.isArray(e)?r.call(()=>c(t),...e):r.call(()=>c(t),e)}function c(e){i(r);let o=r.node;if(o==null)return``;let c=o&&typeof o==`object`&&e===void 0;if(c&&n.has(o))return n.get(o);let l=eR(r,t,s,e,a);return c&&n.set(o,l),l}}function eR(e,t,n,r,i){var a;let{node:o}=e,{printer:s}=t,c;switch(c=(a=s.hasPrettierIgnore)!=null&&a.call(s,e)?QL(e,t):i.has(o)?i.get(o):s.print(e,t,n,r),o){case t.cursorNode:c=CP(c,e=>[JP,e,JP]);break;case t.nodeBeforeCursor:c=CP(c,e=>[e,JP]);break;case t.nodeAfterCursor:c=CP(c,e=>[JP,e]);break}return s.printComment&&(!s.willPrintOwnComments||!s.willPrintOwnComments(e,t))&&(c=mI(e,c,t)),c}async function tR(e,t){let n=e.comments??[];t[Symbol.for(`comments`)]=n,t[Symbol.for(`printedComments`)]=new Set,nI(e,t);let{printer:{preprocess:r}}=t;return e=r?await r(e,t):e,{ast:e,comments:n}}function nR(e,t){let{cursorOffset:n,locStart:r,locEnd:i}=t,a=KF(t.printer.getVisitorKeys),o=e=>r(e)<=n&&i(e)>=n,s=e,c=[e];for(let t of AF(e,{getVisitorKeys:a,filter:o}))c.push(t),s=t;if(jF(s,{getVisitorKeys:a}))return{cursorNode:s};let l,u,d=-1,f=1/0;for(;c.length>0&&(l===void 0||u===void 0);){s=c.pop();let e=l!==void 0,t=u!==void 0;for(let o of kF(s,{getVisitorKeys:a})){if(!e){let e=i(o);e<=n&&e>d&&(l=o,d=e)}if(!t){let e=r(o);e>=n&&e<f&&(u=o,f=e)}}}return{nodeBeforeCursor:l,nodeAfterCursor:u}}var rR=nR;function iR(e,t){let{printer:{massageAstNode:n,getVisitorKeys:r}}=t;if(!n)return e;let i=KF(r),a=n.ignoredProperties??new Set;return o(e);function o(e,t){if(!(typeof e==`object`&&e))return e;if(Array.isArray(e))return e.map(e=>o(e,t)).filter(Boolean);let r={},s=new Set(i(e));for(let t in e)!Object.prototype.hasOwnProperty.call(e,t)||a.has(t)||(s.has(t)?r[t]=o(e[t],e):r[t]=e[t]);let c=n(e,r,t);if(c!==null)return c??r}}var aR=iR,oR=(e,t,n)=>{if(!(e&&t==null)){if(t.findLastIndex)return t.findLastIndex(n);for(let e=t.length-1;e>=0;e--){let r=t[e];if(n(r,e,t))return e}return-1}},sR=({parser:e})=>e===`json`||e===`json5`||e===`jsonc`||e===`json-stringify`;function cR(e,t){let n=[e.node,...e.parentNodes],r=new Set([t.node,...t.parentNodes]);return n.find(e=>pR.has(e.type)&&r.has(e))}function lR(e){let t=oR(!1,e,e=>e.type!==`Program`&&e.type!==`File`);return t===-1?e:e.slice(0,t+1)}function uR(e,t,{locStart:n,locEnd:r}){let i=e.node,a=t.node;if(i===a)return{startNode:i,endNode:a};let o=n(e.node);for(let e of lR(t.parentNodes))if(n(e)>=o)a=e;else break;let s=r(t.node);for(let t of lR(e.parentNodes)){if(r(t)<=s)i=t;else break;if(i===a)break}return{startNode:i,endNode:a}}function dR(e,t,n,r,i=[],a){let{locStart:o,locEnd:s}=n,c=o(e),l=s(e);if(!(t>l||t<c||a===`rangeEnd`&&t===c||a===`rangeStart`&&t===l)){for(let o of $F(e,n)){let s=dR(o,t,n,r,[e,...i],a);if(s)return s}if(!r||r(e,i[0]))return{node:e,parentNodes:i}}}function fR(e,t){return t!==`DeclareExportDeclaration`&&e!==`TypeParameterDeclaration`&&(e===`Directive`||e===`TypeAlias`||e===`TSExportAssignment`||e.startsWith(`Declare`)||e.startsWith(`TSDeclare`)||e.endsWith(`Statement`)||e.endsWith(`Declaration`))}var pR=new Set([`JsonRoot`,`ObjectExpression`,`ArrayExpression`,`StringLiteral`,`NumericLiteral`,`BooleanLiteral`,`NullLiteral`,`UnaryExpression`,`TemplateLiteral`]),mR=new Set([`OperationDefinition`,`FragmentDefinition`,`VariableDefinition`,`TypeExtensionDefinition`,`ObjectTypeDefinition`,`FieldDefinition`,`DirectiveDefinition`,`EnumTypeDefinition`,`EnumValueDefinition`,`InputValueDefinition`,`InputObjectTypeDefinition`,`SchemaDefinition`,`OperationTypeDefinition`,`InterfaceTypeDefinition`,`UnionTypeDefinition`,`ScalarTypeDefinition`]);function hR(e,t,n){if(!t)return!1;switch(e.parser){case`flow`:case`hermes`:case`babel`:case`babel-flow`:case`babel-ts`:case`typescript`:case`acorn`:case`espree`:case`meriyah`:case`oxc`:case`oxc-ts`:case`__babel_estree`:return fR(t.type,n?.type);case`json`:case`json5`:case`jsonc`:case`json-stringify`:return pR.has(t.type);case`graphql`:return mR.has(t.kind);case`vue`:return t.tag!==`root`}return!1}function gR(e,t,n){let{rangeStart:r,rangeEnd:i,locStart:a,locEnd:o}=t;EF.ok(i>r);let s=e.slice(r,i).search(/\S/u),c=s===-1;if(!c)for(r+=s;i>r&&!/\S/u.test(e[i-1]);--i);let l=dR(n,r,t,(e,n)=>hR(t,e,n),[],`rangeStart`),u=c?l:dR(n,i,t,e=>hR(t,e),[],`rangeEnd`);if(!l||!u)return{rangeStart:0,rangeEnd:0};let d,f;if(sR(t)){let e=cR(l,u);d=e,f=e}else ({startNode:d,endNode:f}=uR(l,u,t));return{rangeStart:Math.min(a(d),a(f)),rangeEnd:Math.max(o(d),o(f))}}var _R=``,vR=Symbol(`cursor`);async function yR(e,t,n=0){if(!e||e.trim().length===0)return{formatted:``,cursorOffset:-1,comments:[]};let{ast:r,text:i}=await JL(e,t);t.cursorOffset>=0&&(t={...t,...rR(r,t)});let a=await $L(r,t,n);n>0&&(a=XP([KP,a],n,t.tabWidth));let o=_F(a,t);if(n>0){let e=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(e),o.cursorNodeStart<0&&(o.cursorNodeStart=0,o.cursorNodeText=o.cursorNodeText.trimStart()),o.cursorNodeStart+o.cursorNodeText.length>e.length&&(o.cursorNodeText=o.cursorNodeText.trimEnd())),o.formatted=e+MN(t.endOfLine)}let s=t[Symbol.for(`comments`)];if(t.cursorOffset>=0){let e,n,r,a;if((t.cursorNode||t.nodeBeforeCursor||t.nodeAfterCursor)&&o.cursorNodeText)if(r=o.cursorNodeStart,a=o.cursorNodeText,t.cursorNode)e=t.locStart(t.cursorNode),n=i.slice(e,t.locEnd(t.cursorNode));else{if(!t.nodeBeforeCursor&&!t.nodeAfterCursor)throw Error(`Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor`);e=t.nodeBeforeCursor?t.locEnd(t.nodeBeforeCursor):0;let r=t.nodeAfterCursor?t.locStart(t.nodeAfterCursor):i.length;n=i.slice(e,r)}else e=0,n=i,r=0,a=o.formatted;let c=t.cursorOffset-e;if(n===a)return{formatted:o.formatted,cursorOffset:r+c,comments:s};let l=n.split(``);l.splice(c,0,vR);let u=AN(l,a.split(``)),d=r;for(let e of u)if(e.removed){if(e.value.includes(vR))break}else d+=e.count;return{formatted:o.formatted,cursorOffset:d,comments:s}}return{formatted:o.formatted,cursorOffset:-1,comments:s}}async function bR(e,t){let{ast:n,text:r}=await JL(e,t),{rangeStart:i,rangeEnd:a}=gR(r,t,n),o=r.slice(i,a),s=Math.min(i,r.lastIndexOf(`
74
+ `,i)+1),c=r.slice(s,i).match(/^\s*/u)[0],l=yF(c,t.tabWidth),u=await yR(o,{...t,rangeStart:0,rangeEnd:1/0,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=a?t.cursorOffset-i:-1,endOfLine:`lf`},l),d=u.formatted.trimEnd(),{cursorOffset:f}=t;f>a?f+=d.length-o.length:u.cursorOffset>=0&&(f=u.cursorOffset+i);let p=r.slice(0,i)+d+r.slice(a);if(t.endOfLine!==`lf`){let e=MN(t.endOfLine);f>=0&&e===`\r
75
+ `&&(f+=NN(p.slice(0,f),`
76
+ `)),p=DN(!1,p,`
77
+ `,e)}return{formatted:p,cursorOffset:f,comments:u.comments}}function xR(e,t,n){return typeof t!=`number`||Number.isNaN(t)||t<0||t>e.length?n:t}function SR(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i}=t;return n=xR(e,n,-1),r=xR(e,r,0),i=xR(e,i,e.length),{...t,cursorOffset:n,rangeStart:r,rangeEnd:i}}function CR(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a}=SR(e,t),o=e.charAt(0)===_R;if(o&&(e=e.slice(1),n--,r--,i--),a===`auto`&&(a=jN(e)),e.includes(`\r`)){let t=t=>NN(e.slice(0,Math.max(t,0)),`\r
78
+ `);n-=t(n),r-=t(r),i-=t(i),e=PN(e)}return{hasBOM:o,text:e,options:SR(e,{...t,cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a})}}async function wR(e,t){let n=await zL(t);return!n.hasPragma||n.hasPragma(e)}async function TR(e,t){let n=await zL(t);return n.hasIgnorePragma?.call(n,e)}async function ER(e,t){let{hasBOM:n,text:r,options:i}=CR(e,await WL(t));if(i.rangeStart>=i.rangeEnd&&r!==``||i.requirePragma&&!await wR(r,i)||i.checkIgnorePragma&&await TR(r,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let a;return i.rangeStart>0||i.rangeEnd<r.length?a=await bR(r,i):(!i.requirePragma&&i.insertPragma&&i.printer.insertPragma&&!await wR(r,i)&&(r=i.printer.insertPragma(r)),a=await yR(r,i)),n&&(a.formatted=_R+a.formatted,a.cursorOffset>=0&&a.cursorOffset++),a}async function DR(e,t,n){let{text:r,options:i}=CR(e,await WL(t)),a=await JL(r,i);return n&&(n.preprocessForPrint&&(a.ast=await tR(a.ast,i)),n.massage&&(a.ast=aR(a.ast,i))),a}async function OR(e,t){return t=await WL(t),_F(await $L(e,t),t)}async function kR(e,t){let{formatted:n}=await ER($P(e),{...t,parser:`__js_expression`});return n}async function AR(e,t){t=await WL(t);let{ast:n}=await JL(e,t);return t.cursorOffset>=0&&(t={...t,...rR(n,t)}),$L(n,t)}async function jR(e,t){return _F(e,await WL(t))}var MR={};bN(MR,{builders:()=>NR,printer:()=>PR,utils:()=>FR});var NR={join:YP,line:WP,softline:GP,hardline:KP,literalline:qP,group:AP,conditionalGroup:PP,fill:FP,lineSuffix:RP,lineSuffixBoundary:zP,cursor:JP,breakParent:BP,ifBreak:IP,trim:VP,indent:OP,indentIfBreak:LP,align:kP,addAlignmentToDoc:XP,markAsRoot:MP,dedentToRoot:jP,dedent:NP,hardlineWithoutBreakParent:HP,literallineWithoutBreakParent:UP,label:ZP,concat:e=>e},PR={printDocToString:_F},FR={willBreak:uP,traverseDoc:oP,findInDoc:cP,mapDoc:sP,removeLines:mP,stripTrailingHardline:_P,replaceEndOfLine:bP,canBreak:SP},IR=`3.6.2`,LR={};bN(LR,{addDanglingComment:()=>XF,addLeadingComment:()=>YF,addTrailingComment:()=>ZF,getAlignmentSize:()=>yF,getIndentSize:()=>qR,getMaxContinuousCount:()=>XR,getNextNonSpaceNonCommentCharacter:()=>QR,getNextNonSpaceNonCommentCharacterIndex:()=>uz,getPreferredQuote:()=>nz,getStringWidth:()=>oF,hasNewline:()=>BF,hasNewlineInRange:()=>iz,hasSpaces:()=>oz,isNextLineEmpty:()=>mz,isNextLineEmptyAfterIndex:()=>GR,isPreviousLineEmpty:()=>fz,makeString:()=>cz,skip:()=>MF,skipEverythingButNewLine:()=>IF,skipInlineComment:()=>zR,skipNewline:()=>RF,skipSpaces:()=>PF,skipToLineEnd:()=>FF,skipTrailingComment:()=>VR,skipWhitespace:()=>NF});function RR(e,t){if(t===!1)return!1;if(e.charAt(t)===`/`&&e.charAt(t+1)===`*`){for(let n=t+2;n<e.length;++n)if(e.charAt(n)===`*`&&e.charAt(n+1)===`/`)return n+2}return t}var zR=RR;function BR(e,t){return t===!1?!1:e.charAt(t)===`/`&&e.charAt(t+1)===`/`?IF(e,t):t}var VR=BR;function HR(e,t){let n=null,r=t;for(;r!==n;)n=r,r=PF(e,r),r=zR(e,r),r=VR(e,r),r=RF(e,r);return r}var UR=HR;function WR(e,t){let n=null,r=t;for(;r!==n;)n=r,r=FF(e,r),r=zR(e,r),r=PF(e,r);return r=VR(e,r),r=RF(e,r),r!==!1&&BF(e,r)}var GR=WR;function KR(e,t){let n=e.lastIndexOf(`
79
+ `);return n===-1?0:yF(e.slice(n+1).match(/^[\t ]*/u)[0],t)}var qR=KR;function JR(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function YR(e,t){let n=e.match(RegExp(`(${JR(t)})+`,`gu`));return n===null?0:n.reduce((e,n)=>Math.max(e,n.length/t.length),0)}var XR=YR;function ZR(e,t){let n=UR(e,t);return n===!1?``:e.charAt(n)}var QR=ZR,$R=`'`,ez=`"`;function tz(e,t){let n=t===!0||t===$R?$R:ez,r=n===$R?ez:$R,i=0,a=0;for(let t of e)t===n?i++:t===r&&a++;return i>a?r:n}var nz=tz;function rz(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
80
+ `)return!0;return!1}var iz=rz;function az(e,t,n={}){return PF(e,n.backwards?t-1:t,n)!==t}var oz=az;function sz(e,t,n){let r=t===`"`?`'`:`"`;return t+DN(!1,e,/\\(.)|(["'])/gsu,(e,i,a)=>i===r?i:a===t?`\\`+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(i)?i:`\\`+i))+t}var cz=sz;function lz(e,t,n){return UR(e,n(t))}function uz(e,t){return arguments.length===2||typeof t==`number`?UR(e,t):lz(...arguments)}function dz(e,t,n){return lI(e,n(t))}function fz(e,t){return arguments.length===2||typeof t==`number`?lI(e,t):dz(...arguments)}function pz(e,t,n){return GR(e,n(t))}function mz(e,t){return arguments.length===2||typeof t==`number`?GR(e,t):pz(...arguments)}function hz(e,t=1){return async(...n)=>{let r=n[t]??{},i=r.plugins??[];return n[t]={...r,plugins:Array.isArray(i)?i:Object.values(i)},e(...n)}}var gz=hz(ER);async function _z(e,t){let{formatted:n}=await gz(e,{...t,cursorOffset:-1});return n}async function vz(e,t){return await _z(e,t)===e}var yz=hz(xI,0),bz={parse:hz(DR),formatAST:hz(OR),formatDoc:hz(kR),printToDoc:hz(AR),printDocToString:hz(jR)},xz;(function(e){e.Root=`root`,e.Text=`text`,e.Directive=`directive`,e.Comment=`comment`,e.Script=`script`,e.Style=`style`,e.Tag=`tag`,e.CDATA=`cdata`,e.Doctype=`doctype`})(xz||={});function Sz(e){return e.type===xz.Tag||e.type===xz.Script||e.type===xz.Style}const Cz=xz.Root,wz=xz.Text,Tz=xz.Directive,Ez=xz.Comment,Dz=xz.Script,Oz=xz.Style,kz=xz.Tag,Az=xz.CDATA,jz=xz.Doctype;var Mz=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(e){this.parent=e}get previousSibling(){return this.prev}set previousSibling(e){this.prev=e}get nextSibling(){return this.next}set nextSibling(e){this.next=e}cloneNode(e=!1){return qz(this,e)}},Nz=class extends Mz{constructor(e){super(),this.data=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e}},Pz=class extends Nz{constructor(){super(...arguments),this.type=xz.Text}get nodeType(){return 3}},Fz=class extends Nz{constructor(){super(...arguments),this.type=xz.Comment}get nodeType(){return 8}},Iz=class extends Nz{constructor(e,t){super(t),this.name=e,this.type=xz.Directive}get nodeType(){return 1}},Lz=class extends Mz{constructor(e){super(),this.children=e}get firstChild(){return this.children[0]??null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(e){this.children=e}},Rz=class extends Lz{constructor(){super(...arguments),this.type=xz.CDATA}get nodeType(){return 4}},zz=class extends Lz{constructor(){super(...arguments),this.type=xz.Root}get nodeType(){return 9}},Bz=class extends Lz{constructor(e,t,n=[],r=e===`script`?xz.Script:e===`style`?xz.Style:xz.Tag){super(n),this.name=e,this.attribs=t,this.type=r}get nodeType(){return 1}get tagName(){return this.name}set tagName(e){this.name=e}get attributes(){return Object.keys(this.attribs).map(e=>({name:e,value:this.attribs[e],namespace:this[`x-attribsNamespace`]?.[e],prefix:this[`x-attribsPrefix`]?.[e]}))}};function Vz(e){return Sz(e)}function Hz(e){return e.type===xz.CDATA}function Uz(e){return e.type===xz.Text}function Wz(e){return e.type===xz.Comment}function Gz(e){return e.type===xz.Directive}function Kz(e){return e.type===xz.Root}function qz(e,t=!1){let n;if(Uz(e))n=new Pz(e.data);else if(Wz(e))n=new Fz(e.data);else if(Vz(e)){let r=t?Jz(e.children):[],i=new Bz(e.name,{...e.attribs},r);r.forEach(e=>e.parent=i),e.namespace!=null&&(i.namespace=e.namespace),e[`x-attribsNamespace`]&&(i[`x-attribsNamespace`]={...e[`x-attribsNamespace`]}),e[`x-attribsPrefix`]&&(i[`x-attribsPrefix`]={...e[`x-attribsPrefix`]}),n=i}else if(Hz(e)){let r=t?Jz(e.children):[],i=new Rz(r);r.forEach(e=>e.parent=i),n=i}else if(Kz(e)){let r=t?Jz(e.children):[],i=new zz(r);r.forEach(e=>e.parent=i),e[`x-mode`]&&(i[`x-mode`]=e[`x-mode`]),n=i}else if(Gz(e)){let t=new Iz(e.name,e.data);e[`x-name`]!=null&&(t[`x-name`]=e[`x-name`],t[`x-publicId`]=e[`x-publicId`],t[`x-systemId`]=e[`x-systemId`]),n=t}else throw Error(`Not implemented yet: ${e.type}`);return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function Jz(e){let t=e.map(e=>qz(e,!0));for(let e=1;e<t.length;e++)t[e].prev=t[e-1],t[e-1].next=t[e];return t}var Yz={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},Xz=class{constructor(e,t,n){this.dom=[],this.root=new zz(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof t==`function`&&(n=t,t=Yz),typeof e==`object`&&(t=e,e=void 0),this.callback=e??null,this.options=t??Yz,this.elementCB=n??null}onparserinit(e){this.parser=e}onreset(){this.dom=[],this.root=new zz(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(e){this.handleCallback(e)}onclosetag(){this.lastNode=null;let e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)}onopentag(e,t){let n=new Bz(e,t,void 0,this.options.xmlMode?xz.Tag:void 0);this.addNode(n),this.tagStack.push(n)}ontext(e){let{lastNode:t}=this;if(t&&t.type===xz.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{let t=new Pz(e);this.addNode(t),this.lastNode=t}}oncomment(e){if(this.lastNode&&this.lastNode.type===xz.Comment){this.lastNode.data+=e;return}let t=new Fz(e);this.addNode(t),this.lastNode=t}oncommentend(){this.lastNode=null}oncdatastart(){let e=new Pz(``),t=new Rz([e]);this.addNode(t),e.parent=t,this.lastNode=e}oncdataend(){this.lastNode=null}onprocessinginstruction(e,t){let n=new Iz(e,t);this.addNode(n)}handleCallback(e){if(typeof this.callback==`function`)this.callback(e,this.dom);else if(e)throw e}addNode(e){let t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null}},Zz=/\n/g;function Qz(e){let t=[...e.matchAll(Zz)].map((e=>e.index||0));t.unshift(-1);let n=$z(t,0,t.length);return e=>eB(n,e)}function $z(e,t,n){if(n-t==1)return{offset:e[t],index:t+1};let r=Math.ceil((t+n)/2),i=$z(e,t,r),a=$z(e,r,n);return{offset:i.offset,low:i,high:a}}function eB(e,t){return function(e){return Object.prototype.hasOwnProperty.call(e,`index`)}(e)?{line:e.index,column:t-e.offset}:eB(e.high.offset<t?e.high:e.low,t)}function tB(e,t=``,n={}){let r=typeof t==`string`?n:t,i=typeof t==`string`?t:``,a=e.map(nB),o=!!r.lineNumbers;return function(e,t=0){let n=o?Qz(e):()=>({line:0,column:0}),r=t,s=[];e:for(;r<e.length;){let t=!1;for(let o of a){o.regex.lastIndex=r;let a=o.regex.exec(e);if(a&&a[0].length>0){if(!o.discard){let e=n(r),t=typeof o.replace==`string`?a[0].replace(new RegExp(o.regex.source,o.regex.flags),o.replace):a[0];s.push({state:i,name:o.name,text:t,offset:r,len:a[0].length,line:e.line,column:e.column})}if(r=o.regex.lastIndex,t=!0,o.push){let t=o.push(e,r);s.push(...t.tokens),r=t.offset}if(o.pop)break e;break}}if(!t)break}return{tokens:s,offset:r,complete:e.length<=r}}}function nB(e,t){return{...e,regex:rB(e,t)}}function rB(e,t){if(e.name.length===0)throw Error(`Rule #${t} has empty name, which is not allowed.`);if(function(e){return Object.prototype.hasOwnProperty.call(e,`regex`)}(e))return function(e){if(e.global)throw Error(`Regular expression /${e.source}/${e.flags} contains the global flag, which is not allowed.`);return e.sticky?e:new RegExp(e.source,e.flags+`y`)}(e.regex);if(function(e){return Object.prototype.hasOwnProperty.call(e,`str`)}(e)){if(e.str.length===0)throw Error(`Rule #${t} ("${e.name}") has empty "str" property, which is not allowed.`);return new RegExp(iB(e.str),`y`)}return new RegExp(iB(e.name),`y`)}function iB(e){return e.replace(/[-[\]{}()*+!<=:?./\\^$|#\s,]/g,`\\$&`)}function aB(e,t){return(n,r)=>{let i=r,a;return r<n.tokens.length?(a=e(n.tokens[r],n,r),a!==void 0&&i++):t?.(n,r),a===void 0?{matched:!1}:{matched:!0,position:i,value:a}}}function oB(e,t){return e.matched?{matched:!0,position:e.position,value:t(e.value,e.position)}:e}function sB(e,t){return e.matched?t(e):e}function cB(e,t){return(n,r)=>oB(e(n,r),(e,i)=>t(e,n,r,i))}function lB(e,t){return(n,r)=>{let i=e(n,r);return i.matched?i:{matched:!0,position:r,value:t}}}function uB(...e){return(t,n)=>{for(let r of e){let e=r(t,n);if(e.matched)return e}return{matched:!1}}}function dB(e,t){return(n,r)=>{let i=e(n,r);return i.matched?i:t(n,r)}}function fB(e,t){return(n,r)=>{let i=[],a=!0;do{let o=e(n,r);o.matched&&t(o.value,i.length+1,n,r,o.position)?(i.push(o.value),r=o.position):a=!1}while(a);return{matched:!0,position:r,value:i}}}function pB(e){return fB(e,()=>!0)}function mB(e){return hB(e,pB(e),(e,t)=>[e,...t])}function hB(e,t,n){return(r,i)=>sB(e(r,i),e=>oB(t(r,e.position),(t,a)=>n(e.value,t,r,i,a)))}function gB(e,t){return hB(e,t,e=>e)}function _B(e,t){return hB(e,t,(e,t)=>t)}function vB(e,t,n,r){return(i,a)=>sB(e(i,a),e=>sB(t(i,e.position),t=>oB(n(i,t.position),(n,o)=>r(e.value,t.value,n,i,a,o))))}function yB(e,t,n){return vB(e,t,n,(e,t)=>t)}function bB(...e){return(t,n)=>{let r=[],i=n;for(let n of e){let e=n(t,i);if(e.matched)r.push(e.value),i=e.position;else return{matched:!1}}return{matched:!0,position:i,value:r}}}function xB(...e){return SB(bB(...e))}function SB(e){return cB(e,e=>e.flatMap(e=>e))}function CB(e,t){return(n,r)=>{let i=!0,a=e,o=r;do{let e=t(a,n,o)(n,o);e.matched?(a=e.value,o=e.position):i=!1}while(i);return{matched:!0,position:o,value:a}}}function wB(e,t,n){return CB(e,e=>cB(t,(t,r,i,a)=>n(e,t,r,i,a)))}function TB(e,t,n){return EB(e,e=>wB(e,hB(t,n,(e,t)=>[e,t]),(e,[t,n])=>t(e,n)))}function EB(e,t){return(n,r)=>sB(e(n,r),e=>t(e.value,n,r,e.position)(n,e.position))}var DB=`(?:[ \\t\\r\\n\\f]*)`,OB=`(?:\\n|\\r\\n|\\r|\\f)`,kB=`[^\\x00-\\x7F]`,AB=`(?:\\\\[0-9a-f]{1,6}(?:\\r\\n|[ \\n\\r\\t\\f])?)`,jB=`(?:\\\\[^\\n\\r\\f0-9a-f])`,MB=`(?:[_a-z]|${kB}|${AB}|${jB})`,NB=`(?:[_a-z0-9-]|${kB}|${AB}|${jB})`,PB=`(?:${NB}+)`,FB=`(?:[-]?${MB}${NB}*)`,IB=`'([^\\n\\r\\f\\\\']|\\\\${OB}|${kB}|${AB}|${jB})*'`,LB=`"([^\\n\\r\\f\\\\"]|\\\\${OB}|${kB}|${AB}|${jB})*"`,RB=tB([{name:`ws`,regex:new RegExp(DB)},{name:`hash`,regex:RegExp(`#${PB}`,`i`)},{name:`ident`,regex:new RegExp(FB,`i`)},{name:`str1`,regex:new RegExp(IB,`i`)},{name:`str2`,regex:new RegExp(LB,`i`)},{name:`*`},{name:`.`},{name:`,`},{name:`[`},{name:`]`},{name:`=`},{name:`>`},{name:`|`},{name:`+`},{name:`~`},{name:`^`},{name:`$`}]),zB=tB([{name:`unicode`,regex:new RegExp(AB,`i`)},{name:`escape`,regex:new RegExp(jB,`i`)},{name:`any`,regex:RegExp(`[\\s\\S]`,`i`)}]);function BB([e,t,n],[r,i,a]){return[e+r,t+i,n+a]}function VB(e){return e.reduce(BB,[0,0,0])}var HB=cB(pB(uB(aB(e=>e.name===`unicode`?String.fromCodePoint(parseInt(e.text.slice(1),16)):void 0),aB(e=>e.name===`escape`?e.text.slice(1):void 0),aB(e=>e.name===`any`?e.text:void 0))),e=>e.join(``));function UB(e){return HB({tokens:zB(e).tokens,options:void 0},0).value}function WB(e){return aB(t=>t.name===e?!0:void 0)}var GB=aB(e=>e.name===`ws`?null:void 0),KB=lB(GB,null);function qB(e){return yB(KB,e,KB)}var JB=aB(e=>e.name===`ident`?UB(e.text):void 0),YB=aB(e=>e.name===`hash`?UB(e.text.slice(1)):void 0),XB=aB(e=>e.name.startsWith(`str`)?UB(e.text.slice(1,-1)):void 0),ZB=gB(lB(JB,``),WB(`|`)),QB=dB(hB(ZB,JB,(e,t)=>({name:t,namespace:e})),cB(JB,e=>({name:e,namespace:null}))),$B=dB(hB(ZB,WB(`*`),e=>({type:`universal`,namespace:e,specificity:[0,0,0]})),cB(WB(`*`),()=>({type:`universal`,namespace:null,specificity:[0,0,0]}))),eV=cB(QB,({name:e,namespace:t})=>({type:`tag`,name:e,namespace:t,specificity:[0,0,1]})),tV=hB(WB(`.`),JB,(e,t)=>({type:`class`,name:t,specificity:[0,1,0]})),nV=cB(YB,e=>({type:`id`,name:e,specificity:[1,0,0]})),rV=aB(e=>{if(e.name===`ident`){if(e.text===`i`||e.text===`I`)return`i`;if(e.text===`s`||e.text===`S`)return`s`}}),iV=dB(hB(XB,lB(_B(KB,rV),null),(e,t)=>({value:e,modifier:t})),hB(JB,lB(_B(GB,rV),null),(e,t)=>({value:e,modifier:t}))),aV=uB(cB(WB(`=`),()=>`=`),hB(WB(`~`),WB(`=`),()=>`~=`),hB(WB(`|`),WB(`=`),()=>`|=`),hB(WB(`^`),WB(`=`),()=>`^=`),hB(WB(`$`),WB(`=`),()=>`$=`),hB(WB(`*`),WB(`=`),()=>`*=`)),oV=dB(vB(WB(`[`),qB(QB),WB(`]`),(e,{name:t,namespace:n})=>({type:`attrPresence`,name:t,namespace:n,specificity:[0,1,0]})),yB(WB(`[`),vB(qB(QB),aV,qB(iV),({name:e,namespace:t},n,{value:r,modifier:i})=>({type:`attrValue`,name:e,namespace:t,matcher:n,value:r,modifier:i,specificity:[0,1,0]})),WB(`]`))),sV=dB($B,eV),cV=uB(nV,tV,oV),lV=cB(dB(xB(sV,pB(cV)),mB(cV)),e=>({type:`compound`,list:e,specificity:VB(e.map(e=>e.specificity))})),uV=TB(lV,cB(dB(qB(uB(cB(WB(`>`),()=>`>`),cB(WB(`+`),()=>`+`),cB(WB(`~`),()=>`~`),hB(WB(`|`),WB(`|`),()=>`||`))),cB(GB,()=>` `)),e=>(t,n)=>({type:`compound`,list:[...n.list,{type:`combinator`,combinator:e,left:t,specificity:t.specificity}],specificity:BB(t.specificity,n.specificity)})),lV);TB(cB(uV,e=>({type:`list`,list:[e]})),cB(qB(WB(`,`)),()=>(e,t)=>({type:`list`,list:[...e.list,t]})),uV);function dV(e,t){if(!(typeof t==`string`||t instanceof String))throw Error(`Expected a selector string. Actual input is not a string!`);let n=RB(t);if(!n.complete)throw Error(`The input "${t}" was only partially tokenized, stopped at offset ${n.offset}!\n`+fV(t,n.offset));let r=qB(e)({tokens:n.tokens,options:void 0},0);if(!r.matched)throw Error(`No match for "${t}" input!`);if(r.position<n.tokens.length){let e=n.tokens[r.position];throw Error(`The input "${t}" was only partially parsed, stopped at offset ${e.offset}!\n`+fV(t,e.offset,e.len))}return r.value}function fV(e,t,n=1){return`${e.replace(/(\t)|(\r)|(\n)/g,(e,t,n)=>t?`␉`:n?`␍`:`␊`)}\n${``.padEnd(t)}${`^`.repeat(n)}`}function pV(e){return dV(uV,e)}function mV(e){if(!e.type)throw Error(`This is not an AST node.`);switch(e.type){case`universal`:return hV(e.namespace)+`*`;case`tag`:return hV(e.namespace)+_V(e.name);case`class`:return`.`+_V(e.name);case`id`:return`#`+_V(e.name);case`attrPresence`:return`[${hV(e.namespace)}${_V(e.name)}]`;case`attrValue`:return`[${hV(e.namespace)}${_V(e.name)}${e.matcher}"${vV(e.value)}"${e.modifier?e.modifier:``}]`;case`combinator`:return mV(e.left)+e.combinator;case`compound`:return e.list.reduce((e,t)=>t.type===`combinator`?mV(t)+e:e+mV(t),``);case`list`:return e.list.map(mV).join(`,`)}}function hV(e){return e||e===``?_V(e)+`|`:``}function gV(e){return`\\${e.codePointAt(0).toString(16)} `}function _V(e){return e.replace(/(^[0-9])|(^-[0-9])|(^-$)|([-0-9a-zA-Z_]|[^\x00-\x7F])|(\x00)|([\x01-\x1f]|\x7f)|([\s\S])/g,(e,t,n,r,i,a,o,s)=>t?gV(t):n?`-`+gV(n.slice(1)):r?`\\-`:i||(a?`�`:o?gV(o):`\\`+s))}function vV(e){return e.replace(/(")|(\\)|(\x00)|([\x01-\x1f]|\x7f)/g,(e,t,n,r,i)=>t?`\\"`:n?`\\\\`:r?`�`:gV(i))}function yV(e){if(!e.type)throw Error(`This is not an AST node.`);switch(e.type){case`compound`:e.list.forEach(yV),e.list.sort((e,t)=>SV(bV(e),bV(t)));break;case`combinator`:yV(e.left);break;case`list`:e.list.forEach(yV),e.list.sort((e,t)=>mV(e)<mV(t)?-1:1);break}return e}function bV(e){switch(e.type){case`universal`:return[1];case`tag`:return[1];case`id`:return[2];case`class`:return[3,e.name];case`attrPresence`:return[4,mV(e)];case`attrValue`:return[5,mV(e)];case`combinator`:return[15,mV(e)]}}function xV(e,t){return SV(e,t)}function SV(e,t){if(!Array.isArray(e)||!Array.isArray(t))throw Error(`Arguments must be arrays.`);let n=e.length<t.length?e.length:t.length;for(let r=0;r<n;r++)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return e.length-t.length}var CV=class{constructor(e){this.branches=DV(wV(e))}build(e){return e(this.branches)}};function wV(e){let t=e.length,n=Array(t);for(let r=0;r<t;r++){let[t,i]=e[r],a=TV(pV(t));n[r]={ast:a,terminal:{type:`terminal`,valueContainer:{index:r,value:i,specificity:a.specificity}}}}return n}function TV(e){return EV(e),yV(e),e}function EV(e){let t=[];e.list.forEach(e=>{switch(e.type){case`class`:t.push({matcher:`~=`,modifier:null,name:`class`,namespace:null,specificity:e.specificity,type:`attrValue`,value:e.name});break;case`id`:t.push({matcher:`=`,modifier:null,name:`id`,namespace:null,specificity:e.specificity,type:`attrValue`,value:e.name});break;case`combinator`:EV(e.left),t.push(e);break;case`universal`:break;default:t.push(e);break}}),e.list=t}function DV(e){let t=[];for(;e.length;){let n=zV(e,e=>!0,AV),{matches:r,nonmatches:i,empty:a}=kV(e,n);e=i,r.length&&t.push(jV(n,r)),a.length&&t.push(...OV(a))}return t}function OV(e){let t=[];for(let n of e){let e=n.terminal;if(e.type===`terminal`)t.push(e);else{let{matches:n,rest:r}=BV(e.cont,e=>e.type===`terminal`);n.forEach(e=>t.push(e)),r.length&&(e.cont=r,t.push(e))}}return t}function kV(e,t){let n=[],r=[],i=[];for(let a of e){let e=a.ast.list;e.length?(e.some(e=>AV(e)===t)?n:r).push(a):i.push(a)}return{matches:n,nonmatches:r,empty:i}}function AV(e){switch(e.type){case`attrPresence`:return`attrPresence ${e.name}`;case`attrValue`:return`attrValue ${e.name}`;case`combinator`:return`combinator ${e.combinator}`;default:return e.type}}function jV(e,t){if(e===`tag`)return MV(t);if(e.startsWith(`attrValue `))return PV(e.substring(10),t);if(e.startsWith(`attrPresence `))return NV(e.substring(13),t);if(e===`combinator >`)return IV(`>`,t);if(e===`combinator +`)return IV(`+`,t);throw Error(`Unsupported selector kind: ${e}`)}function MV(e){let t=LV(e,e=>e.type===`tag`,e=>e.name);return{type:`tagName`,variants:Object.entries(t).map(([e,t])=>({type:`variant`,value:e,cont:DV(t.items)}))}}function NV(e,t){for(let n of t)RV(n,t=>t.type===`attrPresence`&&t.name===e);return{type:`attrPresence`,name:e,cont:DV(t)}}function PV(e,t){let n=LV(t,t=>t.type===`attrValue`&&t.name===e,e=>`${e.matcher} ${e.modifier||``} ${e.value}`),r=[];for(let e of Object.values(n)){let t=e.oneSimpleSelector,n=FV(t),i=DV(e.items);r.push({type:`matcher`,matcher:t.matcher,modifier:t.modifier,value:t.value,predicate:n,cont:i})}return{type:`attrValue`,name:e,matchers:r}}function FV(e){if(e.modifier===`i`){let t=e.value.toLowerCase();switch(e.matcher){case`=`:return e=>t===e.toLowerCase();case`~=`:return e=>e.toLowerCase().split(/[ \t]+/).includes(t);case`^=`:return e=>e.toLowerCase().startsWith(t);case`$=`:return e=>e.toLowerCase().endsWith(t);case`*=`:return e=>e.toLowerCase().includes(t);case`|=`:return e=>{let n=e.toLowerCase();return t===n||n.startsWith(t)&&n[t.length]===`-`}}}else{let t=e.value;switch(e.matcher){case`=`:return e=>t===e;case`~=`:return e=>e.split(/[ \t]+/).includes(t);case`^=`:return e=>e.startsWith(t);case`$=`:return e=>e.endsWith(t);case`*=`:return e=>e.includes(t);case`|=`:return e=>t===e||e.startsWith(t)&&e[t.length]===`-`}}}function IV(e,t){let n=LV(t,t=>t.type===`combinator`&&t.combinator===e,e=>mV(e.left)),r=[];for(let e of Object.values(n)){let t=DV(e.items),n=e.oneSimpleSelector.left;r.push({ast:n,terminal:{type:`popElement`,cont:t}})}return{type:`pushElement`,combinator:e,cont:DV(r)}}function LV(e,t,n){let r={};for(;e.length;){let i=zV(e,t,n),a=e=>t(e)&&n(e)===i,{matches:o,rest:s}=VV(e,e=>e.ast.list.some(a)),c=null;for(let e of o){let t=RV(e,a);c||=t}if(c==null)throw Error(`No simple selector is found.`);r[i]={oneSimpleSelector:c,items:o},e=s}return r}function RV(e,t){let n=e.ast.list,r=Array(n.length),i=-1;for(let e=n.length;e-- >0;)t(n[e])&&(r[e]=!0,i=e);if(i==-1)throw Error(`Couldn't find the required simple selector.`);let a=n[i];return e.ast.list=n.filter((e,t)=>!r[t]),a}function zV(e,t,n){let r={};for(let i of e){let e={};for(let r of i.ast.list.filter(t))e[n(r)]=!0;for(let t of Object.keys(e))r[t]?r[t]++:r[t]=1}let i=``,a=0;for(let e of Object.entries(r))e[1]>a&&(i=e[0],a=e[1]);return i}function BV(e,t){let n=[],r=[];for(let i of e)t(i)?n.push(i):r.push(i);return{matches:n,rest:r}}function VV(e,t){let n=[],r=[];for(let i of e)t(i)?n.push(i):r.push(i);return{matches:n,rest:r}}var HV=class{constructor(e){this.f=e}pickAll(e){return this.f(e)}pick1(e,t=!1){let n=this.f(e),r=n.length;if(r===0)return null;if(r===1)return n[0].value;let i=t?UV:WV,a=n[0];for(let e=1;e<r;e++){let t=n[e];i(a,t)&&(a=t)}return a.value}};function UV(e,t){let n=xV(t.specificity,e.specificity);return n>0||n===0&&t.index<e.index}function WV(e,t){let n=xV(t.specificity,e.specificity);return n>0||n===0&&t.index>e.index}function GV(e){return new HV(KV(e))}function KV(e){let t=e.map(qV);return(e,...n)=>t.flatMap(t=>t(e,...n))}function qV(e){switch(e.type){case`terminal`:{let t=[e.valueContainer];return(e,...n)=>t}case`tagName`:return JV(e);case`attrValue`:return XV(e);case`attrPresence`:return YV(e);case`pushElement`:return ZV(e);case`popElement`:return eH(e)}}function JV(e){let t={};for(let n of e.variants)t[n.value]=KV(n.cont);return(e,...n)=>{let r=t[e.name];return r?r(e,...n):[]}}function YV(e){let t=e.name,n=KV(e.cont);return(e,...r)=>Object.prototype.hasOwnProperty.call(e.attribs,t)?n(e,...r):[]}function XV(e){let t=[];for(let n of e.matchers){let e=n.predicate,r=KV(n.cont);t.push((t,n,...i)=>e(t)?r(n,...i):[])}let n=e.name;return(e,...r)=>{let i=e.attribs[n];return i||i===``?t.flatMap(t=>t(i,e,...r)):[]}}function ZV(e){let t=KV(e.cont),n=e.combinator===`+`?QV:$V;return(e,...r)=>{let i=n(e);return i===null?[]:t(i,e,...r)}}var QV=e=>{let t=e.prev;return t===null?null:Vz(t)?t:QV(t)},$V=e=>{let t=e.parent;return t&&Vz(t)?t:null};function eH(e){let t=KV(e.cont);return(e,n,...r)=>t(n,...r)}var tH=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),nH=new Uint16Array(`Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢`.split(``).map(e=>e.charCodeAt(0))),rH=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);const iH=String.fromCodePoint??function(e){let t=``;return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function aH(e){return e>=55296&&e<=57343||e>1114111?65533:rH.get(e)??e}var oH;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(oH||={});var sH=32,cH;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(cH||={});function lH(e){return e>=oH.ZERO&&e<=oH.NINE}function uH(e){return e>=oH.UPPER_A&&e<=oH.UPPER_F||e>=oH.LOWER_A&&e<=oH.LOWER_F}function dH(e){return e>=oH.UPPER_A&&e<=oH.UPPER_Z||e>=oH.LOWER_A&&e<=oH.LOWER_Z||lH(e)}function fH(e){return e===oH.EQUALS||dH(e)}var pH;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(pH||={});var mH;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(mH||={});var hH=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=pH.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=mH.Strict}startEntity(e){this.decodeMode=e,this.state=pH.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case pH.EntityStart:return e.charCodeAt(t)===oH.NUM?(this.state=pH.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=pH.NamedEntity,this.stateNamedEntity(e,t));case pH.NumericStart:return this.stateNumericStart(e,t);case pH.NumericDecimal:return this.stateNumericDecimal(e,t);case pH.NumericHex:return this.stateNumericHex(e,t);case pH.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|sH)===oH.LOWER_X?(this.state=pH.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=pH.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(lH(r)||uH(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(lH(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===oH.SEMI)this.consumed+=1;else if(this.decodeMode===mH.Strict)return 0;return this.emitCodePoint(aH(this.result),this.consumed),this.errors&&(e!==oH.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&cH.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=_H(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===mH.Attribute&&(i===0||fH(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&cH.VALUE_LENGTH)>>14,i!==0){if(a===oH.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==mH.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&cH.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~cH.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case pH.NamedEntity:return this.result!==0&&(this.decodeMode!==mH.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case pH.NumericDecimal:return this.emitNumericEntity(0,2);case pH.NumericHex:return this.emitNumericEntity(0,3);case pH.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case pH.EntityStart:return 0}}};function gH(e){let t=``,n=new hH(e,e=>t+=iH(e));return function(e,r){let i=0,a=0;for(;(a=e.indexOf(`&`,a))>=0;){t+=e.slice(i,a),n.startEntity(r);let o=n.write(e,a+1);if(o<0){i=a+n.end();break}i=a+o,a=o===0?i+1:i}let o=t+e.slice(i);return t=``,o}}function _H(e,t,n,r){let i=(t&cH.BRANCH_LENGTH)>>7,a=t&cH.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}gH(tH),gH(nH);var q;(function(e){e[e.Tab=9]=`Tab`,e[e.NewLine=10]=`NewLine`,e[e.FormFeed=12]=`FormFeed`,e[e.CarriageReturn=13]=`CarriageReturn`,e[e.Space=32]=`Space`,e[e.ExclamationMark=33]=`ExclamationMark`,e[e.Number=35]=`Number`,e[e.Amp=38]=`Amp`,e[e.SingleQuote=39]=`SingleQuote`,e[e.DoubleQuote=34]=`DoubleQuote`,e[e.Dash=45]=`Dash`,e[e.Slash=47]=`Slash`,e[e.Zero=48]=`Zero`,e[e.Nine=57]=`Nine`,e[e.Semi=59]=`Semi`,e[e.Lt=60]=`Lt`,e[e.Eq=61]=`Eq`,e[e.Gt=62]=`Gt`,e[e.Questionmark=63]=`Questionmark`,e[e.UpperA=65]=`UpperA`,e[e.LowerA=97]=`LowerA`,e[e.UpperF=70]=`UpperF`,e[e.LowerF=102]=`LowerF`,e[e.UpperZ=90]=`UpperZ`,e[e.LowerZ=122]=`LowerZ`,e[e.LowerX=120]=`LowerX`,e[e.OpeningSquareBracket=91]=`OpeningSquareBracket`})(q||={});var J;(function(e){e[e.Text=1]=`Text`,e[e.BeforeTagName=2]=`BeforeTagName`,e[e.InTagName=3]=`InTagName`,e[e.InSelfClosingTag=4]=`InSelfClosingTag`,e[e.BeforeClosingTagName=5]=`BeforeClosingTagName`,e[e.InClosingTagName=6]=`InClosingTagName`,e[e.AfterClosingTagName=7]=`AfterClosingTagName`,e[e.BeforeAttributeName=8]=`BeforeAttributeName`,e[e.InAttributeName=9]=`InAttributeName`,e[e.AfterAttributeName=10]=`AfterAttributeName`,e[e.BeforeAttributeValue=11]=`BeforeAttributeValue`,e[e.InAttributeValueDq=12]=`InAttributeValueDq`,e[e.InAttributeValueSq=13]=`InAttributeValueSq`,e[e.InAttributeValueNq=14]=`InAttributeValueNq`,e[e.BeforeDeclaration=15]=`BeforeDeclaration`,e[e.InDeclaration=16]=`InDeclaration`,e[e.InProcessingInstruction=17]=`InProcessingInstruction`,e[e.BeforeComment=18]=`BeforeComment`,e[e.CDATASequence=19]=`CDATASequence`,e[e.InSpecialComment=20]=`InSpecialComment`,e[e.InCommentLike=21]=`InCommentLike`,e[e.BeforeSpecialS=22]=`BeforeSpecialS`,e[e.SpecialStartSequence=23]=`SpecialStartSequence`,e[e.InSpecialTag=24]=`InSpecialTag`,e[e.BeforeEntity=25]=`BeforeEntity`,e[e.BeforeNumericEntity=26]=`BeforeNumericEntity`,e[e.InNamedEntity=27]=`InNamedEntity`,e[e.InNumericEntity=28]=`InNumericEntity`,e[e.InHexEntity=29]=`InHexEntity`})(J||={});function vH(e){return e===q.Space||e===q.NewLine||e===q.Tab||e===q.FormFeed||e===q.CarriageReturn}function yH(e){return e===q.Slash||e===q.Gt||vH(e)}function bH(e){return e>=q.Zero&&e<=q.Nine}function xH(e){return e>=q.LowerA&&e<=q.LowerZ||e>=q.UpperA&&e<=q.UpperZ}function SH(e){return e>=q.UpperA&&e<=q.UpperF||e>=q.LowerA&&e<=q.LowerF}var CH;(function(e){e[e.NoValue=0]=`NoValue`,e[e.Unquoted=1]=`Unquoted`,e[e.Single=2]=`Single`,e[e.Double=3]=`Double`})(CH||={});var wH={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},TH=class{constructor({xmlMode:e=!1,decodeEntities:t=!0},n){this.cbs=n,this.state=J.Text,this.buffer=``,this.sectionStart=0,this.index=0,this.baseState=J.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=e,this.decodeEntities=t,this.entityTrie=e?nH:tH}reset(){this.state=J.Text,this.buffer=``,this.sectionStart=0,this.index=0,this.baseState=J.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}getIndex(){return this.index}getSectionStart(){return this.sectionStart}stateText(e){e===q.Lt||!this.decodeEntities&&this.fastForwardTo(q.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=J.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===q.Amp&&(this.state=J.BeforeEntity)}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(!(t?yH(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!t){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=J.InTagName,this.stateInTagName(e)}stateInSpecialTag(e){if(this.sequenceIndex===this.currentSequence.length){if(e===q.Gt||vH(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart<t){let e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}this.isSpecial=!1,this.sectionStart=t+2,this.stateInClosingTagName(e);return}this.sequenceIndex=0}(e|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===wH.TitleEnd?this.decodeEntities&&e===q.Amp&&(this.state=J.BeforeEntity):this.fastForwardTo(q.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=Number(e===q.Lt)}stateCDATASequence(e){e===wH.Cdata[this.sequenceIndex]?++this.sequenceIndex===wH.Cdata.length&&(this.state=J.InCommentLike,this.currentSequence=wH.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=J.InDeclaration,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===e)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===wH.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=J.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(e){return this.xmlMode?!yH(e):xH(e)}startSpecial(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=J.SpecialStartSequence}stateBeforeTagName(e){if(e===q.ExclamationMark)this.state=J.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===q.Questionmark)this.state=J.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){let t=e|32;this.sectionStart=this.index,!this.xmlMode&&t===wH.TitleEnd[2]?this.startSpecial(wH.TitleEnd,3):this.state=!this.xmlMode&&t===wH.ScriptEnd[2]?J.BeforeSpecialS:J.InTagName}else e===q.Slash?this.state=J.BeforeClosingTagName:(this.state=J.Text,this.stateText(e))}stateInTagName(e){yH(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=J.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateBeforeClosingTagName(e){vH(e)||(e===q.Gt?this.state=J.Text:(this.state=this.isTagStartChar(e)?J.InClosingTagName:J.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(e){(e===q.Gt||vH(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=J.AfterClosingTagName,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){(e===q.Gt||this.fastForwardTo(q.Gt))&&(this.state=J.Text,this.baseState=J.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(e){e===q.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=J.InSpecialTag,this.sequenceIndex=0):this.state=J.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===q.Slash?this.state=J.InSelfClosingTag:vH(e)||(this.state=J.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(e){e===q.Gt?(this.cbs.onselfclosingtag(this.index),this.state=J.Text,this.baseState=J.Text,this.sectionStart=this.index+1,this.isSpecial=!1):vH(e)||(this.state=J.BeforeAttributeName,this.stateBeforeAttributeName(e))}stateInAttributeName(e){(e===q.Eq||yH(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=J.AfterAttributeName,this.stateAfterAttributeName(e))}stateAfterAttributeName(e){e===q.Eq?this.state=J.BeforeAttributeValue:e===q.Slash||e===q.Gt?(this.cbs.onattribend(CH.NoValue,this.index),this.state=J.BeforeAttributeName,this.stateBeforeAttributeName(e)):vH(e)||(this.cbs.onattribend(CH.NoValue,this.index),this.state=J.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(e){e===q.DoubleQuote?(this.state=J.InAttributeValueDq,this.sectionStart=this.index+1):e===q.SingleQuote?(this.state=J.InAttributeValueSq,this.sectionStart=this.index+1):vH(e)||(this.sectionStart=this.index,this.state=J.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))}handleInAttributeValue(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===q.DoubleQuote?CH.Double:CH.Single,this.index),this.state=J.BeforeAttributeName):this.decodeEntities&&e===q.Amp&&(this.baseState=this.state,this.state=J.BeforeEntity)}stateInAttributeValueDoubleQuotes(e){this.handleInAttributeValue(e,q.DoubleQuote)}stateInAttributeValueSingleQuotes(e){this.handleInAttributeValue(e,q.SingleQuote)}stateInAttributeValueNoQuotes(e){vH(e)||e===q.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(CH.Unquoted,this.index),this.state=J.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===q.Amp&&(this.baseState=this.state,this.state=J.BeforeEntity)}stateBeforeDeclaration(e){e===q.OpeningSquareBracket?(this.state=J.CDATASequence,this.sequenceIndex=0):this.state=e===q.Dash?J.BeforeComment:J.InDeclaration}stateInDeclaration(e){(e===q.Gt||this.fastForwardTo(q.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=J.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(e===q.Gt||this.fastForwardTo(q.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=J.Text,this.sectionStart=this.index+1)}stateBeforeComment(e){e===q.Dash?(this.state=J.InCommentLike,this.currentSequence=wH.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=J.InDeclaration}stateInSpecialComment(e){(e===q.Gt||this.fastForwardTo(q.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=J.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){let t=e|32;t===wH.ScriptEnd[3]?this.startSpecial(wH.ScriptEnd,4):t===wH.StyleEnd[3]?this.startSpecial(wH.StyleEnd,4):(this.state=J.InTagName,this.stateInTagName(e))}stateBeforeEntity(e){this.entityExcess=1,this.entityResult=0,e===q.Number?this.state=J.BeforeNumericEntity:e===q.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=J.InNamedEntity,this.stateInNamedEntity(e))}stateInNamedEntity(e){if(this.entityExcess+=1,this.trieIndex=_H(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];let t=this.trieCurrent&cH.VALUE_LENGTH;if(t){let n=(t>>14)-1;if(!this.allowLegacyEntity()&&e!==q.Semi)this.trieIndex+=n;else{let e=this.index-this.entityExcess+1;e>this.sectionStart&&this.emitPartial(this.sectionStart,e),this.entityResult=this.trieIndex,this.trieIndex+=n,this.entityExcess=0,this.sectionStart=this.index+1,n===0&&this.emitNamedEntity()}}}emitNamedEntity(){if(this.state=this.baseState,this.entityResult!==0)switch((this.entityTrie[this.entityResult]&cH.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~cH.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}stateBeforeNumericEntity(e){(e|32)===q.LowerX?(this.entityExcess++,this.state=J.InHexEntity):(this.state=J.InNumericEntity,this.stateInNumericEntity(e))}emitNumericEntity(e){let t=this.index-this.entityExcess-1;t+2+Number(this.state===J.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint(aH(this.entityResult))),this.state=this.baseState}stateInNumericEntity(e){e===q.Semi?this.emitNumericEntity(!0):bH(e)?(this.entityResult=this.entityResult*10+(e-q.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}stateInHexEntity(e){e===q.Semi?this.emitNumericEntity(!0):bH(e)?(this.entityResult=this.entityResult*16+(e-q.Zero),this.entityExcess++):SH(e)?(this.entityResult=this.entityResult*16+((e|32)-q.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}allowLegacyEntity(){return!this.xmlMode&&(this.baseState===J.Text||this.baseState===J.InSpecialTag)}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===J.Text||this.state===J.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===J.InAttributeValueDq||this.state===J.InAttributeValueSq||this.state===J.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){let e=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case J.Text:this.stateText(e);break;case J.SpecialStartSequence:this.stateSpecialStartSequence(e);break;case J.InSpecialTag:this.stateInSpecialTag(e);break;case J.CDATASequence:this.stateCDATASequence(e);break;case J.InAttributeValueDq:this.stateInAttributeValueDoubleQuotes(e);break;case J.InAttributeName:this.stateInAttributeName(e);break;case J.InCommentLike:this.stateInCommentLike(e);break;case J.InSpecialComment:this.stateInSpecialComment(e);break;case J.BeforeAttributeName:this.stateBeforeAttributeName(e);break;case J.InTagName:this.stateInTagName(e);break;case J.InClosingTagName:this.stateInClosingTagName(e);break;case J.BeforeTagName:this.stateBeforeTagName(e);break;case J.AfterAttributeName:this.stateAfterAttributeName(e);break;case J.InAttributeValueSq:this.stateInAttributeValueSingleQuotes(e);break;case J.BeforeAttributeValue:this.stateBeforeAttributeValue(e);break;case J.BeforeClosingTagName:this.stateBeforeClosingTagName(e);break;case J.AfterClosingTagName:this.stateAfterClosingTagName(e);break;case J.BeforeSpecialS:this.stateBeforeSpecialS(e);break;case J.InAttributeValueNq:this.stateInAttributeValueNoQuotes(e);break;case J.InSelfClosingTag:this.stateInSelfClosingTag(e);break;case J.InDeclaration:this.stateInDeclaration(e);break;case J.BeforeDeclaration:this.stateBeforeDeclaration(e);break;case J.BeforeComment:this.stateBeforeComment(e);break;case J.InProcessingInstruction:this.stateInProcessingInstruction(e);break;case J.InNamedEntity:this.stateInNamedEntity(e);break;case J.BeforeEntity:this.stateBeforeEntity(e);break;case J.InHexEntity:this.stateInHexEntity(e);break;case J.InNumericEntity:this.stateInNumericEntity(e);break;default:this.stateBeforeNumericEntity(e)}this.index++}this.cleanup()}finish(){this.state===J.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){let e=this.buffer.length+this.offset;this.state===J.InCommentLike?this.currentSequence===wH.CdataEnd?this.cbs.oncdata(this.sectionStart,e,0):this.cbs.oncomment(this.sectionStart,e,0):this.state===J.InNumericEntity&&this.allowLegacyEntity()||this.state===J.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===J.InTagName||this.state===J.BeforeAttributeName||this.state===J.BeforeAttributeValue||this.state===J.AfterAttributeName||this.state===J.InAttributeName||this.state===J.InAttributeValueSq||this.state===J.InAttributeValueDq||this.state===J.InAttributeValueNq||this.state===J.InClosingTagName||this.cbs.ontext(this.sectionStart,e)}emitPartial(e,t){this.baseState!==J.Text&&this.baseState!==J.InSpecialTag?this.cbs.onattribdata(e,t):this.cbs.ontext(e,t)}emitCodePoint(e){this.baseState!==J.Text&&this.baseState!==J.InSpecialTag?this.cbs.onattribentity(e):this.cbs.ontextentity(e)}},EH=new Set([`input`,`option`,`optgroup`,`select`,`button`,`datalist`,`textarea`]),DH=new Set([`p`]),OH=new Set([`thead`,`tbody`]),kH=new Set([`dd`,`dt`]),AH=new Set([`rt`,`rp`]),jH=new Map([[`tr`,new Set([`tr`,`th`,`td`])],[`th`,new Set([`th`])],[`td`,new Set([`thead`,`th`,`td`])],[`body`,new Set([`head`,`link`,`script`])],[`li`,new Set([`li`])],[`p`,DH],[`h1`,DH],[`h2`,DH],[`h3`,DH],[`h4`,DH],[`h5`,DH],[`h6`,DH],[`select`,EH],[`input`,EH],[`output`,EH],[`button`,EH],[`datalist`,EH],[`textarea`,EH],[`option`,new Set([`option`])],[`optgroup`,new Set([`optgroup`,`option`])],[`dd`,kH],[`dt`,kH],[`address`,DH],[`article`,DH],[`aside`,DH],[`blockquote`,DH],[`details`,DH],[`div`,DH],[`dl`,DH],[`fieldset`,DH],[`figcaption`,DH],[`figure`,DH],[`footer`,DH],[`form`,DH],[`header`,DH],[`hr`,DH],[`main`,DH],[`nav`,DH],[`ol`,DH],[`pre`,DH],[`section`,DH],[`table`,DH],[`ul`,DH],[`rt`,AH],[`rp`,AH],[`tbody`,OH],[`tfoot`,OH]]),MH=new Set([`area`,`base`,`basefont`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`img`,`input`,`isindex`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),NH=new Set([`math`,`svg`]),PH=new Set([`mi`,`mo`,`mn`,`ms`,`mtext`,`annotation-xml`,`foreignobject`,`desc`,`title`]),FH=/\s|\//,IH=class{constructor(e,t={}){var n,r;this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname=``,this.attribname=``,this.attribvalue=``,this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=e??{},this.lowerCaseTagNames=t.lowerCaseTags??!t.xmlMode,this.lowerCaseAttributeNames=t.lowerCaseAttributeNames??!t.xmlMode,this.tokenizer=new(t.Tokenizer??TH)(this.options,this),(r=(n=this.cbs).onparserinit)==null||r.call(n,this)}ontext(e,t){var n,r;let i=this.getSlice(e,t);this.endIndex=t-1,(r=(n=this.cbs).ontext)==null||r.call(n,i),this.startIndex=t}ontextentity(e){var t,n;let r=this.tokenizer.getSectionStart();this.endIndex=r-1,(n=(t=this.cbs).ontext)==null||n.call(t,iH(e)),this.startIndex=r}isVoidElement(e){return!this.options.xmlMode&&MH.has(e)}onopentagname(e,t){this.endIndex=t;let n=this.getSlice(e,t);this.lowerCaseTagNames&&(n=n.toLowerCase()),this.emitOpenTag(n)}emitOpenTag(e){var t,n,r,i;this.openTagStart=this.startIndex,this.tagname=e;let a=!this.options.xmlMode&&jH.get(e);if(a)for(;this.stack.length>0&&a.has(this.stack[this.stack.length-1]);){let e=this.stack.pop();(n=(t=this.cbs).onclosetag)==null||n.call(t,e,!0)}this.isVoidElement(e)||(this.stack.push(e),NH.has(e)?this.foreignContext.push(!0):PH.has(e)&&this.foreignContext.push(!1)),(i=(r=this.cbs).onopentagname)==null||i.call(r,e),this.cbs.onopentag&&(this.attribs={})}endOpenTag(e){var t,n;this.startIndex=this.openTagStart,this.attribs&&=((n=(t=this.cbs).onopentag)==null||n.call(t,this.tagname,this.attribs,e),null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=``}onopentagend(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1}onclosetag(e,t){var n,r,i,a,o,s;this.endIndex=t;let c=this.getSlice(e,t);if(this.lowerCaseTagNames&&(c=c.toLowerCase()),(NH.has(c)||PH.has(c))&&this.foreignContext.pop(),this.isVoidElement(c))!this.options.xmlMode&&c===`br`&&((r=(n=this.cbs).onopentagname)==null||r.call(n,`br`),(a=(i=this.cbs).onopentag)==null||a.call(i,`br`,{},!0),(s=(o=this.cbs).onclosetag)==null||s.call(o,`br`,!1));else{let e=this.stack.lastIndexOf(c);if(e!==-1)if(this.cbs.onclosetag){let t=this.stack.length-e;for(;t--;)this.cbs.onclosetag(this.stack.pop(),t!==0)}else this.stack.length=e;else !this.options.xmlMode&&c===`p`&&(this.emitOpenTag(`p`),this.closeCurrentTag(!0))}this.startIndex=t+1}onselfclosingtag(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)}closeCurrentTag(e){var t,n;let r=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===r&&((n=(t=this.cbs).onclosetag)==null||n.call(t,r,!e),this.stack.pop())}onattribname(e,t){this.startIndex=e;let n=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n}onattribdata(e,t){this.attribvalue+=this.getSlice(e,t)}onattribentity(e){this.attribvalue+=iH(e)}onattribend(e,t){var n,r;this.endIndex=t,(r=(n=this.cbs).onattribute)==null||r.call(n,this.attribname,this.attribvalue,e===CH.Double?`"`:e===CH.Single?`'`:e===CH.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=``}getInstructionName(e){let t=e.search(FH),n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n}ondeclaration(e,t){this.endIndex=t;let n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){let e=this.getInstructionName(n);this.cbs.onprocessinginstruction(`!${e}`,`!${n}`)}this.startIndex=t+1}onprocessinginstruction(e,t){this.endIndex=t;let n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){let e=this.getInstructionName(n);this.cbs.onprocessinginstruction(`?${e}`,`?${n}`)}this.startIndex=t+1}oncomment(e,t,n){var r,i,a,o;this.endIndex=t,(i=(r=this.cbs).oncomment)==null||i.call(r,this.getSlice(e,t-n)),(o=(a=this.cbs).oncommentend)==null||o.call(a),this.startIndex=t+1}oncdata(e,t,n){var r,i,a,o,s,c,l,u,d,f;this.endIndex=t;let p=this.getSlice(e,t-n);this.options.xmlMode||this.options.recognizeCDATA?((i=(r=this.cbs).oncdatastart)==null||i.call(r),(o=(a=this.cbs).ontext)==null||o.call(a,p),(c=(s=this.cbs).oncdataend)==null||c.call(s)):((u=(l=this.cbs).oncomment)==null||u.call(l,`[CDATA[${p}]]`),(f=(d=this.cbs).oncommentend)==null||f.call(d)),this.startIndex=t+1}onend(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let e=this.stack.length;e>0;this.cbs.onclosetag(this.stack[--e],!0));}(t=(e=this.cbs).onend)==null||t.call(e)}reset(){var e,t,n,r;(t=(e=this.cbs).onreset)==null||t.call(e),this.tokenizer.reset(),this.tagname=``,this.attribname=``,this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(r=(n=this.cbs).onparserinit)==null||r.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(e){this.reset(),this.end(e)}getSlice(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let n=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);for(;t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,t-this.bufferOffset);return n}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(e){var t,n;if(this.ended){(n=(t=this.cbs).onerror)==null||n.call(t,Error(`.write() after done!`));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)}end(e){var t,n;if(this.ended){(n=(t=this.cbs).onerror)==null||n.call(t,Error(`.end() after done!`));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(e){this.write(e)}done(e){this.end(e)}};const LH=/["&'<>$\x80-\uFFFF]/g;var RH=new Map([[34,`&quot;`],[38,`&amp;`],[39,`&apos;`],[60,`&lt;`],[62,`&gt;`]]);const zH=String.prototype.codePointAt==null?(e,t)=>(e.charCodeAt(t)&64512)==55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t):(e,t)=>e.codePointAt(t);function BH(e){let t=``,n=0,r;for(;(r=LH.exec(e))!==null;){let i=r.index,a=e.charCodeAt(i),o=RH.get(a);o===void 0?(t+=`${e.substring(n,i)}&#x${zH(e,i).toString(16)};`,n=LH.lastIndex+=Number((a&64512)==55296)):(t+=e.substring(n,i)+o,n=i+1)}return t+e.substr(n)}function VH(e,t){return function(n){let r,i=0,a=``;for(;r=e.exec(n);)i!==r.index&&(a+=n.substring(i,r.index)),a+=t.get(r[0].charCodeAt(0)),i=r.index+1;return a+n.substring(i)}}const HH=VH(/["&\u00A0]/g,new Map([[34,`&quot;`],[38,`&amp;`],[160,`&nbsp;`]])),UH=VH(/[&<>\u00A0]/g,new Map([[38,`&amp;`],[60,`&lt;`],[62,`&gt;`],[160,`&nbsp;`]])),WH=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),GH=new Map(`definitionURL.attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e]));var KH=new Set([`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`]);function qH(e){return e.replace(/"/g,`&quot;`)}function JH(e,t){if(!e)return;let n=(t.encodeEntities??t.decodeEntities)===!1?qH:t.xmlMode||t.encodeEntities!==`utf8`?BH:HH;return Object.keys(e).map(r=>{let i=e[r]??``;return t.xmlMode===`foreign`&&(r=GH.get(r)??r),!t.emptyAttrs&&!t.xmlMode&&i===``?r:`${r}="${n(i)}"`}).join(` `)}var YH=new Set([`area`,`base`,`basefont`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`img`,`input`,`isindex`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`]);function XH(e,t={}){let n=`length`in e?e:[e],r=``;for(let e=0;e<n.length;e++)r+=ZH(n[e],t);return r}function ZH(e,t){switch(e.type){case Cz:return XH(e.children,t);case jz:case Tz:return tU(e);case Ez:return iU(e);case Az:return rU(e);case Dz:case Oz:case kz:return eU(e,t);case wz:return nU(e,t)}}var QH=new Set([`mi`,`mo`,`mn`,`ms`,`mtext`,`annotation-xml`,`foreignObject`,`desc`,`title`]),$H=new Set([`svg`,`math`]);function eU(e,t){t.xmlMode===`foreign`&&(e.name=WH.get(e.name)??e.name,e.parent&&QH.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&$H.has(e.name)&&(t={...t,xmlMode:`foreign`});let n=`<${e.name}`,r=JH(e.attribs,t);return r&&(n+=` ${r}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&YH.has(e.name))?(t.xmlMode||(n+=` `),n+=`/>`):(n+=`>`,e.children.length>0&&(n+=XH(e.children,t)),(t.xmlMode||!YH.has(e.name))&&(n+=`</${e.name}>`)),n}function tU(e){return`<${e.data}>`}function nU(e,t){let n=e.data||``;return(t.encodeEntities??t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&KH.has(e.parent.name))&&(n=t.xmlMode||t.encodeEntities!==`utf8`?BH(n):UH(n)),n}function rU(e){return`<![CDATA[${e.children[0].data}]]>`}function iU(e){return`<!--${e.data}-->`}function aU(e,t){let n=new Xz(void 0,t);return new IH(n,t).end(e),n.root}var oU=t(r(((e,t)=>{var n=function(e){return r(e)&&!i(e)};function r(e){return!!e&&typeof e==`object`}function i(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||o(e)}var a=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function o(e){return e.$$typeof===a}function s(e){return Array.isArray(e)?[]:{}}function c(e,t){return t.clone!==!1&&t.isMergeableObject(e)?g(s(e),e,t):e}function l(e,t,n){return e.concat(t).map(function(e){return c(e,n)})}function u(e,t){if(!t.customMerge)return g;var n=t.customMerge(e);return typeof n==`function`?n:g}function d(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function f(e){return Object.keys(e).concat(d(e))}function p(e,t){try{return t in e}catch{return!1}}function m(e,t){return p(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function h(e,t,n){var r={};return n.isMergeableObject(e)&&f(e).forEach(function(t){r[t]=c(e[t],n)}),f(t).forEach(function(i){m(e,i)||(p(e,i)&&n.isMergeableObject(t[i])?r[i]=u(i,n)(e[i],t[i],n):r[i]=c(t[i],n))}),r}function g(e,t,r){r||={},r.arrayMerge=r.arrayMerge||l,r.isMergeableObject=r.isMergeableObject||n,r.cloneUnlessOtherwiseSpecified=c;var i=Array.isArray(t);return i===Array.isArray(e)?i?r.arrayMerge(e,t,r):h(e,t,r):c(t,r)}g.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return g(e,n,t)},{})},t.exports=g}))(),1);function sU(e,t,n=()=>void 0){if(e===void 0){let e=function(...n){return t(e,...n)};return e}return e>=0?function(...r){return t(sU(e-1,t,n),...r)}:n}function cU(e,t){let n=0,r=e.length;for(;n<r&&e[n]===t;)++n;for(;r>n&&e[r-1]===t;)--r;return n>0||r<e.length?e.substring(n,r):e}function lU(e,t){let n=e.length;for(;n>0&&e[n-1]===t;)--n;return n<e.length?e.substring(0,n):e}function uU(e){return e.replace(/[\s\S]/g,e=>`\\u`+e.charCodeAt().toString(16).padStart(4,`0`))}function dU(e,t){let n=new Map;for(let r=e.length;r-- >0;){let i=e[r],a=t(i);n.set(a,n.has(a)?(0,oU.default)(i,n.get(a),{arrayMerge:fU}):i)}return[...n.values()].reverse()}var fU=(e,t,n)=>[...t];function pU(e,t){for(let n of t){if(!e)return;e=e[n]}return e}function mU(e,t=`a`,n=26){let r=[];do--e,r.push(e%n),e=e/n>>0;while(e>0);let i=t.charCodeAt(0);return r.reverse().map(e=>String.fromCharCode(i+e)).join(``)}var hU=[`I`,`X`,`C`,`M`],gU=[`V`,`L`,`D`];function _U(e){return[...e+``].map(e=>+e).reverse().map((e,t)=>e%5<4?(e<5?``:gU[t])+hU[t].repeat(e%5):hU[t]+(e<5?gU[t]:hU[t+1])).reverse().join(``)}var vU=class{constructor(e,t=void 0){this.lines=[],this.nextLineWords=[],this.maxLineLength=t||e.wordwrap||Number.MAX_VALUE,this.nextLineAvailableChars=this.maxLineLength,this.wrapCharacters=pU(e,[`longWordSplit`,`wrapCharacters`])||[],this.forceWrapOnLimit=pU(e,[`longWordSplit`,`forceWrapOnLimit`])||!1,this.stashedSpace=!1,this.wordBreakOpportunity=!1}pushWord(e,t=!1){this.nextLineAvailableChars<=0&&!t&&this.startNewLine();let n=this.nextLineWords.length===0,r=e.length+(n?0:1);if(r<=this.nextLineAvailableChars||t)this.nextLineWords.push(e),this.nextLineAvailableChars-=r;else{let[t,...r]=this.splitLongWord(e);n||this.startNewLine(),this.nextLineWords.push(t),this.nextLineAvailableChars-=t.length;for(let e of r)this.startNewLine(),this.nextLineWords.push(e),this.nextLineAvailableChars-=e.length}}popWord(){let e=this.nextLineWords.pop();if(e!==void 0){let t=this.nextLineWords.length===0,n=e.length+(t?0:1);this.nextLineAvailableChars+=n}return e}concatWord(e,t=!1){if(this.wordBreakOpportunity&&e.length>this.nextLineAvailableChars)this.pushWord(e,t),this.wordBreakOpportunity=!1;else{let n=this.popWord();this.pushWord(n?n.concat(e):e,t)}}startNewLine(e=1){this.lines.push(this.nextLineWords),e>1&&this.lines.push(...Array.from({length:e-1},()=>[])),this.nextLineWords=[],this.nextLineAvailableChars=this.maxLineLength}isEmpty(){return this.lines.length===0&&this.nextLineWords.length===0}clear(){this.lines.length=0,this.nextLineWords.length=0,this.nextLineAvailableChars=this.maxLineLength}toString(){return[...this.lines,this.nextLineWords].map(e=>e.join(` `)).join(`
81
+ `)}splitLongWord(e){let t=[],n=0;for(;e.length>this.maxLineLength;){let r=e.substring(0,this.maxLineLength),i=e.substring(this.maxLineLength),a=r.lastIndexOf(this.wrapCharacters[n]);if(a>-1)e=r.substring(a+1)+i,t.push(r.substring(0,a+1));else if(n++,n<this.wrapCharacters.length)e=r+i;else{if(this.forceWrapOnLimit){if(t.push(r),e=i,e.length>this.maxLineLength)continue}else e=r+i;break}}return t.push(e),t}},yU=class{constructor(e=null){this.next=e}getRoot(){return this.next?this.next:this}},bU=class extends yU{constructor(e,t=null,n=1,r=void 0){super(t),this.leadingLineBreaks=n,this.inlineTextBuilder=new vU(e,r),this.rawText=``,this.stashedLineBreaks=0,this.isPre=t&&t.isPre,this.isNoWrap=t&&t.isNoWrap}},xU=class extends bU{constructor(e,t=null,{interRowLineBreaks:n=1,leadingLineBreaks:r=2,maxLineLength:i=void 0,maxPrefixLength:a=0,prefixAlign:o=`left`}={}){super(e,t,r,i),this.maxPrefixLength=a,this.prefixAlign=o,this.interRowLineBreaks=n}},SU=class extends bU{constructor(e,t=null,{leadingLineBreaks:n=1,maxLineLength:r=void 0,prefix:i=``}={}){super(e,t,n,r),this.prefix=i}},CU=class extends yU{constructor(e=null){super(e),this.rows=[],this.isPre=e&&e.isPre,this.isNoWrap=e&&e.isNoWrap}},wU=class extends yU{constructor(e=null){super(e),this.cells=[],this.isPre=e&&e.isPre,this.isNoWrap=e&&e.isNoWrap}},TU=class extends yU{constructor(e,t=null,n=void 0){super(t),this.inlineTextBuilder=new vU(e,n),this.rawText=``,this.stashedLineBreaks=0,this.isPre=t&&t.isPre,this.isNoWrap=t&&t.isNoWrap}},EU=class extends yU{constructor(e=null,t){super(e),this.transform=t}};function DU(e){return[...e].map(e=>`\\u`+e.charCodeAt(0).toString(16).padStart(4,`0`)).join(``)}var OU=class{constructor(e){this.whitespaceChars=e.preserveNewlines?e.whitespaceCharacters.replace(/\n/g,``):e.whitespaceCharacters;let t=DU(this.whitespaceChars);if(this.leadingWhitespaceRe=RegExp(`^[${t}]`),this.trailingWhitespaceRe=RegExp(`[${t}]$`),this.allWhitespaceOrEmptyRe=RegExp(`^[${t}]*$`),this.newlineOrNonWhitespaceRe=RegExp(`(\\n|[^\\n${t}])`,`g`),this.newlineOrNonNewlineStringRe=RegExp(`(\\n|[^\\n]+)`,`g`),e.preserveNewlines){let e=RegExp(`\\n|[^\\n${t}]+`,`gm`);this.shrinkWrapAdd=function(t,n,r=(e=>e),i=!1){if(!t)return;let a=n.stashedSpace,o=!1,s=e.exec(t);if(s)for(o=!0,s[0]===`
82
+ `?n.startNewLine():a||this.testLeadingWhitespace(t)?n.pushWord(r(s[0]),i):n.concatWord(r(s[0]),i);(s=e.exec(t))!==null;)s[0]===`
83
+ `?n.startNewLine():n.pushWord(r(s[0]),i);n.stashedSpace=a&&!o||this.testTrailingWhitespace(t)}}else{let e=RegExp(`[^${t}]+`,`g`);this.shrinkWrapAdd=function(t,n,r=(e=>e),i=!1){if(!t)return;let a=n.stashedSpace,o=!1,s=e.exec(t);if(s)for(o=!0,a||this.testLeadingWhitespace(t)?n.pushWord(r(s[0]),i):n.concatWord(r(s[0]),i);(s=e.exec(t))!==null;)n.pushWord(r(s[0]),i);n.stashedSpace=a&&!o||this.testTrailingWhitespace(t)}}}addLiteral(e,t,n=!0){if(!e)return;let r=t.stashedSpace,i=!1,a=this.newlineOrNonNewlineStringRe.exec(e);if(a)for(i=!0,a[0]===`
84
+ `?t.startNewLine():r?t.pushWord(a[0],n):t.concatWord(a[0],n);(a=this.newlineOrNonNewlineStringRe.exec(e))!==null;)a[0]===`
85
+ `?t.startNewLine():t.pushWord(a[0],n);t.stashedSpace=r&&!i}testLeadingWhitespace(e){return this.leadingWhitespaceRe.test(e)}testTrailingWhitespace(e){return this.trailingWhitespaceRe.test(e)}testContainsWords(e){return!this.allWhitespaceOrEmptyRe.test(e)}countNewlinesNoWords(e){this.newlineOrNonWhitespaceRe.lastIndex=0;let t=0,n;for(;(n=this.newlineOrNonWhitespaceRe.exec(e))!==null;)if(n[0]===`
86
+ `)t++;else return 0;return t}},kU=class{constructor(e,t,n=void 0){this.options=e,this.picker=t,this.metadata=n,this.whitespaceProcessor=new OU(e),this._stackItem=new bU(e),this._wordTransformer=void 0}pushWordTransform(e){this._wordTransformer=new EU(this._wordTransformer,e)}popWordTransform(){if(!this._wordTransformer)return;let e=this._wordTransformer.transform;return this._wordTransformer=this._wordTransformer.next,e}startNoWrap(){this._stackItem.isNoWrap=!0}stopNoWrap(){this._stackItem.isNoWrap=!1}_getCombinedWordTransformer(){let e=this._wordTransformer?(e=>MU(e,this._wordTransformer)):void 0,t=this.options.encodeCharacters;return e?t?n=>t(e(n)):e:t}_popStackItem(){let e=this._stackItem;return this._stackItem=e.next,e}addLineBreak(){(this._stackItem instanceof bU||this._stackItem instanceof SU||this._stackItem instanceof TU)&&(this._stackItem.isPre?this._stackItem.rawText+=`
87
+ `:this._stackItem.inlineTextBuilder.startNewLine())}addWordBreakOpportunity(){(this._stackItem instanceof bU||this._stackItem instanceof SU||this._stackItem instanceof TU)&&(this._stackItem.inlineTextBuilder.wordBreakOpportunity=!0)}addInline(e,{noWordTransform:t=!1}={}){if(this._stackItem instanceof bU||this._stackItem instanceof SU||this._stackItem instanceof TU){if(this._stackItem.isPre){this._stackItem.rawText+=e;return}if(!(e.length===0||this._stackItem.stashedLineBreaks&&!this.whitespaceProcessor.testContainsWords(e))){if(this.options.preserveNewlines){let t=this.whitespaceProcessor.countNewlinesNoWords(e);if(t>0){this._stackItem.inlineTextBuilder.startNewLine(t);return}}this._stackItem.stashedLineBreaks&&this._stackItem.inlineTextBuilder.startNewLine(this._stackItem.stashedLineBreaks),this.whitespaceProcessor.shrinkWrapAdd(e,this._stackItem.inlineTextBuilder,t?void 0:this._getCombinedWordTransformer(),this._stackItem.isNoWrap),this._stackItem.stashedLineBreaks=0}}}addLiteral(e){if((this._stackItem instanceof bU||this._stackItem instanceof SU||this._stackItem instanceof TU)&&e.length!==0){if(this._stackItem.isPre){this._stackItem.rawText+=e;return}this._stackItem.stashedLineBreaks&&this._stackItem.inlineTextBuilder.startNewLine(this._stackItem.stashedLineBreaks),this.whitespaceProcessor.addLiteral(e,this._stackItem.inlineTextBuilder,this._stackItem.isNoWrap),this._stackItem.stashedLineBreaks=0}}openBlock({leadingLineBreaks:e=1,reservedLineLength:t=0,isPre:n=!1}={}){let r=Math.max(20,this._stackItem.inlineTextBuilder.maxLineLength-t);this._stackItem=new bU(this.options,this._stackItem,e,r),n&&(this._stackItem.isPre=!0)}closeBlock({trailingLineBreaks:e=1,blockTransform:t=void 0}={}){let n=this._popStackItem(),r=t?t(AU(n)):AU(n);jU(this._stackItem,r,n.leadingLineBreaks,Math.max(n.stashedLineBreaks,e))}openList({maxPrefixLength:e=0,prefixAlign:t=`left`,interRowLineBreaks:n=1,leadingLineBreaks:r=2}={}){this._stackItem=new xU(this.options,this._stackItem,{interRowLineBreaks:n,leadingLineBreaks:r,maxLineLength:this._stackItem.inlineTextBuilder.maxLineLength,maxPrefixLength:e,prefixAlign:t})}openListItem({prefix:e=``}={}){if(!(this._stackItem instanceof xU))throw Error(`Can't add a list item to something that is not a list! Check the formatter.`);let t=this._stackItem,n=Math.max(e.length,t.maxPrefixLength),r=Math.max(20,t.inlineTextBuilder.maxLineLength-n);this._stackItem=new SU(this.options,t,{prefix:e,maxLineLength:r,leadingLineBreaks:t.interRowLineBreaks})}closeListItem(){let e=this._popStackItem(),t=e.next,n=Math.max(e.prefix.length,t.maxPrefixLength),r=`
88
+ `+` `.repeat(n);jU(t,(t.prefixAlign===`right`?e.prefix.padStart(n):e.prefix.padEnd(n))+AU(e).replace(/\n/g,r),e.leadingLineBreaks,Math.max(e.stashedLineBreaks,t.interRowLineBreaks))}closeList({trailingLineBreaks:e=2}={}){let t=this._popStackItem(),n=AU(t);n&&jU(this._stackItem,n,t.leadingLineBreaks,e)}openTable(){this._stackItem=new CU(this._stackItem)}openTableRow(){if(!(this._stackItem instanceof CU))throw Error(`Can't add a table row to something that is not a table! Check the formatter.`);this._stackItem=new wU(this._stackItem)}openTableCell({maxColumnWidth:e=void 0}={}){if(!(this._stackItem instanceof wU))throw Error(`Can't add a table cell to something that is not a table row! Check the formatter.`);this._stackItem=new TU(this.options,this._stackItem,e)}closeTableCell({colspan:e=1,rowspan:t=1}={}){let n=this._popStackItem(),r=cU(AU(n),`
89
+ `);n.next.cells.push({colspan:e,rowspan:t,text:r})}closeTableRow(){let e=this._popStackItem();e.next.rows.push(e.cells)}closeTable({tableToString:e,leadingLineBreaks:t=2,trailingLineBreaks:n=2}){let r=e(this._popStackItem().rows);r&&jU(this._stackItem,r,t,n)}toString(){return AU(this._stackItem.getRoot())}};function AU(e){if(!(e instanceof bU||e instanceof SU||e instanceof TU))throw Error(`Only blocks, list items and table cells can be requested for text contents.`);return e.inlineTextBuilder.isEmpty()?e.rawText:e.rawText+e.inlineTextBuilder.toString()}function jU(e,t,n,r){if(!(e instanceof bU||e instanceof SU||e instanceof TU))throw Error(`Only blocks, list items and table cells can contain text.`);let i=AU(e),a=Math.max(e.stashedLineBreaks,n);e.inlineTextBuilder.clear(),i?e.rawText=i+`
90
+ `.repeat(a)+t:(e.rawText=t,e.leadingLineBreaks=a),e.stashedLineBreaks=r}function MU(e,t){return t?MU(t.transform(e),t.next):e}function NU(e={}){let t=e.selectors.filter(e=>!e.format);if(t.length)throw Error(`Following selectors have no specified format: `+t.map(e=>`\`${e.selector}\``).join(`, `));let n=new CV(e.selectors.map(e=>[e.selector,e])).build(GV);typeof e.encodeCharacters!=`function`&&(e.encodeCharacters=LU(e.encodeCharacters));let r=new CV(e.baseElements.selectors.map((e,t)=>[e,t+1])).build(GV);function i(t){return FU(t,e,r)}let a=sU(e.limits.maxDepth,IU,function(t,n){n.addInline(e.limits.ellipsis||``)});return function(t,r=void 0){return PU(t,r,e,n,i,a)}}function PU(e,t,n,r,i,a){let o=n.limits.maxInputLength;o&&e&&e.length>o&&(console.warn(`Input length ${e.length} is above allowed limit of ${o}. Truncating without ellipsis.`),e=e.substring(0,o));let s=i(aU(e,{decodeEntities:n.decodeEntities}).children),c=new kU(n,r,t);return a(s,c),c.toString()}function FU(e,t,n){let r=[];function i(e,i){i=i.slice(0,t.limits.maxChildNodes);for(let a of i){if(a.type!==`tag`)continue;let i=n.pick1(a);if(i>0?r.push({selectorIndex:i,element:a}):a.children&&e(a.children),r.length>=t.limits.maxBaseElements)return}}return sU(t.limits.maxDepth,i)(e),t.baseElements.orderBy!==`occurrence`&&r.sort((e,t)=>e.selectorIndex-t.selectorIndex),t.baseElements.returnDomByDefault&&r.length===0?e:r.map(e=>e.element)}function IU(e,t,n){if(!t)return;let r=n.options;t.length>r.limits.maxChildNodes&&(t=t.slice(0,r.limits.maxChildNodes),t.push({data:r.limits.ellipsis,type:`text`}));for(let i of t)switch(i.type){case`text`:n.addInline(i.data);break;case`tag`:{let t=n.picker.pick1(i),a=r.formatters[t.format];a(i,e,n,t.options||{});break}}}function LU(e){if(!e||Object.keys(e).length===0)return;let t=Object.entries(e).filter(([,e])=>e!==!1),n=new RegExp(t.map(([e])=>`(${uU([...e][0])})`).join(`|`),`g`),r=t.map(([,e])=>e),i=(e,...t)=>r[t.findIndex(e=>e)];return e=>e.replace(n,i)}function RU(e,t,n,r){}function zU(e,t,n,r){n.addLiteral(r.string||``)}function BU(e,t,n,r){n.openBlock({leadingLineBreaks:r.leadingLineBreaks||2}),n.addLiteral(r.string||``),n.closeBlock({trailingLineBreaks:r.trailingLineBreaks||2})}function VU(e,t,n,r){t(e.children,n)}function HU(e,t,n,r){n.openBlock({leadingLineBreaks:r.leadingLineBreaks||2}),t(e.children,n),n.closeBlock({trailingLineBreaks:r.trailingLineBreaks||2})}function UU(e){let t=e.attribs&&e.attribs.length?` `+Object.entries(e.attribs).map(([e,t])=>t===``?e:`${e}=${t.replace(/"/g,`&quot;`)}`).join(` `):``;return`<${e.name}${t}>`}function WU(e){return`</${e.name}>`}function GU(e,t,n,r){n.startNoWrap(),n.addLiteral(UU(e)),n.stopNoWrap(),t(e.children,n),n.startNoWrap(),n.addLiteral(WU(e)),n.stopNoWrap()}function KU(e,t,n,r){n.openBlock({leadingLineBreaks:r.leadingLineBreaks||2}),n.startNoWrap(),n.addLiteral(UU(e)),n.stopNoWrap(),t(e.children,n),n.startNoWrap(),n.addLiteral(WU(e)),n.stopNoWrap(),n.closeBlock({trailingLineBreaks:r.trailingLineBreaks||2})}function qU(e,t,n,r){n.startNoWrap(),n.addLiteral(XH(e,{decodeEntities:n.options.decodeEntities})),n.stopNoWrap()}function JU(e,t,n,r){n.openBlock({leadingLineBreaks:r.leadingLineBreaks||2}),n.startNoWrap(),n.addLiteral(XH(e,{decodeEntities:n.options.decodeEntities})),n.stopNoWrap(),n.closeBlock({trailingLineBreaks:r.trailingLineBreaks||2})}function YU(e,t,n,r){n.addLiteral(r.prefix||``),t(e.children,n),n.addLiteral(r.suffix||``)}var XU=Object.freeze({__proto__:null,block:HU,blockHtml:JU,blockString:BU,blockTag:KU,inline:VU,inlineHtml:qU,inlineString:zU,inlineSurround:YU,inlineTag:GU,skip:RU});function ZU(e,t){return e[t]||(e[t]=[]),e[t]}function QU(e,t=0){for(;e[t];)t++;return t}function $U(e,t){for(let n=0;n<t;n++){let t=ZU(e,n);for(let r=0;r<n;r++){let i=ZU(e,r);if(t[r]||i[n]){let e=t[r];t[r]=i[n],i[n]=e}}}}function eW(e,t,n,r){for(let i=0;i<e.rowspan;i++){let a=ZU(t,n+i);for(let t=0;t<e.colspan;t++)a[r+t]=e}}function tW(e,t){return e[t]===void 0&&(e[t]=t===0?0:1+tW(e,t-1)),e[t]}function nW(e,t,n,r){e[t+n]=Math.max(tW(e,t+n),tW(e,t)+r)}function rW(e,t,n){let r=[],i=0,a=e.length,o=[0];for(let n=0;n<a;n++){let a=ZU(r,n),s=e[n],c=0;for(let e=0;e<s.length;e++){let i=s[e];c=QU(a,c),eW(i,r,n,c),c+=i.colspan,i.lines=i.text.split(`
91
+ `);let l=i.lines.length;nW(o,n,i.rowspan,l+t)}i=a.length>i?a.length:i}$U(r,a>i?a:i);let s=[],c=[0];for(let e=0;e<i;e++){let t=0,i,l=Math.min(a,r[e].length);for(;t<l;)if(i=r[e][t],i){if(!i.rendered){let r=0;for(let n=0;n<i.lines.length;n++){let a=i.lines[n],l=o[t]+n;s[l]=(s[l]||``).padEnd(c[e])+a,r=a.length>r?a.length:r}nW(c,e,i.colspan,r+n),i.rendered=!0}t+=i.rowspan}else{let e=o[t];s[e]=s[e]||``,t++}}return s.join(`
92
+ `)}function iW(e,t,n,r){n.addLineBreak()}function aW(e,t,n,r){n.addWordBreakOpportunity()}function oW(e,t,n,r){n.openBlock({leadingLineBreaks:r.leadingLineBreaks||2}),n.addInline(`-`.repeat(r.length||n.options.wordwrap||40)),n.closeBlock({trailingLineBreaks:r.trailingLineBreaks||2})}function sW(e,t,n,r){n.openBlock({leadingLineBreaks:r.leadingLineBreaks||2}),t(e.children,n),n.closeBlock({trailingLineBreaks:r.trailingLineBreaks||2})}function cW(e,t,n,r){n.openBlock({isPre:!0,leadingLineBreaks:r.leadingLineBreaks||2}),t(e.children,n),n.closeBlock({trailingLineBreaks:r.trailingLineBreaks||2})}function lW(e,t,n,r){n.openBlock({leadingLineBreaks:r.leadingLineBreaks||2}),r.uppercase===!1?t(e.children,n):(n.pushWordTransform(e=>e.toUpperCase()),t(e.children,n),n.popWordTransform()),n.closeBlock({trailingLineBreaks:r.trailingLineBreaks||2})}function uW(e,t,n,r){n.openBlock({leadingLineBreaks:r.leadingLineBreaks||2,reservedLineLength:2}),t(e.children,n),n.closeBlock({trailingLineBreaks:r.trailingLineBreaks||2,blockTransform:e=>(r.trimEmptyLines===!1?e:cU(e,`
93
+ `)).split(`
94
+ `).map(e=>`> `+e).join(`
95
+ `)})}function dW(e,t){if(!t)return e;let n=typeof t[0]==`string`?t[0]:`[`,r=typeof t[1]==`string`?t[1]:`]`;return n+e+r}function fW(e,t,n,r,i){let a=typeof t==`function`?t(e,r,i):e;return a[0]===`/`&&n?lU(n,`/`)+a:a}function pW(e,t,n,r){let i=e.attribs||{},a=i.alt?i.alt:``,o=i.src?fW(i.src,r.pathRewrite,r.baseUrl,n.metadata,e):``,s=o?a?a+` `+dW(o,r.linkBrackets):dW(o,r.linkBrackets):a;n.addInline(s,{noWordTransform:!0})}function mW(e,t,n,r){function i(){if(r.ignoreHref||!e.attribs||!e.attribs.href)return``;let t=e.attribs.href.replace(/^mailto:/,``);return r.noAnchorUrl&&t[0]===`#`?``:(t=fW(t,r.pathRewrite,r.baseUrl,n.metadata,e),t)}let a=i();if(!a)t(e.children,n);else{let i=``;n.pushWordTransform(e=>(e&&(i+=e),e)),t(e.children,n),n.popWordTransform(),r.hideLinkHrefIfSameAsText&&a===i||n.addInline(i?` `+dW(a,r.linkBrackets):a,{noWordTransform:!0})}}function hW(e,t,n,r,i){let a=pU(e,[`parent`,`name`])===`li`,o=0,s=(e.children||[]).filter(e=>e.type!==`text`||!/^\s*$/.test(e.data)).map(function(e){if(e.name!==`li`)return{node:e,prefix:``};let t=a?i().trimStart():i();return t.length>o&&(o=t.length),{node:e,prefix:t}});if(s.length){n.openList({interRowLineBreaks:1,leadingLineBreaks:a?1:r.leadingLineBreaks||2,maxPrefixLength:o,prefixAlign:`left`});for(let{node:e,prefix:r}of s)n.openListItem({prefix:r}),t([e],n),n.closeListItem();n.closeList({trailingLineBreaks:a?1:r.trailingLineBreaks||2})}}function gW(e,t,n,r){let i=r.itemPrefix||` * `;return hW(e,t,n,r,()=>i)}function _W(e,t,n,r){let i=Number(e.attribs.start||`1`),a=vW(e.attribs.type);return hW(e,t,n,r,()=>` `+a(i++)+`. `)}function vW(e=`1`){switch(e){case`a`:return e=>mU(e,`a`);case`A`:return e=>mU(e,`A`);case`i`:return e=>_U(e).toLowerCase();case`I`:return e=>_U(e);case`1`:default:return e=>e.toString()}}function yW(e){let t=[],n=[];for(let r of e)r.startsWith(`.`)?t.push(r.substring(1)):r.startsWith(`#`)&&n.push(r.substring(1));return{classes:t,ids:n}}function bW(e,t){if(t===!0)return!0;if(!e)return!1;let{classes:n,ids:r}=yW(t),i=(e.class||``).split(` `),a=(e.id||``).split(` `);return i.some(e=>n.includes(e))||a.some(e=>r.includes(e))}function xW(e,t,n,r){return bW(e.attribs,n.options.tables)?CW(e,t,n,r):SW(e,t,n,r)}function SW(e,t,n,r){n.openBlock({leadingLineBreaks:r.leadingLineBreaks}),t(e.children,n),n.closeBlock({trailingLineBreaks:r.trailingLineBreaks})}function CW(e,t,n,r){n.openTable(),e.children.forEach(a),n.closeTable({tableToString:e=>rW(e,r.rowSpacing??0,r.colSpacing??3),leadingLineBreaks:r.leadingLineBreaks,trailingLineBreaks:r.trailingLineBreaks});function i(e){let i=+pU(e,[`attribs`,`colspan`])||1,a=+pU(e,[`attribs`,`rowspan`])||1;n.openTableCell({maxColumnWidth:r.maxColumnWidth}),t(e.children,n),n.closeTableCell({colspan:i,rowspan:a})}function a(e){if(e.type!==`tag`)return;let t=r.uppercaseHeaderCells===!1?i:e=>{n.pushWordTransform(e=>e.toUpperCase()),i(e),n.popWordTransform()};switch(e.name){case`thead`:case`tbody`:case`tfoot`:case`center`:e.children.forEach(a);return;case`tr`:n.openTableRow();for(let n of e.children)if(n.type===`tag`)switch(n.name){case`th`:t(n);break;case`td`:i(n);break}n.closeTableRow();break}}}var wW=Object.freeze({__proto__:null,anchor:mW,blockquote:uW,dataTable:CW,heading:lW,horizontalLine:oW,image:pW,lineBreak:iW,orderedList:_W,paragraph:sW,pre:cW,table:xW,unorderedList:gW,wbr:aW}),TW={baseElements:{selectors:[`body`],orderBy:`selectors`,returnDomByDefault:!0},decodeEntities:!0,encodeCharacters:{},formatters:{},limits:{ellipsis:`...`,maxBaseElements:void 0,maxChildNodes:void 0,maxDepth:void 0,maxInputLength:1<<24},longWordSplit:{forceWrapOnLimit:!1,wrapCharacters:[]},preserveNewlines:!1,selectors:[{selector:`*`,format:`inline`},{selector:`a`,format:`anchor`,options:{baseUrl:null,hideLinkHrefIfSameAsText:!1,ignoreHref:!1,linkBrackets:[`[`,`]`],noAnchorUrl:!0}},{selector:`article`,format:`block`,options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:`aside`,format:`block`,options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:`blockquote`,format:`blockquote`,options:{leadingLineBreaks:2,trailingLineBreaks:2,trimEmptyLines:!0}},{selector:`br`,format:`lineBreak`},{selector:`div`,format:`block`,options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:`footer`,format:`block`,options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:`form`,format:`block`,options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:`h1`,format:`heading`,options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:`h2`,format:`heading`,options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:`h3`,format:`heading`,options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:`h4`,format:`heading`,options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:`h5`,format:`heading`,options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:`h6`,format:`heading`,options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:`header`,format:`block`,options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:`hr`,format:`horizontalLine`,options:{leadingLineBreaks:2,length:void 0,trailingLineBreaks:2}},{selector:`img`,format:`image`,options:{baseUrl:null,linkBrackets:[`[`,`]`]}},{selector:`main`,format:`block`,options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:`nav`,format:`block`,options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:`ol`,format:`orderedList`,options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:`p`,format:`paragraph`,options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:`pre`,format:`pre`,options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:`section`,format:`block`,options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:`table`,format:`table`,options:{colSpacing:3,leadingLineBreaks:2,maxColumnWidth:60,rowSpacing:0,trailingLineBreaks:2,uppercaseHeaderCells:!0}},{selector:`ul`,format:`unorderedList`,options:{itemPrefix:` * `,leadingLineBreaks:2,trailingLineBreaks:2}},{selector:`wbr`,format:`wbr`}],tables:[],whitespaceCharacters:` \r
96
+ \f​`,wordwrap:80},EW=(e,t,n)=>[...e,...t],DW=(e,t,n)=>[...t],OW=(e,t,n)=>e.some(e=>typeof e==`object`)?EW(e,t):DW(e,t);function kW(e={}){return e=(0,oU.default)(TW,e,{arrayMerge:DW,customMerge:e=>e===`selectors`?OW:void 0}),e.formatters=Object.assign({},XU,wW,e.formatters),e.selectors=dU(e.selectors,(e=>e.selector)),jW(e),NU(e)}function AW(e,t={},n=void 0){return kW(t)(e,n)}function jW(e){if(e.tags){let t=Object.entries(e.tags).map(([e,t])=>({...t,selector:e||`*`}));e.selectors.push(...t),e.selectors=dU(e.selectors,(e=>e.selector))}function t(e,t,n){let r=t.pop();for(let n of t){let t=e[n];t||(t={},e[n]=t),e=t}e[r]=n}if(e.baseElement){let n=e.baseElement;t(e,[`baseElements`,`selectors`],Array.isArray(n)?n:[n])}e.returnDomByDefault!==void 0&&t(e,[`baseElements`,`returnDomByDefault`],e.returnDomByDefault);for(let n of e.selectors)n.format===`anchor`&&pU(n,[`options`,`noLinkBrackets`])&&t(n,[`options`,`linkBrackets`],!1)}function MW(e,t){if(Array.isArray(e))return e.map(e=>MW(e,t));if(typeof e==`object`){if(e.type===`group`)return{...e,contents:MW(e.contents,t),expandedStates:MW(e.expandedStates,t)};if(`contents`in e)return{...e,contents:MW(e.contents,t)};if(`parts`in e)return{...e,parts:MW(e.parts,t)};if(e.type===`if-break`)return{...e,breakContents:MW(e.breakContents,t),flatContents:MW(e.flatContents,t)}}return t(e)}var NW={...KT};if(NW.printers){let e=NW.printers.html.print;NW.printers.html.print=(t,n,r,i)=>{let a=t.getNode(),o=e(t,n,r,i);return a.type===`ieConditionalComment`?MW(o,e=>typeof e==`object`&&e.type===`line`?e.soft?``:` `:e):o}}var PW={endOfLine:`lf`,tabWidth:2,plugins:[NW],bracketSameLine:!0,parser:`html`},FW=(e,t={})=>_z(e.replaceAll(`\0`,``),{...PW,...t}),IW=[{selector:`img`,format:`skip`},{selector:`[data-skip-in-text=true]`,format:`skip`},{selector:`a`,options:{linkBrackets:!1,hideLinkHrefIfSameAsText:!0}}];function LW(e,t){return AW(e,{selectors:IW,wordwrap:!1,...t})}var RW=async e=>{let t=``,n=new TextDecoder(`utf-8`);if(`pipeTo`in e){let r=new WritableStream({write(e){t+=n.decode(e,{stream:!0})},close(){t+=n.decode()}});await e.pipeTo(r)}else{let r=new He({write(e,r,i){t+=n.decode(e,{stream:!0}),i()},final(e){t+=n.decode(),e()}});e.pipe(r),await new Promise((e,t)=>{r.on(`error`,t),r.on(`close`,()=>{e()})})}return t},zW=async(e,t)=>{let n=(0,V.jsx)(B.Suspense,{children:e}),r=await import(`./server.node-VQzoub0A.js`).then(o(1)).then(e=>e.default),i;if(Object.hasOwn(r,`renderToReadableStream`)&&typeof WritableStream<`u`?i=await RW(await r.renderToReadableStream(n,{progressiveChunkSize:1/0})):await new Promise((e,t)=>{let a=r.renderToPipeableStream(n,{async onAllReady(){i=await RW(a),e()},onError(e){t(e)},progressiveChunkSize:1/0})}),t?.plainText)return LW(i,t.htmlToTextOptions);let a=`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">${i.replace(/<!DOCTYPE.*?>/,``)}`;return t?.pretty?FW(a):a};function BW(){return`${process.env.NODE_ENV===`production`?`build/`:``}appos`}function VW(){return process.env.NODE_ENV!==`production`&&!process.env.VITEST}function HW(){let e=BW();return ze(process.cwd(),e,`emails`)}async function UW(){let e=HW();try{return(await Be(e,{withFileTypes:!0})).filter(e=>e.isFile()).filter(e=>/\.(tsx|ts|js)$/.test(e.name)).filter(e=>!/\.(test|spec)\.(tsx|ts|js)$/.test(e.name)).map(t=>({name:t.name,slug:Le(t.name,Re(t.name)),absolutePath:ze(e,t.name)}))}catch{return[]}}async function WW(e,t=!1){let n=await(t?import(`${e}?t=${Date.now()}`):import(e));if(!n.default)throw Error(`Email file ${e} must have a default export`);return n}async function GW(e,t,n,r){let{default:i,previewProps:a}=await WW(t,VW()),o=r||a||{},s=e.i18n.cloneInstance();await s.changeLanguage(n);let c=(0,B.createElement)(Je,{i18n:s},(0,B.createElement)(i,o)),[l,u,d]=await Promise.all([zW(c),zW(c,{plainText:!0}),zW(c,{pretty:!0})]);return{html:l,plainText:u,prettyHtml:d}}var KW=n({default:()=>YW,loader:()=>JW}),qW=R();async function JW({context:e}){return{emails:await UW()}}var YW=d(function(){let e=(0,qW.c)(8),{emails:t}=g(),n=j(),{t:r}=me(),{setSecondaryContent:i,setHasSecondaryContent:a}=zC(),o,s;e[0]!==t||e[1]!==n.pathname||e[2]!==a||e[3]!==i||e[4]!==r?(o=()=>(a(!0),i((0,V.jsx)(XC,{className:`px-0`,children:(0,V.jsx)(QC,{children:(0,V.jsxs)($C,{children:[t.map(e=>(0,V.jsx)(ew,{children:(0,V.jsx)(nw,{asChild:!0,isActive:n.pathname===`/platform/emails/${e.slug}`,children:(0,V.jsx)(O,{to:`/platform/emails/${e.slug}`,children:(0,V.jsx)(`span`,{children:e.slug})})})},e.slug)),t.length===0&&(0,V.jsx)(`div`,{className:`px-3 py-2 text-sm text-muted-foreground`,children:r(`emails.noEmailsFound`)})]})})})),()=>{a(!1),i(void 0)}),s=[t,n.pathname,a,i,r],e[0]=t,e[1]=n.pathname,e[2]=a,e[3]=i,e[4]=r,e[5]=o,e[6]=s):(o=e[5],s=e[6]),(0,B.useEffect)(o,s);let c;return e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,V.jsx)(w,{}),e[7]=c):c=e[7],c}),XW=R();function ZW(e){let t=(0,XW.c)(2),{code:n}=e,r;return t[0]===n?r=t[1]:(r=(0,V.jsx)(`div`,{className:`flex-1 overflow-auto bg-muted`,children:(0,V.jsx)(`pre`,{className:`p-4 text-sm whitespace-pre-wrap break-words`,children:(0,V.jsx)(`code`,{className:`language-html`,children:n})})}),t[0]=n,t[1]=r),r}var QW=R();function $W(e){let t=(0,QW.c)(2),{html:n}=e,r;return t[0]===n?r=t[1]:(r=(0,V.jsx)(`iframe`,{srcDoc:n,className:`w-full flex-1 border-0 bg-white`,title:`Email preview`,sandbox:`allow-same-origin allow-scripts`}),t[0]=n,t[1]=r),r}var eG=R();function tG(e){let t=(0,eG.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,V.jsx)(rd,{"data-slot":`select`,...n}),t[2]=n,t[3]=r),r}function nG(e){let t=(0,eG.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,V.jsx)(ad,{"data-slot":`select-value`,...n}),t[2]=n,t[3]=r),r}function rG(e){let t=(0,eG.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,size:a,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===r?s=t[6]:(s=z(`border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,r),t[5]=r,t[6]=s);let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,V.jsx)(od,{asChild:!0,children:(0,V.jsx)(Qt,{className:`size-4 opacity-50`})}),t[7]=c):c=t[7];let l;return t[8]!==n||t[9]!==i||t[10]!==o||t[11]!==s?(l=(0,V.jsxs)(id,{"data-slot":`select-trigger`,"data-size":o,className:s,...i,children:[n,c]}),t[8]=n,t[9]=i,t[10]=o,t[11]=s,t[12]=l):l=t[12],l}function iG(e){let t=(0,eG.c)(20),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,position:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`popper`:a,s=o===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,c;t[5]!==r||t[6]!==s?(c=z(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md`,s,r),t[5]=r,t[6]=s,t[7]=c):c=t[7];let l;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,V.jsx)(oG,{}),t[8]=l):l=t[8];let u=o===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`,d;t[9]===u?d=t[10]:(d=z(`p-1`,u),t[9]=u,t[10]=d);let f;t[11]!==n||t[12]!==d?(f=(0,V.jsx)(ld,{className:d,children:n}),t[11]=n,t[12]=d,t[13]=f):f=t[13];let p;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,V.jsx)(sG,{}),t[14]=p):p=t[14];let m;return t[15]!==o||t[16]!==i||t[17]!==c||t[18]!==f?(m=(0,V.jsx)(sd,{children:(0,V.jsxs)(cd,{"data-slot":`select-content`,className:c,position:o,...i,children:[l,f,p]})}),t[15]=o,t[16]=i,t[17]=c,t[18]=f,t[19]=m):m=t[19],m}function aG(e){let t=(0,eG.c)(13),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=z(`focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,r),t[4]=r,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,V.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,V.jsx)(fd,{children:(0,V.jsx)(Zt,{className:`size-4`})})}),t[6]=o):o=t[6];let s;t[7]===n?s=t[8]:(s=(0,V.jsx)(dd,{children:n}),t[7]=n,t[8]=s);let c;return t[9]!==i||t[10]!==a||t[11]!==s?(c=(0,V.jsxs)(ud,{"data-slot":`select-item`,className:a,...i,children:[o,s]}),t[9]=i,t[10]=a,t[11]=s,t[12]=c):c=t[12],c}function oG(e){let t=(0,eG.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`flex cursor-default items-center justify-center py-1`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,V.jsx)(tn,{className:`size-4`}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,V.jsx)(pd,{"data-slot":`select-scroll-up-button`,className:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function sG(e){let t=(0,eG.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`flex cursor-default items-center justify-center py-1`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,V.jsx)(Qt,{className:`size-4`}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,V.jsx)(md,{"data-slot":`select-scroll-down-button`,className:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}var cG=R();function lG(e){let t=(0,cG.c)(37),{view:n,onViewChange:r}=e,{t:i,i18n:a}=me(),[o,s]=l(),c;t[0]!==a||t[1]!==s?(c=e=>{a.changeLanguage(e),s(t=>{let n=new URLSearchParams(t);return n.set(`lang`,e),n})},t[0]=a,t[1]=s,t[2]=c):c=t[2];let u=c,d=n===`preview`?`default`:`outline`,f;t[3]===r?f=t[4]:(f=()=>r(`preview`),t[3]=r,t[4]=f);let p;t[5]===i?p=t[6]:(p=i(`emails.toolbar.preview`),t[5]=i,t[6]=p);let m;t[7]!==d||t[8]!==f||t[9]!==p?(m=(0,V.jsx)(H,{variant:d,size:`sm`,onClick:f,children:p}),t[7]=d,t[8]=f,t[9]=p,t[10]=m):m=t[10];let h=n===`code`?`default`:`outline`,g;t[11]===r?g=t[12]:(g=()=>r(`code`),t[11]=r,t[12]=g);let _;t[13]===i?_=t[14]:(_=i(`emails.toolbar.code`),t[13]=i,t[14]=_);let v;t[15]!==h||t[16]!==g||t[17]!==_?(v=(0,V.jsx)(H,{variant:h,size:`sm`,onClick:g,children:_}),t[15]=h,t[16]=g,t[17]=_,t[18]=v):v=t[18];let y;t[19]!==m||t[20]!==v?(y=(0,V.jsxs)(`div`,{className:`flex gap-1`,children:[m,v]}),t[19]=m,t[20]=v,t[21]=y):y=t[21];let b;t[22]!==a.language||t[23]!==o?(b=o.get(`lang`)||a.language,t[22]=a.language,t[23]=o,t[24]=b):b=t[24];let x;t[25]===i?x=t[26]:(x=i(`emails.toolbar.selectLanguage`),t[25]=i,t[26]=x);let S;t[27]===x?S=t[28]:(S=(0,V.jsx)(rG,{className:`w-[180px]`,children:(0,V.jsx)(nG,{placeholder:x})}),t[27]=x,t[28]=S);let C;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,V.jsxs)(iG,{children:[(0,V.jsx)(aG,{value:`en`,children:`English`}),(0,V.jsx)(aG,{value:`zh-CN`,children:`简体中文`}),(0,V.jsx)(aG,{value:`zh-TW`,children:`繁體中文`})]}),t[29]=C):C=t[29];let w;t[30]!==u||t[31]!==b||t[32]!==S?(w=(0,V.jsx)(`div`,{className:`ml-auto`,children:(0,V.jsxs)(tG,{value:b,onValueChange:u,children:[S,C]})}),t[30]=u,t[31]=b,t[32]=S,t[33]=w):w=t[33];let T;return t[34]!==y||t[35]!==w?(T=(0,V.jsxs)(`div`,{className:`flex items-center gap-2 p-2 border-b bg-background`,children:[y,w]}),t[34]=y,t[35]=w,t[36]=T):T=t[36],T}var uG=R();function dG(e){let t=(0,uG.c)(5),n=$g(),r=A(),i,a;t[0]!==e||t[1]!==n||t[2]!==r?(i=()=>{let t=t=>{let{filename:n}=t;n===e&&r.revalidate()};return n.on(`email:changed`,t),()=>{n.off(`email:changed`,t)}},a=[e,n,r],t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a):(i=t[3],a=t[4]),(0,B.useEffect)(i,a)}var fG=n({default:()=>hG,loader:()=>mG}),pG=R();async function mG({params:e,context:t,request:n}){let{container:r,language:i}=t.get(D),a=new URL(n.url).searchParams.get(`lang`)||i,o=e[`*`]||``,s=(await UW()).find(e=>e.slug===o);if(!s)throw new Response(`Email not found`,{status:404});return{rendered:await GW(r,s.absolutePath,a),email:s,filename:s.name}}var hG=d(function(){let e=(0,pG.c)(14),{rendered:t,filename:n}=g(),[r,i]=l(),a;e[0]===r?a=e[1]:(a=r.get(`view`)||`preview`,e[0]=r,e[1]=a);let o=a,s;e[2]===i?s=e[3]:(s=e=>{i(t=>{let n=new URLSearchParams(t);return n.set(`view`,e),n})},e[2]=i,e[3]=s);let c=s;dG(n);let u;e[4]!==c||e[5]!==o?(u=(0,V.jsx)(lG,{view:o,onViewChange:c}),e[4]=c,e[5]=o,e[6]=u):u=e[6];let d;e[7]!==t.html||e[8]!==t.prettyHtml||e[9]!==o?(d=o===`preview`?(0,V.jsx)($W,{html:t.html}):(0,V.jsx)(ZW,{code:t.prettyHtml}),e[7]=t.html,e[8]=t.prettyHtml,e[9]=o,e[10]=d):d=e[10];let f;return e[11]!==u||e[12]!==d?(f=(0,V.jsxs)(`div`,{className:`flex flex-col h-full`,children:[u,d]}),e[11]=u,e[12]=d,e[13]=f):f=e[13],f}),gG=n({default:()=>yG,loader:()=>vG}),_G=R();async function vG(){let e=await UW();if(e.length===0)return{hasEmails:!1};throw M(`/platform/emails/${e[0].slug}`)}var yG=d(function(){let e=(0,_G.c)(12),{t}=me(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,V.jsx)(ff,{variant:`icon`,children:(0,V.jsx)(Mw,{className:`size-12`})}),e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=t(`emails.empty.title`),e[1]=t,e[2]=r);let i;e[3]===r?i=e[4]:(i=(0,V.jsx)(pf,{children:r}),e[3]=r,e[4]=i);let a;e[5]===t?a=e[6]:(a=t(`emails.empty.description`),e[5]=t,e[6]=a);let o;e[7]===a?o=e[8]:(o=(0,V.jsx)(mf,{children:a}),e[7]=a,e[8]=o);let s;return e[9]!==i||e[10]!==o?(s=(0,V.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,V.jsx)(lf,{children:(0,V.jsxs)(uf,{children:[n,i,o]})})}),e[9]=i,e[10]=o,e[11]=s):s=e[11],s}),bG=n({loader:()=>xG});async function xG(){throw M(S(`/platform/auth/overview`))}var SG=n({default:()=>wG}),CG=R(),wG=d(function(){let e=(0,CG.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(`div`,{children:`Notifications`}),e[0]=t):t=e[0],t}),TG=n({default:()=>DG}),EG=R(),DG=d(function(){let e=(0,EG.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(`div`,{children:`Site`}),e[0]=t):t=e[0],t});function OG(e,t){return typeof e==`function`?e(t):e}function kG(e,t){return n=>{t.setState(t=>({...t,[e]:OG(n,t[e])}))}}function AG(e){return e instanceof Function}function jG(e){return Array.isArray(e)&&e.every(e=>typeof e==`number`)}function MG(e,t){let n=[],r=e=>{e.forEach(e=>{n.push(e);let i=t(e);i!=null&&i.length&&r(i)})};return r(e),n}function Y(e,t,n){let r=[],i;return a=>{let o;n.key&&n.debug&&(o=Date.now());let s=e(a);if(!(s.length!==r.length||s.some((e,t)=>r[t]!==e)))return i;r=s;let c;if(n.key&&n.debug&&(c=Date.now()),i=t(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){let e=Math.round((Date.now()-o)*100)/100,t=Math.round((Date.now()-c)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
97
+ font-size: .6rem;
98
+ font-weight: bold;
99
+ color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return i}}function X(e,t,n,r){return{debug:()=>e?.debugAll??e[t],key:process.env.NODE_ENV===`development`&&n,onChange:r}}function NG(e,t,n,r){let i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>i.getValue()??e.options.renderFallbackValue,getContext:Y(()=>[e,n,t,i],(e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}),X(e.options,`debugCells`,`cell.getContext`))};return e._features.forEach(r=>{r.createCell==null||r.createCell(i,n,t,e)},{}),i}function PG(e,t,n,r){let i={...e._getDefaultColumnDef(),...t},a=i.accessorKey,o=i.id??(a?typeof String.prototype.replaceAll==`function`?a.replaceAll(`.`,`_`):a.replace(/\./g,`_`):void 0)??(typeof i.header==`string`?i.header:void 0),s;if(i.accessorFn?s=i.accessorFn:a&&(s=a.includes(`.`)?e=>{let t=e;for(let e of a.split(`.`))t=t?.[e],process.env.NODE_ENV!==`production`&&t===void 0&&console.warn(`"${e}" in deeply nested key "${a}" returned undefined.`);return t}:e=>e[i.accessorKey]),!o)throw process.env.NODE_ENV===`production`?Error():Error(i.accessorFn?`Columns require an id when using an accessorFn`:`Columns require an id when using a non-string header`);let c={id:`${String(o)}`,accessorFn:s,parent:r,depth:n,columnDef:i,columns:[],getFlatColumns:Y(()=>[!0],()=>[c,...c.columns?.flatMap(e=>e.getFlatColumns())],X(e.options,`debugColumns`,`column.getFlatColumns`)),getLeafColumns:Y(()=>[e._getOrderColumnsFn()],e=>{var t;return(t=c.columns)!=null&&t.length?e(c.columns.flatMap(e=>e.getLeafColumns())):[c]},X(e.options,`debugColumns`,`column.getLeafColumns`))};for(let t of e._features)t.createColumn==null||t.createColumn(c,e);return c}var FG=`debugHeaders`;function IG(e,t,n){let r={id:n.id??t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(r),e},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach(t=>{t.createHeader==null||t.createHeader(r,e)}),r}var LG={createTable:e=>{e.getHeaderGroups=Y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{let a=r?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],o=i?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],s=n.filter(e=>!(r!=null&&r.includes(e.id))&&!(i!=null&&i.includes(e.id)));return RG(t,[...a,...s,...o],e)},X(e.options,FG,`getHeaderGroups`)),e.getCenterHeaderGroups=Y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(e=>!(r!=null&&r.includes(e.id))&&!(i!=null&&i.includes(e.id))),RG(t,n,e,`center`)),X(e.options,FG,`getCenterHeaderGroups`)),e.getLeftHeaderGroups=Y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>RG(t,r?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],e,`left`),X(e.options,FG,`getLeftHeaderGroups`)),e.getRightHeaderGroups=Y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>RG(t,r?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],e,`right`),X(e.options,FG,`getRightHeaderGroups`)),e.getFooterGroups=Y(()=>[e.getHeaderGroups()],e=>[...e].reverse(),X(e.options,FG,`getFooterGroups`)),e.getLeftFooterGroups=Y(()=>[e.getLeftHeaderGroups()],e=>[...e].reverse(),X(e.options,FG,`getLeftFooterGroups`)),e.getCenterFooterGroups=Y(()=>[e.getCenterHeaderGroups()],e=>[...e].reverse(),X(e.options,FG,`getCenterFooterGroups`)),e.getRightFooterGroups=Y(()=>[e.getRightHeaderGroups()],e=>[...e].reverse(),X(e.options,FG,`getRightFooterGroups`)),e.getFlatHeaders=Y(()=>[e.getHeaderGroups()],e=>e.map(e=>e.headers).flat(),X(e.options,FG,`getFlatHeaders`)),e.getLeftFlatHeaders=Y(()=>[e.getLeftHeaderGroups()],e=>e.map(e=>e.headers).flat(),X(e.options,FG,`getLeftFlatHeaders`)),e.getCenterFlatHeaders=Y(()=>[e.getCenterHeaderGroups()],e=>e.map(e=>e.headers).flat(),X(e.options,FG,`getCenterFlatHeaders`)),e.getRightFlatHeaders=Y(()=>[e.getRightHeaderGroups()],e=>e.map(e=>e.headers).flat(),X(e.options,FG,`getRightFlatHeaders`)),e.getCenterLeafHeaders=Y(()=>[e.getCenterFlatHeaders()],e=>e.filter(e=>{var t;return!((t=e.subHeaders)!=null&&t.length)}),X(e.options,FG,`getCenterLeafHeaders`)),e.getLeftLeafHeaders=Y(()=>[e.getLeftFlatHeaders()],e=>e.filter(e=>{var t;return!((t=e.subHeaders)!=null&&t.length)}),X(e.options,FG,`getLeftLeafHeaders`)),e.getRightLeafHeaders=Y(()=>[e.getRightFlatHeaders()],e=>e.filter(e=>{var t;return!((t=e.subHeaders)!=null&&t.length)}),X(e.options,FG,`getRightLeafHeaders`)),e.getLeafHeaders=Y(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(e,t,n)=>[...e[0]?.headers??[],...t[0]?.headers??[],...n[0]?.headers??[]].map(e=>e.getLeafHeaders()).flat(),X(e.options,FG,`getLeafHeaders`))}};function RG(e,t,n,r){let i=0,a=function(e,t){t===void 0&&(t=1),i=Math.max(i,t),e.filter(e=>e.getIsVisible()).forEach(e=>{var n;(n=e.columns)!=null&&n.length&&a(e.columns,t+1)},0)};a(e);let o=[],s=(e,t)=>{let i={depth:t,id:[r,`${t}`].filter(Boolean).join(`_`),headers:[]},a=[];e.forEach(e=>{let o=[...a].reverse()[0],s=e.column.depth===i.depth,c,l=!1;if(s&&e.column.parent?c=e.column.parent:(c=e.column,l=!0),o&&o?.column===c)o.subHeaders.push(e);else{let i=IG(n,c,{id:[r,t,c.id,e?.id].filter(Boolean).join(`_`),isPlaceholder:l,placeholderId:l?`${a.filter(e=>e.column===c).length}`:void 0,depth:t,index:a.length});i.subHeaders.push(e),a.push(i)}i.headers.push(e),e.headerGroup=i}),o.push(i),t>0&&s(a,t-1)};s(t.map((e,t)=>IG(n,e,{depth:i,index:t})),i-1),o.reverse();let c=e=>e.filter(e=>e.column.getIsVisible()).map(e=>{let t=0,n=0,r=[0];e.subHeaders&&e.subHeaders.length?(r=[],c(e.subHeaders).forEach(e=>{let{colSpan:n,rowSpan:i}=e;t+=n,r.push(i)})):t=1;let i=Math.min(...r);return n+=i,e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}});return c(o[0]?.headers??[]),o}var zG=(e,t,n,r,i,a,o)=>{let s={id:t,index:r,original:n,depth:i,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(s._valuesCache.hasOwnProperty(t))return s._valuesCache[t];let n=e.getColumn(t);if(n!=null&&n.accessorFn)return s._valuesCache[t]=n.accessorFn(s.original,r),s._valuesCache[t]},getUniqueValues:t=>{if(s._uniqueValuesCache.hasOwnProperty(t))return s._uniqueValuesCache[t];let n=e.getColumn(t);if(n!=null&&n.accessorFn)return n.columnDef.getUniqueValues?(s._uniqueValuesCache[t]=n.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[t]):(s._uniqueValuesCache[t]=[s.getValue(t)],s._uniqueValuesCache[t])},renderValue:t=>s.getValue(t)??e.options.renderFallbackValue,subRows:a??[],getLeafRows:()=>MG(s.subRows,e=>e.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let e=[],t=s;for(;;){let n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:Y(()=>[e.getAllLeafColumns()],t=>t.map(t=>NG(e,s,t,t.id)),X(e.options,`debugRows`,`getAllCells`)),_getAllCellsByColumnId:Y(()=>[s.getAllCells()],e=>e.reduce((e,t)=>(e[t.column.id]=t,e),{}),X(e.options,`debugRows`,`getAllCellsByColumnId`))};for(let t=0;t<e._features.length;t++){let n=e._features[t];n==null||n.createRow==null||n.createRow(s,e)}return s},BG={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},VG=(e,t,n)=>{var r,i;let a=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(a))};VG.autoRemove=e=>ZG(e);var HG=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};HG.autoRemove=e=>ZG(e);var UG=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};UG.autoRemove=e=>ZG(e);var WG=(e,t,n)=>e.getValue(t)?.includes(n);WG.autoRemove=e=>ZG(e);var GG=(e,t,n)=>!n.some(n=>{var r;return!((r=e.getValue(t))!=null&&r.includes(n))});GG.autoRemove=e=>ZG(e)||!(e!=null&&e.length);var KG=(e,t,n)=>n.some(n=>e.getValue(t)?.includes(n));KG.autoRemove=e=>ZG(e)||!(e!=null&&e.length);var qG=(e,t,n)=>e.getValue(t)===n;qG.autoRemove=e=>ZG(e);var JG=(e,t,n)=>e.getValue(t)==n;JG.autoRemove=e=>ZG(e);var YG=(e,t,n)=>{let[r,i]=n,a=e.getValue(t);return a>=r&&a<=i};YG.resolveFilterValue=e=>{let[t,n]=e,r=typeof t==`number`?t:parseFloat(t),i=typeof n==`number`?n:parseFloat(n),a=t===null||Number.isNaN(r)?-1/0:r,o=n===null||Number.isNaN(i)?1/0:i;if(a>o){let e=a;a=o,o=e}return[a,o]},YG.autoRemove=e=>ZG(e)||ZG(e[0])&&ZG(e[1]);var XG={includesString:VG,includesStringSensitive:HG,equalsString:UG,arrIncludes:WG,arrIncludesAll:GG,arrIncludesSome:KG,equals:qG,weakEquals:JG,inNumberRange:YG};function ZG(e){return e==null||e===``}var QG={getDefaultColumnDef:()=>({filterFn:`auto`}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:kG(`columnFilters`,e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let n=t.getCoreRowModel().flatRows[0]?.getValue(e.id);return typeof n==`string`?XG.includesString:typeof n==`number`?XG.inNumberRange:typeof n==`boolean`||typeof n==`object`&&n?XG.equals:Array.isArray(n)?XG.arrIncludes:XG.weakEquals},e.getFilterFn=()=>AG(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn===`auto`?e.getAutoFilterFn():t.options.filterFns?.[e.columnDef.filterFn]??XG[e.columnDef.filterFn],e.getCanFilter=()=>(e.columnDef.enableColumnFilter??!0)&&(t.options.enableColumnFilters??!0)&&(t.options.enableFilters??!0)&&!!e.accessorFn,e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(t=>t.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>t.getState().columnFilters?.findIndex(t=>t.id===e.id)??-1,e.setFilterValue=n=>{t.setColumnFilters(t=>{let r=e.getFilterFn(),i=t?.find(t=>t.id===e.id),a=OG(n,i?i.value:void 0);if($G(r,a,e))return t?.filter(t=>t.id!==e.id)??[];let o={id:e.id,value:a};return i?t?.map(t=>t.id===e.id?o:t)??[]:t!=null&&t.length?[...t,o]:[o]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let n=e.getAllLeafColumns();e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(e=>OG(t,e)?.filter(e=>{let t=n.find(t=>t.id===e.id);return!(t&&$G(t.getFilterFn(),e.value,t))}))},e.resetColumnFilters=t=>{e.setColumnFilters(t?[]:e.initialState?.columnFilters??[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function $G(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||t===void 0||typeof t==`string`&&!t}var eK={sum:(e,t,n)=>n.reduce((t,n)=>{let r=n.getValue(e);return t+(typeof r==`number`?r:0)},0),min:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);n!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}),r},max:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);n!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}),r},extent:(e,t,n)=>{let r,i;return n.forEach(t=>{let n=t.getValue(e);n!=null&&(r===void 0?n>=n&&(r=i=n):(r>n&&(r=n),i<n&&(i=n)))}),[r,i]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(t=>{let i=t.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},median:(e,t)=>{if(!t.length)return;let n=t.map(t=>t.getValue(e));if(!jG(n))return;if(n.length===1)return n[0];let r=Math.floor(n.length/2),i=n.sort((e,t)=>e-t);return n.length%2==0?(i[r-1]+i[r])/2:i[r]},unique:(e,t)=>Array.from(new Set(t.map(t=>t.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(t=>t.getValue(e))).size,count:(e,t)=>t.length},tK={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t;return((t=e.getValue())==null||t.toString==null?void 0:t.toString())??null},aggregationFn:`auto`}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:kG(`grouping`,e),groupedColumnMode:`reorder`}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(t=>t!==e.id):[...t??[],e.id])},e.getCanGroup=()=>(e.columnDef.enableGrouping??!0)&&(t.options.enableGrouping??!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue),e.getIsGrouped=()=>t.getState().grouping?.includes(e.id),e.getGroupedIndex=()=>t.getState().grouping?.indexOf(e.id),e.getToggleGroupingHandler=()=>{let t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let n=t.getCoreRowModel().flatRows[0]?.getValue(e.id);if(typeof n==`number`)return eK.sum;if(Object.prototype.toString.call(n)===`[object Date]`)return eK.extent},e.getAggregationFn=()=>{if(!e)throw Error();return AG(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn===`auto`?e.getAutoAggregationFn():t.options.aggregationFns?.[e.columnDef.aggregationFn]??eK[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{e.setGrouping(t?[]:e.initialState?.grouping??[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];let r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((t=n.subRows)!=null&&t.length)}}};function nK(e,t,n){if(!(t!=null&&t.length)||!n)return e;let r=e.filter(e=>!t.includes(e.id));return n===`remove`?r:[...t.map(t=>e.find(e=>e.id===t)).filter(Boolean),...r]}var rK={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:kG(`columnOrder`,e)}),createColumn:(e,t)=>{e.getIndex=Y(e=>[mK(t,e)],t=>t.findIndex(t=>t.id===e.id),X(t.options,`debugColumns`,`getIndex`)),e.getIsFirstColumn=n=>mK(t,n)[0]?.id===e.id,e.getIsLastColumn=n=>{let r=mK(t,n);return r[r.length-1]?.id===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{e.setColumnOrder(t?[]:e.initialState.columnOrder??[])},e._getOrderColumnsFn=Y(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(e,t,n)=>r=>{let i=[];if(!(e!=null&&e.length))i=r;else{let t=[...e],n=[...r];for(;n.length&&t.length;){let e=t.shift(),r=n.findIndex(t=>t.id===e);r>-1&&i.push(n.splice(r,1)[0])}i=[...i,...n]}return nK(i,t,n)},X(e.options,`debugTable`,`_getOrderColumnsFn`))}},iK=()=>({left:[],right:[]}),aK={getInitialState:e=>({columnPinning:iK(),...e}),getDefaultOptions:e=>({onColumnPinningChange:kG(`columnPinning`,e)}),createColumn:(e,t)=>{e.pin=n=>{let r=e.getLeafColumns().map(e=>e.id).filter(Boolean);t.setColumnPinning(e=>n===`right`?{left:(e?.left??[]).filter(e=>!(r!=null&&r.includes(e))),right:[...(e?.right??[]).filter(e=>!(r!=null&&r.includes(e))),...r]}:n===`left`?{left:[...(e?.left??[]).filter(e=>!(r!=null&&r.includes(e))),...r],right:(e?.right??[]).filter(e=>!(r!=null&&r.includes(e)))}:{left:(e?.left??[]).filter(e=>!(r!=null&&r.includes(e))),right:(e?.right??[]).filter(e=>!(r!=null&&r.includes(e)))})},e.getCanPin=()=>e.getLeafColumns().some(e=>(e.columnDef.enablePinning??!0)&&(t.options.enableColumnPinning??t.options.enablePinning??!0)),e.getIsPinned=()=>{let n=e.getLeafColumns().map(e=>e.id),{left:r,right:i}=t.getState().columnPinning,a=n.some(e=>r?.includes(e)),o=n.some(e=>i?.includes(e));return a?`left`:o?`right`:!1},e.getPinnedIndex=()=>{var n;let r=e.getIsPinned();return r?((n=t.getState().columnPinning)==null||(n=n[r])==null?void 0:n.indexOf(e.id))??-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Y(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,t,n)=>{let r=[...t??[],...n??[]];return e.filter(e=>!r.includes(e.column.id))},X(t.options,`debugRows`,`getCenterVisibleCells`)),e.getLeftVisibleCells=Y(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(e,t)=>(t??[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:`left`})),X(t.options,`debugRows`,`getLeftVisibleCells`)),e.getRightVisibleCells=Y(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(e,t)=>(t??[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:`right`})),X(t.options,`debugRows`,`getRightVisibleCells`))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>e.setColumnPinning(t?iK():e.initialState?.columnPinning??iK()),e.getIsSomeColumnsPinned=t=>{let n=e.getState().columnPinning;return t?!!n[t]?.length:!!(n.left?.length||n.right?.length)},e.getLeftLeafColumns=Y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(e,t)=>(t??[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),X(e.options,`debugColumns`,`getLeftLeafColumns`)),e.getRightLeafColumns=Y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(e,t)=>(t??[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),X(e.options,`debugColumns`,`getRightLeafColumns`)),e.getCenterLeafColumns=Y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(e,t,n)=>{let r=[...t??[],...n??[]];return e.filter(e=>!r.includes(e.id))},X(e.options,`debugColumns`,`getCenterLeafColumns`))}};function oK(e){return e||(typeof document<`u`?document:null)}var sK={size:150,minSize:20,maxSize:2**53-1},cK=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),lK={getDefaultColumnDef:()=>sK,getInitialState:e=>({columnSizing:{},columnSizingInfo:cK(),...e}),getDefaultOptions:e=>({columnResizeMode:`onEnd`,columnResizeDirection:`ltr`,onColumnSizingChange:kG(`columnSizing`,e),onColumnSizingInfoChange:kG(`columnSizingInfo`,e)}),createColumn:(e,t)=>{e.getSize=()=>{let n=t.getState().columnSizing[e.id];return Math.min(Math.max(e.columnDef.minSize??sK.minSize,n??e.columnDef.size??sK.size),e.columnDef.maxSize??sK.maxSize)},e.getStart=Y(e=>[e,mK(t,e),t.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((e,t)=>e+t.getSize(),0),X(t.options,`debugColumns`,`getStart`)),e.getAfter=Y(e=>[e,mK(t,e),t.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((e,t)=>e+t.getSize(),0),X(t.options,`debugColumns`,`getAfter`)),e.resetSize=()=>{t.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>(e.columnDef.enableResizing??!0)&&(t.options.enableColumnResizing??!0),e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0,n=e=>{e.subHeaders.length?e.subHeaders.forEach(n):t+=e.column.getSize()??0};return n(e),t},e.getStart=()=>{if(e.index>0){let t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{let r=t.getColumn(e.column.id),i=r?.getCanResize();return a=>{if(!r||!i||(a.persist==null||a.persist(),fK(a)&&a.touches&&a.touches.length>1))return;let o=e.getSize(),s=e?e.getLeafHeaders().map(e=>[e.column.id,e.column.getSize()]):[[r.id,r.getSize()]],c=fK(a)?Math.round(a.touches[0].clientX):a.clientX,l={},u=(e,n)=>{typeof n==`number`&&(t.setColumnSizingInfo(e=>{let r=t.options.columnResizeDirection===`rtl`?-1:1,i=(n-(e?.startOffset??0))*r,a=Math.max(i/(e?.startSize??0),-.999999);return e.columnSizingStart.forEach(e=>{let[t,n]=e;l[t]=Math.round(Math.max(n+n*a,0)*100)/100}),{...e,deltaOffset:i,deltaPercentage:a}}),(t.options.columnResizeMode===`onChange`||e===`end`)&&t.setColumnSizing(e=>({...e,...l})))},d=e=>u(`move`,e),f=e=>{u(`end`,e),t.setColumnSizingInfo(e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=oK(n),m={moveHandler:e=>d(e.clientX),upHandler:e=>{p?.removeEventListener(`mousemove`,m.moveHandler),p?.removeEventListener(`mouseup`,m.upHandler),f(e.clientX)}},h={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{p?.removeEventListener(`touchmove`,h.moveHandler),p?.removeEventListener(`touchend`,h.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(e.touches[0]?.clientX)}},g=dK()?{passive:!1}:!1;fK(a)?(p?.addEventListener(`touchmove`,h.moveHandler,g),p?.addEventListener(`touchend`,h.upHandler,g)):(p?.addEventListener(`mousemove`,m.moveHandler,g),p?.addEventListener(`mouseup`,m.upHandler,g)),t.setColumnSizingInfo(e=>({...e,startOffset:c,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{e.setColumnSizing(t?{}:e.initialState.columnSizing??{})},e.resetHeaderSizeInfo=t=>{e.setColumnSizingInfo(t?cK():e.initialState.columnSizingInfo??cK())},e.getTotalSize=()=>e.getHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0,e.getLeftTotalSize=()=>e.getLeftHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0,e.getCenterTotalSize=()=>e.getCenterHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0,e.getRightTotalSize=()=>e.getRightHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0}},uK=null;function dK(){if(typeof uK==`boolean`)return uK;let e=!1;try{let t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener(`test`,n,t),window.removeEventListener(`test`,n)}catch{e=!1}return uK=e,uK}function fK(e){return e.type===`touchstart`}var pK={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:kG(`columnVisibility`,e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(t=>({...t,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{let n=e.columns;return(n.length?n.some(e=>e.getIsVisible()):t.getState().columnVisibility?.[e.id])??!0},e.getCanHide=()=>(e.columnDef.enableHiding??!0)&&(t.options.enableHiding??!0),e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Y(()=>[e.getAllCells(),t.getState().columnVisibility],e=>e.filter(e=>e.column.getIsVisible()),X(t.options,`debugRows`,`_getAllVisibleCells`)),e.getVisibleCells=Y(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(e,t,n)=>[...e,...t,...n],X(t.options,`debugRows`,`getVisibleCells`))},createTable:e=>{let t=(t,n)=>Y(()=>[n(),n().filter(e=>e.getIsVisible()).map(e=>e.id).join(`_`)],e=>e.filter(e=>e.getIsVisible==null?void 0:e.getIsVisible()),X(e.options,`debugColumns`,t));e.getVisibleFlatColumns=t(`getVisibleFlatColumns`,()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t(`getVisibleLeafColumns`,()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t(`getLeftVisibleLeafColumns`,()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t(`getRightVisibleLeafColumns`,()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t(`getCenterVisibleLeafColumns`,()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{e.setColumnVisibility(t?{}:e.initialState.columnVisibility??{})},e.toggleAllColumnsVisible=t=>{t??=!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((e,n)=>({...e,[n.id]:t||!(n.getCanHide!=null&&n.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(e=>!(e.getIsVisible!=null&&e.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(e=>e.getIsVisible==null?void 0:e.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{e.toggleAllColumnsVisible(t.target?.checked)}}};function mK(e,t){return t?t===`center`?e.getCenterVisibleLeafColumns():t===`left`?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var hK={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,`__global__`),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,`__global__`),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,`__global__`),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},gK={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:kG(`globalFilter`,e),globalFilterFn:`auto`,getColumnCanGlobalFilter:t=>{var n;let r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r==`string`||typeof r==`number`}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>(e.columnDef.enableGlobalFilter??!0)&&(t.options.enableGlobalFilter??!0)&&(t.options.enableFilters??!0)&&((t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))??!0)&&!!e.accessorFn},createTable:e=>{e.getGlobalAutoFilterFn=()=>XG.includesString,e.getGlobalFilterFn=()=>{let{globalFilterFn:t}=e.options;return AG(t)?t:t===`auto`?e.getGlobalAutoFilterFn():e.options.filterFns?.[t]??XG[t]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},_K={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:kG(`expanded`,e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{if(!t){e._queue(()=>{t=!0});return}if(e.options.autoResetAll??e.options.autoResetExpanded??!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=t=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{t??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{e.setExpanded(t?{}:e.initialState?.expanded??{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(e=>e.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>t=>{t.persist==null||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let t=e.getState().expanded;return t===!0||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{let t=e.getState().expanded;return typeof t==`boolean`?t===!0:!(!Object.keys(t).length||e.getRowModel().flatRows.some(e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(e=>{let n=e.split(`.`);t=Math.max(t,n.length)}),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{let i=r===!0?!0:!!(r!=null&&r[e.id]),a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(e=>{a[e]=!0}):a=r,n??=!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){let{[e.id]:t,...n}=a;return n}return r})},e.getIsExpanded=()=>{let n=t.getState().expanded;return!!((t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))??(n===!0||n?.[e.id]))},e.getCanExpand=()=>{var n;return(t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))??((t.options.enableExpanding??!0)&&!!((n=e.subRows)!=null&&n.length))},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{let t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},vK=0,yK=10,bK=()=>({pageIndex:vK,pageSize:yK}),xK={getInitialState:e=>({...e,pagination:{...bK(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:kG(`pagination`,e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{if(!t){e._queue(()=>{t=!0});return}if(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=t=>e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(e=>OG(t,e)),e.resetPagination=t=>{e.setPagination(t?bK():e.initialState.pagination??bK())},e.setPageIndex=t=>{e.setPagination(n=>{let r=OG(t,n.pageIndex),i=e.options.pageCount===void 0||e.options.pageCount===-1?2**53-1:e.options.pageCount-1;return r=Math.max(0,Math.min(r,i)),{...n,pageIndex:r}})},e.resetPageIndex=t=>{var n;e.setPageIndex(t?vK:((n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageIndex)??vK)},e.resetPageSize=t=>{var n;e.setPageSize(t?yK:((n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageSize)??yK)},e.setPageSize=t=>{e.setPagination(e=>{let n=Math.max(1,OG(t,e.pageSize)),r=e.pageSize*e.pageIndex,i=Math.floor(r/n);return{...e,pageIndex:i,pageSize:n}})},e.setPageCount=t=>e.setPagination(n=>{let r=OG(t,e.options.pageCount??-1);return typeof r==`number`&&(r=Math.max(-1,r)),{...n,pageCount:r}}),e.getPageOptions=Y(()=>[e.getPageCount()],e=>{let t=[];return e&&e>0&&(t=[...Array(e)].fill(null).map((e,t)=>t)),t},X(e.options,`debugTable`,`getPageOptions`)),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return n===-1?!0:n===0?!1:t<n-1},e.previousPage=()=>e.setPageIndex(e=>e-1),e.nextPage=()=>e.setPageIndex(e=>e+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>e.options.pageCount??Math.ceil(e.getRowCount()/e.getState().pagination.pageSize),e.getRowCount=()=>e.options.rowCount??e.getPrePaginationRowModel().rows.length}},SK=()=>({top:[],bottom:[]}),CK={getInitialState:e=>({rowPinning:SK(),...e}),getDefaultOptions:e=>({onRowPinningChange:kG(`rowPinning`,e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{let a=r?e.getLeafRows().map(e=>{let{id:t}=e;return t}):[],o=i?e.getParentRows().map(e=>{let{id:t}=e;return t}):[],s=new Set([...o,e.id,...a]);t.setRowPinning(e=>n===`bottom`?{top:(e?.top??[]).filter(e=>!(s!=null&&s.has(e))),bottom:[...(e?.bottom??[]).filter(e=>!(s!=null&&s.has(e))),...Array.from(s)]}:n===`top`?{top:[...(e?.top??[]).filter(e=>!(s!=null&&s.has(e))),...Array.from(s)],bottom:(e?.bottom??[]).filter(e=>!(s!=null&&s.has(e)))}:{top:(e?.top??[]).filter(e=>!(s!=null&&s.has(e))),bottom:(e?.bottom??[]).filter(e=>!(s!=null&&s.has(e)))})},e.getCanPin=()=>{let{enableRowPinning:n,enablePinning:r}=t.options;return typeof n==`function`?n(e):n??r??!0},e.getIsPinned=()=>{let n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,a=n.some(e=>r?.includes(e)),o=n.some(e=>i?.includes(e));return a?`top`:o?`bottom`:!1},e.getPinnedIndex=()=>{let n=e.getIsPinned();return n?((n===`top`?t.getTopRows():t.getBottomRows())?.map(e=>{let{id:t}=e;return t}))?.indexOf(e.id)??-1:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>e.setRowPinning(t?SK():e.initialState?.rowPinning??SK()),e.getIsSomeRowsPinned=t=>{let n=e.getState().rowPinning;return t?!!n[t]?.length:!!(n.top?.length||n.bottom?.length)},e._getPinnedRows=(t,n,r)=>(e.options.keepPinnedRows??!0?(n??[]).map(t=>{let n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null}):(n??[]).map(e=>t.find(t=>t.id===e))).filter(Boolean).map(e=>({...e,position:r})),e.getTopRows=Y(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,`top`),X(e.options,`debugRows`,`getTopRows`)),e.getBottomRows=Y(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,`bottom`),X(e.options,`debugRows`,`getBottomRows`)),e.getCenterRows=Y(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(e,t,n)=>{let r=new Set([...t??[],...n??[]]);return e.filter(e=>!r.has(e.id))},X(e.options,`debugRows`,`getCenterRows`))}},wK={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:kG(`rowSelection`,e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>e.setRowSelection(t?{}:e.initialState.rowSelection??{}),e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=t===void 0?!e.getIsAllRowsSelected():t;let r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(e=>{e.getCanSelect()&&(r[e.id]=!0)}):i.forEach(e=>{delete r[e.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{let r=t===void 0?!e.getIsAllPageRowsSelected():t,i={...n};return e.getRowModel().rows.forEach(t=>{TK(i,t.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Y(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?EK(e,n):{rows:[],flatRows:[],rowsById:{}},X(e.options,`debugTable`,`getSelectedRowModel`)),e.getFilteredSelectedRowModel=Y(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?EK(e,n):{rows:[],flatRows:[],rowsById:{}},X(e.options,`debugTable`,`getFilteredSelectedRowModel`)),e.getGroupedSelectedRowModel=Y(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?EK(e,n):{rows:[],flatRows:[],rowsById:{}},X(e.options,`debugTable`,`getGroupedSelectedRowModel`)),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState(),r=!!(t.length&&Object.keys(n).length);return r&&t.some(e=>e.getCanSelect()&&!n[e.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(e=>e.getCanSelect()),{rowSelection:n}=e.getState(),r=!!t.length;return r&&t.some(e=>!n[e.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{let t=Object.keys(e.getState().rowSelection??{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(e=>e.getCanSelect()).some(e=>e.getIsSelected()||e.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{let i=e.getIsSelected();t.setRowSelection(a=>{if(n=n===void 0?!i:n,e.getCanSelect()&&i===n)return a;let o={...a};return TK(o,e.id,n,r?.selectChildren??!0,t),o})},e.getIsSelected=()=>{let{rowSelection:n}=t.getState();return DK(e,n)},e.getIsSomeSelected=()=>{let{rowSelection:n}=t.getState();return OK(e,n)===`some`},e.getIsAllSubRowsSelected=()=>{let{rowSelection:n}=t.getState();return OK(e,n)===`all`},e.getCanSelect=()=>typeof t.options.enableRowSelection==`function`?t.options.enableRowSelection(e):t.options.enableRowSelection??!0,e.getCanSelectSubRows=()=>typeof t.options.enableSubRowSelection==`function`?t.options.enableSubRowSelection(e):t.options.enableSubRowSelection??!0,e.getCanMultiSelect=()=>typeof t.options.enableMultiRowSelection==`function`?t.options.enableMultiRowSelection(e):t.options.enableMultiRowSelection??!0,e.getToggleSelectedHandler=()=>{let t=e.getCanSelect();return n=>{t&&e.toggleSelected(n.target?.checked)}}}},TK=(e,t,n,r,i)=>{var a;let o=i.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(t=>delete e[t]),o.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(a=o.subRows)!=null&&a.length&&o.getCanSelectSubRows()&&o.subRows.forEach(t=>TK(e,t.id,n,r,i))};function EK(e,t){let n=e.getState().rowSelection,r=[],i={},a=function(e,t){return e.map(e=>{var t;let o=DK(e,n);if(o&&(r.push(e),i[e.id]=e),(t=e.subRows)!=null&&t.length&&(e={...e,subRows:a(e.subRows)}),o)return e}).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:i}}function DK(e,t){return t[e.id]??!1}function OK(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,a=!1;return e.subRows.forEach(e=>{if(!(a&&!i)&&(e.getCanSelect()&&(DK(e,t)?a=!0:i=!1),e.subRows&&e.subRows.length)){let n=OK(e,t);n===`all`?a=!0:(n===`some`&&(a=!0),i=!1)}}),i?`all`:a?`some`:!1}var kK=/([0-9]+)/gm,AK=(e,t,n)=>RK(LK(e.getValue(n)).toLowerCase(),LK(t.getValue(n)).toLowerCase()),jK=(e,t,n)=>RK(LK(e.getValue(n)),LK(t.getValue(n))),MK=(e,t,n)=>IK(LK(e.getValue(n)).toLowerCase(),LK(t.getValue(n)).toLowerCase()),NK=(e,t,n)=>IK(LK(e.getValue(n)),LK(t.getValue(n))),PK=(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},FK=(e,t,n)=>IK(e.getValue(n),t.getValue(n));function IK(e,t){return e===t?0:e>t?1:-1}function LK(e){return typeof e==`number`?isNaN(e)||e===1/0||e===-1/0?``:String(e):typeof e==`string`?e:``}function RK(e,t){let n=e.split(kK).filter(Boolean),r=t.split(kK).filter(Boolean);for(;n.length&&r.length;){let e=n.shift(),t=r.shift(),i=parseInt(e,10),a=parseInt(t,10),o=[i,a].sort();if(isNaN(o[0])){if(e>t)return 1;if(t>e)return-1;continue}if(isNaN(o[1]))return isNaN(i)?-1:1;if(i>a)return 1;if(a>i)return-1}return n.length-r.length}var zK={alphanumeric:AK,alphanumericCaseSensitive:jK,text:MK,textCaseSensitive:NK,datetime:PK,basic:FK},BK=[LG,pK,rK,aK,BG,QG,hK,gK,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:`auto`,sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:kG(`sorting`,e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let n=t.getFilteredRowModel().flatRows.slice(10),r=!1;for(let t of n){let n=t?.getValue(e.id);if(Object.prototype.toString.call(n)===`[object Date]`)return zK.datetime;if(typeof n==`string`&&(r=!0,n.split(kK).length>1))return zK.alphanumeric}return r?zK.text:zK.basic},e.getAutoSortDir=()=>typeof t.getFilteredRowModel().flatRows[0]?.getValue(e.id)==`string`?`asc`:`desc`,e.getSortingFn=()=>{if(!e)throw Error();return AG(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn===`auto`?e.getAutoSortingFn():t.options.sortingFns?.[e.columnDef.sortingFn]??zK[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{let i=e.getNextSortingOrder(),a=n!=null;t.setSorting(o=>{let s=o?.find(t=>t.id===e.id),c=o?.findIndex(t=>t.id===e.id),l=[],u,d=a?n:i===`desc`;return u=o!=null&&o.length&&e.getCanMultiSort()&&r?s?`toggle`:`add`:o!=null&&o.length&&c!==o.length-1?`replace`:s?`toggle`:`replace`,u===`toggle`&&(a||i||(u=`remove`)),u===`add`?(l=[...o,{id:e.id,desc:d}],l.splice(0,l.length-(t.options.maxMultiSortColCount??2**53-1))):l=u===`toggle`?o.map(t=>t.id===e.id?{...t,desc:d}:t):u===`remove`?o.filter(t=>t.id!==e.id):[{id:e.id,desc:d}],l})},e.getFirstSortDir=()=>e.columnDef.sortDescFirst??t.options.sortDescFirst??e.getAutoSortDir()===`desc`?`desc`:`asc`,e.getNextSortingOrder=n=>{let r=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==r&&(t.options.enableSortingRemoval??!0)&&(!n||(t.options.enableMultiRemove??!0))?!1:i===`desc`?`asc`:`desc`:r},e.getCanSort=()=>(e.columnDef.enableSorting??!0)&&(t.options.enableSorting??!0)&&!!e.accessorFn,e.getCanMultiSort=()=>e.columnDef.enableMultiSort??t.options.enableMultiSort??!!e.accessorFn,e.getIsSorted=()=>{let n=t.getState().sorting?.find(t=>t.id===e.id);return n?n.desc?`desc`:`asc`:!1},e.getSortIndex=()=>t.getState().sorting?.findIndex(t=>t.id===e.id)??-1,e.clearSorting=()=>{t.setSorting(t=>t!=null&&t.length?t.filter(t=>t.id!==e.id):[])},e.getToggleSortingHandler=()=>{let n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{e.setSorting(t?[]:e.initialState?.sorting??[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},tK,_K,xK,CK,wK,lK];function VK(e){process.env.NODE_ENV!==`production`&&(e.debugAll||e.debugTable)&&console.info(`Creating Table Instance...`);let t=[...BK,...e._features??[]],n={_features:t},r=n._features.reduce((e,t)=>Object.assign(e,t.getDefaultOptions==null?void 0:t.getDefaultOptions(n)),{}),i=e=>n.options.mergeOptions?n.options.mergeOptions(r,e):{...r,...e},a={...e.initialState??{}};n._features.forEach(e=>{a=(e.getInitialState==null?void 0:e.getInitialState(a))??a});let o=[],s=!1,c={_features:t,options:{...r,...e},initialState:a,_queue:e=>{o.push(e),s||(s=!0,Promise.resolve().then(()=>{for(;o.length;)o.shift()();s=!1}).catch(e=>setTimeout(()=>{throw e})))},reset:()=>{n.setState(n.initialState)},setOptions:e=>{n.options=i(OG(e,n.options))},getState:()=>n.options.state,setState:e=>{n.options.onStateChange==null||n.options.onStateChange(e)},_getRowId:(e,t,r)=>(n.options.getRowId==null?void 0:n.options.getRowId(e,t,r))??`${r?[r.id,t].join(`.`):t}`,getCoreRowModel:()=>(n._getCoreRowModel||=n.options.getCoreRowModel(n),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(e,t)=>{let r=(t?n.getPrePaginationRowModel():n.getRowModel()).rowsById[e];if(!r&&(r=n.getCoreRowModel().rowsById[e],!r))throw process.env.NODE_ENV===`production`?Error():Error(`getRow could not find row with ID: ${e}`);return r},_getDefaultColumnDef:Y(()=>[n.options.defaultColumn],e=>(e??={},{header:e=>{let t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t;return((t=e.renderValue())==null||t.toString==null?void 0:t.toString())??null},...n._features.reduce((e,t)=>Object.assign(e,t.getDefaultColumnDef==null?void 0:t.getDefaultColumnDef()),{}),...e}),X(e,`debugColumns`,`_getDefaultColumnDef`)),_getColumnDefs:()=>n.options.columns,getAllColumns:Y(()=>[n._getColumnDefs()],e=>{let t=function(e,r,i){return i===void 0&&(i=0),e.map(e=>{let a=PG(n,e,i,r),o=e;return a.columns=o.columns?t(o.columns,a,i+1):[],a})};return t(e)},X(e,`debugColumns`,`getAllColumns`)),getAllFlatColumns:Y(()=>[n.getAllColumns()],e=>e.flatMap(e=>e.getFlatColumns()),X(e,`debugColumns`,`getAllFlatColumns`)),_getAllFlatColumnsById:Y(()=>[n.getAllFlatColumns()],e=>e.reduce((e,t)=>(e[t.id]=t,e),{}),X(e,`debugColumns`,`getAllFlatColumnsById`)),getAllLeafColumns:Y(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(e,t)=>t(e.flatMap(e=>e.getLeafColumns())),X(e,`debugColumns`,`getAllLeafColumns`)),getColumn:e=>{let t=n._getAllFlatColumnsById()[e];return process.env.NODE_ENV!==`production`&&!t&&console.error(`[Table] Column with id '${e}' does not exist.`),t}};Object.assign(n,c);for(let e=0;e<n._features.length;e++){let t=n._features[e];t==null||t.createTable==null||t.createTable(n)}return n}function HK(){return e=>Y(()=>[e.options.data],t=>{let n={rows:[],flatRows:[],rowsById:{}},r=function(t,i,a){i===void 0&&(i=0);let o=[];for(let c=0;c<t.length;c++){let l=zG(e,e._getRowId(t[c],c,a),t[c],c,i,void 0,a?.id);if(n.flatRows.push(l),n.rowsById[l.id]=l,o.push(l),e.options.getSubRows){var s;l.originalSubRows=e.options.getSubRows(t[c],c),(s=l.originalSubRows)!=null&&s.length&&(l.subRows=r(l.originalSubRows,i+1,l))}}return o};return n.rows=r(t),n},X(e.options,`debugTable`,`getRowModel`,()=>e._autoResetPageIndex()))}function UK(){return e=>Y(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;let r=e.getState().sorting,i=[],a=r.filter(t=>e.getColumn(t.id)?.getCanSort()),o={};a.forEach(t=>{let n=e.getColumn(t.id);n&&(o[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})});let s=e=>{let t=e.map(e=>({...e}));return t.sort((e,t)=>{for(let n=0;n<a.length;n+=1){let r=a[n],i=o[r.id],s=i.sortUndefined,c=r?.desc??!1,l=0;if(s){let n=e.getValue(r.id),i=t.getValue(r.id),a=n===void 0,o=i===void 0;if(a||o){if(s===`first`)return a?-1:1;if(s===`last`)return a?1:-1;l=a&&o?0:a?s:-s}}if(l===0&&(l=i.sortingFn(e,t,r.id)),l!==0)return c&&(l*=-1),i.invertSorting&&(l*=-1),l}return e.index-t.index}),t.forEach(e=>{var t;i.push(e),(t=e.subRows)!=null&&t.length&&(e.subRows=s(e.subRows))}),t};return{rows:s(n.rows),flatRows:i,rowsById:n.rowsById}},X(e.options,`debugTable`,`getSortedRowModel`,()=>e._autoResetPageIndex()))}function WK(e,t){return e?GK(e)?B.createElement(e,t):e:null}function GK(e){return KK(e)||typeof e==`function`||qK(e)}function KK(e){return typeof e==`function`&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function qK(e){return typeof e==`object`&&typeof e.$$typeof==`symbol`&&[`react.memo`,`react.forward_ref`].includes(e.$$typeof.description)}function JK(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=B.useState(()=>({current:VK(t)})),[r,i]=B.useState(()=>n.current.initialState);return n.current.setOptions(t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{i(t),e.onStateChange==null||e.onStateChange(t)}})),n.current}function YK(e,t,n){try{return e(t)}catch(e){return rt("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":``),t,e,n),null}}function XK(e){function t(t){if(t===void 0)return null;let n=``;if(Array.isArray(t)){if(t[0]===void 0)return null;n=t[0]}return typeof t==`string`&&(n=t),YK(e.parse,n)}return{type:`single`,eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide(n){return t(n)??e}}},withOptions(e){return{...this,...e}}}}var ZK=XK({parse:e=>e,serialize:String}),QK=XK({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>``+Math.round(e)});XK({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>``+Math.round(e+1)}),XK({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return(t.length&1?`0`:``)+t}}),XK({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String}),XK({parse:e=>e.toLowerCase()===`true`,serialize:String});function $K(e,t){return e.valueOf()===t.valueOf()}XK({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>``+e.valueOf(),eq:$K}),XK({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:$K}),XK({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:$K});var eq=St(),tq={};function nq(e,t={}){let n=(0,B.useId)(),r=ht(),i=gt(),{history:a=`replace`,scroll:o=r?.scroll??!1,shallow:s=r?.shallow??!0,throttleMs:c=yt.timeMs,limitUrlUpdates:l=r?.limitUrlUpdates,clearOnDefault:u=r?.clearOnDefault??!0,startTransition:d,urlKeys:f=tq}=t,p=Object.keys(e).join(`,`),m=(0,B.useMemo)(()=>Object.fromEntries(Object.keys(e).map(e=>[e,f[e]??e])),[p,JSON.stringify(f)]),h=mt(Object.values(m)),g=h.searchParams,_=(0,B.useRef)({}),v=(0,B.useMemo)(()=>Object.fromEntries(Object.keys(e).map(t=>[t,e[t].defaultValue??null])),[Object.values(e).map(({defaultValue:e})=>e).join(`,`)]),y=jt.useQueuedQueries(Object.values(m)),[b,x]=(0,B.useState)(()=>rq(e,f,g??new URLSearchParams,y).state),S=(0,B.useRef)(b);if(nt("[nuq+ %s `%s`] render - state: %O, iSP: %s",n,p,b,g),Object.keys(_.current).join(`&`)!==Object.values(m).join(`&`)){let{state:t,hasChanged:r}=rq(e,f,g,y,_.current,S.current);r&&(nt("[nuq+ %s `%s`] State changed: %O",n,p,{state:t,initialSearchParams:g,queuedQueries:y,queryRef:_.current,stateRef:S.current}),S.current=t,x(t)),_.current=Object.fromEntries(Object.entries(m).map(([t,n])=>[n,e[t]?.type===`multi`?g?.getAll(n):g?.get(n)??null]))}(0,B.useEffect)(()=>{let{state:t,hasChanged:r}=rq(e,f,g,y,_.current,S.current);r&&(nt("[nuq+ %s `%s`] State changed: %O",n,p,{state:t,initialSearchParams:g,queuedQueries:y,queryRef:_.current,stateRef:S.current}),S.current=t,x(t))},[Object.values(m).map(e=>`${e}=${g?.getAll(e)}`).join(`&`),JSON.stringify(y)]),(0,B.useEffect)(()=>{let t=Object.keys(e).reduce((t,r)=>(t[r]=({state:t,query:i})=>{x(a=>{let{defaultValue:o}=e[r],s=m[r],c=t??o??null,l=a[r]??o??null;return Object.is(l,c)?(nt("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",n,p,s,t,o,S.current),a):(S.current={...S.current,[r]:c},_.current[s]=i,nt("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",n,p,s,t,o,S.current),S.current)})},t),{});for(let r of Object.keys(e)){let e=m[r];nt("[nuq+ %s `%s`] Subscribing to sync for `%s`",n,e,p),eq.on(e,t[r])}return()=>{for(let r of Object.keys(e)){let e=m[r];nt("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",n,e,p),eq.off(e,t[r])}}},[p,m]);let C=(0,B.useCallback)((t,r={})=>{let f=Object.fromEntries(Object.keys(e).map(e=>[e,null])),g=typeof t==`function`?t(iq(S.current,v))??f:t??f;nt("[nuq+ %s `%s`] setState: %O",n,p,g);let _,y=0,b=!1,x=[];for(let[t,n]of Object.entries(g)){let i=e[t],f=m[t];if(!i)continue;(r.clearOnDefault??i.clearOnDefault??u)&&n!==null&&i.defaultValue!==void 0&&(i.eq??((e,t)=>e===t))(n,i.defaultValue)&&(n=null);let p=n===null?null:(i.serialize??String)(n);eq.emit(f,{state:n,query:p});let g={key:f,query:p,options:{history:r.history??i.history??a,shallow:r.shallow??i.shallow??s,scroll:r.scroll??i.scroll??o,startTransition:r.startTransition??i.startTransition??d}};if(r?.limitUrlUpdates?.method===`debounce`||l?.method===`debounce`||i.limitUrlUpdates?.method===`debounce`){g.options.shallow===!0&&console.warn(st(422));let e=r?.limitUrlUpdates?.timeMs??l?.timeMs??i.limitUrlUpdates?.timeMs??yt.timeMs,t=jt.push(g,e,h);y<e&&(_=t,y=e)}else{let e=r?.limitUrlUpdates?.timeMs??i?.limitUrlUpdates?.timeMs??l?.timeMs??r.throttleMs??i.throttleMs??c;x.push(jt.abort(f)),Ot.push(g,e),b=!0}}let C=x.reduce((e,t)=>t(e),b?Ot.flush(h,i):Ot.getPendingPromise(h));return _??C},[p,a,s,o,c,l?.method,l?.timeMs,d,m,h.updateUrl,h.getSearchParamsSnapshot,h.rateLimitFactor,i,v]);return[(0,B.useMemo)(()=>iq(b,v),[b,v]),C]}function rq(e,t,n,r,i,a){let o=!1,s=Object.entries(e).reduce((e,[s,c])=>{let l=t?.[s]??s,u=r[l],d=c.type===`multi`?[]:null,f=u===void 0?(c.type===`multi`?n?.getAll(l):n?.get(l))??d:u;return i&&a&&Mt(i[l]??d,f)?(e[s]=a[s]??null,e):(o=!0,e[s]=(bt(f)?null:YK(c.parse,f,l))??null,i&&(i[l]=f),e)},{});if(!o){let t=Object.keys(e),n=Object.keys(a??{});o=t.length!==n.length||t.some(e=>!n.includes(e))}return{state:s,hasChanged:o}}function iq(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}var aq=R();function oq(e){let t=(0,aq.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,V.jsx)(Qr,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,V.jsx)(Zt,{className:`size-3.5`})}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,V.jsx)(Xr,{"data-slot":`checkbox`,className:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}var sq=R();function cq(e){let t=(0,sq.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`w-full caption-bottom text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,V.jsx)(`table`,{"data-slot":`table`,className:i,...r})}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function lq(e){let t=(0,sq.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`[&_tr]:border-b`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`thead`,{"data-slot":`table-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function uq(e){let t=(0,sq.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`[&_tr:last-child]:border-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`tbody`,{"data-slot":`table-body`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function dq(e){let t=(0,sq.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`tr`,{"data-slot":`table-row`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function fq(e){let t=(0,sq.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`th`,{"data-slot":`table-head`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function pq(e){let t=(0,sq.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`td`,{"data-slot":`table-cell`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}N();function mq(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Array(12).fill(0);var hq=1,gq=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:hq++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],B.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(vq(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!B.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!B.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!B.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!B.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||hq++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},_q=(e,t)=>{let n=t?.id||hq++;return gq.addToast({title:e,...t,id:n}),n},vq=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,yq=_q,bq=Object.assign(yq,{success:gq.success,info:gq.info,warning:gq.warning,error:gq.error,custom:gq.custom,message:gq.message,promise:gq.promise,dismiss:gq.dismiss,loading:gq.loading},{getHistory:()=>gq.toasts,getToasts:()=>gq.getActiveToasts()});mq(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);const xq={allowedExtensions:[`jpg`,`jpeg`,`png`,`gif`,`svg`,`webp`,`mp4`,`webm`,`mp3`,`wav`,`pdf`,`doc`,`docx`,`xls`,`xlsx`,`ppt`,`pptx`,`txt`,`md`,`csv`],allowedContentTypes:[`image/`,`video/`,`audio/`,`application/pdf`,`application/msword`,`application/vnd.ms-`,`application/vnd.openxmlformats`,`text/`],maxFileSizes:{direct:100*1024*1024,server:10*1024*1024}};function Sq(e){let t=e||xq.allowedExtensions,n=[],r=[];for(let e of t)r.push(`.${e}`),[`jpg`,`jpeg`].includes(e)?n.push(`image/jpeg`):e===`png`?n.push(`image/png`):e===`gif`?n.push(`image/gif`):e===`svg`?n.push(`image/svg+xml`):e===`webp`?n.push(`image/webp`):e===`mp4`?n.push(`video/mp4`):e===`webm`?n.push(`video/webm`):e===`mp3`?n.push(`audio/mpeg`):e===`wav`?n.push(`audio/wav`):e===`pdf`?n.push(`application/pdf`):e===`doc`?n.push(`application/msword`):e===`docx`?n.push(`application/vnd.openxmlformats-officedocument.wordprocessingml.document`):e===`xls`?n.push(`application/vnd.ms-excel`):e===`xlsx`?n.push(`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`):e===`ppt`?n.push(`application/vnd.ms-powerpoint`):e===`pptx`?n.push(`application/vnd.openxmlformats-officedocument.presentationml.presentation`):e===`txt`?n.push(`text/plain`):e===`md`?n.push(`text/markdown`):e===`csv`&&n.push(`text/csv`);return[...new Set([...n,...r])].join(`,`)}const Cq={avatar:{maxSize:2*1024*1024,accept:Sq([`jpg`,`jpeg`,`png`]),multiple:!1},image:{maxSize:5*1024*1024,accept:Sq([`jpg`,`jpeg`,`png`,`gif`,`svg`,`webp`]),multiple:!0},document:{maxSize:xq.maxFileSizes.server,accept:Sq([`pdf`,`doc`,`docx`,`xls`,`xlsx`,`ppt`,`pptx`]),multiple:!0},file:{maxSize:xq.maxFileSizes.direct,accept:Sq(),multiple:!0}};function wq(e,t=`size-4`){let n=(e.file instanceof File,e.file.type),r=(e.file instanceof File,e.file.name),i=`${t} opacity-60`;return n.includes(`pdf`)||r.endsWith(`.pdf`)||n.includes(`word`)||r.endsWith(`.doc`)||r.endsWith(`.docx`)?(0,V.jsx)(pn,{className:i}):n.includes(`zip`)||n.includes(`archive`)||r.endsWith(`.zip`)||r.endsWith(`.rar`)?(0,V.jsx)(dn,{className:i}):n.includes(`excel`)||r.endsWith(`.xls`)||r.endsWith(`.xlsx`)?(0,V.jsx)(fn,{className:i}):n.includes(`video/`)?(0,V.jsx)(jn,{className:i}):n.includes(`audio/`)?(0,V.jsx)(gn,{className:i}):n.startsWith(`image/`)?(0,V.jsx)(yn,{className:i}):(0,V.jsx)(hn,{className:i})}function Tq(e,t=``){let n=(e.file instanceof File,e.file.type),r=(e.file instanceof File,e.file.name),i=e=>(0,V.jsx)(`img`,{src:e,alt:r,className:`size-full rounded-t-[inherit] object-cover`});return(0,V.jsx)(`div`,{className:`flex aspect-square items-center justify-center overflow-hidden rounded-t-[inherit] bg-accent ${t}`,children:n.startsWith(`image/`)?e.preview?i(e.preview):e.file instanceof File?i(URL.createObjectURL(e.file)):`url`in e.file&&e.file.url?i(e.file.url):(0,V.jsx)(yn,{className:`size-5 opacity-60`}):wq(e,`size-5`)})}const Eq=(e={})=>{let t=e.preset?Cq[e.preset]:void 0,{maxFiles:n=1/0,maxSize:r=t?.maxSize??1/0,accept:i=t?.accept??Sq(),multiple:a=t?.multiple??!1,messages:o,initialFiles:s=[],onFilesChange:c,onFilesAdded:l,autoUpload:u=!0,serviceName:d,metadata:f,onFileUploaded:p}=e,m=$S.storage.getUploadUrl.useMutation(),h=$S.storage.createBlob.useMutation(),g=$S.storage.finalizeUpload.useMutation(),[_,v]=(0,B.useState)({files:s.map(e=>({file:e,id:e.id,preview:e.url})),isDragging:!1,errors:[]}),y=(0,B.useRef)(null),b=(0,B.useCallback)(e=>{let t=(e instanceof File,e.name);if(e.size>r){let e=`File "${t}" exceeds the maximum size of ${Dq(r)}.`;return o?.fileSizeError?o.fileSizeError.replace(`{fileName}`,t).replace(`{maxSize}`,Dq(r)):e}if(i!==`*`){let n=i.split(`,`).map(e=>e.trim()),r=e instanceof File?e.type||``:e.type,a=`.${e instanceof File,e.name.split(`.`).pop()}`;if(!n.some(e=>{if(e.startsWith(`.`))return a.toLowerCase()===e.toLowerCase();if(e.endsWith(`/*`)){let t=e.split(`/`)[0];return r.startsWith(`${t}/`)}return r===e})){let e=`File "${t}" is not an accepted file type.`;return o?.fileTypeError?o.fileTypeError.replace(`{fileName}`,t):e}}return null},[i,r,o]),x=(0,B.useCallback)(e=>e instanceof File?URL.createObjectURL(e):e.url,[]),S=(0,B.useCallback)(e=>e instanceof File?`${e.name}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`:e.id,[]),C=(0,B.useCallback)(async(e,t)=>{v(t=>({...t,files:t.files.map(t=>t.id===e?{...t,uploadStatus:`uploading`,uploadProgress:0}:t)}));try{let n=await m.mutateAsync({filename:t.name,contentType:t.type,serviceName:d,metadata:f}),r;if(n.method===`PUT`&&n.blobId){if(v(t=>({...t,files:t.files.map(t=>t.id===e?{...t,uploadProgress:25}:t)})),!(await fetch(n.url,{method:`PUT`,body:t,headers:{"Content-Type":t.type}})).ok)throw Error(`Failed to upload to S3`);v(t=>({...t,files:t.files.map(t=>t.id===e?{...t,uploadProgress:75}:t)})),await g.mutateAsync({blobId:n.blobId,actualSize:t.size}),r=n.blobId}else{v(t=>({...t,files:t.files.map(t=>t.id===e?{...t,uploadProgress:25}:t)}));let n=await new Promise((e,n)=>{let r=new FileReader;r.onload=()=>{let t=r.result.split(`,`)[1];e(t)},r.onerror=n,r.readAsDataURL(t)});v(t=>({...t,files:t.files.map(t=>t.id===e?{...t,uploadProgress:50}:t)}));let i=await h.mutateAsync({file:n,filename:t.name,contentType:t.type,metadata:f,serviceName:d});v(t=>({...t,files:t.files.map(t=>t.id===e?{...t,uploadProgress:90}:t)})),r=i.id}v(t=>({...t,files:t.files.map(t=>t.id===e?{...t,blobId:r,uploadStatus:`completed`,uploadProgress:100,uploadError:void 0}:t)}));let i=_.files.find(t=>t.id===e);i&&p?.({...i,blobId:r,uploadStatus:`completed`})}catch(t){let n=t instanceof Error?t.message:`Upload failed`;v(t=>({...t,files:t.files.map(t=>t.id===e?{...t,uploadStatus:`error`,uploadError:n,uploadProgress:0}:t)}))}},[m,h,g,d,f,p,_.files]),w=(0,B.useCallback)(()=>{v(e=>{e.files.forEach(e=>{e.preview&&e.file instanceof File&&e.file.type.startsWith(`image/`)&&URL.revokeObjectURL(e.preview)}),y.current&&(y.current.value=``);let t={...e,files:[],errors:[]};return c?.(t.files),t})},[c]),T=(0,B.useCallback)(e=>{if(!e||e.length===0)return;let t=Array.from(e),i=[];if(v(e=>({...e,errors:[]})),a||w(),a&&n!==1/0&&_.files.length+t.length>n){let e=`You can only upload a maximum of ${n} files.`,t=o?.maxFilesError?o.maxFilesError.replace(`{maxFiles}`,String(n)):e;i.push(t),v(e=>({...e,errors:i}));return}let s=[];if(t.forEach(e=>{if(a&&_.files.some(t=>t.file.name===e.name&&t.file.size===e.size))return;if(e.size>r){let t=a?`Some files exceed the maximum size of ${Dq(r)}.`:`File exceeds the maximum size of ${Dq(r)}.`,n=!a&&o?.maxFilesErrorSingle?o.maxFilesErrorSingle.replace(`{maxSize}`,Dq(r)):o?.fileSizeError?o.fileSizeError.replace(`{fileName}`,e.name).replace(`{maxSize}`,Dq(r)):t;i.push(n);return}let t=b(e);t?i.push(t):s.push({file:e,id:S(e),preview:x(e)})}),s.length>0){let e=s.map(e=>({...e,uploadStatus:`pending`,uploadProgress:0}));l?.(e),v(t=>{let n=a?[...t.files,...e]:e;return c?.(n),{...t,files:n,errors:i}}),u&&e.forEach(e=>{e.file instanceof File&&C(e.id,e.file)})}else i.length>0&&v(e=>({...e,errors:i}));y.current&&(y.current.value=``)},[_.files,n,a,r,o,b,x,S,w,c,l,u,C]),E=(0,B.useCallback)(e=>{v(t=>{let n=t.files.find(t=>t.id===e);n?.preview&&n.file instanceof File&&n.file.type.startsWith(`image/`)&&URL.revokeObjectURL(n.preview);let r=t.files.filter(t=>t.id!==e);return c?.(r),{...t,files:r,errors:[]}})},[c]),D=(0,B.useCallback)(()=>{v(e=>({...e,errors:[]}))},[]),O=(0,B.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),v(e=>({...e,isDragging:!0}))},[]),k=(0,B.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),!e.currentTarget.contains(e.relatedTarget)&&v(e=>({...e,isDragging:!1}))},[]),A=(0,B.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),j=(0,B.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),v(e=>({...e,isDragging:!1})),!y.current?.disabled&&e.dataTransfer.files&&e.dataTransfer.files.length>0)if(a)T(e.dataTransfer.files);else{let t=e.dataTransfer.files[0];T([t])}},[T,a]),M=(0,B.useCallback)(e=>{e.target.files&&e.target.files.length>0&&T(e.target.files)},[T]);return[_,{addFiles:T,removeFile:E,clearFiles:w,clearErrors:D,handleDragEnter:O,handleDragLeave:k,handleDragOver:A,handleDrop:j,handleFileChange:M,openFileDialog:(0,B.useCallback)(()=>{y.current&&y.current.click()},[]),getInputProps:(0,B.useCallback)((e={})=>({...e,type:`file`,onChange:M,accept:e.accept||i,multiple:e.multiple===void 0?a:e.multiple,ref:y}),[i,a,M])}]},Dq=(e,t=2)=>{if(e===0)return`0 Bytes`;let n=1024,r=t<0?0:t,i=[`Bytes`,`KB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],a=Math.floor(Math.log(e)/Math.log(n));return Number.parseFloat((e/n**a).toFixed(r))+i[a]};var Oq={message:(e,t)=>{bq[e.variant](e.message)},redirect:(e,t)=>{e.newTab?window.open(e.url,`_blank`,`noopener,noreferrer`):window.location.href=e.url},download:(e,t)=>{let n=document.createElement(`a`);n.href=e.url,e.filename&&(n.download=e.filename),document.body.appendChild(n),n.click(),document.body.removeChild(n)},visit:(e,t)=>{t.navigate(e.path)},modal:(e,t)=>{window.dispatchEvent(new CustomEvent(`resource-table:open-modal`,{detail:{component:e.component,props:e.props||{}}}))},emit:(e,t)=>{window.dispatchEvent(new CustomEvent(e.event,{detail:e.data}))}};function kq(e,t){e&&Oq[e.type](e,t)}function Aq(e){return{key:`download`,label:`translation:admin.storage.actions.download`,bulk:!1,icon:`download`,onSuccess:e=>({type:`download`,url:e.url,filename:e.filename}),...e}}function jq(e){return{key:`preview`,label:`translation:admin.storage.actions.preview`,bulk:!1,icon:`eye`,onSuccess:e=>import(`./file-preview-dialog-qWSViOWQ.js`).then(t=>({type:`modal`,component:t.FilePreviewDialog,props:{url:e.url,contentType:e.contentType,filename:e.filename}})),...e}}function Mq(e){return{key:`delete`,label:`translation:admin.storage.actions.delete`,bulk:!0,confirmation:!0,icon:`trash`,standalone:!0,onSuccess:()=>({type:`message`,message:`translation:admin.storage.actions.deleteSuccess`,variant:`success`}),...e}}function Nq(e,t){if(!t)return String(e??``);if(typeof t==`function`)return t(e);switch(t){case`bytes`:return Dq(typeof e==`number`?e:0);case`date`:return e?new Date(e).toLocaleDateString():``;case`datetime`:return e?new Date(e).toLocaleString():``;case`number`:return typeof e==`number`?e.toLocaleString():``;default:return String(e??``)}}function Pq(e){switch(e){case`download`:return sn;case`eye`:case`preview`:return un;case`trash`:case`delete`:return On;default:return null}}async function Fq({action:e,rowId:t,mutations:n,onComplete:r,navigate:i,t:a}){try{let a=await n[e.key].mutateAsync({id:t}),o={ids:[t],refetch:r,navigate:i};e.onSuccess&&kq(await e.onSuccess(a,o),o),r()}catch(e){bq.error(e.message||a(`translation:admin.resourceTable.errors.actionFailed`))}}async function Iq({action:e,ids:t,mutations:n,onComplete:r,navigate:i,t:a}){try{let a=await n[e.key].mutateAsync({ids:t}),o={ids:t,refetch:r,navigate:i};e.onSuccess&&kq(await e.onSuccess(a,o),o),r()}catch(e){bq.error(e.message||a(`translation:admin.resourceTable.errors.actionFailed`))}}var Lq=R();function Rq(e){let t=(0,Lq.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,V.jsx)(mr,{"data-slot":`alert-dialog`,...n}),t[2]=n,t[3]=r),r}function zq(e){let t=(0,Lq.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,V.jsx)(hr,{"data-slot":`alert-dialog-portal`,...n}),t[2]=n,t[3]=r),r}function Bq(e){let t=(0,Lq.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(gr,{"data-slot":`alert-dialog-overlay`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Vq(e){let t=(0,Lq.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,V.jsx)(Bq,{}),t[3]=i):i=t[3];let a;t[4]===n?a=t[5]:(a=z(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==a?(o=(0,V.jsxs)(zq,{children:[i,(0,V.jsx)(_r,{"data-slot":`alert-dialog-content`,className:a,...r})]}),t[6]=r,t[7]=a,t[8]=o):o=t[8],o}function Hq(e){let t=(0,Lq.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`flex flex-col gap-2 text-center sm:text-left`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Uq(e){let t=(0,Lq.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Wq(e){let t=(0,Lq.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`text-lg font-semibold`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(br,{"data-slot":`alert-dialog-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Gq(e){let t=(0,Lq.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`text-muted-foreground text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(xr,{"data-slot":`alert-dialog-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Kq(e){let t=(0,Lq.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(Fn(),n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(vr,{className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function qq(e){let t=(0,Lq.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(Fn({variant:`outline`}),n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(yr,{className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Jq=R();function Yq(e){let t=(0,Jq.c)(41),{open:n,onOpenChange:r,action:i,onConfirm:a,t:o}=e;if(!i?.confirmation)return null;let s;t[0]===i.icon?s=t[1]:(s=Pq(i.icon),t[0]=i.icon,t[1]=s);let c=s,l=typeof i.confirmation==`object`&&i.confirmation.title?i.confirmation.title:`translation:admin.resourceTable.confirmDialog.title`,u;t[2]!==o||t[3]!==l?(u=o(l),t[2]=o,t[3]=l,t[4]=u):u=t[4];let d;t[5]===u?d=t[6]:(d=(0,V.jsx)(Wq,{children:u}),t[5]=u,t[6]=d);let f=typeof i.confirmation==`object`&&i.confirmation.description?i.confirmation.description:`translation:admin.resourceTable.confirmDialog.description`,p;t[7]!==o||t[8]!==f?(p=o(f),t[7]=o,t[8]=f,t[9]=p):p=t[9];let m;t[10]===p?m=t[11]:(m=(0,V.jsx)(Gq,{children:p}),t[10]=p,t[11]=m);let h;t[12]!==d||t[13]!==m?(h=(0,V.jsxs)(Hq,{children:[d,m]}),t[12]=d,t[13]=m,t[14]=h):h=t[14];let g;t[15]===o?g=t[16]:(g=o(`translation:admin.resourceTable.confirmDialog.cancel`),t[15]=o,t[16]=g);let _;t[17]===g?_=t[18]:(_=(0,V.jsx)(qq,{children:g}),t[17]=g,t[18]=_);let v=i.key===`delete`,y;t[19]===v?y=t[20]:(y=z({"bg-red-500 hover:bg-destructive":v}),t[19]=v,t[20]=y);let b;t[21]===c?b=t[22]:(b=c&&(0,V.jsx)(c,{className:`size-4`}),t[21]=c,t[22]=b);let x;t[23]!==i.label||t[24]!==o?(x=o(i.label),t[23]=i.label,t[24]=o,t[25]=x):x=t[25];let S;t[26]!==a||t[27]!==y||t[28]!==b||t[29]!==x?(S=(0,V.jsxs)(Kq,{className:y,onClick:a,children:[b,x]}),t[26]=a,t[27]=y,t[28]=b,t[29]=x,t[30]=S):S=t[30];let C;t[31]!==_||t[32]!==S?(C=(0,V.jsxs)(Uq,{children:[_,S]}),t[31]=_,t[32]=S,t[33]=C):C=t[33];let w;t[34]!==C||t[35]!==h?(w=(0,V.jsxs)(Vq,{children:[h,C]}),t[34]=C,t[35]=h,t[36]=w):w=t[36];let T;return t[37]!==r||t[38]!==n||t[39]!==w?(T=(0,V.jsx)(Rq,{open:n,onOpenChange:r,children:w}),t[37]=r,t[38]=n,t[39]=w,t[40]=T):T=t[40],T}var Xq=R();function Zq(e){let t=(0,Xq.c)(38),{actions:n,row:r,mutations:i,onComplete:a,navigate:o,t:s}=e,[c,l]=(0,B.useState)(!1),[u,d]=(0,B.useState)(null),f;t[0]!==i||t[1]!==o||t[2]!==a||t[3]!==r||t[4]!==s?(f=async e=>{if(e.confirmation){d(e),l(!0);return}await Fq({action:e,rowId:r.id,mutations:i,onComplete:a,navigate:o,t:s})},t[0]=i,t[1]=o,t[2]=a,t[3]=r,t[4]=s,t[5]=f):f=t[5];let p=f,m;t[6]!==i||t[7]!==o||t[8]!==a||t[9]!==r||t[10]!==u||t[11]!==s?(m=async()=>{u&&(await Fq({action:u,rowId:r.id,mutations:i,onComplete:a,navigate:o,t:s}),l(!1))},t[6]=i,t[7]=o,t[8]=a,t[9]=r,t[10]=u,t[11]=s,t[12]=m):m=t[12];let h=m,g;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,V.jsx)(cn,{className:`size-4`}),t[13]=g):g=t[13];let _;t[14]===s?_=t[15]:(_=s(`translation:admin.resourceTable.columns.actions`),t[14]=s,t[15]=_);let v;t[16]===_?v=t[17]:(v=(0,V.jsx)(Kw,{asChild:!0,children:(0,V.jsxs)(H,{variant:`ghost`,size:`sm`,children:[g,(0,V.jsx)(`span`,{className:`sr-only`,children:_})]})}),t[16]=_,t[17]=v);let y;if(t[18]!==n||t[19]!==p||t[20]!==s){let e;t[22]!==p||t[23]!==s?(e=e=>{let t=Pq(e.icon);return(0,V.jsxs)(Yw,{onClick:()=>p(e),variant:e.key===`delete`?`destructive`:`default`,children:[t&&(0,V.jsx)(t,{className:`size-4`}),s(e.label)]},e.key)},t[22]=p,t[23]=s,t[24]=e):e=t[24],y=n.map(e),t[18]=n,t[19]=p,t[20]=s,t[21]=y}else y=t[21];let b;t[25]===y?b=t[26]:(b=(0,V.jsx)(qw,{align:`end`,children:y}),t[25]=y,t[26]=b);let x;t[27]!==v||t[28]!==b?(x=(0,V.jsxs)(Gw,{children:[v,b]}),t[27]=v,t[28]=b,t[29]=x):x=t[29];let S;t[30]!==c||t[31]!==h||t[32]!==u||t[33]!==s?(S=(0,V.jsx)(Yq,{open:c,onOpenChange:l,action:u,onConfirm:h,t:s}),t[30]=c,t[31]=h,t[32]=u,t[33]=s,t[34]=S):S=t[34];let C;return t[35]!==x||t[36]!==S?(C=(0,V.jsxs)(V.Fragment,{children:[x,S]}),t[35]=x,t[36]=S,t[37]=C):C=t[37],C}var Qq=R();function $q(e){let t=(0,Qq.c)(35),{actions:n,selectedRowIds:r,mutations:i,refetch:a,navigate:o,t:s,table:c}=e,[l,u]=(0,B.useState)(!1),[d,f]=(0,B.useState)(null),p,m,h,g,_;if(t[0]!==n||t[1]!==i||t[2]!==o||t[3]!==d||t[4]!==a||t[5]!==r||t[6]!==s||t[7]!==c){_=Symbol.for(`react.early_return_sentinel`);bb0:{let e=n.filter(eJ);if(!e||e.length===0){_=null;break bb0}let[l,...v]=e,y=Pq(l.icon),b;t[13]!==i||t[14]!==o||t[15]!==a||t[16]!==r||t[17]!==s||t[18]!==c?(b=async e=>{await Iq({action:e,ids:r,mutations:i,onComplete:()=>{c.resetRowSelection(),a()},navigate:o,t:s})},t[13]=i,t[14]=o,t[15]=a,t[16]=r,t[17]=s,t[18]=c,t[19]=b):b=t[19];let x=b,S;t[20]===x?S=t[21]:(S=async e=>{if(e.confirmation){f(e),u(!0);return}await x(e)},t[20]=x,t[21]=S);let C=S,w;t[22]!==x||t[23]!==d?(w=async()=>{d&&(await x(d),u(!1),f(null))},t[22]=x,t[23]=d,t[24]=w):w=t[24],p=w,m=y&&(0,V.jsxs)(DC,{children:[(0,V.jsx)(OC,{asChild:!0,children:(0,V.jsx)(H,{variant:`ghost`,size:`icon`,className:`size-8`,onClick:()=>C(l),children:(0,V.jsx)(y,{className:l.key===`delete`?`size-4 text-destructive`:`size-4`})})}),(0,V.jsx)(kC,{children:s(l.label)})]}),h=(0,V.jsx)(`div`,{className:`hidden sm:flex items-center gap-0.5`,children:v.map(e=>{let t=Pq(e.icon);return t?(0,V.jsxs)(DC,{children:[(0,V.jsx)(OC,{asChild:!0,children:(0,V.jsx)(H,{variant:`ghost`,size:`icon`,className:`size-8`,onClick:()=>C(e),children:(0,V.jsx)(t,{className:e.key===`delete`?`size-4 text-destructive`:`size-4`})})}),(0,V.jsx)(kC,{children:s(e.label)})]},e.key):null})}),g=v.length>0&&(0,V.jsx)(`div`,{className:`sm:hidden`,children:(0,V.jsxs)(Gw,{children:[(0,V.jsx)(Kw,{asChild:!0,children:(0,V.jsx)(H,{variant:`ghost`,size:`icon`,className:`size-8`,children:(0,V.jsx)(cn,{className:`size-4`})})}),(0,V.jsx)(qw,{align:`end`,children:v.map(e=>{let t=Pq(e.icon);return(0,V.jsxs)(Yw,{onClick:()=>C(e),className:e.key===`delete`?`text-destructive`:void 0,children:[t&&(0,V.jsx)(t,{className:`mr-2 size-4`}),s(e.label)]},e.key)})})]})})}t[0]=n,t[1]=i,t[2]=o,t[3]=d,t[4]=a,t[5]=r,t[6]=s,t[7]=c,t[8]=p,t[9]=m,t[10]=h,t[11]=g,t[12]=_}else p=t[8],m=t[9],h=t[10],g=t[11],_=t[12];if(_!==Symbol.for(`react.early_return_sentinel`))return _;let v;t[25]!==l||t[26]!==p||t[27]!==d||t[28]!==s?(v=(0,V.jsx)(Yq,{open:l,onOpenChange:u,action:d,onConfirm:p,t:s}),t[25]=l,t[26]=p,t[27]=d,t[28]=s,t[29]=v):v=t[29];let y;return t[30]!==m||t[31]!==h||t[32]!==g||t[33]!==v?(y=(0,V.jsxs)(V.Fragment,{children:[m,h,g,v]}),t[30]=m,t[31]=h,t[32]=g,t[33]=v,t[34]=y):y=t[34],y}function eJ(e){return e.bulk}function tJ({config:e,router:t}){let{t:n}=me([`translation`]),r=f(),i=e.pagination.type===`cursor`,[a,o]=nq({cursorAfter:ZK.withDefault(``),cursorBefore:ZK.withDefault(``),page:QK.withDefault(1),pageSize:QK.withDefault(e.pagination.defaultPageSize),search:ZK.withDefault(``),filters:ZK.withDefault(``),orderBy:ZK.withDefault(``)},{history:`push`}),{cursorAfter:s,cursorBefore:c,page:l,pageSize:u,search:d}=a,p=a.filters?JSON.parse(a.filters):{},m=a.orderBy?JSON.parse(a.orderBy):void 0,[h,g]=(0,B.useState)(m?[{id:m.column,desc:m.direction===`desc`}]:[]),[_,v]=(0,B.useState)({}),[y,b]=(0,B.useState)({open:!1,component:null,props:{}});(0,B.useEffect)(()=>{let e=e=>{b({open:!0,component:e.detail.component,props:e.detail.props})};return window.addEventListener(`resource-table:open-modal`,e),()=>{window.removeEventListener(`resource-table:open-modal`,e)}},[]);let x=e=>{let t=typeof e==`function`?e(h):e;if(g(t),t.length>0){let e=t[0];o({orderBy:JSON.stringify({column:e.id,direction:e.desc?`desc`:`asc`}),cursorAfter:null,cursorBefore:null})}else o({orderBy:``,cursorAfter:null,cursorBefore:null})},S=t.actions.download?.useMutation(),C=t.actions.preview?.useMutation(),w=t.actions.delete?.useMutation(),T=(0,B.useMemo)(()=>({download:S,preview:C,delete:w}),[S,C,w]),E={...i?{cursor:s&&s!==``?JSON.parse(s):void 0,cursorBefore:c&&c!==``?JSON.parse(c):void 0}:{page:l},pageSize:u||void 0,filters:Object.keys(p).length>0?p:void 0,search:d||void 0,orderBy:m||void 0},{data:D,isLoading:O,refetch:k}=t[i?`listCursor`:`listOffset`].useQuery(E),A=i?D:void 0,j=i?void 0:D,M=(0,B.useMemo)(()=>{let t=[{id:`select`,header:({table:e})=>(0,V.jsx)(oq,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&`indeterminate`,onCheckedChange:t=>e.toggleAllPageRowsSelected(!!t),"aria-label":n(`translation:admin.resourceTable.selection.selectAll`)}),cell:({row:e})=>(0,V.jsx)(oq,{checked:e.getIsSelected(),onCheckedChange:t=>e.toggleSelected(!!t),"aria-label":n(`translation:admin.resourceTable.selection.selectRow`)}),enableSorting:!1,enableHiding:!1}];for(let r of e.fields)t.push({id:r.key,accessorKey:r.key,header:({column:e})=>r.sortable?(0,V.jsxs)(H,{variant:`ghost`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),className:`-ml-4`,children:[n(r.label),e.getIsSorted()===`asc`?(0,V.jsx)(Xt,{className:`ml-2 size-3.5`}):e.getIsSorted()===`desc`?(0,V.jsx)(qt,{className:`ml-2 size-3.5`}):(0,V.jsx)(Yt,{className:`ml-2 size-3.5 opacity-50`})]}):(0,V.jsx)(`div`,{children:n(r.label)}),cell:({getValue:e})=>Nq(e(),r.format),enableSorting:r.sortable||!1});return e.actions&&e.actions.filter(e=>!e.bulk||e.standalone).length>0&&t.push({id:`actions`,header:()=>n(`translation:admin.resourceTable.columns.actions`),cell:({row:t})=>(0,V.jsx)(Zq,{actions:e.actions.filter(e=>!e.bulk||e.standalone),row:t.original,mutations:T,onComplete:k,navigate:r,t:n}),enableSorting:!1,enableHiding:!1}),t},[e.fields,e.actions,n,T,k,r]),N=JK({data:D?.data??[],columns:M,state:{sorting:h,rowSelection:_},onSortingChange:x,onRowSelectionChange:v,getCoreRowModel:HK(),getSortedRowModel:UK(),manualPagination:!0,manualSorting:!0,manualFiltering:!0,enableRowSelection:!0}),P=N.getSelectedRowModel().rows.map(e=>e.original.id);return(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-4`,children:[(0,V.jsxs)(`div`,{className:`relative w-full sm:max-w-sm`,children:[(0,V.jsx)(mC,{placeholder:n(`translation:admin.resourceTable.search.placeholder`),value:d,onChange:e=>o({search:e.target.value,cursorAfter:null,cursorBefore:null}),onKeyDown:e=>{e.key===`Escape`&&d&&(e.stopPropagation(),o({search:``,cursorAfter:null,cursorBefore:null}))},className:`w-full`}),d&&(0,V.jsx)(`button`,{type:`button`,onClick:e=>{e.preventDefault(),o({search:``,cursorAfter:null,cursorBefore:null})},className:`absolute right-2 top-1/2 -translate-y-1/2 flex items-center justify-center hover:bg-accent rounded-sm p-0.5 transition-colors`,"aria-label":n(`translation:admin.resourceTable.search.clearLabel`),children:(0,V.jsx)(Ie,{className:`size-3.5 opacity-50 hover:opacity-100`})})]}),e.filters?.map(e=>(0,V.jsxs)(`div`,{className:`relative w-full sm:w-auto`,children:[(0,V.jsxs)(tG,{value:p[e.key]?.toString(),onValueChange:t=>{o({filters:JSON.stringify({...p,[e.key]:t}),cursorAfter:null,cursorBefore:null})},children:[(0,V.jsx)(rG,{className:`w-full sm:min-w-48`,onKeyDown:t=>{if(t.key===`Escape`&&p[e.key]){t.stopPropagation();let{[e.key]:n,...r}=p;o({filters:Object.keys(r).length>0?JSON.stringify(r):``,cursorAfter:null,cursorBefore:null})}},children:(0,V.jsx)(nG,{placeholder:n(`translation:admin.resourceTable.filter.all`,{label:n(e.label)})})}),(0,V.jsx)(iG,{children:e.options?.map(e=>(0,V.jsx)(aG,{value:String(e.value),children:n(e.label)},e.value))})]},`${e.key}-${p[e.key]??`empty`}`),p[e.key]&&(0,V.jsx)(`button`,{type:`button`,onPointerDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:t=>{t.preventDefault(),t.stopPropagation();let{[e.key]:n,...r}=p;o({filters:Object.keys(r).length>0?JSON.stringify(r):``,cursorAfter:null,cursorBefore:null})},className:`absolute right-8 top-1/2 -translate-y-1/2 z-10 flex items-center justify-center hover:bg-accent rounded-sm p-0.5 transition-colors`,"aria-label":n(`translation:admin.resourceTable.filter.clearLabel`),children:(0,V.jsx)(Ie,{className:`size-3.5 opacity-50 hover:opacity-100`})})]},e.key))]}),(0,V.jsx)(`div`,{className:`rounded-md border overflow-x-auto`,children:(0,V.jsxs)(cq,{children:[(0,V.jsx)(lq,{children:N.getHeaderGroups().map(t=>(0,V.jsx)(dq,{children:P.length>0?(0,V.jsx)(fq,{colSpan:M.length,className:`h-10`,children:(0,V.jsxs)(`div`,{className:`flex items-center gap-2 -my-2`,children:[(0,V.jsx)(H,{variant:`ghost`,size:`icon`,className:`size-4`,onClick:()=>N.resetRowSelection(),children:(0,V.jsx)(Ie,{className:`size-4`})}),(0,V.jsx)(`span`,{className:`text-sm font-medium ml-4`,children:n(`translation:admin.resourceTable.actions.selected`,{count:P.length})}),(0,V.jsx)(`div`,{className:`flex items-center gap-0.5 ml-auto`,children:e.actions&&(0,V.jsx)($q,{actions:e.actions,selectedRowIds:P,mutations:T,refetch:k,navigate:r,t:n,table:N})})]})}):t.headers.map(e=>(0,V.jsx)(fq,{children:e.isPlaceholder?null:WK(e.column.columnDef.header,e.getContext())},e.id))},t.id))}),(0,V.jsx)(uq,{children:O?(0,V.jsx)(dq,{children:(0,V.jsx)(pq,{colSpan:M.length,className:`h-24 text-center text-muted-foreground`,children:n(`translation:admin.resourceTable.loading`)})}):N.getRowModel().rows?.length?N.getRowModel().rows.map(e=>(0,V.jsx)(dq,{"data-state":e.getIsSelected()&&`selected`,children:e.getVisibleCells().map(e=>(0,V.jsx)(pq,{children:WK(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,V.jsx)(dq,{children:(0,V.jsx)(pq,{colSpan:M.length,className:`p-0`,children:(0,V.jsx)(lf,{className:`my-12`,children:(0,V.jsxs)(uf,{children:[(0,V.jsx)(ff,{variant:`icon`,children:(0,V.jsx)(bn,{})}),(0,V.jsx)(pf,{children:n(`translation:admin.resourceTable.empty.title`)}),(0,V.jsx)(mf,{children:n(`translation:admin.resourceTable.empty.description`)})]})})})})})]})}),i?(0,V.jsxs)(`div`,{className:`flex flex-row justify-between gap-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`hidden sm:inline text-sm text-muted-foreground`,children:n(`translation:admin.resourceTable.pagination.perPage`)}),(0,V.jsxs)(tG,{value:u.toString(),onValueChange:e=>{o({pageSize:Number(e),cursorAfter:null,cursorBefore:null})},children:[(0,V.jsx)(rG,{className:`w-[100px]`,children:(0,V.jsx)(nG,{})}),(0,V.jsx)(iG,{children:e.pagination.type===`cursor`&&e.pagination.pageSizeOptions.map(e=>(0,V.jsx)(aG,{value:e.toString(),children:e},e))})]}),(0,V.jsx)(`span`,{className:`hidden sm:inline text-sm text-muted-foreground`,children:n(`translation:admin.resourceTable.pagination.results`)})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2 w-fit`,children:[(0,V.jsxs)(H,{onClick:()=>o({cursorBefore:JSON.stringify(A?.prevCursor),cursorAfter:null}),disabled:!A?.hasPrev,variant:`outline`,size:`sm`,children:[(0,V.jsx)($t,{className:`size-4`}),(0,V.jsx)(`span`,{className:`hidden sm:inline`,children:n(`translation:admin.resourceTable.pagination.previous`)})]}),(0,V.jsxs)(H,{onClick:()=>{o({cursorAfter:JSON.stringify(A?.nextCursor),cursorBefore:null})},disabled:!A?.hasNext,variant:`outline`,size:`sm`,children:[(0,V.jsx)(`span`,{className:`hidden sm:inline`,children:n(`translation:admin.resourceTable.pagination.next`)}),(0,V.jsx)(en,{className:`size-4`})]})]})]}):(0,V.jsxs)(`div`,{className:`flex flex-row justify-between gap-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`hidden sm:inline text-sm text-muted-foreground`,children:n(`translation:admin.resourceTable.pagination.perPage`)}),(0,V.jsxs)(tG,{value:u.toString(),onValueChange:e=>{o({pageSize:Number(e),page:1})},children:[(0,V.jsx)(rG,{className:`w-[100px]`,children:(0,V.jsx)(nG,{})}),(0,V.jsx)(iG,{children:e.pagination.type===`offset`&&e.pagination.pageSizeOptions.map(e=>(0,V.jsx)(aG,{value:e.toString(),children:e},e))})]}),(0,V.jsx)(`span`,{className:`hidden sm:inline text-sm text-muted-foreground`,children:n(`translation:admin.resourceTable.pagination.results`)})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`hidden sm:inline text-sm text-muted-foreground mr-2`,children:n(`translation:admin.resourceTable.pagination.showing`,{from:(l-1)*u+1,to:Math.min(l*u,j?.total||0),total:j?.total||0})}),(0,V.jsxs)(H,{onClick:()=>o({page:Math.max(1,l-1)}),disabled:l===1,variant:`outline`,size:`sm`,children:[(0,V.jsx)($t,{className:`size-4`}),(0,V.jsx)(`span`,{className:`hidden sm:inline`,children:n(`translation:admin.resourceTable.pagination.previous`)})]}),(0,V.jsx)(`span`,{className:`flex items-center px-2 sm:px-4 text-sm`,children:n(`translation:admin.resourceTable.pagination.page`,{current:l,total:j?.totalPages||1})}),(0,V.jsxs)(H,{onClick:()=>o({page:l+1}),disabled:!j?.hasMore,variant:`outline`,size:`sm`,children:[(0,V.jsx)(`span`,{className:`hidden sm:inline`,children:n(`translation:admin.resourceTable.pagination.next`)}),(0,V.jsx)(en,{className:`size-4`})]})]})]}),y.open&&y.component&&(0,V.jsx)(y.component,{...y.props,open:y.open,onOpenChange:e=>{b(t=>({...t,open:e}))}})]})}var nJ=n({default:()=>aJ,storageResourceConfig:()=>iJ}),rJ=R();const iJ={pagination:{type:`cursor`,defaultPageSize:25,pageSizeOptions:[25,50,100],cursorColumn:`createdAt`,tiebreaker:`id`},fields:[{key:`filename`,label:`translation:admin.storage.fields.filename`,searchable:!0,sortable:!0},{key:`contentType`,label:`translation:admin.storage.fields.contentType`},{key:`byteSize`,label:`translation:admin.storage.fields.byteSize`,sortable:!0,format:`bytes`},{key:`serviceName`,label:`translation:admin.storage.fields.serviceName`},{key:`createdAt`,label:`translation:admin.storage.fields.createdAt`,sortable:!0,format:`datetime`}],filters:[{key:`contentType`,label:`translation:admin.storage.filters.contentType.label`,type:`select`,options:[{value:`image/%`,label:`translation:admin.storage.filters.contentType.options.images`},{value:`video/%`,label:`translation:admin.storage.filters.contentType.options.videos`},{value:`audio/%`,label:`translation:admin.storage.filters.contentType.options.audio`},{value:`application/pdf`,label:`translation:admin.storage.filters.contentType.options.pdfs`},{value:`text/markdown`,label:`translation:admin.storage.filters.contentType.options.markdown`},{value:`text/%`,label:`translation:admin.storage.filters.contentType.options.text`}]},{key:`serviceName`,label:`translation:admin.storage.filters.serviceName.label`,type:`select`,options:[{value:`private`,label:`translation:admin.storage.filters.serviceName.options.private`},{value:`public`,label:`translation:admin.storage.filters.serviceName.options.public`}]}],actions:[Aq(),jq(),Mq()]};var aJ=d(function(){let e=(0,rJ.c)(15),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[`translation`],e[0]=t):t=e[0];let{t:n}=me(t),r;e[1]===n?r=e[2]:(r=n(`translation:admin.storage.title`),e[1]=n,e[2]=r);let i;e[3]===r?i=e[4]:(i=(0,V.jsx)(`h1`,{className:`text-3xl font-bold`,children:r}),e[3]=r,e[4]=i);let a;e[5]===n?a=e[6]:(a=n(`translation:admin.storage.description`),e[5]=n,e[6]=a);let o;e[7]===a?o=e[8]:(o=(0,V.jsx)(`p`,{className:`text-muted-foreground`,children:a}),e[7]=a,e[8]=o);let s;e[9]!==i||e[10]!==o?(s=(0,V.jsxs)(`div`,{className:`mb-6`,children:[i,o]}),e[9]=i,e[10]=o,e[11]=s):s=e[11];let c;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,V.jsx)(tJ,{config:iJ,router:$S.admin.storage}),e[12]=c):c=e[12];let l;return e[13]===s?l=e[14]:(l=(0,V.jsxs)(V.Fragment,{children:[s,c]}),e[13]=s,e[14]=l),l}),oJ=n({default:()=>sJ}),sJ=d(function(){let{client:e}=Mm(),{data:t}=e.useSession();return(0,V.jsx)(`div`,{className:`bg-muted flex min-h-screen flex-col items-center justify-center px-4 py-12`,children:(0,V.jsxs)(`div`,{className:`w-full max-w-[420px] space-y-6`,children:[(0,V.jsx)(`div`,{className:`flex justify-center`,children:(0,V.jsx)(zw,{href:t?.user?S(`/home`):S(`/`),size:`lg`,showName:!0})}),(0,V.jsx)(w,{})]})})}),cJ=e=>e.type===`checkbox`,lJ=e=>e instanceof Date,uJ=e=>e==null,dJ=e=>typeof e==`object`,fJ=e=>!uJ(e)&&!Array.isArray(e)&&dJ(e)&&!lJ(e),pJ=e=>fJ(e)&&e.target?cJ(e.target)?e.target.checked:e.target.value:e,mJ=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,hJ=(e,t)=>e.has(mJ(t)),gJ=e=>{let t=e.constructor&&e.constructor.prototype;return fJ(t)&&t.hasOwnProperty(`isPrototypeOf`)},_J=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function vJ(e){let t,n=Array.isArray(e),r=typeof FileList<`u`?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(_J&&(e instanceof Blob||r))&&(n||fJ(e)))if(t=n?[]:Object.create(Object.getPrototypeOf(e)),!n&&!gJ(e))t=e;else for(let n in e)e.hasOwnProperty(n)&&(t[n]=vJ(e[n]));else return e;return t}var yJ=e=>/^\w*$/.test(e),bJ=e=>e===void 0,xJ=e=>Array.isArray(e)?e.filter(Boolean):[],SJ=e=>xJ(e.replace(/["|']|\]/g,``).split(/\.|\[/)),Z=(e,t,n)=>{if(!t||!fJ(e))return n;let r=(yJ(t)?[t]:SJ(t)).reduce((e,t)=>uJ(e)?e:e[t],e);return bJ(r)||r===e?bJ(e[t])?n:e[t]:r},CJ=e=>typeof e==`boolean`,wJ=(e,t,n)=>{let r=-1,i=yJ(t)?[t]:SJ(t),a=i.length,o=a-1;for(;++r<a;){let t=i[r],a=n;if(r!==o){let n=e[t];a=fJ(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if(t===`__proto__`||t===`constructor`||t===`prototype`)return;e[t]=a,e=e[t]}},TJ={BLUR:`blur`,FOCUS_OUT:`focusout`,CHANGE:`change`},EJ={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},DJ={max:`max`,min:`min`,maxLength:`maxLength`,minLength:`minLength`,pattern:`pattern`,required:`required`,validate:`validate`},OJ=B.createContext(null);OJ.displayName=`HookFormContext`;var kJ=()=>B.useContext(OJ),AJ=e=>{let{children:t,...n}=e;return B.createElement(OJ.Provider,{value:n},t)},jJ=(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]!==EJ.all&&(t._proxyFormState[i]=!r||EJ.all),n&&(n[i]=!0),e[i]}});return i},MJ=typeof window<`u`?B.useLayoutEffect:B.useEffect;function NJ(e){let t=kJ(),{control:n=t.control,disabled:r,name:i,exact:a}=e||{},[o,s]=B.useState(n._formState),c=B.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return MJ(()=>n._subscribe({name:i,formState:c.current,exact:a,callback:e=>{!r&&s({...n._formState,...e})}}),[i,r,a]),B.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),B.useMemo(()=>jJ(o,n,c.current,!1),[o,n])}var PJ=e=>typeof e==`string`,FJ=(e,t,n,r,i)=>PJ(e)?(r&&t.watch.add(e),Z(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),Z(n,e))):(r&&(t.watchAll=!0),n),IJ=e=>uJ(e)||!dJ(e);function LJ(e,t,n=new WeakSet){if(IJ(e)||IJ(t))return e===t;if(lJ(e)&&lJ(t))return 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(lJ(r)&&lJ(e)||fJ(r)&&fJ(e)||Array.isArray(r)&&Array.isArray(e)?!LJ(r,e,n):r!==e)return!1}}return!0}function RJ(e){let t=kJ(),{control:n=t.control,name:r,defaultValue:i,disabled:a,exact:o,compute:s}=e||{},c=B.useRef(i),l=B.useRef(s),u=B.useRef(void 0),d=B.useRef(n),f=B.useRef(r);l.current=s;let[p,m]=B.useState(()=>{let e=n._getWatch(r,c.current);return l.current?l.current(e):e}),h=B.useCallback(e=>{let t=FJ(r,n._names,e||n._formValues,!1,c.current);return l.current?l.current(t):t},[n._formValues,n._names,r]),g=B.useCallback(e=>{if(!a){let t=FJ(r,n._names,e||n._formValues,!1,c.current);if(l.current){let e=l.current(t);LJ(e,u.current)||(m(e),u.current=e)}else m(t)}},[n._formValues,n._names,a,r]);MJ(()=>((d.current!==n||!LJ(f.current,r))&&(d.current=n,f.current=r,g()),n._subscribe({name:r,formState:{values:!0},exact:o,callback:e=>{g(e.values)}})),[n,o,r,g]),B.useEffect(()=>n._removeUnmounted());let _=d.current!==n,v=f.current,y=B.useMemo(()=>{if(a)return null;let e=!_&&!LJ(v,r);return _||e?h():null},[a,_,r,v,h]);return y===null?p:y}function zJ(e){let t=kJ(),{name:n,disabled:r,control:i=t.control,shouldUnregister:a,defaultValue:o}=e,s=hJ(i._names.array,n),c=RJ({control:i,name:n,defaultValue:B.useMemo(()=>Z(i._formValues,n,Z(i._defaultValues,n,o)),[i,n,o]),exact:!0}),l=NJ({control:i,name:n,exact:!0}),u=B.useRef(e),d=B.useRef(void 0),f=B.useRef(i.register(n,{...e.rules,value:c,...CJ(e.disabled)?{disabled:e.disabled}:{}}));u.current=e;let p=B.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Z(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!Z(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Z(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Z(l.validatingFields,n)},error:{enumerable:!0,get:()=>Z(l.errors,n)}}),[l,n]),m=B.useCallback(e=>f.current.onChange({target:{value:pJ(e),name:n},type:TJ.CHANGE}),[n]),h=B.useCallback(()=>f.current.onBlur({target:{value:Z(i._formValues,n),name:n},type:TJ.BLUR}),[n,i._formValues]),g=B.useCallback(e=>{let t=Z(i._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus&&e.focus(),select:()=>e.select&&e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})},[i._fields,n]),_=B.useMemo(()=>({name:n,value:c,...CJ(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:m,onBlur:h,ref:g}),[n,r,l.disabled,m,h,g,c]);return B.useEffect(()=>{let e=i._options.shouldUnregister||a,t=d.current;t&&t!==n&&!s&&i.unregister(t),i.register(n,{...u.current.rules,...CJ(u.current.disabled)?{disabled:u.current.disabled}:{}});let r=(e,t)=>{let n=Z(i._fields,e);n&&n._f&&(n._f.mount=t)};if(r(n,!0),e){let e=vJ(Z(i._options.defaultValues,n,u.current.defaultValue));wJ(i._defaultValues,n,e),bJ(Z(i._formValues,n))&&wJ(i._formValues,n,e)}return!s&&i.register(n),d.current=n,()=>{(s?e&&!i._state.action:e)?i.unregister(n):r(n,!1)}},[n,i,s,a]),B.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),B.useMemo(()=>({field:_,formState:l,fieldState:p}),[_,l,p])}var BJ=e=>e.render(zJ(e)),VJ=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},HJ=e=>Array.isArray(e)?e:[e],UJ=()=>{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 WJ(e,t){let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],a=t[r];if(i&&fJ(i)&&a){let e=WJ(i,a);fJ(e)&&(n[r]=e)}else e[r]&&(n[r]=a)}return n}var GJ=e=>fJ(e)&&!Object.keys(e).length,KJ=e=>e.type===`file`,qJ=e=>typeof e==`function`,JJ=e=>{if(!_J)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},YJ=e=>e.type===`select-multiple`,XJ=e=>e.type===`radio`,ZJ=e=>XJ(e)||cJ(e),QJ=e=>JJ(e)&&e.isConnected;function $J(e,t){let n=t.slice(0,-1).length,r=0;for(;r<n;)e=bJ(e)?r++:e[t[r++]];return e}function eY(e){for(let t in e)if(e.hasOwnProperty(t)&&!bJ(e[t]))return!1;return!0}function tY(e,t){let n=Array.isArray(t)?t:yJ(t)?[t]:SJ(t),r=n.length===1?e:$J(e,n),i=n.length-1,a=n[i];return r&&delete r[a],i!==0&&(fJ(r)&&GJ(r)||Array.isArray(r)&&eY(r))&&tY(e,n.slice(0,-1)),e}var nY=e=>{for(let t in e)if(qJ(e[t]))return!0;return!1};function rY(e){return Array.isArray(e)||fJ(e)&&!nY(e)}function iY(e,t={}){for(let n in e)rY(e[n])?(t[n]=Array.isArray(e[n])?[]:{},iY(e[n],t[n])):bJ(e[n])||(t[n]=!0);return t}function aY(e,t,n){for(let r in n||=iY(t),e)rY(e[r])?bJ(t)||IJ(n[r])?n[r]=iY(e[r],Array.isArray(e[r])?[]:{}):aY(e[r],uJ(t)?{}:t[r],n[r]):n[r]=!LJ(e[r],t[r]);return n}var oY={value:!1,isValid:!1},sY={value:!0,isValid:!0},cY=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&&!bJ(e[0].attributes.value)?bJ(e[0].value)||e[0].value===``?sY:{value:e[0].value,isValid:!0}:sY:oY}return oY},lY=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>bJ(e)?e:t?e===``?NaN:e&&+e:n&&PJ(e)?new Date(e):r?r(e):e,uY={isValid:!1,value:null},dY=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,uY):uY;function fY(e){let t=e.ref;return KJ(t)?t.files:XJ(t)?dY(e.refs).value:YJ(t)?[...t.selectedOptions].map(({value:e})=>e):cJ(t)?cY(e.refs).value:lY(bJ(t.value)?e.ref.value:t.value,e)}var pY=(e,t,n,r)=>{let i={};for(let n of e){let e=Z(t,n);e&&wJ(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},mY=e=>e instanceof RegExp,hY=e=>bJ(e)?e:mY(e)?e.source:fJ(e)?mY(e.value)?e.value.source:e.value:e,gY=e=>({isOnSubmit:!e||e===EJ.onSubmit,isOnBlur:e===EJ.onBlur,isOnChange:e===EJ.onChange,isOnAll:e===EJ.all,isOnTouch:e===EJ.onTouched}),_Y=`AsyncFunction`,vY=e=>!!e&&!!e.validate&&!!(qJ(e.validate)&&e.validate.constructor.name===_Y||fJ(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===_Y)),yY=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),bY=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))),xY=(e,t,n,r)=>{for(let i of n||Object.keys(e)){let n=Z(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(xY(a,t))break}else if(fJ(a)&&xY(a,t))break}}};function SY(e,t,n){let r=Z(e,n);if(r||yJ(n))return{error:r,name:n};let i=n.split(`.`);for(;i.length;){let r=i.join(`.`),a=Z(t,r),o=Z(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 CY=(e,t,n,r)=>{n(e);let{name:i,...a}=e;return GJ(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(e=>t[e]===(!r||EJ.all))},wY=(e,t,n)=>!e||!t||e===t||HJ(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))),TY=(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,EY=(e,t)=>!xJ(Z(e,t)).length&&tY(e,t),DY=(e,t,n)=>{let r=HJ(Z(e,n));return wJ(r,`root`,t[n]),wJ(e,n,r),e};function OY(e,t,n=`validate`){if(PJ(e)||Array.isArray(e)&&e.every(PJ)||CJ(e)&&!e)return{type:n,message:PJ(e)?e:``,ref:t}}var kY=e=>fJ(e)&&!mY(e)?e:{value:e,message:``},AY=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=Z(n,h);if(!_||t.has(h))return{};let y=s?s[0]:o,b=e=>{i&&y.reportValidity&&(y.setCustomValidity(CJ(e)?``:e||``),y.reportValidity())},x={},S=XJ(o),C=cJ(o),w=S||C,T=(g||KJ(o))&&bJ(o.value)&&bJ(v)||JJ(o)&&o.value===``||v===``||Array.isArray(v)&&!v.length,E=VJ.bind(null,h,r,x),D=(e,t,n,r=DJ.maxLength,i=DJ.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||uJ(v))||CJ(v)&&!v||C&&!cY(s).isValid||S&&!dY(s).isValid)){let{value:e,message:t}=PJ(c)?{value:!!c,message:c}:kY(c);if(e&&(x[h]={type:DJ.required,message:t,ref:y,...E(DJ.required,t)},!r))return b(t),x}if(!T&&(!uJ(d)||!uJ(f))){let e,t,n=kY(f),i=kY(d);if(!uJ(v)&&!isNaN(v)){let r=o.valueAsNumber||v&&+v;uJ(n.value)||(e=r>n.value),uJ(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`;PJ(n.value)&&v&&(e=s?a(v)>a(n.value):c?v>n.value:r>new Date(n.value)),PJ(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,DJ.max,DJ.min),!r))return b(x[h].message),x}if((l||u)&&!T&&(PJ(v)||a&&Array.isArray(v))){let e=kY(l),t=kY(u),n=!uJ(e.value)&&v.length>+e.value,i=!uJ(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&&PJ(v)){let{value:e,message:t}=kY(p);if(mY(e)&&!v.match(e)&&(x[h]={type:DJ.pattern,message:t,ref:o,...E(DJ.pattern,t)},!r))return b(t),x}if(m){if(qJ(m)){let e=OY(await m(v,n),y);if(e&&(x[h]={...e,...E(DJ.validate,e.message)},!r))return b(e.message),x}else if(fJ(m)){let e={};for(let t in m){if(!GJ(e)&&!r)break;let i=OY(await m[t](v,n),y,t);i&&(e={...i,...E(t,i.message)},b(i.message),r&&(x[h]=e))}if(!GJ(e)&&(x[h]={ref:y,...e},!r))return x}}return b(!0),x},jY={mode:EJ.onSubmit,reValidateMode:EJ.onChange,shouldFocusError:!0};function MY(e={}){let t={...jY,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:qJ(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=(fJ(t.defaultValues)||fJ(t.values))&&vJ(t.defaultValues||t.values)||{},a=t.shouldUnregister?{}:vJ(i),o={action:!1,mount:!1,watch:!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={array:UJ(),state:UJ()},p=t.criteriaMode===EJ.all,m=e=>t=>{clearTimeout(l),l=setTimeout(e,t)},h=async e=>{if(!t.disabled&&(u.isValid||d.isValid||e)){let e=t.resolver?GJ((await C()).errors):await T(r,!0);e!==n.isValid&&f.state.next({isValid:e})}},g=(e,r)=>{!t.disabled&&(u.isValidating||u.validatingFields||d.isValidating||d.validatingFields)&&((e||Array.from(s.mount)).forEach(e=>{e&&(r?wJ(n.validatingFields,e,r):tY(n.validatingFields,e))}),f.state.next({validatingFields:n.validatingFields,isValidating:!GJ(n.validatingFields)}))},_=(e,s=[],c,l,p=!0,m=!0)=>{if(l&&c&&!t.disabled){if(o.action=!0,m&&Array.isArray(Z(r,e))){let t=c(Z(r,e),l.argA,l.argB);p&&wJ(r,e,t)}if(m&&Array.isArray(Z(n.errors,e))){let t=c(Z(n.errors,e),l.argA,l.argB);p&&wJ(n.errors,e,t),EY(n.errors,e)}if((u.touchedFields||d.touchedFields)&&m&&Array.isArray(Z(n.touchedFields,e))){let t=c(Z(n.touchedFields,e),l.argA,l.argB);p&&wJ(n.touchedFields,e,t)}(u.dirtyFields||d.dirtyFields)&&(n.dirtyFields=aY(i,a)),f.state.next({name:e,isDirty:D(e,s),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else wJ(a,e,s)},v=(e,t)=>{wJ(n.errors,e,t),f.state.next({errors:n.errors})},y=e=>{n.errors=e,f.state.next({errors:n.errors,isValid:!1})},b=(e,t,n,s)=>{let c=Z(r,e);if(c){let r=Z(a,e,bJ(n)?Z(i,e):n);bJ(r)||s&&s.defaultChecked||t?wJ(a,e,t?r:fY(c._f)):A(e,r),o.mount&&h()}},x=(e,r,a,o,s)=>{let c=!1,l=!1,p={name:e};if(!t.disabled){if(!a||o){(u.isDirty||d.isDirty)&&(l=n.isDirty,n.isDirty=p.isDirty=D(),c=l!==p.isDirty);let t=LJ(Z(i,e),r);l=!!Z(n.dirtyFields,e),t?tY(n.dirtyFields,e):wJ(n.dirtyFields,e,!0),p.dirtyFields=n.dirtyFields,c||=(u.dirtyFields||d.dirtyFields)&&l!==!t}if(a){let t=Z(n.touchedFields,e);t||(wJ(n.touchedFields,e,a),p.touchedFields=n.touchedFields,c||=(u.touchedFields||d.touchedFields)&&t!==a)}c&&s&&f.state.next(p)}return c?p:{}},S=(e,r,i,a)=>{let o=Z(n.errors,e),s=(u.isValid||d.isValid)&&CJ(r)&&n.isValid!==r;if(t.delayError&&i?(c=m(()=>v(e,i)),c(t.delayError)):(clearTimeout(l),c=null,i?wJ(n.errors,e,i):tY(n.errors,e)),(i?!LJ(o,i):o)||!GJ(a)||s){let t={...a,...s&&CJ(r)?{isValid:r}:{},errors:n.errors,name:e};n={...n,...t},f.state.next(t)}},C=async e=>{g(e,!0);let n=await t.resolver(a,t.context,pY(e||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return g(e),n},w=async e=>{let{errors:t}=await C(e);if(e)for(let r of e){let e=Z(t,r);e?wJ(n.errors,r,e):tY(n.errors,r)}else n.errors=t;return t},T=async(e,r,i={valid:!0})=>{for(let o in e){let c=e[o];if(c){let{_f:e,...o}=c;if(e){let o=s.array.has(e.name),l=c._f&&vY(c._f);l&&u.validatingFields&&g([e.name],!0);let d=await AY(c,s.disabled,a,p,t.shouldUseNativeValidation&&!r,o);if(l&&u.validatingFields&&g([e.name]),d[e.name]&&(i.valid=!1,r))break;!r&&(Z(d,e.name)?o?DY(n.errors,d,e.name):wJ(n.errors,e.name,d[e.name]):tY(n.errors,e.name))}!GJ(o)&&await T(o,r,i)}}return i.valid},E=()=>{for(let e of s.unMount){let t=Z(r,e);t&&(t._f.refs?t._f.refs.every(e=>!QJ(e)):!QJ(t._f.ref))&&ae(e)}s.unMount=new Set},D=(e,n)=>!t.disabled&&(e&&n&&wJ(a,e,n),!LJ(I(),i)),O=(e,t,n)=>FJ(e,s,{...o.mount?a:bJ(t)?i:PJ(e)?{[e]:t}:t},n,t),k=e=>xJ(Z(o.mount?a:i,e,t.shouldUnregister?Z(i,e,[]):[])),A=(e,t,n={})=>{let i=Z(r,e),o=t;if(i){let n=i._f;n&&(!n.disabled&&wJ(a,e,lY(t,n)),o=JJ(n.ref)&&uJ(t)?``:t,YJ(n.ref)?[...n.ref.options].forEach(e=>e.selected=o.includes(e.value)):n.refs?cJ(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):KJ(n.ref)?n.ref.value=``:(n.ref.value=o,n.ref.type||f.state.next({name:e,values:vJ(a)})))}(n.shouldDirty||n.shouldTouch)&&x(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&F(e)},j=(e,t,n)=>{for(let i in t){if(!t.hasOwnProperty(i))return;let a=t[i],o=e+`.`+i,c=Z(r,o);(s.array.has(e)||fJ(a)||c&&!c._f)&&!lJ(a)?j(o,a,n):A(o,a,n)}},M=(e,t,c={})=>{let l=Z(r,e),p=s.array.has(e),m=vJ(t);wJ(a,e,m),p?(f.array.next({name:e,values:vJ(a)}),(u.isDirty||u.dirtyFields||d.isDirty||d.dirtyFields)&&c.shouldDirty&&f.state.next({name:e,dirtyFields:aY(i,a),isDirty:D(e,m)})):l&&!l._f&&!uJ(m)?j(e,m,c):A(e,m,c),bY(e,s)&&f.state.next({...n,name:e}),f.state.next({name:o.mount?e:void 0,values:vJ(a)})},N=async e=>{o.mount=!0;let i=e.target,l=i.name,m=!0,_=Z(r,l),v=e=>{m=Number.isNaN(e)||lJ(e)&&isNaN(e.getTime())||LJ(e,Z(a,l,e))},y=gY(t.mode),b=gY(t.reValidateMode);if(_){let o,w,E=i.type?fY(_._f):pJ(e),D=e.type===TJ.BLUR||e.type===TJ.FOCUS_OUT,O=!yY(_._f)&&!t.resolver&&!Z(n.errors,l)&&!_._f.deps||TY(D,Z(n.touchedFields,l),n.isSubmitted,b,y),k=bY(l,s,D);wJ(a,l,E),D?(!i||!i.readOnly)&&(_._f.onBlur&&_._f.onBlur(e),c&&c(0)):_._f.onChange&&_._f.onChange(e);let A=x(l,E,D),j=!GJ(A)||k;if(!D&&f.state.next({name:l,type:e.type,values:vJ(a)}),O)return(u.isValid||d.isValid)&&(t.mode===`onBlur`?D&&h():D||h()),j&&f.state.next({name:l,...k?{}:A});if(!D&&k&&f.state.next({...n}),t.resolver){let{errors:e}=await C([l]);if(v(E),m){let t=SY(n.errors,r,l),i=SY(e,r,t.name||l);o=i.error,l=i.name,w=GJ(e)}}else g([l],!0),o=(await AY(_,s.disabled,a,p,t.shouldUseNativeValidation))[l],g([l]),v(E),m&&(o?w=!1:(u.isValid||d.isValid)&&(w=await T(r,!0)));m&&(_._f.deps&&(!Array.isArray(_._f.deps)||_._f.deps.length>0)&&F(_._f.deps),S(l,w,o,A))}},P=(e,t)=>{if(Z(n.errors,t)&&e.focus)return e.focus(),1},F=async(e,i={})=>{let a,o,c=HJ(e);if(t.resolver){let t=await w(bJ(e)?e:c);a=GJ(t),o=e?!c.some(e=>Z(t,e)):a}else e?(o=(await Promise.all(c.map(async e=>{let t=Z(r,e);return await T(t&&t._f?{[e]:t}:t)}))).every(Boolean),!(!o&&!n.isValid)&&h()):o=a=await T(r);return f.state.next({...!PJ(e)||(u.isValid||d.isValid)&&a!==n.isValid?{}:{name:e},...t.resolver||!e?{isValid:a}:{},errors:n.errors}),i.shouldFocus&&!o&&xY(r,P,e?c:s.mount),o},I=(e,t)=>{let r={...o.mount?a:i};return t&&(r=WJ(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),bJ(e)?r:PJ(e)?Z(r,e):e.map(e=>Z(r,e))},ee=(e,t)=>({invalid:!!Z((t||n).errors,e),isDirty:!!Z((t||n).dirtyFields,e),error:Z((t||n).errors,e),isValidating:!!Z(n.validatingFields,e),isTouched:!!Z((t||n).touchedFields,e)}),L=e=>{e&&HJ(e).forEach(e=>tY(n.errors,e)),f.state.next({errors:e?n.errors:{}})},te=(e,t,i)=>{let a=(Z(r,e,{_f:{}})._f||{}).ref,{ref:o,message:s,type:c,...l}=Z(n.errors,e)||{};wJ(n.errors,e,{...l,...t,ref:a}),f.state.next({name:e,errors:n.errors,isValid:!1}),i&&i.shouldFocus&&a&&a.focus&&a.focus()},ne=(e,t)=>qJ(e)?f.state.subscribe({next:n=>`values`in n&&e(O(void 0,t),n)}):O(e,t,!0),re=e=>f.state.subscribe({next:t=>{wY(e.name,t.name,e.exact)&&CY(t,e.formState||u,R,e.reRenderRoot)&&e.callback({values:{...a},...n,...t,defaultValues:i})}}).unsubscribe,ie=e=>(o.mount=!0,d={...d,...e.formState},re({...e,formState:d})),ae=(e,o={})=>{for(let c of e?HJ(e):s.mount)s.mount.delete(c),s.array.delete(c),o.keepValue||(tY(r,c),tY(a,c)),!o.keepError&&tY(n.errors,c),!o.keepDirty&&tY(n.dirtyFields,c),!o.keepTouched&&tY(n.touchedFields,c),!o.keepIsValidating&&tY(n.validatingFields,c),!t.shouldUnregister&&!o.keepDefaultValue&&tY(i,c);f.state.next({values:vJ(a)}),f.state.next({...n,...o.keepDirty?{isDirty:D()}:{}}),!o.keepIsValid&&h()},oe=({disabled:e,name:t})=>{(CJ(e)&&o.mount||e||s.disabled.has(t))&&(e?s.disabled.add(t):s.disabled.delete(t))},se=(e,n={})=>{let a=Z(r,e),c=CJ(n.disabled)||CJ(t.disabled);return wJ(r,e,{...a||{},_f:{...a&&a._f?a._f:{ref:{name:e}},name:e,mount:!0,...n}}),s.mount.add(e),a?oe({disabled:CJ(n.disabled)?n.disabled:t.disabled,name:e}):b(e,!0,n.value),{...c?{disabled:n.disabled||t.disabled}:{},...t.progressive?{required:!!n.required,min:hY(n.min),max:hY(n.max),minLength:hY(n.minLength),maxLength:hY(n.maxLength),pattern:hY(n.pattern)}:{},name:e,onChange:N,onBlur:N,ref:c=>{if(c){se(e,n),a=Z(r,e);let t=bJ(c.value)&&c.querySelectorAll&&c.querySelectorAll(`input,select,textarea`)[0]||c,o=ZJ(t),s=a._f.refs||[];if(o?s.find(e=>e===t):t===a._f.ref)return;wJ(r,e,{_f:{...a._f,...o?{refs:[...s.filter(QJ),t,...Array.isArray(Z(i,e))?[{}]:[]],ref:{type:t.type,name:e}}:{ref:t}}}),b(e,!1,void 0,t)}else a=Z(r,e,{}),a._f&&(a._f.mount=!1),(t.shouldUnregister||n.shouldUnregister)&&!(hJ(s.array,e)&&o.action)&&s.unMount.add(e)}}},ce=()=>t.shouldFocusError&&xY(r,P,s.mount),le=e=>{CJ(e)&&(f.state.next({disabled:e}),xY(r,(t,n)=>{let i=Z(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))},ue=(e,i)=>async o=>{let c;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let l=vJ(a);if(f.state.next({isSubmitting:!0}),t.resolver){let{errors:e,values:t}=await C();n.errors=e,l=vJ(t)}else await T(r);if(s.disabled.size)for(let e of s.disabled)tY(l,e);if(tY(n.errors,`root`),GJ(n.errors)){f.state.next({errors:{}});try{await e(l,o)}catch(e){c=e}}else i&&await i({...n.errors},o),ce(),setTimeout(ce);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:GJ(n.errors)&&!c,submitCount:n.submitCount+1,errors:n.errors}),c)throw c},de=(e,t={})=>{Z(r,e)&&(bJ(t.defaultValue)?M(e,vJ(Z(i,e))):(M(e,t.defaultValue),wJ(i,e,vJ(t.defaultValue))),t.keepTouched||tY(n.touchedFields,e),t.keepDirty||(tY(n.dirtyFields,e),n.isDirty=t.defaultValue?D(e,vJ(Z(i,e))):D()),t.keepError||(tY(n.errors,e),u.isValid&&h()),f.state.next({...n}))},fe=(e,c={})=>{let l=e?vJ(e):i,d=vJ(l),p=GJ(e),m=p?i:d;if(c.keepDefaultValues||(i=l),!c.keepValues){if(c.keepDirtyValues){let e=new Set([...s.mount,...Object.keys(aY(i,a))]);for(let t of Array.from(e))Z(n.dirtyFields,t)?wJ(m,t,Z(a,t)):M(t,Z(m,t))}else{if(_J&&bJ(e))for(let e of s.mount){let t=Z(r,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(JJ(e)){let t=e.closest(`form`);if(t){t.reset();break}}}}if(c.keepFieldsRef)for(let e of s.mount)M(e,Z(m,e));else r={}}a=t.shouldUnregister?c.keepDefaultValues?vJ(i):{}:vJ(m),f.array.next({values:{...m}}),f.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=!u.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!t.shouldUnregister&&!GJ(m),o.watch=!!t.shouldUnregister,f.state.next({submitCount:c.keepSubmitCount?n.submitCount:0,isDirty:p?!1:c.keepDirty?n.isDirty:!!(c.keepDefaultValues&&!LJ(e,i)),isSubmitted:c.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:p?{}:c.keepDirtyValues?c.keepDefaultValues&&a?aY(i,a):n.dirtyFields:c.keepDefaultValues&&e?aY(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})},pe=(e,t)=>fe(qJ(e)?e(a):e,t),me=(e,t={})=>{let n=Z(r,e),i=n&&n._f;if(i){let e=i.refs?i.refs[0]:i.ref;e.focus&&(e.focus(),t.shouldSelect&&qJ(e.select)&&e.select())}},R=e=>{n={...n,...e}},he={control:{register:se,unregister:ae,getFieldState:ee,handleSubmit:ue,setError:te,_subscribe:re,_runSchema:C,_focusError:ce,_getWatch:O,_getDirty:D,_setValid:h,_setFieldArray:_,_setDisabledField:oe,_setErrors:y,_getFieldArray:k,_reset:fe,_resetDefaultValues:()=>qJ(t.defaultValues)&&t.defaultValues().then(e=>{pe(e,t.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:E,_disableForm:le,_subjects:f,_proxyFormState:u,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:ie,trigger:F,register:se,handleSubmit:ue,watch:ne,setValue:M,getValues:I,reset:pe,resetField:de,clearErrors:L,unregister:ae,setError:te,setFocus:me,getFieldState:ee};return{...he,formControl:he}}function NY(e={}){let t=B.useRef(void 0),n=B.useRef(void 0),[r,i]=B.useState({isDirty:!1,isValidating:!1,isLoading:qJ(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:qJ(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!qJ(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let{formControl:n,...i}=MY(e);t.current={...i,formState:r}}let a=t.current.control;return a._options=e,MJ(()=>{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]),B.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),B.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),B.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),B.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),B.useEffect(()=>{if(a._proxyFormState.isDirty){let e=a._getDirty();e!==r.isDirty&&a._subjects.state.next({isDirty:e})}},[a,r.isDirty]),B.useEffect(()=>{e.values&&!LJ(e.values,n.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),n.current=e.values,i(e=>({...e}))):a._resetDefaultValues()},[a,e.values]),B.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=jJ(r,a),t.current}var PY=(e,t,n)=>{if(e&&`reportValidity`in e){let r=Z(n,t);e.setCustomValidity(r&&r.message||``),e.reportValidity()}},FY=(e,t)=>{for(let n in t.fields){let r=t.fields[n];r&&r.ref&&`reportValidity`in r.ref?PY(r.ref,n,e):r&&r.refs&&r.refs.forEach(t=>PY(t,n,e))}},IY=(e,t)=>{t.shouldUseNativeValidation&&FY(e,t);let n={};for(let r in e){let i=Z(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(LY(t.names||Object.keys(e),r)){let e=Object.assign({},Z(n,r));wJ(e,`root`,a),wJ(n,r,e)}else wJ(n,r,a)}return n},LY=(e,t)=>{let n=RY(t);return e.some(e=>RY(e).match(`^${n}\\.\\d+`))};function RY(e){return e.replace(/\]|\[/g,``)}Object.freeze({status:`aborted`});function Q(e,t,n){function r(n,r){var i;for(let a in Object.defineProperty(n,`_zod`,{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,r),o.prototype)a in n||Object.defineProperty(n,a,{value:o.prototype[a].bind(n)});n._zod.constr=o,n._zod.def=r}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 zY=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},BY=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};const VY={};function HY(e){return e&&Object.assign(VY,e),VY}function UY(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 WY(e,t){return typeof t==`bigint`?t.toString():t}function GY(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function KY(e){return e==null}function qY(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var JY=Symbol(`evaluating`);function YY(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==JY)return r===void 0&&(r=JY,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function XY(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ZY(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function QY(e){return JSON.stringify(e)}const $Y=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function eX(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const tX=GY(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function nX(e){if(eX(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(eX(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function rX(e){return nX(e)?{...e}:Array.isArray(e)?[...e]:e}const iX=new Set([`string`,`number`,`symbol`]);function aX(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function oX(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function $(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 sX(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function cX(e,t){let n=e._zod.def;return oX(e,ZY(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 XY(this,`shape`,e),e},checks:[]}))}function lX(e,t){let n=e._zod.def;return oX(e,ZY(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 XY(this,`shape`,r),r},checks:[]}))}function uX(e,t){if(!nX(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0)throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");return oX(e,ZY(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return XY(this,`shape`,n),n},checks:[]}))}function dX(e,t){if(!nX(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return oX(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return XY(this,`shape`,n),n},checks:e._zod.def.checks})}function fX(e,t){return oX(e,ZY(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return XY(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function pX(e,t,n){return oX(t,ZY(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 XY(this,`shape`,i),i},checks:[]}))}function mX(e,t,n){return oX(t,ZY(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 XY(this,`shape`,i),i},checks:[]}))}function hX(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 gX(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function _X(e){return typeof e==`string`?e:e?.message}function vX(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=_X(e.inst?._zod.def?.error?.(e))??_X(t?.error?.(e))??_X(n.customError?.(e))??_X(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function yX(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function bX(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var xX=(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,WY,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})};const SX=Q(`$ZodError`,xX),CX=Q(`$ZodError`,xX,{Parent:Error});function wX(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 TX(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}const EX=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 zY;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>vX(e,a,HY())));throw $Y(t,i?.callee),t}return o.value},DX=EX(CX),OX=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=>vX(e,a,HY())));throw $Y(t,i?.callee),t}return o.value},kX=OX(CX),AX=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 zY;return a.issues.length?{success:!1,error:new(e??SX)(a.issues.map(e=>vX(e,i,HY())))}:{success:!0,data:a.value}},jX=AX(CX),MX=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=>vX(e,i,HY())))}:{success:!0,data:a.value}},NX=MX(CX),PX=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return EX(e)(t,n,i)},FX=e=>(t,n,r)=>EX(e)(t,n,r),IX=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return OX(e)(t,n,i)},LX=e=>async(t,n,r)=>OX(e)(t,n,r),RX=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return AX(e)(t,n,i)},zX=e=>(t,n,r)=>AX(e)(t,n,r),BX=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return MX(e)(t,n,i)},VX=e=>async(t,n,r)=>MX(e)(t,n,r),HX=/^[cC][^\s-]{8,}$/,UX=/^[0-9a-z]+$/,WX=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,GX=/^[0-9a-vA-V]{20}$/,KX=/^[A-Za-z0-9]{27}$/,qX=/^[a-zA-Z0-9_-]{21}$/,JX=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,YX=/^([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})$/,XX=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)$/,ZX=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var QX=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function $X(){return new RegExp(QX,`u`)}const eZ=/^(?:(?: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])$/,tZ=/^(([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}|:))$/,nZ=/^((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])$/,rZ=/^(([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])$/,iZ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,aZ=/^[A-Za-z0-9_-]*$/,oZ=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,sZ=/^\+(?:[0-9]){6,14}[0-9]$/;var cZ=`(?:(?:\\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])))`;const lZ=RegExp(`^${cZ}$`);function uZ(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 dZ(e){return RegExp(`^${uZ(e)}$`)}function fZ(e){let t=uZ({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(`^${cZ}T(?:${r})$`)}const pZ=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},mZ=/^(?:true|false)$/i,hZ=/^[^A-Z]*$/,gZ=/^[^a-z]*$/,_Z=Q(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),vZ=Q(`$ZodCheckMaxLength`,(e,t)=>{var n;_Z.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!KY(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=yX(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),yZ=Q(`$ZodCheckMinLength`,(e,t)=>{var n;_Z.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!KY(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=yX(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bZ=Q(`$ZodCheckLengthEquals`,(e,t)=>{var n;_Z.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!KY(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=yX(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})}}),xZ=Q(`$ZodCheckStringFormat`,(e,t)=>{var n,r;_Z.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=()=>{})}),SZ=Q(`$ZodCheckRegex`,(e,t)=>{xZ.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})}}),CZ=Q(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=hZ,xZ.init(e,t)}),wZ=Q(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=gZ,xZ.init(e,t)}),TZ=Q(`$ZodCheckIncludes`,(e,t)=>{_Z.init(e,t);let n=aX(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})}}),EZ=Q(`$ZodCheckStartsWith`,(e,t)=>{_Z.init(e,t);let n=RegExp(`^${aX(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})}}),DZ=Q(`$ZodCheckEndsWith`,(e,t)=>{_Z.init(e,t);let n=RegExp(`.*${aX(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})}}),OZ=Q(`$ZodCheckOverwrite`,(e,t)=>{_Z.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var kZ=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(`
100
+ `).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(`
101
+ `))}};const AZ={major:4,minor:1,patch:12},jZ=Q(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=AZ;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=hX(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 zY;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=hX(e,t))});else{if(e.issues.length===t)continue;r||=hX(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(hX(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new zY;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 zY;return o.then(e=>t(e,r,a))}return t(o,r,a)}}e[`~standard`]={validate:t=>{try{let n=jX(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return NX(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}}),MZ=Q(`$ZodString`,(e,t)=>{jZ.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??pZ(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}}),NZ=Q(`$ZodStringFormat`,(e,t)=>{xZ.init(e,t),MZ.init(e,t)}),PZ=Q(`$ZodGUID`,(e,t)=>{t.pattern??=YX,NZ.init(e,t)}),FZ=Q(`$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??=XX(e)}else t.pattern??=XX();NZ.init(e,t)}),IZ=Q(`$ZodEmail`,(e,t)=>{t.pattern??=ZX,NZ.init(e,t)}),LZ=Q(`$ZodURL`,(e,t)=>{NZ.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:oZ.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})}}}),RZ=Q(`$ZodEmoji`,(e,t)=>{t.pattern??=$X(),NZ.init(e,t)}),zZ=Q(`$ZodNanoID`,(e,t)=>{t.pattern??=qX,NZ.init(e,t)}),BZ=Q(`$ZodCUID`,(e,t)=>{t.pattern??=HX,NZ.init(e,t)}),VZ=Q(`$ZodCUID2`,(e,t)=>{t.pattern??=UX,NZ.init(e,t)}),HZ=Q(`$ZodULID`,(e,t)=>{t.pattern??=WX,NZ.init(e,t)}),UZ=Q(`$ZodXID`,(e,t)=>{t.pattern??=GX,NZ.init(e,t)}),WZ=Q(`$ZodKSUID`,(e,t)=>{t.pattern??=KX,NZ.init(e,t)}),GZ=Q(`$ZodISODateTime`,(e,t)=>{t.pattern??=fZ(t),NZ.init(e,t)}),KZ=Q(`$ZodISODate`,(e,t)=>{t.pattern??=lZ,NZ.init(e,t)}),qZ=Q(`$ZodISOTime`,(e,t)=>{t.pattern??=dZ(t),NZ.init(e,t)}),JZ=Q(`$ZodISODuration`,(e,t)=>{t.pattern??=JX,NZ.init(e,t)}),YZ=Q(`$ZodIPv4`,(e,t)=>{t.pattern??=eZ,NZ.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv4`})}),XZ=Q(`$ZodIPv6`,(e,t)=>{t.pattern??=tZ,NZ.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.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})}}}),ZZ=Q(`$ZodCIDRv4`,(e,t)=>{t.pattern??=nZ,NZ.init(e,t)}),QZ=Q(`$ZodCIDRv6`,(e,t)=>{t.pattern??=rZ,NZ.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 $Z(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const eQ=Q(`$ZodBase64`,(e,t)=>{t.pattern??=iZ,NZ.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64`}),e._zod.check=n=>{$Z(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function tQ(e){if(!aZ.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return $Z(t.padEnd(Math.ceil(t.length/4)*4,`=`))}const nQ=Q(`$ZodBase64URL`,(e,t)=>{t.pattern??=aZ,NZ.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64url`}),e._zod.check=n=>{tQ(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),rQ=Q(`$ZodE164`,(e,t)=>{t.pattern??=sZ,NZ.init(e,t)});function iQ(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}}const aQ=Q(`$ZodJWT`,(e,t)=>{NZ.init(e,t),e._zod.check=n=>{iQ(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),oQ=Q(`$ZodBoolean`,(e,t)=>{jZ.init(e,t),e._zod.pattern=mZ,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),sQ=Q(`$ZodUnknown`,(e,t)=>{jZ.init(e,t),e._zod.parse=e=>e}),cQ=Q(`$ZodNever`,(e,t)=>{jZ.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function lQ(e,t,n){e.issues.length&&t.issues.push(...gX(n,e.issues)),t.value[n]=e.value}const uQ=Q(`$ZodArray`,(e,t)=>{jZ.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=>lQ(t,n,e))):lQ(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function dQ(e,t,n,r){e.issues.length&&t.issues.push(...gX(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function fQ(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=sX(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function pQ(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type;for(let i of Object.keys(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=>dQ(e,n,i,t))):dQ(a,n,i,t)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const mQ=Q(`$ZodObject`,(e,t)=>{if(jZ.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=GY(()=>fQ(t));YY(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=eX,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]._zod.run({value:s[e],issues:[]},o);n instanceof Promise?c.push(n.then(n=>dQ(n,t,e,s))):dQ(n,t,e,s)}return i?pQ(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),hQ=Q(`$ZodObjectJIT`,(e,t)=>{mQ.init(e,t);let n=e._zod.parse,r=GY(()=>fQ(t)),i=e=>{let t=new kZ([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=QY(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 e of n.keys){let n=a[e],r=QY(e);t.write(`const ${n} = ${i(e)};`),t.write(`
102
+ if (${n}.issues.length) {
103
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
104
+ ...iss,
105
+ path: iss.path ? [${r}, ...iss.path] : [${r}]
106
+ })));
107
+ }
108
+
109
+
110
+ if (${n}.value === undefined) {
111
+ if (${r} in input) {
112
+ newResult[${r}] = undefined;
113
+ }
114
+ } else {
115
+ newResult[${r}] = ${n}.value;
116
+ }
117
+
118
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=eX,s=!VY.jitless,c=s&&tX.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?pQ([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function gQ(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=>!hX(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=>vX(e,r,HY())))}),t)}const _Q=Q(`$ZodUnion`,(e,t)=>{jZ.init(e,t),YY(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),YY(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),YY(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),YY(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=>qY(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=>gQ(t,i,e,a)):gQ(s,i,e,a)}}),vQ=Q(`$ZodIntersection`,(e,t)=>{jZ.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])=>bQ(e,t,n)):bQ(e,i,a)}});function yQ(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(nX(e)&&nX(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=yQ(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=yQ(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 bQ(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),hX(e))return e;let r=yQ(t.value,n.value);if(!r.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const xQ=Q(`$ZodEnum`,(e,t)=>{jZ.init(e,t);let n=UY(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>iX.has(typeof e)).map(e=>typeof e==`string`?aX(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}}),SQ=Q(`$ZodTransform`,(e,t)=>{jZ.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new BY(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 zY;return n.value=i,n}});function CQ(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const wQ=Q(`$ZodOptional`,(e,t)=>{jZ.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,YY(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),YY(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${qY(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=>CQ(t,e.value)):CQ(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),TQ=Q(`$ZodNullable`,(e,t)=>{jZ.init(e,t),YY(e._zod,`optin`,()=>t.innerType._zod.optin),YY(e._zod,`optout`,()=>t.innerType._zod.optout),YY(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${qY(e.source)}|null)$`):void 0}),YY(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)}),EQ=Q(`$ZodDefault`,(e,t)=>{jZ.init(e,t),e._zod.optin=`optional`,YY(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=>DQ(e,t)):DQ(r,t)}});function DQ(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const OQ=Q(`$ZodPrefault`,(e,t)=>{jZ.init(e,t),e._zod.optin=`optional`,YY(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))}),kQ=Q(`$ZodNonOptional`,(e,t)=>{jZ.init(e,t),YY(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=>AQ(t,e)):AQ(i,e)}});function AQ(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}const jQ=Q(`$ZodCatch`,(e,t)=>{jZ.init(e,t),YY(e._zod,`optin`,()=>t.innerType._zod.optin),YY(e._zod,`optout`,()=>t.innerType._zod.optout),YY(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=>vX(e,n,HY()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>vX(e,n,HY()))},input:e.value}),e.issues=[]),e)}}),MQ=Q(`$ZodPipe`,(e,t)=>{jZ.init(e,t),YY(e._zod,`values`,()=>t.in._zod.values),YY(e._zod,`optin`,()=>t.in._zod.optin),YY(e._zod,`optout`,()=>t.out._zod.optout),YY(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=>NQ(e,t.in,n)):NQ(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>NQ(e,t.out,n)):NQ(r,t.out,n)}});function NQ(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const PQ=Q(`$ZodReadonly`,(e,t)=>{jZ.init(e,t),YY(e._zod,`propValues`,()=>t.innerType._zod.propValues),YY(e._zod,`values`,()=>t.innerType._zod.values),YY(e._zod,`optin`,()=>t.innerType._zod.optin),YY(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(FQ):FQ(r)}});function FQ(e){return e.value=Object.freeze(e.value),e}const IQ=Q(`$ZodCustom`,(e,t)=>{_Z.init(e,t),jZ.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=>LQ(t,n,r,e));LQ(i,n,r,e)}});function LQ(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(bX(e))}}var RQ=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==`object`&&`id`in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return 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 zQ(){return new RQ}const BQ=zQ();function VQ(e,t){return new e({type:`string`,...$(t)})}function HQ(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...$(t)})}function UQ(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...$(t)})}function WQ(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...$(t)})}function GQ(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...$(t)})}function KQ(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...$(t)})}function qQ(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...$(t)})}function JQ(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...$(t)})}function YQ(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...$(t)})}function XQ(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...$(t)})}function ZQ(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...$(t)})}function QQ(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...$(t)})}function $Q(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...$(t)})}function e$(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...$(t)})}function t$(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...$(t)})}function n$(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...$(t)})}function r$(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...$(t)})}function i$(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...$(t)})}function a$(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...$(t)})}function o$(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...$(t)})}function s$(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...$(t)})}function c$(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...$(t)})}function l$(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...$(t)})}function u$(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...$(t)})}function d$(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...$(t)})}function f$(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...$(t)})}function p$(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...$(t)})}function m$(e,t){return new e({type:`boolean`,...$(t)})}function h$(e){return new e({type:`unknown`})}function g$(e,t){return new e({type:`never`,...$(t)})}function _$(e,t){return new vZ({check:`max_length`,...$(t),maximum:e})}function v$(e,t){return new yZ({check:`min_length`,...$(t),minimum:e})}function y$(e,t){return new bZ({check:`length_equals`,...$(t),length:e})}function b$(e,t){return new SZ({check:`string_format`,format:`regex`,...$(t),pattern:e})}function x$(e){return new CZ({check:`string_format`,format:`lowercase`,...$(e)})}function S$(e){return new wZ({check:`string_format`,format:`uppercase`,...$(e)})}function C$(e,t){return new TZ({check:`string_format`,format:`includes`,...$(t),includes:e})}function w$(e,t){return new EZ({check:`string_format`,format:`starts_with`,...$(t),prefix:e})}function T$(e,t){return new DZ({check:`string_format`,format:`ends_with`,...$(t),suffix:e})}function E$(e){return new OZ({check:`overwrite`,tx:e})}function D$(e){return E$(t=>t.normalize(e))}function O$(){return E$(e=>e.trim())}function k$(){return E$(e=>e.toLowerCase())}function A$(){return E$(e=>e.toUpperCase())}function j$(e,t,n){return new e({type:`array`,element:t,...$(n)})}function M$(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...$(n)})}function N$(e){let t=P$(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(bX(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(bX(r))}},e(n.value,n)));return t}function P$(e,t){let n=new _Z({check:`custom`,...$(t)});return n._zod.check=e,n}function F$(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function I$(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]=VJ(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n}function L$(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]=VJ(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n}function R$(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(F$(function(){return Promise.resolve(e[n.mode===`sync`?`parse`:`parseAsync`](r,t)).then(function(e){return a.shouldUseNativeValidation&&FY({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return Array.isArray(e?.issues)}(e))return{values:{},errors:IY(I$(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(F$(function(){return Promise.resolve((n.mode===`sync`?DX:kX)(e,r,t)).then(function(e){return a.shouldUseNativeValidation&&FY({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return e instanceof SX}(e))return{values:{},errors:IY(L$(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 z$=(0,B.forwardRef)(({as:e=`div`,...t},n)=>(0,V.jsx)(e,{...t,ref:n})),B$=`cf-turnstile-script`,V$=`onloadTurnstileCallback`,H$=e=>!!document.getElementById(e),U$=({render:e=`explicit`,onLoadCallbackName:t=V$,scriptOptions:{nonce:n=``,defer:r=!0,async:i=!0,id:a=``,appendTo:o,onError:s,crossOrigin:c=``}={}})=>{let l=a||`cf-turnstile-script`;if(H$(l))return;let u=document.createElement(`script`);u.id=l,u.src=`https://challenges.cloudflare.com/turnstile/v0/api.js?onload=${t}&render=${e}`,!document.querySelector(`script[src="${u.src}"]`)&&(u.defer=!!r,u.async=!!i,n&&(u.nonce=n),c&&(u.crossOrigin=c),s&&(u.onerror=s,delete window[t]),(o===`body`?document.body:document.getElementsByTagName(`head`)[0]).appendChild(u))},W$={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:`hidden`},flexible:{minWidth:300,width:`100%`,height:65},interactionOnly:{width:`fit-content`,height:`auto`,display:`flex`}};function G$(e){if(e!==`invisible`&&e!==`interactionOnly`)return e}function K$(e=B$){let[t,n]=(0,B.useState)(!1);return(0,B.useEffect)(()=>{let t=()=>{H$(e)&&n(!0)},r=new MutationObserver(t);return r.observe(document,{childList:!0,subtree:!0}),t(),()=>{r.disconnect()}},[e]),t}var q$=`unloaded`,J$,Y$=new Promise((e,t)=>{J$={resolve:e,reject:t},q$===`ready`&&e(void 0)}),X$=(e=V$)=>(q$===`unloaded`&&(q$=`loading`,window[e]=()=>{J$.resolve(),q$=`ready`,delete window[e]}),Y$),Z$=(0,B.forwardRef)((e,t)=>{let{scriptOptions:n,options:r={},siteKey:i,onWidgetLoad:a,onSuccess:o,onExpire:s,onError:c,onBeforeInteractive:l,onAfterInteractive:u,onUnsupported:d,onTimeout:f,onLoadScript:p,id:m,style:h,as:g=`div`,injectScript:_=!0,rerenderOnCallbackChange:v=!1,...y}=e,b=r.size,x=(0,B.useCallback)(()=>typeof b>`u`?{}:r.execution===`execute`?W$.invisible:r.appearance===`interaction-only`?W$.interactionOnly:W$[b],[r.execution,b,r.appearance]),[S,C]=(0,B.useState)(x()),w=(0,B.useRef)(null),[T,E]=(0,B.useState)(!1),D=(0,B.useRef)(),O=(0,B.useRef)(!1),k=m||`cf-turnstile`,A=(0,B.useRef)({onSuccess:o,onError:c,onExpire:s,onBeforeInteractive:l,onAfterInteractive:u,onUnsupported:d,onTimeout:f});(0,B.useEffect)(()=>{v||(A.current={onSuccess:o,onError:c,onExpire:s,onBeforeInteractive:l,onAfterInteractive:u,onUnsupported:d,onTimeout:f})});let j=n?.id||`cf-turnstile-script`,M=K$(j),N=n?.onLoadCallbackName||`onloadTurnstileCallback`,P=r.appearance||`always`,F=(0,B.useMemo)(()=>({sitekey:i,action:r.action,cData:r.cData,theme:r.theme||`auto`,language:r.language||`auto`,tabindex:r.tabIndex,"response-field":r.responseField,"response-field-name":r.responseFieldName,size:G$(b),retry:r.retry||`auto`,"retry-interval":r.retryInterval||8e3,"refresh-expired":r.refreshExpired||`auto`,"refresh-timeout":r.refreshTimeout||`auto`,execution:r.execution||`render`,appearance:r.appearance||`always`,"feedback-enabled":r.feedbackEnabled||!0,callback:e=>{O.current=!0,v?o?.(e):A.current.onSuccess?.(e)},"error-callback":v?c:(...e)=>A.current.onError?.(...e),"expired-callback":v?s:(...e)=>A.current.onExpire?.(...e),"before-interactive-callback":v?l:(...e)=>A.current.onBeforeInteractive?.(...e),"after-interactive-callback":v?u:(...e)=>A.current.onAfterInteractive?.(...e),"unsupported-callback":v?d:(...e)=>A.current.onUnsupported?.(...e),"timeout-callback":v?f:(...e)=>A.current.onTimeout?.(...e)}),[r.action,r.appearance,r.cData,r.execution,r.language,r.refreshExpired,r.responseField,r.responseFieldName,r.retry,r.retryInterval,r.tabIndex,r.theme,r.feedbackEnabled,r.refreshTimeout,i,b,v,v?o:null,v?c:null,v?s:null,v?l:null,v?u:null,v?d:null,v?f:null]),I=(0,B.useCallback)(()=>typeof window<`u`&&!!window.turnstile,[]);return(0,B.useEffect)(function(){_&&!T&&U$({onLoadCallbackName:N,scriptOptions:{...n,id:j}})},[_,T,n,j]),(0,B.useEffect)(function(){q$!==`ready`&&X$(N).then(()=>E(!0)).catch(console.error)},[]),(0,B.useEffect)(function(){if(!w.current||!T)return;let e=!1;return(async()=>{e||!w.current||(D.current=window.turnstile.render(w.current,F),D.current&&a?.(D.current))})(),()=>{e=!0,D.current&&(window.turnstile.remove(D.current),O.current=!1)}},[k,T,F]),(0,B.useImperativeHandle)(t,()=>{let{turnstile:e}=window;return{getResponse(){if(!e?.getResponse||!D.current||!I()){console.warn(`Turnstile has not been loaded`);return}return e.getResponse(D.current)},async getResponsePromise(e=3e4,t=100){return new Promise((n,r)=>{let i,a=async()=>{if(O.current&&window.turnstile&&D.current)try{let e=window.turnstile.getResponse(D.current);return i&&clearTimeout(i),e?n(e):r(Error(`No response received`))}catch(e){return i&&clearTimeout(i),console.warn(`Failed to get response`,e),r(Error(`Failed to get response`))}i||=setTimeout(()=>{i&&clearTimeout(i),r(Error(`Timeout`))},e),await new Promise(e=>setTimeout(e,t)),await a()};a()})},reset(){if(!e?.reset||!D.current||!I()){console.warn(`Turnstile has not been loaded`);return}r.execution===`execute`&&C(W$.invisible);try{O.current=!1,e.reset(D.current)}catch(e){console.warn(`Failed to reset Turnstile widget ${D}`,e)}},remove(){if(!e?.remove||!D.current||!I()){console.warn(`Turnstile has not been loaded`);return}C(W$.invisible),O.current=!1,e.remove(D.current),D.current=null},render(){if(!e?.render||!w.current||!I()||D.current){console.warn(`Turnstile has not been loaded or container not found`);return}let t=e.render(w.current,F);return D.current=t,D.current&&a?.(D.current),r.execution!==`execute`&&C(b?W$[b]:{}),t},execute(){if(r.execution!==`execute`){console.warn(`Execution mode is not set to "execute"`);return}if(!e?.execute||!w.current||!D.current||!I()){console.warn(`Turnstile has not been loaded or container not found`);return}e.execute(w.current,F),C(b?W$[b]:{})},isExpired(){return!e?.isExpired||!D.current||!I()?(console.warn(`Turnstile has not been loaded`),!1):e.isExpired(D.current)}}},[D,r.execution,b,F,w,I,T,a]),(0,B.useEffect)(()=>{M&&!T&&window.turnstile&&E(!0)},[T,M]),(0,B.useEffect)(()=>{C(x())},[r.execution,b,P]),(0,B.useEffect)(()=>{!M||typeof p!=`function`||p()},[M]),(0,V.jsx)(z$,{ref:w,as:g,id:k,style:{...S,...h},...y})});Z$.displayName=`Turnstile`;const Q$=Q(`ZodISODateTime`,(e,t)=>{GZ.init(e,t),w1.init(e,t)});function $$(e){return u$(Q$,e)}const e1=Q(`ZodISODate`,(e,t)=>{KZ.init(e,t),w1.init(e,t)});function t1(e){return d$(e1,e)}const n1=Q(`ZodISOTime`,(e,t)=>{qZ.init(e,t),w1.init(e,t)});function r1(e){return f$(n1,e)}const i1=Q(`ZodISODuration`,(e,t)=>{JZ.init(e,t),w1.init(e,t)});function a1(e){return p$(i1,e)}var o1=(e,t)=>{SX.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>TX(e,t)},flatten:{value:t=>wX(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,WY,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,WY,2)}},isEmpty:{get(){return e.issues.length===0}}})};Q(`ZodError`,o1);const s1=Q(`ZodError`,o1,{Parent:Error}),c1=EX(s1),l1=OX(s1),u1=AX(s1),d1=MX(s1),f1=PX(s1),p1=FX(s1),m1=IX(s1),h1=LX(s1),g1=RX(s1),_1=zX(s1),v1=BX(s1),y1=VX(s1),b1=Q(`ZodType`,(e,t)=>(jZ.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(ZY(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]})),e.clone=(t,n)=>oX(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>c1(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>u1(e,t,n),e.parseAsync=async(t,n)=>l1(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>d1(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>f1(e,t,n),e.decode=(t,n)=>p1(e,t,n),e.encodeAsync=async(t,n)=>m1(e,t,n),e.decodeAsync=async(t,n)=>h1(e,t,n),e.safeEncode=(t,n)=>g1(e,t,n),e.safeDecode=(t,n)=>_1(e,t,n),e.safeEncodeAsync=async(t,n)=>v1(e,t,n),e.safeDecodeAsync=async(t,n)=>y1(e,t,n),e.refine=(t,n)=>e.check(T0(t,n)),e.superRefine=t=>e.check(E0(t)),e.overwrite=t=>e.check(E$(t)),e.optional=()=>l0(e),e.nullable=()=>d0(e),e.nullish=()=>l0(d0(e)),e.nonoptional=t=>_0(e,t),e.array=()=>Z1(e),e.or=t=>t0([e,t]),e.and=t=>r0(e,t),e.transform=t=>x0(e,s0(t)),e.default=t=>p0(e,t),e.prefault=t=>h0(e,t),e.catch=t=>y0(e,t),e.pipe=t=>x0(e,t),e.readonly=()=>C0(e),e.describe=t=>{let n=e.clone();return BQ.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return BQ.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return BQ.get(e);let n=e.clone();return BQ.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),x1=Q(`_ZodString`,(e,t)=>{MZ.init(e,t),b1.init(e,t);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(b$(...t)),e.includes=(...t)=>e.check(C$(...t)),e.startsWith=(...t)=>e.check(w$(...t)),e.endsWith=(...t)=>e.check(T$(...t)),e.min=(...t)=>e.check(v$(...t)),e.max=(...t)=>e.check(_$(...t)),e.length=(...t)=>e.check(y$(...t)),e.nonempty=(...t)=>e.check(v$(1,...t)),e.lowercase=t=>e.check(x$(t)),e.uppercase=t=>e.check(S$(t)),e.trim=()=>e.check(O$()),e.normalize=(...t)=>e.check(D$(...t)),e.toLowerCase=()=>e.check(k$()),e.toUpperCase=()=>e.check(A$())}),S1=Q(`ZodString`,(e,t)=>{MZ.init(e,t),x1.init(e,t),e.email=t=>e.check(HQ(T1,t)),e.url=t=>e.check(JQ(O1,t)),e.jwt=t=>e.check(l$(U1,t)),e.emoji=t=>e.check(YQ(k1,t)),e.guid=t=>e.check(UQ(E1,t)),e.uuid=t=>e.check(WQ(D1,t)),e.uuidv4=t=>e.check(GQ(D1,t)),e.uuidv6=t=>e.check(KQ(D1,t)),e.uuidv7=t=>e.check(qQ(D1,t)),e.nanoid=t=>e.check(XQ(A1,t)),e.guid=t=>e.check(UQ(E1,t)),e.cuid=t=>e.check(ZQ(j1,t)),e.cuid2=t=>e.check(QQ(M1,t)),e.ulid=t=>e.check($Q(N1,t)),e.base64=t=>e.check(o$(B1,t)),e.base64url=t=>e.check(s$(V1,t)),e.xid=t=>e.check(e$(P1,t)),e.ksuid=t=>e.check(t$(F1,t)),e.ipv4=t=>e.check(n$(I1,t)),e.ipv6=t=>e.check(r$(L1,t)),e.cidrv4=t=>e.check(i$(R1,t)),e.cidrv6=t=>e.check(a$(z1,t)),e.e164=t=>e.check(c$(H1,t)),e.datetime=t=>e.check($$(t)),e.date=t=>e.check(t1(t)),e.time=t=>e.check(r1(t)),e.duration=t=>e.check(a1(t))});function C1(e){return VQ(S1,e)}const w1=Q(`ZodStringFormat`,(e,t)=>{NZ.init(e,t),x1.init(e,t)}),T1=Q(`ZodEmail`,(e,t)=>{IZ.init(e,t),w1.init(e,t)}),E1=Q(`ZodGUID`,(e,t)=>{PZ.init(e,t),w1.init(e,t)}),D1=Q(`ZodUUID`,(e,t)=>{FZ.init(e,t),w1.init(e,t)}),O1=Q(`ZodURL`,(e,t)=>{LZ.init(e,t),w1.init(e,t)}),k1=Q(`ZodEmoji`,(e,t)=>{RZ.init(e,t),w1.init(e,t)}),A1=Q(`ZodNanoID`,(e,t)=>{zZ.init(e,t),w1.init(e,t)}),j1=Q(`ZodCUID`,(e,t)=>{BZ.init(e,t),w1.init(e,t)}),M1=Q(`ZodCUID2`,(e,t)=>{VZ.init(e,t),w1.init(e,t)}),N1=Q(`ZodULID`,(e,t)=>{HZ.init(e,t),w1.init(e,t)}),P1=Q(`ZodXID`,(e,t)=>{UZ.init(e,t),w1.init(e,t)}),F1=Q(`ZodKSUID`,(e,t)=>{WZ.init(e,t),w1.init(e,t)}),I1=Q(`ZodIPv4`,(e,t)=>{YZ.init(e,t),w1.init(e,t)}),L1=Q(`ZodIPv6`,(e,t)=>{XZ.init(e,t),w1.init(e,t)}),R1=Q(`ZodCIDRv4`,(e,t)=>{ZZ.init(e,t),w1.init(e,t)}),z1=Q(`ZodCIDRv6`,(e,t)=>{QZ.init(e,t),w1.init(e,t)}),B1=Q(`ZodBase64`,(e,t)=>{eQ.init(e,t),w1.init(e,t)}),V1=Q(`ZodBase64URL`,(e,t)=>{nQ.init(e,t),w1.init(e,t)}),H1=Q(`ZodE164`,(e,t)=>{rQ.init(e,t),w1.init(e,t)}),U1=Q(`ZodJWT`,(e,t)=>{aQ.init(e,t),w1.init(e,t)}),W1=Q(`ZodBoolean`,(e,t)=>{oQ.init(e,t),b1.init(e,t)});function G1(e){return m$(W1,e)}const K1=Q(`ZodUnknown`,(e,t)=>{sQ.init(e,t),b1.init(e,t)});function q1(){return h$(K1)}const J1=Q(`ZodNever`,(e,t)=>{cQ.init(e,t),b1.init(e,t)});function Y1(e){return g$(J1,e)}const X1=Q(`ZodArray`,(e,t)=>{uQ.init(e,t),b1.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(v$(t,n)),e.nonempty=t=>e.check(v$(1,t)),e.max=(t,n)=>e.check(_$(t,n)),e.length=(t,n)=>e.check(y$(t,n)),e.unwrap=()=>e.element});function Z1(e,t){return j$(X1,e,t)}const Q1=Q(`ZodObject`,(e,t)=>{hQ.init(e,t),b1.init(e,t),YY(e,`shape`,()=>t.shape),e.keyof=()=>a0(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:q1()}),e.loose=()=>e.clone({...e._zod.def,catchall:q1()}),e.strict=()=>e.clone({...e._zod.def,catchall:Y1()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>uX(e,t),e.safeExtend=t=>dX(e,t),e.merge=t=>fX(e,t),e.pick=t=>cX(e,t),e.omit=t=>lX(e,t),e.partial=(...t)=>pX(c0,e,t[0]),e.required=(...t)=>mX(g0,e,t[0])});function $1(e,t){return new Q1({type:`object`,shape:e??{},...$(t)})}const e0=Q(`ZodUnion`,(e,t)=>{_Q.init(e,t),b1.init(e,t),e.options=t.options});function t0(e,t){return new e0({type:`union`,options:e,...$(t)})}const n0=Q(`ZodIntersection`,(e,t)=>{vQ.init(e,t),b1.init(e,t)});function r0(e,t){return new n0({type:`intersection`,left:e,right:t})}const i0=Q(`ZodEnum`,(e,t)=>{xQ.init(e,t),b1.init(e,t),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 i0({...t,checks:[],...$(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 i0({...t,checks:[],...$(r),entries:i})}});function a0(e,t){return new i0({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...$(t)})}const o0=Q(`ZodTransform`,(e,t)=>{SQ.init(e,t),b1.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new BY(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(bX(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(bX(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function s0(e){return new o0({type:`transform`,transform:e})}const c0=Q(`ZodOptional`,(e,t)=>{wQ.init(e,t),b1.init(e,t),e.unwrap=()=>e._zod.def.innerType});function l0(e){return new c0({type:`optional`,innerType:e})}const u0=Q(`ZodNullable`,(e,t)=>{TQ.init(e,t),b1.init(e,t),e.unwrap=()=>e._zod.def.innerType});function d0(e){return new u0({type:`nullable`,innerType:e})}const f0=Q(`ZodDefault`,(e,t)=>{EQ.init(e,t),b1.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function p0(e,t){return new f0({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():rX(t)}})}const m0=Q(`ZodPrefault`,(e,t)=>{OQ.init(e,t),b1.init(e,t),e.unwrap=()=>e._zod.def.innerType});function h0(e,t){return new m0({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():rX(t)}})}const g0=Q(`ZodNonOptional`,(e,t)=>{kQ.init(e,t),b1.init(e,t),e.unwrap=()=>e._zod.def.innerType});function _0(e,t){return new g0({type:`nonoptional`,innerType:e,...$(t)})}const v0=Q(`ZodCatch`,(e,t)=>{jQ.init(e,t),b1.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function y0(e,t){return new v0({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const b0=Q(`ZodPipe`,(e,t)=>{MQ.init(e,t),b1.init(e,t),e.in=t.in,e.out=t.out});function x0(e,t){return new b0({type:`pipe`,in:e,out:t})}const S0=Q(`ZodReadonly`,(e,t)=>{PQ.init(e,t),b1.init(e,t),e.unwrap=()=>e._zod.def.innerType});function C0(e){return new S0({type:`readonly`,innerType:e})}const w0=Q(`ZodCustom`,(e,t)=>{IQ.init(e,t),b1.init(e,t)});function T0(e,t={}){return M$(w0,e,t)}function E0(e){return N$(e)}var D0=R();function O0(e){let t=(0,D0.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(Vl,{"data-slot":`label`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var k0=R(),A0=AJ,j0=B.createContext({}),M0=e=>{let t=(0,k0.c)(9),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;t[2]===n.name?r=t[3]:(r={name:n.name},t[2]=n.name,t[3]=r);let i;t[4]===n?i=t[5]:(i=(0,V.jsx)(BJ,{...n}),t[4]=n,t[5]=i);let a;return t[6]!==r||t[7]!==i?(a=(0,V.jsx)(j0.Provider,{value:r,children:i}),t[6]=r,t[7]=i,t[8]=a):a=t[8],a},N0=()=>{let e=(0,k0.c)(13),t=B.useContext(j0),n=B.useContext(P0),{getFieldState:r}=kJ(),i;e[0]===t.name?i=e[1]:(i={name:t.name},e[0]=t.name,e[1]=i);let a=NJ(i),o;e[2]!==t.name||e[3]!==a||e[4]!==r?(o=r(t.name,a),e[2]=t.name,e[3]=a,e[4]=r,e[5]=o):o=e[5];let s=o;if(!t)throw Error(`useFormField should be used within <FormField>`);let{id:c}=n,l=`${c}-form-item`,u=`${c}-form-item-description`,d=`${c}-form-item-message`,f;return e[6]!==t.name||e[7]!==s||e[8]!==c||e[9]!==l||e[10]!==u||e[11]!==d?(f={id:c,name:t.name,formItemId:l,formDescriptionId:u,formMessageId:d,...s},e[6]=t.name,e[7]=s,e[8]=c,e[9]=l,e[10]=u,e[11]=d,e[12]=f):f=e[12],f},P0=B.createContext({});function F0(e){let t=(0,k0.c)(13),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i=B.useId(),a;t[3]===i?a=t[4]:(a={id:i},t[3]=i,t[4]=a);let o;t[5]===n?o=t[6]:(o=z(`grid gap-2`,n),t[5]=n,t[6]=o);let s;t[7]!==r||t[8]!==o?(s=(0,V.jsx)(`div`,{"data-slot":`form-item`,className:o,...r}),t[7]=r,t[8]=o,t[9]=s):s=t[9];let c;return t[10]!==a||t[11]!==s?(c=(0,V.jsx)(P0.Provider,{value:a,children:s}),t[10]=a,t[11]=s,t[12]=c):c=t[12],c}function I0(e){let t=(0,k0.c)(10),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let{error:i,formItemId:a}=N0(),o=!!i,s;t[3]===n?s=t[4]:(s=z(`data-[error=true]:text-destructive`,n),t[3]=n,t[4]=s);let c;return t[5]!==a||t[6]!==r||t[7]!==o||t[8]!==s?(c=(0,V.jsx)(O0,{"data-slot":`form-label`,"data-error":o,className:s,htmlFor:a,...r}),t[5]=a,t[6]=r,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function L0(e){let t=(0,k0.c)(7),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let{error:r,formItemId:i,formDescriptionId:a,formMessageId:o}=N0(),s=r?`${a} ${o}`:`${a}`,c=!!r,l;return t[2]!==i||t[3]!==n||t[4]!==s||t[5]!==c?(l=(0,V.jsx)(ue,{"data-slot":`form-control`,id:i,"aria-describedby":s,"aria-invalid":c,...n}),t[2]=i,t[3]=n,t[4]=s,t[5]=c,t[6]=l):l=t[6],l}function R0(e){let t=(0,k0.c)(10),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let{error:i,formMessageId:a}=N0(),o=i?String(i?.message??``):r.children;if(!o)return null;let s;t[3]===n?s=t[4]:(s=z(`text-destructive text-sm`,n),t[3]=n,t[4]=s);let c;return t[5]!==o||t[6]!==a||t[7]!==r||t[8]!==s?(c=(0,V.jsx)(`p`,{"data-slot":`form-message`,id:a,className:s,...r,children:o}),t[5]=o,t[6]=a,t[7]=r,t[8]=s,t[9]=c):c=t[9],c}function z0(){let e=u(`root`);if(!e?.env)throw Error(`useEnv must be used within a route that has access to root loader data`);return e.env}var B0=R();function V0(e){let t=(0,B0.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`card`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function H0(e){let t=(0,B0.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`card-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function U0(e){let t=(0,B0.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`leading-none font-semibold`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`card-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function W0(e){let t=(0,B0.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`text-muted-foreground text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`card-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function G0(e){let t=(0,B0.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`px-6`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`card-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function K0(e){let t=(0,B0.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`flex items-center px-6 [.border-t]:pt-6`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`card-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var q0=R();function J0(e){let t=(0,q0.c)(8),{title:n,description:r,variant:i}=e,a=i===void 0?`default`:i,o;t[0]===n?o=t[1]:(o=(0,V.jsx)(U0,{className:`text-3xl font-bold tracking-tight`,children:n}),t[0]=n,t[1]=o);let s;t[2]!==r||t[3]!==a?(s=r&&(0,V.jsxs)(W0,{className:a===`error`?`text-destructive text-base flex items-start gap-2`:`text-base`,children:[a===`error`&&(0,V.jsx)(rn,{className:`mt-0.5 size-4 shrink-0`}),(0,V.jsx)(`span`,{children:r})]}),t[2]=r,t[3]=a,t[4]=s):s=t[4];let c;return t[5]!==o||t[6]!==s?(c=(0,V.jsxs)(H0,{className:`space-y-0.5`,children:[o,s]}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function Y0(e){let t=(0,q0.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,V.jsx)(G0,{children:n}),t[0]=n,t[1]=r),r}function X0(e){let t=(0,q0.c)(3),{children:n,gap:r}=e,i=`flex flex-col ${(r===void 0?`md`:r)===`sm`?`gap-3`:`gap-4`} border-t pt-6`,a;return t[0]!==n||t[1]!==i?(a=(0,V.jsx)(K0,{className:i,children:n}),t[0]=n,t[1]=i,t[2]=a):a=t[2],a}function Z0(e){let t=(0,q0.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,V.jsx)(V0,{children:n}),t[0]=n,t[1]=r),r}Z0.Header=J0,Z0.Content=Y0,Z0.Footer=X0;var Q0=R();function $0(e){let t=(0,Q0.c)(3),{error:n}=e;if(!n)return null;let r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,V.jsx)(rn,{className:`mt-0.5 size-4 shrink-0`}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,V.jsxs)(`div`,{className:`bg-destructive/10 text-destructive flex items-start gap-2 rounded-md border border-destructive/20 p-3 text-sm animate-in slide-in-from-top-1`,role:`alert`,children:[r,(0,V.jsx)(`span`,{children:n})]}),t[1]=n,t[2]=i),i}var e2=R();function t2(e){let t=(0,e2.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=z(`size-4 animate-spin`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(xn,{role:`status`,"aria-label":`Loading`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var n2=R();function r2(e){let t=(0,n2.c)(7),{label:n,isLoading:r,disabled:i}=e,a=i===void 0?!1:i,o=r||a,s;t[0]!==a||t[1]!==r?(s=(r||a)&&(0,V.jsx)(t2,{}),t[0]=a,t[1]=r,t[2]=s):s=t[2];let c;return t[3]!==n||t[4]!==o||t[5]!==s?(c=(0,V.jsxs)(H,{type:`submit`,className:`w-full transition-all duration-200 hover:shadow-lg hover:-translate-y-0.5 active:translate-y-0`,disabled:o,children:[s,n]}),t[3]=n,t[4]=o,t[5]=s,t[6]=c):c=t[6],c}var i2=R();function a2(e){let t=(0,i2.c)(7),{icon:n,label:r}=e,i;t[0]===n?i=t[1]:(i=(0,V.jsx)(n,{className:`size-3`}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,V.jsx)(`span`,{children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,V.jsxs)(`div`,{className:`flex items-center justify-center gap-1.5 text-xs text-muted-foreground`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}var o2=n({default:()=>c2,loader:()=>s2});async function s2({context:e}){if(!e.get(D).container.auth.uiFeatures.emailAndPassword)throw new Response(`Not Found`,{status:404});return null}var c2=d(function(){let{t:e}=me(),t=z0(),{client:n}=Mm(),[r,i]=(0,B.useState)(!1),[a,o]=(0,B.useState)(null),[s,c]=(0,B.useState)(!1),[l,u]=(0,B.useState)(null),d=(0,B.useRef)(null),f=NY({resolver:R$($1({email:C1().email(e(`auth.forgotPassword.errors.emailInvalid`))})),defaultValues:{email:``}}),p=async t=>{try{if(i(!0),o(null),!l){o(e(`auth.forgotPassword.errors.captchaRequired`));return}let r=await n.requestPasswordReset({email:t.email,redirectTo:S(`/reset-password`),fetchOptions:{headers:{"x-captcha-response":l||``}}});if(r.error){o(e(`auth.errors.${r.error.code}`,e(`auth.forgotPassword.errors.requestFailed`))),u(null),d.current?.reset();return}c(!0)}catch(t){o(t instanceof Error?t.message:e(`auth.forgotPassword.errors.networkError`)),u(null),d.current?.reset()}finally{i(!1)}};return s?(0,V.jsxs)(Z0,{children:[(0,V.jsx)(Z0.Header,{title:e(`auth.forgotPassword.success.title`),description:e(`auth.forgotPassword.success.description`)}),(0,V.jsx)(Z0.Footer,{gap:`sm`,children:(0,V.jsx)(O,{to:S(`/login`),className:`text-primary hover:underline transition-colors duration-200 text-sm font-medium mx-auto`,children:e(`auth.forgotPassword.backToLogin`)})})]}):(0,V.jsxs)(Z0,{children:[(0,V.jsx)(Z0.Header,{title:e(`auth.forgotPassword.title`),description:e(`auth.forgotPassword.description`)}),(0,V.jsx)(Z0.Content,{children:(0,V.jsx)(A0,{...f,children:(0,V.jsxs)(`form`,{onSubmit:f.handleSubmit(p),className:`space-y-4`,noValidate:!0,children:[(0,V.jsx)($0,{error:a}),(0,V.jsx)(M0,{control:f.control,name:`email`,render:({field:t})=>(0,V.jsxs)(F0,{children:[(0,V.jsx)(I0,{children:e(`auth.forgotPassword.email.label`)}),(0,V.jsx)(L0,{children:(0,V.jsx)(mC,{...t,type:`email`,placeholder:e(`auth.forgotPassword.email.placeholder`),autoComplete:`email`,disabled:r})}),(0,V.jsx)(R0,{})]})}),(0,V.jsx)(Z$,{ref:d,onError:()=>{o(e(`auth.forgotPassword.errors.captchaFailed`)),u(null)},onExpire:()=>u(null),onSuccess:e=>u(e),options:{size:`invisible`},siteKey:t.CF_TURNSTILE_SITE_KEY}),(0,V.jsx)(r2,{label:e(`auth.forgotPassword.submit`),isLoading:r,disabled:!l})]})})}),(0,V.jsxs)(Z0.Footer,{children:[(0,V.jsx)(O,{to:S(`/login`),className:`text-primary hover:underline transition-colors duration-200 text-sm font-medium mx-auto`,children:e(`auth.forgotPassword.backToLogin`)}),(0,V.jsx)(a2,{icon:Sn,label:e(`auth.secureReset`)})]})]})}),l2=R(),u2={show:`Show password`,hide:`Hide password`,strength:`Password strength`,requirements:`Requirements`,met:`met`,notMet:`not met`,atLeast8Characters:`At least 8 characters`,atLeast1Number:`At least 1 number`,atLeast1LowercaseLetter:`At least 1 lowercase letter`,atLeast1UppercaseLetter:`At least 1 uppercase letter`,atLeast1SpecialCharacter:`At least 1 special character`};function d2(e){let t=(0,l2.c)(41),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({onChange:i,showStrength:a,labels:r,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?!1:a,s={...u2,...r},c,l;if(t[5]!==n){let{type:e,value:r,...i}=n;l=r,c=i,t[5]=n,t[6]=c,t[7]=l}else c=t[6],l=t[7];let[u,d]=(0,B.useState)(!1),f;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>d(m2),t[8]=f):f=t[8];let p=f,[m,h]=(0,B.useState)(l||``),g=(e=>[{regex:/.{8,}/,text:s.atLeast8Characters},{regex:/[0-9]/,text:s.atLeast1Number},{regex:/[a-z]/,text:s.atLeast1LowercaseLetter},{regex:/[A-Z]/,text:s.atLeast1UppercaseLetter},{regex:/[^A-Za-z0-9]/,text:s.atLeast1SpecialCharacter}].map(t=>({met:t.regex.test(e),text:t.text})))(m),_;t[9]===g?_=t[10]:(_=g.filter(p2),t[9]=g,t[10]=_);let v=_.length,y=f2,b;t[11]!==h||t[12]!==l?(b=()=>{h(l||``)},t[11]=h,t[12]=l,t[13]=b):b=t[13];let x;t[14]===l?x=t[15]:(x=[l],t[14]=l,t[15]=x),(0,B.useEffect)(b,x);let S=`${c.id}-description`,C;t[16]!==i||t[17]!==h?(C=e=>{i?.(e),h(e.target.value)},t[16]=i,t[17]=h,t[18]=C):C=t[18];let w=u?`text`:`password`,T;t[19]===o?T=t[20]:(T=o&&{"data-1p-ignore":`true`,"data-lpignore":`true`,"data-bwignore":`true`,autoComplete:`new-password`},t[19]=o,t[20]=T);let E;t[21]!==m||t[22]!==c||t[23]!==S||t[24]!==C||t[25]!==w||t[26]!==T?(E=(0,V.jsx)(mC,{"aria-describedby":S,value:m,onChange:C,type:w,...c,...T}),t[21]=m,t[22]=c,t[23]=S,t[24]=C,t[25]=w,t[26]=T,t[27]=E):E=t[27];let D=u?s.hide:s.show,O;t[28]===u?O=t[29]:(O=u?(0,V.jsx)(ln,{size:16,"aria-hidden":`true`}):(0,V.jsx)(un,{size:16,"aria-hidden":`true`}),t[28]=u,t[29]=O);let k;t[30]!==u||t[31]!==D||t[32]!==O||t[33]!==p?(k=(0,V.jsx)(`button`,{className:`text-muted-foreground/80 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 absolute inset-y-0 end-0 flex h-full w-9 items-center justify-center rounded-e-md transition-[color,box-shadow] outline-none focus:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,onClick:p,"aria-label":D,"aria-pressed":u,"aria-controls":`password`,children:O}),t[30]=u,t[31]=D,t[32]=O,t[33]=p,t[34]=k):k=t[34];let A;t[35]!==E||t[36]!==k?(A=(0,V.jsx)(`div`,{className:`*:not-first:mt-2`,children:(0,V.jsxs)(`div`,{className:`relative`,children:[E,k]})}),t[35]=E,t[36]=k,t[37]=A):A=t[37];let j=o&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`bg-border mt-3 mb-4 h-1 w-full overflow-hidden rounded-full`,role:`progressbar`,"aria-valuenow":v,"aria-valuemin":0,"aria-valuemax":4,"aria-label":s.strength,children:(0,V.jsx)(`div`,{className:`h-full ${y(v)} transition-all duration-500 ease-out`,style:{width:`${v/5*100}%`}})}),(0,V.jsxs)(`p`,{id:`${c.id}-description`,className:`text-foreground mb-2 text-sm font-medium`,children:[s.requirements,`:`]}),(0,V.jsx)(`ul`,{className:`space-y-1.5`,"aria-label":s.requirements,children:g.map((e,t)=>(0,V.jsxs)(`li`,{className:`flex items-center gap-2`,children:[e.met?(0,V.jsx)(Zt,{size:16,className:`text-emerald-500`,"aria-hidden":`true`}):(0,V.jsx)(Ie,{size:16,className:`text-muted-foreground/80`,"aria-hidden":`true`}),(0,V.jsxs)(`span`,{className:`text-xs ${e.met?`text-emerald-600`:`text-muted-foreground`}`,children:[e.text,(0,V.jsx)(`span`,{className:`sr-only`,children:e.met?` - ${s.met}`:` - ${s.notMet}`})]})]},t.toString()))})]}),M;return t[38]!==A||t[39]!==j?(M=(0,V.jsxs)(`div`,{children:[A,j]}),t[38]=A,t[39]=j,t[40]=M):M=t[40],M}function f2(e){return e===0?`bg-border`:e<=1?`bg-red-500`:e<=2?`bg-orange-500`:e<=3?`bg-amber-500`:e<=4?`bg-yellow-500`:`bg-emerald-500`}function p2(e){return e.met}function m2(e){return!e}function h2(e,t=`/home`){return e&&e.startsWith(`/`)&&!e.startsWith(`//`)?e:t}var g2=R();function _2(e){let t=(0,g2.c)(3),{text:n}=e,r=n===void 0?`Or continue with email`:n,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,V.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,V.jsx)(gC,{className:`w-full`})}),t[0]=i):i=t[0];let a;return t[1]===r?a=t[2]:(a=(0,V.jsxs)(`div`,{className:`relative`,children:[i,(0,V.jsx)(`div`,{className:`relative flex justify-center text-xs uppercase`,children:(0,V.jsx)(`span`,{className:`bg-card text-muted-foreground px-2`,children:r})})]}),t[1]=r,t[2]=a),a}const v2={google:{label:`Google`,icon:mw,brandColor:`#4285F4`},github:{label:`GitHub`,icon:fw,brandColor:`#181717`},apple:{label:`Apple`,icon:cw,brandColor:`#000000`},microsoft:{label:`Microsoft`,icon:yw,brandColor:`#00A4EF`},linkedin:{label:`LinkedIn`,icon:hw,brandColor:`#0A66C2`},discord:{label:`Discord`,icon:lw,brandColor:`#5865F2`},dropbox:{label:`Dropbox`,icon:uw,brandColor:`#0061FF`},facebook:{label:`Facebook`,icon:dw,brandColor:`#1877F2`},gitlab:{label:`GitLab`,icon:pw,brandColor:`#FC6D26`},reddit:{label:`Reddit`,icon:gw,brandColor:`#FF4500`},spotify:{label:`Spotify`,icon:_w,brandColor:`#1DB954`},twitch:{label:`Twitch`,icon:vw,brandColor:`#9146FF`},twitter:{label:`X (Twitter)`,icon:bw,brandColor:`#000000`}};function y2(e){return v2[e]}function b2(e){if(!e)return[];let t=Object.keys(e).filter(t=>e[t]),n=Object.keys(v2);return t.sort((e,t)=>n.indexOf(e)-n.indexOf(t))}function x2({mode:e,callbackURL:t,onError:n}){let{t:r}=me(),{client:i,features:a}=Mm();f();let[o,s]=(0,B.useState)(null),c=b2(a.socialProviders);if(c.length===0)return null;let l=c.length>2,u=async e=>{try{s(e),await i.signIn.social({provider:e,callbackURL:t||S(`/home`)})}catch(e){s(null);let t=e instanceof Error?e:Error(`Authentication failed`);n?.(t)}};return l?(0,V.jsx)(`div`,{className:`grid grid-cols-3 gap-2`,children:c.map(e=>{let t=y2(e),n=t.icon,i=o===e;return(0,V.jsx)(H,{type:`button`,variant:`outline`,size:`lg`,disabled:!!o,onClick:()=>u(e),className:`aspect-square p-0`,"aria-label":r(`auth.social.continueWith`,{provider:t.label}),children:i?(0,V.jsx)(t2,{className:`size-5`}):(0,V.jsx)(n,{className:`size-5`})},e)})}):(0,V.jsx)(`div`,{className:`flex flex-col gap-2`,children:c.map(e=>{let t=y2(e),n=t.icon;return(0,V.jsxs)(H,{type:`button`,variant:`outline`,size:`lg`,disabled:!!o,onClick:()=>u(e),className:`w-full`,children:[o===e?(0,V.jsx)(t2,{className:`size-5`}):(0,V.jsx)(n,{className:`size-5`}),r(`auth.social.continueWith`,{provider:t.label})]},e)})})}var S2=n({default:()=>C2}),C2=d(function(){let{t:e}=me(),t=z0(),{client:n,features:r}=Mm(),i=f(),[a]=l(),[o,s]=(0,B.useState)(!1),[c,u]=(0,B.useState)(null),[d,p]=(0,B.useState)(null),m=(0,B.useRef)(null),h=h2(a.get(`returnTo`),S(`/home`)),g=r.socialProviders&&Object.values(r.socialProviders).some(e=>e),_=!!r.emailAndPassword,v=NY({resolver:R$($1({email:C1().email(e(`auth.login.errors.emailInvalid`)),password:C1().min(1,e(`auth.login.errors.passwordRequired`)).min(8,e(`auth.login.errors.passwordMinLength`)),rememberMe:G1()})),defaultValues:{email:``,password:``,rememberMe:!1}}),y=async t=>{try{if(s(!0),u(null),!d){u(e(`auth.login.errors.captchaRequired`));return}let r=await n.signIn.email({email:t.email,password:t.password,rememberMe:t.rememberMe,callbackURL:h,fetchOptions:{headers:{"x-captcha-response":d}}});if(r.error){u(e(`auth.errors.${r.error.code}`,e(`auth.login.errors.invalidCredentials`))),p(null),m.current?.reset();return}i(h)}catch(t){u(t instanceof Error?t.message:e(`auth.login.errors.networkError`)),p(null),m.current?.reset()}finally{s(!1)}};return(0,V.jsxs)(Z0,{children:[(0,V.jsx)(Z0.Header,{title:e(`auth.login.title`),description:e(`auth.login.description`)}),(0,V.jsx)(Z0.Content,{children:(0,V.jsxs)(`div`,{className:`space-y-4`,children:[g&&(0,V.jsx)(x2,{mode:`login`,callbackURL:h,onError:e=>u(e.message)}),g&&_&&(0,V.jsx)(_2,{text:e(`auth.social.orContinueWithEmail`)}),_&&(0,V.jsx)(A0,{...v,children:(0,V.jsxs)(`form`,{onSubmit:v.handleSubmit(y),className:`space-y-4`,noValidate:!0,children:[(0,V.jsx)($0,{error:c}),(0,V.jsx)(M0,{control:v.control,name:`email`,render:({field:t})=>(0,V.jsxs)(F0,{children:[(0,V.jsx)(I0,{children:e(`auth.login.email.label`)}),(0,V.jsx)(L0,{children:(0,V.jsx)(mC,{...t,type:`email`,placeholder:e(`auth.login.email.placeholder`),autoComplete:`email`,disabled:o})}),(0,V.jsx)(R0,{})]})}),(0,V.jsx)(M0,{control:v.control,name:`password`,render:({field:t})=>(0,V.jsxs)(F0,{children:[(0,V.jsx)(I0,{children:e(`auth.login.password.label`)}),(0,V.jsx)(L0,{children:(0,V.jsx)(d2,{...t,placeholder:e(`auth.login.password.placeholder`),autoComplete:`current-password`,disabled:o})}),(0,V.jsx)(R0,{})]})}),(0,V.jsx)(M0,{control:v.control,name:`rememberMe`,render:({field:t})=>(0,V.jsx)(F0,{children:(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(L0,{children:(0,V.jsx)(oq,{checked:t.value,onCheckedChange:t.onChange,disabled:o})}),(0,V.jsx)(I0,{className:`mt-0! cursor-pointer text-sm font-normal`,children:e(`auth.login.rememberMe`)})]})})}),(0,V.jsx)(Z$,{ref:m,onError:()=>{u(e(`auth.login.errors.captchaFailed`)),p(null)},onExpire:()=>p(null),onSuccess:e=>p(e),options:{size:`invisible`},siteKey:t.CF_TURNSTILE_SITE_KEY}),(0,V.jsx)(r2,{label:e(`auth.login.submit`),isLoading:o,disabled:!d})]})})]})}),(0,V.jsxs)(Z0.Footer,{children:[_&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`text-center text-sm`,children:(0,V.jsx)(O,{to:S(`/forgot-password`),className:`text-primary hover:underline transition-colors duration-200`,children:e(`auth.login.forgotPassword`)})}),(0,V.jsxs)(`div`,{className:`text-center text-sm`,children:[(0,V.jsxs)(`span`,{className:`text-muted-foreground`,children:[e(`auth.login.noAccount`),` `]}),(0,V.jsx)(O,{to:S(`/signup`),className:`text-primary hover:underline transition-colors duration-200 font-medium`,children:e(`auth.login.signUp`)})]})]}),(0,V.jsx)(a2,{icon:Sn,label:e(`auth.secureLogin`)})]})]})}),w2=n({default:()=>E2,loader:()=>T2});async function T2({context:e}){if(!e.get(D).container.auth.uiFeatures.emailAndPassword)throw new Response(`Not Found`,{status:404});return null}var E2=d(function(){let{t:e}=me(),t=z0(),{client:n}=Mm(),r=f(),[i]=l(),[a,o]=(0,B.useState)(!1),[s,c]=(0,B.useState)(null),[u,d]=(0,B.useState)(null),p=(0,B.useRef)(null),m=i.get(`token`),h=i.get(`error`),g=NY({resolver:R$($1({newPassword:C1().min(1,e(`auth.resetPassword.errors.passwordRequired`)).min(8,e(`auth.resetPassword.errors.passwordMinLength`)),confirmPassword:C1().min(1,e(`auth.resetPassword.errors.passwordRequired`))}).refine(e=>e.newPassword===e.confirmPassword,{message:e(`auth.resetPassword.errors.passwordMismatch`),path:[`confirmPassword`]})),defaultValues:{newPassword:``,confirmPassword:``}}),_=async t=>{try{if(o(!0),c(null),!u){c(e(`auth.resetPassword.errors.captchaRequired`));return}if(!m){c(e(`auth.resetPassword.errors.tokenRequired`));return}let i=await n.resetPassword({newPassword:t.newPassword,token:m,fetchOptions:{headers:{"x-captcha-response":u||``}}});if(i.error){c(e(`auth.errors.${i.error.code}`,e(`auth.resetPassword.errors.resetFailed`))),d(null),p.current?.reset();return}r(`${S(`/login`)}?reset=success`)}catch(t){c(t instanceof Error?t.message:e(`auth.resetPassword.errors.networkError`)),d(null),p.current?.reset()}finally{o(!1)}};return!m||h?(0,V.jsxs)(Z0,{children:[(0,V.jsx)(Z0.Header,{title:e(`auth.resetPassword.title`),description:e(`auth.resetPassword.errors.invalidToken`),variant:`error`}),(0,V.jsxs)(Z0.Footer,{gap:`sm`,children:[(0,V.jsx)(O,{to:S(`/forgot-password`),className:`text-primary hover:underline transition-colors duration-200 text-sm font-medium`,children:e(`auth.forgotPassword.requestNewLink`)}),(0,V.jsx)(O,{to:S(`/login`),className:`text-muted-foreground hover:underline transition-colors duration-200 text-sm`,children:e(`auth.forgotPassword.backToLogin`)})]})]}):(0,V.jsxs)(Z0,{children:[(0,V.jsx)(Z0.Header,{title:e(`auth.resetPassword.title`),description:e(`auth.resetPassword.description`)}),(0,V.jsx)(Z0.Content,{children:(0,V.jsx)(A0,{...g,children:(0,V.jsxs)(`form`,{onSubmit:g.handleSubmit(_),className:`space-y-4`,noValidate:!0,children:[(0,V.jsx)($0,{error:s}),(0,V.jsx)(M0,{control:g.control,name:`newPassword`,render:({field:t})=>(0,V.jsxs)(F0,{children:[(0,V.jsx)(I0,{children:e(`auth.resetPassword.newPassword.label`)}),(0,V.jsx)(L0,{children:(0,V.jsx)(d2,{...t,placeholder:e(`auth.resetPassword.newPassword.placeholder`),autoComplete:`new-password`,disabled:a,showStrength:!0})}),(0,V.jsx)(R0,{})]})}),(0,V.jsx)(M0,{control:g.control,name:`confirmPassword`,render:({field:t})=>(0,V.jsxs)(F0,{children:[(0,V.jsx)(I0,{children:e(`auth.resetPassword.confirmPassword.label`)}),(0,V.jsx)(L0,{children:(0,V.jsx)(d2,{...t,placeholder:e(`auth.resetPassword.confirmPassword.placeholder`),autoComplete:`new-password`,disabled:a})}),(0,V.jsx)(R0,{})]})}),(0,V.jsx)(Z$,{ref:p,onError:()=>{c(e(`auth.resetPassword.errors.captchaFailed`)),d(null)},onExpire:()=>d(null),onSuccess:e=>d(e),options:{size:`invisible`},siteKey:t.CF_TURNSTILE_SITE_KEY}),(0,V.jsx)(r2,{label:e(`auth.resetPassword.submit`),isLoading:a,disabled:!u})]})})}),(0,V.jsxs)(Z0.Footer,{children:[(0,V.jsx)(O,{to:S(`/login`),className:`text-primary hover:underline transition-colors duration-200 text-sm font-medium mx-auto`,children:e(`auth.forgotPassword.backToLogin`)}),(0,V.jsx)(a2,{icon:Sn,label:e(`auth.secureReset`)})]})]})}),D2=n({default:()=>O2}),O2=d(function(){let{t:e}=me(),t=z0(),{client:n,features:r}=Mm(),i=f(),[a]=l(),[o,s]=(0,B.useState)(!1),[c,u]=(0,B.useState)(null),[d,p]=(0,B.useState)(null),m=(0,B.useRef)(null),h=h2(a.get(`returnTo`),S(`/home`)),g=r.socialProviders&&Object.values(r.socialProviders).some(e=>e),_=!!r.emailAndPassword,v=NY({resolver:R$($1({name:C1().optional(),email:C1().email(e(`auth.signup.errors.emailInvalid`)),password:C1().min(1,e(`auth.signup.errors.passwordRequired`)).min(8,e(`auth.signup.errors.passwordMinLength`)),confirmPassword:C1().min(1,e(`auth.signup.errors.passwordRequired`))}).refine(e=>e.password===e.confirmPassword,{message:e(`auth.signup.errors.passwordMismatch`),path:[`confirmPassword`]})),defaultValues:{name:``,email:``,password:``,confirmPassword:``}}),y=async t=>{try{if(s(!0),u(null),!d){u(e(`auth.signup.errors.captchaRequired`));return}let r=await n.signUp.email({email:t.email,password:t.password,name:t.name||``,callbackURL:h,fetchOptions:{headers:{"x-captcha-response":d||``}}});if(r.error){u(e(`auth.errors.${r.error.code}`,e(`auth.signup.errors.signupFailed`))),p(null),m.current?.reset();return}i(h)}catch(t){u(t instanceof Error?t.message:e(`auth.signup.errors.networkError`)),p(null),m.current?.reset()}finally{s(!1)}};return(0,V.jsxs)(Z0,{children:[(0,V.jsx)(Z0.Header,{title:e(`auth.signup.title`),description:e(`auth.signup.description`)}),(0,V.jsx)(Z0.Content,{children:(0,V.jsxs)(`div`,{className:`space-y-4`,children:[g&&(0,V.jsx)(x2,{mode:`signup`,callbackURL:h,onError:e=>u(e.message)}),g&&_&&(0,V.jsx)(_2,{text:e(`auth.signup.divider`)}),_&&(0,V.jsx)(A0,{...v,children:(0,V.jsxs)(`form`,{onSubmit:v.handleSubmit(y),className:`space-y-4`,noValidate:!0,children:[(0,V.jsx)($0,{error:c}),(0,V.jsx)(M0,{control:v.control,name:`name`,render:({field:t})=>(0,V.jsxs)(F0,{children:[(0,V.jsx)(I0,{children:e(`auth.signup.name.label`)}),(0,V.jsx)(L0,{children:(0,V.jsx)(mC,{...t,type:`text`,placeholder:e(`auth.signup.name.placeholder`),autoComplete:`name`,disabled:o})}),(0,V.jsx)(R0,{})]})}),(0,V.jsx)(M0,{control:v.control,name:`email`,render:({field:t})=>(0,V.jsxs)(F0,{children:[(0,V.jsx)(I0,{children:e(`auth.signup.email.label`)}),(0,V.jsx)(L0,{children:(0,V.jsx)(mC,{...t,type:`email`,placeholder:e(`auth.signup.email.placeholder`),autoComplete:`email`,disabled:o})}),(0,V.jsx)(R0,{})]})}),(0,V.jsx)(M0,{control:v.control,name:`password`,render:({field:t})=>(0,V.jsxs)(F0,{children:[(0,V.jsx)(I0,{children:e(`auth.signup.password.label`)}),(0,V.jsx)(L0,{children:(0,V.jsx)(d2,{...t,placeholder:e(`auth.signup.password.placeholder`),autoComplete:`new-password`,disabled:o,showStrength:!0})}),(0,V.jsx)(R0,{})]})}),(0,V.jsx)(M0,{control:v.control,name:`confirmPassword`,render:({field:t})=>(0,V.jsxs)(F0,{children:[(0,V.jsx)(I0,{children:e(`auth.signup.confirmPassword.label`)}),(0,V.jsx)(L0,{children:(0,V.jsx)(d2,{...t,placeholder:e(`auth.signup.confirmPassword.placeholder`),autoComplete:`new-password`,disabled:o})}),(0,V.jsx)(R0,{})]})}),(0,V.jsx)(Z$,{ref:m,onError:()=>{u(e(`auth.signup.errors.captchaFailed`)),p(null)},onExpire:()=>p(null),onSuccess:e=>p(e),options:{size:`invisible`},siteKey:t.CF_TURNSTILE_SITE_KEY}),(0,V.jsx)(r2,{label:e(`auth.signup.submit`),isLoading:o,disabled:!d})]})})]})}),(0,V.jsxs)(Z0.Footer,{children:[_&&(0,V.jsxs)(`div`,{className:`text-center text-sm`,children:[(0,V.jsxs)(`span`,{className:`text-muted-foreground`,children:[e(`auth.signup.hasAccount`),` `]}),(0,V.jsx)(O,{to:S(`/login`),className:`text-primary hover:underline transition-colors duration-200 font-medium`,children:e(`auth.signup.login`)})]}),(0,V.jsx)(a2,{icon:En,label:e(`auth.secureSignup`)})]})]})}),k2=R();function A2(e){let t=(0,k2.c)(28),{labels:n}=e,r;t[0]===n?r=t[1]:(r=n===void 0?{}:n,t[0]=n,t[1]=r);let i=r,a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a={preset:`avatar`},t[2]=a):a=t[2];let[o,s]=Eq(a),{files:c}=o,{removeFile:l,openFileDialog:u,getInputProps:d}=s,f=c[0]?.preview||null,p=c[0]?.file.name||null,m=f?i.changeAriaLabel??`Change image`:i.uploadAriaLabel??`Upload image`,h;t[3]===f?h=t[4]:(h=f?(0,V.jsx)(`img`,{className:`size-full object-cover`,src:f,alt:``,width:64,height:64,style:{objectFit:`cover`}}):(0,V.jsx)(`div`,{"aria-hidden":`true`,children:(0,V.jsx)(an,{className:`size-4 opacity-60`})}),t[3]=f,t[4]=h);let g;t[5]!==u||t[6]!==m||t[7]!==h?(g=(0,V.jsx)(H,{variant:`outline`,className:`relative size-16 overflow-hidden p-0 shadow-none`,onClick:u,"aria-label":m,children:h}),t[5]=u,t[6]=m,t[7]=h,t[8]=g):g=t[8];let _;t[9]!==c[0]?.id||t[10]!==i.removeAriaLabel||t[11]!==f||t[12]!==l?(_=f&&(0,V.jsx)(H,{onClick:()=>l(c[0]?.id),size:`icon`,className:`absolute -top-2 -right-2 size-6 rounded-full border-2 border-background shadow-none focus-visible:border-background`,"aria-label":i.removeAriaLabel??`Remove image`,children:(0,V.jsx)(Ie,{className:`size-3.5`})}),t[9]=c[0]?.id,t[10]=i.removeAriaLabel,t[11]=f,t[12]=l,t[13]=_):_=t[13];let v;t[14]===d?v=t[15]:(v=d(),t[14]=d,t[15]=v);let y=i.inputAriaLabel??`Upload file`,b;t[16]!==v||t[17]!==y?(b=(0,V.jsx)(`input`,{...v,className:`sr-only`,"aria-label":y,tabIndex:-1}),t[16]=v,t[17]=y,t[18]=b):b=t[18];let x;t[19]!==b||t[20]!==g||t[21]!==_?(x=(0,V.jsxs)(`div`,{className:`relative inline-flex`,children:[g,_,b]}),t[19]=b,t[20]=g,t[21]=_,t[22]=x):x=t[22];let S;t[23]===p?S=t[24]:(S=p&&(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:p}),t[23]=p,t[24]=S);let C;return t[25]!==x||t[26]!==S?(C=(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[x,S]}),t[25]=x,t[26]=S,t[27]=C):C=t[27],C}var j2=R();function M2(e){let t=(0,j2.c)(28),{labels:n}=e,r;t[0]===n?r=t[1]:(r=n===void 0?{}:n,t[0]=n,t[1]=r);let i=r,a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a={preset:`avatar`},t[2]=a):a=t[2];let[o,s]=Eq(a),{files:c,isDragging:l}=o,{removeFile:u,openFileDialog:d,getInputProps:f,handleDragEnter:p,handleDragLeave:m,handleDragOver:h,handleDrop:g}=s,_=c[0]?.preview||null,v=l||void 0,y=_?i.changeAriaLabel??`Change image`:i.uploadAriaLabel??`Upload image`,b;t[3]===_?b=t[4]:(b=_?(0,V.jsx)(`img`,{className:`size-full object-cover`,src:_,alt:``,width:64,height:64,style:{objectFit:`cover`}}):(0,V.jsx)(`div`,{"aria-hidden":`true`,children:(0,V.jsx)(an,{className:`size-4 opacity-60`})}),t[3]=_,t[4]=b);let x;t[5]!==p||t[6]!==m||t[7]!==h||t[8]!==g||t[9]!==d||t[10]!==v||t[11]!==y||t[12]!==b?(x=(0,V.jsx)(`button`,{type:`button`,className:`relative flex size-16 items-center justify-center overflow-hidden rounded-full border border-dashed border-input transition-colors outline-none hover:bg-accent/50 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-disabled:pointer-events-none has-disabled:opacity-50 has-[img]:border-none data-[dragging=true]:bg-accent/50`,onClick:d,onDragEnter:p,onDragLeave:m,onDragOver:h,onDrop:g,"data-dragging":v,"aria-label":y,children:b}),t[5]=p,t[6]=m,t[7]=h,t[8]=g,t[9]=d,t[10]=v,t[11]=y,t[12]=b,t[13]=x):x=t[13];let S;t[14]!==c[0]?.id||t[15]!==i.removeAriaLabel||t[16]!==_||t[17]!==u?(S=_&&(0,V.jsx)(H,{onClick:()=>u(c[0]?.id),size:`icon`,className:`absolute -top-1 -right-1 size-6 rounded-full border-2 border-background shadow-none focus-visible:border-background`,"aria-label":i.removeAriaLabel??`Remove image`,children:(0,V.jsx)(Ie,{className:`size-3.5`})}),t[14]=c[0]?.id,t[15]=i.removeAriaLabel,t[16]=_,t[17]=u,t[18]=S):S=t[18];let C;t[19]===f?C=t[20]:(C=f(),t[19]=f,t[20]=C);let w=i.inputAriaLabel??`Upload file`,T;t[21]!==C||t[22]!==w?(T=(0,V.jsx)(`input`,{...C,className:`sr-only`,"aria-label":w,tabIndex:-1}),t[21]=C,t[22]=w,t[23]=T):T=t[23];let E;return t[24]!==S||t[25]!==T||t[26]!==x?(E=(0,V.jsx)(`div`,{className:`flex flex-col items-center gap-2`,children:(0,V.jsxs)(`div`,{className:`relative inline-flex`,children:[x,S,T]})}),t[24]=S,t[25]=T,t[26]=x,t[27]=E):E=t[27],E}var N2=R();function P2(e){let t=(0,N2.c)(17),{preset:n,maxSize:r,accept:i,labels:a}=e,o=n===void 0?`file`:n,s=a===void 0?{}:a,c;t[0]!==i||t[1]!==r||t[2]!==o?(c={preset:o,maxSize:r,accept:i},t[0]=i,t[1]=r,t[2]=o,t[3]=c):c=t[3];let[l,u]=Eq(c),{files:d,isDragging:f,errors:p}=l,{handleDragEnter:m,handleDragLeave:h,handleDragOver:g,handleDrop:_,openFileDialog:v,removeFile:y,getInputProps:b}=u,x=d[0],S=r??Cq[o].maxSize,C;t[4]===b?C=t[5]:(C=b(),t[4]=b,t[5]=C);let w;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,V.jsx)(`div`,{className:`mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background`,"aria-hidden":`true`,children:(0,V.jsx)(An,{className:`size-4 opacity-60`})}),t[6]=w):w=t[6];let T=s.uploadDescription?s.uploadDescription.replace(`{maxSize}`,Dq(S)):`Drag & drop or click to browse (max. ${Dq(S)})`,E;t[7]===T?E=t[8]:(E=(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:T}),t[7]=T,t[8]=E);let D;t[9]!==p[0]||t[10]!==p.length?(D=p.length>0&&(0,V.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-destructive`,role:`alert`,children:[(0,V.jsx)(rn,{className:`size-3 shrink-0`}),(0,V.jsx)(`span`,{children:p[0]})]}),t[9]=p[0],t[10]=p.length,t[11]=D):D=t[11];let O;return t[12]!==x||t[13]!==d[0]?.id||t[14]!==s||t[15]!==y?(O=x&&(0,V.jsx)(`div`,{className:`space-y-2`,children:(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2 rounded-xl border px-4 py-2`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3 overflow-hidden`,children:[(0,V.jsx)(wn,{className:`size-4 shrink-0 opacity-60`,"aria-hidden":`true`}),(0,V.jsx)(`div`,{className:`min-w-0`,children:(0,V.jsx)(`p`,{className:`truncate text-[13px] font-medium`,children:x.file.name})})]}),(0,V.jsx)(H,{size:`icon`,variant:`ghost`,className:`-me-2 size-8 text-muted-foreground/80 hover:bg-transparent hover:text-foreground`,onClick:()=>y(d[0]?.id),"aria-label":s.removeAriaLabel??`Remove file`,children:(0,V.jsx)(Ie,{className:`size-4`,"aria-hidden":`true`})})]},x.id)}),t[12]=x,t[13]=d[0]?.id,t[14]=s,t[15]=y,t[16]=O):O=t[16],(0,V.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,V.jsxs)(`div`,{role:`button`,onClick:v,onDragEnter:m,onDragLeave:h,onDragOver:g,onDrop:_,"data-dragging":f||void 0,className:`flex min-h-40 flex-col items-center justify-center rounded-xl border border-dashed border-input p-4 transition-colors hover:bg-accent/50 has-disabled:pointer-events-none has-disabled:opacity-50 has-[input:focus]:border-ring has-[input:focus]:ring-[3px] has-[input:focus]:ring-ring/50 data-[dragging=true]:bg-accent/50`,children:[(0,V.jsx)(`input`,{...C,className:`sr-only`,"aria-label":s.inputAriaLabel??`Upload file`,disabled:!!x}),(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center text-center`,children:[w,(0,V.jsx)(`p`,{className:`mb-1.5 text-sm font-medium`,children:s.uploadTitle??`Upload file`}),E]})]}),D,O]})}var F2=R();function I2(e){let t=(0,F2.c)(30),{preset:n,maxSize:r,accept:i,labels:a}=e,o=n===void 0?`file`:n,s;t[0]===a?s=t[1]:(s=a===void 0?{}:a,t[0]=a,t[1]=s);let c=s,l;t[2]!==i||t[3]!==r||t[4]!==o?(l={preset:o,maxSize:r,accept:i},t[2]=i,t[3]=r,t[4]=o,t[5]=l):l=t[5];let[u,d]=Eq(l),{files:f}=u,{removeFile:p,openFileDialog:m,getInputProps:h}=d,g=f[0]?.preview||null,_=f[0]?.file.name||null,v;t[6]===g?v=t[7]:(v=(0,V.jsx)(`div`,{className:`relative flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-md border border-input`,children:g?(0,V.jsx)(`img`,{className:`size-full object-cover`,src:g,alt:``,width:32,height:32}):(0,V.jsx)(`div`,{"aria-hidden":`true`,children:(0,V.jsx)(an,{className:`opacity-60`,size:16})})}),t[6]=g,t[7]=v);let y=_?c.changeButton??`Change`:c.uploadButton??`Upload`,b;t[8]!==m||t[9]!==y?(b=(0,V.jsx)(H,{onClick:m,"aria-haspopup":`dialog`,children:y}),t[8]=m,t[9]=y,t[10]=b):b=t[10];let x;t[11]===h?x=t[12]:(x=h(),t[11]=h,t[12]=x);let S=c.inputAriaLabel??`Upload file`,C;t[13]!==x||t[14]!==S?(C=(0,V.jsx)(`input`,{...x,className:`sr-only`,"aria-label":S,tabIndex:-1}),t[13]=x,t[14]=S,t[15]=C):C=t[15];let w;t[16]!==C||t[17]!==b?(w=(0,V.jsxs)(`div`,{className:`relative inline-block`,children:[b,C]}),t[16]=C,t[17]=b,t[18]=w):w=t[18];let T;t[19]!==w||t[20]!==v?(T=(0,V.jsxs)(`div`,{className:`inline-flex items-center gap-2 align-top`,children:[v,w]}),t[19]=w,t[20]=v,t[21]=T):T=t[21];let E;t[22]!==_||t[23]!==f[0]?.id||t[24]!==c.removeButton||t[25]!==p?(E=_&&(0,V.jsxs)(`div`,{className:`inline-flex gap-2 text-xs`,children:[(0,V.jsx)(`p`,{className:`truncate text-muted-foreground`,"aria-live":`polite`,children:_}),` `,(0,V.jsx)(`button`,{type:`button`,onClick:()=>p(f[0]?.id),className:`font-medium text-destructive hover:underline`,"aria-label":`Remove ${_}`,children:c.removeButton??`Remove`})]}),t[22]=_,t[23]=f[0]?.id,t[24]=c.removeButton,t[25]=p,t[26]=E):E=t[26];let D;return t[27]!==T||t[28]!==E?(D=(0,V.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[T,E]}),t[27]=T,t[28]=E,t[29]=D):D=t[29],D}function L2({maxSize:e=5*1024*1024,maxFiles:t=6,accept:n,labels:r={}}){let[{files:i,isDragging:a,errors:o},{handleDragEnter:s,handleDragLeave:c,handleDragOver:l,handleDrop:u,openFileDialog:d,removeFile:f,clearFiles:p,getInputProps:m}]=Eq({accept:n,maxSize:e,multiple:!0,maxFiles:t});return(0,V.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,V.jsxs)(`div`,{onDragEnter:s,onDragLeave:c,onDragOver:l,onDrop:u,"data-dragging":a||void 0,"data-files":i.length>0||void 0,className:`relative flex min-h-52 flex-col items-center overflow-hidden rounded-xl border border-dashed border-input p-4 transition-colors not-data-files:justify-center has-[input:focus]:border-ring has-[input:focus]:ring-[3px] has-[input:focus]:ring-ring/50 data-[dragging=true]:bg-accent/50`,children:[(0,V.jsx)(`input`,{...m(),className:`sr-only`,"aria-label":r.inputAriaLabel??`Upload image file`}),i.length>0?(0,V.jsxs)(`div`,{className:`flex w-full flex-col gap-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,V.jsx)(`h3`,{className:`truncate text-sm font-medium`,children:r.filesTitle?r.filesTitle.replace(`{count}`,String(i.length)):`Files (${i.length})`}),(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsxs)(H,{variant:`outline`,size:`sm`,onClick:d,children:[(0,V.jsx)(An,{className:`-ms-0.5 size-3.5 opacity-60`,"aria-hidden":`true`}),r.addFilesButton??`Add files`]}),(0,V.jsxs)(H,{variant:`outline`,size:`sm`,onClick:p,children:[(0,V.jsx)(Dn,{className:`-ms-0.5 size-3.5 opacity-60`,"aria-hidden":`true`}),r.removeAllButton??`Remove all`]})]})]}),(0,V.jsx)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-3`,children:i.map(e=>(0,V.jsxs)(`div`,{className:`relative flex flex-col rounded-md border bg-background`,children:[Tq(e),(0,V.jsx)(H,{onClick:()=>f(e.id),size:`icon`,className:`absolute -top-2 -right-2 size-6 rounded-full border-2 border-background shadow-none focus-visible:border-background`,"aria-label":r.removeAriaLabel??`Remove image`,children:(0,V.jsx)(Ie,{className:`size-3.5`})}),(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5 border-t p-3`,children:[(0,V.jsx)(`p`,{className:`truncate text-[13px] font-medium`,children:e.file.name}),(0,V.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:Dq(e.file.size)})]})]},e.id))})]}):(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center px-4 py-3 text-center`,children:[(0,V.jsx)(`div`,{className:`mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background`,"aria-hidden":`true`,children:(0,V.jsx)(yn,{className:`size-4 opacity-60`})}),(0,V.jsx)(`p`,{className:`mb-1.5 text-sm font-medium`,children:r.dropText??`Drop your files here`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r.uploadDetails?r.uploadDetails.replace(`{maxFiles}`,String(t)).replace(`{maxSize}`,Dq(e)):`Max ${t} files ∙ Up to ${Dq(e)}`}),(0,V.jsxs)(H,{variant:`outline`,className:`mt-4`,onClick:d,children:[(0,V.jsx)(An,{className:`-ms-1 opacity-60`,"aria-hidden":`true`}),r.selectButton??`Select images`]})]})]}),o.length>0&&(0,V.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-destructive`,role:`alert`,children:[(0,V.jsx)(rn,{className:`size-3 shrink-0`}),(0,V.jsx)(`span`,{children:o[0]})]})]})}var R2=R();function z2(e){let t=(0,R2.c)(41),{preset:n,maxSize:r,accept:i,labels:a}=e,o=n===void 0?`file`:n,s;t[0]===a?s=t[1]:(s=a===void 0?{}:a,t[0]=a,t[1]=s);let c=s,l;t[2]!==i||t[3]!==r||t[4]!==o?(l={preset:o,maxSize:r,accept:i},t[2]=i,t[3]=r,t[4]=o,t[5]=l):l=t[5];let[u,d]=Eq(l),{files:f,isDragging:p,errors:m}=u,{handleDragEnter:h,handleDragLeave:g,handleDragOver:_,handleDrop:v,openFileDialog:y,removeFile:b,getInputProps:x}=d,S=f[0]?.preview||null,C=r??Cq[o].maxSize,w;t[6]===C?w=t[7]:(w=Math.round(C/1024/1024),t[6]=C,t[7]=w);let T=w,E=p||void 0,D;t[8]===x?D=t[9]:(D=x(),t[8]=x,t[9]=D);let O=c.inputAriaLabel??`Upload file`,k;t[10]!==O||t[11]!==D?(k=(0,V.jsx)(`input`,{...D,className:`sr-only`,"aria-label":O}),t[10]=O,t[11]=D,t[12]=k):k=t[12];let A;t[13]!==c.dropText||t[14]!==c.maxSizeText||t[15]!==T||t[16]!==S?(A=S?(0,V.jsx)(`div`,{className:`absolute inset-0`,children:(0,V.jsx)(`img`,{src:S,alt:``,className:`size-full object-cover`})}):(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center px-4 py-3 text-center`,children:[(0,V.jsx)(`div`,{className:`mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background`,"aria-hidden":`true`,children:(0,V.jsx)(vn,{className:`size-4 opacity-60`})}),(0,V.jsx)(`p`,{className:`mb-1.5 text-sm font-medium`,children:c.dropText??`Drop your file here or click to browse`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:c.maxSizeText?c.maxSizeText.replace(`{maxSize}`,`${T}MB`):`Max size: ${T}MB`})]}),t[13]=c.dropText,t[14]=c.maxSizeText,t[15]=T,t[16]=S,t[17]=A):A=t[17];let j;t[18]!==h||t[19]!==g||t[20]!==_||t[21]!==v||t[22]!==y||t[23]!==k||t[24]!==A||t[25]!==E?(j=(0,V.jsxs)(`div`,{role:`button`,onClick:y,onDragEnter:h,onDragLeave:g,onDragOver:_,onDrop:v,"data-dragging":E,className:`relative flex min-h-52 flex-col items-center justify-center overflow-hidden rounded-xl border border-dashed border-input p-4 transition-colors hover:bg-accent/50 has-disabled:pointer-events-none has-disabled:opacity-50 has-[img]:border-none has-[input:focus]:border-ring has-[input:focus]:ring-[3px] has-[input:focus]:ring-ring/50 data-[dragging=true]:bg-accent/50`,children:[k,A]}),t[18]=h,t[19]=g,t[20]=_,t[21]=v,t[22]=y,t[23]=k,t[24]=A,t[25]=E,t[26]=j):j=t[26];let M;t[27]!==f[0]?.id||t[28]!==c.removeAriaLabel||t[29]!==S||t[30]!==b?(M=S&&(0,V.jsx)(`div`,{className:`absolute top-4 right-4`,children:(0,V.jsx)(`button`,{type:`button`,className:`z-50 flex size-8 cursor-pointer items-center justify-center rounded-full bg-black/60 text-white transition-[color,box-shadow] outline-none hover:bg-black/80 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,onClick:()=>b(f[0]?.id),"aria-label":c.removeAriaLabel??`Remove file`,children:(0,V.jsx)(Ie,{className:`size-4`,"aria-hidden":`true`})})}),t[27]=f[0]?.id,t[28]=c.removeAriaLabel,t[29]=S,t[30]=b,t[31]=M):M=t[31];let N;t[32]!==j||t[33]!==M?(N=(0,V.jsxs)(`div`,{className:`relative`,children:[j,M]}),t[32]=j,t[33]=M,t[34]=N):N=t[34];let P;t[35]!==m[0]||t[36]!==m.length?(P=m.length>0&&(0,V.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-destructive`,role:`alert`,children:[(0,V.jsx)(rn,{className:`size-3 shrink-0`}),(0,V.jsx)(`span`,{children:m[0]})]}),t[35]=m[0],t[36]=m.length,t[37]=P):P=t[37];let F;return t[38]!==N||t[39]!==P?(F=(0,V.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[N,P]}),t[38]=N,t[39]=P,t[40]=F):F=t[40],F}var B2=R();function V2(e){let t=(0,B2.c)(39),{preset:n,maxSize:r,maxFiles:i,accept:a,labels:o}=e,s=n===void 0?`file`:n,c=i===void 0?6:i,l;t[0]===o?l=t[1]:(l=o===void 0?{}:o,t[0]=o,t[1]=l);let u=l,d;t[2]!==a||t[3]!==c||t[4]!==r||t[5]!==s?(d={preset:s,maxSize:r,accept:a,multiple:!0,maxFiles:c},t[2]=a,t[3]=c,t[4]=r,t[5]=s,t[6]=d):d=t[6];let[f,p]=Eq(d),{files:m,isDragging:h,errors:g}=f,{handleDragEnter:_,handleDragLeave:v,handleDragOver:y,handleDrop:b,openFileDialog:x,removeFile:S,getInputProps:C}=p,w=r??Cq[s].maxSize,T=h||void 0,E=m.length>0||void 0,D;t[7]===C?D=t[8]:(D=C(),t[7]=C,t[8]=D);let O=u.inputAriaLabel??`Upload files`,k;t[9]!==D||t[10]!==O?(k=(0,V.jsx)(`input`,{...D,className:`sr-only`,"aria-label":O}),t[9]=D,t[10]=O,t[11]=k):k=t[11];let A;t[12]!==w||t[13]!==m||t[14]!==u.addMoreButton||t[15]!==u.dropText||t[16]!==u.formatText||t[17]!==u.removeAriaLabel||t[18]!==u.selectButton||t[19]!==u.uploadedFilesTitle||t[20]!==c||t[21]!==x||t[22]!==S?(A=m.length>0?(0,V.jsxs)(`div`,{className:`flex w-full flex-col gap-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,V.jsx)(`h3`,{className:`truncate text-sm font-medium`,children:u.uploadedFilesTitle?u.uploadedFilesTitle.replace(`{count}`,String(m.length)):`Uploaded Files (${m.length})`}),(0,V.jsxs)(H,{variant:`outline`,size:`sm`,onClick:x,disabled:m.length>=c,children:[(0,V.jsx)(An,{className:`-ms-0.5 size-3.5 opacity-60`,"aria-hidden":`true`}),u.addMoreButton??`Add more`]})]}),(0,V.jsx)(`div`,{className:`grid grid-cols-2 gap-4 md:grid-cols-3`,children:m.map(e=>(0,V.jsxs)(`div`,{className:`relative aspect-square rounded-md bg-accent`,children:[(0,V.jsx)(`img`,{src:e.preview,alt:``,className:`size-full rounded-[inherit] object-cover`}),(0,V.jsx)(H,{onClick:()=>S(e.id),size:`icon`,className:`absolute -top-2 -right-2 size-6 rounded-full border-2 border-background shadow-none focus-visible:border-background`,"aria-label":u.removeAriaLabel??`Remove file`,children:(0,V.jsx)(Ie,{className:`size-3.5`})})]},e.id))})]}):(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center px-4 py-3 text-center`,children:[(0,V.jsx)(`div`,{className:`mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background`,"aria-hidden":`true`,children:(0,V.jsx)(yn,{className:`size-4 opacity-60`})}),(0,V.jsx)(`p`,{className:`mb-1.5 text-sm font-medium`,children:u.dropText??`Drop your files here`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:u.formatText?u.formatText.replace(`{maxSize}`,`${Math.round(w/1024/1024)}MB`):`Max ${Math.round(w/1024/1024)}MB`}),(0,V.jsxs)(H,{variant:`outline`,className:`mt-4`,onClick:x,children:[(0,V.jsx)(An,{className:`-ms-1 opacity-60`,"aria-hidden":`true`}),u.selectButton??`Select files`]})]}),t[12]=w,t[13]=m,t[14]=u.addMoreButton,t[15]=u.dropText,t[16]=u.formatText,t[17]=u.removeAriaLabel,t[18]=u.selectButton,t[19]=u.uploadedFilesTitle,t[20]=c,t[21]=x,t[22]=S,t[23]=A):A=t[23];let j;t[24]!==_||t[25]!==v||t[26]!==y||t[27]!==b||t[28]!==k||t[29]!==A||t[30]!==T||t[31]!==E?(j=(0,V.jsxs)(`div`,{onDragEnter:_,onDragLeave:v,onDragOver:y,onDrop:b,"data-dragging":T,"data-files":E,className:`relative flex min-h-52 flex-col items-center overflow-hidden rounded-xl border border-dashed border-input p-4 transition-colors not-data-files:justify-center has-[input:focus]:border-ring has-[input:focus]:ring-[3px] has-[input:focus]:ring-ring/50 data-[dragging=true]:bg-accent/50`,children:[k,A]}),t[24]=_,t[25]=v,t[26]=y,t[27]=b,t[28]=k,t[29]=A,t[30]=T,t[31]=E,t[32]=j):j=t[32];let M;t[33]!==g[0]||t[34]!==g.length?(M=g.length>0&&(0,V.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-destructive`,role:`alert`,children:[(0,V.jsx)(rn,{className:`size-3 shrink-0`}),(0,V.jsx)(`span`,{children:g[0]})]}),t[33]=g[0],t[34]=g.length,t[35]=M):M=t[35];let N;return t[36]!==j||t[37]!==M?(N=(0,V.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[j,M]}),t[36]=j,t[37]=M,t[38]=N):N=t[38],N}var H2=R();function U2(e){let t=(0,H2.c)(40),{preset:n,maxSize:r,accept:i,labels:a}=e,o=n===void 0?`file`:n,s;t[0]===a?s=t[1]:(s=a===void 0?{}:a,t[0]=a,t[1]=s);let c=s,l;t[2]!==i||t[3]!==r||t[4]!==o?(l={preset:o,maxSize:r,accept:i},t[2]=i,t[3]=r,t[4]=o,t[5]=l):l=t[5];let[u,d]=Eq(l),{files:f,isDragging:p,errors:m}=u,{handleDragEnter:h,handleDragLeave:g,handleDragOver:_,handleDrop:v,openFileDialog:y,removeFile:b,getInputProps:x}=d,S=r??Cq[o].maxSize,C=f[0]?.preview||null;f[0]?.file.name;let w=p||void 0,T;t[6]===x?T=t[7]:(T=x(),t[6]=x,t[7]=T);let E=c.inputAriaLabel??`Upload file`,D;t[8]!==T||t[9]!==E?(D=(0,V.jsx)(`input`,{...T,className:`sr-only`,"aria-label":E}),t[8]=T,t[9]=E,t[10]=D):D=t[10];let O;t[11]!==S||t[12]!==c.dropText||t[13]!==c.formatText||t[14]!==c.selectButton||t[15]!==y||t[16]!==C?(O=C?(0,V.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center p-4`,children:(0,V.jsx)(`img`,{src:C,alt:``,className:`mx-auto max-h-full rounded object-contain`})}):(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center px-4 py-3 text-center`,children:[(0,V.jsx)(`div`,{className:`mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background`,"aria-hidden":`true`,children:(0,V.jsx)(yn,{className:`size-4 opacity-60`})}),(0,V.jsx)(`p`,{className:`mb-1.5 text-sm font-medium`,children:c.dropText??`Drop your file here`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:c.formatText?c.formatText.replace(`{maxSize}`,`${Math.round(S/1024/1024)}MB`):`Max ${Math.round(S/1024/1024)}MB`}),(0,V.jsxs)(H,{variant:`outline`,className:`mt-4`,onClick:y,children:[(0,V.jsx)(An,{className:`-ms-1 size-4 opacity-60`,"aria-hidden":`true`}),c.selectButton??`Select file`]})]}),t[11]=S,t[12]=c.dropText,t[13]=c.formatText,t[14]=c.selectButton,t[15]=y,t[16]=C,t[17]=O):O=t[17];let k;t[18]!==h||t[19]!==g||t[20]!==_||t[21]!==v||t[22]!==D||t[23]!==O||t[24]!==w?(k=(0,V.jsxs)(`div`,{onDragEnter:h,onDragLeave:g,onDragOver:_,onDrop:v,"data-dragging":w,className:`relative flex min-h-52 flex-col items-center justify-center overflow-hidden rounded-xl border border-dashed border-input p-4 transition-colors has-[input:focus]:border-ring has-[input:focus]:ring-[3px] has-[input:focus]:ring-ring/50 data-[dragging=true]:bg-accent/50`,children:[D,O]}),t[18]=h,t[19]=g,t[20]=_,t[21]=v,t[22]=D,t[23]=O,t[24]=w,t[25]=k):k=t[25];let A;t[26]!==f[0]?.id||t[27]!==c.removeAriaLabel||t[28]!==C||t[29]!==b?(A=C&&(0,V.jsx)(`div`,{className:`absolute top-4 right-4`,children:(0,V.jsx)(`button`,{type:`button`,className:`z-50 flex size-8 cursor-pointer items-center justify-center rounded-full bg-black/60 text-white transition-[color,box-shadow] outline-none hover:bg-black/80 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,onClick:()=>b(f[0]?.id),"aria-label":c.removeAriaLabel??`Remove file`,children:(0,V.jsx)(Ie,{className:`size-4`,"aria-hidden":`true`})})}),t[26]=f[0]?.id,t[27]=c.removeAriaLabel,t[28]=C,t[29]=b,t[30]=A):A=t[30];let j;t[31]!==k||t[32]!==A?(j=(0,V.jsxs)(`div`,{className:`relative`,children:[k,A]}),t[31]=k,t[32]=A,t[33]=j):j=t[33];let M;t[34]!==m[0]||t[35]!==m.length?(M=m.length>0&&(0,V.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-destructive`,role:`alert`,children:[(0,V.jsx)(rn,{className:`size-3 shrink-0`}),(0,V.jsx)(`span`,{children:m[0]})]}),t[34]=m[0],t[35]=m.length,t[36]=M):M=t[36];let N;return t[37]!==j||t[38]!==M?(N=(0,V.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[j,M]}),t[37]=j,t[38]=M,t[39]=N):N=t[39],N}function W2({maxSize:e=100*1024*1024,maxFiles:t=10,accept:n,labels:r={}}){let[{files:i,isDragging:a,errors:o},{handleDragEnter:s,handleDragLeave:c,handleDragOver:l,handleDrop:u,openFileDialog:d,removeFile:f,clearFiles:p,getInputProps:m}]=Eq({accept:n,maxSize:e,multiple:!0,maxFiles:t});return(0,V.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,V.jsxs)(`div`,{role:`button`,onClick:d,onDragEnter:s,onDragLeave:c,onDragOver:l,onDrop:u,"data-dragging":a||void 0,className:`flex min-h-40 flex-col items-center justify-center rounded-xl border border-dashed border-input p-4 transition-colors hover:bg-accent/50 has-disabled:pointer-events-none has-disabled:opacity-50 has-[input:focus]:border-ring has-[input:focus]:ring-[3px] has-[input:focus]:ring-ring/50 data-[dragging=true]:bg-accent/50`,children:[(0,V.jsx)(`input`,{...m(),className:`sr-only`,"aria-label":r.inputAriaLabel??`Upload files`}),(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center text-center`,children:[(0,V.jsx)(`div`,{className:`mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background`,"aria-hidden":`true`,children:(0,V.jsx)(mn,{className:`size-4 opacity-60`})}),(0,V.jsx)(`p`,{className:`mb-1.5 text-sm font-medium`,children:r.uploadTitle??`Upload files`}),(0,V.jsx)(`p`,{className:`mb-2 text-xs text-muted-foreground`,children:r.uploadDescription??`Drag & drop or click to browse`}),(0,V.jsx)(`div`,{className:`flex flex-wrap justify-center gap-1 text-xs text-muted-foreground/70`,children:r.uploadDetails?r.uploadDetails.replace(`{maxFiles}`,String(t)).replace(`{maxSize}`,Dq(e)):`All files ∙ Max ${t} files ∙ Up to ${Dq(e)}`})]})]}),o.length>0&&(0,V.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-destructive`,role:`alert`,children:[(0,V.jsx)(rn,{className:`size-3 shrink-0`}),(0,V.jsx)(`span`,{children:o[0]})]}),i.length>0&&(0,V.jsxs)(`div`,{className:`space-y-2`,children:[i.map(e=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2 rounded-lg border bg-background p-2 pe-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3 overflow-hidden`,children:[(0,V.jsx)(`div`,{className:`flex aspect-square size-10 shrink-0 items-center justify-center rounded border`,children:wq(e)}),(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,V.jsx)(`p`,{className:`truncate text-[13px] font-medium`,children:(e.file instanceof File,e.file.name)}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Dq((e.file instanceof File,e.file.size))})]})]}),(0,V.jsx)(H,{size:`icon`,variant:`ghost`,className:`-me-2 size-8 text-muted-foreground/80 hover:bg-transparent hover:text-foreground`,onClick:()=>f(e.id),"aria-label":r.removeAriaLabel??`Remove file`,children:(0,V.jsx)(Ie,{className:`size-4`,"aria-hidden":`true`})})]},e.id)),i.length>1&&(0,V.jsx)(`div`,{children:(0,V.jsx)(H,{size:`sm`,variant:`outline`,onClick:p,children:r.removeAllButton??`Remove all files`})})]})]})}function G2({maxSize:e=10*1024*1024,maxFiles:t=10,accept:n,labels:r={}}){let[{files:i,isDragging:a,errors:o},{handleDragEnter:s,handleDragLeave:c,handleDragOver:l,handleDrop:u,openFileDialog:d,removeFile:f,clearFiles:p,getInputProps:m}]=Eq({accept:n,maxSize:e,multiple:!0,maxFiles:t});return(0,V.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,V.jsxs)(`div`,{onDragEnter:s,onDragLeave:c,onDragOver:l,onDrop:u,"data-dragging":a||void 0,"data-files":i.length>0||void 0,className:`flex min-h-56 flex-col items-center rounded-xl border border-dashed border-input p-4 transition-colors not-data-files:justify-center has-[input:focus]:border-ring has-[input:focus]:ring-[3px] has-[input:focus]:ring-ring/50 data-[dragging=true]:bg-accent/50`,children:[(0,V.jsx)(`input`,{...m(),className:`sr-only`,"aria-label":r.inputAriaLabel??`Upload files`}),i.length>0?(0,V.jsxs)(`div`,{className:`flex w-full flex-col gap-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,V.jsx)(`h3`,{className:`truncate text-sm font-medium`,children:r.uploadedFilesTitle?r.uploadedFilesTitle.replace(`{count}`,String(i.length)):`Uploaded Files (${i.length})`}),(0,V.jsxs)(H,{variant:`outline`,size:`sm`,onClick:p,children:[(0,V.jsx)(Dn,{className:`-ms-0.5 size-3.5 opacity-60`,"aria-hidden":`true`}),r.removeAllButton??`Remove all`]})]}),(0,V.jsxs)(`div`,{className:`w-full space-y-2`,children:[i.map(e=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2 rounded-lg border bg-background p-2 pe-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3 overflow-hidden`,children:[(0,V.jsx)(`div`,{className:`flex aspect-square size-10 shrink-0 items-center justify-center rounded border`,children:wq(e)}),(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,V.jsx)(`p`,{className:`truncate text-[13px] font-medium`,children:(e.file instanceof File,e.file.name)}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Dq((e.file instanceof File,e.file.size))})]})]}),(0,V.jsx)(H,{size:`icon`,variant:`ghost`,className:`-me-2 size-8 text-muted-foreground/80 hover:bg-transparent hover:text-foreground`,onClick:()=>f(e.id),"aria-label":r.removeAriaLabel??`Remove file`,children:(0,V.jsx)(Ie,{className:`size-4`,"aria-hidden":`true`})})]},e.id)),i.length<t&&(0,V.jsxs)(H,{variant:`outline`,className:`mt-2 w-full`,onClick:d,children:[(0,V.jsx)(An,{className:`-ms-1 opacity-60`,"aria-hidden":`true`}),r.addMoreButton??`Add more`]})]})]}):(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center text-center`,children:[(0,V.jsx)(`div`,{className:`mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background`,"aria-hidden":`true`,children:(0,V.jsx)(hn,{className:`size-4 opacity-60`})}),(0,V.jsx)(`p`,{className:`mb-1.5 text-sm font-medium`,children:r.uploadTitle??`Upload files`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r.uploadDetails?r.uploadDetails.replace(`{maxFiles}`,String(t)).replace(`{maxSize}`,Dq(e)):`Max ${t} files ∙ Up to ${Dq(e)}`}),(0,V.jsxs)(H,{variant:`outline`,className:`mt-4`,onClick:d,children:[(0,V.jsx)(An,{className:`-ms-1 opacity-60`,"aria-hidden":`true`}),r.selectButton??`Select files`]})]})]}),o.length>0&&(0,V.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-destructive`,role:`alert`,children:[(0,V.jsx)(rn,{className:`size-3 shrink-0`}),(0,V.jsx)(`span`,{children:o[0]})]})]})}function K2({maxSize:e=10*1024*1024,maxFiles:t=10,accept:n,labels:r={}}){let[{files:i,isDragging:a,errors:o},{handleDragEnter:s,handleDragLeave:c,handleDragOver:l,handleDrop:u,openFileDialog:d,removeFile:f,clearFiles:p,getInputProps:m}]=Eq({accept:n,maxSize:e,multiple:!0,maxFiles:t});return(0,V.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,V.jsxs)(`div`,{onDragEnter:s,onDragLeave:c,onDragOver:l,onDrop:u,"data-dragging":a||void 0,"data-files":i.length>0||void 0,className:`flex min-h-56 flex-col items-center rounded-xl border border-dashed border-input p-4 transition-colors not-data-files:justify-center has-[input:focus]:border-ring has-[input:focus]:ring-[3px] has-[input:focus]:ring-ring/50 data-[dragging=true]:bg-accent/50 data-files:hidden`,children:[(0,V.jsx)(`input`,{...m(),className:`sr-only`,"aria-label":r.inputAriaLabel??`Upload files`}),(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center text-center`,children:[(0,V.jsx)(`div`,{className:`mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background`,"aria-hidden":`true`,children:(0,V.jsx)(hn,{className:`size-4 opacity-60`})}),(0,V.jsx)(`p`,{className:`mb-1.5 text-sm font-medium`,children:r.uploadTitle??`Upload files`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r.uploadDetails?r.uploadDetails.replace(`{maxFiles}`,String(t)).replace(`{maxSize}`,Dq(e)):`Max ${t} files ∙ Up to ${Dq(e)}`}),(0,V.jsxs)(H,{variant:`outline`,className:`mt-4`,onClick:d,children:[(0,V.jsx)(An,{className:`-ms-1 opacity-60`,"aria-hidden":`true`}),r.selectButton??`Select files`]})]})]}),i.length>0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,V.jsx)(`h3`,{className:`text-sm font-medium`,children:r.filesTitle?r.filesTitle.replace(`{count}`,String(i.length)):`Files (${i.length})`}),(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsxs)(H,{variant:`outline`,size:`sm`,onClick:d,children:[(0,V.jsx)(on,{className:`-ms-0.5 size-3.5 opacity-60`,"aria-hidden":`true`}),r.addFilesButton??`Add files`]}),(0,V.jsxs)(H,{variant:`outline`,size:`sm`,onClick:p,children:[(0,V.jsx)(Dn,{className:`-ms-0.5 size-3.5 opacity-60`,"aria-hidden":`true`}),r.removeAllButton??`Remove all`]})]})]}),(0,V.jsx)(`div`,{className:`overflow-hidden rounded-md border bg-background`,children:(0,V.jsxs)(cq,{children:[(0,V.jsx)(lq,{className:`text-xs`,children:(0,V.jsxs)(dq,{className:`bg-muted/50`,children:[(0,V.jsx)(fq,{className:`h-9 py-2`,children:r.tableHeaderName??`Name`}),(0,V.jsx)(fq,{className:`h-9 py-2`,children:r.tableHeaderType??`Type`}),(0,V.jsx)(fq,{className:`h-9 py-2`,children:r.tableHeaderSize??`Size`}),(0,V.jsx)(fq,{className:`h-9 w-0 py-2 text-right`,children:r.tableHeaderActions??`Actions`})]})}),(0,V.jsx)(uq,{className:`text-[13px]`,children:i.map(e=>(0,V.jsxs)(dq,{children:[(0,V.jsx)(pq,{className:`max-w-48 py-2 font-medium`,children:(0,V.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`shrink-0`,children:wq(e)}),` `,(0,V.jsx)(`span`,{className:`truncate`,children:e.file.name})]})}),(0,V.jsx)(pq,{className:`py-2 text-muted-foreground`,children:e.file.type.split(`/`)[1]?.toUpperCase()||`UNKNOWN`}),(0,V.jsx)(pq,{className:`py-2 text-muted-foreground`,children:Dq(e.file.size)}),(0,V.jsxs)(pq,{className:`py-2 text-right whitespace-nowrap`,children:[(0,V.jsx)(H,{size:`icon`,variant:`ghost`,className:`size-8 text-muted-foreground/80 hover:bg-transparent hover:text-foreground`,"aria-label":r.downloadAriaLabel?r.downloadAriaLabel.replace(`{filename}`,e.file.name):`Download ${e.file.name}`,onClick:()=>window.open(e.preview,`_blank`),children:(0,V.jsx)(sn,{className:`size-4`})}),(0,V.jsx)(H,{size:`icon`,variant:`ghost`,className:`size-8 text-muted-foreground/80 hover:bg-transparent hover:text-foreground`,"aria-label":r.removeAriaLabel?r.removeAriaLabel.replace(`{filename}`,e.file.name):`Remove ${e.file.name}`,onClick:()=>f(e.id),children:(0,V.jsx)(Dn,{className:`size-4`})})]})]},e.id))})]})})]}),o.length>0&&(0,V.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-destructive`,role:`alert`,children:[(0,V.jsx)(rn,{className:`size-3 shrink-0`}),(0,V.jsx)(`span`,{children:o[0]})]})]})}function q2({maxSize:e=5*1024*1024,maxFiles:t=6,accept:n,labels:r={}}){let[{files:i,isDragging:a,errors:o},{handleDragEnter:s,handleDragLeave:c,handleDragOver:l,handleDrop:u,openFileDialog:d,removeFile:f,clearFiles:p,getInputProps:m}]=Eq({accept:n,maxSize:e,multiple:!0,maxFiles:t,autoUpload:!0});return(0,V.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,V.jsxs)(`div`,{onDragEnter:s,onDragLeave:c,onDragOver:l,onDrop:u,"data-dragging":a||void 0,"data-files":i.length>0||void 0,className:`relative flex min-h-52 flex-col items-center overflow-hidden rounded-xl border border-dashed border-input p-4 transition-colors not-data-files:justify-center has-[input:focus]:border-ring has-[input:focus]:ring-[3px] has-[input:focus]:ring-ring/50 data-[dragging=true]:bg-accent/50`,children:[(0,V.jsx)(`input`,{...m(),className:`sr-only`,"aria-label":r.inputAriaLabel??`Upload image file`}),i.length>0?(0,V.jsxs)(`div`,{className:`flex w-full flex-col gap-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,V.jsx)(`h3`,{className:`truncate text-sm font-medium`,children:r.filesTitle?r.filesTitle.replace(`{count}`,String(i.length)):`Files (${i.length})`}),(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsxs)(H,{variant:`outline`,size:`sm`,onClick:d,children:[(0,V.jsx)(An,{className:`-ms-0.5 size-3.5 opacity-60`,"aria-hidden":`true`}),r.addFilesButton??`Add files`]}),(0,V.jsxs)(H,{variant:`outline`,size:`sm`,onClick:p,children:[(0,V.jsx)(Dn,{className:`-ms-0.5 size-3.5 opacity-60`,"aria-hidden":`true`}),r.removeAllButton??`Remove all`]})]})]}),(0,V.jsx)(`div`,{className:`w-full space-y-2`,children:i.map(e=>{let t=e.uploadStatus===`uploading`;return(0,V.jsxs)(`div`,{"data-uploading":t||void 0,className:`flex flex-col gap-1 rounded-lg border bg-background p-2 pe-3 transition-opacity duration-300`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3 overflow-hidden in-data-[uploading=true]:opacity-50`,children:[(0,V.jsx)(`div`,{className:`flex aspect-square size-10 shrink-0 items-center justify-center rounded border`,children:wq(e)}),(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,V.jsx)(`p`,{className:`truncate text-[13px] font-medium`,children:(e.file instanceof File,e.file.name)}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Dq((e.file instanceof File,e.file.size))})]})]}),(0,V.jsx)(H,{size:`icon`,variant:`ghost`,className:`-me-2 size-8 text-muted-foreground/80 hover:bg-transparent hover:text-foreground`,onClick:()=>f(e.id),"aria-label":r.removeAriaLabel??`Remove file`,children:(0,V.jsx)(Ie,{className:`size-4`,"aria-hidden":`true`})})]}),t&&(0,V.jsxs)(`div`,{className:`mt-1 flex items-center gap-2`,children:[(0,V.jsx)(`div`,{className:`h-1.5 w-full overflow-hidden rounded-full bg-gray-100`,children:(0,V.jsx)(`div`,{className:`h-full bg-primary transition-all duration-300 ease-out`,style:{width:`${e.uploadProgress||0}%`}})}),(0,V.jsxs)(`span`,{className:`w-10 text-xs text-muted-foreground tabular-nums`,children:[e.uploadProgress||0,`%`]})]})]},e.id)})})]}):(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center px-4 py-3 text-center`,children:[(0,V.jsx)(`div`,{className:`mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background`,"aria-hidden":`true`,children:(0,V.jsx)(yn,{className:`size-4 opacity-60`})}),(0,V.jsx)(`p`,{className:`mb-1.5 text-sm font-medium`,children:r.dropText??`Drop your files here`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r.uploadDetails?r.uploadDetails.replace(`{maxFiles}`,String(t)).replace(`{maxSize}`,Dq(e)):`Max ${t} files ∙ Up to ${Dq(e)}`}),(0,V.jsxs)(H,{variant:`outline`,className:`mt-4`,onClick:d,children:[(0,V.jsx)(An,{className:`-ms-1 opacity-60`,"aria-hidden":`true`}),r.selectButton??`Select images`]})]})]}),o.length>0&&(0,V.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-destructive`,role:`alert`,children:[(0,V.jsx)(rn,{className:`size-3 shrink-0`}),(0,V.jsx)(`span`,{children:o[0]})]})]})}var J2=R();function Y2(e){let t=(0,J2.c)(46),{maxFiles:n,labels:r}=e,i=n===void 0?6:n,a;t[0]===r?a=t[1]:(a=r===void 0?{}:r,t[0]=r,t[1]=a);let o=a,s;t[2]===i?s=t[3]:(s={preset:`image`,maxFiles:i},t[2]=i,t[3]=s);let[c,l]=Eq(s),{files:u,isDragging:d,errors:f}=c,{handleDragEnter:p,handleDragLeave:m,handleDragOver:h,handleDrop:g,openFileDialog:_,removeFile:v,clearFiles:y,getInputProps:b}=l,x=d||void 0,S=u.length>0||void 0,C;t[4]===b?C=t[5]:(C=b(),t[4]=b,t[5]=C);let w=o.inputAriaLabel??`Upload files`,T;t[6]!==w||t[7]!==C?(T=(0,V.jsx)(`input`,{...C,className:`sr-only`,"aria-label":w}),t[6]=w,t[7]=C,t[8]=T):T=t[8];let E;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,V.jsx)(`div`,{className:`mb-2 flex size-11 shrink-0 items-center justify-center rounded-full border bg-background`,"aria-hidden":`true`,children:(0,V.jsx)(yn,{className:`size-4 opacity-60`})}),t[9]=E):E=t[9];let D=o.dropText??`Drop your files here`,O;t[10]===D?O=t[11]:(O=(0,V.jsx)(`p`,{className:`mb-1.5 text-sm font-medium`,children:D}),t[10]=D,t[11]=O);let k;t[12]===o.formatText?k=t[13]:(k=o.formatText?o.formatText.replace(`{maxSize}`,`${Math.round(Cq.image.maxSize/1024/1024)}MB`):`Max ${Math.round(Cq.image.maxSize/1024/1024)}MB`,t[12]=o.formatText,t[13]=k);let A;t[14]===k?A=t[15]:(A=(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:k}),t[14]=k,t[15]=A);let j;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,V.jsx)(An,{className:`-ms-1 opacity-60`,"aria-hidden":`true`}),t[16]=j):j=t[16];let M=o.selectButton??`Select files`,N;t[17]!==_||t[18]!==M?(N=(0,V.jsxs)(H,{variant:`outline`,className:`mt-4`,onClick:_,children:[j,M]}),t[17]=_,t[18]=M,t[19]=N):N=t[19];let P;t[20]!==O||t[21]!==A||t[22]!==N?(P=(0,V.jsxs)(`div`,{className:`flex flex-col items-center justify-center px-4 py-3 text-center`,children:[E,O,A,N]}),t[20]=O,t[21]=A,t[22]=N,t[23]=P):P=t[23];let F;t[24]!==p||t[25]!==m||t[26]!==h||t[27]!==g||t[28]!==T||t[29]!==P||t[30]!==x||t[31]!==S?(F=(0,V.jsxs)(`div`,{onDragEnter:p,onDragLeave:m,onDragOver:h,onDrop:g,"data-dragging":x,"data-files":S,className:`relative flex min-h-52 flex-col items-center overflow-hidden rounded-xl border border-dashed border-input p-4 transition-colors not-data-files:justify-center has-[input:focus]:border-ring has-[input:focus]:ring-[3px] has-[input:focus]:ring-ring/50 data-[dragging=true]:bg-accent/50`,children:[T,P]}),t[24]=p,t[25]=m,t[26]=h,t[27]=g,t[28]=T,t[29]=P,t[30]=x,t[31]=S,t[32]=F):F=t[32];let I;t[33]!==f[0]||t[34]!==f.length?(I=f.length>0&&(0,V.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-destructive`,role:`alert`,children:[(0,V.jsx)(rn,{className:`size-3 shrink-0`}),(0,V.jsx)(`span`,{children:f[0]})]}),t[33]=f[0],t[34]=f.length,t[35]=I):I=t[35];let ee;t[36]!==y||t[37]!==u||t[38]!==o.removeAllButton||t[39]!==o.removeAriaLabel||t[40]!==v?(ee=u.length>0&&(0,V.jsxs)(`div`,{className:`space-y-2`,children:[u.map(e=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2 rounded-lg border bg-background p-2 pe-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3 overflow-hidden`,children:[(0,V.jsx)(`div`,{className:`aspect-square shrink-0 rounded bg-accent`,children:(0,V.jsx)(`img`,{src:e.preview,alt:e.file.name,className:`size-10 rounded-[inherit] object-cover`})}),(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,V.jsx)(`p`,{className:`truncate text-[13px] font-medium`,children:e.file.name}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Dq(e.file.size)})]})]}),(0,V.jsx)(H,{size:`icon`,variant:`ghost`,className:`-me-2 size-8 text-muted-foreground/80 hover:bg-transparent hover:text-foreground`,onClick:()=>v(e.id),"aria-label":o.removeAriaLabel??`Remove file`,children:(0,V.jsx)(Ie,{"aria-hidden":`true`})})]},e.id)),u.length>1&&(0,V.jsx)(`div`,{children:(0,V.jsx)(H,{size:`sm`,variant:`outline`,onClick:y,children:o.removeAllButton??`Remove all files`})})]}),t[36]=y,t[37]=u,t[38]=o.removeAllButton,t[39]=o.removeAriaLabel,t[40]=v,t[41]=ee):ee=t[41];let L;return t[42]!==F||t[43]!==I||t[44]!==ee?(L=(0,V.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[F,I,ee]}),t[42]=F,t[43]=I,t[44]=ee,t[45]=L):L=t[45],L}var X2=n({default:()=>Q2}),Z2=R(),Q2=d(function(){let e=(0,Z2.c)(25),t=$g(),n,r;e[0]===t?(n=e[1],r=e[2]):(n=()=>{if(t)return t.on(`notification:new`,$2),()=>{t.disconnect()}},r=[t],e[0]=t,e[1]=n,e[2]=r),(0,B.useEffect)(n,r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,V.jsxs)(`div`,{className:`space-y-4`,children:[(0,V.jsx)(`h1`,{className:`text-4xl font-bold`,children:`File Upload Components`}),(0,V.jsx)(`p`,{className:`text-lg text-muted-foreground`,children:`Testing all 13 file upload components with presets and i18n support`})]}),e[3]=i):i=e[3];let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,V.jsx)(`h2`,{className:`text-2xl font-semibold`,children:`Avatar Uploads`}),e[4]=a):a=e[4];let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,V.jsxs)(`div`,{className:`space-y-4 rounded-lg border p-6`,children:[(0,V.jsx)(`h3`,{className:`font-medium`,children:`Avatar Upload Button`}),(0,V.jsx)(A2,{})]}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,V.jsxs)(`section`,{className:`space-y-8`,children:[a,(0,V.jsxs)(`div`,{className:`grid gap-8 md:grid-cols-2`,children:[o,(0,V.jsxs)(`div`,{className:`space-y-4 rounded-lg border p-6`,children:[(0,V.jsx)(`h3`,{className:`font-medium`,children:`Avatar Upload Dropzone`}),(0,V.jsx)(M2,{})]})]})]}),e[6]=s):s=e[6];let c;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,V.jsx)(`h2`,{className:`text-2xl font-semibold`,children:`Basic Uploads`}),e[7]=c):c=e[7];let l;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,V.jsxs)(`div`,{className:`space-y-4 rounded-lg border p-6`,children:[(0,V.jsx)(`h3`,{className:`font-medium`,children:`File Upload Button`}),(0,V.jsx)(I2,{})]}),e[8]=l):l=e[8];let u;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,V.jsxs)(`section`,{className:`space-y-8`,children:[c,(0,V.jsxs)(`div`,{className:`grid gap-8 md:grid-cols-2`,children:[l,(0,V.jsxs)(`div`,{className:`space-y-4 rounded-lg border p-6`,children:[(0,V.jsx)(`h3`,{className:`font-medium`,children:`File Upload`}),(0,V.jsx)(P2,{})]})]})]}),e[9]=u):u=e[9];let d;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,V.jsx)(`h2`,{className:`text-2xl font-semibold`,children:`Dropzone Uploads`}),e[10]=d):d=e[10];let f;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,V.jsxs)(`div`,{className:`space-y-4 rounded-lg border p-6`,children:[(0,V.jsx)(`h3`,{className:`font-medium`,children:`File Upload Dropzone`}),(0,V.jsx)(z2,{})]}),e[11]=f):f=e[11];let p;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,V.jsxs)(`section`,{className:`space-y-8`,children:[d,(0,V.jsxs)(`div`,{className:`grid gap-8 md:grid-cols-2`,children:[f,(0,V.jsxs)(`div`,{className:`space-y-4 rounded-lg border p-6`,children:[(0,V.jsx)(`h3`,{className:`font-medium`,children:`File Upload Hybrid`}),(0,V.jsx)(U2,{})]})]})]}),e[12]=p):p=e[12];let m;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,V.jsx)(`h2`,{className:`text-2xl font-semibold`,children:`Multiple File Uploads`}),e[13]=m):m=e[13];let h;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,V.jsxs)(`div`,{className:`space-y-4 rounded-lg border p-6`,children:[(0,V.jsx)(`h3`,{className:`font-medium`,children:`File Upload Grid`}),(0,V.jsx)(V2,{})]}),e[14]=h):h=e[14];let g;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,V.jsxs)(`div`,{className:`space-y-4 rounded-lg border p-6`,children:[(0,V.jsx)(`h3`,{className:`font-medium`,children:`Image Upload List`}),(0,V.jsx)(Y2,{})]}),e[15]=g):g=e[15];let _;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,V.jsxs)(`section`,{className:`space-y-8`,children:[m,h,g,(0,V.jsxs)(`div`,{className:`space-y-4 rounded-lg border p-6`,children:[(0,V.jsx)(`h3`,{className:`font-medium`,children:`File Upload List`}),(0,V.jsx)(W2,{})]})]}),e[16]=_):_=e[16];let v;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,V.jsx)(`h2`,{className:`text-2xl font-semibold`,children:`Advanced Layouts`}),e[17]=v):v=e[17];let y;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,V.jsxs)(`div`,{className:`space-y-4 rounded-lg border p-6`,children:[(0,V.jsx)(`h3`,{className:`font-medium`,children:`File Upload List Inline`}),(0,V.jsx)(G2,{})]}),e[18]=y):y=e[18];let b;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,V.jsxs)(`div`,{className:`space-y-4 rounded-lg border p-6`,children:[(0,V.jsx)(`h3`,{className:`font-medium`,children:`File Upload Table`}),(0,V.jsx)(K2,{})]}),e[19]=b):b=e[19];let x;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,V.jsxs)(`section`,{className:`space-y-8`,children:[v,y,b,(0,V.jsxs)(`div`,{className:`space-y-4 rounded-lg border p-6`,children:[(0,V.jsx)(`h3`,{className:`font-medium`,children:`File Upload Cards`}),(0,V.jsx)(L2,{})]})]}),e[20]=x):x=e[20];let S;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,V.jsx)(`h2`,{className:`text-2xl font-semibold`,children:`Upload with Real Progress`}),e[21]=S):S=e[21];let C;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,V.jsxs)(`section`,{className:`space-y-8`,children:[S,(0,V.jsxs)(`div`,{className:`space-y-4 rounded-lg border p-6`,children:[(0,V.jsx)(`h3`,{className:`font-medium`,children:`File Upload with Progress Tracking`}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This component shows real upload progress from your tRPC backend`}),(0,V.jsx)(q2,{})]})]}),e[22]=C):C=e[22];let w;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,V.jsx)(`h2`,{className:`text-2xl font-semibold`,children:`Features`}),e[23]=w):w=e[23];let T;return e[24]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,V.jsxs)(`div`,{className:`container mx-auto max-w-5xl space-y-16 py-12`,children:[i,s,u,p,_,x,C,(0,V.jsxs)(`section`,{className:`space-y-4 border-t pt-8`,children:[w,(0,V.jsxs)(`ul`,{className:`space-y-2 text-muted-foreground`,children:[(0,V.jsx)(`li`,{children:`✅ Automatic upload on file selection (Notion/Slack pattern)`}),(0,V.jsx)(`li`,{children:`✅ Real upload progress tracking from tRPC backend`}),(0,V.jsx)(`li`,{children:`✅ Upload presets (avatar, image, document, file)`}),(0,V.jsx)(`li`,{children:`✅ Custom validation messages with i18n support`}),(0,V.jsx)(`li`,{children:`✅ Frontend and backend validation sync`}),(0,V.jsx)(`li`,{children:`✅ Drag and drop support`}),(0,V.jsx)(`li`,{children:`✅ Single and multiple file modes`}),(0,V.jsx)(`li`,{children:`✅ Image preview support`}),(0,V.jsx)(`li`,{children:`✅ Accessible (WCAG compliant)`}),(0,V.jsx)(`li`,{children:`✅ TypeScript support`})]})]})]}),e[24]=T):T=e[24],T});function $2(e){console.log(e)}var e4=n({default:()=>r4,loader:()=>n4}),t4=R();async function n4({context:e}){return{users:await e.get(D).container.db.appos.query.users.findMany()}}var r4=d(function(e){let t=(0,t4.c)(4),{loaderData:n}=e,{users:r}=n,i;t[0]===r?i=t[1]:(i=r.map(i4),t[0]=r,t[1]=i);let a;return t[2]===i?a=t[3]:(a=(0,V.jsx)(`div`,{children:i}),t[2]=i,t[3]=a),a});function i4(e){return(0,V.jsx)(`div`,{children:e.email},e.id)}var a4={entry:{module:`/assets/entry.client-BN1GPjAL.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/react-dom-Bhi-1tDD.js`,`/assets/initReactI18next-CyHiepAw.js`,`/assets/chunk-JG3XND5A-BetDbdG0.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[]},routes:{root:{id:`root`,parentId:void 0,path:``,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!0,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!0,module:`/assets/root-CS5YIV-V.js`,imports:`/assets/chunk-UIGDSWPH-DeiamgQc.js,/assets/react-dom-Bhi-1tDD.js,/assets/initReactI18next-CyHiepAw.js,/assets/chunk-JG3XND5A-BetDbdG0.js,/assets/jsx-runtime-SCjaiuzT.js,/assets/chunk-vBKQ29Cd.js,/assets/button-DtZhoqpk.js,/assets/dialog-CQrpvURm.js,/assets/empty-DQRarCKT.js,/assets/auth-provider-rkzBVtYX.js,/assets/config-ChcA_Pkv.js,/assets/realtime-BmU1LPhx.js,/assets/trpc-C1CjVipH.js,/assets/utils-InBzhUf_.js,/assets/dist-DhfcebhF.js,/assets/dist-BWnI-4xl.js,/assets/dist-Yn6lj8QC.js,/assets/es2015-BJguufLZ.js,/assets/dist-VqaKdvZu.js,/assets/dist-B6TkSbxV.js,/assets/dist-CBNvQRbZ.js,/assets/x-4CC8aqOW.js,/assets/compare-Br3z3FUS-BXkA2ojG.js,/assets/useTranslation-Bz7VuQ7j.js,/assets/compiler-runtime-Co9svCia.js,/assets/shim-TRiHENXu.js`.split(`,`),css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/_layout":{id:`routes/_app+/_layout`,parentId:`root`,path:void 0,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/_layout-OcS85aOt.js`,imports:`/assets/chunk-UIGDSWPH-DeiamgQc.js,/assets/brand-CbTWw97e.js,/assets/nav-user-BqPUBe9x.js,/assets/button-DtZhoqpk.js,/assets/dropdown-menu-CbzduuDa.js,/assets/input-V1lM1yoz.js,/assets/separator-Cla0V581.js,/assets/sidebar-CqrdL512.js,/assets/tooltip-BeDraHQn.js,/assets/auth-provider-rkzBVtYX.js,/assets/config-ChcA_Pkv.js,/assets/utils-InBzhUf_.js,/assets/app-sidebar-D2Nsi85j.js,/assets/site-header-CZO3qBhf.js,/assets/dist-BNO39Rfs.js,/assets/dist-DhfcebhF.js,/assets/dist-DKtC0FSi.js,/assets/dist-BWnI-4xl.js,/assets/dist-Yn6lj8QC.js,/assets/es2015-BJguufLZ.js,/assets/dist-VqaKdvZu.js,/assets/dist-B6TkSbxV.js,/assets/dist-CYRPrwOb.js,/assets/createReactComponent-C2TSpqC7.js,/assets/IconMail-BZadZvAd.js,/assets/dist-CBNvQRbZ.js,/assets/x-4CC8aqOW.js,/assets/react-dom-Bhi-1tDD.js,/assets/useTranslation-Bz7VuQ7j.js,/assets/initReactI18next-CyHiepAw.js,/assets/chunk-JG3XND5A-BetDbdG0.js,/assets/compiler-runtime-Co9svCia.js,/assets/jsx-runtime-SCjaiuzT.js,/assets/shim-TRiHENXu.js,/assets/chunk-vBKQ29Cd.js`.split(`,`),css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/app-sidebar":{id:`routes/_app+/app-sidebar`,parentId:`routes/_app+/_layout`,path:`app-sidebar`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/app-sidebar-Bm6e4kn_.js`,imports:`/assets/chunk-UIGDSWPH-DeiamgQc.js,/assets/brand-CbTWw97e.js,/assets/nav-user-BqPUBe9x.js,/assets/button-DtZhoqpk.js,/assets/dropdown-menu-CbzduuDa.js,/assets/input-V1lM1yoz.js,/assets/separator-Cla0V581.js,/assets/sidebar-CqrdL512.js,/assets/tooltip-BeDraHQn.js,/assets/auth-provider-rkzBVtYX.js,/assets/config-ChcA_Pkv.js,/assets/utils-InBzhUf_.js,/assets/app-sidebar-D2Nsi85j.js,/assets/dist-BNO39Rfs.js,/assets/dist-DhfcebhF.js,/assets/dist-DKtC0FSi.js,/assets/dist-BWnI-4xl.js,/assets/dist-Yn6lj8QC.js,/assets/es2015-BJguufLZ.js,/assets/dist-VqaKdvZu.js,/assets/dist-B6TkSbxV.js,/assets/dist-CYRPrwOb.js,/assets/createReactComponent-C2TSpqC7.js,/assets/IconMail-BZadZvAd.js,/assets/dist-CBNvQRbZ.js,/assets/x-4CC8aqOW.js,/assets/react-dom-Bhi-1tDD.js,/assets/useTranslation-Bz7VuQ7j.js,/assets/initReactI18next-CyHiepAw.js,/assets/chunk-JG3XND5A-BetDbdG0.js,/assets/compiler-runtime-Co9svCia.js,/assets/jsx-runtime-SCjaiuzT.js,/assets/shim-TRiHENXu.js,/assets/chunk-vBKQ29Cd.js`.split(`,`),css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/board/route":{id:`routes/_app+/board/route`,parentId:`routes/_app+/_layout`,path:`board`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-BR4LdxHR.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/help/route":{id:`routes/_app+/help/route`,parentId:`routes/_app+/_layout`,path:`help`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-BD2nV1q2.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/home/route":{id:`routes/_app+/home/route`,parentId:`routes/_app+/_layout`,path:`home`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-CsYSLbnx.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/inbox/route":{id:`routes/_app+/inbox/route`,parentId:`routes/_app+/_layout`,path:`inbox`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-B9cwW-UK.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/nav-user":{id:`routes/_app+/nav-user`,parentId:`routes/_app+/_layout`,path:`nav-user`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/nav-user-Yu7wt7b_.js`,imports:`/assets/chunk-UIGDSWPH-DeiamgQc.js,/assets/nav-user-BqPUBe9x.js,/assets/button-DtZhoqpk.js,/assets/dropdown-menu-CbzduuDa.js,/assets/input-V1lM1yoz.js,/assets/separator-Cla0V581.js,/assets/sidebar-CqrdL512.js,/assets/tooltip-BeDraHQn.js,/assets/auth-provider-rkzBVtYX.js,/assets/config-ChcA_Pkv.js,/assets/utils-InBzhUf_.js,/assets/dist-BNO39Rfs.js,/assets/dist-DhfcebhF.js,/assets/dist-DKtC0FSi.js,/assets/dist-BWnI-4xl.js,/assets/dist-Yn6lj8QC.js,/assets/es2015-BJguufLZ.js,/assets/dist-VqaKdvZu.js,/assets/dist-B6TkSbxV.js,/assets/dist-CYRPrwOb.js,/assets/createReactComponent-C2TSpqC7.js,/assets/dist-CBNvQRbZ.js,/assets/x-4CC8aqOW.js,/assets/react-dom-Bhi-1tDD.js,/assets/chunk-JG3XND5A-BetDbdG0.js,/assets/compiler-runtime-Co9svCia.js,/assets/jsx-runtime-SCjaiuzT.js,/assets/shim-TRiHENXu.js,/assets/chunk-vBKQ29Cd.js`.split(`,`),css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/org-switcher":{id:`routes/_app+/org-switcher`,parentId:`routes/_app+/_layout`,path:`org-switcher`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/org-switcher-BIuearbE.js`,imports:[`/assets/button-DtZhoqpk.js`,`/assets/dropdown-menu-CbzduuDa.js`,`/assets/input-V1lM1yoz.js`,`/assets/separator-Cla0V581.js`,`/assets/sidebar-CqrdL512.js`,`/assets/tooltip-BeDraHQn.js`,`/assets/utils-InBzhUf_.js`,`/assets/dist-BNO39Rfs.js`,`/assets/dist-DhfcebhF.js`,`/assets/dist-DKtC0FSi.js`,`/assets/dist-BWnI-4xl.js`,`/assets/dist-Yn6lj8QC.js`,`/assets/es2015-BJguufLZ.js`,`/assets/dist-VqaKdvZu.js`,`/assets/dist-B6TkSbxV.js`,`/assets/dist-CYRPrwOb.js`,`/assets/dist-CBNvQRbZ.js`,`/assets/x-4CC8aqOW.js`,`/assets/react-dom-Bhi-1tDD.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/platform+/auth+/authentication/route":{id:`routes/_app+/platform+/auth+/authentication/route`,parentId:`routes/_app+/_layout`,path:`platform/auth/authentication`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-Dxfmap_u.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/platform+/auth+/index/route":{id:`routes/_app+/platform+/auth+/index/route`,parentId:`routes/_app+/_layout`,path:`platform/auth`,index:!0,caseSensitive:void 0,hasAction:!1,hasLoader:!0,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-BU5TYmVE.js`,imports:[],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/platform+/auth+/organizations/route":{id:`routes/_app+/platform+/auth+/organizations/route`,parentId:`routes/_app+/_layout`,path:`platform/auth/organizations`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-Bwd903CU.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/platform+/auth+/overview/route":{id:`routes/_app+/platform+/auth+/overview/route`,parentId:`routes/_app+/_layout`,path:`platform/auth/overview`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-BY244T48.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/platform+/auth+/users/route":{id:`routes/_app+/platform+/auth+/users/route`,parentId:`routes/_app+/_layout`,path:`platform/auth/users`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-DWNrq2GE.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/platform+/billing+/index/route":{id:`routes/_app+/platform+/billing+/index/route`,parentId:`routes/_app+/_layout`,path:`platform/billing`,index:!0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-CQ3p9Qb1.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/platform+/docs+/index/route":{id:`routes/_app+/platform+/docs+/index/route`,parentId:`routes/_app+/_layout`,path:`platform/docs`,index:!0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-CN9iChOk.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/platform+/emails+/_layout":{id:`routes/_app+/platform+/emails+/_layout`,parentId:`routes/_app+/_layout`,path:`platform/emails`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!0,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/_layout-HsJ3Zu5t.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/button-DtZhoqpk.js`,`/assets/input-V1lM1yoz.js`,`/assets/separator-Cla0V581.js`,`/assets/sidebar-CqrdL512.js`,`/assets/tooltip-BeDraHQn.js`,`/assets/utils-InBzhUf_.js`,`/assets/dist-BNO39Rfs.js`,`/assets/dist-DhfcebhF.js`,`/assets/dist-BWnI-4xl.js`,`/assets/dist-Yn6lj8QC.js`,`/assets/es2015-BJguufLZ.js`,`/assets/dist-VqaKdvZu.js`,`/assets/dist-B6TkSbxV.js`,`/assets/dist-CYRPrwOb.js`,`/assets/dist-CBNvQRbZ.js`,`/assets/x-4CC8aqOW.js`,`/assets/react-dom-Bhi-1tDD.js`,`/assets/useTranslation-Bz7VuQ7j.js`,`/assets/initReactI18next-CyHiepAw.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/shim-TRiHENXu.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/platform+/emails+/$":{id:`routes/_app+/platform+/emails+/$`,parentId:`routes/_app+/platform+/emails+/_layout`,path:`*`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!0,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/_-CgPm6_fJ.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/button-DtZhoqpk.js`,`/assets/select-DATRE76_.js`,`/assets/realtime-BmU1LPhx.js`,`/assets/utils-InBzhUf_.js`,`/assets/dist-BNO39Rfs.js`,`/assets/dist-DhfcebhF.js`,`/assets/dist-DKtC0FSi.js`,`/assets/dist-BWnI-4xl.js`,`/assets/es2015-BJguufLZ.js`,`/assets/dist-B6TkSbxV.js`,`/assets/dist-CA21wN5I.js`,`/assets/dist-CYRPrwOb.js`,`/assets/dist-CBNvQRbZ.js`,`/assets/check-D5D2EGI4.js`,`/assets/react-dom-Bhi-1tDD.js`,`/assets/useTranslation-Bz7VuQ7j.js`,`/assets/initReactI18next-CyHiepAw.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/shim-TRiHENXu.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/platform+/emails+/_index":{id:`routes/_app+/platform+/emails+/_index`,parentId:`routes/_app+/platform+/emails+/_layout`,path:void 0,index:!0,caseSensitive:void 0,hasAction:!1,hasLoader:!0,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/_index-BCLDp_mg.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/empty-DQRarCKT.js`,`/assets/utils-InBzhUf_.js`,`/assets/createReactComponent-C2TSpqC7.js`,`/assets/IconMail-BZadZvAd.js`,`/assets/dist-CBNvQRbZ.js`,`/assets/useTranslation-Bz7VuQ7j.js`,`/assets/initReactI18next-CyHiepAw.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/shim-TRiHENXu.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/platform+/index/route":{id:`routes/_app+/platform+/index/route`,parentId:`routes/_app+/_layout`,path:`platform`,index:!0,caseSensitive:void 0,hasAction:!1,hasLoader:!0,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-Gnx1fkRX.js`,imports:[],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/platform+/notifications+/index/route":{id:`routes/_app+/platform+/notifications+/index/route`,parentId:`routes/_app+/_layout`,path:`platform/notifications`,index:!0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-v9Jwv-AW.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/platform+/site+/index/route":{id:`routes/_app+/platform+/site+/index/route`,parentId:`routes/_app+/_layout`,path:`platform/site`,index:!0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-BEnDcljt.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/platform+/storage+/index/route":{id:`routes/_app+/platform+/storage+/index/route`,parentId:`routes/_app+/_layout`,path:`platform/storage`,index:!0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-BVmIPEvK.js`,imports:`/assets/chunk-UIGDSWPH-DeiamgQc.js,/assets/button-DtZhoqpk.js,/assets/checkbox-B35Nn166.js,/assets/dropdown-menu-CbzduuDa.js,/assets/empty-DQRarCKT.js,/assets/input-V1lM1yoz.js,/assets/select-DATRE76_.js,/assets/use-file-upload-CNPfWC6W.js,/assets/tooltip-BeDraHQn.js,/assets/config-ChcA_Pkv.js,/assets/trpc-C1CjVipH.js,/assets/utils-InBzhUf_.js,/assets/dist-BNO39Rfs.js,/assets/dist-DhfcebhF.js,/assets/dist-DKtC0FSi.js,/assets/dist-BWnI-4xl.js,/assets/dist-Yn6lj8QC.js,/assets/es2015-BJguufLZ.js,/assets/dist-VqaKdvZu.js,/assets/dist-B6TkSbxV.js,/assets/dist-CA21wN5I.js,/assets/dist-CYRPrwOb.js,/assets/dist-CBNvQRbZ.js,/assets/check-D5D2EGI4.js,/assets/eye-Ctrln70x.js,/assets/x-4CC8aqOW.js,/assets/compare-Br3z3FUS-BXkA2ojG.js,/assets/react-dom-Bhi-1tDD.js,/assets/useTranslation-Bz7VuQ7j.js,/assets/initReactI18next-CyHiepAw.js,/assets/compiler-runtime-Co9svCia.js,/assets/jsx-runtime-SCjaiuzT.js,/assets/shim-TRiHENXu.js,/assets/chunk-vBKQ29Cd.js`.split(`,`),css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_app+/site-header":{id:`routes/_app+/site-header`,parentId:`routes/_app+/_layout`,path:`site-header`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/site-header-CwidwSv1.js`,imports:[`/assets/button-DtZhoqpk.js`,`/assets/input-V1lM1yoz.js`,`/assets/separator-Cla0V581.js`,`/assets/sidebar-CqrdL512.js`,`/assets/tooltip-BeDraHQn.js`,`/assets/utils-InBzhUf_.js`,`/assets/site-header-CZO3qBhf.js`,`/assets/dist-BNO39Rfs.js`,`/assets/dist-DhfcebhF.js`,`/assets/dist-BWnI-4xl.js`,`/assets/dist-Yn6lj8QC.js`,`/assets/es2015-BJguufLZ.js`,`/assets/dist-VqaKdvZu.js`,`/assets/dist-B6TkSbxV.js`,`/assets/dist-CYRPrwOb.js`,`/assets/dist-CBNvQRbZ.js`,`/assets/x-4CC8aqOW.js`,`/assets/react-dom-Bhi-1tDD.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_auth+/_layout":{id:`routes/_auth+/_layout`,parentId:`root`,path:void 0,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/_layout-CTmjtKOZ.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/brand-CbTWw97e.js`,`/assets/auth-provider-rkzBVtYX.js`,`/assets/config-ChcA_Pkv.js`,`/assets/utils-InBzhUf_.js`,`/assets/chunk-JG3XND5A-BetDbdG0.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_auth+/forgot-password/route":{id:`routes/_auth+/forgot-password/route`,parentId:`routes/_auth+/_layout`,path:`forgot-password`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!0,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-CVLnTONw.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/button-DtZhoqpk.js`,`/assets/trust-indicator-D4tEs4Dr.js`,`/assets/input-V1lM1yoz.js`,`/assets/auth-provider-rkzBVtYX.js`,`/assets/config-ChcA_Pkv.js`,`/assets/utils-InBzhUf_.js`,`/assets/dist-BWnI-4xl.js`,`/assets/dist-B6TkSbxV.js`,`/assets/dist-CBNvQRbZ.js`,`/assets/circle-alert-DB4JluX5.js`,`/assets/lock-Bj7dxHab.js`,`/assets/react-dom-Bhi-1tDD.js`,`/assets/useTranslation-Bz7VuQ7j.js`,`/assets/initReactI18next-CyHiepAw.js`,`/assets/chunk-JG3XND5A-BetDbdG0.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/shim-TRiHENXu.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_auth+/login/route":{id:`routes/_auth+/login/route`,parentId:`routes/_auth+/_layout`,path:`login`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-CoMZag4T.js`,imports:`/assets/chunk-UIGDSWPH-DeiamgQc.js,/assets/button-DtZhoqpk.js,/assets/trust-indicator-D4tEs4Dr.js,/assets/checkbox-B35Nn166.js,/assets/input-V1lM1yoz.js,/assets/password-input-bor7e4TM.js,/assets/separator-Cla0V581.js,/assets/auth-provider-rkzBVtYX.js,/assets/social-providers-Bz7f1_yd.js,/assets/config-ChcA_Pkv.js,/assets/utils-InBzhUf_.js,/assets/dist-DhfcebhF.js,/assets/dist-BWnI-4xl.js,/assets/dist-VqaKdvZu.js,/assets/dist-B6TkSbxV.js,/assets/dist-CA21wN5I.js,/assets/dist-CYRPrwOb.js,/assets/createReactComponent-C2TSpqC7.js,/assets/dist-CBNvQRbZ.js,/assets/check-D5D2EGI4.js,/assets/circle-alert-DB4JluX5.js,/assets/eye-Ctrln70x.js,/assets/lock-Bj7dxHab.js,/assets/x-4CC8aqOW.js,/assets/react-dom-Bhi-1tDD.js,/assets/useTranslation-Bz7VuQ7j.js,/assets/initReactI18next-CyHiepAw.js,/assets/chunk-JG3XND5A-BetDbdG0.js,/assets/compiler-runtime-Co9svCia.js,/assets/jsx-runtime-SCjaiuzT.js,/assets/shim-TRiHENXu.js,/assets/chunk-vBKQ29Cd.js`.split(`,`),css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_auth+/reset-password/route":{id:`routes/_auth+/reset-password/route`,parentId:`routes/_auth+/_layout`,path:`reset-password`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!0,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-NduA4SS_.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/button-DtZhoqpk.js`,`/assets/trust-indicator-D4tEs4Dr.js`,`/assets/input-V1lM1yoz.js`,`/assets/password-input-bor7e4TM.js`,`/assets/auth-provider-rkzBVtYX.js`,`/assets/config-ChcA_Pkv.js`,`/assets/utils-InBzhUf_.js`,`/assets/dist-BWnI-4xl.js`,`/assets/dist-B6TkSbxV.js`,`/assets/dist-CBNvQRbZ.js`,`/assets/check-D5D2EGI4.js`,`/assets/circle-alert-DB4JluX5.js`,`/assets/eye-Ctrln70x.js`,`/assets/lock-Bj7dxHab.js`,`/assets/x-4CC8aqOW.js`,`/assets/react-dom-Bhi-1tDD.js`,`/assets/useTranslation-Bz7VuQ7j.js`,`/assets/initReactI18next-CyHiepAw.js`,`/assets/chunk-JG3XND5A-BetDbdG0.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/shim-TRiHENXu.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_auth+/signup/route":{id:`routes/_auth+/signup/route`,parentId:`routes/_auth+/_layout`,path:`signup`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/route-u2hskgE_.js`,imports:`/assets/chunk-UIGDSWPH-DeiamgQc.js,/assets/button-DtZhoqpk.js,/assets/trust-indicator-D4tEs4Dr.js,/assets/input-V1lM1yoz.js,/assets/password-input-bor7e4TM.js,/assets/separator-Cla0V581.js,/assets/auth-provider-rkzBVtYX.js,/assets/social-providers-Bz7f1_yd.js,/assets/config-ChcA_Pkv.js,/assets/utils-InBzhUf_.js,/assets/dist-BWnI-4xl.js,/assets/dist-B6TkSbxV.js,/assets/createReactComponent-C2TSpqC7.js,/assets/dist-CBNvQRbZ.js,/assets/check-D5D2EGI4.js,/assets/circle-alert-DB4JluX5.js,/assets/eye-Ctrln70x.js,/assets/x-4CC8aqOW.js,/assets/react-dom-Bhi-1tDD.js,/assets/useTranslation-Bz7VuQ7j.js,/assets/initReactI18next-CyHiepAw.js,/assets/chunk-JG3XND5A-BetDbdG0.js,/assets/compiler-runtime-Co9svCia.js,/assets/jsx-runtime-SCjaiuzT.js,/assets/shim-TRiHENXu.js,/assets/chunk-vBKQ29Cd.js`.split(`,`),css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_marketing+/index":{id:`routes/_marketing+/index`,parentId:`root`,path:void 0,index:!0,caseSensitive:void 0,hasAction:!1,hasLoader:!1,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/index-Del2yBnb.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/button-DtZhoqpk.js`,`/assets/use-file-upload-CNPfWC6W.js`,`/assets/config-ChcA_Pkv.js`,`/assets/realtime-BmU1LPhx.js`,`/assets/trpc-C1CjVipH.js`,`/assets/utils-InBzhUf_.js`,`/assets/dist-BWnI-4xl.js`,`/assets/dist-CBNvQRbZ.js`,`/assets/circle-alert-DB4JluX5.js`,`/assets/x-4CC8aqOW.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0},"routes/_marketing+/test":{id:`routes/_marketing+/test`,parentId:`root`,path:`test`,index:void 0,caseSensitive:void 0,hasAction:!1,hasLoader:!0,hasClientAction:!1,hasClientLoader:!1,hasClientMiddleware:!1,hasErrorBoundary:!1,module:`/assets/test-WdoqKbLa.js`,imports:[`/assets/chunk-UIGDSWPH-DeiamgQc.js`,`/assets/compiler-runtime-Co9svCia.js`,`/assets/jsx-runtime-SCjaiuzT.js`,`/assets/chunk-vBKQ29Cd.js`],css:[],clientActionModule:void 0,clientLoaderModule:void 0,clientMiddlewareModule:void 0,hydrateFallbackModule:void 0}},url:`/assets/manifest-ca813980.js`,version:`ca813980`,sri:void 0};const o4=`build/client`,s4=`/`,c4={v8_middleware:!0,unstable_optimizeDeps:!0,unstable_splitRouteModules:!1,unstable_subResourceIntegrity:!1,unstable_viteEnvironmentApi:!1},l4=!0,u4=!1,d4=[],f4={mode:`lazy`,manifestPath:`/__manifest`},p4=`/`,m4={module:Ye},h4={root:{id:`root`,parentId:void 0,path:``,index:void 0,caseSensitive:void 0,module:oC},"routes/_app+/_layout":{id:`routes/_app+/_layout`,parentId:`root`,path:void 0,index:void 0,caseSensitive:void 0,module:sT},"routes/_app+/app-sidebar":{id:`routes/_app+/app-sidebar`,parentId:`routes/_app+/_layout`,path:`app-sidebar`,index:void 0,caseSensitive:void 0,module:nT},"routes/_app+/board/route":{id:`routes/_app+/board/route`,parentId:`routes/_app+/_layout`,path:`board`,index:void 0,caseSensitive:void 0,module:dT},"routes/_app+/help/route":{id:`routes/_app+/help/route`,parentId:`routes/_app+/_layout`,path:`help`,index:void 0,caseSensitive:void 0,module:mT},"routes/_app+/home/route":{id:`routes/_app+/home/route`,parentId:`routes/_app+/_layout`,path:`home`,index:void 0,caseSensitive:void 0,module:_T},"routes/_app+/inbox/route":{id:`routes/_app+/inbox/route`,parentId:`routes/_app+/_layout`,path:`inbox`,index:void 0,caseSensitive:void 0,module:bT},"routes/_app+/nav-user":{id:`routes/_app+/nav-user`,parentId:`routes/_app+/_layout`,path:`nav-user`,index:void 0,caseSensitive:void 0,module:$w},"routes/_app+/org-switcher":{id:`routes/_app+/org-switcher`,parentId:`routes/_app+/_layout`,path:`org-switcher`,index:void 0,caseSensitive:void 0,module:CT},"routes/_app+/platform+/auth+/authentication/route":{id:`routes/_app+/platform+/auth+/authentication/route`,parentId:`routes/_app+/_layout`,path:`platform/auth/authentication`,index:void 0,caseSensitive:void 0,module:ET},"routes/_app+/platform+/auth+/index/route":{id:`routes/_app+/platform+/auth+/index/route`,parentId:`routes/_app+/_layout`,path:`platform/auth`,index:!0,caseSensitive:void 0,module:kT},"routes/_app+/platform+/auth+/organizations/route":{id:`routes/_app+/platform+/auth+/organizations/route`,parentId:`routes/_app+/_layout`,path:`platform/auth/organizations`,index:void 0,caseSensitive:void 0,module:jT},"routes/_app+/platform+/auth+/overview/route":{id:`routes/_app+/platform+/auth+/overview/route`,parentId:`routes/_app+/_layout`,path:`platform/auth/overview`,index:void 0,caseSensitive:void 0,module:PT},"routes/_app+/platform+/auth+/users/route":{id:`routes/_app+/platform+/auth+/users/route`,parentId:`routes/_app+/_layout`,path:`platform/auth/users`,index:void 0,caseSensitive:void 0,module:LT},"routes/_app+/platform+/billing+/index/route":{id:`routes/_app+/platform+/billing+/index/route`,parentId:`routes/_app+/_layout`,path:`platform/billing`,index:!0,caseSensitive:void 0,module:BT},"routes/_app+/platform+/docs+/index/route":{id:`routes/_app+/platform+/docs+/index/route`,parentId:`routes/_app+/_layout`,path:`platform/docs`,index:!0,caseSensitive:void 0,module:UT},"routes/_app+/platform+/emails+/_layout":{id:`routes/_app+/platform+/emails+/_layout`,parentId:`routes/_app+/_layout`,path:`platform/emails`,index:void 0,caseSensitive:void 0,module:KW},"routes/_app+/platform+/emails+/$":{id:`routes/_app+/platform+/emails+/$`,parentId:`routes/_app+/platform+/emails+/_layout`,path:`*`,index:void 0,caseSensitive:void 0,module:fG},"routes/_app+/platform+/emails+/_index":{id:`routes/_app+/platform+/emails+/_index`,parentId:`routes/_app+/platform+/emails+/_layout`,path:void 0,index:!0,caseSensitive:void 0,module:gG},"routes/_app+/platform+/index/route":{id:`routes/_app+/platform+/index/route`,parentId:`routes/_app+/_layout`,path:`platform`,index:!0,caseSensitive:void 0,module:bG},"routes/_app+/platform+/notifications+/index/route":{id:`routes/_app+/platform+/notifications+/index/route`,parentId:`routes/_app+/_layout`,path:`platform/notifications`,index:!0,caseSensitive:void 0,module:SG},"routes/_app+/platform+/site+/index/route":{id:`routes/_app+/platform+/site+/index/route`,parentId:`routes/_app+/_layout`,path:`platform/site`,index:!0,caseSensitive:void 0,module:TG},"routes/_app+/platform+/storage+/index/route":{id:`routes/_app+/platform+/storage+/index/route`,parentId:`routes/_app+/_layout`,path:`platform/storage`,index:!0,caseSensitive:void 0,module:nJ},"routes/_app+/site-header":{id:`routes/_app+/site-header`,parentId:`routes/_app+/_layout`,path:`site-header`,index:void 0,caseSensitive:void 0,module:iT},"routes/_auth+/_layout":{id:`routes/_auth+/_layout`,parentId:`root`,path:void 0,index:void 0,caseSensitive:void 0,module:oJ},"routes/_auth+/forgot-password/route":{id:`routes/_auth+/forgot-password/route`,parentId:`routes/_auth+/_layout`,path:`forgot-password`,index:void 0,caseSensitive:void 0,module:o2},"routes/_auth+/login/route":{id:`routes/_auth+/login/route`,parentId:`routes/_auth+/_layout`,path:`login`,index:void 0,caseSensitive:void 0,module:S2},"routes/_auth+/reset-password/route":{id:`routes/_auth+/reset-password/route`,parentId:`routes/_auth+/_layout`,path:`reset-password`,index:void 0,caseSensitive:void 0,module:w2},"routes/_auth+/signup/route":{id:`routes/_auth+/signup/route`,parentId:`routes/_auth+/_layout`,path:`signup`,index:void 0,caseSensitive:void 0,module:D2},"routes/_marketing+/index":{id:`routes/_marketing+/index`,parentId:`root`,path:void 0,index:!0,caseSensitive:void 0,module:X2},"routes/_marketing+/test":{id:`routes/_marketing+/test`,parentId:`root`,path:`test`,index:void 0,caseSensitive:void 0,module:e4}};export{a4 as assets,o4 as assetsBuildDirectory,s4 as basename,m4 as entry,c4 as future,u4 as isSpaMode,d4 as prerender,p4 as publicPath,f4 as routeDiscovery,h4 as routes,l4 as ssr};