react-grab 0.0.23 → 0.0.25
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 +567 -431
- package/dist/index.d.cts +43 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.global.js +15 -28
- package/dist/index.js +569 -433
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,2 +1,44 @@
|
|
|
1
|
+
interface Options {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
keyHoldDuration?: number;
|
|
4
|
+
onActivate?: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface OverlayBounds {
|
|
7
|
+
borderRadius: string;
|
|
8
|
+
height: number;
|
|
9
|
+
transform: string;
|
|
10
|
+
width: number;
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
}
|
|
14
|
+
interface ReactGrabRendererProps {
|
|
15
|
+
selectionVisible?: boolean;
|
|
16
|
+
selectionBounds?: OverlayBounds;
|
|
17
|
+
dragVisible?: boolean;
|
|
18
|
+
dragBounds?: OverlayBounds;
|
|
19
|
+
grabbedBoxes?: Array<{
|
|
20
|
+
id: string;
|
|
21
|
+
bounds: OverlayBounds;
|
|
22
|
+
}>;
|
|
23
|
+
successLabels?: Array<{
|
|
24
|
+
id: string;
|
|
25
|
+
text: string;
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
}>;
|
|
29
|
+
labelVariant?: "hover" | "processing" | "success";
|
|
30
|
+
labelText?: string;
|
|
31
|
+
labelX?: number;
|
|
32
|
+
labelY?: number;
|
|
33
|
+
labelVisible?: boolean;
|
|
34
|
+
labelZIndex?: number;
|
|
35
|
+
progressVisible?: boolean;
|
|
36
|
+
progress?: number;
|
|
37
|
+
mouseX?: number;
|
|
38
|
+
mouseY?: number;
|
|
39
|
+
crosshairVisible?: boolean;
|
|
40
|
+
}
|
|
1
41
|
|
|
2
|
-
|
|
42
|
+
declare const init: (rawOptions?: Options) => (() => void) | undefined;
|
|
43
|
+
|
|
44
|
+
export { type Options, type OverlayBounds, type ReactGrabRendererProps, init };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,44 @@
|
|
|
1
|
+
interface Options {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
keyHoldDuration?: number;
|
|
4
|
+
onActivate?: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface OverlayBounds {
|
|
7
|
+
borderRadius: string;
|
|
8
|
+
height: number;
|
|
9
|
+
transform: string;
|
|
10
|
+
width: number;
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
}
|
|
14
|
+
interface ReactGrabRendererProps {
|
|
15
|
+
selectionVisible?: boolean;
|
|
16
|
+
selectionBounds?: OverlayBounds;
|
|
17
|
+
dragVisible?: boolean;
|
|
18
|
+
dragBounds?: OverlayBounds;
|
|
19
|
+
grabbedBoxes?: Array<{
|
|
20
|
+
id: string;
|
|
21
|
+
bounds: OverlayBounds;
|
|
22
|
+
}>;
|
|
23
|
+
successLabels?: Array<{
|
|
24
|
+
id: string;
|
|
25
|
+
text: string;
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
}>;
|
|
29
|
+
labelVariant?: "hover" | "processing" | "success";
|
|
30
|
+
labelText?: string;
|
|
31
|
+
labelX?: number;
|
|
32
|
+
labelY?: number;
|
|
33
|
+
labelVisible?: boolean;
|
|
34
|
+
labelZIndex?: number;
|
|
35
|
+
progressVisible?: boolean;
|
|
36
|
+
progress?: number;
|
|
37
|
+
mouseX?: number;
|
|
38
|
+
mouseY?: number;
|
|
39
|
+
crosshairVisible?: boolean;
|
|
40
|
+
}
|
|
1
41
|
|
|
2
|
-
|
|
42
|
+
declare const init: (rawOptions?: Options) => (() => void) | undefined;
|
|
43
|
+
|
|
44
|
+
export { type Options, type OverlayBounds, type ReactGrabRendererProps, init };
|
package/dist/index.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){'use strict';/**
|
|
1
|
+
var ReactGrab=(function(exports){'use strict';/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2025 Aiden Bai
|
|
@@ -6,42 +6,29 @@
|
|
|
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 Jn=(e,t)=>e===t,pt=Symbol("solid-proxy"),er=typeof Proxy=="function",tr=Symbol("solid-track"),ze={equals:Jn},nn=an,ae=1,Pe=2,rn={owned:null,cleanups:null,context:null,owner:null};var F=null,h=null,$e=null,H=null,X=null,te=null,Xe=0;function Oe(e,t){let n=H,r=F,s=e.length===0,o=t===void 0?r:t,i=s?rn:{owned:null,cleanups:null,context:o?o.context:null,owner:o},a=s?e:()=>e(()=>ue(()=>Ee(i)));F=i,H=null;try{return pe(a,!0)}finally{H=n,F=r;}}function M(e,t){t=t?Object.assign({},ze,t):ze;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),sn(n,s));return [on.bind(n),r]}function fe(e,t,n){let r=yt(e,t,false,ae);je(r);}function de(e,t,n){nn=ir;let r=yt(e,t,false,ae);(r.user=true),te?te.push(r):je(r);}function ee(e,t,n){n=n?Object.assign({},ze,n):ze;let r=yt(e,t,true,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,je(r),on.bind(r)}function ue(e){if(H===null)return e();let t=H;H=null;try{return $e?$e.untrack(e):e()}finally{H=t;}}function Re(e){return F===null||(F.cleanups===null?F.cleanups=[e]:F.cleanups.push(e)),e}M(false);function on(){let e=h;if(this.sources&&(this.state))if((this.state)===ae)je(this);else {let t=X;X=null,pe(()=>We(this),false),X=t;}if(H){let t=this.observers?this.observers.length:0;H.sources?(H.sources.push(this),H.sourceSlots.push(t)):(H.sources=[this],H.sourceSlots=[t]),this.observers?(this.observers.push(H),this.observerSlots.push(H.sources.length-1)):(this.observers=[H],this.observerSlots=[H.sources.length-1]);}return e&&h.sources.has(this)?this.tValue:this.value}function sn(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?X.push(o):te.push(o),o.observers&&ln(o)),i?o.tState=ae:o.state=ae);}if(X.length>1e6)throw X=[],new Error},false);}return t}function je(e){if(!e.fn)return;Ee(e);let t=Xe;Jt(e,e.value,t);}function Jt(e,t,n){let r,s=F,o=H;H=F=e;try{r=e.fn(t);}catch(i){return e.pure&&((e.state=ae,e.owned&&e.owned.forEach(Ee),e.owned=null)),e.updatedAt=n+1,wt(i)}finally{H=o,F=s;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?sn(e,r):e.value=r,e.updatedAt=n);}function yt(e,t,n,r=ae,s){let o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:F,context:F?F.context:null,pure:n};if(F===null||F!==rn&&(F.owned?F.owned.push(o):F.owned=[o]),$e);return o}function De(e){let t=h;if((e.state)===0)return;if((e.state)===Pe)return We(e);if(e.suspense&&ue(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Xe);){(e.state)&&n.push(e);}for(let r=n.length-1;r>=0;r--){if(e=n[r],t);if((e.state)===ae)je(e);else if((e.state)===Pe){let s=X;X=null,pe(()=>We(e,n[0]),false),X=s;}}}function pe(e,t){if(X)return e();let n=false;t||(X=[]),te?n=true:te=[],Xe++;try{let r=e();return or(n),r}catch(r){n||(te=null),X=null,wt(r);}}function or(e){if(X&&(an(X),X=null),e)return;let n=te;te=null,n.length&&pe(()=>nn(n),false);}function an(e){for(let t=0;t<e.length;t++)De(e[t]);}function ir(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 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===ae?s!==t&&(!s.updatedAt||s.updatedAt<Xe)&&De(s):o===Pe&&We(s,t);}}}function ln(e){for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(!r.state)&&(r.state=Pe,r.pure?X.push(r):te.push(r),r.observers&&ln(r));}}function Ee(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--)Ee(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ee(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 ar(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function wt(e,t=F){let r=ar(e);throw r;}var lr=Symbol("fallback");function tn(e){for(let t=0;t<e.length;t++)e[t]();}function cr(e,t,n={}){let r=[],s=[],o=[],i=0,a=t.length>1?[]:null;return Re(()=>tn(o)),()=>{let c=e()||[],l=c.length,d,f;return c[tr],ue(()=>{let g,C,R,p,S,v,k,D,Y;if(l===0)i!==0&&(tn(o),o=[],r=[],s=[],i=0,a&&(a=[])),n.fallback&&(r=[lr],s[0]=Oe(Q=>(o[0]=Q,n.fallback())),i=1);else if(i===0){for(s=new Array(l),f=0;f<l;f++)r[f]=c[f],s[f]=Oe(w);i=l;}else {for(R=new Array(l),p=new Array(l),a&&(S=new Array(l)),v=0,k=Math.min(i,l);v<k&&r[v]===c[v];v++);for(k=i-1,D=l-1;k>=v&&D>=v&&r[k]===c[D];k--,D--)R[D]=s[k],p[D]=o[k],a&&(S[D]=a[k]);for(g=new Map,C=new Array(D+1),f=D;f>=v;f--)Y=c[f],d=g.get(Y),C[f]=d===void 0?-1:d,g.set(Y,f);for(d=v;d<=k;d++)Y=r[d],f=g.get(Y),f!==void 0&&f!==-1?(R[f]=s[d],p[f]=o[d],a&&(S[f]=a[d]),f=C[f],g.set(Y,f)):o[d]();for(f=v;f<l;f++)f in R?(s[f]=R[f],o[f]=p[f],a&&(a[f]=S[f],a[f](f))):s[f]=Oe(w);s=s.slice(0,i=l),r=c.slice(0);}return s});function w(g){if(o[f]=g,a){let[C,R]=M(f);return a[f]=R,t(c[f],C)}return t(c[f])}}}function P(e,t){return ue(()=>e(t||{}))}function Ge(){return true}var fr={get(e,t,n){return t===pt?n:e.get(t)},has(e,t){return t===pt?true:e.has(t)},set:Ge,deleteProperty:Ge,getOwnPropertyDescriptor(e,t){return {configurable:true,enumerable:true,get(){return e.get(t)},set:Ge,deleteProperty:Ge}},ownKeys(e){return e.keys()}};function ht(e){return (e=typeof e=="function"?e():e)?e:{}}function dr(){for(let e=0,t=this.length;e<t;++e){let n=this[e]();if(n!==void 0)return n}}function St(...e){let t=false;for(let i=0;i<e.length;i++){let a=e[i];t=t||!!a&&pt in a,e[i]=typeof a=="function"?(t=true,ee(a)):a;}if(er&&t)return new Proxy({get(i){for(let a=e.length-1;a>=0;a--){let c=ht(e[a])[i];if(c!==void 0)return c}},has(i){for(let a=e.length-1;a>=0;a--)if(i in ht(e[a]))return true;return false},keys(){let i=[];for(let a=0;a<e.length;a++)i.push(...Object.keys(ht(e[a])));return [...new Set(i)]}},fr);let n={},r=Object.create(null);for(let i=e.length-1;i>=0;i--){let a=e[i];if(!a)continue;let c=Object.getOwnPropertyNames(a);for(let l=c.length-1;l>=0;l--){let d=c[l];if(d==="__proto__"||d==="constructor")continue;let f=Object.getOwnPropertyDescriptor(a,d);if(!r[d])r[d]=f.get?{enumerable:true,configurable:true,get:dr.bind(n[d]=[f.get.bind(a)])}:f.value!==void 0?f:void 0;else {let w=n[d];w&&(f.get?w.push(f.get.bind(a)):f.value!==void 0&&w.push(()=>f.value));}}}let s={},o=Object.keys(r);for(let i=o.length-1;i>=0;i--){let a=o[i],c=r[a];c&&c.get?Object.defineProperty(s,a,c):s[a]=c?c.value:void 0;}return s}var mr=e=>`Stale read from <${e}>.`;function Ke(e){let t="fallback"in e&&{fallback:()=>e.fallback};return ee(cr(()=>e.each,e.children,t||void 0))}function re(e){let t=e.keyed,n=ee(()=>e.when,void 0,void 0),r=t?n:ee(n,void 0,{equals:(s,o)=>!s==!o});return ee(()=>{let s=r();if(s){let o=e.children;return typeof o=="function"&&o.length>0?ue(()=>o(t?s:()=>{if(!ue(r))throw mr("Show");return n()})):o}return e.fallback},void 0,void 0)}var Be=e=>ee(()=>e());function pr(e,t,n){let r=n.length,s=t.length,o=r,i=0,a=0,c=t[s-1].nextSibling,l=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]:c;for(;a<o;)e.insertBefore(n[a++],d);}else if(o===a)for(;i<s;)(!l||!l.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(!l){l=new Map;let f=a;for(;f<o;)l.set(n[f],f++);}let d=l.get(t[i]);if(d!=null)if(a<d&&d<o){let f=i,w=1,g;for(;++f<s&&f<o&&!((g=l.get(t[f]))==null||g!==d+w);)w++;if(w>d-a){let C=t[i];for(;a<d;)e.insertBefore(n[a++],C);}else e.replaceChild(n[a++],t[i++]);}else i++;else t[i++].remove();}}}function fn(e,t,n,r={}){let s;return Oe(o=>{s=o,t===document?e():me(t,e(),t.firstChild?null:void 0,n);},r.owner),()=>{s(),t.textContent="";}}function Ae(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 br(e,t,n){(e.removeAttribute(t));}function vt(e,t,n){if(!t)return n?br(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 be(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function Qe(e,t,n){return ue(()=>e(t,n))}function me(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Ze(e,t,r,n);fe(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 c=n[0];c&&c.nodeType===3?c.data!==t&&(c.data=t):c=document.createTextNode(t),n=Ie(e,n,r,c);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||i==="boolean"){n=Ie(e,n,r);}else {if(i==="function")return fe(()=>{let c=t();for(;typeof c=="function";)c=c();n=Ze(e,c,n,r);}),()=>n;if(Array.isArray(t)){let c=[],l=n&&Array.isArray(n);if(Tt(c,t,n,s))return fe(()=>n=Ze(e,c,n,r,true)),()=>n;if(c.length===0){if(n=Ie(e,n,r),a)return n}else l?n.length===0?un(e,c,r):pr(e,n,c):(n&&Ie(e),un(e,c));n=c;}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=Ie(e,n,r,t);Ie(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function Tt(e,t,n,r){let s=false;for(let o=0,i=t.length;o<i;o++){let a=t[o],c=n&&n[e.length],l;if(!(a==null||a===true||a===false))if((l=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))s=Tt(e,a,c)||s;else if(l==="function")if(r){for(;typeof a=="function";)a=a();s=Tt(e,Array.isArray(a)?a:[a],Array.isArray(c)?c:[c])||s;}else e.push(a),s=true;else {let d=String(a);c&&c.nodeType===3&&c.data===d?e.push(c):e.push(document.createTextNode(d));}}return s}function un(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n);}function Ie(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 c=a.parentNode===e;!o&&!i?c?e.replaceChild(s,a):e.insertBefore(s,n):c&&a.remove();}else o=true;}}else e.insertBefore(s,n);return [s]}var yr=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"],wr=e=>!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-"),Sr=e=>Array.isArray(e),Tr=(e,t=false)=>{let{composed:n,target:r}=e,s,o;if(r instanceof HTMLElement&&wr(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 Sr(t)?!!(s&&t&&t.some(i=>typeof s=="string"&&i.toLowerCase()===s.toLowerCase()||i===o)):!!(s&&t&&t)},mn=e=>Tr(e,yr);var ke="data-react-grab",hn=()=>{let e=document.querySelector(`[${ke}]`);if(e){let o=e.shadowRoot?.querySelector(`[${ke}]`);if(o instanceof HTMLDivElement&&e.shadowRoot)return o}let t=document.createElement("div");t.setAttribute(ke,"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(ke,"true"),n.appendChild(r),(document.body??document.documentElement).appendChild(t),r};var Je=(e,t=window.getComputedStyle(e))=>t.display!=="none"&&t.visibility!=="hidden"&&t.opacity!=="0";var vr=Ae("<div>"),xr=Ae('<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">'),Cr=Ae("<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713"),gn=Ae(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums">`),Er=Ae(`<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>`),Rr=Ae('<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)">'),et=8,kr=6,pn=4,yn=1500,wn=.95,Ar=.9,tt=(e,t,n)=>e+(t-e)*n,xt=e=>{let[t,n]=M(e.bounds.x),[r,s]=M(e.bounds.y),[o,i]=M(e.bounds.width),[a,c]=M(e.bounds.height),[l,d]=M(1),f=false,w=null,g=e.bounds;de(()=>{g=e.bounds;let p=e.lerpFactor??wn;if(!f){n(g.x),s(g.y),i(g.width),c(g.height),f=true;return}let S=.5,v=()=>{let k=tt(t(),g.x,p),D=tt(r(),g.y,p),Y=tt(o(),g.width,p),Q=tt(a(),g.height,p);n(k),s(D),i(Y),c(Q),Math.abs(k-g.x)<S&&Math.abs(D-g.y)<S&&Math.abs(Y-g.width)<S&&Math.abs(Q-g.height)<S?w=null:w=requestAnimationFrame(v);};w!==null&&cancelAnimationFrame(w),w=requestAnimationFrame(v),Re(()=>{w!==null&&(cancelAnimationFrame(w),w=null);});}),de(()=>{e.variant==="grabbed"&&requestAnimationFrame(()=>{d(0);});});let C={position:"fixed","box-sizing":"border-box","pointer-events":e.variant==="marquee"?"none":"auto","z-index":"2147483646"},R=()=>e.variant==="marquee"?{border:"1px dashed rgb(210, 57, 192)","background-color":"rgba(210, 57, 192, 0.1)","will-change":"transform, width, height",contain:"layout paint size"}:{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 P(re,{get when(){return e.visible!==false},get children(){var p=vr();return fe(S=>vt(p,{...C,...R(),top:`${r()}px`,left:`${t()}px`,width:`${o()}px`,height:`${a()}px`,"border-radius":e.bounds.borderRadius,transform:e.bounds.transform,opacity:l()},S)),p}})},Nr=e=>{let t;return de(()=>{t&&t.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,easing:"linear",iterations:1/0});}),(()=>{var n=xr(),r=t;return typeof r=="function"?Qe(r,n):t=n,fe(s=>vt(n,{...e.style},s)),n})()},bn=e=>{let[t,n]=M(0),r;de(()=>{e.visible!==false?requestAnimationFrame(()=>{n(1);}):n(0);}),de(()=>{if(e.variant==="success"){let i=setTimeout(()=>{n(0);},yn);Re(()=>clearTimeout(i));}});let s=()=>r?.getBoundingClientRect(),o=()=>{let i=s();if(!i)return {left:e.x,top:e.y};let a=window.innerWidth,c=window.innerHeight,l=Math.round(e.x),d=Math.round(e.y)-i.height-kr,f=et,w=et,g=a-i.width-et,C=c-i.height-et,R=l<f,p=d<w,S=R||p;return l=Math.max(f,Math.min(l,g)),d=Math.max(w,Math.min(d,C)),S&&(l+=pn,d+=pn),{left:l,top:d}};return P(re,{get when(){return e.visible!==false},get children(){var i=Er(),a=i.firstChild,c=r;return typeof c=="function"?Qe(c,i):r=i,me(i,P(re,{get when(){return e.variant==="processing"},get children(){return P(Nr,{})}}),a),me(i,P(re,{get when(){return e.variant==="success"},get children(){return Cr()}}),a),me(a,P(re,{get when(){return e.variant==="success"},children:"Grabbed "}),null),me(a,P(re,{get when(){return e.variant==="processing"},children:"Grabbing\u2026"}),null),me(a,P(re,{get when(){return e.variant==="hover"},get children(){var l=gn();return me(l,()=>e.text),l}}),null),me(a,P(re,{get when(){return e.variant!=="hover"},get children(){var l=gn();return me(l,()=>e.text),l}}),null),fe(l=>{var d=`${o().top}px`,f=`${o().left}px`,w=e.zIndex?.toString()??"2147483647",g=t();return d!==l.e&&be(i,"top",l.e=d),f!==l.t&&be(i,"left",l.t=f),w!==l.a&&be(i,"z-index",l.a=w),g!==l.o&&be(i,"opacity",l.o=g),l},{e:void 0,t:void 0,a:void 0,o:void 0}),i}})},Fr=e=>{let[t,n]=M(0),r;de(()=>{e.visible!==false?requestAnimationFrame(()=>{n(1);}):n(0);});let s=()=>{let o=r?.getBoundingClientRect();if(!o)return {left:e.mouseX,top:e.mouseY};let i=window.innerWidth,a=window.innerHeight,c=14,l=8,d=e.mouseX-o.width/2,f=e.mouseY+c;return f+o.height+l>a&&(f=e.mouseY-o.height-c),f=Math.max(l,Math.min(f,a-o.height-l)),d=Math.max(l,Math.min(d,i-o.width-l)),{left:d,top:f}};return P(re,{get when(){return e.visible!==false},get children(){var o=Rr(),i=o.firstChild,a=i.firstChild,c=r;return typeof c=="function"?Qe(c,o):r=o,fe(l=>{var d=`${s().top}px`,f=`${s().left}px`,w=t(),g=`${Math.min(100,Math.max(0,e.progress*100))}%`;return d!==l.e&&be(o,"top",l.e=d),f!==l.t&&be(o,"left",l.t=f),w!==l.a&&be(o,"opacity",l.a=w),g!==l.o&&be(a,"width",l.o=g),l},{e:void 0,t:void 0,a:void 0,o:void 0}),o}})},Sn=e=>[P(re,{get when(){return Be(()=>!!e.selectionVisible)()&&e.selectionBounds},get children(){return P(xt,{variant:"selection",get bounds(){return e.selectionBounds},get visible(){return e.selectionVisible},lerpFactor:wn})}}),P(re,{get when(){return Be(()=>!!e.marqueeVisible)()&&e.marqueeBounds},get children(){return P(xt,{variant:"marquee",get bounds(){return e.marqueeBounds},get visible(){return e.marqueeVisible},lerpFactor:Ar})}}),P(Ke,{get each(){return e.grabbedOverlays??[]},children:t=>P(xt,{variant:"grabbed",get bounds(){return t.bounds},visible:true})}),P(Ke,{get each(){return e.successLabels??[]},children:t=>P(bn,{variant:"success",get text(){return t.text},get x(){return t.x},get y(){return t.y},visible:true,zIndex:2147483648})}),P(re,{get when(){return Be(()=>!!(e.labelVisible&&e.labelVariant&&e.labelText&&e.labelX!==void 0))()&&e.labelY!==void 0},get children(){return P(bn,{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}})}}),P(re,{get when(){return Be(()=>!!(e.progressVisible&&e.progress!==void 0&&e.mouseX!==void 0))()&&e.mouseY!==void 0},get children(){return P(Fr,{get progress(){return e.progress},get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},get visible(){return e.progressVisible}})}})];var xn="0.5.14",Ye=`bippy-${xn}`,Tn=Object.defineProperty,_r=Object.prototype.hasOwnProperty,Ve=()=>{},Cn=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{}},Ct=(e=ye())=>"getFiberRoots"in e,En=false,vn,rt=(e=ye())=>En?true:(typeof e.inject=="function"&&(vn=e.inject.toString()),!!vn?.includes("(injected)")),nt=new Set,Ne=new Set,Rn=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:Ye,checkDCE:Cn,hasUnsupportedRendererAttached:false,inject(s){let o=++n;return t.set(o,s),Ne.add(s),r._instrumentationIsActive||(r._instrumentationIsActive=true,nt.forEach(i=>i())),o},on:Ve,onCommitFiberRoot:Ve,onCommitFiberUnmount:Ve,onPostCommitFiberRoot:Ve,renderers:t,supportsFiber:true,supportsFlight:true};try{Tn(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((c,l)=>{Ne.add(c),i.renderers.set(l,c);}),ot(e));}}});let s=window.hasOwnProperty,o=!1;Tn(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=Cn,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=Ye,t._instrumentationIsActive=!1;let n=Ct(t);if(n||(t.on=Ve),t.renderers.size){t._instrumentationIsActive=!0,nt.forEach(o=>o());return}let r=t.inject,s=rt(t);s&&!n&&(En=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=o=>{let i=r(o);return Ne.add(o),s&&t.renderers.set(i,o),t._instrumentationIsActive=!0,nt.forEach(a=>a()),i};}(t.renderers.size||t._instrumentationIsActive||rt())&&e?.();}catch{}},Et=()=>_r.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),ye=e=>Et()?(ot(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Rn(e),kn=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Rt=()=>{try{kn()&&ye();}catch{}};Rt();var kt=0,Ot=1;var At=5;var Nt=11,Ft=13;var _t=15,$t=16;var It=19;var Mt=26,Lt=27,Pt=28,Dt=30;var Ht=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?Ht(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=Ht(t);return r&&(r.displayName||r.name)||null};var jt=e=>{let t=ye(e.onActive);t._instrumentationSource=e.name??Ye;let n=t.onCommitFiberRoot;if(e.onCommitFiberRoot){let o=(i,a,c)=>{n!==o&&(n?.(i,a,c),e.onCommitFiberRoot?.(i,a,c));};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=ye();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},Bt=new Set;var Ur=Object.create,$n=Object.defineProperty,Gr=Object.getOwnPropertyDescriptor,zr=Object.getOwnPropertyNames,Wr=Object.getPrototypeOf,Xr=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=zr(t),o=0,i=s.length,a;o<i;o++)a=s[o],!Xr.call(e,a)&&a!==n&&$n(e,a,{get:(c=>t[c]).bind(null,a),enumerable:!(r=Gr(t,a))||r.enumerable});return e},Qr=(e,t,n)=>(n=e==null?{}:Ur(Wr(e)),Zr($n(n,"default",{value:e,enumerable:true}),e)),Jr=()=>{let e=ye();for(let t of [...Array.from(Ne),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},On=e=>{for(let t of Ne){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},we=e=>`
|
|
10
|
-
in ${e}`,eo=(e,t)=>{let n=
|
|
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}`,eo=(e,t)=>{let n=ye(e);return t&&(n+=` (at ${t})`),n},It=false,Mt=(e,t)=>{if(!e||It)return "";let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,It=true;let r=Jr();Tn(null);let s=console.error,o=console.warn;console.error=()=>{},console.warn=()=>{};try{let l={DetermineComponentFrameRoot(){let p;try{if(t){let g=function(){throw Error()};if(Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(g,[]);}catch(S){p=S;}Reflect.construct(e,[],g);}else {try{g.call();}catch(S){p=S;}e.call(g.prototype);}}else {try{throw Error()}catch(S){p=S;}let g=e();g&&typeof g.catch=="function"&&g.catch(()=>{});}}catch(g){if(g instanceof Error&&p instanceof Error&&typeof g.stack=="string")return [g.stack,p.stack]}return [null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[d,f]=l.DetermineComponentFrameRoot();if(d&&f){let p=d.split(`
|
|
11
11
|
`),g=f.split(`
|
|
12
|
-
`),
|
|
13
|
-
${
|
|
12
|
+
`),S=0,v=0;for(;S<p.length&&!p[S].includes("DetermineComponentFrameRoot");)S++;for(;v<g.length&&!g[v].includes("DetermineComponentFrameRoot");)v++;if(S===p.length||v===g.length)for(S=p.length-1,v=g.length-1;S>=1&&v>=0&&p[S]!==g[v];)v--;for(;S>=1&&v>=0;S--,v--)if(p[S]!==g[v]){if(S!==1||v!==1)do if(S--,v--,v<0||p[S]!==g[v]){let b=`
|
|
13
|
+
${p[S].replace(" at new "," at ")}`,T=st(e);return T&&b.includes("<anonymous>")&&(b=b.replace("<anonymous>",T)),b}while(S>=1&&v>=0);break}}}finally{It=false,Error.prepareStackTrace=n,Tn(r),console.error=s,console.warn=o;}let i=e?st(e):"";return i?ye(i):""},to=(e,t)=>{let n=e.tag,r="";switch(n){case Nt:r=ye("Activity");break;case St:r=Mt(e.type,true);break;case xt:r=Mt(e.type.render,false);break;case wt:case vt:r=Mt(e.type,false);break;case Tt:case Ot:case _t:r=ye(e.type);break;case Et:r=ye("Lazy");break;case Ct:r=e.child!==t&&t!==null?ye("Suspense Fallback"):ye("Suspense");break;case Rt:r=ye("SuspenseList");break;case kt:r=ye("ViewTransition");break;default:return ""}return r},no=e=>{try{let t="",n=e,r=null;do{t+=to(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+=eo(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
15
|
${t.stack}`:""}},ro=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},oo=/(^|@)\S+:\d+/,
|
|
19
|
-
`),r=[];for(let s of n)if(/^\s*at\s+/.test(s)){let o=
|
|
20
|
-
`).filter(r=>!!r.match(
|
|
21
|
-
`).filter(r=>!r.match(so)),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,
|
|
22
|
-
`),r;for(let o=n.length-1;o>=0&&!r;o--){let i=n[o].match(co);i&&(r=i[1]||i[2]);}if(!r)return null;let s=
|
|
23
|
-
`)};var wo=()=>document.hasFocus()?Promise.resolve():new Promise(e=>{let t=()=>{window.removeEventListener("focus",t),e();};window.addEventListener("focus",t),window.focus();}),
|
|
24
|
-
|
|
25
|
-
<referenced_element>
|
|
26
|
-
${m}
|
|
27
|
-
</referenced_element>`,$=m=>`
|
|
28
|
-
|
|
29
|
-
<referenced_elements>
|
|
30
|
-
${m}
|
|
31
|
-
</referenced_elements>`,G=m=>{let E=`grabbed-${Date.now()}-${Math.random()}`;le(I=>[...I,{id:E,bounds:m}]),setTimeout(()=>{le(I=>I.filter(N=>N.id!==E));},300);},se=(m,E,I)=>{let N=`success-${Date.now()}-${Math.random()}`;Ue(V=>[...V,{id:N,text:m,x:E,y:I}]),setTimeout(()=>{Ue(V=>V.filter(J=>J.id!==N));},1700);},Fe=async m=>{let E=m.getBoundingClientRect(),I=(m.tagName||"").toLowerCase();G({borderRadius:window.getComputedStyle(m).borderRadius||"0px",height:E.height,transform:window.getComputedStyle(m).transform||"none",width:E.width,x:E.left,y:E.top});try{let N=Gt(m);await lt(U(N));let V=await Ut(m);if(V?.length){let J=V.map(oe=>` ${oe.functionName} - ${oe.fileName}:${oe.lineNumber}:${oe.columnNumber}`).join(`
|
|
32
|
-
`);await lt(U(`${N}
|
|
33
|
-
|
|
34
|
-
Component owner stack:
|
|
35
|
-
${J}`));}}catch{}se(I?`<${I}>`:"<element>",E.left,E.top);},Te=async m=>{if(m.length===0)return;let E=1/0,I=1/0;for(let N of m){let V=N.getBoundingClientRect();E=Math.min(E,V.left),I=Math.min(I,V.top),G({borderRadius:window.getComputedStyle(N).borderRadius||"0px",height:V.height,transform:window.getComputedStyle(N).transform||"none",width:V.width,x:V.left,y:V.top});}try{let N=[];for(let J of m){let oe=Gt(J),K=await Ut(J);if(K?.length){let ge=K.map(Z=>` ${Z.functionName} - ${Z.fileName}:${Z.lineNumber}:${Z.columnNumber}`).join(`
|
|
36
|
-
`);N.push(`${oe}
|
|
18
|
+
`,r)),r!==-1)n=n.slice(0,r);else return "";return n},oo=/(^|@)\S+:\d+/,On=/^\s*at .*(\S+:\d+|\(native\))/m,so=/^(eval@)?(\[native code\])?$/;var io=(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(oo)){let o=Cn(s,void 0)[0];o&&r.push(o);}return Pt(r,t)}return e.match(On)?xn(e,t):Cn(e,t)},_n=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]},Pt=(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)=>Pt(e.split(`
|
|
20
|
+
`).filter(r=>!!r.match(On)),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=_n(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)=>Pt(e.split(`
|
|
21
|
+
`).filter(r=>!r.match(so)),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=_n(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 ao=Kr((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 y=o.charCodeAt(x);i[x]=y,a[y]=x;}function l(x,y){let u=0,w=0,R=0;do{let P=x.next();R=a[P],u|=(R&31)<<w,w+=5;}while(R&32);let F=u&1;return u>>>=1,F&&(u=-2147483648|-u),y+u}function c(x,y,u){let w=y-u;w=w<0?-w<<1|1:w<<1;do{let R=w&31;w>>>=5,w>0&&(R|=32),x.write(i[R]);}while(w>0);return y}function d(x,y){return x.pos>=y?false:x.peek()!==r}let f=1024*16,p=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(x){return Buffer.from(x.buffer,x.byteOffset,x.byteLength).toString()}}:{decode(x){let y="";for(let u=0;u<x.length;u++)y+=String.fromCharCode(x[u]);return y}};class g{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(f);}write(y){let{buffer:u}=this;u[this.pos++]=y,this.pos===f&&(this.out+=p.decode(u),this.pos=0);}flush(){let{buffer:y,out:u,pos:w}=this;return w>0?u+p.decode(y.subarray(0,w)):u}}class S{constructor(y){this.pos=0,this.buffer=y;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(y){let{buffer:u,pos:w}=this,R=u.indexOf(y,w);return R===-1?u.length:R}}let v=[];function b(x){let{length:y}=x,u=new S(x),w=[],R=[],F=0;for(;u.pos<y;u.pos++){F=l(u,F);let P=l(u,0);if(!d(u,y)){let U=R.pop();U[2]=F,U[3]=P;continue}let L=l(u,0),Y=l(u,0),$=Y&1,I=$?[F,P,0,0,L,l(u,0)]:[F,P,0,0,L],G=v;if(d(u,y)){G=[];do{let U=l(u,0);G.push(U);}while(d(u,y))}I.vars=G,w.push(I),R.push(I);}return w}function T(x){let y=new g;for(let u=0;u<x.length;)u=C(x,u,y,[0]);return y.flush()}function C(x,y,u,w){let R=x[y],{0:F,1:P,2:L,3:Y,4:$,vars:I}=R;y>0&&u.write(r),w[0]=c(u,F,w[0]),c(u,P,0),c(u,$,0);let G=R.length===6?1:0;c(u,G,0),R.length===6&&c(u,R[5],0);for(let U of I)c(u,U,0);for(y++;y<x.length;){let U=x[y],{0:M,1:X}=U;if(M>L||M===L&&X>=Y)break;y=C(x,y,u,w);}return u.write(r),w[0]=c(u,L,w[0]),c(u,Y,0),y}function E(x){let{length:y}=x,u=new S(x),w=[],R=[],F=0,P=0,L=0,Y=0,$=0,I=0,G=0,U=0;do{let M=u.indexOf(";"),X=0;for(;u.pos<M;u.pos++){if(X=l(u,X),!d(u,M)){let Q=R.pop();Q[2]=F,Q[3]=X;continue}let ne=l(u,0),Ce=ne&1,ve=ne&2,we=ne&4,Ie=null,Me=v,ge;if(Ce){let Q=l(u,P);L=l(u,P===Q?L:0),P=Q,ge=[F,X,0,0,Q,L];}else ge=[F,X,0,0];if(ge.isScope=!!we,ve){let Q=Y,Se=$;Y=l(u,Y);let he=Q===Y;$=l(u,he?$:0),I=l(u,he&&Se===$?I:0),Ie=[Y,$,I];}if(ge.callsite=Ie,d(u,M)){Me=[];do{G=F,U=X;let Q=l(u,0),Se;if(Q<-1){Se=[[l(u,0)]];for(let he=-1;he>Q;he--){let Ue=G;G=l(u,G),U=l(u,G===Ue?U:0);let ze=l(u,0);Se.push([ze,G,U]);}}else Se=[[Q]];Me.push(Se);}while(d(u,M))}ge.bindings=Me,w.push(ge),R.push(ge);}F++,u.pos=M+1;}while(u.pos<y);return w}function A(x){if(x.length===0)return "";let y=new g;for(let u=0;u<x.length;)u=j(x,u,y,[0,0,0,0,0,0,0]);return y.flush()}function j(x,y,u,w){let R=x[y],{0:F,1:P,2:L,3:Y,isScope:$,callsite:I,bindings:G}=R;w[0]<F?(q(u,w[0],F),w[0]=F,w[1]=0):y>0&&u.write(r),w[1]=c(u,R[1],w[1]);let U=(R.length===6?1:0)|(I?2:0)|($?4:0);if(c(u,U,0),R.length===6){let{4:M,5:X}=R;M!==w[2]&&(w[3]=0),w[2]=c(u,M,w[2]),w[3]=c(u,X,w[3]);}if(I){let{0:M,1:X,2:ne}=R.callsite;M===w[4]?X!==w[5]&&(w[6]=0):(w[5]=0,w[6]=0),w[4]=c(u,M,w[4]),w[5]=c(u,X,w[5]),w[6]=c(u,ne,w[6]);}if(G)for(let M of G){M.length>1&&c(u,-M.length,0);let X=M[0][0];c(u,X,0);let ne=F,Ce=P;for(let ve=1;ve<M.length;ve++){let we=M[ve];ne=c(u,we[1],ne),Ce=c(u,we[2],Ce),c(u,we[0],0);}}for(y++;y<x.length;){let M=x[y],{0:X,1:ne}=M;if(X>L||X===L&&ne>=Y)break;y=j(x,y,u,w);}return w[0]<L?(q(u,w[0],L),w[0]=L,w[1]=0):u.write(r),w[1]=c(u,Y,w[1]),y}function q(x,y,u){do x.write(s);while(++y<u)}function B(x){let{length:y}=x,u=new S(x),w=[],R=0,F=0,P=0,L=0,Y=0;do{let $=u.indexOf(";"),I=[],G=true,U=0;for(R=0;u.pos<$;){let M;R=l(u,R),R<U&&(G=false),U=R,d(u,$)?(F=l(u,F),P=l(u,P),L=l(u,L),d(u,$)?(Y=l(u,Y),M=[R,F,P,L,Y]):M=[R,F,P,L]):M=[R],I.push(M),u.pos++;}G||ae(I),w.push(I),u.pos=$+1;}while(u.pos<=y);return w}function ae(x){x.sort(me);}function me(x,y){return x[0]-y[0]}function lt(x){let y=new g,u=0,w=0,R=0,F=0;for(let P=0;P<x.length;P++){let L=x[P];if(P>0&&y.write(s),L.length===0)continue;let Y=0;for(let $=0;$<L.length;$++){let I=L[$];$>0&&y.write(r),Y=c(y,I[0],Y),I.length!==1&&(u=c(y,I[1],u),w=c(y,I[2],w),R=c(y,I[3],R),I.length!==4&&(F=c(y,I[4],F)));}}return y.flush()}n.decode=B,n.decodeGeneratedRanges=E,n.decodeOriginalScopes=b,n.encode=lt,n.encodeGeneratedRanges=A,n.encodeOriginalScopes=T,Object.defineProperty(n,"__esModule",{value:true});});}),Nn=Qr(ao()),kn=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,lo=/^data:application\/json[^,]+base64,/,co=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,Fn=typeof WeakRef<"u",Ye=new Map,at=new Map,uo=e=>Fn&&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 d of s)if(d[0]<=r)o=d;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},fo=(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)},mo=(e,t)=>{let n=t.split(`
|
|
22
|
+
`),r;for(let o=n.length-1;o>=0&&!r;o--){let i=n[o].match(co);i&&(r=i[1]||i[2]);}if(!r)return null;let s=kn.test(r);if(!(lo.test(r)||s||r.startsWith("/"))){let o=e.split("/");o[o.length-1]=r,r=o.join("/");}return r},go=e=>({file:e.file,mappings:(0, Nn.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),ho=e=>{let t=e.sections.map(({map:r,offset:s})=>({map:{...r,mappings:(0, Nn.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(kn);if(!n)return true;let r=n[0].toLowerCase();return r==="http:"||r==="https:"},po=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=mo(e,n);if(!r||!En(r))return null;try{let s=await t(r),o=await s.json();return "sections"in o?ho(o):go(o)}catch{return null}},bo=async(e,t=true,n)=>{if(t&&Ye.has(e)){let o=Ye.get(e);if(o==null)return null;if(uo(o)){let i=o.deref();if(i)return i;Ye.delete(e);}else return o}if(t&&at.has(e))return at.get(e);let r=po(e,n);t&&at.set(e,r);let s=await r;return t&&at.delete(e),t&&(s===null?Ye.set(e,null):Ye.set(e,Fn?new WeakRef(s):s)),s};var yo=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string";var An=e=>yo(e)?ro(e._debugStack.stack):no(e);var $n=async(e,t=1,n=true,r)=>{let s=io(e,{slice:t??1}),o=[];for(let i of s){if(!i?.file)continue;let a=await bo(i.file,n,r);if(a&&typeof i.line=="number"&&typeof i.col=="number"){let l=fo(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};At({onCommitFiberRoot(e,t){$t.add(t);}});var In=async e=>{let t=it(e);if(!t)return null;let n=An(t),r=await $n(n,Number.MAX_SAFE_INTEGER);return r||null};var Mn=e=>{let t=new Set(["article","aside","footer","form","header","main","nav","section"]),n=b=>{let T=b.tagName.toLowerCase();if(t.has(T)||b.id)return true;if(b.className&&typeof b.className=="string"){let C=b.className.trim();if(C&&C.length>0)return true}return Array.from(b.attributes).some(C=>C.name.startsWith("data-"))},r=(b,T=10)=>{let C=[],E=b.parentElement,A=0;for(;E&&A<T&&E.tagName!=="BODY"&&!(n(E)&&(C.push(E),C.length>=3));)E=E.parentElement,A++;return C.reverse()},s=b=>{let T=[],C=b,E=0,A=5;for(;C&&E<A&&C.tagName!=="BODY";){let j=C.tagName.toLowerCase();if(C.id){j+=`#${C.id}`,T.unshift(j);break}else if(C.className&&typeof C.className=="string"&&C.className.trim()){let q=C.className.trim().split(/\s+/).slice(0,2);j+=`.${q.join(".")}`;}if(!C.id&&(!C.className||!C.className.trim())&&C.parentElement){let q=Array.from(C.parentElement.children),B=q.indexOf(C);B>=0&&q.length>1&&(j+=`:nth-child(${B+1})`);}T.unshift(j),C=C.parentElement,E++;}return T.join(" > ")},o=(b,T=false)=>{let C=b.tagName.toLowerCase(),E=[];if(b.id&&E.push(`id="${b.id}"`),b.className&&typeof b.className=="string"){let B=b.className.trim().split(/\s+/);if(B.length>0&&B[0]){let me=(T?B.slice(0,3):B).join(" ");me.length>30&&(me=me.substring(0,30)+"..."),E.push(`class="${me}"`);}}let A=Array.from(b.attributes).filter(B=>B.name.startsWith("data-")),j=T?A.slice(0,1):A;for(let B of j){let ae=B.value;ae.length>20&&(ae=ae.substring(0,20)+"..."),E.push(`${B.name}="${ae}"`);}let q=b.getAttribute("aria-label");if(q&&!T){let B=q;B.length>20&&(B=B.substring(0,20)+"..."),E.push(`aria-label="${B}"`);}return E.length>0?`<${C} ${E.join(" ")}>`:`<${C}>`},i=b=>`</${b.tagName.toLowerCase()}>`,a=b=>{let T=b.textContent||"";T=T.trim().replace(/\s+/g," ");let C=60;return T.length>C&&(T=T.substring(0,C)+"..."),T},l=b=>{if(b.id)return `#${b.id}`;if(b.className&&typeof b.className=="string"){let T=b.className.trim().split(/\s+/);if(T.length>0&&T[0])return `.${T[0]}`}return null},c=[];c.push(`Path: ${s(e)}`),c.push("");let d=r(e);for(let b=0;b<d.length;b++){let T=" ".repeat(b);c.push(T+o(d[b],true));}let f=e.parentElement,p=-1;if(f){let b=Array.from(f.children);if(p=b.indexOf(e),p>0){let T=b[p-1];if(l(T)&&p<=2){let E=" ".repeat(d.length);c.push(`${E} ${o(T,true)}`),c.push(`${E} </${T.tagName.toLowerCase()}>`);}else if(p>0){let E=" ".repeat(d.length);c.push(`${E} ... (${p} element${p===1?"":"s"})`);}}}let g=" ".repeat(d.length);c.push(g+" <!-- SELECTED -->");let S=a(e),v=e.children.length;if(S&&v===0&&S.length<40?c.push(`${g} ${o(e)}${S}${i(e)}`):(c.push(g+" "+o(e)),S&&c.push(`${g} ${S}`),v>0&&c.push(`${g} ... (${v} element${v===1?"":"s"})`),c.push(g+" "+i(e))),f&&p>=0){let b=Array.from(f.children),T=b.length-p-1;if(T>0){let C=b[p+1];l(C)&&T<=2?(c.push(`${g} ${o(C,true)}`),c.push(`${g} </${C.tagName.toLowerCase()}>`)):c.push(`${g} ... (${T} element${T===1?"":"s"})`);}}for(let b=d.length-1;b>=0;b--){let T=" ".repeat(b);c.push(T+i(d[b]));}return c.join(`
|
|
23
|
+
`)};var wo=()=>document.hasFocus()?Promise.resolve():new Promise(e=>{let t=()=>{window.removeEventListener("focus",t),e();};window.addEventListener("focus",t),window.focus();}),Lt=async e=>{await wo();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 Ge=e=>{if(e.closest(`[${$e}]`))return false;let t=window.getComputedStyle(e);return !(!Ln(e,t)||t.pointerEvents==="none")};var Dt=(e,t)=>{let n=document.elementsFromPoint(e,t);for(let r of n)if(Ge(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 v=(c.tagName||"").toUpperCase();if(v==="HTML"||v==="BODY")continue}if(!t(c))continue;let d=c.getBoundingClientRect(),f=d.left,p=d.top,g=d.left+d.width,S=d.top+d.height;if(n){let v=Math.max(o,f),b=Math.max(i,p),T=Math.min(a,g),C=Math.min(l,S),E=Math.max(0,T-v),A=Math.max(0,C-b),j=E*A,q=Math.max(0,d.width*d.height);q>0&&j/q>=.75&&r.push(c);}else f<a&&g>o&&p<l&&S>i&&r.push(c);}return r},Hn=(e,t)=>Dn(e,t,true),jn=(e,t)=>Dn(e,t,false);var Ht=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 So=1700,To=150,Bn=e=>{let t={enabled:true,keyHoldDuration:300,...e};if(t.enabled!==false)return Ee(n=>{let[s,o]=_(false),[i,a]=_(-1e3),[l,c]=_(-1e3),[d,f]=_(false),[p,g]=_(-1e3),[S,v]=_(-1e3),[b,T]=_(false),[C,E]=_(null),[A,j]=_(null),[q,B]=_(0),[ae,me]=_([]),[lt,x]=_([]),[y,u]=_(false),[w,R]=_(false),[F,P]=_(null),[L,Y]=_(null),$=null,I=null,G=null,U=z(()=>y()&&!b()),M=z(()=>i()>-1e3&&l()>-1e3),X=m=>(m.metaKey||m.ctrlKey)&&m.key.toLowerCase()==="c",ne=m=>{let D={id:`grabbed-${Date.now()}-${Math.random()}`,bounds:m},H=ae();me([...H,D]);},Ce=(m,O,D)=>{let H=`success-${Date.now()}-${Math.random()}`;x(J=>[...J,{id:H,text:m,x:O,y:D}]),setTimeout(()=>{x(J=>J.filter(le=>le.id!==H));},So);},ve=m=>m.map(O=>{let D=O.functionName??"anonymous",H=O.fileName??"unknown",J=O.lineNumber??0,le=O.columnNumber??0;return ` ${D} - ${H}:${J}:${le}`}).join(`
|
|
24
|
+
`),we=async m=>{let O=Mn(m),D=await In(m);if(D?.length){let H=ve(D);return `${O}
|
|
37
25
|
|
|
38
26
|
Component owner stack:
|
|
39
|
-
${
|
|
27
|
+
${H}`}return O},Ie=m=>(m.tagName||"").toLowerCase(),Me=async m=>{let O=m.getBoundingClientRect(),D=Ie(m);P(i()),Y(l()),ne(Ht(m));try{let H=await we(m);await Lt(H);}catch{}Ce(D?`<${D}>`:"<element>",O.left,O.top);},ge=async m=>{if(m.length===0)return;let O=1/0,D=1/0;P(i()),Y(l());for(let H of m){let J=H.getBoundingClientRect();O=Math.min(O,J.left),D=Math.min(D,J.top),ne(Ht(H));}try{let J=(await Promise.all(m.map(le=>we(le)))).join(`
|
|
40
28
|
|
|
41
29
|
---
|
|
42
30
|
|
|
43
|
-
`);await
|
|
44
|
-
/*! Bundled license information:
|
|
31
|
+
`);await Lt(J);}catch{}Ce(`${m.length} elements`,O,D);},Q=z(()=>!U()||d()?null:Dt(i(),l())),Se=z(()=>{let m=Q();if(!m)return;let O=m.getBoundingClientRect(),D=window.getComputedStyle(m);return {borderRadius:D.borderRadius||"0px",height:O.height,transform:D.transform||"none",width:O.width,x:O.left,y:O.top}}),he=5,Ue=(m,O)=>({x:Math.abs(m-p()),y:Math.abs(O-S())}),ze=z(()=>{if(!d())return false;let m=Ue(i(),l());return m.x>he||m.y>he}),jt=(m,O)=>{let D=Math.min(p(),m),H=Math.min(S(),O),J=Math.abs(m-p()),le=Math.abs(O-S());return {x:D,y:H,width:J,height:le}},Vn=z(()=>{if(!ze())return;let m=jt(i(),l());return {borderRadius:"0px",height:m.height,transform:"none",width:m.width,x:m.x,y:m.y}}),Yn=z(()=>{let m=Q();if(!m)return "";let O=Ie(m);return O?`<${O}>`:"<element>"}),Bt=z(()=>({x:i(),y:l()})),Gn=z(()=>{let m=Q(),O=C();return !!m&&m===O});oe(fe(()=>[Q(),C()],([m,O])=>{O&&m&&O!==m&&E(null);})),oe(fe(()=>[i(),l(),F(),L()],([m,O,D,H])=>{if(D===null||H===null||ae().length===0)return;let J=5,le=Math.abs(m-D),er=Math.abs(O-H);(le>J||er>J)&&(me([]),P(null),Y(null));}));let Vt=z(()=>{let m=A();if(q(),m===null)return 0;let O=Date.now()-m;return Math.min(O/t.keyHoldDuration,1)}),Un=()=>{j(Date.now()),R(false),G=window.setTimeout(()=>{R(true),G=null;},To);let m=()=>{if(A()===null)return;B(D=>D+1),Vt()<1&&(I=requestAnimationFrame(m));};m();},Xe=()=>{I!==null&&(cancelAnimationFrame(I),I=null),G!==null&&(window.clearTimeout(G),G=null),j(null),R(false);},zn=()=>{Xe(),u(true),document.body.style.cursor="crosshair";},Yt=new AbortController,_e=Yt.signal;window.addEventListener("keydown",m=>{if(m.key==="Escape"&&s()){o(false),u(false),document.body.style.cursor="",d()&&(f(false),document.body.style.userSelect=""),$&&window.clearTimeout($),Xe();return}ln(m)||X(m)&&!s()&&(o(true),Un(),$=window.setTimeout(()=>{zn(),t.onActivate?.();},t.keyHoldDuration));},{signal:_e}),window.addEventListener("keyup",m=>{s()&&(!X(m)||m.key.toLowerCase()==="c")&&(o(false),u(false),document.body.style.cursor="",$&&window.clearTimeout($),Xe());},{signal:_e}),window.addEventListener("mousemove",m=>{a(m.clientX),c(m.clientY);},{signal:_e}),window.addEventListener("mousedown",m=>{!U()||b()||(m.preventDefault(),f(true),g(m.clientX),v(m.clientY),document.body.style.userSelect="none");},{signal:_e}),window.addEventListener("mouseup",m=>{if(!d())return;let O=Ue(m.clientX,m.clientY),D=O.x>he||O.y>he;if(f(false),document.body.style.userSelect="",D){let H=jt(m.clientX,m.clientY),J=Hn(H,Ge);if(J.length>0)T(true),ge(J).finally(()=>{T(false);});else {let le=jn(H,Ge);le.length>0&&(T(true),ge(le).finally(()=>{T(false);}));}}else {let H=Dt(m.clientX,m.clientY);if(!H)return;T(true),E(H),Me(H).finally(()=>{T(false);});}},{signal:_e}),document.addEventListener("visibilitychange",()=>{document.hidden&&me([]);},{signal:_e}),de(()=>{Yt.abort(),$&&window.clearTimeout($),Xe(),document.body.style.userSelect="",document.body.style.cursor="";});let Xn=cn(),qn=z(()=>false),Wn=z(()=>U()&&ze()),Kn=z(()=>b()?"processing":"hover"),Zn=z(()=>U()&&!d()&&!!Q()&&!Gn()||b()),Qn=z(()=>s()&&w()&&M()),Jn=z(()=>U()&&!d());return sn(()=>k(mn,{get selectionVisible(){return qn()},get selectionBounds(){return Se()},get dragVisible(){return Wn()},get dragBounds(){return Vn()},get grabbedBoxes(){return ae()},get successLabels(){return lt()},get labelVariant(){return Kn()},get labelText(){return Yn()},get labelX(){return Bt().x},get labelY(){return Bt().y},get labelVisible(){return Zn()},get progressVisible(){return Qn()},get progress(){return Vt()},get mouseX(){return i()},get mouseY(){return l()},get crosshairVisible(){return Jn()}}),Xn),n})};Bn();/*! Bundled license information:
|
|
45
32
|
|
|
46
33
|
bippy/dist/rdt-hook-DAGphl8S.js:
|
|
47
34
|
(**
|
|
@@ -102,4 +89,4 @@ bippy/dist/source.js:
|
|
|
102
89
|
* This source code is licensed under the MIT license found in the
|
|
103
90
|
* LICENSE file in the root directory of this source tree.
|
|
104
91
|
*)
|
|
105
|
-
*/})();
|
|
92
|
+
*/exports.init=Bn;return exports;})({});
|