UNPKG

strapi-plugin-comments

Version:
2,229 lines 931 kB
"use strict";const b=require("react"),k=require("styled-components"),p=require("react/jsx-runtime"),al=require("react-dom"),PT=t=>t&&t.__esModule?t:{default:t};function zw(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const $=zw(b),WT=PT(k),Ro=zw(al),E0=(t,e="")=>Object.keys(t).reduce((n,r)=>{const i=e.length?`${e}.`:"";return typeof t[r]=="object"&&t[r]!==null&&!Array.isArray(t[r])?Object.assign(n,E0(t[r],i+r)):n[i+r]=t[r],n},{}),_v=(t,e)=>{if(!e)throw new TypeError("pluginId can't be empty");return Object.keys(t).reduce((n,r)=>(n[`${e}.${r}`]=t[r],n),{})};function yt(t){const e=b.useRef(t);return b.useEffect(()=>{e.current=t}),b.useMemo(()=>(...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function Ed(t,e){return t-e*Math.floor(t/e)}const Uw=1721426;function wc(t,e,n,r){e=hg(t,e);let i=e-1,o=-2;return n<=2?o=0:hu(e)&&(o=-1),Uw-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+o+r)}function hu(t){return t%4===0&&(t%100!==0||t%400===0)}function hg(t,e){return t==="BC"?1-e:e}function zT(t){let e="AD";return t<=0&&(e="BC",t=1-t),[e,t]}const UT={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Ss{fromJulianDay(e){let n=e,r=n-Uw,i=Math.floor(r/146097),o=Ed(r,146097),s=Math.floor(o/36524),a=Ed(o,36524),c=Math.floor(a/1461),h=Ed(a,1461),f=Math.floor(h/365),d=i*400+s*100+c*4+f+(s!==4&&f!==4?1:0),[g,v]=zT(d),x=n-wc(g,v,1,1),w=2;n<wc(g,v,3,1)?w=0:hu(v)&&(w=1);let C=Math.floor(((x+w)*12+373)/367),S=n-wc(g,v,C,1)+1;return new Na(g,v,C,S)}toJulianDay(e){return wc(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return UT[hu(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return hu(e.year)?366:365}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}const qT={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function qw(t,e){return e=Gn(e,t.calendar),t.era===e.era&&t.year===e.year&&t.month===e.month&&t.day===e.day}function Kw(t,e){let n=t.calendar.toJulianDay(t),r=Math.ceil(n+1-QT(e))%7;return r<0&&(r+=7),r}function KT(t){return Kr(Date.now(),t)}function fg(t){return Jw(KT(t))}function Gw(t,e){return t.calendar.toJulianDay(t)-e.calendar.toJulianDay(e)}function GT(t,e){return Lv(t)-Lv(e)}function Lv(t){return t.hour*36e5+t.minute*6e4+t.second*1e3+t.millisecond}let Od=null;function As(){return Od==null&&(Od=new Intl.DateTimeFormat().resolvedOptions().timeZone),Od}function YT(t){return t.subtract({days:t.day-1})}function XT(t){return t.add({days:t.calendar.getDaysInMonth(t)-t.day})}function Yw(t,e){let n=Kw(t,e);return t.subtract({days:n})}const Bv=new Map;function ZT(t){if(Intl.Locale){let n=Bv.get(t);return n||(n=new Intl.Locale(t).maximize().region,n&&Bv.set(t,n)),n}let e=t.split("-")[1];return e==="u"?void 0:e}function QT(t){let e=ZT(t);return e&&qT[e]||0}function O0(t,e){return t&&e?t.compare(e)<=0?t:e:t||e}function D0(t,e){return t&&e?t.compare(e)>=0?t:e:t||e}function Rs(t){t=Gn(t,new Ss);let e=hg(t.era,t.year);return Xw(e,t.month,t.day,t.hour,t.minute,t.second,t.millisecond)}function Xw(t,e,n,r,i,o,s){let a=new Date;return a.setUTCHours(r,i,o,s),a.setUTCFullYear(t,e-1,n),a.getTime()}function I0(t,e){if(e==="UTC")return 0;if(t>0&&e===As())return new Date(t).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:o,minute:s,second:a}=Zw(t,e);return Xw(n,r,i,o,s,a,0)-Math.floor(t/1e3)*1e3}const Nv=new Map;function Zw(t,e){let n=Nv.get(e);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Nv.set(e,n));let r=n.formatToParts(new Date(t)),i={};for(let o of r)o.type!=="literal"&&(i[o.type]=o.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const jv=864e5;function JT(t,e,n,r){return(n===r?[n]:[n,r]).filter(o=>eM(t,e,o))}function eM(t,e,n){let r=Zw(n,e);return t.year===r.year&&t.month===r.month&&t.day===r.day&&t.hour===r.hour&&t.minute===r.minute&&t.second===r.second}function Ur(t,e,n="compatible"){let r=mo(t);if(e==="UTC")return Rs(r);if(e===As()&&n==="compatible"){r=Gn(r,new Ss);let c=new Date,h=hg(r.era,r.year);return c.setFullYear(h,r.month-1,r.day),c.setHours(r.hour,r.minute,r.second,r.millisecond),c.getTime()}let i=Rs(r),o=I0(i-jv,e),s=I0(i+jv,e),a=JT(r,e,i-o,i-s);if(a.length===1)return a[0];if(a.length>1)switch(n){case"compatible":case"earlier":return a[0];case"later":return a[a.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(i-o,i-s);case"compatible":case"later":return Math.max(i-o,i-s);case"reject":throw new RangeError("No such absolute time found")}}function Qw(t,e,n="compatible"){return new Date(Ur(t,e,n))}function Kr(t,e){let n=I0(t,e),r=new Date(t+n),i=r.getUTCFullYear(),o=r.getUTCMonth()+1,s=r.getUTCDate(),a=r.getUTCHours(),c=r.getUTCMinutes(),h=r.getUTCSeconds(),f=r.getUTCMilliseconds();return new ks(i,o,s,e,n,a,c,h,f)}function Jw(t){return new Na(t.calendar,t.era,t.year,t.month,t.day)}function mo(t,e){let n=0,r=0,i=0,o=0;if("timeZone"in t)({hour:n,minute:r,second:i,millisecond:o}=t);else if("hour"in t&&!e)return t;return e&&({hour:n,minute:r,second:i,millisecond:o}=e),new Tu(t.calendar,t.era,t.year,t.month,t.day,n,r,i,o)}function Gn(t,e){if(t.calendar.identifier===e.identifier)return t;let n=e.fromJulianDay(t.calendar.toJulianDay(t)),r=t.copy();return r.calendar=e,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,po(r),r}function tM(t,e,n){if(t instanceof ks)return t.timeZone===e?t:ex(t,e);let r=Ur(t,e,n);return Kr(r,e)}function nM(t){let e=Rs(t)-t.offset;return new Date(e)}function ex(t,e){let n=Rs(t)-t.offset;return Gn(Kr(n,e),t.calendar)}const va=36e5;function mh(t,e){let n=t.copy(),r="hour"in n?sM(n,e):0;_0(n,e.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,t),n.month+=e.months||0,L0(n),tx(n),n.day+=(e.weeks||0)*7,n.day+=e.days||0,n.day+=r,rM(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var o,s;let c=(o=(s=n.calendar).isInverseEra)===null||o===void 0?void 0:o.call(s,n);n.year=i,n.month=c?1:n.calendar.getMonthsInYear(n),n.day=c?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let a=n.calendar.getMonthsInYear(n);return n.month>a&&(n.month=a,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function _0(t,e){var n,r;!((n=(r=t.calendar).isInverseEra)===null||n===void 0)&&n.call(r,t)&&(e=-e),t.year+=e}function L0(t){for(;t.month<1;)_0(t,-1),t.month+=t.calendar.getMonthsInYear(t);let e=0;for(;t.month>(e=t.calendar.getMonthsInYear(t));)t.month-=e,_0(t,1)}function rM(t){for(;t.day<1;)t.month--,L0(t),t.day+=t.calendar.getDaysInMonth(t);for(;t.day>t.calendar.getDaysInMonth(t);)t.day-=t.calendar.getDaysInMonth(t),t.month++,L0(t)}function tx(t){t.month=Math.max(1,Math.min(t.calendar.getMonthsInYear(t),t.month)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day))}function po(t){t.calendar.constrainDate&&t.calendar.constrainDate(t),t.year=Math.max(1,Math.min(t.calendar.getYearsInEra(t),t.year)),tx(t)}function nx(t){let e={};for(let n in t)typeof t[n]=="number"&&(e[n]=-t[n]);return e}function rx(t,e){return mh(t,nx(e))}function dg(t,e){let n=t.copy();return e.era!=null&&(n.era=e.era),e.year!=null&&(n.year=e.year),e.month!=null&&(n.month=e.month),e.day!=null&&(n.day=e.day),po(n),n}function ku(t,e){let n=t.copy();return e.hour!=null&&(n.hour=e.hour),e.minute!=null&&(n.minute=e.minute),e.second!=null&&(n.second=e.second),e.millisecond!=null&&(n.millisecond=e.millisecond),oM(n),n}function iM(t){t.second+=Math.floor(t.millisecond/1e3),t.millisecond=xc(t.millisecond,1e3),t.minute+=Math.floor(t.second/60),t.second=xc(t.second,60),t.hour+=Math.floor(t.minute/60),t.minute=xc(t.minute,60);let e=Math.floor(t.hour/24);return t.hour=xc(t.hour,24),e}function oM(t){t.millisecond=Math.max(0,Math.min(t.millisecond,1e3)),t.second=Math.max(0,Math.min(t.second,59)),t.minute=Math.max(0,Math.min(t.minute,59)),t.hour=Math.max(0,Math.min(t.hour,23))}function xc(t,e){let n=t%e;return n<0&&(n+=e),n}function sM(t,e){return t.hour+=e.hours||0,t.minute+=e.minutes||0,t.second+=e.seconds||0,t.millisecond+=e.milliseconds||0,iM(t)}function gg(t,e,n,r){let i=t.copy();switch(e){case"era":{let a=t.calendar.getEras(),c=a.indexOf(t.era);if(c<0)throw new Error("Invalid era: "+t.era);c=Gr(c,n,0,a.length-1,r?.round),i.era=a[c],po(i);break}case"year":var o,s;!((o=(s=i.calendar).isInverseEra)===null||o===void 0)&&o.call(s,i)&&(n=-n),i.year=Gr(t.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,t);break;case"month":i.month=Gr(t.month,n,1,t.calendar.getMonthsInYear(t),r?.round);break;case"day":i.day=Gr(t.day,n,1,t.calendar.getDaysInMonth(t),r?.round);break;default:throw new Error("Unsupported field "+e)}return t.calendar.balanceDate&&t.calendar.balanceDate(i),po(i),i}function ix(t,e,n,r){let i=t.copy();switch(e){case"hour":{let o=t.hour,s=0,a=23;if(r?.hourCycle===12){let c=o>=12;s=c?12:0,a=c?23:11}i.hour=Gr(o,n,s,a,r?.round);break}case"minute":i.minute=Gr(t.minute,n,0,59,r?.round);break;case"second":i.second=Gr(t.second,n,0,59,r?.round);break;case"millisecond":i.millisecond=Gr(t.millisecond,n,0,999,r?.round);break;default:throw new Error("Unsupported field "+e)}return i}function Gr(t,e,n,r,i=!1){if(i){t+=Math.sign(e),t<n&&(t=r);let o=Math.abs(e);e>0?t=Math.ceil(t/o)*o:t=Math.floor(t/o)*o,t>r&&(t=n)}else t+=e,t<n?t=r-(n-t-1):t>r&&(t=n+(t-r-1));return t}function ox(t,e){let n;if(e.years!=null&&e.years!==0||e.months!=null&&e.months!==0||e.weeks!=null&&e.weeks!==0||e.days!=null&&e.days!==0){let i=mh(mo(t),{years:e.years,months:e.months,weeks:e.weeks,days:e.days});n=Ur(i,t.timeZone)}else n=Rs(t)-t.offset;n+=e.milliseconds||0,n+=(e.seconds||0)*1e3,n+=(e.minutes||0)*6e4,n+=(e.hours||0)*36e5;let r=Kr(n,t.timeZone);return Gn(r,t.calendar)}function aM(t,e){return ox(t,nx(e))}function lM(t,e,n,r){switch(e){case"hour":{let i=0,o=23;if(r?.hourCycle===12){let x=t.hour>=12;i=x?12:0,o=x?23:11}let s=mo(t),a=Gn(ku(s,{hour:i}),new Ss),c=[Ur(a,t.timeZone,"earlier"),Ur(a,t.timeZone,"later")].filter(x=>Kr(x,t.timeZone).day===a.day)[0],h=Gn(ku(s,{hour:o}),new Ss),f=[Ur(h,t.timeZone,"earlier"),Ur(h,t.timeZone,"later")].filter(x=>Kr(x,t.timeZone).day===h.day).pop(),d=Rs(t)-t.offset,g=Math.floor(d/va),v=d%va;return d=Gr(g,n,Math.floor(c/va),Math.floor(f/va),r?.round)*va+v,Gn(Kr(d,t.timeZone),t.calendar)}case"minute":case"second":case"millisecond":return ix(t,e,n,r);case"era":case"year":case"month":case"day":{let i=gg(mo(t),e,n,r),o=Ur(i,t.timeZone);return Gn(Kr(o,t.timeZone),t.calendar)}default:throw new Error("Unsupported field "+e)}}function cM(t,e,n){let r=mo(t),i=ku(dg(r,e),e);if(i.compare(r)===0)return t;let o=Ur(i,t.timeZone,n);return Gn(Kr(o,t.timeZone),t.calendar)}const uM=/^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function sx(t,e){let n=t.match(uM);if(!n)throw new Error("Invalid ISO 8601 date time string: "+t);let r=new ks(Vr(n[1],1,9999),Vr(n[2],1,12),1,e,0,n[4]?Vr(n[4],0,23):0,n[5]?Vr(n[5],0,59):0,n[6]?Vr(n[6],0,59):0,n[7]?Vr(n[7],0,1/0)*1e3:0);r.day=Vr(n[3],0,r.calendar.getDaysInMonth(r));var i;return n[8]&&(r.offset=Vr(n[8],-23,23)*36e5+Vr((i=n[9])!==null&&i!==void 0?i:"0",0,59)*6e4),ex(r,e)}function hM(t){return sx(t,As())}function Vr(t,e,n){let r=Number(t);if(r<e||r>n)throw new RangeError(`Value out of range: ${e} <= ${r} <= ${n}`);return r}function fM(t){return`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}:${String(t.second).padStart(2,"0")}${t.millisecond?String(t.millisecond/1e3).slice(1):""}`}function ax(t){let e=Gn(t,new Ss);return`${String(e.year).padStart(4,"0")}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`}function lx(t){return`${ax(t)}T${fM(t)}`}function dM(t){let e=Math.sign(t)<0?"-":"+";t=Math.abs(t);let n=Math.floor(t/36e5),r=t%36e5/6e4;return`${e}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function gM(t){return`${lx(t)}${dM(t.offset)}[${t.timeZone}]`}function mM(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mg(t,e,n){mM(t,e),e.set(t,n)}function pg(t){let e=typeof t[0]=="object"?t.shift():new Ss,n;if(typeof t[0]=="string")n=t.shift();else{let s=e.getEras();n=s[s.length-1]}let r=t.shift(),i=t.shift(),o=t.shift();return[e,n,r,i,o]}var pM=new WeakMap;class Na{copy(){return this.era?new Na(this.calendar,this.era,this.year,this.month,this.day):new Na(this.calendar,this.year,this.month,this.day)}add(e){return mh(this,e)}subtract(e){return rx(this,e)}set(e){return dg(this,e)}cycle(e,n,r){return gg(this,e,n,r)}toDate(e){return Qw(this,e)}toString(){return ax(this)}compare(e){return Gw(this,e)}constructor(...e){mg(this,pM,{writable:!0,value:void 0});let[n,r,i,o,s]=pg(e);this.calendar=n,this.era=r,this.year=i,this.month=o,this.day=s,po(this)}}var vM=new WeakMap;class Tu{copy(){return this.era?new Tu(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Tu(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return mh(this,e)}subtract(e){return rx(this,e)}set(e){return dg(ku(this,e),e)}cycle(e,n,r){switch(e){case"era":case"year":case"month":case"day":return gg(this,e,n,r);default:return ix(this,e,n,r)}}toDate(e,n){return Qw(this,e,n)}toString(){return lx(this)}compare(e){let n=Gw(this,e);return n===0?GT(this,mo(e)):n}constructor(...e){mg(this,vM,{writable:!0,value:void 0});let[n,r,i,o,s]=pg(e);this.calendar=n,this.era=r,this.year=i,this.month=o,this.day=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,po(this)}}var bM=new WeakMap;class ks{copy(){return this.era?new ks(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new ks(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return ox(this,e)}subtract(e){return aM(this,e)}set(e,n){return cM(this,e,n)}cycle(e,n,r){return lM(this,e,n,r)}toDate(){return nM(this)}toString(){return gM(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-tM(e,this.timeZone).toDate().getTime()}constructor(...e){mg(this,bM,{writable:!0,value:void 0});let[n,r,i,o,s]=pg(e),a=e.shift(),c=e.shift();this.calendar=n,this.era=r,this.year=i,this.month=o,this.day=s,this.timeZone=a,this.offset=c,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,po(this)}}let Dd=new Map;class wM{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,n);if(n<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(n)}`}formatRangeToParts(e,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,n);if(n<e)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(e),i=this.formatter.formatToParts(n);return[...r.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return CM()&&(this.resolvedHourCycle||(this.resolvedHourCycle=$M(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}constructor(e,n={}){this.formatter=cx(e,n),this.options=n}}const xM={true:{ja:"h11"},false:{}};function cx(t,e={}){if(typeof e.hour12=="boolean"&&yM()){e={...e};let i=xM[String(e.hour12)][t.split("-")[0]],o=e.hour12?"h12":"h23";e.hourCycle=i??o,delete e.hour12}let n=t+(e?Object.entries(e).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(Dd.has(n))return Dd.get(n);let r=new Intl.DateTimeFormat(t,e);return Dd.set(n,r),r}let Id=null;function yM(){return Id==null&&(Id=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Id}let _d=null;function CM(){return _d==null&&(_d=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),_d}function $M(t,e){if(!e.timeStyle&&!e.hour)return;t=t.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),t+=(t.includes("-u-")?"":"-u")+"-nu-latn";let n=cx(t,{...e,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(o=>o.type==="hour").value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(o=>o.type==="hour").value,10);if(r===0&&i===23)return"h23";if(r===24&&i===23)return"h24";if(r===0&&i===11)return"h11";if(r===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}function z(){return z=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},z.apply(null,arguments)}function ie(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t?.(i),n===!1||!i.defaultPrevented)return e?.(i)}}function SM(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function ph(...t){return e=>t.forEach(n=>SM(n,e))}function ye(...t){return b.useCallback(ph(...t),t)}function vg(t,e){const n=b.createContext(e);function r(o){const{children:s,...a}=o,c=b.useMemo(()=>a,Object.values(a));return b.createElement(n.Provider,{value:c},s)}function i(o){const s=b.useContext(n);if(s)return s;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return r.displayName=t+"Provider",[r,i]}function bt(t,e=[]){let n=[];function r(o,s){const a=b.createContext(s),c=n.length;n=[...n,s];function h(d){const{scope:g,children:v,...x}=d,w=g?.[t][c]||a,C=b.useMemo(()=>x,Object.values(x));return b.createElement(w.Provider,{value:C},v)}function f(d,g){const v=g?.[t][c]||a,x=b.useContext(v);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${o}\``)}return h.displayName=o+"Provider",[h,f]}const i=()=>{const o=n.map(s=>b.createContext(s));return function(a){const c=a?.[t]||o;return b.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return i.scopeName=t,[r,AM(i,...e)]}function AM(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:h})=>{const d=c(o)[`__scope${h}`];return{...a,...d}},{});return b.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])}};return n.scopeName=e.scopeName,n}const Cr=b.forwardRef((t,e)=>{const{children:n,...r}=t,i=b.Children.toArray(n),o=i.find(RM);if(o){const s=o.props.children,a=i.map(c=>c===o?b.Children.count(s)>1?b.Children.only(null):b.isValidElement(s)?s.props.children:null:c);return b.createElement(B0,z({},r,{ref:e}),b.isValidElement(s)?b.cloneElement(s,void 0,a):null)}return b.createElement(B0,z({},r,{ref:e}),n)});Cr.displayName="Slot";const B0=b.forwardRef((t,e)=>{const{children:n,...r}=t;return b.isValidElement(n)?b.cloneElement(n,{...kM(r,n.props),ref:e?ph(e,n.ref):n.ref}):b.Children.count(n)>1?b.Children.only(null):null});B0.displayName="SlotClone";const bg=({children:t})=>b.createElement(b.Fragment,null,t);function RM(t){return b.isValidElement(t)&&t.type===bg}function kM(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}const TM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ge=TM.reduce((t,e)=>{const n=b.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?Cr:e;return b.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),b.createElement(a,z({},s,{ref:i}))});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function ux(t,e){t&&al.flushSync(()=>t.dispatchEvent(e))}function MM(t,e=globalThis?.document){const n=yt(t);b.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r),()=>e.removeEventListener("keydown",r)},[n,e])}const N0="dismissableLayer.update",EM="dismissableLayer.pointerDownOutside",OM="dismissableLayer.focusOutside";let Fv;const DM=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ko=b.forwardRef((t,e)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...h}=t,f=b.useContext(DM),[d,g]=b.useState(null),v=(n=d?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,x]=b.useState({}),w=ye(e,V=>g(V)),C=Array.from(f.layers),[S]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),R=C.indexOf(S),T=d?C.indexOf(d):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,O=T>=R,L=IM(V=>{const F=V.target,H=[...f.branches].some(K=>K.contains(F));!O||H||(o?.(V),a?.(V),V.defaultPrevented||c?.())},v),I=_M(V=>{const F=V.target;[...f.branches].some(K=>K.contains(F))||(s?.(V),a?.(V),V.defaultPrevented||c?.())},v);return MM(V=>{T===f.layers.size-1&&(i?.(V),!V.defaultPrevented&&c&&(V.preventDefault(),c()))},v),b.useEffect(()=>{if(d)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Fv=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),Vv(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Fv)}},[d,v,r,f]),b.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),Vv())},[d,f]),b.useEffect(()=>{const V=()=>x({});return document.addEventListener(N0,V),()=>document.removeEventListener(N0,V)},[]),b.createElement(ge.div,z({},h,{ref:w,style:{pointerEvents:E?O?"auto":"none":void 0,...t.style},onFocusCapture:ie(t.onFocusCapture,I.onFocusCapture),onBlurCapture:ie(t.onBlurCapture,I.onBlurCapture),onPointerDownCapture:ie(t.onPointerDownCapture,L.onPointerDownCapture)}))});function IM(t,e=globalThis?.document){const n=yt(t),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let h=function(){hx(EM,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=h,e.addEventListener("click",i.current,{once:!0})):h()}else e.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),e.removeEventListener("pointerdown",o),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function _M(t,e=globalThis?.document){const n=yt(t),r=b.useRef(!1);return b.useEffect(()=>{const i=o=>{o.target&&!r.current&&hx(OM,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Vv(){const t=new CustomEvent(N0);document.dispatchEvent(t)}function hx(t,e,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?ux(i,o):i.dispatchEvent(o)}const LM=ko,ut=globalThis?.document?b.useLayoutEffect:()=>{},BM=$.useId||(()=>{});let NM=0;function _t(t){const[e,n]=$.useState(BM());return ut(()=>{n(r=>r??String(NM++))},[t]),e?`radix-${e}`:""}const jM=["top","right","bottom","left"],Mi=Math.min,An=Math.max,Mu=Math.round,yc=Math.floor,wr=t=>({x:t,y:t}),FM={left:"right",right:"left",bottom:"top",top:"bottom"},VM={start:"end",end:"start"};function j0(t,e,n){return An(t,Mi(e,n))}function Zr(t,e){return typeof t=="function"?t(e):t}function Qr(t){return t.split("-")[0]}function Hs(t){return t.split("-")[1]}function wg(t){return t==="x"?"y":"x"}function xg(t){return t==="y"?"height":"width"}const HM=new Set(["top","bottom"]);function pr(t){return HM.has(Qr(t))?"y":"x"}function yg(t){return wg(pr(t))}function PM(t,e,n){n===void 0&&(n=!1);const r=Hs(t),i=yg(t),o=xg(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Eu(s)),[s,Eu(s)]}function WM(t){const e=Eu(t);return[F0(t),e,F0(e)]}function F0(t){return t.replace(/start|end/g,e=>VM[e])}const Hv=["left","right"],Pv=["right","left"],zM=["top","bottom"],UM=["bottom","top"];function qM(t,e,n){switch(t){case"top":case"bottom":return n?e?Pv:Hv:e?Hv:Pv;case"left":case"right":return e?zM:UM;default:return[]}}function KM(t,e,n,r){const i=Hs(t);let o=qM(Qr(t),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(F0)))),o}function Eu(t){return t.replace(/left|right|bottom|top/g,e=>FM[e])}function GM(t){return{top:0,right:0,bottom:0,left:0,...t}}function fx(t){return typeof t!="number"?GM(t):{top:t,right:t,bottom:t,left:t}}function Ou(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function Wv(t,e,n){let{reference:r,floating:i}=t;const o=pr(e),s=yg(e),a=xg(s),c=Qr(e),h=o==="y",f=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,g=r[a]/2-i[a]/2;let v;switch(c){case"top":v={x:f,y:r.y-i.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-i.width,y:d};break;default:v={x:r.x,y:r.y}}switch(Hs(e)){case"start":v[s]-=g*(n&&h?-1:1);break;case"end":v[s]+=g*(n&&h?-1:1);break}return v}const YM=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(e));let h=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:d}=Wv(h,r,c),g=r,v={},x=0;for(let w=0;w<a.length;w++){const{name:C,fn:S}=a[w],{x:R,y:T,data:E,reset:O}=await S({x:f,y:d,initialPlacement:r,placement:g,strategy:i,middlewareData:v,rects:h,platform:s,elements:{reference:t,floating:e}});f=R??f,d=T??d,v={...v,[C]:{...v[C],...E}},O&&x<=50&&(x++,typeof O=="object"&&(O.placement&&(g=O.placement),O.rects&&(h=O.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):O.rects),{x:f,y:d}=Wv(h,g,c)),w=-1)}return{x:f,y:d,placement:g,strategy:i,middlewareData:v}};async function ja(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:c}=t,{boundary:h="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:g=!1,padding:v=0}=Zr(e,t),x=fx(v),C=a[g?d==="floating"?"reference":"floating":d],S=Ou(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(C)))==null||n?C:C.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:h,rootBoundary:f,strategy:c})),R=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),E=await(o.isElement==null?void 0:o.isElement(T))?await(o.getScale==null?void 0:o.getScale(T))||{x:1,y:1}:{x:1,y:1},O=Ou(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:R,offsetParent:T,strategy:c}):R);return{top:(S.top-O.top+x.top)/E.y,bottom:(O.bottom-S.bottom+x.bottom)/E.y,left:(S.left-O.left+x.left)/E.x,right:(O.right-S.right+x.right)/E.x}}const XM=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:c}=e,{element:h,padding:f=0}=Zr(t,e)||{};if(h==null)return{};const d=fx(f),g={x:n,y:r},v=yg(i),x=xg(v),w=await s.getDimensions(h),C=v==="y",S=C?"top":"left",R=C?"bottom":"right",T=C?"clientHeight":"clientWidth",E=o.reference[x]+o.reference[v]-g[v]-o.floating[x],O=g[v]-o.reference[v],L=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h));let I=L?L[T]:0;(!I||!await(s.isElement==null?void 0:s.isElement(L)))&&(I=a.floating[T]||o.floating[x]);const V=E/2-O/2,F=I/2-w[x]/2-1,H=Mi(d[S],F),K=Mi(d[R],F),W=H,J=I-w[x]-K,G=I/2-w[x]/2+V,re=j0(W,G,J),se=!c.arrow&&Hs(i)!=null&&G!==re&&o.reference[x]/2-(G<W?H:K)-w[x]/2<0,te=se?G<W?G-W:G-J:0;return{[v]:g[v]+te,data:{[v]:re,centerOffset:G-re-te,...se&&{alignmentOffset:te}},reset:se}}}),ZM=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:c,elements:h}=e,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:w=!0,...C}=Zr(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const S=Qr(i),R=pr(a),T=Qr(a)===a,E=await(c.isRTL==null?void 0:c.isRTL(h.floating)),O=g||(T||!w?[Eu(a)]:WM(a)),L=x!=="none";!g&&L&&O.push(...KM(a,w,x,E));const I=[a,...O],V=await ja(e,C),F=[];let H=((r=o.flip)==null?void 0:r.overflows)||[];if(f&&F.push(V[S]),d){const G=PM(i,s,E);F.push(V[G[0]],V[G[1]])}if(H=[...H,{placement:i,overflows:F}],!F.every(G=>G<=0)){var K,W;const G=(((K=o.flip)==null?void 0:K.index)||0)+1,re=I[G];if(re&&(!(d==="alignment"?R!==pr(re):!1)||H.every(ne=>ne.overflows[0]>0&&pr(ne.placement)===R)))return{data:{index:G,overflows:H},reset:{placement:re}};let se=(W=H.filter(te=>te.overflows[0]<=0).sort((te,ne)=>te.overflows[1]-ne.overflows[1])[0])==null?void 0:W.placement;if(!se)switch(v){case"bestFit":{var J;const te=(J=H.filter(ne=>{if(L){const Y=pr(ne.placement);return Y===R||Y==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(Y=>Y>0).reduce((Y,ce)=>Y+ce,0)]).sort((ne,Y)=>ne[1]-Y[1])[0])==null?void 0:J[0];te&&(se=te);break}case"initialPlacement":se=a;break}if(i!==se)return{reset:{placement:se}}}return{}}}};function zv(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Uv(t){return jM.some(e=>t[e]>=0)}const QM=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=Zr(t,e);switch(r){case"referenceHidden":{const o=await ja(e,{...i,elementContext:"reference"}),s=zv(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Uv(s)}}}case"escaped":{const o=await ja(e,{...i,altBoundary:!0}),s=zv(o,n.floating);return{data:{escapedOffsets:s,escaped:Uv(s)}}}default:return{}}}}},dx=new Set(["left","top"]);async function JM(t,e){const{placement:n,platform:r,elements:i}=t,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=Qr(n),a=Hs(n),c=pr(n)==="y",h=dx.has(s)?-1:1,f=o&&c?-1:1,d=Zr(e,t);let{mainAxis:g,crossAxis:v,alignmentAxis:x}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof x=="number"&&(v=a==="end"?x*-1:x),c?{x:v*f,y:g*h}:{x:g*h,y:v*f}}const eE=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=e,c=await JM(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:s}}}}},tE=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:C=>{let{x:S,y:R}=C;return{x:S,y:R}}},...c}=Zr(t,e),h={x:n,y:r},f=await ja(e,c),d=pr(Qr(i)),g=wg(d);let v=h[g],x=h[d];if(o){const C=g==="y"?"top":"left",S=g==="y"?"bottom":"right",R=v+f[C],T=v-f[S];v=j0(R,v,T)}if(s){const C=d==="y"?"top":"left",S=d==="y"?"bottom":"right",R=x+f[C],T=x-f[S];x=j0(R,x,T)}const w=a.fn({...e,[g]:v,[d]:x});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[g]:o,[d]:s}}}}}},nE=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=e,{offset:a=0,mainAxis:c=!0,crossAxis:h=!0}=Zr(t,e),f={x:n,y:r},d=pr(i),g=wg(d);let v=f[g],x=f[d];const w=Zr(a,e),C=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const T=g==="y"?"height":"width",E=o.reference[g]-o.floating[T]+C.mainAxis,O=o.reference[g]+o.reference[T]-C.mainAxis;v<E?v=E:v>O&&(v=O)}if(h){var S,R;const T=g==="y"?"width":"height",E=dx.has(Qr(i)),O=o.reference[d]-o.floating[T]+(E&&((S=s.offset)==null?void 0:S[d])||0)+(E?0:C.crossAxis),L=o.reference[d]+o.reference[T]+(E?0:((R=s.offset)==null?void 0:R[d])||0)-(E?C.crossAxis:0);x<O?x=O:x>L&&(x=L)}return{[g]:v,[d]:x}}}},rE=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:o,platform:s,elements:a}=e,{apply:c=()=>{},...h}=Zr(t,e),f=await ja(e,h),d=Qr(i),g=Hs(i),v=pr(i)==="y",{width:x,height:w}=o.floating;let C,S;d==="top"||d==="bottom"?(C=d,S=g===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(S=d,C=g==="end"?"top":"bottom");const R=w-f.top-f.bottom,T=x-f.left-f.right,E=Mi(w-f[C],R),O=Mi(x-f[S],T),L=!e.middlewareData.shift;let I=E,V=O;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(V=T),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(I=R),L&&!g){const H=An(f.left,0),K=An(f.right,0),W=An(f.top,0),J=An(f.bottom,0);v?V=x-2*(H!==0||K!==0?H+K:An(f.left,f.right)):I=w-2*(W!==0||J!==0?W+J:An(f.top,f.bottom))}await c({...e,availableWidth:V,availableHeight:I});const F=await s.getDimensions(a.floating);return x!==F.width||w!==F.height?{reset:{rects:!0}}:{}}}};function vh(){return typeof window<"u"}function Ps(t){return gx(t)?(t.nodeName||"").toLowerCase():"#document"}function kn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ar(t){var e;return(e=(gx(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function gx(t){return vh()?t instanceof Node||t instanceof kn(t).Node:!1}function Qn(t){return vh()?t instanceof Element||t instanceof kn(t).Element:!1}function $r(t){return vh()?t instanceof HTMLElement||t instanceof kn(t).HTMLElement:!1}function qv(t){return!vh()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof kn(t).ShadowRoot}const iE=new Set(["inline","contents"]);function ll(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Jn(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!iE.has(i)}const oE=new Set(["table","td","th"]);function sE(t){return oE.has(Ps(t))}const aE=[":popover-open",":modal"];function bh(t){return aE.some(e=>{try{return t.matches(e)}catch{return!1}})}const lE=["transform","translate","scale","rotate","perspective"],cE=["transform","translate","scale","rotate","perspective","filter"],uE=["paint","layout","strict","content"];function Cg(t){const e=$g(),n=Qn(t)?Jn(t):t;return lE.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||cE.some(r=>(n.willChange||"").includes(r))||uE.some(r=>(n.contain||"").includes(r))}function hE(t){let e=Ei(t);for(;$r(e)&&!Ts(e);){if(Cg(e))return e;if(bh(e))return null;e=Ei(e)}return null}function $g(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const fE=new Set(["html","body","#document"]);function Ts(t){return fE.has(Ps(t))}function Jn(t){return kn(t).getComputedStyle(t)}function wh(t){return Qn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ei(t){if(Ps(t)==="html")return t;const e=t.assignedSlot||t.parentNode||qv(t)&&t.host||Ar(t);return qv(e)?e.host:e}function mx(t){const e=Ei(t);return Ts(e)?t.ownerDocument?t.ownerDocument.body:t.body:$r(e)&&ll(e)?e:mx(e)}function Fa(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=mx(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=kn(i);if(o){const a=V0(s);return e.concat(s,s.visualViewport||[],ll(i)?i:[],a&&n?Fa(a):[])}return e.concat(i,Fa(i,[],n))}function V0(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function px(t){const e=Jn(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=$r(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=Mu(n)!==o||Mu(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Sg(t){return Qn(t)?t:t.contextElement}function ps(t){const e=Sg(t);if(!$r(e))return wr(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=px(e);let s=(o?Mu(n.width):n.width)/r,a=(o?Mu(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const dE=wr(0);function vx(t){const e=kn(t);return!$g()||!e.visualViewport?dE:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function gE(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==kn(t)?!1:e}function vo(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=Sg(t);let s=wr(1);e&&(r?Qn(r)&&(s=ps(r)):s=ps(t));const a=gE(o,n,r)?vx(o):wr(0);let c=(i.left+a.x)/s.x,h=(i.top+a.y)/s.y,f=i.width/s.x,d=i.height/s.y;if(o){const g=kn(o),v=r&&Qn(r)?kn(r):r;let x=g,w=V0(x);for(;w&&r&&v!==x;){const C=ps(w),S=w.getBoundingClientRect(),R=Jn(w),T=S.left+(w.clientLeft+parseFloat(R.paddingLeft))*C.x,E=S.top+(w.clientTop+parseFloat(R.paddingTop))*C.y;c*=C.x,h*=C.y,f*=C.x,d*=C.y,c+=T,h+=E,x=kn(w),w=V0(x)}}return Ou({width:f,height:d,x:c,y:h})}function Ag(t,e){const n=wh(t).scrollLeft;return e?e.left+n:vo(Ar(t)).left+n}function bx(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:Ag(t,r)),o=r.top+e.scrollTop;return{x:i,y:o}}function mE(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=Ar(r),a=e?bh(e.floating):!1;if(r===s||a&&o)return n;let c={scrollLeft:0,scrollTop:0},h=wr(1);const f=wr(0),d=$r(r);if((d||!d&&!o)&&((Ps(r)!=="body"||ll(s))&&(c=wh(r)),$r(r))){const v=vo(r);h=ps(r),f.x=v.x+r.clientLeft,f.y=v.y+r.clientTop}const g=s&&!d&&!o?bx(s,c,!0):wr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-c.scrollLeft*h.x+f.x+g.x,y:n.y*h.y-c.scrollTop*h.y+f.y+g.y}}function pE(t){return Array.from(t.getClientRects())}function vE(t){const e=Ar(t),n=wh(t),r=t.ownerDocument.body,i=An(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=An(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ag(t);const a=-n.scrollTop;return Jn(r).direction==="rtl"&&(s+=An(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function bE(t,e){const n=kn(t),r=Ar(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,c=0;if(i){o=i.width,s=i.height;const h=$g();(!h||h&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:a,y:c}}const wE=new Set(["absolute","fixed"]);function xE(t,e){const n=vo(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=$r(t)?ps(t):wr(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,c=i*o.x,h=r*o.y;return{width:s,height:a,x:c,y:h}}function Kv(t,e,n){let r;if(e==="viewport")r=bE(t,n);else if(e==="document")r=vE(Ar(t));else if(Qn(e))r=xE(e,n);else{const i=vx(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Ou(r)}function wx(t,e){const n=Ei(t);return n===e||!Qn(n)||Ts(n)?!1:Jn(n).position==="fixed"||wx(n,e)}function yE(t,e){const n=e.get(t);if(n)return n;let r=Fa(t,[],!1).filter(a=>Qn(a)&&Ps(a)!=="body"),i=null;const o=Jn(t).position==="fixed";let s=o?Ei(t):t;for(;Qn(s)&&!Ts(s);){const a=Jn(s),c=Cg(s);!c&&a.position==="fixed"&&(i=null),(o?!c&&!i:!c&&a.position==="static"&&!!i&&wE.has(i.position)||ll(s)&&!c&&wx(t,s))?r=r.filter(f=>f!==s):i=a,s=Ei(s)}return e.set(t,r),r}function CE(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const s=[...n==="clippingAncestors"?bh(e)?[]:yE(e,this._c):[].concat(n),r],a=s[0],c=s.reduce((h,f)=>{const d=Kv(e,f,i);return h.top=An(d.top,h.top),h.right=Mi(d.right,h.right),h.bottom=Mi(d.bottom,h.bottom),h.left=An(d.left,h.left),h},Kv(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function $E(t){const{width:e,height:n}=px(t);return{width:e,height:n}}function SE(t,e,n){const r=$r(e),i=Ar(e),o=n==="fixed",s=vo(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const c=wr(0);function h(){c.x=Ag(i)}if(r||!r&&!o)if((Ps(e)!=="body"||ll(i))&&(a=wh(e)),r){const v=vo(e,!0,o,e);c.x=v.x+e.clientLeft,c.y=v.y+e.clientTop}else i&&h();o&&!r&&i&&h();const f=i&&!r&&!o?bx(i,a):wr(0),d=s.left+a.scrollLeft-c.x-f.x,g=s.top+a.scrollTop-c.y-f.y;return{x:d,y:g,width:s.width,height:s.height}}function Ld(t){return Jn(t).position==="static"}function Gv(t,e){if(!$r(t)||Jn(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Ar(t)===n&&(n=n.ownerDocument.body),n}function xx(t,e){const n=kn(t);if(bh(t))return n;if(!$r(t)){let i=Ei(t);for(;i&&!Ts(i);){if(Qn(i)&&!Ld(i))return i;i=Ei(i)}return n}let r=Gv(t,e);for(;r&&sE(r)&&Ld(r);)r=Gv(r,e);return r&&Ts(r)&&Ld(r)&&!Cg(r)?n:r||hE(t)||n}const AE=async function(t){const e=this.getOffsetParent||xx,n=this.getDimensions,r=await n(t.floating);return{reference:SE(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function RE(t){return Jn(t).direction==="rtl"}const kE={convertOffsetParentRelativeRectToViewportRelativeRect:mE,getDocumentElement:Ar,getClippingRect:CE,getOffsetParent:xx,getElementRects:AE,getClientRects:pE,getDimensions:$E,getScale:ps,isElement:Qn,isRTL:RE};function yx(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function TE(t,e){let n=null,r;const i=Ar(t);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),o();const h=t.getBoundingClientRect(),{left:f,top:d,width:g,height:v}=h;if(a||e(),!g||!v)return;const x=yc(d),w=yc(i.clientWidth-(f+g)),C=yc(i.clientHeight-(d+v)),S=yc(f),T={rootMargin:-x+"px "+-w+"px "+-C+"px "+-S+"px",threshold:An(0,Mi(1,c))||1};let E=!0;function O(L){const I=L[0].intersectionRatio;if(I!==c){if(!E)return s();I?s(!1,I):r=setTimeout(()=>{s(!1,1e-7)},1e3)}I===1&&!yx(h,t.getBoundingClientRect())&&s(),E=!1}try{n=new IntersectionObserver(O,{...T,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,T)}n.observe(t)}return s(!0),o}function Cx(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,h=Sg(t),f=i||o?[...h?Fa(h):[],...Fa(e)]:[];f.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),o&&S.addEventListener("resize",n)});const d=h&&a?TE(h,n):null;let g=-1,v=null;s&&(v=new ResizeObserver(S=>{let[R]=S;R&&R.target===h&&v&&(v.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var T;(T=v)==null||T.observe(e)})),n()}),h&&!c&&v.observe(h),v.observe(e));let x,w=c?vo(t):null;c&&C();function C(){const S=vo(t);w&&!yx(w,S)&&n(),w=S,x=requestAnimationFrame(C)}return n(),()=>{var S;f.forEach(R=>{i&&R.removeEventListener("scroll",n),o&&R.removeEventListener("resize",n)}),d?.(),(S=v)==null||S.disconnect(),v=null,c&&cancelAnimationFrame(x)}}const $x=eE,Sx=tE,Ax=ZM,ME=rE,EE=QM,Yv=XM,OE=nE,Rx=(t,e,n)=>{const r=new Map,i={platform:kE,...n},o={...i.platform,_c:r};return YM(t,e,{...i,platform:o})};var DE=typeof document<"u",IE=function(){},fu=DE?b.useLayoutEffect:IE;function Du(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Du(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&t.$$typeof)&&!Du(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function kx(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Xv(t,e){const n=kx(t);return Math.round(e*n)/n}function Bd(t){const e=$.useRef(t);return fu(()=>{e.current=t}),e}function _E(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:c,open:h}=t,[f,d]=$.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[g,v]=$.useState(r);Du(g,r)||v(r);const[x,w]=$.useState(null),[C,S]=$.useState(null),R=$.useCallback(ne=>{ne!==L.current&&(L.current=ne,w(ne))},[]),T=$.useCallback(ne=>{ne!==I.current&&(I.current=ne,S(ne))},[]),E=o||x,O=s||C,L=$.useRef(null),I=$.useRef(null),V=$.useRef(f),F=c!=null,H=Bd(c),K=Bd(i),W=Bd(h),J=$.useCallback(()=>{if(!L.current||!I.current)return;const ne={placement:e,strategy:n,middleware:g};K.current&&(ne.platform=K.current),Rx(L.current,I.current,ne).then(Y=>{const ce={...Y,isPositioned:W.current!==!1};G.current&&!Du(V.current,ce)&&(V.current=ce,Ro.flushSync(()=>{d(ce)}))})},[g,e,n,K,W]);fu(()=>{h===!1&&V.current.isPositioned&&(V.current.isPositioned=!1,d(ne=>({...ne,isPositioned:!1})))},[h]);const G=$.useRef(!1);fu(()=>(G.current=!0,()=>{G.current=!1}),[]),fu(()=>{if(E&&(L.current=E),O&&(I.current=O),E&&O){if(H.current)return H.current(E,O,J);J()}},[E,O,J,H,F]);const re=$.useMemo(()=>({reference:L,floating:I,setReference:R,setFloating:T}),[R,T]),se=$.useMemo(()=>({reference:E,floating:O}),[E,O]),te=$.useMemo(()=>{const ne={position:n,left:0,top:0};if(!se.floating)return ne;const Y=Xv(se.floating,f.x),ce=Xv(se.floating,f.y);return a?{...ne,transform:"translate("+Y+"px, "+ce+"px)",...kx(se.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:ce}},[n,a,se.floating,f.x,f.y]);return $.useMemo(()=>({...f,update:J,refs:re,elements:se,floatingStyles:te}),[f,J,re,se,te])}const LE=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Yv({element:r.current,padding:i}).fn(n):{}:r?Yv({element:r,padding:i}).fn(n):{}}}},BE=(t,e)=>({...$x(t),options:[t,e]}),NE=(t,e)=>({...Sx(t),options:[t,e]}),jE=(t,e)=>({...OE(t),options:[t,e]}),FE=(t,e)=>({...Ax(t),options:[t,e]}),VE=(t,e)=>({...ME(t),options:[t,e]}),HE=(t,e)=>({...EE(t),options:[t,e]}),PE=(t,e)=>({...LE(t),options:[t,e]}),WE=b.forwardRef((t,e)=>{const{children:n,width:r=10,height:i=5,...o}=t;return b.createElement(ge.svg,z({},o,{ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),t.asChild?n:b.createElement("polygon",{points:"0,0 30,0 15,10"}))}),zE=WE;function xh(t){const[e,n]=b.useState(void 0);return ut(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const c=o.borderBoxSize,h=Array.isArray(c)?c[0]:c;s=h.inlineSize,a=h.blockSize}else s=t.offsetWidth,a=t.offsetHeight;n({width:s,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}const Tx="Popper",[Mx,Ni]=bt(Tx),[UE,Ex]=Mx(Tx),qE=t=>{const{__scopePopper:e,children:n}=t,[r,i]=b.useState(null);return b.createElement(UE,{scope:e,anchor:r,onAnchorChange:i},n)},KE="PopperAnchor",GE=b.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...i}=t,o=Ex(KE,n),s=b.useRef(null),a=ye(e,s);return b.useEffect(()=>{o.onAnchorChange(r?.current||s.current)}),r?null:b.createElement(ge.div,z({},i,{ref:a}))}),Ox="PopperContent",[YE,XE]=Mx(Ox),ZE=b.forwardRef((t,e)=>{var n,r,i,o,s,a,c,h;const{__scopePopper:f,side:d="bottom",sideOffset:g=0,align:v="center",alignOffset:x=0,arrowPadding:w=0,avoidCollisions:C=!0,collisionBoundary:S=[],collisionPadding:R=0,sticky:T="partial",hideWhenDetached:E=!1,updatePositionStrategy:O="optimized",onPlaced:L,...I}=t,V=Ex(Ox,f),[F,H]=b.useState(null),K=ye(e,Pe=>H(Pe)),[W,J]=b.useState(null),G=xh(W),re=(n=G?.width)!==null&&n!==void 0?n:0,se=(r=G?.height)!==null&&r!==void 0?r:0,te=d+(v!=="center"?"-"+v:""),ne=typeof R=="number"?R:{top:0,right:0,bottom:0,left:0,...R},Y=Array.isArray(S)?S:[S],ce=Y.length>0,me={padding:ne,boundary:Y.filter(tO),altBoundary:ce},{refs:Ie,floatingStyles:we,placement:qe,isPositioned:Te,middlewareData:Ve}=_E({strategy:"fixed",placement:te,whileElementsMounted:(...Pe)=>Cx(...Pe,{animationFrame:O==="always"}),elements:{reference:V.anchor},middleware:[BE({mainAxis:g+se,alignmentAxis:x}),C&&NE({mainAxis:!0,crossAxis:!1,limiter:T==="partial"?jE():void 0,...me}),C&&FE({...me}),VE({...me,apply:({elements:Pe,rects:Yt,availableWidth:ft,availableHeight:_o})=>{const{width:ea,height:or}=Yt.reference,Mt=Pe.floating.style;Mt.setProperty("--radix-popper-available-width",`${ft}px`),Mt.setProperty("--radix-popper-available-height",`${_o}px`),Mt.setProperty("--radix-popper-anchor-width",`${ea}px`),Mt.setProperty("--radix-popper-anchor-height",`${or}px`)}}),W&&PE({element:W,padding:w}),nO({arrowWidth:re,arrowHeight:se}),E&&HE({strategy:"referenceHidden",...me})]}),[pe,De]=Dx(qe),Re=yt(L);ut(()=>{Te&&Re?.()},[Te,Re]);const Le=(i=Ve.arrow)===null||i===void 0?void 0:i.x,Ae=(o=Ve.arrow)===null||o===void 0?void 0:o.y,He=((s=Ve.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[wt,Ze]=b.useState();return ut(()=>{F&&Ze(window.getComputedStyle(F).zIndex)},[F]),b.createElement("div",{ref:Ie.setFloating,"data-radix-popper-content-wrapper":"",style:{...we,transform:Te?we.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:wt,"--radix-popper-transform-origin":[(a=Ve.transformOrigin)===null||a===void 0?void 0:a.x,(c=Ve.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:t.dir},b.createElement(YE,{scope:f,placedSide:pe,onArrowChange:J,arrowX:Le,arrowY:Ae,shouldHideArrow:He},b.createElement(ge.div,z({"data-side":pe,"data-align":De},I,{ref:K,style:{...I.style,animation:Te?void 0:"none",opacity:(h=Ve.hide)!==null&&h!==void 0&&h.referenceHidden?0:void 0}}))))}),QE="PopperArrow",JE={top:"bottom",right:"left",bottom:"top",left:"right"},eO=b.forwardRef(function(e,n){const{__scopePopper:r,...i}=e,o=XE(QE,r),s=JE[o.placedSide];return b.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},b.createElement(zE,z({},i,{ref:n,style:{...i.style,display:"block"}})))});function tO(t){return t!==null}const nO=t=>({name:"transformOrigin",options:t,fn(e){var n,r,i,o,s;const{placement:a,rects:c,middlewareData:h}=e,d=((n=h.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,g=d?0:t.arrowWidth,v=d?0:t.arrowHeight,[x,w]=Dx(a),C={start:"0%",center:"50%",end:"100%"}[w],S=((r=(i=h.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+g/2,R=((o=(s=h.arrow)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:0)+v/2;let T="",E="";return x==="bottom"?(T=d?C:`${S}px`,E=`${-v}px`):x==="top"?(T=d?C:`${S}px`,E=`${c.floating.height+v}px`):x==="right"?(T=`${-v}px`,E=d?C:`${R}px`):x==="left"&&(T=`${c.floating.width+v}px`,E=d?C:`${R}px`),{data:{x:T,y:E}}}});function Dx(t){const[e,n="center"]=t.split("-");return[e,n]}const cl=qE,Ws=GE,ul=ZE,Ix=eO,zs=b.forwardRef((t,e)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=t;return r?Ro.default.createPortal(b.createElement(ge.div,z({},i,{ref:e})),r):null});function rO(t,e){return b.useReducer((n,r)=>{const i=e[n][r];return i??n},t)}const Tt=t=>{const{present:e,children:n}=t,r=iO(e),i=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),o=ye(r.ref,i.ref);return typeof n=="function"||r.isPresent?b.cloneElement(i,{ref:o}):null};Tt.displayName="Presence";function iO(t){const[e,n]=b.useState(),r=b.useRef({}),i=b.useRef(t),o=b.useRef("none"),s=t?"mounted":"unmounted",[a,c]=rO(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const h=Cc(r.current);o.current=a==="mounted"?h:"none"},[a]),ut(()=>{const h=r.current,f=i.current;if(f!==t){const g=o.current,v=Cc(h);t?c("MOUNT"):v==="none"||h?.display==="none"?c("UNMOUNT"):c(f&&g!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,c]),ut(()=>{if(e){const h=d=>{const v=Cc(r.current).includes(d.animationName);d.target===e&&v&&al.flushSync(()=>c("ANIMATION_END"))},f=d=>{d.target===e&&(o.current=Cc(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(h=>{h&&(r.current=getComputedStyle(h)),n(h)},[])}}function Cc(t){return t?.animationName||"none"}function It({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=oO({defaultProp:e,onChange:n}),o=t!==void 0,s=o?t:r,a=yt(n),c=b.useCallback(h=>{if(o){const d=typeof h=="function"?h(t):h;d!==t&&a(d)}else i(h)},[o,t,i,a]);return[s,c]}function oO({defaultProp:t,onChange:e}){const n=b.useState(t),[r]=n,i=b.useRef(r),o=yt(e);return b.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const _x=b.forwardRef((t,e)=>b.createElement(ge.span,z({},t,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))),sO=_x,[yh,Cne]=bt("Tooltip",[Ni]),Rg=Ni(),aO="TooltipProvider",lO=700,H0="tooltip.open",[cO,kg]=yh(aO),uO=t=>{const{__scopeTooltip:e,delayDuration:n=lO,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=t,[s,a]=b.useState(!0),c=b.useRef(!1),h=b.useRef(0);return b.useEffect(()=>{const f=h.current;return()=>window.clearTimeout(f)},[]),b.createElement(cO,{scope:e,isOpenDelayed:s,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(h.current),a(!1)},[]),onClose:b.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:b.useCallback(f=>{c.current=f},[]),disableHoverableContent:i},o)},Tg="Tooltip",[hO,hl]=yh(Tg),fO=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:s,delayDuration:a}=t,c=kg(Tg,t.__scopeTooltip),h=Rg(e),[f,d]=b.useState(null),g=_t(),v=b.useRef(0),x=s??c.disableHoverableContent,w=a??c.delayDuration,C=b.useRef(!1),[S=!1,R]=It({prop:r,defaultProp:i,onChange:I=>{I?(c.onOpen(),document.dispatchEvent(new CustomEvent(H0))):c.onClose(),o?.(I)}}),T=b.useMemo(()=>S?C.current?"delayed-open":"instant-open":"closed",[S]),E=b.useCallback(()=>{window.clearTimeout(v.current),C.current=!1,R(!0)},[R]),O=b.useCallback(()=>{window.clearTimeout(v.current),R(!1)},[R]),L=b.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{C.current=!0,R(!0)},w)},[w,R]);return b.useEffect(()=>()=>window.clearTimeout(v.current),[]),b.createElement(cl,h,b.createElement(hO,{scope:e,contentId:g,open:S,stateAttribute:T,trigger:f,onTriggerChange:d,onTriggerEnter:b.useCallback(()=>{c.isOpenDelayed?L():E()},[c.isOpenDelayed,L,E]),onTriggerLeave:b.useCallback(()=>{x?O():window.clearTimeout(v.current)},[O,x]),onOpen:E,onClose:O,disableHoverableContent:x},n))},Zv="TooltipTrigger",dO=b.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=hl(Zv,n),o=kg(Zv,n),s=Rg(n),a=b.useRef(null),c=ye(e,a,i.onTriggerChange),h=b.useRef(!1),f=b.useRef(!1),d=b.useCallback(()=>h.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),b.createElement(Ws,z({asChild:!0},s),b.createElement(ge.button,z({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:c,onPointerMove:ie(t.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:ie(t.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:ie(t.onPointerDown,()=>{h.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ie(t.onFocus,()=>{h.current||i.onOpen()}),onBlur:ie(t.onBlur,i.onClose),onClick:ie(t.onClick,i.onClose)})))}),Lx="TooltipPortal",[gO,mO]=yh(Lx,{forceMount:void 0}),pO=t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:i}=t,o=hl(Lx,e);return b.createElement(gO,{scope:e,forceMount:n},b.createElement(Tt,{present:n||o.open},b.createElement(zs,{asChild:!0,container:i},r)))},Va="TooltipContent",vO=b.forwardRef((t,e)=>{const n=mO(Va,t.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=t,s=hl(Va,t.__scopeTooltip);return b.createElement(Tt,{present:r||s.open},s.disableHoverableContent?b.createElement(Bx,z({side:i},o,{ref:e})):b.createElement(bO,z({side:i},o,{ref:e})))}),bO=b.forwardRef((t,e)=>{const n=hl(Va,t.__scopeTooltip),r=kg(Va,t.__scopeTooltip),i=b.useRef(null),o=ye(e,i),[s,a]=b.useState(null),{trigger:c,onClose:h}=n,f=i.current,{onPointerInTransitChange:d}=r,g=b.useCallback(()=>{a(null),d(!1)},[d]),v=b.useCallback((x,w)=>{const C=x.currentTarget,S={x:x.clientX,y:x.clientY},R=xO(S,C.getBoundingClientRect()),T=yO(S,R),E=CO(w.getBoundingClientRect()),O=SO([...T,...E]);a(O),d(!0)},[d]);return b.useEffect(()=>()=>g(),[g]),b.useEffect(()=>{if(c&&f){const x=C=>v(C,f),w=C=>v(C,c);return c.addEventListener("pointerleave",x),f.addEventListener("pointerleave",w),()=>{c.removeEventListener("pointerleave",x),f.removeEventListener("pointerleave",w)}}},[c,f,v,g]),b.useEffect(()=>{if(s){const x=w=>{const C=w.target,S={x:w.clientX,y:w.clientY},R=c?.contains(C)||f?.contains(C),T=!$O(S,s);R?g():T&&(g(),h())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,f,s,h,g]),b.createElement(Bx,z({},t,{ref:o}))}),[wO,$ne]=yh(Tg,{isInside:!1}),Bx=b.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...a}=t,c=hl(Va,n),h=Rg(n),{onClose:f}=c;return b.useEffect(()=>(document.addEventListener(H0,f),()=>document.removeEventListener(H0,f)),[f]),b.useEffect(()=>{if(c.trigger){const d=g=>{const v=g.target;v!=null&&v.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),b.createElement(ko,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:f},b.createElement(ul,z({"data-state":c.stateAttribute},h,a,{ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),b.createElement(bg,null,r),b.createElement(wO,{scope:n,isInside:!0},b.createElement(sO,{id:c.contentId,role:"tooltip"},i||r))))});function xO(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),o=Math.abs(e.left-t.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function yO(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function CO(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function $O(t,e){const{x:n,y:r}=t;let i=!1;for(let o=0,s=e.length-1;o<e.length;s=o++){const a=e[o].x,c=e[o].y,h=e[s].x,f=e[s].y;c>r!=f>r&&n<(h-a)*(r-c)/(f-c)+a&&(i=!i)}return i}function SO(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),AO(e)}function AO(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const o=e[e.length-1],s=e[e.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}const RO=uO,Nx=fO,jx=dO,Fx=pO,Vx=vO;let Nd=0;function Us(){b.useEffect(()=>{var t,e;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=n[0])!==null&&t!==void 0?t:Qv()),document.body.insertAdjacentElement("beforeend",(e=n[1])!==null&&e!==void 0?e:Qv()),Nd++,()=>{Nd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Nd--}},[])}function Qv(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const jd="focusScope.autoFocusOnMount",Fd="focusScope.autoFocusOnUnmount",Jv={bubbles:!1,cancelable:!0},qs=b.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=t,[a,c]=b.useState(null),h=yt(i),f=yt(o),d=b.useRef(null),g=ye(e,w=>c(w)),v=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let w=function(T){if(v.paused||!a)return;const E=T.target;a.contains(E)?d.current=E:xi(d.current,{select:!0})},C=function(T){if(v.paused||!a)return;const E=T.relatedTarget;E!==null&&(a.contains(E)||xi(d.current,{select:!0}))},S=function(T){if(document.activeElement===document.body)for(const O of T)O.removedNodes.length>0&&xi(a)};document.addEventListener("focusin",w),document.addEventListener("focusout",C);const R=new MutationObserver(S);return a&&R.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",C),R.disconnect()}}},[r,a,v.paused]),b.useEffect(()=>{if(a){t5.add(v);const w=document.activeElement;if(!a.contains(w)){const S=new CustomEvent(jd,Jv);a.addEventListener(jd,h),a.dispatchEvent(S),S.defaultPrevented||(kO(DO(Hx(a)),{select:!0}),document.activeElement===w&&xi(a))}return()=>{a.removeEventListener(jd,h),setTimeout(()=>{const S=new CustomEvent(Fd,Jv);a.addEventListener(Fd,f),a.dispatchEvent(S),S.defaultPrevented||xi(w??document.body,{select:!0}),a.removeEventListener(Fd,f),t5.remove(v)},0)}}},[a,h,f,v]);const x=b.useCallback(w=>{if(!n&&!r||v.paused)return;const C=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,S=document.activeElement;if(C&&S){const R=w.currentTarget,[T,E]=TO(R);T&&E?!w.shiftKey&&S===E?(w.preventDefault(),n&&xi(T,{select:!0})):w.shiftKey&&S===T&&(w.preventDefault(),n&&xi(E,{select:!0})):S===R&&w.preventDefault()}},[n,r,v.paused]);return b.createElement(ge.div,z({tabIndex:-1},s,{ref:g,onKeyDown:x}))});function kO(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(xi(r,{select:e}),document.activeElement!==n)return}function TO(t){const e=Hx(t),n=e5(e,t),r=e5(e.reverse(),t);return[n,r]}function Hx(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function e5(t,e){for(const n of t)if(!MO(n,{upTo:e}))return n}function MO(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function EO(t){return t instanceof HTMLInputElement&&"select"in t}function xi(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&EO(t)&&e&&t.select()}}const t5=OO();function OO(){let t=[];return{add(e){const n=t[0];e!==n&&n?.pause(),t=n5(t,e),t.unshift(e)},remove(e){var n;t=n5(t,e),(n=t[0])===null||n===void 0||n.resume()}}}function n5(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function DO(t){return t.filter(e=>e.tagName!=="A")}var IO=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Xo=new WeakMap,$c=new WeakMap,Sc={},Vd=0,Px=function(t){return t&&(t.host||Px(t.parentNode))},_O=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=Px(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},LO=function(t,e,n,r){var i=_O(e,Array.isArray(t)?t:[t]);Sc[n]||(Sc[n]=new WeakMap);var o=Sc[n],s=[],a=new Set,c=new Set(i),h=function(d){!d||a.has(d)||(a.add(d),h(d.parentNode))};i.forEach(h);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(g){if(a.has(g))f(g);else try{var v=g.getAttribute(r),x=v!==null&&v!=="false",w=(Xo.get(g)||0)+1,C=(o.get(g)||0)+1;Xo.set(g,w),o.set(g,C),s.push(g),w===1&&x&&$c.set(g,!0),C===1&&g.setAttribute(n,"true"),x||g.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",g,S)}})};return f(e),a.clear(),Vd++,function(){s.forEach(function(d){var g=Xo.get(d)-1,v=o.get(d)-1;Xo.set(d,g),o.set(d,v),g||($c.has(d)||d.removeAttribute(r),$c.delete(d)),v||d.removeAttribute(n)}),Vd--,Vd||(Xo=new WeakMap,Xo=new WeakMap,$c=new WeakMap,Sc={})}},Wx=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=IO(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),LO(r,i,n,"aria-hidden")):function(){return null}};exports.__assign=function(){return exports.__assign=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},exports.__assign.apply(this,arguments)};function Ks(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function Ch(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var lo="right-scroll-bar-position",co="width-before-scroll-bar",BO="with-scroll-bars-hidden",NO="--removed-body-scroll-bar-size";function Hd(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function jO(t,e){var n=b.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var FO=typeof window<"u"?$.useLayoutEffect:$.useEffect,r5=new WeakMap;function $h(t,e){var n=jO(null,function(r){return t.forEach(function(i){return Hd(i,r)})});return FO(function(){var r=r5.get(n);if(r){var i=new Set(r),o=new Set(t),s=n.current;i.forEach(function(a){o.has(a)||Hd(a,null)}),o.forEach(function(a){i.has(a)||Hd(a,s)})}r5.set(n,t)},[t]),n}function VO(t){return t}function HO(t,e){e===void 0&&(e=VO);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(o){var s=e(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var c=function(){var f=s;s=[],f.forEach(o)},h=function(){return Promise.resolve().then(c)};h(),n={push:function(f){s.push(f),h()},filter:function(f){return s=s.filter(f),n}}}};return i}function Sh(t){t===void 0&&(t={});var e=HO(null);return e.options=exports.__assign({async:!0,ssr:!1},t),e}var zx=function(t){var e=t.sideCar,n=Ks(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return $.createElement(r,exports.__assign({},n))};zx.isSideCarExport=!0;function Ah(t,e){return t.useMedium(e),zx}var Ux=Sh(),Pd=function(){},Rh=$.forwardRef(function(t,e){var n=$.useRef(null),r=$.useState({onScrollCapture:Pd,onWheelCapture:Pd,onTouchMoveCapture:Pd}),i=r[0],o=r[1],s=t.forwardProps,a=t.children,c=t.className,h=t.removeScrollBar,f=t.enabled,d=t.shards,g=t.sideCar,v=t.noIsolation,x=t.inert,w=t.allowPinchZoom,C=t.as,S=C===void 0?"div":C,R=t.gapMode,T=Ks(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=g,O=$h([n,e]),L=exports.__assign(exports.__assign({},T),i);return $.createElement($.Fragment,null,f&&$.createElement(E,{sideCar:Ux,removeScrollBar:h,shards:d,noIsolation:v,inert:x,setCallbacks:o,allowPinchZoom:!!w,lockRef:n,gapMode:R}),s?$.cloneElement($.Children.only(a),exports.__assign(exports.__assign({},L),{ref:O})):$.createElement(S,exports.__assign({},L,{className:c,ref:O}),a))});Rh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Rh.classNames={fullWidth:co,zeroRight:lo};var PO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function WO(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=PO();return e&&t.setAttribute("nonce",e),t}function zO(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function UO(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var qO=function(){var t=0,e=null;return{add:function(n){t==0&&(e=WO())&&(zO(e,n),UO(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},KO=function(){var t=qO();return function(e,n){$.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},fl=function(){var t=KO(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},GO={left:0,top:0,right:0,gap:0},Wd=function(t){return parseInt(t||"",10)||0},YO=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[Wd(n),Wd(r),Wd(i)]},XO=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return GO;var e=YO(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},ZO=fl(),vs="data-scroll-locked",QO=function(t,e,n,r){var i=t.left,o=t.top,s=t.right,a=t.gap;return n===void 0&&(n="margin"),`
  .`.concat(BO,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(a,"px ").concat(r,`;
  }
  body[`).concat(vs,`] {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(i,`px;
    padding-top: `).concat(o,`px;
    padding-right: `).concat(s,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(a,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(lo,` {
    right: `).concat(a,"px ").concat(r,`;
  }
  
  .`).concat(co,` {
    margin-right: `).concat(a,"px ").concat(r,`;
  }
  
  .`).concat(lo," .").concat(lo,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(co," .").concat(co,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat(vs,`] {
    `).concat(NO,": ").concat(a,`px;
  }
`)},i5=function(){var t=parseInt(document.body.getAttribute(vs)||"0",10);return isFinite(t)?t:0},JO=function(){$.useEffect(function(){return document.body.setAttribute(vs,(i5()+1).toString()),function(){var t=i5()-1;t<=0?document.body.removeAttribute(vs):document.body.setAttribute(vs,t.toString())}},[])},kh=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;JO();var o=$.useMemo(function(){return XO(i)},[i]);return $.createElement(ZO,{styles:QO(o,!e,i,n?"":"!important")})},P0=!1;if(typeof window<"u")try{var Ac=Object.defineProperty({},"passive",{get:function(){return P0=!0,!0}});window.addEventListener("test",Ac,Ac),window.removeEventListener("test",Ac,Ac)}catch{P0=!1}var Zo=P0?{passive:!1}:!1,eD=function(t){return t.tagName==="TEXTAREA"},qx=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!eD(t)&&n[e]==="visible")},tD=function(t){return qx(t,"overflowY")},nD=function(t){return qx(t,"overflowX")},o5=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Kx(t,r);if(i){var o=Gx(t,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},rD=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},iD=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Kx=function(t,e){return t==="v"?tD(e):nD(e)},Gx=function(t,e){return t==="v"?rD(e):iD(e)},oD=function(t,e){return t==="h"&&e==="rtl"?-1:1},sD=function(t,e,n,r,i){var o=oD(t,window.getComputedStyle(e).direction),s=o*r,a=n.target,c=e.contains(a),h=!1,f=s>0,d=0,g=0;do{var v=Gx(t,a),x=v[0],w=v[1],C=v[2],S=w-C-o*x;(x||S)&&Kx(t,a)&&(d+=S,g+=x),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&Math.abs(d)<1||!f&&Math.abs(g)<1)&&(h=!0),h},Rc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},s5=function(t){return[t.deltaX,t.deltaY]},a5=function(t){return t&&"current"in t?t.current:t},aD=function(t,e){return t[0]===e[0]&&t[1]===e[1]},lD=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},cD=0,Qo=[];function uD(t){var e=$.useRef([]),n=$.useRef([0,0]),r=$.useRef(),i=$.useState(cD++)[0],o=$.useState(fl)[0],s=$.useRef(t);$.useEffect(function(){s.current=t},[t]),$.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var w=Ch([t.lockRef.current],(t.shards||[]).map(a5),!0).filter(Boolean);return w.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=$.useCallback(function(w,C){if("touches"in w&&w.touches.length===2)return!s.current.allowPinchZoom;var S=Rc(w),R=n.current,T="deltaX"in w?w.deltaX:R[0]-S[0],E="deltaY"in w?w.deltaY:R[1]-S[1],O,L=w.target,I=Math.abs(T)>Math.abs(E)?"h":"v";if("touches"in w&&I==="h"&&L.type==="range")return!1;var V=o5(I,L);if(!V)return!0;if(V?O=I:(O=I==="v"?"h":"v",V=o5(I,L)),!V)return!1;if(!r.current&&"changedTouches"in w&&(T||E)&&(r.current=O),!O)return!0;var F=r.current||O;return sD(F,C,w,F==="h"?T:E)},[]),c=$.useCallback(function(w){var C=w;if(!(!Qo.length||Qo[Qo.length-1]!==o)){var S="deltaY"in C?s5(C):Rc(C),R=e.current.filter(function(O){return O.name===C.type&&(O.target===C.target||C.target===O.shadowParent)&&aD(O.delta,S)})[0];if(R&&R.should){C.cancelable&&C.preventDefault();return}if(!R){var T=(s.current.shards||[]).map(a5).filter(Boolean).filter(function(O){return O.contains(C.target)}),E=T.length>0?a(C,T[0]):!s.current.noIsolation;E&&C.cancelable&&C.preventDefault()}}},[]),h=$.useCallback(function(w,C,S,R){var T={name:w,delta:C,target:S,should:R,shadowParent:hD(S)};e.current.push(T),setTimeout(function(){e.current=e.current.filter(function(E){return E!==T})},1)},[]),f=$.useCallback(function(w){n.current=Rc(w),r.current=void 0},[]),d=$.useCallback(function(w){h(w.type,s5(w),w.target,a(w,t.lockRef.current))},[]),g=$.useCallback(function(w){h(w.type,Rc(w),w.target,a(w,t.lockRef.current))},[]);$.useEffect(function(){return Qo.push(o),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:g}),document.addEventListener("wheel",c,Zo),document.addEventListener("touchmove",c,Zo),document.addEventListener("touchstart",f,Zo),function(){Qo=Qo.filter(function(w){return w!==o}),document.removeEventListener("wheel",c,Zo),document.removeEventListener("touchmove",c,Zo),document.removeEventListener("touchstart",f,Zo)}},[]);var v=t.removeScrollBar,x=t.inert;return $.createElement($.Fragment,null,x?$.createElement(o,{styles:lD(i)}):null,v?$.createElement(kh,{gapMode:t.gapMode}):null)}function hD(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const fD=Ah(Ux,uD);var Th=$.forwardRef(function(t,e){return $.createElement(Rh,exports.__assign({},t,{ref:e,sideCar:fD}))});Th.classNames=Rh.classNames;function W0(t,[e,n]){return Math.min(n,Math.max(e,t))}function Mh(t){const e=t+"CollectionProvider",[n,r]=bt(e),[i,o]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:x,children:w}=v,C=$.default.useRef(null),S=$.default.useRef(new Map).current;return $.default.createElement(i,{scope:x,itemMap:S,collectionRef:C},w)},a=t+"CollectionSlot",c=$.default.forwardRef((v,x)=>{const{scope:w,children:C}=v,S=o(a,w),R=ye(x,S.collectionRef);return $.default.createElement(Cr,{ref:R},C)}),h=t+"CollectionItemSlot",f="data-radix-collection-item",d=$.default.forwardRef((v,x)=>{const{scope:w,children:C,...S}=v,R=$.default.useRef(null),T=ye(x,R),E=o(h,w);return $.default.useEffect(()=>(E.itemMap.set(R,{ref:R,...S}),()=>void E.itemMap.delete(R))),$.default.createElement(Cr,{[f]:"",ref:T},C)});function g(v){const x=o(t+"CollectionConsumer",v);return $.default.useCallback(()=>{const C=x.collectionRef.current;if(!C)return[];const S=Array.from(C.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((E,O)=>S.indexOf(E.ref.current)-S.indexOf(O.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:c,ItemSlot:d},g,r]}const dD=b.createContext(void 0);function To(t){const e=b.useContext(dD);return t||e||"ltr"}function Eh(t){const e=b.useRef({value:t,previous:t});return b.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function gD(t){const e=`${t}CollectionProvider`,[n,r]=bt(e),[i,o]=n(e,{collectionRef:{current:null},itemMap:new Map,listeners:new Set}),s=v=>{const{scope:x,children:w}=v,C=$.useRef(null),S=$.useRef(new Map).current,R=$.useRef(new Set).current;return p.jsx(i,{scope:x,itemMap:S,collectionRef:C,listeners:R,children:w})};s.displayName=e;const a=`${t}CollectionSlot`,c=$.forwardRef((v,x)=>{const{scope:w,children:C}=v,S=o(a,w),R=ye(x,S.collectionRef);return p.jsx(Cr,{ref:R,children:C})});c.displayName=a;const h=`${t}CollectionItemSlot`,f="data-radix-collection-item",d=$.forwardRef((v,x)=>{const{scope:w,children:C,...S}=v,R=$.useRef(null),T=ye(x,R),E=o(h,w);return $.useEffect(()=>{const O=Array.from(E.itemMap.values());return E.itemMap.set(R,{ref:R,...S}),E.listeners.forEach(L=>L(Array.from(E.itemMap.values()),O)),()=>{const L=Array.from(E.itemMap.values());E.itemMap.delete(R),E.listeners.forEach(I=>I(Array.from(E.itemMap.values()),L))}}),p.jsx(Cr,{[f]:"",ref:T,children:C})});d.displayName=h;function g(v){const x=o(`${t}CollectionConsumer`,v),w=$.useCallback(()=>{const S=x.collectionRef.current;if(!S)return[];const R=Array.from(S.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((O,L)=>R.indexOf(O.ref.current)-R.indexOf(L.ref.current))},[x.collectionRef,x.itemMap]),C=$.useCallback(S=>(x.listeners.add(S),()=>x.listeners.delete(S)),[x.listeners]);return{getItems:w,subscribe:C}}return[{Provider:s,Slot:c,ItemSlot:d},g,r]}const zd=new Map;function mD(t,e){const n=t+(e?Object.entries(e).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(zd.has(n))return zd.get(n);const r=new Intl.Collator(t,e);return zd.set(n,r),r}function Mg(t,e){const n=mD(t,{usage:"search",...e});return{startsWith(r,i){return i.length===0?!0:(r=r.normalize("NFC"),i=i.normalize("NFC"),n.compare(r.slice(0,i.length),i)===0)},endsWith(r,i){return i.length===0?!0:(r=r.normalize("NFC"),i=i.normalize("NFC"),n.compare(r.slice(-i.length),i)===0)},contains(r,i){if(i.length===0)return!0;r=r.normalize("NFC"),i=i.normalize("NFC");let o=0;const s=i.length;for(;o+s<=r.length;o++){const a=r.slice(o,o+s);if(n.compare(i,a)===0)return!0}return!1}}}const Yx=t=>{const e=$.useRef();return $.useEffect(()=>{e.current=t}),e.current},pD=[" ","Enter","ArrowUp","ArrowDown"],vD=["Enter"],bD=t=>!!(t.length===1&&t.match(/\S| /)),Xx="Combobox",[Ms,dl]=gD(Xx),[wD,Rr]=vg(Xx),xD=({children:t})=>p.jsx(cl,{children:p.jsx(Ms.Provider,{scope:void 0,children:t})}),yD=t=>typeof t=="string"?t==="none"?{type:t,filter:void 0}:{type:t,filter:"startsWith"}:t,CD=t=>{const{allowCustomValue:e=!1,autocomplete:n="none",children:r,open:i,defaultOpen:o,onOpenChange:s,value:a,defaultValue:c,onValueChange:h,disabled:f,required:d=!1,locale:g="en-EN",onTextValueChange:v,textValue:x,defaultTextValue:w,filterValue:C,defaultFilterValue:S,onFilterValueChange:R,isPrintableCharacter:T=bD,visible:E=!1}=t,[O,L]=$.useState(null),[I,V]=$.useState(null),[F,H]=$.useState(null),[K,W]=$.useState(null),[J=!1,G]=It({prop:i,defaultProp:o,onChange:s}),[re,se]=It({prop:a,defaultProp:c,onChange:h}),[te,ne]=It({prop:x,defaultProp:e&&!w?a:w,onChange:v}),[Y,ce]=It({prop:C,defaultProp:S,onChange:R}),me=_t(),Ie=$.useCallback((qe,Te)=>{const Ve=Te.map(Ae=>Ae.ref.current),[pe,...De]=Ve,[Re]=De.slice(-1),Le=K??Te.find(Ae=>Ae.value===re)?.ref.current;for(const Ae of qe){if(Ae===Le)return;if(Ae?.scrollIntoView({block:"nearest"}),Ae===pe&&I&&(I.scrollTop=0),Ae===Re&&I&&(I.scrollTop=I.scrollHeight),W(Ae),n==="both"){const He=Te.find(wt=>wt.ref.current===Ae);He&&ne(He.textValue)}if(Ae!==Le)return}},[n,ne,I,K,re]),we=yD(n);return $.useEffect(()=>{n!=="both"&&W(null)},[te,n]),$.useEffect(()=>{if(F&&O)return Wx([F,O])},[F,O]),p.jsx(xD,{children:p.jsx(wD,{allowCustomValue:e,autocomplete:we,required:d,trigger:O,onTriggerChange:L,contentId:me,value:re,onValueChange:se,open:J,onOpenChange:G,disabled:f,locale:g,focusFirst:Ie,textValue:te,onTextValueChange:ne,onViewportChange:V,onContentChange:H,visuallyFocussedItem:K,filterValue:Y,onFilterValueChange:ce,onVisuallyFocussedItemChange:W,isPrintableCharacter:T,visible:E,children:r})})},Zx="ComboboxTrigger",Qx=$.forwardRef((t,e)=>{const{...n}=t,r=Rr(Zx),i=()=>{r.disabled||r.onOpenChange(!0)};return p.jsx(Ws,{asChild:!0,children:p.jsx(qs,{asChild:!0,trapped:r.open,onMountAutoFocus:o=>{o.preventDefault()},onUnmountAutoFocus:o=>{r.trigger?.focus({preventScroll:!0}),document.getSelection()?.empty(),o.preventDefault()},children:p.jsx("div",{ref:e,"data-disabled":r.disabled?"":void 0,...n,onClick:ie(n.onClick,o=>{if(r.disabled){o.preventDefault();return}r.trigger?.focus()}),onPointerDown:ie(n.onPointerDown,o=>{if(r.disabled){o.preventDefault();return}const s=o.target;s.hasPointerCapture(o.pointerId)&&s.releasePointerCapture(o.pointerId),(s.closest("button")??s.closest("div"))===o.currentTarget&&o.button===0&&o.ctrlKey===!1&&(i(),r.trigger?.focus())})})})})});Qx.displayName=Zx;const Jx="ComboboxInput",e3=$.forwardRef((t,e)=>{const n=Rr(Jx),r=$.useRef(null),{getItems:i}=dl(void 0),{startsWith:o}=Mg(n.locale,{sensitivity:"base"}),s=n.disabled,a=ye(r,e,n.onTriggerChange),c=()=>{s||n.onOpenChange(!0)},h=Yx(n.filterValue);return ut(()=>{const f=setTimeout(()=>{if(n.textValue===""||n.textValue===void 0||n.filterValue===""||n.filterValue===void 0)return;const d=i().find(v=>v.type==="option"&&o(v.textValue,n.textValue)),g=ND(h??"",n.filterValue);d&&!n.visuallyFocussedItem&&g===n.filterValue.length&&r.current?.setSelectionRange(n.filterValue.length,n.textValue.length)});return()=>clearTimeout(f)},[n.textValue,n.filterValue,o,n.visuallyFocussedItem,i,h]),p.jsx("input",{type:"text",role:"combobox","aria-controls":n.contentId,"aria-expanded":n.open,"aria-required":n.required,"aria-autocomplete":n.autocomplete.type,"data-state":n.open?"open":"closed","aria-disabled":s,"aria-activedescendant":n.visuallyFocussedItem?.id,disabled:s,"data-disabled":s?"":void 0,"data-placeholder":n.textValue===void 0?"":void 0,value:n.textValue??"",...t,ref:a,onKeyDown:ie(t.onKeyDown,f=>{if(["ArrowUp","ArrowDown","Home","End"].includes(f.key))n.open||c(),setTimeout(()=>{let g=i().filter(v=>!v.disabled&&v.isVisible).map(v=>v.ref.current);if(["ArrowUp","End"].includes(f.key)&&(g=g.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const v=n.visuallyFocussedItem??i().find(x=>x.value===n.value)?.ref.current;if(v){let x=g.indexOf(v);x===g.length-1&&(x=-1),g=g.slice(x+1)}}if(["ArrowDown"].includes(f.key)&&n.autocomplete.type==="both"&&g.length>1){const[v,...x]=g,w=i().find(C=>C.ref.current===v).textValue;n.textValue===w&&(g=x)}n.focusFirst(g,i())}),f.preventDefault();else if(["Tab"].includes(f.key)&&n.open)f.preventDefault();else if(["Escape"].includes(f.key))n.open?n.onOpenChange(!1):(n.onValueChange(void 0),n.onTextValueChange("")),f.preventDefault();else if(vD.includes(f.key)){if(n.visuallyFocussedItem){const d=i().find(g=>g.ref.current===n.visuallyFocussedItem);d&&(n.onValueChange(d.value),n.onTextValueChange(d.textValue),n.autocomplete.type==="both"&&n.onFilterValueChange(d.textValue),d.ref.current?.click())}else{const d=i().find(g=>g.type==="option"&&!g.disabled&&g.textValue===n.textValue);d&&(n.onValueChange(d.value),n.onTextValueChange(d.textValue),n.autocomplete.type==="both"&&n.onFilterValueChange(d.textValue),d.ref.current?.click())}n.onOpenChange(!1),f.preventDefault()}else n.onVisuallyFocussedItemChange(null)}),onChange:ie(t.onChange,f=>{n.onTextValueChange(f.currentTarget.value),n.autocomplete.type==="both"&&n.onFilterValueChange(f.currentTarget.value)}),onKeyUp:ie(t.onKeyUp,f=>{if(!n.open&&(n.isPrintableCharacter(f.key)||["Backspace"].includes(f.key))&&c(),setTimeout(()=>{if(n.autocomplete.type==="both"&&n.isPrintableCharacter(f.key)&&n.filterValue!==void 0){const d=n.filterValue,g=i().find(v=>o(v.textValue,d));g&&n.onTextValueChange(g.textValue)}}),n.autocomplete.type==="none"&&n.isPrintableCharacter(f.key)){const d=n.textValue??"",g=i().find(v=>o(v.textValue,d));g&&(n.onVisuallyFocussedItemChange(g.ref.current),g.ref.current?.scrollIntoView())}}),onBlur:ie(t.onBlur,()=>{if(n.open)return;n.onVisuallyFocussedItemChange(null);const[f]=i().filter(g=>g.textValue===n.textValue&&g.type==="option");if(f){n.onValueChange(f.value),n.autocomplete.type==="both"&&n.onFilterValueChange(f.textValue);return}if(n.allowCustomValue){n.onValueChange(n.textValue),n.autocomplete.type==="both"&&n.onFilterValueChange(n.textValue);return}const[d]=i().filter(g=>g.value===n.value&&g.type==="option");d&&n.textValue!==""?(n.onTextValueChange(d.textValue),n.autocomplete.type==="both"&&n.onFilterValueChange(d.textValue)):(n.onValueChange(void 0),n.onTextValueChange(""))})})});e3.displayName="ComboboxTextInput";const t3=$.forwardRef((t,e)=>{const{children:n,...r}=t,i=Rr(Jx),o=i.disabled,s=()=>{o||(i.onOpenChange(!0),i.trigger?.focus())};return p.jsx(ge.button,{"aria-hidden":!0,type:"button","aria-disabled":o,"aria-controls":i.contentId,"aria-expanded":i.open,disabled:o,"data-disabled":o?"":void 0,...r,tabIndex:-1,ref:e,onClick:ie(r.onClick,()=>{i.trigger?.focus()}),onPointerDown:ie(r.onPointerDown,a=>{a.button===0&&a.ctrlKey===!1&&(s(),a.preventDefault())}),onKeyDown:ie(r.onKeyDown,a=>{pD.includes(a.key)&&(s(),a.preventDefault())}),children:n||"▼"})});t3.displayName="ComboboxIcon";const $D="ComboboxPortal",n3=t=>p.jsx(zs,{asChild:!0,...t});n3.displayName=$D;const Eg="ComboboxContent",r3=$.forwardRef((t,e)=>{const n=Rr(Eg),{getItems:r}=dl(void 0),[i,o]=$.useState();if(ut(()=>{o(new DocumentFragment)},[]),ut(()=>{n.open&&n.autocomplete.type==="none"&&setTimeout(()=>{r().find(a=>a.value===n.value)?.ref.current?.scrollIntoView({block:"nearest"})})},[r,n.autocomplete,n.value,n.open]),!n.open){const s=i;return s?Ro.createPortal(p.jsx(Ms.Slot,{scope:void 0,children:p.jsx("div",{children:t.children})}),s):null}return p.jsx(i3,{...t,ref:e})});r3.displayName=Eg;const SD=10,i3=$.forwardRef((t,e)=>{const{onEscapeKeyDown:n,onPointerDownOutside:r,...i}=t,o=Rr(Eg),s=ye(e,c=>o.onContentChange(c)),{onOpenChange:a}=o;return Us(),$.useEffect(()=>{const c=()=>{a(!1)};return window.addEventListener("blur",c),window.addEventListener("resize",c),()=>{window.removeEventListener("blur",c),window.removeEventListener("resize",c)}},[a]),p.jsx(Th,{allowPinchZoom:!0,children:p.jsx(ko,{asChild:!0,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:c=>{c.preventDefault()},onDismiss:()=>{o.onOpenChange(!1),o.trigger?.focus({preventScroll:!0})},children:p.jsx(o3,{role:"listbox",id:o.contentId,"data-state":o.open?"open":"closed",onContextMenu:c=>c.preventDefault(),...i,ref:s,style:{display:"flex",flexDirection:"column",outline:"none",...i.style}})})})});i3.displayName="ComboboxContentImpl";const o3=$.forwardRef((t,e)=>{const{align:n="start",collisionPadding:r=SD,...i}=t;return p.jsx(ul,{...i,ref:e,align:n,collisionPadding:r,style:{boxSizing:"border-box",...i.style,"--radix-combobox-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-combobox-content-available-width":"var(--radix-popper-available-width)","--radix-combobox-content-available-height":"var(--radix-popper-available-height)","--radix-combobox-trigger-width":"var(--radix-popper-anchor-width)","--radix-combobox-trigger-height":"var(--radix-popper-anchor-height)"}})});o3.displayName="ComboboxPopperPosition";const s3="ComboboxViewport",a3=$.forwardRef((t,e)=>{const n=Rr(s3),r=ye(e,n.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-combobox-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-combobox-viewport]::-webkit-scrollbar{display:none}"}}),p.jsx(Ms.Slot,{scope:void 0,children:p.jsx(ge.div,{"data-radix-combobox-viewport":"",role:"presentation",...t,ref:r,style:{position:"relative",flex:1,overflow:"auto",...t.style}})})]})});a3.displayName=s3;const Oh="ComboboxItem",[l5,Og]=vg(Oh),Dg=$.forwardRef((t,e)=>{const{value:n,disabled:r=!1,textValue:i,...o}=t,[s,a]=$.useState();ut(()=>{a(new DocumentFragment)},[]);const{onTextValueChange:c,textValue:h,...f}=Rr(Oh),d=_t(),[g,v]=$.useState(i??""),x=f.value===n,{startsWith:w,contains:C}=Mg(f.locale,{sensitivity:"base"}),S=$.useCallback(R=>{v(T=>T||(R?.textContent??"").trim())},[]);return $.useEffect(()=>{x&&h===void 0&&g!==""&&c(g)},[g,x,h,c]),f.autocomplete.type==="both"&&g&&f.filterValue&&!w(g,f.filterValue)||f.autocomplete.type==="list"&&f.autocomplete.filter==="startsWith"&&g&&h&&!w(g,h)||f.autocomplete.type==="list"&&f.autocomplete.filter==="contains"&&g&&h&&!C(g,h)?s?Ro.createPortal(p.jsx(l5,{textId:d,onTextValueChange:S,isSelected:x,textValue:g,children:p.jsx(Ms.ItemSlot,{scope:void 0,value:n,textValue:g,disabled:r,type:"option",isVisible:!1,children:p.jsx(z0,{ref:e,value:n,disabled:r,...o})})}),s):null:p.jsx(l5,{textId:d,onTextValueChange:S,isSelected:x,textValue:g,children:p.jsx(Ms.ItemSlot,{scope:void 0,value:n,textValue:g,disabled:r,type:"option",isVisible:!0,children:p.jsx(z0,{ref:e,value:n,disabled:r,...o})})})});Dg.displayName=Oh;const l3="ComboboxItemImpl",z0=$.forwardRef((t,e)=>{const{value:n,disabled:r=!1,...i}=t,o=$.useRef(null),s=ye(e,o),{getItems:a}=dl(void 0),{onTextValueChange:c,visuallyFocussedItem:h,...f}=Rr(Oh),{isSelected:d,textValue:g,textId:v}=Og(l3),x=()=>{r||(f.onValueChange(n),c(g),f.onOpenChange(!1),f.autocomplete.type==="both"&&f.onFilterValueChange(g),f.trigger?.focus({preventScroll:!0}))},w=$.useMemo(()=>h===a().find(S=>S.ref.current===o.current)?.ref.current,[a,h]),C=_t();return p.jsx(ge.div,{role:"option","aria-labelledby":v,"data-highlighted":w?"":void 0,"aria-selected":d&&w,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...i,id:C,ref:s,onPointerUp:ie(i.onPointerUp,x)})});z0.displayName=l3;const c3="ComboboxItemText",u3=$.forwardRef((t,e)=>{const{className:n,style:r,...i}=t,o=Og(c3),s=ye(e,o.onTextValueChange);return p.jsx(ge.span,{id:o.textId,...i,ref:s})});u3.displayName=c3;const h3="ComboboxItemIndicator",f3=$.forwardRef((t,e)=>{const{isSelected:n}=Og(h3);return n?p.jsx(ge.span,{"aria-hidden":!0,...t,ref:e}):null});f3.displayName=h3;const Ig="ComboboxNoValueFound",d3=$.forwardRef((t,e)=>{const{textValue:n="",filterValue:r="",visible:i=!1,locale:o,autocomplete:s}=Rr(Ig),[a,c]=$.useState([]),{subscribe:h}=dl(void 0),{startsWith:f,contains:d}=Mg(o,{sensitivity:"base"});return $.useEffect(()=>{const g=h(v=>{if(i){const x=v.filter(w=>w.type!=="create");c(x)}else c(v)});return()=>{g()}},[i,h]),s.type==="none"&&a.length>0||s.type==="list"&&s.filter==="startsWith"&&a.some(g=>f(g.textValue,n))||s.type==="both"&&a.some(g=>f(g.textValue,r))||s.type==="list"&&s.filter==="contains"&&a.some(g=>d(g.textValue,n))?null:p.jsx(ge.div,{...t,ref:e})});d3.displayName=Ig;const g3=$.forwardRef((t,e)=>{const{disabled:n=!1,...r}=t,i=Rr(Ig),{textValue:o,visuallyFocussedItem:s}=i,{getItems:a,subscribe:c}=dl(void 0),h=$.useRef(null),[f,d]=$.useState(!1),g=ye(e,h),v=$.useMemo(()=>s===a().find(C=>C.ref.current===h.current)?.ref.current,[a,s]),x=_t(),w=()=>{!n&&o&&(i.onValueChange(o),i.onTextValueChange(o),i.onOpenChange(!1),i.autocomplete.type==="both"&&i.onFilterValueChange(o),i.trigger?.focus({preventScroll:!0}))};return ut(()=>{const C=c(S=>{d(!S.some(R=>R.textValue===o&&R.type!=="create"))});return a().length===0&&d(!0),()=>{C()}},[o,c,a]),(!o||!f)&&!i.visible?null:p.jsx(Ms.ItemSlot,{scope:void 0,value:o??"",textValue:o??"",disabled:n,isVisible:!0,type:"create",children:p.jsx(ge.div,{role:"option",tabIndex:n?void 0:-1,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,"data-highlighted":v?"":void 0,...r,id:x,ref:g,onPointerUp:ie(r.onPointerUp,w)})})});g3.displayName="ComboboxCreateItem";const AD=CD,RD=Qx,kD=e3,TD=t3,MD=n3,ED=r3,OD=a3,DD=Dg,ID=u3,_D=f3,LD=d3,BD=g3;function ND(t,e){const n=Math.min(t.length,e.length);for(let r=0;r<n;r++)if(t[r]!==e[r])return r;return n}const Yn=Object.freeze(Object.defineProperty({__proto__:null,ComboboxItem:Dg,Content:ED,CreateItem:BD,Icon:TD,Item:DD,ItemIndicator:_D,ItemText:ID,NoValueFound:LD,Portal:MD,Root:AD,TextInput:kD,Trigger:RD,Viewport:OD},Symbol.toStringTag,{value:"Module"}));function _g(t){const e=$.useRef(t);return $.useEffect(()=>{e.current=t}),$.useMemo(()=>(...n)=>e.current?.(...n),[])}const jD=[" ","Enter","ArrowUp","ArrowDown"],FD=[" ","Enter"],gl="Select",[Dh,ml,VD]=Mh(gl),[Gs,HD]=bt(gl,[VD,Ni]),Ih=Ni(),[PD,ri]=Gs(gl),[WD,zD]=Gs(gl),Lg=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:i,onOpenChange:o,value:s,defaultValue:a,onValueChange:c,dir:h,disabled:f,required:d,multi:g=!1}=t,v=Ih(e),[x,w]=$.useState(null),[C,S]=$.useState(null),[R,T]=$.useState(!1),E=To(h),[O=!1,L]=It({prop:r,defaultProp:i,onChange:o}),[I,V]=It({prop:s,defaultProp:a,onChange(W){c&&(Array.isArray(W),c(W))}}),F=$.useRef(null),[H,K]=$.useState(new Set);return p.jsx(cl,{...v,children:p.jsx(PD,{required:d,scope:e,trigger:x,onTriggerChange:w,valueNode:C,onValueNodeChange:S,valueNodeHasChildren:R,onValueNodeHasChildrenChange:T,contentId:_t(),value:I,onValueChange:V,open:O,onOpenChange:L,dir:E,triggerPointerDownPosRef:F,disabled:f,multi:g,children:p.jsx(Dh.Provider,{scope:e,children:p.jsx(WD,{scope:t.__scopeSelect,onNativeOptionAdd:$.useCallback(W=>{K(J=>new Set(J).add(W))},[]),onNativeOptionRemove:$.useCallback(W=>{K(J=>{const G=new Set(J);return G.delete(W),G})},[]),children:n})})})})};Lg.displayName=gl;const m3="SelectTrigger",Bg=$.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=Ih(n),o=ri(m3,n),s=o.disabled,a=ye(e,o.onTriggerChange),c=ml(n),[h,f,d]=S3(v=>{const x=c().filter(S=>!S.disabled),w=x.find(S=>S.value===o.value),C=A3(x,v,w);if(C!==void 0&&!Array.isArray(C.value)){const S=o.multi?[C.value]:C.value;o.onValueChange(S)}}),g=()=>{s||(o.onOpenChange(!0),d())};return p.jsx(Ws,{asChild:!0,...i,children:p.jsx(ge.div,{role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed","data-disabled":s?"":void 0,"data-placeholder":o.value===void 0?"":void 0,tabIndex:s?void 0:0,...r,ref:a,onClick:ie(r.onClick,v=>{v.currentTarget.focus()}),onPointerDown:ie(r.onPointerDown,v=>{const x=v.target;x.hasPointerCapture(v.pointerId)&&x.releasePointerCapture(v.pointerId),(x.closest("button")??x.closest("div"))===v.currentTarget&&v.button===0&&v.ctrlKey===!1&&(g(),o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:ie(r.onKeyDown,v=>{const x=h.current!=="",w=v.ctrlKey||v.altKey||v.metaKey,C=v.target;(C.closest("button")??C.closest("div"))===v.currentTarget&&(!w&&v.key.length===1&&f(v.key),!(x&&v.key===" ")&&jD.includes(v.key)&&(g(),v.preventDefault()))})})})});Bg.displayName=m3;const p3="SelectValue",Ng=$.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,placeholder:i,...o}=t,s=ri(p3,n),{onValueNodeHasChildrenChange:a}=s,c=r!==void 0,h=ye(e,s.onValueNodeChange),[f,d]=$.useState([]),g=ml(n);ut(()=>{a(c)},[a,c]),$.useLayoutEffect(()=>{if(Array.isArray(s.value)&&f.length!==s.value.length){const x=setTimeout(()=>{const w=g().filter(C=>Array.isArray(C.value)?!1:s.value?.includes(C.value));d(w)});return()=>{clearTimeout(x)}}},[s.value,g,f]);let v;if((s.value===void 0||s.value.length===0)&&i!==void 0)v=p.jsx("span",{children:i});else if(typeof r=="function")if(Array.isArray(s.value)){const x=s.value.map(w=>{const C=f.find(S=>S.value===w);return C?r({value:w,textValue:C?.textValue}):null});v=x.every(w=>w===null)?i:x}else v=r(s.value);else v=r;return p.jsx(ge.span,{...o,ref:h,children:v||null})});Ng.displayName=p3;const UD="SelectIcon",jg=$.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...i}=t;return p.jsx(ge.span,{"aria-hidden":!0,...i,ref:e,children:r||"▼"})});jg.displayName=UD;const qD="SelectPortal",Fg=t=>p.jsx(zs,{asChild:!0,...t});Fg.displayName=qD;const bo="SelectContent",Vg=$.forwardRef((t,e)=>{const n=ri(bo,t.__scopeSelect),[r,i]=$.useState();if(ut(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Ro.createPortal(p.jsx(v3,{scope:t.__scopeSelect,children:p.jsx(Dh.Slot,{scope:t.__scopeSelect,children:p.jsx("div",{children:t.children})})}),o):null}return p.jsx(b3,{...t,ref:e})});Vg.displayName=bo;const Pr=10,[v3,ji]=Gs(bo),KD="SelectContentImpl",b3=$.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:a,sideOffset:c,align:h,alignOffset:f,arrowPadding:d,collisionBoundary:g,collisionPadding:v,sticky:x,hideWhenDetached:w,avoidCollisions:C,...S}=t,R=ri(bo,n),[T,E]=$.useState(null),[O,L]=$.useState(null),I=ye(e,pe=>E(pe)),[V,F]=$.useState(null),[H,K]=$.useState(null),W=ml(n),[J,G]=$.useState(!1),re=$.useRef(!1);$.useEffect(()=>{if(T)return Wx(T)},[T]),Us();const se=$.useCallback(pe=>{const[De,...Re]=W().map(He=>He.ref.current),[Le]=Re.slice(-1),Ae=document.activeElement;for(const He of pe)if(He===Ae||(He?.scrollIntoView({block:"nearest"}),He===De&&O&&(O.scrollTop=0),He===Le&&O&&(O.scrollTop=O.scrollHeight),He?.focus(),document.activeElement!==Ae))return},[W,O]),te=$.useCallback(()=>se([V,T]),[se,V,T]);$.useEffect(()=>{J&&te()},[J,te]);const{onOpenChange:ne,triggerPointerDownPosRef:Y}=R;$.useEffect(()=>{if(T){let pe={x:0,y:0};const De=Le=>{pe={x:Math.abs(Math.round(Le.pageX)-(Y.current?.x??0)),y:Math.abs(Math.round(Le.pageY)-(Y.current?.y??0))}},Re=Le=>{pe.x<=10&&pe.y<=10?Le.preventDefault():T.contains(Le.target)||ne(!1),document.removeEventListener("pointermove",De),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",De),document.addEventListener("pointerup",Re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",De),document.removeEventListener("pointerup",Re,{capture:!0})}}},[T,ne,Y]),$.useEffect(()=>{const pe=()=>ne(!1);return window.addEventListener("blur",pe),window.addEventListener("resize",pe),()=>{window.removeEventListener("blur",pe),window.removeEventListener("resize",pe)}},[ne]);const[ce,me]=S3(pe=>{const De=W().filter(Ae=>!Ae.disabled),Re=De.find(Ae=>Ae.ref.current===document.activeElement),Le=A3(De,pe,Re);Le&&setTimeout(()=>Le.ref.current.focus())}),Ie=$.useCallback((pe,De,Re)=>{const Le=!re.current&&!Re;(R.value!==void 0&&R.value===De||Le)&&(F(pe),Le&&(re.current=!0))},[R.value]),we=$.useCallback(()=>T?.focus(),[T]),qe=$.useCallback((pe,De,Re)=>{const Le=!re.current&&!Re;(R.value!==void 0&&(Array.isArray(De)?De.every(He=>R.value?.includes(He)):R.value===De)||Le)&&K(pe)},[R.value]),Te=r==="popper"?U0:w3,Ve=Te===U0?{side:a,sideOffset:c,align:h,alignOffset:f,arrowPadding:d,collisionBoundary:g,collisionPadding:v,sticky:x,hideWhenDetached:w,avoidCollisions:C}:{};return p.jsx(v3,{scope:n,content:T,viewport:O,onViewportChange:L,itemRefCallback:Ie,selectedItem:V,onItemLeave:we,itemTextRefCallback:qe,focusSelectedItem:te,selectedItemText:H,position:r,isPositioned:J,searchRef:ce,children:p.jsx(Th,{as:Cr,allowPinchZoom:!0,children:p.jsx(qs,{asChild:!0,trapped:R.open,onMountAutoFocus:pe=>{pe.preventDefault()},onUnmountAutoFocus:ie(i,pe=>{R.trigger?.focus({preventScroll:!0}),document.getSelection()?.empty(),pe.preventDefault()}),children:p.jsx(ko,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:pe=>pe.preventDefault(),onDismiss:()=>R.onOpenChange(!1),children:p.jsx(Te,{role:"listbox",id:R.contentId,"data-state":R.open?"open":"closed","aria-multiselectable":R.multi?"true":void 0,dir:R.dir,onContextMenu:pe=>pe.preventDefault(),...S,...Ve,onPlaced:()=>G(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:ie(S.onKeyDown,pe=>{const De=pe.ctrlKey||pe.altKey||pe.metaKey;if(pe.key==="Tab"&&pe.preventDefault(),!De&&pe.key.length===1&&me(pe.key),["ArrowUp","ArrowDown","Home","End"].includes(pe.key)){let Le=W().filter(Ae=>!Ae.disabled).map(Ae=>Ae.ref.current);if(["ArrowUp","End"].includes(pe.key)&&(Le=Le.slice().reverse()),["ArrowUp","ArrowDown"].includes(pe.key)){const Ae=pe.target,He=Le.indexOf(Ae);Le=Le.slice(He+1)}setTimeout(()=>se(Le)),pe.preventDefault()}})})})})})})});b3.displayName=KD;const GD="SelectItemAlignedPosition",w3=$.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...i}=t,o=ri(bo,n),s=ji(bo,n),[a,c]=$.useState(null),[h,f]=$.useState(null),d=ye(e,I=>f(I)),g=ml(n),v=$.useRef(!1),x=$.useRef(!0),{viewport:w,selectedItem:C,selectedItemText:S,focusSelectedItem:R}=s,T=$.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&h&&w&&C&&S){const I=o.trigger.getBoundingClientRect(),V=h.getBoundingClientRect(),F=o.valueNode.getBoundingClientRect(),H=S.getBoundingClientRect();if(o.dir!=="rtl"){const Ae=H.left-V.left,He=F.left-Ae,wt=I.left-He,Ze=I.width+wt,Pe=Math.max(Ze,V.width),Yt=window.innerWidth-Pr,ft=W0(He,[Pr,Yt-Pe]);a.style.minWidth=`${Ze}px`,a.style.left=`${ft}px`}else{const Ae=V.right-H.right,He=window.innerWidth-F.right-Ae,wt=window.innerWidth-I.right-He,Ze=I.width+wt,Pe=Math.max(Ze,V.width),Yt=window.innerWidth-Pr,ft=W0(He,[Pr,Yt-Pe]);a.style.minWidth=`${Ze}px`,a.style.right=`${ft}px`}const K=g(),W=window.innerHeight-Pr*2,J=w.scrollHeight,G=window.getComputedStyle(h),re=parseInt(G.borderTopWidth,10),se=parseInt(G.paddingTop,10),te=parseInt(G.borderBottomWidth,10),ne=parseInt(G.paddingBottom,10),Y=re+se+J+ne+te,ce=Math.min(C.offsetHeight*5,Y),me=window.getComputedStyle(w),Ie=parseInt(me.paddingTop,10),we=parseInt(me.paddingBottom,10),qe=I.top+I.height/2-Pr,Te=W-qe,Ve=C.offsetHeight/2,pe=C.offsetTop+Ve,De=re+se+pe,Re=Y-De;if(De<=qe){const Ae=C===K[K.length-1].ref.current;a.style.bottom="0px";const He=h.clientHeight-w.offsetTop-w.offsetHeight,wt=Math.max(Te,Ve+(Ae?we:0)+He+te),Ze=De+wt;a.style.height=`${Ze}px`}else{const Ae=C===K[0].ref.current;a.style.top="0px";const wt=Math.max(qe,re+w.offsetTop+(Ae?Ie:0)+Ve)+Re;a.style.height=`${wt}px`,w.scrollTop=De-qe+w.offsetTop}a.style.margin=`${Pr}px 0`,a.style.minHeight=`${ce}px`,a.style.maxHeight=`${W}px`,r?.(),requestAnimationFrame(()=>v.current=!0)}},[g,o.trigger,o.valueNode,a,h,w,C,S,o.dir,r]);ut(()=>T(),[T]);const[E,O]=$.useState();ut(()=>{h&&O(window.getComputedStyle(h).zIndex)},[h]);const L=$.useCallback(I=>{I&&x.current===!0&&(T(),R?.(),x.current=!1)},[T,R]);return p.jsx(XD,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:L,children:p.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:p.jsx(ge.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});w3.displayName=GD;const YD="SelectPopperPosition",U0=$.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Pr,...o}=t,s=Ih(n);return p.jsx(ul,{...s,...o,ref:e,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});U0.displayName=YD;const[XD,Hg]=Gs(bo,{}),q0="SelectViewport",Pg=$.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=ji(q0,n),o=Hg(q0,n),s=ye(e,i.onViewportChange),a=$.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),p.jsx(Dh.Slot,{scope:n,children:p.jsx(ge.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:s,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:ie(r.onScroll,c=>{const h=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=o;if(d?.current&&f){const g=Math.abs(a.current-h.scrollTop);if(g>0){const v=window.innerHeight-Pr*2,x=parseFloat(f.style.minHeight),w=parseFloat(f.style.height),C=Math.max(x,w);if(C<v){const S=C+g,R=Math.min(v,S),T=S-R;f.style.height=`${R}px`,f.style.bottom==="0px"&&(h.scrollTop=T>0?T:0,f.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Pg.displayName=q0;const x3="SelectGroup",[ZD,QD]=Gs(x3),Wg=$.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=_t();return p.jsx(ZD,{scope:n,id:i,children:p.jsx(ge.div,{role:"group","aria-labelledby":i,...r,ref:e})})});Wg.displayName=x3;const y3="SelectLabel",zg=$.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=QD(y3,n);return p.jsx(ge.div,{id:i.id,...r,ref:e})});zg.displayName=y3;const Iu="SelectItem",[JD,C3]=Gs(Iu),Ug=$.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=t,a=ri(Iu,n),c=ji(Iu,n),h=typeof r=="string"?Array.isArray(a.value)?a.value.includes(r):a.value===r:r.every(R=>a.value?.includes(R)),f=Array.isArray(a.value)&&Array.isArray(r)&&r.some(R=>a.value?.includes(R)),[d,g]=$.useState(o??""),[v,x]=$.useState(!1),w=ye(e,R=>c.itemRefCallback?.(R,r,i)),C=_t(),S=()=>{if(!i){let R=a.multi&&typeof r=="string"?[r]:r;f&&!h?a.onValueChange(R):Array.isArray(a.value)&&(R=R3(r,a.value)),a.onValueChange(R),a.multi||a.onOpenChange(!1)}};if(!a.multi&&Array.isArray(r))throw new Error("You can only pass an array of values in multi selects");return p.jsx(JD,{scope:n,value:r,disabled:i,textId:C,isSelected:h,isIntermediate:f,onItemTextChange:$.useCallback(R=>{g(T=>T||(R?.textContent??"").trim())},[]),children:p.jsx(Dh.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:p.jsx(ge.div,{role:"option","aria-labelledby":C,"data-highlighted":v?"":void 0,"aria-selected":a.multi?void 0:h&&v,"aria-checked":a.multi?h:void 0,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:w,onFocus:ie(s.onFocus,()=>x(!0)),onBlur:ie(s.onBlur,()=>x(!1)),onPointerUp:ie(s.onPointerUp,S),onPointerMove:ie(s.onPointerMove,R=>{i?c.onItemLeave?.():R.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ie(s.onPointerLeave,R=>{R.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:ie(s.onKeyDown,R=>{c.searchRef?.current!==""&&R.key===" "||(FD.includes(R.key)&&S(),R.key===" "&&R.preventDefault())})})})})});Ug.displayName=Iu;const Aa="SelectItemText",qg=$.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:i,...o}=t,s=ri(Aa,n),a=ji(Aa,n),c=C3(Aa,n),h=zD(Aa,n),[f,d]=$.useState(null),g=ye(e,S=>d(S),c.onItemTextChange,S=>a.itemTextRefCallback?.(S,c.value,c.disabled)),v=f?.textContent,x=$.useMemo(()=>p.jsx("option",{value:c.value,disabled:c.disabled,children:v},Array.isArray(c.value)?c.value.join(";"):c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:w,onNativeOptionRemove:C}=h;return ut(()=>(w(x),()=>C(x)),[w,C,x]),p.jsxs(p.Fragment,{children:[p.jsx(ge.span,{id:c.textId,...o,ref:g}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ro.createPortal(o.children,s.valueNode):null]})});qg.displayName=Aa;const $3="SelectItemIndicator",Kg=$.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...i}=t,o=C3($3,n);return typeof r=="function"?p.jsx(ge.span,{"aria-hidden":!0,...i,ref:e,children:r({isSelected:o.isSelected,isIntermediate:o.isIntermediate})}):o.isSelected?p.jsx(ge.span,{"aria-hidden":!0,...i,ref:e,children:r}):null});Kg.displayName=$3;const K0="SelectScrollUpButton",Gg=$.forwardRef((t,e)=>{const n=ji(K0,t.__scopeSelect),r=Hg(K0,t.__scopeSelect),[i,o]=$.useState(!1),s=ye(e,r.onScrollButtonChange);return ut(()=>{if(n.viewport&&n.isPositioned){const a=n.viewport,c=()=>{const h=a.scrollTop>0;o(h)};return c(),a.addEventListener("scroll",c),()=>a.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?p.jsx(Xg,{...t,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop-=c.offsetHeight)}}):null});Gg.displayName=K0;const G0="SelectScrollDownButton",Yg=$.forwardRef((t,e)=>{const n=ji(G0,t.__scopeSelect),r=Hg(G0,t.__scopeSelect),[i,o]=$.useState(!1),s=ye(e,r.onScrollButtonChange);return ut(()=>{if(n.viewport&&n.isPositioned){const a=n.viewport,c=()=>{const h=a.scrollHeight-a.clientHeight,f=Math.ceil(a.scrollTop)<h;o(f)};return c(),a.addEventListener("scroll",c),()=>a.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?p.jsx(Xg,{...t,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop+=c.offsetHeight)}}):null});Yg.displayName=G0;const Xg=$.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=t,o=ji("SelectScrollButton",n),s=$.useRef(null),a=ml(n),c=$.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return $.useEffect(()=>()=>c(),[c]),ut(()=>{a().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),p.jsx(ge.div,{"aria-hidden":!0,...i,ref:e,style:{flexShrink:0,...i.style},onPointerMove:ie(i.onPointerMove,()=>{o.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:ie(i.onPointerLeave,()=>{c()})})});Xg.displayName="SelectScrollButtonImpl";const eI="SelectSeparator",Zg=$.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return p.jsx(ge.div,{"aria-hidden":!0,...r,ref:e})});Zg.displayName=eI;const Y0="SelectArrow",Qg=$.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=Ih(n),o=ri(Y0,n),s=ji(Y0,n);return o.open&&s.position==="popper"?p.jsx(Ix,{...i,...r,ref:e}):null});Qg.displayName=Y0;const tI="BubbleSelect",nI=$.forwardRef((t,e)=>{const{value:n,...r}=t,i=$.useRef(null),o=ye(e,i),s=Eh(n),a=ri(tI,void 0);$.useEffect(()=>{const h=i.current,f=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(f,"value").set;if(s!==n&&g){const v=new Event("change",{bubbles:!0});g.call(h,n),h.dispatchEvent(v)}},[s,n]);let c=n;return a.multi&&!Array.isArray(n)&&(c=[]),p.jsx(_x,{asChild:!0,children:p.jsx("select",{...r,multiple:a.multi?!0:void 0,ref:o,defaultValue:c})})});nI.displayName="BubbleSelect";function S3(t){const e=_g(t),n=$.useRef(""),r=$.useRef(0),i=$.useCallback(s=>{const a=n.current+s;e(a),function c(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[e]),o=$.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return $.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function A3(t,e,n){const i=e.length>1&&Array.from(e).every(h=>h===e[0])?e[0]:e,o=n?t.indexOf(n):-1;let s=rI(t,Math.max(o,0));i.length===1&&(s=s.filter(h=>h!==n));const c=s.find(h=>h.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function rI(t,e){return t.map((n,r)=>t[(e+r)%t.length])}const R3=(t,e=[])=>{if(Array.isArray(t))return t.reduce((r,i)=>R3(i,r),e);const n=e.indexOf(t);return n===-1?[...e,t]:[...e.slice(0,n),...e.slice(n+1)]},iI=Lg,oI=Bg,sI=Ng,aI=jg,lI=Fg,cI=Vg,uI=Pg,hI=Wg,fI=zg,dI=Ug,gI=qg,mI=Kg,pI=Gg,vI=Yg,bI=Zg,wI=Qg,nr=Object.freeze(Object.defineProperty({__proto__:null,Arrow:wI,Content:cI,Group:hI,Icon:aI,Item:dI,ItemIndicator:mI,ItemText:gI,Label:fI,Portal:lI,Root:iI,ScrollDownButton:vI,ScrollUpButton:pI,Select:Lg,SelectArrow:Qg,SelectContent:Vg,SelectGroup:Wg,SelectIcon:jg,SelectItem:Ug,SelectItemIndicator:Kg,SelectItemText:qg,SelectLabel:zg,SelectPortal:Fg,SelectScrollDownButton:Yg,SelectScrollUpButton:Gg,SelectSeparator:Zg,SelectTrigger:Bg,SelectValue:Ng,SelectViewport:Pg,Separator:bI,Trigger:oI,Value:sI,Viewport:uI,createSelectScope:HD},Symbol.toStringTag,{value:"Module"}));function uo(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t?.(i),n===!1||!i.defaultPrevented)return e?.(i)}}const k3="Collapsible",[xI,T3]=bt(k3),[yI,Jg]=xI(k3),CI=b.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:s,...a}=t,[c=!1,h]=It({prop:r,defaultProp:i,onChange:s});return b.createElement(yI,{scope:n,disabled:o,contentId:_t(),open:c,onOpenToggle:b.useCallback(()=>h(f=>!f),[h])},b.createElement(ge.div,z({"data-state":em(c),"data-disabled":o?"":void 0},a,{ref:e})))}),$I="CollapsibleTrigger",SI=b.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,i=Jg($I,n);return b.createElement(ge.button,z({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":em(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:e,onClick:ie(t.onClick,i.onOpenToggle)}))}),M3="CollapsibleContent",AI=b.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=Jg(M3,t.__scopeCollapsible);return b.createElement(Tt,{present:n||i.open},({present:o})=>b.createElement(RI,z({},r,{ref:e,present:o})))}),RI=b.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=t,s=Jg(M3,n),[a,c]=b.useState(r),h=b.useRef(null),f=ye(e,h),d=b.useRef(0),g=d.current,v=b.useRef(0),x=v.current,w=s.open||a,C=b.useRef(w),S=b.useRef();return b.useEffect(()=>{const R=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(R)},[]),ut(()=>{const R=h.current;if(R){S.current=S.current||{transitionDuration:R.style.transitionDuration,animationName:R.style.animationName},R.style.transitionDuration="0s",R.style.animationName="none";const T=R.getBoundingClientRect();d.current=T.height,v.current=T.width,C.current||(R.style.transitionDuration=S.current.transitionDuration,R.style.animationName=S.current.animationName),c(r)}},[s.open,r]),b.createElement(ge.div,z({"data-state":em(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!w},o,{ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...t.style}}),w&&i)});function em(t){return t?"open":"closed"}const kI=CI,TI=SI,MI=AI,Fi="Accordion",EI=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[tm,OI,DI]=Mh(Fi),[_h,Sne]=bt(Fi,[DI,T3]),nm=T3(),E3=$.default.forwardRef((t,e)=>{const{type:n,...r}=t,i=r,o=r;return $.default.createElement(tm.Provider,{scope:t.__scopeAccordion},n==="multiple"?$.default.createElement(BI,z({},o,{ref:e})):$.default.createElement(LI,z({},i,{ref:e})))});E3.propTypes={type(t){const e=t.value||t.defaultValue;return t.type&&!["single","multiple"].includes(t.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):t.type==="multiple"&&typeof e=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):t.type==="single"&&Array.isArray(e)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[O3,II]=_h(Fi),[D3,_I]=_h(Fi,{collapsible:!1}),LI=$.default.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:o=!1,...s}=t,[a,c]=It({prop:n,defaultProp:r,onChange:i});return $.default.createElement(O3,{scope:t.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:$.default.useCallback(()=>o&&c(""),[o,c])},$.default.createElement(D3,{scope:t.__scopeAccordion,collapsible:o},$.default.createElement(I3,z({},s,{ref:e}))))}),BI=$.default.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=t,[s=[],a]=It({prop:n,defaultProp:r,onChange:i}),c=$.default.useCallback(f=>a((d=[])=>[...d,f]),[a]),h=$.default.useCallback(f=>a((d=[])=>d.filter(g=>g!==f)),[a]);return $.default.createElement(O3,{scope:t.__scopeAccordion,value:s,onItemOpen:c,onItemClose:h},$.default.createElement(D3,{scope:t.__scopeAccordion,collapsible:!0},$.default.createElement(I3,z({},o,{ref:e}))))}),[NI,Lh]=_h(Fi),I3=$.default.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:o="vertical",...s}=t,a=$.default.useRef(null),c=ye(a,e),h=OI(n),d=To(i)==="ltr",g=ie(t.onKeyDown,v=>{var x;if(!EI.includes(v.key))return;const w=v.target,C=h().filter(F=>{var H;return!((H=F.ref.current)!==null&&H!==void 0&&H.disabled)}),S=C.findIndex(F=>F.ref.current===w),R=C.length;if(S===-1)return;v.preventDefault();let T=S;const E=0,O=R-1,L=()=>{T=S+1,T>O&&(T=E)},I=()=>{T=S-1,T<E&&(T=O)};switch(v.key){case"Home":T=E;break;case"End":T=O;break;case"ArrowRight":o==="horizontal"&&(d?L():I());break;case"ArrowDown":o==="vertical"&&L();break;case"ArrowLeft":o==="horizontal"&&(d?I():L());break;case"ArrowUp":o==="vertical"&&I();break}const V=T%R;(x=C[V].ref.current)===null||x===void 0||x.focus()});return $.default.createElement(NI,{scope:n,disabled:r,direction:i,orientation:o},$.default.createElement(tm.Slot,{scope:n},$.default.createElement(ge.div,z({},s,{"data-orientation":o,ref:c,onKeyDown:r?void 0:g}))))}),X0="AccordionItem",[jI,rm]=_h(X0),FI=$.default.forwardRef((t,e)=>{const{__scopeAccordion:n,value:r,...i}=t,o=Lh(X0,n),s=II(X0,n),a=nm(n),c=_t(),h=r&&s.value.includes(r)||!1,f=o.disabled||t.disabled;return $.default.createElement(jI,{scope:n,open:h,disabled:f,triggerId:c},$.default.createElement(kI,z({"data-orientation":o.orientation,"data-state":_3(h)},a,i,{ref:e,disabled:f,open:h,onOpenChange:d=>{d?s.onItemOpen(r):s.onItemClose(r)}})))}),VI="AccordionHeader",HI=$.default.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=Lh(Fi,n),o=rm(VI,n);return $.default.createElement(ge.h3,z({"data-orientation":i.orientation,"data-state":_3(o.open),"data-disabled":o.disabled?"":void 0},r,{ref:e}))}),c5="AccordionTrigger",PI=$.default.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=Lh(Fi,n),o=rm(c5,n),s=_I(c5,n),a=nm(n);return $.default.createElement(tm.ItemSlot,{scope:n},$.default.createElement(TI,z({"aria-disabled":o.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:o.triggerId},a,r,{ref:e})))}),WI="AccordionContent",zI=$.default.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=Lh(Fi,n),o=rm(WI,n),s=nm(n);return $.default.createElement(MI,z({role:"region","aria-labelledby":o.triggerId,"data-orientation":i.orientation},s,r,{ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}}))});function _3(t){return t?"open":"closed"}const UI=E3,qI=FI,KI=HI,GI=PI,YI=zI,XI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 2A12.014 12.014 0 0 0 4 14c0 3 1.57 6.883 4.201 10.375C10.85 27.894 13.764 30 16 30s5.151-2.101 7.799-5.625C26.43 20.875 28 17 28 14A12.014 12.014 0 0 0 16 2M8 14.5A1.5 1.5 0 0 1 9.5 13a4.5 4.5 0 0 1 4.5 4.5 1.5 1.5 0 0 1-1.5 1.5A4.5 4.5 0 0 1 8 14.5M18 25h-4a1 1 0 0 1 0-2h4a1 1 0 0 1 0 2m1.5-6a1.5 1.5 0 0 1-1.5-1.5 4.5 4.5 0 0 1 4.5-4.5 1.5 1.5 0 0 1 1.5 1.5 4.5 4.5 0 0 1-4.5 4.5"})})};b.forwardRef(XI);const ZI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28 6H4a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2v11a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V13a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m-9 12h-6a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2m9-7H4V8h24z"})})};b.forwardRef(ZI);const QI=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30.5 7v6a1.5 1.5 0 0 1-1.5 1.5h-6a1.5 1.5 0 0 1 0-3h2.137l-2.375-2.173-.047-.046a9.5 9.5 0 1 0-6.84 16.219H16a9.44 9.44 0 0 0 6.519-2.59 1.5 1.5 0 1 1 2.061 2.181A12.43 12.43 0 0 1 16 28.5h-.171a12.5 12.5 0 1 1 8.985-21.368L27.5 9.59V7a1.5 1.5 0 0 1 3 0"})})},JI=b.forwardRef(QI),e_=JI,t_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m26.061 19.061-9 9a1.503 1.503 0 0 1-2.125 0l-9-9a1.503 1.503 0 1 1 2.125-2.125l6.439 6.439V5a1.5 1.5 0 1 1 3 0v18.375l6.439-6.44a1.502 1.502 0 1 1 2.125 2.125z"})})};b.forwardRef(t_);const n_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H8.625l6.44 6.439a1.502 1.502 0 1 1-2.125 2.125l-9-9a1.5 1.5 0 0 1 0-2.125l9-9a1.503 1.503 0 0 1 2.125 2.125L8.625 14.5H27a1.5 1.5 0 0 1 1.5 1.5"})})};b.forwardRef(n_);const r_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:o,viewBox:"0 0 16 16",stroke:s,ref:r,...n,children:p.jsx("path",{d:"M14.75 8a.75.75 0 0 1-.75.75H6.813l3.22 3.22a.751.751 0 1 1-1.063 1.062l-4.5-4.5a.75.75 0 0 1 0-1.063l4.5-4.5a.751.751 0 0 1 1.063 1.063L6.813 7.25H14a.75.75 0 0 1 .75.75M2.5 1.75a.75.75 0 0 0-.75.75v11a.75.75 0 0 0 1.5 0v-11a.75.75 0 0 0-.75-.75"})})};b.forwardRef(r_);const i_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:o,viewBox:"0 0 16 16",stroke:s,ref:r,...n,children:p.jsx("path",{d:"M11.53 7.47a.75.75 0 0 1 0 1.062l-4.5 4.5a.751.751 0 1 1-1.062-1.063l3.22-3.219H2a.75.75 0 1 1 0-1.5h7.188L5.969 4.03a.751.751 0 1 1 1.063-1.062zm1.97-5.72a.75.75 0 0 0-.75.75v11a.75.75 0 0 0 1.5 0v-11a.75.75 0 0 0-.75-.75"})})};b.forwardRef(i_);const o_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m28.061 17.061-9 9a1.503 1.503 0 1 1-2.125-2.125l6.439-6.436H5a1.5 1.5 0 1 1 0-3h18.375l-6.436-6.44a1.503 1.503 0 0 1 2.125-2.125l9 9a1.5 1.5 0 0 1-.003 2.126"})})};b.forwardRef(o_);const s_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26.061 15.061a1.5 1.5 0 0 1-2.125 0L17.5 8.625V27a1.5 1.5 0 1 1-3 0V8.625l-6.439 6.436a1.503 1.503 0 1 1-2.125-2.125l9-9a1.5 1.5 0 0 1 2.125 0l9 9a1.5 1.5 0 0 1 0 2.125"})})},a_=b.forwardRef(s_),l_=a_,c_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M11 13.5H5A1.5 1.5 0 0 1 3.5 12V6a1.5 1.5 0 0 1 3 0v1.733C8.581 5.683 11.786 3.5 16 3.5c5.558 0 8.92 3.299 9.061 3.439a1.5 1.5 0 0 1-2.117 2.125C22.889 9.01 20.25 6.5 16 6.5c-3.625 0-6.367 2.21-8 4h3a1.5 1.5 0 1 1 0 3m16 5h-6a1.5 1.5 0 1 0 0 3h3c-1.625 1.79-4.375 4-8 4-4.25 0-6.889-2.511-6.944-2.565A1.5 1.5 0 0 0 6.94 25.06c.141.141 3.504 3.44 9.061 3.44 4.214 0 7.419-2.183 9.5-4.233V26a1.5 1.5 0 1 0 3 0v-6a1.5 1.5 0 0 0-1.5-1.5"})})};b.forwardRef(c_);const u_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M220 48v48a12 12 0 0 1-24 0V77l-39.51 39.52a12 12 0 0 1-17-17L179 60h-19a12 12 0 0 1 0-24h48a12 12 0 0 1 12 12M99.51 139.51 60 179v-19a12 12 0 0 0-24 0v48a12 12 0 0 0 12 12h48a12 12 0 0 0 0-24H77l39.52-39.51a12 12 0 0 0-17-17Z"})})};b.forwardRef(u_);const h_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27.725 21.993C27.031 20.798 26 17.416 26 13a10 10 0 0 0-20 0c0 4.418-1.032 7.797-1.726 8.993A2 2 0 0 0 6 25h5.101a5 5 0 0 0 9.798 0H26a2 2 0 0 0 1.725-3.008M16 27a3 3 0 0 1-2.828-2h5.656A3 3 0 0 1 16 27"})})};b.forwardRef(h_);const f_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M22.135 14.308A6.001 6.001 0 0 0 17.5 4.5H9A1.5 1.5 0 0 0 7.5 6v19A1.5 1.5 0 0 0 9 26.5h10a6.5 6.5 0 0 0 3.135-12.192M10.5 7.5h7a3 3 0 0 1 0 6h-7zm8.5 16h-8.5v-7H19a3.5 3.5 0 1 1 0 7"})})},d_=b.forwardRef(f_),g_=d_,m_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 4v20a1 1 0 0 1-1 1H9a2 2 0 0 0-2 2h17a1 1 0 0 1 0 2H6a1 1 0 0 1-1-1V7a4 4 0 0 1 4-4h17a1 1 0 0 1 1 1"})})};b.forwardRef(m_);const p_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M19 14a1 1 0 0 1-1 1h-4a1 1 0 0 1 0-2h4a1 1 0 0 1 1 1m10-5v16a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h5V6a3 3 0 0 1 3-3h6a3 3 0 0 1 3 3v1h5a2 2 0 0 1 2 2M12 7h8V6a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1zm15 7.201V9H5v5.201A23 23 0 0 0 16 17a23 23 0 0 0 11-2.799"})})};b.forwardRef(p_);const v_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M9.5 8A1.5 1.5 0 0 1 11 6.5h16a1.5 1.5 0 0 1 0 3H11A1.5 1.5 0 0 1 9.5 8M27 14.5H11a1.5 1.5 0 1 0 0 3h16a1.5 1.5 0 1 0 0-3m0 8H11a1.5 1.5 0 1 0 0 3h16a1.5 1.5 0 1 0 0-3M5.5 14a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0-8a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 16a2 2 0 1 0 0 4 2 2 0 0 0 0-4"})})},b_=b.forwardRef(v_),w_=b_,x_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26 4h-3V3a1 1 0 0 0-2 0v1H11V3a1 1 0 0 0-2 0v1H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 6H6V6h3v1a1 1 0 0 0 2 0V6h10v1a1 1 0 0 0 2 0V6h3z"})})},y_=b.forwardRef(x_),C_=y_,$_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30 14h-1.35l-3.472-7.812A2 2 0 0 0 23.35 5H8.65a2 2 0 0 0-1.828 1.188L3.35 14H2a1 1 0 0 0 0 2h1v10a2 2 0 0 0 2 2h3a2 2 0 0 0 2-2v-2h12v2a2 2 0 0 0 2 2h3a2 2 0 0 0 2-2V16h1a1 1 0 0 0 0-2m-20 6H8a1 1 0 0 1 0-2h2a1 1 0 0 1 0 2m12 0a1 1 0 0 1 0-2h2a1 1 0 0 1 0 2z"})})};b.forwardRef($_);const S_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m26.708 12.708-10 10a1 1 0 0 1-1.415 0l-10-10A1 1 0 0 1 6 11h20a1 1 0 0 1 .707 1.707"})})},A_=b.forwardRef(S_),Oi=A_,R_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26.924 20.383A1 1 0 0 1 26 21H6a1 1 0 0 1-.708-1.707l10-10a1 1 0 0 1 1.415 0l10 10a1 1 0 0 1 .217 1.09"})})};b.forwardRef(R_);const k_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M7 26a1 1 0 1 1-2 0 1 1 0 0 0-1-1 1 1 0 0 1 0-2 3 3 0 0 1 3 3m-3-7a1 1 0 0 0 0 2 5 5 0 0 1 5 5 1 1 0 1 0 2 0 7.01 7.01 0 0 0-7-7m0-4a1 1 0 0 0 0 2 9.01 9.01 0 0 1 9 9 1 1 0 0 0 2 0A11.01 11.01 0 0 0 4 15M27 5H5a2 2 0 0 0-2 2v5a1 1 0 0 0 1 1 13.014 13.014 0 0 1 13 13 1 1 0 0 0 1 1h9a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2"})})};b.forwardRef(k_);const T_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M25 3h-1a2 2 0 0 0-2 2v2h-3.5V5a2 2 0 0 0-2-2h-1a2 2 0 0 0-2 2v2H10V5a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v5.586A1.98 1.98 0 0 0 5.586 12L7 13.414V27a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V13.414L26.414 12A1.98 1.98 0 0 0 27 10.586V5a2 2 0 0 0-2-2m-6 24h-6v-8a3 3 0 0 1 6 0z"})})};b.forwardRef(T_);const M_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 5H5a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m0 7a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m-5-2a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m-3-5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m-3 7a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M25 24H7a1 1 0 0 1-1-1V9a1 1 0 0 1 2 0v13h17a1 1 0 0 1 0 2"})})};b.forwardRef(M_);const E_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M3.094 14.443a12.8 12.8 0 0 1 2.914-6.72 2 2 0 0 1 2.953-.138l3.459 3.533a1.98 1.98 0 0 1 .211 2.56 3.2 3.2 0 0 0-.462.968.5.5 0 0 1-.478.354h-8.1a.5.5 0 0 1-.497-.557m14.08-11.435A2 2 0 0 0 15 5v5.084a1.98 1.98 0 0 0 1.656 1.97 4 4 0 0 1 .677 7.72.51.51 0 0 0-.333.476v8.154a.5.5 0 0 0 .558.5A13.04 13.04 0 0 0 29 16.185C29.094 9.4 23.899 3.61 17.174 3.008M14.656 19.77a4 4 0 0 1-2.425-2.427.51.51 0 0 0-.475-.343H3.59a.5.5 0 0 0-.5.556A13.01 13.01 0 0 0 14.443 28.91a.5.5 0 0 0 .556-.5V20.25a.51.51 0 0 0-.343-.48"})})};b.forwardRef(E_);const O_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m0 2a11 11 0 0 1 8.984 4.659L16 14.845zm0 22a11 11 0 0 1-8.984-4.659l18.97-10.951A11 11 0 0 1 16 27"})})};b.forwardRef(O_);const D_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m29.061 10.061-16 16a1.5 1.5 0 0 1-2.125 0l-7-7a1.504 1.504 0 0 1 2.125-2.125L12 22.875 26.939 7.939a1.502 1.502 0 1 1 2.125 2.125z"})})},I_=b.forwardRef(D_),__=I_,L_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m5.708 10.708-7 7a1 1 0 0 1-1.415 0l-3-3a1 1 0 0 1 1.415-1.415L14 18.586l6.293-6.293a1 1 0 0 1 1.415 1.415"})})},B_=b.forwardRef(L_),N_=B_,j_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M176.49 95.51a12 12 0 0 1 0 17l-56 56a12 12 0 0 1-17 0l-24-24a12 12 0 1 1 17-17L112 143l47.51-47.52a12 12 0 0 1 16.98.03M236 128A108 108 0 1 1 128 20a108.12 108.12 0 0 1 108 108m-24 0a84 84 0 1 0-84 84 84.09 84.09 0 0 0 84-84"})})};b.forwardRef(j_);const F_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m27.061 13.061-10 10a1.503 1.503 0 0 1-2.125 0l-10-10a1.503 1.503 0 1 1 2.125-2.125L16 19.875l8.939-8.94a1.502 1.502 0 1 1 2.125 2.125z"})})},V_=b.forwardRef(F_),H_=V_,P_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M21.061 24.939a1.503 1.503 0 0 1-2.125 2.125l-10-10a1.5 1.5 0 0 1 0-2.125l10-10a1.503 1.503 0 0 1 2.125 2.125L12.125 16z"})})},W_=b.forwardRef(P_),L3=W_,z_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m23.061 17.061-10 10a1.503 1.503 0 0 1-2.125-2.125L19.875 16l-8.936-8.939a1.502 1.502 0 1 1 2.125-2.125l10 10a1.5 1.5 0 0 1-.003 2.125"})})},U_=b.forwardRef(z_),im=U_,q_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27.061 21.061a1.503 1.503 0 0 1-2.125 0L16 12.125l-8.939 8.936a1.503 1.503 0 0 1-2.125-2.125l10-10a1.5 1.5 0 0 1 2.125 0l10 10a1.5 1.5 0 0 1 0 2.125"})})},K_=b.forwardRef(q_),G_=K_,Y_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m7 14h-7a1 1 0 0 1-1-1V9a1 1 0 0 1 2 0v6h6a1 1 0 0 1 0 2"})})},X_=b.forwardRef(Y_),Z_=X_,Q_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28 16a12 12 0 0 1-20.236 8.728 1.002 1.002 0 0 1 1.375-1.456 10 10 0 1 0-.21-14.343c-.441.446-.857.885-1.26 1.321l2.039 2.043A1 1 0 0 1 9 14H4a1 1 0 0 1-1-1V8a1 1 0 0 1 1.707-.707L6.25 8.838c.402-.437.817-.875 1.258-1.32A12 12 0 0 1 28 16M16 9a1 1 0 0 0-1 1v6a1 1 0 0 0 .485.858l5 3a.999.999 0 0 0 1.486-1.1 1 1 0 0 0-.456-.616L17 15.434V10a1 1 0 0 0-1-1"})})};b.forwardRef(Q_);const J_=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M20.008 5a11.01 11.01 0 0 0-9.847 6.084A10.9 10.9 0 0 0 9 15.966 1.023 1.023 0 0 1 8.071 17 1 1 0 0 1 7 16a13 13 0 0 1 .668-4.115.5.5 0 0 0-.594-.647A8.01 8.01 0 0 0 1 19c0 4.399 3.719 8 8.125 8H20a11.01 11.01 0 0 0 10.991-11.435C30.764 9.693 25.884 5 20.008 5"})})};b.forwardRef(J_);const eL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30.991 15.565C30.764 9.693 25.884 5 20.008 5a11.01 11.01 0 0 0-9.847 6.084A10.9 10.9 0 0 0 9 15.966 1.023 1.023 0 0 1 8.071 17 1 1 0 0 1 7 16a13 13 0 0 1 .668-4.115.5.5 0 0 0-.594-.647A8.01 8.01 0 0 0 1 19c0 4.399 3.719 8 8.125 8H20a11.01 11.01 0 0 0 10.991-11.435m-7.283 3.143a1 1 0 0 1-1.415 0L20 16.414V24a1 1 0 0 1-2 0v-7.586l-2.293 2.293a1 1 0 0 1-1.415-1.415l4-4a1 1 0 0 1 1.415 0l4 4a1 1 0 0 1 0 1.415"})})};b.forwardRef(eL);const tL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M8.96 12.153 4.342 16l4.618 3.848a1.5 1.5 0 1 1-1.92 2.305l-6-5a1.5 1.5 0 0 1 0-2.305l6-5a1.5 1.5 0 0 1 1.92 2.304m22 2.694-6-5a1.5 1.5 0 1 0-1.92 2.306L27.658 16l-4.618 3.848a1.5 1.5 0 1 0 1.92 2.305l6-5a1.5 1.5 0 0 0 0-2.305M20.512 3.59a1.5 1.5 0 0 0-1.922.898l-8 22a1.5 1.5 0 0 0 2.82 1.024l8-22a1.5 1.5 0 0 0-.898-1.922"})})},nL=b.forwardRef(tL),rL=nL,iL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M200 40h-32a16 16 0 0 0-16-16H32a16 16 0 0 0-16 16v80a16 16 0 0 0 16 16h8v64a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V56a16 16 0 0 0-16-16m-93.66 21.66a8 8 0 0 1 11.32-11.32l24 24a8 8 0 0 1 0 11.32l-24 24a8 8 0 0 1-11.32-11.32L124.69 80Zm-64 24a8 8 0 0 1 0-11.32l24-24a8 8 0 0 1 11.32 11.32L59.31 80l18.35 18.34a8 8 0 0 1-11.32 11.32ZM200 200H56v-64h96a16 16 0 0 0 16-16V56h32Z"})})};b.forwardRef(iL);const oL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26 10H4a1 1 0 0 0-1 1v6a12.04 12.04 0 0 0 4.068 9H4a1 1 0 0 0 0 2h22a1 1 0 0 0 0-2h-3.067a12.1 12.1 0 0 0 3.375-5.011A5 5 0 0 0 31 16v-1a5 5 0 0 0-5-5m3 6a3 3 0 0 1-2.15 2.875Q27 17.944 27 17v-4.828A3 3 0 0 1 29 15zM14 7V3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0m4 0V3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0m-8 0V3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0"})})};b.forwardRef(oL);const sL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29.743 13.401a1 1 0 0 0-.487-.675l-3.729-2.125-.015-4.202a1 1 0 0 0-.353-.76 14 14 0 0 0-4.59-2.584 1 1 0 0 0-.808.074L16 5.23l-3.765-2.106a1 1 0 0 0-.809-.075 14 14 0 0 0-4.585 2.594 1 1 0 0 0-.354.758L6.47 10.61 2.74 12.734a1 1 0 0 0-.486.675 13.3 13.3 0 0 0 0 5.195 1 1 0 0 0 .486.675l3.729 2.125.015 4.204a1 1 0 0 0 .353.76 14 14 0 0 0 4.59 2.583 1 1 0 0 0 .808-.073L16 26.768l3.765 2.107a1.013 1.013 0 0 0 .809.073 14 14 0 0 0 4.585-2.592 1 1 0 0 0 .354-.759l.018-4.206 3.729-2.125a1 1 0 0 0 .486-.675c.34-1.713.338-3.477-.003-5.19M16 21a5 5 0 1 1 0-10 5 5 0 0 1 0 10"})})};b.forwardRef(sL);const aL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M18.5 12V6a1.5 1.5 0 1 1 3 0v4.5H26a1.5 1.5 0 1 1 0 3h-6a1.5 1.5 0 0 1-1.5-1.5M12 18.5H6a1.5 1.5 0 1 0 0 3h4.5V26a1.5 1.5 0 1 0 3 0v-6a1.5 1.5 0 0 0-1.5-1.5m14 0h-6a1.5 1.5 0 0 0-1.5 1.5v6a1.5 1.5 0 1 0 3 0v-4.5H26a1.5 1.5 0 1 0 0-3m-14-14A1.5 1.5 0 0 0 10.5 6v4.5H6a1.5 1.5 0 1 0 0 3h6a1.5 1.5 0 0 0 1.5-1.5V6A1.5 1.5 0 0 0 12 4.5"})})},lL=b.forwardRef(aL),cL=lL,uL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M22.5 17.5h-2v-3h2a5 5 0 1 0-5-5v2h-3v-2a5 5 0 1 0-5 5h2v3h-2a5 5 0 1 0 5 5v-2h3v2a5 5 0 1 0 5-5m-2-8a2 2 0 1 1 2 2h-2zm-13 0a2 2 0 0 1 4 0v2h-2a2 2 0 0 1-2-2m4 13a2 2 0 1 1-2-2h2zm3-8h3v3h-3zm8 10a2 2 0 0 1-2-2v-2h2a2 2 0 0 1 0 4"})})};b.forwardRef(uL);const hL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30.5 24a1.5 1.5 0 0 1-1.5 1.5h-3.5V29a1.5 1.5 0 1 1-3 0v-3.5H8A1.5 1.5 0 0 1 6.5 24V9.5H3a1.5 1.5 0 0 1 0-3h3.5V3a1.5 1.5 0 0 1 3 0v19.5H29a1.5 1.5 0 0 1 1.5 1.5M13 9.5h9.5V19a1.5 1.5 0 1 0 3 0V8A1.5 1.5 0 0 0 24 6.5H13a1.5 1.5 0 0 0 0 3"})})};b.forwardRef(hL);const fL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26.061 23.939a1.503 1.503 0 0 1-2.125 2.125L16 18.125l-7.939 7.936a1.503 1.503 0 1 1-2.125-2.125L13.875 16 5.939 8.061a1.503 1.503 0 1 1 2.125-2.125L16 13.875l7.939-7.94a1.502 1.502 0 1 1 2.125 2.125L18.125 16z"})})},dL=b.forwardRef(fL),Vi=dL,gL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m4.708 16.293a1 1 0 0 1-1.415 1.415L16 17.414l-3.293 3.293a1 1 0 0 1-1.415-1.415L14.587 16l-3.293-3.293a1 1 0 1 1 1.415-1.415L16 14.587l3.293-3.293a1 1 0 0 1 1.415 1.415L17.414 16z"})})};b.forwardRef(gL);const mL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30.48 9.524a1.51 1.51 0 0 0-1.668-.213l-6.276 3.125-5.24-8.704a1.514 1.514 0 0 0-2.592 0l-5.24 8.708L3.19 9.315a1.514 1.514 0 0 0-2.113 1.825l4.625 14.17a1 1 0 0 0 1.46.55C7.194 25.841 10.39 24 16 24s8.806 1.841 8.835 1.859a1 1 0 0 0 1.464-.549l4.625-14.166a1.51 1.51 0 0 0-.444-1.62M21.98 19.6a1 1 0 0 1-1.159.811 28.5 28.5 0 0 0-9.652 0 1 1 0 0 1-.348-1.97 30.6 30.6 0 0 1 10.348 0 1 1 0 0 1 .816 1.159z"})})};b.forwardRef(mL);const pL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27.414 24a2 2 0 0 1 0 2.829l-.585.585a2 2 0 0 1-2.829 0l-6.906-6.905-2.735 6.292A1.98 1.98 0 0 1 12.533 28h-.098a1.98 1.98 0 0 1-1.801-1.375L4.1 6.615A1.994 1.994 0 0 1 6.615 4.1l20.01 6.534a2 2 0 0 1 .176 3.725l-6.292 2.735z"})})};b.forwardRef(pL);const vL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3C9.271 3 4 6.075 4 10v12c0 3.925 5.271 7 12 7s12-3.075 12-7V10c0-3.925-5.271-7-12-7m10 13c0 1.203-.985 2.429-2.701 3.365C21.366 20.419 18.774 21 16 21s-5.366-.581-7.299-1.635C6.985 18.429 6 17.203 6 16v-2.08C8.133 15.795 11.779 17 16 17s7.868-1.21 10-3.08zm-2.701 9.365C21.366 26.419 18.774 27 16 27s-5.366-.581-7.299-1.635C6.985 24.429 6 23.203 6 22v-2.08C8.133 21.795 11.779 23 16 23s7.868-1.21 10-3.08V22c0 1.203-.985 2.429-2.701 3.365"})})};b.forwardRef(vL);const bL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29 12a2 2 0 0 0-2-2h-4V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v16a1 1 0 0 0 1.625.777L9 19.25V23a2 2 0 0 0 2 2h11.699l4.676 3.778A1 1 0 0 0 29 28zm-5.319 11.223a1 1 0 0 0-.625-.223H11v-4h10a2 2 0 0 0 2-2v-5h4v13.906z"})})};b.forwardRef(bL);const wL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 19v7a2.5 2.5 0 0 1-2.5 2.5H6A2.5 2.5 0 0 1 3.5 26v-7a1.5 1.5 0 0 1 3 0v6.5h19V19a1.5 1.5 0 1 1 3 0m-13.561 1.061a1.5 1.5 0 0 0 2.125 0l5-5a1.502 1.502 0 1 0-2.125-2.125L17.5 15.375V5a1.5 1.5 0 1 0-3 0v10.375l-2.439-2.436a1.502 1.502 0 1 0-2.125 2.125z"})})};b.forwardRef(wL);const xL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M13.5 7.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0m7 2a2 2 0 1 0 0-4 2 2 0 0 0 0 4m-9 4.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4m9 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4m-9 8.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4m9 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4"})})};b.forwardRef(xL);const yL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 4H11a1 1 0 0 0-1 1v5H5a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-5h5a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1m-1 16h-4v-9a1 1 0 0 0-1-1h-9V6h14z"})})};b.forwardRef(yL);const CL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m11 13c.001 1.411-.27 2.81-.8 4.118l-5.587-3.437a2 2 0 0 0-.78-.279l-2.853-.385a2.01 2.01 0 0 0-2 .983h-1.09l-.475-.983a1.99 1.99 0 0 0-1.375-1.083l-1-.216.978-1.718h2.088c.338 0 .67-.087.966-.25l1.532-.845q.202-.113.375-.268l3.364-3.042a1.99 1.99 0 0 0 .407-2.458l-.045-.08A11.01 11.01 0 0 1 27 16M5 16a10.94 10.94 0 0 1 1.068-4.725l1.417 3.784a2 2 0 0 0 1.453 1.25l2.678.576.476.99a2.01 2.01 0 0 0 1.8 1.125h.186l-.904 2.029a2 2 0 0 0 .357 2.171l.018.018L16 25.742l-.242 1.25A11.014 11.014 0 0 1 5 16"})})};b.forwardRef(CL);const $L=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:[p.jsx("path",{d:"M20.689 3.88A13 13 0 0 0 16 3a13 13 0 0 0-8.155 23.124l1.02-1.765A11 11 0 0 1 5 16a10.94 10.94 0 0 1 1.068-4.724l1.417 3.784a2 2 0 0 0 1.453 1.25l2.678.576.476.99q.113.226.275.418l1.169-2.025-.121-.25a1.99 1.99 0 0 0-1.375-1.084l-1-.217.978-1.717h2.088c.338 0 .67-.087.966-.25l.726-.4z"}),p.jsx("path",{fillRule:"evenodd",d:"m24 2.144 1.732 1-1.58 2.736q.54.435 1.036.932A13.01 13.01 0 0 1 29 16a13 13 0 0 1-17.69 12.124l-1.578 2.732-1.732-1zm-.86 5.49-4.936 8.549 1.628.22c.277.037.543.132.78.278l5.588 3.436c.53-1.308.801-2.706.8-4.117a11.01 11.01 0 0 0-3.86-8.367M13.92 23.6l-1.593 2.76a11 11 0 0 0 3.43.631l.242-1.25z",clipRule:"evenodd"})]})};b.forwardRef($L);const SL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m-4.5 9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m10.365 7.5C20.579 21.724 18.441 23 16 23s-4.579-1.275-5.865-3.5a1.001 1.001 0 0 1 1.477-1.31q.157.129.253.31C12.799 20.114 14.266 21 16 21s3.201-.887 4.135-2.5a1 1 0 1 1 1.73 1M20.5 15a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};b.forwardRef(SL);const AL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m-4.5 9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m10 10.865a1 1 0 0 1-1.365-.365C19.201 20.886 17.734 20 16 20s-3.201.887-4.135 2.5a1.001 1.001 0 1 1-1.73-1C11.421 19.276 13.559 18 16 18s4.579 1.275 5.865 3.5a1 1 0 0 1-.365 1.365M20.5 15a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};b.forwardRef(AL);const RL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27.5 6v5a1.5 1.5 0 1 1-3 0V7.5H21a1.5 1.5 0 0 1 0-3h5A1.5 1.5 0 0 1 27.5 6M11 24.5H7.5V21a1.5 1.5 0 0 0-3 0v5A1.5 1.5 0 0 0 6 27.5h5a1.5 1.5 0 1 0 0-3m15-5a1.5 1.5 0 0 0-1.5 1.5v3.5H21a1.5 1.5 0 1 0 0 3h5a1.5 1.5 0 0 0 1.5-1.5v-5a1.5 1.5 0 0 0-1.5-1.5m-15-15H6A1.5 1.5 0 0 0 4.5 6v5a1.5 1.5 0 0 0 3 0V7.5H11a1.5 1.5 0 0 0 0-3"})})},kL=b.forwardRef(RL),TL=kL,ML=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 13a1.5 1.5 0 1 1-3 0V8.625l-7.439 7.439a1.503 1.503 0 1 1-2.125-2.125L23.375 6.5H19a1.5 1.5 0 0 1 0-3h8A1.5 1.5 0 0 1 28.5 5zM23 16a1.5 1.5 0 0 0-1.5 1.5v8h-15v-15h8a1.5 1.5 0 1 0 0-3H6A2.5 2.5 0 0 0 3.5 10v16A2.5 2.5 0 0 0 6 28.5h16a2.5 2.5 0 0 0 2.5-2.5v-8.5A1.5 1.5 0 0 0 23 16"})})},EL=b.forwardRef(ML),OL=EL,DL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30.914 15.595c-.044-.099-1.103-2.447-3.457-4.801C24.322 7.657 20.36 6 16 6S7.679 7.657 4.542 10.794C2.19 13.148 1.125 15.5 1.086 15.595a1 1 0 0 0 0 .812c.044.1 1.103 2.447 3.456 4.8C7.68 24.344 11.64 26 16 26s8.321-1.657 11.458-4.792c2.353-2.354 3.412-4.702 3.456-4.8a1 1 0 0 0 0-.813M16 21a5 5 0 1 1 0-10 5 5 0 0 1 0 10"})})},IL=b.forwardRef(DL),_L=IL,LL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M6.74 4.328a1 1 0 1 0-1.48 1.345l2.405 2.646c-4.54 2.786-6.493 7.081-6.579 7.276a1 1 0 0 0 0 .813c.044.098 1.103 2.446 3.456 4.8C7.68 24.343 11.64 26 16 26c2.24.013 4.459-.448 6.509-1.354l2.75 3.027a1 1 0 1 0 1.48-1.345zm11.125 15.21a4 4 0 0 1-5.209-5.73zm13.049-3.13c-.053.117-1.319 2.92-4.17 5.475a1 1 0 0 1-1.408-.072L12.675 7.884a1 1 0 0 1 .575-1.66A17 17 0 0 1 16 6c4.36 0 8.321 1.658 11.458 4.794 2.353 2.354 3.412 4.702 3.456 4.801a1 1 0 0 1 0 .813"})})};b.forwardRef(LL);const BL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M17 15v12a1 1 0 0 1-2 0V15a1 1 0 0 1 2 0m8 9a1 1 0 0 0-1 1v2a1 1 0 0 0 2 0v-2a1 1 0 0 0-1-1m3-6h-2V5a1 1 0 0 0-2 0v13h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1M7 20a1 1 0 0 0-1 1v6a1 1 0 1 0 2 0v-6a1 1 0 0 0-1-1m3-6H8V5a1 1 0 0 0-2 0v9H4a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1m9-6h-2V5a1 1 0 0 0-2 0v3h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1"})})};b.forwardRef(BL);const NL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m26.48 16.851-7.474 7.559a1.97 1.97 0 0 1-1.4.585H9.415l-3.707 3.712a1.001 1.001 0 0 1-1.415-1.415l2.823-2.822L15.588 16h10.537a.5.5 0 0 1 .355.851m.607-13.03a8 8 0 0 0-10.737.518l-1.2 1.185a.5.5 0 0 0-.15.351v7.875l6.875-6.875a1 1 0 0 1 1.414 1.414L17.589 14h11.047a.5.5 0 0 0 .445-.27 8.01 8.01 0 0 0-1.994-9.909M7.854 20.904 13 15.758V8.845a.5.5 0 0 0-.851-.355L7.586 13A1.99 1.99 0 0 0 7 14.414v6.136a.5.5 0 0 0 .854.354"})})};b.forwardRef(NL);const jL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m26.708 10.293-7-7A1 1 0 0 0 19 3H7a2 2 0 0 0-2 2v22a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V11a1 1 0 0 0-.293-.707M19 11V5.5l5.5 5.5z"})})};b.forwardRef(jL);const FL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m213.66 82.34-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v76a4 4 0 0 0 4 4h168a4 4 0 0 0 4-4V88a8 8 0 0 0-2.34-5.66M152 88V44l44 44ZM48 180c0 11 7.18 20 16 20a14.18 14.18 0 0 0 10.06-4.5 8.21 8.21 0 0 1 10.9-.91 8 8 0 0 1 .82 11.81A30.06 30.06 0 0 1 64 216c-17.64 0-32-16.15-32-36s14.36-36 32-36a30 30 0 0 1 21.39 9.19 8.26 8.26 0 0 1 .73 11.09 8 8 0 0 1-11.9.38A14.17 14.17 0 0 0 64 160c-8.82 0-16 9-16 20m103.81 16.31a20.82 20.82 0 0 1-9.19 15.23C137.43 215 131 216 125.13 216a61.1 61.1 0 0 1-15.13-2 8 8 0 1 1 4.3-15.41c4.38 1.2 14.95 2.7 19.55-.36.88-.59 1.83-1.52 2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56 20.56 0 0 1 9-14.95c11.84-8 30.71-3.31 32.83-2.76a8 8 0 0 1-4.07 15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54 4.54 0 0 0-2 3.67c-.12.9-.14 1.09 1.11 1.9 2.31 1.49 6.45 2.68 10.45 3.84 9.79 2.83 26.35 7.66 24.11 24.97M215.42 155l-19.89 55.68a8 8 0 0 1-15.06 0L160.58 155a8.21 8.21 0 0 1 4.5-10.45 8 8 0 0 1 10.45 4.76l12.47 34.9 12.47-34.9a8 8 0 0 1 10.45-4.76 8.23 8.23 0 0 1 4.5 10.45"})})};b.forwardRef(FL);const VL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m26.708 10.293-7-7A1 1 0 0 0 19 3H7a2 2 0 0 0-2 2v22a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V11a1 1 0 0 0-.293-.707m-7 11a1 1 0 0 1-1.415 1.415L16 20.414l-2.293 2.293a1 1 0 0 1-1.415-1.415L14.587 19l-2.293-2.293a1 1 0 1 1 1.415-1.415L16 17.587l2.293-2.293a1 1 0 0 1 1.415 1.415L17.414 19zM19 11V5.5l5.5 5.5z"})})};b.forwardRef(VL);const HL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M6 15h20a1 1 0 0 0 1-1v-3a1 1 0 0 0-.293-.707l-7-7A1 1 0 0 0 19 3H7a2 2 0 0 0-2 2v9a1 1 0 0 0 1 1m13-9.5 5.5 5.5H19zM28 19a1 1 0 0 1-1 1h-3v2h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 0v-7a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1M8 18H6a1 1 0 0 0-1 1v7a1 1 0 1 0 2 0v-1h1a3.5 3.5 0 1 0 0-7m0 5H7v-3h1a1.5 1.5 0 1 1 0 3m8-5h-2a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h2a4.5 4.5 0 1 0 0-9m0 7h-1v-5h1a2.5 2.5 0 0 1 0 5"})})};b.forwardRef(HL);const PL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M44 120h168a4 4 0 0 0 4-4V88a8 8 0 0 0-2.34-5.66l-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v76a4 4 0 0 0 4 4m108-76 44 44h-44Zm4 164.53a8.18 8.18 0 0 1-8.25 7.47H120a8 8 0 0 1-8-8v-55.73a8.18 8.18 0 0 1 7.47-8.25 8 8 0 0 1 8.53 8v48h20a8 8 0 0 1 8 8.51m-61.49-51.88L77.83 180l16.68 23.35a8 8 0 0 1-13 9.3L68 193.76l-13.49 18.89a8 8 0 1 1-13-9.3L58.17 180l-16.68-23.35a8 8 0 0 1 2.3-11.46 8.19 8.19 0 0 1 10.88 2.38L68 166.24l13.49-18.89a8 8 0 0 1 13 9.3Zm121.28 39.66a20.81 20.81 0 0 1-9.18 15.23c-5.19 3.46-11.67 4.46-17.49 4.46a60.6 60.6 0 0 1-15.19-2 8 8 0 0 1 4.31-15.41c4.38 1.21 14.94 2.71 19.54-.35.89-.6 1.84-1.52 2.15-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.12a20.58 20.58 0 0 1 8.95-14.94c11.84-8 30.72-3.31 32.83-2.76a8 8 0 0 1-4.07 15.48c-4.48-1.17-15.22-2.56-19.82.56a4.54 4.54 0 0 0-2 3.67c-.11.9-.13 1.08 1.12 1.9 2.31 1.49 6.45 2.68 10.45 3.84 9.87 2.82 26.39 7.65 24.18 24.96"})})};b.forwardRef(PL);const WL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M184 144h-16a8 8 0 0 0-8 8v55.73a8.17 8.17 0 0 0 7.47 8.25 8 8 0 0 0 8.53-8v-8h7.4c15.24 0 28.14-11.92 28.59-27.15A28 28 0 0 0 184 144m-.35 40H176v-24h8a12 12 0 0 1 12 13.16A12.25 12.25 0 0 1 183.65 184M136 152v55.73a8.17 8.17 0 0 1-7.47 8.25 8 8 0 0 1-8.53-8v-55.71a8.17 8.17 0 0 1 7.47-8.25A8 8 0 0 1 136 152m-40 56.53a8.17 8.17 0 0 1-8.27 7.47h-31.5a8.27 8.27 0 0 1-6-2.5 8 8 0 0 1-1.18-9.5l25.16-44H56.27a8.17 8.17 0 0 1-8.27-7.47 8 8 0 0 1 8-8.53h31.77a8.27 8.27 0 0 1 6 2.5A8 8 0 0 1 95 156l-25.21 44H88a8 8 0 0 1 8 8.53M213.66 82.34l-56-56A8 8 0 0 0 152 24H56a16 16 0 0 0-16 16v76a4 4 0 0 0 4 4h168a4 4 0 0 0 4-4V88a8 8 0 0 0-2.34-5.66M152 88V44l44 44Z"})})};b.forwardRef(WL);const zL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 17 16",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m13.687 4.146-2.5-2.5a.5.5 0 0 0-.354-.146h-5a1 1 0 0 0-1 1v1h-1a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-1h1a1 1 0 0 0 1-1v-7a.5.5 0 0 0-.146-.354M8.833 12h-3a.5.5 0 0 1 0-1h3a.5.5 0 0 1 0 1m0-2h-3a.5.5 0 0 1 0-1h3a.5.5 0 0 1 0 1m4 1.5h-1v-5a.5.5 0 0 0-.146-.354l-2.5-2.5a.5.5 0 0 0-.354-.146h-3v-1h4.793l2.207 2.207z"})})};b.forwardRef(zL);const UL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M25.5 16a1.5 1.5 0 0 1-1.5 1.5H8a1.5 1.5 0 1 1 0-3h16a1.5 1.5 0 0 1 1.5 1.5M29 8.5H3a1.5 1.5 0 0 0 0 3h26a1.5 1.5 0 1 0 0-3m-10 12h-6a1.5 1.5 0 1 0 0 3h6a1.5 1.5 0 1 0 0-3"})})};b.forwardRef(UL);const qL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 9H16.414L13 5.586A1.98 1.98 0 0 0 11.586 5H5a2 2 0 0 0-2 2v18.078A1.926 1.926 0 0 0 4.924 27H27.11A1.89 1.89 0 0 0 29 25.111V11a2 2 0 0 0-2-2M5 7h6.586l2 2H5z"})})};b.forwardRef(qL);const KL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 9h-4.385q.075-.06.146-.125A3.7 3.7 0 0 0 24 6.196 4.08 4.08 0 0 0 19.805 2a3.7 3.7 0 0 0-2.68 1.239A6.9 6.9 0 0 0 16 5.049a6.9 6.9 0 0 0-1.125-1.81A3.7 3.7 0 0 0 12.195 2 4.08 4.08 0 0 0 8 6.196a3.7 3.7 0 0 0 1.239 2.679q.072.06.146.125H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2v8a2 2 0 0 0 2 2h7.5a.5.5 0 0 0 .5-.5V15H5v-4h10v4h2v-4h10v4H17v11.5a.5.5 0 0 0 .5.5H25a2 2 0 0 0 2-2v-8a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2M10.564 7.375A1.7 1.7 0 0 1 10 6.125 2.076 2.076 0 0 1 12.074 4h.061a1.71 1.71 0 0 1 1.25.563c1.049 1.185 1.419 3.15 1.549 4.365-1.22-.13-3.184-.5-4.37-1.553m10.875 0c-1.186 1.05-3.155 1.42-4.375 1.55.148-1.314.561-3.237 1.561-4.361A1.7 1.7 0 0 1 19.875 4h.061A2.077 2.077 0 0 1 22 6.135a1.7 1.7 0 0 1-.564 1.24z"})})};b.forwardRef(KL);const GL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m9.796 8h-4.428a17.8 17.8 0 0 0-2.533-5.625A11.05 11.05 0 0 1 25.796 11M16 5.014c1.5 1.625 2.625 3.693 3.296 5.986h-6.592C13.375 8.707 14.5 6.641 16 5.014M12 16c0-1.005.084-2.009.25-3h7.5a18.2 18.2 0 0 1 0 6h-7.5a18 18 0 0 1-.25-3m.704 5h6.592c-.671 2.293-1.796 4.359-3.296 5.986-1.5-1.627-2.625-3.693-3.296-5.986m6.131 5.625A17.8 17.8 0 0 0 21.367 21h4.43a11.05 11.05 0 0 1-6.962 5.625M21.776 19a20.2 20.2 0 0 0 0-6h4.808a11 11 0 0 1 0 6z"})})};b.forwardRef(GL);const YL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 17 16",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M13 9.5c-.357 0-.71.085-1.028.25l-1.337-1.04a2.2 2.2 0 0 0 .116-.67l.646-.214a2.25 2.25 0 1 0-.636-1.37l-.487.162A2.25 2.25 0 0 0 8.5 5.75c-.062 0-.117 0-.175.008l-.278-.625A2.25 2.25 0 1 0 6.5 5.75c.063 0 .118 0 .176-.008l.278.625a2.24 2.24 0 0 0-.537 2.482l-1.33 1.182a2.25 2.25 0 1 0 .997 1.12l1.33-1.182a2.25 2.25 0 0 0 2.3-.075l1.224.954A2.25 2.25 0 1 0 13.001 9.5m0-4A.75.75 0 1 1 13 7a.75.75 0 0 1 0-1.5m-7.25-2a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0M4 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5M7.75 8a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0M13 12.5a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5"})})};b.forwardRef(YL);const XL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{fillRule:"evenodd",d:"M13.29 28.226 6.765 24.46a2.822 2.822 0 1 1-2.708-4.693v-7.532a2.824 2.824 0 1 1 2.708-4.693l6.525-3.767a2.824 2.824 0 1 1 5.42 0l6.524 3.766a2.822 2.822 0 1 1 2.71 4.693v7.533a2.824 2.824 0 1 1-2.71 4.694l-6.524 3.766A2.825 2.825 0 0 1 16 31.84a2.822 2.822 0 0 1-2.71-3.614M16 5.806q.413-.002.791-.113l8.531 14.776a2.8 2.8 0 0 0-.791 1.37H7.467a2.8 2.8 0 0 0-.79-1.369L15.21 5.693q.377.11.791.112M7.468 23.178l-.033.12 6.526 3.767A2.81 2.81 0 0 1 16 26.195c.802 0 1.526.334 2.04.871l6.523-3.766-.032-.121zM5.397 12.233a2.824 2.824 0 0 0 2.038-3.532l6.526-3.767q.043.045.088.088L5.517 19.8l-.12-.032zM26.482 19.8q.06-.018.121-.033v-7.532a2.824 2.824 0 0 1-2.04-3.534L18.04 4.934q-.045.045-.089.088z",clipRule:"evenodd"})})};b.forwardRef(XL);const ZL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 7v7.5a.5.5 0 0 1-.5.5H17V5.5a.5.5 0 0 1 .5-.5H25a2 2 0 0 1 2 2M14.5 5H7a2 2 0 0 0-2 2v7.5a.5.5 0 0 0 .5.5H15V5.5a.5.5 0 0 0-.5-.5m12 12H17v9.5a.5.5 0 0 0 .5.5H25a2 2 0 0 0 2-2v-7.5a.5.5 0 0 0-.5-.5M5 17.5V25a2 2 0 0 0 2 2h7.5a.5.5 0 0 0 .5-.5V17H5.5a.5.5 0 0 0-.5.5"})})};b.forwardRef(ZL);const QL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M10.5 6.5v5h-7A.5.5 0 0 1 3 11V8a2 2 0 0 1 2-2h5a.5.5 0 0 1 .5.5m2 19a.5.5 0 0 0 .5.5h6a.5.5 0 0 0 .5-.5v-5h-7zM3 21v3a2 2 0 0 0 2 2h5a.5.5 0 0 0 .5-.5v-5h-7a.5.5 0 0 0-.5.5m0-7v4a.5.5 0 0 0 .5.5h7v-5h-7a.5.5 0 0 0-.5.5m16-8h-6a.5.5 0 0 0-.5.5v5h7v-5A.5.5 0 0 0 19 6m9.5 7.5h-7v5h7a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5m-16 5h7v-5h-7zM27 6h-5a.5.5 0 0 0-.5.5v5h7a.5.5 0 0 0 .5-.5V8a2 2 0 0 0-2-2m1.5 14.5h-7v5a.5.5 0 0 0 .5.5h5a2 2 0 0 0 2-2v-3a.5.5 0 0 0-.5-.5"})})};b.forwardRef(QL);const JL=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.791 17.633a3.04 3.04 0 0 0-2.326-.597C28.813 14.666 30 12.31 30 10c0-3.309-2.661-6-5.933-6A5.95 5.95 0 0 0 19.5 6.094 5.95 5.95 0 0 0 14.932 4C11.663 4 9 6.691 9 10c0 1.375.405 2.711 1.258 4.125a4 4 0 0 0-1.844 1.05L5.586 18H2a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h13q.123 0 .242-.03l8-2a1 1 0 0 0 .15-.05l4.858-2.067.055-.025a3.074 3.074 0 0 0 .491-5.195zm-1.362 3.393-4.75 2.023L14.875 25H7v-5.586l2.829-2.828A1.98 1.98 0 0 1 11.242 16H17.5a1.5 1.5 0 0 1 0 3H14a1 1 0 0 0 0 2h4q.113 0 .224-.025l8.375-1.926.038-.01a1.075 1.075 0 0 1 .788 1.987z"})})};b.forwardRef(JL);const eB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28 10.5h-5.475l.951-5.231a1.5 1.5 0 1 0-2.952-.538L19.475 10.5h-4.95l.951-5.231a1.5 1.5 0 1 0-2.952-.538L11.475 10.5H6a1.5 1.5 0 0 0 0 3h4.93l-.909 5H4a1.5 1.5 0 0 0 0 3h5.475l-.951 5.231a1.5 1.5 0 0 0 1.207 1.75q.134.022.269.019a1.5 1.5 0 0 0 1.475-1.233l1.05-5.767h4.95l-.951 5.231a1.5 1.5 0 1 0 2.952.543l1.049-5.774H26a1.5 1.5 0 1 0 0-3h-4.93l.909-5H28a1.5 1.5 0 1 0 0-3m-9.979 8H13.07l.909-5h4.951z"})})};b.forwardRef(eB);const tB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M31.5 22.5a5 5 0 0 1-5 5 4.94 4.94 0 0 1-3.571-1.45 1.5 1.5 0 0 1 2.142-2.1 1.94 1.94 0 0 0 1.429.55 2 2 0 0 0 0-4 1.94 1.94 0 0 0-1.429.55 1.5 1.5 0 0 1-2.551-1.3l1-6A1.5 1.5 0 0 1 25 12.5h5a1.5 1.5 0 1 1 0 3h-3.729l-.338 2.029q.283-.03.567-.029a5 5 0 0 1 5 5M18 5.5A1.5 1.5 0 0 0 16.5 7v6h-10V7a1.5 1.5 0 0 0-3 0v15a1.5 1.5 0 0 0 3 0v-6h10v6a1.5 1.5 0 1 0 3 0V7A1.5 1.5 0 0 0 18 5.5"})})};b.forwardRef(tB);const nB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M32 22a1.5 1.5 0 0 1-1.5 1.5V26a1.5 1.5 0 1 1-3 0v-2.5H23a1.5 1.5 0 0 1-1.422-1.974l3-9a1.5 1.5 0 0 1 2.845.948L25.08 20.5H27.5V18a1.5 1.5 0 1 1 3 0v2.5A1.5 1.5 0 0 1 32 22M18 5.5A1.5 1.5 0 0 0 16.5 7v6h-10V7a1.5 1.5 0 0 0-3 0v15a1.5 1.5 0 0 0 3 0v-6h10v6a1.5 1.5 0 1 0 3 0V7A1.5 1.5 0 0 0 18 5.5"})})};b.forwardRef(nB);const rB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29.5 14v12a1.5 1.5 0 1 1-3 0v-9.198l-.668.448a1.503 1.503 0 0 1-1.665-2.5l3-2A1.5 1.5 0 0 1 29.5 14M18 5.5A1.5 1.5 0 0 0 16.5 7v6h-10V7a1.5 1.5 0 0 0-3 0v15a1.5 1.5 0 0 0 3 0v-6h10v6a1.5 1.5 0 1 0 3 0V7A1.5 1.5 0 0 0 18 5.5"})})};b.forwardRef(rB);const iB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m27.133 17.541 1.655-2.772a1.5 1.5 0 1 0-2.576-1.538l-4.03 6.75q-.018.029-.032.059a5 5 0 1 0 4.983-2.5zM26.5 24.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4M19.5 7v15a1.5 1.5 0 1 1-3 0v-6h-10v6a1.5 1.5 0 0 1-3 0V7a1.5 1.5 0 0 1 3 0v6h10V7a1.5 1.5 0 1 1 3 0"})})};b.forwardRef(iB);const oB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M31.5 22.5a5 5 0 0 1-8.571 3.5 1.5 1.5 0 1 1 2.142-2.099A2 2 0 1 0 26.5 20.5a1.5 1.5 0 0 1-1.229-2.36l1.854-2.64H24a1.5 1.5 0 1 1 0-3h6a1.5 1.5 0 0 1 1.229 2.36l-2.293 3.275A5 5 0 0 1 31.5 22.5M18 5.5A1.5 1.5 0 0 0 16.5 7v6h-10V7a1.5 1.5 0 0 0-3 0v15a1.5 1.5 0 0 0 3 0v-6h10v6a1.5 1.5 0 1 0 3 0V7A1.5 1.5 0 0 0 18 5.5"})})};b.forwardRef(oB);const sB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M19.5 7v15a1.5 1.5 0 1 1-3 0v-6h-10v6a1.5 1.5 0 0 1-3 0V7a1.5 1.5 0 0 1 3 0v6h10V7a1.5 1.5 0 1 1 3 0M30 24.5h-3l3.593-4.791a4.499 4.499 0 1 0-7.837-4.209 1.5 1.5 0 1 0 2.829 1q.076-.218.216-.402a1.5 1.5 0 1 1 2.394 1.807L22.8 25.1a1.5 1.5 0 0 0 1.2 2.4h6a1.5 1.5 0 1 0 0-3"})})};b.forwardRef(sB);const aB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29 17v7a3 3 0 0 1-3 3h-2a3 3 0 0 1-3-3v-5a3 3 0 0 1 3-3h2.956A10.964 10.964 0 0 0 16.081 6H16A11 11 0 0 0 5.045 16H8a3 3 0 0 1 3 3v5a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3v-7a13.014 13.014 0 0 1 22.236-9.167A12.93 12.93 0 0 1 29 17"})})};b.forwardRef(aB);const lB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30 11.75c0 8.75-12.974 15.833-13.526 16.125a1 1 0 0 1-.948 0C14.974 27.582 2 20.5 2 11.75A7.76 7.76 0 0 1 9.75 4c2.581 0 4.841 1.11 6.25 2.986C17.409 5.11 19.669 4 22.25 4A7.76 7.76 0 0 1 30 11.75"})})};b.forwardRef(lB);const cB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28 14.444V26a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V14.444a2 2 0 0 1 .646-1.473l10-9.435.014-.013a2 2 0 0 1 2.705.013l10 9.435A2 2 0 0 1 28 14.444"})})};b.forwardRef(cB);const uB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 5H5a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-7.5 6a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M5 25v-3.5l6.5-6.5 10 10zm22 0h-2.671l-4.5-4.5 2.5-2.5L27 22.672z"})})};b.forwardRef(uB);const hB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 5H9a2 2 0 0 0-2 2v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2v-2h2a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-5.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M23 25H5V11h2v10a2 2 0 0 0 2 2h14zm4-4H9v-4.5l4.5-4.5 6.208 6.208a1 1 0 0 0 1.413 0L24.33 15 27 17.672z"})})};b.forwardRef(hB);const fB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H15a1.5 1.5 0 0 1 0-3h12a1.5 1.5 0 0 1 1.5 1.5M15 9.5h12a1.5 1.5 0 0 0 0-3H15a1.5 1.5 0 0 0 0 3m12 13H5a1.5 1.5 0 1 0 0 3h22a1.5 1.5 0 0 0 0-3m-18-4a1.5 1.5 0 0 0 1.061-2.561L6.125 12l3.936-3.94a1.503 1.503 0 1 0-2.125-2.125l-5 5a1.5 1.5 0 0 0 0 2.125l5 5A1.5 1.5 0 0 0 9 18.5"})})};b.forwardRef(fB);const dB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H15a1.5 1.5 0 0 1 0-3h12a1.5 1.5 0 0 1 1.5 1.5M15 9.5h12a1.5 1.5 0 0 0 0-3H15a1.5 1.5 0 0 0 0 3m12 13H5a1.5 1.5 0 0 0 0 3h22a1.5 1.5 0 1 0 0-3M3.939 18.06a1.5 1.5 0 0 0 2.125 0l5-5a1.5 1.5 0 0 0 0-2.125l-5-5a1.503 1.503 0 0 0-2.125 2.125L7.875 12l-3.936 3.939a1.5 1.5 0 0 0 0 2.122"})})};b.forwardRef(dB);const gB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m-.5 6a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3M17 23a2 2 0 0 1-2-2v-5a1 1 0 0 1 0-2 2 2 0 0 1 2 2v5a1 1 0 0 1 0 2"})})},mB=b.forwardRef(gB),pB=mB,vB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M25.5 7A1.5 1.5 0 0 1 24 8.5h-3.919l-5 15H18a1.5 1.5 0 1 1 0 3H8a1.5 1.5 0 1 1 0-3h3.919l5-15H14a1.5 1.5 0 0 1 0-3h10A1.5 1.5 0 0 1 25.5 7"})})},bB=b.forwardRef(vB),wB=bB,xB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M20 2a10.01 10.01 0 0 0-9.511 13.098l-7.196 7.195A1 1 0 0 0 3 23v5a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-2h2a1 1 0 0 0 1-1v-2h2a1 1 0 0 0 .707-.293l1.195-1.196A10 10 0 1 0 20 2m2.5 9.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4"})})};b.forwardRef(xB);const yB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 5H5a2 2 0 0 0-2 2v18a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2M5 7h22v5H5zm22 18H14V14h13z"})})};b.forwardRef(yB);const CB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M22 29a1 1 0 0 1-1 1H11a1 1 0 1 1 0-2h10a1 1 0 0 1 1 1m5-16a10.94 10.94 0 0 1-4.205 8.651A2.03 2.03 0 0 0 22 23.25V24a2 2 0 0 1-2 2h-8a2 2 0 0 1-2-2v-.75a2 2 0 0 0-.779-1.582A10.95 10.95 0 0 1 5 13.06C4.967 7.104 9.782 2.143 15.735 2A11 11 0 0 1 27 13m-4.014-1.168a7.2 7.2 0 0 0-5.82-5.818 1 1 0 1 0-.332 1.972c2.071.349 3.829 2.106 4.18 4.182a1 1 0 0 0 1.972-.335"})})};b.forwardRef(CB);const $B=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m21.731 14.683-14 15a1 1 0 0 1-1.711-.875l1.832-9.167L.65 16.936a1 1 0 0 1-.375-1.625l14-15a1 1 0 0 1 1.71.875l-1.837 9.177 7.204 2.7a1 1 0 0 1 .375 1.62z"})})};b.forwardRef($B);const SB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M17.046 23.441a1.5 1.5 0 0 1 0 2.125l-.742.743a7.502 7.502 0 1 1-10.61-10.61l3.015-3.014A7.5 7.5 0 0 1 19 12.375a1.506 1.506 0 0 1-2 2.25 4.5 4.5 0 0 0-6.171.184l-3.013 3.01a4.5 4.5 0 0 0 6.365 6.365l.743-.743a1.5 1.5 0 0 1 2.122 0m9.26-17.75a7.51 7.51 0 0 0-10.61 0l-.742.743a1.503 1.503 0 1 0 2.125 2.125l.742-.743a4.5 4.5 0 0 1 6.365 6.365l-3.014 3.015a4.5 4.5 0 0 1-6.172.179 1.506 1.506 0 1 0-2 2.25 7.5 7.5 0 0 0 10.288-.304l3.014-3.014a7.51 7.51 0 0 0 .004-10.613z"})})},AB=b.forwardRef(SB),RB=AB,kB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H5a1.5 1.5 0 1 1 0-3h22a1.5 1.5 0 0 1 1.5 1.5M5 9.5h22a1.5 1.5 0 0 0 0-3H5a1.5 1.5 0 0 0 0 3m22 13H5a1.5 1.5 0 1 0 0 3h22a1.5 1.5 0 1 0 0-3"})})};b.forwardRef(kB);const TB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M3.5 8A1.5 1.5 0 0 1 5 6.5h22a1.5 1.5 0 0 1 0 3H5A1.5 1.5 0 0 1 3.5 8M5 17.5h22a1.5 1.5 0 1 0 0-3H5a1.5 1.5 0 1 0 0 3m13 5H5a1.5 1.5 0 1 0 0 3h13a1.5 1.5 0 1 0 0-3m11 0h-1.5V21a1.5 1.5 0 1 0-3 0v1.5H23a1.5 1.5 0 1 0 0 3h1.5V27a1.5 1.5 0 1 0 3 0v-1.5H29a1.5 1.5 0 1 0 0-3"})})};b.forwardRef(TB);const MB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28 64a12 12 0 0 1 12-12h176a12 12 0 0 1 0 24H40a12 12 0 0 1-12-12m12 76h64a12 12 0 0 0 0-24H40a12 12 0 0 0 0 24m80 40H40a12 12 0 0 0 0 24h80a12 12 0 0 0 0-24m120.49 20.49a12 12 0 0 1-17 0l-18.08-18.08a44 44 0 1 1 17-17l18.08 18.07a12 12 0 0 1 0 17.01M184 164a20 20 0 1 0-20-20 20 20 0 0 0 20 20"})})};b.forwardRef(MB);const EB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M17.5 4v4a1.5 1.5 0 1 1-3 0V4a1.5 1.5 0 1 1 3 0m4.156 7.844a1.5 1.5 0 0 0 1.062-.44l2.828-2.829a1.503 1.503 0 1 0-2.125-2.125l-2.825 2.833a1.5 1.5 0 0 0 1.06 2.56M28 14.5h-4a1.5 1.5 0 1 0 0 3h4a1.5 1.5 0 1 0 0-3m-5.282 6.096a1.501 1.501 0 0 0-2.451 1.638c.075.182.186.348.326.487l2.828 2.829a1.503 1.503 0 0 0 2.125-2.125zM16 22.5a1.5 1.5 0 0 0-1.5 1.5v4a1.5 1.5 0 1 0 3 0v-4a1.5 1.5 0 0 0-1.5-1.5m-6.717-1.904-2.83 2.829A1.503 1.503 0 0 0 8.58 25.55l2.829-2.829a1.503 1.503 0 0 0-2.125-2.125M9.5 16A1.5 1.5 0 0 0 8 14.5H4a1.5 1.5 0 1 0 0 3h4A1.5 1.5 0 0 0 9.5 16m-.925-9.546A1.503 1.503 0 0 0 6.45 8.579l2.833 2.825a1.503 1.503 0 0 0 2.125-2.125z"})})},OB=b.forwardRef(EB),B3=OB,DB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26 10h-4V7a6 6 0 1 0-12 0v3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V12a2 2 0 0 0-2-2M16 20.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3M20 10h-8V7a4 4 0 1 1 8 0z"})})};b.forwardRef(DB);const IB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M31 19a1 1 0 0 1-1 1h-2v2a1 1 0 0 1-2 0v-2h-2a1 1 0 0 1 0-2h2v-2a1 1 0 1 1 2 0v2h2a1 1 0 0 1 1 1M7 9h2v2a1 1 0 1 0 2 0V9h2a1 1 0 0 0 0-2h-2V5a1 1 0 0 0-2 0v2H7a1 1 0 0 0 0 2m16 15h-1v-1a1 1 0 0 0-2 0v1h-1a1 1 0 0 0 0 2h1v1a1 1 0 1 0 2 0v-1h1a1 1 0 0 0 0-2m4.414-14L10 27.414a2 2 0 0 1-2.828 0l-2.587-2.585a2 2 0 0 1 0-2.829L22 4.586a2 2 0 0 1 2.829 0l2.585 2.585a2 2 0 0 1 0 2.829M26 8.586 23.414 6l-4 4L22 12.586z"})})};b.forwardRef(IB);const _B=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28 6H4a1 1 0 0 0-1 1v17a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V7a1 1 0 0 0-1-1M12.339 16 5 22.726V9.274zm1.48 1.356 1.5 1.381a1 1 0 0 0 1.352 0l1.5-1.38L25.421 24H6.571zM19.66 16 27 9.273v13.455z"})})};b.forwardRef(_B);const LB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{fillRule:"evenodd",d:"M11 7q0 .432-.088.838L16 10.382l5.088-2.544a4 4 0 1 1 .895 1.789L18.236 11.5l3.747 1.873a4 4 0 1 1 0 5.253L18.236 20.5l3.747 1.874a4 4 0 1 1-.895 1.788L16 21.618l-5.088 2.544Q11 24.567 11 25a4 4 0 1 1-.983-2.626l3.747-1.874-3.747-1.873a4 4 0 1 1 0-5.253l3.747-1.874-3.747-1.874A4 4 0 1 1 11 7M9 7a2 2 0 1 1-4 0 2 2 0 0 1 4 0m2.236 8h9.528L16 12.618zM9 25a2 2 0 1 1-4 0 2 2 0 0 1 4 0m-2-7a2 2 0 1 0 0-4 2 2 0 0 0 0 4M27 7a2 2 0 1 1-4 0 2 2 0 0 1 4 0m-2 20a2 2 0 1 0 0-4 2 2 0 0 0 0 4m2-11a2 2 0 1 1-4 0 2 2 0 0 1 4 0m-11 3.382L20.764 17h-9.528z",clipRule:"evenodd"})})};b.forwardRef(LB);const BB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{fillRule:"evenodd",d:"M14.8 8.254a4 4 0 1 0-1.082 1.682l7.483 4.81a4 4 0 0 0-.075.254H10.874A4.002 4.002 0 0 0 3 16a4 4 0 0 0 7.874 1h10.252q.033.128.075.254l-7.484 4.81a4 4 0 1 0 1.082 1.682l7.484-4.81a4 4 0 1 0 0-5.871zM11 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4M9 16a2 2 0 1 1-4 0 2 2 0 0 1 4 0m16 2a2 2 0 1 0 0-4 2 2 0 0 0 0 4",clipRule:"evenodd"})})};b.forwardRef(BB);const NB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{fillRule:"evenodd",d:"M18.842 3.227a1 1 0 1 0-.445 1.95l1.747.399L9.6 12.959a4 4 0 1 0 0 6.081l10.546 7.385-1.748.399a1 1 0 1 0 .445 1.95l3.945-.9a1 1 0 0 0 .77-1.1l-.503-4.014a1 1 0 0 0-1.985.248l.223 1.779-10.545-7.384a4 4 0 0 0 .127-.403h14.712l-1.293 1.293a1 1 0 1 0 1.414 1.414l3-3a1 1 0 0 0 0-1.414l-3-3a1 1 0 0 0-1.414 1.414L25.586 15H10.874a4 4 0 0 0-.127-.403l10.544-7.383-.222 1.778a1 1 0 0 0 1.984.249l.503-4.015a1 1 0 0 0-.77-1.099zM9 16a2 2 0 1 1-4 0 2 2 0 0 1 4 0",clipRule:"evenodd"})})};b.forwardRef(NB);const jB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 6H5a2 2 0 0 0-2 2v20a1.98 1.98 0 0 0 1.156 1.813 1.986 1.986 0 0 0 2.141-.299L10.312 26H27a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2M10.5 17.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5.5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5.5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};b.forwardRef(jB);const FB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M10 16V8a6 6 0 1 1 12 0v8a6 6 0 1 1-12 0m16 0a1 1 0 0 0-2 0 8 8 0 0 1-16 0 1 1 0 1 0-2 0 10.014 10.014 0 0 0 9 9.95V29a1 1 0 0 0 2 0v-3.05A10.014 10.014 0 0 0 26 16"})})};b.forwardRef(FB);const VB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H5a1.5 1.5 0 1 1 0-3h22a1.5 1.5 0 0 1 1.5 1.5"})})},HB=b.forwardRef(VB),PB=HB,WB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m5 14H11a1 1 0 0 1 0-2h10a1 1 0 0 1 0 2"})})};b.forwardRef(WB);const zB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26 5H6a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h20a3 3 0 0 0 3-3V8a3 3 0 0 0-3-3M20 27h-8a1 1 0 0 0 0 2h8a1 1 0 0 0 0-2"})})};b.forwardRef(zB);const UB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29.443 18.776a13.1 13.1 0 0 1-4.626 6.614A13 13 0 0 1 4 15a12.9 12.9 0 0 1 2.61-7.815 13.1 13.1 0 0 1 6.614-4.625 1 1 0 0 1 1.25 1.25 11.01 11.01 0 0 0 13.725 13.725 1 1 0 0 1 1.25 1.25z"})})};b.forwardRef(UB);const qB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M18 16a2 2 0 1 1-4 0 2 2 0 0 1 4 0M7.5 14a2 2 0 1 0 0 4 2 2 0 0 0 0-4m17 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4"})})},KB=b.forwardRef(qB),GB=KB,YB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M10.939 8.061a1.5 1.5 0 0 1 0-2.125l4-4a1.5 1.5 0 0 1 2.125 0l4 4a1.503 1.503 0 1 1-2.125 2.125L17.5 6.625V12a1.5 1.5 0 1 1-3 0V6.625l-1.439 1.436a1.5 1.5 0 0 1-2.122 0m8 15.875L17.5 25.375V20a1.5 1.5 0 1 0-3 0v5.375l-1.439-1.44a1.504 1.504 0 0 0-2.125 2.125l4 4a1.5 1.5 0 0 0 2.125 0l4-4a1.502 1.502 0 1 0-2.125-2.125zm11.125-9-4-4a1.503 1.503 0 0 0-2.125 2.125l1.436 1.439H20a1.5 1.5 0 0 0 0 3h5.375l-1.44 1.439a1.503 1.503 0 0 0 2.125 2.125l4-4a1.5 1.5 0 0 0 .001-2.125zM6.625 17.5H12a1.5 1.5 0 1 0 0-3H6.625l1.44-1.439a1.503 1.503 0 1 0-2.125-2.125l-4 4a1.5 1.5 0 0 0 0 2.125l4 4a1.503 1.503 0 0 0 2.125-2.125z"})})};b.forwardRef(YB);const XB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26.615 3.214a.99.99 0 0 0-.857-.183l-16 4a1 1 0 0 0-.758.97v13.762a4.5 4.5 0 1 0 2 3.737V13.781l14-3.5v7.482a4.5 4.5 0 1 0 2 3.737V4a1 1 0 0 0-.385-.786"})})};b.forwardRef(XB);const ZB=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5H14.5a1.5 1.5 0 1 1 0-3H27a1.5 1.5 0 0 1 1.5 1.5m-14-6.5H27a1.5 1.5 0 0 0 0-3H14.5a1.5 1.5 0 0 0 0 3m12.5 13H14.5a1.5 1.5 0 1 0 0 3H27a1.5 1.5 0 1 0 0-3M5.5 7.414V13a1.5 1.5 0 0 0 3 0V5a1.5 1.5 0 0 0-2.17-1.341l-2 1a1.5 1.5 0 0 0 1.17 2.75zm4.966 12.107a3.46 3.46 0 0 0-1.4-2.329 3.61 3.61 0 0 0-4.954.683 3.5 3.5 0 0 0-.52.942 1.5 1.5 0 0 0 2.818 1.027.5.5 0 0 1 .072-.125.6.6 0 0 1 .813-.103.48.48 0 0 1 .201.325.45.45 0 0 1-.096.347l-.016.02-3.585 4.794A1.5 1.5 0 0 0 5 27.5h4a1.5 1.5 0 1 0 0-3H8l1.785-2.389a3.43 3.43 0 0 0 .681-2.59"})})},QB=b.forwardRef(ZB),JB=QB,eN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{fillRule:"evenodd",d:"M17.2 8.254a4 4 0 1 1 1.082 1.682l-7.482 4.81q.04.125.074.254h10.252A4.002 4.002 0 0 1 29 16a4 4 0 0 1-7.874 1H10.874q-.033.128-.075.254l7.484 4.81a4 4 0 1 1-1.082 1.682l-7.484-4.81a4 4 0 1 1 0-5.871zM21 9a2 2 0 1 1 0-4 2 2 0 0 1 0 4m0 18a2 2 0 1 1 0-4 2 2 0 0 1 0 4m2-11a2 2 0 1 0 4 0 2 2 0 0 0-4 0M7 18a2 2 0 1 1 0-4 2 2 0 0 1 0 4",clipRule:"evenodd"})})};b.forwardRef(eN);const tN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{fillRule:"evenodd",d:"M10.874 17A4.002 4.002 0 0 1 3 16a4 4 0 0 1 7.874-1h10.252A4.002 4.002 0 0 1 29 16a4 4 0 0 1-7.874 1zM7 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4m18 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4",clipRule:"evenodd"})})};b.forwardRef(tN);const nN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{fillRule:"evenodd",d:"M28.924 16.384c-.05.12-.124.231-.217.324l-4 4a1 1 0 0 1-1.632-.324 1 1 0 0 1 .217-1.09L25.585 17H10.875A4.002 4.002 0 0 1 3 16a4 4 0 0 1 7.874-1h14.712l-2.294-2.293a1 1 0 0 1 1.415-1.415l4 4a1 1 0 0 1 .217 1.09M7 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4",clipRule:"evenodd"})})};b.forwardRef(nN);const rN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29 4a1 1 0 0 0-1-1c-5.51 0-11.164 6.214-14.304 10.329A7.5 7.5 0 0 0 4 20.5c0 3.86-2.443 5.591-2.559 5.671A1 1 0 0 0 2 28h9.5a7.5 7.5 0 0 0 7.171-9.696C22.788 15.164 29 9.51 29 4M15.553 14.194a48 48 0 0 1 1.26-1.569 9.5 9.5 0 0 1 2.562 2.561q-.738.618-1.569 1.262a7.6 7.6 0 0 0-2.254-2.254m5.337-.335a11.6 11.6 0 0 0-2.75-2.75c3.973-4.316 6.969-5.625 8.738-5.989-.357 1.77-1.672 4.766-5.988 8.739"})})};b.forwardRef(rN);const iN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M31 13v6.25a2.01 2.01 0 0 1-1.45 1.922L17 24.75V29a1 1 0 0 1-2 0v-4.25a2.01 2.01 0 0 1 1.45-1.922L29 19.25V13h-2v3a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3H2a1 1 0 0 1 0-2h2V8a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v3h2a2 2 0 0 1 2 2"})})};b.forwardRef(iN);const oN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M25.096 6.736A12.9 12.9 0 0 0 16 3h-.134A13 13 0 0 0 3 16c0 5.375 3.323 9.883 8.67 11.771A4 4 0 0 0 17 24a2 2 0 0 1 2-2h5.776a3.976 3.976 0 0 0 3.9-3.11c.224-.984.332-1.99.324-3a12.9 12.9 0 0 0-3.904-9.154M10.5 21a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m0-7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5.5-3a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5.5 3a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};b.forwardRef(oN);const sN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.925 5.543v.018L21.65 29.554A1.985 1.985 0 0 1 19.728 31a1.98 1.98 0 0 1-1.803-1.144l-4.464-9.423a.5.5 0 0 1 .099-.568l7.158-7.159a1 1 0 0 0-1.414-1.413l-7.169 7.157a.5.5 0 0 1-.567.099l-9.376-4.441A2.05 2.05 0 0 1 1 12.17a1.99 1.99 0 0 1 1.446-1.815L26.44 3.08h.018a2 2 0 0 1 2.468 2.463"})})};b.forwardRef(sN);const aN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m26.56 17.061-10.257 10.25a7.501 7.501 0 0 1-10.607-10.61l12.27-12.236a5 5 0 0 1 7.07 7.074l-.021.02L13.04 23.086a1.503 1.503 0 0 1-2.121-.041 1.5 1.5 0 0 1 .041-2.121L22.924 9.409a2 2 0 1 0-2.838-2.82L7.816 18.82a4.5 4.5 0 1 0 6.366 6.364l10.258-10.25a1.503 1.503 0 0 1 2.125 2.125z"})})};b.forwardRef(aN);const lN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M3.5 8A1.5 1.5 0 0 1 5 6.5h22a1.5 1.5 0 0 1 0 3H5A1.5 1.5 0 0 1 3.5 8M5 14.5h16a1.5 1.5 0 1 0 0-3H5a1.5 1.5 0 1 0 0 3m22 2H5a1.5 1.5 0 1 0 0 3h22a1.5 1.5 0 1 0 0-3m-6 5H5a1.5 1.5 0 1 0 0 3h16a1.5 1.5 0 1 0 0-3"})})};b.forwardRef(lN);const cN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m28.414 9.171-5.585-5.586a2 2 0 0 0-2.829 0L4.586 19A1.98 1.98 0 0 0 4 20.414V26a2 2 0 0 0 2 2h5.586A1.98 1.98 0 0 0 13 27.414L28.414 12a2 2 0 0 0 0-2.829M24 13.585 18.414 8l3-3L27 10.585z"})})},uN=b.forwardRef(cN),hN=uN,fN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.985 21.885A7.03 7.03 0 0 1 22 28c-9.925 0-18-8.075-18-18a7.03 7.03 0 0 1 6.115-6.985 2 2 0 0 1 2.078 1.19l2.64 5.894v.015a2 2 0 0 1-.16 1.886 1 1 0 0 1-.07.096L12 15.181c.936 1.903 2.926 3.875 4.854 4.814l3.042-2.589q.045-.037.094-.07a2 2 0 0 1 1.896-.175l.017.008 5.888 2.639a2 2 0 0 1 1.194 2.077"})})};b.forwardRef(fN);const dN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m29.416 13-6.683 6.706c.57 1.584.806 4.236-1.65 7.5a2 2 0 0 1-1.458.794h-.141a2 2 0 0 1-1.415-.586l-6.033-6.04-5.328 5.333a1 1 0 1 1-1.415-1.415l5.332-5.328-6.037-6.038a2 2 0 0 1 .162-2.972c3.178-2.564 6.219-2.06 7.55-1.643L19 2.587a2 2 0 0 1 2.829 0l7.586 7.585A2 2 0 0 1 29.416 13"})})};b.forwardRef(dN);const gN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 2A11.013 11.013 0 0 0 5 13c0 9.413 10 16.521 10.426 16.819a1 1 0 0 0 1.148 0C17 29.52 27 22.413 27 13A11.01 11.01 0 0 0 16 2m0 7a4 4 0 1 1 0 8 4 4 0 0 1 0-8"})})};b.forwardRef(gN);const mN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30 17v4a1 1 0 0 1-1.196.98L19.5 20.125v2.966l2.207 2.206A1 1 0 0 1 22 26v3a1 1 0 0 1-1.375.929L16 28.078l-4.625 1.85A1 1 0 0 1 10 29v-3a1 1 0 0 1 .293-.707l2.207-2.207v-2.961L3.196 21.98A1 1 0 0 1 2 21v-4a1 1 0 0 1 .553-.895l9.947-4.972V5.5a3.5 3.5 0 1 1 7 0v5.633l9.948 4.972A1 1 0 0 1 30 17"})})};b.forwardRef(mN);const pN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M25.676 18.884a7.6 7.6 0 0 1-3.978 1.107 9 9 0 0 1-3.42-.707A6.94 6.94 0 0 0 17 23.314V27a1 1 0 0 1-1.066 1A1.023 1.023 0 0 1 15 26.969v-1.555l-4.828-4.828A6.6 6.6 0 0 1 7.93 21a5.73 5.73 0 0 1-2.99-.834C2.216 18.511.75 14.702 1.034 9.974a1 1 0 0 1 .94-.94c4.728-.28 8.537 1.182 10.187 3.906a5.75 5.75 0 0 1 .806 3.56.5.5 0 0 1-.86.304l-2.4-2.513a1 1 0 0 0-1.415 1.414l6.736 6.906q.01-.146.026-.291a8.57 8.57 0 0 1 2.33-4.933l6.323-6.682a1 1 0 0 0-1.413-1.415l-6.125 6.477a.5.5 0 0 1-.848-.217c-.592-2.185-.331-4.36.8-6.228 2.233-3.685 7.428-5.657 13.898-5.277a1 1 0 0 1 .94.94c.375 6.471-1.598 11.666-5.283 13.899"})})};b.forwardRef(pN);const vN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30 16a1.97 1.97 0 0 1-.95 1.689L11.04 28.706a2 2 0 0 1-2.767-.688A2 2 0 0 1 8 27.016V4.984a1.98 1.98 0 0 1 1.015-1.728 2 2 0 0 1 2.025.038L29.05 14.31A1.97 1.97 0 0 1 30 16"})})},bN=b.forwardRef(vN),wN=bN,xN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5h-9.5V27a1.5 1.5 0 1 1-3 0v-9.5H5a1.5 1.5 0 1 1 0-3h9.5V5a1.5 1.5 0 1 1 3 0v9.5H27a1.5 1.5 0 0 1 1.5 1.5"})})},yN=b.forwardRef(xN),CN=yN,$N=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.016 13.016 0 0 0 16 3m5 14h-4v4a1 1 0 0 1-2 0v-4h-4a1 1 0 0 1 0-2h4v-4a1 1 0 0 1 2 0v4h4a1 1 0 0 1 0 2"})})};b.forwardRef($N);const SN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 5H17V3a1 1 0 0 0-2 0v2H5a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h4.92l-2.701 3.375a1 1 0 0 0 1.562 1.25L12.48 24h7.04l3.699 4.625a1 1 0 1 0 1.562-1.25L22.08 24H27a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2M13 18a1 1 0 0 1-2 0v-3a1 1 0 0 1 2 0zm4 0a1 1 0 0 1-2 0v-5a1 1 0 0 1 2 0zm4 0a1 1 0 0 1-2 0v-7a1 1 0 0 1 2 0z"})})};b.forwardRef(SN);const AN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M30.414 17 18 4.586A1.98 1.98 0 0 0 16.586 4H5a1 1 0 0 0-1 1v11.586A1.98 1.98 0 0 0 4.586 18L17 30.414a2 2 0 0 0 2.829 0l10.585-10.585a2 2 0 0 0 0-2.829M10.5 12a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};b.forwardRef(AN);const RN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M20.723 28H26a2 2 0 0 0 2-2v-4.706a1 1 0 0 0-1.383-.919 2.9 2.9 0 0 1-1.117.221c-1.654 0-3-1.387-3-3.091s1.346-3.091 3-3.091c.383 0 .763.075 1.117.221A1 1 0 0 0 28 13.706V9a2 2 0 0 0-2-2h-4.527a4.5 4.5 0 1 0-8.945 0H8a2 2 0 0 0-2 2v4.028a4.5 4.5 0 1 0 0 8.945V26a2 2 0 0 0 2 2h5.278"})})};b.forwardRef(RN);const kN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M18 22.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0M29.5 16A13.5 13.5 0 1 1 16 2.5 13.515 13.515 0 0 1 29.5 16m-3 0A10.5 10.5 0 1 0 16 26.5 10.51 10.51 0 0 0 26.5 16M16 8c-3.033 0-5.5 2.242-5.5 5v.5a1.5 1.5 0 1 0 3 0V13c0-1.102 1.125-2 2.5-2s2.5.898 2.5 2-1.125 2-2.5 2a1.5 1.5 0 0 0-1.5 1.5v1a1.5 1.5 0 0 0 2.966.32C19.79 17.235 21.5 15.296 21.5 13c0-2.758-2.468-5-5.5-5"})})};b.forwardRef(kN);const TN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M14.5 9v11a6.006 6.006 0 0 1-6 6 1 1 0 0 1 0-2 4 4 0 0 0 4-4v-1H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h7.5a2 2 0 0 1 2 2M27 7h-7.5a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2H27v1a4 4 0 0 1-4 4 1 1 0 0 0 0 2 6.006 6.006 0 0 0 6-6V9a2 2 0 0 0-2-2"})})},MN=b.forwardRef(TN),EN=MN,ON=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 5v23a1 1 0 0 1-2 0v-6h-6a1 1 0 0 1-1-1c.046-2.395.349-4.779.902-7.11 1.223-5.061 3.54-8.454 6.704-9.809a1 1 0 0 1 1.394.92m-12.014-.164a.999.999 0 1 0-1.972.33L13.986 11H11V5a1 1 0 0 0-2 0v6H6.014l.972-5.835a1 1 0 1 0-1.972-.329l-1 6A1 1 0 0 0 4 11a6.01 6.01 0 0 0 5 5.915V28a1 1 0 1 0 2 0V16.915A6.01 6.01 0 0 0 16 11q0-.083-.014-.164z"})})};b.forwardRef(ON);const DN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M19 28a1 1 0 0 1-1 1h-4a1 1 0 0 1 0-2h4a1 1 0 0 1 1 1m8.953-8.521-1.546 6.954a2 2 0 0 1-3.188 1.138l-3.405-2.57h-7.625L8.78 27.57a2 2 0 0 1-3.189-1.138l-1.545-6.954a2.01 2.01 0 0 1 .415-1.714l3.57-4.282c.12-1.574.482-3.12 1.072-4.584 1.612-4.043 4.5-6.579 5.671-7.481a2 2 0 0 1 2.45 0c1.167.902 4.059 3.438 5.671 7.48.59 1.465.952 3.01 1.072 4.585l3.57 4.282a2.01 2.01 0 0 1 .415 1.714m-17.404 4.25q-2.014-3.666-2.445-7.209L6 19.045 7.545 26l.022-.016zM17.5 12.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0m8.5 6.545-2.104-2.525q-.428 3.535-2.445 7.211l2.982 2.25.022.017z"})})};b.forwardRef(DN);const IN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M19.716 14.141a1 1 0 0 1 .261-1.391l8.458-5.788a1 1 0 0 1 1.125 1.652L21.101 14.4a1 1 0 0 1-1.39-.261zm10.109 10.634a1 1 0 0 1-1.39.261L17 17.211l-5.315 3.636a4.5 4.5 0 1 1-1.125-1.65L15.229 16l-4.673-3.198a4.5 4.5 0 1 1 1.125-1.65l17.875 12.233a1 1 0 0 1 .269 1.39M9 22.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0m0-13a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0"})})};b.forwardRef(IN);const _N=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 256 256",fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M225.86 102.82c-3.77-3.94-7.67-8-9.14-11.57-1.36-3.27-1.44-8.69-1.52-13.94-.15-9.76-.31-20.82-8-28.51s-18.75-7.85-28.51-8c-5.25-.08-10.67-.16-13.94-1.52-3.56-1.47-7.63-5.37-11.57-9.14C146.28 23.51 138.44 16 128 16s-18.27 7.51-25.18 14.14c-3.94 3.77-8 7.67-11.57 9.14-3.25 1.36-8.69 1.44-13.94 1.52-9.76.15-20.82.31-28.51 8s-7.8 18.75-8 28.51c-.08 5.25-.16 10.67-1.52 13.94-1.47 3.56-5.37 7.63-9.14 11.57C23.51 109.72 16 117.56 16 128s7.51 18.27 14.14 25.18c3.77 3.94 7.67 8 9.14 11.57 1.36 3.27 1.44 8.69 1.52 13.94.15 9.76.31 20.82 8 28.51s18.75 7.85 28.51 8c5.25.08 10.67.16 13.94 1.52 3.56 1.47 7.63 5.37 11.57 9.14 6.9 6.63 14.74 14.14 25.18 14.14s18.27-7.51 25.18-14.14c3.94-3.77 8-7.67 11.57-9.14 3.27-1.36 8.69-1.44 13.94-1.52 9.76-.15 20.82-.31 28.51-8s7.85-18.75 8-28.51c.08-5.25.16-10.67 1.52-13.94 1.47-3.56 5.37-7.63 9.14-11.57 6.63-6.9 14.14-14.74 14.14-25.18s-7.51-18.27-14.14-25.18m-52.2 6.84-56 56a8 8 0 0 1-11.32 0l-24-24a8 8 0 0 1 11.32-11.32L112 148.69l50.34-50.35a8 8 0 0 1 11.32 11.32"})})};b.forwardRef(_N);const LN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29.061 26.939 23.125 21A11.515 11.515 0 1 0 21 23.125l5.941 5.942a1.503 1.503 0 0 0 2.125-2.125zM5.5 14a8.5 8.5 0 1 1 8.5 8.5A8.51 8.51 0 0 1 5.5 14"})})},BN=b.forwardRef(LN),N3=BN,NN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26 5H6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3M26 17H6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2m-3.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})};b.forwardRef(NN);const jN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28 7v7.346c0 11.202-9.477 14.918-11.375 15.549a1.94 1.94 0 0 1-1.25 0C13.475 29.264 4 25.548 4 14.346V7a2 2 0 0 1 2-2h20a2 2 0 0 1 2 2"})})},FN=b.forwardRef(jN),VN=FN,HN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m30.949 7.653-6.47-3.528A1 1 0 0 0 24 4h-4a1 1 0 0 0-1 1 3 3 0 0 1-6 0 1 1 0 0 0-1-1H8a1 1 0 0 0-.48.125L1.051 7.653a1.97 1.97 0 0 0-.824 2.657l2.41 4.601A2.05 2.05 0 0 0 4.458 16H7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V16h2.543a2.05 2.05 0 0 0 1.822-1.089l2.409-4.601a1.97 1.97 0 0 0-.825-2.658M4.459 14a.08.08 0 0 1-.051-.016L2.01 9.408 7 6.685V14zm23.134-.018a.07.07 0 0 1-.052.018H25V6.685l4.99 2.723z"})})};b.forwardRef(HN);const PN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M12 27a2 2 0 1 1-4 0 2 2 0 0 1 4 0m11-2a2 2 0 1 0 0 4 2 2 0 0 0 0-4m5.805-16.594A1 1 0 0 0 28 8H6.04L5.026 4.45A2.01 2.01 0 0 0 3.103 3H1a1 1 0 0 0 0 2h2.103l4.522 15.824A3.01 3.01 0 0 0 10.509 23h12.014a2.99 2.99 0 0 0 2.867-2.117l3.566-11.59a1 1 0 0 0-.151-.887"})})};b.forwardRef(PN);const WN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M14.5 27a1.5 1.5 0 0 1-1.5 1.5H6A2.5 2.5 0 0 1 3.5 26V6A2.5 2.5 0 0 1 6 3.5h7a1.5 1.5 0 0 1 0 3H6.5v19H13a1.5 1.5 0 0 1 1.5 1.5m13.561-12.061-5-5a1.503 1.503 0 0 0-2.125 2.125l2.439 2.436H13a1.5 1.5 0 1 0 0 3h10.375l-2.44 2.439a1.503 1.503 0 0 0 2.125 2.125l5-5a1.5 1.5 0 0 0 .001-2.125"})})};b.forwardRef(WN);const zN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M4 10a1 1 0 0 1 1-1h4.646a3.5 3.5 0 0 1 6.708 0H27a1 1 0 1 1 0 2H16.354a3.5 3.5 0 0 1-6.708 0H5a1 1 0 0 1-1-1m23 11h-2.646a3.5 3.5 0 0 0-6.708 0H5a1 1 0 0 0 0 2h12.646a3.5 3.5 0 0 0 6.708 0H27a1 1 0 1 0 0-2"})})};b.forwardRef(zN);const UN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M26 18a1.97 1.97 0 0 1-1.302 1.867l-6.457 2.375-2.375 6.452a1.99 1.99 0 0 1-3.735 0L9.75 22.25l-6.452-2.375a1.99 1.99 0 0 1 0-3.735l6.456-2.375 2.375-6.451a1.99 1.99 0 0 1 3.735 0l2.375 6.456 6.451 2.375A1.97 1.97 0 0 1 26 18M19 6h2v2a1 1 0 0 0 2 0V6h2a1 1 0 1 0 0-2h-2V2a1 1 0 1 0-2 0v2h-2a1 1 0 1 0 0 2m11 4h-1V9a1 1 0 1 0-2 0v1h-1a1 1 0 0 0 0 2h1v1a1 1 0 0 0 2 0v-1h1a1 1 0 0 0 0-2"})})};b.forwardRef(UN);const qN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M15 7v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2m10-2h-6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2M13 17H7a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2m12 0h-6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2"})})};b.forwardRef(qN);const KN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:[p.jsx("path",{d:"M27.5 21.136 16 27.843 4.5 21.136a1 1 0 0 0-1 1.728l12 7a1 1 0 0 0 1.008 0l12-7a1 1 0 1 0-1.008-1.728"}),p.jsx("path",{d:"M27.5 15.136 16 21.843 4.5 15.136a1 1 0 0 0-1 1.728l12 7a1 1 0 0 0 1.008 0l12-7a1 1 0 1 0-1.008-1.728"}),p.jsx("path",{d:"m3.5 10.864 12 7a1 1 0 0 0 1.008 0l12-7a1 1 0 0 0 0-1.728l-12-7a1 1 0 0 0-1.008 0l-12 7a1 1 0 0 0 0 1.728"})]})};b.forwardRef(KN);const GN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m29.313 14.298-5.638 4.92 1.689 7.325a2 2 0 0 1-2.98 2.167l-6.389-3.875L9.62 28.71a2 2 0 0 1-2.98-2.168l1.686-7.317-5.638-4.928a2 2 0 0 1 1.138-3.507l7.433-.644 2.901-6.92a1.994 1.994 0 0 1 3.68 0l2.91 6.92 7.43.644a2 2 0 0 1 1.139 3.508z"})})};b.forwardRef(GN);const YN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29 19a4 4 0 1 0-4.991 3.875A1 1 0 0 0 24 23a4 4 0 0 1-4 4h-3a4 4 0 0 1-4-4v-5.065c3.934-.5 7-3.934 7-8.039V5a2 2 0 0 0-2-2h-2a1 1 0 1 0 0 2h2v4.896c0 3.323-2.656 6.061-5.92 6.104A6 6 0 0 1 6 10V5h2a1 1 0 0 0 0-2H6a2 2 0 0 0-2 2v5a8 8 0 0 0 7 7.936V23a6.006 6.006 0 0 0 6 6h3a6.006 6.006 0 0 0 6-6 1 1 0 0 0-.009-.125A4 4 0 0 0 29 19m-4 1a1 1 0 1 1 0-2 1 1 0 0 1 0 2"})})};b.forwardRef(YN);const XN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M216 56v144a16 16 0 0 1-16 16H56a16 16 0 0 1-16-16V56a16 16 0 0 1 16-16h144a16 16 0 0 1 16 16"})})};b.forwardRef(XN);const ZN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29 12a1 1 0 0 0-.038-.275L27.17 5.45A2.01 2.01 0 0 0 25.25 4H6.75a2.01 2.01 0 0 0-1.919 1.45L3.04 11.725A1 1 0 0 0 3 12v2a5 5 0 0 0 2 4v8a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2v-8a5 5 0 0 0 2-4zm-18 2a3 3 0 0 1-4.39 2.657 1 1 0 0 0-.228-.132A3 3 0 0 1 5 14v-1h6zm8 0a3 3 0 0 1-6 0v-1h6zm8 0a3 3 0 0 1-1.384 2.525q-.12.051-.225.131A3 3 0 0 1 21 14v-1h6z"})})};b.forwardRef(ZN);const QN=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 16a1.5 1.5 0 0 1-1.5 1.5h-3.767A5.19 5.19 0 0 1 24.5 21c0 1.806-.976 3.54-2.679 4.756C20.25 26.881 18.18 27.5 16 27.5s-4.25-.619-5.821-1.744C8.476 24.54 7.5 22.806 7.5 21a1.5 1.5 0 0 1 3 0c0 1.898 2.519 3.5 5.5 3.5s5.5-1.602 5.5-3.5c0-1.595-1.163-2.523-4.419-3.5H5a1.5 1.5 0 1 1 0-3h22a1.5 1.5 0 0 1 1.5 1.5M9.389 12.5a1.5 1.5 0 0 0 1.5-1.5c0-2 2.197-3.5 5.111-3.5 2.17 0 3.921.831 4.685 2.223a1.5 1.5 0 0 0 2.625-1.446C22.016 5.914 19.281 4.5 16 4.5c-4.625 0-8.111 2.794-8.111 6.5a1.5 1.5 0 0 0 1.5 1.5"})})},JN=b.forwardRef(QN),ej=JN,tj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M15 5V2a1 1 0 0 1 2 0v3a1 1 0 0 1-2 0m1 3a8 8 0 1 0 8 8 8.01 8.01 0 0 0-8-8m-8.707.707a1 1 0 1 0 1.414-1.415l-2-2a1 1 0 1 0-1.414 1.415zm0 14.586-2 2a1 1 0 1 0 1.414 1.415l2-2a1 1 0 1 0-1.415-1.415M24 9a1 1 0 0 0 .707-.293l2-2a1 1 0 0 0-1.415-1.414l-2 2A1 1 0 0 0 24 9m.707 14.293a1 1 0 1 0-1.415 1.415l2 2a1 1 0 0 0 1.415-1.415zM6 16a1 1 0 0 0-1-1H2a1 1 0 0 0 0 2h3a1 1 0 0 0 1-1m10 10a1 1 0 0 0-1 1v3a1 1 0 0 0 2 0v-3a1 1 0 0 0-1-1m14-11h-3a1 1 0 0 0 0 2h3a1 1 0 0 0 0-2"})})};b.forwardRef(tj);const nj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 8h-8.586l4.293-4.292a1 1 0 0 0-1.415-1.415L16 7.586l-5.292-5.293a1 1 0 1 0-1.415 1.415L13.586 8H5a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h22a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2m0 17h-7V10h7zm-2-10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0 6a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"})})};b.forwardRef(nj);const rj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m29.978 19.625-1.5-12A3 3 0 0 0 25.5 5H4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h5.383l4.722 9.448A1 1 0 0 0 15 30a5 5 0 0 0 5-5v-2h7a3 3 0 0 0 2.977-3.375M9 18H4V7h5z"})})};b.forwardRef(rj);const ij=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M29.25 10.015A3 3 0 0 0 27 9h-7V7a5 5 0 0 0-5-5 1 1 0 0 0-.895.553L9.383 12H4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h21.5a3 3 0 0 0 2.977-2.625l1.5-12a3 3 0 0 0-.727-2.36M4 14h5v11H4z"})})};b.forwardRef(ij);const oj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M23 3H9a4 4 0 0 0-4 4v16a4 4 0 0 0 4 4h1l-1.8 2.4a1 1 0 0 0 1.6 1.2l2.7-3.6h7l2.7 3.6a1 1 0 0 0 1.6-1.2L22 27h1a4 4 0 0 0 4-4V7a4 4 0 0 0-4-4M10.5 23a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m4.5-8H7v-5h8zm6.5 8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m3.5-8h-8v-5h8z"})})};b.forwardRef(oj);const sj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M27 6h-5V5a3 3 0 0 0-3-3h-6a3 3 0 0 0-3 3v1H5a1 1 0 0 0 0 2h1v18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h1a1 1 0 1 0 0-2M14 21a1 1 0 0 1-2 0v-8a1 1 0 0 1 2 0zm6 0a1 1 0 0 1-2 0v-8a1 1 0 0 1 2 0zm0-15h-8V5a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1z"})})},aj=b.forwardRef(sj),lj=aj,cj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 17 16",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M15.583 3.5v4a.75.75 0 1 1-1.5 0V5.313l-4.72 4.72a.75.75 0 0 1-1.062 0l-1.968-1.97-3.97 3.968a.751.751 0 1 1-1.062-1.063l4.5-4.5a.75.75 0 0 1 1.063 0l1.969 1.97 4.188-4.188h-2.188a.75.75 0 1 1 0-1.5h4a.75.75 0 0 1 .75.75"})})};b.forwardRef(cj);const uj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m23.54 2.267-3.711 3.377c1.7.52 3.298 1.397 4.653 2.631 4.684 4.266 4.684 11.184 0 15.45q-5.184 4.72-16.021 6.008l3.71-3.377a12.2 12.2 0 0 1-4.653-2.63c-4.684-4.267-4.712-11.16 0-15.45q5.184-4.721 16.021-6.01m-7.54 8.4c-3.314 0-6 2.388-6 5.333s2.686 5.333 6 5.333 6-2.387 6-5.333c0-2.945-2.686-5.333-6-5.333"})})};b.forwardRef(uj);const hj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M25.5 28a1.5 1.5 0 0 1-1.5 1.5H8a1.5 1.5 0 1 1 0-3h16a1.5 1.5 0 0 1 1.5 1.5M16 24.5a8.51 8.51 0 0 0 8.5-8.5V7a1.5 1.5 0 1 0-3 0v9a5.5 5.5 0 0 1-11 0V7a1.5 1.5 0 1 0-3 0v9a8.51 8.51 0 0 0 8.5 8.5"})})},fj=b.forwardRef(hj),dj=fj,gj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.5 19v7a2.5 2.5 0 0 1-2.5 2.5H6A2.5 2.5 0 0 1 3.5 26v-7a1.5 1.5 0 0 1 3 0v6.5h19V19a1.5 1.5 0 1 1 3 0m-16.439-7.939L14.5 8.625V19a1.5 1.5 0 1 0 3 0V8.625l2.439 2.44a1.503 1.503 0 0 0 2.125-2.125l-5-5a1.5 1.5 0 0 0-2.125 0l-5 5a1.503 1.503 0 1 0 2.125 2.125z"})})};b.forwardRef(gj);const mj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M28.866 27.5A1 1 0 0 1 28 28H4a1 1 0 0 1-.865-1.5c1.904-3.291 4.838-5.651 8.261-6.77a9 9 0 1 1 9.208 0c3.424 1.119 6.357 3.479 8.261 6.77a1 1 0 0 1 .001 1"})})};b.forwardRef(mj);const pj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M19.44 3.101a1 1 0 0 0-1.054.11L9.656 10H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h5.656l8.73 6.789A1 1 0 0 0 20 28V4a1 1 0 0 0-.56-.899M28.414 16l2.293-2.292a1.001 1.001 0 0 0-1.415-1.415L27 14.586l-2.293-2.293a1 1 0 1 0-1.415 1.415L25.587 16l-2.293 2.293a1 1 0 0 0 1.415 1.415L27 17.414l2.293 2.294a1 1 0 0 0 1.415-1.415z"})})};b.forwardRef(pj);const vj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M19.439 3.101a1 1 0 0 0-1.053.11L9.656 10H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h5.656l8.73 6.789A1.001 1.001 0 0 0 20 28V4a1 1 0 0 0-.561-.899M9 20H4v-8h5zm15.75-7.305a5 5 0 0 1 0 6.61 1 1 0 0 1-1.5-1.322 3 3 0 0 0 0-3.966 1 1 0 0 1 1.5-1.322M31 16a10 10 0 0 1-2.546 6.668 1 1 0 0 1-1.49-1.334 8 8 0 0 0 0-10.666.998.998 0 0 1 .407-1.624 1 1 0 0 1 1.083.29A9.98 9.98 0 0 1 31 16"})})};b.forwardRef(vj);const bj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M15 6a4 4 0 1 1 8 0 4 4 0 0 1-8 0m11 11c-3.58 0-5.226-1.662-6.969-3.421a25 25 0 0 0-1.375-1.323C13.031 8.24 5.63 15.098 5.316 15.391a1 1 0 0 0 1.369 1.458 20.5 20.5 0 0 1 3.815-2.724c1.723-.922 3.174-1.279 4.338-1.072L8.082 28.6a1 1 0 0 0 1.835.798l4.2-9.659L18 22.515V29a1 1 0 1 0 2 0v-7a1 1 0 0 0-.419-.814l-4.65-3.321L16.61 14c.33.305.657.634 1 .98C19.381 16.774 21.586 19 26 19a1 1 0 0 0 0-2"})})};b.forwardRef(bj);const wj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M16 3a13 13 0 1 0 13 13A13.013 13.013 0 0 0 16 3m-1 7a1 1 0 0 1 2 0v7a1 1 0 0 1-2 0zm1 13a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})})},xj=b.forwardRef(wj),j3=xj,yj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 17 16",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"M3.468 10 5.9 5.786l-.14-.243a3 3 0 1 1 5.316-2.76.51.51 0 0 1-.2.65.5.5 0 0 1-.71-.233 2 2 0 1 0-3.542 1.84l.864 1.496a.5.5 0 0 1 0 .5L5.2 11a1 1 0 0 1-1.731-1m8.812-2.5h-.771l-2.31-4a1 1 0 0 0-1.731 1l2.165 3.75a.5.5 0 0 0 .432.25h2.227c1.118 0 2.06.915 2.041 2.033a2 2 0 0 1-1.98 1.967.515.515 0 0 0-.518.458.5.5 0 0 0 .5.542 3.003 3.003 0 0 0 3-3.058c-.034-1.643-1.41-2.942-3.052-2.942zm1.053 2.952c-.025-.538-.489-.952-1.027-.952H7.51a.5.5 0 0 0-.433.25l-1.01 1.75a2 2 0 1 1-3.342-2.187.51.51 0 0 0-.058-.688.5.5 0 0 0-.732.073A3 3 0 1 0 6.93 12l.289-.5h5.114a1 1 0 0 0 1-1.048"})})};b.forwardRef(yj);const Cj=({fill:t="currentColor",stroke:e,...n},r)=>{const{colors:i}=k.useTheme(),o=t&&t in i?i[t]:t,s=e&&e in i?i[e]:e;return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:16,height:16,fill:o,stroke:s,ref:r,...n,children:p.jsx("path",{d:"m31.316 24.949-3 1a1 1 0 0 1-1.211-.5l-3.724-7.45H13a1 1 0 0 1-1-1v-3.707A7 7 0 0 0 14 27c3.239 0 6.261-2.256 7.031-5.25a1 1 0 1 1 1.938.5C21.96 26.162 18.19 29 14 29a9 9 0 0 1-2-17.774V8.851a3.5 3.5 0 1 1 2 0V11h7a1 1 0 0 1 0 2h-7v3h10a1 1 0 0 1 .894.552l3.612 7.225 2.178-.726a1 1 0 1 1 .632 1.898"})})};b.forwardRef(Cj);const F3="Avatar",[$j,Ane]=bt(F3),[Sj,V3]=$j(F3),Aj=b.forwardRef((t,e)=>{const{__scopeAvatar:n,...r}=t,[i,o]=b.useState("idle");return b.createElement(Sj,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o},b.createElement(ge.span,z({},r,{ref:e})))}),Rj="AvatarImage",kj=b.forwardRef((t,e)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=t,s=V3(Rj,n),a=Ej(r),c=yt(h=>{i(h),s.onImageLoadingStatusChange(h)});return ut(()=>{a!=="idle"&&c(a)},[a,c]),a==="loaded"?b.createElement(ge.img,z({},o,{ref:e,src:r})):null}),Tj="AvatarFallback",Mj=b.forwardRef((t,e)=>{const{__scopeAvatar:n,delayMs:r,...i}=t,o=V3(Tj,n),[s,a]=b.useState(r===void 0);return b.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(c)}},[r]),s&&o.imageLoadingStatus!=="loaded"?b.createElement(ge.span,z({},i,{ref:e})):null});function Ej(t){const[e,n]=b.useState("idle");return ut(()=>{if(!t){n("error");return}let r=!0;const i=new window.Image,o=s=>()=>{r&&n(s)};return n("loading"),i.onload=o("loaded"),i.onerror=o("error"),i.src=t,()=>{r=!1}},[t]),e}const Oj=Aj,Dj=kj,Ij=Mj,Ud="rovingFocusGroup.onEntryFocus",_j={bubbles:!1,cancelable:!0},om="RovingFocusGroup",[Z0,H3,Lj]=Mh(om),[Bj,Ys]=bt(om,[Lj]),[Nj,jj]=Bj(om),Fj=b.forwardRef((t,e)=>b.createElement(Z0.Provider,{scope:t.__scopeRovingFocusGroup},b.createElement(Z0.Slot,{scope:t.__scopeRovingFocusGroup},b.createElement(Vj,z({},t,{ref:e}))))),Vj=b.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:h,...f}=t,d=b.useRef(null),g=ye(e,d),v=To(o),[x=null,w]=It({prop:s,defaultProp:a,onChange:c}),[C,S]=b.useState(!1),R=yt(h),T=H3(n),E=b.useRef(!1),[O,L]=b.useState(0);return b.useEffect(()=>{const I=d.current;if(I)return I.addEventListener(Ud,R),()=>I.removeEventListener(Ud,R)},[R]),b.createElement(Nj,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:x,onItemFocus:b.useCallback(I=>w(I),[w]),onItemShiftTab:b.useCallback(()=>S(!0),[]),onFocusableItemAdd:b.useCallback(()=>L(I=>I+1),[]),onFocusableItemRemove:b.useCallback(()=>L(I=>I-1),[])},b.createElement(ge.div,z({tabIndex:C||O===0?-1:0,"data-orientation":r},f,{ref:g,style:{outline:"none",...t.style},onMouseDown:ie(t.onMouseDown,()=>{E.current=!0}),onFocus:ie(t.onFocus,I=>{const V=!E.current;if(I.target===I.currentTarget&&V&&!C){const F=new CustomEvent(Ud,_j);if(I.currentTarget.dispatchEvent(F),!F.defaultPrevented){const H=T().filter(re=>re.focusable),K=H.find(re=>re.active),W=H.find(re=>re.id===x),G=[K,W,...H].filter(Boolean).map(re=>re.ref.current);P3(G)}}E.current=!1}),onBlur:ie(t.onBlur,()=>S(!1))})))}),Hj="RovingFocusGroupItem",Pj=b.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=t,a=_t(),c=o||a,h=jj(Hj,n),f=h.currentTabStopId===c,d=H3(n),{onFocusableItemAdd:g,onFocusableItemRemove:v}=h;return b.useEffect(()=>{if(r)return g(),()=>v()},[r,g,v]),b.createElement(Z0.ItemSlot,{scope:n,id:c,focusable:r,active:i},b.createElement(ge.span,z({tabIndex:f?0:-1,"data-orientation":h.orientation},s,{ref:e,onMouseDown:ie(t.onMouseDown,x=>{r?h.onItemFocus(c):x.preventDefault()}),onFocus:ie(t.onFocus,()=>h.onItemFocus(c)),onKeyDown:ie(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){h.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=Uj(x,h.orientation,h.dir);if(w!==void 0){x.preventDefault();let S=d().filter(R=>R.focusable).map(R=>R.ref.current);if(w==="last")S.reverse();else if(w==="prev"||w==="next"){w==="prev"&&S.reverse();const R=S.indexOf(x.currentTarget);S=h.loop?qj(S,R+1):S.slice(R+1)}setTimeout(()=>P3(S))}})})))}),Wj={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zj(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function Uj(t,e,n){const r=zj(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Wj[r]}function P3(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function qj(t,e){return t.map((n,r)=>t[(e+r)%t.length])}const sm=Fj,am=Pj;var Kj=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Jo=new WeakMap,kc=new WeakMap,Tc={},qd=0,W3=function(t){return t&&(t.host||W3(t.parentNode))},Gj=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=W3(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},Yj=function(t,e,n,r){var i=Gj(e,Array.isArray(t)?t:[t]);Tc[n]||(Tc[n]=new WeakMap);var o=Tc[n],s=[],a=new Set,c=new Set(i),h=function(d){!d||a.has(d)||(a.add(d),h(d.parentNode))};i.forEach(h);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(g){if(a.has(g))f(g);else try{var v=g.getAttribute(r),x=v!==null&&v!=="false",w=(Jo.get(g)||0)+1,C=(o.get(g)||0)+1;Jo.set(g,w),o.set(g,C),s.push(g),w===1&&x&&kc.set(g,!0),C===1&&g.setAttribute(n,"true"),x||g.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",g,S)}})};return f(e),a.clear(),qd++,function(){s.forEach(function(d){var g=Jo.get(d)-1,v=o.get(d)-1;Jo.set(d,g),o.set(d,v),g||(kc.has(d)||d.removeAttribute(r),kc.delete(d)),v||d.removeAttribute(n)}),qd--,qd||(Jo=new WeakMap,Jo=new WeakMap,kc=new WeakMap,Tc={})}},Xj=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=Kj(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),Yj(r,i,n,"aria-hidden")):function(){return null}},z3=Sh(),Kd=function(){},Bh=$.forwardRef(function(t,e){var n=$.useRef(null),r=$.useState({onScrollCapture:Kd,onWheelCapture:Kd,onTouchMoveCapture:Kd}),i=r[0],o=r[1],s=t.forwardProps,a=t.children,c=t.className,h=t.removeScrollBar,f=t.enabled,d=t.shards,g=t.sideCar,v=t.noIsolation,x=t.inert,w=t.allowPinchZoom,C=t.as,S=C===void 0?"div":C,R=Ks(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=g,E=$h([n,e]),O=exports.__assign(exports.__assign({},R),i);return $.createElement($.Fragment,null,f&&$.createElement(T,{sideCar:z3,removeScrollBar:h,shards:d,noIsolation:v,inert:x,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),s?$.cloneElement($.Children.only(a),exports.__assign(exports.__assign({},O),{ref:E})):$.createElement(S,exports.__assign({},O,{className:c,ref:E}),a))});Bh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bh.classNames={fullWidth:co,zeroRight:lo};var Q0=!1;if(typeof window<"u")try{var Mc=Object.defineProperty({},"passive",{get:function(){return Q0=!0,!0}});window.addEventListener("test",Mc,Mc),window.removeEventListener("test",Mc,Mc)}catch{Q0=!1}var es=Q0?{passive:!1}:!1,Zj=function(t){return t.tagName==="TEXTAREA"},U3=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Zj(t)&&n[e]==="visible")},Qj=function(t){return U3(t,"overflowY")},Jj=function(t){return U3(t,"overflowX")},u5=function(t,e){var n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=q3(t,n);if(r){var i=K3(t,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},eF=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},tF=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},q3=function(t,e){return t==="v"?Qj(e):Jj(e)},K3=function(t,e){return t==="v"?eF(e):tF(e)},nF=function(t,e){return t==="h"&&e==="rtl"?-1:1},rF=function(t,e,n,r,i){var o=nF(t,window.getComputedStyle(e).direction),s=o*r,a=n.target,c=e.contains(a),h=!1,f=s>0,d=0,g=0;do{var v=K3(t,a),x=v[0],w=v[1],C=v[2],S=w-C-o*x;(x||S)&&q3(t,a)&&(d+=S,g+=x),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&d===0||!f&&g===0)&&(h=!0),h},Ec=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},h5=function(t){return[t.deltaX,t.deltaY]},f5=function(t){return t&&"current"in t?t.current:t},iF=function(t,e){return t[0]===e[0]&&t[1]===e[1]},oF=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},sF=0,ts=[];function aF(t){var e=$.useRef([]),n=$.useRef([0,0]),r=$.useRef(),i=$.useState(sF++)[0],o=$.useState(function(){return fl()})[0],s=$.useRef(t);$.useEffect(function(){s.current=t},[t]),$.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var w=Ch([t.lockRef.current],(t.shards||[]).map(f5),!0).filter(Boolean);return w.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=$.useCallback(function(w,C){if("touches"in w&&w.touches.length===2)return!s.current.allowPinchZoom;var S=Ec(w),R=n.current,T="deltaX"in w?w.deltaX:R[0]-S[0],E="deltaY"in w?w.deltaY:R[1]-S[1],O,L=w.target,I=Math.abs(T)>Math.abs(E)?"h":"v";if("touches"in w&&I==="h"&&L.type==="range")return!1;var V=u5(I,L);if(!V)return!0;if(V?O=I:(O=I==="v"?"h":"v",V=u5(I,L)),!V)return!1;if(!r.current&&"changedTouches"in w&&(T||E)&&(r.current=O),!O)return!0;var F=r.current||O;return rF(F,C,w,F==="h"?T:E)},[]),c=$.useCallback(function(w){var C=w;if(!(!ts.length||ts[ts.length-1]!==o)){var S="deltaY"in C?h5(C):Ec(C),R=e.current.filter(function(O){return O.name===C.type&&O.target===C.target&&iF(O.delta,S)})[0];if(R&&R.should){C.cancelable&&C.preventDefault();return}if(!R){var T=(s.current.shards||[]).map(f5).filter(Boolean).filter(function(O){return O.contains(C.target)}),E=T.length>0?a(C,T[0]):!s.current.noIsolation;E&&C.cancelable&&C.preventDefault()}}},[]),h=$.useCallback(function(w,C,S,R){var T={name:w,delta:C,target:S,should:R};e.current.push(T),setTimeout(function(){e.current=e.current.filter(function(E){return E!==T})},1)},[]),f=$.useCallback(function(w){n.current=Ec(w),r.current=void 0},[]),d=$.useCallback(function(w){h(w.type,h5(w),w.target,a(w,t.lockRef.current))},[]),g=$.useCallback(function(w){h(w.type,Ec(w),w.target,a(w,t.lockRef.current))},[]);$.useEffect(function(){return ts.push(o),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:g}),document.addEventListener("wheel",c,es),document.addEventListener("touchmove",c,es),document.addEventListener("touchstart",f,es),function(){ts=ts.filter(function(w){return w!==o}),document.removeEventListener("wheel",c,es),document.removeEventListener("touchmove",c,es),document.removeEventListener("touchstart",f,es)}},[]);var v=t.removeScrollBar,x=t.inert;return $.createElement($.Fragment,null,x?$.createElement(o,{styles:oF(i)}):null,v?$.createElement(kh,{gapMode:"margin"}):null)}const lF=Ah(z3,aF);var G3=$.forwardRef(function(t,e){return $.createElement(Bh,exports.__assign({},t,{ref:e,sideCar:lF}))});G3.classNames=Bh.classNames;const J0=["Enter"," "],cF=["ArrowDown","PageUp","Home"],Y3=["ArrowUp","PageDown","End"],uF=[...cF,...Y3],hF={ltr:[...J0,"ArrowRight"],rtl:[...J0,"ArrowLeft"]},fF={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Nh="Menu",[Ha,dF,gF]=Mh(Nh),[Mo,X3]=bt(Nh,[gF,Ni,Ys]),lm=Ni(),Z3=Ys(),[mF,Eo]=Mo(Nh),[pF,pl]=Mo(Nh),vF=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:i,onOpenChange:o,modal:s=!0}=t,a=lm(e),[c,h]=b.useState(null),f=b.useRef(!1),d=yt(o),g=To(i);return b.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>f.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),b.createElement(cl,a,b.createElement(mF,{scope:e,open:n,onOpenChange:d,content:c,onContentChange:h},b.createElement(pF,{scope:e,onClose:b.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:g,modal:s},r)))},Q3=b.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=lm(n);return b.createElement(Ws,z({},i,r,{ref:e}))}),J3="MenuPortal",[bF,ey]=Mo(J3,{forceMount:void 0}),wF=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:i}=t,o=Eo(J3,e);return b.createElement(bF,{scope:e,forceMount:n},b.createElement(Tt,{present:n||o.open},b.createElement(zs,{asChild:!0,container:i},r)))},Zn="MenuContent",[xF,cm]=Mo(Zn),yF=b.forwardRef((t,e)=>{const n=ey(Zn,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,o=Eo(Zn,t.__scopeMenu),s=pl(Zn,t.__scopeMenu);return b.createElement(Ha.Provider,{scope:t.__scopeMenu},b.createElement(Tt,{present:r||o.open},b.createElement(Ha.Slot,{scope:t.__scopeMenu},s.modal?b.createElement(CF,z({},i,{ref:e})):b.createElement($F,z({},i,{ref:e})))))}),CF=b.forwardRef((t,e)=>{const n=Eo(Zn,t.__scopeMenu),r=b.useRef(null),i=ye(e,r);return b.useEffect(()=>{const o=r.current;if(o)return Xj(o)},[]),b.createElement(um,z({},t,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ie(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),$F=b.forwardRef((t,e)=>{const n=Eo(Zn,t.__scopeMenu);return b.createElement(um,z({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),um=b.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:g,onDismiss:v,disableOutsideScroll:x,...w}=t,C=Eo(Zn,n),S=pl(Zn,n),R=lm(n),T=Z3(n),E=dF(n),[O,L]=b.useState(null),I=b.useRef(null),V=ye(e,I,C.onContentChange),F=b.useRef(0),H=b.useRef(""),K=b.useRef(0),W=b.useRef(null),J=b.useRef("right"),G=b.useRef(0),re=x?G3:b.Fragment,se=x?{as:Cr,allowPinchZoom:!0}:void 0,te=Y=>{var ce,me;const Ie=H.current+Y,we=E().filter(Re=>!Re.disabled),qe=document.activeElement,Te=(ce=we.find(Re=>Re.ref.current===qe))===null||ce===void 0?void 0:ce.textValue,Ve=we.map(Re=>Re.textValue),pe=LF(Ve,Ie,Te),De=(me=we.find(Re=>Re.textValue===pe))===null||me===void 0?void 0:me.ref.current;(function Re(Le){H.current=Le,window.clearTimeout(F.current),Le!==""&&(F.current=window.setTimeout(()=>Re(""),1e3))})(Ie),De&&setTimeout(()=>De.focus())};b.useEffect(()=>()=>window.clearTimeout(F.current),[]),Us();const ne=b.useCallback(Y=>{var ce,me;return J.current===((ce=W.current)===null||ce===void 0?void 0:ce.side)&&NF(Y,(me=W.current)===null||me===void 0?void 0:me.area)},[]);return b.createElement(xF,{scope:n,searchRef:H,onItemEnter:b.useCallback(Y=>{ne(Y)&&Y.preventDefault()},[ne]),onItemLeave:b.useCallback(Y=>{var ce;ne(Y)||((ce=I.current)===null||ce===void 0||ce.focus(),L(null))},[ne]),onTriggerLeave:b.useCallback(Y=>{ne(Y)&&Y.preventDefault()},[ne]),pointerGraceTimerRef:K,onPointerGraceIntentChange:b.useCallback(Y=>{W.current=Y},[])},b.createElement(re,se,b.createElement(qs,{asChild:!0,trapped:i,onMountAutoFocus:ie(o,Y=>{var ce;Y.preventDefault(),(ce=I.current)===null||ce===void 0||ce.focus()}),onUnmountAutoFocus:s},b.createElement(ko,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:g,onDismiss:v},b.createElement(sm,z({asChild:!0},T,{dir:S.dir,orientation:"vertical",loop:r,currentTabStopId:O,onCurrentTabStopIdChange:L,onEntryFocus:ie(c,Y=>{S.isUsingKeyboardRef.current||Y.preventDefault()})}),b.createElement(ul,z({role:"menu","aria-orientation":"vertical","data-state":ry(C.open),"data-radix-menu-content":"",dir:S.dir},R,w,{ref:V,style:{outline:"none",...w.style},onKeyDown:ie(w.onKeyDown,Y=>{const me=Y.target.closest("[data-radix-menu-content]")===Y.currentTarget,Ie=Y.ctrlKey||Y.altKey||Y.metaKey,we=Y.key.length===1;me&&(Y.key==="Tab"&&Y.preventDefault(),!Ie&&we&&te(Y.key));const qe=I.current;if(Y.target!==qe||!uF.includes(Y.key))return;Y.preventDefault();const Ve=E().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);Y3.includes(Y.key)&&Ve.reverse(),IF(Ve)}),onBlur:ie(t.onBlur,Y=>{Y.currentTarget.contains(Y.target)||(window.clearTimeout(F.current),H.current="")}),onPointerMove:ie(t.onPointerMove,Pa(Y=>{const ce=Y.target,me=G.current!==Y.clientX;if(Y.currentTarget.contains(ce)&&me){const Ie=Y.clientX>G.current?"right":"left";J.current=Ie,G.current=Y.clientX}}))})))))))}),SF=b.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return b.createElement(ge.div,z({},r,{ref:e}))}),e1="MenuItem",d5="menu.itemSelect",AF=b.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...i}=t,o=b.useRef(null),s=pl(e1,t.__scopeMenu),a=cm(e1,t.__scopeMenu),c=ye(e,o),h=b.useRef(!1),f=()=>{const d=o.current;if(!n&&d){const g=new CustomEvent(d5,{bubbles:!0,cancelable:!0});d.addEventListener(d5,v=>r?.(v),{once:!0}),ux(d,g),g.defaultPrevented?h.current=!1:s.onClose()}};return b.createElement(ty,z({},i,{ref:c,disabled:n,onClick:ie(t.onClick,f),onPointerDown:d=>{var g;(g=t.onPointerDown)===null||g===void 0||g.call(t,d),h.current=!0},onPointerUp:ie(t.onPointerUp,d=>{var g;h.current||(g=d.currentTarget)===null||g===void 0||g.click()}),onKeyDown:ie(t.onKeyDown,d=>{const g=a.searchRef.current!=="";n||g&&d.key===" "||J0.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})}))}),ty=b.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=t,s=cm(e1,n),a=Z3(n),c=b.useRef(null),h=ye(e,c),[f,d]=b.useState(!1),[g,v]=b.useState("");return b.useEffect(()=>{const x=c.current;if(x){var w;v(((w=x.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),b.createElement(Ha.ItemSlot,{scope:n,disabled:r,textValue:i??g},b.createElement(am,z({asChild:!0},a,{focusable:!r}),b.createElement(ge.div,z({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:h,onPointerMove:ie(t.onPointerMove,Pa(x=>{r?s.onItemLeave(x):(s.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus())})),onPointerLeave:ie(t.onPointerLeave,Pa(x=>s.onItemLeave(x))),onFocus:ie(t.onFocus,()=>d(!0)),onBlur:ie(t.onBlur,()=>d(!1))}))))}),RF="MenuRadioGroup",[Rne,kne]=Mo(RF,{value:void 0,onValueChange:()=>{}}),kF="MenuItemIndicator",[Tne,Mne]=Mo(kF,{checked:!1}),TF=b.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return b.createElement(ge.div,z({role:"separator","aria-orientation":"horizontal"},r,{ref:e}))}),MF="MenuSub",[Ene,ny]=Mo(MF),Oc="MenuSubTrigger",EF=b.forwardRef((t,e)=>{const n=Eo(Oc,t.__scopeMenu),r=pl(Oc,t.__scopeMenu),i=ny(Oc,t.__scopeMenu),o=cm(Oc,t.__scopeMenu),s=b.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=o,h={__scopeMenu:t.__scopeMenu},f=b.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return b.useEffect(()=>f,[f]),b.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),c(null)}},[a,c]),b.createElement(Q3,z({asChild:!0},h),b.createElement(ty,z({id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":ry(n.open)},t,{ref:ph(e,i.onTriggerChange),onClick:d=>{var g;(g=t.onClick)===null||g===void 0||g.call(t,d),!(t.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ie(t.onPointerMove,Pa(d=>{o.onItemEnter(d),!d.defaultPrevented&&!t.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:ie(t.onPointerLeave,Pa(d=>{var g;f();const v=(g=n.content)===null||g===void 0?void 0:g.getBoundingClientRect();if(v){var x;const w=(x=n.content)===null||x===void 0?void 0:x.dataset.side,C=w==="right",S=C?-5:5,R=v[C?"left":"right"],T=v[C?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+S,y:d.clientY},{x:R,y:v.top},{x:T,y:v.top},{x:T,y:v.bottom},{x:R,y:v.bottom}],side:w}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ie(t.onKeyDown,d=>{const g=o.searchRef.current!=="";if(!(t.disabled||g&&d.key===" ")&&hF[r.dir].includes(d.key)){var v;n.onOpenChange(!0),(v=n.content)===null||v===void 0||v.focus(),d.preventDefault()}})})))}),OF="MenuSubContent",DF=b.forwardRef((t,e)=>{const n=ey(Zn,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,o=Eo(Zn,t.__scopeMenu),s=pl(Zn,t.__scopeMenu),a=ny(OF,t.__scopeMenu),c=b.useRef(null),h=ye(e,c);return b.createElement(Ha.Provider,{scope:t.__scopeMenu},b.createElement(Tt,{present:r||o.open},b.createElement(Ha.Slot,{scope:t.__scopeMenu},b.createElement(um,z({id:a.contentId,"aria-labelledby":a.triggerId},i,{ref:h,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;s.isUsingKeyboardRef.current&&((d=c.current)===null||d===void 0||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:ie(t.onFocusOutside,f=>{f.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ie(t.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:ie(t.onKeyDown,f=>{const d=f.currentTarget.contains(f.target),g=fF[s.dir].includes(f.key);if(d&&g){var v;o.onOpenChange(!1),(v=a.trigger)===null||v===void 0||v.focus(),f.preventDefault()}})})))))});function ry(t){return t?"open":"closed"}function IF(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function _F(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function LF(t,e,n){const i=e.length>1&&Array.from(e).every(h=>h===e[0])?e[0]:e,o=n?t.indexOf(n):-1;let s=_F(t,Math.max(o,0));i.length===1&&(s=s.filter(h=>h!==n));const c=s.find(h=>h.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function BF(t,e){const{x:n,y:r}=t;let i=!1;for(let o=0,s=e.length-1;o<e.length;s=o++){const a=e[o].x,c=e[o].y,h=e[s].x,f=e[s].y;c>r!=f>r&&n<(h-a)*(r-c)/(f-c)+a&&(i=!i)}return i}function NF(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return BF(n,e)}function Pa(t){return e=>e.pointerType==="mouse"?t(e):void 0}const jF=vF,FF=Q3,VF=wF,HF=yF,PF=SF,WF=AF,zF=TF,UF=EF,qF=DF,iy="DropdownMenu",[KF,One]=bt(iy,[X3]),ii=X3(),[GF,oy]=KF(iy),YF=t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:s,modal:a=!0}=t,c=ii(e),h=b.useRef(null),[f=!1,d]=It({prop:i,defaultProp:o,onChange:s});return b.createElement(GF,{scope:e,triggerId:_t(),triggerRef:h,contentId:_t(),open:f,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(g=>!g),[d]),modal:a},b.createElement(jF,z({},c,{open:f,onOpenChange:d,dir:r,modal:a}),n))},XF="DropdownMenuTrigger",ZF=b.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=t,o=oy(XF,n),s=ii(n);return b.createElement(FF,z({asChild:!0},s),b.createElement(ge.button,z({type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},i,{ref:ph(e,o.triggerRef),onPointerDown:ie(t.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:ie(t.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})))}),QF=t=>{const{__scopeDropdownMenu:e,...n}=t,r=ii(e);return b.createElement(VF,z({},r,n))},JF="DropdownMenuContent",eV=b.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=oy(JF,n),o=ii(n),s=b.useRef(!1);return b.createElement(HF,z({id:i.contentId,"aria-labelledby":i.triggerId},o,r,{ref:e,onCloseAutoFocus:ie(t.onCloseAutoFocus,a=>{var c;s.current||(c=i.triggerRef.current)===null||c===void 0||c.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:ie(t.onInteractOutside,a=>{const c=a.detail.originalEvent,h=c.button===0&&c.ctrlKey===!0,f=c.button===2||h;(!i.modal||f)&&(s.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),tV=b.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ii(n);return b.createElement(PF,z({},i,r,{ref:e}))}),nV=b.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ii(n);return b.createElement(WF,z({},i,r,{ref:e}))}),rV=b.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ii(n);return b.createElement(zF,z({},i,r,{ref:e}))}),iV=b.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ii(n);return b.createElement(UF,z({},i,r,{ref:e}))}),oV=b.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ii(n);return b.createElement(qF,z({},i,r,{ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),sV=YF,aV=ZF,sy=QF,lV=eV,cV=tV,uV=nV,hV=rV,fV=iV,dV=oV,ay="Checkbox",[gV,Dne]=bt(ay),[mV,pV]=gV(ay),vV=b.forwardRef((t,e)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:c="on",onCheckedChange:h,...f}=t,[d,g]=b.useState(null),v=ye(e,T=>g(T)),x=b.useRef(!1),w=d?!!d.closest("form"):!0,[C=!1,S]=It({prop:i,defaultProp:o,onChange:h}),R=b.useRef(C);return b.useEffect(()=>{const T=d?.form;if(T){const E=()=>S(R.current);return T.addEventListener("reset",E),()=>T.removeEventListener("reset",E)}},[d,S]),b.createElement(mV,{scope:n,state:C,disabled:a},b.createElement(ge.button,z({type:"button",role:"checkbox","aria-checked":ho(C)?"mixed":C,"aria-required":s,"data-state":ly(C),"data-disabled":a?"":void 0,disabled:a,value:c},f,{ref:v,onKeyDown:ie(t.onKeyDown,T=>{T.key==="Enter"&&T.preventDefault()}),onClick:ie(t.onClick,T=>{S(E=>ho(E)?!0:!E),w&&(x.current=T.isPropagationStopped(),x.current||T.stopPropagation())})})),w&&b.createElement(xV,{control:d,bubbles:!x.current,name:r,value:c,checked:C,required:s,disabled:a,style:{transform:"translateX(-100%)"}}))}),bV="CheckboxIndicator",wV=b.forwardRef((t,e)=>{const{__scopeCheckbox:n,forceMount:r,...i}=t,o=pV(bV,n);return b.createElement(Tt,{present:r||ho(o.state)||o.state===!0},b.createElement(ge.span,z({"data-state":ly(o.state),"data-disabled":o.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),xV=t=>{const{control:e,checked:n,bubbles:r=!0,...i}=t,o=b.useRef(null),s=Eh(n),a=xh(e);return b.useEffect(()=>{const c=o.current,h=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(h,"checked").set;if(s!==n&&d){const g=new Event("click",{bubbles:r});c.indeterminate=ho(n),d.call(c,ho(n)?!1:n),c.dispatchEvent(g)}},[s,n,r]),b.createElement("input",z({type:"checkbox","aria-hidden":!0,defaultChecked:ho(n)?!1:n},i,{tabIndex:-1,ref:o,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ho(t){return t==="indeterminate"}function ly(t){return ho(t)?"indeterminate":t?"checked":"unchecked"}const yV=vV,CV=wV;function $V(t,e){return b.useReducer((n,r)=>{const i=e[n][r];return i??n},t)}const cy="ScrollArea",[uy,Ine]=bt(cy),[SV,kr]=uy(cy),AV=b.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...s}=t,[a,c]=b.useState(null),[h,f]=b.useState(null),[d,g]=b.useState(null),[v,x]=b.useState(null),[w,C]=b.useState(null),[S,R]=b.useState(0),[T,E]=b.useState(0),[O,L]=b.useState(!1),[I,V]=b.useState(!1),F=ye(e,K=>c(K)),H=To(i);return b.createElement(SV,{scope:n,type:r,dir:H,scrollHideDelay:o,scrollArea:a,viewport:h,onViewportChange:f,content:d,onContentChange:g,scrollbarX:v,onScrollbarXChange:x,scrollbarXEnabled:O,onScrollbarXEnabledChange:L,scrollbarY:w,onScrollbarYChange:C,scrollbarYEnabled:I,onScrollbarYEnabledChange:V,onCornerWidthChange:R,onCornerHeightChange:E},b.createElement(ge.div,z({dir:H},s,{ref:F,style:{position:"relative","--radix-scroll-area-corner-width":S+"px","--radix-scroll-area-corner-height":T+"px",...t.style}})))}),RV="ScrollAreaViewport",kV=b.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:r,...i}=t,o=kr(RV,n),s=b.useRef(null),a=ye(e,s,o.onViewportChange);return b.createElement(b.Fragment,null,b.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),b.createElement(ge.div,z({"data-radix-scroll-area-viewport":""},i,{ref:a,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t.style}}),b.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),oi="ScrollAreaScrollbar",TV=b.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=kr(oi,t.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=i,a=t.orientation==="horizontal";return b.useEffect(()=>(a?o(!0):s(!0),()=>{a?o(!1):s(!1)}),[a,o,s]),i.type==="hover"?b.createElement(MV,z({},r,{ref:e,forceMount:n})):i.type==="scroll"?b.createElement(EV,z({},r,{ref:e,forceMount:n})):i.type==="auto"?b.createElement(hy,z({},r,{ref:e,forceMount:n})):i.type==="always"?b.createElement(hm,z({},r,{ref:e})):null}),MV=b.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=kr(oi,t.__scopeScrollArea),[o,s]=b.useState(!1);return b.useEffect(()=>{const a=i.scrollArea;let c=0;if(a){const h=()=>{window.clearTimeout(c),s(!0)},f=()=>{c=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return a.addEventListener("pointerenter",h),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",h),a.removeEventListener("pointerleave",f)}}},[i.scrollArea,i.scrollHideDelay]),b.createElement(Tt,{present:n||o},b.createElement(hy,z({"data-state":o?"visible":"hidden"},r,{ref:e})))}),EV=b.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=kr(oi,t.__scopeScrollArea),o=t.orientation==="horizontal",s=Fh(()=>c("SCROLL_END"),100),[a,c]=$V("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return b.useEffect(()=>{if(a==="idle"){const h=window.setTimeout(()=>c("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(h)}},[a,i.scrollHideDelay,c]),b.useEffect(()=>{const h=i.viewport,f=o?"scrollLeft":"scrollTop";if(h){let d=h[f];const g=()=>{const v=h[f];d!==v&&(c("SCROLL"),s()),d=v};return h.addEventListener("scroll",g),()=>h.removeEventListener("scroll",g)}},[i.viewport,o,c,s]),b.createElement(Tt,{present:n||a!=="hidden"},b.createElement(hm,z({"data-state":a==="hidden"?"hidden":"visible"},r,{ref:e,onPointerEnter:ie(t.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ie(t.onPointerLeave,()=>c("POINTER_LEAVE"))})))}),hy=b.forwardRef((t,e)=>{const n=kr(oi,t.__scopeScrollArea),{forceMount:r,...i}=t,[o,s]=b.useState(!1),a=t.orientation==="horizontal",c=Fh(()=>{if(n.viewport){const h=n.viewport.offsetWidth<n.viewport.scrollWidth,f=n.viewport.offsetHeight<n.viewport.scrollHeight;s(a?h:f)}},10);return Lu(n.viewport,c),Lu(n.content,c),b.createElement(Tt,{present:r||o},b.createElement(hm,z({"data-state":o?"visible":"hidden"},i,{ref:e})))}),hm=b.forwardRef((t,e)=>{const{orientation:n="vertical",...r}=t,i=kr(oi,t.__scopeScrollArea),o=b.useRef(null),s=b.useRef(0),[a,c]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=gy(a.viewport,a.content),f={...r,sizes:a,onSizesChange:c,hasThumb:h>0&&h<1,onThumbChange:g=>o.current=g,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:g=>s.current=g};function d(g,v){return BV(g,s.current,a,v)}return n==="horizontal"?b.createElement(OV,z({},f,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&o.current){const g=i.viewport.scrollLeft,v=g5(g,a,i.dir);o.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:g=>{i.viewport&&(i.viewport.scrollLeft=g)},onDragScroll:g=>{i.viewport&&(i.viewport.scrollLeft=d(g,i.dir))}})):n==="vertical"?b.createElement(DV,z({},f,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&o.current){const g=i.viewport.scrollTop,v=g5(g,a);o.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:g=>{i.viewport&&(i.viewport.scrollTop=g)},onDragScroll:g=>{i.viewport&&(i.viewport.scrollTop=d(g))}})):null}),OV=b.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,o=kr(oi,t.__scopeScrollArea),[s,a]=b.useState(),c=b.useRef(null),h=ye(e,c,o.onScrollbarXChange);return b.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.createElement(dy,z({"data-orientation":"horizontal"},i,{ref:h,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":jh(n)+"px",...t.style},onThumbPointerDown:f=>t.onThumbPointerDown(f.x),onDragScroll:f=>t.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(o.viewport){const g=o.viewport.scrollLeft+f.deltaX;t.onWheelScroll(g),py(g,d)&&f.preventDefault()}},onResize:()=>{c.current&&o.viewport&&s&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:_u(s.paddingLeft),paddingEnd:_u(s.paddingRight)}})}}))}),DV=b.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,o=kr(oi,t.__scopeScrollArea),[s,a]=b.useState(),c=b.useRef(null),h=ye(e,c,o.onScrollbarYChange);return b.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.createElement(dy,z({"data-orientation":"vertical"},i,{ref:h,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":jh(n)+"px",...t.style},onThumbPointerDown:f=>t.onThumbPointerDown(f.y),onDragScroll:f=>t.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(o.viewport){const g=o.viewport.scrollTop+f.deltaY;t.onWheelScroll(g),py(g,d)&&f.preventDefault()}},onResize:()=>{c.current&&o.viewport&&s&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:_u(s.paddingTop),paddingEnd:_u(s.paddingBottom)}})}}))}),[IV,fy]=uy(oi),dy=b.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:h,onWheelScroll:f,onResize:d,...g}=t,v=kr(oi,n),[x,w]=b.useState(null),C=ye(e,F=>w(F)),S=b.useRef(null),R=b.useRef(""),T=v.viewport,E=r.content-r.viewport,O=yt(f),L=yt(c),I=Fh(d,10);function V(F){if(S.current){const H=F.clientX-S.current.left,K=F.clientY-S.current.top;h({x:H,y:K})}}return b.useEffect(()=>{const F=H=>{const K=H.target;x?.contains(K)&&O(H,E)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[T,x,E,O]),b.useEffect(L,[r,L]),Lu(x,I),Lu(v.content,I),b.createElement(IV,{scope:n,scrollbar:x,hasThumb:i,onThumbChange:yt(o),onThumbPointerUp:yt(s),onThumbPositionChange:L,onThumbPointerDown:yt(a)},b.createElement(ge.div,z({},g,{ref:C,style:{position:"absolute",...g.style},onPointerDown:ie(t.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),S.current=x.getBoundingClientRect(),R.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),V(F))}),onPointerMove:ie(t.onPointerMove,V),onPointerUp:ie(t.onPointerUp,F=>{const H=F.target;H.hasPointerCapture(F.pointerId)&&H.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=R.current,v.viewport&&(v.viewport.style.scrollBehavior=""),S.current=null})})))}),t1="ScrollAreaThumb",_V=b.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=fy(t1,t.__scopeScrollArea);return b.createElement(Tt,{present:n||i.hasThumb},b.createElement(LV,z({ref:e},r)))}),LV=b.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:r,...i}=t,o=kr(t1,n),s=fy(t1,n),{onThumbPositionChange:a}=s,c=ye(e,d=>s.onThumbChange(d)),h=b.useRef(),f=Fh(()=>{h.current&&(h.current(),h.current=void 0)},100);return b.useEffect(()=>{const d=o.viewport;if(d){const g=()=>{if(f(),!h.current){const v=NV(d,a);h.current=v,a()}};return a(),d.addEventListener("scroll",g),()=>d.removeEventListener("scroll",g)}},[o.viewport,f,a]),b.createElement(ge.div,z({"data-state":s.hasThumb?"visible":"hidden"},i,{ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ie(t.onPointerDownCapture,d=>{const v=d.target.getBoundingClientRect(),x=d.clientX-v.left,w=d.clientY-v.top;s.onThumbPointerDown({x,y:w})}),onPointerUp:ie(t.onPointerUp,s.onThumbPointerUp)}))});function _u(t){return t?parseInt(t,10):0}function gy(t,e){const n=t/e;return isNaN(n)?0:n}function jh(t){const e=gy(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function BV(t,e,n,r="ltr"){const i=jh(n),o=i/2,s=e||o,a=i-s,c=n.scrollbar.paddingStart+s,h=n.scrollbar.size-n.scrollbar.paddingEnd-a,f=n.content-n.viewport,d=r==="ltr"?[0,f]:[f*-1,0];return my([c,h],d)(t)}function g5(t,e,n="ltr"){const r=jh(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=e.scrollbar.size-i,s=e.content-e.viewport,a=o-r,c=n==="ltr"?[0,s]:[s*-1,0],h=W0(t,c);return my([0,s],[0,a])(h)}function my(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function py(t,e){return t>0&&t<e}const NV=(t,e=()=>{})=>{let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function i(){const o={left:t.scrollLeft,top:t.scrollTop},s=n.left!==o.left,a=n.top!==o.top;(s||a)&&e(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function Fh(t,e){const n=yt(t),r=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),b.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,e)},[n,e])}function Lu(t,e){const n=yt(e);ut(()=>{let r=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(t),()=>{window.cancelAnimationFrame(r),i.unobserve(t)}}},[t,n])}const jV=AV,FV=kV,VV=TV,HV=_V;var vy=Sh(),Gd=function(){},Vh=$.forwardRef(function(t,e){var n=$.useRef(null),r=$.useState({onScrollCapture:Gd,onWheelCapture:Gd,onTouchMoveCapture:Gd}),i=r[0],o=r[1],s=t.forwardProps,a=t.children,c=t.className,h=t.removeScrollBar,f=t.enabled,d=t.shards,g=t.sideCar,v=t.noIsolation,x=t.inert,w=t.allowPinchZoom,C=t.as,S=C===void 0?"div":C,R=Ks(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=g,E=$h([n,e]),O=exports.__assign(exports.__assign({},R),i);return $.createElement($.Fragment,null,f&&$.createElement(T,{sideCar:vy,removeScrollBar:h,shards:d,noIsolation:v,inert:x,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),s?$.cloneElement($.Children.only(a),exports.__assign(exports.__assign({},O),{ref:E})):$.createElement(S,exports.__assign({},O,{className:c,ref:E}),a))});Vh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vh.classNames={fullWidth:co,zeroRight:lo};var n1=!1;if(typeof window<"u")try{var Dc=Object.defineProperty({},"passive",{get:function(){return n1=!0,!0}});window.addEventListener("test",Dc,Dc),window.removeEventListener("test",Dc,Dc)}catch{n1=!1}var ns=n1?{passive:!1}:!1,PV=function(t){return t.tagName==="TEXTAREA"},by=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!PV(t)&&n[e]==="visible")},WV=function(t){return by(t,"overflowY")},zV=function(t){return by(t,"overflowX")},m5=function(t,e){var n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=wy(t,n);if(r){var i=xy(t,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},UV=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},qV=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},wy=function(t,e){return t==="v"?WV(e):zV(e)},xy=function(t,e){return t==="v"?UV(e):qV(e)},KV=function(t,e){return t==="h"&&e==="rtl"?-1:1},GV=function(t,e,n,r,i){var o=KV(t,window.getComputedStyle(e).direction),s=o*r,a=n.target,c=e.contains(a),h=!1,f=s>0,d=0,g=0;do{var v=xy(t,a),x=v[0],w=v[1],C=v[2],S=w-C-o*x;(x||S)&&wy(t,a)&&(d+=S,g+=x),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&d===0||!f&&g===0)&&(h=!0),h},Ic=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},p5=function(t){return[t.deltaX,t.deltaY]},v5=function(t){return t&&"current"in t?t.current:t},YV=function(t,e){return t[0]===e[0]&&t[1]===e[1]},XV=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},ZV=0,rs=[];function QV(t){var e=$.useRef([]),n=$.useRef([0,0]),r=$.useRef(),i=$.useState(ZV++)[0],o=$.useState(function(){return fl()})[0],s=$.useRef(t);$.useEffect(function(){s.current=t},[t]),$.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var w=Ch([t.lockRef.current],(t.shards||[]).map(v5),!0).filter(Boolean);return w.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=$.useCallback(function(w,C){if("touches"in w&&w.touches.length===2)return!s.current.allowPinchZoom;var S=Ic(w),R=n.current,T="deltaX"in w?w.deltaX:R[0]-S[0],E="deltaY"in w?w.deltaY:R[1]-S[1],O,L=w.target,I=Math.abs(T)>Math.abs(E)?"h":"v";if("touches"in w&&I==="h"&&L.type==="range")return!1;var V=m5(I,L);if(!V)return!0;if(V?O=I:(O=I==="v"?"h":"v",V=m5(I,L)),!V)return!1;if(!r.current&&"changedTouches"in w&&(T||E)&&(r.current=O),!O)return!0;var F=r.current||O;return GV(F,C,w,F==="h"?T:E)},[]),c=$.useCallback(function(w){var C=w;if(!(!rs.length||rs[rs.length-1]!==o)){var S="deltaY"in C?p5(C):Ic(C),R=e.current.filter(function(O){return O.name===C.type&&O.target===C.target&&YV(O.delta,S)})[0];if(R&&R.should){C.cancelable&&C.preventDefault();return}if(!R){var T=(s.current.shards||[]).map(v5).filter(Boolean).filter(function(O){return O.contains(C.target)}),E=T.length>0?a(C,T[0]):!s.current.noIsolation;E&&C.cancelable&&C.preventDefault()}}},[]),h=$.useCallback(function(w,C,S,R){var T={name:w,delta:C,target:S,should:R};e.current.push(T),setTimeout(function(){e.current=e.current.filter(function(E){return E!==T})},1)},[]),f=$.useCallback(function(w){n.current=Ic(w),r.current=void 0},[]),d=$.useCallback(function(w){h(w.type,p5(w),w.target,a(w,t.lockRef.current))},[]),g=$.useCallback(function(w){h(w.type,Ic(w),w.target,a(w,t.lockRef.current))},[]);$.useEffect(function(){return rs.push(o),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:g}),document.addEventListener("wheel",c,ns),document.addEventListener("touchmove",c,ns),document.addEventListener("touchstart",f,ns),function(){rs=rs.filter(function(w){return w!==o}),document.removeEventListener("wheel",c,ns),document.removeEventListener("touchmove",c,ns),document.removeEventListener("touchstart",f,ns)}},[]);var v=t.removeScrollBar,x=t.inert;return $.createElement($.Fragment,null,x?$.createElement(o,{styles:XV(i)}):null,v?$.createElement(kh,{gapMode:"margin"}):null)}const JV=Ah(vy,QV);var yy=$.forwardRef(function(t,e){return $.createElement(Vh,exports.__assign({},t,{ref:e,sideCar:JV}))});yy.classNames=Vh.classNames;var eH=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},is=new WeakMap,_c=new WeakMap,Lc={},Yd=0,Cy=function(t){return t&&(t.host||Cy(t.parentNode))},tH=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=Cy(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},nH=function(t,e,n,r){var i=tH(e,Array.isArray(t)?t:[t]);Lc[n]||(Lc[n]=new WeakMap);var o=Lc[n],s=[],a=new Set,c=new Set(i),h=function(d){!d||a.has(d)||(a.add(d),h(d.parentNode))};i.forEach(h);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(g){if(a.has(g))f(g);else try{var v=g.getAttribute(r),x=v!==null&&v!=="false",w=(is.get(g)||0)+1,C=(o.get(g)||0)+1;is.set(g,w),o.set(g,C),s.push(g),w===1&&x&&_c.set(g,!0),C===1&&g.setAttribute(n,"true"),x||g.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",g,S)}})};return f(e),a.clear(),Yd++,function(){s.forEach(function(d){var g=is.get(d)-1,v=o.get(d)-1;is.set(d,g),o.set(d,v),g||(_c.has(d)||d.removeAttribute(r),_c.delete(d)),v||d.removeAttribute(n)}),Yd--,Yd||(is=new WeakMap,is=new WeakMap,_c=new WeakMap,Lc={})}},rH=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=eH(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),nH(r,i,n,"aria-hidden")):function(){return null}};const $y="Dialog",[Sy,Ay]=bt($y),[iH,rr]=Sy($y),oH=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=t,a=b.useRef(null),c=b.useRef(null),[h=!1,f]=It({prop:r,defaultProp:i,onChange:o});return b.createElement(iH,{scope:e,triggerRef:a,contentRef:c,contentId:_t(),titleId:_t(),descriptionId:_t(),open:h,onOpenChange:f,onOpenToggle:b.useCallback(()=>f(d=>!d),[f]),modal:s},n)},sH="DialogTrigger",aH=b.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=rr(sH,n),o=ye(e,i.triggerRef);return b.createElement(ge.button,z({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":fm(i.open)},r,{ref:o,onClick:ie(t.onClick,i.onOpenToggle)}))}),Ry="DialogPortal",[lH,ky]=Sy(Ry,{forceMount:void 0}),cH=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,o=rr(Ry,e);return b.createElement(lH,{scope:e,forceMount:n},b.Children.map(r,s=>b.createElement(Tt,{present:n||o.open},b.createElement(zs,{asChild:!0,container:i},s))))},r1="DialogOverlay",uH=b.forwardRef((t,e)=>{const n=ky(r1,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=rr(r1,t.__scopeDialog);return o.modal?b.createElement(Tt,{present:r||o.open},b.createElement(hH,z({},i,{ref:e}))):null}),hH=b.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=rr(r1,n);return b.createElement(yy,{as:Cr,allowPinchZoom:!0,shards:[i.contentRef]},b.createElement(ge.div,z({"data-state":fm(i.open)},r,{ref:e,style:{pointerEvents:"auto",...r.style}})))}),Es="DialogContent",fH=b.forwardRef((t,e)=>{const n=ky(Es,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,o=rr(Es,t.__scopeDialog);return b.createElement(Tt,{present:r||o.open},o.modal?b.createElement(dH,z({},i,{ref:e})):b.createElement(gH,z({},i,{ref:e})))}),dH=b.forwardRef((t,e)=>{const n=rr(Es,t.__scopeDialog),r=b.useRef(null),i=ye(e,n.contentRef,r);return b.useEffect(()=>{const o=r.current;if(o)return rH(o)},[]),b.createElement(Ty,z({},t,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ie(t.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:ie(t.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:ie(t.onFocusOutside,o=>o.preventDefault())}))}),gH=b.forwardRef((t,e)=>{const n=rr(Es,t.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return b.createElement(Ty,z({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=t.onCloseAutoFocus)===null||s===void 0||s.call(t,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=t.onInteractOutside)===null||s===void 0||s.call(t,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),Ty=b.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=t,a=rr(Es,n),c=b.useRef(null),h=ye(e,c);return Us(),b.createElement(b.Fragment,null,b.createElement(qs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},b.createElement(ko,z({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":fm(a.open)},s,{ref:h,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),My="DialogTitle",mH=b.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=rr(My,n);return b.createElement(ge.h2,z({id:i.titleId},r,{ref:e}))}),pH="DialogDescription",vH=b.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=rr(pH,n);return b.createElement(ge.p,z({id:i.descriptionId},r,{ref:e}))}),bH="DialogClose",wH=b.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=rr(bH,n);return b.createElement(ge.button,z({type:"button"},r,{ref:e,onClick:ie(t.onClick,()=>i.onOpenChange(!1))}))});function fm(t){return t?"open":"closed"}const xH="DialogTitleWarning",[yH,_ne]=vg(xH,{contentName:Es,titleName:My,docsSlug:"dialog"}),Ey=oH,Oy=aH,Dy=cH,Iy=uH,_y=fH,Ly=mH,CH=vH,dm=wH,$H="AlertDialog",[SH,Lne]=bt($H,[Ay]),si=Ay(),AH=t=>{const{__scopeAlertDialog:e,...n}=t,r=si(e);return b.createElement(Ey,z({},r,n,{modal:!0}))},RH=b.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,i=si(n);return b.createElement(Oy,z({},i,r,{ref:e}))}),kH=t=>{const{__scopeAlertDialog:e,...n}=t,r=si(e);return b.createElement(Dy,z({},r,n))},TH=b.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,i=si(n);return b.createElement(Iy,z({},i,r,{ref:e}))}),By="AlertDialogContent",[MH,EH]=SH(By),OH=b.forwardRef((t,e)=>{const{__scopeAlertDialog:n,children:r,...i}=t,o=si(n),s=b.useRef(null),a=ye(e,s),c=b.useRef(null);return b.createElement(yH,{contentName:By,titleName:DH,docsSlug:"alert-dialog"},b.createElement(MH,{scope:n,cancelRef:c},b.createElement(_y,z({role:"alertdialog"},o,i,{ref:a,onOpenAutoFocus:ie(i.onOpenAutoFocus,h=>{var f;h.preventDefault(),(f=c.current)===null||f===void 0||f.focus({preventScroll:!0})}),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault()}),b.createElement(bg,null,r),!1)))}),DH="AlertDialogTitle",IH=b.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,i=si(n);return b.createElement(Ly,z({},i,r,{ref:e}))}),_H=b.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,i=si(n);return b.createElement(CH,z({},i,r,{ref:e}))}),LH=b.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,i=si(n);return b.createElement(dm,z({},i,r,{ref:e}))}),BH="AlertDialogCancel",NH=b.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,{cancelRef:i}=EH(BH,n),o=si(n),s=ye(e,i);return b.createElement(dm,z({},o,r,{ref:s}))}),jH=AH,FH=RH,VH=kH,HH=TH,PH=OH,WH=LH,zH=NH,UH=IH,qH=_H;var du=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Bu(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Bu(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&t.$$typeof)&&!Bu(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function Ny(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function b5(t,e){const n=Ny(t);return Math.round(e*n)/n}function w5(t){const e=$.useRef(t);return du(()=>{e.current=t}),e}function KH(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:c,open:h}=t,[f,d]=$.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[g,v]=$.useState(r);Bu(g,r)||v(r);const[x,w]=$.useState(null),[C,S]=$.useState(null),R=$.useCallback(te=>{te!==L.current&&(L.current=te,w(te))},[]),T=$.useCallback(te=>{te!==I.current&&(I.current=te,S(te))},[]),E=o||x,O=s||C,L=$.useRef(null),I=$.useRef(null),V=$.useRef(f),F=c!=null,H=w5(c),K=w5(i),W=$.useCallback(()=>{if(!L.current||!I.current)return;const te={placement:e,strategy:n,middleware:g};K.current&&(te.platform=K.current),Rx(L.current,I.current,te).then(ne=>{const Y={...ne,isPositioned:!0};J.current&&!Bu(V.current,Y)&&(V.current=Y,Ro.flushSync(()=>{d(Y)}))})},[g,e,n,K]);du(()=>{h===!1&&V.current.isPositioned&&(V.current.isPositioned=!1,d(te=>({...te,isPositioned:!1})))},[h]);const J=$.useRef(!1);du(()=>(J.current=!0,()=>{J.current=!1}),[]),du(()=>{if(E&&(L.current=E),O&&(I.current=O),E&&O){if(H.current)return H.current(E,O,W);W()}},[E,O,W,H,F]);const G=$.useMemo(()=>({reference:L,floating:I,setReference:R,setFloating:T}),[R,T]),re=$.useMemo(()=>({reference:E,floating:O}),[E,O]),se=$.useMemo(()=>{const te={position:n,left:0,top:0};if(!re.floating)return te;const ne=b5(re.floating,f.x),Y=b5(re.floating,f.y);return a?{...te,transform:"translate("+ne+"px, "+Y+"px)",...Ny(re.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ne,top:Y}},[n,a,re.floating,f.x,f.y]);return $.useMemo(()=>({...f,update:W,refs:G,elements:re,floatingStyles:se}),[f,W,G,re,se])}const GH=(t,e)=>({...$x(t),options:[t,e]}),YH=(t,e)=>({...Sx(t),options:[t,e]}),XH=(t,e)=>({...Ax(t),options:[t,e]}),jy=1024;let ZH=0,Xd=class{constructor(e,n){this.from=e,this.to=n}};class je{constructor(e={}){this.id=ZH++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=dn.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}je.closedBy=new je({deserialize:t=>t.split(" ")});je.openedBy=new je({deserialize:t=>t.split(" ")});je.group=new je({deserialize:t=>t.split(" ")});je.isolate=new je({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});je.contextHash=new je({perNode:!0});je.lookAhead=new je({perNode:!0});je.mounted=new je({perNode:!0});class Nu{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[je.mounted.id]}}const QH=Object.create(null);class dn{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):QH,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new dn(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(je.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(je.group),o=-1;o<(i?i.length:0);o++){let s=n[o<0?r.name:i[o]];if(s)return s}}}}dn.none=new dn("",Object.create(null),0,8);class gm{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let o of e){let s=o(r);s&&(i||(i=Object.assign({},r.props)),i[s[0].id]=s[1])}n.push(i?new dn(r.name,i,r.id,r.flags):r)}return new gm(n)}}const Bc=new WeakMap,x5=new WeakMap;var Ot;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(Ot||(Ot={}));class Ct{constructor(e,n,r,i,o){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,a]of o)this.props[typeof s=="number"?s:s.id]=a}}toString(){let e=Nu.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new o1(this.topNode,e)}cursorAt(e,n=0,r=0){let i=Bc.get(this)||this.topNode,o=new o1(i);return o.moveTo(e,n),Bc.set(this,o._tree),o}get topNode(){return new Fn(this,0,0,null)}resolve(e,n=0){let r=Wa(Bc.get(this)||this.topNode,e,n,!1);return Bc.set(this,r),r}resolveInner(e,n=0){let r=Wa(x5.get(this)||this.topNode,e,n,!0);return x5.set(this,r),r}resolveStack(e,n=0){return tP(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:o=this.length}=e,s=e.mode||0,a=(s&Ot.IncludeAnonymous)>0;for(let c=this.cursor(s|Ot.IncludeAnonymous);;){let h=!1;if(c.from<=o&&c.to>=i&&(!a&&c.type.isAnonymous||n(c)!==!1)){if(c.firstChild())continue;h=!0}for(;h&&r&&(a||!c.type.isAnonymous)&&r(c),!c.nextSibling();){if(!c.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:vm(dn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Ct(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new Ct(dn.none,n,r,i)))}static build(e){return nP(e)}}Ct.empty=new Ct(dn.none,[],[],0);class mm{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new mm(this.buffer,this.index)}}class Di{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return dn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,r==e)return o;let s=[];for(;e<r;)s.push(this.childString(e)),e=this.buffer[e+3];return o+"("+s.join(",")+")"}findChild(e,n,r,i,o){let{buffer:s}=this,a=-1;for(let c=e;c!=n&&!(Fy(o,i,s[c+1],s[c+2])&&(a=c,r>0));c=s[c+3]);return a}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),s=0;for(let a=e,c=0;a<n;){o[c++]=i[a++],o[c++]=i[a++]-r;let h=o[c++]=i[a++]-r;o[c++]=i[a++]-e,s=Math.max(s,h)}return new Di(o,s,this.set)}}function Fy(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Wa(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let s=!r&&t instanceof Fn&&t.index<0?null:t.parent;if(!s)return t;t=s}let o=r?0:Ot.IgnoreOverlays;if(r)for(let s=t,a=s.parent;a;s=a,a=s.parent)s instanceof Fn&&s.index<0&&((i=a.enter(e,n,o))===null||i===void 0?void 0:i.from)!=s.from&&(t=a);for(;;){let s=t.enter(e,n,o);if(!s)return t;t=s}}class Vy{cursor(e=0){return new o1(this,e)}getChild(e,n=null,r=null){let i=y5(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return y5(this,e,n,r)}resolve(e,n=0){return Wa(this,e,n,!1)}resolveInner(e,n=0){return Wa(this,e,n,!0)}matchContext(e){return i1(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class Fn extends Vy{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,o=0){for(let s=this;;){for(let{children:a,positions:c}=s._tree,h=n>0?a.length:-1;e!=h;e+=n){let f=a[e],d=c[e]+s.from;if(Fy(i,r,d,d+f.length)){if(f instanceof Di){if(o&Ot.ExcludeBuffers)continue;let g=f.findChild(0,f.buffer.length,n,r-d,i);if(g>-1)return new Si(new JH(s,f,e,d),null,g)}else if(o&Ot.IncludeAnonymous||!f.type.isAnonymous||pm(f)){let g;if(!(o&Ot.IgnoreMounts)&&(g=Nu.get(f))&&!g.overlay)return new Fn(g.tree,d,e,s);let v=new Fn(f,d,e,s);return o&Ot.IncludeAnonymous||!v.type.isAnonymous?v:v.nextChild(n<0?f.children.length-1:0,n,r,i)}}}if(o&Ot.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&Ot.IgnoreOverlays)&&(i=Nu.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:s,to:a}of i.overlay)if((n>0?s<=o:s<o)&&(n<0?a>=o:a>o))return new Fn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function y5(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let s=!1;!s;)if(s=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function i1(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class JH{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Si extends Vy{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new Si(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&Ot.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new Si(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Si(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Si(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let s=r.buffer[this.index+1];e.push(r.slice(i,o,s)),n.push(0)}return new Ct(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Hy(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;o<t.length;o++){let s=t[o];(s.from>n.from||s.to<n.to)&&(n=s,e=o)}let r=n instanceof Fn&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new eP(i,n)}class eP{constructor(e,n){this.heads=e,this.node=n}get next(){return Hy(this.heads)}}function tP(t,e,n){let r=t.resolveInner(e,n),i=null;for(let o=r instanceof Fn?r:r.context.parent;o;o=o.parent)if(o.index<0){let s=o.parent;(i||(i=[r])).push(s.resolve(e,n)),o=s}else{let s=Nu.get(o.tree);if(s&&s.overlay&&s.overlay[0].from<=e&&s.overlay[s.overlay.length-1].to>=e){let a=new Fn(s.tree,s.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(Wa(a,e,n,!1))}}return i?Hy(i):r}class o1{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Fn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Fn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&Ot.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Ot.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Ot.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let o=n+e,s=e<0?-1:r._tree.children.length;o!=s;o+=e){let a=r._tree.children[o];if(this.mode&Ot.IncludeAnonymous||a instanceof Di||!a.type.isAnonymous||pm(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,o=this.stack.length;o>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;n=s,r=o+1;break e}i=this.stack[--o]}for(let i=r;i<this.stack.length;i++)n=new Si(this.buffer,n,this.stack[i]);return this.bufferNode=new Si(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return i1(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return i1(this._tree,e,i);let s=r[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}}function pm(t){return t.children.some(e=>e instanceof Di||!e.type.isAnonymous||pm(e))}function nP(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=jy,reused:o=[],minRepeatType:s=r.types.length}=t,a=Array.isArray(n)?new mm(n,n.length):n,c=r.types,h=0,f=0;function d(O,L,I,V,F,H){let{id:K,start:W,end:J,size:G}=a,re=f,se=h;for(;G<0;)if(a.next(),G==-1){let me=o[K];I.push(me),V.push(W-O);return}else if(G==-3){h=K;return}else if(G==-4){f=K;return}else throw new RangeError(`Unrecognized record size: ${G}`);let te=c[K],ne,Y,ce=W-O;if(J-W<=i&&(Y=C(a.pos-L,F))){let me=new Uint16Array(Y.size-Y.skip),Ie=a.pos-Y.size,we=me.length;for(;a.pos>Ie;)we=S(Y.start,me,we);ne=new Di(me,J-Y.start,r),ce=Y.start-O}else{let me=a.pos-G;a.next();let Ie=[],we=[],qe=K>=s?K:-1,Te=0,Ve=J;for(;a.pos>me;)qe>=0&&a.id==qe&&a.size>=0?(a.end<=Ve-i&&(x(Ie,we,W,Te,a.end,Ve,qe,re,se),Te=Ie.length,Ve=a.end),a.next()):H>2500?g(W,me,Ie,we):d(W,me,Ie,we,qe,H+1);if(qe>=0&&Te>0&&Te<Ie.length&&x(Ie,we,W,Te,W,Ve,qe,re,se),Ie.reverse(),we.reverse(),qe>-1&&Te>0){let pe=v(te,se);ne=vm(te,Ie,we,0,Ie.length,0,J-W,pe,pe)}else ne=w(te,Ie,we,J-W,re-J,se)}I.push(ne),V.push(ce)}function g(O,L,I,V){let F=[],H=0,K=-1;for(;a.pos>L;){let{id:W,start:J,end:G,size:re}=a;if(re>4)a.next();else{if(K>-1&&J<K)break;K<0&&(K=G-i),F.push(W,J,G),H++,a.next()}}if(H){let W=new Uint16Array(H*4),J=F[F.length-2];for(let G=F.length-3,re=0;G>=0;G-=3)W[re++]=F[G],W[re++]=F[G+1]-J,W[re++]=F[G+2]-J,W[re++]=re;I.push(new Di(W,F[2]-J,r)),V.push(J-O)}}function v(O,L){return(I,V,F)=>{let H=0,K=I.length-1,W,J;if(K>=0&&(W=I[K])instanceof Ct){if(!K&&W.type==O&&W.length==F)return W;(J=W.prop(je.lookAhead))&&(H=V[K]+W.length+J)}return w(O,I,V,F,H,L)}}function x(O,L,I,V,F,H,K,W,J){let G=[],re=[];for(;O.length>V;)G.push(O.pop()),re.push(L.pop()+I-F);O.push(w(r.types[K],G,re,H-F,W-H,J)),L.push(F-I)}function w(O,L,I,V,F,H,K){if(H){let W=[je.contextHash,H];K=K?[W].concat(K):[W]}if(F>25){let W=[je.lookAhead,F];K=K?[W].concat(K):[W]}return new Ct(O,L,I,V,K)}function C(O,L){let I=a.fork(),V=0,F=0,H=0,K=I.end-i,W={size:0,start:0,skip:0};e:for(let J=I.pos-O;I.pos>J;){let G=I.size;if(I.id==L&&G>=0){W.size=V,W.start=F,W.skip=H,H+=4,V+=4,I.next();continue}let re=I.pos-G;if(G<0||re<J||I.start<K)break;let se=I.id>=s?4:0,te=I.start;for(I.next();I.pos>re;){if(I.size<0)if(I.size==-3)se+=4;else break e;else I.id>=s&&(se+=4);I.next()}F=te,V+=G,H+=se}return(L<0||V==O)&&(W.size=V,W.start=F,W.skip=H),W.size>4?W:void 0}function S(O,L,I){let{id:V,start:F,end:H,size:K}=a;if(a.next(),K>=0&&V<s){let W=I;if(K>4){let J=a.pos-(K-4);for(;a.pos>J;)I=S(O,L,I)}L[--I]=W,L[--I]=H-O,L[--I]=F-O,L[--I]=V}else K==-3?h=V:K==-4&&(f=V);return I}let R=[],T=[];for(;a.pos>0;)d(t.start||0,t.bufferStart||0,R,T,-1,0);let E=(e=t.length)!==null&&e!==void 0?e:R.length?T[0]+R[0].length:0;return new Ct(c[t.topID],R.reverse(),T.reverse(),E)}const C5=new WeakMap;function gu(t,e){if(!t.isAnonymous||e instanceof Di||e.type!=t)return 1;let n=C5.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Ct)){n=1;break}n+=gu(t,r)}C5.set(e,n)}return n}function vm(t,e,n,r,i,o,s,a,c){let h=0;for(let x=r;x<i;x++)h+=gu(t,e[x]);let f=Math.ceil(h*1.5/8),d=[],g=[];function v(x,w,C,S,R){for(let T=C;T<S;){let E=T,O=w[T],L=gu(t,x[T]);for(T++;T<S;T++){let I=gu(t,x[T]);if(L+I>=f)break;L+=I}if(T==E+1){if(L>f){let I=x[E];v(I.children,I.positions,0,I.children.length,w[E]+R);continue}d.push(x[E])}else{let I=w[T-1]+x[T-1].length-O;d.push(vm(t,x,w,E,T,O,I,null,c))}g.push(O+R-o)}}return v(e,n,r,i,0),(a||c)(d,g,s)}class fo{constructor(e,n,r,i,o=!1,s=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new fo(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,s=e.length?e[0]:null;for(let a=0,c=0,h=0;;a++){let f=a<n.length?n[a]:null,d=f?f.fromA:1e9;if(d-c>=r)for(;s&&s.from<d;){let g=s;if(c>=g.from||d<=g.to||h){let v=Math.max(g.from,c)-h,x=Math.min(g.to,d)-h;g=v>=x?null:new fo(v,x,g.tree,g.offset+h,a>0,!!f)}if(g&&i.push(g),s.to>d)break;s=o<e.length?e[o++]:null}if(!f)break;c=f.toA,h=f.toA-f.toB}return i}}class Py{startParse(e,n,r){return typeof e=="string"&&(e=new rP(e)),r=r?r.length?r.map(i=>new Xd(i.from,i.to)):[new Xd(0,0)]:[new Xd(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}}class rP{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new je({perNode:!0});class ju{constructor(e,n,r,i,o,s,a,c,h,f=0,d){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=c,this.curContext=h,this.lookAhead=f,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new ju(e,[],n,r,r,0,[],0,i?new $5(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,s=this.reducePos<this.pos-25;s&&this.setLookAhead(this.pos);let a=o.dynamicPrecedence(i);if(a&&(this.score+=a),r==0){this.pushState(o.getGoto(this.state,i,!0),this.reducePos),i<o.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,s?8:4,!0),this.reduceContext(i,this.reducePos);return}let c=this.stack.length-(r-1)*3-(e&262144?6:0),h=c?this.stack[c-2]:this.p.ranges[0].from,f=this.reducePos-h;f>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=f):this.p.lastBigReductionSize<f&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=f));let d=c?this.stack[c-1]:0,g=this.bufferBase+this.buffer.length-d;if(i<o.minRepeatTerm||e&131072){let v=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,h,v,g+4,!0)}if(e&262144)this.state=this.stack[c];else{let v=this.stack[c-3];this.state=o.getGoto(v,i,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(i,h)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,a=this.buffer.length;if(a==0&&s.parent&&(a=s.bufferBase-s.parent.bufferBase,s=s.parent),a>0&&s.buffer[a-4]==0&&s.buffer[a-1]>-1){if(n==r)return;if(s.buffer[a-2]>=n){s.buffer[a-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0){let a=!1;for(let c=s;c>0&&this.buffer[c-2]>r;c-=4)if(this.buffer[c-1]>=0){a=!0;break}if(a)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4)}this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=r,this.buffer[s+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4);else{let o=e,{parser:s}=this.p;(i>this.pos||n<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=s.maxNode&&this.buffer.push(n,r,i,4)}}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new ju(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new iP(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let o=0,s;o<n.length;o+=2)(s=n[o+1])!=this.state&&this.p.parser.hasAction(s,e)&&i.push(n[o],s);if(this.stack.length<120)for(let o=0;i.length<8&&o<n.length;o+=2){let s=n[o+1];i.some((a,c)=>c&1&&a==s)||i.push(n[o],s)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let o=n[i+1];if(o==this.state)continue;let s=this.split();s.pushState(o,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(n[i],this.pos),s.reducePos=this.pos,s.score-=200,r.push(s)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if(!(n&65536))return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,s=>{if(!(s&393216))if(s&65536){let a=(s>>19)-o;if(a>1){let c=s&65535,h=this.stack.length-a*3;if(h>=0&&e.getGoto(this.stack[h],c,!1)>=0)return a<<19|65536|c}}else{let a=r(s,o+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new $5(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class $5{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class iP{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class Fu{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Fu(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Fu(this.stack,this.pos,this.index)}}function Nc(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let o=0;for(;;){let s=t.charCodeAt(r++),a=!1;if(s==126){o=65535;break}s>=92&&s--,s>=34&&s--;let c=s-32;if(c>=46&&(c-=46,a=!0),o+=c,a)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class mu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const S5=new mu;class oP{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=S5,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;o<r.from;){if(!i)return null;let s=this.ranges[--i];o-=r.from-s.to,r=s}for(;n<0?o>r.to:o>=r.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];o+=s.from-r.to,r=s}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(r=o,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let s=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++s];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=S5,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class bs{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;sP(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}bs.prototype.contextual=bs.prototype.fallback=bs.prototype.extend=!1;bs.prototype.fallback=bs.prototype.extend=!1;function sP(t,e,n,r,i,o){let s=0,a=1<<r,{dialect:c}=n.p.parser;e:for(;a&t[s];){let h=t[s+1];for(let v=s+3;v<h;v+=2)if((t[v+1]&a)>0){let x=t[v];if(c.allows(x)&&(e.token.value==-1||e.token.value==x||aP(x,e.token.value,i,o))){e.acceptToken(x);break}}let f=e.next,d=0,g=t[s+2];if(e.next<0&&g>d&&t[h+g*3-3]==65535){s=t[h+g*3-1];continue e}for(;d<g;){let v=d+g>>1,x=h+v+(v<<1),w=t[x],C=t[x+1]||65536;if(f<w)g=v;else if(f>=C)d=v+1;else{s=t[x+2],e.advance();continue e}}break}}function A5(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function aP(t,e,n,r){let i=A5(n,r,e);return i<0||A5(n,r,t)<i}const Cn=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let Zd=null;function R5(t,e,n){let r=t.cursor(Ot.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class lP{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?R5(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?R5(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=r.children[i],s=this.start[n]+r.positions[i];if(s>e)return this.nextStart=s,null;if(o instanceof Ct){if(s==e){if(s<this.safeFrom)return null;let a=s+o.length;if(a<=this.safeTo){let c=o.prop(je.lookAhead);if(!c||a+c<this.fragment.to)return o}}this.index[n]++,s+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+o.length}}}class cP{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new mu)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,s=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,c=0;for(let h=0;h<o.length;h++){if(!(1<<h&s))continue;let f=o[h],d=this.tokens[h];if(!(r&&!f.fallback)&&((f.contextual||d.start!=e.pos||d.mask!=s||d.context!=a)&&(this.updateCachedToken(d,f,e),d.mask=s,d.context=a),d.lookAhead>d.end+25&&(c=Math.max(d.lookAhead,c)),d.value!=0)){let g=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!f.extend&&(r=d,n>g))break}}for(;this.actions.length>n;)this.actions.pop();return c&&e.setLookAhead(c),!r&&e.pos==this.stream.end&&(r=new mu,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new mu,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let s=0;s<o.specialized.length;s++)if(o.specialized[s]==e.value){let a=o.specializers[s](this.stream.read(e.start,e.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){a&1?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;o<i;o+=3)if(this.actions[o]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:o}=e,{parser:s}=e.p,{data:a}=s;for(let c=0;c<2;c++)for(let h=s.stateSlot(o,c?2:1);;h+=3){if(a[h]==65535)if(a[h+1]==1)h=Wr(a,h+2);else{i==0&&a[h+1]==2&&(i=this.putAction(Wr(a,h+2),n,r,i));break}a[h]==n&&(i=this.putAction(Wr(a,h+1),n,r,i))}return i}}class uP{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new oP(n,i),this.tokens=new cP(e,this.stream),this.topTerm=e.top[1];let{from:o}=i[0];this.stacks=[ju.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>e.bufferLength*4?new lP(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<e.length;s++){let a=e[s];for(;;){if(this.tokens.mainToken=null,a.pos>n)r.push(a);else{if(this.advanceStack(a,r,e))continue;{i||(i=[],o=[]),i.push(a);let c=this.tokens.getMainToken(a);o.push(c.value,c.end)}}break}}if(!r.length){let s=i&&fP(i);if(s)return Cn&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw Cn&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(s)return Cn&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(r.length>s)for(r.sort((a,c)=>c.score-a.score);r.length>s;)r.pop();r.some(a=>a.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let s=0;s<r.length-1;s++){let a=r[s];for(let c=s+1;c<r.length;c++){let h=r[c];if(a.sameState(h)||a.buffer.length>500&&h.buffer.length>500)if((a.score-h.score||a.buffer.length-h.buffer.length)>0)r.splice(c--,1);else{r.splice(s--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let s=1;s<r.length;s++)r[s].pos<this.minStackPos&&(this.minStackPos=r[s].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:o}=this,s=Cn?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,f=h?e.curContext.hash:0;for(let d=this.fragments.nodeAt(i);d;){let g=this.parser.nodeSet.types[d.type.id]==d.type?o.getGoto(e.state,d.type.id):-1;if(g>-1&&d.length&&(!h||(d.prop(je.contextHash)||0)==f))return e.useNode(d,g),Cn&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(d.type.id)})`),!0;if(!(d instanceof Ct)||d.children.length==0||d.positions[0]>0)break;let v=d.children[0];if(v instanceof Ct&&d.positions[0]==0)d=v;else break}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),Cn&&console.log(s+this.stackID(e)+` (via always-reduce ${o.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let c=this.tokens.getActions(e);for(let h=0;h<c.length;){let f=c[h++],d=c[h++],g=c[h++],v=h==c.length||!r,x=v?e:e.split(),w=this.tokens.mainToken;if(x.apply(f,d,w?w.start:x.pos,g),Cn&&console.log(s+this.stackID(x)+` (via ${f&65536?`reduce of ${o.getName(f&65535)}`:"shift"} for ${o.getName(d)} @ ${i}${x==e?"":", split"})`),v)return!0;x.pos>i?n.push(x):r.push(x)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return k5(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let s=0;s<e.length;s++){let a=e[s],c=n[s<<1],h=n[(s<<1)+1],f=Cn?this.stackID(a)+" -> ":"";if(a.deadEnd&&(o||(o=!0,a.restart(),Cn&&console.log(f+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let d=a.split(),g=f;for(let v=0;d.forceReduce()&&v<10&&(Cn&&console.log(g+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,r));v++)Cn&&(g=this.stackID(d)+" -> ");for(let v of a.recoverByInsert(c))Cn&&console.log(f+this.stackID(v)+" (via recover-insert)"),this.advanceFully(v,r);this.stream.end>a.pos?(h==a.pos&&(h++,c=0),a.recoverByDelete(c,h),Cn&&console.log(f+this.stackID(a)+` (via recover-delete ${this.parser.getName(c)})`),k5(a,r)):(!i||i.score<a.score)&&(i=a)}return i}stackToTree(e){return e.close(),Ct.build({buffer:Fu.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(Zd||(Zd=new WeakMap)).get(e);return n||Zd.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function k5(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class hP{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}class Vu extends Py{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<e.repeatNodeCount;a++)n.push("");let r=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<n.length;a++)i.push([]);function o(a,c,h){i[a].push([c,c.deserialize(String(h))])}if(e.nodeProps)for(let a of e.nodeProps){let c=a[0];typeof c=="string"&&(c=je[c]);for(let h=1;h<a.length;){let f=a[h++];if(f>=0)o(f,c,a[h++]);else{let d=a[h+-f];for(let g=-f;g>0;g--)o(a[h++],c,d);h++}}}this.nodeSet=new gm(n.map((a,c)=>dn.define({name:c>=this.minRepeatTerm?void 0:a,id:c,props:i[c],top:r.indexOf(c)>-1,error:c==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(c)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=jy;let s=Nc(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(T5),this.states=Nc(e.states,Uint32Array),this.data=Nc(e.stateData),this.goto=Nc(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new bs(s,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new uP(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let s=i[o++],a=s&1,c=i[o++];if(a&&r)return c;for(let h=o+(s>>1);o<h;o++)if(i[o]==e)return c;if(a)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let o=this.stateSlot(e,i?2:1),s;;o+=3){if((s=r[o])==65535)if(r[o+1]==1)s=r[o=Wr(r,o+2)];else{if(r[o+1]==2)return Wr(r,o+2);break}if(s==n||s==0)return Wr(r,o+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=Wr(this.data,o+2);else break;i=n(Wr(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Wr(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((o,s)=>s&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(Vu.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(a=>a.from==r.external);if(!o)return r;let s=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=T5(s),s})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let s=n.indexOf(o);s>=0&&(r[s]=!0)}let i=null;for(let o=0;o<n.length;o++)if(!r[o])for(let s=this.dialects[n[o]],a;(a=this.data[s++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new hP(e,r,i)}static deserialize(e){return new Vu(e)}}function Wr(t,e){return t[e]|t[e+1]<<16}function fP(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function T5(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}let dP=0,zr=class s1{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=dP++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof s1&&(n=e),n?.base)throw new Error("Can not derive from a modified tag");let i=new s1(r,[],null,[]);if(i.set.push(i),n)for(let o of n.set)i.set.push(o);return i}static defineModifier(e){let n=new Hu(e);return r=>r.modified.indexOf(n)>-1?r:Hu.get(r.base||r,r.modified.concat(n).sort((i,o)=>i.id-o.id))}},gP=0;class Hu{constructor(e){this.name=e,this.instances=[],this.id=gP++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&mP(n,a.modified));if(r)return r;let i=[],o=new zr(e.name,i,e,n);for(let a of n)a.instances.push(o);let s=pP(n);for(let a of e.set)if(!a.modified.length)for(let c of s)i.push(Hu.get(a,c));return o}}function mP(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function pP(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function Wy(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],s=2,a=i;for(let d=0;;){if(a=="..."&&d>0&&d+3==i.length){s=1;break}let g=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!g)throw new RangeError("Invalid path: "+i);if(o.push(g[0]=="*"?"":g[0][0]=='"'?JSON.parse(g[0]):g[0]),d+=g[0].length,d==i.length)break;let v=i[d++];if(d==i.length&&v=="!"){s=0;break}if(v!="/")throw new RangeError("Invalid path: "+i);a=i.slice(d)}let c=o.length-1,h=o[c];if(!h)throw new RangeError("Invalid path: "+i);let f=new Pu(r,s,c>0?o.slice(0,c):null);e[h]=f.sort(e[h])}}return zy.add(e)}const zy=new je;class Pu{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Pu.empty=new Pu([],2,null);function Uy(t,e){let n=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))n[o.tag.id]=o.class;else for(let s of o.tag)n[s.id]=o.class;let{scope:r,all:i=null}=e||{};return{style:o=>{let s=i;for(let a of o)for(let c of a.set){let h=n[c.id];if(h){s=s?s+" "+h:h;break}}return s},scope:r}}function vP(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function bP(t,e,n,r=0,i=t.length){let o=new wP(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class wP{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:s,from:a,to:c}=e;if(a>=r||c<=n)return;s.isTop&&(o=this.highlighters.filter(v=>!v.scope||v.scope(s)));let h=i,f=xP(e)||Pu.empty,d=vP(o,f.tags);if(d&&(h&&(h+=" "),h+=d,f.mode==1&&(i+=(i?" ":"")+d)),this.startSpan(Math.max(n,a),h),f.opaque)return;let g=e.tree&&e.tree.prop(je.mounted);if(g&&g.overlay){let v=e.node.enter(g.overlay[0].from+a,1),x=this.highlighters.filter(C=>!C.scope||C.scope(g.tree.type)),w=e.firstChild();for(let C=0,S=a;;C++){let R=C<g.overlay.length?g.overlay[C]:null,T=R?R.from+a:c,E=Math.max(n,S),O=Math.min(r,T);if(E<O&&w)for(;e.from<O&&(this.highlightRange(e,E,O,i,o),this.startSpan(Math.min(O,e.to),h),!(e.to>=T||!e.nextSibling())););if(!R||T>r)break;S=R.to+a,S>n&&(this.highlightRange(v.cursor(),Math.max(n,R.from+a),Math.min(r,S),"",x),this.startSpan(Math.min(r,S),h))}w&&e.parent()}else if(e.firstChild()){g&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),h)}while(e.nextSibling());e.parent()}}}function xP(t){let e=t.type.prop(zy);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const oe=zr.define,jc=oe(),yi=oe(),M5=oe(yi),E5=oe(yi),Ci=oe(),Fc=oe(Ci),Qd=oe(Ci),fr=oe(),to=oe(fr),cr=oe(),ur=oe(),a1=oe(),ba=oe(a1),Vc=oe(),U={comment:jc,lineComment:oe(jc),blockComment:oe(jc),docComment:oe(jc),name:yi,variableName:oe(yi),typeName:M5,tagName:oe(M5),propertyName:E5,attributeName:oe(E5),className:oe(yi),labelName:oe(yi),namespace:oe(yi),macroName:oe(yi),literal:Ci,string:Fc,docString:oe(Fc),character:oe(Fc),attributeValue:oe(Fc),number:Qd,integer:oe(Qd),float:oe(Qd),bool:oe(Ci),regexp:oe(Ci),escape:oe(Ci),color:oe(Ci),url:oe(Ci),keyword:cr,self:oe(cr),null:oe(cr),atom:oe(cr),unit:oe(cr),modifier:oe(cr),operatorKeyword:oe(cr),controlKeyword:oe(cr),definitionKeyword:oe(cr),moduleKeyword:oe(cr),operator:ur,derefOperator:oe(ur),arithmeticOperator:oe(ur),logicOperator:oe(ur),bitwiseOperator:oe(ur),compareOperator:oe(ur),updateOperator:oe(ur),definitionOperator:oe(ur),typeOperator:oe(ur),controlOperator:oe(ur),punctuation:a1,separator:oe(a1),bracket:ba,angleBracket:oe(ba),squareBracket:oe(ba),paren:oe(ba),brace:oe(ba),content:fr,heading:to,heading1:oe(to),heading2:oe(to),heading3:oe(to),heading4:oe(to),heading5:oe(to),heading6:oe(to),contentSeparator:oe(fr),list:oe(fr),quote:oe(fr),emphasis:oe(fr),strong:oe(fr),link:oe(fr),monospace:oe(fr),strikethrough:oe(fr),inserted:oe(),deleted:oe(),changed:oe(),invalid:oe(),meta:Vc,documentMeta:oe(Vc),annotation:oe(Vc),processingInstruction:oe(Vc),definition:zr.defineModifier("definition"),constant:zr.defineModifier("constant"),function:zr.defineModifier("function"),standard:zr.defineModifier("standard"),local:zr.defineModifier("local"),special:zr.defineModifier("special")};for(let t in U){let e=U[t];e instanceof zr&&(e.name=t)}Uy([{tag:U.link,class:"tok-link"},{tag:U.heading,class:"tok-heading"},{tag:U.emphasis,class:"tok-emphasis"},{tag:U.strong,class:"tok-strong"},{tag:U.keyword,class:"tok-keyword"},{tag:U.atom,class:"tok-atom"},{tag:U.bool,class:"tok-bool"},{tag:U.url,class:"tok-url"},{tag:U.labelName,class:"tok-labelName"},{tag:U.inserted,class:"tok-inserted"},{tag:U.deleted,class:"tok-deleted"},{tag:U.literal,class:"tok-literal"},{tag:U.string,class:"tok-string"},{tag:U.number,class:"tok-number"},{tag:[U.regexp,U.escape,U.special(U.string)],class:"tok-string2"},{tag:U.variableName,class:"tok-variableName"},{tag:U.local(U.variableName),class:"tok-variableName tok-local"},{tag:U.definition(U.variableName),class:"tok-variableName tok-definition"},{tag:U.special(U.variableName),class:"tok-variableName2"},{tag:U.definition(U.propertyName),class:"tok-propertyName tok-definition"},{tag:U.typeName,class:"tok-typeName"},{tag:U.namespace,class:"tok-namespace"},{tag:U.className,class:"tok-className"},{tag:U.macroName,class:"tok-macroName"},{tag:U.propertyName,class:"tok-propertyName"},{tag:U.operator,class:"tok-operator"},{tag:U.comment,class:"tok-comment"},{tag:U.meta,class:"tok-meta"},{tag:U.invalid,class:"tok-invalid"},{tag:U.punctuation,class:"tok-punctuation"}]);const yP=Wy({String:U.string,Number:U.number,"True False":U.bool,PropertyName:U.propertyName,Null:U.null,", :":U.separator,"[ ]":U.squareBracket,"{ }":U.brace}),CP=Vu.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[yP],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});let l1=[],qy=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?qy:l1).push(n=n+t[e])})();function $P(t){if(t<768)return!1;for(let e=0,n=l1.length;;){let r=e+n>>1;if(t<l1[r])n=r;else if(t>=qy[r])e=r+1;else return!0;if(e==n)return!1}}function O5(t){return t>=127462&&t<=127487}const D5=8205;function SP(t,e,n=!0,r=!0){return(n?Ky:AP)(t,e,r)}function Ky(t,e,n){if(e==t.length)return e;e&&Gy(t.charCodeAt(e))&&Yy(t.charCodeAt(e-1))&&e--;let r=Jd(t,e);for(e+=I5(r);e<t.length;){let i=Jd(t,e);if(r==D5||i==D5||n&&$P(i))e+=I5(i),r=i;else if(O5(i)){let o=0,s=e-2;for(;s>=0&&O5(Jd(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function AP(t,e,n){for(;e>0;){let r=Ky(t,e-2,n);if(r<e)return r;e--}return 0}function Jd(t,e){let n=t.charCodeAt(e);if(!Yy(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return Gy(r)?(n-55296<<10)+(r-56320)+65536:n}function Gy(t){return t>=56320&&t<57344}function Yy(t){return t>=55296&&t<56320}function I5(t){return t<65536?1:2}class Ge{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=Os(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),dr.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Os(this,e,n);let r=[];return this.decompose(e,n,r,0),dr.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Oa(this),o=new Oa(e);for(let s=n,a=n;;){if(i.next(s),o.next(s),s=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(a+=i.value.length,i.done||a>=r)return!0}}iter(e=1){return new Oa(this,e)}iterRange(e,n=this.length){return new Xy(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new Zy(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ge.empty:e.length<=32?new mt(e):dr.from(mt.split(e,[]))}}class mt extends Ge{constructor(e,n=RP(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.text[o],a=i+s.length;if((n?r:a)>=e)return new kP(i,a,r,s);i=a+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new mt(_5(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let s=r.pop(),a=pu(o.text,s.text.slice(),0,o.length);if(a.length<=32)r.push(new mt(a,s.length+o.length));else{let c=a.length>>1;r.push(new mt(a.slice(0,c)),new mt(a.slice(c)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof mt))return super.replace(e,n,r);[e,n]=Os(this,e,n);let i=pu(this.text,pu(r.text,_5(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new mt(i,o):dr.from(mt.split(i,[]),o)}sliceString(e,n=this.length,r=`
`){[e,n]=Os(this,e,n);let i="";for(let o=0,s=0;o<=n&&s<this.text.length;s++){let a=this.text[s],c=o+a.length;o>e&&s&&(i+=r),e<c&&n>o&&(i+=a.slice(Math.max(0,e-o),n-o)),o=c+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new mt(r,i)),r=[],i=-1);return i>-1&&n.push(new mt(r,i)),n}}class dr extends Ge{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.children[o],a=i+s.length,c=r+s.lines-1;if((n?c:a)>=e)return s.lineInner(e,n,r,i);i=a+1,r=c+1}}decompose(e,n,r,i){for(let o=0,s=0;s<=n&&o<this.children.length;o++){let a=this.children[o],c=s+a.length;if(e<=c&&n>=s){let h=i&((s<=e?1:0)|(c>=n?2:0));s>=e&&c<=n&&!h?r.push(a):a.decompose(e-s,n-s,r,h)}s=c+1}}replace(e,n,r){if([e,n]=Os(this,e,n),r.lines<this.lines)for(let i=0,o=0;i<this.children.length;i++){let s=this.children[i],a=o+s.length;if(e>=o&&n<=a){let c=s.replace(e-o,n-o,r),h=this.lines-s.lines+c.lines;if(c.lines<h>>4&&c.lines>h>>6){let f=this.children.slice();return f[i]=c,new dr(f,this.length-(n-e)+r.length)}return super.replace(o,a,c)}o=a+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
`){[e,n]=Os(this,e,n);let i="";for(let o=0,s=0;o<this.children.length&&s<=n;o++){let a=this.children[o],c=s+a.length;s>e&&o&&(i+=r),e<c&&n>s&&(i+=a.sliceString(e-s,n-s,r)),s=c+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof dr))return 0;let r=0,[i,o,s,a]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==s||o==a)return r;let c=this.children[i],h=e.children[o];if(c!=h)return r+c.scanIdentical(h,n);r+=c.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let v of e)r+=v.lines;if(r<32){let v=[];for(let x of e)x.flatten(v);return new mt(v,n)}let i=Math.max(32,r>>5),o=i<<1,s=i>>1,a=[],c=0,h=-1,f=[];function d(v){let x;if(v.lines>o&&v instanceof dr)for(let w of v.children)d(w);else v.lines>s&&(c>s||!c)?(g(),a.push(v)):v instanceof mt&&c&&(x=f[f.length-1])instanceof mt&&v.lines+x.lines<=32?(c+=v.lines,h+=v.length+1,f[f.length-1]=new mt(x.text.concat(v.text),x.length+1+v.length)):(c+v.lines>i&&g(),c+=v.lines,h+=v.length+1,f.push(v))}function g(){c!=0&&(a.push(f.length==1?f[0]:dr.from(f,h)),h=-1,c=f.length=0)}for(let v of e)d(v);return g(),a.length==1?a[0]:new dr(a,n)}}Ge.empty=new mt([""],0);function RP(t){let e=-1;for(let n of t)e+=n.length+1;return e}function pu(t,e,n=0,r=1e9){for(let i=0,o=0,s=!0;o<t.length&&i<=r;o++){let a=t[o],c=i+a.length;c>=n&&(c>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),s?(e[e.length-1]+=a,s=!1):e.push(a)),i=c+1}return e}function _5(t,e,n){return pu(t,[""],e,n)}class Oa{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof mt?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],s=o>>1,a=i instanceof mt?i.text.length:i.children.length;if(s==(n>0?a:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
`,this;e--}else if(i instanceof mt){let c=i.text[s+(n<0?-1:0)];if(this.offsets[r]+=n,c.length>Math.max(0,e))return this.value=e==0?c:n>0?c.slice(e):c.slice(0,c.length-e),this;e-=c.length}else{let c=i.children[s+(n<0?-1:0)];e>c.length?(e-=c.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(c),this.offsets.push(n>0?1:(c instanceof mt?c.text.length:c.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Xy{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Oa(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Zy{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ge.prototype[Symbol.iterator]=function(){return this.iter()},Oa.prototype[Symbol.iterator]=Xy.prototype[Symbol.iterator]=Zy.prototype[Symbol.iterator]=function(){return this});class kP{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}function Os(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Ht(t,e,n=!0,r=!0){return SP(t,e,n,r)}function TP(t){return t>=56320&&t<57344}function MP(t){return t>=55296&&t<56320}function ln(t,e){let n=t.charCodeAt(e);if(!MP(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return TP(r)?(n-55296<<10)+(r-56320)+65536:n}function bm(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function gr(t){return t<65536?1:2}const c1=/\r\n?|\n/;var Jt=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Jt||(Jt={}));class xr{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let o=this.sections[n++],s=this.sections[n++];s<0?(e(r,i,o),i+=o):i+=s,r+=o}}iterChangedRanges(e,n=!1){u1(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new xr(e)}composeDesc(e){return this.empty?e:e.empty?this:Qy(this,e)}mapDesc(e,n=!1){return e.empty?this:h1(this,e,n)}mapPos(e,n=-1,r=Jt.Simple){let i=0,o=0;for(let s=0;s<this.sections.length;){let a=this.sections[s++],c=this.sections[s++],h=i+a;if(c<0){if(h>e)return o+(e-i);o+=a}else{if(r!=Jt.Simple&&h>=e&&(r==Jt.TrackDel&&i<e&&h>e||r==Jt.TrackBefore&&i<e||r==Jt.TrackAfter&&h>e))return null;if(h>e||h==e&&n<0&&!a)return e==i||n<0?o:o+c;o+=c}i=h}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let o=this.sections[r++],s=this.sections[r++],a=i+o;if(s>=0&&i<=n&&a>=e)return i<e&&a>n?"cover":!0;i=a}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new xr(e)}static create(e){return new xr(e)}}class Rt extends xr{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return u1(this,(n,r,i,o,s)=>e=e.replace(i,i+(r-n),s),!1),e}mapDesc(e,n=!1){return h1(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i<n.length;i+=2){let s=n[i],a=n[i+1];if(a>=0){n[i]=a,n[i+1]=s;let c=i>>1;for(;r.length<c;)r.push(Ge.empty);r.push(s?e.slice(o,o+s):Ge.empty)}o+=s}return new Rt(n,r)}compose(e){return this.empty?e:e.empty?this:Qy(this,e,!0)}map(e,n=!1){return e.empty?this:h1(this,e,n,!0)}iterChanges(e,n=!1){u1(this,e,n)}get desc(){return xr.create(this.sections)}filter(e){let n=[],r=[],i=[],o=new za(this);e:for(let s=0,a=0;;){let c=s==e.length?1e9:e[s++];for(;a<c||a==c&&o.len==0;){if(o.done)break e;let f=Math.min(o.len,c-a);Ut(i,f,-1);let d=o.ins==-1?-1:o.off==0?o.ins:0;Ut(n,f,d),d>0&&Ai(r,n,o.text),o.forward(f),a+=f}let h=e[s++];for(;a<h;){if(o.done)break e;let f=Math.min(o.len,h-a);Ut(n,f,-1),Ut(i,f,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(f),a+=f}}return{changes:new Rt(n,r),filtered:xr.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],s=0,a=null;function c(f=!1){if(!f&&!i.length)return;s<n&&Ut(i,n-s,-1);let d=new Rt(i,o);a=a?a.compose(d.map(a)):d,i=[],o=[],s=0}function h(f){if(Array.isArray(f))for(let d of f)h(d);else if(f instanceof Rt){if(f.length!=n)throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${n})`);c(),a=a?a.compose(f.map(a)):f}else{let{from:d,to:g=d,insert:v}=f;if(d>g||d<0||g>n)throw new RangeError(`Invalid change range ${d} to ${g} (in doc of length ${n})`);let x=v?typeof v=="string"?Ge.of(v.split(r||c1)):v:Ge.empty,w=x.length;if(d==g&&w==0)return;d<s&&c(),d>s&&Ut(i,d-s,-1),Ut(i,g-d,w),Ai(o,i,x),s=g}}return h(e),c(!a),a}static empty(e){return new Rt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i];if(typeof o=="number")n.push(o,-1);else{if(!Array.isArray(o)||typeof o[0]!="number"||o.some((s,a)=>a&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length<i;)r.push(Ge.empty);r[i]=Ge.of(o.slice(1)),n.push(o[0],r[i].length)}}}return new Rt(n,r)}static createSet(e,n){return new Rt(e,n)}}function Ut(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Ai(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(Ge.empty);t.push(n)}}function u1(t,e,n){let r=t.inserted;for(let i=0,o=0,s=0;s<t.sections.length;){let a=t.sections[s++],c=t.sections[s++];if(c<0)i+=a,o+=a;else{let h=i,f=o,d=Ge.empty;for(;h+=a,f+=c,c&&r&&(d=d.append(r[s-2>>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],c=t.sections[s++];e(i,h,o,f,d),i=h,o=f}}}function h1(t,e,n,r=!1){let i=[],o=r?[]:null,s=new za(t),a=new za(e);for(let c=-1;;){if(s.done&&a.len||a.done&&s.len)throw new Error("Mismatched change set lengths");if(s.ins==-1&&a.ins==-1){let h=Math.min(s.len,a.len);Ut(i,h,-1),s.forward(h),a.forward(h)}else if(a.ins>=0&&(s.ins<0||c==s.i||s.off==0&&(a.len<s.len||a.len==s.len&&!n))){let h=a.len;for(Ut(i,a.ins,-1);h;){let f=Math.min(s.len,h);s.ins>=0&&c<s.i&&s.len<=f&&(Ut(i,0,s.ins),o&&Ai(o,i,s.text),c=s.i),s.forward(f),h-=f}a.next()}else if(s.ins>=0){let h=0,f=s.len;for(;f;)if(a.ins==-1){let d=Math.min(f,a.len);h+=d,f-=d,a.forward(d)}else if(a.ins==0&&a.len<f)f-=a.len,a.next();else break;Ut(i,h,c<s.i?s.ins:0),o&&c<s.i&&Ai(o,i,s.text),c=s.i,s.forward(s.len-f)}else{if(s.done&&a.done)return o?Rt.createSet(i,o):xr.create(i);throw new Error("Mismatched change set lengths")}}}function Qy(t,e,n=!1){let r=[],i=n?[]:null,o=new za(t),s=new za(e);for(let a=!1;;){if(o.done&&s.done)return i?Rt.createSet(r,i):xr.create(r);if(o.ins==0)Ut(r,o.len,0,a),o.next();else if(s.len==0&&!s.done)Ut(r,0,s.ins,a),i&&Ai(i,r,s.text),s.next();else{if(o.done||s.done)throw new Error("Mismatched change set lengths");{let c=Math.min(o.len2,s.len),h=r.length;if(o.ins==-1){let f=s.ins==-1?-1:s.off?0:s.ins;Ut(r,c,f,a),i&&f&&Ai(i,r,s.text)}else s.ins==-1?(Ut(r,o.off?0:o.len,c,a),i&&Ai(i,r,o.textBit(c))):(Ut(r,o.off?0:o.len,s.off?0:s.ins,a),i&&!s.off&&Ai(i,r,s.text));a=(o.ins>c||s.ins>=0&&s.len>c)&&(a||r.length>h),o.forward2(c),s.forward(c)}}}}class za{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?Ge.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Ge.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class so{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new so(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return Q.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return Q.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Q.range(e.anchor,e.head)}static create(e,n,r){return new so(e,n,r)}}class Q{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:Q.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Q([this.main],0)}addRange(e,n=!0){return Q.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,Q.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Q(e.ranges.map(n=>so.fromJSON(n)),e.main)}static single(e,n=e){return new Q([Q.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let o=e[i];if(o.empty?o.from<=r:o.from<r)return Q.normalized(e.slice(),n);r=o.to}return new Q(e,n)}static cursor(e,n=0,r,i){return so.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i){let o=(r??16777215)<<6|(i==null?7:Math.min(6,i));return n<e?so.create(n,e,48|o):so.create(e,n,(n>e?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let o=e[i],s=e[i-1];if(o.empty?o.from<=s.to:o.from<s.to){let a=s.from,c=Math.max(o.to,s.to);i<=n&&n--,e.splice(--i,2,o.anchor>o.head?Q.range(c,a):Q.range(a,c))}}return new Q(e,n)}}function Jy(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let wm=0;class fe{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=wm++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new fe(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:xm),!!e.static,e.enables)}of(e){return new vu([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new vu(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new vu(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function xm(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class vu{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=wm++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,s=e[o]>>1,a=this.type==2,c=!1,h=!1,f=[];for(let d of this.dependencies)d=="doc"?c=!0:d=="selection"?h=!0:((n=e[d.id])!==null&&n!==void 0?n:1)&1||f.push(e[d.id]);return{create(d){return d.values[s]=r(d),1},update(d,g){if(c&&g.docChanged||h&&(g.docChanged||g.selection)||f1(d,f)){let v=r(d);if(a?!L5(v,d.values[s],i):!i(v,d.values[s]))return d.values[s]=v,1}return 0},reconfigure:(d,g)=>{let v,x=g.config.address[o];if(x!=null){let w=zu(g,x);if(this.dependencies.every(C=>C instanceof fe?g.facet(C)===d.facet(C):C instanceof Lt?g.field(C,!1)==d.field(C,!1):!0)||(a?L5(v=r(d),w,i):i(v=r(d),w)))return d.values[s]=w,0}else v=r(d);return d.values[s]=v,1}}}}function L5(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function f1(t,e){let n=!1;for(let r of e)Da(t,r)&1&&(n=!0);return n}function EP(t,e,n){let r=n.map(c=>t[c.id]),i=n.map(c=>c.type),o=r.filter(c=>!(c&1)),s=t[e.id]>>1;function a(c){let h=[];for(let f=0;f<r.length;f++){let d=zu(c,r[f]);if(i[f]==2)for(let g of d)h.push(g);else h.push(d)}return e.combine(h)}return{create(c){for(let h of r)Da(c,h);return c.values[s]=a(c),1},update(c,h){if(!f1(c,o))return 0;let f=a(c);return e.compare(f,c.values[s])?0:(c.values[s]=f,1)},reconfigure(c,h){let f=f1(c,r),d=h.config.facets[e.id],g=h.facet(e);if(d&&!f&&xm(n,d))return c.values[s]=g,0;let v=a(c);return e.compare(v,g)?(c.values[s]=g,0):(c.values[s]=v,1)}}}const Hc=fe.define({static:!0});class Lt{constructor(e,n,r,i,o){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=o,this.provides=void 0}static define(e){let n=new Lt(wm++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Hc).find(r=>r.field==this);return(n?.create||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],s=this.updateF(o,i);return this.compareF(o,s)?0:(r.values[n]=s,1)},reconfigure:(r,i)=>{let o=r.facet(Hc),s=i.facet(Hc),a;return(a=o.find(c=>c.field==this))&&a!=s.find(c=>c.field==this)?(r.values[n]=a.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,Hc.of({field:this,create:e})]}get extension(){return this}}const ro={lowest:4,low:3,default:2,high:1,highest:0};function wa(t){return e=>new e6(e,t)}const Oo={highest:wa(ro.highest),high:wa(ro.high),default:wa(ro.default),low:wa(ro.low),lowest:wa(ro.lowest)};class e6{constructor(e,n){this.inner=e,this.prec=n}}class Hh{of(e){return new d1(this,e)}reconfigure(e){return Hh.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class d1{constructor(e,n){this.compartment=e,this.inner=n}}class Wu{constructor(e,n,r,i,o,s){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],o=Object.create(null),s=new Map;for(let g of OP(e,n,s))g instanceof Lt?i.push(g):(o[g.facet.id]||(o[g.facet.id]=[])).push(g);let a=Object.create(null),c=[],h=[];for(let g of i)a[g.id]=h.length<<1,h.push(v=>g.slot(v));let f=r?.config.facets;for(let g in o){let v=o[g],x=v[0].facet,w=f&&f[g]||[];if(v.every(C=>C.type==0))if(a[x.id]=c.length<<1|1,xm(w,v))c.push(r.facet(x));else{let C=x.combine(v.map(S=>S.value));c.push(r&&x.compare(C,r.facet(x))?r.facet(x):C)}else{for(let C of v)C.type==0?(a[C.id]=c.length<<1|1,c.push(C.value)):(a[C.id]=h.length<<1,h.push(S=>C.dynamicSlot(S)));a[x.id]=h.length<<1,h.push(C=>EP(C,x,v))}}let d=h.map(g=>g(a));return new Wu(e,s,d,a,c,o)}}function OP(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(s,a){let c=i.get(s);if(c!=null){if(c<=a)return;let h=r[c].indexOf(s);h>-1&&r[c].splice(h,1),s instanceof d1&&n.delete(s.compartment)}if(i.set(s,a),Array.isArray(s))for(let h of s)o(h,a);else if(s instanceof d1){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(s.compartment)||s.inner;n.set(s.compartment,h),o(h,a)}else if(s instanceof e6)o(s.inner,s.prec);else if(s instanceof Lt)r[a].push(s),s.provides&&o(s.provides,a);else if(s instanceof vu)r[a].push(s),s.facet.extensions&&o(s.facet.extensions,ro.default);else{let h=s.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(h,a)}}return o(t,ro.default),r.reduce((s,a)=>s.concat(a))}function Da(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function zu(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const t6=fe.define(),g1=fe.define({combine:t=>t.some(e=>e),static:!0}),n6=fe.define({combine:t=>t.length?t[0]:void 0,static:!0}),r6=fe.define(),i6=fe.define(),o6=fe.define(),s6=fe.define({combine:t=>t.length?t[0]:!1});class Tr{constructor(e,n){this.type=e,this.value=n}static define(){return new DP}}class DP{of(e){return new Tr(this,e)}}class IP{constructor(e){this.map=e}of(e){return new Ee(this,e)}}class Ee{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Ee(this.type,n)}is(e){return this.type==e}static define(e={}){return new IP(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}Ee.reconfigure=Ee.define();Ee.appendConfig=Ee.define();class kt{constructor(e,n,r,i,o,s){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,r&&Jy(r,n.newLength),o.some(a=>a.type==kt.time)||(this.annotations=o.concat(kt.time.of(Date.now())))}static create(e,n,r,i,o,s){return new kt(e,n,r,i,o,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(kt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}kt.time=Tr.define();kt.userEvent=Tr.define();kt.addToHistory=Tr.define();kt.remote=Tr.define();function _P(t,e){let n=[];for(let r=0,i=0;;){let o,s;if(r<t.length&&(i==e.length||e[i]>=t[r]))o=t[r++],s=t[r++];else if(i<e.length)o=e[i++],s=e[i++];else return n;!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function a6(t,e,n){var r;let i,o,s;return n?(i=e.changes,o=Rt.empty(e.changes.length),s=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(i)),{changes:s,selection:e.selection?e.selection.map(o):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:Ee.mapEffects(t.effects,i).concat(Ee.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function m1(t,e,n){let r=e.selection,i=ws(e.annotations);return e.userEvent&&(i=i.concat(kt.userEvent.of(e.userEvent))),{changes:e.changes instanceof Rt?e.changes:Rt.of(e.changes||[],n,t.facet(n6)),selection:r&&(r instanceof Q?r:Q.single(r.anchor,r.head)),effects:ws(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function l6(t,e,n){let r=m1(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let o=1;o<e.length;o++){e[o].filter===!1&&(n=!1);let s=!!e[o].sequential;r=a6(r,m1(t,e[o],s?r.changes.newLength:t.doc.length),s)}let i=kt.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return BP(n?LP(i):i)}function LP(t){let e=t.startState,n=!0;for(let i of e.facet(r6)){let o=i(t);if(o===!1){n=!1;break}Array.isArray(o)&&(n=n===!0?o:_P(n,o))}if(n!==!0){let i,o;if(n===!1)o=t.changes.invertedDesc,i=Rt.empty(e.doc.length);else{let s=t.changes.filter(n);i=s.changes,o=s.filtered.mapDesc(s.changes).invertedDesc}t=kt.create(e,i,t.selection&&t.selection.map(o),Ee.mapEffects(t.effects,o),t.annotations,t.scrollIntoView)}let r=e.facet(i6);for(let i=r.length-1;i>=0;i--){let o=r[i](t);o instanceof kt?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof kt?t=o[0]:t=l6(e,ws(o),!1)}return t}function BP(t){let e=t.startState,n=e.facet(o6),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=a6(r,m1(e,o,t.changes.newLength),!0))}return r==t?t:kt.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const NP=[];function ws(t){return t==null?NP:Array.isArray(t)?t:[t]}var lt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(lt||(lt={}));const jP=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let p1;try{p1=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function FP(t){if(p1)return p1.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||jP.test(n)))return!0}return!1}function VP(t){return e=>{if(!/\S/.test(e))return lt.Space;if(FP(e))return lt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return lt.Word;return lt.Other}}class Ue{constructor(e,n,r,i,o,s){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)Da(this,a<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return Da(this,r),zu(this,r)}update(...e){return l6(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let a of e.effects)a.is(Hh.reconfigure)?(n&&(i=new Map,n.compartments.forEach((c,h)=>i.set(h,c)),n=null),i.set(a.value.compartment,a.value.extension)):a.is(Ee.reconfigure)?(n=null,r=a.value):a.is(Ee.appendConfig)&&(n=null,r=ws(r).concat(a.value));let o;n?o=e.startState.values.slice():(n=Wu.resolve(r,i,this),o=new Ue(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(c,h)=>h.reconfigure(c,this),null).values);let s=e.startState.facet(g1)?e.newSelection:e.newSelection.asSingle();new Ue(n,e.newDoc,s,o,(a,c)=>c.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:Q.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],s=ws(r.effects);for(let a=1;a<n.ranges.length;a++){let c=e(n.ranges[a]),h=this.changes(c.changes),f=h.map(i);for(let g=0;g<a;g++)o[g]=o[g].map(f);let d=i.mapDesc(h,!0);o.push(c.range.map(d)),i=i.compose(f),s=Ee.mapEffects(s,f).concat(Ee.mapEffects(ws(c.effects),d))}return{changes:i,selection:Q.create(o,n.mainIndex),effects:s}}changes(e=[]){return e instanceof Rt?e:Rt.of(e,this.doc.length,this.facet(Ue.lineSeparator))}toText(e){return Ge.of(e.split(this.facet(Ue.lineSeparator)||c1))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Da(this,n),zu(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof Lt&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let o in r)if(Object.prototype.hasOwnProperty.call(e,o)){let s=r[o],a=e[o];i.push(s.init(c=>s.spec.fromJSON(a,c)))}}return Ue.create({doc:e.doc,selection:Q.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=Wu.resolve(e.extensions||[],new Map),r=e.doc instanceof Ge?e.doc:Ge.of((e.doc||"").split(n.staticFacet(Ue.lineSeparator)||c1)),i=e.selection?e.selection instanceof Q?e.selection:Q.single(e.selection.anchor,e.selection.head):Q.single(0);return Jy(i,r.length),n.staticFacet(g1)||(i=i.asSingle()),new Ue(n,r,i,n.dynamicSlots.map(()=>null),(o,s)=>s.create(o),null)}get tabSize(){return this.facet(Ue.tabSize)}get lineBreak(){return this.facet(Ue.lineSeparator)||`
`}get readOnly(){return this.facet(s6)}phrase(e,...n){for(let r of this.facet(Ue.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(t6))for(let s of o(this,n,r))Object.prototype.hasOwnProperty.call(s,e)&&i.push(s[e]);return i}charCategorizer(e){return VP(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),s=e-r,a=e-r;for(;s>0;){let c=Ht(n,s,!1);if(o(n.slice(c,s))!=lt.Word)break;s=c}for(;a<i;){let c=Ht(n,a);if(o(n.slice(a,c))!=lt.Word)break;a=c}return s==a?null:Q.range(s+r,a+r)}}Ue.allowMultipleSelections=g1;Ue.tabSize=fe.define({combine:t=>t.length?t[0]:4});Ue.lineSeparator=n6;Ue.readOnly=s6;Ue.phrases=fe.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});Ue.languageData=t6;Ue.changeFilter=r6;Ue.transactionFilter=i6;Ue.transactionExtender=o6;Hh.reconfigure=Ee.define();function Mr(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let s=i[o],a=r[o];if(a===void 0)r[o]=s;else if(!(a===s||s===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](a,s);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class wo{eq(e){return this==e}range(e,n=e){return Ua.create(e,n,this)}}wo.prototype.startSide=wo.prototype.endSide=0;wo.prototype.point=!1;wo.prototype.mapMode=Jt.TrackDel;class Ua{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new Ua(e,n,r)}}function v1(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class ym{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let s=i,a=o.length;;){if(s==a)return s;let c=s+a>>1,h=o[c]-e||(r?this.value[c].endSide:this.value[c].startSide)-n;if(c==s)return h>=0?s:a;h>=0?a=c:s=c+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),s=this.findIndex(r,1e9,!1,o);o<s;o++)if(i(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,n){let r=[],i=[],o=[],s=-1,a=-1;for(let c=0;c<this.value.length;c++){let h=this.value[c],f=this.from[c]+e,d=this.to[c]+e,g,v;if(f==d){let x=n.mapPos(f,h.startSide,h.mapMode);if(x==null||(g=v=x,h.startSide!=h.endSide&&(v=n.mapPos(f,h.endSide),v<g)))continue}else if(g=n.mapPos(f,h.startSide),v=n.mapPos(d,h.endSide),g>v||g==v&&h.startSide>0&&h.endSide<=0)continue;(v-g||h.endSide-h.startSide)<0||(s<0&&(s=g),h.point&&(a=Math.max(a,v-g)),r.push(h),i.push(g-s),o.push(v-s))}return{mapped:r.length?new ym(i,o,r,a):null,pos:s}}}class Ke{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new Ke(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(r&&(n=n.slice().sort(v1)),this.isEmpty)return n.length?Ke.of(n):this;let a=new c6(this,null,-1).goto(0),c=0,h=[],f=new Jr;for(;a.value||c<n.length;)if(c<n.length&&(a.from-n[c].from||a.startSide-n[c].value.startSide)>=0){let d=n[c++];f.addInner(d.from,d.to,d.value)||h.push(d)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(a.chunkIndex)<n[c].from)&&(!s||i>this.chunkEnd(a.chunkIndex)||o<this.chunkPos[a.chunkIndex])&&f.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!s||i>a.to||o<a.from||s(a.from,a.to,a.value))&&(f.addInner(a.from,a.to,a.value)||h.push(Ua.create(a.from,a.to,a.value))),a.next());return f.finishInner(this.nextLayer.isEmpty&&!h.length?Ke.empty:this.nextLayer.update({add:h,filter:s,filterFrom:i,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let s=0;s<this.chunk.length;s++){let a=this.chunkPos[s],c=this.chunk[s],h=e.touchesRange(a,a+c.length);if(h===!1)i=Math.max(i,c.maxPoint),n.push(c),r.push(e.mapPos(a));else if(h===!0){let{mapped:f,pos:d}=c.map(a,e);f&&(i=Math.max(i,f.maxPoint),n.push(f),r.push(d))}}let o=this.nextLayer.map(e);return n.length==0?o:new Ke(r,n,o||Ke.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],s=this.chunk[i];if(n>=o&&e<=o+s.length&&s.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return qa.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return qa.from(e).goto(n)}static compare(e,n,r,i,o=-1){let s=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),a=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),c=B5(s,a,r),h=new xa(s,c,o),f=new xa(a,c,o);r.iterGaps((d,g,v)=>N5(h,d,f,g,v,i)),r.empty&&r.length==0&&N5(h,0,f,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let o=e.filter(f=>!f.isEmpty&&n.indexOf(f)<0),s=n.filter(f=>!f.isEmpty&&e.indexOf(f)<0);if(o.length!=s.length)return!1;if(!o.length)return!0;let a=B5(o,s),c=new xa(o,a,0).goto(r),h=new xa(s,a,0).goto(r);for(;;){if(c.to!=h.to||!b1(c.active,h.active)||c.point&&(!h.point||!c.point.eq(h.point)))return!1;if(c.to>i)return!0;c.next(),h.next()}}static spans(e,n,r,i,o=-1){let s=new xa(e,null,o).goto(n),a=n,c=s.openStart;for(;;){let h=Math.min(s.to,r);if(s.point){let f=s.activeForPoint(s.to),d=s.pointFrom<n?f.length+1:s.point.startSide<0?f.length:Math.min(f.length,c);i.point(a,h,s.point,f,d,s.pointRank),c=Math.min(s.openEnd(h),f.length)}else h>a&&(i.span(a,h,s.active,c),c=s.openEnd(h));if(s.to>r)return c+(s.point&&s.to>r?1:0);a=s.to,s.next()}}static of(e,n=!1){let r=new Jr;for(let i of e instanceof Ua?[e]:n?HP(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Ke.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Ke.empty;i=i.nextLayer)n=new Ke(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}Ke.empty=new Ke([],[],null,-1);function HP(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(v1(e,r)>0)return t.slice().sort(v1);e=r}return t}Ke.empty.nextLayer=Ke.empty;class Jr{finishChunk(e){this.chunks.push(new ym(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new Jr)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(Ke.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Ke.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function B5(t,e,n){let r=new Map;for(let o of t)for(let s=0;s<o.chunk.length;s++)o.chunk[s].maxPoint<=0&&r.set(o.chunk[s],o.chunkPos[s]);let i=new Set;for(let o of e)for(let s=0;s<o.chunk.length;s++){let a=r.get(o.chunk[s]);a!=null&&(n?n.mapPos(a):a)==o.chunkPos[s]&&!n?.touchesRange(a,a+o.chunk[s].length)&&i.add(o.chunk[s])}return i}class c6{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class qa{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let o=0;o<e.length;o++)for(let s=e[o];!s.isEmpty;s=s.nextLayer)s.maxPoint>=r&&i.push(new c6(s,n,r,o));return i.length==1?i[0]:new qa(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)e0(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)e0(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),e0(this.heap,0)}}}function e0(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class xa{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=qa.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Pc(this.active,e),Pc(this.activeTo,e),Pc(this.activeRank,e),this.minActive=j5(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n<this.activeRank.length&&(o-this.activeRank[n]||i-this.activeTo[n])>0;)n++;Wc(this.active,n,r),Wc(this.activeTo,n,i),Wc(this.activeRank,n,o),e&&Wc(e,n,this.cursor.from),this.minActive=j5(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&Pc(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function N5(t,e,n,r,i,o){t.goto(e),n.goto(r);let s=r+i,a=r,c=r-e;for(;;){let h=t.to+c-n.to,f=h||t.endSide-n.endSide,d=f<0?t.to+c:n.to,g=Math.min(d,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&b1(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(a,g,t.point,n.point):g>a&&!b1(t.active,n.active)&&o.compareRange(a,g,t.active,n.active),d>s)break;(h||t.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(d),a=d,f<=0&&t.next(),f>=0&&n.next()}}function b1(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function Pc(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function Wc(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function j5(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function Xs(t,e,n=t.length){let r=0;for(let i=0;i<n&&i<t.length;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Ht(t,i));return r}function w1(t,e,n,r){for(let i=0,o=0;;){if(o>=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=Ht(t,i)}return r===!0?-1:t.length}const x1="ͼ",F5=typeof Symbol>"u"?"__"+x1:Symbol.for(x1),y1=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),V5=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Ii{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function o(s,a,c,h){let f=[],d=/^@(\w+)\b/.exec(s[0]),g=d&&d[1]=="keyframes";if(d&&a==null)return c.push(s[0]+";");for(let v in a){let x=a[v];if(/&/.test(v))o(v.split(/,\s*/).map(w=>s.map(C=>w.replace(/&/,C))).reduce((w,C)=>w.concat(C)),x,c);else if(x&&typeof x=="object"){if(!d)throw new RangeError("The value of a property ("+v+") should be a primitive value.");o(i(v),x,f,g)}else x!=null&&f.push(v.replace(/_.*/,"").replace(/[A-Z]/g,w=>"-"+w.toLowerCase())+": "+x+";")}(f.length||g)&&c.push((r&&!d&&!h?s.map(r):s).join(", ")+" {"+f.join(" ")+"}")}for(let s in e)o(i(s),e[s],this.rules)}getRules(){return this.rules.join(`
`)}static newName(){let e=V5[F5]||1;return V5[F5]=e+1,x1+e.toString(36)}static mount(e,n,r){let i=e[y1],o=r&&r.nonce;i?o&&i.setNonce(o):i=new PP(e,o),i.mount(Array.isArray(n)?n:[n],e)}}let H5=new Map;class PP{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=H5.get(r);if(o)return e[y1]=o;this.sheet=new i.CSSStyleSheet,H5.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[y1]=this}mount(e,n){let r=this.sheet,i=0,o=0;for(let s=0;s<e.length;s++){let a=e[s],c=this.modules.indexOf(a);if(c<o&&c>-1&&(this.modules.splice(c,1),o--,c=-1),c==-1){if(this.modules.splice(o++,0,a),r)for(let h=0;h<a.rules.length;h++)r.insertRule(a.rules[h],i++)}else{for(;o<c;)i+=this.modules[o++].rules.length;i+=a.rules.length,o++}}if(r)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let s="";for(let c=0;c<this.modules.length;c++)s+=this.modules[c].getRules()+`
`;this.styleTag.textContent=s;let a=n.head||n;this.styleTag.parentNode!=a&&a.insertBefore(this.styleTag,a.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var _i={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Ka={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},WP=typeof navigator<"u"&&/Mac/.test(navigator.platform),zP=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Vt=0;Vt<10;Vt++)_i[48+Vt]=_i[96+Vt]=String(Vt);for(var Vt=1;Vt<=24;Vt++)_i[Vt+111]="F"+Vt;for(var Vt=65;Vt<=90;Vt++)_i[Vt]=String.fromCharCode(Vt+32),Ka[Vt]=String.fromCharCode(Vt);for(var t0 in _i)Ka.hasOwnProperty(t0)||(Ka[t0]=_i[t0]);function UP(t){var e=WP&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||zP&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Ka:_i)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function et(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)u6(t,arguments[e]);return t}function u6(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)u6(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}function Ga(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function C1(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function bu(t,e){if(!e.anchorNode)return!1;try{return C1(t,e.anchorNode)}catch{return!1}}function Ds(t){return t.nodeType==3?yo(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Ia(t,e,n,r){return n?P5(t,e,n,r,-1)||P5(t,e,n,r,1):!1}function xo(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function Uu(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function P5(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:Sr(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=xo(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?Sr(t):0}else return!1}}function Sr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function vl(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function qP(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function h6(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function KP(t,e,n,r,i,o,s,a){let c=t.ownerDocument,h=c.defaultView||window;for(let f=t,d=!1;f&&!d;)if(f.nodeType==1){let g,v=f==c.body,x=1,w=1;if(v)g=qP(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(f).position)&&(d=!0),f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.assignedSlot||f.parentNode;continue}let R=f.getBoundingClientRect();({scaleX:x,scaleY:w}=h6(f,R)),g={left:R.left,right:R.left+f.clientWidth*x,top:R.top,bottom:R.top+f.clientHeight*w}}let C=0,S=0;if(i=="nearest")e.top<g.top?(S=e.top-(g.top+s),n>0&&e.bottom>g.bottom+S&&(S=e.bottom-g.bottom+s)):e.bottom>g.bottom&&(S=e.bottom-g.bottom+s,n<0&&e.top-S<g.top&&(S=e.top-(g.top+s)));else{let R=e.bottom-e.top,T=g.bottom-g.top;S=(i=="center"&&R<=T?e.top+R/2-T/2:i=="start"||i=="center"&&n<0?e.top-s:e.bottom-T+s)-g.top}if(r=="nearest"?e.left<g.left?(C=e.left-(g.left+o),n>0&&e.right>g.right+C&&(C=e.right-g.right+o)):e.right>g.right&&(C=e.right-g.right+o,n<0&&e.left<g.left+C&&(C=e.left-(g.left+o))):C=(r=="center"?e.left+(e.right-e.left)/2-(g.right-g.left)/2:r=="start"==a?e.left-o:e.right-(g.right-g.left)+o)-g.left,C||S)if(v)h.scrollBy(C,S);else{let R=0,T=0;if(S){let E=f.scrollTop;f.scrollTop+=S/w,T=(f.scrollTop-E)*w}if(C){let E=f.scrollLeft;f.scrollLeft+=C/x,R=(f.scrollLeft-E)*x}e={left:e.left-R,top:e.top-T,right:e.right-R,bottom:e.bottom-T},R&&Math.abs(R-C)<1&&(r="nearest"),T&&Math.abs(T-S)<1&&(i="nearest")}if(v)break;(e.top<g.top||e.bottom>g.bottom||e.left<g.left||e.right>g.right)&&(e={left:Math.max(e.left,g.left),right:Math.min(e.right,g.right),top:Math.max(e.top,g.top),bottom:Math.min(e.bottom,g.bottom)}),f=f.assignedSlot||f.parentNode}else if(f.nodeType==11)f=f.host;else break}function GP(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class YP{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?Sr(n):0),r,Math.min(e.focusOffset,r?Sr(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let os=null;function f6(t){if(t.setActive)return t.setActive();if(os)return t.focus(os);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(os==null?{get preventScroll(){return os={preventScroll:!0},!0}}:void 0),!os){os=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],o=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=o&&(r.scrollLeft=o)}}}let W5;function yo(t,e,n=e){let r=W5||(W5=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function xs(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let o=new KeyboardEvent("keydown",i);o.synthetic=!0,t.dispatchEvent(o);let s=new KeyboardEvent("keyup",i);return s.synthetic=!0,t.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function XP(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function d6(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function ZP(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,Sr(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=Sr(n))}else{if(n==t)return!0;r=xo(n),n=n.parentNode}}function g6(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function m6(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Sr(n)}else if(n.parentNode&&!Uu(n))r=xo(n),n=n.parentNode;else return null}}function p6(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!Uu(n))r=xo(n)+1,n=n.parentNode;else return null}}class qt{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new qt(e.parentNode,xo(e),n)}static after(e,n){return new qt(e.parentNode,xo(e)+1,n)}}const Cm=[];class nt{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let r=this.dom,i=null,o;for(let s of this.children){if(s.flags&7){if(!s.dom&&(o=i?i.nextSibling:r.firstChild)){let a=nt.get(o);(!a||!a.parent&&a.canReuseDOM(s))&&s.reuseDOM(o)}s.sync(e,n),s.flags&=-8}if(o=i?i.nextSibling:r.firstChild,n&&!n.written&&n.node==r&&o!=s.dom&&(n.written=!0),s.dom.parentNode==r)for(;o&&o!=s.dom;)o=z5(o);else r.insertBefore(s.dom,o);i=s.dom}for(o=i?i.nextSibling:r.firstChild,o&&n&&n.node==r&&(n.written=!0);o;)o=z5(o)}else if(this.flags&1)for(let r of this.children)r.flags&7&&(r.sync(e,n),r.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let r;if(e==this.dom)r=this.dom.childNodes[n];else{let i=Sr(e)==0?0:n==0?-1:1;for(;;){let o=e.parentNode;if(o==this.dom)break;i==0&&o.firstChild!=o.lastChild&&(e==o.firstChild?i=-1:i=1),e=o}i<0?r=e:r=e.nextSibling}if(r==this.dom.firstChild)return 0;for(;r&&!nt.get(r);)r=r.nextSibling;if(!r)return this.length;for(let i=0,o=0;;i++){let s=this.children[i];if(s.dom==r)return o;o+=s.length+s.breakAfter}}domBoundsAround(e,n,r=0){let i=-1,o=-1,s=-1,a=-1;for(let c=0,h=r,f=r;c<this.children.length;c++){let d=this.children[c],g=h+d.length;if(h<e&&g>n)return d.domBoundsAround(e,n,h);if(g>=e&&i==-1&&(i=c,o=h),h>n&&d.dom.parentNode==this.dom){s=c,a=f;break}f=g,h=g+d.breakAfter}return{from:o,to:a<0?r+this.length:a,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s<this.children.length&&s>=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=Cm){this.markDirty();for(let i=e;i<n;i++){let o=this.children[i];o.parent==this&&r.indexOf(o)<0&&o.destroy()}r.length<250?this.children.splice(e,n-e,...r):this.children=[].concat(this.children.slice(0,e),r,this.children.slice(n));for(let i=0;i<r.length;i++)r[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new v6(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,n,r,i,o,s){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}nt.prototype.breakAfter=0;function z5(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class v6{constructor(e,n,r){this.children=e,this.pos=n,this.i=r,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function b6(t,e,n,r,i,o,s,a,c){let{children:h}=t,f=h.length?h[e]:null,d=o.length?o[o.length-1]:null,g=d?d.breakAfter:s;if(!(e==r&&f&&!s&&!g&&o.length<2&&f.merge(n,i,o.length?d:null,n==0,a,c))){if(r<h.length){let v=h[r];v&&(i<v.length||v.breakAfter&&d?.breakAfter)?(e==r&&(v=v.split(i),i=0),!g&&d&&v.merge(0,i,d,!0,0,c)?o[o.length-1]=v:((i||v.children.length&&!v.children[0].length)&&v.merge(0,i,null,!1,0,c),o.push(v))):v?.breakAfter&&(d?d.breakAfter=1:s=1),r++}for(f&&(f.breakAfter=s,n>0&&(!s&&o.length&&f.merge(n,f.length,o[0],!1,a,0)?f.breakAfter=o.shift().breakAfter:(n<f.length||f.children.length&&f.children[f.children.length-1].length==0)&&f.merge(n,f.length,null,!1,a,0),e++));e<r&&o.length;)if(h[r-1].become(o[o.length-1]))r--,o.pop(),c=o.length?0:a;else if(h[e].become(o[0]))e++,o.shift(),a=o.length?0:c;else break;!o.length&&e&&r<h.length&&!h[e-1].breakAfter&&h[r].merge(0,0,h[e-1],!1,a,c)&&e--,(e<r||o.length)&&t.replaceChildren(e,r,o)}}function w6(t,e,n,r,i,o){let s=t.childCursor(),{i:a,off:c}=s.findPos(n,1),{i:h,off:f}=s.findPos(e,-1),d=e-n;for(let g of r)d+=g.length;t.length+=d,b6(t,h,f,a,c,r,0,i,o)}let cn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},$1=typeof document<"u"?document:{documentElement:{style:{}}};const S1=/Edge\/(\d+)/.exec(cn.userAgent),x6=/MSIE \d/.test(cn.userAgent),A1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(cn.userAgent),Ph=!!(x6||A1||S1),U5=!Ph&&/gecko\/(\d+)/i.test(cn.userAgent),n0=!Ph&&/Chrome\/(\d+)/.exec(cn.userAgent),QP="webkitFontSmoothing"in $1.documentElement.style,y6=!Ph&&/Apple Computer/.test(cn.vendor),q5=y6&&(/Mobile\/\w+/.test(cn.userAgent)||cn.maxTouchPoints>2);var he={mac:q5||/Mac/.test(cn.platform),windows:/Win/.test(cn.platform),linux:/Linux|X11/.test(cn.platform),ie:Ph,ie_version:x6?$1.documentMode||6:A1?+A1[1]:S1?+S1[1]:0,gecko:U5,gecko_version:U5?+(/Firefox\/(\d+)/.exec(cn.userAgent)||[0,0])[1]:0,chrome:!!n0,chrome_version:n0?+n0[1]:0,ios:q5,android:/Android\b/.test(cn.userAgent),safari:y6,webkit_version:QP?+(/\bAppleWebKit\/(\d+)/.exec(cn.userAgent)||[0,0])[1]:0,tabSize:$1.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const JP=256;class er extends nt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof er)||this.length-(n-e)+r.length>JP||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new er(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new qt(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return eW(this.dom,e,n)}}class ei extends nt{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(d6(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,o,s){return r&&(!(r instanceof ei&&r.mark.eq(this.mark))||e&&o<=0||n<this.length&&s<=0)?!1:(w6(this,e,n,r?r.children.slice():[],o-1,s-1),this.markDirty(),!0)}split(e){let n=[],r=0,i=-1,o=0;for(let a of this.children){let c=r+a.length;c>e&&n.push(r<e?a.split(e-r):a),i<0&&r>=e&&(i=o),r=c,o++}let s=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new ei(this.mark,n,s)}domAtPos(e){return C6(this,e)}coordsAt(e,n){return S6(this,e,n)}}function eW(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,s=0;e==0&&n<0||e==r&&n>=0?he.chrome||he.gecko||(e?(i--,s=1):o<r&&(o++,s=-1)):n<0?i--:o<r&&o++;let a=yo(t,i,o).getClientRects();if(!a.length)return null;let c=a[(s?s<0:n>=0)?0:a.length-1];return he.safari&&!s&&c.width==0&&(c=Array.prototype.find.call(a,h=>h.width)||c),s?vl(c,s<0):c||null}class Ri extends nt{static create(e,n,r){return new Ri(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=Ri.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,r,i,o,s){return r&&(!(r instanceof Ri)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}become(e){return e instanceof Ri&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return Ge.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,r=n&&n.state.doc,i=this.posAtStart;return r?r.slice(i,i+this.length):Ge.empty}domAtPos(e){return(this.length?e==0:this.side>0)?qt.before(this.dom):qt.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let s=this.side?this.side<0:e>0;for(let a=s?i.length-1:0;o=i[a],!(e>0?a==0:a==i.length-1||o.top<o.bottom);a+=s?-1:1);return vl(o,!s)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Is extends nt{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Is&&e.side==this.side}split(){return new Is(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?qt.before(this.dom):qt.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ge.empty}get isHidden(){return!0}}er.prototype.children=Ri.prototype.children=Is.prototype.children=Cm;function C6(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;i<r.length;i++){let s=r[i],a=o+s.length;if(!(a==o&&s.getSide()<=0)){if(e>o&&e<a&&s.dom.parentNode==n)return s.domAtPos(e-o);if(e<=o)break;o=a}}for(let o=i;o>0;o--){let s=r[o-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let o=i;o<r.length;o++){let s=r[o];if(s.dom.parentNode==n)return s.domAtPos(0)}return new qt(n,0)}function $6(t,e,n){let r,{children:i}=t;n>0&&e instanceof ei&&i.length&&(r=i[i.length-1])instanceof ei&&r.mark.eq(e.mark)?$6(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function S6(t,e,n){let r=null,i=-1,o=null,s=-1;function a(h,f){for(let d=0,g=0;d<h.children.length&&g<=f;d++){let v=h.children[d],x=g+v.length;x>=f&&(v.children.length?a(v,f-g):(!o||o.isHidden&&(n>0||nW(o,v)))&&(x>f||g==x&&v.getSide()>0)?(o=v,s=f-g):(g<f||g==x&&v.getSide()<0&&!v.isHidden)&&(r=v,i=f-g)),g=x}}a(t,e);let c=(n<0?r:o)||r||o;return c?c.coordsAt(Math.max(0,c==r?i:s),n):tW(t)}function tW(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=Ds(e);return n[n.length-1]||null}function nW(t,e){let n=t.coordsAt(0,1),r=e.coordsAt(0,1);return n&&r&&r.top<n.bottom}function R1(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const K5=Object.create(null);function qu(t,e,n){if(t==e)return!0;t||(t=K5),e||(e=K5);let r=Object.keys(t),i=Object.keys(e);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function k1(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function rW(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class ai{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var en=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(en||(en={}));class xe extends wo{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new bl(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Li(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:s}=A6(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(s?n?2e8:1:-6e8)+1}return new Li(e,r,i,n,e.widget||null,!0)}static line(e){return new wl(e)}static set(e,n=!1){return Ke.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}xe.none=Ke.empty;class bl extends xe{constructor(e){let{start:n,end:r}=A6(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof bl&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&qu(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}bl.prototype.point=!1;class wl extends xe{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof wl&&this.spec.class==e.spec.class&&qu(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}wl.prototype.mapMode=Jt.TrackBefore;wl.prototype.point=!0;class Li extends xe{constructor(e,n,r,i,o,s){super(n,r,o,e),this.block=i,this.isReplace=s,this.mapMode=i?n<=0?Jt.TrackBefore:Jt.TrackAfter:Jt.TrackDel}get type(){return this.startSide!=this.endSide?en.WidgetRange:this.startSide<=0?en.WidgetBefore:en.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Li&&iW(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Li.prototype.point=!0;function A6(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function iW(t,e){return t==e||!!(t&&e&&t.compare(e))}function wu(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class xt extends nt{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,s){if(r){if(!(r instanceof xt))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),w6(this,e,n,r?r.children.slice():[],o,s),!0}split(e){let n=new xt;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o<this.children.length;o++)n.append(this.children[o],0);for(;r>0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){qu(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){$6(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=R1(n,this.attrs||{})),r&&(this.attrs=R1({class:r},this.attrs||{}))}domAtPos(e){return C6(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(d6(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(k1(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&nt.get(i)instanceof ei;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=nt.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!he.ios||!this.children.some(o=>o instanceof er))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof er)||/[^ -~]/.test(r.text))return null;let i=Ds(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=S6(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight<o){let s=(o-i.textHeight)/2;return{top:r.top+s,bottom:r.bottom-s,left:r.left,right:r.left}}}return r}become(e){return e instanceof xt&&this.children.length==0&&e.children.length==0&&qu(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,n){for(let r=0,i=0;r<e.children.length;r++){let o=e.children[r],s=i+o.length;if(s>=n){if(o instanceof xt)return o;if(s>n)break}i=s+o.breakAfter}return null}}class Yr extends nt{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,s){return r&&(!(r instanceof Yr)||!this.widget.compare(r.widget)||e>0&&o<=0||n<this.length&&s<=0)?!1:(this.length=e+(r?r.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?qt.before(this.dom):qt.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let r=new Yr(this.widget,n,this.deco);return r.breakAfter=this.breakAfter,r}get children(){return Cm}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Ge.empty}domBoundsAround(){return null}become(e){return e instanceof Yr&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);return r||(this.widget instanceof T1?null:vl(this.dom.getBoundingClientRect(),this.length?e==0:n<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:n,endSide:r}=this.deco;return n==r?!1:e<0?n<0:r>0}}class T1 extends ai{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class _a{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Yr&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new xt),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(zc(new Is(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Yr)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:s,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(zc(new er(this.text.slice(this.textOff,this.textOff+i)),n),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,s){if(this.disallowBlockEffectsFor[s]&&r instanceof Li){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=n-e;if(r instanceof Li)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Yr(r.widget||_s.block,a,r));else{let c=Ri.create(r.widget||_s.inline,a,a?0:r.startSide),h=this.atCursorPos&&!c.isEditable&&o<=i.length&&(e<n||r.startSide>0),f=!c.isEditable&&(e<n||o>i.length||r.startSide<=0),d=this.getLine();this.pendingBuffer==2&&!h&&!c.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),h&&(d.append(zc(new Is(1),i),o),o=i.length+Math.max(0,o-i.length)),d.append(zc(c,i),o),this.atCursorPos=f,this.pendingBuffer=f?e<n||o>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,r,i,o){let s=new _a(e,n,r,o);return s.openEnd=Ke.spans(i,n,r,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function zc(t,e){for(let n of e)t=new ei(n,[t],t.length);return t}class _s extends ai{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}_s.inline=new _s("span");_s.block=new _s("div");var st=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(st||(st={}));const Co=st.LTR,$m=st.RTL;function R6(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const oW=R6("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),sW=R6("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),M1=Object.create(null),hr=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);M1[e]=n,M1[n]=-e}function k6(t){return t<=247?oW[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?sW[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const aW=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class ki{get dir(){return this.level%2?$m:Co}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let o=-1;for(let s=0;s<e.length;s++){let a=e[s];if(a.from<=n&&a.to>=n){if(a.level==r)return s;(o<0||(i!=0?i<0?a.from<n:a.to>n:e[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}function T6(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!T6(r.inner,i.inner))return!1}return!0}const tt=[];function lW(t,e,n,r,i){for(let o=0;o<=r.length;o++){let s=o?r[o-1].to:e,a=o<r.length?r[o].from:n,c=o?256:i;for(let h=s,f=c,d=c;h<a;h++){let g=k6(t.charCodeAt(h));g==512?g=f:g==8&&d==4&&(g=16),tt[h]=g==4?2:g,g&7&&(d=g),f=g}for(let h=s,f=c,d=c;h<a;h++){let g=tt[h];if(g==128)h<a-1&&f==tt[h+1]&&f&24?g=tt[h]=f:tt[h]=256;else if(g==64){let v=h+1;for(;v<a&&tt[v]==64;)v++;let x=h&&f==8||v<n&&tt[v]==8?d==1?1:8:256;for(let w=h;w<v;w++)tt[w]=x;h=v-1}else g==8&&d==1&&(tt[h]=1);f=g,g&7&&(d=g)}}}function cW(t,e,n,r,i){let o=i==1?2:1;for(let s=0,a=0,c=0;s<=r.length;s++){let h=s?r[s-1].to:e,f=s<r.length?r[s].from:n;for(let d=h,g,v,x;d<f;d++)if(v=M1[g=t.charCodeAt(d)])if(v<0){for(let w=a-3;w>=0;w-=3)if(hr[w+1]==-v){let C=hr[w+2],S=C&2?i:C&4?C&1?o:i:0;S&&(tt[d]=tt[hr[w]]=S),a=w;break}}else{if(hr.length==189)break;hr[a++]=d,hr[a++]=g,hr[a++]=c}else if((x=tt[d])==2||x==1){let w=x==i;c=w?0:1;for(let C=a-3;C>=0;C-=3){let S=hr[C+2];if(S&2)break;if(w)hr[C+2]|=2;else{if(S&4)break;hr[C+2]|=4}}}}}function uW(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let s=i?n[i-1].to:t,a=i<n.length?n[i].from:e;for(let c=s;c<a;){let h=tt[c];if(h==256){let f=c+1;for(;;)if(f==a){if(i==n.length)break;f=n[i++].to,a=i<n.length?n[i].from:e}else if(tt[f]==256)f++;else break;let d=o==1,g=(f<e?tt[f]:r)==1,v=d==g?d?1:2:r;for(let x=f,w=i,C=w?n[w-1].to:t;x>c;)x==C&&(x=n[--w].from,C=w?n[w-1].to:t),tt[--x]=v;c=f}else o=h,c++}}}function E1(t,e,n,r,i,o,s){let a=r%2?2:1;if(r%2==i%2)for(let c=e,h=0;c<n;){let f=!0,d=!1;if(h==o.length||c<o[h].from){let w=tt[c];w!=a&&(f=!1,d=w==16)}let g=!f&&a==1?[]:null,v=f?r:r+1,x=c;e:for(;;)if(h<o.length&&x==o[h].from){if(d)break e;let w=o[h];if(!f)for(let C=w.to,S=h+1;;){if(C==n)break e;if(S<o.length&&o[S].from==C)C=o[S++].to;else{if(tt[C]==a)break e;break}}if(h++,g)g.push(w);else{w.from>c&&s.push(new ki(c,w.from,v));let C=w.direction==Co!=!(v%2);O1(t,C?r+1:r,i,w.inner,w.from,w.to,s),c=w.to}x=w.to}else{if(x==n||(f?tt[x]!=a:tt[x]==a))break;x++}g?E1(t,c,x,r+1,i,g,s):c<x&&s.push(new ki(c,x,v)),c=x}else for(let c=n,h=o.length;c>e;){let f=!0,d=!1;if(!h||c>o[h-1].to){let w=tt[c-1];w!=a&&(f=!1,d=w==16)}let g=!f&&a==1?[]:null,v=f?r:r+1,x=c;e:for(;;)if(h&&x==o[h-1].to){if(d)break e;let w=o[--h];if(!f)for(let C=w.from,S=h;;){if(C==e)break e;if(S&&o[S-1].to==C)C=o[--S].from;else{if(tt[C-1]==a)break e;break}}if(g)g.push(w);else{w.to<c&&s.push(new ki(w.to,c,v));let C=w.direction==Co!=!(v%2);O1(t,C?r+1:r,i,w.inner,w.from,w.to,s),c=w.from}x=w.from}else{if(x==e||(f?tt[x-1]!=a:tt[x-1]==a))break;x--}g?E1(t,x,c,r+1,i,g,s):x<c&&s.push(new ki(x,c,v)),c=x}}function O1(t,e,n,r,i,o,s){let a=e%2?2:1;lW(t,i,o,r,a),cW(t,i,o,r,a),uW(i,o,r,a),E1(t,i,o,e,n,r,s)}function hW(t,e,n){if(!t)return[new ki(0,0,e==$m?1:0)];if(e==Co&&!n.length&&!aW.test(t))return M6(t.length);if(n.length)for(;t.length>tt.length;)tt[tt.length]=256;let r=[],i=e==Co?0:1;return O1(t,i,i,n,0,t.length,r),r}function M6(t){return[new ki(0,t,0)]}let E6="";function fW(t,e,n,r,i){var o;let s=r.head-t.from,a=ki.find(e,s,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc),c=e[a],h=c.side(i,n);if(s==h){let g=a+=i?1:-1;if(g<0||g>=e.length)return null;c=e[a=g],s=c.side(!i,n),h=c.side(i,n)}let f=Ht(t.text,s,c.forward(i,n));(f<c.from||f>c.to)&&(f=h),E6=t.text.slice(Math.min(s,f),Math.max(s,f));let d=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return d&&f==h&&d.level+(i?0:1)<c.level?Q.cursor(d.side(!i,n)+t.from,d.forward(i,n)?1:-1,d.level):Q.cursor(f+t.from,c.forward(i,n)?-1:1,c.level)}function dW(t,e,n){for(let r=e;r<n;r++){let i=k6(t.charCodeAt(r));if(i==1)return Co;if(i==2||i==4)return $m}return Co}const O6=fe.define(),D6=fe.define(),I6=fe.define(),_6=fe.define(),D1=fe.define(),L6=fe.define(),B6=fe.define(),Sm=fe.define(),Am=fe.define(),N6=fe.define({combine:t=>t.some(e=>e)}),j6=fe.define({combine:t=>t.some(e=>e)}),F6=fe.define();class ys{constructor(e,n="nearest",r="nearest",i=5,o=5,s=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=s}map(e){return e.empty?this:new ys(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new ys(Q.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Uc=Ee.define({map:(t,e)=>t.map(e)}),V6=Ee.define();function hn(t,e,n){let r=t.facet(_6);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const qr=fe.define({combine:t=>t.length?t[0]:!0});let gW=0;const fs=fe.define({combine(t){return t.filter((e,n)=>{for(let r=0;r<n;r++)if(t[r].plugin==e.plugin)return!1;return!0})}});class vt{constructor(e,n,r,i,o){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=o(this),this.extension=this.baseExtensions.concat(fs.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(fs.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:o,decorations:s}=n||{};return new vt(gW++,e,r,i,a=>{let c=[];return s&&c.push(Ya.of(h=>{let f=h.plugin(a);return f?s(f):xe.none})),o&&c.push(o(a)),c})}static fromClass(e,n){return vt.define((r,i)=>new e(r,i),n)}}class r0{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(hn(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){hn(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){hn(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const H6=fe.define(),Rm=fe.define(),Ya=fe.define(),P6=fe.define(),km=fe.define(),W6=fe.define();function G5(t,e){let n=t.state.facet(W6);if(!n.length)return n;let r=n.map(o=>o instanceof Function?o(t):o),i=[];return Ke.spans(r,e.from,e.to,{point(){},span(o,s,a,c){let h=o-e.from,f=s-e.from,d=i;for(let g=a.length-1;g>=0;g--,c--){let v=a[g].spec.bidiIsolate,x;if(v==null&&(v=dW(e.text,h,f)),c>0&&d.length&&(x=d[d.length-1]).to==h&&x.direction==v)x.to=f,d=x.inner;else{let w={from:h,to:f,direction:v,inner:[]};d.push(w),d=w.inner}}}}),i}const z6=fe.define();function Tm(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(z6)){let s=o(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(r=Math.max(r,s.top)),s.bottom!=null&&(i=Math.max(i,s.bottom)))}return{left:e,right:n,top:r,bottom:i}}const Ra=fe.define();class Vn{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new Vn(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,o=0,s=0,a=0;;i++){let c=i==e.length?null:e[i],h=s-a,f=c?c.fromB:1e9;for(;o<n.length&&n[o]<f;){let d=n[o],g=n[o+1],v=Math.max(a,d),x=Math.min(f,g);if(v<=x&&new Vn(v+h,x+h,v,x).addToSet(r),g>f)break;o+=2}if(!c)return r;new Vn(c.fromA,c.toA,c.fromB,c.toB).addToSet(r),s=c.toA,a=c.toB}}}class Ku{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Rt.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,s,a,c)=>i.push(new Vn(o,s,a,c))),this.changedRanges=i}static create(e,n,r){return new Ku(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class Y5 extends nt{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=xe.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new xt],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Vn(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:h,toA:f})=>f<this.minWidthFrom||h>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!yW(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?pW(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:h,to:f}=this.hasComposition;r=new Vn(h,f,e.changes.mapPos(h,-1),e.changes.mapPos(f,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(he.ie||he.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let s=this.decorations,a=this.updateDeco(),c=wW(s,a,e.changes);return r=Vn.extendWithRanges(r,c),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=he.chrome||he.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||i.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.children)s instanceof Yr&&s.widget instanceof T1&&o.push(s.dom);i.updateGaps(o)}updateChildren(e,n,r){let i=r?r.range.addToSet(e.slice()):e,o=this.childCursor(n);for(let s=i.length-1;;s--){let a=s>=0?i[s]:null;if(!a)break;let{fromA:c,toA:h,fromB:f,toB:d}=a,g,v,x,w;if(r&&r.range.fromB<d&&r.range.toB>f){let E=_a.build(this.view.state.doc,f,r.range.fromB,this.decorations,this.dynamicDecorationMap),O=_a.build(this.view.state.doc,r.range.toB,d,this.decorations,this.dynamicDecorationMap);v=E.breakAtStart,x=E.openStart,w=O.openEnd;let L=this.compositionView(r);O.breakAtStart?L.breakAfter=1:O.content.length&&L.merge(L.length,L.length,O.content[0],!1,O.openStart,0)&&(L.breakAfter=O.content[0].breakAfter,O.content.shift()),E.content.length&&L.merge(0,0,E.content[E.content.length-1],!0,0,E.openEnd)&&E.content.pop(),g=E.content.concat(L).concat(O.content)}else({content:g,breakAtStart:v,openStart:x,openEnd:w}=_a.build(this.view.state.doc,f,d,this.decorations,this.dynamicDecorationMap));let{i:C,off:S}=o.findPos(h,1),{i:R,off:T}=o.findPos(c,-1);b6(this,R,T,C,S,g,v,x,w)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(V6)&&(this.editContextFormatting=r.value)}compositionView(e){let n=new er(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new ei(i,[n],n.length);let r=new xt;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,s)=>{s.flags|=8|(s.children.some(c=>c.flags&7)?1:0),this.markedForComposition.add(s);let a=nt.get(o);a&&a!=s&&(a.dom=null),s.setDOM(o)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&!(this.view.state.facet(qr)||this.dom.tabIndex>-1)&&bu(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let s=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(a.anchor)),h=a.empty?c:this.moveToLine(this.domAtPos(a.head));if(he.gecko&&a.empty&&!this.hasComposition&&mW(c)){let d=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(d,c.node.childNodes[c.offset]||null)),c=h=new qt(d,0),s=!0}let f=this.view.observer.selectionRange;(s||!f.focusNode||(!Ia(c.node,c.offset,f.anchorNode,f.anchorOffset)||!Ia(h.node,h.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,a))&&(this.view.observer.ignore(()=>{he.android&&he.chrome&&this.dom.contains(f.focusNode)&&xW(f.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=Ga(this.view.root);if(d)if(a.empty){if(he.gecko){let g=vW(c.node,c.offset);if(g&&g!=3){let v=(g==1?m6:p6)(c.node,c.offset);v&&(c=new qt(v.node,v.offset))}}d.collapse(c.node,c.offset),a.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=a.bidiLevel)}else if(d.extend){d.collapse(c.node,c.offset);try{d.extend(h.node,h.offset)}catch{}}else{let g=document.createRange();a.anchor>a.head&&([c,h]=[h,c]),g.setEnd(h.node,h.offset),g.setStart(c.node,c.offset),d.removeAllRanges(),d.addRange(g)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,h)),this.impreciseAnchor=c.precise?null:new qt(f.anchorNode,f.anchorOffset),this.impreciseHead=h.precise?null:new qt(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Ia(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=Ga(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let s=xt.find(this,n.head);if(!s)return;let a=s.posAtStart;if(n.head==a||n.head==a+s.length)return;let c=this.coordsAt(n.head,-1),h=this.coordsAt(n.head,1);if(!c||!h||c.bottom>h.top)return;let f=this.domAtPos(n.head+n.assoc);r.collapse(f.node,f.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&r.collapse(i,o)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i<n.childNodes.length;i++){let o=nt.get(n.childNodes[i]);o instanceof xt&&(r=o.domAtPos(0))}for(let i=e.offset-1;!r&&i>=0;i--){let o=nt.get(n.childNodes[i]);o instanceof xt&&(r=o.domAtPos(o.length))}return r?new qt(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=nt.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let i=this.children[n];if(r<i.length||i instanceof xt)break;n++,r=0}return this.children[n].domAtPos(r)}coordsAt(e,n){let r=null,i=0;for(let o=this.length,s=this.children.length-1;s>=0;s--){let a=this.children[s],c=o-a.breakAfter,h=c-a.length;if(c<e)break;if(h<=e&&(h<e||a.covers(-1))&&(c>e||a.covers(1))&&(!r||a instanceof xt&&!(r instanceof xt&&n>=0)))r=a,i=h;else if(r&&h==e&&c==e&&a instanceof Yr&&Math.abs(n)<2){if(a.deco.startSide<0)break;s&&(r=null)}o=h}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof xt))return null;for(;i.children.length;){let{i:a,off:c}=i.childPos(r,1);for(;;a++){if(a==i.children.length)return null;if((i=i.children[a]).length)break}r=c}if(!(i instanceof er))return null;let o=Ht(i.text,r);if(o==r)return null;let s=yo(i.dom,r,o).getClientRects();for(let a=0;a<s.length;a++){let c=s[a];if(a==s.length-1||c.top<c.bottom&&c.left<c.right)return c}return null}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,o=this.view.contentDOM.clientWidth,s=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,c=this.view.textDirection==st.LTR;for(let h=0,f=0;f<this.children.length;f++){let d=this.children[f],g=h+d.length;if(g>i)break;if(h>=r){let v=d.dom.getBoundingClientRect();if(n.push(v.height),s){let x=d.dom.lastChild,w=x?Ds(x):[];if(w.length){let C=w[w.length-1],S=c?C.right-v.left:v.right-C.left;S>a&&(a=S,this.minWidth=o,this.minWidthFrom=h,this.minWidthTo=g)}}}h=g+d.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?st.RTL:st.LTR}measureTextSize(){for(let o of this.children)if(o instanceof xt){let s=o.measureTextSize();if(s)return s}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=Ds(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new v6(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],s=o?o.from-1:this.length;if(s>r){let a=(n.lineBlockAt(s).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(xe.replace({widget:new T1(a),block:!0,inclusive:!0,isBlockGap:!0}).range(r,s))}if(!o)break;r=o.to+1}return xe.set(e)}updateDeco(){let e=1,n=this.view.state.facet(Ya).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),r=!1,i=this.view.state.facet(P6).map((o,s)=>{let a=typeof o=="function";return a&&(r=!0),a?o(this.view):o});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(Ke.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let h=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=h.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let h of this.view.state.facet(F6))try{if(h(this.view,e.range,e))return!0}catch(f){hn(this.view.state,f,"scroll handler")}let{range:n}=e,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=Tm(this.view),s={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:a,offsetHeight:c}=this.view.scrollDOM;KP(this.view.scrollDOM,s,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==st.LTR)}}function mW(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function U6(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=m6(n.focusNode,n.focusOffset),i=p6(n.focusNode,n.focusOffset),o=r||i;if(i&&r&&i.node!=r.node){let a=nt.get(i.node);if(!a||a instanceof er&&a.text!=i.node.nodeValue)o=i;else if(t.docView.lastCompositionAfterCursor){let c=nt.get(r.node);!c||c instanceof er&&c.text!=r.node.nodeValue||(o=i)}}if(t.docView.lastCompositionAfterCursor=o!=r,!o)return null;let s=e-o.offset;return{from:s,to:s+o.node.nodeValue.length,node:o.node}}function pW(t,e,n){let r=U6(t,n);if(!r)return null;let{node:i,from:o,to:s}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||t.state.doc.sliceString(r.from,r.to)!=a)return null;let c=e.invertedDesc,h=new Vn(c.mapPos(o),c.mapPos(s),o,s),f=[];for(let d=i.parentNode;;d=d.parentNode){let g=nt.get(d);if(g instanceof ei)f.push({node:d,deco:g.mark});else{if(g instanceof xt||d.nodeName=="DIV"&&d.parentNode==t.contentDOM)return{range:h,text:i,marks:f,line:d};if(d!=t.contentDOM)f.push({node:d,deco:new bl({inclusive:!0,attributes:rW(d),tagName:d.tagName.toLowerCase()})});else return null}}}function vW(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let bW=class{constructor(){this.changes=[]}compareRange(e,n){wu(e,n,this.changes)}comparePoint(e,n){wu(e,n,this.changes)}boundChange(e){wu(e,e,this.changes)}};function wW(t,e,n){let r=new bW;return Ke.compare(t,e,n,r),r.changes}function xW(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function yW(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}function CW(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return Q.cursor(e);o==0?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=Ht(i.text,o,!1):a=Ht(i.text,o);let c=r(i.text.slice(s,a));for(;s>0;){let h=Ht(i.text,s,!1);if(r(i.text.slice(h,s))!=c)break;s=h}for(;a<i.length;){let h=Ht(i.text,a);if(r(i.text.slice(a,h))!=c)break;a=h}return Q.range(s+i.from,a+i.from)}function $W(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function SW(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function i0(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function X5(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function Z5(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function I1(t,e,n){let r,i,o,s,a=!1,c,h,f,d;for(let x=t.firstChild;x;x=x.nextSibling){let w=Ds(x);for(let C=0;C<w.length;C++){let S=w[C];i&&i0(i,S)&&(S=X5(Z5(S,i.bottom),i.top));let R=$W(e,S),T=SW(n,S);if(R==0&&T==0)return x.nodeType==3?Q5(x,e,n):I1(x,e,n);(!r||s>T||s==T&&o>R)&&(r=x,i=S,o=R,s=T,a=R?e<S.left?C>0:C<w.length-1:!0),R==0?n>S.bottom&&(!f||f.bottom<S.bottom)?(c=x,f=S):n<S.top&&(!d||d.top>S.top)&&(h=x,d=S):f&&i0(f,S)?f=Z5(f,S.bottom):d&&i0(d,S)&&(d=X5(d,S.top))}}if(f&&f.bottom>=n?(r=c,i=f):d&&d.top<=n&&(r=h,i=d),!r)return{node:t,offset:0};let g=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return Q5(r,g,n);if(a&&r.contentEditable!="false")return I1(r,g,n);let v=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:v}}function Q5(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;a<r;a++){let c=yo(t,a,a+1).getClientRects();for(let h=0;h<c.length;h++){let f=c[h];if(f.top==f.bottom)continue;s||(s=e-f.left);let d=(f.top>n?f.top-n:n-f.bottom)-1;if(f.left-1<=e&&f.right+1>=e&&d<o){let g=e>=(f.left+f.right)/2,v=g;if((he.chrome||he.gecko)&&yo(t,a).getBoundingClientRect().left==f.right&&(v=!g),d<=0)return{node:t,offset:a+(v?1:0)};i=a+(v?1:0),o=d}}}return{node:t,offset:i>-1?i:s>0?t.nodeValue.length:0}}function q6(t,e,n,r=-1){var i,o;let s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,c,{docHeight:h}=t.viewState,{x:f,y:d}=e,g=d-a;if(g<0)return 0;if(g>h)return t.state.doc.length;for(let E=t.viewState.heightOracle.textHeight/2,O=!1;c=t.elementAtHeight(g),c.type!=en.Text;)for(;g=r>0?c.bottom+E:c.top-E,!(g>=0&&g<=h);){if(O)return n?null:0;O=!0,r=-r}d=a+g;let v=c.from;if(v<t.viewport.from)return t.viewport.from==0?0:n?null:J5(t,s,c,f,d);if(v>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:J5(t,s,c,f,d);let x=t.dom.ownerDocument,w=t.root.elementFromPoint?t.root:x,C=w.elementFromPoint(f,d);C&&!t.contentDOM.contains(C)&&(C=null),C||(f=Math.max(s.left+1,Math.min(s.right-1,f)),C=w.elementFromPoint(f,d),C&&!t.contentDOM.contains(C)&&(C=null));let S,R=-1;if(C&&((i=t.docView.nearest(C))===null||i===void 0?void 0:i.isEditable)!=!1){if(x.caretPositionFromPoint){let E=x.caretPositionFromPoint(f,d);E&&({offsetNode:S,offset:R}=E)}else if(x.caretRangeFromPoint){let E=x.caretRangeFromPoint(f,d);E&&({startContainer:S,startOffset:R}=E,(!t.contentDOM.contains(S)||he.safari&&AW(S,R,f)||he.chrome&&RW(S,R,f))&&(S=void 0))}S&&(R=Math.min(Sr(S),R))}if(!S||!t.docView.dom.contains(S)){let E=xt.find(t.docView,v);if(!E)return g>c.top+c.height/2?c.to:c.from;({node:S,offset:R}=I1(E.dom,f,d))}let T=t.docView.nearest(S);if(!T)return null;if(T.isWidget&&((o=T.dom)===null||o===void 0?void 0:o.nodeType)==1){let E=T.dom.getBoundingClientRect();return e.y<E.top||e.y<=E.bottom&&e.x<=(E.left+E.right)/2?T.posAtStart:T.posAtEnd}else return T.localPosFromDOM(S,R)+T.posAtStart}function J5(t,e,n,r,i){let o=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let a=t.viewState.heightOracle.textHeight,c=Math.floor((i-n.top-(t.defaultLineHeight-a)*.5)/a);o+=c*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+w1(s,o,t.state.tabSize)}function AW(t,e,n){let r,i=t;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(;;){let o=i.nextSibling;if(o){if(o.nodeName=="BR")break;return!1}else{let s=i.parentNode;if(!s||s.nodeName=="DIV")break;i=s}}return yo(t,r-1,r).getBoundingClientRect().right>n}function RW(t,e,n){if(e!=0)return!1;for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():yo(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function _1(t,e,n){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let o of r.type){if(o.from>e)break;if(!(o.to<e)){if(o.from<e&&o.to>e)return o;(!i||o.type==en.Text&&(i.type!=o.type||(n<0?o.from<e:o.to>e)))&&(i=o)}}return i||r}return r}function kW(t,e,n,r){let i=_1(t,e.head,e.assoc||-1),o=!r||i.type!=en.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(i.from),c=t.posAtCoords({x:n==(a==st.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(c!=null)return Q.cursor(c,n?-1:1)}return Q.cursor(n?i.to:i.from,n?-1:1)}function eb(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),s=t.textDirectionAt(i.from);for(let a=e,c=null;;){let h=fW(i,o,s,a,n),f=E6;if(!h){if(i.number==(n?t.state.doc.lines:1))return a;f=`
`,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),h=t.visualLineSide(i,!n)}if(c){if(!c(f))return a}else{if(!r)return h;c=r(f)}a=h}}function TW(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let s=r(o);return i==lt.Space&&(i=s),i==s}}function MW(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return Q.cursor(i,e.assoc);let s=e.goalColumn,a,c=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(i,e.assoc||-1),f=t.documentTop;if(h)s==null&&(s=h.left-c.left),a=o<0?h.top:h.bottom;else{let v=t.viewState.lineBlockAt(i);s==null&&(s=Math.min(c.right-c.left,t.defaultCharacterWidth*(i-v.from))),a=(o<0?v.top:v.bottom)+f}let d=c.left+s,g=r??t.viewState.heightOracle.textHeight>>1;for(let v=0;;v+=10){let x=a+(g+v)*o,w=q6(t,{x:d,y:x},!1,o);if(x<c.top||x>c.bottom||(o<0?w<i:w>i)){let C=t.docView.coordsForChar(w),S=!C||x<C.top?-1:1;return Q.cursor(w,S,void 0,s)}}}function xu(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(o,s,a)=>{if(e>o&&e<s){let c=r||n||(e-o<s-e?-1:1);e=c<0?o:s,r=c}});if(!r)return e}}function o0(t,e,n){let r=xu(t.state.facet(km).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:Q.cursor(r,r<n.from?1:-1)}const ka="￿";class EW{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(Ue.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=ka}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let o=this.text.length;this.readNode(i);let s=i.nextSibling;if(s==n)break;let a=nt.get(i),c=nt.get(s);(a&&c?a.breakAfter:(a?a.breakAfter:Uu(i))||Uu(s)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>o)&&this.lineBreak(),i=s}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,s=1,a;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),s=this.lineSeparator.length):(a=i.exec(n))&&(o=a.index,s=a[0].length),this.append(n.slice(r,o<0?n.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let c of this.points)c.node==e&&c.pos>this.text.length&&(c.pos-=s-1);r=o+s}}readNode(e){if(e.cmIgnore)return;let n=nt.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(OW(e,r.node,r.offset)?n:0))}}function OW(t,e,n){for(;;){if(!e||n<Sr(e))return!1;if(e==t)return!0;n=xo(e)+1,e=e.parentNode}}class tb{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class DW{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:o,impreciseAnchor:s}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let a=o||s?[]:LW(e),c=new EW(a,e.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=BW(a,this.bounds.from)}else{let a=e.observer.selectionRange,c=o&&o.node==a.focusNode&&o.offset==a.focusOffset||!C1(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),h=s&&s.node==a.anchorNode&&s.offset==a.anchorOffset||!C1(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),f=e.viewport;if((he.ios||he.chrome)&&e.state.selection.main.empty&&c!=h&&(f.from>0||f.to<e.state.doc.length)){let d=Math.min(c,h),g=Math.max(c,h),v=f.from-d,x=f.to-g;(v==0||v==1||d==0)&&(x==0||x==-1||g==e.state.doc.length)&&(c=0,h=e.state.doc.length)}this.newSel=Q.single(h,c)}}}function K6(t,e){let n,{newSel:r}=e,i=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:a}=e.bounds,c=i.from,h=null;(o===8||he.android&&e.text.length<a-s)&&(c=i.to,h="end");let f=_W(t.state.doc.sliceString(s,a,ka),e.text,c-s,h);f&&(he.chrome&&o==13&&f.toB==f.from+2&&e.text.slice(f.from,f.toB)==ka+ka&&f.toB--,n={from:s+f.from,to:s+f.toA,insert:Ge.of(e.text.slice(f.from,f.toB).split(ka))})}else r&&(!t.hasFocus&&t.state.facet(qr)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&e.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:(he.mac||he.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=Q.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:Ge.of([n.insert.toString().replace("."," ")])}):n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:he.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
 `&&t.lineWrapping&&(r&&(r=Q.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Ge.of([" "])}),n)return Mm(t,n,r,o);if(r&&!r.main.eq(i)){let s=!1,a="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),a=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:s,userEvent:a}),!0}else return!1}function Mm(t,e,n,r=-1){if(he.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(he.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&xs(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&xs(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&xs(t.contentDOM,"Delete",46)))return!0;let o=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let s,a=()=>s||(s=IW(t,e,n));return t.state.facet(L6).some(c=>c(t,e.from,e.to,o,a))||t.dispatch(a()),!0}function IW(t,e,n){let r,i=t.state,o=i.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let a=o.from<e.from?i.sliceDoc(o.from,e.from):"",c=o.to>e.to?i.sliceDoc(e.to,o.to):"";r=i.replaceSelection(t.state.toText(a+e.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let a=i.changes(e),c=n&&n.main.to<=a.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let h=t.state.sliceDoc(e.from,e.to),f,d=n&&U6(t,n.main.head);if(d){let x=e.insert.length-(e.to-e.from);f={from:d.from,to:d.to-x}}else f=t.state.doc.lineAt(o.head);let g=o.to-e.to,v=o.to-o.from;r=i.changeByRange(x=>{if(x.from==o.from&&x.to==o.to)return{changes:a,range:c||x.map(a)};let w=x.to-g,C=w-h.length;if(x.to-x.from!=v||t.state.sliceDoc(C,w)!=h||x.to>=f.from&&x.from<=f.to)return{range:x};let S=i.changes({from:C,to:w,insert:e.insert}),R=x.to-o.to;return{changes:S,range:c?Q.range(Math.max(0,c.anchor+R),Math.max(0,c.head+R)):x.map(S)}})}else r={changes:a,selection:c&&i.selection.replaceRange(c)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function _W(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o<i&&t.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==i&&t.length==e.length)return null;let s=t.length,a=e.length;for(;s>0&&a>0&&t.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if(r=="end"){let c=Math.max(0,o-Math.min(s,a));n-=s+c-o}if(s<o&&t.length<e.length){let c=n<=o&&n>=s?o-n:0;o-=c,a=o+(a-s),s=o}else if(a<o){let c=n<=o&&n>=a?o-n:0;o-=c,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}function LW(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new tb(n,r)),(i!=n||o!=r)&&e.push(new tb(i,o))),e}function BW(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?Q.single(n+e,r+e):null}class NW{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,he.safari&&e.contentDOM.addEventListener("input",()=>null),he.gecko&&JW(e.contentDOM.ownerDocument)}handleEvent(e){!UW(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=jW(e),r=this.handlers,i=this.view.contentDOM;for(let o in n)if(o!="scroll"){let s=!n[o].handlers.length,a=r[o];a&&s!=!a.handlers.length&&(i.removeEventListener(o,this.handleEvent),a=null),a||i.addEventListener(o,this.handleEvent,{passive:s})}for(let o in r)o!="scroll"&&!n[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Y6.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),he.android&&he.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return he.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=G6.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||FW.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,xs(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:he.safari&&!he.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function nb(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){hn(n.state,i)}}}function jW(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec,o=i&&i.plugin.domEventHandlers,s=i&&i.plugin.domEventObservers;if(o)for(let a in o){let c=o[a];c&&n(a).handlers.push(nb(r.value,c))}if(s)for(let a in s){let c=s[a];c&&n(a).observers.push(nb(r.value,c))}}for(let r in tr)n(r).handlers.push(tr[r]);for(let r in Hn)n(r).observers.push(Hn[r]);return e}const G6=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],FW="dthko",Y6=[16,17,18,20,91,92,224,225],qc=6;function Kc(t){return Math.max(0,t)*.7+8}function VW(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class HW{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=GP(e.contentDOM),this.atoms=e.state.facet(km).map(s=>s(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Ue.allowMultipleSelections)&&PW(e,n),this.dragging=zW(e,n)&&Q6(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&VW(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,o=0,s=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:s}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:a}=this.scrollParents.y.getBoundingClientRect());let c=Tm(this.view);e.clientX-c.left<=i+qc?n=-Kc(i-e.clientX):e.clientX+c.right>=s-qc&&(n=Kc(e.clientX-s)),e.clientY-c.top<=o+qc?r=-Kc(o-e.clientY):e.clientY+c.bottom>=a-qc&&(r=Kc(e.clientY-a)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],o=null;if(i.empty){let s=xu(this.atoms,i.from,0);s!=i.from&&(o=Q.cursor(s,-1))}else{let s=xu(this.atoms,i.from,-1),a=xu(this.atoms,i.to,1);(s!=i.from||a!=i.to)&&(o=Q.range(i.from==i.anchor?s:a,i.from==i.head?s:a))}o&&(n||(n=e.ranges.slice()),n[r]=o)}return n?Q.create(n,e.mainIndex):e}select(e){let{view:n}=this,r=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function PW(t,e){let n=t.state.facet(O6);return n.length?n[0](e):he.mac?e.metaKey:e.ctrlKey}function WW(t,e){let n=t.state.facet(D6);return n.length?n[0](e):he.mac?!e.altKey:!e.ctrlKey}function zW(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=Ga(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o<i.length;o++){let s=i[o];if(s.left<=e.clientX&&s.right>=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function UW(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=nt.get(n))&&r.ignoreEvent(e))return!1;return!0}const tr=Object.create(null),Hn=Object.create(null),X6=he.ie&&he.ie_version<15||he.ios&&he.webkit_version<604;function qW(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),Z6(t,n.value)},50)}function Wh(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function Z6(t,e){e=Wh(t.state,Sm,e);let{state:n}=t,r,i=1,o=n.toText(e),s=o.lines==n.selection.ranges.length;if(L1!=null&&n.selection.ranges.every(c=>c.empty)&&L1==o.toString()){let c=-1;r=n.changeByRange(h=>{let f=n.doc.lineAt(h.from);if(f.from==c)return{range:h};c=f.from;let d=n.toText((s?o.line(i++).text:e)+n.lineBreak);return{changes:{from:f.from,insert:d},range:Q.cursor(h.from+d.length)}})}else s?r=n.changeByRange(c=>{let h=o.line(i++);return{changes:{from:c.from,to:c.to,insert:h.text},range:Q.cursor(c.from+h.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Hn.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};tr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);Hn.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};Hn.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};tr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(I6))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=YW(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new HW(t,e,n,r)),r&&t.observer.ignore(()=>{f6(t.contentDOM);let o=t.root.activeElement;o&&!o.contains(t.contentDOM)&&o.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function rb(t,e,n,r){if(r==1)return Q.cursor(e,n);if(r==2)return CW(t.state,e,n);{let i=xt.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),s=i?i.posAtStart:o.from,a=i?i.posAtEnd:o.to;return a<t.state.doc.length&&a==o.to&&a++,Q.range(s,a)}}let ib=(t,e,n)=>e>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function KW(t,e,n,r){let i=xt.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&ib(n,r,s))return-1;let a=i.coordsAt(o,1);return a&&ib(n,r,a)?1:s&&s.bottom>=r?-1:1}function ob(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:KW(t,n,e.clientX,e.clientY)}}const GW=he.ie&&he.ie_version<=11;let sb=null,ab=0,lb=0;function Q6(t){if(!GW)return t.detail;let e=sb,n=lb;return sb=t,lb=Date.now(),ab=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(ab+1)%3:1}function YW(t,e){let n=ob(t,e),r=Q6(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,s,a){let c=ob(t,o),h,f=rb(t,c.pos,c.bias,r);if(n.pos!=c.pos&&!s){let d=rb(t,n.pos,n.bias,r),g=Math.min(d.from,f.from),v=Math.max(d.to,f.to);f=g<f.from?Q.range(g,v):Q.range(v,g)}return s?i.replaceRange(i.main.extend(f.from,f.to)):a&&r==1&&i.ranges.length>1&&(h=XW(i,c.pos))?h:a?i.addRange(f):Q.create([f])}}}function XW(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return Q.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}tr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,s=o+i.length;(o>=n.to||s<=n.from)&&(n=Q.range(o,s))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",Wh(t.state,Am,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};tr.dragend=t=>(t.inputState.draggedContent=null,!1);function cb(t,e,n,r){if(n=Wh(t.state,Sm,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,s=r&&o&&WW(t,e)?{from:o.from,to:o.to}:null,a={from:i,insert:n},c=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}tr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&cb(t,e,r.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s<n.length;s++){let a=new FileReader;a.onerror=o,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(r[s]=a.result),o()},a.readAsText(n[s])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return cb(t,e,r,!0),!0}return!1};tr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=X6?null:e.clipboardData;return n?(Z6(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(qW(t),!1)};function ZW(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function QW(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let s=t.doc.lineAt(o);s.number>i&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),i=s.number}r=!0}return{text:Wh(t,Am,e.join(t.lineBreak)),ranges:n,linewise:r}}let L1=null;tr.copy=tr.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=QW(t.state);if(!n&&!i)return!1;L1=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=X6?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(ZW(t,n),!1)};const J6=Tr.define();function e4(t,e){let n=[];for(let r of t.facet(B6)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:J6.of(!0)}):null}function t4(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=e4(t.state,e);n?t.dispatch(n):t.update([])}},10)}Hn.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),t4(t)};Hn.blur=t=>{t.observer.clearSelectionRange(),t4(t)};Hn.compositionstart=Hn.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};Hn.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,he.chrome&&he.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};Hn.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};tr.beforeinput=(t,e)=>{var n,r;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let o=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),s=e.getTargetRanges();if(o&&s.length){let a=s[0],c=t.posAtDOM(a.startContainer,a.startOffset),h=t.posAtDOM(a.endContainer,a.endOffset);return Mm(t,{from:c,to:h,insert:t.state.toText(o)},null),!0}}let i;if(he.chrome&&he.android&&(i=G6.find(o=>o.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let o=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>o+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return he.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),he.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>Hn.compositionend(t,e),20),!1};const ub=new Set;function JW(t){ub.has(t)||(ub.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const hb=["pre-wrap","normal","pre-line","break-spaces"];let Ls=!1;function fb(){Ls=!1}class ez{constructor(e){this.lineWrapping=e,this.doc=Ge.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return hb.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,o,s){let a=hb.indexOf(e)>-1,c=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,c){this.heightSamples={};for(let h=0;h<s.length;h++){let f=s[h];f<0?h++:this.heightSamples[Math.floor(f*10)]=!0}}return c}}class tz{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class mr{constructor(e,n,r,i,o){this.from=e,this.length=n,this.top=r,this.height=i,this._content=o}get type(){return typeof this._content=="number"?en.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Li?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new mr(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var ot=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(ot||(ot={}));const yu=.001;class tn{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>yu&&(Ls=!0),this.height=e)}replace(e,n,r){return tn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,s=r.doc;for(let a=i.length-1;a>=0;a--){let{fromA:c,toA:h,fromB:f,toB:d}=i[a],g=o.lineAt(c,ot.ByPosNoHeight,r.setDoc(n),0,0),v=g.to>=h?g:o.lineAt(h,ot.ByPosNoHeight,r,0,0);for(d+=v.to-h,h=v.to;a>0&&g.from<=i[a-1].toA;)c=i[a-1].fromA,f=i[a-1].fromB,a--,c<g.from&&(g=o.lineAt(c,ot.ByPosNoHeight,r,0,0));f+=g.from-c,c=g.from;let x=Em.build(r.setDoc(s),e,f,d);o=Gu(o,o.replace(c,h,x))}return o.updateHeight(r,0)}static empty(){return new Sn(0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,o=0;for(;;)if(n==r)if(i>o*2){let a=e[n-1];a.break?e.splice(--n,1,a.left,null,a.right):e.splice(--n,1,a.left,a.right),r+=1+a.break,i-=a.size}else if(o>i*2){let a=e[r];a.break?e.splice(r,1,a.left,null,a.right):e.splice(r,1,a.left,a.right),r+=2+a.break,o-=a.size}else break;else if(i<o){let a=e[n++];a&&(i+=a.size)}else{let a=e[--r];a&&(o+=a.size)}let s=0;return e[n-1]==null?(s=1,n--):e[n]==null&&(s=1,r++),new nz(tn.of(e.slice(0,n)),s,tn.of(e.slice(r)))}}function Gu(t,e){return t==e?t:(t.constructor!=e.constructor&&(Ls=!0),e)}tn.prototype.size=1;class n4 extends tn{constructor(e,n,r){super(e,n),this.deco=r}blockAt(e,n,r,i){return new mr(i,this.length,r,this.height,this.deco||0)}lineAt(e,n,r,i,o){return this.blockAt(0,r,i,o)}forEachLine(e,n,r,i,o,s){e<=o+this.length&&n>=o&&s(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Sn extends n4{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new mr(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof Sn||i instanceof Ft&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Ft?i=new Sn(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):tn.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Ft extends tn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+1,s,a=0;if(e.lineWrapping){let c=Math.min(this.height,e.lineHeight*o);s=c/o,this.length>o+1&&(a=(this.height-c)/(this.length-o-1))}else s=this.height/o;return{firstLine:r,lastLine:i,perLine:s,perChar:a}}blockAt(e,n,r,i){let{firstLine:o,lastLine:s,perLine:a,perChar:c}=this.heightMetrics(n,i);if(n.lineWrapping){let h=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),f=n.doc.lineAt(h),d=a+f.length*c,g=Math.max(r,e-d/2);return new mr(f.from,f.length,g,d,0)}else{let h=Math.max(0,Math.min(s-o,Math.floor((e-r)/a))),{from:f,length:d}=n.doc.line(o+h);return new mr(f,d,r+a*h,a,0)}}lineAt(e,n,r,i,o){if(n==ot.ByHeight)return this.blockAt(e,r,i,o);if(n==ot.ByPosNoHeight){let{from:v,to:x}=r.doc.lineAt(e);return new mr(v,x-v,0,0,0)}let{firstLine:s,perLine:a,perChar:c}=this.heightMetrics(r,o),h=r.doc.lineAt(e),f=a+h.length*c,d=h.number-s,g=i+a*d+c*(h.from-o-d);return new mr(h.from,h.length,Math.max(i,Math.min(g,i+this.height-f)),f,0)}forEachLine(e,n,r,i,o,s){e=Math.max(e,o),n=Math.min(n,o+this.length);let{firstLine:a,perLine:c,perChar:h}=this.heightMetrics(r,o);for(let f=e,d=i;f<=n;){let g=r.doc.lineAt(f);if(f==e){let x=g.number-a;d+=c*x+h*(e-o-x)}let v=c+h*g.length;s(new mr(g.from,g.length,d,v,0)),d+=v,f=g.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let o=r[r.length-1];o instanceof Ft?r[r.length-1]=new Ft(o.length+i):r.push(null,new Ft(i-1))}if(e>0){let o=r[0];o instanceof Ft?r[0]=new Ft(e+o.length):r.unshift(new Ft(e-1),null)}return tn.of(r)}decomposeLeft(e,n){n.push(new Ft(e-1),null)}decomposeRight(e,n){n.push(null,new Ft(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let s=[],a=Math.max(n,i.from),c=-1;for(i.from>n&&s.push(new Ft(i.from-n-1).updateHeight(e,n));a<=o&&i.more;){let f=e.doc.lineAt(a).length;s.length&&s.push(null);let d=i.heights[i.index++];c==-1?c=d:Math.abs(d-c)>=yu&&(c=-2);let g=new Sn(f,d);g.outdated=!1,s.push(g),a+=f+1}a<=o&&s.push(null,new Ft(o-a).updateHeight(e,a));let h=tn.of(s);return(c<0||Math.abs(h.height-this.height)>=yu||Math.abs(c-this.heightMetrics(e,n).perLine)>=yu)&&(Ls=!0),Gu(this,h)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class nz extends tn{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return e<o?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,o,i+this.left.length+this.break)}lineAt(e,n,r,i,o){let s=i+this.left.height,a=o+this.left.length+this.break,c=n==ot.ByHeight?e<s:e<a,h=c?this.left.lineAt(e,n,r,i,o):this.right.lineAt(e,n,r,s,a);if(this.break||(c?h.to<a:h.from>a))return h;let f=n==ot.ByPosNoHeight?ot.ByPosNoHeight:ot.ByPos;return c?h.join(this.right.lineAt(a,f,r,s,a)):this.left.lineAt(a,f,r,i,o).join(h)}forEachLine(e,n,r,i,o,s){let a=i+this.left.height,c=o+this.left.length+this.break;if(this.break)e<c&&this.left.forEachLine(e,n,r,i,o,s),n>=c&&this.right.forEachLine(e,n,r,a,c,s);else{let h=this.lineAt(c,ot.ByPos,r,i,o);e<h.from&&this.left.forEachLine(e,h.from-1,r,i,o,s),h.to>=e&&h.from<=n&&s(h),n>h.to&&this.right.forEachLine(h.to+1,n,r,a,c,s)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let s=o.length;for(let a of r)o.push(a);if(e>0&&db(o,s-1),n<this.length){let a=o.length;this.decomposeRight(n,o),db(o,a)}return tn.of(o)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?tn.of(this.break?[e,null,n]:[e,n]):(this.left=Gu(this.left,e),this.right=Gu(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:o,right:s}=this,a=n+o.length+this.break,c=null;return i&&i.from<=n+o.length&&i.more?c=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=a+s.length&&i.more?c=s=s.updateHeight(e,a,r,i):s.updateHeight(e,a,r),c?this.balanced(o,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function db(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Ft&&(r=t[e+1])instanceof Ft&&t.splice(e-1,3,new Ft(n.length+1+r.length))}const rz=5;class Em{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Sn?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Sn(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,o=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let s=n-e;r.block?this.addBlock(new n4(s,i,r)):(s||o||i>=rz)&&this.addLineDeco(i,o,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Sn(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new Ft(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Sn)return e;let n=new Sn(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Sn)&&!this.isCovered?this.nodes.push(new Sn(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Sn&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let o=new Em(r,e);return Ke.spans(n,r,i,o,0),o.finish(r)}}function iz(t,e,n){let r=new oz;return Ke.compare(t,e,n,r,0),r.changes}class oz{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&wu(e,n,this.changes,5)}}function sz(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let h=t.parentNode;h&&h!=r.body;)if(h.nodeType==1){let f=h,d=window.getComputedStyle(f);if((f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)&&d.overflow!="visible"){let g=f.getBoundingClientRect();o=Math.max(o,g.left),s=Math.min(s,g.right),a=Math.max(a,g.top),c=Math.min(h==t.parentNode?i.innerHeight:c,g.bottom)}h=d.position=="absolute"||d.position=="fixed"?f.offsetParent:f.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+e),bottom:Math.max(a,c)-(n.top+e)}}function az(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function lz(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class s0{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=n[r];if(i.from!=o.from||i.to!=o.to||i.size!=o.size)return!1}return!0}draw(e,n){return xe.replace({widget:new cz(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class cz extends ai{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class gb{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=mb,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=st.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(Rm).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new ez(n),this.stateDeco=e.facet(Ya).filter(r=>typeof r!="function"),this.heightMap=tn.empty().applyChanges(this.stateDeco,Ge.empty,this.heightOracle.setDoc(e.doc),[new Vn(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=xe.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:s})=>i>=o&&i<=s)){let{from:o,to:s}=this.lineBlockAt(i);e.push(new Gc(o,s))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?mb:new Om(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Ta(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(Ya).filter(f=>typeof f!="function");let i=e.changedRanges,o=Vn.extendWithRanges(i,iz(r,this.stateDeco,e?e.changes:Rt.empty(this.state.doc.length))),s=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);fb(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=s||Ls)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=s);let c=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<c.from||n.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,n));let h=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(j6)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?st.RTL:st.LTR;let s=this.heightOracle.mustRefreshForWrapping(o),a=n.getBoundingClientRect(),c=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let h=0,f=0;if(a.width&&a.height){let{scaleX:E,scaleY:O}=h6(n,a);(E>.005&&Math.abs(this.scaleX-E)>.005||O>.005&&Math.abs(this.scaleY-O)>.005)&&(this.scaleX=E,this.scaleY=O,h|=16,s=c=!0)}let d=(parseInt(r.paddingTop)||0)*this.scaleY,g=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=g)&&(this.paddingTop=d,this.paddingBottom=g,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let v=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=v&&(this.scrollAnchorHeight=-1,this.scrollTop=v),this.scrolledToBottom=g6(e.scrollDOM);let x=(this.printing?lz:sz)(n,this.paddingTop),w=x.top-this.pixelViewport.top,C=x.bottom-this.pixelViewport.bottom;this.pixelViewport=x;let S=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(S!=this.inView&&(this.inView=S,S&&(c=!0)),!this.inView&&!this.scrollTarget&&!az(e.dom))return 0;let R=a.width;if((this.contentDOMWidth!=R||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),c){let E=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(E)&&(s=!0),s||i.lineWrapping&&Math.abs(R-this.contentDOMWidth)>i.charWidth){let{lineHeight:O,charWidth:L,textHeight:I}=e.docView.measureTextSize();s=O>0&&i.refresh(o,O,L,I,R/L,E),s&&(e.docView.minWidth=0,h|=16)}w>0&&C>0?f=Math.max(w,C):w<0&&C<0&&(f=Math.min(w,C)),fb();for(let O of this.viewports){let L=O.from==this.viewport.from?E:e.docView.measureVisibleLineHeights(O);this.heightMap=(s?tn.empty().applyChanges(this.stateDeco,Ge.empty,this.heightOracle,[new Vn(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,s,new tz(O.from,L))}Ls&&(h|=2)}let T=!this.viewportIsAppropriate(this.viewport,f)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return T&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(f,this.scrollTarget),h|=this.updateForViewport()),(h&2||T)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:s,visibleBottom:a}=this,c=new Gc(i.lineAt(s-r*1e3,ot.ByHeight,o,0,0).from,i.lineAt(a+(1-r)*1e3,ot.ByHeight,o,0,0).to);if(n){let{head:h}=n.range;if(h<c.from||h>c.to){let f=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=i.lineAt(h,ot.ByPos,o,0,0),g;n.y=="center"?g=(d.top+d.bottom)/2-f/2:n.y=="start"||n.y=="nearest"&&h<c.from?g=d.top:g=d.bottom-f,c=new Gc(i.lineAt(g-1e3/2,ot.ByHeight,o,0,0).from,i.lineAt(g+f+1e3/2,ot.ByHeight,o,0,0).to)}}return c}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new Gc(this.heightMap.lineAt(r,ot.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,ot.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,ot.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(n,ot.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:a}=this;return(e==0||i<=s-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||o>=a+Math.max(10,Math.min(r,250)))&&i>s-2*1e3&&o<a+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new s0(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,o=i>>1,s=i<<1;if(this.defaultTextDirection!=st.LTR&&!r)return[];let a=[],c=(f,d,g,v)=>{if(d-f<o)return;let x=this.state.selection.main,w=[x.from];x.empty||w.push(x.to);for(let S of w)if(S>f&&S<d){c(f,S-10,g,v),c(S+10,d,g,v);return}let C=hz(e,S=>S.from>=g.from&&S.to<=g.to&&Math.abs(S.from-f)<o&&Math.abs(S.to-d)<o&&!w.some(R=>S.from<R&&S.to>R));if(!C){if(d<g.to&&n&&r&&n.visibleRanges.some(T=>T.from<=d&&T.to>=d)){let T=n.moveToLineBoundary(Q.cursor(d),!1,!0).head;T>f&&(d=T)}let S=this.gapSize(g,f,d,v),R=r||S<2e6?S:2e6;C=new s0(f,d,S,R)}a.push(C)},h=f=>{if(f.length<s||f.type!=en.Text)return;let d=uz(f.from,f.to,this.stateDeco);if(d.total<s)return;let g=this.scrollTarget?this.scrollTarget.range.head:null,v,x;if(r){let w=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,C,S;if(g!=null){let R=Xc(d,g),T=((this.visibleBottom-this.visibleTop)/2+w)/f.height;C=R-T,S=R+T}else C=(this.visibleTop-f.top-w)/f.height,S=(this.visibleBottom-f.top+w)/f.height;v=Yc(d,C),x=Yc(d,S)}else{let w=d.total*this.heightOracle.charWidth,C=i*this.heightOracle.charWidth,S=0;if(w>2e6)for(let L of e)L.from>=f.from&&L.from<f.to&&L.size!=L.displaySize&&L.from*this.heightOracle.charWidth+S<this.pixelViewport.left&&(S=L.size-L.displaySize);let R=this.pixelViewport.left+S,T=this.pixelViewport.right+S,E,O;if(g!=null){let L=Xc(d,g),I=((T-R)/2+C)/w;E=L-I,O=L+I}else E=(R-C)/w,O=(T+C)/w;v=Yc(d,E),x=Yc(d,O)}v>f.from&&c(f.from,v,f,d),x<f.to&&c(x,f.to,f,d)};for(let f of this.viewportLines)Array.isArray(f.type)?f.type.forEach(h):h(f);return a}gapSize(e,n,r,i){let o=Xc(i,r)-Xc(i,n);return this.heightOracle.lineWrapping?e.height*o:i.total*this.heightOracle.charWidth*o}updateLineGaps(e){s0.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=xe.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];Ke.spans(n,this.viewport.from,this.viewport.to,{span(o,s){r.push({from:o,to:s})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let o=0;o<r.length&&!(i&8);o++){let s=this.visibleRanges[o],a=r[o];(s.from!=a.from||s.to!=a.to)&&(i|=4,e&&e.mapPos(s.from,-1)==a.from&&e.mapPos(s.to,1)==a.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Ta(this.heightMap.lineAt(e,ot.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||Ta(this.heightMap.lineAt(this.scaler.fromDOM(e),ot.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Ta(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}let Gc=class{constructor(e,n){this.from=e,this.to=n}};function uz(t,e,n){let r=[],i=t,o=0;return Ke.spans(n,t,e,{span(){},point(s,a){s>i&&(r.push({from:i,to:s}),o+=s-i),i=a}},20),i<e&&(r.push({from:i,to:e}),o+=e-i),{total:o,ranges:r}}function Yc({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:s}=e[i],a=s-o;if(r<=a)return o+r;r-=a}}function Xc(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function hz(t,e){for(let n of t)if(e(n))return n}const mb={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class Om{constructor(e,n,r){let i=0,o=0,s=0;this.viewports=r.map(({from:a,to:c})=>{let h=n.lineAt(a,ot.ByPos,e,0,0).top,f=n.lineAt(c,ot.ByPos,e,0,0).bottom;return i+=f-h,{from:a,to:c,top:h,bottom:f,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let a of this.viewports)a.domTop=s+(a.top-o)*this.scale,s=a.domBottom=a.domTop+(a.bottom-a.top),o=a.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.top)return i+(e-r)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);r=o.bottom,i=o.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let o=n<this.viewports.length?this.viewports[n]:null;if(!o||e<o.domTop)return r+(e-i)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);r=o.bottom,i=o.domBottom}}eq(e){return e instanceof Om?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,r)=>n.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function Ta(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new mr(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>Ta(i,e)):t._content)}const Zc=fe.define({combine:t=>t.join(" ")}),B1=fe.define({combine:t=>t.indexOf(!0)>-1}),N1=Ii.newName(),r4=Ii.newName(),i4=Ii.newName(),o4={"&light":"."+r4,"&dark":"."+i4};function j1(t,e,n){return new Ii(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const fz=j1("."+N1,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},o4),dz={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},a0=he.ie&&he.ie_version<=11;class gz{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new YP,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(he.ie&&he.ie_version<=11||he.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&he.android&&e.constructor.EDIT_CONTEXT!==!1&&!(he.chrome&&he.chrome_version<126)&&(this.editContext=new pz(e),e.state.facet(qr)&&(e.contentDOM.editContext=this.editContext.editContext)),a0&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(qr)?r.root.activeElement!=this.dom:!bu(this.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(he.ie&&he.ie_version<=11||he.android&&he.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Ia(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Ga(e.root);if(!n)return!1;let r=he.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&mz(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=bu(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&ZP(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,dz),a0&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),a0&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&xs(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let o of e){let s=this.readMutation(o);s&&(s.typeOver&&(i=!0),n==-1?{from:n,to:r}=s:(n=Math.min(s.from,n),r=Math.max(s.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&bu(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new DW(this.view,e,n,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=K6(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=pb(n,e.previousSibling||e.target.previousSibling,-1),i=pb(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(qr)!=e.state.facet(qr)&&(e.view.contentDOM.editContext=e.state.facet(qr)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function pb(t,e,n){for(;e;){let r=nt.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function vb(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);return Ia(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function mz(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return vb(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?vb(t,n):null}class pz{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:o,head:s}=i,a=this.toEditorPos(r.updateRangeStart),c=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:a,drifted:!1});let h={from:a,to:c,insert:Ge.of(r.text.split(`
`))};if(h.from==this.from&&o<this.from?h.from=o:h.to==this.to&&o>this.to&&(h.to=o),h.from==h.to&&!h.insert.length){let f=Q.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));f.main.eq(i)||e.dispatch({selection:f,userEvent:"select"});return}if((he.mac||he.android)&&h.from==s-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(h={from:a,to:c,insert:Ge.of([r.text.replace("."," ")])}),this.pendingContextChange=h,!e.state.readOnly){let f=this.to-this.from+(h.to-h.from+h.insert.length);Mm(e,h,Q.single(this.toEditorPos(r.selectionStart,f),this.toEditorPos(r.selectionEnd,f)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=r=>{let i=[],o=null;for(let s=this.toEditorPos(r.rangeStart),a=this.toEditorPos(r.rangeEnd);s<a;s++){let c=e.coordsForChar(s);o=c&&new DOMRect(c.left,c.top,c.right-c.left,c.bottom-c.top)||o||new DOMRect,i.push(o)}n.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let o of r.getTextFormats()){let s=o.underlineStyle,a=o.underlineThickness;if(s!="None"&&a!="None"){let c=this.toEditorPos(o.rangeStart),h=this.toEditorPos(o.rangeEnd);if(c<h){let f=`text-decoration: underline ${s=="Dashed"?"dashed ":s=="Squiggle"?"wavy ":""}${a=="Thin"?1:2}px`;i.push(xe.mark({attributes:{style:f}}).range(c,h))}}}e.dispatch({effects:V6.of(xe.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Ga(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((o,s,a,c,h)=>{if(r)return;let f=h.length-(s-o);if(i&&s>=i.to)if(i.from==o&&i.to==s&&i.insert.eq(h)){i=this.pendingContextChange=null,n+=f,this.to+=f;return}else i=null,this.revertPending(e.state);if(o+=n,s+=n,s<=this.from)this.from+=f,this.to+=f;else if(o<this.to){if(o<this.from||s>this.to||this.to-this.from+h.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(s),h.toString()),this.to+=f}n+=f}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class le{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(o=>r(o,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||XP(e.parent)||document,this.viewState=new gb(e.state||Ue.create(e)),e.scrollTo&&e.scrollTo.is(Uc)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(fs).map(i=>new r0(i));for(let i of this.plugins)i.update(this);this.observer=new gz(this),this.inputState=new NW(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Y5(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof kt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,o=this.state;for(let g of e){if(g.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=g.state}if(this.destroyed){this.viewState.state=o;return}let s=this.hasFocus,a=0,c=null;e.some(g=>g.annotation(J6))?(this.inputState.notifiedFocused=s,a=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,c=e4(o,s),c||(a=1));let h=this.observer.delayedAndroidKey,f=null;if(h?(this.observer.clearDelayedAndroidKey(),f=this.observer.readChange(),(f&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(f=null)):this.observer.clear(),o.facet(Ue.phrases)!=this.state.facet(Ue.phrases))return this.setState(o);i=Ku.create(this,o,e),i.flags|=a;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let g of e){if(d&&(d=d.map(g.changes)),g.scrollIntoView){let{main:v}=g.state.selection;d=new ys(v.empty?v:Q.cursor(v.head,v.head>v.anchor?-1:1))}for(let v of g.effects)v.is(Uc)&&(d=v.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=Yu.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Ra)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(g=>g.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Zc)!=i.state.facet(Zc)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let g of this.state.facet(D1))try{g(i)}catch(v){hn(this.state,v,"update listener")}(c||f)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),f&&!K6(this,f)&&h.force&&xs(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new gb(e),this.plugins=e.facet(fs).map(r=>new r0(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new Y5(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(fs),r=e.state.facet(fs);if(n!=r){let i=[];for(let o of r){let s=n.indexOf(o);if(s<0)i.push(new r0(o));else{let a=this.plugins[s];a.mustUpdate=e,i.push(a)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){hn(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:s}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(s<0)if(g6(r))o=-1,s=this.viewState.heightMap.height;else{let v=this.viewState.scrollAnchorAt(i);o=v.from,s=v.top}this.updateState=1;let c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];c&4||([this.measureRequests,h]=[h,this.measureRequests]);let f=h.map(v=>{try{return v.read(this)}catch(x){return hn(this.state,x),bb}}),d=Ku.create(this,this.state,[]),g=!1;d.flags|=c,n?n.flags|=c:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),g=this.docView.update(d),g&&this.docViewUpdate());for(let v=0;v<h.length;v++)if(f[v]!=bb)try{let x=h[v];x.write&&x.write(f[v],this)}catch(x){hn(this.state,x)}if(g&&this.docView.updateSelection(!0),!d.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,s=-1;continue}else{let x=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-s;if(x>1||x<-1){i=i+x,r.scrollTop=i/this.scaleY,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let a of this.state.facet(D1))a(n)}get themeClasses(){return N1+" "+(this.state.facet(B1)?i4:r4)+" "+this.state.facet(Zc)}updateAttrs(){let e=wb(this,H6,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(qr)?"true":"false",class:"cm-content",style:`${he.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),wb(this,Rm,n);let r=this.observer.ignore(()=>{let i=k1(this.contentDOM,this.contentAttrs,n),o=k1(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(le.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Ra);let e=this.state.facet(le.cspNonce);Ii.mount(this.root,this.styleModules.concat(fz).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return o0(this,e,eb(this,e,n,r))}moveByGroup(e,n){return o0(this,e,eb(this,e,n,r=>TW(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),o=r[n?r.length-1:0];return Q.cursor(o.side(n,i)+e.from,o.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return kW(this,e,n,r)}moveVertically(e,n,r){return o0(this,e,MW(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),q6(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),s=o[ki.find(o,e-i.from,-1,n)];return vl(r,s.dir==st.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(N6)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>vz)return M6(e.length);let n=this.textDirectionAt(e.from),r;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||T6(o.isolates,r=G5(this,e))))return o.order;r||(r=G5(this,e));let i=hW(e.text,n,r);return this.bidiCache.push(new Yu(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||he.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{f6(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return Uc.of(new ys(typeof e=="number"?Q.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return Uc.of(new ys(Q.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return vt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return vt.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Ii.newName(),i=[Zc.of(r),Ra.of(j1(`.${r}`,e))];return n&&n.dark&&i.push(B1.of(!0)),i}static baseTheme(e){return Oo.lowest(Ra.of(j1("."+N1,e,o4)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&nt.get(r)||nt.get(e);return((n=i?.rootView)===null||n===void 0?void 0:n.view)||null}}le.styleModule=Ra;le.inputHandler=L6;le.clipboardInputFilter=Sm;le.clipboardOutputFilter=Am;le.scrollHandler=F6;le.focusChangeEffect=B6;le.perLineTextDirection=N6;le.exceptionSink=_6;le.updateListener=D1;le.editable=qr;le.mouseSelectionStyle=I6;le.dragMovesSelection=D6;le.clickAddsSelectionRange=O6;le.decorations=Ya;le.outerDecorations=P6;le.atomicRanges=km;le.bidiIsolatedRanges=W6;le.scrollMargins=z6;le.darkTheme=B1;le.cspNonce=fe.define({combine:t=>t.length?t[0]:""});le.contentAttributes=Rm;le.editorAttributes=H6;le.lineWrapping=le.contentAttributes.of({class:"cm-lineWrapping"});le.announce=Ee.define();const vz=4096,bb={};class Yu{constructor(e,n,r,i,o,s){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=s}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:st.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let s=e[o];s.dir==i&&!n.touchesRange(s.from,s.to)&&r.push(new Yu(n.mapPos(s.from,1),n.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return r}}function wb(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let o=r[i],s=typeof o=="function"?o(t):o;s&&R1(s,n)}return n}const bz=he.mac?"mac":he.windows?"win":he.linux?"linux":"key";function wz(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,s,a;for(let c=0;c<n.length-1;++c){const h=n[c];if(/^(cmd|meta|m)$/i.test(h))a=!0;else if(/^a(lt)?$/i.test(h))i=!0;else if(/^(c|ctrl|control)$/i.test(h))o=!0;else if(/^s(hift)?$/i.test(h))s=!0;else if(/^mod$/i.test(h))e=="mac"?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+h)}return i&&(r="Alt-"+r),o&&(r="Ctrl-"+r),a&&(r="Meta-"+r),s&&(r="Shift-"+r),r}function Qc(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const xz=Oo.default(le.domEventHandlers({keydown(t,e){return a4(s4(e.state),t,e,"editor")}})),zh=fe.define({enables:xz}),xb=new WeakMap;function s4(t){let e=t.facet(zh),n=xb.get(e);return n||xb.set(e,n=$z(e.reduce((r,i)=>r.concat(i),[]))),n}function yz(t,e,n){return a4(s4(t.state),e,t,n)}let $i=null;const Cz=4e3;function $z(t,e=bz){let n=Object.create(null),r=Object.create(null),i=(s,a)=>{let c=r[s];if(c==null)r[s]=a;else if(c!=a)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},o=(s,a,c,h,f)=>{var d,g;let v=n[s]||(n[s]=Object.create(null)),x=a.split(/ (?!$)/).map(S=>wz(S,e));for(let S=1;S<x.length;S++){let R=x.slice(0,S).join(" ");i(R,!0),v[R]||(v[R]={preventDefault:!0,stopPropagation:!1,run:[T=>{let E=$i={view:T,prefix:R,scope:s};return setTimeout(()=>{$i==E&&($i=null)},Cz),!0}]})}let w=x.join(" ");i(w,!1);let C=v[w]||(v[w]={preventDefault:!1,stopPropagation:!1,run:((g=(d=v._any)===null||d===void 0?void 0:d.run)===null||g===void 0?void 0:g.slice())||[]});c&&C.run.push(c),h&&(C.preventDefault=!0),f&&(C.stopPropagation=!0)};for(let s of t){let a=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let h of a){let f=n[h]||(n[h]=Object.create(null));f._any||(f._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:d}=s;for(let g in f)f[g].run.push(v=>d(v,F1))}let c=s[e]||s.key;if(c)for(let h of a)o(h,c,s.run,s.preventDefault,s.stopPropagation),s.shift&&o(h,"Shift-"+c,s.shift,s.preventDefault,s.stopPropagation)}return n}let F1=null;function a4(t,e,n,r){F1=e;let i=UP(e),o=ln(i,0),s=gr(o)==i.length&&i!=" ",a="",c=!1,h=!1,f=!1;$i&&$i.view==n&&$i.scope==r&&(a=$i.prefix+" ",Y6.indexOf(e.keyCode)<0&&(h=!0,$i=null));let d=new Set,g=C=>{if(C){for(let S of C.run)if(!d.has(S)&&(d.add(S),S(n)))return C.stopPropagation&&(f=!0),!0;C.preventDefault&&(C.stopPropagation&&(f=!0),h=!0)}return!1},v=t[r],x,w;return v&&(g(v[a+Qc(i,e,!s)])?c=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(he.windows&&e.ctrlKey&&e.altKey)&&(x=_i[e.keyCode])&&x!=i?(g(v[a+Qc(x,e,!0)])||e.shiftKey&&(w=Ka[e.keyCode])!=i&&w!=x&&g(v[a+Qc(w,e,!1)]))&&(c=!0):s&&e.shiftKey&&g(v[a+Qc(i,e,!0)])&&(c=!0),!c&&g(v._any)&&(c=!0)),h&&(c=!0),c&&f&&e.stopPropagation(),F1=null,c}class xl{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let o=l4(e);return[new xl(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return Sz(e,n,r)}}function l4(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==st.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function yb(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let o=t.dom.getBoundingClientRect(),s=(i.top+i.bottom)/2,a=t.posAtCoords({x:o.left+1,y:s}),c=t.posAtCoords({x:o.right-1,y:s});return a==null||c==null?r:{from:Math.max(r.from,Math.min(a,c)),to:Math.min(r.to,Math.max(a,c))}}function Sz(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),o=t.textDirection==st.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),c=l4(t),h=s.querySelector(".cm-line"),f=h&&window.getComputedStyle(h),d=a.left+(f?parseInt(f.paddingLeft)+Math.min(0,parseInt(f.textIndent)):0),g=a.right-(f?parseInt(f.paddingRight):0),v=_1(t,r,1),x=_1(t,i,-1),w=v.type==en.Text?v:null,C=x.type==en.Text?x:null;if(w&&(t.lineWrapping||v.widgetLineBreaks)&&(w=yb(t,r,1,w)),C&&(t.lineWrapping||x.widgetLineBreaks)&&(C=yb(t,i,-1,C)),w&&C&&w.from==C.from&&w.to==C.to)return R(T(n.from,n.to,w));{let O=w?T(n.from,null,w):E(v,!1),L=C?T(null,n.to,C):E(x,!0),I=[];return(w||v).to<(C||x).from-(w&&C?1:0)||v.widgetLineBreaks>1&&O.bottom+t.defaultLineHeight/2<L.top?I.push(S(d,O.bottom,g,L.top)):O.bottom<L.top&&t.elementAtHeight((O.bottom+L.top)/2).type==en.Text&&(O.bottom=L.top=(O.bottom+L.top)/2),R(O).concat(I).concat(R(L))}function S(O,L,I,V){return new xl(e,O-c.left,L-c.top,I-O,V-L)}function R({top:O,bottom:L,horizontal:I}){let V=[];for(let F=0;F<I.length;F+=2)V.push(S(I[F],O,I[F+1],L));return V}function T(O,L,I){let V=1e9,F=-1e9,H=[];function K(G,re,se,te,ne){let Y=t.coordsAtPos(G,G==I.to?-2:2),ce=t.coordsAtPos(se,se==I.from?2:-2);!Y||!ce||(V=Math.min(Y.top,ce.top,V),F=Math.max(Y.bottom,ce.bottom,F),ne==st.LTR?H.push(o&&re?d:Y.left,o&&te?g:ce.right):H.push(!o&&te?d:ce.left,!o&&re?g:Y.right))}let W=O??I.from,J=L??I.to;for(let G of t.visibleRanges)if(G.to>W&&G.from<J)for(let re=Math.max(G.from,W),se=Math.min(G.to,J);;){let te=t.state.doc.lineAt(re);for(let ne of t.bidiSpans(te)){let Y=ne.from+te.from,ce=ne.to+te.from;if(Y>=se)break;ce>re&&K(Math.max(Y,re),O==null&&Y<=W,Math.min(ce,se),L==null&&ce>=J,ne.dir)}if(re=te.to+1,re>=se)break}return H.length==0&&K(W,O==null,J,L==null,t.textDirection),{top:V,bottom:F,horizontal:H}}function E(O,L){let I=a.top+(L?O.top:O.bottom);return{top:I,bottom:I,horizontal:[]}}}function Az(t,e){return t.constructor==e.constructor&&t.eq(e)}class Rz{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(Cu)!=e.state.facet(Cu)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(Cu);for(;n<r.length&&r[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,r)=>!Az(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Cu=fe.define();function c4(t){return[vt.define(e=>new Rz(e,t)),Cu.of(t)]}const Xa=fe.define({combine(t){return Mr(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function kz(t={}){return[Xa.of(t),Tz,Mz,Ez,j6.of(!0)]}function u4(t){return t.startState.facet(Xa)!=t.state.facet(Xa)}const Tz=c4({above:!0,markers(t){let{state:e}=t,n=e.facet(Xa),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty||n.drawRangeCursor){let s=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=i.empty?i:Q.cursor(i.head,i.head>i.anchor?-1:1);for(let c of xl.forRange(t,s,a))r.push(c)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=u4(t);return n&&Cb(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){Cb(e.state,t)},class:"cm-cursorLayer"});function Cb(t,e){e.style.animationDuration=t.facet(Xa).cursorBlinkRate+"ms"}const Mz=c4({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:xl.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||u4(t)},class:"cm-selectionLayer"}),Ez=Oo.highest(le.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),h4=Ee.define({map(t,e){return t==null?null:e.mapPos(t)}}),Ma=Lt.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(h4)?r.value:n,t)}}),Oz=vt.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Ma);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Ma)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Ma),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Ma)!=t&&this.view.dispatch({effects:h4.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Dz(){return[Ma,Oz]}function $b(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),s=n,a;!o.next().done;s+=o.value.length)if(!o.lineBreak)for(;a=e.exec(o.value);)i(s+a.index,a)}function Iz(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class _z{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:o,maxLength:s=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(a,c,h,f)=>i(f,h,h+a[0].length,a,c);else if(typeof r=="function")this.addMatch=(a,c,h,f)=>{let d=r(a,c,h);d&&f(h,h+a[0].length,d)};else if(r)this.addMatch=(a,c,h,f)=>f(h,h+a[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=s}createDeco(e){let n=new Jr,r=n.add.bind(n);for(let{from:i,to:o}of Iz(e,this.maxLength))$b(e.state.doc,this.regexp,i,o,(s,a)=>this.addMatch(a,e,s,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,s,a,c)=>{c>=e.view.viewport.from&&a<=e.view.viewport.to&&(r=Math.min(a,r),i=Math.max(c,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let o of e.visibleRanges){let s=Math.max(o.from,r),a=Math.min(o.to,i);if(a>=s){let c=e.state.doc.lineAt(s),h=c.to<a?e.state.doc.lineAt(a):c,f=Math.max(o.from,c.from),d=Math.min(o.to,h.to);if(this.boundary){for(;s>c.from;s--)if(this.boundary.test(c.text[s-1-c.from])){f=s;break}for(;a<h.to;a++)if(this.boundary.test(h.text[a-h.from])){d=a;break}}let g=[],v,x=(w,C,S)=>g.push(S.range(w,C));if(c==h)for(this.regexp.lastIndex=f-c.from;(v=this.regexp.exec(c.text))&&v.index<d-c.from;)this.addMatch(v,e,v.index+c.from,x);else $b(e.state.doc,this.regexp,f,d,(w,C)=>this.addMatch(C,e,w,x));n=n.update({filterFrom:f,filterTo:d,filter:(w,C)=>w<f||C>d,add:g})}}return n}}const V1=/x/.unicode!=null?"gu":"g",Lz=new RegExp(`[\0-\b
--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,V1),Bz={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let l0=null;function Nz(){var t;if(l0==null&&typeof document<"u"&&document.body){let e=document.body.style;l0=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return l0||!1}const $u=fe.define({combine(t){let e=Mr(t,{render:null,specialChars:Lz,addSpecialChars:null});return(e.replaceTabs=!Nz())&&(e.specialChars=new RegExp("	|"+e.specialChars.source,V1)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,V1)),e}});function jz(t={}){return[$u.of(t),Fz()]}let Sb=null;function Fz(){return Sb||(Sb=vt.fromClass(class{constructor(t){this.view=t,this.decorations=xe.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet($u)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new _z({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=ln(e[0],0);if(o==9){let s=i.lineAt(r),a=n.state.tabSize,c=Xs(s.text,a,r-s.from);return xe.replace({widget:new Wz((a-c%a)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=xe.replace({widget:new Pz(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet($u);t.startState.facet($u)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const Vz="•";function Hz(t){return t>=32?Vz:t==10?"␤":String.fromCharCode(9216+t)}class Pz extends ai{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=Hz(this.code),r=e.state.phrase("Control character")+" "+(Bz[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class Wz extends ai{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="	",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function zz(){return qz}const Uz=xe.line({class:"cm-activeLine"}),qz=vt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(Uz.range(i.from)),e=i.from)}return xe.set(n)}},{decorations:t=>t.decorations});class Kz extends ai{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?Ds(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=vl(n[0],r.direction!="rtl"),o=parseInt(r.lineHeight);return i.bottom-i.top>o*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+o}:i}ignoreEvent(){return!1}}function Gz(t){let e=vt.fromClass(class{constructor(n){this.view=n,this.placeholder=t?xe.set([xe.widget({widget:new Kz(t),side:1}).range(0)]):xe.none}get decorations(){return this.view.state.doc.length?xe.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,le.contentAttributes.of({"aria-placeholder":t})]:e}const H1=2e3;function Yz(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>H1||n.off>H1||e.col<0||n.col<0){let s=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let c=r;c<=i;c++){let h=t.doc.line(c);h.length<=a&&o.push(Q.range(h.from+s,h.to+a))}}else{let s=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let c=r;c<=i;c++){let h=t.doc.line(c),f=w1(h.text,s,t.tabSize,!0);if(f<0)o.push(Q.cursor(h.to));else{let d=w1(h.text,a,t.tabSize);o.push(Q.range(h.from+f,h.from+d))}}}return o}function Xz(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function Ab(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>H1?-1:i==r.length?Xz(t,e.clientX):Xs(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function Zz(t,e){let n=Ab(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),s=i.state.doc.lineAt(o);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},r=r.map(i.changes)}},get(i,o,s){let a=Ab(t,i);if(!a)return r;let c=Yz(t.state,n,a);return c.length?s?Q.create(c.concat(r.ranges)):Q.create(c):r}}:null}function Qz(t){let e=n=>n.altKey&&n.button==0;return le.mouseSelectionStyle.of((n,r)=>e(r)?Zz(n,r):null)}const Jz={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},eU={style:"cursor: crosshair"};function tU(t={}){let[e,n]=Jz[t.key||"Alt"],r=vt.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,le.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?eU:null})]}const ya="-10000px";class f4{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(s=>s);let o=null;this.tooltipViews=this.tooltips.map(s=>o=r(s,o))}update(e,n){var r;let i=e.state.facet(this.facet),o=i.filter(c=>c);if(i===this.input){for(let c of this.tooltipViews)c.update&&c.update(e);return!1}let s=[],a=n?[]:null;for(let c=0;c<o.length;c++){let h=o[c],f=-1;if(h){for(let d=0;d<this.tooltips.length;d++){let g=this.tooltips[d];g&&g.create==h.create&&(f=d)}if(f<0)s[c]=this.createTooltipView(h,c?s[c-1]:null),a&&(a[c]=!!h.above);else{let d=s[c]=this.tooltipViews[f];a&&(a[c]=n[f]),d.update&&d.update(e)}}}for(let c of this.tooltipViews)s.indexOf(c)<0&&(this.removeTooltipView(c),(r=c.destroy)===null||r===void 0||r.call(c));return n&&(a.forEach((c,h)=>n[h]=c),n.length=a.length),this.input=i,this.tooltips=o,this.tooltipViews=s,!0}}function nU(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const c0=fe.define({combine:t=>{var e,n,r;return{position:he.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||nU}}}),Rb=new WeakMap,Dm=vt.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(c0);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new f4(t,Im,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(c0);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=ya,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:o}=this.manager.tooltipViews[0];if(he.gecko)n=o.offsetParent!=this.container.ownerDocument.body;else if(o.style.top==ya&&o.style.left=="0px"){let s=o.getBoundingClientRect();n=Math.abs(s.top+1e4)>1||Math.abs(s.left)>1}}if(n||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(t=o.width/this.parent.offsetWidth,e=o.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=Tm(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((o,s)=>{let a=this.manager.tooltipViews[s];return a.getCoords?a.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(c0).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:o}=t,s=[];for(let a=0;a<this.manager.tooltips.length;a++){let c=this.manager.tooltips[a],h=this.manager.tooltipViews[a],{dom:f}=h,d=t.pos[a],g=t.size[a];if(!d||c.clip!==!1&&(d.bottom<=Math.max(n.top,r.top)||d.top>=Math.min(n.bottom,r.bottom)||d.right<Math.max(n.left,r.left)-.1||d.left>Math.min(n.right,r.right)+.1)){f.style.top=ya;continue}let v=c.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,x=v?7:0,w=g.right-g.left,C=(e=Rb.get(h))!==null&&e!==void 0?e:g.bottom-g.top,S=h.offset||iU,R=this.view.textDirection==st.LTR,T=g.width>r.right-r.left?R?r.left:r.right-g.width:R?Math.max(r.left,Math.min(d.left-(v?14:0)+S.x,r.right-w)):Math.min(Math.max(r.left,d.left-w+(v?14:0)-S.x),r.right-w),E=this.above[a];!c.strictSide&&(E?d.top-C-x-S.y<r.top:d.bottom+C+x+S.y>r.bottom)&&E==r.bottom-d.bottom>d.top-r.top&&(E=this.above[a]=!E);let O=(E?d.top-r.top:r.bottom-d.bottom)-x;if(O<C&&h.resize!==!1){if(O<this.view.defaultLineHeight){f.style.top=ya;continue}Rb.set(h,C),f.style.height=(C=O)/o+"px"}else f.style.height&&(f.style.height="");let L=E?d.top-C-x-S.y:d.bottom+x+S.y,I=T+w;if(h.overlap!==!0)for(let V of s)V.left<I&&V.right>T&&V.top<L+C&&V.bottom>L&&(L=E?V.top-C-2-x:V.bottom+x+2);if(this.position=="absolute"?(f.style.top=(L-t.parent.top)/o+"px",kb(f,(T-t.parent.left)/i)):(f.style.top=L/o+"px",kb(f,T/i)),v){let V=d.left+(R?S.x:-S.x)-(T+14-7);v.style.left=V/i+"px"}h.overlap!==!0&&s.push({left:T,top:L,right:I,bottom:L+C}),f.classList.toggle("cm-tooltip-above",E),f.classList.toggle("cm-tooltip-below",!E),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=ya}},{eventObservers:{scroll(){this.maybeMeasure()}}});function kb(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const rU=le.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),iU={x:0,y:0},Im=fe.define({enables:[Dm,rU]}),Xu=fe.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class Uh{static create(e){return new Uh(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new f4(e,Xu,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const oU=Im.compute([Xu],t=>{let e=t.facet(Xu);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:Uh.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class sU{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,r=e.docView.nearest(n.target);if(!r)return;let i,o=1;if(r instanceof Ri)i=r.posAtStart;else{if(i=e.posAtCoords(n),i==null)return;let a=e.coordsAtPos(i);if(!a||n.y<a.top||n.y>a.bottom||n.x<a.left-e.defaultCharacterWidth||n.x>a.right+e.defaultCharacterWidth)return;let c=e.bidiSpans(e.state.doc.lineAt(i)).find(f=>f.from<=i&&f.to>=i),h=c&&c.dir==st.RTL?-1:1;o=n.x<a.left?-h:h}let s=this.source(e,i,o);if(s?.then){let a=this.pending={pos:i};s.then(c=>{this.pending==a&&(this.pending=null,c&&!(Array.isArray(c)&&!c.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(c)?c:[c])}))},c=>hn(e.state,c,"hover tooltip"))}else s&&!(Array.isArray(s)&&!s.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(s)?s:[s])})}get tooltip(){let e=this.view.plugin(Dm),n=e?e.manager.tooltips.findIndex(r=>r.create==Uh.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:o}=this;if(i.length&&o&&!aU(o.dom,e)||this.pending){let{pos:s}=i[0]||this.pending,a=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:s;(s==a?this.view.posAtCoords(this.lastMove)!=s:!lU(this.view,s,a,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Jc=4;function aU(t,e){let{left:n,right:r,top:i,bottom:o}=t.getBoundingClientRect(),s;if(s=t.querySelector(".cm-tooltip-arrow")){let a=s.getBoundingClientRect();i=Math.min(a.top,i),o=Math.max(a.bottom,o)}return e.clientX>=n-Jc&&e.clientX<=r+Jc&&e.clientY>=i-Jc&&e.clientY<=o+Jc}function lU(t,e,n,r,i,o){let s=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>r||s.right<r||s.top>i||Math.min(s.bottom,a)<i)return!1;let c=t.posAtCoords({x:r,y:i},!1);return c>=e&&c<=n}function cU(t,e={}){let n=Ee.define(),r=Lt.define({create(){return[]},update(i,o){if(i.length&&(e.hideOnChange&&(o.docChanged||o.selection)?i=[]:e.hideOn&&(i=i.filter(s=>!e.hideOn(o,s))),o.docChanged)){let s=[];for(let a of i){let c=o.changes.mapPos(a.pos,-1,Jt.TrackDel);if(c!=null){let h=Object.assign(Object.create(null),a);h.pos=c,h.end!=null&&(h.end=o.changes.mapPos(h.end)),s.push(h)}}i=s}for(let s of o.effects)s.is(n)&&(i=s.value),s.is(uU)&&(i=[]);return i},provide:i=>Xu.from(i)});return{active:r,extension:[r,vt.define(i=>new sU(i,t,r,n,e.hoverTime||300)),oU]}}function d4(t,e){let n=t.plugin(Dm);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const uU=Ee.define(),Tb=fe.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Za(t,e){let n=t.plugin(g4),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const g4=vt.fromClass(class{constructor(t){this.input=t.state.facet(Qa),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(Tb);this.top=new eu(t,!0,e.topContainer),this.bottom=new eu(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(Tb);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new eu(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new eu(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Qa);if(n!=this.input){let r=n.filter(c=>c),i=[],o=[],s=[],a=[];for(let c of r){let h=this.specs.indexOf(c),f;h<0?(f=c(t.view),a.push(f)):(f=this.panels[h],f.update&&f.update(t)),i.push(f),(f.top?o:s).push(f)}this.specs=r,this.panels=i,this.top.sync(o),this.bottom.sync(s);for(let c of a)c.dom.classList.add("cm-panel"),c.mount&&c.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>le.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class eu{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=Mb(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=Mb(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Mb(t){let e=t.nextSibling;return t.remove(),e}const Qa=fe.define({enables:g4});class ti extends wo{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}ti.prototype.elementClass="";ti.prototype.toDOM=void 0;ti.prototype.mapMode=Jt.TrackBefore;ti.prototype.startSide=ti.prototype.endSide=-1;ti.prototype.point=!0;const Su=fe.define(),hU=fe.define(),fU={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ke.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},La=fe.define();function dU(t){return[m4(),La.of({...fU,...t})]}const Eb=fe.define({combine:t=>t.some(e=>e)});function m4(t){return[gU]}const gU=vt.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(La).map(e=>new Db(t,e)),this.fixed=!t.state.facet(Eb);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(Eb)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Ke.iter(this.view.state.facet(Su),this.view.viewport.from),r=[],i=this.gutters.map(o=>new mU(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let s=!0;for(let a of o.type)if(a.type==en.Text&&s){P1(n,r,a.from);for(let c of i)c.line(this.view,a,r);s=!1}else if(a.widget)for(let c of i)c.widget(this.view,a)}else if(o.type==en.Text){P1(n,r,o.from);for(let s of i)s.line(this.view,o,r)}else if(o.widget)for(let s of i)s.widget(this.view,o);for(let o of i)o.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(La),n=t.state.facet(La),r=t.docChanged||t.heightChanged||t.viewportChanged||!Ke.eq(t.startState.facet(Su),t.state.facet(Su),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let s=e.indexOf(o);s<0?i.push(new Db(this.view,o)):(this.gutters[s].update(t),i.push(this.gutters[s]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)o.config.side=="after"?this.getDOMAfter().appendChild(o.dom):this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>le.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==st.LTR?{left:r,right:i}:{right:r,left:i}})});function Ob(t){return Array.isArray(t)?t:[t]}function P1(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class mU{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Ke.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=(n.top-this.height)/e.scaleY,s=n.height/e.scaleY;if(this.i==i.elements.length){let a=new p4(e,s,o,r);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(e,s,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];P1(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let s=this.gutter;i.length==0&&!s.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let o of e.state.facet(hU)){let s=o(e,n.widget,n);s&&(i||(i=[])).push(s)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class Db{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.target,s;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let c=o.getBoundingClientRect();s=(c.top+c.bottom)/2}else s=i.clientY;let a=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[r](e,a,i)&&i.preventDefault()});this.markers=Ob(n.markers(e)),n.initialSpacer&&(this.spacer=new p4(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=Ob(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Ke.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class p4{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),pU(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,s=0;;){let a=s,c=o<n.length?n[o++]:null,h=!1;if(c){let f=c.elementClass;f&&(r+=" "+f);for(let d=s;d<this.markers.length;d++)if(this.markers[d].compare(c)){a=d,h=!0;break}}else a=this.markers.length;for(;s<a;){let f=this.markers[s++];if(f.toDOM){f.destroy(i);let d=i.nextSibling;i.remove(),i=d}}if(!c)break;c.toDOM&&(h?i=i.nextSibling:this.dom.insertBefore(c.toDOM(e),i)),h&&s++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function pU(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const vU=fe.define(),bU=fe.define(),ds=fe.define({combine(t){return Mr(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let o=r[i],s=n[i];r[i]=o?(a,c,h)=>o(a,c,h)||s(a,c,h):s}return r}})}});class u0 extends ti{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function h0(t,e){return t.state.facet(ds).formatNumber(e,t.state)}const wU=La.compute([ds],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(vU)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new u0(h0(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(bU)){let o=i(e,n,r);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(ds)!=e.state.facet(ds),initialSpacer(e){return new u0(h0(e,Ib(e.state.doc.lines)))},updateSpacer(e,n){let r=h0(n.view,Ib(n.view.state.doc.lines));return r==e.number?e:new u0(r)},domEventHandlers:t.facet(ds).domEventHandlers,side:"before"}));function xU(t={}){return[ds.of(t),m4(),wU]}function Ib(t){let e=9;for(;e<t;)e=e*10+9;return e}const yU=new class extends ti{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},CU=Su.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(yU.range(i)))}return Ke.of(e)});function $U(){return CU}var f0;const gs=new je;function SU(t){return fe.define({combine:t?e=>e.concat(t):void 0})}const AU=new je;class Xn{constructor(e,n,r=[],i=""){this.data=e,this.name=i,Ue.prototype.hasOwnProperty("tree")||Object.defineProperty(Ue.prototype,"tree",{get(){return Kt(this)}}),this.parser=n,this.extension=[Bi.of(this),Ue.languageData.of((o,s,a)=>{let c=_b(o,s,a),h=c.type.prop(gs);if(!h)return[];let f=o.facet(h),d=c.type.prop(AU);if(d){let g=c.resolve(s-c.from,a);for(let v of d)if(v.test(g,o)){let x=o.facet(v.facet);return v.type=="replace"?x:x.concat(f)}}return f})].concat(r)}isActiveAt(e,n,r=-1){return _b(e,n,r).type.prop(gs)==this.data}findRegions(e){let n=e.facet(Bi);if(n?.data==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,s)=>{if(o.prop(gs)==this.data){r.push({from:s,to:s+o.length});return}let a=o.prop(je.mounted);if(a){if(a.tree.prop(gs)==this.data){if(a.overlay)for(let c of a.overlay)r.push({from:c.from+s,to:c.to+s});else r.push({from:s,to:s+o.length});return}else if(a.overlay){let c=r.length;if(i(a.tree,a.overlay[0].from+s),r.length>c)return}}for(let c=0;c<o.children.length;c++){let h=o.children[c];h instanceof Ct&&i(h,o.positions[c]+s)}};return i(Kt(e),0),r}get allowsNesting(){return!0}}Xn.setState=Ee.define();function _b(t,e,n){let r=t.facet(Bi),i=Kt(t).topNode;if(!r||r.allowsNesting)for(let o=i;o;o=o.enter(e,n,Ot.ExcludeBuffers))o.type.isTop&&(i=o);return i}class Zu extends Xn{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=SU(e.languageData);return new Zu(n,e.parser.configure({props:[gs.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new Zu(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Kt(t){let e=t.field(Xn.state,!1);return e?e.tree:Ct.empty}class RU{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let Ca=null;class Qu{constructor(e,n,r=[],i,o,s,a,c){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Qu(e,n,[],Ct.empty,0,r,[],null)}startParse(){return this.parser.startParse(new RU(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Ct.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(fo.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(fo.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Ca;Ca=this;try{return e()}finally{Ca=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=Lb(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:s,skipped:a}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((h,f,d,g)=>c.push({fromA:h,toA:f,fromB:d,toB:g})),r=fo.applyChanges(r,c),i=Ct.empty,o=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){a=[];for(let h of this.skipped){let f=e.mapPos(h.from,1),d=e.mapPos(h.to,-1);f<d&&a.push({from:f,to:d})}}}return new Qu(this.parser,n,r,i,o,s,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:o}=this.skipped[r];i<e.to&&o>e.from&&(this.fragments=Lb(this.fragments,i,o),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends Py{createParse(n,r,i){let o=i[0].from,s=i[i.length-1].to;return{parsedPos:o,advance(){let c=Ca;if(c){for(let h of i)c.tempSkipped.push(h);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=s,new Ct(dn.none,[],[],s-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Ca}}function Lb(t,e,n){return fo.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Bs{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Bs(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Qu.create(e.facet(Bi).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Bs(r)}}Xn.state=Lt.define({create:Bs.init,update(t,e){for(let n of e.effects)if(n.is(Xn.setState))return n.value;return e.startState.facet(Bi)!=e.state.facet(Bi)?Bs.init(e.state):t.apply(e)}});let v4=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(v4=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const d0=typeof navigator<"u"&&(!((f0=navigator.scheduling)===null||f0===void 0)&&f0.isInputPending)?()=>navigator.scheduling.isInputPending():null,kU=vt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Xn.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Xn.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=v4(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,o=r.field(Xn.state);if(o.tree==o.context.tree&&o.context.isDone(i+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!d0?Math.max(25,e.timeRemaining()-5):1e9),a=o.context.treeLen<i&&r.doc.length>i+1e3,c=o.context.work(()=>d0&&d0()||Date.now()>s,i+(a?0:1e5));this.chunkBudget-=Date.now()-n,(c||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:Xn.setState.of(new Bs(o.context))})),this.chunkBudget>0&&!(c&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>hn(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Bi=fe.define({combine(t){return t.length?t[0]:null},enables:t=>[Xn.state,kU,le.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class TU{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const MU=fe.define(),qh=fe.define({combine:t=>{if(!t.length)return"  ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Ju(t){let e=t.facet(qh);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Ja(t,e){let n="",r=t.tabSize,i=t.facet(qh)[0];if(i=="	"){for(;e>=r;)n+="	",e-=r;i=" "}for(let o=0;o<e;o++)n+=i;return n}function _m(t,e){t instanceof Ue&&(t=new Kh(t));for(let r of t.state.facet(MU)){let i=r(t,e);if(i!==void 0)return i}let n=Kt(t.state);return n.length>=e?EU(t,n,e):null}class Kh{constructor(e,n={}){this.state=e,this.options=n,this.unit=Ju(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.countColumn(r,e-i),s=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return s>-1&&(o+=s-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return Xs(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let s=o(i);if(s>-1)return s}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const b4=new je;function EU(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let o=[];for(let s=i;s&&!(s.from<r.node.from||s.to>r.node.to||s.from==r.node.from&&s.type==r.node.type);s=s.parent)o.push(s);for(let s=o.length-1;s>=0;s--)r={node:o[s],next:r}}return w4(r,t,n)}function w4(t,e,n){for(let r=t;r;r=r.next){let i=DU(r.node);if(i)return i(Lm.create(e,n,r))}return 0}function OU(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function DU(t){let e=t.type.prop(b4);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(je.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return s=>BU(s,!0,1,void 0,o&&!OU(s)?i.from:void 0)}return t.parent==null?IU:null}function IU(){return 0}class Lm extends Kh{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new Lm(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(_U(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return w4(this.context.next,this.base,this.pos)}}function _U(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function LU(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),s=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let a=n.to;;){let c=e.childAfter(a);if(!c||c==r)return null;if(!c.type.isSkipped){if(c.from>=s)return null;let h=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+h}}a=c.to}}function BU(t,e,n,r,i){let o=t.textAfter,s=o.match(/^\s*/)[0].length,a=r&&o.slice(s,s+r.length)==r||i==t.pos+s,c=LU(t);return c?a?t.column(c.from):t.column(c.to):t.baseIndent+(a?0:t.unit*n)}function Bb({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const NU=200;function jU(){return Ue.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+NU)return t;let o=n.sliceString(i.from,r);if(!e.some(h=>h.test(o)))return t;let{state:s}=t,a=-1,c=[];for(let{head:h}of s.selection.ranges){let f=s.doc.lineAt(h);if(f.from==a)continue;a=f.from;let d=_m(s,f.from);if(d==null)continue;let g=/^\s*/.exec(f.text)[0],v=Ja(s,d);g!=v&&c.push({from:f.from,to:f.from+g.length,insert:v})}return c.length?[t,{changes:c,sequential:!0}]:t})}const FU=fe.define(),x4=new je;function VU(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function HU(t,e,n){let r=Kt(t);if(r.length<n)return null;let i=r.resolveStack(n,1),o=null;for(let s=i;s;s=s.next){let a=s.node;if(a.to<=n||a.from>n)continue;if(o&&a.from<e)break;let c=a.type.prop(x4);if(c&&(a.to<r.length-50||r.length==t.doc.length||!PU(a))){let h=c(a,t);h&&h.from<=n&&h.from>=e&&h.to>n&&(o=h)}}return o}function PU(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function eh(t,e,n){for(let r of t.facet(FU)){let i=r(t,e,n);if(i)return i}return HU(t,e,n)}function y4(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const Gh=Ee.define({map:y4}),yl=Ee.define({map:y4});function C4(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const $o=Lt.define({create(){return xe.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,r)=>t=Nb(t,n,r)),t=t.map(e.changes);for(let n of e.effects)if(n.is(Gh)&&!WU(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(A4),i=r?xe.replace({widget:new XU(r(e.state,n.value))}):jb;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(yl)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=Nb(t,e.selection.main.head)),t},provide:t=>le.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(jb.range(r,i))}return xe.set(e,!0)}});function Nb(t,e,n=e){let r=!1;return t.between(e,n,(i,o)=>{i<n&&o>e&&(r=!0)}),r?t.update({filterFrom:e,filterTo:n,filter:(i,o)=>i>=n||o<=e}):t}function th(t,e,n){var r;let i=null;return(r=t.field($o,!1))===null||r===void 0||r.between(e,n,(o,s)=>{(!i||i.from>o)&&(i={from:o,to:s})}),i}function WU(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function $4(t,e){return t.field($o,!1)?e:e.concat(Ee.appendConfig.of(R4()))}const zU=t=>{for(let e of C4(t)){let n=eh(t.state,e.from,e.to);if(n)return t.dispatch({effects:$4(t.state,[Gh.of(n),S4(t,n)])}),!0}return!1},UU=t=>{if(!t.state.field($o,!1))return!1;let e=[];for(let n of C4(t)){let r=th(t.state,n.from,n.to);r&&e.push(yl.of(r),S4(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function S4(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return le.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const qU=t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),o=eh(e,i.from,i.to);o&&n.push(Gh.of(o)),r=(o?t.lineBlockAt(o.to):i).to+1}return n.length&&t.dispatch({effects:$4(t.state,n)}),!!n.length},KU=t=>{let e=t.state.field($o,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(yl.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},GU=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:zU},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:UU},{key:"Ctrl-Alt-[",run:qU},{key:"Ctrl-Alt-]",run:KU}],YU={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},A4=fe.define({combine(t){return Mr(t,YU)}});function R4(t){return[$o,JU]}function k4(t,e){let{state:n}=t,r=n.facet(A4),i=s=>{let a=t.lineBlockAt(t.posAtDOM(s.target)),c=th(t.state,a.from,a.to);c&&t.dispatch({effects:yl.of(c)}),s.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const jb=xe.replace({widget:new class extends ai{toDOM(t){return k4(t,null)}}});class XU extends ai{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return k4(e,this.value)}}const ZU={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class g0 extends ti{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function QU(t={}){let e={...ZU,...t},n=new g0(e,!0),r=new g0(e,!1),i=vt.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(Bi)!=s.state.facet(Bi)||s.startState.field($o,!1)!=s.state.field($o,!1)||Kt(s.startState)!=Kt(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let a=new Jr;for(let c of s.viewportLineBlocks){let h=th(s.state,c.from,c.to)?r:eh(s.state,c.from,c.to)?n:null;h&&a.add(c.from,c.from,h)}return a.finish()}}),{domEventHandlers:o}=e;return[i,dU({class:"cm-foldGutter",markers(s){var a;return((a=s.plugin(i))===null||a===void 0?void 0:a.markers)||Ke.empty},initialSpacer(){return new g0(e,!1)},domEventHandlers:{...o,click:(s,a,c)=>{if(o.click&&o.click(s,a,c))return!0;let h=th(s.state,a.from,a.to);if(h)return s.dispatch({effects:yl.of(h)}),!0;let f=eh(s.state,a.from,a.to);return f?(s.dispatch({effects:Gh.of(f)}),!0):!1}}}),R4()]}const JU=le.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Cl{constructor(e,n){this.specs=e;let r;function i(a){let c=Ii.newName();return(r||(r=Object.create(null)))["."+c]=a,c}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,s=n.scope;this.scope=s instanceof Xn?a=>a.prop(gs)==s.data:s?a=>a==s:void 0,this.style=Uy(e.map(a=>({tag:a.tag,class:a.class||i(Object.assign({},a,{tag:null}))})),{all:o}).style,this.module=r?new Ii(r):null,this.themeType=n.themeType}static define(e,n){return new Cl(e,n||{})}}const W1=fe.define(),T4=fe.define({combine(t){return t.length?[t[0]]:null}});function m0(t){let e=t.facet(W1);return e.length?e:t.facet(T4)}function M4(t,e){let n=[tq],r;return t instanceof Cl&&(t.module&&n.push(le.styleModule.of(t.module)),r=t.themeType),e?.fallback?n.push(T4.of(t)):r?n.push(W1.computeN([le.darkTheme],i=>i.facet(le.darkTheme)==(r=="dark")?[t]:[])):n.push(W1.of(t)),n}class eq{constructor(e){this.markCache=Object.create(null),this.tree=Kt(e.state),this.decorations=this.buildDeco(e,m0(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Kt(e.state),r=m0(e.state),i=r!=m0(e.startState),{viewport:o}=e.view,s=e.changes.mapPos(this.decoratedTo,1);n.length<o.to&&!i&&n.type==this.tree.type&&s>=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=o.to)}buildDeco(e,n){if(!n||!this.tree.length)return xe.none;let r=new Jr;for(let{from:i,to:o}of e.visibleRanges)bP(this.tree,n,(s,a,c)=>{r.add(s,a,this.markCache[c]||(this.markCache[c]=xe.mark({class:c})))},i,o);return r.finish()}}const tq=Oo.high(vt.fromClass(eq,{decorations:t=>t.decorations})),nq=Cl.define([{tag:U.meta,color:"#404740"},{tag:U.link,textDecoration:"underline"},{tag:U.heading,textDecoration:"underline",fontWeight:"bold"},{tag:U.emphasis,fontStyle:"italic"},{tag:U.strong,fontWeight:"bold"},{tag:U.strikethrough,textDecoration:"line-through"},{tag:U.keyword,color:"#708"},{tag:[U.atom,U.bool,U.url,U.contentSeparator,U.labelName],color:"#219"},{tag:[U.literal,U.inserted],color:"#164"},{tag:[U.string,U.deleted],color:"#a11"},{tag:[U.regexp,U.escape,U.special(U.string)],color:"#e40"},{tag:U.definition(U.variableName),color:"#00f"},{tag:U.local(U.variableName),color:"#30a"},{tag:[U.typeName,U.namespace],color:"#085"},{tag:U.className,color:"#167"},{tag:[U.special(U.variableName),U.macroName],color:"#256"},{tag:U.definition(U.propertyName),color:"#00c"},{tag:U.comment,color:"#940"},{tag:U.invalid,color:"#f00"}]),rq=le.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),E4=1e4,O4="()[]{}",D4=fe.define({combine(t){return Mr(t,{afterCursor:!0,brackets:O4,maxScanDistance:E4,renderMatch:sq})}}),iq=xe.mark({class:"cm-matchingBracket"}),oq=xe.mark({class:"cm-nonmatchingBracket"});function sq(t){let e=[],n=t.matched?iq:oq;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const aq=Lt.define({create(){return xe.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(D4);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=vr(e.state,i.head,-1,r)||i.head>0&&vr(e.state,i.head-1,1,r)||r.afterCursor&&(vr(e.state,i.head,1,r)||i.head<e.state.doc.length&&vr(e.state,i.head+1,-1,r));o&&(n=n.concat(r.renderMatch(o,e.state)))}return xe.set(n,!0)},provide:t=>le.decorations.from(t)}),lq=[aq,rq];function cq(t={}){return[D4.of(t),lq]}const uq=new je;function z1(t,e,n){let r=t.prop(e<0?je.openedBy:je.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function U1(t){let e=t.type.prop(uq);return e?e(t.node):t}function vr(t,e,n,r={}){let i=r.maxScanDistance||E4,o=r.brackets||O4,s=Kt(t),a=s.resolveInner(e,n);for(let c=a;c;c=c.parent){let h=z1(c.type,n,o);if(h&&c.from<c.to){let f=U1(c);if(f&&(n>0?e>=f.from&&e<f.to:e>f.from&&e<=f.to))return hq(t,e,n,c,f,h,o)}}return fq(t,e,n,s,a.type,i,o)}function hq(t,e,n,r,i,o,s){let a=r.parent,c={from:i.from,to:i.to},h=0,f=a?.cursor();if(f&&(n<0?f.childBefore(r.from):f.childAfter(r.to)))do if(n<0?f.to<=r.from:f.from>=r.to){if(h==0&&o.indexOf(f.type.name)>-1&&f.from<f.to){let d=U1(f);return{start:c,end:d?{from:d.from,to:d.to}:void 0,matched:!0}}else if(z1(f.type,n,s))h++;else if(z1(f.type,-n,s)){if(h==0){let d=U1(f);return{start:c,end:d&&d.from<d.to?{from:d.from,to:d.to}:void 0,matched:!1}}h--}}while(n<0?f.prevSibling():f.nextSibling());return{start:c,matched:!1}}function fq(t,e,n,r,i,o,s){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),c=s.indexOf(a);if(c<0||c%2==0!=n>0)return null;let h={from:n<0?e-1:e,to:n>0?e+1:e},f=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let g=0;!f.next().done&&g<=o;){let v=f.value;n<0&&(g+=v.length);let x=e+g*n;for(let w=n>0?0:v.length-1,C=n>0?v.length:-1;w!=C;w+=n){let S=s.indexOf(v[w]);if(!(S<0||r.resolveInner(x+w,1).type!=i))if(S%2==0==n>0)d++;else{if(d==1)return{start:h,end:{from:x+w,to:x+w+1},matched:S>>1==c>>1};d--}}n>0&&(g+=v.length)}return f.done?{start:h,matched:!1}:null}const dq=Object.create(null),Fb=[dn.none],Vb=[],Hb=Object.create(null),gq=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])gq[t]=mq(dq,e);function p0(t,e){Vb.indexOf(t)>-1||(Vb.push(t),console.warn(e))}function mq(t,e){let n=[];for(let a of e.split(" ")){let c=[];for(let h of a.split(".")){let f=t[h]||U[h];f?typeof f=="function"?c.length?c=c.map(f):p0(h,`Modifier ${h} used at start of tag`):c.length?p0(h,`Tag ${h} used as modifier`):c=Array.isArray(f)?f:[f]:p0(h,`Unknown highlighting tag ${h}`)}for(let h of c)n.push(h)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(a=>a.id),o=Hb[i];if(o)return o.id;let s=Hb[i]=dn.define({id:Fb.length,name:r,props:[Wy({[r]:n})]});return Fb.push(s),s.id}st.RTL,st.LTR;const pq=()=>t=>{try{JSON.parse(t.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;const n=vq(e,t.state.doc);return[{from:n,message:e.message,severity:"error",to:n}]}return[]};function vq(t,e){let n;return(n=t.message.match(/at position (\d+)/))?Math.min(+n[1],e.length):(n=t.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+n[1]).from+ +n[2]-1,e.length):0}const bq=Zu.define({name:"json",parser:CP.configure({props:[b4.add({Object:Bb({except:/^\s*\}/}),Array:Bb({except:/^\s*\]/})}),x4.add({"Object Array":VU})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function wq(){return new TU(bq)}function xq(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}const yq=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=Nm(t.state,n.from);return r.line?Cq(t):r.block?Sq(t):!1};function Bm(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const Cq=Bm(kq,0),$q=Bm(I4,0),Sq=Bm((t,e)=>I4(t,e,Rq(e)),0);function Nm(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const $a=50;function Aq(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-$a,r),s=t.sliceDoc(i,i+$a),a=/\s*$/.exec(o)[0].length,c=/^\s*/.exec(s)[0].length,h=o.length-a;if(o.slice(h-e.length,h)==e&&s.slice(c,c+n.length)==n)return{open:{pos:r-a,margin:a&&1},close:{pos:i+c,margin:c&&1}};let f,d;i-r<=2*$a?f=d=t.sliceDoc(r,i):(f=t.sliceDoc(r,r+$a),d=t.sliceDoc(i-$a,i));let g=/^\s*/.exec(f)[0].length,v=/\s*$/.exec(d)[0].length,x=d.length-v-n.length;return f.slice(g,g+e.length)==e&&d.slice(x,x+n.length)==n?{open:{pos:r+g+e.length,margin:/\s/.test(f.charAt(g+e.length))?1:0},close:{pos:i-v-n.length,margin:/\s/.test(d.charAt(x-1))?1:0}}:null}function Rq(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function I4(t,e,n=e.selection.ranges){let r=n.map(o=>Nm(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,s)=>Aq(e,r[s],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,s)=>i[s]?[]:[{from:o.from,insert:r[s].open+" "},{from:o.to,insert:" "+r[s].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let s=0,a;s<i.length;s++)if(a=i[s]){let c=r[s],{open:h,close:f}=a;o.push({from:h.pos-c.open.length,to:h.pos+h.margin},{from:f.pos-f.margin,to:f.pos+c.close.length})}return{changes:o}}return null}function kq(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:o,to:s}of n){let a=r.length,c=1e9,h=Nm(e,o).line;if(h){for(let f=o;f<=s;){let d=e.doc.lineAt(f);if(d.from>i&&(o==s||s>d.from)){i=d.from;let g=/^\s*/.exec(d.text)[0].length,v=g==d.length,x=d.text.slice(g,g+h.length)==h?g:-1;g<d.text.length&&g<c&&(c=g),r.push({line:d,comment:x,token:h,indent:g,empty:v,single:!1})}f=d.to+1}if(c<1e9)for(let f=a;f<r.length;f++)r[f].indent<r[f].line.text.length&&(r[f].indent=c);r.length==a+1&&(r[a].single=!0)}}if(t!=2&&r.some(o=>o.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:a,token:c,indent:h,empty:f,single:d}of r)(d||!f)&&o.push({from:a.from+h,insert:c+" "});let s=e.changes(o);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:s,comment:a,token:c}of r)if(a>=0){let h=s.from+a,f=h+c.length;s.text[f-s.from]==" "&&f++,o.push({from:h,to:f})}return{changes:o}}return null}const q1=Tr.define(),Tq=Tr.define(),Mq=fe.define(),_4=fe.define({combine(t){return Mr(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),L4=Lt.define({create(){return br.empty},update(t,e){let n=e.state.facet(_4),r=e.annotation(q1);if(r){let c=fn.fromTransaction(e,r.selection),h=r.side,f=h==0?t.undone:t.done;return c?f=nh(f,f.length,n.minDepth,c):f=j4(f,e.startState.selection),new br(h==0?r.rest:f,h==0?f:r.rest)}let i=e.annotation(Tq);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(kt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=fn.fromTransaction(e),s=e.annotation(kt.time),a=e.annotation(kt.userEvent);return o?t=t.addChanges(o,s,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,a,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new br(t.done.map(fn.fromJSON),t.undone.map(fn.fromJSON))}});function Eq(t={}){return[L4,_4.of(t),le.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?B4:e.inputType=="historyRedo"?K1:null;return r?(e.preventDefault(),r(n)):!1}})]}function Yh(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(L4,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const B4=Yh(0,!1),K1=Yh(1,!1),Oq=Yh(0,!0),Dq=Yh(1,!0);class fn{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new fn(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new fn(e.changes&&Rt.fromJSON(e.changes),[],e.mapped&&xr.fromJSON(e.mapped),e.startSelection&&Q.fromJSON(e.startSelection),e.selectionsAfter.map(Q.fromJSON))}static fromTransaction(e,n){let r=Nn;for(let i of e.startState.facet(Mq)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new fn(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,Nn)}static selection(e){return new fn(void 0,Nn,void 0,void 0,e)}}function nh(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function Iq(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,s,a)=>{for(let c=0;c<n.length;){let h=n[c++],f=n[c++];a>=h&&s<=f&&(r=!0)}}),r}function _q(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function N4(t,e){return t.length?e.length?t.concat(e):t:e}const Nn=[],Lq=200;function j4(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Lq));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),nh(t,t.length-1,1e9,n.setSelAfter(r)))}else return[fn.selection([e])]}function Bq(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function v0(t,e){if(!t.length)return t;let n=t.length,r=Nn;for(;n;){let i=Nq(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[fn.selection(r)]:Nn}function Nq(t,e,n){let r=N4(t.selectionsAfter.length?t.selectionsAfter.map(a=>a.map(e)):Nn,n);if(!t.changes)return fn.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new fn(i,Ee.mapEffects(t.effects,e),s,t.startSelection.map(o),r)}const jq=/^(input\.type|delete)($|\.)/;class br{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new br(this.done,this.undone):this}addChanges(e,n,r,i,o){let s=this.done,a=s[s.length-1];return a&&a.changes&&!a.changes.empty&&e.changes&&(!r||jq.test(r))&&(!a.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(o,Iq(a.changes,e.changes))||r=="input.type.compose")?s=nh(s,s.length-1,i.minDepth,new fn(e.changes.compose(a.changes),N4(Ee.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,Nn)):s=nh(s,s.length,i.minDepth,e),new br(s,Nn,n,r)}addSelection(e,n,r,i){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Nn;return o.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&_q(o[o.length-1],e)?this:new br(j4(this.done,e),this.undone,n,r)}addMapping(e){return new br(v0(this.done,e),v0(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let o=i[i.length-1],s=o.selectionsAfter[0]||n.selection;if(r&&o.selectionsAfter.length)return n.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:q1.of({side:e,rest:Bq(i),selection:s}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let a=i.length==1?Nn:i.slice(0,i.length-1);return o.mapped&&(a=v0(a,o.mapped)),n.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:q1.of({side:e,rest:a,selection:s}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}br.empty=new br(Nn,Nn);const Fq=[{key:"Mod-z",run:B4,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:K1,preventDefault:!0},{linux:"Ctrl-Shift-z",run:K1,preventDefault:!0},{key:"Mod-u",run:Oq,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Dq,preventDefault:!0}];function Zs(t,e){return Q.create(t.ranges.map(e),t.mainIndex)}function Er(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function ir({state:t,dispatch:e},n){let r=Zs(t.selection,n);return r.eq(t.selection,!0)?!1:(e(Er(t,r)),!0)}function Xh(t,e){return Q.cursor(e?t.to:t.from)}function F4(t,e){return ir(t,n=>n.empty?t.moveByChar(n,e):Xh(n,e))}function Gt(t){return t.textDirectionAt(t.state.selection.main.head)==st.LTR}const V4=t=>F4(t,!Gt(t)),H4=t=>F4(t,Gt(t));function P4(t,e){return ir(t,n=>n.empty?t.moveByGroup(n,e):Xh(n,e))}const Vq=t=>P4(t,!Gt(t)),Hq=t=>P4(t,Gt(t));function Pq(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Zh(t,e,n){let r=Kt(t).resolveInner(e.head),i=n?je.closedBy:je.openedBy;for(let c=e.head;;){let h=n?r.childAfter(c):r.childBefore(c);if(!h)break;Pq(t,h,i)?r=h:c=n?h.to:h.from}let o=r.type.prop(i),s,a;return o&&(s=n?vr(t,r.from,1):vr(t,r.to,-1))&&s.matched?a=n?s.end.to:s.end.from:a=n?r.to:r.from,Q.cursor(a,n?-1:1)}const Wq=t=>ir(t,e=>Zh(t.state,e,!Gt(t))),zq=t=>ir(t,e=>Zh(t.state,e,Gt(t)));function W4(t,e){return ir(t,n=>{if(!n.empty)return Xh(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const z4=t=>W4(t,!1),U4=t=>W4(t,!0);function q4(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let o of t.state.facet(le.scrollMargins)){let s=o(t);s?.top&&(n=Math.max(s?.top,n)),s?.bottom&&(r=Math.max(s?.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function K4(t,e){let n=q4(t),{state:r}=t,i=Zs(r.selection,s=>s.empty?t.moveVertically(s,e,n.height):Xh(s,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let s=t.coordsAtPos(r.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),c=a.top+n.marginTop,h=a.bottom-n.marginBottom;s&&s.top>c&&s.bottom<h&&(o=le.scrollIntoView(i.main.head,{y:"start",yMargin:s.top-c}))}return t.dispatch(Er(r,i),{effects:o}),!0}const Pb=t=>K4(t,!1),G1=t=>K4(t,!0);function Hi(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=Q.cursor(r.from+o))}return i}const Uq=t=>ir(t,e=>Hi(t,e,!0)),qq=t=>ir(t,e=>Hi(t,e,!1)),Kq=t=>ir(t,e=>Hi(t,e,!Gt(t))),Gq=t=>ir(t,e=>Hi(t,e,Gt(t))),Yq=t=>ir(t,e=>Q.cursor(t.lineBlockAt(e.head).from,1)),Xq=t=>ir(t,e=>Q.cursor(t.lineBlockAt(e.head).to,-1));function Zq(t,e,n){let r=!1,i=Zs(t.selection,o=>{let s=vr(t,o.head,-1)||vr(t,o.head,1)||o.head>0&&vr(t,o.head-1,1)||o.head<t.doc.length&&vr(t,o.head+1,-1);if(!s||!s.end)return o;r=!0;let a=s.start.from==o.head?s.end.to:s.end.from;return Q.cursor(a)});return r?(e(Er(t,i)),!0):!1}const Qq=({state:t,dispatch:e})=>Zq(t,e);function Pn(t,e){let n=Zs(t.state.selection,r=>{let i=e(r);return Q.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Er(t.state,n)),!0)}function G4(t,e){return Pn(t,n=>t.moveByChar(n,e))}const Y4=t=>G4(t,!Gt(t)),X4=t=>G4(t,Gt(t));function Z4(t,e){return Pn(t,n=>t.moveByGroup(n,e))}const Jq=t=>Z4(t,!Gt(t)),eK=t=>Z4(t,Gt(t)),tK=t=>Pn(t,e=>Zh(t.state,e,!Gt(t))),nK=t=>Pn(t,e=>Zh(t.state,e,Gt(t)));function Q4(t,e){return Pn(t,n=>t.moveVertically(n,e))}const J4=t=>Q4(t,!1),eC=t=>Q4(t,!0);function tC(t,e){return Pn(t,n=>t.moveVertically(n,e,q4(t).height))}const Wb=t=>tC(t,!1),zb=t=>tC(t,!0),rK=t=>Pn(t,e=>Hi(t,e,!0)),iK=t=>Pn(t,e=>Hi(t,e,!1)),oK=t=>Pn(t,e=>Hi(t,e,!Gt(t))),sK=t=>Pn(t,e=>Hi(t,e,Gt(t))),aK=t=>Pn(t,e=>Q.cursor(t.lineBlockAt(e.head).from)),lK=t=>Pn(t,e=>Q.cursor(t.lineBlockAt(e.head).to)),Ub=({state:t,dispatch:e})=>(e(Er(t,{anchor:0})),!0),qb=({state:t,dispatch:e})=>(e(Er(t,{anchor:t.doc.length})),!0),Kb=({state:t,dispatch:e})=>(e(Er(t,{anchor:t.selection.main.anchor,head:0})),!0),Gb=({state:t,dispatch:e})=>(e(Er(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),cK=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),uK=({state:t,dispatch:e})=>{let n=Qh(t).map(({from:r,to:i})=>Q.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:Q.create(n),userEvent:"select"})),!0},hK=({state:t,dispatch:e})=>{let n=Zs(t.selection,r=>{let i=Kt(t),o=i.resolveStack(r.from,1);if(r.empty){let s=i.resolveStack(r.from,-1);s.node.from>=o.node.from&&s.node.to<=o.node.to&&(o=s)}for(let s=o;s;s=s.next){let{node:a}=s;if((a.from<r.from&&a.to>=r.to||a.to>r.to&&a.from<=r.from)&&s.next)return Q.range(a.to,a.from)}return r});return n.eq(t.selection)?!1:(e(Er(t,n)),!0)},fK=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=Q.create([n.main]):n.main.empty||(r=Q.create([Q.cursor(n.main.head)])),r?(e(Er(t,r)),!0):!1};function $l(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:s,to:a}=o;if(s==a){let c=e(o);c<s?(n="delete.backward",c=tu(t,c,!1)):c>s&&(n="delete.forward",c=tu(t,c,!0)),s=Math.min(s,c),a=Math.max(a,c)}else s=tu(t,s,!1),a=tu(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:Q.cursor(s,s<o.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?le.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function tu(t,e,n){if(t instanceof le)for(let r of t.state.facet(le.atomicRanges).map(i=>i(t)))r.between(e,e,(i,o)=>{i<e&&o>e&&(e=n?o:i)});return e}const nC=(t,e,n)=>$l(t,r=>{let i=r.from,{state:o}=t,s=o.doc.lineAt(i),a,c;if(n&&!e&&i>s.from&&i<s.from+200&&!/[^ \t]/.test(a=s.text.slice(0,i-s.from))){if(a[a.length-1]=="	")return i-1;let h=Xs(a,o.tabSize),f=h%Ju(o)||Ju(o);for(let d=0;d<f&&a[a.length-1-d]==" ";d++)i--;c=i}else c=Ht(s.text,i-s.from,e,e)+s.from,c==i&&s.number!=(e?o.doc.lines:1)?c+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(s.text.slice(c-s.from,i-s.from))&&(c=Ht(s.text,c-s.from,!1,!1)+s.from);return c}),Y1=t=>nC(t,!1,!0),rC=t=>nC(t,!0,!1),iC=(t,e)=>$l(t,n=>{let r=n.head,{state:i}=t,o=i.doc.lineAt(r),s=i.charCategorizer(r);for(let a=null;;){if(r==(e?o.to:o.from)){r==n.head&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let c=Ht(o.text,r-o.from,e)+o.from,h=o.text.slice(Math.min(r,c)-o.from,Math.max(r,c)-o.from),f=s(h);if(a!=null&&f!=a)break;(h!=" "||r!=n.head)&&(a=f),r=c}return r}),oC=t=>iC(t,!1),dK=t=>iC(t,!0),gK=t=>$l(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),mK=t=>$l(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),pK=t=>$l(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),vK=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Ge.of(["",""])},range:Q.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},bK=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),s=i==o.from?i-1:Ht(o.text,i-o.from,!1)+o.from,a=i==o.to?i+1:Ht(o.text,i-o.from,!0)+o.from;return{changes:{from:s,to:a,insert:t.doc.slice(i,a).append(t.doc.slice(s,i))},range:Q.cursor(a)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Qh(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let s=e[e.length-1];s.to=o.to,s.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function sC(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of Qh(t)){if(n?o.to==t.doc.length:o.from==0)continue;let s=t.doc.lineAt(n?o.to+1:o.from-1),a=s.length+1;if(n){r.push({from:o.to,to:s.to},{from:o.from,insert:s.text+t.lineBreak});for(let c of o.ranges)i.push(Q.range(Math.min(t.doc.length,c.anchor+a),Math.min(t.doc.length,c.head+a)))}else{r.push({from:s.from,to:o.from},{from:o.to,insert:t.lineBreak+s.text});for(let c of o.ranges)i.push(Q.range(c.anchor-a,c.head-a))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:Q.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const wK=({state:t,dispatch:e})=>sC(t,e,!1),xK=({state:t,dispatch:e})=>sC(t,e,!0);function aC(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of Qh(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const yK=({state:t,dispatch:e})=>aC(t,e,!1),CK=({state:t,dispatch:e})=>aC(t,e,!0),$K=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Qh(e).map(({from:i,to:o})=>(i>0?i--:o<e.doc.length&&o++,{from:i,to:o}))),r=Zs(e.selection,i=>{let o;if(t.lineWrapping){let s=t.lineBlockAt(i.head),a=t.coordsAtPos(i.head,i.assoc||1);a&&(o=s.bottom+t.documentTop-a.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,o)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function SK(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Kt(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(je.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const Yb=lC(!1),AK=lC(!0);function lC(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:s}=i,a=e.doc.lineAt(o),c=!t&&o==s&&SK(e,o);t&&(o=s=(s<=a.to?a:e.doc.lineAt(s)).to);let h=new Kh(e,{simulateBreak:o,simulateDoubleBreak:!!c}),f=_m(h,o);for(f==null&&(f=Xs(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));s<a.to&&/\s/.test(a.text[s-a.from]);)s++;c?{from:o,to:s}=c:o>a.from&&o<a.from+100&&!/\S/.test(a.text.slice(0,o))&&(o=a.from);let d=["",Ja(e,f)];return c&&d.push(Ja(e,h.lineIndent(a.from,-1))),{changes:{from:o,to:s,insert:Ge.of(d)},range:Q.cursor(o+1+d[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function jm(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let s=r.from;s<=r.to;){let a=t.doc.lineAt(s);a.number>n&&(r.empty||r.to>a.from)&&(e(a,i,r),n=a.number),s=a.to+1}let o=t.changes(i);return{changes:i,range:Q.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const RK=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Kh(t,{overrideIndentation:o=>{let s=n[o];return s??-1}}),i=jm(t,(o,s,a)=>{let c=_m(r,o.from);if(c==null)return;/\S/.test(o.text)||(c=0);let h=/^\s*/.exec(o.text)[0],f=Ja(t,c);(h!=f||a.from<o.from+h.length)&&(n[o.from]=c,s.push({from:o.from,to:o.from+h.length,insert:f}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},cC=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(jm(t,(n,r)=>{r.push({from:n.from,insert:t.facet(qh)})}),{userEvent:"input.indent"})),!0),uC=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(jm(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=Xs(i,t.tabSize),s=0,a=Ja(t,Math.max(0,o-Ju(t)));for(;s<i.length&&s<a.length&&i.charCodeAt(s)==a.charCodeAt(s);)s++;r.push({from:n.from+s,to:n.from+i.length,insert:a.slice(s)})}),{userEvent:"delete.dedent"})),!0),kK=t=>(t.setTabFocusMode(),!0),TK=[{key:"Ctrl-b",run:V4,shift:Y4,preventDefault:!0},{key:"Ctrl-f",run:H4,shift:X4},{key:"Ctrl-p",run:z4,shift:J4},{key:"Ctrl-n",run:U4,shift:eC},{key:"Ctrl-a",run:Yq,shift:aK},{key:"Ctrl-e",run:Xq,shift:lK},{key:"Ctrl-d",run:rC},{key:"Ctrl-h",run:Y1},{key:"Ctrl-k",run:gK},{key:"Ctrl-Alt-h",run:oC},{key:"Ctrl-o",run:vK},{key:"Ctrl-t",run:bK},{key:"Ctrl-v",run:G1}],MK=[{key:"ArrowLeft",run:V4,shift:Y4,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Vq,shift:Jq,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:Kq,shift:oK,preventDefault:!0},{key:"ArrowRight",run:H4,shift:X4,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Hq,shift:eK,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Gq,shift:sK,preventDefault:!0},{key:"ArrowUp",run:z4,shift:J4,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Ub,shift:Kb},{mac:"Ctrl-ArrowUp",run:Pb,shift:Wb},{key:"ArrowDown",run:U4,shift:eC,preventDefault:!0},{mac:"Cmd-ArrowDown",run:qb,shift:Gb},{mac:"Ctrl-ArrowDown",run:G1,shift:zb},{key:"PageUp",run:Pb,shift:Wb},{key:"PageDown",run:G1,shift:zb},{key:"Home",run:qq,shift:iK,preventDefault:!0},{key:"Mod-Home",run:Ub,shift:Kb},{key:"End",run:Uq,shift:rK,preventDefault:!0},{key:"Mod-End",run:qb,shift:Gb},{key:"Enter",run:Yb,shift:Yb},{key:"Mod-a",run:cK},{key:"Backspace",run:Y1,shift:Y1},{key:"Delete",run:rC},{key:"Mod-Backspace",mac:"Alt-Backspace",run:oC},{key:"Mod-Delete",mac:"Alt-Delete",run:dK},{mac:"Mod-Backspace",run:mK},{mac:"Mod-Delete",run:pK}].concat(TK.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),EK=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Wq,shift:tK},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:zq,shift:nK},{key:"Alt-ArrowUp",run:wK},{key:"Shift-Alt-ArrowUp",run:yK},{key:"Alt-ArrowDown",run:xK},{key:"Shift-Alt-ArrowDown",run:CK},{key:"Escape",run:fK},{key:"Mod-Enter",run:AK},{key:"Alt-l",mac:"Ctrl-l",run:uK},{key:"Mod-i",run:hK,preventDefault:!0},{key:"Mod-[",run:uC},{key:"Mod-]",run:cC},{key:"Mod-Alt-\\",run:RK},{key:"Shift-Mod-k",run:$K},{key:"Shift-Mod-\\",run:Qq},{key:"Mod-/",run:yq},{key:"Alt-A",run:$q},{key:"Ctrl-m",mac:"Shift-Alt-m",run:kK}].concat(MK),OK={key:"Tab",run:cC,shift:uC},Xb=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class Ns{constructor(e,n,r=0,i=e.length,o,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?a=>o(Xb(a)):Xb,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ln(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=bm(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=gr(e);let i=this.normalize(n);if(i.length)for(let o=0,s=r;;o++){let a=i.charCodeAt(o),c=this.match(a,s,this.bufferPos+this.bufferStart);if(o==i.length-1){if(c)return this.value=c,this;break}s==r&&o<n.length&&n.charCodeAt(o)==a&&s++}}}match(e,n,r){let i=null;for(let o=0;o<this.matches.length;o+=2){let s=this.matches[o],a=!1;this.query.charCodeAt(s)==e&&(s==this.query.length-1?i={from:this.matches[o+1],to:r}:(this.matches[o]++,a=!0)),a||(this.matches.splice(o,2),o-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:n,to:r}:this.matches.push(1,n)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(Ns.prototype[Symbol.iterator]=function(){return this});const hC={from:-1,to:-1,match:/.*/.exec("")},Fm="gm"+(/x/.unicode==null?"":"u");class fC{constructor(e,n,r,i=0,o=e.length){if(this.text=e,this.to=o,this.curLine="",this.done=!1,this.value=hC,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new dC(e,n,r,i,o);this.re=new RegExp(n,Fm+(r?.ignoreCase?"i":"")),this.test=r?.test,this.iter=e.iter();let s=e.lineAt(i);this.curLineStart=s.from,this.matchPos=rh(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=rh(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const b0=new WeakMap;class Cs{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=b0.get(e);if(!i||i.from>=r||i.to<=n){let a=new Cs(n,e.sliceString(n,r));return b0.set(e,a),a}if(i.from==n&&i.to==r)return i;let{text:o,from:s}=i;return s>n&&(o=e.sliceString(n,s)+o,s=n),i.to<r&&(o+=e.sliceString(i.to,r)),b0.set(e,new Cs(s,o)),new Cs(n,o.slice(n-s,r-s))}}class dC{constructor(e,n,r,i,o){this.text=e,this.to=o,this.done=!1,this.value=hC,this.matchPos=rh(e,i),this.re=new RegExp(n,Fm+(r?.ignoreCase?"i":"")),this.test=r?.test,this.flat=Cs.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=rh(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Cs.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(fC.prototype[Symbol.iterator]=dC.prototype[Symbol.iterator]=function(){return this});function DK(t){try{return new RegExp(t,Fm),!0}catch{return!1}}function rh(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}function X1(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=et("input",{class:"cm-textfield",name:"line",value:e}),r=et("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:Ba.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},et("label",t.state.phrase("Go to line"),": ",n)," ",et("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),et("button",{name:"close",onclick:()=>{t.dispatch({effects:Ba.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:s}=t,a=s.doc.lineAt(s.selection.main.head),[,c,h,f,d]=o,g=f?+f.slice(1):0,v=h?+h:a.number;if(h&&d){let C=v/100;c&&(C=C*(c=="-"?-1:1)+a.number/s.doc.lines),v=Math.round(s.doc.lines*C)}else h&&c&&(v=v*(c=="-"?-1:1)+a.number);let x=s.doc.line(Math.max(1,Math.min(s.doc.lines,v))),w=Q.cursor(x.from+Math.max(0,Math.min(g,x.length)));t.dispatch({effects:[Ba.of(!1),le.scrollIntoView(w.from,{y:"center"})],selection:w}),t.focus()}return{dom:r}}const Ba=Ee.define(),Zb=Lt.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Ba)&&(t=n.value);return t},provide:t=>Qa.from(t,e=>e?X1:null)}),IK=t=>{let e=Za(t,X1);if(!e){let n=[Ba.of(!0)];t.state.field(Zb,!1)==null&&n.push(Ee.appendConfig.of([Zb,_K])),t.dispatch({effects:n}),e=Za(t,X1)}return e&&e.dom.querySelector("input").select(),!0},_K=le.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),LK={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},BK=fe.define({combine(t){return Mr(t,LK,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function NK(t){return[PK,HK]}const jK=xe.mark({class:"cm-selectionMatch"}),FK=xe.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Qb(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=lt.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=lt.Word)}function VK(t,e,n,r){return t(e.sliceDoc(n,n+1))==lt.Word&&t(e.sliceDoc(r-1,r))==lt.Word}const HK=vt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(BK),{state:n}=t,r=n.selection;if(r.ranges.length>1)return xe.none;let i=r.main,o,s=null;if(i.empty){if(!e.highlightWordAroundCursor)return xe.none;let c=n.wordAt(i.head);if(!c)return xe.none;s=n.charCategorizer(i.head),o=n.sliceDoc(c.from,c.to)}else{let c=i.to-i.from;if(c<e.minSelectionLength||c>200)return xe.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),s=n.charCategorizer(i.head),!(Qb(s,n,i.from,i.to)&&VK(s,n,i.from,i.to)))return xe.none}else if(o=n.sliceDoc(i.from,i.to),!o)return xe.none}let a=[];for(let c of t.visibleRanges){let h=new Ns(n.doc,o,c.from,c.to);for(;!h.next().done;){let{from:f,to:d}=h.value;if((!s||Qb(s,n,f,d))&&(i.empty&&f<=i.from&&d>=i.to?a.push(FK.range(f,d)):(f>=i.to||d<=i.from)&&a.push(jK.range(f,d)),a.length>e.maxMatches))return xe.none}}return xe.set(a)}},{decorations:t=>t.decorations}),PK=le.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),WK=({state:t,dispatch:e})=>{let{selection:n}=t,r=Q.create(n.ranges.map(i=>t.wordAt(i.head)||Q.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function zK(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let s=!1,a=new Ns(t.doc,e,r[r.length-1].to);;)if(a.next(),a.done){if(s)return null;a=new Ns(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),s=!0}else{if(s&&r.some(c=>c.from==a.value.from))continue;if(o){let c=t.wordAt(a.value.from);if(!c||c.from!=a.value.from||c.to!=a.value.to)continue}return a.value}}const UK=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return WK({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=zK(t,r);return i?(e(t.update({selection:t.selection.addRange(Q.range(i.from,i.to),!1),effects:le.scrollIntoView(i.to)})),!0):!1},Qs=fe.define({combine(t){return Mr(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new rG(e),scrollToMatch:e=>le.scrollIntoView(e)})}});class gC{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||DK(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
`:r=="r"?"\r":r=="t"?"	":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new YK(this):new KK(this)}getCursor(e,n=0,r){let i=e.doc?e:Ue.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?us(this,i,n,r):cs(this,i,n,r)}}class mC{constructor(e){this.spec=e}}function cs(t,e,n,r){return new Ns(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?qK(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function qK(t,e){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=t.sliceString(o,Math.min(t.length,r+2))),(e(ih(i,n-o))!=lt.Word||e(oh(i,n-o))!=lt.Word)&&(e(oh(i,r-o))!=lt.Word||e(ih(i,r-o))!=lt.Word))}class KK extends mC{constructor(e){super(e)}nextMatch(e,n,r){let i=cs(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let o=Math.min(e.doc.length,n+this.spec.unquoted.length);i=cs(this.spec,e,0,o).nextOverlapping()}return i.done||i.value.from==n&&i.value.to==r?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let o=Math.max(n,i-1e4-this.spec.unquoted.length),s=cs(this.spec,e,o,i),a=null;for(;!s.nextOverlapping().done;)a=s.value;if(a)return a;if(o==n)return null;i-=1e4}}prevMatch(e,n,r){let i=this.prevMatchInRange(e,0,n);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=n||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=cs(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=cs(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function us(t,e,n,r){return new fC(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?GK(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function ih(t,e){return t.slice(Ht(t,e,!1),e)}function oh(t,e){return t.slice(e,Ht(t,e))}function GK(t){return(e,n,r)=>!r[0].length||(t(ih(r.input,r.index))!=lt.Word||t(oh(r.input,r.index))!=lt.Word)&&(t(oh(r.input,r.index+r[0].length))!=lt.Word||t(ih(r.input,r.index+r[0].length))!=lt.Word)}class YK extends mC{nextMatch(e,n,r){let i=us(this.spec,e,r,e.doc.length).next();return i.done&&(i=us(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),s=us(this.spec,e,o,r),a=null;for(;!s.next().done;)a=s.value;if(a&&(o==n||a.from>o+10))return a;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let o=+r.slice(0,i);if(o>0&&o<e.match.length)return e.match[o]+r.slice(i)}return n})}matchAll(e,n){let r=us(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=us(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const el=Ee.define(),Vm=Ee.define(),Ti=Lt.define({create(t){return new w0(Z1(t).create(),null)},update(t,e){for(let n of e.effects)n.is(el)?t=new w0(n.value.create(),t.panel):n.is(Vm)&&(t=new w0(t.query,n.value?Hm:null));return t},provide:t=>Qa.from(t,e=>e.panel)});class w0{constructor(e,n){this.query=e,this.panel=n}}const XK=xe.mark({class:"cm-searchMatch"}),ZK=xe.mark({class:"cm-searchMatch cm-searchMatch-selected"}),QK=vt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Ti))}update(t){let e=t.state.field(Ti);(e!=t.startState.field(Ti)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return xe.none;let{view:n}=this,r=new Jr;for(let i=0,o=n.visibleRanges,s=o.length;i<s;i++){let{from:a,to:c}=o[i];for(;i<s-1&&c>o[i+1].from-2*250;)c=o[++i].to;t.highlight(n.state,a,c,(h,f)=>{let d=n.state.selection.ranges.some(g=>g.from==h&&g.to==f);r.add(h,f,d?ZK:XK)})}return r.finish()}},{decorations:t=>t.decorations});function Sl(t){return e=>{let n=e.state.field(Ti,!1);return n&&n.query.spec.valid?t(e,n):bC(e)}}const sh=Sl((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=Q.single(r.from,r.to),o=t.state.facet(Qs);return t.dispatch({selection:i,effects:[Pm(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),vC(t),!0}),ah=Sl((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=Q.single(i.from,i.to),s=t.state.facet(Qs);return t.dispatch({selection:o,effects:[Pm(t,i),s.scrollToMatch(o.main,t)],userEvent:"select.search"}),vC(t),!0}),JK=Sl((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:Q.create(n.map(r=>Q.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),eG=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],s=0;for(let a=new Ns(t.doc,t.sliceDoc(r,i));!a.next().done;){if(o.length>1e3)return!1;a.value.from==r&&(s=o.length),o.push(Q.range(a.value.from,a.value.to))}return e(t.update({selection:Q.create(o,s),userEvent:"select.search.matches"})),!0},Jb=Sl((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let s=o,a=[],c,h,f=[];s.from==r&&s.to==i&&(h=n.toText(e.getReplacement(s)),a.push({from:s.from,to:s.to,insert:h}),s=e.nextMatch(n,s.from,s.to),f.push(le.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let d=t.state.changes(a);return s&&(c=Q.single(s.from,s.to).map(d),f.push(Pm(t,s)),f.push(n.facet(Qs).scrollToMatch(c.main,t))),t.dispatch({changes:d,selection:c,effects:f,userEvent:"input.replace"}),!0}),tG=Sl((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:s}=i;return{from:o,to:s,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:le.announce.of(r),userEvent:"input.replace.all"}),!0});function Hm(t){return t.state.facet(Qs).createPanel(t)}function Z1(t,e){var n,r,i,o,s;let a=t.selection.main,c=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!c)return e;let h=t.facet(Qs);return new gC({search:((n=e?.literal)!==null&&n!==void 0?n:h.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:(r=e?.caseSensitive)!==null&&r!==void 0?r:h.caseSensitive,literal:(i=e?.literal)!==null&&i!==void 0?i:h.literal,regexp:(o=e?.regexp)!==null&&o!==void 0?o:h.regexp,wholeWord:(s=e?.wholeWord)!==null&&s!==void 0?s:h.wholeWord})}function pC(t){let e=Za(t,Hm);return e&&e.dom.querySelector("[main-field]")}function vC(t){let e=pC(t);e&&e==t.root.activeElement&&e.select()}const bC=t=>{let e=t.state.field(Ti,!1);if(e&&e.panel){let n=pC(t);if(n&&n!=t.root.activeElement){let r=Z1(t.state,e.query.spec);r.valid&&t.dispatch({effects:el.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[Vm.of(!0),e?el.of(Z1(t.state,e.query.spec)):Ee.appendConfig.of(oG)]});return!0},wC=t=>{let e=t.state.field(Ti,!1);if(!e||!e.panel)return!1;let n=Za(t,Hm);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Vm.of(!1)}),!0},nG=[{key:"Mod-f",run:bC,scope:"editor search-panel"},{key:"F3",run:sh,shift:ah,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:sh,shift:ah,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:wC,scope:"editor search-panel"},{key:"Mod-Shift-l",run:eG},{key:"Mod-Alt-g",run:IK},{key:"Mod-d",run:UK,preventDefault:!0}];class rG{constructor(e){this.view=e;let n=this.query=e.state.field(Ti).query.spec;this.commit=this.commit.bind(this),this.searchField=et("input",{value:n.search,placeholder:$n(e,"Find"),"aria-label":$n(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=et("input",{value:n.replace,placeholder:$n(e,"Replace"),"aria-label":$n(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=et("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=et("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=et("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,s){return et("button",{class:"cm-button",name:i,onclick:o,type:"button"},s)}this.dom=et("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>sh(e),[$n(e,"next")]),r("prev",()=>ah(e),[$n(e,"previous")]),r("select",()=>JK(e),[$n(e,"all")]),et("label",null,[this.caseField,$n(e,"match case")]),et("label",null,[this.reField,$n(e,"regexp")]),et("label",null,[this.wordField,$n(e,"by word")]),...e.state.readOnly?[]:[et("br"),this.replaceField,r("replace",()=>Jb(e),[$n(e,"replace")]),r("replaceAll",()=>tG(e),[$n(e,"replace all")])],et("button",{name:"close",onclick:()=>wC(e),"aria-label":$n(e,"close"),type:"button"},["×"])])}commit(){let e=new gC({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:el.of(e)}))}keydown(e){yz(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?ah:sh)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Jb(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(el)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Qs).top}}function $n(t,e){return t.state.phrase(e)}const nu=30,ru=/[\s\.,:;?!]/;function Pm(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-nu),s=Math.min(i,n+nu),a=t.state.sliceDoc(o,s);if(o!=r.from){for(let c=0;c<nu;c++)if(!ru.test(a[c+1])&&ru.test(a[c])){a=a.slice(c);break}}if(s!=i){for(let c=a.length-1;c>a.length-nu;c--)if(!ru.test(a[c-1])&&ru.test(a[c])){a=a.slice(0,c);break}}return le.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${r.number}.`)}const iG=le.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),oG=[Ti,Oo.low(QK),iG];class xC{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Kt(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(yC(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function ew(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function sG(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=ew(e)+ew(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function aG(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:sG(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}let tw=class{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}};function go(t){return t.selection.main.from}function yC(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const CC=Tr.define();function lG(t,e,n,r){let{main:i}=t.selection,o=n-i.from,s=r-i.from;return Object.assign(Object.assign({},t.changeByRange(a=>{if(a!=i&&n!=r&&t.sliceDoc(a.from+o,a.from+s)!=t.sliceDoc(n,r))return{range:a};let c=t.toText(e);return{changes:{from:a.from+o,to:r==i.from?a.to:a.from+s,insert:c},range:Q.cursor(a.from+o+c.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const nw=new WeakMap;function cG(t){if(!Array.isArray(t))return t;let e=nw.get(t);return e||nw.set(t,e=aG(t)),e}const lh=Ee.define(),tl=Ee.define();class uG{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=ln(e,n),i=gr(r);this.chars.push(r);let o=e.slice(n,n+i),s=o.toUpperCase();this.folded.push(ln(s==o?o.toLowerCase():s,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:o,byWord:s}=this;if(n.length==1){let R=ln(e,0),T=gr(R),E=T==e.length?0:-100;if(R!=n[0])if(R==r[0])E+=-200;else return null;return this.ret(E,[0,T])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let c=n.length,h=0;if(a<0){for(let R=0,T=Math.min(e.length,200);R<T&&h<c;){let E=ln(e,R);(E==n[h]||E==r[h])&&(i[h++]=R),R+=gr(E)}if(h<c)return null}let f=0,d=0,g=!1,v=0,x=-1,w=-1,C=/[a-z]/.test(e),S=!0;for(let R=0,T=Math.min(e.length,200),E=0;R<T&&d<c;){let O=ln(e,R);a<0&&(f<c&&O==n[f]&&(o[f++]=R),v<c&&(O==n[v]||O==r[v]?(v==0&&(x=R),w=R+1,v++):v=0));let L,I=O<255?O>=48&&O<=57||O>=97&&O<=122?2:O>=65&&O<=90?1:0:(L=bm(O))!=L.toLowerCase()?1:L!=L.toUpperCase()?2:0;(!R||I==1&&C||E==0&&I!=0)&&(n[d]==O||r[d]==O&&(g=!0)?s[d++]=R:s.length&&(S=!1)),E=I,R+=gr(O)}return d==c&&s[0]==0&&S?this.result(-100+(g?-200:0),s,e):v==c&&x==0?this.ret(-200-e.length+(w==e.length?0:-100),[0,w]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):v==c?this.ret(-900-e.length,[x,w]):d==c?this.result(-100+(g?-200:0)+-700+(S?0:-1100),s,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let s of n){let a=s+(this.astral?gr(ln(r,s)):1);o&&i[o-1]==s?i[o-1]=a:(i[o++]=s,i[o++]=a)}return this.ret(e-r.length,i)}}class hG{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const Dt=fe.define({combine(t){return Mr(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:fG,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>rw(e(r),n(r)),optionClass:(e,n)=>r=>rw(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function rw(t,e){return t?e?t+" "+e:t:e}function fG(t,e,n,r,i,o){let s=t.textDirection==st.RTL,a=s,c=!1,h="top",f,d,g=e.left-i.left,v=i.right-e.right,x=r.right-r.left,w=r.bottom-r.top;if(a&&g<Math.min(x,v)?a=!1:!a&&v<Math.min(x,g)&&(a=!0),x<=(a?g:v))f=Math.max(i.top,Math.min(n.top,i.bottom-w))-e.top,d=Math.min(400,a?g:v);else{c=!0,d=Math.min(400,(s?e.right:i.right-e.left)-30);let R=i.bottom-e.bottom;R>=w||R>e.top?f=n.bottom-e.top:(h="bottom",f=e.bottom-n.top)}let C=(e.bottom-e.top)/o.offsetHeight,S=(e.right-e.left)/o.offsetWidth;return{style:`${h}: ${f/C}px; max-width: ${d/S}px`,class:"cm-completionInfo-"+(c?s?"left-narrow":"right-narrow":a?"left":"right")}}function dG(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let s=document.createElement("span");s.className="cm-completionLabel";let a=n.displayLabel||n.label,c=0;for(let h=0;h<o.length;){let f=o[h++],d=o[h++];f>c&&s.appendChild(document.createTextNode(a.slice(c,f)));let g=s.appendChild(document.createElement("span"));g.appendChild(document.createTextNode(a.slice(f,d))),g.className="cm-completionMatchedText",c=d}return c<a.length&&s.appendChild(document.createTextNode(a.slice(c))),s},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function x0(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class gG{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:c=>this.placeInfo(c),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:s}=i.open,a=e.state.facet(Dt);this.optionContent=dG(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=x0(o.length,s,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",c=>{let{options:h}=e.state.field(n).open;for(let f=c.target,d;f&&f!=this.dom;f=f.parentNode)if(f.nodeName=="LI"&&(d=/-(\d+)$/.exec(f.id))&&+d[1]<h.length){this.applyCompletion(e,h[+d[1]]),c.preventDefault();return}}),this.dom.addEventListener("focusout",c=>{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(Dt).closeOnBlur&&c.relatedTarget!=e.contentDOM&&e.dispatch({effects:tl.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:s,disabled:a}=r.open;(!i.open||i.open.options!=o)&&(this.range=x0(o.length,s,e.state.facet(Dt).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),a!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=x0(n.options.length,n.selected,this.view.state.facet(Dt).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,r)}).catch(s=>hn(this.view.state,s,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&pG(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let s=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:s.clientWidth,bottom:s.clientHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom<Math.max(o.top,n.top)+10?null:this.view.state.facet(Dt).positionInfo(this.view,n,i,r,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",s=>{s.target==i&&s.preventDefault()});let o=null;for(let s=r.from;s<r.to;s++){let{completion:a,match:c}=e[s],{section:h}=a;if(h){let g=typeof h=="string"?h:h.name;if(g!=o&&(s>r.from||r.from==0))if(o=g,typeof h!="string"&&h.header)i.appendChild(h.header(h));else{let v=i.appendChild(document.createElement("completion-section"));v.textContent=g}}const f=i.appendChild(document.createElement("li"));f.id=n+"-"+s,f.setAttribute("role","option");let d=this.optionClass(a);d&&(f.className=d);for(let g of this.optionContent){let v=g(a,this.view.state,this.view,c);v&&f.appendChild(v)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function mG(t,e){return n=>new gG(n,t,e)}function pG(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function iw(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function vG(t,e){let n=[],r=null,i=h=>{n.push(h);let{section:f}=h.completion;if(f){r||(r=[]);let d=typeof f=="string"?f:f.name;r.some(g=>g.name==d)||r.push(typeof f=="string"?{name:d}:f)}},o=e.facet(Dt);for(let h of t)if(h.hasResult()){let f=h.result.getMatch;if(h.result.filter===!1)for(let d of h.result.options)i(new tw(d,h.source,f?f(d):[],1e9-n.length));else{let d=e.sliceDoc(h.from,h.to),g,v=o.filterStrict?new hG(d):new uG(d);for(let x of h.result.options)if(g=v.match(x.label)){let w=x.displayLabel?f?f(x,g.matched):[]:g.matched;i(new tw(x,h.source,w,g.score+(x.boost||0)))}}}if(r){let h=Object.create(null),f=0,d=(g,v)=>{var x,w;return((x=g.rank)!==null&&x!==void 0?x:1e9)-((w=v.rank)!==null&&w!==void 0?w:1e9)||(g.name<v.name?-1:1)};for(let g of r.sort(d))f-=1e5,h[g.name]=f;for(let g of n){let{section:v}=g.completion;v&&(g.score+=h[typeof v=="string"?v:v.name])}}let s=[],a=null,c=o.compareCompletions;for(let h of n.sort((f,d)=>d.score-f.score||c(f.completion,d.completion))){let f=h.completion;!a||a.label!=f.label||a.detail!=f.detail||a.type!=null&&f.type!=null&&a.type!=f.type||a.apply!=f.apply||a.boost!=f.boost?s.push(h):iw(h.completion)>iw(a)&&(s[s.length-1]=h),a=h.completion}return s}class ms{constructor(e,n,r,i,o,s){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new ms(this.options,ow(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o,s){if(i&&!s&&e.some(h=>h.isPending))return i.setDisabled();let a=vG(e,n);if(!a.length)return i&&e.some(h=>h.isPending)?i.setDisabled():null;let c=n.facet(Dt).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let h=i.options[i.selected].completion;for(let f=0;f<a.length;f++)if(a[f].completion==h){c=f;break}}return new ms(a,ow(r,c),{pos:e.reduce((h,f)=>f.hasResult()?Math.min(h,f.from):h,1e8),create:$G,above:o.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(e){return new ms(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new ms(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class ch{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new ch(yG,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Dt),o=(r.override||n.languageDataAt("autocomplete",go(n)).map(cG)).map(c=>(this.active.find(f=>f.source==c)||new jn(c,this.active.some(f=>f.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((c,h)=>c==this.active[h])&&(o=this.active);let s=this.open,a=e.effects.some(c=>c.is(Wm));s&&e.docChanged&&(s=s.map(e.changes)),e.selection||o.some(c=>c.hasResult()&&e.changes.touchesRange(c.from,c.to))||!bG(o,this.active)||a?s=ms.build(o,n,this.id,s,r,a):s&&s.disabled&&!o.some(c=>c.isPending)&&(s=null),!s&&o.every(c=>!c.isPending)&&o.some(c=>c.hasResult())&&(o=o.map(c=>c.hasResult()?new jn(c.source,0):c));for(let c of e.effects)c.is(SC)&&(s=s&&s.setSelected(c.value,this.id));return o==this.active&&s==this.open?this:new ch(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?wG:xG}}function bG(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;r<e.length&&!e[r].hasResult();)r++;let i=n==t.length,o=r==e.length;if(i||o)return i==o;if(t[n++].result!=e[r++].result)return!1}}const wG={"aria-autocomplete":"list"},xG={};function ow(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const yG=[];function $C(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(CC);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class jn{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=$C(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new jn(i.source,0)),r&4&&i.state==0&&(i=new jn(this.source,1)),i=i.updateFor(e,r);for(let o of e.effects)if(o.is(lh))i=new jn(i.source,1,o.value);else if(o.is(tl))i=new jn(i.source,0);else if(o.is(Wm))for(let s of o.value)s.source==i.source&&(i=s);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(go(e.state))}}class $s extends jn{constructor(e,n,r,i,o,s){super(e,3,n),this.limit=r,this.result=i,this.from=o,this.to=s}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let o=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),a=go(e.state);if(a>s||!i||n&2&&(go(e.startState)==this.from||a<this.limit))return new jn(this.source,n&4?1:0);let c=e.changes.mapPos(this.limit);return CG(i.validFor,e.state,o,s)?new $s(this.source,this.explicit,c,i,o,s):i.update&&(i=i.update(i,o,s,new xC(e.state,a,!1)))?new $s(this.source,this.explicit,c,i,i.from,(r=i.to)!==null&&r!==void 0?r:go(e.state)):new jn(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new $s(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new jn(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function CG(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):yC(t,!0).test(i)}const Wm=Ee.define({map(t,e){return t.map(n=>n.map(e))}}),SC=Ee.define(),un=Lt.define({create(){return ch.start()},update(t,e){return t.update(e)},provide:t=>[Im.from(t,e=>e.tooltip),le.contentAttributes.from(t,e=>e.attrs)]});function zm(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(un).active.find(i=>i.source==e.source);return r instanceof $s?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},lG(t.state,n,r.from,r.to)),{annotations:CC.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}const $G=mG(un,zm);function iu(t,e="option"){return n=>{let r=n.state.field(un,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Dt).interactionDelay)return!1;let i=1,o;e=="page"&&(o=d4(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,a=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:s-1;return a<0?a=e=="page"?0:s-1:a>=s&&(a=e=="page"?s-1:0),n.dispatch({effects:SC.of(a)}),!0}}const SG=t=>{let e=t.state.field(un,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Dt).interactionDelay?!1:zm(t,e.open.options[e.open.selected])},sw=t=>t.state.field(un,!1)?(t.dispatch({effects:lh.of(!0)}),!0):!1,AG=t=>{let e=t.state.field(un,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:tl.of(null)}),!0)};class RG{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const kG=50,TG=1e3,MG=vt.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(un).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(un),n=t.state.facet(Dt);if(!t.selectionSet&&!t.docChanged&&t.startState.field(un)==e)return;let r=t.transactions.some(o=>{let s=$C(o,n);return s&8||(o.selection||o.docChanged)&&!(s&3)});for(let o=0;o<this.running.length;o++){let s=this.running[o];if(r||s.context.abortOnDocChange&&t.docChanged||s.updates.length+t.transactions.length>kG&&Date.now()-s.time>TG){for(let a of s.context.abortListeners)try{a()}catch(c){hn(this.view.state,c)}s.context.abortListeners=null,this.running.splice(o--,1)}else s.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(s=>s.is(lh)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.isPending&&!this.running.some(s=>s.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of t.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(un);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Dt).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=go(e),r=new xC(e,n,t.explicit,this.view),i=new RG(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:tl.of(null)}),hn(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Dt).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Dt),r=this.view.state.field(un);for(let i=0;i<this.running.length;i++){let o=this.running[i];if(o.done===void 0)continue;if(this.running.splice(i--,1),o.done){let a=go(o.updates.length?o.updates[0].startState:this.view.state),c=Math.min(a,o.done.from+(o.active.explicit?0:1)),h=new $s(o.active.source,o.active.explicit,c,o.done,o.done.from,(t=o.done.to)!==null&&t!==void 0?t:a);for(let f of o.updates)h=h.update(f,n);if(h.hasResult()){e.push(h);continue}}let s=r.active.find(a=>a.source==o.active.source);if(s&&s.isPending)if(o.done==null){let a=new jn(o.active.source,0);for(let c of o.updates)a=a.update(c,n);a.isPending||e.push(a)}else this.startQuery(s)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:Wm.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(un,!1);if(e&&e.tooltip&&this.view.state.facet(Dt).closeOnBlur){let n=e.open&&d4(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:tl.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:lh.of(!1)}),20),this.composing=0}}}),EG=typeof navigator=="object"&&/Win/.test(navigator.platform),OG=Oo.highest(le.domEventHandlers({keydown(t,e){let n=e.state.field(un,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(EG&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(s=>s.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&zm(e,r),!1}})),DG=le.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),nl={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ao=Ee.define({map(t,e){let n=e.mapPos(t,-1,Jt.TrackAfter);return n??void 0}}),Um=new class extends wo{};Um.startSide=1;Um.endSide=-1;const AC=Lt.define({create(){return Ke.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(ao)&&(t=t.update({add:[Um.range(n.value,n.value+1)]}));return t}});function IG(){return[LG,AC]}const y0="()[]{}<>«»»«[]{}";function RC(t){for(let e=0;e<y0.length;e+=2)if(y0.charCodeAt(e)==t)return y0.charAt(e+1);return bm(t<128?t:t+1)}function kC(t,e){return t.languageDataAt("closeBrackets",e)[0]||nl}const _G=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),LG=le.inputHandler.of((t,e,n,r)=>{if((_G?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&gr(ln(r,0))==1||e!=i.from||n!=i.to)return!1;let o=jG(t.state,r);return o?(t.dispatch(o),!0):!1}),BG=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=kC(t,t.selection.main.head).brackets||nl.brackets,i=null,o=t.changeByRange(s=>{if(s.empty){let a=FG(t.doc,s.head);for(let c of r)if(c==a&&Jh(t.doc,s.head)==RC(ln(c,0)))return{changes:{from:s.head-c.length,to:s.head+c.length},range:Q.cursor(s.head-c.length)}}return{range:i=s}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},NG=[{key:"Backspace",run:BG}];function jG(t,e){let n=kC(t,t.selection.main.head),r=n.brackets||nl.brackets;for(let i of r){let o=RC(ln(i,0));if(e==i)return o==i?PG(t,i,r.indexOf(i+i+i)>-1,n):VG(t,i,o,n.before||nl.before);if(e==o&&TC(t,t.selection.main.from))return HG(t,i,o)}return null}function TC(t,e){let n=!1;return t.field(AC).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function Jh(t,e){let n=t.sliceString(e,e+2);return n.slice(0,gr(ln(n,0)))}function FG(t,e){let n=t.sliceString(e-2,e);return gr(ln(n,0))==n.length?n:n.slice(1)}function VG(t,e,n,r){let i=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:ao.of(s.to+e.length),range:Q.range(s.anchor+e.length,s.head+e.length)};let a=Jh(t.doc,s.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:e+n,from:s.head},effects:ao.of(s.head+e.length),range:Q.cursor(s.head+e.length)}:{range:i=s}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function HG(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&Jh(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:Q.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function PG(t,e,n,r){let i=r.stringPrefixes||nl.stringPrefixes,o=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:ao.of(a.to+e.length),range:Q.range(a.anchor+e.length,a.head+e.length)};let c=a.head,h=Jh(t.doc,c),f;if(h==e){if(aw(t,c))return{changes:{insert:e+e,from:c},effects:ao.of(c+e.length),range:Q.cursor(c+e.length)};if(TC(t,c)){let g=n&&t.sliceDoc(c,c+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:c,to:c+g.length,insert:g},range:Q.cursor(c+g.length)}}}else{if(n&&t.sliceDoc(c-2*e.length,c)==e+e&&(f=lw(t,c-2*e.length,i))>-1&&aw(t,f))return{changes:{insert:e+e+e+e,from:c},effects:ao.of(c+e.length),range:Q.cursor(c+e.length)};if(t.charCategorizer(c)(h)!=lt.Word&&lw(t,c,i)>-1&&!WG(t,c,e,i))return{changes:{insert:e+e,from:c},effects:ao.of(c+e.length),range:Q.cursor(c+e.length)}}return{range:o=a}});return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function aw(t,e){let n=Kt(t).resolveInner(e+1);return n.parent&&n.from==e}function WG(t,e,n,r){let i=Kt(t).resolveInner(e,-1),o=r.reduce((s,a)=>Math.max(s,a.length),0);for(let s=0;s<5;s++){let a=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),c=a.indexOf(n);if(!c||c>-1&&r.indexOf(a.slice(0,c))>-1){let f=i.firstChild;for(;f&&f.from==i.from&&f.to-f.from>n.length+c;){if(t.sliceDoc(f.to-n.length,f.to)==n)return!1;f=f.firstChild}return!0}let h=i.to==e&&i.parent;if(!h)break;i=h}return!1}function lw(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=lt.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=lt.Word)return o}return-1}function zG(t={}){return[OG,un,Dt.of(t),MG,UG,DG]}const MC=[{key:"Ctrl-Space",run:sw},{mac:"Alt-`",run:sw},{key:"Escape",run:AG},{key:"ArrowDown",run:iu(!0)},{key:"ArrowUp",run:iu(!1)},{key:"PageDown",run:iu(!0,"page")},{key:"PageUp",run:iu(!1,"page")},{key:"Enter",run:SG}],UG=Oo.highest(zh.computeN([Dt],t=>t.facet(Dt).defaultKeymap?[MC]:[]));class cw{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class io{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=r.facet(rl).markerFilter;i&&(e=i(e,r));let o=e.slice().sort((f,d)=>f.from-d.from||f.to-d.to),s=new Jr,a=[],c=0;for(let f=0;;){let d=f==o.length?null:o[f];if(!d&&!a.length)break;let g,v;for(a.length?(g=c,v=a.reduce((w,C)=>Math.min(w,C.to),d&&d.from>g?d.from:1e8)):(g=d.from,v=d.to,a.push(d),f++);f<o.length;){let w=o[f];if(w.from==g&&(w.to>w.from||w.to==g))a.push(w),f++,v=Math.min(w.to,v);else{v=Math.min(w.from,v);break}}let x=iY(a);if(a.some(w=>w.from==w.to||w.from==w.to-1&&r.doc.lineAt(w.from).to==w.from))s.add(g,g,xe.widget({widget:new eY(x),diagnostics:a.slice()}));else{let w=a.reduce((C,S)=>S.markClass?C+" "+S.markClass:C,"");s.add(g,v,xe.mark({class:"cm-lintRange cm-lintRange-"+x+w,diagnostics:a.slice(),inclusiveEnd:a.some(C=>C.to>v)}))}c=v;for(let w=0;w<a.length;w++)a[w].to<=c&&a.splice(w--,1)}let h=s.finish();return new io(h,n,js(h))}}function js(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,o,{spec:s})=>{if(!(e&&s.diagnostics.indexOf(e)<0))if(!r)r=new cw(i,o,e||s.diagnostics[0]);else{if(s.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new cw(r.from,o,r.diagnostic)}}),r}function qG(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(rl).hideOn(t,n,r);if(i!=null)return i;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(s=>s.is(EC))||t.changes.touchesRange(o.from,Math.max(o.to,r)))}function KG(t,e){return t.field(Rn,!1)?e:e.concat(Ee.appendConfig.of(oY))}const EC=Ee.define(),qm=Ee.define(),OC=Ee.define(),Rn=Lt.define({create(){return new io(xe.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);r=js(n,t.selected.diagnostic,o)||js(n,null,o)}!n.size&&i&&e.state.facet(rl).autoPanel&&(i=null),t=new io(n,i,r)}for(let n of e.effects)if(n.is(EC)){let r=e.state.facet(rl).autoPanel?n.value.length?il.open:null:t.panel;t=io.init(n.value,r,e.state)}else n.is(qm)?t=new io(t.diagnostics,n.value?il.open:null,t.selected):n.is(OC)&&(t=new io(t.diagnostics,t.panel,n.value));return t},provide:t=>[Qa.from(t,e=>e.panel),le.decorations.from(t,e=>e.diagnostics)]}),GG=xe.mark({class:"cm-lintRange cm-lintRange-active"});function YG(t,e,n){let{diagnostics:r}=t.state.field(Rn),i,o=-1,s=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(c,h,{spec:f})=>{if(e>=c&&e<=h&&(c==h||(e>c||n>0)&&(e<h||n<0)))return i=f.diagnostics,o=c,s=h,!1});let a=t.state.facet(rl).tooltipFilter;return i&&a&&(i=a(i,t.state)),i?{pos:o,end:s,above:t.state.doc.lineAt(o).to<s,create(){return{dom:XG(t,i)}}}:null}function XG(t,e){return et("ul",{class:"cm-tooltip-lint"},e.map(n=>IC(t,n,!1)))}const ZG=t=>{let e=t.state.field(Rn,!1);(!e||!e.panel)&&t.dispatch({effects:KG(t.state,[qm.of(!0)])});let n=Za(t,il.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},uw=t=>{let e=t.state.field(Rn,!1);return!e||!e.panel?!1:(t.dispatch({effects:qm.of(!1)}),!0)},QG=t=>{let e=t.state.field(Rn,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},JG=[{key:"Mod-Shift-m",run:ZG,preventDefault:!0},{key:"F8",run:QG}],rl=fe.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},Mr(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function DC(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(o=>o.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function IC(t,e,n){var r;let i=n?DC(e.actions):[];return et("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},et("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,s)=>{let a=!1,c=g=>{if(g.preventDefault(),a)return;a=!0;let v=js(t.state.field(Rn).diagnostics,e);v&&o.apply(t,v.from,v.to)},{name:h}=o,f=i[s]?h.indexOf(i[s]):-1,d=f<0?h:[h.slice(0,f),et("u",h.slice(f,f+1)),h.slice(f+1)];return et("button",{type:"button",class:"cm-diagnosticAction",onclick:c,onmousedown:c,"aria-label":` Action: ${h}${f<0?"":` (access key "${i[s]})"`}.`},d)}),e.source&&et("div",{class:"cm-diagnosticSource"},e.source))}class eY extends ai{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return et("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class hw{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=IC(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class il{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)uw(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],s=DC(o.actions);for(let a=0;a<s.length;a++)if(s[a].toUpperCase().charCodeAt(0)==i.keyCode){let c=js(this.view.state.field(Rn).diagnostics,o);c&&o.actions[a].apply(e,c.from,c.to)}}else return;i.preventDefault()},r=i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)};this.list=et("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=et("div",{class:"cm-panel-lint"},this.list,et("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>uw(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Rn).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Rn),r=0,i=!1,o=null,s=new Set;for(e.between(0,this.view.state.doc.length,(a,c,{spec:h})=>{for(let f of h.diagnostics){if(s.has(f))continue;s.add(f);let d=-1,g;for(let v=r;v<this.items.length;v++)if(this.items[v].diagnostic==f){d=v;break}d<0?(g=new hw(this.view,f),this.items.splice(r,0,g),i=!0):(g=this.items[d],d>r&&(this.items.splice(r,d-r),i=!0)),n&&g.diagnostic==n.diagnostic?g.dom.hasAttribute("aria-selected")||(g.dom.setAttribute("aria-selected","true"),o=g):g.dom.hasAttribute("aria-selected")&&g.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new hw(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:c})=>{let h=c.height/this.list.offsetHeight;a.top<c.top?this.list.scrollTop-=(c.top-a.top)/h:a.bottom>c.bottom&&(this.list.scrollTop+=(a.bottom-c.bottom)/h)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Rn),r=js(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:OC.of(r)})}static open(e){return new il(e)}}function tY(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function ou(t){return tY(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const nY=le.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:ou("#d11")},".cm-lintRange-warning":{backgroundImage:ou("orange")},".cm-lintRange-info":{backgroundImage:ou("#999")},".cm-lintRange-hint":{backgroundImage:ou("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function rY(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function iY(t){let e="hint",n=1;for(let r of t){let i=rY(r.severity);i>n&&(n=i,e=r.severity)}return e}const oY=[Rn,le.decorations.compute([Rn],t=>{let{selected:e,panel:n}=t.field(Rn);return!e||!n||e.from==e.to?xe.none:xe.set([GG.range(e.from,e.to)])}),cU(YG,{hideOn:qG}),nY];var fw=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(NG)),e.defaultKeymap!==!1&&(r=r.concat(EK)),e.searchKeymap!==!1&&(r=r.concat(nG)),e.historyKeymap!==!1&&(r=r.concat(Fq)),e.foldKeymap!==!1&&(r=r.concat(GU)),e.completionKeymap!==!1&&(r=r.concat(MC)),e.lintKeymap!==!1&&(r=r.concat(JG));var i=[];return e.lineNumbers!==!1&&i.push(xU()),e.highlightActiveLineGutter!==!1&&i.push($U()),e.highlightSpecialChars!==!1&&i.push(jz()),e.history!==!1&&i.push(Eq()),e.foldGutter!==!1&&i.push(QU()),e.drawSelection!==!1&&i.push(kz()),e.dropCursor!==!1&&i.push(Dz()),e.allowMultipleSelections!==!1&&i.push(Ue.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(jU()),e.syntaxHighlighting!==!1&&i.push(M4(nq,{fallback:!0})),e.bracketMatching!==!1&&i.push(cq()),e.closeBrackets!==!1&&i.push(IG()),e.autocompletion!==!1&&i.push(zG()),e.rectangularSelection!==!1&&i.push(Qz()),n!==!1&&i.push(tU()),e.highlightActiveLine!==!1&&i.push(zz()),e.highlightSelectionMatches!==!1&&i.push(NK()),e.tabSize&&typeof e.tabSize=="number"&&i.push(qh.of(" ".repeat(e.tabSize))),i.concat([zh.of(r.flat())]).filter(Boolean)};const sY="#e5c07b",dw="#e06c75",aY="#56b6c2",lY="#ffffff",Au="#abb2bf",Q1="#7d8799",cY="#61afef",uY="#98c379",gw="#d19a66",hY="#c678dd",fY="#21252b",mw="#2c313a",pw="#282c34",C0="#353a42",dY="#3E4451",vw="#528bff",gY=le.theme({"&":{color:Au,backgroundColor:pw},".cm-content":{caretColor:vw},".cm-cursor, .cm-dropCursor":{borderLeftColor:vw},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:dY},".cm-panels":{backgroundColor:fY,color:Au},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:pw,color:Q1,border:"none"},".cm-activeLineGutter":{backgroundColor:mw},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:C0},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:C0,borderBottomColor:C0},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:mw,color:Au}}},{dark:!0}),mY=Cl.define([{tag:U.keyword,color:hY},{tag:[U.name,U.deleted,U.character,U.propertyName,U.macroName],color:dw},{tag:[U.function(U.variableName),U.labelName],color:cY},{tag:[U.color,U.constant(U.name),U.standard(U.name)],color:gw},{tag:[U.definition(U.name),U.separator],color:Au},{tag:[U.typeName,U.className,U.number,U.changed,U.annotation,U.modifier,U.self,U.namespace],color:sY},{tag:[U.operator,U.operatorKeyword,U.url,U.escape,U.regexp,U.link,U.special(U.string)],color:aY},{tag:[U.meta,U.comment],color:Q1},{tag:U.strong,fontWeight:"bold"},{tag:U.emphasis,fontStyle:"italic"},{tag:U.strikethrough,textDecoration:"line-through"},{tag:U.link,color:Q1,textDecoration:"underline"},{tag:U.heading,fontWeight:"bold",color:dw},{tag:[U.atom,U.bool,U.special(U.variableName)],color:gw},{tag:[U.processingInstruction,U.string,U.inserted],color:uY},{tag:U.invalid,color:lY}]),pY=[gY,M4(mY)];var vY=le.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),bY=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:o="light",placeholder:s="",basicSetup:a=!0}=e,c=[];switch(n&&c.unshift(zh.of([OK])),a&&(typeof a=="boolean"?c.unshift(fw()):c.unshift(fw(a))),s&&c.unshift(Gz(s)),o){case"light":c.push(vY);break;case"dark":c.push(pY);break;case"none":break;default:c.push(o);break}return r===!1&&c.push(le.editable.of(!1)),i&&c.push(Ue.readOnly.of(!0)),[...c]},wY=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)}),bw=Tr.define(),xY=[];function _C(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:s,extensions:a=xY,autoFocus:c,theme:h="light",height:f=null,minHeight:d=null,maxHeight:g=null,width:v=null,minWidth:x=null,maxWidth:w=null,placeholder:C="",editable:S=!0,readOnly:R=!1,indentWithTab:T=!0,basicSetup:E=!0,root:O,initialState:L}=t,[I,V]=b.useState(),[F,H]=b.useState(),[K,W]=b.useState(),J=le.theme({"&":{height:f,minHeight:d,maxHeight:g,width:v,minWidth:x,maxWidth:w},"& .cm-scroller":{height:"100% !important"}}),G=le.updateListener.of(te=>{if(te.docChanged&&typeof r=="function"&&!te.transactions.some(ce=>ce.annotation(bw))){var ne=te.state.doc,Y=ne.toString();r(Y,te)}i&&i(wY(te))}),re=bY({theme:h,editable:S,readOnly:R,placeholder:C,indentWithTab:T,basicSetup:E}),se=[G,J,...re];return s&&typeof s=="function"&&se.push(le.updateListener.of(s)),se=se.concat(a),b.useEffect(()=>{if(I&&!K){var te={doc:e,selection:n,extensions:se},ne=L?Ue.fromJSON(L.json,te,L.fields):Ue.create(te);if(W(ne),!F){var Y=new le({state:ne,parent:I,root:O});H(Y),o&&o(Y,ne)}}return()=>{F&&(W(void 0),H(void 0))}},[I,K]),b.useEffect(()=>V(t.container),[t.container]),b.useEffect(()=>()=>{F&&(F.destroy(),H(void 0))},[F]),b.useEffect(()=>{c&&F&&F.focus()},[c,F]),b.useEffect(()=>{F&&F.dispatch({effects:Ee.reconfigure.of(se)})},[h,a,f,d,g,v,x,w,C,S,R,T,E,r,s]),b.useEffect(()=>{if(e!==void 0){var te=F?F.state.doc.toString():"";F&&e!==te&&F.dispatch({changes:{from:0,to:te.length,insert:e||""},annotations:[bw.of(!0)]})}},[e,F]),{state:K,setState:W,view:F,setView:H,container:I,setContainer:V}}var yY=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],CY=b.forwardRef((t,e)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:s,onStatistics:a,onCreateEditor:c,onUpdate:h,autoFocus:f,theme:d="light",height:g,minHeight:v,maxHeight:x,width:w,minWidth:C,maxWidth:S,basicSetup:R,placeholder:T,indentWithTab:E,editable:O,readOnly:L,root:I,initialState:V}=t,F=xq(t,yY),H=b.useRef(null),{state:K,view:W,container:J}=_C({container:H.current,root:I,value:r,autoFocus:f,theme:d,height:g,minHeight:v,maxHeight:x,width:w,minWidth:C,maxWidth:S,basicSetup:R,placeholder:T,indentWithTab:E,editable:O,readOnly:L,selection:i,onChange:s,onStatistics:a,onCreateEditor:c,onUpdate:h,extensions:o,initialState:V});if(b.useImperativeHandle(e,()=>({editor:H.current,state:K,view:W}),[H,J,K,W]),typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var G=typeof d=="string"?"cm-theme-"+d:"cm-theme";return p.jsx("div",z({ref:H,className:""+G+(n?" "+n:"")},F))});CY.displayName="CodeMirror";let $0=new Map,J1=!1;try{J1=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let uh=!1;try{uh=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const LC={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class BC{format(e){let n="";if(!J1&&this.options.signDisplay!=null?n=SY(this.numberFormatter,this.options.signDisplay,e):n=this.numberFormatter.format(e),this.options.style==="unit"&&!uh){var r;let{unit:i,unitDisplay:o="short",locale:s}=this.resolvedOptions();if(!i)return n;let a=(r=LC[i])===null||r===void 0?void 0:r[o];n+=a[s]||a.default}return n}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(e,n);if(n<e)throw new RangeError("End date must be >= start date");return`${this.format(e)} – ${this.format(n)}`}formatRangeToParts(e,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(e,n);if(n<e)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(e),i=this.numberFormatter.formatToParts(n);return[...r.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!J1&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!uh&&this.options.style==="unit"&&(e={...e,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,n={}){this.numberFormatter=$Y(e,n),this.options=n}}function $Y(t,e={}){let{numberingSystem:n}=e;if(n&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${n}`),e.style==="unit"&&!uh){var r;let{unit:s,unitDisplay:a="short"}=e;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=LC[s])===null||r===void 0)&&r[a]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${a}`);e={...e,style:"decimal"}}let i=t+(e?Object.entries(e).sort((s,a)=>s[0]<a[0]?-1:1).join():"");if($0.has(i))return $0.get(i);let o=new Intl.NumberFormat(t,e);return $0.set(i,o),o}function SY(t,e,n){if(e==="auto")return t.format(n);if(e==="never")return t.format(Math.abs(n));{let r=!1;if(e==="always"?r=n>0||Object.is(n,0):e==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let i=t.format(-n),o=t.format(n),s=i.replace(o,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(o,"!!!").replace(s,"+").replace("!!!",o)}else return t.format(n)}}const AY=new RegExp("^.*\\(.*\\).*$"),RY=["latn","arab","hanidec"];class NC{parse(e){return S0(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,n,r){return S0(this.locale,this.options,e).isValidPartialNumber(e,n,r)}getNumberingSystem(e){return S0(this.locale,this.options,e).options.numberingSystem}constructor(e,n={}){this.locale=e,this.options=n}}const ww=new Map;function S0(t,e,n){let r=xw(t,e);if(!t.includes("-nu-")&&!r.isValidPartialNumber(n)){for(let i of RY)if(i!==r.options.numberingSystem){let o=xw(t+(t.includes("-u-")?"-nu-":"-u-nu-")+i,e);if(o.isValidPartialNumber(n))return o}}return r}function xw(t,e){let n=t+(e?Object.entries(e).sort((i,o)=>i[0]<o[0]?-1:1).join():""),r=ww.get(n);return r||(r=new kY(t,e),ww.set(n,r)),r}class kY{parse(e){let n=this.sanitize(e);if(this.symbols.group&&(n=su(n,this.symbols.group,"")),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,"-")),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let s=n.indexOf("-");n=n.replace("-","");let a=n.indexOf(".");a===-1&&(a=n.length),n=n.replace(".",""),a-2===0?n=`0.${n}`:a-2===-1?n=`0.0${n}`:a-2===-2?n="0.00":n=`${n.slice(0,a-2)}.${n.slice(a-2)}`,s>-1&&(n=`-${n}`)}let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.style==="percent"){var i,o;let s={...this.options,style:"decimal",minimumFractionDigits:Math.min(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)+2,20),maximumFractionDigits:Math.min(((o=this.options.maximumFractionDigits)!==null&&o!==void 0?o:0)+2,20)};return new NC(this.locale,s).parse(new BC(this.locale,s).format(r))}return this.options.currencySign==="accounting"&&AY.test(e)&&(r=-1*r),r}sanitize(e){return e=e.replace(this.symbols.literals,""),this.symbols.minusSign&&(e=e.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(e=e.replace(",",this.symbols.decimal),e=e.replace("،",this.symbols.decimal)),this.symbols.group&&(e=su(e,".",this.symbols.group))),this.options.locale==="fr-FR"&&(e=su(e,"."," ")),e}isValidPartialNumber(e,n=-1/0,r=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&n<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&r>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=su(e,this.symbols.group,"")),e=e.replace(this.symbols.numeral,""),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,"")),e.length===0)}constructor(e,n={}){this.locale=e,this.formatter=new Intl.NumberFormat(e,n),this.options=this.formatter.resolvedOptions(),this.symbols=MY(e,this.formatter,this.options,n);var r,i;this.options.style==="percent"&&(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)>18||((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const yw=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),TY=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function MY(t,e,n,r){var i,o,s,a;let c=new Intl.NumberFormat(t,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21}),h=c.formatToParts(-10000.111),f=c.formatToParts(10000.111),d=TY.map(H=>c.formatToParts(H));var g;let v=(g=(i=h.find(H=>H.type==="minusSign"))===null||i===void 0?void 0:i.value)!==null&&g!==void 0?g:"-",x=(o=f.find(H=>H.type==="plusSign"))===null||o===void 0?void 0:o.value;!x&&(r?.signDisplay==="exceptZero"||r?.signDisplay==="always")&&(x="+");let C=(s=new Intl.NumberFormat(t,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(H=>H.type==="decimal"))===null||s===void 0?void 0:s.value,S=(a=h.find(H=>H.type==="group"))===null||a===void 0?void 0:a.value,R=h.filter(H=>!yw.has(H.type)).map(H=>Cw(H.value)),T=d.flatMap(H=>H.filter(K=>!yw.has(K.type)).map(K=>Cw(K.value))),E=[...new Set([...R,...T])].sort((H,K)=>K.length-H.length),O=E.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${E.join("|")}|[\\p{White_Space}]`,"gu"),L=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),I=new Map(L.map((H,K)=>[H,K])),V=new RegExp(`[${L.join("")}]`,"g");return{minusSign:v,plusSign:x,decimal:C,group:S,literals:O,numeral:V,index:H=>String(I.get(H))}}function su(t,e,n){return t.replaceAll?t.replaceAll(e,n):t.split(e).join(n)}function Cw(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var EY=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ss=new WeakMap,au=new WeakMap,lu={},A0=0,jC=function(t){return t&&(t.host||jC(t.parentNode))},OY=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=jC(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},DY=function(t,e,n,r){var i=OY(e,Array.isArray(t)?t:[t]);lu[n]||(lu[n]=new WeakMap);var o=lu[n],s=[],a=new Set,c=new Set(i),h=function(d){!d||a.has(d)||(a.add(d),h(d.parentNode))};i.forEach(h);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(g){if(a.has(g))f(g);else try{var v=g.getAttribute(r),x=v!==null&&v!=="false",w=(ss.get(g)||0)+1,C=(o.get(g)||0)+1;ss.set(g,w),o.set(g,C),s.push(g),w===1&&x&&au.set(g,!0),C===1&&g.setAttribute(n,"true"),x||g.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",g,S)}})};return f(e),a.clear(),A0++,function(){s.forEach(function(d){var g=ss.get(d)-1,v=o.get(d)-1;ss.set(d,g),o.set(d,v),g||(au.has(d)||d.removeAttribute(r),au.delete(d)),v||d.removeAttribute(n)}),A0--,A0||(ss=new WeakMap,ss=new WeakMap,au=new WeakMap,lu={})}},IY=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=EY(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),DY(r,i,n,"aria-hidden")):function(){return null}},FC=Sh(),R0=function(){},ef=$.forwardRef(function(t,e){var n=$.useRef(null),r=$.useState({onScrollCapture:R0,onWheelCapture:R0,onTouchMoveCapture:R0}),i=r[0],o=r[1],s=t.forwardProps,a=t.children,c=t.className,h=t.removeScrollBar,f=t.enabled,d=t.shards,g=t.sideCar,v=t.noIsolation,x=t.inert,w=t.allowPinchZoom,C=t.as,S=C===void 0?"div":C,R=Ks(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=g,E=$h([n,e]),O=exports.__assign(exports.__assign({},R),i);return $.createElement($.Fragment,null,f&&$.createElement(T,{sideCar:FC,removeScrollBar:h,shards:d,noIsolation:v,inert:x,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),s?$.cloneElement($.Children.only(a),exports.__assign(exports.__assign({},O),{ref:E})):$.createElement(S,exports.__assign({},O,{className:c,ref:E}),a))});ef.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ef.classNames={fullWidth:co,zeroRight:lo};var eg=!1;if(typeof window<"u")try{var cu=Object.defineProperty({},"passive",{get:function(){return eg=!0,!0}});window.addEventListener("test",cu,cu),window.removeEventListener("test",cu,cu)}catch{eg=!1}var as=eg?{passive:!1}:!1,_Y=function(t){return t.tagName==="TEXTAREA"},VC=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!_Y(t)&&n[e]==="visible")},LY=function(t){return VC(t,"overflowY")},BY=function(t){return VC(t,"overflowX")},$w=function(t,e){var n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=HC(t,n);if(r){var i=PC(t,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},NY=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},jY=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},HC=function(t,e){return t==="v"?LY(e):BY(e)},PC=function(t,e){return t==="v"?NY(e):jY(e)},FY=function(t,e){return t==="h"&&e==="rtl"?-1:1},VY=function(t,e,n,r,i){var o=FY(t,window.getComputedStyle(e).direction),s=o*r,a=n.target,c=e.contains(a),h=!1,f=s>0,d=0,g=0;do{var v=PC(t,a),x=v[0],w=v[1],C=v[2],S=w-C-o*x;(x||S)&&HC(t,a)&&(d+=S,g+=x),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&d===0||!f&&g===0)&&(h=!0),h},uu=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Sw=function(t){return[t.deltaX,t.deltaY]},Aw=function(t){return t&&"current"in t?t.current:t},HY=function(t,e){return t[0]===e[0]&&t[1]===e[1]},PY=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},WY=0,ls=[];function zY(t){var e=$.useRef([]),n=$.useRef([0,0]),r=$.useRef(),i=$.useState(WY++)[0],o=$.useState(function(){return fl()})[0],s=$.useRef(t);$.useEffect(function(){s.current=t},[t]),$.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var w=Ch([t.lockRef.current],(t.shards||[]).map(Aw),!0).filter(Boolean);return w.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=$.useCallback(function(w,C){if("touches"in w&&w.touches.length===2)return!s.current.allowPinchZoom;var S=uu(w),R=n.current,T="deltaX"in w?w.deltaX:R[0]-S[0],E="deltaY"in w?w.deltaY:R[1]-S[1],O,L=w.target,I=Math.abs(T)>Math.abs(E)?"h":"v";if("touches"in w&&I==="h"&&L.type==="range")return!1;var V=$w(I,L);if(!V)return!0;if(V?O=I:(O=I==="v"?"h":"v",V=$w(I,L)),!V)return!1;if(!r.current&&"changedTouches"in w&&(T||E)&&(r.current=O),!O)return!0;var F=r.current||O;return VY(F,C,w,F==="h"?T:E)},[]),c=$.useCallback(function(w){var C=w;if(!(!ls.length||ls[ls.length-1]!==o)){var S="deltaY"in C?Sw(C):uu(C),R=e.current.filter(function(O){return O.name===C.type&&O.target===C.target&&HY(O.delta,S)})[0];if(R&&R.should){C.cancelable&&C.preventDefault();return}if(!R){var T=(s.current.shards||[]).map(Aw).filter(Boolean).filter(function(O){return O.contains(C.target)}),E=T.length>0?a(C,T[0]):!s.current.noIsolation;E&&C.cancelable&&C.preventDefault()}}},[]),h=$.useCallback(function(w,C,S,R){var T={name:w,delta:C,target:S,should:R};e.current.push(T),setTimeout(function(){e.current=e.current.filter(function(E){return E!==T})},1)},[]),f=$.useCallback(function(w){n.current=uu(w),r.current=void 0},[]),d=$.useCallback(function(w){h(w.type,Sw(w),w.target,a(w,t.lockRef.current))},[]),g=$.useCallback(function(w){h(w.type,uu(w),w.target,a(w,t.lockRef.current))},[]);$.useEffect(function(){return ls.push(o),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:g}),document.addEventListener("wheel",c,as),document.addEventListener("touchmove",c,as),document.addEventListener("touchstart",f,as),function(){ls=ls.filter(function(w){return w!==o}),document.removeEventListener("wheel",c,as),document.removeEventListener("touchmove",c,as),document.removeEventListener("touchstart",f,as)}},[]);var v=t.removeScrollBar,x=t.inert;return $.createElement($.Fragment,null,x?$.createElement(o,{styles:PY(i)}):null,v?$.createElement(kh,{gapMode:"margin"}):null)}const UY=Ah(FC,zY);var WC=$.forwardRef(function(t,e){return $.createElement(ef,exports.__assign({},t,{ref:e,sideCar:UY}))});WC.classNames=ef.classNames;const zC="Popover",[UC,Hne]=bt(zC,[Ni]),Al=Ni(),[qY,Do]=UC(zC),KY=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!1}=t,a=Al(e),c=b.useRef(null),[h,f]=b.useState(!1),[d=!1,g]=It({prop:r,defaultProp:i,onChange:o});return b.createElement(cl,a,b.createElement(qY,{scope:e,contentId:_t(),triggerRef:c,open:d,onOpenChange:g,onOpenToggle:b.useCallback(()=>g(v=>!v),[g]),hasCustomAnchor:h,onCustomAnchorAdd:b.useCallback(()=>f(!0),[]),onCustomAnchorRemove:b.useCallback(()=>f(!1),[]),modal:s},n))},GY="PopoverAnchor",YY=b.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Do(GY,n),o=Al(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=i;return b.useEffect(()=>(s(),()=>a()),[s,a]),b.createElement(Ws,z({},o,r,{ref:e}))}),XY="PopoverTrigger",ZY=b.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Do(XY,n),o=Al(n),s=ye(e,i.triggerRef),a=b.createElement(ge.button,z({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":GC(i.open)},r,{ref:s,onClick:ie(t.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?a:b.createElement(Ws,z({asChild:!0},o),a)}),qC="PopoverPortal",[QY,JY]=UC(qC,{forceMount:void 0}),eX=t=>{const{__scopePopover:e,forceMount:n,children:r,container:i}=t,o=Do(qC,e);return b.createElement(QY,{scope:e,forceMount:n},b.createElement(Tt,{present:n||o.open},b.createElement(zs,{asChild:!0,container:i},r)))},ol="PopoverContent",tX=b.forwardRef((t,e)=>{const n=JY(ol,t.__scopePopover),{forceMount:r=n.forceMount,...i}=t,o=Do(ol,t.__scopePopover);return b.createElement(Tt,{present:r||o.open},o.modal?b.createElement(nX,z({},i,{ref:e})):b.createElement(rX,z({},i,{ref:e})))}),nX=b.forwardRef((t,e)=>{const n=Do(ol,t.__scopePopover),r=b.useRef(null),i=ye(e,r),o=b.useRef(!1);return b.useEffect(()=>{const s=r.current;if(s)return IY(s)},[]),b.createElement(WC,{as:Cr,allowPinchZoom:!0},b.createElement(KC,z({},t,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ie(t.onCloseAutoFocus,s=>{var a;s.preventDefault(),o.current||(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:ie(t.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,h=a.button===2||c;o.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:ie(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})))}),rX=b.forwardRef((t,e)=>{const n=Do(ol,t.__scopePopover),r=b.useRef(!1),i=b.useRef(!1);return b.createElement(KC,z({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=t.onCloseAutoFocus)===null||s===void 0||s.call(t,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=t.onInteractOutside)===null||s===void 0||s.call(t,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),KC=b.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:h,onInteractOutside:f,...d}=t,g=Do(ol,n),v=Al(n);return Us(),b.createElement(qs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},b.createElement(ko,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:h,onDismiss:()=>g.onOpenChange(!1)},b.createElement(ul,z({"data-state":GC(g.open),role:"dialog",id:g.contentId},v,d,{ref:e,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))}),iX=b.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,i=Al(n);return b.createElement(Ix,z({},i,r,{ref:e}))});function GC(t){return t?"open":"closed"}const oX=KY,sX=YY,aX=ZY,lX=eX,cX=tX,uX=iX,YC="Progress",tf=100,[hX,Pne]=bt(YC),[fX,dX]=hX(YC),XC=b.forwardRef((t,e)=>{const{__scopeProgress:n,value:r,max:i,getValueLabel:o=pX,...s}=t,a=tg(i)?i:tf,c=QC(r,a)?r:null,h=hh(c)?o(c,a):void 0;return b.createElement(fX,{scope:n,value:c,max:a},b.createElement(ge.div,z({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":hh(c)?c:void 0,"aria-valuetext":h,role:"progressbar","data-state":ZC(c,a),"data-value":c??void 0,"data-max":a},s,{ref:e})))});XC.propTypes={max(t,e,n){const r=t[e],i=String(r);return r&&!tg(r)?new Error(vX(i,n)):null},value(t,e,n){const r=t[e],i=String(r),o=tg(t.max)?t.max:tf;return r!=null&&!QC(r,o)?new Error(bX(i,n)):null}};const gX="ProgressIndicator",mX=b.forwardRef((t,e)=>{var n;const{__scopeProgress:r,...i}=t,o=dX(gX,r);return b.createElement(ge.div,z({"data-state":ZC(o.value,o.max),"data-value":(n=o.value)!==null&&n!==void 0?n:void 0,"data-max":o.max},i,{ref:e}))});function pX(t,e){return`${Math.round(t/e*100)}%`}function ZC(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function hh(t){return typeof t=="number"}function tg(t){return hh(t)&&!isNaN(t)&&t>0}function QC(t,e){return hh(t)&&!isNaN(t)&&t<=e&&t>=0}function vX(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${tf}\`.`}function bX(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be:
  - a positive number
  - less than the value passed to \`max\` (or ${tf} if no \`max\` prop is set)
  - \`null\` if the progress is indeterminate.

Defaulting to \`null\`.`}const wX=XC,xX=mX,JC="Radio",[yX,e$]=bt(JC),[CX,$X]=yX(JC),SX=b.forwardRef((t,e)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:o,disabled:s,value:a="on",onCheck:c,...h}=t,[f,d]=b.useState(null),g=ye(e,w=>d(w)),v=b.useRef(!1),x=f?!!f.closest("form"):!0;return b.createElement(CX,{scope:n,checked:i,disabled:s},b.createElement(ge.button,z({type:"button",role:"radio","aria-checked":i,"data-state":t$(i),"data-disabled":s?"":void 0,disabled:s,value:a},h,{ref:g,onClick:ie(t.onClick,w=>{i||c?.(),x&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})})),x&&b.createElement(kX,{control:f,bubbles:!v.current,name:r,value:a,checked:i,required:o,disabled:s,style:{transform:"translateX(-100%)"}}))}),AX="RadioIndicator",RX=b.forwardRef((t,e)=>{const{__scopeRadio:n,forceMount:r,...i}=t,o=$X(AX,n);return b.createElement(Tt,{present:r||o.checked},b.createElement(ge.span,z({"data-state":t$(o.checked),"data-disabled":o.disabled?"":void 0},i,{ref:e})))}),kX=t=>{const{control:e,checked:n,bubbles:r=!0,...i}=t,o=b.useRef(null),s=Eh(n),a=xh(e);return b.useEffect(()=>{const c=o.current,h=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(h,"checked").set;if(s!==n&&d){const g=new Event("click",{bubbles:r});d.call(c,n),c.dispatchEvent(g)}},[s,n,r]),b.createElement("input",z({type:"radio","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function t$(t){return t?"checked":"unchecked"}const TX=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],n$="RadioGroup",[MX,Wne]=bt(n$,[Ys,e$]),r$=Ys(),i$=e$(),[EX,OX]=MX(n$),DX=b.forwardRef((t,e)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:o,required:s=!1,disabled:a=!1,orientation:c,dir:h,loop:f=!0,onValueChange:d,...g}=t,v=r$(n),x=To(h),[w,C]=It({prop:o,defaultProp:i,onChange:d});return b.createElement(EX,{scope:n,name:r,required:s,disabled:a,value:w,onValueChange:C},b.createElement(sm,z({asChild:!0},v,{orientation:c,dir:x,loop:f}),b.createElement(ge.div,z({role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":a?"":void 0,dir:x},g,{ref:e}))))}),IX="RadioGroupItem",_X=b.forwardRef((t,e)=>{const{__scopeRadioGroup:n,disabled:r,...i}=t,o=OX(IX,n),s=o.disabled||r,a=r$(n),c=i$(n),h=b.useRef(null),f=ye(e,h),d=o.value===i.value,g=b.useRef(!1);return b.useEffect(()=>{const v=w=>{TX.includes(w.key)&&(g.current=!0)},x=()=>g.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",x)}},[]),b.createElement(am,z({asChild:!0},a,{focusable:!s,active:d}),b.createElement(SX,z({disabled:s,required:o.required,checked:d},c,i,{name:o.name,ref:f,onCheck:()=>o.onValueChange(i.value),onKeyDown:ie(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:ie(i.onFocus,()=>{var v;g.current&&((v=h.current)===null||v===void 0||v.click())})})))}),LX=b.forwardRef((t,e)=>{const{__scopeRadioGroup:n,...r}=t,i=i$(n);return b.createElement(RX,z({},i,r,{ref:e}))}),BX=DX,NX=_X,jX=LX,o$="Switch",[FX,zne]=bt(o$),[VX,HX]=FX(o$),PX=b.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:c="on",onCheckedChange:h,...f}=t,[d,g]=b.useState(null),v=ye(e,R=>g(R)),x=b.useRef(!1),w=d?!!d.closest("form"):!0,[C=!1,S]=It({prop:i,defaultProp:o,onChange:h});return b.createElement(VX,{scope:n,checked:C,disabled:a},b.createElement(ge.button,z({type:"button",role:"switch","aria-checked":C,"aria-required":s,"data-state":s$(C),"data-disabled":a?"":void 0,disabled:a,value:c},f,{ref:v,onClick:ie(t.onClick,R=>{S(T=>!T),w&&(x.current=R.isPropagationStopped(),x.current||R.stopPropagation())})})),w&&b.createElement(UX,{control:d,bubbles:!x.current,name:r,value:c,checked:C,required:s,disabled:a,style:{transform:"translateX(-100%)"}}))}),WX="SwitchThumb",zX=b.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,i=HX(WX,n);return b.createElement(ge.span,z({"data-state":s$(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:e}))}),UX=t=>{const{control:e,checked:n,bubbles:r=!0,...i}=t,o=b.useRef(null),s=Eh(n),a=xh(e);return b.useEffect(()=>{const c=o.current,h=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(h,"checked").set;if(s!==n&&d){const g=new Event("click",{bubbles:r});d.call(c,n),c.dispatchEvent(g)}},[s,n,r]),b.createElement("input",z({type:"checkbox","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function s$(t){return t?"checked":"unchecked"}const qX=PX,KX=zX,a$="Tabs",[GX,Une]=bt(a$,[Ys]),l$=Ys(),[YX,Km]=GX(a$),XX=b.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:s="horizontal",dir:a,activationMode:c="automatic",...h}=t,f=To(a),[d,g]=It({prop:r,onChange:i,defaultProp:o});return b.createElement(YX,{scope:n,baseId:_t(),value:d,onValueChange:g,orientation:s,dir:f,activationMode:c},b.createElement(ge.div,z({dir:f,"data-orientation":s},h,{ref:e})))}),ZX="TabsList",QX=b.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...i}=t,o=Km(ZX,n),s=l$(n);return b.createElement(sm,z({asChild:!0},s,{orientation:o.orientation,dir:o.dir,loop:r}),b.createElement(ge.div,z({role:"tablist","aria-orientation":o.orientation},i,{ref:e})))}),JX="TabsTrigger",eZ=b.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=t,s=Km(JX,n),a=l$(n),c=c$(s.baseId,r),h=u$(s.baseId,r),f=r===s.value;return b.createElement(am,z({asChild:!0},a,{focusable:!i,active:f}),b.createElement(ge.button,z({type:"button",role:"tab","aria-selected":f,"aria-controls":h,"data-state":f?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c},o,{ref:e,onMouseDown:ie(t.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?s.onValueChange(r):d.preventDefault()}),onKeyDown:ie(t.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(r)}),onFocus:ie(t.onFocus,()=>{const d=s.activationMode!=="manual";!f&&!i&&d&&s.onValueChange(r)})})))}),tZ="TabsContent",nZ=b.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...s}=t,a=Km(tZ,n),c=c$(a.baseId,r),h=u$(a.baseId,r),f=r===a.value,d=b.useRef(f);return b.useEffect(()=>{const g=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(g)},[]),b.createElement(Tt,{present:i||f},({present:g})=>b.createElement(ge.div,z({"data-state":f?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!g,id:h,tabIndex:0},s,{ref:e,style:{...t.style,animationDuration:d.current?"0s":void 0}}),g&&o))});function c$(t,e){return`${t}-trigger-${e}`}function u$(t,e){return`${t}-content-${e}`}const rZ=XX,iZ=QX,oZ=eZ,sZ=nZ;var hs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function aZ(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function lZ(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var fh={exports:{}};/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */fh.exports;(function(t,e){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",h=500,f="__lodash_placeholder__",d=1,g=2,v=4,x=1,w=2,C=1,S=2,R=4,T=8,E=16,O=32,L=64,I=128,V=256,F=512,H=30,K="...",W=800,J=16,G=1,re=2,se=3,te=1/0,ne=9007199254740991,Y=17976931348623157e292,ce=NaN,me=4294967295,Ie=me-1,we=me>>>1,qe=[["ary",I],["bind",C],["bindKey",S],["curry",T],["curryRight",E],["flip",F],["partial",O],["partialRight",L],["rearg",V]],Te="[object Arguments]",Ve="[object Array]",pe="[object AsyncFunction]",De="[object Boolean]",Re="[object Date]",Le="[object DOMException]",Ae="[object Error]",He="[object Function]",wt="[object GeneratorFunction]",Ze="[object Map]",Pe="[object Number]",Yt="[object Null]",ft="[object Object]",_o="[object Promise]",ea="[object Proxy]",or="[object RegExp]",Mt="[object Set]",li="[object String]",ci="[object Symbol]",Lo="[object Undefined]",Wi="[object WeakMap]",ta="[object WeakSet]",zi="[object ArrayBuffer]",ui="[object DataView]",Ui="[object Float32Array]",Bt="[object Float64Array]",hf="[object Int8Array]",ff="[object Int16Array]",df="[object Int32Array]",gf="[object Uint8Array]",mf="[object Uint8ClampedArray]",pf="[object Uint16Array]",vf="[object Uint32Array]",c7=/\b__p \+= '';/g,u7=/\b(__p \+=) '' \+/g,h7=/(__e\(.*?\)|\b__t\)) \+\n'';/g,op=/&(?:amp|lt|gt|quot|#39);/g,sp=/[&<>"']/g,f7=RegExp(op.source),d7=RegExp(sp.source),g7=/<%-([\s\S]+?)%>/g,m7=/<%([\s\S]+?)%>/g,ap=/<%=([\s\S]+?)%>/g,p7=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,v7=/^\w*$/,b7=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bf=/[\\^$.*+?()[\]{}|]/g,w7=RegExp(bf.source),wf=/^\s+/,x7=/\s/,y7=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,C7=/\{\n\/\* \[wrapped with (.+)\] \*/,$7=/,? & /,S7=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,A7=/[()=,{}\[\]\/\s]/,R7=/\\(\\)?/g,k7=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lp=/\w*$/,T7=/^[-+]0x[0-9a-f]+$/i,M7=/^0b[01]+$/i,E7=/^\[object .+?Constructor\]$/,O7=/^0o[0-7]+$/i,D7=/^(?:0|[1-9]\d*)$/,I7=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ol=/($^)/,_7=/['\n\r\u2028\u2029\\]/g,Dl="\\ud800-\\udfff",L7="\\u0300-\\u036f",B7="\\ufe20-\\ufe2f",N7="\\u20d0-\\u20ff",cp=L7+B7+N7,up="\\u2700-\\u27bf",hp="a-z\\xdf-\\xf6\\xf8-\\xff",j7="\\xac\\xb1\\xd7\\xf7",F7="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",V7="\\u2000-\\u206f",H7=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fp="A-Z\\xc0-\\xd6\\xd8-\\xde",dp="\\ufe0e\\ufe0f",gp=j7+F7+V7+H7,xf="['’]",P7="["+Dl+"]",mp="["+gp+"]",Il="["+cp+"]",pp="\\d+",W7="["+up+"]",vp="["+hp+"]",bp="[^"+Dl+gp+pp+up+hp+fp+"]",yf="\\ud83c[\\udffb-\\udfff]",z7="(?:"+Il+"|"+yf+")",wp="[^"+Dl+"]",Cf="(?:\\ud83c[\\udde6-\\uddff]){2}",$f="[\\ud800-\\udbff][\\udc00-\\udfff]",Bo="["+fp+"]",xp="\\u200d",yp="(?:"+vp+"|"+bp+")",U7="(?:"+Bo+"|"+bp+")",Cp="(?:"+xf+"(?:d|ll|m|re|s|t|ve))?",$p="(?:"+xf+"(?:D|LL|M|RE|S|T|VE))?",Sp=z7+"?",Ap="["+dp+"]?",q7="(?:"+xp+"(?:"+[wp,Cf,$f].join("|")+")"+Ap+Sp+")*",K7="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",G7="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Rp=Ap+Sp+q7,Y7="(?:"+[W7,Cf,$f].join("|")+")"+Rp,X7="(?:"+[wp+Il+"?",Il,Cf,$f,P7].join("|")+")",Z7=RegExp(xf,"g"),Q7=RegExp(Il,"g"),Sf=RegExp(yf+"(?="+yf+")|"+X7+Rp,"g"),J7=RegExp([Bo+"?"+vp+"+"+Cp+"(?="+[mp,Bo,"$"].join("|")+")",U7+"+"+$p+"(?="+[mp,Bo+yp,"$"].join("|")+")",Bo+"?"+yp+"+"+Cp,Bo+"+"+$p,G7,K7,pp,Y7].join("|"),"g"),e8=RegExp("["+xp+Dl+cp+dp+"]"),t8=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,n8=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],r8=-1,it={};it[Ui]=it[Bt]=it[hf]=it[ff]=it[df]=it[gf]=it[mf]=it[pf]=it[vf]=!0,it[Te]=it[Ve]=it[zi]=it[De]=it[ui]=it[Re]=it[Ae]=it[He]=it[Ze]=it[Pe]=it[ft]=it[or]=it[Mt]=it[li]=it[Wi]=!1;var rt={};rt[Te]=rt[Ve]=rt[zi]=rt[ui]=rt[De]=rt[Re]=rt[Ui]=rt[Bt]=rt[hf]=rt[ff]=rt[df]=rt[Ze]=rt[Pe]=rt[ft]=rt[or]=rt[Mt]=rt[li]=rt[ci]=rt[gf]=rt[mf]=rt[pf]=rt[vf]=!0,rt[Ae]=rt[He]=rt[Wi]=!1;var i8={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},o8={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},s8={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},a8={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},l8=parseFloat,c8=parseInt,kp=typeof hs=="object"&&hs&&hs.Object===Object&&hs,u8=typeof self=="object"&&self&&self.Object===Object&&self,Nt=kp||u8||Function("return this")(),Af=e&&!e.nodeType&&e,qi=Af&&!0&&t&&!t.nodeType&&t,Tp=qi&&qi.exports===Af,Rf=Tp&&kp.process,Mn=function(){try{var N=qi&&qi.require&&qi.require("util").types;return N||Rf&&Rf.binding&&Rf.binding("util")}catch{}}(),Mp=Mn&&Mn.isArrayBuffer,Ep=Mn&&Mn.isDate,Op=Mn&&Mn.isMap,Dp=Mn&&Mn.isRegExp,Ip=Mn&&Mn.isSet,_p=Mn&&Mn.isTypedArray;function pn(N,q,P){switch(P.length){case 0:return N.call(q);case 1:return N.call(q,P[0]);case 2:return N.call(q,P[0],P[1]);case 3:return N.call(q,P[0],P[1],P[2])}return N.apply(q,P)}function h8(N,q,P,de){for(var Me=-1,Ye=N==null?0:N.length;++Me<Ye;){var $t=N[Me];q(de,$t,P($t),N)}return de}function En(N,q){for(var P=-1,de=N==null?0:N.length;++P<de&&q(N[P],P,N)!==!1;);return N}function f8(N,q){for(var P=N==null?0:N.length;P--&&q(N[P],P,N)!==!1;);return N}function Lp(N,q){for(var P=-1,de=N==null?0:N.length;++P<de;)if(!q(N[P],P,N))return!1;return!0}function hi(N,q){for(var P=-1,de=N==null?0:N.length,Me=0,Ye=[];++P<de;){var $t=N[P];q($t,P,N)&&(Ye[Me++]=$t)}return Ye}function _l(N,q){var P=N==null?0:N.length;return!!P&&No(N,q,0)>-1}function kf(N,q,P){for(var de=-1,Me=N==null?0:N.length;++de<Me;)if(P(q,N[de]))return!0;return!1}function at(N,q){for(var P=-1,de=N==null?0:N.length,Me=Array(de);++P<de;)Me[P]=q(N[P],P,N);return Me}function fi(N,q){for(var P=-1,de=q.length,Me=N.length;++P<de;)N[Me+P]=q[P];return N}function Tf(N,q,P,de){var Me=-1,Ye=N==null?0:N.length;for(de&&Ye&&(P=N[++Me]);++Me<Ye;)P=q(P,N[Me],Me,N);return P}function d8(N,q,P,de){var Me=N==null?0:N.length;for(de&&Me&&(P=N[--Me]);Me--;)P=q(P,N[Me],Me,N);return P}function Mf(N,q){for(var P=-1,de=N==null?0:N.length;++P<de;)if(q(N[P],P,N))return!0;return!1}var g8=Ef("length");function m8(N){return N.split("")}function p8(N){return N.match(S7)||[]}function Bp(N,q,P){var de;return P(N,function(Me,Ye,$t){if(q(Me,Ye,$t))return de=Ye,!1}),de}function Ll(N,q,P,de){for(var Me=N.length,Ye=P+(de?1:-1);de?Ye--:++Ye<Me;)if(q(N[Ye],Ye,N))return Ye;return-1}function No(N,q,P){return q===q?T8(N,q,P):Ll(N,Np,P)}function v8(N,q,P,de){for(var Me=P-1,Ye=N.length;++Me<Ye;)if(de(N[Me],q))return Me;return-1}function Np(N){return N!==N}function jp(N,q){var P=N==null?0:N.length;return P?Df(N,q)/P:ce}function Ef(N){return function(q){return q==null?n:q[N]}}function Of(N){return function(q){return N==null?n:N[q]}}function Fp(N,q,P,de,Me){return Me(N,function(Ye,$t,Je){P=de?(de=!1,Ye):q(P,Ye,$t,Je)}),P}function b8(N,q){var P=N.length;for(N.sort(q);P--;)N[P]=N[P].value;return N}function Df(N,q){for(var P,de=-1,Me=N.length;++de<Me;){var Ye=q(N[de]);Ye!==n&&(P=P===n?Ye:P+Ye)}return P}function If(N,q){for(var P=-1,de=Array(N);++P<N;)de[P]=q(P);return de}function w8(N,q){return at(q,function(P){return[P,N[P]]})}function Vp(N){return N&&N.slice(0,zp(N)+1).replace(wf,"")}function vn(N){return function(q){return N(q)}}function _f(N,q){return at(q,function(P){return N[P]})}function na(N,q){return N.has(q)}function Hp(N,q){for(var P=-1,de=N.length;++P<de&&No(q,N[P],0)>-1;);return P}function Pp(N,q){for(var P=N.length;P--&&No(q,N[P],0)>-1;);return P}function x8(N,q){for(var P=N.length,de=0;P--;)N[P]===q&&++de;return de}var y8=Of(i8),C8=Of(o8);function $8(N){return"\\"+a8[N]}function S8(N,q){return N==null?n:N[q]}function jo(N){return e8.test(N)}function A8(N){return t8.test(N)}function R8(N){for(var q,P=[];!(q=N.next()).done;)P.push(q.value);return P}function Lf(N){var q=-1,P=Array(N.size);return N.forEach(function(de,Me){P[++q]=[Me,de]}),P}function Wp(N,q){return function(P){return N(q(P))}}function di(N,q){for(var P=-1,de=N.length,Me=0,Ye=[];++P<de;){var $t=N[P];($t===q||$t===f)&&(N[P]=f,Ye[Me++]=P)}return Ye}function Bl(N){var q=-1,P=Array(N.size);return N.forEach(function(de){P[++q]=de}),P}function k8(N){var q=-1,P=Array(N.size);return N.forEach(function(de){P[++q]=[de,de]}),P}function T8(N,q,P){for(var de=P-1,Me=N.length;++de<Me;)if(N[de]===q)return de;return-1}function M8(N,q,P){for(var de=P+1;de--;)if(N[de]===q)return de;return de}function Fo(N){return jo(N)?O8(N):g8(N)}function Wn(N){return jo(N)?D8(N):m8(N)}function zp(N){for(var q=N.length;q--&&x7.test(N.charAt(q)););return q}var E8=Of(s8);function O8(N){for(var q=Sf.lastIndex=0;Sf.test(N);)++q;return q}function D8(N){return N.match(Sf)||[]}function I8(N){return N.match(J7)||[]}var _8=function N(q){q=q==null?Nt:Vo.defaults(Nt.Object(),q,Vo.pick(Nt,n8));var P=q.Array,de=q.Date,Me=q.Error,Ye=q.Function,$t=q.Math,Je=q.Object,Bf=q.RegExp,L8=q.String,On=q.TypeError,Nl=P.prototype,B8=Ye.prototype,Ho=Je.prototype,jl=q["__core-js_shared__"],Fl=B8.toString,Qe=Ho.hasOwnProperty,N8=0,Up=function(){var l=/[^.]+$/.exec(jl&&jl.keys&&jl.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Vl=Ho.toString,j8=Fl.call(Je),F8=Nt._,V8=Bf("^"+Fl.call(Qe).replace(bf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Hl=Tp?q.Buffer:n,gi=q.Symbol,Pl=q.Uint8Array,qp=Hl?Hl.allocUnsafe:n,Wl=Wp(Je.getPrototypeOf,Je),Kp=Je.create,Gp=Ho.propertyIsEnumerable,zl=Nl.splice,Yp=gi?gi.isConcatSpreadable:n,ra=gi?gi.iterator:n,Ki=gi?gi.toStringTag:n,Ul=function(){try{var l=Qi(Je,"defineProperty");return l({},"",{}),l}catch{}}(),H8=q.clearTimeout!==Nt.clearTimeout&&q.clearTimeout,P8=de&&de.now!==Nt.Date.now&&de.now,W8=q.setTimeout!==Nt.setTimeout&&q.setTimeout,ql=$t.ceil,Kl=$t.floor,Nf=Je.getOwnPropertySymbols,z8=Hl?Hl.isBuffer:n,Xp=q.isFinite,U8=Nl.join,q8=Wp(Je.keys,Je),St=$t.max,Pt=$t.min,K8=de.now,G8=q.parseInt,Zp=$t.random,Y8=Nl.reverse,jf=Qi(q,"DataView"),ia=Qi(q,"Map"),Ff=Qi(q,"Promise"),Po=Qi(q,"Set"),oa=Qi(q,"WeakMap"),sa=Qi(Je,"create"),Gl=oa&&new oa,Wo={},X8=Ji(jf),Z8=Ji(ia),Q8=Ji(Ff),J8=Ji(Po),eS=Ji(oa),Yl=gi?gi.prototype:n,aa=Yl?Yl.valueOf:n,Qp=Yl?Yl.toString:n;function M(l){if(ht(l)&&!Oe(l)&&!(l instanceof We)){if(l instanceof Dn)return l;if(Qe.call(l,"__wrapped__"))return J2(l)}return new Dn(l)}var zo=function(){function l(){}return function(u){if(!ct(u))return{};if(Kp)return Kp(u);l.prototype=u;var m=new l;return l.prototype=n,m}}();function Xl(){}function Dn(l,u){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=n}M.templateSettings={escape:g7,evaluate:m7,interpolate:ap,variable:"",imports:{_:M}},M.prototype=Xl.prototype,M.prototype.constructor=M,Dn.prototype=zo(Xl.prototype),Dn.prototype.constructor=Dn;function We(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=me,this.__views__=[]}function tS(){var l=new We(this.__wrapped__);return l.__actions__=rn(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=rn(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=rn(this.__views__),l}function nS(){if(this.__filtered__){var l=new We(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function rS(){var l=this.__wrapped__.value(),u=this.__dir__,m=Oe(l),y=u<0,A=m?l.length:0,D=m9(0,A,this.__views__),_=D.start,B=D.end,j=B-_,X=y?B:_-1,Z=this.__iteratees__,ee=Z.length,ae=0,ve=Pt(j,this.__takeCount__);if(!m||!y&&A==j&&ve==j)return C2(l,this.__actions__);var $e=[];e:for(;j--&&ae<ve;){X+=u;for(var Be=-1,Se=l[X];++Be<ee;){var Fe=Z[Be],ze=Fe.iteratee,xn=Fe.type,Qt=ze(Se);if(xn==re)Se=Qt;else if(!Qt){if(xn==G)continue e;break e}}$e[ae++]=Se}return $e}We.prototype=zo(Xl.prototype),We.prototype.constructor=We;function Gi(l){var u=-1,m=l==null?0:l.length;for(this.clear();++u<m;){var y=l[u];this.set(y[0],y[1])}}function iS(){this.__data__=sa?sa(null):{},this.size=0}function oS(l){var u=this.has(l)&&delete this.__data__[l];return this.size-=u?1:0,u}function sS(l){var u=this.__data__;if(sa){var m=u[l];return m===c?n:m}return Qe.call(u,l)?u[l]:n}function aS(l){var u=this.__data__;return sa?u[l]!==n:Qe.call(u,l)}function lS(l,u){var m=this.__data__;return this.size+=this.has(l)?0:1,m[l]=sa&&u===n?c:u,this}Gi.prototype.clear=iS,Gi.prototype.delete=oS,Gi.prototype.get=sS,Gi.prototype.has=aS,Gi.prototype.set=lS;function Or(l){var u=-1,m=l==null?0:l.length;for(this.clear();++u<m;){var y=l[u];this.set(y[0],y[1])}}function cS(){this.__data__=[],this.size=0}function uS(l){var u=this.__data__,m=Zl(u,l);if(m<0)return!1;var y=u.length-1;return m==y?u.pop():zl.call(u,m,1),--this.size,!0}function hS(l){var u=this.__data__,m=Zl(u,l);return m<0?n:u[m][1]}function fS(l){return Zl(this.__data__,l)>-1}function dS(l,u){var m=this.__data__,y=Zl(m,l);return y<0?(++this.size,m.push([l,u])):m[y][1]=u,this}Or.prototype.clear=cS,Or.prototype.delete=uS,Or.prototype.get=hS,Or.prototype.has=fS,Or.prototype.set=dS;function Dr(l){var u=-1,m=l==null?0:l.length;for(this.clear();++u<m;){var y=l[u];this.set(y[0],y[1])}}function gS(){this.size=0,this.__data__={hash:new Gi,map:new(ia||Or),string:new Gi}}function mS(l){var u=cc(this,l).delete(l);return this.size-=u?1:0,u}function pS(l){return cc(this,l).get(l)}function vS(l){return cc(this,l).has(l)}function bS(l,u){var m=cc(this,l),y=m.size;return m.set(l,u),this.size+=m.size==y?0:1,this}Dr.prototype.clear=gS,Dr.prototype.delete=mS,Dr.prototype.get=pS,Dr.prototype.has=vS,Dr.prototype.set=bS;function Yi(l){var u=-1,m=l==null?0:l.length;for(this.__data__=new Dr;++u<m;)this.add(l[u])}function wS(l){return this.__data__.set(l,c),this}function xS(l){return this.__data__.has(l)}Yi.prototype.add=Yi.prototype.push=wS,Yi.prototype.has=xS;function zn(l){var u=this.__data__=new Or(l);this.size=u.size}function yS(){this.__data__=new Or,this.size=0}function CS(l){var u=this.__data__,m=u.delete(l);return this.size=u.size,m}function $S(l){return this.__data__.get(l)}function SS(l){return this.__data__.has(l)}function AS(l,u){var m=this.__data__;if(m instanceof Or){var y=m.__data__;if(!ia||y.length<i-1)return y.push([l,u]),this.size=++m.size,this;m=this.__data__=new Dr(y)}return m.set(l,u),this.size=m.size,this}zn.prototype.clear=yS,zn.prototype.delete=CS,zn.prototype.get=$S,zn.prototype.has=SS,zn.prototype.set=AS;function Jp(l,u){var m=Oe(l),y=!m&&eo(l),A=!m&&!y&&wi(l),D=!m&&!y&&!A&&Go(l),_=m||y||A||D,B=_?If(l.length,L8):[],j=B.length;for(var X in l)(u||Qe.call(l,X))&&!(_&&(X=="length"||A&&(X=="offset"||X=="parent")||D&&(X=="buffer"||X=="byteLength"||X=="byteOffset")||Br(X,j)))&&B.push(X);return B}function e2(l){var u=l.length;return u?l[Xf(0,u-1)]:n}function RS(l,u){return uc(rn(l),Xi(u,0,l.length))}function kS(l){return uc(rn(l))}function Vf(l,u,m){(m!==n&&!Un(l[u],m)||m===n&&!(u in l))&&Ir(l,u,m)}function la(l,u,m){var y=l[u];(!(Qe.call(l,u)&&Un(y,m))||m===n&&!(u in l))&&Ir(l,u,m)}function Zl(l,u){for(var m=l.length;m--;)if(Un(l[m][0],u))return m;return-1}function TS(l,u,m,y){return mi(l,function(A,D,_){u(y,A,m(A),_)}),y}function t2(l,u){return l&&ar(u,Et(u),l)}function MS(l,u){return l&&ar(u,sn(u),l)}function Ir(l,u,m){u=="__proto__"&&Ul?Ul(l,u,{configurable:!0,enumerable:!0,value:m,writable:!0}):l[u]=m}function Hf(l,u){for(var m=-1,y=u.length,A=P(y),D=l==null;++m<y;)A[m]=D?n:yd(l,u[m]);return A}function Xi(l,u,m){return l===l&&(m!==n&&(l=l<=m?l:m),u!==n&&(l=l>=u?l:u)),l}function In(l,u,m,y,A,D){var _,B=u&d,j=u&g,X=u&v;if(m&&(_=A?m(l,y,A,D):m(l)),_!==n)return _;if(!ct(l))return l;var Z=Oe(l);if(Z){if(_=v9(l),!B)return rn(l,_)}else{var ee=Wt(l),ae=ee==He||ee==wt;if(wi(l))return A2(l,B);if(ee==ft||ee==Te||ae&&!A){if(_=j||ae?{}:z2(l),!B)return j?s9(l,MS(_,l)):o9(l,t2(_,l))}else{if(!rt[ee])return A?l:{};_=b9(l,ee,B)}}D||(D=new zn);var ve=D.get(l);if(ve)return ve;D.set(l,_),wv(l)?l.forEach(function(Se){_.add(In(Se,u,m,Se,l,D))}):vv(l)&&l.forEach(function(Se,Fe){_.set(Fe,In(Se,u,m,Fe,l,D))});var $e=X?j?ad:sd:j?sn:Et,Be=Z?n:$e(l);return En(Be||l,function(Se,Fe){Be&&(Fe=Se,Se=l[Fe]),la(_,Fe,In(Se,u,m,Fe,l,D))}),_}function ES(l){var u=Et(l);return function(m){return n2(m,l,u)}}function n2(l,u,m){var y=m.length;if(l==null)return!y;for(l=Je(l);y--;){var A=m[y],D=u[A],_=l[A];if(_===n&&!(A in l)||!D(_))return!1}return!0}function r2(l,u,m){if(typeof l!="function")throw new On(s);return ma(function(){l.apply(n,m)},u)}function ca(l,u,m,y){var A=-1,D=_l,_=!0,B=l.length,j=[],X=u.length;if(!B)return j;m&&(u=at(u,vn(m))),y?(D=kf,_=!1):u.length>=i&&(D=na,_=!1,u=new Yi(u));e:for(;++A<B;){var Z=l[A],ee=m==null?Z:m(Z);if(Z=y||Z!==0?Z:0,_&&ee===ee){for(var ae=X;ae--;)if(u[ae]===ee)continue e;j.push(Z)}else D(u,ee,y)||j.push(Z)}return j}var mi=E2(sr),i2=E2(Wf,!0);function OS(l,u){var m=!0;return mi(l,function(y,A,D){return m=!!u(y,A,D),m}),m}function Ql(l,u,m){for(var y=-1,A=l.length;++y<A;){var D=l[y],_=u(D);if(_!=null&&(B===n?_===_&&!wn(_):m(_,B)))var B=_,j=D}return j}function DS(l,u,m,y){var A=l.length;for(m=_e(m),m<0&&(m=-m>A?0:A+m),y=y===n||y>A?A:_e(y),y<0&&(y+=A),y=m>y?0:yv(y);m<y;)l[m++]=u;return l}function o2(l,u){var m=[];return mi(l,function(y,A,D){u(y,A,D)&&m.push(y)}),m}function jt(l,u,m,y,A){var D=-1,_=l.length;for(m||(m=x9),A||(A=[]);++D<_;){var B=l[D];u>0&&m(B)?u>1?jt(B,u-1,m,y,A):fi(A,B):y||(A[A.length]=B)}return A}var Pf=O2(),s2=O2(!0);function sr(l,u){return l&&Pf(l,u,Et)}function Wf(l,u){return l&&s2(l,u,Et)}function Jl(l,u){return hi(u,function(m){return Nr(l[m])})}function Zi(l,u){u=vi(u,l);for(var m=0,y=u.length;l!=null&&m<y;)l=l[lr(u[m++])];return m&&m==y?l:n}function a2(l,u,m){var y=u(l);return Oe(l)?y:fi(y,m(l))}function Xt(l){return l==null?l===n?Lo:Yt:Ki&&Ki in Je(l)?g9(l):k9(l)}function zf(l,u){return l>u}function IS(l,u){return l!=null&&Qe.call(l,u)}function _S(l,u){return l!=null&&u in Je(l)}function LS(l,u,m){return l>=Pt(u,m)&&l<St(u,m)}function Uf(l,u,m){for(var y=m?kf:_l,A=l[0].length,D=l.length,_=D,B=P(D),j=1/0,X=[];_--;){var Z=l[_];_&&u&&(Z=at(Z,vn(u))),j=Pt(Z.length,j),B[_]=!m&&(u||A>=120&&Z.length>=120)?new Yi(_&&Z):n}Z=l[0];var ee=-1,ae=B[0];e:for(;++ee<A&&X.length<j;){var ve=Z[ee],$e=u?u(ve):ve;if(ve=m||ve!==0?ve:0,!(ae?na(ae,$e):y(X,$e,m))){for(_=D;--_;){var Be=B[_];if(!(Be?na(Be,$e):y(l[_],$e,m)))continue e}ae&&ae.push($e),X.push(ve)}}return X}function BS(l,u,m,y){return sr(l,function(A,D,_){u(y,m(A),D,_)}),y}function ua(l,u,m){u=vi(u,l),l=G2(l,u);var y=l==null?l:l[lr(Ln(u))];return y==null?n:pn(y,l,m)}function l2(l){return ht(l)&&Xt(l)==Te}function NS(l){return ht(l)&&Xt(l)==zi}function jS(l){return ht(l)&&Xt(l)==Re}function ha(l,u,m,y,A){return l===u?!0:l==null||u==null||!ht(l)&&!ht(u)?l!==l&&u!==u:FS(l,u,m,y,ha,A)}function FS(l,u,m,y,A,D){var _=Oe(l),B=Oe(u),j=_?Ve:Wt(l),X=B?Ve:Wt(u);j=j==Te?ft:j,X=X==Te?ft:X;var Z=j==ft,ee=X==ft,ae=j==X;if(ae&&wi(l)){if(!wi(u))return!1;_=!0,Z=!1}if(ae&&!Z)return D||(D=new zn),_||Go(l)?H2(l,u,m,y,A,D):f9(l,u,j,m,y,A,D);if(!(m&x)){var ve=Z&&Qe.call(l,"__wrapped__"),$e=ee&&Qe.call(u,"__wrapped__");if(ve||$e){var Be=ve?l.value():l,Se=$e?u.value():u;return D||(D=new zn),A(Be,Se,m,y,D)}}return ae?(D||(D=new zn),d9(l,u,m,y,A,D)):!1}function VS(l){return ht(l)&&Wt(l)==Ze}function qf(l,u,m,y){var A=m.length,D=A,_=!y;if(l==null)return!D;for(l=Je(l);A--;){var B=m[A];if(_&&B[2]?B[1]!==l[B[0]]:!(B[0]in l))return!1}for(;++A<D;){B=m[A];var j=B[0],X=l[j],Z=B[1];if(_&&B[2]){if(X===n&&!(j in l))return!1}else{var ee=new zn;if(y)var ae=y(X,Z,j,l,u,ee);if(!(ae===n?ha(Z,X,x|w,y,ee):ae))return!1}}return!0}function c2(l){if(!ct(l)||C9(l))return!1;var u=Nr(l)?V8:E7;return u.test(Ji(l))}function HS(l){return ht(l)&&Xt(l)==or}function PS(l){return ht(l)&&Wt(l)==Mt}function WS(l){return ht(l)&&pc(l.length)&&!!it[Xt(l)]}function u2(l){return typeof l=="function"?l:l==null?an:typeof l=="object"?Oe(l)?d2(l[0],l[1]):f2(l):Dv(l)}function Kf(l){if(!ga(l))return q8(l);var u=[];for(var m in Je(l))Qe.call(l,m)&&m!="constructor"&&u.push(m);return u}function zS(l){if(!ct(l))return R9(l);var u=ga(l),m=[];for(var y in l)y=="constructor"&&(u||!Qe.call(l,y))||m.push(y);return m}function Gf(l,u){return l<u}function h2(l,u){var m=-1,y=on(l)?P(l.length):[];return mi(l,function(A,D,_){y[++m]=u(A,D,_)}),y}function f2(l){var u=cd(l);return u.length==1&&u[0][2]?q2(u[0][0],u[0][1]):function(m){return m===l||qf(m,l,u)}}function d2(l,u){return hd(l)&&U2(u)?q2(lr(l),u):function(m){var y=yd(m,l);return y===n&&y===u?Cd(m,l):ha(u,y,x|w)}}function ec(l,u,m,y,A){l!==u&&Pf(u,function(D,_){if(A||(A=new zn),ct(D))US(l,u,_,m,ec,y,A);else{var B=y?y(dd(l,_),D,_+"",l,u,A):n;B===n&&(B=D),Vf(l,_,B)}},sn)}function US(l,u,m,y,A,D,_){var B=dd(l,m),j=dd(u,m),X=_.get(j);if(X){Vf(l,m,X);return}var Z=D?D(B,j,m+"",l,u,_):n,ee=Z===n;if(ee){var ae=Oe(j),ve=!ae&&wi(j),$e=!ae&&!ve&&Go(j);Z=j,ae||ve||$e?Oe(B)?Z=B:dt(B)?Z=rn(B):ve?(ee=!1,Z=A2(j,!0)):$e?(ee=!1,Z=R2(j,!0)):Z=[]:pa(j)||eo(j)?(Z=B,eo(B)?Z=Cv(B):(!ct(B)||Nr(B))&&(Z=z2(j))):ee=!1}ee&&(_.set(j,Z),A(Z,j,y,D,_),_.delete(j)),Vf(l,m,Z)}function g2(l,u){var m=l.length;if(m)return u+=u<0?m:0,Br(u,m)?l[u]:n}function m2(l,u,m){u.length?u=at(u,function(D){return Oe(D)?function(_){return Zi(_,D.length===1?D[0]:D)}:D}):u=[an];var y=-1;u=at(u,vn(Ce()));var A=h2(l,function(D,_,B){var j=at(u,function(X){return X(D)});return{criteria:j,index:++y,value:D}});return b8(A,function(D,_){return i9(D,_,m)})}function qS(l,u){return p2(l,u,function(m,y){return Cd(l,y)})}function p2(l,u,m){for(var y=-1,A=u.length,D={};++y<A;){var _=u[y],B=Zi(l,_);m(B,_)&&fa(D,vi(_,l),B)}return D}function KS(l){return function(u){return Zi(u,l)}}function Yf(l,u,m,y){var A=y?v8:No,D=-1,_=u.length,B=l;for(l===u&&(u=rn(u)),m&&(B=at(l,vn(m)));++D<_;)for(var j=0,X=u[D],Z=m?m(X):X;(j=A(B,Z,j,y))>-1;)B!==l&&zl.call(B,j,1),zl.call(l,j,1);return l}function v2(l,u){for(var m=l?u.length:0,y=m-1;m--;){var A=u[m];if(m==y||A!==D){var D=A;Br(A)?zl.call(l,A,1):Jf(l,A)}}return l}function Xf(l,u){return l+Kl(Zp()*(u-l+1))}function GS(l,u,m,y){for(var A=-1,D=St(ql((u-l)/(m||1)),0),_=P(D);D--;)_[y?D:++A]=l,l+=m;return _}function Zf(l,u){var m="";if(!l||u<1||u>ne)return m;do u%2&&(m+=l),u=Kl(u/2),u&&(l+=l);while(u);return m}function Ne(l,u){return gd(K2(l,u,an),l+"")}function YS(l){return e2(Yo(l))}function XS(l,u){var m=Yo(l);return uc(m,Xi(u,0,m.length))}function fa(l,u,m,y){if(!ct(l))return l;u=vi(u,l);for(var A=-1,D=u.length,_=D-1,B=l;B!=null&&++A<D;){var j=lr(u[A]),X=m;if(j==="__proto__"||j==="constructor"||j==="prototype")return l;if(A!=_){var Z=B[j];X=y?y(Z,j,B):n,X===n&&(X=ct(Z)?Z:Br(u[A+1])?[]:{})}la(B,j,X),B=B[j]}return l}var b2=Gl?function(l,u){return Gl.set(l,u),l}:an,ZS=Ul?function(l,u){return Ul(l,"toString",{configurable:!0,enumerable:!1,value:Sd(u),writable:!0})}:an;function QS(l){return uc(Yo(l))}function _n(l,u,m){var y=-1,A=l.length;u<0&&(u=-u>A?0:A+u),m=m>A?A:m,m<0&&(m+=A),A=u>m?0:m-u>>>0,u>>>=0;for(var D=P(A);++y<A;)D[y]=l[y+u];return D}function JS(l,u){var m;return mi(l,function(y,A,D){return m=u(y,A,D),!m}),!!m}function tc(l,u,m){var y=0,A=l==null?y:l.length;if(typeof u=="number"&&u===u&&A<=we){for(;y<A;){var D=y+A>>>1,_=l[D];_!==null&&!wn(_)&&(m?_<=u:_<u)?y=D+1:A=D}return A}return Qf(l,u,an,m)}function Qf(l,u,m,y){var A=0,D=l==null?0:l.length;if(D===0)return 0;u=m(u);for(var _=u!==u,B=u===null,j=wn(u),X=u===n;A<D;){var Z=Kl((A+D)/2),ee=m(l[Z]),ae=ee!==n,ve=ee===null,$e=ee===ee,Be=wn(ee);if(_)var Se=y||$e;else X?Se=$e&&(y||ae):B?Se=$e&&ae&&(y||!ve):j?Se=$e&&ae&&!ve&&(y||!Be):ve||Be?Se=!1:Se=y?ee<=u:ee<u;Se?A=Z+1:D=Z}return Pt(D,Ie)}function w2(l,u){for(var m=-1,y=l.length,A=0,D=[];++m<y;){var _=l[m],B=u?u(_):_;if(!m||!Un(B,j)){var j=B;D[A++]=_===0?0:_}}return D}function x2(l){return typeof l=="number"?l:wn(l)?ce:+l}function bn(l){if(typeof l=="string")return l;if(Oe(l))return at(l,bn)+"";if(wn(l))return Qp?Qp.call(l):"";var u=l+"";return u=="0"&&1/l==-te?"-0":u}function pi(l,u,m){var y=-1,A=_l,D=l.length,_=!0,B=[],j=B;if(m)_=!1,A=kf;else if(D>=i){var X=u?null:u9(l);if(X)return Bl(X);_=!1,A=na,j=new Yi}else j=u?[]:B;e:for(;++y<D;){var Z=l[y],ee=u?u(Z):Z;if(Z=m||Z!==0?Z:0,_&&ee===ee){for(var ae=j.length;ae--;)if(j[ae]===ee)continue e;u&&j.push(ee),B.push(Z)}else A(j,ee,m)||(j!==B&&j.push(ee),B.push(Z))}return B}function Jf(l,u){return u=vi(u,l),l=G2(l,u),l==null||delete l[lr(Ln(u))]}function y2(l,u,m,y){return fa(l,u,m(Zi(l,u)),y)}function nc(l,u,m,y){for(var A=l.length,D=y?A:-1;(y?D--:++D<A)&&u(l[D],D,l););return m?_n(l,y?0:D,y?D+1:A):_n(l,y?D+1:0,y?A:D)}function C2(l,u){var m=l;return m instanceof We&&(m=m.value()),Tf(u,function(y,A){return A.func.apply(A.thisArg,fi([y],A.args))},m)}function ed(l,u,m){var y=l.length;if(y<2)return y?pi(l[0]):[];for(var A=-1,D=P(y);++A<y;)for(var _=l[A],B=-1;++B<y;)B!=A&&(D[A]=ca(D[A]||_,l[B],u,m));return pi(jt(D,1),u,m)}function $2(l,u,m){for(var y=-1,A=l.length,D=u.length,_={};++y<A;){var B=y<D?u[y]:n;m(_,l[y],B)}return _}function td(l){return dt(l)?l:[]}function nd(l){return typeof l=="function"?l:an}function vi(l,u){return Oe(l)?l:hd(l,u)?[l]:Q2(Xe(l))}var e9=Ne;function bi(l,u,m){var y=l.length;return m=m===n?y:m,!u&&m>=y?l:_n(l,u,m)}var S2=H8||function(l){return Nt.clearTimeout(l)};function A2(l,u){if(u)return l.slice();var m=l.length,y=qp?qp(m):new l.constructor(m);return l.copy(y),y}function rd(l){var u=new l.constructor(l.byteLength);return new Pl(u).set(new Pl(l)),u}function t9(l,u){var m=u?rd(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.byteLength)}function n9(l){var u=new l.constructor(l.source,lp.exec(l));return u.lastIndex=l.lastIndex,u}function r9(l){return aa?Je(aa.call(l)):{}}function R2(l,u){var m=u?rd(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.length)}function k2(l,u){if(l!==u){var m=l!==n,y=l===null,A=l===l,D=wn(l),_=u!==n,B=u===null,j=u===u,X=wn(u);if(!B&&!X&&!D&&l>u||D&&_&&j&&!B&&!X||y&&_&&j||!m&&j||!A)return 1;if(!y&&!D&&!X&&l<u||X&&m&&A&&!y&&!D||B&&m&&A||!_&&A||!j)return-1}return 0}function i9(l,u,m){for(var y=-1,A=l.criteria,D=u.criteria,_=A.length,B=m.length;++y<_;){var j=k2(A[y],D[y]);if(j){if(y>=B)return j;var X=m[y];return j*(X=="desc"?-1:1)}}return l.index-u.index}function T2(l,u,m,y){for(var A=-1,D=l.length,_=m.length,B=-1,j=u.length,X=St(D-_,0),Z=P(j+X),ee=!y;++B<j;)Z[B]=u[B];for(;++A<_;)(ee||A<D)&&(Z[m[A]]=l[A]);for(;X--;)Z[B++]=l[A++];return Z}function M2(l,u,m,y){for(var A=-1,D=l.length,_=-1,B=m.length,j=-1,X=u.length,Z=St(D-B,0),ee=P(Z+X),ae=!y;++A<Z;)ee[A]=l[A];for(var ve=A;++j<X;)ee[ve+j]=u[j];for(;++_<B;)(ae||A<D)&&(ee[ve+m[_]]=l[A++]);return ee}function rn(l,u){var m=-1,y=l.length;for(u||(u=P(y));++m<y;)u[m]=l[m];return u}function ar(l,u,m,y){var A=!m;m||(m={});for(var D=-1,_=u.length;++D<_;){var B=u[D],j=y?y(m[B],l[B],B,m,l):n;j===n&&(j=l[B]),A?Ir(m,B,j):la(m,B,j)}return m}function o9(l,u){return ar(l,ud(l),u)}function s9(l,u){return ar(l,P2(l),u)}function rc(l,u){return function(m,y){var A=Oe(m)?h8:TS,D=u?u():{};return A(m,l,Ce(y,2),D)}}function Uo(l){return Ne(function(u,m){var y=-1,A=m.length,D=A>1?m[A-1]:n,_=A>2?m[2]:n;for(D=l.length>3&&typeof D=="function"?(A--,D):n,_&&Zt(m[0],m[1],_)&&(D=A<3?n:D,A=1),u=Je(u);++y<A;){var B=m[y];B&&l(u,B,y,D)}return u})}function E2(l,u){return function(m,y){if(m==null)return m;if(!on(m))return l(m,y);for(var A=m.length,D=u?A:-1,_=Je(m);(u?D--:++D<A)&&y(_[D],D,_)!==!1;);return m}}function O2(l){return function(u,m,y){for(var A=-1,D=Je(u),_=y(u),B=_.length;B--;){var j=_[l?B:++A];if(m(D[j],j,D)===!1)break}return u}}function a9(l,u,m){var y=u&C,A=da(l);function D(){var _=this&&this!==Nt&&this instanceof D?A:l;return _.apply(y?m:this,arguments)}return D}function D2(l){return function(u){u=Xe(u);var m=jo(u)?Wn(u):n,y=m?m[0]:u.charAt(0),A=m?bi(m,1).join(""):u.slice(1);return y[l]()+A}}function qo(l){return function(u){return Tf(Ev(Mv(u).replace(Z7,"")),l,"")}}function da(l){return function(){var u=arguments;switch(u.length){case 0:return new l;case 1:return new l(u[0]);case 2:return new l(u[0],u[1]);case 3:return new l(u[0],u[1],u[2]);case 4:return new l(u[0],u[1],u[2],u[3]);case 5:return new l(u[0],u[1],u[2],u[3],u[4]);case 6:return new l(u[0],u[1],u[2],u[3],u[4],u[5]);case 7:return new l(u[0],u[1],u[2],u[3],u[4],u[5],u[6])}var m=zo(l.prototype),y=l.apply(m,u);return ct(y)?y:m}}function l9(l,u,m){var y=da(l);function A(){for(var D=arguments.length,_=P(D),B=D,j=Ko(A);B--;)_[B]=arguments[B];var X=D<3&&_[0]!==j&&_[D-1]!==j?[]:di(_,j);if(D-=X.length,D<m)return N2(l,u,ic,A.placeholder,n,_,X,n,n,m-D);var Z=this&&this!==Nt&&this instanceof A?y:l;return pn(Z,this,_)}return A}function I2(l){return function(u,m,y){var A=Je(u);if(!on(u)){var D=Ce(m,3);u=Et(u),m=function(B){return D(A[B],B,A)}}var _=l(u,m,y);return _>-1?A[D?u[_]:_]:n}}function _2(l){return Lr(function(u){var m=u.length,y=m,A=Dn.prototype.thru;for(l&&u.reverse();y--;){var D=u[y];if(typeof D!="function")throw new On(s);if(A&&!_&&lc(D)=="wrapper")var _=new Dn([],!0)}for(y=_?y:m;++y<m;){D=u[y];var B=lc(D),j=B=="wrapper"?ld(D):n;j&&fd(j[0])&&j[1]==(I|T|O|V)&&!j[4].length&&j[9]==1?_=_[lc(j[0])].apply(_,j[3]):_=D.length==1&&fd(D)?_[B]():_.thru(D)}return function(){var X=arguments,Z=X[0];if(_&&X.length==1&&Oe(Z))return _.plant(Z).value();for(var ee=0,ae=m?u[ee].apply(this,X):Z;++ee<m;)ae=u[ee].call(this,ae);return ae}})}function ic(l,u,m,y,A,D,_,B,j,X){var Z=u&I,ee=u&C,ae=u&S,ve=u&(T|E),$e=u&F,Be=ae?n:da(l);function Se(){for(var Fe=arguments.length,ze=P(Fe),xn=Fe;xn--;)ze[xn]=arguments[xn];if(ve)var Qt=Ko(Se),yn=x8(ze,Qt);if(y&&(ze=T2(ze,y,A,ve)),D&&(ze=M2(ze,D,_,ve)),Fe-=yn,ve&&Fe<X){var gt=di(ze,Qt);return N2(l,u,ic,Se.placeholder,m,ze,gt,B,j,X-Fe)}var qn=ee?m:this,Fr=ae?qn[l]:l;return Fe=ze.length,B?ze=T9(ze,B):$e&&Fe>1&&ze.reverse(),Z&&j<Fe&&(ze.length=j),this&&this!==Nt&&this instanceof Se&&(Fr=Be||da(Fr)),Fr.apply(qn,ze)}return Se}function L2(l,u){return function(m,y){return BS(m,l,u(y),{})}}function oc(l,u){return function(m,y){var A;if(m===n&&y===n)return u;if(m!==n&&(A=m),y!==n){if(A===n)return y;typeof m=="string"||typeof y=="string"?(m=bn(m),y=bn(y)):(m=x2(m),y=x2(y)),A=l(m,y)}return A}}function id(l){return Lr(function(u){return u=at(u,vn(Ce())),Ne(function(m){var y=this;return l(u,function(A){return pn(A,y,m)})})})}function sc(l,u){u=u===n?" ":bn(u);var m=u.length;if(m<2)return m?Zf(u,l):u;var y=Zf(u,ql(l/Fo(u)));return jo(u)?bi(Wn(y),0,l).join(""):y.slice(0,l)}function c9(l,u,m,y){var A=u&C,D=da(l);function _(){for(var B=-1,j=arguments.length,X=-1,Z=y.length,ee=P(Z+j),ae=this&&this!==Nt&&this instanceof _?D:l;++X<Z;)ee[X]=y[X];for(;j--;)ee[X++]=arguments[++B];return pn(ae,A?m:this,ee)}return _}function B2(l){return function(u,m,y){return y&&typeof y!="number"&&Zt(u,m,y)&&(m=y=n),u=jr(u),m===n?(m=u,u=0):m=jr(m),y=y===n?u<m?1:-1:jr(y),GS(u,m,y,l)}}function ac(l){return function(u,m){return typeof u=="string"&&typeof m=="string"||(u=Bn(u),m=Bn(m)),l(u,m)}}function N2(l,u,m,y,A,D,_,B,j,X){var Z=u&T,ee=Z?_:n,ae=Z?n:_,ve=Z?D:n,$e=Z?n:D;u|=Z?O:L,u&=~(Z?L:O),u&R||(u&=-4);var Be=[l,u,A,ve,ee,$e,ae,B,j,X],Se=m.apply(n,Be);return fd(l)&&Y2(Se,Be),Se.placeholder=y,X2(Se,l,u)}function od(l){var u=$t[l];return function(m,y){if(m=Bn(m),y=y==null?0:Pt(_e(y),292),y&&Xp(m)){var A=(Xe(m)+"e").split("e"),D=u(A[0]+"e"+(+A[1]+y));return A=(Xe(D)+"e").split("e"),+(A[0]+"e"+(+A[1]-y))}return u(m)}}var u9=Po&&1/Bl(new Po([,-0]))[1]==te?function(l){return new Po(l)}:kd;function j2(l){return function(u){var m=Wt(u);return m==Ze?Lf(u):m==Mt?k8(u):w8(u,l(u))}}function _r(l,u,m,y,A,D,_,B){var j=u&S;if(!j&&typeof l!="function")throw new On(s);var X=y?y.length:0;if(X||(u&=-97,y=A=n),_=_===n?_:St(_e(_),0),B=B===n?B:_e(B),X-=A?A.length:0,u&L){var Z=y,ee=A;y=A=n}var ae=j?n:ld(l),ve=[l,u,m,y,A,Z,ee,D,_,B];if(ae&&A9(ve,ae),l=ve[0],u=ve[1],m=ve[2],y=ve[3],A=ve[4],B=ve[9]=ve[9]===n?j?0:l.length:St(ve[9]-X,0),!B&&u&(T|E)&&(u&=-25),!u||u==C)var $e=a9(l,u,m);else u==T||u==E?$e=l9(l,u,B):(u==O||u==(C|O))&&!A.length?$e=c9(l,u,m,y):$e=ic.apply(n,ve);var Be=ae?b2:Y2;return X2(Be($e,ve),l,u)}function F2(l,u,m,y){return l===n||Un(l,Ho[m])&&!Qe.call(y,m)?u:l}function V2(l,u,m,y,A,D){return ct(l)&&ct(u)&&(D.set(u,l),ec(l,u,n,V2,D),D.delete(u)),l}function h9(l){return pa(l)?n:l}function H2(l,u,m,y,A,D){var _=m&x,B=l.length,j=u.length;if(B!=j&&!(_&&j>B))return!1;var X=D.get(l),Z=D.get(u);if(X&&Z)return X==u&&Z==l;var ee=-1,ae=!0,ve=m&w?new Yi:n;for(D.set(l,u),D.set(u,l);++ee<B;){var $e=l[ee],Be=u[ee];if(y)var Se=_?y(Be,$e,ee,u,l,D):y($e,Be,ee,l,u,D);if(Se!==n){if(Se)continue;ae=!1;break}if(ve){if(!Mf(u,function(Fe,ze){if(!na(ve,ze)&&($e===Fe||A($e,Fe,m,y,D)))return ve.push(ze)})){ae=!1;break}}else if(!($e===Be||A($e,Be,m,y,D))){ae=!1;break}}return D.delete(l),D.delete(u),ae}function f9(l,u,m,y,A,D,_){switch(m){case ui:if(l.byteLength!=u.byteLength||l.byteOffset!=u.byteOffset)return!1;l=l.buffer,u=u.buffer;case zi:return!(l.byteLength!=u.byteLength||!D(new Pl(l),new Pl(u)));case De:case Re:case Pe:return Un(+l,+u);case Ae:return l.name==u.name&&l.message==u.message;case or:case li:return l==u+"";case Ze:var B=Lf;case Mt:var j=y&x;if(B||(B=Bl),l.size!=u.size&&!j)return!1;var X=_.get(l);if(X)return X==u;y|=w,_.set(l,u);var Z=H2(B(l),B(u),y,A,D,_);return _.delete(l),Z;case ci:if(aa)return aa.call(l)==aa.call(u)}return!1}function d9(l,u,m,y,A,D){var _=m&x,B=sd(l),j=B.length,X=sd(u),Z=X.length;if(j!=Z&&!_)return!1;for(var ee=j;ee--;){var ae=B[ee];if(!(_?ae in u:Qe.call(u,ae)))return!1}var ve=D.get(l),$e=D.get(u);if(ve&&$e)return ve==u&&$e==l;var Be=!0;D.set(l,u),D.set(u,l);for(var Se=_;++ee<j;){ae=B[ee];var Fe=l[ae],ze=u[ae];if(y)var xn=_?y(ze,Fe,ae,u,l,D):y(Fe,ze,ae,l,u,D);if(!(xn===n?Fe===ze||A(Fe,ze,m,y,D):xn)){Be=!1;break}Se||(Se=ae=="constructor")}if(Be&&!Se){var Qt=l.constructor,yn=u.constructor;Qt!=yn&&"constructor"in l&&"constructor"in u&&!(typeof Qt=="function"&&Qt instanceof Qt&&typeof yn=="function"&&yn instanceof yn)&&(Be=!1)}return D.delete(l),D.delete(u),Be}function Lr(l){return gd(K2(l,n,nv),l+"")}function sd(l){return a2(l,Et,ud)}function ad(l){return a2(l,sn,P2)}var ld=Gl?function(l){return Gl.get(l)}:kd;function lc(l){for(var u=l.name+"",m=Wo[u],y=Qe.call(Wo,u)?m.length:0;y--;){var A=m[y],D=A.func;if(D==null||D==l)return A.name}return u}function Ko(l){var u=Qe.call(M,"placeholder")?M:l;return u.placeholder}function Ce(){var l=M.iteratee||Ad;return l=l===Ad?u2:l,arguments.length?l(arguments[0],arguments[1]):l}function cc(l,u){var m=l.__data__;return y9(u)?m[typeof u=="string"?"string":"hash"]:m.map}function cd(l){for(var u=Et(l),m=u.length;m--;){var y=u[m],A=l[y];u[m]=[y,A,U2(A)]}return u}function Qi(l,u){var m=S8(l,u);return c2(m)?m:n}function g9(l){var u=Qe.call(l,Ki),m=l[Ki];try{l[Ki]=n;var y=!0}catch{}var A=Vl.call(l);return y&&(u?l[Ki]=m:delete l[Ki]),A}var ud=Nf?function(l){return l==null?[]:(l=Je(l),hi(Nf(l),function(u){return Gp.call(l,u)}))}:Td,P2=Nf?function(l){for(var u=[];l;)fi(u,ud(l)),l=Wl(l);return u}:Td,Wt=Xt;(jf&&Wt(new jf(new ArrayBuffer(1)))!=ui||ia&&Wt(new ia)!=Ze||Ff&&Wt(Ff.resolve())!=_o||Po&&Wt(new Po)!=Mt||oa&&Wt(new oa)!=Wi)&&(Wt=function(l){var u=Xt(l),m=u==ft?l.constructor:n,y=m?Ji(m):"";if(y)switch(y){case X8:return ui;case Z8:return Ze;case Q8:return _o;case J8:return Mt;case eS:return Wi}return u});function m9(l,u,m){for(var y=-1,A=m.length;++y<A;){var D=m[y],_=D.size;switch(D.type){case"drop":l+=_;break;case"dropRight":u-=_;break;case"take":u=Pt(u,l+_);break;case"takeRight":l=St(l,u-_);break}}return{start:l,end:u}}function p9(l){var u=l.match(C7);return u?u[1].split($7):[]}function W2(l,u,m){u=vi(u,l);for(var y=-1,A=u.length,D=!1;++y<A;){var _=lr(u[y]);if(!(D=l!=null&&m(l,_)))break;l=l[_]}return D||++y!=A?D:(A=l==null?0:l.length,!!A&&pc(A)&&Br(_,A)&&(Oe(l)||eo(l)))}function v9(l){var u=l.length,m=new l.constructor(u);return u&&typeof l[0]=="string"&&Qe.call(l,"index")&&(m.index=l.index,m.input=l.input),m}function z2(l){return typeof l.constructor=="function"&&!ga(l)?zo(Wl(l)):{}}function b9(l,u,m){var y=l.constructor;switch(u){case zi:return rd(l);case De:case Re:return new y(+l);case ui:return t9(l,m);case Ui:case Bt:case hf:case ff:case df:case gf:case mf:case pf:case vf:return R2(l,m);case Ze:return new y;case Pe:case li:return new y(l);case or:return n9(l);case Mt:return new y;case ci:return r9(l)}}function w9(l,u){var m=u.length;if(!m)return l;var y=m-1;return u[y]=(m>1?"& ":"")+u[y],u=u.join(m>2?", ":" "),l.replace(y7,`{
/* [wrapped with `+u+`] */
`)}function x9(l){return Oe(l)||eo(l)||!!(Yp&&l&&l[Yp])}function Br(l,u){var m=typeof l;return u=u??ne,!!u&&(m=="number"||m!="symbol"&&D7.test(l))&&l>-1&&l%1==0&&l<u}function Zt(l,u,m){if(!ct(m))return!1;var y=typeof u;return(y=="number"?on(m)&&Br(u,m.length):y=="string"&&u in m)?Un(m[u],l):!1}function hd(l,u){if(Oe(l))return!1;var m=typeof l;return m=="number"||m=="symbol"||m=="boolean"||l==null||wn(l)?!0:v7.test(l)||!p7.test(l)||u!=null&&l in Je(u)}function y9(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function fd(l){var u=lc(l),m=M[u];if(typeof m!="function"||!(u in We.prototype))return!1;if(l===m)return!0;var y=ld(m);return!!y&&l===y[0]}function C9(l){return!!Up&&Up in l}var $9=jl?Nr:Md;function ga(l){var u=l&&l.constructor,m=typeof u=="function"&&u.prototype||Ho;return l===m}function U2(l){return l===l&&!ct(l)}function q2(l,u){return function(m){return m==null?!1:m[l]===u&&(u!==n||l in Je(m))}}function S9(l){var u=gc(l,function(y){return m.size===h&&m.clear(),y}),m=u.cache;return u}function A9(l,u){var m=l[1],y=u[1],A=m|y,D=A<(C|S|I),_=y==I&&m==T||y==I&&m==V&&l[7].length<=u[8]||y==(I|V)&&u[7].length<=u[8]&&m==T;if(!(D||_))return l;y&C&&(l[2]=u[2],A|=m&C?0:R);var B=u[3];if(B){var j=l[3];l[3]=j?T2(j,B,u[4]):B,l[4]=j?di(l[3],f):u[4]}return B=u[5],B&&(j=l[5],l[5]=j?M2(j,B,u[6]):B,l[6]=j?di(l[5],f):u[6]),B=u[7],B&&(l[7]=B),y&I&&(l[8]=l[8]==null?u[8]:Pt(l[8],u[8])),l[9]==null&&(l[9]=u[9]),l[0]=u[0],l[1]=A,l}function R9(l){var u=[];if(l!=null)for(var m in Je(l))u.push(m);return u}function k9(l){return Vl.call(l)}function K2(l,u,m){return u=St(u===n?l.length-1:u,0),function(){for(var y=arguments,A=-1,D=St(y.length-u,0),_=P(D);++A<D;)_[A]=y[u+A];A=-1;for(var B=P(u+1);++A<u;)B[A]=y[A];return B[u]=m(_),pn(l,this,B)}}function G2(l,u){return u.length<2?l:Zi(l,_n(u,0,-1))}function T9(l,u){for(var m=l.length,y=Pt(u.length,m),A=rn(l);y--;){var D=u[y];l[y]=Br(D,m)?A[D]:n}return l}function dd(l,u){if(!(u==="constructor"&&typeof l[u]=="function")&&u!="__proto__")return l[u]}var Y2=Z2(b2),ma=W8||function(l,u){return Nt.setTimeout(l,u)},gd=Z2(ZS);function X2(l,u,m){var y=u+"";return gd(l,w9(y,M9(p9(y),m)))}function Z2(l){var u=0,m=0;return function(){var y=K8(),A=J-(y-m);if(m=y,A>0){if(++u>=W)return arguments[0]}else u=0;return l.apply(n,arguments)}}function uc(l,u){var m=-1,y=l.length,A=y-1;for(u=u===n?y:u;++m<u;){var D=Xf(m,A),_=l[D];l[D]=l[m],l[m]=_}return l.length=u,l}var Q2=S9(function(l){var u=[];return l.charCodeAt(0)===46&&u.push(""),l.replace(b7,function(m,y,A,D){u.push(A?D.replace(R7,"$1"):y||m)}),u});function lr(l){if(typeof l=="string"||wn(l))return l;var u=l+"";return u=="0"&&1/l==-te?"-0":u}function Ji(l){if(l!=null){try{return Fl.call(l)}catch{}try{return l+""}catch{}}return""}function M9(l,u){return En(qe,function(m){var y="_."+m[0];u&m[1]&&!_l(l,y)&&l.push(y)}),l.sort()}function J2(l){if(l instanceof We)return l.clone();var u=new Dn(l.__wrapped__,l.__chain__);return u.__actions__=rn(l.__actions__),u.__index__=l.__index__,u.__values__=l.__values__,u}function E9(l,u,m){(m?Zt(l,u,m):u===n)?u=1:u=St(_e(u),0);var y=l==null?0:l.length;if(!y||u<1)return[];for(var A=0,D=0,_=P(ql(y/u));A<y;)_[D++]=_n(l,A,A+=u);return _}function O9(l){for(var u=-1,m=l==null?0:l.length,y=0,A=[];++u<m;){var D=l[u];D&&(A[y++]=D)}return A}function D9(){var l=arguments.length;if(!l)return[];for(var u=P(l-1),m=arguments[0],y=l;y--;)u[y-1]=arguments[y];return fi(Oe(m)?rn(m):[m],jt(u,1))}var I9=Ne(function(l,u){return dt(l)?ca(l,jt(u,1,dt,!0)):[]}),_9=Ne(function(l,u){var m=Ln(u);return dt(m)&&(m=n),dt(l)?ca(l,jt(u,1,dt,!0),Ce(m,2)):[]}),L9=Ne(function(l,u){var m=Ln(u);return dt(m)&&(m=n),dt(l)?ca(l,jt(u,1,dt,!0),n,m):[]});function B9(l,u,m){var y=l==null?0:l.length;return y?(u=m||u===n?1:_e(u),_n(l,u<0?0:u,y)):[]}function N9(l,u,m){var y=l==null?0:l.length;return y?(u=m||u===n?1:_e(u),u=y-u,_n(l,0,u<0?0:u)):[]}function j9(l,u){return l&&l.length?nc(l,Ce(u,3),!0,!0):[]}function F9(l,u){return l&&l.length?nc(l,Ce(u,3),!0):[]}function V9(l,u,m,y){var A=l==null?0:l.length;return A?(m&&typeof m!="number"&&Zt(l,u,m)&&(m=0,y=A),DS(l,u,m,y)):[]}function ev(l,u,m){var y=l==null?0:l.length;if(!y)return-1;var A=m==null?0:_e(m);return A<0&&(A=St(y+A,0)),Ll(l,Ce(u,3),A)}function tv(l,u,m){var y=l==null?0:l.length;if(!y)return-1;var A=y-1;return m!==n&&(A=_e(m),A=m<0?St(y+A,0):Pt(A,y-1)),Ll(l,Ce(u,3),A,!0)}function nv(l){var u=l==null?0:l.length;return u?jt(l,1):[]}function H9(l){var u=l==null?0:l.length;return u?jt(l,te):[]}function P9(l,u){var m=l==null?0:l.length;return m?(u=u===n?1:_e(u),jt(l,u)):[]}function W9(l){for(var u=-1,m=l==null?0:l.length,y={};++u<m;){var A=l[u];y[A[0]]=A[1]}return y}function rv(l){return l&&l.length?l[0]:n}function z9(l,u,m){var y=l==null?0:l.length;if(!y)return-1;var A=m==null?0:_e(m);return A<0&&(A=St(y+A,0)),No(l,u,A)}function U9(l){var u=l==null?0:l.length;return u?_n(l,0,-1):[]}var q9=Ne(function(l){var u=at(l,td);return u.length&&u[0]===l[0]?Uf(u):[]}),K9=Ne(function(l){var u=Ln(l),m=at(l,td);return u===Ln(m)?u=n:m.pop(),m.length&&m[0]===l[0]?Uf(m,Ce(u,2)):[]}),G9=Ne(function(l){var u=Ln(l),m=at(l,td);return u=typeof u=="function"?u:n,u&&m.pop(),m.length&&m[0]===l[0]?Uf(m,n,u):[]});function Y9(l,u){return l==null?"":U8.call(l,u)}function Ln(l){var u=l==null?0:l.length;return u?l[u-1]:n}function X9(l,u,m){var y=l==null?0:l.length;if(!y)return-1;var A=y;return m!==n&&(A=_e(m),A=A<0?St(y+A,0):Pt(A,y-1)),u===u?M8(l,u,A):Ll(l,Np,A,!0)}function Z9(l,u){return l&&l.length?g2(l,_e(u)):n}var Q9=Ne(iv);function iv(l,u){return l&&l.length&&u&&u.length?Yf(l,u):l}function J9(l,u,m){return l&&l.length&&u&&u.length?Yf(l,u,Ce(m,2)):l}function eA(l,u,m){return l&&l.length&&u&&u.length?Yf(l,u,n,m):l}var tA=Lr(function(l,u){var m=l==null?0:l.length,y=Hf(l,u);return v2(l,at(u,function(A){return Br(A,m)?+A:A}).sort(k2)),y});function nA(l,u){var m=[];if(!(l&&l.length))return m;var y=-1,A=[],D=l.length;for(u=Ce(u,3);++y<D;){var _=l[y];u(_,y,l)&&(m.push(_),A.push(y))}return v2(l,A),m}function md(l){return l==null?l:Y8.call(l)}function rA(l,u,m){var y=l==null?0:l.length;return y?(m&&typeof m!="number"&&Zt(l,u,m)?(u=0,m=y):(u=u==null?0:_e(u),m=m===n?y:_e(m)),_n(l,u,m)):[]}function iA(l,u){return tc(l,u)}function oA(l,u,m){return Qf(l,u,Ce(m,2))}function sA(l,u){var m=l==null?0:l.length;if(m){var y=tc(l,u);if(y<m&&Un(l[y],u))return y}return-1}function aA(l,u){return tc(l,u,!0)}function lA(l,u,m){return Qf(l,u,Ce(m,2),!0)}function cA(l,u){var m=l==null?0:l.length;if(m){var y=tc(l,u,!0)-1;if(Un(l[y],u))return y}return-1}function uA(l){return l&&l.length?w2(l):[]}function hA(l,u){return l&&l.length?w2(l,Ce(u,2)):[]}function fA(l){var u=l==null?0:l.length;return u?_n(l,1,u):[]}function dA(l,u,m){return l&&l.length?(u=m||u===n?1:_e(u),_n(l,0,u<0?0:u)):[]}function gA(l,u,m){var y=l==null?0:l.length;return y?(u=m||u===n?1:_e(u),u=y-u,_n(l,u<0?0:u,y)):[]}function mA(l,u){return l&&l.length?nc(l,Ce(u,3),!1,!0):[]}function pA(l,u){return l&&l.length?nc(l,Ce(u,3)):[]}var vA=Ne(function(l){return pi(jt(l,1,dt,!0))}),bA=Ne(function(l){var u=Ln(l);return dt(u)&&(u=n),pi(jt(l,1,dt,!0),Ce(u,2))}),wA=Ne(function(l){var u=Ln(l);return u=typeof u=="function"?u:n,pi(jt(l,1,dt,!0),n,u)});function xA(l){return l&&l.length?pi(l):[]}function yA(l,u){return l&&l.length?pi(l,Ce(u,2)):[]}function CA(l,u){return u=typeof u=="function"?u:n,l&&l.length?pi(l,n,u):[]}function pd(l){if(!(l&&l.length))return[];var u=0;return l=hi(l,function(m){if(dt(m))return u=St(m.length,u),!0}),If(u,function(m){return at(l,Ef(m))})}function ov(l,u){if(!(l&&l.length))return[];var m=pd(l);return u==null?m:at(m,function(y){return pn(u,n,y)})}var $A=Ne(function(l,u){return dt(l)?ca(l,u):[]}),SA=Ne(function(l){return ed(hi(l,dt))}),AA=Ne(function(l){var u=Ln(l);return dt(u)&&(u=n),ed(hi(l,dt),Ce(u,2))}),RA=Ne(function(l){var u=Ln(l);return u=typeof u=="function"?u:n,ed(hi(l,dt),n,u)}),kA=Ne(pd);function TA(l,u){return $2(l||[],u||[],la)}function MA(l,u){return $2(l||[],u||[],fa)}var EA=Ne(function(l){var u=l.length,m=u>1?l[u-1]:n;return m=typeof m=="function"?(l.pop(),m):n,ov(l,m)});function sv(l){var u=M(l);return u.__chain__=!0,u}function OA(l,u){return u(l),l}function hc(l,u){return u(l)}var DA=Lr(function(l){var u=l.length,m=u?l[0]:0,y=this.__wrapped__,A=function(D){return Hf(D,l)};return u>1||this.__actions__.length||!(y instanceof We)||!Br(m)?this.thru(A):(y=y.slice(m,+m+(u?1:0)),y.__actions__.push({func:hc,args:[A],thisArg:n}),new Dn(y,this.__chain__).thru(function(D){return u&&!D.length&&D.push(n),D}))});function IA(){return sv(this)}function _A(){return new Dn(this.value(),this.__chain__)}function LA(){this.__values__===n&&(this.__values__=xv(this.value()));var l=this.__index__>=this.__values__.length,u=l?n:this.__values__[this.__index__++];return{done:l,value:u}}function BA(){return this}function NA(l){for(var u,m=this;m instanceof Xl;){var y=J2(m);y.__index__=0,y.__values__=n,u?A.__wrapped__=y:u=y;var A=y;m=m.__wrapped__}return A.__wrapped__=l,u}function jA(){var l=this.__wrapped__;if(l instanceof We){var u=l;return this.__actions__.length&&(u=new We(this)),u=u.reverse(),u.__actions__.push({func:hc,args:[md],thisArg:n}),new Dn(u,this.__chain__)}return this.thru(md)}function FA(){return C2(this.__wrapped__,this.__actions__)}var VA=rc(function(l,u,m){Qe.call(l,m)?++l[m]:Ir(l,m,1)});function HA(l,u,m){var y=Oe(l)?Lp:OS;return m&&Zt(l,u,m)&&(u=n),y(l,Ce(u,3))}function PA(l,u){var m=Oe(l)?hi:o2;return m(l,Ce(u,3))}var WA=I2(ev),zA=I2(tv);function UA(l,u){return jt(fc(l,u),1)}function qA(l,u){return jt(fc(l,u),te)}function KA(l,u,m){return m=m===n?1:_e(m),jt(fc(l,u),m)}function av(l,u){var m=Oe(l)?En:mi;return m(l,Ce(u,3))}function lv(l,u){var m=Oe(l)?f8:i2;return m(l,Ce(u,3))}var GA=rc(function(l,u,m){Qe.call(l,m)?l[m].push(u):Ir(l,m,[u])});function YA(l,u,m,y){l=on(l)?l:Yo(l),m=m&&!y?_e(m):0;var A=l.length;return m<0&&(m=St(A+m,0)),vc(l)?m<=A&&l.indexOf(u,m)>-1:!!A&&No(l,u,m)>-1}var XA=Ne(function(l,u,m){var y=-1,A=typeof u=="function",D=on(l)?P(l.length):[];return mi(l,function(_){D[++y]=A?pn(u,_,m):ua(_,u,m)}),D}),ZA=rc(function(l,u,m){Ir(l,m,u)});function fc(l,u){var m=Oe(l)?at:h2;return m(l,Ce(u,3))}function QA(l,u,m,y){return l==null?[]:(Oe(u)||(u=u==null?[]:[u]),m=y?n:m,Oe(m)||(m=m==null?[]:[m]),m2(l,u,m))}var JA=rc(function(l,u,m){l[m?0:1].push(u)},function(){return[[],[]]});function eR(l,u,m){var y=Oe(l)?Tf:Fp,A=arguments.length<3;return y(l,Ce(u,4),m,A,mi)}function tR(l,u,m){var y=Oe(l)?d8:Fp,A=arguments.length<3;return y(l,Ce(u,4),m,A,i2)}function nR(l,u){var m=Oe(l)?hi:o2;return m(l,mc(Ce(u,3)))}function rR(l){var u=Oe(l)?e2:YS;return u(l)}function iR(l,u,m){(m?Zt(l,u,m):u===n)?u=1:u=_e(u);var y=Oe(l)?RS:XS;return y(l,u)}function oR(l){var u=Oe(l)?kS:QS;return u(l)}function sR(l){if(l==null)return 0;if(on(l))return vc(l)?Fo(l):l.length;var u=Wt(l);return u==Ze||u==Mt?l.size:Kf(l).length}function aR(l,u,m){var y=Oe(l)?Mf:JS;return m&&Zt(l,u,m)&&(u=n),y(l,Ce(u,3))}var lR=Ne(function(l,u){if(l==null)return[];var m=u.length;return m>1&&Zt(l,u[0],u[1])?u=[]:m>2&&Zt(u[0],u[1],u[2])&&(u=[u[0]]),m2(l,jt(u,1),[])}),dc=P8||function(){return Nt.Date.now()};function cR(l,u){if(typeof u!="function")throw new On(s);return l=_e(l),function(){if(--l<1)return u.apply(this,arguments)}}function cv(l,u,m){return u=m?n:u,u=l&&u==null?l.length:u,_r(l,I,n,n,n,n,u)}function uv(l,u){var m;if(typeof u!="function")throw new On(s);return l=_e(l),function(){return--l>0&&(m=u.apply(this,arguments)),l<=1&&(u=n),m}}var vd=Ne(function(l,u,m){var y=C;if(m.length){var A=di(m,Ko(vd));y|=O}return _r(l,y,u,m,A)}),hv=Ne(function(l,u,m){var y=C|S;if(m.length){var A=di(m,Ko(hv));y|=O}return _r(u,y,l,m,A)});function fv(l,u,m){u=m?n:u;var y=_r(l,T,n,n,n,n,n,u);return y.placeholder=fv.placeholder,y}function dv(l,u,m){u=m?n:u;var y=_r(l,E,n,n,n,n,n,u);return y.placeholder=dv.placeholder,y}function gv(l,u,m){var y,A,D,_,B,j,X=0,Z=!1,ee=!1,ae=!0;if(typeof l!="function")throw new On(s);u=Bn(u)||0,ct(m)&&(Z=!!m.leading,ee="maxWait"in m,D=ee?St(Bn(m.maxWait)||0,u):D,ae="trailing"in m?!!m.trailing:ae);function ve(gt){var qn=y,Fr=A;return y=A=n,X=gt,_=l.apply(Fr,qn),_}function $e(gt){return X=gt,B=ma(Fe,u),Z?ve(gt):_}function Be(gt){var qn=gt-j,Fr=gt-X,Iv=u-qn;return ee?Pt(Iv,D-Fr):Iv}function Se(gt){var qn=gt-j,Fr=gt-X;return j===n||qn>=u||qn<0||ee&&Fr>=D}function Fe(){var gt=dc();if(Se(gt))return ze(gt);B=ma(Fe,Be(gt))}function ze(gt){return B=n,ae&&y?ve(gt):(y=A=n,_)}function xn(){B!==n&&S2(B),X=0,y=j=A=B=n}function Qt(){return B===n?_:ze(dc())}function yn(){var gt=dc(),qn=Se(gt);if(y=arguments,A=this,j=gt,qn){if(B===n)return $e(j);if(ee)return S2(B),B=ma(Fe,u),ve(j)}return B===n&&(B=ma(Fe,u)),_}return yn.cancel=xn,yn.flush=Qt,yn}var uR=Ne(function(l,u){return r2(l,1,u)}),hR=Ne(function(l,u,m){return r2(l,Bn(u)||0,m)});function fR(l){return _r(l,F)}function gc(l,u){if(typeof l!="function"||u!=null&&typeof u!="function")throw new On(s);var m=function(){var y=arguments,A=u?u.apply(this,y):y[0],D=m.cache;if(D.has(A))return D.get(A);var _=l.apply(this,y);return m.cache=D.set(A,_)||D,_};return m.cache=new(gc.Cache||Dr),m}gc.Cache=Dr;function mc(l){if(typeof l!="function")throw new On(s);return function(){var u=arguments;switch(u.length){case 0:return!l.call(this);case 1:return!l.call(this,u[0]);case 2:return!l.call(this,u[0],u[1]);case 3:return!l.call(this,u[0],u[1],u[2])}return!l.apply(this,u)}}function dR(l){return uv(2,l)}var gR=e9(function(l,u){u=u.length==1&&Oe(u[0])?at(u[0],vn(Ce())):at(jt(u,1),vn(Ce()));var m=u.length;return Ne(function(y){for(var A=-1,D=Pt(y.length,m);++A<D;)y[A]=u[A].call(this,y[A]);return pn(l,this,y)})}),bd=Ne(function(l,u){var m=di(u,Ko(bd));return _r(l,O,n,u,m)}),mv=Ne(function(l,u){var m=di(u,Ko(mv));return _r(l,L,n,u,m)}),mR=Lr(function(l,u){return _r(l,V,n,n,n,u)});function pR(l,u){if(typeof l!="function")throw new On(s);return u=u===n?u:_e(u),Ne(l,u)}function vR(l,u){if(typeof l!="function")throw new On(s);return u=u==null?0:St(_e(u),0),Ne(function(m){var y=m[u],A=bi(m,0,u);return y&&fi(A,y),pn(l,this,A)})}function bR(l,u,m){var y=!0,A=!0;if(typeof l!="function")throw new On(s);return ct(m)&&(y="leading"in m?!!m.leading:y,A="trailing"in m?!!m.trailing:A),gv(l,u,{leading:y,maxWait:u,trailing:A})}function wR(l){return cv(l,1)}function xR(l,u){return bd(nd(u),l)}function yR(){if(!arguments.length)return[];var l=arguments[0];return Oe(l)?l:[l]}function CR(l){return In(l,v)}function $R(l,u){return u=typeof u=="function"?u:n,In(l,v,u)}function SR(l){return In(l,d|v)}function AR(l,u){return u=typeof u=="function"?u:n,In(l,d|v,u)}function RR(l,u){return u==null||n2(l,u,Et(u))}function Un(l,u){return l===u||l!==l&&u!==u}var kR=ac(zf),TR=ac(function(l,u){return l>=u}),eo=l2(function(){return arguments}())?l2:function(l){return ht(l)&&Qe.call(l,"callee")&&!Gp.call(l,"callee")},Oe=P.isArray,MR=Mp?vn(Mp):NS;function on(l){return l!=null&&pc(l.length)&&!Nr(l)}function dt(l){return ht(l)&&on(l)}function ER(l){return l===!0||l===!1||ht(l)&&Xt(l)==De}var wi=z8||Md,OR=Ep?vn(Ep):jS;function DR(l){return ht(l)&&l.nodeType===1&&!pa(l)}function IR(l){if(l==null)return!0;if(on(l)&&(Oe(l)||typeof l=="string"||typeof l.splice=="function"||wi(l)||Go(l)||eo(l)))return!l.length;var u=Wt(l);if(u==Ze||u==Mt)return!l.size;if(ga(l))return!Kf(l).length;for(var m in l)if(Qe.call(l,m))return!1;return!0}function _R(l,u){return ha(l,u)}function LR(l,u,m){m=typeof m=="function"?m:n;var y=m?m(l,u):n;return y===n?ha(l,u,n,m):!!y}function wd(l){if(!ht(l))return!1;var u=Xt(l);return u==Ae||u==Le||typeof l.message=="string"&&typeof l.name=="string"&&!pa(l)}function BR(l){return typeof l=="number"&&Xp(l)}function Nr(l){if(!ct(l))return!1;var u=Xt(l);return u==He||u==wt||u==pe||u==ea}function pv(l){return typeof l=="number"&&l==_e(l)}function pc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=ne}function ct(l){var u=typeof l;return l!=null&&(u=="object"||u=="function")}function ht(l){return l!=null&&typeof l=="object"}var vv=Op?vn(Op):VS;function NR(l,u){return l===u||qf(l,u,cd(u))}function jR(l,u,m){return m=typeof m=="function"?m:n,qf(l,u,cd(u),m)}function FR(l){return bv(l)&&l!=+l}function VR(l){if($9(l))throw new Me(o);return c2(l)}function HR(l){return l===null}function PR(l){return l==null}function bv(l){return typeof l=="number"||ht(l)&&Xt(l)==Pe}function pa(l){if(!ht(l)||Xt(l)!=ft)return!1;var u=Wl(l);if(u===null)return!0;var m=Qe.call(u,"constructor")&&u.constructor;return typeof m=="function"&&m instanceof m&&Fl.call(m)==j8}var xd=Dp?vn(Dp):HS;function WR(l){return pv(l)&&l>=-ne&&l<=ne}var wv=Ip?vn(Ip):PS;function vc(l){return typeof l=="string"||!Oe(l)&&ht(l)&&Xt(l)==li}function wn(l){return typeof l=="symbol"||ht(l)&&Xt(l)==ci}var Go=_p?vn(_p):WS;function zR(l){return l===n}function UR(l){return ht(l)&&Wt(l)==Wi}function qR(l){return ht(l)&&Xt(l)==ta}var KR=ac(Gf),GR=ac(function(l,u){return l<=u});function xv(l){if(!l)return[];if(on(l))return vc(l)?Wn(l):rn(l);if(ra&&l[ra])return R8(l[ra]());var u=Wt(l),m=u==Ze?Lf:u==Mt?Bl:Yo;return m(l)}function jr(l){if(!l)return l===0?l:0;if(l=Bn(l),l===te||l===-te){var u=l<0?-1:1;return u*Y}return l===l?l:0}function _e(l){var u=jr(l),m=u%1;return u===u?m?u-m:u:0}function yv(l){return l?Xi(_e(l),0,me):0}function Bn(l){if(typeof l=="number")return l;if(wn(l))return ce;if(ct(l)){var u=typeof l.valueOf=="function"?l.valueOf():l;l=ct(u)?u+"":u}if(typeof l!="string")return l===0?l:+l;l=Vp(l);var m=M7.test(l);return m||O7.test(l)?c8(l.slice(2),m?2:8):T7.test(l)?ce:+l}function Cv(l){return ar(l,sn(l))}function YR(l){return l?Xi(_e(l),-ne,ne):l===0?l:0}function Xe(l){return l==null?"":bn(l)}var XR=Uo(function(l,u){if(ga(u)||on(u)){ar(u,Et(u),l);return}for(var m in u)Qe.call(u,m)&&la(l,m,u[m])}),$v=Uo(function(l,u){ar(u,sn(u),l)}),bc=Uo(function(l,u,m,y){ar(u,sn(u),l,y)}),ZR=Uo(function(l,u,m,y){ar(u,Et(u),l,y)}),QR=Lr(Hf);function JR(l,u){var m=zo(l);return u==null?m:t2(m,u)}var ek=Ne(function(l,u){l=Je(l);var m=-1,y=u.length,A=y>2?u[2]:n;for(A&&Zt(u[0],u[1],A)&&(y=1);++m<y;)for(var D=u[m],_=sn(D),B=-1,j=_.length;++B<j;){var X=_[B],Z=l[X];(Z===n||Un(Z,Ho[X])&&!Qe.call(l,X))&&(l[X]=D[X])}return l}),tk=Ne(function(l){return l.push(n,V2),pn(Sv,n,l)});function nk(l,u){return Bp(l,Ce(u,3),sr)}function rk(l,u){return Bp(l,Ce(u,3),Wf)}function ik(l,u){return l==null?l:Pf(l,Ce(u,3),sn)}function ok(l,u){return l==null?l:s2(l,Ce(u,3),sn)}function sk(l,u){return l&&sr(l,Ce(u,3))}function ak(l,u){return l&&Wf(l,Ce(u,3))}function lk(l){return l==null?[]:Jl(l,Et(l))}function ck(l){return l==null?[]:Jl(l,sn(l))}function yd(l,u,m){var y=l==null?n:Zi(l,u);return y===n?m:y}function uk(l,u){return l!=null&&W2(l,u,IS)}function Cd(l,u){return l!=null&&W2(l,u,_S)}var hk=L2(function(l,u,m){u!=null&&typeof u.toString!="function"&&(u=Vl.call(u)),l[u]=m},Sd(an)),fk=L2(function(l,u,m){u!=null&&typeof u.toString!="function"&&(u=Vl.call(u)),Qe.call(l,u)?l[u].push(m):l[u]=[m]},Ce),dk=Ne(ua);function Et(l){return on(l)?Jp(l):Kf(l)}function sn(l){return on(l)?Jp(l,!0):zS(l)}function gk(l,u){var m={};return u=Ce(u,3),sr(l,function(y,A,D){Ir(m,u(y,A,D),y)}),m}function mk(l,u){var m={};return u=Ce(u,3),sr(l,function(y,A,D){Ir(m,A,u(y,A,D))}),m}var pk=Uo(function(l,u,m){ec(l,u,m)}),Sv=Uo(function(l,u,m,y){ec(l,u,m,y)}),vk=Lr(function(l,u){var m={};if(l==null)return m;var y=!1;u=at(u,function(D){return D=vi(D,l),y||(y=D.length>1),D}),ar(l,ad(l),m),y&&(m=In(m,d|g|v,h9));for(var A=u.length;A--;)Jf(m,u[A]);return m});function bk(l,u){return Av(l,mc(Ce(u)))}var wk=Lr(function(l,u){return l==null?{}:qS(l,u)});function Av(l,u){if(l==null)return{};var m=at(ad(l),function(y){return[y]});return u=Ce(u),p2(l,m,function(y,A){return u(y,A[0])})}function xk(l,u,m){u=vi(u,l);var y=-1,A=u.length;for(A||(A=1,l=n);++y<A;){var D=l==null?n:l[lr(u[y])];D===n&&(y=A,D=m),l=Nr(D)?D.call(l):D}return l}function yk(l,u,m){return l==null?l:fa(l,u,m)}function Ck(l,u,m,y){return y=typeof y=="function"?y:n,l==null?l:fa(l,u,m,y)}var Rv=j2(Et),kv=j2(sn);function $k(l,u,m){var y=Oe(l),A=y||wi(l)||Go(l);if(u=Ce(u,4),m==null){var D=l&&l.constructor;A?m=y?new D:[]:ct(l)?m=Nr(D)?zo(Wl(l)):{}:m={}}return(A?En:sr)(l,function(_,B,j){return u(m,_,B,j)}),m}function Sk(l,u){return l==null?!0:Jf(l,u)}function Ak(l,u,m){return l==null?l:y2(l,u,nd(m))}function Rk(l,u,m,y){return y=typeof y=="function"?y:n,l==null?l:y2(l,u,nd(m),y)}function Yo(l){return l==null?[]:_f(l,Et(l))}function kk(l){return l==null?[]:_f(l,sn(l))}function Tk(l,u,m){return m===n&&(m=u,u=n),m!==n&&(m=Bn(m),m=m===m?m:0),u!==n&&(u=Bn(u),u=u===u?u:0),Xi(Bn(l),u,m)}function Mk(l,u,m){return u=jr(u),m===n?(m=u,u=0):m=jr(m),l=Bn(l),LS(l,u,m)}function Ek(l,u,m){if(m&&typeof m!="boolean"&&Zt(l,u,m)&&(u=m=n),m===n&&(typeof u=="boolean"?(m=u,u=n):typeof l=="boolean"&&(m=l,l=n)),l===n&&u===n?(l=0,u=1):(l=jr(l),u===n?(u=l,l=0):u=jr(u)),l>u){var y=l;l=u,u=y}if(m||l%1||u%1){var A=Zp();return Pt(l+A*(u-l+l8("1e-"+((A+"").length-1))),u)}return Xf(l,u)}var Ok=qo(function(l,u,m){return u=u.toLowerCase(),l+(m?Tv(u):u)});function Tv(l){return $d(Xe(l).toLowerCase())}function Mv(l){return l=Xe(l),l&&l.replace(I7,y8).replace(Q7,"")}function Dk(l,u,m){l=Xe(l),u=bn(u);var y=l.length;m=m===n?y:Xi(_e(m),0,y);var A=m;return m-=u.length,m>=0&&l.slice(m,A)==u}function Ik(l){return l=Xe(l),l&&d7.test(l)?l.replace(sp,C8):l}function _k(l){return l=Xe(l),l&&w7.test(l)?l.replace(bf,"\\$&"):l}var Lk=qo(function(l,u,m){return l+(m?"-":"")+u.toLowerCase()}),Bk=qo(function(l,u,m){return l+(m?" ":"")+u.toLowerCase()}),Nk=D2("toLowerCase");function jk(l,u,m){l=Xe(l),u=_e(u);var y=u?Fo(l):0;if(!u||y>=u)return l;var A=(u-y)/2;return sc(Kl(A),m)+l+sc(ql(A),m)}function Fk(l,u,m){l=Xe(l),u=_e(u);var y=u?Fo(l):0;return u&&y<u?l+sc(u-y,m):l}function Vk(l,u,m){l=Xe(l),u=_e(u);var y=u?Fo(l):0;return u&&y<u?sc(u-y,m)+l:l}function Hk(l,u,m){return m||u==null?u=0:u&&(u=+u),G8(Xe(l).replace(wf,""),u||0)}function Pk(l,u,m){return(m?Zt(l,u,m):u===n)?u=1:u=_e(u),Zf(Xe(l),u)}function Wk(){var l=arguments,u=Xe(l[0]);return l.length<3?u:u.replace(l[1],l[2])}var zk=qo(function(l,u,m){return l+(m?"_":"")+u.toLowerCase()});function Uk(l,u,m){return m&&typeof m!="number"&&Zt(l,u,m)&&(u=m=n),m=m===n?me:m>>>0,m?(l=Xe(l),l&&(typeof u=="string"||u!=null&&!xd(u))&&(u=bn(u),!u&&jo(l))?bi(Wn(l),0,m):l.split(u,m)):[]}var qk=qo(function(l,u,m){return l+(m?" ":"")+$d(u)});function Kk(l,u,m){return l=Xe(l),m=m==null?0:Xi(_e(m),0,l.length),u=bn(u),l.slice(m,m+u.length)==u}function Gk(l,u,m){var y=M.templateSettings;m&&Zt(l,u,m)&&(u=n),l=Xe(l),u=bc({},u,y,F2);var A=bc({},u.imports,y.imports,F2),D=Et(A),_=_f(A,D),B,j,X=0,Z=u.interpolate||Ol,ee="__p += '",ae=Bf((u.escape||Ol).source+"|"+Z.source+"|"+(Z===ap?k7:Ol).source+"|"+(u.evaluate||Ol).source+"|$","g"),ve="//# sourceURL="+(Qe.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++r8+"]")+`
`;l.replace(ae,function(Se,Fe,ze,xn,Qt,yn){return ze||(ze=xn),ee+=l.slice(X,yn).replace(_7,$8),Fe&&(B=!0,ee+=`' +
__e(`+Fe+`) +
'`),Qt&&(j=!0,ee+=`';
`+Qt+`;
__p += '`),ze&&(ee+=`' +
((__t = (`+ze+`)) == null ? '' : __t) +
'`),X=yn+Se.length,Se}),ee+=`';
`;var $e=Qe.call(u,"variable")&&u.variable;if(!$e)ee=`with (obj) {
`+ee+`
}
`;else if(A7.test($e))throw new Me(a);ee=(j?ee.replace(c7,""):ee).replace(u7,"$1").replace(h7,"$1;"),ee="function("+($e||"obj")+`) {
`+($e?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(B?", __e = _.escape":"")+(j?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+ee+`return __p
}`;var Be=Ov(function(){return Ye(D,ve+"return "+ee).apply(n,_)});if(Be.source=ee,wd(Be))throw Be;return Be}function Yk(l){return Xe(l).toLowerCase()}function Xk(l){return Xe(l).toUpperCase()}function Zk(l,u,m){if(l=Xe(l),l&&(m||u===n))return Vp(l);if(!l||!(u=bn(u)))return l;var y=Wn(l),A=Wn(u),D=Hp(y,A),_=Pp(y,A)+1;return bi(y,D,_).join("")}function Qk(l,u,m){if(l=Xe(l),l&&(m||u===n))return l.slice(0,zp(l)+1);if(!l||!(u=bn(u)))return l;var y=Wn(l),A=Pp(y,Wn(u))+1;return bi(y,0,A).join("")}function Jk(l,u,m){if(l=Xe(l),l&&(m||u===n))return l.replace(wf,"");if(!l||!(u=bn(u)))return l;var y=Wn(l),A=Hp(y,Wn(u));return bi(y,A).join("")}function eT(l,u){var m=H,y=K;if(ct(u)){var A="separator"in u?u.separator:A;m="length"in u?_e(u.length):m,y="omission"in u?bn(u.omission):y}l=Xe(l);var D=l.length;if(jo(l)){var _=Wn(l);D=_.length}if(m>=D)return l;var B=m-Fo(y);if(B<1)return y;var j=_?bi(_,0,B).join(""):l.slice(0,B);if(A===n)return j+y;if(_&&(B+=j.length-B),xd(A)){if(l.slice(B).search(A)){var X,Z=j;for(A.global||(A=Bf(A.source,Xe(lp.exec(A))+"g")),A.lastIndex=0;X=A.exec(Z);)var ee=X.index;j=j.slice(0,ee===n?B:ee)}}else if(l.indexOf(bn(A),B)!=B){var ae=j.lastIndexOf(A);ae>-1&&(j=j.slice(0,ae))}return j+y}function tT(l){return l=Xe(l),l&&f7.test(l)?l.replace(op,E8):l}var nT=qo(function(l,u,m){return l+(m?" ":"")+u.toUpperCase()}),$d=D2("toUpperCase");function Ev(l,u,m){return l=Xe(l),u=m?n:u,u===n?A8(l)?I8(l):p8(l):l.match(u)||[]}var Ov=Ne(function(l,u){try{return pn(l,n,u)}catch(m){return wd(m)?m:new Me(m)}}),rT=Lr(function(l,u){return En(u,function(m){m=lr(m),Ir(l,m,vd(l[m],l))}),l});function iT(l){var u=l==null?0:l.length,m=Ce();return l=u?at(l,function(y){if(typeof y[1]!="function")throw new On(s);return[m(y[0]),y[1]]}):[],Ne(function(y){for(var A=-1;++A<u;){var D=l[A];if(pn(D[0],this,y))return pn(D[1],this,y)}})}function oT(l){return ES(In(l,d))}function Sd(l){return function(){return l}}function sT(l,u){return l==null||l!==l?u:l}var aT=_2(),lT=_2(!0);function an(l){return l}function Ad(l){return u2(typeof l=="function"?l:In(l,d))}function cT(l){return f2(In(l,d))}function uT(l,u){return d2(l,In(u,d))}var hT=Ne(function(l,u){return function(m){return ua(m,l,u)}}),fT=Ne(function(l,u){return function(m){return ua(l,m,u)}});function Rd(l,u,m){var y=Et(u),A=Jl(u,y);m==null&&!(ct(u)&&(A.length||!y.length))&&(m=u,u=l,l=this,A=Jl(u,Et(u)));var D=!(ct(m)&&"chain"in m)||!!m.chain,_=Nr(l);return En(A,function(B){var j=u[B];l[B]=j,_&&(l.prototype[B]=function(){var X=this.__chain__;if(D||X){var Z=l(this.__wrapped__),ee=Z.__actions__=rn(this.__actions__);return ee.push({func:j,args:arguments,thisArg:l}),Z.__chain__=X,Z}return j.apply(l,fi([this.value()],arguments))})}),l}function dT(){return Nt._===this&&(Nt._=F8),this}function kd(){}function gT(l){return l=_e(l),Ne(function(u){return g2(u,l)})}var mT=id(at),pT=id(Lp),vT=id(Mf);function Dv(l){return hd(l)?Ef(lr(l)):KS(l)}function bT(l){return function(u){return l==null?n:Zi(l,u)}}var wT=B2(),xT=B2(!0);function Td(){return[]}function Md(){return!1}function yT(){return{}}function CT(){return""}function $T(){return!0}function ST(l,u){if(l=_e(l),l<1||l>ne)return[];var m=me,y=Pt(l,me);u=Ce(u),l-=me;for(var A=If(y,u);++m<l;)u(m);return A}function AT(l){return Oe(l)?at(l,lr):wn(l)?[l]:rn(Q2(Xe(l)))}function RT(l){var u=++N8;return Xe(l)+u}var kT=oc(function(l,u){return l+u},0),TT=od("ceil"),MT=oc(function(l,u){return l/u},1),ET=od("floor");function OT(l){return l&&l.length?Ql(l,an,zf):n}function DT(l,u){return l&&l.length?Ql(l,Ce(u,2),zf):n}function IT(l){return jp(l,an)}function _T(l,u){return jp(l,Ce(u,2))}function LT(l){return l&&l.length?Ql(l,an,Gf):n}function BT(l,u){return l&&l.length?Ql(l,Ce(u,2),Gf):n}var NT=oc(function(l,u){return l*u},1),jT=od("round"),FT=oc(function(l,u){return l-u},0);function VT(l){return l&&l.length?Df(l,an):0}function HT(l,u){return l&&l.length?Df(l,Ce(u,2)):0}return M.after=cR,M.ary=cv,M.assign=XR,M.assignIn=$v,M.assignInWith=bc,M.assignWith=ZR,M.at=QR,M.before=uv,M.bind=vd,M.bindAll=rT,M.bindKey=hv,M.castArray=yR,M.chain=sv,M.chunk=E9,M.compact=O9,M.concat=D9,M.cond=iT,M.conforms=oT,M.constant=Sd,M.countBy=VA,M.create=JR,M.curry=fv,M.curryRight=dv,M.debounce=gv,M.defaults=ek,M.defaultsDeep=tk,M.defer=uR,M.delay=hR,M.difference=I9,M.differenceBy=_9,M.differenceWith=L9,M.drop=B9,M.dropRight=N9,M.dropRightWhile=j9,M.dropWhile=F9,M.fill=V9,M.filter=PA,M.flatMap=UA,M.flatMapDeep=qA,M.flatMapDepth=KA,M.flatten=nv,M.flattenDeep=H9,M.flattenDepth=P9,M.flip=fR,M.flow=aT,M.flowRight=lT,M.fromPairs=W9,M.functions=lk,M.functionsIn=ck,M.groupBy=GA,M.initial=U9,M.intersection=q9,M.intersectionBy=K9,M.intersectionWith=G9,M.invert=hk,M.invertBy=fk,M.invokeMap=XA,M.iteratee=Ad,M.keyBy=ZA,M.keys=Et,M.keysIn=sn,M.map=fc,M.mapKeys=gk,M.mapValues=mk,M.matches=cT,M.matchesProperty=uT,M.memoize=gc,M.merge=pk,M.mergeWith=Sv,M.method=hT,M.methodOf=fT,M.mixin=Rd,M.negate=mc,M.nthArg=gT,M.omit=vk,M.omitBy=bk,M.once=dR,M.orderBy=QA,M.over=mT,M.overArgs=gR,M.overEvery=pT,M.overSome=vT,M.partial=bd,M.partialRight=mv,M.partition=JA,M.pick=wk,M.pickBy=Av,M.property=Dv,M.propertyOf=bT,M.pull=Q9,M.pullAll=iv,M.pullAllBy=J9,M.pullAllWith=eA,M.pullAt=tA,M.range=wT,M.rangeRight=xT,M.rearg=mR,M.reject=nR,M.remove=nA,M.rest=pR,M.reverse=md,M.sampleSize=iR,M.set=yk,M.setWith=Ck,M.shuffle=oR,M.slice=rA,M.sortBy=lR,M.sortedUniq=uA,M.sortedUniqBy=hA,M.split=Uk,M.spread=vR,M.tail=fA,M.take=dA,M.takeRight=gA,M.takeRightWhile=mA,M.takeWhile=pA,M.tap=OA,M.throttle=bR,M.thru=hc,M.toArray=xv,M.toPairs=Rv,M.toPairsIn=kv,M.toPath=AT,M.toPlainObject=Cv,M.transform=$k,M.unary=wR,M.union=vA,M.unionBy=bA,M.unionWith=wA,M.uniq=xA,M.uniqBy=yA,M.uniqWith=CA,M.unset=Sk,M.unzip=pd,M.unzipWith=ov,M.update=Ak,M.updateWith=Rk,M.values=Yo,M.valuesIn=kk,M.without=$A,M.words=Ev,M.wrap=xR,M.xor=SA,M.xorBy=AA,M.xorWith=RA,M.zip=kA,M.zipObject=TA,M.zipObjectDeep=MA,M.zipWith=EA,M.entries=Rv,M.entriesIn=kv,M.extend=$v,M.extendWith=bc,Rd(M,M),M.add=kT,M.attempt=Ov,M.camelCase=Ok,M.capitalize=Tv,M.ceil=TT,M.clamp=Tk,M.clone=CR,M.cloneDeep=SR,M.cloneDeepWith=AR,M.cloneWith=$R,M.conformsTo=RR,M.deburr=Mv,M.defaultTo=sT,M.divide=MT,M.endsWith=Dk,M.eq=Un,M.escape=Ik,M.escapeRegExp=_k,M.every=HA,M.find=WA,M.findIndex=ev,M.findKey=nk,M.findLast=zA,M.findLastIndex=tv,M.findLastKey=rk,M.floor=ET,M.forEach=av,M.forEachRight=lv,M.forIn=ik,M.forInRight=ok,M.forOwn=sk,M.forOwnRight=ak,M.get=yd,M.gt=kR,M.gte=TR,M.has=uk,M.hasIn=Cd,M.head=rv,M.identity=an,M.includes=YA,M.indexOf=z9,M.inRange=Mk,M.invoke=dk,M.isArguments=eo,M.isArray=Oe,M.isArrayBuffer=MR,M.isArrayLike=on,M.isArrayLikeObject=dt,M.isBoolean=ER,M.isBuffer=wi,M.isDate=OR,M.isElement=DR,M.isEmpty=IR,M.isEqual=_R,M.isEqualWith=LR,M.isError=wd,M.isFinite=BR,M.isFunction=Nr,M.isInteger=pv,M.isLength=pc,M.isMap=vv,M.isMatch=NR,M.isMatchWith=jR,M.isNaN=FR,M.isNative=VR,M.isNil=PR,M.isNull=HR,M.isNumber=bv,M.isObject=ct,M.isObjectLike=ht,M.isPlainObject=pa,M.isRegExp=xd,M.isSafeInteger=WR,M.isSet=wv,M.isString=vc,M.isSymbol=wn,M.isTypedArray=Go,M.isUndefined=zR,M.isWeakMap=UR,M.isWeakSet=qR,M.join=Y9,M.kebabCase=Lk,M.last=Ln,M.lastIndexOf=X9,M.lowerCase=Bk,M.lowerFirst=Nk,M.lt=KR,M.lte=GR,M.max=OT,M.maxBy=DT,M.mean=IT,M.meanBy=_T,M.min=LT,M.minBy=BT,M.stubArray=Td,M.stubFalse=Md,M.stubObject=yT,M.stubString=CT,M.stubTrue=$T,M.multiply=NT,M.nth=Z9,M.noConflict=dT,M.noop=kd,M.now=dc,M.pad=jk,M.padEnd=Fk,M.padStart=Vk,M.parseInt=Hk,M.random=Ek,M.reduce=eR,M.reduceRight=tR,M.repeat=Pk,M.replace=Wk,M.result=xk,M.round=jT,M.runInContext=N,M.sample=rR,M.size=sR,M.snakeCase=zk,M.some=aR,M.sortedIndex=iA,M.sortedIndexBy=oA,M.sortedIndexOf=sA,M.sortedLastIndex=aA,M.sortedLastIndexBy=lA,M.sortedLastIndexOf=cA,M.startCase=qk,M.startsWith=Kk,M.subtract=FT,M.sum=VT,M.sumBy=HT,M.template=Gk,M.times=ST,M.toFinite=jr,M.toInteger=_e,M.toLength=yv,M.toLower=Yk,M.toNumber=Bn,M.toSafeInteger=YR,M.toString=Xe,M.toUpper=Xk,M.trim=Zk,M.trimEnd=Qk,M.trimStart=Jk,M.truncate=eT,M.unescape=tT,M.uniqueId=RT,M.upperCase=nT,M.upperFirst=$d,M.each=av,M.eachRight=lv,M.first=rv,Rd(M,function(){var l={};return sr(M,function(u,m){Qe.call(M.prototype,m)||(l[m]=u)}),l}(),{chain:!1}),M.VERSION=r,En(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){M[l].placeholder=M}),En(["drop","take"],function(l,u){We.prototype[l]=function(m){m=m===n?1:St(_e(m),0);var y=this.__filtered__&&!u?new We(this):this.clone();return y.__filtered__?y.__takeCount__=Pt(m,y.__takeCount__):y.__views__.push({size:Pt(m,me),type:l+(y.__dir__<0?"Right":"")}),y},We.prototype[l+"Right"]=function(m){return this.reverse()[l](m).reverse()}}),En(["filter","map","takeWhile"],function(l,u){var m=u+1,y=m==G||m==se;We.prototype[l]=function(A){var D=this.clone();return D.__iteratees__.push({iteratee:Ce(A,3),type:m}),D.__filtered__=D.__filtered__||y,D}}),En(["head","last"],function(l,u){var m="take"+(u?"Right":"");We.prototype[l]=function(){return this[m](1).value()[0]}}),En(["initial","tail"],function(l,u){var m="drop"+(u?"":"Right");We.prototype[l]=function(){return this.__filtered__?new We(this):this[m](1)}}),We.prototype.compact=function(){return this.filter(an)},We.prototype.find=function(l){return this.filter(l).head()},We.prototype.findLast=function(l){return this.reverse().find(l)},We.prototype.invokeMap=Ne(function(l,u){return typeof l=="function"?new We(this):this.map(function(m){return ua(m,l,u)})}),We.prototype.reject=function(l){return this.filter(mc(Ce(l)))},We.prototype.slice=function(l,u){l=_e(l);var m=this;return m.__filtered__&&(l>0||u<0)?new We(m):(l<0?m=m.takeRight(-l):l&&(m=m.drop(l)),u!==n&&(u=_e(u),m=u<0?m.dropRight(-u):m.take(u-l)),m)},We.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},We.prototype.toArray=function(){return this.take(me)},sr(We.prototype,function(l,u){var m=/^(?:filter|find|map|reject)|While$/.test(u),y=/^(?:head|last)$/.test(u),A=M[y?"take"+(u=="last"?"Right":""):u],D=y||/^find/.test(u);A&&(M.prototype[u]=function(){var _=this.__wrapped__,B=y?[1]:arguments,j=_ instanceof We,X=B[0],Z=j||Oe(_),ee=function(Fe){var ze=A.apply(M,fi([Fe],B));return y&&ae?ze[0]:ze};Z&&m&&typeof X=="function"&&X.length!=1&&(j=Z=!1);var ae=this.__chain__,ve=!!this.__actions__.length,$e=D&&!ae,Be=j&&!ve;if(!D&&Z){_=Be?_:new We(this);var Se=l.apply(_,B);return Se.__actions__.push({func:hc,args:[ee],thisArg:n}),new Dn(Se,ae)}return $e&&Be?l.apply(this,B):(Se=this.thru(ee),$e?y?Se.value()[0]:Se.value():Se)})}),En(["pop","push","shift","sort","splice","unshift"],function(l){var u=Nl[l],m=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",y=/^(?:pop|shift)$/.test(l);M.prototype[l]=function(){var A=arguments;if(y&&!this.__chain__){var D=this.value();return u.apply(Oe(D)?D:[],A)}return this[m](function(_){return u.apply(Oe(_)?_:[],A)})}}),sr(We.prototype,function(l,u){var m=M[u];if(m){var y=m.name+"";Qe.call(Wo,y)||(Wo[y]=[]),Wo[y].push({name:u,func:m})}}),Wo[ic(n,S).name]=[{name:"wrapper",func:n}],We.prototype.clone=tS,We.prototype.reverse=nS,We.prototype.value=rS,M.prototype.at=DA,M.prototype.chain=IA,M.prototype.commit=_A,M.prototype.next=LA,M.prototype.plant=NA,M.prototype.reverse=jA,M.prototype.toJSON=M.prototype.valueOf=M.prototype.value=FA,M.prototype.first=M.prototype.head,ra&&(M.prototype[ra]=BA),M},Vo=_8();qi?((qi.exports=Vo)._=Vo,Af._=Vo):Nt._=Vo}).call(hs)})(fh,fh.exports);var cZ=fh.exports;const Rl=(t,e)=>{const n=$.createContext(e),r=o=>{const{children:s,...a}=o,c=$.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:c,children:s})};function i(o){const s=$.useContext(n);if(s)return s;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return r.displayName=`${t}Provider`,[r,i]};function uZ(t,e){return typeof t=="string"?!1:e in t}function Ru(t,e,n){return t&&e&&uZ(t,e)?t[e]:n}const Rw={padding:["padding-block-start","padding-inline-end","padding-block-end","padding-inline-start"],paddingTop:"padding-block-start",paddingRight:"padding-inline-end",paddingBottom:"padding-block-end",paddingLeft:"padding-inline-start",margin:["margin-block-start","margin-inline-end","margin-block-end","margin-inline-start"],marginLeft:"margin-inline-start",marginRight:"margin-inline-end",marginTop:"margin-block-start",marginBottom:"margin-block-end",borderRadius:"border-radius",borderStyle:"border-style",borderWidth:"border-width",borderColor:"border-color",fontSize:"font-size",fontWeight:"font-weight",lineHeight:"line-height",zIndex:"z-index",boxShadow:"box-shadow",pointerEvents:"pointer-events",textAlign:"text-align",textTransform:"text-transform",textDecoration:"text-decoration",flexGrow:"flex-grow",flexShrink:"flex-shrink",flexBasis:"flex-basis",minWidth:"min-width",maxWidth:"max-width",minHeight:"min-height",maxHeight:"max-height",flexDirection:"flex-direction",flexWrap:"flex-wrap",justifyContent:"justify-content",alignItems:"align-items"},hZ=t=>{const[e,n,r,i]=t,o=n??e;return[e,o,r??e,i??o]};function fZ(t,e){switch(t){case"gap":case"padding":case"margin":case"paddingTop":case"paddingLeft":case"paddingRight":case"paddingBottom":case"marginTop":case"marginLeft":case"marginRight":case"marginBottom":case"left":case"right":case"top":case"bottom":case"width":case"maxWidth":case"minWidth":case"height":case"maxHeight":case"minHeight":case"borderRadius":case"borderWidth":return e.spaces;case"color":case"background":case"borderColor":return e.colors;case"fontSize":return e.fontSizes;case"fontWeight":return e.fontWeights;case"lineHeight":return e.lineHeights;case"zIndex":return e.zIndices;case"boxShadow":return e.shadows;default:return null}}const nf=(t,e)=>{const n=Object.entries(t).reduce((r,i)=>{const[o,s]=i,a=fZ(o,e),c=Object.prototype.hasOwnProperty.call(Rw,o)?Rw[o]:o;return c&&(s||s===0)&&(typeof s=="object"&&!Array.isArray(s)?Object.entries(s).forEach(([h,f])=>{r[h]={...r[h],...kw(c,f,a)}}):r.initial={...r.initial,...kw(c,s,a)}),r},{initial:{},small:{},medium:{},large:{}});return Object.entries(n).reduce((r,[i,o])=>{if(o&&Object.keys(o).length>0){const s=Object.entries(o).reduce((a,[c,h])=>(a.push(`${c}: ${h};`),a),[]).join(`
`);i==="initial"?r.push(s):r.push(`${e.breakpoints[i]}{ ${s} }`)}return r},[]).join(`
`)},kw=(t,e,n)=>{if(Array.isArray(t)&&Array.isArray(e)){const r=hZ(e);return t.reduce((i,o,s)=>(i[o]=Ru(n,r[s],r[s]),i),{})}else return Array.isArray(t)&&!Array.isArray(e)?t.reduce((r,i)=>(r[i]=Ru(n,e,e),r),{}):!Array.isArray(t)&&!Array.isArray(e)?{[t]:Ru(n,e,e)}:(console.warn("You've passed an array of values to a property that does not support it. Please check the property and value you're passing."),{})},nn=$.forwardRef,be=nn((t,e)=>{const{background:n,basis:r,borderColor:i,color:o,flex:s,fontSize:a,grow:c,hasRadius:h,padding:f,paddingBottom:d,paddingLeft:g,paddingRight:v,paddingTop:x,margin:w,marginLeft:C,marginBottom:S,marginRight:R,marginTop:T,shadow:E,shrink:O,lineHeight:L,fontWeight:I,width:V,minWidth:F,maxWidth:H,height:K,minHeight:W,maxHeight:J,top:G,left:re,bottom:se,right:te,borderRadius:ne,borderStyle:Y,borderWidth:ce,tag:me,pointerEvents:Ie,display:we,position:qe,zIndex:Te,overflow:Ve,cursor:pe,transition:De,transform:Re,animation:Le,textAlign:Ae,textTransform:He,...wt}=t,Ze=me||"div",Pe={$background:n,$basis:r,$borderColor:i,$color:o,$flex:s,$fontSize:a,$grow:c,$hasRadius:h,$padding:f,$paddingBottom:d,$paddingLeft:g,$paddingRight:v,$paddingTop:x,$margin:w,$marginLeft:C,$marginBottom:S,$marginRight:R,$marginTop:T,$shadow:E,$shrink:O,$lineHeight:L,$fontWeight:I,$width:V,$minWidth:F,$maxWidth:H,$height:K,$minHeight:W,$maxHeight:J,$top:G,$left:re,$bottom:se,$right:te,$borderRadius:ne,$borderStyle:Y,$borderWidth:ce,$pointerEvents:Ie,$display:we,$position:qe,$zIndex:Te,$overflow:Ve,$cursor:pe,$transition:De,$transform:Re,$animation:Le,$textAlign:Ae,$textTransform:He};return p.jsx(dZ,{as:Ze,ref:e,...Pe,...wt})}),dZ=k.styled.div`
  ${({theme:t,...e})=>nf({padding:e.$padding,paddingTop:e.$paddingTop,paddingBottom:e.$paddingBottom,paddingLeft:e.$paddingLeft,paddingRight:e.$paddingRight,margin:e.$margin,marginTop:e.$marginTop,marginBottom:e.$marginBottom,marginLeft:e.$marginLeft,marginRight:e.$marginRight,top:e.$top,left:e.$left,bottom:e.$bottom,right:e.$right,width:e.$width,minWidth:e.$minWidth,maxWidth:e.$maxWidth,height:e.$height,minHeight:e.$minHeight,maxHeight:e.$maxHeight,color:e.$color,background:e.$background,fontSize:e.$fontSize,fontWeight:e.$fontWeight,lineHeight:e.$lineHeight,borderRadius:e.$hasRadius?t.borderRadius:e.$borderRadius,borderStyle:e.$borderColor&&!e.$borderStyle?"solid":e.$borderStyle,borderWidth:e.$borderColor&&!e.$borderWidth?"1px":e.$borderWidth,borderColor:e.$borderColor,zIndex:e.$zIndex,boxShadow:e.$shadow,display:e.$display,pointerEvents:e.$pointerEvents,cursor:e.$cursor,textAlign:e.$textAlign,textTransform:e.$textTransform,transition:e.$transition,transform:e.$transform,animation:e.$animation,position:e.$position,overflow:e.$overflow,flex:e.$flex,flexShrink:e.$shrink,flexGrow:e.$grow,flexBasis:e.$basis},t)};
`,ue=nn((t,e)=>{const{className:n,alignItems:r,direction:i,inline:o,gap:s,justifyContent:a,wrap:c,...h}=t,f={$alignItems:r,$direction:i,$gap:s,$justifyContent:a,$wrap:c,$inline:o};return p.jsx(gZ,{className:n,ref:e,...f,...h})}),gZ=k.styled(be)`
  ${({theme:t,$display:e="flex",$alignItems:n="center",$direction:r="row",...i})=>nf({gap:i.$gap,alignItems:n,justifyContent:i.$justifyContent,flexWrap:i.$wrap,flexDirection:r,display:i.$inline?"inline-flex":e},t)};
`,mZ="alpha",pZ="beta",vZ="delta",bZ="epsilon",Tw="omega",wZ="pi",xZ="sigma",h$=k.css`
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
`,yZ=({$variant:t=Tw,theme:e})=>{switch(t){case mZ:return`
        font-weight: ${e.fontWeights.bold};
        font-size: ${e.fontSizes[5]};
        line-height: ${e.lineHeights[2]};
      `;case pZ:return`
        font-weight: ${e.fontWeights.bold};
        font-size: ${e.fontSizes[4]};
        line-height: ${e.lineHeights[1]};
      `;case vZ:return`
        font-weight: ${e.fontWeights.semiBold};
        font-size: ${e.fontSizes[3]};
        line-height: ${e.lineHeights[2]};
      `;case bZ:return`
        font-size: ${e.fontSizes[3]};
        line-height: ${e.lineHeights[6]};
      `;case Tw:return`
        font-size: ${e.fontSizes[2]};
        line-height: ${e.lineHeights[4]};
      `;case wZ:return`
        font-size: ${e.fontSizes[1]};
        line-height: ${e.lineHeights[3]};
      `;case xZ:return`
        font-weight: ${e.fontWeights.bold};
        font-size: ${e.fontSizes[0]};
        line-height: ${e.lineHeights[5]};
        text-transform: uppercase;
      `;default:return`
        font-size: ${e.fontSizes[2]};
      `}},ke=nn((t,e)=>{const{ellipsis:n,textColor:r="currentcolor",textDecoration:i,textTransform:o,variant:s,lineHeight:a,fontWeight:c,fontSize:h,...f}=t,d={$ellipsis:n,$textColor:r,$textDecoration:i,$textTransform:o,$variant:s,$lineHeight:a,$fontWeight:c,$fontSize:h};return p.jsx(CZ,{ref:e,tag:"span",...d,...f})}),CZ=k.styled(be)`
  ${yZ}
  ${({$ellipsis:t})=>t?h$:""}

  ${({theme:t,...e})=>nf({color:e.$textColor,textDecoration:e.$textDecoration,textTransform:e.$textTransform,lineHeight:e.$lineHeight,fontWeight:e.$fontWeight,fontSize:e.$fontSize},t)}
`,[$Z,Gm]=Rl("Accordion"),SZ=$.forwardRef(({children:t,size:e="S",...n},r)=>p.jsx(AZ,{ref:r,$size:e,collapsible:!0,...n,type:"single",children:p.jsx($Z,{size:e,children:t})})),AZ=k.styled(UI)`
  background-color: ${t=>t.theme.colors.neutral0};

  ${t=>t.$size==="S"?k.css`
        border-radius: ${e=>e.theme.borderRadius};
        border: solid 1px ${e=>e.theme.colors.neutral200};
      `:k.css``}
`,RZ=$.forwardRef((t,e)=>{const{size:n}=Gm("Item");return p.jsx(kZ,{$size:n,"data-size":n,ref:e,...t})}),kZ=k.styled(qI)`
  overflow: hidden;
  margin: 1px 0;

  &:first-child {
    border-top-left-radius: 0.3rem;
    border-top-right-radius: 0.3rem;
    margin-top: 0;
  }

  &:last-child {
    border-bottom-left-radius: 0.3rem;
    border-bottom-right-radius: 0.3rem;
    margin-bottom: 0;
  }

  &[data-size='S'] {
    & + & {
      border-top: solid 1px ${t=>t.theme.colors.neutral200};
    }
  }

  &[data-state='open'] {
    box-shadow: 0 0 0 1px ${t=>t.theme.colors.primary600};
  }

  &:not([data-disabled]):hover {
    box-shadow: 0 0 0 1px ${t=>t.theme.colors.primary600};
  }

  /* This applies our desired focus effect correctly. */
  &:focus-within {
    position: relative;
    z-index: 1;
    box-shadow: 0 0 0 1px ${t=>t.theme.colors.primary600};
  }

  @media (prefers-reduced-motion: no-preference) {
    transition: box-shadow ${t=>t.theme.motion.timings[120]}
      ${t=>t.theme.motion.easings.easeOutQuad};
  }
`,TZ=$.forwardRef(({caretPosition:t="left",description:e,icon:n,iconProps:r,children:i,...o},s)=>{const{size:a}=Gm("Trigger");return p.jsxs(d$,{$caretPosition:t,$size:a,ref:s,...o,children:[t==="left"?p.jsx(dh,{$size:a,children:p.jsx(Oi,{width:a==="S"?"1.2rem":"1.6rem",height:a==="S"?"1.2rem":"1.6rem"})}):null,p.jsxs(ue,{tag:"span",gap:2,overflow:"hidden",children:[n&&a==="S"?p.jsx(f$,{children:p.jsx(n,{...r})}):null,p.jsxs(ue,{alignItems:"flex-start",direction:"column",tag:"span",ref:s,overflow:"hidden",children:[p.jsx(ke,{fontWeight:a==="S"?"bold":void 0,ellipsis:!0,variant:a==="M"?"delta":void 0,textAlign:"left",width:"100%",children:i}),e&&a==="M"?p.jsx(ke,{textAlign:"left",children:e}):null]})]}),t==="right"?p.jsx(dh,{$size:a,children:p.jsx(Oi,{width:a==="S"?"1.2rem":"1.6rem",height:a==="S"?"1.2rem":"1.6rem"})}):null]})}),f$=k.styled(be)`
  color: ${t=>t.theme.colors.neutral500};
  display: flex;

  @media (prefers-reduced-motion: no-preference) {
    transition: ${t=>t.theme.transitions.color};
  }
`,dh=k.styled(ue).attrs(t=>({...t,tag:"span"}))`
  background-color: ${t=>t.theme.colors.neutral200};
  width: ${t=>t.$size==="S"?"2.4rem":"3.2rem"};
  height: ${t=>t.$size==="S"?"2.4rem":"3.2rem"};
  flex: ${t=>t.$size==="S"?"0 0 2.4rem":"0 0 3.2rem"};
  border-radius: 50%;
  justify-content: center;

  @media (prefers-reduced-motion: no-preference) {
    transition:
      transform ${t=>t.theme.motion.timings[200]} ${t=>t.theme.motion.easings.authenticMotion},
      ${t=>t.theme.transitions.backgroundColor};
  }
`,d$=k.styled(GI)`
  display: flex;
  align-items: center;
  justify-content: ${t=>t.$caretPosition==="left"?"flex-start":"space-between"};
  width: 100%;
  gap: ${t=>t.theme.spaces[4]};
  padding-inline: ${t=>t.$size==="S"?t.theme.spaces[4]:t.theme.spaces[6]};
  padding-block: ${t=>t.$size==="S"?t.theme.spaces[3]:t.theme.spaces[6]};
  cursor: pointer;
  color: ${t=>t.theme.colors.neutral800};
  overflow: hidden;

  &[data-disabled] {
    cursor: default;
    color: ${t=>t.theme.colors.neutral600};
  }

  &[data-state='open'] > ${dh} {
    transform: rotate(180deg);
  }

  /* we remove the default focus because the entire item should have the focus style and the default would be hidden. */
  &:focus-visible {
    outline: none;
  }

  @media (prefers-reduced-motion: no-preference) {
    transition: ${t=>t.theme.transitions.color};
  }
`,MZ=$.forwardRef((t,e)=>{const{size:n}=Gm("Trigger");return p.jsx(g$,{$size:n,...t,ref:e})}),g$=k.styled(ue).attrs(t=>({...t,tag:"span"}))`
  padding-inline: ${t=>t.$size==="S"?t.theme.spaces[2]:t.theme.spaces[6]};
  padding-block: ${t=>t.$size==="S"?t.theme.spaces[2]:t.theme.spaces[6]};

  // Remove default IconButton styles so there are no backgrounds or borders.
  & > button {
    border: none;
    background: none;
    color: ${t=>t.theme.colors.neutral600};

    @media (prefers-reduced-motion: no-preference) {
      transition: ${t=>t.theme.transitions.color};
    }
  }
`,EZ=$.forwardRef(({variant:t="primary",...e},n)=>p.jsx(OZ,{$variant:t,ref:n,...e})),OZ=k.styled(KI)`
  display: flex;
  align-items: center;
  background-color: ${t=>t.$variant==="primary"?t.theme.colors.neutral0:t.theme.colors.neutral100};

  &[data-disabled] {
    background-color: ${t=>t.theme.colors.neutral150};
  }

  &:not([data-disabled]) {
    &:hover,
    &[data-state='open'] {
      background-color: ${t=>t.theme.colors.primary100};

      & > ${d$} {
        color: ${t=>t.theme.colors.primary600};

        & ${f$} {
          color: ${t=>t.theme.colors.primary600};
        }

        & ${dh} {
          background-color: ${t=>t.theme.colors.primary200};
        }
      }

      & > ${g$} > button {
        color: ${t=>t.theme.colors.primary600};
      }
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    transition: ${t=>t.theme.transitions.backgroundColor};
  }
`,DZ=$.forwardRef((t,e)=>p.jsx(LZ,{ref:e,...t})),IZ=k.keyframes`
  from {
    height: 0;
  }
  to {
    height: var(--radix-accordion-content-height);
  }
`,_Z=k.keyframes`
  from {
    height: var(--radix-accordion-content-height);
  }
  to {
    height: 0;
  }
`,LZ=k.styled(YI)`
  overflow: hidden;

  @media (prefers-reduced-motion: no-preference) {
    &[data-state='open'] {
      animation: ${IZ} ${t=>t.theme.motion.timings[320]}
        ${t=>t.theme.motion.easings.authenticMotion};
    }

    &[data-state='closed'] {
      animation: ${_Z} ${t=>t.theme.motion.timings[320]}
        ${t=>t.theme.motion.easings.authenticMotion};
    }
  }
`,BZ=Object.freeze(Object.defineProperty({__proto__:null,Actions:MZ,Content:DZ,Header:EZ,Item:RZ,Root:SZ,Trigger:TZ},Symbol.toStringTag,{value:"Module"})),rf=k.css`
  position: relative;
  outline: none;

  &:after {
    transition-property: all;
    transition-duration: 0.2s;
    border-radius: 8px;
    content: '';
    position: absolute;
    top: -4px;
    bottom: -4px;
    left: -4px;
    right: -4px;
    border: 2px solid transparent;
  }

  &:focus-visible {
    outline: none;

    &:after {
      border-radius: 8px;
      content: '';
      position: absolute;
      top: -5px;
      bottom: -5px;
      left: -5px;
      right: -5px;
      border: 2px solid ${t=>t.theme.colors.primary600};
    }
  }
`,Io=({tag:t,...e})=>{const n=t||"span";return p.jsx(NZ,{...e,as:n})},NZ=k.styled.span`
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
`,Fs=({children:t,label:e})=>{const n=$.Children.only(t);return p.jsxs(p.Fragment,{children:[$.cloneElement(n,{"aria-hidden":"true",focusable:"false"}),p.jsx(Io,{children:e})]})};Fs.displayName="AccessibleIcon";const m$=t=>{switch(t){case"danger":return"danger100";case"success":return"success100";case"warning":return"warning100";default:return"primary100"}},jZ=t=>m$(t).replace("100","200"),ng=({theme:t,$variant:e})=>e==="danger"?t.colors.danger700:e==="success"?t.colors.success700:e==="warning"?t.colors.warning700:t.colors.primary700,FZ=k.styled(be)`
  ${rf};
`,VZ=k.styled(ue)`
  svg {
    height: 100%;
    width: 100%;

    path {
      fill: ${ng};
    }
  }
`,HZ=({variant:t,...e})=>t==="success"?p.jsx(N_,{...e}):t==="danger"||t==="warning"?p.jsx(j3,{...e}):p.jsx(pB,{...e}),PZ=k.styled(be)`
  & a > span {
    color: ${ng};
  }

  svg path {
    fill: ${ng};
  }
`,WZ=({title:t,children:e,variant:n="default",onClose:r,closeLabel:i,titleAs:o="p",action:s,...a})=>p.jsxs(ue,{alignItems:"flex-start",background:m$(n),borderColor:jZ(n),shadow:"filterShadow",gap:3,hasRadius:!0,padding:5,paddingRight:6,...a,children:[p.jsx(VZ,{height:"2rem",shrink:0,$variant:n,width:"2rem",children:p.jsx(HZ,{"aria-hidden":!0,variant:n})}),p.jsxs(ue,{alignItems:"start",gap:s?2:1,wrap:"wrap",role:n==="danger"?"alert":"status",width:"100%",children:[t&&p.jsx(ke,{fontWeight:"bold",textColor:"neutral800",tag:o,children:t}),p.jsx(ke,{tag:"p",textColor:"neutral800",children:e}),s&&p.jsx(PZ,{$variant:n,children:s})]}),p.jsx(FZ,{tag:"button",background:"transparent",borderColor:void 0,height:"1.6rem",width:"1.6rem",marginTop:1,onClick:r,color:"neutral700",children:p.jsx(Fs,{label:i,children:p.jsx(Vi,{})})})]});function yr({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=p$({defaultProp:e,onChange:n}),o=t!==void 0,s=o?t:r,a=yt(n),c=$.useCallback(h=>{if(o){const d=typeof h=="function"?h(t):h;d!==t&&a(d)}else i(h)},[o,t,i,a]);return[s,c]}function p$({defaultProp:t,onChange:e}){const n=$.useState(t),[r]=n,i=$.useRef(r),o=yt(e);return $.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const rg={easeInSine:"cubic-bezier(0.47, 0, 0.745, 0.715)",easeOutSine:"cubic-bezier(0.39, 0.575, 0.565, 1)",easeInOutSine:"cubic-bezier(0.39, 0.575, 0.565, 1)",easeInQuad:"cubic-bezier(0.55, 0.085, 0.68, 0.53)",easeOutQuad:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",easeInOutQuad:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",easeInCubic:"cubic-bezier(0.55, 0.055, 0.675, 0.19)",easeOutCubic:"cubic-bezier(0.215, 0.61, 0.355, 1)",easeInOutCubic:"cubic-bezier(0.215, 0.61, 0.355, 1)",easeInQuart:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",easeOutQuart:"cubic-bezier(0.165, 0.84, 0.44, 1)",easeInOutQuart:"cubic-bezier(0.165, 0.84, 0.44, 1)",easeInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",easeOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",easeInOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",easeInExpo:"cubic-bezier(0.95, 0.05, 0.795, 0.035)",easeOutExpo:"cubic-bezier(0.19, 1, 0.22, 1)",easeInOutExpo:"cubic-bezier(0.19, 1, 0.22, 1)",easeInCirc:"cubic-bezier(0.6, 0.04, 0.98, 0.335)",easeOutCirc:"cubic-bezier(0.075, 0.82, 0.165, 1)",easeInOutCirc:"cubic-bezier(0.075, 0.82, 0.165, 1)",easeInBack:"cubic-bezier(0.6, -0.28, 0.735, 0.045)",easeOutBack:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",easeInOutBack:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",easeInOutFast:"cubic-bezier(1,0,0,1)",authenticMotion:"cubic-bezier(.4,0,.2,1)"},ig={320:"320ms",200:"200ms",120:"120ms"},zZ={color:`color ${ig[120]} ${rg.easeOutQuad}`,backgroundColor:`background-color ${ig[120]} ${rg.easeOutQuad}`},pt={overlayFadeIn:k.keyframes`
    from {
      opacity: 0;
    }
    to {
      opacity: 0.2;
    }
  `,modalPopIn:k.keyframes`
    from {
      transform:translate(-50%, -50%)  scale(0.8);
      opacity: 0;
    }
    to {
      transform: translate(-50%, -50%) scale(1);
      opacity: 1;
    }
  `,modalPopOut:k.keyframes`
    from {
      transform: translate(-50%, -50%) scale(1);
      opacity: 1;
    }
    to {
      transform:translate(-50%, -50%)  scale(0.8);
      opacity: 0;
    }
  `,popIn:k.keyframes`
    from {
      transform: scale(0.8);
      opacity: 0;
    }
    to {
      transform: scale(1);
      opacity: 1;
    }
  `,popOut:k.keyframes`
    from {
      transform: scale(1);
      opacity: 1;
    }
    to {
      transform: scale(0.8);
      opacity: 0;
    }
  `,slideDownIn:k.keyframes`
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  `,slideDownOut:k.keyframes`
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(-10px);
    }
  `,slideUpIn:k.keyframes`
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  `,slideUpOut:k.keyframes`
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(10px);
    }
  `,fadeIn:k.keyframes`
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  `,fadeOut:k.keyframes`
    from {
      opacity: 1;
    }
    to {
      opacity: 0;
    }
  `},sl=32,Mw=2,UZ=$.forwardRef(({onLoadingStatusChange:t,delayMs:e=600,src:n,alt:r,fallback:i,preview:o=!1,...s},a)=>{const[c,h]=yr({onChange:t}),[f,d]=$.useState(!1),g=o&&c==="loaded",v=x=>{g&&d(x)};return p.jsxs(Nx,{onOpenChange:v,children:[p.jsx(jx,{asChild:!0,children:p.jsxs(og,{ref:a,...s,children:[g?p.jsx(qZ,{width:"100%",height:"100%",position:"absolute",background:"neutral0",zIndex:"overlay",style:{opacity:f?.4:0}}):null,p.jsx(KZ,{src:n,alt:r,onLoadingStatusChange:h}),p.jsx(Ij,{delayMs:e,children:p.jsx(ke,{fontWeight:"bold",textTransform:"uppercase",children:i})})]})}),g?p.jsx(Fx,{children:p.jsx(GZ,{side:"top",sideOffset:4,children:p.jsx(YZ,{src:n,alt:r})})}):null]})}),v$=k.css`
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  overflow: hidden;
  user-select: none;
  overflow: hidden;
  border-radius: 50%;
`,b$=k.css`
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
`,og=k.styled(Oj)`
  position: relative;
  z-index: 0;
  ${v$}
  width: ${sl/10}rem;
  height: ${sl/10}rem;
  /* TODO: we should get the user email & hash it to turn it into a hex-value so different emails can consistently get a different background */
  background-color: ${t=>t.theme.colors.primary600};
  color: ${t=>t.theme.colors.neutral0};
`,qZ=k.styled(be)`
  @media (prefers-reduced-motion: no-preference) {
    transition: opacity ${t=>t.theme.motion.timings[200]}
      ${t=>t.theme.motion.easings.authenticMotion};
  }
`,KZ=k.styled(Dj)`
  ${b$}
`,GZ=k.styled(Vx)`
  ${v$}
  width: ${sl*Mw/10}rem;
  height: ${sl*Mw/10}rem;

  @media (prefers-reduced-motion: no-preference) {
    animation: ${pt.fadeIn} ${t=>t.theme.motion.timings[200]}
      ${t=>t.theme.motion.easings.authenticMotion};
  }
`,YZ=k.styled.img`
  ${b$}
`,XZ=$.forwardRef((t,e)=>p.jsx(ZZ,{...t,ref:e,tag:"div"})),ZZ=k.styled(ue)`
  & > ${og} + ${og} {
    margin-left: -${sl/10/2}rem;
  }
`,QZ=Object.freeze(Object.defineProperty({__proto__:null,Group:XZ,Item:UZ},Symbol.toStringTag,{value:"Module"})),Ym=({active:t=!1,size:e="M",textColor:n="neutral600",backgroundColor:r="neutral150",children:i,minWidth:o=5,...s})=>{const a=e==="S"?1:2;return p.jsx(JZ,{inline:!0,alignItems:"center",justifyContent:"center",minWidth:o,paddingLeft:a,paddingRight:a,background:t?"primary200":r,$size:e,...s,children:p.jsx(ke,{variant:"sigma",textColor:t?"primary600":n,lineHeight:"1rem",children:i})})},JZ=k.styled(ue)`
  border-radius: ${({theme:t,$size:e})=>e==="S"?"2px":t.borderRadius};
  ${({$size:t,theme:e})=>t==="S"?k.css`
        padding-block: 0.3rem;
        padding-inline ${e.spaces[1]}
      `:k.css`
      padding-block: 0.7rem;
      padding-inline ${e.spaces[2]}
    `};
`,kl=nn(({href:t,disabled:e=!1,isExternal:n=!1,...r},i)=>p.jsx(eQ,{tag:"a",ref:i,target:n?"_blank":void 0,rel:n?"noreferrer noopener":void 0,href:t,tabIndex:e?-1:void 0,"aria-disabled":e,pointerEvents:e?"none":void 0,cursor:e?void 0:"pointer",...r})),eQ=k.styled(be)`
  text-decoration: none;

  &:visited {
    color: inherit;
  }
`,w$=()=>p.jsx(be,{"aria-hidden":!0,paddingLeft:1,paddingRight:1,children:p.jsx(ke,{variant:"pi",textColor:"neutral500",children:"/"})});w$.displayName="Divider";const tQ=k.styled(ue)`
  // CrumbLinks do have padding-x, because they need to have a
  // interaction effect, which mis-aligns the breadcrumbs on the left.
  // This normalizes the behavior by moving the first item to left by
  // the same amount it has inner padding
  & > *:first-child {
    margin-left: ${({theme:t})=>`calc(-1*${t.spaces[2]})`};
  }
`,nQ=$.forwardRef(({label:t,children:e,...n},r)=>{const i=$.Children.toArray(e);return p.jsx(be,{"aria-label":t,tag:"nav",...n,ref:r,children:p.jsx(tQ,{tag:"ol",children:$.Children.map(i,(o,s)=>{const a=i.length>1&&s+1<i.length;return p.jsxs(ue,{inline:!0,tag:"li",children:[o,a&&p.jsx(w$,{})]})})})})});nQ.displayName="Breadcrumbs";const rQ=$.forwardRef(({children:t,isCurrent:e=!1,...n},r)=>p.jsx(be,{paddingLeft:2,paddingRight:2,paddingTop:1,paddingBottom:1,ref:r,children:p.jsx(ke,{variant:"pi",textColor:"neutral800",fontWeight:e?"bold":"regular","aria-current":e,...n,children:t})}));rQ.displayName="Crumb";const iQ=k.styled(kl)`
  border-radius: ${({theme:t})=>t.borderRadius};
  color: ${({theme:t})=>t.colors.neutral600};
  font-size: ${({theme:t})=>t.fontSizes[1]};
  line-height: ${({theme:t})=>t.lineHeights[4]};
  padding: ${({theme:t})=>`${t.spaces[1]} ${t.spaces[2]}`};
  text-decoration: none;

  :hover,
  :focus {
    background-color: ${({theme:t})=>t.colors.neutral200};
    color: ${({theme:t})=>t.colors.neutral700};
  }
`,oQ=$.forwardRef(({children:t,...e},n)=>p.jsx(iQ,{ref:n,...e,children:t}));oQ.displayName="CrumbLink";const Vs=t=>t.replaceAll(":","");function sQ(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function x$(...t){return e=>t.forEach(n=>sQ(n,e))}function gn(...t){return $.useCallback(x$(...t),t)}const aQ=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),So=aQ()?b.useEffect:b.useLayoutEffect,lQ=$.useId||(()=>{});let cQ=0;const Tn=t=>{const[e,n]=$.useState(lQ());return So(()=>{t||n(r=>r??String(cQ++))},[t]),t?.toString()??(e||"")},Tl=(t,e,{selectorToWatch:n,skipWhen:r=!1})=>{const i=_g(e);$.useEffect(()=>{if(r||!t.current)return;const o={root:t.current,rootMargin:"0px"},s=h=>{h.forEach(f=>{f.isIntersecting&&t.current&&t.current.scrollHeight>t.current.clientHeight&&i(f)})},a=new IntersectionObserver(s,o),c=t.current.querySelector(n);return c&&a.observe(c),()=>{a.disconnect()}},[r,i,n,t])},Xm="success-light",Zm="danger-light",of="default",Ml="tertiary",El="secondary",y$="danger",C$="success",sf="ghost",Qm=[Xm,Zm],uQ=[of,Ml,El,y$,C$,sf,...Qm],hQ=["XS","S","M","L"],Kn=t=>t===Xm||t===Zm?`${t.substring(0,t.lastIndexOf("-"))}`:t===Ml?"neutral":t===of||t===El||uQ.every(e=>e!==t)?"primary":`${t}`,$$=({theme:t})=>k.css`
    border: 1px solid ${t.colors.neutral200};
    background: ${t.colors.neutral150};
    color: ${t.colors.neutral600};
    cursor: default;
  `,S$=({theme:t,$variant:e})=>[...Qm,El].includes(e)?k.css`
      background-color: ${t.colors.neutral0};
    `:e===Ml?k.css`
      background-color: ${t.colors.neutral100};
    `:e===sf?k.css`
      background-color: ${t.colors.neutral100};
    `:e===of?k.css`
      border: 1px solid ${t.colors.buttonPrimary500};
      background: ${t.colors.buttonPrimary500};
    `:k.css`
    border: 1px solid ${t.colors[`${Kn(e)}500`]};
    background: ${t.colors[`${Kn(e)}500`]};
  `,A$=({theme:t,$variant:e})=>[...Qm,El].includes(e)?k.css`
      background-color: ${t.colors.neutral0};
      border: 1px solid ${t.colors[`${Kn(e)}600`]};
      color: ${t.colors[`${Kn(e)}600`]};
    `:e===Ml||e===sf?k.css`
      background-color: ${t.colors.neutral150};
    `:k.css`
    border: 1px solid ${t.colors[`${Kn(e)}600`]};
    background: ${t.colors[`${Kn(e)}600`]};
  `,R$=({theme:t,$variant:e})=>{switch(e){case Zm:case Xm:case El:return k.css`
        border: 1px solid ${t.colors[`${Kn(e)}200`]};
        background: ${t.colors[`${Kn(e)}100`]};
        color: ${t.colors[`${Kn(e)}700`]};
      `;case Ml:return k.css`
        border: 1px solid ${t.colors.neutral200};
        background: ${t.colors.neutral0};
        color: ${t.colors.neutral800};
      `;case sf:return k.css`
        border: 1px solid transparent;
        background: transparent;
        color: ${t.colors.neutral800};

        svg {
          fill: ${t.colors.neutral500};
        }
      `;case C$:case y$:return k.css`
        border: 1px solid ${t.colors[`${Kn(e)}600`]};
        background: ${t.colors[`${Kn(e)}600`]};
        color: ${t.colors.neutral0};
      `;default:return k.css`
        border: 1px solid ${t.colors.buttonPrimary600};
        background: ${t.colors.buttonPrimary600};
        color: ${t.colors.buttonNeutral0};
      `}},gh=nn(({variant:t=of,startIcon:e,endIcon:n,disabled:r=!1,children:i,onClick:o,size:s=hQ[1],loading:a=!1,fullWidth:c=!1,...h},f)=>{const d=r||a,g=v=>{!d&&o&&o(v)};return p.jsxs(gQ,{ref:f,"aria-disabled":d,disabled:d,$size:s,$variant:t,tag:"button",onClick:g,hasRadius:!0,gap:2,inline:!0,alignItems:"center",justifyContent:"center",width:c?"100%":void 0,paddingLeft:4,paddingRight:4,cursor:"pointer",...h,children:[(e||a)&&p.jsx(ue,{tag:"span","aria-hidden":!0,children:a?p.jsx(dQ,{}):e}),p.jsx(ke,{variant:s==="S"?"pi":void 0,fontWeight:"bold",children:i}),n&&p.jsx(ue,{tag:"span","aria-hidden":!0,children:n})]})}),fQ=k.keyframes`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(359deg);
  }
`,dQ=k.styled(B3)`
  animation: ${fQ} 2s infinite linear;
  will-change: transform;
`,gQ=k.styled(ue)`
  height: ${({theme:t,$size:e})=>t.sizes.button[e]};
  text-decoration: none;
  ${R$}

  &:hover {
    ${S$}
  }

  &:active {
    ${A$}
  }

  &[aria-disabled='true'] {
    ${$$}
  }

  @media (prefers-reduced-motion: no-preference) {
    transition:
      ${t=>t.theme.transitions.backgroundColor},
      ${t=>t.theme.transitions.color},
      border-color ${t=>t.theme.motion.timings[200]} ${t=>t.theme.motion.easings.easeOutQuad};
  }
`,Jm=$.forwardRef(({children:t,description:e,label:n,defaultOpen:r,open:i,onOpenChange:o,delayDuration:s=500,disableHoverableContent:a,...c},h)=>!n&&!e?t:p.jsxs(Nx,{defaultOpen:r,open:i,onOpenChange:o,delayDuration:s,disableHoverableContent:a,children:[p.jsx(jx,{asChild:!0,children:t}),p.jsx(Fx,{children:p.jsx(mQ,{ref:h,sideOffset:8,...c,children:p.jsx(ke,{variant:"pi",fontWeight:"bold",children:n||e})})})]})),mQ=k.styled(Vx)`
  background-color: ${t=>t.theme.colors.neutral900};
  color: ${t=>t.theme.colors.neutral0};
  padding-inline: ${t=>t.theme.spaces[2]};
  padding-block: ${t=>t.theme.spaces[2]};
  border-radius: ${t=>t.theme.borderRadius};
  z-index: ${t=>t.theme.zIndices.tooltip};
  will-change: opacity;
  transform-origin: var(--radix-tooltip-content-transform-origin);

  @media (prefers-reduced-motion: no-preference) {
    animation: ${pt.fadeIn} ${t=>t.theme.motion.timings[200]}
      ${t=>t.theme.motion.easings.authenticMotion};
  }
`,ni=nn(({label:t,background:e,children:n,disabled:r=!1,onClick:i,size:o="S",variant:s="tertiary",withTooltip:a=!0,...c},h)=>{const f=g=>{!r&&i&&i(g)},d=p.jsx(Ea,{"aria-disabled":r,background:r?"neutral150":e,tag:"button",display:"inline-flex",justifyContent:"center",hasRadius:!0,cursor:"pointer",...c,ref:h,$size:o,onClick:f,$variant:s,children:p.jsx(Fs,{label:t,children:n})});return a?p.jsx(Jm,{label:t,children:d}):d}),Ea=k.styled(ue)`
  text-decoration: none;

  ${t=>{switch(t.$size){case"XS":return k.css`
          padding-block: 0.2rem;
          padding-inline: 0.2rem;
        `;case"S":return k.css`
          padding-block: 0.7rem;
          padding-inline: 0.7rem;
        `;case"M":return k.css`
          padding-block: 0.9rem;
          padding-inline: 0.9rem;
        `;case"L":return k.css`
          padding-block: 1.1rem;
          padding-inline: 1.1rem;
        `}}}
  ${R$}
  ${t=>t.$variant==="tertiary"?k.css`
          color: ${t.theme.colors.neutral500};
        `:""}

  &:hover {
    ${S$}
    ${t=>t.$variant==="tertiary"?k.css`
            color: ${t.theme.colors.neutral600};
          `:""}
  }

  &:active {
    ${A$}
  }

  &[aria-disabled='true'] {
    ${$$}
  }

  @media (prefers-reduced-motion: no-preference) {
    transition:
      ${t=>t.theme.transitions.backgroundColor},
      ${t=>t.theme.transitions.color},
      border-color ${t=>t.theme.motion.timings[200]} ${t=>t.theme.motion.easings.easeOutQuad};
  }
`,pQ=k.styled(ue)`
  & ${Ea}:first-child {
    border-radius: ${({theme:t})=>`${t.borderRadius} 0 0 ${t.borderRadius}`};
  }

  & ${Ea}:last-child {
    border-radius: ${({theme:t})=>`0 ${t.borderRadius} ${t.borderRadius} 0`};
  }

  & ${Ea} {
    border-radius: 0;

    & + ${Ea} {
      border-left: none;
    }
  }
`,k$=nn(({children:t,href:e,disabled:n=!1,startIcon:r,endIcon:i,isExternal:o=!1,...s},a)=>p.jsxs(vQ,{ref:a,href:e,disabled:n,isExternal:o,...s,children:[r,p.jsx(ke,{textColor:n?"neutral600":"primary600",children:t}),i,e&&!i&&o&&p.jsx(OL,{})]})),vQ=k.styled(kl)`
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  gap: ${({theme:t})=>t.spaces[2]};
  pointer-events: ${({disabled:t})=>t?"none":void 0};

  svg {
    font-size: 1rem;

    path {
      fill: ${({disabled:t,theme:e})=>t?e.colors.neutral600:e.colors.primary600};
    }
  }

  &:hover {
    & > span {
      color: ${({theme:t})=>t.colors.primary500};
    }

    svg path {
      fill: ${({theme:t})=>t.colors.primary500};
    }
  }

  &:active {
    color: ${({theme:t})=>t.colors.primary700};
  }

  ${rf};
`,bQ=t=>{switch(t){case"danger":return"danger100";default:return"primary100"}},Ew=(t,e)=>{switch(t){case"danger":return e?"danger500":"danger700";default:return e?"neutral500":"neutral800"}},Ow=(t,e)=>{switch(t){case"danger":return e?"danger500":"danger700";default:return e?"neutral300":"neutral500"}},wQ=sV,xQ=$.forwardRef(({label:t,endIcon:e=p.jsx(Oi,{width:"1.2rem",height:"1.2rem","aria-hidden":!0}),tag:n=gh,icon:r,...i},o)=>{const s={...i,ref:o,type:"button"};return p.jsx(aV,{asChild:!0,disabled:s.disabled,children:n===ni?p.jsx(ni,{label:t,variant:"tertiary",...s,children:r}):p.jsx(gh,{endIcon:e,variant:"ghost",...s})})}),yQ=$.forwardRef(({children:t,intersectionId:e,onCloseAutoFocus:n,popoverPlacement:r="bottom-start",...i},o)=>{const[s,a]=r.split("-");return p.jsx(sy,{children:p.jsx(CQ,{align:a,side:s,loop:!0,onCloseAutoFocus:n,asChild:!0,children:p.jsxs(T$,{ref:o,direction:"column",borderColor:"neutral150",hasRadius:!0,background:"neutral0",shadow:"filterShadow",maxHeight:"15rem",padding:1,marginTop:1,marginBottom:1,alignItems:"flex-start",position:"relative",overflow:"auto",...i,children:[t,p.jsx(be,{id:e,width:"100%",height:"1px"})]})})})}),T$=k.styled(ue)`
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  z-index: ${t=>t.theme.zIndices.popover};

  &::-webkit-scrollbar {
    display: none;
  }
`,CQ=k.styled(lV)`
  @media (prefers-reduced-motion: no-preference) {
    animation-duration: ${t=>t.theme.motion.timings[200]};

    &[data-state='open'] {
      animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};

      &[data-side='top'] {
        animation-name: ${pt.slideUpIn};
      }

      &[data-side='bottom'] {
        animation-name: ${pt.slideDownIn};
      }
    }
  }
`,$Q=({onSelect:t,disabled:e=!1,isLink:n,startIcon:r,endIcon:i,isExternal:o,variant:s="default",...a})=>p.jsx(uV,{asChild:!0,onSelect:t,disabled:e,children:n||o?p.jsx(SQ,{color:Ew(s,e),startIcon:r,endIcon:i,...a,isExternal:o??!1,$variant:s,children:a.children}):p.jsxs(E$,{cursor:"pointer",color:Ew(s,e),background:"transparent",borderStyle:"none",gap:2,$variant:s,...a,children:[r&&p.jsx(ue,{tag:"span",color:Ow(s,e),"aria-hidden":!0,children:r}),p.jsx(ke,{grow:1,children:a.children}),i&&p.jsx(ue,{tag:"span",color:Ow(s,e),"aria-hidden":!0,children:i})]})}),M$=({theme:t,$variant:e})=>k.css`
  text-align: left;
  width: 100%;
  border-radius: ${t.borderRadius};
  padding: ${t.spaces[2]} ${t.spaces[4]};

  &[aria-disabled='true'] {
    cursor: not-allowed;
  }

  &[data-highlighted] {
    background-color: ${t.colors[bQ(e)]};
  }

  &:focus-visible {
    outline: none;

    &:after {
      content: none;
    }
  }
`,E$=k.styled(ue)`
  ${({theme:t,$variant:e})=>M$({theme:t,$variant:e})}
`,SQ=k.styled(k$)`
  /* We include this here again because typically when people use OptionLink they provide an as prop which cancels the Box props */
  color: ${({theme:t,color:e})=>Ru(t.colors,e,void 0)};
  text-decoration: none;

  &:hover {
    color: unset;
  }

  /* TODO: do we need this? */
  svg > path,
  &:focus-visible svg > path {
    fill: currentColor;
  }

  ${({theme:t,$variant:e})=>M$({theme:t,$variant:e})}
`,AQ=k.styled(be)`
  /* Negative horizontal margin to compensate Menu.Content's padding */
  margin: ${({theme:t})=>t.spaces[1]} -${({theme:t})=>t.spaces[1]};
  width: calc(100% + ${({theme:t})=>t.spaces[2]});
  /* Hide separator if there's nothing above in the menu */
  &:first-child {
    display: none;
  }
`;$.forwardRef((t,e)=>p.jsx(hV,{...t,asChild:!0,children:p.jsx(AQ,{height:"1px",shrink:0,background:"neutral150",ref:e})}));$.forwardRef((t,e)=>p.jsx(cV,{asChild:!0,children:p.jsx(RQ,{ref:e,variant:"sigma",textColor:"neutral600",...t})}));const RQ=k.styled(ke)`
  padding: ${({theme:t})=>t.spaces[2]} ${({theme:t})=>t.spaces[4]};
`;$.forwardRef(({disabled:t=!1,...e},n)=>p.jsx(fV,{asChild:!0,disabled:t,children:p.jsxs(kQ,{ref:n,color:"neutral800",tag:"button",type:"button",background:"transparent",borderStyle:"none",gap:5,...e,children:[p.jsx(ke,{children:e.children}),p.jsx(im,{fill:"neutral500",height:"1.2rem",width:"1.2rem"})]})}));const kQ=k.styled(E$)`
  &[data-state='open'] {
    background-color: ${({theme:t})=>t.colors.primary100};
  }
`;$.forwardRef((t,e)=>p.jsx(sy,{children:p.jsx(dV,{sideOffset:8,asChild:!0,children:p.jsx(T$,{ref:e,direction:"column",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral150",hasRadius:!0,background:"neutral0",shadow:"filterShadow",maxHeight:"15rem",padding:1,alignItems:"flex-start",overflow:"auto",...t})})}));const TQ=wQ,MQ=xQ,EQ=yQ,OQ=$Q,O$=$.forwardRef(({children:t,onOpen:e,onClose:n,popoverPlacement:r,onReachEnd:i,...o},s)=>{const a=$.useRef(null),c=gn(s,a),h=$.useRef(null),[f,d]=$.useState(!1),g=C=>{i&&i(C)},v=C=>{C&&typeof e=="function"?e():!C&&typeof n=="function"&&n(),d(C)},x=Tn(),w=`intersection-${Vs(x)}`;return Tl(h,g,{selectorToWatch:`#${w}`,skipWhen:!f}),p.jsxs(TQ,{onOpenChange:v,children:[p.jsx(MQ,{ref:c,...o,children:o.label}),p.jsx(EQ,{ref:h,intersectionId:w,popoverPlacement:r,children:t})]})}),DQ=OQ,IQ=k.styled(O$)`
  padding: ${({theme:t})=>`${t.spaces[1]} ${t.spaces[2]}`};
  height: unset;

  :hover,
  :focus {
    background-color: ${({theme:t})=>t.colors.neutral200};
  }
`,_Q=$.forwardRef(({children:t,...e},n)=>p.jsx(IQ,{ref:n,endIcon:null,size:"S",...e,children:t}));_Q.displayName="CrumbSimpleMenu";const D$=$.createContext({id:""}),LQ=()=>$.useContext(D$);$.forwardRef(({id:t,...e},n)=>{const r=Tn(t),i=$.useMemo(()=>({id:r}),[r]);return p.jsx(D$.Provider,{value:i,children:p.jsx(be,{ref:n,id:t,tabIndex:0,hasRadius:!0,background:"neutral0",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral150",shadow:"tableShadow",tag:"article","aria-labelledby":`${r}-title`,...e})})});const BQ=$.forwardRef(({position:t,...e},n)=>p.jsx(NQ,{ref:n,$position:t,...e,direction:"row",gap:2})),NQ=k.styled(ue)`
  position: absolute;
  top: ${({theme:t})=>t.spaces[3]};
  right: ${({$position:t,theme:e})=>{if(t==="end")return e.spaces[3]}};
  left: ${({$position:t,theme:e})=>{if(t==="start")return e.spaces[3]}};
`;k.styled.img`
  // inline flows is based on typography and displays an extra white space below the image
  // switch to block is required in order to make the img stick the bottom of the container
  // addition infos: https://stackoverflow.com/questions/5804256/image-inside-div-has-extra-space-below-the-image
  margin: 0;
  padding: 0;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
`;k.styled.div`
  display: flex;
  justify-content: center;
  height: ${({$size:t})=>t==="S"?"8.8rem":"16.4rem"};
  width: 100%;
  background: repeating-conic-gradient(${({theme:t})=>t.colors.neutral100} 0% 25%, transparent 0% 50%) 50% / 20px
    20px;
  border-top-left-radius: ${({theme:t})=>t.borderRadius};
  border-top-right-radius: ${({theme:t})=>t.borderRadius};
`;k.styled.div`
  margin-left: auto;
  flex-shrink: 0;
`;k.styled(Ym)`
  margin-left: ${({theme:t})=>t.spaces[1]};
`;const jQ=({fill:t,...e})=>{const{colors:n}=k.useTheme();return p.jsx(be,{tag:"svg",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:t?n[t]:void 0,...e,children:p.jsx("path",{d:"M29.0613 10.0613L13.0613 26.0613C12.9219 26.2011 12.7563 26.3121 12.574 26.3878C12.3917 26.4635 12.1962 26.5024 11.9988 26.5024C11.8013 26.5024 11.6059 26.4635 11.4235 26.3878C11.2412 26.3121 11.0756 26.2011 10.9363 26.0613L3.93626 19.0613C3.79673 18.9217 3.68605 18.7561 3.61053 18.5738C3.53502 18.3915 3.49615 18.1961 3.49615 17.9988C3.49615 17.8014 3.53502 17.606 3.61053 17.4237C3.68605 17.2414 3.79673 17.0758 3.93626 16.9363C4.07579 16.7967 4.24143 16.686 4.42374 16.6105C4.60604 16.535 4.80143 16.4962 4.99876 16.4962C5.19608 16.4962 5.39147 16.535 5.57378 16.6105C5.75608 16.686 5.92173 16.7967 6.06126 16.9363L12 22.875L26.9388 7.93876C27.2205 7.65697 27.6027 7.49866 28.0013 7.49866C28.3998 7.49866 28.782 7.65697 29.0638 7.93876C29.3455 8.22055 29.5039 8.60274 29.5039 9.00126C29.5039 9.39977 29.3455 9.78197 29.0638 10.0638L29.0613 10.0613Z"})})},Dw=$.forwardRef(({defaultChecked:t,checked:e,onCheckedChange:n,...r},i)=>{const o=$.useRef(null),[s,a]=yr({defaultProp:t,prop:e,onChange:n}),c=gn(o,i);return p.jsx(FQ,{ref:c,checked:s,onCheckedChange:a,...r,children:p.jsxs(VQ,{forceMount:!0,children:[s===!0?p.jsx(jQ,{width:"1.6rem",fill:"neutral0"}):null,s==="indeterminate"?p.jsx(PB,{fill:"neutral0"}):null]})})}),FQ=k.styled(yV)`
  background: ${t=>t.theme.colors.neutral0};
  width: 2rem;
  height: 2rem;
  border-radius: ${t=>t.theme.borderRadius};
  border: 1px solid ${t=>t.theme.colors.neutral300};
  position: relative;
  z-index: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  // this ensures the checkbox is always a square even in flex-containers.
  flex: 0 0 2rem;

  &[data-state='checked']:not([data-disabled]),
  &[data-state='indeterminate']:not([data-disabled]) {
    border: 1px solid ${t=>t.theme.colors.primary600};
    background-color: ${t=>t.theme.colors.primary600};
  }

  &[data-disabled] {
    background-color: ${t=>t.theme.colors.neutral200};
  }

  /* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */
  &::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: -1;
    min-width: 44px;
    min-height: 44px;
  }
`,VQ=k.styled(CV)`
  display: inline-flex;
  pointer-events: auto !important;
  width: 100%;
  height: 100%;
  cursor: pointer;
  justify-content: center;
  align-items: center;

  &[data-disabled] {
    cursor: not-allowed;
  }
`,af=$.forwardRef(({children:t,...e},n)=>{const r=Tn(e.id);return t?p.jsxs(ue,{gap:2,children:[p.jsx(Dw,{id:r,...e}),p.jsx(ke,{tag:"label",textColor:"neutral800",htmlFor:r,children:t})]}):p.jsx(Dw,{ref:n,...e})});$.forwardRef((t,e)=>{const{id:n}=LQ();return p.jsx(BQ,{position:"start",children:p.jsx(af,{"aria-labelledby":`${n}-title`,...t,ref:e})})});k.styled(be)`
  word-break: break-all;
`;k.styled(ue)`
  border-bottom: 1px solid ${({theme:t})=>t.colors.neutral150};
`;const At={DOWN:"ArrowDown",UP:"ArrowUp",RIGHT:"ArrowRight",LEFT:"ArrowLeft",ESCAPE:"Escape",ENTER:"Enter",TAB:"Tab",END:"End",HOME:"Home",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown"},HQ=k.styled(be)`
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'startAction slides endAction';
`,PQ=k.styled(ue)`
  grid-area: slides;
`,Iw=k.styled(be)`
  grid-area: ${({$area:t})=>t};

  &:focus svg path,
  &:hover svg path {
    fill: ${({theme:t})=>t.colors.neutral900};
  }
`,WQ=$.forwardRef(({actions:t,children:e,label:n,nextLabel:r,onNext:i,onPrevious:o,previousLabel:s,secondaryLabel:a,selectedSlide:c,...h},f)=>{const d=$.useRef(null),g=$.useRef(null),v=$.Children.map(e,(w,C)=>$.cloneElement(w,{selected:C===c})),x=w=>{switch(w.key){case At.RIGHT:{w.preventDefault(),g?.current&&g.current.focus(),i&&i();break}case At.LEFT:{w.preventDefault(),d?.current&&d.current.focus(),o&&o();break}}};return p.jsx(be,{ref:f,...h,onKeyDown:x,children:p.jsxs(be,{padding:2,borderColor:"neutral200",hasRadius:!0,background:"neutral100",children:[p.jsxs(HQ,{tag:"section","aria-roledescription":"carousel","aria-label":n,display:"grid",position:"relative",children:[v&&v.length>1&&p.jsxs(p.Fragment,{children:[p.jsx(Iw,{tag:"button",onClick:o,$area:"startAction",ref:d,type:"button",children:p.jsx(Fs,{label:s,children:p.jsx(L3,{width:"1.6rem",height:"1.6rem",fill:"neutral600"})})}),p.jsx(Iw,{tag:"button",onClick:i,$area:"endAction",ref:g,type:"button",children:p.jsx(Fs,{label:r,children:p.jsx(im,{width:"1.6rem",height:"1.6rem",fill:"neutral600"})})})]}),p.jsx(PQ,{"aria-live":"polite",paddingLeft:2,paddingRight:2,width:"100%",overflow:"hidden",children:v}),t]}),a&&p.jsx(be,{paddingTop:2,paddingLeft:4,paddingRight:4,children:p.jsx(Jm,{label:a,children:p.jsx(ue,{justifyContent:"center",children:p.jsx(ke,{variant:"pi",textColor:"neutral600",ellipsis:!0,children:a})})})})]})})}),zQ={accordions:{S:"4.8rem",M:"8.8rem"},button:{S:"3.2rem",M:"3.6rem",L:"4rem"}},I$={sizes:zQ,zIndices:{navigation:100,overlay:300,modal:310,dialog:320,popover:500,notification:700,tooltip:1e3},spaces:["0px","4px","8px","12px","16px","20px","24px","32px","40px","48px","56px","64px"],borderRadius:"4px",breakpoints:{initial:"@media(min-width: 0px)",small:"@media(min-width: 520px)",medium:"@media(min-width: 768px)",large:"@media(min-width: 1080px)"},fontSizes:["1.1rem","1.2rem","1.4rem","1.6rem","1.8rem","3.2rem"],lineHeights:[1.14,1.22,1.25,1.33,1.43,1.45,1.5],fontWeights:{regular:400,semiBold:500,bold:600},transitions:zZ,motion:{easings:rg,timings:ig}},UQ={color:{alternative100:"#f6ecfc",alternative200:"#e0c1f4",alternative500:"#ac73e6",alternative600:"#9736e8",alternative700:"#8312d1",buttonNeutral0:"#ffffff",buttonPrimary500:"#7b79ff",buttonPrimary600:"#4945ff",danger100:"#fcecea",danger200:"#f5c0b8",danger500:"#ee5e52",danger600:"#d02b20",danger700:"#b72b1a",neutral0:"#ffffff",neutral100:"#f6f6f9",neutral1000:"#181826",neutral150:"#eaeaef",neutral200:"#dcdce4",neutral300:"#c0c0cf",neutral400:"#a5a5ba",neutral500:"#8e8ea9",neutral600:"#666687",neutral700:"#4a4a6a",neutral800:"#32324d",neutral900:"#212134",primary100:"#f0f0ff",primary200:"#d9d8ff",primary500:"#7b79ff",primary600:"#4945ff",primary700:"#271fe0",secondary100:"#eaf5ff",secondary200:"#b8e1ff",secondary500:"#66b7f1",secondary600:"#0c75af",secondary700:"#006096",success100:"#eafbe7",success200:"#c6f0c2",success500:"#5cb176",success600:"#328048",success700:"#2f6846",warning100:"#fdf4dc",warning200:"#fae7b9",warning500:"#f29d41",warning600:"#d9822f",warning700:"#be5d01"}},qQ={shadow:{filterShadow:"0px 1px 4px rgba(33, 33, 52, 0.1)",focus:"inset 2px 0px 0px rgb(39, 31, 224), inset 0px 2px 0px rgb(39, 31, 224), inset -2px 0px 0px rgb(39, 31, 224), inset 0px -2px 0px rgb(39, 31, 224)",focusShadow:"0px 0px 6px rgba(76, 191, 255, 0.75)",popupShadow:"0px 2px 15px rgba(33, 33, 52, 0.1)",tableShadow:"0px 1px 4px rgba(33, 33, 52, 0.1)"}},_$={colors:UQ.color,shadows:qQ.shadow,...I$},KQ={color:{alternative100:"#181826",alternative200:"#4a4a6a",alternative500:"#ac73e6",alternative600:"#ac73e6",alternative700:"#e0c1f4",buttonNeutral0:"#ffffff",buttonPrimary500:"#7b79ff",buttonPrimary600:"#4945ff",danger100:"#181826",danger200:"#4a4a6a",danger500:"#ee5e52",danger600:"#ee5e52",danger700:"#ee5e52",neutral0:"#212134",neutral100:"#181826",neutral1000:"#ffffff",neutral150:"#32324d",neutral200:"#4a4a6a",neutral300:"#666687",neutral400:"#a5a5ba",neutral500:"#c0c0cf",neutral600:"#a5a5ba",neutral700:"#eaeaef",neutral800:"#ffffff",neutral900:"#ffffff",primary100:"#181826",primary200:"#4a4a6a",primary500:"#4945ff",primary600:"#7b79ff",primary700:"#7b79ff",secondary100:"#181826",secondary200:"#4a4a6a",secondary500:"#66b7f1",secondary600:"#66b7f1",secondary700:"#b8e1ff",success100:"#181826",success200:"#4a4a6a",success500:"#5cb176",success600:"#5cb176",success700:"#c6f0c2",warning100:"#181826",warning200:"#4a4a6a",warning500:"#f29d41",warning600:"#f29d41",warning700:"#fae7b9"}},GQ={shadow:{filterShadow:"1px 1px 10px rgba(3, 3, 5, 0.35)",focus:"inset 2px 0px 0px rgb(39, 31, 224), inset 0px 2px 0px rgb(39, 31, 224), inset -2px 0px 0px rgb(39, 31, 224), inset 0px -2px 0px rgb(39, 31, 224)",focusShadow:"0px 0px 6px rgba(76, 191, 255, 0.75)",popupShadow:"1px 1px 10px rgba(3, 3, 5, 0.35)",tableShadow:"1px 1px 10px rgba(3, 3, 5, 0.2)"}},YQ={colors:KQ.color,shadows:GQ.shadow,...I$},Pi=(t="&")=>({theme:e,$hasError:n=!1})=>k.css`
    outline: none;
    box-shadow: none;
    transition-property: border-color, box-shadow, fill;
    transition-duration: 0.2s;

    ${t}:focus-within {
      border: 1px solid ${n?e.colors.danger600:e.colors.primary600};
      box-shadow: ${n?e.colors.danger600:e.colors.primary600} 0px 0px 0px 2px;
    }
  `,[XQ,mn]=Rl("Field",{}),Ao=$.forwardRef(({children:t,name:e,error:n=!1,hint:r,id:i,required:o=!1,...s},a)=>{const c=Tn(i),[h,f]=$.useState();return p.jsx(XQ,{name:e,id:c,error:n,hint:r,required:o,labelNode:h,setLabelNode:f,children:p.jsx(ue,{direction:"column",alignItems:"stretch",gap:1,ref:a,...s,children:t})})}),ep=$.forwardRef(({children:t,action:e,...n},r)=>{const{id:i,required:o,setLabelNode:s}=mn("Label"),a=gn(r,s);return t?p.jsxs(ZQ,{ref:a,variant:"pi",textColor:"neutral800",fontWeight:"bold",...n,id:`${i}-label`,htmlFor:i,tag:"label",ellipsis:!0,children:[t,o&&p.jsx(ke,{"aria-hidden":!0,lineHeight:"1em",textColor:"danger600",children:"*"}),e&&p.jsx(QQ,{marginLeft:1,children:e})]}):null}),ZQ=k.styled(ke)`
  display: flex;
`,QQ=k.styled(ue)`
  line-height: 0;
  color: ${({theme:t})=>t.colors.neutral500};
`,lf=$.forwardRef(({endAction:t,startAction:e,disabled:n=!1,onChange:r,hasError:i,required:o,className:s,size:a="M",...c},h)=>{const{id:f,error:d,hint:g,name:v,required:x}=mn("Input");let w;d?w=`${f}-error`:g&&(w=`${f}-hint`);const C=!!d,S=$.useRef(null),R=$.useRef(null),T=gn(R,h),E=O=>{!n&&r&&r(O)};return $.useLayoutEffect(()=>{if(S.current&&R.current){const O=S.current.offsetWidth,L=R.current;if(L){const I=O+8+16;L.style.paddingRight=`${I}px`}}},[t]),p.jsxs(tJ,{gap:2,justifyContent:"space-between",$hasError:C||i,$disabled:n,$size:a,$hasLeftAction:!!e,$hasRightAction:!!t,className:s,children:[e,p.jsx(JQ,{id:f,name:v,ref:T,$size:a,"aria-describedby":w,"aria-invalid":C||i,"aria-disabled":n,disabled:n,"data-disabled":n?"":void 0,onChange:E,"aria-required":x||o,$hasLeftAction:!!e,$hasRightAction:!!t,...c}),t&&p.jsx(eJ,{ref:S,children:t})]})}),JQ=k.styled.input`
  border: none;
  border-radius: ${({theme:t})=>t.borderRadius};
  cursor: ${t=>t["aria-disabled"]?"not-allowed":void 0};

  color: ${({theme:t})=>t.colors.neutral800};
  font-weight: 400;
  font-size: ${t=>t.theme.fontSizes[2]};
  line-height: 2.2rem;
  display: block;
  width: 100%;
  background: inherit;

  &::placeholder {
    color: ${({theme:t})=>t.colors.neutral600};
    opacity: 1;
  }

  &[aria-disabled='true'] {
    color: inherit;
  }

  //focus managed by InputWrapper
  &:focus {
    outline: none;
    box-shadow: none;
  }

  ${t=>{switch(t.$size){case"S":return k.css`
          padding-inline-start: ${t.$hasLeftAction?0:t.theme.spaces[4]};
          padding-inline-end: ${t.$hasRightAction?0:t.theme.spaces[4]};
          padding-block: ${t.theme.spaces[1]};
        `;default:return k.css`
          padding-inline-start: ${t.$hasLeftAction?0:t.theme.spaces[4]};
          padding-inline-end: ${t.$hasRightAction?0:t.theme.spaces[4]};
          padding-block: ${t.theme.spaces[2]};
        `}}}
`,eJ=k.styled(ue)`
  position: absolute;
  right: ${({theme:t})=>t.spaces[4]};
  top: 50%;
  transform: translateY(-50%);
`,tJ=k.styled(ue)`
  border: 1px solid ${({theme:t,$hasError:e})=>e?t.colors.danger600:t.colors.neutral200};
  border-radius: ${({theme:t})=>t.borderRadius};
  background: ${({theme:t})=>t.colors.neutral0};
  padding-inline-start: ${({$hasLeftAction:t,theme:e})=>t?e.spaces[4]:0};
  position: relative;

  ${Pi()}
  ${({theme:t,$disabled:e})=>e?k.css`
          color: ${t.colors.neutral600};
          background: ${t.colors.neutral150};
        `:void 0};
`,L$=()=>{const{id:t,hint:e,error:n}=mn("Hint");return!e||n?null:p.jsx(ke,{variant:"pi",tag:"p",id:`${t}-hint`,textColor:"neutral600",children:e})},B$=()=>{const{id:t,error:e}=mn("Error");return!e||typeof e!="string"?null:p.jsx(ke,{variant:"pi",tag:"p",id:`${t}-error`,textColor:"danger600","data-strapi-field-error":!0,children:e})},nJ=$.forwardRef(({label:t,children:e,...n},r)=>p.jsx(rJ,{justifyContent:"unset",background:"transparent",borderStyle:"none",...n,type:"button",tag:"button",ref:r,children:p.jsx(Fs,{label:t,children:e})})),rJ=k.styled(ue)`
  font-size: 1.6rem;
  padding: 0;
`,iJ=Object.freeze(Object.defineProperty({__proto__:null,Action:nJ,Error:B$,Hint:L$,Input:lf,Label:ep,Root:Ao,useField:mn},Symbol.toStringTag,{value:"Module"}));$.forwardRef(({actions:t,children:e,error:n,hint:r,label:i,labelAction:o,nextLabel:s,onNext:a,onPrevious:c,previousLabel:h,required:f,secondaryLabel:d,selectedSlide:g,id:v,...x},w)=>{const C=Tn(v);return p.jsx(Ao,{hint:r,error:n,id:C,required:f,children:p.jsxs(ue,{direction:"column",alignItems:"stretch",gap:1,children:[i&&p.jsx(ep,{action:o,children:i}),p.jsx(WQ,{ref:w,actions:t,label:i,nextLabel:s,onNext:a,onPrevious:c,previousLabel:h,secondaryLabel:d,selectedSlide:g,id:C,...x,children:e}),p.jsx(L$,{}),p.jsx(B$,{})]})})});k.styled(be)`
  ${h$}
`;k.styled(ue)`
  display: ${({$selected:t})=>t?"flex":"none"};
`;const cf=$.forwardRef(({children:t,viewportRef:e,...n},r)=>p.jsxs(oJ,{ref:r,...n,children:[p.jsx(sJ,{ref:e,children:t}),p.jsx(_w,{orientation:"vertical",children:p.jsx(Lw,{})}),p.jsx(_w,{orientation:"horizontal",children:p.jsx(Lw,{})})]})),oJ=k.styled(jV)`
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
`,sJ=k.styled(FV)`
  min-width: 100%;
`,_w=k.styled(VV)`
  display: flex;
  /* ensures no selection */
  user-select: none;
  /* disable browser handling of all panning and zooming gestures on touch devices */
  touch-action: none;

  &[data-orientation='vertical'] {
    width: 0.4rem;
    margin: 0.4rem;
  }

  &[data-orientation='horizontal'] {
    flex-direction: column;
    height: 0.4rem;
    margin: 0.4rem;
  }
`,Lw=k.styled(HV)`
  position: relative;
  flex: 1;
  background-color: ${t=>t.theme.colors.neutral150};
  border-radius: 0.4rem;

  /* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */
  &::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    min-width: 44px;
    min-height: 44px;
  }
`,aJ="data:image/svg+xml,%3csvg%20width='63'%20height='63'%20viewBox='0%200%2063%2063'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.5563%2011.9816C39.484%2010.3071%2035.8575%209.29097%2032.3354%209.13521C28.6443%208.92888%2024.8295%209.72318%2021.3336%2011.4129C20.9123%2011.5901%2020.5376%2011.8101%2020.1722%2012.0249L20.0108%2012.1179C19.8774%2012.1951%2019.7441%2012.2724%2019.608%2012.3536C19.3253%2012.5146%2019.0492%2012.6744%2018.7544%2012.8792C18.5463%2013.0329%2018.3395%2013.1759%2018.1301%2013.323C17.5658%2013.7208%2016.9868%2014.1317%2016.4983%2014.5979C14.8476%2015.9524%2013.5571%2017.6075%2012.6071%2018.9214C10.4365%2022.1566%209.08622%2025.9567%208.80702%2029.6143L8.7764%2030.1588C8.73328%2030.9196%208.68476%2031.7057%208.75353%2032.4555C8.76648%2032.6084%208.7661%2032.7638%208.77506%2032.914C8.78895%2033.229%208.80152%2033.5373%208.846%2033.8672L9.07396%2035.4221C9.09756%2035.5764%209.1198%2035.7413%209.1633%2035.9263L9.65919%2037.9272L10.138%2039.2823C10.2729%2039.6673%2010.4158%2040.0751%2010.6%2040.43C12.0292%2043.637%2014.1425%2046.4578%2016.7063%2048.585C19.0508%2050.5296%2021.824%2052.0023%2024.7491%2052.8452L26.2371%2053.2376C26.3781%2053.2693%2026.4926%2053.2889%2026.6031%2053.3058L26.7775%2053.3311C27.0052%2053.3636%2027.2195%2053.3986%2027.4445%2053.435C27.8598%2053.5076%2028.2672%2053.5748%2028.7079%2053.6183L30.5641%2053.7229C30.9516%2053.7249%2031.3352%2053.7068%2031.7081%2053.6874C31.9039%2053.681%2032.0984%2053.6681%2032.3288%2053.662C34.5253%2053.4772%2036.5106%2053.0634%2038.0516%2052.4652C38.1769%2052.4171%2038.3008%2052.3796%2038.4234%2052.3355C38.6727%2052.2499%2038.9259%2052.167%2039.1432%2052.0599L40.8591%2051.2626L42.5702%2050.266C42.9009%2050.0682%2043.0205%2049.6414%2042.8282%2049.2984C42.632%2048.9526%2042.2034%2048.8308%2041.8634%2049.0166L40.1792%2049.9218L38.4995%2050.6224C38.3169%2050.6953%2038.121%2050.7534%2037.9224%2050.8155C37.7838%2050.8489%2037.6518%2050.8983%2037.5012%2050.9408C36.0711%2051.435%2034.2445%2051.7425%2032.244%2051.8346C32.0442%2051.8383%2031.8471%2051.8379%2031.654%2051.8403C31.3051%2051.8414%2030.9602%2051.8451%2030.6392%2051.8305L28.9177%2051.6725C28.5476%2051.619%2028.1695%2051.5427%2027.7848%2051.4678C27.5639%2051.4167%2027.3376%2051.3737%2027.1299%2051.3374L26.9529%2051.2987C26.8704%2051.2834%2026.7772%2051.2667%2026.7333%2051.2543L25.3466%2050.8322C22.7651%2049.9789%2020.33%2048.5729%2018.2942%2046.7557C16.1056%2044.7951%2014.3339%2042.2335%2013.1742%2039.3582C12.0276%2036.6013%2011.5988%2033.2792%2011.9716%2030.0076C12.3145%2027.0213%2013.3948%2024.1635%2015.1858%2021.5083C15.3034%2021.3339%2015.421%2021.1596%2015.5212%2021.0196C16.4309%2019.8688%2017.5408%2018.5589%2018.9483%2017.496C19.3367%2017.1525%2019.7862%2016.856%2020.2611%2016.5478C20.4878%2016.4009%2020.7079%2016.2553%2020.8907%2016.1306C21.0974%2016.0048%2021.3188%2015.8831%2021.5348%2015.7694C21.6761%2015.6975%2021.8162%2015.619%2021.9388%2015.5576L22.1002%2015.4646C22.4002%2015.3037%2022.6749%2015.1546%2022.9908%2015.039L24.1186%2014.5715C24.3399%2014.4844%2024.5718%2014.4159%2024.7997%2014.3447C24.953%2014.2982%2025.0982%2014.2635%2025.2635%2014.2078C25.786%2014.0182%2026.3283%2013.9112%2026.9105%2013.7965C27.117%2013.7571%2027.3302%2013.7163%2027.5608%2013.6585C27.7553%2013.611%2027.9737%2013.5969%2028.2082%2013.5762C28.364%2013.5603%2028.5172%2013.5483%2028.6318%2013.5333C28.7876%2013.5173%2028.9342%2013.5066%2029.0927%2013.4867C29.3285%2013.4555%2029.5456%2013.4347%2029.7494%2013.4337C30.0237%2013.44%2030.2994%2013.4357%2030.5777%2013.4274C31.0811%2013.421%2031.5579%2013.4197%2032.0318%2013.4914C34.9664%2013.7352%2037.7144%2014.6085%2040.2052%2016.0868C42.3489%2017.3655%2044.2716%2019.1525%2045.7607%2021.264C47.0255%2023.0628%2047.9756%2025.0528%2048.4928%2027.0393C48.572%2027.3176%2048.6299%2027.5931%2048.6839%2027.8659C48.7154%2028.0428%2048.7563%2028.2145%2048.7892%2028.3636C48.8037%2028.4541%2048.8208%2028.5406%2048.8445%2028.6258C48.8749%2028.7443%2048.8986%2028.864%2048.9116%2028.9651L48.9793%2029.6047C48.9922%2029.7748%2049.0132%2029.9331%2049.0301%2030.0887C49.0668%2030.3268%2049.0889%2030.5608%2049.0964%2030.7561L49.1083%2031.9001C49.1312%2032.3307%2049.089%2032.7116%2049.0522%2033.0673C49.0384%2033.2598%2049.0126%2033.4443%2049.0123%2033.5824C48.9961%2033.6926%2048.9918%2033.7935%2048.9836%2033.8917C48.9753%2034.0072%2048.9724%2034.1148%2048.9414%2034.2554L48.5449%2036.3059C48.3134%2037.8623%2049.3793%2039.3365%2050.9488%2039.5822C52.0417%2039.7601%2053.1536%2039.2819%2053.7711%2038.3664C54.0063%2038.0176%2054.1604%2037.6257%2054.2227%2037.2064L54.5217%2035.2574C54.5514%2035.0756%2054.572%2034.83%2054.5846%2034.5791L54.6028%2034.2338C54.6098%2034.0598%2054.6223%2033.8779%2054.6347%2033.6788C54.6734%2033.1052%2054.7163%2032.4479%2054.6619%2031.8058L54.5867%2030.4289C54.5622%2030.0952%2054.5097%2029.76%2054.4559%2029.4181C54.431%2029.2572%2054.4048%2029.0896%2054.3826%2028.9074L54.2687%2028.104C54.2332%2027.9244%2054.1804%2027.7273%2054.1329%2027.5396L54.0643%2027.2454C54.0195%2027.071%2053.9773%2026.8927%2053.9338%2026.7076C53.8455%2026.3309%2053.7479%2025.9422%2053.613%2025.5571C52.84%2023.0292%2051.5383%2020.5194%2049.8338%2018.2799C47.8544%2015.682%2045.3333%2013.5087%2042.5563%2011.9816Z'%20fill='%234945FF'/%3e%3c/svg%3e",N$=$.forwardRef(({children:t,small:e=!1,...n},r)=>p.jsxs("div",{role:"alert","aria-live":"assertive",ref:r,...n,children:[p.jsx(Io,{children:t}),p.jsx(cJ,{src:aJ,"aria-hidden":!0,$small:e})]})),lJ=k.keyframes`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(359deg);
  }
`,cJ=k.styled.img`
  animation: ${lJ} 1s infinite linear;
  will-change: transform;
  ${({$small:t,theme:e})=>t&&`width: ${e.spaces[6]}; height: ${e.spaces[6]};`}
`,uJ=$.forwardRef(({allowCustomValue:t,autocomplete:e,children:n,className:r,clearLabel:i="Clear",creatable:o=!1,creatableDisabled:s=!1,creatableStartIcon:a,createMessage:c=we=>`Create "${we}"`,defaultFilterValue:h,defaultTextValue:f,defaultOpen:d=!1,open:g,onOpenChange:v,disabled:x=!1,hasError:w,id:C,filterValue:S,hasMoreItems:R=!1,isPrintableCharacter:T,loading:E=!1,loadingMessage:O="Loading content...",name:L,noOptionsMessage:I=()=>"No results found",onChange:V,onClear:F,onCreateOption:H,onFilterValueChange:K,onInputChange:W,onTextValueChange:J,onLoadMore:G,placeholder:re="Select or enter a value",required:se=!1,size:te="M",startIcon:ne,textValue:Y,value:ce,...me},Ie)=>{const[we,qe]=yr({prop:g,defaultProp:d,onChange:v}),[Te,Ve]=yr({prop:Y,defaultProp:t&&!f?ce:f,onChange:J}),[pe,De]=yr({prop:S,defaultProp:h,onChange:K}),Re=$.useRef(null),Le=$.useRef(null),Ae=gn(Le,Ie),He=$.useRef(null),wt=Bt=>{F&&!x&&(Ve(""),De(""),F(Bt),Le.current.focus())},Ze=Bt=>{qe(Bt)},Pe=Bt=>{Ve(Bt)},Yt=Bt=>{De(Bt)},ft=Bt=>{W&&W(Bt)},_o=Bt=>{V&&V(Bt)},ea=Bt=>{G&&R&&!E&&G(Bt)},or=()=>{H&&Te&&o!=="visible"?H(Te):H&&o==="visible"&&(H(),qe(!1))},Mt=Tn(),li=`intersection-${Vs(Mt)}`;Tl(Re,ea,{selectorToWatch:`#${li}`,skipWhen:!we});const{error:ci,...Lo}=mn("Combobox"),Wi=!!ci||w,ta=Lo.id??C,zi=Lo.name??L,ui=Lo.required||se;let Ui;return ci?Ui=`${ta}-error`:Lo.hint&&(Ui=`${ta}-hint`),p.jsxs(Yn.Root,{autocomplete:e||(o===!0?"list":"both"),onOpenChange:Ze,open:we,onTextValueChange:Pe,textValue:Te,allowCustomValue:!!o||t,disabled:x,required:ui,value:ce,onValueChange:_o,filterValue:pe,onFilterValueChange:Yt,isPrintableCharacter:T,visible:o==="visible",children:[p.jsxs(hJ,{$hasError:Wi,$size:te,className:r,children:[p.jsxs(ue,{flex:"1",tag:"span",gap:3,children:[ne?p.jsx(ue,{flex:"0 0 1.6rem",tag:"span","aria-hidden":!0,children:ne}):null,p.jsx(fJ,{placeholder:re,id:ta,"aria-invalid":!!ci,onChange:ft,ref:Ae,name:zi,"aria-describedby":Ui,...me})]}),p.jsxs(ue,{tag:"span",gap:3,children:[Te&&F?p.jsx(ni,{size:"XS",variant:"ghost",onClick:wt,"aria-disabled":x,"aria-label":i,label:i,ref:He,children:p.jsx(Vi,{})}):null,p.jsx(dJ,{children:p.jsx(Oi,{fill:"neutral500"})})]})]}),p.jsx(Yn.Portal,{children:p.jsx(gJ,{sideOffset:4,children:p.jsxs(Yn.Viewport,{ref:Re,children:[p.jsxs(pJ,{children:[n,o!==!0&&!E?p.jsx(Yn.NoValueFound,{asChild:!0,children:p.jsx(sg,{$hasHover:!1,children:p.jsx(ke,{children:I(Te??"")})})}):null,E?p.jsx(ue,{justifyContent:"center",alignItems:"center",paddingTop:2,paddingBottom:2,children:p.jsx(N$,{small:!0,children:O})}):null,p.jsx(be,{id:li,width:"100%",height:"1px"})]}),o?p.jsx(mJ,{onPointerUp:or,onClick:or,disabled:s,asChild:!0,children:p.jsx(sg,{children:p.jsxs(ue,{gap:2,children:[a&&p.jsx(be,{tag:"span","aria-hidden":!0,display:"inline-flex",children:a}),p.jsx(ke,{children:c(Te??"")})]})})}):null]})})})]})}),hJ=k.styled(Yn.Trigger)`
  position: relative;
  border: 1px solid ${({theme:t,$hasError:e})=>e?t.colors.danger600:t.colors.neutral200};
  border-radius: ${({theme:t})=>t.borderRadius};
  background: ${({theme:t})=>t.colors.neutral0};
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: ${({theme:t})=>t.spaces[4]};

  ${t=>{switch(t.$size){case"S":return k.css`
          padding-inline-start: ${({theme:e})=>e.spaces[4]};
          padding-inline-end: ${({theme:e})=>e.spaces[3]};
          padding-block: ${({theme:e})=>e.spaces[1]};
        `;default:return k.css`
          padding-inline-start: ${({theme:e})=>e.spaces[4]};
          padding-inline-end: ${({theme:e})=>e.spaces[3]};
          padding-block: ${({theme:e})=>e.spaces[2]};
        `}}}

  &[data-disabled] {
    color: ${({theme:t})=>t.colors.neutral600};
    background: ${({theme:t})=>t.colors.neutral150};
    cursor: not-allowed;
  }

  /* Required to ensure the below inputFocusStyles are adhered too */
  &:focus-visible {
    outline: none;
  }

  ${({theme:t,$hasError:e})=>Pi()({theme:t,$hasError:e})};
`,fJ=k.styled(Yn.TextInput)`
  width: 100%;
  font-size: 1.4rem;
  line-height: 2.2rem;
  color: ${({theme:t})=>t.colors.neutral800};
  padding: 0;
  border: none;
  background-color: transparent;

  &:focus-visible {
    outline: none;
  }

  &::placeholder {
    color: ${({theme:t})=>t.colors.neutral600};
    opacity: 1;
  }

  &[aria-disabled='true'] {
    cursor: inherit;
  }
`,dJ=k.styled(Yn.Icon)`
  border: none;
  background: transparent;
  padding: 0;
  color: ${({theme:t})=>t.colors.neutral600};
  display: flex;

  &[aria-disabled='true'] {
    cursor: inherit;
  }
`,gJ=k.styled(Yn.Content)`
  background: ${({theme:t})=>t.colors.neutral0};
  box-shadow: ${({theme:t})=>t.shadows.filterShadow};
  border: 1px solid ${({theme:t})=>t.colors.neutral150};
  border-radius: ${({theme:t})=>t.borderRadius};
  width: var(--radix-combobox-trigger-width);
  /* This is from the design-system figma file. */
  max-height: 15rem;
  z-index: ${({theme:t})=>t.zIndices.popover};

  &:focus-visible {
    outline: ${({theme:t})=>`2px solid ${t.colors.primary600}`};
    outline-offset: 2px;
  }

  @media (prefers-reduced-motion: no-preference) {
    animation-duration: ${t=>t.theme.motion.timings[200]};

    /* The select can't animate out yet, watch https://github.com/radix-ui/primitives/issues/1893, or take a look and solve it yourself. */
    &[data-state='open'] {
      animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};

      &[data-side='top'] {
        animation-name: ${pt.slideUpIn};
      }

      &[data-side='bottom'] {
        animation-name: ${pt.slideDownIn};
      }
    }
  }
`,mJ=k.styled(Yn.CreateItem)`
  && {
    border-top: 1px solid ${({theme:t})=>t.colors.neutral150};
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    background: ${({theme:t})=>t.colors.neutral0};
    cursor: pointer;
    padding: ${({theme:t})=>t.spaces[1]};
    position: sticky;
    bottom: 0;
    left: 0;
  }
  &&:hover,
  &&[data-highlighted] {
    background: ${({theme:t})=>t.colors.neutral0};
  }
  &&[data-disabled] {
    color: ${({theme:t})=>t.colors.neutral600};
    cursor: not-allowed;
  }
  &&[data-disabled] svg {
    fill: ${({theme:t})=>t.colors.neutral300};
  }
  && > div {
    padding: ${({theme:t})=>t.spaces[2]} ${({theme:t})=>t.spaces[4]};
  }
  && > div:hover,
  &&[data-highlighted] > div {
    background-color: ${({theme:t})=>t.colors.primary100};
    border-radius: ${({theme:t})=>t.borderRadius};
  }
  &&[data-disabled] > div {
    background-color: inherit;
  }
`,pJ=k.styled(cf)`
  padding: ${({theme:t})=>t.spaces[1]};
`,vJ=$.forwardRef(({children:t,value:e,disabled:n,textValue:r,...i},o)=>p.jsx(Yn.ComboboxItem,{asChild:!0,value:e,disabled:n,textValue:r,children:p.jsx(sg,{ref:o,...i,children:p.jsx(Yn.ItemText,{asChild:!0,children:p.jsx(ke,{children:t})})})})),sg=k.styled.div`
  width: 100%;
  border: none;
  text-align: left;
  outline-offset: -3px;
  padding: ${({theme:t})=>t.spaces[2]} ${({theme:t})=>t.spaces[4]};
  background-color: ${({theme:t})=>t.colors.neutral0};
  border-radius: ${({theme:t})=>t.borderRadius};
  user-select: none;

  &[data-state='checked'] {
    background-color: ${({theme:t})=>t.colors.primary100};
    color: ${({theme:t})=>t.colors.primary600};
    font-weight: bold;
  }

  &:hover,
  &[data-highlighted] {
    outline: none;
    background-color: ${({theme:t,$hasHover:e=!0})=>e?t.colors.primary100:t.colors.neutral0};
  }

  &[data-highlighted] {
    color: ${({theme:t})=>t.colors.primary600};
    font-weight: bold;
  }
`,j$=(t,e)=>`${t}${Math.floor(e*255).toString(16).padStart(2,"0")}`,bJ=jH,wJ=$.forwardRef((t,e)=>p.jsx(FH,{...t,asChild:!0,ref:e})),xJ=$.forwardRef((t,e)=>p.jsx(VH,{children:p.jsx(yJ,{children:p.jsx(CJ,{ref:e,...t})})})),yJ=k.styled(HH)`
  background: ${t=>j$(t.theme.colors.neutral800,.2)};
  position: fixed;
  inset: 0;
  z-index: ${t=>t.theme.zIndices.overlay};
  will-change: opacity;

  @media (prefers-reduced-motion: no-preference) {
    animation: ${pt.overlayFadeIn} ${t=>t.theme.motion.timings[200]}
      ${t=>t.theme.motion.easings.authenticMotion};
  }
`,CJ=k.styled(PH)`
  max-width: 42rem;
  height: min-content;
  width: 100%;
  overflow: hidden;
  margin: 0 auto;
  display: flex;
  flex-direction: column;

  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  border-radius: ${t=>t.theme.borderRadius};
  background-color: ${t=>t.theme.colors.neutral0};
  box-shadow: ${t=>t.theme.shadows.popupShadow};
  z-index: ${t=>t.theme.zIndices.modal};

  @media (prefers-reduced-motion: no-preference) {
    &[data-state='open'] {
      animation-duration: ${t=>t.theme.motion.timings[200]};
      animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};
      animation-name: ${pt.modalPopIn};
    }

    &[data-state='closed'] {
      animation-duration: ${t=>t.theme.motion.timings[120]};
      animation-timing-function: ${t=>t.theme.motion.easings.easeOutQuad};
      animation-name: ${pt.modalPopOut};
    }
  }
`,$J=$.forwardRef(({children:t,...e},n)=>p.jsx(UH,{asChild:!0,children:p.jsx(SJ,{tag:"h2",variant:"beta",ref:n,padding:6,fontWeight:"bold",...e,children:t})})),SJ=k.styled(ke)`
  display: flex;
  justify-content: center;
  border-bottom: solid 1px ${t=>t.theme.colors.neutral150};
`,AJ=$.forwardRef(({children:t,icon:e,...n},r)=>p.jsx(ue,{ref:r,gap:2,direction:"column",paddingTop:8,paddingBottom:8,paddingLeft:6,paddingRight:6,...n,children:typeof t=="string"?p.jsxs(p.Fragment,{children:[e?$.cloneElement(e,{width:24,height:24}):null,p.jsx(F$,{children:t})]}):t})),F$=$.forwardRef((t,e)=>p.jsx(qH,{asChild:!0,children:p.jsx(ke,{ref:e,variant:"omega",...t,tag:"p"})})),RJ=$.forwardRef((t,e)=>p.jsx(kJ,{ref:e,gap:2,padding:4,justifyContent:"space-between",...t,tag:"footer"})),kJ=k.styled(ue)`
  border-top: solid 1px ${t=>t.theme.colors.neutral150};
  flex: 1;
`,TJ=$.forwardRef((t,e)=>p.jsx(zH,{...t,asChild:!0,ref:e})),MJ=$.forwardRef((t,e)=>p.jsx(WH,{...t,asChild:!0,ref:e})),EJ=Object.freeze(Object.defineProperty({__proto__:null,Action:MJ,Body:AJ,Cancel:TJ,Content:xJ,Description:F$,Footer:RJ,Header:$J,Root:bJ,Trigger:wJ},Symbol.toStringTag,{value:"Module"}));function Xr(t,e){const n=$.useRef(null);return e&&n.current&&OJ(e,n.current)&&(e=n.current),n.current=e??null,$.useMemo(()=>new wM(t,e),[t,e])}function OJ(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const i of n)if(e[i]!==t[i])return!1;return!0}const k0={Log:"live-region-log",Status:"live-region-status",Alert:"live-region-alert"},DJ=()=>p.jsxs(Io,{children:[p.jsx("p",{role:"log","aria-live":"polite",id:k0.Log,"aria-relevant":"all"}),p.jsx("p",{role:"status","aria-live":"polite",id:k0.Status,"aria-relevant":"all"}),p.jsx("p",{role:"alert","aria-live":"assertive",id:k0.Alert,"aria-relevant":"all"})]}),IJ=k.createGlobalStyle`
${k.css`
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  * {
    margin: 0;
  }

  html {
    /* Sets 1rem === 10px */
    font-size: 62.5%;
  }

  body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
      'Helvetica Neue', sans-serif;
    color: ${({theme:t})=>t.colors.neutral800};
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }

  img,
  picture,
  video,
  canvas {
    display: block;
    max-width: 100%;
  }

  input,
  button,
  textarea,
  select {
    padding: 0;
    font: inherit;
  }

  button {
    border: unset;
    background: unset;
    padding: unset;
    margin: unset;
  }

  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    overflow-wrap: break-word;
    font: unset;
  }

  #root {
    isolation: isolate;
  }

  ol,
  ul {
    list-style: none;
    padding: unset;
    margin: unset;
  }

  table {
    border-collapse: collapse;
    border-spacing: 0;
  }

  *:focus-visible {
    outline: 2px solid ${({theme:t})=>t.colors.primary600};
    outline-offset: 2px;
  }

  *:has(> :disabled:not(button)) {
    cursor: not-allowed !important;
  }

  [aria-disabled='true']:not(button) {
    cursor: not-allowed !important;
  }

  /* Focusing the button with a mouse, touch, or stylus will show a subtle drop shadow. */
  *:focus:not(:focus-visible) {
    outline: none;
  }

  .lock-body-scroll {
    height: 100vh;
    overflow-y: hidden;
  }
`}
`,Bw="en-EN",V$=()=>typeof navigator>"u"?Bw:navigator.language?navigator.language:Bw,[_J,uf]=Rl("StrapiDesignSystem",{locale:V$()}),LJ=({children:t,locale:e=V$(),theme:n=_$,tooltipConfig:r})=>(So(()=>{const i=document.createElement("style");i.type="text/css",i.appendChild(document.createTextNode(`
        * {
          -webkit-transition: none !important;
          -moz-transition: none !important;
          -o-transition: none !important;
          -ms-transition: none !important;
          transition: none !important;
          animation: none !important;
        }
    `)),document.head.appendChild(i),window.getComputedStyle(i).opacity,document.head.removeChild(i)},[n]),p.jsx(_J,{locale:e,children:p.jsxs(k.ThemeProvider,{theme:n,children:[p.jsx(RO,{...r,children:t}),p.jsx(DJ,{}),p.jsx(IJ,{})]})})),BJ=LM,tp=$.forwardRef(({container:t=globalThis?.document?.body,...e},n)=>t?al.createPortal(p.jsx(be,{ref:n,...e}),t):null);tp.displayName="Portal";const NJ=$.forwardRef(({onClear:t,clearLabel:e="Clear",startIcon:n,disabled:r,hasError:i,children:o,id:s,size:a="M",withTags:c,...h},f)=>{const d=$.useRef(null),g=w=>{t&&!r&&(t(w),d.current.focus())},{labelNode:v}=mn("SelectTrigger"),x=gn(d,f);return p.jsx(nr.Trigger,{asChild:!0,children:p.jsxs(jJ,{"aria-disabled":r,$hasError:i,ref:x,alignItems:"center",justifyContent:"space-between",position:"relative",overflow:"hidden",hasRadius:!0,background:r?"neutral150":"neutral0",gap:4,cursor:"default","aria-labelledby":v?`${s}-label`:void 0,$size:a,$withTags:c,...h,children:[p.jsxs(ue,{flex:"1",tag:"span",gap:3,children:[n&&p.jsx(ue,{tag:"span","aria-hidden":!0,children:n}),o]}),p.jsxs(ue,{tag:"span",gap:3,children:[t?p.jsx(ni,{size:"XS",variant:"ghost",onClick:g,"aria-disabled":r,"aria-label":e,label:e,children:p.jsx(Vi,{})}):null,p.jsx(FJ,{children:p.jsx(Oi,{})})]})]})})}),jJ=k.styled(ue)`
  border: 1px solid ${({theme:t,$hasError:e})=>e?t.colors.danger600:t.colors.neutral200};
  ${t=>{switch(t.$size){case"S":return k.css`
          padding-block: ${t.theme.spaces[1]};
          padding-inline-start: ${t.$withTags?t.theme.spaces[1]:t.theme.spaces[4]};
          padding-inline-end: ${t.theme.spaces[3]};
        `;default:return k.css`
          padding-block: ${t.$withTags?"0.3rem":t.theme.spaces[2]};
          padding-inline-start: ${t.$withTags?t.theme.spaces[1]:t.theme.spaces[4]};
          padding-inline-end: ${t.theme.spaces[3]};
        `}}}
  cursor: pointer;

  &[aria-disabled='true'] {
    color: ${t=>t.theme.colors.neutral500};
  }

  /* Required to ensure the below inputFocusStyles are adhered too */
  &:focus-visible {
    outline: none;
  }

  ${({theme:t,$hasError:e})=>Pi()({theme:t,$hasError:e})};
`,FJ=k.styled(nr.Icon)`
  display: flex;
  & > svg {
    fill: ${({theme:t})=>t.colors.neutral500};
  }
`,VJ=$.forwardRef(({children:t,placeholder:e,...n},r)=>p.jsx(HJ,{ref:r,ellipsis:!0,...n,children:p.jsx(PJ,{placeholder:e,children:t})})),HJ=k.styled(ke)`
  flex: 1;
  font-size: 1.4rem;
  line-height: 2.2rem;
  min-height: 2.2rem;
`,PJ=k.styled(nr.Value)`
  display: flex;
  gap: ${({theme:t})=>t.spaces[1]};
  flex-wrap: wrap;
`,WJ=$.forwardRef((t,e)=>p.jsx(zJ,{ref:e,...t,children:p.jsx(cf,{children:t.children})})),zJ=k.styled(nr.Content)`
  background: ${({theme:t})=>t.colors.neutral0};
  box-shadow: ${({theme:t})=>t.shadows.filterShadow};
  border: 1px solid ${({theme:t})=>t.colors.neutral150};
  border-radius: ${({theme:t})=>t.borderRadius};
  min-width: var(--radix-select-trigger-width);
  max-height: 15.6rem;
  z-index: ${({theme:t})=>t.zIndices.popover};

  @media (prefers-reduced-motion: no-preference) {
    animation-duration: ${t=>t.theme.motion.timings[200]};

    /* The select can't animate out yet, watch https://github.com/radix-ui/primitives/issues/1893, or take a look and solve it yourself. */
    &[data-state='open'] {
      animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};

      &[data-side='top'] {
        animation-name: ${pt.slideUpIn};
      }

      &[data-side='bottom'] {
        animation-name: ${pt.slideDownIn};
      }
    }
  }
`,UJ=k.styled(nr.Viewport)`
  padding: ${({theme:t})=>t.spaces[1]};
`,qJ=$.forwardRef((t,e)=>p.jsx(GJ,{ref:e,...t})),KJ=k.css`
  width: 100%;
  border: none;
  text-align: left;
  outline-offset: -3px;
  border-radius: ${t=>t.theme.borderRadius};
  padding: ${t=>`${t.theme.spaces[2]} ${t.theme.spaces[4]}`};
  padding-left: ${({theme:t})=>t.spaces[4]};
  background-color: ${({theme:t})=>t.colors.neutral0};
  display: flex;
  align-items: center;
  gap: ${({theme:t})=>t.spaces[2]};
  white-space: nowrap;
  user-select: none;
  color: ${({theme:t})=>t.colors.neutral800};

  &:focus-visible {
    outline: none;
    background-color: ${({theme:t})=>t.colors.primary100};
    cursor: pointer;
  }
`,GJ=k.styled(nr.Item)`
  ${KJ}

  &:hover {
    background-color: ${({theme:t})=>t.colors.primary100};
    cursor: pointer;
  }
`,H$=nr.Root,P$=NJ,W$=VJ,z$=nr.Portal,U$=WJ,q$=UJ,np=qJ,K$=nr.ItemIndicator,G$=nr.ItemText,YJ=nr.Group,ag=$.forwardRef(({children:t,clearLabel:e="Clear",customizeContent:n,disabled:r,hasError:i,id:o,name:s,onChange:a,onClear:c,onCloseAutoFocus:h,onReachEnd:f,placeholder:d,required:g,size:v,startIcon:x,value:w,...C},S)=>{const[R,T]=$.useState(),[E,O]=$.useState(!1),L=me=>{O(me)},I=me=>{c&&c(me),a||T("")},V=me=>{a?a(typeof w=="number"?Number(me):me):T(me)},F=$.useRef(null),H=Tn(),K=`intersection-${Vs(H)}`;Tl(F,me=>{f&&f(me)},{selectorToWatch:`#${K}`,skipWhen:!E});const{error:J,required:G,...re}=mn("SingleSelect"),se=!!J||i,te=re.id??o,ne=re.name??s;let Y;J?Y=`${te}-error`:re.hint&&(Y=`${te}-hint`);const ce=(typeof w<"u"&&w!==null?w.toString():R)??"";return p.jsxs(H$,{onOpenChange:L,disabled:r,required:G??g,onValueChange:V,value:ce,...C,children:[p.jsx(P$,{ref:S,id:te,name:ne,startIcon:x,hasError:se,disabled:r,clearLabel:e,onClear:ce&&c?I:void 0,"aria-label":C["aria-label"],"aria-describedby":Y??C["aria-describedby"],size:v,children:p.jsx(W$,{placeholder:d,textColor:ce?"neutral800":"neutral600",children:ce&&n?n(ce):void 0})}),p.jsx(z$,{children:p.jsx(U$,{position:"popper",sideOffset:4,onCloseAutoFocus:h,children:p.jsxs(q$,{ref:F,children:[t,p.jsx(be,{id:K,width:"100%",height:"1px"})]})})})]})}),lg=$.forwardRef(({value:t,startIcon:e,children:n,...r},i)=>p.jsxs(np,{ref:i,value:t.toString(),...r,children:[e&&p.jsx(ue,{tag:"span","aria-hidden":!0,children:e}),p.jsx(ke,{lineHeight:"20px",width:"100%",children:p.jsx(G$,{children:n})})]})),XJ=200,Nw=15,[ZJ,Js]=Rl("DatePicker"),QJ=$.forwardRef(({calendarLabel:t,className:e,initialDate:n,locale:r,maxDate:i,minDate:o,monthSelectLabel:s="Month",onChange:a,value:c,yearSelectLabel:h="Year",hasError:f,id:d,name:g,disabled:v=!1,required:x=!1,onClear:w,clearLabel:C="Clear",size:S="M",...R},T)=>{const E=As(),O=uf("DatePicker"),L=r??O.locale,I=Xr(L,{day:"2-digit",month:"2-digit",year:"numeric"}),[V,F]=$.useState(!1),[H,K]=$.useState(null),[W,J]=$.useState(null),[G,re]=$.useState(null),[se,te]=$.useState(),[ne,Y]=yr({defaultProp:n?no(n):void 0,prop:c?no(c):void 0,onChange(Pe){a&&a(Pe?.toDate(E))}}),[ce,me]=$.useMemo(()=>{const Pe=n?no(n):fg("UTC"),Yt=o?no(o):Pe.set({day:1,month:1,year:Pe.year-XJ});let ft=i?no(i):Pe.set({day:31,month:12,year:Pe.year+Nw});return ft.compare(Yt)<0&&(ft=Yt.set({day:31,month:12,year:Yt.year+Nw})),[Yt,ft]},[o,i,n]),[Ie,we]=$.useState(JJ({currentValue:ne,minDate:ce,maxDate:me})),qe=Tn(),Te=$.useRef(null),Ve=Pe=>{w&&!v&&(te(""),Y(void 0),w(Pe),W?.focus())},pe=$.useCallback(Pe=>{Pe&&ne&&we(ne),F(Pe)},[ne]);So(()=>{if(c){const Pe=no(c);te(I.format(Pe.toDate(E))),we(Pe)}else te("")},[c,I,E]),So(()=>{if(n&&se===void 0){const Pe=no(n);te(I.format(Pe.toDate(E)))}},[n,se,I,E]);const{error:De,...Re}=mn("Combobox"),Le=!!De||f,Ae=Re.id??d,He=Re.name??g,wt=Re.required||x;let Ze;return De?Ze=`${Ae}-error`:Re.hint&&(Ze=`${Ae}-hint`),p.jsxs(ZJ,{calendarDate:Ie,content:G,contentId:qe,disabled:v,locale:L,minDate:ce,maxDate:me,open:V,onCalendarDateChange:we,onContentChange:re,onOpenChange:pe,onTextInputChange:J,onTextValueChange:te,onTriggerChange:K,onValueChange:Y,onClear:w,required:wt,textInput:W,textValue:se,timeZone:E,trigger:H,value:ne,children:[p.jsxs(tee,{className:e,hasError:Le,size:S,children:[p.jsx(C_,{fill:"neutral500","aria-hidden":!0}),p.jsx(iee,{ref:T,"aria-describedby":Ze,id:Ae,name:He,...R}),se&&w?p.jsx(ni,{size:"XS",variant:"ghost",onClick:Ve,"aria-disabled":v,"aria-label":C,label:C,ref:Te,children:p.jsx(Vi,{})}):null]}),p.jsx(tp,{children:p.jsx(lee,{label:t,children:p.jsx(dee,{monthSelectLabel:s,yearSelectLabel:h})})})]})}),jw=t=>!!t.match(/^[^a-zA-Z]*$/),JJ=({currentValue:t,minDate:e,maxDate:n})=>{const r=fg("UTC");return t||(O0(e,r)===e&&D0(n,r)===n?r:O0(e,r)===r?e:D0(n,r)===r?n:r)},eee="DatePickerTrigger",tee=$.forwardRef(({hasError:t,size:e,...n},r)=>{const i=Js(eee),o=gn(r,a=>i.onTriggerChange(a)),s=()=>{i.disabled||i.onOpenChange(!0)};return p.jsx(qs,{asChild:!0,trapped:i.open,onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:a=>{document.getSelection()?.empty(),a.preventDefault()},children:p.jsx(nee,{ref:o,$hasError:t,$size:e,$hasOnClear:!!i.onClear,...n,hasRadius:!0,gap:3,overflow:"hidden",background:i.disabled?"neutral150":"neutral0",onClick:uo(n.onClick,()=>{i.textInput?.focus()}),onPointerDown:uo(n.onPointerDown,a=>{const c=a.target;c.hasPointerCapture(a.pointerId)&&c.releasePointerCapture(a.pointerId),(c.closest("button")??c.closest("div"))===a.currentTarget&&a.button===0&&a.ctrlKey===!1&&(s(),i.textInput?.focus())})})})}),nee=k.styled(ue)`
  min-width: ${({$hasOnClear:t})=>t?"160px":"130px"};
  border: 1px solid ${({theme:t,$hasError:e})=>e?t.colors.danger600:t.colors.neutral200};
  ${t=>{switch(t.$size){case"S":return k.css`
          padding-block: ${t.theme.spaces[1]};
          padding-inline: ${t.theme.spaces[3]};
        `;default:return k.css`
          padding-block: ${t.theme.spaces[2]};
          padding-inline: ${t.theme.spaces[3]};
        `}}}

  & > svg {
    flex: 1 0 auto;
  }

  &[data-disabled] {
    color: ${({theme:t})=>t.colors.neutral600};
    background: ${({theme:t})=>t.colors.neutral150};
    cursor: not-allowed;
  }

  /* Required to ensure the below inputFocusStyles are adhered too */
  &:focus-visible {
    outline: none;
  }

  ${({theme:t,$hasError:e})=>Pi()({theme:t,$hasError:e})};
`,ree="DatePickerTextInput",iee=$.forwardRef(({placeholder:t,...e},n)=>{const r=Js(ree),{onTextValueChange:i,textValue:o,onTextInputChange:s,onOpenChange:a,disabled:c,locale:h}=r,f=gn(n,S=>s(S)),d=()=>{c||a(!0)},g=Xr(h,{year:"numeric",month:"2-digit",day:"2-digit"}),[v,x,w]=$.useMemo(()=>{const S=g.formatToParts(new Date),R=S.filter(O=>O.type==="year"||O.type==="month"||O.type==="day"),T=R.map(O=>{switch(O.type){case"day":return"DD";case"month":return"MM";case"year":return"YYYY";default:return""}}),E=S.find(O=>O.type==="literal")?.value??"";return[T,E,R]},[g]),C=v.map(S=>`\\d{${S.length}}`).join(`\\${x}`);return p.jsx(see,{role:"combobox",type:"text",inputMode:"numeric",ref:f,"aria-autocomplete":"none","aria-controls":r.contentId,"aria-disabled":r.disabled,"aria-expanded":r.open,"aria-required":r.required,"aria-haspopup":"dialog","data-state":r.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,pattern:C,placeholder:t??v.join(x),...e,value:o??"",onBlur:uo(e.onBlur,()=>{if(!r.textValue){r.onValueChange(void 0);return}r.onTextValueChange(g.format(r.calendarDate.toDate(r.timeZone))),r.onValueChange(r.calendarDate)}),onChange:uo(e.onChange,S=>{if(jw(S.target.value)){const R=S.target.value.split(x),[T,E,O]=w.map((J,G)=>{const re=R[G];return{...J,value:re}}).sort((J,G)=>J.type==="year"?1:G.type==="year"?-1:J.type==="month"?1:G.type==="month"?-1:0).map(J=>J.value),L=r.calendarDate.year;let I=r.calendarDate.year;if(O){const J=O.length===1?`0${O}`:O;I=O.length<3?Number(`${L}`.slice(0,4-J.length)+J):Number(J)}O&&O.length<3&&I>r.maxDate.year&&(I-=100);const V=r.calendarDate.set({year:I}),F=V.calendar.getMonthsInYear(V),H=V.set({month:E&&Number(E)<=F?Number(E):void 0}),K=H.calendar.getDaysInMonth(H),W=H.set({day:T&&Number(T)<=K?Number(T):void 0});r.onCalendarDateChange(oee(W,r.minDate,r.maxDate)),r.onTextValueChange(S.target.value)}}),onKeyDown:uo(e.onKeyDown,S=>{if(!r.open&&(jw(S.key)||["ArrowDown","Backspace"].includes(S.key)))d();else if(["Tab"].includes(S.key)&&r.open)S.preventDefault();else if(["Escape"].includes(S.key))r.open?r.onOpenChange(!1):(r.onValueChange(void 0),r.onTextValueChange("")),S.preventDefault();else if(r.open&&["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(S.key))switch(S.preventDefault(),S.key){case"ArrowDown":{const R=r.calendarDate.add({weeks:1});if(r.maxDate&&R.compare(r.maxDate)>0)return;r.onCalendarDateChange(R);return}case"ArrowRight":{const R=r.calendarDate.add({days:1});if(r.maxDate&&R.compare(r.maxDate)>0)return;r.onCalendarDateChange(R);return}case"ArrowUp":{const R=r.calendarDate.subtract({weeks:1});if(r.minDate&&R.compare(r.minDate)<0)return;r.onCalendarDateChange(R);return}case"ArrowLeft":{const R=r.calendarDate.subtract({days:1});if(r.minDate&&R.compare(r.minDate)<0)return;r.onCalendarDateChange(R)}}else r.open&&["Enter"].includes(S.key)&&(S.preventDefault(),i(g.format(r.calendarDate.toDate(r.timeZone))),r.onValueChange(r.calendarDate),r.onOpenChange(!1))})})});function oee(t,e,n){return e&&(t=D0(t,e)),n&&(t=O0(t,n)),t}const see=k.styled.input`
  width: 100%;
  font-size: 1.4rem;
  line-height: 2.2rem;
  color: ${({theme:t})=>t.colors.neutral800};
  border: none;
  background-color: transparent;

  &:focus-visible {
    outline: none;
  }

  &::placeholder {
    color: ${({theme:t})=>t.colors.neutral600};
    opacity: 1;
  }

  &[aria-disabled='true'] {
    cursor: inherit;
  }
`,aee="DatePickerContent",lee=$.forwardRef((t,e)=>{const[n,r]=$.useState(),i=Js(aee);if(So(()=>{r(new DocumentFragment)},[]),!i.open){const o=n;return o?al.createPortal(p.jsx("div",{children:t.children}),o):null}return p.jsx(uee,{...t,ref:e})}),cee="DatePickerContent",uee=$.forwardRef((t,e)=>{const{label:n="Choose date",...r}=t,{onOpenChange:i,...o}=Js(cee),{x:s,y:a,refs:c,strategy:h,placement:f}=KH({strategy:"fixed",placement:"bottom-start",middleware:[GH({mainAxis:4}),YH(),XH()],elements:{reference:o.trigger},whileElementsMounted:Cx});$.useEffect(()=>{const g=()=>{i(!1)};return window.addEventListener("blur",g),window.addEventListener("resize",g),()=>{window.removeEventListener("blur",g),window.removeEventListener("resize",g)}},[i]);const d=gn(e,g=>o.onContentChange(g),c.setFloating);return Us(),p.jsx(Th,{allowPinchZoom:!0,children:p.jsx(BJ,{asChild:!0,onFocusOutside:g=>{g.preventDefault()},onDismiss:()=>{i(!1)},children:p.jsx(hee,{ref:d,"data-state":o.open?"open":"closed","data-side":f.includes("top")?"top":"bottom",onContextMenu:g=>g.preventDefault(),id:o.contentId,role:"dialog","aria-modal":"true","aria-label":n,style:{left:s,top:a,position:h},hasRadius:!0,background:"neutral0",padding:1,...r})})})}),hee=k.styled(be)`
  box-shadow: ${({theme:t})=>t.shadows.filterShadow};
  z-index: ${({theme:t})=>t.zIndices.popover};
  border: 1px solid ${({theme:t})=>t.colors.neutral150};

  @media (prefers-reduced-motion: no-preference) {
    animation-duration: ${t=>t.theme.motion.timings[200]};

    &[data-state='open'] {
      animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};

      &[data-side='top'] {
        animation-name: ${pt.slideUpIn};
      }

      &[data-side='bottom'] {
        animation-name: ${pt.slideDownIn};
      }
    }
  }
`,fee="DatePickerCalendar",dee=$.forwardRef(({monthSelectLabel:t,yearSelectLabel:e,...n},r)=>{const{locale:i,timeZone:o,minDate:s,maxDate:a,calendarDate:c,onCalendarDateChange:h}=Js(fee),f=YT(c),d=$.useMemo(()=>{const T=s.year,E=a.year;return[...Array(E-T+1).keys()].map(O=>(T+O).toString())},[s,a]),g=Xr(i,{month:"long"}),v=$.useMemo(()=>[...Array(c.calendar.getMonthsInYear(c)).keys()].map(T=>g.format(c.set({month:T+1}).toDate(o))),[c,g,o]),x=Xr(i,{weekday:"short"}),w=$.useMemo(()=>{const T=Yw(fg(o),i);return[...new Array(7).keys()].map(E=>{const L=T.add({days:E}).toDate(o);return x.format(L)})},[o,i,x]),C=T=>{if(typeof T=="number")return;const E=c.set({month:v.indexOf(T)+1});h(E)},S=T=>{if(typeof T=="number")return;const E=c.set({year:parseInt(T,10)});h(E)},R=gee(f,i);return p.jsxs(ue,{ref:r,direction:"column",alignItems:"stretch",padding:4,...n,children:[p.jsxs(mee,{justifyContent:"flex-start",paddingBottom:4,paddingLeft:2,paddingRight:2,gap:2,children:[p.jsx(Ao,{children:p.jsx(ag,{"aria-label":t,value:v[c.month-1],onChange:C,children:v.map(T=>p.jsx(lg,{value:T,children:T},T))})}),p.jsx(Ao,{children:p.jsx(ag,{value:c.year.toString(),"aria-label":e,onChange:S,children:d.map(T=>p.jsx(lg,{value:T,children:T},T))})})]}),p.jsxs("table",{role:"grid",children:[p.jsx("thead",{"aria-hidden":!0,children:p.jsx("tr",{"aria-rowindex":0,children:w.map((T,E)=>p.jsx(pee,{"aria-colindex":E,children:T},T))})}),p.jsx("tbody",{children:[...new Array(6).keys()].map(T=>p.jsx("tr",{"aria-rowindex":T+2,children:R(T).map((E,O)=>E?p.jsx(wee,{"aria-colindex":O+1,date:E,startDate:f,disabled:s.compare(E)>0||E.compare(a)>0},E.toString()):p.jsx(Y$,{"aria-colindex":O+1},O+1))},T))})]})]})}),gee=(t,e)=>n=>{let r=t.add({weeks:n});const i=[];r=Yw(r,e);const o=Kw(r,e);for(let s=0;s<o;s++)i.push(null);for(;i.length<7;){i.push(r);const s=r.add({days:1});if(qw(r,s))break;r=s}for(;i.length<7;)i.push(null);return i},mee=k.styled(ue)`
  div[role='combobox'] {
    border: 1px solid transparent;
    background: transparent;
    font-weight: ${t=>t.theme.fontWeights.bold};

    svg {
      fill: ${({theme:t})=>t.colors.neutral500};
    }

    &:hover {
      background-color: ${({theme:t})=>t.colors.neutral100};
    }
  }
`,pee=$.forwardRef(({children:t,...e},n)=>p.jsx(vee,{tag:"th",role:"gridcell",ref:n,...e,height:"2.4rem",width:"3.2rem",children:p.jsx(ke,{variant:"pi",fontWeight:"bold",color:"neutral800",children:t.slice(0,2)})})),vee=k.styled(be)`
  border-radius: ${({theme:t})=>t.borderRadius};
  text-transform: capitalize;
`,bee="DatePickerCalendarCell",wee=$.forwardRef(({date:t,startDate:e,disabled:n,...r},i)=>{const{timeZone:o,locale:s,calendarDate:a,onValueChange:c,onOpenChange:h,onTextValueChange:f,onCalendarDateChange:d}=Js(bee),g=qw(a,t),v=Xr(s,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),x=$.useMemo(()=>v.format(t.toDate(o)),[v,t,o]),w=Xr(s,{day:"numeric",calendar:t.calendar.identifier}),C=$.useMemo(()=>w.formatToParts(t.toDate(o)).find(O=>O.type==="day").value,[w,t,o]),S=Xr(s,{day:"2-digit",month:"2-digit",year:"numeric"}),R=XT(e),T=t.compare(e)<0||t.compare(R)>0;let E="neutral900";return g?E="primary600":T&&(E="neutral600"),p.jsx(Y$,{tag:"td",role:"gridcell",ref:i,"aria-selected":g,...r,hasRadius:!0,"aria-label":x,tabIndex:g?0:-1,background:g?"primary100":"neutral0",cursor:"pointer",onPointerDown:uo(r.onPointerDown,O=>{O.preventDefault(),d(t),c(t),f(S.format(t.toDate(o))),h(!1)}),"aria-disabled":n,children:p.jsx(ke,{variant:"pi",textColor:E,children:C})})}),Y$=k.styled(be)`
  text-align: center;
  padding: 0.7rem;
  // Trick to prevent the outline from overflowing because of the general outline-offset
  outline-offset: -2px !important;
  &[aria-disabled='true'] {
    pointer-events: none;
    opacity: 0.5;
  }

  &[aria-disabled='false'] {
    &:hover {
      background: ${({theme:t})=>t.colors.primary100};
      color: ${({theme:t})=>t.colors.primary600};
    }
  }
`,no=t=>{const e=t.toISOString(),n=sx(e,"UTC");return Jw(n)},T0=t=>!!t.match(/^[^a-zA-Z]*$/);function xee(t=""){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const yee=WT.default(uJ)`
  min-width: ${({onClear:t})=>t?"160px":"130px"};
`,Cee=$.forwardRef(({step:t=15,value:e,defaultValue:n,onChange:r,...i},o)=>{const s=uf("TimePicker"),[a,c]=$.useState(""),[h,f]=yr({prop:e,defaultProp:n,onChange:r}),d=Xr(s.locale,{hour:"2-digit",minute:"2-digit",hour12:!1}),g=$.useMemo(()=>{const E=d.formatToParts(new Date),{value:O}=E.find(L=>L.type==="literal");return O},[d]),v=$.useMemo(()=>{const E=60/t;return[...Array(24).keys()].flatMap(O=>[...Array(E).keys()].map(L=>d.format(new Date(0,0,0,O,L*t))))},[t,d]),x=E=>{(!E||T0(E))&&c(E)},w=E=>{const[O,L]=E.split(g);if(!O&&!L)return;const I=Number(O??"0"),V=Number(L??"0");if(!(I>23||V>59))return d.format(new Date(0,0,0,I,V))},C=E=>{const O=w(E.target.value);O?(c(O),f(O)):c(h)},S=E=>{if(typeof E<"u"){const O=w(E);f(O)}else f(E)};$.useEffect(()=>{const E=typeof e>"u"?"":e;T0(E)&&c(E)},[e,c]);const T=`\\d{2}${xee(g)}\\d{2}`;return p.jsx(yee,{...i,ref:o,value:h,onChange:S,isPrintableCharacter:T0,allowCustomValue:!0,placeholder:`--${g}--`,autocomplete:"none",startIcon:p.jsx(Z_,{fill:"neutral500"}),inputMode:"numeric",pattern:T,textValue:a,onTextValueChange:x,onBlur:C,children:v.map(E=>p.jsx(vJ,{value:E,children:E},E))})});$.forwardRef(({clearLabel:t="clear",dateLabel:e="Choose date",timeLabel:n="Choose time",disabled:r=!1,hasError:i,onChange:o,onClear:s,required:a=!1,step:c,value:h,initialDate:f,size:d,...g},v)=>{const x=$.useRef(null),[w,C]=yr({defaultProp:f?Sa(f,!1):void 0,prop:h?Sa(h,!1):h??void 0,onChange(J){o&&o(J?.toDate(As()))}}),S=uf("DateTimePicker"),R=Xr(S.locale,{hour:"2-digit",minute:"2-digit",hour12:!1}),T=w?R.format(w.toDate(As())):"",E=J=>{let G=J?Sa(J):void 0;if(!(G&&w&&G.compare(w)===0)){if(T&&G){const[re,se]=T.split(":");G=G.set({hour:parseInt(re,10),minute:parseInt(se,10)})}C(G)}},O=J=>{if(!J)return;const[G,re]=J.split(":"),se=w?w.set({hour:parseInt(G,10),minute:parseInt(re,10)}):Sa(new Date).set({hour:parseInt(G,10),minute:parseInt(re,10)});C(se)},L=J=>{C(void 0),s&&s(J)},I=()=>{const J=w?w.set({hour:0,minute:0}):Sa(new Date);C(J)},V=gn(x,v),{error:F,id:H,labelNode:K}=mn("DateTimePicker"),W=!!F||i;return p.jsxs(ue,{"aria-labelledby":K?`${H}-label`:void 0,role:"group",flex:"1",gap:1,wrap:"wrap",children:[p.jsx(Ao,{flex:"1",children:p.jsx(QJ,{...g,size:d,value:w?.toDate("UTC"),onChange:E,required:a,onClear:s?L:void 0,clearLabel:`${t} date`,disabled:r,ref:V,"aria-label":e})}),p.jsx(Ao,{flex:"1",children:p.jsx(Cee,{size:d,hasError:W,value:T,onChange:O,onClear:s&&T!==void 0&&T!=="00:00"?I:void 0,clearLabel:`${t} time`,required:a,disabled:r,step:c,"aria-label":n})})]})});const Sa=(t,e=!0)=>{const n=t.toISOString();let r=hM(n);return e&&(r=r.set({hour:0,minute:0})),mo(r)},X$=$.forwardRef((t,e)=>p.jsx($ee,{ref:e,background:"neutral150",...t,"data-orientation":"horizontal",role:"separator",tag:"div"})),$ee=k.styled(be)`
  height: 1px;
  border: none;
  /* If contained in a Flex parent we want to prevent the Divider to shink */
  flex-shrink: 0;
`,See=k.styled(be)`
  svg {
    height: 8.8rem;
  }
`;$.forwardRef(({icon:t,content:e,action:n,hasRadius:r=!0,shadow:i="tableShadow"},o)=>p.jsxs(ue,{ref:o,alignItems:"center",direction:"column",padding:11,background:"neutral0",hasRadius:r,shadow:i,children:[t?p.jsx(See,{paddingBottom:6,"aria-hidden":!0,children:t}):null,p.jsx(be,{paddingBottom:4,children:p.jsx(ke,{variant:"delta",tag:"p",textAlign:"center",textColor:"neutral600",children:e})}),n]}));const Z$=Ee.define(),Q$=Ee.define(),Aee=xe.mark({attributes:{style:"background-color: yellow; color: black"}}),Ree=Lt.define({create(){return xe.none},update(t,e){return t=t.map(e.changes),e.effects.forEach(n=>{n.is(Z$)?t=t.update({add:n.value,sort:!0}):n.is(Q$)&&(t=t.update({filter:n.value}))}),t},provide:t=>le.decorations.from(t)});$.forwardRef(({hasError:t,required:e,id:n,value:r="",disabled:i=!1,onChange:o=()=>null,...s},a)=>{const c=$.useRef(),h=$.useRef(),f=$.useRef(),{error:d,...g}=mn("JsonInput"),v=!!d||t,x=g.id??n,w=g.required||e;let C;d?C=`${x}-error`:g.hint&&(C=`${x}-hint`);const S=F=>{const H=h.current?.doc;if(H){const{text:K,to:W}=H.line(F),J=W-K.trimStart().length;W>J&&f.current?.dispatch({effects:Z$.of([Aee.range(J,W)])})}},R=()=>{const F=h.current?.doc;if(F){const H=F.length||0;f.current?.dispatch({effects:Q$.of((K,W)=>W<=0||K>=H)})}},T=({state:F,view:H})=>{f.current=H,h.current=F,R();const W=pq()(H);W.length&&S(F.doc.lineAt(W[0].from).number)},E=(F,H)=>{T(H),o(F)},O=(F,H)=>{f.current=F,h.current=H,T({view:F,state:H})},{setContainer:L,view:I}=_C({value:r,onCreateEditor:O,container:c.current,editable:!i,extensions:[wq(),Ree],onChange:E,theme:"dark",basicSetup:{lineNumbers:!0,bracketMatching:!0,closeBrackets:!0,indentOnInput:!0,syntaxHighlighting:!0,highlightSelectionMatches:!0,tabSize:2}}),V=gn(c,L);return $.useImperativeHandle(a,()=>({...I?.dom,focus(){I&&I.focus()},scrollIntoView(F){I&&I.dom.scrollIntoView(F)}}),[I]),p.jsx(kee,{ref:V,$disabled:i,$hasError:v,alignItems:"stretch",fontSize:2,hasRadius:!0,"aria-required":w,id:x,"aria-describedby":C,...s})});const kee=k.styled(ue)`
  line-height: ${({theme:t})=>t.lineHeights[2]};

  .cm-editor {
    /** 
     * Hard coded since the color is the same between themes,
     * theme.colors.neutral800 changes between themes 
     */
    background-color: #32324d;
    width: 100%;
    outline: none;
    cursor: ${({$disabled:t})=>t?"not-allowed":"text"};
  }

  .cm-scroller {
    border: 1px solid ${({theme:t,$hasError:e})=>e?t.colors.danger600:t.colors.neutral200};
    /* inputFocusStyle will receive hasError prop */
    ${Pi()}
  }

  .cm-editor,
  .cm-scroller {
    border-radius: ${({theme:t})=>t.borderRadius};
  }

  .cm-gutters,
  .cm-activeLineGutter {
    /** 
     * Hard coded since the color is the same between themes,
     * theme.colors.neutral700 changes between themes 
     */
    background-color: #4a4a6a;
  }
`;nn(({disabled:t,...e},n)=>p.jsx(gh,{ref:n,tag:kl,tabIndex:t?-1:void 0,disabled:t,...e}));k.styled(be)`
  // To prevent global outline on focus visible to force an outline when Main is focused
  &:focus-visible {
    outline: none;
  }
`;k.styled(be)`
  text-decoration: none;

  &:focus {
    left: ${({theme:t})=>t.spaces[3]};
    top: ${({theme:t})=>t.spaces[3]};
  }
`;const Tee=Ey,Mee=$.forwardRef((t,e)=>p.jsx(Oy,{...t,asChild:!0,ref:e})),Eee=$.forwardRef((t,e)=>p.jsx(Dy,{children:p.jsx(Oee,{children:p.jsx(Dee,{ref:e,...t})})})),Oee=k.styled(Iy)`
  background: ${t=>j$(t.theme.colors.neutral800,.2)};
  position: fixed;
  inset: 0;
  z-index: ${t=>t.theme.zIndices.overlay};
  will-change: opacity;

  @media (prefers-reduced-motion: no-preference) {
    animation: ${pt.overlayFadeIn} ${t=>t.theme.motion.timings[200]}
      ${t=>t.theme.motion.easings.authenticMotion};
  }
`,Dee=k.styled(_y)`
  max-width: 83rem;
  max-height: 90vh;
  height: auto;
  width: 60%;
  overflow: hidden;
  margin: 0 auto;
  display: flex;
  flex-direction: column;

  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  border-radius: ${t=>t.theme.borderRadius};
  background-color: ${t=>t.theme.colors.neutral0};
  box-shadow: ${t=>t.theme.shadows.popupShadow};
  z-index: ${t=>t.theme.zIndices.modal};

  > form {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  @media (prefers-reduced-motion: no-preference) {
    &[data-state='open'] {
      animation-duration: ${t=>t.theme.motion.timings[200]};
      animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};
      animation-name: ${pt.modalPopIn};
    }

    &[data-state='closed'] {
      animation-duration: ${t=>t.theme.motion.timings[120]};
      animation-timing-function: ${t=>t.theme.motion.easings.easeOutQuad};
      animation-name: ${pt.modalPopOut};
    }
  }
`,J$=$.forwardRef((t,e)=>p.jsx(dm,{...t,asChild:!0,ref:e})),Iee=$.forwardRef(({children:t,closeLabel:e="Close modal",...n},r)=>p.jsxs(_ee,{ref:r,padding:4,paddingLeft:5,paddingRight:5,background:"neutral100",justifyContent:"space-between",...n,tag:"header",children:[t,p.jsx(J$,{children:p.jsx(ni,{withTooltip:!1,label:e,children:p.jsx(Vi,{})})})]})),_ee=k.styled(ue)`
  border-bottom: solid 1px ${t=>t.theme.colors.neutral150};
`,Lee=$.forwardRef((t,e)=>p.jsx(Ly,{asChild:!0,children:p.jsx(ke,{tag:"h2",variant:"omega",fontWeight:"bold",ref:e,...t})})),Bee=$.forwardRef(({children:t,...e},n)=>p.jsx(Nee,{ref:n,...e,children:t})),Nee=k.styled(cf)`
  padding-inline: ${t=>t.theme.spaces[7]};

  & > div {
    padding-block: ${t=>t.theme.spaces[8]};
    /* Add negative margin and padding to avoid cropping the box shadow when the inputs are focused */
    margin: 0 -2px 0 -2px;
    padding-left: 2px;
    padding-right: 2px;

    & > div {
      // the scroll area component applies a display: table to the child, which we don't want.
      display: block !important;
    }
  }
`,jee=$.forwardRef((t,e)=>p.jsx(Fee,{ref:e,padding:4,paddingLeft:5,paddingRight:5,background:"neutral100",justifyContent:"space-between",...t,tag:"footer"})),Fee=k.styled(ue)`
  border-top: solid 1px ${t=>t.theme.colors.neutral150};
  flex: 1;
`,Vee=Object.freeze(Object.defineProperty({__proto__:null,Body:Bee,Close:J$,Content:Eee,Footer:jee,Header:Iee,Root:Tee,Title:Lee,Trigger:Mee},Symbol.toStringTag,{value:"Module"})),Hee="";$.forwardRef(({startAction:t,locale:e,onValueChange:n,value:r,step:i=1,disabled:o=!1,...s},a)=>{const c=uf("NumberInput"),h=e||c.locale,f=$.useRef(new NC(h,{style:"decimal"})),d=$.useRef(new BC(h,{maximumFractionDigits:20})),[g,v]=Pee({prop(L){const I=String(r);return isNaN(Number(I))||I!==L&&L!==""?L:d.current.format(Number(r))},defaultProp:Hee,onChange(L){const I=f.current.parse(L??"");n(isNaN(I)?void 0:I)}}),x=L=>{v(String(L))},w=({target:{value:L}})=>{f.current.isValidPartialNumber(L)&&x(L)},S=(L=>{const I=L.toString();return I.includes(".")?I.split(".")[1].length:0})(i),R=()=>{if(!g){x(i);return}const L=f.current.parse(g),I=isNaN(L)?i:L+i,V=parseFloat(I.toFixed(S));x(d.current.format(V))},T=()=>{if(!g){x(-i);return}const L=f.current.parse(g),I=isNaN(L)?-i:L-i,V=parseFloat(I.toFixed(S));x(d.current.format(V))},E=L=>{if(!o)switch(L.key){case At.DOWN:{L.preventDefault(),T();break}case At.UP:{L.preventDefault(),R();break}}},O=()=>{if(g){const L=f.current.parse(g),I=isNaN(L)?"":d.current.format(L);x(I)}};return p.jsx(lf,{ref:a,startAction:t,disabled:o,type:"text",inputMode:"decimal",onChange:w,onKeyDown:E,onBlur:O,value:g,endAction:p.jsxs(ue,{direction:"column",children:[p.jsx(Fw,{disabled:o,"aria-hidden":!0,$reverse:!0,onClick:R,tabIndex:-1,type:"button","data-testid":"ArrowUp",children:p.jsx(Oi,{fill:"neutral500"})}),p.jsx(Fw,{disabled:o,"aria-hidden":!0,onClick:T,tabIndex:-1,type:"button","data-testid":"ArrowDown",children:p.jsx(Oi,{fill:"neutral500"})})]}),...s})});const Fw=k.styled.button`
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateY(${({$reverse:t})=>t?"-2px":"2px"});
  cursor: ${({disabled:t})=>t?"not-allowed":void 0};
  height: 1.1rem;

  svg {
    width: 1.2rem;
    transform: ${({$reverse:t})=>t?"rotateX(180deg)":void 0};
  }
`;function Pee({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=p$({defaultProp:e,onChange:n}),o=t!==void 0,s=t instanceof Function?t(r):t,a=o?s:r,c=_g(n),h=$.useCallback(f=>{if(o){const g=typeof f=="function"?f(s):f;g!==s&&(c(g),i(f))}else i(f)},[o,s,i,c]);return[a,h]}const Wee=$.createContext({activePage:1,pageCount:1}),rp=()=>$.useContext(Wee);nn(({children:t,...e},n)=>{const{activePage:r}=rp(),i=r===1;return p.jsxs(t7,{ref:n,"aria-disabled":i,tabIndex:i?-1:void 0,...e,children:[p.jsx(Io,{children:t}),p.jsx(L3,{"aria-hidden":!0})]})});nn(({children:t,...e},n)=>{const{activePage:r,pageCount:i}=rp(),o=r===i;return p.jsxs(t7,{ref:n,"aria-disabled":o,tabIndex:o?-1:void 0,...e,children:[p.jsx(Io,{children:t}),p.jsx(im,{"aria-hidden":!0})]})});const e7=k.styled(kl)`
  padding: ${({theme:t})=>t.spaces[3]};
  border-radius: ${({theme:t})=>t.borderRadius};
  box-shadow: ${({$active:t,theme:e})=>t?e.shadows.filterShadow:void 0};
  text-decoration: none;
  display: flex;

  ${rf}
`,t7=k.styled(e7)`
  font-size: 1.1rem;

  svg path {
    fill: ${t=>t["aria-disabled"]?t.theme.colors.neutral300:t.theme.colors.neutral600};
  }

  &:focus,
  &:hover {
    svg path {
      fill: ${t=>t["aria-disabled"]?t.theme.colors.neutral300:t.theme.colors.neutral700};
    }
  }

  ${t=>t["aria-disabled"]?`
  pointer-events: none;
    `:void 0}
`;nn(({number:t,children:e,...n},r)=>{const{activePage:i}=rp(),o=i===t;return p.jsxs(zee,{ref:r,...n,"aria-current":o,$active:o,children:[p.jsx(Io,{children:e}),p.jsx(ke,{"aria-hidden":!0,fontWeight:o?"bold":void 0,lineHeight:"revert",variant:"pi",children:t})]})});const zee=k.styled(e7)`
  color: ${({theme:t,$active:e})=>e?t.colors.primary700:t.colors.neutral800};
  background: ${({theme:t,$active:e})=>e?t.colors.neutral0:void 0};

  &:hover {
    box-shadow: ${({theme:t})=>t.shadows.filterShadow};
  }
`,Uee=oX,qee=sX,Kee=uX,Gee=$.forwardRef((t,e)=>p.jsx(aX,{...t,asChild:!0,ref:e})),Yee=$.forwardRef((t,e)=>p.jsx(lX,{children:p.jsx(Xee,{sideOffset:4,side:"bottom",align:"start",...t,ref:e})})),Xee=k.styled(cX)`
  box-shadow: ${({theme:t})=>t.shadows.filterShadow};
  z-index: ${({theme:t})=>t.zIndices.popover};
  background-color: ${t=>t.theme.colors.neutral0};
  border: 1px solid ${({theme:t})=>t.colors.neutral150};
  border-radius: ${({theme:t})=>t.borderRadius};

  @media (prefers-reduced-motion: no-preference) {
    animation-duration: ${t=>t.theme.motion.timings[200]};

    &[data-state='open'] {
      animation-timing-function: ${t=>t.theme.motion.easings.authenticMotion};

      &[data-side='top'] {
        animation-name: ${pt.slideUpIn};
      }

      &[data-side='bottom'] {
        animation-name: ${pt.slideDownIn};
      }
    }

    &[data-state='closed'] {
      animation-timing-function: ${t=>t.theme.motion.easings.easeOutQuad};

      &[data-side='top'] {
        animation-name: ${pt.slideUpOut};
      }

      &[data-side='bottom'] {
        animation-name: ${pt.slideDownOut};
      }
    }
  }
`,Zee=$.forwardRef(({children:t,intersectionId:e,onReachEnd:n,...r},i)=>{const o=$.useRef(null),s=gn(o,i),a=Tn();return Tl(o,n??(()=>{}),{selectorToWatch:`#${Vs(a)}`,skipWhen:!e||!n}),p.jsxs(Qee,{ref:s,...r,children:[t,e&&n&&p.jsx(be,{id:Vs(a),width:"100%",height:"1px"})]})}),Qee=k.styled(cf)`
  height: 20rem;
`,Jee=Object.freeze(Object.defineProperty({__proto__:null,Anchor:qee,Arrow:Kee,Content:Yee,Root:Uee,ScrollArea:Zee,Trigger:Gee},Symbol.toStringTag,{value:"Module"}));$.forwardRef(({size:t="M",value:e,...n},r)=>p.jsx(ete,{ref:r,$size:t,...n,children:p.jsx(tte,{style:{transform:`translate3D(-${100-(e??0)}%, 0, 0)`}})}));const ete=k.styled(wX)`
  position: relative;
  overflow: hidden;
  width: ${t=>t.$size==="S"?"7.8rem":"10.2rem"};
  height: ${t=>t.$size==="S"?"0.4rem":"0.8rem"};
  background-color: ${t=>t.theme.colors.neutral600};
  border-radius: ${t=>t.theme.borderRadius};

  /* Fix overflow clipping in Safari */
  /* https://gist.github.com/domske/b66047671c780a238b51c51ffde8d3a0 */
  transform: translateZ(0);
`,tte=k.styled(xX)`
  background-color: ${({theme:t})=>t.colors.neutral0};
  border-radius: ${({theme:t})=>t.borderRadius};
  width: 100%;
  height: 100%;

  @media (prefers-reduced-motion: no-preference) {
    transition: transform ${t=>t.theme.motion.timings[320]}
      ${t=>t.theme.motion.easings.authenticMotion};
  }
`;$.forwardRef((t,e)=>p.jsx(nte,{ref:e,...t}));const nte=k.styled(BX)`
  display: flex;
  flex-direction: column;
  gap: ${t=>t.theme.spaces[3]};
`;$.forwardRef(({children:t,id:e,...n},r)=>{const i=Tn(e);return p.jsxs(ue,{gap:2,children:[p.jsx(rte,{id:i,ref:r,...n,children:p.jsx(ite,{})}),p.jsx(ke,{tag:"label",htmlFor:i,children:t})]})});const rte=k.styled(NX)`
  background: ${t=>t.theme.colors.neutral0};
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  border-radius: 50%;
  border: 1px solid ${t=>t.theme.colors.neutral300};
  position: relative;
  cursor: pointer;
  z-index: 0;

  @media (prefers-reduced-motion: no-preference) {
    transition: border-color ${t=>t.theme.motion.timings[120]}
      ${t=>t.theme.motion.easings.easeOutQuad};
  }

  &[data-state='checked'] {
    border: 1px solid ${t=>t.theme.colors.primary600};
  }

  &[data-disabled] {
    cursor: not-allowed;
    background-color: ${t=>t.theme.colors.neutral200};
  }

  /* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */
  &::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    min-width: 44px;
    min-height: 44px;
  }
`,ite=k.styled(jX)`
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;

  &[data-state='checked'] {
    @media (prefers-reduced-motion: no-preference) {
      animation: ${pt.popIn} ${t=>t.theme.motion.timings[200]};
    }
  }

  &::after {
    content: '';
    display: block;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: ${t=>t.theme.colors.primary600};
  }
`,ote=t=>{const e=t.querySelector('[tabindex="0"]');e&&e.focus()},n7=$.createContext({rowIndex:0,colIndex:0,setTableValues(){throw new Error("setTableValues must be initialized via the RawTableContext.Provider")}}),ste=()=>$.useContext(n7),ate=$.forwardRef(({colCount:t,rowCount:e,jumpStep:n=3,initialCol:r=0,initialRow:i=0,...o},s)=>{const a=$.useRef(null),c=$.useRef(!1),h=gn(a,s),[f,d]=$.useState(i),[g,v]=$.useState(r),x=$.useCallback(({colIndex:S,rowIndex:R})=>{v(S),d(R)},[]);$.useEffect(()=>{c.current&&ote(a.current),c.current||(c.current=!0)},[g,f]);const w=S=>{switch(S.key){case At.RIGHT:{S.preventDefault(),v(R=>R<t-1?R+1:R);break}case At.LEFT:{S.preventDefault(),v(R=>R>0?R-1:R);break}case At.UP:{S.preventDefault(),d(R=>R>0?R-1:R);break}case At.DOWN:{S.preventDefault(),d(R=>R<e-1?R+1:R);break}case At.HOME:{S.preventDefault(),S.ctrlKey&&d(0),v(0);break}case At.END:{S.preventDefault(),S.ctrlKey&&d(e-1),v(t-1);break}case At.PAGE_DOWN:{S.preventDefault(),d(R=>R+n<e?R+n:e-1);break}case At.PAGE_UP:{S.preventDefault(),d(R=>R-n>0?R-n:0);break}}},C=$.useMemo(()=>({rowIndex:f,colIndex:g,setTableValues:x}),[g,f,x]);return p.jsx(n7.Provider,{value:C,children:p.jsx("table",{role:"grid",ref:h,"aria-rowcount":e,"aria-colcount":t,onKeyDown:w,...o})})}),oo=(t,e)=>[...t.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter(i=>i.hasAttribute("disabled")?!1:e?!0:i.getAttribute("tabindex")!=="-1"),M0=t=>t.filter(e=>e.tagName==="INPUT"?e.type!=="checkbox"&&e.type!=="radio":!1),r7=$.forwardRef(({coords:t={col:0,row:0},tag:e="td",...n},r)=>{const i=$.useRef(null),o=gn(r,i),{rowIndex:s,colIndex:a,setTableValues:c}=ste(),[h,f]=$.useState(!1),d=x=>{const w=oo(i.current,!0);if(w.length===0||w.length===1&&M0(w).length===0)return;if(w.length>1&&!w.find(S=>S.tagName!=="BUTTON")){x.preventDefault();const S=w.findIndex(R=>R===document.activeElement);if(x.key===At.RIGHT){const R=w[S+1];R&&(x.stopPropagation(),R.focus())}else if(x.key===At.LEFT){const R=w[S-1];R&&(x.stopPropagation(),R.focus())}return}const C=x.key===At.ENTER;if(C&&!h)f(!0);else if((x.key===At.ESCAPE||C)&&h){if(C&&document.activeElement?.tagName==="A")return;f(!1),i.current.focus()}else h&&x.stopPropagation()},g=s===t.row-1&&a===t.col-1;So(()=>{const x=oo(i.current,!0);x.length===0||x.length===1&&M0(x).length!==0||x.length>1&&x.find(w=>w.tagName!=="BUTTON")?(i.current.setAttribute("tabIndex",!h&&g?"0":"-1"),x.forEach((w,C)=>{w.setAttribute("tabIndex",h?"0":"-1"),h&&C===0&&w.focus()})):x.forEach(w=>{w.setAttribute("tabIndex",g?"0":"-1")})},[h,g]);const v=$.useCallback(()=>{const x=oo(i.current,!0);x.length>=1&&(M0(x).length!==0||!x.find(w=>w.tagName!=="BUTTON"))&&f(!0),c({rowIndex:t.row-1,colIndex:t.col-1})},[t,c]);return So(()=>{const x=i.current;return oo(x,!0).forEach(C=>{C.addEventListener("focus",v)}),()=>{oo(x,!0).forEach(S=>{S.removeEventListener("focus",v)})}},[v]),p.jsx(be,{role:"gridcell",tag:e,ref:o,onKeyDown:d,...n})}),lte=t=>p.jsx(r7,{...t,tag:"th"}),cte=({children:t,...e})=>{const n=$.Children.toArray(t).map(r=>$.isValidElement(r)?$.cloneElement(r,{"aria-rowindex":1}):r);return p.jsx("thead",{...e,children:n})},ute=({children:t,...e})=>{const n=$.Children.toArray(t).map((r,i)=>$.isValidElement(r)?$.cloneElement(r,{"aria-rowindex":i+2}):r);return p.jsx("tbody",{...e,children:n})},hte=({children:t,...e})=>{const n=$.Children.toArray(t).map((r,i)=>$.isValidElement(r)?$.cloneElement(r,{"aria-colindex":i+1,coords:{col:i+1,row:e["aria-rowindex"]}}):r);return p.jsx(be,{tag:"tr",...e,children:n})},fte=k.styled(Vi)`
  font-size: 0.5rem;
  path {
    fill: ${({theme:t})=>t.colors.neutral500};
  }
`,i7=k.styled(N3)`
  font-size: 1rem;
  path {
    fill: ${({theme:t})=>t.colors.neutral500};
  }
`,dte=k.styled.div`
  border-radius: ${({theme:t})=>t.borderRadius};
  border: 1px solid ${({theme:t})=>t.colors.neutral150}

  &:focus-within {
    ${i7} {
      fill: ${({theme:t})=>t.colors.primary600};
    }
  }
`,gte=k.styled(lf)`
  border: 1px solid ${({theme:t})=>t.colors.neutral150}
  height: 16px;
  padding: 0 0 0 8px;
  color: ${({theme:t})=>t.colors.neutral800};
  
  &:hover {
    button {
      cursor: pointer;
    }
  }

  ${Pi()}
`,mte=$.forwardRef(({name:t,children:e,value:n="",onClear:r,clearLabel:i="Clear",...o},s)=>{const a=$.useRef(null),c=n.length>0,h=d=>{r(d),a.current.focus()},f=x$(s,a);return p.jsx(dte,{children:p.jsxs(Ao,{name:t,children:[p.jsx(Io,{children:p.jsx(ep,{children:e})}),p.jsx(gte,{size:"S",ref:f,value:n,startAction:p.jsx(i7,{"aria-hidden":!0}),endAction:c?p.jsx(ni,{onClick:h,onMouseDown:d=>{d.preventDefault()},label:i,size:"XS",variant:"ghost",type:"button",children:p.jsx(fte,{})}):void 0,...o})]})})}),pte=t=>p.jsx("form",{...t,role:"search"}),vte=k.styled(be)`
  display: inline-flex;
  border: none;

  & > svg {
    height: 1.2rem;
    width: 1.2rem;
  }

  & > svg path {
    fill: ${({theme:t,...e})=>e["aria-disabled"]?t.colors.neutral600:t.colors.primary600};
  }

  &:hover {
    cursor: ${({$iconAction:t})=>t?"pointer":"initial"};
  }
`,bte=({children:t,icon:e,label:n,disabled:r=!1,onClick:i,...o})=>{const s=a=>{r||!i||i(a)};return p.jsxs(ue,{inline:!0,background:r?"neutral200":"primary100",color:r?"neutral700":"primary600",paddingLeft:3,paddingRight:1,borderColor:r?"neutral300":"primary200",hasRadius:!0,height:"3.2rem",...o,children:[p.jsx(wte,{$disabled:r,variant:"pi",fontWeight:"bold",children:t}),p.jsx(vte,{tag:"button",disabled:r,"aria-disabled":r,"aria-label":n,padding:2,onClick:s,$iconAction:!!i,children:e})]})},wte=k.styled(ke)`
  color: inherit;
  border-right: 1px solid ${({theme:t,$disabled:e})=>e?t.colors.neutral300:t.colors.primary200};
  padding-right: ${({theme:t})=>t.spaces[2]};
`,xte=$.forwardRef(({children:t,clearLabel:e="Clear",customizeContent:n,disabled:r,hasError:i,id:o,name:s,onChange:a,onClear:c,onCloseAutoFocus:h,onReachEnd:f,placeholder:d,required:g,size:v,startIcon:x,value:w,withTags:C,...S},R)=>{const T=$.useRef(null),[E,O]=$.useState(),[L,I]=$.useState(!1),V=we=>{a?a(we):O(we)},F=we=>()=>{const qe=Array.isArray(w)?w.filter(Te=>Te!==we):(E??[]).filter(Te=>Te!==we);a?a(qe):O(qe)},H=we=>{I(we)},K=Tn(),W=`intersection-${Vs(K)}`;Tl(T,we=>{f&&f(we)},{selectorToWatch:`#${W}`,skipWhen:!L});const G=typeof w<"u"&&w!==null?w:E,re=we=>we&&typeof we=="object"&&we.value?p.jsx(bte,{tabIndex:-1,disabled:r,icon:p.jsx(Vi,{width:`${14/16}rem`,height:`${14/16}rem`}),onClick:F(we.value),children:we.textValue},we.value):null,{error:se,...te}=mn("MultiSelect"),ne=!!se||i,Y=te.id??o,ce=te.name??s,me=te.required??g;let Ie;return se?Ie=`${Y}-error`:te.hint&&(Ie=`${Y}-hint`),p.jsxs(H$,{onOpenChange:H,disabled:r,required:me,onValueChange:V,value:G,...S,multi:!0,children:[p.jsx(P$,{ref:R,id:Y,name:ce,"aria-label":S["aria-label"],"aria-describedby":Ie??S["aria-describedby"],startIcon:x,hasError:ne,disabled:r,clearLabel:e,onClear:G?.length?c:void 0,withTags:!!(C&&(G?.length??!1)),size:v,children:p.jsx(W$,{placeholder:d,textColor:G?.length?"neutral800":"neutral600",children:G?.length?C?re:n?n(G):void 0:void 0})}),p.jsx(z$,{children:p.jsx(U$,{position:"popper",sideOffset:4,onCloseAutoFocus:h,children:p.jsxs(q$,{ref:T,children:[t,p.jsx(be,{id:W,width:"100%",height:"1px"})]})})})]})}),o7=$.forwardRef(({value:t,children:e,startIcon:n,...r},i)=>p.jsxs(np,{ref:i,value:t.toString(),...r,children:[n&&p.jsx(be,{tag:"span","aria-hidden":!0,children:n}),p.jsx(K$,{children:({isSelected:o,isIntermediate:s})=>p.jsx(af,{checked:s?"indeterminate":o})}),p.jsx(ke,{children:p.jsx(G$,{children:e})})]}));$.forwardRef(({children:t,label:e,startIcon:n,values:r=[],...i},o)=>p.jsxs(YJ,{ref:o,children:[p.jsxs(np,{value:r,...i,children:[n&&p.jsx(be,{tag:"span","aria-hidden":!0,children:n}),p.jsx(K$,{children:({isSelected:s,isIntermediate:a})=>p.jsx(af,{checked:a?"indeterminate":s})}),p.jsx(ke,{children:e})]}),t]}));k.styled(o7)`
  padding-left: ${({theme:t})=>t.spaces[7]};
`;const yte="23.2rem",Cte=$.forwardRef(({...t},e)=>p.jsx($te,{ref:e,...t,tag:"nav"})),$te=k.styled(be)`
  width: ${yte};
  background: ${({theme:t})=>t.colors.neutral100};
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid ${({theme:t})=>t.colors.neutral200};
  z-index: 1;
`,Vw=k.styled(X$)`
  width: 2.4rem;
  background-color: ${({theme:t})=>t.colors.neutral200};
`,Ste=({tag:t="h2",label:e,searchLabel:n="",searchable:r=!1,onChange:i=()=>{},value:o="",onClear:s=()=>{},onSubmit:a=()=>{},id:c,placeholder:h})=>{const[f,d]=$.useState(!1),g=Yx(f),v=Tn(c),x=$.useRef(void 0),w=$.useRef(void 0);$.useEffect(()=>{f&&x.current&&x.current.focus(),g&&!f&&w.current&&w.current.focus()},[f,g]);const C=()=>{d(E=>!E)},S=E=>{s(E),x.current.focus()},R=E=>{E.relatedTarget?.id!==v&&d(!1)},T=E=>{E.key===At.ESCAPE&&d(!1)};return f?p.jsxs(be,{paddingLeft:4,paddingTop:5,paddingBottom:2,paddingRight:4,children:[p.jsx(pte,{children:p.jsx(mte,{name:"searchbar",value:o,onChange:i,placeholder:h,onKeyDown:T,ref:x,onBlur:R,onClear:S,onSubmit:a,clearLabel:"Clear",children:n})}),p.jsx(be,{paddingLeft:2,paddingTop:4,children:p.jsx(Vw,{})})]}):p.jsxs(ue,{direction:"column",alignItems:"flex-start",paddingLeft:6,paddingTop:6,paddingBottom:2,paddingRight:4,children:[p.jsxs(ue,{justifyContent:"space-between",alignItems:"flex-start",width:"100%",gap:2,children:[p.jsx(ke,{variant:"beta",tag:t,children:e}),r&&p.jsx(ni,{ref:w,onClick:C,label:n,children:p.jsx(N3,{})})]}),p.jsx(be,{paddingTop:4,children:p.jsx(Vw,{})})]})},Ate=nn(({active:t,children:e,icon:n=null,withBullet:r=!1,isSubSectionChild:i=!1,...o},s)=>p.jsxs(Rte,{background:"neutral100",paddingLeft:i?9:7,paddingBottom:2,paddingTop:2,ref:s,...o,children:[p.jsxs(ue,{children:[n?p.jsx(kte,{children:n}):p.jsx(cg,{$active:t}),p.jsx(ke,{paddingLeft:2,children:e})]}),r&&p.jsx(ue,{paddingRight:4,children:p.jsx(cg,{$active:!0})})]})),cg=k.styled.span`
  width: 0.4rem;
  height: 0.4rem;
  background-color: ${({theme:t,$active:e})=>e?t.colors.primary600:t.colors.neutral600};
  border-radius: 50%;
`,Rte=k.styled(kl)`
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: ${({theme:t})=>t.colors.neutral800};
  svg > * {
    fill: ${({theme:t})=>t.colors.neutral600};
  }

  &.active {
    ${({theme:t})=>k.css`
        background-color: ${t.colors.primary100};
        border-right: 2px solid ${t.colors.primary600};
        color: ${t.colors.primary700};
        font-weight: 500;
      `}

    ${cg} {
      background-color: ${({theme:t})=>t.colors.primary600};
    }
  }

  &:focus-visible {
    outline-offset: -2px;
  }
`,kte=k.styled.div`
  svg {
    height: 1.6rem;
    width: 1.6rem;
  }
`;k.styled.button`
  border: none;
  padding: 0;
  background: transparent;
  display: flex;
  align-items: center;
`;const Tte=({collapsable:t=!1,label:e,onClick:n=()=>{},ariaExpanded:r,ariaControls:i})=>t?p.jsxs(ue,{tag:"button",onClick:n,"aria-expanded":r,"aria-controls":i,textAlign:"left",alignItems:"center",children:[p.jsx(be,{paddingRight:1,children:p.jsx(ke,{variant:"sigma",textColor:"neutral600",children:e})}),t&&p.jsx(Oi,{width:"1.2rem","aria-hidden":!0,fill:"neutral500",style:{transform:r?"rotateX(0deg)":"rotateX(180deg)"}})]}):p.jsx(ue,{children:p.jsx(be,{paddingRight:1,children:p.jsx(ke,{variant:"sigma",textColor:"neutral600",children:e})})}),Mte=k.styled(be)`
  & > svg {
    height: 0.4rem;
    fill: ${({theme:t})=>t.colors.neutral500};
  }
`,Ete=({collapsable:t=!1,label:e,badgeLabel:n,children:r,id:i})=>{const[o,s]=$.useState(!0),a=Tn(i),c=()=>{s(h=>!h)};return p.jsxs(ue,{direction:"column",alignItems:"stretch",gap:1,children:[p.jsx(Mte,{paddingLeft:6,paddingTop:2,paddingBottom:2,paddingRight:4,children:p.jsxs(be,{position:"relative",paddingRight:n?6:0,children:[p.jsx(Tte,{onClick:c,ariaExpanded:o,ariaControls:a,collapsable:t,label:e}),n&&p.jsx(Ym,{backgroundColor:"neutral150",textColor:"neutral600",position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",children:n})]})}),(!t||o)&&p.jsx("ol",{id:a,children:$.Children.map(r,(h,f)=>p.jsx("li",{children:h},f))})]})},Ote=({children:t,spacing:e=2,horizontal:n=!1,...r})=>p.jsx(be,{paddingTop:2,paddingBottom:4,children:p.jsx(ue,{tag:"ol",gap:e,direction:n?"row":"column",alignItems:n?"center":"stretch",...r,children:$.Children.map(t,(i,o)=>p.jsx("li",{children:i},o))})}),Dte=$.forwardRef(({visibleLabels:t,onLabel:e="On",offLabel:n="Off",onCheckedChange:r,checked:i,defaultChecked:o,disabled:s,...a},c)=>{const[h,f]=yr({prop:i,defaultProp:o}),d=g=>{f(g)};return p.jsxs(ue,{gap:3,children:[p.jsx(Ite,{ref:c,onCheckedChange:uo(r,d),checked:h,disabled:s,...a,children:p.jsx(_te,{})}),t?p.jsx(Lte,{"aria-hidden":!0,"data-disabled":s,"data-state":h?"checked":"unchecked",children:h?e:n}):null]})}),Ite=k.styled(qX)`
  width: 4rem;
  height: 2.4rem;
  border-radius: 1.2rem;
  background-color: ${({theme:t})=>t.colors.danger500};

  &[data-state='checked'] {
    background-color: ${({theme:t})=>t.colors.success500};
  }

  &[data-disabled] {
    background-color: ${({theme:t})=>t.colors.neutral300};
  }

  @media (prefers-reduced-motion: no-preference) {
    transition: ${t=>t.theme.transitions.backgroundColor};
  }
`,_te=k.styled(KX)`
  display: block;
  height: 1.6rem;
  width: 1.6rem;
  border-radius: 50%;
  background-color: ${({theme:t})=>t.colors.neutral0};
  transform: translateX(4px);

  &[data-state='checked'] {
    transform: translateX(20px);
  }

  @media (prefers-reduced-motion: no-preference) {
    transition: transform ${t=>t.theme.motion.timings[120]}
      ${t=>t.theme.motion.easings.authenticMotion};
  }
`,Lte=k.styled(ke)`
  color: ${t=>t.theme.colors.danger600};

  &[data-state='checked'] {
    color: ${t=>t.theme.colors.success600};
  }

  &[data-disabled='true'] {
    color: ${({theme:t})=>t.colors.neutral500};
  }
`,[Bte,ip]=Rl("Tabs");$.forwardRef(({disabled:t=!1,variant:e="regular",hasError:n,...r},i)=>p.jsx(Bte,{disabled:t,hasError:n,variant:e,children:p.jsx(Nte,{ref:i,...r})}));const Nte=k.styled(rZ)`
  width: 100%;
  position: relative;
`;$.forwardRef((t,e)=>{const{variant:n}=ip("List");return p.jsx(jte,{ref:e,...t,$variant:n})});const jte=k.styled(iZ)`
  display: flex;
  align-items: ${t=>t.$variant==="regular"?"flex-end":"unset"};
  position: relative;
  z-index: 0;
`;$.forwardRef(({children:t,disabled:e,...n},r)=>{const{disabled:i,variant:o,hasError:s}=ip("Trigger"),a=i===!0||i===n.value||e,c=s===n.value;return p.jsxs(Fte,{ref:r,...n,$hasError:c,$variant:o,disabled:a,children:[p.jsx(a7,{fontWeight:"bold",variant:o==="simple"?"sigma":void 0,children:t}),o==="simple"?p.jsx(s7,{}):null]})});const s7=k.styled.span`
  display: block;
  width: 100%;
  background-color: currentColor;
  position: absolute;
  bottom: 0;
  left: 0;
  opacity: 0;
  height: 0.2rem;
`,a7=k.styled(ke)``,Fte=k.styled(oZ)`
  position: relative;
  color: ${t=>t.$hasError?t.theme.colors.danger600:t.theme.colors.neutral600};
  cursor: pointer;
  z-index: 0;

  ${t=>t.$variant==="simple"?k.css`
        padding-block: ${e=>e.theme.spaces[4]};
        padding-inline: ${e=>e.theme.spaces[4]};

        & > ${a7} {
          line-height: 1.2rem;
        }

        &[data-state='active'] {
          color: ${t.$hasError?t.theme.colors.danger600:t.theme.colors.primary700};

          & > ${s7} {
            opacity: 1;
          }
        }
      `:k.css`
        padding-block: ${e=>e.theme.spaces[3]};
        padding-inline: ${e=>e.theme.spaces[3]};
        flex: 1;
        background-color: ${e=>e.theme.colors.neutral100};
        border-bottom: solid 1px ${e=>e.theme.colors.neutral150};

        &:not([data-state='active']) + &:not([data-state='active']) {
          border-left: solid 1px ${e=>e.theme.colors.neutral150};
        }

        &[data-state='active'] {
          padding-block: ${e=>e.theme.spaces[4]};
          padding-inline: ${e=>e.theme.spaces[4]};
          color: ${t.$hasError?t.theme.colors.danger600:t.theme.colors.primary700};
          border-top-right-radius: ${e=>e.theme.borderRadius};
          border-top-left-radius: ${e=>e.theme.borderRadius};
          background-color: ${e=>e.theme.colors.neutral0};
          border-bottom: solid 1px ${e=>e.theme.colors.neutral0};
          box-shadow: ${t.theme.shadows.tableShadow};
          z-index: 1;
        }
      `}

  &[data-disabled] {
    cursor: not-allowed;
    color: ${t=>t.theme.colors.neutral400};
  }
`;$.forwardRef((t,e)=>{const{variant:n}=ip("Content");return p.jsx(Vte,{$variant:n,ref:e,...t})});const Vte=k.styled(sZ)`
  ${t=>t.$variant==="simple"?k.css``:k.css`
        position: relative;
        z-index: 1;
        background-color: ${e=>e.theme.colors.neutral0};
      `}
`,Hte=k.styled(be)`
  overflow: hidden;
  border: 1px solid ${({theme:t})=>t.colors.neutral150};
`,Pte=k.styled(ate)`
  width: 100%;
  white-space: nowrap;
`,Wte=k.styled(be)`
  &:before {
    // TODO: make sure to add a token for this weird stuff
    background: linear-gradient(90deg, #c0c0cf 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.2;
    position: absolute;
    height: 100%;
    content: ${({$overflowing:t})=>t==="both"||t==="left"?"''":void 0};
    box-shadow: ${({theme:t})=>t.shadows.tableShadow};
    width: ${({theme:t})=>t.spaces[2]};
    left: 0;
  }

  &:after {
    // TODO: make sure to add a token for this weird stuff
    background: linear-gradient(270deg, #c0c0cf 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.2;
    position: absolute;
    height: 100%;
    content: ${({$overflowing:t})=>t==="both"||t==="right"?"''":void 0};
    box-shadow: ${({theme:t})=>t.shadows.tableShadow};
    width: ${({theme:t})=>t.spaces[2]};
    right: 0;
    top: 0;
  }
`,zte=k.styled(be)`
  overflow-x: auto;
`,Ute=$.forwardRef(({footer:t,...e},n)=>{const r=$.useRef(null),[i,o]=$.useState(),s=a=>{const c=a.target.scrollWidth-a.target.clientWidth;if(a.target.scrollLeft===0){o("right");return}if(a.target.scrollLeft===c){o("left");return}a.target.scrollLeft>0&&o("both")};return $.useEffect(()=>{r.current.scrollWidth>r.current.clientWidth&&o("right")},[]),p.jsxs(Hte,{shadow:"tableShadow",hasRadius:!0,background:"neutral0",children:[p.jsx(Wte,{$overflowing:i,position:"relative",children:p.jsx(zte,{ref:r,onScroll:s,paddingLeft:6,paddingRight:6,children:p.jsx(Pte,{ref:n,...e})})}),t]})}),qte=k.styled(ute)`
  & tr:last-of-type {
    border-bottom: none;
  }
`,Kte=({children:t,...e})=>p.jsx(qte,{...e,children:t}),Gte=k.styled(cte)`
  border-bottom: 1px solid ${({theme:t})=>t.colors.neutral150};
`,Yte=({children:t,...e})=>p.jsx(Gte,{...e,children:t}),Xte=k.styled(hte)`
  border-bottom: 1px solid ${({theme:t})=>t.colors.neutral150};

  & td,
  & th {
    padding: ${({theme:t})=>t.spaces[4]};
  }

  & td:first-of-type,
  & th:first-of-type {
    padding: 0 ${({theme:t})=>t.spaces[1]};
  }

  // Resetting padding values and fixing a height
  th {
    padding-top: 0;
    padding-bottom: 0;
    height: 5.6rem;
  }
`,Zte=t=>p.jsx(Xte,{...t}),l7=k.styled(r7)`
  vertical-align: middle;
  text-align: left;
  outline-offset: -4px;

  /**
  * Hack to make sure the checkbox looks aligned
  */
  input {
    vertical-align: sub;
  }
`,Qte=$.forwardRef(({children:t,action:e,...n},r)=>p.jsx(l7,{color:"neutral600",as:lte,ref:r,...n,children:p.jsxs(ue,{children:[t,e]})})),Jte=$.forwardRef(({children:t,...e},n)=>p.jsx(l7,{color:"neutral800",ref:n,...e,children:t}));k.styled(be)`
  height: 2.4rem;
  width: 2.4rem;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;

  svg {
    height: 1rem;
    width: 1rem;
  }

  svg path {
    fill: ${({theme:t})=>t.colors.primary600};
  }
`;k.styled(be)`
  border-radius: 0 0 ${({theme:t})=>t.borderRadius} ${({theme:t})=>t.borderRadius};
  display: block;
  width: 100%;
  border: none;
`;nn(({children:t,startIcon:e,endIcon:n,disabled:r=!1,loading:i=!1,...o},s)=>{const a=r||i;return p.jsxs(nne,{ref:s,disabled:a,"aria-disabled":a,tag:"button",type:"button",gap:2,...o,children:[i?p.jsx(tne,{"aria-hidden":!0,children:p.jsx(B3,{})}):e,p.jsx(ke,{variant:"pi",children:t}),n]})});const ene=k.keyframes`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(359deg);
  }
`,tne=k.styled.span`
  display: flex;
  animation: ${ene} 2s infinite linear;
  will-change: transform;
`,nne=k.styled(ue)`
  border: none;
  background-color: transparent;
  color: ${t=>t.theme.colors.primary600};
  cursor: pointer;

  &[aria-disabled='true'] {
    pointer-events: none;
    color: ${t=>t.theme.colors.neutral600};
  }

  ${rf}
`,rne=$.forwardRef((t,e)=>p.jsx(lf,{ref:e,...t}));rne.displayName="TextInput";$.forwardRef(({disabled:t,hasError:e,id:n,name:r,required:i,...o},s)=>{const{error:a,...c}=mn("Textarea"),h=!!a||e,f=c.id??n,d=c.name??r,g=c.required||i;let v;return a?v=`${f}-error`:c.hint&&(v=`${f}-hint`),p.jsx(ine,{borderColor:h?"danger600":"neutral200",$hasError:h,hasRadius:!0,children:p.jsx(one,{"aria-invalid":h,"aria-required":g,tag:"textarea",background:t?"neutral150":"neutral0",color:t?"neutral600":"neutral800",disabled:t,fontSize:2,hasRadius:!0,ref:s,lineHeight:4,padding:4,width:"100%",height:"100%",id:f,name:d,"aria-describedby":v,...o})})});const ine=k.styled(be)`
  height: 10.5rem;
  ${Pi()}
`,one=k.styled(be)`
  border: none;
  resize: none;

  &::placeholder {
    color: ${({theme:t})=>t.colors.neutral600};
    font-size: ${({theme:t})=>t.fontSizes[2]};
    opacity: 1;
  }

  &:focus-within {
    outline: none;
  }

  &:disabled {
    cursor: not-allowed;
  }
`,sne=$.forwardRef(({offLabel:t,onLabel:e,disabled:n,hasError:r,required:i,id:o,name:s,checked:a,onChange:c,...h},f)=>{const[d=!1,g]=yr({prop:a}),v=d!==null&&!d,{error:x,...w}=mn("Toggle"),C=!!x||r,S=w.id??o,R=w.name??s,T=w.required||i;let E;return x?E=`${S}-error`:w.hint&&(E=`${S}-hint`),p.jsxs(ane,{position:"relative",hasRadius:!0,padding:1,background:n?"neutral150":"neutral100",borderStyle:"solid",borderWidth:"1px",borderColor:"neutral200",wrap:"wrap",cursor:n?"not-allowed":"pointer",$hasError:C,children:[p.jsx(Hw,{hasRadius:!0,flex:"1 1 50%",paddingTop:2,paddingBottom:2,paddingLeft:3,paddingRight:3,justifyContent:"center",background:n&&v?"neutral200":v?"neutral0":"transparent",borderColor:n&&v?"neutral300":v?"neutral200":n?"neutral150":"neutral100",children:p.jsx(ke,{variant:"pi",fontWeight:"bold",textTransform:"uppercase",textColor:n?"neutral700":v?"danger700":"neutral600",children:t})}),p.jsx(Hw,{hasRadius:!0,flex:"1 1 50%",paddingLeft:3,paddingRight:3,justifyContent:"center",background:n&&d?"neutral200":d?"neutral0":"transparent",borderColor:n&&d?"neutral300":d?"neutral200":n?"neutral150":"neutral100",children:p.jsx(ke,{variant:"pi",fontWeight:"bold",textTransform:"uppercase",textColor:n?"neutral700":d?"primary600":"neutral600",children:e})}),p.jsx(lne,{...h,id:S,name:R,ref:f,onChange:O=>{g(O.currentTarget.checked),c?.(O)},type:"checkbox","aria-required":T,disabled:n,"aria-disabled":n,checked:!!d,"aria-describedby":E})]})}),ane=k.styled(ue)`
  ${Pi()}
`,Hw=k.styled(ue)`
  padding-block: 0.6rem;
`,lne=k.styled.input`
  height: 100%;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  z-index: 0;
  width: 100%;
`,cne=nn((t,e)=>{const{gap:n=0,gridCols:r=12,...i}=t;return p.jsx(une,{ref:e,$gap:n,$gridCols:r,...i})}),une=k.styled(be)`
  display: grid;
  grid-template-columns: repeat(${({$gridCols:t})=>t}, 1fr);
  ${({theme:t,$gap:e})=>nf({gap:e},t)}
`,hne=nn(({col:t,s:e,xs:n,m:r,...i},o)=>p.jsx(fne,{ref:o,$col:t,$s:e,$xs:n,$m:r,...i})),fne=k.styled(ue)`
  grid-column: span ${({$xs:t})=>t??12};
  max-width: 100%;

  ${({theme:t})=>t.breakpoints.small} {
    grid-column: span ${({$s:t,$xs:e})=>t??e??12};
  }

  ${({theme:t})=>t.breakpoints.medium} {
    grid-column: span ${({$m:t,$s:e,$xs:n})=>t??e??n??12};
  }

  ${({theme:t})=>t.breakpoints.large} {
    grid-column: span ${({$col:t,$m:e,$s:n,$xs:r})=>t??e??n??r??12};
  }
`,dne=Object.freeze(Object.defineProperty({__proto__:null,Item:hne,Root:cne},Symbol.toStringTag,{value:"Module"})),gne=({onEscape:t,restoreFocus:e=!0,skipAutoFocus:n=!1,...r})=>{const i=$.useRef(null);$.useEffect(()=>{let s=null;return e&&(s=document.activeElement),()=>{s&&s.focus()}},[e]),$.useEffect(()=>{if(!i.current||n)return;const s=oo(i.current);s.length>0?s[0].focus():console.warn("[FocusTrap]: it seems there are no focusable elements in the focus trap tree. Make sure there s at least one.")},[n]);const o=s=>{if(s.key===At.ESCAPE&&t){t();return}if(s.key!==At.TAB)return;const a=oo(i.current);if(a.length>0){const c=a[0],h=a[a.length-1];s.shiftKey?c===document.activeElement&&(s.preventDefault(),h.focus()):h===document.activeElement&&(s.preventDefault(),c.focus())}};return p.jsx("div",{ref:i,onKeyDown:o,...r})};k.styled(ue)`
    &>* {
        width: 100%;
    }
`;const mne="strapi-plugin-comments",pne={displayName:"Comments"},vne=576,bne=({width:t=24,height:e=24})=>p.jsx("svg",{viewBox:`0 0 ${t} ${e}`,xmlns:"http://www.w3.org/2000/svg",height:`${e}px`,children:p.jsx("g",{style:{transform:`scale(${t/vne})`},fill:"currentColor",children:p.jsx("path",{d:"M416 192c0-88.4-93.1-160-208-160S0 103.6 0 192c0 34.3 14.1 65.9 38 92-13.4 30.2-35.5 54.2-35.8 54.5-2.2 2.3-2.8 5.7-1.5 8.7S4.8 352 8 352c36.6 0 66.9-12.3 88.7-25 32.2 15.7 70.3 25 111.3 25 114.9 0 208-71.6 208-160zm122 220c23.9-26 38-57.7 38-92 0-66.9-53.5-124.2-129.3-148.1.9 6.6 1.3 13.3 1.3 20.1 0 105.9-107.7 192-240 192-10.8 0-21.3-.8-31.7-1.9C207.8 439.6 281.8 480 368 480c41 0 79.1-9.2 111.3-25 21.8 12.7 52.1 25 88.7 25 3.2 0 6.1-1.9 7.3-4.8 1.3-2.9.7-6.3-1.5-8.7-.3-.3-22.4-24.2-35.8-54.5z"})})}),wne=p.jsx(bne,{}),xne=()=>wne,zt={render:t=>`plugin::comments.${t}`,comments:{read:"comments-read",moderate:"comments-moderate"},reports:{read:"reports-read",review:"reports-review"},settings:{read:"settings-read",change:"settings-change"}},ug={access:[{action:zt.render(zt.comments.read),subject:null},{action:zt.render(zt.reports.read),subject:null},{action:zt.render(zt.settings.read),subject:null}],moderate:[{action:zt.render(zt.comments.moderate),subject:null}],reports:[{action:zt.render(zt.reports.read),subject:null}],reportsReview:[{action:zt.render(zt.reports.review),subject:null}],settings:[{action:zt.render(zt.settings.read),subject:null}],settingsChange:[{action:zt.render(zt.settings.change),subject:null}]},Hr=mne.replace(/^strapi-plugin-/i,""),Pw={en:()=>Promise.resolve().then(()=>require("./en-DalOPLjA.js")),fr:()=>Promise.resolve().then(()=>require("./fr-C4_v32Lz.js")),"pt-BR":()=>Promise.resolve().then(()=>require("./pt-BR-CCBBpLDV.js")),tr:()=>Promise.resolve().then(()=>require("./tr-D_0EQ9aV.js")),ru:()=>Promise.resolve().then(()=>require("./ru-DUiPYaBn.js")),"zh-Hans":()=>Promise.resolve().then(()=>require("./zh-Hans-D1xXhhCe.js")),pl:()=>Promise.resolve().then(()=>require("./pl-D2JXVqZi.js"))},{displayName:Ww}=pne,yne={register(t){t.addMenuLink({to:`/plugins/${Hr}`,badgeContent:1,icon:xne,intlLabel:{id:`${Hr}.plugin.name`,defaultMessage:Ww},Component:()=>Promise.resolve().then(()=>require("./index-DFSVVbXk.js")),permissions:ug.access}),t.createSettingSection({id:Hr,intlLabel:{id:`${Hr}.plugin.section`,defaultMessage:`${Ww} plugin`}},[{intlLabel:{id:`${Hr}.plugin.section.item`,defaultMessage:"Configuration"},id:"comments",to:`/settings/${Hr}`,Component:()=>Promise.resolve().then(()=>require("./index-Ddsb0ILo.js")),permissions:ug.settings}])},registerTrads:async function({locales:t=[]}){return Promise.all(t.map(async e=>e in Pw?Pw[e]().then(({default:r})=>({data:_v(E0(r),Hr),locale:e})):{data:_v(E0({}),Hr),locale:e}))}};exports.Accordion=BZ;exports.Alert=WZ;exports.Avatar=QZ;exports.Badge=Ym;exports.Box=be;exports.Button=gh;exports.CheckboxImpl=af;exports.DesignSystemProvider=LJ;exports.Dialog=EJ;exports.Divider=X$;exports.Field=iJ;exports.Flex=ue;exports.FocusTrap=gne;exports.ForwardRef$19=EN;exports.ForwardRef$1T=JB;exports.ForwardRef$1Z=GB;exports.ForwardRef$1l=CN;exports.ForwardRef$1n=wN;exports.ForwardRef$1z=hN;exports.ForwardRef$2F=wB;exports.ForwardRef$2v=RB;exports.ForwardRef$3L=_L;exports.ForwardRef$3P=TL;exports.ForwardRef$4B=G_;exports.ForwardRef$4H=H_;exports.ForwardRef$4N=__;exports.ForwardRef$4d=Vi;exports.ForwardRef$4j=cL;exports.ForwardRef$4r=rL;exports.ForwardRef$5=j3;exports.ForwardRef$55=w_;exports.ForwardRef$5b=g_;exports.ForwardRef$5j=l_;exports.ForwardRef$5v=e_;exports.ForwardRef$X=VN;exports.ForwardRef$h=dj;exports.ForwardRef$n=lj;exports.ForwardRef$z=ej;exports.Grid=dne;exports.IconButton=ni;exports.IconButtonGroup=pQ;exports.Link=k$;exports.Loader=N$;exports.MenuItem=DQ;exports.Modal=Vee;exports.MultiSelect=xte;exports.MultiSelectOption=o7;exports.Popover=Jee;exports.Portal$1=tp;exports.SimpleMenu=O$;exports.SingleSelect=ag;exports.SingleSelectOption=lg;exports.SubNav=Cte;exports.SubNavHeader=Ste;exports.SubNavLink=Ate;exports.SubNavSection=Ete;exports.SubNavSections=Ote;exports.SwitchImpl=Dte;exports.Table=Ute;exports.Tbody=Kte;exports.Td=Jte;exports.Th=Qte;exports.Thead=Yte;exports.Toggle=sne;exports.TooltipImpl=Jm;exports.Tr=Zte;exports.Typography=ke;exports.__rest=Ks;exports.commonjsGlobal=hs;exports.darkTheme=YQ;exports.getAugmentedNamespace=lZ;exports.getDefaultExportFromCjs=aZ;exports.index=yne;exports.lightTheme=_$;exports.lodashExports=cZ;exports.pluginId=Hr;exports.pluginPermissions=ug;