react-grab 0.0.25 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +291 -117
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.global.js +16 -16
- package/dist/index.js +292 -118
- package/package.json +1 -1
package/dist/index.global.js
CHANGED
|
@@ -6,29 +6,29 @@ var ReactGrab=(function(exports){'use strict';/**
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
var rr=(e,t)=>e===t;var or=Symbol("solid-track"),qe={equals:rr},Kt=tn,ce=1,Pe=2,Zt={owned:null,cleanups:null,context:null,owner:null};var N=null,h=null,Ne=null,V=null,K=null,ee=null,Ke=0;function Ee(e,t){let n=V,r=N,s=e.length===0,o=t===void 0?r:t,i=s?Zt:{owned:null,cleanups:null,context:o?o.context:null,owner:o},a=s?e:()=>e(()=>re(()=>Te(i)));N=i,V=null;try{return pe(a,!0)}finally{V=n,N=r;}}function _(e,t){t=t?Object.assign({},qe,t):qe;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),en(n,s));return [Jt.bind(n),r]}function te(e,t,n){let r=ft(e,t,false,ce);He(r);}function oe(e,t,n){Kt=cr;let r=ft(e,t,false,ce);(r.user=true),ee?ee.push(r):He(r);}function z(e,t,n){n=n?Object.assign({},qe,n):qe;let r=ft(e,t,true,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,He(r),Jt.bind(r)}function re(e){if(V===null)return e();let t=V;V=null;try{return Ne?Ne.untrack(e):e()}finally{V=t;}}function fe(e,t,n){let r=Array.isArray(e),s;return i=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]();}else a=e();let l=re(()=>t(a,s,i));return s=a,l}}function Qt(e){oe(()=>re(e));}function de(e){return N===null||(N.cleanups===null?N.cleanups=[e]:N.cleanups.push(e)),e}_(false);function Jt(){let e=h;if(this.sources&&(this.state))if((this.state)===ce)He(this);else {let t=K;K=null,pe(()=>We(this),false),K=t;}if(V){let t=this.observers?this.observers.length:0;V.sources?(V.sources.push(this),V.sourceSlots.push(t)):(V.sources=[this],V.sourceSlots=[t]),this.observers?(this.observers.push(V),this.observerSlots.push(V.sources.length-1)):(this.observers=[V],this.observerSlots=[V.sources.length-1]);}return e&&h.sources.has(this)?this.tValue:this.value}function en(e,t,n){let r=e.value;if(!e.comparator||!e.comparator(r,t)){e.value=t;e.observers&&e.observers.length&&pe(()=>{for(let s=0;s<e.observers.length;s+=1){let o=e.observers[s],i=h&&h.running;i&&h.disposed.has(o)||((i?!o.tState:!o.state)&&(o.pure?K.push(o):ee.push(o),o.observers&&nn(o)),i?o.tState=ce:o.state=ce);}if(K.length>1e6)throw K=[],new Error},false);}return t}function He(e){if(!e.fn)return;Te(e);let t=Ke;Xt(e,e.value,t);}function Xt(e,t,n){let r,s=N,o=V;V=N=e;try{r=e.fn(t);}catch(i){return e.pure&&((e.state=ce,e.owned&&e.owned.forEach(Te),e.owned=null)),e.updatedAt=n+1,dt(i)}finally{V=o,N=s;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?en(e,r):e.value=r,e.updatedAt=n);}function ft(e,t,n,r=ce,s){let o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:N,context:N?N.context:null,pure:n};if(N===null||N!==Zt&&(N.owned?N.owned.push(o):N.owned=[o]),Ne);return o}function Le(e){let t=h;if((e.state)===0)return;if((e.state)===Pe)return We(e);if(e.suspense&&re(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Ke);){(e.state)&&n.push(e);}for(let r=n.length-1;r>=0;r--){if(e=n[r],t);if((e.state)===ce)He(e);else if((e.state)===Pe){let s=K;K=null,pe(()=>We(e,n[0]),false),K=s;}}}function pe(e,t){if(K)return e();let n=false;t||(K=[]),ee?n=true:ee=[],Ke++;try{let r=e();return ar(n),r}catch(r){n||(ee=null),K=null,dt(r);}}function ar(e){if(K&&(tn(K),K=null),e)return;let n=ee;ee=null,n.length&&pe(()=>Kt(n),false);}function tn(e){for(let t=0;t<e.length;t++)Le(e[t]);}function cr(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:Le(r);}for(t=0;t<n;t++)Le(e[t]);}function We(e,t){e.state=0;for(let r=0;r<e.sources.length;r+=1){let s=e.sources[r];if(s.sources){let o=s.state;o===ce?s!==t&&(!s.updatedAt||s.updatedAt<Ke)&&Le(s):o===Pe&&We(s,t);}}}function nn(e){for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(!r.state)&&(r.state=Pe,r.pure?K.push(r):ee.push(r),r.observers&&nn(r));}}function Te(e){let t;if(e.sources)for(;e.sources.length;){let n=e.sources.pop(),r=e.sourceSlots.pop(),s=n.observers;if(s&&s.length){let o=s.pop(),i=n.observerSlots.pop();r<s.length&&(o.sourceSlots[i]=r,s[r]=o,n.observerSlots[r]=i);}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Te(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Te(e.owned[t]);e.owned=null;}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null;}e.state=0;}function ur(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function dt(e,t=N){let r=ur(e);throw r;}var fr=Symbol("fallback");function Wt(e){for(let t=0;t<e.length;t++)e[t]();}function dr(e,t,n={}){let r=[],s=[],o=[],i=0,a=t.length>1?[]:null;return de(()=>Wt(o)),()=>{let l=e()||[],c=l.length,d,f;return l[or],re(()=>{let g,S,v,b,T,C,E,A,j;if(c===0)i!==0&&(Wt(o),o=[],r=[],s=[],i=0,a&&(a=[])),n.fallback&&(r=[fr],s[0]=Ee(q=>(o[0]=q,n.fallback())),i=1);else if(i===0){for(s=new Array(c),f=0;f<c;f++)r[f]=l[f],s[f]=Ee(p);i=c;}else {for(v=new Array(c),b=new Array(c),a&&(T=new Array(c)),C=0,E=Math.min(i,c);C<E&&r[C]===l[C];C++);for(E=i-1,A=c-1;E>=C&&A>=C&&r[E]===l[A];E--,A--)v[A]=s[E],b[A]=o[E],a&&(T[A]=a[E]);for(g=new Map,S=new Array(A+1),f=A;f>=C;f--)j=l[f],d=g.get(j),S[f]=d===void 0?-1:d,g.set(j,f);for(d=C;d<=E;d++)j=r[d],f=g.get(j),f!==void 0&&f!==-1?(v[f]=s[d],b[f]=o[d],a&&(T[f]=a[d]),f=S[f],g.set(j,f)):o[d]();for(f=C;f<c;f++)f in v?(s[f]=v[f],o[f]=b[f],a&&(a[f]=T[f],a[f](f))):s[f]=Ee(p);s=s.slice(0,i=c),r=l.slice(0);}return s});function p(g){if(o[f]=g,a){let[S,v]=_(f);return a[f]=v,t(l[f],S)}return t(l[f])}}}function k(e,t){return re(()=>e(t||{}))}var gr=e=>`Stale read from <${e}>.`;function Ze(e){let t="fallback"in e&&{fallback:()=>e.fallback};return z(dr(()=>e.each,e.children,t||void 0))}function Z(e){let t=e.keyed,n=z(()=>e.when,void 0,void 0),r=t?n:z(n,void 0,{equals:(s,o)=>!s==!o});return z(()=>{let s=r();if(s){let o=e.children;return typeof o=="function"&&o.length>0?re(()=>o(t?s:()=>{if(!re(r))throw gr("Show");return n()})):o}return e.fallback},void 0,void 0)}var Fe=e=>z(()=>e());function br(e,t,n){let r=n.length,s=t.length,o=r,i=0,a=0,l=t[s-1].nextSibling,c=null;for(;i<s||a<o;){if(t[i]===n[a]){i++,a++;continue}for(;t[s-1]===n[o-1];)s--,o--;if(s===i){let d=o<r?a?n[a-1].nextSibling:n[o-a]:l;for(;a<o;)e.insertBefore(n[a++],d);}else if(o===a)for(;i<s;)(!c||!c.has(t[i]))&&t[i].remove(),i++;else if(t[i]===n[o-1]&&n[a]===t[s-1]){let d=t[--s].nextSibling;e.insertBefore(n[a++],t[i++].nextSibling),e.insertBefore(n[--o],d),t[s]=n[o];}else {if(!c){c=new Map;let f=a;for(;f<o;)c.set(n[f],f++);}let d=c.get(t[i]);if(d!=null)if(a<d&&d<o){let f=i,p=1,g;for(;++f<s&&f<o&&!((g=c.get(t[f]))==null||g!==d+p);)p++;if(p>d-a){let S=t[i];for(;a<d;)e.insertBefore(n[a++],S);}else e.replaceChild(n[a++],t[i++]);}else i++;else t[i++].remove();}}}function sn(e,t,n,r={}){let s;return Ee(o=>{s=o,t===document?e():Re(t,e(),t.firstChild?null:void 0,n);},r.owner),()=>{s(),t.textContent="";}}function ue(e,t,n,r){let s,o=()=>{let a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},i=()=>(s||(s=o())).cloneNode(true);return i.cloneNode=i,i}function yr(e,t,n){(e.removeAttribute(t));}function Je(e,t,n){if(!t)return n?yr(e,"style"):t;let r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let s,o;for(o in n)t[o]==null&&r.removeProperty(o),delete n[o];for(o in t)s=t[o],s!==n[o]&&(r.setProperty(o,s),n[o]=s);return n}function se(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function Ae(e,t,n){return re(()=>e(t,n))}function Re(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Qe(e,t,r,n);te(s=>Qe(e,t(),s,n),r);}function Qe(e,t,n,r,s){for(;typeof n=="function";)n=n();if(t===n)return n;let i=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(i==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=ke(e,n,r,l);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||i==="boolean"){n=ke(e,n,r);}else {if(i==="function")return te(()=>{let l=t();for(;typeof l=="function";)l=l();n=Qe(e,l,n,r);}),()=>n;if(Array.isArray(t)){let l=[],c=n&&Array.isArray(n);if(mt(l,t,n,s))return te(()=>n=Qe(e,l,n,r,true)),()=>n;if(l.length===0){if(n=ke(e,n,r),a)return n}else c?n.length===0?on(e,l,r):br(e,n,l):(n&&ke(e),on(e,l));n=l;}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=ke(e,n,r,t);ke(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function mt(e,t,n,r){let s=false;for(let o=0,i=t.length;o<i;o++){let a=t[o],l=n&&n[e.length],c;if(!(a==null||a===true||a===false))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))s=mt(e,a,l)||s;else if(c==="function")if(r){for(;typeof a=="function";)a=a();s=mt(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||s;}else e.push(a),s=true;else {let d=String(a);l&&l.nodeType===3&&l.data===d?e.push(l):e.push(document.createTextNode(d));}}return s}function on(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n);}function ke(e,t,n,r){if(n===void 0)return e.textContent="";let s=r||document.createTextNode("");if(t.length){let o=false;for(let i=t.length-1;i>=0;i--){let a=t[i];if(s!==a){let l=a.parentNode===e;!o&&!i?l?e.replaceChild(s,a):e.insertBefore(s,n):l&&a.remove();}else o=true;}}else e.insertBefore(s,n);return [s]}var wr=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"],Sr=e=>!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-"),Tr=e=>Array.isArray(e),xr=(e,t=false)=>{let{composed:n,target:r}=e,s,o;if(r instanceof HTMLElement&&Sr(r)&&n){let a=e.composedPath()[0];a instanceof HTMLElement&&(s=a.tagName,o=a.role);}else r instanceof HTMLElement&&(s=r.tagName,o=r.role);return Tr(t)?!!(s&&t&&t.some(i=>typeof s=="string"&&i.toLowerCase()===s.toLowerCase()||i===o)):!!(s&&t&&t)},ln=e=>xr(e,wr);var $e="data-react-grab",cn=()=>{let e=document.querySelector(`[${$e}]`);if(e){let o=e.shadowRoot?.querySelector(`[${$e}]`);if(o instanceof HTMLDivElement&&e.shadowRoot)return o}let t=document.createElement("div");t.setAttribute($e,"true"),t.style.zIndex="2147483646",t.style.position="fixed",t.style.top="0",t.style.left="0";let n=t.attachShadow({mode:"open"}),r=document.createElement("div");return r.setAttribute($e,"true"),n.appendChild(r),(document.body??document.documentElement).appendChild(t),r};var xe=(e,t,n)=>e+(t-e)*n;var vr=ue("<div>"),et=e=>{let[t,n]=_(e.bounds.x),[r,s]=_(e.bounds.y),[o,i]=_(e.bounds.width),[a,l]=_(e.bounds.height),[c]=_(1),f=false,p=null,g=e.bounds,S=false,v=()=>e.lerpFactor!==void 0?e.lerpFactor:e.variant==="drag"?.9:.95,b=()=>{if(S)return;S=true;let E=()=>{let A=xe(t(),g.x,v()),j=xe(r(),g.y,v()),q=xe(o(),g.width,v()),B=xe(a(),g.height,v());n(A),s(j),i(q),l(B),Math.abs(A-g.x)<.5&&Math.abs(j-g.y)<.5&&Math.abs(q-g.width)<.5&&Math.abs(B-g.height)<.5?(p=null,S=false):p=requestAnimationFrame(E);};p=requestAnimationFrame(E);};oe(fe(()=>e.bounds,E=>{if(g=E,!f){n(g.x),s(g.y),i(g.width),l(g.height),f=true;return}b();})),de(()=>{p!==null&&(cancelAnimationFrame(p),p=null),S=false;});let T={position:"fixed","box-sizing":"border-box","pointer-events":e.variant==="drag"?"none":"auto","z-index":"2147483646"},C=()=>e.variant==="drag"?{border:"1px dashed rgb(210, 57, 192)","background-color":"rgba(210, 57, 192, 0.15)","will-change":"transform, width, height",contain:"layout paint size",cursor:"crosshair"}:{border:"1px solid rgb(210, 57, 192)","background-color":"rgba(210, 57, 192, 0.2)",transition:e.variant==="grabbed"?"opacity 0.3s ease-out":void 0};return k(Z,{get when(){return e.visible!==false},get children(){var E=vr();return te(A=>Je(E,{...T,...C(),top:`${r()}px`,left:`${t()}px`,width:`${o()}px`,height:`${a()}px`,"border-radius":e.bounds.borderRadius,transform:e.bounds.transform,opacity:c()},A)),E}})};var Er=ue('<span style="display:inline-block;width:8px;height:8px;border:1.5px solid rgb(210, 57, 192);border-top-color:transparent;border-radius:50%;margin-right:4px;vertical-align:middle">'),un=e=>{let t;return Qt(()=>{t&&t.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,easing:"linear",iterations:1/0});}),(()=>{var n=Er(),r=t;return typeof r=="function"?Ae(r,n):t=n,te(s=>Je(n,{...e.style},s)),n})()};var je=(e,t,n,r)=>{let s=window.innerWidth,o=window.innerHeight,i=8,a=8,l=s-n-8,c=o-r-8,d=Math.max(i,Math.min(e,l)),f=Math.max(a,Math.min(t,c));return {left:d,top:f}};var Rr=ue("<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713"),Or=ue("<div style=margin-right:4px>Grabbed"),_r=ue(`<div style="position:fixed;padding:2px 6px;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;display:flex;align-items:center;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden;text-overflow:ellipsis;white-space:nowrap"><span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums">`),gt=e=>{let[t,n]=_(0),r;oe(fe(()=>e.visible,i=>{if(i!==false)requestAnimationFrame(()=>{n(1);});else {n(0);return}if(e.variant==="success"){let a=setTimeout(()=>{n(0);},1500);de(()=>clearTimeout(a));}}));let s=()=>r?.getBoundingClientRect(),o=()=>{let i=s();if(!i)return {left:e.x,top:e.y};if(e.variant==="success"){let p=Math.round(e.x),g=Math.round(e.y)-i.height-6,S=p<8,v=g<8,b=S||v,T=je(p,g,i.width,i.height);return b&&(T.left+=4,T.top+=4),T}let a=12,l=window.innerWidth,c=window.innerHeight,d=[{left:Math.round(e.x)+a,top:Math.round(e.y)+a},{left:Math.round(e.x)-i.width-a,top:Math.round(e.y)+a},{left:Math.round(e.x)+a,top:Math.round(e.y)-i.height-a},{left:Math.round(e.x)-i.width-a,top:Math.round(e.y)-i.height-a}];for(let p of d){let g=p.left>=8&&p.left+i.width<=l-8,S=p.top>=8&&p.top+i.height<=c-8;if(g&&S)return p}let f=je(d[0].left,d[0].top,i.width,i.height);return f.left+=4,f.top+=4,f};return k(Z,{get when(){return e.visible!==false},get children(){var i=_r(),a=i.firstChild,l=r;return typeof l=="function"?Ae(l,i):r=i,Re(i,k(Z,{get when(){return e.variant==="processing"},get children(){return k(un,{})}}),a),Re(i,k(Z,{get when(){return e.variant==="success"},get children(){return Rr()}}),a),Re(i,k(Z,{get when(){return e.variant==="success"},get children(){return Or()}}),a),Re(i,k(Z,{get when(){return e.variant==="processing"},children:"Grabbing\u2026"}),a),Re(a,()=>e.text),te(c=>{var d=`${o().top}px`,f=`${o().left}px`,p=e.zIndex?.toString()??"2147483647",g=t();return d!==c.e&&se(i,"top",c.e=d),f!==c.t&&se(i,"left",c.t=f),p!==c.a&&se(i,"z-index",c.a=p),g!==c.o&&se(i,"opacity",c.o=g),c},{e:void 0,t:void 0,a:void 0,o:void 0}),i}})};var Nr=ue('<div style="position:fixed;z-index:2147483647;pointer-events:none;transition:opacity 0.1s ease-in-out"><div style="width:32px;height:2px;background-color:rgba(178, 28, 142, 0.2);border-radius:1px;overflow:hidden;position:relative"><div style="height:100%;background-color:#b21c8e;border-radius:1px;transition:width 0.05s cubic-bezier(0.165, 0.84, 0.44, 1)">'),kr=e=>{let[t,n]=_(0);return oe(fe(()=>e,r=>{r!==false?requestAnimationFrame(()=>{n(1);}):n(0);})),t},fn=e=>{let t=kr(e.visible),n,r=()=>{let s=n?.getBoundingClientRect();if(!s)return {left:e.mouseX,top:e.mouseY};let o=window.innerHeight,i=e.mouseX-s.width/2,a=e.mouseY+14+s.height+8>o?e.mouseY-s.height-14:e.mouseY+14;return je(i,a,s.width,s.height)};return k(Z,{get when(){return e.visible!==false},get children(){var s=Nr(),o=s.firstChild,i=o.firstChild,a=n;return typeof a=="function"?Ae(a,s):n=s,te(l=>{var c=`${r().top}px`,d=`${r().left}px`,f=t(),p=`${Math.min(100,Math.max(0,e.progress*100))}%`;return c!==l.e&&se(s,"top",l.e=c),d!==l.t&&se(s,"left",l.t=d),f!==l.a&&se(s,"opacity",l.a=f),p!==l.o&&se(i,"width",l.o=p),l},{e:void 0,t:void 0,a:void 0,o:void 0}),s}})};var Fr=ue('<div style=position:fixed;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:2147483645><div style="position:absolute;top:0;width:1px;height:100%;background-color:rgba(210, 57, 192, 0.5);will-change:transform"></div><div style="position:absolute;left:0;width:100%;height:1px;background-color:rgba(210, 57, 192, 0.5);will-change:transform">'),dn=e=>{let[t,n]=_(e.mouseX),[r,s]=_(e.mouseY),o=false,i=null,a=e.mouseX,l=e.mouseY,c=false,d=()=>{if(c)return;c=true;let f=()=>{let p=xe(t(),a,.3),g=xe(r(),l,.3);n(p),s(g),Math.abs(p-a)<.5&&Math.abs(g-l)<.5?(i=null,c=false):i=requestAnimationFrame(f);};i=requestAnimationFrame(f);};return oe(fe(()=>[e.mouseX,e.mouseY],([f,p])=>{if(a=f,l=p,!o){n(a),s(l),o=true;return}d();})),de(()=>{i!==null&&(cancelAnimationFrame(i),i=null),c=false;}),k(Z,{get when(){return e.visible!==false},get children(){var f=Fr(),p=f.firstChild,g=p.nextSibling;return te(S=>{var v=`${t()}px`,b=`${r()}px`;return v!==S.e&&se(p,"left",S.e=v),b!==S.t&&se(g,"top",S.t=b),S},{e:void 0,t:void 0}),f}})};var mn=e=>[k(Z,{get when(){return Fe(()=>!!e.selectionVisible)()&&e.selectionBounds},get children(){return k(et,{variant:"selection",get bounds(){return e.selectionBounds},get visible(){return e.selectionVisible}})}}),k(Z,{get when(){return Fe(()=>e.crosshairVisible===true&&e.mouseX!==void 0)()&&e.mouseY!==void 0},get children(){return k(dn,{get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},visible:true})}}),k(Z,{get when(){return Fe(()=>!!e.dragVisible)()&&e.dragBounds},get children(){return k(et,{variant:"drag",get bounds(){return e.dragBounds},get visible(){return e.dragVisible}})}}),k(Ze,{get each(){return e.grabbedBoxes??[]},children:t=>k(et,{variant:"grabbed",get bounds(){return t.bounds}})}),k(Ze,{get each(){return e.successLabels??[]},children:t=>k(gt,{variant:"success",get text(){return t.text},get x(){return t.x},get y(){return t.y}})}),k(Z,{get when(){return Fe(()=>!!(e.labelVisible&&e.labelVariant&&e.labelText&&e.labelX!==void 0))()&&e.labelY!==void 0},get children(){return k(gt,{get variant(){return e.labelVariant},get text(){return e.labelText},get x(){return e.labelX},get y(){return e.labelY},get visible(){return e.labelVisible},get zIndex(){return e.labelZIndex}})}}),k(Z,{get when(){return Fe(()=>!!(e.progressVisible&&e.progress!==void 0&&e.mouseX!==void 0))()&&e.mouseY!==void 0},get children(){return k(fn,{get progress(){return e.progress},get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},get visible(){return e.progressVisible}})}})];var pn="0.5.14",Ve=`bippy-${pn}`,gn=Object.defineProperty,Ar=Object.prototype.hasOwnProperty,Be=()=>{},bn=e=>{try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&setTimeout(()=>{throw Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")});}catch{}},pt=(e=be())=>"getFiberRoots"in e,yn=false,hn,rt=(e=be())=>yn?true:(typeof e.inject=="function"&&(hn=e.inject.toString()),!!hn?.includes("(injected)")),nt=new Set,Oe=new Set,wn=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:Ve,checkDCE:bn,hasUnsupportedRendererAttached:false,inject(s){let o=++n;return t.set(o,s),Oe.add(s),r._instrumentationIsActive||(r._instrumentationIsActive=true,nt.forEach(i=>i())),o},on:Be,onCommitFiberRoot:Be,onCommitFiberUnmount:Be,onPostCommitFiberRoot:Be,renderers:t,supportsFiber:true,supportsFlight:true};try{gn(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return r},set(i){if(i&&typeof i=="object"){let a=r.renderers;r=i,a.size>0&&(a.forEach((l,c)=>{Oe.add(l),i.renderers.set(c,l);}),ot(e));}}});let s=window.hasOwnProperty,o=!1;gn(window,"hasOwnProperty",{configurable:!0,value:function(...i){try{if(!o&&i[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,o=!0,-0}catch{}return s.apply(this,i)},writable:!0});}catch{ot(e);}return r},ot=e=>{e&&nt.add(e);try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=bn,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=Ve,t._instrumentationIsActive=!1;let n=pt(t);if(n||(t.on=Be),t.renderers.size){t._instrumentationIsActive=!0,nt.forEach(o=>o());return}let r=t.inject,s=rt(t);s&&!n&&(yn=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=o=>{let i=r(o);return Oe.add(o),s&&t.renderers.set(i,o),t._instrumentationIsActive=!0,nt.forEach(a=>a()),i};}(t.renderers.size||t._instrumentationIsActive||rt())&&e?.();}catch{}},bt=()=>Ar.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),be=e=>bt()?(ot(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):wn(e),Sn=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),yt=()=>{try{Sn()&&be();}catch{}};yt();var wt=0,St=1;var Tt=5;var xt=11,Ct=13;var vt=15,Et=16;var Rt=19;var Ot=26,_t=27,Nt=28,kt=30;var Ft=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?Ft(t.type||t.render):null},st=e=>{let t=e;if(typeof t=="string")return t;if(typeof t!="function"&&!(typeof t=="object"&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let r=Ft(t);return r&&(r.displayName||r.name)||null};var At=e=>{let t=be(e.onActive);t._instrumentationSource=e.name??Ve;let n=t.onCommitFiberRoot;if(e.onCommitFiberRoot){let o=(i,a,l)=>{n!==o&&(n?.(i,a,l),e.onCommitFiberRoot?.(i,a,l));};t.onCommitFiberRoot=o;}let r=t.onCommitFiberUnmount;if(e.onCommitFiberUnmount){let o=(i,a)=>{t.onCommitFiberUnmount===o&&(r?.(i,a),e.onCommitFiberUnmount?.(i,a));};t.onCommitFiberUnmount=o;}let s=t.onPostCommitFiberRoot;if(e.onPostCommitFiberRoot){let o=(i,a)=>{t.onPostCommitFiberRoot===o&&(s?.(i,a),e.onPostCommitFiberRoot?.(i,a));};t.onPostCommitFiberRoot=o;}return t},it=e=>{let t=be();for(let n of t.renderers.values())try{let r=n.findFiberByHostInstance?.(e);if(r)return r}catch{}if(typeof e=="object"&&e){if("_reactRootContainer"in e)return e._reactRootContainer?._internalRoot?.current?.child;for(let n in e)if(n.startsWith("__reactContainer$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber"))return e[n]||null}return null},$t=new Set;var Ur=Object.create,Rn=Object.defineProperty,zr=Object.getOwnPropertyDescriptor,Xr=Object.getOwnPropertyNames,qr=Object.getPrototypeOf,Wr=Object.prototype.hasOwnProperty,Kr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=Xr(t),o=0,i=s.length,a;o<i;o++)a=s[o],!Wr.call(e,a)&&a!==n&&Rn(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=zr(t,a))||r.enumerable});return e},Qr=(e,t,n)=>(n=e==null?{}:Ur(qr(e)),Zr(Rn(n,"default",{value:e,enumerable:true}),e)),Jr=()=>{let e=be();for(let t of [...Array.from(Oe),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},Tn=e=>{for(let t of Oe){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},ye=e=>`
|
|
10
|
-
in ${e}`,
|
|
11
|
-
`),
|
|
12
|
-
`),
|
|
13
|
-
${
|
|
9
|
+
var sr=(e,t)=>e===t;var ir=Symbol("solid-track"),Xe={equals:sr},Kt=tn,ue=1,Le=2,Zt={owned:null,cleanups:null,context:null,owner:null};var $=null,y=null,Ne=null,Y=null,Z=null,te=null,We=0;function Oe(e,t){let n=Y,r=$,s=e.length===0,o=t===void 0?r:t,i=s?Zt:{owned:null,cleanups:null,context:o?o.context:null,owner:o},a=s?e:()=>e(()=>ie(()=>Ce(i)));$=i,Y=null;try{return be(a,!0)}finally{Y=n,$=r;}}function P(e,t){t=t?Object.assign({},Xe,t):Xe;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),en(n,s));return [Jt.bind(n),r]}function ae(e,t,n){let r=dt(e,t,false,ue);je(r);}function re(e,t,n){Kt=fr;let r=dt(e,t,false,ue);(r.user=true),te?te.push(r):je(r);}function U(e,t,n){n=n?Object.assign({},Xe,n):Xe;let r=dt(e,t,true,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,je(r),Jt.bind(r)}function ie(e){if(Y===null)return e();let t=Y;Y=null;try{return Ne?Ne.untrack(e):e()}finally{Y=t;}}function ve(e,t,n){let r=Array.isArray(e),s;return i=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]();}else a=e();let l=ie(()=>t(a,s,i));return s=a,l}}function Qt(e){re(()=>ie(e));}function fe(e){return $===null||($.cleanups===null?$.cleanups=[e]:$.cleanups.push(e)),e}P(false);function Jt(){let e=y;if(this.sources&&(this.state))if((this.state)===ue)je(this);else {let t=Z;Z=null,be(()=>qe(this),false),Z=t;}if(Y){let t=this.observers?this.observers.length:0;Y.sources?(Y.sources.push(this),Y.sourceSlots.push(t)):(Y.sources=[this],Y.sourceSlots=[t]),this.observers?(this.observers.push(Y),this.observerSlots.push(Y.sources.length-1)):(this.observers=[Y],this.observerSlots=[Y.sources.length-1]);}return e&&y.sources.has(this)?this.tValue:this.value}function en(e,t,n){let r=e.value;if(!e.comparator||!e.comparator(r,t)){e.value=t;e.observers&&e.observers.length&&be(()=>{for(let s=0;s<e.observers.length;s+=1){let o=e.observers[s],i=y&&y.running;i&&y.disposed.has(o)||((i?!o.tState:!o.state)&&(o.pure?Z.push(o):te.push(o),o.observers&&nn(o)),i?o.tState=ue:o.state=ue);}if(Z.length>1e6)throw Z=[],new Error},false);}return t}function je(e){if(!e.fn)return;Ce(e);let t=We;Xt(e,e.value,t);}function Xt(e,t,n){let r,s=$,o=Y;Y=$=e;try{r=e.fn(t);}catch(i){return e.pure&&((e.state=ue,e.owned&&e.owned.forEach(Ce),e.owned=null)),e.updatedAt=n+1,mt(i)}finally{Y=o,$=s;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?en(e,r):e.value=r,e.updatedAt=n);}function dt(e,t,n,r=ue,s){let o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:$,context:$?$.context:null,pure:n};if($===null||$!==Zt&&($.owned?$.owned.push(o):$.owned=[o]),Ne);return o}function De(e){let t=y;if((e.state)===0)return;if((e.state)===Le)return qe(e);if(e.suspense&&ie(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<We);){(e.state)&&n.push(e);}for(let r=n.length-1;r>=0;r--){if(e=n[r],t);if((e.state)===ue)je(e);else if((e.state)===Le){let s=Z;Z=null,be(()=>qe(e,n[0]),false),Z=s;}}}function be(e,t){if(Z)return e();let n=false;t||(Z=[]),te?n=true:te=[],We++;try{let r=e();return cr(n),r}catch(r){n||(te=null),Z=null,mt(r);}}function cr(e){if(Z&&(tn(Z),Z=null),e)return;let n=te;te=null,n.length&&be(()=>Kt(n),false);}function tn(e){for(let t=0;t<e.length;t++)De(e[t]);}function fr(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:De(r);}for(t=0;t<n;t++)De(e[t]);}function qe(e,t){e.state=0;for(let r=0;r<e.sources.length;r+=1){let s=e.sources[r];if(s.sources){let o=s.state;o===ue?s!==t&&(!s.updatedAt||s.updatedAt<We)&&De(s):o===Le&&qe(s,t);}}}function nn(e){for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(!r.state)&&(r.state=Le,r.pure?Z.push(r):te.push(r),r.observers&&nn(r));}}function Ce(e){let t;if(e.sources)for(;e.sources.length;){let n=e.sources.pop(),r=e.sourceSlots.pop(),s=n.observers;if(s&&s.length){let o=s.pop(),i=n.observerSlots.pop();r<s.length&&(o.sourceSlots[i]=r,s[r]=o,n.observerSlots[r]=i);}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Ce(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ce(e.owned[t]);e.owned=null;}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null;}e.state=0;}function dr(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function mt(e,t=$){let r=dr(e);throw r;}var mr=Symbol("fallback");function Wt(e){for(let t=0;t<e.length;t++)e[t]();}function hr(e,t,n={}){let r=[],s=[],o=[],i=0,a=t.length>1?[]:null;return fe(()=>Wt(o)),()=>{let l=e()||[],c=l.length,f,m;return l[ir],ie(()=>{let T,w,E,p,d,g,v,O,A;if(c===0)i!==0&&(Wt(o),o=[],r=[],s=[],i=0,a&&(a=[])),n.fallback&&(r=[mr],s[0]=Oe(H=>(o[0]=H,n.fallback())),i=1);else if(i===0){for(s=new Array(c),m=0;m<c;m++)r[m]=l[m],s[m]=Oe(C);i=c;}else {for(E=new Array(c),p=new Array(c),a&&(d=new Array(c)),g=0,v=Math.min(i,c);g<v&&r[g]===l[g];g++);for(v=i-1,O=c-1;v>=g&&O>=g&&r[v]===l[O];v--,O--)E[O]=s[v],p[O]=o[v],a&&(d[O]=a[v]);for(T=new Map,w=new Array(O+1),m=O;m>=g;m--)A=l[m],f=T.get(A),w[m]=f===void 0?-1:f,T.set(A,m);for(f=g;f<=v;f++)A=r[f],m=T.get(A),m!==void 0&&m!==-1?(E[m]=s[f],p[m]=o[f],a&&(d[m]=a[f]),m=w[m],T.set(A,m)):o[f]();for(m=g;m<c;m++)m in E?(s[m]=E[m],o[m]=p[m],a&&(a[m]=d[m],a[m](m))):s[m]=Oe(C);s=s.slice(0,i=c),r=l.slice(0);}return s});function C(T){if(o[m]=T,a){let[w,E]=P(m);return a[m]=E,t(l[m],w)}return t(l[m])}}}function F(e,t){return ie(()=>e(t||{}))}var pr=e=>`Stale read from <${e}>.`;function Ke(e){let t="fallback"in e&&{fallback:()=>e.fallback};return U(hr(()=>e.each,e.children,t||void 0))}function X(e){let t=e.keyed,n=U(()=>e.when,void 0,void 0),r=t?n:U(n,void 0,{equals:(s,o)=>!s==!o});return U(()=>{let s=r();if(s){let o=e.children;return typeof o=="function"&&o.length>0?ie(()=>o(t?s:()=>{if(!ie(r))throw pr("Show");return n()})):o}return e.fallback},void 0,void 0)}var Ie=e=>U(()=>e());function wr(e,t,n){let r=n.length,s=t.length,o=r,i=0,a=0,l=t[s-1].nextSibling,c=null;for(;i<s||a<o;){if(t[i]===n[a]){i++,a++;continue}for(;t[s-1]===n[o-1];)s--,o--;if(s===i){let f=o<r?a?n[a-1].nextSibling:n[o-a]:l;for(;a<o;)e.insertBefore(n[a++],f);}else if(o===a)for(;i<s;)(!c||!c.has(t[i]))&&t[i].remove(),i++;else if(t[i]===n[o-1]&&n[a]===t[s-1]){let f=t[--s].nextSibling;e.insertBefore(n[a++],t[i++].nextSibling),e.insertBefore(n[--o],f),t[s]=n[o];}else {if(!c){c=new Map;let m=a;for(;m<o;)c.set(n[m],m++);}let f=c.get(t[i]);if(f!=null)if(a<f&&f<o){let m=i,C=1,T;for(;++m<s&&m<o&&!((T=c.get(t[m]))==null||T!==f+C);)C++;if(C>f-a){let w=t[i];for(;a<f;)e.insertBefore(n[a++],w);}else e.replaceChild(n[a++],t[i++]);}else i++;else t[i++].remove();}}}function sn(e,t,n,r={}){let s;return Oe(o=>{s=o,t===document?e():ye(t,e(),t.firstChild?null:void 0,n);},r.owner),()=>{s(),t.textContent="";}}function oe(e,t,n,r){let s,o=()=>{let a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},i=()=>(s||(s=o())).cloneNode(true);return i.cloneNode=i,i}function Sr(e,t,n){(e.removeAttribute(t));}function Qe(e,t,n){if(!t)return n?Sr(e,"style"):t;let r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let s,o;for(o in n)t[o]==null&&r.removeProperty(o),delete n[o];for(o in t)s=t[o],s!==n[o]&&(r.setProperty(o,s),n[o]=s);return n}function he(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function Ee(e,t,n){return ie(()=>e(t,n))}function ye(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Ze(e,t,r,n);ae(s=>Ze(e,t(),s,n),r);}function Ze(e,t,n,r,s){for(;typeof n=="function";)n=n();if(t===n)return n;let i=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(i==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=Fe(e,n,r,l);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||i==="boolean"){n=Fe(e,n,r);}else {if(i==="function")return ae(()=>{let l=t();for(;typeof l=="function";)l=l();n=Ze(e,l,n,r);}),()=>n;if(Array.isArray(t)){let l=[],c=n&&Array.isArray(n);if(ht(l,t,n,s))return ae(()=>n=Ze(e,l,n,r,true)),()=>n;if(l.length===0){if(n=Fe(e,n,r),a)return n}else c?n.length===0?on(e,l,r):wr(e,n,l):(n&&Fe(e),on(e,l));n=l;}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=Fe(e,n,r,t);Fe(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function ht(e,t,n,r){let s=false;for(let o=0,i=t.length;o<i;o++){let a=t[o],l=n&&n[e.length],c;if(!(a==null||a===true||a===false))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))s=ht(e,a,l)||s;else if(c==="function")if(r){for(;typeof a=="function";)a=a();s=ht(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||s;}else e.push(a),s=true;else {let f=String(a);l&&l.nodeType===3&&l.data===f?e.push(l):e.push(document.createTextNode(f));}}return s}function on(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n);}function Fe(e,t,n,r){if(n===void 0)return e.textContent="";let s=r||document.createTextNode("");if(t.length){let o=false;for(let i=t.length-1;i>=0;i--){let a=t[i];if(s!==a){let l=a.parentNode===e;!o&&!i?l?e.replaceChild(s,a):e.insertBefore(s,n):l&&a.remove();}else o=true;}}else e.insertBefore(s,n);return [s]}var Tr=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"],xr=e=>!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-"),Cr=e=>Array.isArray(e),vr=(e,t=false)=>{let{composed:n,target:r}=e,s,o;if(r instanceof HTMLElement&&xr(r)&&n){let a=e.composedPath()[0];a instanceof HTMLElement&&(s=a.tagName,o=a.role);}else r instanceof HTMLElement&&(s=r.tagName,o=r.role);return Cr(t)?!!(s&&t&&t.some(i=>typeof s=="string"&&i.toLowerCase()===s.toLowerCase()||i===o)):!!(s&&t&&t)},ln=e=>vr(e,Tr);var $e="data-react-grab",cn=()=>{let e=document.querySelector(`[${$e}]`);if(e){let o=e.shadowRoot?.querySelector(`[${$e}]`);if(o instanceof HTMLDivElement&&e.shadowRoot)return o}let t=document.createElement("div");t.setAttribute($e,"true"),t.style.zIndex="2147483646",t.style.position="fixed",t.style.top="0",t.style.left="0";let n=t.attachShadow({mode:"open"}),r=document.createElement("div");return r.setAttribute($e,"true"),n.appendChild(r),(document.body??document.documentElement).appendChild(t),r};var de=(e,t,n)=>e+(t-e)*n;var Rr=oe("<div>"),Je=e=>{let[t,n]=P(e.bounds.x),[r,s]=P(e.bounds.y),[o,i]=P(e.bounds.width),[a,l]=P(e.bounds.height),[c,f]=P(1),m=false,C=null,T=null,w=e.bounds,E=false,p=()=>e.lerpFactor!==void 0?e.lerpFactor:e.variant==="drag"?.7:.95,d=()=>{if(E)return;E=true;let O=()=>{let A=de(t(),w.x,p()),H=de(r(),w.y,p()),k=de(o(),w.width,p()),Q=de(a(),w.height,p());n(A),s(H),i(k),l(Q),Math.abs(A-w.x)<.5&&Math.abs(H-w.y)<.5&&Math.abs(k-w.width)<.5&&Math.abs(Q-w.height)<.5?(C=null,E=false):C=requestAnimationFrame(O);};C=requestAnimationFrame(O);};re(ve(()=>e.bounds,O=>{if(w=O,!m){n(w.x),s(w.y),i(w.width),l(w.height),m=true;return}d();})),re(()=>{e.variant==="grabbed"&&e.createdAt&&(T=window.setTimeout(()=>{f(0);},1500));}),fe(()=>{C!==null&&(cancelAnimationFrame(C),C=null),T!==null&&(window.clearTimeout(T),T=null),E=false;});let g={position:"fixed","box-sizing":"border-box","pointer-events":e.variant==="drag"?"none":"auto","z-index":"2147483646"},v=()=>e.variant==="drag"?{border:"1px dashed rgba(210, 57, 192, 0.4)","background-color":"rgba(210, 57, 192, 0.05)","will-change":"transform, width, height",contain:"layout paint size",cursor:"crosshair"}:{border:"1px solid rgb(210, 57, 192)","background-color":"rgba(210, 57, 192, 0.2)",transition:e.variant==="grabbed"?"opacity 0.3s ease-out":void 0};return F(X,{get when(){return e.visible!==false},get children(){var O=Rr();return ae(A=>Qe(O,{...g,...v(),top:`${r()}px`,left:`${t()}px`,width:`${o()}px`,height:`${a()}px`,"border-radius":e.bounds.borderRadius,transform:e.bounds.transform,opacity:c()},A)),O}})};var _r=oe('<span style="display:inline-block;width:8px;height:8px;border:1.5px solid rgb(210, 57, 192);border-top-color:transparent;border-radius:50%;margin-right:4px;vertical-align:middle">'),un=e=>{let t;return Qt(()=>{t&&t.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,easing:"linear",iterations:1/0});}),(()=>{var n=_r(),r=t;return typeof r=="function"?Ee(r,n):t=n,ae(s=>Qe(n,{...e.style},s)),n})()};var Be=(e,t,n,r)=>{let s=window.innerWidth,o=window.innerHeight,i=8,a=8,l=s-n-8,c=o-r-8,f=Math.max(i,Math.min(e,l)),m=Math.max(a,Math.min(t,c));return {left:f,top:m}};var Or=oe("<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713"),kr=oe("<div style=margin-right:4px>Copied"),Ar=oe("<div style=margin-left:4px>to clipboard"),Nr=oe(`<div style="position:fixed;padding:2px 6px;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;display:flex;align-items:center;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden;text-overflow:ellipsis;white-space:nowrap">`),Fr=oe(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums">`),gt=e=>{let[t,n]=P(0),[r,s]=P(0),o,i=e.x,a=e.y,l=e.x,c=e.y,f=null,m=false,C=()=>{i=de(i,l,.3),a=de(a,c,.3),s(g=>g+1),Math.abs(i-l)<.5&&Math.abs(a-c)<.5?f=null:f=requestAnimationFrame(C);},T=()=>{f===null&&(f=requestAnimationFrame(C));},w=()=>{if(l=e.x,c=e.y,!m){i=l,a=c,m=true,s(d=>d+1);return}T();};re(ve(()=>e.visible,d=>{if(d!==false)requestAnimationFrame(()=>{n(1);});else {n(0);return}if(e.variant==="success"){let g=setTimeout(()=>{n(0);},1500);fe(()=>clearTimeout(g));}})),re(()=>{w();}),fe(()=>{f!==null&&(cancelAnimationFrame(f),f=null);});let E=()=>o?.getBoundingClientRect(),p=()=>{r();let d=E();if(!d)return {left:i,top:a};if(e.variant==="success"){let k=Math.round(i),Q=Math.round(a)-d.height-6,ne=k<8,Me=Q<8,x=ne||Me,b=Be(k,Q,d.width,d.height);return x&&(b.left+=4,b.top+=4),b}let g=12,v=window.innerWidth,O=window.innerHeight,A=[{left:Math.round(i)+g,top:Math.round(a)+g},{left:Math.round(i)-d.width-g,top:Math.round(a)+g},{left:Math.round(i)+g,top:Math.round(a)-d.height-g},{left:Math.round(i)-d.width-g,top:Math.round(a)-d.height-g}];for(let k of A){let Q=k.left>=8&&k.left+d.width<=v-8,ne=k.top>=8&&k.top+d.height<=O-8;if(Q&&ne)return k}let H=Be(A[0].left,A[0].top,d.width,d.height);return H.left+=4,H.top+=4,H};return F(X,{get when(){return e.visible!==false},get children(){var d=Nr(),g=o;return typeof g=="function"?Ee(g,d):o=d,ye(d,F(X,{get when(){return e.variant==="processing"},get children(){return F(un,{})}}),null),ye(d,F(X,{get when(){return e.variant==="success"},get children(){return Or()}}),null),ye(d,F(X,{get when(){return e.variant==="success"},get children(){return kr()}}),null),ye(d,F(X,{get when(){return e.variant==="processing"},children:"Grabbing\u2026"}),null),ye(d,F(X,{get when(){return e.text.startsWith("(")},get fallback(){return (()=>{var v=Fr();return ye(v,()=>e.text),v})()},get children(){return e.text}}),null),ye(d,F(X,{get when(){return e.variant==="success"},get children(){return Ar()}}),null),ae(v=>{var O=`${p().top}px`,A=`${p().left}px`,H=e.zIndex?.toString()??"2147483647",k=t();return O!==v.e&&he(d,"top",v.e=O),A!==v.t&&he(d,"left",v.t=A),H!==v.a&&he(d,"z-index",v.a=H),k!==v.o&&he(d,"opacity",v.o=k),v},{e:void 0,t:void 0,a:void 0,o:void 0}),d}})};var Ir=oe('<div style="position:fixed;z-index:2147483647;pointer-events:none;transition:opacity 0.1s ease-in-out"><div style="width:32px;height:2px;background-color:rgba(178, 28, 142, 0.2);border-radius:1px;overflow:hidden;position:relative"><div style="height:100%;background-color:#b21c8e;border-radius:1px;transition:width 0.05s cubic-bezier(0.165, 0.84, 0.44, 1)">'),$r=e=>{let[t,n]=P(0);return re(ve(()=>e,r=>{r!==false?requestAnimationFrame(()=>{n(1);}):n(0);})),t},fn=e=>{let t=$r(e.visible),n,r=()=>{let s=n?.getBoundingClientRect();if(!s)return {left:e.mouseX,top:e.mouseY};let o=window.innerHeight,i=e.mouseX-s.width/2,a=e.mouseY+14+s.height+8>o?e.mouseY-s.height-14:e.mouseY+14;return Be(i,a,s.width,s.height)};return F(X,{get when(){return e.visible!==false},get children(){var s=Ir(),o=s.firstChild,i=o.firstChild,a=n;return typeof a=="function"?Ee(a,s):n=s,ae(l=>{var c=`${r().top}px`,f=`${r().left}px`,m=t(),C=`${Math.min(100,Math.max(0,e.progress*100))}%`;return c!==l.e&&he(s,"top",l.e=c),f!==l.t&&he(s,"left",l.t=f),m!==l.a&&he(s,"opacity",l.a=m),C!==l.o&&he(i,"width",l.o=C),l},{e:void 0,t:void 0,a:void 0,o:void 0}),s}})};var Mr=oe("<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>"),dn=e=>{let t,n=null,r=0,s=0,o=1,i=e.mouseX,a=e.mouseY,l=e.mouseX,c=e.mouseY,f=null,m=false,C=()=>{t&&(o=Math.max(window.devicePixelRatio||1,2),r=window.innerWidth,s=window.innerHeight,t.width=r*o,t.height=s*o,t.style.width=`${r}px`,t.style.height=`${s}px`,n=t.getContext("2d"),n&&n.scale(o,o));},T=()=>{n&&(n.clearRect(0,0,r,s),n.strokeStyle="rgba(210, 57, 192)",n.lineWidth=1,n.beginPath(),n.moveTo(i,0),n.lineTo(i,s),n.moveTo(0,a),n.lineTo(r,a),n.stroke());},w=()=>{i=de(i,l,.3),a=de(a,c,.3),T(),Math.abs(i-l)<.5&&Math.abs(a-c)<.5?f=null:f=requestAnimationFrame(w);},E=()=>{f===null&&(f=requestAnimationFrame(w));},p=()=>{if(l=e.mouseX,c=e.mouseY,!m){i=l,a=c,m=true,T();return}E();};return re(()=>{C(),T();let d=()=>{C(),T();};window.addEventListener("resize",d),fe(()=>{window.removeEventListener("resize",d),f!==null&&(cancelAnimationFrame(f),f=null);});}),re(()=>{p();}),F(X,{get when(){return e.visible!==false},get children(){var d=Mr(),g=t;return typeof g=="function"?Ee(g,d):t=d,d}})};var mn=e=>[F(X,{get when(){return Ie(()=>!!e.selectionVisible)()&&e.selectionBounds},get children(){return F(Je,{variant:"selection",get bounds(){return e.selectionBounds},get visible(){return e.selectionVisible}})}}),F(X,{get when(){return Ie(()=>e.crosshairVisible===true&&e.mouseX!==void 0)()&&e.mouseY!==void 0},get children(){return F(dn,{get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},visible:true})}}),F(X,{get when(){return Ie(()=>!!e.dragVisible)()&&e.dragBounds},get children(){return F(Je,{variant:"drag",get bounds(){return e.dragBounds},get visible(){return e.dragVisible}})}}),F(Ke,{get each(){return e.grabbedBoxes??[]},children:t=>F(Je,{variant:"grabbed",get bounds(){return t.bounds},get createdAt(){return t.createdAt}})}),F(Ke,{get each(){return e.successLabels??[]},children:t=>F(gt,{variant:"success",get text(){return t.text},get x(){return t.x},get y(){return t.y}})}),F(X,{get when(){return Ie(()=>!!(e.labelVisible&&e.labelVariant&&e.labelText&&e.labelX!==void 0))()&&e.labelY!==void 0},get children(){return F(gt,{get variant(){return e.labelVariant},get text(){return e.labelText},get x(){return e.labelX},get y(){return e.labelY},get visible(){return e.labelVisible},get zIndex(){return e.labelZIndex}})}}),F(X,{get when(){return Ie(()=>!!(e.progressVisible&&e.progress!==void 0&&e.mouseX!==void 0))()&&e.mouseY!==void 0},get children(){return F(fn,{get progress(){return e.progress},get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},get visible(){return e.progressVisible}})}})];var pn="0.5.14",Ye=`bippy-${pn}`,hn=Object.defineProperty,Pr=Object.prototype.hasOwnProperty,Ve=()=>{},bn=e=>{try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&setTimeout(()=>{throw Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")});}catch{}},bt=(e=we())=>"getFiberRoots"in e,yn=false,gn,nt=(e=we())=>yn?true:(typeof e.inject=="function"&&(gn=e.inject.toString()),!!gn?.includes("(injected)")),tt=new Set,ke=new Set,wn=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:Ye,checkDCE:bn,hasUnsupportedRendererAttached:false,inject(s){let o=++n;return t.set(o,s),ke.add(s),r._instrumentationIsActive||(r._instrumentationIsActive=true,tt.forEach(i=>i())),o},on:Ve,onCommitFiberRoot:Ve,onCommitFiberUnmount:Ve,onPostCommitFiberRoot:Ve,renderers:t,supportsFiber:true,supportsFlight:true};try{hn(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return r},set(i){if(i&&typeof i=="object"){let a=r.renderers;r=i,a.size>0&&(a.forEach((l,c)=>{ke.add(l),i.renderers.set(c,l);}),rt(e));}}});let s=window.hasOwnProperty,o=!1;hn(window,"hasOwnProperty",{configurable:!0,value:function(...i){try{if(!o&&i[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,o=!0,-0}catch{}return s.apply(this,i)},writable:!0});}catch{rt(e);}return r},rt=e=>{e&&tt.add(e);try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=bn,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=Ye,t._instrumentationIsActive=!1;let n=bt(t);if(n||(t.on=Ve),t.renderers.size){t._instrumentationIsActive=!0,tt.forEach(o=>o());return}let r=t.inject,s=nt(t);s&&!n&&(yn=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=o=>{let i=r(o);return ke.add(o),s&&t.renderers.set(i,o),t._instrumentationIsActive=!0,tt.forEach(a=>a()),i};}(t.renderers.size||t._instrumentationIsActive||nt())&&e?.();}catch{}},yt=()=>Pr.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),we=e=>yt()?(rt(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):wn(e),Sn=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),wt=()=>{try{Sn()&&we();}catch{}};wt();var St=0,Tt=1;var xt=5;var Ct=11,vt=13;var Et=15,Rt=16;var _t=19;var Ot=26,kt=27,At=28,Nt=30;var Ft=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?Ft(t.type||t.render):null},ot=e=>{let t=e;if(typeof t=="string")return t;if(typeof t!="function"&&!(typeof t=="object"&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let r=Ft(t);return r&&(r.displayName||r.name)||null};var It=e=>{let t=we(e.onActive);t._instrumentationSource=e.name??Ye;let n=t.onCommitFiberRoot;if(e.onCommitFiberRoot){let o=(i,a,l)=>{n!==o&&(n?.(i,a,l),e.onCommitFiberRoot?.(i,a,l));};t.onCommitFiberRoot=o;}let r=t.onCommitFiberUnmount;if(e.onCommitFiberUnmount){let o=(i,a)=>{t.onCommitFiberUnmount===o&&(r?.(i,a),e.onCommitFiberUnmount?.(i,a));};t.onCommitFiberUnmount=o;}let s=t.onPostCommitFiberRoot;if(e.onPostCommitFiberRoot){let o=(i,a)=>{t.onPostCommitFiberRoot===o&&(s?.(i,a),e.onPostCommitFiberRoot?.(i,a));};t.onPostCommitFiberRoot=o;}return t},st=e=>{let t=we();for(let n of t.renderers.values())try{let r=n.findFiberByHostInstance?.(e);if(r)return r}catch{}if(typeof e=="object"&&e){if("_reactRootContainer"in e)return e._reactRootContainer?._internalRoot?.current?.child;for(let n in e)if(n.startsWith("__reactContainer$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber"))return e[n]||null}return null},$t=new Set;var Wr=Object.create,Rn=Object.defineProperty,Kr=Object.getOwnPropertyDescriptor,Zr=Object.getOwnPropertyNames,Qr=Object.getPrototypeOf,Jr=Object.prototype.hasOwnProperty,eo=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),to=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=Zr(t),o=0,i=s.length,a;o<i;o++)a=s[o],!Jr.call(e,a)&&a!==n&&Rn(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=Kr(t,a))||r.enumerable});return e},no=(e,t,n)=>(n=e==null?{}:Wr(Qr(e)),to(Rn(n,"default",{value:e,enumerable:true}),e)),ro=()=>{let e=we();for(let t of [...Array.from(ke),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},Tn=e=>{for(let t of ke){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},Se=e=>`
|
|
10
|
+
in ${e}`,oo=(e,t)=>{let n=Se(e);return t&&(n+=` (at ${t})`),n},Mt=false,Pt=(e,t)=>{if(!e||Mt)return "";let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,Mt=true;let r=ro();Tn(null);let s=console.error,o=console.warn;console.error=()=>{},console.warn=()=>{};try{let l={DetermineComponentFrameRoot(){let C;try{if(t){let T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[]);}catch(w){C=w;}Reflect.construct(e,[],T);}else {try{T.call();}catch(w){C=w;}e.call(T.prototype);}}else {try{throw Error()}catch(w){C=w;}let T=e();T&&typeof T.catch=="function"&&T.catch(()=>{});}}catch(T){if(T instanceof Error&&C instanceof Error&&typeof T.stack=="string")return [T.stack,C.stack]}return [null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[f,m]=l.DetermineComponentFrameRoot();if(f&&m){let C=f.split(`
|
|
11
|
+
`),T=m.split(`
|
|
12
|
+
`),w=0,E=0;for(;w<C.length&&!C[w].includes("DetermineComponentFrameRoot");)w++;for(;E<T.length&&!T[E].includes("DetermineComponentFrameRoot");)E++;if(w===C.length||E===T.length)for(w=C.length-1,E=T.length-1;w>=1&&E>=0&&C[w]!==T[E];)E--;for(;w>=1&&E>=0;w--,E--)if(C[w]!==T[E]){if(w!==1||E!==1)do if(w--,E--,E<0||C[w]!==T[E]){let p=`
|
|
13
|
+
${C[w].replace(" at new "," at ")}`,d=ot(e);return d&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",d)),p}while(w>=1&&E>=0);break}}}finally{Mt=false,Error.prepareStackTrace=n,Tn(r),console.error=s,console.warn=o;}let i=e?ot(e):"";return i?Se(i):""},so=(e,t)=>{let n=e.tag,r="";switch(n){case At:r=Se("Activity");break;case Tt:r=Pt(e.type,true);break;case Ct:r=Pt(e.type.render,false);break;case St:case Et:r=Pt(e.type,false);break;case xt:case Ot:case kt:r=Se(e.type);break;case Rt:r=Se("Lazy");break;case vt:r=e.child!==t&&t!==null?Se("Suspense Fallback"):Se("Suspense");break;case _t:r=Se("SuspenseList");break;case Nt:r=Se("ViewTransition");break;default:return ""}return r},io=e=>{try{let t="",n=e,r=null;do{t+=so(n,r);let s=n._debugInfo;if(s&&Array.isArray(s))for(let o=s.length-1;o>=0;o--){let i=s[o];typeof i.name=="string"&&(t+=oo(i.name,i.env));}r=n,n=n.return;}while(n);return t}catch(t){return t instanceof Error?`
|
|
14
14
|
Error generating stack: ${t.message}
|
|
15
|
-
${t.stack}`:""}},
|
|
15
|
+
${t.stack}`:""}},ao=e=>{let t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;let n=e;if(!n)return "";Error.prepareStackTrace=t,n.startsWith(`Error: react-stack-top-frame
|
|
16
16
|
`)&&(n=n.slice(29));let r=n.indexOf(`
|
|
17
17
|
`);if(r!==-1&&(n=n.slice(r+1)),r=Math.max(n.indexOf("react_stack_bottom_frame"),n.indexOf("react-stack-bottom-frame")),r!==-1&&(r=n.lastIndexOf(`
|
|
18
|
-
`,r)),r!==-1)n=n.slice(0,r);else return "";return n},
|
|
19
|
-
`),r=[];for(let s of n)if(/^\s*at\s+/.test(s)){let o=xn(s,void 0)[0];o&&r.push(o);}else if(/^\s*in\s+/.test(s)){let o=s.replace(/^\s*in\s+/,"").replace(/\s*\(at .*\)$/,"");r.push({function:o,raw:s});}else if(s.match(
|
|
20
|
-
`).filter(r=>!!r.match(
|
|
21
|
-
`).filter(r=>!r.match(
|
|
22
|
-
`),r;for(let o=n.length-1;o>=0&&!r;o--){let i=n[o].match(
|
|
23
|
-
`)};var
|
|
24
|
-
`),
|
|
18
|
+
`,r)),r!==-1)n=n.slice(0,r);else return "";return n},lo=/(^|@)\S+:\d+/,_n=/^\s*at .*(\S+:\d+|\(native\))/m,co=/^(eval@)?(\[native code\])?$/;var uo=(e,t)=>{if(t?.includeInElement!==false){let n=e.split(`
|
|
19
|
+
`),r=[];for(let s of n)if(/^\s*at\s+/.test(s)){let o=xn(s,void 0)[0];o&&r.push(o);}else if(/^\s*in\s+/.test(s)){let o=s.replace(/^\s*in\s+/,"").replace(/\s*\(at .*\)$/,"");r.push({function:o,raw:s});}else if(s.match(lo)){let o=Cn(s,void 0)[0];o&&r.push(o);}return Lt(r,t)}return e.match(_n)?xn(e,t):Cn(e,t)},On=e=>{if(!e.includes(":"))return [e,void 0,void 0];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/,n=t.exec(e.replace(/[()]/g,""));return [n[1],n[2]||void 0,n[3]||void 0]},Lt=(e,t)=>t&&t.slice!=null?Array.isArray(t.slice)?e.slice(t.slice[0],t.slice[1]):e.slice(0,t.slice):e;var xn=(e,t)=>Lt(e.split(`
|
|
20
|
+
`).filter(r=>!!r.match(_n)),t).map(r=>{let s=r;s.includes("(eval ")&&(s=s.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let o=s.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),i=o.match(/ (\(.+\)$)/);o=i?o.replace(i[0],""):o;let a=On(i?i[1]:o),l=i&&o||void 0,c=["eval","<anonymous>"].includes(a[0])?void 0:a[0];return {function:l,file:c,line:a[1]?+a[1]:void 0,col:a[2]?+a[2]:void 0,raw:s}});var Cn=(e,t)=>Lt(e.split(`
|
|
21
|
+
`).filter(r=>!r.match(co)),t).map(r=>{let s=r;if(s.includes(" > eval")&&(s=s.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!s.includes("@")&&!s.includes(":"))return {function:s};{let o=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,i=s.match(o),a=i&&i[1]?i[1]:void 0,l=On(s.replace(o,""));return {function:a,file:l[0],line:l[1]?+l[1]:void 0,col:l[2]?+l[2]:void 0,raw:s}}});var fo=eo((e,t)=>{(function(n,r){typeof e=="object"&&t!==void 0?r(e):typeof define=="function"&&define.amd?define(["exports"],r):(n=typeof globalThis<"u"?globalThis:n||self,r(n.sourcemapCodec={}));})(void 0,function(n){let r=44,s=59,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(64),a=new Uint8Array(128);for(let x=0;x<o.length;x++){let b=o.charCodeAt(x);i[x]=b,a[b]=x;}function l(x,b){let u=0,S=0,_=0;do{let L=x.next();_=a[L],u|=(_&31)<<S,S+=5;}while(_&32);let N=u&1;return u>>>=1,N&&(u=-2147483648|-u),b+u}function c(x,b,u){let S=b-u;S=S<0?-S<<1|1:S<<1;do{let _=S&31;S>>>=5,S>0&&(_|=32),x.write(i[_]);}while(S>0);return b}function f(x,b){return x.pos>=b?false:x.peek()!==r}let m=1024*16,C=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(x){return Buffer.from(x.buffer,x.byteOffset,x.byteLength).toString()}}:{decode(x){let b="";for(let u=0;u<x.length;u++)b+=String.fromCharCode(x[u]);return b}};class T{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(m);}write(b){let{buffer:u}=this;u[this.pos++]=b,this.pos===m&&(this.out+=C.decode(u),this.pos=0);}flush(){let{buffer:b,out:u,pos:S}=this;return S>0?u+C.decode(b.subarray(0,S)):u}}class w{constructor(b){this.pos=0,this.buffer=b;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(b){let{buffer:u,pos:S}=this,_=u.indexOf(b,S);return _===-1?u.length:_}}let E=[];function p(x){let{length:b}=x,u=new w(x),S=[],_=[],N=0;for(;u.pos<b;u.pos++){N=l(u,N);let L=l(u,0);if(!f(u,b)){let z=_.pop();z[2]=N,z[3]=L;continue}let I=l(u,0),D=l(u,0),j=D&1,B=j?[N,L,0,0,I,l(u,0)]:[N,L,0,0,I],q=E;if(f(u,b)){q=[];do{let z=l(u,0);q.push(z);}while(f(u,b))}B.vars=q,S.push(B),_.push(B);}return S}function d(x){let b=new T;for(let u=0;u<x.length;)u=g(x,u,b,[0]);return b.flush()}function g(x,b,u,S){let _=x[b],{0:N,1:L,2:I,3:D,4:j,vars:B}=_;b>0&&u.write(r),S[0]=c(u,N,S[0]),c(u,L,0),c(u,j,0);let q=_.length===6?1:0;c(u,q,0),_.length===6&&c(u,_[5],0);for(let z of B)c(u,z,0);for(b++;b<x.length;){let z=x[b],{0:M,1:W}=z;if(M>I||M===I&&W>=D)break;b=g(x,b,u,S);}return u.write(r),S[0]=c(u,I,S[0]),c(u,D,0),b}function v(x){let{length:b}=x,u=new w(x),S=[],_=[],N=0,L=0,I=0,D=0,j=0,B=0,q=0,z=0;do{let M=u.indexOf(";"),W=0;for(;u.pos<M;u.pos++){if(W=l(u,W),!f(u,M)){let J=_.pop();J[2]=N,J[3]=W;continue}let se=l(u,0),Re=se&1,Te=se&2,_e=se&4,Pe=null,me=E,ge;if(Re){let J=l(u,L);I=l(u,L===J?I:0),L=J,ge=[N,W,0,0,J,I];}else ge=[N,W,0,0];if(ge.isScope=!!_e,Te){let J=D,pe=j;D=l(u,D);let xe=J===D;j=l(u,xe?j:0),B=l(u,xe&&pe===j?B:0),Pe=[D,j,B];}if(ge.callsite=Pe,f(u,M)){me=[];do{q=N,z=W;let J=l(u,0),pe;if(J<-1){pe=[[l(u,0)]];for(let xe=-1;xe>J;xe--){let ze=q;q=l(u,q),z=l(u,q===ze?z:0);let at=l(u,0);pe.push([at,q,z]);}}else pe=[[J]];me.push(pe);}while(f(u,M))}ge.bindings=me,S.push(ge),_.push(ge);}N++,u.pos=M+1;}while(u.pos<b);return S}function O(x){if(x.length===0)return "";let b=new T;for(let u=0;u<x.length;)u=A(x,u,b,[0,0,0,0,0,0,0]);return b.flush()}function A(x,b,u,S){let _=x[b],{0:N,1:L,2:I,3:D,isScope:j,callsite:B,bindings:q}=_;S[0]<N?(H(u,S[0],N),S[0]=N,S[1]=0):b>0&&u.write(r),S[1]=c(u,_[1],S[1]);let z=(_.length===6?1:0)|(B?2:0)|(j?4:0);if(c(u,z,0),_.length===6){let{4:M,5:W}=_;M!==S[2]&&(S[3]=0),S[2]=c(u,M,S[2]),S[3]=c(u,W,S[3]);}if(B){let{0:M,1:W,2:se}=_.callsite;M===S[4]?W!==S[5]&&(S[6]=0):(S[5]=0,S[6]=0),S[4]=c(u,M,S[4]),S[5]=c(u,W,S[5]),S[6]=c(u,se,S[6]);}if(q)for(let M of q){M.length>1&&c(u,-M.length,0);let W=M[0][0];c(u,W,0);let se=N,Re=L;for(let Te=1;Te<M.length;Te++){let _e=M[Te];se=c(u,_e[1],se),Re=c(u,_e[2],Re),c(u,_e[0],0);}}for(b++;b<x.length;){let M=x[b],{0:W,1:se}=M;if(W>I||W===I&&se>=D)break;b=A(x,b,u,S);}return S[0]<I?(H(u,S[0],I),S[0]=I,S[1]=0):u.write(r),S[1]=c(u,D,S[1]),b}function H(x,b,u){do x.write(s);while(++b<u)}function k(x){let{length:b}=x,u=new w(x),S=[],_=0,N=0,L=0,I=0,D=0;do{let j=u.indexOf(";"),B=[],q=true,z=0;for(_=0;u.pos<j;){let M;_=l(u,_),_<z&&(q=false),z=_,f(u,j)?(N=l(u,N),L=l(u,L),I=l(u,I),f(u,j)?(D=l(u,D),M=[_,N,L,I,D]):M=[_,N,L,I]):M=[_],B.push(M),u.pos++;}q||Q(B),S.push(B),u.pos=j+1;}while(u.pos<=b);return S}function Q(x){x.sort(ne);}function ne(x,b){return x[0]-b[0]}function Me(x){let b=new T,u=0,S=0,_=0,N=0;for(let L=0;L<x.length;L++){let I=x[L];if(L>0&&b.write(s),I.length===0)continue;let D=0;for(let j=0;j<I.length;j++){let B=I[j];j>0&&b.write(r),D=c(b,B[0],D),B.length!==1&&(u=c(b,B[1],u),S=c(b,B[2],S),_=c(b,B[3],_),B.length!==4&&(N=c(b,B[4],N)));}}return b.flush()}n.decode=k,n.decodeGeneratedRanges=v,n.decodeOriginalScopes=p,n.encode=Me,n.encodeGeneratedRanges=O,n.encodeOriginalScopes=d,Object.defineProperty(n,"__esModule",{value:true});});}),kn=no(fo()),An=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,mo=/^data:application\/json[^,]+base64,/,ho=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,Nn=typeof WeakRef<"u",Ge=new Map,it=new Map,go=e=>Nn&&e instanceof WeakRef,vn=(e,t,n,r)=>{if(n<0||n>=e.length)return null;let s=e[n];if(!s||s.length===0)return null;let o=null;for(let f of s)if(f[0]<=r)o=f;else break;if(!o||o.length<4)return null;let[,i,a,l]=o;if(i===void 0||a===void 0||l===void 0)return null;let c=t[i];return c?{columnNumber:l,fileName:c,lineNumber:a+1}:null},po=(e,t,n)=>{if(e.sections){let r=null;for(let i of e.sections)if(t>i.offset.line||t===i.offset.line&&n>=i.offset.column)r=i;else break;if(!r)return null;let s=t-r.offset.line,o=t===r.offset.line?n-r.offset.column:n;return vn(r.map.mappings,r.map.sources,s,o)}return vn(e.mappings,e.sources,t-1,n)},bo=(e,t)=>{let n=t.split(`
|
|
22
|
+
`),r;for(let o=n.length-1;o>=0&&!r;o--){let i=n[o].match(ho);i&&(r=i[1]||i[2]);}if(!r)return null;let s=An.test(r);if(!(mo.test(r)||s||r.startsWith("/"))){let o=e.split("/");o[o.length-1]=r,r=o.join("/");}return r},yo=e=>({file:e.file,mappings:(0, kn.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),wo=e=>{let t=e.sections.map(({map:r,offset:s})=>({map:{...r,mappings:(0, kn.decode)(r.mappings)},offset:s})),n=new Set;for(let r of t)for(let s of r.map.sources)n.add(s);return {file:e.file,mappings:[],names:[],sections:t,sourceRoot:void 0,sources:Array.from(n),sourcesContent:void 0,version:3}},En=e=>{if(!e)return false;let t=e.trim();if(!t)return false;let n=t.match(An);if(!n)return true;let r=n[0].toLowerCase();return r==="http:"||r==="https:"},So=async(e,t=fetch)=>{if(!En(e))return null;let n;try{n=await(await t(e)).text();}catch{return null}if(!n)return null;let r=bo(e,n);if(!r||!En(r))return null;try{let s=await t(r),o=await s.json();return "sections"in o?wo(o):yo(o)}catch{return null}},To=async(e,t=true,n)=>{if(t&&Ge.has(e)){let o=Ge.get(e);if(o==null)return null;if(go(o)){let i=o.deref();if(i)return i;Ge.delete(e);}else return o}if(t&&it.has(e))return it.get(e);let r=So(e,n);t&&it.set(e,r);let s=await r;return t&&it.delete(e),t&&(s===null?Ge.set(e,null):Ge.set(e,Nn?new WeakRef(s):s)),s};var xo=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string";var Fn=e=>xo(e)?ao(e._debugStack.stack):io(e);var In=async(e,t=1,n=true,r)=>{let s=uo(e,{slice:t??1}),o=[];for(let i of s){if(!i?.file)continue;let a=await To(i.file,n,r);if(a&&typeof i.line=="number"&&typeof i.col=="number"){let l=po(a,i.line,i.col);if(l){o.push(l);continue}}o.push({fileName:i.file,lineNumber:i.line,columnNumber:i.col,functionName:i.function});}return o};It({onCommitFiberRoot(e,t){$t.add(t);}});var $n=async e=>{let t=st(e);if(!t)return null;let n=Fn(t),r=await In(n,Number.MAX_SAFE_INTEGER);return r||null};var Mn=e=>{let t=new Set(["article","aside","footer","form","header","main","nav","section"]),n=p=>{let d=p.tagName.toLowerCase();if(t.has(d)||p.id)return true;if(p.className&&typeof p.className=="string"){let g=p.className.trim();if(g&&g.length>0)return true}return Array.from(p.attributes).some(g=>g.name.startsWith("data-"))},r=(p,d=10)=>{let g=[],v=p.parentElement,O=0;for(;v&&O<d&&v.tagName!=="BODY"&&!(n(v)&&(g.push(v),g.length>=3));)v=v.parentElement,O++;return g.reverse()},s=p=>{let d=[],g=p,v=0,O=5;for(;g&&v<O&&g.tagName!=="BODY";){let A=g.tagName.toLowerCase();if(g.id){A+=`#${g.id}`,d.unshift(A);break}else if(g.className&&typeof g.className=="string"&&g.className.trim()){let H=g.className.trim().split(/\s+/).slice(0,2);A+=`.${H.join(".")}`;}if(!g.id&&(!g.className||!g.className.trim())&&g.parentElement){let H=Array.from(g.parentElement.children),k=H.indexOf(g);k>=0&&H.length>1&&(A+=`:nth-child(${k+1})`);}d.unshift(A),g=g.parentElement,v++;}return d.join(" > ")},o=(p,d=false)=>{let g=p.tagName.toLowerCase(),v=[];if(p.id&&v.push(`id="${p.id}"`),p.className&&typeof p.className=="string"){let k=p.className.trim().split(/\s+/);if(k.length>0&&k[0]){let ne=(d?k.slice(0,3):k).join(" ");ne.length>30&&(ne=ne.substring(0,30)+"..."),v.push(`class="${ne}"`);}}let O=Array.from(p.attributes).filter(k=>k.name.startsWith("data-")),A=d?O.slice(0,1):O;for(let k of A){let Q=k.value;Q.length>20&&(Q=Q.substring(0,20)+"..."),v.push(`${k.name}="${Q}"`);}let H=p.getAttribute("aria-label");if(H&&!d){let k=H;k.length>20&&(k=k.substring(0,20)+"..."),v.push(`aria-label="${k}"`);}return v.length>0?`<${g} ${v.join(" ")}>`:`<${g}>`},i=p=>`</${p.tagName.toLowerCase()}>`,a=p=>{let d=p.textContent||"";d=d.trim().replace(/\s+/g," ");let g=60;return d.length>g&&(d=d.substring(0,g)+"..."),d},l=p=>{if(p.id)return `#${p.id}`;if(p.className&&typeof p.className=="string"){let d=p.className.trim().split(/\s+/);if(d.length>0&&d[0])return `.${d[0]}`}return null},c=[];c.push(`Path: ${s(e)}`),c.push("");let f=r(e);for(let p=0;p<f.length;p++){let d=" ".repeat(p);c.push(d+o(f[p],true));}let m=e.parentElement,C=-1;if(m){let p=Array.from(m.children);if(C=p.indexOf(e),C>0){let d=p[C-1];if(l(d)&&C<=2){let v=" ".repeat(f.length);c.push(`${v} ${o(d,true)}`),c.push(`${v} </${d.tagName.toLowerCase()}>`);}else if(C>0){let v=" ".repeat(f.length);c.push(`${v} ... (${C} element${C===1?"":"s"})`);}}}let T=" ".repeat(f.length);c.push(T+" <!-- SELECTED -->");let w=a(e),E=e.children.length;if(w&&E===0&&w.length<40?c.push(`${T} ${o(e)}${w}${i(e)}`):(c.push(T+" "+o(e)),w&&c.push(`${T} ${w}`),E>0&&c.push(`${T} ... (${E} element${E===1?"":"s"})`),c.push(T+" "+i(e))),m&&C>=0){let p=Array.from(m.children),d=p.length-C-1;if(d>0){let g=p[C+1];l(g)&&d<=2?(c.push(`${T} ${o(g,true)}`),c.push(`${T} </${g.tagName.toLowerCase()}>`)):c.push(`${T} ... (${d} element${d===1?"":"s"})`);}}for(let p=f.length-1;p>=0;p--){let d=" ".repeat(p);c.push(d+i(f[p]));}return c.join(`
|
|
23
|
+
`)};var Co=()=>document.hasFocus()?Promise.resolve():new Promise(e=>{let t=()=>{window.removeEventListener("focus",t),e();};window.addEventListener("focus",t),window.focus();}),Dt=async e=>{await Co();try{if(Array.isArray(e)){if(!navigator?.clipboard?.write){for(let t of e)if(typeof t=="string"){let n=Pn(t);if(!n)return n}return !0}return await navigator.clipboard.write([new ClipboardItem(Object.fromEntries(e.map(t=>t instanceof Blob?[t.type??"text/plain",t]:["text/plain",new Blob([t],{type:"text/plain"})])))]),!0}else {if(e instanceof Blob)return await navigator.clipboard.write([new ClipboardItem({[e.type]:e})]),!0;try{return await navigator.clipboard.writeText(String(e)),!0}catch{return Pn(e)}}}catch{return false}},Pn=e=>{if(!document.execCommand)return false;let t=document.createElement("textarea");t.value=String(e),t.style.clipPath="inset(50%)",t.ariaHidden="true",(document.body||document.documentElement).append(t);try{return t.select(),document.execCommand("copy")}finally{t.remove();}};var Ln=(e,t=window.getComputedStyle(e))=>t.display!=="none"&&t.visibility!=="hidden"&&t.opacity!=="0";var Ue=e=>{if(e.closest(`[${$e}]`))return false;let t=window.getComputedStyle(e);return !(!Ln(e,t)||t.pointerEvents==="none")};var Ht=(e,t)=>{let n=document.elementsFromPoint(e,t);for(let r of n)if(Ue(r))return r;return null};var Dn=(e,t,n)=>{let r=[],s=Array.from(document.querySelectorAll("*")),o=e.x,i=e.y,a=e.x+e.width,l=e.y+e.height;for(let c of s){if(!n){let E=(c.tagName||"").toUpperCase();if(E==="HTML"||E==="BODY")continue}if(!t(c))continue;let f=c.getBoundingClientRect(),m=f.left,C=f.top,T=f.left+f.width,w=f.top+f.height;if(n){let E=Math.max(o,m),p=Math.max(i,C),d=Math.min(a,T),g=Math.min(l,w),v=Math.max(0,d-E),O=Math.max(0,g-p),A=v*O,H=Math.max(0,f.width*f.height);H>0&&A/H>=.75&&r.push(c);}else m<a&&T>o&&C<l&&w>i&&r.push(c);}return r},Hn=e=>e.filter(t=>!e.some(n=>n!==t&&n.contains(t))),jn=(e,t,n)=>{if(e.length<=1)return null;let r=t.x,s=t.y,o=t.x+t.width,i=t.y+t.height,a=e[0];for(;a;){let l=a.parentElement;if(!l)break;let c=l.getBoundingClientRect(),f=Math.max(r,c.left),m=Math.max(s,c.top),C=Math.min(o,c.left+c.width),T=Math.min(i,c.top+c.height),w=Math.max(0,C-f),E=Math.max(0,T-m),p=w*E,d=Math.max(0,c.width*c.height);if(!(d>0&&p/d>=.75))break;if(!n(l)){a=l;continue}if(e.every(O=>l.contains(O)))return l;a=l;}return null},Bn=(e,t)=>{let n=Dn(e,t,true),r=Hn(n),s=jn(r,e,t);return s?[s]:r},Vn=(e,t)=>{let n=Dn(e,t,false),r=Hn(n),s=jn(r,e,t);return s?[s]:r};var jt=e=>{let t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return {borderRadius:n.borderRadius||"0px",height:t.height,transform:n.transform||"none",width:t.width,x:t.left,y:t.top}};var Yn=1700,vo=150,Gn=e=>{let t={enabled:true,keyHoldDuration:300,...e};if(t.enabled!==false)return Oe(n=>{let[s,o]=P(false),[i,a]=P(-1e3),[l,c]=P(-1e3),[f,m]=P(false),[C,T]=P(-1e3),[w,E]=P(-1e3),[p,d]=P(false),[g,v]=P(null),[O,A]=P(null),[H,k]=P(0),[Q,ne]=P([]),[Me,x]=P([]),[b,u]=P(false),[S,_]=P(false),N=null,L=null,I=null,D=null,j=U(()=>b()&&!p()),B=U(()=>i()>-1e3&&l()>-1e3),q=h=>(h.metaKey||h.ctrlKey)&&h.key.toLowerCase()==="c",z=h=>{let R=`grabbed-${Date.now()}-${Math.random()}`,V=Date.now(),G={id:R,bounds:h,createdAt:V},ee=Q();ne([...ee,G]),setTimeout(()=>{ne(ce=>ce.filter(nr=>nr.id!==R));},Yn);},M=(h,R,V)=>{let G=`success-${Date.now()}-${Math.random()}`;x(ee=>[...ee,{id:G,text:h,x:R,y:V}]),setTimeout(()=>{x(ee=>ee.filter(ce=>ce.id!==G));},Yn);},W=h=>h.map(R=>{let V=R.functionName??"anonymous",G=R.fileName??"unknown",ee=R.lineNumber??0,ce=R.columnNumber??0;return ` ${V} - ${G}:${ee}:${ce}`}).join(`
|
|
24
|
+
`),se=h=>`<selected_element>${h}</selected_element>`,Re=async h=>{let R=Mn(h),V=await $n(h);if(V?.length){let G=W(V);return `${R}
|
|
25
25
|
|
|
26
26
|
Component owner stack:
|
|
27
|
-
${
|
|
27
|
+
${G}`}return R},Te=h=>(h.tagName||"").toLowerCase(),_e=async h=>{let R=h.getBoundingClientRect(),V=Te(h);z(jt(h));try{let G=await Re(h);await Dt(se(G));}catch{}M(V?`<${V}>`:"<element>",R.left,R.top);},Pe=async h=>{if(h.length===0)return;let R=1/0,V=1/0;for(let G of h){let ee=G.getBoundingClientRect();R=Math.min(R,ee.left),V=Math.min(V,ee.top),z(jt(G));}try{let ee=(await Promise.all(h.map(ce=>Re(ce)))).join(`
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
-
`);await
|
|
31
|
+
`);await Dt(se(ee));}catch{}M(`${h.length} elements`,R,V);},me=U(()=>!j()||f()?null:Ht(i(),l())),ge=U(()=>{let h=me();if(!h)return;let R=h.getBoundingClientRect(),V=window.getComputedStyle(h);return {borderRadius:V.borderRadius||"0px",height:R.height,transform:V.transform||"none",width:R.width,x:R.left,y:R.top}}),J=2,pe=(h,R)=>({x:Math.abs(h-C()),y:Math.abs(R-w())}),xe=U(()=>{if(!f())return false;let h=pe(i(),l());return h.x>J||h.y>J}),ze=(h,R)=>{let V=Math.min(C(),h),G=Math.min(w(),R),ee=Math.abs(h-C()),ce=Math.abs(R-w());return {x:V,y:G,width:ee,height:ce}},at=U(()=>{if(!xe())return;let h=ze(i(),l());return {borderRadius:"0px",height:h.height,transform:"none",width:h.width,x:h.x,y:h.y}}),Un=U(()=>{let h=me();if(!h)return "(click or drag to select element(s))";let R=Te(h);return R?`<${R}>`:"<element>"}),Bt=U(()=>({x:i(),y:l()})),zn=U(()=>{let h=me(),R=g();return !!h&&h===R});re(ve(()=>[me(),g()],([h,R])=>{R&&h&&R!==h&&v(null);}));let Vt=U(()=>{let h=O();if(H(),h===null)return 0;let R=Date.now()-h;return Math.min(R/t.keyHoldDuration,1)}),Xn=()=>{A(Date.now()),_(false),I=window.setTimeout(()=>{_(true),I=null;},vo);let h=()=>{if(O()===null)return;k(V=>V+1),Vt()<1&&(L=requestAnimationFrame(h));};h();},lt=()=>{L!==null&&(cancelAnimationFrame(L),L=null),I!==null&&(window.clearTimeout(I),I=null),A(null),_(false);},qn=()=>{lt(),u(true),document.body.style.cursor="crosshair";},ct=()=>{o(false),u(false),document.body.style.cursor="",f()&&(m(false),document.body.style.userSelect=""),N&&window.clearTimeout(N),D&&window.clearTimeout(D),lt();},Yt=new AbortController,Ae=Yt.signal;window.addEventListener("keydown",h=>{if(h.key==="Escape"&&s()){ct();return}ln(h)||q(h)&&(s()||(o(true),Xn(),N=window.setTimeout(()=>{qn(),t.onActivate?.();},t.keyHoldDuration)),b()&&(D&&window.clearTimeout(D),D=window.setTimeout(()=>{ct();},200)));},{signal:Ae}),window.addEventListener("keyup",h=>{if(!s()&&!b())return;let R=h.key.toLowerCase()==="c",V=!h.metaKey&&!h.ctrlKey;(R||V)&&ct();},{signal:Ae,capture:true}),window.addEventListener("mousemove",h=>{a(h.clientX),c(h.clientY);},{signal:Ae}),window.addEventListener("mousedown",h=>{!j()||p()||(h.preventDefault(),m(true),T(h.clientX),E(h.clientY),document.body.style.userSelect="none");},{signal:Ae}),window.addEventListener("mouseup",h=>{if(!f())return;let R=pe(h.clientX,h.clientY),V=R.x>J||R.y>J;if(m(false),document.body.style.userSelect="",V){let G=ze(h.clientX,h.clientY),ee=Bn(G,Ue);if(ee.length>0)d(true),Pe(ee).finally(()=>{d(false);});else {let ce=Vn(G,Ue);ce.length>0&&(d(true),Pe(ce).finally(()=>{d(false);}));}}else {let G=Ht(h.clientX,h.clientY);if(!G)return;d(true),v(G),_e(G).finally(()=>{d(false);});}},{signal:Ae}),document.addEventListener("visibilitychange",()=>{document.hidden&&ne([]);},{signal:Ae}),fe(()=>{Yt.abort(),N&&window.clearTimeout(N),D&&window.clearTimeout(D),lt(),document.body.style.userSelect="",document.body.style.cursor="";});let Wn=cn(),Kn=U(()=>false),Zn=U(()=>j()&&xe()),Qn=U(()=>p()?"processing":"hover"),Jn=U(()=>j()&&!f()&&(!!me()&&!zn()||!me())||p()),er=U(()=>s()&&S()&&B()),tr=U(()=>j()&&!f());return sn(()=>F(mn,{get selectionVisible(){return Kn()},get selectionBounds(){return ge()},get dragVisible(){return Zn()},get dragBounds(){return at()},get grabbedBoxes(){return Q()},get successLabels(){return Me()},get labelVariant(){return Qn()},get labelText(){return Un()},get labelX(){return Bt().x},get labelY(){return Bt().y},get labelVisible(){return Jn()},get progressVisible(){return er()},get progress(){return Vt()},get mouseX(){return i()},get mouseY(){return l()},get crosshairVisible(){return tr()}}),Wn),n})};Gn();/*! Bundled license information:
|
|
32
32
|
|
|
33
33
|
bippy/dist/rdt-hook-DAGphl8S.js:
|
|
34
34
|
(**
|
|
@@ -89,4 +89,4 @@ bippy/dist/source.js:
|
|
|
89
89
|
* This source code is licensed under the MIT license found in the
|
|
90
90
|
* LICENSE file in the root directory of this source tree.
|
|
91
91
|
*)
|
|
92
|
-
*/exports.init=
|
|
92
|
+
*/exports.init=Gn;return exports;})({});
|