@orvain/utils 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +64 -0
- package/README.md +48 -2
- package/dist/a11y.d.cts +102 -0
- package/dist/a11y.d.ts +103 -0
- package/dist/breakpoints.d.cts +36 -0
- package/dist/breakpoints.d.ts +37 -0
- package/dist/calendar.d.cts +127 -0
- package/dist/calendar.d.ts +128 -0
- package/dist/chart/color.d.cts +72 -0
- package/dist/chart/color.d.ts +73 -0
- package/dist/chart/index.d.cts +2 -0
- package/dist/chart/index.d.ts +3 -0
- package/dist/chart/math.d.cts +66 -0
- package/dist/chart/math.d.ts +67 -0
- package/dist/chart-items/index.d.cts +64 -0
- package/dist/chart-items/index.d.ts +65 -0
- package/dist/codeTokenizer.d.cts +29 -0
- package/dist/codeTokenizer.d.ts +30 -0
- package/dist/cssModule.d.cts +12 -0
- package/dist/cssModule.d.ts +13 -0
- package/dist/dismiss.d.cts +40 -0
- package/dist/dismiss.d.ts +41 -0
- package/dist/floating.d.cts +137 -0
- package/dist/floating.d.ts +138 -0
- package/dist/formField.d.cts +58 -0
- package/dist/formField.d.ts +59 -0
- package/dist/helpers.d.cts +17 -0
- package/dist/helpers.d.ts +18 -0
- package/dist/index.cjs +11 -0
- package/dist/index.d.cts +17 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +2819 -0
- package/dist/kanbanDnd.d.cts +71 -0
- package/dist/kanbanDnd.d.ts +72 -0
- package/dist/listNavigation.d.cts +36 -0
- package/dist/listNavigation.d.ts +37 -0
- package/dist/richText/blockquote.d.cts +11 -0
- package/dist/richText/blockquote.d.ts +12 -0
- package/dist/richText/editor.d.cts +117 -0
- package/dist/richText/editor.d.ts +118 -0
- package/dist/richText/index.d.cts +3 -0
- package/dist/richText/index.d.ts +4 -0
- package/dist/richText/model.d.cts +161 -0
- package/dist/richText/model.d.ts +162 -0
- package/dist/slider.d.cts +18 -0
- package/dist/slider.d.ts +19 -0
- package/dist/tree.d.cts +78 -0
- package/dist/tree.d.ts +79 -0
- package/dist/types.d.cts +22 -0
- package/dist/types.d.ts +23 -0
- package/package.json +56 -3
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let fn=0;function dn(t="orvain"){return`${t}-${++fn}`}const qt=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]'].join(", ");function $t(t){return Array.from(t.querySelectorAll(qt)).filter(e=>!e.closest("[hidden]")&&!e.closest('[aria-hidden="true"]'))}const hn="data-dialog-close",mn=['input:not([type="hidden"])',"select","textarea",'[contenteditable="true"]','[role="textbox"]','[role="searchbox"]','[role="combobox"]','[role="spinbutton"]'].join(", ");function fe(t){return!t||t.matches(qt)?t:t.querySelector(qt)??t}function pn(t,e){const n=typeof e=="string"?t.querySelector(e):e,o=$t(t).filter(r=>!r.closest(`[${hn}], [inert]`)&&r.getAttribute("aria-disabled")!=="true"),i=fe(n??null)??fe(t.querySelector("[data-autofocus]"))??o.find(r=>r.matches(mn))??o[0]??t;return i===t&&!t.hasAttribute("tabindex")&&t.setAttribute("tabindex","-1"),i.focus(),i}function gn(t){const e=n=>{if(n.key!=="Tab")return;const o=$t(t);if(o.length===0)return;const i=o[0],r=o[o.length-1];n.shiftKey?document.activeElement===i&&(n.preventDefault(),r.focus()):document.activeElement===r&&(n.preventDefault(),i.focus())};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}function yn(t,e="polite"){const n=`orvain-live-${e}`;let o=document.getElementById(n);o||(o=document.createElement("div"),o.id=n,o.setAttribute("aria-live",e),o.setAttribute("aria-atomic","true"),o.setAttribute("aria-relevant","additions"),Object.assign(o.style,{position:"absolute",width:"1px",height:"1px",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:"0"}),document.body.appendChild(o)),o.textContent="",requestAnimationFrame(()=>{o.textContent=t})}const ke='[role="menuitem"]:not([aria-disabled="true"]):not(:disabled), [role="menuitemcheckbox"]:not([aria-disabled="true"]):not(:disabled), [role="menuitemradio"]:not([aria-disabled="true"]):not(:disabled)';function It(t){return Array.from(t.querySelectorAll(ke)).filter(e=>e.closest('[role="menu"]')===t)}function ve(t,e){const n=It(t),o=(e&&n.includes(e)?e:void 0)??n.find(i=>i.getAttribute("tabindex")==="0")??n[0];return n.forEach(i=>i.setAttribute("tabindex",i===o?"0":"-1")),o}function Se(t,e){const n=It(t);if(!n.length)return;const o=e==="first"?0:e==="last"?n.length-1:(e+n.length)%n.length,i=n[o];return ve(t,i),i==null||i.focus(),i}function bn(t,e){const n=It(e);if(!n.length)return!1;const o=n.indexOf(document.activeElement);let i=null;switch(t.key){case"ArrowDown":i=o+1;break;case"ArrowUp":i=o<0?n.length-1:o-1;break;case"Home":i=0;break;case"End":i=n.length-1;break;default:if(t.key.length===1&&/\S/.test(t.key)&&!t.ctrlKey&&!t.metaKey&&!t.altKey){const r=t.key.toLowerCase(),a=[...n.slice(o+1),...n.slice(0,o+1)].find(c=>(c.getAttribute("aria-label")??c.textContent??"").trim().toLowerCase().startsWith(r));a&&(i=n.indexOf(a))}}return i===null?!1:(t.preventDefault(),Se(e,i),!0)}const Pt=(t,e,n)=>(t.x-n.x)*(e.y-n.y)-(e.x-n.x)*(t.y-n.y),xn=(t,e,n,o)=>{const i=Pt(t,e,n),r=Pt(t,n,o),s=Pt(t,o,e);return!((i<0||r<0||s<0)&&(i>0||r>0||s>0))};function wn({getSubmenuRect:t,onActivate:e,delay:n=120,aimDelay:o=300}){const i=[];let r,s;const a=()=>{const u=t(),l=i[i.length-1],d=i[0];if(!u||!l||!d||d===l)return!1;const g=u.left>=l.x?u.left:u.right;return xn(l,d,{x:g,y:u.top},{x:g,y:u.bottom})},c=()=>{r!==void 0&&clearTimeout(r),r=void 0},f=()=>{c();const u=i[i.length-1];r=setTimeout(()=>{if(r=void 0,i[i.length-1]!==u&&a()){f();return}s!==void 0&&e(s),s=void 0},a()?o:n)};return{move:u=>{i.push({x:u.clientX,y:u.clientY}),i.length>4&&i.shift()},enter:u=>{s=u,f()},enterSubmenu:()=>{s=void 0,c()},cancel:c}}function kn(t){const e=()=>{t.scrollLeft+t.clientWidth>=t.scrollWidth-1?t.dataset.scrollEnd="":delete t.dataset.scrollEnd},n=i=>{if(t.scrollWidth<=t.clientWidth||Math.abs(i.deltaY)<=Math.abs(i.deltaX))return;const r=t.scrollWidth-t.clientWidth,s=Math.max(0,Math.min(r,t.scrollLeft+i.deltaY));s!==t.scrollLeft&&(i.preventDefault(),t.scrollLeft=s)};e(),t.addEventListener("scroll",e,{passive:!0}),t.addEventListener("wheel",n,{passive:!1});const o=typeof ResizeObserver<"u"?new ResizeObserver(e):null;return o==null||o.observe(t),()=>{t.removeEventListener("scroll",e),t.removeEventListener("wheel",n),o==null||o.disconnect()}}function vn(t){const e=()=>{const r=Math.abs(t.scrollLeft),s=t.scrollWidth-t.clientWidth;t.toggleAttribute("data-more-start",r>1),t.toggleAttribute("data-more-end",s-r>1)},n=()=>{const{borderTopWidth:r,borderBottomWidth:s}=getComputedStyle(t),a=t.offsetHeight-t.clientHeight-parseFloat(r)-parseFloat(s);t.style.setProperty("--scrollbar-size",`${Math.max(0,a)}px`),e()};n(),t.addEventListener("scroll",e,{passive:!0});const o=typeof ResizeObserver<"u"?new ResizeObserver(n):null;o==null||o.observe(t);const i=typeof MutationObserver<"u"?new MutationObserver(n):null;return i==null||i.observe(t,{childList:!0}),()=>{t.removeEventListener("scroll",e),o==null||o.disconnect(),i==null||i.disconnect(),t.style.removeProperty("--scrollbar-size")}}function Sn(t,e){if(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)return!1;const n=t.key;if(n!=="ArrowUp"&&n!=="ArrowDown"&&n!=="ArrowLeft"&&n!=="ArrowRight")return!1;const o=document.activeElement;if(!o)return!1;const i=f=>$t(f).filter(u=>u.getClientRects().length>0),r=e.findIndex(f=>f.contains(o));if(r<0)return!1;const s=i(e[r]),a=s.indexOf(o);if(a<0)return!1;let c;if(n==="ArrowDown")c=s[a+1];else if(n==="ArrowUp")c=s[a-1];else{const f=n==="ArrowRight"?1:-1,u=o.getBoundingClientRect().top;for(let l=r+f;l>=0&&l<e.length&&!c;l+=f)c=i(e[l]).reduce((m,g)=>m?Math.abs(g.getBoundingClientRect().top-u)<Math.abs(m.getBoundingClientRect().top-u)?g:m:g,void 0)}return c?(t.preventDefault(),c.focus(),!0):!1}function Tn(...t){return t.filter(Boolean).join(" ")}function En(t){return Object.entries(t)}function An(t,e){const n={...t};return e.forEach(o=>delete n[o]),n}function Mn(t,e,n){return Math.min(Math.max(t,e),n)}const Dn={js:"js",mjs:"js",cjs:"js",jsx:"jsx",ts:"ts",mts:"ts",cts:"ts",tsx:"tsx",html:"html",htm:"html",vue:"html",svg:"html",xml:"html",css:"css",scss:"css",less:"css"};function Ln(t){var n;if(!t)return"plain";const e=((n=t.split(".").pop())==null?void 0:n.toLowerCase())??"";return Dn[e]??"plain"}const Cn=new Set(["abstract","as","async","await","break","case","catch","class","const","continue","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","instanceof","interface","is","keyof","let","namespace","new","null","of","private","protected","public","readonly","return","satisfies","set","static","super","switch","this","throw","true","try","type","typeof","undefined","var","void","while","with","yield"]),$n=new Set(["any","bigint","boolean","never","number","object","string","symbol","unknown"]);function In(){const t=[];return{tokens:t,push:(n,o)=>{if(!n)return;const i=t[t.length-1];i&&i.type===o?i.content+=n:t.push({content:n,type:o})}}}const Fn=/[A-Za-z_$]/,Rn=/[\w$]/,On=/^(?:0[xX][\da-fA-F_]+|0[bB][01_]+|0[oO][0-7_]+|(?:\d[\d_]*\.?[\d_]*|\.\d[\d_]*)(?:[eE][+-]?\d+)?n?)/;function Ft(t,e){const n=t[e];let o=e+1;for(;o<t.length;){const i=t[o];if(i==="\\"){o+=2;continue}if(i===n)return o+1;if(i===`
|
|
2
|
+
`&&n!=="`")return o;o+=1}return o}function yt(t,e,n,o=0,i=!1){let r=o,s=0,a=null;const c=()=>!a||a.type==="punctuation"&&!/[)\]}]$/.test(a.content)||a.type==="keyword"&&/^(return|yield|await|case|default|else|do|in|of|typeof|void|new)$/.test(a.content);for(;r<t.length;){const f=t[r],u=t[r+1];if(i&&f==="}"&&s===0)return r;if(/\s/.test(f)){let m=r+1;for(;m<t.length&&/\s/.test(t[m]);)m+=1;e(t.slice(r,m),"plain"),r=m;continue}if(f==="/"&&u==="/"){let m=t.indexOf(`
|
|
3
|
+
`,r);m===-1&&(m=t.length),e(t.slice(r,m),"comment"),r=m;continue}if(f==="/"&&u==="*"){let m=t.indexOf("*/",r+2);m=m===-1?t.length:m+2,e(t.slice(r,m),"comment"),r=m;continue}if(f==='"'||f==="'"||f==="`"){const m=Ft(t,r);e(t.slice(r,m),"string"),a={type:"string",content:""},r=m;continue}if(/\d/.test(f)||f==="."&&u&&/\d/.test(u)){const m=On.exec(t.slice(r)),g=m?m[0].length:1;e(t.slice(r,r+g),"number"),a={type:"number",content:""},r+=g;continue}if(Fn.test(f)){let m=r+1;for(;m<t.length&&Rn.test(t[m]);)m+=1;const g=t.slice(r,m);let v=m;for(;v<t.length&&(t[v]===" "||t[v]===" ");)v+=1;let x;Cn.has(g)?x="keyword":$n.has(g)?x="builtin":t[v]==="("?x="function":/^[A-Z]/.test(g)?x="type":x="variable",e(g,x),a={type:x,content:g},r=m;continue}if(n&&f==="<"&&u&&/[A-Za-z>]/.test(u)&&c()){r=Pn(t,r,e),a={type:"punctuation",content:")"};continue}f==="{"&&(s+=1),f==="}"&&(s-=1);let l=r+1;if(!/[(){}[\];,]/.test(f))for(;l<t.length&&/[=+\-*/%<>!&|^~?:.]/.test(t[l])&&!(t[l]==="/"&&/[/*]/.test(t[l+1]??""));)l+=1;const d=t.slice(r,l);e(d,"punctuation"),a={type:"punctuation",content:d},r=l}return r}function Pn(t,e,n){let o=e,i=0;for(;o<t.length;){const r=t[o+1]==="/";n(r?"</":"<","punctuation"),o+=r?2:1;let s=o;for(;s<t.length&&/[\w$.:-]/.test(t[s]);)s+=1;n(t.slice(o,s),"tag"),o=s;let a=!1;for(;o<t.length;){const c=t[o];if(/\s/.test(c)){let f=o+1;for(;f<t.length&&/\s/.test(t[f]);)f+=1;n(t.slice(o,f),"plain"),o=f}else if(c==="/"&&t[o+1]===">"){n("/>","punctuation"),o+=2,a=!0;break}else if(c===">"){n(">","punctuation"),o+=1;break}else if(c==='"'||c==="'"){const f=Ft(t,o);n(t.slice(o,f),"string"),o=f}else if(c==="{")n("{","punctuation"),o=yt(t,n,!0,o+1,!0),t[o]==="}"&&(n("}","punctuation"),o+=1);else if(/[\w$-]/.test(c)){let f=o+1;for(;f<t.length&&/[\w$:-]/.test(t[f]);)f+=1;n(t.slice(o,f),"attr"),o=f}else n(c,"punctuation"),o+=1}if(r?i-=1:a||(i+=1),i<=0)return o;for(;o<t.length&&t[o]!=="<";){if(t[o]==="{"){n("{","punctuation"),o=yt(t,n,!0,o+1,!0),t[o]==="}"&&(n("}","punctuation"),o+=1);continue}let c=o;for(;c<t.length&&t[c]!=="<"&&t[c]!=="{";)c+=1;const f=t.slice(o,c),u=/^\s*/.exec(f)[0],l=/\s*$/.exec(f.slice(u.length))[0];n(u,"plain"),n(f.slice(u.length,f.length-l.length),"text"),n(l,"plain"),o=c}}return o}function Te(t,e,n=0,o=t.length){let i=n,r=0,s=!1,a=0;for(;i<o;){const c=t[i],f=t[i+1];if(/\s/.test(c)){let u=i+1;for(;u<o&&/\s/.test(t[u]);)u+=1;e(t.slice(i,u),"plain"),i=u;continue}if(c==="/"&&f==="*"){let u=t.indexOf("*/",i+2);u=u===-1||u>o?o:u+2,e(t.slice(i,u),"comment"),i=u;continue}if(c==='"'||c==="'"){const u=Math.min(Ft(t,i),o);e(t.slice(i,u),"string"),i=u;continue}if(c==="@"){let u=i+1;for(;u<o&&/[\w-]/.test(t[u]);)u+=1;e(t.slice(i,u),"keyword"),i=u;continue}if(c==="{"){r+=1,s=!1,e(c,"punctuation"),i+=1;continue}if(c==="}"){r=Math.max(0,r-1),s=!1,e(c,"punctuation"),i+=1;continue}if(c==="("&&!s){a+=1,e(c,"punctuation"),i+=1;continue}if(c===")"&&a>0){a-=1,s=!1,e(c,"punctuation"),i+=1;continue}if(c===";"){s=!1,e(c,"punctuation"),i+=1;continue}if((r||a)&&!s&&/[\w-]/.test(c)){let u=i+1;for(;u<o&&/[\w-]/.test(t[u]);)u+=1;let l=u;for(;l<o&&(t[l]===" "||t[l]===" ");)l+=1;if(t[l]===":"){e(t.slice(i,u),"attr"),e(t.slice(u,l),"plain"),e(":","punctuation"),s=!0,i=l+1;continue}}if(s){if(c==="#"&&f&&/[\da-fA-F]/.test(f)){let u=i+1;for(;u<o&&/[\da-fA-F]/.test(t[u]);)u+=1;e(t.slice(i,u),"number"),i=u;continue}if(/\d/.test(c)||(c==="."||c==="-")&&f&&/\d/.test(f)){const u=/^-?(?:\d+\.?\d*|\.\d+)(?:[a-zA-Z%]+)?/.exec(t.slice(i,o)),l=u?u[0].length:1;e(t.slice(i,i+l),"number"),i+=l;continue}if(/[A-Za-z_-]/.test(c)){let u=i+1;for(;u<o&&/[\w-]/.test(t[u]);)u+=1;const l=t.slice(i,u);e(l,t[u]==="("?"function":l.startsWith("--")?"variable":"builtin"),i=u;continue}e(c,"punctuation"),i+=1;continue}if(c===":"){let u=i+1;for(;u<o&&/[\w:-]/.test(t[u]);)u+=1;e(t.slice(i,u),"keyword"),i=u;continue}if(/[\w.#*-]/.test(c)){let u=i+1;for(;u<o&&/[\w-]/.test(t[u]);)u+=1;e(t.slice(i,u),c==="."||c==="#"?"type":"tag"),i=u;continue}e(c,"punctuation"),i+=1}}function Nn(t,e){let n=0;for(;n<t.length;){if(t.startsWith("<!--",n)){let a=t.indexOf("-->",n+4);a=a===-1?t.length:a+3,e(t.slice(n,a),"comment"),n=a;continue}if(t[n]==="<"&&/[A-Za-z/!]/.test(t[n+1]??"")){const a=t[n+1]==="/",c=a?"</":t[n+1]==="!"?"<!":"<";e(c,"punctuation"),n+=c.length;let f=n;for(;f<t.length&&/[\w:-]/.test(t[f]);)f+=1;const u=t.slice(n,f).toLowerCase();for(e(t.slice(n,f),c==="<!"?"keyword":"tag"),n=f;n<t.length&&t[n]!==">";){const l=t[n];if(/\s/.test(l)){let d=n+1;for(;d<t.length&&/\s/.test(t[d]);)d+=1;e(t.slice(n,d),"plain"),n=d}else if(l==='"'||l==="'"){const d=Ft(t,n);e(t.slice(n,d),"string"),n=d}else if(l==="/"||l==="=")e(l,"punctuation"),n+=1;else{let d=n+1;for(;d<t.length&&!/[\s=>/"']/.test(t[d]);)d+=1;e(t.slice(n,d),t[n-1]==="="?"string":"attr"),n=d}}if(t[n]===">"&&(e(">","punctuation"),n+=1),!a&&(u==="script"||u==="style")){let l=t.toLowerCase().indexOf(`</${u}`,n);l===-1&&(l=t.length),u==="style"?Te(t,e,n,l):yt(t.slice(0,l),e,!1,n),n=l}continue}let o=n;for(;o<t.length&&t[o]!=="<";)o+=1;o===n&&(o+=1);const i=t.slice(n,o),r=/^\s*/.exec(i)[0],s=/\s*$/.exec(i.slice(r.length))[0];e(r,"plain"),e(i.slice(r.length,i.length-s.length),"text"),e(s,"plain"),n=o}}function Ee(t){const e=[[]];for(const n of t)n.content.split(/\r?\n/).forEach((i,r)=>{r>0&&e.push([]),i&&e[e.length-1].push({...n,content:i})});return e}function _n(t,e="plain"){const{tokens:n,push:o}=In();switch(e){case"js":case"ts":yt(t,o,!1);break;case"jsx":case"tsx":yt(t,o,!0);break;case"css":Te(t,o);break;case"html":Nn(t,o);break;default:o(t,"plain")}return Ee(n)}const Ae=["neutral","grey","blue","purple","yellow","orange","green","red"],Kn=["blue-light","blue-lighter","blue-dark","yellow-light","orange-light","green-dark","green-darker"];function pt(t,e="fill"){return`var(--orvain-chart-${e}-${t})`}function Bn(t){return`var(--orvain-chart-caption-${t}, ${pt(t,"dot")})`}function qn(t="solid"){return t==="ghost20"?.2:t==="ghost8"?.08:1}function zn(t){const e=Ae.filter(o=>o!=="neutral"),n=(t%e.length+e.length)%e.length;return e[n]}function jn(t,e="--chart-color"){return{[e]:pt(t,"fill"),[`${e}-subtle`]:pt(t,"accent"),[`${e}-soft`]:pt(t,"soft")}}function Yt(t,e,n){return Math.min(n,Math.max(e,t))}function Hn(t){return t.reduce((e,n)=>e+(Number.isFinite(n.value)?n.value:0),0)}function Un(t){return t.reduce((e,n)=>Number.isFinite(n.value)&&n.value>e?n.value:e,0)}function Wn(t,e){return!e||!Number.isFinite(t)?0:Yt(t/e*100,0,100)}function Vn(t){if(!(t>0))return 1;const e=10**Math.floor(Math.log10(t));for(const n of[1,2,2.5,5,10])if(t<=n*e)return n*e;return 10*e}function Yn(t,e=4){const n=Math.max(1,Math.round(e));return Array.from({length:n+1},(o,i)=>t*i/n)}function Gn(t,e){const[n,o]=t,[i,r]=e,s=o-n||1;return a=>i+(a-n)/s*(r-i)}function Xn(t){let e=0;return t.map(n=>{const o=e;return e+=Number.isFinite(n)&&n>0?n:0,{start:o,end:e}})}function dt(t,e,n,o){const i=(o-90)*Math.PI/180;return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}}function Zn(t,e,n,o,i,r){const s=Yt(r-i,0,359.999),a=i+s,c=s>180?1:0,f=dt(t,e,n,i),u=dt(t,e,n,a);if(o<=0)return`M ${t} ${e} L ${f.x} ${f.y} A ${n} ${n} 0 ${c} 1 ${u.x} ${u.y} Z`;const l=dt(t,e,o,a),d=dt(t,e,o,i);return[`M ${f.x} ${f.y}`,`A ${n} ${n} 0 ${c} 1 ${u.x} ${u.y}`,`L ${l.x} ${l.y}`,`A ${o} ${o} 0 ${c} 0 ${d.x} ${d.y}`,"Z"].join(" ")}function Qn(t,e=n=>String(n)){return t.map(n=>`${n.label} ${e(n.value)}`).join(", ")}function Jn(t,e,n){if(n<=0)return null;switch(t){case"ArrowRight":case"ArrowDown":return Math.min(n-1,e+1);case"ArrowLeft":case"ArrowUp":return Math.max(0,e-1);case"Home":return 0;case"End":return n-1;default:return null}}function to(t,e,n,o,i=!1){if(o<=0||n<=0)return null;const r=Math.floor(e/n),s=e%n,a=Math.min(o-1,r*n+n-1);switch(t){case"ArrowRight":return Math.min(e+1,a);case"ArrowLeft":return s>0?e-1:e;case"ArrowDown":return e+n<o?e+n:e;case"ArrowUp":return e>=n?e-n:e;case"Home":return i?0:r*n;case"End":return i?o-1:a;case"PageUp":return s;case"PageDown":return s+Math.floor((o-1-s)/n)*n;default:return null}}function eo(t,e){return!Number.isFinite(t)||!Number.isFinite(e)||e<=0?0:Math.min(Math.max(t/e,0),1)}function Me(t){return t.reduce((e,n)=>Number.isFinite(n)&&n>0?e+n:e,0)}function no(t,e){const n=t.map(s=>Number.isFinite(s)&&s>0?s:0),o=Me(n),i=e!==void 0&&Number.isFinite(e)&&e>o?e:o;return i<=0?{shares:n.map(()=>0),rest:1,total:0}:{shares:n.map(s=>s/i),rest:Math.max(0,1-o/i),total:i}}function De(t){return t.map((e,n)=>`${n===0?"M":"L"}${A(e.x)} ${A(e.y)}`).join(" ")}function oo(t){if(t.length===0)return"";const[e,...n]=t;let o=`M${A(e.x)} ${A(e.y)}`,i=e;for(const r of n){const s=(r.x-i.x)/3;o+=` C${A(i.x+s)} ${A(i.y)} ${A(r.x-s)} ${A(r.y)} ${A(r.x)} ${A(r.y)}`,i=r}return o}function io(t,e){if(t.length===0)return"";const n=e/2,o=t[0].x,i=t[t.length-1].x,r=[];for(const s of t)r.push({x:Math.max(o,s.x-n),y:s.y}),r.push({x:Math.min(i,s.x+n),y:s.y});return De(r)}function ro(t,e,n){if(!t||e.length===0)return"";const o=e[0],i=e[e.length-1];return`${t} L${A(i.x)} ${A(n)} L${A(o.x)} ${A(n)} Z`}function At(t,e,n,o){return{x:t+n*Math.sin(o),y:e-n*Math.cos(o)}}function so(t,e,n,o,i){const r=Math.min(Math.max(i-o,0),Math.PI*2-1e-4),s=At(t,e,n,o),a=At(t,e,n,o+r),c=r>Math.PI?1:0;return`M${A(s.x)} ${A(s.y)} A${A(n)} ${A(n)} 0 ${c} 1 ${A(a.x)} ${A(a.y)}`}function ao(t,e,n,o,i,r,s=0){const a=r-i;if(a<=0)return"";const c=n-o,f=Math.max(0,Math.min(s,c/2,a*o/2)),u=f/n,l=f/o,d=(x,b)=>At(t,e,x,b),m=x=>`${A(x.x)} ${A(x.y)}`,g=a-2*u>Math.PI?1:0,v=a-2*l>Math.PI?1:0;return[`M${m(d(n-f,i))}`,`Q${m(d(n,i))} ${m(d(n,i+u))}`,`A${A(n)} ${A(n)} 0 ${g} 1 ${m(d(n,r-u))}`,`Q${m(d(n,r))} ${m(d(n-f,r))}`,`L${m(d(o+f,r))}`,`Q${m(d(o,r))} ${m(d(o,r-l))}`,`A${A(o)} ${A(o)} 0 ${v} 0 ${m(d(o,i+l))}`,`Q${m(d(o,i))} ${m(d(o+f,i))}`,"Z"].join(" ")}function lo(t,e=0){const n=Math.PI*2,o=t.filter(s=>s>0).length,i=n-(o>1?e*o:0);let r=o>1?e/2:0;return t.map(s=>{if(s<=0)return{start:r,end:r};const a=r,c=a+s*i;return r=c+(o>1?e:0),{start:a,end:c}})}function A(t){return Math.round(t*100)/100}const zt=864e5;function z(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())}function Y(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+e)}function Le(t){return new Date(t.getFullYear(),t.getMonth(),1)}function co(t,e){return new Date(t.getFullYear(),t.getMonth()+e,1)}function Ce(t){return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()}function $e(t,e){const n=new Date(t.getFullYear(),t.getMonth()+e,1),o=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return new Date(n.getFullYear(),n.getMonth(),Math.min(t.getDate(),o))}function Mt(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function Ie(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function bt(t,e=0){const n=z(t);return Y(n,-((n.getDay()-e+7)%7))}function ot(t){return z(t).getTime()}function jt(t,e){return ot(t)<ot(e)}function uo(t,e,n){const o=ot(t);return!!e&&o<ot(e)||!!n&&o>ot(n)}function fo(t,e,n){return e&&jt(t,e)?z(e):n&&jt(n,t)?z(n):t}function ho(t){return`${t.getFullYear()}-${t.getMonth()}-${t.getDate()}`}function mo(t,e,n=0){if(e==="day")return[z(t)];if(e==="week"){const o=bt(t,n);return Array.from({length:7},(i,r)=>Y(o,r))}return Fe(t,n).flat()}function Fe(t,e=0,n=!1){return Re(t,e,n).map(o=>o.map(i=>i.date))}function Re(t,e=0,n=!1){const o=Le(t),i=Ce(t),r=(o.getDay()-e+7)%7,s=n?42:Math.ceil((r+i)/7)*7,a=[];for(let c=0;c<s;c+=1){c%7===0&&a.push([]);const f=c-r,u=new Date(t.getFullYear(),t.getMonth(),1+f);a[a.length-1].push({date:u,day:u.getDate(),inMonth:f>=0&&f<i,trailing:f>=i})}return a}function po(t,e,n){return e==="day"?Y(t,n):e==="week"?Y(t,7*n):$e(t,n)}function go(t=0,e="en-US",n="short"){const o=new Intl.DateTimeFormat(e,{weekday:n,timeZone:"UTC"}),i=Date.UTC(2025,7,3);return Array.from({length:7},(r,s)=>o.format(new Date(i+(s+t)%7*zt)).replace(/\./g,""))}function yo(t,e="en-US"){const n=new Intl.DateTimeFormat(e,{month:"long",year:"numeric"}).format(t);return n.charAt(0).toLocaleUpperCase(e)+n.slice(1)}function St(t,e="en-US"){return new Intl.DateTimeFormat(e,{month:"short",day:"2-digit",year:"numeric"}).format(t)}function bo(t,e,n="en-US",o="—"){if(t&&e)return`${St(t,n)} – ${St(e,n)}`;const i=t??e;return i?St(i,n):o}function xo(t,e,n="en-US",o=0){if(e==="day")return new Intl.DateTimeFormat(n,{month:"long",day:"numeric",year:"numeric"}).format(t);if(e==="month")return new Intl.DateTimeFormat(n,{month:"long",year:"numeric"}).format(t);const i=bt(t,o),r=Y(i,6),s=new Intl.DateTimeFormat(n,{month:"short",day:"numeric"}),a=i.getMonth()===r.getMonth()?String(r.getDate()):s.format(r);return`${s.format(i)} - ${a}, ${r.getFullYear()}`}function wo(t,e="en-US"){return new Intl.DateTimeFormat(e,{hour:"numeric"}).format(new Date(2025,0,1,t)).replace(/\s/g,"").toLowerCase()}function Ht(t,e="en-US"){return new Intl.DateTimeFormat(e,{hour:"numeric",minute:"2-digit"}).format(t)}function ko(t,e="en-US"){if(Mt(t.start,new Date(t.end.getTime()-1)))return`${Ht(t.start,e)} – ${Ht(t.end,e)}`;const n=new Intl.DateTimeFormat(e,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"});return`${n.format(t.start)} – ${n.format(t.end)}`}function vo(t,e){const n=z(e).getTime(),o=Y(e,1).getTime();return t.filter(i=>i.start.getTime()<o&&i.end.getTime()>n).sort((i,r)=>i.start.getTime()-r.start.getTime())}const de=t=>t.getHours()+t.getMinutes()/60;function So(t,e,n=0,o=24,i=0){if(e.length===0)return[];const r=z(e[0]).getTime(),s=Y(e[e.length-1],1).getTime(),a=o-n,c=[];for(const l of t){const d=l.start.getTime(),m=l.end.getTime();if(m<=r||d>=s)continue;const g=d<r?e[0]:z(l.start),v=m>s?e[e.length-1]:z(new Date(m-1)),x=Math.round((g.getTime()-r)/zt),b=Math.round((v.getTime()-g.getTime())/zt)+1,k=b>1,E=d<r?0:de(l.start),C=de(new Date(m))||24,M=k?C>E?C:E+1:C,D=Math.min(Math.max(E-n,0),a),$=Math.min(Math.max(M-n,0),a);c.push({event:l,dayIndex:x,daySpan:b,top:D,height:Math.max($-D,i),lane:0,lanes:1})}c.sort((l,d)=>l.top-d.top||d.height-l.height||l.dayIndex-d.dayIndex);const f=(l,d)=>l.dayIndex<d.dayIndex+d.daySpan&&d.dayIndex<l.dayIndex+l.daySpan&&l.top<d.top+d.height&&d.top<l.top+l.height,u=[];for(const l of c){const d=u.find(m=>m.some(g=>f(l,g)));d?d.push(l):u.push([l])}for(const l of u){const d=[];for(const m of l){let g=d.findIndex(v=>v.every(x=>!f(x,m)));g===-1&&(g=d.length,d.push([])),d[g].push(m),m.lane=g}for(const m of l)m.lanes=d.length}return c}function To(t){const e=[...t].sort((o,i)=>o.top-i.top||i.height-o.height),n=[];for(const o of e){const i=n[n.length-1],r=i==null?void 0:i[0];i&&r&&o.top<r.top+r.height?i.push(o):n.push([o])}return n}function Eo(t,e,n,o=0){return n==="day"?Mt(t,e):n==="month"?Ie(t,e):Mt(bt(t,o),bt(e,o))}function Ao(t,e,n){const o=[],i=(r,s,a)=>{var u;const c=a!==null&&!!((u=n.hasAddRow)!=null&&u.call(n,a)),f=r.length+(c?1:0);r.forEach((l,d)=>{var v;const m=n.isExpandable(l),g=m&&e.has(l.id);o.push({kind:"node",id:l.id,node:l,parentId:a?a.id:null,level:s,posinset:d+1,setsize:f,expandable:m,expanded:g,disabled:!!((v=n.isDisabled)!=null&&v.call(n,l))}),g&&i(l.children??[],s+1,l)}),c&&a&&o.push({kind:"add",id:`${a.id}::add`,node:a,parentId:a.id,level:s,posinset:f,setsize:f,expandable:!1,expanded:!1})};return i(t,1,null),o}function Mo(t){const e=[],n=o=>{for(const i of o)e.push(i.id),i.children&&n(i.children)};return n(t),e}function Do(t,e,n){const o=f=>f!==void 0&&!f.disabled,i=n.find(o),r=n.findIndex(f=>f.id===e);if(r<0)return i?{focus:i.id}:null;const s=n[r],a=(f,u)=>{for(let l=f+u;l>=0&&l<n.length;l+=u)if(o(n[l]))return n[l].id},c=f=>f!==void 0?{focus:f}:{};switch(t){case"ArrowDown":return c(a(r,1));case"ArrowUp":return c(a(r,-1));case"Home":return c(i==null?void 0:i.id);case"End":return c(a(n.length,-1));case"ArrowRight":if(!s.expandable||s.disabled)return{};if(!s.expanded)return{expand:[s.id]};{const f=n[r+1];return f&&f.parentId===s.id&&o(f)?{focus:f.id}:{}}case"ArrowLeft":{if(s.expandable&&s.expanded&&!s.disabled)return{collapse:s.id};const f=n.find(u=>u.id===s.parentId);return o(f)?{focus:f.id}:{}}case"Enter":case" ":return s.disabled?{}:{activate:s.id};case"*":return{expand:n.filter(u=>u.kind==="node"&&u.parentId===s.parentId&&u.expandable&&!u.expanded&&!u.disabled).map(u=>u.id)};default:return null}}function Lo(t=500){let e="",n=0;return function(i,r,s,a=c=>c.node.label){const c=Date.now();e=c-n>t?i:e+i,n=c;const f=e.toLowerCase(),u=s.findIndex(d=>d.id===r),l=e.length===1?1:0;for(let d=0;d<s.length;d++){const m=s[(u+l+d+s.length)%s.length];if(!m.disabled&&a(m).toLowerCase().startsWith(f))return m.id}return null}}function Co(t){return t.key.length===1&&t.key!==" "&&t.key!=="*"&&!t.ctrlKey&&!t.metaKey&&!t.altKey}const Oe={pickedUp:t=>`Picked up ${t.card}. ${t.column}, position ${t.position} of ${t.total}. Use the arrow keys to move, Space to drop, Escape to cancel.`,moved:t=>`${t.card}: ${t.column}, position ${t.position} of ${t.total}.`,dropped:t=>t.column===t.fromColumn&&t.position===t.fromPosition?`${t.card} dropped back at ${t.column}, position ${t.position} of ${t.total}.`:`${t.card} dropped in ${t.column}, position ${t.position} of ${t.total}.`,cancelled:t=>`Move cancelled. ${t.card} returned to ${t.fromColumn}, position ${t.fromPosition} of ${t.fromTotal}.`},$o="Use the arrow keys to move between cards. Press Space to pick up the card; while it is picked up, use the arrow keys to move it, Space to drop it and Escape to cancel.",Io="a[href], button, input, select, textarea, [contenteditable], [tabindex]",Fo=6,Ro=300,kt=48;function Oo(t,e){let n=e,o=null,i="",r=null,s={x:0,y:0},a=!1;const c=()=>({...Oe,...n.announcements}),f=h=>{i=h===i?`${h} `:h,n.announce(i)},u=()=>Array.from(t.querySelectorAll("[data-kanban-column]")),l=h=>Array.from(h.querySelectorAll("[data-kanban-card]")),d=(h,p)=>l(h).filter(y=>y!==p),m=h=>h.dataset.kanbanColumnLabel??h.dataset.kanbanColumn??"",g=h=>h.dataset.kanbanCardLabel??h.dataset.kanbanCard??"",v=h=>h.hasAttribute("data-kanban-handle")?h:h.querySelector("[data-kanban-handle]"),x=h=>{var p;return((p=h.parentElement)==null?void 0:p.tagName)==="LI"?h.parentElement:h},b=h=>({card:g(h.card),column:m(h.toColumn),position:h.index+1,total:d(h.toColumn,h.card).length+1,fromColumn:m(h.fromColumn),fromPosition:h.fromIndex+1,fromTotal:h.fromTotal}),k=()=>{t.querySelectorAll("[data-kanban-drop]").forEach(h=>h.removeAttribute("data-kanban-drop")),t.querySelectorAll("[data-kanban-drop-target]").forEach(h=>h.removeAttribute("data-kanban-drop-target"))},E=h=>{if(k(),h.toColumn.setAttribute("data-kanban-drop-target",""),h.toColumn===h.fromColumn&&h.index===h.fromIndex)return;const y=d(h.toColumn,h.card);h.index<y.length?x(y[h.index]).setAttribute("data-kanban-drop","before"):y.length>0&&x(y[y.length-1]).setAttribute("data-kanban-drop","after")},C=(h,p)=>{const y=h.closest("[data-kanban-column]"),w=h.dataset.kanbanCard;if(!y||!t.contains(y)||w==null)return!1;const T=l(y);return o={mode:p,card:h,cardId:w,fromColumn:y,fromIndex:T.indexOf(h),fromTotal:T.length,toColumn:y,index:T.indexOf(h)},t.setAttribute("data-kanban-dragging",p),h.setAttribute("data-kanban-lifted",p),E(o),f(c().pickedUp(b(o))),!0},M=h=>{const p=o;if(!p)return;o=null,k(),t.removeAttribute("data-kanban-dragging"),p.card.removeAttribute("data-kanban-lifted"),ne();const y=b(p);if(!h){f(c().cancelled(y));return}f(c().dropped(y));const w=p.fromColumn.dataset.kanbanColumn??"",T=p.toColumn.dataset.kanbanColumn??"";if(!(w===T&&p.index===p.fromIndex)&&(n.onMove({cardId:p.cardId,fromColumn:w,toColumn:T,index:p.index,fromIndex:p.fromIndex}),p.mode==="keyboard")){const P=I=>{const B=`[data-kanban-card="${window.CSS.escape(p.cardId)}"]`,J=t.querySelector(B),H=J&&v(J);H&&document.activeElement!==H&&(F(H),H.focus({preventScroll:!1})),I>0&&requestAnimationFrame(()=>P(I-1))};requestAnimationFrame(()=>P(2))}},D=(h,p)=>{if(!o)return;const y=d(h,o.card).length,w=Math.max(0,Math.min(p,y));h===o.toColumn&&w===o.index||(o.toColumn=h,o.index=w,E(o),f(c().moved(b(o))))},$=h=>l(h).map(p=>v(p)).filter(p=>p!=null),F=h=>{const p=h.closest("[data-kanban-column]");p&&$(p).forEach(y=>y.setAttribute("tabindex",y===h?"0":"-1"))},j=()=>{u().forEach(h=>{const p=$(h),y=p.find(w=>w===document.activeElement)??p.find(w=>w.getAttribute("tabindex")==="0")??p[0];p.forEach(w=>w.setAttribute("tabindex",w===y?"0":"-1"))})},_=h=>{h&&(F(h),h.focus(),h.scrollIntoView({block:"nearest",inline:"nearest"}))},V=(h,p)=>{const y=h.closest("[data-kanban-card]"),w=y==null?void 0:y.closest("[data-kanban-column]");if(!y||!w)return!1;const T=$(w),P=T.indexOf(h),I={ArrowUp:T[P-1],ArrowDown:T[P+1],Home:T[0],End:T[T.length-1]};if(p in I)return _(I[p]),!0;if(p==="ArrowLeft"||p==="ArrowRight"){const B=p==="ArrowRight"!=(getComputedStyle(t).direction==="rtl")?1:-1,J=u();for(let H=J.indexOf(w)+B;H>=0&&H<J.length;H+=B){const Ot=$(J[H]);if(Ot.length){_(Ot[Math.min(P,Ot.length-1)]);break}}return!0}return!1},R=h=>{var y;const p=h.target;(y=p.hasAttribute)!=null&&y.call(p,"data-kanban-handle")&&F(p)},L=new window.MutationObserver(()=>{o||j()});L.observe(t,{childList:!0,subtree:!0}),j();const S=h=>{if((o==null?void 0:o.mode)==="pointer"){h.key==="Escape"&&(h.preventDefault(),M(!1));return}const p=h.target;if(!o){if(!p.hasAttribute("data-kanban-handle"))return;if(h.key!==" "){!h.altKey&&!h.ctrlKey&&!h.metaKey&&!h.shiftKey&&V(p,h.key)&&h.preventDefault();return}const P=p.closest("[data-kanban-card]");if(!P)return;h.preventDefault(),a=!0,C(P,"keyboard");return}const y=o,w=u(),T=w.indexOf(y.toColumn);switch(h.key){case"ArrowUp":h.preventDefault(),D(y.toColumn,y.index-1);break;case"ArrowDown":h.preventDefault(),D(y.toColumn,y.index+1);break;case"ArrowLeft":case"ArrowRight":{h.preventDefault();const P=h.key==="ArrowRight"!=(getComputedStyle(t).direction==="rtl")?1:-1,I=w[T+P];I&&(D(I,y.index),I.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"}));break}case" ":case"Enter":h.preventDefault(),a=h.key===" ",M(!0);break;case"Escape":h.preventDefault(),M(!1);break;case"Tab":M(!1);break}},O=h=>{h.key===" "&&a&&(h.preventDefault(),a=!1)},K=h=>{if((o==null?void 0:o.mode)!=="keyboard")return;const p=h.relatedTarget;p&&o.card.contains(p)||M(!1)},G=(h,p)=>{if(!o)return;const y=document.elementFromPoint(h,p);let w=(y==null?void 0:y.closest("[data-kanban-column]"))??null;if((!w||!t.contains(w))&&(w=u().find(I=>{const B=I.getBoundingClientRect();return h>=B.left&&h<=B.right})??null),!w)return;const T=d(w,o.card);let P=T.length;for(let I=0;I<T.length;I+=1){const B=T[I].getBoundingClientRect();if(p<B.top+B.height/2){P=I;break}}D(w,P)};let X=null,ct={x:0,y:0},ut=0;const cn=h=>{const p=h.getBoundingClientRect(),y=h.cloneNode(!0);y.removeAttribute("id"),y.querySelectorAll("[id]").forEach(w=>w.removeAttribute("id")),y.removeAttribute("tabindex"),y.querySelectorAll("[tabindex], a, button").forEach(w=>w.setAttribute("tabindex","-1")),y.removeAttribute("data-kanban-card"),y.removeAttribute("data-kanban-handle"),y.setAttribute("aria-hidden","true"),y.setAttribute("data-kanban-lifted","preview"),Object.assign(y.style,{position:"fixed",left:"0px",top:"0px",width:`${p.width}px`,margin:"0",zIndex:"2147483000",pointerEvents:"none"}),document.body.appendChild(y),X=y},ee=()=>{X&&(X.style.transform=`translate(${ct.x-s.x}px, ${ct.y-s.y}px)`)},ne=()=>{X==null||X.remove(),X=null,cancelAnimationFrame(ut),ut=0},oe=()=>{if(ut=0,(o==null?void 0:o.mode)!=="pointer")return;const h=t.getBoundingClientRect(),{x:p,y}=ct;let w=0;if(p<h.left+kt?w=-Math.ceil((kt-Math.max(0,p-h.left))/3):p>h.right-kt&&(w=Math.ceil((kt-Math.max(0,h.right-p))/3)),w!==0){const T=t.scrollLeft;t.scrollLeft+=w,t.scrollLeft!==T&&G(p,y)}ut=requestAnimationFrame(oe)},un=()=>{if(!r)return;const{card:h,x:p,y}=r,w=h.getBoundingClientRect();s={x:p-w.left,y:y-w.top},C(h,"pointer")&&(cn(h),ct={x:p,y},ee(),ut=requestAnimationFrame(oe),ft=T=>{T.preventDefault(),T.stopPropagation()})};let ft=null;const ie=h=>{if(o||!h.isPrimary||h.button!==0)return;const p=h.target,y=p.closest("[data-kanban-card]");if(!y||!t.contains(y))return;const w=p.closest(Io);if(w&&w!==y&&!w.hasAttribute("data-kanban-handle"))return;const T=h.pointerType==="touch";r={card:y,id:h.pointerId,x:h.clientX,y:h.clientY,touch:T,ready:!T,timer:null},T&&(r.timer=setTimeout(()=>{r&&(r.ready=!0)},Ro)),window.addEventListener("pointermove",re),window.addEventListener("pointerup",se),window.addEventListener("pointercancel",ae)},re=h=>{if(r&&h.pointerId===r.id&&!o){if(!(Math.hypot(h.clientX-r.x,h.clientY-r.y)>Fo))return;if(!r.ready){wt();return}un()}(o==null?void 0:o.mode)==="pointer"&&(ct={x:h.clientX,y:h.clientY},ee(),G(h.clientX,h.clientY))},wt=()=>{r!=null&&r.timer&&clearTimeout(r.timer),r=null,window.removeEventListener("pointermove",re),window.removeEventListener("pointerup",se),window.removeEventListener("pointercancel",ae)},se=()=>{const h=(o==null?void 0:o.mode)==="pointer";if(wt(),!!h){if(ft){const p=ft;ft=null,window.addEventListener("click",p,{capture:!0,once:!0}),setTimeout(()=>window.removeEventListener("click",p,{capture:!0}),0)}M(!0)}},ae=()=>{const h=(o==null?void 0:o.mode)==="pointer";wt(),ft=null,h&&M(!1)},le=h=>{((o==null?void 0:o.mode)==="pointer"||r!=null&&r.ready)&&h.preventDefault()},ce=h=>{(o||r!=null&&r.touch)&&h.preventDefault()},ue=h=>{var p,y;(y=(p=h.target)==null?void 0:p.closest)!=null&&y.call(p,"[data-kanban-card]")&&h.preventDefault()};return t.addEventListener("keydown",S),t.addEventListener("keyup",O),t.addEventListener("focusout",K),t.addEventListener("focusin",R),t.addEventListener("pointerdown",ie),t.addEventListener("touchmove",le,{passive:!1}),t.addEventListener("contextmenu",ce),t.addEventListener("dragstart",ue),{update(h){n=h},destroy(){o&&M(!1),wt(),t.removeEventListener("keydown",S),t.removeEventListener("keyup",O),t.removeEventListener("focusout",K),t.removeEventListener("focusin",R),L.disconnect(),ne(),t.removeEventListener("pointerdown",ie),t.removeEventListener("touchmove",le),t.removeEventListener("contextmenu",ce),t.removeEventListener("dragstart",ue)}}}const he={top:"bottom",bottom:"top",left:"right",right:"left"},me={start:"end",center:"center",end:"start"},ht=t=>t==="top"||t==="bottom";function Po(t,e){return e===!1?[t]:Array.isArray(e)?[t,...e.filter(n=>n!==t)]:ht(t)?[t,he[t]]:[t,he[t],"bottom","top"]}function Pe(t,e,n,o={}){const i=o.side??"bottom",r=o.align??"start",s=o.offset??0,a=o.padding??8,c=o.shift??!0,f=n.left+n.width,u=n.top+n.height,l=S=>S==="bottom"?u-a-(t.top+t.height+s):S==="top"?t.top-s-(n.top+a):S==="right"?f-a-(t.left+t.width+s):t.left-s-(n.left+a),d=S=>ht(S)?e.height:e.width,m=Po(i,o.flip),g=m.find(S=>l(S)>=d(S))??m.reduce((S,O)=>l(O)>l(S)?O:S);let v=ht(g)===ht(i)?r:"center";const x=ht(g),b=x?t.left:t.top,k=x?t.width:t.height,E=x?e.width:e.height,C=(x?n.left:n.top)+a,M=(x?f:u)-a,D=b+k/2,$=S=>{const O=x&&o.rtl?me[S]:S,K=o.anchorPoint;let G;return O==="center"?G=D-E/2:O==="start"?G=K!=null?D-K:b:G=K!=null?D+K-E:b+k-E,G+(o.crossOffset??0)},F=S=>Math.max(0,C-S)+Math.max(0,S+E-M);o.flipAlign&&x&&(v=[v,me[v],"center"].reduce((O,K)=>F($(K))<F($(O))?K:O));const j=$(v),_=c?E>M-C?C:Math.max(C,Math.min(j,M-E)):j,V=x?e.height:e.width;let R;if(g==="bottom"?R=t.top+t.height+s:g==="top"?R=t.top-s-V:g==="right"?R=t.left+t.width+s:R=t.left-s-V,c==="both"){const S=(x?n.top:n.left)+a,O=(x?u:f)-a;R=V>O-S?S:Math.max(S,Math.min(R,O-V))}let L=null;if(o.arrowInset!=null){const S=o.arrowInset;L=Math.max(S,Math.min(D-_,E-S))}return{x:Math.round(x?_:R),y:Math.round(x?R:_),side:g,align:v,flipped:g!==i,shifted:Math.round(_)!==Math.round(j),arrow:L===null?null:Math.round(L)}}const pe=(t,e)=>t==="inline-end"?e?"left":"right":t==="inline-start"?e?"right":"left":t,Gt=t=>"nodeType"in t?t:t.contextElement??null;function Ne(t){const e=[];if(!t||typeof getComputedStyle>"u")return e;for(let n=t.parentElement;n&&n!==document.documentElement;n=n.parentElement){const o=getComputedStyle(n);/(auto|scroll|hidden|clip)/.test(`${o.overflow}${o.overflowX}${o.overflowY}`)&&e.push(n)}return e}function No(){const t=document.documentElement;return{left:0,top:0,width:t.clientWidth||window.innerWidth,height:t.clientHeight||window.innerHeight}}function _o(t,e){const n=No();if(e!=="clippingAncestors")return n;let o=n.left,i=n.top,r=n.left+n.width,s=n.top+n.height;for(const a of Ne(Gt(t))){const c=a.getBoundingClientRect();o=Math.max(o,c.left),i=Math.max(i,c.top),r=Math.min(r,c.right),s=Math.min(s,c.bottom)}return{left:o,top:i,width:Math.max(0,r-o),height:Math.max(0,s-i)}}function Ko(t,e,n={}){const o=Gt(t),i=n.rtl??(o?getComputedStyle(o).direction==="rtl":!1),r=t.getBoundingClientRect();e.style.setProperty("--ods-anchor-width",`${r.width}px`);const s=Pe({left:r.left,top:r.top,width:r.width,height:r.height},{width:e.offsetWidth,height:e.offsetHeight},_o(t,n.boundary),{...n,rtl:i,side:pe(n.side??"bottom",i),flip:typeof n.flip=="object"?n.flip.map(a=>pe(a,i)):n.flip});return e.style.left=`${s.x}px`,e.style.top=`${s.y}px`,e.dataset.side=s.side,s}const Ut="orvain:floating-update";function Bo(){window.dispatchEvent(new Event(Ut))}function qo(t,e,n){var a;let o=!0;const i=()=>{o&&n()};i(),window.addEventListener("scroll",i,{capture:!0,passive:!0}),window.addEventListener("resize",i),window.addEventListener(Ut,i);const r=typeof ResizeObserver<"u"?new ResizeObserver(i):null,s=Gt(t);return s&&(r==null||r.observe(s)),r==null||r.observe(e),(a=document.fonts)==null||a.ready.then(i),()=>{o=!1,r==null||r.disconnect(),window.removeEventListener("scroll",i,{capture:!0}),window.removeEventListener("resize",i),window.removeEventListener(Ut,i)}}function Xt(t){try{return t.matches(":popover-open")}catch{return!1}}function zo(t){return typeof t.showPopover!="function"||!t.isConnected?!1:(t.getAttribute("popover")!=="manual"&&t.setAttribute("popover","manual"),Xt(t)||t.showPopover(),!0)}function jo(t){Xt(t)&&typeof t.hidePopover=="function"&&t.hidePopover(),t.removeAttribute("popover")}const U={mobile:{min:320,max:767},tablet:{min:768,max:1023},desktop:{min:1024,max:3200}},Ho={mobile:`(max-width: ${U.mobile.max}px)`,tablet:`(min-width: ${U.tablet.min}px) and (max-width: ${U.tablet.max}px)`,tabletUp:`(min-width: ${U.tablet.min}px)`,belowDesktop:`(max-width: ${U.tablet.max}px)`,desktop:`(min-width: ${U.desktop.min}px)`};function Uo(t){return t>=U.desktop.min?"desktop":t>=U.tablet.min?"tablet":"mobile"}function tt(t,e,n,o){const i=o>0?o:1,r=Math.round((t-e)/i)*i+e,s=(String(i).split(".")[1]??"").length;return Math.min(n,Math.max(e,Number(r.toFixed(s))))}function Wo(t,e,n,o,i){const r=e.width>0?(t-e.left)/e.width:0;return tt(n+Math.min(1,Math.max(0,r))*(o-n),n,o,i)}function Vo(t,e,n,o,i){const r=i>0?i:1,s=Math.max(r,(o-n)/10);switch(t){case"ArrowLeft":case"ArrowDown":return tt(e-r,n,o,r);case"ArrowRight":case"ArrowUp":return tt(e+r,n,o,r);case"PageDown":return tt(e-s,n,o,r);case"PageUp":return tt(e+s,n,o,r);case"Home":return n;case"End":return o;default:return null}}const N=[];function Yo(t,e){for(const n of t.options.getElements())if(n&&e.includes(n))return!0;return!1}function Go(t,e){for(let n=t;n<N.length;n+=1)if(Yo(N[n],e))return!0;return!1}function _e(t,e){const n=t.composedPath(),o=N.slice();for(let i=o.length-1;i>=0;i-=1){const r=o[i];if(!(e==="outside"?r.options.outsidePress!==!1:r.options.focusOut===!0))continue;const a=N.indexOf(r);a===-1||Go(a,n)||r.options.onDismiss(e,t)}}function Ke(t){_e(t,"outside")}function Be(t){_e(t,"focusout")}function qe(t){if(t.key!=="Escape"||t.defaultPrevented||t.isComposing)return;const e=N[N.length-1];!e||e.options.escapeKey===!1||(t.preventDefault(),e.options.onDismiss("escape",t))}function Xo(){document.addEventListener("pointerdown",Ke,!0),document.addEventListener("focusin",Be,!0),document.addEventListener("keydown",qe)}function Zo(){document.removeEventListener("pointerdown",Ke,!0),document.removeEventListener("focusin",Be,!0),document.removeEventListener("keydown",qe)}function Qo(t){if(typeof document>"u")return()=>{};const e={options:t};return N.push(e),N.length===1&&Xo(),()=>{const n=N.indexOf(e);n!==-1&&(N.splice(n,1),N.length===0&&Zo())}}function mt(t,e,n,o,i){for(let r=0;r<t;r+=1){let s=n+r*o;if(i)s=(s%t+t)%t;else if(s<0||s>=t)return-1;if(!e(s))return s}return-1}function Jo(t,e,n,o,i){if(n<=0)return-1;if(t==="first")return mt(n,o,0,1,!1);if(t==="last")return mt(n,o,n-1,-1,!1);const r=t==="next"?1:-1;if(e<0||e>=n)return mt(n,o,r===1?0:n-1,r,!1);const s=mt(n,o,e+r,r,i);return s===-1?e:s}function ti(t,e,n=!1,o=!0){const i=e!=="horizontal",r=e!=="vertical";switch(t){case"ArrowDown":return i?"next":null;case"ArrowUp":return i?"prev":null;case"ArrowRight":return r?n?"prev":"next":null;case"ArrowLeft":return r?n?"next":"prev":null;case"Home":return o?"first":null;case"End":return o?"last":null;default:return null}}const ze=500;function ei(t=ze){let e="",n=-1/0;const o=(i=Date.now())=>e!==""&&i-n<t;return{active:o,reset(){e="",n=-1/0},handle(i,r,s,a,c,f=Date.now()){if(i.length!==1||i===" "&&!o(f))return null;e=(o(f)?e:"")+i.toLowerCase(),n=f;const u=e.split("").every(m=>m===e[0]),l=u?e[0]:e,d=u?r+1:Math.max(r,0);for(let m=0;m<s;m+=1){const g=((d+m)%s+s)%s;if(!c(g)&&a(g).trim().toLowerCase().startsWith(l))return g}return-1}}}function je(t,e){const n=t.relatedTarget;return!(n instanceof Node&&e.contains(n))}function ni(t){let e=null,n=!1,o=!1,i;const r=()=>e==null?void 0:e.ownerDocument,s=()=>{var m;const d=(m=r())==null?void 0:m.activeElement;return!!e&&!!d&&e.contains(d)},a=()=>{const d=r();d==null||d.removeEventListener("focusin",u,!0),d==null||d.removeEventListener("pointerdown",l,!0)},c=d=>{n&&(n=!1,clearTimeout(i),a(),t(d))},f=d=>{clearTimeout(i),i=setTimeout(()=>{o||s()||c(d)},0)};function u(d){e&&d.target instanceof Node&&!e.contains(d.target)&&c(d)}function l(d){!e||d.target instanceof Node&&e.contains(d.target)||f(new FocusEvent("blur",{relatedTarget:null}))}return{focusIn(d){if(e=d,n)return;n=!0;const m=d.ownerDocument;m.addEventListener("focusin",u,!0),m.addEventListener("pointerdown",l,!0)},focusOut(d,m){e=m,je(d,m)&&(d.relatedTarget==null?f(d):c(d))},pointerDown(d){if(e=d,o)return;o=!0;const m=d.ownerDocument,g=()=>{m.removeEventListener("pointerup",g,!0),m.removeEventListener("pointercancel",g,!0),setTimeout(()=>{o=!1,n&&!s()&&c(new FocusEvent("blur",{relatedTarget:null}))},0)};m.addEventListener("pointerup",g,!0),m.addEventListener("pointercancel",g,!0)},dispose(){clearTimeout(i),a(),n=!1}}}function He(t,e){if(e){const n=t.ownerDocument.getElementById(e);return n instanceof HTMLFormElement?n:null}return t.closest("form")}function oi(t,e,n){const o=He(t,e);return o?(o.addEventListener("reset",n),()=>o.removeEventListener("reset",n)):()=>{}}function Ue(t){return t==null?[""]:typeof t=="string"?[t]:[...t]}function ii(t){return Ue(t).some(e=>e!=="")}const gt=t=>String(t).padStart(2,"0");function ri(t){return!t||Number.isNaN(t.getTime())?"":`${t.getFullYear()}-${gt(t.getMonth()+1)}-${gt(t.getDate())}`}function si(t,e,n){const o=`${gt(t)}:${gt(e)}`;return n===void 0?o:`${o}:${gt(n)}`}function ai(t,e){return t.length===e.length&&t.every((n,o)=>Object.is(n,e[o]))}const Zt=24,We=1,Ve=["bold","italic","underline"],Ye=["color","fontFamily","fontSize"],li=/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/,ci=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d*\.?\d+)\s*)?\)$/,ui=/^[a-z]{3,20}$/,fi=/^[\w\s,'"-]{1,100}$/,di=/^(\d{1,3}(?:\.\d{1,2})?)(px|pt|em|rem|%)$/,hi={px:200,pt:150,em:12,rem:12,"%":1200};function Ge(t){const e=t.trim().toLowerCase();if(li.test(e))return e.length===4?`#${[...e.slice(1)].map(o=>o+o).join("")}`:e;const n=ci.exec(e);if(n){const o=[n[1],n[2],n[3]].map(Number);if(o.some(r=>r>255))return;const i=n[4]===void 0?1:Number(n[4]);return i>=0?i>=1?`#${o.map(r=>r.toString(16).padStart(2,"0")).join("")}`:`rgba(${o.join(", ")}, ${i})`:void 0}return ui.test(e)&&e!=="expression"?e:void 0}function Xe(t){const e=t.trim().replace(/\s+/g," ");return e&&fi.test(e)?e:void 0}function Ze(t){const e=di.exec(t.trim().toLowerCase());if(!e)return;const n=Number(e[1]),o=e[2];return n>0&&n<=(hi[o]??0)?`${e[1]}${o}`:void 0}const mi={color:Ge,fontFamily:Xe,fontSize:Ze};function pi(t){const e=new Map;if(!t)return e;for(const n of t.split(";")){const o=n.indexOf(":");o<0||e.set(n.slice(0,o).trim().toLowerCase(),n.slice(o+1).trim())}return e}function st(t,e,n,o){const i={align:t,runs:e};n&&(i.quote=!0);const r=Math.min(Math.max(Math.trunc(o??0),0),We);return r&&(i.indent=r),i}const xt=(t,e)=>st(t.align,e,t.quote,t.indent),gi=/^(-?\d*\.?\d+)(px|pt|em|rem)$/,yi={px:1,pt:4/3,em:16,rem:16};function bi(t,e){var n;for(const o of["margin-left","margin-inline-start","padding-left"]){const i=gi.exec(((n=t.get(o))==null?void 0:n.trim().toLowerCase())??"");if(i&&Number(i[1])*yi[i[2]]>=Zt)return 1}return/(?:^|\s)ql-indent-[1-9]/.test(e??"")?1:0}function xi(t){switch(t==null?void 0:t.trim().toLowerCase()){case"left":case"start":return"left";case"center":return"center";case"right":case"end":return"right";default:return}}function it(t,e){const n={...t};for(const o of Ve)e[o]===!0?n[o]=!0:e[o]===!1&&delete n[o];for(const o of Ye){const i=e[o];if(i===null)delete n[o];else if(i!==void 0){const r=mi[o](i);r?n[o]=r:delete n[o]}}return n}function Qe(t,e){return t.bold===e.bold&&t.italic===e.italic&&t.underline===e.underline&&t.color===e.color&&t.fontFamily===e.fontFamily&&t.fontSize===e.fontSize}const Je=new Set(["address","article","aside","blockquote","caption","dd","details","dialog","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"]),wi=new Set(["applet","area","audio","base","button","canvas","embed","frame","frameset","head","iframe","img","input","link","map","math","meta","noembed","noframes","noscript","object","optgroup","option","param","picture","plaintext","portal","script","select","source","style","svg","template","textarea","title","track","video","xml","xmp"]);function tn(t,e,n,o){const i=n.foreign===!0,r=[],s=[];let a=null,c=null;const f=b=>{if(a){if(a.length>0||b!==void 0&&a.owner===b){if(c&&c.open===a&&c.start===a.length-1){const k=a.runs[a.runs.length-1];k.text=k.text.slice(0,-1),k.text||a.runs.pop(),a.length-=1,c.kind="placeholder",c.length=0}i&&Ti(a),r.push(st(a.align,a.runs,a.quote,a.indent))}a=null,c=null}},u=(b,k)=>{a&&a.length>0&&f(),a={...b,runs:[],owner:k,length:0},o&&s.push({node:k,kind:"block",block:-1,start:0,length:0,open:a})},l=(b,k,E,C,M)=>{a||(a={...E,runs:[],owner:null,length:0});const D=a.length,$=a.runs[a.runs.length-1];if($&&Qe($.marks,k)?$.text+=b:a.runs.push({text:b,marks:k}),a.length+=b.length,o||M==="br"){const F={node:C,kind:M,block:-1,start:D,length:b.length,open:a};o&&s.push(F),M==="br"&&(c=F)}},d=(b,k,E,C=!1)=>{const M=e.kind(b);if(M==="text"){let L=e.text(b).replace(/\r\n?/g,`
|
|
4
|
+
`);if(i&&(L=L.replace(/[\t\n\f ]+/g," "),(!a||a.length===0||Si(a))&&(L=L.replace(/^ /,""))),L=vi(L.replace(ki," ")),!L||(!a||C&&a.length===0)&&/^\s+$/.test(L))return;l(L,k,E,b,"text");return}if(M!=="element")return;const D=e.tag(b);if(wi.has(D))return;if(D==="br"){l(`
|
|
5
|
+
`,k,E,b,"br");return}const $=pi(e.attr(b,"style")),F=Je.has(D),j=D==="blockquote",_=F?{align:xi($.get("text-align")??e.attr(b,"align"))??E.align,quote:E.quote||j,indent:Math.max(E.indent,bi($,e.attr(b,"class")))}:E,V=Ei(D,$,e,b,k,i);F&&u(_,b);const R=e.children(b);for(let L=0;L<R.length;L++)d(R[L],V,_,F?j:C);F&&f(b)},m=e.children(t);for(let b=0;b<m.length;b++)d(m[b],{},{align:"left",quote:!1,indent:0});f();const g=new Map;r.forEach((b,k)=>g.set(b.runs,k));const v=new Array(s.length);let x=Math.max(r.length-1,0);for(let b=s.length-1;b>=0;b--){const k=s[b],C=(k.open?g.get(k.open.runs):void 0)??x;x=C,v[b]={node:k.node,kind:k.kind,block:C,start:k.kind==="block"?0:k.start,length:k.length}}return{doc:Rt(r),items:v}}const ki=new RegExp(" ","g");function vi(t){let e="";for(const n of t){const o=n.charCodeAt(0);(o===9||o===10||o>=32&&o!==127)&&(e+=n)}return e}function Si(t){const e=t.runs[t.runs.length-1];return!!e&&e.text.endsWith(`
|
|
6
|
+
`)}function Ti(t){const e=t.runs[t.runs.length-1];e&&(e.text=e.text.replace(/ +$/,""))}function Ei(t,e,n,o,i,r){var u,l;const s={};(t==="strong"||t==="b")&&(s.bold=!0),(t==="em"||t==="i")&&(s.italic=!0),(t==="u"||t==="ins")&&(s.underline=!0);const a=e.get("font-weight");if(a){const d=a.toLowerCase();d==="bold"||d==="bolder"||Number(d)>=600?s.bold=!0:(d==="normal"||d==="lighter"||Number(d)<=500)&&(s.bold=!1)}const c=(u=e.get("font-style"))==null?void 0:u.toLowerCase();c==="italic"||c==="oblique"?s.italic=!0:c==="normal"&&(s.italic=!1);const f=(l=e.get("text-decoration-line")??e.get("text-decoration"))==null?void 0:l.toLowerCase();if(f!=null&&f.includes("underline")?s.underline=!0:f==="none"&&(s.underline=!1),!r){const d=e.get("color")??(t==="font"?n.attr(o,"color"):null),m=e.get("font-family")??(t==="font"?n.attr(o,"face"):null),g=e.get("font-size");d&&(s.color=d),m&&(s.fontFamily=m),g&&(s.fontSize=g)}return Object.keys(s).length?it(i,s):i}function Rt(t){return t.map(e=>{const n=[];for(const o of e.runs){if(!o.text)continue;const i=n[n.length-1];i&&Qe(i.marks,o.marks)?i.text+=o.text:n.push({text:o.text,marks:o.marks})}return xt(e,n)})}const Ai=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Mi=new Set(["script","style","textarea","title","xmp","iframe","noembed","noframes","noscript","plaintext"]),Di={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ",copy:"©",reg:"®",trade:"™",hellip:"…",mdash:"—",ndash:"–",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",bull:"•",middot:"·"};function ge(t){return t.includes("&")?t.replace(/&(#\d+|#x[0-9a-f]+|[a-z][a-z0-9]*);?/gi,(e,n)=>{if(n[0]==="#"){const o=n[1]==="x"||n[1]==="X"?parseInt(n.slice(2),16):parseInt(n.slice(1),10);return!o||o>1114111||o>=55296&&o<=57343?"�":String.fromCodePoint(o)}return Di[n.toLowerCase()]??e}):t}const Nt=/<([a-zA-Z][^\s/>]*)/y,vt=/[\s/]*([^\s"'>/=]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/y,_t=/[\s/]*>/y,Kt=/<\/([a-zA-Z][^\s/>]*)[^>]*>/y;function Li(t){const e={tag:"#root",attrs:{},children:[]},n=[e],o=()=>n[n.length-1],i=a=>{a&&o().children.push(ge(a))},r=t.length;let s=0;for(;s<r;){const a=t.indexOf("<",s);if(a<0){i(t.slice(s));break}if(i(t.slice(s,a)),s=a,t.startsWith("<!--",s)){const l=t.indexOf("-->",s+4);s=l<0?r:l+3;continue}const c=t[s+1]??"";if(c==="!"||c==="?"){const l=t.indexOf(">",s);s=l<0?r:l+1;continue}if(c==="/"){Kt.lastIndex=s;const l=Kt.exec(t);if(!l){const m=t.indexOf(">",s);s=m<0?r:m+1;continue}s=Kt.lastIndex;const d=l[1].toLowerCase();if(d==="br"){o().children.push({tag:"br",attrs:{},children:[]});continue}for(let m=n.length-1;m>0;m--)if(n[m].tag===d){n.length=m;break}continue}Nt.lastIndex=s;const f=Nt.exec(t);if(!f){i("<"),s+=1;continue}s=Nt.lastIndex;const u={tag:f[1].toLowerCase(),attrs:{},children:[]};for(;;){if(_t.lastIndex=s,_t.test(t)){s=_t.lastIndex;break}vt.lastIndex=s;const l=vt.exec(t);if(!l||vt.lastIndex===s){s=r;break}s=vt.lastIndex;const d=l[1].toLowerCase();d in u.attrs||(u.attrs[d]=ge(l[2]??l[3]??l[4]??""))}if(Mi.has(u.tag)){const l=t.toLowerCase().indexOf(`</${u.tag}`,s);s=l<0?r:l,o().children.push(u);continue}if(Je.has(u.tag)){for(let l=n.length-1;l>0;l--)if(n[l].tag==="p"){n.length=l;break}}o().children.push(u),Ai.has(u.tag)||n.push(u)}return e}const Ci={kind:t=>typeof t=="string"?"text":"element",text:t=>typeof t=="string"?t:"",tag:t=>typeof t=="string"?"":t.tag,attr:(t,e)=>typeof t=="string"?null:t.attrs[e]??null,children:t=>typeof t=="string"?[]:t.children},$i={kind:t=>t.nodeType===3?"text":t.nodeType===1?"element":"other",text:t=>t.nodeValue??"",tag:t=>t.localName,attr:(t,e)=>t.getAttribute(e),children:t=>t.childNodes};function Q(t,e={}){return tn(Li(t),Ci,e,!1).doc}function Tt(t){return tn(t,$i,{},!0)}const en=t=>t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),Ii=t=>en(t).replace(/"/g,""");function Fi(t,e){const n=[];t.text.split(`
|
|
7
|
+
`).forEach((r,s)=>{s>0&&n.push(e.element("br",void 0,[])),r&&n.push(e.text(r))});const{marks:o}=t,i=[o.color&&`color: ${o.color}`,o.fontFamily&&`font-family: ${o.fontFamily}`,o.fontSize&&`font-size: ${o.fontSize}`].filter(Boolean).join("; ");return i?[e.element("span",i,n)]:n}const Ri=[["bold","strong"],["italic","em"],["underline","u"]];function nn(t,e,n=0){const o=Ri[n];if(!o)return t.flatMap(a=>Fi(a,e));const[i,r]=o,s=[];for(let a=0;a<t.length;){const c=!!t[a].marks[i];let f=a;for(;f<t.length&&!!t[f].marks[i]===c;)f++;const u=nn(t.slice(a,f),e,n+1);c?s.push(e.element(r,void 0,u)):s.push(...u),a=f}return s}function ye(t,e){const n=Qt(t),o=nn(t.runs,e);(n===""||n.endsWith(`
|
|
8
|
+
`))&&o.push(e.element("br",void 0,[]));const i=[t.align!=="left"&&`text-align: ${t.align}`,t.indent&&`margin-left: ${t.indent*Zt}px`].filter(Boolean).join("; ");return e.element("p",i||void 0,o)}function on(t,e){const n=t.length?t:[W()],o=[];for(let i=0;i<n.length;){if(!n[i].quote){o.push(ye(n[i++],e));continue}const r=[];for(;i<n.length&&n[i].quote;)r.push(ye(n[i++],e));o.push(e.element("blockquote",void 0,r))}return o}const Oi={element:(t,e,n)=>t==="br"?"<br>":`<${t}${e?` style="${Ii(e)}"`:""}>${n.join("")}</${t}>`,text:en};function et(t){return on(t,Oi).join("")}function nt(t){return rn(t)?"":et(t)}function rn(t){return t.length===0||t.length===1&&t[0].runs.length===0}function Pi(t,e={}){return nt(Q(t,e))}function Ni(t){return Dt(Q(t))}function Dt(t){return t.map(Qt).join(`
|
|
9
|
+
`)}const W=(t="left")=>({align:t,runs:[]});function Qt(t){return t.runs.map(e=>e.text).join("")}function at(t){return t?t.runs.reduce((e,n)=>e+n.text.length,0):0}function Jt(t,e){let n=0;for(let o=0;o<e.block&&o<t.length;o++)n+=at(t[o])+1;return n+e.offset}function q(t,e){const n=t.length?t:[W()];let o=Math.max(0,e);for(let i=0;i<n.length;i++){const r=at(n[i]);if(o<=r||i===n.length-1)return{block:i,offset:Math.min(o,r)};o-=r+1}return{block:0,offset:0}}function Z(t){return Math.max(0,t.reduce((e,n)=>e+at(n)+1,0)-1)}function rt(t,e){const n=[],o=[];let i=0;for(const r of t){const s=i+r.text.length;s<=e?n.push(r):i>=e?o.push(r):(n.push({text:r.text.slice(0,e-i),marks:r.marks}),o.push({text:r.text.slice(e-i),marks:r.marks})),i=s}return[n,o]}const lt=(t,e,n)=>{const[o,i]=e<=n?[e,n]:[n,e];return[q(t,o),q(t,i)]};function te(t,e,n){const[o,i]=lt(t,e,n),r=[];for(let s=o.block;s<=i.block;s++){const a=t[s]??W();let c=a.runs;s===i.block&&(c=rt(c,i.offset)[0]),s===o.block&&(c=rt(c,o.offset)[1]),r.push(xt(a,c))}return r}function Wt(t,e,n,o){const i=t.length?t:[W()],[r,s]=lt(i,e,n),a=i[r.block],c=i[s.block],f=rt(a.runs,r.offset)[0],u=rt(c.runs,s.offset)[1],l=o.length?o:[W()],d=l.map((x,b)=>{const k=[...b===0?f:[],...x.runs];if(b===0)return xt(a,k);const E=b===l.length-1;return E&&u.length>0?xt(c,k):st(E?c.align:x.align,k,x.quote||a.quote&&c.quote,Math.max(x.indent??0,Math.min(a.indent??0,c.indent??0)))}),m=d[d.length-1],g={block:r.block+d.length-1,offset:at(m)};m.runs=[...m.runs,...u];const v=Rt([...i.slice(0,r.block),...d,...i.slice(s.block+1)]);return{doc:v,caret:Jt(v,g)}}function Vt(t,e,n,o){const[i,r]=lt(t,e,n);return Rt(t.map((s,a)=>{if(a<i.block||a>r.block)return s;const c=a===i.block?i.offset:0,f=a===r.block?r.offset:at(s),[u,l]=rt(s.runs,c),[d,m]=rt(l,f-c);return xt(s,[...u,...d.map(g=>({text:g.text,marks:o(g.marks)})),...m])}))}function sn(t,e,n,o){const i=t.length?t:[W()],[r,s]=lt(i,e,n);return i.map((a,c)=>c<r.block||c>s.block?a:st(o,a.runs,a.quote,a.indent))}function an(t,e,n,o){const i=t.length?t:[W()],[r,s]=lt(i,e,n);return i.map((a,c)=>c<r.block||c>s.block?a:st(a.align,a.runs,o,a.indent))}function ln(t,e,n,o){const i=t.length?t:[W()],[r,s]=lt(i,e,n);return i.map((a,c)=>{if(c<r.block||c>s.block)return a;const f=typeof o=="number"?o:o(a.indent??0);return st(a.align,a.runs,a.quote,f)})}function Lt(t,e){const n=q(t,e),o=t[n.block];if(!o||o.runs.length===0)return{};if(n.offset===0)return o.runs[0].marks;let i=0;for(const r of o.runs)if(i+=r.text.length,i>=n.offset)return r.marks;return o.runs[o.runs.length-1].marks}function Ct(t,e,n,o=null){var v;const[i,r]=e<=n?[e,n]:[n,e],s=q(t,i),a=q(t,r),c=((v=t[s.block])==null?void 0:v.align)??"left",f=t.slice(s.block,a.block+1),u=f.length>0&&f.every(x=>x.quote===!0),l=f.length?Math.min(...f.map(x=>x.indent??0)):0;let d=null;const m=new Set;if(i!==r){for(const x of te(t,i,r))for(const b of x.runs)if(b.text.replace(/\n/g,"")){if(!d){d={...b.marks};continue}for(const k of Ve)b.marks[k]||delete d[k];for(const k of Ye)d[k]!==b.marks[k]&&m.add(k)}for(const x of m)d&&delete d[x]}const g=d??it(Lt(t,i),i===r&&o?o:{});return{bold:!!g.bold,italic:!!g.italic,underline:!!g.underline,align:c,quote:u,indent:l,color:g.color,fontFamily:g.fontFamily,fontSize:g.fontSize}}function _i(t,e=null){const n=Q(t),o=Z(n);return Ct(n,o,o,e)}const be="data-orvain-rich-text",Ki=100,Bi=1e3,xe=new Set(["deleteContentBackward","deleteWordBackward","deleteSoftLineBackward","deleteHardLineBackward"]),we=new Set(["deleteContentForward","deleteWordForward","deleteSoftLineForward","deleteHardLineForward"]),qi=new Set(["insertOrderedList","insertUnorderedList","insertHorizontalRule","insertLink","insertFromPaste","insertFromPasteAsQuotation","insertFromDrop","insertFromYank"]),Bt={formatBold:()=>["bold"],formatItalic:()=>["italic"],formatUnderline:()=>["underline"],formatJustifyLeft:()=>["align","left"],formatJustifyCenter:()=>["align","center"],formatJustifyRight:()=>["align","right"]};class zi{constructor(e,n={}){this.root=e,this.options=n,this.items=[],this.lastSelection=null,this.pendingAt=null,this.history=[],this.historyIndex=0,this.lastEdit=null,this.composing=!1,this.compositionStart=null,this.dragRange=null,this.selectionStale=!1,this.formatKey="",this.cleanup=[];const o=Tt(e);this.doc=o.doc,this.items=o.items,e.innerHTML!==et(this.doc)&&this.render(),this.value=nt(this.doc),this.pending=n.defaultMarks&&Object.keys(n.defaultMarks).length?{...n.defaultMarks}:null,this.history=[{html:this.value,selection:this.endSelection()}],this.formatKey=JSON.stringify(this.getFormat());const i=e.ownerDocument;this.listen(e,"beforeinput",r=>this.onBeforeInput(r)),this.listen(e,"input",r=>this.onInput(r)),this.listen(e,"keydown",r=>this.onKeyDown(r)),this.listen(e,"paste",r=>this.onPaste(r)),this.listen(e,"copy",r=>this.onCopy(r,!1)),this.listen(e,"cut",r=>this.onCopy(r,!0)),this.listen(e,"dragstart",r=>this.onDragStart(r)),this.listen(e,"dragend",()=>this.dragRange=null),this.listen(e,"drop",r=>this.onDrop(r)),this.listen(e,"compositionstart",()=>this.onCompositionStart()),this.listen(e,"compositionend",()=>this.onCompositionEnd()),this.listen(i,"selectionchange",()=>this.onSelectionChange());for(const r of["keyup","mouseup"])this.listen(e,r,()=>this.onSelectionChange());this.listen(e,"focus",()=>this.onFocus())}destroy(){for(const e of this.cleanup.splice(0))e()}getValue(){return this.value}getText(){return Dt(this.doc)}getFormat(){const e=this.currentSelection();if(!e){const o=Z(this.doc);return Ct(this.doc,o,o,this.pending)}const n=this.pendingApplies(e)?this.pending:null;return Ct(this.doc,e.anchor,e.focus,n)}setValue(e){if(e===this.value)return;const n=Q(e),o=nt(n);if(o===this.value)return;const i=this.currentSelection();this.doc=n,this.value=o;const r=Z(this.doc),s=i?{anchor:Math.min(i.anchor,r),focus:Math.min(i.focus,r)}:null,a=this.isFocused();this.render(a?s:null),a||(this.selectionStale=!0),this.lastSelection=s,this.history=[{html:this.value,selection:s??this.endSelection()}],this.historyIndex=0,this.lastEdit=null,this.emitFormat()}toggleMark(e,n={}){const o=this.getFormat()[e];this.applyPatch({[e]:!o},n)}applyStyle(e,n,o={}){this.applyPatch({[e]:n},o)}setAlign(e,n={}){const o=this.currentSelection()??this.endSelection();this.doc=sn(this.doc,o.anchor,o.focus,e),this.afterModelEdit(o,"other",n.focus===!0)}setQuote(e,n={}){const o=this.currentSelection()??this.endSelection();this.doc=an(this.doc,o.anchor,o.focus,e),this.afterModelEdit(o,"other",n.focus===!0)}setIndent(e,n={}){const o=this.currentSelection()??this.endSelection();this.doc=ln(this.doc,o.anchor,o.focus,e),this.afterModelEdit(o,"other",n.focus===!0)}focus(){this.root.focus({preventScroll:!0});const e=this.lastSelection??this.endSelection();this.restoreSelection(e)}undo(){this.stepHistory(-1)}redo(){this.stepHistory(1)}applyPatch(e,n){const o=this.currentSelection(),i=o??this.endSelection();if(i.anchor===i.focus){this.pending={...this.pendingApplies(i)?this.pending:null,...e},this.pendingAt=o?i.anchor:null,n.focus&&this.focusAt(i),this.emitFormat();return}this.doc=Vt(this.doc,i.anchor,i.focus,r=>it(r,e)),this.afterModelEdit(i,"other",n.focus===!0)}replace(e,n,o,i="other"){const{doc:r,caret:s}=Wt(this.doc,e,n,o);this.doc=r,this.pending=null,this.afterModelEdit({anchor:s,focus:s},i,!1)}insertText(e,n,o){const i=Math.min(e.anchor,e.focus),r=Math.max(e.anchor,e.focus);let s=Lt(this.doc,i===r?i:i+1);i===r&&this.pending&&this.pendingApplies(e)&&(s=it(s,this.pending)),this.replace(i,r,[{align:"left",runs:[{text:n,marks:s}]}],o)}afterModelEdit(e,n,o){const i=this.isFocused();this.render(i||o?e:null),o&&!i&&this.focusAt(e),!i&&!o&&(this.selectionStale=!0),this.lastSelection=e,this.commit(n,e)}commit(e,n){var i,r;const o=nt(this.doc);o!==this.value&&(this.value=o,this.record(e,n??this.lastSelection??this.endSelection()),(r=(i=this.options).onChange)==null||r.call(i,o,this.getText())),this.emitFormat()}record(e,n){var s;const o=Date.now(),i={html:this.value,selection:n},r=e==="typing"&&((s=this.lastEdit)==null?void 0:s.kind)==="typing"&&o-this.lastEdit.at<Bi;this.history.length=this.historyIndex+1,r&&this.historyIndex>0?this.history[this.historyIndex]=i:(this.history.push(i),this.history.length>Ki&&this.history.shift(),this.historyIndex=this.history.length-1),this.lastEdit={kind:e,at:o}}stepHistory(e){var r,s;const n=this.historyIndex+e,o=this.history[n];if(!o)return;this.historyIndex=n,this.lastEdit=null,this.doc=Q(o.html),this.value=nt(this.doc),this.pending=null;const i=this.isFocused();this.render(i?o.selection:null),i||(this.selectionStale=!0),this.lastSelection=o.selection,(s=(r=this.options).onChange)==null||s.call(r,this.value,this.getText()),this.emitFormat()}emitFormat(){var o,i;const e=this.getFormat(),n=JSON.stringify(e);n!==this.formatKey&&(this.formatKey=n,(i=(o=this.options).onFormatChange)==null||i.call(o,e))}render(e=null){this.root.innerHTML=et(this.doc),this.items=Tt(this.root).items,e&&this.restoreSelection(e)}syncFromDom(e){const n=Tt(this.root);this.doc=n.doc,this.items=n.items;const o=this.domSelection();this.root.innerHTML!==et(this.doc)&&this.render(o),o&&(this.lastSelection=o),this.commit(e,o)}isFocused(){const e=this.root.ownerDocument.activeElement;return!!e&&(e===this.root||this.root.contains(e))}endSelection(){const e=Z(this.doc);return{anchor:e,focus:e}}currentSelection(){return(this.isFocused()?this.domSelection():null)??this.lastSelection}domSelection(){const e=this.root.ownerDocument.getSelection();return!e||e.rangeCount===0||!e.anchorNode||!e.focusNode||!this.root.contains(e.anchorNode)||!this.root.contains(e.focusNode)?null:{anchor:this.globalAt(e.anchorNode,e.anchorOffset),focus:this.globalAt(e.focusNode,e.focusOffset)}}globalAt(e,n){const o=this.posAt(e,n);return Jt(this.doc,o)}posAt(e,n){if(e.nodeType===3){const i=this.items.find(s=>s.node===e);if(i)return{block:i.block,offset:i.start+Math.min(n,i.length)};const r=e.parentNode;return r?this.posAt(r,Array.prototype.indexOf.call(r.childNodes,e)+(n>0?1:0)):{block:0,offset:0}}const o=e.childNodes[n];if(o){for(const i of this.items)if(i.node===o||o.contains(i.node)||o.compareDocumentPosition(i.node)&Node.DOCUMENT_POSITION_FOLLOWING)return{block:i.block,offset:i.start};return q(this.doc,Z(this.doc))}for(let i=this.items.length-1;i>=0;i--){const r=this.items[i];if(r.node===e||e.contains(r.node)||r.node.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)return{block:r.block,offset:r.start+r.length}}return{block:0,offset:0}}domPoint(e){const n=q(this.doc,e),o=this.items.filter(l=>l.block===n.block),i=o.filter(l=>l.kind==="text"),r=i.find(l=>l.start<n.offset&&n.offset<=l.start+l.length);if(r)return[r.node,n.offset-r.start];const s=i.find(l=>l.start===n.offset);if(s)return[s.node,0];const a=o.find(l=>(l.kind==="br"||l.kind==="placeholder")&&l.start===n.offset),c=o.find(l=>l.kind==="br"&&l.start+1===n.offset),f=a??c;if(f!=null&&f.node.parentNode){const l=f.node.parentNode,d=Array.prototype.indexOf.call(l.childNodes,f.node);return[l,a?d:d+1]}const u=o.find(l=>l.kind==="block");return u?[u.node,0]:[this.root,0]}restoreSelection(e){const n=this.root.ownerDocument.getSelection();if(!n)return;const[o,i]=this.domPoint(e.anchor),[r,s]=this.domPoint(e.focus);n.setBaseAndExtent(o,i,r,s)}focusAt(e){this.root.focus({preventScroll:!0}),this.restoreSelection(e)}pendingApplies(e){return!!this.pending&&e.anchor===e.focus&&(this.pendingAt===null||this.pendingAt===e.anchor)}listen(e,n,o){e.addEventListener(n,o),this.cleanup.push(()=>e.removeEventListener(n,o))}onFocus(){this.selectionStale&&this.lastSelection&&this.restoreSelection(this.lastSelection),this.selectionStale=!1,this.onSelectionChange()}onSelectionChange(){if(!this.isFocused())return;const e=this.domSelection();e&&(this.lastSelection=e,this.pending&&(e.anchor!==e.focus?this.pending=null:this.pendingAt===null?this.pendingAt=e.anchor:this.pendingAt!==e.anchor&&(this.pending=null)),this.emitFormat())}onKeyDown(e){var i,r;if(!(e.ctrlKey||e.metaKey)||e.altKey||e.isComposing)return;const n=e.key.toLowerCase(),o={b:"bold",i:"italic",u:"underline"}[n];o&&!e.shiftKey?(e.preventDefault(),this.toggleMark(o)):n==="z"?(e.preventDefault(),e.shiftKey?this.redo():this.undo()):n==="y"&&e.ctrlKey&&!e.metaKey?(e.preventDefault(),this.redo()):(r=(i=this.options).blockShortcuts)!=null&&r.call(i)&&(!e.shiftKey&&(n==="]"||e.code==="BracketRight")?(e.preventDefault(),this.setIndent(s=>s+1)):!e.shiftKey&&(n==="["||e.code==="BracketLeft")?(e.preventDefault(),this.setIndent(s=>s-1)):e.shiftKey&&(n==="9"||n==="("||e.code==="Digit9")&&(e.preventDefault(),this.setQuote(!this.getFormat().quote)))}onBeforeInput(e){var f,u;const n=e.inputType;if(n==="historyUndo"||n==="historyRedo"){e.preventDefault(),n==="historyUndo"?this.undo():this.redo();return}if(n.startsWith("format")){e.preventDefault();const l=(f=Bt[n])==null?void 0:f.call(Bt);(l==null?void 0:l[0])==="align"?this.setAlign(l[1]):l&&this.toggleMark(l[0]);return}if(qi.has(n)){e.preventDefault();return}if(this.composing||n==="insertCompositionText")return;const o=this.domSelection();if(!o)return;const i=Math.min(o.anchor,o.focus),r=Math.max(o.anchor,o.focus),s=q(this.doc,i),a=q(this.doc,r),c=s.block!==a.block;if(n==="insertParagraph")e.preventDefault(),this.replace(i,r,[{align:"left",runs:[]},{align:"left",runs:[]}]);else if(n==="insertLineBreak")e.preventDefault(),this.insertText(o,`
|
|
10
|
+
`,"other");else if(n==="insertText"||n==="insertReplacementText"){const l=e.data??((u=e.dataTransfer)==null?void 0:u.getData("text/plain"))??"";(c||i===r&&this.pendingApplies(o))&&(e.preventDefault(),l&&this.insertText(o,l,"typing"))}else if(xe.has(n)||we.has(n)||n.startsWith("delete")){if(i!==r){c&&(e.preventDefault(),this.replace(i,r,[]));return}const l=this.doc[s.block]?this.doc[s.block].runs.reduce((d,m)=>d+m.text.length,0):0;if(xe.has(n)&&s.offset===0){e.preventDefault();const d=this.doc[s.block];d!=null&&d.indent?this.setIndent(m=>m-1):d!=null&&d.quote?this.setQuote(!1):s.block>0&&this.replace(i-1,i,[])}else we.has(n)&&s.offset===l&&(e.preventDefault(),s.block<this.doc.length-1&&this.replace(i,i+1,[]))}}onInput(e){var n,o;this.composing||e.isComposing||this.syncFromDom((n=e.inputType)!=null&&n.startsWith("insert")||(o=e.inputType)!=null&&o.startsWith("delete")?"typing":"other")}onCompositionStart(){this.composing=!0;const e=this.domSelection();this.compositionStart=e?Math.min(e.anchor,e.focus):null}onCompositionEnd(){this.composing=!1;const e=this.pending,n=this.compositionStart;this.compositionStart=null,this.syncFromDom("typing");const o=this.domSelection();e&&n!==null&&o&&o.focus>n&&(this.pendingAt===null||this.pendingAt===n)&&(this.doc=Vt(this.doc,n,o.focus,i=>it(i,e)),this.pending=null,this.afterModelEdit(o,"typing",!1))}fragmentFrom(e,n){if(!e)return null;const o=e.getData("text/html");if(o)return Q(o,{foreign:!o.includes(be)});const i=e.getData("text/plain");return i?[{align:"left",runs:[{text:i.replace(/\r\n?/g,`
|
|
11
|
+
`),marks:Lt(this.doc,n)}]}]:null}onPaste(e){e.preventDefault();const n=this.domSelection()??this.lastSelection??this.endSelection(),o=Math.min(n.anchor,n.focus),i=this.fragmentFrom(e.clipboardData,o);i&&this.replace(o,Math.max(n.anchor,n.focus),i)}writeClipboard(e,n){const o=te(this.doc,n.anchor,n.focus);e.setData("text/plain",Dt(o)),e.setData("text/html",`<div ${be}="">${et(o)}</div>`)}onCopy(e,n){const o=this.domSelection();!o||o.anchor===o.focus||!e.clipboardData||(e.preventDefault(),this.writeClipboard(e.clipboardData,o),n&&this.replace(Math.min(o.anchor,o.focus),Math.max(o.anchor,o.focus),[]))}onDragStart(e){const n=this.domSelection();!n||n.anchor===n.focus||!e.dataTransfer||(this.dragRange={anchor:Math.min(n.anchor,n.focus),focus:Math.max(n.anchor,n.focus)},this.writeClipboard(e.dataTransfer,n))}onDrop(e){var f,u,l;e.preventDefault();const n=this.root.ownerDocument;let o=null;const i=(f=n.caretPositionFromPoint)==null?void 0:f.call(n,e.clientX,e.clientY),r=i?null:(u=n.caretRangeFromPoint)==null?void 0:u.call(n,e.clientX,e.clientY),s=(i==null?void 0:i.offsetNode)??(r==null?void 0:r.startContainer);s&&this.root.contains(s)&&(o=this.globalAt(s,(i==null?void 0:i.offset)??(r==null?void 0:r.startOffset)??0)),o??(o=((l=this.currentSelection())==null?void 0:l.focus)??Z(this.doc));const a=this.fragmentFrom(e.dataTransfer,o),c=this.dragRange;if(this.dragRange=null,!!a){if(c){if(o>=c.anchor&&o<=c.focus)return;this.doc=Wt(this.doc,c.anchor,c.focus,[]).doc,o>c.focus&&(o-=c.focus-c.anchor)}this.root.focus({preventScroll:!0}),this.replace(o,o,a)}}}function Et(t){const e=t.ownerDocument.getSelection();let n=e&&e.rangeCount>0?e.anchorNode:null;if(!n||!t.contains(n))return null;for(;n&&n!==t;n=n.parentNode)if(n.nodeType===1&&n.localName==="blockquote")return n;return null}function ji(t){const e=t.ownerDocument;if(!Et(t))return e.execCommand("formatBlock",!1,"blockquote"),!!Et(t);e.execCommand("formatBlock",!1,"p");const n=Et(t);if(n){const o=e.getSelection(),i=o!=null&&o.anchorNode&&o.focusNode?[o.anchorNode,o.anchorOffset,o.focusNode,o.focusOffset]:null;n.replaceWith(...Array.from(n.childNodes)),o&&i&&o.setBaseAndExtent(...i)}return!1}function Hi(t,e){return t[e]}exports.BREAKPOINTS=U;exports.CHART_COLORS=Ae;exports.CHART_SHADES=Kn;exports.MEDIA=Ho;exports.MENU_ITEM_SELECTOR=ke;exports.RICH_TEXT_INDENT_STEP=Zt;exports.RICH_TEXT_MAX_INDENT=We;exports.RichTextEditor=zi;exports.TYPEAHEAD_TIMEOUT_MS=ze;exports.addDays=Y;exports.addDismissLayer=Qo;exports.addMonthsClamped=$e;exports.alignRange=sn;exports.announce=yn;exports.annularSectorPath=ao;exports.applyMarkPatch=it;exports.arcPath=Zn;exports.areaPath=ro;exports.autoUpdate=qo;exports.bindHorizontalStrip=kn;exports.bindScrollEdges=vn;exports.blockLength=at;exports.blockText=Qt;exports.blockquoteAtSelection=Et;exports.breakpointFor=Uo;exports.buildMonthGrid=Fe;exports.chartCaptionColorVar=Bn;exports.chartColorVar=pt;exports.chartFillVars=jn;exports.chartRatio=eo;exports.chartSeriesColor=zn;exports.chartStack=no;exports.chartSum=Me;exports.chartThemeOpacity=qn;exports.clamp=Mn;exports.clampChartValue=Yt;exports.clampDay=fo;exports.cleanRichTextColor=Ge;exports.cleanRichTextFontFamily=Xe;exports.cleanRichTextFontSize=Ze;exports.collectTreeIds=Mo;exports.computeFloatingLayout=Pe;exports.createFocusOut=ni;exports.createKanbanDnd=Oo;exports.createSubmenuHoverIntent=wn;exports.createTreeTypeahead=Lo;exports.createTypeahead=ei;exports.cx=Tn;exports.dayKey=ho;exports.dayStamp=ot;exports.daysInMonth=Ce;exports.defaultKanbanAnnouncements=Oe;exports.defaultKanbanInstructions=$o;exports.describeData=Qn;exports.docLength=Z;exports.donutArcs=lo;exports.emptyBlock=W;exports.eventsOnDay=vo;exports.findEnabledIndex=mt;exports.flattenVisibleTree=Ao;exports.focusDialogInitial=pn;exports.focusLeftWidget=je;exports.focusMenuItem=Se;exports.formEntries=Ue;exports.formValueFilled=ii;exports.formatCalendarTitle=xo;exports.formatDateRange=bo;exports.formatEventTimeRange=ko;exports.formatHourLabel=wo;exports.formatMonthLabel=yo;exports.formatOf=Ct;exports.formatRange=Vt;exports.formatShortDate=St;exports.formatTimeLabel=Ht;exports.fromGlobal=q;exports.generateId=dn;exports.getClippingAncestors=Ne;exports.getFocusableElements=$t;exports.getMenuItems=It;exports.groupEventRows=To;exports.handleColumnArrowKeys=Sn;exports.handleMenuKeydown=bn;exports.hideFromTopLayer=jo;exports.indentRange=ln;exports.inferCodeLanguage=Ln;exports.isBeforeDay=jt;exports.isCurrentPeriod=Eo;exports.isDayOutOfRange=uo;exports.isInTopLayer=Xt;exports.isRichTextEmpty=rn;exports.isSameDay=Mt;exports.isSameMonth=Ie;exports.isTypeaheadKey=Co;exports.keyToMove=ti;exports.layoutTimedEvents=So;exports.linearLinePath=De;exports.linearScale=Gn;exports.marksAt=Lt;exports.maxValue=Un;exports.moduleClass=Hi;exports.monthGridCells=Re;exports.moveIndex=Jo;exports.nextChartIndex=Jn;exports.nextGridCell=to;exports.niceMax=Vn;exports.normalizeDoc=Rt;exports.omit=An;exports.onFormReset=oi;exports.ownerForm=He;exports.parseRichText=Q;exports.placeFloating=Ko;exports.plateauLinePath=io;exports.polarPoint=At;exports.polarToCartesian=dt;exports.quoteRange=an;exports.readRichTextDom=Tt;exports.renderRichText=on;exports.replaceRange=Wt;exports.requestFloatingUpdate=Bo;exports.richTextDocText=Dt;exports.richTextFormat=_i;exports.richTextToPlainText=Ni;exports.richTextValue=nt;exports.sameList=ai;exports.sanitizeRichText=Pi;exports.serializeRichText=et;exports.setMenuRovingItem=ve;exports.shiftCalendarDate=po;exports.shiftMonth=co;exports.showInTopLayer=zo;exports.sliceDoc=te;exports.sliderValueFromKey=Vo;exports.sliderValueFromPointer=Wo;exports.smoothLinePath=oo;exports.snapSliderValue=tt;exports.splitCodeTokensIntoLines=Ee;exports.stackValues=Xn;exports.startOfDay=z;exports.startOfMonth=Le;exports.startOfWeek=bt;exports.strokeArcPath=so;exports.sumValues=Hn;exports.ticks=Yn;exports.toGlobal=Jt;exports.toISODate=ri;exports.toISOTime=si;exports.toPercent=Wn;exports.toggleBlockquote=ji;exports.tokenizeCode=_n;exports.trapFocus=gn;exports.treeKeyAction=Do;exports.typedEntries=En;exports.visibleDays=mo;exports.weekdayLabels=go;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './types.cjs';
|
|
2
|
+
export * from './a11y.cjs';
|
|
3
|
+
export * from './helpers.cjs';
|
|
4
|
+
export * from './codeTokenizer.cjs';
|
|
5
|
+
export * from './chart/index.cjs';
|
|
6
|
+
export * from './chart-items/index.cjs';
|
|
7
|
+
export * from './calendar.cjs';
|
|
8
|
+
export * from './tree.cjs';
|
|
9
|
+
export * from './kanbanDnd.cjs';
|
|
10
|
+
export * from './floating.cjs';
|
|
11
|
+
export * from './breakpoints.cjs';
|
|
12
|
+
export * from './slider.cjs';
|
|
13
|
+
export * from './dismiss.cjs';
|
|
14
|
+
export * from './listNavigation.cjs';
|
|
15
|
+
export * from './formField.cjs';
|
|
16
|
+
export * from './richText/index.cjs';
|
|
17
|
+
export * from './cssModule.cjs';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export * from './a11y.js';
|
|
3
|
+
export * from './helpers.js';
|
|
4
|
+
export * from './codeTokenizer.js';
|
|
5
|
+
export * from './chart/index.js';
|
|
6
|
+
export * from './chart-items/index.js';
|
|
7
|
+
export * from './calendar.js';
|
|
8
|
+
export * from './tree.js';
|
|
9
|
+
export * from './kanbanDnd.js';
|
|
10
|
+
export * from './floating.js';
|
|
11
|
+
export * from './breakpoints.js';
|
|
12
|
+
export * from './slider.js';
|
|
13
|
+
export * from './dismiss.js';
|
|
14
|
+
export * from './listNavigation.js';
|
|
15
|
+
export * from './formField.js';
|
|
16
|
+
export * from './richText/index.js';
|
|
17
|
+
export * from './cssModule.js';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|