This commit is contained in:
1 parent
b9655a5ab1
commit
e292824161
122 files changed
+90002
-69
No files matched your search
@@ -0,0 +1,5 @@
|
||||
var Tn=Object.defineProperty;var Mn=(e,t,n)=>t in e?Tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var lt=(e,t,n)=>Mn(e,typeof t!="symbol"?t+"":t,n);import{r as l,R as j,d as Oe,j as T}from"./react-vendor-jWT2yUdV.js";import{c as Fe,L as ct,u as Nn,k as An,b as jt}from"./index-DiaaLdUu.js";import{z as Bt}from"./react-hot-toast-cGcFZPSt.js";import{p as On,x as Ft}from"./index-FvTxWQTZ.js";import{X as kn}from"./xterm-m1lN6Krd.js";import"./qface-BZLvZXJ8.js";import"./react-router-dom-C6k78GT4.js";import"./iconBase-B7bT1FlI.js";function Ln(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const nt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ye(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function wt(e){return"nodeType"in e}function B(e){var t,n;return e?ye(e)?e:wt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function xt(e){const{Document:t}=B(e);return e instanceof t}function $e(e){return ye(e)?!1:e instanceof B(e).HTMLElement}function Zt(e){return e instanceof B(e).SVGElement}function De(e){return e?ye(e)?e.document:wt(e)?xt(e)?e:$e(e)||Zt(e)?e.ownerDocument:document:document:document}const Q=nt?l.useLayoutEffect:l.useEffect;function yt(e){const t=l.useRef(e);return Q(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function zn(){const e=l.useRef(null),t=l.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=l.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Pe(e,t){t===void 0&&(t=[e]);const n=l.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function Xe(e,t){const n=l.useRef();return l.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ze(e){const t=yt(e),n=l.useRef(null),r=l.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function gt(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}let ut={};function Ue(e,t){return l.useMemo(()=>{if(t)return t;const n=ut[e]==null?0:ut[e]+1;return ut[e]=n,e+"-"+n},[e,t])}function Qt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,i)=>{const a=Object.entries(i);for(const[c,d]of a){const u=s[c];u!=null&&(s[c]=u+e*d)}return s},{...t})}}const xe=Qt(1),Qe=Qt(-1);function Pn(e){return"clientX"in e&&"clientY"in e}function Dt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function jn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function vt(e){if(jn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Pn(e)?{x:e.clientX,y:e.clientY}:null}const je=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[je.Translate.toString(e),je.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),$t="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Bn(e){return e.matches($t)?e:e.querySelector($t)}const Fn={display:"none"};function $n(e){let{id:t,value:n}=e;return j.createElement("div",{id:t,style:Fn},n)}function Xn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return j.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Un(){const[e,t]=l.useState("");return{announce:l.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const en=l.createContext(null);function Wn(e){const t=l.useContext(en);l.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Yn(){const[e]=l.useState(()=>new Set),t=l.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[l.useCallback(r=>{let{type:o,event:s}=r;e.forEach(i=>{var a;return(a=i[o])==null?void 0:a.call(i,s)})},[e]),t]}const Kn={draggable:`
|
||||
To pick up a draggable item, press the space bar.
|
||||
While dragging, use the arrow keys to move the item.
|
||||
Press space again to drop the item in its new position, or press escape to cancel.
|
||||
`},Hn={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Vn(e){let{announcements:t=Hn,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Kn}=e;const{announce:s,announcement:i}=Un(),a=Ue("DndLiveRegion"),[c,d]=l.useState(!1);if(l.useEffect(()=>{d(!0)},[]),Wn(l.useMemo(()=>({onDragStart(f){let{active:h}=f;s(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:g}=f;t.onDragMove&&s(t.onDragMove({active:h,over:g}))},onDragOver(f){let{active:h,over:g}=f;s(t.onDragOver({active:h,over:g}))},onDragEnd(f){let{active:h,over:g}=f;s(t.onDragEnd({active:h,over:g}))},onDragCancel(f){let{active:h,over:g}=f;s(t.onDragCancel({active:h,over:g}))}}),[s,t])),!c)return null;const u=j.createElement(j.Fragment,null,j.createElement($n,{id:r,value:o.draggable}),j.createElement(Xn,{id:a,announcement:i}));return n?Oe.createPortal(u,n):u}var A;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(A||(A={}));function et(){}function qn(e,t){return l.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function _n(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const q=Object.freeze({x:0,y:0});function Jn(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Gn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Zn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Qn(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Xt(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const er=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Xt(t,t.left,t.top),s=[];for(const i of r){const{id:a}=i,c=n.get(a);if(c){const d=Jn(Xt(c),o);s.push({id:a,data:{droppableContainer:i,value:d}})}}return s.sort(Gn)};function tr(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),i=o-r,a=s-n;if(r<o&&n<s){const c=t.width*t.height,d=e.width*e.height,u=i*a,f=u/(c+d-u);return Number(f.toFixed(4))}return 0}const nr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const s of r){const{id:i}=s,a=n.get(i);if(a){const c=tr(a,t);c>0&&o.push({id:i,data:{droppableContainer:s,value:c}})}}return o.sort(Zn)};function rr(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function tn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:q}function or(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((i,a)=>({...i,top:i.top+e*a.y,bottom:i.bottom+e*a.y,left:i.left+e*a.x,right:i.right+e*a.x}),{...n})}}const sr=or(1);function ir(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function ar(e,t,n){const r=ir(t);if(!r)return e;const{scaleX:o,scaleY:s,x:i,y:a}=r,c=e.left-i-(1-o)*parseFloat(n),d=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,f=s?e.height/s:e.height;return{width:u,height:f,top:d,right:c+u,bottom:d+f,left:c}}const lr={ignoreTransform:!1};function Se(e,t){t===void 0&&(t=lr);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:u}=B(e).getComputedStyle(e);d&&(n=ar(n,d,u))}const{top:r,left:o,width:s,height:i,bottom:a,right:c}=n;return{top:r,left:o,width:s,height:i,bottom:a,right:c}}function Ut(e){return Se(e,{ignoreTransform:!0})}function cr(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function ur(e,t){return t===void 0&&(t=B(e).getComputedStyle(e)),t.position==="fixed"}function dr(e,t){t===void 0&&(t=B(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}function St(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(xt(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!$e(o)||Zt(o)||n.includes(o))return n;const s=B(e).getComputedStyle(o);return o!==e&&dr(o,s)&&n.push(o),ur(o,s)?n:r(o.parentNode)}return e?r(
Line truncated
|
||||
Reference in new issue
Block a user