import{A as $,aY as Ce,aZ as Oe,a_ as ae,q as te,as as Ae,o as B,p as we,at as Me,a$ as Te,b0 as ze,b as _e,y as Re,u as ke,b1 as Pe,D as ce,i as f,f as M,g as _,$ as $e,a0 as J,F as Ue,B as ue,aS as he,S as H,d as q,ag as Z,t as U,l as Ve}from"./index-DWMGWNy8.js";import{f as Ne}from"./global-BCvoRSag.js";const Fe=()=>{const[n,i]=$([]),[e,t]=$([]),s=async()=>{const[{rules:o},{providers:a}]=await Promise.all([Ce(),Oe()]);i(Object.values(o)),t(Object.values(a))};return{rules:n,ruleProviders:e,updateRules:s,updateAllRuleProvider:async()=>{await Promise.all(e().map(o=>ae(o.name))),await s()},updateRuleProviderByName:async o=>{await ae(o),await s()}}};function P(n,i,e){let t=e.initialDeps??[],s;return()=>{var r,l,o,a;let u;e.key&&((r=e.debug)!=null&&r.call(e))&&(u=Date.now());const c=n();if(!(c.length!==t.length||c.some((y,m)=>t[m]!==y)))return s;t=c;let v;if(e.key&&((l=e.debug)!=null&&l.call(e))&&(v=Date.now()),s=i(...c),e.key&&((o=e.debug)!=null&&o.call(e))){const y=Math.round((Date.now()-u)*100)/100,m=Math.round((Date.now()-v)*100)/100,A=m/16,E=(S,T)=>{for(S=String(S);S.lengthMath.abs(n-i)<1,De=(n,i,e)=>{let t;return function(...s){n.clearTimeout(t),t=n.setTimeout(()=>i.apply(this,s),e)}},je=n=>n,He=n=>{const i=Math.max(n.startIndex-n.overscan,0),e=Math.min(n.endIndex+n.overscan,n.count-1),t=[];for(let s=i;s<=e;s++)t.push(s);return t},Be=(n,i)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;const s=l=>{const{width:o,height:a}=l;i({width:Math.round(o),height:Math.round(a)})};if(s(e.getBoundingClientRect()),!t.ResizeObserver)return()=>{};const r=new t.ResizeObserver(l=>{const o=l[0];if(o!=null&&o.borderBoxSize){const a=o.borderBoxSize[0];if(a){s({width:a.inlineSize,height:a.blockSize});return}}s(e.getBoundingClientRect())});return r.observe(e,{box:"border-box"}),()=>{r.unobserve(e)}},de={passive:!0},Ke=typeof window>"u"?!0:"onscrollend"in window,Le=(n,i)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;let s=0;const r=Ke?()=>{}:De(t,()=>{i(s,!1)},n.options.isScrollingResetDelay),l=u=>()=>{const{horizontal:c,isRtl:h}=n.options;s=c?e.scrollLeft*(h&&-1||1):e.scrollTop,r(),i(s,u)},o=l(!0),a=l(!1);return a(),e.addEventListener("scroll",o,de),e.addEventListener("scrollend",a,de),()=>{e.removeEventListener("scroll",o),e.removeEventListener("scrollend",a)}},Ye=(n,i,e)=>{if(i!=null&&i.borderBoxSize){const t=i.borderBoxSize[0];if(t)return Math.round(t[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(n.getBoundingClientRect()[e.options.horizontal?"width":"height"])},Qe=(n,{adjustments:i=0,behavior:e},t)=>{var s,r;const l=n+i;(r=(s=t.scrollElement)==null?void 0:s.scrollTo)==null||r.call(s,{[t.options.horizontal?"left":"top"]:l,behavior:e})};class Xe{constructor(i){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(s=>{s.forEach(r=>{this._measureElement(r.target,r)})}));return{disconnect:()=>{var s;(s=t())==null||s.disconnect(),e=null},observe:s=>{var r;return(r=t())==null?void 0:r.observe(s,{box:"border-box"})},unobserve:s=>{var r;return(r=t())==null?void 0:r.unobserve(s)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,s])=>{typeof s>"u"&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:je,rangeExtractor:He,onChange:()=>{},measureElement:Ye,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,...e}},this.notify=e=>{var t,s;(s=(t=this.options).onChange)==null||s.call(t,this,e)},this.maybeNotify=P(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t){this.maybeNotify();return}this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,r)=>{this.scrollAdjustments=0,this.scrollDirection=r?this.getScrollOffset()this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const s=new Map,r=new Map;for(let l=t-1;l>=0;l--){const o=e[l];if(s.has(o.lane))continue;const a=r.get(o.lane);if(a==null||o.end>a.end?r.set(o.lane,o):o.endl.end===o.end?l.index-o.index:l.end-o.end)[0]:void 0},this.getMeasurementOptions=P(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,t,s,r,l)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:s,getItemKey:r,enabled:l}),{key:!1}),this.getMeasurements=P(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:s,getItemKey:r,enabled:l},o)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const a=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,a);for(let c=a;cthis.options.debug}),this.calculateRange=P(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(e,t,s)=>this.range=e.length>0&&t>0?Ge({measurements:e,outerSize:t,scrollOffset:s}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=P(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(e,t,s,r)=>t===null?[]:e({startIndex:t.startIndex,endIndex:t.endIndex,overscan:s,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,s=e.getAttribute(t);return s?parseInt(s,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const s=this.indexFromElement(e),r=this.measurementsCache[s];if(!r)return;const l=r.key,o=this.elementsCache.get(l);o!==e&&(o&&this.observer.unobserve(o),this.observer.observe(e),this.elementsCache.set(l,e)),e.isConnected&&this.resizeItem(s,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const s=this.measurementsCache[e];if(!s)return;const r=this.itemSizeCache.get(s.key)??s.size,l=t-r;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,l,this):s.start{if(!e){this.elementsCache.forEach((t,s)=>{t.isConnected||(this.observer.unobserve(t),this.elementsCache.delete(s))});return}this._measureElement(e,void 0)},this.getVirtualItems=P(()=>[this.getIndexes(),this.getMeasurements()],(e,t)=>{const s=[];for(let r=0,l=e.length;rthis.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(t.length!==0)return ee(t[be(0,t.length-1,s=>ee(t[s]).start,e)])},this.getOffsetForAlignment=(e,t)=>{const s=this.getSize(),r=this.getScrollOffset();t==="auto"&&(e<=r?t="start":e>=r+s?t="end":t="start"),t==="start"?e=e:t==="end"?e=e-s:t==="center"&&(e=e-s/2);const l=this.options.horizontal?"scrollWidth":"scrollHeight",a=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[l]:this.scrollElement[l]:0)-s;return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const s=this.measurementsCache[e];if(!s)return;const r=this.getSize(),l=this.getScrollOffset();if(t==="auto")if(s.end>=l+r-this.options.scrollPaddingEnd)t="end";else if(s.start<=l+this.options.scrollPaddingStart)t="start";else return[l,t];const o=t==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,t),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:s})},this.scrollToIndex=(e,{align:t="auto",behavior:s}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const r=this.getOffsetForIndex(e,t);if(!r)return;const[l,o]=r;this._scrollToOffset(l,{adjustments:void 0,behavior:s}),s!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const[u]=ee(this.getOffsetForIndex(e,o));We(u,this.getScrollOffset())||this.scrollToIndex(e,{align:o,behavior:s})}else this.scrollToIndex(e,{align:o,behavior:s})}))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let s;return t.length===0?s=this.options.paddingStart:s=this.options.lanes===1?((e=t[t.length-1])==null?void 0:e.end)??0:Math.max(...t.slice(-this.options.lanes).map(r=>r.end)),s-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(e,{adjustments:t,behavior:s})=>{this.options.scrollToFn(e,{behavior:s,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(i)}}const be=(n,i,e,t)=>{for(;n<=i;){const s=(n+i)/2|0,r=e(s);if(rt)i=s-1;else return s}return n>0?n-1:0};function Ge({measurements:n,outerSize:i,scrollOffset:e}){const t=n.length-1,r=be(0,t,o=>n[o].start,e);let l=r;for(;lt;case"getTotalSize":return()=>r();default:return Reflect.get(u,c)}}},a=new Proxy(e,o);return a.setOptions(i),B(()=>{const u=a._didMount();a._willUpdate(),we(u)}),Me(()=>{a.setOptions(te(i,n,{onChange:(u,c)=>{var h;u._willUpdate(),s(Te(u.getVirtualItems(),{key:"index"})),l(u.getTotalSize()),(h=n.onChange)==null||h.call(n,u,c)}})),a.measure()}),a}function fe(n){return Je(te({observeElementRect:Be,observeElementOffset:Le,scrollToFn:Qe},n))}var K={exports:{}},ye={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î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"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},xe=Object.keys(ye).join("|"),qe=new RegExp(xe,"g"),Ze=new RegExp(xe,"");function et(n){return ye[n]}var Ie=function(n){return n.replace(qe,et)},tt=function(n){return!!n.match(Ze)};K.exports=Ie;K.exports.has=tt;K.exports.remove=Ie;var st=K.exports;const nt=ze(st);/** * @name match-sorter * @license MIT license. * @copyright (c) 2020 Kent C. Dodds * @author Kent C. Dodds (https://kentcdodds.com) */const x={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0},it=(n,i)=>String(n.rankedValue).localeCompare(String(i.rankedValue));function se(n,i,e){e===void 0&&(e={});const{keys:t,threshold:s=x.MATCHES,baseSort:r=it,sorter:l=u=>u.sort((c,h)=>at(c,h,r))}=e,o=n.reduce(a,[]);return l(o).map(u=>{let{item:c}=u;return c});function a(u,c,h){const v=rt(c,t,i,e),{rank:y,keyThreshold:m=s}=v;return y>=m&&u.push({...v,item:c,index:h}),u}}se.rankings=x;function rt(n,i,e,t){if(!i){const r=n;return{rankedValue:r,rank:me(r,e,t),keyIndex:-1,keyThreshold:t.threshold}}return ht(n,i).reduce((r,l,o)=>{let{rank:a,rankedValue:u,keyIndex:c,keyThreshold:h}=r,{itemValue:v,attributes:y}=l,m=me(v,e,t),A=u;const{minRanking:E,maxRanking:S,threshold:T}=y;return m=x.MATCHES?m=E:m>S&&(m=S),m>a&&(a=m,c=o,h=T,A=v),{rankedValue:A,rank:a,keyIndex:c,keyThreshold:h}},{rankedValue:n,rank:x.NO_MATCH,keyIndex:-1,keyThreshold:t.threshold})}function me(n,i,e){return n=ge(n,e),i=ge(i,e),i.length>n.length?x.NO_MATCH:n===i?x.CASE_SENSITIVE_EQUAL:(n=n.toLowerCase(),i=i.toLowerCase(),n===i?x.EQUAL:n.startsWith(i)?x.STARTS_WITH:n.includes(` ${i}`)?x.WORD_STARTS_WITH:n.includes(i)?x.CONTAINS:i.length===1?x.NO_MATCH:lt(n).includes(i)?x.ACRONYM:ot(n,i))}function lt(n){let i="";return n.split(" ").forEach(t=>{t.split("-").forEach(r=>{i+=r.substr(0,1)})}),i}function ot(n,i){let e=0,t=0;function s(a,u,c){for(let h=c,v=u.length;h-1))return x.NO_MATCH}const o=t-l;return r(o)}function at(n,i,e){const{rank:r,keyIndex:l}=n,{rank:o,keyIndex:a}=i;return r===o?l===a?e(n,i):lo?-1:1}function ge(n,i){let{keepDiacritics:e}=i;return n=`${n}`,e||(n=nt(n)),n}function ct(n,i){typeof i=="object"&&(i=i.key);let e;if(typeof i=="function")e=i(n);else if(n==null)e=null;else if(Object.hasOwnProperty.call(n,i))e=n[i];else{if(i.includes("."))return ut(i,n);e=null}return e==null?[]:Array.isArray(e)?e:[String(e)]}function ut(n,i){const e=n.split(".");let t=[i];for(let s=0,r=e.length;s"),ft=U('
'),mt=U('