1 line
5.2 KiB
JavaScript
1 line
5.2 KiB
JavaScript
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8992],{9519:(e,t,r)=>{r.d(t,{A:()=>i});let i=(0,r(43200).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},35019:(e,t,r)=>{r.d(t,{A:()=>i});let i=(0,r(43200).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},57469:(e,t,r)=>{r.d(t,{N:()=>f});var i=r(91356),s=r(65537),l=r(1709),n=r(64427),h=r(4208);function f(e){let t=e+"CollectionProvider",[r,f]=(0,s.A)(t),[u,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=e=>{let{scope:t,children:r}=e,s=i.useRef(null),l=i.useRef(new Map).current;return(0,h.jsx)(u,{scope:t,itemMap:l,collectionRef:s,children:r})};a.displayName=t;let c=e+"CollectionSlot",d=(0,n.TL)(c),p=i.forwardRef((e,t)=>{let{scope:r,children:i}=e,s=o(c,r),n=(0,l.s)(t,s.collectionRef);return(0,h.jsx)(d,{ref:n,children:i})});p.displayName=c;let y=e+"CollectionItemSlot",k="data-radix-collection-item",m=(0,n.TL)(y),v=i.forwardRef((e,t)=>{let{scope:r,children:s,...n}=e,f=i.useRef(null),u=(0,l.s)(t,f),a=o(y,r);return i.useEffect(()=>(a.itemMap.set(f,{ref:f,...n}),()=>void a.itemMap.delete(f))),(0,h.jsx)(m,{...{[k]:""},ref:u,children:s})});return v.displayName=y,[{Provider:a,Slot:p,ItemSlot:v},function(t){let r=o(e+"CollectionConsumer",t);return i.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${k}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},f]}var u=new WeakMap;function o(e,t){var r,i;let s,l,n;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let h=(r=e,i=t,s=r.length,(n=(l=a(i))>=0?l:s+l)<0||n>=s?-1:n);return -1===h?void 0:e[h]}function a(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],u.set(this,!0)}set(e,t){return u.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let i,s=this.has(t),l=this.#e.length,n=a(e),h=n>=0?n:l+n,f=h<0||h>=l?-1:h;if(f===this.size||s&&f===this.size-1||-1===f)return this.set(t,r),this;let u=this.size+ +!s;n<0&&h++;let o=[...this.#e],c=!1;for(let e=h;e<u;e++)if(h===e){let l=o[e];o[e]===t&&(l=o[e+1]),s&&this.delete(t),i=this.get(l),this.set(t,r)}else{c||o[e-1]!==t||(c=!0);let r=o[c?e:e-1],s=i;i=this.get(r),this.delete(r),this.set(r,s)}return this}with(t,r,i){let s=new e(this);return s.insert(t,r,i),s}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let i=this.#e.indexOf(e);return -1===i?this:this.insert(i,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let i=this.#e.indexOf(e);return -1===i?this:this.insert(i+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=o(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=o(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return o(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return i;r++}}findIndex(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return r;r++}return -1}filter(t,r){let i=[],s=0;for(let e of this)Reflect.apply(t,r,[e,s,this])&&i.push(e),s++;return new e(i)}map(t,r){let i=[],s=0;for(let e of this)i.push([e[0],Reflect.apply(t,r,[e,s,this])]),s++;return new e(i)}reduce(...e){let[t,r]=e,i=0,s=r??this.at(0);for(let r of this)s=0===i&&1===e.length?r:Reflect.apply(t,this,[s,r,i,this]),i++;return s}reduceRight(...e){let[t,r]=e,i=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let s=this.at(r);i=r===this.size-1&&1===e.length?s:Reflect.apply(t,this,[i,s,r,this])}return i}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),i=this.get(r);t.set(r,i)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let i=new e,s=this.size-1;if(void 0===t)return i;t<0&&(t+=this.size),void 0!==r&&r>0&&(s=r-1);for(let e=t;e<=s;e++){let t=this.keyAt(e),r=this.get(t);i.set(t,r)}return i}every(e,t){let r=0;for(let i of this){if(!Reflect.apply(e,t,[i,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return!0;r++}return!1}})},62118:(e,t,r)=>{r.d(t,{jH:()=>l});var i=r(91356);r(4208);var s=i.createContext(void 0);function l(e){let t=i.useContext(s);return e||t||"ltr"}},70799:(e,t,r)=>{r.d(t,{sG:()=>n});var i=r(91356);r(86669);var s=r(49402),l=r(4208),n=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,s.TL)(`Primitive.${t}`),n=i.forwardRef((e,i)=>{let{asChild:s,...n}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,l.jsx)(s?r:t,{...n,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{})}}]); |