studiograph 1.3.44-next.18 → 1.3.44-next.19

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 (57) hide show
  1. package/dist/web/_app/immutable/assets/4.mW_eX5Ef.css +1 -0
  2. package/dist/web/_app/immutable/chunks/{BC12QVnT.js → 1BE_eYuA.js} +1 -1
  3. package/dist/web/_app/immutable/chunks/{D5jnFiMI.js → 1HAw9TWK.js} +1 -1
  4. package/dist/web/_app/immutable/chunks/{eyshMEt_.js → B-g2Q4xM.js} +1 -1
  5. package/dist/web/_app/immutable/chunks/{B0qTqRR8.js → B1c_qzmY.js} +1 -1
  6. package/dist/web/_app/immutable/chunks/{CieeblIr.js → BKHfe9E-.js} +1 -1
  7. package/dist/web/_app/immutable/chunks/{CDFdgZ9U.js → BVhp5b7F.js} +1 -1
  8. package/dist/web/_app/immutable/chunks/{CJ-_PMPd.js → BWxVoHB4.js} +1 -1
  9. package/dist/web/_app/immutable/chunks/{DtsqpIgr.js → BZ2Q53D5.js} +1 -1
  10. package/dist/web/_app/immutable/chunks/{BjAmYrTY.js → BgRr0V7g.js} +1 -1
  11. package/dist/web/_app/immutable/chunks/{h2NtTN7K.js → BpdrS9kL.js} +1 -1
  12. package/dist/web/_app/immutable/chunks/{DwG0Us6L.js → C74mA5aC.js} +1 -1
  13. package/dist/web/_app/immutable/chunks/{BenpwI6m.js → CCA2E2CK.js} +1 -1
  14. package/dist/web/_app/immutable/chunks/{DlllpQX3.js → CGXxwL9g.js} +1 -1
  15. package/dist/web/_app/immutable/chunks/{6pFAUviA.js → CgKC9ikz.js} +1 -1
  16. package/dist/web/_app/immutable/chunks/{BRzFcWGh.js → CoLutCAU.js} +1 -1
  17. package/dist/web/_app/immutable/chunks/{kNXMTe11.js → CtOfM9NX.js} +2 -2
  18. package/dist/web/_app/immutable/chunks/{Bbdo2oy7.js → CvaFkuHp.js} +1 -1
  19. package/dist/web/_app/immutable/chunks/{DC1nGnOD.js → CwUXqlAx.js} +1 -1
  20. package/dist/web/_app/immutable/chunks/{BasUgd5N.js → CwnWYvfz.js} +1 -1
  21. package/dist/web/_app/immutable/chunks/{Bv22VXg8.js → D8BDQLry.js} +1 -1
  22. package/dist/web/_app/immutable/chunks/{DAD7hf2c.js → D8mTIH9Y.js} +1 -1
  23. package/dist/web/_app/immutable/chunks/{DN_2uSjw.js → DD3_vCgV.js} +1 -1
  24. package/dist/web/_app/immutable/chunks/{wWaI7EIw.js → DHholpIc.js} +1 -1
  25. package/dist/web/_app/immutable/chunks/{BSBiehHY.js → DIBaaeCL.js} +1 -1
  26. package/dist/web/_app/immutable/chunks/{owhS8Kw_.js → DLZAjAct.js} +1 -1
  27. package/dist/web/_app/immutable/chunks/{B17cx9Sm.js → DO03XMS-.js} +1 -1
  28. package/dist/web/_app/immutable/chunks/{DkyV2KO_.js → DYLAPjKD.js} +1 -1
  29. package/dist/web/_app/immutable/chunks/{CLw5zKi0.js → Dgs7g6Xf.js} +1 -1
  30. package/dist/web/_app/immutable/chunks/{CStpN6HQ.js → DkuxRPZv.js} +1 -1
  31. package/dist/web/_app/immutable/chunks/{CbwDFpOn.js → NuvuAeCX.js} +1 -1
  32. package/dist/web/_app/immutable/chunks/e8QVPHqJ.js +5 -0
  33. package/dist/web/_app/immutable/chunks/{OFOivmhv.js → oz3vOf3Y.js} +1 -1
  34. package/dist/web/_app/immutable/chunks/{CyzLSh3b.js → pQmxOXKv.js} +1 -1
  35. package/dist/web/_app/immutable/chunks/{lFNp_XsK.js → stV79S9J.js} +1 -1
  36. package/dist/web/_app/immutable/chunks/{COik51fd.js → usxM-xOh.js} +1 -1
  37. package/dist/web/_app/immutable/chunks/{Dvv4bkXH.js → yUs562n0.js} +1 -1
  38. package/dist/web/_app/immutable/entry/{app.GtwDzJXv.js → app.DVdFpVKd.js} +2 -2
  39. package/dist/web/_app/immutable/entry/start.CdaZJHI4.js +1 -0
  40. package/dist/web/_app/immutable/nodes/{0.Dr5Tfy-u.js → 0.CjXYXCz-.js} +2 -2
  41. package/dist/web/_app/immutable/nodes/{1.B1vgnbqL.js → 1.B8hZ3ZdA.js} +1 -1
  42. package/dist/web/_app/immutable/nodes/{10.CTlHnKMA.js → 10.CGZxGmeR.js} +1 -1
  43. package/dist/web/_app/immutable/nodes/{2.BqAE7jFe.js → 2.DreZ1QbZ.js} +2 -2
  44. package/dist/web/_app/immutable/nodes/{3.DTqAtTdW.js → 3.BG9Z-5v2.js} +1 -1
  45. package/dist/web/_app/immutable/nodes/4.BMACusYL.js +11 -0
  46. package/dist/web/_app/immutable/nodes/{5.CL53gI7N.js → 5.DwnxWZG2.js} +1 -1
  47. package/dist/web/_app/immutable/nodes/{6.D_h6XtkF.js → 6.E_E9BBE8.js} +1 -1
  48. package/dist/web/_app/immutable/nodes/{7.CXY4ZFjK.js → 7.CE03lkOg.js} +1 -1
  49. package/dist/web/_app/immutable/nodes/{8.DkkM6LnP.js → 8.BVgjO_Fu.js} +1 -1
  50. package/dist/web/_app/immutable/nodes/{9.Br-pLbbe.js → 9.BZvdrqun.js} +1 -1
  51. package/dist/web/_app/version.json +1 -1
  52. package/dist/web/index.html +11 -11
  53. package/package.json +1 -1
  54. package/dist/web/_app/immutable/assets/4.D0-imO9v.css +0 -1
  55. package/dist/web/_app/immutable/chunks/DkilSMcP.js +0 -5
  56. package/dist/web/_app/immutable/entry/start.V9Pu_0Qd.js +0 -1
  57. package/dist/web/_app/immutable/nodes/4.BOBukJae.js +0 -11
