adminizer 4.1.0-build.3 → 4.1.0-build.30

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 (249) hide show
  1. package/Readme.md +11 -1
  2. package/assets/{VanillaJSONEditor-FUe77pIA.js → VanillaJSONEditor-DKF_Ft1S.js} +96 -96
  3. package/assets/add-BA0ZgbVP.js +1 -0
  4. package/assets/add-form-D5PNdz6X.js +1 -0
  5. package/assets/add-group-BqvmQRDY.js +1 -0
  6. package/assets/{add-group-form-dzadPSfL.js → add-group-form-D1P6v9Fm.js} +1 -1
  7. package/assets/add-user-C31g3pXW.js +1 -0
  8. package/assets/add-user-form-DyczuE4l.js +1 -0
  9. package/assets/{app-DMmad2-f.css → app-ClS67l37.css} +1 -1
  10. package/assets/app-layout-CQTlWDgg.js +1 -0
  11. package/assets/{app-shell-BWMRMkHM.js → app-shell-B4pzTbiN.js} +1 -1
  12. package/assets/app-sidebar-DX9Shcd3.js +1 -0
  13. package/assets/{app-sidebar-header-DLAFi13E.js → app-sidebar-header-BcZ0JSSJ.js} +1 -1
  14. package/assets/app.js +9 -9
  15. package/assets/{breadcrumbs-CQNon4Vl.js → breadcrumbs-DIhfOCvh.js} +1 -1
  16. package/assets/{button-CQ9t1kLz.js → button-DleSKY4-.js} +1 -1
  17. package/assets/catalog-BHbLV-zr.js +12 -0
  18. package/assets/catalog-CZUI8zho.css +1 -0
  19. package/assets/{checkbox-W0nGAXIj.js → checkbox-DgmLwxEt.js} +1 -1
  20. package/assets/{compiler-runtime-tM4jBQ-T.js → compiler-runtime-CMDe02AS.js} +1 -1
  21. package/assets/dashboard-BOltB2Hq.css +1 -0
  22. package/assets/dashboard-BiycZ-vC.js +3 -0
  23. package/assets/{date-picker-B__dVVqj.js → date-picker-Cb6A4Zx_.js} +1 -1
  24. package/assets/dialog-stack-DU4Ow4Oa.js +1 -0
  25. package/assets/{dropdown-menu-SEBnEIiL.js → dropdown-menu-D3vlxbLx.js} +1 -1
  26. package/assets/{field-renderer-CapylJU9.js → field-renderer-CW8TLtlI.js} +3 -3
  27. package/assets/form-CLP53RtV.js +1 -0
  28. package/assets/form-CwSId-Cu.js +1 -0
  29. package/assets/{geo-json-CwteYDGB.js → geo-json-BNgLxoVs.js} +1 -1
  30. package/assets/group-add-Brshb-tH.js +1 -0
  31. package/assets/{handsontable-BCnjOpBr.js → handsontable-BI4C0OBe.js} +1 -1
  32. package/assets/home-BRJ6eKVn.js +2 -0
  33. package/assets/{icon-Bz9BMaD0.js → icon-DLHMhF_-.js} +1 -1
  34. package/assets/{index-BcE9FUM6.js → index-BRQOFOzQ.js} +1 -1
  35. package/assets/{index-C0SL3SHw.js → index-BZZx7KCI.js} +1 -1
  36. package/assets/{index-DTRTjOmh.js → index-BpVWRzP4.js} +2 -2
  37. package/assets/{index-BbXEMx9n.js → index-Bz0y23v2.js} +1 -1
  38. package/assets/index-C148XJoK.js +1 -0
  39. package/assets/index-C8anOJBB.js +1 -0
  40. package/assets/{index-DEk3sC8d.js → index-CS5ssiKu.js} +1 -1
  41. package/assets/index-CsMwA9pu.js +1 -0
  42. package/assets/{index-DrWfGwtf.js → index-HZzILD42.js} +1 -1
  43. package/assets/{index-BC0yfOHo.js → index-kzaPFHKt.js} +1 -1
  44. package/assets/{init-user-D9mW-g14.js → init-user-VMPNdivw.js} +1 -1
  45. package/assets/{input-DF7Ue23C.js → input-CZTX-THl.js} +1 -1
  46. package/assets/{input-error-BBygona6.js → input-error-DpUrcJaR.js} +1 -1
  47. package/assets/item-add-1duKvWXz.js +1 -0
  48. package/assets/{label-Z506NKsW.js → label-B1wVTLjK.js} +1 -1
  49. package/assets/list-C07llS61.js +1 -0
  50. package/assets/{list-table-DB1sEQLF.js → list-table-Bh8E-zkN.js} +11 -16
  51. package/assets/{login-DrGaTWhY.js → login-Dl59_ycU.js} +1 -1
  52. package/assets/manifest.json +735 -564
  53. package/assets/{material-icon-CItZiB53.js → material-icon-C9IuCi5R.js} +1 -1
  54. package/assets/module-DwX7rlQ2.js +1 -0
  55. package/assets/{monaco-editor-DqAqwxw4.js → monaco-editor-DjLNSn-O.js} +1 -1
  56. package/assets/{multi-select-oabtVhUP.js → multi-select-CvcWwfki.js} +2 -2
  57. package/assets/{nav-footer-CM-yHiRs.js → nav-footer-C7_pEHmX.js} +1 -1
  58. package/assets/{nav-main-Q3xofGRT.js → nav-main-CwwCPIYf.js} +1 -1
  59. package/assets/{nav-user-Ds8i0Pa2.js → nav-user-K0xXPEmb.js} +1 -1
  60. package/assets/{pagination-render-B57pOpFy.js → pagination-render-BYBw11L4.js} +1 -1
  61. package/assets/pencil-CewBKDRo.js +6 -0
  62. package/assets/{popover-I249Gg2O.js → popover-vHKm7zkm.js} +1 -1
  63. package/assets/{register-C9FQIDtS.js → register-CRsK6KgL.js} +1 -1
  64. package/assets/{select-D1N8zRPY.js → select-Bs9mijkr.js} +2 -2
  65. package/assets/{sidebar-4D-sX2l4.js → sidebar-DflSp1X1.js} +2 -2
  66. package/assets/skeleton-C6UluiCK.js +1 -0
  67. package/assets/{sonner-Dzckw3U3.js → sonner-Cn7ueXZc.js} +1 -1
  68. package/assets/{toast-editor-FbrFd1ft.js → toast-editor-FNxkBiFw.js} +1 -1
  69. package/assets/{tooltip-D2ehgLlB.js → tooltip-BlR1mf2V.js} +1 -1
  70. package/assets/{use-appearance-Co6mO0dV.js → use-appearance-CL1-5ZfQ.js} +1 -1
  71. package/assets/{use-window-size-B8l6Bpkf.js → use-window-size-ciZdUHrJ.js} +1 -1
  72. package/assets/{user-info-DBYoAJYJ.js → user-info-qduQAMOl.js} +2 -2
  73. package/assets/{user-menu-content-qkvdkUVd.js → user-menu-content-Cjq658jE.js} +2 -2
  74. package/assets/welcome-CbHEVD33.js +1 -0
  75. package/controllers/add.js +9 -10
  76. package/controllers/addGroup.js +2 -4
  77. package/controllers/addUser.js +4 -6
  78. package/controllers/catalog/Catalog.d.ts +1 -1
  79. package/controllers/catalog/Catalog.js +42 -34
  80. package/controllers/catalog/FrontentCatalogAdapter.d.ts +43 -21
  81. package/controllers/catalog/FrontentCatalogAdapter.js +49 -30
  82. package/controllers/ckeditorUpload.js +2 -3
  83. package/controllers/dashboard.js +16 -2
  84. package/controllers/edit.js +4 -5
  85. package/controllers/editGroup.js +2 -4
  86. package/controllers/editUser.js +3 -5
  87. package/controllers/form.js +2 -3
  88. package/controllers/getAllWidgets.js +3 -3
  89. package/controllers/initUser.js +1 -2
  90. package/controllers/list.js +6 -6
  91. package/controllers/login.js +31 -15
  92. package/controllers/media-manager/mediaManagerAdapter.js +1 -2
  93. package/controllers/media-manager/mediaManagerApi.js +2 -2
  94. package/controllers/navigation/edit.js +2 -2
  95. package/controllers/register.js +1 -4
  96. package/controllers/remove.js +3 -3
  97. package/controllers/timezones.js +1 -1
  98. package/controllers/view.js +3 -3
  99. package/controllers/welcome.js +1 -1
  100. package/controllers/widgets/Action.js +2 -2
  101. package/controllers/widgets/Custom.js +2 -2
  102. package/controllers/widgets/Info.js +2 -2
  103. package/controllers/widgets/switch.js +2 -2
  104. package/controllers/widgetsDB.js +5 -5
  105. package/helpers/JsUtils.d.ts +1 -0
  106. package/helpers/JsUtils.js +3 -0
  107. package/helpers/accessRightsHelper.d.ts +6 -2
  108. package/helpers/accessRightsHelper.js +26 -3
  109. package/helpers/configHelper.js +2 -1
  110. package/helpers/controllerHelper.js +1 -1
  111. package/helpers/fieldsHelper.d.ts +4 -3
  112. package/helpers/fieldsHelper.js +5 -1
  113. package/helpers/inertiaActionsHelper.js +1 -1
  114. package/helpers/inertiaAddHelper.d.ts +3 -4
  115. package/helpers/inertiaAddHelper.js +27 -7
  116. package/helpers/inertiaFromHelper.js +2 -0
  117. package/helpers/inertiaGroupHelper.d.ts +4 -2
  118. package/helpers/inertiaGroupHelper.js +1 -1
  119. package/helpers/inertiaListHelper.js +5 -5
  120. package/helpers/inertiaMenuHelper.d.ts +1 -1
  121. package/helpers/inertiaMenuHelper.js +2 -2
  122. package/helpers/inertiaUserHelper.d.ts +7 -1
  123. package/helpers/inertiaUserHelper.js +5 -1
  124. package/helpers/menuHelper.d.ts +4 -3
  125. package/helpers/menuHelper.js +22 -15
  126. package/index.d.ts +5 -3
  127. package/index.js +8 -3
  128. package/interfaces/adminpanelConfig.d.ts +28 -31
  129. package/interfaces/global.d.ts +10 -28
  130. package/interfaces/types.d.ts +1 -1
  131. package/lib/Adminizer.d.ts +4 -2
  132. package/lib/Adminizer.js +32 -10
  133. package/lib/media-manager/AbstractMediaManager.d.ts +2 -2
  134. package/lib/media-manager/AbstractMediaManager.js +1 -1
  135. package/lib/media-manager/Items.js +0 -3
  136. package/lib/requestProcessor.js +10 -3
  137. package/lib/v4/DataAccessor.d.ts +5 -2
  138. package/lib/v4/DataAccessor.js +44 -19
  139. package/lib/v4/I18n.js +2 -0
  140. package/lib/v4/POWCaptcha.js +0 -1
  141. package/lib/v4/PolicyManager.js +0 -1
  142. package/lib/{catalog → v4/catalog}/AbstractCatalog.d.ts +87 -31
  143. package/lib/{catalog → v4/catalog}/AbstractCatalog.js +38 -34
  144. package/lib/v4/catalog/Navigation.d.ts +43 -0
  145. package/lib/v4/catalog/Navigation.js +462 -0
  146. package/lib/{controls → v4/controls}/AbstractControls.d.ts +1 -1
  147. package/lib/{controls → v4/controls}/codeEditor/MonacoEditor.d.ts +1 -1
  148. package/lib/{controls → v4/controls}/geojsoneditor/GeoEditor.d.ts +1 -1
  149. package/lib/{controls → v4/controls}/jsoneditor/JsonEditor.d.ts +1 -1
  150. package/lib/{controls → v4/controls}/markdown/ToastUiEditor.d.ts +1 -1
  151. package/lib/{controls → v4/controls}/table/Handsontable.d.ts +1 -1
  152. package/lib/{controls → v4/controls}/wysiwyg/CKeditor.d.ts +1 -1
  153. package/lib/{datatable → v4/datatable}/NodeTable.d.ts +3 -3
  154. package/lib/{datatable → v4/datatable}/NodeTable.js +8 -8
  155. package/lib/v4/helper/jwt.d.ts +10 -0
  156. package/lib/v4/helper/jwt.js +18 -0
  157. package/lib/{inertia → v4/inertia}/inertiaAdapter.js +0 -1
  158. package/lib/v4/model/AbstractModel.d.ts +5 -1
  159. package/lib/v4/model/AbstractModel.js +2 -3
  160. package/lib/v4/model/ModelHandler.js +1 -1
  161. package/lib/v4/model/adapter/sequelize.d.ts +11 -2
  162. package/lib/v4/model/adapter/sequelize.js +451 -118
  163. package/lib/v4/model/adapter/waterline.js +5 -3
  164. package/lib/{widgets → v4/widgets}/abstractAction.d.ts +1 -1
  165. package/lib/v4/widgets/abstractCustom.d.ts +28 -0
  166. package/lib/v4/widgets/abstractCustom.js +9 -0
  167. package/lib/{widgets → v4/widgets}/abstractInfo.d.ts +1 -1
  168. package/lib/{widgets → v4/widgets}/abstractInfo.js +1 -1
  169. package/lib/{widgets → v4/widgets}/abstractLink.d.ts +2 -1
  170. package/lib/{widgets → v4/widgets}/abstractSwitch.d.ts +1 -1
  171. package/lib/{widgets → v4/widgets}/abstractWidgetBase.d.ts +2 -2
  172. package/lib/{widgets → v4/widgets}/widgetHandler.d.ts +29 -5
  173. package/lib/{widgets → v4/widgets}/widgetHandler.js +25 -25
  174. package/models/GroupAP.d.ts +8 -0
  175. package/models/NavigationAP.d.ts +7 -3
  176. package/models/NavigationAP.js +5 -6
  177. package/models/UserAP.d.ts +24 -2
  178. package/models/UserAP.js +2 -2
  179. package/package.json +25 -13
  180. package/policies/checkAuth.js +4 -3
  181. package/policies/setLocale.js +2 -2
  182. package/system/Router.js +8 -16
  183. package/system/bindAccessRights.js +0 -4
  184. package/system/bindAuthorization.js +4 -5
  185. package/system/bindControls.js +6 -6
  186. package/system/bindDev.js +1 -0
  187. package/system/bindInertia.js +12 -11
  188. package/system/bindMediaManager.js +0 -1
  189. package/system/bindModels.js +7 -2
  190. package/system/bindNavigation.d.ts +2 -0
  191. package/system/bindNavigation.js +42 -42
  192. package/system/bindReqFunctions.js +15 -0
  193. package/translations/ru.json +17 -8
  194. package/assets/add-ZITr43GJ.js +0 -1
  195. package/assets/add-form-CYOfr0Ef.js +0 -1
  196. package/assets/add-group-B332wN8K.js +0 -1
  197. package/assets/add-user-TC-mYdsB.js +0 -1
  198. package/assets/add-user-form-y2f_1_lM.js +0 -1
  199. package/assets/app-layout-D1m9Kvxq.js +0 -1
  200. package/assets/app-sidebar-BCtaEFGb.js +0 -1
  201. package/assets/dashboard-BR602KhL.js +0 -1
  202. package/assets/form-DOUNk3o2.js +0 -1
  203. package/assets/form-lOKv4Qbw.js +0 -1
  204. package/assets/home-Ch6QfTIt.js +0 -2
  205. package/assets/index-Cdb9ACvz.js +0 -1
  206. package/assets/index-K81GbF6O.js +0 -1
  207. package/assets/list-Qyd7ecQH.js +0 -1
  208. package/assets/module-DBaykv8l.js +0 -1
  209. package/assets/welcome-D2adQ8EU.js +0 -1
  210. package/controllers/processInstallFinalize.d.ts +0 -1
  211. package/controllers/processInstallFinalize.js +0 -16
  212. package/controllers/processInstallStep.d.ts +0 -1
  213. package/controllers/processInstallStep.js +0 -132
  214. package/lib/catalog/Navigation.d.ts +0 -0
  215. package/lib/catalog/Navigation.js +0 -532
  216. package/lib/installStepper/InstallStepAbstract.d.ts +0 -52
  217. package/lib/installStepper/InstallStepAbstract.js +0 -69
  218. package/lib/installStepper/finalizeStep.d.ts +0 -21
  219. package/lib/installStepper/finalizeStep.js +0 -48
  220. package/lib/installStepper/installStepper.d.ts +0 -40
  221. package/lib/installStepper/installStepper.js +0 -195
  222. package/lib/widgets/abstractCustom.d.ts +0 -13
  223. package/lib/widgets/abstractCustom.js +0 -3
  224. package/models/MediaManagerAP.d.ts +0 -46
  225. package/models/MediaManagerAP.js +0 -45
  226. package/models/MediaManagerAssociationsAP.d.ts +0 -28
  227. package/models/MediaManagerAssociationsAP.js +0 -27
  228. package/models/MediaManagerMetaAP.d.ts +0 -22
  229. package/models/MediaManagerMetaAP.js +0 -21
  230. package/system/bindInstallStepper.d.ts +0 -2
  231. package/system/bindInstallStepper.js +0 -23
  232. /package/lib/{catalog → v4/catalog}/CatalogHandler.d.ts +0 -0
  233. /package/lib/{catalog → v4/catalog}/CatalogHandler.js +0 -0
  234. /package/lib/{controls → v4/controls}/AbstractControls.js +0 -0
  235. /package/lib/{controls → v4/controls}/ControlsHandler.d.ts +0 -0
  236. /package/lib/{controls → v4/controls}/ControlsHandler.js +0 -0
  237. /package/lib/{controls → v4/controls}/codeEditor/MonacoEditor.js +0 -0
  238. /package/lib/{controls → v4/controls}/geojsoneditor/GeoEditor.js +0 -0
  239. /package/lib/{controls → v4/controls}/jsoneditor/JsonEditor.js +0 -0
  240. /package/lib/{controls → v4/controls}/markdown/ToastUiEditor.js +0 -0
  241. /package/lib/{controls → v4/controls}/table/Handsontable.js +0 -0
  242. /package/lib/{controls → v4/controls}/wysiwyg/CKeditor.js +0 -0
  243. /package/lib/{inertia → v4/inertia}/flash.d.ts +0 -0
  244. /package/lib/{inertia → v4/inertia}/flash.js +0 -0
  245. /package/lib/{inertia → v4/inertia}/inertiaAdapter.d.ts +0 -0
  246. /package/lib/{widgets → v4/widgets}/abstractAction.js +0 -0
  247. /package/lib/{widgets → v4/widgets}/abstractLink.js +0 -0
  248. /package/lib/{widgets → v4/widgets}/abstractSwitch.js +0 -0
  249. /package/lib/{widgets → v4/widgets}/abstractWidgetBase.js +0 -0
