@omnidotdev/rdk 0.4.1 → 0.5.0
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/build/fiducial/FiducialSession.d.ts.map +1 -1
- package/build/geolocation/GeolocationAnchor.d.ts +4 -5
- package/build/geolocation/GeolocationAnchor.d.ts.map +1 -1
- package/build/geolocation/GeolocationSession.d.ts.map +1 -1
- package/build/geolocation/geolocationBackend.d.ts +1 -1
- package/build/geolocation/geolocationBackend.d.ts.map +1 -1
- package/build/index.cjs +1 -1
- package/build/index.js +466 -13
- package/package.json +14 -3
- package/build/emulate-DDG1llTY.cjs +0 -1174
- package/build/emulate-DQf06B-v.js +0 -15348
- package/build/index-DTfJZWBh.cjs +0 -378
- package/build/index-DYvttzcq.js +0 -38575
- package/build/living_room-BExcgHe_.cjs +0 -1
- package/build/living_room-uy_CEYZC.js +0 -11
- package/build/meeting_room-BjXC3fLc.js +0 -11
- package/build/meeting_room-QG1J4owl.cjs +0 -1
- package/build/music_room-AFchga9Y.js +0 -11
- package/build/music_room-KhUm0m6-.cjs +0 -1
- package/build/office_large-Cy_oZxjZ.cjs +0 -1
- package/build/office_large-qDeoZNBo.js +0 -11
- package/build/office_small-B_PLvrYC.js +0 -11
- package/build/office_small-DfBVh7jy.cjs +0 -1
|
@@ -1,1174 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index-DTfJZWBh.cjs"),C=require("react"),h=require("three");function H0(t,e,n){if(!(e instanceof globalThis.MouseEvent))return n.set(0,0);const{width:r,height:i,top:s,left:o}=t.getBoundingClientRect(),a=e.clientX-o,l=e.clientY-s;return n.set(a/r*2-1,-(l/i)*2+1)}function $0(t,e,n,r){return W0(t,typeof e=="function"?e:()=>e,n,H0.bind(null,t),t.setPointerCapture.bind(t),i=>{t.hasPointerCapture(i)&&t.releasePointerCapture(i)},{pointerTypePrefix:"screen-",...r})}function W0(t,e,n,r,i,s,o={}){const a=o?.forwardPointerCapture??!0,l=new Map,c=o.pointerTypePrefix??"forward-",f=(M,D)=>{let F=l.get(M.pointerId);return F!=null||(F=new u.Pointer(u.generateUniquePointerId(),`${c}${M.pointerType}`,M.pointerState,new u.ScreenRayIntersector((ue,fe)=>(r(ue,fe),e()),o),e,void 0,a?i.bind(null,M.pointerId):void 0,a?s.bind(null,M.pointerId):void 0,o),D!="move"&&D!="wheel"&&(F.setIntersection(F.computeIntersection("pointer",n,M)),F.commit(M,!1)),l.set(M.pointerId,F)),F},d=new Map,p=new Map,m=[],g=[],w=(M,D,F)=>{switch(M){case"move":F.move(n,D);return;case"wheel":F.wheel(n,D);return;case"cancel":F.cancel(D);return;case"down":if(!pa(D))return;F.down(D);return;case"up":if(!pa(D))return;F.up(D);return;case"exit":p.delete(F),d.delete(F),F.exit(D);return}},y=(M,D)=>{const F=f(D,M);M==="move"&&p.set(F,D),M==="wheel"&&d.set(F,D),o.batchEvents??!0?g.push({type:M,event:D}):w(M,D,F)},b=y.bind(null,"move"),_=y.bind(null,"cancel"),E=y.bind(null,"down"),T=y.bind(null,"up"),v=y.bind(null,"wheel"),S=y.bind(null,"exit");return t.addEventListener("pointermove",b),t.addEventListener("pointercancel",_),t.addEventListener("pointerdown",E),t.addEventListener("pointerup",T),t.addEventListener("wheel",v),t.addEventListener("pointerleave",S),{destroy(){t.removeEventListener("pointermove",b),t.removeEventListener("pointercancel",_),t.removeEventListener("pointerdown",E),t.removeEventListener("pointerup",T),t.removeEventListener("wheel",v),t.removeEventListener("pointerleave",S),p.clear(),d.clear()},update(){const M=g.length;for(let D=0;D<M;D++){const{type:F,event:ue}=g[D],fe=f(ue,F);if(F==="move"&&(m.push(fe),p.get(fe)!=ue)){fe.emitMove(ue);continue}if(F==="wheel"&&d.get(fe)!=ue){fe.emitWheel(ue);continue}w(F,ue,fe)}if(g.length=0,o.intersectEveryFrame??!1)for(const[D,F]of p.entries())m.includes(D)||D.move(n,F);m.length=0}}}function pa(t){return t.button!=null}const ma=()=>{};let ko={},qc={},Xc=null,Yc={mark:ma,measure:ma};try{typeof window<"u"&&(ko=window),typeof document<"u"&&(qc=document),typeof MutationObserver<"u"&&(Xc=MutationObserver),typeof performance<"u"&&(Yc=performance)}catch{}const{userAgent:xa=""}=ko.navigator||{},Ht=ko,xe=qc,ga=Xc,Qr=Yc;Ht.document;const At=!!xe.documentElement&&!!xe.head&&typeof xe.addEventListener=="function"&&typeof xe.createElement=="function",Zc=~xa.indexOf("MSIE")||~xa.indexOf("Trident/");var ge="classic",Qc="duotone",qe="sharp",Xe="sharp-duotone",q0=[ge,Qc,qe,Xe],X0={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds"}},ya={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},Y0=["kit"],Z0=/fa(s|r|l|t|d|b|k|kd|ss|sr|sl|st|sds)?[\-\ ]/,Q0=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,K0={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}},J0={"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds"}},ef={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds"}},tf={classic:["fas","far","fal","fat"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds"]},nf={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid"}},rf={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds"}},Kc={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid"}},sf=["solid","regular","light","thin","duotone","brands"],Jc=[1,2,3,4,5,6,7,8,9,10],of=Jc.concat([11,12,13,14,15,16,17,18,19,20]),Sr={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},af=[...Object.keys(tf),...sf,"2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",Sr.GROUP,Sr.SWAP_OPACITY,Sr.PRIMARY,Sr.SECONDARY].concat(Jc.map(t=>"".concat(t,"x"))).concat(of.map(t=>"w-".concat(t))),lf={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},cf={kit:{"fa-kit":"fak"}},uf={kit:{fak:"fa-kit"}},va={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}};const St="___FONT_AWESOME___",Gs=16,eu="fa",tu="svg-inline--fa",fn="data-fa-i2svg",Hs="data-fa-pseudo-element",ff="data-fa-pseudo-element-pending",Io="data-prefix",Co="data-icon",wa="fontawesome-i2svg",df="async",hf=["HTML","HEAD","STYLE","SCRIPT"],nu=(()=>{try{return process.env.NODE_ENV==="production"}catch{return!1}})(),ru=[ge,qe,Xe];function $r(t){return new Proxy(t,{get(e,n){return n in e?e[n]:e[ge]}})}const iu={...Kc};iu[ge]={...Kc[ge],...ya.kit,...ya["kit-duotone"]};const rn=$r(iu),$s={...rf};$s[ge]={...$s[ge],...va.kit,...va["kit-duotone"]};const jr=$r($s),Ws={...nf};Ws[ge]={...Ws[ge],...uf.kit};const sn=$r(Ws),qs={...ef};qs[ge]={...qs[ge],...cf.kit};const pf=$r(qs),mf=Z0,su="fa-layers-text",xf=Q0,gf={...X0};$r(gf);const yf=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],rs=Sr,Xn=new Set;Object.keys(jr[ge]).map(Xn.add.bind(Xn));Object.keys(jr[qe]).map(Xn.add.bind(Xn));Object.keys(jr[Xe]).map(Xn.add.bind(Xn));const vf=[...Y0,...af],Or=Ht.FontAwesomeConfig||{};function wf(t){var e=xe.querySelector("script["+t+"]");if(e)return e.getAttribute(t)}function bf(t){return t===""?!0:t==="false"?!1:t==="true"?!0:t}xe&&typeof xe.querySelector=="function"&&[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(e=>{let[n,r]=e;const i=bf(wf(n));i!=null&&(Or[r]=i)});const ou={styleDefault:"solid",familyDefault:"classic",cssPrefix:eu,replacementClass:tu,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Or.familyPrefix&&(Or.cssPrefix=Or.familyPrefix);const Yn={...ou,...Or};Yn.autoReplaceSvg||(Yn.observeMutations=!1);const j={};Object.keys(ou).forEach(t=>{Object.defineProperty(j,t,{enumerable:!0,set:function(e){Yn[t]=e,kr.forEach(n=>n(j))},get:function(){return Yn[t]}})});Object.defineProperty(j,"familyPrefix",{enumerable:!0,set:function(t){Yn.cssPrefix=t,kr.forEach(e=>e(j))},get:function(){return Yn.cssPrefix}});Ht.FontAwesomeConfig=j;const kr=[];function Ef(t){return kr.push(t),()=>{kr.splice(kr.indexOf(t),1)}}const Ot=Gs,yt={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Tf(t){if(!t||!At)return;const e=xe.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=t;const n=xe.head.childNodes;let r=null;for(let i=n.length-1;i>-1;i--){const s=n[i],o=(s.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(r=s)}return xe.head.insertBefore(e,r),t}const Rf="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Nr(){let t=12,e="";for(;t-- >0;)e+=Rf[Math.random()*62|0];return e}function lr(t){const e=[];for(let n=(t||[]).length>>>0;n--;)e[n]=t[n];return e}function Lo(t){return t.classList?lr(t.classList):(t.getAttribute("class")||"").split(" ").filter(e=>e)}function au(t){return"".concat(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Sf(t){return Object.keys(t||{}).reduce((e,n)=>e+"".concat(n,'="').concat(au(t[n]),'" '),"").trim()}function zi(t){return Object.keys(t||{}).reduce((e,n)=>e+"".concat(n,": ").concat(t[n].trim(),";"),"")}function jo(t){return t.size!==yt.size||t.x!==yt.x||t.y!==yt.y||t.rotate!==yt.rotate||t.flipX||t.flipY}function _f(t){let{transform:e,containerWidth:n,iconWidth:r}=t;const i={transform:"translate(".concat(n/2," 256)")},s="translate(".concat(e.x*32,", ").concat(e.y*32,") "),o="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),a="rotate(".concat(e.rotate," 0 0)"),l={transform:"".concat(s," ").concat(o," ").concat(a)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function Af(t){let{transform:e,width:n=Gs,height:r=Gs,startCentered:i=!1}=t,s="";return i&&Zc?s+="translate(".concat(e.x/Ot-n/2,"em, ").concat(e.y/Ot-r/2,"em) "):i?s+="translate(calc(-50% + ".concat(e.x/Ot,"em), calc(-50% + ").concat(e.y/Ot,"em)) "):s+="translate(".concat(e.x/Ot,"em, ").concat(e.y/Ot,"em) "),s+="scale(".concat(e.size/Ot*(e.flipX?-1:1),", ").concat(e.size/Ot*(e.flipY?-1:1),") "),s+="rotate(".concat(e.rotate,"deg) "),s}var Mf=`:root, :host {
|
|
2
|
-
--fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free";
|
|
3
|
-
--fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free";
|
|
4
|
-
--fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro";
|
|
5
|
-
--fa-font-thin: normal 100 1em/1 "Font Awesome 6 Pro";
|
|
6
|
-
--fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";
|
|
7
|
-
--fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";
|
|
8
|
-
--fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";
|
|
9
|
-
--fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";
|
|
10
|
-
--fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp";
|
|
11
|
-
--fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp";
|
|
12
|
-
--fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 6 Sharp Duotone";
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
|
16
|
-
overflow: visible;
|
|
17
|
-
box-sizing: content-box;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.svg-inline--fa {
|
|
21
|
-
display: var(--fa-display, inline-block);
|
|
22
|
-
height: 1em;
|
|
23
|
-
overflow: visible;
|
|
24
|
-
vertical-align: -0.125em;
|
|
25
|
-
}
|
|
26
|
-
.svg-inline--fa.fa-2xs {
|
|
27
|
-
vertical-align: 0.1em;
|
|
28
|
-
}
|
|
29
|
-
.svg-inline--fa.fa-xs {
|
|
30
|
-
vertical-align: 0em;
|
|
31
|
-
}
|
|
32
|
-
.svg-inline--fa.fa-sm {
|
|
33
|
-
vertical-align: -0.0714285705em;
|
|
34
|
-
}
|
|
35
|
-
.svg-inline--fa.fa-lg {
|
|
36
|
-
vertical-align: -0.2em;
|
|
37
|
-
}
|
|
38
|
-
.svg-inline--fa.fa-xl {
|
|
39
|
-
vertical-align: -0.25em;
|
|
40
|
-
}
|
|
41
|
-
.svg-inline--fa.fa-2xl {
|
|
42
|
-
vertical-align: -0.3125em;
|
|
43
|
-
}
|
|
44
|
-
.svg-inline--fa.fa-pull-left {
|
|
45
|
-
margin-right: var(--fa-pull-margin, 0.3em);
|
|
46
|
-
width: auto;
|
|
47
|
-
}
|
|
48
|
-
.svg-inline--fa.fa-pull-right {
|
|
49
|
-
margin-left: var(--fa-pull-margin, 0.3em);
|
|
50
|
-
width: auto;
|
|
51
|
-
}
|
|
52
|
-
.svg-inline--fa.fa-li {
|
|
53
|
-
width: var(--fa-li-width, 2em);
|
|
54
|
-
top: 0.25em;
|
|
55
|
-
}
|
|
56
|
-
.svg-inline--fa.fa-fw {
|
|
57
|
-
width: var(--fa-fw-width, 1.25em);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.fa-layers svg.svg-inline--fa {
|
|
61
|
-
bottom: 0;
|
|
62
|
-
left: 0;
|
|
63
|
-
margin: auto;
|
|
64
|
-
position: absolute;
|
|
65
|
-
right: 0;
|
|
66
|
-
top: 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.fa-layers-counter, .fa-layers-text {
|
|
70
|
-
display: inline-block;
|
|
71
|
-
position: absolute;
|
|
72
|
-
text-align: center;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.fa-layers {
|
|
76
|
-
display: inline-block;
|
|
77
|
-
height: 1em;
|
|
78
|
-
position: relative;
|
|
79
|
-
text-align: center;
|
|
80
|
-
vertical-align: -0.125em;
|
|
81
|
-
width: 1em;
|
|
82
|
-
}
|
|
83
|
-
.fa-layers svg.svg-inline--fa {
|
|
84
|
-
transform-origin: center center;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.fa-layers-text {
|
|
88
|
-
left: 50%;
|
|
89
|
-
top: 50%;
|
|
90
|
-
transform: translate(-50%, -50%);
|
|
91
|
-
transform-origin: center center;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.fa-layers-counter {
|
|
95
|
-
background-color: var(--fa-counter-background-color, #ff253a);
|
|
96
|
-
border-radius: var(--fa-counter-border-radius, 1em);
|
|
97
|
-
box-sizing: border-box;
|
|
98
|
-
color: var(--fa-inverse, #fff);
|
|
99
|
-
line-height: var(--fa-counter-line-height, 1);
|
|
100
|
-
max-width: var(--fa-counter-max-width, 5em);
|
|
101
|
-
min-width: var(--fa-counter-min-width, 1.5em);
|
|
102
|
-
overflow: hidden;
|
|
103
|
-
padding: var(--fa-counter-padding, 0.25em 0.5em);
|
|
104
|
-
right: var(--fa-right, 0);
|
|
105
|
-
text-overflow: ellipsis;
|
|
106
|
-
top: var(--fa-top, 0);
|
|
107
|
-
transform: scale(var(--fa-counter-scale, 0.25));
|
|
108
|
-
transform-origin: top right;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.fa-layers-bottom-right {
|
|
112
|
-
bottom: var(--fa-bottom, 0);
|
|
113
|
-
right: var(--fa-right, 0);
|
|
114
|
-
top: auto;
|
|
115
|
-
transform: scale(var(--fa-layers-scale, 0.25));
|
|
116
|
-
transform-origin: bottom right;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.fa-layers-bottom-left {
|
|
120
|
-
bottom: var(--fa-bottom, 0);
|
|
121
|
-
left: var(--fa-left, 0);
|
|
122
|
-
right: auto;
|
|
123
|
-
top: auto;
|
|
124
|
-
transform: scale(var(--fa-layers-scale, 0.25));
|
|
125
|
-
transform-origin: bottom left;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.fa-layers-top-right {
|
|
129
|
-
top: var(--fa-top, 0);
|
|
130
|
-
right: var(--fa-right, 0);
|
|
131
|
-
transform: scale(var(--fa-layers-scale, 0.25));
|
|
132
|
-
transform-origin: top right;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.fa-layers-top-left {
|
|
136
|
-
left: var(--fa-left, 0);
|
|
137
|
-
right: auto;
|
|
138
|
-
top: var(--fa-top, 0);
|
|
139
|
-
transform: scale(var(--fa-layers-scale, 0.25));
|
|
140
|
-
transform-origin: top left;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.fa-1x {
|
|
144
|
-
font-size: 1em;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.fa-2x {
|
|
148
|
-
font-size: 2em;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.fa-3x {
|
|
152
|
-
font-size: 3em;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.fa-4x {
|
|
156
|
-
font-size: 4em;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.fa-5x {
|
|
160
|
-
font-size: 5em;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.fa-6x {
|
|
164
|
-
font-size: 6em;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.fa-7x {
|
|
168
|
-
font-size: 7em;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.fa-8x {
|
|
172
|
-
font-size: 8em;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.fa-9x {
|
|
176
|
-
font-size: 9em;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.fa-10x {
|
|
180
|
-
font-size: 10em;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.fa-2xs {
|
|
184
|
-
font-size: 0.625em;
|
|
185
|
-
line-height: 0.1em;
|
|
186
|
-
vertical-align: 0.225em;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.fa-xs {
|
|
190
|
-
font-size: 0.75em;
|
|
191
|
-
line-height: 0.0833333337em;
|
|
192
|
-
vertical-align: 0.125em;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.fa-sm {
|
|
196
|
-
font-size: 0.875em;
|
|
197
|
-
line-height: 0.0714285718em;
|
|
198
|
-
vertical-align: 0.0535714295em;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.fa-lg {
|
|
202
|
-
font-size: 1.25em;
|
|
203
|
-
line-height: 0.05em;
|
|
204
|
-
vertical-align: -0.075em;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.fa-xl {
|
|
208
|
-
font-size: 1.5em;
|
|
209
|
-
line-height: 0.0416666682em;
|
|
210
|
-
vertical-align: -0.125em;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.fa-2xl {
|
|
214
|
-
font-size: 2em;
|
|
215
|
-
line-height: 0.03125em;
|
|
216
|
-
vertical-align: -0.1875em;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.fa-fw {
|
|
220
|
-
text-align: center;
|
|
221
|
-
width: 1.25em;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.fa-ul {
|
|
225
|
-
list-style-type: none;
|
|
226
|
-
margin-left: var(--fa-li-margin, 2.5em);
|
|
227
|
-
padding-left: 0;
|
|
228
|
-
}
|
|
229
|
-
.fa-ul > li {
|
|
230
|
-
position: relative;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.fa-li {
|
|
234
|
-
left: calc(-1 * var(--fa-li-width, 2em));
|
|
235
|
-
position: absolute;
|
|
236
|
-
text-align: center;
|
|
237
|
-
width: var(--fa-li-width, 2em);
|
|
238
|
-
line-height: inherit;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.fa-border {
|
|
242
|
-
border-color: var(--fa-border-color, #eee);
|
|
243
|
-
border-radius: var(--fa-border-radius, 0.1em);
|
|
244
|
-
border-style: var(--fa-border-style, solid);
|
|
245
|
-
border-width: var(--fa-border-width, 0.08em);
|
|
246
|
-
padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.fa-pull-left {
|
|
250
|
-
float: left;
|
|
251
|
-
margin-right: var(--fa-pull-margin, 0.3em);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.fa-pull-right {
|
|
255
|
-
float: right;
|
|
256
|
-
margin-left: var(--fa-pull-margin, 0.3em);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
.fa-beat {
|
|
260
|
-
animation-name: fa-beat;
|
|
261
|
-
animation-delay: var(--fa-animation-delay, 0s);
|
|
262
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
263
|
-
animation-duration: var(--fa-animation-duration, 1s);
|
|
264
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
265
|
-
animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.fa-bounce {
|
|
269
|
-
animation-name: fa-bounce;
|
|
270
|
-
animation-delay: var(--fa-animation-delay, 0s);
|
|
271
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
272
|
-
animation-duration: var(--fa-animation-duration, 1s);
|
|
273
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
274
|
-
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.fa-fade {
|
|
278
|
-
animation-name: fa-fade;
|
|
279
|
-
animation-delay: var(--fa-animation-delay, 0s);
|
|
280
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
281
|
-
animation-duration: var(--fa-animation-duration, 1s);
|
|
282
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
283
|
-
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.fa-beat-fade {
|
|
287
|
-
animation-name: fa-beat-fade;
|
|
288
|
-
animation-delay: var(--fa-animation-delay, 0s);
|
|
289
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
290
|
-
animation-duration: var(--fa-animation-duration, 1s);
|
|
291
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
292
|
-
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
.fa-flip {
|
|
296
|
-
animation-name: fa-flip;
|
|
297
|
-
animation-delay: var(--fa-animation-delay, 0s);
|
|
298
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
299
|
-
animation-duration: var(--fa-animation-duration, 1s);
|
|
300
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
301
|
-
animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
.fa-shake {
|
|
305
|
-
animation-name: fa-shake;
|
|
306
|
-
animation-delay: var(--fa-animation-delay, 0s);
|
|
307
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
308
|
-
animation-duration: var(--fa-animation-duration, 1s);
|
|
309
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
310
|
-
animation-timing-function: var(--fa-animation-timing, linear);
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.fa-spin {
|
|
314
|
-
animation-name: fa-spin;
|
|
315
|
-
animation-delay: var(--fa-animation-delay, 0s);
|
|
316
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
317
|
-
animation-duration: var(--fa-animation-duration, 2s);
|
|
318
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
319
|
-
animation-timing-function: var(--fa-animation-timing, linear);
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.fa-spin-reverse {
|
|
323
|
-
--fa-animation-direction: reverse;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.fa-pulse,
|
|
327
|
-
.fa-spin-pulse {
|
|
328
|
-
animation-name: fa-spin;
|
|
329
|
-
animation-direction: var(--fa-animation-direction, normal);
|
|
330
|
-
animation-duration: var(--fa-animation-duration, 1s);
|
|
331
|
-
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
|
332
|
-
animation-timing-function: var(--fa-animation-timing, steps(8));
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
@media (prefers-reduced-motion: reduce) {
|
|
336
|
-
.fa-beat,
|
|
337
|
-
.fa-bounce,
|
|
338
|
-
.fa-fade,
|
|
339
|
-
.fa-beat-fade,
|
|
340
|
-
.fa-flip,
|
|
341
|
-
.fa-pulse,
|
|
342
|
-
.fa-shake,
|
|
343
|
-
.fa-spin,
|
|
344
|
-
.fa-spin-pulse {
|
|
345
|
-
animation-delay: -1ms;
|
|
346
|
-
animation-duration: 1ms;
|
|
347
|
-
animation-iteration-count: 1;
|
|
348
|
-
transition-delay: 0s;
|
|
349
|
-
transition-duration: 0s;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
@keyframes fa-beat {
|
|
353
|
-
0%, 90% {
|
|
354
|
-
transform: scale(1);
|
|
355
|
-
}
|
|
356
|
-
45% {
|
|
357
|
-
transform: scale(var(--fa-beat-scale, 1.25));
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
@keyframes fa-bounce {
|
|
361
|
-
0% {
|
|
362
|
-
transform: scale(1, 1) translateY(0);
|
|
363
|
-
}
|
|
364
|
-
10% {
|
|
365
|
-
transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
|
|
366
|
-
}
|
|
367
|
-
30% {
|
|
368
|
-
transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
|
|
369
|
-
}
|
|
370
|
-
50% {
|
|
371
|
-
transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
|
|
372
|
-
}
|
|
373
|
-
57% {
|
|
374
|
-
transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
|
|
375
|
-
}
|
|
376
|
-
64% {
|
|
377
|
-
transform: scale(1, 1) translateY(0);
|
|
378
|
-
}
|
|
379
|
-
100% {
|
|
380
|
-
transform: scale(1, 1) translateY(0);
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
@keyframes fa-fade {
|
|
384
|
-
50% {
|
|
385
|
-
opacity: var(--fa-fade-opacity, 0.4);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
@keyframes fa-beat-fade {
|
|
389
|
-
0%, 100% {
|
|
390
|
-
opacity: var(--fa-beat-fade-opacity, 0.4);
|
|
391
|
-
transform: scale(1);
|
|
392
|
-
}
|
|
393
|
-
50% {
|
|
394
|
-
opacity: 1;
|
|
395
|
-
transform: scale(var(--fa-beat-fade-scale, 1.125));
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
@keyframes fa-flip {
|
|
399
|
-
50% {
|
|
400
|
-
transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
@keyframes fa-shake {
|
|
404
|
-
0% {
|
|
405
|
-
transform: rotate(-15deg);
|
|
406
|
-
}
|
|
407
|
-
4% {
|
|
408
|
-
transform: rotate(15deg);
|
|
409
|
-
}
|
|
410
|
-
8%, 24% {
|
|
411
|
-
transform: rotate(-18deg);
|
|
412
|
-
}
|
|
413
|
-
12%, 28% {
|
|
414
|
-
transform: rotate(18deg);
|
|
415
|
-
}
|
|
416
|
-
16% {
|
|
417
|
-
transform: rotate(-22deg);
|
|
418
|
-
}
|
|
419
|
-
20% {
|
|
420
|
-
transform: rotate(22deg);
|
|
421
|
-
}
|
|
422
|
-
32% {
|
|
423
|
-
transform: rotate(-12deg);
|
|
424
|
-
}
|
|
425
|
-
36% {
|
|
426
|
-
transform: rotate(12deg);
|
|
427
|
-
}
|
|
428
|
-
40%, 100% {
|
|
429
|
-
transform: rotate(0deg);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
@keyframes fa-spin {
|
|
433
|
-
0% {
|
|
434
|
-
transform: rotate(0deg);
|
|
435
|
-
}
|
|
436
|
-
100% {
|
|
437
|
-
transform: rotate(360deg);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
.fa-rotate-90 {
|
|
441
|
-
transform: rotate(90deg);
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
.fa-rotate-180 {
|
|
445
|
-
transform: rotate(180deg);
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
.fa-rotate-270 {
|
|
449
|
-
transform: rotate(270deg);
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
.fa-flip-horizontal {
|
|
453
|
-
transform: scale(-1, 1);
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
.fa-flip-vertical {
|
|
457
|
-
transform: scale(1, -1);
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
.fa-flip-both,
|
|
461
|
-
.fa-flip-horizontal.fa-flip-vertical {
|
|
462
|
-
transform: scale(-1, -1);
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
.fa-rotate-by {
|
|
466
|
-
transform: rotate(var(--fa-rotate-angle, 0));
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
.fa-stack {
|
|
470
|
-
display: inline-block;
|
|
471
|
-
vertical-align: middle;
|
|
472
|
-
height: 2em;
|
|
473
|
-
position: relative;
|
|
474
|
-
width: 2.5em;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
.fa-stack-1x,
|
|
478
|
-
.fa-stack-2x {
|
|
479
|
-
bottom: 0;
|
|
480
|
-
left: 0;
|
|
481
|
-
margin: auto;
|
|
482
|
-
position: absolute;
|
|
483
|
-
right: 0;
|
|
484
|
-
top: 0;
|
|
485
|
-
z-index: var(--fa-stack-z-index, auto);
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
.svg-inline--fa.fa-stack-1x {
|
|
489
|
-
height: 1em;
|
|
490
|
-
width: 1.25em;
|
|
491
|
-
}
|
|
492
|
-
.svg-inline--fa.fa-stack-2x {
|
|
493
|
-
height: 2em;
|
|
494
|
-
width: 2.5em;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
.fa-inverse {
|
|
498
|
-
color: var(--fa-inverse, #fff);
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
.sr-only,
|
|
502
|
-
.fa-sr-only {
|
|
503
|
-
position: absolute;
|
|
504
|
-
width: 1px;
|
|
505
|
-
height: 1px;
|
|
506
|
-
padding: 0;
|
|
507
|
-
margin: -1px;
|
|
508
|
-
overflow: hidden;
|
|
509
|
-
clip: rect(0, 0, 0, 0);
|
|
510
|
-
white-space: nowrap;
|
|
511
|
-
border-width: 0;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
.sr-only-focusable:not(:focus),
|
|
515
|
-
.fa-sr-only-focusable:not(:focus) {
|
|
516
|
-
position: absolute;
|
|
517
|
-
width: 1px;
|
|
518
|
-
height: 1px;
|
|
519
|
-
padding: 0;
|
|
520
|
-
margin: -1px;
|
|
521
|
-
overflow: hidden;
|
|
522
|
-
clip: rect(0, 0, 0, 0);
|
|
523
|
-
white-space: nowrap;
|
|
524
|
-
border-width: 0;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
.svg-inline--fa .fa-primary {
|
|
528
|
-
fill: var(--fa-primary-color, currentColor);
|
|
529
|
-
opacity: var(--fa-primary-opacity, 1);
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
.svg-inline--fa .fa-secondary {
|
|
533
|
-
fill: var(--fa-secondary-color, currentColor);
|
|
534
|
-
opacity: var(--fa-secondary-opacity, 0.4);
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
.svg-inline--fa.fa-swap-opacity .fa-primary {
|
|
538
|
-
opacity: var(--fa-secondary-opacity, 0.4);
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
.svg-inline--fa.fa-swap-opacity .fa-secondary {
|
|
542
|
-
opacity: var(--fa-primary-opacity, 1);
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
.svg-inline--fa mask .fa-primary,
|
|
546
|
-
.svg-inline--fa mask .fa-secondary {
|
|
547
|
-
fill: black;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
.fad.fa-inverse,
|
|
551
|
-
.fa-duotone.fa-inverse {
|
|
552
|
-
color: var(--fa-inverse, #fff);
|
|
553
|
-
}`;function lu(){const t=eu,e=tu,n=j.cssPrefix,r=j.replacementClass;let i=Mf;if(n!==t||r!==e){const s=new RegExp("\\.".concat(t,"\\-"),"g"),o=new RegExp("\\--".concat(t,"\\-"),"g"),a=new RegExp("\\.".concat(e),"g");i=i.replace(s,".".concat(n,"-")).replace(o,"--".concat(n,"-")).replace(a,".".concat(r))}return i}let ba=!1;function is(){j.autoAddCss&&!ba&&(Tf(lu()),ba=!0)}var Pf={mixout(){return{dom:{css:lu,insertCss:is}}},hooks(){return{beforeDOMElementCreation(){is()},beforeI2svg(){is()}}}};const _t=Ht||{};_t[St]||(_t[St]={});_t[St].styles||(_t[St].styles={});_t[St].hooks||(_t[St].hooks={});_t[St].shims||(_t[St].shims=[]);var vt=_t[St];const cu=[],uu=function(){xe.removeEventListener("DOMContentLoaded",uu),Si=1,cu.map(t=>t())};let Si=!1;At&&(Si=(xe.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(xe.readyState),Si||xe.addEventListener("DOMContentLoaded",uu));function Of(t){At&&(Si?setTimeout(t,0):cu.push(t))}function Wr(t){const{tag:e,attributes:n={},children:r=[]}=t;return typeof t=="string"?au(t):"<".concat(e," ").concat(Sf(n),">").concat(r.map(Wr).join(""),"</").concat(e,">")}function Ea(t,e,n){if(t&&t[e]&&t[e][n])return{prefix:e,iconName:n,icon:t[e][n]}}var ss=function(e,n,r,i){var s=Object.keys(e),o=s.length,a=n,l,c,f;for(r===void 0?(l=1,f=e[s[0]]):(l=0,f=r);l<o;l++)c=s[l],f=a(f,e[c],c,e);return f};function kf(t){const e=[];let n=0;const r=t.length;for(;n<r;){const i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){const s=t.charCodeAt(n++);(s&64512)==56320?e.push(((i&1023)<<10)+(s&1023)+65536):(e.push(i),n--)}else e.push(i)}return e}function Xs(t){const e=kf(t);return e.length===1?e[0].toString(16):null}function If(t,e){const n=t.length;let r=t.charCodeAt(e),i;return r>=55296&&r<=56319&&n>e+1&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function Ta(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return!!r.icon?e[r.iconName]=r.icon:e[n]=r,e},{})}function Ys(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{skipHooks:r=!1}=n,i=Ta(e);typeof vt.hooks.addPack=="function"&&!r?vt.hooks.addPack(t,Ta(e)):vt.styles[t]={...vt.styles[t]||{},...i},t==="fas"&&Ys("fa",e)}const{styles:en,shims:Cf}=vt,Lf={[ge]:Object.values(sn[ge]),[qe]:Object.values(sn[qe]),[Xe]:Object.values(sn[Xe])};let No=null,fu={},du={},hu={},pu={},mu={};const jf={[ge]:Object.keys(rn[ge]),[qe]:Object.keys(rn[qe]),[Xe]:Object.keys(rn[Xe])};function Nf(t){return~vf.indexOf(t)}function Ff(t,e){const n=e.split("-"),r=n[0],i=n.slice(1).join("-");return r===t&&i!==""&&!Nf(i)?i:null}const xu=()=>{const t=r=>ss(en,(i,s,o)=>(i[o]=ss(s,r,{}),i),{});fu=t((r,i,s)=>(i[3]&&(r[i[3]]=s),i[2]&&i[2].filter(a=>typeof a=="number").forEach(a=>{r[a.toString(16)]=s}),r)),du=t((r,i,s)=>(r[s]=s,i[2]&&i[2].filter(a=>typeof a=="string").forEach(a=>{r[a]=s}),r)),mu=t((r,i,s)=>{const o=i[2];return r[s]=s,o.forEach(a=>{r[a]=s}),r});const e="far"in en||j.autoFetchSvg,n=ss(Cf,(r,i)=>{const s=i[0];let o=i[1];const a=i[2];return o==="far"&&!e&&(o="fas"),typeof s=="string"&&(r.names[s]={prefix:o,iconName:a}),typeof s=="number"&&(r.unicodes[s.toString(16)]={prefix:o,iconName:a}),r},{names:{},unicodes:{}});hu=n.names,pu=n.unicodes,No=Di(j.styleDefault,{family:j.familyDefault})};Ef(t=>{No=Di(t.styleDefault,{family:j.familyDefault})});xu();function Fo(t,e){return(fu[t]||{})[e]}function zf(t,e){return(du[t]||{})[e]}function Vt(t,e){return(mu[t]||{})[e]}function gu(t){return hu[t]||{prefix:null,iconName:null}}function Df(t){const e=pu[t],n=Fo("fas",t);return e||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function $t(){return No}const zo=()=>({prefix:null,iconName:null,rest:[]});function Di(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{family:n=ge}=e,r=rn[n][t],i=jr[n][t]||jr[n][r],s=t in vt.styles?t:null;return i||s||null}const Bf={[ge]:Object.keys(sn[ge]),[qe]:Object.keys(sn[qe]),[Xe]:Object.keys(sn[Xe])};function Bi(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{skipLookups:n=!1}=e,r={[ge]:"".concat(j.cssPrefix,"-").concat(ge),[qe]:"".concat(j.cssPrefix,"-").concat(qe),[Xe]:"".concat(j.cssPrefix,"-").concat(Xe)};let i=null,s=ge;const o=q0.filter(l=>l!==Qc);o.forEach(l=>{(t.includes(r[l])||t.some(c=>Bf[l].includes(c)))&&(s=l)});const a=t.reduce((l,c)=>{const f=Ff(j.cssPrefix,c);if(en[c]?(c=Lf[s].includes(c)?pf[s][c]:c,i=c,l.prefix=c):jf[s].indexOf(c)>-1?(i=c,l.prefix=Di(c,{family:s})):f?l.iconName=f:c!==j.replacementClass&&!o.some(d=>c===r[d])&&l.rest.push(c),!n&&l.prefix&&l.iconName){const d=i==="fa"?gu(l.iconName):{},p=Vt(l.prefix,l.iconName);d.prefix&&(i=null),l.iconName=d.iconName||p||l.iconName,l.prefix=d.prefix||l.prefix,l.prefix==="far"&&!en.far&&en.fas&&!j.autoFetchSvg&&(l.prefix="fas")}return l},zo());return(t.includes("fa-brands")||t.includes("fab"))&&(a.prefix="fab"),(t.includes("fa-duotone")||t.includes("fad"))&&(a.prefix="fad"),!a.prefix&&s===qe&&(en.fass||j.autoFetchSvg)&&(a.prefix="fass",a.iconName=Vt(a.prefix,a.iconName)||a.iconName),!a.prefix&&s===Xe&&(en.fasds||j.autoFetchSvg)&&(a.prefix="fasds",a.iconName=Vt(a.prefix,a.iconName)||a.iconName),(a.prefix==="fa"||i==="fa")&&(a.prefix=$t()||"fas"),a}class Vf{constructor(){this.definitions={}}add(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const i=n.reduce(this._pullDefinitions,{});Object.keys(i).forEach(s=>{this.definitions[s]={...this.definitions[s]||{},...i[s]},Ys(s,i[s]);const o=sn[ge][s];o&&Ys(o,i[s]),xu()})}reset(){this.definitions={}}_pullDefinitions(e,n){const r=n.prefix&&n.iconName&&n.icon?{0:n}:n;return Object.keys(r).map(i=>{const{prefix:s,iconName:o,icon:a}=r[i],l=a[2];e[s]||(e[s]={}),l.length>0&&l.forEach(c=>{typeof c=="string"&&(e[s][c]=a)}),e[s][o]=a}),e}}let Ra=[],Gn={};const $n={},Uf=Object.keys($n);function Gf(t,e){let{mixoutsTo:n}=e;return Ra=t,Gn={},Object.keys($n).forEach(r=>{Uf.indexOf(r)===-1&&delete $n[r]}),Ra.forEach(r=>{const i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(s=>{typeof i[s]=="function"&&(n[s]=i[s]),typeof i[s]=="object"&&Object.keys(i[s]).forEach(o=>{n[s]||(n[s]={}),n[s][o]=i[s][o]})}),r.hooks){const s=r.hooks();Object.keys(s).forEach(o=>{Gn[o]||(Gn[o]=[]),Gn[o].push(s[o])})}r.provides&&r.provides($n)}),n}function Zs(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return(Gn[t]||[]).forEach(o=>{e=o.apply(null,[e,...r])}),e}function dn(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];(Gn[t]||[]).forEach(s=>{s.apply(null,n)})}function Wt(){const t=arguments[0],e=Array.prototype.slice.call(arguments,1);return $n[t]?$n[t].apply(null,e):void 0}function Qs(t){t.prefix==="fa"&&(t.prefix="fas");let{iconName:e}=t;const n=t.prefix||$t();if(e)return e=Vt(n,e)||e,Ea(yu.definitions,n,e)||Ea(vt.styles,n,e)}const yu=new Vf,Hf=()=>{j.autoReplaceSvg=!1,j.observeMutations=!1,dn("noAuto")},$f={i2svg:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return At?(dn("beforeI2svg",t),Wt("pseudoElements2svg",t),Wt("i2svg",t)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:e}=t;j.autoReplaceSvg===!1&&(j.autoReplaceSvg=!0),j.observeMutations=!0,Of(()=>{qf({autoReplaceSvgRoot:e}),dn("watch",t)})}},Wf={icon:t=>{if(t===null)return null;if(typeof t=="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Vt(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){const e=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],n=Di(t[0]);return{prefix:n,iconName:Vt(n,e)||e}}if(typeof t=="string"&&(t.indexOf("".concat(j.cssPrefix,"-"))>-1||t.match(mf))){const e=Bi(t.split(" "),{skipLookups:!0});return{prefix:e.prefix||$t(),iconName:Vt(e.prefix,e.iconName)||e.iconName}}if(typeof t=="string"){const e=$t();return{prefix:e,iconName:Vt(e,t)||t}}}},Ye={noAuto:Hf,config:j,dom:$f,parse:Wf,library:yu,findIconDefinition:Qs,toHtml:Wr},qf=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:e=xe}=t;(Object.keys(vt.styles).length>0||j.autoFetchSvg)&&At&&j.autoReplaceSvg&&Ye.dom.i2svg({node:e})};function Vi(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map(n=>Wr(n))}}),Object.defineProperty(t,"node",{get:function(){if(!At)return;const n=xe.createElement("div");return n.innerHTML=t.html,n.children}}),t}function Xf(t){let{children:e,main:n,mask:r,attributes:i,styles:s,transform:o}=t;if(jo(o)&&n.found&&!r.found){const{width:a,height:l}=n,c={x:a/l/2,y:.5};i.style=zi({...s,"transform-origin":"".concat(c.x+o.x/16,"em ").concat(c.y+o.y/16,"em")})}return[{tag:"svg",attributes:i,children:e}]}function Yf(t){let{prefix:e,iconName:n,children:r,attributes:i,symbol:s}=t;const o=s===!0?"".concat(e,"-").concat(j.cssPrefix,"-").concat(n):s;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:{...i,id:o},children:r}]}]}function Do(t){const{icons:{main:e,mask:n},prefix:r,iconName:i,transform:s,symbol:o,title:a,maskId:l,titleId:c,extra:f,watchable:d=!1}=t,{width:p,height:m}=n.found?n:e,g=r==="fak",w=[j.replacementClass,i?"".concat(j.cssPrefix,"-").concat(i):""].filter(v=>f.classes.indexOf(v)===-1).filter(v=>v!==""||!!v).concat(f.classes).join(" ");let y={children:[],attributes:{...f.attributes,"data-prefix":r,"data-icon":i,class:w,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(p," ").concat(m)}};const b=g&&!~f.classes.indexOf("fa-fw")?{width:"".concat(p/m*16*.0625,"em")}:{};d&&(y.attributes[fn]=""),a&&(y.children.push({tag:"title",attributes:{id:y.attributes["aria-labelledby"]||"title-".concat(c||Nr())},children:[a]}),delete y.attributes.title);const _={...y,prefix:r,iconName:i,main:e,mask:n,maskId:l,transform:s,symbol:o,styles:{...b,...f.styles}},{children:E,attributes:T}=n.found&&e.found?Wt("generateAbstractMask",_)||{children:[],attributes:{}}:Wt("generateAbstractIcon",_)||{children:[],attributes:{}};return _.children=E,_.attributes=T,o?Yf(_):Xf(_)}function Sa(t){const{content:e,width:n,height:r,transform:i,title:s,extra:o,watchable:a=!1}=t,l={...o.attributes,...s?{title:s}:{},class:o.classes.join(" ")};a&&(l[fn]="");const c={...o.styles};jo(i)&&(c.transform=Af({transform:i,startCentered:!0,width:n,height:r}),c["-webkit-transform"]=c.transform);const f=zi(c);f.length>0&&(l.style=f);const d=[];return d.push({tag:"span",attributes:l,children:[e]}),s&&d.push({tag:"span",attributes:{class:"sr-only"},children:[s]}),d}function Zf(t){const{content:e,title:n,extra:r}=t,i={...r.attributes,...n?{title:n}:{},class:r.classes.join(" ")},s=zi(r.styles);s.length>0&&(i.style=s);const o=[];return o.push({tag:"span",attributes:i,children:[e]}),n&&o.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),o}const{styles:os}=vt;function Ks(t){const e=t[0],n=t[1],[r]=t.slice(4);let i=null;return Array.isArray(r)?i={tag:"g",attributes:{class:"".concat(j.cssPrefix,"-").concat(rs.GROUP)},children:[{tag:"path",attributes:{class:"".concat(j.cssPrefix,"-").concat(rs.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(j.cssPrefix,"-").concat(rs.PRIMARY),fill:"currentColor",d:r[1]}}]}:i={tag:"path",attributes:{fill:"currentColor",d:r}},{found:!0,width:e,height:n,icon:i}}const Qf={found:!1,width:512,height:512};function Kf(t,e){!nu&&!j.showMissingIcons&&t&&console.error('Icon with name "'.concat(t,'" and prefix "').concat(e,'" is missing.'))}function Js(t,e){let n=e;return e==="fa"&&j.styleDefault!==null&&(e=$t()),new Promise((r,i)=>{if(n==="fa"){const s=gu(t)||{};t=s.iconName||t,e=s.prefix||e}if(t&&e&&os[e]&&os[e][t]){const s=os[e][t];return r(Ks(s))}Kf(t,e),r({...Qf,icon:j.showMissingIcons&&t?Wt("missingIconAbstract")||{}:{}})})}const _a=()=>{},eo=j.measurePerformance&&Qr&&Qr.mark&&Qr.measure?Qr:{mark:_a,measure:_a},_r='FA "6.6.0"',Jf=t=>(eo.mark("".concat(_r," ").concat(t," begins")),()=>vu(t)),vu=t=>{eo.mark("".concat(_r," ").concat(t," ends")),eo.measure("".concat(_r," ").concat(t),"".concat(_r," ").concat(t," begins"),"".concat(_r," ").concat(t," ends"))};var Bo={begin:Jf,end:vu};const hi=()=>{};function Aa(t){return typeof(t.getAttribute?t.getAttribute(fn):null)=="string"}function ed(t){const e=t.getAttribute?t.getAttribute(Io):null,n=t.getAttribute?t.getAttribute(Co):null;return e&&n}function td(t){return t&&t.classList&&t.classList.contains&&t.classList.contains(j.replacementClass)}function nd(){return j.autoReplaceSvg===!0?pi.replace:pi[j.autoReplaceSvg]||pi.replace}function rd(t){return xe.createElementNS("http://www.w3.org/2000/svg",t)}function id(t){return xe.createElement(t)}function wu(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{ceFn:n=t.tag==="svg"?rd:id}=e;if(typeof t=="string")return xe.createTextNode(t);const r=n(t.tag);return Object.keys(t.attributes||[]).forEach(function(s){r.setAttribute(s,t.attributes[s])}),(t.children||[]).forEach(function(s){r.appendChild(wu(s,{ceFn:n}))}),r}function sd(t){let e=" ".concat(t.outerHTML," ");return e="".concat(e,"Font Awesome fontawesome.com "),e}const pi={replace:function(t){const e=t[0];if(e.parentNode)if(t[1].forEach(n=>{e.parentNode.insertBefore(wu(n),e)}),e.getAttribute(fn)===null&&j.keepOriginalSource){let n=xe.createComment(sd(e));e.parentNode.replaceChild(n,e)}else e.remove()},nest:function(t){const e=t[0],n=t[1];if(~Lo(e).indexOf(j.replacementClass))return pi.replace(t);const r=new RegExp("".concat(j.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){const s=n[0].attributes.class.split(" ").reduce((o,a)=>(a===j.replacementClass||a.match(r)?o.toSvg.push(a):o.toNode.push(a),o),{toNode:[],toSvg:[]});n[0].attributes.class=s.toSvg.join(" "),s.toNode.length===0?e.removeAttribute("class"):e.setAttribute("class",s.toNode.join(" "))}const i=n.map(s=>Wr(s)).join(`
|
|
554
|
-
`);e.setAttribute(fn,""),e.innerHTML=i}};function Ma(t){t()}function bu(t,e){const n=typeof e=="function"?e:hi;if(t.length===0)n();else{let r=Ma;j.mutateApproach===df&&(r=Ht.requestAnimationFrame||Ma),r(()=>{const i=nd(),s=Bo.begin("mutate");t.map(i),s(),n()})}}let Vo=!1;function Eu(){Vo=!0}function to(){Vo=!1}let _i=null;function Pa(t){if(!ga||!j.observeMutations)return;const{treeCallback:e=hi,nodeCallback:n=hi,pseudoElementsCallback:r=hi,observeMutationsRoot:i=xe}=t;_i=new ga(s=>{if(Vo)return;const o=$t();lr(s).forEach(a=>{if(a.type==="childList"&&a.addedNodes.length>0&&!Aa(a.addedNodes[0])&&(j.searchPseudoElements&&r(a.target),e(a.target)),a.type==="attributes"&&a.target.parentNode&&j.searchPseudoElements&&r(a.target.parentNode),a.type==="attributes"&&Aa(a.target)&&~yf.indexOf(a.attributeName))if(a.attributeName==="class"&&ed(a.target)){const{prefix:l,iconName:c}=Bi(Lo(a.target));a.target.setAttribute(Io,l||o),c&&a.target.setAttribute(Co,c)}else td(a.target)&&n(a.target)})}),At&&_i.observe(i,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function od(){_i&&_i.disconnect()}function ad(t){const e=t.getAttribute("style");let n=[];return e&&(n=e.split(";").reduce((r,i)=>{const s=i.split(":"),o=s[0],a=s.slice(1);return o&&a.length>0&&(r[o]=a.join(":").trim()),r},{})),n}function ld(t){const e=t.getAttribute("data-prefix"),n=t.getAttribute("data-icon"),r=t.innerText!==void 0?t.innerText.trim():"";let i=Bi(Lo(t));return i.prefix||(i.prefix=$t()),e&&n&&(i.prefix=e,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=zf(i.prefix,t.innerText)||Fo(i.prefix,Xs(t.innerText))),!i.iconName&&j.autoFetchSvg&&t.firstChild&&t.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=t.firstChild.data)),i}function cd(t){const e=lr(t.attributes).reduce((i,s)=>(i.name!=="class"&&i.name!=="style"&&(i[s.name]=s.value),i),{}),n=t.getAttribute("title"),r=t.getAttribute("data-fa-title-id");return j.autoA11y&&(n?e["aria-labelledby"]="".concat(j.replacementClass,"-title-").concat(r||Nr()):(e["aria-hidden"]="true",e.focusable="false")),e}function ud(){return{iconName:null,title:null,titleId:null,prefix:null,transform:yt,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function Oa(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0};const{iconName:n,prefix:r,rest:i}=ld(t),s=cd(t),o=Zs("parseNodeAttributes",{},t);let a=e.styleParser?ad(t):[];return{iconName:n,title:t.getAttribute("title"),titleId:t.getAttribute("data-fa-title-id"),prefix:r,transform:yt,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:i,styles:a,attributes:s},...o}}const{styles:fd}=vt;function Tu(t){const e=j.autoReplaceSvg==="nest"?Oa(t,{styleParser:!1}):Oa(t);return~e.extra.classes.indexOf(su)?Wt("generateLayersText",t,e):Wt("generateSvgReplacementMutation",t,e)}let wt=new Set;ru.map(t=>{wt.add("fa-".concat(t))});Object.keys(rn[ge]).map(wt.add.bind(wt));Object.keys(rn[qe]).map(wt.add.bind(wt));Object.keys(rn[Xe]).map(wt.add.bind(wt));wt=[...wt];function ka(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!At)return Promise.resolve();const n=xe.documentElement.classList,r=f=>n.add("".concat(wa,"-").concat(f)),i=f=>n.remove("".concat(wa,"-").concat(f)),s=j.autoFetchSvg?wt:ru.map(f=>"fa-".concat(f)).concat(Object.keys(fd));s.includes("fa")||s.push("fa");const o=[".".concat(su,":not([").concat(fn,"])")].concat(s.map(f=>".".concat(f,":not([").concat(fn,"])"))).join(", ");if(o.length===0)return Promise.resolve();let a=[];try{a=lr(t.querySelectorAll(o))}catch{}if(a.length>0)r("pending"),i("complete");else return Promise.resolve();const l=Bo.begin("onTree"),c=a.reduce((f,d)=>{try{const p=Tu(d);p&&f.push(p)}catch(p){nu||p.name==="MissingIcon"&&console.error(p)}return f},[]);return new Promise((f,d)=>{Promise.all(c).then(p=>{bu(p,()=>{r("active"),r("complete"),i("pending"),typeof e=="function"&&e(),l(),f()})}).catch(p=>{l(),d(p)})})}function dd(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;Tu(t).then(n=>{n&&bu([n],e)})}function hd(t){return function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=(e||{}).icon?e:Qs(e||{});let{mask:i}=n;return i&&(i=(i||{}).icon?i:Qs(i||{})),t(r,{...n,mask:i})}}const pd=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:n=yt,symbol:r=!1,mask:i=null,maskId:s=null,title:o=null,titleId:a=null,classes:l=[],attributes:c={},styles:f={}}=e;if(!t)return;const{prefix:d,iconName:p,icon:m}=t;return Vi({type:"icon",...t},()=>(dn("beforeDOMElementCreation",{iconDefinition:t,params:e}),j.autoA11y&&(o?c["aria-labelledby"]="".concat(j.replacementClass,"-title-").concat(a||Nr()):(c["aria-hidden"]="true",c.focusable="false")),Do({icons:{main:Ks(m),mask:i?Ks(i.icon):{found:!1,width:null,height:null,icon:{}}},prefix:d,iconName:p,transform:{...yt,...n},symbol:r,title:o,maskId:s,titleId:a,extra:{attributes:c,styles:f,classes:l}})))};var md={mixout(){return{icon:hd(pd)}},hooks(){return{mutationObserverCallbacks(t){return t.treeCallback=ka,t.nodeCallback=dd,t}}},provides(t){t.i2svg=function(e){const{node:n=xe,callback:r=()=>{}}=e;return ka(n,r)},t.generateSvgReplacementMutation=function(e,n){const{iconName:r,title:i,titleId:s,prefix:o,transform:a,symbol:l,mask:c,maskId:f,extra:d}=n;return new Promise((p,m)=>{Promise.all([Js(r,o),c.iconName?Js(c.iconName,c.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(g=>{let[w,y]=g;p([e,Do({icons:{main:w,mask:y},prefix:o,iconName:r,transform:a,symbol:l,maskId:f,title:i,titleId:s,extra:d,watchable:!0})])}).catch(m)})},t.generateAbstractIcon=function(e){let{children:n,attributes:r,main:i,transform:s,styles:o}=e;const a=zi(o);a.length>0&&(r.style=a);let l;return jo(s)&&(l=Wt("generateAbstractTransformGrouping",{main:i,transform:s,containerWidth:i.width,iconWidth:i.width})),n.push(l||i.icon),{children:n,attributes:r}}}},xd={mixout(){return{layer(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{classes:n=[]}=e;return Vi({type:"layer"},()=>{dn("beforeDOMElementCreation",{assembler:t,params:e});let r=[];return t(i=>{Array.isArray(i)?i.map(s=>{r=r.concat(s.abstract)}):r=r.concat(i.abstract)}),[{tag:"span",attributes:{class:["".concat(j.cssPrefix,"-layers"),...n].join(" ")},children:r}]})}}}},gd={mixout(){return{counter(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{title:n=null,classes:r=[],attributes:i={},styles:s={}}=e;return Vi({type:"counter",content:t},()=>(dn("beforeDOMElementCreation",{content:t,params:e}),Zf({content:t.toString(),title:n,extra:{attributes:i,styles:s,classes:["".concat(j.cssPrefix,"-layers-counter"),...r]}})))}}}},yd={mixout(){return{text(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:n=yt,title:r=null,classes:i=[],attributes:s={},styles:o={}}=e;return Vi({type:"text",content:t},()=>(dn("beforeDOMElementCreation",{content:t,params:e}),Sa({content:t,transform:{...yt,...n},title:r,extra:{attributes:s,styles:o,classes:["".concat(j.cssPrefix,"-layers-text"),...i]}})))}}},provides(t){t.generateLayersText=function(e,n){const{title:r,transform:i,extra:s}=n;let o=null,a=null;if(Zc){const l=parseInt(getComputedStyle(e).fontSize,10),c=e.getBoundingClientRect();o=c.width/l,a=c.height/l}return j.autoA11y&&!r&&(s.attributes["aria-hidden"]="true"),Promise.resolve([e,Sa({content:e.innerHTML,width:o,height:a,transform:i,title:r,extra:s,watchable:!0})])}}};const vd=new RegExp('"',"ug"),Ia=[1105920,1112319],Ca={FontAwesome:{normal:"fas",400:"fas"},...J0,...K0,...lf},no=Object.keys(Ca).reduce((t,e)=>(t[e.toLowerCase()]=Ca[e],t),{}),wd=Object.keys(no).reduce((t,e)=>{const n=no[e];return t[e]=n[900]||[...Object.entries(n)][0][1],t},{});function bd(t){const e=t.replace(vd,""),n=If(e,0),r=n>=Ia[0]&&n<=Ia[1],i=e.length===2?e[0]===e[1]:!1;return{value:Xs(i?e[0]:e),isSecondary:r||i}}function Ed(t,e){const n=t.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(e),i=isNaN(r)?"normal":r;return(no[n]||{})[i]||wd[n]}function La(t,e){const n="".concat(ff).concat(e.replace(":","-"));return new Promise((r,i)=>{if(t.getAttribute(n)!==null)return r();const o=lr(t.children).filter(p=>p.getAttribute(Hs)===e)[0],a=Ht.getComputedStyle(t,e),l=a.getPropertyValue("font-family"),c=l.match(xf),f=a.getPropertyValue("font-weight"),d=a.getPropertyValue("content");if(o&&!c)return t.removeChild(o),r();if(c&&d!=="none"&&d!==""){const p=a.getPropertyValue("content");let m=Ed(l,f);const{value:g,isSecondary:w}=bd(p),y=c[0].startsWith("FontAwesome");let b=Fo(m,g),_=b;if(y){const E=Df(g);E.iconName&&E.prefix&&(b=E.iconName,m=E.prefix)}if(b&&!w&&(!o||o.getAttribute(Io)!==m||o.getAttribute(Co)!==_)){t.setAttribute(n,_),o&&t.removeChild(o);const E=ud(),{extra:T}=E;T.attributes[Hs]=e,Js(b,m).then(v=>{const S=Do({...E,icons:{main:v,mask:zo()},prefix:m,iconName:_,extra:T,watchable:!0}),M=xe.createElementNS("http://www.w3.org/2000/svg","svg");e==="::before"?t.insertBefore(M,t.firstChild):t.appendChild(M),M.outerHTML=S.map(D=>Wr(D)).join(`
|
|
555
|
-
`),t.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function Td(t){return Promise.all([La(t,"::before"),La(t,"::after")])}function Rd(t){return t.parentNode!==document.head&&!~hf.indexOf(t.tagName.toUpperCase())&&!t.getAttribute(Hs)&&(!t.parentNode||t.parentNode.tagName!=="svg")}function ja(t){if(At)return new Promise((e,n)=>{const r=lr(t.querySelectorAll("*")).filter(Rd).map(Td),i=Bo.begin("searchPseudoElements");Eu(),Promise.all(r).then(()=>{i(),to(),e()}).catch(()=>{i(),to(),n()})})}var Sd={hooks(){return{mutationObserverCallbacks(t){return t.pseudoElementsCallback=ja,t}}},provides(t){t.pseudoElements2svg=function(e){const{node:n=xe}=e;j.searchPseudoElements&&ja(n)}}};let Na=!1;var _d={mixout(){return{dom:{unwatch(){Eu(),Na=!0}}}},hooks(){return{bootstrap(){Pa(Zs("mutationObserverCallbacks",{}))},noAuto(){od()},watch(t){const{observeMutationsRoot:e}=t;Na?to():Pa(Zs("mutationObserverCallbacks",{observeMutationsRoot:e}))}}}};const Fa=t=>{let e={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce((n,r)=>{const i=r.toLowerCase().split("-"),s=i[0];let o=i.slice(1).join("-");if(s&&o==="h")return n.flipX=!0,n;if(s&&o==="v")return n.flipY=!0,n;if(o=parseFloat(o),isNaN(o))return n;switch(s){case"grow":n.size=n.size+o;break;case"shrink":n.size=n.size-o;break;case"left":n.x=n.x-o;break;case"right":n.x=n.x+o;break;case"up":n.y=n.y-o;break;case"down":n.y=n.y+o;break;case"rotate":n.rotate=n.rotate+o;break}return n},e)};var Ad={mixout(){return{parse:{transform:t=>Fa(t)}}},hooks(){return{parseNodeAttributes(t,e){const n=e.getAttribute("data-fa-transform");return n&&(t.transform=Fa(n)),t}}},provides(t){t.generateAbstractTransformGrouping=function(e){let{main:n,transform:r,containerWidth:i,iconWidth:s}=e;const o={transform:"translate(".concat(i/2," 256)")},a="translate(".concat(r.x*32,", ").concat(r.y*32,") "),l="scale(".concat(r.size/16*(r.flipX?-1:1),", ").concat(r.size/16*(r.flipY?-1:1),") "),c="rotate(".concat(r.rotate," 0 0)"),f={transform:"".concat(a," ").concat(l," ").concat(c)},d={transform:"translate(".concat(s/2*-1," -256)")},p={outer:o,inner:f,path:d};return{tag:"g",attributes:{...p.outer},children:[{tag:"g",attributes:{...p.inner},children:[{tag:n.icon.tag,children:n.icon.children,attributes:{...n.icon.attributes,...p.path}}]}]}}}};const as={x:0,y:0,width:"100%",height:"100%"};function za(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return t.attributes&&(t.attributes.fill||e)&&(t.attributes.fill="black"),t}function Md(t){return t.tag==="g"?t.children:[t]}var Pd={hooks(){return{parseNodeAttributes(t,e){const n=e.getAttribute("data-fa-mask"),r=n?Bi(n.split(" ").map(i=>i.trim())):zo();return r.prefix||(r.prefix=$t()),t.mask=r,t.maskId=e.getAttribute("data-fa-mask-id"),t}}},provides(t){t.generateAbstractMask=function(e){let{children:n,attributes:r,main:i,mask:s,maskId:o,transform:a}=e;const{width:l,icon:c}=i,{width:f,icon:d}=s,p=_f({transform:a,containerWidth:f,iconWidth:l}),m={tag:"rect",attributes:{...as,fill:"white"}},g=c.children?{children:c.children.map(za)}:{},w={tag:"g",attributes:{...p.inner},children:[za({tag:c.tag,attributes:{...c.attributes,...p.path},...g})]},y={tag:"g",attributes:{...p.outer},children:[w]},b="mask-".concat(o||Nr()),_="clip-".concat(o||Nr()),E={tag:"mask",attributes:{...as,id:b,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"},children:[m,y]},T={tag:"defs",children:[{tag:"clipPath",attributes:{id:_},children:Md(d)},E]};return n.push(T,{tag:"rect",attributes:{fill:"currentColor","clip-path":"url(#".concat(_,")"),mask:"url(#".concat(b,")"),...as}}),{children:n,attributes:r}}}},Od={provides(t){let e=!1;Ht.matchMedia&&(e=Ht.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){const n=[],r={fill:"currentColor"},i={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};n.push({tag:"path",attributes:{...r,d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"}});const s={...i,attributeName:"opacity"},o={tag:"circle",attributes:{...r,cx:"256",cy:"364",r:"28"},children:[]};return e||o.children.push({tag:"animate",attributes:{...i,attributeName:"r",values:"28;14;28;28;14;28;"}},{tag:"animate",attributes:{...s,values:"1;0;1;1;0;1;"}}),n.push(o),n.push({tag:"path",attributes:{...r,opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"},children:e?[]:[{tag:"animate",attributes:{...s,values:"1;0;0;0;0;1;"}}]}),e||n.push({tag:"path",attributes:{...r,opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"},children:[{tag:"animate",attributes:{...s,values:"0;0;1;1;0;0;"}}]}),{tag:"g",attributes:{class:"missing"},children:n}}}},kd={hooks(){return{parseNodeAttributes(t,e){const n=e.getAttribute("data-fa-symbol"),r=n===null?!1:n===""?!0:n;return t.symbol=r,t}}}},Id=[Pf,md,xd,gd,yd,Sd,_d,Ad,Pd,Od,kd];Gf(Id,{mixoutsTo:Ye});Ye.noAuto;Ye.config;Ye.library;Ye.dom;const ro=Ye.parse;Ye.findIconDefinition;Ye.toHtml;const Cd=Ye.icon;Ye.layer;Ye.text;Ye.counter;var Kr={exports:{}},Jr={exports:{}},oe={};var Da;function Ld(){if(Da)return oe;Da=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,g=t?Symbol.for("react.lazy"):60116,w=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,_=t?Symbol.for("react.scope"):60119;function E(v){if(typeof v=="object"&&v!==null){var S=v.$$typeof;switch(S){case e:switch(v=v.type,v){case l:case c:case r:case s:case i:case d:return v;default:switch(v=v&&v.$$typeof,v){case a:case f:case g:case m:case o:return v;default:return S}}case n:return S}}}function T(v){return E(v)===c}return oe.AsyncMode=l,oe.ConcurrentMode=c,oe.ContextConsumer=a,oe.ContextProvider=o,oe.Element=e,oe.ForwardRef=f,oe.Fragment=r,oe.Lazy=g,oe.Memo=m,oe.Portal=n,oe.Profiler=s,oe.StrictMode=i,oe.Suspense=d,oe.isAsyncMode=function(v){return T(v)||E(v)===l},oe.isConcurrentMode=T,oe.isContextConsumer=function(v){return E(v)===a},oe.isContextProvider=function(v){return E(v)===o},oe.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},oe.isForwardRef=function(v){return E(v)===f},oe.isFragment=function(v){return E(v)===r},oe.isLazy=function(v){return E(v)===g},oe.isMemo=function(v){return E(v)===m},oe.isPortal=function(v){return E(v)===n},oe.isProfiler=function(v){return E(v)===s},oe.isStrictMode=function(v){return E(v)===i},oe.isSuspense=function(v){return E(v)===d},oe.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===c||v===s||v===i||v===d||v===p||typeof v=="object"&&v!==null&&(v.$$typeof===g||v.$$typeof===m||v.$$typeof===o||v.$$typeof===a||v.$$typeof===f||v.$$typeof===y||v.$$typeof===b||v.$$typeof===_||v.$$typeof===w)},oe.typeOf=E,oe}var ae={};var Ba;function jd(){return Ba||(Ba=1,process.env.NODE_ENV!=="production"&&(function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,g=t?Symbol.for("react.lazy"):60116,w=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,_=t?Symbol.for("react.scope"):60119;function E(P){return typeof P=="string"||typeof P=="function"||P===r||P===c||P===s||P===i||P===d||P===p||typeof P=="object"&&P!==null&&(P.$$typeof===g||P.$$typeof===m||P.$$typeof===o||P.$$typeof===a||P.$$typeof===f||P.$$typeof===y||P.$$typeof===b||P.$$typeof===_||P.$$typeof===w)}function T(P){if(typeof P=="object"&&P!==null){var ht=P.$$typeof;switch(ht){case e:var Zr=P.type;switch(Zr){case l:case c:case r:case s:case i:case d:return Zr;default:var ha=Zr&&Zr.$$typeof;switch(ha){case a:case f:case g:case m:case o:return ha;default:return ht}}case n:return ht}}}var v=l,S=c,M=a,D=o,F=e,ue=f,fe=r,se=g,Y=m,Q=n,ze=s,Oe=i,Le=d,dt=!1;function Ue(P){return dt||(dt=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),A(P)||T(P)===l}function A(P){return T(P)===c}function k(P){return T(P)===a}function B(P){return T(P)===o}function H(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function V(P){return T(P)===f}function K(P){return T(P)===r}function U(P){return T(P)===g}function G(P){return T(P)===m}function q(P){return T(P)===n}function J(P){return T(P)===s}function ne(P){return T(P)===i}function Re(P){return T(P)===d}ae.AsyncMode=v,ae.ConcurrentMode=S,ae.ContextConsumer=M,ae.ContextProvider=D,ae.Element=F,ae.ForwardRef=ue,ae.Fragment=fe,ae.Lazy=se,ae.Memo=Y,ae.Portal=Q,ae.Profiler=ze,ae.StrictMode=Oe,ae.Suspense=Le,ae.isAsyncMode=Ue,ae.isConcurrentMode=A,ae.isContextConsumer=k,ae.isContextProvider=B,ae.isElement=H,ae.isForwardRef=V,ae.isFragment=K,ae.isLazy=U,ae.isMemo=G,ae.isPortal=q,ae.isProfiler=J,ae.isStrictMode=ne,ae.isSuspense=Re,ae.isValidElementType=E,ae.typeOf=T})()),ae}var Va;function Ru(){return Va||(Va=1,process.env.NODE_ENV==="production"?Jr.exports=Ld():Jr.exports=jd()),Jr.exports}var ls,Ua;function Nd(){if(Ua)return ls;Ua=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ls=i()?Object.assign:function(s,o){for(var a,l=r(s),c,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var d in a)e.call(a,d)&&(l[d]=a[d]);if(t){c=t(a);for(var p=0;p<c.length;p++)n.call(a,c[p])&&(l[c[p]]=a[c[p]])}}return l},ls}var cs,Ga;function Uo(){if(Ga)return cs;Ga=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return cs=t,cs}var us,Ha;function Su(){return Ha||(Ha=1,us=Function.call.bind(Object.prototype.hasOwnProperty)),us}var fs,$a;function Fd(){if($a)return fs;$a=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Uo(),n={},r=Su();t=function(s){var o="Warning: "+s;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(s,o,a,l,c){if(process.env.NODE_ENV!=="production"){for(var f in s)if(r(s,f)){var d;try{if(typeof s[f]!="function"){var p=Error((l||"React class")+": "+a+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}d=s[f](o,f,l,a,null,e)}catch(g){d=g}if(d&&!(d instanceof Error)&&t((l||"React class")+": type specification of "+a+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var m=c?c():"";t("Failed "+a+" type: "+d.message+(m??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},fs=i,fs}var ds,Wa;function zd(){if(Wa)return ds;Wa=1;var t=Ru(),e=Nd(),n=Uo(),r=Su(),i=Fd(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return ds=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(A){var k=A&&(c&&A[c]||A[f]);if(typeof k=="function")return k}var p="<<anonymous>>",m={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:_(),arrayOf:E,element:T(),elementType:v(),instanceOf:S,node:ue(),objectOf:D,oneOf:M,oneOfType:F,shape:se,exact:Y};function g(A,k){return A===k?A!==0||1/A===1/k:A!==A&&k!==k}function w(A,k){this.message=A,this.data=k&&typeof k=="object"?k:{},this.stack=""}w.prototype=Error.prototype;function y(A){if(process.env.NODE_ENV!=="production")var k={},B=0;function H(K,U,G,q,J,ne,Re){if(q=q||p,ne=ne||G,Re!==n){if(l){var P=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw P.name="Invariant Violation",P}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ht=q+":"+G;!k[ht]&&B<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ne+"` prop on `"+q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),k[ht]=!0,B++)}}return U[G]==null?K?U[G]===null?new w("The "+J+" `"+ne+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new w("The "+J+" `"+ne+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:A(U,G,q,J,ne)}var V=H.bind(null,!1);return V.isRequired=H.bind(null,!0),V}function b(A){function k(B,H,V,K,U,G){var q=B[H],J=Oe(q);if(J!==A){var ne=Le(q);return new w("Invalid "+K+" `"+U+"` of type "+("`"+ne+"` supplied to `"+V+"`, expected ")+("`"+A+"`."),{expectedType:A})}return null}return y(k)}function _(){return y(o)}function E(A){function k(B,H,V,K,U){if(typeof A!="function")return new w("Property `"+U+"` of component `"+V+"` has invalid PropType notation inside arrayOf.");var G=B[H];if(!Array.isArray(G)){var q=Oe(G);return new w("Invalid "+K+" `"+U+"` of type "+("`"+q+"` supplied to `"+V+"`, expected an array."))}for(var J=0;J<G.length;J++){var ne=A(G,J,V,K,U+"["+J+"]",n);if(ne instanceof Error)return ne}return null}return y(k)}function T(){function A(k,B,H,V,K){var U=k[B];if(!a(U)){var G=Oe(U);return new w("Invalid "+V+" `"+K+"` of type "+("`"+G+"` supplied to `"+H+"`, expected a single ReactElement."))}return null}return y(A)}function v(){function A(k,B,H,V,K){var U=k[B];if(!t.isValidElementType(U)){var G=Oe(U);return new w("Invalid "+V+" `"+K+"` of type "+("`"+G+"` supplied to `"+H+"`, expected a single ReactElement type."))}return null}return y(A)}function S(A){function k(B,H,V,K,U){if(!(B[H]instanceof A)){var G=A.name||p,q=Ue(B[H]);return new w("Invalid "+K+" `"+U+"` of type "+("`"+q+"` supplied to `"+V+"`, expected ")+("instance of `"+G+"`."))}return null}return y(k)}function M(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),o;function k(B,H,V,K,U){for(var G=B[H],q=0;q<A.length;q++)if(g(G,A[q]))return null;var J=JSON.stringify(A,function(Re,P){var ht=Le(P);return ht==="symbol"?String(P):P});return new w("Invalid "+K+" `"+U+"` of value `"+String(G)+"` "+("supplied to `"+V+"`, expected one of "+J+"."))}return y(k)}function D(A){function k(B,H,V,K,U){if(typeof A!="function")return new w("Property `"+U+"` of component `"+V+"` has invalid PropType notation inside objectOf.");var G=B[H],q=Oe(G);if(q!=="object")return new w("Invalid "+K+" `"+U+"` of type "+("`"+q+"` supplied to `"+V+"`, expected an object."));for(var J in G)if(r(G,J)){var ne=A(G,J,V,K,U+"."+J,n);if(ne instanceof Error)return ne}return null}return y(k)}function F(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var k=0;k<A.length;k++){var B=A[k];if(typeof B!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+dt(B)+" at index "+k+"."),o}function H(V,K,U,G,q){for(var J=[],ne=0;ne<A.length;ne++){var Re=A[ne],P=Re(V,K,U,G,q,n);if(P==null)return null;P.data&&r(P.data,"expectedType")&&J.push(P.data.expectedType)}var ht=J.length>0?", expected one of type ["+J.join(", ")+"]":"";return new w("Invalid "+G+" `"+q+"` supplied to "+("`"+U+"`"+ht+"."))}return y(H)}function ue(){function A(k,B,H,V,K){return Q(k[B])?null:new w("Invalid "+V+" `"+K+"` supplied to "+("`"+H+"`, expected a ReactNode."))}return y(A)}function fe(A,k,B,H,V){return new w((A||"React class")+": "+k+" type `"+B+"."+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+V+"`.")}function se(A){function k(B,H,V,K,U){var G=B[H],q=Oe(G);if(q!=="object")return new w("Invalid "+K+" `"+U+"` of type `"+q+"` "+("supplied to `"+V+"`, expected `object`."));for(var J in A){var ne=A[J];if(typeof ne!="function")return fe(V,K,U,J,Le(ne));var Re=ne(G,J,V,K,U+"."+J,n);if(Re)return Re}return null}return y(k)}function Y(A){function k(B,H,V,K,U){var G=B[H],q=Oe(G);if(q!=="object")return new w("Invalid "+K+" `"+U+"` of type `"+q+"` "+("supplied to `"+V+"`, expected `object`."));var J=e({},B[H],A);for(var ne in J){var Re=A[ne];if(r(A,ne)&&typeof Re!="function")return fe(V,K,U,ne,Le(Re));if(!Re)return new w("Invalid "+K+" `"+U+"` key `"+ne+"` supplied to `"+V+"`.\nBad object: "+JSON.stringify(B[H],null," ")+`
|
|
556
|
-
Valid keys: `+JSON.stringify(Object.keys(A),null," "));var P=Re(G,ne,V,K,U+"."+ne,n);if(P)return P}return null}return y(k)}function Q(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(Q);if(A===null||a(A))return!0;var k=d(A);if(k){var B=k.call(A),H;if(k!==A.entries){for(;!(H=B.next()).done;)if(!Q(H.value))return!1}else for(;!(H=B.next()).done;){var V=H.value;if(V&&!Q(V[1]))return!1}}else return!1;return!0;default:return!1}}function ze(A,k){return A==="symbol"?!0:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:!1}function Oe(A){var k=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":ze(k,A)?"symbol":k}function Le(A){if(typeof A>"u"||A===null)return""+A;var k=Oe(A);if(k==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return k}function dt(A){var k=Le(A);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}function Ue(A){return!A.constructor||!A.constructor.name?p:A.constructor.name}return m.checkPropTypes=i,m.resetWarningCache=i.resetWarningCache,m.PropTypes=m,m},ds}var hs,qa;function Dd(){if(qa)return hs;qa=1;var t=Uo();function e(){}function n(){}return n.resetWarningCache=e,hs=function(){function r(o,a,l,c,f,d){if(d!==t){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return s.PropTypes=s,s},hs}var Xa;function Bd(){if(Xa)return Kr.exports;if(Xa=1,process.env.NODE_ENV!=="production"){var t=Ru(),e=!0;Kr.exports=zd()(t.isElement,e)}else Kr.exports=Dd()();return Kr.exports}var Vd=Bd();const ee=u.getDefaultExportFromCjs(Vd);function Ya(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function mt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ya(Object(n),!0).forEach(function(r){Hn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ai(t){"@babel/helpers - typeof";return Ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ai(t)}function Hn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ud(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Gd(t,e){if(t==null)return{};var n=Ud(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function io(t){return Hd(t)||$d(t)||Wd(t)||qd()}function Hd(t){if(Array.isArray(t))return so(t)}function $d(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Wd(t,e){if(t){if(typeof t=="string")return so(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return so(t,e)}}function so(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function qd(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
557
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xd(t){var e,n=t.beat,r=t.fade,i=t.beatFade,s=t.bounce,o=t.shake,a=t.flash,l=t.spin,c=t.spinPulse,f=t.spinReverse,d=t.pulse,p=t.fixedWidth,m=t.inverse,g=t.border,w=t.listItem,y=t.flip,b=t.size,_=t.rotation,E=t.pull,T=(e={"fa-beat":n,"fa-fade":r,"fa-beat-fade":i,"fa-bounce":s,"fa-shake":o,"fa-flash":a,"fa-spin":l,"fa-spin-reverse":f,"fa-spin-pulse":c,"fa-pulse":d,"fa-fw":p,"fa-inverse":m,"fa-border":g,"fa-li":w,"fa-flip":y===!0,"fa-flip-horizontal":y==="horizontal"||y==="both","fa-flip-vertical":y==="vertical"||y==="both"},Hn(e,"fa-".concat(b),typeof b<"u"&&b!==null),Hn(e,"fa-rotate-".concat(_),typeof _<"u"&&_!==null&&_!==0),Hn(e,"fa-pull-".concat(E),typeof E<"u"&&E!==null),Hn(e,"fa-swap-opacity",t.swapOpacity),e);return Object.keys(T).map(function(v){return T[v]?v:null}).filter(function(v){return v})}function Yd(t){return t=t-0,t===t}function _u(t){return Yd(t)?t:(t=t.replace(/[\-_\s]+(.)?/g,function(e,n){return n?n.toUpperCase():""}),t.substr(0,1).toLowerCase()+t.substr(1))}var Zd=["style"];function Qd(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Kd(t){return t.split(";").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,n){var r=n.indexOf(":"),i=_u(n.slice(0,r)),s=n.slice(r+1).trim();return i.startsWith("webkit")?e[Qd(i)]=s:e[i]=s,e},{})}function Au(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var r=(e.children||[]).map(function(l){return Au(t,l)}),i=Object.keys(e.attributes||{}).reduce(function(l,c){var f=e.attributes[c];switch(c){case"class":l.attrs.className=f,delete e.attributes.class;break;case"style":l.attrs.style=Kd(f);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=f:l.attrs[_u(c)]=f}return l},{attrs:{}}),s=n.style,o=s===void 0?{}:s,a=Gd(n,Zd);return i.attrs.style=mt(mt({},i.attrs.style),o),t.apply(void 0,[e.tag,mt(mt({},i.attrs),a)].concat(io(r)))}var Mu=!1;try{Mu=process.env.NODE_ENV==="production"}catch{}function Jd(){if(!Mu&&console&&typeof console.error=="function"){var t;(t=console).error.apply(t,arguments)}}function Za(t){if(t&&Ai(t)==="object"&&t.prefix&&t.iconName&&t.icon)return t;if(ro.icon)return ro.icon(t);if(t===null)return null;if(t&&Ai(t)==="object"&&t.prefix&&t.iconName)return t;if(Array.isArray(t)&&t.length===2)return{prefix:t[0],iconName:t[1]};if(typeof t=="string")return{prefix:"fas",iconName:t}}function ps(t,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?Hn({},t,e):{}}var Qa={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1},qr=C.forwardRef(function(t,e){var n=mt(mt({},Qa),t),r=n.icon,i=n.mask,s=n.symbol,o=n.className,a=n.title,l=n.titleId,c=n.maskId,f=Za(r),d=ps("classes",[].concat(io(Xd(n)),io((o||"").split(" ")))),p=ps("transform",typeof n.transform=="string"?ro.transform(n.transform):n.transform),m=ps("mask",Za(i)),g=Cd(f,mt(mt(mt(mt({},d),p),m),{},{symbol:s,title:a,titleId:l,maskId:c}));if(!g)return Jd("Could not find icon",f),null;var w=g.abstract,y={ref:e};return Object.keys(n).forEach(function(b){Qa.hasOwnProperty(b)||(y[b]=n[b])}),eh(w[0],y)});qr.displayName="FontAwesomeIcon";qr.propTypes={beat:ee.bool,border:ee.bool,beatFade:ee.bool,bounce:ee.bool,className:ee.string,fade:ee.bool,flash:ee.bool,mask:ee.oneOfType([ee.object,ee.array,ee.string]),maskId:ee.string,fixedWidth:ee.bool,inverse:ee.bool,flip:ee.oneOf([!0,!1,"horizontal","vertical","both"]),icon:ee.oneOfType([ee.object,ee.array,ee.string]),listItem:ee.bool,pull:ee.oneOf(["right","left"]),pulse:ee.bool,rotation:ee.oneOf([0,90,180,270]),shake:ee.bool,size:ee.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:ee.bool,spinPulse:ee.bool,spinReverse:ee.bool,symbol:ee.oneOfType([ee.bool,ee.string]),title:ee.string,titleId:ee.string,transform:ee.oneOfType([ee.string,ee.object]),swapOpacity:ee.bool};var eh=Au.bind(null,C.createElement),De=function(){return De=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},De.apply(this,arguments)};function Zn(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}function th(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var nh=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,rh=th(function(t){return nh.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),ms,Ka;function ih(){return Ka||(Ka=1,ms=function(e,n,r,i){var s=r?r.call(i,e,n):void 0;if(s!==void 0)return!!s;if(e===n)return!0;if(typeof e!="object"||!e||typeof n!="object"||!n)return!1;var o=Object.keys(e),a=Object.keys(n);if(o.length!==a.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(n),c=0;c<o.length;c++){var f=o[c];if(!l(f))return!1;var d=e[f],p=n[f];if(s=r?r.call(i,d,p,f):void 0,s===!1||s===void 0&&d!==p)return!1}return!0}),ms}var sh=ih();const oh=u.getDefaultExportFromCjs(sh);var pe="-ms-",Ir="-moz-",le="-webkit-",Pu="comm",Ui="rule",Go="decl",ah="@import",Ou="@keyframes",lh="@layer",ku=Math.abs,Ho=String.fromCharCode,oo=Object.assign;function ch(t,e){return Ae(t,0)^45?(((e<<2^Ae(t,0))<<2^Ae(t,1))<<2^Ae(t,2))<<2^Ae(t,3):0}function Iu(t){return t.trim()}function Et(t,e){return(t=e.exec(t))?t[0]:t}function $(t,e,n){return t.replace(e,n)}function mi(t,e,n){return t.indexOf(e,n)}function Ae(t,e){return t.charCodeAt(e)|0}function Qn(t,e,n){return t.slice(e,n)}function xt(t){return t.length}function Cu(t){return t.length}function Ar(t,e){return e.push(t),t}function uh(t,e){return t.map(e).join("")}function Ja(t,e){return t.filter(function(n){return!Et(n,e)})}var Gi=1,Kn=1,Lu=0,tt=0,be=0,cr="";function Hi(t,e,n,r,i,s,o,a){return{value:t,root:e,parent:n,type:r,props:i,children:s,line:Gi,column:Kn,length:o,return:"",siblings:a}}function jt(t,e){return oo(Hi("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function gn(t){for(;t.root;)t=jt(t.root,{children:[t]});Ar(t,t.siblings)}function fh(){return be}function dh(){return be=tt>0?Ae(cr,--tt):0,Kn--,be===10&&(Kn=1,Gi--),be}function lt(){return be=tt<Lu?Ae(cr,tt++):0,Kn++,be===10&&(Kn=1,Gi++),be}function on(){return Ae(cr,tt)}function xi(){return tt}function $i(t,e){return Qn(cr,t,e)}function ao(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function hh(t){return Gi=Kn=1,Lu=xt(cr=t),tt=0,[]}function ph(t){return cr="",t}function xs(t){return Iu($i(tt-1,lo(t===91?t+2:t===40?t+1:t)))}function mh(t){for(;(be=on())&&be<33;)lt();return ao(t)>2||ao(be)>3?"":" "}function xh(t,e){for(;--e&<()&&!(be<48||be>102||be>57&&be<65||be>70&&be<97););return $i(t,xi()+(e<6&&on()==32&<()==32))}function lo(t){for(;lt();)switch(be){case t:return tt;case 34:case 39:t!==34&&t!==39&&lo(be);break;case 40:t===41&&lo(t);break;case 92:lt();break}return tt}function gh(t,e){for(;lt()&&t+be!==57;)if(t+be===84&&on()===47)break;return"/*"+$i(e,tt-1)+"*"+Ho(t===47?t:lt())}function yh(t){for(;!ao(on());)lt();return $i(t,tt)}function vh(t){return ph(gi("",null,null,null,[""],t=hh(t),0,[0],t))}function gi(t,e,n,r,i,s,o,a,l){for(var c=0,f=0,d=o,p=0,m=0,g=0,w=1,y=1,b=1,_=0,E="",T=i,v=s,S=r,M=E;y;)switch(g=_,_=lt()){case 40:if(g!=108&&Ae(M,d-1)==58){mi(M+=$(xs(_),"&","&\f"),"&\f",ku(c?a[c-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:M+=xs(_);break;case 9:case 10:case 13:case 32:M+=mh(g);break;case 92:M+=xh(xi()-1,7);continue;case 47:switch(on()){case 42:case 47:Ar(wh(gh(lt(),xi()),e,n,l),l);break;default:M+="/"}break;case 123*w:a[c++]=xt(M)*b;case 125*w:case 59:case 0:switch(_){case 0:case 125:y=0;case 59+f:b==-1&&(M=$(M,/\f/g,"")),m>0&&xt(M)-d&&Ar(m>32?tl(M+";",r,n,d-1,l):tl($(M," ","")+";",r,n,d-2,l),l);break;case 59:M+=";";default:if(Ar(S=el(M,e,n,c,f,i,a,E,T=[],v=[],d,s),s),_===123)if(f===0)gi(M,e,S,S,T,s,d,a,v);else switch(p===99&&Ae(M,3)===110?100:p){case 100:case 108:case 109:case 115:gi(t,S,S,r&&Ar(el(t,S,S,0,0,i,a,E,i,T=[],d,v),v),i,v,d,a,r?T:v);break;default:gi(M,S,S,S,[""],v,0,a,v)}}c=f=m=0,w=b=1,E=M="",d=o;break;case 58:d=1+xt(M),m=g;default:if(w<1){if(_==123)--w;else if(_==125&&w++==0&&dh()==125)continue}switch(M+=Ho(_),_*w){case 38:b=f>0?1:(M+="\f",-1);break;case 44:a[c++]=(xt(M)-1)*b,b=1;break;case 64:on()===45&&(M+=xs(lt())),p=on(),f=d=xt(E=M+=yh(xi())),_++;break;case 45:g===45&&xt(M)==2&&(w=0)}}return s}function el(t,e,n,r,i,s,o,a,l,c,f,d){for(var p=i-1,m=i===0?s:[""],g=Cu(m),w=0,y=0,b=0;w<r;++w)for(var _=0,E=Qn(t,p+1,p=ku(y=o[w])),T=t;_<g;++_)(T=Iu(y>0?m[_]+" "+E:$(E,/&\f/g,m[_])))&&(l[b++]=T);return Hi(t,e,n,i===0?Ui:a,l,c,f,d)}function wh(t,e,n,r){return Hi(t,e,n,Pu,Ho(fh()),Qn(t,2,-2),0,r)}function tl(t,e,n,r,i){return Hi(t,e,n,Go,Qn(t,0,r),Qn(t,r+1,-1),r,i)}function ju(t,e,n){switch(ch(t,e)){case 5103:return le+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return le+t+t;case 4789:return Ir+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return le+t+Ir+t+pe+t+t;case 5936:switch(Ae(t,e+11)){case 114:return le+t+pe+$(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return le+t+pe+$(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return le+t+pe+$(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return le+t+pe+t+t;case 6165:return le+t+pe+"flex-"+t+t;case 5187:return le+t+$(t,/(\w+).+(:[^]+)/,le+"box-$1$2"+pe+"flex-$1$2")+t;case 5443:return le+t+pe+"flex-item-"+$(t,/flex-|-self/g,"")+(Et(t,/flex-|baseline/)?"":pe+"grid-row-"+$(t,/flex-|-self/g,""))+t;case 4675:return le+t+pe+"flex-line-pack"+$(t,/align-content|flex-|-self/g,"")+t;case 5548:return le+t+pe+$(t,"shrink","negative")+t;case 5292:return le+t+pe+$(t,"basis","preferred-size")+t;case 6060:return le+"box-"+$(t,"-grow","")+le+t+pe+$(t,"grow","positive")+t;case 4554:return le+$(t,/([^-])(transform)/g,"$1"+le+"$2")+t;case 6187:return $($($(t,/(zoom-|grab)/,le+"$1"),/(image-set)/,le+"$1"),t,"")+t;case 5495:case 3959:return $(t,/(image-set\([^]*)/,le+"$1$`$1");case 4968:return $($(t,/(.+:)(flex-)?(.*)/,le+"box-pack:$3"+pe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+le+t+t;case 4200:if(!Et(t,/flex-|baseline/))return pe+"grid-column-align"+Qn(t,e)+t;break;case 2592:case 3360:return pe+$(t,"template-","")+t;case 4384:case 3616:return n&&n.some(function(r,i){return e=i,Et(r.props,/grid-\w+-end/)})?~mi(t+(n=n[e].value),"span",0)?t:pe+$(t,"-start","")+t+pe+"grid-row-span:"+(~mi(n,"span",0)?Et(n,/\d+/):+Et(n,/\d+/)-+Et(t,/\d+/))+";":pe+$(t,"-start","")+t;case 4896:case 4128:return n&&n.some(function(r){return Et(r.props,/grid-\w+-start/)})?t:pe+$($(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return $(t,/(.+)-inline(.+)/,le+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(xt(t)-1-e>6)switch(Ae(t,e+1)){case 109:if(Ae(t,e+4)!==45)break;case 102:return $(t,/(.+:)(.+)-([^]+)/,"$1"+le+"$2-$3$1"+Ir+(Ae(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~mi(t,"stretch",0)?ju($(t,"stretch","fill-available"),e,n)+t:t}break;case 5152:case 5920:return $(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,i,s,o,a,l,c){return pe+i+":"+s+c+(o?pe+i+"-span:"+(a?l:+l-+s)+c:"")+t});case 4949:if(Ae(t,e+6)===121)return $(t,":",":"+le)+t;break;case 6444:switch(Ae(t,Ae(t,14)===45?18:11)){case 120:return $(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+le+(Ae(t,14)===45?"inline-":"")+"box$3$1"+le+"$2$3$1"+pe+"$2box$3")+t;case 100:return $(t,":",":"+pe)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return $(t,"scroll-","scroll-snap-")+t}return t}function Mi(t,e){for(var n="",r=0;r<t.length;r++)n+=e(t[r],r,t,e)||"";return n}function bh(t,e,n,r){switch(t.type){case lh:if(t.children.length)break;case ah:case Go:return t.return=t.return||t.value;case Pu:return"";case Ou:return t.return=t.value+"{"+Mi(t.children,r)+"}";case Ui:if(!xt(t.value=t.props.join(",")))return""}return xt(n=Mi(t.children,r))?t.return=t.value+"{"+n+"}":""}function Eh(t){var e=Cu(t);return function(n,r,i,s){for(var o="",a=0;a<e;a++)o+=t[a](n,r,i,s)||"";return o}}function Th(t){return function(e){e.root||(e=e.return)&&t(e)}}function Rh(t,e,n,r){if(t.length>-1&&!t.return)switch(t.type){case Go:t.return=ju(t.value,t.length,n);return;case Ou:return Mi([jt(t,{value:$(t.value,"@","@"+le)})],r);case Ui:if(t.length)return uh(n=t.props,function(i){switch(Et(i,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":gn(jt(t,{props:[$(i,/:(read-\w+)/,":"+Ir+"$1")]})),gn(jt(t,{props:[i]})),oo(t,{props:Ja(n,r)});break;case"::placeholder":gn(jt(t,{props:[$(i,/:(plac\w+)/,":"+le+"input-$1")]})),gn(jt(t,{props:[$(i,/:(plac\w+)/,":"+Ir+"$1")]})),gn(jt(t,{props:[$(i,/:(plac\w+)/,pe+"input-$1")]})),gn(jt(t,{props:[i]})),oo(t,{props:Ja(n,r)});break}return""})}}var Sh={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hn=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Nu="active",Fu="data-styled-version",Wi="6.1.19",$o=`/*!sc*/
|
|
558
|
-
`,Pi=typeof window<"u"&&typeof document<"u",_h=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production"),nl=/invalid hook call/i,ei=new Set,Ah=function(t,e){if(process.env.NODE_ENV!=="production"){var n=e?' with the id of "'.concat(e,'"'):"",r="The component ".concat(t).concat(n,` has been created dynamically.
|
|
559
|
-
`)+`You may see this warning because you've called styled inside another component.
|
|
560
|
-
To resolve this only create new StyledComponents outside of any render method and function component.
|
|
561
|
-
See https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.
|
|
562
|
-
`,i=console.error;try{var s=!0;console.error=function(o){for(var a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];nl.test(o)?(s=!1,ei.delete(r)):i.apply(void 0,Zn([o],a,!1))},C.useRef(),s&&!ei.has(r)&&(console.warn(r),ei.add(r))}catch(o){nl.test(o.message)&&ei.delete(r)}finally{console.error=i}}},qi=Object.freeze([]),Jn=Object.freeze({});function Mh(t,e,n){return n===void 0&&(n=Jn),t.theme!==n.theme&&t.theme||e||n.theme}var co=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),Ph=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Oh=/(^-|-$)/g;function rl(t){return t.replace(Ph,"-").replace(Oh,"")}var kh=/(a)(d)/gi,ti=52,il=function(t){return String.fromCharCode(t+(t>25?39:97))};function uo(t){var e,n="";for(e=Math.abs(t);e>ti;e=e/ti|0)n=il(e%ti)+n;return(il(e%ti)+n).replace(kh,"$1-$2")}var gs,zu=5381,tn=function(t,e){for(var n=e.length;n;)t=33*t^e.charCodeAt(--n);return t},Du=function(t){return tn(zu,t)};function Ih(t){return uo(Du(t)>>>0)}function Bu(t){return process.env.NODE_ENV!=="production"&&typeof t=="string"&&t||t.displayName||t.name||"Component"}function ys(t){return typeof t=="string"&&(process.env.NODE_ENV==="production"||t.charAt(0)===t.charAt(0).toLowerCase())}var Vu=typeof Symbol=="function"&&Symbol.for,Uu=Vu?Symbol.for("react.memo"):60115,Ch=Vu?Symbol.for("react.forward_ref"):60112,Lh={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},jh={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Gu={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Nh=((gs={})[Ch]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},gs[Uu]=Gu,gs);function sl(t){return("type"in(e=t)&&e.type.$$typeof)===Uu?Gu:"$$typeof"in t?Nh[t.$$typeof]:Lh;var e}var Fh=Object.defineProperty,zh=Object.getOwnPropertyNames,ol=Object.getOwnPropertySymbols,Dh=Object.getOwnPropertyDescriptor,Bh=Object.getPrototypeOf,al=Object.prototype;function Hu(t,e,n){if(typeof e!="string"){if(al){var r=Bh(e);r&&r!==al&&Hu(t,r,n)}var i=zh(e);ol&&(i=i.concat(ol(e)));for(var s=sl(t),o=sl(e),a=0;a<i.length;++a){var l=i[a];if(!(l in jh||n&&n[l]||o&&l in o||s&&l in s)){var c=Dh(e,l);try{Fh(t,l,c)}catch{}}}}return t}function er(t){return typeof t=="function"}function Wo(t){return typeof t=="object"&&"styledComponentId"in t}function nn(t,e){return t&&e?"".concat(t," ").concat(e):t||e||""}function ll(t,e){if(t.length===0)return"";for(var n=t[0],r=1;r<t.length;r++)n+=t[r];return n}function tr(t){return t!==null&&typeof t=="object"&&t.constructor.name===Object.name&&!("props"in t&&t.$$typeof)}function fo(t,e,n){if(n===void 0&&(n=!1),!n&&!tr(t)&&!Array.isArray(t))return e;if(Array.isArray(e))for(var r=0;r<e.length;r++)t[r]=fo(t[r],e[r]);else if(tr(e))for(var r in e)t[r]=fo(t[r],e[r]);return t}function qo(t,e){Object.defineProperty(t,"toString",{value:e})}var Vh=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
|
|
563
|
-
|
|
564
|
-
`,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
|
|
565
|
-
|
|
566
|
-
- Are you trying to reuse it across renders?
|
|
567
|
-
- Are you accidentally calling collectStyles twice?
|
|
568
|
-
|
|
569
|
-
`,3:`Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
|
|
570
|
-
|
|
571
|
-
`,4:`The \`StyleSheetManager\` expects a valid target or sheet prop!
|
|
572
|
-
|
|
573
|
-
- Does this error occur on the client and is your target falsy?
|
|
574
|
-
- Does this error occur on the server and is the sheet falsy?
|
|
575
|
-
|
|
576
|
-
`,5:`The clone method cannot be used on the client!
|
|
577
|
-
|
|
578
|
-
- Are you running in a client-like environment on the server?
|
|
579
|
-
- Are you trying to run SSR on the client?
|
|
580
|
-
|
|
581
|
-
`,6:`Trying to insert a new style tag, but the given Node is unmounted!
|
|
582
|
-
|
|
583
|
-
- Are you using a custom target that isn't mounted?
|
|
584
|
-
- Does your document not have a valid head element?
|
|
585
|
-
- Have you accidentally removed a style tag manually?
|
|
586
|
-
|
|
587
|
-
`,7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:`ThemeProvider: Please make your "theme" prop an object.
|
|
588
|
-
|
|
589
|
-
`,9:"Missing document `<head>`\n\n",10:`Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021
|
|
590
|
-
|
|
591
|
-
`,11:`_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.
|
|
592
|
-
|
|
593
|
-
`,12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:`%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.
|
|
594
|
-
|
|
595
|
-
`,14:`ThemeProvider: "theme" prop is required.
|
|
596
|
-
|
|
597
|
-
`,15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:`Reached the limit of how many styled components may be created at group %s.
|
|
598
|
-
You may only create up to 1,073,741,824 components. If you're creating components dynamically,
|
|
599
|
-
as for instance in your render method then you may be running into this limitation.
|
|
600
|
-
|
|
601
|
-
`,17:`CSSStyleSheet could not be found on HTMLStyleElement.
|
|
602
|
-
Has styled-components' style tag been unmounted or altered by another script?
|
|
603
|
-
`,18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function Uh(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t[0],r=[],i=1,s=t.length;i<s;i+=1)r.push(t[i]);return r.forEach(function(o){n=n.replace(/%[a-z]/,o)}),n}function ur(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return process.env.NODE_ENV==="production"?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(e.length>0?" Args: ".concat(e.join(", ")):"")):new Error(Uh.apply(void 0,Zn([Vh[t]],e,!1)).trim())}var Gh=(function(){function t(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return t.prototype.indexOfGroup=function(e){for(var n=0,r=0;r<e;r++)n+=this.groupSizes[r];return n},t.prototype.insertRules=function(e,n){if(e>=this.groupSizes.length){for(var r=this.groupSizes,i=r.length,s=i;e>=s;)if((s<<=1)<0)throw ur(16,"".concat(e));this.groupSizes=new Uint32Array(s),this.groupSizes.set(r),this.length=s;for(var o=i;o<s;o++)this.groupSizes[o]=0}for(var a=this.indexOfGroup(e+1),l=(o=0,n.length);o<l;o++)this.tag.insertRule(a,n[o])&&(this.groupSizes[e]++,a++)},t.prototype.clearGroup=function(e){if(e<this.length){var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;this.groupSizes[e]=0;for(var s=r;s<i;s++)this.tag.deleteRule(r)}},t.prototype.getGroup=function(e){var n="";if(e>=this.length||this.groupSizes[e]===0)return n;for(var r=this.groupSizes[e],i=this.indexOfGroup(e),s=i+r,o=i;o<s;o++)n+="".concat(this.tag.getRule(o)).concat($o);return n},t})(),Hh=1<<30,yi=new Map,Oi=new Map,vi=1,ni=function(t){if(yi.has(t))return yi.get(t);for(;Oi.has(vi);)vi++;var e=vi++;if(process.env.NODE_ENV!=="production"&&((0|e)<0||e>Hh))throw ur(16,"".concat(e));return yi.set(t,e),Oi.set(e,t),e},$h=function(t,e){vi=e+1,yi.set(t,e),Oi.set(e,t)},Wh="style[".concat(hn,"][").concat(Fu,'="').concat(Wi,'"]'),qh=new RegExp("^".concat(hn,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Xh=function(t,e,n){for(var r,i=n.split(","),s=0,o=i.length;s<o;s++)(r=i[s])&&t.registerName(e,r)},Yh=function(t,e){for(var n,r=((n=e.textContent)!==null&&n!==void 0?n:"").split($o),i=[],s=0,o=r.length;s<o;s++){var a=r[s].trim();if(a){var l=a.match(qh);if(l){var c=0|parseInt(l[1],10),f=l[2];c!==0&&($h(f,c),Xh(t,f,l[3]),t.getTag().insertRules(c,i)),i.length=0}else i.push(a)}}},cl=function(t){for(var e=document.querySelectorAll(Wh),n=0,r=e.length;n<r;n++){var i=e[n];i&&i.getAttribute(hn)!==Nu&&(Yh(t,i),i.parentNode&&i.parentNode.removeChild(i))}};function Zh(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var $u=function(t){var e=document.head,n=t||e,r=document.createElement("style"),i=(function(a){var l=Array.from(a.querySelectorAll("style[".concat(hn,"]")));return l[l.length-1]})(n),s=i!==void 0?i.nextSibling:null;r.setAttribute(hn,Nu),r.setAttribute(Fu,Wi);var o=Zh();return o&&r.setAttribute("nonce",o),n.insertBefore(r,s),r},Qh=(function(){function t(e){this.element=$u(e),this.element.appendChild(document.createTextNode("")),this.sheet=(function(n){if(n.sheet)return n.sheet;for(var r=document.styleSheets,i=0,s=r.length;i<s;i++){var o=r[i];if(o.ownerNode===n)return o}throw ur(17)})(this.element),this.length=0}return t.prototype.insertRule=function(e,n){try{return this.sheet.insertRule(n,e),this.length++,!0}catch{return!1}},t.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.prototype.getRule=function(e){var n=this.sheet.cssRules[e];return n&&n.cssText?n.cssText:""},t})(),Kh=(function(){function t(e){this.element=$u(e),this.nodes=this.element.childNodes,this.length=0}return t.prototype.insertRule=function(e,n){if(e<=this.length&&e>=0){var r=document.createTextNode(n);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},t.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},t})(),Jh=(function(){function t(e){this.rules=[],this.length=0}return t.prototype.insertRule=function(e,n){return e<=this.length&&(this.rules.splice(e,0,n),this.length++,!0)},t.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},t})(),ul=Pi,e1={isServer:!Pi,useCSSOMInjection:!_h},Wu=(function(){function t(e,n,r){e===void 0&&(e=Jn),n===void 0&&(n={});var i=this;this.options=De(De({},e1),e),this.gs=n,this.names=new Map(r),this.server=!!e.isServer,!this.server&&Pi&&ul&&(ul=!1,cl(this)),qo(this,function(){return(function(s){for(var o=s.getTag(),a=o.length,l="",c=function(d){var p=(function(b){return Oi.get(b)})(d);if(p===void 0)return"continue";var m=s.names.get(p),g=o.getGroup(d);if(m===void 0||!m.size||g.length===0)return"continue";var w="".concat(hn,".g").concat(d,'[id="').concat(p,'"]'),y="";m!==void 0&&m.forEach(function(b){b.length>0&&(y+="".concat(b,","))}),l+="".concat(g).concat(w,'{content:"').concat(y,'"}').concat($o)},f=0;f<a;f++)c(f);return l})(i)})}return t.registerId=function(e){return ni(e)},t.prototype.rehydrate=function(){!this.server&&Pi&&cl(this)},t.prototype.reconstructWithOptions=function(e,n){return n===void 0&&(n=!0),new t(De(De({},this.options),e),this.gs,n&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=(function(n){var r=n.useCSSOMInjection,i=n.target;return n.isServer?new Jh(i):r?new Qh(i):new Kh(i)})(this.options),new Gh(e)));var e},t.prototype.hasNameForId=function(e,n){return this.names.has(e)&&this.names.get(e).has(n)},t.prototype.registerName=function(e,n){if(ni(e),this.names.has(e))this.names.get(e).add(n);else{var r=new Set;r.add(n),this.names.set(e,r)}},t.prototype.insertRules=function(e,n,r){this.registerName(e,n),this.getTag().insertRules(ni(e),r)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(ni(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t})(),t1=/&/g,n1=/^\s*\/\/.*$/gm;function qu(t,e){return t.map(function(n){return n.type==="rule"&&(n.value="".concat(e," ").concat(n.value),n.value=n.value.replaceAll(",",",".concat(e," ")),n.props=n.props.map(function(r){return"".concat(e," ").concat(r)})),Array.isArray(n.children)&&n.type!=="@keyframes"&&(n.children=qu(n.children,e)),n})}function Xu(t){var e,n,r,i=t===void 0?Jn:t,s=i.options,o=s===void 0?Jn:s,a=i.plugins,l=a===void 0?qi:a,c=function(p,m,g){return g.startsWith(n)&&g.endsWith(n)&&g.replaceAll(n,"").length>0?".".concat(e):p},f=l.slice();f.push(function(p){p.type===Ui&&p.value.includes("&")&&(p.props[0]=p.props[0].replace(t1,n).replace(r,c))}),o.prefix&&f.push(Rh),f.push(bh);var d=function(p,m,g,w){m===void 0&&(m=""),g===void 0&&(g=""),w===void 0&&(w="&"),e=w,n=m,r=new RegExp("\\".concat(n,"\\b"),"g");var y=p.replace(n1,""),b=vh(g||m?"".concat(g," ").concat(m," { ").concat(y," }"):y);o.namespace&&(b=qu(b,o.namespace));var _=[];return Mi(b,Eh(f.concat(Th(function(E){return _.push(E)})))),_};return d.hash=l.length?l.reduce(function(p,m){return m.name||ur(15),tn(p,m.name)},zu).toString():"",d}var r1=new Wu,ho=Xu(),Xo=C.createContext({shouldForwardProp:void 0,styleSheet:r1,stylis:ho});Xo.Consumer;var i1=C.createContext(void 0);function po(){return C.useContext(Xo)}function Yu(t){var e=C.useState(t.stylisPlugins),n=e[0],r=e[1],i=po().styleSheet,s=C.useMemo(function(){var l=i;return t.sheet?l=t.sheet:t.target&&(l=l.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(l=l.reconstructWithOptions({useCSSOMInjection:!1})),l},[t.disableCSSOMInjection,t.sheet,t.target,i]),o=C.useMemo(function(){return Xu({options:{namespace:t.namespace,prefix:t.enableVendorPrefixes},plugins:n})},[t.enableVendorPrefixes,t.namespace,n]);C.useEffect(function(){oh(n,t.stylisPlugins)||r(t.stylisPlugins)},[t.stylisPlugins]);var a=C.useMemo(function(){return{shouldForwardProp:t.shouldForwardProp,styleSheet:s,stylis:o}},[t.shouldForwardProp,s,o]);return C.createElement(Xo.Provider,{value:a},C.createElement(i1.Provider,{value:o},t.children))}var fl=(function(){function t(e,n){var r=this;this.inject=function(i,s){s===void 0&&(s=ho);var o=r.name+s.hash;i.hasNameForId(r.id,o)||i.insertRules(r.id,o,s(r.rules,o,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=n,qo(this,function(){throw ur(12,String(r.name))})}return t.prototype.getName=function(e){return e===void 0&&(e=ho),this.name+e.hash},t})(),s1=function(t){return t>="A"&&t<="Z"};function dl(t){for(var e="",n=0;n<t.length;n++){var r=t[n];if(n===1&&r==="-"&&t[0]==="-")return t;s1(r)?e+="-"+r.toLowerCase():e+=r}return e.startsWith("ms-")?"-"+e:e}var Zu=function(t){return t==null||t===!1||t===""},Qu=function(t){var e,n,r=[];for(var i in t){var s=t[i];t.hasOwnProperty(i)&&!Zu(s)&&(Array.isArray(s)&&s.isCss||er(s)?r.push("".concat(dl(i),":"),s,";"):tr(s)?r.push.apply(r,Zn(Zn(["".concat(i," {")],Qu(s),!1),["}"],!1)):r.push("".concat(dl(i),": ").concat((e=i,(n=s)==null||typeof n=="boolean"||n===""?"":typeof n!="number"||n===0||e in Sh||e.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function an(t,e,n,r){if(Zu(t))return[];if(Wo(t))return[".".concat(t.styledComponentId)];if(er(t)){if(!er(s=t)||s.prototype&&s.prototype.isReactComponent||!e)return[t];var i=t(e);return process.env.NODE_ENV==="production"||typeof i!="object"||Array.isArray(i)||i instanceof fl||tr(i)||i===null||console.error("".concat(Bu(t)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),an(i,e,n,r)}var s;return t instanceof fl?n?(t.inject(n,r),[t.getName(r)]):[t]:tr(t)?Qu(t):Array.isArray(t)?Array.prototype.concat.apply(qi,t.map(function(o){return an(o,e,n,r)})):[t.toString()]}function o1(t){for(var e=0;e<t.length;e+=1){var n=t[e];if(er(n)&&!Wo(n))return!1}return!0}var a1=Du(Wi),l1=(function(){function t(e,n,r){this.rules=e,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(r===void 0||r.isStatic)&&o1(e),this.componentId=n,this.baseHash=tn(a1,n),this.baseStyle=r,Wu.registerId(n)}return t.prototype.generateAndInjectStyles=function(e,n,r){var i=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,n,r):"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(this.componentId,this.staticRulesId))i=nn(i,this.staticRulesId);else{var s=ll(an(this.rules,e,n,r)),o=uo(tn(this.baseHash,s)>>>0);if(!n.hasNameForId(this.componentId,o)){var a=r(s,".".concat(o),void 0,this.componentId);n.insertRules(this.componentId,o,a)}i=nn(i,o),this.staticRulesId=o}else{for(var l=tn(this.baseHash,r.hash),c="",f=0;f<this.rules.length;f++){var d=this.rules[f];if(typeof d=="string")c+=d,process.env.NODE_ENV!=="production"&&(l=tn(l,d));else if(d){var p=ll(an(d,e,n,r));l=tn(l,p+f),c+=p}}if(c){var m=uo(l>>>0);n.hasNameForId(this.componentId,m)||n.insertRules(this.componentId,m,r(c,".".concat(m),void 0,this.componentId)),i=nn(i,m)}}return i},t})(),Ku=C.createContext(void 0);Ku.Consumer;var vs={},hl=new Set;function c1(t,e,n){var r=Wo(t),i=t,s=!ys(t),o=e.attrs,a=o===void 0?qi:o,l=e.componentId,c=l===void 0?(function(T,v){var S=typeof T!="string"?"sc":rl(T);vs[S]=(vs[S]||0)+1;var M="".concat(S,"-").concat(Ih(Wi+S+vs[S]));return v?"".concat(v,"-").concat(M):M})(e.displayName,e.parentComponentId):l,f=e.displayName,d=f===void 0?(function(T){return ys(T)?"styled.".concat(T):"Styled(".concat(Bu(T),")")})(t):f,p=e.displayName&&e.componentId?"".concat(rl(e.displayName),"-").concat(e.componentId):e.componentId||c,m=r&&i.attrs?i.attrs.concat(a).filter(Boolean):a,g=e.shouldForwardProp;if(r&&i.shouldForwardProp){var w=i.shouldForwardProp;if(e.shouldForwardProp){var y=e.shouldForwardProp;g=function(T,v){return w(T,v)&&y(T,v)}}else g=w}var b=new l1(n,p,r?i.componentStyle:void 0);function _(T,v){return(function(S,M,D){var F=S.attrs,ue=S.componentStyle,fe=S.defaultProps,se=S.foldedComponentIds,Y=S.styledComponentId,Q=S.target,ze=C.useContext(Ku),Oe=po(),Le=S.shouldForwardProp||Oe.shouldForwardProp;process.env.NODE_ENV!=="production"&&C.useDebugValue(Y);var dt=Mh(M,ze,fe)||Jn,Ue=(function(K,U,G){for(var q,J=De(De({},U),{className:void 0,theme:G}),ne=0;ne<K.length;ne+=1){var Re=er(q=K[ne])?q(J):q;for(var P in Re)J[P]=P==="className"?nn(J[P],Re[P]):P==="style"?De(De({},J[P]),Re[P]):Re[P]}return U.className&&(J.className=nn(J.className,U.className)),J})(F,M,dt),A=Ue.as||Q,k={};for(var B in Ue)Ue[B]===void 0||B[0]==="$"||B==="as"||B==="theme"&&Ue.theme===dt||(B==="forwardedAs"?k.as=Ue.forwardedAs:Le&&!Le(B,A)||(k[B]=Ue[B],Le||process.env.NODE_ENV!=="development"||rh(B)||hl.has(B)||!co.has(A)||(hl.add(B),console.warn('styled-components: it looks like an unknown prop "'.concat(B,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var H=(function(K,U){var G=po(),q=K.generateAndInjectStyles(U,G.styleSheet,G.stylis);return process.env.NODE_ENV!=="production"&&C.useDebugValue(q),q})(ue,Ue);process.env.NODE_ENV!=="production"&&S.warnTooManyClasses&&S.warnTooManyClasses(H);var V=nn(se,Y);return H&&(V+=" "+H),Ue.className&&(V+=" "+Ue.className),k[ys(A)&&!co.has(A)?"class":"className"]=V,D&&(k.ref=D),C.createElement(A,k)})(E,T,v)}_.displayName=d;var E=C.forwardRef(_);return E.attrs=m,E.componentStyle=b,E.displayName=d,E.shouldForwardProp=g,E.foldedComponentIds=r?nn(i.foldedComponentIds,i.styledComponentId):"",E.styledComponentId=p,E.target=r?i.target:t,Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(T){this._foldedDefaultProps=r?(function(v){for(var S=[],M=1;M<arguments.length;M++)S[M-1]=arguments[M];for(var D=0,F=S;D<F.length;D++)fo(v,F[D],!0);return v})({},i.defaultProps,T):T}}),process.env.NODE_ENV!=="production"&&(Ah(d,p),E.warnTooManyClasses=(function(T,v){var S={},M=!1;return function(D){if(!M&&(S[D]=!0,Object.keys(S).length>=200)){var F=v?' with the id of "'.concat(v,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(T).concat(F,`.
|
|
604
|
-
`)+`Consider using the attrs method, together with a style object for frequently changed styles.
|
|
605
|
-
Example:
|
|
606
|
-
const Component = styled.div.attrs(props => ({
|
|
607
|
-
style: {
|
|
608
|
-
background: props.background,
|
|
609
|
-
},
|
|
610
|
-
}))\`width: 100%;\`
|
|
611
|
-
|
|
612
|
-
<Component />`),M=!0,S={}}}})(d,p)),qo(E,function(){return".".concat(E.styledComponentId)}),s&&Hu(E,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),E}function pl(t,e){for(var n=[t[0]],r=0,i=e.length;r<i;r+=1)n.push(e[r],t[r+1]);return n}var ml=function(t){return Object.assign(t,{isCss:!0})};function u1(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(er(t)||tr(t))return ml(an(pl(qi,Zn([t],e,!0))));var r=t;return e.length===0&&r.length===1&&typeof r[0]=="string"?an(r):ml(an(pl(r,e)))}function mo(t,e,n){if(n===void 0&&(n=Jn),!e)throw ur(1,e);var r=function(i){for(var s=[],o=1;o<arguments.length;o++)s[o-1]=arguments[o];return t(e,n,u1.apply(void 0,Zn([i],s,!1)))};return r.attrs=function(i){return mo(t,e,De(De({},n),{attrs:Array.prototype.concat(n.attrs,i).filter(Boolean)}))},r.withConfig=function(i){return mo(t,e,De(De({},n),i))},r}var Ju=function(t){return mo(c1,t)},ce=Ju;co.forEach(function(t){ce[t]=Ju(t)});process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
|
|
613
|
-
Perhaps you're looking to import 'styled-components/native'?
|
|
614
|
-
Read more about this at https://www.styled-components.com/docs/basics#react-native`);var ri="__sc-".concat(hn,"__");process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window[ri]||(window[ri]=0),window[ri]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
615
|
-
|
|
616
|
-
See https://s-c.sh/2BAXzed for more info.`),window[ri]+=1);const I={textWhite:"rgba(223, 223, 223, 1)",textGrey:"rgba(156, 156, 156, 1)",dangerRed:"rgba(243, 151, 143, 1)",dangerRedPressed:"rgba(240, 97, 84,1)",panelBackground:"rgba(38, 38, 38, 0.7)",panelBorder:"rgba(61, 61, 63, 0.7)",buttonBackground:"rgba(61, 61, 63, 0.6)",buttonPressed:"rgba(61, 61, 63, 1)",gradientGrey:"linear-gradient(to bottom, #343434, #393939)",gradientGreyTranslucent:"linear-gradient(to bottom, rgba(52, 52, 52, 0.75), rgba(57, 57, 57, 0.75))",gradientLightGreyTranslucent:"linear-gradient(to bottom, rgba(75, 75, 75, 0.75), rgba(80, 80, 80, 0.75))"},N={height:"30px",minWidth:"30px",fontSize:"14px",radiusMiddle:"3px",radiusSolo:"10px",radiusFirst:"10px 3px 3px 10px",radiusLast:"3px 10px 10px 3px",widthLong:"70px",widthShort:"30px",gap:"3px"},Ne=ce.button`
|
|
617
|
-
background: ${I.gradientGreyTranslucent};
|
|
618
|
-
border: none;
|
|
619
|
-
display: flex;
|
|
620
|
-
align-items: center;
|
|
621
|
-
justify-content: center;
|
|
622
|
-
cursor: pointer;
|
|
623
|
-
color: ${I.textWhite};
|
|
624
|
-
border: 1px solid transparent;
|
|
625
|
-
border-radius: ${N.radiusMiddle};
|
|
626
|
-
font-size: ${N.fontSize};
|
|
627
|
-
height: ${N.height};
|
|
628
|
-
min-width: ${N.minWidth};
|
|
629
|
-
transition: all 0.2s ease-in-out;
|
|
630
|
-
text-transform: none;
|
|
631
|
-
box-shadow: none;
|
|
632
|
-
font-family: Arial, sans-serif;
|
|
633
|
-
|
|
634
|
-
&:first-child {
|
|
635
|
-
border-radius: ${({$reverse:t})=>t?N.radiusLast:N.radiusFirst};
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
&:last-child {
|
|
639
|
-
border-radius: ${({$reverse:t})=>t?N.radiusFirst:N.radiusLast};
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
&:first-child:last-child {
|
|
643
|
-
border-radius: ${N.radiusSolo};
|
|
644
|
-
}
|
|
645
|
-
`,xo=ce.div`
|
|
646
|
-
padding: 2px;
|
|
647
|
-
display: flex;
|
|
648
|
-
background-color: ${I.panelBackground};
|
|
649
|
-
border: 1px solid ${I.panelBorder};
|
|
650
|
-
backdrop-filter: blur(40px);
|
|
651
|
-
-webkit-backdrop-filter: blur(40px);
|
|
652
|
-
justify-content: center;
|
|
653
|
-
pointer-events: all;
|
|
654
|
-
border-radius: 14px;
|
|
655
|
-
align-items: center;
|
|
656
|
-
height: 24px;
|
|
657
|
-
`,Ke=ce.button`
|
|
658
|
-
background-color: transparent;
|
|
659
|
-
border: none;
|
|
660
|
-
display: flex;
|
|
661
|
-
align-items: center;
|
|
662
|
-
justify-content: center;
|
|
663
|
-
cursor: pointer;
|
|
664
|
-
color: ${I.textWhite};
|
|
665
|
-
border-radius: 4px;
|
|
666
|
-
font-size: 16px;
|
|
667
|
-
height: 24px;
|
|
668
|
-
min-width: 24px;
|
|
669
|
-
transition: all 0.2s ease-in-out;
|
|
670
|
-
text-transform: none;
|
|
671
|
-
box-shadow: none;
|
|
672
|
-
padding: 1px 5px;
|
|
673
|
-
font-family: Arial, sans-serif;
|
|
674
|
-
|
|
675
|
-
&:hover {
|
|
676
|
-
background-color: ${I.buttonPressed};
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
&:active {
|
|
680
|
-
background-color: ${I.buttonPressed};
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
&:focus {
|
|
684
|
-
outline: none;
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
&:first-child {
|
|
688
|
-
border-radius: 12px 4px 4px 12px;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
&:last-child {
|
|
692
|
-
border-radius: 4px 12px 12px 4px;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
&:first-child:last-child {
|
|
696
|
-
border-radius: 12px;
|
|
697
|
-
}
|
|
698
|
-
`,Tt=ce.div`
|
|
699
|
-
background-color: ${({$pressed:t})=>t?I.buttonPressed:I.buttonBackground};
|
|
700
|
-
border: none;
|
|
701
|
-
display: flex;
|
|
702
|
-
align-items: center;
|
|
703
|
-
justify-content: center;
|
|
704
|
-
color: ${I.textWhite};
|
|
705
|
-
border-radius: 8px;
|
|
706
|
-
font-size: 14px;
|
|
707
|
-
font-family: Arial, sans-serif;
|
|
708
|
-
height: 30px;
|
|
709
|
-
width: 30px;
|
|
710
|
-
transition: all 0.2s ease-in-out;
|
|
711
|
-
`,nr=ce.div`
|
|
712
|
-
display: flex;
|
|
713
|
-
align-items: center;
|
|
714
|
-
height: 30px;
|
|
715
|
-
margin-bottom: 3px;
|
|
716
|
-
justify-content: flex-start;
|
|
717
|
-
flex-direction: ${({$reverse:t})=>t?"row-reverse":"row"};
|
|
718
|
-
|
|
719
|
-
&:last-child {
|
|
720
|
-
margin-bottom: 0;
|
|
721
|
-
}
|
|
722
|
-
`,Gt=ce.div`
|
|
723
|
-
display: flex;
|
|
724
|
-
flex-direction: ${({$reverse:t})=>t?"row-reverse":"row"};
|
|
725
|
-
height: 100%;
|
|
726
|
-
justify-content: space-between;
|
|
727
|
-
align-items: center;
|
|
728
|
-
margin: ${({$reverse:t})=>t?"0 5px 0 0":"0 0 0 5px"};
|
|
729
|
-
gap: 3px;
|
|
730
|
-
`;ce.button`
|
|
731
|
-
background-color: rgba(255, 255, 255, 0.3);
|
|
732
|
-
border: none;
|
|
733
|
-
display: flex;
|
|
734
|
-
justify-content: center;
|
|
735
|
-
align-items: center;
|
|
736
|
-
padding: 0;
|
|
737
|
-
pointer-events: none;
|
|
738
|
-
width: 50px;
|
|
739
|
-
height: 50px;
|
|
740
|
-
border-radius: 50%;
|
|
741
|
-
position: relative;
|
|
742
|
-
margin: 0 5px;
|
|
743
|
-
backdrop-filter: blur(10px);
|
|
744
|
-
-webkit-backdrop-filter: blur(10px);
|
|
745
|
-
`;ce.div`
|
|
746
|
-
position: absolute;
|
|
747
|
-
background-color: ${I.textWhite};
|
|
748
|
-
border-radius: 50%;
|
|
749
|
-
width: 36px;
|
|
750
|
-
height: 36px;
|
|
751
|
-
cursor: pointer;
|
|
752
|
-
pointer-events: auto;
|
|
753
|
-
`;const e0=ce.input.attrs({type:"range"})`
|
|
754
|
-
-webkit-appearance: none;
|
|
755
|
-
appearance: none;
|
|
756
|
-
background: ${I.gradientGreyTranslucent};
|
|
757
|
-
border: none;
|
|
758
|
-
height: 100%;
|
|
759
|
-
width: ${N.widthLong};
|
|
760
|
-
cursor: pointer;
|
|
761
|
-
margin: 0;
|
|
762
|
-
transition: all 0.2s ease-in-out;
|
|
763
|
-
border-radius: ${({$reverse:t})=>t?N.radiusFirst:N.radiusLast};
|
|
764
|
-
|
|
765
|
-
&::-webkit-slider-thumb {
|
|
766
|
-
-webkit-appearance: none;
|
|
767
|
-
appearance: none;
|
|
768
|
-
width: 8px;
|
|
769
|
-
height: 30px;
|
|
770
|
-
background-color: ${I.textWhite};
|
|
771
|
-
border-radius: ${N.radiusMiddle};
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
&::-moz-range-thumb {
|
|
775
|
-
width: 10px;
|
|
776
|
-
height: 30px;
|
|
777
|
-
background-color: ${I.textWhite};
|
|
778
|
-
border-radius: ${N.radiusMiddle};
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
&::-ms-thumb {
|
|
782
|
-
width: 8px;
|
|
783
|
-
height: 24px;
|
|
784
|
-
background-color: ${I.textWhite};
|
|
785
|
-
border-radius: ${N.radiusMiddle};
|
|
786
|
-
}
|
|
787
|
-
`;ce.div`
|
|
788
|
-
display: flex;
|
|
789
|
-
flex-direction: column;
|
|
790
|
-
align-items: ${({$reverse:t})=>t?"flex-start":"flex-end"};
|
|
791
|
-
justify-content: center;
|
|
792
|
-
margin: ${({$reverse:t})=>t?"2px -26px 0 0":"2px 0 0 -26px"};
|
|
793
|
-
`;ce.div`
|
|
794
|
-
display: flex;
|
|
795
|
-
flex-direction: ${({$reverse:t})=>t?"row-reverse":"row"};
|
|
796
|
-
align-items: center;
|
|
797
|
-
justify-content: center;
|
|
798
|
-
`;const re=ce(qr)`
|
|
799
|
-
height: ${({$size:t=14})=>`${t}px`};
|
|
800
|
-
min-height: ${({$size:t=14})=>`${t}px`};
|
|
801
|
-
max-height: ${({$size:t=14})=>`${t}px`};
|
|
802
|
-
width: ${({$size:t=14})=>`${t}px`};
|
|
803
|
-
min-width: ${({$size:t=14})=>`${t}px`};
|
|
804
|
-
max-width: ${({$size:t=14})=>`${t}px`};
|
|
805
|
-
transform: ${({$reverse:t})=>t?"scaleX(-1)":"unset"};
|
|
806
|
-
`,fr=ce(qr)`
|
|
807
|
-
height: 18px;
|
|
808
|
-
min-height: 18px;
|
|
809
|
-
max-height: 18px;
|
|
810
|
-
width: 18px;
|
|
811
|
-
min-width: 18px;
|
|
812
|
-
max-width: 18px;
|
|
813
|
-
margin: 6px;
|
|
814
|
-
transform: ${({$reverse:t})=>t?"scaleX(-1)":"unset"};
|
|
815
|
-
`,Fr=ce.div`
|
|
816
|
-
position: fixed;
|
|
817
|
-
padding: 5px;
|
|
818
|
-
font-family: Arial, sans-serif;
|
|
819
|
-
color: ${I.textWhite};
|
|
820
|
-
pointer-events: all;
|
|
821
|
-
background-color: ${I.panelBackground};
|
|
822
|
-
border: 1px solid ${I.panelBorder};
|
|
823
|
-
backdrop-filter: blur(40px);
|
|
824
|
-
-webkit-backdrop-filter: blur(40px);
|
|
825
|
-
border-radius: 12px;
|
|
826
|
-
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
|
|
827
|
-
overflow: hidden;
|
|
828
|
-
display: flex;
|
|
829
|
-
flex-direction: column;
|
|
830
|
-
`,pn=ce.hr`
|
|
831
|
-
width: ${({$horizontal:t=!0})=>t?"unset":"1px"};
|
|
832
|
-
height: ${({$horizontal:t=!0})=>t?"1px":"unset"};
|
|
833
|
-
background-color: ${I.panelBorder};
|
|
834
|
-
margin: 5px 3px;
|
|
835
|
-
border: none;
|
|
836
|
-
`,ln=ce.button`
|
|
837
|
-
background-color: transparent;
|
|
838
|
-
border: none;
|
|
839
|
-
display: flex;
|
|
840
|
-
align-items: center;
|
|
841
|
-
justify-content: center;
|
|
842
|
-
cursor: pointer;
|
|
843
|
-
color: ${({$isRed:t})=>t?I.dangerRed:I.textWhite};
|
|
844
|
-
font-size: 12px;
|
|
845
|
-
padding: 3px;
|
|
846
|
-
text-transform: none;
|
|
847
|
-
box-shadow: none;
|
|
848
|
-
|
|
849
|
-
&:hover {
|
|
850
|
-
color: ${({$isRed:t})=>t?I.dangerRedPressed:"#ffffff"};
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
&:active {
|
|
854
|
-
color: ${({$isRed:t})=>t?I.dangerRedPressed:"#ffffff"};
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
&:focus {
|
|
858
|
-
outline: none;
|
|
859
|
-
}
|
|
860
|
-
`,t0=ce.div`
|
|
861
|
-
display: flex;
|
|
862
|
-
flex-direction: row;
|
|
863
|
-
gap: ${N.gap};
|
|
864
|
-
height: 25px;
|
|
865
|
-
`,n0=ce.input.attrs({type:"text"})`
|
|
866
|
-
width: 50px;
|
|
867
|
-
outline: none;
|
|
868
|
-
background: ${I.gradientGrey};
|
|
869
|
-
border: 1px solid transparent;
|
|
870
|
-
border-radius: 5px;
|
|
871
|
-
height: 25px;
|
|
872
|
-
color: ${I.textWhite};
|
|
873
|
-
padding: 0 10px 0 5px;
|
|
874
|
-
box-sizing: border-box;
|
|
875
|
-
font-size: 10px;
|
|
876
|
-
|
|
877
|
-
&:read-only {
|
|
878
|
-
background: ${I.gradientGreyTranslucent};
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
&:invalid {
|
|
882
|
-
background-color: ${I.dangerRed};
|
|
883
|
-
}
|
|
884
|
-
`,r0=ce.span`
|
|
885
|
-
position: absolute;
|
|
886
|
-
right: 5px;
|
|
887
|
-
top: 50%;
|
|
888
|
-
transform: translateY(-50%);
|
|
889
|
-
pointer-events: none;
|
|
890
|
-
color: ${I.textGrey};
|
|
891
|
-
font-size: 10px;
|
|
892
|
-
`,f1={prefix:"fas",iconName:"right-from-bracket",icon:[512,512,["sign-out-alt"],"f2f5","M377.9 105.9L500.7 228.7c7.2 7.2 11.3 17.1 11.3 27.3s-4.1 20.1-11.3 27.3L377.9 406.1c-6.4 6.4-15 9.9-24 9.9c-18.7 0-33.9-15.2-33.9-33.9l0-62.1-128 0c-17.7 0-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32l128 0 0-62.1c0-18.7 15.2-33.9 33.9-33.9c9 0 17.6 3.6 24 9.9zM160 96L96 96c-17.7 0-32 14.3-32 32l0 256c0 17.7 14.3 32 32 32l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c-53 0-96-43-96-96L0 128C0 75 43 32 96 32l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32z"]},Yo={prefix:"fas",iconName:"fingerprint",icon:[512,512,[],"f577","M48 256C48 141.1 141.1 48 256 48c63.1 0 119.6 28.1 157.8 72.5c8.6 10.1 23.8 11.2 33.8 2.6s11.2-23.8 2.6-33.8C403.3 34.6 333.7 0 256 0C114.6 0 0 114.6 0 256l0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40zm458.5-52.9c-2.7-13-15.5-21.3-28.4-18.5s-21.3 15.5-18.5 28.4c2.9 13.9 4.5 28.3 4.5 43.1l0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40c0-18.1-1.9-35.8-5.5-52.9zM256 80c-19 0-37.4 3-54.5 8.6c-15.2 5-18.7 23.7-8.3 35.9c7.1 8.3 18.8 10.8 29.4 7.9c10.6-2.9 21.8-4.4 33.4-4.4c70.7 0 128 57.3 128 128l0 24.9c0 25.2-1.5 50.3-4.4 75.3c-1.7 14.6 9.4 27.8 24.2 27.8c11.8 0 21.9-8.6 23.3-20.3c3.3-27.4 5-55 5-82.7l0-24.9c0-97.2-78.8-176-176-176zM150.7 148.7c-9.1-10.6-25.3-11.4-33.9-.4C93.7 178 80 215.4 80 256l0 24.9c0 24.2-2.6 48.4-7.8 71.9C68.8 368.4 80.1 384 96.1 384c10.5 0 19.9-7 22.2-17.3c6.4-28.1 9.7-56.8 9.7-85.8l0-24.9c0-27.2 8.5-52.4 22.9-73.1c7.2-10.4 8-24.6-.2-34.2zM256 160c-53 0-96 43-96 96l0 24.9c0 35.9-4.6 71.5-13.8 106.1c-3.8 14.3 6.7 29 21.5 29c9.5 0 17.9-6.2 20.4-15.4c10.5-39 15.9-79.2 15.9-119.7l0-24.9c0-28.7 23.3-52 52-52s52 23.3 52 52l0 24.9c0 36.3-3.5 72.4-10.4 107.9c-2.7 13.9 7.7 27.2 21.8 27.2c10.2 0 19-7 21-17c7.7-38.8 11.6-78.3 11.6-118.1l0-24.9c0-53-43-96-96-96zm24 96c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 24.9c0 59.9-11 119.3-32.5 175.2l-5.9 15.3c-4.8 12.4 1.4 26.3 13.8 31s26.3-1.4 31-13.8l5.9-15.3C267.9 411.9 280 346.7 280 280.9l0-24.9z"]},d1={prefix:"fas",iconName:"caret-right",icon:[256,512,[],"f0da","M246.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-9.2-9.2-22.9-11.9-34.9-6.9s-19.8 16.6-19.8 29.6l0 256c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l128-128z"]},h1={prefix:"fas",iconName:"caret-left",icon:[256,512,[],"f0d9","M9.4 278.6c-12.5-12.5-12.5-32.8 0-45.3l128-128c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6l0 256c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-128-128z"]},i0={prefix:"fas",iconName:"gamepad",icon:[640,512,[],"f11b","M192 64C86 64 0 150 0 256S86 448 192 448l256 0c106 0 192-86 192-192s-86-192-192-192L192 64zM496 168a40 40 0 1 1 0 80 40 40 0 1 1 0-80zM392 304a40 40 0 1 1 80 0 40 40 0 1 1 -80 0zM168 200c0-13.3 10.7-24 24-24s24 10.7 24 24l0 32 32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0 0 32c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-32-32 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l32 0 0-32z"]},s0={prefix:"fas",iconName:"hand",icon:[512,512,[129306,9995,"hand-paper"],"f256","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-176c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 272c0 1.5 0 3.1 .1 4.6L67.6 283c-16-15.2-41.3-14.6-56.6 1.4s-14.6 41.3 1.4 56.6L124.8 448c43.1 41.1 100.4 64 160 64l19.2 0c97.2 0 176-78.8 176-176l0-208c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-176c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 176c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208z"]},o0={prefix:"fas",iconName:"plug",icon:[384,512,[128268],"f1e6","M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2C297 398 352 333.4 352 256l0-32c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160z"]},p1={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},m1={prefix:"fas",iconName:"arrow-right-to-bracket",icon:[512,512,["sign-in"],"f090","M352 96l64 0c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0c53 0 96-43 96-96l0-256c0-53-43-96-96-96l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm-9.4 182.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L242.7 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128z"]},x1={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l256 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},g1={prefix:"fas",iconName:"rotate-left",icon:[512,512,["rotate-back","rotate-backward","undo-alt"],"f2ea","M48.5 224L40 224c-13.3 0-24-10.7-24-24L16 72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2L98.6 96.6c87.6-86.5 228.7-86.2 315.8 1c87.5 87.5 87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3c-62.2-62.2-162.7-62.5-225.3-1L185 183c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8L48.5 224z"]},y1={prefix:"fas",iconName:"circle-play",icon:[512,512,[61469,"play-circle"],"f144","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z"]},v1={prefix:"fas",iconName:"person-shelter",icon:[512,512,[],"e54f","M271.9 4.2c-9.8-5.6-21.9-5.6-31.8 0l-224 128C6.2 137.9 0 148.5 0 160L0 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.4L256 68.9 448 178.6 448 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-320c0-11.5-6.2-22.1-16.1-27.8l-224-128zM256 208a40 40 0 1 0 0-80 40 40 0 1 0 0 80zm-8 280l0-88 16 0 0 88c0 13.3 10.7 24 24 24s24-10.7 24-24l0-174.5 26.9 49.9c6.3 11.7 20.8 16 32.5 9.8s16-20.8 9.8-32.5l-37.9-70.3c-15.3-28.5-45.1-46.3-77.5-46.3l-19.5 0c-32.4 0-62.1 17.8-77.5 46.3l-37.9 70.3c-6.3 11.7-1.9 26.2 9.8 32.5s26.2 1.9 32.5-9.8L200 313.5 200 488c0 13.3 10.7 24 24 24s24-10.7 24-24z"]},Zo={prefix:"fas",iconName:"hand-scissors",icon:[512,512,[],"f257","M40 208c-22.1 0-40 17.9-40 40s17.9 40 40 40l180.2 0c-7.6 8.5-12.2 19.7-12.2 32c0 25.3 19.5 46 44.3 47.9c-7.7 8.5-12.3 19.8-12.3 32.1c0 26.5 21.5 48 48 48l32 0 64 0c70.7 0 128-57.3 128-128l0-113.1c0-40.2-16-78.8-44.4-107.3C444.8 76.8 413.9 64 381.7 64L336 64c-21.3 0-39.3 13.9-45.6 33.1l74.5 23.7c8.4 2.7 13.1 11.7 10.4 20.1s-11.7 13.1-20.1 10.4L288 129.9c0 0 0 .1 0 .1L84 65.8C62.9 59.2 40.5 70.9 33.8 92s5.1 43.5 26.2 50.2L269.5 208 40 208z"]},w1={prefix:"fas",iconName:"street-view",icon:[512,512,[],"f21d","M320 64A64 64 0 1 0 192 64a64 64 0 1 0 128 0zm-96 96c-35.3 0-64 28.7-64 64l0 48c0 17.7 14.3 32 32 32l1.8 0 11.1 99.5c1.8 16.2 15.5 28.5 31.8 28.5l38.7 0c16.3 0 30-12.3 31.8-28.5L318.2 304l1.8 0c17.7 0 32-14.3 32-32l0-48c0-35.3-28.7-64-64-64l-64 0zM132.3 394.2c13-2.4 21.7-14.9 19.3-27.9s-14.9-21.7-27.9-19.3c-32.4 5.9-60.9 14.2-82 24.8c-10.5 5.3-20.3 11.7-27.8 19.6C6.4 399.5 0 410.5 0 424c0 21.4 15.5 36.1 29.1 45c14.7 9.6 34.3 17.3 56.4 23.4C130.2 504.7 190.4 512 256 512s125.8-7.3 170.4-19.6c22.1-6.1 41.8-13.8 56.4-23.4c13.7-8.9 29.1-23.6 29.1-45c0-13.5-6.4-24.5-14-32.6c-7.5-7.9-17.3-14.3-27.8-19.6c-21-10.6-49.5-18.9-82-24.8c-13-2.4-25.5 6.3-27.9 19.3s6.3 25.5 19.3 27.9c30.2 5.5 53.7 12.8 69 20.5c3.2 1.6 5.8 3.1 7.9 4.5c3.6 2.4 3.6 7.2 0 9.6c-8.8 5.7-23.1 11.8-43 17.3C374.3 457 318.5 464 256 464s-118.3-7-157.7-17.9c-19.9-5.5-34.2-11.6-43-17.3c-3.6-2.4-3.6-7.2 0-9.6c2.1-1.4 4.8-2.9 7.9-4.5c15.3-7.7 38.8-14.9 69-20.5z"]},a0={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"]},b1={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},E1={prefix:"fas",iconName:"delete-left",icon:[576,512,[9003,"backspace"],"f55a","M576 128c0-35.3-28.7-64-64-64L205.3 64c-17 0-33.3 6.7-45.3 18.7L9.4 233.4c-6 6-9.4 14.1-9.4 22.6s3.4 16.6 9.4 22.6L160 429.3c12 12 28.3 18.7 45.3 18.7L512 448c35.3 0 64-28.7 64-64l0-256zM271 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"]},T1={prefix:"fas",iconName:"bug",icon:[512,512,[],"f188","M256 0c53 0 96 43 96 96l0 3.6c0 15.7-12.7 28.4-28.4 28.4l-135.1 0c-15.7 0-28.4-12.7-28.4-28.4l0-3.6c0-53 43-96 96-96zM41.4 105.4c12.5-12.5 32.8-12.5 45.3 0l64 64c.7 .7 1.3 1.4 1.9 2.1c14.2-7.3 30.4-11.4 47.5-11.4l112 0c17.1 0 33.2 4.1 47.5 11.4c.6-.7 1.2-1.4 1.9-2.1l64-64c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-64 64c-.7 .7-1.4 1.3-2.1 1.9c6.2 12 10.1 25.3 11.1 39.5l64.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c0 24.6-5.5 47.8-15.4 68.6c2.2 1.3 4.2 2.9 6 4.8l64 64c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0l-63.1-63.1c-24.5 21.8-55.8 36.2-90.3 39.6L272 240c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 239.2c-34.5-3.4-65.8-17.8-90.3-39.6L86.6 502.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l64-64c1.9-1.9 3.9-3.4 6-4.8C101.5 367.8 96 344.6 96 320l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64.3 0c1.1-14.1 5-27.5 11.1-39.5c-.7-.6-1.4-1.2-2.1-1.9l-64-64c-12.5-12.5-12.5-32.8 0-45.3z"]},xl={prefix:"fas",iconName:"angle-up",icon:[448,512,[8963],"f106","M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z"]},gl={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},Qo={prefix:"fas",iconName:"hand-lizard",icon:[512,512,[],"f258","M0 112C0 85.5 21.5 64 48 64l112 0 80 0 46.5 0c36.8 0 71.2 18 92.1 48.2l113.5 164c13 18.7 19.9 41 19.9 63.8l0 12 0 16 0 48c0 17.7-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32l0-13.8L273.9 352 240 352l-80 0-48 0c-26.5 0-48-21.5-48-48s21.5-48 48-48l48 0 80 0c26.5 0 48-21.5 48-48s-21.5-48-48-48l-80 0L48 160c-26.5 0-48-21.5-48-48z"]},yl={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},R1={prefix:"fas",iconName:"vr-cardboard",icon:[640,512,[],"f729","M576 64L64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l120.4 0c24.2 0 46.4-13.7 57.2-35.4l32-64c8.8-17.5 26.7-28.6 46.3-28.6s37.5 11.1 46.3 28.6l32 64c10.8 21.7 33 35.4 57.2 35.4L576 448c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64zM96 240a64 64 0 1 1 128 0A64 64 0 1 1 96 240zm384-64a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"]},S1={prefix:"fas",iconName:"arrow-turn-down",icon:[384,512,["level-down"],"f149","M32 64C14.3 64 0 49.7 0 32S14.3 0 32 0l96 0c53 0 96 43 96 96l0 306.7 73.4-73.4c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-128 128c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 402.7 160 96c0-17.7-14.3-32-32-32L32 64z"]},Xi={prefix:"fas",iconName:"circle-xmark",icon:[512,512,[61532,"times-circle","xmark-circle"],"f057","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"]},_1={prefix:"fas",iconName:"video",icon:[576,512,["video-camera"],"f03d","M0 128C0 92.7 28.7 64 64 64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM559.1 99.8c10.4 5.6 16.9 16.4 16.9 28.2l0 256c0 11.8-6.5 22.6-16.9 28.2s-23 5-32.9-1.6l-96-64L416 337.1l0-17.1 0-128 0-17.1 14.2-9.5 96-64c9.8-6.5 22.4-7.2 32.9-1.6z"]},W=N.height,A1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M7 13.125a7 7 0 1 0 14 0v1.75a7 7 0 0 1-14 0v-1.75Z",clipRule:"evenodd",style:{fill:"#fff",fillOpacity:1}}),u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.55,d:"M14 19.863a6.738 6.738 0 1 0 0-13.476 6.738 6.738 0 0 0 0 13.476Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M16.529 16.1h-.893l-1.653-2.713-1.68 2.713h-.832l2.074-3.255-1.942-2.992h.875l1.531 2.45 1.54-2.45h.831l-1.933 2.975 2.082 3.272Z",style:{fill:"#fff",fillOpacity:1}})]}),M1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M7 13.125a7 7 0 1 0 14 0v1.75a7 7 0 0 1-14 0v-1.75Z",clipRule:"evenodd",style:{fill:"#fff",fillOpacity:1}}),u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.55,d:"M14 19.863a6.738 6.738 0 1 0 0-13.476 6.738 6.738 0 0 0 0 13.476Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"m14.086 12.924 1.627-3.071h.849l-2.083 3.823V16.1h-.787v-2.389L11.61 9.853h.857l1.619 3.07Z",style:{fill:"#fff",fillOpacity:1}})]}),P1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M7 13.125a7 7 0 1 0 14 0v1.75a7 7 0 0 1-14 0v-1.75Z",clipRule:"evenodd",style:{fill:"#fff",fillOpacity:1}}),u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.55,d:"M14 19.863a6.738 6.738 0 1 0 0-13.476 6.738 6.738 0 0 0 0 13.476Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"m15.975 16.1-.753-1.934h-2.476l-.744 1.934h-.796l2.441-6.274h.709l2.432 6.274h-.813Zm-1.69-4.524a29.052 29.052 0 0 1-.21-.63 5.175 5.175 0 0 0-.087-.306c-.029.117-.06.236-.096.359-.03.116-.061.224-.096.323-.03.1-.056.184-.079.254l-.709 1.89h1.978l-.7-1.89Z",style:{fill:"#fff",fillOpacity:1}})]}),O1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M7 13.125a7 7 0 1 0 14 0v1.75a7 7 0 0 1-14 0v-1.75Z",clipRule:"evenodd",style:{fill:"#fff",fillOpacity:1}}),u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.55,d:"M14 19.863a6.738 6.738 0 1 0 0-13.476 6.738 6.738 0 0 0 0 13.476Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M13.876 9.853c.519 0 .954.05 1.304.148.355.1.62.263.796.49.18.228.271.531.271.91 0 .245-.047.464-.14.656a1.198 1.198 0 0 1-.402.473 1.62 1.62 0 0 1-.648.254v.043c.262.041.499.117.709.228.216.11.385.268.507.473.123.204.184.47.184.796 0 .379-.088.703-.262.971a1.663 1.663 0 0 1-.753.604c-.32.134-.706.201-1.155.201h-2.196V9.853h1.785Zm.157 2.66c.537 0 .905-.085 1.103-.254.198-.175.297-.432.297-.77 0-.344-.122-.59-.367-.735-.24-.152-.624-.228-1.155-.228h-1.033v1.986h1.155Zm-1.155.656v2.266h1.26c.555 0 .94-.108 1.155-.324.216-.216.324-.498.324-.849 0-.221-.05-.414-.149-.577-.093-.163-.254-.289-.481-.376-.222-.093-.525-.14-.91-.14h-1.199Z",style:{fill:"#fff",fillOpacity:1}})]}),k1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.5,d:"M14 19.95a5.95 5.95 0 1 0 0-11.9 5.95 5.95 0 0 0 0 11.9Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M12.642 17.325v-6.247h.787v5.547h2.73v.7h-3.517ZM14.479 6.389a.525.525 0 0 1-.782 0l-2.235-2.495a.525.525 0 0 1 .39-.875h4.47c.454 0 .694.537.391.875L14.478 6.39Z",style:{fill:"#fff",fillOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"m13.045 6.711-1.093-1.22a8.75 8.75 0 1 0 4.24.036L15.11 6.733A7.352 7.352 0 0 1 14 21.35a7.35 7.35 0 0 1-.955-14.639Z",clipRule:"evenodd",style:{fill:"#fff",fillOpacity:1}})]}),I1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.7,d:"M14 19.95a5.95 5.95 0 1 0 0-11.9 5.95 5.95 0 0 0 0 11.9Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M13.938 11.077c.52 0 .945.068 1.278.202.338.128.59.323.752.586.164.262.245.592.245.989 0 .332-.06.61-.183.83-.123.223-.28.4-.473.535a2.61 2.61 0 0 1-.595.306l1.715 2.8h-.919l-1.513-2.581h-1.243v2.58h-.787v-6.247h1.723Zm-.043.683h-.893v2.319h.936c.339 0 .616-.044.832-.132a.956.956 0 0 0 .472-.402c.105-.175.158-.394.158-.656 0-.274-.056-.493-.167-.657a.905.905 0 0 0-.49-.358c-.221-.076-.504-.114-.848-.114ZM14.479 6.389a.525.525 0 0 1-.782 0l-2.235-2.495a.525.525 0 0 1 .39-.875h4.47c.454 0 .694.537.391.875L14.478 6.39Z",style:{fill:"#fff",fillOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"m13.045 6.711-1.093-1.22a8.75 8.75 0 1 0 4.24.036L15.11 6.733A7.352 7.352 0 0 1 14 21.35a7.35 7.35 0 0 1-.955-14.639Z",clipRule:"evenodd",style:{fill:"#fff",fillOpacity:1}})]}),C1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:1.5,d:"M14 22.05a8.05 8.05 0 1 0 0-16.1 8.05 8.05 0 0 0 0 16.1Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.75,d:"M14 19.95a5.95 5.95 0 1 0 0-11.9 5.95 5.95 0 0 0 0 11.9Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M12.642 17.325v-6.248h.787v5.548h2.73v.7h-3.517ZM13.697.611a.525.525 0 0 1 .782 0l2.234 2.495a.525.525 0 0 1-.39.875h-4.47a.525.525 0 0 1-.391-.875L13.697.61Z",style:{fill:"#fff",fillOpacity:1}})]}),L1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:1.5,d:"M14 22.05a8.05 8.05 0 1 0 0-16.1 8.05 8.05 0 0 0 0 16.1Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.75,d:"M14 19.95a5.95 5.95 0 1 0 0-11.9 5.95 5.95 0 0 0 0 11.9Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M12.642 17.325v-6.248h.787v5.548h2.73v.7h-3.517ZM14.479 27.389a.525.525 0 0 1-.782 0l-2.235-2.495a.525.525 0 0 1 .39-.875h4.47c.454 0 .694.537.391.875l-2.235 2.495Z",style:{fill:"#fff",fillOpacity:1}})]}),j1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:1.5,d:"M14 22.05a8.05 8.05 0 1 0 0-16.1 8.05 8.05 0 0 0 0 16.1Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.75,d:"M14 19.95a5.95 5.95 0 1 0 0-11.9 5.95 5.95 0 0 0 0 11.9Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M12.642 17.325v-6.248h.787v5.548h2.73v.7h-3.517ZM.611 14.303a.525.525 0 0 1 0-.782l2.495-2.234a.525.525 0 0 1 .875.39v4.47a.525.525 0 0 1-.875.391L.61 14.303Z",style:{fill:"#fff",fillOpacity:1}})]}),N1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:1.5,d:"M14 22.05a8.05 8.05 0 1 0 0-16.1 8.05 8.05 0 0 0 0 16.1Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.75,d:"M14 19.95a5.95 5.95 0 1 0 0-11.9 5.95 5.95 0 0 0 0 11.9Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M12.642 17.325v-6.248h.787v5.548h2.73v.7h-3.517ZM27.389 13.521a.525.525 0 0 1 0 .782l-2.495 2.235a.525.525 0 0 1-.875-.39v-4.47c0-.454.537-.694.875-.391l2.495 2.234Z",style:{fill:"#fff",fillOpacity:1}})]}),F1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:1.5,d:"M14 22.05a8.05 8.05 0 1 0 0-16.1 8.05 8.05 0 0 0 0 16.1Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.75,d:"M14 19.95a5.95 5.95 0 1 0 0-11.9 5.95 5.95 0 0 0 0 11.9Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M13.938 11.077c.52 0 .945.068 1.278.202.338.128.59.323.752.586.164.262.245.592.245.989 0 .332-.06.61-.183.83-.123.223-.28.4-.473.535a2.61 2.61 0 0 1-.595.306l1.715 2.8h-.919l-1.513-2.581h-1.243v2.58h-.787v-6.247h1.723Zm-.043.683h-.893v2.319h.936c.339 0 .616-.044.832-.132a.956.956 0 0 0 .472-.402c.105-.175.158-.394.158-.656 0-.274-.056-.493-.167-.657a.905.905 0 0 0-.49-.358c-.221-.076-.504-.114-.848-.114ZM13.697.611a.525.525 0 0 1 .782 0l2.234 2.495a.525.525 0 0 1-.39.875h-4.47a.525.525 0 0 1-.391-.875L13.697.61Z",style:{fill:"#fff",fillOpacity:1}})]}),z1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:1.5,d:"M14 22.05a8.05 8.05 0 1 0 0-16.1 8.05 8.05 0 0 0 0 16.1Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.75,d:"M14 19.95a5.95 5.95 0 1 0 0-11.9 5.95 5.95 0 0 0 0 11.9Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M13.938 11.077c.52 0 .945.068 1.278.202.338.128.59.323.752.586.164.262.245.592.245.989 0 .332-.06.61-.183.83-.123.223-.28.4-.473.535a2.61 2.61 0 0 1-.595.306l1.715 2.8h-.919l-1.513-2.581h-1.243v2.58h-.787v-6.247h1.723Zm-.043.683h-.893v2.319h.936c.339 0 .616-.044.832-.132a.956.956 0 0 0 .472-.402c.105-.175.158-.394.158-.656 0-.274-.056-.493-.167-.657a.905.905 0 0 0-.49-.358c-.221-.076-.504-.114-.848-.114ZM14.479 27.389a.525.525 0 0 1-.782 0l-2.235-2.495a.525.525 0 0 1 .39-.875h4.47c.454 0 .694.537.391.875l-2.235 2.495Z",style:{fill:"#fff",fillOpacity:1}})]}),D1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:1.5,d:"M14 22.05a8.05 8.05 0 1 0 0-16.1 8.05 8.05 0 0 0 0 16.1Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.75,d:"M14 19.95a5.95 5.95 0 1 0 0-11.9 5.95 5.95 0 0 0 0 11.9Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M13.938 11.077c.52 0 .945.068 1.278.202.338.128.59.323.752.586.164.262.245.592.245.989 0 .332-.06.61-.183.83-.123.223-.28.4-.473.535a2.61 2.61 0 0 1-.595.306l1.715 2.8h-.919l-1.513-2.581h-1.243v2.58h-.787v-6.247h1.723Zm-.043.683h-.893v2.319h.936c.339 0 .616-.044.832-.132a.956.956 0 0 0 .472-.402c.105-.175.158-.394.158-.656 0-.274-.056-.493-.167-.657a.905.905 0 0 0-.49-.358c-.221-.076-.504-.114-.848-.114ZM.611 14.303a.525.525 0 0 1 0-.782l2.495-2.234a.525.525 0 0 1 .875.39v4.47a.525.525 0 0 1-.875.391L.61 14.303Z",style:{fill:"#fff",fillOpacity:1}})]}),B1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:1.5,d:"M14 22.05a8.05 8.05 0 1 0 0-16.1 8.05 8.05 0 0 0 0 16.1Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.75,d:"M14 19.95a5.95 5.95 0 1 0 0-11.9 5.95 5.95 0 0 0 0 11.9Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M13.938 11.077c.52 0 .945.068 1.278.202.338.128.59.323.752.586.164.262.245.592.245.989 0 .332-.06.61-.183.83-.123.223-.28.4-.473.535a2.61 2.61 0 0 1-.595.306l1.715 2.8h-.919l-1.513-2.581h-1.243v2.58h-.787v-6.247h1.723Zm-.043.683h-.893v2.319h.936c.339 0 .616-.044.832-.132a.956.956 0 0 0 .472-.402c.105-.175.158-.394.158-.656 0-.274-.056-.493-.167-.657a.905.905 0 0 0-.49-.358c-.221-.076-.504-.114-.848-.114ZM27.389 13.521a.525.525 0 0 1 0 .782l-2.495 2.235a.525.525 0 0 1-.875-.39v-4.47c0-.454.537-.694.875-.391l2.495 2.234Z",style:{fill:"#fff",fillOpacity:1}})]}),V1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M7.525 7.875c-2.283 1.22-3.82 3.507-3.82 6.125s1.537 4.904 3.82 6.125C4.405 19.425 2.1 16.948 2.1 14s2.306-5.425 5.425-6.125Z",clipRule:"evenodd",style:{fill:"#fff",fillOpacity:1}}),u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.7,d:"M24.702 10.954a2.187 2.187 0 0 0-2.095-2.817H11.025a5.863 5.863 0 0 0 0 11.726h9.377c.966 0 1.818-.634 2.095-1.56l2.205-7.35Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M10.594 17.15v-6.248h.788v5.548h2.73v.7h-3.518Zm7.13-3.299h2.162v3.063c-.338.11-.68.192-1.024.245a7.837 7.837 0 0 1-1.172.078c-.648 0-1.193-.128-1.637-.385a2.567 2.567 0 0 1-1.015-1.11c-.227-.485-.34-1.057-.34-1.716 0-.653.127-1.219.384-1.697a2.699 2.699 0 0 1 1.103-1.112c.484-.268 1.067-.402 1.75-.402.35 0 .68.032.988.096.315.064.607.155.875.271l-.297.683a4.55 4.55 0 0 0-.753-.254 3.453 3.453 0 0 0-.857-.105c-.496 0-.922.102-1.278.306a2.004 2.004 0 0 0-.813.875c-.187.374-.28.82-.28 1.34 0 .495.078.935.236 1.32.163.38.417.677.761.893.344.21.796.315 1.356.315.187 0 .35-.006.49-.018.146-.017.277-.037.394-.06.123-.024.236-.047.341-.07V14.55h-1.373v-.7Z",style:{fill:"#fff",fillOpacity:1}})]}),U1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M20.441 7.875c2.283 1.22 3.82 3.507 3.82 6.125s-1.537 4.904-3.82 6.125c3.12-.7 5.425-3.177 5.425-6.125s-2.305-5.425-5.425-6.125Z",clipRule:"evenodd",style:{fill:"#fff",fillOpacity:1}}),u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.7,d:"M3.264 10.954a2.187 2.187 0 0 1 2.095-2.817h11.582a5.862 5.862 0 0 1 0 11.726H7.564a2.188 2.188 0 0 1-2.095-1.56l-2.205-7.35Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M9.497 10.902c.519 0 .945.068 1.277.202.339.128.59.323.753.586.163.262.245.592.245.989 0 .332-.062.61-.184.83-.122.223-.28.4-.472.535-.187.128-.386.23-.595.306l1.714 2.8h-.918l-1.514-2.581H8.56v2.58h-.787v-6.247h1.724Zm-.044.683H8.56v2.319h.937c.338 0 .615-.044.831-.132a.956.956 0 0 0 .473-.402c.104-.175.157-.394.157-.656 0-.274-.055-.493-.166-.657a.905.905 0 0 0-.49-.358c-.222-.076-.505-.114-.849-.114Zm6.476 2.266h2.16v3.063c-.337.11-.679.192-1.023.245a7.837 7.837 0 0 1-1.172.078c-.648 0-1.193-.128-1.637-.385a2.568 2.568 0 0 1-1.015-1.11c-.227-.485-.34-1.057-.34-1.716 0-.653.127-1.219.384-1.697a2.699 2.699 0 0 1 1.103-1.112c.484-.268 1.067-.402 1.75-.402.35 0 .68.032.988.096.315.064.607.155.875.271l-.297.683a4.551 4.551 0 0 0-.753-.254 3.453 3.453 0 0 0-.857-.105c-.496 0-.922.102-1.278.306a2.004 2.004 0 0 0-.813.875c-.187.374-.28.82-.28 1.34 0 .495.078.935.236 1.32.163.38.417.677.761.893.344.21.796.315 1.356.315.187 0 .35-.006.49-.018a5.17 5.17 0 0 0 .394-.06c.123-.024.236-.047.341-.07V14.55H15.93v-.7Z",style:{fill:"#fff",fillOpacity:1}})]}),G1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.7,d:"M14 20.212a7.612 7.612 0 1 0 0-15.224 7.612 7.612 0 0 0 0 15.224Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M10.209 15.662V9.415h.787v5.548h2.73v.7H10.21Zm6.395 0h-.787v-5.556h-1.952v-.691h4.682v.691h-1.943v5.556Z",style:{fill:"#fff",fillOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M21.235 17.5a8.31 8.31 0 0 1-7.205 4.165A8.31 8.31 0 0 1 6.825 17.5c.823 3.4 3.737 5.915 7.205 5.915 3.469 0 6.382-2.514 7.205-5.915Z",clipRule:"evenodd",style:{fill:"#fff",fillOpacity:1}})]}),H1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{stroke:"#fff",strokeWidth:.7,d:"M14 20.212a7.612 7.612 0 1 0 0-15.224 7.612 7.612 0 0 0 0 15.224Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M11.42 9.415c.52 0 .945.067 1.277.201.339.129.59.324.753.587.163.262.245.592.245.988 0 .333-.061.61-.184.832-.122.221-.28.4-.472.533-.187.129-.385.23-.595.307l1.715 2.8h-.92l-1.513-2.582h-1.242v2.582h-.788V9.415h1.724Zm-.044.683h-.892v2.318h.936c.338 0 .615-.043.831-.131a.956.956 0 0 0 .473-.402c.105-.175.157-.394.157-.657 0-.274-.055-.493-.166-.656a.905.905 0 0 0-.49-.359c-.222-.075-.505-.114-.849-.114Zm5.74 5.564h-.787v-5.556h-1.951v-.691h4.681v.691h-1.942v5.556Z",style:{fill:"#fff",fillOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M21.235 17.5a8.31 8.31 0 0 1-7.205 4.165A8.31 8.31 0 0 1 6.825 17.5c.823 3.4 3.737 5.915 7.205 5.915 3.469 0 6.382-2.514 7.205-5.915Z",clipRule:"evenodd",style:{fill:"#fff",fillOpacity:1}})]}),$1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{stroke:"#fff",d:"m20.01 15.768-4.242 4.242a5.5 5.5 0 1 1-7.778-7.778l4.242-4.242a5.5 5.5 0 1 1 7.778 7.778Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M11.172 16.828a1 1 0 0 0 1.414 0L15.414 14l.707.707-2.828 2.828a2 2 0 1 1-2.829-2.828l.708.707a1 1 0 0 0 0 1.414ZM12.586 14l2.828-2.829a1 1 0 1 1 1.414 1.415l.708.707a2 2 0 0 0-2.829-2.829l-2.828 2.829.707.707Z",clipRule:"evenodd",style:{fill:"#fff",fillOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M15.414 16.828 18.243 14a3 3 0 0 0-2.289-5.117l-.869-.869a4 4 0 0 1 3.864 6.693l-2.828 2.828-.707-.707Zm-.707 2.122a4 4 0 1 1-5.657-5.657l4.243-4.243.707.707L9.757 14A3 3 0 1 0 14 18.242l.707.708Z",clipRule:"evenodd",style:{fill:"#fff",fillOpacity:1}})]}),W1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:W,height:W,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("path",{stroke:"#fff",d:"m15.768 7.99 4.242 4.242a5.5 5.5 0 1 1-7.778 7.778L7.99 15.768a5.5 5.5 0 1 1 7.778-7.778Z",style:{stroke:"#fff",strokeOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M16.828 16.828a1 1 0 0 0 0-1.414L14 12.586l.707-.707 2.828 2.828a2 2 0 1 1-2.828 2.828l.707-.707a1 1 0 0 0 1.414 0ZM14 15.414l-2.828-2.828a1 1 0 0 1 1.414-1.414l.707-.708a2 2 0 0 0-2.829 2.829l2.829 2.828.707-.707Z",clipRule:"evenodd",style:{fill:"#fff",fillOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M16.828 12.586 14 9.757a3 3 0 0 0-5.117 2.289l-.869.869a4 4 0 0 1 6.693-3.864l2.828 2.828-.707.707Zm2.122.707a4 4 0 1 1-5.657 5.657L9.05 14.707 9.757 14 14 18.243A3 3 0 1 0 18.243 14l.707-.707Z",clipRule:"evenodd",style:{fill:"#fff",fillOpacity:1}})]}),q1=()=>u.jsxRuntimeExports.jsx(fr,{icon:Zo,$reverse:!0}),X1=()=>u.jsxRuntimeExports.jsx(fr,{icon:Zo,$reverse:!1}),Y1=()=>u.jsxRuntimeExports.jsx(fr,{icon:Qo,$reverse:!0}),Z1=()=>u.jsxRuntimeExports.jsx(fr,{icon:Qo,$reverse:!1}),Q1={"x-button-left":A1,"y-button-left":M1,"a-button-right":P1,"b-button-right":O1,"thumbstick-left":k1,"thumbstick-up-left":C1,"thumbstick-down-left":L1,"thumbstick-right-left":N1,"thumbstick-left-left":j1,"pose-left":q1,"pinch-left":Y1,"thumbstick-right":I1,"thumbstick-up-right":F1,"thumbstick-down-right":z1,"thumbstick-right-right":B1,"thumbstick-left-right":D1,"trigger-left":G1,"trigger-right":H1,"squeeze-left":V1,"squeeze-right":U1,"thumbrest-left":$1,"thumbrest-right":W1,"pose-right":X1,"pinch-right":Z1},zr=({buttonName:t,handedness:e})=>{const n=`${t}-${e}`,r=Q1[n];return r?u.jsxRuntimeExports.jsx(r,{}):u.jsxRuntimeExports.jsx("div",{style:{width:N.height,height:N.height}})},K1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:16,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("g",{clipPath:"url(#a)",children:u.jsxRuntimeExports.jsx("path",{stroke:"#fff",d:"M.5 6.5H6m-5.5 0V5C.5 2.237 2.237.5 5 .5h1m-5.5 6V11c0 2.762 1.737 4.5 4.5 4.5h2c2.762 0 4.5-1.738 4.5-4.5V6.5M6 6.5v-6m0 6h5.5M6 .5h1c2.762 0 4.5 1.737 4.5 4.5v1.5",style:{stroke:"#fff",strokeOpacity:1}})}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M.5 6.5H6v-6H5C2.237.5.5 2.237.5 5v1.5Z",style:{fill:"#fff",fillOpacity:1}}),u.jsxRuntimeExports.jsx("defs",{children:u.jsxRuntimeExports.jsx("clipPath",{id:"a",children:u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h12v16H0z",style:{fill:"#fff",fillOpacity:1}})})})]}),J1=({scale:t=1.2})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:16,fill:"none",transform:`scale(${t}, ${t})`,children:[u.jsxRuntimeExports.jsx("g",{clipPath:"url(#a)",children:u.jsxRuntimeExports.jsx("path",{stroke:"#fff",d:"M.5 6.5H6m-5.5 0V5C.5 2.237 2.237.5 5 .5h1m-5.5 6V11c0 2.762 1.737 4.5 4.5 4.5h2c2.762 0 4.5-1.738 4.5-4.5V6.5M6 6.5v-6m0 6h5.5M6 .5h1c2.762 0 4.5 1.737 4.5 4.5v1.5",style:{stroke:"#fff",strokeOpacity:1}})}),u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M11.5 6.5H6v-6h1c2.762 0 4.5 1.737 4.5 4.5v1.5Z",style:{fill:"#fff",fillOpacity:1}}),u.jsxRuntimeExports.jsx("defs",{children:u.jsxRuntimeExports.jsx("clipPath",{id:"a",children:u.jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h12v16H0z",style:{fill:"#fff",fillOpacity:1}})})})]}),ep=({size:t=14,color:e=I.textWhite})=>u.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 14 14",fill:"none",children:u.jsxRuntimeExports.jsx("path",{stroke:e,strokeWidth:1.5,d:"M7 13.037V5.512m-.324.289 6.3-2.275m-11.952 0 6.3 2.275m.23 6.937 4.233-1.528a1.627 1.627 0 0 0 1.076-1.53V4.396c0-.685-.43-1.297-1.076-1.53L7.553 1.339a1.63 1.63 0 0 0-1.106 0L2.213 2.867a1.627 1.627 0 0 0-1.075 1.53V9.68c0 .686.43 1.298 1.075 1.53l4.234 1.529a1.63 1.63 0 0 0 1.106 0Z",style:{stroke:e,strokeOpacity:1}})}),tp=({size:t=14,color:e=I.textWhite})=>u.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 14 14",fill:"none",children:u.jsxRuntimeExports.jsx("path",{stroke:e,strokeWidth:1.2,d:"M7 13.037V5.512M3.937 11.9V4.375m6.126 7.525V4.375M6.675 5.8l6.3-2.275m-9.275.962 6.3-2.275M1.024 3.526l6.3 2.275M6.85 9.388l6.3-2.275m-12.302 0 6.3 2.276m-3.15-7.176 6.3 2.276m-2.746 8.248 4.234-1.527a1.627 1.627 0 0 0 1.075-1.53V4.396c0-.685-.43-1.297-1.075-1.53L7.553 1.339a1.63 1.63 0 0 0-1.106 0L2.213 2.867a1.627 1.627 0 0 0-1.076 1.53V9.68c0 .686.43 1.298 1.076 1.53l4.234 1.529a1.63 1.63 0 0 0 1.106 0Z",style:{stroke:e,strokeOpacity:1}})}),np=({size:t=14,color:e=I.textWhite})=>u.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 14 14",fill:"none",children:u.jsxRuntimeExports.jsx("path",{stroke:e,strokeWidth:1.2,d:"M1.225 8.225h11.55M2.1 5.075h9.8m-7 7L5.6 2.1m3.5 9.975L8.4 2.1m-5.708 9.712h8.617a1.75 1.75 0 0 0 1.696-2.183l-1.567-6.125a1.75 1.75 0 0 0-1.695-1.317H4.258c-.8 0-1.498.542-1.696 1.317L.996 9.629a1.75 1.75 0 0 0 1.696 2.183Z",style:{stroke:e,strokeOpacity:1}})}),go=({size:t=14,color:e=I.textWhite})=>u.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 14 14",fill:"none",children:[u.jsxRuntimeExports.jsx("path",{fill:e,d:"M10.5 8.367a1.4 1.4 0 1 0 0-2.8 1.4 1.4 0 0 0 0 2.8Z",style:{fill:e,fillOpacity:1}}),u.jsxRuntimeExports.jsx("path",{fill:e,fillRule:"evenodd",d:"M0 5.8A2.8 2.8 0 0 1 2.8 3h8.4A2.8 2.8 0 0 1 14 5.8v2.8a2.8 2.8 0 0 1-2.8 2.8H9.526c-.619 0-1.184-.35-1.46-.903l-.108-.214a.933.933 0 0 0-.835-.516h-.246c-.354 0-.677.2-.835.516l-.107.214a1.633 1.633 0 0 1-1.461.903H2.8A2.8 2.8 0 0 1 0 8.6V5.8Zm4.9 1.167a1.4 1.4 0 1 1-2.8 0 1.4 1.4 0 0 1 2.8 0Zm8.367-.768a.268.268 0 0 0 .076-.292 2.942 2.942 0 0 0-.187-.407l-.055-.096a3.012 3.012 0 0 0-.262-.37.27.27 0 0 0-.29-.08l-.66.21a2.279 2.279 0 0 0-.522-.302l-.148-.676a.268.268 0 0 0-.215-.211 3.062 3.062 0 0 0-1.008.001.268.268 0 0 0-.215.21l-.148.677a2.28 2.28 0 0 0-.522.301l-.66-.21a.268.268 0 0 0-.29.081c-.096.116-.184.24-.262.37l-.056.096c-.072.13-.135.265-.187.406a.268.268 0 0 0 .076.292l.513.467a2.293 2.293 0 0 0 0 .603l-.513.467a.268.268 0 0 0-.076.291c.052.141.115.276.187.407l.056.096c.078.13.166.253.262.37a.27.27 0 0 0 .29.08l.66-.211c.158.122.333.224.52.3l.149.677a.268.268 0 0 0 .215.211 3.06 3.06 0 0 0 1.007 0 .268.268 0 0 0 .216-.21l.148-.677a2.28 2.28 0 0 0 .521-.301l.66.21c.105.033.22.004.29-.08.097-.117.184-.24.263-.37l.055-.097c.073-.13.135-.265.188-.406a.268.268 0 0 0-.076-.292l-.513-.466a2.299 2.299 0 0 0 0-.602l.513-.467Z",clipRule:"evenodd",style:{fill:e,fillOpacity:1}})]}),st={KeyA:"A",KeyB:"B",KeyC:"C",KeyD:"D",KeyE:"E",KeyF:"F",KeyG:"G",KeyH:"H",KeyI:"I",KeyJ:"J",KeyK:"K",KeyL:"L",KeyM:"M",KeyN:"N",KeyO:"O",KeyP:"P",KeyQ:"Q",KeyR:"R",KeyS:"S",KeyT:"T",KeyU:"U",KeyV:"V",KeyW:"W",KeyX:"X",KeyY:"Y",KeyZ:"Z",Digit0:"0",Digit1:"1",Digit2:"2",Digit3:"3",Digit4:"4",Digit5:"5",Digit6:"6",Digit7:"7",Digit8:"8",Digit9:"9",Tab:u.jsxRuntimeExports.jsx(re,{icon:m1}),Backspace:u.jsxRuntimeExports.jsx(re,{icon:E1}),Enter:u.jsxRuntimeExports.jsx(re,{style:{transform:"rotate(90deg)"},icon:S1}),ShiftLeft:u.jsxRuntimeExports.jsx(re,{icon:xl}),ShiftRight:u.jsxRuntimeExports.jsx(re,{icon:xl}),Space:" ",ArrowUp:u.jsxRuntimeExports.jsx(re,{icon:x1}),ArrowDown:u.jsxRuntimeExports.jsx(re,{icon:b1}),ArrowLeft:u.jsxRuntimeExports.jsx(re,{icon:h1}),ArrowRight:u.jsxRuntimeExports.jsx(re,{icon:d1}),Semicolon:";",Equal:"=",Comma:",",Minus:"-",Period:".",Slash:"/",Backquote:"`",BracketLeft:"[",Backslash:"\\",BracketRight:"]",Quote:"'",MouseLeft:u.jsxRuntimeExports.jsx(K1,{}),MouseRight:u.jsxRuntimeExports.jsx(J1,{})},rp={left:{"thumbstick-up":"KeyW","thumbstick-down":"KeyS","thumbstick-left":"KeyA","thumbstick-right":"KeyD",thumbstick:"KeyR","x-button":"KeyX","y-button":"KeyZ",trigger:"KeyQ",squeeze:"KeyE",pinch:"MouseLeft",pose:"KeyF"},right:{"thumbstick-up":"ArrowUp","thumbstick-down":"ArrowDown","thumbstick-left":"ArrowLeft","thumbstick-right":"ArrowRight",thumbstick:"Slash","a-button":"Enter","b-button":"ShiftRight",trigger:"MouseLeft",squeeze:"MouseRight",pinch:"MouseRight",pose:"Backslash"}},Ko=u.create(t=>({keyMap:rp,bindKey:(e,n,r="Unmapped")=>t(i=>({keyMap:{...i.keyMap,[e]:{...i.keyMap[e],[n]:r}}}))})),ip=ce.div`
|
|
893
|
-
display: flex;
|
|
894
|
-
height: ${N.height};
|
|
895
|
-
align-items: center;
|
|
896
|
-
justify-content: space-between;
|
|
897
|
-
margin-bottom: ${N.gap};
|
|
898
|
-
|
|
899
|
-
&:last-child {
|
|
900
|
-
margin-bottom: 0;
|
|
901
|
-
}
|
|
902
|
-
`,l0=({handedness:t,actions:e})=>{const{keyMap:n,bindKey:r}=Ko(),[i,s]=C.useState(null),o=a=>{s({action:a})};return C.useEffect(()=>{const a=f=>{i&&st[f.code]&&(r(t,i.action,f.code),s(null))},l=f=>{if(i){const d=f.button===0?"MouseLeft":f.button===2?"MouseRight":null;d&&st[d]&&(r(t,i.action,d),s(null))}},c=f=>{f.preventDefault()};return window.addEventListener("keydown",a),window.addEventListener("mousedown",l),window.addEventListener("contextmenu",c),()=>{window.removeEventListener("keydown",a),window.removeEventListener("mousedown",l),window.removeEventListener("contextmenu",c)}},[i]),Object.keys(n[t]).filter(a=>e.includes(a)).map(a=>u.jsxRuntimeExports.jsxs(ip,{children:[u.jsxRuntimeExports.jsx(zr,{buttonName:a==="up"?"thumbstick":a,handedness:t}),u.jsxRuntimeExports.jsxs(Gt,{$reverse:!1,children:[u.jsxRuntimeExports.jsx(Ne,{$reverse:!1,style:{width:"100px",background:i&&i.action===a?I.gradientLightGreyTranslucent:I.gradientGreyTranslucent},onClick:()=>o(a),onContextMenu:l=>l.preventDefault(),children:n[t][a]}),u.jsxRuntimeExports.jsx(Ne,{style:{width:N.widthShort},$reverse:!1,onClick:()=>r(t,a),onContextMenu:l=>l.preventDefault(),children:u.jsxRuntimeExports.jsx(qr,{icon:p1})})]})]},a))},sp=({xrController:t,buttonId:e,pointerLocked:n,mappedKey:r})=>{const[i,s]=C.useState(!1),[o,a]=C.useState(!1),[l,c]=C.useState(!1),[f,d]=C.useState(0),p=t.inputSource.handedness;return C.useEffect(()=>{const m=b=>{b.code===r&&(t.updateButtonValue(e,1),c(!0))},g=b=>{b.code===r&&(t.updateButtonValue(e,0),c(!1))},w=b=>{(r==="MouseLeft"&&b.button===0||r==="MouseRight"&&b.button===2)&&(t.updateButtonValue(e,1),c(!0))},y=b=>{(r==="MouseLeft"&&b.button===0||r==="MouseRight"&&b.button===2)&&(t.updateButtonValue(e,0),c(!1))};return n?r==="MouseLeft"||r==="MouseRight"?(window.addEventListener("mousedown",w),window.addEventListener("mouseup",y)):(window.addEventListener("keydown",m),window.addEventListener("keyup",g)):r==="MouseLeft"||r==="MouseRight"?(window.removeEventListener("mousedown",w),window.removeEventListener("mouseup",y)):(window.removeEventListener("keydown",m),window.removeEventListener("keyup",g)),()=>{r==="MouseLeft"||r==="MouseRight"?(window.removeEventListener("mousedown",w),window.removeEventListener("mouseup",y)):(window.removeEventListener("keydown",m),window.removeEventListener("keyup",g))}},[r,n,e,t]),u.jsxRuntimeExports.jsxs(nr,{$reverse:p==="right",children:[u.jsxRuntimeExports.jsx(zr,{buttonName:e,handedness:p}),u.jsxRuntimeExports.jsx(Gt,{$reverse:p==="right",children:n?u.jsxRuntimeExports.jsx(Tt,{$pressed:l,children:st[r]}):u.jsxRuntimeExports.jsxs(u.jsxRuntimeExports.Fragment,{children:[u.jsxRuntimeExports.jsx(Ne,{$reverse:p==="right",style:{background:o?I.gradientLightGreyTranslucent:I.gradientGreyTranslucent,width:N.widthLong},onClick:()=>{a(!0),t.updateButtonValue(e,1),setTimeout(()=>{a(!1),t.updateButtonValue(e,0)},250)},children:"Press"}),u.jsxRuntimeExports.jsx(Ne,{title:"Click to toggle touch state",$reverse:p==="right",style:{background:i?I.gradientLightGreyTranslucent:I.gradientGreyTranslucent,width:N.widthShort},onClick:()=>{s(!i),t.updateButtonTouch(e,!i)},children:u.jsxRuntimeExports.jsx(re,{icon:Yo})}),u.jsxRuntimeExports.jsx(e0,{$reverse:p==="right",value:f,onChange:m=>{const g=Number(m.target.value);d(g),t.updateButtonValue(e,g/100)},min:"0",max:"100"})]})})]})},op=({xrController:t,buttonId:e,pointerLocked:n,mappedKey:r})=>{const[i,s]=C.useState(!1),[o,a]=C.useState(!1),[l,c]=C.useState(!1),[f,d]=C.useState(!1),p=t.inputSource.handedness;return C.useEffect(()=>{const m=w=>{w.code===r&&(t.updateButtonValue(e,1),d(!0))},g=w=>{w.code===r&&(t.updateButtonValue(e,0),d(!1))};return n?(window.addEventListener("keydown",m),window.addEventListener("keyup",g)):(window.removeEventListener("keydown",m),window.removeEventListener("keyup",g)),()=>{window.removeEventListener("keydown",m),window.removeEventListener("keyup",g)}},[r,n,e,t]),u.jsxRuntimeExports.jsxs(nr,{$reverse:p==="right",children:[u.jsxRuntimeExports.jsx(zr,{buttonName:e,handedness:p}),u.jsxRuntimeExports.jsx(Gt,{$reverse:p==="right",children:n?u.jsxRuntimeExports.jsx(Tt,{$pressed:f,children:st[r]}):u.jsxRuntimeExports.jsxs(u.jsxRuntimeExports.Fragment,{children:[u.jsxRuntimeExports.jsx(Ne,{$reverse:p==="right",style:{background:l?I.gradientLightGreyTranslucent:I.gradientGreyTranslucent,width:N.widthLong},onClick:()=>{c(!0),t.updateButtonValue(e,1),setTimeout(()=>{c(!1),t.updateButtonValue(e,0)},250)},children:"Press"}),u.jsxRuntimeExports.jsx(Ne,{title:"Click to toggle touch state",$reverse:p==="right",style:{background:i?I.gradientLightGreyTranslucent:I.gradientGreyTranslucent,width:N.widthShort},onClick:()=>{s(!i),t.updateButtonTouch(e,!i)},children:u.jsxRuntimeExports.jsx(re,{icon:Yo})}),u.jsxRuntimeExports.jsx(Ne,{$reverse:p==="right",style:{background:o?I.gradientLightGreyTranslucent:I.gradientGreyTranslucent,width:N.widthLong},onClick:()=>{a(!o),t.updateButtonValue(e,o?0:1)},children:"Hold"})]})})]})},ap=ce.div`
|
|
903
|
-
display: flex;
|
|
904
|
-
align-items: center;
|
|
905
|
-
margin-bottom: ${N.gap};
|
|
906
|
-
`,vl=`calc(2 * ${N.height} + ${N.gap})`,lp=ce.button`
|
|
907
|
-
background: ${I.gradientGreyTranslucent};
|
|
908
|
-
border: none;
|
|
909
|
-
display: flex;
|
|
910
|
-
justify-content: center;
|
|
911
|
-
align-items: center;
|
|
912
|
-
padding: 0;
|
|
913
|
-
pointer-events: none;
|
|
914
|
-
width: ${vl};
|
|
915
|
-
height: ${vl};
|
|
916
|
-
border-radius: 50%;
|
|
917
|
-
position: relative;
|
|
918
|
-
margin: 0 5px;
|
|
919
|
-
`,cp=ce.div`
|
|
920
|
-
position: absolute;
|
|
921
|
-
font-size: 50px;
|
|
922
|
-
display: flex;
|
|
923
|
-
align-items: center;
|
|
924
|
-
justify-content: center;
|
|
925
|
-
color: ${I.textWhite};
|
|
926
|
-
cursor: pointer;
|
|
927
|
-
pointer-events: auto;
|
|
928
|
-
`,wl=ce(Ne)`
|
|
929
|
-
width: ${N.widthLong};
|
|
930
|
-
font-size: ${N.fontSize};
|
|
931
|
-
|
|
932
|
-
${({$reverse:t})=>t?`
|
|
933
|
-
&:first-child {
|
|
934
|
-
border-radius: ${N.radiusLast};
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
&:last-child {
|
|
938
|
-
border-radius: ${N.radiusFirst};
|
|
939
|
-
}
|
|
940
|
-
`:`
|
|
941
|
-
&:first-child {
|
|
942
|
-
border-radius: ${N.radiusFirst};
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
&:last-child {
|
|
946
|
-
border-radius: ${N.radiusLast};
|
|
947
|
-
}
|
|
948
|
-
`}
|
|
949
|
-
`,up=({xrController:t,pointerLocked:e,buttonId:n,mappedKeyUp:r,mappedKeyDown:i,mappedKeyLeft:s,mappedKeyRight:o,mappedKeyPressed:a})=>{const l=C.useRef(null),[c,f]=C.useState(!1),[d,p]=C.useState(!1),[m,g]=C.useState(!1),[w,y]=C.useState(!1),[b,_]=C.useState({x:0,y:0}),[E,T]=C.useState({up:!1,down:!1,left:!1,right:!1,pressed:!1}),v=t.inputSource.handedness,S=()=>{if(l.current){const F=l.current.getBoundingClientRect();_({x:F.left+F.width/2,y:F.top+F.height/2}),f(!0)}},M=F=>{if(c&&l.current){const ue=F.clientX-b.x,fe=F.clientY-b.y,se=Math.sqrt(ue*ue+fe*fe),Y=12;let Q,ze;if(se<Y)Q=ue,ze=fe;else{const dt=Math.atan2(fe,ue);Q=Math.cos(dt)*Y,ze=Math.sin(dt)*Y}l.current.style.transform=`translate(${Q}px, ${ze}px)`;const Oe=Q/Y,Le=ze/Y;t.updateAxes(n,Oe,Le)}},D=()=>{f(!1),l.current&&(l.current.style.transform="translate(0, 0)",t.updateAxes(n,0,0))};return C.useEffect(()=>{const F=se=>{const Y={...E};se.code===r&&(Y.up=!0),se.code===i&&(Y.down=!0),se.code===s&&(Y.left=!0),se.code===o&&(Y.right=!0),se.code===a&&(Y.pressed=!0,t.updateButtonValue(n,1)),T(Y),fe(Y)},ue=se=>{const Y={...E};se.code===r&&(Y.up=!1),se.code===i&&(Y.down=!1),se.code===s&&(Y.left=!1),se.code===o&&(Y.right=!1),se.code===a&&(Y.pressed=!1,t.updateButtonValue(n,0)),T(Y),fe(Y)},fe=se=>{const Y=(se.right?1:0)-(se.left?1:0),Q=(se.down?1:0)-(se.up?1:0),ze=Math.sqrt(Y*Y+Q*Q);if(ze===0){t.updateAxes(n,0,0);return}const Oe=Y/ze,Le=Q/ze;t.updateAxes(n,Oe,Le)};return e?(window.addEventListener("keydown",F),window.addEventListener("keyup",ue)):(window.removeEventListener("keydown",F),window.removeEventListener("keyup",ue)),()=>{window.removeEventListener("keydown",F),window.removeEventListener("keyup",ue)}},[r,i,s,o,e,E]),C.useEffect(()=>(document.addEventListener("mousemove",M),document.addEventListener("mouseup",D),()=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",D)}),[c,b]),e?u.jsxRuntimeExports.jsxs(u.jsxRuntimeExports.Fragment,{children:[u.jsxRuntimeExports.jsxs(nr,{$reverse:v==="right",children:[u.jsxRuntimeExports.jsx(zr,{buttonName:"thumbstick",handedness:t.inputSource.handedness}),u.jsxRuntimeExports.jsxs(Gt,{$reverse:v==="right",children:[u.jsxRuntimeExports.jsx(Tt,{$pressed:E.up,children:st[r]}),u.jsxRuntimeExports.jsx(Tt,{$pressed:E.pressed,children:st[a]})]})]}),u.jsxRuntimeExports.jsx(nr,{$reverse:v==="right",style:v==="right"?{marginRight:"2px"}:{marginLeft:"2px"},children:u.jsxRuntimeExports.jsxs(Gt,{$reverse:!1,style:{margin:0},children:[u.jsxRuntimeExports.jsx(Tt,{$pressed:E.left,children:st[s]}),u.jsxRuntimeExports.jsx(Tt,{$pressed:E.down,children:st[i]}),u.jsxRuntimeExports.jsx(Tt,{$pressed:E.right,children:st[o]})]})})]}):u.jsxRuntimeExports.jsx(ap,{style:{flexDirection:t.inputSource.handedness==="left"?"row":"row-reverse",alignItems:"flex-start"},children:u.jsxRuntimeExports.jsxs(u.jsxRuntimeExports.Fragment,{children:[u.jsxRuntimeExports.jsx(zr,{buttonName:"thumbstick",handedness:t.inputSource.handedness}),u.jsxRuntimeExports.jsx(lp,{style:{margin:"0 5px"},children:u.jsxRuntimeExports.jsx(cp,{ref:l,onMouseDown:S,children:u.jsxRuntimeExports.jsx(re,{icon:Xi,$size:50})})}),u.jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:v==="right"?"start":"end"},children:[u.jsxRuntimeExports.jsx(Ne,{$reverse:v==="right",style:{background:w?I.gradientLightGreyTranslucent:I.gradientGreyTranslucent,width:`calc(${N.widthLong} + ${N.widthShort} + ${N.gap})`,marginBottom:N.gap,borderRadius:N.radiusSolo},onClick:()=>{y(!0),t.updateButtonValue(n,1),setTimeout(()=>{y(!1),t.updateButtonValue(n,0)},250)},children:"Press"}),u.jsxRuntimeExports.jsxs(Gt,{$reverse:v==="right",children:[u.jsxRuntimeExports.jsx(wl,{title:"Click to toggle touch state",$reverse:t.inputSource.handedness!=="left",style:{background:d?I.gradientLightGreyTranslucent:I.gradientGreyTranslucent,width:N.widthShort},onClick:()=>{p(!d),t.updateButtonTouch(n,!d)},children:u.jsxRuntimeExports.jsx(re,{icon:Yo})}),u.jsxRuntimeExports.jsx(wl,{$reverse:t.inputSource.handedness!=="left",style:{background:m?I.gradientLightGreyTranslucent:I.gradientGreyTranslucent,width:N.widthLong},onClick:()=>{g(!m),t.updateButtonValue(n,m?0:1)},children:"Hold"})]})]})]})})};function yn(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}const fp=ce.div`
|
|
950
|
-
width: 100%;
|
|
951
|
-
display: flex;
|
|
952
|
-
flex-direction: row;
|
|
953
|
-
justify-content: space-between;
|
|
954
|
-
align-items: center;
|
|
955
|
-
margin: 0;
|
|
956
|
-
font-size: 12px;
|
|
957
|
-
`,Dr=({vector:t,label:e="",icon:n,multiplier:r=1,precision:i=2,onValidInput:s=()=>{},marginBottom:o="0"})=>{const[a,l]=C.useState({x:(t.x/r).toFixed(i),y:(t.y/r).toFixed(i),z:(t.z/r).toFixed(i)}),c=C.useRef({x:yn(t.x/r,i),y:yn(t.y/r,i),z:yn(t.z/r,i)}),f=C.useRef(null),d=()=>{const m={x:yn(t.x/r,i),y:yn(t.y/r,i),z:yn(t.z/r,i)},{x:g,y:w,z:y}=c.current;(m.x!==g||m.y!==w||m.z!==y)&&(c.current=m,l({x:m.x.toFixed(i),y:m.y.toFixed(i),z:m.z.toFixed(i)})),f.current=requestAnimationFrame(d)};C.useEffect(()=>(f.current=requestAnimationFrame(d),()=>{f.current&&cancelAnimationFrame(f.current)}),[t,r,i]);const p=m=>g=>{const w=g.target.value,y=parseFloat(w);l(b=>({...b,[m]:w})),isNaN(y)||(c.current[m]=y,t[m]=y*r,s())};return u.jsxRuntimeExports.jsxs(fp,{style:{marginBottom:o},children:[n?u.jsxRuntimeExports.jsx(re,{icon:n,style:{marginRight:"5px"}}):u.jsxRuntimeExports.jsx("span",{style:{marginRight:"5px"},children:e}),u.jsxRuntimeExports.jsx(t0,{children:["x","y","z"].map(m=>u.jsxRuntimeExports.jsxs("div",{style:{position:"relative",display:"inline-block",height:"25px"},children:[u.jsxRuntimeExports.jsx(n0,{value:a[m],onChange:p(m),className:parseFloat(a[m])!==c.current[m]?"invalid":void 0}),u.jsxRuntimeExports.jsx(r0,{children:m.toUpperCase()})]},`${e}-${m}`))})]})};function dp(t){const e=new Set;for(const r of t.axes)r&&r.id&&e.add(r.id);const n=t.buttons.filter(r=>r!==null).map(r=>({id:r.id,type:r.type,hasAxes:e.has(r.id)}));return n.sort((r,i)=>r.hasAxes&&!i.hasAxes?-1:!r.hasAxes&&i.hasAxes?1:0),n}const hp=({controller:t,handle:e,handedness:n,pointerLocked:r})=>{const{keyMap:i}=Ko(),[s,o]=C.useState(t.connected),[a,l]=C.useState(!1),c=dp(t.gamepadConfig),f=c.flatMap(d=>d.hasAxes?[`${d.id}-left`,`${d.id}-right`,`${d.id}-up`,`${d.id}-down`,d.id]:d.id);return C.useEffect(()=>{r&&l(!1)},[r]),u.jsxRuntimeExports.jsxs(Fr,{style:n==="left"?{left:"8px",bottom:"8px"}:{right:"8px",bottom:"8px"},children:[!r&&u.jsxRuntimeExports.jsx(u.jsxRuntimeExports.Fragment,{children:u.jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[u.jsxRuntimeExports.jsxs("div",{style:{fontSize:"13px",display:"flex",flexDirection:"row",alignItems:"center"},children:[u.jsxRuntimeExports.jsx(re,{icon:i0,style:{marginRight:"5px"}}),"Controller ",u.jsxRuntimeExports.jsxs("span",{style:{fontWeight:"bold"},children:["[",n==="left"?"L":"R","]"]})]}),u.jsxRuntimeExports.jsx("div",{style:{display:"flex",flexDirection:"row",gap:"1px"},children:s?u.jsxRuntimeExports.jsxs(u.jsxRuntimeExports.Fragment,{children:[u.jsxRuntimeExports.jsx(ln,{title:`Click to ${a?"close":"change"} key bindings`,onClick:()=>{l(!a)},children:u.jsxRuntimeExports.jsx(re,{icon:a0})}),u.jsxRuntimeExports.jsx(ln,{title:`Click to disconnect ${n} controller`,$isRed:!0,onClick:()=>{t.connected=!1,o(!1)},children:u.jsxRuntimeExports.jsx(re,{icon:Xi})})]}):u.jsxRuntimeExports.jsx(ln,{title:`Click to reconnect ${n} controller`,onClick:()=>{t.connected=!0,o(!0)},style:{marginLeft:"5px"},children:u.jsxRuntimeExports.jsx(re,{icon:o0})})})]})}),s&&!r&&u.jsxRuntimeExports.jsxs(u.jsxRuntimeExports.Fragment,{children:[!a&&u.jsxRuntimeExports.jsxs(u.jsxRuntimeExports.Fragment,{children:[u.jsxRuntimeExports.jsx(pn,{}),u.jsxRuntimeExports.jsx(Dr,{vector:e.position,label:"Position",marginBottom:N.gap}),u.jsxRuntimeExports.jsx(Dr,{vector:e.rotation,label:"Rotation"})]}),u.jsxRuntimeExports.jsx(pn,{})]}),s&&(a?u.jsxRuntimeExports.jsx(l0,{handedness:n,actions:f}):c.map(d=>{const p=i[n];return d.hasAxes?u.jsxRuntimeExports.jsx(up,{xrController:t,pointerLocked:r,buttonId:d.id,mappedKeyUp:i[n][`${d.id}-up`],mappedKeyDown:p[`${d.id}-down`],mappedKeyLeft:p[`${d.id}-left`],mappedKeyRight:p[`${d.id}-right`],mappedKeyPressed:p[d.id]},d.id):d.type==="analog"?u.jsxRuntimeExports.jsx(sp,{xrController:t,buttonId:d.id,mappedKey:p[d.id],pointerLocked:r},d.id):u.jsxRuntimeExports.jsx(op,{xrController:t,buttonId:d.id,mappedKey:p[d.id],pointerLocked:r},d.id)}))]},n)},pp=`calc(${N.widthLong} + ${N.widthShort} + ${N.gap})`,mp=({hand:t,pointerLocked:e,mappedKey:n})=>{const[r,i]=C.useState(!1),[s,o]=C.useState(!1),[a,l]=C.useState(0),c=t.inputSource.handedness;return C.useEffect(()=>{const f=g=>{g.code===n&&(t.updatePinchValue(1),o(!0))},d=g=>{g.code===n&&(t.updatePinchValue(0),o(!1))},p=g=>{(n==="MouseLeft"&&g.button===0||n==="MouseRight"&&g.button===2)&&(t.updatePinchValue(1),o(!0))},m=g=>{(n==="MouseLeft"&&g.button===0||n==="MouseRight"&&g.button===2)&&(t.updatePinchValue(0),o(!1))};return e?n==="MouseLeft"||n==="MouseRight"?(window.addEventListener("mousedown",p),window.addEventListener("mouseup",m)):(window.addEventListener("keydown",f),window.addEventListener("keyup",d)):n==="MouseLeft"||n==="MouseRight"?(window.removeEventListener("mousedown",p),window.removeEventListener("mouseup",m)):(window.removeEventListener("keydown",f),window.removeEventListener("keyup",d)),()=>{n==="MouseLeft"||n==="MouseRight"?(window.removeEventListener("mousedown",p),window.removeEventListener("mouseup",m)):(window.removeEventListener("keydown",f),window.removeEventListener("keyup",d))}},[n,e,t]),u.jsxRuntimeExports.jsxs(nr,{$reverse:c==="right",children:[u.jsxRuntimeExports.jsx(fr,{icon:Qo,$reverse:c==="left"}),u.jsxRuntimeExports.jsx(Gt,{$reverse:c==="right",children:e?u.jsxRuntimeExports.jsx(Tt,{$pressed:s,children:st[n]}):u.jsxRuntimeExports.jsxs(u.jsxRuntimeExports.Fragment,{children:[u.jsxRuntimeExports.jsx(Ne,{$reverse:c==="right",style:{background:r?I.gradientLightGreyTranslucent:I.gradientGreyTranslucent,width:N.widthLong},onClick:()=>{i(!0),t.updatePinchValue(1),setTimeout(()=>{i(!1),t.updatePinchValue(0)},250)},children:"Pinch"}),u.jsxRuntimeExports.jsx(e0,{$reverse:c==="right",value:a,onChange:f=>{const d=Number(f.target.value);l(d),t.updatePinchValue(d/100)},style:{width:pp},min:"0",max:"100"})]})})]})},hr=["default","point"],xp=`calc(2 * ${N.widthLong} - ${N.widthShort})`,gp=({hand:t,pointerLocked:e,mappedKey:n})=>{const[r,i]=C.useState(t.poseId),[s,o]=C.useState(!1),a=t.inputSource.handedness,l=f=>{const p=(hr.indexOf(t.poseId)+hr.length+f)%hr.length;i(hr[p]),t.poseId=hr[p]},c=a==="right";return C.useEffect(()=>{const f=p=>{p.code===n&&(l(1),o(!0))},d=p=>{p.code===n&&o(!1)};return e?(window.addEventListener("keydown",f),window.addEventListener("keyup",d)):(window.removeEventListener("keydown",f),window.removeEventListener("keyup",d)),()=>{window.removeEventListener("keydown",f),window.removeEventListener("keyup",d)}},[n,e,t]),u.jsxRuntimeExports.jsxs(nr,{$reverse:c,children:[u.jsxRuntimeExports.jsx(fr,{icon:Zo,$reverse:a==="left"}),u.jsxRuntimeExports.jsx(Gt,{$reverse:c,children:e?u.jsxRuntimeExports.jsx(Tt,{$pressed:s,children:st[n]}):u.jsxRuntimeExports.jsxs(u.jsxRuntimeExports.Fragment,{children:[u.jsxRuntimeExports.jsx(Ne,{$reverse:c,style:{width:N.widthShort},onClick:()=>{l(c?1:-1)},children:u.jsxRuntimeExports.jsx(re,{icon:c?yl:gl})}),u.jsxRuntimeExports.jsxs(Ne,{$reverse:c,style:{width:xp},disabled:!0,children:["Pose: ",r]}),u.jsxRuntimeExports.jsx(Ne,{$reverse:c,style:{width:N.widthShort},onClick:()=>{l(c?-1:1)},children:u.jsxRuntimeExports.jsx(re,{icon:c?gl:yl})})]})})]})},yp=({hand:t,handle:e,handedness:n,pointerLocked:r})=>{const{keyMap:i}=Ko(),[s,o]=C.useState(t.connected),[a,l]=C.useState(!1);return C.useEffect(()=>{r&&l(!1)},[r]),u.jsxRuntimeExports.jsxs(Fr,{style:n==="left"?{left:"8px",bottom:"8px"}:{right:"8px",bottom:"8px"},children:[!r&&u.jsxRuntimeExports.jsx(u.jsxRuntimeExports.Fragment,{children:u.jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[u.jsxRuntimeExports.jsxs("div",{style:{fontSize:"13px",display:"flex",flexDirection:"row",alignItems:"center"},children:[u.jsxRuntimeExports.jsx(re,{icon:s0,$reverse:n==="left",style:{marginRight:"5px"}}),"Hand ",u.jsxRuntimeExports.jsxs("span",{style:{fontWeight:"bold"},children:["[",n==="left"?"L":"R","]"]})]}),u.jsxRuntimeExports.jsx("div",{style:{display:"flex",flexDirection:"row",gap:"1px"},children:s?u.jsxRuntimeExports.jsxs(u.jsxRuntimeExports.Fragment,{children:[u.jsxRuntimeExports.jsx(ln,{title:`Click to ${a?"close":"change"} key bindings`,onClick:()=>{l(!a)},children:u.jsxRuntimeExports.jsx(re,{icon:a0})}),u.jsxRuntimeExports.jsx(ln,{title:`Click to disconnect ${n} controller`,$isRed:!0,onClick:()=>{t.connected=!1,o(!1)},children:u.jsxRuntimeExports.jsx(re,{icon:Xi})})]}):u.jsxRuntimeExports.jsx(ln,{title:`Click to reconnect ${n} controller`,onClick:()=>{t.connected=!0,o(!0)},style:{marginLeft:"5px"},children:u.jsxRuntimeExports.jsx(re,{icon:o0})})})]})}),s&&!r&&u.jsxRuntimeExports.jsxs(u.jsxRuntimeExports.Fragment,{children:[!a&&u.jsxRuntimeExports.jsxs(u.jsxRuntimeExports.Fragment,{children:[u.jsxRuntimeExports.jsx(pn,{}),u.jsxRuntimeExports.jsx(Dr,{vector:e.position,label:"Position",marginBottom:N.gap}),u.jsxRuntimeExports.jsx(Dr,{vector:e.rotation,label:"Rotation"})]}),u.jsxRuntimeExports.jsx(pn,{})]}),s&&(a?u.jsxRuntimeExports.jsx(l0,{handedness:n,actions:["pose","pinch"]}):u.jsxRuntimeExports.jsxs(u.jsxRuntimeExports.Fragment,{children:[u.jsxRuntimeExports.jsx(gp,{hand:t,pointerLocked:r,mappedKey:i[n].pose}),u.jsxRuntimeExports.jsx(mp,{hand:t,pointerLocked:r,mappedKey:i[n].pinch})]}))]},n)},Jo=u.create(t=>({inputMode:"controller",setInputMode:e=>t(()=>({inputMode:e}))})),vp=({xrDevice:t,inputLayer:e,pointerLocked:n})=>{const{inputMode:r}=Jo();return u.jsxRuntimeExports.jsx(u.jsxRuntimeExports.Fragment,{children:r==="controller"?Object.entries(t.controllers).map(([i,s])=>u.jsxRuntimeExports.jsx(hp,{controller:s,handle:e.transformHandles.get(i),handedness:i,pointerLocked:n},`controller-${i}`)):Object.entries(t.hands).map(([i,s])=>u.jsxRuntimeExports.jsx(yp,{hand:s,handle:e.transformHandles.get(i),handedness:i,pointerLocked:n},`hand-${i}`))})},ws=ce.td`
|
|
958
|
-
text-align: right;
|
|
959
|
-
color: ${I.textWhite};
|
|
960
|
-
padding: 0 8px 0 0;
|
|
961
|
-
font-weight: bold;
|
|
962
|
-
`,bs=ce.td`
|
|
963
|
-
text-align: left;
|
|
964
|
-
color: ${I.textGrey};
|
|
965
|
-
padding: 0;
|
|
966
|
-
`,wp=["meeting_room","living_room","music_room","office_large","office_small"],bp=u.create(t=>({infoPanelOpen:!1,envDropDownOpen:!1,setInfoPanelOpen:e=>t(()=>({infoPanelOpen:e})),setEnvDropDownOpen:e=>t(()=>({envDropDownOpen:e}))}));function Ep(t){return t.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}const Tp=({xrDevice:t,inputLayer:e})=>{var n,r,i;const[s,o]=C.useState(!!(!((n=t.sem)===null||n===void 0)&&n.planesVisible)),[a,l]=C.useState(!!(!((r=t.sem)===null||r===void 0)&&r.boundingBoxesVisible)),[c,f]=C.useState(!!(!((i=t.sem)===null||i===void 0)&&i.meshesVisible)),{inputMode:d,setInputMode:p}=Jo(),{infoPanelOpen:m,setInfoPanelOpen:g,envDropDownOpen:w,setEnvDropDownOpen:y}=bp();return u.jsxRuntimeExports.jsxs("div",{style:{display:"flex",justifyContent:"center",flexDirection:"row",alignItems:"center",gap:"6px",padding:"8px"},children:[u.jsxRuntimeExports.jsx(xo,{children:u.jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"1px"},children:[u.jsxRuntimeExports.jsx(Ke,{title:"Click to reset device transforms",onClick:()=>{e.resetDeviceTransforms()},children:u.jsxRuntimeExports.jsx(re,{icon:g1,$size:16})}),u.jsxRuntimeExports.jsx(Ke,{title:"Click to activate play mode",onClick:()=>{e.lockPointer(),y(!1),g(!1)},children:u.jsxRuntimeExports.jsx(re,{icon:y1,$size:16})}),u.jsxRuntimeExports.jsx(Ke,{title:"Click to toggle input mode",onClick:()=>{d==="controller"?(p("hand"),t.primaryInputMode="hand"):(p("controller"),t.primaryInputMode="controller")},children:u.jsxRuntimeExports.jsx(re,{icon:d==="controller"?i0:s0,$size:16})}),t.sem&&u.jsxRuntimeExports.jsxs(u.jsxRuntimeExports.Fragment,{children:[u.jsxRuntimeExports.jsx(pn,{$horizontal:!1}),u.jsxRuntimeExports.jsx(Ke,{title:"Click to select/change emulated environment",onClick:()=>y(!w),children:u.jsxRuntimeExports.jsx(re,{icon:v1,$size:16})}),u.jsxRuntimeExports.jsx(Ke,{title:"Click to toggle visibility of planes",onClick:()=>{t.sem.planesVisible=!s,o(!s)},children:u.jsxRuntimeExports.jsx(np,{size:16,color:s?I.textWhite:I.textGrey})}),u.jsxRuntimeExports.jsx(Ke,{title:"Click to toggle visibility of bounding boxes",onClick:()=>{t.sem.boundingBoxesVisible=!a,l(!a)},children:u.jsxRuntimeExports.jsx(ep,{size:16,color:a?I.textWhite:I.textGrey})}),u.jsxRuntimeExports.jsx(Ke,{title:"Click to toggle visibility of meshes",onClick:()=>{t.sem.meshesVisible=!c,f(!c)},children:u.jsxRuntimeExports.jsx(tp,{size:16,color:c?I.textWhite:I.textGrey})})]}),u.jsxRuntimeExports.jsx(pn,{$horizontal:!1}),u.jsxRuntimeExports.jsx(Ke,{title:"Click to exit XR session",onClick:()=>{const b=t.activeSession;b?.end()},children:u.jsxRuntimeExports.jsx(re,{icon:f1,$size:16})})]})}),u.jsxRuntimeExports.jsx(xo,{children:u.jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:"1px"},children:[u.jsxRuntimeExports.jsx(Ke,{title:"About IWER",onClick:()=>{g(!m)},children:u.jsxRuntimeExports.jsx(go,{size:16})}),u.jsxRuntimeExports.jsx(Ke,{title:"Report issues",onClick:()=>{window.open("https://github.com/meta-quest/immersive-web-emulation-runtime/issues","_blank")},children:u.jsxRuntimeExports.jsx(re,{icon:T1,$size:16})})]})}),m&&u.jsxRuntimeExports.jsxs(Fr,{style:{top:"50vh",left:"50vw",transform:"translate(-50%, -50%)",maxWidth:"240px",gap:"4px"},children:[u.jsxRuntimeExports.jsx("div",{style:{display:"flex",justifyContent:"end"},children:u.jsxRuntimeExports.jsx(ln,{$isRed:!0,onClick:()=>{g(!1)},children:u.jsxRuntimeExports.jsx(re,{icon:Xi})})}),u.jsxRuntimeExports.jsx("div",{style:{display:"flex",justifyContent:"center"},children:u.jsxRuntimeExports.jsx(go,{size:100})}),u.jsxRuntimeExports.jsxs("p",{style:{textAlign:"center",padding:"0 5px",margin:"0"},children:[u.jsxRuntimeExports.jsx("b",{children:"Immersive Web Emulation Runtime"})," (IWER) is a free, open-source WebXR developer tool created by Meta Platforms, Inc."]}),u.jsxRuntimeExports.jsx("table",{style:{width:"100%",borderCollapse:"collapse",display:"flex",justifyContent:"center",fontSize:"12px",padding:"8px"},children:u.jsxRuntimeExports.jsxs("tbody",{children:[u.jsxRuntimeExports.jsxs("tr",{children:[u.jsxRuntimeExports.jsx(ws,{children:"IWER"}),u.jsxRuntimeExports.jsxs(bs,{children:["v",t.version]})]}),u.jsxRuntimeExports.jsxs("tr",{children:[u.jsxRuntimeExports.jsx(ws,{children:"DevUI"}),u.jsxRuntimeExports.jsxs(bs,{children:["v",t.devui.version]})]}),t.sem&&u.jsxRuntimeExports.jsxs("tr",{children:[u.jsxRuntimeExports.jsx(ws,{children:"SEM"}),u.jsxRuntimeExports.jsxs(bs,{children:["v",t.sem.version]})]})]})}),u.jsxRuntimeExports.jsx(Ne,{style:{borderRadius:N.radiusSolo},onClick:()=>{window.open("https://github.com/meta-quest/immersive-web-emulation-runtime/blob/main/LICENSE","_blank")},children:"MIT License"}),u.jsxRuntimeExports.jsx(Ne,{style:{borderRadius:N.radiusSolo},onClick:()=>{window.open("https://github.com/meta-quest/immersive-web-emulation-runtime","_blank")},children:"View Source on GitHub"})]}),w&&u.jsxRuntimeExports.jsx(Fr,{style:{position:"absolute",top:"40px"},children:wp.map(b=>u.jsxRuntimeExports.jsx("div",{children:u.jsxRuntimeExports.jsx(Ke,{style:{fontSize:"12px",width:"100%",justifyContent:"start",borderRadius:"8px"},onClick:()=>{t.sem.loadDefaultEnvironment(b)},children:Ep(b)})},b))})]})},Rp=ce.div`
|
|
967
|
-
width: 100%;
|
|
968
|
-
display: flex;
|
|
969
|
-
flex-direction: row;
|
|
970
|
-
justify-content: space-between;
|
|
971
|
-
align-items: center;
|
|
972
|
-
margin-top: ${N.gap};
|
|
973
|
-
font-size: 12px;
|
|
974
|
-
`,Sp=ce.input.attrs({type:"range"})`
|
|
975
|
-
-webkit-appearance: none;
|
|
976
|
-
appearance: none;
|
|
977
|
-
background: ${I.gradientGrey};
|
|
978
|
-
border: 1px solid transparent;
|
|
979
|
-
height: 25px;
|
|
980
|
-
color: ${I.textWhite};
|
|
981
|
-
width: ${N.widthLong};
|
|
982
|
-
cursor: pointer;
|
|
983
|
-
margin: 0;
|
|
984
|
-
border-radius: 5px;
|
|
985
|
-
padding: 0 10px 0 5px;
|
|
986
|
-
box-sizing: border-box;
|
|
987
|
-
font-size: 10px;
|
|
988
|
-
|
|
989
|
-
&::-webkit-slider-thumb {
|
|
990
|
-
-webkit-appearance: none;
|
|
991
|
-
appearance: none;
|
|
992
|
-
width: 8px;
|
|
993
|
-
height: 25px;
|
|
994
|
-
background-color: ${I.textWhite};
|
|
995
|
-
border-radius: ${N.radiusMiddle};
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
&::-moz-range-thumb {
|
|
999
|
-
width: 8px;
|
|
1000
|
-
height: 25px;
|
|
1001
|
-
background-color: ${I.textWhite};
|
|
1002
|
-
border-radius: ${N.radiusMiddle};
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
&::-ms-thumb {
|
|
1006
|
-
width: 8px;
|
|
1007
|
-
height: 25px;
|
|
1008
|
-
background-color: ${I.textWhite};
|
|
1009
|
-
border-radius: ${N.radiusMiddle};
|
|
1010
|
-
}
|
|
1011
|
-
`,_p=({xrDevice:t,inputLayer:e,pointerLocked:n})=>{const[r,i]=C.useState(t.fovy);return u.jsxRuntimeExports.jsxs(Fr,{style:{left:"8px",top:"8px"},children:[u.jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",height:"20px"},children:[u.jsxRuntimeExports.jsxs("div",{style:{fontSize:"13px",display:"flex",flexDirection:"row",alignItems:"center",justifyItems:"start"},children:[u.jsxRuntimeExports.jsx(re,{icon:R1,style:{marginRight:"5px"}}),u.jsxRuntimeExports.jsx("div",{style:{alignItems:"end"},children:t.name})]}),u.jsxRuntimeExports.jsx("div",{style:{display:"flex",flexDirection:"row",gap:"1px"}})]}),u.jsxRuntimeExports.jsx(pn,{}),u.jsxRuntimeExports.jsx(Dr,{vector:e.combinedCameraPosition,icon:w1}),!n&&u.jsxRuntimeExports.jsxs(Rp,{children:[u.jsxRuntimeExports.jsx(re,{icon:_1,style:{marginRight:"5px"}}),u.jsxRuntimeExports.jsxs(t0,{children:[u.jsxRuntimeExports.jsxs("div",{style:{position:"relative",display:"inline-block",height:"25px"},children:[u.jsxRuntimeExports.jsx(n0,{type:"text",value:(r/Math.PI*180).toFixed(0)+"°",readOnly:!0,style:{width:"73px"}}),u.jsxRuntimeExports.jsx(r0,{children:"FOV-Y"})]}),u.jsxRuntimeExports.jsx("div",{style:{position:"relative",display:"inline-block"},children:u.jsxRuntimeExports.jsx(Sp,{value:r,onChange:s=>{const o=Number(s.target.value);i(o),t.fovy=o},min:Math.PI/6,max:Math.PI/1.5,step:Math.PI/48,style:{width:"80px"}})})]})]})]})},Es=new h.Matrix4,Ap=new h.Matrix4,Mp={x:"XYZ",y:"YXZ",z:"ZXY"};function ea(t,e,n,r,i,s){Es.copy(n),i!=null&&Es.premultiply(Ap.copy(i).invert());const o=new h.Vector3,a=new h.Quaternion,l=new h.Vector3;Es.decompose(o,a,l),Tl(o,r.initialTargetPosition,s.translate??!0);let c;const f=s.rotate??!0;if(f===!1)a.copy(r.initialTargetQuaternion),c=r.initialTargetRotation.clone();else if(Array.isArray(f)||f===!0||typeof f!="string"&&!Array.isArray(f)&&f.x===!0&&f.y===!0&&f.z===!0)c=new h.Euler().setFromQuaternion(a,r.initialTargetRotation.order);else if(typeof f=="string"){const d=Mp[f];c=new h.Euler().setFromQuaternion(a,d);for(const p of d){const m=p.toLowerCase();m!==f&&(c[m]=0)}c.order=r.initialTargetRotation.order,a.setFromEuler(c)}else c=Ip(a,r.initialTargetRotation,f);return(typeof s.scale!="object"||!s.scale.uniform)&&Tl(l,r.initialTargetScale,s.scale??!0),{pointerAmount:e,position:o,quaternion:a,rotation:c,scale:l,time:t}}const vn=new h.Plane,wn=new h.Vector3,bn=new h.Vector3,Pp=new h.Vector3,Op=new h.Quaternion;function bl(t,e,n){return vn.normal.copy(t),vn.constant=0,kp(wn,vn.normal),bn.copy(wn),bn.applyQuaternion(Op.copy(e).invert().premultiply(n)),vn.projectPoint(wn,wn).normalize(),vn.projectPoint(bn,bn).normalize(),(Pp.crossVectors(wn,vn.normal).dot(bn)<0?1:-1)*wn.angleTo(bn)}function kp(t,e){if(e.x===0){t.set(1,0,0);return}if(e.y===0){t.set(0,1,0);return}if(e.z===0){t.set(0,0,1);return}t.set(-e.y,e.x,0)}function Ip(t,e,n){let r="",i="";for(const a of e.order)n[a.toLowerCase()]===!1?i+=a:r+=a;const s=r+i,o=new h.Euler().setFromQuaternion(t,s);for(const a of s){const l=a.toLowerCase();o[l]=wi(l,o[l],e[l],n)}return t.setFromEuler(o),o}const Ts=new h.Vector3,El=new h.Plane,Cp=new h.Vector3,Lp=new h.Vector3;function Tl(t,e,n){if(Array.isArray(n)){switch(n.length){case 0:t.copy(e);return;case 1:t.sub(e),c0(t,n[0]instanceof h.Vector3?n[0]:Ts.fromArray(n[0])),t.add(e);return;case 2:Ts.crossVectors(n[0]instanceof h.Vector3?n[0]:Cp.fromArray(n[0]),n[1]instanceof h.Vector3?n[1]:Lp.fromArray(n[1])),El.setFromNormalAndCoplanarPoint(Ts,e),El.projectPoint(t,t);return}return}t.x=wi("x",t.x,e.x,n),t.y=wi("y",t.y,e.y,n),t.z=wi("z",t.z,e.z,n)}function wi(t,e,n,r){if(typeof r=="boolean")return r?e:n;if(typeof r=="string")return r===t?e:n;const i=r[t];return i===!1?n:Array.isArray(i)?u.clamp(e,...i):e}function Wn(t=!0,e,n,r,i,s){if(t){switch(e.length){case 0:case 3:return;case 1:Np(n,...e,r,i,s);return;case 2:jp(...e,n,r,i,s);return}throw new Error(`space cannot be ${e.length}D but received (${e.map(o=>o.toArray().join("/")).join("; ")})`)}}const bi={x:new h.Vector3(1,0,0),y:new h.Vector3(0,1,0),z:new h.Vector3(0,0,1)};function qn(t,e,n,r,i){if(r!==!1){if(r===!0){t[0]=bi.x,t[1]=bi.y,t[2]=bi.z;return}if(typeof r=="string"){pr(t,e,n,r,i);return}if(Array.isArray(r)){for(const s of r)pr(t,e,n,s,i);return}r.x!==!1&&pr(t,e,n,"x",i),r.y!==!1&&pr(t,e,n,"y",i),r.z!==!1&&pr(t,e,n,"z",i)}}const qt=new h.Quaternion,ii=new h.Euler,nt=new h.Vector3,En=new h.Vector3,Xt=new h.Vector3;function pr(t,e,n,r,i){if(Array.isArray(r)?nt.set(...r):r instanceof h.Vector3?nt.copy(r):nt.copy(bi[r]),i==="translate"){nt.applyQuaternion(e),si(t,nt);return}if(i==="scale"){Array.isArray(r)?qt.identity():qt.setFromEuler(n),qt.premultiply(e),nt.applyQuaternion(qt),si(t,nt);return}if(Array.isArray(r))ii.set(0,0,0);else{ii.copy(n);for(let s=2;s>=0;s--){const o=n.order[s].toLowerCase();if(ii[o]=0,o===r)break}}qt.setFromEuler(ii).premultiply(e),nt.normalize(),En.set(0,1,0),nt.dot(En)>.99&&En.set(0,0,1),Xt.crossVectors(nt,En).normalize(),En.copy(Xt),Xt.applyQuaternion(qt),si(t,Xt),Xt.crossVectors(nt,En).normalize(),Xt.applyQuaternion(qt),si(t,Xt)}const Rl=new h.Vector3;function si(t,e){if(t.length!==3){if(t.length===0){t.push(e.clone());return}if(t.length===1){Math.abs(t[0].dot(e))<.999&&t.push(e.clone());return}Rl.crossVectors(t[0],t[1]),!(Math.abs(Rl.dot(e))<.001)&&t.push(e.clone())}}const mr=new h.Plane,Rs=new h.Vector3,Mr=new h.Vector3;function jp(t,e,n,r,i,s){Rs.crossVectors(t,e).normalize(),mr.setFromNormalAndCoplanarPoint(Rs,n);const o=s==null?0:Math.abs(Rs.dot(s));if(s==null||o<.01){mr.projectPoint(i,i);return}const l=-mr.distanceToPoint(r)/s.dot(mr.normal);if(l<0){mr.projectPoint(i,i);return}Mr.copy(i),i.copy(r).addScaledVector(s,l)}function Np(t,e,n,r,i){const s=i==null?0:1-Math.abs(e.dot(i));if(i==null||s<.001){Sl(r,t,e);return}Mr.subVectors(n,t);const o=e.dot(i),a=e.dot(Mr),l=i.dot(Mr),c=1-o*o,f=(a-o*l)/c;if((o*a-l)/c<0){Sl(r,t,e);return}Mr.copy(r),r.copy(t).addScaledVector(e,f)}function Sl(t,e,n){t.sub(e),c0(t,n),t.add(e)}function c0(t,e){const n=t.dot(e);t.copy(e).multiplyScalar(n)}const Ss=new h.Matrix4,oi=new h.Matrix4,ai=new h.Vector3,Fp=new h.Vector3,Yt=new h.Quaternion,zp=new h.Vector3(1,1,1),_s=[];function Dp(t,e,n,r,i){return r==null?Yt.identity():r.decompose(ai,Yt,Fp),_s.length=0,qn(_s,Yt,n.initialTargetRotation,i.translate??!0,"translate"),oi.makeRotationFromQuaternion(Yt.copy(e.initialPointerWorldQuaternion).invert()).multiply(Ss.makeTranslation(ai.copy(e.initialPointerWorldPoint).negate())),n.initialTargetParentWorldMatrix!=null&&oi.multiply(n.initialTargetParentWorldMatrix),Wn(i.projectRays,_s,e.initialPointerWorldPoint,e.pointerWorldOrigin,ai.copy(e.pointerWorldPoint),e.pointerWorldDirection),Yt.copy(e.pointerWorldQuaternion),(i.rotate??!0)===!1&&Yt.copy(e.initialPointerWorldQuaternion),Ss.compose(ai,Yt,zp).multiply(oi).multiply(oi.compose(n.initialTargetPosition,n.initialTargetQuaternion,n.initialTargetScale)),ea(t,1,Ss,n,r,i)}const Tn=new h.Vector3,xr=new h.Vector3,Se=new h.Vector3,kt=new h.Vector3,Bp=new h.Vector3,_l=new h.Vector3,Rn=new h.Vector3,Al=new h.Matrix4,gr=new h.Matrix4,li=new h.Matrix4,pt=new h.Quaternion,yr=new h.Quaternion,Sn=[];function Vp(t,e,n,r,i,s){i==null?pt.identity():i.decompose(Se,pt,kt),Sn.length=0,qn(Sn,pt,r.initialTargetRotation,s.translate??!0,"translate"),qn(Sn,pt,r.initialTargetRotation,s.rotate??!0,"rotate"),qn(Sn,pt,r.initialTargetRotation,s.scale??!0,"scale"),Wn(s.projectRays,Sn,e.initialPointerWorldPoint,e.pointerWorldOrigin,Se.copy(e.pointerWorldPoint),e.pointerWorldDirection),Wn(s.projectRays,Sn,n.initialPointerWorldPoint,n.pointerWorldOrigin,kt.copy(n.pointerWorldPoint),n.pointerWorldDirection),Tn.copy(n.initialPointerWorldPoint).sub(e.initialPointerWorldPoint),xr.copy(kt).sub(Se),Se.copy(Tn),r.prevTwoPointerDeltaRotation!=null&&Se.applyQuaternion(r.prevTwoPointerDeltaRotation),Se.normalize(),kt.copy(xr).normalize(),pt.setFromUnitVectors(Se,kt),r.prevTwoPointerDeltaRotation==null?r.prevTwoPointerDeltaRotation=new h.Quaternion:pt.multiply(r.prevTwoPointerDeltaRotation),r.prevTwoPointerDeltaRotation.copy(pt);const o=(bl(kt,e.prevPointerWorldQuaternion,e.pointerWorldQuaternion)+bl(kt,n.prevPointerWorldQuaternion,n.pointerWorldQuaternion))*.5+(r.prevAngle??0);if(r.prevAngle=o,pt.premultiply(yr.setFromAxisAngle(kt,o)),li.compose(r.initialTargetPosition,r.initialTargetQuaternion,r.initialTargetScale),r.initialTargetParentWorldMatrix!=null&&li.premultiply(r.initialTargetParentWorldMatrix),typeof s.scale=="object"&&(s.scale.uniform??!1))Rn.setScalar(xr.length()/Tn.length());else{li.decompose(Bp,yr,_l),Se.copy(Tn).applyQuaternion(yr.invert()).divide(_l),Se.x=Math.abs(Se.x),Se.y=Math.abs(Se.y),Se.z=Math.abs(Se.z);const a=Math.max(...Se.toArray());Se.divideScalar(a),Rn.set(1,1,1),Rn.addScaledVector(Se,xr.length()/Tn.length()-1)}return Al.makeTranslation(Se.copy(xr).multiplyScalar(.5).add(e.pointerWorldPoint)).multiply(gr.makeRotationFromQuaternion(pt)).multiply(gr.makeRotationFromQuaternion(yr.invert())).multiply(gr.makeScale(Rn.x,Rn.y,Rn.z)).multiply(gr.makeRotationFromQuaternion(yr.invert())).multiply(gr.makeTranslation(Se.copy(Tn).multiplyScalar(.5).add(e.initialPointerWorldPoint).negate())).multiply(li),ea(t,2,Al,r,i,s)}const ye=new h.Vector3,Ze=new h.Vector3,As=new h.Vector3,It=new h.Vector3,Zt=new h.Vector3,Qe=new h.Quaternion,Ge=new h.Quaternion,Ct=new h.Matrix4,bt=new h.Vector3,_n=[];function Up(t,e,n,r,i,s){if(i==null?Qe.identity():i.decompose(ye,Qe,Ze),_n.length=0,s.translate==="as-scale"&&qn(_n,Qe,n.initialTargetRotation,s.scale??!0,"scale"),s.translate!="as-scale"&&qn(_n,Qe,n.initialTargetRotation,s.rotate??!0,"rotate"),Ct.makeTranslation(n.initialTargetPosition),n.initialTargetParentWorldMatrix!=null&&Ct.premultiply(n.initialTargetParentWorldMatrix),It.setFromMatrixPosition(Ct),Wn(s.projectRays,_n,e.initialPointerWorldPoint,e.pointerWorldOrigin,It,void 0),It.negate().add(e.initialPointerWorldPoint),Zt.setFromMatrixPosition(r),Wn(s.projectRays,_n,e.initialPointerWorldPoint,e.pointerWorldOrigin,Zt,void 0),Wn(s.projectRays,_n,e.initialPointerWorldPoint,e.pointerWorldOrigin,Ze.copy(e.pointerWorldPoint),e.pointerWorldDirection),Zt.negate().add(Ze),s.translate==="as-scale"?Qe.copy(n.initialTargetQuaternion):(ye.copy(It),n.prevTranslateAsDeltaRotation!=null&&ye.applyQuaternion(n.prevTranslateAsDeltaRotation),ye.normalize(),Ze.copy(Zt).normalize(),Qe.setFromUnitVectors(ye,Ze),n.prevTranslateAsDeltaRotation==null?n.prevTranslateAsDeltaRotation=new h.Quaternion:Qe.multiply(n.prevTranslateAsDeltaRotation),n.prevTranslateAsDeltaRotation.copy(Qe),n.initialTargetParentWorldMatrix!=null&&(Ge.setFromRotationMatrix(n.initialTargetParentWorldMatrix),Qe.multiply(Ge.normalize()),Qe.premultiply(Ge.invert())),Qe.multiply(n.initialTargetQuaternion)),s.translate==="as-rotate")bt.set(1,1,1);else if(typeof s.scale=="object"&&(s.scale.uniform??!1))bt.setScalar(Zt.length()/It.length());else if(s.translate==="as-rotate-and-scale"){Ct.compose(n.initialTargetPosition,n.initialTargetQuaternion,n.initialTargetScale),n.initialTargetParentWorldMatrix!=null&&Ct.premultiply(n.initialTargetParentWorldMatrix),Ct.decompose(Ze,Ge,As),ye.copy(It).applyQuaternion(Ge.invert()).divide(As),ye.x=Math.abs(ye.x),ye.y=Math.abs(ye.y),ye.z=Math.abs(ye.z);const o=Math.max(...ye.toArray());ye.divideScalar(o),bt.set(1,1,1),bt.addScaledVector(ye,Zt.length()/It.length()-1)}else n.initialTargetParentWorldMatrix!=null?(n.initialTargetParentWorldMatrix.decompose(ye,Ge,Ze),Ge.multiply(n.initialTargetQuaternion)):Ge.copy(n.initialTargetQuaternion),ye.copy(It).applyQuaternion(Ge.invert()),i!=null?(i.decompose(Ze,Ge,As),Ge.multiply(n.initialTargetQuaternion)):Ge.copy(n.initialTargetQuaternion),Ze.copy(Zt).applyQuaternion(Ge.invert()),bt.x=Math.abs(ye.x)<.001?1:Math.abs(Ze.x/ye.x),bt.y=Math.abs(ye.y)<.001?1:Math.abs(Ze.y/ye.y),bt.z=Math.abs(ye.z)<.001?1:Math.abs(Ze.z/ye.z);return bt.multiply(n.initialTargetScale),Ct.compose(n.initialTargetPosition,Qe,bt),ea(t,1,Ct,n,void 0,s)}class Ml{t1;t2;_position;_quaternion;_rotation;_scale;constructor(e,n){this.t1=e,this.t2=n}get time(){return this.t1.time-this.t2.time}get position(){return this._position??=this.t1.position.clone().sub(this.t2.position)}get quaternion(){return this._quaternion??=this.t2.quaternion.clone().invert().premultiply(this.t1.quaternion)}get rotation(){return this._rotation??=new h.Euler().setFromQuaternion(this.quaternion)}get scale(){return this._scale??=this.t1.scale.clone().sub(this.t2.scale)}}class Gp{cancel;previous;memo;event;initial;current;first;last;_delta;_offset;constructor(e){this.cancel=e}start(e,n){this.event=e,this.previous=void 0,this.current=n,this.initial=n,this.first=!0,this.last=!1,this.memo=void 0,this._delta=void 0,this._offset=void 0}update(e,n){this.event=e,this.previous=this.current,this.current=n,this.first=!1,this.last=!1,this._delta=void 0,this._offset=void 0}end(e){this.event=e,this.first=!1,this.last=!0,this._delta=void 0,this._offset=void 0}get delta(){if(this.previous!=null)return this._delta??=new Ml(this.current,this.previous)}get offset(){return this._offset??=new Ml(this.current,this.initial)}}function Pl(t,e){if(t.details.type==="sphere")return!1;if(t.details.type==="lines"){const{line:n}=t.details;return e.copy(n.end).sub(n.start).normalize(),!0}return t.details.type==="screen-ray"?(e.copy(t.details.direction),!0):(e.set(0,0,-1).applyQuaternion(t.pointerQuaternion),!0)}const Ol=new h.Vector3;class Hp{target;getOptions;outputState;latestMoveEvent;inputState=new Map;capturedObjects=new Map;initialTargetPosition=new h.Vector3;initialTargetQuaternion=new h.Quaternion;initialTargetRotation=new h.Euler;initialTargetScale=new h.Vector3;initialTargetParentWorldMatrix;prevTwoPointerDeltaRotation;prevTranslateAsDeltaRotation;prevAngle;handlers={onPointerDown:this.onPointerDown.bind(this),onPointerMove:this.onPointerMove.bind(this),onPointerUp:this.onPointerUp.bind(this)};constructor(e,n=()=>({})){this.target=e,this.getOptions=n,this.outputState=new Gp(this.cancel.bind(this))}firstOnPointer(e){const n=this.getTarget();if(n==null)return;const r=Pl(e,Ol)?Ol.clone():void 0;e.intersection.details.type,this.inputState.set(e.pointerId,{pointerWorldDirection:r,pointerWorldPoint:e.point,pointerWorldOrigin:e.pointerPosition,pointerWorldQuaternion:e.pointerQuaternion,initialPointerWorldPoint:e.point.clone(),initialPointerWorldDirection:r?.clone(),initialPointerWorldQuaternion:e.pointerQuaternion.clone(),prevPointerWorldQuaternion:e.pointerQuaternion}),this.save(),this.inputState.size===1&&this.outputState.start(e,{pointerAmount:1,time:e.timeStamp,position:this.initialTargetPosition.clone(),quaternion:this.initialTargetQuaternion.clone(),rotation:this.initialTargetRotation.clone(),scale:this.initialTargetScale.clone()}),this.outputState.memo=this.apply(n)}onPointerDown(e){this.getOptions().filter?.(e)!==!1&&(this.stopPropagation(e),this.capturePointer(e.pointerId,e.object)&&this.firstOnPointer(e))}onPointerMove(e){if(!this.capturedObjects.has(e.pointerId))return;this.stopPropagation(e);const n=this.inputState.get(e.pointerId);if(n==null){this.firstOnPointer(e);return}this.latestMoveEvent=e,n.pointerWorldPoint=e.point,n.prevPointerWorldQuaternion=n.pointerWorldQuaternion,n.pointerWorldQuaternion=e.pointerQuaternion,n.pointerWorldOrigin=e.pointerPosition,n.pointerWorldDirection!=null&&Pl(e,n.pointerWorldDirection)}cancel(){if(this.capturedObjects.size===0)return;for(const[n,r]of this.capturedObjects)r.releasePointerCapture(n);this.capturedObjects.clear(),this.inputState.clear(),this.outputState.end(void 0);const e=this.getTarget();e!=null&&this.apply(e)}onPointerUp(e){this.capturedObjects.has(e.pointerId)&&(this.stopPropagation(e),this.releasePointer(e.pointerId,e.object,e))}update(e){const n=this.getTarget();if(n==null||this.inputState.size===0||this.latestMoveEvent==null&&(this.getOptions().alwaysUpdate??!1)===!1)return;const r=this.getOptions();let i;if(r.translate==="as-rotate"||r.translate==="as-rotate-and-scale"||r.translate==="as-scale"){r.translate,this.prevTwoPointerDeltaRotation=void 0,this.prevAngle=void 0;const[s]=this.inputState.values(),o=n.matrixWorld,a=n.parent?.matrixWorld;i=Up(e,s,this,o,a,r)}else if(this.inputState.size===1){this.prevTwoPointerDeltaRotation=void 0,this.prevAngle=void 0,this.prevTranslateAsDeltaRotation=void 0;const[s]=this.inputState.values();i=Dp(e,s,this,n.parent?.matrixWorld,r)}else{this.prevTranslateAsDeltaRotation=void 0;const[s,o]=this.inputState.values();i=Vp(e,s,o,this,n.parent?.matrixWorld,r)}this.outputState.update(this.latestMoveEvent,i),this.outputState.memo=this.apply(n),this.latestMoveEvent=void 0}getTarget(){return this.target instanceof h.Object3D?this.target:this.target?.current}capturePointer(e,n){if(this.capturedObjects.has(e))return!1;const{multitouch:r,translate:i}=this.getOptions();return((r??!0)===!1||typeof i=="string")&&this.capturedObjects.size===1?!1:(this.capturedObjects.set(e,n),n.setPointerCapture(e),!0)}releasePointer(e,n,r){const i=this.getTarget();if(!(i==null||!this.capturedObjects.delete(e))){if(this.inputState.delete(e),n.releasePointerCapture(e),this.inputState.size>0){this.save();return}this.outputState.end(r),this.apply(i)}}stopPropagation(e){e==null||!(this.getOptions()?.stopPropagation??!0)||e.stopPropagation()}apply(e){return(this.getOptions().apply??u0)(this.outputState,e)}getState(){return this.inputState.size===0?void 0:this.outputState}save(){const e=this.getTarget();if(e!=null){e.updateWorldMatrix(!0,!1),this.prevAngle=void 0,this.prevTwoPointerDeltaRotation=void 0,this.prevTranslateAsDeltaRotation=void 0,this.initialTargetParentWorldMatrix=e.parent?.matrixWorld.clone(),e.matrixAutoUpdate?(this.initialTargetPosition.copy(e.position),this.initialTargetQuaternion.copy(e.quaternion),this.initialTargetRotation.copy(e.rotation),this.initialTargetScale.copy(e.scale)):(e.matrix.decompose(this.initialTargetPosition,this.initialTargetQuaternion,this.initialTargetScale),this.initialTargetRotation.setFromQuaternion(this.initialTargetQuaternion,e.rotation.order));for(const n of this.inputState.values())n.pointerWorldDirection!=null&&n.initialPointerWorldDirection?.copy(n.pointerWorldDirection),n.initialPointerWorldPoint.copy(n.pointerWorldPoint),n.initialPointerWorldQuaternion.copy(n.pointerWorldQuaternion)}}bind(e){const{onPointerDown:n,onPointerMove:r,onPointerUp:i}=this.handlers;return e.addEventListener("pointerdown",n),e.addEventListener("pointermove",r),e.addEventListener("pointerup",i),()=>{e.removeEventListener("pointerdown",n),e.removeEventListener("pointermove",r),e.removeEventListener("pointerup",i),this.cancel()}}capture(e,n){return this.capturePointer(e,n)?()=>this.releasePointer(e,n,void 0):$p}}function $p(){}function u0(t,e){e.position.copy(t.current.position),e.rotation.order=t.current.rotation.order,e.quaternion.copy(t.current.quaternion),e.scale.copy(t.current.scale)}class Wp{target;getOptions;handles=[];hoveredTagMap=new Map;hoverSubscriptions=[];applySubscriptions=[];space;constructor(e,n){this.target=e,this.getOptions=n}getSpace(){return this.space??"world"}getTarget(){return this.target instanceof h.Object3D?this.target:this.target.current}getHandleOptions(e,n){const r=this.getOptions?.(),i=n?.();return{...r,...i,apply:(s,o)=>(this.onApply(e,s,o),(i?.apply??r?.apply??u0)?.(s,o))}}registerHandle(e,n,r){const i={object:n,store:e,tag:r};this.handles.push(i);const s=e.bind(n),o=this.onPointerEnter.bind(this,r),a=this.onPointerLeave.bind(this);return n.addEventListener("pointerenter",o),n.addEventListener("pointerleave",a),()=>{const l=this.handles.indexOf(i);l!=-1&&this.handles.splice(l,1),s(),e.cancel()}}subscribeHover(e){return this.hoverSubscriptions.push(e),e(Array.from(this.hoveredTagMap.values())),()=>{const n=this.hoverSubscriptions.indexOf(e);n!==-1&&this.hoverSubscriptions.splice(n,1)}}subscribeApply(e){return this.applySubscriptions.push(e),()=>{const n=this.applySubscriptions.indexOf(e);n!==-1&&this.applySubscriptions.splice(n,1)}}update(e){for(const{store:n}of this.handles)n.update(e)}onPointerEnter(e,n){this.hoveredTagMap.set(n.pointerId,e),this.updateHover()}onPointerLeave(e){this.hoveredTagMap.delete(e.pointerId),this.updateHover()}updateHover(){const e=Array.from(this.hoveredTagMap.values());for(const n of this.hoverSubscriptions)n(e)}onApply(e,n,r){for(const i of this.applySubscriptions)i(e,n,r)}}const Fe={depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0};function ut(t,e,n,{color:r,hoverColor:i,hoverOpacity:s,opacity:o,disabled:a=!1}){if(i==null&&s==null||a){e.color.set(r),e.opacity=o??1,a&&(e.opacity*=.5,e.color.lerp(new h.Color(1,1,1),.5));return}return i??=r,t.subscribeHover(l=>{const c=l.some(f=>f.includes(n));e.color.set(c?i:r),e.opacity=(c?s:o)??1})}const ci=new h.Quaternion,f0=new h.BufferGeometry;f0.setAttribute("position",new h.Float32BufferAttribute([-1e3,0,0,1e3,0,0],3));class Ms extends h.LineSegments{context;rotationOffset;constructor(e,n){super(f0),this.context=e,this.rotationOffset=n,this.renderOrder=1/0}update(){this.quaternion.setFromEuler(this.rotationOffset);const e=this.context.getTarget();this.context.getSpace()==="world"&&e!=null&&(e.getWorldQuaternion(ci).invert(),this.quaternion.premultiply(ci))}bind(e){this.material=new h.LineBasicMaterial({...Fe,color:this.material.color??"white",opacity:this.material.opacity??1});const n=this.context.subscribeHover(i=>{const s=i.some(o=>o.includes(e));this.visible=s}),r=this.context.subscribeApply((i,s)=>{if(s.last){this.position.set(0,0,0);return}this.position.copy(s.initial.position).sub(s.current.position);const o=this.context.getTarget();o!=null&&(ci.copy(o.quaternion).invert(),this.position.applyQuaternion(ci))});return()=>{this.material.dispose(),n(),r()}}}class Mt extends h.Group{context;axis;store;options;tag;constructor(e,n,r,i){super(),this.context=e,this.axis=n,this.tag=(r??"")+n,this.store=new Hp(e.target,()=>e.getHandleOptions(this.tag,i))}}function Pt(t,e=!0){if(e===!1)return{options:!1,disabled:!0};if(e===!0){const i={x:!1,y:!1,z:!1,e:!1};for(const s of t)i[s]=!0;return{options:i,disabled:!1}}if(e==="disabled")return{options:{x:!0,y:!0,z:!0,e:!0},disabled:!0};if(typeof e=="string")return{options:e===t?{x:!1,y:!1,z:!1,e:!1,[t]:!0}:!1,disabled:!1};const n={x:!1,y:!1,z:!1,e:!1};let r=!1;for(const i of t){let s=e[i]??!0;if(s===!1)return{options:!1,disabled:!0};s==="disabled"&&(r=!0,s=!0),n[i]=s}return{options:n,disabled:r}}const kl=new h.Vector3,Il=new h.Vector3;function ta(t,e,n,r){if(!n)return r;let i;return e instanceof h.OrthographicCamera?i=(e.top-e.bottom)/e.zoom:(e.getWorldPosition(kl),t.getWorldPosition(Il),i=kl.distanceTo(Il)*Math.min(1.9*Math.tan(Math.PI*e.fov/360)/e.zoom,7)),i*r/4}const d0=new h.CylinderGeometry(0,.04,.1,12);d0.translate(0,.05,0);const h0=new h.CylinderGeometry(.0075,.0075,.5,3);h0.translate(0,.25,0);const qp=new h.Euler(0,0,-Math.PI/2),Xp=new h.Euler(0,0,Math.PI/2);class An extends Mt{invert;showArrowBody;constructor(e,n,r="",i,s=!1,o=!0){super(e,n,r,()=>({scale:!1,rotate:!1,translate:i!=null?[i]:this.options,multitouch:!1})),this.invert=s,this.showArrowBody=o}bind(e,n,r){const{options:i,disabled:s}=Pt(this.axis,r);if(i===!1)return;this.options=i;const o=this.invert?Xp:qp,a=new h.MeshBasicMaterial(Fe),l=ut(this.context,a,this.tag,{color:e,hoverColor:n,disabled:s}),c=new h.Mesh(d0,a);c.renderOrder=1/0,c.position.x=this.invert?-.5:.5,c.rotation.copy(o),this.add(c);let f,d;if(this.showArrowBody){const g=new h.MeshBasicMaterial(Fe);f=ut(this.context,g,this.tag,{color:e,hoverColor:16777024,disabled:s}),d=new h.Mesh(h0,g),d.renderOrder=1/0,d.rotation.copy(o),this.add(d)}const p=new h.Mesh(new h.CylinderGeometry(.13,0,.6,4));p.pointerEventsOrder=1/0,p.position.x=this.invert?-.3:.3,p.rotation.copy(o),p.visible=!1,this.add(p);const m=s?void 0:this.context.registerHandle(this.store,p,this.tag);return()=>{a.dispose(),m?.(),l?.(),f?.(),this.remove(c),d!=null&&this.remove(d),this.remove(p)}}}class Ps extends Mt{constructor(e,n,r="",i){super(e,n,r,()=>({translate:i??this.options,scale:!1,rotate:!1,multitouch:!1}))}bind(e,n,r){const{options:i,disabled:s}=Pt(this.axis,r);if(i===!1)return;this.options=i;const o=new h.MeshBasicMaterial(Fe),a=ut(this.context,o,this.tag,{opacity:.5,hoverOpacity:1,color:e,hoverColor:n,disabled:s}),l=new h.Mesh(new h.BoxGeometry(.2,.2,.01),o);l.renderOrder=1/0,l.pointerEventsOrder=1/0,l.position.set(.15,.15,0);const c=s?void 0:this.context.registerHandle(this.store,l,this.tag);return this.add(l),()=>{o.dispose(),l.geometry.dispose(),c?.(),a?.(),this.remove(l)}}}new h.Vector3;const Cl=new h.Quaternion;function Yp(t,e){const n=new h.Mesh(new h.OctahedronGeometry(.01,2),new h.MeshBasicMaterial(Fe));n.renderOrder=1/0,n.visible=!1,t.add(n);const r=new h.Mesh(new h.OctahedronGeometry(.01,2),new h.MeshBasicMaterial(Fe));r.renderOrder=1/0,r.visible=!1,t.add(r);const i=new h.BufferGeometry;i.setAttribute("position",new h.Float32BufferAttribute([0,0,0,1,1,1],3));const s=new h.LineSegments(i,new h.LineBasicMaterial(Fe));s.renderOrder=1/0,s.visible=!1,t.add(s);const o=e.subscribeApply((a,l)=>{r.position.set(0,0,0),n.position.copy(l.initial.position).sub(l.current.position);const c=e.getTarget();c!=null&&(Cl.copy(c.quaternion).invert(),n.position.applyQuaternion(Cl)),s.position.set(0,0,0),s.scale.copy(n.position),n.visible=!l.last,s.visible=!l.last,r.visible=!l.last});return()=>{n.geometry.dispose(),n.material.dispose(),r.geometry.dispose(),r.material.dispose(),s.geometry.dispose(),s.material.dispose(),t.remove(n),t.remove(r),t.remove(s),o()}}class Zp extends Mt{constructor(e){super(e,"xyz","",()=>({translate:this.options,scale:!1,rotate:!1,multitouch:!1}))}bind(e){const{options:n,disabled:r}=Pt(this.axis,e);if(n===!1)return;this.options=n;const i=new h.MeshBasicMaterial(Fe),s=ut(this.context,i,this.tag,{color:16777215,hoverColor:16776960,opacity:.25,hoverOpacity:1,disabled:r}),o=new h.Mesh(new h.OctahedronGeometry(.1,0),i);o.renderOrder=1/0,this.add(o);const a=new h.Mesh(new h.OctahedronGeometry(.2,0));a.pointerEventsOrder=1/0,a.visible=!1,this.add(a);const l=r?void 0:this.context.registerHandle(this.store,a,this.tag);return()=>{i.dispose(),o.geometry.dispose(),a.geometry.dispose(),l?.(),s?.(),this.remove(o),this.remove(a)}}}const Ll=new h.Vector3,je=new h.Quaternion,jl=new h.Quaternion,Nl=new h.Quaternion().setFromEuler(new h.Euler(0,0,Math.PI/2)),Fl=new h.Quaternion().setFromEuler(new h.Euler(0,-Math.PI/2,0)),Qp=new h.Quaternion,Kp=new h.Quaternion().setFromEuler(new h.Euler(0,-Math.PI/2,0)),Jp=new h.Quaternion().setFromEuler(new h.Euler(Math.PI/2,0,0));class e2 extends h.Group{context;size;fixed;free;translationX;translationY;translationZ;translationNegX;translationNegY;translationNegZ;translationXY;translationYZ;translationXZ;scaleGroup=new h.Group;xAxis=new h.Vector3;yAxis=new h.Vector3;zAxis=new h.Vector3;negXAxis=new h.Vector3;negYAxis=new h.Vector3;negZAxis=new h.Vector3;constructor(e,n,r){super(),this.context=e,this.size=n,this.fixed=r,this.add(this.scaleGroup),this.free=new Zp(this.context),this.scaleGroup.add(this.free),this.translationX=new An(this.context,"x",void 0,this.xAxis),this.scaleGroup.add(this.translationX),this.translationY=new An(this.context,"y",void 0,this.yAxis),this.scaleGroup.add(this.translationY),this.translationZ=new An(this.context,"z",void 0,this.zAxis),this.scaleGroup.add(this.translationZ),this.translationNegX=new An(this.context,"x",void 0,this.negXAxis,!0,!1),this.scaleGroup.add(this.translationNegX),this.translationNegY=new An(this.context,"y",void 0,this.negYAxis,!0,!1),this.scaleGroup.add(this.translationNegY),this.translationNegZ=new An(this.context,"z",void 0,this.negZAxis,!0,!1),this.scaleGroup.add(this.translationNegZ),this.translationXY=new Ps(this.context,"xy",void 0,[this.xAxis,this.yAxis]),this.scaleGroup.add(this.translationXY),this.translationXZ=new Ps(this.context,"xz",void 0,[this.xAxis,this.zAxis]),this.scaleGroup.add(this.translationXZ),this.translationYZ=new Ps(this.context,"yz",void 0,[this.yAxis,this.zAxis]),this.scaleGroup.add(this.translationYZ)}update(e){this.updateWorldMatrix(!0,!1),this.xAxis.set(1,0,0),this.yAxis.set(0,1,0),this.zAxis.set(0,0,1),this.free.quaternion.identity(),this.translationX.quaternion.copy(jl),this.translationY.quaternion.copy(Nl),this.translationZ.quaternion.copy(Fl),this.translationNegX.quaternion.copy(jl),this.translationNegY.quaternion.copy(Nl),this.translationNegZ.quaternion.copy(Fl),this.translationXY.quaternion.copy(Qp),this.translationYZ.quaternion.copy(Kp),this.translationXZ.quaternion.copy(Jp);const n=this.context.getSpace(),r=this.context.getTarget();n=="world"&&r!=null?(r.getWorldQuaternion(je).invert(),this.free.quaternion.premultiply(je),this.translationX.quaternion.premultiply(je),this.translationY.quaternion.premultiply(je),this.translationZ.quaternion.premultiply(je),this.translationNegX.quaternion.premultiply(je),this.translationNegY.quaternion.premultiply(je),this.translationNegZ.quaternion.premultiply(je),this.translationXY.quaternion.premultiply(je),this.translationYZ.quaternion.premultiply(je),this.translationXZ.quaternion.premultiply(je),r.parent!=null&&(r.parent.getWorldQuaternion(je).invert(),this.xAxis.applyQuaternion(je),this.yAxis.applyQuaternion(je),this.zAxis.applyQuaternion(je))):r!=null&&(this.xAxis.applyQuaternion(r.quaternion),this.yAxis.applyQuaternion(r.quaternion),this.zAxis.applyQuaternion(r.quaternion)),this.negXAxis.copy(this.xAxis).negate(),this.negYAxis.copy(this.yAxis).negate(),this.negZAxis.copy(this.zAxis).negate(),this.scaleGroup.scale.setScalar(1),r!=null&&(r.getWorldScale(Ll),this.scaleGroup.scale.divide(Ll)),this.scaleGroup.scale.multiplyScalar(ta(this,e,this.fixed??!0,this.size??1))}bind(e){const n=Yp(this,this.context),r=this.translationX.bind(16711680,16776960,e),i=this.translationY.bind(65280,16776960,e),s=this.translationZ.bind(255,16776960,e),o=this.translationNegX.bind(16711680,16776960,e),a=this.translationNegY.bind(65280,16776960,e),l=this.translationNegZ.bind(255,16776960,e),c=this.translationXY.bind(255,16776960,e),f=this.translationYZ.bind(16711680,16776960,e),d=this.translationXZ.bind(65280,16776960,e),p=this.free.bind(e);return()=>{n(),r?.(),i?.(),s?.(),o?.(),a?.(),l?.(),c?.(),f?.(),d?.(),p?.()}}}const t2=new h.Euler(0,0,-Math.PI/2),n2=new h.Euler(0,0,Math.PI/2);class Mn extends Mt{invert;showHandleLine;constructor(e,n,r="",i=!1,s=!0){super(e,n,r,()=>({scale:this.options,rotate:!1,translate:"as-scale",multitouch:!1})),this.invert=i,this.showHandleLine=s}bind(e,n,r){const{options:i,disabled:s}=Pt(this.axis,r);if(i===!1)return;this.options=i;const o=this.invert?n2:t2,a=new h.Group;a.position.x=this.invert?-.5:.5,a.rotation.copy(o),this.add(a);const l=new h.MeshBasicMaterial(Fe),c=ut(this.context,l,this.tag,{color:e,hoverColor:n,disabled:s}),f=new h.Mesh(new h.BoxGeometry(.08,.08,.08),l);f.renderOrder=1/0,f.rotation.copy(o),a.add(f);let d,p,m;if(this.showHandleLine){m=new h.Group,m.rotation.copy(o),this.add(m);const b=new h.MeshBasicMaterial(Fe);d=ut(this.context,b,this.tag,{color:e,hoverColor:n,disabled:s}),p=new h.Mesh(new h.CylinderGeometry(.0075,.0075,.5,3),b),p.renderOrder=1/0,p.position.y=.25,m.add(p)}const g=new h.Group;g.visible=!1,g.rotation.copy(o),g.position.x=this.invert?-.3:.3,this.add(g);const w=new h.Mesh(new h.CylinderGeometry(.2,0,.5,4));w.pointerEventsOrder=1/0,w.position.y=.04,g.add(w);const y=s?void 0:this.context.registerHandle(this.store,w,this.tag);return()=>{l.dispose(),w.geometry.dispose(),f.geometry.dispose(),p?.geometry.dispose(),y?.(),c?.(),d?.(),m!=null&&this.remove(m),this.remove(g),this.remove(a)}}}class Os extends Mt{constructor(e,n,r=""){super(e,n,r,()=>({translate:"as-scale",scale:this.options,rotate:!1,multitouch:!1}))}bind(e,n,r){const{options:i,disabled:s}=Pt(this.axis,r);if(i===!1)return;this.options=i;const o=new h.MeshBasicMaterial(Fe),a=ut(this.context,o,this.tag,{opacity:.5,hoverOpacity:1,color:e,hoverColor:n,disabled:s}),l=new h.Mesh(new h.BoxGeometry(.2,.2,.01),o);l.renderOrder=1/0,l.pointerEventsOrder=1/0,l.position.set(.15,.15,0);const c=s?void 0:this.context.registerHandle(this.store,l,this.tag);return this.add(l),()=>{o.dispose(),l.geometry.dispose(),c?.(),a?.(),this.remove(l)}}}const r2=new h.Euler(0,0,-Math.PI/2),i2=new h.Euler(0,0,Math.PI/2);class Pn extends Mt{actualAxis;invert;constructor(e,n="",r,i=!1){super(e,"xyz",n,()=>({scale:{uniform:!0,...this.options},rotate:!1,translate:"as-scale",multitouch:!1})),this.actualAxis=r,this.invert=i}bind(e,n,r){const{options:i,disabled:s}=Pt(this.actualAxis,r);if(i===!1)return;this.options=i;const o=this.invert?i2:r2,a=new h.Group;a.position.x=this.invert?-.7:.7,a.rotation.copy(o),this.add(a);const l=new h.MeshBasicMaterial(Fe),c=ut(this.context,l,this.tag,{color:e,hoverColor:n,opacity:.5,hoverOpacity:1,disabled:s}),f=new h.Mesh(new h.BoxGeometry(.08,.08,.08),l);f.renderOrder=1/0,f.rotation.copy(o),a.add(f);const d=new h.Mesh(new h.BoxGeometry(.15,.15,.15),l);d.visible=!1,d.pointerEventsOrder=1/0,d.rotation.copy(o),a.add(d);const p=s?void 0:this.context.registerHandle(this.store,d,this.tag);return()=>{l.dispose(),f.geometry.dispose(),p?.(),c?.(),this.remove(a)}}}const zl=new h.Vector3;class s2 extends h.Group{context;size;fixed;scaleX;scaleY;scaleZ;scaleNegX;scaleNegY;scaleNegZ;translationX;translationY;translationZ;translationNegX;translationNegY;translationNegZ;translationXY;translationYZ;translationXZ;constructor(e,n,r){super(),this.context=e,this.size=n,this.fixed=r,this.scaleX=new Pn(this.context,void 0,"x"),this.add(this.scaleX),this.scaleY=new Pn(this.context,void 0,"y"),this.scaleY.rotation.z=Math.PI/2,this.add(this.scaleY),this.scaleZ=new Pn(this.context,void 0,"z"),this.scaleZ.rotation.y=-Math.PI/2,this.add(this.scaleZ),this.scaleNegX=new Pn(this.context,void 0,"x",!0),this.add(this.scaleNegX),this.scaleNegY=new Pn(this.context,void 0,"y",!0),this.scaleNegY.rotation.z=Math.PI/2,this.add(this.scaleNegY),this.scaleNegZ=new Pn(this.context,void 0,"z",!0),this.scaleNegZ.rotation.y=-Math.PI/2,this.add(this.scaleNegZ),this.translationX=new Mn(this.context,"x"),this.add(this.translationX),this.translationY=new Mn(this.context,"y"),this.translationY.rotation.z=Math.PI/2,this.add(this.translationY),this.translationZ=new Mn(this.context,"z"),this.translationZ.rotation.y=-Math.PI/2,this.add(this.translationZ),this.translationNegX=new Mn(this.context,"x",void 0,!0,!1),this.add(this.translationNegX),this.translationNegY=new Mn(this.context,"y",void 0,!0,!1),this.translationNegY.rotation.z=Math.PI/2,this.add(this.translationNegY),this.translationNegZ=new Mn(this.context,"z",void 0,!0,!1),this.translationNegZ.rotation.y=-Math.PI/2,this.add(this.translationNegZ),this.translationXY=new Os(this.context,"xy"),this.add(this.translationXY),this.translationXZ=new Os(this.context,"xz"),this.translationXZ.rotation.x=Math.PI/2,this.add(this.translationXZ),this.translationYZ=new Os(this.context,"yz"),this.translationYZ.rotation.y=-Math.PI/2,this.add(this.translationYZ)}update(e){this.updateWorldMatrix(!0,!1),this.scale.setScalar(1);const n=this.context.getTarget();n!=null&&(n.getWorldScale(zl),this.scale.divide(zl)),this.scale.multiplyScalar(ta(this,e,this.fixed??!0,this.size??1))}bind(e){const n=this.scaleX.bind(16777215,16776960,e),r=this.scaleY.bind(16777215,16776960,e),i=this.scaleZ.bind(16777215,16776960,e),s=this.scaleNegX.bind(16777215,16776960,e),o=this.scaleNegY.bind(16777215,16776960,e),a=this.scaleNegZ.bind(16777215,16776960,e),l=this.translationX.bind(16711680,16776960,e),c=this.translationY.bind(65280,16776960,e),f=this.translationZ.bind(255,16776960,e),d=this.translationNegX.bind(16711680,16776960,e),p=this.translationNegY.bind(65280,16776960,e),m=this.translationNegZ.bind(255,16776960,e),g=this.translationXY.bind(255,16776960,e),w=this.translationYZ.bind(16711680,16776960,e),y=this.translationXZ.bind(65280,16776960,e);return()=>{l?.(),c?.(),f?.(),d?.(),p?.(),m?.(),g?.(),w?.(),y?.(),n?.(),r?.(),i?.(),s?.(),o?.(),a?.()}}}const Dl={x:{vector1:new h.Vector3(0,0,-1),vector2:new h.Vector3(0,-1,0),rotationOffset:new h.Quaternion,axis:[1,0,0]},y:{vector1:new h.Vector3(0,0,-1),vector2:new h.Vector3(-1,0,-1),rotationOffset:new h.Quaternion().setFromEuler(new h.Euler(0,0,Math.PI/2)),axis:[0,1,0]},z:{vector1:new h.Vector3(-1,0,0),vector2:new h.Vector3(0,-1,0),rotationOffset:new h.Quaternion().setFromEuler(new h.Euler(0,Math.PI/2,0)),axis:[0,0,1]}},ks=new h.Vector3,vr=new h.Vector3,ui=new h.Vector3,Qt=new h.Vector3,rt=new h.Quaternion;class Is extends Mt{direction=new h.Vector3(1,0,0);constructor(e,n,r=""){super(e,n,r,()=>({scale:!1,translate:"as-rotate",rotate:[this.direction],multitouch:!1}))}update(e){const{rotationOffset:n,vector1:r,vector2:i}=Dl[this.axis];e.getWorldPosition(ks),this.getWorldPosition(vr).sub(ks),ui.copy(r),Qt.copy(i);const s=this.context.getTarget(),o=this.context.getSpace();o==="local"&&s!=null&&(s.getWorldQuaternion(rt),ui.applyQuaternion(rt),Qt.applyQuaternion(rt)),Qt.crossVectors(ui,Qt);const a=vr.dot(Qt);Qt.multiplyScalar(a),vr.sub(Qt),this.quaternion.setFromUnitVectors(ui,vr.normalize()),o==="local"&&s!=null&&(s.getWorldQuaternion(rt),this.quaternion.multiply(rt)),this.quaternion.multiply(n),s?.parent!=null?(s.parent.matrixWorld.decompose(ks,rt,vr),rt.invert(),this.quaternion.premultiply(rt)):rt.identity(),this.store.getState()==null&&(this.direction.fromArray(Dl[this.axis].axis),this.direction.applyQuaternion(o==="local"&&s!=null?s?.quaternion:rt)),s!=null&&this.quaternion.premultiply(rt.copy(s.quaternion).invert())}bind(e,n){const{options:r,disabled:i}=Pt(this.axis,n);if(r===!1)return;this.options=r;const s=new h.MeshBasicMaterial(Fe),o=ut(this.context,s,this.tag,{color:e,hoverColor:16776960,disabled:i}),a=new h.Mesh(na(.5,.5),s);a.renderOrder=1/0,this.add(a);const l=new h.Mesh(new h.TorusGeometry(.5,.1,4,24));l.visible=!1,l.pointerEventsOrder=1/0,l.rotation.set(0,-Math.PI/2,-Math.PI/2),this.add(l);const c=i?void 0:this.context.registerHandle(this.store,l,this.tag);return()=>{s.dispose(),l.geometry.dispose(),a.geometry.dispose(),c?.(),o?.(),this.remove(l),this.remove(a)}}}const Cs=new h.Vector3,Ls=new h.Vector3,o2=new h.Vector3(1,0,0),wr=new h.Quaternion;class a2 extends Mt{constructor(e,n=""){super(e,"xyz",n,()=>({scale:!1,translate:"as-rotate",rotate:this.options,multitouch:!1}))}update(e){e.getWorldPosition(Cs),this.getWorldPosition(Ls).sub(Cs),this.quaternion.setFromUnitVectors(o2,Ls.normalize());const n=this.context.getTarget();n?.parent!=null&&(n.parent.matrixWorld.decompose(Cs,wr,Ls),wr.invert(),this.quaternion.premultiply(wr)),n!=null&&(wr.copy(n.quaternion).invert(),this.quaternion.premultiply(wr))}bind(e){const{options:n,disabled:r}=Pt(this.axis,e);if(n===!1)return;this.options=n;const i=new h.MeshBasicMaterial(Fe),s=ut(this.context,i,this.tag,{color:16777215,hoverColor:16776960,opacity:.25,disabled:r}),o=new h.Mesh(na(.5,1),i);o.renderOrder=1/0,this.add(o);const a=new h.Mesh(new h.SphereGeometry(.25,10,8));a.visible=!1,a.pointerEventsOrder=1/0,this.add(a);const l=r?void 0:this.context.registerHandle(this.store,a,this.tag);return()=>{this.pointerEvents="none",i.dispose(),a.geometry.dispose(),o.geometry.dispose(),l?.(),s?.(),this.remove(a),this.remove(o)}}}const js=new h.Vector3,l2=new h.Vector3,c2=new h.Vector3(1,0,0),On=new h.Quaternion;class u2 extends Mt{direction=new h.Vector3(1,0,0);constructor(e,n=""){super(e,"e",n,()=>({scale:!1,translate:"as-rotate",rotate:[this.direction],multitouch:!1}))}update(e){e.getWorldPosition(js),this.getWorldPosition(this.direction).sub(js).normalize(),this.quaternion.setFromUnitVectors(c2,this.direction);const n=this.context.getTarget();n?.parent!=null&&(n.parent.matrixWorld.decompose(js,On,l2),On.invert(),this.quaternion.premultiply(On),this.direction.applyQuaternion(On)),n!=null&&(On.copy(n.quaternion).invert(),this.quaternion.premultiply(On)),this.direction.negate()}bind(e){const{options:n,disabled:r}=Pt(this.axis,e);if(n===!1)return;this.options=n;const i=new h.MeshBasicMaterial(Fe),s=ut(this.context,i,this.tag,{color:16776960,hoverColor:16776960,opacity:.5,disabled:r}),o=new h.Mesh(na(.75,1),i);o.renderOrder=1/0,this.add(o);const a=new h.Mesh(new h.TorusGeometry(.75,.1,2,24),new h.MeshBasicMaterial({color:"white"}));a.visible=!1,a.rotation.y=Math.PI/2,a.pointerEventsOrder=1/0,this.add(a);const l=r?void 0:this.context.registerHandle(this.store,a,this.tag);return()=>{i.dispose(),a.geometry.dispose(),o.geometry.dispose(),l?.(),s?.(),this.remove(a),this.remove(o)}}}function na(t,e){const n=new h.TorusGeometry(t,.0075,3,64,e*Math.PI*2);return n.rotateY(Math.PI/2),n.rotateX(Math.PI/2),n}const Bl=new h.Vector3;class f2 extends h.Group{context;fixed;size;rotationX;rotationY;rotationZ;free;screen;constructor(e,n,r){super(),this.context=e,this.fixed=n,this.size=r,this.rotationX=new Is(this.context,"x"),this.add(this.rotationX),this.rotationY=new Is(this.context,"y"),this.add(this.rotationY),this.rotationZ=new Is(this.context,"z"),this.add(this.rotationZ),this.free=new a2(this.context),this.add(this.free),this.screen=new u2(this.context),this.add(this.screen)}update(e){this.updateWorldMatrix(!0,!1),this.rotationX.update(e),this.rotationY.update(e),this.rotationZ.update(e),this.free.update(e),this.screen.update(e),this.scale.setScalar(1);const n=this.context.getTarget();n!=null&&(n.getWorldScale(Bl),this.scale.divide(Bl)),this.scale.multiplyScalar(ta(this,e,this.fixed??!0,this.size??1))}bind(e){const n=this.rotationX.bind(16711680,e),r=this.rotationY.bind(65280,e),i=this.rotationZ.bind(255,e),s=this.screen.bind(e),o=this.free.bind(e);return()=>{n?.(),r?.(),i?.(),s?.(),o?.()}}}const d2=new h.Euler,h2=new h.Euler(0,0,Math.PI/2),p2=new h.Euler(0,-Math.PI/2,0);class m2 extends h.Group{xAxisHighlight;yAxisHighlight;zAxisHighlight;handles;context;constructor(e){super(),this.context=new Wp(this,e),this.xAxisHighlight=new Ms(this.context,d2),this.add(this.xAxisHighlight),this.yAxisHighlight=new Ms(this.context,h2),this.add(this.yAxisHighlight),this.zAxisHighlight=new Ms(this.context,p2),this.add(this.zAxisHighlight)}set space(e){this.context.space=e}get space(){return this.context.space}update(e,n){this.context.update(e),this.xAxisHighlight.update(),this.yAxisHighlight.update(),this.zAxisHighlight.update(),this.handles?.update(n)}bind(e,n){const r=this.xAxisHighlight.bind("x"),i=this.yAxisHighlight.bind("y"),s=this.zAxisHighlight.bind("z");switch(e){case"rotate":this.handles=new f2(this.context);break;case"scale":this.handles=new s2(this.context);break;case"translate":this.handles=new e2(this.context);break}this.add(this.handles);const o=this.handles.bind(n);return()=>{this.handles!=null&&this.remove(this.handles),this.handles=void 0,o(),r(),i(),s()}}}new h.Vector3(0,0,1);new h.Vector3(0,1,0);new h.Vector3;new h.Vector3;new h.Euler;new h.Quaternion;new h.Vector3;new h.Quaternion;new h.Quaternion;new h.Vector2;new h.Quaternion;new h.Vector3;new h.Vector3;new h.Vector3;new h.Vector2;new h.Vector2;new h.Vector3;new h.Vector3;new h.Vector2;new h.Vector2;new h.Vector2;new h.Vector2;new h.Vector3;new h.Vector3;const x2=2;class g2{constructor(e){this.xrDevice=e,this.combinedCameraPosition=new h.Vector3,this.isPointerLocked=!1,this.vec3=new h.Vector3,this.quat=new h.Quaternion,this.keyState={ShiftLeft:!1,KeyW:!1,KeyA:!1,KeyS:!1,KeyD:!1,ArrowUp:!1,ArrowDown:!1},this.lastTime=0,this.scene=new h.Scene,this.camera=new h.PerspectiveCamera(50,window.innerWidth/window.innerHeight,.1,40),this.playerRig=new h.Group,this.cameraRig=new h.Group,this.scene.add(this.playerRig),this.playerRig.add(this.cameraRig),this.cameraRig.position.fromArray(e.position.vec3),this.cameraRig.quaternion.fromArray(e.quaternion.quat),this.cameraRig.add(this.camera),this.camera.position.x-=e.ipd/2;const n=new h.Mesh(new h.RingGeometry(.25,.27,32),new h.MeshBasicMaterial({color:16777215,side:h.FrontSide}));n.rotateX(-Math.PI/2),this.scene.add(n),this.renderer=new h.WebGLRenderer({alpha:!0}),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(window.innerWidth,window.innerHeight),this.renderer.setClearColor(0,0),this.renderer.domElement.style.position="fixed",this.renderer.domElement.style.top="50vh",this.renderer.domElement.style.left="50vw",this.renderer.domElement.style.transform="translate(-50%, -50%)",this.transformHandles=new Map,["left","right"].forEach(r=>{const i=new m2;i.scale.setScalar(.1),i.position.fromArray(e.controllers[r].position.vec3),i.quaternion.fromArray(e.controllers[r].quaternion.quat),this.cameraRig.attach(i),i.userData={defaultPosition:i.position.toArray(),defaultQuaternion:i.quaternion.toArray()},i.userData.setMode=s=>{var o,a;(a=(o=i.userData).modeCleanup)===null||a===void 0||a.call(o),i.userData.modeCleanup=i.bind(s),i.userData.mode=s},i.userData.setMode("translate"),i.space="local",this.transformHandles.set(r,i),i.addEventListener("click",()=>{i.userData.mode==="translate"?i.userData.setMode("rotate"):i.userData.setMode("translate")})}),window.transformHandles=this.transformHandles,this.mouseMoveHandler=r=>{if(!this.isPointerLocked)return;const i=r.movementX||r.mozMovementX||r.webkitMovementX||0,s=r.movementY||r.mozMovementY||r.webkitMovementY||0;this.playerRig.rotation.y-=i*.002,this.cameraRig.rotation.x-=s*.002,e.quaternion.copy(this.cameraRig.getWorldQuaternion(new h.Quaternion))},this.cameraRig.getWorldPosition(this.combinedCameraPosition),this.headsetDefaultPosition=this.cameraRig.position.clone(),this.headsetDefaultQuaternion=this.cameraRig.quaternion.clone(),this.forwardHtmlEvents=$0(this.renderer.domElement,()=>this.camera,this.scene).update,document.addEventListener("pointerlockchange",this.pointerLockChangeHandler.bind(this),!1),document.addEventListener("mozpointerlockchange",this.pointerLockChangeHandler.bind(this),!1),document.addEventListener("webkitpointerlockchange",this.pointerLockChangeHandler.bind(this),!1),document.addEventListener("keydown",this.keyDownHandler.bind(this),!1),document.addEventListener("keyup",this.keyUpHandler.bind(this),!1)}lockPointer(){this.renderer.domElement.requestPointerLock=this.renderer.domElement.requestPointerLock||this.renderer.domElement.mozRequestPointerLock||this.renderer.domElement.webkitRequestPointerLock,this.renderer.domElement.requestPointerLock()}pointerLockChangeHandler(){this.isPointerLocked=document.pointerLockElement===this.renderer.domElement||document.mozPointerLockElement===this.renderer.domElement||document.webkitPointerLockElement===this.renderer.domElement,this.isPointerLocked?(document.addEventListener("mousemove",this.mouseMoveHandler,!1),Object.values(this.transformHandles).forEach(e=>{e.visible=!1})):(document.removeEventListener("mousemove",this.mouseMoveHandler,!1),Object.values(this.transformHandles).forEach(e=>{e.visible=!0}))}keyDownHandler(e){const{keyState:n}=this;e.code in n&&(n[e.code]=!0),n.ShiftLeft&&n.ArrowUp&&(this.cameraRig.position.y+=.05),n.ShiftLeft&&n.ArrowDown&&(this.cameraRig.position.y-=.05)}keyUpHandler(e){const{keyState:n}=this;e.code in n&&(n[e.code]=!1)}movePlayerRig(e){const{playerRig:n,keyState:r,vec3:i}=this;i.set((r.KeyD?1:0)-(r.KeyA?1:0),0,(r.KeyS?1:0)-(r.KeyW?1:0)),i.lengthSq()>0&&r.ShiftLeft&&(i.normalize().multiplyScalar(x2*e).applyQuaternion(n.quaternion),n.position.add(i))}resetDeviceTransforms(){const{playerRig:e,cameraRig:n,transformHandles:r}=this;n.position.copy(this.headsetDefaultPosition),n.quaternion.copy(this.headsetDefaultQuaternion),e.position.set(0,0,0),e.quaternion.set(0,0,0,1),r.forEach(i=>{i.position.fromArray(i.userData.defaultPosition),i.quaternion.fromArray(i.userData.defaultQuaternion)})}syncDeviceTransforms(){const{xrDevice:e,cameraRig:n,transformHandles:r}=this;e.position.copy(n.getWorldPosition(this.vec3)),e.quaternion.copy(n.getWorldQuaternion(this.quat)),r.forEach((i,s)=>{const o=e.primaryInputMode==="controller"?e.controllers[s]:e.hands[s];o.position.copy(i.getWorldPosition(this.vec3)),o.quaternion.copy(i.getWorldQuaternion(this.quat))})}renderScene(e){const n=this.xrDevice.fovy/Math.PI*180;let r=!1;this.camera.fov!==n&&(this.camera.fov=n,r=!0);const i=this.xrDevice.canvasDimensions;if(i){const o=this.renderer.domElement;(o.width!==i.width||o.height!==i.height)&&(this.camera.aspect=i.width/i.height,this.renderer.setSize(i.width,i.height),r=!0)}r&&this.camera.updateProjectionMatrix(),this.isPointerLocked?this.cameraRig.getWorldPosition(this.combinedCameraPosition):(this.cameraRig.position.y=this.combinedCameraPosition.y,this.playerRig.position.x=this.combinedCameraPosition.x,this.playerRig.position.z=this.combinedCameraPosition.z),this.forwardHtmlEvents(),this.transformHandles.forEach((o,a)=>{var l;const c=!!(!((l=this.xrDevice.controllers[a])===null||l===void 0)&&l.connected);o.visible=c&&!this.isPointerLocked,c&&o.update(e,this.camera)});const s=Math.min((e-this.lastTime)/1e3,.1);this.movePlayerRig(s),this.syncDeviceTransforms(),this.renderer.render(this.scene,this.camera),this.lastTime=e}get domElement(){return this.renderer.domElement}dispose(){this.renderer.dispose(),document.removeEventListener("pointerlockchange",this.pointerLockChangeHandler.bind(this),!1),document.removeEventListener("mozpointerlockchange",this.pointerLockChangeHandler.bind(this),!1),document.removeEventListener("webkitpointerlockchange",this.pointerLockChangeHandler.bind(this),!1),document.removeEventListener("mousemove",this.mouseMoveHandler,!1),document.removeEventListener("keydown",this.keyDownHandler.bind(this),!1),document.removeEventListener("keyup",this.keyUpHandler.bind(this),!1)}}const y2="1.1.1";class v2{constructor(e){this.version=y2,e.ipd=0,Jo.getState().setInputMode(e.primaryInputMode),this.devUIContainer=document.createElement("div"),this.devUIContainer.style.position="fixed",this.devUIContainer.style.width="100vw",this.devUIContainer.style.height="100vh",this.devUIContainer.style.top="50vh",this.devUIContainer.style.left="50vw",this.devUIContainer.style.transform="translate(-50%, -50%)",this.devUIContainer.style.pointerEvents="none";const n=this.devUIContainer.attachShadow({mode:"open"});this.inputLayer=new g2(e),u.clientExports.createRoot(n).render(u.jsxRuntimeExports.jsx(w2,{xrDevice:e,inputLayer:this.inputLayer,shadowRoot:n}));const i=()=>{const s=document.createElement("div");document.body.appendChild(s);const o=s.attachShadow({mode:"open"});u.clientExports.createRoot(o).render(u.jsxRuntimeExports.jsx(b2,{xrDevice:e,shadowRoot:o}))};document.body?i():window.onload=i}render(e){this.inputLayer.renderScene(e)}get devUICanvas(){return this.inputLayer.domElement}}const w2=({xrDevice:t,inputLayer:e,shadowRoot:n})=>{const[r,i]=C.useState(!1);return C.useEffect(()=>{const s=()=>{const o=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement;i(!!o)};return document.addEventListener("pointerlockchange",s,!1),document.addEventListener("mozpointerlockchange",s,!1),document.addEventListener("webkitpointerlockchange",s,!1),()=>{document.removeEventListener("pointerlockchange",s,!1),document.removeEventListener("mozpointerlockchange",s,!1),document.removeEventListener("webkitpointerlockchange",s,!1)}},[]),u.jsxRuntimeExports.jsx(Yu,{target:n,disableCSSOMInjection:!0,children:u.jsxRuntimeExports.jsxs("div",{style:{width:"100vw",height:"100vh",display:"flex",flexDirection:"column",justifyContent:"space-between",pointerEvents:"none"},children:[u.jsxRuntimeExports.jsx(Tp,{xrDevice:t,inputLayer:e}),u.jsxRuntimeExports.jsx(_p,{xrDevice:t,inputLayer:e,pointerLocked:r}),u.jsxRuntimeExports.jsx(vp,{xrDevice:t,inputLayer:e,pointerLocked:r})]})})},b2=({xrDevice:t,shadowRoot:e})=>{const[n,r]=C.useState(t.sessionOffered&&!t.activeSession);return C.useEffect(()=>{setInterval(()=>{r(t.sessionOffered&&!t.activeSession)},1e3)},[]),u.jsxRuntimeExports.jsx(Yu,{target:e,disableCSSOMInjection:!0,children:u.jsxRuntimeExports.jsxs(xo,{style:{zIndex:899,position:"fixed",top:n?"8px":"-30px",display:"flex",flexDirection:"row",alignItems:"center",justifyItems:"space-between",left:"50vw",transform:"translateX(-50%)",transition:"all 0.2s ease-in-out",paddingLeft:"5px",gap:"3px"},children:[u.jsxRuntimeExports.jsx(go,{size:24}),u.jsxRuntimeExports.jsx(Ke,{onClick:()=>{t.grantOfferedSession()},style:{fontSize:"16px"},children:"Enter XR"})]})})};var p0=1e-6,Be=typeof Float32Array<"u"?Float32Array:Array;function E2(){var t=new Be(9);return Be!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function Pe(){var t=new Be(16);return Be!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function T2(t){var e=new Be(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function m0(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function R2(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function x0(t,e){var n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],f=e[8],d=e[9],p=e[10],m=e[11],g=e[12],w=e[13],y=e[14],b=e[15],_=n*a-r*o,E=n*l-i*o,T=n*c-s*o,v=r*l-i*a,S=r*c-s*a,M=i*c-s*l,D=f*w-d*g,F=f*y-p*g,ue=f*b-m*g,fe=d*y-p*w,se=d*b-m*w,Y=p*b-m*y,Q=_*Y-E*se+T*fe+v*ue-S*F+M*D;return Q?(Q=1/Q,t[0]=(a*Y-l*se+c*fe)*Q,t[1]=(i*se-r*Y-s*fe)*Q,t[2]=(w*M-y*S+b*v)*Q,t[3]=(p*S-d*M-m*v)*Q,t[4]=(l*ue-o*Y-c*F)*Q,t[5]=(n*Y-i*ue+s*F)*Q,t[6]=(y*T-g*M-b*E)*Q,t[7]=(f*M-p*T+m*E)*Q,t[8]=(o*se-a*ue+c*D)*Q,t[9]=(r*ue-n*se-s*D)*Q,t[10]=(g*S-w*T+b*_)*Q,t[11]=(d*T-f*S-m*_)*Q,t[12]=(a*F-o*fe-l*D)*Q,t[13]=(n*fe-r*F+i*D)*Q,t[14]=(w*E-g*v-y*_)*Q,t[15]=(f*v-d*E+p*_)*Q,t):null}function Yi(t,e,n){var r=e[0],i=e[1],s=e[2],o=e[3],a=e[4],l=e[5],c=e[6],f=e[7],d=e[8],p=e[9],m=e[10],g=e[11],w=e[12],y=e[13],b=e[14],_=e[15],E=n[0],T=n[1],v=n[2],S=n[3];return t[0]=E*r+T*a+v*d+S*w,t[1]=E*i+T*l+v*p+S*y,t[2]=E*s+T*c+v*m+S*b,t[3]=E*o+T*f+v*g+S*_,E=n[4],T=n[5],v=n[6],S=n[7],t[4]=E*r+T*a+v*d+S*w,t[5]=E*i+T*l+v*p+S*y,t[6]=E*s+T*c+v*m+S*b,t[7]=E*o+T*f+v*g+S*_,E=n[8],T=n[9],v=n[10],S=n[11],t[8]=E*r+T*a+v*d+S*w,t[9]=E*i+T*l+v*p+S*y,t[10]=E*s+T*c+v*m+S*b,t[11]=E*o+T*f+v*g+S*_,E=n[12],T=n[13],v=n[14],S=n[15],t[12]=E*r+T*a+v*d+S*w,t[13]=E*i+T*l+v*p+S*y,t[14]=E*s+T*c+v*m+S*b,t[15]=E*o+T*f+v*g+S*_,t}function rr(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Vl(t,e,n){var r=n[0],i=n[1],s=n[2],o=Math.sqrt(r*r+i*i+s*s),a,l,c;return o<p0?null:(o=1/o,r*=o,i*=o,s*=o,a=Math.sin(e),l=Math.cos(e),c=1-l,t[0]=r*r*c+l,t[1]=i*r*c+s*a,t[2]=s*r*c-i*a,t[3]=0,t[4]=r*i*c-s*a,t[5]=i*i*c+l,t[6]=s*i*c+r*a,t[7]=0,t[8]=r*s*c+i*a,t[9]=i*s*c-r*a,t[10]=s*s*c+l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function Xr(t,e,n){var r=e[0],i=e[1],s=e[2],o=e[3],a=r+r,l=i+i,c=s+s,f=r*a,d=r*l,p=r*c,m=i*l,g=i*c,w=s*c,y=o*a,b=o*l,_=o*c;return t[0]=1-(m+w),t[1]=d+_,t[2]=p-b,t[3]=0,t[4]=d-_,t[5]=1-(f+w),t[6]=g+y,t[7]=0,t[8]=p+b,t[9]=g-y,t[10]=1-(f+m),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Br(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function yo(t,e){var n=e[0],r=e[1],i=e[2],s=e[4],o=e[5],a=e[6],l=e[8],c=e[9],f=e[10];return t[0]=Math.sqrt(n*n+r*r+i*i),t[1]=Math.sqrt(s*s+o*o+a*a),t[2]=Math.sqrt(l*l+c*c+f*f),t}function ki(t,e){var n=new Be(3);yo(n,e);var r=1/n[0],i=1/n[1],s=1/n[2],o=e[0]*r,a=e[1]*i,l=e[2]*s,c=e[4]*r,f=e[5]*i,d=e[6]*s,p=e[8]*r,m=e[9]*i,g=e[10]*s,w=o+f+g,y=0;return w>0?(y=Math.sqrt(w+1)*2,t[3]=.25*y,t[0]=(d-m)/y,t[1]=(p-l)/y,t[2]=(a-c)/y):o>f&&o>g?(y=Math.sqrt(1+o-f-g)*2,t[3]=(d-m)/y,t[0]=.25*y,t[1]=(a+c)/y,t[2]=(p+l)/y):f>g?(y=Math.sqrt(1+f-o-g)*2,t[3]=(p-l)/y,t[0]=(a+c)/y,t[1]=.25*y,t[2]=(d+m)/y):(y=Math.sqrt(1+g-o-f)*2,t[3]=(a-c)/y,t[0]=(p+l)/y,t[1]=(d+m)/y,t[2]=.25*y),t}function S2(t,e,n,r){var i=e[0],s=e[1],o=e[2],a=e[3],l=i+i,c=s+s,f=o+o,d=i*l,p=i*c,m=i*f,g=s*c,w=s*f,y=o*f,b=a*l,_=a*c,E=a*f,T=r[0],v=r[1],S=r[2];return t[0]=(1-(g+y))*T,t[1]=(p+E)*T,t[2]=(m-_)*T,t[3]=0,t[4]=(p-E)*v,t[5]=(1-(d+y))*v,t[6]=(w+b)*v,t[7]=0,t[8]=(m+_)*S,t[9]=(w-b)*S,t[10]=(1-(d+g))*S,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function _2(t,e,n,r,i){var s=1/Math.tan(e/2);if(t[0]=s/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,i!=null&&i!==1/0){var o=1/(r-i);t[10]=(i+r)*o,t[14]=2*i*r*o}else t[10]=-1,t[14]=-2*r;return t}var Ul=_2;function Me(){var t=new Be(3);return Be!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function A2(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function at(t,e,n){var r=new Be(3);return r[0]=t,r[1]=e,r[2]=n,r}function Ns(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Pr(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function M2(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function g0(t,e){var n=e[0],r=e[1],i=e[2],s=n*n+r*r+i*i;return s>0&&(s=1/Math.sqrt(s)),t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t}function y0(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ei(t,e,n){var r=e[0],i=e[1],s=e[2],o=n[0],a=n[1],l=n[2];return t[0]=i*l-s*a,t[1]=s*o-r*l,t[2]=r*a-i*o,t}function vo(t,e,n,r){var i=e[0],s=e[1],o=e[2];return t[0]=i+r*(n[0]-i),t[1]=s+r*(n[1]-s),t[2]=o+r*(n[2]-o),t}function P2(t,e,n){var r=n[0],i=n[1],s=n[2],o=n[3],a=e[0],l=e[1],c=e[2],f=i*c-s*l,d=s*a-r*c,p=r*l-i*a;return f=f+f,d=d+d,p=p+p,t[0]=a+o*f+i*p-s*d,t[1]=l+o*d+s*f-r*p,t[2]=c+o*p+r*d-i*f,t}var O2=A2;(function(){var t=Me();return function(e,n,r,i,s,o){var a,l;for(n||(n=3),r||(r=0),i?l=Math.min(i*n+r,e.length):l=e.length,a=r;a<l;a+=n)t[0]=e[a],t[1]=e[a+1],t[2]=e[a+2],s(t,t,o),e[a]=t[0],e[a+1]=t[1],e[a+2]=t[2];return e}})();function wo(){var t=new Be(4);return Be!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function k2(t,e,n,r){var i=new Be(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function I2(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function bo(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function C2(t,e){var n=e[0],r=e[1],i=e[2],s=e[3],o=n*n+r*r+i*i+s*s;return o>0&&(o=1/Math.sqrt(o)),t[0]=n*o,t[1]=r*o,t[2]=i*o,t[3]=s*o,t}function Gl(t,e,n){var r=e[0],i=e[1],s=e[2],o=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*s+n[12]*o,t[1]=n[1]*r+n[5]*i+n[9]*s+n[13]*o,t[2]=n[2]*r+n[6]*i+n[10]*s+n[14]*o,t[3]=n[3]*r+n[7]*i+n[11]*s+n[15]*o,t}(function(){var t=wo();return function(e,n,r,i,s,o){var a,l;for(n||(n=4),r||(r=0),i?l=Math.min(i*n+r,e.length):l=e.length,a=r;a<l;a+=n)t[0]=e[a],t[1]=e[a+1],t[2]=e[a+2],t[3]=e[a+3],s(t,t,o),e[a]=t[0],e[a+1]=t[1],e[a+2]=t[2],e[a+3]=t[3];return e}})();function ct(){var t=new Be(4);return Be!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function v0(t,e,n){n=n*.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function L2(t,e,n){var r=e[0],i=e[1],s=e[2],o=e[3],a=n[0],l=n[1],c=n[2],f=n[3];return t[0]=r*f+o*a+i*c-s*l,t[1]=i*f+o*l+s*a-r*c,t[2]=s*f+o*c+r*l-i*a,t[3]=o*f-r*a-i*l-s*c,t}function Cr(t,e,n,r){var i=e[0],s=e[1],o=e[2],a=e[3],l=n[0],c=n[1],f=n[2],d=n[3],p,m,g,w,y;return m=i*l+s*c+o*f+a*d,m<0&&(m=-m,l=-l,c=-c,f=-f,d=-d),1-m>p0?(p=Math.acos(m),g=Math.sin(p),w=Math.sin((1-r)*p)/g,y=Math.sin(r*p)/g):(w=1-r,y=r),t[0]=w*i+y*l,t[1]=w*s+y*c,t[2]=w*o+y*f,t[3]=w*a+y*d,t}function j2(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function N2(t,e){var n=e[0]+e[4]+e[8],r;if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[i*3+i]&&(i=2);var s=(i+1)%3,o=(i+2)%3;r=Math.sqrt(e[i*3+i]-e[s*3+s]-e[o*3+o]+1),t[i]=.5*r,r=.5/r,t[3]=(e[s*3+o]-e[o*3+s])*r,t[s]=(e[s*3+i]+e[i*3+s])*r,t[o]=(e[o*3+i]+e[i*3+o])*r}return t}var Ii=k2,Fs=I2,Hl=bo,Zi=C2;(function(){var t=Me(),e=at(1,0,0),n=at(0,1,0);return function(r,i,s){var o=y0(i,s);return o<-.999999?(Ei(t,e,i),O2(t)<1e-6&&Ei(t,n,i),g0(t,t),v0(r,t,Math.PI),r):o>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(Ei(t,i,s),r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=1+o,Zi(r,r))}})();(function(){var t=ct(),e=ct();return function(n,r,i,s,o,a){return Cr(t,r,o,a),Cr(e,i,s,a),Cr(n,t,e,2*a*(1-a)),n}})();(function(){var t=E2();return function(e,n,r,i){return t[0]=r[0],t[3]=r[1],t[6]=r[2],t[1]=i[0],t[4]=i[1],t[7]=i[2],t[2]=-n[0],t[5]=-n[1],t[8]=-n[2],Zi(e,N2(e,t))}})();const X=Symbol("@iwer/action-player"),Je=Symbol("@iwer/xr-anchor"),zs=Symbol("@iwer/xr-controller"),R=Symbol("@iwer/xr-device"),Kt=Symbol("@iwer/xr-hand-input"),ve=Symbol("@iwer/xr-tracked-input"),ie=Symbol("@iwer/xr-frame"),z=Symbol("@iwer/gamepad"),et=Symbol("@iwer/xr-system"),Lt=Symbol("@iwer/xr-input-source"),Nt=Symbol("@iwer/xr-webgl-layer"),Ft=Symbol("@iwer/xr-mesh"),zt=Symbol("@iwer/xr-plane"),$l=Symbol("@iwer/xr-joint-pose"),br=Symbol("@iwer/xr-pose"),Wl=Symbol("@iwer/xr-viewer-pose"),He=Symbol("@iwer/xr-rigid-transform"),Er=Symbol("@iwer/xr-render-state"),x=Symbol("@iwer/xr-session"),cn=Symbol("@iwer/xr-joint-space"),Dt=Symbol("@iwer/xr-reference-space"),Ee=Symbol("@iwer/xr-space"),Jt=Symbol("@iwer/xr-view"),Tr=Symbol("@iwer/xr-viewport"),$e=Symbol("@iwer/xr-ray"),Rt=Symbol("@iwer/xr-hit-test");class we extends EventTarget{constructor(e,n){super(),this[Ee]={parentSpace:e,offsetMatrix:n?T2(n):Pe(),emulated:!0}}}class F2 extends we{constructor(){super(void 0,Pe())}}class ir{static updateOffsetPosition(e,n){const r=e[Ee].offsetMatrix;rr(r,n)}static updateOffsetQuaternion(e,n){const r=e[Ee].offsetMatrix,i=Me();Br(i,r),Xr(r,n,i)}static updateOffsetMatrix(e,n){const r=e[Ee].offsetMatrix;m0(r,n)}static calculateGlobalOffsetMatrix(e,n=Pe()){const r=e[Ee].parentSpace?ir.calculateGlobalOffsetMatrix(e[Ee].parentSpace):Pe();return Yi(n,r,e[Ee].offsetMatrix),n}}let un=class w0{constructor(e=0,n=0,r=0){this.vec3=at(e,n,r),this.tempVec3=Me()}get x(){return this.vec3[0]}set x(e){this.vec3[0]=e}get y(){return this.vec3[1]}set y(e){this.vec3[1]=e}get z(){return this.vec3[2]}set z(e){this.vec3[2]=e}set(e,n,r){return Pr(this.vec3,e,n,r),this}clone(){return new w0(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}normalize(){return Ns(this.tempVec3,this.vec3),g0(this.vec3,this.tempVec3),this}add(e){return Ns(this.tempVec3,this.vec3),M2(this.vec3,this.tempVec3,e.vec3),this}applyQuaternion(e){return Ns(this.tempVec3,this.vec3),P2(this.vec3,this.tempVec3,e.quat),this}},Lr=class b0{constructor(e=0,n=0,r=0,i=1){this.quat=Ii(e,n,r,i),this.tempQuat=ct()}get x(){return this.quat[0]}set x(e){this.quat[0]=e}get y(){return this.quat[1]}set y(e){this.quat[1]=e}get z(){return this.quat[2]}set z(e){this.quat[2]=e}get w(){return this.quat[3]}set w(e){this.quat[3]=e}set(e,n,r,i){return Hl(this.quat,e,n,r,i),this}clone(){return new b0(this.x,this.y,this.z,this.w)}copy(e){return Hl(this.quat,e.x,e.y,e.z,e.w),this}normalize(){return Fs(this.tempQuat,this.quat),Zi(this.quat,this.tempQuat),this}invert(){return Fs(this.tempQuat,this.quat),j2(this.quat,this.tempQuat),this}multiply(e){return Fs(this.tempQuat,this.quat),L2(this.quat,this.tempQuat,e.quat),this}setFromAxisAngle(e,n){return v0(this.quat,e.vec3,n),this}};var Vr;(function(t){t.None="",t.Standard="standard",t.XRStandard="xr-standard"})(Vr||(Vr={}));class E0{constructor(e,n){this[z]={type:e,eventTrigger:n,pressed:!1,touched:!1,value:0,lastFrameValue:0,pendingValue:null}}get pressed(){return this[z].type==="manual"?this[z].pressed:this[z].value>0}get touched(){return this[z].type==="manual"?this[z].touched:this[z].touched||this.pressed}get value(){return this[z].value}}class z2{constructor(){this.pressed=!1,this.touched=!1,this.value=0}}class ra{constructor(e,n="",r=-1){this[z]={id:n,index:r,connected:!1,timestamp:performance.now(),mapping:e.mapping,buttonsMap:{},buttonsSequence:[],axesMap:{},axesSequence:[],hapticActuators:[]},e.buttons.forEach(i=>{var s;i===null?this[z].buttonsSequence.push(null):(this[z].buttonsSequence.push(i.id),this[z].buttonsMap[i.id]=new E0(i.type,(s=i.eventTrigger)!==null&&s!==void 0?s:null))}),e.axes.forEach(i=>{i===null?this[z].axesSequence.push(null):(this[z].axesSequence.push(i.id+i.type),this[z].axesMap[i.id]||(this[z].axesMap[i.id]={x:0,y:0}))})}get id(){return this[z].id}get index(){return this[z].index}get connected(){return this[z].connected}get timestamp(){return this[z].timestamp}get mapping(){return this[z].mapping}get axes(){const e=[];return this[z].axesSequence.forEach(n=>{if(n===null)e.push(null);else{const r=n.substring(0,n.length-6),i=n.substring(n.length-6);e.push(i==="y-axis"?this[z].axesMap[r].y:this[z].axesMap[r].x)}}),e}get buttons(){return this[z].buttonsSequence.map(e=>e===null?new z2:this[z].buttonsMap[e])}get hapticActuators(){return this[z].hapticActuators}get vibrationActuator(){return null}}var We;(function(t){t.None="none",t.Left="left",t.Right="right"})(We||(We={}));var Ci;(function(t){t.Gaze="gaze",t.TrackedPointer="tracked-pointer",t.Screen="screen",t.TransientPointer="transient-pointer"})(Ci||(Ci={}));class D2 extends Array{}class Qi{constructor(e,n,r,i,s,o,a){this[Lt]={handedness:e,targetRayMode:n,targetRaySpace:i,gripSpace:o,profiles:r,gamepad:s,hand:a}}get handedness(){return this[Lt].handedness}get targetRayMode(){return this[Lt].targetRayMode}get targetRaySpace(){return this[Lt].targetRaySpace}get gripSpace(){return this[Lt].gripSpace}get profiles(){return this[Lt].profiles}get gamepad(){return this[Lt].gamepad}get hand(){return this[Lt].hand}}class Ti extends Event{constructor(e,n){if(super(e,n),!n.frame)throw new Error("XRInputSourceEventInit.frame is required");if(!n.inputSource)throw new Error("XRInputSourceEventInit.inputSource is required");this.frame=n.frame,this.inputSource=n.inputSource}}const ql={[We.Left]:{position:new un(-.25,1.5,-.4),quaternion:new Lr},[We.Right]:{position:new un(.25,1.5,-.4),quaternion:new Lr},[We.None]:{position:new un(.25,1.5,-.4),quaternion:new Lr}};class T0{constructor(e){this[ve]={inputSource:e,position:ql[e.handedness].position.clone(),quaternion:ql[e.handedness].quaternion.clone(),connected:!0,lastFrameConnected:!1,inputSourceChanged:!0}}get position(){return this[ve].position}get quaternion(){return this[ve].quaternion}get inputSource(){return this[ve].inputSource}get connected(){return this[ve].connected}set connected(e){this[ve].connected=e,this[ve].inputSource.gamepad[z].connected=e}onFrameStart(e){const n=this[ve].inputSource.targetRaySpace;Xr(n[Ee].offsetMatrix,this[ve].quaternion.quat,this[ve].position.vec3);const r=e.session;this[ve].inputSource.gamepad.buttons.forEach(i=>{i instanceof E0&&(i[z].lastFrameValue=i[z].value,i[z].pendingValue!=null&&(i[z].value=i[z].pendingValue,i[z].pendingValue=null),i[z].eventTrigger!=null&&(i[z].lastFrameValue===0&&i[z].value>0?(r.dispatchEvent(new Ti(i[z].eventTrigger,{frame:e,inputSource:this[ve].inputSource})),r.dispatchEvent(new Ti(i[z].eventTrigger+"start",{frame:e,inputSource:this[ve].inputSource}))):i[z].lastFrameValue>0&&i[z].value===0&&r.dispatchEvent(new Ti(i[z].eventTrigger+"end",{frame:e,inputSource:this[ve].inputSource}))))}),this[ve].inputSourceChanged=this.connected!==this[ve].lastFrameConnected,this[ve].lastFrameConnected=this.connected}}class B2 extends T0{constructor(e,n,r){if(!e.layout[n])throw new DOMException("Handedness not supported","InvalidStateError");const i=new we(r),s=e.layout[n].gripOffsetMatrix?new we(i,e.layout[n].gripOffsetMatrix):void 0,o=[e.profileId,...e.fallbackProfileIds],a=new Qi(n,Ci.TrackedPointer,o,i,new ra(e.layout[n].gamepad),s);super(a),this[zs]={profileId:e.profileId,gamepadConfig:e.layout[n].gamepad}}get gamepadConfig(){return this[zs].gamepadConfig}get profileId(){return this[zs].profileId}updateButtonValue(e,n){if(n>1||n<0){console.warn(`Out-of-range value ${n} provided for button ${e}.`);return}const r=this[ve].inputSource.gamepad[z].buttonsMap[e];if(r){if(r[z].type==="binary"&&n!=1&&n!=0){console.warn(`Non-binary value ${n} provided for binary button ${e}.`);return}r[z].pendingValue=n}else console.warn(`Current controller does not have button ${e}.`)}updateButtonTouch(e,n){const r=this[ve].inputSource.gamepad[z].buttonsMap[e];r?r[z].touched=n:console.warn(`Current controller does not have button ${e}.`)}updateAxis(e,n,r){if(r>1||r<-1){console.warn(`Out-of-range value ${r} provided for ${e} axes.`);return}const i=this[ve].inputSource.gamepad[z].axesMap[e];i?n==="x-axis"?i.x=r:n==="y-axis"&&(i.y=r):console.warn(`Current controller does not have ${e} axes.`)}updateAxes(e,n,r){if(n>1||n<-1||r>1||r<-1){console.warn(`Out-of-range value x:${n}, y:${r} provided for ${e} axes.`);return}const i=this[ve].inputSource.gamepad[z].axesMap[e];i?(i.x=n,i.y=r):console.warn(`Current controller does not have ${e} axes.`)}}class V2{constructor(e,n,r,i,s){this[Ft]={nativeMesh:e,frame:void 0,meshSpace:n,vertices:r,indices:i,lastChangedTime:performance.now(),semanticLabel:s}}get meshSpace(){return this[Ft].meshSpace}get vertices(){return this[Ft].vertices}get indices(){return this[Ft].indices}get lastChangedTime(){return this[Ft].lastChangedTime}get semanticLabel(){return this[Ft].semanticLabel}}class U2 extends Set{}class G2{constructor(e,n,r,i){this.transform=e,this.vertices=n,this.indices=r,this.semanticLabel=i}}var Z;(function(t){t.Desk="desk",t.Couch="couch",t.Floor="floor",t.Ceiling="ceiling",t.Wall="wall",t.Door="door",t.Window="window",t.Table="table",t.Shelf="shelf",t.Bed="bed",t.Screen="screen",t.Lamp="lamp",t.Plant="plant",t.WallArt="wall art",t.GlobalMesh="global mesh",t.Other="other"})(Z||(Z={}));var Ie;(function(t){t.Horizontal="horizontal",t.Vertical="vertical"})(Ie||(Ie={}));const H2={[Z.Desk]:Ie.Horizontal,[Z.Couch]:Ie.Horizontal,[Z.Floor]:Ie.Horizontal,[Z.Ceiling]:Ie.Horizontal,[Z.Wall]:Ie.Vertical,[Z.Door]:Ie.Vertical,[Z.Window]:Ie.Vertical,[Z.Table]:Ie.Horizontal,[Z.Shelf]:Ie.Horizontal,[Z.Bed]:Ie.Horizontal,[Z.Screen]:Ie.Horizontal,[Z.Lamp]:Ie.Horizontal,[Z.Plant]:Ie.Horizontal,[Z.WallArt]:Ie.Vertical};class $2{constructor(e,n,r,i){this[zt]={nativePlane:e,frame:void 0,planeSpace:n,polygon:r,lastChangedTime:performance.now(),semanticLabel:i,orientation:i?H2[i]:void 0}}get planeSpace(){return this[zt].planeSpace}get polygon(){return this[zt].polygon}get orientation(){return this[zt].orientation}get lastChangedTime(){return this[zt].lastChangedTime}get semanticLabel(){return this[zt].semanticLabel}}class W2 extends Set{}class q2{constructor(e,n,r){this.transform=e,this.polygon=n,this.semanticLabel=r}}class R0{constructor(e,n){this[Je]={anchorSpace:e,session:n,deleted:!1},n[x].trackedAnchors.add(this)}get anchorSpace(){if(this[Je].deleted)throw new DOMException("XRAnchor has already been deleted.","InvalidStateError");return this[Je].anchorSpace}requestPersistentHandle(){return new Promise((e,n)=>{if(this[Je].deleted)n(new DOMException("XRAnchor has already been deleted.","InvalidStateError"));else{const r=this[Je].session[x].persistentAnchors;for(const[s,o]of r.entries())if(o===this){e(s);return}const i=crypto.randomUUID();S0.createPersistentAnchor(this[Je].session,this,i),e(i)}})}delete(){this[Je].deleted||(this[Je].anchorSpace=null,this[Je].deleted=!0,this[Je].session[x].trackedAnchors.delete(this))}}class Xl extends Set{}const Ds="@immersive-web-emulation-runtime/persistent-anchors";class S0{static recoverPersistentAnchorsFromStorage(e){const n=JSON.parse(localStorage.getItem(Ds)||"{}");Object.entries(n).forEach(([r,i])=>{const s=e[x].device[R].globalSpace,o=new we(s,i),a=new R0(o,e);e[x].persistentAnchors.set(r,a)})}static createPersistentAnchor(e,n,r){e[x].trackedAnchors.add(n),e[x].persistentAnchors.set(r,n);const i=JSON.parse(localStorage.getItem(Ds)||"{}");i[r]=Array.from(n[Je].anchorSpace[Ee].offsetMatrix),localStorage.setItem(Ds,JSON.stringify(i))}}class xn{constructor(e,n){const r=at(0,0,0),i=ct();this[He]={matrix:Pe(),position:e?at(e.x,e.y,e.z):r,orientation:n?Zi(ct(),Ii(n.x,n.y,n.z,n.w)):i,inverse:null},this.updateMatrix()}updateMatrix(){Xr(this[He].matrix,this[He].orientation,this[He].position)}get matrix(){return this[He].matrix}get position(){const e=this[He].position;return new DOMPointReadOnly(e[0],e[1],e[2],1)}get orientation(){const e=this[He].orientation;return new DOMPointReadOnly(e[0],e[1],e[2],e[3])}get inverse(){if(!this[He].inverse){const e=Pe();if(!x0(e,this[He].matrix))throw new Error("Matrix is not invertible.");let n=Me();Br(n,e);let r=ct();ki(r,e),this[He].inverse=new xn(new DOMPointReadOnly(n[0],n[1],n[2],1),new DOMPointReadOnly(r[0],r[1],r[2],r[3])),this[He].inverse[He].inverse=this}return this[He].inverse}}let Yl=class{constructor(e=0,n=0,r=0,i=1){this.x=e,this.y=n,this.z=r,this.w=i}};class X2{constructor(e,n){const r={x:0,y:0,z:0,w:1},i={x:0,y:0,z:-1,w:0};if(e instanceof xn){const a=e.matrix,l=bo(wo(),r.x,r.y,r.z,r.w),c=bo(wo(),i.x,i.y,i.z,i.w);Gl(l,l,a),Gl(c,c,a),r.x=l[0],r.y=l[1],r.z=l[2],r.w=l[3],i.x=c[0],i.y=c[1],i.z=c[2],i.w=c[3]}else if(e&&(r.x=e.x,r.y=e.y,r.z=e.z,r.w=e.w),n){if(n.x===0&&n.y===0&&n.z===0||n.w!==0)throw new DOMException("Invalid direction value to construct XRRay","TypeError");i.x=n.x,i.y=n.y,i.z=n.z,i.w=n.w}const s=Math.sqrt(i.x*i.x+i.y*i.y+i.z*i.z)||1;i.x=i.x/s,i.y=i.y/s,i.z=i.z/s,this[$e]={origin:new Yl(r.x,r.y,r.z,r.w),direction:new Yl(i.x,i.y,i.z,i.w),matrix:null}}get origin(){return this[$e].origin}get direction(){return this[$e].direction}get matrix(){if(this[$e].matrix)return this[$e].matrix;const e=Pr(Me(),0,0,-1),n=Pr(Me(),this[$e].origin.x,this[$e].origin.y,this[$e].origin.z),r=Pr(Me(),this[$e].direction.x,this[$e].direction.y,this[$e].direction.z),i=Ei(Me(),r,e),s=y0(r,e),o=Pe();s>-1&&s<1?Vl(o,Math.acos(s),i):s===-1?Vl(o,Math.acos(s),Pr(Me(),1,0,0)):R2(o);const a=rr(Pe(),n),l=Yi(Pe(),a,o);return this[$e].matrix=new Float32Array(l),this[$e].matrix}}class Y2{constructor(e,n){var r;this[Rt]={session:e,space:n.space,offsetRay:(r=n.offsetRay)!==null&&r!==void 0?r:new X2}}cancel(){this[Rt].session[x].hitTestSources.delete(this)}}class Z2{constructor(e,n){this[Rt]={frame:e,offsetSpace:n}}getPose(e){return this[Rt].frame.getPose(this[Rt].offsetSpace,e)}createAnchor(){return this[Rt].frame.createAnchor(new xn,this[Rt].offsetSpace)}}class _0 extends Event{constructor(e,n){if(super(e,n),!n.session)throw new Error("XRInputSourcesChangeEventInit.session is required");if(!n.added)throw new Error("XRInputSourcesChangeEventInit.added is required");if(!n.removed)throw new Error("XRInputSourcesChangeEventInit.removed is required");this.session=n.session,this.added=n.added,this.removed=n.removed}}var A0,_e;(function(t){t.Viewer="viewer",t.Local="local",t.LocalFloor="local-floor",t.BoundedFloor="bounded-floor",t.Unbounded="unbounded"})(_e||(_e={}));class mn extends we{constructor(e,n,r){super(n,r),this[A0]={type:null,onreset:()=>{}},this[Dt].type=e}get onreset(){var e;return(e=this[Dt].onreset)!==null&&e!==void 0?e:(()=>{})}set onreset(e){this[Dt].onreset&&this.removeEventListener("reset",this[Dt].onreset),this[Dt].onreset=e,e&&this.addEventListener("reset",e)}getOffsetReferenceSpace(e){return new mn(this[Dt].type,this,e)}}A0=Dt;class Eo{constructor(e={},n){this[Er]={depthNear:e.depthNear||n?.depthNear||.1,depthFar:e.depthFar||n?.depthFar||1e3,inlineVerticalFieldOfView:e.inlineVerticalFieldOfView||n?.inlineVerticalFieldOfView||null,baseLayer:e.baseLayer||n?.baseLayer||null}}get depthNear(){return this[Er].depthNear}get depthFar(){return this[Er].depthFar}get inlineVerticalFieldOfView(){return this[Er].inlineVerticalFieldOfView}get baseLayer(){return this[Er].baseLayer}}class Li extends Event{constructor(e,n){if(super(e,n),!n.session)throw new Error("XRSessionEventInit.session is required");this.session=n.session}}var me;(function(t){t.None="none",t.Left="left",t.Right="right"})(me||(me={}));class M0{constructor(e,n,r,i){this[Jt]={eye:e,projectionMatrix:n,transform:r,recommendedViewportScale:null,requestedViewportScale:1,session:i}}get eye(){return this[Jt].eye}get projectionMatrix(){return this[Jt].projectionMatrix}get transform(){return this[Jt].transform}get recommendedViewportScale(){return this[Jt].recommendedViewportScale}requestViewportScale(e){if(e===null||e<=0||e>1){console.warn("Invalid scale value. Scale must be > 0 and <= 1.");return}this[Jt].requestedViewportScale=e}}class Ki{constructor(e,n=!1,r=void 0,i=void 0){this[br]={transform:e,emulatedPosition:n,linearVelocity:r,angularVelocity:i}}get transform(){return this[br].transform}get emulatedPosition(){return this[br].emulatedPosition}get linearVelocity(){return this[br].linearVelocity}get angularVelocity(){return this[br].angularVelocity}}class P0 extends Ki{constructor(e,n,r=!1,i=void 0,s=void 0){super(e,r,i,s),this[$l]={radius:n}}get radius(){return this[$l].radius}}class O0 extends Ki{constructor(e,n,r=!1,i=void 0,s=void 0){super(e,r,i,s),this[Wl]={views:Object.freeze(n)}}get views(){return this[Wl].views}}const Zl=Pe(),Ql=Pe(),Kl=Pe(),Jl=(t,e,n)=>{ir.calculateGlobalOffsetMatrix(e,Zl),ir.calculateGlobalOffsetMatrix(n,Ql),x0(Kl,Ql),Yi(t,Kl,Zl)};class k0{constructor(e,n,r,i,s){this[ie]={session:e,id:n,active:r,animationFrame:i,predictedDisplayTime:s,tempMat4:Pe(),detectedPlanes:new W2,detectedMeshes:new U2,trackedAnchors:e[x].frameTrackedAnchors,hitTestResultsMap:new Map}}get session(){return this[ie].session}get predictedDisplayTime(){return this[ie].predictedDisplayTime}getPose(e,n){if(!this[ie].active)throw new DOMException("XRFrame access outside the callback that produced it is invalid.","InvalidStateError");Jl(this[ie].tempMat4,e,n);const r=Me();Br(r,this[ie].tempMat4);const i=ct();return ki(i,this[ie].tempMat4),new Ki(new xn({x:r[0],y:r[1],z:r[2],w:1},{x:i[0],y:i[1],z:i[2],w:i[3]}),e[Ee].emulated)}getViewerPose(e){if(!this[ie].animationFrame)throw new DOMException("getViewerPose can only be called on XRFrame objects passed to XRSession.requestAnimationFrame callbacks.","InvalidStateError");const n=this[ie].session,r=n[x].device,i=this.getPose(r.viewerSpace,e),s=n[x].mode==="inline"?[me.None]:[me.Left,me.Right],o=[];return s.forEach(a=>{const l=r.viewSpaces[a],c=this.getPose(l,e),f=n[x].getProjectionMatrix(a),d=new M0(a,new Float32Array(f),c.transform,n);o.push(d)}),new O0(i.transform,o,!1)}getJointPose(e,n){const r=this.getPose(e,n),i=e[cn].radius;return new P0(r.transform,i,!1)}fillJointRadii(e,n){if(e=Array.from(e),!this[ie].active)throw new DOMException("XRFrame access outside the callback that produced it is invalid.","InvalidStateError");if(e.length>n.length)throw new DOMException("The length of jointSpaces is larger than the number of elements in radii","TypeError");let r=!0;for(let i=0;i<e.length;i++)e[i][cn].radius?n[i]=e[i][cn].radius:(n[i]=NaN,r=!1);return r}fillPoses(e,n,r){if(e=Array.from(e),!this[ie].active)throw new DOMException("XRFrame access outside the callback that produced it is invalid.","InvalidStateError");if(e.length*16>r.length)throw new DOMException("The length of spaces multiplied by 16 is larger than the number of elements in transforms","TypeError");return e.forEach((i,s)=>{Jl(this[ie].tempMat4,i,n);for(let o=0;o<16;o++)r[s*16+o]=this[ie].tempMat4[o]}),!0}get detectedPlanes(){if(!this[ie].active)throw new DOMException("XRFrame access outside the callback that produced it is invalid.","InvalidStateError");return this[ie].detectedPlanes}get detectedMeshes(){if(!this[ie].active)throw new DOMException("XRFrame access outside the callback that produced it is invalid.","InvalidStateError");return this[ie].detectedMeshes}get trackedAnchors(){if(!this[ie].active)throw new DOMException("XRFrame access outside the callback that produced it is invalid.","InvalidStateError");return this[ie].trackedAnchors}createAnchor(e,n){return new Promise((r,i)=>{if(!this[ie].active)i(new DOMException("XRFrame access outside the callback that produced it is invalid.","InvalidStateError"));else{const s=this[ie].session[x].device[R].globalSpace,o=new we(n,e.matrix),a=ir.calculateGlobalOffsetMatrix(o),l=new we(s,a),c=new R0(l,this[ie].session);this[ie].session[x].trackedAnchors.add(c),this[ie].session[x].newAnchors.set(c,{resolve:r,reject:i})}})}getHitTestResults(e){if(this[ie].active){if(this[ie].hitTestResultsMap.has(e))return[...this[ie].hitTestResultsMap.get(e)];throw new DOMException("Requested hit test results are not available for current frame.","InvalidStateError")}else throw new DOMException("XRFrame access outside the callback that produced it is invalid.","InvalidStateError")}}var ft;(function(t){t.Opaque="opaque",t.AlphaBlend="alpha-blend",t.Additive="additive"})(ft||(ft={}));var sr;(function(t){t.ScreenSpace="screen-space",t.WorldSpace="world-space"})(sr||(sr={}));class ia extends EventTarget{constructor(e,n,r){super(),this[x]={device:e,mode:n,renderState:new Eo,pendingRenderState:null,enabledFeatures:r,isSystemKeyboardSupported:!1,ended:!1,projectionMatrices:{[me.Left]:Pe(),[me.Right]:Pe(),[me.None]:Pe()},getProjectionMatrix:i=>this[x].projectionMatrices[i],referenceSpaceIsSupported:i=>{if(!this[x].enabledFeatures.includes(i))return!1;switch(i){case _e.Viewer:return!0;case _e.Local:case _e.LocalFloor:case _e.BoundedFloor:case _e.Unbounded:return this[x].mode!="inline"}},frameHandle:0,frameCallbacks:[],currentFrameCallbacks:null,onDeviceFrame:()=>{if(this[x].ended)return;this[x].deviceFrameHandle=globalThis.requestAnimationFrame(this[x].onDeviceFrame),this[x].pendingRenderState!=null&&(this[x].renderState=this[x].pendingRenderState,this[x].pendingRenderState=null,this[x].device[R].onBaseLayerSet(this[x].renderState.baseLayer));const i=this[x].renderState.baseLayer;if(i===null)return;const s=i.context,o=s.canvas;if(this[x].mode!="inline"){const y=s.getParameter(s.COLOR_CLEAR_VALUE),b=s.getParameter(s.DEPTH_CLEAR_VALUE),_=s.getParameter(s.STENCIL_CLEAR_VALUE);s.clearColor(0,0,0,0),s.clearDepth(1),s.clearStencil(0),s.clear(s.DEPTH_BUFFER_BIT|s.COLOR_BUFFER_BIT|s.STENCIL_BUFFER_BIT),s.clearColor(y[0],y[1],y[2],y[3]),s.clearDepth(b),s.clearStencil(_)}const{depthNear:a,depthFar:l}=this[x].renderState,{width:c,height:f}=o;if(this[x].mode!=="inline"){const y=c*(this[x].device.stereoEnabled?.5:1)/f;Ul(this[x].projectionMatrices[me.Left],this[x].device.fovy,y,a,l),m0(this[x].projectionMatrices[me.Right],this[x].projectionMatrices[me.Left])}else{const y=c/f;Ul(this[x].projectionMatrices[me.None],this[x].renderState.inlineVerticalFieldOfView,y,a,l)}const d=new k0(this,this[x].frameHandle,!0,!0,performance.now()),p=performance.now(),m=this[x].device[R].devui;if(m&&m.render(p),this[x].mode==="immersive-ar"){const y=this[x].device[R].sem;y&&y.render(p)}this[x].enabledFeatures.includes("anchors")&&this[x].updateTrackedAnchors(),this[x].enabledFeatures.includes("plane-detection")&&this[x].updateTrackedPlanes(d),this[x].enabledFeatures.includes("mesh-detection")&&this[x].updateTrackedMeshes(d),this[x].enabledFeatures.includes("hit-test")&&this[x].computeHitTestResults(d),this[x].device[R].onFrameStart(d),this[x].updateActiveInputSources();const g=this[x].currentFrameCallbacks=this[x].frameCallbacks;this[x].frameCallbacks=[];const w=performance.now();for(let y=0;y<g.length;y++)try{g[y].cancelled||g[y].callback(w,d)}catch(b){console.error(b)}this[x].currentFrameCallbacks=null,d[ie].active=!1},nominalFrameRate:e.internalNominalFrameRate,referenceSpaces:[],inputSourceArray:[],activeInputSources:[],updateActiveInputSources:()=>{const i=this[x].enabledFeatures.includes("hand-tracking"),s=this[x].activeInputSources,o=this[x].device.inputSources.filter(c=>!c.hand||i),a=o.filter(c=>!s.includes(c)),l=s.filter(c=>!o.includes(c));this[x].activeInputSources=o,(a.length>0||l.length>0)&&this.dispatchEvent(new _0("inputsourceschange",{session:this,added:a,removed:l}))},trackedAnchors:new Xl,persistentAnchors:new Map,newAnchors:new Map,frameTrackedAnchors:new Xl,updateTrackedAnchors:()=>{this[x].enabledFeatures.includes("anchors")&&(this[x].frameTrackedAnchors.clear(),Array.from(this[x].trackedAnchors).forEach(i=>{if(i[Je].deleted){if(this[x].trackedAnchors.delete(i),this[x].newAnchors.has(i)){const{reject:s}=this[x].newAnchors.get(i);s(new DOMException("Anchor is no longer tracked","InvalidStateError"))}}else if(this[x].frameTrackedAnchors.add(i),this[x].newAnchors.has(i)){const{resolve:s}=this[x].newAnchors.get(i);s(i),this[x].newAnchors.delete(i)}}))},trackedPlanes:new Map,updateTrackedPlanes:i=>{const s=this[x].device[R].sem;if(!s)return;Array.from(this[x].trackedPlanes.keys()).forEach(a=>{s.trackedPlanes.has(a)||this[x].trackedPlanes.delete(a)}),s.trackedPlanes.forEach(a=>{let l=this[x].trackedPlanes.get(a);if(!l){const c=new we(this[x].device[R].globalSpace,a.transform.matrix);l=new $2(a,c,a.polygon,a.semanticLabel),this[x].trackedPlanes.set(a,l)}l[zt].lastChangedTime=i.predictedDisplayTime,l[zt].frame=i,i[ie].detectedPlanes.add(l)})},trackedMeshes:new Map,updateTrackedMeshes:i=>{const s=this[x].device[R].sem;if(!s)return;Array.from(this[x].trackedMeshes.keys()).forEach(a=>{s.trackedMeshes.has(a)||this[x].trackedMeshes.delete(a)}),s.trackedMeshes.forEach(a=>{let l=this[x].trackedMeshes.get(a);if(!l){const c=new we(this[x].device[R].globalSpace,a.transform.matrix);l=new V2(a,c,a.vertices,a.indices,a.semanticLabel),this[x].trackedMeshes.set(a,l)}l[Ft].lastChangedTime=i.predictedDisplayTime,l[Ft].frame=i,i[ie].detectedMeshes.add(l)})},hitTestSources:new Set,computeHitTestResults:i=>{const s=this[x].device[R].sem;if(!s)return;const o=this[x].device[R].globalSpace;this[x].hitTestSources.forEach(a=>{const l=a[Rt].space,c=ir.calculateGlobalOffsetMatrix(l),f=a[Rt].offsetRay.matrix,d=Pe();Yi(d,c,f);const p=[];s.computeHitTestResults(d).forEach(m=>{const g=new we(o,m),w=new Z2(i,g);p.push(w)}),i[ie].hitTestResultsMap.set(a,p)})},onend:null,oninputsourceschange:null,onselect:null,onselectstart:null,onselectend:null,onsqueeze:null,onsqueezestart:null,onsqueezeend:null,onvisibilitychange:null,onframeratechange:null},S0.recoverPersistentAnchorsFromStorage(this),this[x].onDeviceFrame()}get visibilityState(){return this[x].device.visibilityState}get frameRate(){return this[x].nominalFrameRate}get supportedFrameRates(){return new Float32Array(this[x].device.supportedFrameRates)}get renderState(){return this[x].renderState}get inputSources(){return this[x].inputSourceArray.length=0,!this[x].ended&&this[x].mode!=="inline"&&this[x].inputSourceArray.push(...this[x].activeInputSources),this[x].inputSourceArray}get enabledFeatures(){return this[x].enabledFeatures}get isSystemKeyboardSupported(){return this[x].isSystemKeyboardSupported}get environmentBlendMode(){var e;return(e=this[x].device[R].environmentBlendModes[this[x].mode])!==null&&e!==void 0?e:ft.Opaque}get interactionMode(){return this[x].device[R].interactionMode}updateRenderState(e={}){var n,r,i,s;if(this[x].ended)throw new DOMException("XRSession has already ended.","InvalidStateError");if(e.baseLayer&&e.baseLayer[Nt].session!==this)throw new DOMException("Base layer was created by a different XRSession","InvalidStateError");if(e.inlineVerticalFieldOfView!=null&&this[x].mode!=="inline")throw new DOMException("InlineVerticalFieldOfView must not be set for an immersive session","InvalidStateError");const o={baseLayer:e.baseLayer||((n=this[x].pendingRenderState)===null||n===void 0?void 0:n.baseLayer)||void 0,depthFar:e.depthFar||((r=this[x].pendingRenderState)===null||r===void 0?void 0:r.depthFar)||void 0,depthNear:e.depthNear||((i=this[x].pendingRenderState)===null||i===void 0?void 0:i.depthNear)||void 0,inlineVerticalFieldOfView:e.inlineVerticalFieldOfView||((s=this[x].pendingRenderState)===null||s===void 0?void 0:s.inlineVerticalFieldOfView)||void 0};this[x].pendingRenderState=new Eo(o,this[x].renderState)}async updateTargetFrameRate(e){return new Promise((n,r)=>{this[x].ended?r(new DOMException("XRSession has already ended.","InvalidStateError")):this[x].device.supportedFrameRates.includes(e)?(this[x].nominalFrameRate===e?console.log("Requested frame rate is the same as the current nominal frame rate, no update made"):(this[x].nominalFrameRate=e,this.dispatchEvent(new Li("frameratechange",{session:this})),console.log(`Nominal frame rate updated to ${e}`)),n()):r(new DOMException("Requested frame rate not supported.","InvalidStateError"))})}async requestReferenceSpace(e){return new Promise((n,r)=>{if(this[x].ended||!this[x].referenceSpaceIsSupported(e)){r(new DOMException("The requested reference space type is not supported.","NotSupportedError"));return}let i;switch(e){case _e.Viewer:i=this[x].device.viewerSpace;break;case _e.Local:i=new mn(e,this[x].device[R].globalSpace,this[x].device.viewerSpace[Ee].offsetMatrix);break;case _e.LocalFloor:case _e.BoundedFloor:case _e.Unbounded:i=new mn(e,this[x].device[R].globalSpace);break}this[x].referenceSpaces.push(i),n(i)})}requestAnimationFrame(e){if(this[x].ended)return 0;const n=++this[x].frameHandle;return this[x].frameCallbacks.push({handle:n,callback:e,cancelled:!1}),n}cancelAnimationFrame(e){let n=this[x].frameCallbacks,r=n.findIndex(i=>i&&i.handle===e);r>-1&&(n[r].cancelled=!0,n.splice(r,1)),n=this[x].currentFrameCallbacks,n&&(r=n.findIndex(i=>i&&i.handle===e),r>-1&&(n[r].cancelled=!0))}async end(){return new Promise((e,n)=>{this[x].ended||this[x].deviceFrameHandle===null?n(new DOMException("XRSession has already ended.","InvalidStateError")):(globalThis.cancelAnimationFrame(this[x].deviceFrameHandle),this[x].device[R].onSessionEnd(),this.dispatchEvent(new Li("end",{session:this})),e())})}get persistentAnchors(){return Array.from(this[x].persistentAnchors.keys())}restorePersistentAnchor(e){return new Promise((n,r)=>{if(!this[x].persistentAnchors.has(e))r(new DOMException(`Persistent anchor with uuid ${e} not found.`,"InvalidStateError"));else if(this[x].ended)r(new DOMException("XRSession has already ended.","InvalidStateError"));else{const i=this[x].persistentAnchors.get(e);this[x].newAnchors.has(i)?r(new DOMException(`Multiple concurrent attempts detected to restore the anchor with UUID: ${e}.`,"InvalidStateError")):(this[x].trackedAnchors.add(i),this[x].newAnchors.set(i,{resolve:n,reject:r}))}})}deletePersistentAnchor(e){return new Promise((n,r)=>{if(!this[x].persistentAnchors.has(e))r(new DOMException(`Persistent anchor with uuid ${e} not found.`,"InvalidStateError"));else{const i=this[x].persistentAnchors.get(e);this[x].persistentAnchors.delete(e),i.delete(),n(void 0)}})}requestHitTestSource(e){return new Promise((n,r)=>{if(!this[x].enabledFeatures.includes("hit-test"))r(new DOMException('WebXR feature "hit-test" is not supported by current session',"NotSupportedError"));else if(this[x].ended)r(new DOMException("XRSession has already ended.","InvalidStateError"));else if(!this[x].device[R].sem)r(new DOMException("Synthethic Environment Module required for emulating hit-test","OperationError"));else{const i=new Y2(this,e);this[x].hitTestSources.add(i),n(i)}})}get onend(){var e;return(e=this[x].onend)!==null&&e!==void 0?e:(()=>{})}set onend(e){this[x].onend&&this.removeEventListener("end",this[x].onend),this[x].onend=e,e&&this.addEventListener("end",e)}get oninputsourceschange(){var e;return(e=this[x].oninputsourceschange)!==null&&e!==void 0?e:(()=>{})}set oninputsourceschange(e){this[x].oninputsourceschange&&this.removeEventListener("inputsourceschange",this[x].oninputsourceschange),this[x].oninputsourceschange=e,e&&this.addEventListener("inputsourceschange",e)}get onselect(){var e;return(e=this[x].onselect)!==null&&e!==void 0?e:(()=>{})}set onselect(e){this[x].onselect&&this.removeEventListener("select",this[x].onselect),this[x].onselect=e,e&&this.addEventListener("select",e)}get onselectstart(){var e;return(e=this[x].onselectstart)!==null&&e!==void 0?e:(()=>{})}set onselectstart(e){this[x].onselectstart&&this.removeEventListener("selectstart",this[x].onselectstart),this[x].onselectstart=e,e&&this.addEventListener("selectstart",e)}get onselectend(){var e;return(e=this[x].onselectend)!==null&&e!==void 0?e:(()=>{})}set onselectend(e){this[x].onselectend&&this.removeEventListener("selectend",this[x].onselectend),this[x].onselectend=e,e&&this.addEventListener("selectend",e)}get onsqueeze(){var e;return(e=this[x].onsqueeze)!==null&&e!==void 0?e:(()=>{})}set onsqueeze(e){this[x].onsqueeze&&this.removeEventListener("squeeze",this[x].onsqueeze),this[x].onsqueeze=e,e&&this.addEventListener("squeeze",e)}get onsqueezestart(){var e;return(e=this[x].onsqueezestart)!==null&&e!==void 0?e:(()=>{})}set onsqueezestart(e){this[x].onsqueezestart&&this.removeEventListener("squeezestart",this[x].onsqueezestart),this[x].onsqueezestart=e,e&&this.addEventListener("squeezestart",e)}get onsqueezeend(){var e;return(e=this[x].onsqueezeend)!==null&&e!==void 0?e:(()=>{})}set onsqueezeend(e){this[x].onsqueezeend&&this.removeEventListener("squeezeend",this[x].onsqueezeend),this[x].onsqueezeend=e,e&&this.addEventListener("squeezeend",e)}get onvisibilitychange(){var e;return(e=this[x].onvisibilitychange)!==null&&e!==void 0?e:(()=>{})}set onvisibilitychange(e){this[x].onvisibilitychange&&this.removeEventListener("visibilitychange",this[x].onvisibilitychange),this[x].onvisibilitychange=e,e&&this.addEventListener("visibilitychange",e)}get onframeratechange(){var e;return(e=this[x].onframeratechange)!==null&&e!==void 0?e:(()=>{})}set onframeratechange(e){this[x].onframeratechange&&this.removeEventListener("frameratechange",this[x].onframeratechange),this[x].onframeratechange=e,e&&this.addEventListener("frameratechange",e)}}var Ur;(function(t){t.Wrist="wrist",t.ThumbMetacarpal="thumb-metacarpal",t.ThumbPhalanxProximal="thumb-phalanx-proximal",t.ThumbPhalanxDistal="thumb-phalanx-distal",t.ThumbTip="thumb-tip",t.IndexFingerMetacarpal="index-finger-metacarpal",t.IndexFingerPhalanxProximal="index-finger-phalanx-proximal",t.IndexFingerPhalanxIntermediate="index-finger-phalanx-intermediate",t.IndexFingerPhalanxDistal="index-finger-phalanx-distal",t.IndexFingerTip="index-finger-tip",t.MiddleFingerMetacarpal="middle-finger-metacarpal",t.MiddleFingerPhalanxProximal="middle-finger-phalanx-proximal",t.MiddleFingerPhalanxIntermediate="middle-finger-phalanx-intermediate",t.MiddleFingerPhalanxDistal="middle-finger-phalanx-distal",t.MiddleFingerTip="middle-finger-tip",t.RingFingerMetacarpal="ring-finger-metacarpal",t.RingFingerPhalanxProximal="ring-finger-phalanx-proximal",t.RingFingerPhalanxIntermediate="ring-finger-phalanx-intermediate",t.RingFingerPhalanxDistal="ring-finger-phalanx-distal",t.RingFingerTip="ring-finger-tip",t.PinkyFingerMetacarpal="pinky-finger-metacarpal",t.PinkyFingerPhalanxProximal="pinky-finger-phalanx-proximal",t.PinkyFingerPhalanxIntermediate="pinky-finger-phalanx-intermediate",t.PinkyFingerPhalanxDistal="pinky-finger-phalanx-distal",t.PinkyFingerTip="pinky-finger-tip"})(Ur||(Ur={}));class sa extends Map{}class oa extends we{constructor(e,n,r){super(n,r),this[cn]={jointName:e,radius:0}}get jointName(){return this[cn].jointName}}const Q2={jointTransforms:{wrist:{offsetMatrix:[.9060805439949036,-.1844543218612671,.3807799518108368,0,-.08027800172567368,.8086723685264587,.5827555656433105,0,-.4154181182384491,-.5585917234420776,.7179155349731445,0,-.06867414712905884,-.009423808194696903,.10627774149179459,1],radius:.021460847929120064},"thumb-metacarpal":{offsetMatrix:[-.5012241005897522,-.8650535345077515,-.0213695727288723,0,.7415963411331177,-.4421543478965759,.5045139193534851,0,-.44587990641593933,.23702676594257355,.8631392121315002,0,-.032122574746608734,-.01196830440312624,.07194234430789948,1],radius:.019382517784833908},"thumb-phalanx-proximal":{offsetMatrix:[-.3175753057003021,-.9460570216178894,-.06419729441404343,0,.8958902955055237,-.32153913378715515,.30658137798309326,0,-.3106854259967804,.03984907269477844,.9496771097183228,0,-.017625702545046806,-.01967475935816765,.04387917369604111,1],radius:.01228295173496008},"thumb-phalanx-distal":{offsetMatrix:[-.4944636821746826,-.8691971898078918,.001086252392269671,0,.8307800889015198,-.4722411036491394,.2946045398712158,0,-.25555649399757385,.14657381176948547,.9556186199188232,0,-.007126678712666035,-.021021386608481407,.011786630377173424,1],radius:.009768804535269737},"thumb-tip":{offsetMatrix:[-.4944636821746826,-.8691971898078918,.001086252392269671,0,.8307800889015198,-.4722411036491394,.2946045398712158,0,-.25555649399757385,.14657381176948547,.9556186199188232,0,.0003423091256991029,-.024528030306100845,-.011410919018089771,1],radius:.008768804371356964},"index-finger-metacarpal":{offsetMatrix:[.9060805439949036,-.1844543218612671,.3807799518108368,0,-.08027800172567368,.8086723685264587,.5827555656433105,0,-.4154181182384491,-.5585917234420776,.7179155349731445,0,-.038037415593862534,-.0020236473064869642,.07626739144325256,1],radius:.021228281781077385},"index-finger-phalanx-proximal":{offsetMatrix:[.7986818552017212,-.35985732078552246,.48229536414146423,0,.538311243057251,.7854709625244141,-.30537736415863037,0,-.2689369022846222,.5035246014595032,.8210577368736267,0,-.006869405973702669,.033938243985176086,.04206443578004837,1],radius:.010295259766280651},"index-finger-phalanx-intermediate":{offsetMatrix:[.8285930156707764,-.32672837376594543,.4546217918395996,0,.5577570199966431,.4116027057170868,-.7207564115524292,0,.04836784675717354,.8507823944091797,.5232869386672974,0,.0033306588884443045,.014840902760624886,.010923954658210278,1],radius:.00853810179978609},"index-finger-phalanx-distal":{offsetMatrix:[.8412464261054993,-.35794928669929504,.4051857888698578,0,.5139996409416199,.29711154103279114,-.8046918511390686,0,.16765329241752625,.8852096796035767,.4339304566383362,0,.0021551470272243023,-.0058362227864563465,-.0017938464879989624,1],radius:.007636196445673704},"index-finger-tip":{offsetMatrix:[.8412464261054993,-.35794928669929504,.4051857888698578,0,.5139996409416199,.29711154103279114,-.8046918511390686,0,.16765329241752625,.8852096796035767,.4339304566383362,0,-.00131594471167773,-.025222131982445717,-.012442642822861671,1],radius:.006636196281760931},"middle-finger-metacarpal":{offsetMatrix:[.9060805439949036,-.1844543218612671,.3807799518108368,0,-.08027800172567368,.8086723685264587,.5827555656433105,0,-.4154181182384491,-.5585917234420776,.7179155349731445,0,-.05395089089870453,.003063359996303916,.07402937114238739,1],radius:.021231964230537415},"middle-finger-phalanx-proximal":{offsetMatrix:[.9187911748886108,-.1530158370733261,.36387869715690613,0,.038666240870952606,.9522662162780762,.302808940410614,0,-.3928440511226654,-.26414817571640015,.8808513283729553,0,-.02717282809317112,.04162866622209549,.03678669035434723,1],radius:.01117393933236599},"middle-finger-phalanx-intermediate":{offsetMatrix:[.9228746294975281,-.12856416404247284,.36300456523895264,0,.14524033665657043,.9892153143882751,-.01890045404434204,0,-.3566599190235138,.07016586512327194,.9315956234931946,0,-.01030921470373869,.05296773463487625,-.0010256498353555799,1],radius:.008030958473682404},"middle-finger-phalanx-distal":{offsetMatrix:[.9325166344642639,-.040404170751571655,.35885775089263916,0,.06836572289466858,.995502769947052,-.0655682161450386,0,-.3545948565006256,.08567725121974945,.9310863614082336,0,-.0004833847051486373,.05103470757603645,-.026690717786550522,1],radius:.007629410829395056},"middle-finger-tip":{offsetMatrix:[.9325166344642639,-.040404170751571655,.35885775089263916,0,.06836572289466858,.995502769947052,-.0655682161450386,0,-.3545948565006256,.08567725121974945,.9310863614082336,0,.008158999495208263,.05004044249653816,-.050120558589696884,1],radius:.006629410665482283},"ring-finger-metacarpal":{offsetMatrix:[.9060805439949036,-.1844543218612671,.3807799518108368,0,-.08027800172567368,.8086723685264587,.5827555656433105,0,-.4154181182384491,-.5585917234420776,.7179155349731445,0,-.06732909381389618,.007902119308710098,.07209732383489609,1],radius:.019088275730609894},"ring-finger-phalanx-proximal":{offsetMatrix:[.9391821026802063,-.027994679287075996,.34227466583251953,0,-.18282271921634674,.8029410243034363,.5673282742500305,0,-.2907087206840515,-.5954000353813171,.7489906549453735,0,-.047129884362220764,.03806127607822418,.032147664576768875,1],radius:.00992213748395443},"ring-finger-phalanx-intermediate":{offsetMatrix:[.9249380826950073,.03699534013867378,.3783116042613983,0,-.12898847460746765,.9667453765869141,.2208271026611328,0,-.3575615882873535,-.25304901599884033,.8989526629447937,0,-.03579339757561684,.06127955764532089,.002939916681498289,1],radius:.007611672393977642},"ring-finger-phalanx-distal":{offsetMatrix:[.9001164436340332,.03983335196971893,.4338230490684509,0,-.09662467986345291,.9892624020576477,.10964841395616531,0,-.4247973561286926,-.14061418175697327,.8943013548851013,0,-.026291755959391594,.06800390034914017,-.02094830758869648,1],radius:.007231088820844889},"ring-finger-tip":{offsetMatrix:[.9001164436340332,.03983335196971893,.4338230490684509,0,-.09662467986345291,.9892624020576477,.10964841395616531,0,-.4247973561286926,-.14061418175697327,.8943013548851013,0,-.016345610842108727,.07300511747598648,-.04263874143362045,1],radius:.0062310886569321156},"pinky-finger-metacarpal":{offsetMatrix:[.8769711852073669,.31462907791137695,.36322021484375,0,-.4506046175956726,.801031768321991,.39408499002456665,0,-.16696058213710785,-.5092697143554688,.8442559838294983,0,-.07460174709558487,.0062340241856873035,.06756893545389175,1],radius:.01808827556669712},"pinky-finger-phalanx-proximal":{offsetMatrix:[.9498357176780701,.1553308218717575,.2714462876319885,0,-.3019258379936218,.6817675232887268,.6663586497306824,0,-.08155745267868042,-.7148879170417786,.694466233253479,0,-.06697750836610794,.029482364654541016,.02902858518064022,1],radius:.008483353070914745},"pinky-finger-phalanx-intermediate":{offsetMatrix:[.9214097261428833,.27928245067596436,.2701927423477173,0,-.3670244514942169,.8538867831230164,.36901235580444336,0,-.12765564024448395,-.43917882442474365,.8892839550971985,0,-.06447203457355499,.05144399777054787,.0076942890882492065,1],radius:.0067641944624483585},"pinky-finger-phalanx-distal":{offsetMatrix:[.9038633704185486,.23618005216121674,.3567195236682892,0,-.3532794713973999,.8823202252388,.3109731376171112,0,-.24129553139209747,-.4070987403392792,.8809353709220886,0,-.06187915802001953,.060364335775375366,-.010368337854743004,1],radius:.0064259846694767475},"pinky-finger-tip":{offsetMatrix:[.9038633704185486,.23618005216121674,.3567195236682892,0,-.3532794713973999,.8823202252388,.3109731376171112,0,-.24129553139209747,-.4070987403392792,.8809353709220886,0,-.056796226650476456,.07042007893323898,-.02921444922685623,1],radius:.005425984505563974}},gripOffsetMatrix:[.08027800917625427,-.8086723685264587,-.5827556252479553,0,-.4154181480407715,-.5585916638374329,.7179154753684998,0,-.9060805439949036,.1844543218612671,-.3807799518108368,0,-.038054611533880234,-.002910431008785963,.03720742464065552,1]},K2={jointTransforms:{wrist:{offsetMatrix:[.9340395331382751,-.13936476409435272,.32885703444480896,0,-.005510995630174875,.914999783039093,.40341612696647644,0,-.3571262061595917,-.37861889600753784,.8538784384727478,0,-.05789132043719292,.01670890860259533,.11183350533246994,1],radius:.021460847929120064},"thumb-metacarpal":{offsetMatrix:[.02145560085773468,-.9978390336036682,.0621047280728817,0,.41311800479888916,.06541631370782852,.9083252549171448,0,-.9104245901107788,.006167683284729719,.4136286973953247,0,-.016488194465637207,.012708572670817375,.08862338215112686,1],radius:.019382517784833908},"thumb-phalanx-proximal":{offsetMatrix:[.21270370483398438,-.966137707233429,.14606566727161407,0,.49890995025634766,.2359165996313095,.8339261412620544,0,-.8401462435722351,-.10450579971075058,.5321959853172302,0,.013112368993461132,.012508046813309193,.07517509907484055,1],radius:.01228295173496008},"thumb-phalanx-distal":{offsetMatrix:[.01653280481696129,-.9986647963523865,.048943229019641876,0,.26313456892967224,.051570065319538116,.9633802771568298,0,-.9646173715591431,-.0030490627977997065,.26363563537597656,0,.04150351136922836,.016039609909057617,.05719054117798805,1],radius:.009768804535269737},"thumb-tip":{offsetMatrix:[.01653280481696129,-.9986647963523865,.048943229019641876,0,.26313456892967224,.051570065319538116,.9633802771568298,0,-.9646173715591431,-.0030490627977997065,.26363563537597656,0,.06548332422971725,.01683700829744339,.0516640841960907,1],radius:.008768804371356964},"index-finger-metacarpal":{offsetMatrix:[.9340395331382751,-.13936476409435272,.32885703444480896,0,-.005510995630174875,.914999783039093,.40341612696647644,0,-.3571262061595917,-.37861889600753784,.8538784384727478,0,-.02592567168176174,.019982583820819855,.08479326963424683,1],radius:.021228281781077385},"index-finger-phalanx-proximal":{offsetMatrix:[.9063700437545776,-.21756279468536377,.3621589243412018,0,.0970839336514473,.9415287375450134,.3226419687271118,0,-.41117796301841736,-.2572731077671051,.8744958639144897,0,-.0015709538711234927,.043078210204839706,.034657616168260574,1],radius:.010295259766280651},"index-finger-phalanx-intermediate":{offsetMatrix:[.9159826040267944,-.1651475727558136,.36565208435058594,0,.09755707532167435,.9756820797920227,.1962820291519165,0,-.3891757130622864,-.14411886036396027,.9098196625709534,0,.014023927971720695,.052835866808891296,.0014903299743309617,1],radius:.00853810179978609},"index-finger-phalanx-distal":{offsetMatrix:[.9378057718276978,-.12329639494419098,.3245268166065216,0,.032558172941207886,.9619227051734924,.2713746726512909,0,-.3456292748451233,-.2439306229352951,.9061115384101868,0,.023482320830225945,.05633850023150444,-.020621655508875847,1],radius:.007636196445673704},"index-finger-tip":{offsetMatrix:[.9378057718276978,-.12329639494419098,.3245268166065216,0,.032558172941207886,.9619227051734924,.2713746726512909,0,-.3456292748451233,-.2439306229352951,.9061115384101868,0,.03096788562834263,.06281610578298569,-.040703095495700836,1],radius:.006636196281760931},"middle-finger-metacarpal":{offsetMatrix:[.9340395331382751,-.13936476409435272,.32885703444480896,0,-.005510995630174875,.914999783039093,.40341612696647644,0,-.3571262061595917,-.37861889600753784,.8538784384727478,0,-.04184452444314957,.022474845871329308,.08177298307418823,1],radius:.021231964230537415},"middle-finger-phalanx-proximal":{offsetMatrix:[.9720265865325928,-.08313076198101044,.21966552734375,0,.20477405190467834,.7580050826072693,-.6192700862884521,0,-.11502730846405029,.6469289064407349,.7538246512413025,0,-.022107340395450592,.05035499855875969,.02970452979207039,1],radius:.01117393933236599},"middle-finger-phalanx-intermediate":{offsetMatrix:[.9779140949249268,-.07129573822021484,.19646917283535004,0,.1287083923816681,-.5352076292037964,-.8348574042320251,0,.1646735966205597,.8417060971260071,-.5142109394073486,0,-.017169542610645294,.022584279999136925,-.00265491777099669,1],radius:.008030958473682404},"middle-finger-phalanx-distal":{offsetMatrix:[.9774913787841797,-.19657190144062042,.07661263644695282,0,-.1924918293952942,-.9796126484870911,-.05749811604619026,0,.08635343611240387,.041456472128629684,-.995401918888092,0,-.02170622907578945,-.0006043742760084569,.011511396616697311,1],radius:.007629410829395056},"middle-finger-tip":{offsetMatrix:[.9774913787841797,-.19657190144062042,.07661263644695282,0,-.1924918293952942,-.9796126484870911,-.05749811604619026,0,.08635343611240387,.041456472128629684,-.995401918888092,0,-.02438267692923546,-.0026927536819130182,.03627248480916023,1],radius:.006629410665482283},"ring-finger-metacarpal":{offsetMatrix:[.9340395331382751,-.13936476409435272,.32885703444480896,0,-.005510995630174875,.914999783039093,.40341612696647644,0,-.3571262061595917,-.37861889600753784,.8538784384727478,0,-.05944233387708664,.0264605600386858,.07478221505880356,1],radius:.019088275730609894},"ring-finger-phalanx-proximal":{offsetMatrix:[.9842101335525513,.024470895528793335,.1753024309873581,0,.12200043350458145,.6237703561782837,-.7720272541046143,0,-.12824076414108276,.7812241315841675,.610936164855957,0,-.04249368980526924,.0467497780919075,.027722163125872612,1],radius:.00992213748395443},"ring-finger-phalanx-intermediate":{offsetMatrix:[.9941774606704712,.05949164181947708,.08983955532312393,0,.10504482686519623,-.7208291888237,-.6851072907447815,0,.024001073092222214,.6905553936958313,-.7228817939758301,0,-.0374927744269371,.016285063698887825,.0038980208337306976,1],radius:.007611672393977642},"ring-finger-phalanx-distal":{offsetMatrix:[.9995742440223694,.01638498157262802,.02412819117307663,0,.007813597097992897,-.9474818110466003,.31971633434295654,0,.028100071474909782,-.31939181685447693,-.9472070932388306,0,-.038130562752485275,-.0020653479732573032,.02310742810368538,1],radius:.007231088820844889},"ring-finger-tip":{offsetMatrix:[.9995742440223694,.01638498157262802,.02412819117307663,0,.007813597097992897,-.9474818110466003,.31971633434295654,0,.028100071474909782,-.31939181685447693,-.9472070932388306,0,-.0390593595802784,.004176302347332239,.0466572530567646,1],radius:.0062310886569321156},"pinky-finger-metacarpal":{offsetMatrix:[.9147363901138306,.3458845317363739,.20885537564754486,0,-.3923271894454956,.8839452862739563,.2544005811214447,0,-.09662359952926636,-.3146490156650543,.9442773461341858,0,-.06715242564678192,.024195827543735504,.07137546688318253,1],radius:.01808827556669712},"pinky-finger-phalanx-proximal":{offsetMatrix:[.9613109827041626,.22439135611057281,.15977802872657776,0,.01002211682498455,.5511574745178223,-.8343409299850464,0,-.27528178691864014,.8036624789237976,.5275853276252747,0,-.06273911893367767,.038559623062610626,.028268879279494286,1],radius:.008483353070914745},"pinky-finger-phalanx-intermediate":{offsetMatrix:[.9820972084999084,.18811029195785522,-.00995189044624567,0,.14063723385334015,-.7673450708389282,-.6256227493286133,0,-.12532226741313934,.6130226850509644,-.7800630927085876,0,-.05428232625126839,.013870777562260628,.012061242014169693,1],radius:.0067641944624483585},"pinky-finger-phalanx-distal":{offsetMatrix:[.9744614362716675,.20454788208007812,-.09265263378620148,0,.22429193556308746,-.9065253138542175,.35764020681381226,0,-.010836843401193619,-.3692878782749176,-.9292529225349426,0,-.05173685774207115,.0014194445684552193,.02790539152920246,1],radius:.0064259846694767475},"pinky-finger-tip":{offsetMatrix:[.9744614362716675,.20454788208007812,-.09265263378620148,0,.22429193556308746,-.9065253138542175,.35764020681381226,0,-.010836843401193619,-.3692878782749176,-.9292529225349426,0,-.05098633095622063,.008463085629045963,.048688892275094986,1],radius:.005425984505563974}},gripOffsetMatrix:[.005510995630174875,-.9149997234344482,-.40341615676879883,0,-.3571262061595917,-.37861889600753784,.8538784384727478,0,-.9340395331382751,.13936474919319153,-.32885703444480896,0,-.031803809106349945,.007837686687707901,.04313928261399269,1]},J2={jointTransforms:{wrist:{offsetMatrix:[.9616971015930176,-.13805118203163147,.2368120402097702,0,.0005348679260350764,.8648636937141418,.5020061135292053,0,-.2741127610206604,-.48265108466148376,.8318111300468445,0,-.04913589730858803,.0021463718730956316,.11701996624469757,1],radius:.021460847929120064},"thumb-metacarpal":{offsetMatrix:[-.07536252588033676,-.9959676265716553,-.04867160692811012,0,.5877083539962769,-.08379616588354111,.8047218918800354,0,-.8055551648139954,.032041035592556,.5916536450386047,0,-.010643752291798592,.0006936835707165301,.08736639469861984,1],radius:.019382517784833908},"thumb-phalanx-proximal":{offsetMatrix:[.1374533325433731,-.9904957413673401,.004982374142855406,0,.5534393787384033,.08097179979085922,.8289443850517273,0,-.8214688897132874,-.11118389666080475,.559309184551239,0,.015547193586826324,-.0003480653394944966,.0681300163269043,1],radius:.01228295173496008},"thumb-phalanx-distal":{offsetMatrix:[-.04659227654337883,-.9974699020385742,-.05369402840733528,0,.6812446117401123,-.07104194164276123,.728600800037384,0,-.7305715084075928,-.002631746232509613,.6828309893608093,0,.04330715537071228,.003409178927540779,.0492292083799839,1],radius:.009768804535269737},"thumb-tip":{offsetMatrix:[-.04659227654337883,-.9974699020385742,-.05369402840733528,0,.6812446117401123,-.07104194164276123,.728600800037384,0,-.7305715084075928,-.002631746232509613,.6828309893608093,0,.062003348022699356,.004069602582603693,.03322213143110275,1],radius:.008768804371356964},"index-finger-metacarpal":{offsetMatrix:[.9616971015930176,-.13805118203163147,.2368120402097702,0,.0005348679260350764,.8648636937141418,.5020061135292053,0,-.2741127610206604,-.48265108466148376,.8318111300468445,0,-.02009812369942665,.008770795539021492,.08660387247800827,1],radius:.021228281781077385},"index-finger-phalanx-proximal":{offsetMatrix:[.9001791477203369,-.2598813474178314,.3494834005832672,0,.06073702871799469,.8695210218429565,.490146666765213,0,-.4312632381916046,-.41999316215515137,.7985095381736755,0,-.00017739279428496957,.03890012577176094,.039073407649993896,1],radius:.010295259766280651},"index-finger-phalanx-intermediate":{offsetMatrix:[.9082008600234985,-.20898112654685974,.36262574791908264,0,.11045389622449875,.9553793668746948,.27395179867744446,0,-.40369608998298645,-.20874978601932526,.8907597661018372,0,.01617925800383091,.05482936650514603,.008788082748651505,1],radius:.00853810179978609},"index-finger-phalanx-distal":{offsetMatrix:[.9309692978858948,-.16783711314201355,.32423174381256104,0,.1080828532576561,.9749603867530823,.1943446695804596,0,-.34873148798942566,-.14588497579097748,.9257990717887878,0,.02599053829908371,.059902746230363846,-.012860597111284733,1],radius:.007636196445673704},"index-finger-tip":{offsetMatrix:[.9309692978858948,-.16783711314201355,.32423174381256104,0,.1080828532576561,.9749603867530823,.1943446695804596,0,-.34873148798942566,-.14588497579097748,.9257990717887878,0,.03362493962049484,.06421422213315964,-.033461250364780426,1],radius:.006636196281760931},"middle-finger-metacarpal":{offsetMatrix:[.9616971015930176,-.13805118203163147,.2368120402097702,0,.0005348679260350764,.8648636937141418,.5020061135292053,0,-.2741127610206604,-.48265108466148376,.8318111300468445,0,-.03627845644950867,.011579737067222595,.08550142496824265,1],radius:.021231964230537415},"middle-finger-phalanx-proximal":{offsetMatrix:[.9876697659492493,-.06786545366048813,.1410750150680542,0,-.015095947310328484,.855663537979126,.5173118710517883,0,-.15582047402858734,-.5130629539489746,.8440889716148376,0,-.021259509027004242,.04587256908416748,.03659208118915558,1],radius:.01117393933236599},"middle-finger-phalanx-intermediate":{offsetMatrix:[.988391637802124,-.04354291781783104,.14555205404758453,0,.008894841186702251,.9729899168014526,.23067504167556763,0,-.15166506171226501,-.22670257091522217,.9620829224586487,0,-.014570588245987892,.06789684295654297,.0003578895702958107,1],radius:.008030958473682404},"middle-finger-phalanx-distal":{offsetMatrix:[.9853697419166565,.044260796159505844,.16458062827587128,0,-.0757969319820404,.9787378311157227,.19059516489505768,0,-.1526455283164978,-.20028135180473328,.9677740931510925,0,-.010392282158136368,.07414241135120392,-.026147106662392616,1],radius:.007629410829395056},"middle-finger-tip":{offsetMatrix:[.9853697419166565,.044260796159505844,.16458062827587128,0,-.0757969319820404,.9787378311157227,.19059516489505768,0,-.1526455283164978,-.20028135180473328,.9677740931510925,0,-.0069718430750072,.08024183660745621,-.05014154314994812,1],radius:.006629410665482283},"ring-finger-metacarpal":{offsetMatrix:[.9616971015930176,-.13805118203163147,.2368120402097702,0,.0005348679260350764,.8648636937141418,.5020061135292053,0,-.2741127610206604,-.48265108466148376,.8318111300468445,0,-.05402477830648422,.015797706320881844,.08152295649051666,1],radius:.019088275730609894},"ring-finger-phalanx-proximal":{offsetMatrix:[.9940828680992126,.05735103040933609,.09224652498960495,0,-.10022822767496109,.8116500377655029,.5754809379577637,0,-.041867565363645554,-.5813214182853699,.8125960826873779,0,-.041623555123806,.04171867296099663,.03582974523305893,1],radius:.00992213748395443},"ring-finger-phalanx-intermediate":{offsetMatrix:[.9843675494194031,.12044742703437805,.12850022315979004,0,-.15629759430885315,.9337108135223389,.3221098482608795,0,-.08118485659360886,-.3371586799621582,.937940776348114,0,-.039990875869989395,.06438793987035751,.004141641780734062,1],radius:.007611672393977642},"ring-finger-phalanx-distal":{offsetMatrix:[.9748351573944092,.11857274919748306,.18877571821212769,0,-.15575434267520905,.9681083559989929,.19623035192489624,0,-.15948788821697235,-.22069483995437622,.9622148275375366,0,-.03783353418111801,.07334739714860916,-.020782606676220894,1],radius:.007231088820844889},"ring-finger-tip":{offsetMatrix:[.9748351573944092,.11857274919748306,.18877571821212769,0,-.15575434267520905,.9681083559989929,.19623035192489624,0,-.15948788821697235,-.22069483995437622,.9622148275375366,0,-.03445569798350334,.0802423357963562,-.04392268508672714,1],radius:.0062310886569321156},"pinky-finger-metacarpal":{offsetMatrix:[.9181402921676636,.35625091195106506,.17350243031978607,0,-.39615097641944885,.8352503180503845,.38134080171585083,0,-.009065053425729275,-.41885748505592346,.9080066680908203,0,-.06191859766840935,.013620133511722088,.07850203663110733,1],radius:.01808827556669712},"pinky-finger-phalanx-proximal":{offsetMatrix:[.9714386463165283,.236698180437088,-.016745081171393394,0,-.18462024629116058,.7982627749443054,.5733163952827454,0,.14906984567642212,-.5538501739501953,.8191629648208618,0,-.061502378433942795,.032741155475378036,.03705105185508728,1],radius:.008483353070914745},"pinky-finger-phalanx-intermediate":{offsetMatrix:[.9337416291236877,.35620439052581787,-.03527557849884033,0,-.33203884959220886,.8987522721290588,.28634607791900635,0,.13370157778263092,-.2556603252887726,.9574766755104065,0,-.06608185172080994,.049755651503801346,.011886020191013813,1],radius:.0067641944624483585},"pinky-finger-phalanx-distal":{offsetMatrix:[.9419984817504883,.3303581774234772,.059175245463848114,0,-.33483216166496277,.9130291938781738,.23294763267040253,0,.02292730286717415,-.2392500638961792,.970687210559845,0,-.0687975287437439,.054948460310697556,-.007561664097011089,1],radius:.0064259846694767475},"pinky-finger-tip":{offsetMatrix:[.9419984817504883,.3303581774234772,.059175245463848114,0,-.33483216166496277,.9130291938781738,.23294763267040253,0,.02292730286717415,-.2392500638961792,.970687210559845,0,-.06947512179613113,.0613851435482502,-.028543535619974136,1],radius:.005425984505563974}},gripOffsetMatrix:[-.0005348679260350764,-.8648636937141418,-.5020061135292053,0,-.2741127908229828,-.48265108466148376,.8318111896514893,0,-.9616971015930176,.13805119693279266,-.2368120402097702,0,-.02878567762672901,.0017147823236882687,.04536811262369156,1]},ec={profileId:"oculus-hand",fallbackProfileIds:["generic-hand","generic-hand-select","generic-trigger"],poses:{default:J2,pinch:Q2,point:K2}},e3={mapping:Vr.None,buttons:[{id:"pinch",type:"analog",eventTrigger:"select"}],axes:[]},tc=Me(),nc=ct(),rc=Me(),ic=Me(),sc=ct(),oc=Me(),ac=Me(),lc=ct(),cc=Me(),uc=(t,e,n,r)=>(Br(tc,e),ki(nc,e),yo(rc,e),Br(ic,n),ki(sc,n),yo(oc,n),vo(ac,tc,ic,r),Cr(lc,nc,sc,r),vo(cc,rc,oc,r),S2(t,lc,ac,cc),t),t3=[1,-1,-1,0,-1,1,1,0,-1,1,1,0,-1,1,1,1],n3=t=>{for(let e=0;e<16;e++)t[e]*=t3[e]};class fc extends T0{constructor(e,n,r){if(n!==We.Left&&n!==We.Right)throw new DOMException('handedness for XRHandInput must be either "left" or "right"',"InvalidStateError");if(!e.poses.default||!e.poses.pinch)throw new DOMException('"default" and "pinch" hand pose configs are required',"InvalidStateError");const i=new we(r),s=new we(i),o=[e.profileId,...e.fallbackProfileIds],a=new sa;Object.values(Ur).forEach(c=>{a.set(c,new oa(c,i))});const l=new Qi(n,Ci.TrackedPointer,o,i,new ra(e3),s,a);super(l),this[Kt]={poseId:"default",poses:e.poses},this.updateHandPose()}get poseId(){return this[Kt].poseId}set poseId(e){if(!this[Kt].poses[e]){console.warn(`Pose config ${e} not found`);return}this[Kt].poseId=e}updateHandPose(){const e=this[Kt].poses[this[Kt].poseId],n=this[Kt].poses.pinch;Object.values(Ur).forEach(r=>{const i=e.jointTransforms[r].offsetMatrix,s=n.jointTransforms[r].offsetMatrix,o=this.inputSource.hand.get(r);uc(o[Ee].offsetMatrix,i,s,this.pinchValue),this.inputSource.handedness===We.Right&&n3(o[Ee].offsetMatrix),o[cn].radius=(1-this.pinchValue)*e.jointTransforms[r].radius+this.pinchValue*n.jointTransforms[r].radius}),e.gripOffsetMatrix&&n.gripOffsetMatrix&&uc(this.inputSource.gripSpace[Ee].offsetMatrix,e.gripOffsetMatrix,n.gripOffsetMatrix,this.pinchValue)}get pinchValue(){return this[ve].inputSource.gamepad[z].buttonsMap.pinch.value}updatePinchValue(e){if(e>1||e<0){console.warn(`Out-of-range value ${e} provided for pinch`);return}const n=this[ve].inputSource.gamepad[z].buttonsMap.pinch;n[z].pendingValue=e}onFrameStart(e){super.onFrameStart(e),this.updateHandPose()}}class I0 extends EventTarget{}const r3={antialias:!0,depth:!0,stencil:!1,alpha:!0,ignoreDepthValues:!1,framebufferScaleFactor:1};class i3 extends I0{constructor(e,n,r={}){if(super(),e[x].ended)throw new DOMException("Session has ended","InvalidStateError");const i={...r3,...r};this[Nt]={session:e,context:n,antialias:i.antialias}}get context(){return this[Nt].context}get antialias(){return this[Nt].antialias}get ignoreDepthValues(){return!0}get framebuffer(){return null}get framebufferWidth(){return this[Nt].context.drawingBufferWidth}get framebufferHeight(){return this[Nt].context.drawingBufferHeight}getViewport(e){if(e[Jt].session!==this[Nt].session)throw new DOMException("View's session differs from Layer's session","InvalidStateError");return this[Nt].session[x].device[R].getViewport(this,e)}static getNativeFramebufferScaleFactor(e){if(!(e instanceof ia))throw new TypeError("getNativeFramebufferScaleFactor must be passed a session.");return e[x].ended?0:1}}class s3{constructor(e,n,r){const{schema:i,frames:s}=n;if(!s||!i||s.length===0)throw new DOMException("wrong recording format","NotSupportedError");const o=new mn(_e.Viewer,e),a={[me.Left]:new we(o),[me.Right]:new we(o),[me.None]:new we(o)};this[X]={refSpace:e,inputSources:new Map,inputSchemas:new Map,frames:s,recordedFramePointer:0,startingTimeStamp:s[0][0],endingTimeStamp:s[s.length-1][0],playbackTime:s[0][0],playing:!1,viewerSpace:o,viewSpaces:a,vec3:Me(),quat:ct()},rr(this[X].viewSpaces[me.Left][Ee].offsetMatrix,at(-r/2,0,0)),rr(this[X].viewSpaces[me.Right][Ee].offsetMatrix,at(r/2,0,0)),i.forEach(l=>{const c=l[0],f=l[1];let d;if(f.hasGamepad){const w=[];for(let b=0;b<f.numButtons;b++)w.push({id:b.toString(),type:"manual"});const y=[];for(let b=0;b<f.numAxes;b++)y.push({id:b.toString(),type:"manual"});d=new ra({mapping:f.mapping,buttons:w,axes:y})}const p=new we(e);let m;f.hasHand&&(m=new sa,Object.values(Ur).forEach(w=>{m.set(w,new oa(w,p))}));const g=new Qi(f.handedness,f.targetRayMode,f.profiles,p,d,f.hasGrip?new we(e):void 0,f.hasHand?m:void 0);this[X].inputSources.set(c,{active:!1,source:g}),this[X].inputSchemas.set(c,f)})}play(){this[X].recordedFramePointer=0,this[X].playbackTime=this[X].startingTimeStamp,this[X].playing=!0,this[X].actualTimeStamp=performance.now()}stop(){this[X].playing=!1}get playing(){return this[X].playing}get viewerSpace(){return this[X].viewerSpace}get viewSpaces(){return this[X].viewSpaces}get inputSources(){return Array.from(this[X].inputSources.values()).filter(e=>e.active).map(e=>e.source)}playFrame(){const e=performance.now(),n=e-this[X].actualTimeStamp;if(this[X].actualTimeStamp=e,this[X].playbackTime+=n,this[X].playbackTime>this[X].endingTimeStamp){this.stop();return}for(;this[X].frames[this[X].recordedFramePointer+1][0]<this[X].playbackTime;)this[X].recordedFramePointer++;const r=this[X].frames[this[X].recordedFramePointer],i=this[X].frames[this[X].recordedFramePointer+1],s=(this[X].playbackTime-r[0])/(i[0]-r[0]);this.updateXRSpaceFromMergedFrames(this[X].viewerSpace,r.slice(1,8),i.slice(1,8),s);const o=new Map;for(let l=8;l<r.length;l++){const{index:c,inputData:f}=this.processRawInputData(r[l]);o.set(c,f)}const a=new Map;for(let l=8;l<i.length;l++){const{index:c,inputData:f}=this.processRawInputData(i[l]);a.set(c,f)}this[X].inputSources.forEach(l=>{l.active=!1}),a.forEach((l,c)=>{this[X].inputSources.get(c).active=!0;const f=this[X].inputSources.get(c).source,d=this[X].inputSchemas.get(c);this.updateInputSource(f,d,o.has(c)?o.get(c):l,l,s)})}updateInputSource(e,n,r,i,s){if(this.updateXRSpaceFromMergedFrames(e.targetRaySpace,r.targetRayTransform,i.targetRayTransform,s),n.hasGrip&&this.updateXRSpaceFromMergedFrames(e.gripSpace,r.gripTransform,i.gripTransform,s),n.hasHand)for(let o=0;o<25;o++){const a=r.handTransforms.slice(o*8,o*8+7),l=i.handTransforms.slice(o*8,o*8+7),c=r.handTransforms[o*8+7],f=i.handTransforms[o*8+7],d=e.hand.get(n.jointSequence[o]);this.updateXRSpaceFromMergedFrames(d,a,l,s),d[cn].radius=(f-c)*s+c}if(n.hasGamepad){const o=e.gamepad;i.buttons.forEach((a,l)=>{const c=o.buttons[l];c[z].pressed=a[0]===1,c[z].touched=a[1]===1;const f=r.buttons[l][2],d=a[2];c[z].value=(d-f)*s+f}),i.axes.forEach((a,l)=>{const c=r.axes[l];o[z].axesMap[l.toString()].x=(a-c)*s+c})}}updateXRSpaceFromMergedFrames(e,n,r,i){const s=at(n[0],n[1],n[2]),o=Ii(n[3],n[4],n[5],n[6]),a=at(r[0],r[1],r[2]),l=Ii(r[3],r[4],r[5],r[6]);vo(this[X].vec3,s,a,i),Cr(this[X].quat,o,l,i),Xr(e[Ee].offsetMatrix,this[X].quat,this[X].vec3)}processRawInputData(e){const n=e[0],r=this[X].inputSchemas.get(n),s={targetRayTransform:e.slice(1,8)};let o=8;if(r.hasGrip&&(s.gripTransform=e[o++]),r.hasHand&&(s.handTransforms=e[o++]),r.hasGamepad){const a=e[o];s.buttons=a.slice(0,r.numButtons),s.axes=a.slice(r.numButtons)}return{index:n,inputData:s}}}const dc="2.1.1";class hc extends Event{constructor(e,n){if(super(e,n),!n.referenceSpace)throw new Error("XRReferenceSpaceEventInit.referenceSpace is required");this.referenceSpace=n.referenceSpace,this.transform=n.transform}}class pc extends EventTarget{constructor(e){super(),this[et]={device:e,grantSession:({resolve:n,reject:r,mode:i,options:s})=>{if(this[et].activeSession){r(new DOMException("An active XRSession already exists.","InvalidStateError"));return}const{requiredFeatures:o=[],optionalFeatures:a=[]}=s,{supportedFeatures:l}=this[et].device;if(!o.every(m=>l.includes(m))){r(new Error("One or more required features are not supported by the device."));return}const f=a.filter(m=>l.includes(m)),d=Array.from(new Set([...o,...f,"viewer","local"])),p=new ia(this[et].device,i,d);this[et].activeSession=p,p.addEventListener("end",()=>{this[et].activeSession=void 0}),n(p)}}}isSessionSupported(e){return new Promise((n,r)=>{n(e==="inline"?!0:this[et].device.supportedSessionModes.includes(e))})}requestSession(e,n={}){return new Promise((r,i)=>{this.isSessionSupported(e).then(s=>{if(!s){i(new DOMException("The requested XRSession mode is not supported.","NotSupportedError"));return}const o={resolve:r,reject:i,mode:e,options:n};this[et].grantSession(o)}).catch(i)})}offerSession(e,n={}){return new Promise((r,i)=>{this.isSessionSupported(e).then(s=>{if(!s){i(new DOMException("The requested XRSession mode is not supported.","NotSupportedError"));return}this[et].offeredSessionConfig={resolve:r,reject:i,mode:e,options:n}}).catch(i)})}}class fi{constructor(e,n,r,i){this[Tr]={x:e,y:n,width:r,height:i}}get x(){return this[Tr].x}get y(){return this[Tr].y}get width(){return this[Tr].width}get height(){return this[Tr].height}}var te;(function(t){t.texture="texture",t["texture-array"]="texture-array"})(te||(te={}));var L;(function(t){t.default="default",t.mono="mono",t.stereo="stereo",t["stereo-left-right"]="stereo-left-right",t["stereo-top-bottom"]="stereo-top-bottom"})(L||(L={}));const Gr=t=>t&&typeof t.getOffsetReferenceSpace=="function",or=()=>typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},To=(t,e)=>{switch(e){case t.RGBA8:case t.RGB5_A1:case t.RGBA4:case t.SRGB8_ALPHA8:return{internalFormat:e,textureFormat:t.RGBA,type:t.UNSIGNED_BYTE};case t.RGBA8_SNORM:return{internalFormat:e,textureFormat:t.RGBA,type:t.BYTE};case t.RGB10_A2:return{internalFormat:e,textureFormat:t.RGBA,type:t.UNSIGNED_INT_2_10_10_10_REV};case t.RGBA16F:return{internalFormat:e,textureFormat:t.RGBA,type:t.HALF_FLOAT};case t.RGBA32F:return{internalFormat:e,textureFormat:t.RGBA,type:t.FLOAT};case t.RGBA8UI:return{internalFormat:e,textureFormat:t.RGBA_INTEGER,type:t.UNSIGNED_BYTE};case t.RGBA8I:return{internalFormat:e,textureFormat:t.RGBA_INTEGER,type:t.BYTE};case t.RGBA16UI:return{internalFormat:e,textureFormat:t.RGBA_INTEGER,type:t.UNSIGNED_SHORT};case t.RGBA16I:return{internalFormat:e,textureFormat:t.RGBA_INTEGER,type:t.SHORT};case t.RGBA32UI:return{internalFormat:e,textureFormat:t.RGBA_INTEGER,type:t.UNSIGNED_INT};case t.RGBA32I:return{internalFormat:e,textureFormat:t.RGBA_INTEGER,type:t.INT};case t.RGB10_A2UI:return{internalFormat:e,textureFormat:t.RGBA_INTEGER,type:t.UNSIGNED_INT_2_10_10_10_REV};case t.RGB8:case t.RGB565:case t.SRGB8:return{internalFormat:e,textureFormat:t.RGB,type:t.UNSIGNED_BYTE};case t.RGB8_SNORM:return{internalFormat:e,textureFormat:t.RGB,type:t.BYTE};case t.RGB16F:case t.R11F_G11F_B10F:case t.RGB9_E5:return{internalFormat:e,textureFormat:t.RGB,type:t.HALF_FLOAT};case t.RGB32F:return{internalFormat:e,textureFormat:t.RGB,type:t.FLOAT};case t.RGB8UI:return{internalFormat:e,textureFormat:t.RGB_INTEGER,type:t.UNSIGNED_BYTE};case t.RGB8I:return{internalFormat:e,textureFormat:t.RGB_INTEGER,type:t.BYTE};case t.RGB16UI:return{internalFormat:e,textureFormat:t.RGB_INTEGER,type:t.UNSIGNED_SHORT};case t.RGB16I:return{internalFormat:e,textureFormat:t.RGB_INTEGER,type:t.SHORT};case t.RGB32UI:return{internalFormat:e,textureFormat:t.RGB_INTEGER,type:t.UNSIGNED_INT};case t.RGB32I:return{internalFormat:e,textureFormat:t.RGB_INTEGER,type:t.INT};case t.DEPTH_COMPONENT16:return{internalFormat:e,textureFormat:t.DEPTH_COMPONENT,type:t.UNSIGNED_SHORT};case t.DEPTH_COMPONENT24:return{internalFormat:e,textureFormat:t.DEPTH_COMPONENT,type:t.UNSIGNED_INT};case t.DEPTH_COMPONENT32F:return{internalFormat:e,textureFormat:t.DEPTH_COMPONENT,type:t.FLOAT};case t.DEPTH24_STENCIL8:return{internalFormat:e,textureFormat:t.DEPTH_STENCIL,type:t.UNSIGNED_INT_24_8};case t.DEPTH32F_STENCIL8:return{internalFormat:e,textureFormat:t.DEPTH_STENCIL,type:t.FLOAT_32_UNSIGNED_INT_24_8_REV};case t.DEPTH_COMPONENT:return To(t,t.DEPTH_COMPONENT24);case t.DEPTH_STENCIL:return To(t,t.DEPTH24_STENCIL8);case t.RGBA:case t.RGB:case t.LUMINANCE_ALPHA:case t.LUMINANCE:case t.ALPHA:return{internalFormat:e,textureFormat:e,type:t.UNSIGNED_BYTE};default:throw new Error("Attempted to create polyfill with unsupported format.")}};class dr{constructor(){this._hasRunDeferredInitialize=!1,this._media=null}initialize(e,n){this.session=e,n&&(this.context=n),this.blendTextureSourceAlpha=!0}destroy(){this._colorTextures=[],this._depthStencilTextures=[]}addEventListener(e,n,r){}dispatchEvent(e){return!1}removeEventListener(e,n,r){}getContext(){return this.context}getTextureType(){throw new Error("Unimplemented")}get colorTextures(){return this._colorTextures}get depthStencilTextures(){return this._depthStencilTextures}get colorTexturesMeta(){return this._texturesMeta}get media(){return this.isMediaLayer()||console.warn("Attempted to retrieve media from a non-media layer"),this._media}determineLayoutAttribute(e,n,r){if(!(n instanceof WebGL2RenderingContext)&&e===te["texture-array"])throw new TypeError;if(r===L.mono)return r;if(r===L.default){if(this.session.internalViews&&this.session.internalViews.length===1)return L.mono;if(e===te["texture-array"])return r}return r===L.default||r===L.stereo?L["stereo-left-right"]:r}isMediaLayer(){return this._media!==null}_deferredInitialize(){}initializeIfNeeded(){this._hasRunDeferredInitialize||(this._hasRunDeferredInitialize=!0,this._deferredInitialize())}_allocateColorTexturesInternal(e,n){let i=this.session.internalViews;if(!i||i.length===0){console.warn("We can't allocate color textures without views");return}if(this.initializeIfNeeded(),this.layout===L.mono)if(e===te["texture-array"]){const s=this._createNewColorTexture(n.viewPixelWidth,n.viewPixelHeight,e,n.colorFormat);this._texturesMeta=[s],this._colorTextures=[s.texture];return}else{const s=this._createNewColorTexture(n.viewPixelWidth,n.viewPixelHeight,e,n.colorFormat);this._texturesMeta=[s],this._colorTextures=[s.texture];return}else if(this.layout===L.stereo)if(e===te["texture-array"]){const s=this._createNewColorTexture(n.viewPixelWidth,n.viewPixelHeight,e,n.colorFormat,2);this._texturesMeta=[s],this._colorTextures=[s.texture];return}else{const s=this._createNewColorTexture(n.viewPixelWidth,n.viewPixelHeight,e,n.colorFormat),o=this._createNewColorTexture(n.viewPixelWidth,n.viewPixelHeight,e,n.colorFormat);this._texturesMeta=[s,o],this._colorTextures=[s.texture,o.texture];return}else if(this.layout===L["stereo-left-right"]){const s=this._createNewColorTexture(n.viewPixelWidth*2,n.viewPixelHeight,e,n.colorFormat);this._texturesMeta=[s],this._colorTextures=[s.texture];return}else if(this.layout===L["stereo-top-bottom"]){const s=this._createNewColorTexture(n.viewPixelWidth,n.viewPixelHeight*2,e,n.colorFormat);this._texturesMeta=[s],this._colorTextures=[s.texture];return}}_allocateDepthStencilTexturesInternal(e,n){if(!n.depthFormat){this._depthStencilTextures=[];return}if(this._getSupportedDepthFormats().indexOf(n.depthFormat)<0)throw new Error("Depth format provided is not supported in non-projection layers.");if(n.mipLevels<1)throw new Error("Invalid miplevel. Miplevel needs to be >= 1");if(this.layout===L.mono)if(e===te["texture-array"]){const r=this._createNewDepthStencilTexture(n.viewPixelWidth,n.viewPixelHeight,e,n.depthFormat);this._depthStencilTextures=[r.texture];return}else{const r=this._createNewColorTexture(n.viewPixelWidth,n.viewPixelHeight,e,n.depthFormat);this._depthStencilTextures=[r.texture];return}else if(this.layout===L.stereo)if(e===te["texture-array"]){const r=this._createNewDepthStencilTexture(n.viewPixelWidth,n.viewPixelHeight,e,n.depthFormat,2);this._depthStencilTextures=[r.texture];return}else{const r=this._createNewDepthStencilTexture(n.viewPixelWidth,n.viewPixelHeight,e,n.depthFormat),i=this._createNewDepthStencilTexture(n.viewPixelWidth,n.viewPixelHeight,e,n.depthFormat);this._depthStencilTextures=[r.texture,i.texture];return}else if(this.layout===L["stereo-left-right"]){const r=this._createNewDepthStencilTexture(n.viewPixelWidth*2,n.viewPixelHeight,e,n.depthFormat);this._depthStencilTextures=[r.texture];return}else if(this.layout===L["stereo-top-bottom"]){const r=this._createNewDepthStencilTexture(n.viewPixelWidth,n.viewPixelHeight*2,e,n.depthFormat);this._depthStencilTextures=[r.texture];return}}_createNewColorTexture(e,n,r,i,s=1){return this._createGenericPolyfillTexture(r,e,n,i,0,s)}_createNewDepthStencilTexture(e,n,r,i,s=1){return this._createGenericPolyfillTexture(r,e,n,i,0,s)}_createGenericPolyfillTexture(e,n,r,i,s=0,o=1){if(e===te["texture-array"]&&o<=1&&console.warn("creating a texture array with a single layer..."),e===te["texture-array"]&&this.context instanceof WebGLRenderingContext)throw new Error("WebGL 1 does not support texture array");let a=this.context.createTexture(),l={width:n,height:r,layers:o,type:e,textureFormat:i,texture:a},c=i,f=this.context.UNSIGNED_BYTE;if(this.context instanceof WebGL2RenderingContext){const d=To(this.context,i);c=d.internalFormat,i=d.textureFormat,f=d.type}else i===this.context.DEPTH_COMPONENT&&(f=this.context.UNSIGNED_INT),i===this.context.DEPTH_STENCIL&&(f=this.context.UNSIGNED_INT_24_8_WEBGL);if(e===te["texture-array"]&&this.context instanceof WebGL2RenderingContext){console.warn("texture-array layers are supported...questionably in the polyfill at the moment. Use at your own risk.");const d=this.context.getParameter(this.context.TEXTURE_BINDING_2D_ARRAY);this.context.bindTexture(this.context.TEXTURE_2D_ARRAY,a),this._getSupportedDepthFormats().indexOf(i)>=0?this.context.texStorage3D(this.context.TEXTURE_2D_ARRAY,1,c,n,r,o):this.context.texImage3D(this.context.TEXTURE_2D_ARRAY,0,c,n,r,o,0,i,f,null),this.context.bindTexture(this.context.TEXTURE_2D_ARRAY,d)}else{const d=this.context.getParameter(this.context.TEXTURE_BINDING_2D);this.context.bindTexture(this.context.TEXTURE_2D,a),this.context.texImage2D(this.context.TEXTURE_2D,0,c,n,r,0,i,f,null),this.context.bindTexture(this.context.TEXTURE_2D,d)}return l}_getSupportedDepthFormats(){const e=[];return this.context instanceof WebGLRenderingContext&&!this.context.getExtension("WEBGL_depth_texture")||(e.push(this.context.DEPTH_COMPONENT,this.context.DEPTH_STENCIL),this.context instanceof WebGL2RenderingContext&&e.push(this.context.DEPTH_COMPONENT24,this.context.DEPTH24_STENCIL8)),e}}const C0={colorFormat:6408,mipLevels:1,layout:L.mono,isStatic:!1,space:null,viewPixelHeight:0,viewPixelWidth:0,textureType:te.texture,radius:2,centralAngle:.78539,aspectRatio:2},o3={layout:L.mono,invertStereo:!1,space:null,radius:2,centralAngle:.78539};class aa extends dr{constructor(e,n){super(),this._media=n??null,this.isMediaLayer()?this.init=Object.assign(Object.assign({},o3),e):this.init=Object.assign(Object.assign({},C0),e),this.radius=this.init.radius,this.centralAngle=this.init.centralAngle,this.aspectRatio=this.init.aspectRatio,this.space=this.init.space,this.layout=this.init.layout;const r=or();this.init.transform?this.transform=new r.XRRigidTransform(e.transform.position,e.transform.orientation):this.transform=new r.XRRigidTransform({x:0,y:0,z:0,w:1}),this.isMediaLayer()||(this.isStatic=e.isStatic)}getTextureType(){return this.isMediaLayer()?te.texture:this.init.textureType}_deferredInitialize(){let e=this.determineLayoutAttribute(this.init.textureType,this.context,this.init.layout);this.layout=e,this.needsRedraw=!0}get colorTextures(){if(this.isMediaLayer())throw new Error("Media layers do not have associated textures");return(!this._colorTextures||!this._colorTextures.length)&&this._allocateColorTexturesInternal(this.getTextureType(),this.init),this._colorTextures}get depthStencilTextures(){if(this.isMediaLayer())throw new Error("Media layers do not have associated textures");return(!this._depthStencilTextures||!this._depthStencilTextures.length)&&this._allocateDepthStencilTexturesInternal(this.getTextureType(),this.init),this._depthStencilTextures}get colorTexturesMeta(){if(this.isMediaLayer())throw new Error("Media layers do not have associated textures");return(!this._colorTextures||!this._colorTextures.length)&&this._allocateColorTexturesInternal(this.getTextureType(),this.init),this._texturesMeta}get width(){const e=2*this.radius*Math.PI,n=this.centralAngle/(2*Math.PI);return e*n}get height(){return this.width/this.aspectRatio}}const L0={colorFormat:6408,mipLevels:1,layout:L.mono,isStatic:!1,space:null,viewPixelHeight:0,viewPixelWidth:0,textureType:te.texture,radius:0,centralHorizontalAngle:6.28318,upperVerticalAngle:1.570795,lowerVerticalAngle:-1.570795},a3={space:null,layout:L.mono,invertStereo:!1,radius:0,centralHorizontalAngle:6.28318,upperVerticalAngle:1.570795,lowerVerticalAngle:-1.570795};class la extends dr{constructor(e,n){if(super(),this._media=n??null,this.isMediaLayer()?this.init=Object.assign(Object.assign({},a3),e):this.init=Object.assign(Object.assign({},L0),e),!Gr(this.init.space))throw new TypeError("Equirect layer's space needs to be an XRReferenceSpace");this.radius=this.init.radius,this.centralHorizontalAngle=this.init.centralHorizontalAngle,this.upperVerticalAngle=this.init.upperVerticalAngle,this.lowerVerticalAngle=this.init.lowerVerticalAngle,this.space=this.init.space,this.layout=this.init.layout;const r=or();e.transform?this.transform=new r.XRRigidTransform(e.transform.position,e.transform.orientation):this.transform=new r.XRRigidTransform({x:0,y:0,z:0,w:1}),this.isMediaLayer()||(this.isStatic=e.isStatic)}getTextureType(){return this.isMediaLayer()?te.texture:this.init.textureType}_deferredInitialize(){let e=this.determineLayoutAttribute(this.init.textureType,this.context,this.init.layout);this.layout=e,this.needsRedraw=!0}get colorTextures(){if(this.isMediaLayer())throw new Error("Media layers do not have associated textures");return(!this._colorTextures||!this._colorTextures.length)&&this._allocateColorTexturesInternal(this.getTextureType(),this.init),this._colorTextures}get depthStencilTextures(){if(this.isMediaLayer())throw new Error("Media layers do not have associated textures");return(!this._depthStencilTextures||!this._depthStencilTextures.length)&&this._allocateDepthStencilTexturesInternal(this.getTextureType(),this.init),this._depthStencilTextures}get colorTexturesMeta(){if(this.isMediaLayer())throw new Error("Media layers do not have associated textures");return(!this._colorTextures||!this._colorTextures.length)&&this._allocateColorTexturesInternal(this.getTextureType(),this.init),this._texturesMeta}}const j0={colorFormat:6408,mipLevels:1,layout:L.mono,isStatic:!1,space:null,viewPixelHeight:0,viewPixelWidth:0,textureType:te.texture,width:1,height:1},l3={space:null,layout:L.mono,invertStereo:!1};class ca extends dr{constructor(e,n){super(),this._media=n??null,this.isMediaLayer()?this.init=Object.assign(Object.assign({},l3),e):this.init=Object.assign(Object.assign({},j0),e),this.width=this.init.width,this.height=this.init.height,this.space=this.init.space,this.layout=this.init.layout;const r=or();this.init.transform?this.transform=new r.XRRigidTransform(e.transform.position,e.transform.orientation):this.transform=new r.XRRigidTransform({x:0,y:0,z:0,w:1}),this.isMediaLayer()||(this.isStatic=e.isStatic)}getTextureType(){return this.isMediaLayer()?te.texture:this.init.textureType}_deferredInitialize(){let e=this.determineLayoutAttribute(this.init.textureType,this.context,this.init.layout);this.layout=e,this.needsRedraw=!0}get colorTextures(){if(this.isMediaLayer())throw new Error("Media layers do not have associated textures");return(!this._colorTextures||!this._colorTextures.length)&&this._allocateColorTexturesInternal(this.getTextureType(),this.init),this._colorTextures}get depthStencilTextures(){if(this.isMediaLayer())throw new Error("Media layers do not have associated textures");return(!this._depthStencilTextures||!this._depthStencilTextures.length)&&this._allocateDepthStencilTexturesInternal(this.getTextureType(),this.init),this._depthStencilTextures}get colorTexturesMeta(){if(this.isMediaLayer())throw new Error("Media layers do not have associated textures");return(!this._colorTextures||!this._colorTextures.length)&&this._allocateColorTexturesInternal(this.getTextureType(),this.init),this._texturesMeta}}class c3{constructor(e){if(this.session=e,this.session.ended)throw new Error("Session has ended")}createQuadLayer(e,n){if(this.session.ended)throw new Error("Session has ended");if(n.layout===L.default)throw new TypeError("Media Quad layer cannot be created with layout of default");let r=this.calculateAspectRatio(e,n.layout);n.width===void 0&&n.height===void 0&&(n.width=1),n.height===void 0&&(n.height=n.width/r),n.width===void 0&&(n.width=n.height/r);let i=new ca(n,e);return i.needsRedraw=!1,i.initialize(this.session),i}createCylinderLayer(e,n){if(this.session.ended)throw new Error("Session has ended");if(n.layout===L.default)throw new TypeError("Media Cylinder layer cannot be created with layout of default");let r=this.calculateAspectRatio(e,n.layout);n.aspectRatio===void 0&&(n.aspectRatio=r);let i=new aa(n,e);return i.needsRedraw=!1,i.initialize(this.session),i}createEquirectLayer(e,n){if(this.session.ended)throw new Error("Session has ended");if(n.layout===L.default)throw new TypeError("Media Equirect layer cannot be created with layout of default");if(!Gr(n.space))throw new Error("Media Equirect layer's space must be of type XRReferenceSpace");let r=new la(n,e);return r.needsRedraw=!1,r.initialize(this.session),r}calculateAspectRatio(e,n){let r=e.videoWidth,i=e.videoHeight;return n===L["stereo-left-right"]&&(r/=2),n===L["stereo-top-bottom"]&&(i/=2),r/i}}const Ro={textureType:te.texture,colorFormat:6408,depthFormat:6402,scaleFactor:1};class ji extends dr{constructor(e=Ro){super(),this.init=Object.assign(Object.assign({},Ro),e)}initialize(e,n){super.initialize(e,n),this.initializeIfNeeded();let r=e.getBaseLayer();this.textureWidth=r.framebufferWidth*this.init.scaleFactor,this.textureHeight=r.framebufferHeight*this.init.scaleFactor}_allocateProjectionColorTextures(){let e=[],n=[];const r=()=>{e=[];for(let f of n)e.push(f.texture)};let i=this.session,s=i.internalViews;if(!s||s.length===0){console.warn("We can't allocate color textures without views");return}let o=i.getBaseLayer(),a=s.length,l=o.framebufferWidth*this.init.scaleFactor/s.length,c=o.framebufferHeight*this.init.scaleFactor;if(this.layout===L.mono||this.layout===L.default){if(this.init.textureType===te["texture-array"])n=[this._createNewColorTexture(l,c,te["texture-array"],this.init.colorFormat,a)];else for(let f of s){let d=this._createNewColorTexture(l,c,te.texture,this.init.colorFormat);n.push(d)}r(),this._colorTexturesMeta=n,this._colorTextures=e;return}this.layout===L["stereo-left-right"]?n=[this._createNewColorTexture(l*a,c,this.init.textureType,this.init.colorFormat)]:this.layout===L["stereo-top-bottom"]&&(n=[this._createNewColorTexture(l,c*a,this.init.textureType,this.init.colorFormat)]),r(),this._colorTexturesMeta=n,this._colorTextures=e}_allocateProjectionDepthStencilTextures(){let e=this.session,n=e.internalViews;if(!n||n.length===0)return;if(this.init.depthFormat===0){this._depthStencilTextures=[];return}if(this.context instanceof WebGLRenderingContext&&!this.context.getExtension("WEBGL_depth_texture")){this._depthStencilTextures=[];return}let r=[],i=[];const s=()=>{r=[];for(let f of i)r.push(f.texture)};this.initializeIfNeeded();let o=e.getBaseLayer(),a=n.length,l=o.framebufferWidth*this.init.scaleFactor/n.length,c=o.framebufferHeight*this.init.scaleFactor;if(this.layout===L.mono||this.layout===L.default){if(this.init.textureType===te["texture-array"])i=[this._createNewDepthStencilTexture(l,c,this.init.textureType,this.init.depthFormat,a)];else for(let f of n){let d=this._createNewDepthStencilTexture(l,c,this.init.textureType,this.init.depthFormat);i.push(d)}s(),this._depthStencilTextures=r;return}this.layout===L["stereo-left-right"]?i=[this._createNewDepthStencilTexture(l*a,c,this.init.textureType,this.init.depthFormat)]:this.layout===L["stereo-top-bottom"]&&(i=[this._createNewDepthStencilTexture(l,c*a,this.init.textureType,this.init.depthFormat)]),s(),this._depthStencilTextures=r}get colorTextures(){return(!this._colorTextures||!this._colorTextures.length)&&this._allocateProjectionColorTextures(),this._colorTextures}get depthStencilTextures(){return this._depthStencilTextures===void 0&&this._allocateProjectionDepthStencilTextures(),this._depthStencilTextures||[]}get colorTexturesMeta(){return(!this._colorTextures||!this._colorTextures.length)&&this._allocateProjectionColorTextures(),this._colorTexturesMeta}getTextureType(){return this.init.textureType}_deferredInitialize(){this.isStatic=!1,this.ignoreDepthValues=!1,this.fixedFoveation=0;let e=this.determineLayoutAttribute(this.init.textureType,this.context,L.default);this.layout=e,this.needsRedraw=!0;let n=this.determineMaximumScaleFactor(),r=Math.min(this.init.scaleFactor,n);this.init.scaleFactor=r}determineMaximumScaleFactor(){let e=this.session.getBaseLayer(this.context),n=e.framebufferWidth,r=e.framebufferHeight;this.layout===L["stereo-left-right"]&&(n*=2),this.layout===L["stereo-top-bottom"]&&(r*=2);let i=Math.max(n,r);return this.context.getParameter(this.context.MAX_TEXTURE_SIZE)/i}}const Ut=(t,e,n,r,i)=>{let s=0,o=0,a=e.width,l=e.height;n===L["stereo-left-right"]?(s=e.width*r/i,a=e.width/i):n===L["stereo-top-bottom"]&&(o=e.height*r/i,l=e.height/i),t.x=s,t.y=o,t.width=a,t.height=l},mc=(t,e,n)=>{var r=t.createShader(n);t.shaderSource(r,e),t.compileShader(r);var i=t.getShaderParameter(r,t.COMPILE_STATUS);if(!i)throw"could not compile shader:"+t.getShaderInfoLog(r);return r},Hr=(t,e,n)=>{const r=t.createProgram(),i=mc(t,e,t.VERTEX_SHADER),s=mc(t,n,t.FRAGMENT_SHADER);t.attachShader(r,i),t.attachShader(r,s),t.deleteShader(i),t.deleteShader(s),t.linkProgram(r);var o=t.getProgramParameter(r,t.LINK_STATUS);if(!o)throw"program failed to link:"+t.getProgramInfoLog(r);return r},u3=(t,e,n,r,i)=>{var s=e,o=e+r,a=n,l=n+i;t.bufferData(t.ARRAY_BUFFER,new Float32Array([s,a,o,a,s,l,s,l,o,a,o,l]),t.DYNAMIC_DRAW)},ua=t=>{if(t instanceof WebGL2RenderingContext)return t;const e=t.getExtension("OES_vertex_array_object");if(!e)throw new Error("Cannot use VAOs.");return{VERTEX_ARRAY_BINDING:e.VERTEX_ARRAY_BINDING_OES,bindVertexArray:e.bindVertexArrayOES.bind(e),createVertexArray:e.createVertexArrayOES.bind(e),deleteVertexArray:e.deleteVertexArrayOES.bind(e),isVertexArray:e.isVertexArrayOES.bind(e)}},Ji=t=>t,f3=Ji`
|
|
1012
|
-
attribute vec2 a_position;
|
|
1013
|
-
attribute vec2 a_texCoord;
|
|
1014
|
-
|
|
1015
|
-
varying vec2 v_texCoord;
|
|
1016
|
-
|
|
1017
|
-
void main() {
|
|
1018
|
-
// convert the rectangle from pixels to 0.0 to 1.0
|
|
1019
|
-
vec2 zeroToOne = a_position;
|
|
1020
|
-
|
|
1021
|
-
// convert from 0->1 to 0->2
|
|
1022
|
-
vec2 zeroToTwo = zeroToOne * 2.0;
|
|
1023
|
-
|
|
1024
|
-
// convert from 0->2 to -1->+1 (clipspace)
|
|
1025
|
-
vec2 clipSpace = zeroToTwo - 1.0;
|
|
1026
|
-
|
|
1027
|
-
gl_Position = vec4(clipSpace * vec2(1, 1), 0, 1);
|
|
1028
|
-
|
|
1029
|
-
// pass the texCoord to the fragment shader
|
|
1030
|
-
// The GPU will interpolate this value between points.
|
|
1031
|
-
v_texCoord = a_texCoord;
|
|
1032
|
-
}
|
|
1033
|
-
`,d3=Ji`
|
|
1034
|
-
precision mediump float;
|
|
1035
|
-
|
|
1036
|
-
// our texture
|
|
1037
|
-
uniform sampler2D u_image;
|
|
1038
|
-
|
|
1039
|
-
// the texCoords passed in from the vertex shader.
|
|
1040
|
-
varying vec2 v_texCoord;
|
|
1041
|
-
|
|
1042
|
-
void main() {
|
|
1043
|
-
vec4 tex = texture2D(u_image, v_texCoord);
|
|
1044
|
-
gl_FragColor = vec4(tex.rgb, tex.a);
|
|
1045
|
-
}
|
|
1046
|
-
`;class N0{constructor(e,n){this.gl=n,this.layer=e,this.program=Hr(this.gl,f3,d3),this.programInfo={attribLocations:{a_position:this.gl.getAttribLocation(this.program,"a_position"),a_texCoord:this.gl.getAttribLocation(this.program,"a_texCoord")}},this._createVAOs()}render(e){let n=this.gl,r=e.getBaseLayer();n.viewport(0,0,r.framebufferWidth,r.framebufferHeight);const i=this.layer.getTextureType(),s=n.getParameter(n.TEXTURE_BINDING_2D),o=n.getParameter(n.ACTIVE_TEXTURE);if(i===te.texture)n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,this.layer.colorTextures[0]),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST);else throw new Error(`Created a texture projection renderer instead of a texture-array projection renderer for a texture-array layer.
|
|
1047
|
-
This is probably an error with the polyfill itself; please file an issue on Github if you run into this.`);for(let a of e.internalViews){let l=r.getViewport(a);n.viewport(l.x,l.y,l.width,l.height),this._shouldUseStereoTexturePoints()?this._renderInternalStereo(a):this._renderInternal()}n.activeTexture(o),n.bindTexture(n.TEXTURE_2D,s)}_renderInternal(){let e=this.gl;const n=e.getParameter(e.CURRENT_PROGRAM);e.useProgram(this.program),this.vaoGl.bindVertexArray(this.vao);var r=e.TRIANGLES,i=0,s=6;e.drawArrays(r,i,s),this.vaoGl.bindVertexArray(null),e.useProgram(n)}_renderInternalStereo(e){if(e.eye==="none")return this._renderInternal();let n=this.gl;this.vaoGl.bindVertexArray(this.vao);const r=n.getParameter(n.CURRENT_PROGRAM);n.useProgram(this.program),this._setStereoTextureBuffer(e.eye==="right"?1:0);var i=n.TRIANGLES,s=0,o=6;n.drawArrays(i,s,o),this.vaoGl.bindVertexArray(null),n.useProgram(r)}_createVAOs(){this._createTextureUVs();let e=this.gl;this.vaoGl=ua(e);let n=e.createBuffer();this.vao=this.vaoGl.createVertexArray(),this.vaoGl.bindVertexArray(this.vao),e.enableVertexAttribArray(this.programInfo.attribLocations.a_position),e.bindBuffer(e.ARRAY_BUFFER,n),u3(e,0,0,1,1);let r=2,i=e.FLOAT,s=!1,o=0,a=0;e.vertexAttribPointer(this.programInfo.attribLocations.a_position,r,i,s,o,a),this.texcoordBuffer=e.createBuffer(),e.enableVertexAttribArray(this.programInfo.attribLocations.a_texCoord),e.bindBuffer(e.ARRAY_BUFFER,this.texcoordBuffer),e.bufferData(e.ARRAY_BUFFER,this.texturePoints,e.DYNAMIC_DRAW),e.vertexAttribPointer(this.programInfo.attribLocations.a_texCoord,r,i,s,o,a),this.vaoGl.bindVertexArray(null),e.bindBuffer(e.ARRAY_BUFFER,null)}_setStereoTextureBuffer(e){let n=this.gl;n.enableVertexAttribArray(this.programInfo.attribLocations.a_texCoord),n.bindBuffer(n.ARRAY_BUFFER,this.texcoordBuffer),n.bufferData(n.ARRAY_BUFFER,this.stereoTexturePoints[e],n.STATIC_DRAW);var r=2,i=n.FLOAT,s=!1,o=0,a=0;n.vertexAttribPointer(this.programInfo.attribLocations.a_texCoord,r,i,s,o,a),n.bindBuffer(n.ARRAY_BUFFER,null)}_createTextureUVs(){this.texturePoints=new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]);const e={x:0,y:0,width:1,height:1};this._shouldUseStereoTexturePoints()&&(this.stereoTexturePoints=[],Ut(e,this.layer.colorTexturesMeta[0],this.layer.layout,0,2),this.stereoTexturePoints[0]=this._offsetTextureUVsByRect(this.layer.colorTexturesMeta[0],this.texturePoints,e),Ut(e,this.layer.colorTexturesMeta[0],this.layer.layout,1,2),this.stereoTexturePoints[1]=this._offsetTextureUVsByRect(this.layer.colorTexturesMeta[0],this.texturePoints,e))}_offsetTextureUVsByRect(e,n,r){r=r??{x:0,y:0,width:e.width,height:e.height};const i=r.x/e.width,s=r.y/e.height,o=r.width/e.width,a=r.height/e.height,l=[];for(let c=0;c<n.length;c+=2){let f=n[c],d=n[c+1],p=f*o+i,m=d*a+s;l[c]=p,l[c+1]=m}return new Float32Array(l)}_shouldUseStereoTexturePoints(){return this.layer.layout===L["stereo-left-right"]||this.layer.layout===L["stereo-top-bottom"]}}const h3=Ji`#version 300 es
|
|
1048
|
-
|
|
1049
|
-
in vec2 a_position;
|
|
1050
|
-
in vec2 a_texCoord;
|
|
1051
|
-
|
|
1052
|
-
out vec2 v_texCoord;
|
|
1053
|
-
|
|
1054
|
-
void main() {
|
|
1055
|
-
// convert the rectangle from pixels to 0.0 to 1.0
|
|
1056
|
-
vec2 zeroToOne = a_position;
|
|
1057
|
-
|
|
1058
|
-
// convert from 0->1 to 0->2
|
|
1059
|
-
vec2 zeroToTwo = zeroToOne * 2.0;
|
|
1060
|
-
|
|
1061
|
-
// convert from 0->2 to -1->+1 (clipspace)
|
|
1062
|
-
vec2 clipSpace = zeroToTwo - 1.0;
|
|
1063
|
-
|
|
1064
|
-
gl_Position = vec4(clipSpace * vec2(1, 1), 0, 1);
|
|
1065
|
-
|
|
1066
|
-
// pass the texCoord to the fragment shader
|
|
1067
|
-
// The GPU will interpolate this value between points.
|
|
1068
|
-
v_texCoord = a_texCoord;
|
|
1069
|
-
}
|
|
1070
|
-
`,p3=Ji`#version 300 es
|
|
1071
|
-
precision mediump float;
|
|
1072
|
-
precision mediump int;
|
|
1073
|
-
precision mediump sampler2DArray;
|
|
1074
|
-
|
|
1075
|
-
uniform sampler2DArray u_image;
|
|
1076
|
-
uniform int u_layer;
|
|
1077
|
-
|
|
1078
|
-
in vec2 v_texCoord;
|
|
1079
|
-
|
|
1080
|
-
out vec4 fragColor;
|
|
1081
|
-
|
|
1082
|
-
void main() {
|
|
1083
|
-
vec4 tex = texture(u_image, vec3(v_texCoord.x, v_texCoord.y, u_layer));
|
|
1084
|
-
fragColor = vec4(tex.rgb, tex.a);
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
`;class m3 extends N0{constructor(e,n){super(e,n),this.program=Hr(this.gl,h3,p3),this._createVAOs(),this.u_layerInfo=this.gl.getUniformLocation(this.program,"u_layer")}render(e){let n=this.gl;if(this.layer.getTextureType()===te.texture)throw new Error("Using texture array projection renderer on a layer without texture array.");let i=e.getBaseLayer();const s=n.getParameter(n.TEXTURE_BINDING_2D_ARRAY);n.bindTexture(n.TEXTURE_2D_ARRAY,this.layer.colorTextures[0]),n.texParameteri(n.TEXTURE_2D_ARRAY,n.TEXTURE_MAG_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D_ARRAY,n.TEXTURE_MIN_FILTER,n.LINEAR);for(let o of e.internalViews){let a=e.getViewIndex(o),l=i.getViewport(o);n.viewport(l.x,l.y,l.width,l.height),this._renderInternal(a)}n.bindTexture(n.TEXTURE_2D_ARRAY,s)}_renderInternal(e=0){let n=this.gl;const r=n.getParameter(n.CURRENT_PROGRAM);n.useProgram(this.program),n.bindVertexArray(this.vao),n.uniform1i(this.u_layerInfo,e);var i=n.TRIANGLES,s=0,o=6;n.drawArrays(i,s,o),n.bindVertexArray(null),n.useProgram(r)}}const x3=(t,e)=>t.getTextureType()===te["texture-array"]&&e instanceof WebGL2RenderingContext?new m3(t,e):new N0(t,e);var Ni=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});function So(){var t=new Ni(16);return Ni!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function _o(t,e,n){var r=e[0],i=e[1],s=e[2],o=e[3],a=e[4],l=e[5],c=e[6],f=e[7],d=e[8],p=e[9],m=e[10],g=e[11],w=e[12],y=e[13],b=e[14],_=e[15],E=n[0],T=n[1],v=n[2],S=n[3];return t[0]=E*r+T*a+v*d+S*w,t[1]=E*i+T*l+v*p+S*y,t[2]=E*s+T*c+v*m+S*b,t[3]=E*o+T*f+v*g+S*_,E=n[4],T=n[5],v=n[6],S=n[7],t[4]=E*r+T*a+v*d+S*w,t[5]=E*i+T*l+v*p+S*y,t[6]=E*s+T*c+v*m+S*b,t[7]=E*o+T*f+v*g+S*_,E=n[8],T=n[9],v=n[10],S=n[11],t[8]=E*r+T*a+v*d+S*w,t[9]=E*i+T*l+v*p+S*y,t[10]=E*s+T*c+v*m+S*b,t[11]=E*o+T*f+v*g+S*_,E=n[12],T=n[13],v=n[14],S=n[15],t[12]=E*r+T*a+v*d+S*w,t[13]=E*i+T*l+v*p+S*y,t[14]=E*s+T*c+v*m+S*b,t[15]=E*o+T*f+v*g+S*_,t}function xc(t,e){var n=e[0],r=e[1],i=e[2],s=e[3],o=n+n,a=r+r,l=i+i,c=n*o,f=r*o,d=r*a,p=i*o,m=i*a,g=i*l,w=s*o,y=s*a,b=s*l;return t[0]=1-d-g,t[1]=f+b,t[2]=p-y,t[3]=0,t[4]=f-b,t[5]=1-c-g,t[6]=m+w,t[7]=0,t[8]=p+y,t[9]=m-w,t[10]=1-c-d,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Ao(){var t=new Ni(2);return Ni!=Float32Array&&(t[0]=0,t[1]=0),t}(function(){var t=Ao();return function(e,n,r,i,s,o){var a,l;for(n||(n=2),r||(r=0),i?l=Math.min(i*n+r,e.length):l=e.length,a=r;a<l;a+=n)t[0]=e[a],t[1]=e[a+1],s(t,t,o),e[a]=t[0],e[a+1]=t[1];return e}})();const es=t=>t,g3=es`
|
|
1088
|
-
attribute vec4 a_position;
|
|
1089
|
-
attribute vec2 a_texCoord;
|
|
1090
|
-
|
|
1091
|
-
uniform mat4 u_matrix;
|
|
1092
|
-
uniform mat4 u_projectionMatrix;
|
|
1093
|
-
|
|
1094
|
-
varying vec2 v_texCoord;
|
|
1095
|
-
|
|
1096
|
-
void main() {
|
|
1097
|
-
// Multiply the position by the matrix.
|
|
1098
|
-
gl_Position = u_projectionMatrix * u_matrix * a_position;
|
|
1099
|
-
|
|
1100
|
-
// pass the texCoord to the fragment shader
|
|
1101
|
-
// The GPU will interpolate this value between points.
|
|
1102
|
-
v_texCoord = a_texCoord;
|
|
1103
|
-
}
|
|
1104
|
-
`,y3=es`
|
|
1105
|
-
precision mediump float;
|
|
1106
|
-
|
|
1107
|
-
// our texture
|
|
1108
|
-
uniform sampler2D u_image;
|
|
1109
|
-
|
|
1110
|
-
// the texCoords passed in from the vertex shader.
|
|
1111
|
-
varying vec2 v_texCoord;
|
|
1112
|
-
|
|
1113
|
-
void main() {
|
|
1114
|
-
vec4 tex = texture2D(u_image, v_texCoord);
|
|
1115
|
-
gl_FragColor = vec4(tex.rgb, tex.a);
|
|
1116
|
-
// gl_FragColor = vec4(1.0, 0, 0, 1.0);
|
|
1117
|
-
}
|
|
1118
|
-
`,v3=es`#version 300 es
|
|
1119
|
-
|
|
1120
|
-
in vec4 a_position;
|
|
1121
|
-
in vec2 a_texCoord;
|
|
1122
|
-
|
|
1123
|
-
uniform mat4 u_matrix;
|
|
1124
|
-
uniform mat4 u_projectionMatrix;
|
|
1125
|
-
|
|
1126
|
-
out vec2 v_texCoord;
|
|
1127
|
-
|
|
1128
|
-
void main() {
|
|
1129
|
-
// Multiply the position by the matrix.
|
|
1130
|
-
gl_Position = u_projectionMatrix * u_matrix * a_position;
|
|
1131
|
-
|
|
1132
|
-
// pass the texCoord to the fragment shader
|
|
1133
|
-
// The GPU will interpolate this value between points.
|
|
1134
|
-
v_texCoord = a_texCoord;
|
|
1135
|
-
}
|
|
1136
|
-
`,w3=es`#version 300 es
|
|
1137
|
-
precision mediump float;
|
|
1138
|
-
precision mediump int;
|
|
1139
|
-
precision mediump sampler2DArray;
|
|
1140
|
-
|
|
1141
|
-
uniform sampler2DArray u_image;
|
|
1142
|
-
uniform int u_layer;
|
|
1143
|
-
|
|
1144
|
-
in vec2 v_texCoord;
|
|
1145
|
-
|
|
1146
|
-
out vec4 fragColor;
|
|
1147
|
-
|
|
1148
|
-
void main() {
|
|
1149
|
-
vec4 tex = texture(u_image, vec3(v_texCoord.x, v_texCoord.y, u_layer));
|
|
1150
|
-
fragColor = vec4(tex.rgb, tex.a);
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
`;class fa{constructor(e,n){this.usesTextureArrayShaders=!1,this.savedVaoState={vao:null,arrayBuffer:null},this.hasMipmap=!1,this.gl=n,this.layer=e;let r=this.gl;this.transformMatrix=So(),n instanceof WebGL2RenderingContext&&this.layer.getTextureType()===te["texture-array"]&&(this.usesTextureArrayShaders=!0),this.usesTextureArrayShaders?this.program=Hr(r,v3,w3):this.program=Hr(r,g3,y3),this.programInfo={attribLocations:{a_position:r.getAttribLocation(this.program,"a_position"),a_texCoord:r.getAttribLocation(this.program,"a_texCoord")},uniformLocations:{u_matrix:r.getUniformLocation(this.program,"u_matrix"),u_projectionMatrix:r.getUniformLocation(this.program,"u_projectionMatrix")}},this.usesTextureArrayShaders&&(this.programInfo.uniformLocations.u_layer=r.getUniformLocation(this.program,"u_layer"))}saveVaoState(){this.savedVaoState.vao=this.gl.getParameter(this.vaoGl.VERTEX_ARRAY_BINDING),this.savedVaoState.arrayBuffer=this.gl.getParameter(this.gl.ARRAY_BUFFER_BINDING)}restoreVaoState(){this.vaoGl.bindVertexArray(this.savedVaoState.vao),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.savedVaoState.arrayBuffer),this.savedVaoState.vao=this.savedVaoState.arrayBuffer=null}initialize(){let e=this.gl;if(this.layer.isMediaLayer()){this.mediaTexture=e.createTexture(),this.mediaTexturePolyfill={texture:this.mediaTexture,textureFormat:e.RGBA,width:this.layer.media.videoWidth,height:this.layer.media.videoHeight,type:te.texture};const n=e.getParameter(e.TEXTURE_BINDING_2D);e.bindTexture(e.TEXTURE_2D,this.mediaTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.layer.media.videoWidth,this.layer.media.videoHeight,0,e.RGBA,e.UNSIGNED_BYTE,null),e.bindTexture(e.TEXTURE_2D,n)}this._createVAOs()}render(e,n){this.saveVaoState();let r=this.gl,i=e.getBaseLayer(),s=n.getViewerPose(e.getReferenceSpace());const o=r.getParameter(r.ACTIVE_TEXTURE);for(let a of s.views){let l=i.getViewport(a);if(r.viewport(l.x,l.y,l.width,l.height),r.activeTexture(r.TEXTURE0),this.usesTextureArrayShaders){if(r instanceof WebGLRenderingContext)throw new Error("This should never happen; texture-arrays only supported on WebGL2.");if(this.layer.isMediaLayer())throw new Error("This should never happen. Media layers should never be created with texture-array");const c=r.getParameter(r.TEXTURE_BINDING_2D_ARRAY);r.bindTexture(r.TEXTURE_2D_ARRAY,this.layer.colorTextures[0]),this.layer.isStatic?(this.layer.needsRedraw===!0&&r.generateMipmap(r.TEXTURE_2D_ARRAY),this.hasMipmap=!0):this.hasMipmap=this.layer.mipLevels>0,r.texParameteri(r.TEXTURE_2D_ARRAY,r.TEXTURE_MAG_FILTER,this.hasMipmap?r.LINEAR_MIPMAP_LINEAR:r.LINEAR),r.texParameteri(r.TEXTURE_2D_ARRAY,r.TEXTURE_MIN_FILTER,this.hasMipmap?r.LINEAR_MIPMAP_LINEAR:r.LINEAR);let f=0;if(this.layer.layout===L.stereo)switch(a.eye){case"right":f=1;break}this._shouldUseStereoTexturePoints()?this._renderInternalStereo(e,n,a,f):this._renderInternal(e,n,a,f),r.activeTexture(o),r.bindTexture(r.TEXTURE_2D_ARRAY,c)}else{const c=r.getParameter(r.TEXTURE_BINDING_2D);if(this.layer.isMediaLayer())r.bindTexture(r.TEXTURE_2D,this.mediaTexture),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texSubImage2D(r.TEXTURE_2D,0,0,0,this.layer.media.videoWidth,this.layer.media.videoHeight,r.RGBA,r.UNSIGNED_BYTE,this.layer.media);else if(this.layer.layout===L.stereo)switch(a.eye){case"right":r.bindTexture(r.TEXTURE_2D,this.layer.colorTextures[1]);break;default:r.bindTexture(r.TEXTURE_2D,this.layer.colorTextures[0])}else r.bindTexture(r.TEXTURE_2D,this.layer.colorTextures[0]);this.layer.isStatic?(this.layer.needsRedraw===!0&&r.generateMipmap(r.TEXTURE_2D),this.hasMipmap=!0):this.hasMipmap=this.layer.mipLevels>0,r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,this.hasMipmap?r.LINEAR_MIPMAP_LINEAR:r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,this.hasMipmap?r.LINEAR_MIPMAP_LINEAR:r.LINEAR),this._shouldUseStereoTexturePoints()?this._renderInternalStereo(e,n,a):this._renderInternal(e,n,a),r.activeTexture(o),r.bindTexture(r.TEXTURE_2D,c)}}this.restoreVaoState()}createPositionPoints(){return new Float32Array([])}createTextureUVs(){return new Float32Array([])}_offsetTextureUVsByRect(e,n,r){r=r??{x:0,y:0,width:e.width,height:e.height};const i=r.x/e.width,s=r.y/e.height,o=r.width/e.width,a=r.height/e.height,l=[];for(let c=0;c<n.length;c+=2){let f=n[c],d=n[c+1],p=f*o+i,m=d*a+s;l[c]=p,l[c+1]=m}return new Float32Array(l)}_shouldUseStereoTexturePoints(){return this.layer.layout===L["stereo-left-right"]||this.layer.layout===L["stereo-top-bottom"]}_setStereoTextureBuffer(e){let n=this.gl;n.enableVertexAttribArray(this.programInfo.attribLocations.a_texCoord),n.bindBuffer(n.ARRAY_BUFFER,this.texcoordBuffer),n.bufferData(n.ARRAY_BUFFER,this.stereoTexturePoints[e],n.STATIC_DRAW);var r=2,i=n.FLOAT,s=!1,o=0,a=0;n.vertexAttribPointer(this.programInfo.attribLocations.a_texCoord,r,i,s,o,a),n.bindBuffer(n.ARRAY_BUFFER,null)}_recalculateVertices(){this.positionPoints=this.createPositionPoints(),this.texturePoints=this.createTextureUVs();const e={x:0,y:0,width:1,height:1};if(this._shouldUseStereoTexturePoints()){if(this.stereoTexturePoints=[],this.layer.isMediaLayer()){Ut(e,this.mediaTexturePolyfill,this.layer.layout,0,2),this.stereoTexturePoints[0]=this._offsetTextureUVsByRect(this.mediaTexturePolyfill,this.texturePoints,e),Ut(e,this.mediaTexturePolyfill,this.layer.layout,1,2),this.stereoTexturePoints[1]=this._offsetTextureUVsByRect(this.mediaTexturePolyfill,this.texturePoints,e),this.layer.layout===L["stereo-top-bottom"]&&([this.stereoTexturePoints[0],this.stereoTexturePoints[1]]=[this.stereoTexturePoints[1],this.stereoTexturePoints[0]]);return}Ut(e,this.layer.colorTexturesMeta[0],this.layer.layout,0,2),this.stereoTexturePoints[0]=this._offsetTextureUVsByRect(this.layer.colorTexturesMeta[0],this.texturePoints,e),Ut(e,this.layer.colorTexturesMeta[0],this.layer.layout,1,2),this.stereoTexturePoints[1]=this._offsetTextureUVsByRect(this.layer.colorTexturesMeta[0],this.texturePoints,e),this.layer.layout===L["stereo-top-bottom"]&&([this.stereoTexturePoints[0],this.stereoTexturePoints[1]]=[this.stereoTexturePoints[1],this.stereoTexturePoints[0]])}}_createVAOs(){this._recalculateVertices();let e=this.gl;this.vaoGl=ua(e),this.saveVaoState();let n=e.createBuffer();this.vao=this.vaoGl.createVertexArray(),this.vaoGl.bindVertexArray(this.vao),e.enableVertexAttribArray(this.programInfo.attribLocations.a_position),e.bindBuffer(e.ARRAY_BUFFER,n);const r=this.positionPoints;e.bufferData(e.ARRAY_BUFFER,r,e.STATIC_DRAW);var i=3,s=e.FLOAT,o=!1,a=0,l=0;e.vertexAttribPointer(this.programInfo.attribLocations.a_position,i,s,o,a,l),e.enableVertexAttribArray(this.programInfo.attribLocations.a_texCoord),this.texcoordBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.texcoordBuffer),e.bufferData(e.ARRAY_BUFFER,this.texturePoints,e.STATIC_DRAW);var i=2,s=e.FLOAT,o=!1,a=0,l=0;e.vertexAttribPointer(this.programInfo.attribLocations.a_texCoord,i,s,o,a,l),this.restoreVaoState()}_renderInternal(e,n,r,i){let s=this.gl;const o=s.getParameter(s.CURRENT_PROGRAM);s.useProgram(this.program),this.vaoGl.bindVertexArray(this.vao),this.usesTextureArrayShaders&&s.uniform1i(this.programInfo.uniformLocations.u_layer,i),this._setTransformMatrix(e,n,r),s.uniformMatrix4fv(this.programInfo.uniformLocations.u_matrix,!1,this.transformMatrix),s.uniformMatrix4fv(this.programInfo.uniformLocations.u_projectionMatrix,!1,r.projectionMatrix);var a=s.TRIANGLES,l=0,c=this.positionPoints.length/3;s.drawArrays(a,l,c),this.vaoGl.bindVertexArray(null),s.useProgram(o)}_renderInternalStereo(e,n,r,i){if(r.eye==="none")return this._renderInternal(e,n,r);let s=this.gl;this.vaoGl.bindVertexArray(this.vao);const o=s.getParameter(s.CURRENT_PROGRAM);s.useProgram(this.program),this._setStereoTextureBuffer(r.eye==="right"?1:0),this.usesTextureArrayShaders&&s.uniform1i(this.programInfo.uniformLocations.u_layer,i),this._setTransformMatrix(e,n,r),s.uniformMatrix4fv(this.programInfo.uniformLocations.u_matrix,!1,this.transformMatrix),s.uniformMatrix4fv(this.programInfo.uniformLocations.u_projectionMatrix,!1,r.projectionMatrix);var a=s.TRIANGLES,l=0,c=this.positionPoints.length/3;s.drawArrays(a,l,c),this.vaoGl.bindVertexArray(null),s.useProgram(o)}_setTransformMatrix(e,n,r){let i=n.getPose(this.layer.space,e.getReferenceSpace());_o(this.transformMatrix,i.transform.matrix,this.layer.transform.matrix),_o(this.transformMatrix,r.transform.inverse.matrix,this.transformMatrix)}}class b3 extends fa{constructor(e,n){super(e,n),this.initialize()}createPositionPoints(){const e=this.layer.width,n=this.layer.height,r=0,i=[-e,-n,r,e,-n,r,-e,n,r,-e,n,r,e,-n,r,e,n,r];return new Float32Array(i)}createTextureUVs(){return new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1])}}class E3 extends fa{constructor(e,n){super(e,n),this.segments=16,this.initialize()}createPositionPoints(){const e=[],n=this.layer.centralAngle,r=this.layer.height,i=this.layer.radius,s=n/this.segments,o=Math.PI/2-n/2,a=[],l=Ao();l[0]=i*Math.cos(o),l[1]=-i*Math.sin(o),a.push(l);for(let c=0;c<this.segments;c++){const f=Ao();f[0]=i*Math.cos(o+s*(c+1)),f[1]=-i*Math.sin(o+s*(c+1)),a.push(f)}a.reverse();for(let c=0;c<this.segments;c++){const f=a[c],d=a[c+1];e.push(f[0],-r/2,f[1]),e.push(d[0],-r/2,d[1]),e.push(f[0],r/2,f[1]),e.push(f[0],r/2,f[1]),e.push(d[0],-r/2,d[1]),e.push(d[0],r/2,d[1])}return new Float32Array(e)}createTextureUVs(){let e=[];const n=1/this.segments;for(let r=0;r<this.segments;r++){let i=n*r,s=n*(r+1);e.push(i,0),e.push(s,0),e.push(i,1),e.push(i,1),e.push(s,0),e.push(s,1)}return new Float32Array(e)}}class T3 extends fa{constructor(e,n){super(e,n),this.segmentsPerAxis=40,this.initialize()}createPositionPoints(){const e=[];let n=this.layer.radius;n===0&&(n=25),n>25&&(n=25);const r=this.layer.centralHorizontalAngle,i=this.layer.upperVerticalAngle+Math.PI/2,s=this.layer.lowerVerticalAngle+Math.PI/2,o=i,a=s,l=Math.PI/2-r/2,c=l+r,f=a-o,d=c-l,p=[];for(let g=0;g<=this.segmentsPerAxis;g++)for(let w=0;w<=this.segmentsPerAxis;w++){const y=w/this.segmentsPerAxis,b=g/this.segmentsPerAxis;let _=n,E=c-d*y,T=f*b+o;const v=Math.cos(E)*Math.sin(T),S=Math.cos(T),M=-Math.sin(E)*Math.sin(T);p.push([_*v,_*S,_*M])}const m=this.segmentsPerAxis+1;for(let g=0;g<this.segmentsPerAxis;g++)for(let w=0;w<this.segmentsPerAxis;w++)e.push(...p[w*m+g]),e.push(...p[w*m+g+1]),e.push(...p[(w+1)*m+g]),e.push(...p[(w+1)*m+g]),e.push(...p[w*m+g+1]),e.push(...p[(w+1)*m+g+1]);return new Float32Array(e)}createTextureUVs(){const e=[],n=[];for(let i=0;i<=this.segmentsPerAxis;i++)for(let s=0;s<=this.segmentsPerAxis;s++){const o=s/this.segmentsPerAxis,a=i/this.segmentsPerAxis;n.push([o,a])}const r=this.segmentsPerAxis+1;for(let i=0;i<this.segmentsPerAxis;i++)for(let s=0;s<this.segmentsPerAxis;s++)e.push(...n[s*r+i]),e.push(...n[s*r+i+1]),e.push(...n[(s+1)*r+i]),e.push(...n[(s+1)*r+i]),e.push(...n[s*r+i+1]),e.push(...n[(s+1)*r+i+1]);return new Float32Array(e)}}const gc={colorFormat:6408,mipLevels:1,layout:L.mono,isStatic:!1,space:null,viewPixelHeight:0,viewPixelWidth:0};class F0 extends dr{constructor(e=gc){if(super(),!Gr(e.space))throw new TypeError("XRCubeLayer's space needs to be an XRReferenceSpace");switch(this.init=Object.assign(Object.assign({},gc),e),this.space=this.init.space,this.isStatic=this.init.isStatic,this.init.orientation?this.orientation=DOMPointReadOnly.fromPoint(this.init.orientation):this.orientation=new DOMPointReadOnly,this.init.layout){case L.default:case L["stereo-left-right"]:case L["stereo-top-bottom"]:throw new TypeError("Invalid layout format for XRCubeLayer")}this.layout=this.init.layout,this.needsRedraw=!0}initialize(e,n){super.initialize(e,n),this._allocateColorTexturesInternal(),this._allocateDepthStencilTexturesInternal()}_allocateColorTexturesInternal(){if(this._colorTextures=[],this._texturesMeta=[],this.layout===L.mono){const e=this._createCubeColorTexture();this._texturesMeta.push(e),this._colorTextures.push(e.texture);return}else{const e=this._createCubeColorTexture(),n=this._createCubeColorTexture();this._texturesMeta.push(e,n),this._colorTextures.push(e.texture,n.texture);return}}_allocateDepthStencilTexturesInternal(){if(this._depthStencilTextures=[],!!this.init.depthFormat){if(this.context instanceof WebGLRenderingContext&&!this.context.getExtension("WEBGL_depth_texture"))throw new TypeError("Depth textures not supported in the current context");if(this.layout===L.mono){const e=this._createCubeDepthTexture();this._depthStencilTextures.push(e.texture);return}else{const e=this._createCubeDepthTexture(),n=this._createCubeDepthTexture();this._depthStencilTextures.push(e.texture,n.texture);return}}}_createCubeColorTexture(){let e=this.context.createTexture(),n={width:this.init.viewPixelWidth,height:this.init.viewPixelHeight,layers:1,type:te.texture,textureFormat:this.init.colorFormat,texture:e};const r=this.context.getParameter(this.context.TEXTURE_BINDING_CUBE_MAP);this.context.bindTexture(this.context.TEXTURE_CUBE_MAP,e);for(let i=0;i<6;i++)this.context.texImage2D(this.context.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,n.textureFormat,n.width,n.height,0,n.textureFormat,this.context.UNSIGNED_BYTE,null);return this.context.bindTexture(this.context.TEXTURE_CUBE_MAP,r),n}_createCubeDepthTexture(){let e=this.context.createTexture(),n={width:this.init.viewPixelWidth,height:this.init.viewPixelHeight,layers:1,type:te.texture,textureFormat:this.init.depthFormat,texture:e};const r=this.context.getParameter(this.context.TEXTURE_BINDING_CUBE_MAP);this.context.bindTexture(this.context.TEXTURE_CUBE_MAP,e);let i=this.init.depthFormat;this.context instanceof WebGL2RenderingContext&&(i===this.context.DEPTH_COMPONENT&&(i=this.context.DEPTH_COMPONENT24),i===this.context.DEPTH_STENCIL&&(i=this.context.DEPTH24_STENCIL8));for(let s=0;s<6;s++)this.context.texImage2D(this.context.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,i,n.width,n.height,0,n.textureFormat,this.context.UNSIGNED_INT,null);return this.context.bindTexture(this.context.TEXTURE_CUBE_MAP,r),n}getTextureType(){return te.texture}}const z0=t=>t,R3=z0`
|
|
1154
|
-
attribute vec4 a_position;
|
|
1155
|
-
uniform mat4 u_projectionMatrix;
|
|
1156
|
-
uniform mat4 u_matrix;
|
|
1157
|
-
varying vec3 v_normal;
|
|
1158
|
-
|
|
1159
|
-
void main() {
|
|
1160
|
-
gl_Position = u_projectionMatrix * u_matrix * a_position;
|
|
1161
|
-
|
|
1162
|
-
v_normal = normalize(a_position.xyz);
|
|
1163
|
-
}
|
|
1164
|
-
`,S3=z0`
|
|
1165
|
-
precision mediump float;
|
|
1166
|
-
|
|
1167
|
-
varying vec3 v_normal;
|
|
1168
|
-
|
|
1169
|
-
uniform samplerCube u_texture;
|
|
1170
|
-
|
|
1171
|
-
void main() {
|
|
1172
|
-
gl_FragColor = textureCube(u_texture, normalize(v_normal));
|
|
1173
|
-
}
|
|
1174
|
-
`;class _3{constructor(e,n){this.savedVaoState={vao:null,arrayBuffer:null},this.hasMipmap=!1,this.layer=e,this.gl=n,this.transformMatrix=So(),this.program=Hr(n,R3,S3),this.programInfo={attribLocations:{a_position:n.getAttribLocation(this.program,"a_position")},uniformLocations:{u_matrix:n.getUniformLocation(this.program,"u_matrix"),u_texture:n.getUniformLocation(this.program,"u_texture"),u_projectionMatrix:n.getUniformLocation(this.program,"u_projectionMatrix")}},this._createVAOs()}saveVaoState(){this.savedVaoState.vao=this.gl.getParameter(this.vaoGl.VERTEX_ARRAY_BINDING),this.savedVaoState.arrayBuffer=this.gl.getParameter(this.gl.ARRAY_BUFFER_BINDING)}restoreVaoState(){this.vaoGl.bindVertexArray(this.savedVaoState.vao),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.savedVaoState.arrayBuffer),this.savedVaoState.vao=this.savedVaoState.arrayBuffer=null}render(e,n){this.saveVaoState();let r=this.gl,i=e.getBaseLayer(),s=n.getViewerPose(e.getReferenceSpace());const o=r.getParameter(r.ACTIVE_TEXTURE);for(let a of s.views){let l=i.getViewport(a);r.viewport(l.x,l.y,l.width,l.height),r.activeTexture(r.TEXTURE0);const c=r.getParameter(r.TEXTURE_BINDING_CUBE_MAP);if(this.layer.layout===L.stereo){const f=a.eye==="right"?1:0;r.bindTexture(r.TEXTURE_CUBE_MAP,this.layer.colorTextures[f])}else r.bindTexture(r.TEXTURE_CUBE_MAP,this.layer.colorTextures[0]);this.layer.isStatic?(this.layer.needsRedraw===!0&&r.generateMipmap(r.TEXTURE_CUBE_MAP),this.hasMipmap=!0):this.hasMipmap=this.layer.mipLevels>0,r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MAG_FILTER,this.hasMipmap?r.LINEAR_MIPMAP_LINEAR:r.LINEAR),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MIN_FILTER,this.hasMipmap?r.LINEAR_MIPMAP_LINEAR:r.LINEAR),this._renderInternal(this.layer.orientation,a),r.activeTexture(o),r.bindTexture(r.TEXTURE_CUBE_MAP,c)}this.restoreVaoState()}createPositionPoints(){const n=[-.5,-.5,-.5,-.5,.5,-.5,.5,-.5,-.5,-.5,.5,-.5,.5,.5,-.5,.5,-.5,-.5,-.5,-.5,.5,.5,-.5,.5,-.5,.5,.5,-.5,.5,.5,.5,-.5,.5,.5,.5,.5,-.5,.5,-.5,-.5,.5,.5,.5,.5,-.5,-.5,.5,.5,.5,.5,.5,.5,.5,-.5,-.5,-.5,-.5,.5,-.5,-.5,-.5,-.5,.5,-.5,-.5,.5,.5,-.5,-.5,.5,-.5,.5,-.5,-.5,-.5,-.5,-.5,.5,-.5,.5,-.5,-.5,-.5,.5,-.5,.5,.5,-.5,.5,-.5,.5,-.5,-.5,.5,.5,-.5,.5,-.5,.5,.5,-.5,.5,.5,.5,-.5,.5,.5,.5];return new Float32Array(n)}_renderInternal(e,n){let r=this.gl;const i=r.getParameter(r.CURRENT_PROGRAM);r.useProgram(this.program),this.vaoGl.bindVertexArray(this.vao),xc(this.transformMatrix,[e.x,e.y,e.z,e.w]),this._poseOrientationMatrix||(this._poseOrientationMatrix=So()),xc(this._poseOrientationMatrix,[n.transform.inverse.orientation.x,n.transform.inverse.orientation.y,n.transform.inverse.orientation.z,n.transform.inverse.orientation.w]),_o(this.transformMatrix,this.transformMatrix,this._poseOrientationMatrix),r.uniformMatrix4fv(this.programInfo.uniformLocations.u_matrix,!1,this.transformMatrix),r.uniformMatrix4fv(this.programInfo.uniformLocations.u_projectionMatrix,!1,n.projectionMatrix),r.uniform1i(this.programInfo.uniformLocations.u_texture,0);var s=r.TRIANGLES,o=0,a=this.positionPoints.length/3;r.drawArrays(s,o,a),this.vaoGl.bindVertexArray(null),r.useProgram(i)}_recalculateVertices(){this.positionPoints=this.createPositionPoints()}_createVAOs(){this._recalculateVertices();let e=this.gl;this.vaoGl=ua(e),this.saveVaoState();let n=e.createBuffer();this.vao=this.vaoGl.createVertexArray(),this.vaoGl.bindVertexArray(this.vao),e.enableVertexAttribArray(this.programInfo.attribLocations.a_position),e.bindBuffer(e.ARRAY_BUFFER,n);const r=this.positionPoints;e.bufferData(e.ARRAY_BUFFER,r,e.STATIC_DRAW);var i=3,s=e.FLOAT,o=!1,a=0,l=0;e.vertexAttribPointer(this.programInfo.attribLocations.a_position,i,s,o,a,l),this.restoreVaoState()}}class di{constructor(){this.mode="inline",this.layers=[],this.views=[],this.initializedViews=!1,this.isPolyfillActive=!1,this.taskQueue=[]}requestAnimationFrame(e){this.injectedFrameCallback||(this.injectedFrameCallback=(n,r)=>{let i=this.context;if(!this.initializedViews&&this.referenceSpace){let s=r.getViewerPose(this.referenceSpace);s&&(this.views=s.views,this.initializedViews=!0)}if(this.isPolyfillActive&&this.initializedViews){this.tempFramebuffer||(this.tempFramebuffer=i.createFramebuffer()),i.bindFramebuffer(i.FRAMEBUFFER,this.tempFramebuffer);const s=i.getParameter(i.COLOR_CLEAR_VALUE),o=i.getParameter(i.FRAMEBUFFER_BINDING);i.clearColor(0,0,0,0);for(let a of this.layers)if(a instanceof ji)for(let l=0;l<a.colorTextures.length;l++)a.colorTexturesMeta[l].type===te["texture-array"]||(i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,a.colorTextures[l],0),a.depthStencilTextures&&l<a.depthStencilTextures.length?i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,a.depthStencilTextures[l],0):i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,null,0),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT));i.bindFramebuffer(i.FRAMEBUFFER,o),i.clearColor(s[0],s[1],s[2],s[3])}if(e(n,r),this.isPolyfillActive&&this.initializedViews){let s=i.isEnabled(i.BLEND),o=i.isEnabled(i.DEPTH_TEST),a=i.isEnabled(i.CULL_FACE);const l=i.getParameter(i.FRAMEBUFFER_BINDING),c=i.getParameter(i.COLOR_CLEAR_VALUE);i.bindFramebuffer(i.FRAMEBUFFER,this.getBaseLayer().framebuffer),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),i.clearColor(c[0],c[1],c[2],c[3]),i.enable(i.BLEND),i.disable(i.DEPTH_TEST),i.disable(i.CULL_FACE);let f=i.getParameter(i.BLEND_SRC_RGB),d=i.getParameter(i.BLEND_SRC_ALPHA),p=i.getParameter(i.BLEND_DST_RGB),m=i.getParameter(i.BLEND_DST_ALPHA);i.blendFunc(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA);for(let g of this.layers)if(this.renderers||(this.renderers=new WeakMap),g instanceof ji)this.renderers.has(g)||this.renderers.set(g,x3(g,this.context)),this.renderers.get(g).render(this);else if(g instanceof ca)this.renderers.has(g)||this.renderers.set(g,new b3(g,this.context)),this.renderers.get(g).render(this,r);else if(g instanceof aa)this.renderers.has(g)||this.renderers.set(g,new E3(g,this.context)),this.renderers.get(g).render(this,r);else if(g instanceof la)this.renderers.has(g)||this.renderers.set(g,new T3(g,this.context)),this.renderers.get(g).render(this,r);else if(g instanceof F0)this.renderers.has(g)||this.renderers.set(g,new _3(g,this.context)),this.renderers.get(g).render(this,r);else{const w=g;if(w.framebuffer===null)continue;i instanceof WebGL2RenderingContext?(i.bindFramebuffer(i.READ_FRAMEBUFFER,w.framebuffer),i.bindFramebuffer(i.DRAW_FRAMEBUFFER,this.getBaseLayer().framebuffer),i.blitFramebuffer(0,0,w.framebufferWidth,w.framebufferHeight,0,0,this.getBaseLayer().framebufferWidth,this.getBaseLayer().framebufferHeight,i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT,i.LINEAR)):console.warn("GL blitFramebuffer is not supported on WebGL1, so XRWebGLLayers may not show up properly when polyfilled.")}for(s||i.disable(i.BLEND),o&&i.enable(i.DEPTH_TEST),a&&i.enable(i.CULL_FACE),i.blendFuncSeparate(f,p,d,m),i.bindFramebuffer(i.FRAMEBUFFER,l);this.taskQueue.length>0;)this.taskQueue.shift()()}}),this._requestAnimationFrame(this.injectedFrameCallback)}updateRenderState(e){if(this.existingBaseLayer=e.baseLayer,e.layers&&(this.layers=e.layers),this.activeRenderState||this.createActiveRenderState(),this.activeRenderState=Object.assign(Object.assign({},this.activeRenderState),e),!e.layers){this._updateRenderState(e);return}let n=Object.assign({},e);delete n.layers;let r;for(let i of this.layers)if(i instanceof dr){r=i.getContext();break}if(!r&&!this.context){let s=function(){r.canvas.width=r.canvas.clientWidth*window.devicePixelRatio,r.canvas.height=r.canvas.clientHeight*window.devicePixelRatio};console.log("No existing context! Have the session make one");const i=document.createElement("canvas");if(r=i.getContext("webgl2",{xrCompatible:!0}),r||(r=i.getContext("webgl",{xrCompatible:!0})),!r)throw new Error("No webGL support detected.");document.body.appendChild(r.canvas),window.addEventListener("resize",s),s()}this.createInternalLayer(r),this.isPolyfillActive=!0,this._updateRenderState(Object.assign(Object.assign({},n),{baseLayer:this.internalLayer}))}initializeSession(e){this.mode=e,this.requestReferenceSpace("local").then(n=>{this.referenceSpace=n}).catch(n=>{}),this.requestReferenceSpace("viewer").then(n=>{this.viewerSpace=n})}getBaseLayer(e){return!this.internalLayer&&!this.existingBaseLayer&&e&&this.createInternalLayer(e),this.internalLayer||this.existingBaseLayer}getReferenceSpace(){return this.referenceSpace?this.referenceSpace:this.viewerSpace}getViewerSpace(){return this.viewerSpace}queueTask(e){this.taskQueue.push(e)}get renderState(){return this.activeRenderState||this.createActiveRenderState(),this.activeRenderState}get internalViews(){return this.views}getViewIndex(e){for(let n=0;n<this.views.length;n++){let r=this.views[n];if(e.eye===r.eye&&e.recommendedViewportScale===r.recommendedViewportScale)return n}return-1}createInternalLayer(e){if(!e&&this.internalLayer)return this.internalLayer;if(e===this.context&&this.internalLayer)return this.internalLayer;const n=or();return this.internalLayer=new n.XRWebGLLayer(this,e),this.setContext(e),this.internalLayer}setContext(e){this.context=e,this.tempFramebuffer=e.createFramebuffer(),this.renderers=new WeakMap}createActiveRenderState(){const e=or();let n=Object.getOwnPropertyNames(e.XRRenderState.prototype);const r={};for(let i of n)r[i]=this._renderState[i];r.layers=[],this.activeRenderState=r}}class yc{constructor(){this.viewport={x:0,y:0,width:0,height:0}}}class A3{constructor(e,n){this.session=e,this.context=n,this.subImageCache=new M3}createProjectionLayer(e=Ro){const n=new ji(e);if(this.session.ended)throw new Error("Session has ended");if(this.context.isContextLost())throw new Error("context is lost");return n.initialize(this.session,this.context),n}createQuadLayer(e=j0){if(this.session.ended)throw new Error("Session has ended");if(this.context.isContextLost())throw new Error("context is lost");if(e.layout===L.default)throw new TypeError("Trying to create a quad layer with default layout");const n=new ca(e);return n.initialize(this.session,this.context),n}createCylinderLayer(e=C0){if(this.session.ended)throw new Error("Session has ended");if(this.context.isContextLost())throw new Error("context is lost");if(e.layout===L.default)throw new TypeError("Cylinder Layer cannot have a default layout");const n=new aa(e);return n.initialize(this.session,this.context),n}createEquirectLayer(e=L0){if(this.session.ended)throw new Error("Session has ended");if(this.context.isContextLost())throw new Error("context is lost");if(e.layout===L.default)throw new TypeError("Equirect Layer cannot have a default layout");if(!Gr(e.space))throw new TypeError("Equirect layer requires an XRReferenceSpace");let n=new la(e);return n.initialize(this.session,this.context),n}createCubeLayer(e){if(this.session.ended)throw new Error("Session has ended");if(this.context.isContextLost())throw new Error("context is lost");if(!(this.context instanceof WebGL2RenderingContext))throw new Error("XRCubeLayer only work on WebGL2");if(!Gr(e.space))throw new TypeError("XRCubeLayer requires a space of type XRReferenceSpace");let n=new F0(e);return n.initialize(this.session,this.context),n}getSubImage(e,n,r="none"){if(e.isStatic&&e.needsRedraw===!1)throw new Error("Invalid state for subimage creation");let i=this.subImageCache.tryGetCachedSubImage(this.context,e,r);if(i)return i;let s=new yc;if(e instanceof ji)throw new TypeError;if(e.layout===L.default)throw new TypeError;if(!this.validateStateofSubImageCreation(e,n))throw new Error("Invalid state for subimage creation");let o=0;if(e.layout===L.stereo){if(r==="none")throw new TypeError;r==="right"&&(o=1)}e.getTextureType()===te["texture-array"]?s.imageIndex=o:s.imageIndex=0;let a=0;e.getTextureType()===te.texture?(s.colorTexture=e.colorTextures[o],a=o):(s.colorTexture=e.colorTextures[0],a=0),!e.depthStencilTextures||!e.depthStencilTextures.length?s.depthStencilTexture=null:e.getTextureType()===te.texture?s.depthStencilTexture=e.depthStencilTextures[o]:s.depthStencilTexture=e.depthStencilTextures[0];const l=e.colorTexturesMeta[a];s.textureWidth=l.width,s.textureHeight=l.height;let c=1;return(e.layout===L["stereo-left-right"]||e.layout===L["stereo-top-bottom"])&&(c=2),Ut(s.viewport,l,e.layout,o,c),this.session.queueTask(()=>{e.needsRedraw=!1}),this.subImageCache.cacheSubImage(s,this.context,e,r),s}getViewSubImage(e,n){let r=this.subImageCache.tryGetCachedViewSubImage(this.context,e,n);if(r)return r;let i=new yc,s=this.session;if(!s.internalViews||!s.internalViews.length)return console.warn("Tried to get view sub image before we have any views"),i;let o=s.getViewIndex(n),a=0;return e.getTextureType()===te["texture-array"]?i.imageIndex=o:i.imageIndex=0,e.layout===L.default&&e.getTextureType()===te.texture?(i.colorTexture=e.colorTextures[o],a=o):(i.colorTexture=e.colorTextures[0],a=0),e.depthStencilTextures.length===0?i.depthStencilTexture=null:e.layout===L.default&&e.getTextureType()===te.texture?i.depthStencilTexture=e.depthStencilTextures[o]:i.depthStencilTexture=e.depthStencilTextures[0],i.textureWidth=e.colorTexturesMeta[a].width,i.textureHeight=e.colorTexturesMeta[a].height,Ut(i.viewport,e.colorTexturesMeta[a],e.layout,o,s.internalViews.length),e.needsRedraw=!1,this.subImageCache.cacheViewSubImage(i,this.context,e,n),i}validateStateofSubImageCreation(e,n){return!(n.session!==e.session||this.session!==e.session||this.context!==e.context||!e.colorTextures||!e.colorTextures.length||e.isStatic&&e.needsRedraw===!1)}}class M3{constructor(){this.cache=new Map,this.viewCache=new Map}cacheSubImage(e,n,r,i){let s=new Map;s.set(i,e);let o=new Map;o.set(r,s),this.cache.set(n,o)}tryGetCachedSubImage(e,n,r){var i,s;return(s=(i=this.cache.get(e))===null||i===void 0?void 0:i.get(n))===null||s===void 0?void 0:s.get(r)}cacheViewSubImage(e,n,r,i){let s=new Map;s.set(i,e);let o=new Map;o.set(r,s),this.viewCache.set(n,o)}tryGetCachedViewSubImage(e,n,r){var i,s;return(s=(i=this.viewCache.get(e))===null||i===void 0?void 0:i.get(n))===null||s===void 0?void 0:s.get(r)}}const P3=t=>t.navigator.xr?!!(t.XRMediaBinding&&t.XRWebGLBinding):!1;class O3{constructor(){this.injected=!1;const e=or();this._injectPolyfill(e)}_injectPolyfill(e){if(!("xr"in e.navigator))throw new Error("WebXR Layers polyfill requires WebXR support.");this.injected===!0&&console.warn("Polyfill has already been injected..."),!P3(e)&&(this._polyfillRequiredLayersFeature(e),this._polyfillXRSession(e),e.XRWebGLBinding=A3,e.XRMediaBinding=c3,this.injected=!0,console.log("Injected Layers Polyfill"))}_polyfillXRSession(e){e.XRSession.prototype._updateRenderState=e.XRSession.prototype.updateRenderState,e.XRSession.prototype._requestAnimationFrame=e.XRSession.prototype.requestAnimationFrame;let n=Object.getOwnPropertyDescriptor(e.XRSession.prototype,"renderState");Object.defineProperty(e.XRSession.prototype,"_renderState",n);let r=Object.getOwnPropertyDescriptor(di.prototype,"renderState");Object.defineProperty(e.XRSession.prototype,"renderState",r);let i=Object.getOwnPropertyNames(di.prototype);for(let s of i){let o=Object.getOwnPropertyDescriptor(di.prototype,s);Object.defineProperty(e.XRSession.prototype,s,o)}}_polyfillRequiredLayersFeature(e){const n=e.navigator.xr.requestSession;Object.defineProperty(e.navigator.xr,"requestSessionInternal",{writable:!0}),e.navigator.xr.requestSessionInternal=n;const r=(i,s)=>{const o=(a,l)=>e.navigator.xr.requestSessionInternal(a,l).then(c=>{Object.assign(c,new di);let f=c;return f.initializeSession(i),Promise.resolve(f)});if(i!=="immersive-vr"||!s)return o(i,s);if(s.requiredFeatures&&s.requiredFeatures.indexOf("layers")>-1){const a=Object.assign({},s),l=[...s.requiredFeatures],c=l.indexOf("layers");return l.splice(c,1),a.requiredFeatures=l,o(i,a)}return o(i,s)};Object.defineProperty(e.navigator.xr,"requestSession",{writable:!0}),e.navigator.xr.requestSession=r}}const Rr={ipd:.063,fovy:Math.PI/2,headsetPosition:new un(0,1.6,0),headsetQuaternion:new Lr,stereoEnabled:!1},k3=1,I3=2,C3=3,L3=4;class j3{constructor(e,n={}){var r,i,s,o,a,l;this.version=dc;const c=new F2,f=new mn(_e.Viewer,c),d={[me.Left]:new we(f),[me.Right]:new we(f),[me.None]:new we(f)},p=e.controllerConfig,m={};p&&Object.values(We).forEach(y=>{p.layout[y]&&(m[y]=new B2(p,y,c))});const g={[We.Left]:new fc(ec,We.Left,c),[We.Right]:new fc(ec,We.Right,c)},w=(r=n.canvasContainer)!==null&&r!==void 0?r:document.createElement("div");w.dataset.webxr_runtime=`Immersive Web Emulation Runtime v${dc}`,w.style.position="fixed",w.style.width="100%",w.style.height="100%",w.style.top="0",w.style.left="0",w.style.display="flex",w.style.justifyContent="center",w.style.alignItems="center",w.style.overflow="hidden",w.style.zIndex="999",this[R]={name:e.name,supportedSessionModes:e.supportedSessionModes,supportedFeatures:e.supportedFeatures,supportedFrameRates:e.supportedFrameRates,isSystemKeyboardSupported:e.isSystemKeyboardSupported,internalNominalFrameRate:e.internalNominalFrameRate,environmentBlendModes:e.environmentBlendModes,interactionMode:e.interactionMode,userAgent:e.userAgent,position:(i=n.headsetPosition)!==null&&i!==void 0?i:Rr.headsetPosition.clone(),quaternion:(s=n.headsetQuaternion)!==null&&s!==void 0?s:Rr.headsetQuaternion.clone(),stereoEnabled:(o=n.stereoEnabled)!==null&&o!==void 0?o:Rr.stereoEnabled,ipd:(a=n.ipd)!==null&&a!==void 0?a:Rr.ipd,fovy:(l=n.fovy)!==null&&l!==void 0?l:Rr.fovy,controllers:m,hands:g,primaryInputMode:"controller",pendingReferenceSpaceReset:!1,visibilityState:"visible",pendingVisibilityState:null,xrSystem:null,matrix:Pe(),globalSpace:c,viewerSpace:f,viewSpaces:d,canvasContainer:w,getViewport:(y,b)=>{const _=y.context.canvas,{width:E,height:T}=_;switch(b.eye){case me.None:return new fi(0,0,E,T);case me.Left:return new fi(0,0,this[R].stereoEnabled?E/2:E,T);case me.Right:return new fi(E/2,0,this[R].stereoEnabled?E/2:0,T)}},updateViews:()=>{const y=this[R].viewerSpace;Xr(y[Ee].offsetMatrix,this[R].quaternion.quat,this[R].position.vec3),rr(this[R].viewSpaces[me.Left][Ee].offsetMatrix,at(-this[R].ipd/2,0,0)),rr(this[R].viewSpaces[me.Right][Ee].offsetMatrix,at(this[R].ipd/2,0,0))},onBaseLayerSet:y=>{if(!y)return;const b=y.context.canvas;if(b.parentElement!==this[R].canvasContainer){const _=this[R].devui;if(_){const{devUICanvas:T,devUIContainer:v}=_;T.style.zIndex=C3.toString(),v.style.zIndex=L3.toString(),this[R].canvasContainer.appendChild(_.devUICanvas),this[R].canvasContainer.appendChild(_.devUIContainer)}const E=this[R].sem;E&&(E.environmentCanvas.style.zIndex=k3.toString(),this[R].canvasContainer.appendChild(E.environmentCanvas)),this[R].canvasData={canvas:b,parent:b.parentElement,width:b.width,height:b.height,zIndex:b.style.zIndex},b.style.zIndex=I3.toString(),this[R].canvasContainer.appendChild(b),document.body.appendChild(this[R].canvasContainer)}b.width=window.innerWidth,b.height=window.innerHeight},onSessionEnd:()=>{if(this[R].canvasData){const{canvas:y,parent:b,width:_,height:E,zIndex:T}=this[R].canvasData;y.width=_,y.height=E,y.style.zIndex=T,b?b.appendChild(y):this[R].canvasContainer.removeChild(y);const v=this[R].devui;v&&(this[R].canvasContainer.removeChild(v.devUICanvas),this[R].canvasContainer.removeChild(v.devUIContainer));const S=this[R].sem;S&&this[R].canvasContainer.removeChild(S.environmentCanvas),document.body.removeChild(this[R].canvasContainer),this[R].canvasData=void 0,window.dispatchEvent(new Event("resize"))}},onFrameStart:y=>{var b;if(!((b=this[R].actionPlayer)===null||b===void 0)&&b.playing)this[R].actionPlayer.playFrame();else{const _=y.session;this[R].updateViews(),this[R].pendingVisibilityState&&(this[R].visibilityState=this[R].pendingVisibilityState,this[R].pendingVisibilityState=null,_.dispatchEvent(new Li("visibilitychange",{session:_}))),this[R].visibilityState==="visible"&&this.activeInputs.forEach(E=>{E.onFrameStart(y)}),this[R].pendingReferenceSpaceReset&&(_[x].referenceSpaces.forEach(E=>{switch(E[Dt].type){case _e.Local:case _e.LocalFloor:case _e.BoundedFloor:case _e.Unbounded:E.dispatchEvent(new hc("reset",{referenceSpace:E}));break}}),this[R].pendingReferenceSpaceReset=!1)}this[R].updateViews()}},this[R].updateViews()}installRuntime(e){var n;const r=(n=e?.globalObject)!==null&&n!==void 0?n:globalThis,i=e?.polyfillLayers;Object.defineProperty(WebGL2RenderingContext.prototype,"makeXRCompatible",{value:function(){return new Promise((s,o)=>{s(!0)})},configurable:!0}),this[R].xrSystem=new pc(this),Object.defineProperty(globalThis.navigator,"xr",{value:this[R].xrSystem,configurable:!0}),Object.defineProperty(navigator,"userAgent",{value:this[R].userAgent,writable:!1,configurable:!1,enumerable:!0}),r.XRSystem=pc,r.XRSession=ia,r.XRRenderState=Eo,r.XRFrame=k0,r.XRSpace=we,r.XRReferenceSpace=mn,r.XRJointSpace=oa,r.XRView=M0,r.XRViewport=fi,r.XRRigidTransform=xn,r.XRPose=Ki,r.XRViewerPose=O0,r.XRJointPose=P0,r.XRInputSource=Qi,r.XRInputSourceArray=D2,r.XRHand=sa,r.XRLayer=I0,r.XRWebGLLayer=i3,r.XRSessionEvent=Li,r.XRInputSourceEvent=Ti,r.XRInputSourcesChangeEvent=_0,r.XRReferenceSpaceEvent=hc,i?new O3:(r.XRMediaBinding=void 0,r.XRWebGLBinding=void 0)}installDevUI(e){this[R].devui=new e(this)}installSEM(e){this[R].sem=new e(this)}get supportedSessionModes(){return this[R].supportedSessionModes}get supportedFeatures(){return this[R].supportedFeatures}get supportedFrameRates(){return this[R].supportedFrameRates}get isSystemKeyboardSupported(){return this[R].isSystemKeyboardSupported}get internalNominalFrameRate(){return this[R].internalNominalFrameRate}get stereoEnabled(){return this[R].stereoEnabled}set stereoEnabled(e){this[R].stereoEnabled=e}get ipd(){return this[R].ipd}set ipd(e){this[R].ipd=e}get fovy(){return this[R].fovy}set fovy(e){this[R].fovy=e}get position(){return this[R].position}get quaternion(){return this[R].quaternion}get viewerSpace(){var e;return!((e=this[R].actionPlayer)===null||e===void 0)&&e.playing?this[R].actionPlayer.viewerSpace:this[R].viewerSpace}get viewSpaces(){var e;return!((e=this[R].actionPlayer)===null||e===void 0)&&e.playing?this[R].actionPlayer.viewSpaces:this[R].viewSpaces}get controllers(){return this[R].controllers}get hands(){return this[R].hands}get primaryInputMode(){return this[R].primaryInputMode}set primaryInputMode(e){if(e!=="controller"&&e!=="hand"){console.warn('primary input mode can only be "controller" or "hand"');return}this[R].primaryInputMode=e}get activeInputs(){return this[R].visibilityState!=="visible"?[]:(this[R].primaryInputMode==="controller"?Object.values(this[R].controllers):Object.values(this[R].hands)).filter(n=>n.connected)}get inputSources(){var e;return!((e=this[R].actionPlayer)===null||e===void 0)&&e.playing?this[R].actionPlayer.inputSources:this.activeInputs.map(n=>n.inputSource)}get canvasContainer(){return this[R].canvasContainer}get canvasDimensions(){if(this[R].canvasData){const{width:e,height:n}=this[R].canvasData.canvas;return{width:e,height:n}}}get activeSession(){var e;return(e=this[R].xrSystem)===null||e===void 0?void 0:e[et].activeSession}get sessionOffered(){var e;return!!(!((e=this[R].xrSystem)===null||e===void 0)&&e[et].offeredSessionConfig)}get name(){return this[R].name}grantOfferedSession(){const e=this[R].xrSystem,n=e?.[et];if(n&&n.offeredSessionConfig){const{resolve:r,reject:i,mode:s,options:o}=n.offeredSessionConfig;n.offeredSessionConfig=void 0,e.requestSession(s,o).then(r).catch(i)}}recenter(){const e=new un(-this.position.x,0,-this.position.z),n=new un(0,0,-1).applyQuaternion(this.quaternion);n.y=0,n.normalize();const r=Math.atan2(n.x,-n.z),i=new Lr().setFromAxisAngle(new un(0,1,0),r);this.position.add(e),this.quaternion.multiply(i),[...Object.values(this[R].controllers),...Object.values(this[R].hands)].forEach(s=>{s.position.add(e),s.quaternion.multiply(i),s.position.applyQuaternion(i)}),this[R].pendingReferenceSpaceReset=!0}get visibilityState(){return this[R].visibilityState}updateVisibilityState(e){if(!Object.values(["visible","visible-blurred","hidden"]).includes(e))throw new DOMException("Invalid XRVisibilityState value","NotSupportedError");e!==this[R].visibilityState&&(this[R].pendingVisibilityState=e)}createActionPlayer(e,n){return this[R].actionPlayer=new s3(e,n,this[R].ipd),this[R].actionPlayer}get devui(){return this[R].devui}get sem(){return this[R].sem}}const ts={mapping:Vr.XRStandard,buttons:[{id:"trigger",type:"analog",eventTrigger:"select"},{id:"squeeze",type:"analog",eventTrigger:"squeeze"},null,{id:"thumbstick",type:"binary"},{id:"x-button",type:"binary"},{id:"y-button",type:"binary"},{id:"thumbrest",type:"binary"}],axes:[null,null,{id:"thumbstick",type:"x-axis"},{id:"thumbstick",type:"y-axis"}]},ns={mapping:Vr.XRStandard,buttons:[{id:"trigger",type:"analog",eventTrigger:"select"},{id:"squeeze",type:"analog",eventTrigger:"squeeze"},null,{id:"thumbstick",type:"binary"},{id:"a-button",type:"binary"},{id:"b-button",type:"binary"},{id:"thumbrest",type:"binary"}],axes:[null,null,{id:"thumbstick",type:"x-axis"},{id:"thumbstick",type:"y-axis"}]},N3={profileId:"oculus-touch-v2",fallbackProfileIds:["oculus-touch","generic-trigger-squeeze-thumbstick"],layout:{left:{gamepad:ts,gripOffsetMatrix:[.9925461411476135,4673031295254759e-24,-.12186938524246216,0,.08617470413446426,.7071065306663513,.7018362283706665,0,.0861746296286583,-.70710688829422,.7018358707427979,0,-.003979847766458988,-.01585787907242775,.04964185878634453,1],numHapticActuators:1},right:{gamepad:ns,gripOffsetMatrix:[.9925461411476135,3688163374704345e-23,.12186937034130096,0,-.08617469668388367,.7071066498756409,.7018361687660217,0,-.0861746147274971,-.7071068286895752,.7018359899520874,0,.003979853354394436,-.01585787907242775,.04964182525873184,1],numHapticActuators:1}}},F3={profileId:"oculus-touch-v3",fallbackProfileIds:["oculus-touch","generic-trigger-squeeze-thumbstick"],layout:{left:{gamepad:ts,gripOffsetMatrix:[.9925461411476135,20823669899527886e-24,-.12186937034130096,0,.08617465198040009,.7071067094802856,.701836109161377,0,.08617466688156128,-.7071067690849304,.7018360495567322,0,-.003979838453233242,-.015857907012104988,.04964181408286095,1],numHapticActuators:1},right:{gamepad:ns,gripOffsetMatrix:[.9925461411476135,-8329467959811154e-23,.12186941504478455,0,-.08617465943098068,.7071066498756409,.7018361687660217,0,-.08617471158504486,-.7071068286895752,.7018359303474426,0,.003979798872023821,-.015857888385653496,.049641866236925125,1],numHapticActuators:1}}},z3={profileId:"meta-quest-touch-pro",fallbackProfileIds:["oculus-touch-v2","oculus-touch","generic-trigger-squeeze-thumbstick"],layout:{left:{gamepad:ts,gripOffsetMatrix:[.9925461411476135,-15779937356796836e-24,-.12186935544013977,0,.08617467433214188,.7071067094802856,.701836109161377,0,.0861746296286583,-.7071067690849304,.7018360495567322,0,-.003979836590588093,-.015857847407460213,.049641840159893036,1],numHapticActuators:3},right:{gamepad:ns,gripOffsetMatrix:[.9925461411476135,9267653311439972e-26,.12186937034130096,0,-.08617467433214188,.7071067094802856,.7018361687660217,0,-.08617464452981949,-.7071067690849304,.7018360495567322,0,.003979847766458988,-.01585782691836357,.04964186251163483,1],numHapticActuators:3}}},D3={profileId:"meta-quest-touch-plus",fallbackProfileIds:["oculus-touch-v3","oculus-touch","generic-trigger-squeeze-thumbstick"],layout:{left:{gamepad:ts,gripOffsetMatrix:[.9925461411476135,10736208366779465e-24,-.12186933308839798,0,.08617459982633591,.70710688829422,.7018360495567322,0,.08617466688156128,-.7071067094802856,.7018362283706665,0,-.003979803062975407,-.015857873484492302,.04964187368750572,1],numHapticActuators:1},right:{gamepad:ns,gripOffsetMatrix:[.9925461411476135,-26238110351073374e-24,.12186934053897858,0,-.0861746147274971,.7071067690849304,.7018360495567322,0,-.08617465943098068,-.7071067094802856,.701836109161377,0,.003979838453233242,-.015857869759202003,.04964182525873184,1],numHapticActuators:1}}},B3={name:"Oculus Quest 1",controllerConfig:N3,supportedSessionModes:["inline","immersive-vr","immersive-ar"],supportedFeatures:["viewer","local","local-floor","bounded-floor","unbounded","anchors","plane-detection","hand-tracking"],supportedFrameRates:[72,80,90],isSystemKeyboardSupported:!0,internalNominalFrameRate:72,environmentBlendModes:{"immersive-vr":ft.Opaque,"immersive-ar":ft.AlphaBlend},interactionMode:sr.WorldSpace,userAgent:"Mozilla/5.0 (X11; Linux x86_64; Quest 1) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/33.0.0.x.x.x Chrome/126.0.6478.122 VR Safari/537.36"},V3={name:"Meta Quest 2",controllerConfig:F3,supportedSessionModes:["inline","immersive-vr","immersive-ar"],supportedFeatures:["viewer","local","local-floor","bounded-floor","unbounded","anchors","plane-detection","mesh-detection","hit-test","hand-tracking"],supportedFrameRates:[72,80,90,120],isSystemKeyboardSupported:!0,internalNominalFrameRate:72,environmentBlendModes:{"immersive-vr":ft.Opaque,"immersive-ar":ft.AlphaBlend},interactionMode:sr.WorldSpace,userAgent:"Mozilla/5.0 (X11; Linux x86_64; Quest 2) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/33.0.0.x.x.x Chrome/126.0.6478.122 VR Safari/537.36"},U3={name:"Meta Quest Pro",controllerConfig:z3,supportedSessionModes:["inline","immersive-vr","immersive-ar"],supportedFeatures:["viewer","local","local-floor","bounded-floor","unbounded","anchors","plane-detection","mesh-detection","hit-test","hand-tracking"],supportedFrameRates:[72,80,90,120],isSystemKeyboardSupported:!0,internalNominalFrameRate:90,environmentBlendModes:{"immersive-vr":ft.Opaque,"immersive-ar":ft.AlphaBlend},interactionMode:sr.WorldSpace,userAgent:"Mozilla/5.0 (X11; Linux x86_64; Quest Pro) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/33.0.0.x.x.x Chrome/126.0.6478.122 VR Safari/537.36"},G3={name:"Meta Quest 3",controllerConfig:D3,supportedSessionModes:["inline","immersive-vr","immersive-ar"],supportedFeatures:["viewer","local","local-floor","bounded-floor","unbounded","anchors","plane-detection","mesh-detection","hit-test","hand-tracking","depth-sensing"],supportedFrameRates:[72,80,90,120],isSystemKeyboardSupported:!0,internalNominalFrameRate:90,environmentBlendModes:{"immersive-vr":ft.Opaque,"immersive-ar":ft.AlphaBlend},interactionMode:sr.WorldSpace,userAgent:"Mozilla/5.0 (X11; Linux x86_64; Quest 3) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/33.0.0.x.x.x Chrome/126.0.6478.122 VR Safari/537.36"};function H3(){let t=0,e=0;for(let r=0;r<28;r+=7){let i=this.buf[this.pos++];if(t|=(i&127)<<r,(i&128)==0)return this.assertBounds(),[t,e]}let n=this.buf[this.pos++];if(t|=(n&15)<<28,e=(n&112)>>4,(n&128)==0)return this.assertBounds(),[t,e];for(let r=3;r<=31;r+=7){let i=this.buf[this.pos++];if(e|=(i&127)<<r,(i&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}function Bs(t,e,n){for(let s=0;s<28;s=s+7){const o=t>>>s,a=!(!(o>>>7)&&e==0),l=(a?o|128:o)&255;if(n.push(l),!a)return}const r=t>>>28&15|(e&7)<<4,i=e>>3!=0;if(n.push((i?r|128:r)&255),!!i){for(let s=3;s<31;s=s+7){const o=e>>>s,a=!!(o>>>7),l=(a?o|128:o)&255;if(n.push(l),!a)return}n.push(e>>>31&1)}}const Ri=4294967296;function vc(t){const e=t[0]==="-";e&&(t=t.slice(1));const n=1e6;let r=0,i=0;function s(o,a){const l=Number(t.slice(o,a));i*=n,r=r*n+l,r>=Ri&&(i=i+(r/Ri|0),r=r%Ri)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),e?B0(r,i):da(r,i)}function $3(t,e){let n=da(t,e);const r=n.hi&2147483648;r&&(n=B0(n.lo,n.hi));const i=D0(n.lo,n.hi);return r?"-"+i:i}function D0(t,e){if({lo:t,hi:e}=W3(t,e),e<=2097151)return String(Ri*e+t);const n=t&16777215,r=(t>>>24|e<<8)&16777215,i=e>>16&65535;let s=n+r*6777216+i*6710656,o=r+i*8147497,a=i*2;const l=1e7;return s>=l&&(o+=Math.floor(s/l),s%=l),o>=l&&(a+=Math.floor(o/l),o%=l),a.toString()+wc(o)+wc(s)}function W3(t,e){return{lo:t>>>0,hi:e>>>0}}function da(t,e){return{lo:t|0,hi:e|0}}function B0(t,e){return e=~e,t?t=~t+1:e+=1,da(t,e)}const wc=t=>{const e=String(t);return"0000000".slice(e.length)+e};function bc(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let n=0;n<9;n++)e.push(t&127|128),t=t>>7;e.push(1)}}function q3(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let n=5;(t&128)!==0&&n<10;n++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}const gt=X3();function X3(){const t=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"&&(!!globalThis.Deno||typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const n=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),i=BigInt("0"),s=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(o){const a=typeof o=="bigint"?o:BigInt(o);if(a>r||a<n)throw new Error(`invalid int64: ${o}`);return a},uParse(o){const a=typeof o=="bigint"?o:BigInt(o);if(a>s||a<i)throw new Error(`invalid uint64: ${o}`);return a},enc(o){return t.setBigInt64(0,this.parse(o),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},uEnc(o){return t.setBigInt64(0,this.uParse(o),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},dec(o,a){return t.setInt32(0,o,!0),t.setInt32(4,a,!0),t.getBigInt64(0,!0)},uDec(o,a){return t.setInt32(0,o,!0),t.setInt32(4,a,!0),t.getBigUint64(0,!0)}}}return{zero:"0",supported:!1,parse(n){return typeof n!="string"&&(n=n.toString()),Ec(n),n},uParse(n){return typeof n!="string"&&(n=n.toString()),Tc(n),n},enc(n){return typeof n!="string"&&(n=n.toString()),Ec(n),vc(n)},uEnc(n){return typeof n!="string"&&(n=n.toString()),Tc(n),vc(n)},dec(n,r){return $3(n,r)},uDec(n,r){return D0(n,r)}}}function Ec(t){if(!/^-?[0-9]+$/.test(t))throw new Error("invalid int64: "+t)}function Tc(t){if(!/^[0-9]+$/.test(t))throw new Error("invalid uint64: "+t)}const Vs=Symbol.for("@bufbuild/protobuf/text-encoding");function V0(){if(globalThis[Vs]==null){const t=new globalThis.TextEncoder,e=new globalThis.TextDecoder;globalThis[Vs]={encodeUtf8(n){return t.encode(n)},decodeUtf8(n){return e.decode(n)},checkUtf8(n){try{return encodeURIComponent(n),!0}catch{return!1}}}}return globalThis[Vs]}var Bt;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(Bt||(Bt={}));const Y3=34028234663852886e22,Z3=-34028234663852886e22,Q3=4294967295,K3=2147483647,J3=-2147483648;class Ve{constructor(e=V0().encodeUtf8){this.encodeUtf8=e,this.stack=[],this.chunks=[],this.buf=[]}finish(){this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]);let e=0;for(let i=0;i<this.chunks.length;i++)e+=this.chunks[i].length;let n=new Uint8Array(e),r=0;for(let i=0;i<this.chunks.length;i++)n.set(this.chunks[i],r),r+=this.chunks[i].length;return this.chunks=[],n}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,n){return this.uint32((e<<3|n)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(Rc(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return Us(e),bc(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let n=this.encodeUtf8(e);return this.uint32(n.byteLength),this.raw(n)}float(e){em(e);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,e,!0),this.raw(n)}double(e){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,e,!0),this.raw(n)}fixed32(e){Rc(e);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,e,!0),this.raw(n)}sfixed32(e){Us(e);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,e,!0),this.raw(n)}sint32(e){return Us(e),e=(e<<1^e>>31)>>>0,bc(e,this.buf),this}sfixed64(e){let n=new Uint8Array(8),r=new DataView(n.buffer),i=gt.enc(e);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}fixed64(e){let n=new Uint8Array(8),r=new DataView(n.buffer),i=gt.uEnc(e);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(e){let n=gt.enc(e);return Bs(n.lo,n.hi,this.buf),this}sint64(e){const n=gt.enc(e),r=n.hi>>31,i=n.lo<<1^r,s=(n.hi<<1|n.lo>>>31)^r;return Bs(i,s,this.buf),this}uint64(e){const n=gt.uEnc(e);return Bs(n.lo,n.hi,this.buf),this}}class de{constructor(e,n=V0().decodeUtf8){this.decodeUtf8=n,this.varint64=H3,this.uint32=q3,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.uint32(),n=e>>>3,r=e&7;if(n<=0||r<0||r>5)throw new Error("illegal tag: field no "+n+" wire type "+r);return[n,r]}skip(e,n){let r=this.pos;switch(e){case Bt.Varint:for(;this.buf[this.pos++]&128;);break;case Bt.Bit64:this.pos+=4;case Bt.Bit32:this.pos+=4;break;case Bt.LengthDelimited:let i=this.uint32();this.pos+=i;break;case Bt.StartGroup:for(;;){const[s,o]=this.tag();if(o===Bt.EndGroup){if(n!==void 0&&s!==n)throw new Error("invalid end group tag");break}this.skip(o,s)}break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return gt.dec(...this.varint64())}uint64(){return gt.uDec(...this.varint64())}sint64(){let[e,n]=this.varint64(),r=-(e&1);return e=(e>>>1|(n&1)<<31)^r,n=n>>>1^r,gt.dec(e,n)}bool(){let[e,n]=this.varint64();return e!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return gt.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return gt.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),n=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(n,n+e)}string(){return this.decodeUtf8(this.bytes())}}function Us(t){if(typeof t=="string")t=Number(t);else if(typeof t!="number")throw new Error("invalid int32: "+typeof t);if(!Number.isInteger(t)||t>K3||t<J3)throw new Error("invalid int32: "+t)}function Rc(t){if(typeof t=="string")t=Number(t);else if(typeof t!="number")throw new Error("invalid uint32: "+typeof t);if(!Number.isInteger(t)||t>Q3||t<0)throw new Error("invalid uint32: "+t)}function em(t){if(typeof t=="string"){const e=t;if(t=Number(t),Number.isNaN(t)&&e!=="NaN")throw new Error("invalid float32: "+e)}else if(typeof t!="number")throw new Error("invalid float32: "+typeof t);if(Number.isFinite(t)&&(t>Y3||t<Z3))throw new Error("invalid float32: "+t)}function Sc(){return{x:0,y:0}}const kn={encode(t,e=new Ve){return t.x!==0&&e.uint32(13).float(t.x),t.y!==0&&e.uint32(21).float(t.y),e},decode(t,e){const n=t instanceof de?t:new de(t);let r=e===void 0?n.len:n.pos+e;const i=Sc();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==13)break;i.x=n.float();continue}case 2:{if(s!==21)break;i.y=n.float();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return i},fromJSON(t){return{x:Te(t.x)?globalThis.Number(t.x):0,y:Te(t.y)?globalThis.Number(t.y):0}},toJSON(t){const e={};return t.x!==0&&(e.x=t.x),t.y!==0&&(e.y=t.y),e},create(t){return kn.fromPartial(t??{})},fromPartial(t){var e,n;const r=Sc();return r.x=(e=t.x)!==null&&e!==void 0?e:0,r.y=(n=t.y)!==null&&n!==void 0?n:0,r}};function _c(){return{width:0,height:0}}const In={encode(t,e=new Ve){return t.width!==0&&e.uint32(13).float(t.width),t.height!==0&&e.uint32(21).float(t.height),e},decode(t,e){const n=t instanceof de?t:new de(t);let r=e===void 0?n.len:n.pos+e;const i=_c();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==13)break;i.width=n.float();continue}case 2:{if(s!==21)break;i.height=n.float();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return i},fromJSON(t){return{width:Te(t.width)?globalThis.Number(t.width):0,height:Te(t.height)?globalThis.Number(t.height):0}},toJSON(t){const e={};return t.width!==0&&(e.width=t.width),t.height!==0&&(e.height=t.height),e},create(t){return In.fromPartial(t??{})},fromPartial(t){var e,n;const r=_c();return r.width=(e=t.width)!==null&&e!==void 0?e:0,r.height=(n=t.height)!==null&&n!==void 0?n:0,r}};function Ac(){return{x:0,y:0,z:0}}const ot={encode(t,e=new Ve){return t.x!==0&&e.uint32(13).float(t.x),t.y!==0&&e.uint32(21).float(t.y),t.z!==0&&e.uint32(29).float(t.z),e},decode(t,e){const n=t instanceof de?t:new de(t);let r=e===void 0?n.len:n.pos+e;const i=Ac();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==13)break;i.x=n.float();continue}case 2:{if(s!==21)break;i.y=n.float();continue}case 3:{if(s!==29)break;i.z=n.float();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return i},fromJSON(t){return{x:Te(t.x)?globalThis.Number(t.x):0,y:Te(t.y)?globalThis.Number(t.y):0,z:Te(t.z)?globalThis.Number(t.z):0}},toJSON(t){const e={};return t.x!==0&&(e.x=t.x),t.y!==0&&(e.y=t.y),t.z!==0&&(e.z=t.z),e},create(t){return ot.fromPartial(t??{})},fromPartial(t){var e,n,r;const i=Ac();return i.x=(e=t.x)!==null&&e!==void 0?e:0,i.y=(n=t.y)!==null&&n!==void 0?n:0,i.z=(r=t.z)!==null&&r!==void 0?r:0,i}};function Mc(){return{width:0,height:0,depth:0}}const Cn={encode(t,e=new Ve){return t.width!==0&&e.uint32(13).float(t.width),t.height!==0&&e.uint32(21).float(t.height),t.depth!==0&&e.uint32(29).float(t.depth),e},decode(t,e){const n=t instanceof de?t:new de(t);let r=e===void 0?n.len:n.pos+e;const i=Mc();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==13)break;i.width=n.float();continue}case 2:{if(s!==21)break;i.height=n.float();continue}case 3:{if(s!==29)break;i.depth=n.float();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return i},fromJSON(t){return{width:Te(t.width)?globalThis.Number(t.width):0,height:Te(t.height)?globalThis.Number(t.height):0,depth:Te(t.depth)?globalThis.Number(t.depth):0}},toJSON(t){const e={};return t.width!==0&&(e.width=t.width),t.height!==0&&(e.height=t.height),t.depth!==0&&(e.depth=t.depth),e},create(t){return Cn.fromPartial(t??{})},fromPartial(t){var e,n,r;const i=Mc();return i.width=(e=t.width)!==null&&e!==void 0?e:0,i.height=(n=t.height)!==null&&n!==void 0?n:0,i.depth=(r=t.depth)!==null&&r!==void 0?r:0,i}};function Pc(){return{x:0,y:0,z:0,w:0}}const Ln={encode(t,e=new Ve){return t.x!==0&&e.uint32(13).float(t.x),t.y!==0&&e.uint32(21).float(t.y),t.z!==0&&e.uint32(29).float(t.z),t.w!==0&&e.uint32(37).float(t.w),e},decode(t,e){const n=t instanceof de?t:new de(t);let r=e===void 0?n.len:n.pos+e;const i=Pc();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==13)break;i.x=n.float();continue}case 2:{if(s!==21)break;i.y=n.float();continue}case 3:{if(s!==29)break;i.z=n.float();continue}case 4:{if(s!==37)break;i.w=n.float();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return i},fromJSON(t){return{x:Te(t.x)?globalThis.Number(t.x):0,y:Te(t.y)?globalThis.Number(t.y):0,z:Te(t.z)?globalThis.Number(t.z):0,w:Te(t.w)?globalThis.Number(t.w):0}},toJSON(t){const e={};return t.x!==0&&(e.x=t.x),t.y!==0&&(e.y=t.y),t.z!==0&&(e.z=t.z),t.w!==0&&(e.w=t.w),e},create(t){return Ln.fromPartial(t??{})},fromPartial(t){var e,n,r,i;const s=Pc();return s.x=(e=t.x)!==null&&e!==void 0?e:0,s.y=(n=t.y)!==null&&n!==void 0?n:0,s.z=(r=t.z)!==null&&r!==void 0?r:0,s.w=(i=t.w)!==null&&i!==void 0?i:0,s}};function Oc(){return{offset:void 0,extent:void 0}}const jn={encode(t,e=new Ve){return t.offset!==void 0&&kn.encode(t.offset,e.uint32(10).fork()).join(),t.extent!==void 0&&In.encode(t.extent,e.uint32(18).fork()).join(),e},decode(t,e){const n=t instanceof de?t:new de(t);let r=e===void 0?n.len:n.pos+e;const i=Oc();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;i.offset=kn.decode(n,n.uint32());continue}case 2:{if(s!==18)break;i.extent=In.decode(n,n.uint32());continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return i},fromJSON(t){return{offset:Te(t.offset)?kn.fromJSON(t.offset):void 0,extent:Te(t.extent)?In.fromJSON(t.extent):void 0}},toJSON(t){const e={};return t.offset!==void 0&&(e.offset=kn.toJSON(t.offset)),t.extent!==void 0&&(e.extent=In.toJSON(t.extent)),e},create(t){return jn.fromPartial(t??{})},fromPartial(t){const e=Oc();return e.offset=t.offset!==void 0&&t.offset!==null?kn.fromPartial(t.offset):void 0,e.extent=t.extent!==void 0&&t.extent!==null?In.fromPartial(t.extent):void 0,e}};function kc(){return{offset:void 0,extent:void 0}}const Nn={encode(t,e=new Ve){return t.offset!==void 0&&ot.encode(t.offset,e.uint32(10).fork()).join(),t.extent!==void 0&&Cn.encode(t.extent,e.uint32(18).fork()).join(),e},decode(t,e){const n=t instanceof de?t:new de(t);let r=e===void 0?n.len:n.pos+e;const i=kc();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;i.offset=ot.decode(n,n.uint32());continue}case 2:{if(s!==18)break;i.extent=Cn.decode(n,n.uint32());continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return i},fromJSON(t){return{offset:Te(t.offset)?ot.fromJSON(t.offset):void 0,extent:Te(t.extent)?Cn.fromJSON(t.extent):void 0}},toJSON(t){const e={};return t.offset!==void 0&&(e.offset=ot.toJSON(t.offset)),t.extent!==void 0&&(e.extent=Cn.toJSON(t.extent)),e},create(t){return Nn.fromPartial(t??{})},fromPartial(t){const e=kc();return e.offset=t.offset!==void 0&&t.offset!==null?ot.fromPartial(t.offset):void 0,e.extent=t.extent!==void 0&&t.extent!==null?Cn.fromPartial(t.extent):void 0,e}};function Ic(){return{orientation:void 0,position:void 0}}const Fn={encode(t,e=new Ve){return t.orientation!==void 0&&Ln.encode(t.orientation,e.uint32(10).fork()).join(),t.position!==void 0&&ot.encode(t.position,e.uint32(18).fork()).join(),e},decode(t,e){const n=t instanceof de?t:new de(t);let r=e===void 0?n.len:n.pos+e;const i=Ic();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;i.orientation=Ln.decode(n,n.uint32());continue}case 2:{if(s!==18)break;i.position=ot.decode(n,n.uint32());continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return i},fromJSON(t){return{orientation:Te(t.orientation)?Ln.fromJSON(t.orientation):void 0,position:Te(t.position)?ot.fromJSON(t.position):void 0}},toJSON(t){const e={};return t.orientation!==void 0&&(e.orientation=Ln.toJSON(t.orientation)),t.position!==void 0&&(e.position=ot.toJSON(t.position)),e},create(t){return Fn.fromPartial(t??{})},fromPartial(t){const e=Ic();return e.orientation=t.orientation!==void 0&&t.orientation!==null?Ln.fromPartial(t.orientation):void 0,e.position=t.position!==void 0&&t.position!==null?ot.fromPartial(t.position):void 0,e}};function Te(t){return t!=null}var ar;(function(t){t[t.Keyboard=0]="Keyboard",t[t.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ar||(ar={}));function tm(t){switch(t){case 0:case"Keyboard":return ar.Keyboard;case-1:case"UNRECOGNIZED":default:return ar.UNRECOGNIZED}}function nm(t){switch(t){case ar.Keyboard:return"Keyboard";case ar.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var O;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.FLOOR=1]="FLOOR",t[t.CEILING=2]="CEILING",t[t.WALL_FACE=3]="WALL_FACE",t[t.TABLE=4]="TABLE",t[t.COUCH=5]="COUCH",t[t.DOOR_FRAME=6]="DOOR_FRAME",t[t.WINDOW_FRAME=7]="WINDOW_FRAME",t[t.OTHER=8]="OTHER",t[t.STORAGE=9]="STORAGE",t[t.BED=10]="BED",t[t.SCREEN=11]="SCREEN",t[t.LAMP=12]="LAMP",t[t.PLANT=13]="PLANT",t[t.WALL_ART=14]="WALL_ART",t[t.GLOBAL_MESH=15]="GLOBAL_MESH",t[t.INVISIBLE_WALL_FACE=16]="INVISIBLE_WALL_FACE",t[t.CHAIR=17]="CHAIR",t[t.INNER_WALL_FACE=18]="INNER_WALL_FACE",t[t.OTHER_ROOM_FACE=19]="OTHER_ROOM_FACE",t[t.OPENING=20]="OPENING",t[t.UNRECOGNIZED=-1]="UNRECOGNIZED"})(O||(O={}));function rm(t){switch(t){case 0:case"UNKNOWN":return O.UNKNOWN;case 1:case"FLOOR":return O.FLOOR;case 2:case"CEILING":return O.CEILING;case 3:case"WALL_FACE":return O.WALL_FACE;case 4:case"TABLE":return O.TABLE;case 5:case"COUCH":return O.COUCH;case 6:case"DOOR_FRAME":return O.DOOR_FRAME;case 7:case"WINDOW_FRAME":return O.WINDOW_FRAME;case 8:case"OTHER":return O.OTHER;case 9:case"STORAGE":return O.STORAGE;case 10:case"BED":return O.BED;case 11:case"SCREEN":return O.SCREEN;case 12:case"LAMP":return O.LAMP;case 13:case"PLANT":return O.PLANT;case 14:case"WALL_ART":return O.WALL_ART;case 15:case"GLOBAL_MESH":return O.GLOBAL_MESH;case 16:case"INVISIBLE_WALL_FACE":return O.INVISIBLE_WALL_FACE;case 17:case"CHAIR":return O.CHAIR;case 18:case"INNER_WALL_FACE":return O.INNER_WALL_FACE;case 19:case"OTHER_ROOM_FACE":return O.OTHER_ROOM_FACE;case 20:case"OPENING":return O.OPENING;case-1:case"UNRECOGNIZED":default:return O.UNRECOGNIZED}}function Mo(t){switch(t){case O.UNKNOWN:return"UNKNOWN";case O.FLOOR:return"FLOOR";case O.CEILING:return"CEILING";case O.WALL_FACE:return"WALL_FACE";case O.TABLE:return"TABLE";case O.COUCH:return"COUCH";case O.DOOR_FRAME:return"DOOR_FRAME";case O.WINDOW_FRAME:return"WINDOW_FRAME";case O.OTHER:return"OTHER";case O.STORAGE:return"STORAGE";case O.BED:return"BED";case O.SCREEN:return"SCREEN";case O.LAMP:return"LAMP";case O.PLANT:return"PLANT";case O.WALL_ART:return"WALL_ART";case O.GLOBAL_MESH:return"GLOBAL_MESH";case O.INVISIBLE_WALL_FACE:return"INVISIBLE_WALL_FACE";case O.CHAIR:return"CHAIR";case O.INNER_WALL_FACE:return"INNER_WALL_FACE";case O.OTHER_ROOM_FACE:return"OTHER_ROOM_FACE";case O.OPENING:return"OPENING";case O.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function Cc(){return{floorUuid:"",ceilingUuid:"",wallUuids:[]}}const zn={encode(t,e=new Ve){t.floorUuid!==""&&e.uint32(10).string(t.floorUuid),t.ceilingUuid!==""&&e.uint32(18).string(t.ceilingUuid);for(const n of t.wallUuids)e.uint32(26).string(n);return e},decode(t,e){const n=t instanceof de?t:new de(t);let r=e===void 0?n.len:n.pos+e;const i=Cc();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;i.floorUuid=n.string();continue}case 2:{if(s!==18)break;i.ceilingUuid=n.string();continue}case 3:{if(s!==26)break;i.wallUuids.push(n.string());continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return i},fromJSON(t){return{floorUuid:Ce(t.floorUuid)?globalThis.String(t.floorUuid):"",ceilingUuid:Ce(t.ceilingUuid)?globalThis.String(t.ceilingUuid):"",wallUuids:globalThis.Array.isArray(t?.wallUuids)?t.wallUuids.map(e=>globalThis.String(e)):[]}},toJSON(t){var e;const n={};return t.floorUuid!==""&&(n.floorUuid=t.floorUuid),t.ceilingUuid!==""&&(n.ceilingUuid=t.ceilingUuid),!((e=t.wallUuids)===null||e===void 0)&&e.length&&(n.wallUuids=t.wallUuids),n},create(t){return zn.fromPartial(t??{})},fromPartial(t){var e,n,r;const i=Cc();return i.floorUuid=(e=t.floorUuid)!==null&&e!==void 0?e:"",i.ceilingUuid=(n=t.ceilingUuid)!==null&&n!==void 0?n:"",i.wallUuids=((r=t.wallUuids)===null||r===void 0?void 0:r.map(s=>s))||[],i}};function Lc(){return{uuids:[]}}const Dn={encode(t,e=new Ve){for(const n of t.uuids)e.uint32(10).string(n);return e},decode(t,e){const n=t instanceof de?t:new de(t);let r=e===void 0?n.len:n.pos+e;const i=Lc();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;i.uuids.push(n.string());continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return i},fromJSON(t){return{uuids:globalThis.Array.isArray(t?.uuids)?t.uuids.map(e=>globalThis.String(e)):[]}},toJSON(t){var e;const n={};return!((e=t.uuids)===null||e===void 0)&&e.length&&(n.uuids=t.uuids),n},create(t){return Dn.fromPartial(t??{})},fromPartial(t){var e;const n=Lc();return n.uuids=((e=t.uuids)===null||e===void 0?void 0:e.map(r=>r))||[],n}};function jc(){return{vertices:new Uint8Array(0)}}const Bn={encode(t,e=new Ve){return t.vertices.length!==0&&e.uint32(10).bytes(t.vertices),e},decode(t,e){const n=t instanceof de?t:new de(t);let r=e===void 0?n.len:n.pos+e;const i=jc();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;i.vertices=n.bytes();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return i},fromJSON(t){return{vertices:Ce(t.vertices)?Po(t.vertices):new Uint8Array(0)}},toJSON(t){const e={};return t.vertices.length!==0&&(e.vertices=Oo(t.vertices)),e},create(t){return Bn.fromPartial(t??{})},fromPartial(t){var e;const n=jc();return n.vertices=(e=t.vertices)!==null&&e!==void 0?e:new Uint8Array(0),n}};function Nc(){return{vertices:new Uint8Array(0),indices:new Uint8Array(0)}}const Vn={encode(t,e=new Ve){return t.vertices.length!==0&&e.uint32(10).bytes(t.vertices),t.indices.length!==0&&e.uint32(18).bytes(t.indices),e},decode(t,e){const n=t instanceof de?t:new de(t);let r=e===void 0?n.len:n.pos+e;const i=Nc();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;i.vertices=n.bytes();continue}case 2:{if(s!==18)break;i.indices=n.bytes();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return i},fromJSON(t){return{vertices:Ce(t.vertices)?Po(t.vertices):new Uint8Array(0),indices:Ce(t.indices)?Po(t.indices):new Uint8Array(0)}},toJSON(t){const e={};return t.vertices.length!==0&&(e.vertices=Oo(t.vertices)),t.indices.length!==0&&(e.indices=Oo(t.indices)),e},create(t){return Vn.fromPartial(t??{})},fromPartial(t){var e,n;const r=Nc();return r.vertices=(e=t.vertices)!==null&&e!==void 0?e:new Uint8Array(0),r.indices=(n=t.indices)!==null&&n!==void 0?n:new Uint8Array(0),r}};function Fc(){return{classType:0}}const Un={encode(t,e=new Ve){return t.classType!==0&&e.uint32(8).int32(t.classType),e},decode(t,e){const n=t instanceof de?t:new de(t);let r=e===void 0?n.len:n.pos+e;const i=Fc();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==8)break;i.classType=n.int32();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return i},fromJSON(t){return{classType:Ce(t.classType)?tm(t.classType):0}},toJSON(t){const e={};return t.classType!==0&&(e.classType=nm(t.classType)),e},create(t){return Un.fromPartial(t??{})},fromPartial(t){var e;const n=Fc();return n.classType=(e=t.classType)!==null&&e!==void 0?e:0,n}};function zc(){return{uuid:"",semanticLabel_META:void 0,locatable_META:void 0,boundary2D_META:void 0,bounded2D_META:void 0,bounded3D_META:void 0,roomLayout_META:void 0,spaceContainer_META:void 0,triangleMesh_META:void 0,dynamicObject_META:void 0}}const U0={encode(t,e=new Ve){return t.uuid!==""&&e.uint32(10).string(t.uuid),t.semanticLabel_META!==void 0&&e.uint32(16).int32(t.semanticLabel_META),t.locatable_META!==void 0&&Fn.encode(t.locatable_META,e.uint32(26).fork()).join(),t.boundary2D_META!==void 0&&Bn.encode(t.boundary2D_META,e.uint32(34).fork()).join(),t.bounded2D_META!==void 0&&jn.encode(t.bounded2D_META,e.uint32(42).fork()).join(),t.bounded3D_META!==void 0&&Nn.encode(t.bounded3D_META,e.uint32(50).fork()).join(),t.roomLayout_META!==void 0&&zn.encode(t.roomLayout_META,e.uint32(58).fork()).join(),t.spaceContainer_META!==void 0&&Dn.encode(t.spaceContainer_META,e.uint32(66).fork()).join(),t.triangleMesh_META!==void 0&&Vn.encode(t.triangleMesh_META,e.uint32(74).fork()).join(),t.dynamicObject_META!==void 0&&Un.encode(t.dynamicObject_META,e.uint32(82).fork()).join(),e},decode(t,e){const n=t instanceof de?t:new de(t);let r=e===void 0?n.len:n.pos+e;const i=zc();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;i.uuid=n.string();continue}case 2:{if(s!==16)break;i.semanticLabel_META=n.int32();continue}case 3:{if(s!==26)break;i.locatable_META=Fn.decode(n,n.uint32());continue}case 4:{if(s!==34)break;i.boundary2D_META=Bn.decode(n,n.uint32());continue}case 5:{if(s!==42)break;i.bounded2D_META=jn.decode(n,n.uint32());continue}case 6:{if(s!==50)break;i.bounded3D_META=Nn.decode(n,n.uint32());continue}case 7:{if(s!==58)break;i.roomLayout_META=zn.decode(n,n.uint32());continue}case 8:{if(s!==66)break;i.spaceContainer_META=Dn.decode(n,n.uint32());continue}case 9:{if(s!==74)break;i.triangleMesh_META=Vn.decode(n,n.uint32());continue}case 10:{if(s!==82)break;i.dynamicObject_META=Un.decode(n,n.uint32());continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return i},fromJSON(t){return{uuid:Ce(t.uuid)?globalThis.String(t.uuid):"",semanticLabel_META:Ce(t.semanticLabel_META)?rm(t.semanticLabel_META):void 0,locatable_META:Ce(t.locatable_META)?Fn.fromJSON(t.locatable_META):void 0,boundary2D_META:Ce(t.boundary2D_META)?Bn.fromJSON(t.boundary2D_META):void 0,bounded2D_META:Ce(t.bounded2D_META)?jn.fromJSON(t.bounded2D_META):void 0,bounded3D_META:Ce(t.bounded3D_META)?Nn.fromJSON(t.bounded3D_META):void 0,roomLayout_META:Ce(t.roomLayout_META)?zn.fromJSON(t.roomLayout_META):void 0,spaceContainer_META:Ce(t.spaceContainer_META)?Dn.fromJSON(t.spaceContainer_META):void 0,triangleMesh_META:Ce(t.triangleMesh_META)?Vn.fromJSON(t.triangleMesh_META):void 0,dynamicObject_META:Ce(t.dynamicObject_META)?Un.fromJSON(t.dynamicObject_META):void 0}},toJSON(t){const e={};return t.uuid!==""&&(e.uuid=t.uuid),t.semanticLabel_META!==void 0&&(e.semanticLabel_META=Mo(t.semanticLabel_META)),t.locatable_META!==void 0&&(e.locatable_META=Fn.toJSON(t.locatable_META)),t.boundary2D_META!==void 0&&(e.boundary2D_META=Bn.toJSON(t.boundary2D_META)),t.bounded2D_META!==void 0&&(e.bounded2D_META=jn.toJSON(t.bounded2D_META)),t.bounded3D_META!==void 0&&(e.bounded3D_META=Nn.toJSON(t.bounded3D_META)),t.roomLayout_META!==void 0&&(e.roomLayout_META=zn.toJSON(t.roomLayout_META)),t.spaceContainer_META!==void 0&&(e.spaceContainer_META=Dn.toJSON(t.spaceContainer_META)),t.triangleMesh_META!==void 0&&(e.triangleMesh_META=Vn.toJSON(t.triangleMesh_META)),t.dynamicObject_META!==void 0&&(e.dynamicObject_META=Un.toJSON(t.dynamicObject_META)),e},create(t){return U0.fromPartial(t??{})},fromPartial(t){var e,n;const r=zc();return r.uuid=(e=t.uuid)!==null&&e!==void 0?e:"",r.semanticLabel_META=(n=t.semanticLabel_META)!==null&&n!==void 0?n:void 0,r.locatable_META=t.locatable_META!==void 0&&t.locatable_META!==null?Fn.fromPartial(t.locatable_META):void 0,r.boundary2D_META=t.boundary2D_META!==void 0&&t.boundary2D_META!==null?Bn.fromPartial(t.boundary2D_META):void 0,r.bounded2D_META=t.bounded2D_META!==void 0&&t.bounded2D_META!==null?jn.fromPartial(t.bounded2D_META):void 0,r.bounded3D_META=t.bounded3D_META!==void 0&&t.bounded3D_META!==null?Nn.fromPartial(t.bounded3D_META):void 0,r.roomLayout_META=t.roomLayout_META!==void 0&&t.roomLayout_META!==null?zn.fromPartial(t.roomLayout_META):void 0,r.spaceContainer_META=t.spaceContainer_META!==void 0&&t.spaceContainer_META!==null?Dn.fromPartial(t.spaceContainer_META):void 0,r.triangleMesh_META=t.triangleMesh_META!==void 0&&t.triangleMesh_META!==null?Vn.fromPartial(t.triangleMesh_META):void 0,r.dynamicObject_META=t.dynamicObject_META!==void 0&&t.dynamicObject_META!==null?Un.fromPartial(t.dynamicObject_META):void 0,r}};function Po(t){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(t,"base64"));{const e=globalThis.atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;++r)n[r]=e.charCodeAt(r);return n}}function Oo(t){if(globalThis.Buffer)return globalThis.Buffer.from(t).toString("base64");{const e=[];return t.forEach(n=>{e.push(globalThis.String.fromCharCode(n))}),globalThis.btoa(e.join(""))}}function Ce(t){return t!=null}var he;(function(t){t.Locatable="locatable",t.Bounded3D="bounded3D",t.Bounded2D="bounded2D",t.TriangleMesh="triangleMesh",t.SemanticLabel="semanticLabel"})(he||(he={}));class Yr extends EventTarget{constructor(e){super(),this._spatialEntity=e}}class im extends Yr{constructor(e,n){super(e),this._offset=new h.Vector2,this._extent=new h.Vector2,this.type=he.Bounded2D;const{offset:r,extent:i}=n;this._offset.set(r.x,r.y),this._extent.set(i.width,i.height),this.buildGeometry()}buildGeometry(){var e;const n=new h.PlaneGeometry(this._extent.x,this._extent.y);n.translate(this._offset.x+this._extent.x/2,this._offset.y+this._extent.y/2,0),n.rotateX(Math.PI/2),(e=this._spatialEntity.geometry)===null||e===void 0||e.dispose(),this._spatialEntity.geometry=n}get offset(){return this._offset}get extent(){return this._extent}get initData(){return{offset:this.offset,extent:this.extent}}get pbData(){return{offset:{x:this._offset.x,y:this._offset.y},extent:{width:this._extent.x,height:this._extent.y}}}}class sm extends Yr{constructor(e,n){super(e),this._offset=new h.Vector3,this._extent=new h.Vector3,this.type=he.Bounded3D;const{offset:r,extent:i}=n;this._offset.set(r.x,r.y,r.z),this._extent.set(i.width,i.height,i.depth),this.buildGeometry()}buildGeometry(){var e;const n=new h.BoxGeometry(this._extent.x,this._extent.y,this._extent.z);n.translate(this._offset.x+this._extent.x/2,this._offset.y+this._extent.y/2,this._offset.z+this._extent.z/2),(e=this._spatialEntity.geometry)===null||e===void 0||e.dispose(),this._spatialEntity.geometry=n}get offset(){return this._offset}get extent(){return this._extent}get initData(){return{offset:this.offset,extent:this.extent}}get pbData(){return{offset:{x:this._offset.x,y:this._offset.y,z:this._offset.z},extent:{width:this._extent.x,height:this._extent.y,depth:this._extent.z}}}}class om extends Yr{constructor(e,n){super(e),this.type=he.Locatable,n.position&&this.position.copy(n.position),n.orientation&&this.orientation.copy(n.orientation)}get position(){return this._spatialEntity.position}get rotation(){return this._spatialEntity.rotation}get orientation(){return this._spatialEntity.quaternion}get initData(){return{position:{x:this.position.x,y:this.position.y,z:this.position.z},orientation:{x:this.orientation.x,y:this.orientation.y,z:this.orientation.z,w:this.orientation.w}}}get pbData(){return{position:{x:this._spatialEntity.position.x,y:this._spatialEntity.position.y,z:this._spatialEntity.position.z},orientation:{x:this._spatialEntity.quaternion.x,y:this._spatialEntity.quaternion.y,z:this._spatialEntity.quaternion.z,w:this._spatialEntity.quaternion.w}}}}function Dc(t){return t.toLowerCase().replace(/_/g," ").trim()}class am extends Yr{constructor(e,n){super(e),this._semanticLabel=n,this.type=he.SemanticLabel,this._spatialEntity.name=Dc(Mo(n))}get semanticLabel(){return this._semanticLabel}set semanticLabel(e){Object.values(O).includes(e)?this._semanticLabel=e:this._semanticLabel=O.UNRECOGNIZED,this._spatialEntity.name=Dc(Mo(this._semanticLabel))}get initData(){return this._semanticLabel}get pbData(){return this._semanticLabel}}function Bc(t){const e=new Float32Array(t.length*3);let n=0;for(const r of t)e[n++]=r.x,e[n++]=r.y,e[n++]=r.z;return e}class lm extends Yr{constructor(e,n){super(e),this._polygonCount=0,this._vertexCount=0,this._dimensions={x:0,y:0,z:0},this.type=he.TriangleMesh;const{vertices:r,indices:i}=n,s=new Float32Array(r.buffer),o=new Uint32Array(i.buffer),a=[];for(let c=0;c<s.length/3;c++)a.push({x:s[3*c],y:s[3*c+1],z:s[3*c+2]});this._vertices=a,this._indices=[...o],this.buildGeometry();const l=e.material;l.polygonOffset=!0,l.polygonOffsetFactor=1,l.polygonOffsetUnits=.005,l.color.setHex(13948116),e.renderOrder=999}buildGeometry(){var e;const n=new h.BufferGeometry,r=Bc(this._vertices);n.setAttribute("position",new h.BufferAttribute(r,3)),n.setIndex(new h.BufferAttribute(new Uint16Array(this._indices),1)),(e=this._spatialEntity.geometry)===null||e===void 0||e.dispose(),this._spatialEntity.geometry=n,n.computeVertexNormals(),this._vertexCount=n.attributes.position.count,this._polygonCount=n.index?n.index.count/3:this._vertexCount/3,n.computeBoundingBox();const i=n.boundingBox;this._dimensions={x:i.max.x-i.min.x,y:i.max.y-i.min.y,z:i.max.z-i.min.z}}get vertexCount(){return this._vertexCount}get polygonCount(){return this._polygonCount}get dimensions(){return this._dimensions}get initData(){return{vertices:this._vertices,indices:this._indices}}get pbData(){const e=Bc(this._vertices),n=new Uint32Array(this._indices);return{vertices:new Uint8Array(e.buffer),indices:new Uint8Array(n.buffer)}}}const ke=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];function cm(){const t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0,r=Math.random()*4294967295|0;return(ke[t&255]+ke[t>>8&255]+ke[t>>16&255]+ke[t>>24&255]+"-"+ke[e&255]+ke[e>>8&255]+"-"+ke[e>>16&15|64]+ke[e>>24&255]+"-"+ke[n&63|128]+ke[n>>8&255]+"-"+ke[n>>16&255]+ke[n>>24&255]+ke[r&255]+ke[r>>8&255]+ke[r>>16&255]+ke[r>>24&255]).toLowerCase()}var it;(function(t){t.Plane="plane",t.Box="box",t.Mesh="mesh"})(it||(it={}));const um={[O.OTHER]:Z.Other,[O.TABLE]:Z.Table,[O.COUCH]:Z.Couch,[O.FLOOR]:Z.Floor,[O.CEILING]:Z.Ceiling,[O.WALL_FACE]:Z.Wall,[O.INVISIBLE_WALL_FACE]:Z.Window,[O.INNER_WALL_FACE]:Z.Wall,[O.DOOR_FRAME]:Z.Door,[O.WINDOW_FRAME]:Z.Window,[O.WALL_ART]:Z.WallArt,[O.STORAGE]:Z.Shelf,[O.BED]:Z.Bed,[O.LAMP]:Z.Lamp,[O.SCREEN]:Z.Screen,[O.PLANT]:Z.Plant,[O.GLOBAL_MESH]:Z.GlobalMesh,[O.CHAIR]:Z.Couch,[O.UNKNOWN]:Z.Other,[O.OTHER_ROOM_FACE]:Z.Other,[O.OPENING]:Z.Other,[O.UNRECOGNIZED]:Z.Other};class Fi extends h.Mesh{constructor(e=cm()){super(void 0,new h.MeshMatcapMaterial({color:16777215*Math.random(),flatShading:!0})),this.name="generic spatial entity",this.isSpatialEntity=!0,this._componentMap=new Map,this._spatialUUID=e}get spatialUUID(){return this._spatialUUID}updateMatrixWorld(e){super.updateMatrixWorld(e)}addComponent(e,n){let r=null;switch(e){case he.Locatable:r=new om(this,n);break;case he.Bounded3D:r=new sm(this,n);break;case he.Bounded2D:r=new im(this,n);break;case he.TriangleMesh:r=new lm(this,n);break;case he.SemanticLabel:r=new am(this,n);break}r&&this._componentMap.set(e,r)}getComponent(e){return this._componentMap.get(e)}duplicate(){const e=new Fi;return this._componentMap.forEach((n,r,i)=>{e.addComponent(n.type,n.initData)}),e}get nativeEntity(){if(!this._nativeEntity){const e=new xn({x:this.position.x,y:this.position.y,z:this.position.z,w:1},{x:this.quaternion.x,y:this.quaternion.y,z:this.quaternion.z,w:this.quaternion.w}),n=um[this.getComponent(he.SemanticLabel).semanticLabel];if(this.entityType===it.Plane){const{offset:r,extent:i}=this.getComponent(he.Bounded2D),s=[new DOMPointReadOnly(r.x,0,r.y),new DOMPointReadOnly(r.x+i.x,0,r.y),new DOMPointReadOnly(r.x+i.x,0,r.y+i.y),new DOMPointReadOnly(r.x,0,r.y+i.y),new DOMPointReadOnly(r.x,0,r.y)];this._nativeEntity=new q2(e,s,n)}else if(this.entityType===it.Box||this.entityType===it.Mesh){const r=this.geometry.getAttribute("position").array,i=new Uint32Array(this.geometry.index.array);this._nativeEntity=new G2(e,r,i,n)}}return this._nativeEntity}static fromPBJSON(e){const n=U0.fromJSON(e);if(n.locatable_META){const r=new Fi(n.uuid);return r.addComponent(he.Locatable,n.locatable_META),n.semanticLabel_META&&r.addComponent(he.SemanticLabel,n.semanticLabel_META),n.bounded2D_META?r.addComponent(he.Bounded2D,n.bounded2D_META):n.bounded3D_META?r.addComponent(he.Bounded3D,n.bounded3D_META):n.triangleMesh_META&&r.addComponent(he.TriangleMesh,n.triangleMesh_META),r}}get entityType(){if(this.getComponent(he.Bounded2D))return it.Plane;if(this.getComponent(he.Bounded3D))return it.Box;if(this.getComponent(he.TriangleMesh))return it.Mesh}static toPBJSON(e){var n,r,i,s,o;return{uuid:e.spatialUUID,locatable_META:(n=e.getComponent(he.Locatable))===null||n===void 0?void 0:n.pbData,boundary2D_META:void 0,bounded2D_META:(r=e.getComponent(he.Bounded2D))===null||r===void 0?void 0:r.pbData,bounded3D_META:(i=e.getComponent(he.Bounded3D))===null||i===void 0?void 0:i.pbData,semanticLabel_META:(s=e.getComponent(he.SemanticLabel))===null||s===void 0?void 0:s.pbData,roomLayout_META:void 0,spaceContainer_META:void 0,triangleMesh_META:(o=e.getComponent(he.TriangleMesh))===null||o===void 0?void 0:o.pbData,dynamicObject_META:void 0}}}const fm={living_room:()=>Promise.resolve().then(()=>require("./living_room-BExcgHe_.cjs")),meeting_room:()=>Promise.resolve().then(()=>require("./meeting_room-QG1J4owl.cjs")),music_room:()=>Promise.resolve().then(()=>require("./music_room-KhUm0m6-.cjs")),office_large:()=>Promise.resolve().then(()=>require("./office_large-Cy_oZxjZ.cjs")),office_small:()=>Promise.resolve().then(()=>require("./office_small-DfBVh7jy.cjs"))},Vc="0.2.4",dm=new h.Vector3(0,0,-1);class hm extends EventTarget{constructor(e){super(),this.xrDevice=e,this.trackedPlanes=new Set,this.trackedMeshes=new Set,this.version=Vc,this.objectMap=new Map,this.planes=new h.Group,this.boxes=new h.Group,this.meshes=new h.Group,this.tempPosition=new h.Vector3,this.tempQuaternion=new h.Quaternion,this.tempDirection=new h.Vector3,this.tempScale=new h.Vector3,this.tempMatrix=new h.Matrix4,this.raycaster=new h.Raycaster,this.hitTestTarget=new h.Group,this.hitTestMarker=new h.Object3D,this.worldNormal=new h.Vector3,this.normalMatrix=new h.Matrix3,this.scene=new h.Scene,this.scene.background=new h.Color(4079166),this.camera=new h.PerspectiveCamera(50,window.innerWidth/window.innerHeight,.1,40),this.camera.position.set(0,1.6,5);const n=new h.GridHelper(50,50);this.scene.add(n),this.scene.add(this.planes,this.boxes,this.meshes),this.planes.renderOrder=1,this.boxes.renderOrder=2,this.meshes.renderOrder=3,this.planes.visible=!1,this.boxes.visible=!1,this.renderer=new h.WebGLRenderer({antialias:!0,alpha:!0}),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(window.innerWidth,window.innerHeight),this.renderer.domElement.style.position="fixed",this.renderer.domElement.style.top="50vh",this.renderer.domElement.style.left="50vw",this.renderer.domElement.style.transform="translate(-50%, -50%)",this.hitTestTarget.add(this.hitTestMarker),this.hitTestMarker.rotateX(Math.PI/2)}get environmentCanvas(){return this.renderer.domElement}get planesVisible(){return this.planes.visible}set planesVisible(e){this.planes.visible=e}get boundingBoxesVisible(){return this.boxes.visible}set boundingBoxesVisible(e){this.boxes.visible=e}get meshesVisible(){return this.meshes.visible}set meshesVisible(e){this.meshes.visible=e}render(){this.camera.position.copy(this.xrDevice.position),this.camera.quaternion.copy(this.xrDevice.quaternion);const e=this.xrDevice.fovy/Math.PI*180;let n=!1;this.camera.fov!==e&&(this.camera.fov=e,n=!0);const r=this.xrDevice.canvasDimensions;if(r){const i=this.renderer.domElement;(i.width!==r.width||i.height!==r.height)&&(this.camera.aspect=r.width/r.height,this.renderer.setSize(r.width,r.height),n=!0)}n&&this.camera.updateProjectionMatrix(),this.renderer.render(this.scene,this.camera)}deleteAll(){[...this.objectMap.values()].forEach(e=>{e.removeFromParent()}),this.objectMap.clear(),this.trackedMeshes.clear(),this.trackedPlanes.clear()}loadEnvironment(e){this.deleteAll(),e.spatialEntities.forEach(n=>{const r=Fi.fromPBJSON(n);if(r){switch(r.entityType){case it.Box:this.boxes.add(r),this.trackedMeshes.add(r.nativeEntity);break;case it.Plane:this.planes.add(r),this.trackedPlanes.add(r.nativeEntity);break;case it.Mesh:this.meshes.add(r),this.trackedMeshes.add(r.nativeEntity);break}const i=this.objectMap.get(n.uuid);i&&i.removeFromParent(),this.objectMap.set(n.uuid,r)}})}loadDefaultEnvironment(e){if(typeof __IS_UMD__<"u"&&__IS_UMD__){const n=`https://www.unpkg.com/@iwer/sem@${Vc}/captures/${e}.json`;fetch(n).then(r=>{if(!r.ok)throw new Error(`Network response was not ok: ${r.statusText}`);return r.json()}).then(r=>{this.loadEnvironment(r)}).catch(r=>{console.error(`Error loading environment ${e} from CDN`,r)})}else{const n=fm[e];if(!n){console.error(`Requested environment ${e} does not exist`);return}n().then(r=>{const i=r.default;this.loadEnvironment(i)}).catch(r=>{console.error(`Error loading environment ${e} locally`,r)})}}computeHitTestResults(e){return this.tempMatrix.fromArray(e),this.tempMatrix.decompose(this.tempPosition,this.tempQuaternion,this.tempScale),this.tempDirection.copy(dm).applyQuaternion(this.tempQuaternion).normalize(),this.raycaster.set(this.tempPosition,this.tempDirection),this.raycaster.intersectObject(this.meshes,!0).map(i=>{var s;const o=i.point;if(this.hitTestTarget.position.copy(o),!((s=i.face)===null||s===void 0)&&s.normal){this.worldNormal.copy(i.face.normal);const a=i.object;this.worldNormal.applyMatrix3(this.normalMatrix.getNormalMatrix(a.matrixWorld)).normalize(),this.hitTestTarget.lookAt(this.tempPosition.addVectors(o,this.worldNormal))}else this.hitTestTarget.quaternion.set(0,0,0,1);return this.hitTestTarget.updateMatrixWorld(!0),this.hitTestMarker.matrixWorld.toArray()})}}const pm={metaQuest3:G3,metaQuest2:V3,metaQuestPro:U3,oculusQuest1:B3},Uc=["office_small","meeting_room","living_room","music_room","office_large"],mm=["left","none","right"];function xm(t){const e=typeof t=="string"?t:t.type??"metaQuest3",n=new j3(pm[e],typeof t=="string"?void 0:t);typeof t!="string"&&(G0(n,t.headset),Hc(n.hands,t.hand),Hc(n.controllers,t.controller),n.primaryInputMode=t.primaryInputMode??"controller"),n.ipd=typeof t=="string"?0:t.ipd??0,n.installRuntime(),n.installDevUI(v2);const r=typeof t=="string"?!0:t.syntheticEnvironment;return r===!1||(n.installSEM(hm),r===null)?n:typeof r=="string"&&Uc.includes(r)?(n.sem?.loadDefaultEnvironment(r),n):r===!0||r===void 0?(n.sem?.loadDefaultEnvironment(Uc[0]),n):typeof r=="object"?(n.sem?.loadEnvironment(r),n):(fetch(r).then(i=>i.json()).then(i=>n.sem?.loadEnvironment(i)).catch(console.error),n)}const Gc=new h.Euler,gm=new h.Quaternion;function Hc(t,e){if(e!=null)for(const n of mm)G0(t[n],e[n])}function G0(t,e){t==null||e==null||($c(t.position,e.position),$c(Gc,e.rotation),Wc(t.quaternion,gm.setFromEuler(Gc)),Wc(t.quaternion,e.quaternion))}function $c(t,e){if(e!=null){if(e instanceof h.Euler&&t instanceof h.Euler&&t.copy(e),Array.isArray(e)){t.x=e[0],t.y=e[1],t.z=e[2];return}t.x=e.x,t.y=e.y,t.z=e.z}}function Wc(t,e){if(e!=null){if(Array.isArray(e)){t.x=e[0],t.y=e[1],t.z=e[2],t.w=e[3];return}t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w}}exports.emulate=xm;
|