@@ -0,0 +1 @@
1
+ .autocomplete.svelte-84vb17{position:relative;width:100%}.input-row.svelte-84vb17{display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-height:22px;padding:0;background:transparent;border:none;border-radius:4px}.chip.svelte-84vb17{display:inline-flex;align-items:center;gap:4px;height:20px;padding:0 8px;border-radius:9999px;font-size:13px;background:var(--color-accent-muted);color:var(--color-link, #e07070);flex-shrink:0}.chip.svelte-84vb17 .chip-remove{width:14px;height:14px;padding:0;color:var(--color-text-tertiary);font-size:13px;line-height:1}.chip.svelte-84vb17 .chip-remove:hover{color:var(--color-text-primary)}.ac-input.svelte-84vb17{flex:1;min-width:80px;height:22px;padding:0;font-size:14px;font-family:inherit;color:var(--color-text-primary);background:transparent;border:none;outline:none}.dropdown.svelte-84vb17{position:absolute;top:100%;left:0;right:0;margin-top:4px;max-height:240px;overflow-y:auto;background:var(--color-bg-elevated);border:1px solid var(--color-border);border-radius:6px;box-shadow:0 4px 16px #00000040;z-index:50}.dropdown-item.svelte-84vb17{display:flex;align-items:center;justify-content:space-between;padding:6px 10px;cursor:pointer;gap:8px}.dropdown-item.highlighted.svelte-84vb17{background:var(--color-bg-hover)}.entity-title.svelte-84vb17{font-size:14px;color:var(--color-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.entity-meta.svelte-84vb17{display:flex;align-items:center;gap:6px;flex-shrink:0}.entity-type-badge.svelte-84vb17{font-size:12px;padding:1px 6px;border-radius:9999px;background:var(--color-badge-bg);color:var(--color-badge-text)}.entity-repo.svelte-84vb17{font-size:12px;color:var(--color-text-tertiary)}.property-row.svelte-eh8ho9{display:grid;grid-template-columns:20px 130px 1fr;align-items:center;gap:10px;padding:5px 8px;margin:0 -8px;border-radius:4px;min-height:30px}.prop-icon.svelte-eh8ho9{display:flex;align-items:center;justify-content:center;color:var(--color-text-tertiary)}.icon-trigger{all:unset;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--color-text-tertiary);border-radius:3px}.icon-trigger:hover{color:var(--color-text-secondary);background:var(--color-bg-hover)}.prop-key.svelte-eh8ho9{font-size:14px;color:var(--color-text-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.prop-value.svelte-eh8ho9{font-size:14px;color:var(--color-text-primary);min-width:0;display:flex;align-items:center;gap:6px;cursor:pointer}.dot.svelte-eh8ho9{width:8px;height:8px;border-radius:50%;flex-shrink:0}.edit-input.svelte-eh8ho9{width:100%;font-size:14px;font-family:inherit;color:var(--color-text-primary);background:transparent;border:none;outline:none;padding:0}.text-value.svelte-eh8ho9,.date-value.svelte-eh8ho9{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.date-trigger{all:unset;font-size:14px;font-family:inherit;color:var(--color-text-primary);cursor:pointer}.date-trigger:empty:after,.date-trigger:has(:empty):after{content:"Empty";color:var(--color-text-tertiary)}.date-content{z-index:1100;padding:12px;border:1px solid var(--color-border-strong, var(--color-border));border-radius:8px;background:var(--color-bg-elevated);box-shadow:0 8px 24px #0000004d}.url-value.svelte-eh8ho9{color:var(--color-link, #e07070);cursor:text;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.edit-input.svelte-eh8ho9::placeholder{color:var(--color-text-tertiary)}.badge-value.svelte-eh8ho9{display:inline-flex;padding:2px 8px;border-radius:4px;font-size:12px;font-weight:500;background:var(--color-badge-bg, rgba(224, 80, 80, .1));color:var(--color-badge-text, #e07070)}.wikilink-chips.svelte-eh8ho9{display:flex;flex-wrap:wrap;gap:4px}.wikilink-chip{padding:2px 8px!important;font-size:13px!important;border-radius:4px!important;background:var(--color-badge-bg, rgba(224, 80, 80, .1))!important;color:var(--color-badge-text, #e07070)!important}.dotted-item{display:flex;align-items:center;gap:8px;height:32px;padding:0 10px;border-radius:4px;font-size:14px;color:var(--color-text-secondary);cursor:pointer;outline:none}.dotted-item[data-highlighted]{background:var(--color-bg-hover);color:var(--color-text-primary)}.dotted-item[data-selected]{color:var(--color-text-primary)}.item-check{margin-left:auto;color:var(--color-accent)}.status-trigger{border:none!important;box-shadow:none!important;padding:0!important;height:auto!important;background:transparent!important;gap:6px!important}.type-menu-content{z-index:1100;min-width:140px;padding:6px;border:1px solid var(--color-border-strong, var(--color-border));border-radius:8px;background:var(--color-bg-elevated);box-shadow:0 8px 24px #0000004d}.type-menu-item{display:flex;align-items:center;justify-content:space-between;gap:8px;height:36px;padding:0 10px;border-radius:4px;font-size:14px;color:var(--color-text-secondary);cursor:pointer;outline:none}.type-menu-item[data-highlighted]{background:var(--color-bg-hover);color:var(--color-text-primary)}.type-menu-danger{color:var(--color-error, #e55)!important}[data-dropdown-menu-separator]{height:1px;margin:4px 0;background:var(--color-border)}.entity-properties.svelte-1a2lez6{padding:16px 40px 8px;border-bottom:1px solid var(--color-border)}.name-headline.svelte-1a2lez6{margin:8px 0;cursor:text}.name-text.svelte-1a2lez6{font-size:22px;font-weight:600;color:var(--color-text-primary);line-height:1.3}.name-input.svelte-1a2lez6{font-size:22px;font-weight:600;font-family:inherit;color:var(--color-text-primary);background:transparent;border:none;outline:none;width:100%;line-height:1.3;padding:0}.fields-toggle.svelte-1a2lez6{display:flex;align-items:baseline;gap:10px;background:none;border:none;font-family:inherit;font-size:14px;color:var(--color-text-secondary);cursor:pointer;padding:4px 8px;margin:0 -8px}.fields-toggle.svelte-1a2lez6:hover{color:var(--color-text-primary)}.fields-chevron.svelte-1a2lez6{display:inline-flex;align-items:center;justify-content:center;align-self:center;width:20px;color:var(--color-text-tertiary);transition:transform .15s}.fields-chevron.expanded.svelte-1a2lez6{transform:rotate(90deg)}.fields-label.svelte-1a2lez6{font-weight:400}.fields-count.svelte-1a2lez6{font-size:12px;color:var(--color-text-tertiary)}.fields-list.svelte-1a2lez6{margin-top:4px}.add-field-row.svelte-1a2lez6{padding:5px 8px;margin:0 -8px}.add-field-input.svelte-1a2lez6{font-size:14px;font-family:inherit;color:var(--color-text-primary);background:transparent;border:none;outline:none;padding:0;width:100%}.entity-properties.svelte-1a2lez6 .add-field-btn{margin:8px -8px;font-size:14px}.connections-panel.svelte-16xienp{margin:80px 0 48px;padding:16px 40px 0;border-top:1px solid var(--color-border)}.connections-header.svelte-16xienp{display:flex;align-items:baseline;gap:10px;background:none;border:none;font-family:inherit;font-size:14px;color:var(--color-text-secondary);cursor:pointer;padding:4px 8px;margin:0 -8px}.connections-header.svelte-16xienp:hover{color:var(--color-text-primary)}.header-chevron.svelte-16xienp{display:inline-flex;align-items:center;justify-content:center;width:20px;color:var(--color-text-tertiary);transition:transform .15s;transform:rotate(90deg)}.header-chevron.collapsed.svelte-16xienp{transform:rotate(0)}.header-label.svelte-16xienp{font-weight:400}.header-count.svelte-16xienp{font-size:12px;color:var(--color-text-tertiary)}.connections-body.svelte-16xienp{display:flex;flex-direction:column;gap:0;margin-top:8px}.connection-chip.svelte-16xienp{display:flex;align-items:center;gap:8px;padding:6px 8px;background:none;border:none;border-radius:4px;font-family:inherit;font-size:13px;color:var(--color-text-primary);cursor:pointer;text-align:left}.connection-chip.svelte-16xienp:hover{background:var(--color-bg-hover)}.chip-dot.svelte-16xienp{width:6px;height:6px;border-radius:50%;flex-shrink:0}.chip-name.svelte-16xienp{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chip-type.svelte-16xienp{font-size:12px;color:var(--color-text-tertiary);flex-shrink:0}.editor-wrap.svelte-ok7wy5{display:flex;min-height:0;position:relative}.cm-container.svelte-ok7wy5{flex:1;min-height:100px}.cm-container.svelte-ok7wy5 .cm-editor{min-height:100px;outline:none}.cm-container.svelte-ok7wy5 .cm-scroller{overflow:visible!important}.cursor-overlay.svelte-ok7wy5{position:absolute;inset:0;pointer-events:none;overflow:hidden}.remote-cursor.svelte-ok7wy5{position:absolute;width:2px;background-color:var(--cursor-color);z-index:10}.remote-cursor-label.svelte-ok7wy5{position:absolute;top:-1.4em;left:-1px;font-size:12px;font-family:var(--font-sans);font-weight:500;padding:0 4px;border-radius:3px 3px 3px 0;white-space:nowrap;line-height:1.5;color:#fff}.csv-editor.svelte-63hltt{padding:32px 40px 0}.table-scroll.svelte-63hltt{overflow-x:auto}table.svelte-63hltt{border-collapse:collapse;width:max-content;min-width:100%;font-size:14px;font-family:var(--font-sans)}th.svelte-63hltt,td.svelte-63hltt{border:1px solid var(--color-border);padding:0;height:32px;min-width:120px;max-width:300px}th.svelte-63hltt{background:transparent;font-weight:500;color:var(--color-text-secondary);position:sticky;top:0;z-index:1}th.svelte-63hltt:not(.row-num):not(.col-add){position:sticky;top:0;z-index:1}.row-num.svelte-63hltt{width:40px;min-width:40px;max-width:40px;text-align:center;color:var(--color-text-tertiary);font-size:12px;background:transparent}.cell-input.svelte-63hltt{width:100%;height:100%;border:none;background:transparent;color:var(--color-text-primary);font-family:var(--font-sans);font-size:14px;padding:4px 8px;outline:none}.cell-input.svelte-63hltt:focus{outline:2px solid var(--color-accent);outline-offset:-2px}.header-input.svelte-63hltt{font-weight:500;color:var(--color-text-secondary)}th.svelte-63hltt:not(.row-num):not(.col-add){position:relative}th.svelte-63hltt .col-delete-btn{position:absolute;top:2px;right:2px;width:18px;height:18px;display:none;background:var(--color-bg-hover);border-radius:3px;padding:0}th.svelte-63hltt:hover .col-delete-btn{display:flex}th.svelte-63hltt .col-delete-btn:hover{color:var(--color-destructive);background:var(--color-bg-selected)}.col-add.svelte-63hltt{width:32px;border:none;background:transparent}.col-add.svelte-63hltt .col-add-btn{width:100%;height:100%;border-radius:0;padding:0}.col-add.svelte-63hltt .col-add-btn:hover{color:var(--color-accent)}.actions.svelte-63hltt{width:32px;text-align:center;border:none}.actions.svelte-63hltt .delete-btn{display:none;width:20px;height:20px;padding:0;margin:0 auto}tr.svelte-63hltt:hover .delete-btn{display:flex}tr.svelte-63hltt .delete-btn:hover{color:var(--color-destructive)}.csv-footer.svelte-63hltt{display:flex;align-items:center;gap:16px;padding:8px 0}.csv-footer.svelte-63hltt .add-row-btn{font-size:14px}.remote-active.svelte-63hltt{outline:2px solid var(--rc-color, #e05050);outline-offset:-2px;position:relative}.remote-cell-label.svelte-63hltt{position:absolute;top:-18px;left:-1px;font-size:11px;font-family:var(--font-sans);font-weight:500;padding:0 4px;border-radius:3px 3px 3px 0;white-space:nowrap;line-height:1.6;color:#fff;z-index:2;pointer-events:none}.diff-view.svelte-1g4tvol{flex:1;overflow-y:auto;min-height:0}.diff-properties.svelte-1g4tvol{padding:16px 40px 8px;border-bottom:1px solid var(--color-border)}.dp-row.svelte-1g4tvol{display:grid;grid-template-columns:20px 120px 1fr;align-items:start;gap:8px;padding:5px 8px;margin:0 -8px;border-radius:4px;min-height:30px}.dp-icon.svelte-1g4tvol{display:flex;align-items:center;justify-content:center;color:var(--color-text-tertiary);height:22px}.dp-key.svelte-1g4tvol{font-size:14px;color:var(--color-text-tertiary);line-height:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dp-value.svelte-1g4tvol{display:flex;flex-direction:column;gap:2px;min-height:22px;line-height:22px;font-size:14px;color:var(--color-text-primary)}.dp-diff-old.svelte-1g4tvol{display:inline-flex;align-items:center;padding:0 8px;border-radius:4px;background:#dc505026;color:var(--color-destructive, #e54d4d);min-height:22px;line-height:22px;width:fit-content}.dp-diff-new.svelte-1g4tvol{display:inline-flex;align-items:center;padding:0 8px;border-radius:4px;background:#50c86426;color:var(--color-success, #3ecf8e);min-height:22px;line-height:22px;width:fit-content}.diff-body.svelte-1g4tvol{padding:32px 40px;font-family:var(--font-sans);font-size:16px;line-height:1.6;color:var(--color-text-primary);white-space:pre-wrap;word-break:break-word}.diff-body.svelte-1g4tvol .db-removed{background:#dc505026;color:var(--color-destructive, #e54d4d);border-radius:2px}.diff-body.svelte-1g4tvol .db-added{background:#50c86426;color:var(--color-success, #3ecf8e);border-radius:2px}.document-scroll.svelte-udj3er{flex:1;overflow-y:auto;min-height:0}.document-well.svelte-udj3er{max-width:720px;margin:0 auto;width:100%}.editor-bar.svelte-udj3er{height:40px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 16px 0 40px;border-bottom:1px solid var(--color-border)}.breadcrumb-path.svelte-udj3er{font-size:14px;color:var(--color-text-secondary);line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.bc-sep.svelte-udj3er{color:var(--color-text-tertiary);margin:0 6px}.bc-segment.svelte-udj3er{color:var(--color-text-secondary)}.bc-current.svelte-udj3er{color:var(--color-text-primary)}.editor-actions.svelte-udj3er{display:flex;align-items:center;gap:8px;flex-shrink:0;white-space:nowrap}.status-text.svelte-udj3er{font-size:13px}.status-text.saving.svelte-udj3er{color:var(--color-text-tertiary)}.status-text.error.svelte-udj3er{color:var(--color-destructive)}.editor-actions.svelte-udj3er .open-app{text-transform:capitalize}.refresh-panel.svelte-udj3er{border-bottom:1px solid var(--color-border);padding:12px 40px;background:var(--color-bg-secondary, var(--color-bg-hover));font-size:14px;flex-shrink:0}.refresh-uptodate.svelte-udj3er{color:var(--color-text-secondary)}.editor-bar-diff.svelte-udj3er{background:var(--color-bg)}.diff-action-title.svelte-udj3er{font-size:14px;color:var(--color-text-primary);font-weight:600}.diff-action-buttons.svelte-udj3er{display:flex;align-items:center;gap:6px}@media(max-width:960px){.breadcrumb-path.svelte-udj3er{display:none}}
@@ -1 +1 @@
1
- import{a as m,s as U,f as _}from"./COik51fd.js";import{i as O}from"./BSBiehHY.js";import{p as T,l as h,s as l,d as u,g as i,a as H,c as C,n as P,r as g,b as V,m as y,t as x}from"./BenpwI6m.js";import{i as z}from"./Dvv4bkXH.js";import{a as M}from"./CStpN6HQ.js";import{l as $,p as R}from"./wWaI7EIw.js";import{a as t}from"./CieeblIr.js";var w=_("<title> </title>"),A=_('<svg><!><path d="M12 12H14V24H12z"></path><path d="M18 12H20V24H18z"></path><path d="M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z"></path><path d="M12 2H20V4H12z"></path></svg>');function D(e,n){const o=$(n,["children","$$slots","$$events","$$legacy"]),v=$(o,["size","title"]);T(n,!1);const r=y(),d=y();let f=R(n,"size",8,16),a=R(n,"title",8,void 0);h(()=>(u(o),u(a())),()=>{l(r,o["aria-label"]||o["aria-labelledby"]||a())}),h(()=>(i(r),u(o)),()=>{l(d,{"aria-hidden":i(r)?void 0:!0,role:i(r)?"img":void 0,focusable:Number(o.tabindex)===0?!0:void 0})}),H(),O();var s=A();M(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...i(d),...v}));var b=C(s);{var I=c=>{var p=w(),S=C(p,!0);g(p),x(()=>U(S,a())),m(c,p)};z(b,c=>{a()&&c(I)})}P(4),g(s),m(e,s),V()}function F(e){return t(`/api/repos/${encodeURIComponent(e)}/sync`,{method:"POST"})}function L(){return t("/api/sync",{method:"POST"})}function W(e,n,o){return t(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(n)}/${encodeURIComponent(o)}/refresh`,{method:"POST"})}function Y(e,n,o){return t(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(n)}/${encodeURIComponent(o)}/refresh/apply`,{method:"POST"})}function q(){return t("/api/sources")}function G(){return t("/api/connectors")}function K(e){return t(`/api/connectors/${encodeURIComponent(e)}/config`)}function Q(e,n){return t(`/api/connectors/${encodeURIComponent(e)}/config`,{method:"POST",body:JSON.stringify({...n,name:e})})}function X(e){return t(`/api/connectors/${encodeURIComponent(e)}/config`,{method:"DELETE"})}function ee(e){return t(`/api/sources/${encodeURIComponent(e)}`)}function te(e,n){return t(`/api/sources/${encodeURIComponent(e)}`,{method:"POST",body:JSON.stringify(n)})}function ne(e,n){return t(`/api/repos/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify({sync:n})})}function oe(e){return t(`/api/connectors/${encodeURIComponent(e)}/oauth/authorize`,{method:"POST"})}function re(e){return t(`/api/connectors/${encodeURIComponent(e)}/oauth/status`)}function ae(e){return t(`/api/connectors/${encodeURIComponent(e)}/oauth/disconnect`,{method:"POST"})}export{D as T,G as a,ee as b,K as c,Q as d,ae as e,q as f,X as g,re as h,oe as i,Y as j,L as k,F as l,W as r,te as s,ne as u};
1
+ import{a as m,s as U,f as _}from"./usxM-xOh.js";import{i as O}from"./DIBaaeCL.js";import{p as T,l as h,s as l,d as u,g as i,a as H,c as C,n as P,r as g,b as V,m as y,t as x}from"./CCA2E2CK.js";import{i as z}from"./yUs562n0.js";import{a as M}from"./DkuxRPZv.js";import{l as $,p as R}from"./DHholpIc.js";import{a as t}from"./BKHfe9E-.js";var w=_("<title> </title>"),A=_('<svg><!><path d="M12 12H14V24H12z"></path><path d="M18 12H20V24H18z"></path><path d="M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z"></path><path d="M12 2H20V4H12z"></path></svg>');function D(e,n){const o=$(n,["children","$$slots","$$events","$$legacy"]),v=$(o,["size","title"]);T(n,!1);const r=y(),d=y();let f=R(n,"size",8,16),a=R(n,"title",8,void 0);h(()=>(u(o),u(a())),()=>{l(r,o["aria-label"]||o["aria-labelledby"]||a())}),h(()=>(i(r),u(o)),()=>{l(d,{"aria-hidden":i(r)?void 0:!0,role:i(r)?"img":void 0,focusable:Number(o.tabindex)===0?!0:void 0})}),H(),O();var s=A();M(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...i(d),...v}));var b=C(s);{var I=c=>{var p=w(),S=C(p,!0);g(p),x(()=>U(S,a())),m(c,p)};z(b,c=>{a()&&c(I)})}P(4),g(s),m(e,s),V()}function F(e){return t(`/api/repos/${encodeURIComponent(e)}/sync`,{method:"POST"})}function L(){return t("/api/sync",{method:"POST"})}function W(e,n,o){return t(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(n)}/${encodeURIComponent(o)}/refresh`,{method:"POST"})}function Y(e,n,o){return t(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(n)}/${encodeURIComponent(o)}/refresh/apply`,{method:"POST"})}function q(){return t("/api/sources")}function G(){return t("/api/connectors")}function K(e){return t(`/api/connectors/${encodeURIComponent(e)}/config`)}function Q(e,n){return t(`/api/connectors/${encodeURIComponent(e)}/config`,{method:"POST",body:JSON.stringify({...n,name:e})})}function X(e){return t(`/api/connectors/${encodeURIComponent(e)}/config`,{method:"DELETE"})}function ee(e){return t(`/api/sources/${encodeURIComponent(e)}`)}function te(e,n){return t(`/api/sources/${encodeURIComponent(e)}`,{method:"POST",body:JSON.stringify(n)})}function ne(e,n){return t(`/api/repos/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify({sync:n})})}function oe(e){return t(`/api/connectors/${encodeURIComponent(e)}/oauth/authorize`,{method:"POST"})}function re(e){return t(`/api/connectors/${encodeURIComponent(e)}/oauth/status`)}function ae(e){return t(`/api/connectors/${encodeURIComponent(e)}/oauth/disconnect`,{method:"POST"})}export{D as T,G as a,ee as b,K as c,Q as d,ae as e,q as f,X as g,re as h,oe as i,L as j,F as k,Y as l,W as r,te as s,ne as u};
@@ -1 +1 @@
1
- import{O as B,f as F,g as A,e as V,w as S,a as J,t as v,c as D,r as L,b as _,d as N,h as E,i as P,j as G,k as O,l as q,D as R,m as z}from"./CLFba8FK.js";import{r as M}from"./kNXMTe11.js";const b=3e4;class K extends B{constructor(n){super(),this.doc=n,this.clientID=n.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const e=A();this.getLocalState()!==null&&b/2<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const s=[];this.meta.forEach((a,c)=>{c!==this.clientID&&b<=e-a.lastUpdated&&this.states.has(c)&&s.push(c)}),s.length>0&&x(this,s,"timeout")},F(b/10)),n.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(n){const e=this.clientID,s=this.meta.get(e),a=s===void 0?0:s.clock+1,c=this.states.get(e);n===null?this.states.delete(e):this.states.set(e,n),this.meta.set(e,{clock:a,lastUpdated:A()});const l=[],u=[],r=[],p=[];n===null?p.push(e):c==null?n!=null&&l.push(e):(u.push(e),V(c,n)||r.push(e)),(l.length>0||r.length>0||p.length>0)&&this.emit("change",[{added:l,updated:r,removed:p},"local"]),this.emit("update",[{added:l,updated:u,removed:p},"local"])}setLocalStateField(n,e){const s=this.getLocalState();s!==null&&this.setLocalState({...s,[n]:e})}getStates(){return this.states}}const x=(t,n,e)=>{const s=[];for(let a=0;a<n.length;a++){const c=n[a];if(t.states.has(c)){if(t.states.delete(c),c===t.clientID){const l=t.meta.get(c);t.meta.set(c,{clock:l.clock+1,lastUpdated:A()})}s.push(c)}}s.length>0&&(t.emit("change",[{added:[],updated:[],removed:s},e]),t.emit("update",[{added:[],updated:[],removed:s},e]))},Q=(t,n,e=t.states)=>{const s=n.length,a=D();S(a,s);for(let c=0;c<s;c++){const l=n[c],u=e.get(l)||null,r=t.meta.get(l).clock;S(a,l),S(a,r),J(a,JSON.stringify(u))}return v(a)},X=(t,n,e)=>{const s=N(n),a=A(),c=[],l=[],u=[],r=[],p=L(s);for(let m=0;m<p;m++){const d=L(s);let g=L(s);const h=JSON.parse(_(s)),y=t.meta.get(d),k=t.states.get(d),o=y===void 0?0:y.clock;(o<g||o===g&&h===null&&t.states.has(d))&&(h===null?d===t.clientID&&t.getLocalState()!=null?g++:t.states.delete(d):t.states.set(d,h),t.meta.set(d,{clock:g,lastUpdated:a}),y===void 0&&h!==null?c.push(d):y!==void 0&&h===null?r.push(d):h!==null&&(V(h,k)||u.push(d),l.push(d)))}(c.length>0||u.length>0||r.length>0)&&t.emit("change",[{added:c,updated:u,removed:r},e]),(c.length>0||l.length>0||r.length>0)&&t.emit("update",[{added:c,updated:l,removed:r},e])},W=0,j=1,C=2,Z=(t,n)=>{S(t,W);const e=P(n);E(t,e)},$=(t,n,e)=>{S(t,j),E(t,q(n,e))},H=(t,n,e)=>$(n,e,O(t)),Y=(t,n,e,s)=>{try{G(n,O(t),e)}catch(a){s?.(a),console.error("Caught error while handling a Yjs update",a)}},tt=(t,n)=>{S(t,C),E(t,n)},et=Y,nt=(t,n,e,s,a)=>{const c=L(t);switch(c){case W:H(t,n,e);break;case j:Y(t,e,s,a);break;case C:et(t,e,s,a);break;default:throw new Error("Unknown message type")}return c},U=0,T=1;function st(t,n,e){const s=new TextEncoder().encode(t),a=new ArrayBuffer(2+s.length+1+e.length);return new DataView(a).setUint16(0,s.length),new Uint8Array(a,2,s.length).set(s),new Uint8Array(a)[2+s.length]=n,new Uint8Array(a,2+s.length+1).set(e),a}function at(t){if(t.byteLength<3)return null;const e=new DataView(t).getUint16(0);if(t.byteLength<2+e+1)return null;const s=new TextDecoder().decode(new Uint8Array(t,2,e)),a=new Uint8Array(t)[2+e],c=new Uint8Array(t,2+e+1);return{docName:s,msgType:a,payload:c}}function lt(t,n){const e=new R,s=e.getText("content"),a=new K(e);a.setLocalStateField("user",{name:n.name,color:n.color,colorLight:n.colorLight??n.color+"33"});let c=null,l=!1;function u(){return M.ws??null}function r(o,f){const i=u();!i||i.readyState!==WebSocket.OPEN||i.send(st(t,o,f))}function p(){const o=D();Z(o,e),r(U,v(o))}function m(o){const f=o??[e.clientID],i=Q(a,f);r(T,i)}function d(o){if(l||typeof o.data=="string")return;const f=o.data instanceof ArrayBuffer?o.data:null;if(!f)return;const i=at(f);if(!(!i||i.docName!==t))if(i.msgType===U){const I=N(i.payload),w=D();nt(I,w,e,"ws-server"),z(w)>0&&r(U,v(w))}else i.msgType===T&&X(a,i.payload,"ws-server")}function g(o,f){if(l||f==="ws-server")return;const i=D();tt(i,o),r(U,v(i))}function h({added:o,updated:f,removed:i},I){if(l||I==="ws-server")return;const w=o.concat(f,i);m(w)}function y(){if(l)return;const o=u();!o||o.readyState!==WebSocket.OPEN||(o.send(JSON.stringify({type:"collab:join",docName:t})),c&&o.removeEventListener("message",c),c=d,o.addEventListener("message",c),p(),m())}e.on("update",g),a.on("update",h),y(),M.addConnectHandler(y);function k(){if(l)return;l=!0,x(a,[e.clientID],"local"),m([e.clientID]);const o=u();o&&o.readyState===WebSocket.OPEN&&o.send(JSON.stringify({type:"collab:leave",docName:t})),c&&o&&(o.removeEventListener("message",c),c=null),e.off("update",g),a.off("update",h),a.destroy(),e.destroy()}return{ydoc:e,ytext:s,awareness:a,destroy:k}}export{lt as createCollabSession};
1
+ import{O as B,f as F,g as A,e as V,w as S,a as J,t as v,c as D,r as L,b as _,d as N,h as E,i as P,j as G,k as O,l as q,D as R,m as z}from"./CLFba8FK.js";import{r as M}from"./CtOfM9NX.js";const b=3e4;class K extends B{constructor(n){super(),this.doc=n,this.clientID=n.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const e=A();this.getLocalState()!==null&&b/2<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const s=[];this.meta.forEach((a,c)=>{c!==this.clientID&&b<=e-a.lastUpdated&&this.states.has(c)&&s.push(c)}),s.length>0&&x(this,s,"timeout")},F(b/10)),n.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(n){const e=this.clientID,s=this.meta.get(e),a=s===void 0?0:s.clock+1,c=this.states.get(e);n===null?this.states.delete(e):this.states.set(e,n),this.meta.set(e,{clock:a,lastUpdated:A()});const l=[],u=[],r=[],p=[];n===null?p.push(e):c==null?n!=null&&l.push(e):(u.push(e),V(c,n)||r.push(e)),(l.length>0||r.length>0||p.length>0)&&this.emit("change",[{added:l,updated:r,removed:p},"local"]),this.emit("update",[{added:l,updated:u,removed:p},"local"])}setLocalStateField(n,e){const s=this.getLocalState();s!==null&&this.setLocalState({...s,[n]:e})}getStates(){return this.states}}const x=(t,n,e)=>{const s=[];for(let a=0;a<n.length;a++){const c=n[a];if(t.states.has(c)){if(t.states.delete(c),c===t.clientID){const l=t.meta.get(c);t.meta.set(c,{clock:l.clock+1,lastUpdated:A()})}s.push(c)}}s.length>0&&(t.emit("change",[{added:[],updated:[],removed:s},e]),t.emit("update",[{added:[],updated:[],removed:s},e]))},Q=(t,n,e=t.states)=>{const s=n.length,a=D();S(a,s);for(let c=0;c<s;c++){const l=n[c],u=e.get(l)||null,r=t.meta.get(l).clock;S(a,l),S(a,r),J(a,JSON.stringify(u))}return v(a)},X=(t,n,e)=>{const s=N(n),a=A(),c=[],l=[],u=[],r=[],p=L(s);for(let m=0;m<p;m++){const d=L(s);let g=L(s);const h=JSON.parse(_(s)),y=t.meta.get(d),k=t.states.get(d),o=y===void 0?0:y.clock;(o<g||o===g&&h===null&&t.states.has(d))&&(h===null?d===t.clientID&&t.getLocalState()!=null?g++:t.states.delete(d):t.states.set(d,h),t.meta.set(d,{clock:g,lastUpdated:a}),y===void 0&&h!==null?c.push(d):y!==void 0&&h===null?r.push(d):h!==null&&(V(h,k)||u.push(d),l.push(d)))}(c.length>0||u.length>0||r.length>0)&&t.emit("change",[{added:c,updated:u,removed:r},e]),(c.length>0||l.length>0||r.length>0)&&t.emit("update",[{added:c,updated:l,removed:r},e])},W=0,j=1,C=2,Z=(t,n)=>{S(t,W);const e=P(n);E(t,e)},$=(t,n,e)=>{S(t,j),E(t,q(n,e))},H=(t,n,e)=>$(n,e,O(t)),Y=(t,n,e,s)=>{try{G(n,O(t),e)}catch(a){s?.(a),console.error("Caught error while handling a Yjs update",a)}},tt=(t,n)=>{S(t,C),E(t,n)},et=Y,nt=(t,n,e,s,a)=>{const c=L(t);switch(c){case W:H(t,n,e);break;case j:Y(t,e,s,a);break;case C:et(t,e,s,a);break;default:throw new Error("Unknown message type")}return c},U=0,T=1;function st(t,n,e){const s=new TextEncoder().encode(t),a=new ArrayBuffer(2+s.length+1+e.length);return new DataView(a).setUint16(0,s.length),new Uint8Array(a,2,s.length).set(s),new Uint8Array(a)[2+s.length]=n,new Uint8Array(a,2+s.length+1).set(e),a}function at(t){if(t.byteLength<3)return null;const e=new DataView(t).getUint16(0);if(t.byteLength<2+e+1)return null;const s=new TextDecoder().decode(new Uint8Array(t,2,e)),a=new Uint8Array(t)[2+e],c=new Uint8Array(t,2+e+1);return{docName:s,msgType:a,payload:c}}function lt(t,n){const e=new R,s=e.getText("content"),a=new K(e);a.setLocalStateField("user",{name:n.name,color:n.color,colorLight:n.colorLight??n.color+"33"});let c=null,l=!1;function u(){return M.ws??null}function r(o,f){const i=u();!i||i.readyState!==WebSocket.OPEN||i.send(st(t,o,f))}function p(){const o=D();Z(o,e),r(U,v(o))}function m(o){const f=o??[e.clientID],i=Q(a,f);r(T,i)}function d(o){if(l||typeof o.data=="string")return;const f=o.data instanceof ArrayBuffer?o.data:null;if(!f)return;const i=at(f);if(!(!i||i.docName!==t))if(i.msgType===U){const I=N(i.payload),w=D();nt(I,w,e,"ws-server"),z(w)>0&&r(U,v(w))}else i.msgType===T&&X(a,i.payload,"ws-server")}function g(o,f){if(l||f==="ws-server")return;const i=D();tt(i,o),r(U,v(i))}function h({added:o,updated:f,removed:i},I){if(l||I==="ws-server")return;const w=o.concat(f,i);m(w)}function y(){if(l)return;const o=u();!o||o.readyState!==WebSocket.OPEN||(o.send(JSON.stringify({type:"collab:join",docName:t})),c&&o.removeEventListener("message",c),c=d,o.addEventListener("message",c),p(),m())}e.on("update",g),a.on("update",h),y(),M.addConnectHandler(y);function k(){if(l)return;l=!0,x(a,[e.clientID],"local"),m([e.clientID]);const o=u();o&&o.readyState===WebSocket.OPEN&&o.send(JSON.stringify({type:"collab:leave",docName:t})),c&&o&&(o.removeEventListener("message",c),c=null),e.off("update",g),a.off("update",h),a.destroy(),e.destroy()}return{ydoc:e,ytext:s,awareness:a,destroy:k}}export{lt as createCollabSession};
@@ -1 +1 @@
1
- import{e as i,f as y,g as r,s as n}from"./BenpwI6m.js";import{g as l}from"./lFNp_XsK.js";import{d as v,u as V,c as F,f as h}from"./BjAmYrTY.js";const d={selectedType:null,groupBy:null,sortKey:"name",sortAsc:!0,filters:{text:{},enum:{},date:{}}};function x(){let a=i(y([])),o=i(null),c=i(!1);async function w(){try{n(a,await h(),!0),n(c,!0)}catch(e){console.error("Failed to load views:",e)}}async function f(e,t="list"){const s=t==="calendar"?{...d,calendar:{dateField:"due_date",year:new Date().getFullYear(),month:new Date().getMonth()+1}}:d,u=await F(e,s,t);return n(a,[...r(a),u],!0),u}async function g(e,t){await V(e,t),n(a,r(a).map(s=>s.id===e?{...s,...t}:s),!0)}async function m(e){if(await v(e),n(a,r(a).filter(t=>t.id!==e),!0),r(o)===e){const t=r(a)[0];t?(n(o,t.id,!0),l(`/views/${t.id}`,{replaceState:!0})):(n(o,null),l("/",{replaceState:!0}))}}function p(e){n(o,e,!0)}return{get views(){return r(a)},get activeViewId(){return r(o)},get loaded(){return r(c)},load:w,create:f,update:g,remove:m,setActive:p}}const D=x();export{D as v};
1
+ import{e as i,f as y,g as r,s as n}from"./CCA2E2CK.js";import{g as l}from"./stV79S9J.js";import{d as v,u as V,c as F,f as h}from"./BgRr0V7g.js";const d={selectedType:null,groupBy:null,sortKey:"name",sortAsc:!0,filters:{text:{},enum:{},date:{}}};function x(){let a=i(y([])),o=i(null),c=i(!1);async function w(){try{n(a,await h(),!0),n(c,!0)}catch(e){console.error("Failed to load views:",e)}}async function f(e,t="list"){const s=t==="calendar"?{...d,calendar:{dateField:"due_date",year:new Date().getFullYear(),month:new Date().getMonth()+1}}:d,u=await F(e,s,t);return n(a,[...r(a),u],!0),u}async function g(e,t){await V(e,t),n(a,r(a).map(s=>s.id===e?{...s,...t}:s),!0)}async function m(e){if(await v(e),n(a,r(a).filter(t=>t.id!==e),!0),r(o)===e){const t=r(a)[0];t?(n(o,t.id,!0),l(`/views/${t.id}`,{replaceState:!0})):(n(o,null),l("/",{replaceState:!0}))}}function p(e){n(o,e,!0)}return{get views(){return r(a)},get activeViewId(){return r(o)},get loaded(){return r(c)},load:w,create:f,update:g,remove:m,setActive:p}}const D=x();export{D as v};
@@ -1 +1 @@
1
- import{g as n,e as o,s as t}from"./BenpwI6m.js";import{a as u}from"./CieeblIr.js";function f(){return u("/api/auth/status")}function p(){return u("/api/auth/me")}function g(e,a){return u("/api/auth/login",{method:"POST",body:JSON.stringify({email:e,password:a})})}function S(){return u("/api/auth/logout",{method:"POST"})}function b(e,a,r){return u("/api/auth/setup",{method:"POST",body:JSON.stringify({email:e,password:a,displayName:r})})}function w(){return u("/api/auth/users")}function O(e,a,r,i){return u("/api/auth/users",{method:"POST",body:JSON.stringify({email:e,password:a,displayName:r,role:i})})}function N(e){return u(`/api/auth/users/${e}`,{method:"DELETE"})}function P(e,a){return u(`/api/auth/users/${e}/password`,{method:"PATCH",body:JSON.stringify({password:a})})}let l=o(null),d=o(!1),c=o(!1),s=o(!0),h=o("");const m={get user(){return n(l)},get authEnabled(){return n(d)},get needsSetup(){return n(c)},get loading(){return n(s)},get workspaceName(){return n(h)},async checkAuth(){t(s,!0);try{const e=await f();if(t(d,e.authEnabled,!0),t(c,e.userCount===0),e.workspaceName&&t(h,e.workspaceName,!0),n(c))return t(s,!1),{authenticated:!1,authEnabled:!1,needsSetup:!0};if(!e.authEnabled)return t(s,!1),{authenticated:!0,authEnabled:!1,needsSetup:!1};try{const{user:a}=await p();return t(l,a,!0),t(s,!1),{authenticated:!0,authEnabled:!0,needsSetup:!1}}catch{return t(l,null),t(s,!1),{authenticated:!1,authEnabled:!0,needsSetup:!1}}}catch{return t(s,!1),{authenticated:!0,authEnabled:!1,needsSetup:!1}}},async login(e,a){const{user:r}=await g(e,a);return t(l,r,!0),t(d,!0),r},async setup(e,a,r){const{user:i}=await b(e,a,r);return t(l,i,!0),t(d,!0),t(c,!1),i},async logout(){await S(),t(l,null)}},T=Object.freeze(Object.defineProperty({__proto__:null,auth:m},Symbol.toStringTag,{value:"Module"}));export{m as a,T as b,O as c,N as d,w as l,P as r};
1
+ import{g as n,e as o,s as t}from"./CCA2E2CK.js";import{a as u}from"./BKHfe9E-.js";function f(){return u("/api/auth/status")}function p(){return u("/api/auth/me")}function g(e,a){return u("/api/auth/login",{method:"POST",body:JSON.stringify({email:e,password:a})})}function S(){return u("/api/auth/logout",{method:"POST"})}function b(e,a,r){return u("/api/auth/setup",{method:"POST",body:JSON.stringify({email:e,password:a,displayName:r})})}function w(){return u("/api/auth/users")}function O(e,a,r,i){return u("/api/auth/users",{method:"POST",body:JSON.stringify({email:e,password:a,displayName:r,role:i})})}function N(e){return u(`/api/auth/users/${e}`,{method:"DELETE"})}function P(e,a){return u(`/api/auth/users/${e}/password`,{method:"PATCH",body:JSON.stringify({password:a})})}let l=o(null),d=o(!1),c=o(!1),s=o(!0),h=o("");const m={get user(){return n(l)},get authEnabled(){return n(d)},get needsSetup(){return n(c)},get loading(){return n(s)},get workspaceName(){return n(h)},async checkAuth(){t(s,!0);try{const e=await f();if(t(d,e.authEnabled,!0),t(c,e.userCount===0),e.workspaceName&&t(h,e.workspaceName,!0),n(c))return t(s,!1),{authenticated:!1,authEnabled:!1,needsSetup:!0};if(!e.authEnabled)return t(s,!1),{authenticated:!0,authEnabled:!1,needsSetup:!1};try{const{user:a}=await p();return t(l,a,!0),t(s,!1),{authenticated:!0,authEnabled:!0,needsSetup:!1}}catch{return t(l,null),t(s,!1),{authenticated:!1,authEnabled:!0,needsSetup:!1}}}catch{return t(s,!1),{authenticated:!0,authEnabled:!1,needsSetup:!1}}},async login(e,a){const{user:r}=await g(e,a);return t(l,r,!0),t(d,!0),r},async setup(e,a,r){const{user:i}=await b(e,a,r);return t(l,i,!0),t(d,!0),t(c,!1),i},async logout(){await S(),t(l,null)}},T=Object.freeze(Object.defineProperty({__proto__:null,auth:m},Symbol.toStringTag,{value:"Module"}));export{m as a,T as b,O as c,N as d,w as l,P as r};
@@ -1,2 +1,2 @@
1
- import{j as h}from"./BenpwI6m.js";function v(r){var i,t,f="";if(typeof r=="string"||typeof r=="number")f+=r;else if(typeof r=="object")if(Array.isArray(r)){var o=r.length;for(i=0;i<o;i++)r[i]&&(t=v(r[i]))&&(f&&(f+=" "),f+=t)}else for(t in r)r[t]&&(f&&(f+=" "),f+=t);return f}function S(){for(var r,i,t=0,f="",o=arguments.length;t<o;t++)(r=arguments[t])&&(i=v(r))&&(f&&(f+=" "),f+=i);return f}function $(r){return typeof r=="object"?S(r):r??""}const j=[...`
1
+ import{j as h}from"./CCA2E2CK.js";function v(r){var i,t,f="";if(typeof r=="string"||typeof r=="number")f+=r;else if(typeof r=="object")if(Array.isArray(r)){var o=r.length;for(i=0;i<o;i++)r[i]&&(t=v(r[i]))&&(f&&(f+=" "),f+=t)}else for(t in r)r[t]&&(f&&(f+=" "),f+=t);return f}function S(){for(var r,i,t=0,f="",o=arguments.length;t<o;t++)(r=arguments[t])&&(i=v(r))&&(f&&(f+=" "),f+=i);return f}function $(r){return typeof r=="object"?S(r):r??""}const j=[...`
2
2
  \r\f \v\uFEFF`];function T(r,i,t){var f=r==null?"":""+r;if(i&&(f=f?f+" "+i:i),t){for(var o of Object.keys(t))if(t[o])f=f?f+" "+o:o;else if(f.length)for(var n=o.length,u=0;(u=f.indexOf(o,u))>=0;){var s=u+n;(u===0||j.includes(f[u-1]))&&(s===f.length||j.includes(f[s]))?f=(u===0?"":f.substring(0,u))+f.substring(s+1):u=s}}return f===""?null:f}function A(r,i=!1){var t=i?" !important;":";",f="";for(var o of Object.keys(r)){var n=r[o];n!=null&&n!==""&&(f+=" "+o+": "+n+t)}return f}function p(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function L(r,i){if(i){var t="",f,o;if(Array.isArray(i)?(f=i[0],o=i[1]):f=i,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var n=!1,u=0,s=!1,c=[];f&&c.push(...Object.keys(f).map(p)),o&&c.push(...Object.keys(o).map(p));var l=0,g=-1;const b=r.length;for(var e=0;e<b;e++){var a=r[e];if(s?a==="/"&&r[e-1]==="*"&&(s=!1):n?n===a&&(n=!1):a==="/"&&r[e+1]==="*"?s=!0:a==='"'||a==="'"?n=a:a==="("?u++:a===")"&&u--,!s&&n===!1&&u===0){if(a===":"&&g===-1)g=e;else if(a===";"||e===b-1){if(g!==-1){var O=p(r.substring(l,g).trim());if(!c.includes(O)){a!==";"&&e++;var d=r.substring(l,e).trim();t+=" "+d+";"}}l=e+1,g=-1}}}}return f&&(t+=A(f)),o&&(t+=A(o,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function z(r,i,t,f,o,n){var u=r.__className;if(h||u!==t||u===void 0){var s=T(t,f,n);(!h||s!==r.getAttribute("class"))&&(s==null?r.removeAttribute("class"):i?r.className=s:r.setAttribute("class",s)),r.__className=t}else if(n&&o!==n)for(var c in n){var l=!!n[c];(o==null||l!==!!o[c])&&r.classList.toggle(c,l)}return n}const E="";class w extends Error{constructor(i,t){super(t),this.status=i,this.name="ApiError"}}async function C(r,i){const t={...i?.headers};i?.body&&(t["Content-Type"]=t["Content-Type"]??"application/json");const f=await fetch(`${E}${r}`,{...i,headers:t});if(!f.ok){const o=await f.json().catch(()=>({error:f.statusText}));throw f.status===401&&typeof window<"u"&&!r.startsWith("/api/auth/")&&window.location.pathname!=="/login"&&(window.location.href="/login"),new w(f.status,o.error??f.statusText)}return f.json()}const B=Object.freeze(Object.defineProperty({__proto__:null,ApiError:w,apiFetch:C},Symbol.toStringTag,{value:"Module"}));export{C as a,S as b,$ as c,B as d,z as s,L as t};
@@ -1 +1 @@
1
- import{g as t,s as e,e as u}from"./BenpwI6m.js";import{a as p}from"./BjAmYrTY.js";function E(){let l=u(null),i=u(null),r=u(null),o=u(null),s=u("entity"),f=u(null),g=u(null),d=u("preferences"),h=u(!1);function v(n,c){t(l)&&(t(l)!==n||t(r)!==c)&&p(t(l)).catch(()=>{})}function w(n,c,a,V){v(n,a),e(l,n,!0),e(i,c,!0),e(r,a,!0),e(o,V??null,!0)}function y(){e(s,"entity")}function b(){e(s,"graph")}function I(n){e(s,"view"),e(f,n,!0)}function S(){e(s,"settings"),e(d,"preferences")}function m(n,c,a){t(r)===a&&t(l)===n?(e(l,null),e(i,null),e(r,null)):(e(l,n,!0),e(i,c,!0),e(r,a,!0)),e(o,null)}function T(){t(l)&&p(t(l)).catch(()=>{}),e(l,null),e(i,null),e(r,null),e(o,null)}return{get selectedRepo(){return t(l)},get selectedType(){return t(i)},get selectedId(){return t(r)},get selectedSubPath(){return t(o)},get activeView(){return t(s)},get entityPath(){return t(l)&&t(i)&&t(r)?`/${t(l)}/${t(i)}/${t(r)}`:null},get hoveredEntityId(){return t(g)},set hoveredEntityId(n){e(g,n,!0)},get settingsTab(){return t(d)},set settingsTab(n){e(d,n,!0)},get hideSidebar(){return t(h)},set hideSidebar(n){e(h,n,!0)},select:w,deselect:T,selectOnGraph:m,showEntity:y,showGraph:b,get activeViewId(){return t(f)},showView:I,showSettings:S}}const $=E();export{$ as n};
1
+ import{g as t,s as e,e as u}from"./CCA2E2CK.js";import{a as p}from"./BgRr0V7g.js";function E(){let l=u(null),i=u(null),r=u(null),o=u(null),s=u("entity"),f=u(null),g=u(null),d=u("preferences"),h=u(!1);function v(n,c){t(l)&&(t(l)!==n||t(r)!==c)&&p(t(l)).catch(()=>{})}function w(n,c,a,V){v(n,a),e(l,n,!0),e(i,c,!0),e(r,a,!0),e(o,V??null,!0)}function y(){e(s,"entity")}function b(){e(s,"graph")}function I(n){e(s,"view"),e(f,n,!0)}function S(){e(s,"settings"),e(d,"preferences")}function m(n,c,a){t(r)===a&&t(l)===n?(e(l,null),e(i,null),e(r,null)):(e(l,n,!0),e(i,c,!0),e(r,a,!0)),e(o,null)}function T(){t(l)&&p(t(l)).catch(()=>{}),e(l,null),e(i,null),e(r,null),e(o,null)}return{get selectedRepo(){return t(l)},get selectedType(){return t(i)},get selectedId(){return t(r)},get selectedSubPath(){return t(o)},get activeView(){return t(s)},get entityPath(){return t(l)&&t(i)&&t(r)?`/${t(l)}/${t(i)}/${t(r)}`:null},get hoveredEntityId(){return t(g)},set hoveredEntityId(n){e(g,n,!0)},get settingsTab(){return t(d)},set settingsTab(n){e(d,n,!0)},get hideSidebar(){return t(h)},set hideSidebar(n){e(h,n,!0)},select:w,deselect:T,selectOnGraph:m,showEntity:y,showGraph:b,get activeViewId(){return t(f)},showView:I,showSettings:S}}const $=E();export{$ as n};
@@ -1 +1 @@
1
- import{c as K,a as u,p as oe,b as q,s as ue,f as Ae,t as ve}from"./COik51fd.js";import{p as $,a0 as O,ae as X,b as ee,g as l,c as T,r as k,a4 as I,e as Re,f as De,s as be,l as we,d as ye,a as Te,n as ce,m as Ce,t as fe,a3 as Pe}from"./BenpwI6m.js";import{s as x,a as U}from"./CStpN6HQ.js";import{i as Y}from"./Dvv4bkXH.js";import{p as r,r as ae,s as pe,l as Se}from"./wWaI7EIw.js";import{p as D,M as ke,h,t as Ke,f as se,H as Le,m as Q,I as He,J as Ie,q as xe,r as Ee,i as Ne,K as Ue,L as ze,s as ge,N as Ve,F as Be,O as Ze,Q as je,R as We,T as Ye,A as qe,u as Ge,v as Je,x as Qe,y as Xe,z as $e,B as et,G as tt}from"./DkilSMcP.js";import{r as Me}from"./kNXMTe11.js";import{i as rt}from"./BSBiehHY.js";import{c as re}from"./CbwDFpOn.js";import{a as Fe}from"./DAD7hf2c.js";function nt(v,e){$(e,!0);let c=r(e,"open",15,!1),y=r(e,"onOpenChange",3,D),m=r(e,"onOpenChangeComplete",3,D);ke.create({open:h(()=>c(),f=>{c(f),y()?.(f)}),onOpenChangeComplete:h(()=>m())}),Ke(v,{children:(f,F)=>{var P=K(),g=O(P);x(g,()=>e.children??X),u(f,P)},$$slots:{default:!0}}),ee()}var ot=q("<div><!></div>");function at(v,e){const c=oe();$(e,!0);let y=r(e,"ref",15,null),m=r(e,"id",19,()=>se(c)),f=r(e,"disabled",3,!1),F=r(e,"onSelect",3,D),P=r(e,"closeOnSelect",3,!0),g=ae(e,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const C=Le.create({id:h(()=>m()),disabled:h(()=>f()),onSelect:h(()=>F()),ref:h(()=>y(),n=>y(n)),closeOnSelect:h(()=>P())}),p=I(()=>Q(g,C.props));var A=K(),i=O(A);{var t=n=>{var d=K(),o=O(d);x(o,()=>e.child,()=>({props:l(p)})),u(n,d)},a=n=>{var d=ot();U(d,()=>({...l(p)}));var o=T(d);x(o,()=>e.children??X),k(d),u(n,d)};Y(i,n=>{e.child?n(t):n(a,!1)})}u(v,A),ee()}var st=q("<div><!></div>");function lt(v,e){const c=oe();$(e,!0);let y=r(e,"ref",15,null),m=r(e,"id",19,()=>se(c)),f=ae(e,["$$slots","$$events","$$legacy","ref","id","child","children"]);const F=He.create({id:h(()=>m()),ref:h(()=>y(),i=>y(i))}),P=I(()=>Q(f,F.props));var g=K(),C=O(g);{var p=i=>{var t=K(),a=O(t);x(a,()=>e.child,()=>({props:l(P)})),u(i,t)},A=i=>{var t=st();U(t,()=>({...l(P)}));var a=T(t);x(a,()=>e.children??X),k(t),u(i,t)};Y(C,i=>{e.child?i(p):i(A,!1)})}u(v,g),ee()}var it=q("<div><div><!></div></div>"),dt=q("<div><div><!></div></div>");function ut(v,e){const c=oe();$(e,!0);let y=r(e,"id",19,()=>se(c)),m=r(e,"ref",15,null),f=r(e,"loop",3,!0),F=r(e,"onInteractOutside",3,D),P=r(e,"forceMount",3,!1),g=r(e,"onEscapeKeydown",3,D),C=r(e,"interactOutsideBehavior",3,"defer-otherwise-close"),p=r(e,"escapeKeydownBehavior",3,"defer-otherwise-close"),A=r(e,"onOpenAutoFocus",3,D),i=r(e,"onCloseAutoFocus",3,D),t=r(e,"onFocusOutside",3,D),a=r(e,"side",3,"right"),n=r(e,"trapFocus",3,!1),d=ae(e,["$$slots","$$events","$$legacy","id","ref","children","child","loop","onInteractOutside","forceMount","onEscapeKeydown","interactOutsideBehavior","escapeKeydownBehavior","onOpenAutoFocus","onCloseAutoFocus","onFocusOutside","side","trapFocus","style"]);const o=Ie.create({id:h(()=>y()),loop:h(()=>f()),ref:h(()=>m(),s=>m(s)),isSub:!0,onCloseAutoFocus:h(()=>J)});function M(s){const S=s.currentTarget.contains(s.target),_=ze[o.parentMenu.root.opts.dir.current].includes(s.key);S&&_&&(o.parentMenu.onClose(),o.parentMenu.triggerNode?.focus(),s.preventDefault())}const z=I(()=>o.parentMenu.root.getBitsAttr("sub-content")),b=I(()=>Q(d,o.props,{side:a(),onkeydown:M,[l(z)]:""}));function G(s){A()(s),!s.defaultPrevented&&(s.preventDefault(),o.parentMenu.root.isUsingKeyboard&&o.parentMenu.contentNode&&Ue.dispatch(o.parentMenu.contentNode))}function J(s){i()(s),!s.defaultPrevented&&s.preventDefault()}function V(s){F()(s),!s.defaultPrevented&&o.parentMenu.onClose()}function te(s){g()(s),!s.defaultPrevented&&o.parentMenu.onClose()}function B(s){t()(s),!s.defaultPrevented&&Ne(s.target)&&s.target.id!==o.parentMenu.triggerNode?.id&&o.parentMenu.onClose()}var R=K(),Z=O(R);{var L=s=>{xe(s,pe(()=>l(b),{get ref(){return o.opts.ref},get interactOutsideBehavior(){return C()},get escapeKeydownBehavior(){return p()},onOpenAutoFocus:G,get enabled(){return o.parentMenu.opts.open.current},onInteractOutside:V,onEscapeKeydown:te,onFocusOutside:B,preventScroll:!1,get loop(){return f()},get trapFocus(){return n()},get shouldRender(){return o.shouldRender},popper:(_,w)=>{let j=()=>w?.().props,le=()=>w?.().wrapperProps;const ie=I(()=>Q(j(),l(b),{style:ge("menu")},{style:e.style}));var de=K(),_e=O(de);{var he=N=>{var E=K(),W=O(E);{let ne=I(()=>({props:l(ie),wrapperProps:le(),...o.snippetProps}));x(W,()=>e.child,()=>l(ne))}u(N,E)},me=N=>{var E=it();U(E,()=>({...le()}));var W=T(E);U(W,()=>({...l(ie)}));var ne=T(W);x(ne,()=>e.children??X),k(W),k(E),u(N,E)};Y(_e,N=>{e.child?N(he):N(me,!1)})}u(_,de)},$$slots:{popper:!0}}))},H=s=>{Ee(s,pe(()=>l(b),{get ref(){return o.opts.ref},get interactOutsideBehavior(){return C()},get escapeKeydownBehavior(){return p()},onCloseAutoFocus:J,onOpenAutoFocus:G,get open(){return o.parentMenu.opts.open.current},onInteractOutside:V,onEscapeKeydown:te,onFocusOutside:B,preventScroll:!1,get loop(){return f()},get trapFocus(){return n()},get shouldRender(){return o.shouldRender},popper:(_,w)=>{let j=()=>w?.().props,le=()=>w?.().wrapperProps;const ie=I(()=>Q(j(),l(b),{style:ge("menu")},{style:e.style}));var de=K(),_e=O(de);{var he=N=>{var E=K(),W=O(E);{let ne=I(()=>({props:l(ie),wrapperProps:le(),...o.snippetProps}));x(W,()=>e.child,()=>l(ne))}u(N,E)},me=N=>{var E=dt();U(E,()=>({...le()}));var W=T(E);U(W,()=>({...l(ie)}));var ne=T(W);x(ne,()=>e.children??X),k(W),k(E),u(N,E)};Y(_e,N=>{e.child?N(he):N(me,!1)})}u(_,de)},$$slots:{popper:!0}}))};Y(Z,s=>{P()?s(L):P()||s(H,1)})}u(v,R),ee()}var ct=q("<div><!></div>");function ft(v,e){const c=oe();$(e,!0);let y=r(e,"id",19,()=>se(c)),m=r(e,"disabled",3,!1),f=r(e,"ref",15,null),F=r(e,"onSelect",3,D),P=r(e,"openDelay",3,100),g=ae(e,["$$slots","$$events","$$legacy","id","disabled","ref","children","child","onSelect","openDelay"]);const C=Ve.create({disabled:h(()=>m()),onSelect:h(()=>F()),id:h(()=>y()),ref:h(()=>f(),A=>f(A)),openDelay:h(()=>P())}),p=I(()=>Q(g,C.props));Be(v,{get id(){return y()},get ref(){return C.opts.ref},children:(A,i)=>{var t=K(),a=O(t);{var n=o=>{var M=K(),z=O(M);x(z,()=>e.child,()=>({props:l(p)})),u(o,M)},d=o=>{var M=ct();U(M,()=>({...l(p)}));var z=T(M);x(z,()=>e.children??X),k(M),u(o,M)};Y(a,o=>{e.child?o(n):o(d,!1)})}u(A,t)},$$slots:{default:!0}}),ee()}function vt(v,e){$(e,!0);let c=r(e,"open",15,!1),y=r(e,"dir",3,"ltr"),m=r(e,"onOpenChange",3,D),f=r(e,"onOpenChangeComplete",3,D),F=r(e,"_internal_variant",3,"dropdown-menu");const P=Ze.create({variant:h(()=>F()),dir:h(()=>y()),onClose:()=>{c(!1),m()(!1)}});je.create({open:h(()=>c(),g=>{c(g),m()(g)}),onOpenChangeComplete:h(()=>f())},P),Ke(v,{children:(g,C)=>{var p=K(),A=O(p);x(A,()=>e.children??X),u(g,p)},$$slots:{default:!0}}),ee()}var pt=q("<div><div><!></div></div>"),gt=q("<div><div><!></div></div>");function _t(v,e){const c=oe();$(e,!0);let y=r(e,"id",19,()=>se(c)),m=r(e,"ref",15,null),f=r(e,"loop",3,!0),F=r(e,"onInteractOutside",3,D),P=r(e,"onEscapeKeydown",3,D),g=r(e,"onCloseAutoFocus",3,D),C=r(e,"forceMount",3,!1),p=r(e,"trapFocus",3,!1),A=ae(e,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const i=Ie.create({id:h(()=>y()),loop:h(()=>f()),ref:h(()=>m(),b=>m(b)),onCloseAutoFocus:h(()=>g())}),t=I(()=>Q(A,i.props));function a(b){if(i.handleInteractOutside(b),!b.defaultPrevented&&(F()(b),!b.defaultPrevented)){if(b.target&&b.target instanceof Element){const G=`[${i.parentMenu.root.getBitsAttr("sub-content")}]`;if(b.target.closest(G))return}i.parentMenu.onClose()}}function n(b){P()(b),!b.defaultPrevented&&i.parentMenu.onClose()}var d=K(),o=O(d);{var M=b=>{xe(b,pe(()=>l(t),()=>i.popperProps,{get ref(){return i.opts.ref},get enabled(){return i.parentMenu.opts.open.current},onInteractOutside:a,onEscapeKeydown:n,get trapFocus(){return p()},get loop(){return f()},forceMount:!0,get id(){return y()},get shouldRender(){return i.shouldRender},popper:(J,V)=>{let te=()=>V?.().props,B=()=>V?.().wrapperProps;const R=I(()=>Q(te(),{style:ge("dropdown-menu")},{style:e.style}));var Z=K(),L=O(Z);{var H=S=>{var _=K(),w=O(_);{let j=I(()=>({props:l(R),wrapperProps:B(),...i.snippetProps}));x(w,()=>e.child,()=>l(j))}u(S,_)},s=S=>{var _=pt();U(_,()=>({...B()}));var w=T(_);U(w,()=>({...l(R)}));var j=T(w);x(j,()=>e.children??X),k(w),k(_),u(S,_)};Y(L,S=>{e.child?S(H):S(s,!1)})}u(J,Z)},$$slots:{popper:!0}}))},z=b=>{Ee(b,pe(()=>l(t),()=>i.popperProps,{get ref(){return i.opts.ref},get open(){return i.parentMenu.opts.open.current},onInteractOutside:a,onEscapeKeydown:n,get trapFocus(){return p()},get loop(){return f()},forceMount:!1,get id(){return y()},get shouldRender(){return i.shouldRender},popper:(J,V)=>{let te=()=>V?.().props,B=()=>V?.().wrapperProps;const R=I(()=>Q(te(),{style:ge("dropdown-menu")},{style:e.style}));var Z=K(),L=O(Z);{var H=S=>{var _=K(),w=O(_);{let j=I(()=>({props:l(R),wrapperProps:B(),...i.snippetProps}));x(w,()=>e.child,()=>l(j))}u(S,_)},s=S=>{var _=gt();U(_,()=>({...B()}));var w=T(_);U(w,()=>({...l(R)}));var j=T(w);x(j,()=>e.children??X),k(w),k(_),u(S,_)};Y(L,S=>{e.child?S(H):S(s,!1)})}u(J,Z)},$$slots:{popper:!0}}))};Y(o,b=>{C()?b(M):C()||b(z,1)})}u(v,d),ee()}var ht=q("<button><!></button>");function mt(v,e){const c=oe();$(e,!0);let y=r(e,"id",19,()=>se(c)),m=r(e,"ref",15,null),f=r(e,"disabled",3,!1),F=r(e,"type",3,"button"),P=ae(e,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const g=We.create({id:h(()=>y()),disabled:h(()=>f()??!1),ref:h(()=>m(),p=>m(p))}),C=I(()=>Q(P,g.props,{type:F()}));Be(v,{get id(){return y()},get ref(){return g.opts.ref},children:(p,A)=>{var i=K(),t=O(i);{var a=d=>{var o=K(),M=O(o);x(M,()=>e.child,()=>({props:l(C)})),u(d,o)},n=d=>{var o=ht();U(o,()=>({...l(C)}));var M=T(o);x(M,()=>e.children??X),k(o),u(d,o)};Y(t,d=>{e.child?d(a):d(n,!1)})}u(p,i)},$$slots:{default:!0}}),ee()}const Dt=vt,Tt=mt,kt=Ye,Lt=_t,Ht=at,Nt=lt,Ut=nt,zt=ft,Vt=ut;function yt(){let v=Re(De({})),e=null,c=null;function y(t,a,n){c&&(clearInterval(c),c=null),e=`${t}/${a}/${n}`,f("enter",t,a,n),c=setInterval(()=>{e&&f("heartbeat",t,a,n)},3e4)}function m(){if(c&&(clearInterval(c),c=null),e){const[t,a,n]=e.split("/");t&&a&&n&&f("leave",t,a,n),e=null}}function f(t,a,n,d){Me.send({type:"presence",action:t,repo:a,entityType:n,entityId:d})}function F(t){const a=`${t.repo}/${t.entityType}/${t.entityId}`,n=l(v)[a]??[];if(t.action==="leave")l(v)[a]=n.filter(d=>d.id!==t.user.id);else{const d=n.findIndex(o=>o.id===t.user.id);d>=0?(n[d]=t.user,l(v)[a]=[...n]):l(v)[a]=[...n,t.user]}}function P(){if(be(v,{},!0),!e)return;const[t,a,n]=e.split("/");t&&a&&n&&f("enter",t,a,n)}function g(t,a,n,d){const o=`${t}/${a}/${n}`,M=l(v)[o]??[];return d?M.filter(z=>z.id!==d):M}function C(t,a){const n=new Map;for(const[d,o]of Object.entries(l(v)))if(d.startsWith(t))for(const M of o)(!a||M.id!==a)&&n.set(M.id,M);return[...n.values()]}function p(t,a){return C(`${t}/`,a)}function A(t){const a=new Map;for(const n of Object.values(l(v)))for(const d of n)(!t||d.id!==t)&&a.set(d.id,d);return[...a.values()]}const i=I(()=>{const t=new Map;for(const a of Object.values(l(v)))for(const n of a)t.set(n.id,n);return[...t.values()]});return{enter:y,leave:m,handlePresenceEvent:F,resetAndResend:P,getPresence:g,getPresenceByPrefix:C,getRepoPresence:p,getAllUsers:A,get allUsers(){return l(i)}}}const Oe=yt();Me.setPresenceHandler(v=>Oe.handlePresenceEvent(v));Me.addConnectHandler(()=>Oe.resetAndResend());typeof window<"u"&&window.addEventListener("beforeunload",()=>Oe.leave());var Pt=Ae("<title> </title>"),bt=Ae('<svg><!><path d="M25,12H20v2h5a1.0008,1.0008,0,0,1,1,1v2H22a3.0033,3.0033,0,0,0-3,3v1a3.0033,3.0033,0,0,0,3,3h6V15A3.0033,3.0033,0,0,0,25,12ZM22,22a1.0008,1.0008,0,0,1-1-1V20a1.0008,1.0008,0,0,1,1-1h4v3Z"></path><path d="M16,24h2L12,7H10L4,24H6l1.6936-5h6.6135ZM8.3711,17l2.4966-7.3711.2668.0005L13.63,17Z"></path></svg>');function Zt(v,e){const c=Se(e,["children","$$slots","$$events","$$legacy"]),y=Se(c,["size","title"]);$(e,!1);const m=Ce(),f=Ce();let F=r(e,"size",8,16),P=r(e,"title",8,void 0);we(()=>(ye(c),ye(P())),()=>{be(m,c["aria-label"]||c["aria-labelledby"]||P())}),we(()=>(l(m),ye(c)),()=>{be(f,{"aria-hidden":l(m)?void 0:!0,role:l(m)?"img":void 0,focusable:Number(c.tabindex)===0?!0:void 0})}),Te(),rt();var g=bt();U(g,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:F(),height:F(),...l(f),...y}));var C=T(g);{var p=A=>{var i=Pt(),t=T(i,!0);k(i),fe(()=>ue(t,P())),u(A,i)};Y(C,A=>{P()&&A(p)})}ce(2),k(g),u(v,g),ee()}var Mt=q("<!> <!>",1),Ot=q("<!> <!>",1),wt=q("<!> <!>",1);function jt(v,e){$(e,!0);let c=r(e,"open",15),y=r(e,"confirmLabel",3,"Confirm"),m=r(e,"cancelLabel",3,"Cancel"),f=r(e,"destructive",3,!1);var F=K(),P=O(F);re(P,()=>tt,(g,C)=>{C(g,{onOpenChange:p=>{p||e.oncancel()},get open(){return c()},set open(p){c(p)},children:(p,A)=>{var i=K(),t=O(i);re(t,()=>qe,(a,n)=>{n(a,{children:(d,o)=>{var M=wt(),z=O(M);re(z,()=>Ge,(G,J)=>{J(G,{children:(V,te)=>{var B=Mt(),R=O(B);re(R,()=>Je,(L,H)=>{H(L,{children:(s,S)=>{ce();var _=ve();fe(()=>ue(_,e.title)),u(s,_)},$$slots:{default:!0}})});var Z=Pe(R,2);re(Z,()=>Qe,(L,H)=>{H(L,{children:(s,S)=>{ce();var _=ve();fe(()=>ue(_,e.message)),u(s,_)},$$slots:{default:!0}})}),u(V,B)},$$slots:{default:!0}})});var b=Pe(z,2);re(b,()=>Xe,(G,J)=>{J(G,{children:(V,te)=>{var B=Ot(),R=O(B);{let L=I(()=>Fe({variant:"ghost"}));re(R,()=>$e,(H,s)=>{s(H,{get class(){return l(L)},get onclick(){return e.oncancel},children:(S,_)=>{ce();var w=ve();fe(()=>ue(w,m())),u(S,w)},$$slots:{default:!0}})})}var Z=Pe(R,2);{let L=I(()=>Fe({variant:f()?"destructive":"accent"}));re(Z,()=>et,(H,s)=>{s(H,{get class(){return l(L)},get onclick(){return e.onconfirm},children:(S,_)=>{ce();var w=ve();fe(()=>ue(w,y())),u(S,w)},$$slots:{default:!0}})})}u(V,B)},$$slots:{default:!0}})}),u(d,M)},$$slots:{default:!0}})}),u(p,i)},$$slots:{default:!0}})}),u(v,F),ee()}export{Lt as C,Ht as I,kt as P,Dt as R,Nt as S,Tt as T,Zt as a,jt as b,Ut as c,zt as d,Vt as e,Oe as p};
1
+ import{c as K,a as u,p as oe,b as q,s as ue,f as Ae,t as ve}from"./usxM-xOh.js";import{p as $,a0 as O,ae as X,b as ee,g as l,c as T,r as k,a4 as I,e as Re,f as De,s as be,l as we,d as ye,a as Te,n as ce,m as Ce,t as fe,a3 as Pe}from"./CCA2E2CK.js";import{s as x,a as U}from"./DkuxRPZv.js";import{i as Y}from"./yUs562n0.js";import{p as r,r as ae,s as pe,l as Se}from"./DHholpIc.js";import{p as D,M as ke,h,t as Ke,f as se,H as Le,m as Q,I as He,J as Ie,q as xe,r as Ee,i as Ne,K as Ue,L as ze,s as ge,N as Ve,F as Be,O as Ze,Q as je,R as We,T as Ye,A as qe,u as Ge,v as Je,x as Qe,y as Xe,z as $e,B as et,G as tt}from"./e8QVPHqJ.js";import{r as Me}from"./CtOfM9NX.js";import{i as rt}from"./DIBaaeCL.js";import{c as re}from"./NuvuAeCX.js";import{a as Fe}from"./D8mTIH9Y.js";function nt(v,e){$(e,!0);let c=r(e,"open",15,!1),y=r(e,"onOpenChange",3,D),m=r(e,"onOpenChangeComplete",3,D);ke.create({open:h(()=>c(),f=>{c(f),y()?.(f)}),onOpenChangeComplete:h(()=>m())}),Ke(v,{children:(f,F)=>{var P=K(),g=O(P);x(g,()=>e.children??X),u(f,P)},$$slots:{default:!0}}),ee()}var ot=q("<div><!></div>");function at(v,e){const c=oe();$(e,!0);let y=r(e,"ref",15,null),m=r(e,"id",19,()=>se(c)),f=r(e,"disabled",3,!1),F=r(e,"onSelect",3,D),P=r(e,"closeOnSelect",3,!0),g=ae(e,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const C=Le.create({id:h(()=>m()),disabled:h(()=>f()),onSelect:h(()=>F()),ref:h(()=>y(),n=>y(n)),closeOnSelect:h(()=>P())}),p=I(()=>Q(g,C.props));var A=K(),i=O(A);{var t=n=>{var d=K(),o=O(d);x(o,()=>e.child,()=>({props:l(p)})),u(n,d)},a=n=>{var d=ot();U(d,()=>({...l(p)}));var o=T(d);x(o,()=>e.children??X),k(d),u(n,d)};Y(i,n=>{e.child?n(t):n(a,!1)})}u(v,A),ee()}var st=q("<div><!></div>");function lt(v,e){const c=oe();$(e,!0);let y=r(e,"ref",15,null),m=r(e,"id",19,()=>se(c)),f=ae(e,["$$slots","$$events","$$legacy","ref","id","child","children"]);const F=He.create({id:h(()=>m()),ref:h(()=>y(),i=>y(i))}),P=I(()=>Q(f,F.props));var g=K(),C=O(g);{var p=i=>{var t=K(),a=O(t);x(a,()=>e.child,()=>({props:l(P)})),u(i,t)},A=i=>{var t=st();U(t,()=>({...l(P)}));var a=T(t);x(a,()=>e.children??X),k(t),u(i,t)};Y(C,i=>{e.child?i(p):i(A,!1)})}u(v,g),ee()}var it=q("<div><div><!></div></div>"),dt=q("<div><div><!></div></div>");function ut(v,e){const c=oe();$(e,!0);let y=r(e,"id",19,()=>se(c)),m=r(e,"ref",15,null),f=r(e,"loop",3,!0),F=r(e,"onInteractOutside",3,D),P=r(e,"forceMount",3,!1),g=r(e,"onEscapeKeydown",3,D),C=r(e,"interactOutsideBehavior",3,"defer-otherwise-close"),p=r(e,"escapeKeydownBehavior",3,"defer-otherwise-close"),A=r(e,"onOpenAutoFocus",3,D),i=r(e,"onCloseAutoFocus",3,D),t=r(e,"onFocusOutside",3,D),a=r(e,"side",3,"right"),n=r(e,"trapFocus",3,!1),d=ae(e,["$$slots","$$events","$$legacy","id","ref","children","child","loop","onInteractOutside","forceMount","onEscapeKeydown","interactOutsideBehavior","escapeKeydownBehavior","onOpenAutoFocus","onCloseAutoFocus","onFocusOutside","side","trapFocus","style"]);const o=Ie.create({id:h(()=>y()),loop:h(()=>f()),ref:h(()=>m(),s=>m(s)),isSub:!0,onCloseAutoFocus:h(()=>J)});function M(s){const S=s.currentTarget.contains(s.target),_=ze[o.parentMenu.root.opts.dir.current].includes(s.key);S&&_&&(o.parentMenu.onClose(),o.parentMenu.triggerNode?.focus(),s.preventDefault())}const z=I(()=>o.parentMenu.root.getBitsAttr("sub-content")),b=I(()=>Q(d,o.props,{side:a(),onkeydown:M,[l(z)]:""}));function G(s){A()(s),!s.defaultPrevented&&(s.preventDefault(),o.parentMenu.root.isUsingKeyboard&&o.parentMenu.contentNode&&Ue.dispatch(o.parentMenu.contentNode))}function J(s){i()(s),!s.defaultPrevented&&s.preventDefault()}function V(s){F()(s),!s.defaultPrevented&&o.parentMenu.onClose()}function te(s){g()(s),!s.defaultPrevented&&o.parentMenu.onClose()}function B(s){t()(s),!s.defaultPrevented&&Ne(s.target)&&s.target.id!==o.parentMenu.triggerNode?.id&&o.parentMenu.onClose()}var R=K(),Z=O(R);{var L=s=>{xe(s,pe(()=>l(b),{get ref(){return o.opts.ref},get interactOutsideBehavior(){return C()},get escapeKeydownBehavior(){return p()},onOpenAutoFocus:G,get enabled(){return o.parentMenu.opts.open.current},onInteractOutside:V,onEscapeKeydown:te,onFocusOutside:B,preventScroll:!1,get loop(){return f()},get trapFocus(){return n()},get shouldRender(){return o.shouldRender},popper:(_,w)=>{let j=()=>w?.().props,le=()=>w?.().wrapperProps;const ie=I(()=>Q(j(),l(b),{style:ge("menu")},{style:e.style}));var de=K(),_e=O(de);{var he=N=>{var E=K(),W=O(E);{let ne=I(()=>({props:l(ie),wrapperProps:le(),...o.snippetProps}));x(W,()=>e.child,()=>l(ne))}u(N,E)},me=N=>{var E=it();U(E,()=>({...le()}));var W=T(E);U(W,()=>({...l(ie)}));var ne=T(W);x(ne,()=>e.children??X),k(W),k(E),u(N,E)};Y(_e,N=>{e.child?N(he):N(me,!1)})}u(_,de)},$$slots:{popper:!0}}))},H=s=>{Ee(s,pe(()=>l(b),{get ref(){return o.opts.ref},get interactOutsideBehavior(){return C()},get escapeKeydownBehavior(){return p()},onCloseAutoFocus:J,onOpenAutoFocus:G,get open(){return o.parentMenu.opts.open.current},onInteractOutside:V,onEscapeKeydown:te,onFocusOutside:B,preventScroll:!1,get loop(){return f()},get trapFocus(){return n()},get shouldRender(){return o.shouldRender},popper:(_,w)=>{let j=()=>w?.().props,le=()=>w?.().wrapperProps;const ie=I(()=>Q(j(),l(b),{style:ge("menu")},{style:e.style}));var de=K(),_e=O(de);{var he=N=>{var E=K(),W=O(E);{let ne=I(()=>({props:l(ie),wrapperProps:le(),...o.snippetProps}));x(W,()=>e.child,()=>l(ne))}u(N,E)},me=N=>{var E=dt();U(E,()=>({...le()}));var W=T(E);U(W,()=>({...l(ie)}));var ne=T(W);x(ne,()=>e.children??X),k(W),k(E),u(N,E)};Y(_e,N=>{e.child?N(he):N(me,!1)})}u(_,de)},$$slots:{popper:!0}}))};Y(Z,s=>{P()?s(L):P()||s(H,1)})}u(v,R),ee()}var ct=q("<div><!></div>");function ft(v,e){const c=oe();$(e,!0);let y=r(e,"id",19,()=>se(c)),m=r(e,"disabled",3,!1),f=r(e,"ref",15,null),F=r(e,"onSelect",3,D),P=r(e,"openDelay",3,100),g=ae(e,["$$slots","$$events","$$legacy","id","disabled","ref","children","child","onSelect","openDelay"]);const C=Ve.create({disabled:h(()=>m()),onSelect:h(()=>F()),id:h(()=>y()),ref:h(()=>f(),A=>f(A)),openDelay:h(()=>P())}),p=I(()=>Q(g,C.props));Be(v,{get id(){return y()},get ref(){return C.opts.ref},children:(A,i)=>{var t=K(),a=O(t);{var n=o=>{var M=K(),z=O(M);x(z,()=>e.child,()=>({props:l(p)})),u(o,M)},d=o=>{var M=ct();U(M,()=>({...l(p)}));var z=T(M);x(z,()=>e.children??X),k(M),u(o,M)};Y(a,o=>{e.child?o(n):o(d,!1)})}u(A,t)},$$slots:{default:!0}}),ee()}function vt(v,e){$(e,!0);let c=r(e,"open",15,!1),y=r(e,"dir",3,"ltr"),m=r(e,"onOpenChange",3,D),f=r(e,"onOpenChangeComplete",3,D),F=r(e,"_internal_variant",3,"dropdown-menu");const P=Ze.create({variant:h(()=>F()),dir:h(()=>y()),onClose:()=>{c(!1),m()(!1)}});je.create({open:h(()=>c(),g=>{c(g),m()(g)}),onOpenChangeComplete:h(()=>f())},P),Ke(v,{children:(g,C)=>{var p=K(),A=O(p);x(A,()=>e.children??X),u(g,p)},$$slots:{default:!0}}),ee()}var pt=q("<div><div><!></div></div>"),gt=q("<div><div><!></div></div>");function _t(v,e){const c=oe();$(e,!0);let y=r(e,"id",19,()=>se(c)),m=r(e,"ref",15,null),f=r(e,"loop",3,!0),F=r(e,"onInteractOutside",3,D),P=r(e,"onEscapeKeydown",3,D),g=r(e,"onCloseAutoFocus",3,D),C=r(e,"forceMount",3,!1),p=r(e,"trapFocus",3,!1),A=ae(e,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const i=Ie.create({id:h(()=>y()),loop:h(()=>f()),ref:h(()=>m(),b=>m(b)),onCloseAutoFocus:h(()=>g())}),t=I(()=>Q(A,i.props));function a(b){if(i.handleInteractOutside(b),!b.defaultPrevented&&(F()(b),!b.defaultPrevented)){if(b.target&&b.target instanceof Element){const G=`[${i.parentMenu.root.getBitsAttr("sub-content")}]`;if(b.target.closest(G))return}i.parentMenu.onClose()}}function n(b){P()(b),!b.defaultPrevented&&i.parentMenu.onClose()}var d=K(),o=O(d);{var M=b=>{xe(b,pe(()=>l(t),()=>i.popperProps,{get ref(){return i.opts.ref},get enabled(){return i.parentMenu.opts.open.current},onInteractOutside:a,onEscapeKeydown:n,get trapFocus(){return p()},get loop(){return f()},forceMount:!0,get id(){return y()},get shouldRender(){return i.shouldRender},popper:(J,V)=>{let te=()=>V?.().props,B=()=>V?.().wrapperProps;const R=I(()=>Q(te(),{style:ge("dropdown-menu")},{style:e.style}));var Z=K(),L=O(Z);{var H=S=>{var _=K(),w=O(_);{let j=I(()=>({props:l(R),wrapperProps:B(),...i.snippetProps}));x(w,()=>e.child,()=>l(j))}u(S,_)},s=S=>{var _=pt();U(_,()=>({...B()}));var w=T(_);U(w,()=>({...l(R)}));var j=T(w);x(j,()=>e.children??X),k(w),k(_),u(S,_)};Y(L,S=>{e.child?S(H):S(s,!1)})}u(J,Z)},$$slots:{popper:!0}}))},z=b=>{Ee(b,pe(()=>l(t),()=>i.popperProps,{get ref(){return i.opts.ref},get open(){return i.parentMenu.opts.open.current},onInteractOutside:a,onEscapeKeydown:n,get trapFocus(){return p()},get loop(){return f()},forceMount:!1,get id(){return y()},get shouldRender(){return i.shouldRender},popper:(J,V)=>{let te=()=>V?.().props,B=()=>V?.().wrapperProps;const R=I(()=>Q(te(),{style:ge("dropdown-menu")},{style:e.style}));var Z=K(),L=O(Z);{var H=S=>{var _=K(),w=O(_);{let j=I(()=>({props:l(R),wrapperProps:B(),...i.snippetProps}));x(w,()=>e.child,()=>l(j))}u(S,_)},s=S=>{var _=gt();U(_,()=>({...B()}));var w=T(_);U(w,()=>({...l(R)}));var j=T(w);x(j,()=>e.children??X),k(w),k(_),u(S,_)};Y(L,S=>{e.child?S(H):S(s,!1)})}u(J,Z)},$$slots:{popper:!0}}))};Y(o,b=>{C()?b(M):C()||b(z,1)})}u(v,d),ee()}var ht=q("<button><!></button>");function mt(v,e){const c=oe();$(e,!0);let y=r(e,"id",19,()=>se(c)),m=r(e,"ref",15,null),f=r(e,"disabled",3,!1),F=r(e,"type",3,"button"),P=ae(e,["$$slots","$$events","$$legacy","id","ref","child","children","disabled","type"]);const g=We.create({id:h(()=>y()),disabled:h(()=>f()??!1),ref:h(()=>m(),p=>m(p))}),C=I(()=>Q(P,g.props,{type:F()}));Be(v,{get id(){return y()},get ref(){return g.opts.ref},children:(p,A)=>{var i=K(),t=O(i);{var a=d=>{var o=K(),M=O(o);x(M,()=>e.child,()=>({props:l(C)})),u(d,o)},n=d=>{var o=ht();U(o,()=>({...l(C)}));var M=T(o);x(M,()=>e.children??X),k(o),u(d,o)};Y(t,d=>{e.child?d(a):d(n,!1)})}u(p,i)},$$slots:{default:!0}}),ee()}const Dt=vt,Tt=mt,kt=Ye,Lt=_t,Ht=at,Nt=lt,Ut=nt,zt=ft,Vt=ut;function yt(){let v=Re(De({})),e=null,c=null;function y(t,a,n){c&&(clearInterval(c),c=null),e=`${t}/${a}/${n}`,f("enter",t,a,n),c=setInterval(()=>{e&&f("heartbeat",t,a,n)},3e4)}function m(){if(c&&(clearInterval(c),c=null),e){const[t,a,n]=e.split("/");t&&a&&n&&f("leave",t,a,n),e=null}}function f(t,a,n,d){Me.send({type:"presence",action:t,repo:a,entityType:n,entityId:d})}function F(t){const a=`${t.repo}/${t.entityType}/${t.entityId}`,n=l(v)[a]??[];if(t.action==="leave")l(v)[a]=n.filter(d=>d.id!==t.user.id);else{const d=n.findIndex(o=>o.id===t.user.id);d>=0?(n[d]=t.user,l(v)[a]=[...n]):l(v)[a]=[...n,t.user]}}function P(){if(be(v,{},!0),!e)return;const[t,a,n]=e.split("/");t&&a&&n&&f("enter",t,a,n)}function g(t,a,n,d){const o=`${t}/${a}/${n}`,M=l(v)[o]??[];return d?M.filter(z=>z.id!==d):M}function C(t,a){const n=new Map;for(const[d,o]of Object.entries(l(v)))if(d.startsWith(t))for(const M of o)(!a||M.id!==a)&&n.set(M.id,M);return[...n.values()]}function p(t,a){return C(`${t}/`,a)}function A(t){const a=new Map;for(const n of Object.values(l(v)))for(const d of n)(!t||d.id!==t)&&a.set(d.id,d);return[...a.values()]}const i=I(()=>{const t=new Map;for(const a of Object.values(l(v)))for(const n of a)t.set(n.id,n);return[...t.values()]});return{enter:y,leave:m,handlePresenceEvent:F,resetAndResend:P,getPresence:g,getPresenceByPrefix:C,getRepoPresence:p,getAllUsers:A,get allUsers(){return l(i)}}}const Oe=yt();Me.setPresenceHandler(v=>Oe.handlePresenceEvent(v));Me.addConnectHandler(()=>Oe.resetAndResend());typeof window<"u"&&window.addEventListener("beforeunload",()=>Oe.leave());var Pt=Ae("<title> </title>"),bt=Ae('<svg><!><path d="M25,12H20v2h5a1.0008,1.0008,0,0,1,1,1v2H22a3.0033,3.0033,0,0,0-3,3v1a3.0033,3.0033,0,0,0,3,3h6V15A3.0033,3.0033,0,0,0,25,12ZM22,22a1.0008,1.0008,0,0,1-1-1V20a1.0008,1.0008,0,0,1,1-1h4v3Z"></path><path d="M16,24h2L12,7H10L4,24H6l1.6936-5h6.6135ZM8.3711,17l2.4966-7.3711.2668.0005L13.63,17Z"></path></svg>');function Zt(v,e){const c=Se(e,["children","$$slots","$$events","$$legacy"]),y=Se(c,["size","title"]);$(e,!1);const m=Ce(),f=Ce();let F=r(e,"size",8,16),P=r(e,"title",8,void 0);we(()=>(ye(c),ye(P())),()=>{be(m,c["aria-label"]||c["aria-labelledby"]||P())}),we(()=>(l(m),ye(c)),()=>{be(f,{"aria-hidden":l(m)?void 0:!0,role:l(m)?"img":void 0,focusable:Number(c.tabindex)===0?!0:void 0})}),Te(),rt();var g=bt();U(g,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:F(),height:F(),...l(f),...y}));var C=T(g);{var p=A=>{var i=Pt(),t=T(i,!0);k(i),fe(()=>ue(t,P())),u(A,i)};Y(C,A=>{P()&&A(p)})}ce(2),k(g),u(v,g),ee()}var Mt=q("<!> <!>",1),Ot=q("<!> <!>",1),wt=q("<!> <!>",1);function jt(v,e){$(e,!0);let c=r(e,"open",15),y=r(e,"confirmLabel",3,"Confirm"),m=r(e,"cancelLabel",3,"Cancel"),f=r(e,"destructive",3,!1);var F=K(),P=O(F);re(P,()=>tt,(g,C)=>{C(g,{onOpenChange:p=>{p||e.oncancel()},get open(){return c()},set open(p){c(p)},children:(p,A)=>{var i=K(),t=O(i);re(t,()=>qe,(a,n)=>{n(a,{children:(d,o)=>{var M=wt(),z=O(M);re(z,()=>Ge,(G,J)=>{J(G,{children:(V,te)=>{var B=Mt(),R=O(B);re(R,()=>Je,(L,H)=>{H(L,{children:(s,S)=>{ce();var _=ve();fe(()=>ue(_,e.title)),u(s,_)},$$slots:{default:!0}})});var Z=Pe(R,2);re(Z,()=>Qe,(L,H)=>{H(L,{children:(s,S)=>{ce();var _=ve();fe(()=>ue(_,e.message)),u(s,_)},$$slots:{default:!0}})}),u(V,B)},$$slots:{default:!0}})});var b=Pe(z,2);re(b,()=>Xe,(G,J)=>{J(G,{children:(V,te)=>{var B=Ot(),R=O(B);{let L=I(()=>Fe({variant:"ghost"}));re(R,()=>$e,(H,s)=>{s(H,{get class(){return l(L)},get onclick(){return e.oncancel},children:(S,_)=>{ce();var w=ve();fe(()=>ue(w,m())),u(S,w)},$$slots:{default:!0}})})}var Z=Pe(R,2);{let L=I(()=>Fe({variant:f()?"destructive":"accent"}));re(Z,()=>et,(H,s)=>{s(H,{get class(){return l(L)},get onclick(){return e.onconfirm},children:(S,_)=>{ce();var w=ve();fe(()=>ue(w,y())),u(S,w)},$$slots:{default:!0}})})}u(V,B)},$$slots:{default:!0}})}),u(d,M)},$$slots:{default:!0}})}),u(p,i)},$$slots:{default:!0}})}),u(v,F),ee()}export{jt as C,Ht as I,kt as P,Dt as R,Nt as S,Zt as T,Tt as a,Lt as b,Ut as c,zt as d,Vt as e,Oe as p};
@@ -1 +1 @@
1
- import{a as c,s as M,f as b}from"./COik51fd.js";import{i as C}from"./BSBiehHY.js";import{p as k,l as v,s as u,d as n,g as s,a as R,c as p,n as A,r as m,b as B,m as g,t as N}from"./BenpwI6m.js";import{i as P}from"./Dvv4bkXH.js";import{a as Y}from"./CStpN6HQ.js";import{l as h,p as _}from"./wWaI7EIw.js";var j=b("<title> </title>"),q=b('<svg><!><path d="M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"></path></svg>');function L(x,t){const e=h(t,["children","$$slots","$$events","$$legacy"]),w=h(e,["size","title"]);k(t,!1);const a=g(),d=g();let f=_(t,"size",8,16),i=_(t,"title",8,void 0);v(()=>(n(e),n(i())),()=>{u(a,e["aria-label"]||e["aria-labelledby"]||i())}),v(()=>(s(a),n(e)),()=>{u(d,{"aria-hidden":s(a)?void 0:!0,role:s(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),R(),C();var r=q();Y(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...s(d),...w}));var z=p(r);{var $=l=>{var o=j(),y=p(o,!0);m(o),N(()=>M(y,i())),c(l,o)};P(z,l=>{i()&&l($)})}A(),m(r),c(x,r),B()}var D=b("<title> </title>"),E=b('<svg><!><path d="M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"></path></svg>');function O(x,t){const e=h(t,["children","$$slots","$$events","$$legacy"]),w=h(e,["size","title"]);k(t,!1);const a=g(),d=g();let f=_(t,"size",8,16),i=_(t,"title",8,void 0);v(()=>(n(e),n(i())),()=>{u(a,e["aria-label"]||e["aria-labelledby"]||i())}),v(()=>(s(a),n(e)),()=>{u(d,{"aria-hidden":s(a)?void 0:!0,role:s(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),R(),C();var r=E();Y(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...s(d),...w}));var z=p(r);{var $=l=>{var o=D(),y=p(o,!0);m(o),N(()=>M(y,i())),c(l,o)};P(z,l=>{i()&&l($)})}A(),m(r),c(x,r),B()}export{O as C,L as a};
1
+ import{a as c,s as M,f as b}from"./usxM-xOh.js";import{i as C}from"./DIBaaeCL.js";import{p as k,l as v,s as u,d as n,g as s,a as R,c as p,n as A,r as m,b as B,m as g,t as N}from"./CCA2E2CK.js";import{i as P}from"./yUs562n0.js";import{a as Y}from"./DkuxRPZv.js";import{l as h,p as _}from"./DHholpIc.js";var j=b("<title> </title>"),q=b('<svg><!><path d="M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"></path></svg>');function L(x,t){const e=h(t,["children","$$slots","$$events","$$legacy"]),w=h(e,["size","title"]);k(t,!1);const a=g(),d=g();let f=_(t,"size",8,16),i=_(t,"title",8,void 0);v(()=>(n(e),n(i())),()=>{u(a,e["aria-label"]||e["aria-labelledby"]||i())}),v(()=>(s(a),n(e)),()=>{u(d,{"aria-hidden":s(a)?void 0:!0,role:s(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),R(),C();var r=q();Y(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...s(d),...w}));var z=p(r);{var $=l=>{var o=j(),y=p(o,!0);m(o),N(()=>M(y,i())),c(l,o)};P(z,l=>{i()&&l($)})}A(),m(r),c(x,r),B()}var D=b("<title> </title>"),E=b('<svg><!><path d="M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"></path></svg>');function O(x,t){const e=h(t,["children","$$slots","$$events","$$legacy"]),w=h(e,["size","title"]);k(t,!1);const a=g(),d=g();let f=_(t,"size",8,16),i=_(t,"title",8,void 0);v(()=>(n(e),n(i())),()=>{u(a,e["aria-label"]||e["aria-labelledby"]||i())}),v(()=>(s(a),n(e)),()=>{u(d,{"aria-hidden":s(a)?void 0:!0,role:s(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),R(),C();var r=E();Y(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...s(d),...w}));var z=p(r);{var $=l=>{var o=D(),y=p(o,!0);m(o),N(()=>M(y,i())),c(l,o)};P(z,l=>{i()&&l($)})}A(),m(r),c(x,r),B()}export{O as C,L as a};
@@ -1 +1 @@
1
- import{e as m,f as w,s as u,g as o,a4 as it}from"./BenpwI6m.js";import{a as d}from"./CieeblIr.js";function at(){return d("/api/workspace")}function st(e){return d("/api/workspace",{method:"PUT",body:JSON.stringify(e)})}function wt(){return d("/api/workspace/mcp-config")}function D(){return d("/api/repos")}function ct(e,i,s,f){return d("/api/repos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,display_name:i||void 0,description:s,...f?{private:!0}:{}})})}function lt(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,display_name:s||void 0})})}function ut(e){return d(`/api/repos/${encodeURIComponent(e)}`,{method:"DELETE"})}function dt(){return d("/api/apps")}function pt(e){return d(`/api/repos/${encodeURIComponent(e)}/entities?summary=true`)}function Et(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`)}function St(e,i,s,f,c){return d(`/api/repos/${encodeURIComponent(e)}/entities`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,data:f,content:c})})}function bt(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`,{method:"DELETE"})}function It(e,i,s,f){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`,{method:"PUT",body:JSON.stringify(f)})}function Tt(e,i,s,f){return d(`/api/repos/${encodeURIComponent(e)}/change-type`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,newType:f})})}function $t(e,i,s,f,c){return d(`/api/repos/${encodeURIComponent(e)}/transfer`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,targetRepo:f,mode:c})})}function kt(){return d("/api/insights")}function vt(){return d("/api/insights/generate",{method:"POST"})}function Ut(){return d("/api/preferences")}function Pt(e){return d("/api/preferences",{method:"PUT",body:JSON.stringify(e)})}function Rt(){return d("/api/views")}function At(e,i,s){return d("/api/views",{method:"POST",body:JSON.stringify({name:e,viewType:s??"list",config:i})})}function Lt(e,i){return d(`/api/views/${e}`,{method:"PUT",body:JSON.stringify(i)})}function Ot(e){return d(`/api/views/${e}`,{method:"DELETE"})}function Mt(e){return d(`/api/repos/${encodeURIComponent(e)}/commit`,{method:"POST"})}function ft(e){return e.replace(/-/g," ").replace(/\b\w/g,i=>i.toUpperCase())}function _(e,i){return i||e.split("-").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" ")}const mt="#e05050";function v(e){if(typeof document>"u")return;const i=e||mt,s=parseInt(i.slice(1,3),16),f=parseInt(i.slice(3,5),16),c=parseInt(i.slice(5,7),16),E=[document.documentElement,document.querySelector("[data-theme]")].filter(Boolean);for(const h of E)h.style.setProperty("--color-accent",i),h.style.setProperty("--color-accent-hover",yt(i,15)),h.style.setProperty("--color-accent-muted",`rgba(${s}, ${f}, ${c}, 0.08)`),h.style.setProperty("--color-link",j(i,15)),h.style.setProperty("--color-badge-bg",`rgba(${s}, ${f}, ${c}, 0.1)`),h.style.setProperty("--color-badge-text",j(i,20))}function yt(e,i){const s=Math.max(0,Math.round(parseInt(e.slice(1,3),16)*(1-i/100))),f=Math.max(0,Math.round(parseInt(e.slice(3,5),16)*(1-i/100))),c=Math.max(0,Math.round(parseInt(e.slice(5,7),16)*(1-i/100)));return`#${s.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function j(e,i){const s=Math.min(255,Math.round(parseInt(e.slice(1,3),16)+(255-parseInt(e.slice(1,3),16))*i/100)),f=Math.min(255,Math.round(parseInt(e.slice(3,5),16)+(255-parseInt(e.slice(3,5),16))*i/100)),c=Math.min(255,Math.round(parseInt(e.slice(5,7),16)+(255-parseInt(e.slice(5,7),16))*i/100));return`#${s.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function gt(){let e=m(""),i=m(null),s=m(null),f=m(!1),c=m(w([]));const E={};let h=m(w([])),U=m(!1),P=m(null),g=m(w({})),R=w({}),A=w({}),T=w({}),F=m(0),x=m(null),C=m(""),$=null,S=m(0),b=m(0),J=m("alpha");async function W(){u(U,!0),u(P,null),u(S,0),u(b,0);try{const[t,n,r]=await Promise.all([D(),dt().catch(()=>[]),at().catch(()=>({name:""}))]);u(h,n,!0),u(e,r.name,!0),u(i,r.about??null,!0),u(s,r.accent_color??null,!0),u(f,!0),v(o(s)),u(c,t.map(a=>({name:a.name,displayName:_(a.name,a.display_name),type:a.type,private:a.private,sync:a.sync,count:null,entities:[],loading:!1,loaded:!1})),!0),await Promise.all(o(c).map(a=>I(a.name)))}catch(t){u(P,t.message,!0)}finally{u(U,!1)}}function V(t,n,r){const a=o(c).find(l=>l.name===t);a&&(a.entities=a.entities.filter(l=>!(l.id===r&&l.entityType===n)),a.count=a.entities.length)}async function Q(t){o(c).find(r=>r.name===t)&&await I(t,!0)}async function B(){u(S,0),u(b,0),await Promise.all(o(c).map(t=>I(t.name,!0)))}async function I(t,n=!1){const r=o(c).find(l=>l.name===t);if(!r||r.loading||!n&&r.loaded)return;const a=(E[t]??0)+1;E[t]=a,n||(r.loading=!0);try{const l=await pt(t);if(E[t]!==a)return;let y=0,L=0;for(const p of l)y+=p.document?.wikilinks?.length??0,L+=p.subContentCount??0;u(S,o(S)+y),u(b,o(b)+L);const O=new Set(["name","created_at","updated_at"]);r.entities=l.filter(p=>!p.id.toLowerCase().startsWith("readme")).map(p=>({id:p.id,title:p.data?.name??ft(p.id),entityType:p.entityType,repo:t,hasSubContent:!!p.hasSubContent,wikilinks:p.document?.wikilinks??[],createdAt:p.data?.created_at??null,updatedAt:p.data?.updated_at??null,fields:Object.fromEntries(Object.entries(p.data??{}).filter(([M])=>!O.has(M))),status:p.data?.status??void 0,priority:p.data?.priority??void 0,assignee:p.data?.assignee??void 0,dueDate:p.data?.due_date??void 0})).sort((p,M)=>p.title.localeCompare(M.title)),r.count=r.entities.length,r.loaded=!0}catch(l){console.error(`Failed to load entities for ${t}:`,l)}finally{r.loading=!1}}function K(t){o(g)[t]=!o(g)[t]}function q(t){return o(g)[t]??!1}function k(t,n,r){return`${t}/${n}/${r}`}function H(t,n,r){const a=k(t,n,r),l=R[a]??!1;R[a]=!l,!l&&!A[a]?.loaded&&z(t,n,r)}function N(t,n,r){return R[k(t,n,r)]??!1}function Y(t,n,r){return A[k(t,n,r)]??{entries:[],loading:!1,loaded:!1}}async function z(t,n,r){const a=k(t,n,r);A[a]={entries:[],loading:!1,loaded:!0}}function G(t){const n=o(C).trim().toLowerCase();if(!n)return t;const r=[];for(const a of t){const l=a.entities.filter(y=>y.title.toLowerCase().includes(n)||y.id.toLowerCase().includes(n));l.length>0&&r.push({...a,entities:l,count:l.length})}return r}function X(t){if(t&&!o(C)?$={...o(g)}:!t&&o(C)&&$&&(u(g,$,!0),$=null),u(C,t,!0),t){const n=t.trim().toLowerCase();for(const r of o(c)){const a=r.entities.some(l=>l.title.toLowerCase().includes(n)||l.id.toLowerCase().includes(n));o(g)[r.name]=a}}}function Z(t){const n=t.startsWith("type:");T[t]=!(T[t]??n)}function tt(t){return T[t]??!1}function et(t){return T[t]===!1}const nt=it(()=>o(c).reduce((t,n)=>t+(n.count??0),0));function ot(t){return o(h).find(n=>n.entityTypes.includes(t))}function rt(t){v(t||o(s))}return{get name(){return o(e)},get about(){return o(i)},get accentColor(){return o(s)},get nameLoaded(){return o(f)},async updateWorkspace(t){t.accent_color!==void 0&&(u(s,t.accent_color,!0),v(t.accent_color)),await st(t),t.name?.trim()&&u(e,t.name.trim(),!0),typeof t.about=="string"&&u(i,t.about,!0)},get repos(){return o(c)},get apps(){return o(h)},get loading(){return o(U)},get error(){return o(P)},get totalEntities(){return o(nt)},get totalLinks(){return o(S)},get totalFiles(){return o(b)},get hasTasks(){return o(c).some(t=>t.entities.some(n=>n.entityType==="task"))},get sortedRepos(){const t=[...o(c)].sort((n,r)=>n.name.localeCompare(r.name));return G(t)},get filteredIds(){const t=o(C).trim().toLowerCase();if(!t)return null;const n=new Set;for(const r of o(c))for(const a of r.entities)(a.title.toLowerCase().includes(t)||a.id.toLowerCase().includes(t))&&n.add(a.id);return n},get filterQuery(){return o(C)},setFilterQuery:X,get sortMode(){return o(J)},set sortMode(t){u(J,t,!0)},get recentEntities(){const t=o(C).trim().toLowerCase();let n=[];for(const r of o(c))for(const a of r.entities)t&&!a.title.toLowerCase().includes(t)&&!a.id.toLowerCase().includes(t)||n.push(a);return n.sort((r,a)=>{const l=r.updatedAt??"";return(a.updatedAt??"").localeCompare(l)})},get sidebarScrollTop(){return o(F)},set sidebarScrollTop(t){u(F,t,!0)},get lastAutoExpandedFor(){return o(x)},set lastAutoExpandedFor(t){u(x,t,!0)},load:W,loadEntities:I,removeEntity:V,refreshEntities:Q,refreshAll:B,toggleRepo:K,isExpanded:q,toggleEntity:H,isEntityExpanded:N,getEntityContents:Y,toggleFolder:Z,isFolderExpanded:tt,isFolderCollapsed:et,applyUserAccentColor:rt,applyAccentColor:v,getAppForEntityType:ot,async renameCollectionTo(t,n,r){await lt(t,n,r);const a=o(c).find(l=>l.name===t);a&&(a.name=n,a.displayName=r||_(n),o(g)[t]&&(o(g)[n]=!0,delete o(g)[t]))},async removeCollection(t){await ut(t),u(c,o(c).filter(n=>n.name!==t),!0),delete o(g)[t]},async addCollection(t,n,r,a){await ct(t,n,r,a);const l=await D();u(c,l.map(y=>o(c).find(O=>O.name===y.name)??{name:y.name,displayName:_(y.name,y.display_name),type:y.type,private:y.private,count:null,entities:[],loading:!1,loaded:!1}),!0),o(g)[t]=!0,await I(t)}}}const _t=gt();export{Mt as a,kt as b,At as c,Ot as d,Ut as e,Rt as f,vt as g,Et as h,It as i,wt as j,Tt as k,bt as l,St as m,Pt as s,$t as t,Lt as u,_t as w};
1
+ import{e as m,f as w,s as u,g as o,a4 as it}from"./CCA2E2CK.js";import{a as d}from"./BKHfe9E-.js";function at(){return d("/api/workspace")}function st(e){return d("/api/workspace",{method:"PUT",body:JSON.stringify(e)})}function wt(){return d("/api/workspace/mcp-config")}function D(){return d("/api/repos")}function ct(e,i,s,f){return d("/api/repos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,display_name:i||void 0,description:s,...f?{private:!0}:{}})})}function lt(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,display_name:s||void 0})})}function ut(e){return d(`/api/repos/${encodeURIComponent(e)}`,{method:"DELETE"})}function dt(){return d("/api/apps")}function pt(e){return d(`/api/repos/${encodeURIComponent(e)}/entities?summary=true`)}function Et(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`)}function St(e,i,s,f,c){return d(`/api/repos/${encodeURIComponent(e)}/entities`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,data:f,content:c})})}function bt(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`,{method:"DELETE"})}function It(e,i,s,f){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`,{method:"PUT",body:JSON.stringify(f)})}function Tt(e,i,s,f){return d(`/api/repos/${encodeURIComponent(e)}/change-type`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,newType:f})})}function $t(e,i,s,f,c){return d(`/api/repos/${encodeURIComponent(e)}/transfer`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,targetRepo:f,mode:c})})}function kt(){return d("/api/insights")}function vt(){return d("/api/insights/generate",{method:"POST"})}function Ut(){return d("/api/preferences")}function Pt(e){return d("/api/preferences",{method:"PUT",body:JSON.stringify(e)})}function Rt(){return d("/api/views")}function At(e,i,s){return d("/api/views",{method:"POST",body:JSON.stringify({name:e,viewType:s??"list",config:i})})}function Lt(e,i){return d(`/api/views/${e}`,{method:"PUT",body:JSON.stringify(i)})}function Ot(e){return d(`/api/views/${e}`,{method:"DELETE"})}function Mt(e){return d(`/api/repos/${encodeURIComponent(e)}/commit`,{method:"POST"})}function ft(e){return e.replace(/-/g," ").replace(/\b\w/g,i=>i.toUpperCase())}function _(e,i){return i||e.split("-").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" ")}const mt="#e05050";function v(e){if(typeof document>"u")return;const i=e||mt,s=parseInt(i.slice(1,3),16),f=parseInt(i.slice(3,5),16),c=parseInt(i.slice(5,7),16),E=[document.documentElement,document.querySelector("[data-theme]")].filter(Boolean);for(const h of E)h.style.setProperty("--color-accent",i),h.style.setProperty("--color-accent-hover",yt(i,15)),h.style.setProperty("--color-accent-muted",`rgba(${s}, ${f}, ${c}, 0.08)`),h.style.setProperty("--color-link",j(i,15)),h.style.setProperty("--color-badge-bg",`rgba(${s}, ${f}, ${c}, 0.1)`),h.style.setProperty("--color-badge-text",j(i,20))}function yt(e,i){const s=Math.max(0,Math.round(parseInt(e.slice(1,3),16)*(1-i/100))),f=Math.max(0,Math.round(parseInt(e.slice(3,5),16)*(1-i/100))),c=Math.max(0,Math.round(parseInt(e.slice(5,7),16)*(1-i/100)));return`#${s.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function j(e,i){const s=Math.min(255,Math.round(parseInt(e.slice(1,3),16)+(255-parseInt(e.slice(1,3),16))*i/100)),f=Math.min(255,Math.round(parseInt(e.slice(3,5),16)+(255-parseInt(e.slice(3,5),16))*i/100)),c=Math.min(255,Math.round(parseInt(e.slice(5,7),16)+(255-parseInt(e.slice(5,7),16))*i/100));return`#${s.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function gt(){let e=m(""),i=m(null),s=m(null),f=m(!1),c=m(w([]));const E={};let h=m(w([])),U=m(!1),P=m(null),g=m(w({})),R=w({}),A=w({}),T=w({}),F=m(0),x=m(null),C=m(""),$=null,S=m(0),b=m(0),J=m("alpha");async function W(){u(U,!0),u(P,null),u(S,0),u(b,0);try{const[t,n,r]=await Promise.all([D(),dt().catch(()=>[]),at().catch(()=>({name:""}))]);u(h,n,!0),u(e,r.name,!0),u(i,r.about??null,!0),u(s,r.accent_color??null,!0),u(f,!0),v(o(s)),u(c,t.map(a=>({name:a.name,displayName:_(a.name,a.display_name),type:a.type,private:a.private,sync:a.sync,count:null,entities:[],loading:!1,loaded:!1})),!0),await Promise.all(o(c).map(a=>I(a.name)))}catch(t){u(P,t.message,!0)}finally{u(U,!1)}}function V(t,n,r){const a=o(c).find(l=>l.name===t);a&&(a.entities=a.entities.filter(l=>!(l.id===r&&l.entityType===n)),a.count=a.entities.length)}async function Q(t){o(c).find(r=>r.name===t)&&await I(t,!0)}async function B(){u(S,0),u(b,0),await Promise.all(o(c).map(t=>I(t.name,!0)))}async function I(t,n=!1){const r=o(c).find(l=>l.name===t);if(!r||r.loading||!n&&r.loaded)return;const a=(E[t]??0)+1;E[t]=a,n||(r.loading=!0);try{const l=await pt(t);if(E[t]!==a)return;let y=0,L=0;for(const p of l)y+=p.document?.wikilinks?.length??0,L+=p.subContentCount??0;u(S,o(S)+y),u(b,o(b)+L);const O=new Set(["name","created_at","updated_at"]);r.entities=l.filter(p=>!p.id.toLowerCase().startsWith("readme")).map(p=>({id:p.id,title:p.data?.name??ft(p.id),entityType:p.entityType,repo:t,hasSubContent:!!p.hasSubContent,wikilinks:p.document?.wikilinks??[],createdAt:p.data?.created_at??null,updatedAt:p.data?.updated_at??null,fields:Object.fromEntries(Object.entries(p.data??{}).filter(([M])=>!O.has(M))),status:p.data?.status??void 0,priority:p.data?.priority??void 0,assignee:p.data?.assignee??void 0,dueDate:p.data?.due_date??void 0})).sort((p,M)=>p.title.localeCompare(M.title)),r.count=r.entities.length,r.loaded=!0}catch(l){console.error(`Failed to load entities for ${t}:`,l)}finally{r.loading=!1}}function K(t){o(g)[t]=!o(g)[t]}function q(t){return o(g)[t]??!1}function k(t,n,r){return`${t}/${n}/${r}`}function H(t,n,r){const a=k(t,n,r),l=R[a]??!1;R[a]=!l,!l&&!A[a]?.loaded&&z(t,n,r)}function N(t,n,r){return R[k(t,n,r)]??!1}function Y(t,n,r){return A[k(t,n,r)]??{entries:[],loading:!1,loaded:!1}}async function z(t,n,r){const a=k(t,n,r);A[a]={entries:[],loading:!1,loaded:!0}}function G(t){const n=o(C).trim().toLowerCase();if(!n)return t;const r=[];for(const a of t){const l=a.entities.filter(y=>y.title.toLowerCase().includes(n)||y.id.toLowerCase().includes(n));l.length>0&&r.push({...a,entities:l,count:l.length})}return r}function X(t){if(t&&!o(C)?$={...o(g)}:!t&&o(C)&&$&&(u(g,$,!0),$=null),u(C,t,!0),t){const n=t.trim().toLowerCase();for(const r of o(c)){const a=r.entities.some(l=>l.title.toLowerCase().includes(n)||l.id.toLowerCase().includes(n));o(g)[r.name]=a}}}function Z(t){const n=t.startsWith("type:");T[t]=!(T[t]??n)}function tt(t){return T[t]??!1}function et(t){return T[t]===!1}const nt=it(()=>o(c).reduce((t,n)=>t+(n.count??0),0));function ot(t){return o(h).find(n=>n.entityTypes.includes(t))}function rt(t){v(t||o(s))}return{get name(){return o(e)},get about(){return o(i)},get accentColor(){return o(s)},get nameLoaded(){return o(f)},async updateWorkspace(t){t.accent_color!==void 0&&(u(s,t.accent_color,!0),v(t.accent_color)),await st(t),t.name?.trim()&&u(e,t.name.trim(),!0),typeof t.about=="string"&&u(i,t.about,!0)},get repos(){return o(c)},get apps(){return o(h)},get loading(){return o(U)},get error(){return o(P)},get totalEntities(){return o(nt)},get totalLinks(){return o(S)},get totalFiles(){return o(b)},get hasTasks(){return o(c).some(t=>t.entities.some(n=>n.entityType==="task"))},get sortedRepos(){const t=[...o(c)].sort((n,r)=>n.name.localeCompare(r.name));return G(t)},get filteredIds(){const t=o(C).trim().toLowerCase();if(!t)return null;const n=new Set;for(const r of o(c))for(const a of r.entities)(a.title.toLowerCase().includes(t)||a.id.toLowerCase().includes(t))&&n.add(a.id);return n},get filterQuery(){return o(C)},setFilterQuery:X,get sortMode(){return o(J)},set sortMode(t){u(J,t,!0)},get recentEntities(){const t=o(C).trim().toLowerCase();let n=[];for(const r of o(c))for(const a of r.entities)t&&!a.title.toLowerCase().includes(t)&&!a.id.toLowerCase().includes(t)||n.push(a);return n.sort((r,a)=>{const l=r.updatedAt??"";return(a.updatedAt??"").localeCompare(l)})},get sidebarScrollTop(){return o(F)},set sidebarScrollTop(t){u(F,t,!0)},get lastAutoExpandedFor(){return o(x)},set lastAutoExpandedFor(t){u(x,t,!0)},load:W,loadEntities:I,removeEntity:V,refreshEntities:Q,refreshAll:B,toggleRepo:K,isExpanded:q,toggleEntity:H,isEntityExpanded:N,getEntityContents:Y,toggleFolder:Z,isFolderExpanded:tt,isFolderCollapsed:et,applyUserAccentColor:rt,applyAccentColor:v,getAppForEntityType:ot,async renameCollectionTo(t,n,r){await lt(t,n,r);const a=o(c).find(l=>l.name===t);a&&(a.name=n,a.displayName=r||_(n),o(g)[t]&&(o(g)[n]=!0,delete o(g)[t]))},async removeCollection(t){await ut(t),u(c,o(c).filter(n=>n.name!==t),!0),delete o(g)[t]},async addCollection(t,n,r,a){await ct(t,n,r,a);const l=await D();u(c,l.map(y=>o(c).find(O=>O.name===y.name)??{name:y.name,displayName:_(y.name,y.display_name),type:y.type,private:y.private,count:null,entities:[],loading:!1,loaded:!1}),!0),o(g)[t]=!0,await I(t)}}}const _t=gt();export{Mt as a,kt as b,At as c,Ot as d,Ut as e,Rt as f,vt as g,Et as h,It as i,wt as j,bt as k,St as l,Tt as m,Pt as s,$t as t,Lt as u,_t as w};
@@ -1 +1 @@
1
- import{h as O,i as y,E as J,j as H,k as b,o as Z,q as $,g as V,u as j,H as ee,v as U,w as F,x as D,C as re,y as ne,z as X,A as fe,B as m,D as L,F as ae,G as ie,I as le,J as ue,K as B,L as se,M as oe,m as te,N as Y,O as ve,P as K,Q as P,R as z,S as de,T as ce,U as pe,V as _e,W as he,X as ge}from"./BenpwI6m.js";function Ce(e,i){return i}function Ee(e,i,l){for(var d=[],g=i.length,s,u=i.length,p=0;p<g;p++){let E=i[p];P(E,()=>{if(s){if(s.pending.delete(E),s.done.add(E),s.pending.size===0){var o=e.outrogroups;q(B(s.done)),o.delete(s),o.size===0&&(e.outrogroups=null)}}else u-=1},!1)}if(u===0){var a=d.length===0&&l!==null;if(a){var t=l,n=t.parentNode;_e(n),n.append(t),e.items.clear()}q(i,!a)}else s={pending:new Set(i),done:new Set},(e.outrogroups??=new Set).add(s)}function q(e,i=!0){for(var l=0;l<e.length;l++)he(e[l],i)}var G;function we(e,i,l,d,g,s=null){var u=e,p=new Map,a=(i&J)!==0;if(a){var t=e;u=H?b(Z(t)):t.appendChild(O())}H&&$();var n=null,E=le(()=>{var f=l();return ue(f)?f:f==null?[]:B(f)}),o,c=!0;function A(){r.fallback=n,me(r,o,u,i,d),n!==null&&(o.length===0?(n.f&m)===0?K(n):(n.f^=m,k(n,null,u)):P(n,()=>{n=null}))}var I=y(()=>{o=V(E);var f=o.length;let N=!1;if(H){var S=j(u)===ee;S!==(f===0)&&(u=U(),b(u),F(!1),N=!0)}for(var h=new Set,C=fe,x=ie(),_=0;_<f;_+=1){H&&D.nodeType===re&&D.data===ne&&(u=D,N=!0,F(!1));var w=o[_],R=d(w,_),v=c?null:p.get(R);v?(v.v&&X(v.v,w),v.i&&X(v.i,_),x&&C.unskip_effect(v.e)):(v=Te(p,c?u:G??=O(),w,R,_,g,i,l),c||(v.e.f|=m),p.set(R,v)),h.add(R)}if(f===0&&s&&!n&&(c?n=L(()=>s(u)):(n=L(()=>s(G??=O())),n.f|=m)),f>h.size&&ae(),H&&f>0&&b(U()),!c)if(x){for(const[Q,W]of p)h.has(Q)||C.skip_effect(W.e);C.oncommit(A),C.ondiscard(()=>{})}else A();N&&F(!0),V(E)}),r={effect:I,items:p,outrogroups:null,fallback:n};c=!1,H&&(u=D)}function M(e){for(;e!==null&&(e.f&ce)===0;)e=e.next;return e}function me(e,i,l,d,g){var s=(d&pe)!==0,u=i.length,p=e.items,a=M(e.effect.first),t,n=null,E,o=[],c=[],A,I,r,f;if(s)for(f=0;f<u;f+=1)A=i[f],I=g(A,f),r=p.get(I).e,(r.f&m)===0&&(r.nodes?.a?.measure(),(E??=new Set).add(r));for(f=0;f<u;f+=1){if(A=i[f],I=g(A,f),r=p.get(I).e,e.outrogroups!==null)for(const v of e.outrogroups)v.pending.delete(r),v.done.delete(r);if((r.f&m)!==0)if(r.f^=m,r===a)k(r,null,l);else{var N=n?n.next:a;r===e.effect.last&&(e.effect.last=r.prev),r.prev&&(r.prev.next=r.next),r.next&&(r.next.prev=r.prev),T(e,n,r),T(e,r,N),k(r,N,l),n=r,o=[],c=[],a=M(n.next);continue}if((r.f&z)!==0&&(K(r),s&&(r.nodes?.a?.unfix(),(E??=new Set).delete(r))),r!==a){if(t!==void 0&&t.has(r)){if(o.length<c.length){var S=c[0],h;n=S.prev;var C=o[0],x=o[o.length-1];for(h=0;h<o.length;h+=1)k(o[h],S,l);for(h=0;h<c.length;h+=1)t.delete(c[h]);T(e,C.prev,x.next),T(e,n,C),T(e,x,S),a=S,n=x,f-=1,o=[],c=[]}else t.delete(r),k(r,a,l),T(e,r.prev,r.next),T(e,r,n===null?e.effect.first:n.next),T(e,n,r),n=r;continue}for(o=[],c=[];a!==null&&a!==r;)(t??=new Set).add(a),c.push(a),a=M(a.next);if(a===null)continue}(r.f&m)===0&&o.push(r),n=r,a=M(r.next)}if(e.outrogroups!==null){for(const v of e.outrogroups)v.pending.size===0&&(q(B(v.done)),e.outrogroups?.delete(v));e.outrogroups.size===0&&(e.outrogroups=null)}if(a!==null||t!==void 0){var _=[];if(t!==void 0)for(r of t)(r.f&z)===0&&_.push(r);for(;a!==null;)(a.f&z)===0&&a!==e.fallback&&_.push(a),a=M(a.next);var w=_.length;if(w>0){var R=(d&J)!==0&&u===0?l:null;if(s){for(f=0;f<w;f+=1)_[f].nodes?.a?.measure();for(f=0;f<w;f+=1)_[f].nodes?.a?.fix()}Ee(e,_,R)}}s&&de(()=>{if(E!==void 0)for(r of E)r.nodes?.a?.apply()})}function Te(e,i,l,d,g,s,u,p){var a=(u&se)!==0?(u&oe)===0?te(l,!1,!1):Y(l):null,t=(u&ve)!==0?Y(g):null;return{v:a,i:t,e:L(()=>(s(i,a??l,t??g,p),()=>{e.delete(d)}))}}function k(e,i,l){if(e.nodes)for(var d=e.nodes.start,g=e.nodes.end,s=i&&(i.f&m)===0?i.nodes.start:l;d!==null;){var u=ge(d);if(s.before(d),d===g)return;d=u}}function T(e,i,l){i===null?e.effect.first=l:i.next=l,l===null?e.effect.last=i:l.prev=i}export{we as e,Ce as i};
1
+ import{h as O,i as y,E as J,j as H,k as b,o as Z,q as $,g as V,u as j,H as ee,v as U,w as F,x as D,C as re,y as ne,z as X,A as fe,B as m,D as L,F as ae,G as ie,I as le,J as ue,K as B,L as se,M as oe,m as te,N as Y,O as ve,P as K,Q as P,R as z,S as de,T as ce,U as pe,V as _e,W as he,X as ge}from"./CCA2E2CK.js";function Ce(e,i){return i}function Ee(e,i,l){for(var d=[],g=i.length,s,u=i.length,p=0;p<g;p++){let E=i[p];P(E,()=>{if(s){if(s.pending.delete(E),s.done.add(E),s.pending.size===0){var o=e.outrogroups;q(B(s.done)),o.delete(s),o.size===0&&(e.outrogroups=null)}}else u-=1},!1)}if(u===0){var a=d.length===0&&l!==null;if(a){var t=l,n=t.parentNode;_e(n),n.append(t),e.items.clear()}q(i,!a)}else s={pending:new Set(i),done:new Set},(e.outrogroups??=new Set).add(s)}function q(e,i=!0){for(var l=0;l<e.length;l++)he(e[l],i)}var G;function we(e,i,l,d,g,s=null){var u=e,p=new Map,a=(i&J)!==0;if(a){var t=e;u=H?b(Z(t)):t.appendChild(O())}H&&$();var n=null,E=le(()=>{var f=l();return ue(f)?f:f==null?[]:B(f)}),o,c=!0;function A(){r.fallback=n,me(r,o,u,i,d),n!==null&&(o.length===0?(n.f&m)===0?K(n):(n.f^=m,k(n,null,u)):P(n,()=>{n=null}))}var I=y(()=>{o=V(E);var f=o.length;let N=!1;if(H){var S=j(u)===ee;S!==(f===0)&&(u=U(),b(u),F(!1),N=!0)}for(var h=new Set,C=fe,x=ie(),_=0;_<f;_+=1){H&&D.nodeType===re&&D.data===ne&&(u=D,N=!0,F(!1));var w=o[_],R=d(w,_),v=c?null:p.get(R);v?(v.v&&X(v.v,w),v.i&&X(v.i,_),x&&C.unskip_effect(v.e)):(v=Te(p,c?u:G??=O(),w,R,_,g,i,l),c||(v.e.f|=m),p.set(R,v)),h.add(R)}if(f===0&&s&&!n&&(c?n=L(()=>s(u)):(n=L(()=>s(G??=O())),n.f|=m)),f>h.size&&ae(),H&&f>0&&b(U()),!c)if(x){for(const[Q,W]of p)h.has(Q)||C.skip_effect(W.e);C.oncommit(A),C.ondiscard(()=>{})}else A();N&&F(!0),V(E)}),r={effect:I,items:p,outrogroups:null,fallback:n};c=!1,H&&(u=D)}function M(e){for(;e!==null&&(e.f&ce)===0;)e=e.next;return e}function me(e,i,l,d,g){var s=(d&pe)!==0,u=i.length,p=e.items,a=M(e.effect.first),t,n=null,E,o=[],c=[],A,I,r,f;if(s)for(f=0;f<u;f+=1)A=i[f],I=g(A,f),r=p.get(I).e,(r.f&m)===0&&(r.nodes?.a?.measure(),(E??=new Set).add(r));for(f=0;f<u;f+=1){if(A=i[f],I=g(A,f),r=p.get(I).e,e.outrogroups!==null)for(const v of e.outrogroups)v.pending.delete(r),v.done.delete(r);if((r.f&m)!==0)if(r.f^=m,r===a)k(r,null,l);else{var N=n?n.next:a;r===e.effect.last&&(e.effect.last=r.prev),r.prev&&(r.prev.next=r.next),r.next&&(r.next.prev=r.prev),T(e,n,r),T(e,r,N),k(r,N,l),n=r,o=[],c=[],a=M(n.next);continue}if((r.f&z)!==0&&(K(r),s&&(r.nodes?.a?.unfix(),(E??=new Set).delete(r))),r!==a){if(t!==void 0&&t.has(r)){if(o.length<c.length){var S=c[0],h;n=S.prev;var C=o[0],x=o[o.length-1];for(h=0;h<o.length;h+=1)k(o[h],S,l);for(h=0;h<c.length;h+=1)t.delete(c[h]);T(e,C.prev,x.next),T(e,n,C),T(e,x,S),a=S,n=x,f-=1,o=[],c=[]}else t.delete(r),k(r,a,l),T(e,r.prev,r.next),T(e,r,n===null?e.effect.first:n.next),T(e,n,r),n=r;continue}for(o=[],c=[];a!==null&&a!==r;)(t??=new Set).add(a),c.push(a),a=M(a.next);if(a===null)continue}(r.f&m)===0&&o.push(r),n=r,a=M(r.next)}if(e.outrogroups!==null){for(const v of e.outrogroups)v.pending.size===0&&(q(B(v.done)),e.outrogroups?.delete(v));e.outrogroups.size===0&&(e.outrogroups=null)}if(a!==null||t!==void 0){var _=[];if(t!==void 0)for(r of t)(r.f&z)===0&&_.push(r);for(;a!==null;)(a.f&z)===0&&a!==e.fallback&&_.push(a),a=M(a.next);var w=_.length;if(w>0){var R=(d&J)!==0&&u===0?l:null;if(s){for(f=0;f<w;f+=1)_[f].nodes?.a?.measure();for(f=0;f<w;f+=1)_[f].nodes?.a?.fix()}Ee(e,_,R)}}s&&de(()=>{if(E!==void 0)for(r of E)r.nodes?.a?.apply()})}function Te(e,i,l,d,g,s,u,p){var a=(u&se)!==0?(u&oe)===0?te(l,!1,!1):Y(l):null,t=(u&ve)!==0?Y(g):null;return{v:a,i:t,e:L(()=>(s(i,a??l,t??g,p),()=>{e.delete(d)}))}}function k(e,i,l){if(e.nodes)for(var d=e.nodes.start,g=e.nodes.end,s=i&&(i.f&m)===0?i.nodes.start:l;d!==null;){var u=ge(d);if(s.before(d),d===g)return;d=u}}function T(e,i,l){i===null?e.effect.first=l:i.next=l,l===null?e.effect.last=i:l.prev=i}export{we as e,Ce as i};
@@ -1 +1 @@
1
- import{a as c,s as A,f as b}from"./COik51fd.js";import{i as M}from"./BSBiehHY.js";import{p as y,l as v,s as p,d as n,g as r,a as Z,c as u,n as R,r as m,b as B,m as g,t as C}from"./BenpwI6m.js";import{i as H}from"./Dvv4bkXH.js";import{a as N}from"./CStpN6HQ.js";import{l as h,p as _}from"./wWaI7EIw.js";var P=b("<title> </title>"),S=b('<svg><!><path d="M18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z"></path></svg>');function I(w,t){const e=h(t,["children","$$slots","$$events","$$legacy"]),x=h(e,["size","title"]);y(t,!1);const a=g(),d=g();let f=_(t,"size",8,16),i=_(t,"title",8,void 0);v(()=>(n(e),n(i())),()=>{p(a,e["aria-label"]||e["aria-labelledby"]||i())}),v(()=>(r(a),n(e)),()=>{p(d,{"aria-hidden":r(a)?void 0:!0,role:r(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Z(),M();var s=S();N(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...r(d),...x}));var L=u(s);{var $=l=>{var o=P(),z=u(o,!0);m(o),C(()=>A(z,i())),c(l,o)};H(L,l=>{i()&&l($)})}R(),m(s),c(w,s),B()}var Y=b("<title> </title>"),k=b('<svg><!><path d="M27,16.76c0-.25,0-.5,0-.76s0-.51,0-.77l1.92-1.68A2,2,0,0,0,29.3,11L26.94,7a2,2,0,0,0-1.73-1,2,2,0,0,0-.64.1l-2.43.82a11.35,11.35,0,0,0-1.31-.75l-.51-2.52a2,2,0,0,0-2-1.61H13.64a2,2,0,0,0-2,1.61l-.51,2.52a11.48,11.48,0,0,0-1.32.75L7.43,6.06A2,2,0,0,0,6.79,6,2,2,0,0,0,5.06,7L2.7,11a2,2,0,0,0,.41,2.51L5,15.24c0,.25,0,.5,0,.76s0,.51,0,.77L3.11,18.45A2,2,0,0,0,2.7,21L5.06,25a2,2,0,0,0,1.73,1,2,2,0,0,0,.64-.1l2.43-.82a11.35,11.35,0,0,0,1.31.75l.51,2.52a2,2,0,0,0,2,1.61h4.72a2,2,0,0,0,2-1.61l.51-2.52a11.48,11.48,0,0,0,1.32-.75l2.42.82a2,2,0,0,0,.64.1,2,2,0,0,0,1.73-1L29.3,21a2,2,0,0,0-.41-2.51ZM25.21,24l-3.43-1.16a8.86,8.86,0,0,1-2.71,1.57L18.36,28H13.64l-.71-3.55a9.36,9.36,0,0,1-2.7-1.57L6.79,24,4.43,20l2.72-2.4a8.9,8.9,0,0,1,0-3.13L4.43,12,6.79,8l3.43,1.16a8.86,8.86,0,0,1,2.71-1.57L13.64,4h4.72l.71,3.55a9.36,9.36,0,0,1,2.7,1.57L25.21,8,27.57,12l-2.72,2.4a8.9,8.9,0,0,1,0,3.13L27.57,20Z"></path><path d="M16,22a6,6,0,1,1,6-6A5.94,5.94,0,0,1,16,22Zm0-10a3.91,3.91,0,0,0-4,4,3.91,3.91,0,0,0,4,4,3.91,3.91,0,0,0,4-4A3.91,3.91,0,0,0,16,12Z"></path></svg>');function J(w,t){const e=h(t,["children","$$slots","$$events","$$legacy"]),x=h(e,["size","title"]);y(t,!1);const a=g(),d=g();let f=_(t,"size",8,16),i=_(t,"title",8,void 0);v(()=>(n(e),n(i())),()=>{p(a,e["aria-label"]||e["aria-labelledby"]||i())}),v(()=>(r(a),n(e)),()=>{p(d,{"aria-hidden":r(a)?void 0:!0,role:r(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Z(),M();var s=k();N(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...r(d),...x}));var L=u(s);{var $=l=>{var o=Y(),z=u(o,!0);m(o),C(()=>A(z,i())),c(l,o)};H(L,l=>{i()&&l($)})}R(2),m(s),c(w,s),B()}export{I as A,J as S};
1
+ import{a as c,s as A,f as b}from"./usxM-xOh.js";import{i as M}from"./DIBaaeCL.js";import{p as y,l as v,s as p,d as n,g as r,a as Z,c as u,n as R,r as m,b as B,m as g,t as C}from"./CCA2E2CK.js";import{i as H}from"./yUs562n0.js";import{a as N}from"./DkuxRPZv.js";import{l as h,p as _}from"./DHholpIc.js";var P=b("<title> </title>"),S=b('<svg><!><path d="M18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z"></path></svg>');function I(w,t){const e=h(t,["children","$$slots","$$events","$$legacy"]),x=h(e,["size","title"]);y(t,!1);const a=g(),d=g();let f=_(t,"size",8,16),i=_(t,"title",8,void 0);v(()=>(n(e),n(i())),()=>{p(a,e["aria-label"]||e["aria-labelledby"]||i())}),v(()=>(r(a),n(e)),()=>{p(d,{"aria-hidden":r(a)?void 0:!0,role:r(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Z(),M();var s=S();N(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...r(d),...x}));var L=u(s);{var $=l=>{var o=P(),z=u(o,!0);m(o),C(()=>A(z,i())),c(l,o)};H(L,l=>{i()&&l($)})}R(),m(s),c(w,s),B()}var Y=b("<title> </title>"),k=b('<svg><!><path d="M27,16.76c0-.25,0-.5,0-.76s0-.51,0-.77l1.92-1.68A2,2,0,0,0,29.3,11L26.94,7a2,2,0,0,0-1.73-1,2,2,0,0,0-.64.1l-2.43.82a11.35,11.35,0,0,0-1.31-.75l-.51-2.52a2,2,0,0,0-2-1.61H13.64a2,2,0,0,0-2,1.61l-.51,2.52a11.48,11.48,0,0,0-1.32.75L7.43,6.06A2,2,0,0,0,6.79,6,2,2,0,0,0,5.06,7L2.7,11a2,2,0,0,0,.41,2.51L5,15.24c0,.25,0,.5,0,.76s0,.51,0,.77L3.11,18.45A2,2,0,0,0,2.7,21L5.06,25a2,2,0,0,0,1.73,1,2,2,0,0,0,.64-.1l2.43-.82a11.35,11.35,0,0,0,1.31.75l.51,2.52a2,2,0,0,0,2,1.61h4.72a2,2,0,0,0,2-1.61l.51-2.52a11.48,11.48,0,0,0,1.32-.75l2.42.82a2,2,0,0,0,.64.1,2,2,0,0,0,1.73-1L29.3,21a2,2,0,0,0-.41-2.51ZM25.21,24l-3.43-1.16a8.86,8.86,0,0,1-2.71,1.57L18.36,28H13.64l-.71-3.55a9.36,9.36,0,0,1-2.7-1.57L6.79,24,4.43,20l2.72-2.4a8.9,8.9,0,0,1,0-3.13L4.43,12,6.79,8l3.43,1.16a8.86,8.86,0,0,1,2.71-1.57L13.64,4h4.72l.71,3.55a9.36,9.36,0,0,1,2.7,1.57L25.21,8,27.57,12l-2.72,2.4a8.9,8.9,0,0,1,0,3.13L27.57,20Z"></path><path d="M16,22a6,6,0,1,1,6-6A5.94,5.94,0,0,1,16,22Zm0-10a3.91,3.91,0,0,0-4,4,3.91,3.91,0,0,0,4,4,3.91,3.91,0,0,0,4-4A3.91,3.91,0,0,0,16,12Z"></path></svg>');function J(w,t){const e=h(t,["children","$$slots","$$events","$$legacy"]),x=h(e,["size","title"]);y(t,!1);const a=g(),d=g();let f=_(t,"size",8,16),i=_(t,"title",8,void 0);v(()=>(n(e),n(i())),()=>{p(a,e["aria-label"]||e["aria-labelledby"]||i())}),v(()=>(r(a),n(e)),()=>{p(d,{"aria-hidden":r(a)?void 0:!0,role:r(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),Z(),M();var s=k();N(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...r(d),...x}));var L=u(s);{var $=l=>{var o=Y(),z=u(o,!0);m(o),C(()=>A(z,i())),c(l,o)};H(L,l=>{i()&&l($)})}R(2),m(s),c(w,s),B()}export{I as A,J as S};
@@ -1 +1 @@
1
- var Kt=Array.isArray,Xt=Array.prototype.indexOf,oe=Array.prototype.includes,zn=Array.from,Gn=Object.defineProperty,we=Object.getOwnPropertyDescriptor,Zt=Object.getOwnPropertyDescriptors,Wt=Object.prototype,Jt=Array.prototype,_t=Object.getPrototypeOf,rt=Object.isExtensible;function $n(e){return typeof e=="function"}const ye=()=>{};function Kn(e){return e()}function Qt(e){for(var t=0;t<e.length;t++)e[t]()}function vt(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function Xn(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const g=2,ie=4,ue=8,Be=1<<24,K=16,L=32,X=64,en=128,k=512,y=1024,T=2048,P=4096,F=8192,V=16384,de=32768,Se=65536,st=1<<17,tn=1<<18,he=1<<19,dt=1<<20,Zn=1<<25,re=65536,Le=1<<21,Ue=1<<22,B=1<<23,te=Symbol("$state"),Wn=Symbol("legacy props"),Jn=Symbol(""),W=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},er=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),tr=1,Ce=3,ht=8;function ze(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function nn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function nr(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function rn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function sn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function fn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function an(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function rr(){throw new Error("https://svelte.dev/e/hydration_failed")}function sr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ln(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function on(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function un(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function fr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const ir=1,ar=2,lr=4,or=8,ur=16,cr=1,_r=2,vr=4,dr=8,hr=16,pr=1,br=2,cn="[",_n="[!",wr="[?",vn="]",Ge={},E=Symbol(),dn="http://www.w3.org/1999/xhtml",yr="http://www.w3.org/2000/svg",Er="http://www.w3.org/1998/Math/MathML",gr="@attach";function $e(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function mr(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Tr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let z=!1;function Ar(e){z=e}let S;function ce(e){if(e===null)throw $e(),Ge;return S=e}function xr(){return ce(Z(S))}function Sr(e){if(z){if(Z(S)!==null)throw $e(),Ge;S=e}}function Rr(e=1){if(z){for(var t=e,n=S;t--;)n=Z(n);S=n}}function Nr(e=!0){for(var t=0,n=S;;){if(n.nodeType===ht){var r=n.data;if(r===vn){if(t===0)return n;t-=1}else(r===cn||r===_n||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var s=Z(n);e&&n.remove(),n=s}}function Or(e){if(!e||e.nodeType!==ht)throw $e(),Ge;return e.data}function pt(e){return e===this.v}function bt(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function wt(e){return!bt(e,this.v)}let me=!1;function kr(){me=!0}let h=null;function Re(e){h=e}function Cr(e){return De().get(e)}function Dr(e,t){return De().set(e,t),t}function Ir(e){return De().has(e)}function Mr(){return De()}function Pr(e,t=!1,n){h={p:h,i:!1,c:null,e:null,s:e,x:null,l:me&&!t?{s:null,u:null,$:[]}:null}}function Fr(e){var t=h,n=t.e;if(n!==null){t.e=null;for(var r of n)Pt(r)}return e!==void 0&&(t.x=e),t.i=!0,h=t.p,e??{}}function Te(){return!me||h!==null&&h.l===null}function De(e){return h===null&&ze(),h.c??=new Map(hn(h)||void 0)}function hn(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}let J=[];function yt(){var e=J;J=[],Qt(e)}function je(e){if(J.length===0&&!Ee){var t=J;queueMicrotask(()=>{t===J&&yt()})}J.push(e)}function pn(){for(;J.length>0;)yt()}function bn(e){var t=d;if(t===null)return v.f|=B,e;if((t.f&de)===0&&(t.f&ie)===0)throw e;Ne(e,t)}function Ne(e,t){for(;t!==null;){if((t.f&en)!==0){if((t.f&de)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const wn=-7169;function w(e,t){e.f=e.f&wn|t}function Ke(e){(e.f&k)!==0||e.deps===null?w(e,y):w(e,P)}function Et(e){if(e!==null)for(const t of e)(t.f&g)===0||(t.f&re)===0||(t.f^=re,Et(t.deps))}function yn(e,t,n){(e.f&T)!==0?t.add(e):(e.f&P)!==0&&n.add(e),Et(e.deps),w(e,y)}const Ae=new Set;let b=null,ft=null,I=null,A=[],Ie=null,Ee=!1,_e=null;class ae{current=new Map;previous=new Map;#t=new Set;#s=new Set;#r=0;#f=0;#i=null;#a=new Set;#n=new Set;#e=new Map;is_fork=!1;#l=!1;#o(){return this.is_fork||this.#f>0}skip_effect(t){this.#e.has(t)||this.#e.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#e.get(t);if(n){this.#e.delete(t);for(var r of n.d)w(r,T),Y(r);for(r of n.m)w(r,P),Y(r)}}process(t){A=[],this.apply();var n=_e=[],r=[];for(const s of t)this.#u(s,n,r);if(_e=null,this.#o()){this.#c(r),this.#c(n);for(const[s,f]of this.#e)At(s,f)}else{ft=this,b=null;for(const s of this.#t)s(this);this.#t.clear(),this.#r===0&&this.#_(),it(r),it(n),this.#a.clear(),this.#n.clear(),ft=null,this.#i?.resolve()}I=null}#u(t,n,r){t.f^=y;for(var s=t.first;s!==null;){var f=s.f,o=(f&(L|X))!==0,l=o&&(f&y)!==0,i=l||(f&F)!==0||this.#e.has(s);if(!i&&s.fn!==null){o?s.f^=y:(f&ie)!==0?n.push(s):pe(s)&&((f&K)!==0&&this.#n.add(s),fe(s));var a=s.first;if(a!==null){s=a;continue}}for(;s!==null;){var u=s.next;if(u!==null){s=u;break}s=s.parent}}}#c(t){for(var n=0;n<t.length;n+=1)yn(t[n],this.#a,this.#n)}capture(t,n){n!==E&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&B)===0&&(this.current.set(t,t.v),I?.set(t,t.v))}activate(){b=this,this.apply()}deactivate(){b===this&&(b=null,I=null)}flush(){if(A.length>0)b=this,gt();else if(this.#r===0&&!this.is_fork){for(const t of this.#t)t(this);this.#t.clear(),this.#_(),this.#i?.resolve()}this.deactivate()}discard(){for(const t of this.#s)t(this);this.#s.clear()}#_(){if(Ae.size>1){this.previous.clear();var t=b,n=I,r=!0;for(const f of Ae){if(f===this){r=!1;continue}const o=[];for(const[i,a]of this.current){if(f.current.has(i))if(r&&a!==f.current.get(i))f.current.set(i,a);else continue;o.push(i)}if(o.length===0)continue;const l=[...f.current.keys()].filter(i=>!this.current.has(i));if(l.length>0){var s=A;A=[];const i=new Set,a=new Map;for(const u of o)mt(u,l,i,a);if(A.length>0){b=f,f.apply();for(const u of A)f.#u(u,[],[]);f.deactivate()}A=s}}b=t,I=n}this.#e.clear(),Ae.delete(this)}increment(t){this.#r+=1,t&&(this.#f+=1)}decrement(t){this.#r-=1,t&&(this.#f-=1),!this.#l&&(this.#l=!0,je(()=>{this.#l=!1,this.#o()?A.length>0&&this.flush():this.revive()}))}revive(){for(const t of this.#a)this.#n.delete(t),w(t,T),Y(t);for(const t of this.#n)w(t,P),Y(t);this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#s.add(t)}settled(){return(this.#i??=vt()).promise}static ensure(){if(b===null){const t=b=new ae;Ae.add(b),Ee||je(()=>{b===t&&t.flush()})}return b}apply(){}}function En(e){var t=Ee;Ee=!0;try{for(var n;;){if(pn(),A.length===0&&(b?.flush(),A.length===0))return Ie=null,n;gt()}}finally{Ee=t}}function gt(){var e=null;try{for(var t=0;A.length>0;){var n=ae.ensure();if(t++>1e3){var r,s;gn()}n.process(A),U.clear()}}finally{A=[],Ie=null,_e=null}}function gn(){try{an()}catch(e){Ne(e,Ie)}}let j=null;function it(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(V|F))===0&&pe(r)&&(j=new Set,fe(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&jt(r),j?.size>0)){U.clear();for(const s of j){if((s.f&(V|F))!==0)continue;const f=[s];let o=s.parent;for(;o!==null;)j.has(o)&&(j.delete(o),f.push(o)),o=o.parent;for(let l=f.length-1;l>=0;l--){const i=f[l];(i.f&(V|F))===0&&fe(i)}}j.clear()}}j=null}}function mt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const f=s.f;(f&g)!==0?mt(s,t,n,r):(f&(Ue|K))!==0&&(f&T)===0&&Tt(s,t,r)&&(w(s,T),Y(s))}}function Tt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(oe.call(t,s))return!0;if((s.f&g)!==0&&Tt(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Y(e){var t=Ie=e,n=t.b;if(n?.is_pending&&(e.f&(ie|ue|Be))!==0&&(e.f&de)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(_e!==null&&t===d&&(e.f&ue)===0)return;if((r&(X|L))!==0){if((r&y)===0)return;t.f^=y}}A.push(t)}function At(e,t){if(!((e.f&L)!==0&&(e.f&y)!==0)){(e.f&T)!==0?t.d.push(e):(e.f&P)!==0&&t.m.push(e),w(e,y);for(var n=e.first;n!==null;)At(n,t),n=n.next}}function xt(e,t,n,r){const s=Te()?Xe:An;var f=e.filter(c=>!c.settled);if(n.length===0&&f.length===0){r(t.map(s));return}var o=d,l=mn(),i=f.length===1?f[0].promise:f.length>1?Promise.all(f.map(c=>c.promise)):null;function a(c){l();try{r(c)}catch(_){(o.f&V)===0&&Ne(_,o)}Ye()}if(n.length===0){i.then(()=>a(t.map(s)));return}function u(){l(),Promise.all(n.map(c=>Tn(c))).then(c=>a([...t.map(s),...c])).catch(c=>Ne(c,o))}i?i.then(u):u()}function mn(){var e=d,t=v,n=h,r=b;return function(f=!0){ve(e),$(t),Re(n),f&&r?.activate()}}function Ye(e=!0){ve(null),$(null),Re(null),e&&b?.deactivate()}function St(){var e=d.b,t=b,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function Xe(e){var t=g|T,n=v!==null&&(v.f&g)!==0?v:null;return d!==null&&(d.f|=he),{ctx:h,deps:null,effects:null,equals:pt,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??d,ac:null}}function Tn(e,t,n){d===null&&nn();var s=void 0,f=We(E),o=!v,l=new Map;return Fn(()=>{var i=vt();s=i.promise;try{Promise.resolve(e()).then(i.resolve,i.reject).finally(Ye)}catch(_){i.reject(_),Ye()}var a=b;if(o){var u=St();l.get(a)?.reject(W),l.delete(a),l.set(a,i)}const c=(_,m=void 0)=>{if(a.activate(),m)m!==W&&(f.f|=B,He(f,m));else{(f.f&B)!==0&&(f.f^=B),He(f,_);for(const[p,D]of l){if(l.delete(p),p===a)break;D.reject(W)}}u&&u()};i.promise.then(c,_=>c(null,_||"unknown"))}),Mn(()=>{for(const i of l.values())i.reject(W)}),new Promise(i=>{function a(u){function c(){u===s?i(f):a(s)}u.then(c,c)}a(s)})}function Lr(e){const t=Xe(e);return Ht(t),t}function An(e){const t=Xe(e);return t.equals=wt,t}function xn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)G(t[n])}}function Sn(e){for(var t=e.parent;t!==null;){if((t.f&g)===0)return(t.f&V)===0?t:null;t=t.parent}return null}function Ze(e){var t,n=d;ve(Sn(e));try{e.f&=~re,xn(e),t=zt(e)}finally{ve(n)}return t}function Rt(e){var t=Ze(e);if(!e.equals(t)&&(e.wv=Bt(),(!b?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){w(e,y);return}se||(I!==null?(Mt()||b?.is_fork)&&I.set(e,t):Ke(e))}function Rn(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(W),t.teardown=ye,t.ac=null,ge(t,0),et(t))}function Nt(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&fe(t)}let qe=new Set;const U=new Map;let Ot=!1;function We(e,t){var n={f:0,v:e,reactions:null,equals:pt,rv:0,wv:0};return n}function q(e,t){const n=We(e);return Ht(n),n}function jr(e,t=!1,n=!0){const r=We(e);return t||(r.equals=wt),me&&n&&h!==null&&h.l!==null&&(h.l.s??=[]).push(r),r}function H(e,t,n=!1){v!==null&&(!M||(v.f&st)!==0)&&Te()&&(v.f&(g|K|Ue|st))!==0&&(C===null||!oe.call(C,e))&&un();let r=n?be(t):t;return He(e,r)}function He(e,t){if(!e.equals(t)){var n=e.v;se?U.set(e,t):U.set(e,n),e.v=t;var r=ae.ensure();if(r.capture(e,n),(e.f&g)!==0){const s=e;(e.f&T)!==0&&Ze(s),Ke(s)}e.wv=Bt(),kt(e,T),Te()&&d!==null&&(d.f&y)!==0&&(d.f&(L|X))===0&&(O===null?qn([e]):O.push(e)),!r.is_fork&&qe.size>0&&!Ot&&Nn()}return t}function Nn(){Ot=!1;for(const e of qe)(e.f&y)!==0&&w(e,P),pe(e)&&fe(e);qe.clear()}function Yr(e,t=1){var n=ee(e),r=t===1?n++:n--;return H(e,n),r}function Fe(e){H(e,e.v+1)}function kt(e,t){var n=e.reactions;if(n!==null)for(var r=Te(),s=n.length,f=0;f<s;f++){var o=n[f],l=o.f;if(!(!r&&o===d)){var i=(l&T)===0;if(i&&w(o,t),(l&g)!==0){var a=o;I?.delete(a),(l&re)===0&&(l&k&&(o.f|=re),kt(a,P))}else i&&((l&K)!==0&&j!==null&&j.add(o),Y(o))}}}function be(e){if(typeof e!="object"||e===null||te in e)return e;const t=_t(e);if(t!==Wt&&t!==Jt)return e;var n=new Map,r=Kt(e),s=q(0),f=ne,o=l=>{if(ne===f)return l();var i=v,a=ne;$(null),ct(f);var u=l();return $(i),ct(a),u};return r&&n.set("length",q(e.length)),new Proxy(e,{defineProperty(l,i,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&ln();var u=n.get(i);return u===void 0?o(()=>{var c=q(a.value);return n.set(i,c),c}):H(u,a.value,!0),!0},deleteProperty(l,i){var a=n.get(i);if(a===void 0){if(i in l){const u=o(()=>q(E));n.set(i,u),Fe(s)}}else H(a,E),Fe(s);return!0},get(l,i,a){if(i===te)return e;var u=n.get(i),c=i in l;if(u===void 0&&(!c||we(l,i)?.writable)&&(u=o(()=>{var m=be(c?l[i]:E),p=q(m);return p}),n.set(i,u)),u!==void 0){var _=ee(u);return _===E?void 0:_}return Reflect.get(l,i,a)},getOwnPropertyDescriptor(l,i){var a=Reflect.getOwnPropertyDescriptor(l,i);if(a&&"value"in a){var u=n.get(i);u&&(a.value=ee(u))}else if(a===void 0){var c=n.get(i),_=c?.v;if(c!==void 0&&_!==E)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return a},has(l,i){if(i===te)return!0;var a=n.get(i),u=a!==void 0&&a.v!==E||Reflect.has(l,i);if(a!==void 0||d!==null&&(!u||we(l,i)?.writable)){a===void 0&&(a=o(()=>{var _=u?be(l[i]):E,m=q(_);return m}),n.set(i,a));var c=ee(a);if(c===E)return!1}return u},set(l,i,a,u){var c=n.get(i),_=i in l;if(r&&i==="length")for(var m=a;m<c.v;m+=1){var p=n.get(m+"");p!==void 0?H(p,E):m in l&&(p=o(()=>q(E)),n.set(m+"",p))}if(c===void 0)(!_||we(l,i)?.writable)&&(c=o(()=>q(void 0)),H(c,be(a)),n.set(i,c));else{_=c.v!==E;var D=o(()=>be(a));H(c,D)}var tt=Reflect.getOwnPropertyDescriptor(l,i);if(tt?.set&&tt.set.call(u,a),!_){if(r&&typeof i=="string"){var nt=n.get("length"),Pe=Number(i);Number.isInteger(Pe)&&Pe>=nt.v&&H(nt,Pe+1)}Fe(s)}return!0},ownKeys(l){ee(s);var i=Reflect.ownKeys(l).filter(c=>{var _=n.get(c);return _===void 0||_.v!==E});for(var[a,u]of n)u.v!==E&&!(a in l)&&i.push(a);return i},setPrototypeOf(){on()}})}function at(e){try{if(e!==null&&typeof e=="object"&&te in e)return e[te]}catch{}return e}function qr(e,t){return Object.is(at(e),at(t))}var lt,On,kn,Ct,Dt;function Hr(){if(lt===void 0){lt=window,On=document,kn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ct=we(t,"firstChild").get,Dt=we(t,"nextSibling").get,rt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),rt(n)&&(n.__t=void 0)}}function Oe(e=""){return document.createTextNode(e)}function ke(e){return Ct.call(e)}function Z(e){return Dt.call(e)}function Vr(e,t){if(!z)return ke(e);var n=ke(S);if(n===null)n=S.appendChild(Oe());else if(t&&n.nodeType!==Ce){var r=Oe();return n?.before(r),ce(r),r}return t&&Je(n),ce(n),n}function Br(e,t=!1){if(!z){var n=ke(e);return n instanceof Comment&&n.data===""?Z(n):n}if(t){if(S?.nodeType!==Ce){var r=Oe();return S?.before(r),ce(r),r}Je(S)}return S}function Ur(e,t=1,n=!1){let r=z?S:e;for(var s;t--;)s=r,r=Z(r);if(!z)return r;if(n){if(r?.nodeType!==Ce){var f=Oe();return r===null?s?.after(f):r.before(f),ce(f),f}Je(r)}return ce(r),r}function Cn(e){e.textContent=""}function zr(){return!1}function Gr(e,t,n){return document.createElementNS(t??dn,e,void 0)}function Je(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Ce;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function $r(e,t){if(t){const n=document.body;e.autofocus=!0,je(()=>{document.activeElement===n&&e.focus()})}}function Kr(e){z&&ke(e)!==null&&Cn(e)}let ot=!1;function Dn(){ot||(ot=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Qe(e){var t=v,n=d;$(null),ve(null);try{return e()}finally{$(t),ve(n)}}function Xr(e,t,n,r=n){e.addEventListener(t,()=>Qe(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),Dn()}function It(e){d===null&&(v===null&&fn(),sn()),se&&rn()}function In(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function N(e,t){var n=d;n!==null&&(n.f&F)!==0&&(e|=F);var r={ctx:h,deps:null,nodes:null,f:e|T|k,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},s=r;if((e&ie)!==0)_e!==null?_e.push(r):Y(r);else if(t!==null){try{fe(r)}catch(o){throw G(r),o}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&he)===0&&(s=s.first,(e&K)!==0&&(e&Se)!==0&&s!==null&&(s.f|=Se))}if(s!==null&&(s.parent=n,n!==null&&In(s,n),v!==null&&(v.f&g)!==0&&(e&X)===0)){var f=v;(f.effects??=[]).push(s)}return r}function Mt(){return v!==null&&!M}function Mn(e){const t=N(ue,null);return w(t,y),t.teardown=e,t}function Pn(e){It();var t=d.f,n=!v&&(t&L)!==0&&(t&de)===0;if(n){var r=h;(r.e??=[]).push(e)}else return Pt(e)}function Pt(e){return N(ie|dt,e)}function Zr(e){return It(),N(ue|dt,e)}function Wr(e){ae.ensure();const t=N(X|he,e);return()=>{G(t)}}function Jr(e){ae.ensure();const t=N(X|he,e);return(n={})=>new Promise(r=>{n.outro?Yn(t,()=>{G(t),r(void 0)}):(G(t),r(void 0))})}function Qr(e){return N(ie,e)}function es(e,t){var n=h,r={effect:null,ran:!1,deps:e};n.l.$.push(r),r.effect=Ft(()=>{e(),!r.ran&&(r.ran=!0,Me(t))})}function ts(){var e=h;Ft(()=>{for(var t of e.l.$){t.deps();var n=t.effect;(n.f&y)!==0&&n.deps!==null&&w(n,P),pe(n)&&fe(n),t.ran=!1}})}function Fn(e){return N(Ue|he,e)}function Ft(e,t=0){return N(ue|t,e)}function ns(e,t=[],n=[],r=[]){xt(r,t,n,s=>{N(ue,()=>e(...s.map(ee)))})}function rs(e,t=[],n=[],r=[]){if(n.length>0||r.length>0)var s=St();xt(r,t,n,f=>{N(ie,()=>e(...f.map(ee))),s&&s()})}function ss(e,t=0){var n=N(K|t,e);return n}function fs(e,t=0){var n=N(Be|t,e);return n}function is(e){return N(L|he,e)}function Lt(e){var t=e.teardown;if(t!==null){const n=se,r=v;ut(!0),$(null);try{t.call(null)}finally{ut(n),$(r)}}}function et(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Qe(()=>{s.abort(W)});var r=n.next;(n.f&X)!==0?n.parent=null:G(n,t),n=r}}function Ln(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&L)===0&&G(t),t=n}}function G(e,t=!0){var n=!1;(t||(e.f&tn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(jn(e.nodes.start,e.nodes.end),n=!0),et(e,t&&!n),ge(e,0),w(e,V);var r=e.nodes&&e.nodes.t;if(r!==null)for(const f of r)f.stop();Lt(e);var s=e.parent;s!==null&&s.first!==null&&jt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function jn(e,t){for(;e!==null;){var n=e===t?null:Z(e);e.remove(),e=n}}function jt(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Yn(e,t,n=!0){var r=[];Yt(e,r,!0);var s=()=>{n&&G(e),t&&t()},f=r.length;if(f>0){var o=()=>--f||s();for(var l of r)l.out(o)}else s()}function Yt(e,t,n){if((e.f&F)===0){e.f^=F;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var s=e.first;s!==null;){var f=s.next,o=(s.f&Se)!==0||(s.f&L)!==0&&(e.f&K)!==0;Yt(s,t,o?n:!1),s=f}}}function as(e){qt(e,!0)}function qt(e,t){if((e.f&F)!==0){e.f^=F,(e.f&y)===0&&(w(e,T),Y(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Se)!==0||(n.f&L)!==0;qt(n,s?t:!1),n=r}var f=e.nodes&&e.nodes.t;if(f!==null)for(const o of f)(o.is_global||t)&&o.in()}}function ls(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:Z(n);t.append(n),n=s}}let xe=!1,se=!1;function ut(e){se=e}let v=null,M=!1;function $(e){v=e}let d=null;function ve(e){d=e}let C=null;function Ht(e){v!==null&&(C===null?C=[e]:C.push(e))}let x=null,R=0,O=null;function qn(e){O=e}let Vt=1,Q=0,ne=Q;function ct(e){ne=e}function Bt(){return++Vt}function pe(e){var t=e.f;if((t&T)!==0)return!0;if(t&g&&(e.f&=~re),(t&P)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var f=n[s];if(pe(f)&&Rt(f),f.wv>e.wv)return!0}(t&k)!==0&&I===null&&w(e,y)}return!1}function Ut(e,t,n=!0){var r=e.reactions;if(r!==null&&!(C!==null&&oe.call(C,e)))for(var s=0;s<r.length;s++){var f=r[s];(f.f&g)!==0?Ut(f,t,!1):t===f&&(n?w(f,T):(f.f&y)!==0&&w(f,P),Y(f))}}function zt(e){var t=x,n=R,r=O,s=v,f=C,o=h,l=M,i=ne,a=e.f;x=null,R=0,O=null,v=(a&(L|X))===0?e:null,C=null,Re(e.ctx),M=!1,ne=++Q,e.ac!==null&&(Qe(()=>{e.ac.abort(W)}),e.ac=null);try{e.f|=Le;var u=e.fn,c=u();e.f|=de;var _=e.deps,m=b?.is_fork;if(x!==null){var p;if(m||ge(e,R),_!==null&&R>0)for(_.length=R+x.length,p=0;p<x.length;p++)_[R+p]=x[p];else e.deps=_=x;if(Mt()&&(e.f&k)!==0)for(p=R;p<_.length;p++)(_[p].reactions??=[]).push(e)}else!m&&_!==null&&R<_.length&&(ge(e,R),_.length=R);if(Te()&&O!==null&&!M&&_!==null&&(e.f&(g|P|T))===0)for(p=0;p<O.length;p++)Ut(O[p],e);if(s!==null&&s!==e){if(Q++,s.deps!==null)for(let D=0;D<n;D+=1)s.deps[D].rv=Q;if(t!==null)for(const D of t)D.rv=Q;O!==null&&(r===null?r=O:r.push(...O))}return(e.f&B)!==0&&(e.f^=B),c}catch(D){return bn(D)}finally{e.f^=Le,x=t,R=n,O=r,v=s,C=f,Re(o),M=l,ne=i}}function Hn(e,t){let n=t.reactions;if(n!==null){var r=Xt.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&(t.f&g)!==0&&(x===null||!oe.call(x,t))){var f=t;(f.f&k)!==0&&(f.f^=k,f.f&=~re),Ke(f),Rn(f),ge(f,0)}}function ge(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Hn(e,n[r])}function fe(e){var t=e.f;if((t&V)===0){w(e,y);var n=d,r=xe;d=e,xe=!0;try{(t&(K|Be))!==0?Ln(e):et(e),Lt(e);var s=zt(e);e.teardown=typeof s=="function"?s:null,e.wv=Vt;var f}finally{xe=r,d=n}}}async function os(){await Promise.resolve(),En()}function us(){return ae.ensure().settled()}function ee(e){var t=e.f,n=(t&g)!==0;if(v!==null&&!M){var r=d!==null&&(d.f&V)!==0;if(!r&&(C===null||!oe.call(C,e))){var s=v.deps;if((v.f&Le)!==0)e.rv<Q&&(e.rv=Q,x===null&&s!==null&&s[R]===e?R++:x===null?x=[e]:x.push(e));else{(v.deps??=[]).push(e);var f=e.reactions;f===null?e.reactions=[v]:oe.call(f,v)||f.push(v)}}}if(se&&U.has(e))return U.get(e);if(n){var o=e;if(se){var l=o.v;return((o.f&y)===0&&o.reactions!==null||$t(o))&&(l=Ze(o)),U.set(o,l),l}var i=(o.f&k)===0&&!M&&v!==null&&(xe||(v.f&k)!==0),a=(o.f&de)===0;pe(o)&&(i&&(o.f|=k),Rt(o)),i&&!a&&(Nt(o),Gt(o))}if(I?.has(e))return I.get(e);if((e.f&B)!==0)throw e.v;return e.v}function Gt(e){if(e.f|=k,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&g)!==0&&(t.f&k)===0&&(Nt(t),Gt(t))}function $t(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(U.has(t)||(t.f&g)!==0&&$t(t))return!0;return!1}function Me(e){var t=M;try{return M=!0,e()}finally{M=t}}function cs(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(te in e)Ve(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&te in n&&Ve(n)}}}function Ve(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{Ve(e[r],t)}catch{}const n=_t(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=Zt(n);for(let s in r){const f=r[s].get;if(f)try{f.call(e)}catch{}}}}}function Vn(e,t,n){if(e==null)return t(void 0),ye;const r=Me(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const le=[];function _s(e,t=ye){let n=null;const r=new Set;function s(l){if(bt(e,l)&&(e=l,n)){const i=!le.length;for(const a of r)a[1](),le.push(a,e);if(i){for(let a=0;a<le.length;a+=2)le[a][0](le[a+1]);le.length=0}}}function f(l){s(l(e))}function o(l,i=ye){const a=[l,i];return r.add(a),r.size===1&&(n=t(s,f)||ye),l(e),()=>{r.delete(a),r.size===0&&n&&(n(),n=null)}}return{set:s,update:f,subscribe:o}}function vs(e){let t;return Vn(e,n=>t=n)(),t}function Bn(e){h===null&&ze(),me&&h.l!==null?Un(h).m.push(e):Pn(()=>{const t=Me(e);if(typeof t=="function")return t})}function ds(e){h===null&&ze(),Bn(()=>()=>Me(e))}function Un(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}export{he as $,b as A,Zn as B,ht as C,is as D,lr as E,nr as F,zr as G,_n as H,An as I,Kt as J,zn as K,ir as L,ur as M,We as N,ar as O,as as P,Yn as Q,F as R,je as S,L as T,or as U,Cn as V,G as W,Z as X,Se as Y,cn as Z,tn as _,ts as a,wr as a$,Br as a0,Cr as a1,Pn as a2,Ur as a3,Lr as a4,h as a5,Zr as a6,Me as a7,Kn as a8,Qt as a9,Qr as aA,Ft as aB,En as aC,Bn as aD,os as aE,ds as aF,fs as aG,mr as aH,qr as aI,xt as aJ,dn as aK,_t as aL,gr as aM,Zt as aN,er as aO,$r as aP,E as aQ,Dn as aR,Jn as aS,Wt as aT,Xr as aU,ft as aV,Dr as aW,Ir as aX,Mt as aY,Fe as aZ,en as a_,Xe as aa,kr as ab,rs as ac,On as ad,ye as ae,Vn as af,vs as ag,Mn as ah,Gn as ai,we as aj,sr as ak,vr as al,se as am,d as an,V as ao,dr as ap,me as aq,_r as ar,cr as as,$n as at,te as au,Wn as av,hr as aw,Yr as ax,ve as ay,ls as az,Fr as b,ae as b0,w as b1,T as b2,Y as b3,P as b4,yn as b5,$ as b6,Re as b7,bn as b8,v as b9,Wr as bA,_s as bB,us as bC,Ne as ba,fr as bb,Tr as bc,Qe as bd,Gr as be,kn as bf,pr as bg,br as bh,Ce as bi,Je as bj,de as bk,Hr as bl,Ge as bm,rr as bn,Jr as bo,$e as bp,tr as bq,yr as br,Kr as bs,lt as bt,Xn as bu,jn as bv,Er as bw,Te as bx,ne as by,Mr as bz,Vr as c,cs as d,q as e,be as f,ee as g,Oe as h,ss as i,z as j,ce as k,es as l,jr as m,Rr as n,ke as o,Pr as p,xr as q,Sr as r,H as s,ns as t,Or as u,Nr as v,Ar as w,S as x,vn as y,He as z};
1
+ var Kt=Array.isArray,Xt=Array.prototype.indexOf,oe=Array.prototype.includes,zn=Array.from,Gn=Object.defineProperty,we=Object.getOwnPropertyDescriptor,Zt=Object.getOwnPropertyDescriptors,Wt=Object.prototype,Jt=Array.prototype,_t=Object.getPrototypeOf,rt=Object.isExtensible;function $n(e){return typeof e=="function"}const ye=()=>{};function Kn(e){return e()}function Qt(e){for(var t=0;t<e.length;t++)e[t]()}function vt(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function Xn(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const g=2,ie=4,ue=8,Be=1<<24,K=16,L=32,X=64,en=128,k=512,y=1024,T=2048,P=4096,F=8192,V=16384,de=32768,Se=65536,st=1<<17,tn=1<<18,he=1<<19,dt=1<<20,Zn=1<<25,re=65536,Le=1<<21,Ue=1<<22,B=1<<23,te=Symbol("$state"),Wn=Symbol("legacy props"),Jn=Symbol(""),W=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},er=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),tr=1,Ce=3,ht=8;function ze(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function nn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function nr(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function rn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function sn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function fn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function an(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function rr(){throw new Error("https://svelte.dev/e/hydration_failed")}function sr(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ln(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function on(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function un(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function fr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const ir=1,ar=2,lr=4,or=8,ur=16,cr=1,_r=2,vr=4,dr=8,hr=16,pr=1,br=2,cn="[",_n="[!",wr="[?",vn="]",Ge={},E=Symbol(),dn="http://www.w3.org/1999/xhtml",yr="http://www.w3.org/2000/svg",Er="http://www.w3.org/1998/Math/MathML",gr="@attach";function $e(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function mr(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Tr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let z=!1;function Ar(e){z=e}let S;function ce(e){if(e===null)throw $e(),Ge;return S=e}function xr(){return ce(Z(S))}function Sr(e){if(z){if(Z(S)!==null)throw $e(),Ge;S=e}}function Rr(e=1){if(z){for(var t=e,n=S;t--;)n=Z(n);S=n}}function Nr(e=!0){for(var t=0,n=S;;){if(n.nodeType===ht){var r=n.data;if(r===vn){if(t===0)return n;t-=1}else(r===cn||r===_n||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var s=Z(n);e&&n.remove(),n=s}}function Or(e){if(!e||e.nodeType!==ht)throw $e(),Ge;return e.data}function pt(e){return e===this.v}function bt(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function wt(e){return!bt(e,this.v)}let me=!1;function kr(){me=!0}let h=null;function Re(e){h=e}function Cr(e){return De().get(e)}function Dr(e,t){return De().set(e,t),t}function Ir(e){return De().has(e)}function Mr(){return De()}function Pr(e,t=!1,n){h={p:h,i:!1,c:null,e:null,s:e,x:null,l:me&&!t?{s:null,u:null,$:[]}:null}}function Fr(e){var t=h,n=t.e;if(n!==null){t.e=null;for(var r of n)Pt(r)}return e!==void 0&&(t.x=e),t.i=!0,h=t.p,e??{}}function Te(){return!me||h!==null&&h.l===null}function De(e){return h===null&&ze(),h.c??=new Map(hn(h)||void 0)}function hn(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}let J=[];function yt(){var e=J;J=[],Qt(e)}function je(e){if(J.length===0&&!Ee){var t=J;queueMicrotask(()=>{t===J&&yt()})}J.push(e)}function pn(){for(;J.length>0;)yt()}function bn(e){var t=d;if(t===null)return v.f|=B,e;if((t.f&de)===0&&(t.f&ie)===0)throw e;Ne(e,t)}function Ne(e,t){for(;t!==null;){if((t.f&en)!==0){if((t.f&de)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const wn=-7169;function w(e,t){e.f=e.f&wn|t}function Ke(e){(e.f&k)!==0||e.deps===null?w(e,y):w(e,P)}function Et(e){if(e!==null)for(const t of e)(t.f&g)===0||(t.f&re)===0||(t.f^=re,Et(t.deps))}function yn(e,t,n){(e.f&T)!==0?t.add(e):(e.f&P)!==0&&n.add(e),Et(e.deps),w(e,y)}const Ae=new Set;let b=null,ft=null,I=null,A=[],Ie=null,Ee=!1,_e=null;class ae{current=new Map;previous=new Map;#t=new Set;#s=new Set;#r=0;#f=0;#i=null;#a=new Set;#n=new Set;#e=new Map;is_fork=!1;#l=!1;#o(){return this.is_fork||this.#f>0}skip_effect(t){this.#e.has(t)||this.#e.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#e.get(t);if(n){this.#e.delete(t);for(var r of n.d)w(r,T),Y(r);for(r of n.m)w(r,P),Y(r)}}process(t){A=[],this.apply();var n=_e=[],r=[];for(const s of t)this.#u(s,n,r);if(_e=null,this.#o()){this.#c(r),this.#c(n);for(const[s,f]of this.#e)At(s,f)}else{ft=this,b=null;for(const s of this.#t)s(this);this.#t.clear(),this.#r===0&&this.#_(),it(r),it(n),this.#a.clear(),this.#n.clear(),ft=null,this.#i?.resolve()}I=null}#u(t,n,r){t.f^=y;for(var s=t.first;s!==null;){var f=s.f,o=(f&(L|X))!==0,l=o&&(f&y)!==0,i=l||(f&F)!==0||this.#e.has(s);if(!i&&s.fn!==null){o?s.f^=y:(f&ie)!==0?n.push(s):pe(s)&&((f&K)!==0&&this.#n.add(s),fe(s));var a=s.first;if(a!==null){s=a;continue}}for(;s!==null;){var u=s.next;if(u!==null){s=u;break}s=s.parent}}}#c(t){for(var n=0;n<t.length;n+=1)yn(t[n],this.#a,this.#n)}capture(t,n){n!==E&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&B)===0&&(this.current.set(t,t.v),I?.set(t,t.v))}activate(){b=this,this.apply()}deactivate(){b===this&&(b=null,I=null)}flush(){if(A.length>0)b=this,gt();else if(this.#r===0&&!this.is_fork){for(const t of this.#t)t(this);this.#t.clear(),this.#_(),this.#i?.resolve()}this.deactivate()}discard(){for(const t of this.#s)t(this);this.#s.clear()}#_(){if(Ae.size>1){this.previous.clear();var t=b,n=I,r=!0;for(const f of Ae){if(f===this){r=!1;continue}const o=[];for(const[i,a]of this.current){if(f.current.has(i))if(r&&a!==f.current.get(i))f.current.set(i,a);else continue;o.push(i)}if(o.length===0)continue;const l=[...f.current.keys()].filter(i=>!this.current.has(i));if(l.length>0){var s=A;A=[];const i=new Set,a=new Map;for(const u of o)mt(u,l,i,a);if(A.length>0){b=f,f.apply();for(const u of A)f.#u(u,[],[]);f.deactivate()}A=s}}b=t,I=n}this.#e.clear(),Ae.delete(this)}increment(t){this.#r+=1,t&&(this.#f+=1)}decrement(t){this.#r-=1,t&&(this.#f-=1),!this.#l&&(this.#l=!0,je(()=>{this.#l=!1,this.#o()?A.length>0&&this.flush():this.revive()}))}revive(){for(const t of this.#a)this.#n.delete(t),w(t,T),Y(t);for(const t of this.#n)w(t,P),Y(t);this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#s.add(t)}settled(){return(this.#i??=vt()).promise}static ensure(){if(b===null){const t=b=new ae;Ae.add(b),Ee||je(()=>{b===t&&t.flush()})}return b}apply(){}}function En(e){var t=Ee;Ee=!0;try{for(var n;;){if(pn(),A.length===0&&(b?.flush(),A.length===0))return Ie=null,n;gt()}}finally{Ee=t}}function gt(){var e=null;try{for(var t=0;A.length>0;){var n=ae.ensure();if(t++>1e3){var r,s;gn()}n.process(A),U.clear()}}finally{A=[],Ie=null,_e=null}}function gn(){try{an()}catch(e){Ne(e,Ie)}}let j=null;function it(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(V|F))===0&&pe(r)&&(j=new Set,fe(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&jt(r),j?.size>0)){U.clear();for(const s of j){if((s.f&(V|F))!==0)continue;const f=[s];let o=s.parent;for(;o!==null;)j.has(o)&&(j.delete(o),f.push(o)),o=o.parent;for(let l=f.length-1;l>=0;l--){const i=f[l];(i.f&(V|F))===0&&fe(i)}}j.clear()}}j=null}}function mt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const f=s.f;(f&g)!==0?mt(s,t,n,r):(f&(Ue|K))!==0&&(f&T)===0&&Tt(s,t,r)&&(w(s,T),Y(s))}}function Tt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(oe.call(t,s))return!0;if((s.f&g)!==0&&Tt(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Y(e){var t=Ie=e,n=t.b;if(n?.is_pending&&(e.f&(ie|ue|Be))!==0&&(e.f&de)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(_e!==null&&t===d&&(e.f&ue)===0)return;if((r&(X|L))!==0){if((r&y)===0)return;t.f^=y}}A.push(t)}function At(e,t){if(!((e.f&L)!==0&&(e.f&y)!==0)){(e.f&T)!==0?t.d.push(e):(e.f&P)!==0&&t.m.push(e),w(e,y);for(var n=e.first;n!==null;)At(n,t),n=n.next}}function xt(e,t,n,r){const s=Te()?Xe:An;var f=e.filter(c=>!c.settled);if(n.length===0&&f.length===0){r(t.map(s));return}var o=d,l=mn(),i=f.length===1?f[0].promise:f.length>1?Promise.all(f.map(c=>c.promise)):null;function a(c){l();try{r(c)}catch(_){(o.f&V)===0&&Ne(_,o)}Ye()}if(n.length===0){i.then(()=>a(t.map(s)));return}function u(){l(),Promise.all(n.map(c=>Tn(c))).then(c=>a([...t.map(s),...c])).catch(c=>Ne(c,o))}i?i.then(u):u()}function mn(){var e=d,t=v,n=h,r=b;return function(f=!0){ve(e),$(t),Re(n),f&&r?.activate()}}function Ye(e=!0){ve(null),$(null),Re(null),e&&b?.deactivate()}function St(){var e=d.b,t=b,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function Xe(e){var t=g|T,n=v!==null&&(v.f&g)!==0?v:null;return d!==null&&(d.f|=he),{ctx:h,deps:null,effects:null,equals:pt,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:n??d,ac:null}}function Tn(e,t,n){d===null&&nn();var s=void 0,f=We(E),o=!v,l=new Map;return Fn(()=>{var i=vt();s=i.promise;try{Promise.resolve(e()).then(i.resolve,i.reject).finally(Ye)}catch(_){i.reject(_),Ye()}var a=b;if(o){var u=St();l.get(a)?.reject(W),l.delete(a),l.set(a,i)}const c=(_,m=void 0)=>{if(a.activate(),m)m!==W&&(f.f|=B,He(f,m));else{(f.f&B)!==0&&(f.f^=B),He(f,_);for(const[p,D]of l){if(l.delete(p),p===a)break;D.reject(W)}}u&&u()};i.promise.then(c,_=>c(null,_||"unknown"))}),Mn(()=>{for(const i of l.values())i.reject(W)}),new Promise(i=>{function a(u){function c(){u===s?i(f):a(s)}u.then(c,c)}a(s)})}function Lr(e){const t=Xe(e);return Ht(t),t}function An(e){const t=Xe(e);return t.equals=wt,t}function xn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)G(t[n])}}function Sn(e){for(var t=e.parent;t!==null;){if((t.f&g)===0)return(t.f&V)===0?t:null;t=t.parent}return null}function Ze(e){var t,n=d;ve(Sn(e));try{e.f&=~re,xn(e),t=zt(e)}finally{ve(n)}return t}function Rt(e){var t=Ze(e);if(!e.equals(t)&&(e.wv=Bt(),(!b?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){w(e,y);return}se||(I!==null?(Mt()||b?.is_fork)&&I.set(e,t):Ke(e))}function Rn(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(W),t.teardown=ye,t.ac=null,ge(t,0),et(t))}function Nt(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&fe(t)}let qe=new Set;const U=new Map;let Ot=!1;function We(e,t){var n={f:0,v:e,reactions:null,equals:pt,rv:0,wv:0};return n}function q(e,t){const n=We(e);return Ht(n),n}function jr(e,t=!1,n=!0){const r=We(e);return t||(r.equals=wt),me&&n&&h!==null&&h.l!==null&&(h.l.s??=[]).push(r),r}function H(e,t,n=!1){v!==null&&(!M||(v.f&st)!==0)&&Te()&&(v.f&(g|K|Ue|st))!==0&&(C===null||!oe.call(C,e))&&un();let r=n?be(t):t;return He(e,r)}function He(e,t){if(!e.equals(t)){var n=e.v;se?U.set(e,t):U.set(e,n),e.v=t;var r=ae.ensure();if(r.capture(e,n),(e.f&g)!==0){const s=e;(e.f&T)!==0&&Ze(s),Ke(s)}e.wv=Bt(),kt(e,T),Te()&&d!==null&&(d.f&y)!==0&&(d.f&(L|X))===0&&(O===null?qn([e]):O.push(e)),!r.is_fork&&qe.size>0&&!Ot&&Nn()}return t}function Nn(){Ot=!1;for(const e of qe)(e.f&y)!==0&&w(e,P),pe(e)&&fe(e);qe.clear()}function Yr(e,t=1){var n=ee(e),r=t===1?n++:n--;return H(e,n),r}function Fe(e){H(e,e.v+1)}function kt(e,t){var n=e.reactions;if(n!==null)for(var r=Te(),s=n.length,f=0;f<s;f++){var o=n[f],l=o.f;if(!(!r&&o===d)){var i=(l&T)===0;if(i&&w(o,t),(l&g)!==0){var a=o;I?.delete(a),(l&re)===0&&(l&k&&(o.f|=re),kt(a,P))}else i&&((l&K)!==0&&j!==null&&j.add(o),Y(o))}}}function be(e){if(typeof e!="object"||e===null||te in e)return e;const t=_t(e);if(t!==Wt&&t!==Jt)return e;var n=new Map,r=Kt(e),s=q(0),f=ne,o=l=>{if(ne===f)return l();var i=v,a=ne;$(null),ct(f);var u=l();return $(i),ct(a),u};return r&&n.set("length",q(e.length)),new Proxy(e,{defineProperty(l,i,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&ln();var u=n.get(i);return u===void 0?o(()=>{var c=q(a.value);return n.set(i,c),c}):H(u,a.value,!0),!0},deleteProperty(l,i){var a=n.get(i);if(a===void 0){if(i in l){const u=o(()=>q(E));n.set(i,u),Fe(s)}}else H(a,E),Fe(s);return!0},get(l,i,a){if(i===te)return e;var u=n.get(i),c=i in l;if(u===void 0&&(!c||we(l,i)?.writable)&&(u=o(()=>{var m=be(c?l[i]:E),p=q(m);return p}),n.set(i,u)),u!==void 0){var _=ee(u);return _===E?void 0:_}return Reflect.get(l,i,a)},getOwnPropertyDescriptor(l,i){var a=Reflect.getOwnPropertyDescriptor(l,i);if(a&&"value"in a){var u=n.get(i);u&&(a.value=ee(u))}else if(a===void 0){var c=n.get(i),_=c?.v;if(c!==void 0&&_!==E)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return a},has(l,i){if(i===te)return!0;var a=n.get(i),u=a!==void 0&&a.v!==E||Reflect.has(l,i);if(a!==void 0||d!==null&&(!u||we(l,i)?.writable)){a===void 0&&(a=o(()=>{var _=u?be(l[i]):E,m=q(_);return m}),n.set(i,a));var c=ee(a);if(c===E)return!1}return u},set(l,i,a,u){var c=n.get(i),_=i in l;if(r&&i==="length")for(var m=a;m<c.v;m+=1){var p=n.get(m+"");p!==void 0?H(p,E):m in l&&(p=o(()=>q(E)),n.set(m+"",p))}if(c===void 0)(!_||we(l,i)?.writable)&&(c=o(()=>q(void 0)),H(c,be(a)),n.set(i,c));else{_=c.v!==E;var D=o(()=>be(a));H(c,D)}var tt=Reflect.getOwnPropertyDescriptor(l,i);if(tt?.set&&tt.set.call(u,a),!_){if(r&&typeof i=="string"){var nt=n.get("length"),Pe=Number(i);Number.isInteger(Pe)&&Pe>=nt.v&&H(nt,Pe+1)}Fe(s)}return!0},ownKeys(l){ee(s);var i=Reflect.ownKeys(l).filter(c=>{var _=n.get(c);return _===void 0||_.v!==E});for(var[a,u]of n)u.v!==E&&!(a in l)&&i.push(a);return i},setPrototypeOf(){on()}})}function at(e){try{if(e!==null&&typeof e=="object"&&te in e)return e[te]}catch{}return e}function qr(e,t){return Object.is(at(e),at(t))}var lt,On,kn,Ct,Dt;function Hr(){if(lt===void 0){lt=window,On=document,kn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ct=we(t,"firstChild").get,Dt=we(t,"nextSibling").get,rt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),rt(n)&&(n.__t=void 0)}}function Oe(e=""){return document.createTextNode(e)}function ke(e){return Ct.call(e)}function Z(e){return Dt.call(e)}function Vr(e,t){if(!z)return ke(e);var n=ke(S);if(n===null)n=S.appendChild(Oe());else if(t&&n.nodeType!==Ce){var r=Oe();return n?.before(r),ce(r),r}return t&&Je(n),ce(n),n}function Br(e,t=!1){if(!z){var n=ke(e);return n instanceof Comment&&n.data===""?Z(n):n}if(t){if(S?.nodeType!==Ce){var r=Oe();return S?.before(r),ce(r),r}Je(S)}return S}function Ur(e,t=1,n=!1){let r=z?S:e;for(var s;t--;)s=r,r=Z(r);if(!z)return r;if(n){if(r?.nodeType!==Ce){var f=Oe();return r===null?s?.after(f):r.before(f),ce(f),f}Je(r)}return ce(r),r}function Cn(e){e.textContent=""}function zr(){return!1}function Gr(e,t,n){return document.createElementNS(t??dn,e,void 0)}function Je(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Ce;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function $r(e,t){if(t){const n=document.body;e.autofocus=!0,je(()=>{document.activeElement===n&&e.focus()})}}function Kr(e){z&&ke(e)!==null&&Cn(e)}let ot=!1;function Dn(){ot||(ot=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Qe(e){var t=v,n=d;$(null),ve(null);try{return e()}finally{$(t),ve(n)}}function Xr(e,t,n,r=n){e.addEventListener(t,()=>Qe(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),Dn()}function It(e){d===null&&(v===null&&fn(),sn()),se&&rn()}function In(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function N(e,t){var n=d;n!==null&&(n.f&F)!==0&&(e|=F);var r={ctx:h,deps:null,nodes:null,f:e|T|k,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},s=r;if((e&ie)!==0)_e!==null?_e.push(r):Y(r);else if(t!==null){try{fe(r)}catch(o){throw G(r),o}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&he)===0&&(s=s.first,(e&K)!==0&&(e&Se)!==0&&s!==null&&(s.f|=Se))}if(s!==null&&(s.parent=n,n!==null&&In(s,n),v!==null&&(v.f&g)!==0&&(e&X)===0)){var f=v;(f.effects??=[]).push(s)}return r}function Mt(){return v!==null&&!M}function Mn(e){const t=N(ue,null);return w(t,y),t.teardown=e,t}function Pn(e){It();var t=d.f,n=!v&&(t&L)!==0&&(t&de)===0;if(n){var r=h;(r.e??=[]).push(e)}else return Pt(e)}function Pt(e){return N(ie|dt,e)}function Zr(e){return It(),N(ue|dt,e)}function Wr(e){ae.ensure();const t=N(X|he,e);return()=>{G(t)}}function Jr(e){ae.ensure();const t=N(X|he,e);return(n={})=>new Promise(r=>{n.outro?Yn(t,()=>{G(t),r(void 0)}):(G(t),r(void 0))})}function Qr(e){return N(ie,e)}function es(e,t){var n=h,r={effect:null,ran:!1,deps:e};n.l.$.push(r),r.effect=Ft(()=>{e(),!r.ran&&(r.ran=!0,Me(t))})}function ts(){var e=h;Ft(()=>{for(var t of e.l.$){t.deps();var n=t.effect;(n.f&y)!==0&&n.deps!==null&&w(n,P),pe(n)&&fe(n),t.ran=!1}})}function Fn(e){return N(Ue|he,e)}function Ft(e,t=0){return N(ue|t,e)}function ns(e,t=[],n=[],r=[]){xt(r,t,n,s=>{N(ue,()=>e(...s.map(ee)))})}function rs(e,t=[],n=[],r=[]){if(n.length>0||r.length>0)var s=St();xt(r,t,n,f=>{N(ie,()=>e(...f.map(ee))),s&&s()})}function ss(e,t=0){var n=N(K|t,e);return n}function fs(e,t=0){var n=N(Be|t,e);return n}function is(e){return N(L|he,e)}function Lt(e){var t=e.teardown;if(t!==null){const n=se,r=v;ut(!0),$(null);try{t.call(null)}finally{ut(n),$(r)}}}function et(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Qe(()=>{s.abort(W)});var r=n.next;(n.f&X)!==0?n.parent=null:G(n,t),n=r}}function Ln(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&L)===0&&G(t),t=n}}function G(e,t=!0){var n=!1;(t||(e.f&tn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(jn(e.nodes.start,e.nodes.end),n=!0),et(e,t&&!n),ge(e,0),w(e,V);var r=e.nodes&&e.nodes.t;if(r!==null)for(const f of r)f.stop();Lt(e);var s=e.parent;s!==null&&s.first!==null&&jt(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function jn(e,t){for(;e!==null;){var n=e===t?null:Z(e);e.remove(),e=n}}function jt(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Yn(e,t,n=!0){var r=[];Yt(e,r,!0);var s=()=>{n&&G(e),t&&t()},f=r.length;if(f>0){var o=()=>--f||s();for(var l of r)l.out(o)}else s()}function Yt(e,t,n){if((e.f&F)===0){e.f^=F;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var s=e.first;s!==null;){var f=s.next,o=(s.f&Se)!==0||(s.f&L)!==0&&(e.f&K)!==0;Yt(s,t,o?n:!1),s=f}}}function as(e){qt(e,!0)}function qt(e,t){if((e.f&F)!==0){e.f^=F,(e.f&y)===0&&(w(e,T),Y(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Se)!==0||(n.f&L)!==0;qt(n,s?t:!1),n=r}var f=e.nodes&&e.nodes.t;if(f!==null)for(const o of f)(o.is_global||t)&&o.in()}}function ls(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:Z(n);t.append(n),n=s}}let xe=!1,se=!1;function ut(e){se=e}let v=null,M=!1;function $(e){v=e}let d=null;function ve(e){d=e}let C=null;function Ht(e){v!==null&&(C===null?C=[e]:C.push(e))}let x=null,R=0,O=null;function qn(e){O=e}let Vt=1,Q=0,ne=Q;function ct(e){ne=e}function Bt(){return++Vt}function pe(e){var t=e.f;if((t&T)!==0)return!0;if(t&g&&(e.f&=~re),(t&P)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var f=n[s];if(pe(f)&&Rt(f),f.wv>e.wv)return!0}(t&k)!==0&&I===null&&w(e,y)}return!1}function Ut(e,t,n=!0){var r=e.reactions;if(r!==null&&!(C!==null&&oe.call(C,e)))for(var s=0;s<r.length;s++){var f=r[s];(f.f&g)!==0?Ut(f,t,!1):t===f&&(n?w(f,T):(f.f&y)!==0&&w(f,P),Y(f))}}function zt(e){var t=x,n=R,r=O,s=v,f=C,o=h,l=M,i=ne,a=e.f;x=null,R=0,O=null,v=(a&(L|X))===0?e:null,C=null,Re(e.ctx),M=!1,ne=++Q,e.ac!==null&&(Qe(()=>{e.ac.abort(W)}),e.ac=null);try{e.f|=Le;var u=e.fn,c=u();e.f|=de;var _=e.deps,m=b?.is_fork;if(x!==null){var p;if(m||ge(e,R),_!==null&&R>0)for(_.length=R+x.length,p=0;p<x.length;p++)_[R+p]=x[p];else e.deps=_=x;if(Mt()&&(e.f&k)!==0)for(p=R;p<_.length;p++)(_[p].reactions??=[]).push(e)}else!m&&_!==null&&R<_.length&&(ge(e,R),_.length=R);if(Te()&&O!==null&&!M&&_!==null&&(e.f&(g|P|T))===0)for(p=0;p<O.length;p++)Ut(O[p],e);if(s!==null&&s!==e){if(Q++,s.deps!==null)for(let D=0;D<n;D+=1)s.deps[D].rv=Q;if(t!==null)for(const D of t)D.rv=Q;O!==null&&(r===null?r=O:r.push(...O))}return(e.f&B)!==0&&(e.f^=B),c}catch(D){return bn(D)}finally{e.f^=Le,x=t,R=n,O=r,v=s,C=f,Re(o),M=l,ne=i}}function Hn(e,t){let n=t.reactions;if(n!==null){var r=Xt.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&(t.f&g)!==0&&(x===null||!oe.call(x,t))){var f=t;(f.f&k)!==0&&(f.f^=k,f.f&=~re),Ke(f),Rn(f),ge(f,0)}}function ge(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Hn(e,n[r])}function fe(e){var t=e.f;if((t&V)===0){w(e,y);var n=d,r=xe;d=e,xe=!0;try{(t&(K|Be))!==0?Ln(e):et(e),Lt(e);var s=zt(e);e.teardown=typeof s=="function"?s:null,e.wv=Vt;var f}finally{xe=r,d=n}}}async function os(){await Promise.resolve(),En()}function us(){return ae.ensure().settled()}function ee(e){var t=e.f,n=(t&g)!==0;if(v!==null&&!M){var r=d!==null&&(d.f&V)!==0;if(!r&&(C===null||!oe.call(C,e))){var s=v.deps;if((v.f&Le)!==0)e.rv<Q&&(e.rv=Q,x===null&&s!==null&&s[R]===e?R++:x===null?x=[e]:x.push(e));else{(v.deps??=[]).push(e);var f=e.reactions;f===null?e.reactions=[v]:oe.call(f,v)||f.push(v)}}}if(se&&U.has(e))return U.get(e);if(n){var o=e;if(se){var l=o.v;return((o.f&y)===0&&o.reactions!==null||$t(o))&&(l=Ze(o)),U.set(o,l),l}var i=(o.f&k)===0&&!M&&v!==null&&(xe||(v.f&k)!==0),a=(o.f&de)===0;pe(o)&&(i&&(o.f|=k),Rt(o)),i&&!a&&(Nt(o),Gt(o))}if(I?.has(e))return I.get(e);if((e.f&B)!==0)throw e.v;return e.v}function Gt(e){if(e.f|=k,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&g)!==0&&(t.f&k)===0&&(Nt(t),Gt(t))}function $t(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(U.has(t)||(t.f&g)!==0&&$t(t))return!0;return!1}function Me(e){var t=M;try{return M=!0,e()}finally{M=t}}function cs(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(te in e)Ve(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&te in n&&Ve(n)}}}function Ve(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{Ve(e[r],t)}catch{}const n=_t(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=Zt(n);for(let s in r){const f=r[s].get;if(f)try{f.call(e)}catch{}}}}}function Vn(e,t,n){if(e==null)return t(void 0),ye;const r=Me(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const le=[];function _s(e,t=ye){let n=null;const r=new Set;function s(l){if(bt(e,l)&&(e=l,n)){const i=!le.length;for(const a of r)a[1](),le.push(a,e);if(i){for(let a=0;a<le.length;a+=2)le[a][0](le[a+1]);le.length=0}}}function f(l){s(l(e))}function o(l,i=ye){const a=[l,i];return r.add(a),r.size===1&&(n=t(s,f)||ye),l(e),()=>{r.delete(a),r.size===0&&n&&(n(),n=null)}}return{set:s,update:f,subscribe:o}}function vs(e){let t;return Vn(e,n=>t=n)(),t}function Bn(e){h===null&&ze(),me&&h.l!==null?Un(h).m.push(e):Pn(()=>{const t=Me(e);if(typeof t=="function")return t})}function ds(e){h===null&&ze(),Bn(()=>()=>Me(e))}function Un(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}export{he as $,b as A,Zn as B,ht as C,is as D,lr as E,nr as F,zr as G,_n as H,An as I,Kt as J,zn as K,ir as L,ur as M,We as N,ar as O,as as P,Yn as Q,F as R,je as S,L as T,or as U,Cn as V,G as W,Z as X,Se as Y,cn as Z,tn as _,ts as a,wr as a$,Br as a0,Cr as a1,Pn as a2,Ur as a3,Lr as a4,h as a5,Zr as a6,Me as a7,Kn as a8,Qt as a9,Qr as aA,Ft as aB,En as aC,Bn as aD,os as aE,ds as aF,fs as aG,mr as aH,qr as aI,xt as aJ,dn as aK,_t as aL,gr as aM,Zt as aN,er as aO,$r as aP,E as aQ,Dn as aR,Jn as aS,Wt as aT,Xr as aU,ft as aV,Dr as aW,Ir as aX,Mt as aY,Fe as aZ,en as a_,Xe as aa,kr as ab,rs as ac,On as ad,ye as ae,Vn as af,vs as ag,Mn as ah,Gn as ai,we as aj,sr as ak,vr as al,se as am,d as an,V as ao,dr as ap,me as aq,_r as ar,cr as as,$n as at,te as au,Wn as av,hr as aw,Yr as ax,ve as ay,ls as az,Fr as b,ae as b0,w as b1,T as b2,Y as b3,P as b4,yn as b5,$ as b6,Re as b7,bn as b8,v as b9,Wr as bA,_s as bB,us as bC,Ne as ba,fr as bb,Tr as bc,Qe as bd,Gr as be,kn as bf,pr as bg,br as bh,Ce as bi,Je as bj,de as bk,Hr as bl,Ge as bm,rr as bn,Jr as bo,$e as bp,tr as bq,yr as br,Kr as bs,Xn as bt,jn as bu,Er as bv,lt as bw,Te as bx,ne as by,Mr as bz,Vr as c,cs as d,q as e,be as f,ee as g,Oe as h,ss as i,z as j,ce as k,es as l,jr as m,Rr as n,ke as o,Pr as p,xr as q,Sr as r,H as s,ns as t,Or as u,Nr as v,Ar as w,S as x,vn as y,He as z};
@@ -1 +1 @@
1
- import{a,b as G,o as ye,e as Ct,g as Me,c as b,d as Ee,t as he,s as Yt,f as Ft}from"./COik51fd.js";import{p as fe,c as J,r as Y,t as K,b as ve,e as A,f as we,a2 as ht,s as r,g as e,a7 as Xt,aD as xe,a3 as Lt,a4 as l,ae as lt,a0 as h}from"./BenpwI6m.js";import{i as B,b as Ie}from"./Dvv4bkXH.js";import{e as ue}from"./h2NtTN7K.js";import{b as y,c as le,s as p,a as Pe,S as Ae}from"./CStpN6HQ.js";import{p as T,s as ce,r as Ce}from"./wWaI7EIw.js";import{a as O,c as it,s as Le,S as He}from"./kNXMTe11.js";import{c as Tt}from"./CbwDFpOn.js";import{c as st,s as rt}from"./CieeblIr.js";import"./BSBiehHY.js";const Oe=Array(12).fill(0);var ke=G('<div class="sonner-loading-bar"></div>'),Ne=G('<div><div class="sonner-spinner"></div></div>');function Re(_,t){fe(t,!0);var C=Ne(),k=J(C);ue(k,23,()=>Oe,($,tt)=>`spinner-bar-${tt}`,($,tt)=>{var ct=ke();a($,ct)}),Y(k),Y(C),K($=>{rt(C,1,$),y(C,"data-visible",t.visible)},[()=>st(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),a(_,C),ve()}function Zt(_){return _.label!==void 0}function Fe(){let _=A(we(typeof document<"u"?document.hidden:!1));return ht(()=>ye(document,"visibilitychange",()=>{r(_,document.hidden,!0)})),{get current(){return e(_)}}}const be=4e3,ze=14,We=45,Ue=200,Ve=.05,je={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function Ke(_){const[t,C]=_.split("-"),k=[];return t&&k.push(t),C&&k.push(C),k}function _e(_){return 1/(1.5+Math.abs(_)/20)}var Ye=G("<div><!></div>"),Ze=G('<button data-close-button=""><!></button>'),Ge=G('<div data-icon=""><!> <!></div>'),Xe=G('<div data-description=""><!></div>'),Qe=G('<button data-button="" data-cancel=""> </button>'),qe=G('<button data-button=""> </button>'),Je=G('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),pe=G('<li aria-atomic="true" data-sonner-toast=""><!> <!></li>');function $e(_,t){fe(t,!0);const C=s=>{var c=b(),v=h(c);{var w=g=>{var L=Ye(),It=J(L);p(It,()=>t.loadingIcon),Y(L),K(Rt=>{rt(L,1,Rt),y(L,"data-visible",e(D)==="loading")},[()=>st(it(e(j)?.loader,t.toast?.classes?.loader,"sonner-loader"))]),a(g,L)},x=g=>{{let L=l(()=>it(e(j)?.loader,t.toast.classes?.loader)),It=l(()=>e(D)==="loading");Re(g,{get class(){return e(L)},get visible(){return e(It)}})}};B(v,g=>{t.loadingIcon?g(w):g(x,!1)})}a(s,c)};let k=T(t,"cancelButtonStyle",3,""),$=T(t,"actionButtonStyle",3,""),tt=T(t,"descriptionClass",3,""),ct=T(t,"unstyled",3,!1),Bt=T(t,"defaultRichColors",3,!1);const Dt={...je};let V=A(!1),N=A(!1),St=A(!1),Ht=A(!1),Ot=A(!1),W=A(0),dt=A(0),Mt=t.toast.duration||t.duration||be,Z=A(void 0),et=A(null),kt=A(null);const Qt=l(()=>t.index===0),qt=l(()=>t.index+1<=t.visibleToasts),D=l(()=>t.toast.type),U=l(()=>t.toast.dismissible!==void 0?t.toast.dismissible!==!1:t.toast.dismissable!==!1),Et=l(()=>t.toast.class||""),yt=l(()=>t.toast.descriptionClass||""),ut=l(()=>O.heights.findIndex(s=>s.toastId===t.toast.id)||0),ft=l(()=>t.toast.closeButton??t.closeButton),wt=l(()=>t.toast.duration??t.duration??be);let bt=null;const zt=l(()=>t.position.split("-")),Jt=l(()=>O.heights.reduce((s,c,v)=>v>=e(ut)?s:s+c.height,0)),pt=Fe(),$t=l(()=>t.toast.invert||t.invert),Nt=l(()=>e(D)==="loading"),j=l(()=>({...Dt,...t.classes})),te=l(()=>t.toast.title),ee=l(()=>t.toast.description);let vt=A(0),Wt=A(0);const Pt=l(()=>Math.round(e(ut)*ze+e(Jt)));ht(()=>{e(te),e(ee);let s;t.expanded||t.expandByDefault?s=1:s=1-t.index*Ve;const c=Xt(()=>e(Z));if(c===void 0)return;c.style.setProperty("height","auto");const v=c.offsetHeight,w=c.getBoundingClientRect().height,x=Math.round(w/s+Number.EPSILON&100)/100;c.style.removeProperty("height");let g;Math.abs(x-v)<1?g=x:g=v,r(dt,g,!0),O.setHeight({toastId:t.toast.id,height:g})});function n(){r(N,!0),r(W,e(Pt),!0),O.removeHeight(t.toast.id),setTimeout(()=>{O.remove(t.toast.id)},Ue)}let M;const nt=l(()=>t.toast.promise&&e(D)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function at(){r(vt,new Date().getTime(),!0),M=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),n()},Mt)}function xt(){if(e(Wt)<e(vt)){const s=new Date().getTime()-e(vt);Mt=Mt-s}r(Wt,new Date().getTime(),!0)}ht(()=>{t.toast.updated&&(clearTimeout(M),Mt=e(wt),at())}),ht(()=>(e(nt)||(t.expanded||t.interacting||t.pauseWhenPageIsHidden&&pt.current?xt():at()),()=>clearTimeout(M))),xe(()=>{r(V,!0);const s=e(Z)?.getBoundingClientRect().height;return r(dt,s,!0),O.setHeight({toastId:t.toast.id,height:s}),()=>{O.removeHeight(t.toast.id)}}),ht(()=>{t.toast.delete&&Xt(()=>{n(),t.toast.onDismiss?.(t.toast)})});const ne=s=>{if(e(Nt))return;r(W,e(Pt),!0);const c=s.target;c.setPointerCapture(s.pointerId),c.tagName!=="BUTTON"&&(r(St,!0),bt={x:s.clientX,y:s.clientY})},me=()=>{if(e(Ht)||!e(U))return;bt=null;const s=Number(e(Z)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),c=Number(e(Z)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),v=new Date().getTime()-0,w=e(et)==="x"?s:c,x=Math.abs(w)/v;if(Math.abs(w)>=We||x>.11){r(W,e(Pt),!0),t.toast.onDismiss?.(t.toast),e(et)==="x"?r(kt,s>0?"right":"left",!0):r(kt,c>0?"down":"up",!0),n(),r(Ht,!0);return}else e(Z)?.style.setProperty("--swipe-amount-x","0px"),e(Z)?.style.setProperty("--swipe-amount-y","0px");r(Ot,!1),r(St,!1),r(et,null)},Ut=s=>{if(!bt||!e(U)||(window.getSelection()?.toString().length??-1)>0)return;const v=s.clientY-bt.y,w=s.clientX-bt.x,x=t.swipeDirections??Ke(t.position);!e(et)&&(Math.abs(w)>1||Math.abs(v)>1)&&r(et,Math.abs(w)>Math.abs(v)?"x":"y",!0);let g={x:0,y:0};if(e(et)==="y"){if(x.includes("top")||x.includes("bottom"))if(x.includes("top")&&v<0||x.includes("bottom")&&v>0)g.y=v;else{const L=v*_e(v);g.y=Math.abs(L)<Math.abs(v)?L:v}}else if(e(et)==="x"&&(x.includes("left")||x.includes("right")))if(x.includes("left")&&w<0||x.includes("right")&&w>0)g.x=w;else{const L=w*_e(w);g.x=Math.abs(L)<Math.abs(w)?L:w}(Math.abs(g.x)>0||Math.abs(g.y)>0)&&r(Ot,!0),e(Z)?.style.setProperty("--swipe-amount-x",`${g.x}px`),e(Z)?.style.setProperty("--swipe-amount-y",`${g.y}px`)},ot=()=>{r(St,!1),r(et,null),bt=null},mt=l(()=>t.toast.icon?t.toast.icon:e(D)==="success"?t.successIcon:e(D)==="error"?t.errorIcon:e(D)==="warning"?t.warningIcon:e(D)==="info"?t.infoIcon:e(D)==="loading"?t.loadingIcon:null);var i=pe();y(i,"tabindex",0);let At;var Vt=J(i);{var ge=s=>{var c=Ze(),v=J(c);p(v,()=>t.closeIcon??lt),Y(c),K(w=>{y(c,"aria-label",t.closeButtonAriaLabel),y(c,"data-disabled",e(Nt)),rt(c,1,w)},[()=>st(it(e(j)?.closeButton,t.toast?.classes?.closeButton))]),Ct("click",c,()=>{e(Nt)||!e(U)||(n(),t.toast.onDismiss?.(t.toast))}),a(s,c)};B(Vt,s=>{e(ft)&&!t.toast.component&&e(D)!=="loading"&&t.closeIcon!==null&&s(ge)})}var ae=Lt(Vt,2);{var oe=s=>{const c=l(()=>t.toast.component);var v=b(),w=h(v);Tt(w,()=>e(c),(x,g)=>{g(x,ce(()=>t.toast.componentProps,{closeToast:n}))}),a(s,v)},ie=s=>{var c=Je(),v=h(c);{var w=u=>{var m=Ge(),o=J(m);{var I=d=>{var f=b(),z=h(f);{var E=_t=>{var Kt=b(),re=h(Kt);Tt(re,()=>t.toast.icon,(H,F)=>{F(H,{})}),a(_t,Kt)},q=_t=>{C(_t)};B(z,_t=>{t.toast.icon?_t(E):_t(q,!1)})}a(d,f)};B(o,d=>{(t.toast.promise||e(D)==="loading")&&d(I)})}var P=Lt(o,2);{var S=d=>{var f=b(),z=h(f);{var E=H=>{var F=b(),gt=h(F);Tt(gt,()=>t.toast.icon,(De,Se)=>{Se(De,{})}),a(H,F)},q=H=>{var F=b(),gt=h(F);p(gt,()=>t.successIcon??lt),a(H,F)},_t=H=>{var F=b(),gt=h(F);p(gt,()=>t.errorIcon??lt),a(H,F)},Kt=H=>{var F=b(),gt=h(F);p(gt,()=>t.warningIcon??lt),a(H,F)},re=H=>{var F=b(),gt=h(F);p(gt,()=>t.infoIcon??lt),a(H,F)};B(z,H=>{t.toast.icon?H(E):e(D)==="success"?H(q,1):e(D)==="error"?H(_t,2):e(D)==="warning"?H(Kt,3):e(D)==="info"&&H(re,4)})}a(d,f)};B(P,d=>{t.toast.type!=="loading"&&d(S)})}Y(m),K(d=>rt(m,1,d),[()=>st(it(e(j)?.icon,t.toast?.classes?.icon))]),a(u,m)};B(v,u=>{(e(D)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(e(mt)!==null||t.toast.icon)&&u(w)})}var x=Lt(v,2),g=J(x),L=J(g);{var It=u=>{var m=b(),o=h(m);{var I=S=>{const d=l(()=>t.toast.title);var f=b(),z=h(f);Tt(z,()=>e(d),(E,q)=>{q(E,ce(()=>t.toast.componentProps))}),a(S,f)},P=S=>{var d=he();K(()=>Yt(d,t.toast.title)),a(S,d)};B(o,S=>{typeof t.toast.title!="string"?S(I):S(P,!1)})}a(u,m)};B(L,u=>{t.toast.title&&u(It)})}Y(g);var Rt=Lt(g,2);{var se=u=>{var m=Xe(),o=J(m);{var I=S=>{const d=l(()=>t.toast.description);var f=b(),z=h(f);Tt(z,()=>e(d),(E,q)=>{q(E,ce(()=>t.toast.componentProps))}),a(S,f)},P=S=>{var d=he();K(()=>Yt(d,t.toast.description)),a(S,d)};B(o,S=>{typeof t.toast.description!="string"?S(I):S(P,!1)})}Y(m),K(S=>rt(m,1,S),[()=>st(it(tt(),e(yt),e(j)?.description,t.toast.classes?.description))]),a(u,m)};B(Rt,u=>{t.toast.description&&u(se)})}Y(x);var jt=Lt(x,2);{var X=u=>{var m=b(),o=h(m);{var I=d=>{var f=b(),z=h(f);Tt(z,()=>t.toast.cancel,(E,q)=>{q(E,{})}),a(d,f)},P=d=>{var f=Qe(),z=J(f,!0);Y(f),K(E=>{le(f,t.toast.cancelButtonStyle??k()),rt(f,1,E),Yt(z,t.toast.cancel.label)},[()=>st(it(e(j)?.cancelButton,t.toast?.classes?.cancelButton))]),Ct("click",f,E=>{Zt(t.toast.cancel)&&e(U)&&(t.toast.cancel?.onClick?.(E),n())}),a(d,f)},S=l(()=>Zt(t.toast.cancel));B(o,d=>{typeof t.toast.cancel=="function"?d(I):e(S)&&d(P,1)})}a(u,m)};B(jt,u=>{t.toast.cancel&&u(X)})}var R=Lt(jt,2);{var Q=u=>{var m=b(),o=h(m);{var I=d=>{var f=b(),z=h(f);Tt(z,()=>t.toast.action,(E,q)=>{q(E,{})}),a(d,f)},P=d=>{var f=qe(),z=J(f,!0);Y(f),K(E=>{le(f,t.toast.actionButtonStyle??$()),rt(f,1,E),Yt(z,t.toast.action.label)},[()=>st(it(e(j)?.actionButton,t.toast?.classes?.actionButton))]),Ct("click",f,E=>{Zt(t.toast.action)&&(t.toast.action?.onClick(E),!E.defaultPrevented&&n())}),a(d,f)},S=l(()=>Zt(t.toast.action));B(o,d=>{typeof t.toast.action=="function"?d(I):e(S)&&d(P,1)})}a(u,m)};B(R,u=>{t.toast.action&&u(Q)})}K((u,m)=>{rt(x,1,u),rt(g,1,m)},[()=>st(it(e(j)?.content,t.toast?.classes?.content)),()=>st(it(e(j)?.title,t.toast?.classes?.title))]),a(s,c)};B(ae,s=>{t.toast.component?s(oe):s(ie,!1)})}Y(i),Ie(i,s=>r(Z,s),()=>e(Z)),K((s,c,v)=>{rt(i,1,s),y(i,"aria-live",t.toast.important?"assertive":"polite"),y(i,"data-rich-colors",t.toast.richColors??Bt()),y(i,"data-styled",!(t.toast.component||t.toast.unstyled||ct())),y(i,"data-mounted",e(V)),y(i,"data-promise",c),y(i,"data-swiped",e(Ot)),y(i,"data-removed",e(N)),y(i,"data-visible",e(qt)),y(i,"data-y-position",e(zt)[0]),y(i,"data-x-position",e(zt)[1]),y(i,"data-index",t.index),y(i,"data-front",e(Qt)),y(i,"data-swiping",e(St)),y(i,"data-dismissible",e(U)),y(i,"data-type",e(D)),y(i,"data-invert",e($t)),y(i,"data-swipe-out",e(Ht)),y(i,"data-swipe-direction",e(kt)),y(i,"data-expanded",v),At=le(i,`${t.style} ${t.toast.style}`,At,{"--index":t.index,"--toasts-before":t.index,"--z-index":O.toasts.length-t.index,"--offset":`${e(N)?e(W):e(Pt)}px`,"--initial-height":t.expandByDefault?"auto":`${e(dt)}px`})},[()=>st(it(t.class,e(Et),e(j)?.toast,t.toast?.classes?.toast,e(j)?.[e(D)],t.toast?.classes?.[e(D)])),()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&e(V))]),Ct("pointermove",i,Ut),Ct("pointerup",i,me),Ct("pointerdown",i,ne),Me("dragend",i,ot),a(_,i),ve()}Ee(["pointermove","pointerup","pointerdown","click"]);var tn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="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" clip-rule="evenodd"></path></svg>');function en(_){var t=tn();a(_,t)}var nn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="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" clip-rule="evenodd"></path></svg>');function an(_){var t=nn();a(_,t)}var on=Ft('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function sn(_){var t=on();a(_,t)}var rn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="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" clip-rule="evenodd"></path></svg>');function ln(_){var t=rn();a(_,t)}var cn=Ft('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');function dn(_){var t=cn();a(_,t)}const un=3,Te="24px",Be="16px",fn=4e3,vn=356,mn=14,de="dark",Gt="light";function gn(_,t){const C={};return[_,t].forEach((k,$)=>{const tt=$===1,ct=tt?"--mobile-offset":"--offset",Bt=tt?Be:Te;function Dt(V){["top","right","bottom","left"].forEach(N=>{C[`${ct}-${N}`]=typeof V=="number"?`${V}px`:V})}typeof k=="number"||typeof k=="string"?Dt(k):typeof k=="object"?["top","right","bottom","left"].forEach(V=>{const N=k[V];N===void 0?C[`${ct}-${V}`]=Bt:C[`${ct}-${V}`]=typeof N=="number"?`${N}px`:N}):Dt(Bt)}),C}var hn=G("<ol></ol>"),bn=G('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');function En(_,t){fe(t,!0);function C(n){return n!=="system"?n:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?de:Gt}let k=T(t,"invert",3,!1),$=T(t,"position",3,"bottom-right"),tt=T(t,"hotkey",19,()=>["altKey","KeyT"]),ct=T(t,"expand",3,!1),Bt=T(t,"closeButton",3,!1),Dt=T(t,"offset",3,Te),V=T(t,"mobileOffset",3,Be),N=T(t,"theme",3,"light"),St=T(t,"richColors",3,!1),Ht=T(t,"duration",3,fn),Ot=T(t,"visibleToasts",3,un),W=T(t,"toastOptions",19,()=>({})),dt=T(t,"dir",7,"auto"),Mt=T(t,"gap",3,mn),Z=T(t,"pauseWhenPageIsHidden",3,!1),et=T(t,"containerAriaLabel",3,"Notifications"),kt=T(t,"closeButtonAriaLabel",3,"Close toast"),Qt=Ce(t,["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","pauseWhenPageIsHidden","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function qt(){if(dt()!=="auto")return dt();if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?(Xt(()=>dt(window.getComputedStyle(document.documentElement).direction??"ltr")),dt()):(Xt(()=>dt(n)),n)}const D=l(()=>Array.from(new Set([$(),...O.toasts.filter(n=>n.position).map(n=>n.position)].filter(Boolean))));let U=A(!1),Et=A(!1),yt=A(we(C(N()))),ut=A(void 0),ft=A(null),wt=A(!1);const bt=l(()=>tt().join("+").replace(/Key/g,"").replace(/Digit/g,""));ht(()=>{O.toasts.length<=1&&r(U,!1)}),ht(()=>{const n=O.toasts.filter(M=>M.dismiss&&!M.delete);if(n.length>0){const M=O.toasts.map(nt=>n.find(xt=>xt.id===nt.id)?{...nt,delete:!0}:nt);O.toasts=M}}),ht(()=>()=>{e(ut)&&e(ft)&&(e(ft).focus({preventScroll:!0}),r(ft,null),r(wt,!1))}),xe(()=>(O.reset(),ye(document,"keydown",M=>{tt().every(at=>M[at]||M.code===at)&&(r(U,!0),e(ut)?.focus()),M.code==="Escape"&&(document.activeElement===e(ut)||e(ut)?.contains(document.activeElement))&&r(U,!1)}))),ht(()=>{if(N()!=="system"&&r(yt,N()),typeof window<"u"){N()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?r(yt,de):r(yt,Gt));const n=window.matchMedia("(prefers-color-scheme: dark)"),M=({matches:nt})=>{N()==="system"&&r(yt,nt?de:Gt,!0)};"addEventListener"in n?n.addEventListener("change",M):n.addListener(M)}});const zt=n=>{t.onblur?.(n),e(wt)&&!n.currentTarget.contains(n.relatedTarget)&&(r(wt,!1),e(ft)&&(e(ft).focus({preventScroll:!0}),r(ft,null)))},Jt=n=>{t.onfocus?.(n),!(n.target instanceof HTMLElement&&n.target.dataset.dismissible==="false")&&(e(wt)||(r(wt,!0),r(ft,n.relatedTarget,!0)))},pt=n=>{t.onpointerdown?.(n),!(n.target instanceof HTMLElement&&n.target.dataset.dismissible==="false")&&r(Et,!0)},$t=n=>{t.onmouseenter?.(n),r(U,!0)},Nt=n=>{t.onmouseleave?.(n),e(Et)||r(U,!1)},j=n=>{t.onmousemove?.(n),r(U,!0)},te=n=>{t.ondragend?.(n),r(U,!1)},ee=n=>{t.onpointerup?.(n),r(Et,!1)};Le.set(new He);var vt=bn();y(vt,"tabindex",-1);var Wt=J(vt);{var Pt=n=>{var M=b(),nt=h(M);ue(nt,18,()=>e(D),at=>at,(at,xt,ne,me)=>{const Ut=l(()=>{const[i,At]=xt.split("-");return{y:i,x:At}}),ot=l(()=>gn(Dt(),V()));var mt=hn();Pe(mt,i=>({tabindex:-1,dir:i,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":e(yt),"data-y-position":e(Ut).y,"data-x-position":e(Ut).x,style:t.style,onblur:zt,onfocus:Jt,onmouseenter:$t,onmousemove:j,onmouseleave:Nt,ondragend:te,onpointerdown:pt,onpointerup:ee,...Qt,[Ae]:{"--front-toast-height":`${O.heights[0]?.height}px`,"--width":`${vn}px`,"--gap":`${Mt()}px`,"--offset-top":e(ot)["--offset-top"],"--offset-right":e(ot)["--offset-right"],"--offset-bottom":e(ot)["--offset-bottom"],"--offset-left":e(ot)["--offset-left"],"--mobile-offset-top":e(ot)["--mobile-offset-top"],"--mobile-offset-right":e(ot)["--mobile-offset-right"],"--mobile-offset-bottom":e(ot)["--mobile-offset-bottom"],"--mobile-offset-left":e(ot)["--mobile-offset-left"]}}),[qt],void 0,void 0,"svelte-nbs0zk"),ue(mt,23,()=>O.toasts.filter(i=>!i.position&&e(ne)===0||i.position===xt),i=>i.id,(i,At,Vt,ge)=>{{const ae=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.successIcon??lt),a(o,I)},m=o=>{en(o)};B(Q,o=>{t.successIcon?o(u):t.successIcon!==null&&o(m,1)})}a(X,R)},oe=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.errorIcon??lt),a(o,I)},m=o=>{an(o)};B(Q,o=>{t.errorIcon?o(u):t.errorIcon!==null&&o(m,1)})}a(X,R)},ie=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.warningIcon??lt),a(o,I)},m=o=>{sn(o)};B(Q,o=>{t.warningIcon?o(u):t.warningIcon!==null&&o(m,1)})}a(X,R)},s=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.infoIcon??lt),a(o,I)},m=o=>{ln(o)};B(Q,o=>{t.infoIcon?o(u):t.infoIcon!==null&&o(m,1)})}a(X,R)},c=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.closeIcon??lt),a(o,I)},m=o=>{dn(o)};B(Q,o=>{t.closeIcon?o(u):t.closeIcon!==null&&o(m,1)})}a(X,R)};let v=l(()=>W()?.duration??Ht()),w=l(()=>W()?.class??""),x=l(()=>W()?.descriptionClass||""),g=l(()=>W()?.style??""),L=l(()=>W().classes||{}),It=l(()=>W().unstyled??!1),Rt=l(()=>W()?.cancelButtonStyle??""),se=l(()=>W()?.actionButtonStyle??""),jt=l(()=>W()?.closeButtonAriaLabel??kt());$e(i,{get index(){return e(Vt)},get toast(){return e(At)},get defaultRichColors(){return St()},get duration(){return e(v)},get class(){return e(w)},get descriptionClass(){return e(x)},get invert(){return k()},get visibleToasts(){return Ot()},get closeButton(){return Bt()},get interacting(){return e(Et)},get position(){return xt},get style(){return e(g)},get classes(){return e(L)},get unstyled(){return e(It)},get cancelButtonStyle(){return e(Rt)},get actionButtonStyle(){return e(se)},get closeButtonAriaLabel(){return e(jt)},get expandByDefault(){return ct()},get expanded(){return e(U)},get pauseWhenPageIsHidden(){return Z()},get loadingIcon(){return t.loadingIcon},successIcon:ae,errorIcon:oe,warningIcon:ie,infoIcon:s,closeIcon:c,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),Y(mt),Ie(mt,i=>r(ut,i),()=>e(ut)),K(()=>mt.dir=mt.dir),a(at,mt)}),a(n,M)};B(Wt,n=>{O.toasts.length>0&&n(Pt)})}Y(vt),K(()=>y(vt,"aria-label",`${et()??""} ${e(bt)??""}`)),a(_,vt),ve()}export{Re as L,En as T};
1
+ import{a,b as G,o as ye,e as Ct,g as Me,c as b,d as Ee,t as he,s as Yt,f as Ft}from"./usxM-xOh.js";import{p as fe,c as J,r as Y,t as K,b as ve,e as A,f as we,a2 as ht,s as r,g as e,a7 as Xt,aD as xe,a3 as Lt,a4 as l,ae as lt,a0 as h}from"./CCA2E2CK.js";import{i as B,b as Ie}from"./yUs562n0.js";import{e as ue}from"./BpdrS9kL.js";import{b as y,c as le,s as p,a as Pe,S as Ae}from"./DkuxRPZv.js";import{p as T,s as ce,r as Ce}from"./DHholpIc.js";import{a as O,c as it,s as Le,S as He}from"./CtOfM9NX.js";import{c as Tt}from"./NuvuAeCX.js";import{c as st,s as rt}from"./BKHfe9E-.js";import"./DIBaaeCL.js";const Oe=Array(12).fill(0);var ke=G('<div class="sonner-loading-bar"></div>'),Ne=G('<div><div class="sonner-spinner"></div></div>');function Re(_,t){fe(t,!0);var C=Ne(),k=J(C);ue(k,23,()=>Oe,($,tt)=>`spinner-bar-${tt}`,($,tt)=>{var ct=ke();a($,ct)}),Y(k),Y(C),K($=>{rt(C,1,$),y(C,"data-visible",t.visible)},[()=>st(["sonner-loading-wrapper",t.class].filter(Boolean).join(" "))]),a(_,C),ve()}function Zt(_){return _.label!==void 0}function Fe(){let _=A(we(typeof document<"u"?document.hidden:!1));return ht(()=>ye(document,"visibilitychange",()=>{r(_,document.hidden,!0)})),{get current(){return e(_)}}}const be=4e3,ze=14,We=45,Ue=200,Ve=.05,je={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function Ke(_){const[t,C]=_.split("-"),k=[];return t&&k.push(t),C&&k.push(C),k}function _e(_){return 1/(1.5+Math.abs(_)/20)}var Ye=G("<div><!></div>"),Ze=G('<button data-close-button=""><!></button>'),Ge=G('<div data-icon=""><!> <!></div>'),Xe=G('<div data-description=""><!></div>'),Qe=G('<button data-button="" data-cancel=""> </button>'),qe=G('<button data-button=""> </button>'),Je=G('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),pe=G('<li aria-atomic="true" data-sonner-toast=""><!> <!></li>');function $e(_,t){fe(t,!0);const C=s=>{var c=b(),v=h(c);{var w=g=>{var L=Ye(),It=J(L);p(It,()=>t.loadingIcon),Y(L),K(Rt=>{rt(L,1,Rt),y(L,"data-visible",e(D)==="loading")},[()=>st(it(e(j)?.loader,t.toast?.classes?.loader,"sonner-loader"))]),a(g,L)},x=g=>{{let L=l(()=>it(e(j)?.loader,t.toast.classes?.loader)),It=l(()=>e(D)==="loading");Re(g,{get class(){return e(L)},get visible(){return e(It)}})}};B(v,g=>{t.loadingIcon?g(w):g(x,!1)})}a(s,c)};let k=T(t,"cancelButtonStyle",3,""),$=T(t,"actionButtonStyle",3,""),tt=T(t,"descriptionClass",3,""),ct=T(t,"unstyled",3,!1),Bt=T(t,"defaultRichColors",3,!1);const Dt={...je};let V=A(!1),N=A(!1),St=A(!1),Ht=A(!1),Ot=A(!1),W=A(0),dt=A(0),Mt=t.toast.duration||t.duration||be,Z=A(void 0),et=A(null),kt=A(null);const Qt=l(()=>t.index===0),qt=l(()=>t.index+1<=t.visibleToasts),D=l(()=>t.toast.type),U=l(()=>t.toast.dismissible!==void 0?t.toast.dismissible!==!1:t.toast.dismissable!==!1),Et=l(()=>t.toast.class||""),yt=l(()=>t.toast.descriptionClass||""),ut=l(()=>O.heights.findIndex(s=>s.toastId===t.toast.id)||0),ft=l(()=>t.toast.closeButton??t.closeButton),wt=l(()=>t.toast.duration??t.duration??be);let bt=null;const zt=l(()=>t.position.split("-")),Jt=l(()=>O.heights.reduce((s,c,v)=>v>=e(ut)?s:s+c.height,0)),pt=Fe(),$t=l(()=>t.toast.invert||t.invert),Nt=l(()=>e(D)==="loading"),j=l(()=>({...Dt,...t.classes})),te=l(()=>t.toast.title),ee=l(()=>t.toast.description);let vt=A(0),Wt=A(0);const Pt=l(()=>Math.round(e(ut)*ze+e(Jt)));ht(()=>{e(te),e(ee);let s;t.expanded||t.expandByDefault?s=1:s=1-t.index*Ve;const c=Xt(()=>e(Z));if(c===void 0)return;c.style.setProperty("height","auto");const v=c.offsetHeight,w=c.getBoundingClientRect().height,x=Math.round(w/s+Number.EPSILON&100)/100;c.style.removeProperty("height");let g;Math.abs(x-v)<1?g=x:g=v,r(dt,g,!0),O.setHeight({toastId:t.toast.id,height:g})});function n(){r(N,!0),r(W,e(Pt),!0),O.removeHeight(t.toast.id),setTimeout(()=>{O.remove(t.toast.id)},Ue)}let M;const nt=l(()=>t.toast.promise&&e(D)==="loading"||t.toast.duration===Number.POSITIVE_INFINITY);function at(){r(vt,new Date().getTime(),!0),M=setTimeout(()=>{t.toast.onAutoClose?.(t.toast),n()},Mt)}function xt(){if(e(Wt)<e(vt)){const s=new Date().getTime()-e(vt);Mt=Mt-s}r(Wt,new Date().getTime(),!0)}ht(()=>{t.toast.updated&&(clearTimeout(M),Mt=e(wt),at())}),ht(()=>(e(nt)||(t.expanded||t.interacting||t.pauseWhenPageIsHidden&&pt.current?xt():at()),()=>clearTimeout(M))),xe(()=>{r(V,!0);const s=e(Z)?.getBoundingClientRect().height;return r(dt,s,!0),O.setHeight({toastId:t.toast.id,height:s}),()=>{O.removeHeight(t.toast.id)}}),ht(()=>{t.toast.delete&&Xt(()=>{n(),t.toast.onDismiss?.(t.toast)})});const ne=s=>{if(e(Nt))return;r(W,e(Pt),!0);const c=s.target;c.setPointerCapture(s.pointerId),c.tagName!=="BUTTON"&&(r(St,!0),bt={x:s.clientX,y:s.clientY})},me=()=>{if(e(Ht)||!e(U))return;bt=null;const s=Number(e(Z)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),c=Number(e(Z)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),v=new Date().getTime()-0,w=e(et)==="x"?s:c,x=Math.abs(w)/v;if(Math.abs(w)>=We||x>.11){r(W,e(Pt),!0),t.toast.onDismiss?.(t.toast),e(et)==="x"?r(kt,s>0?"right":"left",!0):r(kt,c>0?"down":"up",!0),n(),r(Ht,!0);return}else e(Z)?.style.setProperty("--swipe-amount-x","0px"),e(Z)?.style.setProperty("--swipe-amount-y","0px");r(Ot,!1),r(St,!1),r(et,null)},Ut=s=>{if(!bt||!e(U)||(window.getSelection()?.toString().length??-1)>0)return;const v=s.clientY-bt.y,w=s.clientX-bt.x,x=t.swipeDirections??Ke(t.position);!e(et)&&(Math.abs(w)>1||Math.abs(v)>1)&&r(et,Math.abs(w)>Math.abs(v)?"x":"y",!0);let g={x:0,y:0};if(e(et)==="y"){if(x.includes("top")||x.includes("bottom"))if(x.includes("top")&&v<0||x.includes("bottom")&&v>0)g.y=v;else{const L=v*_e(v);g.y=Math.abs(L)<Math.abs(v)?L:v}}else if(e(et)==="x"&&(x.includes("left")||x.includes("right")))if(x.includes("left")&&w<0||x.includes("right")&&w>0)g.x=w;else{const L=w*_e(w);g.x=Math.abs(L)<Math.abs(w)?L:w}(Math.abs(g.x)>0||Math.abs(g.y)>0)&&r(Ot,!0),e(Z)?.style.setProperty("--swipe-amount-x",`${g.x}px`),e(Z)?.style.setProperty("--swipe-amount-y",`${g.y}px`)},ot=()=>{r(St,!1),r(et,null),bt=null},mt=l(()=>t.toast.icon?t.toast.icon:e(D)==="success"?t.successIcon:e(D)==="error"?t.errorIcon:e(D)==="warning"?t.warningIcon:e(D)==="info"?t.infoIcon:e(D)==="loading"?t.loadingIcon:null);var i=pe();y(i,"tabindex",0);let At;var Vt=J(i);{var ge=s=>{var c=Ze(),v=J(c);p(v,()=>t.closeIcon??lt),Y(c),K(w=>{y(c,"aria-label",t.closeButtonAriaLabel),y(c,"data-disabled",e(Nt)),rt(c,1,w)},[()=>st(it(e(j)?.closeButton,t.toast?.classes?.closeButton))]),Ct("click",c,()=>{e(Nt)||!e(U)||(n(),t.toast.onDismiss?.(t.toast))}),a(s,c)};B(Vt,s=>{e(ft)&&!t.toast.component&&e(D)!=="loading"&&t.closeIcon!==null&&s(ge)})}var ae=Lt(Vt,2);{var oe=s=>{const c=l(()=>t.toast.component);var v=b(),w=h(v);Tt(w,()=>e(c),(x,g)=>{g(x,ce(()=>t.toast.componentProps,{closeToast:n}))}),a(s,v)},ie=s=>{var c=Je(),v=h(c);{var w=u=>{var m=Ge(),o=J(m);{var I=d=>{var f=b(),z=h(f);{var E=_t=>{var Kt=b(),re=h(Kt);Tt(re,()=>t.toast.icon,(H,F)=>{F(H,{})}),a(_t,Kt)},q=_t=>{C(_t)};B(z,_t=>{t.toast.icon?_t(E):_t(q,!1)})}a(d,f)};B(o,d=>{(t.toast.promise||e(D)==="loading")&&d(I)})}var P=Lt(o,2);{var S=d=>{var f=b(),z=h(f);{var E=H=>{var F=b(),gt=h(F);Tt(gt,()=>t.toast.icon,(De,Se)=>{Se(De,{})}),a(H,F)},q=H=>{var F=b(),gt=h(F);p(gt,()=>t.successIcon??lt),a(H,F)},_t=H=>{var F=b(),gt=h(F);p(gt,()=>t.errorIcon??lt),a(H,F)},Kt=H=>{var F=b(),gt=h(F);p(gt,()=>t.warningIcon??lt),a(H,F)},re=H=>{var F=b(),gt=h(F);p(gt,()=>t.infoIcon??lt),a(H,F)};B(z,H=>{t.toast.icon?H(E):e(D)==="success"?H(q,1):e(D)==="error"?H(_t,2):e(D)==="warning"?H(Kt,3):e(D)==="info"&&H(re,4)})}a(d,f)};B(P,d=>{t.toast.type!=="loading"&&d(S)})}Y(m),K(d=>rt(m,1,d),[()=>st(it(e(j)?.icon,t.toast?.classes?.icon))]),a(u,m)};B(v,u=>{(e(D)||t.toast.icon||t.toast.promise)&&t.toast.icon!==null&&(e(mt)!==null||t.toast.icon)&&u(w)})}var x=Lt(v,2),g=J(x),L=J(g);{var It=u=>{var m=b(),o=h(m);{var I=S=>{const d=l(()=>t.toast.title);var f=b(),z=h(f);Tt(z,()=>e(d),(E,q)=>{q(E,ce(()=>t.toast.componentProps))}),a(S,f)},P=S=>{var d=he();K(()=>Yt(d,t.toast.title)),a(S,d)};B(o,S=>{typeof t.toast.title!="string"?S(I):S(P,!1)})}a(u,m)};B(L,u=>{t.toast.title&&u(It)})}Y(g);var Rt=Lt(g,2);{var se=u=>{var m=Xe(),o=J(m);{var I=S=>{const d=l(()=>t.toast.description);var f=b(),z=h(f);Tt(z,()=>e(d),(E,q)=>{q(E,ce(()=>t.toast.componentProps))}),a(S,f)},P=S=>{var d=he();K(()=>Yt(d,t.toast.description)),a(S,d)};B(o,S=>{typeof t.toast.description!="string"?S(I):S(P,!1)})}Y(m),K(S=>rt(m,1,S),[()=>st(it(tt(),e(yt),e(j)?.description,t.toast.classes?.description))]),a(u,m)};B(Rt,u=>{t.toast.description&&u(se)})}Y(x);var jt=Lt(x,2);{var X=u=>{var m=b(),o=h(m);{var I=d=>{var f=b(),z=h(f);Tt(z,()=>t.toast.cancel,(E,q)=>{q(E,{})}),a(d,f)},P=d=>{var f=Qe(),z=J(f,!0);Y(f),K(E=>{le(f,t.toast.cancelButtonStyle??k()),rt(f,1,E),Yt(z,t.toast.cancel.label)},[()=>st(it(e(j)?.cancelButton,t.toast?.classes?.cancelButton))]),Ct("click",f,E=>{Zt(t.toast.cancel)&&e(U)&&(t.toast.cancel?.onClick?.(E),n())}),a(d,f)},S=l(()=>Zt(t.toast.cancel));B(o,d=>{typeof t.toast.cancel=="function"?d(I):e(S)&&d(P,1)})}a(u,m)};B(jt,u=>{t.toast.cancel&&u(X)})}var R=Lt(jt,2);{var Q=u=>{var m=b(),o=h(m);{var I=d=>{var f=b(),z=h(f);Tt(z,()=>t.toast.action,(E,q)=>{q(E,{})}),a(d,f)},P=d=>{var f=qe(),z=J(f,!0);Y(f),K(E=>{le(f,t.toast.actionButtonStyle??$()),rt(f,1,E),Yt(z,t.toast.action.label)},[()=>st(it(e(j)?.actionButton,t.toast?.classes?.actionButton))]),Ct("click",f,E=>{Zt(t.toast.action)&&(t.toast.action?.onClick(E),!E.defaultPrevented&&n())}),a(d,f)},S=l(()=>Zt(t.toast.action));B(o,d=>{typeof t.toast.action=="function"?d(I):e(S)&&d(P,1)})}a(u,m)};B(R,u=>{t.toast.action&&u(Q)})}K((u,m)=>{rt(x,1,u),rt(g,1,m)},[()=>st(it(e(j)?.content,t.toast?.classes?.content)),()=>st(it(e(j)?.title,t.toast?.classes?.title))]),a(s,c)};B(ae,s=>{t.toast.component?s(oe):s(ie,!1)})}Y(i),Ie(i,s=>r(Z,s),()=>e(Z)),K((s,c,v)=>{rt(i,1,s),y(i,"aria-live",t.toast.important?"assertive":"polite"),y(i,"data-rich-colors",t.toast.richColors??Bt()),y(i,"data-styled",!(t.toast.component||t.toast.unstyled||ct())),y(i,"data-mounted",e(V)),y(i,"data-promise",c),y(i,"data-swiped",e(Ot)),y(i,"data-removed",e(N)),y(i,"data-visible",e(qt)),y(i,"data-y-position",e(zt)[0]),y(i,"data-x-position",e(zt)[1]),y(i,"data-index",t.index),y(i,"data-front",e(Qt)),y(i,"data-swiping",e(St)),y(i,"data-dismissible",e(U)),y(i,"data-type",e(D)),y(i,"data-invert",e($t)),y(i,"data-swipe-out",e(Ht)),y(i,"data-swipe-direction",e(kt)),y(i,"data-expanded",v),At=le(i,`${t.style} ${t.toast.style}`,At,{"--index":t.index,"--toasts-before":t.index,"--z-index":O.toasts.length-t.index,"--offset":`${e(N)?e(W):e(Pt)}px`,"--initial-height":t.expandByDefault?"auto":`${e(dt)}px`})},[()=>st(it(t.class,e(Et),e(j)?.toast,t.toast?.classes?.toast,e(j)?.[e(D)],t.toast?.classes?.[e(D)])),()=>!!t.toast.promise,()=>!!(t.expanded||t.expandByDefault&&e(V))]),Ct("pointermove",i,Ut),Ct("pointerup",i,me),Ct("pointerdown",i,ne),Me("dragend",i,ot),a(_,i),ve()}Ee(["pointermove","pointerup","pointerdown","click"]);var tn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="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" clip-rule="evenodd"></path></svg>');function en(_){var t=tn();a(_,t)}var nn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="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" clip-rule="evenodd"></path></svg>');function an(_){var t=nn();a(_,t)}var on=Ft('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function sn(_){var t=on();a(_,t)}var rn=Ft('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="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" clip-rule="evenodd"></path></svg>');function ln(_){var t=rn();a(_,t)}var cn=Ft('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');function dn(_){var t=cn();a(_,t)}const un=3,Te="24px",Be="16px",fn=4e3,vn=356,mn=14,de="dark",Gt="light";function gn(_,t){const C={};return[_,t].forEach((k,$)=>{const tt=$===1,ct=tt?"--mobile-offset":"--offset",Bt=tt?Be:Te;function Dt(V){["top","right","bottom","left"].forEach(N=>{C[`${ct}-${N}`]=typeof V=="number"?`${V}px`:V})}typeof k=="number"||typeof k=="string"?Dt(k):typeof k=="object"?["top","right","bottom","left"].forEach(V=>{const N=k[V];N===void 0?C[`${ct}-${V}`]=Bt:C[`${ct}-${V}`]=typeof N=="number"?`${N}px`:N}):Dt(Bt)}),C}var hn=G("<ol></ol>"),bn=G('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');function En(_,t){fe(t,!0);function C(n){return n!=="system"?n:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?de:Gt}let k=T(t,"invert",3,!1),$=T(t,"position",3,"bottom-right"),tt=T(t,"hotkey",19,()=>["altKey","KeyT"]),ct=T(t,"expand",3,!1),Bt=T(t,"closeButton",3,!1),Dt=T(t,"offset",3,Te),V=T(t,"mobileOffset",3,Be),N=T(t,"theme",3,"light"),St=T(t,"richColors",3,!1),Ht=T(t,"duration",3,fn),Ot=T(t,"visibleToasts",3,un),W=T(t,"toastOptions",19,()=>({})),dt=T(t,"dir",7,"auto"),Mt=T(t,"gap",3,mn),Z=T(t,"pauseWhenPageIsHidden",3,!1),et=T(t,"containerAriaLabel",3,"Notifications"),kt=T(t,"closeButtonAriaLabel",3,"Close toast"),Qt=Ce(t,["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","pauseWhenPageIsHidden","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function qt(){if(dt()!=="auto")return dt();if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?(Xt(()=>dt(window.getComputedStyle(document.documentElement).direction??"ltr")),dt()):(Xt(()=>dt(n)),n)}const D=l(()=>Array.from(new Set([$(),...O.toasts.filter(n=>n.position).map(n=>n.position)].filter(Boolean))));let U=A(!1),Et=A(!1),yt=A(we(C(N()))),ut=A(void 0),ft=A(null),wt=A(!1);const bt=l(()=>tt().join("+").replace(/Key/g,"").replace(/Digit/g,""));ht(()=>{O.toasts.length<=1&&r(U,!1)}),ht(()=>{const n=O.toasts.filter(M=>M.dismiss&&!M.delete);if(n.length>0){const M=O.toasts.map(nt=>n.find(xt=>xt.id===nt.id)?{...nt,delete:!0}:nt);O.toasts=M}}),ht(()=>()=>{e(ut)&&e(ft)&&(e(ft).focus({preventScroll:!0}),r(ft,null),r(wt,!1))}),xe(()=>(O.reset(),ye(document,"keydown",M=>{tt().every(at=>M[at]||M.code===at)&&(r(U,!0),e(ut)?.focus()),M.code==="Escape"&&(document.activeElement===e(ut)||e(ut)?.contains(document.activeElement))&&r(U,!1)}))),ht(()=>{if(N()!=="system"&&r(yt,N()),typeof window<"u"){N()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?r(yt,de):r(yt,Gt));const n=window.matchMedia("(prefers-color-scheme: dark)"),M=({matches:nt})=>{N()==="system"&&r(yt,nt?de:Gt,!0)};"addEventListener"in n?n.addEventListener("change",M):n.addListener(M)}});const zt=n=>{t.onblur?.(n),e(wt)&&!n.currentTarget.contains(n.relatedTarget)&&(r(wt,!1),e(ft)&&(e(ft).focus({preventScroll:!0}),r(ft,null)))},Jt=n=>{t.onfocus?.(n),!(n.target instanceof HTMLElement&&n.target.dataset.dismissible==="false")&&(e(wt)||(r(wt,!0),r(ft,n.relatedTarget,!0)))},pt=n=>{t.onpointerdown?.(n),!(n.target instanceof HTMLElement&&n.target.dataset.dismissible==="false")&&r(Et,!0)},$t=n=>{t.onmouseenter?.(n),r(U,!0)},Nt=n=>{t.onmouseleave?.(n),e(Et)||r(U,!1)},j=n=>{t.onmousemove?.(n),r(U,!0)},te=n=>{t.ondragend?.(n),r(U,!1)},ee=n=>{t.onpointerup?.(n),r(Et,!1)};Le.set(new He);var vt=bn();y(vt,"tabindex",-1);var Wt=J(vt);{var Pt=n=>{var M=b(),nt=h(M);ue(nt,18,()=>e(D),at=>at,(at,xt,ne,me)=>{const Ut=l(()=>{const[i,At]=xt.split("-");return{y:i,x:At}}),ot=l(()=>gn(Dt(),V()));var mt=hn();Pe(mt,i=>({tabindex:-1,dir:i,class:t.class,"data-sonner-toaster":!0,"data-sonner-theme":e(yt),"data-y-position":e(Ut).y,"data-x-position":e(Ut).x,style:t.style,onblur:zt,onfocus:Jt,onmouseenter:$t,onmousemove:j,onmouseleave:Nt,ondragend:te,onpointerdown:pt,onpointerup:ee,...Qt,[Ae]:{"--front-toast-height":`${O.heights[0]?.height}px`,"--width":`${vn}px`,"--gap":`${Mt()}px`,"--offset-top":e(ot)["--offset-top"],"--offset-right":e(ot)["--offset-right"],"--offset-bottom":e(ot)["--offset-bottom"],"--offset-left":e(ot)["--offset-left"],"--mobile-offset-top":e(ot)["--mobile-offset-top"],"--mobile-offset-right":e(ot)["--mobile-offset-right"],"--mobile-offset-bottom":e(ot)["--mobile-offset-bottom"],"--mobile-offset-left":e(ot)["--mobile-offset-left"]}}),[qt],void 0,void 0,"svelte-nbs0zk"),ue(mt,23,()=>O.toasts.filter(i=>!i.position&&e(ne)===0||i.position===xt),i=>i.id,(i,At,Vt,ge)=>{{const ae=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.successIcon??lt),a(o,I)},m=o=>{en(o)};B(Q,o=>{t.successIcon?o(u):t.successIcon!==null&&o(m,1)})}a(X,R)},oe=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.errorIcon??lt),a(o,I)},m=o=>{an(o)};B(Q,o=>{t.errorIcon?o(u):t.errorIcon!==null&&o(m,1)})}a(X,R)},ie=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.warningIcon??lt),a(o,I)},m=o=>{sn(o)};B(Q,o=>{t.warningIcon?o(u):t.warningIcon!==null&&o(m,1)})}a(X,R)},s=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.infoIcon??lt),a(o,I)},m=o=>{ln(o)};B(Q,o=>{t.infoIcon?o(u):t.infoIcon!==null&&o(m,1)})}a(X,R)},c=X=>{var R=b(),Q=h(R);{var u=o=>{var I=b(),P=h(I);p(P,()=>t.closeIcon??lt),a(o,I)},m=o=>{dn(o)};B(Q,o=>{t.closeIcon?o(u):t.closeIcon!==null&&o(m,1)})}a(X,R)};let v=l(()=>W()?.duration??Ht()),w=l(()=>W()?.class??""),x=l(()=>W()?.descriptionClass||""),g=l(()=>W()?.style??""),L=l(()=>W().classes||{}),It=l(()=>W().unstyled??!1),Rt=l(()=>W()?.cancelButtonStyle??""),se=l(()=>W()?.actionButtonStyle??""),jt=l(()=>W()?.closeButtonAriaLabel??kt());$e(i,{get index(){return e(Vt)},get toast(){return e(At)},get defaultRichColors(){return St()},get duration(){return e(v)},get class(){return e(w)},get descriptionClass(){return e(x)},get invert(){return k()},get visibleToasts(){return Ot()},get closeButton(){return Bt()},get interacting(){return e(Et)},get position(){return xt},get style(){return e(g)},get classes(){return e(L)},get unstyled(){return e(It)},get cancelButtonStyle(){return e(Rt)},get actionButtonStyle(){return e(se)},get closeButtonAriaLabel(){return e(jt)},get expandByDefault(){return ct()},get expanded(){return e(U)},get pauseWhenPageIsHidden(){return Z()},get loadingIcon(){return t.loadingIcon},successIcon:ae,errorIcon:oe,warningIcon:ie,infoIcon:s,closeIcon:c,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),Y(mt),Ie(mt,i=>r(ut,i),()=>e(ut)),K(()=>mt.dir=mt.dir),a(at,mt)}),a(n,M)};B(Wt,n=>{O.toasts.length>0&&n(Pt)})}Y(vt),K(()=>y(vt,"aria-label",`${et()??""} ${e(bt)??""}`)),a(_,vt),ve()}export{Re as L,En as T};