@@ -1,6 +1,6 @@
1
- import{r as C,j as o}from"./app.js";import{c as p}from"./compiler-runtime-tM4jBQ-T.js";import{S as T}from"./index-DrWfGwtf.js";import{c as R,B as L}from"./button-CQ9t1kLz.js";import{c as b}from"./utils-DjqsqOe8.js";import{R as K,a as P,D as H,b as W,P as G,C as V,X as q,O as X}from"./index-DTRTjOmh.js";import{c as F,b as U,a as Y,T as J}from"./tooltip-D2ehgLlB.js";import{c as Q}from"./createLucideIcon-BFG25zNo.js";/**
1
+ import{r as C,j as o}from"./app.js";import{c as p}from"./compiler-runtime-CMDe02AS.js";import{S as T}from"./index-HZzILD42.js";import{c as R,B as L}from"./button-DleSKY4-.js";import{c as b}from"./utils-DjqsqOe8.js";import{R as K,T as P,D as H,C as W,P as G,a as V,X as q,O as X}from"./index-BpVWRzP4.js";import{c as F,b as U,a as Y,T as J}from"./tooltip-BlR1mf2V.js";import{c as Q}from"./createLucideIcon-BFG25zNo.js";/**
2
2
  * @license lucide-react v0.485.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const Z=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],ee=Q("panel-left",Z),O=768;function te(){const l=p.c(2),[e,t]=C.useState(void 0);let a,s;return l[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{const i=window.matchMedia(`(max-width: ${O-1}px)`),r=()=>{t(window.innerWidth<O)};return i.addEventListener("change",r),t(window.innerWidth<O),()=>i.removeEventListener("change",r)},s=[],l[0]=a,l[1]=s):(a=l[0],s=l[1]),C.useEffect(a,s),!!e}function ae(l){const e=p.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=o.jsx(K,{"data-slot":"sheet",...t}),e[2]=t,e[3]=a):a=e[3],a}function se(l){const e=p.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=o.jsx(G,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function ie(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("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-[1002] bg-black/50",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx(X,{"data-slot":"sheet-overlay",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function le(l){const e=p.c(17);let t,a,s,i;e[0]!==l?({className:a,children:t,side:i,...s}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=s,e[4]=i):(t=e[1],a=e[2],s=e[3],i=e[4]);const r=i===void 0?"right":i;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(ie,{}),e[5]=d):d=e[5];const n=r==="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",f=r==="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",h=r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",v=r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let c;e[6]!==a||e[7]!==n||e[8]!==f||e[9]!==h||e[10]!==v?(c=b("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",n,f,h,v,a),e[6]=a,e[7]=n,e[8]=f,e[9]=h,e[10]=v,e[11]=c):c=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsxs(V,{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:[o.jsx(q,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=u):u=e[12];let g;return e[13]!==t||e[14]!==s||e[15]!==c?(g=o.jsxs(se,{children:[d,o.jsxs(W,{"data-slot":"sheet-content",className:c,...s,children:[t,u]})]}),e[13]=t,e[14]=s,e[15]=c,e[16]=g):g=e[16],g}function oe(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("div",{"data-slot":"sheet-header",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function ne(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("text-foreground font-semibold",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx(P,{"data-slot":"sheet-title",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function re(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx(H,{"data-slot":"sheet-description",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}const de="sidebar_state",ce=60*60*24*7,fe="16rem",ue="18rem",be="3rem",pe="b",B=C.createContext(null);function A(){const l=C.useContext(B);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function ye({defaultOpen:l=!0,open:e,onOpenChange:t,className:a,style:s,children:i,...r}){const d=te(),[n,f]=C.useState(!1),[h,v]=C.useState(l),c=e??h,u=C.useCallback(m=>{const x=typeof m=="function"?m(c):m;t?t(x):v(x),document.cookie=`${de}=${x}; path=/; max-age=${ce}`},[t,c]),g=C.useCallback(()=>d?f(m=>!m):u(m=>!m),[d,u,f]);C.useEffect(()=>{const m=x=>{x.key===pe&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),g())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[g]);const E=c?"expanded":"collapsed",N=C.useMemo(()=>({state:E,open:c,setOpen:u,isMobile:d,openMobile:n,setOpenMobile:f,toggleSidebar:g}),[E,c,u,d,n,f,g]);return o.jsx(B.Provider,{value:N,children:o.jsx(J,{delayDuration:0,children:o.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":fe,"--sidebar-width-icon":be,...s},className:b("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",a),...r,children:i})})})}function _e(l){const e=p.c(46);let t,a,s,i,r,d;e[0]!==l?({side:i,variant:r,collapsible:d,className:a,children:t,...s}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=s,e[4]=i,e[5]=r,e[6]=d):(t=e[1],a=e[2],s=e[3],i=e[4],r=e[5],d=e[6]);const n=i===void 0?"left":i,f=r===void 0?"sidebar":r,h=d===void 0?"offcanvas":d,{isMobile:v,state:c,openMobile:u,setOpenMobile:g}=A();if(h==="none"){let y;e[7]!==a?(y=b("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),e[7]=a,e[8]=y):y=e[8];let $;return e[9]!==t||e[10]!==s||e[11]!==y?($=o.jsx("div",{"data-slot":"sidebar",className:y,...s,children:t}),e[9]=t,e[10]=s,e[11]=y,e[12]=$):$=e[12],$}if(v){let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y={"--sidebar-width":ue},e[13]=y):y=e[13];let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=o.jsxs(oe,{className:"sr-only",children:[o.jsx(ne,{children:"Sidebar"}),o.jsx(re,{children:"Displays the mobile sidebar."})]}),e[14]=$):$=e[14];let I;e[15]!==t?(I=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[15]=t,e[16]=I):I=e[16];let k;e[17]!==n||e[18]!==I?(k=o.jsxs(le,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden z-[1002]",style:y,side:n,children:[$,I]}),e[17]=n,e[18]=I,e[19]=k):k=e[19];let D;return e[20]!==u||e[21]!==s||e[22]!==g||e[23]!==k?(D=o.jsx(ae,{open:u,onOpenChange:g,...s,children:k}),e[20]=u,e[21]=s,e[22]=g,e[23]=k,e[24]=D):D=e[24],D}const E=c==="collapsed"?h:"",N=f==="floating"||f==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let m;e[25]!==N?(m=b("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",N),e[25]=N,e[26]=m):m=e[26];let x;e[27]!==m?(x=o.jsx("div",{"data-slot":"sidebar-gap",className:m}),e[27]=m,e[28]=x):x=e[28];const _=n==="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)]",M=f==="floating"||f==="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";let w;e[29]!==a||e[30]!==_||e[31]!==M?(w=b("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",_,M,a),e[29]=a,e[30]=_,e[31]=M,e[32]=w):w=e[32];let S;e[33]!==t?(S=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar 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:t}),e[33]=t,e[34]=S):S=e[34];let j;e[35]!==s||e[36]!==w||e[37]!==S?(j=o.jsx("div",{"data-slot":"sidebar-container",className:w,...s,children:S}),e[35]=s,e[36]=w,e[37]=S,e[38]=j):j=e[38];let z;return e[39]!==n||e[40]!==c||e[41]!==j||e[42]!==E||e[43]!==x||e[44]!==f?(z=o.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":c,"data-collapsible":E,"data-variant":f,"data-side":n,"data-slot":"sidebar",children:[x,j]}),e[39]=n,e[40]=c,e[41]=j,e[42]=E,e[43]=x,e[44]=f,e[45]=z):z=e[45],z}function Ce(l){const e=p.c(15);let t,a,s;e[0]!==l?({className:t,onClick:a,...s}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=s):(t=e[1],a=e[2],s=e[3]);const{toggleSidebar:i}=A();let r;e[4]!==t?(r=b("size-7",t),e[4]=t,e[5]=r):r=e[5];let d;e[6]!==a||e[7]!==i?(d=v=>{a==null||a(v),i()},e[6]=a,e[7]=i,e[8]=d):d=e[8];let n,f;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(ee,{}),f=o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=n,e[10]=f):(n=e[9],f=e[10]);let h;return e[11]!==s||e[12]!==r||e[13]!==d?(h=o.jsxs(L,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:r,onClick:d,...s,children:[n,f]}),e[11]=s,e[12]=r,e[13]=d,e[14]=h):h=e[14],h}function $e(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("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",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("main",{"data-slot":"sidebar-inset",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function Ee(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function Me(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function Ie(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function ke(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("relative flex w-full min-w-0 flex-col p-2",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function ze(l){const e=p.c(10);let t,a,s;e[0]!==l?({className:t,asChild:s,...a}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=s):(t=e[1],a=e[2],s=e[3]);const r=(s===void 0?!1:s)?T:"div";let d;e[4]!==t?(d=b("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",t),e[4]=t,e[5]=d):d=e[5];let n;return e[6]!==r||e[7]!==a||e[8]!==d?(n=o.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:d,...a}),e[6]=r,e[7]=a,e[8]=d,e[9]=n):n=e[9],n}function De(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("w-full text-sm",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function Oe(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex w-full min-w-0 flex-col gap-1",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function Te(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("group/menu-item relative",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}const me=R("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 Ae(l){const e=p.c(28);let t,a,s,i,r,d,n;e[0]!==l?({asChild:s,isActive:i,variant:r,size:d,tooltip:n,className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=s,e[4]=i,e[5]=r,e[6]=d,e[7]=n):(t=e[1],a=e[2],s=e[3],i=e[4],r=e[5],d=e[6],n=e[7]);const f=s===void 0?!1:s,h=i===void 0?!1:i,v=r===void 0?"default":r,c=d===void 0?"default":d,u=f?T:"button",{isMobile:g,state:E}=A();let N;e[8]!==t||e[9]!==c||e[10]!==v?(N=b(me({variant:v,size:c}),t),e[8]=t,e[9]=c,e[10]=v,e[11]=N):N=e[11];let m;e[12]!==u||e[13]!==h||e[14]!==a||e[15]!==c||e[16]!==N?(m=o.jsx(u,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":h,className:N,...a}),e[12]=u,e[13]=h,e[14]=a,e[15]=c,e[16]=N,e[17]=m):m=e[17];const x=m;if(!n)return x;if(typeof n=="string"){let j;e[18]!==n?(j={children:n},e[18]=n,e[19]=j):j=e[19],n=j}let _;e[20]!==x?(_=o.jsx(U,{asChild:!0,children:x}),e[20]=x,e[21]=_):_=e[21];const M=E!=="collapsed"||g;let w;e[22]!==M||e[23]!==n?(w=o.jsx(F,{side:"right",align:"center",hidden:M,...n}),e[22]=M,e[23]=n,e[24]=w):w=e[24];let S;return e[25]!==_||e[26]!==w?(S=o.jsxs(Y,{children:[_,w]}),e[25]=_,e[26]=w,e[27]=S):S=e[27],S}function Be(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function Re(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("group/menu-sub-item relative",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function Le(l){const e=p.c(16);let t,a,s,i,r;e[0]!==l?({asChild:s,size:i,isActive:r,className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=s,e[4]=i,e[5]=r):(t=e[1],a=e[2],s=e[3],i=e[4],r=e[5]);const d=s===void 0?!1:s,n=i===void 0?"md":i,f=r===void 0?!1:r,h=d?T:"a",v=n==="sm"&&"text-xs",c=n==="md"&&"text-sm";let u;e[6]!==t||e[7]!==v||e[8]!==c?(u=b("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",v,c,"group-data-[collapsible=icon]:hidden",t),e[6]=t,e[7]=v,e[8]=c,e[9]=u):u=e[9];let g;return e[10]!==h||e[11]!==f||e[12]!==a||e[13]!==n||e[14]!==u?(g=o.jsx(h,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":n,"data-active":f,className:u,...a}),e[10]=h,e[11]=f,e[12]=a,e[13]=n,e[14]=u,e[15]=g):g=e[15],g}export{$e as S,ye as a,Ce as b,Ee as c,Oe as d,Te as e,Ie as f,Ae as g,Be as h,Re as i,Le as j,ke as k,Me as l,_e as m,ze as n,te as o,De as p,A as u};
6
+ */const Z=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],ee=Q("panel-left",Z),O=768;function te(){const l=p.c(2),[e,t]=C.useState(void 0);let a,s;return l[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{const i=window.matchMedia(`(max-width: ${O-1}px)`),r=()=>{t(window.innerWidth<O)};return i.addEventListener("change",r),t(window.innerWidth<O),()=>i.removeEventListener("change",r)},s=[],l[0]=a,l[1]=s):(a=l[0],s=l[1]),C.useEffect(a,s),!!e}function ae(l){const e=p.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=o.jsx(K,{"data-slot":"sheet",...t}),e[2]=t,e[3]=a):a=e[3],a}function se(l){const e=p.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=o.jsx(G,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function ie(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("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-[1002] bg-black/50",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx(X,{"data-slot":"sheet-overlay",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function le(l){const e=p.c(17);let t,a,s,i;e[0]!==l?({className:a,children:t,side:i,...s}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=s,e[4]=i):(t=e[1],a=e[2],s=e[3],i=e[4]);const r=i===void 0?"right":i;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(ie,{}),e[5]=d):d=e[5];const n=r==="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",f=r==="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",h=r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",v=r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let c;e[6]!==a||e[7]!==n||e[8]!==f||e[9]!==h||e[10]!==v?(c=b("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",n,f,h,v,a),e[6]=a,e[7]=n,e[8]=f,e[9]=h,e[10]=v,e[11]=c):c=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsxs(V,{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:[o.jsx(q,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=u):u=e[12];let g;return e[13]!==t||e[14]!==s||e[15]!==c?(g=o.jsxs(se,{children:[d,o.jsxs(W,{"data-slot":"sheet-content",className:c,...s,children:[t,u]})]}),e[13]=t,e[14]=s,e[15]=c,e[16]=g):g=e[16],g}function oe(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("div",{"data-slot":"sheet-header",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function ne(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("text-foreground font-semibold",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx(P,{"data-slot":"sheet-title",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function re(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx(H,{"data-slot":"sheet-description",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}const de="sidebar_state",ce=60*60*24*7,fe="16rem",ue="18rem",be="3rem",pe="b",B=C.createContext(null);function A(){const l=C.useContext(B);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function ye({defaultOpen:l=!0,open:e,onOpenChange:t,className:a,style:s,children:i,...r}){const d=te(),[n,f]=C.useState(!1),[h,v]=C.useState(l),c=e??h,u=C.useCallback(m=>{const x=typeof m=="function"?m(c):m;t?t(x):v(x),document.cookie=`${de}=${x}; path=/; max-age=${ce}`},[t,c]),g=C.useCallback(()=>d?f(m=>!m):u(m=>!m),[d,u,f]);C.useEffect(()=>{const m=x=>{x.key===pe&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),g())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[g]);const E=c?"expanded":"collapsed",N=C.useMemo(()=>({state:E,open:c,setOpen:u,isMobile:d,openMobile:n,setOpenMobile:f,toggleSidebar:g}),[E,c,u,d,n,f,g]);return o.jsx(B.Provider,{value:N,children:o.jsx(J,{delayDuration:0,children:o.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":fe,"--sidebar-width-icon":be,...s},className:b("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",a),...r,children:i})})})}function _e(l){const e=p.c(46);let t,a,s,i,r,d;e[0]!==l?({side:i,variant:r,collapsible:d,className:a,children:t,...s}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=s,e[4]=i,e[5]=r,e[6]=d):(t=e[1],a=e[2],s=e[3],i=e[4],r=e[5],d=e[6]);const n=i===void 0?"left":i,f=r===void 0?"sidebar":r,h=d===void 0?"offcanvas":d,{isMobile:v,state:c,openMobile:u,setOpenMobile:g}=A();if(h==="none"){let y;e[7]!==a?(y=b("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",a),e[7]=a,e[8]=y):y=e[8];let $;return e[9]!==t||e[10]!==s||e[11]!==y?($=o.jsx("div",{"data-slot":"sidebar",className:y,...s,children:t}),e[9]=t,e[10]=s,e[11]=y,e[12]=$):$=e[12],$}if(v){let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y={"--sidebar-width":ue},e[13]=y):y=e[13];let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=o.jsxs(oe,{className:"sr-only",children:[o.jsx(ne,{children:"Sidebar"}),o.jsx(re,{children:"Displays the mobile sidebar."})]}),e[14]=$):$=e[14];let I;e[15]!==t?(I=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[15]=t,e[16]=I):I=e[16];let k;e[17]!==n||e[18]!==I?(k=o.jsxs(le,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden z-[1002]",style:y,side:n,children:[$,I]}),e[17]=n,e[18]=I,e[19]=k):k=e[19];let D;return e[20]!==u||e[21]!==s||e[22]!==g||e[23]!==k?(D=o.jsx(ae,{open:u,onOpenChange:g,...s,children:k}),e[20]=u,e[21]=s,e[22]=g,e[23]=k,e[24]=D):D=e[24],D}const E=c==="collapsed"?h:"",N=f==="floating"||f==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let m;e[25]!==N?(m=b("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",N),e[25]=N,e[26]=m):m=e[26];let x;e[27]!==m?(x=o.jsx("div",{"data-slot":"sidebar-gap",className:m}),e[27]=m,e[28]=x):x=e[28];const _=n==="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)]",M=f==="floating"||f==="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";let w;e[29]!==a||e[30]!==_||e[31]!==M?(w=b("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",_,M,a),e[29]=a,e[30]=_,e[31]=M,e[32]=w):w=e[32];let S;e[33]!==t?(S=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar 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:t}),e[33]=t,e[34]=S):S=e[34];let j;e[35]!==s||e[36]!==w||e[37]!==S?(j=o.jsx("div",{"data-slot":"sidebar-container",className:w,...s,children:S}),e[35]=s,e[36]=w,e[37]=S,e[38]=j):j=e[38];let z;return e[39]!==n||e[40]!==c||e[41]!==j||e[42]!==E||e[43]!==x||e[44]!==f?(z=o.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":c,"data-collapsible":E,"data-variant":f,"data-side":n,"data-slot":"sidebar",children:[x,j]}),e[39]=n,e[40]=c,e[41]=j,e[42]=E,e[43]=x,e[44]=f,e[45]=z):z=e[45],z}function Ce(l){const e=p.c(15);let t,a,s;e[0]!==l?({className:t,onClick:a,...s}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=s):(t=e[1],a=e[2],s=e[3]);const{toggleSidebar:i}=A();let r;e[4]!==t?(r=b("size-7",t),e[4]=t,e[5]=r):r=e[5];let d;e[6]!==a||e[7]!==i?(d=v=>{a==null||a(v),i()},e[6]=a,e[7]=i,e[8]=d):d=e[8];let n,f;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(ee,{}),f=o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=n,e[10]=f):(n=e[9],f=e[10]);let h;return e[11]!==s||e[12]!==r||e[13]!==d?(h=o.jsxs(L,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:r,onClick:d,...s,children:[n,f]}),e[11]=s,e[12]=r,e[13]=d,e[14]=h):h=e[14],h}function $e(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("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",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("main",{"data-slot":"sidebar-inset",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function Ee(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function Me(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function Ie(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function ke(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("relative flex w-full min-w-0 flex-col p-2",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function ze(l){const e=p.c(10);let t,a,s;e[0]!==l?({className:t,asChild:s,...a}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=s):(t=e[1],a=e[2],s=e[3]);const r=(s===void 0?!1:s)?T:"div";let d;e[4]!==t?(d=b("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",t),e[4]=t,e[5]=d):d=e[5];let n;return e[6]!==r||e[7]!==a||e[8]!==d?(n=o.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:d,...a}),e[6]=r,e[7]=a,e[8]=d,e[9]=n):n=e[9],n}function De(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("w-full text-sm",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function Oe(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("flex w-full min-w-0 flex-col gap-1",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function Te(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("group/menu-item relative",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}const me=R("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 Ae(l){const e=p.c(28);let t,a,s,i,r,d,n;e[0]!==l?({asChild:s,isActive:i,variant:r,size:d,tooltip:n,className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=s,e[4]=i,e[5]=r,e[6]=d,e[7]=n):(t=e[1],a=e[2],s=e[3],i=e[4],r=e[5],d=e[6],n=e[7]);const f=s===void 0?!1:s,h=i===void 0?!1:i,v=r===void 0?"default":r,c=d===void 0?"default":d,u=f?T:"button",{isMobile:g,state:E}=A();let N;e[8]!==t||e[9]!==c||e[10]!==v?(N=b(me({variant:v,size:c}),t),e[8]=t,e[9]=c,e[10]=v,e[11]=N):N=e[11];let m;e[12]!==u||e[13]!==h||e[14]!==a||e[15]!==c||e[16]!==N?(m=o.jsx(u,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":h,className:N,...a}),e[12]=u,e[13]=h,e[14]=a,e[15]=c,e[16]=N,e[17]=m):m=e[17];const x=m;if(!n)return x;if(typeof n=="string"){let j;e[18]!==n?(j={children:n},e[18]=n,e[19]=j):j=e[19],n=j}let _;e[20]!==x?(_=o.jsx(U,{asChild:!0,children:x}),e[20]=x,e[21]=_):_=e[21];const M=E!=="collapsed"||g;let w;e[22]!==M||e[23]!==n?(w=o.jsx(F,{side:"right",align:"center",hidden:M,...n}),e[22]=M,e[23]=n,e[24]=w):w=e[24];let S;return e[25]!==_||e[26]!==w?(S=o.jsxs(Y,{children:[_,w]}),e[25]=_,e[26]=w,e[27]=S):S=e[27],S}function Be(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function Re(l){const e=p.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=b("group/menu-sub-item relative",t),e[3]=t,e[4]=s):s=e[4];let i;return e[5]!==a||e[6]!==s?(i=o.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:s,...a}),e[5]=a,e[6]=s,e[7]=i):i=e[7],i}function Le(l){const e=p.c(16);let t,a,s,i,r;e[0]!==l?({asChild:s,size:i,isActive:r,className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=s,e[4]=i,e[5]=r):(t=e[1],a=e[2],s=e[3],i=e[4],r=e[5]);const d=s===void 0?!1:s,n=i===void 0?"md":i,f=r===void 0?!1:r,h=d?T:"a",v=n==="sm"&&"text-xs",c=n==="md"&&"text-sm";let u;e[6]!==t||e[7]!==v||e[8]!==c?(u=b("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",v,c,"group-data-[collapsible=icon]:hidden",t),e[6]=t,e[7]=v,e[8]=c,e[9]=u):u=e[9];let g;return e[10]!==h||e[11]!==f||e[12]!==a||e[13]!==n||e[14]!==u?(g=o.jsx(h,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":n,"data-active":f,className:u,...a}),e[10]=h,e[11]=f,e[12]=a,e[13]=n,e[14]=u,e[15]=g):g=e[15],g}export{$e as S,ye as a,Ce as b,Be as c,Ee as d,Oe as e,Te as f,Ie as g,Ae as h,Re as i,Le as j,ke as k,Me as l,_e as m,ze as n,te as o,De as p,A as u};
@@ -0,0 +1 @@
1
+ import{j as a}from"./app.js";import{c as m}from"./compiler-runtime-CMDe02AS.js";import{c as i}from"./utils-DjqsqOe8.js";function f(r){const e=m.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-accent animate-pulse rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=a.jsx("div",{"data-slot":"skeleton",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{f as S};
@@ -1 +1 @@
1
- import{W as o,R as Ut,r as mt,j as Xt}from"./app.js";import{c as Kt}from"./compiler-runtime-tM4jBQ-T.js";function qt(n){if(typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",a.appendChild(e),e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}const Gt=n=>{switch(n){case"success":return Zt;case"info":return ee;case"warning":return te;case"error":return ae;default:return null}},Jt=Array(12).fill(0),Qt=({visible:n,className:a})=>o.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":n},o.createElement("div",{className:"sonner-spinner"},Jt.map((e,s)=>o.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),Zt=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),te=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ee=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),ae=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),oe=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},o.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),se=()=>{const[n,a]=o.useState(document.hidden);return o.useEffect(()=>{const e=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),n};let xt=1;class ne{constructor(){this.subscribe=a=>(this.subscribers.push(a),()=>{const e=this.subscribers.indexOf(a);this.subscribers.splice(e,1)}),this.publish=a=>{this.subscribers.forEach(e=>e(a))},this.addToast=a=>{this.publish(a),this.toasts=[...this.toasts,a]},this.create=a=>{var e;const{message:s,...E}=a,l=typeof(a==null?void 0:a.id)=="number"||((e=a.id)==null?void 0:e.length)>0?a.id:xt++,u=this.toasts.find(m=>m.id===l),v=a.dismissible===void 0?!0:a.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),u?this.toasts=this.toasts.map(m=>m.id===l?(this.publish({...m,...a,id:l,title:s}),{...m,...a,id:l,dismissible:v,title:s}):m):this.addToast({title:s,...E,dismissible:v,id:l}),l},this.dismiss=a=>(a?(this.dismissedToasts.add(a),requestAnimationFrame(()=>this.subscribers.forEach(e=>e({id:a,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(s=>s({id:e.id,dismiss:!0}))}),a),this.message=(a,e)=>this.create({...e,message:a}),this.error=(a,e)=>this.create({...e,message:a,type:"error"}),this.success=(a,e)=>this.create({...e,type:"success",message:a}),this.info=(a,e)=>this.create({...e,type:"info",message:a}),this.warning=(a,e)=>this.create({...e,type:"warning",message:a}),this.loading=(a,e)=>this.create({...e,type:"loading",message:a}),this.promise=(a,e)=>{if(!e)return;let s;e.loading!==void 0&&(s=this.create({...e,promise:a,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));const E=Promise.resolve(a instanceof Function?a():a);let l=s!==void 0,u;const v=E.then(async i=>{if(u=["resolve",i],o.isValidElement(i))l=!1,this.create({id:s,type:"default",message:i});else if(ie(i)&&!i.ok){l=!1;const t=typeof e.error=="function"?await e.error(`HTTP error! status: ${i.status}`):e.error,R=typeof e.description=="function"?await e.description(`HTTP error! status: ${i.status}`):e.description,y=typeof t=="object"&&!o.isValidElement(t)?t:{message:t};this.create({id:s,type:"error",description:R,...y})}else if(i instanceof Error){l=!1;const t=typeof e.error=="function"?await e.error(i):e.error,R=typeof e.description=="function"?await e.description(i):e.description,y=typeof t=="object"&&!o.isValidElement(t)?t:{message:t};this.create({id:s,type:"error",description:R,...y})}else if(e.success!==void 0){l=!1;const t=typeof e.success=="function"?await e.success(i):e.success,R=typeof e.description=="function"?await e.description(i):e.description,y=typeof t=="object"&&!o.isValidElement(t)?t:{message:t};this.create({id:s,type:"success",description:R,...y})}}).catch(async i=>{if(u=["reject",i],e.error!==void 0){l=!1;const x=typeof e.error=="function"?await e.error(i):e.error,t=typeof e.description=="function"?await e.description(i):e.description,g=typeof x=="object"&&!o.isValidElement(x)?x:{message:x};this.create({id:s,type:"error",description:t,...g})}}).finally(()=>{l&&(this.dismiss(s),s=void 0),e.finally==null||e.finally.call(e)}),m=()=>new Promise((i,x)=>v.then(()=>u[0]==="reject"?x(u[1]):i(u[1])).catch(x));return typeof s!="string"&&typeof s!="number"?{unwrap:m}:Object.assign(s,{unwrap:m})},this.custom=(a,e)=>{const s=(e==null?void 0:e.id)||xt++;return this.create({jsx:a(s),id:s,...e}),s},this.getActiveToasts=()=>this.toasts.filter(a=>!this.dismissedToasts.has(a.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const k=new ne,re=(n,a)=>{const e=(a==null?void 0:a.id)||xt++;return k.addToast({title:n,...a,id:e}),e},ie=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",le=re,de=()=>k.toasts,ce=()=>k.getActiveToasts(),De=Object.assign(le,{success:k.success,info:k.info,warning:k.warning,error:k.error,custom:k.custom,message:k.message,promise:k.promise,dismiss:k.dismiss,loading:k.loading},{getHistory:de,getToasts:ce});qt("[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}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@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%)}");function ft(n){return n.label!==void 0}const ue=3,fe="24px",me="16px",Mt=4e3,pe=356,ge=14,he=45,be=200;function L(...n){return n.filter(Boolean).join(" ")}function ve(n){const[a,e]=n.split("-"),s=[];return a&&s.push(a),e&&s.push(e),s}const ye=n=>{var a,e,s,E,l,u,v,m,i;const{invert:x,toast:t,unstyled:R,interacting:g,setHeights:y,visibleToasts:W,heights:c,index:D,toasts:nt,expanded:Q,removeToast:rt,defaultRichColors:I,closeButton:U,style:pt,cancelButtonStyle:it,actionButtonStyle:gt,className:lt="",descriptionClassName:j="",duration:X,position:Z,gap:ht,expandByDefault:z,classNames:d,icons:C,closeButtonAriaLabel:P="Close toast"}=n,[A,tt]=o.useState(null),[f,h]=o.useState(null),[p,B]=o.useState(!1),[F,b]=o.useState(!1),[et,K]=o.useState(!1),[at,ot]=o.useState(!1),[Ct,wt]=o.useState(!1),[At,bt]=o.useState(0),[Ht,Et]=o.useState(0),st=o.useRef(t.duration||X||Mt),Tt=o.useRef(null),$=o.useRef(null),Ot=D===0,zt=D+1<=W,N=t.type,q=t.dismissible!==!1,Lt=t.className||"",jt=t.descriptionClassName||"",dt=o.useMemo(()=>c.findIndex(r=>r.toastId===t.id)||0,[c,t.id]),Pt=o.useMemo(()=>{var r;return(r=t.closeButton)!=null?r:U},[t.closeButton,U]),St=o.useMemo(()=>t.duration||X||Mt,[t.duration,X]),vt=o.useRef(0),G=o.useRef(0),kt=o.useRef(0),J=o.useRef(null),[$t,Yt]=Z.split("-"),Nt=o.useMemo(()=>c.reduce((r,w,S)=>S>=dt?r:r+w.height,0),[c,dt]),_t=se(),Ft=t.invert||x,yt=N==="loading";G.current=o.useMemo(()=>dt*ht+Nt,[dt,Nt]),o.useEffect(()=>{st.current=St},[St]),o.useEffect(()=>{B(!0)},[]),o.useEffect(()=>{const r=$.current;if(r){const w=r.getBoundingClientRect().height;return Et(w),y(S=>[{toastId:t.id,height:w,position:t.position},...S]),()=>y(S=>S.filter(_=>_.toastId!==t.id))}},[y,t.id]),o.useLayoutEffect(()=>{if(!p)return;const r=$.current,w=r.style.height;r.style.height="auto";const S=r.getBoundingClientRect().height;r.style.height=w,Et(S),y(_=>_.find(T=>T.toastId===t.id)?_.map(T=>T.toastId===t.id?{...T,height:S}:T):[{toastId:t.id,height:S,position:t.position},..._])},[p,t.title,t.description,y,t.id]);const Y=o.useCallback(()=>{b(!0),bt(G.current),y(r=>r.filter(w=>w.toastId!==t.id)),setTimeout(()=>{rt(t)},be)},[t,rt,y,G]);o.useEffect(()=>{if(t.promise&&N==="loading"||t.duration===1/0||t.type==="loading")return;let r;return Q||g||_t?(()=>{if(kt.current<vt.current){const _=new Date().getTime()-vt.current;st.current=st.current-_}kt.current=new Date().getTime()})():(()=>{st.current!==1/0&&(vt.current=new Date().getTime(),r=setTimeout(()=>{t.onAutoClose==null||t.onAutoClose.call(t,t),Y()},st.current))})(),()=>clearTimeout(r)},[Q,g,t,N,_t,Y]),o.useEffect(()=>{t.delete&&Y()},[Y,t.delete]);function Vt(){var r;if(C!=null&&C.loading){var w;return o.createElement("div",{className:L(d==null?void 0:d.loader,t==null||(w=t.classNames)==null?void 0:w.loader,"sonner-loader"),"data-visible":N==="loading"},C.loading)}return o.createElement(Qt,{className:L(d==null?void 0:d.loader,t==null||(r=t.classNames)==null?void 0:r.loader),visible:N==="loading"})}const Wt=t.icon||(C==null?void 0:C[N])||Gt(N);var Rt,Dt;return o.createElement("li",{tabIndex:0,ref:$,className:L(lt,Lt,d==null?void 0:d.toast,t==null||(a=t.classNames)==null?void 0:a.toast,d==null?void 0:d.default,d==null?void 0:d[N],t==null||(e=t.classNames)==null?void 0:e[N]),"data-sonner-toast":"","data-rich-colors":(Rt=t.richColors)!=null?Rt:I,"data-styled":!(t.jsx||t.unstyled||R),"data-mounted":p,"data-promise":!!t.promise,"data-swiped":Ct,"data-removed":F,"data-visible":zt,"data-y-position":$t,"data-x-position":Yt,"data-index":D,"data-front":Ot,"data-swiping":et,"data-dismissible":q,"data-type":N,"data-invert":Ft,"data-swipe-out":at,"data-swipe-direction":f,"data-expanded":!!(Q||z&&p),style:{"--index":D,"--toasts-before":D,"--z-index":nt.length-D,"--offset":`${F?At:G.current}px`,"--initial-height":z?"auto":`${Ht}px`,...pt,...t.style},onDragEnd:()=>{K(!1),tt(null),J.current=null},onPointerDown:r=>{yt||!q||(Tt.current=new Date,bt(G.current),r.target.setPointerCapture(r.pointerId),r.target.tagName!=="BUTTON"&&(K(!0),J.current={x:r.clientX,y:r.clientY}))},onPointerUp:()=>{var r,w,S;if(at||!q)return;J.current=null;const _=Number(((r=$.current)==null?void 0:r.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ct=Number(((w=$.current)==null?void 0:w.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),T=new Date().getTime()-((S=Tt.current)==null?void 0:S.getTime()),M=A==="x"?_:ct,ut=Math.abs(M)/T;if(Math.abs(M)>=he||ut>.11){bt(G.current),t.onDismiss==null||t.onDismiss.call(t,t),h(A==="x"?_>0?"right":"left":ct>0?"down":"up"),Y(),ot(!0);return}else{var H,O;(H=$.current)==null||H.style.setProperty("--swipe-amount-x","0px"),(O=$.current)==null||O.style.setProperty("--swipe-amount-y","0px")}wt(!1),K(!1),tt(null)},onPointerMove:r=>{var w,S,_;if(!J.current||!q||((w=window.getSelection())==null?void 0:w.toString().length)>0)return;const T=r.clientY-J.current.y,M=r.clientX-J.current.x;var ut;const H=(ut=n.swipeDirections)!=null?ut:ve(Z);!A&&(Math.abs(M)>1||Math.abs(T)>1)&&tt(Math.abs(M)>Math.abs(T)?"x":"y");let O={x:0,y:0};const Bt=V=>1/(1.5+Math.abs(V)/20);if(A==="y"){if(H.includes("top")||H.includes("bottom"))if(H.includes("top")&&T<0||H.includes("bottom")&&T>0)O.y=T;else{const V=T*Bt(T);O.y=Math.abs(V)<Math.abs(T)?V:T}}else if(A==="x"&&(H.includes("left")||H.includes("right")))if(H.includes("left")&&M<0||H.includes("right")&&M>0)O.x=M;else{const V=M*Bt(M);O.x=Math.abs(V)<Math.abs(M)?V:M}(Math.abs(O.x)>0||Math.abs(O.y)>0)&&wt(!0),(S=$.current)==null||S.style.setProperty("--swipe-amount-x",`${O.x}px`),(_=$.current)==null||_.style.setProperty("--swipe-amount-y",`${O.y}px`)}},Pt&&!t.jsx&&N!=="loading"?o.createElement("button",{"aria-label":P,"data-disabled":yt,"data-close-button":!0,onClick:yt||!q?()=>{}:()=>{Y(),t.onDismiss==null||t.onDismiss.call(t,t)},className:L(d==null?void 0:d.closeButton,t==null||(s=t.classNames)==null?void 0:s.closeButton)},(Dt=C==null?void 0:C.close)!=null?Dt:oe):null,(N||t.icon||t.promise)&&t.icon!==null&&((C==null?void 0:C[N])!==null||t.icon)?o.createElement("div",{"data-icon":"",className:L(d==null?void 0:d.icon,t==null||(E=t.classNames)==null?void 0:E.icon)},t.promise||t.type==="loading"&&!t.icon?t.icon||Vt():null,t.type!=="loading"?Wt:null):null,o.createElement("div",{"data-content":"",className:L(d==null?void 0:d.content,t==null||(l=t.classNames)==null?void 0:l.content)},o.createElement("div",{"data-title":"",className:L(d==null?void 0:d.title,t==null||(u=t.classNames)==null?void 0:u.title)},t.jsx?t.jsx:typeof t.title=="function"?t.title():t.title),t.description?o.createElement("div",{"data-description":"",className:L(j,jt,d==null?void 0:d.description,t==null||(v=t.classNames)==null?void 0:v.description)},typeof t.description=="function"?t.description():t.description):null),o.isValidElement(t.cancel)?t.cancel:t.cancel&&ft(t.cancel)?o.createElement("button",{"data-button":!0,"data-cancel":!0,style:t.cancelButtonStyle||it,onClick:r=>{ft(t.cancel)&&q&&(t.cancel.onClick==null||t.cancel.onClick.call(t.cancel,r),Y())},className:L(d==null?void 0:d.cancelButton,t==null||(m=t.classNames)==null?void 0:m.cancelButton)},t.cancel.label):null,o.isValidElement(t.action)?t.action:t.action&&ft(t.action)?o.createElement("button",{"data-button":!0,"data-action":!0,style:t.actionButtonStyle||gt,onClick:r=>{ft(t.action)&&(t.action.onClick==null||t.action.onClick.call(t.action,r),!r.defaultPrevented&&Y())},className:L(d==null?void 0:d.actionButton,t==null||(i=t.classNames)==null?void 0:i.actionButton)},t.action.label):null)};function It(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function xe(n,a){const e={};return[n,a].forEach((s,E)=>{const l=E===1,u=l?"--mobile-offset":"--offset",v=l?me:fe;function m(i){["top","right","bottom","left"].forEach(x=>{e[`${u}-${x}`]=typeof i=="number"?`${i}px`:i})}typeof s=="number"||typeof s=="string"?m(s):typeof s=="object"?["top","right","bottom","left"].forEach(i=>{s[i]===void 0?e[`${u}-${i}`]=v:e[`${u}-${i}`]=typeof s[i]=="number"?`${s[i]}px`:s[i]}):m(v)}),e}const we=o.forwardRef(function(a,e){const{invert:s,position:E="bottom-right",hotkey:l=["altKey","KeyT"],expand:u,closeButton:v,className:m,offset:i,mobileOffset:x,theme:t="light",richColors:R,duration:g,style:y,visibleToasts:W=ue,toastOptions:c,dir:D=It(),gap:nt=ge,icons:Q,containerAriaLabel:rt="Notifications"}=a,[I,U]=o.useState([]),pt=o.useMemo(()=>Array.from(new Set([E].concat(I.filter(f=>f.position).map(f=>f.position)))),[I,E]),[it,gt]=o.useState([]),[lt,j]=o.useState(!1),[X,Z]=o.useState(!1),[ht,z]=o.useState(t!=="system"?t:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=o.useRef(null),C=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=o.useRef(null),A=o.useRef(!1),tt=o.useCallback(f=>{U(h=>{var p;return(p=h.find(B=>B.id===f.id))!=null&&p.delete||k.dismiss(f.id),h.filter(({id:B})=>B!==f.id)})},[]);return o.useEffect(()=>k.subscribe(f=>{if(f.dismiss){requestAnimationFrame(()=>{U(h=>h.map(p=>p.id===f.id?{...p,delete:!0}:p))});return}setTimeout(()=>{Ut.flushSync(()=>{U(h=>{const p=h.findIndex(B=>B.id===f.id);return p!==-1?[...h.slice(0,p),{...h[p],...f},...h.slice(p+1)]:[f,...h]})})})}),[I]),o.useEffect(()=>{if(t!=="system"){z(t);return}if(t==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;const f=window.matchMedia("(prefers-color-scheme: dark)");try{f.addEventListener("change",({matches:h})=>{z(h?"dark":"light")})}catch{f.addListener(({matches:p})=>{try{z(p?"dark":"light")}catch(B){console.error(B)}})}},[t]),o.useEffect(()=>{I.length<=1&&j(!1)},[I]),o.useEffect(()=>{const f=h=>{var p;if(l.every(b=>h[b]||h.code===b)){var F;j(!0),(F=d.current)==null||F.focus()}h.code==="Escape"&&(document.activeElement===d.current||(p=d.current)!=null&&p.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[l]),o.useEffect(()=>{if(d.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,A.current=!1)}},[d.current]),o.createElement("section",{ref:e,"aria-label":`${rt} ${C}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},pt.map((f,h)=>{var p;const[B,F]=f.split("-");return I.length?o.createElement("ol",{key:f,dir:D==="auto"?It():D,tabIndex:-1,ref:d,className:m,"data-sonner-toaster":!0,"data-sonner-theme":ht,"data-y-position":B,"data-lifted":lt&&I.length>1&&!u,"data-x-position":F,style:{"--front-toast-height":`${((p=it[0])==null?void 0:p.height)||0}px`,"--width":`${pe}px`,"--gap":`${nt}px`,...y,...xe(i,x)},onBlur:b=>{A.current&&!b.currentTarget.contains(b.relatedTarget)&&(A.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:b=>{b.target instanceof HTMLElement&&b.target.dataset.dismissible==="false"||A.current||(A.current=!0,P.current=b.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{X||j(!1)},onDragEnd:()=>j(!1),onPointerDown:b=>{b.target instanceof HTMLElement&&b.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},I.filter(b=>!b.position&&h===0||b.position===f).map((b,et)=>{var K,at;return o.createElement(ye,{key:b.id,icons:Q,index:et,toast:b,defaultRichColors:R,duration:(K=c==null?void 0:c.duration)!=null?K:g,className:c==null?void 0:c.className,descriptionClassName:c==null?void 0:c.descriptionClassName,invert:s,visibleToasts:W,closeButton:(at=c==null?void 0:c.closeButton)!=null?at:v,interacting:X,position:f,style:c==null?void 0:c.style,unstyled:c==null?void 0:c.unstyled,classNames:c==null?void 0:c.classNames,cancelButtonStyle:c==null?void 0:c.cancelButtonStyle,actionButtonStyle:c==null?void 0:c.actionButtonStyle,closeButtonAriaLabel:c==null?void 0:c.closeButtonAriaLabel,removeToast:tt,toasts:I.filter(ot=>ot.position==b.position),heights:it.filter(ot=>ot.position==b.position),setHeights:gt,expandByDefault:u,gap:nt,expanded:lt,swipeDirections:a.swipeDirections})})):null}))});var Ee=(n,a,e,s,E,l,u,v)=>{let m=document.documentElement,i=["light","dark"];function x(g){(Array.isArray(n)?n:[n]).forEach(y=>{let W=y==="class",c=W&&l?E.map(D=>l[D]||D):E;W?(m.classList.remove(...c),m.classList.add(l&&l[g]?l[g]:g)):m.setAttribute(y,g)}),t(g)}function t(g){v&&i.includes(g)&&(m.style.colorScheme=g)}function R(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)x(s);else try{let g=localStorage.getItem(a)||e,y=u&&g==="system"?R():g;x(y)}catch{}},Te=mt.createContext(void 0),Se={setTheme:n=>{},themes:[]},ke=()=>{var n;return(n=mt.useContext(Te))!=null?n:Se};mt.memo(({forcedTheme:n,storageKey:a,attribute:e,enableSystem:s,enableColorScheme:E,defaultTheme:l,value:u,themes:v,nonce:m,scriptProps:i})=>{let x=JSON.stringify([e,a,l,n,v,u,s,E]).slice(1,-1);return mt.createElement("script",{...i,suppressHydrationWarning:!0,nonce:typeof window>"u"?m:"",dangerouslySetInnerHTML:{__html:`(${Ee.toString()})(${x})`}})});const Be=n=>{const a=Kt.c(6);let e;a[0]!==n?({...e}=n,a[0]=n,a[1]=e):e=a[1];const{theme:s}=ke(),l=s===void 0?"system":s;let u;a[2]===Symbol.for("react.memo_cache_sentinel")?(u={"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},a[2]=u):u=a[2];let v;return a[3]!==e||a[4]!==l?(v=Xt.jsx(we,{theme:l,className:"toaster group",style:u,...e}),a[3]=e,a[4]=l,a[5]=v):v=a[5],v};export{Be as T,De as t};
1
+ import{W as o,R as Ut,r as mt,j as Xt}from"./app.js";import{c as Kt}from"./compiler-runtime-CMDe02AS.js";function qt(n){if(typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",a.appendChild(e),e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}const Gt=n=>{switch(n){case"success":return Zt;case"info":return ee;case"warning":return te;case"error":return ae;default:return null}},Jt=Array(12).fill(0),Qt=({visible:n,className:a})=>o.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":n},o.createElement("div",{className:"sonner-spinner"},Jt.map((e,s)=>o.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),Zt=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),te=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ee=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),ae=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),oe=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},o.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),se=()=>{const[n,a]=o.useState(document.hidden);return o.useEffect(()=>{const e=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),n};let xt=1;class ne{constructor(){this.subscribe=a=>(this.subscribers.push(a),()=>{const e=this.subscribers.indexOf(a);this.subscribers.splice(e,1)}),this.publish=a=>{this.subscribers.forEach(e=>e(a))},this.addToast=a=>{this.publish(a),this.toasts=[...this.toasts,a]},this.create=a=>{var e;const{message:s,...E}=a,l=typeof(a==null?void 0:a.id)=="number"||((e=a.id)==null?void 0:e.length)>0?a.id:xt++,u=this.toasts.find(m=>m.id===l),v=a.dismissible===void 0?!0:a.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),u?this.toasts=this.toasts.map(m=>m.id===l?(this.publish({...m,...a,id:l,title:s}),{...m,...a,id:l,dismissible:v,title:s}):m):this.addToast({title:s,...E,dismissible:v,id:l}),l},this.dismiss=a=>(a?(this.dismissedToasts.add(a),requestAnimationFrame(()=>this.subscribers.forEach(e=>e({id:a,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(s=>s({id:e.id,dismiss:!0}))}),a),this.message=(a,e)=>this.create({...e,message:a}),this.error=(a,e)=>this.create({...e,message:a,type:"error"}),this.success=(a,e)=>this.create({...e,type:"success",message:a}),this.info=(a,e)=>this.create({...e,type:"info",message:a}),this.warning=(a,e)=>this.create({...e,type:"warning",message:a}),this.loading=(a,e)=>this.create({...e,type:"loading",message:a}),this.promise=(a,e)=>{if(!e)return;let s;e.loading!==void 0&&(s=this.create({...e,promise:a,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));const E=Promise.resolve(a instanceof Function?a():a);let l=s!==void 0,u;const v=E.then(async i=>{if(u=["resolve",i],o.isValidElement(i))l=!1,this.create({id:s,type:"default",message:i});else if(ie(i)&&!i.ok){l=!1;const t=typeof e.error=="function"?await e.error(`HTTP error! status: ${i.status}`):e.error,R=typeof e.description=="function"?await e.description(`HTTP error! status: ${i.status}`):e.description,y=typeof t=="object"&&!o.isValidElement(t)?t:{message:t};this.create({id:s,type:"error",description:R,...y})}else if(i instanceof Error){l=!1;const t=typeof e.error=="function"?await e.error(i):e.error,R=typeof e.description=="function"?await e.description(i):e.description,y=typeof t=="object"&&!o.isValidElement(t)?t:{message:t};this.create({id:s,type:"error",description:R,...y})}else if(e.success!==void 0){l=!1;const t=typeof e.success=="function"?await e.success(i):e.success,R=typeof e.description=="function"?await e.description(i):e.description,y=typeof t=="object"&&!o.isValidElement(t)?t:{message:t};this.create({id:s,type:"success",description:R,...y})}}).catch(async i=>{if(u=["reject",i],e.error!==void 0){l=!1;const x=typeof e.error=="function"?await e.error(i):e.error,t=typeof e.description=="function"?await e.description(i):e.description,g=typeof x=="object"&&!o.isValidElement(x)?x:{message:x};this.create({id:s,type:"error",description:t,...g})}}).finally(()=>{l&&(this.dismiss(s),s=void 0),e.finally==null||e.finally.call(e)}),m=()=>new Promise((i,x)=>v.then(()=>u[0]==="reject"?x(u[1]):i(u[1])).catch(x));return typeof s!="string"&&typeof s!="number"?{unwrap:m}:Object.assign(s,{unwrap:m})},this.custom=(a,e)=>{const s=(e==null?void 0:e.id)||xt++;return this.create({jsx:a(s),id:s,...e}),s},this.getActiveToasts=()=>this.toasts.filter(a=>!this.dismissedToasts.has(a.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const k=new ne,re=(n,a)=>{const e=(a==null?void 0:a.id)||xt++;return k.addToast({title:n,...a,id:e}),e},ie=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",le=re,de=()=>k.toasts,ce=()=>k.getActiveToasts(),De=Object.assign(le,{success:k.success,info:k.info,warning:k.warning,error:k.error,custom:k.custom,message:k.message,promise:k.promise,dismiss:k.dismiss,loading:k.loading},{getHistory:de,getToasts:ce});qt("[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}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@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%)}");function ft(n){return n.label!==void 0}const ue=3,fe="24px",me="16px",Mt=4e3,pe=356,ge=14,he=45,be=200;function L(...n){return n.filter(Boolean).join(" ")}function ve(n){const[a,e]=n.split("-"),s=[];return a&&s.push(a),e&&s.push(e),s}const ye=n=>{var a,e,s,E,l,u,v,m,i;const{invert:x,toast:t,unstyled:R,interacting:g,setHeights:y,visibleToasts:W,heights:c,index:D,toasts:nt,expanded:Q,removeToast:rt,defaultRichColors:I,closeButton:U,style:pt,cancelButtonStyle:it,actionButtonStyle:gt,className:lt="",descriptionClassName:j="",duration:X,position:Z,gap:ht,expandByDefault:z,classNames:d,icons:C,closeButtonAriaLabel:P="Close toast"}=n,[A,tt]=o.useState(null),[f,h]=o.useState(null),[p,B]=o.useState(!1),[F,b]=o.useState(!1),[et,K]=o.useState(!1),[at,ot]=o.useState(!1),[Ct,wt]=o.useState(!1),[At,bt]=o.useState(0),[Ht,Et]=o.useState(0),st=o.useRef(t.duration||X||Mt),Tt=o.useRef(null),$=o.useRef(null),Ot=D===0,zt=D+1<=W,N=t.type,q=t.dismissible!==!1,Lt=t.className||"",jt=t.descriptionClassName||"",dt=o.useMemo(()=>c.findIndex(r=>r.toastId===t.id)||0,[c,t.id]),Pt=o.useMemo(()=>{var r;return(r=t.closeButton)!=null?r:U},[t.closeButton,U]),St=o.useMemo(()=>t.duration||X||Mt,[t.duration,X]),vt=o.useRef(0),G=o.useRef(0),kt=o.useRef(0),J=o.useRef(null),[$t,Yt]=Z.split("-"),Nt=o.useMemo(()=>c.reduce((r,w,S)=>S>=dt?r:r+w.height,0),[c,dt]),_t=se(),Ft=t.invert||x,yt=N==="loading";G.current=o.useMemo(()=>dt*ht+Nt,[dt,Nt]),o.useEffect(()=>{st.current=St},[St]),o.useEffect(()=>{B(!0)},[]),o.useEffect(()=>{const r=$.current;if(r){const w=r.getBoundingClientRect().height;return Et(w),y(S=>[{toastId:t.id,height:w,position:t.position},...S]),()=>y(S=>S.filter(_=>_.toastId!==t.id))}},[y,t.id]),o.useLayoutEffect(()=>{if(!p)return;const r=$.current,w=r.style.height;r.style.height="auto";const S=r.getBoundingClientRect().height;r.style.height=w,Et(S),y(_=>_.find(T=>T.toastId===t.id)?_.map(T=>T.toastId===t.id?{...T,height:S}:T):[{toastId:t.id,height:S,position:t.position},..._])},[p,t.title,t.description,y,t.id]);const Y=o.useCallback(()=>{b(!0),bt(G.current),y(r=>r.filter(w=>w.toastId!==t.id)),setTimeout(()=>{rt(t)},be)},[t,rt,y,G]);o.useEffect(()=>{if(t.promise&&N==="loading"||t.duration===1/0||t.type==="loading")return;let r;return Q||g||_t?(()=>{if(kt.current<vt.current){const _=new Date().getTime()-vt.current;st.current=st.current-_}kt.current=new Date().getTime()})():(()=>{st.current!==1/0&&(vt.current=new Date().getTime(),r=setTimeout(()=>{t.onAutoClose==null||t.onAutoClose.call(t,t),Y()},st.current))})(),()=>clearTimeout(r)},[Q,g,t,N,_t,Y]),o.useEffect(()=>{t.delete&&Y()},[Y,t.delete]);function Vt(){var r;if(C!=null&&C.loading){var w;return o.createElement("div",{className:L(d==null?void 0:d.loader,t==null||(w=t.classNames)==null?void 0:w.loader,"sonner-loader"),"data-visible":N==="loading"},C.loading)}return o.createElement(Qt,{className:L(d==null?void 0:d.loader,t==null||(r=t.classNames)==null?void 0:r.loader),visible:N==="loading"})}const Wt=t.icon||(C==null?void 0:C[N])||Gt(N);var Rt,Dt;return o.createElement("li",{tabIndex:0,ref:$,className:L(lt,Lt,d==null?void 0:d.toast,t==null||(a=t.classNames)==null?void 0:a.toast,d==null?void 0:d.default,d==null?void 0:d[N],t==null||(e=t.classNames)==null?void 0:e[N]),"data-sonner-toast":"","data-rich-colors":(Rt=t.richColors)!=null?Rt:I,"data-styled":!(t.jsx||t.unstyled||R),"data-mounted":p,"data-promise":!!t.promise,"data-swiped":Ct,"data-removed":F,"data-visible":zt,"data-y-position":$t,"data-x-position":Yt,"data-index":D,"data-front":Ot,"data-swiping":et,"data-dismissible":q,"data-type":N,"data-invert":Ft,"data-swipe-out":at,"data-swipe-direction":f,"data-expanded":!!(Q||z&&p),style:{"--index":D,"--toasts-before":D,"--z-index":nt.length-D,"--offset":`${F?At:G.current}px`,"--initial-height":z?"auto":`${Ht}px`,...pt,...t.style},onDragEnd:()=>{K(!1),tt(null),J.current=null},onPointerDown:r=>{yt||!q||(Tt.current=new Date,bt(G.current),r.target.setPointerCapture(r.pointerId),r.target.tagName!=="BUTTON"&&(K(!0),J.current={x:r.clientX,y:r.clientY}))},onPointerUp:()=>{var r,w,S;if(at||!q)return;J.current=null;const _=Number(((r=$.current)==null?void 0:r.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ct=Number(((w=$.current)==null?void 0:w.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),T=new Date().getTime()-((S=Tt.current)==null?void 0:S.getTime()),M=A==="x"?_:ct,ut=Math.abs(M)/T;if(Math.abs(M)>=he||ut>.11){bt(G.current),t.onDismiss==null||t.onDismiss.call(t,t),h(A==="x"?_>0?"right":"left":ct>0?"down":"up"),Y(),ot(!0);return}else{var H,O;(H=$.current)==null||H.style.setProperty("--swipe-amount-x","0px"),(O=$.current)==null||O.style.setProperty("--swipe-amount-y","0px")}wt(!1),K(!1),tt(null)},onPointerMove:r=>{var w,S,_;if(!J.current||!q||((w=window.getSelection())==null?void 0:w.toString().length)>0)return;const T=r.clientY-J.current.y,M=r.clientX-J.current.x;var ut;const H=(ut=n.swipeDirections)!=null?ut:ve(Z);!A&&(Math.abs(M)>1||Math.abs(T)>1)&&tt(Math.abs(M)>Math.abs(T)?"x":"y");let O={x:0,y:0};const Bt=V=>1/(1.5+Math.abs(V)/20);if(A==="y"){if(H.includes("top")||H.includes("bottom"))if(H.includes("top")&&T<0||H.includes("bottom")&&T>0)O.y=T;else{const V=T*Bt(T);O.y=Math.abs(V)<Math.abs(T)?V:T}}else if(A==="x"&&(H.includes("left")||H.includes("right")))if(H.includes("left")&&M<0||H.includes("right")&&M>0)O.x=M;else{const V=M*Bt(M);O.x=Math.abs(V)<Math.abs(M)?V:M}(Math.abs(O.x)>0||Math.abs(O.y)>0)&&wt(!0),(S=$.current)==null||S.style.setProperty("--swipe-amount-x",`${O.x}px`),(_=$.current)==null||_.style.setProperty("--swipe-amount-y",`${O.y}px`)}},Pt&&!t.jsx&&N!=="loading"?o.createElement("button",{"aria-label":P,"data-disabled":yt,"data-close-button":!0,onClick:yt||!q?()=>{}:()=>{Y(),t.onDismiss==null||t.onDismiss.call(t,t)},className:L(d==null?void 0:d.closeButton,t==null||(s=t.classNames)==null?void 0:s.closeButton)},(Dt=C==null?void 0:C.close)!=null?Dt:oe):null,(N||t.icon||t.promise)&&t.icon!==null&&((C==null?void 0:C[N])!==null||t.icon)?o.createElement("div",{"data-icon":"",className:L(d==null?void 0:d.icon,t==null||(E=t.classNames)==null?void 0:E.icon)},t.promise||t.type==="loading"&&!t.icon?t.icon||Vt():null,t.type!=="loading"?Wt:null):null,o.createElement("div",{"data-content":"",className:L(d==null?void 0:d.content,t==null||(l=t.classNames)==null?void 0:l.content)},o.createElement("div",{"data-title":"",className:L(d==null?void 0:d.title,t==null||(u=t.classNames)==null?void 0:u.title)},t.jsx?t.jsx:typeof t.title=="function"?t.title():t.title),t.description?o.createElement("div",{"data-description":"",className:L(j,jt,d==null?void 0:d.description,t==null||(v=t.classNames)==null?void 0:v.description)},typeof t.description=="function"?t.description():t.description):null),o.isValidElement(t.cancel)?t.cancel:t.cancel&&ft(t.cancel)?o.createElement("button",{"data-button":!0,"data-cancel":!0,style:t.cancelButtonStyle||it,onClick:r=>{ft(t.cancel)&&q&&(t.cancel.onClick==null||t.cancel.onClick.call(t.cancel,r),Y())},className:L(d==null?void 0:d.cancelButton,t==null||(m=t.classNames)==null?void 0:m.cancelButton)},t.cancel.label):null,o.isValidElement(t.action)?t.action:t.action&&ft(t.action)?o.createElement("button",{"data-button":!0,"data-action":!0,style:t.actionButtonStyle||gt,onClick:r=>{ft(t.action)&&(t.action.onClick==null||t.action.onClick.call(t.action,r),!r.defaultPrevented&&Y())},className:L(d==null?void 0:d.actionButton,t==null||(i=t.classNames)==null?void 0:i.actionButton)},t.action.label):null)};function It(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function xe(n,a){const e={};return[n,a].forEach((s,E)=>{const l=E===1,u=l?"--mobile-offset":"--offset",v=l?me:fe;function m(i){["top","right","bottom","left"].forEach(x=>{e[`${u}-${x}`]=typeof i=="number"?`${i}px`:i})}typeof s=="number"||typeof s=="string"?m(s):typeof s=="object"?["top","right","bottom","left"].forEach(i=>{s[i]===void 0?e[`${u}-${i}`]=v:e[`${u}-${i}`]=typeof s[i]=="number"?`${s[i]}px`:s[i]}):m(v)}),e}const we=o.forwardRef(function(a,e){const{invert:s,position:E="bottom-right",hotkey:l=["altKey","KeyT"],expand:u,closeButton:v,className:m,offset:i,mobileOffset:x,theme:t="light",richColors:R,duration:g,style:y,visibleToasts:W=ue,toastOptions:c,dir:D=It(),gap:nt=ge,icons:Q,containerAriaLabel:rt="Notifications"}=a,[I,U]=o.useState([]),pt=o.useMemo(()=>Array.from(new Set([E].concat(I.filter(f=>f.position).map(f=>f.position)))),[I,E]),[it,gt]=o.useState([]),[lt,j]=o.useState(!1),[X,Z]=o.useState(!1),[ht,z]=o.useState(t!=="system"?t:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=o.useRef(null),C=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=o.useRef(null),A=o.useRef(!1),tt=o.useCallback(f=>{U(h=>{var p;return(p=h.find(B=>B.id===f.id))!=null&&p.delete||k.dismiss(f.id),h.filter(({id:B})=>B!==f.id)})},[]);return o.useEffect(()=>k.subscribe(f=>{if(f.dismiss){requestAnimationFrame(()=>{U(h=>h.map(p=>p.id===f.id?{...p,delete:!0}:p))});return}setTimeout(()=>{Ut.flushSync(()=>{U(h=>{const p=h.findIndex(B=>B.id===f.id);return p!==-1?[...h.slice(0,p),{...h[p],...f},...h.slice(p+1)]:[f,...h]})})})}),[I]),o.useEffect(()=>{if(t!=="system"){z(t);return}if(t==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;const f=window.matchMedia("(prefers-color-scheme: dark)");try{f.addEventListener("change",({matches:h})=>{z(h?"dark":"light")})}catch{f.addListener(({matches:p})=>{try{z(p?"dark":"light")}catch(B){console.error(B)}})}},[t]),o.useEffect(()=>{I.length<=1&&j(!1)},[I]),o.useEffect(()=>{const f=h=>{var p;if(l.every(b=>h[b]||h.code===b)){var F;j(!0),(F=d.current)==null||F.focus()}h.code==="Escape"&&(document.activeElement===d.current||(p=d.current)!=null&&p.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[l]),o.useEffect(()=>{if(d.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,A.current=!1)}},[d.current]),o.createElement("section",{ref:e,"aria-label":`${rt} ${C}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},pt.map((f,h)=>{var p;const[B,F]=f.split("-");return I.length?o.createElement("ol",{key:f,dir:D==="auto"?It():D,tabIndex:-1,ref:d,className:m,"data-sonner-toaster":!0,"data-sonner-theme":ht,"data-y-position":B,"data-lifted":lt&&I.length>1&&!u,"data-x-position":F,style:{"--front-toast-height":`${((p=it[0])==null?void 0:p.height)||0}px`,"--width":`${pe}px`,"--gap":`${nt}px`,...y,...xe(i,x)},onBlur:b=>{A.current&&!b.currentTarget.contains(b.relatedTarget)&&(A.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:b=>{b.target instanceof HTMLElement&&b.target.dataset.dismissible==="false"||A.current||(A.current=!0,P.current=b.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{X||j(!1)},onDragEnd:()=>j(!1),onPointerDown:b=>{b.target instanceof HTMLElement&&b.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},I.filter(b=>!b.position&&h===0||b.position===f).map((b,et)=>{var K,at;return o.createElement(ye,{key:b.id,icons:Q,index:et,toast:b,defaultRichColors:R,duration:(K=c==null?void 0:c.duration)!=null?K:g,className:c==null?void 0:c.className,descriptionClassName:c==null?void 0:c.descriptionClassName,invert:s,visibleToasts:W,closeButton:(at=c==null?void 0:c.closeButton)!=null?at:v,interacting:X,position:f,style:c==null?void 0:c.style,unstyled:c==null?void 0:c.unstyled,classNames:c==null?void 0:c.classNames,cancelButtonStyle:c==null?void 0:c.cancelButtonStyle,actionButtonStyle:c==null?void 0:c.actionButtonStyle,closeButtonAriaLabel:c==null?void 0:c.closeButtonAriaLabel,removeToast:tt,toasts:I.filter(ot=>ot.position==b.position),heights:it.filter(ot=>ot.position==b.position),setHeights:gt,expandByDefault:u,gap:nt,expanded:lt,swipeDirections:a.swipeDirections})})):null}))});var Ee=(n,a,e,s,E,l,u,v)=>{let m=document.documentElement,i=["light","dark"];function x(g){(Array.isArray(n)?n:[n]).forEach(y=>{let W=y==="class",c=W&&l?E.map(D=>l[D]||D):E;W?(m.classList.remove(...c),m.classList.add(l&&l[g]?l[g]:g)):m.setAttribute(y,g)}),t(g)}function t(g){v&&i.includes(g)&&(m.style.colorScheme=g)}function R(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)x(s);else try{let g=localStorage.getItem(a)||e,y=u&&g==="system"?R():g;x(y)}catch{}},Te=mt.createContext(void 0),Se={setTheme:n=>{},themes:[]},ke=()=>{var n;return(n=mt.useContext(Te))!=null?n:Se};mt.memo(({forcedTheme:n,storageKey:a,attribute:e,enableSystem:s,enableColorScheme:E,defaultTheme:l,value:u,themes:v,nonce:m,scriptProps:i})=>{let x=JSON.stringify([e,a,l,n,v,u,s,E]).slice(1,-1);return mt.createElement("script",{...i,suppressHydrationWarning:!0,nonce:typeof window>"u"?m:"",dangerouslySetInnerHTML:{__html:`(${Ee.toString()})(${x})`}})});const Be=n=>{const a=Kt.c(6);let e;a[0]!==n?({...e}=n,a[0]=n,a[1]=e):e=a[1];const{theme:s}=ke(),l=s===void 0?"system":s;let u;a[2]===Symbol.for("react.memo_cache_sentinel")?(u={"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},a[2]=u):u=a[2];let v;return a[3]!==e||a[4]!==l?(v=Xt.jsx(we,{theme:l,className:"toaster group",style:u,...e}),a[3]=e,a[4]=l,a[5]=v):v=a[5],v};export{Be as T,De as t};
@@ -1,4 +1,4 @@
1
- import{g as KZ,W as No,r as Cf,j as bv}from"./app.js";import{c as JZ}from"./compiler-runtime-tM4jBQ-T.js";import{k as YZ,b as XZ}from"./index-Vcq4gwWv.js";import{u as ZZ}from"./use-window-size-B8l6Bpkf.js";import{u as QZ}from"./use-appearance-Co6mO0dV.js";function Or(r){this.content=r}Or.prototype={constructor:Or,find:function(r){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===r)return e;return-1},get:function(r){var e=this.find(r);return e==-1?void 0:this.content[e+1]},update:function(r,e,t){var n=t&&t!=r?this.remove(t):this,i=n.find(r),a=n.content.slice();return i==-1?a.push(t||r,e):(a[i+1]=e,t&&(a[i]=t)),new Or(a)},remove:function(r){var e=this.find(r);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Or(t)},addToStart:function(r,e){return new Or([r,e].concat(this.remove(r).content))},addToEnd:function(r,e){var t=this.remove(r).content.slice();return t.push(r,e),new Or(t)},addBefore:function(r,e,t){var n=this.remove(e),i=n.content.slice(),a=n.find(r);return i.splice(a==-1?i.length:a,0,e,t),new Or(i)},forEach:function(r){for(var e=0;e<this.content.length;e+=2)r(this.content[e],this.content[e+1])},prepend:function(r){return r=Or.from(r),r.size?new Or(r.content.concat(this.subtract(r).content)):this},append:function(r){return r=Or.from(r),r.size?new Or(this.subtract(r).content.concat(r.content)):this},subtract:function(r){var e=this;r=Or.from(r);for(var t=0;t<r.content.length;t+=2)e=e.remove(r.content[t]);return e},toObject:function(){var r={};return this.forEach(function(e,t){r[e]=t}),r},get size(){return this.content.length>>1}};Or.from=function(r){if(r instanceof Or)return r;var e=[];if(r)for(var t in r)e.push(t,r[t]);return new Or(e)};function Ky(r,e,t){for(let n=0;;n++){if(n==r.childCount||n==e.childCount)return r.childCount==e.childCount?null:t;let i=r.child(n),a=e.child(n);if(i==a){t+=i.nodeSize;continue}if(!i.sameMarkup(a))return t;if(i.isText&&i.text!=a.text){for(let o=0;i.text[o]==a.text[o];o++)t++;return t}if(i.content.size||a.content.size){let o=Ky(i.content,a.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function Jy(r,e,t,n){for(let i=r.childCount,a=e.childCount;;){if(i==0||a==0)return i==a?null:{a:t,b:n};let o=r.child(--i),s=e.child(--a),l=o.nodeSize;if(o==s){t-=l,n-=l;continue}if(!o.sameMarkup(s))return{a:t,b:n};if(o.isText&&o.text!=s.text){let f=0,p=Math.min(o.text.length,s.text.length);for(;f<p&&o.text[o.text.length-f-1]==s.text[s.text.length-f-1];)f++,t--,n--;return{a:t,b:n}}if(o.content.size||s.content.size){let f=Jy(o.content,s.content,t-1,n-1);if(f)return f}t-=l,n-=l}}class Oe{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,i=0,a){for(let o=0,s=0;s<t;o++){let l=this.content[o],f=s+l.nodeSize;if(f>e&&n(l,i+s,a||null,o)!==!1&&l.content.size){let p=s+1;l.nodesBetween(Math.max(0,e-p),Math.min(l.content.size,t-p),n,i+p)}s=f}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,i){let a="",o=!0;return this.nodesBetween(e,t,(s,l)=>{let f=s.isText?s.text.slice(Math.max(e,l)-l,t-l):s.isLeaf?i?typeof i=="function"?i(s):i:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&f||s.isTextblock)&&n&&(o?o=!1:a+=n),a+=f},0),a}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,i=this.content.slice(),a=0;for(t.isText&&t.sameMarkup(n)&&(i[i.length-1]=t.withText(t.text+n.text),a=1);a<e.content.length;a++)i.push(e.content[a]);return new Oe(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let n=[],i=0;if(t>e)for(let a=0,o=0;o<t;a++){let s=this.content[a],l=o+s.nodeSize;l>e&&((o<e||l>t)&&(s.isText?s=s.cut(Math.max(0,e-o),Math.min(s.text.length,t-o)):s=s.cut(Math.max(0,e-o-1),Math.min(s.content.size,t-o-1))),n.push(s),i+=s.nodeSize),o=l}return new Oe(n,i)}cutByIndex(e,t){return e==t?Oe.empty:e==0&&t==this.content.length?this:new Oe(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let i=this.content.slice(),a=this.size+t.nodeSize-n.nodeSize;return i[e]=t,new Oe(i,a)}addToStart(e){return new Oe([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Oe(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let i=this.content[t];e(i,n,t),n+=i.nodeSize}}findDiffStart(e,t=0){return Ky(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Jy(this,e,t,n)}findIndex(e,t=-1){if(e==0)return Al(0,e);if(e==this.size)return Al(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,i=0;;n++){let a=this.child(n),o=i+a.nodeSize;if(o>=e)return o==e||t>0?Al(n+1,o):Al(n,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return Oe.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new Oe(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Oe.empty;let t,n=0;for(let i=0;i<e.length;i++){let a=e[i];n+=a.nodeSize,i&&a.isText&&e[i-1].sameMarkup(a)?(t||(t=e.slice(0,i)),t[t.length-1]=a.withText(t[t.length-1].text+a.text)):t&&t.push(a)}return new Oe(t||e,n)}static from(e){if(!e)return Oe.empty;if(e instanceof Oe)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Oe([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Oe.empty=new Oe([],0);const Tf={index:0,offset:0};function Al(r,e){return Tf.index=r,Tf.offset=e,Tf}function Zl(r,e){if(r===e)return!0;if(!(r&&typeof r=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(r);if(Array.isArray(e)!=t)return!1;if(t){if(r.length!=e.length)return!1;for(let n=0;n<r.length;n++)if(!Zl(r[n],e[n]))return!1}else{for(let n in r)if(!(n in e)||!Zl(r[n],e[n]))return!1;for(let n in e)if(!(n in r))return!1}return!0}let Pt=class fd{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let i=0;i<e.length;i++){let a=e[i];if(this.eq(a))return e;if(this.type.excludes(a.type))t||(t=e.slice(0,i));else{if(a.type.excludes(this.type))return e;!n&&a.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),n=!0),t&&t.push(a)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Zl(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=n.create(t.attrs);return n.checkAttrs(i.attrs),i}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return fd.none;if(e instanceof fd)return[e];let t=e.slice();return t.sort((n,i)=>n.type.rank-i.type.rank),t}};Pt.none=[];class Ql extends Error{}class Ue{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=Xy(this.content,e+this.openStart,t);return n&&new Ue(n,this.openStart,this.openEnd)}removeBetween(e,t){return new Ue(Yy(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return Ue.empty;let n=t.openStart||0,i=t.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Ue(Oe.fromJSON(e,t.content),n,i)}static maxOpen(e,t=!0){let n=0,i=0;for(let a=e.firstChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.firstChild)n++;for(let a=e.lastChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.lastChild)i++;return new Ue(e,n,i)}}Ue.empty=new Ue(Oe.empty,0,0);function Yy(r,e,t){let{index:n,offset:i}=r.findIndex(e),a=r.maybeChild(n),{index:o,offset:s}=r.findIndex(t);if(i==e||a.isText){if(s!=t&&!r.child(o).isText)throw new RangeError("Removing non-flat range");return r.cut(0,e).append(r.cut(t))}if(n!=o)throw new RangeError("Removing non-flat range");return r.replaceChild(n,a.copy(Yy(a.content,e-i-1,t-i-1)))}function Xy(r,e,t,n){let{index:i,offset:a}=r.findIndex(e),o=r.maybeChild(i);if(a==e||o.isText)return r.cut(0,e).append(t).append(r.cut(e));let s=Xy(o.content,e-a-1,t);return s&&r.replaceChild(i,o.copy(s))}function eQ(r,e,t){if(t.openStart>r.depth)throw new Ql("Inserted content deeper than insertion position");if(r.depth-t.openStart!=e.depth-t.openEnd)throw new Ql("Inconsistent open depths");return Zy(r,e,t,0)}function Zy(r,e,t,n){let i=r.index(n),a=r.node(n);if(i==e.index(n)&&n<r.depth-t.openStart){let o=Zy(r,e,t,n+1);return a.copy(a.content.replaceChild(i,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&r.depth==n&&e.depth==n){let o=r.parent,s=o.content;return Ha(o,s.cut(0,r.parentOffset).append(t.content).append(s.cut(e.parentOffset)))}else{let{start:o,end:s}=tQ(t,r);return Ha(a,eb(r,o,s,e,n))}else return Ha(a,eu(r,e,n))}function Qy(r,e){if(!e.type.compatibleContent(r.type))throw new Ql("Cannot join "+e.type.name+" onto "+r.type.name)}function dd(r,e,t){let n=r.node(t);return Qy(n,e.node(t)),n}function qa(r,e){let t=e.length-1;t>=0&&r.isText&&r.sameMarkup(e[t])?e[t]=r.withText(e[t].text+r.text):e.push(r)}function ws(r,e,t,n){let i=(e||r).node(t),a=0,o=e?e.index(t):i.childCount;r&&(a=r.index(t),r.depth>t?a++:r.textOffset&&(qa(r.nodeAfter,n),a++));for(let s=a;s<o;s++)qa(i.child(s),n);e&&e.depth==t&&e.textOffset&&qa(e.nodeBefore,n)}function Ha(r,e){return r.type.checkContent(e),r.copy(e)}function eb(r,e,t,n,i){let a=r.depth>i&&dd(r,e,i+1),o=n.depth>i&&dd(t,n,i+1),s=[];return ws(null,r,i,s),a&&o&&e.index(i)==t.index(i)?(Qy(a,o),qa(Ha(a,eb(r,e,t,n,i+1)),s)):(a&&qa(Ha(a,eu(r,e,i+1)),s),ws(e,t,i,s),o&&qa(Ha(o,eu(t,n,i+1)),s)),ws(n,null,i,s),new Oe(s)}function eu(r,e,t){let n=[];if(ws(null,r,t,n),r.depth>t){let i=dd(r,e,t+1);qa(Ha(i,eu(r,e,t+1)),n)}return ws(e,null,t,n),new Oe(n)}function tQ(r,e){let t=e.depth-r.openStart,i=e.node(t).copy(r.content);for(let a=t-1;a>=0;a--)i=e.node(a).copy(Oe.from(i));return{start:i.resolveNoCache(r.openStart+t),end:i.resolveNoCache(i.content.size-r.openEnd-t)}}class Es{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=e.child(t);return n?e.child(t).cut(n):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let a=0;a<e;a++)i+=n.child(a).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Pt.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),i=e.maybeChild(t);if(!n){let s=n;n=i,i=s}let a=n.marks;for(var o=0;o<a.length;o++)a[o].type.spec.inclusive===!1&&(!i||!a[o].isInSet(i.marks))&&(a=a[o--].removeFromSet(a));return a}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,i=e.parent.maybeChild(e.index());for(var a=0;a<n.length;a++)n[a].type.spec.inclusive===!1&&(!i||!n[a].isInSet(i.marks))&&(n=n[a--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new tu(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],i=0,a=t;for(let o=e;;){let{index:s,offset:l}=o.content.findIndex(a),f=a-l;if(n.push(o,s,i+l),!f||(o=o.child(s),o.isText))break;a=f-1,i+=l+1}return new Es(t,n,a)}static resolveCached(e,t){let n=kv.get(e);if(n)for(let a=0;a<n.elts.length;a++){let o=n.elts[a];if(o.pos==t)return o}else kv.set(e,n=new rQ);let i=n.elts[n.i]=Es.resolve(e,t);return n.i=(n.i+1)%nQ,i}}class rQ{constructor(){this.elts=[],this.i=0}}const nQ=12,kv=new WeakMap;class tu{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const iQ=Object.create(null);let ra=class hd{constructor(e,t,n,i=Pt.none){this.type=e,this.attrs=t,this.marks=i,this.content=n||Oe.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,i=0){this.content.nodesBetween(e,t,n,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,i){return this.content.textBetween(e,t,n,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&Zl(this.attrs,t||e.defaultAttrs||iQ)&&Pt.sameSet(this.marks,n||Pt.none)}copy(e=null){return e==this.content?this:new hd(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new hd(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return Ue.empty;let i=this.resolve(e),a=this.resolve(t),o=n?0:i.sharedDepth(t),s=i.start(o),f=i.node(o).content.cut(i.pos-s,a.pos-s);return new Ue(f,i.depth-o,a.depth-o)}replace(e,t,n){return eQ(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let i=this.content.child(t-1);return{node:i,index:t-1,offset:n-i.nodeSize}}resolve(e){return Es.resolveCached(this,e)}resolveNoCache(e){return Es.resolve(this,e)}rangeHasMark(e,t,n){let i=!1;return t>e&&this.nodesBetween(e,t,a=>(n.isInSet(a.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),tb(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=Oe.empty,i=0,a=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,i,a),s=o&&o.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let l=i;l<a;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0}canReplaceWith(e,t,n,i){if(i&&!this.type.allowsMarks(i))return!1;let a=this.contentMatchAt(e).matchType(n),o=a&&a.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Pt.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!Pt.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let i=Oe.fromJSON(e,t.content),a=e.nodeType(t.type).create(t.attrs,i,n);return a.type.checkAttrs(a.attrs),a}};ra.prototype.text=void 0;class ru extends ra{constructor(e,t,n,i){if(super(e,t,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):tb(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ru(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ru(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function tb(r,e){for(let t=r.length-1;t>=0;t--)e=r[t].type.name+"("+e+")";return e}class Ua{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new aQ(e,t);if(n.next==null)return Ua.empty;let i=rb(n);n.next&&n.err("Unexpected trailing text");let a=dQ(fQ(i));return hQ(a,n),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let i=this;for(let a=t;i&&a<n;a++)i=i.matchType(e.child(a).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let i=[this];function a(o,s){let l=o.matchFragment(e,n);if(l&&(!t||l.validEnd))return Oe.from(s.map(f=>f.createAndFill()));for(let f=0;f<o.next.length;f++){let{type:p,next:k}=o.next[f];if(!(p.isText||p.hasRequiredAttrs())&&i.indexOf(k)==-1){i.push(k);let T=a(k,s.concat(p));if(T)return T}}return null}return a(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let i=n.shift(),a=i.match;if(a.matchType(e)){let o=[];for(let s=i;s.type;s=s.via)o.push(s.type);return o.reverse()}for(let o=0;o<a.next.length;o++){let{type:s,next:l}=a.next[o];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in t)&&(!i.type||l.validEnd)&&(n.push({match:s.contentMatch,type:s,via:i}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let i=0;i<n.next.length;i++)e.indexOf(n.next[i].next)==-1&&t(n.next[i].next)}return t(this),e.map((n,i)=>{let a=i+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)a+=(o?", ":"")+n.next[o].type.name+"->"+e.indexOf(n.next[o].next);return a}).join(`
1
+ import{g as KZ,W as No,r as Cf,j as bv}from"./app.js";import{c as JZ}from"./compiler-runtime-CMDe02AS.js";import{k as YZ,b as XZ}from"./index-Vcq4gwWv.js";import{u as ZZ}from"./use-window-size-ciZdUHrJ.js";import{u as QZ}from"./use-appearance-CL1-5ZfQ.js";function Or(r){this.content=r}Or.prototype={constructor:Or,find:function(r){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===r)return e;return-1},get:function(r){var e=this.find(r);return e==-1?void 0:this.content[e+1]},update:function(r,e,t){var n=t&&t!=r?this.remove(t):this,i=n.find(r),a=n.content.slice();return i==-1?a.push(t||r,e):(a[i+1]=e,t&&(a[i]=t)),new Or(a)},remove:function(r){var e=this.find(r);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Or(t)},addToStart:function(r,e){return new Or([r,e].concat(this.remove(r).content))},addToEnd:function(r,e){var t=this.remove(r).content.slice();return t.push(r,e),new Or(t)},addBefore:function(r,e,t){var n=this.remove(e),i=n.content.slice(),a=n.find(r);return i.splice(a==-1?i.length:a,0,e,t),new Or(i)},forEach:function(r){for(var e=0;e<this.content.length;e+=2)r(this.content[e],this.content[e+1])},prepend:function(r){return r=Or.from(r),r.size?new Or(r.content.concat(this.subtract(r).content)):this},append:function(r){return r=Or.from(r),r.size?new Or(this.subtract(r).content.concat(r.content)):this},subtract:function(r){var e=this;r=Or.from(r);for(var t=0;t<r.content.length;t+=2)e=e.remove(r.content[t]);return e},toObject:function(){var r={};return this.forEach(function(e,t){r[e]=t}),r},get size(){return this.content.length>>1}};Or.from=function(r){if(r instanceof Or)return r;var e=[];if(r)for(var t in r)e.push(t,r[t]);return new Or(e)};function Ky(r,e,t){for(let n=0;;n++){if(n==r.childCount||n==e.childCount)return r.childCount==e.childCount?null:t;let i=r.child(n),a=e.child(n);if(i==a){t+=i.nodeSize;continue}if(!i.sameMarkup(a))return t;if(i.isText&&i.text!=a.text){for(let o=0;i.text[o]==a.text[o];o++)t++;return t}if(i.content.size||a.content.size){let o=Ky(i.content,a.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function Jy(r,e,t,n){for(let i=r.childCount,a=e.childCount;;){if(i==0||a==0)return i==a?null:{a:t,b:n};let o=r.child(--i),s=e.child(--a),l=o.nodeSize;if(o==s){t-=l,n-=l;continue}if(!o.sameMarkup(s))return{a:t,b:n};if(o.isText&&o.text!=s.text){let f=0,p=Math.min(o.text.length,s.text.length);for(;f<p&&o.text[o.text.length-f-1]==s.text[s.text.length-f-1];)f++,t--,n--;return{a:t,b:n}}if(o.content.size||s.content.size){let f=Jy(o.content,s.content,t-1,n-1);if(f)return f}t-=l,n-=l}}class Oe{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,i=0,a){for(let o=0,s=0;s<t;o++){let l=this.content[o],f=s+l.nodeSize;if(f>e&&n(l,i+s,a||null,o)!==!1&&l.content.size){let p=s+1;l.nodesBetween(Math.max(0,e-p),Math.min(l.content.size,t-p),n,i+p)}s=f}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,i){let a="",o=!0;return this.nodesBetween(e,t,(s,l)=>{let f=s.isText?s.text.slice(Math.max(e,l)-l,t-l):s.isLeaf?i?typeof i=="function"?i(s):i:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&f||s.isTextblock)&&n&&(o?o=!1:a+=n),a+=f},0),a}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,i=this.content.slice(),a=0;for(t.isText&&t.sameMarkup(n)&&(i[i.length-1]=t.withText(t.text+n.text),a=1);a<e.content.length;a++)i.push(e.content[a]);return new Oe(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let n=[],i=0;if(t>e)for(let a=0,o=0;o<t;a++){let s=this.content[a],l=o+s.nodeSize;l>e&&((o<e||l>t)&&(s.isText?s=s.cut(Math.max(0,e-o),Math.min(s.text.length,t-o)):s=s.cut(Math.max(0,e-o-1),Math.min(s.content.size,t-o-1))),n.push(s),i+=s.nodeSize),o=l}return new Oe(n,i)}cutByIndex(e,t){return e==t?Oe.empty:e==0&&t==this.content.length?this:new Oe(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let i=this.content.slice(),a=this.size+t.nodeSize-n.nodeSize;return i[e]=t,new Oe(i,a)}addToStart(e){return new Oe([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Oe(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let i=this.content[t];e(i,n,t),n+=i.nodeSize}}findDiffStart(e,t=0){return Ky(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Jy(this,e,t,n)}findIndex(e,t=-1){if(e==0)return Al(0,e);if(e==this.size)return Al(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,i=0;;n++){let a=this.child(n),o=i+a.nodeSize;if(o>=e)return o==e||t>0?Al(n+1,o):Al(n,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return Oe.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new Oe(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Oe.empty;let t,n=0;for(let i=0;i<e.length;i++){let a=e[i];n+=a.nodeSize,i&&a.isText&&e[i-1].sameMarkup(a)?(t||(t=e.slice(0,i)),t[t.length-1]=a.withText(t[t.length-1].text+a.text)):t&&t.push(a)}return new Oe(t||e,n)}static from(e){if(!e)return Oe.empty;if(e instanceof Oe)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Oe([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Oe.empty=new Oe([],0);const Tf={index:0,offset:0};function Al(r,e){return Tf.index=r,Tf.offset=e,Tf}function Zl(r,e){if(r===e)return!0;if(!(r&&typeof r=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(r);if(Array.isArray(e)!=t)return!1;if(t){if(r.length!=e.length)return!1;for(let n=0;n<r.length;n++)if(!Zl(r[n],e[n]))return!1}else{for(let n in r)if(!(n in e)||!Zl(r[n],e[n]))return!1;for(let n in e)if(!(n in r))return!1}return!0}let Pt=class fd{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let i=0;i<e.length;i++){let a=e[i];if(this.eq(a))return e;if(this.type.excludes(a.type))t||(t=e.slice(0,i));else{if(a.type.excludes(this.type))return e;!n&&a.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),n=!0),t&&t.push(a)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Zl(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=n.create(t.attrs);return n.checkAttrs(i.attrs),i}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return fd.none;if(e instanceof fd)return[e];let t=e.slice();return t.sort((n,i)=>n.type.rank-i.type.rank),t}};Pt.none=[];class Ql extends Error{}class Ue{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=Xy(this.content,e+this.openStart,t);return n&&new Ue(n,this.openStart,this.openEnd)}removeBetween(e,t){return new Ue(Yy(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return Ue.empty;let n=t.openStart||0,i=t.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Ue(Oe.fromJSON(e,t.content),n,i)}static maxOpen(e,t=!0){let n=0,i=0;for(let a=e.firstChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.firstChild)n++;for(let a=e.lastChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.lastChild)i++;return new Ue(e,n,i)}}Ue.empty=new Ue(Oe.empty,0,0);function Yy(r,e,t){let{index:n,offset:i}=r.findIndex(e),a=r.maybeChild(n),{index:o,offset:s}=r.findIndex(t);if(i==e||a.isText){if(s!=t&&!r.child(o).isText)throw new RangeError("Removing non-flat range");return r.cut(0,e).append(r.cut(t))}if(n!=o)throw new RangeError("Removing non-flat range");return r.replaceChild(n,a.copy(Yy(a.content,e-i-1,t-i-1)))}function Xy(r,e,t,n){let{index:i,offset:a}=r.findIndex(e),o=r.maybeChild(i);if(a==e||o.isText)return r.cut(0,e).append(t).append(r.cut(e));let s=Xy(o.content,e-a-1,t);return s&&r.replaceChild(i,o.copy(s))}function eQ(r,e,t){if(t.openStart>r.depth)throw new Ql("Inserted content deeper than insertion position");if(r.depth-t.openStart!=e.depth-t.openEnd)throw new Ql("Inconsistent open depths");return Zy(r,e,t,0)}function Zy(r,e,t,n){let i=r.index(n),a=r.node(n);if(i==e.index(n)&&n<r.depth-t.openStart){let o=Zy(r,e,t,n+1);return a.copy(a.content.replaceChild(i,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&r.depth==n&&e.depth==n){let o=r.parent,s=o.content;return Ha(o,s.cut(0,r.parentOffset).append(t.content).append(s.cut(e.parentOffset)))}else{let{start:o,end:s}=tQ(t,r);return Ha(a,eb(r,o,s,e,n))}else return Ha(a,eu(r,e,n))}function Qy(r,e){if(!e.type.compatibleContent(r.type))throw new Ql("Cannot join "+e.type.name+" onto "+r.type.name)}function dd(r,e,t){let n=r.node(t);return Qy(n,e.node(t)),n}function qa(r,e){let t=e.length-1;t>=0&&r.isText&&r.sameMarkup(e[t])?e[t]=r.withText(e[t].text+r.text):e.push(r)}function ws(r,e,t,n){let i=(e||r).node(t),a=0,o=e?e.index(t):i.childCount;r&&(a=r.index(t),r.depth>t?a++:r.textOffset&&(qa(r.nodeAfter,n),a++));for(let s=a;s<o;s++)qa(i.child(s),n);e&&e.depth==t&&e.textOffset&&qa(e.nodeBefore,n)}function Ha(r,e){return r.type.checkContent(e),r.copy(e)}function eb(r,e,t,n,i){let a=r.depth>i&&dd(r,e,i+1),o=n.depth>i&&dd(t,n,i+1),s=[];return ws(null,r,i,s),a&&o&&e.index(i)==t.index(i)?(Qy(a,o),qa(Ha(a,eb(r,e,t,n,i+1)),s)):(a&&qa(Ha(a,eu(r,e,i+1)),s),ws(e,t,i,s),o&&qa(Ha(o,eu(t,n,i+1)),s)),ws(n,null,i,s),new Oe(s)}function eu(r,e,t){let n=[];if(ws(null,r,t,n),r.depth>t){let i=dd(r,e,t+1);qa(Ha(i,eu(r,e,t+1)),n)}return ws(e,null,t,n),new Oe(n)}function tQ(r,e){let t=e.depth-r.openStart,i=e.node(t).copy(r.content);for(let a=t-1;a>=0;a--)i=e.node(a).copy(Oe.from(i));return{start:i.resolveNoCache(r.openStart+t),end:i.resolveNoCache(i.content.size-r.openEnd-t)}}class Es{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=e.child(t);return n?e.child(t).cut(n):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let a=0;a<e;a++)i+=n.child(a).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Pt.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),i=e.maybeChild(t);if(!n){let s=n;n=i,i=s}let a=n.marks;for(var o=0;o<a.length;o++)a[o].type.spec.inclusive===!1&&(!i||!a[o].isInSet(i.marks))&&(a=a[o--].removeFromSet(a));return a}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,i=e.parent.maybeChild(e.index());for(var a=0;a<n.length;a++)n[a].type.spec.inclusive===!1&&(!i||!n[a].isInSet(i.marks))&&(n=n[a--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new tu(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],i=0,a=t;for(let o=e;;){let{index:s,offset:l}=o.content.findIndex(a),f=a-l;if(n.push(o,s,i+l),!f||(o=o.child(s),o.isText))break;a=f-1,i+=l+1}return new Es(t,n,a)}static resolveCached(e,t){let n=kv.get(e);if(n)for(let a=0;a<n.elts.length;a++){let o=n.elts[a];if(o.pos==t)return o}else kv.set(e,n=new rQ);let i=n.elts[n.i]=Es.resolve(e,t);return n.i=(n.i+1)%nQ,i}}class rQ{constructor(){this.elts=[],this.i=0}}const nQ=12,kv=new WeakMap;class tu{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const iQ=Object.create(null);let ra=class hd{constructor(e,t,n,i=Pt.none){this.type=e,this.attrs=t,this.marks=i,this.content=n||Oe.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,i=0){this.content.nodesBetween(e,t,n,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,i){return this.content.textBetween(e,t,n,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&Zl(this.attrs,t||e.defaultAttrs||iQ)&&Pt.sameSet(this.marks,n||Pt.none)}copy(e=null){return e==this.content?this:new hd(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new hd(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return Ue.empty;let i=this.resolve(e),a=this.resolve(t),o=n?0:i.sharedDepth(t),s=i.start(o),f=i.node(o).content.cut(i.pos-s,a.pos-s);return new Ue(f,i.depth-o,a.depth-o)}replace(e,t,n){return eQ(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let i=this.content.child(t-1);return{node:i,index:t-1,offset:n-i.nodeSize}}resolve(e){return Es.resolveCached(this,e)}resolveNoCache(e){return Es.resolve(this,e)}rangeHasMark(e,t,n){let i=!1;return t>e&&this.nodesBetween(e,t,a=>(n.isInSet(a.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),tb(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=Oe.empty,i=0,a=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,i,a),s=o&&o.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let l=i;l<a;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0}canReplaceWith(e,t,n,i){if(i&&!this.type.allowsMarks(i))return!1;let a=this.contentMatchAt(e).matchType(n),o=a&&a.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Pt.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!Pt.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let i=Oe.fromJSON(e,t.content),a=e.nodeType(t.type).create(t.attrs,i,n);return a.type.checkAttrs(a.attrs),a}};ra.prototype.text=void 0;class ru extends ra{constructor(e,t,n,i){if(super(e,t,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):tb(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ru(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ru(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function tb(r,e){for(let t=r.length-1;t>=0;t--)e=r[t].type.name+"("+e+")";return e}class Ua{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new aQ(e,t);if(n.next==null)return Ua.empty;let i=rb(n);n.next&&n.err("Unexpected trailing text");let a=dQ(fQ(i));return hQ(a,n),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let i=this;for(let a=t;i&&a<n;a++)i=i.matchType(e.child(a).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let i=[this];function a(o,s){let l=o.matchFragment(e,n);if(l&&(!t||l.validEnd))return Oe.from(s.map(f=>f.createAndFill()));for(let f=0;f<o.next.length;f++){let{type:p,next:k}=o.next[f];if(!(p.isText||p.hasRequiredAttrs())&&i.indexOf(k)==-1){i.push(k);let T=a(k,s.concat(p));if(T)return T}}return null}return a(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let i=n.shift(),a=i.match;if(a.matchType(e)){let o=[];for(let s=i;s.type;s=s.via)o.push(s.type);return o.reverse()}for(let o=0;o<a.next.length;o++){let{type:s,next:l}=a.next[o];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in t)&&(!i.type||l.validEnd)&&(n.push({match:s.contentMatch,type:s,via:i}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let i=0;i<n.next.length;i++)e.indexOf(n.next[i].next)==-1&&t(n.next[i].next)}return t(this),e.map((n,i)=>{let a=i+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)a+=(o?", ":"")+n.next[o].type.name+"->"+e.indexOf(n.next[o].next);return a}).join(`
2
2
  `)}}Ua.empty=new Ua(!0);class aQ{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function rb(r){let e=[];do e.push(oQ(r));while(r.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function oQ(r){let e=[];do e.push(sQ(r));while(r.next&&r.next!=")"&&r.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function sQ(r){let e=cQ(r);for(;;)if(r.eat("+"))e={type:"plus",expr:e};else if(r.eat("*"))e={type:"star",expr:e};else if(r.eat("?"))e={type:"opt",expr:e};else if(r.eat("{"))e=lQ(r,e);else break;return e}function wv(r){/\D/.test(r.next)&&r.err("Expected number, got '"+r.next+"'");let e=Number(r.next);return r.pos++,e}function lQ(r,e){let t=wv(r),n=t;return r.eat(",")&&(r.next!="}"?n=wv(r):n=-1),r.eat("}")||r.err("Unclosed braced range"),{type:"range",min:t,max:n,expr:e}}function uQ(r,e){let t=r.nodeTypes,n=t[e];if(n)return[n];let i=[];for(let a in t){let o=t[a];o.isInGroup(e)&&i.push(o)}return i.length==0&&r.err("No node type or group '"+e+"' found"),i}function cQ(r){if(r.eat("(")){let e=rb(r);return r.eat(")")||r.err("Missing closing paren"),e}else if(/\W/.test(r.next))r.err("Unexpected token '"+r.next+"'");else{let e=uQ(r,r.next).map(t=>(r.inline==null?r.inline=t.isInline:r.inline!=t.isInline&&r.err("Mixing inline and block content"),{type:"name",value:t}));return r.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function fQ(r){let e=[[]];return i(a(r,0),t()),e;function t(){return e.push([])-1}function n(o,s,l){let f={term:l,to:s};return e[o].push(f),f}function i(o,s){o.forEach(l=>l.to=s)}function a(o,s){if(o.type=="choice")return o.exprs.reduce((l,f)=>l.concat(a(f,s)),[]);if(o.type=="seq")for(let l=0;;l++){let f=a(o.exprs[l],s);if(l==o.exprs.length-1)return f;i(f,s=t())}else if(o.type=="star"){let l=t();return n(s,l),i(a(o.expr,l),l),[n(l)]}else if(o.type=="plus"){let l=t();return i(a(o.expr,s),l),i(a(o.expr,l),l),[n(l)]}else{if(o.type=="opt")return[n(s)].concat(a(o.expr,s));if(o.type=="range"){let l=s;for(let f=0;f<o.min;f++){let p=t();i(a(o.expr,l),p),l=p}if(o.max==-1)i(a(o.expr,l),l);else for(let f=o.min;f<o.max;f++){let p=t();n(l,p),i(a(o.expr,l),p),l=p}return[n(l)]}else{if(o.type=="name")return[n(s,void 0,o.value)];throw new Error("Unknown expr type")}}}}function nb(r,e){return e-r}function Cv(r,e){let t=[];return n(e),t.sort(nb);function n(i){let a=r[i];if(a.length==1&&!a[0].term)return n(a[0].to);t.push(i);for(let o=0;o<a.length;o++){let{term:s,to:l}=a[o];!s&&t.indexOf(l)==-1&&n(l)}}}function dQ(r){let e=Object.create(null);return t(Cv(r,0));function t(n){let i=[];n.forEach(o=>{r[o].forEach(({term:s,to:l})=>{if(!s)return;let f;for(let p=0;p<i.length;p++)i[p][0]==s&&(f=i[p][1]);Cv(r,l).forEach(p=>{f||i.push([s,f=[]]),f.indexOf(p)==-1&&f.push(p)})})});let a=e[n.join(",")]=new Ua(n.indexOf(r.length-1)>-1);for(let o=0;o<i.length;o++){let s=i[o][1].sort(nb);a.next.push({type:i[o][0],next:e[s.join(",")]||t(s)})}return a}}function hQ(r,e){for(let t=0,n=[r];t<n.length;t++){let i=n[t],a=!i.validEnd,o=[];for(let s=0;s<i.next.length;s++){let{type:l,next:f}=i.next[s];o.push(l.name),a&&!(l.isText||l.hasRequiredAttrs())&&(a=!1),n.indexOf(f)==-1&&n.push(f)}a&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ib(r){let e=Object.create(null);for(let t in r){let n=r[t];if(!n.hasDefault)return null;e[t]=n.default}return e}function ab(r,e){let t=Object.create(null);for(let n in r){let i=e&&e[n];if(i===void 0){let a=r[n];if(a.hasDefault)i=a.default;else throw new RangeError("No value supplied for attribute "+n)}t[n]=i}return t}function ob(r,e,t,n){for(let i in e)if(!(i in r))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${i}`);for(let i in r){let a=r[i];a.validate&&a.validate(e[i])}}function sb(r,e){let t=Object.create(null);if(e)for(let n in e)t[n]=new vQ(r,n,e[n]);return t}let Tv=class lb{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=sb(e,n.attrs),this.defaultAttrs=ib(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Ua.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:ab(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new ra(this,this.computeAttrs(e),Oe.from(t),Pt.setFrom(n))}createChecked(e=null,t,n){return t=Oe.from(t),this.checkContent(t),new ra(this,this.computeAttrs(e),t,Pt.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=Oe.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),a=i&&i.fillBefore(Oe.empty,!0);return a?new ra(this,e,t.append(a),Pt.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){ob(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:Pt.none:e}static compile(e,t){let n=Object.create(null);e.forEach((a,o)=>n[a]=new lb(a,t,o));let i=t.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let a in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function pQ(r,e,t){let n=t.split("|");return i=>{let a=i===null?"null":typeof i;if(n.indexOf(a)<0)throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${r}, got ${a}`)}}class vQ{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?pQ(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class Mu{constructor(e,t,n,i){this.name=e,this.rank=t,this.schema=n,this.spec=i,this.attrs=sb(e,i.attrs),this.excluded=null;let a=ib(this.attrs);this.instance=a?new Pt(this,a):null}create(e=null){return!e&&this.instance?this.instance:new Pt(this,ab(this.attrs,e))}static compile(e,t){let n=Object.create(null),i=0;return e.forEach((a,o)=>n[a]=new Mu(a,i++,t,o)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){ob(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class ub{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=Or.from(e.nodes),t.marks=Or.from(e.marks||{}),this.nodes=Tv.compile(this.spec.nodes,this),this.marks=Mu.compile(this.spec.marks,this);let n=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let a=this.nodes[i],o=a.spec.content||"",s=a.spec.marks;if(a.contentMatch=n[o]||(n[o]=Ua.parse(o,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!a.isInline||!a.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=a}a.markSet=s=="_"?null:s?Sv(this,s.split(" ")):s==""||!a.inlineContent?[]:null}for(let i in this.marks){let a=this.marks[i],o=a.spec.excludes;a.excluded=o==null?[a]:o==""?[]:Sv(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Tv){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,n,i)}text(e,t){let n=this.nodes.text;return new ru(n,n.defaultAttrs,e,Pt.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return ra.fromJSON(this,e)}markFromJSON(e){return Pt.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Sv(r,e){let t=[];for(let n=0;n<e.length;n++){let i=e[n],a=r.marks[i],o=a;if(a)t.push(a);else for(let s in r.marks){let l=r.marks[s];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&t.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return t}function mQ(r){return r.tag!=null}function gQ(r){return r.style!=null}class $a{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(i=>{if(mQ(i))this.tags.push(i);else if(gQ(i)){let a=/[^=]*/.exec(i.style)[0];n.indexOf(a)<0&&n.push(a),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let a=e.nodes[i.node];return a.contentMatch.matchType(a)})}parse(e,t={}){let n=new Ev(this,t,!1);return n.addAll(e,Pt.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Ev(this,t,!0);return n.addAll(e,Pt.none,t.from,t.to),Ue.maxOpen(n.finish())}matchTag(e,t,n){for(let i=n?this.tags.indexOf(n)+1:0;i<this.tags.length;i++){let a=this.tags[i];if(kQ(e,a.tag)&&(a.namespace===void 0||e.namespaceURI==a.namespace)&&(!a.context||t.matchesContext(a.context))){if(a.getAttrs){let o=a.getAttrs(e);if(o===!1)continue;a.attrs=o||void 0}return a}}}matchStyle(e,t,n,i){for(let a=i?this.styles.indexOf(i)+1:0;a<this.styles.length;a++){let o=this.styles[a],s=o.style;if(!(s.indexOf(e)!=0||o.context&&!n.matchesContext(o.context)||s.length>e.length&&(s.charCodeAt(e.length)!=61||s.slice(e.length+1)!=t))){if(o.getAttrs){let l=o.getAttrs(t);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let t=[];function n(i){let a=i.priority==null?50:i.priority,o=0;for(;o<t.length;o++){let s=t[o];if((s.priority==null?50:s.priority)<a)break}t.splice(o,0,i)}for(let i in e.marks){let a=e.marks[i].spec.parseDOM;a&&a.forEach(o=>{n(o=Mv(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let a=e.nodes[i].spec.parseDOM;a&&a.forEach(o=>{n(o=Mv(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new $a(e,$a.schemaRules(e)))}}const cb={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},yQ={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},fb={ol:!0,ul:!0},Ms=1,pd=2,zl=4;function xv(r,e,t){return e!=null?(e?Ms:0)|(e==="full"?pd:0):r&&r.whitespace=="pre"?Ms|pd:t&-5}class Ol{constructor(e,t,n,i,a,o){this.type=e,this.attrs=t,this.marks=n,this.solid=i,this.options=o,this.content=[],this.activeMarks=Pt.none,this.match=a||(o&zl?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(Oe.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let n=this.type.contentMatch,i;return(i=n.findWrapping(e.type))?(this.match=n,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Ms)){let n=this.content[this.content.length-1],i;if(n&&n.isText&&(i=/[ \t\r\n\u000c]+$/.exec(n.text))){let a=n;n.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-i[0].length))}}let t=Oe.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(Oe.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!cb.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ev{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let i=t.topNode,a,o=xv(null,t.preserveWhitespace,0)|(n?zl:0);i?a=new Ol(i.type,i.attrs,Pt.none,!0,t.topMatch||i.type.contentMatch,o):n?a=new Ol(null,null,Pt.none,!0,null,o):a=new Ol(e.schema.topNodeType,null,Pt.none,!0,null,o),this.nodes=[a],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,i=this.top,a=i.options&pd?"full":this.localPreserveWS||(i.options&Ms)>0;if(a==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(a)a!=="full"?n=n.replace(/\r?\n|\r/g," "):n=n.replace(/\r\n?/g,`
3
3
  `);else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let o=i.content[i.content.length-1],s=e.previousSibling;(!o||s&&s.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let i=this.localPreserveWS,a=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),s;fb.hasOwnProperty(o)&&this.parser.normalizeLists&&bQ(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,n));e:if(l?l.ignore:yQ.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let f,p=this.needsBlock;if(cb.hasOwnProperty(o))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),f=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let k=l&&l.skip?t:this.readStyles(e,t);k&&this.addAll(e,k),f&&this.sync(a),this.needsBlock=p}else{let f=this.readStyles(e,t);f&&this.addElementByRule(e,l,f,l.consuming===!1?s:void 0)}this.localPreserveWS=i}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
4
  `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let a=this.parser.matchedStyles[i],o=n.getPropertyValue(a);if(o)for(let s=void 0;;){let l=this.parser.matchStyle(a,o,this,s);if(!l)break;if(l.ignore)return null;if(l.clearMark?t=t.filter(f=>!l.clearMark(f)):t=t.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)s=l;else break}}return t}addElementByRule(e,t,n,i){let a,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),n,e.nodeName=="BR")||this.leafFallback(e,n);else{let l=this.enter(o,t.attrs||null,n,t.preserveWhitespace);l&&(a=!0,n=l)}else{let l=this.parser.schema.marks[t.mark];n=n.concat(l.create(t.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,n,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,n,!1));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l,n),this.findAround(e,l,!1)}a&&this.sync(s)&&this.open--}addAll(e,t,n,i){let a=n||0;for(let o=n?e.childNodes[n]:e.firstChild,s=i==null?null:e.childNodes[i];o!=s;o=o.nextSibling,++a)this.findAtPoint(e,a),this.addDOM(o,t);this.findAtPoint(e,a)}findPlace(e,t,n){let i,a;for(let o=this.open,s=0;o>=0;o--){let l=this.nodes[o],f=l.findWrapping(e);if(f&&(!i||i.length>f.length+s)&&(i=f,a=l,!f.length))break;if(l.solid){if(n)break;s+=2}}if(!i)return null;this.sync(a);for(let o=0;o<i.length;o++)t=this.enterInner(i[o],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(t=this.enterInner(a,null,t))}let i=this.findPlace(e,t,n);if(i){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(e.type));let o=Pt.none;for(let s of i.concat(e.marks))(a.type?a.type.allowsMarkType(s.type):Av(s.type,e.type))&&(o=s.addToSet(o));return a.content.push(e.mark(o)),!0}return!1}enter(e,t,n,i){let a=this.findPlace(e.create(t),n,!1);return a&&(a=this.enterInner(e,t,n,!0,i)),a}enterInner(e,t,n,i=!1,a){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let s=xv(e,a,o.options);o.options&zl&&o.content.length==0&&(s|=zl);let l=Pt.none;return n=n.filter(f=>(o.type?o.type.allowsMarkType(f.type):Av(f.type,e))?(l=f.addToSet(l),!1):!0),this.nodes.push(new Ol(e,t,l,i,null,s)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Ms)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let i=n.length-1;i>=0;i--)e+=n[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(n?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),a=-(n?n.depth+1:0)+(i?0:1),o=(s,l)=>{for(;s>=0;s--){let f=t[s];if(f==""){if(s==t.length-1||s==0)continue;for(;l>=a;l--)if(o(s-1,l))return!0;return!1}else{let p=l>0||l==0&&i?this.nodes[l].type:n&&l>=a?n.node(l-a).type:null;if(!p||p.name!=f&&!p.isInGroup(f))return!1;l--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let n=this.parser.schema.nodes[t];if(n.isTextblock&&n.defaultAttrs)return n}}}function bQ(r){for(let e=r.firstChild,t=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&fb.hasOwnProperty(n)&&t?(t.appendChild(e),e=t):n=="li"?t=e:n&&(t=null)}}function kQ(r,e){return(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,e)}function Mv(r){let e={};for(let t in r)e[t]=r[t];return e}function Av(r,e){let t=e.schema.nodes;for(let n in t){let i=t[n];if(!i.allowsMarkType(r))continue;let a=[],o=s=>{a.push(s);for(let l=0;l<s.edgeCount;l++){let{type:f,next:p}=s.edge(l);if(f==e||a.indexOf(p)<0&&o(p))return!0}};if(o(i.contentMatch))return!0}}class Jo{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=Sf(t).createDocumentFragment());let i=n,a=[];return e.forEach(o=>{if(a.length||o.marks.length){let s=0,l=0;for(;s<a.length&&l<o.marks.length;){let f=o.marks[l];if(!this.marks[f.type.name]){l++;continue}if(!f.eq(a[s][0])||f.type.spec.spanning===!1)break;s++,l++}for(;s<a.length;)i=a.pop()[1];for(;l<o.marks.length;){let f=o.marks[l++],p=this.serializeMark(f,o.isInline,t);p&&(a.push([f,i]),i.appendChild(p.dom),i=p.contentDOM||p.dom)}}i.appendChild(this.serializeNodeInner(o,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:i}=Vl(Sf(t),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let a=this.serializeMark(e.marks[i],e.isInline,t);a&&((a.contentDOM||a.dom).appendChild(n),n=a.dom)}return n}serializeMark(e,t,n={}){let i=this.marks[e.type.name];return i&&Vl(Sf(n),i(e,t),null,e.attrs)}static renderSpec(e,t,n=null,i){return Vl(e,t,n,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Jo(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Ov(e.nodes);return t.text||(t.text=n=>n.text),t}static marksFromSchema(e){return Ov(e.marks)}}function Ov(r){let e={};for(let t in r){let n=r[t].spec.toDOM;n&&(e[t]=n)}return e}function Sf(r){return r.document||window.document}const Nv=new WeakMap;function wQ(r){let e=Nv.get(r);return e===void 0&&Nv.set(r,e=CQ(r)),e}function CQ(r){let e=null;function t(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")e||(e=[]),e.push(n);else for(let i=0;i<n.length;i++)t(n[i]);else for(let i in n)t(n[i])}return t(r),e}function Vl(r,e,t,n){if(typeof e=="string")return{dom:r.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],a;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(n&&(a=wQ(n))&&a.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(t=i.slice(0,o),i=i.slice(o+1));let s,l=t?r.createElementNS(t,i):r.createElement(i),f=e[1],p=1;if(f&&typeof f=="object"&&f.nodeType==null&&!Array.isArray(f)){p=2;for(let k in f)if(f[k]!=null){let T=k.indexOf(" ");T>0?l.setAttributeNS(k.slice(0,T),k.slice(T+1),f[k]):l.setAttribute(k,f[k])}}for(let k=p;k<e.length;k++){let T=e[k];if(T===0){if(k<e.length-1||k>p)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:x,contentDOM:E}=Vl(r,T,t,n);if(l.appendChild(x),E){if(s)throw new RangeError("Multiple content holes");s=E}}}return{dom:l,contentDOM:s}}const db=65535,hb=Math.pow(2,16);function TQ(r,e){return r+e*hb}function Dv(r){return r&db}function SQ(r){return(r-(r&db))/hb}const pb=1,vb=2,Ul=4,mb=8;class vd{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&mb)>0}get deletedBefore(){return(this.delInfo&(pb|Ul))>0}get deletedAfter(){return(this.delInfo&(vb|Ul))>0}get deletedAcross(){return(this.delInfo&Ul)>0}}class un{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&un.empty)return un.empty}recover(e){let t=0,n=Dv(e);if(!this.inverted)for(let i=0;i<n;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[n*3]+t+SQ(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let i=0,a=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?i:0);if(l>e)break;let f=this.ranges[s+a],p=this.ranges[s+o],k=l+f;if(e<=k){let T=f?e==l?-1:e==k?1:t:t,x=l+i+(T<0?0:p);if(n)return x;let E=e==(t<0?l:k)?null:TQ(s/3,e-l),P=e==l?vb:e==k?pb:Ul;return(t<0?e!=l:e!=k)&&(P|=mb),new vd(x,P,E)}i+=p-f}return n?e+i:new vd(e+i,0,null)}touches(e,t){let n=0,i=Dv(t),a=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?n:0);if(l>e)break;let f=this.ranges[s+a],p=l+f;if(e<=p&&s==i*3)return!0;n+=this.ranges[s+o]-f}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let i=0,a=0;i<this.ranges.length;i+=3){let o=this.ranges[i],s=o-(this.inverted?a:0),l=o+(this.inverted?0:a),f=this.ranges[i+t],p=this.ranges[i+n];e(s,s+f,l,l+p),a+=p-f}}invert(){return new un(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?un.empty:new un(e<0?[0,-e,0]:[0,0,e])}}un.empty=new un([]);class As{constructor(e,t,n=0,i=e?e.length:0){this.mirror=t,this.from=n,this.to=i,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new As(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let i=e.getMirror(t);this.appendMap(e._maps[t],i!=null&&i<t?n+i:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?n-i-1:void 0)}}invert(){let e=new As;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let i=0;for(let a=this.from;a<this.to;a++){let o=this._maps[a],s=o.mapResult(e,t);if(s.recover!=null){let l=this.getMirror(a);if(l!=null&&l>a&&l<this.to){a=l,e=this._maps[l].recover(s.recover);continue}}i|=s.delInfo,e=s.pos}return n?e:new vd(e,i,null)}}const xf=Object.create(null);class Ur{getMap(){return un.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=xf[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in xf)throw new RangeError("Duplicate use of step JSON ID "+e);return xf[e]=t,t.prototype.jsonID=e,t}}class hr{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new hr(e,null)}static fail(e){return new hr(null,e)}static fromReplace(e,t,n,i){try{return hr.ok(e.replace(t,n,i))}catch(a){if(a instanceof Ql)return hr.fail(a.message);throw a}}}function eh(r,e,t){let n=[];for(let i=0;i<r.childCount;i++){let a=r.child(i);a.content.size&&(a=a.copy(eh(a.content,e,a))),a.isInline&&(a=e(a,t,i)),n.push(a)}return Oe.fromArray(n)}class Qi extends Ur{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),a=new Ue(eh(t.content,(o,s)=>!o.isAtom||!s.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return hr.fromReplace(e,this.from,this.to,a)}invert(){return new oi(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new Qi(t.pos,n.pos,this.mark)}merge(e){return e instanceof Qi&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Qi(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Qi(t.from,t.to,e.markFromJSON(t.mark))}}Ur.jsonID("addMark",Qi);class oi extends Ur{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new Ue(eh(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return hr.fromReplace(e,this.from,this.to,n)}invert(){return new Qi(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new oi(t.pos,n.pos,this.mark)}merge(e){return e instanceof oi&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new oi(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new oi(t.from,t.to,e.markFromJSON(t.mark))}}Ur.jsonID("removeMark",oi);class ea extends Ur{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return hr.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return hr.fromReplace(e,this.pos,this.pos+1,new Ue(Oe.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let n=this.mark.addToSet(t.marks);if(n.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(n))return new ea(this.pos,t.marks[i]);return new ea(this.pos,this.mark)}}return new Wa(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ea(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ea(t.pos,e.markFromJSON(t.mark))}}Ur.jsonID("addNodeMark",ea);class Wa extends Ur{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return hr.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return hr.fromReplace(e,this.pos,this.pos+1,new Ue(Oe.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new ea(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Wa(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Wa(t.pos,e.markFromJSON(t.mark))}}Ur.jsonID("removeNodeMark",Wa);class _r extends Ur{constructor(e,t,n,i=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=i}apply(e){return this.structure&&md(e,this.from,this.to)?hr.fail("Structure replace would overwrite content"):hr.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new un([this.from,this.to-this.from,this.slice.size])}invert(e){return new _r(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new _r(t.pos,Math.max(t.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof _r)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?Ue.empty:new Ue(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new _r(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?Ue.empty:new Ue(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new _r(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new _r(t.from,t.to,Ue.fromJSON(e,t.slice),!!t.structure)}}Ur.jsonID("replace",_r);class Sr extends Ur{constructor(e,t,n,i,a,o,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=i,this.slice=a,this.insert=o,this.structure=s}apply(e){if(this.structure&&(md(e,this.from,this.gapFrom)||md(e,this.gapTo,this.to)))return hr.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return hr.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?hr.fromReplace(e,this.from,this.to,n):hr.fail("Content does not fit in gap")}getMap(){return new un([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Sr(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),a=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||i<t.pos||a>n.pos?null:new Sr(t.pos,n.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Sr(t.from,t.to,t.gapFrom,t.gapTo,Ue.fromJSON(e,t.slice),t.insert,!!t.structure)}}Ur.jsonID("replaceAround",Sr);function md(r,e,t){let n=r.resolve(e),i=t-e,a=n.depth;for(;i>0&&a>0&&n.indexAfter(a)==n.node(a).childCount;)a--,i--;if(i>0){let o=n.node(a).maybeChild(n.indexAfter(a));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function xQ(r,e,t,n){let i=[],a=[],o,s;r.doc.nodesBetween(e,t,(l,f,p)=>{if(!l.isInline)return;let k=l.marks;if(!n.isInSet(k)&&p.type.allowsMarkType(n.type)){let T=Math.max(f,e),x=Math.min(f+l.nodeSize,t),E=n.addToSet(k);for(let P=0;P<k.length;P++)k[P].isInSet(E)||(o&&o.to==T&&o.mark.eq(k[P])?o.to=x:i.push(o=new oi(T,x,k[P])));s&&s.to==T?s.to=x:a.push(s=new Qi(T,x,n))}}),i.forEach(l=>r.step(l)),a.forEach(l=>r.step(l))}function EQ(r,e,t,n){let i=[],a=0;r.doc.nodesBetween(e,t,(o,s)=>{if(!o.isInline)return;a++;let l=null;if(n instanceof Mu){let f=o.marks,p;for(;p=n.isInSet(f);)(l||(l=[])).push(p),f=p.removeFromSet(f)}else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length){let f=Math.min(s+o.nodeSize,t);for(let p=0;p<l.length;p++){let k=l[p],T;for(let x=0;x<i.length;x++){let E=i[x];E.step==a-1&&k.eq(i[x].style)&&(T=E)}T?(T.to=f,T.step=a):i.push({style:k,from:Math.max(s,e),to:f,step:a})}}}),i.forEach(o=>r.step(new oi(o.from,o.to,o.style)))}function th(r,e,t,n=t.contentMatch,i=!0){let a=r.doc.nodeAt(e),o=[],s=e+1;for(let l=0;l<a.childCount;l++){let f=a.child(l),p=s+f.nodeSize,k=n.matchType(f.type);if(!k)o.push(new _r(s,p,Ue.empty));else{n=k;for(let T=0;T<f.marks.length;T++)t.allowsMarkType(f.marks[T].type)||r.step(new oi(s,p,f.marks[T]));if(i&&f.isText&&t.whitespace!="pre"){let T,x=/\r?\n|\r/g,E;for(;T=x.exec(f.text);)E||(E=new Ue(Oe.from(t.schema.text(" ",t.allowedMarks(f.marks))),0,0)),o.push(new _r(s+T.index,s+T.index+T[0].length,E))}}s=p}if(!n.validEnd){let l=n.fillBefore(Oe.empty,!0);r.replace(s,s,new Ue(l,0,0))}for(let l=o.length-1;l>=0;l--)r.step(o[l])}function MQ(r,e,t){return(e==0||r.canReplace(e,r.childCount))&&(t==r.childCount||r.canReplace(0,t))}function Au(r){let t=r.parent.content.cutByIndex(r.startIndex,r.endIndex);for(let n=r.depth;;--n){let i=r.$from.node(n),a=r.$from.index(n),o=r.$to.indexAfter(n);if(n<r.depth&&i.canReplace(a,o,t))return n;if(n==0||i.type.spec.isolating||!MQ(i,a,o))break}return null}function AQ(r,e,t){let{$from:n,$to:i,depth:a}=e,o=n.before(a+1),s=i.after(a+1),l=o,f=s,p=Oe.empty,k=0;for(let E=a,P=!1;E>t;E--)P||n.index(E)>0?(P=!0,p=Oe.from(n.node(E).copy(p)),k++):l--;let T=Oe.empty,x=0;for(let E=a,P=!1;E>t;E--)P||i.after(E+1)<i.end(E)?(P=!0,T=Oe.from(i.node(E).copy(T)),x++):f++;r.step(new Sr(l,f,o,s,new Ue(p.append(T),k,x),p.size-k,!0))}function OQ(r,e,t=null,n=r){let i=NQ(r,e),a=i&&DQ(n,e);return a?i.map(Lv).concat({type:e,attrs:t}).concat(a.map(Lv)):null}function Lv(r){return{type:r,attrs:null}}function NQ(r,e){let{parent:t,startIndex:n,endIndex:i}=r,a=t.contentMatchAt(n).findWrapping(e);if(!a)return null;let o=a.length?a[0]:e;return t.canReplaceWith(n,i,o)?a:null}function DQ(r,e){let{parent:t,startIndex:n,endIndex:i}=r,a=t.child(n),o=e.contentMatch.findWrapping(a.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let f=n;l&&f<i;f++)l=l.matchType(t.child(f).type);return!l||!l.validEnd?null:o}function LQ(r,e,t){let n=Oe.empty;for(let o=t.length-1;o>=0;o--){if(n.size){let s=t[o].type.contentMatch.matchFragment(n);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=Oe.from(t[o].type.create(t[o].attrs,n))}let i=e.start,a=e.end;r.step(new Sr(i,a,i,a,new Ue(n,0,0),t.length,!0))}function RQ(r,e,t,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=r.steps.length;r.doc.nodesBetween(e,t,(o,s)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(n,l)&&IQ(r.doc,r.mapping.slice(a).map(s),n)){let f=null;if(n.schema.linebreakReplacement){let x=n.whitespace=="pre",E=!!n.contentMatch.matchType(n.schema.linebreakReplacement);x&&!E?f=!1:!x&&E&&(f=!0)}f===!1&&yb(r,o,s,a),th(r,r.mapping.slice(a).map(s,1),n,void 0,f===null);let p=r.mapping.slice(a),k=p.map(s,1),T=p.map(s+o.nodeSize,1);return r.step(new Sr(k,T,k+1,T-1,new Ue(Oe.from(n.create(l,null,o.marks)),0,0),1,!0)),f===!0&&gb(r,o,s,a),!1}})}function gb(r,e,t,n){e.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let l=r.mapping.slice(n).map(t+1+a+o.index);r.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function yb(r,e,t,n){e.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let o=r.mapping.slice(n).map(t+1+a);r.replaceWith(o,o+1,e.type.schema.text(`
@@ -1 +1 @@
1
- import{r as i,j as u}from"./app.js";import{c as j}from"./compiler-runtime-tM4jBQ-T.js";import{d as S,A as K,c as C,a as W,u as J,R as Q,P as Z,D as ee,C as te,e as oe}from"./index-Cdb9ACvz.js";import{u as H,a as re}from"./index-DrWfGwtf.js";import{c as ne}from"./index-D5ir9iUV.js";import{P as $}from"./index-BC0yfOHo.js";import{P as se}from"./index-K81GbF6O.js";import{R as ae}from"./index-BcE9FUM6.js";import{c as ie}from"./utils-DjqsqOe8.js";var[D,$e]=ne("Tooltip",[S]),O=S(),G="TooltipProvider",le=700,A="tooltip.open",[ce,k]=D(G),F=o=>{const{__scopeTooltip:e,delayDuration:t=le,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=i.useRef(!0),p=i.useRef(!1),a=i.useRef(0);return i.useEffect(()=>{const d=a.current;return()=>window.clearTimeout(d)},[]),u.jsx(ce,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:i.useCallback(()=>{window.clearTimeout(a.current),l.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:p,onPointerInTransitChange:i.useCallback(d=>{p.current=d},[]),disableHoverableContent:n,children:s})};F.displayName=G;var R="Tooltip",[ue,_]=D(R),z=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:p}=o,a=k(R,o.__scopeTooltip),d=O(e),[c,v]=i.useState(null),x=W(),f=i.useRef(0),m=l??a.disableHoverableContent,T=p??a.delayDuration,h=i.useRef(!1),[g,y]=J({prop:r,defaultProp:n??!1,onChange:I=>{I?(a.onOpen(),document.dispatchEvent(new CustomEvent(A))):a.onClose(),s==null||s(I)},caller:R}),w=i.useMemo(()=>g?h.current?"delayed-open":"instant-open":"closed",[g]),P=i.useCallback(()=>{window.clearTimeout(f.current),f.current=0,h.current=!1,y(!0)},[y]),E=i.useCallback(()=>{window.clearTimeout(f.current),f.current=0,y(!1)},[y]),N=i.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{h.current=!0,y(!0),f.current=0},T)},[T,y]);return i.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),u.jsx(Q,{...d,children:u.jsx(ue,{scope:e,contentId:x,open:g,stateAttribute:w,trigger:c,onTriggerChange:v,onTriggerEnter:i.useCallback(()=>{a.isOpenDelayedRef.current?N():P()},[a.isOpenDelayedRef,N,P]),onTriggerLeave:i.useCallback(()=>{m?E():(window.clearTimeout(f.current),f.current=0)},[E,m]),onOpen:P,onClose:E,disableHoverableContent:m,children:t})})};z.displayName=R;var L="TooltipTrigger",B=i.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(L,t),s=k(L,t),l=O(t),p=i.useRef(null),a=H(e,p,n.onTriggerChange),d=i.useRef(!1),c=i.useRef(!1),v=i.useCallback(()=>d.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),u.jsx(K,{asChild:!0,...l,children:u.jsx(se.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:a,onPointerMove:C(o.onPointerMove,x=>{x.pointerType!=="touch"&&!c.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),c.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),c.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),d.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{d.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});B.displayName=L;var M="TooltipPortal",[pe,de]=D(M,{forceMount:void 0}),U=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(M,e);return u.jsx(pe,{scope:e,forceMount:t,children:u.jsx($,{present:t||s.open,children:u.jsx(Z,{asChild:!0,container:n,children:r})})})};U.displayName=M;var b="TooltipContent",V=i.forwardRef((o,e)=>{const t=de(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(b,o.__scopeTooltip);return u.jsx($,{present:r||l.open,children:l.disableHoverableContent?u.jsx(Y,{side:n,...s,ref:e}):u.jsx(fe,{side:n,...s,ref:e})})}),fe=i.forwardRef((o,e)=>{const t=_(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=i.useRef(null),s=H(e,n),[l,p]=i.useState(null),{trigger:a,onClose:d}=t,c=n.current,{onPointerInTransitChange:v}=r,x=i.useCallback(()=>{p(null),v(!1)},[v]),f=i.useCallback((m,T)=>{const h=m.currentTarget,g={x:m.clientX,y:m.clientY},y=he(g,h.getBoundingClientRect()),w=Te(g,y),P=ye(T.getBoundingClientRect()),E=Ce([...w,...P]);p(E),v(!0)},[v]);return i.useEffect(()=>()=>x(),[x]),i.useEffect(()=>{if(a&&c){const m=h=>f(h,c),T=h=>f(h,a);return a.addEventListener("pointerleave",m),c.addEventListener("pointerleave",T),()=>{a.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",T)}}},[a,c,f,x]),i.useEffect(()=>{if(l){const m=T=>{const h=T.target,g={x:T.clientX,y:T.clientY},y=(a==null?void 0:a.contains(h))||(c==null?void 0:c.contains(h)),w=!ge(g,l);y?x():w&&(x(),d())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[a,c,l,d,x]),u.jsx(Y,{...o,ref:s})}),[ve,xe]=D(R,{isInside:!1}),me=re("TooltipContent"),Y=i.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...p}=o,a=_(b,t),d=O(t),{onClose:c}=a;return i.useEffect(()=>(document.addEventListener(A,c),()=>document.removeEventListener(A,c)),[c]),i.useEffect(()=>{if(a.trigger){const v=x=>{const f=x.target;f!=null&&f.contains(a.trigger)&&c()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[a.trigger,c]),u.jsx(ee,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:c,children:u.jsxs(te,{"data-state":a.stateAttribute,...d,...p,ref:e,style:{...p.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:[u.jsx(me,{children:r}),u.jsx(ve,{scope:t,isInside:!0,children:u.jsx(ae,{id:a.contentId,role:"tooltip",children:n||r})})]})})});V.displayName=b;var q="TooltipArrow",X=i.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=O(t);return xe(q,t).isInside?null:u.jsx(oe,{...n,...r,ref:e})});X.displayName=q;function he(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Te(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function ye(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function ge(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const p=e[s],a=e[l],d=p.x,c=p.y,v=a.x,x=a.y;c>r!=x>r&&t<(v-d)*(r-c)/(x-c)+d&&(n=!n)}return n}function Ce(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),be(e)}function be(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var we=F,Pe=z,Ee=B,Re=U,_e=V,je=X;function De(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=u.jsx(we,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Ge(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=u.jsx(De,{children:u.jsx(Pe,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Fe(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=u.jsx(Ee,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function ze(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let p;e[5]!==r?(p=ie("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),e[5]=r,e[6]=p):p=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=u.jsx(je,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=a):a=e[7];let d;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==p?(d=u.jsx(Re,{children:u.jsxs(_e,{"data-slot":"tooltip-content",sideOffset:l,className:p,...n,children:[t,a]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=p,e[12]=d):d=e[12],d}export{De as T,Ge as a,Fe as b,ze as c};
1
+ import{r as i,j as u}from"./app.js";import{c as j}from"./compiler-runtime-CMDe02AS.js";import{d as S,A as K,c as C,b as W,u as J,e as Q,P as Z,D as ee,C as te,f as oe}from"./index-C8anOJBB.js";import{u as H,c as re}from"./index-HZzILD42.js";import{c as ne}from"./index-D5ir9iUV.js";import{P as $}from"./index-kzaPFHKt.js";import{P as se}from"./index-CsMwA9pu.js";import{R as ae}from"./index-BRQOFOzQ.js";import{c as ie}from"./utils-DjqsqOe8.js";var[D,$e]=ne("Tooltip",[S]),O=S(),G="TooltipProvider",le=700,A="tooltip.open",[ce,k]=D(G),F=o=>{const{__scopeTooltip:e,delayDuration:t=le,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=i.useRef(!0),p=i.useRef(!1),a=i.useRef(0);return i.useEffect(()=>{const d=a.current;return()=>window.clearTimeout(d)},[]),u.jsx(ce,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:i.useCallback(()=>{window.clearTimeout(a.current),l.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:p,onPointerInTransitChange:i.useCallback(d=>{p.current=d},[]),disableHoverableContent:n,children:s})};F.displayName=G;var R="Tooltip",[ue,_]=D(R),z=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:p}=o,a=k(R,o.__scopeTooltip),d=O(e),[c,v]=i.useState(null),x=W(),f=i.useRef(0),m=l??a.disableHoverableContent,T=p??a.delayDuration,h=i.useRef(!1),[g,y]=J({prop:r,defaultProp:n??!1,onChange:I=>{I?(a.onOpen(),document.dispatchEvent(new CustomEvent(A))):a.onClose(),s==null||s(I)},caller:R}),w=i.useMemo(()=>g?h.current?"delayed-open":"instant-open":"closed",[g]),P=i.useCallback(()=>{window.clearTimeout(f.current),f.current=0,h.current=!1,y(!0)},[y]),E=i.useCallback(()=>{window.clearTimeout(f.current),f.current=0,y(!1)},[y]),N=i.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{h.current=!0,y(!0),f.current=0},T)},[T,y]);return i.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),u.jsx(Q,{...d,children:u.jsx(ue,{scope:e,contentId:x,open:g,stateAttribute:w,trigger:c,onTriggerChange:v,onTriggerEnter:i.useCallback(()=>{a.isOpenDelayedRef.current?N():P()},[a.isOpenDelayedRef,N,P]),onTriggerLeave:i.useCallback(()=>{m?E():(window.clearTimeout(f.current),f.current=0)},[E,m]),onOpen:P,onClose:E,disableHoverableContent:m,children:t})})};z.displayName=R;var L="TooltipTrigger",B=i.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(L,t),s=k(L,t),l=O(t),p=i.useRef(null),a=H(e,p,n.onTriggerChange),d=i.useRef(!1),c=i.useRef(!1),v=i.useCallback(()=>d.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),u.jsx(K,{asChild:!0,...l,children:u.jsx(se.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:a,onPointerMove:C(o.onPointerMove,x=>{x.pointerType!=="touch"&&!c.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),c.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),c.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),d.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{d.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});B.displayName=L;var M="TooltipPortal",[pe,de]=D(M,{forceMount:void 0}),U=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(M,e);return u.jsx(pe,{scope:e,forceMount:t,children:u.jsx($,{present:t||s.open,children:u.jsx(Z,{asChild:!0,container:n,children:r})})})};U.displayName=M;var b="TooltipContent",V=i.forwardRef((o,e)=>{const t=de(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(b,o.__scopeTooltip);return u.jsx($,{present:r||l.open,children:l.disableHoverableContent?u.jsx(Y,{side:n,...s,ref:e}):u.jsx(fe,{side:n,...s,ref:e})})}),fe=i.forwardRef((o,e)=>{const t=_(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=i.useRef(null),s=H(e,n),[l,p]=i.useState(null),{trigger:a,onClose:d}=t,c=n.current,{onPointerInTransitChange:v}=r,x=i.useCallback(()=>{p(null),v(!1)},[v]),f=i.useCallback((m,T)=>{const h=m.currentTarget,g={x:m.clientX,y:m.clientY},y=he(g,h.getBoundingClientRect()),w=Te(g,y),P=ye(T.getBoundingClientRect()),E=Ce([...w,...P]);p(E),v(!0)},[v]);return i.useEffect(()=>()=>x(),[x]),i.useEffect(()=>{if(a&&c){const m=h=>f(h,c),T=h=>f(h,a);return a.addEventListener("pointerleave",m),c.addEventListener("pointerleave",T),()=>{a.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",T)}}},[a,c,f,x]),i.useEffect(()=>{if(l){const m=T=>{const h=T.target,g={x:T.clientX,y:T.clientY},y=(a==null?void 0:a.contains(h))||(c==null?void 0:c.contains(h)),w=!ge(g,l);y?x():w&&(x(),d())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[a,c,l,d,x]),u.jsx(Y,{...o,ref:s})}),[ve,xe]=D(R,{isInside:!1}),me=re("TooltipContent"),Y=i.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...p}=o,a=_(b,t),d=O(t),{onClose:c}=a;return i.useEffect(()=>(document.addEventListener(A,c),()=>document.removeEventListener(A,c)),[c]),i.useEffect(()=>{if(a.trigger){const v=x=>{const f=x.target;f!=null&&f.contains(a.trigger)&&c()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[a.trigger,c]),u.jsx(ee,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:c,children:u.jsxs(te,{"data-state":a.stateAttribute,...d,...p,ref:e,style:{...p.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:[u.jsx(me,{children:r}),u.jsx(ve,{scope:t,isInside:!0,children:u.jsx(ae,{id:a.contentId,role:"tooltip",children:n||r})})]})})});V.displayName=b;var q="TooltipArrow",X=i.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=O(t);return xe(q,t).isInside?null:u.jsx(oe,{...n,...r,ref:e})});X.displayName=q;function he(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Te(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function ye(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function ge(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const p=e[s],a=e[l],d=p.x,c=p.y,v=a.x,x=a.y;c>r!=x>r&&t<(v-d)*(r-c)/(x-c)+d&&(n=!n)}return n}function Ce(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),be(e)}function be(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var we=F,Pe=z,Ee=B,Re=U,_e=V,je=X;function De(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=u.jsx(we,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Ge(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=u.jsx(De,{children:u.jsx(Pe,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Fe(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=u.jsx(Ee,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function ze(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let p;e[5]!==r?(p=ie("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),e[5]=r,e[6]=p):p=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=u.jsx(je,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=a):a=e[7];let d;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==p?(d=u.jsx(Re,{children:u.jsxs(_e,{"data-slot":"tooltip-content",sideOffset:l,className:p,...n,children:[t,a]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=p,e[12]=d):d=e[12],d}export{De as T,Ge as a,Fe as b,ze as c};
@@ -1 +1 @@
1
- import{c as S}from"./compiler-runtime-tM4jBQ-T.js";import{r as l}from"./app.js";const y=()=>typeof window>"u"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,E=(e,a,r=365)=>{if(typeof document>"u")return;const o=r*24*60*60;document.cookie=`${e}=${a};path=/;max-age=${o};SameSite=Lax`},c=e=>{const a=e==="dark"||e==="system"&&y();document.documentElement.classList.toggle("dark",a)},w=()=>typeof window>"u"?null:window.matchMedia("(prefers-color-scheme: dark)"),v=()=>{const e=localStorage.getItem("appearance");c(e||"light")};function C(){var a;const e=localStorage.getItem("appearance")||"system";c(e),(a=w())==null||a.addEventListener("change",v)}function L(){const e=S.c(6),[a,r]=l.useState("system"),[o,g]=l.useState(!1);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=n=>{g(!0),r(n),localStorage.setItem("appearance",n),E("appearance",n),c(n),setTimeout(()=>{g(!1),window.dispatchEvent(new Event("appearanceChanged"))},0)},e[0]=s):s=e[0];const d=s;let p,i;e[1]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{const n=localStorage.getItem("appearance");d(n||"light");const h=t=>{if(t.key==="appearance"){const f=t.newValue;r(f),c(f)}},u=()=>{const t=localStorage.getItem("appearance");r(t),c(t)};return window.addEventListener("storage",h),window.addEventListener("appearanceChanged",u),()=>{var t;window.removeEventListener("storage",h),window.removeEventListener("appearanceChanged",u),(t=w())==null||t.removeEventListener("change",v)}},i=[d],e[1]=p,e[2]=i):(p=e[1],i=e[2]),l.useEffect(p,i);let m;return e[3]!==a||e[4]!==o?(m={appearance:a,updateAppearance:d,isThemeChanging:o},e[3]=a,e[4]=o,e[5]=m):m=e[5],m}export{C as i,L as u};
1
+ import{c as S}from"./compiler-runtime-CMDe02AS.js";import{r as l}from"./app.js";const y=()=>typeof window>"u"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,E=(e,a,r=365)=>{if(typeof document>"u")return;const o=r*24*60*60;document.cookie=`${e}=${a};path=/;max-age=${o};SameSite=Lax`},c=e=>{const a=e==="dark"||e==="system"&&y();document.documentElement.classList.toggle("dark",a)},w=()=>typeof window>"u"?null:window.matchMedia("(prefers-color-scheme: dark)"),v=()=>{const e=localStorage.getItem("appearance");c(e||"light")};function C(){var a;const e=localStorage.getItem("appearance")||"system";c(e),(a=w())==null||a.addEventListener("change",v)}function L(){const e=S.c(6),[a,r]=l.useState("system"),[o,g]=l.useState(!1);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=n=>{g(!0),r(n),localStorage.setItem("appearance",n),E("appearance",n),c(n),setTimeout(()=>{g(!1),window.dispatchEvent(new Event("appearanceChanged"))},0)},e[0]=s):s=e[0];const d=s;let p,i;e[1]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{const n=localStorage.getItem("appearance");d(n||"light");const h=t=>{if(t.key==="appearance"){const f=t.newValue;r(f),c(f)}},u=()=>{const t=localStorage.getItem("appearance");r(t),c(t)};return window.addEventListener("storage",h),window.addEventListener("appearanceChanged",u),()=>{var t;window.removeEventListener("storage",h),window.removeEventListener("appearanceChanged",u),(t=w())==null||t.removeEventListener("change",v)}},i=[d],e[1]=p,e[2]=i):(p=e[1],i=e[2]),l.useEffect(p,i);let m;return e[3]!==a||e[4]!==o?(m={appearance:a,updateAppearance:d,isThemeChanging:o},e[3]=a,e[4]=o,e[5]=m):m=e[5],m}export{C as i,L as u};
@@ -1 +1 @@
1
- import{c as s}from"./compiler-runtime-tM4jBQ-T.js";import{r}from"./app.js";const h=()=>{const e=s.c(3);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={width:typeof window<"u"?window.innerWidth:1024,height:typeof window<"u"?window.innerHeight:768},e[0]=i):i=e[0];const[d,w]=r.useState(i);let n,t;return e[1]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{if(typeof window>"u")return;const o=()=>{w({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},t=[],e[1]=n,e[2]=t):(n=e[1],t=e[2]),r.useEffect(n,t),d};export{h as u};
1
+ import{c as s}from"./compiler-runtime-CMDe02AS.js";import{r}from"./app.js";const h=()=>{const e=s.c(3);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={width:typeof window<"u"?window.innerWidth:1024,height:typeof window<"u"?window.innerHeight:768},e[0]=i):i=e[0];const[d,w]=r.useState(i);let n,t;return e[1]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{if(typeof window>"u")return;const o=()=>{w({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},t=[],e[1]=n,e[2]=t):(n=e[1],t=e[2]),r.useEffect(n,t),d};export{h as u};