@meridianjs/admin-dashboard 0.1.11 → 0.1.13

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.
@@ -0,0 +1 @@
1
+ *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 60 5% 96%;--foreground: 240 10% 3.9%;--card: 0 0% 100%;--card-foreground: 240 10% 3.9%;--popover: 0 0% 100%;--popover-foreground: 240 10% 3.9%;--primary: 240 10% 3.9%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 72% 51%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 90%;--input: 240 5.9% 90%;--ring: 240 5.9% 10%;--radius: .5rem;--indigo: 239 84% 67%;--indigo-foreground: 0 0% 100%;--indigo-subtle: 224 76% 97%;--sidebar: 0 0% 100%;--sidebar-foreground: 240 10% 3.9%;--sidebar-accent: 240 4.8% 95.9%;--sidebar-accent-foreground: 240 5.9% 10%;--sidebar-border: 240 5.9% 90%;--sidebar-ring: 239 84% 67%}.dark{--background: 240 6% 8%;--foreground: 0 0% 98%;--card: 240 6% 10%;--card-foreground: 0 0% 98%;--popover: 240 6% 10%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 240 5.9% 10%;--secondary: 240 3.7% 15.9%;--secondary-foreground: 0 0% 98%;--muted: 240 3.7% 15.9%;--muted-foreground: 240 5% 64.9%;--accent: 240 3.7% 15.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 240 3.7% 15.9%;--input: 240 3.7% 15.9%;--ring: 240 4.9% 83.9%;--indigo: 239 84% 67%;--indigo-foreground: 0 0% 100%;--indigo-subtle: 224 30% 13%;--sidebar: 240 6% 10%;--sidebar-foreground: 0 0% 98%;--sidebar-accent: 240 3.7% 15.9%;--sidebar-accent-foreground: 0 0% 98%;--sidebar-border: 240 3.7% 15.9%;--sidebar-ring: 239 84% 67%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));font-family:Inter,system-ui,sans-serif;font-size:.875rem;line-height:1.25rem;color:hsl(var(--foreground));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::-webkit-scrollbar{width:4px;height:4px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{border-radius:9999px;background-color:hsl(var(--border))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-left-2\.5{left:-.625rem}.-right-0\.5{right:-.125rem}.-right-2\.5{right:-.625rem}.-top-0\.5{top:-.125rem}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.left-0{left:0}.left-1{left:.25rem}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-\[11px\]{left:11px}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-1\.5{top:.375rem}.top-1\/2{top:50%}.top-10{top:2.5rem}.top-2{top:.5rem}.top-3\.5{top:.875rem}.top-4{top:1rem}.top-6{top:1.5rem}.top-\[50\%\]{top:50%}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\[3\]{z-index:3}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3\.5{margin-left:.875rem;margin-right:.875rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-mb-px{margin-bottom:-1px}.-ml-1{margin-left:-.25rem}.-ml-2{margin-left:-.5rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-8{margin-bottom:2rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-6{width:1.5rem;height:1.5rem}.size-7{width:1.75rem;height:1.75rem}.size-8{width:2rem;height:2rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[26px\]{height:26px}.h-\[280px\]{height:280px}.h-\[57px\]{height:57px}.h-\[80\%\]{height:80%}.h-\[82px\]{height:82px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-max{height:-moz-max-content;height:max-content}.h-px{height:1px}.h-svh{height:100svh}.max-h-48{max-height:12rem}.max-h-52{max-height:13rem}.max-h-96{max-height:24rem}.max-h-\[0\]{max-height:0}.max-h-\[320px\]{max-height:320px}.max-h-\[75vh\]{max-height:75vh}.max-h-\[85vh\]{max-height:85vh}.min-h-0{min-height:0px}.min-h-\[120px\]{min-height:120px}.min-h-\[160px\]{min-height:160px}.min-h-\[200px\]{min-height:200px}.min-h-\[280px\]{min-height:280px}.min-h-\[28px\]{min-height:28px}.min-h-\[320px\]{min-height:320px}.min-h-\[68px\]{min-height:68px}.min-h-\[80px\]{min-height:80px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/3{width:33.333333%}.w-1\/4{width:25%}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-2\/3{width:66.666667%}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-44{width:11rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[130px\]{width:130px}.w-\[140px\]{width:140px}.w-\[200px\]{width:200px}.w-\[26px\]{width:26px}.w-\[var\(--sidebar-width\)\]{width:var(--sidebar-width)}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-5{min-width:1.25rem}.min-w-56{min-width:14rem}.min-w-\[18px\]{min-width:18px}.min-w-\[260px\]{min-width:260px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[240px\]{max-width:240px}.max-w-\[280px\]{max-width:280px}.max-w-\[360px\]{max-width:360px}.max-w-\[380px\]{max-width:380px}.max-w-\[560px\]{max-width:560px}.max-w-\[var\(--skeleton-width\)\]{max-width:var(--skeleton-width)}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-px{--tw-translate-x: -1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-px{--tw-translate-x: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.\!cursor-col-resize{cursor:col-resize!important}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-wait{cursor:wait}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-auto{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.resize-none{resize:none}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[180px_1fr\]{grid-template-columns:180px 1fr}.grid-cols-\[1fr_256px\]{grid-template-columns:1fr 256px}.grid-cols-\[20px_130px_1fr_130px_88px\]{grid-template-columns:20px 130px 1fr 130px 88px}.grid-cols-\[2fr_1fr_1fr_1fr_40px\]{grid-template-columns:2fr 1fr 1fr 1fr 40px}.grid-cols-\[70px_1fr_150px_120px_130px_140px_130px_32px\]{grid-template-columns:70px 1fr 150px 120px 130px 140px 130px 32px}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.-space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-.25rem * var(--tw-space-x-reverse));margin-left:calc(-.25rem * calc(1 - var(--tw-space-x-reverse)))}.-space-x-1\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-.375rem * var(--tw-space-x-reverse));margin-left:calc(-.375rem * calc(1 - var(--tw-space-x-reverse)))}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border>:not([hidden])~:not([hidden]){border-color:hsl(var(--border))}.divide-border\/40>:not([hidden])~:not([hidden]){border-color:hsl(var(--border) / .4)}.divide-border\/50>:not([hidden])~:not([hidden]){border-color:hsl(var(--border) / .5)}.divide-border\/60>:not([hidden])~:not([hidden]){border-color:hsl(var(--border) / .6)}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-b-md{border-bottom-right-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-background{border-color:hsl(var(--background))}.border-border{border-color:hsl(var(--border))}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-border\/60{border-color:hsl(var(--border) / .6)}.border-border\/70{border-color:hsl(var(--border) / .7)}.border-destructive{border-color:hsl(var(--destructive))}.border-emerald-500\/40{border-color:#10b98166}.border-foreground{border-color:hsl(var(--foreground))}.border-indigo-400{--tw-border-opacity: 1;border-color:rgb(129 140 248 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-primary\/60{border-color:hsl(var(--primary) / .6)}.border-sidebar-border{border-color:hsl(var(--sidebar-border))}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-\[\#eff6ff\]{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-\[\#f59e0b\]\/5{background-color:#f59e0b0d}.bg-\[hsl\(60_5\%_96\%\)\]{--tw-bg-opacity: 1;background-color:hsl(60 5% 96% / var(--tw-bg-opacity, 1))}.bg-accent{background-color:hsl(var(--accent))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-background\/20{background-color:hsl(var(--background) / .2)}.bg-background\/60{background-color:hsl(var(--background) / .6)}.bg-background\/90{background-color:hsl(var(--background) / .9)}.bg-black\/40{background-color:#0006}.bg-black\/5{background-color:#0000000d}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-foreground{background-color:hsl(var(--foreground))}.bg-foreground\/5{background-color:hsl(var(--foreground) / .05)}.bg-indigo{background-color:hsl(var(--indigo))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-indigo-50{--tw-bg-opacity: 1;background-color:rgb(238 242 255 / var(--tw-bg-opacity, 1))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.bg-indigo\/10{background-color:hsl(var(--indigo) / .1)}.bg-indigo\/5{background-color:hsl(var(--indigo) / .05)}.bg-muted{background-color:hsl(var(--muted))}.bg-muted-foreground{background-color:hsl(var(--muted-foreground))}.bg-muted\/10{background-color:hsl(var(--muted) / .1)}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/5{background-color:hsl(var(--muted) / .05)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/5{background-color:hsl(var(--primary) / .05)}.bg-secondary{background-color:hsl(var(--secondary))}.bg-sidebar{background-color:hsl(var(--sidebar))}.bg-sidebar-border{background-color:hsl(var(--sidebar-border))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-zinc-100{--tw-bg-opacity: 1;background-color:rgb(244 244 245 / var(--tw-bg-opacity, 1))}.bg-zinc-400{--tw-bg-opacity: 1;background-color:rgb(161 161 170 / var(--tw-bg-opacity, 1))}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-14{padding-left:3.5rem;padding-right:3.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-1{padding-left:.25rem}.pl-1\.5{padding-left:.375rem}.pl-14{padding-left:3.5rem}.pl-2{padding-left:.5rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-1\.5{padding-right:.375rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-normal{letter-spacing:0em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[\#6b7280\]{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-background{color:hsl(var(--background))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-border{color:hsl(var(--border))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-indigo{color:hsl(var(--indigo))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-indigo-foreground{color:hsl(var(--indigo-foreground))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/40{color:hsl(var(--muted-foreground) / .4)}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/60{color:hsl(var(--muted-foreground) / .6)}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-sidebar-foreground{color:hsl(var(--sidebar-foreground))}.text-sidebar-foreground\/40{color:hsl(var(--sidebar-foreground) / .4)}.text-sidebar-foreground\/50{color:hsl(var(--sidebar-foreground) / .5)}.text-sidebar-foreground\/60{color:hsl(var(--sidebar-foreground) / .6)}.text-sidebar-foreground\/70{color:hsl(var(--sidebar-foreground) / .7)}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.text-zinc-300{--tw-text-opacity: 1;color:rgb(212 212 216 / var(--tw-text-opacity, 1))}.text-zinc-400{--tw-text-opacity: 1;color:rgb(161 161 170 / var(--tw-text-opacity, 1))}.text-zinc-500{--tw-text-opacity: 1;color:rgb(113 113 122 / var(--tw-text-opacity, 1))}.text-zinc-600{--tw-text-opacity: 1;color:rgb(82 82 91 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.accent-foreground{accent-color:hsl(var(--foreground))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow-\[0_0_0_1px_hsl\(var\(--sidebar-border\)\)\]{--tw-shadow: 0 0 0 1px hsl(var(--sidebar-border));--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-indigo\/30{--tw-ring-color: hsl(var(--indigo) / .3)}.ring-sidebar-ring{--tw-ring-color: hsl(var(--sidebar-ring))}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-lg{--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[left\,right\,width\]{transition-property:left,right,width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[margin\,opacity\]{transition-property:margin,opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\,height\,padding\]{transition-property:width,height,padding;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\,height\]{transition-property:width,height;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.meridian-editor{cursor:text;font-size:.875rem;line-height:1.25rem;line-height:1.625;color:hsl(var(--foreground));outline:2px solid transparent;outline-offset:2px}.meridian-editor>*+*{margin-top:.5rem}.meridian-editor p{line-height:1.625}.meridian-editor h1{font-size:1.25rem;line-height:1.75rem;font-weight:600;letter-spacing:-.025em;color:hsl(var(--foreground))}.meridian-editor h2{font-size:1.125rem;line-height:1.75rem;font-weight:600;letter-spacing:-.025em;color:hsl(var(--foreground))}.meridian-editor h3{font-size:1rem;line-height:1.5rem;font-weight:600;color:hsl(var(--foreground))}.meridian-editor ul{list-style-type:disc}.meridian-editor ul>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.meridian-editor ul{padding-left:1.25rem}.meridian-editor ol{list-style-type:decimal}.meridian-editor ol>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.meridian-editor ol{padding-left:1.25rem}.meridian-editor li{color:hsl(var(--foreground))}.meridian-editor code{border-radius:.25rem;background-color:hsl(var(--muted));padding:.125rem .375rem;font-family:JetBrains Mono,monospace;font-size:.75rem;line-height:1rem;color:hsl(var(--foreground))}.meridian-editor pre{overflow-x:auto;border-radius:var(--radius);background-color:hsl(var(--muted));padding:1rem;font-family:JetBrains Mono,monospace;font-size:.75rem;line-height:1rem;color:hsl(var(--foreground))}.meridian-editor pre code{background-color:transparent;padding:0;color:inherit}.meridian-editor blockquote{border-left-width:3px;--tw-border-opacity: 1;border-color:rgb(165 180 252 / var(--tw-border-opacity, 1));padding-left:1rem;font-style:italic;color:hsl(var(--muted-foreground))}.meridian-editor blockquote:is(.dark *){--tw-border-opacity: 1;border-color:rgb(67 56 202 / var(--tw-border-opacity, 1))}.meridian-editor hr{border-color:hsl(var(--border))}.meridian-editor strong{font-weight:600}.meridian-editor u{text-decoration-line:underline;text-underline-offset:2px}.meridian-editor s{color:hsl(var(--muted-foreground));text-decoration-line:line-through}.meridian-editor a{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1));text-decoration-line:underline;text-underline-offset:2px}.meridian-editor a:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.meridian-editor ul[data-type=taskList]{list-style-type:none}.meridian-editor ul[data-type=taskList]>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.meridian-editor ul[data-type=taskList]{padding-left:0}.meridian-editor ul[data-type=taskList] li{display:flex;align-items:flex-start;gap:.5rem}.meridian-editor ul[data-type=taskList] li>label{margin-top:3px;display:flex;flex-shrink:0;align-items:center}.meridian-editor ul[data-type=taskList] li>label input[type=checkbox]{height:.875rem;width:.875rem;cursor:pointer;border-radius:calc(var(--radius) - 4px);accent-color:#6366f1}.meridian-editor ul[data-type=taskList] li>div{min-width:0px;flex:1 1 0%}.meridian-editor ul[data-type=taskList] li[data-checked=true]>div{color:hsl(var(--muted-foreground));text-decoration-line:line-through}.meridian-editor .is-editor-empty:first-child:before{color:hsl(var(--muted-foreground) / .5);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.meridian-editor .ProseMirror-selectednode{border-radius:.25rem;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: hsl(var(--ring))}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-\[\#9ca3af\]::-moz-placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.placeholder\:text-\[\#9ca3af\]::placeholder{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground\/40::-moz-placeholder{color:hsl(var(--muted-foreground) / .4)}.placeholder\:text-muted-foreground\/40::placeholder{color:hsl(var(--muted-foreground) / .4)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-2:after{content:var(--tw-content);top:-.5rem;right:-.5rem;bottom:-.5rem;left:-.5rem}.after\:inset-y-0:after{content:var(--tw-content);top:0;bottom:0}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-\[2px\]:after{content:var(--tw-content);width:2px}.last\:border-0:last-child{border-width:0px}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.focus-within\:ring-1:focus-within{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-within\:ring-ring:focus-within{--tw-ring-color: hsl(var(--ring))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-foreground\/30:hover{border-color:hsl(var(--foreground) / .3)}.hover\:border-foreground\/40:hover{border-color:hsl(var(--foreground) / .4)}.hover\:border-muted-foreground\/40:hover{border-color:hsl(var(--muted-foreground) / .4)}.hover\:border-zinc-300:hover{--tw-border-opacity: 1;border-color:rgb(212 212 216 / var(--tw-border-opacity, 1))}.hover\:bg-\[\#f9fafb\]:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-accent\/50:hover{background-color:hsl(var(--accent) / .5)}.hover\:bg-border:hover{background-color:hsl(var(--border))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-emerald-700:hover{--tw-bg-opacity: 1;background-color:rgb(4 120 87 / var(--tw-bg-opacity, 1))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/20:hover{background-color:hsl(var(--muted) / .2)}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted) / .3)}.hover\:bg-muted\/40:hover{background-color:hsl(var(--muted) / .4)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary) / .1)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-sidebar-accent:hover{background-color:hsl(var(--sidebar-accent))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-foreground\/70:hover{color:hsl(var(--foreground) / .7)}.hover\:text-muted-foreground:hover{color:hsl(var(--muted-foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-sidebar-accent-foreground:hover{color:hsl(var(--sidebar-accent-foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-\[0_0_0_1px_hsl\(var\(--sidebar-accent\)\)\]:hover{--tw-shadow: 0 0 0 1px hsl(var(--sidebar-accent));--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:after\:bg-sidebar-border:hover:after{content:var(--tw-content);background-color:hsl(var(--sidebar-border))}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:text-destructive:focus{color:hsl(var(--destructive))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.active\:bg-sidebar-accent:active{background-color:hsl(var(--sidebar-accent))}.active\:text-sidebar-accent-foreground:active{color:hsl(var(--sidebar-accent-foreground))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}.group\/menu-item:focus-within .group-focus-within\/menu-item\:opacity-100{opacity:1}.group:hover .group-hover\:left-0{left:0}.group:hover .group-hover\:right-0{right:0}.group:hover .group-hover\:block{display:block}.group:hover .group-hover\:max-h-\[2rem\]{max-height:2rem}.group:hover .group-hover\:text-foreground{color:hsl(var(--foreground))}.group\/menu-item:hover .group-hover\/menu-item\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.peer\/menu-button:hover~.peer-hover\/menu-button\:text-sidebar-accent-foreground{color:hsl(var(--sidebar-accent-foreground))}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.has-\[\[data-variant\=inset\]\]\:bg-sidebar:has([data-variant=inset]){background-color:hsl(var(--sidebar))}.group\/menu-item:has([data-sidebar=menu-action]) .group-has-\[\[data-sidebar\=menu-action\]\]\/menu-item\:pr-8{padding-right:2rem}.aria-disabled\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[orientation\=vertical\]\:h-4[data-orientation=vertical]{height:1rem}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[active\=true\]\:bg-sidebar-accent[data-active=true]{background-color:hsl(var(--sidebar-accent))}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:hsl(var(--accent))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=open\]\:bg-sidebar-accent[data-state=open]{background-color:hsl(var(--sidebar-accent))}.data-\[active\=true\]\:font-medium[data-active=true]{font-weight:500}.data-\[active\=true\]\:text-sidebar-accent-foreground[data-active=true]{color:hsl(var(--sidebar-accent-foreground))}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:hsl(var(--accent-foreground))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[state\=open\]\:text-sidebar-accent-foreground[data-state=open]{color:hsl(var(--sidebar-accent-foreground))}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:opacity-100[data-state=open]{opacity:1}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[state\=closed\]\:duration-200[data-state=closed]{transition-duration:.2s}.data-\[state\=open\]\:duration-300[data-state=open]{transition-duration:.3s}.data-\[state\=open\]\:hover\:bg-sidebar-accent:hover[data-state=open]{background-color:hsl(var(--sidebar-accent))}.data-\[state\=open\]\:hover\:text-sidebar-accent-foreground:hover[data-state=open]{color:hsl(var(--sidebar-accent-foreground))}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:left-\[calc\(var\(--sidebar-width\)\*-1\)\]{left:calc(var(--sidebar-width) * -1)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:right-\[calc\(var\(--sidebar-width\)\*-1\)\]{right:calc(var(--sidebar-width) * -1)}.group[data-side=left] .group-data-\[side\=left\]\:-right-4{right:-1rem}.group[data-side=right] .group-data-\[side\=right\]\:left-0{left:0}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:-mt-8{margin-top:-2rem}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:hidden{display:none}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:\!size-8{width:2rem!important;height:2rem!important}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+1rem\)\]{width:calc(var(--sidebar-width-icon) + 1rem)}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+1rem\+2px\)\]{width:calc(var(--sidebar-width-icon) + 1rem + 2px)}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[var\(--sidebar-width-icon\)\]{width:var(--sidebar-width-icon)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:w-0{width:0px}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-side=right] .group-data-\[side\=right\]\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:overflow-hidden{overflow:hidden}.group[data-variant=floating] .group-data-\[variant\=floating\]\:rounded-lg{border-radius:var(--radius)}.group[data-variant=floating] .group-data-\[variant\=floating\]\:border{border-width:1px}.group[data-side=left] .group-data-\[side\=left\]\:border-r{border-right-width:1px}.group[data-side=right] .group-data-\[side\=right\]\:border-l{border-left-width:1px}.group[data-variant=floating] .group-data-\[variant\=floating\]\:border-sidebar-border{border-color:hsl(var(--sidebar-border))}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:\!p-2{padding:.5rem!important}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:opacity-0{opacity:0}.group[data-variant=floating] .group-data-\[variant\=floating\]\:shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:after\:left-full:after{content:var(--tw-content);left:100%}.group[data-collapsible=offcanvas] .hover\:group-data-\[collapsible\=offcanvas\]\:bg-sidebar:hover{background-color:hsl(var(--sidebar))}.peer\/menu-button[data-size=default]~.peer-data-\[size\=default\]\/menu-button\:top-1\.5{top:.375rem}.peer\/menu-button[data-size=lg]~.peer-data-\[size\=lg\]\/menu-button\:top-2\.5{top:.625rem}.peer\/menu-button[data-size=sm]~.peer-data-\[size\=sm\]\/menu-button\:top-1{top:.25rem}.peer\/menu-button[data-active=true]~.peer-data-\[active\=true\]\/menu-button\:text-sidebar-accent-foreground{color:hsl(var(--sidebar-accent-foreground))}.dark\:-rotate-90:is(.dark *){--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:rotate-0:is(.dark *){--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:scale-0:is(.dark *){--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:scale-100:is(.dark *){--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:bg-\[\#f59e0b\]\/5:is(.dark *){background-color:#f59e0b0d}.dark\:bg-amber-950\/40:is(.dark *){background-color:#451a0366}.dark\:bg-background:is(.dark *){background-color:hsl(var(--background))}.dark\:bg-black\/30:is(.dark *){background-color:#0000004d}.dark\:bg-blue-900\/30:is(.dark *){background-color:#1e3a8a4d}.dark\:bg-blue-950\/40:is(.dark *){background-color:#17255466}.dark\:bg-card:is(.dark *){background-color:hsl(var(--card))}.dark\:bg-emerald-900\/30:is(.dark *){background-color:#064e3b4d}.dark\:bg-emerald-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(2 44 34 / var(--tw-bg-opacity, 1))}.dark\:bg-emerald-950\/30:is(.dark *){background-color:#022c224d}.dark\:bg-emerald-950\/40:is(.dark *){background-color:#022c2266}.dark\:bg-indigo-900\/30:is(.dark *){background-color:#312e814d}.dark\:bg-indigo-900\/50:is(.dark *){background-color:#312e8180}.dark\:bg-indigo-950\/20:is(.dark *){background-color:#1e1b4b33}.dark\:bg-indigo-950\/40:is(.dark *){background-color:#1e1b4b66}.dark\:bg-indigo\/10:is(.dark *){background-color:hsl(var(--indigo) / .1)}.dark\:bg-zinc-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity, 1))}.dark\:bg-zinc-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity, 1))}.dark\:bg-zinc-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity, 1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-emerald-400:is(.dark *){--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.dark\:text-indigo-300:is(.dark *){--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.dark\:text-indigo-400:is(.dark *){--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.dark\:text-zinc-400:is(.dark *){--tw-text-opacity: 1;color:rgb(161 161 170 / var(--tw-text-opacity, 1))}.dark\:hover\:border-zinc-600:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(82 82 91 / var(--tw-border-opacity, 1))}.dark\:hover\:bg-muted\/30:hover:is(.dark *){background-color:hsl(var(--muted) / .3)}@media (min-width: 640px){.sm\:mt-0{margin-top:0}.sm\:block{display:block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:inline-flex{display:inline-flex}.sm\:w-56{width:14rem}.sm\:w-auto{width:auto}.sm\:max-w-\[480px\]{max-width:480px}.sm\:max-w-\[520px\]{max-width:520px}.sm\:max-w-\[580px\]{max-width:580px}.sm\:max-w-md{max-width:28rem}.sm\:max-w-sm{max-width:24rem}.sm\:max-w-xl{max-width:36rem}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:block{display:block}.md\:flex{display:flex}.md\:opacity-0{opacity:0}.md\:after\:hidden:after{content:var(--tw-content);display:none}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:m-2{margin:.5rem}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:ml-0{margin-left:0}.peer[data-variant=inset][data-state=collapsed]~.md\:peer-data-\[variant\=inset\]\:peer-data-\[state\=collapsed\]\:ml-2{margin-left:.5rem}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:rounded-xl{border-radius:.75rem}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}}@media (min-width: 1024px){.lg\:gap-2{gap:.5rem}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width: 1280px){.xl\:block{display:block}}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:hsl(var(--accent))}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:hsl(var(--accent) / .5)}.\[\&\>button\]\:hidden>button{display:none}.\[\&\>button\]\:bg-accent>button{background-color:hsl(var(--accent))}.\[\&\>button\]\:bg-primary>button{background-color:hsl(var(--primary))}.\[\&\>button\]\:text-accent-foreground>button{color:hsl(var(--accent-foreground))}.\[\&\>button\]\:text-muted-foreground>button{color:hsl(var(--muted-foreground))}.\[\&\>button\]\:text-primary-foreground>button{color:hsl(var(--primary-foreground))}.\[\&\>button\]\:hover\:bg-primary:hover>button{background-color:hsl(var(--primary))}.\[\&\>button\]\:hover\:text-primary-foreground:hover>button{color:hsl(var(--primary-foreground))}.\[\&\>button\]\:focus\:bg-primary:focus>button{background-color:hsl(var(--primary))}.\[\&\>button\]\:focus\:text-primary-foreground:focus>button{color:hsl(var(--primary-foreground))}.\[\&\>span\:last-child\]\:truncate>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\]\:size-4>svg{width:1rem;height:1rem}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:text-sidebar-accent-foreground>svg{color:hsl(var(--sidebar-accent-foreground))}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}[data-side=left][data-collapsible=offcanvas] .\[\[data-side\=left\]\[data-collapsible\=offcanvas\]_\&\]\:-right-2{right:-.5rem}[data-side=left][data-state=collapsed] .\[\[data-side\=left\]\[data-state\=collapsed\]_\&\]\:cursor-e-resize{cursor:e-resize}[data-side=right][data-collapsible=offcanvas] .\[\[data-side\=right\]\[data-collapsible\=offcanvas\]_\&\]\:-left-2{left:-.5rem}[data-side=right][data-state=collapsed] .\[\[data-side\=right\]\[data-state\=collapsed\]_\&\]\:cursor-w-resize{cursor:w-resize}
@@ -1,4 +1,4 @@
1
- import{s as Qs}from"./vendor-radix-CvCz4fuY.js";import{r as Q,c as mt,b as ru}from"./vendor-react-GAVzOgi0.js";import{j as Ee}from"./vendor-query-Calp8wfL.js";function G(n){this.content=n}G.prototype={constructor:G,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new G(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new G(t)},addToStart:function(n,e){return new G([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new G(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new G(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=G.from(n),n.size?new G(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=G.from(n),n.size?new G(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=G.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};G.from=function(n){if(n instanceof G)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new G(e)};function gl(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=gl(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function yl(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=yl(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class k{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new k(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new k(r,s)}cutByIndex(e,t){return e==t?k.empty:e==0&&t==this.content.length?this:new k(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new k(s,i)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return gl(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return yl(this,e,t,r)}findIndex(e){if(e==0)return En(0,e);if(e==this.size)return En(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?En(t+1,i):En(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return k.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new k(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new k(t||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const Jr={index:0,offset:0};function En(n,e){return Jr.index=n,Jr.offset=e,Jr}function _n(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!_n(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!_n(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let L=class Cs{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&_n(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Cs.none;if(e instanceof Cs)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};L.none=[];class Wn extends Error{}class C{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=kl(this.content,e+this.openStart,t);return r&&new C(r,this.openStart,this.openEnd)}removeBetween(e,t){return new C(bl(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return C.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new C(k.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new C(e,r,s)}}C.empty=new C(k.empty,0,0);function bl(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(bl(i.content,e-s-1,t-s-1)))}function kl(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=kl(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function su(n,e,t){if(t.openStart>n.depth)throw new Wn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Wn("Inconsistent open depths");return xl(n,e,t,0)}function xl(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=xl(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return dt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=iu(t,n);return dt(i,Cl(n,o,l,e,r))}else return dt(i,qn(n,e,r))}function Sl(n,e){if(!e.type.compatibleContent(n.type))throw new Wn("Cannot join "+e.type.name+" onto "+n.type.name)}function ws(n,e,t){let r=n.node(t);return Sl(r,e.node(t)),r}function ut(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Zt(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(ut(n.nodeAfter,r),i++));for(let l=i;l<o;l++)ut(s.child(l),r);e&&e.depth==t&&e.textOffset&&ut(e.nodeBefore,r)}function dt(n,e){return n.type.checkContent(e),n.copy(e)}function Cl(n,e,t,r,s){let i=n.depth>s&&ws(n,e,s+1),o=r.depth>s&&ws(t,r,s+1),l=[];return Zt(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Sl(i,o),ut(dt(i,Cl(n,e,t,r,s+1)),l)):(i&&ut(dt(i,qn(n,e,s+1)),l),Zt(e,t,s,l),o&&ut(dt(o,qn(t,r,s+1)),l)),Zt(r,null,s,l),new k(l)}function qn(n,e,t){let r=[];if(Zt(null,n,t,r),n.depth>t){let s=ws(n,e,t+1);ut(dt(s,qn(n,e,t+1)),r)}return Zt(e,null,t,r),new k(r)}function iu(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(k.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class dn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return L.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Un(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new dn(t,r,i)}static resolveCached(e,t){let r=Fi.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Fi.set(e,r=new ou);let s=r.elts[r.i]=dn.resolve(e,t);return r.i=(r.i+1)%lu,s}}class ou{constructor(){this.elts=[],this.i=0}}const lu=12,Fi=new WeakMap;class Un{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const au=Object.create(null);class Ce{constructor(e,t,r,s=L.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&_n(this.attrs,t||e.defaultAttrs||au)&&L.sameSet(this.marks,r||L.none)}copy(e=null){return e==this.content?this:new Ce(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Ce(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return C.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new C(c,s.depth-o,i.depth-o)}replace(e,t,r){return su(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return dn.resolveCached(this,e)}resolveNoCache(e){return dn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),wl(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=L.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!L.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=k.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}Ce.prototype.text=void 0;class Kn extends Ce{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):wl(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Kn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Kn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function wl(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class gt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new cu(e,t);if(r.next==null)return gt.empty;let s=Ml(r);r.next&&r.err("Unexpected trailing text");let i=gu(mu(s));return yu(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
1
+ import{s as Qs}from"./vendor-radix-CvpS4Cp5.js";import{r as Q,c as mt,b as ru}from"./vendor-react-GAVzOgi0.js";import{j as Ee}from"./vendor-query-B9zjiv_I.js";function G(n){this.content=n}G.prototype={constructor:G,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new G(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new G(t)},addToStart:function(n,e){return new G([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new G(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new G(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=G.from(n),n.size?new G(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=G.from(n),n.size?new G(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=G.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};G.from=function(n){if(n instanceof G)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new G(e)};function gl(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=gl(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function yl(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=yl(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class k{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new k(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new k(r,s)}cutByIndex(e,t){return e==t?k.empty:e==0&&t==this.content.length?this:new k(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new k(s,i)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return gl(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return yl(this,e,t,r)}findIndex(e){if(e==0)return En(0,e);if(e==this.size)return En(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?En(t+1,i):En(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return k.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new k(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new k(t||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const Jr={index:0,offset:0};function En(n,e){return Jr.index=n,Jr.offset=e,Jr}function _n(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!_n(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!_n(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let L=class Cs{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&_n(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Cs.none;if(e instanceof Cs)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};L.none=[];class Wn extends Error{}class C{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=kl(this.content,e+this.openStart,t);return r&&new C(r,this.openStart,this.openEnd)}removeBetween(e,t){return new C(bl(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return C.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new C(k.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new C(e,r,s)}}C.empty=new C(k.empty,0,0);function bl(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(bl(i.content,e-s-1,t-s-1)))}function kl(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=kl(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function su(n,e,t){if(t.openStart>n.depth)throw new Wn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Wn("Inconsistent open depths");return xl(n,e,t,0)}function xl(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=xl(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return dt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=iu(t,n);return dt(i,Cl(n,o,l,e,r))}else return dt(i,qn(n,e,r))}function Sl(n,e){if(!e.type.compatibleContent(n.type))throw new Wn("Cannot join "+e.type.name+" onto "+n.type.name)}function ws(n,e,t){let r=n.node(t);return Sl(r,e.node(t)),r}function ut(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Zt(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(ut(n.nodeAfter,r),i++));for(let l=i;l<o;l++)ut(s.child(l),r);e&&e.depth==t&&e.textOffset&&ut(e.nodeBefore,r)}function dt(n,e){return n.type.checkContent(e),n.copy(e)}function Cl(n,e,t,r,s){let i=n.depth>s&&ws(n,e,s+1),o=r.depth>s&&ws(t,r,s+1),l=[];return Zt(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Sl(i,o),ut(dt(i,Cl(n,e,t,r,s+1)),l)):(i&&ut(dt(i,qn(n,e,s+1)),l),Zt(e,t,s,l),o&&ut(dt(o,qn(t,r,s+1)),l)),Zt(r,null,s,l),new k(l)}function qn(n,e,t){let r=[];if(Zt(null,n,t,r),n.depth>t){let s=ws(n,e,t+1);ut(dt(s,qn(n,e,t+1)),r)}return Zt(e,null,t,r),new k(r)}function iu(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(k.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class dn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return L.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Un(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new dn(t,r,i)}static resolveCached(e,t){let r=Fi.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Fi.set(e,r=new ou);let s=r.elts[r.i]=dn.resolve(e,t);return r.i=(r.i+1)%lu,s}}class ou{constructor(){this.elts=[],this.i=0}}const lu=12,Fi=new WeakMap;class Un{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const au=Object.create(null);class Ce{constructor(e,t,r,s=L.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&_n(this.attrs,t||e.defaultAttrs||au)&&L.sameSet(this.marks,r||L.none)}copy(e=null){return e==this.content?this:new Ce(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Ce(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return C.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new C(c,s.depth-o,i.depth-o)}replace(e,t,r){return su(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return dn.resolveCached(this,e)}resolveNoCache(e){return dn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),wl(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=L.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!L.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=k.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}Ce.prototype.text=void 0;class Kn extends Ce{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):wl(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Kn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Kn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function wl(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class gt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new cu(e,t);if(r.next==null)return gt.empty;let s=Ml(r);r.next&&r.err("Unexpected trailing text");let i=gu(mu(s));return yu(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
2
2
  `)}}gt.empty=new gt(!0);class cu{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Ml(n){let e=[];do e.push(uu(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function uu(n){let e=[];do e.push(du(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function du(n){let e=pu(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=fu(n,e);else break;return e}function Vi(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function fu(n,e){let t=Vi(n),r=t;return n.eat(",")&&(n.next!="}"?r=Vi(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function hu(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let s=[];for(let i in t){let o=t[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&n.err("No node type or group '"+e+"' found"),s}function pu(n){if(n.eat("(")){let e=Ml(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=hu(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function mu(n){let e=[[]];return s(i(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function s(o,l){o.forEach(a=>a.to=l)}function i(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=i(o.exprs[a],l);if(a==o.exprs.length-1)return c;s(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),s(i(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return s(i(o.expr,l),a),s(i(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(i(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=t();s(i(o.expr,a),u),a=u}if(o.max==-1)s(i(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=t();r(a,u),s(i(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Tl(n,e){return e-n}function Hi(n,e){let t=[];return r(e),t.sort(Tl);function r(s){let i=n[s];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(s);for(let o=0;o<i.length;o++){let{term:l,to:a}=i[o];!l&&t.indexOf(a)==-1&&r(a)}}}function gu(n){let e=Object.create(null);return t(Hi(n,0));function t(r){let s=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<s.length;u++)s[u][0]==l&&(c=s[u][1]);Hi(n,a).forEach(u=>{c||s.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new gt(r.indexOf(n.length-1)>-1);for(let o=0;o<s.length;o++){let l=s[o][1].sort(Tl);i.next.push({type:s[o][0],next:e[l.join(",")]||t(l)})}return i}}function yu(n,e){for(let t=0,r=[n];t<r.length;t++){let s=r[t],i=!s.validEnd,o=[];for(let l=0;l<s.next.length;l++){let{type:a,next:c}=s.next[l];o.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function El(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function vl(n,e){let t=Object.create(null);for(let r in n){let s=e&&e[r];if(s===void 0){let i=n[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=s}return t}function Al(n,e,t,r){for(let s in e)if(!(s in n))throw new RangeError(`Unsupported attribute ${s} for ${t} of type ${s}`);for(let s in n){let i=n[s];i.validate&&i.validate(e[s])}}function Ol(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new ku(n,r,e[r]);return t}let ji=class Nl{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Ol(e,r.attrs),this.defaultAttrs=El(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==gt.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:vl(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ce(this,this.computeAttrs(e),k.from(t),L.setFrom(r))}createChecked(e=null,t,r){return t=k.from(t),this.checkContent(t),new Ce(this,this.computeAttrs(e),t,L.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=k.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let s=this.contentMatch.matchFragment(t),i=s&&s.fillBefore(k.empty,!0);return i?new Ce(this,e,t.append(i),L.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Al(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:L.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,o)=>r[i]=new Nl(i,t,o));let s=t.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function bu(n,e,t){let r=t.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${i}`)}}class ku{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?bu(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Dr{constructor(e,t,r,s){this.name=e,this.rank=t,this.schema=r,this.spec=s,this.attrs=Ol(e,s.attrs),this.excluded=null;let i=El(this.attrs);this.instance=i?new L(this,i):null}create(e=null){return!e&&this.instance?this.instance:new L(this,vl(this.attrs,e))}static compile(e,t){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new Dr(i,s++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Al(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Il{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let s in e)t[s]=e[s];t.nodes=G.from(e.nodes),t.marks=G.from(e.marks||{}),this.nodes=ji.compile(this.spec.nodes,this),this.marks=Dr.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=gt.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?_i(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:_i(this,o.split(" "))}this.nodeFromJSON=s=>Ce.fromJSON(this,s),this.markFromJSON=s=>L.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof ji){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,s)}text(e,t){let r=this.nodes.text;return new Kn(r,r.defaultAttrs,e,L.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function _i(n,e){let t=[];for(let r=0;r<e.length;r++){let s=e[r],i=n.marks[s],o=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function xu(n){return n.tag!=null}function Su(n){return n.style!=null}class Ge{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(s=>{if(xu(s))this.tags.push(s);else if(Su(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new qi(this,t,!1);return r.addAll(e,L.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new qi(this,t,!0);return r.addAll(e,L.none,t.from,t.to),C.maxOpen(r.finish())}matchTag(e,t,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(Mu(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<i)break}t.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Ui(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Ui(o)),o.node||o.ignore||o.mark||(o.node=s)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Ge(e,Ge.schemaRules(e)))}}const Dl={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Cu={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Rl={ol:!0,ul:!0},fn=1,Ms=2,en=4;function Wi(n,e,t){return e!=null?(e?fn:0)|(e==="full"?Ms:0):n&&n.whitespace=="pre"?fn|Ms:t&~en}class vn{constructor(e,t,r,s,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=L.none,this.match=i||(o&en?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(k.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&fn)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let t=k.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(k.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Dl.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class qi{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=t.topNode,i,o=Wi(null,t.preserveWhitespace,0)|(r?en:0);s?i=new vn(s.type,s.attrs,L.none,!0,t.topMatch||s.type.contentMatch,o):r?i=new vn(null,null,L.none,!0,null,o):i=new vn(e.schema.topNodeType,null,L.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,s=this.top,i=s.options&Ms?"full":this.localPreserveWS||(s.options&fn)>0,{schema:o}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
3
3
  `);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),t,!0),l[a]&&this.insertNode(o.text(l[a]),t,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=s.content[s.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;Rl.hasOwnProperty(o)&&this.parser.normalizeLists&&wu(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Cu.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(Dl.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=a&&a.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
4
  `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(i,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,s){let i,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,t,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];o!=l;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,r){let s,i;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!s||s.length>c.length+l)&&(s=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)t=this.enterInner(s[o],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let s=this.findPlace(e,t,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=L.none;for(let l of s.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):Ki(l.type,e.type))&&(o=l.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,t,r,s){let i=this.findPlace(e.create(t),r,!1);return i&&(i=this.enterInner(e,t,r,!0,s)),i}enterInner(e,t,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=Wi(e,i,o.options);o.options&en&&o.content.length==0&&(l|=en);let a=L.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):Ki(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new vn(e,t,a,s,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=fn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&t.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&s?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function wu(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Rl.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Mu(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Ui(n){let e={};for(let t in n)e[t]=n[t];return e}function Ki(n,e){let t=e.schema.nodes;for(let r in t){let s=t[r];if(!s.allowsMarkType(n))continue;let i=[],o=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||i.indexOf(u)<0&&o(u))return!0}};if(o(s.contentMatch))return!0}}class St{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Gr(t).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let l=0,a=0;for(;l<i.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)s=i.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,t);u&&(i.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:s}=$n(Gr(t),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,s)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let s=this.marks[e.type.name];return s&&$n(Gr(r),s(e,t),null,e.attrs)}static renderSpec(e,t,r=null,s){return $n(e,t,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new St(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Ji(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Ji(e.marks)}}function Ji(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Gr(n){return n.document||window.document}const Gi=new WeakMap;function Tu(n){let e=Gi.get(n);return e===void 0&&Gi.set(n,e=Eu(n)),e}function Eu(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)t(r[s]);else for(let s in r)t(r[s])}return t(n),e}function $n(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Tu(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=s.indexOf(" ");o>0&&(t=s.slice(0,o),s=s.slice(o+1));let l,a=t?n.createElementNS(t,s):n.createElement(s),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:p}=$n(n,f,t,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const Pl=65535,Ll=Math.pow(2,16);function vu(n,e){return n+e*Ll}function Yi(n){return n&Pl}function Au(n){return(n-(n&Pl))/Ll}const Bl=1,zl=2,Fn=4,$l=8;class Ts{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&$l)>0}get deletedBefore(){return(this.delInfo&(Bl|Fn))>0}get deletedAfter(){return(this.delInfo&(zl|Fn))>0}get deletedAcross(){return(this.delInfo&Fn)>0}}class ue{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&ue.empty)return ue.empty}recover(e){let t=0,r=Yi(e);if(!this.inverted)for(let s=0;s<r;s++)t+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+t+Au(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?s:0);if(a>e)break;let c=this.ranges[l+i],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+s+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:vu(l/3,e-a),m=e==a?zl:e==d?Bl:Fn;return(t<0?e!=a:e!=d)&&(m|=$l),new Ts(h,m,p)}s+=u-c}return r?e+s:new Ts(e+s,0,null)}touches(e,t){let r=0,s=Yi(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+i],u=a+c;if(e<=u&&l==s*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],l=o-(this.inverted?i:0),a=o+(this.inverted?0:i),c=this.ranges[s+t],u=this.ranges[s+r];e(l,l+c,a,a+u),i+=u-c}}invert(){return new ue(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ue.empty:new ue(e<0?[0,-e,0]:[0,0,e])}}ue.empty=new ue([]);class hn{constructor(e,t,r=0,s=e?e.length:0){this.mirror=t,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new hn(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let s=e.getMirror(t);this.appendMap(e._maps[t],s!=null&&s<t?r+s:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let s=e.getMirror(t);this.appendMap(e._maps[t].invert(),s!=null&&s>t?r-s-1:void 0)}}invert(){let e=new hn;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this._maps[a].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new Ts(e,s,null)}}const Yr=Object.create(null);class ne{getMap(){return ue.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Yr[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Yr)throw new RangeError("Duplicate use of step JSON ID "+e);return Yr[e]=t,t.prototype.jsonID=e,t}}class j{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new j(e,null)}static fail(e){return new j(null,e)}static fromReplace(e,t,r,s){try{return j.ok(e.replace(t,r,s))}catch(i){if(i instanceof Wn)return j.fail(i.message);throw i}}}function Zs(n,e,t){let r=[];for(let s=0;s<n.childCount;s++){let i=n.child(s);i.content.size&&(i=i.copy(Zs(i.content,e,i))),i.isInline&&(i=e(i,t,s)),r.push(i)}return k.fromArray(r)}class Ue extends ne{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new C(Zs(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),t.openStart,t.openEnd);return j.fromReplace(e,this.from,this.to,i)}invert(){return new Se(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Ue(t.pos,r.pos,this.mark)}merge(e){return e instanceof Ue&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ue(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ue(t.from,t.to,e.markFromJSON(t.mark))}}ne.jsonID("addMark",Ue);class Se extends ne{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new C(Zs(t.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),t.openStart,t.openEnd);return j.fromReplace(e,this.from,this.to,r)}invert(){return new Ue(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Se(t.pos,r.pos,this.mark)}merge(e){return e instanceof Se&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Se(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Se(t.from,t.to,e.markFromJSON(t.mark))}}ne.jsonID("removeMark",Se);class Ke extends ne{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return j.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return j.fromReplace(e,this.pos,this.pos+1,new C(k.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let s=0;s<t.marks.length;s++)if(!t.marks[s].isInSet(r))return new Ke(this.pos,t.marks[s]);return new Ke(this.pos,this.mark)}}return new yt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ke(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Ke(t.pos,e.markFromJSON(t.mark))}}ne.jsonID("addNodeMark",Ke);class yt extends ne{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return j.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return j.fromReplace(e,this.pos,this.pos+1,new C(k.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Ke(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new yt(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new yt(t.pos,e.markFromJSON(t.mark))}}ne.jsonID("removeNodeMark",yt);class U extends ne{constructor(e,t,r,s=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=s}apply(e){return this.structure&&Es(e,this.from,this.to)?j.fail("Structure replace would overwrite content"):j.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new ue([this.from,this.to-this.from,this.slice.size])}invert(e){return new U(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new U(t.pos,Math.max(t.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof U)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?C.empty:new C(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new U(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?C.empty:new C(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new U(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new U(t.from,t.to,C.fromJSON(e,t.slice),!!t.structure)}}ne.jsonID("replace",U);class K extends ne{constructor(e,t,r,s,i,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=l}apply(e){if(this.structure&&(Es(e,this.from,this.gapFrom)||Es(e,this.gapTo,this.to)))return j.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return j.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?j.fromReplace(e,this.from,this.to,r):j.fail("Content does not fit in gap")}getMap(){return new ue([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new K(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||s<t.pos||i>r.pos?null:new K(t.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new K(t.from,t.to,t.gapFrom,t.gapTo,C.fromJSON(e,t.slice),t.insert,!!t.structure)}}ne.jsonID("replaceAround",K);function Es(n,e,t){let r=n.resolve(e),s=t-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function Ou(n,e,t,r){let s=[],i=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(p)||(o&&o.to==f&&o.mark.eq(d[m])?o.to=h:s.push(o=new Se(f,h,d[m])));l&&l.to==f?l.to=h:i.push(l=new Ue(f,h,r))}}),s.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function Nu(n,e,t,r){let s=[],i=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;i++;let a=null;if(r instanceof Dr){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<s.length;h++){let p=s[h];p.step==i-1&&d.eq(s[h].style)&&(f=p)}f?(f.to=c,f.step=i):s.push({style:d,from:Math.max(l,e),to:c,step:i})}}}),s.forEach(o=>n.step(new Se(o.from,o.to,o.style)))}function ei(n,e,t,r=t.contentMatch,s=!0){let i=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<i.childCount;a++){let c=i.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new U(l,u,C.empty));else{r=d;for(let f=0;f<c.marks.length;f++)t.allowsMarkType(c.marks[f].type)||n.step(new Se(l,u,c.marks[f]));if(s&&c.isText&&t.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new C(k.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),o.push(new U(l+f.index,l+f.index+f[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(k.empty,!0);n.replace(l,l,new C(a,0,0))}for(let a=o.length-1;a>=0;a--)n.step(o[a])}function Iu(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function jt(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,s=0,i=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+s,a=n.$to.indexAfter(r)-i;if(r<n.depth&&o.canReplace(l,a,t))return r;if(r==0||o.type.spec.isolating||!Iu(o,l,a))break;l&&(s=1),a<o.childCount&&(i=1)}return null}function Du(n,e,t){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),l=s.after(i+1),a=o,c=l,u=k.empty,d=0;for(let p=i,m=!1;p>t;p--)m||r.index(p)>0?(m=!0,u=k.from(r.node(p).copy(u)),d++):a--;let f=k.empty,h=0;for(let p=i,m=!1;p>t;p--)m||s.after(p+1)<s.end(p)?(m=!0,f=k.from(s.node(p).copy(f)),h++):c++;n.step(new K(a,c,o,l,new C(u.append(f),d,h),u.size-d,!0))}function ti(n,e,t=null,r=n){let s=Ru(n,e),i=s&&Pu(r,e);return i?s.map(Xi).concat({type:e,attrs:t}).concat(i.map(Xi)):null}function Xi(n){return{type:n,attrs:null}}function Ru(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return t.canReplaceWith(r,s,o)?i:null}function Pu(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<s;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:o}function Lu(n,e,t){let r=k.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=k.from(t[o].type.create(t[o].attrs,r))}let s=e.start,i=e.end;n.step(new K(s,i,s,i,new C(r,0,0),t.length,!0))}function Bu(n,e,t,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,a)&&zu(n.doc,n.mapping.slice(i).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Vl(n,o,l,i),ei(n,n.mapping.slice(i).map(l,1),r,void 0,c===null);let u=n.mapping.slice(i),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return n.step(new K(d,f,d+1,f-1,new C(k.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&Fl(n,o,l,i),!1}})}function Fl(n,e,t,r){e.forEach((s,i)=>{if(s.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(s.text);){let a=n.mapping.slice(r).map(t+1+i+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Vl(n,e,t,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+i);n.replaceWith(o,o+1,e.type.schema.text(`
@@ -6,4 +6,4 @@ var Ce=e=>{throw TypeError(e)};var te=(e,t,s)=>t.has(e)||Ce("Cannot "+s);var i=(
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var us=D,hs=Symbol.for("react.element"),cs=Symbol.for("react.fragment"),ls=Object.prototype.hasOwnProperty,ds=us.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,fs={key:!0,ref:!0,__self:!0,__source:!0};function We(e,t,s){var r,n={},a=null,h=null;s!==void 0&&(a=""+s),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(h=t.ref);for(r in t)ls.call(t,r)&&!fs.hasOwnProperty(r)&&(n[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)n[r]===void 0&&(n[r]=t[r]);return{$$typeof:hs,type:e,key:a,ref:h,props:n,_owner:ds.current}}Xt.Fragment=cs;Xt.jsx=We;Xt.jsxs=We;ze.exports=Xt;var me=ze.exports;const ys=as(me),Ys=os({__proto__:null,default:ys},[me]);var Ut=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ps={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},rt,pe,Ae,ms=(Ae=class{constructor(){c(this,rt,ps);c(this,pe,!1)}setTimeoutProvider(e){o(this,rt,e)}setTimeout(e,t){return i(this,rt).setTimeout(e,t)}clearTimeout(e){i(this,rt).clearTimeout(e)}setInterval(e,t){return i(this,rt).setInterval(e,t)}clearInterval(e){i(this,rt).clearInterval(e)}},rt=new WeakMap,pe=new WeakMap,Ae),ft=new ms;function vs(e){setTimeout(e,0)}var Ct=typeof window>"u"||"Deno"in globalThis;function U(){}function bs(e,t){return typeof e=="function"?e(t):e}function ee(e){return typeof e=="number"&&e>=0&&e!==1/0}function $e(e,t){return Math.max(e+(t||0)-Date.now(),0)}function dt(e,t){return typeof e=="function"?e(t):e}function N(e,t){return typeof e=="function"?e(t):e}function Pe(e,t){const{type:s="all",exact:r,fetchStatus:n,predicate:a,queryKey:h,stale:u}=e;if(h){if(r){if(t.queryHash!==ve(h,t.options))return!1}else if(!kt(t.queryKey,h))return!1}if(s!=="all"){const p=t.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||n&&n!==t.state.fetchStatus||a&&!a(t))}function Re(e,t){const{exact:s,status:r,predicate:n,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(s){if(Pt(t.options.mutationKey)!==Pt(a))return!1}else if(!kt(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||n&&!n(t))}function ve(e,t){return((t==null?void 0:t.queryKeyHashFn)||Pt)(e)}function Pt(e){return JSON.stringify(e,(t,s)=>se(s)?Object.keys(s).sort().reduce((r,n)=>(r[n]=s[n],r),{}):s)}function kt(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>kt(e[s],t[s])):!1}var gs=Object.prototype.hasOwnProperty;function Ve(e,t,s=0){if(e===t)return e;if(s>500)return t;const r=Ee(e)&&Ee(t);if(!r&&!(se(e)&&se(t)))return t;const a=(r?e:Object.keys(e)).length,h=r?t:Object.keys(t),u=h.length,p=r?new Array(u):{};let m=0;for(let v=0;v<u;v++){const f=r?v:h[v],g=e[f],d=t[f];if(g===d){p[f]=g,(r?v<a:gs.call(e,f))&&m++;continue}if(g===null||d===null||typeof g!="object"||typeof d!="object"){p[f]=d;continue}const E=Ve(g,d,s+1);p[f]=E,E===g&&m++}return a===u&&m===a?e:p}function Yt(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function Ee(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function se(e){if(!Fe(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!Fe(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Fe(e){return Object.prototype.toString.call(e)==="[object Object]"}function Os(e){return new Promise(t=>{ft.setTimeout(t,e)})}function re(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?Ve(e,t):t}function Ss(e,t,s=0){const r=[...e,t];return s&&r.length>s?r.slice(1):r}function ws(e,t,s=0){const r=[t,...e];return s&&r.length>s?r.slice(0,-1):r}var be=Symbol();function Je(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===be?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ge(e,t){return typeof e=="function"?e(...t):!!e}function Cs(e,t,s){let r=!1,n;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(n??(n=t()),r||(r=!0,n.aborted?s():n.addEventListener("abort",s,{once:!0})),n)}),e}var yt,it,Rt,_e,Ps=(_e=class extends Ut{constructor(){super();c(this,yt);c(this,it);c(this,Rt);o(this,Rt,t=>{if(!Ct&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){i(this,it)||this.setEventListener(i(this,Rt))}onUnsubscribe(){var t;this.hasListeners()||((t=i(this,it))==null||t.call(this),o(this,it,void 0))}setEventListener(t){var s;o(this,Rt,t),(s=i(this,it))==null||s.call(this),o(this,it,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){i(this,yt)!==t&&(o(this,yt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof i(this,yt)=="boolean"?i(this,yt):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},yt=new WeakMap,it=new WeakMap,Rt=new WeakMap,_e),Oe=new Ps;function ie(){let e,t;const s=new Promise((n,a)=>{e=n,t=a});s.status="pending",s.catch(()=>{});function r(n){Object.assign(s,n),delete s.resolve,delete s.reject}return s.resolve=n=>{r({status:"fulfilled",value:n}),e(n)},s.reject=n=>{r({status:"rejected",reason:n}),t(n)},s}var Rs=vs;function Es(){let e=[],t=0,s=u=>{u()},r=u=>{u()},n=Rs;const a=u=>{t?e.push(u):n(()=>{s(u)})},h=()=>{const u=e;e=[],u.length&&n(()=>{r(()=>{u.forEach(p=>{s(p)})})})};return{batch:u=>{let p;t++;try{p=u()}finally{t--,t||h()}return p},batchCalls:u=>(...p)=>{a(()=>{u(...p)})},schedule:a,setNotifyFunction:u=>{s=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{n=u}}}var M=Es(),Et,nt,Ft,Ue,Fs=(Ue=class extends Ut{constructor(){super();c(this,Et,!0);c(this,nt);c(this,Ft);o(this,Ft,t=>{if(!Ct&&window.addEventListener){const s=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){i(this,nt)||this.setEventListener(i(this,Ft))}onUnsubscribe(){var t;this.hasListeners()||((t=i(this,nt))==null||t.call(this),o(this,nt,void 0))}setEventListener(t){var s;o(this,Ft,t),(s=i(this,nt))==null||s.call(this),o(this,nt,t(this.setOnline.bind(this)))}setOnline(t){i(this,Et)!==t&&(o(this,Et,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return i(this,Et)}},Et=new WeakMap,nt=new WeakMap,Ft=new WeakMap,Ue),Zt=new Fs;function Ms(e){return Math.min(1e3*2**e,3e4)}function Ye(e){return(e??"online")==="online"?Zt.isOnline():!0}var ne=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ze(e){let t=!1,s=0,r;const n=ie(),a=()=>n.status!=="pending",h=O=>{var S;if(!a()){const P=new ne(O);g(P),(S=e.onCancel)==null||S.call(e,P)}},u=()=>{t=!0},p=()=>{t=!1},m=()=>Oe.isFocused()&&(e.networkMode==="always"||Zt.isOnline())&&e.canRun(),v=()=>Ye(e.networkMode)&&e.canRun(),f=O=>{a()||(r==null||r(),n.resolve(O))},g=O=>{a()||(r==null||r(),n.reject(O))},d=()=>new Promise(O=>{var S;r=P=>{(a()||m())&&O(P)},(S=e.onPause)==null||S.call(e)}).then(()=>{var O;r=void 0,a()||(O=e.onContinue)==null||O.call(e)}),E=()=>{if(a())return;let O;const S=s===0?e.initialPromise:void 0;try{O=S??e.fn()}catch(P){O=Promise.reject(P)}Promise.resolve(O).then(f).catch(P=>{var q;if(a())return;const Q=e.retry??(Ct?0:3),R=e.retryDelay??Ms,l=typeof R=="function"?R(s,P):R,x=Q===!0||typeof Q=="number"&&s<Q||typeof Q=="function"&&Q(s,P);if(t||!x){g(P);return}s++,(q=e.onFail)==null||q.call(e,s,P),Os(l).then(()=>m()?void 0:d()).then(()=>{t?g(P):E()})})};return{promise:n,status:()=>n.status,cancel:h,continue:()=>(r==null||r(),n),cancelRetry:u,continueRetry:p,canStart:v,start:()=>(v()?E():d().then(E),n)}}var pt,qe,Xe=(qe=class{constructor(){c(this,pt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ee(this.gcTime)&&o(this,pt,ft.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ct?1/0:5*60*1e3))}clearGcTimeout(){i(this,pt)&&(ft.clearTimeout(i(this,pt)),o(this,pt,void 0))}},pt=new WeakMap,qe),mt,Mt,L,vt,T,Kt,bt,H,$,ke,Qs=(ke=class extends Xe{constructor(t){super();c(this,H);c(this,mt);c(this,Mt);c(this,L);c(this,vt);c(this,T);c(this,Kt);c(this,bt);o(this,bt,!1),o(this,Kt,t.defaultOptions),this.setOptions(t.options),this.observers=[],o(this,vt,t.client),o(this,L,i(this,vt).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,o(this,mt,Qe(this.options)),this.state=t.state??i(this,mt),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=i(this,T))==null?void 0:t.promise}setOptions(t){if(this.options={...i(this,Kt),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=Qe(this.options);s.data!==void 0&&(this.setState(Me(s.data,s.dataUpdatedAt)),o(this,mt,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&i(this,L).remove(this)}setData(t,s){const r=re(this.state.data,t,this.options);return y(this,H,$).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(t,s){y(this,H,$).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var r,n;const s=(r=i(this,T))==null?void 0:r.promise;return(n=i(this,T))==null||n.cancel(t),s?s.then(U).catch(U):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(i(this,mt))}isActive(){return this.observers.some(t=>N(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===be||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>dt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!$e(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=i(this,T))==null||s.continue()}onOnline(){var s;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=i(this,T))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),i(this,L).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(i(this,T)&&(i(this,bt)?i(this,T).cancel({revert:!0}):i(this,T).cancelRetry()),this.scheduleGc()),i(this,L).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||y(this,H,$).call(this,{type:"invalidate"})}async fetch(t,s){var p,m,v,f,g,d,E,O,S,P,Q,R;if(this.state.fetchStatus!=="idle"&&((p=i(this,T))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(i(this,T))return i(this,T).continueRetry(),i(this,T).promise}if(t&&this.setOptions(t),!this.options.queryFn){const l=this.observers.find(x=>x.options.queryFn);l&&this.setOptions(l.options)}const r=new AbortController,n=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(o(this,bt,!0),r.signal)})},a=()=>{const l=Je(this.options,s),q=(()=>{const tt={client:i(this,vt),queryKey:this.queryKey,meta:this.meta};return n(tt),tt})();return o(this,bt,!1),this.options.persister?this.options.persister(l,q,this):l(q)},u=(()=>{const l={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:i(this,vt),state:this.state,fetchFn:a};return n(l),l})();(m=this.options.behavior)==null||m.onFetch(u,this),o(this,Mt,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=u.fetchOptions)==null?void 0:v.meta))&&y(this,H,$).call(this,{type:"fetch",meta:(f=u.fetchOptions)==null?void 0:f.meta}),o(this,T,Ze({initialPromise:s==null?void 0:s.initialPromise,fn:u.fetchFn,onCancel:l=>{l instanceof ne&&l.revert&&this.setState({...i(this,Mt),fetchStatus:"idle"}),r.abort()},onFail:(l,x)=>{y(this,H,$).call(this,{type:"failed",failureCount:l,error:x})},onPause:()=>{y(this,H,$).call(this,{type:"pause"})},onContinue:()=>{y(this,H,$).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const l=await i(this,T).start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),(d=(g=i(this,L).config).onSuccess)==null||d.call(g,l,this),(O=(E=i(this,L).config).onSettled)==null||O.call(E,l,this.state.error,this),l}catch(l){if(l instanceof ne){if(l.silent)return i(this,T).promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw y(this,H,$).call(this,{type:"error",error:l}),(P=(S=i(this,L).config).onError)==null||P.call(S,l,this),(R=(Q=i(this,L).config).onSettled)==null||R.call(Q,this.state.data,l,this),l}finally{this.scheduleGc()}}},mt=new WeakMap,Mt=new WeakMap,L=new WeakMap,vt=new WeakMap,T=new WeakMap,Kt=new WeakMap,bt=new WeakMap,H=new WeakSet,$=function(t){const s=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ts(r.data,this.options),fetchMeta:t.meta??null};case"success":const n={...r,...Me(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return o(this,Mt,t.manual?n:void 0),n;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=s(this.state),M.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),i(this,L).notify({query:this,type:"updated",action:t})})},ke);function ts(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ye(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Me(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Qe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,r=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var k,b,Lt,_,gt,Qt,V,at,Nt,xt,It,Ot,St,ot,Tt,w,qt,ae,oe,ue,he,ce,le,de,es,Ke,xs=(Ke=class extends Ut{constructor(t,s){super();c(this,w);c(this,k);c(this,b);c(this,Lt);c(this,_);c(this,gt);c(this,Qt);c(this,V);c(this,at);c(this,Nt);c(this,xt);c(this,It);c(this,Ot);c(this,St);c(this,ot);c(this,Tt,new Set);this.options=s,o(this,k,t),o(this,at,null),o(this,V,ie()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,b).addObserver(this),xe(i(this,b),this.options)?y(this,w,qt).call(this):this.updateResult(),y(this,w,he).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return fe(i(this,b),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return fe(i(this,b),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,y(this,w,ce).call(this),y(this,w,le).call(this),i(this,b).removeObserver(this)}setOptions(t){const s=this.options,r=i(this,b);if(this.options=i(this,k).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof N(this.options.enabled,i(this,b))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");y(this,w,de).call(this),i(this,b).setOptions(this.options),s._defaulted&&!Yt(this.options,s)&&i(this,k).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,b),observer:this});const n=this.hasListeners();n&&Ie(i(this,b),r,this.options,s)&&y(this,w,qt).call(this),this.updateResult(),n&&(i(this,b)!==r||N(this.options.enabled,i(this,b))!==N(s.enabled,i(this,b))||dt(this.options.staleTime,i(this,b))!==dt(s.staleTime,i(this,b)))&&y(this,w,ae).call(this);const a=y(this,w,oe).call(this);n&&(i(this,b)!==r||N(this.options.enabled,i(this,b))!==N(s.enabled,i(this,b))||a!==i(this,ot))&&y(this,w,ue).call(this,a)}getOptimisticResult(t){const s=i(this,k).getQueryCache().build(i(this,k),t),r=this.createResult(s,t);return Ts(this,r)&&(o(this,_,r),o(this,Qt,this.options),o(this,gt,i(this,b).state)),r}getCurrentResult(){return i(this,_)}trackResult(t,s){return new Proxy(t,{get:(r,n)=>(this.trackProp(n),s==null||s(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&i(this,V).status==="pending"&&i(this,V).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,n))})}trackProp(t){i(this,Tt).add(t)}getCurrentQuery(){return i(this,b)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=i(this,k).defaultQueryOptions(t),r=i(this,k).getQueryCache().build(i(this,k),s);return r.fetch().then(()=>this.createResult(r,s))}fetch(t){return y(this,w,qt).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,_)))}createResult(t,s){var I;const r=i(this,b),n=this.options,a=i(this,_),h=i(this,gt),u=i(this,Qt),m=t!==r?t.state:i(this,Lt),{state:v}=t;let f={...v},g=!1,d;if(s._optimisticResults){const A=this.hasListeners(),et=!A&&xe(t,s),Bt=A&&Ie(t,r,s,n);(et||Bt)&&(f={...f,...ts(v.data,t.options)}),s._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:E,errorUpdatedAt:O,status:S}=f;d=f.data;let P=!1;if(s.placeholderData!==void 0&&d===void 0&&S==="pending"){let A;a!=null&&a.isPlaceholderData&&s.placeholderData===(u==null?void 0:u.placeholderData)?(A=a.data,P=!0):A=typeof s.placeholderData=="function"?s.placeholderData((I=i(this,It))==null?void 0:I.state.data,i(this,It)):s.placeholderData,A!==void 0&&(S="success",d=re(a==null?void 0:a.data,A,s),g=!0)}if(s.select&&d!==void 0&&!P)if(a&&d===(h==null?void 0:h.data)&&s.select===i(this,Nt))d=i(this,xt);else try{o(this,Nt,s.select),d=s.select(d),d=re(a==null?void 0:a.data,d,s),o(this,xt,d),o(this,at,null)}catch(A){o(this,at,A)}i(this,at)&&(E=i(this,at),d=i(this,xt),O=Date.now(),S="error");const Q=f.fetchStatus==="fetching",R=S==="pending",l=S==="error",x=R&&Q,q=d!==void 0,C={status:S,fetchStatus:f.fetchStatus,isPending:R,isSuccess:S==="success",isError:l,isInitialLoading:x,isLoading:x,data:d,dataUpdatedAt:f.dataUpdatedAt,error:E,errorUpdatedAt:O,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>m.dataUpdateCount||f.errorUpdateCount>m.errorUpdateCount,isFetching:Q,isRefetching:Q&&!R,isLoadingError:l&&!q,isPaused:f.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:l&&q,isStale:Se(t,s),refetch:this.refetch,promise:i(this,V),isEnabled:N(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const A=C.data!==void 0,et=C.status==="error"&&!A,Bt=Wt=>{et?Wt.reject(C.error):A&&Wt.resolve(C.data)},we=()=>{const Wt=o(this,V,C.promise=ie());Bt(Wt)},zt=i(this,V);switch(zt.status){case"pending":t.queryHash===r.queryHash&&Bt(zt);break;case"fulfilled":(et||C.data!==zt.value)&&we();break;case"rejected":(!et||C.error!==zt.reason)&&we();break}}return C}updateResult(){const t=i(this,_),s=this.createResult(i(this,b),this.options);if(o(this,gt,i(this,b).state),o(this,Qt,this.options),i(this,gt).data!==void 0&&o(this,It,i(this,b)),Yt(s,t))return;o(this,_,s);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:n}=this.options,a=typeof n=="function"?n():n;if(a==="all"||!a&&!i(this,Tt).size)return!0;const h=new Set(a??i(this,Tt));return this.options.throwOnError&&h.add("error"),Object.keys(i(this,_)).some(u=>{const p=u;return i(this,_)[p]!==t[p]&&h.has(p)})};y(this,w,es).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&y(this,w,he).call(this)}},k=new WeakMap,b=new WeakMap,Lt=new WeakMap,_=new WeakMap,gt=new WeakMap,Qt=new WeakMap,V=new WeakMap,at=new WeakMap,Nt=new WeakMap,xt=new WeakMap,It=new WeakMap,Ot=new WeakMap,St=new WeakMap,ot=new WeakMap,Tt=new WeakMap,w=new WeakSet,qt=function(t){y(this,w,de).call(this);let s=i(this,b).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(U)),s},ae=function(){y(this,w,ce).call(this);const t=dt(this.options.staleTime,i(this,b));if(Ct||i(this,_).isStale||!ee(t))return;const r=$e(i(this,_).dataUpdatedAt,t)+1;o(this,Ot,ft.setTimeout(()=>{i(this,_).isStale||this.updateResult()},r))},oe=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,b)):this.options.refetchInterval)??!1},ue=function(t){y(this,w,le).call(this),o(this,ot,t),!(Ct||N(this.options.enabled,i(this,b))===!1||!ee(i(this,ot))||i(this,ot)===0)&&o(this,St,ft.setInterval(()=>{(this.options.refetchIntervalInBackground||Oe.isFocused())&&y(this,w,qt).call(this)},i(this,ot)))},he=function(){y(this,w,ae).call(this),y(this,w,ue).call(this,y(this,w,oe).call(this))},ce=function(){i(this,Ot)&&(ft.clearTimeout(i(this,Ot)),o(this,Ot,void 0))},le=function(){i(this,St)&&(ft.clearInterval(i(this,St)),o(this,St,void 0))},de=function(){const t=i(this,k).getQueryCache().build(i(this,k),this.options);if(t===i(this,b))return;const s=i(this,b);o(this,b,t),o(this,Lt,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},es=function(t){M.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(i(this,_))}),i(this,k).getQueryCache().notify({query:i(this,b),type:"observerResultsUpdated"})})},Ke);function Is(e,t){return N(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function xe(e,t){return Is(e,t)||e.state.data!==void 0&&fe(e,t,t.refetchOnMount)}function fe(e,t,s){if(N(t.enabled,e)!==!1&&dt(t.staleTime,e)!=="static"){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&Se(e,t)}return!1}function Ie(e,t,s,r){return(e!==t||N(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Se(e,s)}function Se(e,t){return N(t.enabled,e)!==!1&&e.isStaleByTime(dt(t.staleTime,e))}function Ts(e,t){return!Yt(e.getCurrentResult(),t)}function Te(e){return{onFetch:(t,s)=>{var v,f,g,d,E;const r=t.options,n=(g=(f=(v=t.fetchOptions)==null?void 0:v.meta)==null?void 0:f.fetchMore)==null?void 0:g.direction,a=((d=t.state.data)==null?void 0:d.pages)||[],h=((E=t.state.data)==null?void 0:E.pageParams)||[];let u={pages:[],pageParams:[]},p=0;const m=async()=>{let O=!1;const S=R=>{Cs(R,()=>t.signal,()=>O=!0)},P=Je(t.options,t.fetchOptions),Q=async(R,l,x)=>{if(O)return Promise.reject();if(l==null&&R.pages.length)return Promise.resolve(R);const tt=(()=>{const et={client:t.client,queryKey:t.queryKey,pageParam:l,direction:x?"backward":"forward",meta:t.options.meta};return S(et),et})(),C=await P(tt),{maxPages:I}=t.options,A=x?ws:Ss;return{pages:A(R.pages,C,I),pageParams:A(R.pageParams,l,I)}};if(n&&a.length){const R=n==="backward",l=R?Ds:De,x={pages:a,pageParams:h},q=l(r,x);u=await Q(x,q,R)}else{const R=e??a.length;do{const l=p===0?h[0]??r.initialPageParam:De(r,u);if(p>0&&l==null)break;u=await Q(u,l),p++}while(p<R)}return u};t.options.persister?t.fetchFn=()=>{var O,S;return(S=(O=t.options).persister)==null?void 0:S.call(O,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=m}}}function De(e,{pages:t,pageParams:s}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,s[r],s):void 0}function Ds(e,{pages:t,pageParams:s}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,s[0],s):void 0}var Ht,B,j,wt,z,st,Le,js=(Le=class extends Xe{constructor(t){super();c(this,z);c(this,Ht);c(this,B);c(this,j);c(this,wt);o(this,Ht,t.client),this.mutationId=t.mutationId,o(this,j,t.mutationCache),o(this,B,[]),this.state=t.state||ss(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){i(this,B).includes(t)||(i(this,B).push(t),this.clearGcTimeout(),i(this,j).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){o(this,B,i(this,B).filter(s=>s!==t)),this.scheduleGc(),i(this,j).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){i(this,B).length||(this.state.status==="pending"?this.scheduleGc():i(this,j).remove(this))}continue(){var t;return((t=i(this,wt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var h,u,p,m,v,f,g,d,E,O,S,P,Q,R,l,x,q,tt;const s=()=>{y(this,z,st).call(this,{type:"continue"})},r={client:i(this,Ht),meta:this.options.meta,mutationKey:this.options.mutationKey};o(this,wt,Ze({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(C,I)=>{y(this,z,st).call(this,{type:"failed",failureCount:C,error:I})},onPause:()=>{y(this,z,st).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>i(this,j).canRun(this)}));const n=this.state.status==="pending",a=!i(this,wt).canStart();try{if(n)s();else{y(this,z,st).call(this,{type:"pending",variables:t,isPaused:a}),i(this,j).config.onMutate&&await i(this,j).config.onMutate(t,this,r);const I=await((u=(h=this.options).onMutate)==null?void 0:u.call(h,t,r));I!==this.state.context&&y(this,z,st).call(this,{type:"pending",context:I,variables:t,isPaused:a})}const C=await i(this,wt).start();return await((m=(p=i(this,j).config).onSuccess)==null?void 0:m.call(p,C,t,this.state.context,this,r)),await((f=(v=this.options).onSuccess)==null?void 0:f.call(v,C,t,this.state.context,r)),await((d=(g=i(this,j).config).onSettled)==null?void 0:d.call(g,C,null,this.state.variables,this.state.context,this,r)),await((O=(E=this.options).onSettled)==null?void 0:O.call(E,C,null,t,this.state.context,r)),y(this,z,st).call(this,{type:"success",data:C}),C}catch(C){try{await((P=(S=i(this,j).config).onError)==null?void 0:P.call(S,C,t,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((R=(Q=this.options).onError)==null?void 0:R.call(Q,C,t,this.state.context,r))}catch(I){Promise.reject(I)}try{await((x=(l=i(this,j).config).onSettled)==null?void 0:x.call(l,void 0,C,this.state.variables,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((tt=(q=this.options).onSettled)==null?void 0:tt.call(q,void 0,C,t,this.state.context,r))}catch(I){Promise.reject(I)}throw y(this,z,st).call(this,{type:"error",error:C}),C}finally{i(this,j).runNext(this)}}},Ht=new WeakMap,B=new WeakMap,j=new WeakMap,wt=new WeakMap,z=new WeakSet,st=function(t){const s=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),M.batch(()=>{i(this,B).forEach(r=>{r.onMutationUpdate(t)}),i(this,j).notify({mutation:this,type:"updated",action:t})})},Le);function ss(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var J,G,Gt,Ne,As=(Ne=class extends Ut{constructor(t={}){super();c(this,J);c(this,G);c(this,Gt);this.config=t,o(this,J,new Set),o(this,G,new Map),o(this,Gt,0)}build(t,s,r){const n=new js({client:t,mutationCache:this,mutationId:++$t(this,Gt)._,options:t.defaultMutationOptions(s),state:r});return this.add(n),n}add(t){i(this,J).add(t);const s=Vt(t);if(typeof s=="string"){const r=i(this,G).get(s);r?r.push(t):i(this,G).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(i(this,J).delete(t)){const s=Vt(t);if(typeof s=="string"){const r=i(this,G).get(s);if(r)if(r.length>1){const n=r.indexOf(t);n!==-1&&r.splice(n,1)}else r[0]===t&&i(this,G).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Vt(t);if(typeof s=="string"){const r=i(this,G).get(s),n=r==null?void 0:r.find(a=>a.state.status==="pending");return!n||n===t}else return!0}runNext(t){var r;const s=Vt(t);if(typeof s=="string"){const n=(r=i(this,G).get(s))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}else return Promise.resolve()}clear(){M.batch(()=>{i(this,J).forEach(t=>{this.notify({type:"removed",mutation:t})}),i(this,J).clear(),i(this,G).clear()})}getAll(){return Array.from(i(this,J))}find(t){const s={exact:!0,...t};return this.getAll().find(r=>Re(s,r))}findAll(t={}){return this.getAll().filter(s=>Re(t,s))}notify(t){M.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return M.batch(()=>Promise.all(t.map(s=>s.continue().catch(U))))}},J=new WeakMap,G=new WeakMap,Gt=new WeakMap,Ne);function Vt(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Y,ut,K,Z,X,Jt,ye,He,_s=(He=class extends Ut{constructor(t,s){super();c(this,X);c(this,Y);c(this,ut);c(this,K);c(this,Z);o(this,Y,t),this.setOptions(s),this.bindMethods(),y(this,X,Jt).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=i(this,Y).defaultMutationOptions(t),Yt(this.options,s)||i(this,Y).getMutationCache().notify({type:"observerOptionsUpdated",mutation:i(this,K),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&Pt(s.mutationKey)!==Pt(this.options.mutationKey)?this.reset():((r=i(this,K))==null?void 0:r.state.status)==="pending"&&i(this,K).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=i(this,K))==null||t.removeObserver(this)}onMutationUpdate(t){y(this,X,Jt).call(this),y(this,X,ye).call(this,t)}getCurrentResult(){return i(this,ut)}reset(){var t;(t=i(this,K))==null||t.removeObserver(this),o(this,K,void 0),y(this,X,Jt).call(this),y(this,X,ye).call(this)}mutate(t,s){var r;return o(this,Z,s),(r=i(this,K))==null||r.removeObserver(this),o(this,K,i(this,Y).getMutationCache().build(i(this,Y),this.options)),i(this,K).addObserver(this),i(this,K).execute(t)}},Y=new WeakMap,ut=new WeakMap,K=new WeakMap,Z=new WeakMap,X=new WeakSet,Jt=function(){var s;const t=((s=i(this,K))==null?void 0:s.state)??ss();o(this,ut,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},ye=function(t){M.batch(()=>{var s,r,n,a,h,u,p,m;if(i(this,Z)&&this.hasListeners()){const v=i(this,ut).variables,f=i(this,ut).context,g={client:i(this,Y),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=i(this,Z)).onSuccess)==null||r.call(s,t.data,v,f,g)}catch(d){Promise.reject(d)}try{(a=(n=i(this,Z)).onSettled)==null||a.call(n,t.data,null,v,f,g)}catch(d){Promise.reject(d)}}else if((t==null?void 0:t.type)==="error"){try{(u=(h=i(this,Z)).onError)==null||u.call(h,t.error,v,f,g)}catch(d){Promise.reject(d)}try{(m=(p=i(this,Z)).onSettled)==null||m.call(p,void 0,t.error,v,f,g)}catch(d){Promise.reject(d)}}}this.listeners.forEach(v=>{v(i(this,ut))})})},He),W,Ge,Us=(Ge=class extends Ut{constructor(t={}){super();c(this,W);this.config=t,o(this,W,new Map)}build(t,s,r){const n=s.queryKey,a=s.queryHash??ve(n,s);let h=this.get(a);return h||(h=new Qs({client:t,queryKey:n,queryHash:a,options:t.defaultQueryOptions(s),state:r,defaultOptions:t.getQueryDefaults(n)}),this.add(h)),h}add(t){i(this,W).has(t.queryHash)||(i(this,W).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=i(this,W).get(t.queryHash);s&&(t.destroy(),s===t&&i(this,W).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){M.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return i(this,W).get(t)}getAll(){return[...i(this,W).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(r=>Pe(s,r))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(r=>Pe(t,r)):s}notify(t){M.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){M.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){M.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},W=new WeakMap,Ge),F,ht,ct,Dt,jt,lt,At,_t,Be,Zs=(Be=class{constructor(e={}){c(this,F);c(this,ht);c(this,ct);c(this,Dt);c(this,jt);c(this,lt);c(this,At);c(this,_t);o(this,F,e.queryCache||new Us),o(this,ht,e.mutationCache||new As),o(this,ct,e.defaultOptions||{}),o(this,Dt,new Map),o(this,jt,new Map),o(this,lt,0)}mount(){$t(this,lt)._++,i(this,lt)===1&&(o(this,At,Oe.subscribe(async e=>{e&&(await this.resumePausedMutations(),i(this,F).onFocus())})),o(this,_t,Zt.subscribe(async e=>{e&&(await this.resumePausedMutations(),i(this,F).onOnline())})))}unmount(){var e,t;$t(this,lt)._--,i(this,lt)===0&&((e=i(this,At))==null||e.call(this),o(this,At,void 0),(t=i(this,_t))==null||t.call(this),o(this,_t,void 0))}isFetching(e){return i(this,F).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return i(this,ht).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=i(this,F).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=i(this,F).build(this,t),r=s.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(dt(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return i(this,F).findAll(e).map(({queryKey:t,state:s})=>{const r=s.data;return[t,r]})}setQueryData(e,t,s){const r=this.defaultQueryOptions({queryKey:e}),n=i(this,F).get(r.queryHash),a=n==null?void 0:n.state.data,h=bs(t,a);if(h!==void 0)return i(this,F).build(this,r).setData(h,{...s,manual:!0})}setQueriesData(e,t,s){return M.batch(()=>i(this,F).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,s)]))}getQueryState(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=i(this,F).get(t.queryHash))==null?void 0:s.state}removeQueries(e){const t=i(this,F);M.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=i(this,F);return M.batch(()=>(s.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},r=M.batch(()=>i(this,F).findAll(e).map(n=>n.cancel(s)));return Promise.all(r).then(U).catch(U)}invalidateQueries(e,t={}){return M.batch(()=>(i(this,F).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},r=M.batch(()=>i(this,F).findAll(e).filter(n=>!n.isDisabled()&&!n.isStatic()).map(n=>{let a=n.fetch(void 0,s);return s.throwOnError||(a=a.catch(U)),n.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(U)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=i(this,F).build(this,t);return s.isStaleByTime(dt(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(U).catch(U)}fetchInfiniteQuery(e){return e.behavior=Te(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(U).catch(U)}ensureInfiniteQueryData(e){return e.behavior=Te(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Zt.isOnline()?i(this,ht).resumePausedMutations():Promise.resolve()}getQueryCache(){return i(this,F)}getMutationCache(){return i(this,ht)}getDefaultOptions(){return i(this,ct)}setDefaultOptions(e){o(this,ct,e)}setQueryDefaults(e,t){i(this,Dt).set(Pt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...i(this,Dt).values()],s={};return t.forEach(r=>{kt(e,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(e,t){i(this,jt).set(Pt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...i(this,jt).values()],s={};return t.forEach(r=>{kt(e,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...i(this,ct).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ve(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===be&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...i(this,ct).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){i(this,F).clear(),i(this,ht).clear()}},F=new WeakMap,ht=new WeakMap,ct=new WeakMap,Dt=new WeakMap,jt=new WeakMap,lt=new WeakMap,At=new WeakMap,_t=new WeakMap,Be),rs=D.createContext(void 0),is=e=>{const t=D.useContext(rs);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Xs=({client:e,children:t})=>(D.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),me.jsx(rs.Provider,{value:e,children:t})),ns=D.createContext(!1),qs=()=>D.useContext(ns);ns.Provider;function ks(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ks=D.createContext(ks()),Ls=()=>D.useContext(Ks),Ns=(e,t,s)=>{const r=s!=null&&s.state.error&&typeof e.throwOnError=="function"?ge(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Hs=e=>{D.useEffect(()=>{e.clearReset()},[e])},Gs=({result:e,errorResetBoundary:t,throwOnError:s,query:r,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(n&&e.data===void 0||ge(s,[e.error,r])),Bs=e=>{if(e.suspense){const s=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>s(r(...n)):s(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},zs=(e,t)=>e.isLoading&&e.isFetching&&!t,Ws=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,je=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function $s(e,t,s){var g,d,E,O;const r=qs(),n=Ls(),a=is(),h=a.defaultQueryOptions(e);(d=(g=a.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||d.call(g,h);const u=a.getQueryCache().get(h.queryHash);h._optimisticResults=r?"isRestoring":"optimistic",Bs(h),Ns(h,n,u),Hs(n);const p=!a.getQueryCache().get(h.queryHash),[m]=D.useState(()=>new t(a,h)),v=m.getOptimisticResult(h),f=!r&&e.subscribed!==!1;if(D.useSyncExternalStore(D.useCallback(S=>{const P=f?m.subscribe(M.batchCalls(S)):U;return m.updateResult(),P},[m,f]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),D.useEffect(()=>{m.setOptions(h)},[h,m]),Ws(h,v))throw je(h,m,n);if(Gs({result:v,errorResetBoundary:n,throwOnError:h.throwOnError,query:u,suspense:h.suspense}))throw v.error;if((O=(E=a.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||O.call(E,h,v),h.experimental_prefetchInRender&&!Ct&&zs(v,r)){const S=p?je(h,m,n):u==null?void 0:u.promise;S==null||S.catch(U).finally(()=>{m.updateResult()})}return h.notifyOnChangeProps?v:m.trackResult(v)}function tr(e,t){return $s(e,xs)}function er(e,t){const s=is(),[r]=D.useState(()=>new _s(s,e));D.useEffect(()=>{r.setOptions(e)},[r,e]);const n=D.useSyncExternalStore(D.useCallback(h=>r.subscribe(M.batchCalls(h)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=D.useCallback((h,u)=>{r.mutate(h,u).catch(U)},[r]);if(n.error&&ge(r.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:a,mutateAsync:n.mutate}}export{Zs as Q,Ys as R,er as a,tr as b,Xs as c,me as j,is as u};
9
+ */var us=D,hs=Symbol.for("react.element"),cs=Symbol.for("react.fragment"),ls=Object.prototype.hasOwnProperty,ds=us.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,fs={key:!0,ref:!0,__self:!0,__source:!0};function We(e,t,s){var r,n={},a=null,h=null;s!==void 0&&(a=""+s),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(h=t.ref);for(r in t)ls.call(t,r)&&!fs.hasOwnProperty(r)&&(n[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)n[r]===void 0&&(n[r]=t[r]);return{$$typeof:hs,type:e,key:a,ref:h,props:n,_owner:ds.current}}Xt.Fragment=cs;Xt.jsx=We;Xt.jsxs=We;ze.exports=Xt;var me=ze.exports;const ys=as(me),Ys=os({__proto__:null,default:ys},[me]);var Ut=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ps={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},rt,pe,Ae,ms=(Ae=class{constructor(){c(this,rt,ps);c(this,pe,!1)}setTimeoutProvider(e){o(this,rt,e)}setTimeout(e,t){return i(this,rt).setTimeout(e,t)}clearTimeout(e){i(this,rt).clearTimeout(e)}setInterval(e,t){return i(this,rt).setInterval(e,t)}clearInterval(e){i(this,rt).clearInterval(e)}},rt=new WeakMap,pe=new WeakMap,Ae),ft=new ms;function vs(e){setTimeout(e,0)}var Ct=typeof window>"u"||"Deno"in globalThis;function U(){}function bs(e,t){return typeof e=="function"?e(t):e}function ee(e){return typeof e=="number"&&e>=0&&e!==1/0}function $e(e,t){return Math.max(e+(t||0)-Date.now(),0)}function dt(e,t){return typeof e=="function"?e(t):e}function N(e,t){return typeof e=="function"?e(t):e}function Pe(e,t){const{type:s="all",exact:r,fetchStatus:n,predicate:a,queryKey:h,stale:u}=e;if(h){if(r){if(t.queryHash!==ve(h,t.options))return!1}else if(!kt(t.queryKey,h))return!1}if(s!=="all"){const p=t.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||n&&n!==t.state.fetchStatus||a&&!a(t))}function Re(e,t){const{exact:s,status:r,predicate:n,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(s){if(Pt(t.options.mutationKey)!==Pt(a))return!1}else if(!kt(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||n&&!n(t))}function ve(e,t){return((t==null?void 0:t.queryKeyHashFn)||Pt)(e)}function Pt(e){return JSON.stringify(e,(t,s)=>se(s)?Object.keys(s).sort().reduce((r,n)=>(r[n]=s[n],r),{}):s)}function kt(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>kt(e[s],t[s])):!1}var gs=Object.prototype.hasOwnProperty;function Ve(e,t,s=0){if(e===t)return e;if(s>500)return t;const r=Ee(e)&&Ee(t);if(!r&&!(se(e)&&se(t)))return t;const a=(r?e:Object.keys(e)).length,h=r?t:Object.keys(t),u=h.length,p=r?new Array(u):{};let m=0;for(let v=0;v<u;v++){const f=r?v:h[v],g=e[f],d=t[f];if(g===d){p[f]=g,(r?v<a:gs.call(e,f))&&m++;continue}if(g===null||d===null||typeof g!="object"||typeof d!="object"){p[f]=d;continue}const E=Ve(g,d,s+1);p[f]=E,E===g&&m++}return a===u&&m===a?e:p}function Yt(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function Ee(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function se(e){if(!Fe(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!Fe(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Fe(e){return Object.prototype.toString.call(e)==="[object Object]"}function Os(e){return new Promise(t=>{ft.setTimeout(t,e)})}function re(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?Ve(e,t):t}function Ss(e,t,s=0){const r=[...e,t];return s&&r.length>s?r.slice(1):r}function ws(e,t,s=0){const r=[t,...e];return s&&r.length>s?r.slice(0,-1):r}var be=Symbol();function Je(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===be?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ge(e,t){return typeof e=="function"?e(...t):!!e}function Cs(e,t,s){let r=!1,n;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(n??(n=t()),r||(r=!0,n.aborted?s():n.addEventListener("abort",s,{once:!0})),n)}),e}var yt,it,Rt,_e,Ps=(_e=class extends Ut{constructor(){super();c(this,yt);c(this,it);c(this,Rt);o(this,Rt,t=>{if(!Ct&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){i(this,it)||this.setEventListener(i(this,Rt))}onUnsubscribe(){var t;this.hasListeners()||((t=i(this,it))==null||t.call(this),o(this,it,void 0))}setEventListener(t){var s;o(this,Rt,t),(s=i(this,it))==null||s.call(this),o(this,it,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){i(this,yt)!==t&&(o(this,yt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof i(this,yt)=="boolean"?i(this,yt):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},yt=new WeakMap,it=new WeakMap,Rt=new WeakMap,_e),Oe=new Ps;function ie(){let e,t;const s=new Promise((n,a)=>{e=n,t=a});s.status="pending",s.catch(()=>{});function r(n){Object.assign(s,n),delete s.resolve,delete s.reject}return s.resolve=n=>{r({status:"fulfilled",value:n}),e(n)},s.reject=n=>{r({status:"rejected",reason:n}),t(n)},s}var Rs=vs;function Es(){let e=[],t=0,s=u=>{u()},r=u=>{u()},n=Rs;const a=u=>{t?e.push(u):n(()=>{s(u)})},h=()=>{const u=e;e=[],u.length&&n(()=>{r(()=>{u.forEach(p=>{s(p)})})})};return{batch:u=>{let p;t++;try{p=u()}finally{t--,t||h()}return p},batchCalls:u=>(...p)=>{a(()=>{u(...p)})},schedule:a,setNotifyFunction:u=>{s=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{n=u}}}var M=Es(),Et,nt,Ft,Ue,Fs=(Ue=class extends Ut{constructor(){super();c(this,Et,!0);c(this,nt);c(this,Ft);o(this,Ft,t=>{if(!Ct&&window.addEventListener){const s=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){i(this,nt)||this.setEventListener(i(this,Ft))}onUnsubscribe(){var t;this.hasListeners()||((t=i(this,nt))==null||t.call(this),o(this,nt,void 0))}setEventListener(t){var s;o(this,Ft,t),(s=i(this,nt))==null||s.call(this),o(this,nt,t(this.setOnline.bind(this)))}setOnline(t){i(this,Et)!==t&&(o(this,Et,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return i(this,Et)}},Et=new WeakMap,nt=new WeakMap,Ft=new WeakMap,Ue),Zt=new Fs;function Ms(e){return Math.min(1e3*2**e,3e4)}function Ye(e){return(e??"online")==="online"?Zt.isOnline():!0}var ne=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ze(e){let t=!1,s=0,r;const n=ie(),a=()=>n.status!=="pending",h=O=>{var S;if(!a()){const P=new ne(O);g(P),(S=e.onCancel)==null||S.call(e,P)}},u=()=>{t=!0},p=()=>{t=!1},m=()=>Oe.isFocused()&&(e.networkMode==="always"||Zt.isOnline())&&e.canRun(),v=()=>Ye(e.networkMode)&&e.canRun(),f=O=>{a()||(r==null||r(),n.resolve(O))},g=O=>{a()||(r==null||r(),n.reject(O))},d=()=>new Promise(O=>{var S;r=P=>{(a()||m())&&O(P)},(S=e.onPause)==null||S.call(e)}).then(()=>{var O;r=void 0,a()||(O=e.onContinue)==null||O.call(e)}),E=()=>{if(a())return;let O;const S=s===0?e.initialPromise:void 0;try{O=S??e.fn()}catch(P){O=Promise.reject(P)}Promise.resolve(O).then(f).catch(P=>{var q;if(a())return;const Q=e.retry??(Ct?0:3),R=e.retryDelay??Ms,l=typeof R=="function"?R(s,P):R,x=Q===!0||typeof Q=="number"&&s<Q||typeof Q=="function"&&Q(s,P);if(t||!x){g(P);return}s++,(q=e.onFail)==null||q.call(e,s,P),Os(l).then(()=>m()?void 0:d()).then(()=>{t?g(P):E()})})};return{promise:n,status:()=>n.status,cancel:h,continue:()=>(r==null||r(),n),cancelRetry:u,continueRetry:p,canStart:v,start:()=>(v()?E():d().then(E),n)}}var pt,qe,Xe=(qe=class{constructor(){c(this,pt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ee(this.gcTime)&&o(this,pt,ft.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ct?1/0:5*60*1e3))}clearGcTimeout(){i(this,pt)&&(ft.clearTimeout(i(this,pt)),o(this,pt,void 0))}},pt=new WeakMap,qe),mt,Mt,L,vt,T,Kt,bt,H,$,ke,Qs=(ke=class extends Xe{constructor(t){super();c(this,H);c(this,mt);c(this,Mt);c(this,L);c(this,vt);c(this,T);c(this,Kt);c(this,bt);o(this,bt,!1),o(this,Kt,t.defaultOptions),this.setOptions(t.options),this.observers=[],o(this,vt,t.client),o(this,L,i(this,vt).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,o(this,mt,Qe(this.options)),this.state=t.state??i(this,mt),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=i(this,T))==null?void 0:t.promise}setOptions(t){if(this.options={...i(this,Kt),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=Qe(this.options);s.data!==void 0&&(this.setState(Me(s.data,s.dataUpdatedAt)),o(this,mt,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&i(this,L).remove(this)}setData(t,s){const r=re(this.state.data,t,this.options);return y(this,H,$).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(t,s){y(this,H,$).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var r,n;const s=(r=i(this,T))==null?void 0:r.promise;return(n=i(this,T))==null||n.cancel(t),s?s.then(U).catch(U):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(i(this,mt))}isActive(){return this.observers.some(t=>N(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===be||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>dt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!$e(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=i(this,T))==null||s.continue()}onOnline(){var s;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=i(this,T))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),i(this,L).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(i(this,T)&&(i(this,bt)?i(this,T).cancel({revert:!0}):i(this,T).cancelRetry()),this.scheduleGc()),i(this,L).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||y(this,H,$).call(this,{type:"invalidate"})}async fetch(t,s){var p,m,v,f,g,d,E,O,S,P,Q,R;if(this.state.fetchStatus!=="idle"&&((p=i(this,T))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(i(this,T))return i(this,T).continueRetry(),i(this,T).promise}if(t&&this.setOptions(t),!this.options.queryFn){const l=this.observers.find(x=>x.options.queryFn);l&&this.setOptions(l.options)}const r=new AbortController,n=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(o(this,bt,!0),r.signal)})},a=()=>{const l=Je(this.options,s),q=(()=>{const tt={client:i(this,vt),queryKey:this.queryKey,meta:this.meta};return n(tt),tt})();return o(this,bt,!1),this.options.persister?this.options.persister(l,q,this):l(q)},u=(()=>{const l={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:i(this,vt),state:this.state,fetchFn:a};return n(l),l})();(m=this.options.behavior)==null||m.onFetch(u,this),o(this,Mt,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=u.fetchOptions)==null?void 0:v.meta))&&y(this,H,$).call(this,{type:"fetch",meta:(f=u.fetchOptions)==null?void 0:f.meta}),o(this,T,Ze({initialPromise:s==null?void 0:s.initialPromise,fn:u.fetchFn,onCancel:l=>{l instanceof ne&&l.revert&&this.setState({...i(this,Mt),fetchStatus:"idle"}),r.abort()},onFail:(l,x)=>{y(this,H,$).call(this,{type:"failed",failureCount:l,error:x})},onPause:()=>{y(this,H,$).call(this,{type:"pause"})},onContinue:()=>{y(this,H,$).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const l=await i(this,T).start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),(d=(g=i(this,L).config).onSuccess)==null||d.call(g,l,this),(O=(E=i(this,L).config).onSettled)==null||O.call(E,l,this.state.error,this),l}catch(l){if(l instanceof ne){if(l.silent)return i(this,T).promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw y(this,H,$).call(this,{type:"error",error:l}),(P=(S=i(this,L).config).onError)==null||P.call(S,l,this),(R=(Q=i(this,L).config).onSettled)==null||R.call(Q,this.state.data,l,this),l}finally{this.scheduleGc()}}},mt=new WeakMap,Mt=new WeakMap,L=new WeakMap,vt=new WeakMap,T=new WeakMap,Kt=new WeakMap,bt=new WeakMap,H=new WeakSet,$=function(t){const s=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ts(r.data,this.options),fetchMeta:t.meta??null};case"success":const n={...r,...Me(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return o(this,Mt,t.manual?n:void 0),n;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=s(this.state),M.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),i(this,L).notify({query:this,type:"updated",action:t})})},ke);function ts(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ye(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Me(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Qe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,r=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var k,b,Lt,_,gt,Qt,V,at,Nt,xt,It,Ot,St,ot,Tt,w,qt,ae,oe,ue,he,ce,le,de,es,Ke,xs=(Ke=class extends Ut{constructor(t,s){super();c(this,w);c(this,k);c(this,b);c(this,Lt);c(this,_);c(this,gt);c(this,Qt);c(this,V);c(this,at);c(this,Nt);c(this,xt);c(this,It);c(this,Ot);c(this,St);c(this,ot);c(this,Tt,new Set);this.options=s,o(this,k,t),o(this,at,null),o(this,V,ie()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,b).addObserver(this),xe(i(this,b),this.options)?y(this,w,qt).call(this):this.updateResult(),y(this,w,he).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return fe(i(this,b),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return fe(i(this,b),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,y(this,w,ce).call(this),y(this,w,le).call(this),i(this,b).removeObserver(this)}setOptions(t){const s=this.options,r=i(this,b);if(this.options=i(this,k).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof N(this.options.enabled,i(this,b))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");y(this,w,de).call(this),i(this,b).setOptions(this.options),s._defaulted&&!Yt(this.options,s)&&i(this,k).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,b),observer:this});const n=this.hasListeners();n&&Ie(i(this,b),r,this.options,s)&&y(this,w,qt).call(this),this.updateResult(),n&&(i(this,b)!==r||N(this.options.enabled,i(this,b))!==N(s.enabled,i(this,b))||dt(this.options.staleTime,i(this,b))!==dt(s.staleTime,i(this,b)))&&y(this,w,ae).call(this);const a=y(this,w,oe).call(this);n&&(i(this,b)!==r||N(this.options.enabled,i(this,b))!==N(s.enabled,i(this,b))||a!==i(this,ot))&&y(this,w,ue).call(this,a)}getOptimisticResult(t){const s=i(this,k).getQueryCache().build(i(this,k),t),r=this.createResult(s,t);return Ts(this,r)&&(o(this,_,r),o(this,Qt,this.options),o(this,gt,i(this,b).state)),r}getCurrentResult(){return i(this,_)}trackResult(t,s){return new Proxy(t,{get:(r,n)=>(this.trackProp(n),s==null||s(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&i(this,V).status==="pending"&&i(this,V).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,n))})}trackProp(t){i(this,Tt).add(t)}getCurrentQuery(){return i(this,b)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=i(this,k).defaultQueryOptions(t),r=i(this,k).getQueryCache().build(i(this,k),s);return r.fetch().then(()=>this.createResult(r,s))}fetch(t){return y(this,w,qt).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,_)))}createResult(t,s){var I;const r=i(this,b),n=this.options,a=i(this,_),h=i(this,gt),u=i(this,Qt),m=t!==r?t.state:i(this,Lt),{state:v}=t;let f={...v},g=!1,d;if(s._optimisticResults){const A=this.hasListeners(),et=!A&&xe(t,s),Bt=A&&Ie(t,r,s,n);(et||Bt)&&(f={...f,...ts(v.data,t.options)}),s._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:E,errorUpdatedAt:O,status:S}=f;d=f.data;let P=!1;if(s.placeholderData!==void 0&&d===void 0&&S==="pending"){let A;a!=null&&a.isPlaceholderData&&s.placeholderData===(u==null?void 0:u.placeholderData)?(A=a.data,P=!0):A=typeof s.placeholderData=="function"?s.placeholderData((I=i(this,It))==null?void 0:I.state.data,i(this,It)):s.placeholderData,A!==void 0&&(S="success",d=re(a==null?void 0:a.data,A,s),g=!0)}if(s.select&&d!==void 0&&!P)if(a&&d===(h==null?void 0:h.data)&&s.select===i(this,Nt))d=i(this,xt);else try{o(this,Nt,s.select),d=s.select(d),d=re(a==null?void 0:a.data,d,s),o(this,xt,d),o(this,at,null)}catch(A){o(this,at,A)}i(this,at)&&(E=i(this,at),d=i(this,xt),O=Date.now(),S="error");const Q=f.fetchStatus==="fetching",R=S==="pending",l=S==="error",x=R&&Q,q=d!==void 0,C={status:S,fetchStatus:f.fetchStatus,isPending:R,isSuccess:S==="success",isError:l,isInitialLoading:x,isLoading:x,data:d,dataUpdatedAt:f.dataUpdatedAt,error:E,errorUpdatedAt:O,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>m.dataUpdateCount||f.errorUpdateCount>m.errorUpdateCount,isFetching:Q,isRefetching:Q&&!R,isLoadingError:l&&!q,isPaused:f.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:l&&q,isStale:Se(t,s),refetch:this.refetch,promise:i(this,V),isEnabled:N(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const A=C.data!==void 0,et=C.status==="error"&&!A,Bt=Wt=>{et?Wt.reject(C.error):A&&Wt.resolve(C.data)},we=()=>{const Wt=o(this,V,C.promise=ie());Bt(Wt)},zt=i(this,V);switch(zt.status){case"pending":t.queryHash===r.queryHash&&Bt(zt);break;case"fulfilled":(et||C.data!==zt.value)&&we();break;case"rejected":(!et||C.error!==zt.reason)&&we();break}}return C}updateResult(){const t=i(this,_),s=this.createResult(i(this,b),this.options);if(o(this,gt,i(this,b).state),o(this,Qt,this.options),i(this,gt).data!==void 0&&o(this,It,i(this,b)),Yt(s,t))return;o(this,_,s);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:n}=this.options,a=typeof n=="function"?n():n;if(a==="all"||!a&&!i(this,Tt).size)return!0;const h=new Set(a??i(this,Tt));return this.options.throwOnError&&h.add("error"),Object.keys(i(this,_)).some(u=>{const p=u;return i(this,_)[p]!==t[p]&&h.has(p)})};y(this,w,es).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&y(this,w,he).call(this)}},k=new WeakMap,b=new WeakMap,Lt=new WeakMap,_=new WeakMap,gt=new WeakMap,Qt=new WeakMap,V=new WeakMap,at=new WeakMap,Nt=new WeakMap,xt=new WeakMap,It=new WeakMap,Ot=new WeakMap,St=new WeakMap,ot=new WeakMap,Tt=new WeakMap,w=new WeakSet,qt=function(t){y(this,w,de).call(this);let s=i(this,b).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(U)),s},ae=function(){y(this,w,ce).call(this);const t=dt(this.options.staleTime,i(this,b));if(Ct||i(this,_).isStale||!ee(t))return;const r=$e(i(this,_).dataUpdatedAt,t)+1;o(this,Ot,ft.setTimeout(()=>{i(this,_).isStale||this.updateResult()},r))},oe=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,b)):this.options.refetchInterval)??!1},ue=function(t){y(this,w,le).call(this),o(this,ot,t),!(Ct||N(this.options.enabled,i(this,b))===!1||!ee(i(this,ot))||i(this,ot)===0)&&o(this,St,ft.setInterval(()=>{(this.options.refetchIntervalInBackground||Oe.isFocused())&&y(this,w,qt).call(this)},i(this,ot)))},he=function(){y(this,w,ae).call(this),y(this,w,ue).call(this,y(this,w,oe).call(this))},ce=function(){i(this,Ot)&&(ft.clearTimeout(i(this,Ot)),o(this,Ot,void 0))},le=function(){i(this,St)&&(ft.clearInterval(i(this,St)),o(this,St,void 0))},de=function(){const t=i(this,k).getQueryCache().build(i(this,k),this.options);if(t===i(this,b))return;const s=i(this,b);o(this,b,t),o(this,Lt,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},es=function(t){M.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(i(this,_))}),i(this,k).getQueryCache().notify({query:i(this,b),type:"observerResultsUpdated"})})},Ke);function Is(e,t){return N(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function xe(e,t){return Is(e,t)||e.state.data!==void 0&&fe(e,t,t.refetchOnMount)}function fe(e,t,s){if(N(t.enabled,e)!==!1&&dt(t.staleTime,e)!=="static"){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&Se(e,t)}return!1}function Ie(e,t,s,r){return(e!==t||N(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Se(e,s)}function Se(e,t){return N(t.enabled,e)!==!1&&e.isStaleByTime(dt(t.staleTime,e))}function Ts(e,t){return!Yt(e.getCurrentResult(),t)}function Te(e){return{onFetch:(t,s)=>{var v,f,g,d,E;const r=t.options,n=(g=(f=(v=t.fetchOptions)==null?void 0:v.meta)==null?void 0:f.fetchMore)==null?void 0:g.direction,a=((d=t.state.data)==null?void 0:d.pages)||[],h=((E=t.state.data)==null?void 0:E.pageParams)||[];let u={pages:[],pageParams:[]},p=0;const m=async()=>{let O=!1;const S=R=>{Cs(R,()=>t.signal,()=>O=!0)},P=Je(t.options,t.fetchOptions),Q=async(R,l,x)=>{if(O)return Promise.reject();if(l==null&&R.pages.length)return Promise.resolve(R);const tt=(()=>{const et={client:t.client,queryKey:t.queryKey,pageParam:l,direction:x?"backward":"forward",meta:t.options.meta};return S(et),et})(),C=await P(tt),{maxPages:I}=t.options,A=x?ws:Ss;return{pages:A(R.pages,C,I),pageParams:A(R.pageParams,l,I)}};if(n&&a.length){const R=n==="backward",l=R?Ds:De,x={pages:a,pageParams:h},q=l(r,x);u=await Q(x,q,R)}else{const R=e??a.length;do{const l=p===0?h[0]??r.initialPageParam:De(r,u);if(p>0&&l==null)break;u=await Q(u,l),p++}while(p<R)}return u};t.options.persister?t.fetchFn=()=>{var O,S;return(S=(O=t.options).persister)==null?void 0:S.call(O,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=m}}}function De(e,{pages:t,pageParams:s}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,s[r],s):void 0}function Ds(e,{pages:t,pageParams:s}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,s[0],s):void 0}var Ht,B,j,wt,z,st,Le,js=(Le=class extends Xe{constructor(t){super();c(this,z);c(this,Ht);c(this,B);c(this,j);c(this,wt);o(this,Ht,t.client),this.mutationId=t.mutationId,o(this,j,t.mutationCache),o(this,B,[]),this.state=t.state||ss(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){i(this,B).includes(t)||(i(this,B).push(t),this.clearGcTimeout(),i(this,j).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){o(this,B,i(this,B).filter(s=>s!==t)),this.scheduleGc(),i(this,j).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){i(this,B).length||(this.state.status==="pending"?this.scheduleGc():i(this,j).remove(this))}continue(){var t;return((t=i(this,wt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var h,u,p,m,v,f,g,d,E,O,S,P,Q,R,l,x,q,tt;const s=()=>{y(this,z,st).call(this,{type:"continue"})},r={client:i(this,Ht),meta:this.options.meta,mutationKey:this.options.mutationKey};o(this,wt,Ze({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(C,I)=>{y(this,z,st).call(this,{type:"failed",failureCount:C,error:I})},onPause:()=>{y(this,z,st).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>i(this,j).canRun(this)}));const n=this.state.status==="pending",a=!i(this,wt).canStart();try{if(n)s();else{y(this,z,st).call(this,{type:"pending",variables:t,isPaused:a}),i(this,j).config.onMutate&&await i(this,j).config.onMutate(t,this,r);const I=await((u=(h=this.options).onMutate)==null?void 0:u.call(h,t,r));I!==this.state.context&&y(this,z,st).call(this,{type:"pending",context:I,variables:t,isPaused:a})}const C=await i(this,wt).start();return await((m=(p=i(this,j).config).onSuccess)==null?void 0:m.call(p,C,t,this.state.context,this,r)),await((f=(v=this.options).onSuccess)==null?void 0:f.call(v,C,t,this.state.context,r)),await((d=(g=i(this,j).config).onSettled)==null?void 0:d.call(g,C,null,this.state.variables,this.state.context,this,r)),await((O=(E=this.options).onSettled)==null?void 0:O.call(E,C,null,t,this.state.context,r)),y(this,z,st).call(this,{type:"success",data:C}),C}catch(C){try{await((P=(S=i(this,j).config).onError)==null?void 0:P.call(S,C,t,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((R=(Q=this.options).onError)==null?void 0:R.call(Q,C,t,this.state.context,r))}catch(I){Promise.reject(I)}try{await((x=(l=i(this,j).config).onSettled)==null?void 0:x.call(l,void 0,C,this.state.variables,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((tt=(q=this.options).onSettled)==null?void 0:tt.call(q,void 0,C,t,this.state.context,r))}catch(I){Promise.reject(I)}throw y(this,z,st).call(this,{type:"error",error:C}),C}finally{i(this,j).runNext(this)}}},Ht=new WeakMap,B=new WeakMap,j=new WeakMap,wt=new WeakMap,z=new WeakSet,st=function(t){const s=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),M.batch(()=>{i(this,B).forEach(r=>{r.onMutationUpdate(t)}),i(this,j).notify({mutation:this,type:"updated",action:t})})},Le);function ss(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var J,G,Gt,Ne,As=(Ne=class extends Ut{constructor(t={}){super();c(this,J);c(this,G);c(this,Gt);this.config=t,o(this,J,new Set),o(this,G,new Map),o(this,Gt,0)}build(t,s,r){const n=new js({client:t,mutationCache:this,mutationId:++$t(this,Gt)._,options:t.defaultMutationOptions(s),state:r});return this.add(n),n}add(t){i(this,J).add(t);const s=Vt(t);if(typeof s=="string"){const r=i(this,G).get(s);r?r.push(t):i(this,G).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(i(this,J).delete(t)){const s=Vt(t);if(typeof s=="string"){const r=i(this,G).get(s);if(r)if(r.length>1){const n=r.indexOf(t);n!==-1&&r.splice(n,1)}else r[0]===t&&i(this,G).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Vt(t);if(typeof s=="string"){const r=i(this,G).get(s),n=r==null?void 0:r.find(a=>a.state.status==="pending");return!n||n===t}else return!0}runNext(t){var r;const s=Vt(t);if(typeof s=="string"){const n=(r=i(this,G).get(s))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}else return Promise.resolve()}clear(){M.batch(()=>{i(this,J).forEach(t=>{this.notify({type:"removed",mutation:t})}),i(this,J).clear(),i(this,G).clear()})}getAll(){return Array.from(i(this,J))}find(t){const s={exact:!0,...t};return this.getAll().find(r=>Re(s,r))}findAll(t={}){return this.getAll().filter(s=>Re(t,s))}notify(t){M.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return M.batch(()=>Promise.all(t.map(s=>s.continue().catch(U))))}},J=new WeakMap,G=new WeakMap,Gt=new WeakMap,Ne);function Vt(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Y,ut,K,Z,X,Jt,ye,He,_s=(He=class extends Ut{constructor(t,s){super();c(this,X);c(this,Y);c(this,ut);c(this,K);c(this,Z);o(this,Y,t),this.setOptions(s),this.bindMethods(),y(this,X,Jt).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=i(this,Y).defaultMutationOptions(t),Yt(this.options,s)||i(this,Y).getMutationCache().notify({type:"observerOptionsUpdated",mutation:i(this,K),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&Pt(s.mutationKey)!==Pt(this.options.mutationKey)?this.reset():((r=i(this,K))==null?void 0:r.state.status)==="pending"&&i(this,K).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=i(this,K))==null||t.removeObserver(this)}onMutationUpdate(t){y(this,X,Jt).call(this),y(this,X,ye).call(this,t)}getCurrentResult(){return i(this,ut)}reset(){var t;(t=i(this,K))==null||t.removeObserver(this),o(this,K,void 0),y(this,X,Jt).call(this),y(this,X,ye).call(this)}mutate(t,s){var r;return o(this,Z,s),(r=i(this,K))==null||r.removeObserver(this),o(this,K,i(this,Y).getMutationCache().build(i(this,Y),this.options)),i(this,K).addObserver(this),i(this,K).execute(t)}},Y=new WeakMap,ut=new WeakMap,K=new WeakMap,Z=new WeakMap,X=new WeakSet,Jt=function(){var s;const t=((s=i(this,K))==null?void 0:s.state)??ss();o(this,ut,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},ye=function(t){M.batch(()=>{var s,r,n,a,h,u,p,m;if(i(this,Z)&&this.hasListeners()){const v=i(this,ut).variables,f=i(this,ut).context,g={client:i(this,Y),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=i(this,Z)).onSuccess)==null||r.call(s,t.data,v,f,g)}catch(d){Promise.reject(d)}try{(a=(n=i(this,Z)).onSettled)==null||a.call(n,t.data,null,v,f,g)}catch(d){Promise.reject(d)}}else if((t==null?void 0:t.type)==="error"){try{(u=(h=i(this,Z)).onError)==null||u.call(h,t.error,v,f,g)}catch(d){Promise.reject(d)}try{(m=(p=i(this,Z)).onSettled)==null||m.call(p,void 0,t.error,v,f,g)}catch(d){Promise.reject(d)}}}this.listeners.forEach(v=>{v(i(this,ut))})})},He),W,Ge,Us=(Ge=class extends Ut{constructor(t={}){super();c(this,W);this.config=t,o(this,W,new Map)}build(t,s,r){const n=s.queryKey,a=s.queryHash??ve(n,s);let h=this.get(a);return h||(h=new Qs({client:t,queryKey:n,queryHash:a,options:t.defaultQueryOptions(s),state:r,defaultOptions:t.getQueryDefaults(n)}),this.add(h)),h}add(t){i(this,W).has(t.queryHash)||(i(this,W).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=i(this,W).get(t.queryHash);s&&(t.destroy(),s===t&&i(this,W).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){M.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return i(this,W).get(t)}getAll(){return[...i(this,W).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(r=>Pe(s,r))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(r=>Pe(t,r)):s}notify(t){M.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){M.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){M.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},W=new WeakMap,Ge),F,ht,ct,Dt,jt,lt,At,_t,Be,Zs=(Be=class{constructor(e={}){c(this,F);c(this,ht);c(this,ct);c(this,Dt);c(this,jt);c(this,lt);c(this,At);c(this,_t);o(this,F,e.queryCache||new Us),o(this,ht,e.mutationCache||new As),o(this,ct,e.defaultOptions||{}),o(this,Dt,new Map),o(this,jt,new Map),o(this,lt,0)}mount(){$t(this,lt)._++,i(this,lt)===1&&(o(this,At,Oe.subscribe(async e=>{e&&(await this.resumePausedMutations(),i(this,F).onFocus())})),o(this,_t,Zt.subscribe(async e=>{e&&(await this.resumePausedMutations(),i(this,F).onOnline())})))}unmount(){var e,t;$t(this,lt)._--,i(this,lt)===0&&((e=i(this,At))==null||e.call(this),o(this,At,void 0),(t=i(this,_t))==null||t.call(this),o(this,_t,void 0))}isFetching(e){return i(this,F).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return i(this,ht).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=i(this,F).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=i(this,F).build(this,t),r=s.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(dt(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return i(this,F).findAll(e).map(({queryKey:t,state:s})=>{const r=s.data;return[t,r]})}setQueryData(e,t,s){const r=this.defaultQueryOptions({queryKey:e}),n=i(this,F).get(r.queryHash),a=n==null?void 0:n.state.data,h=bs(t,a);if(h!==void 0)return i(this,F).build(this,r).setData(h,{...s,manual:!0})}setQueriesData(e,t,s){return M.batch(()=>i(this,F).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,s)]))}getQueryState(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=i(this,F).get(t.queryHash))==null?void 0:s.state}removeQueries(e){const t=i(this,F);M.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=i(this,F);return M.batch(()=>(s.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},r=M.batch(()=>i(this,F).findAll(e).map(n=>n.cancel(s)));return Promise.all(r).then(U).catch(U)}invalidateQueries(e,t={}){return M.batch(()=>(i(this,F).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},r=M.batch(()=>i(this,F).findAll(e).filter(n=>!n.isDisabled()&&!n.isStatic()).map(n=>{let a=n.fetch(void 0,s);return s.throwOnError||(a=a.catch(U)),n.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(U)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=i(this,F).build(this,t);return s.isStaleByTime(dt(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(U).catch(U)}fetchInfiniteQuery(e){return e.behavior=Te(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(U).catch(U)}ensureInfiniteQueryData(e){return e.behavior=Te(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Zt.isOnline()?i(this,ht).resumePausedMutations():Promise.resolve()}getQueryCache(){return i(this,F)}getMutationCache(){return i(this,ht)}getDefaultOptions(){return i(this,ct)}setDefaultOptions(e){o(this,ct,e)}setQueryDefaults(e,t){i(this,Dt).set(Pt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...i(this,Dt).values()],s={};return t.forEach(r=>{kt(e,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(e,t){i(this,jt).set(Pt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...i(this,jt).values()],s={};return t.forEach(r=>{kt(e,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...i(this,ct).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ve(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===be&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...i(this,ct).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){i(this,F).clear(),i(this,ht).clear()}},F=new WeakMap,ht=new WeakMap,ct=new WeakMap,Dt=new WeakMap,jt=new WeakMap,lt=new WeakMap,At=new WeakMap,_t=new WeakMap,Be),rs=D.createContext(void 0),is=e=>{const t=D.useContext(rs);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Xs=({client:e,children:t})=>(D.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),me.jsx(rs.Provider,{value:e,children:t})),ns=D.createContext(!1),qs=()=>D.useContext(ns);ns.Provider;function ks(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ks=D.createContext(ks()),Ls=()=>D.useContext(Ks),Ns=(e,t,s)=>{const r=s!=null&&s.state.error&&typeof e.throwOnError=="function"?ge(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Hs=e=>{D.useEffect(()=>{e.clearReset()},[e])},Gs=({result:e,errorResetBoundary:t,throwOnError:s,query:r,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(n&&e.data===void 0||ge(s,[e.error,r])),Bs=e=>{if(e.suspense){const s=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>s(r(...n)):s(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},zs=(e,t)=>e.isLoading&&e.isFetching&&!t,Ws=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,je=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function $s(e,t,s){var g,d,E,O;const r=qs(),n=Ls(),a=is(),h=a.defaultQueryOptions(e);(d=(g=a.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||d.call(g,h);const u=a.getQueryCache().get(h.queryHash);h._optimisticResults=r?"isRestoring":"optimistic",Bs(h),Ns(h,n,u),Hs(n);const p=!a.getQueryCache().get(h.queryHash),[m]=D.useState(()=>new t(a,h)),v=m.getOptimisticResult(h),f=!r&&e.subscribed!==!1;if(D.useSyncExternalStore(D.useCallback(S=>{const P=f?m.subscribe(M.batchCalls(S)):U;return m.updateResult(),P},[m,f]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),D.useEffect(()=>{m.setOptions(h)},[h,m]),Ws(h,v))throw je(h,m,n);if(Gs({result:v,errorResetBoundary:n,throwOnError:h.throwOnError,query:u,suspense:h.suspense}))throw v.error;if((O=(E=a.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||O.call(E,h,v),h.experimental_prefetchInRender&&!Ct&&zs(v,r)){const S=p?je(h,m,n):u==null?void 0:u.promise;S==null||S.catch(U).finally(()=>{m.updateResult()})}return h.notifyOnChangeProps?v:m.trackResult(v)}function tr(e,t){return $s(e,xs)}function er(e,t){const s=is(),[r]=D.useState(()=>new _s(s,e));D.useEffect(()=>{r.setOptions(e)},[r,e]);const n=D.useSyncExternalStore(D.useCallback(h=>r.subscribe(M.batchCalls(h)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=D.useCallback((h,u)=>{r.mutate(h,u).catch(U)},[r]);if(n.error&&ge(r.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:a,mutateAsync:n.mutate}}export{Zs as Q,Ys as R,is as a,er as b,Xs as c,me as j,tr as u};